{"commands":{"arrange.align":{"args":{"$defs":{"Edge":{"description":"Which edge or centre to align to.","oneOf":[{"const":"left","description":"Left edges on one vertical line.","type":"string"},{"const":"right","description":"Right edges on one vertical line.","type":"string"},{"const":"top","description":"Top edges on one horizontal line.","type":"string"},{"const":"bottom","description":"Bottom edges on one horizontal line.","type":"string"},{"const":"center_x","description":"The x-centres equal (elements share a vertical centre line).","type":"string"},{"const":"center_y","description":"The y-centres equal (elements share a horizontal centre line).","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrange.align`.","properties":{"edge":{"$ref":"#/$defs/Edge","description":"The edge or centre line."},"ids":{"default":null,"description":"Elements to align (a group counts as one). Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"to":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"Align to this element instead of the bounds of the selection; it does not move."}},"required":["edge"],"title":"AlignArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `arrange.align` and `arrange.distribute`.","properties":{"moved":{"description":"Elements that moved (bound text and frame children included), in z-order.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"unbound":{"description":"Arrow ends that were unbound because their target did not move too: `[arrow id, \"start\" or \"end\"]`.","items":{"maxItems":2,"minItems":2,"prefixItems":[{"$ref":"#/$defs/ElementId"},{"type":"string"}],"type":"array"},"type":"array"}},"required":["moved","unbound"],"title":"ArrangeOut","type":"object"}},"arrange.distribute":{"args":{"$defs":{"DistAxis":{"description":"The axis along which elements are spread out.","oneOf":[{"const":"horizontal","description":"Left to right.","type":"string"},{"const":"vertical","description":"Top to bottom.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrange.distribute`.","properties":{"axis":{"$ref":"#/$defs/DistAxis","description":"Spread along this axis."},"gap":{"default":null,"description":"Exact gap between neighbours, starting from the first element. Omitted: the two outer elements stay and the\ngaps between all become equal.","format":"double","type":["number","null"]},"ids":{"default":null,"description":"Elements to distribute (a group counts as one). Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"required":["axis"],"title":"DistributeArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `arrange.align` and `arrange.distribute`.","properties":{"moved":{"description":"Elements that moved (bound text and frame children included), in z-order.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"unbound":{"description":"Arrow ends that were unbound because their target did not move too: `[arrow id, \"start\" or \"end\"]`.","items":{"maxItems":2,"minItems":2,"prefixItems":[{"$ref":"#/$defs/ElementId"},{"type":"string"}],"type":"array"},"type":"array"}},"required":["moved","unbound"],"title":"ArrangeOut","type":"object"}},"arrange.z_order":{"args":{"$defs":{"Op":{"description":"A z-order step.","oneOf":[{"const":"front","description":"To the top.","type":"string"},{"const":"back","description":"To the bottom.","type":"string"},{"const":"forward","description":"One unit up.","type":"string"},{"const":"backward","description":"One unit down.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrange.z_order`.","properties":{"ids":{"default":null,"description":"Elements to move. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"op":{"$ref":"#/$defs/Op","description":"`front` and `back` go to the top or bottom; `forward` and `backward` step over the neighbouring unit."}},"required":["op"],"title":"ZOrderArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `arrange.z_order`.","properties":{"moved":{"description":"Elements that got a new place in the order (empty when they were at the end already).","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"rebalanced":{"description":"True when all order keys had to be rewritten.","type":"boolean"}},"required":["moved","rebalanced"],"title":"ZOrderOut","type":"object"}},"arrow.add_point":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.add_point`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The arrow or line."},"at":{"default":null,"description":"Where the new point goes. Default: the middle of the segment.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"segment":{"description":"The segment, counted from 1: segment `n` joins point `n - 1` and point `n`.","format":"uint","minimum":0,"type":"integer"}},"required":["arrow","segment"],"title":"AddPointArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.add_point`.","properties":{"index":{"description":"The number of the new point.","format":"uint","minimum":0,"type":"integer"}},"required":["index"],"title":"AddPointOut","type":"object"}},"arrow.bind":{"args":{"$defs":{"BindMode":{"description":"Where a bound arrow end sits relative to its target.","oneOf":[{"const":"inside","description":"The end is inside the target's outline and keeps its ratio position there.","type":"string"},{"const":"orbit","description":"The end sits on the target's outline plus a small gap, aimed at the fixed point.","type":"string"}]},"EndWord":{"description":"Which end of an arrow a command acts on.","oneOf":[{"const":"start","description":"The first point.","type":"string"},{"const":"end","description":"The last point.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.bind`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The arrow or line."},"end":{"$ref":"#/$defs/EndWord","description":"Which end to bind."},"fixed_point":{"default":null,"description":"Where on the target, as ratios `[rx, ry]` of its unrotated box (0 to 1 is inside the box). Default:\nthe outline point facing the arrow.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"mode":{"$ref":"#/$defs/BindMode","default":"orbit","description":"`orbit` keeps the end on the target's outline plus a gap; `inside` keeps it inside the target."},"target":{"$ref":"#/$defs/Ref","description":"The element to attach to: a rectangle, diamond, ellipse, text, image or frame."}},"required":["arrow","end","target"],"title":"BindArgs","type":"object"},"output":{"$defs":{"BindMode":{"description":"Where a bound arrow end sits relative to its target.","oneOf":[{"const":"inside","description":"The end is inside the target's outline and keeps its ratio position there.","type":"string"},{"const":"orbit","description":"The end sits on the target's outline plus a small gap, aimed at the fixed point.","type":"string"}]},"BoundTo":{"description":"A stored binding.","properties":{"fixed_point":{"description":"Where on the target, as ratios of its unrotated box.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"mode":{"$ref":"#/$defs/BindMode","description":"`inside` or `orbit`."},"target":{"description":"The target.","type":"string"}},"required":["target","mode","fixed_point"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.bind`.","properties":{"binding":{"$ref":"#/$defs/BoundTo","description":"The binding that was stored."}},"required":["binding"],"title":"BindOut","type":"object"}},"arrow.delete_point":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.delete_point`.","properties":{"arrow":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The arrow or line. Default: the one in the point editor."},"index":{"default":null,"description":"The point to remove, from 0. Default: the points selected in the point editor.","format":"uint","minimum":0,"type":["integer","null"]}},"title":"DeletePointArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.delete_point`.","properties":{"removed":{"description":"How many points were removed.","format":"uint","minimum":0,"type":"integer"}},"required":["removed"],"title":"DeletePointOut","type":"object"}},"arrow.edit_points":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.edit_points`.","properties":{"arrow":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The arrow or line. Default: the single selected one."},"on":{"default":null,"description":"Turn the point editor on or off. Omitted: toggle, except that `select_point` alone turns it on.","type":["boolean","null"]},"select_point":{"default":null,"description":"Select the point with this number, or clear the selected point with `null`. Absent: unchanged.","format":"uint","minimum":0,"type":["integer","null"]}},"title":"EditPointsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.edit_points`.","properties":{"arrow":{"description":"The arrow in the point editor, `null` when it is off.","type":["string","null"]},"changed":{"description":"False when the point editor was already as requested.","type":"boolean"},"selected_points":{"description":"The selected points.","items":{"format":"uint","minimum":0,"type":"integer"},"type":"array"}},"required":["changed","selected_points"],"title":"EditPointsOut","type":"object"}},"arrow.move_point":{"args":{"$defs":{"BindChoice":{"description":"How a dragged end finds a target.","oneOf":[{"const":"auto","description":"Bind to a target under the pointer when the setting `arrow.binding` is on.","type":"string"},{"const":"on","description":"Bind to a target under the pointer whatever the setting says (a pointer gesture sends this when Ctrl or Cmd\nis held while the setting is off).","type":"string"},{"const":"off","description":"Ignore targets (a pointer gesture sends this when binding is off, or when Ctrl or Cmd is held while the\nsetting is on).","type":"string"},{"const":"inside","description":"Bind inside the target under the pointer (Alt held).","type":"string"}]},"EndWord":{"description":"Which end of an arrow a command acts on.","oneOf":[{"const":"start","description":"The first point.","type":"string"},{"const":"end","description":"The last point.","type":"string"}]},"PointIndex":{"anyOf":[{"description":"The number of the point, from 0.","format":"uint","minimum":0,"type":"integer"},{"$ref":"#/$defs/EndWord","description":"The first or the last point."}],"description":"A point of a line or arrow: its number from 0, or `\"start\"` / `\"end\"`."},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Snap":{"anyOf":[{"$ref":"#/$defs/SnapWord","description":"`\"auto\"` or `\"none\"`."},{"$ref":"#/$defs/SnapSwitches","description":"`{grid?, smart?, angle?}`."}],"description":"`auto`, `none`, or switches."},"SnapSwitches":{"additionalProperties":false,"description":"Snap switches; a missing key follows its setting.","properties":{"angle":{"default":null,"description":"Lock the direction to a multiple of the angle step (`snap.angle_step`, 15 degrees). Used by commands\nthat have a direction.","type":["boolean","null"]},"grid":{"default":null,"description":"Snap to the 20 unit grid.","type":["boolean","null"]},"smart":{"default":null,"description":"Smart guides: snap to the edges and centres of other elements, and to equal spacing.","type":["boolean","null"]}},"type":"object"},"SnapWord":{"description":"The words `snap` accepts.","oneOf":[{"const":"auto","description":"Follow the settings `snap.grid`, `snap.smart_guides` and `snap.angle`.","type":"string"},{"const":"none","description":"No snapping.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.move_point`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The arrow or line."},"bind":{"$ref":"#/$defs/BindChoice","default":"auto","description":"How an end finds a target: `auto` (follow the setting `arrow.binding`), `on`, `off` or `inside`. A pointer\ngesture picks `on` or `off` from the setting and the Ctrl or Cmd key, and `inside` for Alt."},"index":{"$ref":"#/$defs/PointIndex","description":"The point: a number from 0, or `\"start\"` / `\"end\"`. With `insert`, the segment number (segment `n`\njoins point `n - 1` and point `n`, counted from 1)."},"insert":{"default":false,"description":"Insert a point at the midpoint of the segment `index` first, then move it (dragging a midpoint\nhandle).","type":"boolean"},"snap":{"$ref":"#/$defs/Snap","default":"auto","description":"Snapping of the point."},"to":{"description":"Where the point goes, in world units.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}},"required":["arrow","index","to"],"title":"MovePointArgs","type":"object"},"output":{"$defs":{"AngleSnapOut":{"description":"The angle lock of a dragged point: the neighbouring point it turns about and the locked direction.","properties":{"degrees":{"description":"The locked direction in degrees, from 0 (right) clockwise on the screen.","format":"double","type":"number"},"origin":{"description":"The neighbouring point, in world units.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"step":{"description":"The step of the lock in degrees (`snap.angle_step`): the rays are drawn at multiples of it.","format":"double","type":"number"}},"required":["origin","degrees","step"],"type":"object"},"GuideOut":{"description":"A guide line for the overlay.","properties":{"end":{"description":"End along the guide.","format":"double","type":"number"},"gap":{"description":"The empty stretch along the guide between the dragged thing and the box it lines up with, as `[from, to]`.\nThe overlay shows its length. Absent when they overlap along the guide.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"kind":{"description":"`vertical`, `horizontal`, `equal_spacing_h` or `equal_spacing_v`.","type":"string"},"position":{"description":"x of a vertical guide, y of a horizontal one.","format":"double","type":"number"},"snap_points":{"description":"Marker coordinates along the guide.","items":{"format":"double","type":"number"},"type":"array"},"start":{"description":"Start along the guide.","format":"double","type":"number"}},"required":["kind","position","start","end","snap_points"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.move_point`, also the frame output of its gesture.","properties":{"angle_snap":{"anyOf":[{"$ref":"#/$defs/AngleSnapOut"},{"type":"null"}],"description":"The angle lock that applied, for the overlay's rays."},"bind_highlight":{"description":"The target the end is bound to now, for the overlay to highlight.","type":["string","null"]},"guides":{"description":"Smart guides to draw.","items":{"$ref":"#/$defs/GuideOut"},"type":"array"},"index":{"description":"The number of the point that moved (the new point with `insert`).","format":"uint","minimum":0,"type":"integer"},"point":{"description":"Where the point is now, in world units.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"snapped_to":{"description":"Where grid, guides or the angle lock put the point, when that is not where the pointer is. The overlay\nmarks it with a crosshair.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]}},"required":["index","point","guides"],"title":"MovePointOut","type":"object"}},"arrow.move_segment":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.move_segment` and `arrow.release_segment`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The elbow or auto route arrow."},"segment":{"description":"The segment, counted from 1: segment `n` joins point `n - 1` and point `n`.","format":"uint","minimum":0,"type":"integer"},"to":{"default":null,"description":"Where the segment goes, in world units (`arrow.move_segment` only). The segment is moved across its\naxis to pass through this point and stays pinned there.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]}},"required":["arrow","segment"],"title":"SegmentArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The arrows a command acted on.","properties":{"ids":{"description":"Ids of the arrows and lines that were targeted.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"IdsOut","type":"object"}},"arrow.release_segment":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.move_segment` and `arrow.release_segment`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The elbow or auto route arrow."},"segment":{"description":"The segment, counted from 1: segment `n` joins point `n - 1` and point `n`.","format":"uint","minimum":0,"type":"integer"},"to":{"default":null,"description":"Where the segment goes, in world units (`arrow.move_segment` only). The segment is moved across its\naxis to pass through this point and stays pinned there.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]}},"required":["arrow","segment"],"title":"SegmentArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The arrows a command acted on.","properties":{"ids":{"description":"Ids of the arrows and lines that were targeted.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"IdsOut","type":"object"}},"arrow.reroute":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of commands that act on arrows and lines: the targets default to the selection.","properties":{"ids":{"default":null,"description":"The arrows. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"IdsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.reroute`.","properties":{"ids":{"description":"Ids of the targeted lines and arrows.","items":{"type":"string"},"type":"array"},"rerouted":{"description":"Ids whose geometry changed.","items":{"type":"string"},"type":"array"}},"required":["ids","rerouted"],"title":"RerouteOut","type":"object"}},"arrow.set_head":{"args":{"$defs":{"EndsWord":{"description":"One end or both.","oneOf":[{"const":"start","description":"The first point.","type":"string"},{"const":"end","description":"The last point.","type":"string"},{"const":"both","description":"Both ends.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.set_head`.","properties":{"end":{"$ref":"#/$defs/EndsWord","default":"end","description":"Which end gets the head. Default `end`."},"head":{"description":"The head, for example `arrow` or `triangle`. `null` (or `\"none\"`) removes it. Required.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"ids":{"default":null,"description":"The arrows. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"required":["head"],"title":"SetHeadArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The arrows a command acted on.","properties":{"ids":{"description":"Ids of the arrows and lines that were targeted.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"IdsOut","type":"object"}},"arrow.set_type":{"args":{"$defs":{"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.set_type`.","properties":{"ids":{"default":null,"description":"The arrows and lines. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"type":{"$ref":"#/$defs/PathType","description":"`sharp` straight segments, `round` a smooth curve through the points, `elbow` a right-angled route between\nthe ends (around the shapes the arrow is bound to), `auto_route` a right-angled route that also goes\naround the other shapes and is made again when they move."}},"required":["type"],"title":"SetTypeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The arrows a command acted on.","properties":{"ids":{"description":"Ids of the arrows and lines that were targeted.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"IdsOut","type":"object"}},"arrow.swap_heads":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of commands that act on arrows and lines: the targets default to the selection.","properties":{"ids":{"default":null,"description":"The arrows. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"IdsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The arrows a command acted on.","properties":{"ids":{"description":"Ids of the arrows and lines that were targeted.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"IdsOut","type":"object"}},"arrow.unbind":{"args":{"$defs":{"EndsWord":{"description":"One end or both.","oneOf":[{"const":"start","description":"The first point.","type":"string"},{"const":"end","description":"The last point.","type":"string"},{"const":"both","description":"Both ends.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `arrow.unbind`.","properties":{"arrow":{"$ref":"#/$defs/Ref","description":"The arrow or line."},"end":{"$ref":"#/$defs/EndsWord","default":"both","description":"Which end to free. Default `both`."}},"required":["arrow"],"title":"UnbindArgs","type":"object"},"output":{"$defs":{"EndWord":{"description":"Which end of an arrow a command acts on.","oneOf":[{"const":"start","description":"The first point.","type":"string"},{"const":"end","description":"The last point.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `arrow.unbind`.","properties":{"freed":{"description":"The ends that were bound and are free now.","items":{"$ref":"#/$defs/EndWord"},"type":"array"}},"required":["freed"],"title":"UnbindOut","type":"object"}},"clipboard.copy":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.copy` and `clipboard.cut`.","properties":{"ids":{"default":null,"description":"The elements to copy. Default: the selection. Bound text and the children of a copied frame come along.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"system":{"default":true,"description":"Also write to the system clipboard. Without a clipboard port the copy stays in the session and a warning\nsays so.","type":"boolean"}},"title":"CopyArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.copy` and `clipboard.cut`.","properties":{"count":{"description":"Elements in the copy, bound text and frame children included.","format":"uint","minimum":0,"type":"integer"},"system":{"description":"True when the payload was handed to the system clipboard.","type":"boolean"}},"required":["count","system"],"title":"CopyOut","type":"object"}},"clipboard.copy_as":{"args":{"$defs":{"Format":{"description":"What is put on the clipboard.","oneOf":[{"const":"png","description":"A PNG picture. Needs the renderer.","type":"string"},{"const":"svg","description":"An SVG drawing.","type":"string"},{"const":"text","description":"The text of the text elements and labels, one block per line.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"ScopeWord":{"description":"What is copied.","oneOf":[{"const":"selection","description":"The selection.","type":"string"},{"const":"all","description":"Every element.","type":"string"},{"const":"ids","description":"The elements in `ids`.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.copy_as`.","properties":{"background":{"default":null,"description":"Paint the document background. Default: the setting `export.background`.","type":["boolean","null"]},"dark":{"default":null,"description":"Dark theme (png). Default: the setting `export.dark`. Ignored for svg and text.","type":["boolean","null"]},"format":{"$ref":"#/$defs/Format","default":"png","description":"png, svg or text."},"ids":{"default":null,"description":"The elements for scope `ids`.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"padding":{"default":null,"description":"Space around the content in world units (0 to 1000). Default: the setting `export.padding`.","format":"double","type":["number","null"]},"scale":{"default":null,"description":"Pixels per world unit (0.25 to 4). Default: the setting `export.scale`.","format":"double","type":["number","null"]},"scope":{"$ref":"#/$defs/ScopeWord","default":"selection","description":"selection, all or ids."}},"title":"CopyAsArgs","type":"object"},"output":{"$defs":{"Format":{"description":"What is put on the clipboard.","oneOf":[{"const":"png","description":"A PNG picture. Needs the renderer.","type":"string"},{"const":"svg","description":"An SVG drawing.","type":"string"},{"const":"text","description":"The text of the text elements and labels, one block per line.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.copy_as`.","properties":{"bytes":{"description":"Size of what was written in bytes.","format":"uint","minimum":0,"type":"integer"},"count":{"description":"Elements in the picture or text, bound text included.","format":"uint","minimum":0,"type":"integer"},"format":{"$ref":"#/$defs/Format","description":"What was written."},"size_px":{"description":"Picture size in pixels, for png.","items":{"format":"uint32","minimum":0,"type":"integer"},"maxItems":2,"minItems":2,"type":["array","null"]}},"required":["format","count","bytes"],"title":"CopyAsOut","type":"object"}},"clipboard.copy_style":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.copy_style`.","properties":{"from":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The element to take the style from. Default: the first selected element in z-order."}},"title":"CopyStyleArgs","type":"object"},"output":{"$defs":{"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.copy_style`.","properties":{"from":{"description":"The element the style came from.","type":"string"},"kind":{"$ref":"#/$defs/Kind","description":"Its kind."},"props":{"$ref":"#/$defs/StyleProps","description":"The remembered properties. Text properties of a shape with a label come from the label."}},"required":["from","kind","props"],"title":"CopyStyleOut","type":"object"}},"clipboard.cut":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.copy` and `clipboard.cut`.","properties":{"ids":{"default":null,"description":"The elements to copy. Default: the selection. Bound text and the children of a copied frame come along.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"system":{"default":true,"description":"Also write to the system clipboard. Without a clipboard port the copy stays in the session and a warning\nsays so.","type":"boolean"}},"title":"CopyArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.copy` and `clipboard.cut`.","properties":{"count":{"description":"Elements in the copy, bound text and frame children included.","format":"uint","minimum":0,"type":"integer"},"system":{"description":"True when the payload was handed to the system clipboard.","type":"boolean"}},"required":["count","system"],"title":"CopyOut","type":"object"}},"clipboard.paste":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"A word."},{"description":"A world point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the middle of what is inserted goes."},"AtWord":{"description":"The words `at` accepts besides a point.","oneOf":[{"const":"viewport_center","description":"The middle of the visible canvas.","type":"string"},{"const":"$cursor","description":"The pointer position. A shell replaces this word with a point; if it is left in, the middle of the visible\ncanvas is used (the pointer is outside the canvas).","type":"string"}]},"Bytes":{"anyOf":[{"$ref":"#/$defs/InlineBytes","description":"`{base64, name?, mime?}`."},{"$ref":"#/$defs/PathBytes","description":"`{path}`."}],"description":"Bytes: inline as base64, or a path."},"ElementsSource":{"additionalProperties":false,"description":"Clipboard elements given by the caller.","properties":{"elements":{"description":"A drafft.ink clipboard payload (what `clipboard.copy` writes) or an Excalidraw clipboard object."}},"required":["elements"],"type":"object"},"ImageSource":{"additionalProperties":false,"description":"An image given by the caller.","properties":{"image":{"$ref":"#/$defs/Bytes","description":"The picture: `{base64, name?, mime?}` or `{path}`."}},"required":["image"],"type":"object"},"InlineBytes":{"additionalProperties":false,"description":"Bytes given inline.","properties":{"base64":{"description":"The bytes as base64 (standard alphabet, padding optional). A `data:...;base64,` prefix is accepted.","type":"string"},"mime":{"description":"The media type the sender claims. It is not trusted: the content decides.","type":["string","null"]},"name":{"description":"The file name, used in messages.","type":["string","null"]}},"required":["base64"],"type":"object"},"PathBytes":{"additionalProperties":false,"description":"Bytes read from a file through the `Files` port.","properties":{"path":{"description":"A path the session's file access can read.","type":"string"}},"required":["path"],"type":"object"},"Source":{"anyOf":[{"$ref":"#/$defs/SourceWord","description":"`\"system\"` or `\"internal\"`."},{"$ref":"#/$defs/TextSource","description":"`{text}`."},{"$ref":"#/$defs/ImageSource","description":"`{image}`."},{"$ref":"#/$defs/ElementsSource","description":"`{elements}`."}],"description":"Where the data comes from."},"SourceWord":{"description":"The words `source` accepts.","oneOf":[{"const":"system","description":"The system clipboard through the `Clipboard` port.","type":"string"},{"const":"internal","description":"The session's last copy.","type":"string"}]},"TextSource":{"additionalProperties":false,"description":"Plain text given by the caller.","properties":{"text":{"description":"The text. It is sniffed like clipboard text unless `plain_text` is set.","type":"string"}},"required":["text"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.paste`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"Where the middle of what is pasted goes, in world units. Default: the middle of the visible canvas. The\nkeyboard passes the pointer position."},"plain_text":{"default":false,"description":"Paste the text as a text element without looking for Excalidraw data or a Mermaid diagram.","type":"boolean"},"select":{"default":true,"description":"Select what was pasted.","type":"boolean"},"source":{"$ref":"#/$defs/Source","default":"system","description":"Where the data comes from. Default: the system clipboard."}},"title":"PasteArgs","type":"object"},"output":{"$defs":{"Kind":{"description":"What kind of data was pasted.","oneOf":[{"const":"elements","description":"drafft.ink elements.","type":"string"},{"const":"excalidraw","description":"Excalidraw elements.","type":"string"},{"const":"mermaid","description":"A Mermaid diagram.","type":"string"},{"const":"image","description":"A picture.","type":"string"},{"const":"text","description":"A text element.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.paste`.","properties":{"count":{"description":"Elements created, bound text included.","format":"uint","minimum":0,"type":"integer"},"ids":{"description":"The new elements that make the selection (bound text excluded). With `select` false and a Mermaid\ndiagram this is empty: read `created`.","items":{"type":"string"},"type":"array"},"kind":{"$ref":"#/$defs/Kind","description":"What was found and pasted."}},"required":["kind","ids","count"],"title":"PasteOut","type":"object"}},"clipboard.paste_style":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `clipboard.paste_style`.","properties":{"ids":{"default":null,"description":"The elements to restyle. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"PasteStyleArgs","type":"object"},"output":{"$defs":{"Skipped":{"description":"The properties that were skipped for an element.","properties":{"id":{"description":"The element.","type":"string"},"props":{"description":"The properties it does not support.","items":{"type":"string"},"type":"array"}},"required":["id","props"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `clipboard.paste_style`.","properties":{"applied":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"The properties each element took, by element id.","type":"object"},"skipped":{"description":"The properties an element does not support.","items":{"$ref":"#/$defs/Skipped"},"type":"array"}},"required":["applied","skipped"],"title":"PasteStyleOut","type":"object"}},"collab.clear_access":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.clear_access`.","properties":{"server":{"default":null,"description":"The server whose token is removed. Omit it for the server this session uses.","type":["string","null"]}},"title":"ClearAccessArgs","type":"object"},"output":{"$defs":{"AccessView":{"description":"How a person sees whether this session has a token for the server. Never a value.","oneOf":[{"const":"service_token","description":"A service token is stored for the server.","type":"string"},{"const":"browser","description":"This build holds none: the browser carries the sign-in cookie of the page's own server.","type":"string"},{"const":"none","description":"No token is stored.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.clear_access`.","properties":{"access":{"$ref":"#/$defs/AccessView","description":"Always `none`."},"changed":{"description":"Always true.","type":"boolean"},"server":{"description":"The origin whose token was removed.","type":"string"}},"required":["changed","server","access"],"title":"ClearAccessOut","type":"object"}},"collab.connect":{"args":{"$defs":{"IfMissing":{"description":"What to do when the encrypted room the link names does not exist: it expired, or the link is incomplete.","oneOf":[{"const":"refuse","description":"Stop and say so. Nothing is created: a mistyped link makes no room.","type":"string"},{"const":"restore","description":"Make the room again from the copy this tab holds (it expired). The copy is the room's content from now on.","type":"string"},{"const":"create","description":"Make an empty room under the same link.","type":"string"}]},"OnLocal":{"description":"What to do with the content a tab already has when it joins a room.","oneOf":[{"const":"refuse","description":"Refuse with `local_content`.","type":"string"},{"const":"merge","description":"Keep the content and merge it into the room.","type":"string"},{"const":"discard","description":"Replace the content with the room's.","type":"string"}]},"TokenArg":{"description":"An access token as it arrives in the arguments of `collab.connect` and `collab.join_room`. `Debug` prints a\nplaceholder, so a logged argument struct cannot leak it.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.connect`.","properties":{"if_missing":{"$ref":"#/$defs/IfMissing","default":"refuse","description":"What to do when an encrypted room does not exist (it expired): `refuse` (the default), `restore` it from this\ntab's copy, or `create` an empty one."},"on_local":{"$ref":"#/$defs/OnLocal","default":"refuse","description":"What to do with content this tab already has when `room` is given."},"room":{"default":null,"description":"The room to join at once: the name of a plaintext room, or an encrypted room's link\n(`https://drafft.ink/#room=<id>,<key>`) or `<id>,<key>`. The link holds the key, so it is never recorded or\nshown. Omit it to only choose the server.","type":["string","null"]},"token":{"anyOf":[{"$ref":"#/$defs/TokenArg"},{"type":"null"}],"default":null,"description":"The access token, when the server asks for one. Kept with the server for the next `collab.join_room`.\nIt is never recorded, shown or stored."},"url":{"default":null,"description":"`ws://` or `wss://` address of the server, or a path such as `/ws` in the web app (this page's server).\nOmit it to use the setting `collab.server_url`.","type":["string","null"]}},"title":"ConnectArgs","type":"object"},"output":{"$defs":{"ConnectionState":{"description":"Where the connection to the server is.","oneOf":[{"const":"disconnected","description":"No server chosen.","type":"string"},{"const":"ready","description":"A server is chosen (`collab.connect` without a room); no socket is open and no room joined.","type":"string"},{"const":"connecting","description":"Opening the connection, joining, catching up, or waiting to retry.","type":"string"},{"const":"connected","description":"In a room and in sync.","type":"string"},{"const":"error","description":"Sharing stopped and will not resume by itself. `error` says why.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.connect`.","properties":{"changed":{"description":"True: the server is chosen or the connection started.","type":"boolean"},"e2e":{"description":"True when the room is end-to-end encrypted.","type":"boolean"},"link":{"description":"`#room=<id>&server=<url>`, when a plaintext room was given. An encrypted room has no link here: it would\nhold the key. Use `collab.share_link`.","type":["string","null"]},"room":{"description":"The room, when one was given.","type":["string","null"]},"state":{"$ref":"#/$defs/ConnectionState","description":"`connecting` when a room was given, else `ready`."},"url":{"description":"The server address.","type":"string"}},"required":["changed","state","url","e2e"],"title":"ConnectOut","type":"object"}},"collab.delete_room":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.delete_room`.","properties":{"confirm":{"default":false,"description":"Must be true: deleting removes the room and all its pictures for everyone, and cannot be undone. Default\nfalse, which only says so.","type":"boolean"}},"title":"DeleteRoomArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.delete_room`.","properties":{"changed":{"description":"Always false: nothing on this screen changes yet.","type":"boolean"},"requested":{"description":"Always true: the request was sent. The server answers later: it closes the connection (the room is deleted, and\n`collab.status` shows `room_deleted`) or refuses (a notice says so and the room stays).","type":"boolean"},"room":{"description":"The id of the room (never its key).","type":"string"}},"required":["changed","requested","room"],"title":"DeleteRoomOut","type":"object"}},"collab.disconnect":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.disconnect`.","properties":{"changed":{"description":"Always true.","type":"boolean"},"left_room":{"description":"The room that was left, if the session was in one.","type":["string","null"]}},"required":["changed"],"title":"DisconnectOut","type":"object"}},"collab.follow":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.follow`.","properties":{"peer":{"default":null,"description":"The person to follow: the id or the name `collab.status` shows. Omit it to stop following.","type":["string","null"]}},"title":"FollowArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.follow`.","properties":{"changed":{"description":"False when following was already as asked.","type":"boolean"},"following":{"description":"The name of the person now followed.","type":["string","null"]}},"required":["changed"],"title":"FollowOut","type":"object"}},"collab.join_room":{"args":{"$defs":{"IfMissing":{"description":"What to do when the encrypted room the link names does not exist: it expired, or the link is incomplete.","oneOf":[{"const":"refuse","description":"Stop and say so. Nothing is created: a mistyped link makes no room.","type":"string"},{"const":"restore","description":"Make the room again from the copy this tab holds (it expired). The copy is the room's content from now on.","type":"string"},{"const":"create","description":"Make an empty room under the same link.","type":"string"}]},"OnLocal":{"description":"What to do with the content a tab already has when it joins a room.","oneOf":[{"const":"refuse","description":"Refuse with `local_content`.","type":"string"},{"const":"merge","description":"Keep the content and merge it into the room.","type":"string"},{"const":"discard","description":"Replace the content with the room's.","type":"string"}]},"TokenArg":{"description":"An access token as it arrives in the arguments of `collab.connect` and `collab.join_room`. `Debug` prints a\nplaceholder, so a logged argument struct cannot leak it.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.join_room`.","properties":{"if_missing":{"$ref":"#/$defs/IfMissing","default":"refuse","description":"What to do when an encrypted room does not exist (it expired): `refuse` (the default), `restore` it from this\ntab's copy, or `create` an empty one."},"on_local":{"$ref":"#/$defs/OnLocal","default":"refuse","description":"What to do with content this tab already has."},"room":{"default":null,"description":"The room: a plain name (1 to 64 characters, letters, digits, `-` and `_`) for a plaintext room, or an\nencrypted room's link or `<id>,<key>`. Omit it to create a new encrypted room with a fresh key. The link holds\nthe key, so it is never recorded or shown.","type":["string","null"]},"token":{"anyOf":[{"$ref":"#/$defs/TokenArg"},{"type":"null"}],"default":null,"description":"The access token for this room. Omit it to use the one given to `collab.connect`. It is never recorded,\nshown or stored."}},"title":"JoinArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.join_room`.","properties":{"changed":{"description":"Always true.","type":"boolean"},"e2e":{"description":"True when the room is end-to-end encrypted.","type":"boolean"},"link":{"description":"`#room=<id>&server=<url>` for a plaintext room: send it to somebody to invite them. An encrypted room has no\nlink here, because the link holds the key. Use `collab.share_link`.","type":["string","null"]},"room":{"description":"The room: its name, or the id of an encrypted room (never the key).","type":"string"},"tab":{"description":"The tab bound to the room.","type":"string"}},"required":["changed","room","e2e","tab"],"title":"JoinOut","type":"object"}},"collab.laser":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.laser`.","properties":{"fade_ms":{"default":330,"description":"How long a point stays visible, in milliseconds (1 to 10000).","format":"uint64","minimum":0,"type":"integer"},"points":{"description":"Points of the trail in world coordinates `[x, y]`, oldest first. At most 1024.","items":{"items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"}},"required":["points"],"title":"LaserArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.laser`.","properties":{"changed":{"description":"True when points were added.","type":"boolean"},"points":{"description":"How many points were added.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","points"],"title":"LaserOut","type":"object"}},"collab.leave_room":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.leave_room`.","properties":{"changed":{"description":"Always true.","type":"boolean"},"room":{"description":"The room that was left.","type":"string"}},"required":["changed","room"],"title":"LeaveOut","type":"object"}},"collab.resume_room":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.resume_room`.","properties":{"changed":{"description":"Always true: the connection is starting.","type":"boolean"},"room":{"description":"The id of the room (never its key).","type":"string"},"url":{"description":"The server the room is on.","type":"string"}},"required":["changed","room","url"],"title":"ResumeOut","type":"object"}},"collab.set_access":{"args":{"$defs":{"SecretText":{"description":"A secret value as a command argument. `Debug` and `Serialize` print a placeholder, and a value that is not text\nis refused without quoting it (serde's own message for a wrong type quotes the value).","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.set_access`.","properties":{"client_id":{"$ref":"#/$defs/SecretText","description":"The client id of the service token (1 to 512 printable ASCII characters)."},"client_secret":{"$ref":"#/$defs/SecretText","description":"The client secret of the service token (1 to 512 printable ASCII characters). It is never shown."},"server":{"default":null,"description":"The server the token is for: `https://host[:port]`, or its `wss://` address. Omit it for the server this\nsession uses (the chosen one, else the setting `collab.server_url`). The token goes to that origin only.","type":["string","null"]}},"required":["client_id","client_secret"],"title":"SetAccessArgs","type":"object"},"output":{"$defs":{"AccessView":{"description":"How a person sees whether this session has a token for the server. Never a value.","oneOf":[{"const":"service_token","description":"A service token is stored for the server.","type":"string"},{"const":"browser","description":"This build holds none: the browser carries the sign-in cookie of the page's own server.","type":"string"},{"const":"none","description":"No token is stored.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.set_access`.","properties":{"access":{"$ref":"#/$defs/AccessView","description":"Always `service_token`."},"changed":{"description":"False when the same token was stored already.","type":"boolean"},"server":{"description":"The origin the token is stored for.","type":"string"}},"required":["changed","server","access"],"title":"SetAccessOut","type":"object"}},"collab.set_pointer":{"args":{"$defs":{"PointerTool":{"description":"Which pointer the person is using.","oneOf":[{"const":"pointer","description":"A plain cursor.","type":"string"},{"const":"laser","description":"The laser: peers draw the recent path of the pointer as a trail.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.set_pointer`.","properties":{"point":{"default":null,"description":"The pointer in world coordinates `[x, y]`, or null when it left the canvas.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"tool":{"$ref":"#/$defs/PointerTool","default":"pointer","description":"The pointer in use. Default `pointer`."}},"title":"SetPointerArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.set_pointer`.","properties":{"changed":{"description":"Always false: nothing on this screen changes.","type":"boolean"},"published":{"description":"True when a room received the pointer.","type":"boolean"}},"required":["changed","published"],"title":"PointerOut","type":"object"}},"collab.set_user":{"args":{"$defs":{"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.set_user`.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"The colour of your cursor, `#rrggbb`."},"name":{"default":null,"description":"The name other people see, 0 to 40 characters.","type":["string","null"]}},"title":"SetUserArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.set_user`.","properties":{"changed":{"description":"False when the name and colour were already as asked.","type":"boolean"},"color":{"description":"The colour now in use, `#rrggbb`.","type":"string"},"name":{"description":"The name now in use.","type":"string"}},"required":["changed","name","color"],"title":"SetUserOut","type":"object"}},"collab.share_link":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `collab.share_link`.","properties":{"copy":{"default":true,"description":"Put the link on the clipboard. Default true.","type":"boolean"},"reveal":{"default":false,"description":"Also return the link in the output. Default false: the link holds the room key, so it stays out of logs and\ntranscripts unless asked for.","type":"boolean"}},"title":"ShareLinkArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `collab.share_link`.","properties":{"changed":{"description":"Always false: nothing on this screen changes.","type":"boolean"},"copied":{"description":"True when the link is on the clipboard.","type":"boolean"},"link":{"description":"The link, only when `reveal` was set. It holds the room key.","type":["string","null"]}},"required":["changed","copied"],"title":"ShareLinkOut","type":"object"}},"collab.status":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"AccessView":{"description":"How a person sees whether this session has a token for the server. Never a value.","oneOf":[{"const":"service_token","description":"A service token is stored for the server.","type":"string"},{"const":"browser","description":"This build holds none: the browser carries the sign-in cookie of the page's own server.","type":"string"},{"const":"none","description":"No token is stored.","type":"string"}]},"ConnectionState":{"description":"Where the connection to the server is.","oneOf":[{"const":"disconnected","description":"No server chosen.","type":"string"},{"const":"ready","description":"A server is chosen (`collab.connect` without a room); no socket is open and no room joined.","type":"string"},{"const":"connecting","description":"Opening the connection, joining, catching up, or waiting to retry.","type":"string"},{"const":"connected","description":"In a room and in sync.","type":"string"},{"const":"error","description":"Sharing stopped and will not resume by itself. `error` says why.","type":"string"}]},"ImagesView":{"description":"Where the pictures of an encrypted room stand. All zero for a plaintext room, which embeds them.","properties":{"downloading":{"description":"Pictures being fetched from the room.","format":"uint32","minimum":0,"type":"integer"},"failed":{"description":"Pictures that will not be transferred: refused uploads, damaged downloads.","format":"uint32","minimum":0,"type":"integer"},"room_image_bytes":{"description":"Bytes the room's pictures take on the server (sealed), as the server last reported.","format":"uint64","minimum":0,"type":"integer"},"room_images":{"description":"Pictures the room holds, as the server last reported.","format":"uint32","minimum":0,"type":"integer"},"uploading":{"description":"Pictures being sent to the room.","format":"uint32","minimum":0,"type":"integer"},"waiting":{"description":"Pictures waiting for a free slot, a retry time, or the room's list (a picture whose upload has not finished\nyet is retried every few seconds).","format":"uint32","minimum":0,"type":"integer"}},"required":["uploading","downloading","waiting","failed","room_images","room_image_bytes"],"type":"object"},"LaserDot":{"description":"A point of this user's own laser trail.","properties":{"age_ms":{"description":"Milliseconds since the point was recorded.","format":"uint64","minimum":0,"type":"integer"},"fade_ms":{"description":"The point is gone when `age_ms` reaches this.","format":"uint64","minimum":0,"type":"integer"},"x":{"description":"World x.","format":"double","type":"number"},"y":{"description":"World y.","format":"double","type":"number"}},"required":["x","y","age_ms","fade_ms"],"type":"object"},"Loading":{"description":"Why the room is not usable yet. Present from the join until the first catch-up is applied.","oneOf":[{"description":"Opening the connection.","properties":{"phase":{"const":"connecting","type":"string"}},"required":["phase"],"type":"object"},{"description":"Joined; waiting for the room's content.","properties":{"phase":{"const":"syncing","type":"string"}},"required":["phase"],"type":"object"},{"description":"A large update (a big room's snapshot) is about to be applied. Applying it takes a moment, during which\nthe app does not respond; draw a progress hint before the next [`crate::Session::collab_poll`].","properties":{"bytes":{"description":"Size of the update in bytes.","format":"uint64","minimum":0,"type":"integer"},"phase":{"const":"receiving","type":"string"}},"required":["phase","bytes"],"type":"object"},{"description":"The room's content is in, and the scene is being filled in slices, a few milliseconds at a time. The app keeps\nanswering; elements appear as they are decoded.","properties":{"done":{"description":"Items (elements, files) shown so far.","format":"uint","minimum":0,"type":"integer"},"phase":{"const":"importing","type":"string"},"total":{"description":"All items of the room.","format":"uint","minimum":0,"type":"integer"}},"required":["phase","done","total"],"type":"object"},{"description":"The room is usable, and pictures in the visible area are still on their way. They show as empty pictures\nuntil they arrive.","properties":{"done":{"description":"Pictures of the visible area that are here.","format":"uint32","minimum":0,"type":"integer"},"phase":{"const":"images","type":"string"},"total":{"description":"Pictures the visible area shows.","format":"uint32","minimum":0,"type":"integer"}},"required":["phase","done","total"],"type":"object"}]},"PeerView":{"description":"One other person in the room.","properties":{"color":{"description":"`#rrggbb`.","type":"string"},"followed":{"description":"True while this user follows the peer.","type":"boolean"},"id":{"description":"The peer's id (32 hex characters). `collab.follow` takes it.","type":"string"},"name":{"description":"Display name, or a short form of the id.","type":"string"},"pointer":{"description":"Pointer in world coordinates; absent when it is outside the canvas.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"selection":{"description":"Ids of the elements the peer has selected.","items":{"type":"string"},"type":"array"},"trail":{"description":"The recent path of the pointer, oldest first. Drawn as a fading trail (the laser).","items":{"$ref":"#/$defs/TrailDot"},"type":"array"},"viewport":{"description":"The peer's visible world rectangle `[x, y, w, h]`.","items":{"format":"double","type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]}},"required":["id","name","color","selection","trail","followed"],"type":"object"},"TrailDot":{"description":"A point of a fading trail.","properties":{"age_ms":{"description":"Milliseconds since the point was recorded.","format":"uint64","minimum":0,"type":"integer"},"x":{"description":"World x.","format":"double","type":"number"},"y":{"description":"World y.","format":"double","type":"number"}},"required":["x","y","age_ms"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Everything the UI shows about collaboration.","properties":{"access":{"$ref":"#/$defs/AccessView","description":"Whether a service token is stored for the server (a private instance): `service_token`, `none`, or `browser`\nin the web app, where the browser carries the sign-in. Never a value."},"e2e":{"description":"True for an end-to-end encrypted room: the server cannot read it. `room` is its id, never its key.","type":"boolean"},"error":{"description":"Why sharing stopped, in `Error` state.","type":["string","null"]},"expires_at_ms":{"description":"When the server deletes the room if nobody visits, in milliseconds since the epoch. Absent: never, or not\nknown.","format":"uint64","minimum":0,"type":["integer","null"]},"expiring":{"description":"The room is past its time limit and is deleted when the last person leaves.","type":"boolean"},"images":{"$ref":"#/$defs/ImagesView","description":"Where the pictures of an encrypted room stand."},"laser":{"description":"This user's laser trail.","items":{"$ref":"#/$defs/LaserDot"},"type":"array"},"loading":{"anyOf":[{"$ref":"#/$defs/Loading"},{"type":"null"}],"description":"Present while the room is not yet usable."},"peers":{"description":"The other people in the room.","items":{"$ref":"#/$defs/PeerView"},"type":"array"},"reconnect":{"description":"The active tab is the copy of a private room that is not connected, and `collab.resume_room` reconnects it. The\nserver it is on, as the person reads it (`https://canvas.example.com`). A page does not reconnect a room on\nanother server by itself: the person confirms.","type":["string","null"]},"room":{"description":"The room this session is in.","type":["string","null"]},"room_deleted":{"description":"The room this tab was in was deleted on request (`collab.delete_room`). The tab is a local copy now. Cleared by\nthe next `collab.connect` or `collab.disconnect`.","type":"boolean"},"state":{"$ref":"#/$defs/ConnectionState","description":"The connection."},"tab":{"description":"The tab bound to the room, as `tab.list` shows it (`t1`).","type":["string","null"]},"text":{"description":"One sentence for a status bar.","type":"string"},"unsynced":{"description":"True while local changes are not yet confirmed by the server.","type":"boolean"},"url":{"description":"The server address, once one is chosen.","type":["string","null"]}},"required":["state","text","unsynced","peers","laser","images","e2e","expiring","access","room_deleted"],"title":"CollabView","type":"object"}},"diagram.create":{"args":{"$defs":{"Algorithm":{"description":"Which layout to run.","oneOf":[{"const":"layered","description":"Layers of nodes with few crossings. Handles cycles. The default.","type":"string"},{"const":"tree","description":"A forest: every node has at most one incoming edge and there is no cycle.","type":"string"},{"const":"grid","description":"Rows and columns in node order.","type":"string"},{"const":"force","description":"Force-directed placement.","type":"string"},{"const":"none","description":"Keep the positions that are given.","type":"string"}]},"Arrowheads":{"description":"Which ends of an edge have an arrowhead.","oneOf":[{"const":"none","description":"No heads.","type":"string"},{"const":"end","description":"A head at the target (the default).","type":"string"},{"const":"start","description":"A head at the source.","type":"string"},{"const":"both","description":"Heads at both ends.","type":"string"}]},"AtWord":{"description":"The words `at` accepts.","oneOf":[{"const":"viewport_center","description":"The middle of the viewport.","type":"string"},{"const":"below_content","description":"Directly below everything that is in the document now.","type":"string"}]},"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"DiagramAt":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"`\"viewport_center\"` or `\"below_content\"`."},{"description":"The top-left corner `[x, y]` in world units.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the diagram goes."},"Direction":{"description":"The direction layers grow in (layered and tree layouts).","oneOf":[{"const":"down","description":"Top to bottom (Mermaid `TB` or `TD`).","type":"string"},{"const":"right","description":"Left to right (Mermaid `LR`).","type":"string"},{"const":"up","description":"Bottom to top (Mermaid `BT`).","type":"string"},{"const":"left","description":"Right to left (Mermaid `RL`).","type":"string"}]},"EdgeSpec":{"additionalProperties":false,"description":"One edge: an arrow from one node to another.","properties":{"arrow_type":{"anyOf":[{"$ref":"#/$defs/PathType"},{"type":"null"}],"default":null,"description":"Straight (`sharp`), curved (`round`) or `elbow`. Default `sharp`."},"arrowheads":{"anyOf":[{"$ref":"#/$defs/Arrowheads"},{"type":"null"}],"default":null,"description":"Which ends have a head. Default: at the target."},"end_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"default":null,"description":"Marker at the target. Overrides `arrowheads`."},"from":{"description":"Symbolic id of the source node.","type":"string"},"label":{"default":null,"description":"Text on the arrow.","type":["string","null"]},"name":{"default":null,"description":"The element `name`.","type":["string","null"]},"start_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"default":null,"description":"Marker at the source. Overrides `arrowheads`."},"style":{"anyOf":[{"$ref":"#/$defs/StyleSpec"},{"type":"null"}],"default":null,"description":"Style of the arrow."},"to":{"description":"Symbolic id of the target node. May equal `from` (a self loop).","type":"string"}},"required":["from","to"],"type":"object"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"LayoutOpts":{"additionalProperties":false,"description":"Layout options (`LayoutOpts` in the command catalog).","properties":{"algorithm":{"$ref":"#/$defs/Algorithm","default":"layered","description":"The algorithm."},"columns":{"default":null,"description":"Columns of the grid layout. Absent: about the square root of the node count.","format":"uint32","minimum":0,"type":["integer","null"]},"direction":{"$ref":"#/$defs/Direction","default":"down","description":"Where layers grow (layered and tree)."},"layer_gap":{"default":80.0,"description":"Space between layers (between rows for grid).","format":"double","minimum":0.0,"type":"number"},"node_gap":{"default":40.0,"description":"Space between neighbours in a layer (the other axis for grid).","format":"double","minimum":0.0,"type":"number"}},"type":"object"},"NodeShape":{"description":"The shape of a node.","oneOf":[{"const":"rectangle","description":"Rectangle (the default).","type":"string"},{"const":"ellipse","description":"Ellipse.","type":"string"},{"const":"diamond","description":"Diamond.","type":"string"},{"const":"text","description":"A free text element that arrows can bind to. Needs a label.","type":"string"}]},"NodeSpec":{"additionalProperties":false,"description":"One node of the diagram.","properties":{"height":{"default":null,"description":"Height. Absent: measured from the label, at least 48.","format":"double","type":["number","null"]},"id":{"description":"The symbolic id: a name the edges and groups use, unique in the diagram. The result maps it to the real id.","type":"string"},"label":{"default":null,"description":"The text inside the node. Absent: an empty shape.","type":["string","null"]},"name":{"default":null,"description":"The element `name`, so that later calls can say `@name`.","type":["string","null"]},"shape":{"$ref":"#/$defs/NodeShape","default":"rectangle","description":"The shape."},"size":{"default":null,"description":"Width and height together. `width` and `height` win when both are given.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"style":{"anyOf":[{"$ref":"#/$defs/StyleSpec"},{"type":"null"}],"default":null,"description":"Style."},"width":{"default":null,"description":"Width. Absent: measured from the label, at least 80.","format":"double","type":["number","null"]},"x":{"default":null,"description":"Position for the `none` layout.","format":"double","type":["number","null"]},"y":{"default":null,"description":"Position for the `none` layout.","format":"double","type":["number","null"]}},"required":["id"],"type":"object"},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleSpec":{"additionalProperties":false,"description":"The few style properties a node or an edge can set. Everything left out keeps the default.","properties":{"corner_radius":{"default":null,"description":"Corner radius.","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Fill colour. `\"transparent\"` means no fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"default":null,"description":"Fill pattern."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"default":null,"description":"Font family of the label."},"font_size":{"default":null,"description":"Font size of the label.","format":"double","type":["number","null"]},"opacity":{"default":null,"description":"Opacity, 0 to 1.","format":"double","type":["number","null"]},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"default":null,"description":"How hand-drawn the outline is."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Outline colour (text colour for a text node)."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"default":null,"description":"Dash pattern."},"stroke_width":{"default":null,"description":"Outline width.","format":"double","type":["number","null"]}},"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `diagram.create`.","properties":{"at":{"$ref":"#/$defs/DiagramAt","default":"viewport_center","description":"Where the diagram goes: a top-left point, `\"viewport_center\"` (default) or `\"below_content\"`. Ignored by the\n`none` layout, which uses the `x` and `y` of the nodes."},"edges":{"default":[],"description":"The edges: one arrow per edge, bound to both nodes, with an optional label.","items":{"$ref":"#/$defs/EdgeSpec"},"type":"array"},"frame":{"default":null,"description":"Wrap the diagram in a frame with this name.","type":["string","null"]},"group":{"default":false,"description":"Put all nodes (and the arrows between them) in one group.","type":"boolean"},"layout":{"$ref":"#/$defs/LayoutOpts","default":{"algorithm":"layered","columns":null,"direction":"down","layer_gap":80.0,"node_gap":40.0},"description":"How to place the nodes. Default: layered, top to bottom, gaps 40 and 80."},"nodes":{"description":"The nodes. `id` is a name you choose; edges refer to it, and the result maps it to the real element id.","items":{"$ref":"#/$defs/NodeSpec"},"type":"array"},"select":{"default":true,"description":"Select the nodes and arrows afterwards.","type":"boolean"}},"required":["nodes"],"title":"CreateArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The result of building a diagram.","properties":{"bounds":{"$ref":"#/$defs/RectOut","description":"Bounds of the whole diagram."},"clusters":{"additionalProperties":{"type":"string"},"description":"Mermaid subgraphs: symbolic cluster id to the element id of its box. Edges may start or end at a box.","type":"object"},"edges":{"description":"The arrows, in the order of `edges`.","items":{"type":"string"},"type":"array"},"frame":{"description":"The frame, when one was asked for.","type":["string","null"]},"groups":{"description":"The groups made, in order.","items":{"type":"string"},"type":"array"},"nodes":{"additionalProperties":{"type":"string"},"description":"Symbolic node id to the real element id. In a batch, later steps use `$<step>.<node>`.","type":"object"}},"required":["nodes","edges","groups","clusters","bounds"],"title":"DiagramOut","type":"object"}},"diagram.extend":{"args":{"$defs":{"Direction":{"description":"The direction layers grow in (layered and tree layouts).","oneOf":[{"const":"down","description":"Top to bottom (Mermaid `TB` or `TD`).","type":"string"},{"const":"right","description":"Left to right (Mermaid `LR`).","type":"string"},{"const":"up","description":"Bottom to top (Mermaid `BT`).","type":"string"},{"const":"left","description":"Right to left (Mermaid `RL`).","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `diagram.extend`.","properties":{"direction":{"$ref":"#/$defs/Direction","description":"Which side the new node goes."},"from":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The rectangle, diamond or ellipse to grow from. Default: the single selected element."},"gap":{"default":80.0,"description":"Distance between the shapes, in world units.","format":"double","type":"number"},"label":{"default":null,"description":"Text of the new node.","type":["string","null"]}},"required":["direction"],"title":"ExtendArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `diagram.extend`.","properties":{"arrow":{"description":"The arrow from the parent to the new node.","type":"string"},"bounds":{"$ref":"#/$defs/RectOut","description":"Where the node is."},"node":{"description":"The new node, now selected.","type":"string"},"node_label":{"description":"The node's label text element, when `label` was given.","type":["string","null"]}},"required":["node","arrow","bounds"],"title":"ExtendOut","type":"object"}},"diagram.import_mermaid":{"args":{"$defs":{"AtWord":{"description":"The words `at` accepts.","oneOf":[{"const":"viewport_center","description":"The middle of the viewport.","type":"string"},{"const":"below_content","description":"Directly below everything that is in the document now.","type":"string"}]},"ClipboardWord":{"description":"The only word `source` accepts.","oneOf":[{"const":"clipboard","description":"Read the clipboard port.","type":"string"}]},"DiagramAt":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"`\"viewport_center\"` or `\"below_content\"`."},{"description":"The top-left corner `[x, y]` in world units.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the diagram goes."},"MermaidSource":{"anyOf":[{"$ref":"#/$defs/ClipboardWord","description":"The word `\"clipboard\"`."},{"description":"The text itself.","properties":{"text":{"description":"Mermaid source, with or without a code fence.","type":"string"}},"required":["text"],"type":"object"}],"description":"Where the Mermaid text comes from."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `diagram.import_mermaid`.","properties":{"at":{"$ref":"#/$defs/DiagramAt","default":"viewport_center","description":"Where the diagram goes: a top-left point, or `\"viewport_center\"` (default)."},"group":{"default":true,"description":"Group the whole diagram, and every Mermaid subgraph with its box and title.","type":"boolean"},"select":{"default":true,"description":"Select the result.","type":"boolean"},"source":{"$ref":"#/$defs/MermaidSource","description":"`\"clipboard\"`, or `{\"text\": \"graph TD; A-->B\"}`."}},"required":["source"],"title":"ImportArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The result of building a diagram.","properties":{"bounds":{"$ref":"#/$defs/RectOut","description":"Bounds of the whole diagram."},"clusters":{"additionalProperties":{"type":"string"},"description":"Mermaid subgraphs: symbolic cluster id to the element id of its box. Edges may start or end at a box.","type":"object"},"edges":{"description":"The arrows, in the order of `edges`.","items":{"type":"string"},"type":"array"},"frame":{"description":"The frame, when one was asked for.","type":["string","null"]},"groups":{"description":"The groups made, in order.","items":{"type":"string"},"type":"array"},"nodes":{"additionalProperties":{"type":"string"},"description":"Symbolic node id to the real element id. In a batch, later steps use `$<step>.<node>`.","type":"object"}},"required":["nodes","edges","groups","clusters","bounds"],"title":"DiagramOut","type":"object"}},"doc.autosave":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What an autosave did.","properties":{"changed":{"description":"False: the command wrote nothing the document or the session needed.","type":"boolean"},"saved":{"description":"True when a document was written because it had changed since the last autosave.","type":"boolean"},"tabs":{"description":"Tabs in the workspace record.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","saved","tabs"],"title":"AutosaveOut","type":"object"}},"doc.clear":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `doc.clear` removed.","properties":{"changed":{"description":"True.","type":"boolean"},"removed":{"description":"Elements removed (bound text and frame children included).","format":"uint","minimum":0,"type":"integer"}},"required":["changed","removed"],"title":"ClearOut","type":"object"}},"doc.drop":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"A word."},{"description":"A world point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the middle of what is inserted goes."},"AtWord":{"description":"The words `at` accepts besides a point.","oneOf":[{"const":"viewport_center","description":"The middle of the visible canvas.","type":"string"},{"const":"$cursor","description":"The pointer position. A shell replaces this word with a point; if it is left in, the middle of the visible\ncanvas is used (the pointer is outside the canvas).","type":"string"}]},"Bytes":{"anyOf":[{"$ref":"#/$defs/InlineBytes","description":"`{base64, name?, mime?}`."},{"$ref":"#/$defs/PathBytes","description":"`{path}`."}],"description":"Bytes: inline as base64, or a path."},"DropDocs":{"description":"Where a dropped document goes.","oneOf":[{"const":"new_tab","description":"A new tab (default).","type":"string"},{"const":"replace","description":"Replace the active document.","type":"string"},{"const":"merge","description":"Merge into the active document.","type":"string"}]},"DropItem":{"additionalProperties":false,"description":"One dropped file.","properties":{"bytes":{"$ref":"#/$defs/Bytes","description":"The content: `{base64}` or `{path}`."},"mime":{"default":null,"description":"The media type, if known.","type":["string","null"]},"name":{"description":"The file name.","type":"string"}},"required":["name","bytes"],"type":"object"},"InlineBytes":{"additionalProperties":false,"description":"Bytes given inline.","properties":{"base64":{"description":"The bytes as base64 (standard alphabet, padding optional). A `data:...;base64,` prefix is accepted.","type":"string"},"mime":{"description":"The media type the sender claims. It is not trusted: the content decides.","type":["string","null"]},"name":{"description":"The file name, used in messages.","type":["string","null"]}},"required":["base64"],"type":"object"},"OnUnsaved":{"description":"What to do with unsaved changes when a tab closes.","oneOf":[{"const":"refuse","description":"Refuse with `unsaved_changes`.","type":"string"},{"const":"discard","description":"Drop the changes.","type":"string"},{"const":"save","description":"Save with `doc.save` first (the active tab only).","type":"string"}]},"PathBytes":{"additionalProperties":false,"description":"Bytes read from a file through the `Files` port.","properties":{"path":{"description":"A path the session's file access can read.","type":"string"}},"required":["path"],"type":"object"},"ScenePng":{"description":"What to do with a PNG or an SVG that carries a scene (a drafft.ink export, or an Excalidraw export with its scene).","oneOf":[{"const":"open","description":"Open the scene, as a dropped `.excalidraw` or `.json` file opens (default). A scene that cannot be read\nfalls back to inserting the picture, and the output says so.","type":"string"},{"const":"insert","description":"Insert the file as an image, whatever it carries.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.drop`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"World point to put images and merged elements at: a point, `viewport_center` (default) or `$cursor`."},"documents":{"$ref":"#/$defs/DropDocs","default":"new_tab","description":"Documents: `new_tab` (default), `replace` or `merge`."},"items":{"description":"The dropped files (1 to 50).","items":{"$ref":"#/$defs/DropItem"},"type":"array"},"on_unsaved":{"$ref":"#/$defs/OnUnsaved","default":"refuse","description":"What to do with unsaved changes when a document replaces the active one."},"scene_png":{"$ref":"#/$defs/ScenePng","default":"open","description":"A PNG or SVG with an embedded scene: `open` the scene (default, like a dropped document) or `insert` the\nfile as an image."}},"required":["items"],"title":"DropArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What a drop did.","properties":{"changed":{"description":"True when anything was opened, inserted or imported.","type":"boolean"},"documents":{"description":"Documents opened.","format":"uint","minimum":0,"type":"integer"},"images":{"description":"Images inserted.","format":"uint","minimum":0,"type":"integer"},"library_items":{"description":"Library items added.","format":"uint","minimum":0,"type":"integer"},"scene_fallbacks":{"description":"One sentence for each PNG whose embedded scene could not be read and that was inserted as a picture\ninstead (each is also a warning). A shell shows these to the person.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Files that were skipped (each is also a warning).","format":"uint","minimum":0,"type":"integer"}},"required":["changed","documents","images","library_items","skipped","scene_fallbacks"],"title":"DropOut","type":"object"}},"doc.export":{"args":{"$defs":{"Dest":{"anyOf":[{"$ref":"#/$defs/InlineWord","description":"`\"inline\"`: the bytes come back in the output as base64."},{"$ref":"#/$defs/FileRef","description":"A file: `{path}`, `{download}`, `{stored}` or `{handle}`."}],"description":"Where the export goes."},"ExportFormat":{"description":"The export format.","oneOf":[{"const":"png","description":"A picture. Needs the renderer.","type":"string"},{"const":"svg","description":"A vector picture.","type":"string"},{"const":"json","description":"Drafft.ink JSON.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene.","type":"string"}]},"ExportScope":{"description":"What to export.","oneOf":[{"const":"auto","description":"The selection if there is one, else everything.","type":"string"},{"const":"all","description":"Everything.","type":"string"},{"const":"selection","description":"The selection.","type":"string"},{"const":"ids","description":"The elements in `ids`.","type":"string"},{"const":"frame","description":"One frame and its children, clipped to the frame.","type":"string"}]},"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"InlineWord":{"description":"The only word `to` accepts besides a file.","oneOf":[{"const":"inline","description":"Return the bytes in the output.","type":"string"}]},"MissingImages":{"description":"What an export does with a picture of a room that this device cannot get.","oneOf":[{"const":"refuse","description":"Refuse (`images_pending` while they download, else `images_unavailable`), so no export is silently\nincomplete.","type":"string"},{"const":"placeholder","description":"Export without them: they show as empty frames, and the output says how many were left out.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.export`.","properties":{"background":{"default":null,"description":"Paint the document background. Default: the setting `export.background`.","type":["boolean","null"]},"dark":{"default":null,"description":"Draw with the dark palette (PNG and SVG). Default: the setting `export.dark`.","type":["boolean","null"]},"embed_scene":{"default":null,"description":"Embed the scene so that the picture can be opened again with `doc.open`. Default: the setting `export.embed_scene`.","type":["boolean","null"]},"format":{"$ref":"#/$defs/ExportFormat","default":"png","description":"`png` (default), `svg`, `json` or `excalidraw`."},"frame":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The frame, for scope `frame`."},"ids":{"default":null,"description":"The elements, for scope `ids`.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"missing_images":{"$ref":"#/$defs/MissingImages","default":"refuse","description":"Only in an encrypted room, for pictures this device does not hold yet. `refuse` (default): the export is\nrefused with `images_pending` while they download, or `images_unavailable` when they cannot be loaded.\n`placeholder`: export anyway; they show as empty frames and the output says how many (`images_missing`)."},"padding":{"default":null,"description":"World units around the content, 0 to 1000. Default: the setting `export.padding`.","format":"double","type":["number","null"]},"scale":{"default":null,"description":"PNG and SVG size factor, 0.25 to 4. Default: the setting `export.scale`.","format":"double","type":["number","null"]},"scope":{"$ref":"#/$defs/ExportScope","default":"auto","description":"`auto` (default: the selection if there is one, else everything), `all`, `selection`, `ids` or `frame`."},"to":{"$ref":"#/$defs/Dest","default":"inline","description":"`inline` (default) returns the bytes; a file is written through the files port."}},"title":"ExportArgs","type":"object"},"output":{"$defs":{"ExportBytes":{"description":"The bytes of an inline export.","properties":{"base64":{"description":"The content, base64.","type":"string"},"mime":{"description":"Its media type.","type":"string"}},"required":["base64","mime"],"type":"object"},"ExportFormat":{"description":"The export format.","oneOf":[{"const":"png","description":"A picture. Needs the renderer.","type":"string"},{"const":"svg","description":"A vector picture.","type":"string"},{"const":"json","description":"Drafft.ink JSON.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene.","type":"string"}]},"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What an export produced.","properties":{"bytes":{"anyOf":[{"$ref":"#/$defs/ExportBytes"},{"type":"null"}],"description":"The content, for `to: inline`."},"changed":{"description":"Always false: an export changes no document.","type":"boolean"},"elements":{"description":"Elements exported.","format":"uint","minimum":0,"type":"integer"},"format":{"$ref":"#/$defs/ExportFormat","description":"The format."},"height":{"description":"Height in pixels (PNG).","format":"uint32","minimum":0,"type":["integer","null"]},"images_missing":{"description":"Pictures of an encrypted room that were left out because this device does not hold them\n(`missing_images: \"placeholder\"`). Absent when none.","format":"uint32","minimum":0,"type":"integer"},"mime":{"description":"Its media type.","type":"string"},"saved_to":{"anyOf":[{"$ref":"#/$defs/FileRef"},{"type":"null"}],"description":"Where it was written, for a file."},"scene_embedded":{"description":"Whether the scene is embedded in the picture (PNG, SVG).","type":"boolean"},"size":{"description":"Size in bytes.","format":"uint","minimum":0,"type":"integer"},"width":{"description":"Width in pixels (PNG).","format":"uint32","minimum":0,"type":["integer","null"]}},"required":["changed","format","mime","size","elements","scene_embedded","images_missing"],"title":"ExportOut","type":"object"}},"doc.inspect":{"args":{"$defs":{"InspectDetail":{"description":"How much `doc.inspect` returns.","oneOf":[{"const":"summary","description":"Counts and bounds of the document (the default).","type":"string"},{"const":"full","description":"Every field of each element.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.inspect`.","properties":{"detail":{"$ref":"#/$defs/InspectDetail","default":"summary","description":"`summary` or `full`."},"ids":{"default":null,"description":"With detail `full`: only these elements (ids or `@name`).","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"include_deleted":{"default":false,"description":"With detail `full`: also list deleted elements (they carry `deleted: true`).","type":"boolean"},"limit":{"default":200,"description":"With detail `full`: page size, 1 to 1000.","format":"int64","type":"integer"},"offset":{"default":0,"description":"With detail `full`: elements to skip.","format":"int64","type":"integer"}},"title":"InspectArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"doc.list":{"args":{"$defs":{"ListFrom":{"description":"Which documents `doc.list` lists.","oneOf":[{"const":"recent","description":"The last 10 documents saved or opened (default).","type":"string"},{"const":"stored","description":"The documents in the stored document namespace (the web document store).","type":"string"},{"const":"autosave","description":"The last autosave.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.list`.","properties":{"from":{"$ref":"#/$defs/ListFrom","default":"recent","description":"`recent` (default), `stored` or `autosave`."}},"title":"ListArgs","type":"object"},"output":{"$defs":{"DocInfo":{"description":"One listed document.","properties":{"modified_ms":{"description":"When it was last written, if known.","format":"uint64","minimum":0,"type":["integer","null"]},"name":{"description":"A short name.","type":"string"},"ref":{"$ref":"#/$defs/FileRef","description":"What to pass to `doc.open` as `source`."},"size":{"description":"Its size in bytes, if known.","format":"uint64","minimum":0,"type":["integer","null"]}},"required":["name","ref"],"type":"object"},"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `doc.list`.","properties":{"changed":{"description":"Always false.","type":"boolean"},"documents":{"description":"The documents, newest first for `recent`.","items":{"$ref":"#/$defs/DocInfo"},"type":"array"}},"required":["changed","documents"],"title":"ListOut","type":"object"}},"doc.new":{"args":{"$defs":{"OnUnsaved":{"description":"What to do with unsaved changes when a tab closes.","oneOf":[{"const":"refuse","description":"Refuse with `unsaved_changes`.","type":"string"},{"const":"discard","description":"Drop the changes.","type":"string"},{"const":"save","description":"Save with `doc.save` first (the active tab only).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.new`.","properties":{"in_new_tab":{"default":false,"description":"Open the new document in a new tab instead of replacing the active one.","type":"boolean"},"name":{"default":null,"description":"Name of the new document (1 to 256 characters). Default: \"Untitled\".","type":["string","null"]},"on_unsaved":{"$ref":"#/$defs/OnUnsaved","default":"refuse","description":"What to do with unsaved changes when replacing: `refuse` (default), `discard` or `save`."}},"title":"NewArgs","type":"object"},"output":{"$defs":{"Detected":{"description":"What the bytes of an opened document were.","oneOf":[{"const":"drafftink","description":"Drafft.ink JSON, old drafft-ink JSON, gzip or a Loro snapshot.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene or clipboard.","type":"string"},{"const":"png","description":"A PNG with the scene embedded.","type":"string"},{"const":"svg","description":"An SVG with the scene embedded.","type":"string"},{"const":"blank","description":"A new blank document (`doc.new`).","type":"string"},{"const":"intro","description":"The built-in intro document (`doc.show_intro`).","type":"string"}]},"Mode":{"description":"Where an opened document goes.","oneOf":[{"const":"replace","description":"Replace the document of the active tab.","type":"string"},{"const":"new_tab","description":"Open it in a new tab.","type":"string"},{"const":"merge","description":"Add its elements to the active document, with new ids.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What an open, new or intro command did.","properties":{"changed":{"description":"True when the session changed.","type":"boolean"},"elements":{"description":"Elements in the opened document (for merge: elements added).","format":"uint","minimum":0,"type":"integer"},"format":{"$ref":"#/$defs/Detected","description":"What the bytes were."},"mode":{"$ref":"#/$defs/Mode","description":"Where the document went."},"name":{"description":"The name of the document now in the active tab.","type":"string"},"selected":{"description":"Elements selected afterwards.","format":"uint","minimum":0,"type":"integer"},"tab":{"description":"The active tab after the command.","type":"string"}},"required":["changed","mode","name","tab","format","elements","selected"],"title":"OpenOut","type":"object"}},"doc.open":{"args":{"$defs":{"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"FormatWord":{"description":"The file format `doc.open` expects.","oneOf":[{"const":"auto","description":"Decide from the content.","type":"string"},{"const":"drafftink","description":"Drafft.ink JSON (also the old app's JSON, gzip or Loro snapshot).","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene or clipboard.","type":"string"},{"const":"png","description":"A PNG (or SVG) with the scene embedded.","type":"string"}]},"InlineBytes":{"additionalProperties":false,"description":"Bytes given inline.","properties":{"base64":{"description":"The bytes as base64 (standard alphabet, padding optional). A `data:...;base64,` prefix is accepted.","type":"string"},"mime":{"description":"The media type the sender claims. It is not trusted: the content decides.","type":["string","null"]},"name":{"description":"The file name, used in messages.","type":["string","null"]}},"required":["base64"],"type":"object"},"Mode":{"description":"Where an opened document goes.","oneOf":[{"const":"replace","description":"Replace the document of the active tab.","type":"string"},{"const":"new_tab","description":"Open it in a new tab.","type":"string"},{"const":"merge","description":"Add its elements to the active document, with new ids.","type":"string"}]},"OnUnsaved":{"description":"What to do with unsaved changes when a tab closes.","oneOf":[{"const":"refuse","description":"Refuse with `unsaved_changes`.","type":"string"},{"const":"discard","description":"Drop the changes.","type":"string"},{"const":"save","description":"Save with `doc.save` first (the active tab only).","type":"string"}]},"Source":{"anyOf":[{"$ref":"#/$defs/InlineBytes","description":"`{base64, name?, mime?}`."},{"$ref":"#/$defs/FileRef","description":"`{path}`, `{stored}`, `{download}` or `{handle}`. `{stored: \"autosave\"}` is the last autosave."}],"description":"Where the data of a command comes from: inline bytes, or a file or stored name that the session reads."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.open`.","properties":{"at":{"default":null,"description":"For merge: the world point to centre the new elements on. Default: their own coordinates.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"format":{"$ref":"#/$defs/FormatWord","default":"auto","description":"The expected format. `auto` decides from the content."},"mode":{"$ref":"#/$defs/Mode","default":"replace","description":"`replace` (default) loads into the active tab, `new_tab` opens a tab, `merge` adds the elements."},"on_unsaved":{"$ref":"#/$defs/OnUnsaved","default":"refuse","description":"What to do with unsaved changes when replacing: `refuse` (default), `discard` or `save`."},"select":{"default":true,"description":"For merge: select the new elements. Default true.","type":"boolean"},"source":{"$ref":"#/$defs/Source","description":"The file: `{path}`, `{stored}`, `{handle}`, or `{base64, name?, mime?}`. `{stored: \"autosave\"}` is the\nlast autosave."}},"required":["source"],"title":"OpenArgs","type":"object"},"output":{"$defs":{"Detected":{"description":"What the bytes of an opened document were.","oneOf":[{"const":"drafftink","description":"Drafft.ink JSON, old drafft-ink JSON, gzip or a Loro snapshot.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene or clipboard.","type":"string"},{"const":"png","description":"A PNG with the scene embedded.","type":"string"},{"const":"svg","description":"An SVG with the scene embedded.","type":"string"},{"const":"blank","description":"A new blank document (`doc.new`).","type":"string"},{"const":"intro","description":"The built-in intro document (`doc.show_intro`).","type":"string"}]},"Mode":{"description":"Where an opened document goes.","oneOf":[{"const":"replace","description":"Replace the document of the active tab.","type":"string"},{"const":"new_tab","description":"Open it in a new tab.","type":"string"},{"const":"merge","description":"Add its elements to the active document, with new ids.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What an open, new or intro command did.","properties":{"changed":{"description":"True when the session changed.","type":"boolean"},"elements":{"description":"Elements in the opened document (for merge: elements added).","format":"uint","minimum":0,"type":"integer"},"format":{"$ref":"#/$defs/Detected","description":"What the bytes were."},"mode":{"$ref":"#/$defs/Mode","description":"Where the document went."},"name":{"description":"The name of the document now in the active tab.","type":"string"},"selected":{"description":"Elements selected afterwards.","format":"uint","minimum":0,"type":"integer"},"tab":{"description":"The active tab after the command.","type":"string"}},"required":["changed","mode","name","tab","format","elements","selected"],"title":"OpenOut","type":"object"}},"doc.outline":{"args":{"$defs":{"OutlineFormat":{"description":"What `doc.outline` returns.","oneOf":[{"const":"text","description":"The compact text only.","type":"string"},{"const":"json","description":"The structure as JSON only.","type":"string"},{"const":"both","description":"Both (the default).","type":"string"}]},"OutlineScopeArg":{"description":"Which part of the document the outline covers.","oneOf":[{"const":"all","description":"Everything (the default).","type":"string"},{"const":"selection","description":"The selected elements.","type":"string"},{"const":"visible","description":"Elements that touch the visible area.","type":"string"},{"const":"frame","description":"The children of `frame`.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.outline`.","properties":{"format":{"$ref":"#/$defs/OutlineFormat","default":"both","description":"`text`, `json` or `both`."},"frame":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"With scope `frame`: the frame (an id or `@name`)."},"max_nodes":{"default":500,"description":"Show at most this many nodes and as many edges (1 to 5000). The text says when it cut something.","format":"int64","type":"integer"},"scope":{"$ref":"#/$defs/OutlineScopeArg","default":"all","description":"`all`, `selection`, `visible` or `frame`."}},"title":"OutlineArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"Outline":{"description":"The structure of the document for an agent.","properties":{"edges":{"description":"Arrows with their ends.","items":{"$ref":"#/$defs/OutlineEdge"},"type":"array"},"frames":{"description":"Frames.","items":{"$ref":"#/$defs/OutlineFrame"},"type":"array"},"groups":{"description":"Groups.","items":{"$ref":"#/$defs/OutlineGroup"},"type":"array"},"nodes":{"description":"Shapes, images, math, lines and freehand strokes, in reading order.","items":{"$ref":"#/$defs/OutlineNode"},"type":"array"},"texts":{"description":"Free text that no arrow connects and that labels nothing.","items":{"$ref":"#/$defs/OutlineNode"},"type":"array"},"truncated":{"anyOf":[{"$ref":"#/$defs/Truncation"},{"type":"null"}],"description":"Present when something was left out."}},"required":["nodes","edges","texts","groups","frames"],"type":"object"},"OutlineEdge":{"description":"An arrow.","properties":{"end_head":{"$ref":"#/$defs/Head","description":"Marker at the end."},"from":{"anyOf":[{"$ref":"#/$defs/ElementId"},{"type":"null"}],"description":"What the start is bound to. `None`: loose."},"id":{"$ref":"#/$defs/ElementId","description":"The arrow's id."},"label":{"description":"The arrow's bound text.","type":["string","null"]},"name":{"description":"The `name`.","type":["string","null"]},"path":{"$ref":"#/$defs/PathType","description":"Straight, curved, elbow or auto route."},"start_head":{"$ref":"#/$defs/Head","description":"Marker at the start."},"to":{"anyOf":[{"$ref":"#/$defs/ElementId"},{"type":"null"}],"description":"What the end is bound to. `None`: loose."}},"required":["id","start_head","end_head","path"],"type":"object"},"OutlineFrame":{"description":"A frame and what is in it.","properties":{"bounds":{"description":"`[x, y, w, h]`.","items":{"format":"int64","type":"integer"},"maxItems":4,"minItems":4,"type":"array"},"children":{"description":"Child ids: nodes and arrows, in outline order.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"id":{"$ref":"#/$defs/ElementId","description":"Element id."},"name":{"description":"The title.","type":["string","null"]}},"required":["id","bounds","children"],"type":"object"},"OutlineGroup":{"description":"A group with at least two live members.","properties":{"id":{"$ref":"#/$defs/GroupId","description":"Group id."},"members":{"description":"Member ids in outline order (labels follow their containers and are not listed).","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["id","members"],"type":"object"},"OutlineNode":{"description":"A shape, text or other thing in the outline.","properties":{"bounds":{"description":"`[x, y, w, h]`, rounded to whole units.","items":{"format":"int64","type":"integer"},"maxItems":4,"minItems":4,"type":"array"},"frame":{"anyOf":[{"$ref":"#/$defs/ElementId"},{"type":"null"}],"description":"The frame it is in."},"id":{"$ref":"#/$defs/ElementId","description":"Element id."},"kind":{"$ref":"#/$defs/Kind","description":"The kind."},"label":{"description":"The text inside (bound label, own text or LaTeX).","type":["string","null"]},"locked":{"description":"Locked.","type":"boolean"},"name":{"description":"The `name` an agent can address it by.","type":["string","null"]}},"required":["id","kind","bounds","locked"],"type":"object"},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"Truncation":{"description":"Said when the outline is cut short.","properties":{"edges_shown":{"description":"Edges shown.","format":"uint","minimum":0,"type":"integer"},"edges_total":{"description":"Edges in scope.","format":"uint","minimum":0,"type":"integer"},"hint":{"description":"What to do about it.","type":"string"},"nodes_shown":{"description":"Nodes shown.","format":"uint","minimum":0,"type":"integer"},"nodes_total":{"description":"Nodes in scope (shapes and loose texts).","format":"uint","minimum":0,"type":"integer"}},"required":["nodes_total","nodes_shown","edges_total","edges_shown","hint"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `doc.outline`.","properties":{"outline":{"anyOf":[{"$ref":"#/$defs/Outline"},{"type":"null"}],"description":"Nodes, edges, loose texts, groups and frames. Absent for format `text`."},"text":{"description":"One line per node and per edge, in a fixed order. Absent for format `json`.","type":["string","null"]}},"title":"OutlineOut","type":"object"}},"doc.rename":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.rename`.","properties":{"name":{"description":"The new name, 1 to 256 characters (trimmed).","type":"string"}},"required":["name"],"title":"RenameArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of the commands that edit the document's own properties.","properties":{"background":{"description":"The background colour after the command, `#rrggbb` or `#rrggbbaa`.","type":"string"},"changed":{"description":"False when the document already had this value.","type":"boolean"},"name":{"description":"The name of the document after the command.","type":"string"}},"required":["changed","name","background"],"title":"PropOut","type":"object"}},"doc.save":{"args":{"$defs":{"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"SaveFormat":{"description":"The file format `doc.save` writes.","oneOf":[{"const":"drafftink","description":"Drafft.ink JSON, versioned, images embedded.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene; fields it cannot hold are dropped and listed in `warnings`.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.save`.","properties":{"format":{"$ref":"#/$defs/SaveFormat","default":"drafftink","description":"`drafftink` (default) or `excalidraw`."},"overwrite":{"default":false,"description":"Replace a file that exists and is not this document's file. Default false.","type":"boolean"},"remember":{"default":true,"description":"Make `to` the save target and a recent file. Default true.","type":"boolean"},"to":{"anyOf":[{"$ref":"#/$defs/FileRef"},{"type":"null"}],"default":null,"description":"Where to write: `{path}`, `{stored}`, `{download}` or `{handle}`. Default: the save target of the document."}},"title":"SaveArgs","type":"object"},"output":{"$defs":{"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"SaveFormat":{"description":"The file format `doc.save` writes.","oneOf":[{"const":"drafftink","description":"Drafft.ink JSON, versioned, images embedded.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene; fields it cannot hold are dropped and listed in `warnings`.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What a save did.","properties":{"bytes":{"description":"Size of the file in bytes.","format":"uint","minimum":0,"type":"integer"},"changed":{"description":"True: the document is no longer dirty.","type":"boolean"},"format":{"$ref":"#/$defs/SaveFormat","description":"The format written."},"images_missing":{"description":"Pictures of an encrypted room that are not in the file because this device does not hold them yet. The\nfile opens with empty frames for them. Absent when none; the pictures are asked for, so a later save has\nthem.","format":"uint32","minimum":0,"type":"integer"},"saved_to":{"$ref":"#/$defs/FileRef","description":"Where the document was written."}},"required":["changed","saved_to","format","bytes","images_missing"],"title":"SaveOut","type":"object"}},"doc.set_background":{"args":{"$defs":{"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.set_background`.","properties":{"color":{"$ref":"#/$defs/ColorArg","description":"`#rrggbb`, `#rrggbbaa`, `transparent`, or a palette name such as `gray-50`."}},"required":["color"],"title":"BackgroundArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of the commands that edit the document's own properties.","properties":{"background":{"description":"The background colour after the command, `#rrggbb` or `#rrggbbaa`.","type":"string"},"changed":{"description":"False when the document already had this value.","type":"boolean"},"name":{"description":"The name of the document after the command.","type":"string"}},"required":["changed","name","background"],"title":"PropOut","type":"object"}},"doc.show_intro":{"args":{"$defs":{"IntroMode":{"description":"Where the intro goes.","oneOf":[{"const":"replace","description":"Replace the document of the active tab.","type":"string"},{"const":"new_tab","description":"Open it in a new tab.","type":"string"}]},"OnUnsaved":{"description":"What to do with unsaved changes when a tab closes.","oneOf":[{"const":"refuse","description":"Refuse with `unsaved_changes`.","type":"string"},{"const":"discard","description":"Drop the changes.","type":"string"},{"const":"save","description":"Save with `doc.save` first (the active tab only).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `doc.show_intro`.","properties":{"mode":{"$ref":"#/$defs/IntroMode","default":"replace","description":"`replace` (default) or `new_tab`."},"on_unsaved":{"$ref":"#/$defs/OnUnsaved","default":"refuse","description":"What to do with unsaved changes when replacing: `refuse` (default), `discard` or `save`."}},"title":"IntroArgs","type":"object"},"output":{"$defs":{"Detected":{"description":"What the bytes of an opened document were.","oneOf":[{"const":"drafftink","description":"Drafft.ink JSON, old drafft-ink JSON, gzip or a Loro snapshot.","type":"string"},{"const":"excalidraw","description":"An Excalidraw scene or clipboard.","type":"string"},{"const":"png","description":"A PNG with the scene embedded.","type":"string"},{"const":"svg","description":"An SVG with the scene embedded.","type":"string"},{"const":"blank","description":"A new blank document (`doc.new`).","type":"string"},{"const":"intro","description":"The built-in intro document (`doc.show_intro`).","type":"string"}]},"Mode":{"description":"Where an opened document goes.","oneOf":[{"const":"replace","description":"Replace the document of the active tab.","type":"string"},{"const":"new_tab","description":"Open it in a new tab.","type":"string"},{"const":"merge","description":"Add its elements to the active document, with new ids.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What an open, new or intro command did.","properties":{"changed":{"description":"True when the session changed.","type":"boolean"},"elements":{"description":"Elements in the opened document (for merge: elements added).","format":"uint","minimum":0,"type":"integer"},"format":{"$ref":"#/$defs/Detected","description":"What the bytes were."},"mode":{"$ref":"#/$defs/Mode","description":"Where the document went."},"name":{"description":"The name of the document now in the active tab.","type":"string"},"selected":{"description":"Elements selected afterwards.","format":"uint","minimum":0,"type":"integer"},"tab":{"description":"The active tab after the command.","type":"string"}},"required":["changed","mode","name","tab","format","elements","selected"],"title":"OpenOut","type":"object"}},"element.at":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.at`.","properties":{"all":{"default":false,"description":"Return every hit, top to bottom, instead of the topmost.","type":"boolean"},"deep":{"default":false,"description":"Report group members as themselves instead of as their outermost group.","type":"boolean"},"include_locked":{"default":false,"description":"Locked elements can be hit.","type":"boolean"},"point":{"description":"World point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"tolerance":{"default":6.0,"description":"How far from an outline still counts as a hit, in screen pixels (divided by the zoom).","format":"double","type":"number"}},"required":["point"],"title":"AtArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.at`.","properties":{"count":{"description":"How many hits.","format":"uint","minimum":0,"type":"integer"},"hits":{"description":"The hits, top to bottom. Each has id, kind, name and bounds. A hit that counts as a whole group also has\n`group` (its id) and `members` (the element ids of the group).","items":true,"type":"array"}},"required":["count","hits"],"title":"AtOut","type":"object"}},"element.connect":{"args":{"$defs":{"BindMode":{"description":"Where a bound arrow end sits relative to its target.","oneOf":[{"const":"inside","description":"The end is inside the target's outline and keeps its ratio position there.","type":"string"},{"const":"orbit","description":"The end sits on the target's outline plus a small gap, aimed at the fixed point.","type":"string"}]},"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"ConnectKind":{"description":"What `element.connect` draws.","oneOf":[{"const":"arrow","description":"An arrow (default).","type":"string"},{"const":"line","description":"A line.","type":"string"}]},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.connect`.","properties":{"arrow_type":{"anyOf":[{"$ref":"#/$defs/PathType"},{"type":"null"}],"description":"sharp (default), round, elbow or auto_route."},"bind_mode":{"anyOf":[{"$ref":"#/$defs/BindMode"},{"type":"null"}],"description":"orbit (default): the ends sit on the outlines plus a gap. inside: the ends stay at the facing outline points."},"end_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"Marker at the end. Default `arrow` for an arrow, none for a line."},"from":{"$ref":"#/$defs/Ref","description":"The element the arrow starts at: an id or `@name`."},"kind":{"anyOf":[{"$ref":"#/$defs/ConnectKind"},{"type":"null"}],"description":"arrow (default) or line."},"label":{"description":"Text of the arrow's label. Blank or absent: no label.","type":["string","null"]},"name":{"description":"A unique name for the arrow.","type":["string","null"]},"start_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"Marker at the start. Default none."},"style":{"anyOf":[{"$ref":"#/$defs/StyleProps"},{"type":"null"}],"description":"Style properties over the style defaults of the session."},"to":{"$ref":"#/$defs/Ref","description":"The element the arrow ends at: an id or `@name`."}},"required":["from","to"],"title":"ConnectArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `element.connect` made.","properties":{"id":{"description":"The id of the new arrow.","type":"string"},"label":{"description":"The id of its label, when `label` was given.","type":["string","null"]}},"required":["id"],"title":"ConnectOut","type":"object"}},"element.convert":{"args":{"$defs":{"ConvertTo":{"description":"The type to convert to.","oneOf":[{"const":"rectangle","description":"A rectangle.","type":"string"},{"const":"diamond","description":"A diamond.","type":"string"},{"const":"ellipse","description":"An ellipse.","type":"string"},{"const":"line","description":"A line.","type":"string"},{"const":"arrow","description":"An arrow; `arrow_type` says which kind.","type":"string"}]},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.convert`.","properties":{"arrow_type":{"anyOf":[{"$ref":"#/$defs/PathType"},{"type":"null"}],"description":"With `to` = arrow: sharp (default), round, elbow or auto_route."},"ids":{"description":"Rectangles, diamonds, ellipses, or lines and arrows (not both). Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"reverse":{"description":"Without `to`: take the previous type instead of the next (Shift+Tab).","type":"boolean"},"to":{"anyOf":[{"$ref":"#/$defs/ConvertTo"},{"type":"null"}],"description":"The type to convert to. Absent: the next type of the family (rectangle, diamond, ellipse; or line, sharp\narrow, round arrow, elbow arrow, auto route arrow), as Tab does."}},"title":"ConvertArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `element.convert` did.","properties":{"converted":{"description":"The elements whose type changed.","items":{"type":"string"},"type":"array"},"followers":{"description":"Arrows bound to a converted shape that were put back on its new outline.","items":{"type":"string"},"type":"array"},"to":{"description":"The type now, in words: `rectangle`, `diamond`, `ellipse`, `line`, `sharp arrow`, `round arrow`,\n`elbow arrow` or `auto route arrow`.","type":"string"},"unchanged":{"description":"Elements that already had the type.","items":{"type":"string"},"type":"array"}},"required":["to","converted","unchanged","followers"],"title":"ConvertOut","type":"object"}},"element.create":{"args":{"$defs":{"BindArg":{"additionalProperties":false,"description":"An arrow end bound to an element.","properties":{"fixed_point":{"description":"Where on the target, as ratios `[rx, ry]` of its unrotated box. Default: the outline point facing the\nother end.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"mode":{"anyOf":[{"$ref":"#/$defs/BindMode"},{"type":"null"}],"description":"`orbit` (default): the end sits on the target's outline plus a small gap. `inside`: the end stays inside."},"target":{"$ref":"#/$defs/Ref","description":"The element to attach to: an id or `@name`. Bindable kinds: rectangle, diamond, ellipse, text, image, frame."}},"required":["target"],"type":"object"},"BindMode":{"description":"Where a bound arrow end sits relative to its target.","oneOf":[{"const":"inside","description":"The end is inside the target's outline and keeps its ratio position there.","type":"string"},{"const":"orbit","description":"The end sits on the target's outline plus a small gap, aimed at the fixed point.","type":"string"}]},"BindPolicy":{"description":"How automatic binding of arrow ends works (`bind` of `element.create`).","oneOf":[{"const":"auto","description":"An end inside a bindable element binds inside; an end near its outline binds on the outline.","type":"string"},{"const":"on","description":"Automatic binding whatever the setting `arrow.binding` says (a pointer gesture sends this when Ctrl or Cmd\nis held while the setting is off).","type":"string"},{"const":"off","description":"No automatic binding. Ends named in `start` or `end` are still bound.","type":"string"},{"const":"inside","description":"An end over a bindable element binds inside it (Alt held).","type":"string"}]},"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"FrameArg":{"description":"\"auto\" (default): the frame under the new element's centre, if any. An id or \"@name\": that frame. null: no frame.","type":["string","null"]},"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.create`. Which fields apply depends on `kind`; a field that does not apply to the kind\nis refused by name.","properties":{"after":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"description":"Put the new element directly above this element in the z-order (default: on top, or just below the frame\nfor a frame child; then `after` must be a child of the same frame). Not with `container`."},"arrow_type":{"anyOf":[{"$ref":"#/$defs/PathType"},{"type":"null"}],"description":"line, arrow: sharp (straight segments, default), round (a curve through the points), elbow (a right-angled\nroute between the two ends) or auto_route (a right-angled route that also goes around the other shapes)."},"at":{"description":"text: top-left corner of the box. math: top-left corner of the formula's box. Not with `container`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"bind":{"anyOf":[{"$ref":"#/$defs/BindPolicy"},{"type":"null"}],"description":"line, arrow: automatic binding of ends that are not named in `start` or `end`. `auto` (default) binds an\nend that lies inside a bindable element or near its outline; `off` binds nothing; `inside` binds an end over\nan element inside it; `on` is `auto` that ignores the setting. The setting `arrow.binding` set to false makes\n`auto` act as `off`. Only `auto` follows the setting: `on`, `off` and `inside` are always obeyed."},"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"rectangle, diamond, ellipse, frame: the box. A negative w or h is normalised. Both sides must be at least 1."},"capture":{"description":"frame: take in every unlocked element that lies completely inside (default true).","type":["boolean","null"]},"closed":{"description":"line: the last point connects back to the first (needs 3 or more points).","type":["boolean","null"]},"container":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"description":"text: create the text as the label of this rectangle, diamond, ellipse or arrow (an id or `@name`)."},"end":{"anyOf":[{"$ref":"#/$defs/BindArg"},{"type":"null"}],"description":"line, arrow: bind the last point to an element."},"end_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"line, arrow: marker at the last point. Default `arrow` for an arrow and none for a line."},"frame":{"$ref":"#/$defs/FrameArg","description":"`\"auto\"` (default): join the frame under the element's centre. An id or `@name`: join that frame. `null`:\nno frame. A label joins the frame of its container whatever this says."},"from_tool":{"description":"Passed by the drawing tools: afterwards the tool returns to select unless the tool is locked.","type":"boolean"},"highlighter":{"description":"freehand, the old way to ask for a marker: the same as `style.tip` chisel, and at least 12 wide with alpha\n128 unless the style gives a width or colour. New callers set the tip in `style` and choose the width and\nthe opacity themselves.","type":["boolean","null"]},"id":{"description":"The id of the new element. Default: a fresh id.","type":["string","null"]},"kind":{"$ref":"#/$defs/Kind","description":"What to create: rectangle, diamond, ellipse, frame, line, arrow, freehand, text or math. Images are made\nwith `image.insert`."},"latex":{"description":"math: the LaTeX source. Default `x^2 + y^2 = r^2`.","type":["string","null"]},"name":{"description":"A unique name, so that agents can address the element as `@name`. 1 to 64 characters.","type":["string","null"]},"points":{"description":"line, arrow, freehand: points in world coordinates. A line or arrow needs 2 or more; a stroke needs 1 or\nmore (one point is a dot).","items":{"items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":["array","null"]},"pressures":{"description":"freehand: pen pressure per point, 0 to 1, one per point. Without it the width is uniform (or simulated by\n`style.pressure_mode`). With it the stroke uses device pressure unless the style says otherwise.","items":{"format":"double","type":"number"},"type":["array","null"]},"select":{"description":"Select the new element (default true).","type":"boolean"},"simplify":{"description":"freehand: tolerance of the simplification in world units, 0 keeps all points. Default 2.","format":"double","type":["number","null"]},"start":{"anyOf":[{"$ref":"#/$defs/BindArg"},{"type":"null"}],"description":"line, arrow: bind the first point to an element."},"start_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"line, arrow: marker at the first point. Default none. `null` or `\"none\"` means no marker."},"style":{"anyOf":[{"$ref":"#/$defs/StyleProps"},{"type":"null"}],"description":"Style properties over the style defaults of the session."},"text":{"description":"text: the content. Blank text is refused.","type":["string","null"]},"width":{"description":"text: fixed width in world units; the text wraps and the box keeps the width. Absent: the box follows the\ncontent.","format":"double","type":["number","null"]}},"required":["kind"],"title":"CreateArgs","type":"object"},"output":{"$defs":{"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `element.create` made.","properties":{"bounds":{"$ref":"#/$defs/RectArg","description":"Its box."},"captured":{"description":"For a frame: the elements it took in.","items":{"type":"string"},"type":"array"},"container":{"description":"For a label: the id of its container.","type":["string","null"]},"end_target":{"description":"For a line or arrow: the element its last point is bound to.","type":["string","null"]},"frame":{"description":"The frame it joined.","type":["string","null"]},"id":{"description":"The id of the new element (for a label, the label's id).","type":"string"},"kind":{"$ref":"#/$defs/Kind","description":"Its kind."},"start_target":{"description":"For a line or arrow: the element its first point is bound to.","type":["string","null"]}},"required":["id","kind","bounds","captured"],"title":"CreateOut","type":"object"}},"element.create_sticky":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"A word."},{"description":"A world point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the middle of what is inserted goes."},"AtWord":{"description":"The words `at` accepts besides a point.","oneOf":[{"const":"viewport_center","description":"The middle of the visible canvas.","type":"string"},{"const":"$cursor","description":"The pointer position. A shell replaces this word with a point; if it is left in, the middle of the visible\ncanvas is used (the pointer is outside the canvas).","type":"string"}]},"FrameArg":{"description":"\"auto\" (default): the frame under the new element's centre, if any. An id or \"@name\": that frame. null: no frame.","type":["string","null"]},"NoteColor":{"description":"The paper colours of a note (Excalidraw's sticky note picks).","oneOf":[{"const":"yellow","description":"`#ffdf6b`, the default.","type":"string"},{"const":"pink","description":"`#fcc2d7`.","type":"string"},{"const":"green","description":"`#b2f2bb`.","type":"string"},{"const":"blue","description":"`#a5d8ff`.","type":"string"},{"const":"orange","description":"`#ffd8a8`.","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.create_sticky`.","properties":{"at":{"anyOf":[{"$ref":"#/$defs/At"},{"type":"null"}],"description":"The middle of the note: a world point `[x, y]`, `viewport_center` or `$cursor`. Default the middle of the\nvisible canvas. Not with `bounds`."},"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The exact box of the note instead of `at` and `size`. Both sides must be at least 75."},"color":{"anyOf":[{"$ref":"#/$defs/NoteColor"},{"type":"null"}],"description":"Paper colour: yellow (default), pink, green, blue or orange."},"edit":{"description":"Start typing into the note right away (as `text.edit_begin`). Default false.","type":"boolean"},"font_size":{"description":"The largest label font size, 16 to 512. Default 28. The text gets the largest size at or below this that fits.","format":"double","type":["number","null"]},"frame":{"$ref":"#/$defs/FrameArg","description":"`\"auto\"` (default): join the frame under the note's centre. An id or `@name`: join that frame. `null`: no frame."},"from_tool":{"description":"Passed by the sticky tool: afterwards the tool returns to select unless the tool is locked.","type":"boolean"},"id":{"description":"The id of the new note. Default: a fresh id.","type":["string","null"]},"name":{"description":"A unique name, so that agents can address the note as `@name`.","type":["string","null"]},"select":{"description":"Select the new note (default true).","type":"boolean"},"size":{"description":"Side of the square note in world units, 75 or more. Default 250. Not with `bounds`.","format":"double","type":["number","null"]},"text":{"description":"The text of the note. Blank or absent makes an empty note; type into it later with `text.edit_begin`.","type":["string","null"]}},"title":"StickyArgs","type":"object"},"output":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `element.create_sticky` made.","properties":{"bounds":{"$ref":"#/$defs/RectArg","description":"Its box after the label fitted (a note grows when the text cannot fit at the smallest size)."},"font_size":{"description":"The label font size the fit chose.","format":"double","type":["number","null"]},"frame":{"description":"The frame it joined.","type":["string","null"]},"id":{"description":"The id of the note.","type":"string"},"label":{"description":"The id of its label, when it has text.","type":["string","null"]}},"required":["id","bounds"],"title":"StickyOut","type":"object"}},"element.delete":{"args":{"$defs":{"FrameChildren":{"description":"What happens to the children of a deleted frame.","oneOf":[{"const":"delete","description":"Delete them with the frame.","type":"string"},{"const":"release","description":"Keep them and clear their frame.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.delete`.","properties":{"frame_children":{"$ref":"#/$defs/FrameChildren","default":"delete","description":"What to do with the children of a deleted frame: `delete` (default) or `release`."},"ids":{"default":null,"description":"Elements to delete. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"DeleteArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.delete`.","properties":{"arrows":{"description":"Arrows that lost a target and became unbound at that end.","items":{"type":"string"},"type":"array"},"released":{"description":"Frame children that were kept and released.","items":{"type":"string"},"type":"array"}},"required":["released","arrows"],"title":"DeleteOut","type":"object"}},"element.duplicate":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.duplicate`.","properties":{"dx":{"default":20.0,"description":"Offset of the copies, x.","format":"double","type":"number"},"dy":{"default":20.0,"description":"Offset of the copies, y.","format":"double","type":"number"},"ids":{"default":null,"description":"Elements to copy. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"select":{"default":true,"description":"Select the copies afterwards.","type":"boolean"}},"title":"DuplicateArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.duplicate`.","properties":{"ids":{"description":"The copies of the given elements, in z-order.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"DuplicateOut","type":"object"}},"element.erase":{"args":{"$defs":{"RadiusUnits":{"description":"The unit of the eraser radius.","oneOf":[{"const":"screen","description":"Screen pixels, converted with the current zoom.","type":"string"},{"const":"world","description":"World units.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.erase`.","properties":{"path":{"description":"The path of the eraser in world coordinates, 1 point or more.","items":{"items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"radius":{"default":10.0,"description":"The radius of the eraser. Default 10.","format":"double","type":"number"},"units":{"$ref":"#/$defs/RadiusUnits","default":"screen","description":"`screen` (default) or `world`."}},"required":["path"],"title":"EraseArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.erase`.","properties":{"hit":{"description":"The elements that were hit and deleted (with their bound text and frame children in `deleted`).","items":{"type":"string"},"type":"array"}},"required":["hit"],"title":"EraseOut","type":"object"}},"element.flip":{"args":{"$defs":{"AxisArg":{"description":"The axis of a flip.","oneOf":[{"const":"horizontal","description":"Mirror left to right.","type":"string"},{"const":"vertical","description":"Mirror top to bottom.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.flip`.","properties":{"axis":{"$ref":"#/$defs/AxisArg","description":"`horizontal` or `vertical`."},"ids":{"default":null,"description":"Elements to mirror. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"required":["axis"],"title":"FlipArgs","type":"object"},"output":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.flip`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The common bounds after the flip."}},"title":"FlipOut","type":"object"}},"element.lock":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.lock`.","properties":{"ids":{"default":null,"description":"Elements. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"locked":{"default":null,"description":"`true` locks, `false` unlocks. Absent toggles: unlock when all are locked, else lock.","type":["boolean","null"]}},"title":"LockArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.lock`.","properties":{"changed":{"description":"False when everything was already in that state.","type":"boolean"},"ids":{"description":"Elements whose state changed: whole groups, bound text included.","items":{"type":"string"},"type":"array"},"locked":{"description":"The state the elements have now.","type":"boolean"}},"required":["locked","ids","changed"],"title":"LockOut","type":"object"}},"element.move":{"args":{"$defs":{"FrameRule":{"description":"Whether a dragged element lands in a frame under the pointer.","oneOf":[{"const":"auto","description":"On the committed run, dropped elements join the frame under the pointer and dragged-out elements leave.","type":"string"},{"const":"keep","description":"Frame membership is left as it is.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Snap":{"anyOf":[{"$ref":"#/$defs/SnapWord","description":"`\"auto\"` or `\"none\"`."},{"$ref":"#/$defs/SnapSwitches","description":"`{grid?, smart?, angle?}`."}],"description":"`auto`, `none`, or switches."},"SnapSwitches":{"additionalProperties":false,"description":"Snap switches; a missing key follows its setting.","properties":{"angle":{"default":null,"description":"Lock the direction to a multiple of the angle step (`snap.angle_step`, 15 degrees). Used by commands\nthat have a direction.","type":["boolean","null"]},"grid":{"default":null,"description":"Snap to the 20 unit grid.","type":["boolean","null"]},"smart":{"default":null,"description":"Smart guides: snap to the edges and centres of other elements, and to equal spacing.","type":["boolean","null"]}},"type":"object"},"SnapWord":{"description":"The words `snap` accepts.","oneOf":[{"const":"auto","description":"Follow the settings `snap.grid`, `snap.smart_guides` and `snap.angle`.","type":"string"},{"const":"none","description":"No snapping.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.move`.","properties":{"duplicate":{"default":false,"description":"Move copies and leave the originals (Alt-drag). The copies become the selection.","type":"boolean"},"dx":{"default":0.0,"description":"Total displacement since the start, x (world units).","format":"double","type":"number"},"dy":{"default":0.0,"description":"Total displacement since the start, y (world units).","format":"double","type":"number"},"frame":{"$ref":"#/$defs/FrameRule","default":"auto","description":"`auto` (default) updates frame membership on the committed run, `keep` leaves it."},"ids":{"default":null,"description":"Elements to move. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"pointer":{"default":null,"description":"World position of the pointer; frame hit-testing uses it. Default: the centre of the moved bounds.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"snap":{"$ref":"#/$defs/Snap","default":"auto","description":"Snapping: `auto` (follow the settings), `none`, or `{grid?, smart?}`."}},"title":"MoveArgs","type":"object"},"output":{"$defs":{"GuideOut":{"description":"A guide line for the overlay.","properties":{"end":{"description":"End along the guide.","format":"double","type":"number"},"gap":{"description":"The empty stretch along the guide between the dragged thing and the box it lines up with, as `[from, to]`.\nThe overlay shows its length. Absent when they overlap along the guide.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"kind":{"description":"`vertical`, `horizontal`, `equal_spacing_h` or `equal_spacing_v`.","type":"string"},"position":{"description":"x of a vertical guide, y of a horizontal one.","format":"double","type":"number"},"snap_points":{"description":"Marker coordinates along the guide.","items":{"format":"double","type":"number"},"type":"array"},"start":{"description":"Start along the guide.","format":"double","type":"number"}},"required":["kind","position","start","end","snap_points"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.move`.","properties":{"dx":{"description":"The displacement after snapping, x.","format":"double","type":"number"},"dy":{"description":"The displacement after snapping, y.","format":"double","type":"number"},"frame_highlight":{"description":"The frame under the pointer, when the moved elements would join it.","type":["string","null"]},"guides":{"description":"Smart guides to draw.","items":{"$ref":"#/$defs/GuideOut"},"type":"array"},"ids":{"description":"The copies, when `duplicate` is true.","items":{"type":"string"},"type":"array"}},"required":["dx","dy","guides","ids"],"title":"MoveOut","type":"object"}},"element.nudge":{"args":{"$defs":{"Dir":{"description":"A direction of the arrow keys.","oneOf":[{"const":"left","description":"Towards smaller x.","type":"string"},{"const":"right","description":"Towards larger x.","type":"string"},{"const":"up","description":"Towards smaller y.","type":"string"},{"const":"down","description":"Towards larger y.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.nudge`.","properties":{"dir":{"$ref":"#/$defs/Dir","description":"The direction."},"fine":{"default":false,"description":"Move by 1 unit (Shift+arrow).","type":"boolean"},"ids":{"default":null,"description":"Elements to move. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"step":{"default":null,"description":"Distance in world units. Default: the setting `input.nudge_step` (20).","format":"double","type":["number","null"]}},"required":["dir"],"title":"NudgeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.nudge`.","properties":{"dx":{"description":"The displacement applied, x.","format":"double","type":"number"},"dy":{"description":"The displacement applied, y.","format":"double","type":"number"}},"required":["dx","dy"],"title":"NudgeOut","type":"object"}},"element.open_link":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.open_link`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The element: an id or `@name`. Default: the single selected element."}},"title":"OpenLinkArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.open_link`.","properties":{"changed":{"description":"True when the selection or the view changed.","type":"boolean"},"id":{"description":"The element that holds the link.","type":"string"},"kind":{"description":"`url` (the shell opens `url`) or `element` (the view moved to `target`).","type":"string"},"target":{"description":"The element the link points to, for `kind: element`.","type":["string","null"]},"url":{"description":"The web address to open, for `kind: url`.","type":["string","null"]}},"required":["id","kind","changed"],"title":"OpenLinkOut","type":"object"}},"element.query":{"args":{"$defs":{"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"Field":{"description":"A field of `element.query` output.","oneOf":[{"const":"id","description":"The id.","type":"string"},{"const":"kind","description":"The kind.","type":"string"},{"const":"name","description":"The name.","type":"string"},{"const":"text","description":"The text, label or LaTeX.","type":"string"},{"const":"bounds","description":"The bounds as `{x, y, w, h}`.","type":"string"},{"const":"style","description":"The full style.","type":"string"},{"const":"angle","description":"The angle in degrees.","type":"string"},{"const":"group_ids","description":"The groups, innermost first.","type":"string"},{"const":"frame","description":"The frame.","type":"string"},{"const":"bindings","description":"Arrow bindings `{start, end}`.","type":"string"},{"const":"bound_text","description":"The id of the bound label.","type":"string"},{"const":"locked","description":"Locked.","type":"string"},{"const":"link","description":"The hyperlink or element link (`null` when none).","type":"string"},{"const":"z","description":"The z-order key.","type":"string"},{"const":"points","description":"The points of a line or arrow in world coordinates, `[[x, y], ...]`; `null` for other kinds.","type":"string"},{"const":"runs","description":"The style runs of a text: `[{start, end, color?, bold?, italic?}, ...]` in characters; `null` for other kinds.","type":"string"}]},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"LinkDirection":{"description":"Which arrows count as a connection.","oneOf":[{"const":"in","description":"Arrows that end at the element, and the elements they start at.","type":"string"},{"const":"out","description":"Arrows that start at the element, and the elements they end at.","type":"string"},{"const":"any","description":"Both (the default).","type":"string"}]},"OneOrMany":{"anyOf":[{"$ref":"#/$defs/Kind","description":"One value."},{"description":"A list.","items":{"$ref":"#/$defs/Kind"},"type":"array"}],"description":"One value or a list of values."},"Order":{"description":"Order of the result.","oneOf":[{"const":"z","description":"Back to front (the default).","type":"string"},{"const":"reading","description":"Top to bottom, then left to right, by the top-left corner of the bounds.","type":"string"},{"const":"position","description":"Left to right, then top to bottom.","type":"string"}]},"RectSpec":{"additionalProperties":false,"description":"A rectangle as `{x, y, w, h}`.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left.","format":"double","type":"number"},"y":{"description":"Top.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"RefConnectedTo":{"additionalProperties":false,"description":"Arrows bound to an element, and the elements on their other end. The element is an id or `@name`.","properties":{"direction":{"$ref":"#/$defs/LinkDirection","default":"any","description":"The direction of the arrows."},"ref":{"description":"The element: an id or `@name`.","type":"string"}},"required":["ref"],"type":"object"},"RefQuery":{"additionalProperties":false,"description":"The filter of `element.query` with elements given as ids or `@name`. Every given field must match (AND).","properties":{"bound_text_of":{"default":null,"description":"The label of this container (an id or `@name`).","type":["string","null"]},"connected_to":{"anyOf":[{"$ref":"#/$defs/RefConnectedTo"},{"type":"null"}],"default":null,"description":"Connected by arrows to this element."},"frame":{"default":null,"description":"Children of this frame (an id or `@name`).","type":["string","null"]},"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"Members of this group."},"has_label":{"default":null,"description":"Has a bound label or not.","type":["boolean","null"]},"ids":{"default":null,"description":"Only these elements (ids or `@name`).","items":{"type":"string"},"type":["array","null"]},"kind":{"anyOf":[{"$ref":"#/$defs/OneOrMany"},{"type":"null"}],"default":null,"description":"One kind or a list of kinds."},"locked":{"default":null,"description":"Locked or not.","type":["boolean","null"]},"name":{"default":null,"description":"The element name, as a glob (`*` any run, `?` one character). Case-sensitive.","type":["string","null"]},"region":{"anyOf":[{"$ref":"#/$defs/RegionFilter"},{"type":"null"}],"default":null,"description":"A region of the canvas."},"selected":{"default":null,"description":"In the selection or not.","type":["boolean","null"]},"style":{"anyOf":[{"$ref":"#/$defs/StyleFilter"},{"type":"null"}],"default":null,"description":"Style values."},"text":{"anyOf":[{"$ref":"#/$defs/TextFilter"},{"type":"null"}],"default":null,"description":"Text, labels and LaTeX that match."}},"type":"object"},"RegionFilter":{"additionalProperties":false,"description":"Elements in a region of the canvas, by their (rotated) bounding boxes.","properties":{"mode":{"$ref":"#/$defs/RegionMode","default":"overlap","description":"How the element relates to it."},"rect":{"$ref":"#/$defs/RectSpec","description":"The region."}},"required":["rect"],"type":"object"},"RegionMode":{"description":"How an element relates to the region.","oneOf":[{"const":"overlap","description":"The element's bounds touch the region (the default).","type":"string"},{"const":"contain","description":"The region contains the element completely.","type":"string"},{"const":"contained_by","description":"The element contains the region completely.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleFilter":{"additionalProperties":false,"description":"Exact style values to match. Only the properties that are given are compared.","properties":{"corner_radius":{"default":null,"description":"Corner radius.","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Fill colour. `\"transparent\"` matches elements without a fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"default":null,"description":"Fill pattern."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"default":null,"description":"Font family (text only)."},"font_size":{"default":null,"description":"Font size (text only).","format":"double","type":["number","null"]},"opacity":{"default":null,"description":"Opacity.","format":"double","type":["number","null"]},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"default":null,"description":"Sloppiness."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Stroke colour."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"default":null,"description":"Dash pattern."},"stroke_width":{"default":null,"description":"Stroke width.","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"default":null,"description":"Text alignment (text only)."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"TextFilter":{"anyOf":[{"description":"A word or phrase the text contains.","type":"string"},{"description":"Either or both: a phrase the text contains, and a regular expression it matches anywhere.","properties":{"contains":{"default":null,"description":"A phrase the text contains.","type":["string","null"]},"regex":{"default":null,"description":"A regular expression: literals, `.`, classes like `[a-z]`, `* + ?`, `^ $`, `|`, and `\\d \\w \\s`.","type":["string","null"]}},"type":"object"}],"description":"Text to look for in the text of elements, their labels and LaTeX. Case-insensitive."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.query`.","properties":{"fields":{"default":["id","kind","name","text","bounds"],"description":"What to say about each element. Default: id, kind, name, text, bounds.","items":{"$ref":"#/$defs/Field"},"type":"array"},"filter":{"anyOf":[{"$ref":"#/$defs/RefQuery"},{"type":"null"}],"default":null,"description":"Which elements to find. Every given field must match. Absent: every element. Elements are ids or `@name`."},"limit":{"default":100,"description":"Most elements to return, 1 to 1000.","format":"uint","minimum":0,"type":"integer"},"offset":{"default":0,"description":"Elements to skip, for paging.","format":"uint","minimum":0,"type":"integer"},"order":{"$ref":"#/$defs/Order","default":"z","description":"`z` back to front, `reading` top to bottom then left to right, `position` left to right then top to bottom."}},"title":"QueryArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.query`.","properties":{"items":{"description":"The requested page, one object per element with the requested fields.","items":true,"type":"array"},"total":{"description":"How many elements match the filter.","format":"uint","minimum":0,"type":"integer"},"truncated":{"description":"More matches exist after this page: call again with a larger `offset`.","type":"boolean"}},"required":["total","items","truncated"],"title":"QueryOut","type":"object"}},"element.relabel":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.relabel`.","properties":{"create":{"description":"Create a label when the shape or arrow has none (default true).","type":"boolean"},"id":{"$ref":"#/$defs/Ref","description":"A text element, or a rectangle, diamond, ellipse or arrow with or without a label: an id or `@name`."},"text":{"description":"The new text. Empty text removes the label of a shape or arrow, or a bound label given as `id`. A\nfree text element cannot be empty (`empty_text`).","type":"string"}},"required":["id","text"],"title":"RelabelArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"What `element.relabel` did.","properties":{"action":{"description":"`updated`, `created`, `removed` or `none` (there was no label and none was asked for).","type":"string"},"id":{"description":"The element that was given.","type":"string"},"label":{"description":"The label element after the change (absent after `removed` or `none`).","type":["string","null"]}},"required":["id","action"],"title":"RelabelOut","type":"object"}},"element.resize":{"args":{"$defs":{"Handle":{"description":"A handle of the selection box.","oneOf":[{"const":"nw","description":"Top-left corner.","type":"string"},{"const":"n","description":"Top edge.","type":"string"},{"const":"ne","description":"Top-right corner.","type":"string"},{"const":"e","description":"Right edge.","type":"string"},{"const":"se","description":"Bottom-right corner.","type":"string"},{"const":"s","description":"Bottom edge.","type":"string"},{"const":"sw","description":"Bottom-left corner.","type":"string"},{"const":"w","description":"Left edge.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Snap":{"anyOf":[{"$ref":"#/$defs/SnapWord","description":"`\"auto\"` or `\"none\"`."},{"$ref":"#/$defs/SnapSwitches","description":"`{grid?, smart?, angle?}`."}],"description":"`auto`, `none`, or switches."},"SnapSwitches":{"additionalProperties":false,"description":"Snap switches; a missing key follows its setting.","properties":{"angle":{"default":null,"description":"Lock the direction to a multiple of the angle step (`snap.angle_step`, 15 degrees). Used by commands\nthat have a direction.","type":["boolean","null"]},"grid":{"default":null,"description":"Snap to the 20 unit grid.","type":["boolean","null"]},"smart":{"default":null,"description":"Smart guides: snap to the edges and centres of other elements, and to equal spacing.","type":["boolean","null"]}},"type":"object"},"SnapWord":{"description":"The words `snap` accepts.","oneOf":[{"const":"auto","description":"Follow the settings `snap.grid`, `snap.smart_guides` and `snap.angle`.","type":"string"},{"const":"none","description":"No snapping.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.resize`.","properties":{"dx":{"description":"Total displacement of the handle since the start, x (world axes).","format":"double","type":"number"},"dy":{"description":"Total displacement of the handle since the start, y (world axes).","format":"double","type":"number"},"from_center":{"default":false,"description":"Scale about the centre instead of the opposite handle (Alt).","type":"boolean"},"handle":{"$ref":"#/$defs/Handle","default":"se","description":"The handle that is dragged. Default `se`."},"ids":{"default":null,"description":"Elements to resize. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"keep_aspect":{"default":false,"description":"Keep the width to height ratio. Forced for text, math and images, and for rotated or grouped elements.","type":"boolean"},"snap":{"$ref":"#/$defs/Snap","default":"auto","description":"Snapping of the dragged handle: `auto`, `none` or `{grid?, smart?}`."}},"required":["dx","dy"],"title":"ResizeArgs","type":"object"},"output":{"$defs":{"GuideOut":{"description":"A guide line for the overlay.","properties":{"end":{"description":"End along the guide.","format":"double","type":"number"},"gap":{"description":"The empty stretch along the guide between the dragged thing and the box it lines up with, as `[from, to]`.\nThe overlay shows its length. Absent when they overlap along the guide.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"kind":{"description":"`vertical`, `horizontal`, `equal_spacing_h` or `equal_spacing_v`.","type":"string"},"position":{"description":"x of a vertical guide, y of a horizontal one.","format":"double","type":"number"},"snap_points":{"description":"Marker coordinates along the guide.","items":{"format":"double","type":"number"},"type":"array"},"start":{"description":"Start along the guide.","format":"double","type":"number"}},"required":["kind","position","start","end","snap_points"],"type":"object"},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"SizeOut":{"description":"A width and a height.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"}},"required":["w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.resize` and `element.set_bounds`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The common bounds after the change."},"guides":{"description":"Smart guides to draw.","items":{"$ref":"#/$defs/GuideOut"},"type":"array"},"size_badge":{"anyOf":[{"$ref":"#/$defs/SizeOut"},{"type":"null"}],"description":"The new size, for the badge next to the pointer."}},"required":["guides"],"title":"ResizeOut","type":"object"}},"element.rotate":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"RotateModeArg":{"description":"Relative or absolute rotation.","oneOf":[{"const":"by","description":"Turn by `angle`.","type":"string"},{"const":"to","description":"Set the angle (exactly one element).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.rotate`.","properties":{"angle":{"description":"Degrees, clockwise.","format":"double","type":"number"},"ids":{"default":null,"description":"Elements to rotate. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"mode":{"$ref":"#/$defs/RotateModeArg","default":"by","description":"`by` (default) turns by the angle, `to` sets the angle of one element."},"snap_degrees":{"default":null,"description":"Round the turn (or the final angle) to a multiple of this many degrees. The UI passes 15 with Shift.","format":"double","type":["number","null"]}},"required":["angle"],"title":"RotateArgs","type":"object"},"output":{"$defs":{"AngleBadge":{"description":"The angle badge next to the rotate handle.","properties":{"center":{"description":"Where the rotation is about.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"degrees":{"description":"The angle shown, in degrees.","format":"double","type":"number"},"snapped":{"description":"The angle was rounded to `snap_degrees`.","type":"boolean"}},"required":["center","degrees","snapped"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.rotate`.","properties":{"angle":{"description":"One element: its angle now, in degrees from 0 to 360. Several: the turn that was applied.","format":"double","type":"number"},"angle_badge":{"anyOf":[{"$ref":"#/$defs/AngleBadge"},{"type":"null"}],"description":"For the overlay."}},"required":["angle"],"title":"RotateOut","type":"object"}},"element.set_bounds":{"args":{"$defs":{"Anchor":{"description":"What `x` and `y` of `element.set_bounds` refer to.","oneOf":[{"const":"top_left","description":"The top-left corner.","type":"string"},{"const":"center","description":"The centre.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.set_bounds`.","properties":{"anchor":{"$ref":"#/$defs/Anchor","default":"top_left","description":"Whether `x` and `y` name the top-left corner (default) or the centre."},"h":{"default":null,"description":"Height, above 0. Absent keeps it.","format":"double","type":["number","null"]},"ids":{"default":null,"description":"Elements. Default: the selection. One element gets exactly this box.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"keep_aspect":{"default":false,"description":"When only one of `w` and `h` is given, the other follows the current ratio.","type":"boolean"},"w":{"default":null,"description":"Width, above 0. Absent keeps it.","format":"double","type":["number","null"]},"x":{"default":null,"description":"Position x. Absent keeps it.","format":"double","type":["number","null"]},"y":{"default":null,"description":"Position y. Absent keeps it.","format":"double","type":["number","null"]}},"title":"SetBoundsArgs","type":"object"},"output":{"$defs":{"GuideOut":{"description":"A guide line for the overlay.","properties":{"end":{"description":"End along the guide.","format":"double","type":"number"},"gap":{"description":"The empty stretch along the guide between the dragged thing and the box it lines up with, as `[from, to]`.\nThe overlay shows its length. Absent when they overlap along the guide.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"kind":{"description":"`vertical`, `horizontal`, `equal_spacing_h` or `equal_spacing_v`.","type":"string"},"position":{"description":"x of a vertical guide, y of a horizontal one.","format":"double","type":"number"},"snap_points":{"description":"Marker coordinates along the guide.","items":{"format":"double","type":"number"},"type":"array"},"start":{"description":"Start along the guide.","format":"double","type":"number"}},"required":["kind","position","start","end","snap_points"],"type":"object"},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"SizeOut":{"description":"A width and a height.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"}},"required":["w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.resize` and `element.set_bounds`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The common bounds after the change."},"guides":{"description":"Smart guides to draw.","items":{"$ref":"#/$defs/GuideOut"},"type":"array"},"size_badge":{"anyOf":[{"$ref":"#/$defs/SizeOut"},{"type":"null"}],"description":"The new size, for the badge next to the pointer."}},"required":["guides"],"title":"ResizeOut","type":"object"}},"element.set_link":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.set_link`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The element: an id or `@name`. Default: the single selected element."},"link":{"default":null,"description":"A web address (`https://example.com`, `mailto:a@b.example`; a bare `example.com` gets `https://`), or an\nelement in this document (`#e3`, `@name`). `null`, absent or empty removes the link.","type":["string","null"]}},"title":"SetLinkArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.set_link`.","properties":{"changed":{"description":"False when the element already had this link.","type":"boolean"},"id":{"description":"The element.","type":"string"},"kind":{"description":"`url`, `element`, or `null` when removed.","type":["string","null"]},"link":{"description":"The link as stored (`#e3` for an element link), `null` when removed.","type":["string","null"]}},"required":["id","changed"],"title":"SetLinkOut","type":"object"}},"element.set_name":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.set_name`.","properties":{"id":{"$ref":"#/$defs/Ref","description":"The element: an id or `@name`."},"name":{"default":null,"description":"The new name (1 to 64 characters, not starting with `@` or `$`). `null` or absent clears the name.","type":["string","null"]}},"required":["id"],"title":"SetNameArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The name after `element.set_name`.","properties":{"id":{"description":"The element.","type":"string"},"name":{"description":"Its name now; absent when it has none.","type":["string","null"]}},"required":["id"],"title":"SetNameOut","type":"object"}},"element.unlock_all":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `element.unlock_all`.","properties":{"ids":{"default":null,"description":"Elements to unlock. Default: every locked element.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"select":{"default":true,"description":"Select the unlocked elements afterwards.","type":"boolean"}},"title":"UnlockAllArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `element.unlock_all`.","properties":{"ids":{"description":"Elements that were unlocked.","items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"UnlockOut","type":"object"}},"engine.commands":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `engine.commands`.","properties":{"available_only":{"default":false,"description":"Leave out commands that refuse right now.","type":"boolean"},"family":{"default":null,"description":"Only this family.","type":["string","null"]},"include_schemas":{"default":false,"description":"Include the argument and output JSON Schemas.","type":"boolean"},"search":{"default":null,"description":"Case-insensitive text to find in the id, title or summary.","type":["string","null"]}},"title":"CommandsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"engine.describe":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `engine.describe`.","properties":{"id":{"description":"The command id.","type":"string"}},"required":["id"],"title":"DescribeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"engine.recent":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `engine.recent`.","properties":{"limit":{"default":50,"description":"How many entries, 1 to 256.","format":"int64","type":"integer"},"mutating_only":{"default":false,"description":"Leave out read-only commands.","type":"boolean"},"since_seq":{"default":null,"description":"Only entries after this sequence number.","format":"uint64","minimum":0,"type":["integer","null"]}},"title":"RecentArgs","type":"object"},"output":{"$defs":{"Origin":{"description":"Who made the call. Recorded in the ring; never changes the result.","oneOf":[{"const":"ui","description":"A button, slider or other widget.","type":"string"},{"const":"shortcut","description":"A keyboard shortcut.","type":"string"},{"const":"menu","description":"A menu item.","type":"string"},{"const":"context_menu","description":"A context menu item.","type":"string"},{"const":"palette","description":"The command palette.","type":"string"},{"const":"script","description":"A script or the console (`window.drafftink`). The default.","type":"string"},{"const":"agent","description":"An agent through the bridge or MCP.","type":"string"},{"const":"remote","description":"Applied for a remote peer. Not recorded in the ring unless it fails.","type":"string"},{"const":"test","description":"A test.","type":"string"}]},"Outcome":{"anyOf":[{"description":"It ran.","properties":{"changed":{"description":"Whether it changed any state.","type":"boolean"},"ok":{"description":"Always true.","type":"boolean"},"undo_label":{"description":"The undo label when it pushed a step.","type":["string","null"]}},"required":["ok","changed"],"type":"object"},{"description":"It refused.","properties":{"code":{"description":"The refusal code.","type":"string"},"message":{"description":"The refusal text.","type":"string"},"ok":{"description":"Always false.","type":"boolean"}},"required":["ok","code","message"],"type":"object"}],"description":"What a call came to."},"RingEntry":{"description":"One recorded call.","properties":{"args":{"description":"The arguments as JSON text, cut to 512 bytes. Image bytes are replaced by their length.","type":"string"},"duration_us":{"description":"How long it took.","format":"uint64","minimum":0,"type":"integer"},"frames":{"description":"For a gesture: the number of frames.","format":"uint","minimum":0,"type":["integer","null"]},"id":{"description":"The command id (for a batch, `batch`).","type":"string"},"mutating":{"description":"False for read-only commands.","type":"boolean"},"outcome":{"$ref":"#/$defs/Outcome","description":"Success or refusal."},"seq":{"description":"Counts up from 1 over the life of the session.","format":"uint64","minimum":0,"type":"integer"},"source":{"$ref":"#/$defs/Origin","description":"Who called."},"steps":{"description":"For a batch: the number of steps.","format":"uint","minimum":0,"type":["integer","null"]},"t_ms":{"description":"Wall time in milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"}},"required":["seq","t_ms","id","args","source","outcome","duration_us","mutating"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `engine.recent`.","properties":{"capacity":{"description":"The ring's capacity.","format":"uint","minimum":0,"type":"integer"},"entries":{"description":"The newest entries, oldest first.","items":{"$ref":"#/$defs/RingEntry"},"type":"array"},"next_seq":{"description":"The sequence number the next entry will get.","format":"uint64","minimum":0,"type":"integer"}},"required":["entries","next_seq","capacity"],"title":"RecentOut","type":"object"}},"engine.state":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"frame.add":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.add`.","properties":{"frame":{"$ref":"#/$defs/Ref","description":"The frame that takes the elements."},"ids":{"default":null,"description":"Elements to add. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"required":["frame"],"title":"AddArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"SkippedOut":{"description":"An element that was left out of a frame, and why.","properties":{"id":{"$ref":"#/$defs/ElementId","description":"The element as given."},"reason":{"description":"`is_frame`, `group_contains_frame` or `arrow_not_attached`.","type":"string"}},"required":["id","reason"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.wrap` and `frame.add`.","properties":{"added":{"description":"Elements that are children of the frame now, bound text not listed.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"frame":{"$ref":"#/$defs/ElementId","description":"The frame (new for `frame.wrap`)."},"skipped":{"description":"Elements that were left out.","items":{"$ref":"#/$defs/SkippedOut"},"type":"array"}},"required":["frame","added","skipped"],"title":"AddOut","type":"object"}},"frame.remove":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.remove`.","properties":{"frame":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"Take out all children of this frame. With `ids` too, only those of `ids` that are its children."},"ids":{"default":null,"description":"Elements to take out of their frames. Default: the selection, or with `frame` all its children.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"RemoveArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.remove`.","properties":{"removed":{"description":"Elements that left their frame, bound text not listed.","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["removed"],"title":"RemoveOut","type":"object"}},"frame.rename":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.rename`.","properties":{"frame":{"$ref":"#/$defs/Ref","description":"The frame."},"name":{"default":null,"description":"The label (1 to 256 characters), or null to restore the default \"Frame\".","type":["string","null"]}},"required":["frame"],"title":"RenameArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.rename`.","properties":{"frame":{"$ref":"#/$defs/ElementId","description":"The frame."},"name":{"description":"The label now, `null` for the default.","type":["string","null"]}},"required":["frame"],"title":"RenameOut","type":"object"}},"frame.select_children":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.select_children`.","properties":{"frame":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"description":"The frame. Default: the selected frame."}},"title":"SelectChildrenArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.select_children`.","properties":{"frame":{"$ref":"#/$defs/ElementId","description":"The frame."},"selected":{"description":"The selected children (bound text is represented by its container).","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["frame","selected"],"title":"SelectChildrenOut","type":"object"}},"frame.unwrap":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.unwrap`.","properties":{"frame":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The frame. Default: the selected frame."}},"title":"UnwrapArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.unwrap`.","properties":{"children":{"description":"Its children, now free. They are selected.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"frame":{"$ref":"#/$defs/ElementId","description":"The frame that was deleted."}},"required":["frame","children"],"title":"UnwrapOut","type":"object"}},"frame.wrap":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `frame.wrap`.","properties":{"ids":{"default":null,"description":"Elements to wrap. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"name":{"default":null,"description":"The frame's label. Default: the frame is unnamed and shows \"Frame\".","type":["string","null"]},"padding":{"default":16.0,"description":"Space between the elements and the frame edge. Forced to 0 when an image is included.","format":"double","type":"number"}},"title":"WrapArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"SkippedOut":{"description":"An element that was left out of a frame, and why.","properties":{"id":{"$ref":"#/$defs/ElementId","description":"The element as given."},"reason":{"description":"`is_frame`, `group_contains_frame` or `arrow_not_attached`.","type":"string"}},"required":["id","reason"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `frame.wrap` and `frame.add`.","properties":{"added":{"description":"Elements that are children of the frame now, bound text not listed.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"frame":{"$ref":"#/$defs/ElementId","description":"The frame (new for `frame.wrap`)."},"skipped":{"description":"Elements that were left out.","items":{"$ref":"#/$defs/SkippedOut"},"type":"array"}},"required":["frame","added","skipped"],"title":"AddOut","type":"object"}},"gesture.begin":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `gesture.begin`.","properties":{"args":{"default":null,"description":"The command's arguments for the first frame."},"command":{"description":"The command to run as a gesture, for example `element.move`.","type":"string"}},"required":["command"],"title":"BeginArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"gesture.cancel":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `gesture.cancel`.","properties":{"gesture":{"default":null,"description":"The gesture to cancel. Default: the running one, if any.","type":["string","null"]}},"title":"CancelArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"gesture.end":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `gesture.end`.","properties":{"args":{"default":null,"description":"The final arguments. Default: the last frame's."},"gesture":{"default":null,"description":"The gesture to end. Default: the running one.","type":["string","null"]}},"title":"EndArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"gesture.update":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `gesture.update`.","properties":{"args":{"default":null,"description":"The full arguments of this frame, relative to the state at `begin` (absolute, never an increment)."},"gesture":{"description":"The gesture id returned by `gesture.begin`.","type":"string"}},"required":["gesture"],"title":"UpdateArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"group.create":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `group.create`.","properties":{"ids":{"default":null,"description":"Elements to group (a group among them counts as one). Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"CreateArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `group.create`.","properties":{"group":{"$ref":"#/$defs/GroupId","description":"The new group id."},"left_frames":{"description":"Members that were taken out of their frames because they came from different frames.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"members":{"description":"Its members in z-order (bound text not listed).","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["group","members","left_frames"],"title":"CreateOut","type":"object"}},"group.enter":{"args":{"$defs":{"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `group.enter`.","properties":{"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"The group to enter. Default: the single selected group."},"select":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"Select this element's unit inside the group (the double-click target). Default: keep the selection."}},"title":"EnterArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `group.enter`.","properties":{"editing_group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"description":"The group being edited now."},"selected":{"description":"The selected elements.","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["selected"],"title":"EnterOut","type":"object"}},"group.exit":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `group.enter`.","properties":{"editing_group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"description":"The group being edited now."},"selected":{"description":"The selected elements.","items":{"$ref":"#/$defs/ElementId"},"type":"array"}},"required":["selected"],"title":"EnterOut","type":"object"}},"group.set_name":{"args":{"$defs":{"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `group.set_name`.","properties":{"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"The group. Default: the single selected group."},"name":{"default":null,"description":"The new name (1 to 64 characters), or null to clear it. `doc.outline` shows it.","type":["string","null"]}},"title":"SetNameArgs","type":"object"},"output":{"$defs":{"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `group.set_name`.","properties":{"group":{"$ref":"#/$defs/GroupId","description":"The group that was named."},"name":{"description":"The name now, `null` when cleared.","type":["string","null"]}},"required":["group"],"title":"SetNameOut","type":"object"}},"group.ungroup":{"args":{"$defs":{"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `group.ungroup`.","properties":{"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"The group to dissolve. Default: the groups among `ids`."},"ids":{"default":null,"description":"Elements whose group (at the current level) is dissolved. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"title":"UngroupArgs","type":"object"},"output":{"$defs":{"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `group.ungroup`.","properties":{"members":{"description":"Their members in z-order (bound text not listed). They are selected afterwards.","items":{"$ref":"#/$defs/ElementId"},"type":"array"},"removed":{"description":"The groups that were dissolved.","items":{"$ref":"#/$defs/GroupId"},"type":"array"}},"required":["removed","members"],"title":"UngroupOut","type":"object"}},"highlight.apply":{"args":{"$defs":{"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"RangeArg":{"additionalProperties":false,"description":"A range of characters of one text.","properties":{"end":{"description":"One past the last character. Above `start`, and at most the number of characters of the text.","format":"uint32","minimum":0,"type":"integer"},"id":{"$ref":"#/$defs/Ref","description":"The text element, or a label (which is a text element). An id or `@name`."},"start":{"description":"First character, counted in Unicode characters (not bytes, not UTF-16 units) from 0.","format":"uint32","minimum":0,"type":"integer"}},"required":["id","start","end"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `highlight.apply`.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"default":null,"description":"The marker colour: `<family>-<shade>` with a palette family and any palette shade (`yellow-400`, `blue-100`), or\n`#rrggbb`; the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade. `null` (or absent) takes the highlight\noff."},"ids":{"default":null,"description":"Elements to highlight as a whole. A text named here is highlighted all over. Default: the selection when no\n`ranges` are given, and none when they are.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"ranges":{"default":[],"description":"Character ranges of texts to highlight. Several ranges, of one text or of many, are one step.","items":{"$ref":"#/$defs/RangeArg"},"type":"array"}},"title":"ApplyArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `highlight.apply`.","properties":{"changed":{"description":"False when everything already looked as asked.","type":"boolean"},"highlighted":{"description":"Elements and texts whose highlight changed.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Elements that cannot be highlighted (frames).","items":{"type":"string"},"type":"array"},"unchanged":{"description":"Elements and texts that already looked as asked.","items":{"type":"string"},"type":"array"}},"required":["changed","highlighted","unchanged","skipped"],"title":"ApplyOut","type":"object"}},"highlight.clear":{"args":{"$defs":{"RangeArg":{"additionalProperties":false,"description":"A range of characters of one text.","properties":{"end":{"description":"One past the last character. Above `start`, and at most the number of characters of the text.","format":"uint32","minimum":0,"type":"integer"},"id":{"$ref":"#/$defs/Ref","description":"The text element, or a label (which is a text element). An id or `@name`."},"start":{"description":"First character, counted in Unicode characters (not bytes, not UTF-16 units) from 0.","format":"uint32","minimum":0,"type":"integer"}},"required":["id","start","end"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `highlight.clear`.","properties":{"ids":{"default":null,"description":"Elements to take the highlight off, as a whole (the highlights of the characters of a text go too). Default:\nthe selection when no `ranges` are given, and none when they are.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"ranges":{"default":[],"description":"Character ranges of texts to take the highlight off.","items":{"$ref":"#/$defs/RangeArg"},"type":"array"}},"title":"ClearArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `highlight.apply`.","properties":{"changed":{"description":"False when everything already looked as asked.","type":"boolean"},"highlighted":{"description":"Elements and texts whose highlight changed.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Elements that cannot be highlighted (frames).","items":{"type":"string"},"type":"array"},"unchanged":{"description":"Elements and texts that already looked as asked.","items":{"type":"string"},"type":"array"}},"required":["changed","highlighted","unchanged","skipped"],"title":"ApplyOut","type":"object"}},"history.clear":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `history.clear`.","properties":{"changed":{"description":"True: there was history to drop.","type":"boolean"},"redo_dropped":{"description":"Redo steps dropped.","format":"uint","minimum":0,"type":"integer"},"undo_dropped":{"description":"Undo steps dropped.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","undo_dropped","redo_dropped"],"title":"ClearOut","type":"object"}},"history.redo":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `history.undo` and `history.redo`.","properties":{"steps":{"default":1,"description":"How many steps to take back (or re-apply), from 1 to the `history.depth` setting. Asking for more than\nexist takes all that exist.","format":"uint32","minimum":0,"type":"integer"}},"title":"StepsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `history.redo`.","properties":{"can_redo":{"description":"Another step can be re-applied.","type":"boolean"},"can_undo":{"description":"A step can be taken back.","type":"boolean"},"changed":{"description":"True: something was re-applied.","type":"boolean"},"redone":{"description":"Labels of the steps re-applied, oldest first.","items":{"type":"string"},"type":"array"}},"required":["changed","redone","can_undo","can_redo"],"title":"RedoOut","type":"object"}},"history.state":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `history.state`.","properties":{"can_redo":{"description":"A step can be re-applied.","type":"boolean"},"can_undo":{"description":"A step can be taken back.","type":"boolean"},"redo_depth":{"description":"Steps on the redo stack.","format":"uint","minimum":0,"type":"integer"},"redo_label":{"description":"Label of the step redo would re-apply.","type":["string","null"]},"undo_depth":{"description":"Steps on the undo stack.","format":"uint","minimum":0,"type":"integer"},"undo_label":{"description":"Label of the step undo would take back.","type":["string","null"]}},"required":["can_undo","can_redo","undo_depth","redo_depth"],"title":"StateOut","type":"object"}},"history.undo":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `history.undo` and `history.redo`.","properties":{"steps":{"default":1,"description":"How many steps to take back (or re-apply), from 1 to the `history.depth` setting. Asking for more than\nexist takes all that exist.","format":"uint32","minimum":0,"type":"integer"}},"title":"StepsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `history.undo`.","properties":{"can_redo":{"description":"A step can be re-applied.","type":"boolean"},"can_undo":{"description":"Another step can be taken back.","type":"boolean"},"changed":{"description":"True: something was taken back.","type":"boolean"},"undone":{"description":"Labels of the steps taken back, newest first.","items":{"type":"string"},"type":"array"}},"required":["changed","undone","can_undo","can_redo"],"title":"UndoOut","type":"object"}},"image.crop":{"args":{"$defs":{"ElementBox":{"description":"What a crop does to the element's box.","oneOf":[{"const":"follow_crop","description":"The picture keeps its scale and its place on the canvas, and the box becomes the cropped part: cropping\nshrinks the box, uncropping grows it (Excalidraw's rule).","type":"string"},{"const":"keep","description":"The box keeps its size and place, and the cropped part is stretched over it.","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.crop`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"default":null,"description":"Puts the box exactly here (world units, the unrotated box) and overrides `element_box`. The crop editor\nuses it to slide the picture under a window that stays where it is."},"crop":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"default":null,"description":"The part of the picture to show, in pixels of the stored picture: `{x, y, w, h}` from the top-left corner\n(the size of the picture is `natural_width` by `natural_height`, see `element.query`). `null` or absent\nshows the whole picture. A crop that covers the whole picture is the same as `null`."},"element_box":{"$ref":"#/$defs/ElementBox","default":"follow_crop","description":"What happens to the box: `follow_crop` (default) shrinks or grows it around the cropped part so the pixels\nkeep their scale and place; `keep` leaves it and stretches the crop over it."},"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element."}},"title":"CropArgs","type":"object"},"output":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.crop` and `image.reset_crop`.","properties":{"bounds":{"$ref":"#/$defs/RectArg","description":"The unrotated box of the image in world units after the change."},"changed":{"description":"False when the image already looked like this and nothing was written.","type":"boolean"},"crop":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The crop now shown, in pixels of the picture; null when the whole picture is shown."},"id":{"description":"The image.","type":"string"},"natural_height":{"description":"Height of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"},"natural_width":{"description":"Width of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"}},"required":["id","bounds","natural_width","natural_height","changed"],"title":"CropOut","type":"object"}},"image.crop_begin":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.crop_begin`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element. It becomes the selection."}},"title":"CropBeginArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.crop_begin` and `image.crop_end`.","properties":{"changed":{"description":"False when the editor was in this state already.","type":"boolean"},"id":{"description":"The image whose crop is being edited now; null when the editor is closed.","type":["string","null"]}},"required":["changed"],"title":"CropEditorOut","type":"object"}},"image.crop_end":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.crop_end`.","title":"CropEndArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.crop_begin` and `image.crop_end`.","properties":{"changed":{"description":"False when the editor was in this state already.","type":"boolean"},"id":{"description":"The image whose crop is being edited now; null when the editor is closed.","type":["string","null"]}},"required":["changed"],"title":"CropEditorOut","type":"object"}},"image.insert":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/AtWord","description":"A word."},{"description":"A world point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where the middle of what is inserted goes."},"AtWord":{"description":"The words `at` accepts besides a point.","oneOf":[{"const":"viewport_center","description":"The middle of the visible canvas.","type":"string"},{"const":"$cursor","description":"The pointer position. A shell replaces this word with a point; if it is left in, the middle of the visible\ncanvas is used (the pointer is outside the canvas).","type":"string"}]},"Bytes":{"anyOf":[{"$ref":"#/$defs/InlineBytes","description":"`{base64, name?, mime?}`."},{"$ref":"#/$defs/PathBytes","description":"`{path}`."}],"description":"Bytes: inline as base64, or a path."},"InlineBytes":{"additionalProperties":false,"description":"Bytes given inline.","properties":{"base64":{"description":"The bytes as base64 (standard alphabet, padding optional). A `data:...;base64,` prefix is accepted.","type":"string"},"mime":{"description":"The media type the sender claims. It is not trusted: the content decides.","type":["string","null"]},"name":{"description":"The file name, used in messages.","type":["string","null"]}},"required":["base64"],"type":"object"},"PathBytes":{"additionalProperties":false,"description":"Bytes read from a file through the `Files` port.","properties":{"path":{"description":"A path the session's file access can read.","type":"string"}},"required":["path"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.insert`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"Where the middle of the first picture goes, in world units. Default: the middle of the visible canvas."},"downscale":{"default":true,"description":"Store a picture over 2 MiB and 2048 px on the long side scaled down to 2048 px.","type":"boolean"},"fit":{"default":800.0,"description":"The longest side a picture is shown at. A larger picture is scaled down to this; a smaller one keeps its\nsize.","format":"double","type":"number"},"images":{"description":"The pictures: 1 to 20, each `{base64, name?, mime?}` or `{path}`. PNG, JPEG, WebP, GIF, BMP, ICO or SVG, at most 25 MiB each (an SVG is drawn into a PNG, without its text).","items":{"$ref":"#/$defs/Bytes"},"type":"array"},"name":{"description":"A name for messages about pictures that carry no `name` of their own.","type":["string","null"]},"offset":{"default":20.0,"description":"Each further picture is moved by this many units right and down, so a batch does not stack.","format":"double","type":"number"},"select":{"default":true,"description":"Select the new elements.","type":"boolean"},"shrink":{"default":false,"description":"In a shared (encrypted) room a picture can be at most 4 MB. With `shrink` a larger picture is stored as a\nsmaller copy (scaled down, a JPEG unless it has transparency) and the output says `shrunk`; without it\nthe picture is refused with `image_too_large`. Outside a room it changes nothing.","type":"boolean"}},"required":["images"],"title":"InsertArgs","type":"object"},"output":{"$defs":{"Inserted":{"description":"One inserted picture.","properties":{"file_id":{"description":"The content hash under which the bytes are stored in the document.","type":"string"},"height":{"description":"Height of the element in world units.","format":"double","type":"number"},"id":{"description":"The element.","type":"string"},"natural_height":{"description":"Height of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"},"natural_width":{"description":"Width of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"},"reused":{"description":"True when the document already held these bytes, so nothing new was stored.","type":"boolean"},"shrunk":{"description":"True when the picture was big and was stored smaller.","type":"boolean"},"width":{"description":"Width of the element in world units.","format":"double","type":"number"}},"required":["id","file_id","width","height","natural_width","natural_height","reused","shrunk"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `image.insert`.","properties":{"ids":{"description":"The new elements, in order.","items":{"type":"string"},"type":"array"},"images":{"description":"One entry per picture.","items":{"$ref":"#/$defs/Inserted"},"type":"array"}},"required":["ids","images"],"title":"InsertOut","type":"object"}},"image.paint":{"args":{"$defs":{"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"PaintMode":{"description":"What a stroke does to the picture.","oneOf":[{"const":"paint","description":"Lays the colour over the picture.","type":"string"},{"const":"erase","description":"Gives the original pixels back where the brush passes (removes paint made before it).","type":"string"}]},"PaintStrokeArg":{"additionalProperties":false,"description":"One brush stroke of `image.paint`. Coordinates and sizes are in pixels of the stored picture.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"The colour: `#rrggbb`, `#rrggbbaa` or a palette name such as `red-600`. Its alpha multiplies `opacity`.\nAn erase stroke ignores it. Default: the colour of the session brush."},"hardness":{"description":"1 is a hard edge, towards 0 the edge fades over more of the radius. Default: the session brush.","format":"double","type":["number","null"]},"mode":{"anyOf":[{"$ref":"#/$defs/PaintMode"},{"type":"null"}],"description":"`paint` lays the colour over the picture; `erase` gives the original pixels back where the brush passes.\nDefault: the mode of the session brush (`image.paint_brush`)."},"opacity":{"description":"How much of the picture the stroke covers, 0 (nothing) to 1 (all). The whole stroke has this opacity, so\nwhere it crosses itself it does not get darker. Default: the session brush.","format":"double","type":["number","null"]},"points":{"description":"Where the brush went, in pixels of the stored picture from its top-left corner (`natural_width` by\n`natural_height` of `element.query`). 1 to 10000 points; a single point is a dab.","items":{"items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"pressures":{"description":"Pen pressure per point, 0 to 1: none, or one per point. The brush is narrower where the pressure is low.","items":{"format":"double","type":"number"},"type":"array"},"size":{"description":"The brush diameter at full pressure, 0.5 to 4096 picture pixels. Default: the size of the session brush\n(until a size is set, 1.5 % of the picture's longer side, from 4 to 200).","format":"double","type":["number","null"]}},"required":["points"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.paint`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element."},"strokes":{"default":[],"description":"The strokes to add, 1 to 64, applied in this order after the strokes the picture has.","items":{"$ref":"#/$defs/PaintStrokeArg"},"type":"array"}},"title":"PaintArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.paint`.","properties":{"added":{"description":"The ids of the strokes this call added, in order.","items":{"type":"string"},"type":"array"},"changed":{"description":"True when the document changed.","type":"boolean"},"id":{"description":"The image.","type":"string"},"strokes":{"description":"How many strokes the image carries now.","format":"uint","minimum":0,"type":"integer"}},"required":["id","strokes","added","changed"],"title":"PaintOut","type":"object"}},"image.paint_begin":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.paint_begin`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element. It becomes the selection."}},"title":"PaintBeginArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.paint_begin` and `image.paint_end`.","properties":{"changed":{"description":"False when the editor was in this state already.","type":"boolean"},"id":{"description":"The image that is being painted on now; null when the editor is closed.","type":["string","null"]}},"required":["changed"],"title":"PaintEditorOut","type":"object"}},"image.paint_brush":{"args":{"$defs":{"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"PaintMode":{"description":"What a stroke does to the picture.","oneOf":[{"const":"paint","description":"Lays the colour over the picture.","type":"string"},{"const":"erase","description":"Gives the original pixels back where the brush passes (removes paint made before it).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.paint_brush`.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"default":null,"description":"The colour: `#rrggbb`, `#rrggbbaa` or a palette name such as `red-600`."},"hardness":{"default":null,"description":"1 is a hard edge, 0 the softest.","format":"double","type":["number","null"]},"mode":{"anyOf":[{"$ref":"#/$defs/PaintMode"},{"type":"null"}],"default":null,"description":"`paint` or `erase`."},"opacity":{"default":null,"description":"0 (clear) to 1 (solid).","format":"double","type":["number","null"]},"size":{"default":null,"description":"The diameter at full pressure, 0.5 to 4096 picture pixels. Once set it stays, whatever the picture.","format":"double","type":["number","null"]}},"title":"PaintBrushArgs","type":"object"},"output":{"$defs":{"PaintMode":{"description":"What a stroke does to the picture.","oneOf":[{"const":"paint","description":"Lays the colour over the picture.","type":"string"},{"const":"erase","description":"Gives the original pixels back where the brush passes (removes paint made before it).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The session brush, as `image.paint_brush` reports it.","properties":{"color":{"description":"The colour as `#rrggbb` (or `#rrggbbaa`).","type":"string"},"hardness":{"description":"1 is a hard edge, 0 the softest.","format":"double","type":"number"},"mode":{"$ref":"#/$defs/PaintMode","description":"`paint` or `erase`."},"opacity":{"description":"0 (clear) to 1 (solid).","format":"double","type":"number"},"size":{"description":"The diameter at full pressure in picture pixels. Until a size is set it is the default of the last picture\nthe paint editor opened on.","format":"double","type":"number"}},"required":["color","size","hardness","opacity","mode"],"title":"PaintBrushOut","type":"object"}},"image.paint_end":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.paint_end`.","title":"PaintEndArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.paint_begin` and `image.paint_end`.","properties":{"changed":{"description":"False when the editor was in this state already.","type":"boolean"},"id":{"description":"The image that is being painted on now; null when the editor is closed.","type":["string","null"]}},"required":["changed"],"title":"PaintEditorOut","type":"object"}},"image.reset_crop":{"args":{"$defs":{"ElementBox":{"description":"What a crop does to the element's box.","oneOf":[{"const":"follow_crop","description":"The picture keeps its scale and its place on the canvas, and the box becomes the cropped part: cropping\nshrinks the box, uncropping grows it (Excalidraw's rule).","type":"string"},{"const":"keep","description":"The box keeps its size and place, and the cropped part is stretched over it.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.reset_crop`.","properties":{"element_box":{"$ref":"#/$defs/ElementBox","default":"follow_crop","description":"What happens to the box, as for `image.crop`: `follow_crop` (default) grows it back to the whole picture\nat the scale it has, `keep` leaves it and shows the whole picture in it."},"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element."}},"title":"ResetCropArgs","type":"object"},"output":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.crop` and `image.reset_crop`.","properties":{"bounds":{"$ref":"#/$defs/RectArg","description":"The unrotated box of the image in world units after the change."},"changed":{"description":"False when the image already looked like this and nothing was written.","type":"boolean"},"crop":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"description":"The crop now shown, in pixels of the picture; null when the whole picture is shown."},"id":{"description":"The image.","type":"string"},"natural_height":{"description":"Height of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"},"natural_width":{"description":"Width of the stored picture in pixels.","format":"uint32","minimum":0,"type":"integer"}},"required":["id","bounds","natural_width","natural_height","changed"],"title":"CropOut","type":"object"}},"image.reset_paint":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `image.reset_paint`.","properties":{"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The image: an id or `@name`. Default: the single selected element."}},"title":"ResetPaintArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `image.reset_paint`.","properties":{"id":{"description":"The image.","type":"string"},"removed":{"description":"How many strokes were taken off.","format":"uint","minimum":0,"type":"integer"}},"required":["id","removed"],"title":"ResetPaintOut","type":"object"}},"layout.apply":{"args":{"$defs":{"Anchor":{"description":"Where the laid-out set ends up.","oneOf":[{"const":"keep","description":"The top-left corner of the set's bounds stays where it was. The default.","type":"string"},{"const":"top_left","description":"The top-left corner of the result goes to `at`. Without `at` this is the same as `keep`.","type":"string"},{"const":"center","description":"The centre of the set's bounds stays where it was.","type":"string"}]},"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"ConnectedTo":{"additionalProperties":false,"description":"Arrows bound to an element, and the elements on their other end.","properties":{"direction":{"$ref":"#/$defs/LinkDirection","default":"any","description":"The direction of the arrows."},"ref":{"$ref":"#/$defs/ElementId","description":"The element."}},"required":["ref"],"type":"object"},"Direction":{"description":"The direction layers grow in (layered and tree layouts).","oneOf":[{"const":"down","description":"Top to bottom (Mermaid `TB` or `TD`).","type":"string"},{"const":"right","description":"Left to right (Mermaid `LR`).","type":"string"},{"const":"up","description":"Bottom to top (Mermaid `BT`).","type":"string"},{"const":"left","description":"Right to left (Mermaid `RL`).","type":"string"}]},"ElementId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"LayoutAlgorithm":{"description":"The algorithms `layout.apply` runs (`none` would keep everything where it is).","oneOf":[{"const":"layered","description":"Layers of nodes with few crossings; handles cycles. The default.","type":"string"},{"const":"tree","description":"A forest: every node has at most one incoming edge and there is no cycle.","type":"string"},{"const":"grid","description":"Rows and columns in node order.","type":"string"},{"const":"force","description":"Force-directed placement.","type":"string"}]},"LinkDirection":{"description":"Which arrows count as a connection.","oneOf":[{"const":"in","description":"Arrows that end at the element, and the elements they start at.","type":"string"},{"const":"out","description":"Arrows that start at the element, and the elements they end at.","type":"string"},{"const":"any","description":"Both (the default).","type":"string"}]},"OneOrMany":{"anyOf":[{"$ref":"#/$defs/Kind","description":"One value."},{"description":"A list.","items":{"$ref":"#/$defs/Kind"},"type":"array"}],"description":"One value or a list of values."},"Query":{"additionalProperties":false,"description":"The filter of `element.query`. Every given field must match (AND).\n\nLabels that are bound to a shape follow their container: they are left out of the result unless the filter asks\nfor kind `text`, names `ids`, or sets `bound_text_of`.","properties":{"bound_text_of":{"anyOf":[{"$ref":"#/$defs/ElementId"},{"type":"null"}],"default":null,"description":"The label of this container."},"connected_to":{"anyOf":[{"$ref":"#/$defs/ConnectedTo"},{"type":"null"}],"default":null,"description":"Connected by arrows to this element."},"frame":{"anyOf":[{"$ref":"#/$defs/ElementId"},{"type":"null"}],"default":null,"description":"Children of this frame."},"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"Members of this group."},"has_label":{"default":null,"description":"Has a bound label or not.","type":["boolean","null"]},"ids":{"default":null,"description":"Only these elements.","items":{"$ref":"#/$defs/ElementId"},"type":["array","null"]},"kind":{"anyOf":[{"$ref":"#/$defs/OneOrMany"},{"type":"null"}],"default":null,"description":"One kind or a list of kinds."},"locked":{"default":null,"description":"Locked or not.","type":["boolean","null"]},"name":{"default":null,"description":"The element name, as a glob (`*` any run, `?` one character). Case-sensitive.","type":["string","null"]},"region":{"anyOf":[{"$ref":"#/$defs/RegionFilter"},{"type":"null"}],"default":null,"description":"A region of the canvas."},"selected":{"default":null,"description":"In the selection or not.","type":["boolean","null"]},"style":{"anyOf":[{"$ref":"#/$defs/StyleFilter"},{"type":"null"}],"default":null,"description":"Style values."},"text":{"anyOf":[{"$ref":"#/$defs/TextFilter"},{"type":"null"}],"default":null,"description":"Text, labels and LaTeX that match."}},"type":"object"},"RectSpec":{"additionalProperties":false,"description":"A rectangle as `{x, y, w, h}`.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left.","format":"double","type":"number"},"y":{"description":"Top.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"RegionFilter":{"additionalProperties":false,"description":"Elements in a region of the canvas, by their (rotated) bounding boxes.","properties":{"mode":{"$ref":"#/$defs/RegionMode","default":"overlap","description":"How the element relates to it."},"rect":{"$ref":"#/$defs/RectSpec","description":"The region."}},"required":["rect"],"type":"object"},"RegionMode":{"description":"How an element relates to the region.","oneOf":[{"const":"overlap","description":"The element's bounds touch the region (the default).","type":"string"},{"const":"contain","description":"The region contains the element completely.","type":"string"},{"const":"contained_by","description":"The element contains the region completely.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleFilter":{"additionalProperties":false,"description":"Exact style values to match. Only the properties that are given are compared.","properties":{"corner_radius":{"default":null,"description":"Corner radius.","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Fill colour. `\"transparent\"` matches elements without a fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"default":null,"description":"Fill pattern."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"default":null,"description":"Font family (text only)."},"font_size":{"default":null,"description":"Font size (text only).","format":"double","type":["number","null"]},"opacity":{"default":null,"description":"Opacity.","format":"double","type":["number","null"]},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"default":null,"description":"Sloppiness."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Stroke colour."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"default":null,"description":"Dash pattern."},"stroke_width":{"default":null,"description":"Stroke width.","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"default":null,"description":"Text alignment (text only)."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"TextFilter":{"anyOf":[{"description":"A word or phrase the text contains.","type":"string"},{"description":"Either or both: a phrase the text contains, and a regular expression it matches anywhere.","properties":{"contains":{"default":null,"description":"A phrase the text contains.","type":["string","null"]},"regex":{"default":null,"description":"A regular expression: literals, `.`, classes like `[a-z]`, `* + ?`, `^ $`, `|`, and `\\d \\w \\s`.","type":["string","null"]}},"type":"object"}],"description":"Text to look for in the text of elements, their labels and LaTeX. Case-insensitive."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `layout.apply`.","properties":{"algorithm":{"$ref":"#/$defs/LayoutAlgorithm","default":"layered","description":"The algorithm."},"anchor":{"$ref":"#/$defs/Anchor","default":"keep","description":"Where the result sits."},"at":{"default":null,"description":"With `anchor` = `top_left`: the world point `[x, y]` the top-left corner goes to.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"columns":{"default":null,"description":"Columns of the grid layout. Absent: about the square root of the node count.","format":"uint32","minimum":0,"type":["integer","null"]},"direction":{"$ref":"#/$defs/Direction","default":"down","description":"Where layers grow (layered and tree): `down`, `right`, `up` or `left`."},"filter":{"anyOf":[{"$ref":"#/$defs/Query"},{"type":"null"}],"default":null,"description":"Select the shapes with a query instead of `ids` (see `element.query`)."},"ids":{"default":null,"description":"The shapes to lay out. Arrows between them are re-routed. Default: the selection. Give `ids` or `filter`.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"layer_gap":{"default":80.0,"description":"Space between layers (between rows for grid).","format":"double","type":"number"},"node_gap":{"default":40.0,"description":"Space between neighbours in a layer.","format":"double","type":"number"},"reroute":{"default":true,"description":"Re-route the bound arrows after the move (elbow routes once, after all moves).","type":"boolean"}},"title":"ApplyArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `layout.apply`.","properties":{"bounds":{"$ref":"#/$defs/RectOut","description":"The bounds of the shapes after the layout."},"moved":{"description":"The shapes that moved.","items":{"type":"string"},"type":"array"},"rerouted":{"description":"The arrows that were re-routed.","items":{"type":"string"},"type":"array"}},"required":["moved","rerouted","bounds"],"title":"ApplyOut","type":"object"}},"library.add":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.add`.","properties":{"ids":{"default":null,"description":"The elements. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"name":{"default":null,"description":"A name for the item (1 to 256 characters).","type":["string","null"]}},"title":"AddArgs","type":"object"},"output":{"$defs":{"ItemInfo":{"description":"What `library.list` and `library.add` say about an item.","properties":{"bounds":{"description":"Bounds `[x, y, w, h]` of the item (it starts at 0, 0).","items":{"format":"double","type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"content":{"description":"A fingerprint of what the item draws (16 hex digits). It changes when the drawing does, and not when the\nitem is renamed, so a picture of the item stays good for as long as this stays the same.","type":"string"},"created":{"description":"When it was added, milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"},"element_count":{"description":"Visible elements in the item.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The id to pass as `item`.","type":"string"},"name":{"description":"The name, if it has one.","type":["string","null"]},"section":{"description":"The section the item belongs to: `mine` for the person's own items, else the id of an imported library.","type":"string"}},"required":["id","element_count","created","section","content"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.add`.","properties":{"changed":{"description":"True.","type":"boolean"},"item":{"$ref":"#/$defs/ItemInfo","description":"The new item."}},"required":["changed","item"],"title":"AddOut","type":"object"}},"library.export":{"args":{"$defs":{"Dest":{"anyOf":[{"$ref":"#/$defs/InlineWord","description":"`\"inline\"`: the bytes come back in the output as base64."},{"$ref":"#/$defs/FileRef","description":"A file: `{path}`, `{download}`, `{stored}` or `{handle}`."}],"description":"Where the export goes."},"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"InlineWord":{"description":"The only word `to` accepts besides a file.","oneOf":[{"const":"inline","description":"Return the bytes in the output.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.export`.","properties":{"items":{"default":null,"description":"Item ids or names. Default: all items.","items":{"type":"string"},"type":["array","null"]},"to":{"$ref":"#/$defs/Dest","default":"inline","description":"`inline` (default) returns the bytes; a file is written through the files port."}},"title":"ExportArgs","type":"object"},"output":{"$defs":{"ExportBytes":{"description":"The bytes of an inline export.","properties":{"base64":{"description":"The content, base64.","type":"string"},"mime":{"description":"Its media type.","type":"string"}},"required":["base64","mime"],"type":"object"},"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.export`.","properties":{"bytes":{"anyOf":[{"$ref":"#/$defs/ExportBytes"},{"type":"null"}],"description":"The content, for `to: inline`."},"changed":{"description":"Always false.","type":"boolean"},"items":{"description":"Items written.","format":"uint","minimum":0,"type":"integer"},"saved_to":{"anyOf":[{"$ref":"#/$defs/FileRef"},{"type":"null"}],"description":"Where it was written, for a file."},"size":{"description":"Size in bytes.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","items","size"],"title":"ExportOut","type":"object"}},"library.import":{"args":{"$defs":{"FileRef":{"anyOf":[{"description":"A path on the native file system.","properties":{"path":{"description":"The path.","type":"string"}},"required":["path"],"type":"object"},{"description":"A name in the `Storage` documents namespace.","properties":{"stored":{"description":"The name.","type":"string"}},"required":["stored"],"type":"object"},{"description":"A download: the shell offers the bytes to the user under this name.","properties":{"download":{"description":"The file name.","type":"string"}},"required":["download"],"type":"object"},{"description":"An opaque File System Access handle.","properties":{"handle":{"description":"The handle id.","type":"string"}},"required":["handle"],"type":"object"}],"description":"Where a file lives."},"ImportMode":{"description":"How an imported library meets the existing one.","oneOf":[{"const":"merge","description":"Add the items and skip duplicates (same content).","type":"string"},{"const":"replace","description":"Replace the whole library. Not undoable.","type":"string"},{"const":"open_as_tab","description":"Lay the items out on a grid in a new tab and leave the library alone (the old app's behaviour).","type":"string"}]},"InlineBytes":{"additionalProperties":false,"description":"Bytes given inline.","properties":{"base64":{"description":"The bytes as base64 (standard alphabet, padding optional). A `data:...;base64,` prefix is accepted.","type":"string"},"mime":{"description":"The media type the sender claims. It is not trusted: the content decides.","type":["string","null"]},"name":{"description":"The file name, used in messages.","type":["string","null"]}},"required":["base64"],"type":"object"},"Source":{"anyOf":[{"$ref":"#/$defs/InlineBytes","description":"`{base64, name?, mime?}`."},{"$ref":"#/$defs/FileRef","description":"`{path}`, `{stored}`, `{download}` or `{handle}`. `{stored: \"autosave\"}` is the last autosave."}],"description":"Where the data of a command comes from: inline bytes, or a file or stored name that the session reads."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.import`.","properties":{"mode":{"$ref":"#/$defs/ImportMode","default":"merge","description":"`merge` (default), `replace` or `open_as_tab`."},"source":{"$ref":"#/$defs/Source","description":"The `.excalidrawlib` file: `{path}`, `{stored}`, `{handle}` or `{base64, name?}`."}},"required":["source"],"title":"ImportArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.import`.","properties":{"added":{"description":"Items added to the library.","format":"uint","minimum":0,"type":"integer"},"changed":{"description":"True when the library or the tabs changed.","type":"boolean"},"section":{"description":"The section the new items went to (named after the file), when there are any.","type":["string","null"]},"skipped":{"description":"Items skipped because the library already has them (or the file has them twice).","format":"uint","minimum":0,"type":"integer"},"tab":{"description":"The new tab, for `open_as_tab`.","type":["string","null"]},"total":{"description":"Items in the library now.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","added","skipped","total"],"title":"ImportOut","type":"object"}},"library.insert":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.insert`.","properties":{"at":{"default":null,"description":"The world point to centre the item on. Default: the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"item":{"description":"The item id or name.","type":"string"},"select":{"default":true,"description":"Select the inserted elements. Default true.","type":"boolean"}},"required":["item"],"title":"InsertArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.insert`.","properties":{"changed":{"description":"True.","type":"boolean"},"ids":{"description":"The new elements, back to front.","items":{"type":"string"},"type":"array"},"item":{"description":"The item that was inserted.","type":"string"}},"required":["changed","item","ids"],"title":"InsertOut","type":"object"}},"library.list":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.list`.","properties":{"search":{"default":null,"description":"Only items whose name or id contains this text (case does not matter).","type":["string","null"]},"section":{"default":null,"description":"Only the items of this section (id or name).","type":["string","null"]}},"title":"ListArgs","type":"object"},"output":{"$defs":{"ItemInfo":{"description":"What `library.list` and `library.add` say about an item.","properties":{"bounds":{"description":"Bounds `[x, y, w, h]` of the item (it starts at 0, 0).","items":{"format":"double","type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"content":{"description":"A fingerprint of what the item draws (16 hex digits). It changes when the drawing does, and not when the\nitem is renamed, so a picture of the item stays good for as long as this stays the same.","type":"string"},"created":{"description":"When it was added, milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"},"element_count":{"description":"Visible elements in the item.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The id to pass as `item`.","type":"string"},"name":{"description":"The name, if it has one.","type":["string","null"]},"section":{"description":"The section the item belongs to: `mine` for the person's own items, else the id of an imported library.","type":"string"}},"required":["id","element_count","created","section","content"],"type":"object"},"SectionInfo":{"description":"What `library.list` and `library.rename_section` say about a section.","properties":{"id":{"description":"The id to pass as `section`, and the `section` of its items.","type":"string"},"items":{"description":"Items in it (all of them, whatever `search` says).","format":"uint","minimum":0,"type":"integer"},"kind":{"$ref":"#/$defs/SectionKind","description":"Whose items it holds."},"name":{"description":"The name: the file an imported library came from, or `My items`.","type":"string"}},"required":["id","name","kind","items"],"type":"object"},"SectionKind":{"description":"Whose items a section holds.","oneOf":[{"const":"mine","description":"The person's own items. It has the fixed id `mine`, cannot be renamed, and is listed when it has items.","type":"string"},{"const":"imported","description":"A library that was imported.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.list`.","properties":{"changed":{"description":"Always false.","type":"boolean"},"items":{"description":"The items, in library order.","items":{"$ref":"#/$defs/ItemInfo"},"type":"array"},"sections":{"description":"The sections that have items, the person's own first. Every item's `section` is the id of one of them.","items":{"$ref":"#/$defs/SectionInfo"},"type":"array"}},"required":["changed","items","sections"],"title":"ListOut","type":"object"}},"library.remove":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.remove`.","properties":{"all":{"default":false,"description":"Remove every item. The only way to empty the library.","type":"boolean"},"items":{"default":null,"description":"Item ids or names to remove. Give either this or `all`.","items":{"type":"string"},"type":["array","null"]}},"title":"RemoveArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.remove`.","properties":{"changed":{"description":"False when there was nothing to remove.","type":"boolean"},"removed":{"description":"The ids that were removed.","items":{"type":"string"},"type":"array"}},"required":["changed","removed"],"title":"RemoveOut","type":"object"}},"library.remove_section":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.remove_section`.","properties":{"section":{"description":"The section id or name (`mine` for the person's own items).","type":"string"}},"required":["section"],"title":"RemoveSectionArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.remove_section`.","properties":{"changed":{"description":"False when the section had no items.","type":"boolean"},"removed":{"description":"The ids of the items that were removed with it.","items":{"type":"string"},"type":"array"},"section":{"description":"The id of the section.","type":"string"}},"required":["changed","section","removed"],"title":"RemoveSectionOut","type":"object"}},"library.rename":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.rename`.","properties":{"item":{"description":"The item id or name.","type":"string"},"name":{"description":"The new name (1 to 256 characters).","type":"string"}},"required":["item","name"],"title":"RenameArgs","type":"object"},"output":{"$defs":{"ItemInfo":{"description":"What `library.list` and `library.add` say about an item.","properties":{"bounds":{"description":"Bounds `[x, y, w, h]` of the item (it starts at 0, 0).","items":{"format":"double","type":"number"},"maxItems":4,"minItems":4,"type":["array","null"]},"content":{"description":"A fingerprint of what the item draws (16 hex digits). It changes when the drawing does, and not when the\nitem is renamed, so a picture of the item stays good for as long as this stays the same.","type":"string"},"created":{"description":"When it was added, milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"},"element_count":{"description":"Visible elements in the item.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The id to pass as `item`.","type":"string"},"name":{"description":"The name, if it has one.","type":["string","null"]},"section":{"description":"The section the item belongs to: `mine` for the person's own items, else the id of an imported library.","type":"string"}},"required":["id","element_count","created","section","content"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.rename`.","properties":{"changed":{"description":"False when the item already had this name.","type":"boolean"},"item":{"$ref":"#/$defs/ItemInfo","description":"The item after the command."}},"required":["changed","item"],"title":"RenameOut","type":"object"}},"library.rename_section":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.rename_section`.","properties":{"name":{"description":"The new name (1 to 256 characters).","type":"string"},"section":{"description":"The section id or name.","type":"string"}},"required":["section","name"],"title":"RenameSectionArgs","type":"object"},"output":{"$defs":{"SectionInfo":{"description":"What `library.list` and `library.rename_section` say about a section.","properties":{"id":{"description":"The id to pass as `section`, and the `section` of its items.","type":"string"},"items":{"description":"Items in it (all of them, whatever `search` says).","format":"uint","minimum":0,"type":"integer"},"kind":{"$ref":"#/$defs/SectionKind","description":"Whose items it holds."},"name":{"description":"The name: the file an imported library came from, or `My items`.","type":"string"}},"required":["id","name","kind","items"],"type":"object"},"SectionKind":{"description":"Whose items a section holds.","oneOf":[{"const":"mine","description":"The person's own items. It has the fixed id `mine`, cannot be renamed, and is listed when it has items.","type":"string"},{"const":"imported","description":"A library that was imported.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.rename_section`.","properties":{"changed":{"description":"False when the section already had this name.","type":"boolean"},"section":{"$ref":"#/$defs/SectionInfo","description":"The section after the command."}},"required":["changed","section"],"title":"RenameSectionOut","type":"object"}},"library.thumbnail":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `library.thumbnail`.","properties":{"dark":{"default":false,"description":"Draw with the dark palette, as the canvas does in the dark theme. Default false.","type":"boolean"},"item":{"description":"The item id or name.","type":"string"},"max_side":{"default":null,"description":"Pixels along the longer side of the picture (16 to 1024). Default 256.","format":"uint32","minimum":0,"type":["integer","null"]}},"required":["item"],"title":"ThumbnailArgs","type":"object"},"output":{"$defs":{"ExportBytes":{"description":"The bytes of an inline export.","properties":{"base64":{"description":"The content, base64.","type":"string"},"mime":{"description":"Its media type.","type":"string"}},"required":["base64","mime"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `library.thumbnail`.","properties":{"bytes":{"$ref":"#/$defs/ExportBytes","description":"The PNG, with a transparent background."},"changed":{"description":"Always false.","type":"boolean"},"height":{"description":"Height of the picture in pixels.","format":"uint32","minimum":0,"type":"integer"},"item":{"description":"The item that was drawn.","type":"string"},"width":{"description":"Width of the picture in pixels.","format":"uint32","minimum":0,"type":"integer"}},"required":["changed","item","width","height","bytes"],"title":"ThumbnailOut","type":"object"}},"perf.stats":{"args":{"$defs":{"Since":{"description":"What `perf.stats` reports.","oneOf":[{"const":"start","description":"Everything since the profiler started or was reset.","type":"string"},{"const":"last_call","description":"Only what happened after the previous `perf.stats` call of this session.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `perf.stats`.","properties":{"since":{"$ref":"#/$defs/Since","default":"start","description":"`start` (default) or `last_call`."},"trace":{"default":false,"description":"Add a Chrome-trace JSON of the retained spans under `trace`.","type":"boolean"}},"title":"StatsArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"AnyValue"}},"selection.all":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.all`.","properties":{"within":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"Select only the children of this frame or the members of this group (id or `@name` of the frame, or a\ngroup id)."}},"title":"AllArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.clear":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.get":{"args":{"$defs":{"Detail":{"description":"How much `selection.get` says.","oneOf":[{"const":"ids","description":"Only the ids and their count.","type":"string"},{"const":"summary","description":"Ids, groups, editing group, bounds, kinds and the point editor.","type":"string"},{"const":"full","description":"The summary and every field of every selected element.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.get`.","properties":{"detail":{"$ref":"#/$defs/Detail","default":"summary","description":"How much to return."}},"title":"GetArgs","type":"object"},"output":{"$defs":{"BoundsOut":{"description":"A rectangle in world units.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"LinearEditorOut":{"description":"The point editor of a line or arrow.","properties":{"element":{"description":"The element.","type":"string"},"selected_points":{"description":"Selected point indexes.","items":{"format":"uint","minimum":0,"type":"integer"},"type":"array"}},"required":["element","selected_points"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `selection.get`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/BoundsOut"},{"type":"null"}],"description":"The common bounds of the selected elements (rotation included); null when nothing is selected."},"count":{"description":"How many elements are selected.","format":"uint","minimum":0,"type":"integer"},"crop_editor":{"description":"The image whose crop is being edited (`image.crop_begin`).","type":["string","null"]},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"elements":{"description":"Every field of every selected element; only with `detail=full`.","items":true,"type":["array","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"ids":{"description":"The selected element ids, back to front.","items":{"type":"string"},"type":"array"},"kinds":{"additionalProperties":{"format":"uint","minimum":0,"type":"integer"},"description":"How many selected elements there are of each kind.","type":"object"},"linear_editor":{"anyOf":[{"$ref":"#/$defs/LinearEditorOut"},{"type":"null"}],"description":"The point editor, when a line or arrow is being edited point by point."},"paint_editor":{"description":"The image that is being painted on (`image.paint_begin`).","type":["string","null"]}},"required":["ids","count"],"title":"GetOut","type":"object"}},"selection.navigate":{"args":{"$defs":{"Dir":{"description":"A direction on the canvas.","oneOf":[{"const":"up","description":"Towards the top.","type":"string"},{"const":"down","description":"Towards the bottom.","type":"string"},{"const":"left","description":"Towards the left.","type":"string"},{"const":"right","description":"Towards the right.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.navigate`.","properties":{"direction":{"$ref":"#/$defs/Dir","description":"Which way to go from the selected element."}},"required":["direction"],"title":"NavigateArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.select":{"args":{"$defs":{"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"GroupId":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"LinkDirection":{"description":"Which arrows count as a connection.","oneOf":[{"const":"in","description":"Arrows that end at the element, and the elements they start at.","type":"string"},{"const":"out","description":"Arrows that start at the element, and the elements they end at.","type":"string"},{"const":"any","description":"Both (the default).","type":"string"}]},"Mode":{"description":"How a selection change combines with the current selection.","oneOf":[{"const":"replace","description":"The new selection replaces the old one.","type":"string"},{"const":"add","description":"The new elements are added.","type":"string"},{"const":"remove","description":"The new elements are removed.","type":"string"},{"const":"toggle","description":"The new elements are removed when they are all selected already, else added (Shift-click).","type":"string"}]},"OneOrMany":{"anyOf":[{"$ref":"#/$defs/Kind","description":"One value."},{"description":"A list.","items":{"$ref":"#/$defs/Kind"},"type":"array"}],"description":"One value or a list of values."},"RectSpec":{"additionalProperties":false,"description":"A rectangle as `{x, y, w, h}`.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left.","format":"double","type":"number"},"y":{"description":"Top.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"RefConnectedTo":{"additionalProperties":false,"description":"Arrows bound to an element, and the elements on their other end. The element is an id or `@name`.","properties":{"direction":{"$ref":"#/$defs/LinkDirection","default":"any","description":"The direction of the arrows."},"ref":{"description":"The element: an id or `@name`.","type":"string"}},"required":["ref"],"type":"object"},"RefQuery":{"additionalProperties":false,"description":"The filter of `element.query` with elements given as ids or `@name`. Every given field must match (AND).","properties":{"bound_text_of":{"default":null,"description":"The label of this container (an id or `@name`).","type":["string","null"]},"connected_to":{"anyOf":[{"$ref":"#/$defs/RefConnectedTo"},{"type":"null"}],"default":null,"description":"Connected by arrows to this element."},"frame":{"default":null,"description":"Children of this frame (an id or `@name`).","type":["string","null"]},"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"Members of this group."},"has_label":{"default":null,"description":"Has a bound label or not.","type":["boolean","null"]},"ids":{"default":null,"description":"Only these elements (ids or `@name`).","items":{"type":"string"},"type":["array","null"]},"kind":{"anyOf":[{"$ref":"#/$defs/OneOrMany"},{"type":"null"}],"default":null,"description":"One kind or a list of kinds."},"locked":{"default":null,"description":"Locked or not.","type":["boolean","null"]},"name":{"default":null,"description":"The element name, as a glob (`*` any run, `?` one character). Case-sensitive.","type":["string","null"]},"region":{"anyOf":[{"$ref":"#/$defs/RegionFilter"},{"type":"null"}],"default":null,"description":"A region of the canvas."},"selected":{"default":null,"description":"In the selection or not.","type":["boolean","null"]},"style":{"anyOf":[{"$ref":"#/$defs/StyleFilter"},{"type":"null"}],"default":null,"description":"Style values."},"text":{"anyOf":[{"$ref":"#/$defs/TextFilter"},{"type":"null"}],"default":null,"description":"Text, labels and LaTeX that match."}},"type":"object"},"RegionFilter":{"additionalProperties":false,"description":"Elements in a region of the canvas, by their (rotated) bounding boxes.","properties":{"mode":{"$ref":"#/$defs/RegionMode","default":"overlap","description":"How the element relates to it."},"rect":{"$ref":"#/$defs/RectSpec","description":"The region."}},"required":["rect"],"type":"object"},"RegionMode":{"description":"How an element relates to the region.","oneOf":[{"const":"overlap","description":"The element's bounds touch the region (the default).","type":"string"},{"const":"contain","description":"The region contains the element completely.","type":"string"},{"const":"contained_by","description":"The element contains the region completely.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleFilter":{"additionalProperties":false,"description":"Exact style values to match. Only the properties that are given are compared.","properties":{"corner_radius":{"default":null,"description":"Corner radius.","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Fill colour. `\"transparent\"` matches elements without a fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"default":null,"description":"Fill pattern."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"default":null,"description":"Font family (text only)."},"font_size":{"default":null,"description":"Font size (text only).","format":"double","type":["number","null"]},"opacity":{"default":null,"description":"Opacity.","format":"double","type":["number","null"]},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"default":null,"description":"Sloppiness."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"Stroke colour."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"default":null,"description":"Dash pattern."},"stroke_width":{"default":null,"description":"Stroke width.","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"default":null,"description":"Text alignment (text only)."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"TextFilter":{"anyOf":[{"description":"A word or phrase the text contains.","type":"string"},{"description":"Either or both: a phrase the text contains, and a regular expression it matches anywhere.","properties":{"contains":{"default":null,"description":"A phrase the text contains.","type":["string","null"]},"regex":{"default":null,"description":"A regular expression: literals, `.`, classes like `[a-z]`, `* + ?`, `^ $`, `|`, and `\\d \\w \\s`.","type":["string","null"]}},"type":"object"}],"description":"Text to look for in the text of elements, their labels and LaTeX. Case-insensitive."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.select`.","properties":{"deep":{"default":false,"description":"Select the elements themselves, not their outermost group; the editing group becomes the innermost group\nthey share.","type":"boolean"},"filter":{"anyOf":[{"$ref":"#/$defs/RefQuery"},{"type":"null"}],"default":null,"description":"Select every element that matches this filter (the filter of `element.query`)."},"group":{"anyOf":[{"$ref":"#/$defs/GroupId"},{"type":"null"}],"default":null,"description":"A group to select (all its members)."},"ids":{"default":null,"description":"Elements to select, by id or `@name`. Give exactly one of `ids`, `group` or `filter`.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"include_locked":{"default":false,"description":"Also select locked elements. Without it they are skipped and listed in `skipped_locked`.","type":"boolean"},"mode":{"$ref":"#/$defs/Mode","default":"replace","description":"How to combine with the current selection."}},"title":"SelectArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.select_at":{"args":{"$defs":{"Mode":{"description":"How a selection change combines with the current selection.","oneOf":[{"const":"replace","description":"The new selection replaces the old one.","type":"string"},{"const":"add","description":"The new elements are added.","type":"string"},{"const":"remove","description":"The new elements are removed.","type":"string"},{"const":"toggle","description":"The new elements are removed when they are all selected already, else added (Shift-click).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.select_at`.","properties":{"cycle":{"default":false,"description":"Step through the units under the point, top to bottom (Alt-click).","type":"boolean"},"deep":{"default":false,"description":"Select the element itself, not its outermost group (Ctrl-click).","type":"boolean"},"include_locked":{"default":false,"description":"Locked elements can be hit.","type":"boolean"},"mode":{"$ref":"#/$defs/Mode","default":"replace","description":"How to combine with the current selection. A click on empty canvas only clears with `replace`."},"point":{"description":"World point `[x, y]`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"tolerance":{"default":6.0,"description":"How far from an outline still counts as a hit, in screen pixels.","format":"double","type":"number"}},"required":["point"],"title":"SelectAtArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.select_lasso":{"args":{"$defs":{"Contain":{"description":"Which elements a marquee selects.","oneOf":[{"const":"overlap","description":"Elements the rectangle touches (the old app's behaviour).","type":"string"},{"const":"contain","description":"Only elements that lie completely inside the rectangle.","type":"string"}]},"RegionCombine":{"description":"How a marquee combines with the current selection.","oneOf":[{"const":"replace","description":"The marquee replaces the selection and leaves the editing group.","type":"string"},{"const":"add","description":"The marquee adds to the selection (Shift).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.select_lasso`.","properties":{"contain":{"anyOf":[{"$ref":"#/$defs/Contain"},{"type":"null"}],"default":null,"description":"`overlap` selects what the path crosses, surrounds or (for a shape with a fill) lies inside; `contain`\nonly what lies completely inside the path. Absent: the setting `input.box_select`."},"include_locked":{"default":false,"description":"Also select locked elements.","type":"boolean"},"mode":{"$ref":"#/$defs/RegionCombine","default":"replace","description":"Replace the selection, or add to it."},"points":{"description":"The path of the lasso in world units, at least 3 points that do not lie on one line. The last point is\njoined to the first.","items":{"items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"simplify":{"default":1.0,"description":"Points of the path closer than this to the line between their neighbours are dropped, in world units (0\nkeeps every point). A pointer path has one point per event, so the pointer tool sends 4 pixels.","format":"double","type":"number"}},"required":["points"],"title":"SelectLassoArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"selection.select_region":{"args":{"$defs":{"Contain":{"description":"Which elements a marquee selects.","oneOf":[{"const":"overlap","description":"Elements the rectangle touches (the old app's behaviour).","type":"string"},{"const":"contain","description":"Only elements that lie completely inside the rectangle.","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"RegionCombine":{"description":"How a marquee combines with the current selection.","oneOf":[{"const":"replace","description":"The marquee replaces the selection and leaves the editing group.","type":"string"},{"const":"add","description":"The marquee adds to the selection (Shift).","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `selection.select_region`.","properties":{"contain":{"anyOf":[{"$ref":"#/$defs/Contain"},{"type":"null"}],"default":null,"description":"`overlap` selects what the rectangle touches, `contain` only what lies completely inside. Absent: the\nsetting `input.box_select`."},"include_locked":{"default":false,"description":"Also select locked elements.","type":"boolean"},"mode":{"$ref":"#/$defs/RegionCombine","default":"replace","description":"Replace the selection, or add to it."},"rect":{"$ref":"#/$defs/RectArg","description":"The marquee in world units. A negative width or height is normalised."}},"required":["rect"],"title":"SelectRegionArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The selection after a selection command.","properties":{"changed":{"description":"False when the selection was already as requested.","type":"boolean"},"editing_group":{"description":"The group whose members are being edited individually.","type":["string","null"]},"groups":{"description":"Groups selected as a whole.","items":{"type":"string"},"type":"array"},"selected":{"description":"The selected element ids, back to front (bound text is not listed: it follows its container).","items":{"type":"string"},"type":"array"},"skipped_locked":{"description":"Locked elements that were left out because `include_locked` was false.","items":{"type":"string"},"type":"array"}},"required":["changed","selected","groups","skipped_locked"],"title":"SelectionOut","type":"object"}},"settings.cycle":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `settings.cycle`.","properties":{"key":{"description":"A setting with a fixed list of values, such as `view.grid_style` or `theme`.","type":"string"},"step":{"default":1,"description":"How many places to move through the list. Negative goes back. The list wraps.","format":"int64","type":"integer"}},"required":["key"],"title":"CycleArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of the commands that change one setting.","properties":{"changed":{"description":"False when the setting already had this value.","type":"boolean"},"default":{"description":"Its default."},"key":{"description":"The setting.","type":"string"},"previous":{"description":"Its value before."},"value":{"description":"Its value now."}},"required":["changed","key","value","previous","default"],"title":"SetOut","type":"object"}},"settings.get":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `settings.get`.","properties":{"key":{"default":null,"description":"One setting such as `snap.grid`. Omit it to get every setting.","type":["string","null"]}},"title":"GetArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `settings.get`.","properties":{"accepts":{"description":"With `key`: what the setting accepts, as a phrase.","type":["string","null"]},"changed":{"description":"Always false: reading changes nothing.","type":"boolean"},"default":{"description":"With `key`: the default of that setting."},"settings":{"additionalProperties":true,"description":"The value of the asked setting, or of every setting, by key.","type":"object"},"summary":{"description":"With `key`: what the setting is for.","type":["string","null"]}},"required":["changed","settings"],"title":"GetOut","type":"object"}},"settings.reset":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `settings.reset`.","properties":{"all":{"default":false,"description":"Return every writable setting to its default. Give this or `key`, not both.","type":"boolean"},"key":{"default":null,"description":"One setting to return to its default.","type":["string","null"]}},"title":"ResetArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `settings.reset`.","properties":{"changed":{"description":"False when every named setting already had its default.","type":"boolean"},"reset":{"description":"The settings that changed.","items":{"type":"string"},"type":"array"}},"required":["changed","reset"],"title":"ResetOut","type":"object"}},"settings.set":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `settings.set`.","properties":{"key":{"description":"The setting, such as `snap.angle_step`. List them with `settings.get`.","type":"string"},"value":{"description":"The new value. Its type and range depend on the key."}},"required":["key","value"],"title":"SetArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of the commands that change one setting.","properties":{"changed":{"description":"False when the setting already had this value.","type":"boolean"},"default":{"description":"Its default."},"key":{"description":"The setting.","type":"string"},"previous":{"description":"Its value before."},"value":{"description":"Its value now."}},"required":["changed","key","value","previous","default"],"title":"SetOut","type":"object"}},"settings.toggle":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `settings.toggle`.","properties":{"key":{"description":"An on/off setting such as `snap.grid`.","type":"string"}},"required":["key"],"title":"ToggleArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of the commands that change one setting.","properties":{"changed":{"description":"False when the setting already had this value.","type":"boolean"},"default":{"description":"Its default."},"key":{"description":"The setting.","type":"string"},"previous":{"description":"Its value before."},"value":{"description":"Its value now."}},"required":["changed","key","value","previous","default"],"title":"SetOut","type":"object"}},"style.apply_theme":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Scope":{"description":"Where `style.set` and `style.apply_theme` write.","oneOf":[{"const":"auto","description":"With a target (given `ids`, else the selection): the target and the defaults. Without one: the defaults.","type":"string"},{"const":"selection","description":"The target only. Refuses with `no_target` when there is none.","type":"string"},{"const":"defaults","description":"The defaults for new elements only.","type":"string"},{"const":"both","description":"The target and the defaults. Refuses with `no_target` when there is no target.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `style.apply_theme`.","properties":{"ids":{"default":null,"description":"The elements to change. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"name":{"description":"The theme: default, monochrome, pastel, blueprint or high_contrast. See `style.list_themes`.","type":"string"},"scope":{"$ref":"#/$defs/Scope","default":"auto","description":"Where to write; the same as for `style.set`."},"set_background":{"default":false,"description":"Also set the page colour to the theme's background.","type":"boolean"}},"required":["name"],"title":"ApplyThemeArgs","type":"object"},"output":{"$defs":{"Skipped":{"description":"The properties that were skipped for an element.","properties":{"id":{"description":"The element.","type":"string"},"props":{"description":"The properties it does not support.","items":{"type":"string"},"type":"array"}},"required":["id","props"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `style.apply_theme`.","properties":{"applied":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"The properties each element took, by element id.","type":"object"},"background_set":{"description":"True when the page colour changed.","type":"boolean"},"changed":{"description":"False when everything already matched the theme.","type":"boolean"},"defaults_updated":{"description":"True when the defaults for new elements were part of this call.","type":"boolean"},"skipped":{"description":"The properties an element does not support.","items":{"$ref":"#/$defs/Skipped"},"type":"array"},"theme":{"description":"The theme that was applied.","type":"string"}},"required":["changed","theme","applied","skipped","defaults_updated","background_set"],"title":"ApplyThemeOut","type":"object"}},"style.get":{"args":{"$defs":{"GetScope":{"description":"Where `style.get` reads.","oneOf":[{"const":"auto","description":"The target if there is one, else the defaults.","type":"string"},{"const":"selection","description":"The target only. Refuses with `no_target` when there is none.","type":"string"},{"const":"defaults","description":"The defaults for new elements.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `style.get`.","properties":{"ids":{"default":null,"description":"The elements to read. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"props":{"default":null,"description":"The properties to report, by name. Default: all of them.","items":{"type":"string"},"type":["array","null"]},"scope":{"$ref":"#/$defs/GetScope","default":"auto","description":"Read the elements, the defaults, or the elements if there are any and the defaults if not."}},"title":"GetArgs","type":"object"},"output":{"$defs":{"HeadsInfo":{"description":"The heads at the two ends of the lines and arrows among the targets. Heads are not style properties\n(`arrow.set_head` writes them), so they are reported beside `props`.","properties":{"end":{"description":"The end head, in the same words.","type":"string"},"start":{"description":"The start head, as the name `arrow.set_head` takes (`none`, `arrow`, `bar`, ...), or `\"mixed\"` when the\nlines and arrows differ.","type":"string"}},"required":["start","end"],"type":"object"},"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"PropInfo":{"description":"One property over the targets.","properties":{"applicable":{"description":"True when at least one target supports the property.","type":"boolean"},"clear_reason":{"description":"For `stroke_color` and `fill_color` only: why the property cannot be set to none now (the refusal\n`style.set` would give), when it can be set at all. A control for \"no stroke\" or \"no fill\" greys itself with\nthis text.","type":["string","null"]},"reason":{"description":"Why the property cannot be set now: the text `style.set` refuses with for this property alone. Only when\nthe targets are elements and none of them supports it. A control greys itself with this text.","type":["string","null"]},"value":{"description":"The common value, or the word `\"mixed\"` when the supporting targets differ. Absent when not applicable. A\nremoved fill is `null`."}},"required":["applicable"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `style.get`.","properties":{"changed":{"description":"Always false: reading changes nothing.","type":"boolean"},"heads":{"anyOf":[{"$ref":"#/$defs/HeadsInfo"},{"type":"null"}],"description":"The start and end heads of the lines and arrows among the targets. Absent when there are none (and for\nthe defaults, whose arrow heads are `tool.set_arrow`'s settings)."},"ids":{"description":"The elements that were read.","items":{"type":"string"},"type":"array"},"kinds":{"description":"The kinds among them, without repeats.","items":{"$ref":"#/$defs/Kind"},"type":"array"},"props":{"additionalProperties":{"$ref":"#/$defs/PropInfo"},"description":"The requested properties.","type":"object"},"source":{"description":"`selection` (the targets were read) or `defaults`.","type":"string"}},"required":["changed","source","ids","kinds","props"],"title":"GetOut","type":"object"}},"style.list_themes":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Theme":{"description":"A named style bundle and an optional page colour.","properties":{"background":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"The page colour, applied only when asked."},"name":{"description":"The name `style.apply_theme` takes.","type":"string"},"props":{"$ref":"#/$defs/StyleProps","description":"The properties it sets."}},"required":["name","props"],"type":"object"},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `style.list_themes`.","properties":{"changed":{"description":"Always false: reading changes nothing.","type":"boolean"},"themes":{"description":"The built-in themes with their bundles.","items":{"$ref":"#/$defs/Theme"},"type":"array"}},"required":["changed","themes"],"title":"ListThemesOut","type":"object"}},"style.set":{"args":{"$defs":{"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Scope":{"description":"Where `style.set` and `style.apply_theme` write.","oneOf":[{"const":"auto","description":"With a target (given `ids`, else the selection): the target and the defaults. Without one: the defaults.","type":"string"},{"const":"selection","description":"The target only. Refuses with `no_target` when there is none.","type":"string"},{"const":"defaults","description":"The defaults for new elements only.","type":"string"},{"const":"both","description":"The target and the defaults. Refuses with `no_target` when there is no target.","type":"string"}]},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `style.set`.","properties":{"ids":{"default":null,"description":"The elements to change. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"include_bound_text":{"default":true,"description":"Text properties of a shape or arrow also reach its label.","type":"boolean"},"props":{"$ref":"#/$defs/StyleProps","description":"The properties to set. At least one. Absent properties stay as they are; `fill_color: null` removes the fill."},"scope":{"$ref":"#/$defs/Scope","default":"auto","description":"Where to write: the elements, the defaults for new elements, or both. `auto` writes both when there is a\ntarget and the defaults alone when there is none."}},"required":["props"],"title":"SetArgs","type":"object"},"output":{"$defs":{"Skipped":{"description":"The properties that were skipped for an element.","properties":{"id":{"description":"The element.","type":"string"},"props":{"description":"The properties it does not support.","items":{"type":"string"},"type":"array"}},"required":["id","props"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `style.set`.","properties":{"applied":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"The properties each element took, by element id. A label reached through its container is listed under its\nown id.","type":"object"},"changed":{"description":"False when everything already had the requested values.","type":"boolean"},"defaults_updated":{"description":"True when the defaults for new elements were part of this call.","type":"boolean"},"skipped":{"description":"The properties an element does not support.","items":{"$ref":"#/$defs/Skipped"},"type":"array"}},"required":["changed","applied","skipped","defaults_updated"],"title":"SetOut","type":"object"}},"tab.close":{"args":{"$defs":{"OnUnsaved":{"description":"What to do with unsaved changes when a tab closes.","oneOf":[{"const":"refuse","description":"Refuse with `unsaved_changes`.","type":"string"},{"const":"discard","description":"Drop the changes.","type":"string"},{"const":"save","description":"Save with `doc.save` first (the active tab only).","type":"string"}]},"TabRef":{"anyOf":[{"description":"The position shown by `tab.list`, counted from 0.","format":"uint32","minimum":0,"type":"integer"},{"description":"A tab id such as `t2`, else a tab name (the first tab with that name).","type":"string"}],"description":"Names a tab."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.close`.","properties":{"leave_room":{"default":false,"description":"Leave the room the tab is in. Default false: such a tab is not closed.","type":"boolean"},"on_unsaved":{"$ref":"#/$defs/OnUnsaved","default":"refuse","description":"What to do when the tab has unsaved changes: `refuse` (default), `discard` or `save`."},"tab":{"anyOf":[{"$ref":"#/$defs/TabRef"},{"type":"null"}],"default":null,"description":"The tab to close. Default: the active tab."}},"title":"CloseArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"tab.duplicate":{"args":{"$defs":{"TabRef":{"anyOf":[{"description":"The position shown by `tab.list`, counted from 0.","format":"uint32","minimum":0,"type":"integer"},{"description":"A tab id such as `t2`, else a tab name (the first tab with that name).","type":"string"}],"description":"Names a tab."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.duplicate`.","properties":{"name":{"default":null,"description":"Name of the copy. Default: \"<name> copy\".","type":["string","null"]},"tab":{"anyOf":[{"$ref":"#/$defs/TabRef"},{"type":"null"}],"default":null,"description":"The tab to copy. Default: the active tab."}},"title":"DuplicateArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"tab.list":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"TabInfo":{"description":"One tab in `tab.list`.","properties":{"active":{"description":"Whether it is the active tab.","type":"boolean"},"dirty":{"description":"Whether the document has changes that were not saved.","type":"boolean"},"id":{"description":"The tab id, such as `t2`.","type":"string"},"index":{"description":"The position, counted from 0.","format":"uint","minimum":0,"type":"integer"},"name":{"description":"The document name.","type":"string"},"room":{"description":"The room the tab is connected to, if any.","type":["string","null"]}},"required":["id","index","name","active","dirty"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `tab.list`.","properties":{"changed":{"description":"Always false.","type":"boolean"},"tabs":{"description":"The tabs, left to right.","items":{"$ref":"#/$defs/TabInfo"},"type":"array"}},"required":["changed","tabs"],"title":"ListOut","type":"object"}},"tab.move":{"args":{"$defs":{"TabRef":{"anyOf":[{"description":"The position shown by `tab.list`, counted from 0.","format":"uint32","minimum":0,"type":"integer"},{"description":"A tab id such as `t2`, else a tab name (the first tab with that name).","type":"string"}],"description":"Names a tab."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.move`.","properties":{"tab":{"anyOf":[{"$ref":"#/$defs/TabRef"},{"type":"null"}],"default":null,"description":"The tab to move. Default: the active tab."},"to_index":{"description":"Its new position, counted from 0.","format":"int64","type":"integer"}},"required":["to_index"],"title":"MoveArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"tab.new":{"args":{"$defs":{"NewFrom":{"description":"Where the content of a new tab comes from.","oneOf":[{"const":"blank","description":"An empty document with the default background.","type":"string"},{"const":"intro","description":"The built-in intro document.","type":"string"},{"const":"active","description":"A copy of the active document.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.new`.","properties":{"from":{"$ref":"#/$defs/NewFrom","default":"blank","description":"What the new tab holds: `blank` (default), `intro` or `active`."},"name":{"default":null,"description":"Name of the new document (1 to 256 characters). Default: \"Untitled\", or \"<name> copy\" for `active`.","type":["string","null"]}},"title":"NewArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"tab.rename":{"args":{"$defs":{"TabRef":{"anyOf":[{"description":"The position shown by `tab.list`, counted from 0.","format":"uint32","minimum":0,"type":"integer"},{"description":"A tab id such as `t2`, else a tab name (the first tab with that name).","type":"string"}],"description":"Names a tab."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.rename`.","properties":{"name":{"description":"The new name, 1 to 256 characters after trimming.","type":"string"},"tab":{"anyOf":[{"$ref":"#/$defs/TabRef"},{"type":"null"}],"default":null,"description":"The tab to rename. Default: the active tab."}},"required":["name"],"title":"RenameArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"tab.switch":{"args":{"$defs":{"TabRef":{"anyOf":[{"description":"The position shown by `tab.list`, counted from 0.","format":"uint32","minimum":0,"type":"integer"},{"description":"A tab id such as `t2`, else a tab name (the first tab with that name).","type":"string"}],"description":"Names a tab."}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tab.switch`.","properties":{"tab":{"$ref":"#/$defs/TabRef","description":"The tab: its position (counted from 0), its id such as `t2`, or its name."}},"required":["tab"],"title":"SwitchArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tab after a tab command.","properties":{"active":{"description":"The active tab after the command.","type":"string"},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"id":{"description":"The tab the command acted on (for `tab.close`, the tab that was closed).","type":"string"},"index":{"description":"Its position, counted from 0 (before it was closed, for `tab.close`).","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"undo_label":{"description":"The undo step of a rename in a tab that is not the active one (the executor reports the others).","type":["string","null"]}},"required":["changed","id","index","name","active"],"title":"TabOut","type":"object"}},"text.bind":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.bind`.","properties":{"container":{"$ref":"#/$defs/Ref","description":"The rectangle, diamond, ellipse or arrow that gets the label."},"text":{"$ref":"#/$defs/Ref","description":"The free text that becomes the label."}},"required":["text","container"],"title":"BindArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.bind`.","properties":{"container":{"description":"Its container.","type":"string"},"container_grew":{"description":"The container grew to fit the text.","type":"boolean"},"text":{"description":"The label.","type":"string"}},"required":["text","container","container_grew"],"title":"BindOut","type":"object"}},"text.edit_begin":{"args":{"$defs":{"Caret":{"anyOf":[{"$ref":"#/$defs/CaretWord","description":"`\"end\"`, `\"start\"` or `\"all\"`."},{"description":"A character index, 0 to the text length.","format":"uint32","minimum":0,"type":"integer"}],"description":"The initial caret: a word or a character index."},"CaretWord":{"description":"Where the caret starts.","oneOf":[{"const":"end","description":"After the last character.","type":"string"},{"const":"start","description":"Before the first character.","type":"string"},{"const":"all","description":"The whole text is selected.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.edit_begin`.","properties":{"at":{"default":null,"description":"Start a new text here (top-left, world units). Nothing is created until `text.edit_end`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"caret":{"$ref":"#/$defs/Caret","default":"end","description":"Where the caret starts: `end`, `start`, `all`, or a character index."},"container":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"With `at`: the shape or arrow that the new text becomes the label of."},"id":{"anyOf":[{"$ref":"#/$defs/Ref"},{"type":"null"}],"default":null,"description":"The text, math, shape or arrow to edit (a shape or arrow edits its label). An id or `@name`."},"width":{"default":null,"description":"With `at`: a fixed width for the new text, in world units. The text wraps at it and the box does not follow\nthe content (a drag with the text tool). Absent: the box follows the content.","format":"double","type":["number","null"]}},"title":"BeginArgs","type":"object"},"output":{"$defs":{"Kind":{"description":"The kind tag without data.","oneOf":[{"const":"rectangle","description":"See [`ElementKind::Rectangle`].","type":"string"},{"const":"diamond","description":"See [`ElementKind::Diamond`].","type":"string"},{"const":"ellipse","description":"See [`ElementKind::Ellipse`].","type":"string"},{"const":"line","description":"See [`ElementKind::Line`].","type":"string"},{"const":"arrow","description":"See [`ElementKind::Arrow`].","type":"string"},{"const":"freehand","description":"See [`ElementKind::Freehand`].","type":"string"},{"const":"text","description":"See [`ElementKind::Text`].","type":"string"},{"const":"math","description":"See [`ElementKind::Math`].","type":"string"},{"const":"image","description":"See [`ElementKind::Image`].","type":"string"},{"const":"frame","description":"See [`ElementKind::Frame`].","type":"string"}]},"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.edit_begin`.","properties":{"bounds":{"$ref":"#/$defs/RectOut","description":"Bounds of the text being edited (the container's for a shape without a label; zero size for a draft)."},"caret":{"description":"The caret as a character range: equal ends are a caret, different ends a selection.","items":{"format":"uint32","minimum":0,"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"draft":{"description":"True when nothing exists in the document yet.","type":"boolean"},"id":{"description":"The element being edited, absent for a draft. For a container: the container.","type":["string","null"]},"kind":{"$ref":"#/$defs/Kind","description":"What is edited: `text`, `math`, or the kind of the container whose label is edited."},"latex":{"description":"The formula, for a math element.","type":["string","null"]},"text":{"description":"The current content (empty for a draft or a shape without a label).","type":"string"}},"required":["kind","draft","text","bounds","caret"],"title":"BeginOut","type":"object"}},"text.edit_end":{"args":{"$defs":{"Brush":{"description":"Brush of a freehand stroke.","oneOf":[{"const":"normal","description":"Round brush.","type":"string"},{"const":"calligraphy","description":"Angled nib.","type":"string"}]},"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"ColorArg":{"description":"#rrggbb, #rrggbbaa, #rgb, 'transparent', or a palette name '<family>-<shade>' such as 'blue-500' (22 Tailwind families, shades 25, 50, 100-900, 950).","type":"string"},"FillPattern":{"description":"How a filled area is painted. The fill colour itself is `Style::fill_color`; `None` there means no fill.","oneOf":[{"const":"solid","description":"Flat colour.","type":"string"},{"const":"hachure","description":"Parallel hand-drawn lines.","type":"string"},{"const":"zigzag","description":"A continuous zig-zag.","type":"string"},{"const":"cross_hatch","description":"Two crossing sets of lines.","type":"string"},{"const":"dots","description":"Dots.","type":"string"},{"const":"dashed","description":"Dashed hatch lines.","type":"string"},{"const":"zigzag_line","description":"Zig-zag drawn as separate line pieces.","type":"string"}]},"FontFamily":{"description":"Font family. `GelPen`, `GelPenSerif`, `VanillaExtract` and `PlexSans` ship with the app; `NotoSans` is the old\nfallback.","oneOf":[{"const":"gelpen","description":"Hand-written sans (the default).","type":"string"},{"const":"noto_sans","description":"Noto Sans.","type":"string"},{"const":"gelpen_serif","description":"Hand-written serif.","type":"string"},{"const":"vanilla_extract","description":"Vanilla Extract.","type":"string"},{"const":"plex_sans","description":"IBM Plex Sans, a plain sans with real light, regular and bold weights.","type":"string"}]},"FontWeight":{"description":"Font weight.","oneOf":[{"const":"light","description":"Light.","type":"string"},{"const":"regular","description":"Regular.","type":"string"},{"const":"heavy","description":"Heavy.","type":"string"}]},"InlineMath":{"description":"Whether `$...$` in a text is typeset as inline math.\n\nThe text stays plain: the dollar signs are part of `content`, and so is the escape `\\$`. This setting only says how\nthe text is drawn and measured (`docs/model.md` section 4, \"Inline math\").","oneOf":[{"const":"auto","description":"A matched `$...$` pair is a formula when the first `$` is followed by a non-space and the second is preceded\nby one and not followed by a digit (prices stay prices). `\\$` is a literal dollar sign.","type":"string"},{"const":"off","description":"Every character is drawn as written.","type":"string"}]},"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},"PressureMode":{"description":"How pen pressure shapes a freehand stroke.","oneOf":[{"const":"uniform","description":"Constant width.","type":"string"},{"const":"simulated","description":"Width follows the drawing speed.","type":"string"},{"const":"device","description":"Width follows the recorded `pressures` of a pen.","type":"string"}]},"RunArg":{"additionalProperties":false,"description":"One style range chosen in the editor: a colour, bold, italic, a highlight.","properties":{"bold":{"default":false,"description":"The range is bold.","type":"boolean"},"color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"The colour of the range: `#rrggbb`, `#rrggbbaa` or `transparent`. Absent: the element's colour."},"end":{"description":"One past the last character.","format":"uint32","minimum":0,"type":"integer"},"highlight":{"$ref":"#/$defs/SpanHighlight","description":"The highlight of the range: a marker colour (`yellow`, `green`, `pink`, `blue`, `orange`), `none` for no\nhighlight even where the whole text has one, or absent for the text's own."},"italic":{"default":false,"description":"The range is italic.","type":"boolean"},"start":{"description":"First character.","format":"uint32","minimum":0,"type":"integer"}},"required":["start","end"],"type":"object"},"Sloppiness":{"description":"How hand-drawn the outline looks. The names are the old app's; `roughness` gives the numeric value.","oneOf":[{"const":"architect","description":"Roughness 0: clean lines.","type":"string"},{"const":"artist","description":"Roughness 1.","type":"string"},{"const":"cartoonist","description":"Roughness 2.","type":"string"},{"const":"drunk","description":"Roughness 3.5.","type":"string"}]},"SpanHighlight":{"anyOf":[{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"},{"const":"none","type":"string"}]},"StrokeStyle":{"description":"Dash pattern of a stroke.","oneOf":[{"const":"solid","description":"Continuous line.","type":"string"},{"const":"dashed","description":"Dashes.","type":"string"},{"const":"dotted","description":"Dots.","type":"string"}]},"StyleProps":{"additionalProperties":false,"description":"A set of style properties to change. Absent properties stay as they are.","properties":{"corner_radius":{"description":"Corner radius in world units, 0 or more (0 is sharp).","format":"double","type":["number","null"]},"fill_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Fill colour. `null` removes the fill."},"fill_pattern":{"anyOf":[{"$ref":"#/$defs/FillPattern"},{"type":"null"}],"description":"How the fill is painted: solid, hachure, zigzag, cross_hatch, dots, dashed or zigzag_line."},"font_family":{"anyOf":[{"$ref":"#/$defs/FontFamily"},{"type":"null"}],"description":"Font: gelpen, gelpen_serif, vanilla_extract, noto_sans or plex_sans."},"font_size":{"description":"Font size in world units, above 0 (presets 16, 20, 28, 36).","format":"double","type":["number","null"]},"font_weight":{"anyOf":[{"$ref":"#/$defs/FontWeight"},{"type":"null"}],"description":"Font weight: light, regular or heavy."},"freehand_style":{"anyOf":[{"$ref":"#/$defs/Brush"},{"type":"null"}],"description":"Freehand brush: normal or calligraphy."},"highlight":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The marker band behind the element: a palette family in any palette shade (`yellow-400`, `blue-100`) or `#rrggbb`\n(the old names `yellow`, `green`, `pink`, `blue` and `orange` mean the 400 shade). `null` removes it. For text this\nis the whole text; a part of a text is highlighted with `text.format`."},"line_height":{"description":"Line height as a multiple of the font size, 1.0 to 3.0 (default 1.25).","format":"double","type":["number","null"]},"opacity":{"description":"Opacity from 0 (invisible) to 1.","format":"double","type":["number","null"]},"pressure_mode":{"anyOf":[{"$ref":"#/$defs/PressureMode"},{"type":"null"}],"description":"Freehand pressure: uniform, simulated or device."},"sloppiness":{"anyOf":[{"$ref":"#/$defs/Sloppiness"},{"type":"null"}],"description":"How hand-drawn the outline is: architect, artist, cartoonist or drunk."},"stroke_color":{"anyOf":[{"$ref":"#/$defs/ColorArg"},{"type":"null"}],"description":"Outline colour; the text colour of text and math."},"stroke_style":{"anyOf":[{"$ref":"#/$defs/StrokeStyle"},{"type":"null"}],"description":"solid, dashed or dotted."},"stroke_width":{"description":"Outline width in world units, above 0 (presets 1, 2, 4, 8).","format":"double","type":["number","null"]},"text_align":{"anyOf":[{"$ref":"#/$defs/TextAlign"},{"type":"null"}],"description":"Horizontal text alignment: left, center or right."},"tip":{"anyOf":[{"$ref":"#/$defs/Tip"},{"type":"null"}],"description":"Freehand tip: round or chisel."},"vertical_align":{"anyOf":[{"$ref":"#/$defs/VerticalAlign"},{"type":"null"}],"description":"Vertical alignment of text bound to a container: top, middle or bottom."}},"type":"object"},"TextAlign":{"description":"Horizontal text alignment.","oneOf":[{"const":"left","description":"Left.","type":"string"},{"const":"center","description":"Centre.","type":"string"},{"const":"right","description":"Right.","type":"string"}]},"Tip":{"description":"The tip of a freehand pen: the shape that is swept along the stroke.","oneOf":[{"const":"round","description":"A round tip: a pencil line with round caps.","type":"string"},{"const":"chisel","description":"The flat nib of a chisel marker: wide across the nib, thin along it, flat ends, one translucent shape\nthat does not darken where the stroke crosses itself (`drafftink_geom::chisel`).","type":"string"}]},"VerticalAlign":{"description":"Vertical alignment of text inside its box or container.","oneOf":[{"const":"top","description":"Top.","type":"string"},{"const":"middle","description":"Middle.","type":"string"},{"const":"bottom","description":"Bottom.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.edit_end`.","properties":{"commit":{"default":true,"description":"True: apply the editor's content. False: discard the session and leave the document as it was.","type":"boolean"},"inline_math":{"anyOf":[{"$ref":"#/$defs/InlineMath"},{"type":"null"}],"default":null,"description":"Whether `$...$` in the text is typeset as math (`auto` or `off`, see `text.set`). Absent keeps the setting."},"latex":{"default":null,"description":"The final formula, when a math element is edited.","type":["string","null"]},"runs":{"default":null,"description":"Style ranges of the text (colour, bold, italic, highlight). Absent keeps the current ones.","items":{"$ref":"#/$defs/RunArg"},"type":["array","null"]},"style":{"anyOf":[{"$ref":"#/$defs/StyleProps"},{"type":"null"}],"default":null,"description":"Text properties chosen during the edit, applied in the same step: the colour, opacity and font\nproperties of `style.set` (`stroke_color`, `opacity`, `font_family`, `font_weight`, `font_size`,\n`text_align`, `vertical_align`, `line_height`). Other style properties are refused."},"text":{"default":null,"description":"The final content of the text or label. Absent keeps the current content (and discards a draft).","type":["string","null"]}},"title":"EndArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.edit_end`.","properties":{"committed":{"description":"True when the editor's result was applied (even if it changed nothing).","type":"boolean"},"deleted":{"description":"The text element or label was deleted.","type":"boolean"},"discarded":{"description":"A blank result discarded a draft, or deleted the text or label.","type":"boolean"},"id":{"description":"The element that was created or edited. For a label: the label text. Absent when nothing is left.","type":["string","null"]},"selected":{"description":"The element is selected now (the container, for a label).","type":["string","null"]}},"required":["committed","discarded","deleted"],"title":"EndOut","type":"object"}},"text.format":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.format`.","properties":{"bold":{"default":null,"description":"True: bold. False: regular weight. Absent: leave as it is.","type":["boolean","null"]},"ids":{"default":null,"description":"Texts, or shapes and arrows with a label. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"italic":{"default":null,"description":"True: italic. False: upright. Absent: leave as it is.","type":["boolean","null"]},"range":{"default":null,"description":"The characters to format, `[start, end]` (0-based, `end` is one past the last), for one text. Default: all\nof each text.","items":{"format":"uint32","minimum":0,"type":"integer"},"maxItems":2,"minItems":2,"type":["array","null"]}},"title":"FormatArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.format`.","properties":{"formatted":{"description":"Texts whose characters changed.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Targets that are neither text nor a shape or arrow with a label.","items":{"type":"string"},"type":"array"},"unchanged":{"description":"Texts that already looked as asked.","items":{"type":"string"},"type":"array"}},"required":["formatted","unchanged","skipped"],"title":"FormatOut","type":"object"}},"text.set":{"args":{"$defs":{"InlineMath":{"description":"Whether `$...$` in a text is typeset as inline math.\n\nThe text stays plain: the dollar signs are part of `content`, and so is the escape `\\$`. This setting only says how\nthe text is drawn and measured (`docs/model.md` section 4, \"Inline math\").","oneOf":[{"const":"auto","description":"A matched `$...$` pair is a formula when the first `$` is followed by a non-space and the second is preceded\nby one and not followed by a digit (prices stay prices). `\\$` is a literal dollar sign.","type":"string"},{"const":"off","description":"Every character is drawn as written.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.set`.","properties":{"id":{"$ref":"#/$defs/Ref","description":"The text element, or the shape or arrow whose label to set. An id or `@name`."},"inline_math":{"anyOf":[{"$ref":"#/$defs/InlineMath"},{"type":"null"}],"default":null,"description":"Whether `$...$` in the text is typeset as math: `auto` (a formula needs a non-space after the opening `$` and\nbefore the closing one, and no digit after it, so prices stay prices; `\\$` is a dollar sign) or `off`. Absent\nkeeps the element's setting, which is `auto` for a new text."},"keep_runs":{"default":true,"description":"Keep the colours of the unchanged beginning and end of the text.","type":"boolean"},"text":{"description":"The new content. Line breaks are `\\n`.","type":"string"}},"required":["id","text"],"title":"SetArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.set`.","properties":{"bounds":{"anyOf":[{"$ref":"#/$defs/RectOut"},{"type":"null"}],"description":"The bounds of the text element after the change."},"id":{"description":"The text element that holds the content now (the label for a container). Absent when a label was removed.","type":["string","null"]},"removed":{"description":"The label was removed because `text` was empty.","type":"boolean"}},"required":["removed"],"title":"SetOut","type":"object"}},"text.set_autoresize":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.set_autoresize`.","properties":{"ids":{"default":null,"description":"Free text elements. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"on":{"description":"True: the box follows the content. False: the box keeps its width and the text wraps.","type":"boolean"}},"required":["on"],"title":"AutoResizeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.set_autoresize`.","properties":{"skipped":{"description":"Targets that are not text and were skipped.","items":{"type":"string"},"type":"array"},"texts":{"description":"The texts that were set.","items":{"type":"string"},"type":"array"}},"required":["texts","skipped"],"title":"AutoResizeOut","type":"object"}},"text.set_latex":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.set_latex`.","properties":{"id":{"$ref":"#/$defs/Ref","description":"The math element. An id or `@name`."},"latex":{"description":"The formula, for example `\\frac{a}{b}`.","type":"string"}},"required":["id","latex"],"title":"SetLatexArgs","type":"object"},"output":{"$defs":{"RectOut":{"description":"A rectangle in command output.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.set_latex`.","properties":{"bounds":{"$ref":"#/$defs/RectOut","description":"Its bounds after the new layout."},"id":{"description":"The element.","type":"string"}},"required":["id","bounds"],"title":"SetLatexOut","type":"object"}},"text.step_size":{"args":{"$defs":{"FontStep":{"description":"Which way a font size steps.","oneOf":[{"const":"increase","description":"The next larger size.","type":"string"},{"const":"decrease","description":"The next smaller size.","type":"string"}]},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.step_size`.","properties":{"direction":{"$ref":"#/$defs/FontStep","description":"Larger or smaller. Sizes go 16, 20, 28, 36, then by 8 (8 to 200)."},"ids":{"default":null,"description":"Texts, formulas, or shapes and arrows with a label. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]}},"required":["direction"],"title":"StepSizeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.step_size`.","properties":{"at_limit":{"description":"Texts and formulas already at the smallest or largest size.","items":{"type":"string"},"type":"array"},"resized":{"description":"Texts and formulas whose size changed.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Targets that are neither text nor math nor a container with a label.","items":{"type":"string"},"type":"array"}},"required":["resized","at_limit","skipped"],"title":"StepSizeOut","type":"object"}},"text.style_range":{"args":{"$defs":{"Color":{"description":"#rrggbb, or #rrggbbaa for a non-opaque colour. 'transparent' and #rgb are also accepted.","pattern":"^(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|transparent)$","type":"string"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.style_range`.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/Color"},{"type":"null"}],"default":null,"description":"The colour of the characters: `#rrggbb`, `#rrggbbaa` or `transparent`. Absent or null clears the colour, so\nthe characters use the element's colour again."},"end":{"description":"One past the last character of the range.","format":"uint32","minimum":0,"type":"integer"},"id":{"$ref":"#/$defs/Ref","description":"The text element. An id or `@name`."},"start":{"description":"First character of the range (0-based, in characters).","format":"uint32","minimum":0,"type":"integer"}},"required":["id","start","end"],"title":"StyleRangeArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.style_range`.","properties":{"id":{"description":"The text.","type":"string"},"runs":{"description":"The colour runs after the change as `[start, end, colour]`.","items":true,"type":"array"}},"required":["id","runs"],"title":"StyleRangeOut","type":"object"}},"text.unbind":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.unbind`.","properties":{"text":{"$ref":"#/$defs/Ref","description":"The label to detach. An id or `@name`."}},"required":["text"],"title":"UnbindArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.unbind`.","properties":{"text":{"description":"The text, now a free element.","type":"string"}},"required":["text"],"title":"UnbindOut","type":"object"}},"text.wrap_in_container":{"args":{"$defs":{"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"WrapShape":{"description":"The shapes a text can be wrapped in.","oneOf":[{"const":"rectangle","description":"A rectangle (the default).","type":"string"},{"const":"ellipse","description":"An ellipse.","type":"string"},{"const":"diamond","description":"A diamond.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `text.wrap_in_container`.","properties":{"ids":{"default":null,"description":"Free text elements. Default: the selection.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"padding":{"default":16.0,"description":"Space between the text and the outline, in world units (0 to 1000).","format":"double","type":"number"},"shape":{"$ref":"#/$defs/WrapShape","default":"rectangle","description":"The shape to create around each text."}},"title":"WrapArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `text.wrap_in_container`.","properties":{"containers":{"description":"The new shapes, one per wrapped text.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Targets that were skipped because they are not free text (labels, shapes, lines).","items":{"type":"string"},"type":"array"},"texts":{"description":"The texts that were wrapped, in the same order.","items":{"type":"string"},"type":"array"}},"required":["containers","texts","skipped"],"title":"WrapOut","type":"object"}},"tool.cancel":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.cancel`.","properties":{"all":{"default":false,"description":"false (default): one press undoes one thing, the first rung that applies. true: every rung runs,\nas the old app's single Esc did.","type":"boolean"}},"title":"CancelArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `tool.cancel`.","properties":{"changed":{"description":"False when no rung applied (a stray Esc).","type":"boolean"},"rungs":{"description":"The rungs that ran, in order: `gesture`, `text_edit`, `crop_editor`, `paint_editor`, `point_editor`, `group`, `selection`, `tool`.","items":{"type":"string"},"type":"array"}},"required":["changed","rungs"],"title":"CancelOut","type":"object"}},"tool.hold":{"args":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.hold`.","properties":{"tool":{"$ref":"#/$defs/Tool","default":"hand","description":"The tool to use until `tool.release`. Default: the hand tool."}},"title":"HoldArgs","type":"object"},"output":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tool state after a tool command.","properties":{"active":{"$ref":"#/$defs/Tool","description":"The tool that returns when a held tool is released."},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"held":{"anyOf":[{"$ref":"#/$defs/Tool"},{"type":"null"}],"description":"The tool held temporarily, if any."},"tool":{"$ref":"#/$defs/Tool","description":"The tool in effect: the held one, else the active one."},"tool_lock":{"description":"Whether the tool stays after one element is drawn.","type":"boolean"}},"required":["changed","tool","active","tool_lock"],"title":"ToolOut","type":"object"}},"tool.lock":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.lock`.","properties":{"on":{"default":null,"description":"Turn the lock on or off. Omit it to toggle.","type":["boolean","null"]}},"title":"LockArgs","type":"object"},"output":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tool state after a tool command.","properties":{"active":{"$ref":"#/$defs/Tool","description":"The tool that returns when a held tool is released."},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"held":{"anyOf":[{"$ref":"#/$defs/Tool"},{"type":"null"}],"description":"The tool held temporarily, if any."},"tool":{"$ref":"#/$defs/Tool","description":"The tool in effect: the held one, else the active one."},"tool_lock":{"description":"Whether the tool stays after one element is drawn.","type":"boolean"}},"required":["changed","tool","active","tool_lock"],"title":"ToolOut","type":"object"}},"tool.release":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tool state after a tool command.","properties":{"active":{"$ref":"#/$defs/Tool","description":"The tool that returns when a held tool is released."},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"held":{"anyOf":[{"$ref":"#/$defs/Tool"},{"type":"null"}],"description":"The tool held temporarily, if any."},"tool":{"$ref":"#/$defs/Tool","description":"The tool in effect: the held one, else the active one."},"tool_lock":{"description":"Whether the tool stays after one element is drawn.","type":"boolean"}},"required":["changed","tool","active","tool_lock"],"title":"ToolOut","type":"object"}},"tool.set":{"args":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.set`.","properties":{"keep_selection":{"default":null,"description":"Keep the current selection. Default: true for `select` and `hand`, false for the drawing tools.","type":["boolean","null"]},"tool":{"$ref":"#/$defs/Tool","description":"The tool to use."}},"required":["tool"],"title":"SetArgs","type":"object"},"output":{"$defs":{"Tool":{"description":"The drawing tools (docs/commands.md §2 `Tool`).","enum":["select","lasso","hand","rectangle","diamond","ellipse","arrow","line","freehand","highlighter","text","sticky","math","frame","eraser","laser"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The tool state after a tool command.","properties":{"active":{"$ref":"#/$defs/Tool","description":"The tool that returns when a held tool is released."},"changed":{"description":"False when the state was already as requested.","type":"boolean"},"held":{"anyOf":[{"$ref":"#/$defs/Tool"},{"type":"null"}],"description":"The tool held temporarily, if any."},"tool":{"$ref":"#/$defs/Tool","description":"The tool in effect: the held one, else the active one."},"tool_lock":{"description":"Whether the tool stays after one element is drawn.","type":"boolean"}},"required":["changed","tool","active","tool_lock"],"title":"ToolOut","type":"object"}},"tool.set_arrow":{"args":{"$defs":{"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.set_arrow`.","properties":{"arrow_type":{"anyOf":[{"$ref":"#/$defs/PathType"},{"type":"null"}],"description":"How new arrows are drawn: `sharp` (straight segments), `round` (a curve), `elbow` (right angles) or `auto_route` (right angles around the other shapes)."},"end_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"The head at the end of new arrows. `null` or `\"none\"` means no head."},"start_head":{"anyOf":[{"$ref":"#/$defs/Head"},{"type":"null"}],"description":"The head at the start of new arrows. `null` or `\"none\"` means no head."}},"title":"SetArrowArgs","type":"object"},"output":{"$defs":{"Head":{"description":"What is drawn at an end of a line or arrow.","oneOf":[{"const":"none","description":"Nothing.","type":"string"},{"const":"arrow","description":"Open V.","type":"string"},{"const":"bar","description":"A bar across the line.","type":"string"},{"const":"circle","description":"Filled circle.","type":"string"},{"const":"circle_outline","description":"Hollow circle.","type":"string"},{"const":"triangle","description":"Filled triangle.","type":"string"},{"const":"triangle_outline","description":"Hollow triangle.","type":"string"},{"const":"diamond","description":"Filled diamond.","type":"string"},{"const":"diamond_outline","description":"Hollow diamond.","type":"string"},{"const":"cardinality_one","description":"Entity-relationship marker: one.","type":"string"},{"const":"cardinality_many","description":"Entity-relationship marker: many (crow's foot).","type":"string"},{"const":"cardinality_one_or_many","description":"Entity-relationship marker: one or many.","type":"string"},{"const":"cardinality_exactly_one","description":"Entity-relationship marker: exactly one.","type":"string"},{"const":"cardinality_zero_or_one","description":"Entity-relationship marker: zero or one.","type":"string"},{"const":"cardinality_zero_or_many","description":"Entity-relationship marker: zero or many.","type":"string"}]},"PathType":{"description":"How the points of a line or arrow are joined.","oneOf":[{"const":"sharp","description":"Straight segments (old `Direct`).","type":"string"},{"const":"round","description":"A smooth curve through the points (old `Flowing`).","type":"string"},{"const":"elbow","description":"Right-angled segments routed simply between the two ends and around the shapes the arrow is bound to\n(old `Angular`; the old app drew it but never stored it). The user can move its segments.","type":"string"},{"const":"auto_route","description":"Right-angled segments that also find their way around the other shapes, and are routed again when a\nshape moves. Stored the same way as `Elbow`: the route is a list of points computed from the scene.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `tool.set_arrow`: the defaults in effect.","properties":{"arrow_type":{"$ref":"#/$defs/PathType","description":"The path type of new arrows."},"changed":{"description":"False when the defaults were already as requested.","type":"boolean"},"end_head":{"$ref":"#/$defs/Head","description":"The head at the end of new arrows."},"start_head":{"$ref":"#/$defs/Head","description":"The head at the start of new arrows."}},"required":["changed","arrow_type","start_head","end_head"],"title":"SetArrowOut","type":"object"}},"tool.set_marker":{"args":{"$defs":{"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `tool.set_marker`.","properties":{"color":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"default":null,"description":"The marker colour, taken exactly as given: `<family>-<shade>` with any palette shade (`yellow-400`,\n`blue-100`) or `#rrggbb`. `null` is none: the highlighter then removes highlights."}},"title":"SetMarkerArgs","type":"object"},"output":{"$defs":{"MarkerColor":{"description":"A highlight colour: `<family>-<shade>`, a palette family and any palette shade (`yellow-400`), or `#rrggbb`. The old names yellow, green, pink, blue and orange mean the 400 shade.","pattern":"^((red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-(25|50|100|200|300|400|500|600|700|800|900|950)|yellow|green|pink|blue|orange|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8})$","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `tool.set_marker`.","properties":{"changed":{"description":"False when the marker already had this colour.","type":"boolean"},"color":{"anyOf":[{"$ref":"#/$defs/MarkerColor"},{"type":"null"}],"description":"The colour now, `null` for none."}},"required":["changed"],"title":"SetMarkerOut","type":"object"}},"version.delete":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `version.delete`.","properties":{"id":{"description":"The version, by the id that `version.list` shows.","type":"string"}},"required":["id"],"title":"DeleteArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.rename` and `version.delete`.","properties":{"changed":{"description":"False when the version already had this name.","type":"boolean"},"count":{"description":"Versions the document holds now.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The version.","type":"string"},"name":{"description":"Its name after the command (for `version.delete`, the name it had).","type":"string"}},"required":["changed","id","name","count"],"title":"ChangeOut","type":"object"}},"version.list":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"VersionInfo":{"description":"A version as `version.list` shows it.","properties":{"author":{"description":"Who saved it, when they had set a name.","type":["string","null"]},"bytes":{"description":"Bytes the stored scene takes.","format":"uint","minimum":0,"type":"integer"},"created_ms":{"description":"When it was saved, in milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"},"elements":{"description":"Live elements in the scene it holds.","format":"uint32","minimum":0,"type":"integer"},"id":{"description":"The id to pass to the other `version` commands.","type":"string"},"name":{"description":"The name.","type":"string"}},"required":["id","name","created_ms","elements","bytes"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.list`.","properties":{"changed":{"description":"Always false.","type":"boolean"},"count":{"description":"How many there are.","format":"uint","minimum":0,"type":"integer"},"limit":{"description":"Most versions `version.save` keeps.","format":"uint","minimum":0,"type":"integer"},"versions":{"description":"The versions, newest first.","items":{"$ref":"#/$defs/VersionInfo"},"type":"array"}},"required":["changed","versions","count","limit"],"title":"ListOut","type":"object"}},"version.open":{"args":{"$defs":{"OpenMode":{"description":"Where `version.open` shows the version.","oneOf":[{"const":"new_tab","description":"An independent copy in a new tab, named \"<document> — <version>\". Editing it changes nothing in the\ndocument it came from, and it keeps none of that document's versions.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `version.open`.","properties":{"id":{"description":"The version, by the id that `version.list` shows.","type":"string"},"mode":{"$ref":"#/$defs/OpenMode","default":"new_tab","description":"`new_tab` (the only mode, and the default)."}},"required":["id"],"title":"OpenArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.open`.","properties":{"changed":{"description":"True.","type":"boolean"},"index":{"description":"Its position, counted from 0.","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"tab":{"description":"The new tab.","type":"string"},"version":{"description":"The version it shows.","type":"string"}},"required":["changed","tab","index","name","version"],"title":"OpenOut","type":"object"}},"version.rename":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `version.rename`.","properties":{"id":{"description":"The version, by the id that `version.list` shows.","type":"string"},"name":{"description":"The new name, 1 to 100 characters, trimmed, no line breaks.","type":"string"}},"required":["id","name"],"title":"RenameArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.rename` and `version.delete`.","properties":{"changed":{"description":"False when the version already had this name.","type":"boolean"},"count":{"description":"Versions the document holds now.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The version.","type":"string"},"name":{"description":"Its name after the command (for `version.delete`, the name it had).","type":"string"}},"required":["changed","id","name","count"],"title":"ChangeOut","type":"object"}},"version.restore":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `version.restore`.","properties":{"id":{"description":"The version, by the id that `version.list` shows.","type":"string"}},"required":["id"],"title":"RestoreArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.restore`.","properties":{"brought_back":{"description":"Elements that were gone or deleted and are back.","format":"uint","minimum":0,"type":"integer"},"changed":{"description":"False when the scene already was the scene of the version.","type":"boolean"},"deleted":{"description":"Elements the version does not have, now deleted.","format":"uint","minimum":0,"type":"integer"},"id":{"description":"The version.","type":"string"},"missing_pictures":{"description":"Pictures the version shows that the document no longer holds.","format":"uint","minimum":0,"type":"integer"},"name":{"description":"Its name.","type":"string"},"reset":{"description":"Elements that changed to what the version has.","format":"uint","minimum":0,"type":"integer"}},"required":["changed","id","name","brought_back","reset","deleted","missing_pictures"],"title":"RestoreOut","type":"object"}},"version.save":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `version.save`.","properties":{"name":{"description":"The name, 1 to 100 characters, trimmed, no line breaks. It need not be unique: versions are addressed by id.","type":"string"}},"required":["name"],"title":"SaveArgs","type":"object"},"output":{"$defs":{"VersionInfo":{"description":"A version as `version.list` shows it.","properties":{"author":{"description":"Who saved it, when they had set a name.","type":["string","null"]},"bytes":{"description":"Bytes the stored scene takes.","format":"uint","minimum":0,"type":"integer"},"created_ms":{"description":"When it was saved, in milliseconds since the Unix epoch.","format":"uint64","minimum":0,"type":"integer"},"elements":{"description":"Live elements in the scene it holds.","format":"uint32","minimum":0,"type":"integer"},"id":{"description":"The id to pass to the other `version` commands.","type":"string"},"name":{"description":"The name.","type":"string"}},"required":["id","name","created_ms","elements","bytes"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Result of `version.save`.","properties":{"changed":{"description":"True.","type":"boolean"},"count":{"description":"Versions the document holds now.","format":"uint","minimum":0,"type":"integer"},"limit":{"description":"Most versions `version.save` keeps.","format":"uint","minimum":0,"type":"integer"},"version":{"$ref":"#/$defs/VersionInfo","description":"The new version."}},"required":["changed","version","count","limit"],"title":"SaveOut","type":"object"}},"view.center":{"args":{"$defs":{"CenterOn":{"description":"What `view.center` centres on.","oneOf":[{"const":"origin","description":"The world origin.","type":"string"},{"const":"content","description":"The middle of all content.","type":"string"},{"const":"selection","description":"The middle of the selection.","type":"string"},{"const":"point","description":"The world point in `point`.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.center`.","properties":{"on":{"$ref":"#/$defs/CenterOn","default":"origin","description":"What to centre on."},"point":{"default":null,"description":"The world point, for `on: point`.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]}},"title":"CenterArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.get":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"An argument struct with no fields, for commands that take none.","title":"NoArgs","type":"object"},"output":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"ViewportInfo":{"description":"Canvas size.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"scale_factor":{"description":"Device pixels per logical pixel.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"}},"required":["w","h","scale_factor"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The state `view.get` reports.","properties":{"changed":{"description":"Always false: reading changes nothing.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"tool":{"description":"The tool in effect.","type":"string"},"tool_lock":{"description":"Tool lock.","type":"boolean"},"view_only":{"description":"View-only mode.","type":"boolean"},"viewport":{"$ref":"#/$defs/ViewportInfo","description":"Canvas size in logical pixels."},"visible":{"$ref":"#/$defs/RectArg","description":"The visible world rectangle."},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent","viewport","visible","view_only","tool","tool_lock"],"title":"ViewInfo","type":"object"}},"view.pan":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.pan`.","properties":{"dx":{"description":"Screen pixels the content moves to the right (as the pointer would).","format":"double","type":"number"},"dy":{"description":"Screen pixels the content moves down.","format":"double","type":"number"}},"required":["dx","dy"],"title":"PanArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.screenshot":{"args":{"$defs":{"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"},"Region":{"anyOf":[{"$ref":"#/$defs/RegionWord","description":"`\"viewport\"`, `\"all\"` or `\"selection\"`."},{"$ref":"#/$defs/RectArg","description":"A world rectangle."},{"description":"The bounds of these elements.","properties":{"ids":{"description":"The elements.","items":{"$ref":"#/$defs/Ref"},"type":"array"}},"required":["ids"],"type":"object"}],"description":"What `view.screenshot` draws."},"RegionWord":{"description":"The named regions.","oneOf":[{"const":"viewport","description":"What the camera shows.","type":"string"},{"const":"all","description":"All content.","type":"string"},{"const":"selection","description":"The selection.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.screenshot`.","properties":{"background":{"default":true,"description":"Draw the document background.","type":"boolean"},"max_side_px":{"default":2048,"description":"The longest side of the picture in pixels, 16 to 8192.","format":"int64","type":"integer"},"overlay":{"default":false,"description":"Draw selection handles and guides.","type":"boolean"},"region":{"$ref":"#/$defs/Region","default":"viewport","description":"What to draw. Default: the viewport."},"scale":{"default":1.0,"description":"Output pixels per screen pixel (for the viewport) or per world unit (otherwise), 0.05 to 8.","format":"double","type":"number"}},"title":"ScreenshotArgs","type":"object"},"output":{"$defs":{"PngBytes":{"description":"A PNG as base64.","properties":{"base64":{"description":"Base64 of the PNG.","type":"string"},"mime":{"description":"Always `image/png`.","type":"string"}},"required":["base64","mime"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Output of `view.screenshot`.","properties":{"bytes":{"$ref":"#/$defs/PngBytes","description":"The picture."},"changed":{"description":"Always false: a screenshot changes nothing.","type":"boolean"},"height":{"description":"Height in pixels.","format":"uint32","minimum":0,"type":"integer"},"width":{"description":"Width in pixels.","format":"uint32","minimum":0,"type":"integer"}},"required":["changed","bytes","width","height"],"title":"ScreenshotOut","type":"object"}},"view.scroll_page":{"args":{"$defs":{"Dir":{"description":"A direction.","oneOf":[{"const":"up","description":"Towards the top of the document.","type":"string"},{"const":"down","description":"Towards the bottom.","type":"string"},{"const":"left","description":"Towards the left.","type":"string"},{"const":"right","description":"Towards the right.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.scroll_page`.","properties":{"direction":{"$ref":"#/$defs/Dir","description":"Which way to scroll."},"fraction":{"default":0.8,"description":"How much of the viewport to scroll, above 0 and at most 10. Default 0.8.","format":"double","type":"number"}},"required":["direction"],"title":"ScrollPageArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.set":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.set`.","properties":{"scroll":{"default":null,"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":["array","null"]},"zoom":{"default":null,"description":"Screen pixels per world unit, clamped to 0.1..30.","format":"double","type":["number","null"]}},"title":"SetArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.set_view_only":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.set_view_only`.","properties":{"on":{"default":null,"description":"On or off. Omitted: toggle.","type":["boolean","null"]}},"title":"ViewOnlyArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The mode after `view.set_view_only`.","properties":{"changed":{"description":"False when the mode was already as requested.","type":"boolean"},"view_only":{"description":"The mode now.","type":"boolean"}},"required":["changed","view_only"],"title":"ViewOnlyOut","type":"object"}},"view.set_viewport":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.set_viewport`.","properties":{"height":{"description":"Canvas height in logical pixels.","format":"double","type":"number"},"scale_factor":{"default":1.0,"description":"Device pixels per logical pixel. Default 1.","format":"double","type":"number"},"width":{"description":"Canvas width in logical pixels.","format":"double","type":"number"}},"required":["width","height"],"title":"SetViewportArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The viewport after `view.set_viewport`.","properties":{"changed":{"description":"False when the size was already this.","type":"boolean"},"height":{"description":"Height.","format":"double","type":"number"},"scale_factor":{"description":"Device pixels per logical pixel.","format":"double","type":"number"},"width":{"description":"Width.","format":"double","type":"number"}},"required":["changed","width","height","scale_factor"],"title":"ViewportOut","type":"object"}},"view.zoom_at":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/CenterWord","description":"The word `\"viewport_center\"`."},{"description":"A screen point `[x, y]` in logical pixels from the top-left of the canvas.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where a zoom is anchored."},"CenterWord":{"description":"The only word `at` accepts.","oneOf":[{"const":"viewport_center","description":"The middle of the viewport.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.zoom_at`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"The screen point that stays fixed. Default: the viewport centre."},"factor":{"default":null,"description":"Multiply the zoom by this. Give exactly one of `factor` and `zoom`.","format":"double","type":["number","null"]},"zoom":{"default":null,"description":"Set the zoom to this.","format":"double","type":["number","null"]}},"title":"ZoomAtArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.zoom_in":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/CenterWord","description":"The word `\"viewport_center\"`."},{"description":"A screen point `[x, y]` in logical pixels from the top-left of the canvas.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where a zoom is anchored."},"CenterWord":{"description":"The only word `at` accepts.","oneOf":[{"const":"viewport_center","description":"The middle of the viewport.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.zoom_in` and `view.zoom_out`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"The screen point that stays fixed. Default: the viewport centre."}},"title":"ZoomStepArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.zoom_out":{"args":{"$defs":{"At":{"anyOf":[{"$ref":"#/$defs/CenterWord","description":"The word `\"viewport_center\"`."},{"description":"A screen point `[x, y]` in logical pixels from the top-left of the canvas.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"}],"description":"Where a zoom is anchored."},"CenterWord":{"description":"The only word `at` accepts.","oneOf":[{"const":"viewport_center","description":"The middle of the viewport.","type":"string"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.zoom_in` and `view.zoom_out`.","properties":{"at":{"$ref":"#/$defs/At","default":"viewport_center","description":"The screen point that stays fixed. Default: the viewport centre."}},"title":"ZoomStepArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.zoom_reset":{"args":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.zoom_reset`.","properties":{"recenter":{"default":false,"description":"Also move the centre of the content to the centre of the viewport.","type":"boolean"}},"title":"ZoomResetArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}},"view.zoom_to_fit":{"args":{"$defs":{"FitScope":{"description":"What `view.zoom_to_fit` fits.","oneOf":[{"const":"auto","description":"The selection if there is one, else everything.","type":"string"},{"const":"all","description":"All content.","type":"string"},{"const":"selection","description":"The selection.","type":"string"},{"const":"ids","description":"The elements in `ids`.","type":"string"},{"const":"rect","description":"The rectangle in `rect`.","type":"string"}]},"RectArg":{"additionalProperties":false,"description":"A world rectangle.","properties":{"h":{"description":"Height.","format":"double","type":"number"},"w":{"description":"Width.","format":"double","type":"number"},"x":{"description":"Left edge.","format":"double","type":"number"},"y":{"description":"Top edge.","format":"double","type":"number"}},"required":["x","y","w","h"],"type":"object"},"Ref":{"description":"An element reference in arguments: an id, or `\"@name\"` for the name set with `element.set_name`.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Arguments of `view.zoom_to_fit`.","properties":{"ids":{"default":null,"description":"The elements, for `scope: ids`.","items":{"$ref":"#/$defs/Ref"},"type":["array","null"]},"max_zoom":{"default":3.36,"description":"The largest zoom to use, so that one small element is not blown up.","format":"double","type":"number"},"padding":{"default":50.0,"description":"Screen pixels kept free around the content.","format":"double","type":"number"},"rect":{"anyOf":[{"$ref":"#/$defs/RectArg"},{"type":"null"}],"default":null,"description":"The rectangle, for `scope: rect`."},"scope":{"$ref":"#/$defs/FitScope","default":"auto","description":"What to fit."}},"title":"FitArgs","type":"object"},"output":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The camera after a view command.","properties":{"changed":{"description":"False when the camera was already as requested.","type":"boolean"},"percent":{"description":"The zoom as the UI shows it.","format":"double","type":"number"},"scroll":{"description":"The world point at the centre of the viewport.","items":{"format":"double","type":"number"},"maxItems":2,"minItems":2,"type":"array"},"zoom":{"description":"Screen pixels per world unit.","format":"double","type":"number"}},"required":["changed","scroll","zoom","percent"],"title":"CameraOut","type":"object"}}},"version":1}
