Something went wrong. Try again.
inkfinite (an infinite canvas/whiteboard) monorepo ink.stormlightlabs.org
svelte rust tauri svg canvas perfect-freehand
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088{ "$comment": "Generated by Inkfinite's binding generator. Do not edit this file manually.", "$defs": { "ActorId": { "description": "Stable identifier for a human, agent, or system actor.", "type": "string" }, "AssetId": { "description": "Stable identifier for an embedded or linked asset.", "type": "string" }, "AssetPatch": { "description": "Mutable asset fields.", "properties": { "name": { "description": "Replacement display name.", "type": [ "string", "null" ] }, "provenance_source": { "description": "Replacement attribution source label.", "type": [ "string", "null" ] } }, "type": "object" }, "AssetRecord": { "description": "Image, font, or other binary asset.", "properties": { "digest": { "description": "Content digest including its algorithm prefix.", "type": "string" }, "id": { "$ref": "#/$defs/AssetId", "description": "Stable record identifier." }, "media_type": { "description": "IANA media type.", "type": "string" }, "name": { "description": "User-visible asset name.", "type": "string" }, "provenance": { "$ref": "#/$defs/Provenance", "description": "Attribution for the asset." }, "source": { "$ref": "#/$defs/AssetSource", "description": "Stored or linked content." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "name", "media_type", "digest", "source", "provenance", "version" ], "type": "object" }, "AssetSource": { "description": "Storage form for asset contents.", "oneOf": [ { "description": "Bytes stored inside the canonical document.", "properties": { "bytes": { "description": "Raw asset bytes.", "items": { "format": "uint8", "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "kind": { "const": "embedded", "type": "string" } }, "required": [ "kind", "bytes" ], "type": "object" }, { "description": "Stable external URI retained for formats that cannot embed an asset.", "properties": { "kind": { "const": "external", "type": "string" }, "uri": { "description": "URI used to resolve the content.", "type": "string" } }, "required": [ "kind", "uri" ], "type": "object" } ] }, "BindingAnchor": { "description": "Attachment point on a bound shape.", "oneOf": [ { "description": "Attach to the calculated center.", "properties": { "kind": { "const": "center", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "description": "Attach at normalized shape coordinates.", "properties": { "kind": { "const": "edge", "type": "string" }, "x": { "description": "Normalized horizontal coordinate.", "format": "double", "type": "number" }, "y": { "description": "Normalized vertical coordinate.", "format": "double", "type": "number" } }, "required": [ "kind", "x", "y" ], "type": "object" } ] }, "BindingId": { "description": "Stable identifier for a binding.", "type": "string" }, "BindingKind": { "description": "Registry key for a binding definition.", "type": "string" }, "BindingRecord": { "description": "Relationship between two shapes.", "properties": { "anchor": { "$ref": "#/$defs/BindingAnchor", "description": "Attachment point on the target." }, "id": { "$ref": "#/$defs/BindingId", "description": "Stable record identifier." }, "kind": { "$ref": "#/$defs/BindingKind", "description": "Registry key describing binding behavior." }, "relation_type": { "description": "Optional semantic relationship type, such as `depends_on`.", "type": [ "string", "null" ] }, "source_handle": { "description": "Named source handle, such as `start` or `end`.", "type": "string" }, "source_shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape that owns the binding, such as an arrow." }, "target_shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to which the source is bound." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "kind", "source_shape_id", "target_shape_id", "source_handle", "anchor", "version" ], "type": "object" }, "ChangeHash": { "description": "Opaque causal hash supplied by the CRDT implementation.", "type": "string" }, "ContainerLayout": { "description": "Optional automatic layout applied by a container shape.", "oneOf": [ { "description": "Children retain their explicit transforms.", "properties": { "kind": { "const": "free", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "description": "Children flow along one axis.", "properties": { "alignment": { "$ref": "#/$defs/LayoutAlignment", "description": "Alignment on the cross axis." }, "direction": { "$ref": "#/$defs/StackDirection", "description": "Flow direction." }, "gap": { "description": "Space between adjacent children.", "format": "double", "type": "number" }, "kind": { "const": "stack", "type": "string" }, "padding": { "$ref": "#/$defs/Insets", "description": "Space between children and container edges." } }, "required": [ "kind", "direction", "gap", "padding", "alignment" ], "type": "object" }, { "description": "Children flow through a fixed number of columns.", "properties": { "alignment": { "$ref": "#/$defs/LayoutAlignment", "description": "Alignment within cells." }, "column_gap": { "description": "Horizontal gap between cells.", "format": "double", "type": "number" }, "columns": { "description": "Positive number of grid columns.", "format": "uint32", "minimum": 0, "type": "integer" }, "kind": { "const": "grid", "type": "string" }, "padding": { "$ref": "#/$defs/Insets", "description": "Space between children and container edges." }, "row_gap": { "description": "Vertical gap between cells.", "format": "double", "type": "number" } }, "required": [ "kind", "columns", "column_gap", "row_gap", "padding", "alignment" ], "type": "object" } ] }, "GraphLayoutAlgorithm": { "description": "Graph layout algorithm exposed by Inkfinite.", "oneOf": [ { "const": "flow", "description": "Layer a directed graph by rank.", "type": "string" }, { "const": "tree", "description": "Layer a directed graph with tree-oriented stable ordering.", "type": "string" }, { "const": "radial", "description": "Place graph ranks on concentric circles.", "type": "string" } ] }, "GraphLayoutDirection": { "description": "Direction of ranked graph layouts.", "oneOf": [ { "const": "top_to_bottom", "description": "Sources appear above their targets.", "type": "string" }, { "const": "left_to_right", "description": "Sources appear to the left of their targets.", "type": "string" } ] }, "GraphLayoutOptions": { "description": "Options shared by graph layout operations.", "properties": { "algorithm": { "$ref": "#/$defs/GraphLayoutAlgorithm", "description": "Layout algorithm to use." }, "direction": { "$ref": "#/$defs/GraphLayoutDirection", "description": "Direction for ranked layouts." }, "node_gap": { "description": "Space between adjacent nodes in one rank or radial ring.", "format": "double", "type": "number" }, "rank_gap": { "description": "Space between ranked rows or radial rings.", "format": "double", "type": "number" } }, "required": [ "algorithm", "direction", "node_gap", "rank_gap" ], "type": "object" }, "Insets": { "description": "Padding inside a layout container.", "properties": { "bottom": { "description": "Bottom inset.", "format": "double", "type": "number" }, "left": { "description": "Left inset.", "format": "double", "type": "number" }, "right": { "description": "Right inset.", "format": "double", "type": "number" }, "top": { "description": "Top inset.", "format": "double", "type": "number" } }, "required": [ "top", "right", "bottom", "left" ], "type": "object" }, "LayerContentsDisposition": { "description": "Policy for children of a deleted non-empty layer.", "oneOf": [ { "description": "Move root shapes to the specified layer while preserving their order.", "properties": { "destination_layer_id": { "$ref": "#/$defs/LayerId" }, "kind": { "const": "move_to", "type": "string" } }, "required": [ "kind", "destination_layer_id" ], "type": "object" }, { "description": "Delete every descendant explicitly.", "properties": { "kind": { "const": "delete", "type": "string" } }, "required": [ "kind" ], "type": "object" } ] }, "LayerId": { "description": "Stable identifier for a layer.", "type": "string" }, "LayerPatch": { "description": "Mutable layer fields.", "properties": { "locked": { "description": "Replacement locked state.", "type": [ "boolean", "null" ] }, "name": { "description": "Replacement display name.", "type": [ "string", "null" ] }, "opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Replacement inherited opacity." }, "visible": { "description": "Replacement visibility.", "type": [ "boolean", "null" ] } }, "type": "object" }, "LayerRecord": { "description": "A layer record and its ordered root-shape list.", "properties": { "id": { "$ref": "#/$defs/LayerId", "description": "Stable record identifier." }, "locked": { "description": "Whether descendants can be selected or changed.", "type": "boolean" }, "name": { "description": "User-visible layer name.", "type": "string" }, "opacity": { "$ref": "#/$defs/Opacity", "description": "Opacity inherited by descendants." }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page that owns this layer." }, "shape_ids": { "description": "Root shape IDs in back-to-front draw order.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." }, "visible": { "description": "Whether descendants participate in rendering and hit testing.", "type": "boolean" } }, "required": [ "id", "page_id", "name", "shape_ids", "visible", "locked", "opacity", "version" ], "type": "object" }, "LayoutAlignment": { "description": "Cross-axis alignment for laid-out children.", "oneOf": [ { "const": "start", "description": "Align children to the start edge.", "type": "string" }, { "const": "center", "description": "Center children on the cross axis.", "type": "string" }, { "const": "end", "description": "Align children to the end edge.", "type": "string" }, { "const": "stretch", "description": "Stretch children across the cross axis.", "type": "string" } ] }, "LayoutAxis": { "description": "Axis used by alignment and distribution operations.", "oneOf": [ { "const": "horizontal", "description": "Horizontal document axis.", "type": "string" }, { "const": "vertical", "description": "Vertical document axis.", "type": "string" } ] }, "Opacity": { "description": "Opacity constrained to the inclusive range from zero to one.", "format": "float", "maximum": 1.0, "minimum": 0.0, "type": "number" }, "Operation": { "description": "Durable document operation. Ordered insertions use sibling anchors only.", "oneOf": [ { "description": "Insert a page into the document's ordered page list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor", "description": "Placement relative to an existing page." }, "page": { "$ref": "#/$defs/PageRecord", "description": "Complete new page record." }, "type": { "const": "create_page", "type": "string" } }, "required": [ "type", "page", "anchor" ], "type": "object" }, { "description": "Rename a page.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "name": { "description": "Replacement name.", "type": "string" }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page to rename." }, "type": { "const": "rename_page", "type": "string" } }, "required": [ "type", "page_id", "name" ], "type": "object" }, { "description": "Delete a page and its owned records.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page to delete." }, "type": { "const": "delete_page", "type": "string" } }, "required": [ "type", "page_id" ], "type": "object" }, { "description": "Insert a layer into a page's ordered layer list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor2", "description": "Placement relative to an existing layer." }, "layer": { "$ref": "#/$defs/LayerRecord", "description": "Complete new layer record." }, "type": { "const": "create_layer", "type": "string" } }, "required": [ "type", "layer", "anchor" ], "type": "object" }, { "description": "Change mutable layer fields.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to change." }, "patch": { "$ref": "#/$defs/LayerPatch", "description": "Requested field replacements." }, "type": { "const": "patch_layer", "type": "string" } }, "required": [ "type", "layer_id", "patch" ], "type": "object" }, { "description": "Move a layer within its page.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor2", "description": "New placement relative to a sibling layer." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to move." }, "type": { "const": "reorder_layer", "type": "string" } }, "required": [ "type", "layer_id", "anchor" ], "type": "object" }, { "description": "Delete a layer using an explicit child disposition.", "properties": { "contents": { "$ref": "#/$defs/LayerContentsDisposition", "description": "Required handling for existing shapes." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to delete." }, "type": { "const": "delete_layer", "type": "string" } }, "required": [ "type", "layer_id", "contents" ], "type": "object" }, { "description": "Insert a shape into its parent's ordered child list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor3", "description": "Placement relative to an existing shape child." }, "shape": { "$ref": "#/$defs/ShapeRecord", "description": "Complete new shape record." }, "type": { "const": "create_shape", "type": "string" } }, "required": [ "type", "shape", "anchor" ], "type": "object" }, { "description": "Change mutable shape fields without moving it.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "patch": { "$ref": "#/$defs/ShapePatch", "description": "Requested field replacements." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to change." }, "type": { "const": "patch_shape", "type": "string" } }, "required": [ "type", "shape_id", "patch" ], "type": "object" }, { "description": "Move a shape to another layer or container and place it by sibling anchor.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor3", "description": "Placement relative to a child of the replacement parent." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "parent": { "$ref": "#/$defs/ShapeParent", "description": "Replacement parent." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to move." }, "type": { "const": "reparent_shape", "type": "string" } }, "required": [ "type", "shape_id", "parent", "anchor" ], "type": "object" }, { "description": "Change a shape's registry kind and kind-specific properties.\n\nTransform, common style, semantic metadata, hierarchy, and stable ID\nremain attached to the existing shape record.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "kind": { "description": "Replacement registry kind.", "type": "string" }, "properties": { "additionalProperties": true, "description": "Replacement kind-specific properties.", "type": "object" }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to convert." }, "style": { "anyOf": [ { "$ref": "#/$defs/ShapeStyle" }, { "type": "null" } ], "description": "Optional replacement common style." }, "type": { "const": "convert_shape", "type": "string" } }, "required": [ "type", "shape_id", "kind", "properties" ], "type": "object" }, { "description": "Delete a shape and its owned descendants.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to delete." }, "type": { "const": "delete_shape", "type": "string" } }, "required": [ "type", "shape_id" ], "type": "object" }, { "description": "Create a relationship between two shapes.", "properties": { "binding": { "$ref": "#/$defs/BindingRecord", "description": "Complete new binding record." }, "type": { "const": "create_binding", "type": "string" } }, "required": [ "type", "binding" ], "type": "object" }, { "description": "Delete a binding.", "properties": { "binding_id": { "$ref": "#/$defs/BindingId", "description": "Binding to delete." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "type": { "const": "delete_binding", "type": "string" } }, "required": [ "type", "binding_id" ], "type": "object" }, { "description": "Add an asset to the document.", "properties": { "asset": { "$ref": "#/$defs/AssetRecord", "description": "Complete new asset record." }, "type": { "const": "create_asset", "type": "string" } }, "required": [ "type", "asset" ], "type": "object" }, { "description": "Change mutable asset metadata.", "properties": { "asset_id": { "$ref": "#/$defs/AssetId", "description": "Asset to change." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "patch": { "$ref": "#/$defs/AssetPatch", "description": "Requested field replacements." }, "type": { "const": "patch_asset", "type": "string" } }, "required": [ "type", "asset_id", "patch" ], "type": "object" }, { "description": "Delete an asset that is no longer referenced.", "properties": { "asset_id": { "$ref": "#/$defs/AssetId", "description": "Asset to delete." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "type": { "const": "delete_asset", "type": "string" } }, "required": [ "type", "asset_id" ], "type": "object" }, { "description": "Align two or more shapes using their materialized bounds.", "properties": { "alignment": { "$ref": "#/$defs/ShapeAlignment", "description": "Alignment line shared by the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "shape_ids": { "description": "Shapes to align.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "align_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "alignment", "expected_versions" ], "type": "object" }, { "description": "Distribute three or more shapes with equal gaps between their bounds.", "properties": { "axis": { "$ref": "#/$defs/LayoutAxis", "description": "Axis on which to distribute the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "shape_ids": { "description": "Shapes to distribute.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "distribute_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "axis", "expected_versions" ], "type": "object" }, { "description": "Stack two or more shapes along one axis with a shared cross-axis center.", "properties": { "axis": { "$ref": "#/$defs/LayoutAxis", "description": "Axis on which to stack the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "gap": { "description": "Space between adjacent shape bounds.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to stack.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "stack_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "axis", "gap", "expected_versions" ], "type": "object" }, { "description": "Arrange two or more shapes in a deterministic row-major grid.", "properties": { "column_gap": { "description": "Horizontal space between grid columns.", "format": "double", "type": "number" }, "columns": { "description": "Number of columns in the grid.", "format": "uint32", "minimum": 0, "type": "integer" }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "row_gap": { "description": "Vertical space between grid rows.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to arrange.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "grid_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "columns", "column_gap", "row_gap", "expected_versions" ], "type": "object" }, { "description": "Tidy two or more shapes into a balanced row-major grid.", "properties": { "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "gap": { "description": "Space between grid cells.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to tidy.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "tidy_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "gap", "expected_versions" ], "type": "object" }, { "description": "Arrange selected shapes from their structured connections.", "properties": { "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "layout": { "$ref": "#/$defs/GraphLayoutOptions", "description": "Graph algorithm and spacing options." }, "shape_ids": { "description": "Shapes to arrange.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "graph_layout", "type": "string" } }, "required": [ "type", "shape_ids", "layout", "expected_versions" ], "type": "object" } ] }, "Origin": { "description": "Origin of a record or transaction.", "oneOf": [ { "const": "human", "description": "Direct edit made by a person.", "type": "string" }, { "const": "agent", "description": "Edit proposed or applied by an agent.", "type": "string" }, { "const": "sync", "description": "Change received from a trusted peer.", "type": "string" }, { "const": "system", "description": "Deterministic repair or other internal change.", "type": "string" } ] }, "PageId": { "description": "Stable identifier for a page.", "type": "string" }, "PageRecord": { "description": "A page record and its ordered layer list.", "properties": { "id": { "$ref": "#/$defs/PageId", "description": "Stable record identifier." }, "layer_ids": { "description": "Layer IDs in back-to-front draw order.", "items": { "$ref": "#/$defs/LayerId" }, "type": "array" }, "name": { "description": "User-visible page name.", "type": "string" }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "name", "layer_ids", "version" ], "type": "object" }, "Provenance": { "description": "Attribution retained with content.", "properties": { "actor_id": { "$ref": "#/$defs/ActorId", "description": "Actor responsible for the record's current form." }, "origin": { "$ref": "#/$defs/Origin", "description": "Path by which the record entered the document." }, "source": { "description": "Optional source identifier, such as an external reference or proposal ID.", "type": [ "string", "null" ] }, "timestamp": { "$ref": "#/$defs/Timestamp", "description": "Time at which this provenance entry was recorded." } }, "required": [ "actor_id", "origin", "timestamp" ], "type": "object" }, "RecordVersion": { "description": "Monotonic version of a record within the document history.", "format": "uint64", "minimum": 0, "type": "integer" }, "SemanticMetadata": { "description": "Human- and agent-readable meaning attached to a shape.", "properties": { "agent_editable": { "description": "Whether an agent may propose or apply edits to this shape.", "type": "boolean" }, "body": { "default": null, "description": "Optional card body.", "type": [ "string", "null" ] }, "custom_metadata": { "additionalProperties": true, "default": {}, "description": "Optional user-defined structured metadata. An empty map means no custom fields.", "type": "object" }, "description": { "description": "Optional longer description.", "type": [ "string", "null" ] }, "link": { "default": null, "description": "Optional external link associated with the content.", "type": [ "string", "null" ] }, "locked": { "description": "Whether direct edits to this shape are prohibited.", "type": "boolean" }, "name": { "description": "Optional display name.", "type": [ "string", "null" ] }, "provenance": { "$ref": "#/$defs/Provenance", "description": "Attribution for the record." }, "role": { "description": "Optional semantic selector such as `architecture.service`.", "type": [ "string", "null" ] }, "source": { "default": null, "description": "Optional content source, such as a citation or file path.", "type": [ "string", "null" ] }, "tags": { "description": "Searchable, user-defined tags.", "items": { "type": "string" }, "type": "array" }, "title": { "default": null, "description": "Optional card title.", "type": [ "string", "null" ] } }, "required": [ "tags", "locked", "agent_editable", "provenance" ], "type": "object" }, "ShapeAlignment": { "description": "Edge or center line used to align a group of shapes.", "oneOf": [ { "const": "left", "description": "Align left bounds.", "type": "string" }, { "const": "center", "description": "Align horizontal centers.", "type": "string" }, { "const": "right", "description": "Align right bounds.", "type": "string" }, { "const": "top", "description": "Align top bounds.", "type": "string" }, { "const": "middle", "description": "Align vertical centers.", "type": "string" }, { "const": "bottom", "description": "Align bottom bounds.", "type": "string" } ] }, "ShapeId": { "description": "Stable identifier for a shape.", "type": "string" }, "ShapeKind": { "description": "Registry key for a shape definition.", "type": "string" }, "ShapeParent": { "description": "Parent that owns a shape's sole draw-order entry.", "oneOf": [ { "description": "The shape is a root child of a layer.", "properties": { "id": { "$ref": "#/$defs/LayerId" }, "kind": { "const": "layer", "type": "string" } }, "required": [ "kind", "id" ], "type": "object" }, { "description": "The shape is a child of a container shape.", "properties": { "id": { "$ref": "#/$defs/ShapeId" }, "kind": { "const": "shape", "type": "string" } }, "required": [ "kind", "id" ], "type": "object" } ] }, "ShapePatch": { "description": "Mutable shape fields. `Some(None)` clears an optional field.", "properties": { "layout": { "anyOf": [ { "$ref": "#/$defs/ContainerLayout" }, { "type": "null" } ], "description": "Replacement or removal of container layout." }, "metadata": { "anyOf": [ { "$ref": "#/$defs/SemanticMetadata" }, { "type": "null" } ], "description": "Replacement semantic metadata." }, "properties": { "additionalProperties": true, "description": "Replacement kind-specific properties.", "type": [ "object", "null" ] }, "style": { "anyOf": [ { "$ref": "#/$defs/ShapeStyle" }, { "type": "null" } ], "description": "Replacement common style." }, "transform": { "anyOf": [ { "$ref": "#/$defs/Transform" }, { "type": "null" } ], "description": "Replacement relative transform." } }, "type": "object" }, "ShapeRecord": { "description": "A shape record shared by all built-in shape definitions.", "properties": { "child_ids": { "description": "Ordered children when this shape is a container. This list is the\nframe presentation and export order.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "id": { "$ref": "#/$defs/ShapeId", "description": "Stable record identifier." }, "kind": { "$ref": "#/$defs/ShapeKind", "description": "Registry key. Built-in values are exposed as `*_KIND` constants." }, "layout": { "anyOf": [ { "$ref": "#/$defs/ContainerLayout" }, { "type": "null" } ], "description": "Optional automatic layout for container shapes." }, "metadata": { "$ref": "#/$defs/SemanticMetadata", "description": "Human- and agent-readable semantics and permissions." }, "parent": { "$ref": "#/$defs/ShapeParent", "description": "Parent relation; ordering comes only from the parent's child list." }, "properties": { "additionalProperties": true, "description": "Kind-specific serialized properties validated by the registry.", "type": "object" }, "style": { "$ref": "#/$defs/ShapeStyle", "description": "Visual properties common to all kinds." }, "transform": { "$ref": "#/$defs/Transform", "description": "Transform relative to `parent`." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "kind", "parent", "transform", "child_ids", "properties", "metadata", "style", "version" ], "type": "object" }, "ShapeStyle": { "description": "Common visual style shared by all shape kinds.", "properties": { "fill_opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Optional opacity override for fills." }, "opacity": { "$ref": "#/$defs/Opacity", "description": "Opacity applied to the complete shape." }, "stroke_opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Optional opacity override for strokes." } }, "required": [ "opacity" ], "type": "object" }, "SiblingAnchor": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/PageId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/PageId" } }, "required": [ "position", "sibling_id" ], "type": "object" } ] }, "SiblingAnchor2": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/LayerId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/LayerId" } }, "required": [ "position", "sibling_id" ], "type": "object" } ] }, "SiblingAnchor3": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/ShapeId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/ShapeId" } }, "required": [ "position", "sibling_id" ], "type": "object" } ] }, "StackDirection": { "description": "Stack direction for container layout.", "oneOf": [ { "const": "horizontal", "description": "Place children from left to right.", "type": "string" }, { "const": "vertical", "description": "Place children from top to bottom.", "type": "string" } ] }, "Timestamp": { "description": "Milliseconds since the Unix epoch.", "format": "int64", "type": "integer" }, "TransactionId": { "description": "Stable identifier for a transaction.", "type": "string" }, "Transform": { "description": "Transform relative to a shape's parent container or layer.", "properties": { "rotation": { "description": "Clockwise rotation in radians.", "format": "double", "type": "number" }, "scale_x": { "description": "Horizontal scale.", "format": "double", "type": "number" }, "scale_y": { "description": "Vertical scale.", "format": "double", "type": "number" }, "translation": { "$ref": "#/$defs/Vec2", "description": "Translation in parent coordinates." } }, "required": [ "translation", "rotation", "scale_x", "scale_y" ], "type": "object" }, "Vec2": { "description": "Two-dimensional point or vector in document coordinates.", "properties": { "x": { "description": "Horizontal component.", "format": "double", "type": "number" }, "y": { "description": "Vertical component.", "format": "double", "type": "number" } }, "required": [ "x", "y" ], "type": "object" } }, "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "One durable edit submitted to the transaction engine.", "properties": { "actor_id": { "$ref": "#/$defs/ActorId", "description": "Actor responsible for the transaction." }, "base_heads": { "description": "Causal heads inspected by the caller.", "items": { "$ref": "#/$defs/ChangeHash" }, "type": "array" }, "description": { "description": "Human-readable explanation retained in history.", "type": "string" }, "id": { "$ref": "#/$defs/TransactionId", "description": "Stable transaction identifier." }, "operations": { "description": "Ordered operations committed as one CRDT change.", "items": { "$ref": "#/$defs/Operation" }, "type": "array" }, "origin": { "$ref": "#/$defs/Origin", "description": "Path by which the transaction entered the engine." }, "timestamp": { "$ref": "#/$defs/Timestamp", "description": "Client-recorded transaction time." } }, "required": [ "id", "actor_id", "origin", "base_heads", "description", "operations", "timestamp" ], "title": "TransactionDraft", "type": "object"}