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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931{ "$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" }, "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" } ] }, "Document": { "description": "Normalized, materialized Inkfinite document.", "properties": { "assets": { "additionalProperties": { "$ref": "#/$defs/AssetRecord" }, "description": "Assets indexed by their stable IDs.", "type": "object" }, "bindings": { "additionalProperties": { "$ref": "#/$defs/BindingRecord" }, "description": "Bindings indexed by their stable IDs.", "type": "object" }, "layers": { "additionalProperties": { "$ref": "#/$defs/LayerRecord" }, "description": "Layers indexed by their stable IDs.", "type": "object" }, "page_ids": { "description": "Pages in user-visible order.", "items": { "$ref": "#/$defs/PageId" }, "type": "array" }, "pages": { "additionalProperties": { "$ref": "#/$defs/PageRecord" }, "description": "Pages indexed by their stable IDs.", "type": "object" }, "shapes": { "additionalProperties": { "$ref": "#/$defs/ShapeRecord" }, "description": "Shapes indexed by their stable IDs.", "type": "object" } }, "required": [ "pages", "page_ids", "layers", "shapes", "bindings", "assets" ], "type": "object" }, "DocumentId": { "description": "Stable identifier for a document.", "type": "string" }, "FormatId": { "description": "Stable identifier for a serialized contract.", "type": "string" }, "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" }, "LayerId": { "description": "Stable identifier for a layer.", "type": "string" }, "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" } ] }, "Opacity": { "description": "Opacity constrained to the inclusive range from zero to one.", "format": "float", "maximum": 1.0, "minimum": 0.0, "type": "number" }, "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" }, "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" } ] }, "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" }, "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" }, "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": "Materialized document plus its format and causal identity.", "properties": { "document": { "$ref": "#/$defs/Document", "description": "Normalized records." }, "document_id": { "$ref": "#/$defs/DocumentId", "description": "Stable document identifier." }, "format": { "$ref": "#/$defs/FormatId", "description": "Stable format identifier." }, "format_version": { "description": "Version of the document contract.", "format": "uint32", "minimum": 0, "type": "integer" }, "heads": { "description": "Causal CRDT heads represented by this snapshot.", "items": { "$ref": "#/$defs/ChangeHash" }, "type": "array" } }, "required": [ "format", "format_version", "document_id", "heads", "document" ], "title": "DocumentSnapshot", "type": "object"}