@darajs/ui-causal-graph-editor 1.0.0-a.1
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/LICENSE +201 -0
- package/dist/graph-viewer/causal-graph-editor.d.ts +44 -0
- package/dist/graph-viewer/causal-graph-editor.d.ts.map +1 -0
- package/dist/graph-viewer/causal-graph-editor.js +357 -0
- package/dist/graph-viewer/causal-graph-editor.js.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-edges.d.ts +32 -0
- package/dist/graph-viewer/utils/use-iterate-edges.d.ts.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-edges.js +34 -0
- package/dist/graph-viewer/utils/use-iterate-edges.js.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.d.ts +32 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.d.ts.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.js +30 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/jest-setup.d.ts +18 -0
- package/dist/jest-setup.d.ts.map +1 -0
- package/dist/jest-setup.js +18 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/node-hierarchy-builder/index.d.ts +19 -0
- package/dist/node-hierarchy-builder/index.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/index.js +18 -0
- package/dist/node-hierarchy-builder/index.js.map +1 -0
- package/dist/node-hierarchy-builder/layer-divider.d.ts +15 -0
- package/dist/node-hierarchy-builder/layer-divider.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer-divider.js +122 -0
- package/dist/node-hierarchy-builder/layer-divider.js.map +1 -0
- package/dist/node-hierarchy-builder/layer-label-editor.d.ts +24 -0
- package/dist/node-hierarchy-builder/layer-label-editor.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer-label-editor.js +93 -0
- package/dist/node-hierarchy-builder/layer-label-editor.js.map +1 -0
- package/dist/node-hierarchy-builder/layer.d.ts +35 -0
- package/dist/node-hierarchy-builder/layer.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer.js +114 -0
- package/dist/node-hierarchy-builder/layer.js.map +1 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts +27 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.js +190 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.js.map +1 -0
- package/dist/node-hierarchy-builder/node.d.ts +21 -0
- package/dist/node-hierarchy-builder/node.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/node.js +90 -0
- package/dist/node-hierarchy-builder/node.js.map +1 -0
- package/dist/node-hierarchy-builder/shared.d.ts +93 -0
- package/dist/node-hierarchy-builder/shared.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/shared.js +88 -0
- package/dist/node-hierarchy-builder/shared.js.map +1 -0
- package/dist/shared/causal-graph-store.d.ts +107 -0
- package/dist/shared/causal-graph-store.d.ts.map +1 -0
- package/dist/shared/causal-graph-store.js +142 -0
- package/dist/shared/causal-graph-store.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.js +31 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.js +32 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts +27 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.js +35 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/index.d.ts +21 -0
- package/dist/shared/editor-overlay/buttons/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/index.js +21 -0
- package/dist/shared/editor-overlay/buttons/index.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js +28 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js.map +1 -0
- package/dist/shared/editor-overlay/floating-elements.d.ts +29 -0
- package/dist/shared/editor-overlay/floating-elements.d.ts.map +1 -0
- package/dist/shared/editor-overlay/floating-elements.js +17 -0
- package/dist/shared/editor-overlay/floating-elements.js.map +1 -0
- package/dist/shared/editor-overlay/index.d.ts +22 -0
- package/dist/shared/editor-overlay/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/index.js +22 -0
- package/dist/shared/editor-overlay/index.js.map +1 -0
- package/dist/shared/editor-overlay/legend/index.d.ts +19 -0
- package/dist/shared/editor-overlay/legend/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/index.js +19 -0
- package/dist/shared/editor-overlay/legend/index.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-data.d.ts +34 -0
- package/dist/shared/editor-overlay/legend/legend-data.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-data.js +41 -0
- package/dist/shared/editor-overlay/legend/legend-data.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-list.d.ts +6 -0
- package/dist/shared/editor-overlay/legend/legend-list.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-list.js +96 -0
- package/dist/shared/editor-overlay/legend/legend-list.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend.d.ts +7 -0
- package/dist/shared/editor-overlay/legend/legend.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend.js +80 -0
- package/dist/shared/editor-overlay/legend/legend.js.map +1 -0
- package/dist/shared/editor-overlay/overlay.d.ts +35 -0
- package/dist/shared/editor-overlay/overlay.d.ts.map +1 -0
- package/dist/shared/editor-overlay/overlay.js +41 -0
- package/dist/shared/editor-overlay/overlay.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts +8 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js +40 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts +22 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js +36 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts +35 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.js +2 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts +23 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js +10 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.d.ts +18 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.js +18 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts +23 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js +10 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts +7 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js +31 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts +27 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js +53 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts +15 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js +60 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts +21 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js +90 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts +17 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js +61 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts +19 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.js +19 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/index.d.ts +20 -0
- package/dist/shared/editor-overlay/panel-content/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/index.js +20 -0
- package/dist/shared/editor-overlay/panel-content/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/index.d.ts +18 -0
- package/dist/shared/editor-overlay/panel-content/node/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/index.js +18 -0
- package/dist/shared/editor-overlay/panel-content/node/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts +11 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.js +89 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts +32 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.js +12 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.d.ts +17 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.js +27 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.d.ts +12 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.js +48 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/styled.d.ts +9 -0
- package/dist/shared/editor-overlay/panel-content/styled.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/styled.js +43 -0
- package/dist/shared/editor-overlay/panel-content/styled.js.map +1 -0
- package/dist/shared/editor-overlay/positional-divs.d.ts +14 -0
- package/dist/shared/editor-overlay/positional-divs.d.ts.map +1 -0
- package/dist/shared/editor-overlay/positional-divs.js +117 -0
- package/dist/shared/editor-overlay/positional-divs.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/index.d.ts +19 -0
- package/dist/shared/editor-overlay/search-bar/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/index.js +19 -0
- package/dist/shared/editor-overlay/search-bar/index.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.d.ts +21 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.js +160 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/use-search.d.ts +32 -0
- package/dist/shared/editor-overlay/search-bar/use-search.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/use-search.js +75 -0
- package/dist/shared/editor-overlay/search-bar/use-search.js.map +1 -0
- package/dist/shared/graph-layout/circular-layout.d.ts +18 -0
- package/dist/shared/graph-layout/circular-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/circular-layout.js +38 -0
- package/dist/shared/graph-layout/circular-layout.js.map +1 -0
- package/dist/shared/graph-layout/common.d.ts +64 -0
- package/dist/shared/graph-layout/common.d.ts.map +1 -0
- package/dist/shared/graph-layout/common.js +42 -0
- package/dist/shared/graph-layout/common.js.map +1 -0
- package/dist/shared/graph-layout/custom-layout.d.ts +35 -0
- package/dist/shared/graph-layout/custom-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/custom-layout.js +29 -0
- package/dist/shared/graph-layout/custom-layout.js.map +1 -0
- package/dist/shared/graph-layout/fcose-layout.d.ts +88 -0
- package/dist/shared/graph-layout/fcose-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/fcose-layout.js +196 -0
- package/dist/shared/graph-layout/fcose-layout.js.map +1 -0
- package/dist/shared/graph-layout/force-atlas-layout.d.ts +79 -0
- package/dist/shared/graph-layout/force-atlas-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/force-atlas-layout.js +163 -0
- package/dist/shared/graph-layout/force-atlas-layout.js.map +1 -0
- package/dist/shared/graph-layout/index.d.ts +25 -0
- package/dist/shared/graph-layout/index.d.ts.map +1 -0
- package/dist/shared/graph-layout/index.js +25 -0
- package/dist/shared/graph-layout/index.js.map +1 -0
- package/dist/shared/graph-layout/marketing-layout.d.ts +30 -0
- package/dist/shared/graph-layout/marketing-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/marketing-layout.js +105 -0
- package/dist/shared/graph-layout/marketing-layout.js.map +1 -0
- package/dist/shared/graph-layout/planar-layout.d.ts +32 -0
- package/dist/shared/graph-layout/planar-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/planar-layout.js +95 -0
- package/dist/shared/graph-layout/planar-layout.js.map +1 -0
- package/dist/shared/graph-layout/spring-layout.d.ts +56 -0
- package/dist/shared/graph-layout/spring-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/spring-layout.js +148 -0
- package/dist/shared/graph-layout/spring-layout.js.map +1 -0
- package/dist/shared/parsers.d.ts +63 -0
- package/dist/shared/parsers.d.ts.map +1 -0
- package/dist/shared/parsers.js +176 -0
- package/dist/shared/parsers.js.map +1 -0
- package/dist/shared/pointer-context.d.ts +21 -0
- package/dist/shared/pointer-context.d.ts.map +1 -0
- package/dist/shared/pointer-context.js +23 -0
- package/dist/shared/pointer-context.js.map +1 -0
- package/dist/shared/rendering/background.d.ts +32 -0
- package/dist/shared/rendering/background.d.ts.map +1 -0
- package/dist/shared/rendering/background.js +91 -0
- package/dist/shared/rendering/background.js.map +1 -0
- package/dist/shared/rendering/colors.d.ts +27 -0
- package/dist/shared/rendering/colors.d.ts.map +1 -0
- package/dist/shared/rendering/colors.js +14 -0
- package/dist/shared/rendering/colors.js.map +1 -0
- package/dist/shared/rendering/edge/curve.d.ts +51 -0
- package/dist/shared/rendering/edge/curve.d.ts.map +1 -0
- package/dist/shared/rendering/edge/curve.js +122 -0
- package/dist/shared/rendering/edge/curve.js.map +1 -0
- package/dist/shared/rendering/edge/definitions.d.ts +71 -0
- package/dist/shared/rendering/edge/definitions.d.ts.map +1 -0
- package/dist/shared/rendering/edge/definitions.js +31 -0
- package/dist/shared/rendering/edge/definitions.js.map +1 -0
- package/dist/shared/rendering/edge/edge-object.d.ts +93 -0
- package/dist/shared/rendering/edge/edge-object.d.ts.map +1 -0
- package/dist/shared/rendering/edge/edge-object.js +483 -0
- package/dist/shared/rendering/edge/edge-object.js.map +1 -0
- package/dist/shared/rendering/edge/index.d.ts +19 -0
- package/dist/shared/rendering/edge/index.d.ts.map +1 -0
- package/dist/shared/rendering/edge/index.js +19 -0
- package/dist/shared/rendering/edge/index.js.map +1 -0
- package/dist/shared/rendering/edge/symbols.d.ts +40 -0
- package/dist/shared/rendering/edge/symbols.d.ts.map +1 -0
- package/dist/shared/rendering/edge/symbols.js +150 -0
- package/dist/shared/rendering/edge/symbols.js.map +1 -0
- package/dist/shared/rendering/engine.d.ts +342 -0
- package/dist/shared/rendering/engine.d.ts.map +1 -0
- package/dist/shared/rendering/engine.js +990 -0
- package/dist/shared/rendering/engine.js.map +1 -0
- package/dist/shared/rendering/node/definitions.d.ts +57 -0
- package/dist/shared/rendering/node/definitions.d.ts.map +1 -0
- package/dist/shared/rendering/node/definitions.js +2 -0
- package/dist/shared/rendering/node/definitions.js.map +1 -0
- package/dist/shared/rendering/node/index.d.ts +20 -0
- package/dist/shared/rendering/node/index.d.ts.map +1 -0
- package/dist/shared/rendering/node/index.js +19 -0
- package/dist/shared/rendering/node/index.js.map +1 -0
- package/dist/shared/rendering/node/node-object.d.ts +77 -0
- package/dist/shared/rendering/node/node-object.d.ts.map +1 -0
- package/dist/shared/rendering/node/node-object.js +241 -0
- package/dist/shared/rendering/node/node-object.js.map +1 -0
- package/dist/shared/rendering/node/utils.d.ts +33 -0
- package/dist/shared/rendering/node/utils.d.ts.map +1 -0
- package/dist/shared/rendering/node/utils.js +27 -0
- package/dist/shared/rendering/node/utils.js.map +1 -0
- package/dist/shared/rendering/svg.d.ts +26 -0
- package/dist/shared/rendering/svg.d.ts.map +1 -0
- package/dist/shared/rendering/svg.js +44 -0
- package/dist/shared/rendering/svg.js.map +1 -0
- package/dist/shared/rendering/text.d.ts +33 -0
- package/dist/shared/rendering/text.d.ts.map +1 -0
- package/dist/shared/rendering/text.js +107 -0
- package/dist/shared/rendering/text.js.map +1 -0
- package/dist/shared/rendering/texture-cache.d.ts +32 -0
- package/dist/shared/rendering/texture-cache.d.ts.map +1 -0
- package/dist/shared/rendering/texture-cache.js +76 -0
- package/dist/shared/rendering/texture-cache.js.map +1 -0
- package/dist/shared/rendering/use-render-engine.d.ts +86 -0
- package/dist/shared/rendering/use-render-engine.d.ts.map +1 -0
- package/dist/shared/rendering/use-render-engine.js +89 -0
- package/dist/shared/rendering/use-render-engine.js.map +1 -0
- package/dist/shared/rendering/utils.d.ts +24 -0
- package/dist/shared/rendering/utils.d.ts.map +1 -0
- package/dist/shared/rendering/utils.js +60 -0
- package/dist/shared/rendering/utils.js.map +1 -0
- package/dist/shared/serializer.d.ts +39 -0
- package/dist/shared/serializer.d.ts.map +1 -0
- package/dist/shared/serializer.js +131 -0
- package/dist/shared/serializer.js.map +1 -0
- package/dist/shared/settings-context.d.ts +56 -0
- package/dist/shared/settings-context.d.ts.map +1 -0
- package/dist/shared/settings-context.js +36 -0
- package/dist/shared/settings-context.js.map +1 -0
- package/dist/shared/styles.d.ts +4 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/shared/styles.js +52 -0
- package/dist/shared/styles.js.map +1 -0
- package/dist/shared/use-causal-graph-editor.d.ts +19 -0
- package/dist/shared/use-causal-graph-editor.d.ts.map +1 -0
- package/dist/shared/use-causal-graph-editor.js +58 -0
- package/dist/shared/use-causal-graph-editor.js.map +1 -0
- package/dist/shared/use-drag-mode.d.ts +33 -0
- package/dist/shared/use-drag-mode.d.ts.map +1 -0
- package/dist/shared/use-drag-mode.js +75 -0
- package/dist/shared/use-drag-mode.js.map +1 -0
- package/dist/shared/use-edge-encoder.d.ts +45 -0
- package/dist/shared/use-edge-encoder.d.ts.map +1 -0
- package/dist/shared/use-edge-encoder.js +121 -0
- package/dist/shared/use-edge-encoder.js.map +1 -0
- package/dist/shared/utils.d.ts +52 -0
- package/dist/shared/utils.d.ts.map +1 -0
- package/dist/shared/utils.js +99 -0
- package/dist/shared/utils.js.map +1 -0
- package/dist/types.d.ts +213 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +98 -0
- package/dist/types.js.map +1 -0
- package/package.json +123 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
18
|
+
import type { StyledComponent } from 'styled-components';
|
|
19
|
+
import { DefaultTheme } from '@darajs/styled-components';
|
|
20
|
+
import { Button } from '@darajs/ui-components';
|
|
21
|
+
type ButtonProps = ComponentProps<typeof Button> & RefAttributes<HTMLButtonElement>;
|
|
22
|
+
type ExtraButtonProps = {
|
|
23
|
+
disableBoxShadow?: boolean;
|
|
24
|
+
disableEvents?: boolean;
|
|
25
|
+
fixedSize?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const FloatingButton: StyledComponent<ForwardRefExoticComponent<ButtonProps>, DefaultTheme, ExtraButtonProps, 'styling' | 'children'>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=floating-elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-elements.d.ts","sourceRoot":"","sources":["../../../src/shared/editor-overlay/floating-elements.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,KAAK,WAAW,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AACpF,KAAK,gBAAgB,GAAG;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CACxC,yBAAyB,CAAC,WAAW,CAAC,EACtC,YAAY,EACZ,gBAAgB,EAChB,SAAS,GAAG,UAAU,CAczB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import styled from '@darajs/styled-components';
|
|
2
|
+
import { Button } from '@darajs/ui-components';
|
|
3
|
+
export const FloatingButton = styled(Button).attrs((props) => {
|
|
4
|
+
var _a;
|
|
5
|
+
return (Object.assign(Object.assign({}, props), { styling: (_a = props.styling) !== null && _a !== void 0 ? _a : 'ghost' }));
|
|
6
|
+
}) `
|
|
7
|
+
pointer-events: ${(props) => (props.disableEvents ? 'none' : 'all')};
|
|
8
|
+
min-width: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0 1rem;
|
|
11
|
+
|
|
12
|
+
${(props) => (props.fixedSize ? 'height: 40px; width: 40px;' : '')};
|
|
13
|
+
|
|
14
|
+
${(props) => (props.styling === 'ghost' ? `background-color: ${props.theme.colors.blue1}` : '')};
|
|
15
|
+
${(props) => (props.disableBoxShadow ? '' : `box-shadow: ${props.theme.shadow.light};`)}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=floating-elements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-elements.js","sourceRoot":"","sources":["../../../src/shared/editor-overlay/floating-elements.tsx"],"names":[],"mappings":"AAmBA,OAAO,MAAwB,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAS/C,MAAM,CAAC,MAAM,cAAc,GAKvB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;;IAAC,OAAA,iCAC7B,KAAK,KACR,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,OAAO,IACnC,CAAA;CAAA,CAAC,CAAkB;sBACC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;;;;;MAKjE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC;;MAEhE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAqB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;MAC7F,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC;CAC1F,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as Overlay } from './overlay';
|
|
18
|
+
export { RecalculateLayoutButton, AddNodeButton, DragModeButton, CenterGraphButton } from './buttons';
|
|
19
|
+
export { SearchBar, useSearch } from './search-bar';
|
|
20
|
+
export { Legend, LegendLineDefinition, getLegendData } from './legend';
|
|
21
|
+
export { PanelContent, NodeInfoContent, EdgeInfoContent } from './panel-content';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/editor-overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as Overlay } from './overlay';
|
|
18
|
+
export { RecalculateLayoutButton, AddNodeButton, DragModeButton, CenterGraphButton } from './buttons';
|
|
19
|
+
export { SearchBar, useSearch } from './search-bar';
|
|
20
|
+
export { Legend, getLegendData } from './legend';
|
|
21
|
+
export { PanelContent, NodeInfoContent, EdgeInfoContent } from './panel-content';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/editor-overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,MAAM,EAAwB,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as Legend } from './legend';
|
|
18
|
+
export { LegendLineDefinition, getLegendData } from './legend-data';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as Legend } from './legend';
|
|
18
|
+
export { getLegendData } from './legend-data';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAwB,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { DefaultTheme } from '@darajs/styled-components';
|
|
18
|
+
import { EditorMode } from '../../../types';
|
|
19
|
+
export interface LegendLineDefinition {
|
|
20
|
+
/** Arrow to show at end of line */
|
|
21
|
+
arrowType?: 'none' | 'normal' | 'filled' | 'empty';
|
|
22
|
+
/** Symbol to show in the center of the arrow */
|
|
23
|
+
centerSymbol?: 'none' | 'cross' | 'question' | 'bidirected';
|
|
24
|
+
/** color to represent */
|
|
25
|
+
color?: keyof DefaultTheme['colors'];
|
|
26
|
+
/** dashArray SVG path property - line will be dashed if specified */
|
|
27
|
+
dashArray?: string;
|
|
28
|
+
/** legend label */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Show empty spot instead of a legend line */
|
|
31
|
+
spacer?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function getLegendData(editorMode: EditorMode, additionalLegend: LegendLineDefinition[]): LegendLineDefinition[];
|
|
34
|
+
//# sourceMappingURL=legend-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-data.d.ts","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend-data.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACjC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnD,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC;IAC5D,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;IACrC,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAwCD,wBAAgB,aAAa,CACzB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,oBAAoB,EAAE,GACzC,oBAAoB,EAAE,CAIxB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EditorMode } from '../../../types';
|
|
2
|
+
const RESOLVER_LEGEND = [
|
|
3
|
+
{
|
|
4
|
+
centerSymbol: 'question',
|
|
5
|
+
dashArray: '10 6',
|
|
6
|
+
label: 'Unresolved',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
dashArray: '10 6',
|
|
10
|
+
label: 'Not accepted',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
dashArray: '6 4',
|
|
14
|
+
label: 'Accepted',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Domain knowledge',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
const PAG_LEGEND = [
|
|
21
|
+
{ arrowType: 'filled', label: 'Directed' },
|
|
22
|
+
{ arrowType: 'empty', label: 'Wildcard' },
|
|
23
|
+
{ arrowType: 'none', label: 'Undirected' },
|
|
24
|
+
];
|
|
25
|
+
const ENCODER_LEGEND = [
|
|
26
|
+
{ label: 'Directed' },
|
|
27
|
+
{ arrowType: 'none', centerSymbol: 'bidirected', label: 'Undirected' },
|
|
28
|
+
{ arrowType: 'none', centerSymbol: 'cross', label: 'Prohibited' },
|
|
29
|
+
];
|
|
30
|
+
const DEFAULT_LEGENDS = new Map([
|
|
31
|
+
[EditorMode.DEFAULT, []],
|
|
32
|
+
[EditorMode.PAG_VIEWER, PAG_LEGEND],
|
|
33
|
+
[EditorMode.RESOLVER, RESOLVER_LEGEND],
|
|
34
|
+
[EditorMode.EDGE_ENCODER, ENCODER_LEGEND],
|
|
35
|
+
]);
|
|
36
|
+
export function getLegendData(editorMode, additionalLegend) {
|
|
37
|
+
var _a;
|
|
38
|
+
const modeData = (_a = DEFAULT_LEGENDS.get(editorMode)) !== null && _a !== void 0 ? _a : [];
|
|
39
|
+
return [...modeData, ...(additionalLegend !== null && additionalLegend !== void 0 ? additionalLegend : []).filter(Boolean)];
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=legend-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-data.js","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend-data.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiBpC,MAAM,eAAe,GAA2B;IAC5C;QACI,YAAY,EAAE,UAAU;QACxB,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,YAAY;KACtB;IACD;QACI,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,cAAc;KACxB;IACD;QACI,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,UAAU;KACpB;IACD;QACI,KAAK,EAAE,kBAAkB;KAC5B;CACJ,CAAC;AAEF,MAAM,UAAU,GAA2B;IACvC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE;IAC1C,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;IACzC,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE;CAC7C,CAAC;AAEF,MAAM,cAAc,GAA2B;IAC3C,EAAE,KAAK,EAAE,UAAU,EAAE;IACrB,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IACtE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE;CACpE,CAAC;AAEF,MAAM,eAAe,GAA4C,IAAI,GAAG,CAAC;IACrE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;IACxB,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC;IACnC,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,CAAC;IACtC,CAAC,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CACzB,UAAsB,EACtB,gBAAwC;;IAExC,MAAM,QAAQ,GAAG,MAAA,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,mCAAI,EAAE,CAAC;IAEvD,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,CAAC,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-list.d.ts","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend-list.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAuJrD,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,oBAAoB,EAAE,CAAC;CACrC;AACD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAWtE"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
+
* you may not use this file except in compliance with the License.
|
|
19
|
+
* You may obtain a copy of the License at
|
|
20
|
+
*
|
|
21
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
24
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
+
* See the License for the specific language governing permissions and
|
|
27
|
+
* limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
import styled, { useTheme } from '@darajs/styled-components';
|
|
30
|
+
const LegendText = styled.span `
|
|
31
|
+
color: ${(props) => props.theme.colors.text};
|
|
32
|
+
`;
|
|
33
|
+
const Ul = styled.ul `
|
|
34
|
+
all: unset;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 0.6rem;
|
|
38
|
+
`;
|
|
39
|
+
const Li = styled.li `
|
|
40
|
+
all: unset;
|
|
41
|
+
|
|
42
|
+
display: flex;
|
|
43
|
+
gap: 1rem;
|
|
44
|
+
align-items: center;
|
|
45
|
+
|
|
46
|
+
margin-top: 0.6rem;
|
|
47
|
+
`;
|
|
48
|
+
function QuestionMark(props) {
|
|
49
|
+
return (_jsx("path", { d: "M 6.554 14.6824 C 5.2834 14.6824 4.2951 15.6706 4.2951 16.9411 C 4.2951 18.2118 5.2198 19.2 6.554 19.2 C 7.761 19.2 8.8128 18.2118 8.8128 16.9411 C 8.8128 15.6706 7.761 14.6824 6.554 14.6824 Z M 8.8904 0 H 5.2834 C 2.5304 0 0.3422 2.1882 0.3422 4.9412 C 0.3422 5.8588 1.1187 6.6353 2.0363 6.6353 C 2.954 6.6353 3.7304 5.8588 3.7304 4.9412 C 3.7304 4.0941 4.3728 3.3882 5.2198 3.3882 H 8.8269 C 9.7375 3.3882 10.5069 4.0941 10.5069 4.9412 C 10.5069 5.5059 10.2245 5.9365 9.7304 6.2188 L 5.7069 8.6823 C 5.1422 9.0353 4.8598 9.6 4.8598 10.1647 V 11.2941 C 4.8598 12.2118 5.6363 12.9882 6.554 12.9882 C 7.4716 12.9882 8.2481 12.2118 8.2481 11.2941 V 11.1529 L 11.4316 9.1765 C 12.9139 8.2588 13.8316 6.6353 13.8316 4.9412 C 13.8952 2.1882 11.7069 0 8.8904 0 Z", fill: props.color, transform: props.transform }));
|
|
50
|
+
}
|
|
51
|
+
function Chevron(props) {
|
|
52
|
+
return (_jsx("path", { d: "M9.35246 9.97219L9.52924 9.79541L9.50968 9.77585C9.87924 9.23982 9.82567 8.49926 9.34894 8.02254L2.59894 1.27254C2.06186 0.735454 1.1899 0.735455 0.652812 1.27254C0.115728 1.80962 0.115728 2.68159 0.652813 3.21867L6.43156 8.99742L0.656328 14.7761C0.656311 14.7761 0.656294 14.7761 0.656276 14.7761C0.119244 15.3132 0.119262 16.1851 0.656328 16.7222C1.19341 17.2593 2.06538 17.2593 2.60246 16.7222L9.35246 9.97219Z", fill: props.color, stroke: props.color, strokeWidth: "0.5", transform: props.transform }));
|
|
53
|
+
}
|
|
54
|
+
function FullArrow(props) {
|
|
55
|
+
return (_jsx("path", { d: "M10.2729 10.2713C10.9757 9.56851 10.9757 8.42711 10.2729 7.72428L3.07567 0.52728C2.55838 0.00999588 1.78805 -0.141816 1.11331 0.139317C0.438578 0.42045 0 1.07268 0 1.80362V16.1976C0 16.9229 0.438578 17.5808 1.11331 17.8619C1.78805 18.1431 2.55838 17.9856 3.07567 17.474L10.2729 10.277V10.2713Z", fill: props.color, transform: props.transform }));
|
|
56
|
+
}
|
|
57
|
+
function EmptyCircle(props) {
|
|
58
|
+
return (_jsx("circle", { cx: "8", cy: "8", fill: props.fill, r: "6.5", stroke: props.color, strokeWidth: "3", transform: props.transform }));
|
|
59
|
+
}
|
|
60
|
+
function Cross(props) {
|
|
61
|
+
return (_jsx("path", { d: "M15.5338 2.73375C16.1588 2.10875 16.1588 1.09375 15.5338 0.46875C14.9088 -0.15625 13.8938 -0.15625 13.2688 0.46875L8.00375 5.73875L2.73375 0.47375C2.10875 -0.15125 1.09375 -0.15125 0.46875 0.47375C-0.15625 1.09875 -0.15625 2.11375 0.46875 2.73875L5.73875 8.00375L0.47375 13.2737C-0.15125 13.8987 -0.15125 14.9138 0.47375 15.5388C1.09875 16.1638 2.11375 16.1638 2.73875 15.5388L8.00375 10.2687L13.2738 15.5337C13.8988 16.1588 14.9138 16.1588 15.5388 15.5337C16.1638 14.9087 16.1638 13.8938 15.5388 13.2688L10.2688 8.00375L15.5338 2.73375Z", fill: props.color, transform: props.transform }));
|
|
62
|
+
}
|
|
63
|
+
function Bidirected(props) {
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(Chevron, { color: props.color, transform: "translate(12, 1)" }), _jsx(Chevron, { color: props.color, transform: "rotate(180, 0, 9) translate(-8, -1)" })] }));
|
|
65
|
+
}
|
|
66
|
+
const CenterSymbols = {
|
|
67
|
+
bidirected: Bidirected,
|
|
68
|
+
cross: Cross,
|
|
69
|
+
none: null,
|
|
70
|
+
question: QuestionMark,
|
|
71
|
+
};
|
|
72
|
+
const Arrows = {
|
|
73
|
+
empty: EmptyCircle,
|
|
74
|
+
filled: FullArrow,
|
|
75
|
+
none: null,
|
|
76
|
+
normal: Chevron,
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Component to generate a legend line
|
|
80
|
+
*/
|
|
81
|
+
function LegendLine({ label, color = 'grey5', dashArray, arrowType = 'normal', centerSymbol = 'none', spacer, }) {
|
|
82
|
+
const theme = useTheme();
|
|
83
|
+
if (spacer) {
|
|
84
|
+
return _jsx("span", { style: { height: '0.5rem', width: '100%' } });
|
|
85
|
+
}
|
|
86
|
+
const Symbol = CenterSymbols[centerSymbol];
|
|
87
|
+
const Arrow = Arrows[arrowType];
|
|
88
|
+
return (_jsx("svg", { height: "12px", viewBox: "-40 0 100 20", children: _jsxs("g", { children: [_jsx("line", { stroke: theme.colors[color], strokeDasharray: dashArray !== null && dashArray !== void 0 ? dashArray : 'none', strokeWidth: 4, style: { opacity: 0.5 }, x1: -25, x2: 40, y1: 10, y2: 10 }), Symbol && (_jsx(Symbol, { color: theme.colors[color], fill: theme.colors.blue1, transform: "translate (0, 2)" })), Arrow && _jsx(Arrow, { color: theme.colors[color], fill: theme.colors.blue1, transform: "translate(25, 1)" })] }, label) }));
|
|
89
|
+
}
|
|
90
|
+
export function LegendList({ listItems }) {
|
|
91
|
+
return (_jsx(Ul, { children: listItems.map((_a) => {
|
|
92
|
+
var { label } = _a, props = __rest(_a, ["label"]);
|
|
93
|
+
return (_jsxs(Li, { children: [_jsx(LegendLine, Object.assign({}, props, { label: label })), _jsx(LegendText, { children: label })] }, label));
|
|
94
|
+
}) }));
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=legend-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-list.js","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend-list.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI7D,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAA;aACjB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;CAC9C,CAAC;AAEF,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAKnB,CAAC;AACF,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;CAQnB,CAAC;AAUF,SAAS,YAAY,CAAC,KAAe;IACjC,OAAO,CACH,eACI,CAAC,EAAC,svBAAsvB,EACxvB,IAAI,EAAE,KAAK,CAAC,KAAK,EACjB,SAAS,EAAE,KAAK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AC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAC,kBAAkB,GAAG,KAdlG,KAAK,CAeT,GACF,CACT,CAAC;AACN,CAAC;AAKD,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAmB;IACrD,OAAO,CACH,KAAC,EAAE,cACE,SAAS,CAAC,GAAG,CAAC,CAAC,EAAmB,EAAE,EAAE;gBAAvB,EAAE,KAAK,OAAY,EAAP,KAAK,cAAjB,SAAmB,CAAF;YAAO,OAAA,CACpC,MAAC,EAAE,eACC,KAAC,UAAU,oBAAK,KAAK,IAAE,KAAK,EAAE,KAAK,IAAI,EACvC,KAAC,UAAU,cAAE,KAAK,GAAc,KAF3B,KAAK,CAGT,CACR,CAAA;SAAA,CAAC,GACD,CACR,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AA+B5D,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CAC3C;AAED,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAoD/C;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { useContext, useRef, useState } from 'react';
|
|
19
|
+
import styled from '@darajs/styled-components';
|
|
20
|
+
import { Button, Tooltip } from '@darajs/ui-components';
|
|
21
|
+
import { Cross, List } from '@darajs/ui-icons';
|
|
22
|
+
import { useOnClickOutside } from '@darajs/ui-utils';
|
|
23
|
+
import PointerContext from '../../pointer-context';
|
|
24
|
+
import { FloatingButton } from '../floating-elements';
|
|
25
|
+
import { LegendList } from './legend-list';
|
|
26
|
+
const LegendWrapper = styled.div `
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
transform-origin: bottom left;
|
|
32
|
+
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
display: flex;
|
|
35
|
+
gap: 2rem;
|
|
36
|
+
|
|
37
|
+
padding: 1.5rem;
|
|
38
|
+
|
|
39
|
+
background-color: ${({ theme }) => theme.colors.background};
|
|
40
|
+
border-radius: 4px;
|
|
41
|
+
box-shadow: ${({ theme }) => theme.shadow.light};
|
|
42
|
+
|
|
43
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
44
|
+
`;
|
|
45
|
+
const LegendOpenButton = styled(FloatingButton) `
|
|
46
|
+
position: absolute;
|
|
47
|
+
z-index: 2;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
|
|
51
|
+
transition: opacity 0.3s;
|
|
52
|
+
`;
|
|
53
|
+
function Legend(props) {
|
|
54
|
+
const [showLegend, setShowLegend] = useState(false);
|
|
55
|
+
const { disablePointerEvents } = useContext(PointerContext);
|
|
56
|
+
const panelRef = useRef(null);
|
|
57
|
+
useOnClickOutside(panelRef.current, () => setShowLegend(false));
|
|
58
|
+
if (!props.listItems || props.listItems.length === 0) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return (_jsxs("div", { style: { position: 'relative' }, children: [_jsx(Tooltip, { content: "Legend", placement: "top", children: _jsx(LegendOpenButton, { fixedSize: true, onClick: () => setShowLegend(true), style: {
|
|
62
|
+
opacity: showLegend ? 0 : 1,
|
|
63
|
+
pointerEvents: showLegend || disablePointerEvents ? 'none' : 'all',
|
|
64
|
+
}, children: _jsx(List, {}) }) }), _jsxs(LegendWrapper, { ref: panelRef, style: {
|
|
65
|
+
opacity: showLegend ? 1 : 0,
|
|
66
|
+
pointerEvents: !showLegend || disablePointerEvents ? 'none' : 'all',
|
|
67
|
+
transform: showLegend ? 'scale(1)' : 'scale(0)',
|
|
68
|
+
}, children: [_jsx(Button, { style: {
|
|
69
|
+
height: '12px',
|
|
70
|
+
margin: 0,
|
|
71
|
+
minWidth: 0,
|
|
72
|
+
padding: 0,
|
|
73
|
+
position: 'absolute',
|
|
74
|
+
right: '1rem',
|
|
75
|
+
top: '1rem',
|
|
76
|
+
width: '12px',
|
|
77
|
+
}, styling: "ghost", children: _jsx(Cross, { onClick: () => setShowLegend(false) }) }), _jsx(LegendList, { listItems: props.listItems })] })] }));
|
|
78
|
+
}
|
|
79
|
+
export default Legend;
|
|
80
|
+
//# sourceMappingURL=legend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend.js","sourceRoot":"","sources":["../../../../src/shared/editor-overlay/legend/legend.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBA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,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC3B,aAAa,EAAE,UAAU,IAAI,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;qBACrE,YAED,KAAC,IAAI,KAAG,GACO,GACb,EACV,MAAC,aAAa,IACV,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE;oBACH,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3B,aAAa,EAAE,CAAC,UAAU,IAAI,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;oBACnE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;iBAClD,aAED,KAAC,MAAM,IACH,KAAK,EAAE;4BACH,MAAM,EAAE,MAAM;4BACd,MAAM,EAAE,CAAC;4BACT,QAAQ,EAAE,CAAC;4BACX,OAAO,EAAE,CAAC;4BACV,QAAQ,EAAE,UAAU;4BACpB,KAAK,EAAE,MAAM;4BACb,GAAG,EAAE,MAAM;4BACX,KAAK,EAAE,MAAM;yBAChB,EACD,OAAO,EAAC,OAAO,YAEf,KAAC,KAAK,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GAAI,GACzC,EACT,KAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,IAC9B,IACd,CACT,CAAC;AACN,CAAC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface EditorOverlayProps {
|
|
3
|
+
/** Render prop for content to place in the bottom left of the overlay */
|
|
4
|
+
bottomLeft?: React.ReactNode;
|
|
5
|
+
/** Render prop for content to place in the bottom right of the overlay */
|
|
6
|
+
bottomRight?: React.ReactNode;
|
|
7
|
+
/** Children */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** Whether to hide the frame and show just the graph */
|
|
10
|
+
hideFrame?: boolean;
|
|
11
|
+
/** Function to delete currently selected content */
|
|
12
|
+
onDelete: () => void | Promise<void>;
|
|
13
|
+
/** Function to select the next edge/node */
|
|
14
|
+
onNext: () => void | Promise<void>;
|
|
15
|
+
/** Function to select the previous edge/node */
|
|
16
|
+
onPrev: () => void | Promise<void>;
|
|
17
|
+
/** When set to true, the elements inside the overlay become visible */
|
|
18
|
+
showFrameButtons?: boolean;
|
|
19
|
+
/** Panel title */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Render prop for content to place in the top left of the overlay */
|
|
22
|
+
topLeft?: React.ReactNode;
|
|
23
|
+
/** Render prop for content to place in the top right of the overlay */
|
|
24
|
+
topRight?: React.ReactNode;
|
|
25
|
+
/** Whether there is valid content selected */
|
|
26
|
+
validContentSelected: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The EditorOverlay component creates an overlay for use with a Graph
|
|
30
|
+
* This overlay goes on top of a graph and provides actions in each corner
|
|
31
|
+
* This overlay also includes a dissmissable info panel
|
|
32
|
+
*/
|
|
33
|
+
declare function EditorOverlay(props: EditorOverlayProps): JSX.Element;
|
|
34
|
+
export default EditorOverlay;
|
|
35
|
+
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/shared/editor-overlay/overlay.tsx"],"names":[],"mappings":";AAwBA,UAAU,kBAAkB;IACxB,yEAAyE;IACzE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,0EAA0E;IAC1E,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8CAA8C;IAC9C,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA+C7D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { useContext } from 'react';
|
|
19
|
+
import PointerContext from '../pointer-context';
|
|
20
|
+
import { useSettings } from '../settings-context';
|
|
21
|
+
import { PanelContent } from './panel-content';
|
|
22
|
+
import { BottomDiv, BottomLeftDiv, BottomRightDiv, TopDiv, TopLeftDiv, TopRightDiv } from './positional-divs';
|
|
23
|
+
/**
|
|
24
|
+
* The EditorOverlay component creates an overlay for use with a Graph
|
|
25
|
+
* This overlay goes on top of a graph and provides actions in each corner
|
|
26
|
+
* This overlay also includes a dissmissable info panel
|
|
27
|
+
*/
|
|
28
|
+
function EditorOverlay(props) {
|
|
29
|
+
var _a;
|
|
30
|
+
const { editable, allowSelectionWhenNotEditable } = useSettings();
|
|
31
|
+
const { onPanelEnter, onPanelExit } = useContext(PointerContext);
|
|
32
|
+
if (props.hideFrame) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const controlPadding = '10px';
|
|
36
|
+
const showPanel = editable || allowSelectionWhenNotEditable;
|
|
37
|
+
const showClass = props.showFrameButtons ? 'show' : undefined;
|
|
38
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TopDiv, { className: showClass, padding: controlPadding, children: [_jsx(TopLeftDiv, { onMouseEnter: onPanelEnter, onMouseLeave: onPanelExit, children: props.topLeft }), _jsx(TopRightDiv, { onMouseEnter: onPanelEnter, onMouseLeave: onPanelExit, children: props.topRight })] }), _jsxs(BottomDiv, { className: showClass, padding: controlPadding, children: [_jsx(BottomLeftDiv, { onMouseEnter: onPanelEnter, onMouseLeave: onPanelExit, children: props.bottomLeft }), _jsx(BottomRightDiv, { onMouseEnter: onPanelEnter, onMouseLeave: onPanelExit, children: props.bottomRight })] }), showPanel && props.validContentSelected && (_jsx(PanelContent, { onDelete: props.onDelete, onMouseEnter: onPanelEnter, onMouseLeave: onPanelExit, onNext: props.onNext, onPrev: props.onPrev, title: props.title, children: (_a = props.children) !== null && _a !== void 0 ? _a : null }))] }));
|
|
39
|
+
}
|
|
40
|
+
export default EditorOverlay;
|
|
41
|
+
//# sourceMappingURL=overlay.js.map
|
|
@@ -0,0 +1 @@
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aAAa,IAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,YAC/D,KAAK,CAAC,UAAU,GACL,EAChB,KAAC,cAAc,IAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,YAChE,KAAK,CAAC,WAAW,GACL,IACT,EAEX,SAAS,IAAI,KAAK,CAAC,oBAAoB,IAAI,CACxC,KAAC,YAAY,IACT,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,WAAW,EACzB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,YAEjB,MAAA,KAAK,CAAC,QAAQ,mCAAI,IAAI,GACZ,CAClB,IACF,CACN,CAAC;AACN,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EdgeEditorProps } from './editor-props';
|
|
2
|
+
/**
|
|
3
|
+
* Component for editing an editor
|
|
4
|
+
* Displays a specialized editor based on the current editor mode
|
|
5
|
+
*/
|
|
6
|
+
declare function EdgeEditor(props: EdgeEditorProps): JSX.Element;
|
|
7
|
+
export default EdgeEditor;
|
|
8
|
+
//# sourceMappingURL=edge-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-editor.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/edge-editor.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAYjD;;;GAGG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAMvD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { useSettings } from '../../../settings-context';
|
|
19
|
+
import { EditorMode } from '../../../../types';
|
|
20
|
+
import { ColumnWrapper } from '../styled';
|
|
21
|
+
import EncoderEditor from './encoder-editor';
|
|
22
|
+
import PagEditor from './pag-editor';
|
|
23
|
+
import ResolverEditor from './resolver-editor';
|
|
24
|
+
const EditorComponentMap = {
|
|
25
|
+
[EditorMode.DEFAULT]: null,
|
|
26
|
+
[EditorMode.EDGE_ENCODER]: EncoderEditor,
|
|
27
|
+
[EditorMode.RESOLVER]: ResolverEditor,
|
|
28
|
+
[EditorMode.PAG_VIEWER]: PagEditor,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Component for editing an editor
|
|
32
|
+
* Displays a specialized editor based on the current editor mode
|
|
33
|
+
*/
|
|
34
|
+
function EdgeEditor(props) {
|
|
35
|
+
const { editorMode } = useSettings();
|
|
36
|
+
const EditorComponent = EditorComponentMap[editorMode];
|
|
37
|
+
return _jsx(ColumnWrapper, { children: EditorComponent && _jsx(EditorComponent, Object.assign({}, props)) });
|
|
38
|
+
}
|
|
39
|
+
export default EdgeEditor;
|
|
40
|
+
//# sourceMappingURL=edge-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-editor.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/edge-editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,kBAAkB,GAAgE;IACpF,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI;IAC1B,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,aAAa;IACxC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,cAAc;IACrC,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,SAAS;CACrC,CAAC;AAEF;;;GAGG;AACH,SAAS,UAAU,CAAC,KAAsB;IACtC,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAEvD,OAAO,KAAC,aAAa,cAAE,eAAe,IAAI,KAAC,eAAe,oBAAK,KAAK,EAAI,GAAiB,CAAC;AAC9F,CAAC;AAED,eAAe,UAAU,CAAC"}
|