@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
package/dist/lib/types.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import * as Struct from "effect/Struct";
|
|
3
|
-
//#region src/archive/types.ts
|
|
4
|
-
var Point = Schema.Struct({
|
|
5
|
-
x: Schema.Number,
|
|
6
|
-
y: Schema.Number
|
|
7
|
-
});
|
|
8
|
-
var Dimension = Schema.Struct({
|
|
9
|
-
width: Schema.Number,
|
|
10
|
-
height: Schema.Number
|
|
11
|
-
});
|
|
12
|
-
var Rect = Point.mapFields(Struct.assign(Dimension.fields));
|
|
13
|
-
//#endregion
|
|
14
|
-
export { Dimension, Point, Rect };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=types.mjs.map
|
package/dist/lib/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../../src/archive/types.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\n\nexport const Point = Schema.Struct({ x: Schema.Number, y: Schema.Number });\nexport const Dimension = Schema.Struct({ width: Schema.Number, height: Schema.Number });\nexport const Rect = Point.mapFields(Struct.assign(Dimension.fields));\n\nexport type Point = Schema.Schema.Type<typeof Point>;\nexport type Dimension = Schema.Schema.Type<typeof Dimension>;\nexport type Rect = Schema.Schema.Type<typeof Rect>;\n"],"mappings":";;;AAOA,IAAa,QAAQ,OAAO,OAAO;CAAE,GAAG,OAAO;CAAQ,GAAG,OAAO;AAAO,CAAC;AACzE,IAAa,YAAY,OAAO,OAAO;CAAE,OAAO,OAAO;CAAQ,QAAQ,OAAO;AAAO,CAAC;AACtF,IAAa,OAAO,MAAM,UAAU,OAAO,OAAO,UAAU,MAAM,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { type HTMLAttributes, type PropsWithChildren } from 'react';
|
|
2
|
-
import type * as Util from '@dxos/react-ui/Util';
|
|
3
|
-
import { type ProjectionState } from '../../hooks/index.ts';
|
|
4
|
-
export interface CanvasController {
|
|
5
|
-
setProjection(projection: ProjectionState): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export type CanvasProps = Util.ThemedClassName<PropsWithChildren<Partial<ProjectionState> & HTMLAttributes<HTMLDivElement>>>;
|
|
8
|
-
/**
|
|
9
|
-
* Root canvas component.
|
|
10
|
-
* Manages CSS projection.
|
|
11
|
-
*/
|
|
12
|
-
export declare const Canvas: React.ForwardRefExoticComponent<Omit<PropsWithChildren<Partial<ProjectionState> & HTMLAttributes<HTMLDivElement>>, "className"> & {
|
|
13
|
-
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
14
|
-
} & React.RefAttributes<CanvasController>>;
|
|
15
|
-
//# sourceMappingURL=Canvas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/Canvas/Canvas.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAEZ,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAmC,KAAK,eAAe,EAAiB,MAAM,sBAAsB,CAAC;AAE5G,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAC5C,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC,CAC7E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM;;0CAqDlB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Grid, type GridProps } from '../Grid/index.ts';
|
|
4
|
-
declare const DefaultStory: (props: GridProps) => React.JSX.Element;
|
|
5
|
-
declare const meta: {
|
|
6
|
-
title: string;
|
|
7
|
-
component: typeof Grid;
|
|
8
|
-
render: typeof DefaultStory;
|
|
9
|
-
decorators: import("@storybook/react").Decorator[];
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
export declare const Default: Story;
|
|
17
|
-
export declare const SideBySide: Story;
|
|
18
|
-
//# sourceMappingURL=Canvas.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/Canvas/Canvas.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAUxD,QAAA,MAAM,YAAY,UAAW,SAAS,sBAOrC,CAAC;AA4DF,QAAA,MAAM,IAAI;;;;;;QAMN,MAAM;;CAEmB,CAAC;eAEf,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAGxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/Canvas/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type * as Util from '@dxos/react-ui/Util';
|
|
3
|
-
import { type PointerHandlers } from './input/index.ts';
|
|
4
|
-
import { type OverlayStyle, type RenderCell, type StaticLayerStyle } from './render/index.ts';
|
|
5
|
-
import type { CellGridAtoms } from './state/atoms.ts';
|
|
6
|
-
import type { Cell, Headers, Row } from './state/types.ts';
|
|
7
|
-
export type CellGridProps<T = unknown> = Util.ThemedClassName<PointerHandlers & {
|
|
8
|
-
atoms: CellGridAtoms<T>;
|
|
9
|
-
rows: ReadonlyArray<Row>;
|
|
10
|
-
renderCell: RenderCell<T>;
|
|
11
|
-
headers?: Partial<Headers> | false;
|
|
12
|
-
staticStyle?: Partial<StaticLayerStyle>;
|
|
13
|
-
overlayStyle?: Partial<OverlayStyle>;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Canvas-based 2D grid where cells contain pluggable shapes. Suitable for music sequencers,
|
|
17
|
-
* time-series data viz, and similar workloads at ~1k visible cells per viewport.
|
|
18
|
-
*/
|
|
19
|
-
export declare const CellGrid: <T>({ atoms, rows, renderCell, headers: headersProp, staticStyle: staticStyleProp, overlayStyle: overlayStyleProp, classNames, onCellToggle, onSelectionCommit, onDrawUpdate, onDrawCommit, }: CellGridProps<T>) => React.JSX.Element;
|
|
20
|
-
export type { Cell };
|
|
21
|
-
//# sourceMappingURL=CellGrid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CellGrid.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/CellGrid/CellGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,KAAK,eAAe,EAA8C,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAA0B,MAAM,mBAAmB,CAAC;AACtH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,eAAe,CAC3D,eAAe,GAAG;IAChB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CACtC,CACF,CAAC;AA6BF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,6LAYvB,aAAa,CAAC,CAAC,CAAC,sBAoMlB,CAAC;AAEF,YAAY,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type CellGridProps } from './CellGrid.tsx';
|
|
4
|
-
import type { Tool } from './state/types.ts';
|
|
5
|
-
type Variant = 'sequencer' | 'data-viz';
|
|
6
|
-
type StoryArgs = Pick<CellGridProps, 'headers'> & {
|
|
7
|
-
variant: Variant;
|
|
8
|
-
tool: Tool;
|
|
9
|
-
numCols: number;
|
|
10
|
-
numRows: number;
|
|
11
|
-
cellWidth: number;
|
|
12
|
-
cellHeight: number;
|
|
13
|
-
playback: boolean;
|
|
14
|
-
};
|
|
15
|
-
declare const DefaultStory: ({ variant, tool, numCols, numRows, cellWidth, cellHeight, playback, headers }: StoryArgs) => React.JSX.Element;
|
|
16
|
-
declare const meta: Meta<typeof DefaultStory>;
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
export declare const Sequencer: Story;
|
|
20
|
-
export declare const DataViz: Story;
|
|
21
|
-
//# sourceMappingURL=CellGrid.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CellGrid.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/CellGrid/CellGrid.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA2D,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI9D,OAAO,KAAK,EAAwB,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAiEnE,KAAK,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAExC,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,YAAY,kFAAmF,SAAS,sBA2F7G,CAAC;AAOF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAoBnC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Headers, Viewport } from '../state/types.ts';
|
|
3
|
-
export type RulerProps = {
|
|
4
|
-
viewport: Viewport;
|
|
5
|
-
headers: Headers;
|
|
6
|
-
width: number;
|
|
7
|
-
/** Number of columns to label between major ticks. */
|
|
8
|
-
majorEvery?: number;
|
|
9
|
-
classNames?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Frozen top ruler. Ticks reflect the current viewport scroll and zoom.
|
|
13
|
-
*/
|
|
14
|
-
export declare const Ruler: ({ viewport, headers, width, majorEvery, classNames }: RulerProps) => React.JSX.Element;
|
|
15
|
-
//# sourceMappingURL=Ruler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Ruler.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/headers/Ruler.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,yDAA8D,UAAU,sBA+CzF,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Headers, Row, Viewport } from '../state/types.ts';
|
|
3
|
-
export type TrackHeaderProps = {
|
|
4
|
-
viewport: Viewport;
|
|
5
|
-
headers: Headers;
|
|
6
|
-
rows: ReadonlyArray<Row>;
|
|
7
|
-
height: number;
|
|
8
|
-
classNames?: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Frozen left column listing row labels. Translates vertically in sync with viewport scroll.
|
|
12
|
-
*
|
|
13
|
-
* Row dividers and alternating shading intentionally MATCH the canvas — opaque borders
|
|
14
|
-
* and opaque alternating fills make the labels look out of phase with the cell area
|
|
15
|
-
* even when the y-positions align. We mirror the canvas's transparent-overlay model
|
|
16
|
-
* here so the frozen column reads as a direct continuation of the grid.
|
|
17
|
-
*/
|
|
18
|
-
export declare const TrackHeader: ({ viewport, headers, rows, height, classNames }: TrackHeaderProps) => React.JSX.Element;
|
|
19
|
-
//# sourceMappingURL=TrackHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TrackHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/headers/TrackHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,oDAAqD,gBAAgB,sBA+B5F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/headers/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/CellGrid/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/input/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type * as Registry from 'effect/reactivity/AtomRegistry';
|
|
2
|
-
import type { CellGridAtoms } from '../state/atoms.ts';
|
|
3
|
-
import type { Cell, CellCoord, Headers, SelectionRange } from '../state/types.ts';
|
|
4
|
-
/**
|
|
5
|
-
* 'set' / 'unset' are idempotent — the receiver must add or remove the cell
|
|
6
|
-
* regardless of current state. 'toggle' flips it. Drag operations always pick
|
|
7
|
-
* a fixed mode (set or unset) based on the cell under the initial pointerdown
|
|
8
|
-
* so the user paints a uniform stroke instead of flipping each cell.
|
|
9
|
-
*/
|
|
10
|
-
export type ToggleMode = 'set' | 'unset' | 'toggle';
|
|
11
|
-
export type PointerHandlers = {
|
|
12
|
-
onCellToggle?: (coord: CellCoord, mode: ToggleMode) => void;
|
|
13
|
-
onSelectionCommit?: (range: SelectionRange) => void;
|
|
14
|
-
/** Called each time the draw cursor moves to a new cell (edit tool). */
|
|
15
|
-
onDrawUpdate?: (startCoord: CellCoord, endCoord: CellCoord) => void;
|
|
16
|
-
/** Called when the user releases after an edit-tool drag; caller commits the note. */
|
|
17
|
-
onDrawCommit?: (startCoord: CellCoord, endCoord: CellCoord) => void;
|
|
18
|
-
};
|
|
19
|
-
export type PointerControllerOptions<T> = {
|
|
20
|
-
registry: Registry.AtomRegistry;
|
|
21
|
-
atoms: CellGridAtoms<T>;
|
|
22
|
-
headers: Headers;
|
|
23
|
-
handlers: PointerHandlers;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Attach pointer handlers to an element. Returns an unsubscribe.
|
|
27
|
-
*/
|
|
28
|
-
export declare const attachPointerHandlers: <T>(element: HTMLElement, { registry, atoms, headers, handlers }: PointerControllerOptions<T>) => (() => void);
|
|
29
|
-
/**
|
|
30
|
-
* Utility for consumers: toggle, set, or unset membership of a cell in the cells atom.
|
|
31
|
-
*/
|
|
32
|
-
export declare const toggleCell: <T>(registry: Registry.AtomRegistry, atoms: CellGridAtoms<T>, coord: CellCoord, factory: (coord: CellCoord) => Cell<T>, mode?: ToggleMode) => void;
|
|
33
|
-
//# sourceMappingURL=pointer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/input/pointer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAQ,MAAM,mBAAmB,CAAC;AAGxF;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,wEAAwE;IACxE,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;IACpE,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;CACrE,CAAC;AAQF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACxC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC;IAChC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,WAC5B,WAAW,0CACoB,wBAAwB,CAAC,CAAC,CAAC,KAClE,CAAC,MAAM,IAAI,CAsKb,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,YAChB,QAAQ,CAAC,YAAY,SACxB,aAAa,CAAC,CAAC,CAAC,SAChB,SAAS,WACP,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,SAChC,UAAU,KACf,IAYF,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type * as Registry from 'effect/reactivity/AtomRegistry';
|
|
2
|
-
import type { CellGridAtoms } from '../state/atoms.ts';
|
|
3
|
-
import type { Headers } from '../state/types.ts';
|
|
4
|
-
export type WheelControllerOptions<T> = {
|
|
5
|
-
registry: Registry.AtomRegistry;
|
|
6
|
-
atoms: CellGridAtoms<T>;
|
|
7
|
-
headers: Headers;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Attach wheel handlers. Vertical wheel scrolls y; shift+wheel scrolls x;
|
|
11
|
-
* cmd/ctrl+wheel zooms x around the cursor.
|
|
12
|
-
*/
|
|
13
|
-
export declare const attachWheelHandlers: <T>(element: HTMLElement, { registry, atoms, headers }: WheelControllerOptions<T>) => (() => void);
|
|
14
|
-
//# sourceMappingURL=wheel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wheel.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/input/wheel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI;IACtC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC;IAChC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,WAC1B,WAAW,gCACU,sBAAsB,CAAC,CAAC,CAAC,KACtD,CAAC,MAAM,IAAI,CAyCb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/render/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Headers, Selection, Viewport } from '../state/types.ts';
|
|
2
|
-
export type OverlayStyle = {
|
|
3
|
-
playhead: string;
|
|
4
|
-
selectionFill: string;
|
|
5
|
-
selectionStroke: string;
|
|
6
|
-
};
|
|
7
|
-
export type DrawOverlayOptions = {
|
|
8
|
-
ctx: CanvasRenderingContext2D;
|
|
9
|
-
size: {
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
};
|
|
13
|
-
viewport: Viewport;
|
|
14
|
-
headers: Headers;
|
|
15
|
-
selection: Selection;
|
|
16
|
-
/** Playhead position in world units (col + fraction), or null when not playing. */
|
|
17
|
-
playhead: number | null;
|
|
18
|
-
style: OverlayStyle;
|
|
19
|
-
};
|
|
20
|
-
export declare const drawOverlay: ({ ctx, size, viewport, headers, selection, playhead, style }: DrawOverlayOptions) => void;
|
|
21
|
-
//# sourceMappingURL=overlay-layer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-layer.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/render/overlay-layer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGtE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,wBAAwB,CAAC;IAC9B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW,iEAAkE,kBAAkB,KAAG,IAyC9G,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Cell, Headers, Row, Viewport } from '../state/types.ts';
|
|
2
|
-
export type RenderCellArgs<T> = {
|
|
3
|
-
ctx: CanvasRenderingContext2D;
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
w: number;
|
|
7
|
-
h: number;
|
|
8
|
-
cell: Cell<T>;
|
|
9
|
-
};
|
|
10
|
-
export type RenderCell<T = unknown> = (args: RenderCellArgs<T>) => void;
|
|
11
|
-
export type StaticLayerStyle = {
|
|
12
|
-
/** Grid line color, e.g. 'rgba(0,0,0,0.08)'. */
|
|
13
|
-
gridLine: string;
|
|
14
|
-
/** Row band fill (alternating), e.g. 'rgba(0,0,0,0.02)'. */
|
|
15
|
-
rowBand?: string;
|
|
16
|
-
background?: string;
|
|
17
|
-
};
|
|
18
|
-
export type DrawCellsOptions<T> = {
|
|
19
|
-
ctx: CanvasRenderingContext2D;
|
|
20
|
-
size: {
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
};
|
|
24
|
-
viewport: Viewport;
|
|
25
|
-
headers: Headers;
|
|
26
|
-
rows: ReadonlyArray<Row>;
|
|
27
|
-
cells: ReadonlyMap<string, Cell<T>>;
|
|
28
|
-
renderCell: RenderCell<T>;
|
|
29
|
-
style: StaticLayerStyle;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Paint the static layer: background, gridlines, alternating row bands, and cells.
|
|
33
|
-
* Pure with respect to its inputs (writes only to the supplied ctx).
|
|
34
|
-
*/
|
|
35
|
-
export declare const drawCells: <T>({ ctx, size, viewport, headers, rows, cells, renderCell, style, }: DrawCellsOptions<T>) => void;
|
|
36
|
-
//# sourceMappingURL=static-layer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static-layer.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/render/static-layer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGtE,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,GAAG,EAAE,wBAAwB,CAAC;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,GAAG,EAAE,wBAAwB,CAAC;IAC9B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,qEASxB,gBAAgB,CAAC,CAAC,CAAC,KAAG,IA6DxB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as Atom from 'effect/reactivity/Atom';
|
|
2
|
-
import type { Cell, Selection, Tool, Viewport } from './types.ts';
|
|
3
|
-
export type CellGridAtoms<T = unknown> = {
|
|
4
|
-
cells: Atom.Writable<ReadonlyMap<string, Cell<T>>>;
|
|
5
|
-
viewport: Atom.Writable<Viewport>;
|
|
6
|
-
selection: Atom.Writable<Selection>;
|
|
7
|
-
playhead: Atom.Writable<number | null>;
|
|
8
|
-
tool: Atom.Writable<Tool>;
|
|
9
|
-
};
|
|
10
|
-
export type CellGridAtomsOptions = {
|
|
11
|
-
cellWidth?: number;
|
|
12
|
-
cellHeight?: number;
|
|
13
|
-
};
|
|
14
|
-
export declare const defaultViewport: (options?: CellGridAtomsOptions) => Viewport;
|
|
15
|
-
/**
|
|
16
|
-
* Create a fresh set of atoms backing a CellGrid instance. Consumers may pass any of these as props
|
|
17
|
-
* or substitute their own (e.g., a cells atom backed by ECHO).
|
|
18
|
-
*
|
|
19
|
-
* Atoms are marked keepAlive so they preserve state across transient unsubscribe windows (e.g. React
|
|
20
|
-
* Strict Mode mount-unmount-remount). Consumers are responsible for the atoms' lifetime.
|
|
21
|
-
*/
|
|
22
|
-
export declare const createCellGridAtoms: <T = unknown>(options?: CellGridAtomsOptions) => CellGridAtoms<T>;
|
|
23
|
-
//# sourceMappingURL=atoms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/state/atoms.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IACvC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,aAAa,oBAAoB,KAAQ,QAMnE,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,GAAG,OAAO,YAAW,oBAAoB,KAAQ,aAAa,CAAC,CAAC,CAMnG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/state/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export type CellCoord = {
|
|
2
|
-
col: number;
|
|
3
|
-
row: number;
|
|
4
|
-
};
|
|
5
|
-
export type Cell<T = unknown> = {
|
|
6
|
-
col: number;
|
|
7
|
-
row: number;
|
|
8
|
-
length: number;
|
|
9
|
-
data?: T;
|
|
10
|
-
};
|
|
11
|
-
export type Viewport = {
|
|
12
|
-
/** World-space scroll offset (pixels). */
|
|
13
|
-
scrollX: number;
|
|
14
|
-
scrollY: number;
|
|
15
|
-
/** Cell dimensions in pixels at zoomX = 1. */
|
|
16
|
-
baseCellWidth: number;
|
|
17
|
-
cellHeight: number;
|
|
18
|
-
/** Horizontal zoom factor. */
|
|
19
|
-
zoomX: number;
|
|
20
|
-
};
|
|
21
|
-
export type SelectionRange = {
|
|
22
|
-
col0: number;
|
|
23
|
-
row0: number;
|
|
24
|
-
col1: number;
|
|
25
|
-
row1: number;
|
|
26
|
-
};
|
|
27
|
-
export type Selection = {
|
|
28
|
-
range: SelectionRange | null;
|
|
29
|
-
};
|
|
30
|
-
export type Tool = 'toggle' | 'select' | 'resize' | 'edit' | 'delete';
|
|
31
|
-
export type Row = {
|
|
32
|
-
id: string;
|
|
33
|
-
label?: string;
|
|
34
|
-
};
|
|
35
|
-
export type Headers = {
|
|
36
|
-
left: number;
|
|
37
|
-
top: number;
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/state/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEtE,MAAM,MAAM,GAAG,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Cell, CellCoord, Headers, Viewport } from './types.ts';
|
|
2
|
-
export declare const cellKey: (col: number, row: number) => string;
|
|
3
|
-
export declare const cellWidth: (viewport: Viewport) => number;
|
|
4
|
-
/**
|
|
5
|
-
* Convert a cell's world coordinates to screen-space pixel rectangle (relative to canvas origin).
|
|
6
|
-
*/
|
|
7
|
-
export declare const worldToScreen: (viewport: Viewport, headers: Headers, coord: {
|
|
8
|
-
col: number;
|
|
9
|
-
row: number;
|
|
10
|
-
length?: number;
|
|
11
|
-
}) => {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
w: number;
|
|
15
|
-
h: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Convert screen-space pixels (relative to canvas origin) to fractional cell coordinates.
|
|
19
|
-
*/
|
|
20
|
-
export declare const screenToWorld: (viewport: Viewport, headers: Headers, point: {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
}) => {
|
|
24
|
-
col: number;
|
|
25
|
-
row: number;
|
|
26
|
-
};
|
|
27
|
-
export declare const hitTestCell: (viewport: Viewport, headers: Headers, point: {
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
}) => CellCoord | null;
|
|
31
|
-
/**
|
|
32
|
-
* Compute the inclusive range of cell coordinates intersecting the visible content rect.
|
|
33
|
-
*/
|
|
34
|
-
export declare const visibleCellRange: (viewport: Viewport, headers: Headers, size: {
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
|
-
}) => {
|
|
38
|
-
minCol: number;
|
|
39
|
-
maxCol: number;
|
|
40
|
-
minRow: number;
|
|
41
|
-
maxRow: number;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Iterate sparse cell map, yielding only cells whose horizontal extent intersects visible cols and whose row is visible.
|
|
45
|
-
*/
|
|
46
|
-
export declare const visibleCells: <T>(cells: ReadonlyMap<string, Cell<T>>, range: {
|
|
47
|
-
minCol: number;
|
|
48
|
-
maxCol: number;
|
|
49
|
-
minRow: number;
|
|
50
|
-
maxRow: number;
|
|
51
|
-
}) => Generator<Cell<T>>;
|
|
52
|
-
//# sourceMappingURL=viewport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/state/viewport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,OAAO,QAAS,MAAM,OAAO,MAAM,KAAG,MAAyB,CAAC;AAE7E,eAAO,MAAM,SAAS,aAAc,QAAQ,KAAG,MAAiD,CAAC;AAEjG;;GAEG;AACH,eAAO,MAAM,aAAa,aACd,QAAQ,WACT,OAAO,SACT;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KACnD;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAQ9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,aACd,QAAQ,WACT,OAAO,SACT;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAM5B,CAAC;AAEF,eAAO,MAAM,WAAW,aACZ,QAAQ,WACT,OAAO,SACT;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9B,SAAS,GAAG,IASd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,aACjB,QAAQ,WACT,OAAO,QACV;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACtC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CASlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAc,CAAC,SAC/B,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAC5B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACxE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAYnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/archive/components/CellGrid/state/viewport.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type * as Util from '@dxos/react-ui/Util';
|
|
3
|
-
export type FPSProps = Util.ThemedClassName<{
|
|
4
|
-
width?: number;
|
|
5
|
-
height?: number;
|
|
6
|
-
bar?: string;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const FPS: ({ classNames, width, height, bar }: FPSProps) => React.JSX.Element;
|
|
9
|
-
//# sourceMappingURL=FPS.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FPS.d.ts","sourceRoot":"","sources":["../../../../../src/archive/components/FPS.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAGjD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAYH,eAAO,MAAM,GAAG,uCAAkE,QAAQ,sBAuEzF,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GridComponent, type GridProps } from '../../../components/Grid/index.ts';
|
|
3
|
-
export type { GridProps };
|
|
4
|
-
export { GridComponent };
|
|
5
|
-
export declare const Grid: (props: GridProps) => React.JSX.Element;
|
|
6
|
-
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGlF,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,CAAC;AAGzB,eAAO,MAAM,IAAI,UAAW,SAAS,sBAGpC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/archive/components/Grid/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/archive/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/archive/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { type Dimension, type Point } from '../types.ts';
|
|
2
|
-
export declare const defaultOrigin: Point;
|
|
3
|
-
export type ProjectionState = {
|
|
4
|
-
scale: number;
|
|
5
|
-
offset: Point;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Maps between screen and model coordinates.
|
|
9
|
-
*/
|
|
10
|
-
export interface Projection {
|
|
11
|
-
get bounds(): Dimension;
|
|
12
|
-
get scale(): number;
|
|
13
|
-
get offset(): Point;
|
|
14
|
-
/**
|
|
15
|
-
* Maps the model space to the screen offset (from the top-left of the element).
|
|
16
|
-
*/
|
|
17
|
-
toScreen(points: Point[]): Point[];
|
|
18
|
-
/**
|
|
19
|
-
* Maps the pointer coordinate (from the top-left of the element) to the model space.
|
|
20
|
-
*/
|
|
21
|
-
toModel(points: Point[]): Point[];
|
|
22
|
-
}
|
|
23
|
-
export declare class ProjectionMapper implements Projection {
|
|
24
|
-
private _bounds;
|
|
25
|
-
private _scale;
|
|
26
|
-
private _offset;
|
|
27
|
-
private _toScreen;
|
|
28
|
-
private _toModel;
|
|
29
|
-
constructor(bounds?: Dimension, scale?: number, offset?: Point);
|
|
30
|
-
update(bounds: Dimension, scale: number, offset: Point): this;
|
|
31
|
-
get bounds(): {
|
|
32
|
-
readonly width: number;
|
|
33
|
-
readonly height: number;
|
|
34
|
-
};
|
|
35
|
-
get scale(): number;
|
|
36
|
-
get offset(): {
|
|
37
|
-
readonly x: number;
|
|
38
|
-
readonly y: number;
|
|
39
|
-
};
|
|
40
|
-
toScreen(points: Point[]): Point[];
|
|
41
|
-
toModel(points: Point[]): Point[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Maintain position while zooming.
|
|
45
|
-
*/
|
|
46
|
-
export declare const getZoomTransform: ({ scale, offset, pos, newScale, }: ProjectionState & {
|
|
47
|
-
pos: Point;
|
|
48
|
-
newScale: number;
|
|
49
|
-
}) => ProjectionState;
|
|
50
|
-
/**
|
|
51
|
-
* Zoom while keeping the specified position in place.
|
|
52
|
-
*/
|
|
53
|
-
export declare const zoomInPlace: (setTransform: (state: ProjectionState) => void, pos: Point, offset: Point, current: number, next: number, delay?: number) => void;
|
|
54
|
-
declare const noop: () => void;
|
|
55
|
-
/**
|
|
56
|
-
* Zoom to new scale and position.
|
|
57
|
-
*/
|
|
58
|
-
export declare const zoomTo: (setTransform: (state: ProjectionState) => void, current: ProjectionState, next: ProjectionState, delay?: number, cb?: typeof noop) => void;
|
|
59
|
-
export {};
|
|
60
|
-
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../../src/archive/hooks/projection.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,KAAsB,CAAC;AAGnD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,MAAM,IAAI,SAAS,CAAC;IACxB,IAAI,KAAK,IAAI,MAAM,CAAC;IACpB,IAAI,MAAM,IAAI,KAAK,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;CACnC;AAED,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAsB;IAEtC,YAAY,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAI7D;IAED,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,IAAI,CAa5D;IAED,IAAI,MAAM;;;MAET;IAED,IAAI,KAAK,WAER;IAED,IAAI,MAAM;;;MAET;IAED,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAEjC;IAED,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAEhC;CACF;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,sCAK1B,eAAe,GAAG;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,eAQvD,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,WAAW,iBACR,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,OACzC,KAAK,UACF,KAAK,WACJ,MAAM,QACT,MAAM,yBAWb,CAAC;AAEF,QAAA,MAAM,IAAI,YAAW,CAAC;AAEtB;;GAEG;AAEH,eAAO,MAAM,MAAM,iBACH,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,WACrC,eAAe,QAClB,eAAe,2CAatB,CAAC"}
|