@dxos/react-ui-canvas 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/lib/index.mjs +9044 -1135
- package/dist/lib/index.mjs.map +1 -1
- package/dist/types/src/components/About/About.d.ts +13 -0
- package/dist/types/src/components/About/About.d.ts.map +1 -0
- package/dist/types/src/components/About/About.stories.d.ts +7 -0
- package/dist/types/src/components/About/About.stories.d.ts.map +1 -0
- package/dist/types/src/components/About/index.d.ts +2 -0
- package/dist/types/src/components/About/index.d.ts.map +1 -0
- package/dist/types/src/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/src/components/ControlFrame/ControlFrame.d.ts +8 -2
- package/dist/types/src/components/ControlFrame/ControlFrame.d.ts.map +1 -1
- package/dist/types/src/components/Layers/Layers.d.ts +30 -0
- package/dist/types/src/components/Layers/Layers.d.ts.map +1 -0
- package/dist/types/src/components/Layers/Layers.stories.d.ts +11 -0
- package/dist/types/src/components/Layers/Layers.stories.d.ts.map +1 -0
- package/dist/types/src/components/Layers/index.d.ts +2 -0
- package/dist/types/src/components/Layers/index.d.ts.map +1 -0
- package/dist/types/src/components/Palette/Palette.d.ts +20 -4
- package/dist/types/src/components/Palette/Palette.d.ts.map +1 -1
- package/dist/types/src/components/Palette/Palette.stories.d.ts +22 -0
- package/dist/types/src/components/Palette/Palette.stories.d.ts.map +1 -0
- package/dist/types/src/components/PartEditor/PartEditor.d.ts.map +1 -1
- package/dist/types/src/components/Properties/AlignField.d.ts +23 -0
- package/dist/types/src/components/Properties/AlignField.d.ts.map +1 -0
- package/dist/types/src/components/Properties/ClassField.d.ts +23 -0
- package/dist/types/src/components/Properties/ClassField.d.ts.map +1 -0
- package/dist/types/src/components/Properties/FontField.d.ts +7 -0
- package/dist/types/src/components/Properties/FontField.d.ts.map +1 -0
- package/dist/types/src/components/Properties/LayerField.d.ts +17 -0
- package/dist/types/src/components/Properties/LayerField.d.ts.map +1 -0
- package/dist/types/src/components/Properties/Properties.d.ts +27 -3
- package/dist/types/src/components/Properties/Properties.d.ts.map +1 -1
- package/dist/types/src/components/Properties/Properties.stories.d.ts +20 -0
- package/dist/types/src/components/Properties/Properties.stories.d.ts.map +1 -0
- package/dist/types/src/components/Properties/SceneField.d.ts +8 -0
- package/dist/types/src/components/Properties/SceneField.d.ts.map +1 -0
- package/dist/types/src/components/Properties/StyleGrid.d.ts +15 -5
- package/dist/types/src/components/Properties/StyleGrid.d.ts.map +1 -1
- package/dist/types/src/components/Properties/StyleGrid.stories.d.ts +7 -0
- package/dist/types/src/components/Properties/StyleGrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/SceneLayer/SceneLayer.d.ts +31 -7
- package/dist/types/src/components/SceneLayer/SceneLayer.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/Dock.d.ts +22 -0
- package/dist/types/src/components/SceneView/Dock.d.ts.map +1 -0
- package/dist/types/src/components/SceneView/Dock.stories.d.ts +15 -0
- package/dist/types/src/components/SceneView/Dock.stories.d.ts.map +1 -0
- package/dist/types/src/components/SceneView/SceneView.d.ts +33 -7
- package/dist/types/src/components/SceneView/SceneView.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/SceneView.stories.d.ts +16 -6
- package/dist/types/src/components/SceneView/SceneView.stories.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/SceneViewContext.d.ts +36 -4
- package/dist/types/src/components/SceneView/SceneViewContext.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/Scored.stories.d.ts +4 -4
- package/dist/types/src/components/SceneView/Scored.stories.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/usePointerMachine.d.ts +3 -1
- package/dist/types/src/components/SceneView/usePointerMachine.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/useSceneCamera.d.ts +2 -2
- package/dist/types/src/components/SceneView/useSceneCamera.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/useSceneClipboard.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/useSceneKeys.d.ts.map +1 -1
- package/dist/types/src/components/SceneView/useSceneNavigation.d.ts +7 -4
- package/dist/types/src/components/SceneView/useSceneNavigation.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useWheel.d.ts +5 -0
- package/dist/types/src/hooks/useWheel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +4 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/model/atoms.d.ts +21 -3
- package/dist/types/src/model/atoms.d.ts.map +1 -1
- package/dist/types/src/model/projection.d.ts.map +1 -1
- package/dist/types/src/model/projections/constrained.d.ts +2 -1
- package/dist/types/src/model/projections/constrained.d.ts.map +1 -1
- package/dist/types/src/model/projections/dynamic.d.ts.map +1 -1
- package/dist/types/src/model/projections/lattice.d.ts.map +1 -1
- package/dist/types/src/model/registry.d.ts +21 -3
- package/dist/types/src/model/registry.d.ts.map +1 -1
- package/dist/types/src/model/store.d.ts +10 -2
- package/dist/types/src/model/store.d.ts.map +1 -1
- package/dist/types/src/model/types.d.ts +699 -338
- package/dist/types/src/model/types.d.ts.map +1 -1
- package/dist/types/src/playwright/SceneManager.d.ts +1 -1
- package/dist/types/src/playwright/SceneManager.d.ts.map +1 -1
- package/dist/types/src/utils/builder.d.ts +22 -41
- package/dist/types/src/utils/builder.d.ts.map +1 -1
- package/dist/types/src/utils/camera.d.ts +19 -10
- package/dist/types/src/utils/camera.d.ts.map +1 -1
- package/dist/types/src/utils/clipboard.d.ts +4 -2
- package/dist/types/src/utils/clipboard.d.ts.map +1 -1
- package/dist/types/src/utils/diagram.d.ts.map +1 -1
- package/dist/types/src/utils/group.d.ts +14 -0
- package/dist/types/src/utils/group.d.ts.map +1 -0
- package/dist/types/src/utils/group.test.d.ts +2 -0
- package/dist/types/src/utils/group.test.d.ts.map +1 -0
- package/dist/types/src/utils/gutter-route.d.ts +7 -0
- package/dist/types/src/utils/gutter-route.d.ts.map +1 -1
- package/dist/types/src/utils/hit.d.ts +3 -20
- package/dist/types/src/utils/hit.d.ts.map +1 -1
- package/dist/types/src/utils/index.d.ts +3 -0
- package/dist/types/src/utils/index.d.ts.map +1 -1
- package/dist/types/src/utils/lattice.d.ts +5 -0
- package/dist/types/src/utils/lattice.d.ts.map +1 -1
- package/dist/types/src/utils/layers.d.ts +35 -0
- package/dist/types/src/utils/layers.d.ts.map +1 -0
- package/dist/types/src/utils/layers.test.d.ts +2 -0
- package/dist/types/src/utils/layers.test.d.ts.map +1 -0
- package/dist/types/src/utils/parts.d.ts +25 -9
- package/dist/types/src/utils/parts.d.ts.map +1 -1
- package/dist/types/src/utils/ports.d.ts +2 -0
- package/dist/types/src/utils/ports.d.ts.map +1 -1
- package/dist/types/src/utils/properties.d.ts +4 -3
- package/dist/types/src/utils/properties.d.ts.map +1 -1
- package/dist/types/src/utils/route.d.ts +5 -0
- package/dist/types/src/utils/route.d.ts.map +1 -1
- package/dist/types/src/utils/scenes.d.ts +14 -0
- package/dist/types/src/utils/scenes.d.ts.map +1 -0
- package/dist/types/src/utils/scenes.test.d.ts +2 -0
- package/dist/types/src/utils/scenes.test.d.ts.map +1 -0
- package/dist/types/src/utils/shapes.d.ts +23 -9
- package/dist/types/src/utils/shapes.d.ts.map +1 -1
- package/dist/types/src/utils/style.d.ts +29 -6
- package/dist/types/src/utils/style.d.ts.map +1 -1
- package/dist/types/src/utils/style.test.d.ts +2 -0
- package/dist/types/src/utils/style.test.d.ts.map +1 -0
- package/dist/types/src/utils/testing.d.ts +2 -2
- package/dist/types/src/utils/testing.d.ts.map +1 -1
- package/dist/types/src/utils/undo.d.ts +15 -4
- package/dist/types/src/utils/undo.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -26
- package/src/components/About/About.stories.tsx +32 -0
- package/src/components/About/About.tsx +38 -0
- package/src/components/About/index.ts +5 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +17 -3
- package/src/components/ControlFrame/ControlFrame.tsx +138 -82
- package/src/components/Grid/Grid.stories.tsx +1 -1
- package/src/components/Layers/Layers.stories.tsx +131 -0
- package/src/components/Layers/Layers.tsx +216 -0
- package/src/components/Layers/index.ts +5 -0
- package/src/components/Palette/Palette.stories.tsx +135 -0
- package/src/components/Palette/Palette.tsx +230 -39
- package/src/components/PartEditor/PartEditor.tsx +4 -3
- package/src/components/Properties/AlignField.tsx +117 -0
- package/src/components/Properties/ClassField.tsx +44 -0
- package/src/components/Properties/FontField.tsx +73 -0
- package/src/components/Properties/LayerField.tsx +61 -0
- package/src/components/Properties/Properties.stories.tsx +113 -0
- package/src/components/Properties/Properties.tsx +240 -60
- package/src/components/Properties/SceneField.tsx +22 -0
- package/src/components/Properties/StyleGrid.stories.tsx +50 -0
- package/src/components/Properties/StyleGrid.tsx +54 -26
- package/src/components/SceneLayer/SceneLayer.tsx +497 -188
- package/src/components/SceneView/Constrained.stories.tsx +1 -1
- package/src/components/SceneView/Dock.stories.tsx +95 -0
- package/src/components/SceneView/Dock.tsx +146 -0
- package/src/components/SceneView/Dynamic.stories.tsx +1 -1
- package/src/components/SceneView/SceneView.stories.tsx +170 -18
- package/src/components/SceneView/SceneView.tsx +565 -151
- package/src/components/SceneView/SceneViewContext.ts +23 -2
- package/src/components/SceneView/Scored.stories.tsx +11 -11
- package/src/components/SceneView/usePointerMachine.ts +80 -20
- package/src/components/SceneView/useSceneCamera.ts +15 -8
- package/src/components/SceneView/useSceneClipboard.ts +4 -0
- package/src/components/SceneView/useSceneKeys.ts +6 -4
- package/src/components/SceneView/useSceneNavigation.ts +44 -33
- package/src/components/Toolbar/Toolbar.stories.tsx +14 -15
- package/src/components/Toolbar/Toolbar.tsx +15 -4
- package/src/components/index.ts +2 -0
- package/src/hooks/useWheel.ts +35 -0
- package/src/index.ts +4 -3
- package/src/model/atoms.ts +27 -3
- package/src/model/projection.ts +5 -0
- package/src/model/projections/constrained.test.ts +18 -10
- package/src/model/projections/constrained.ts +19 -8
- package/src/model/projections/dynamic.ts +5 -2
- package/src/model/projections/lattice.ts +15 -3
- package/src/model/registry.test.ts +14 -9
- package/src/model/registry.ts +39 -34
- package/src/model/store.ts +12 -2
- package/src/model/types.ts +124 -36
- package/src/playwright/SceneManager.ts +2 -2
- package/src/playwright/create.spec.ts +5 -3
- package/src/playwright/demo.spec.ts +2 -2
- package/src/playwright/lattice.spec.ts +4 -5
- package/src/playwright/scene.spec.ts +27 -25
- package/src/utils/builder.test.ts +46 -9
- package/src/utils/builder.ts +42 -18
- package/src/utils/camera.test.ts +22 -51
- package/src/utils/camera.ts +39 -32
- package/src/utils/clipboard.test.ts +23 -2
- package/src/utils/clipboard.ts +8 -4
- package/src/utils/diagram.test.ts +3 -1
- package/src/utils/diagram.ts +3 -25
- package/src/utils/group.test.ts +69 -0
- package/src/utils/group.ts +94 -0
- package/src/utils/gutter-route.test.ts +49 -0
- package/src/utils/gutter-route.ts +142 -16
- package/src/utils/hit.test.ts +4 -38
- package/src/utils/hit.ts +4 -26
- package/src/utils/index.ts +3 -0
- package/src/utils/lattice.ts +7 -1
- package/src/utils/layers.test.ts +139 -0
- package/src/utils/layers.ts +175 -0
- package/src/utils/parts.test.ts +66 -32
- package/src/utils/parts.ts +63 -41
- package/src/utils/ports.ts +7 -4
- package/src/utils/properties.test.ts +23 -6
- package/src/utils/properties.ts +66 -16
- package/src/utils/route.test.ts +51 -2
- package/src/utils/route.ts +133 -23
- package/src/utils/scenes.test.ts +38 -0
- package/src/utils/scenes.ts +54 -0
- package/src/utils/shapes.test.ts +33 -8
- package/src/utils/shapes.ts +51 -35
- package/src/utils/style.test.ts +54 -0
- package/src/utils/style.ts +153 -40
- package/src/utils/testing.test.ts +3 -3
- package/src/utils/testing.ts +21 -30
- package/src/utils/undo.test.ts +25 -2
- package/src/utils/undo.ts +50 -13
- package/dist/lib/chunk-Grid.mjs +0 -99
- package/dist/lib/chunk-Grid.mjs.map +0 -1
- package/dist/lib/scene.mjs +0 -6835
- package/dist/lib/scene.mjs.map +0 -1
- package/dist/lib/types.mjs +0 -16
- package/dist/lib/types.mjs.map +0 -1
- package/dist/types/src/archive/components/Canvas/Canvas.d.ts +0 -15
- package/dist/types/src/archive/components/Canvas/Canvas.d.ts.map +0 -1
- package/dist/types/src/archive/components/Canvas/Canvas.stories.d.ts +0 -18
- package/dist/types/src/archive/components/Canvas/Canvas.stories.d.ts.map +0 -1
- package/dist/types/src/archive/components/Canvas/index.d.ts +0 -2
- package/dist/types/src/archive/components/Canvas/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/CellGrid.d.ts +0 -21
- package/dist/types/src/archive/components/CellGrid/CellGrid.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/CellGrid.stories.d.ts +0 -21
- package/dist/types/src/archive/components/CellGrid/CellGrid.stories.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/headers/Ruler.d.ts +0 -15
- package/dist/types/src/archive/components/CellGrid/headers/Ruler.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/headers/TrackHeader.d.ts +0 -19
- package/dist/types/src/archive/components/CellGrid/headers/TrackHeader.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/headers/index.d.ts +0 -3
- package/dist/types/src/archive/components/CellGrid/headers/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/index.d.ts +0 -6
- package/dist/types/src/archive/components/CellGrid/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/input/index.d.ts +0 -3
- package/dist/types/src/archive/components/CellGrid/input/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/input/pointer.d.ts +0 -33
- package/dist/types/src/archive/components/CellGrid/input/pointer.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/input/wheel.d.ts +0 -14
- package/dist/types/src/archive/components/CellGrid/input/wheel.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/render/index.d.ts +0 -3
- package/dist/types/src/archive/components/CellGrid/render/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/render/overlay-layer.d.ts +0 -21
- package/dist/types/src/archive/components/CellGrid/render/overlay-layer.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/render/static-layer.d.ts +0 -36
- package/dist/types/src/archive/components/CellGrid/render/static-layer.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/state/atoms.d.ts +0 -23
- package/dist/types/src/archive/components/CellGrid/state/atoms.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/state/index.d.ts +0 -4
- package/dist/types/src/archive/components/CellGrid/state/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/state/types.d.ts +0 -39
- package/dist/types/src/archive/components/CellGrid/state/types.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/state/viewport.d.ts +0 -52
- package/dist/types/src/archive/components/CellGrid/state/viewport.d.ts.map +0 -1
- package/dist/types/src/archive/components/CellGrid/state/viewport.test.d.ts +0 -2
- package/dist/types/src/archive/components/CellGrid/state/viewport.test.d.ts.map +0 -1
- package/dist/types/src/archive/components/FPS.d.ts +0 -9
- package/dist/types/src/archive/components/FPS.d.ts.map +0 -1
- package/dist/types/src/archive/components/Grid/Grid.d.ts +0 -6
- package/dist/types/src/archive/components/Grid/Grid.d.ts.map +0 -1
- package/dist/types/src/archive/components/Grid/index.d.ts +0 -2
- package/dist/types/src/archive/components/Grid/index.d.ts.map +0 -1
- package/dist/types/src/archive/components/index.d.ts +0 -5
- package/dist/types/src/archive/components/index.d.ts.map +0 -1
- package/dist/types/src/archive/hooks/index.d.ts +0 -5
- package/dist/types/src/archive/hooks/index.d.ts.map +0 -1
- package/dist/types/src/archive/hooks/projection.d.ts +0 -60
- package/dist/types/src/archive/hooks/projection.d.ts.map +0 -1
- package/dist/types/src/archive/hooks/useCanvasContext.d.ts +0 -13
- package/dist/types/src/archive/hooks/useCanvasContext.d.ts.map +0 -1
- package/dist/types/src/archive/hooks/useDrag.d.ts +0 -6
- package/dist/types/src/archive/hooks/useDrag.d.ts.map +0 -1
- package/dist/types/src/archive/hooks/useWheel.d.ts +0 -8
- package/dist/types/src/archive/hooks/useWheel.d.ts.map +0 -1
- package/dist/types/src/archive/index.d.ts +0 -5
- package/dist/types/src/archive/index.d.ts.map +0 -1
- package/dist/types/src/archive/types.d.ts +0 -19
- package/dist/types/src/archive/types.d.ts.map +0 -1
- package/dist/types/src/archive/util/index.d.ts +0 -4
- package/dist/types/src/archive/util/index.d.ts.map +0 -1
- package/dist/types/src/archive/util/svg-path.d.ts +0 -4
- package/dist/types/src/archive/util/svg-path.d.ts.map +0 -1
- package/dist/types/src/archive/util/svg.d.ts +0 -32
- package/dist/types/src/archive/util/svg.d.ts.map +0 -1
- package/dist/types/src/archive/util/svg.stories.d.ts +0 -15
- package/dist/types/src/archive/util/svg.stories.d.ts.map +0 -1
- package/dist/types/src/archive/util/util.d.ts +0 -17
- package/dist/types/src/archive/util/util.d.ts.map +0 -1
- package/dist/types/src/scene.d.ts +0 -5
- package/dist/types/src/scene.d.ts.map +0 -1
- package/src/archive/components/Canvas/Canvas.stories.tsx +0 -111
- package/src/archive/components/Canvas/Canvas.tsx +0 -87
- package/src/archive/components/Canvas/index.ts +0 -5
- package/src/archive/components/CellGrid/CellGrid.stories.tsx +0 -239
- package/src/archive/components/CellGrid/CellGrid.tsx +0 -270
- package/src/archive/components/CellGrid/headers/Ruler.tsx +0 -71
- package/src/archive/components/CellGrid/headers/TrackHeader.tsx +0 -58
- package/src/archive/components/CellGrid/headers/index.ts +0 -6
- package/src/archive/components/CellGrid/index.ts +0 -9
- package/src/archive/components/CellGrid/input/index.ts +0 -6
- package/src/archive/components/CellGrid/input/pointer.ts +0 -236
- package/src/archive/components/CellGrid/input/wheel.ts +0 -68
- package/src/archive/components/CellGrid/render/index.ts +0 -6
- package/src/archive/components/CellGrid/render/overlay-layer.ts +0 -66
- package/src/archive/components/CellGrid/render/static-layer.ts +0 -112
- package/src/archive/components/CellGrid/state/atoms.ts +0 -43
- package/src/archive/components/CellGrid/state/index.ts +0 -7
- package/src/archive/components/CellGrid/state/types.ts +0 -40
- package/src/archive/components/CellGrid/state/viewport.test.ts +0 -50
- package/src/archive/components/CellGrid/state/viewport.ts +0 -94
- package/src/archive/components/FPS.tsx +0 -98
- package/src/archive/components/Grid/Grid.tsx +0 -17
- package/src/archive/components/Grid/index.ts +0 -5
- package/src/archive/components/index.ts +0 -8
- package/src/archive/hooks/index.ts +0 -8
- package/src/archive/hooks/projection.tsx +0 -156
- package/src/archive/hooks/useCanvasContext.ts +0 -32
- package/src/archive/hooks/useDrag.tsx +0 -96
- package/src/archive/hooks/useWheel.tsx +0 -80
- package/src/archive/index.ts +0 -8
- package/src/archive/types.ts +0 -14
- package/src/archive/util/index.ts +0 -7
- package/src/archive/util/svg-path.ts +0 -13
- package/src/archive/util/svg.stories.tsx +0 -46
- package/src/archive/util/svg.tsx +0 -128
- package/src/archive/util/util.ts +0 -50
- package/src/scene.ts +0 -9
|
@@ -48,24 +48,88 @@ export declare const Port: Schema.Struct<{
|
|
|
48
48
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
49
49
|
}>;
|
|
50
50
|
export type Port = Schema.Schema.Type<typeof Port>;
|
|
51
|
-
/**
|
|
51
|
+
/** The hues the style pickers offer, neutral first, then in hue order; any theme hue still renders on a node. */
|
|
52
|
+
export declare const STYLE_HUES: readonly ['neutral', 'red', 'orange', 'amber', 'green', 'teal', 'sky', 'blue', 'violet'];
|
|
53
|
+
export declare const StyleHue: Schema.Literals<readonly ["neutral", "red", "orange", "amber", "green", "teal", "sky", "blue", "violet"]>;
|
|
54
|
+
export type StyleHue = Schema.Schema.Type<typeof StyleHue>;
|
|
55
|
+
/** How strongly a hue fills a frame: 0 is an outline (transparent), 1 to 3 are stronger to lighter fills. */
|
|
52
56
|
export declare const NodeTone: Schema.Literals<readonly [0, 1, 2, 3]>;
|
|
53
57
|
export type NodeTone = Schema.Schema.Type<typeof NodeTone>;
|
|
54
|
-
/**
|
|
58
|
+
/** The typefaces a shape's text may use: the theme's body face, or its fixed-width one. */
|
|
59
|
+
export declare const FONT_FAMILIES: readonly ['default', 'monospace'];
|
|
60
|
+
export type FontFamily = (typeof FONT_FAMILIES)[number];
|
|
61
|
+
/** Where text sits across a shape, and down it. */
|
|
62
|
+
export declare const HORIZONTAL_ALIGNS: readonly ['left', 'center', 'right'];
|
|
63
|
+
export declare const VERTICAL_ALIGNS: readonly ['top', 'middle', 'bottom'];
|
|
64
|
+
export type HorizontalAlign = (typeof HORIZONTAL_ALIGNS)[number];
|
|
65
|
+
export type VerticalAlign = (typeof VERTICAL_ALIGNS)[number];
|
|
66
|
+
/** How a line is drawn: a link's stroke, or a node's border. */
|
|
67
|
+
export declare const LINE_STYLES: readonly ['solid', 'dashed', 'dotted'];
|
|
68
|
+
/**
|
|
69
|
+
* The common base style every element shares, nodes and links alike: its colour and its line. Each kind extends it
|
|
70
|
+
* (`NodeStyle`), and a selection of several kinds edits only what they share. One field object per property, so
|
|
71
|
+
* the kinds declare the same field and the properties panel sees it as shared.
|
|
72
|
+
*/
|
|
73
|
+
export declare const lineStyleFields: {
|
|
74
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
75
|
+
hue: Schema.optional<Schema.String>;
|
|
76
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
77
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
78
|
+
};
|
|
79
|
+
/** A link's style: the common base, unset drawn neutral and solid. */
|
|
80
|
+
export declare const LineStyle: Schema.Struct<{
|
|
81
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
82
|
+
hue: Schema.optional<Schema.String>;
|
|
83
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
84
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
85
|
+
}>;
|
|
86
|
+
export type LineStyle = Schema.Schema.Type<typeof LineStyle>;
|
|
87
|
+
/**
|
|
88
|
+
* The common base plus a frame and text: what a shape draws. A shape with more to style extends it
|
|
89
|
+
* (`Schema.Struct({ ...styleFields, … })`).
|
|
90
|
+
*/
|
|
91
|
+
export declare const styleFields: {
|
|
92
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
93
|
+
hue: Schema.optional<Schema.String>;
|
|
94
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
95
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
96
|
+
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
97
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
98
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
99
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
100
|
+
border: Schema.optional<Schema.Boolean>;
|
|
101
|
+
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
102
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
103
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
104
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
105
|
+
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
106
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
107
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
108
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
109
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
110
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
111
|
+
};
|
|
112
|
+
/** Presentation choices a node carries: the shape style. */
|
|
55
113
|
export declare const NodeStyle: Schema.Struct<{
|
|
56
|
-
/** One of the theme's hues
|
|
57
|
-
|
|
114
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
115
|
+
hue: Schema.optional<Schema.String>;
|
|
116
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
117
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
58
118
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
119
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
120
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
121
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
122
|
+
border: Schema.optional<Schema.Boolean>;
|
|
63
123
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
64
|
-
|
|
124
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
125
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
126
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
65
127
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
128
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
129
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
130
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
131
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
132
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
69
133
|
}>;
|
|
70
134
|
export type NodeStyle = Schema.Schema.Type<typeof NodeStyle>;
|
|
71
135
|
/** The fields every node type shares; a type's schema is `Schema.Struct({ ...nodeBase, type: Literal, ... })`. */
|
|
@@ -92,20 +156,30 @@ export declare const nodeBase: {
|
|
|
92
156
|
}>>>;
|
|
93
157
|
/** Ports spread along each side, overriding the type's layout; ignored when the node carries `ports`. */
|
|
94
158
|
portsPerSide: Schema.optional<Schema.Number>;
|
|
159
|
+
/** A style class of the drawing (`StyleClass`) the node takes its look from; its own `style` wins over it. */
|
|
160
|
+
/** The scene layer the element is on; unset, or naming no layer of the scene, it is on the bottom one. */
|
|
161
|
+
layer: Schema.optional<Schema.String>;
|
|
162
|
+
class: Schema.optional<Schema.String>;
|
|
95
163
|
style: Schema.optional<Schema.Struct<{
|
|
96
|
-
/** One of the theme's hues
|
|
97
|
-
|
|
164
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
165
|
+
hue: Schema.optional<Schema.String>;
|
|
166
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
167
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
98
168
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
169
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
170
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
171
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
172
|
+
border: Schema.optional<Schema.Boolean>;
|
|
103
173
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
104
|
-
|
|
174
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
175
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
176
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
105
177
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
|
|
178
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
179
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
180
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
181
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
182
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
109
183
|
}>>;
|
|
110
184
|
};
|
|
111
185
|
/** Any node as the engine sees it: the shared fields and a type name; the registry knows the rest. */
|
|
@@ -128,20 +202,28 @@ export declare const NodeBase: Schema.Struct<{
|
|
|
128
202
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
129
203
|
}>>>;
|
|
130
204
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
205
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
206
|
+
readonly class: Schema.optional<Schema.String>;
|
|
131
207
|
readonly style: Schema.optional<Schema.Struct<{
|
|
132
|
-
/** One of the theme's hues
|
|
133
|
-
|
|
208
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
209
|
+
hue: Schema.optional<Schema.String>;
|
|
210
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
211
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
134
212
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
213
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
214
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
215
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
216
|
+
border: Schema.optional<Schema.Boolean>;
|
|
139
217
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
140
|
-
|
|
218
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
219
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
220
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
141
221
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
222
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
223
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
224
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
225
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
226
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
145
227
|
}>>;
|
|
146
228
|
readonly type: Schema.String;
|
|
147
229
|
}>;
|
|
@@ -150,7 +232,12 @@ export type NodeBase = Schema.Schema.Type<typeof NodeBase>;
|
|
|
150
232
|
export declare const boxFields: {
|
|
151
233
|
label: Schema.optional<Schema.String>;
|
|
152
234
|
};
|
|
153
|
-
|
|
235
|
+
/**
|
|
236
|
+
* The core base every node falls back to: its frame, ports, style and `label`. A node whose type the registry does
|
|
237
|
+
* not know (its plugin is off) is drawn and edited as this, a box showing its label, so a type that keeps its title
|
|
238
|
+
* in `label` still reads as itself.
|
|
239
|
+
*/
|
|
240
|
+
export declare const BaseNode: Schema.Struct<{
|
|
154
241
|
readonly id: Schema.String;
|
|
155
242
|
readonly z: Schema.String;
|
|
156
243
|
readonly locked: Schema.optional<Schema.Boolean>;
|
|
@@ -169,27 +256,34 @@ export declare const RectNode: Schema.Struct<{
|
|
|
169
256
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
170
257
|
}>>>;
|
|
171
258
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
259
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
260
|
+
readonly class: Schema.optional<Schema.String>;
|
|
172
261
|
readonly style: Schema.optional<Schema.Struct<{
|
|
173
|
-
/** One of the theme's hues
|
|
174
|
-
|
|
262
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
263
|
+
hue: Schema.optional<Schema.String>;
|
|
264
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
265
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
175
266
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
267
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
268
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
269
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
270
|
+
border: Schema.optional<Schema.Boolean>;
|
|
180
271
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
181
|
-
|
|
272
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
273
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
274
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
182
275
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
|
|
276
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
277
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
278
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
279
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
280
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
186
281
|
}>>;
|
|
187
282
|
readonly label: Schema.optional<Schema.String>;
|
|
188
|
-
readonly type: Schema.
|
|
283
|
+
readonly type: Schema.String;
|
|
189
284
|
}>;
|
|
190
|
-
export type
|
|
191
|
-
|
|
192
|
-
export declare const EllipseNode: Schema.Struct<{
|
|
285
|
+
export type BaseNode = Schema.Schema.Type<typeof BaseNode>;
|
|
286
|
+
export declare const RectNode: Schema.Struct<{
|
|
193
287
|
readonly id: Schema.String;
|
|
194
288
|
readonly z: Schema.String;
|
|
195
289
|
readonly locked: Schema.optional<Schema.Boolean>;
|
|
@@ -208,27 +302,35 @@ export declare const EllipseNode: Schema.Struct<{
|
|
|
208
302
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
209
303
|
}>>>;
|
|
210
304
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
305
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
306
|
+
readonly class: Schema.optional<Schema.String>;
|
|
211
307
|
readonly style: Schema.optional<Schema.Struct<{
|
|
212
|
-
/** One of the theme's hues
|
|
213
|
-
|
|
308
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
309
|
+
hue: Schema.optional<Schema.String>;
|
|
310
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
311
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
214
312
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
313
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
314
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
315
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
316
|
+
border: Schema.optional<Schema.Boolean>;
|
|
219
317
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
220
|
-
|
|
318
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
319
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
320
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
221
321
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
|
|
322
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
323
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
324
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
325
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
326
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
225
327
|
}>>;
|
|
226
|
-
readonly type: Schema.Literal<"ellipse">;
|
|
227
328
|
readonly label: Schema.optional<Schema.String>;
|
|
329
|
+
readonly type: Schema.Literal<"rect">;
|
|
228
330
|
}>;
|
|
229
|
-
export type
|
|
230
|
-
/**
|
|
231
|
-
export declare const
|
|
331
|
+
export type RectNode = Schema.Schema.Type<typeof RectNode>;
|
|
332
|
+
/** An ellipse inscribed in the frame. */
|
|
333
|
+
export declare const EllipseNode: Schema.Struct<{
|
|
232
334
|
readonly id: Schema.String;
|
|
233
335
|
readonly z: Schema.String;
|
|
234
336
|
readonly locked: Schema.optional<Schema.Boolean>;
|
|
@@ -247,27 +349,33 @@ export declare const ClassNode: Schema.Struct<{
|
|
|
247
349
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
248
350
|
}>>>;
|
|
249
351
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
352
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
353
|
+
readonly class: Schema.optional<Schema.String>;
|
|
250
354
|
readonly style: Schema.optional<Schema.Struct<{
|
|
251
|
-
/** One of the theme's hues
|
|
252
|
-
|
|
355
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
356
|
+
hue: Schema.optional<Schema.String>;
|
|
357
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
358
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
253
359
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
360
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
361
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
362
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
363
|
+
border: Schema.optional<Schema.Boolean>;
|
|
258
364
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
259
|
-
|
|
365
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
366
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
367
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
260
368
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
|
|
369
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
370
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
371
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
372
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
373
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
264
374
|
}>>;
|
|
265
|
-
readonly type: Schema.Literal<"
|
|
266
|
-
readonly
|
|
267
|
-
readonly attributes: Schema.$Array<Schema.String>;
|
|
268
|
-
readonly methods: Schema.$Array<Schema.String>;
|
|
375
|
+
readonly type: Schema.Literal<"ellipse">;
|
|
376
|
+
readonly label: Schema.optional<Schema.String>;
|
|
269
377
|
}>;
|
|
270
|
-
export type
|
|
378
|
+
export type EllipseNode = Schema.Schema.Type<typeof EllipseNode>;
|
|
271
379
|
/** Free text on the canvas. Named for what it is, so a host may keep `text` for a type of its own. */
|
|
272
380
|
export declare const NoteNode: Schema.Struct<{
|
|
273
381
|
readonly id: Schema.String;
|
|
@@ -288,27 +396,35 @@ export declare const NoteNode: Schema.Struct<{
|
|
|
288
396
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
289
397
|
}>>>;
|
|
290
398
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
399
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
400
|
+
readonly class: Schema.optional<Schema.String>;
|
|
291
401
|
readonly style: Schema.optional<Schema.Struct<{
|
|
292
|
-
/** One of the theme's hues
|
|
293
|
-
|
|
402
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
403
|
+
hue: Schema.optional<Schema.String>;
|
|
404
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
405
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
294
406
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
407
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
408
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
409
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
410
|
+
border: Schema.optional<Schema.Boolean>;
|
|
299
411
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
300
|
-
|
|
412
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
413
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
414
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
301
415
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
|
|
416
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
417
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
418
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
419
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
420
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
305
421
|
}>>;
|
|
306
422
|
readonly type: Schema.Literal<"note">;
|
|
307
423
|
readonly text: Schema.String;
|
|
308
424
|
}>;
|
|
309
425
|
export type NoteNode = Schema.Schema.Type<typeof NoteNode>;
|
|
310
|
-
/**
|
|
311
|
-
export declare const
|
|
426
|
+
/** A frame onto the next depth: renders its child scene scaled into this node's bounds. */
|
|
427
|
+
export declare const FrameNode: Schema.Struct<{
|
|
312
428
|
readonly id: Schema.String;
|
|
313
429
|
readonly z: Schema.String;
|
|
314
430
|
readonly locked: Schema.optional<Schema.Boolean>;
|
|
@@ -327,28 +443,36 @@ export declare const PortalNode: Schema.Struct<{
|
|
|
327
443
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
328
444
|
}>>>;
|
|
329
445
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
446
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
447
|
+
readonly class: Schema.optional<Schema.String>;
|
|
330
448
|
readonly style: Schema.optional<Schema.Struct<{
|
|
331
|
-
/** One of the theme's hues
|
|
332
|
-
|
|
449
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
450
|
+
hue: Schema.optional<Schema.String>;
|
|
451
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
452
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
333
453
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
454
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
455
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
456
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
457
|
+
border: Schema.optional<Schema.Boolean>;
|
|
338
458
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
339
|
-
|
|
459
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
460
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
461
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
340
462
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
|
|
463
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
464
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
465
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
466
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
467
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
344
468
|
}>>;
|
|
345
469
|
readonly label: Schema.optional<Schema.String>;
|
|
346
|
-
readonly type: Schema.Literal<"
|
|
470
|
+
readonly type: Schema.Literal<"frame">;
|
|
347
471
|
readonly scene: Schema.String;
|
|
348
472
|
/** Draw the child scene inside the frame rather than the label; unset, it does so while there is no label. */
|
|
349
473
|
readonly contents: Schema.optional<Schema.Boolean>;
|
|
350
474
|
}>;
|
|
351
|
-
export type
|
|
475
|
+
export type FrameNode = Schema.Schema.Type<typeof FrameNode>;
|
|
352
476
|
/** The engine's own node types. A host may add its own (decision 1); those are `NodeBase` to the engine. */
|
|
353
477
|
export declare const BuiltinNode: Schema.Union<readonly [Schema.Struct<{
|
|
354
478
|
readonly id: Schema.String;
|
|
@@ -369,20 +493,28 @@ export declare const BuiltinNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
369
493
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
370
494
|
}>>>;
|
|
371
495
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
496
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
497
|
+
readonly class: Schema.optional<Schema.String>;
|
|
372
498
|
readonly style: Schema.optional<Schema.Struct<{
|
|
373
|
-
/** One of the theme's hues
|
|
374
|
-
|
|
499
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
500
|
+
hue: Schema.optional<Schema.String>;
|
|
501
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
502
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
375
503
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
504
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
505
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
506
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
507
|
+
border: Schema.optional<Schema.Boolean>;
|
|
380
508
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
381
|
-
|
|
509
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
510
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
511
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
382
512
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
|
|
513
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
514
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
515
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
516
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
517
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
386
518
|
}>>;
|
|
387
519
|
readonly label: Schema.optional<Schema.String>;
|
|
388
520
|
readonly type: Schema.Literal<"rect">;
|
|
@@ -405,20 +537,28 @@ export declare const BuiltinNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
405
537
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
406
538
|
}>>>;
|
|
407
539
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
540
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
541
|
+
readonly class: Schema.optional<Schema.String>;
|
|
408
542
|
readonly style: Schema.optional<Schema.Struct<{
|
|
409
|
-
/** One of the theme's hues
|
|
410
|
-
|
|
543
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
544
|
+
hue: Schema.optional<Schema.String>;
|
|
545
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
546
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
411
547
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
548
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
549
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
550
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
551
|
+
border: Schema.optional<Schema.Boolean>;
|
|
416
552
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
417
|
-
|
|
553
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
554
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
555
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
418
556
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
|
|
557
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
558
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
559
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
560
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
561
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
422
562
|
}>>;
|
|
423
563
|
readonly type: Schema.Literal<"ellipse">;
|
|
424
564
|
readonly label: Schema.optional<Schema.String>;
|
|
@@ -441,58 +581,28 @@ export declare const BuiltinNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
441
581
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
442
582
|
}>>>;
|
|
443
583
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
584
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
585
|
+
readonly class: Schema.optional<Schema.String>;
|
|
444
586
|
readonly style: Schema.optional<Schema.Struct<{
|
|
445
|
-
/** One of the theme's hues
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
readonly rounded: Schema.optional<Schema.Boolean>;
|
|
450
|
-
readonly fill: Schema.optional<Schema.Boolean>;
|
|
451
|
-
readonly border: Schema.optional<Schema.Boolean>;
|
|
452
|
-
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
453
|
-
readonly guide: Schema.optional<Schema.Boolean>;
|
|
454
|
-
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
455
|
-
readonly fontSize: Schema.optional<Schema.Number>;
|
|
456
|
-
/** Extra classes on the frame, for a host's own look. */
|
|
457
|
-
readonly className: Schema.optional<Schema.String>;
|
|
458
|
-
}>>;
|
|
459
|
-
readonly type: Schema.Literal<"class">;
|
|
460
|
-
readonly name: Schema.String;
|
|
461
|
-
readonly attributes: Schema.$Array<Schema.String>;
|
|
462
|
-
readonly methods: Schema.$Array<Schema.String>;
|
|
463
|
-
}>, Schema.Struct<{
|
|
464
|
-
readonly id: Schema.String;
|
|
465
|
-
readonly z: Schema.String;
|
|
466
|
-
readonly locked: Schema.optional<Schema.Boolean>;
|
|
467
|
-
readonly center: Schema.Struct<{
|
|
468
|
-
readonly x: Schema.Number;
|
|
469
|
-
readonly y: Schema.Number;
|
|
470
|
-
}>;
|
|
471
|
-
readonly size: Schema.Struct<{
|
|
472
|
-
readonly width: Schema.Number;
|
|
473
|
-
readonly height: Schema.Number;
|
|
474
|
-
}>;
|
|
475
|
-
readonly ports: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
476
|
-
readonly id: Schema.String;
|
|
477
|
-
readonly side: Schema.Literals<readonly ["n", "e", "s", "w"]>;
|
|
478
|
-
readonly offset: Schema.Number;
|
|
479
|
-
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
480
|
-
}>>>;
|
|
481
|
-
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
482
|
-
readonly style: Schema.optional<Schema.Struct<{
|
|
483
|
-
/** One of the theme's hues, colouring fill, text and border together. */
|
|
484
|
-
readonly hue: Schema.optional<Schema.String>;
|
|
587
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
588
|
+
hue: Schema.optional<Schema.String>;
|
|
589
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
590
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
485
591
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
592
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
593
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
594
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
595
|
+
border: Schema.optional<Schema.Boolean>;
|
|
490
596
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
491
|
-
|
|
597
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
598
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
599
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
492
600
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
|
|
601
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
602
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
603
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
604
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
605
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
496
606
|
}>>;
|
|
497
607
|
readonly type: Schema.Literal<"note">;
|
|
498
608
|
readonly text: Schema.String;
|
|
@@ -515,23 +625,31 @@ export declare const BuiltinNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
515
625
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
516
626
|
}>>>;
|
|
517
627
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
628
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
629
|
+
readonly class: Schema.optional<Schema.String>;
|
|
518
630
|
readonly style: Schema.optional<Schema.Struct<{
|
|
519
|
-
/** One of the theme's hues
|
|
520
|
-
|
|
631
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
632
|
+
hue: Schema.optional<Schema.String>;
|
|
633
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
634
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
521
635
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
636
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
637
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
638
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
639
|
+
border: Schema.optional<Schema.Boolean>;
|
|
526
640
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
527
|
-
|
|
641
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
642
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
643
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
528
644
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
|
|
645
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
646
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
647
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
648
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
649
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
532
650
|
}>>;
|
|
533
651
|
readonly label: Schema.optional<Schema.String>;
|
|
534
|
-
readonly type: Schema.Literal<"
|
|
652
|
+
readonly type: Schema.Literal<"frame">;
|
|
535
653
|
readonly scene: Schema.String;
|
|
536
654
|
/** Draw the child scene inside the frame rather than the label; unset, it does so while there is no label. */
|
|
537
655
|
readonly contents: Schema.optional<Schema.Boolean>;
|
|
@@ -546,13 +664,12 @@ export type NodeType = string;
|
|
|
546
664
|
/** Narrows a node to one built-in type; sound because the registry maps each type name to one schema. */
|
|
547
665
|
export declare const isRectNode: (node: NodeBase) => node is RectNode;
|
|
548
666
|
export declare const isEllipseNode: (node: NodeBase) => node is EllipseNode;
|
|
549
|
-
export declare const isClassNode: (node: NodeBase) => node is ClassNode;
|
|
550
667
|
export declare const isNoteNode: (node: NodeBase) => node is NoteNode;
|
|
551
|
-
export declare const
|
|
668
|
+
export declare const isFrameNode: (node: NodeBase) => node is FrameNode;
|
|
552
669
|
/** A node built on the `box` prototype, carrying a centred, editable label. */
|
|
553
|
-
export declare const isBoxNode: (node: NodeBase) => node is RectNode |
|
|
554
|
-
/** Whether a
|
|
555
|
-
export declare const showsContents: (node:
|
|
670
|
+
export declare const isBoxNode: (node: NodeBase) => node is RectNode | FrameNode;
|
|
671
|
+
/** Whether a frame draws its child scene: as set, else while it has no label to show instead. */
|
|
672
|
+
export declare const showsContents: (node: FrameNode) => boolean;
|
|
556
673
|
export declare const isBuiltinNode: (node: NodeBase) => node is BuiltinNode;
|
|
557
674
|
/** A link end on a node; no `port` means automatic (the closest appropriate pair, recomputed on every projection). */
|
|
558
675
|
export declare const PortEndpoint: Schema.Struct<{
|
|
@@ -582,15 +699,48 @@ export declare const isPointEndpoint: (end: Endpoint) => end is PointEndpoint;
|
|
|
582
699
|
/** The node an end is attached to; a free end has none. */
|
|
583
700
|
export declare const endpointNode: (end: Endpoint) => NodeId | undefined;
|
|
584
701
|
/** What is drawn at a link end. */
|
|
585
|
-
|
|
702
|
+
/** An end marker: a filled `arrow`, a `circle`, or a hollow `triangle` (inheritance). */
|
|
703
|
+
export declare const Marker: Schema.Literals<readonly ["arrow", "circle", "triangle"]>;
|
|
586
704
|
export type Marker = Schema.Schema.Type<typeof Marker>;
|
|
587
705
|
/** Markers at the source (`start`) and target (`end`) of a link. */
|
|
588
706
|
/** A link's end markers; the properties form shows them side by side, as the two ends of the line. */
|
|
589
707
|
export declare const LinkEnds: Schema.Struct<{
|
|
590
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
591
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
708
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
709
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
592
710
|
}>;
|
|
593
711
|
export type LinkEnds = Schema.Schema.Type<typeof LinkEnds>;
|
|
712
|
+
/**
|
|
713
|
+
* A named look of a drawing, kept beside its scenes: the nodes and links naming it derive their `style` from it (a
|
|
714
|
+
* link takes the common base, its colour and line style), so one class restyles both together.
|
|
715
|
+
*/
|
|
716
|
+
export declare const StyleClass: Schema.Struct<{
|
|
717
|
+
readonly id: Schema.String;
|
|
718
|
+
readonly name: Schema.String;
|
|
719
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
720
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
721
|
+
hue: Schema.optional<Schema.String>;
|
|
722
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
723
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
724
|
+
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
725
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
726
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
727
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
728
|
+
border: Schema.optional<Schema.Boolean>;
|
|
729
|
+
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
730
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
731
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
732
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
733
|
+
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
734
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
735
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
736
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
737
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
738
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
739
|
+
}>>;
|
|
740
|
+
}>;
|
|
741
|
+
export type StyleClass = Schema.Schema.Type<typeof StyleClass>;
|
|
742
|
+
/** A drawing's style classes by id. */
|
|
743
|
+
export type StyleMap = Readonly<Record<string, StyleClass>>;
|
|
594
744
|
export declare const LineLink: Schema.Struct<{
|
|
595
745
|
readonly id: Schema.String;
|
|
596
746
|
readonly z: Schema.String;
|
|
@@ -613,10 +763,18 @@ export declare const LineLink: Schema.Struct<{
|
|
|
613
763
|
readonly y: Schema.Number;
|
|
614
764
|
}>;
|
|
615
765
|
}>]>;
|
|
616
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
617
766
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
618
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
619
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
767
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
768
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
769
|
+
}>>;
|
|
770
|
+
readonly text: Schema.optional<Schema.String>;
|
|
771
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
772
|
+
readonly class: Schema.optional<Schema.String>;
|
|
773
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
774
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
775
|
+
hue: Schema.optional<Schema.String>;
|
|
776
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
777
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
620
778
|
}>>;
|
|
621
779
|
readonly type: Schema.Literal<"line">;
|
|
622
780
|
}>;
|
|
@@ -644,10 +802,18 @@ export declare const CurveLink: Schema.Struct<{
|
|
|
644
802
|
readonly y: Schema.Number;
|
|
645
803
|
}>;
|
|
646
804
|
}>]>;
|
|
647
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
648
805
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
649
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
650
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
806
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
807
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
808
|
+
}>>;
|
|
809
|
+
readonly text: Schema.optional<Schema.String>;
|
|
810
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
811
|
+
readonly class: Schema.optional<Schema.String>;
|
|
812
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
813
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
814
|
+
hue: Schema.optional<Schema.String>;
|
|
815
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
816
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
651
817
|
}>>;
|
|
652
818
|
readonly type: Schema.Literal<"curve">;
|
|
653
819
|
}>;
|
|
@@ -675,10 +841,18 @@ export declare const SplineLink: Schema.Struct<{
|
|
|
675
841
|
readonly y: Schema.Number;
|
|
676
842
|
}>;
|
|
677
843
|
}>]>;
|
|
678
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
679
844
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
680
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
681
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
845
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
846
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
847
|
+
}>>;
|
|
848
|
+
readonly text: Schema.optional<Schema.String>;
|
|
849
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
850
|
+
readonly class: Schema.optional<Schema.String>;
|
|
851
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
852
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
853
|
+
hue: Schema.optional<Schema.String>;
|
|
854
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
855
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
682
856
|
}>>;
|
|
683
857
|
readonly type: Schema.Literal<"spline">;
|
|
684
858
|
readonly points: Schema.$Array<Schema.Struct<{
|
|
@@ -713,10 +887,18 @@ export declare const SmartLink: Schema.Struct<{
|
|
|
713
887
|
readonly y: Schema.Number;
|
|
714
888
|
}>;
|
|
715
889
|
}>]>;
|
|
716
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
717
890
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
718
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
719
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
891
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
892
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
893
|
+
}>>;
|
|
894
|
+
readonly text: Schema.optional<Schema.String>;
|
|
895
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
896
|
+
readonly class: Schema.optional<Schema.String>;
|
|
897
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
898
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
899
|
+
hue: Schema.optional<Schema.String>;
|
|
900
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
901
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
720
902
|
}>>;
|
|
721
903
|
readonly type: Schema.Literal<"smart">;
|
|
722
904
|
}>;
|
|
@@ -743,10 +925,18 @@ export declare const Link: Schema.Union<readonly [Schema.Struct<{
|
|
|
743
925
|
readonly y: Schema.Number;
|
|
744
926
|
}>;
|
|
745
927
|
}>]>;
|
|
746
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
747
928
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
748
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
749
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
929
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
930
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
931
|
+
}>>;
|
|
932
|
+
readonly text: Schema.optional<Schema.String>;
|
|
933
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
934
|
+
readonly class: Schema.optional<Schema.String>;
|
|
935
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
936
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
937
|
+
hue: Schema.optional<Schema.String>;
|
|
938
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
939
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
750
940
|
}>>;
|
|
751
941
|
readonly type: Schema.Literal<"line">;
|
|
752
942
|
}>, Schema.Struct<{
|
|
@@ -771,10 +961,18 @@ export declare const Link: Schema.Union<readonly [Schema.Struct<{
|
|
|
771
961
|
readonly y: Schema.Number;
|
|
772
962
|
}>;
|
|
773
963
|
}>]>;
|
|
774
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
775
964
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
776
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
777
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
965
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
966
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
967
|
+
}>>;
|
|
968
|
+
readonly text: Schema.optional<Schema.String>;
|
|
969
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
970
|
+
readonly class: Schema.optional<Schema.String>;
|
|
971
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
972
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
973
|
+
hue: Schema.optional<Schema.String>;
|
|
974
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
975
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
778
976
|
}>>;
|
|
779
977
|
readonly type: Schema.Literal<"curve">;
|
|
780
978
|
}>, Schema.Struct<{
|
|
@@ -799,10 +997,18 @@ export declare const Link: Schema.Union<readonly [Schema.Struct<{
|
|
|
799
997
|
readonly y: Schema.Number;
|
|
800
998
|
}>;
|
|
801
999
|
}>]>;
|
|
802
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
803
1000
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
804
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
805
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1001
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1002
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1003
|
+
}>>;
|
|
1004
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1005
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1006
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1007
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1008
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1009
|
+
hue: Schema.optional<Schema.String>;
|
|
1010
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1011
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
806
1012
|
}>>;
|
|
807
1013
|
readonly type: Schema.Literal<"spline">;
|
|
808
1014
|
readonly points: Schema.$Array<Schema.Struct<{
|
|
@@ -831,10 +1037,18 @@ export declare const Link: Schema.Union<readonly [Schema.Struct<{
|
|
|
831
1037
|
readonly y: Schema.Number;
|
|
832
1038
|
}>;
|
|
833
1039
|
}>]>;
|
|
834
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
835
1040
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
836
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
837
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1041
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1042
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1043
|
+
}>>;
|
|
1044
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1045
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1046
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1047
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1048
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1049
|
+
hue: Schema.optional<Schema.String>;
|
|
1050
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1051
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
838
1052
|
}>>;
|
|
839
1053
|
readonly type: Schema.Literal<"smart">;
|
|
840
1054
|
}>]>;
|
|
@@ -842,10 +1056,24 @@ export type Link = Schema.Schema.Type<typeof Link>;
|
|
|
842
1056
|
export type LinkType = Link['type'];
|
|
843
1057
|
export declare const LINK_TYPES: readonly LinkType[];
|
|
844
1058
|
export type Element = Node | Link;
|
|
845
|
-
/** The markers a link draws
|
|
1059
|
+
/** The markers a link draws. */
|
|
846
1060
|
export declare const linkMarkers: (link: Link) => LinkEnds;
|
|
847
1061
|
export declare const isNode: (element: Element) => element is Node;
|
|
848
1062
|
export declare const isLink: (element: Element) => element is Link;
|
|
1063
|
+
/** A layer id, unique within its scene. */
|
|
1064
|
+
export type LayerId = string;
|
|
1065
|
+
/**
|
|
1066
|
+
* A scene's layer: elements paint by their layer's order (`z`, bottom first), then by their own `z`. A hidden layer
|
|
1067
|
+
* is neither drawn nor hit. A scene with no layers has one, implicitly (`DEFAULT_LAYER`).
|
|
1068
|
+
*/
|
|
1069
|
+
export declare const Layer: Schema.Struct<{
|
|
1070
|
+
readonly id: Schema.String;
|
|
1071
|
+
readonly name: Schema.String;
|
|
1072
|
+
/** Fractional order key (see `order.ts`): the bottom layer has the least. */
|
|
1073
|
+
readonly z: Schema.String;
|
|
1074
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
1075
|
+
}>;
|
|
1076
|
+
export type Layer = Schema.Schema.Type<typeof Layer>;
|
|
849
1077
|
/**
|
|
850
1078
|
* The scene schema over a set of node schemas: a host composes it from its registry's types, so the
|
|
851
1079
|
* schema stays exact for every type while the engine only ever sees `NodeBase`.
|
|
@@ -876,10 +1104,18 @@ export declare const createSceneSchema: <const Nodes extends readonly Schema.Cod
|
|
|
876
1104
|
readonly y: Schema.Number;
|
|
877
1105
|
}>;
|
|
878
1106
|
}>]>;
|
|
879
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
880
1107
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
881
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
882
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1108
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1109
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1110
|
+
}>>;
|
|
1111
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1112
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1113
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1114
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1115
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1116
|
+
hue: Schema.optional<Schema.String>;
|
|
1117
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1118
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
883
1119
|
}>>;
|
|
884
1120
|
readonly type: Schema.Literal<"line">;
|
|
885
1121
|
}>, Schema.Struct<{
|
|
@@ -904,10 +1140,18 @@ export declare const createSceneSchema: <const Nodes extends readonly Schema.Cod
|
|
|
904
1140
|
readonly y: Schema.Number;
|
|
905
1141
|
}>;
|
|
906
1142
|
}>]>;
|
|
907
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
908
1143
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
909
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
910
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1144
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1145
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1146
|
+
}>>;
|
|
1147
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1148
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1149
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1150
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1151
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1152
|
+
hue: Schema.optional<Schema.String>;
|
|
1153
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1154
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
911
1155
|
}>>;
|
|
912
1156
|
readonly type: Schema.Literal<"curve">;
|
|
913
1157
|
}>, Schema.Struct<{
|
|
@@ -932,10 +1176,18 @@ export declare const createSceneSchema: <const Nodes extends readonly Schema.Cod
|
|
|
932
1176
|
readonly y: Schema.Number;
|
|
933
1177
|
}>;
|
|
934
1178
|
}>]>;
|
|
935
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
936
1179
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
937
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
938
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1180
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1181
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1182
|
+
}>>;
|
|
1183
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1184
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1185
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1186
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1187
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1188
|
+
hue: Schema.optional<Schema.String>;
|
|
1189
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1190
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
939
1191
|
}>>;
|
|
940
1192
|
readonly type: Schema.Literal<"spline">;
|
|
941
1193
|
readonly points: Schema.$Array<Schema.Struct<{
|
|
@@ -964,13 +1216,28 @@ export declare const createSceneSchema: <const Nodes extends readonly Schema.Cod
|
|
|
964
1216
|
readonly y: Schema.Number;
|
|
965
1217
|
}>;
|
|
966
1218
|
}>]>;
|
|
967
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
968
1219
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
969
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
970
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1220
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1221
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1222
|
+
}>>;
|
|
1223
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1224
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1225
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1226
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1227
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1228
|
+
hue: Schema.optional<Schema.String>;
|
|
1229
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1230
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
971
1231
|
}>>;
|
|
972
1232
|
readonly type: Schema.Literal<"smart">;
|
|
973
1233
|
}>]>>;
|
|
1234
|
+
readonly layers: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1235
|
+
readonly id: Schema.String;
|
|
1236
|
+
readonly name: Schema.String;
|
|
1237
|
+
/** Fractional order key (see `order.ts`): the bottom layer has the least. */
|
|
1238
|
+
readonly z: Schema.String;
|
|
1239
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
1240
|
+
}>>>;
|
|
974
1241
|
}>;
|
|
975
1242
|
/** The scene schema over the built-in node types. */
|
|
976
1243
|
export declare const Scene: Schema.Struct<{
|
|
@@ -995,20 +1262,28 @@ export declare const Scene: Schema.Struct<{
|
|
|
995
1262
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
996
1263
|
}>>>;
|
|
997
1264
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1265
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1266
|
+
readonly class: Schema.optional<Schema.String>;
|
|
998
1267
|
readonly style: Schema.optional<Schema.Struct<{
|
|
999
|
-
/** One of the theme's hues
|
|
1000
|
-
|
|
1268
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1269
|
+
hue: Schema.optional<Schema.String>;
|
|
1270
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1271
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1001
1272
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1273
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1274
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
1275
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
1276
|
+
border: Schema.optional<Schema.Boolean>;
|
|
1006
1277
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1007
|
-
|
|
1278
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
1279
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
1280
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
1008
1281
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
|
|
1282
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
1283
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
1284
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
1285
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
1286
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
1012
1287
|
}>>;
|
|
1013
1288
|
readonly label: Schema.optional<Schema.String>;
|
|
1014
1289
|
readonly type: Schema.Literal<"rect">;
|
|
@@ -1031,20 +1306,28 @@ export declare const Scene: Schema.Struct<{
|
|
|
1031
1306
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
1032
1307
|
}>>>;
|
|
1033
1308
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1309
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1310
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1034
1311
|
readonly style: Schema.optional<Schema.Struct<{
|
|
1035
|
-
/** One of the theme's hues
|
|
1036
|
-
|
|
1312
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1313
|
+
hue: Schema.optional<Schema.String>;
|
|
1314
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1315
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1037
1316
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1317
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1318
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
1319
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
1320
|
+
border: Schema.optional<Schema.Boolean>;
|
|
1042
1321
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1043
|
-
|
|
1322
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
1323
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
1324
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
1044
1325
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
|
|
1326
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
1327
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
1328
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
1329
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
1330
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
1048
1331
|
}>>;
|
|
1049
1332
|
readonly type: Schema.Literal<"ellipse">;
|
|
1050
1333
|
readonly label: Schema.optional<Schema.String>;
|
|
@@ -1067,58 +1350,28 @@ export declare const Scene: Schema.Struct<{
|
|
|
1067
1350
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
1068
1351
|
}>>>;
|
|
1069
1352
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1353
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1354
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1070
1355
|
readonly style: Schema.optional<Schema.Struct<{
|
|
1071
|
-
/** One of the theme's hues
|
|
1072
|
-
|
|
1356
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1357
|
+
hue: Schema.optional<Schema.String>;
|
|
1358
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1359
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1073
1360
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1361
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1362
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
1363
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
1364
|
+
border: Schema.optional<Schema.Boolean>;
|
|
1078
1365
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1079
|
-
|
|
1366
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
1367
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
1368
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
1080
1369
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1081
|
-
|
|
1082
|
-
/**
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
readonly name: Schema.String;
|
|
1087
|
-
readonly attributes: Schema.$Array<Schema.String>;
|
|
1088
|
-
readonly methods: Schema.$Array<Schema.String>;
|
|
1089
|
-
}>, Schema.Struct<{
|
|
1090
|
-
readonly id: Schema.String;
|
|
1091
|
-
readonly z: Schema.String;
|
|
1092
|
-
readonly locked: Schema.optional<Schema.Boolean>;
|
|
1093
|
-
readonly center: Schema.Struct<{
|
|
1094
|
-
readonly x: Schema.Number;
|
|
1095
|
-
readonly y: Schema.Number;
|
|
1096
|
-
}>;
|
|
1097
|
-
readonly size: Schema.Struct<{
|
|
1098
|
-
readonly width: Schema.Number;
|
|
1099
|
-
readonly height: Schema.Number;
|
|
1100
|
-
}>;
|
|
1101
|
-
readonly ports: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1102
|
-
readonly id: Schema.String;
|
|
1103
|
-
readonly side: Schema.Literals<readonly ["n", "e", "s", "w"]>;
|
|
1104
|
-
readonly offset: Schema.Number;
|
|
1105
|
-
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
1106
|
-
}>>>;
|
|
1107
|
-
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1108
|
-
readonly style: Schema.optional<Schema.Struct<{
|
|
1109
|
-
/** One of the theme's hues, colouring fill, text and border together. */
|
|
1110
|
-
readonly hue: Schema.optional<Schema.String>;
|
|
1111
|
-
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1112
|
-
readonly tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1113
|
-
readonly rounded: Schema.optional<Schema.Boolean>;
|
|
1114
|
-
readonly fill: Schema.optional<Schema.Boolean>;
|
|
1115
|
-
readonly border: Schema.optional<Schema.Boolean>;
|
|
1116
|
-
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1117
|
-
readonly guide: Schema.optional<Schema.Boolean>;
|
|
1118
|
-
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1119
|
-
readonly fontSize: Schema.optional<Schema.Number>;
|
|
1120
|
-
/** Extra classes on the frame, for a host's own look. */
|
|
1121
|
-
readonly className: Schema.optional<Schema.String>;
|
|
1370
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
1371
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
1372
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
1373
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
1374
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
1122
1375
|
}>>;
|
|
1123
1376
|
readonly type: Schema.Literal<"note">;
|
|
1124
1377
|
readonly text: Schema.String;
|
|
@@ -1141,23 +1394,31 @@ export declare const Scene: Schema.Struct<{
|
|
|
1141
1394
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
1142
1395
|
}>>>;
|
|
1143
1396
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1397
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1398
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1144
1399
|
readonly style: Schema.optional<Schema.Struct<{
|
|
1145
|
-
/** One of the theme's hues
|
|
1146
|
-
|
|
1400
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1401
|
+
hue: Schema.optional<Schema.String>;
|
|
1402
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1403
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1147
1404
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1405
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1406
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
1407
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
1408
|
+
border: Schema.optional<Schema.Boolean>;
|
|
1152
1409
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1153
|
-
|
|
1410
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
1411
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
1412
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
1154
1413
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
|
|
1414
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
1415
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
1416
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
1417
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
1418
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
1158
1419
|
}>>;
|
|
1159
1420
|
readonly label: Schema.optional<Schema.String>;
|
|
1160
|
-
readonly type: Schema.Literal<"
|
|
1421
|
+
readonly type: Schema.Literal<"frame">;
|
|
1161
1422
|
readonly scene: Schema.String;
|
|
1162
1423
|
/** Draw the child scene inside the frame rather than the label; unset, it does so while there is no label. */
|
|
1163
1424
|
readonly contents: Schema.optional<Schema.Boolean>;
|
|
@@ -1184,10 +1445,18 @@ export declare const Scene: Schema.Struct<{
|
|
|
1184
1445
|
readonly y: Schema.Number;
|
|
1185
1446
|
}>;
|
|
1186
1447
|
}>]>;
|
|
1187
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1188
1448
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1189
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1190
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1449
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1450
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1451
|
+
}>>;
|
|
1452
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1453
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1454
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1455
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1456
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1457
|
+
hue: Schema.optional<Schema.String>;
|
|
1458
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1459
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1191
1460
|
}>>;
|
|
1192
1461
|
readonly type: Schema.Literal<"line">;
|
|
1193
1462
|
}>, Schema.Struct<{
|
|
@@ -1212,10 +1481,18 @@ export declare const Scene: Schema.Struct<{
|
|
|
1212
1481
|
readonly y: Schema.Number;
|
|
1213
1482
|
}>;
|
|
1214
1483
|
}>]>;
|
|
1215
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1216
1484
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1217
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1218
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1485
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1486
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1487
|
+
}>>;
|
|
1488
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1489
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1490
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1491
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1492
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1493
|
+
hue: Schema.optional<Schema.String>;
|
|
1494
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1495
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1219
1496
|
}>>;
|
|
1220
1497
|
readonly type: Schema.Literal<"curve">;
|
|
1221
1498
|
}>, Schema.Struct<{
|
|
@@ -1240,10 +1517,18 @@ export declare const Scene: Schema.Struct<{
|
|
|
1240
1517
|
readonly y: Schema.Number;
|
|
1241
1518
|
}>;
|
|
1242
1519
|
}>]>;
|
|
1243
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1244
1520
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1245
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1246
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1521
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1522
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1523
|
+
}>>;
|
|
1524
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1525
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1526
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1527
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1528
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1529
|
+
hue: Schema.optional<Schema.String>;
|
|
1530
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1531
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1247
1532
|
}>>;
|
|
1248
1533
|
readonly type: Schema.Literal<"spline">;
|
|
1249
1534
|
readonly points: Schema.$Array<Schema.Struct<{
|
|
@@ -1272,13 +1557,28 @@ export declare const Scene: Schema.Struct<{
|
|
|
1272
1557
|
readonly y: Schema.Number;
|
|
1273
1558
|
}>;
|
|
1274
1559
|
}>]>;
|
|
1275
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1276
1560
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1277
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1278
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1561
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1562
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1563
|
+
}>>;
|
|
1564
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1565
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1566
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1567
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1568
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1569
|
+
hue: Schema.optional<Schema.String>;
|
|
1570
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1571
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1279
1572
|
}>>;
|
|
1280
1573
|
readonly type: Schema.Literal<"smart">;
|
|
1281
1574
|
}>]>>;
|
|
1575
|
+
readonly layers: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1576
|
+
readonly id: Schema.String;
|
|
1577
|
+
readonly name: Schema.String;
|
|
1578
|
+
/** Fractional order key (see `order.ts`): the bottom layer has the least. */
|
|
1579
|
+
readonly z: Schema.String;
|
|
1580
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
1581
|
+
}>>>;
|
|
1282
1582
|
}>;
|
|
1283
1583
|
/** The scene schema over any node with the shared fields: what the engine itself can validate for a host. */
|
|
1284
1584
|
export declare const OpenScene: Schema.Struct<{
|
|
@@ -1303,20 +1603,28 @@ export declare const OpenScene: Schema.Struct<{
|
|
|
1303
1603
|
readonly accepts: Schema.optional<Schema.Literals<readonly ["in", "out", "any"]>>;
|
|
1304
1604
|
}>>>;
|
|
1305
1605
|
readonly portsPerSide: Schema.optional<Schema.Number>;
|
|
1606
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1607
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1306
1608
|
readonly style: Schema.optional<Schema.Struct<{
|
|
1307
|
-
/** One of the theme's hues
|
|
1308
|
-
|
|
1609
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1610
|
+
hue: Schema.optional<Schema.String>;
|
|
1611
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1612
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1309
1613
|
/** The hue's fill; unset is 2, the look a hue had before tones. */
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1614
|
+
tone: Schema.optional<Schema.Literals<readonly [0, 1, 2, 3]>>;
|
|
1615
|
+
rounded: Schema.optional<Schema.Boolean>;
|
|
1616
|
+
fill: Schema.optional<Schema.Boolean>;
|
|
1617
|
+
border: Schema.optional<Schema.Boolean>;
|
|
1314
1618
|
/** A guide: drawn dashed and unfilled, an annotation rather than content. */
|
|
1315
|
-
|
|
1619
|
+
guide: Schema.optional<Schema.Boolean>;
|
|
1620
|
+
/** The face of the shape's text; unset is the theme's body face. */
|
|
1621
|
+
fontFamily: Schema.optional<Schema.Literals<readonly ["default", "monospace"]>>;
|
|
1316
1622
|
/** Text size in the node's own scene units (the editor offers a readable range; stored values are not checked). */
|
|
1317
|
-
|
|
1318
|
-
/**
|
|
1319
|
-
|
|
1623
|
+
fontSize: Schema.optional<Schema.Number>;
|
|
1624
|
+
/** Where the text sits across the shape; unset is the type's own (a label centres, a note starts at the left). */
|
|
1625
|
+
alignHorizontal: Schema.optional<Schema.Literals<readonly ["left", "center", "right"]>>;
|
|
1626
|
+
/** Where the text sits down the shape; unset is the type's own (a label is middled, a note starts at the top). */
|
|
1627
|
+
alignVertical: Schema.optional<Schema.Literals<readonly ["top", "middle", "bottom"]>>;
|
|
1320
1628
|
}>>;
|
|
1321
1629
|
readonly type: Schema.String;
|
|
1322
1630
|
}>]>>;
|
|
@@ -1342,10 +1650,18 @@ export declare const OpenScene: Schema.Struct<{
|
|
|
1342
1650
|
readonly y: Schema.Number;
|
|
1343
1651
|
}>;
|
|
1344
1652
|
}>]>;
|
|
1345
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1346
1653
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1347
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1348
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1654
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1655
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1656
|
+
}>>;
|
|
1657
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1658
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1659
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1660
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1661
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1662
|
+
hue: Schema.optional<Schema.String>;
|
|
1663
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1664
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1349
1665
|
}>>;
|
|
1350
1666
|
readonly type: Schema.Literal<"line">;
|
|
1351
1667
|
}>, Schema.Struct<{
|
|
@@ -1370,10 +1686,18 @@ export declare const OpenScene: Schema.Struct<{
|
|
|
1370
1686
|
readonly y: Schema.Number;
|
|
1371
1687
|
}>;
|
|
1372
1688
|
}>]>;
|
|
1373
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1374
1689
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1375
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1376
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1690
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1691
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1692
|
+
}>>;
|
|
1693
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1694
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1695
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1696
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1697
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1698
|
+
hue: Schema.optional<Schema.String>;
|
|
1699
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1700
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1377
1701
|
}>>;
|
|
1378
1702
|
readonly type: Schema.Literal<"curve">;
|
|
1379
1703
|
}>, Schema.Struct<{
|
|
@@ -1398,10 +1722,18 @@ export declare const OpenScene: Schema.Struct<{
|
|
|
1398
1722
|
readonly y: Schema.Number;
|
|
1399
1723
|
}>;
|
|
1400
1724
|
}>]>;
|
|
1401
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1402
1725
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1403
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1404
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1726
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1727
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1728
|
+
}>>;
|
|
1729
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1730
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1731
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1732
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1733
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1734
|
+
hue: Schema.optional<Schema.String>;
|
|
1735
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1736
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1405
1737
|
}>>;
|
|
1406
1738
|
readonly type: Schema.Literal<"spline">;
|
|
1407
1739
|
readonly points: Schema.$Array<Schema.Struct<{
|
|
@@ -1430,19 +1762,35 @@ export declare const OpenScene: Schema.Struct<{
|
|
|
1430
1762
|
readonly y: Schema.Number;
|
|
1431
1763
|
}>;
|
|
1432
1764
|
}>]>;
|
|
1433
|
-
readonly directed: Schema.optional<Schema.Boolean>;
|
|
1434
1765
|
readonly ends: Schema.optional<Schema.Struct<{
|
|
1435
|
-
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1436
|
-
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle"]>>;
|
|
1766
|
+
readonly start: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1767
|
+
readonly end: Schema.optional<Schema.Literals<readonly ["arrow", "circle", "triangle"]>>;
|
|
1768
|
+
}>>;
|
|
1769
|
+
readonly text: Schema.optional<Schema.String>;
|
|
1770
|
+
readonly layer: Schema.optional<Schema.String>;
|
|
1771
|
+
readonly class: Schema.optional<Schema.String>;
|
|
1772
|
+
readonly style: Schema.optional<Schema.Struct<{
|
|
1773
|
+
/** One of the theme's hues: a link's stroke; a node's fill, text and border together. */
|
|
1774
|
+
hue: Schema.optional<Schema.String>;
|
|
1775
|
+
/** Solid, dashed or dotted: a link's stroke, or a node's border. */
|
|
1776
|
+
lineStyle: Schema.optional<Schema.Literals<readonly ["solid", "dashed", "dotted"]>>;
|
|
1437
1777
|
}>>;
|
|
1438
1778
|
readonly type: Schema.Literal<"smart">;
|
|
1439
1779
|
}>]>>;
|
|
1780
|
+
readonly layers: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1781
|
+
readonly id: Schema.String;
|
|
1782
|
+
readonly name: Schema.String;
|
|
1783
|
+
/** Fractional order key (see `order.ts`): the bottom layer has the least. */
|
|
1784
|
+
readonly z: Schema.String;
|
|
1785
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
1786
|
+
}>>>;
|
|
1440
1787
|
}>;
|
|
1441
1788
|
export type Scene = {
|
|
1442
1789
|
readonly id: SceneId;
|
|
1443
1790
|
readonly name?: string;
|
|
1444
1791
|
readonly nodes: Readonly<Record<NodeId, Node>>;
|
|
1445
1792
|
readonly links: Readonly<Record<LinkId, Link>>;
|
|
1793
|
+
readonly layers?: Readonly<Record<LayerId, Layer>>;
|
|
1446
1794
|
};
|
|
1447
1795
|
/** A node or link of the scene by id. */
|
|
1448
1796
|
export declare const getElement: (scene: Scene, id: ElementId) => Element | undefined;
|
|
@@ -1450,7 +1798,9 @@ export declare const getElement: (scene: Scene, id: ElementId) => Element | unde
|
|
|
1450
1798
|
export type NodeValues = Partial<Omit<NodeBase, 'id' | 'type'>> & {
|
|
1451
1799
|
readonly [key: string]: unknown;
|
|
1452
1800
|
};
|
|
1453
|
-
|
|
1801
|
+
/** Per link type, so a spline's `points` are among the values an `update` may set. */
|
|
1802
|
+
type ValuesOf<T> = T extends unknown ? Partial<Omit<T, 'id' | 'type'>> : never;
|
|
1803
|
+
export type LinkValues = ValuesOf<Link>;
|
|
1454
1804
|
/**
|
|
1455
1805
|
* What the surface asks of a projection (§3). The surface never writes coordinates itself: a
|
|
1456
1806
|
* projection may apply, rewrite or reject each intent and then re-emits the positioned scene.
|
|
@@ -1491,6 +1841,16 @@ export type Intent = {
|
|
|
1491
1841
|
kind: 'layout';
|
|
1492
1842
|
ids?: ElementId[];
|
|
1493
1843
|
}
|
|
1844
|
+
/** Adds a layer, or replaces the one of its id (a rename, a visibility toggle, a move in the order). */
|
|
1845
|
+
| {
|
|
1846
|
+
kind: 'layer';
|
|
1847
|
+
layer: Layer;
|
|
1848
|
+
}
|
|
1849
|
+
/** Removes a layer and every element on it; the last layer of a scene stays. */
|
|
1850
|
+
| {
|
|
1851
|
+
kind: 'removeLayer';
|
|
1852
|
+
id: LayerId;
|
|
1853
|
+
}
|
|
1494
1854
|
/** Several intents applied as one model change (one undo step), e.g. a paste. */
|
|
1495
1855
|
| {
|
|
1496
1856
|
kind: 'batch';
|
|
@@ -1517,4 +1877,5 @@ export type Tool = {
|
|
|
1517
1877
|
kind: 'link';
|
|
1518
1878
|
type: LinkType;
|
|
1519
1879
|
};
|
|
1880
|
+
export {};
|
|
1520
1881
|
//# sourceMappingURL=types.d.ts.map
|