venue_layout_core library

Classes

CanonicalContractIssue
GridSurfaceBrush
Transient authoring brush. Only its compact polygon outline is persisted. Shared cell edges cancel incrementally; preview cost follows the boundary.
LayoutCollisionIndex
Immutable physical hulls and spatial queries for every obstacle kind. Pointer selection retains LayoutSpatialIndex's precise rendered contours.
LayoutFitResult
LayoutFitVariant
LayoutFitVariants
LayoutImportResult
LayoutIssue
LayoutNode
LayoutSnapResult
LayoutSpatialIndex
LayoutTextRequest
LayoutVectorGraphic
Portable vector display list. The input SVG never reaches a runtime DOM or a separate SVG painter; all consumers receive these same curves and paints.
ResolvedNodeAppearance
SvgGraphicImport
SvgTextOutline
SvgTextRequest
TableSeating
Physical seating rules, independent of colors and material families.
VenueLayoutDocument

Enums

LayoutTapDisposition
Both active and blocking targets participate in resolution. The winner is returned to the mode handler, which owns availability feedback and actions.

Constants

barGuestSides → const Set<String>
barSurfaceModuleSize → const double
Counters have a shallower footprint than a four-seat table module.
canonicalAssemblyFields → const Set<String>
canonicalAssemblyMaxSeats → const int
canonicalAssemblyMembers → const Map<String, List<String>>
canonicalAssemblyNodeKinds → const Map<String, String>
canonicalDocumentVersion → const int
Versioned declaration metadata shared by the model, JSON Schema and SQL. These are the stored leaves, never a second set of resolved style defaults.
canonicalGeometryKinds → const Set<String>
canonicalGeometryPropertyKeys → const Set<String>
canonicalLabelDefaults → const Map<String, Object>
canonicalLabelFields → const Map<String, Map<String, Object>>
canonicalLayoutTextPolicy → const Map<String, Object>
Generated into the server's JSON import by tool/export_contract.dart. Consumers draw prepared output; only the service imports the actual engine.
canonicalOriginalSourceFields → const Map<String, Map<String, Object>>
canonicalPathArities → const Map<String, int>
canonicalSeatingFields → const Map<String, Map<String, Object>>
canonicalStyleKinds → const Set<String>
canonicalTextResourceProtocol → const int
canonicalVisualFields → const Map<String, Map<String, Object>>
couchGeometry → const Map<String, double>
Shared local upholstery geometry; dimensions are in document units.
layoutAppearanceKeys → const Set<String>
layoutAppearanceKinds → const Set<String>
layoutDefaultSeatFill → const String
Default authoring fill, shared by insertion, scene compilation and previews.
layoutFloorStyles → const Set<String>
layoutLimits → const Map<String, num>
layoutMaterialFamilies → const Map<String, Map<String, dynamic>>
One material definition shared by templates, previews and authoring UI.
layoutMaxBytes → const int
layoutMaxDepth → const int
layoutMaxNodes → const int
layoutMaxSeats → const int
layoutMotionTokens → const Map<String, int>
layoutObjectStyles → const Set<String>
layoutProtocol → const int
layoutSeatingDefaultKeys → const Set<String>
Physical authoring defaults; never override an existing table's geometry.
layoutSeatStyles → const Set<String>
layoutSelectedSeatFill → const String
Shared selection presentation constants.
layoutSelectedSeatScale → const double
layoutStudioPalettes → const Map<String, Map<String, String>>
Shared by the editor's color picker and template creation. Color only: applying a palette preserves material, geometry and seat identities.
legacySeatingDestinations → const Map<String, String>
legacyStyleDestinations → const Map<String, String>
Source-field coverage is explicit so a newly introduced schema-1 field cannot disappear in a conversion just because a normalizer does not know it.
tableSeatSides → const List<String>
tableSurfaceModuleSize → const double
One module is a compact square table with one seat on each side.

Properties

layoutColorPattern → RegExp
final

Functions

acceptLegacyLayoutImport(LayoutImportResult prepared, Map<String, dynamic> currentSource, {required int currentRevision}) → VenueLayoutDocument
Conversion is automatic but remains guarded against a stale revision or source bytes. Consumers must pass the current source at the commit boundary.
alignNodes(VenueLayoutDocument d, Set<String> ids, String alignment) → VenueLayoutDocument
attachSeat(VenueLayoutDocument d, String seatId, String tableId) → VenueLayoutDocument
backgroundHull(VenueLayoutDocument document) → List<List<double>>
Visible background bounds use the same crop and transform as rendering.
backgroundPlacement(double sw, double sh, Map<String, dynamic> canvas, {String fit = 'contain'}) → Map<String, dynamic>
barLayout({int count = 0, double x = 400, double y = 300, double width = 280, double height = 72, String guestSide = 'bottom', String? id, TableSeating seating = const TableSeating()}) → VenueLayoutDocument
barSeatCount(VenueLayoutDocument document, String id) → int
boundsOfPoints(List<List<double>> p) → Map<String, double>
busLayout({int rows = 10, int left = 2, int right = 2, int rear = 5, int decks = 1, int? upperRows, int? upperRear, double x = 160, double y = 120, String? id, TableSeating seating = const TableSeating()}) → VenueLayoutDocument
Configurable schematic, not a manufacturer-specific seating certification.
busLayoutParameters(VenueLayoutDocument document, String id) → Map<String, int>
canAttachSeatToTable(VenueLayoutDocument d, String seatId, String tableId) → bool
Uses the exact atomic attachment operation for hover and drop availability.
canonicalAssemblyParameterFields() → Map<String, Map<String, Object>>
Count parameters are integral; curvature is signed. These declarations also generate the SQL admission rules and public JSON Schema.
canonicalAssemblyRules(String kind) → Map<String, Map<String, Object>>
canonicalContractJson(Object? value) → String
Stable JSON for cross-runtime descriptor and metadata digests. Strings are never Unicode-normalized; source text and UTF-8 cluster mappings stay intact.
canonicalDeclarationMetadata() → Map<String, Object>
canonicalDocumentSchema() → Map<String, dynamic>
Structural machine-readable contract. Identity references, grid topology, resource readiness and authoring-source hashes are checked by the core.
canonicalGridCellFilled(LayoutNode node, int x, int y) → bool
Grid coordinates identify filled module cells; holes remain empty. Admission and physical pin placement use this same boundary predicate.
canonicalGridPinOnBoundary(LayoutNode node, List cell, String face) → bool
canonicalNumberPath(VenueLayoutDocument document, num count, Map<String, dynamic> resources, List<Map<String, dynamic>> issues, String nodeId) → List<List>
Derived count notation has a closed alphabet and non-contextual symbol preparation. It never handles authored text or requests every count value.
canonicalStyleSchema({required String kind}) → Map<String, Object?>
cloneLayout(VenueLayoutDocument d, {double dx = 0, double dy = 0}) → VenueLayoutDocument
collectDeclaredLayoutFontFamilies(VenueLayoutDocument document, {bool includePresets = false}) → Set<String>
Declared families remain editable even before their first visible label. Preset declarations belong only to the explicit admin dependency closure.
collectLayoutTextResourceIds(VenueLayoutDocument document, Map<String, dynamic> resources, {bool includePresets = true}) → List<String>
collectNumericFontFaces(VenueLayoutDocument document, Map<String, dynamic> families, {bool includePresets = false}) → Set<String>
collectTextRequests(VenueLayoutDocument document, Map<String, dynamic> families, {bool includePresets = false}) → Map<String, LayoutTextRequest>
The only authored-text role collector, including isolated preset defaults. Derived numeric notation is a separate bounded symbol dependency below.
collisionIndexFor(VenueLayoutDocument document) → LayoutCollisionIndex
Reuses derived physical geometry only for the same immutable document.
compartmentLayout({int compartments = 4, int seats = 6, double x = 100, double y = 100, String? id, TableSeating seating = const TableSeating()}) → VenueLayoutDocument
compartmentLayoutParameters(VenueLayoutDocument document, String id) → Map<String, int>
compileScene(VenueLayoutDocument document, {Map<String, dynamic> resources = const {}, Map<String, dynamic> presentation = const {}}) → Map<String, dynamic>
compileSceneNodes(VenueLayoutDocument document, Set<String> nodeIds, {bool includeCanvas = false, Map<String, dynamic> resources = const {}, Map<String, dynamic> presentation = const {}}) → Map<String, dynamic>
configurePlanTableGap(VenueLayoutDocument doc, double gap, {bool constrainToCanvas = true}) → VenueLayoutDocument
Changes all unlocked table profiles in one immutable authoring operation. Existing IDs, manual placements and explicit rotations are preserved. The persisted default also governs tables inserted into an empty plan.
configurePlanTableSeating(VenueLayoutDocument doc, {double? width, double? height, double? gap, double? spacing, double? edgePadding, bool constrainToCanvas = true}) → VenueLayoutDocument
Applies only the supplied physical settings, preserving local values for every other setting. The operation is atomic if reflow cannot fit.
configureTableSeating(VenueLayoutDocument doc, String tableId, TableSeating seating, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
couchLayout({int count = 2, double x = 400, double y = 300, double width = 160, double height = 100, String? id}) → VenueLayoutDocument
A couch owns actual seat nodes and one atomic selection unit. No host state or reservation metadata is persisted in this geometry document.
couchSeatCount(VenueLayoutDocument document, String rootId) → int
cullScene(Map<String, dynamic> scene, Map<String, double> viewport, {double zoom = 1}) → List<Map<String, dynamic>>
dashedPath(ScenePath path, List<double> pattern) → ScenePath
Materialize stroke dashes once in the shared scene, including curved paths. Curves use pinned subdivisions (cubic 32, quadratic 16); adapters draw paths.
detachSeat(VenueLayoutDocument d, String id) → VenueLayoutDocument
distributeNodes(VenueLayoutDocument d, Set<String> ids, {bool horizontal = true}) → VenueLayoutDocument
documentBounds(VenueLayoutDocument d) → Map<String, double>
documentSeating(VenueLayoutDocument doc) → TableSeating
Palette chairs match the prevailing physical size in the current document.
documentTableSeating(VenueLayoutDocument doc) → TableSeating
New tables follow the prevailing existing table footprint. Existing explicit overrides remain intact. A deterministic tie prefers the smaller footprint.
effectiveNodeProperties(VenueLayoutDocument document, LayoutNode node) → Map<String, dynamic>
Document styles replace factory defaults unless a property is explicitly marked local. Geometry and host presentation state are never merged here.
extendGridTableSurface(VenueLayoutDocument document, String id, int edgeIndex, double x, double y, {int? cellIndex, Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Extends or removes a module-wide strip at a boundary, using painting's cells.
fitCanvas(VenueLayoutDocument d, {double padding = 40}) → VenueLayoutDocument
fitSeats(VenueLayoutDocument d, {required Map<String, double> area, int count = 20, double spacing = 56, double rowSpacing = 64, List<List<double>>? boundary, bool cancelled()?}) → LayoutFitResult
fitSeatsAsync(VenueLayoutDocument d, {required Map<String, double> area, int count = 20, double spacing = 56, double rowSpacing = 64, List<List<double>>? boundary, bool cancelled()?}) → Future<LayoutFitResult>
Yield between bounded 8ms batches so a UI cancellation can be delivered.
fitSeatVariantsAsync(VenueLayoutDocument d, {required Map<String, double> area, int count = 20, double spacing = 56, double rowSpacing = 64, double? minSpacing, double? maxSpacing, double spacingStep = 4, double? minRowSpacing, double? maxRowSpacing, double rowSpacingStep = 4, List<List<double>>? boundary, bool cancelled()?}) → Future<LayoutFitVariants>
freeze(dynamic value) → dynamic
frozenMap(Map<String, dynamic> v) → Map<String, dynamic>
gridSurfaceReplacement(LayoutNode original, GridSurfaceBrush brush) → LayoutNode
Preserves identity, transforms, commercial metadata and appearance.
groupNodes(VenueLayoutDocument d, Set<String> ids) → VenueLayoutDocument
hitTest(VenueLayoutDocument d, double x, double y, {double? tolerance, bool accept(LayoutNode)?}) → String?
hitTestRect(VenueLayoutDocument d, Map<String, double> rect, {bool contained = false}) → Set<String>
importLegacyLayout(Map<String, dynamic> source, {required Map<String, Map<String, dynamic>> fontFamilies, required int sourceRevision, Map<String, Map<String, dynamic>> fontFaces = const {}}) → LayoutImportResult
Explicit schema-1 input boundary. It never changes source bytes, IDs, transforms or commercial data. Ambiguities use deterministic conservative decisions recorded in the receipt; invalid source data still fails closed.
importSvgGraphic(String source) → SvgGraphicImport
The Flutter-maintained parser resolves SVG geometry, styles, transforms, gradients and clipping. Optional FFI optimizers are disabled: curves stay curves and the identical pure Dart import runs on desktop and in the JS core.
importSvgGraphicWithText(String source, {required Future<SvgTextOutline> prepareText(SvgTextRequest)}) → Future<SvgGraphicImport>
SVG text crosses the same authorized whole-text preparation boundary as an ordinary text field. Curves then join the one canonical vector display list. Unsupported per-character positioning and mixed typography fail explicitly.
insertPathVertex(VenueLayoutDocument document, String id, int segmentIndex, double localX, double localY, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Inserts a point after segmentIndex in the original local coordinate frame. The final polygon segment joins its last point to its first point.
instantiatePreset(VenueLayoutDocument d, String presetId, {double x = 0, double y = 0}) → VenueLayoutDocument
interpolateLayout(VenueLayoutDocument from, VenueLayoutDocument to, double t, {bool reducedMotion = false}) → VenueLayoutDocument
interpolateScene(Map<String, dynamic> from, Map<String, dynamic> to, double t, {bool reducedMotion = false}) → Map<String, dynamic>
inverseMatrix(List<double> m) → List<double>
isBarNode(LayoutNode node) → bool
isCouchNode(LayoutNode node) → bool
isLayoutObstacle(LayoutNode node) → bool
Physical placement policy, independent of appearance and pointer hit areas. Groups contribute through their children; ordinary artwork is decorative.
isRowAssemblyNode(LayoutNode? node) → bool
A row root owns a typed assembly spec; legacy spelling exists only until the explicit input cutover is complete.
isStoolNode(LayoutNode node, {LayoutNode? parent}) → bool
isZigzagNode(LayoutNode node) → bool
labelRenderMatrix(LayoutNode node, Map<String, dynamic> label, List<double> matrix, {Map<String, double>? textBounds}) → List<double>
Exact prepared geometry only. A missing resource cannot fall back to runes, a native font or client-dependent measurement. Whole-text paths use the same label transform in canonical and pending views.
layoutCollisions(VenueLayoutDocument d) → List<List<String>>
layoutEaseOut(double t) → double
layoutMaterialStyles(String family) → Map<String, Map<String, dynamic>>
Canonical family presets contain presentation only and never move seats.
layoutNumberDescriptor(String fontFaceId) → Map<String, dynamic>
layoutNumberResourceId(String fontFaceId) → String
layoutSubtree(VenueLayoutDocument d, Set<String> ids) → Set<String>
localHull(LayoutNode n) → List<List<double>>
localMatrix(LayoutNode n) → List<double>
materializedNodeStyle(VenueLayoutDocument document, LayoutNode node) → Map<String, dynamic>
Resolved portable declarations for a fragment crossing a document boundary.
materializeFragmentContext(VenueLayoutDocument document) → VenueLayoutDocument
Resolve a copied fragment's source context once into ordinary declarations. Later edits use the ordinary resolver and physical placement commands.
moveLayoutLayers(VenueLayoutDocument d, Set<String> ids, {required bool toFront}) → VenueLayoutDocument
Moves selected subtrees to a sibling-stack boundary without changing their parent, geometry, identity, or the relative order of their descendants.
moveLayoutWithinCanvas(VenueLayoutDocument d, Set<String> ids, {double dx = 0, double dy = 0}) → VenueLayoutDocument
moveTableSeatToSide(VenueLayoutDocument document, String seatId, String side) → VenueLayoutDocument
Changes the explicit side pin independently of free placement and rotation.
multiplyMatrix(List<double> a, List<double> b) → List<double>
nearestNode(VenueLayoutDocument d, String fromId, String direction) → String?
newLayoutId() → String
nodeBounds(VenueLayoutDocument d, LayoutNode n) → Map<String, double>
nodeOutlineContours(LayoutNode node, {LayoutNode? parent}) → List<List<List<double>>>
Closed contours derived from the SAME outline commands used by renderers. Curves use a fixed deterministic subdivision; style polygons remain exact.
nodePath(LayoutNode n, {LayoutNode? parent}) → ScenePath
Canonical visual outline shared by both renderers and the hit index. Collision/resize footprints remain the authored width/height hull.
nodeTextRequest(VenueLayoutDocument document, LayoutNode node, Map<String, dynamic> families, {String? text}) → LayoutTextRequest
orderedNodes(VenueLayoutDocument d) → List<LayoutNode>
patchCanonicalStyle(Map<String, dynamic> style, List<String> path, {Object? value, bool unset = false}) → Map<String, dynamic>
Set/Unset modifies one authored leaf. Equal values stay explicit; null is never a reset and siblings retain their declarations.
pointInPolygon(List<List<double>> points, double x, double y) → bool
polygonContainsHull(List<List<double>> polygon, List<List<double>> hull) → bool
polygonRingArea(List<List<double>> ring) → double
Ring geometry shared by authoring validation and spatial hit testing.
polygonRingContains(List<List<double>> points, double x, double y) → bool
polygonRingsTouch(List<List<double>> a, List<List<double>> b) → bool
polygonSelfIntersects(List points) → bool
polygonsOverlap(List<List<double>> a, List<List<double>> b) → bool
polygonSurfaceSlots(LayoutNode table) → List<Map<String, dynamic>>
Safe, evenly spaced positions on each edge, with clearance at corners and concave recesses. The immutable node owns this bounded cache.
preparedNodeText(VenueLayoutDocument document, LayoutNode node, Map<String, dynamic> resources, List<Map<String, dynamic>> issues, {required String text}) → Map<String, dynamic>?
quantize(num value) → double
reconcileAssembly(VenueLayoutDocument d, String rootId, VenueLayoutDocument generated) → VenueLayoutDocument
reconcileSurfaceEdit(VenueLayoutDocument before, VenueLayoutDocument after, String id, {Set<String> protectedSeatIds = const {}, bool constrainToCanvas = false}) → VenueLayoutDocument
Reconciles edited table footprints through the existing protected-seat rules. Unlocked chair poses return to automatic seating after surface edits.
reflowBar(VenueLayoutDocument document, String id, int count, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
reflowCanonicalPins(VenueLayoutDocument document, String tableId) → VenueLayoutDocument
Recompute only explicitly pinned seats during a physical authoring command. Loading, style edits and rigid moves never invoke placement.
reflowTable(VenueLayoutDocument d, String tableId, int count, {bool constrainToCanvas = false, Set<String> protectedSeatIds = const {}, List<int>? edgeCounts}) → VenueLayoutDocument
reflowTablesAtCanvasEdges(VenueLayoutDocument d, Set<String> tableIds) → VenueLayoutDocument
Repositions attached chairs onto free perimeter slots at walls or neighbours. Call with the transformed gesture baseline. Nearby physical objects obstruct seats; canvas size, seat identities, slot numbers and locked positions stay unchanged. Manual positions yield when obstructed. If no complete packing exists, the bounded-movement caller rejects the proposed translation.
removePathVertex(VenueLayoutDocument document, String id, int index, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Removes one point while preserving every other point's world position.
renderBand(LayoutNode n) → int
renumberSeats(VenueLayoutDocument d, List<String> ids, {String prefix = '', int start = 1, int step = 1, List<String>? labels}) → VenueLayoutDocument
reorderLayoutLayers(VenueLayoutDocument d, Set<String> ids, {required int direction}) → VenueLayoutDocument
Moves selected subtrees one position through their respective sibling stacks.
reorderNodes(VenueLayoutDocument d, Set<String> ids, int direction) → VenueLayoutDocument
resizeCanvas(VenueLayoutDocument d, double width, double height, {bool center = false}) → VenueLayoutDocument
resizeCouchBody(VenueLayoutDocument document, String rootId, double width, double height, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Preserves membership and root transform, clamps to the minimum upholstery dimensions and recomputes cushion rectangles. Never grows the canvas.
resizeCouchSeats(VenueLayoutDocument document, String rootId, int count, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Retains the existing unit ID and stable cushion slots. Any protected member freezes the whole atomic membership, including additions. Root transform and canvas are unchanged. Count changes preserve the current cushion width, growing or shrinking the body symmetrically around its existing center.
resizeGridTableSurface(VenueLayoutDocument document, String id, double width, double height, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
resizeNode(VenueLayoutDocument d, String id, double width, double height, {Set<String> protectedSeatIds = const {}, String? handle}) → VenueLayoutDocument
resizeRowAssembly(VenueLayoutDocument document, String id, double width, double height) → VenueLayoutDocument
Resizes row spacing and curvature without scaling or recreating chairs.
resizeZigzagLine(VenueLayoutDocument d, String id, double width, double height) → VenueLayoutDocument
A rectangular resize scales baseline endpoints and perpendicular amplitude, then regenerates regular peaks rather than shearing the authored pattern.
resolvedLayoutFontFace(Map<String, dynamic> label, Map<String, dynamic> families, {String? nodeId}) → String
resolveNodeAppearance(VenueLayoutDocument document, LayoutNode node) → ResolvedNodeAppearance
One sparse cascade, including provenance. Lock never changes inheritance.
rowAssemblyBounds(VenueLayoutDocument document, String id) → Map<String, double>
Actual descendant geometry in the row root's coordinate system. The root's own placeholder box does not participate.
rowLayout({int rows = 5, int seatsPerRow = 8, int blocks = 1, double aisle = 80, double spacing = 56, double rowSpacing = 64, double x = 100, double y = 100, double arc = 0, String? id, TableSeating seating = const TableSeating()}) → VenueLayoutDocument
rowLayoutParameters(VenueLayoutDocument d, String rootId) → Map<String, num>
Reads the validated stored row specification.
sameLayoutDocument(VenueLayoutDocument a, VenueLayoutDocument b) → bool
Fast comparison of validated immutable snapshots. Pointer updates usually replace only a few nodes, so no JSON or full property graph is allocated. Rare record/list reorderings retain the canonical serializer as the oracle.
sameLayoutNode(LayoutNode a, LayoutNode b) → bool
Structural comparison for validated immutable nodes. Unchanged nodes are an identity check; coordinate comparisons retain canonical serialization's quantization and appearance override order has no semantic significance.
sameLayoutValue(dynamic a, dynamic b) → bool
Deep JSON-value equality without serialization; maps ignore key order, lists preserve order and equal numeric values compare equally.
savePreset(VenueLayoutDocument d, Set<String> ids, String title) → VenueLayoutDocument
sceneItemBounds(Map<String, dynamic> item) → Map<String, double>
sceneItemVisible(Map<String, dynamic> item, Map<String, double> viewport, {double zoom = 1}) → bool
seatAttachment(VenueLayoutDocument document, String id) → Map<String, dynamic>?
seatPlacementFree(VenueLayoutDocument document, LayoutNode seat) → bool
seatRotationManual(VenueLayoutDocument document, LayoutNode seat) → bool
selectionBounds(VenueLayoutDocument d, Set<String> ids) → Map<String, double>
setBarGuestSide(VenueLayoutDocument document, String id, String side, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
setDocumentLabelLeaf(VenueLayoutDocument document, String field, {Object? value, bool unset = false}) → VenueLayoutDocument
setKindStyleLeaf(VenueLayoutDocument document, String kind, List<String> path, {Object? value, bool unset = false}) → VenueLayoutDocument
setNodeStyleLeaf(VenueLayoutDocument document, String id, List<String> path, {Object? value, bool unset = false}) → VenueLayoutDocument
setTableChildStyleLeaf(VenueLayoutDocument document, String tableId, List<String> path, {Object? value, bool unset = false}) → VenueLayoutDocument
setTableSeatPlacement(VenueLayoutDocument document, String seatId, Map<String, dynamic> placement, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Changes placement intent in one physical command. The node transform remains the sole rendered pose; manual rotation is independent of placement.
setTableSurfaceKind(VenueLayoutDocument document, String id, String kind, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Change a typed surface without removing or replacing existing seat identities.
shapeFromPoints(String shape, List<List<double>> points, {String? id, Map<String, dynamic> properties = const {}, Map<String, dynamic> style = const {}}) → LayoutNode
sketchSurface(List<List<double>> centerline, {double breadth = 100, bool bar = false, String? id}) → LayoutNode
Expands a sketched centreline into an editable, closed surface. Bounded mitres keep near-reversals from producing an arbitrarily long spike.
snapAttachedChairPosition(VenueLayoutDocument d, String seatId, {double tolerance = 32}) → VenueLayoutDocument
snapResize(VenueLayoutDocument document, LayoutNode node, double width, double height, {required double sx, required double sy, double zoom = 1, double? grid, bool disabled = false, Map<String, double>? localBounds}) → ({List<Map<String, dynamic>> guides, double height, double width})
Snap the dragged edge/corner in the object's axes. The opposite edge stays fixed, and the moving subtree never attracts its own resize handle.
snapTableSurfaceToGrid(LayoutNode node, {double? width, double? height, String? preset}) → LayoutNode
Snaps a custom outline to the same physical modules used by painting.
snapTranslation(VenueLayoutDocument d, Set<String> ids, double dx, double dy, {double zoom = 1, double? grid, String? previousMagnet, double? axisRotation, bool disabled = false, Map<String, double>? sourceBounds}) → LayoutSnapResult
spatialIndexFor(VenueLayoutDocument d) → LayoutSpatialIndex
supportsTableSeatSides(LayoutNode table) → bool
surfaceGeometryProperties(LayoutNode node) → Map<String, dynamic>
Rendering/geometry projection only. Grid rings remain the stored authority; materialized width/height and node transforms are not recomputed on load.
surfacePresetPoints(String shape, double width, double height) → List<List<double>>
Editable footprints use the same polygon contract as ordinary vector shapes.
tableCapacity(LayoutNode n) → int
tableEdgeCapacities(LayoutNode table) → List<int>
tableForSeat(VenueLayoutDocument document, LayoutNode seat) → LayoutNode?
Native imports may keep the desk and its chairs as siblings in one group.
tableLayout({required String shape, int count = 6, double x = 400, double y = 300, double width = 180, double height = 100, String? id, TableSeating? seating, List<int>? edgeCounts}) → VenueLayoutDocument
tableSideForSeat(VenueLayoutDocument document, LayoutNode seat) → String?
transformNodes(VenueLayoutDocument d, Set<String> ids, {double dx = 0, double dy = 0, double rotation = 0, bool cornerPivot = false}) → VenueLayoutDocument
transformPoint(List<double> m, double x, double y) → List<double>
translateLayoutWithinCanvas(VenueLayoutDocument d, Set<String> ids, {double dx = 0, double dy = 0}) → VenueLayoutDocument
Translates an assembly inside the fixed canvas. Derive every preview from the gesture baseline. Physical furniture and chairs constrain placement; decorative labels do not. Move the complete assembly rigidly. Seating repair belongs to explicit layout operations, never to pointer translation.
triangulatePolygon(List<List<double>> polygon) → List<List<List<double>>>
ungroupNodes(VenueLayoutDocument d, Set<String> ids) → VenueLayoutDocument
updateBusLayout(VenueLayoutDocument document, String id, {int? rows, int? left, int? right, int? rear, int? decks, int? upperRows, int? upperRear, Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
updateCompartmentLayout(VenueLayoutDocument document, String id, {int? compartments, int? seats, Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
updatePathVertex(VenueLayoutDocument d, String id, int index, double localX, double localY, {Set<String> protectedSeatIds = const {}}) → VenueLayoutDocument
Edits a vertex in the node's original local coordinate system. The path is recentered without moving any other vertex in world space.
updateZigzag(VenueLayoutDocument document, String id, {int? teeth, double? amplitude, List<double>? start, List<double>? end}) → VenueLayoutDocument
Optional endpoints are in the node's CURRENT LOCAL frame. Recentring keeps every specified/unchanged endpoint fixed in world space, including parents.
validateCanonicalAssembly(Map<String, dynamic> spec, String nodeKind, String path) → List<CanonicalContractIssue>
validateCanonicalLeaves(Object? value, Map<String, Map<String, Object>> fields, String path) → List<CanonicalContractIssue>
validateCanonicalStyle(Object? value, String path, {required String kind}) → List<CanonicalContractIssue>
validateCanonicalTextResources(Map<String, dynamic> resources) → List<LayoutIssue>
Resource validation runs at the provider boundary, never during a frame.
validateDocument(VenueLayoutDocument d) → List<LayoutIssue>
validateLayoutResources(Map<String, dynamic> resources) → List<LayoutIssue>
Validate canonical prepared resources once at the resource admission seam.
validOriginalSvgSource(Map<String, dynamic> value) → bool
Original imported source is private authoring provenance, never a render input.
withLayoutMaterialFamily(VenueLayoutDocument document, String family) → VenueLayoutDocument
withLayoutMinimalStyle(VenueLayoutDocument document) → VenueLayoutDocument
withLayoutStudioPalette(VenueLayoutDocument document, String name) → VenueLayoutDocument
worldHull(LayoutNode n, List<double> m) → List<List<double>>
worldMatrices(VenueLayoutDocument d) → Map<String, List<double>>
worldMatrix(VenueLayoutDocument d, LayoutNode n) → List<double>
zigzagLine(double startX, double startY, double endX, double endY, {int teeth = 8, double amplitude = 12, String? id, Map<String, dynamic> properties = const {}, Map<String, dynamic>? style}) → LayoutNode
Two alternating peaks per tooth, half-pitch terminal segments and exact baseline endpoints. Coordinates are in the document frame for a new node.

Typedefs

ScenePath = List<List>