@avis-studio/engine 0.0.0-stage → 0.1.0-beta.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/README.md +193 -2
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/a11y/focus.d.ts +60 -0
- package/dist/a11y/focus.js +222 -0
- package/dist/a11y/index.d.ts +2 -0
- package/dist/a11y/index.js +4 -0
- package/dist/a11y/semantics.d.ts +37 -0
- package/dist/a11y/semantics.js +88 -0
- package/dist/commands/builtins.d.ts +88 -0
- package/dist/commands/builtins.js +362 -0
- package/dist/commands/command.d.ts +23 -0
- package/dist/commands/command.js +20 -0
- package/dist/commands/draft.d.ts +33 -0
- package/dist/commands/draft.js +96 -0
- package/dist/commands/history.d.ts +34 -0
- package/dist/commands/history.js +80 -0
- package/dist/commands/index.d.ts +6 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/patch.d.ts +24 -0
- package/dist/commands/patch.js +44 -0
- package/dist/commands/transaction.d.ts +16 -0
- package/dist/commands/transaction.js +39 -0
- package/dist/core/diagnostics.d.ts +23 -0
- package/dist/core/diagnostics.js +23 -0
- package/dist/core/disposable.d.ts +14 -0
- package/dist/core/disposable.js +51 -0
- package/dist/core/engine.d.ts +108 -0
- package/dist/core/engine.js +323 -0
- package/dist/core/event-bus.d.ts +10 -0
- package/dist/core/event-bus.js +33 -0
- package/dist/core/ids.d.ts +13 -0
- package/dist/core/ids.js +6 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +7 -0
- package/dist/core/plugin.d.ts +20 -0
- package/dist/core/plugin.js +47 -0
- package/dist/core/services.d.ts +14 -0
- package/dist/core/services.js +20 -0
- package/dist/devtools/index.d.ts +1 -0
- package/dist/devtools/index.js +2 -0
- package/dist/devtools/panel.d.ts +39 -0
- package/dist/devtools/panel.js +100 -0
- package/dist/dom/a11y-layer.d.ts +32 -0
- package/dist/dom/a11y-layer.js +358 -0
- package/dist/dom/anchor.d.ts +34 -0
- package/dist/dom/anchor.js +35 -0
- package/dist/dom/index.d.ts +6 -0
- package/dist/dom/index.js +8 -0
- package/dist/dom/menu.d.ts +24 -0
- package/dist/dom/menu.js +122 -0
- package/dist/dom/overlays.d.ts +29 -0
- package/dist/dom/overlays.js +82 -0
- package/dist/dom/paint/collect.d.ts +8 -0
- package/dist/dom/paint/collect.js +589 -0
- package/dist/dom/paint/css.d.ts +86 -0
- package/dist/dom/paint/css.js +526 -0
- package/dist/dom/paint/draw.d.ts +16 -0
- package/dist/dom/paint/draw.js +413 -0
- package/dist/dom/paint/ghost.d.ts +2 -0
- package/dist/dom/paint/ghost.js +8 -0
- package/dist/dom/paint/index.d.ts +6 -0
- package/dist/dom/paint/index.js +9 -0
- package/dist/dom/paint/text.d.ts +26 -0
- package/dist/dom/paint/text.js +209 -0
- package/dist/dom/paint/types.d.ts +174 -0
- package/dist/dom/paint/types.js +7 -0
- package/dist/dom/paint/watch.d.ts +10 -0
- package/dist/dom/paint/watch.js +109 -0
- package/dist/dom/position.d.ts +37 -0
- package/dist/dom/position.js +125 -0
- package/dist/dom/text-editor.d.ts +27 -0
- package/dist/dom/text-editor.js +128 -0
- package/dist/events/event.d.ts +122 -0
- package/dist/events/event.js +130 -0
- package/dist/events/eventer.d.ts +24 -0
- package/dist/events/eventer.js +83 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.js +3 -0
- package/dist/events/interaction.d.ts +43 -0
- package/dist/events/interaction.js +203 -0
- package/dist/geometry/anchors.d.ts +14 -0
- package/dist/geometry/anchors.js +13 -0
- package/dist/geometry/bounds.d.ts +16 -0
- package/dist/geometry/bounds.js +42 -0
- package/dist/geometry/curves.d.ts +39 -0
- package/dist/geometry/curves.js +68 -0
- package/dist/geometry/index.d.ts +6 -0
- package/dist/geometry/index.js +6 -0
- package/dist/geometry/matrix.d.ts +22 -0
- package/dist/geometry/matrix.js +56 -0
- package/dist/geometry/spaces.d.ts +22 -0
- package/dist/geometry/spaces.js +28 -0
- package/dist/geometry/vec2.d.ts +12 -0
- package/dist/geometry/vec2.js +10 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +22 -0
- package/dist/interaction/behaviors.d.ts +10 -0
- package/dist/interaction/behaviors.js +744 -0
- package/dist/interaction/controller.d.ts +180 -0
- package/dist/interaction/controller.js +269 -0
- package/dist/interaction/hit-test.d.ts +45 -0
- package/dist/interaction/hit-test.js +119 -0
- package/dist/interaction/index.d.ts +4 -0
- package/dist/interaction/index.js +7 -0
- package/dist/interaction/web-input.d.ts +13 -0
- package/dist/interaction/web-input.js +172 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/layout.d.ts +27 -0
- package/dist/layout/layout.js +266 -0
- package/dist/react/canvas/graph.d.ts +83 -0
- package/dist/react/canvas/graph.js +89 -0
- package/dist/react/canvas/hooks.d.ts +42 -0
- package/dist/react/canvas/hooks.js +78 -0
- package/dist/react/canvas/index.d.ts +35 -0
- package/dist/react/canvas/index.js +8 -0
- package/dist/react/components.d.ts +55 -0
- package/dist/react/components.js +197 -0
- package/dist/react/context.d.ts +4 -0
- package/dist/react/context.js +9 -0
- package/dist/react/flow/api/LICENSE +21 -0
- package/dist/react/flow/api/externals.d.ts +12 -0
- package/dist/react/flow/api/react/additional-components/Background/Background.d.ts +7 -0
- package/dist/react/flow/api/react/additional-components/Background/Patterns.d.ts +17 -0
- package/dist/react/flow/api/react/additional-components/Background/index.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/Background/types.d.ts +25 -0
- package/dist/react/flow/api/react/additional-components/Controls/ControlButton.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/Controls/Controls.d.ts +7 -0
- package/dist/react/flow/api/react/additional-components/Controls/Icons/FitView.d.ts +1 -0
- package/dist/react/flow/api/react/additional-components/Controls/Icons/Lock.d.ts +1 -0
- package/dist/react/flow/api/react/additional-components/Controls/Icons/Minus.d.ts +1 -0
- package/dist/react/flow/api/react/additional-components/Controls/Icons/Plus.d.ts +1 -0
- package/dist/react/flow/api/react/additional-components/Controls/Icons/Unlock.d.ts +1 -0
- package/dist/react/flow/api/react/additional-components/Controls/index.d.ts +3 -0
- package/dist/react/flow/api/react/additional-components/Controls/types.d.ts +20 -0
- package/dist/react/flow/api/react/additional-components/EdgeToolbar/EdgeToolbar.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/EdgeToolbar/index.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/EdgeToolbar/types.d.ts +6 -0
- package/dist/react/flow/api/react/additional-components/MiniMap/MiniMap.d.ts +8 -0
- package/dist/react/flow/api/react/additional-components/MiniMap/MiniMapNode.d.ts +4 -0
- package/dist/react/flow/api/react/additional-components/MiniMap/MiniMapNodes.d.ts +5 -0
- package/dist/react/flow/api/react/additional-components/MiniMap/index.d.ts +3 -0
- package/dist/react/flow/api/react/additional-components/MiniMap/types.d.ts +44 -0
- package/dist/react/flow/api/react/additional-components/NodeResizer/NodeResizeControl.d.ts +5 -0
- package/dist/react/flow/api/react/additional-components/NodeResizer/NodeResizer.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/NodeResizer/index.d.ts +3 -0
- package/dist/react/flow/api/react/additional-components/NodeResizer/types.d.ts +32 -0
- package/dist/react/flow/api/react/additional-components/NodeToolbar/NodeToolbar.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/NodeToolbar/NodeToolbarPortal.d.ts +4 -0
- package/dist/react/flow/api/react/additional-components/NodeToolbar/index.d.ts +2 -0
- package/dist/react/flow/api/react/additional-components/NodeToolbar/types.d.ts +9 -0
- package/dist/react/flow/api/react/additional-components/index.d.ts +6 -0
- package/dist/react/flow/api/react/components/A11yDescriptions/index.d.ts +7 -0
- package/dist/react/flow/api/react/components/Attribution/index.d.ts +8 -0
- package/dist/react/flow/api/react/components/BatchProvider/index.d.ts +10 -0
- package/dist/react/flow/api/react/components/BatchProvider/types.d.ts +6 -0
- package/dist/react/flow/api/react/components/BatchProvider/useQueue.d.ts +2 -0
- package/dist/react/flow/api/react/components/ConnectionLine/index.d.ts +11 -0
- package/dist/react/flow/api/react/components/EdgeLabelRenderer/index.d.ts +5 -0
- package/dist/react/flow/api/react/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +14 -0
- package/dist/react/flow/api/react/components/EdgeWrapper/index.d.ts +5 -0
- package/dist/react/flow/api/react/components/EdgeWrapper/utils.d.ts +11 -0
- package/dist/react/flow/api/react/components/Edges/BaseEdge.d.ts +2 -0
- package/dist/react/flow/api/react/components/Edges/BezierEdge.d.ts +4 -0
- package/dist/react/flow/api/react/components/Edges/EdgeAnchor.d.ts +13 -0
- package/dist/react/flow/api/react/components/Edges/EdgeText.d.ts +7 -0
- package/dist/react/flow/api/react/components/Edges/SimpleBezierEdge.d.ts +20 -0
- package/dist/react/flow/api/react/components/Edges/SmoothStepEdge.d.ts +4 -0
- package/dist/react/flow/api/react/components/Edges/StepEdge.d.ts +4 -0
- package/dist/react/flow/api/react/components/Edges/StraightEdge.d.ts +4 -0
- package/dist/react/flow/api/react/components/Edges/index.d.ts +5 -0
- package/dist/react/flow/api/react/components/Handle/index.d.ts +8 -0
- package/dist/react/flow/api/react/components/NodeWrapper/index.d.ts +4 -0
- package/dist/react/flow/api/react/components/NodeWrapper/useNodeObserver.d.ts +7 -0
- package/dist/react/flow/api/react/components/NodeWrapper/utils.d.ts +8 -0
- package/dist/react/flow/api/react/components/Nodes/DefaultNode.d.ts +2 -0
- package/dist/react/flow/api/react/components/Nodes/GroupNode.d.ts +1 -0
- package/dist/react/flow/api/react/components/Nodes/InputNode.d.ts +2 -0
- package/dist/react/flow/api/react/components/Nodes/OutputNode.d.ts +2 -0
- package/dist/react/flow/api/react/components/Nodes/utils.d.ts +12 -0
- package/dist/react/flow/api/react/components/NodesSelection/index.d.ts +8 -0
- package/dist/react/flow/api/react/components/Panel/index.d.ts +8 -0
- package/dist/react/flow/api/react/components/ReactFlowProvider/index.d.ts +20 -0
- package/dist/react/flow/api/react/components/SelectionListener/index.d.ts +6 -0
- package/dist/react/flow/api/react/components/StoreUpdater/index.d.ts +67 -0
- package/dist/react/flow/api/react/components/UserSelection/index.d.ts +1 -0
- package/dist/react/flow/api/react/components/ViewportPortal/index.d.ts +4 -0
- package/dist/react/flow/api/react/container/EdgeRenderer/MarkerDefinitions.d.ts +9 -0
- package/dist/react/flow/api/react/container/EdgeRenderer/MarkerSymbols.d.ts +8 -0
- package/dist/react/flow/api/react/container/EdgeRenderer/index.d.ts +12 -0
- package/dist/react/flow/api/react/container/FlowRenderer/index.d.ts +13 -0
- package/dist/react/flow/api/react/container/GraphView/index.d.ts +10 -0
- package/dist/react/flow/api/react/container/GraphView/useNodeOrEdgeTypesWarning.d.ts +3 -0
- package/dist/react/flow/api/react/container/GraphView/useStylesLoadedWarning.d.ts +1 -0
- package/dist/react/flow/api/react/container/NodeRenderer/index.d.ts +9 -0
- package/dist/react/flow/api/react/container/NodeRenderer/useResizeObserver.d.ts +1 -0
- package/dist/react/flow/api/react/container/Pane/index.d.ts +10 -0
- package/dist/react/flow/api/react/container/ReactFlow/Wrapper.d.ts +19 -0
- package/dist/react/flow/api/react/container/ReactFlow/index.d.ts +3 -0
- package/dist/react/flow/api/react/container/ReactFlow/init-values.d.ts +3 -0
- package/dist/react/flow/api/react/container/Viewport/index.d.ts +6 -0
- package/dist/react/flow/api/react/container/ZoomPane/index.d.ts +7 -0
- package/dist/react/flow/api/react/contexts/HandleConfigContext.d.ts +11 -0
- package/dist/react/flow/api/react/contexts/NodeIdContext.d.ts +5 -0
- package/dist/react/flow/api/react/contexts/StoreContext.d.ts +3 -0
- package/dist/react/flow/api/react/hooks/useColorModeClass.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useConnection.d.ts +3 -0
- package/dist/react/flow/api/react/hooks/useDrag.d.ts +12 -0
- package/dist/react/flow/api/react/hooks/useEdges.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useGlobalKeyHandler.d.ts +5 -0
- package/dist/react/flow/api/react/hooks/useHandleConnections.d.ts +10 -0
- package/dist/react/flow/api/react/hooks/useInternalNode.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useKeyPress.d.ts +7 -0
- package/dist/react/flow/api/react/hooks/useMoveSelectedNodes.d.ts +5 -0
- package/dist/react/flow/api/react/hooks/useNodeConnections.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useNodes.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useNodesData.d.ts +4 -0
- package/dist/react/flow/api/react/hooks/useNodesEdgesState.d.ts +12 -0
- package/dist/react/flow/api/react/hooks/useNodesInitialized.d.ts +4 -0
- package/dist/react/flow/api/react/hooks/useOnEdgesChangeMiddleware.d.ts +3 -0
- package/dist/react/flow/api/react/hooks/useOnInitHandler.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useOnNodesChangeMiddleware.d.ts +3 -0
- package/dist/react/flow/api/react/hooks/useOnSelectionChange.d.ts +5 -0
- package/dist/react/flow/api/react/hooks/useOnViewportChange.d.ts +7 -0
- package/dist/react/flow/api/react/hooks/useReactFlow.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useResizeHandler.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useStore.d.ts +8 -0
- package/dist/react/flow/api/react/hooks/useUpdateNodeInternals.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useViewport.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useViewportHelper.d.ts +3 -0
- package/dist/react/flow/api/react/hooks/useViewportSync.d.ts +2 -0
- package/dist/react/flow/api/react/hooks/useVisibleEdgeIds.d.ts +1 -0
- package/dist/react/flow/api/react/hooks/useVisibleNodeIds.d.ts +1 -0
- package/dist/react/flow/api/react/index.d.ts +41 -0
- package/dist/react/flow/api/react/store/index.d.ts +18 -0
- package/dist/react/flow/api/react/store/initialState.d.ts +18 -0
- package/dist/react/flow/api/react/styles/utils.d.ts +2 -0
- package/dist/react/flow/api/react/types/component-props.d.ts +127 -0
- package/dist/react/flow/api/react/types/edges.d.ts +111 -0
- package/dist/react/flow/api/react/types/general.d.ts +53 -0
- package/dist/react/flow/api/react/types/index.d.ts +6 -0
- package/dist/react/flow/api/react/types/instance.d.ts +64 -0
- package/dist/react/flow/api/react/types/nodes.d.ts +41 -0
- package/dist/react/flow/api/react/types/store.d.ts +114 -0
- package/dist/react/flow/api/react/utils/changes.d.ts +15 -0
- package/dist/react/flow/api/react/utils/edges.d.ts +3 -0
- package/dist/react/flow/api/react/utils/general.d.ts +5 -0
- package/dist/react/flow/api/react/utils/index.d.ts +3 -0
- package/dist/react/flow/api/system/constants.d.ts +43 -0
- package/dist/react/flow/api/system/index.d.ts +8 -0
- package/dist/react/flow/api/system/types/changes.d.ts +48 -0
- package/dist/react/flow/api/system/types/edges.d.ts +72 -0
- package/dist/react/flow/api/system/types/general.d.ts +175 -0
- package/dist/react/flow/api/system/types/handles.d.ts +21 -0
- package/dist/react/flow/api/system/types/index.d.ts +7 -0
- package/dist/react/flow/api/system/types/nodes.d.ts +89 -0
- package/dist/react/flow/api/system/types/panzoom.d.ts +58 -0
- package/dist/react/flow/api/system/types/utils.d.ts +46 -0
- package/dist/react/flow/api/system/utils/attribution.d.ts +1 -0
- package/dist/react/flow/api/system/utils/connections.d.ts +4 -0
- package/dist/react/flow/api/system/utils/dom.d.ts +20 -0
- package/dist/react/flow/api/system/utils/edge-toolbar.d.ts +1 -0
- package/dist/react/flow/api/system/utils/edges/bezier-edge.d.ts +40 -0
- package/dist/react/flow/api/system/utils/edges/general.d.ts +44 -0
- package/dist/react/flow/api/system/utils/edges/index.d.ts +5 -0
- package/dist/react/flow/api/system/utils/edges/positions.d.ts +16 -0
- package/dist/react/flow/api/system/utils/edges/smoothstep-edge.d.ts +21 -0
- package/dist/react/flow/api/system/utils/edges/straight-edge.d.ts +13 -0
- package/dist/react/flow/api/system/utils/general.d.ts +56 -0
- package/dist/react/flow/api/system/utils/graph.d.ts +45 -0
- package/dist/react/flow/api/system/utils/index.d.ts +12 -0
- package/dist/react/flow/api/system/utils/marker.d.ts +8 -0
- package/dist/react/flow/api/system/utils/node-toolbar.d.ts +2 -0
- package/dist/react/flow/api/system/utils/shallow-node-data.d.ts +4 -0
- package/dist/react/flow/api/system/utils/store.d.ts +33 -0
- package/dist/react/flow/api/system/utils/types.d.ts +7 -0
- package/dist/react/flow/api/system/xydrag/XYDrag.d.ts +56 -0
- package/dist/react/flow/api/system/xydrag/index.d.ts +1 -0
- package/dist/react/flow/api/system/xydrag/utils.d.ts +22 -0
- package/dist/react/flow/api/system/xyhandle/XYHandle.d.ts +2 -0
- package/dist/react/flow/api/system/xyhandle/index.d.ts +1 -0
- package/dist/react/flow/api/system/xyhandle/types.d.ts +49 -0
- package/dist/react/flow/api/system/xyhandle/utils.d.ts +9 -0
- package/dist/react/flow/api/system/xyminimap/index.d.ts +27 -0
- package/dist/react/flow/api/system/xypanzoom/XYPanZoom.d.ts +11 -0
- package/dist/react/flow/api/system/xypanzoom/eventhandler.d.ts +45 -0
- package/dist/react/flow/api/system/xypanzoom/filter.d.ts +15 -0
- package/dist/react/flow/api/system/xypanzoom/index.d.ts +1 -0
- package/dist/react/flow/api/system/xypanzoom/utils.d.ts +8 -0
- package/dist/react/flow/api/system/xyresizer/XYResizer.d.ts +51 -0
- package/dist/react/flow/api/system/xyresizer/index.d.ts +2 -0
- package/dist/react/flow/api/system/xyresizer/types.d.ts +26 -0
- package/dist/react/flow/api/system/xyresizer/utils.d.ts +41 -0
- package/dist/react/flow/components.d.ts +148 -0
- package/dist/react/flow/components.js +526 -0
- package/dist/react/flow/configuration.d.ts +6 -0
- package/dist/react/flow/configuration.js +27 -0
- package/dist/react/flow/drag.d.ts +14 -0
- package/dist/react/flow/drag.js +273 -0
- package/dist/react/flow/extras.d.ts +155 -0
- package/dist/react/flow/extras.js +317 -0
- package/dist/react/flow/handle.d.ts +21 -0
- package/dist/react/flow/handle.js +149 -0
- package/dist/react/flow/hooks.d.ts +47 -0
- package/dist/react/flow/hooks.js +131 -0
- package/dist/react/flow/index.d.ts +78 -0
- package/dist/react/flow/index.js +73 -0
- package/dist/react/flow/queries.d.ts +20 -0
- package/dist/react/flow/queries.js +30 -0
- package/dist/react/flow/react-flow.d.ts +73 -0
- package/dist/react/flow/react-flow.js +1445 -0
- package/dist/react/flow/resize.d.ts +30 -0
- package/dist/react/flow/resize.js +49 -0
- package/dist/react/flow/store.d.ts +412 -0
- package/dist/react/flow/store.js +713 -0
- package/dist/react/flow/style.css +630 -0
- package/dist/react/flow/style.css.d.ts +2 -0
- package/dist/react/flow/system.d.ts +146 -0
- package/dist/react/flow/system.js +300 -0
- package/dist/react/flow/types.d.ts +131 -0
- package/dist/react/flow/types.js +1 -0
- package/dist/react/flow/utils.d.ts +77 -0
- package/dist/react/flow/utils.js +285 -0
- package/dist/react/hooks.d.ts +14 -0
- package/dist/react/hooks.js +44 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +5 -0
- package/dist/render/backend.d.ts +26 -0
- package/dist/render/backend.js +5 -0
- package/dist/render/canvas2d/backend.d.ts +7 -0
- package/dist/render/canvas2d/backend.js +122 -0
- package/dist/render/canvas2d/index.d.ts +1 -0
- package/dist/render/canvas2d/index.js +2 -0
- package/dist/render/color.d.ts +9 -0
- package/dist/render/color.js +69 -0
- package/dist/render/commands.d.ts +69 -0
- package/dist/render/commands.js +1 -0
- package/dist/render/display-list.d.ts +65 -0
- package/dist/render/display-list.js +316 -0
- package/dist/render/images.d.ts +35 -0
- package/dist/render/images.js +83 -0
- package/dist/render/index.d.ts +14 -0
- package/dist/render/index.js +16 -0
- package/dist/render/painters.d.ts +35 -0
- package/dist/render/painters.js +109 -0
- package/dist/render/renderer.d.ts +70 -0
- package/dist/render/renderer.js +162 -0
- package/dist/render/scene-index.d.ts +21 -0
- package/dist/render/scene-index.js +64 -0
- package/dist/render/text.d.ts +8 -0
- package/dist/render/text.js +100 -0
- package/dist/render/theme.d.ts +21 -0
- package/dist/render/theme.js +33 -0
- package/dist/render/ui.d.ts +63 -0
- package/dist/render/ui.js +188 -0
- package/dist/render/webgl2/atlas.d.ts +36 -0
- package/dist/render/webgl2/atlas.js +93 -0
- package/dist/render/webgl2/backend.d.ts +19 -0
- package/dist/render/webgl2/backend.js +338 -0
- package/dist/render/webgl2/index.d.ts +2 -0
- package/dist/render/webgl2/index.js +3 -0
- package/dist/render/webgl2/shaders.d.ts +6 -0
- package/dist/render/webgl2/shaders.js +112 -0
- package/dist/render/webgpu/index.d.ts +1 -0
- package/dist/render/webgpu/index.js +3 -0
- package/dist/scene/builtins.d.ts +25 -0
- package/dist/scene/builtins.js +60 -0
- package/dist/scene/dirty.d.ts +11 -0
- package/dist/scene/dirty.js +10 -0
- package/dist/scene/index.d.ts +5 -0
- package/dist/scene/index.js +5 -0
- package/dist/scene/record.d.ts +40 -0
- package/dist/scene/record.js +12 -0
- package/dist/scene/scene-graph.d.ts +58 -0
- package/dist/scene/scene-graph.js +178 -0
- package/dist/scene/schema.d.ts +27 -0
- package/dist/scene/schema.js +32 -0
- package/dist/sdk/create-avis.d.ts +109 -0
- package/dist/sdk/create-avis.js +162 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +2 -0
- package/dist/serialization/format.d.ts +46 -0
- package/dist/serialization/format.js +20 -0
- package/dist/serialization/index.d.ts +3 -0
- package/dist/serialization/index.js +3 -0
- package/dist/serialization/migrate.d.ts +7 -0
- package/dist/serialization/migrate.js +54 -0
- package/dist/serialization/serialize.d.ts +10 -0
- package/dist/serialization/serialize.js +114 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/index.js +2 -0
- package/dist/state/selector.d.ts +6 -0
- package/dist/state/selector.js +29 -0
- package/dist/state/store.d.ts +91 -0
- package/dist/state/store.js +102 -0
- package/dist/style/computed.d.ts +84 -0
- package/dist/style/computed.js +296 -0
- package/dist/style/index.d.ts +6 -0
- package/dist/style/index.js +8 -0
- package/dist/style/style-engine.d.ts +33 -0
- package/dist/style/style-engine.js +113 -0
- package/dist/style/tokens.d.ts +49 -0
- package/dist/style/tokens.js +142 -0
- package/dist/style/utilities.d.ts +34 -0
- package/dist/style/utilities.js +341 -0
- package/dist/style/values.d.ts +30 -0
- package/dist/style/values.js +361 -0
- package/dist/style/variants.d.ts +38 -0
- package/dist/style/variants.js +55 -0
- package/dist/sync/index.d.ts +2 -0
- package/dist/sync/index.js +1 -0
- package/dist/sync/save-queue.d.ts +24 -0
- package/dist/sync/save-queue.js +88 -0
- package/dist/wasm/index.d.ts +2 -0
- package/dist/wasm/index.js +2 -0
- package/dist/wasm/load.d.ts +7 -0
- package/dist/wasm/load.js +47 -0
- package/dist/wasm/pkg/avis_engine_wasm.d.ts +84 -0
- package/dist/wasm/pkg/avis_engine_wasm.js +339 -0
- package/dist/wasm/pkg/avis_engine_wasm_bg.wasm +0 -0
- package/dist/wasm/reference.d.ts +38 -0
- package/dist/wasm/reference.js +174 -0
- package/package.json +76 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { FitViewParamsBase, FitViewOptionsBase, ZoomInOut, ZoomTo, SetViewport, GetZoom, GetViewport, SetCenter, FitBounds, XYPosition, OnBeforeDeleteBase, Connection, NodeChange, EdgeChange, SnapGrid } from "../../system/index.js";
|
|
3
|
+
import type { Node, Edge, ReactFlowInstance, EdgeProps, NodeProps } from './index.js';
|
|
4
|
+
export type OnNodesChange<NodeType extends Node = Node> = (changes: NodeChange<NodeType>[]) => void;
|
|
5
|
+
export type OnEdgesChange<EdgeType extends Edge = Edge> = (changes: EdgeChange<EdgeType>[]) => void;
|
|
6
|
+
export type OnNodesDelete<NodeType extends Node = Node> = (nodes: NodeType[]) => void;
|
|
7
|
+
export type OnEdgesDelete<EdgeType extends Edge = Edge> = (edges: EdgeType[]) => void;
|
|
8
|
+
export type OnDelete<NodeType extends Node = Node, EdgeType extends Edge = Edge> = (params: {
|
|
9
|
+
nodes: NodeType[];
|
|
10
|
+
edges: EdgeType[];
|
|
11
|
+
}) => void;
|
|
12
|
+
export type NodeTypes = Record<string, ComponentType<NodeProps & {
|
|
13
|
+
data: any;
|
|
14
|
+
type: any;
|
|
15
|
+
}>>;
|
|
16
|
+
export type EdgeTypes = Record<string, ComponentType<EdgeProps & {
|
|
17
|
+
data: any;
|
|
18
|
+
type: any;
|
|
19
|
+
}>>;
|
|
20
|
+
export type UnselectNodesAndEdgesParams<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
21
|
+
nodes?: NodeType[];
|
|
22
|
+
edges?: EdgeType[];
|
|
23
|
+
};
|
|
24
|
+
export type OnSelectionChangeParams<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
25
|
+
nodes: NodeType[];
|
|
26
|
+
edges: EdgeType[];
|
|
27
|
+
};
|
|
28
|
+
export type OnSelectionChangeFunc<NodeType extends Node = Node, EdgeType extends Edge = Edge> = (params: OnSelectionChangeParams<NodeType, EdgeType>) => void;
|
|
29
|
+
export type FitViewParams<NodeType extends Node = Node> = FitViewParamsBase<NodeType>;
|
|
30
|
+
export type FitViewOptions<NodeType extends Node = Node> = FitViewOptionsBase<NodeType>;
|
|
31
|
+
export type FitView<NodeType extends Node = Node> = (fitViewOptions?: FitViewOptions<NodeType>) => Promise<boolean>;
|
|
32
|
+
export type OnInit<NodeType extends Node = Node, EdgeType extends Edge = Edge> = (reactFlowInstance: ReactFlowInstance<NodeType, EdgeType>) => void;
|
|
33
|
+
export type ViewportHelperFunctions = {
|
|
34
|
+
zoomIn: ZoomInOut;
|
|
35
|
+
zoomOut: ZoomInOut;
|
|
36
|
+
zoomTo: ZoomTo;
|
|
37
|
+
getZoom: GetZoom;
|
|
38
|
+
setViewport: SetViewport;
|
|
39
|
+
getViewport: GetViewport;
|
|
40
|
+
setCenter: SetCenter;
|
|
41
|
+
fitBounds: FitBounds;
|
|
42
|
+
screenToFlowPosition: (clientPosition: XYPosition, options?: {
|
|
43
|
+
snapToGrid?: boolean;
|
|
44
|
+
snapGrid?: SnapGrid;
|
|
45
|
+
}) => XYPosition;
|
|
46
|
+
flowToScreenPosition: (flowPosition: XYPosition) => XYPosition;
|
|
47
|
+
};
|
|
48
|
+
export type OnBeforeDelete<NodeType extends Node = Node, EdgeType extends Edge = Edge> = OnBeforeDeleteBase<NodeType, EdgeType>;
|
|
49
|
+
export type IsValidConnection<EdgeType extends Edge = Edge> = (edge: EdgeType | Connection) => boolean;
|
|
50
|
+
export type ProOptions = {
|
|
51
|
+
account?: string;
|
|
52
|
+
hideAttribution: boolean;
|
|
53
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { HandleConnection, HandleType, NodeConnection, Rect, Viewport } from "../../system/index.js";
|
|
2
|
+
import type { Node, Edge, ViewportHelperFunctions, InternalNode, FitView } from './index.js';
|
|
3
|
+
export type ReactFlowJsonObject<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
4
|
+
nodes: NodeType[];
|
|
5
|
+
edges: EdgeType[];
|
|
6
|
+
viewport: Viewport;
|
|
7
|
+
};
|
|
8
|
+
export type DeleteElementsOptions = {
|
|
9
|
+
nodes?: (Node | {
|
|
10
|
+
id: Node['id'];
|
|
11
|
+
})[];
|
|
12
|
+
edges?: (Edge | {
|
|
13
|
+
id: Edge['id'];
|
|
14
|
+
})[];
|
|
15
|
+
};
|
|
16
|
+
export type GeneralHelpers<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
17
|
+
getNodes: () => NodeType[];
|
|
18
|
+
setNodes: (payload: NodeType[] | ((nodes: NodeType[]) => NodeType[])) => void;
|
|
19
|
+
addNodes: (payload: NodeType[] | NodeType) => void;
|
|
20
|
+
getNode: (id: string) => NodeType | undefined;
|
|
21
|
+
getInternalNode: (id: string) => InternalNode<NodeType> | undefined;
|
|
22
|
+
getEdges: () => EdgeType[];
|
|
23
|
+
setEdges: (payload: EdgeType[] | ((edges: EdgeType[]) => EdgeType[])) => void;
|
|
24
|
+
addEdges: (payload: EdgeType[] | EdgeType) => void;
|
|
25
|
+
getEdge: (id: string) => EdgeType | undefined;
|
|
26
|
+
toObject: () => ReactFlowJsonObject<NodeType, EdgeType>;
|
|
27
|
+
deleteElements: (params: DeleteElementsOptions) => Promise<{
|
|
28
|
+
deletedNodes: Node[];
|
|
29
|
+
deletedEdges: Edge[];
|
|
30
|
+
}>;
|
|
31
|
+
getIntersectingNodes: (node: NodeType | {
|
|
32
|
+
id: Node['id'];
|
|
33
|
+
} | Rect, partially?: boolean, nodes?: NodeType[]) => NodeType[];
|
|
34
|
+
isNodeIntersecting: (node: NodeType | {
|
|
35
|
+
id: Node['id'];
|
|
36
|
+
} | Rect, area: Rect, partially?: boolean) => boolean;
|
|
37
|
+
updateNode: (id: string, nodeUpdate: Partial<NodeType> | ((node: NodeType) => Partial<NodeType>), options?: {
|
|
38
|
+
replace: boolean;
|
|
39
|
+
}) => void;
|
|
40
|
+
updateNodeData: (id: string, dataUpdate: Partial<NodeType['data']> | ((node: NodeType) => Partial<NodeType['data']>), options?: {
|
|
41
|
+
replace: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
updateEdge: (id: string, edgeUpdate: Partial<EdgeType> | ((edge: EdgeType) => Partial<EdgeType>), options?: {
|
|
44
|
+
replace: boolean;
|
|
45
|
+
}) => void;
|
|
46
|
+
updateEdgeData: (id: string, dataUpdate: Partial<EdgeType['data']> | ((edge: EdgeType) => Partial<EdgeType['data']>), options?: {
|
|
47
|
+
replace: boolean;
|
|
48
|
+
}) => void;
|
|
49
|
+
getNodesBounds: (nodes: (NodeType | InternalNode | string)[]) => Rect;
|
|
50
|
+
getHandleConnections: ({ type, id, nodeId, }: {
|
|
51
|
+
type: HandleType;
|
|
52
|
+
nodeId: string;
|
|
53
|
+
id?: string | null;
|
|
54
|
+
}) => HandleConnection[];
|
|
55
|
+
getNodeConnections: ({ type, handleId, nodeId, }: {
|
|
56
|
+
type?: HandleType;
|
|
57
|
+
nodeId: string;
|
|
58
|
+
handleId?: string | null;
|
|
59
|
+
}) => NodeConnection[];
|
|
60
|
+
fitView: FitView<NodeType>;
|
|
61
|
+
};
|
|
62
|
+
export type ReactFlowInstance<NodeType extends Node = Node, EdgeType extends Edge = Edge> = GeneralHelpers<NodeType, EdgeType> & ViewportHelperFunctions & {
|
|
63
|
+
viewportInitialized: boolean;
|
|
64
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent as ReactMouseEvent, AriaRole, HTMLAttributes, DOMAttributes } from 'react';
|
|
2
|
+
import type { CoordinateExtent, NodeBase, OnError, NodeProps as NodePropsBase, InternalNodeBase } from "../../system/index.js";
|
|
3
|
+
import { NodeTypes } from './general.js';
|
|
4
|
+
export type Node<NodeData extends Record<string, unknown> = Record<string, unknown>, NodeType extends string | undefined = string | undefined> = NodeBase<NodeData, NodeType> & {
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
resizing?: boolean;
|
|
8
|
+
focusable?: boolean;
|
|
9
|
+
ariaRole?: AriaRole;
|
|
10
|
+
domAttributes?: Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style' | 'className' | 'draggable' | 'role' | 'aria-label' | 'defaultValue' | 'dangerouslySetInnerHTML' | keyof DOMAttributes<HTMLDivElement>>;
|
|
11
|
+
};
|
|
12
|
+
export type InternalNode<NodeType extends Node = Node> = InternalNodeBase<NodeType>;
|
|
13
|
+
export type NodeMouseHandler<NodeType extends Node = Node> = (event: ReactMouseEvent, node: NodeType) => void;
|
|
14
|
+
export type SelectionDragHandler<NodeType extends Node = Node> = (event: ReactMouseEvent, nodes: NodeType[]) => void;
|
|
15
|
+
export type OnNodeDrag<NodeType extends Node = Node> = (event: MouseEvent | TouchEvent, node: NodeType, nodes: NodeType[]) => void;
|
|
16
|
+
export type NodeWrapperProps<NodeType extends Node> = {
|
|
17
|
+
id: string;
|
|
18
|
+
nodesConnectable: boolean;
|
|
19
|
+
elementsSelectable: boolean;
|
|
20
|
+
nodesDraggable: boolean;
|
|
21
|
+
nodesFocusable: boolean;
|
|
22
|
+
onClick?: NodeMouseHandler<NodeType>;
|
|
23
|
+
onDoubleClick?: NodeMouseHandler<NodeType>;
|
|
24
|
+
onMouseEnter?: NodeMouseHandler<NodeType>;
|
|
25
|
+
onMouseMove?: NodeMouseHandler<NodeType>;
|
|
26
|
+
onMouseLeave?: NodeMouseHandler<NodeType>;
|
|
27
|
+
onContextMenu?: NodeMouseHandler<NodeType>;
|
|
28
|
+
resizeObserver: ResizeObserver | null;
|
|
29
|
+
noDragClassName: string;
|
|
30
|
+
noPanClassName: string;
|
|
31
|
+
rfId: string;
|
|
32
|
+
disableKeyboardA11y: boolean;
|
|
33
|
+
nodeTypes?: NodeTypes;
|
|
34
|
+
nodeExtent?: CoordinateExtent;
|
|
35
|
+
onError?: OnError;
|
|
36
|
+
nodeClickDistance?: number;
|
|
37
|
+
};
|
|
38
|
+
export type BuiltInNode = Node<{
|
|
39
|
+
label: string;
|
|
40
|
+
}, 'input' | 'output' | 'default' | undefined> | Node<Record<string, never>, 'group'>;
|
|
41
|
+
export type NodeProps<NodeType extends Node = Node> = NodePropsBase<NodeType>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ConnectionMode, withResolvers, type ConnectionState, type CoordinateExtent, type InternalNodeUpdate, type UpdateNodePositions, type NodeOrigin, type OnConnect, type OnError, type OnViewportChange, type SelectionRect, type SnapGrid, type Handle, type Transform, type PanZoomInstance, type PanBy, type OnConnectStart, type OnConnectEnd, type OnSelectionDrag, type OnMoveStart, type OnMove, type OnMoveEnd, type UpdateConnection, type EdgeLookup, type ConnectionLookup, type NodeLookup, type NodeChange, type EdgeChange, type ParentLookup, type AriaLabelConfig, type SetCenter, type ZIndexMode } from "../../system/index.js";
|
|
2
|
+
import type { Edge, Node, OnNodesChange, OnEdgesChange, DefaultEdgeOptions, FitViewOptions, OnNodesDelete, OnEdgesDelete, OnSelectionChangeFunc, UnselectNodesAndEdgesParams, OnDelete, OnNodeDrag, OnBeforeDelete, IsValidConnection, InternalNode } from './index.js';
|
|
3
|
+
export type ReactFlowStore<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
4
|
+
rfId: string;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
transform: Transform;
|
|
8
|
+
nodes: NodeType[];
|
|
9
|
+
nodesInitialized: boolean;
|
|
10
|
+
nodeLookup: NodeLookup<InternalNode<NodeType>>;
|
|
11
|
+
parentLookup: ParentLookup<InternalNode<NodeType>>;
|
|
12
|
+
edges: EdgeType[];
|
|
13
|
+
edgeLookup: EdgeLookup<EdgeType>;
|
|
14
|
+
connectionLookup: ConnectionLookup;
|
|
15
|
+
onNodesChange: OnNodesChange<NodeType> | null;
|
|
16
|
+
onEdgesChange: OnEdgesChange<EdgeType> | null;
|
|
17
|
+
hasDefaultNodes: boolean;
|
|
18
|
+
hasDefaultEdges: boolean;
|
|
19
|
+
domNode: HTMLDivElement | null;
|
|
20
|
+
paneDragging: boolean;
|
|
21
|
+
noPanClassName: string;
|
|
22
|
+
panZoom: PanZoomInstance | null;
|
|
23
|
+
minZoom: number;
|
|
24
|
+
maxZoom: number;
|
|
25
|
+
translateExtent: CoordinateExtent;
|
|
26
|
+
nodeExtent: CoordinateExtent;
|
|
27
|
+
nodeOrigin: NodeOrigin;
|
|
28
|
+
nodeDragThreshold: number;
|
|
29
|
+
connectionDragThreshold: number;
|
|
30
|
+
nodesSelectionActive: boolean;
|
|
31
|
+
userSelectionActive: boolean;
|
|
32
|
+
userSelectionRect: SelectionRect | null;
|
|
33
|
+
connection: ConnectionState<InternalNode<NodeType>>;
|
|
34
|
+
connectionMode: ConnectionMode;
|
|
35
|
+
connectionClickStartHandle: (Pick<Handle, 'nodeId' | 'id'> & Required<Pick<Handle, 'type'>>) | null;
|
|
36
|
+
snapToGrid: boolean;
|
|
37
|
+
snapGrid: SnapGrid;
|
|
38
|
+
nodesDraggable: boolean;
|
|
39
|
+
autoPanOnNodeFocus: boolean;
|
|
40
|
+
nodesConnectable: boolean;
|
|
41
|
+
nodesFocusable: boolean;
|
|
42
|
+
edgesFocusable: boolean;
|
|
43
|
+
edgesReconnectable: boolean;
|
|
44
|
+
elementsSelectable: boolean;
|
|
45
|
+
elevateNodesOnSelect: boolean;
|
|
46
|
+
elevateEdgesOnSelect: boolean;
|
|
47
|
+
selectNodesOnDrag: boolean;
|
|
48
|
+
multiSelectionActive: boolean;
|
|
49
|
+
onNodeDragStart: OnNodeDrag<NodeType> | undefined;
|
|
50
|
+
onNodeDrag: OnNodeDrag<NodeType> | undefined;
|
|
51
|
+
onNodeDragStop: OnNodeDrag<NodeType> | undefined;
|
|
52
|
+
onSelectionDragStart: OnSelectionDrag | undefined;
|
|
53
|
+
onSelectionDrag: OnSelectionDrag | undefined;
|
|
54
|
+
onSelectionDragStop: OnSelectionDrag | undefined;
|
|
55
|
+
onMoveStart: OnMoveStart | undefined;
|
|
56
|
+
onMove: OnMove | undefined;
|
|
57
|
+
onMoveEnd: OnMoveEnd | undefined;
|
|
58
|
+
onConnect: OnConnect | undefined;
|
|
59
|
+
onConnectStart: OnConnectStart | undefined;
|
|
60
|
+
onConnectEnd: OnConnectEnd | undefined;
|
|
61
|
+
onClickConnectStart: OnConnectStart | undefined;
|
|
62
|
+
onClickConnectEnd: OnConnectEnd | undefined;
|
|
63
|
+
connectOnClick: boolean;
|
|
64
|
+
defaultEdgeOptions: DefaultEdgeOptions | undefined;
|
|
65
|
+
fitViewQueued: boolean;
|
|
66
|
+
fitViewOptions: FitViewOptions | undefined;
|
|
67
|
+
fitViewResolver: ReturnType<typeof withResolvers<boolean>> | null;
|
|
68
|
+
onNodesDelete: OnNodesDelete<NodeType> | undefined;
|
|
69
|
+
onEdgesDelete: OnEdgesDelete<EdgeType> | undefined;
|
|
70
|
+
onDelete: OnDelete | undefined;
|
|
71
|
+
onError: OnError | undefined;
|
|
72
|
+
onViewportChangeStart: OnViewportChange | undefined;
|
|
73
|
+
onViewportChange: OnViewportChange | undefined;
|
|
74
|
+
onViewportChangeEnd: OnViewportChange | undefined;
|
|
75
|
+
onBeforeDelete: OnBeforeDelete<NodeType, EdgeType> | undefined;
|
|
76
|
+
onSelectionChangeHandlers: OnSelectionChangeFunc<NodeType, EdgeType>[];
|
|
77
|
+
ariaLiveMessage: string;
|
|
78
|
+
autoPanOnConnect: boolean;
|
|
79
|
+
autoPanOnNodeDrag: boolean;
|
|
80
|
+
autoPanSpeed: number;
|
|
81
|
+
connectionRadius: number;
|
|
82
|
+
isValidConnection: IsValidConnection<EdgeType> | undefined;
|
|
83
|
+
lib: string;
|
|
84
|
+
debug: boolean;
|
|
85
|
+
ariaLabelConfig: AriaLabelConfig;
|
|
86
|
+
zIndexMode: ZIndexMode;
|
|
87
|
+
onNodesChangeMiddlewareMap: Map<symbol, (changes: NodeChange<NodeType>[]) => NodeChange<NodeType>[]>;
|
|
88
|
+
onEdgesChangeMiddlewareMap: Map<symbol, (changes: EdgeChange<EdgeType>[]) => EdgeChange<EdgeType>[]>;
|
|
89
|
+
};
|
|
90
|
+
export type ReactFlowActions<NodeType extends Node, EdgeType extends Edge> = {
|
|
91
|
+
setNodes: (nodes: NodeType[]) => void;
|
|
92
|
+
setEdges: (edges: EdgeType[]) => void;
|
|
93
|
+
setDefaultNodesAndEdges: (nodes?: NodeType[], edges?: EdgeType[]) => void;
|
|
94
|
+
updateNodeInternals: (updates: Map<string, InternalNodeUpdate>, params?: {
|
|
95
|
+
triggerFitView: boolean;
|
|
96
|
+
}) => void;
|
|
97
|
+
updateNodePositions: UpdateNodePositions;
|
|
98
|
+
resetSelectedElements: () => void;
|
|
99
|
+
unselectNodesAndEdges: (params?: UnselectNodesAndEdgesParams<NodeType, EdgeType>) => void;
|
|
100
|
+
addSelectedNodes: (nodeIds: string[]) => void;
|
|
101
|
+
addSelectedEdges: (edgeIds: string[]) => void;
|
|
102
|
+
setMinZoom: (minZoom: number) => void;
|
|
103
|
+
setMaxZoom: (maxZoom: number) => void;
|
|
104
|
+
setTranslateExtent: (translateExtent: CoordinateExtent) => void;
|
|
105
|
+
setNodeExtent: (nodeExtent: CoordinateExtent) => void;
|
|
106
|
+
cancelConnection: () => void;
|
|
107
|
+
updateConnection: UpdateConnection<InternalNode<NodeType>>;
|
|
108
|
+
reset: () => void;
|
|
109
|
+
triggerNodeChanges: (changes: NodeChange<NodeType>[]) => void;
|
|
110
|
+
triggerEdgeChanges: (changes: EdgeChange<EdgeType>[]) => void;
|
|
111
|
+
panBy: PanBy;
|
|
112
|
+
setCenter: SetCenter;
|
|
113
|
+
};
|
|
114
|
+
export type ReactFlowState<NodeType extends Node = Node, EdgeType extends Edge = Edge> = ReactFlowStore<NodeType, EdgeType> & ReactFlowActions<NodeType, EdgeType>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EdgeLookup, NodeLookup, EdgeChange, NodeChange, NodeSelectionChange, EdgeSelectionChange, NodeRemoveChange, EdgeRemoveChange } from "../../system/index.js";
|
|
2
|
+
import type { Node, Edge, InternalNode } from '../types/index.js';
|
|
3
|
+
export declare function applyNodeChanges<NodeType extends Node = Node>(changes: NodeChange<NodeType>[], nodes: NodeType[]): NodeType[];
|
|
4
|
+
export declare function applyEdgeChanges<EdgeType extends Edge = Edge>(changes: EdgeChange<EdgeType>[], edges: EdgeType[]): EdgeType[];
|
|
5
|
+
export declare function createSelectionChange(id: string, selected: boolean): NodeSelectionChange | EdgeSelectionChange;
|
|
6
|
+
export declare function getSelectionChanges(items: Map<string, any>, selectedIds?: Set<string>, mutateItem?: boolean): NodeSelectionChange[] | EdgeSelectionChange[];
|
|
7
|
+
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
8
|
+
items: Node[] | undefined;
|
|
9
|
+
lookup: NodeLookup<InternalNode<Node>>;
|
|
10
|
+
}): NodeChange[];
|
|
11
|
+
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
12
|
+
items: Edge[] | undefined;
|
|
13
|
+
lookup: EdgeLookup;
|
|
14
|
+
}): EdgeChange[];
|
|
15
|
+
export declare function elementToRemoveChange<T extends Node | Edge>(item: T): NodeRemoveChange | EdgeRemoveChange;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type AddEdgeOptions, type Connection, type EdgeBase, type ReconnectEdgeOptions } from "../../system/index.js";
|
|
2
|
+
export declare function addEdge<EdgeType extends EdgeBase>(edgeParams: EdgeType | Connection, edges: EdgeType[], options?: AddEdgeOptions): EdgeType[];
|
|
3
|
+
export declare function reconnectEdge<EdgeType extends EdgeBase>(oldEdge: EdgeType, newConnection: Connection, edges: EdgeType[], options?: ReconnectEdgeOptions): EdgeType[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Ref, type RefAttributes, JSX, PropsWithoutRef } from 'react';
|
|
2
|
+
import type { Edge, Node } from '../types/index.js';
|
|
3
|
+
export declare const isNode: <NodeType extends Node = Node>(element: unknown) => element is NodeType;
|
|
4
|
+
export declare const isEdge: <EdgeType extends Edge = Edge>(element: unknown) => element is EdgeType;
|
|
5
|
+
export declare function fixedForwardRef<T, P = {}>(render: (props: PropsWithoutRef<P>, ref: Ref<T>) => JSX.Element): (props: P & RefAttributes<T>) => JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CoordinateExtent, HandleType } from './types/index.js';
|
|
2
|
+
export declare const errorMessages: {
|
|
3
|
+
error001: (lib?: string) => string;
|
|
4
|
+
error002: () => string;
|
|
5
|
+
error003: (nodeType: string) => string;
|
|
6
|
+
error004: () => string;
|
|
7
|
+
error005: () => string;
|
|
8
|
+
error006: () => string;
|
|
9
|
+
error007: (id: string) => string;
|
|
10
|
+
error009: (type: string) => string;
|
|
11
|
+
error008: (handleType: HandleType, { id, sourceHandle, targetHandle }: {
|
|
12
|
+
id: string;
|
|
13
|
+
sourceHandle: string | null;
|
|
14
|
+
targetHandle: string | null;
|
|
15
|
+
}) => string;
|
|
16
|
+
error010: () => string;
|
|
17
|
+
error011: (edgeType: string) => string;
|
|
18
|
+
error012: (id: string) => string;
|
|
19
|
+
error013: (lib?: string) => string;
|
|
20
|
+
error014: () => string;
|
|
21
|
+
error015: () => string;
|
|
22
|
+
error016: (id: string) => string;
|
|
23
|
+
};
|
|
24
|
+
export declare const infiniteExtent: CoordinateExtent;
|
|
25
|
+
export declare const elementSelectionKeys: string[];
|
|
26
|
+
export declare const defaultAriaLabelConfig: {
|
|
27
|
+
'node.a11yDescription.default': string;
|
|
28
|
+
'node.a11yDescription.keyboardDisabled': string;
|
|
29
|
+
'node.a11yDescription.ariaLiveMessage': ({ direction, x, y }: {
|
|
30
|
+
direction: string;
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}) => string;
|
|
34
|
+
'edge.a11yDescription.default': string;
|
|
35
|
+
'controls.ariaLabel': string;
|
|
36
|
+
'controls.zoomIn.ariaLabel': string;
|
|
37
|
+
'controls.zoomOut.ariaLabel': string;
|
|
38
|
+
'controls.fitView.ariaLabel': string;
|
|
39
|
+
'controls.interactive.ariaLabel': string;
|
|
40
|
+
'minimap.ariaLabel': string;
|
|
41
|
+
'handle.ariaLabel': string;
|
|
42
|
+
};
|
|
43
|
+
export type AriaLabelConfig = typeof defaultAriaLabelConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './constants.js';
|
|
2
|
+
export * from './types/index.js';
|
|
3
|
+
export * from './utils/index.js';
|
|
4
|
+
export * from './xydrag/index.js';
|
|
5
|
+
export * from './xyhandle/index.js';
|
|
6
|
+
export * from './xyminimap/index.js';
|
|
7
|
+
export * from './xypanzoom/index.js';
|
|
8
|
+
export * from './xyresizer/index.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { XYPosition, Dimensions, NodeBase, EdgeBase } from './index.js';
|
|
2
|
+
export type NodeDimensionChange = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: 'dimensions';
|
|
5
|
+
dimensions?: Dimensions;
|
|
6
|
+
resizing?: boolean;
|
|
7
|
+
setAttributes?: boolean | 'width' | 'height';
|
|
8
|
+
};
|
|
9
|
+
export type NodePositionChange = {
|
|
10
|
+
id: string;
|
|
11
|
+
type: 'position';
|
|
12
|
+
position?: XYPosition;
|
|
13
|
+
positionAbsolute?: XYPosition;
|
|
14
|
+
dragging?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type NodeSelectionChange = {
|
|
17
|
+
id: string;
|
|
18
|
+
type: 'select';
|
|
19
|
+
selected: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type NodeRemoveChange = {
|
|
22
|
+
id: string;
|
|
23
|
+
type: 'remove';
|
|
24
|
+
};
|
|
25
|
+
export type NodeAddChange<NodeType extends NodeBase = NodeBase> = {
|
|
26
|
+
item: NodeType;
|
|
27
|
+
type: 'add';
|
|
28
|
+
index?: number;
|
|
29
|
+
};
|
|
30
|
+
export type NodeReplaceChange<NodeType extends NodeBase = NodeBase> = {
|
|
31
|
+
id: string;
|
|
32
|
+
item: NodeType;
|
|
33
|
+
type: 'replace';
|
|
34
|
+
};
|
|
35
|
+
export type NodeChange<NodeType extends NodeBase = NodeBase> = NodeDimensionChange | NodePositionChange | NodeSelectionChange | NodeRemoveChange | NodeAddChange<NodeType> | NodeReplaceChange<NodeType>;
|
|
36
|
+
export type EdgeSelectionChange = NodeSelectionChange;
|
|
37
|
+
export type EdgeRemoveChange = NodeRemoveChange;
|
|
38
|
+
export type EdgeAddChange<EdgeType extends EdgeBase = EdgeBase> = {
|
|
39
|
+
item: EdgeType;
|
|
40
|
+
type: 'add';
|
|
41
|
+
index?: number;
|
|
42
|
+
};
|
|
43
|
+
export type EdgeReplaceChange<EdgeType extends EdgeBase = EdgeBase> = {
|
|
44
|
+
id: string;
|
|
45
|
+
item: EdgeType;
|
|
46
|
+
type: 'replace';
|
|
47
|
+
};
|
|
48
|
+
export type EdgeChange<EdgeType extends EdgeBase = EdgeBase> = EdgeSelectionChange | EdgeRemoveChange | EdgeAddChange<EdgeType> | EdgeReplaceChange<EdgeType>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Position } from './utils.js';
|
|
2
|
+
export type EdgeBase<EdgeData extends Record<string, unknown> = Record<string, unknown>, EdgeType extends string | undefined = string | undefined> = {
|
|
3
|
+
id: string;
|
|
4
|
+
type?: EdgeType;
|
|
5
|
+
source: string;
|
|
6
|
+
target: string;
|
|
7
|
+
sourceHandle?: string | null;
|
|
8
|
+
targetHandle?: string | null;
|
|
9
|
+
animated?: boolean;
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
deletable?: boolean;
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
data?: EdgeData;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
markerStart?: EdgeMarkerType;
|
|
16
|
+
markerEnd?: EdgeMarkerType;
|
|
17
|
+
zIndex?: number;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
interactionWidth?: number;
|
|
20
|
+
};
|
|
21
|
+
export type SmoothStepPathOptions = {
|
|
22
|
+
offset?: number;
|
|
23
|
+
borderRadius?: number;
|
|
24
|
+
stepPosition?: number;
|
|
25
|
+
};
|
|
26
|
+
export type StepPathOptions = {
|
|
27
|
+
offset?: number;
|
|
28
|
+
};
|
|
29
|
+
export type BezierPathOptions = {
|
|
30
|
+
curvature?: number;
|
|
31
|
+
};
|
|
32
|
+
export type DefaultEdgeOptionsBase<EdgeType extends EdgeBase> = Omit<EdgeType, 'id' | 'source' | 'target' | 'sourceHandle' | 'targetHandle' | 'selected'>;
|
|
33
|
+
export declare enum ConnectionLineType {
|
|
34
|
+
Bezier = "default",
|
|
35
|
+
Straight = "straight",
|
|
36
|
+
Step = "step",
|
|
37
|
+
SmoothStep = "smoothstep",
|
|
38
|
+
SimpleBezier = "simplebezier"
|
|
39
|
+
}
|
|
40
|
+
export type EdgeMarker = {
|
|
41
|
+
type: MarkerType | `${MarkerType}`;
|
|
42
|
+
color?: string | null;
|
|
43
|
+
width?: number;
|
|
44
|
+
height?: number;
|
|
45
|
+
markerUnits?: string;
|
|
46
|
+
orient?: string;
|
|
47
|
+
strokeWidth?: number;
|
|
48
|
+
};
|
|
49
|
+
export type EdgeMarkerType = string | EdgeMarker;
|
|
50
|
+
export declare enum MarkerType {
|
|
51
|
+
Arrow = "arrow",
|
|
52
|
+
ArrowClosed = "arrowclosed"
|
|
53
|
+
}
|
|
54
|
+
export type MarkerProps = EdgeMarker & {
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
export type EdgePosition = {
|
|
58
|
+
sourceX: number;
|
|
59
|
+
sourceY: number;
|
|
60
|
+
targetX: number;
|
|
61
|
+
targetY: number;
|
|
62
|
+
sourcePosition: Position;
|
|
63
|
+
targetPosition: Position;
|
|
64
|
+
};
|
|
65
|
+
export type EdgeLookup<EdgeType extends EdgeBase = EdgeBase> = Map<string, EdgeType>;
|
|
66
|
+
export type EdgeToolbarBaseProps = {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
isVisible?: boolean;
|
|
70
|
+
alignX?: 'left' | 'center' | 'right';
|
|
71
|
+
alignY?: 'top' | 'center' | 'bottom';
|
|
72
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { Selection as D3Selection } from "../../externals.js";
|
|
2
|
+
import type { D3DragEvent, SubjectPosition } from "../../externals.js";
|
|
3
|
+
import type { ZoomBehavior } from "../../externals.js";
|
|
4
|
+
import type { XYPosition, Rect, Position } from './utils.js';
|
|
5
|
+
import type { InternalNodeBase, NodeBase, NodeDragItem } from './nodes.js';
|
|
6
|
+
import type { Handle, HandleType } from './handles.js';
|
|
7
|
+
import { PanZoomInstance } from './panzoom.js';
|
|
8
|
+
import { EdgeBase } from '../index.js';
|
|
9
|
+
export type Project = (position: XYPosition) => XYPosition;
|
|
10
|
+
export type OnMove = (event: MouseEvent | TouchEvent | null, viewport: Viewport) => void;
|
|
11
|
+
export type OnMoveStart = OnMove;
|
|
12
|
+
export type OnMoveEnd = OnMove;
|
|
13
|
+
export type ZoomInOut = (options?: ViewportHelperFunctionOptions) => Promise<boolean>;
|
|
14
|
+
export type ZoomTo = (zoomLevel: number, options?: ViewportHelperFunctionOptions) => Promise<boolean>;
|
|
15
|
+
export type GetZoom = () => number;
|
|
16
|
+
export type GetViewport = () => Viewport;
|
|
17
|
+
export type SetViewport = (viewport: Viewport, options?: ViewportHelperFunctionOptions) => Promise<boolean>;
|
|
18
|
+
export type SetCenter = (x: number, y: number, options?: SetCenterOptions) => Promise<boolean>;
|
|
19
|
+
export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => Promise<boolean>;
|
|
20
|
+
export type Connection = {
|
|
21
|
+
source: string;
|
|
22
|
+
target: string;
|
|
23
|
+
sourceHandle: string | null;
|
|
24
|
+
targetHandle: string | null;
|
|
25
|
+
};
|
|
26
|
+
export type HandleConnection = Connection & {
|
|
27
|
+
edgeId: string;
|
|
28
|
+
};
|
|
29
|
+
export type NodeConnection = Connection & {
|
|
30
|
+
edgeId: string;
|
|
31
|
+
};
|
|
32
|
+
export type UseNodeConnectionsParams = {
|
|
33
|
+
id?: string;
|
|
34
|
+
onConnect?: (connections: HandleConnection[]) => void;
|
|
35
|
+
onDisconnect?: (connections: HandleConnection[]) => void;
|
|
36
|
+
} & ({
|
|
37
|
+
handleType: HandleType;
|
|
38
|
+
handleId?: string;
|
|
39
|
+
} | {
|
|
40
|
+
handleType?: HandleType;
|
|
41
|
+
handleId?: never;
|
|
42
|
+
});
|
|
43
|
+
export declare enum ConnectionMode {
|
|
44
|
+
Strict = "strict",
|
|
45
|
+
Loose = "loose"
|
|
46
|
+
}
|
|
47
|
+
export type OnConnectStartParams = {
|
|
48
|
+
nodeId: string | null;
|
|
49
|
+
handleId: string | null;
|
|
50
|
+
handleType: HandleType | null;
|
|
51
|
+
};
|
|
52
|
+
export type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectStartParams) => void;
|
|
53
|
+
export type OnConnect = (connection: Connection) => void;
|
|
54
|
+
export type OnConnectEnd<NodeType extends NodeBase = NodeBase> = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState<InternalNodeBase<NodeType>>) => void;
|
|
55
|
+
export type OnReconnect<EdgeType extends EdgeBase = EdgeBase> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
|
56
|
+
export type OnReconnectStart<EdgeType extends EdgeBase = EdgeBase> = (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType) => void;
|
|
57
|
+
export type OnReconnectEnd<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase> = (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType, connectionState: FinalConnectionState<InternalNodeBase<NodeType>>) => void;
|
|
58
|
+
export type IsValidConnection<EdgeType extends EdgeBase = EdgeBase> = (edge: EdgeType | Connection) => boolean;
|
|
59
|
+
export type FitViewParamsBase<NodeType extends NodeBase> = {
|
|
60
|
+
nodes: Map<string, InternalNodeBase<NodeType>>;
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
panZoom: PanZoomInstance;
|
|
64
|
+
minZoom: number;
|
|
65
|
+
maxZoom: number;
|
|
66
|
+
};
|
|
67
|
+
export type PaddingUnit = 'px' | '%';
|
|
68
|
+
export type PaddingWithUnit = `${number}${PaddingUnit}` | number;
|
|
69
|
+
export type Padding = PaddingWithUnit | {
|
|
70
|
+
top?: PaddingWithUnit;
|
|
71
|
+
right?: PaddingWithUnit;
|
|
72
|
+
bottom?: PaddingWithUnit;
|
|
73
|
+
left?: PaddingWithUnit;
|
|
74
|
+
x?: PaddingWithUnit;
|
|
75
|
+
y?: PaddingWithUnit;
|
|
76
|
+
};
|
|
77
|
+
export type FitViewOptionsBase<NodeType extends NodeBase = NodeBase> = {
|
|
78
|
+
padding?: Padding;
|
|
79
|
+
includeHiddenNodes?: boolean;
|
|
80
|
+
minZoom?: number;
|
|
81
|
+
maxZoom?: number;
|
|
82
|
+
duration?: number;
|
|
83
|
+
ease?: (t: number) => number;
|
|
84
|
+
interpolate?: 'smooth' | 'linear';
|
|
85
|
+
nodes?: (NodeType | {
|
|
86
|
+
id: string;
|
|
87
|
+
})[];
|
|
88
|
+
};
|
|
89
|
+
export type Viewport = {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
zoom: number;
|
|
93
|
+
};
|
|
94
|
+
export type KeyCode = string | Array<string>;
|
|
95
|
+
export type SnapGrid = [
|
|
96
|
+
number,
|
|
97
|
+
number
|
|
98
|
+
];
|
|
99
|
+
export declare enum PanOnScrollMode {
|
|
100
|
+
Free = "free",
|
|
101
|
+
Vertical = "vertical",
|
|
102
|
+
Horizontal = "horizontal"
|
|
103
|
+
}
|
|
104
|
+
export type ViewportHelperFunctionOptions = {
|
|
105
|
+
duration?: number;
|
|
106
|
+
ease?: (t: number) => number;
|
|
107
|
+
interpolate?: 'smooth' | 'linear';
|
|
108
|
+
};
|
|
109
|
+
export type SetCenterOptions = ViewportHelperFunctionOptions & {
|
|
110
|
+
zoom?: number;
|
|
111
|
+
};
|
|
112
|
+
export type FitBoundsOptions = ViewportHelperFunctionOptions & {
|
|
113
|
+
padding?: number;
|
|
114
|
+
};
|
|
115
|
+
export type OnViewportChange = (viewport: Viewport) => void;
|
|
116
|
+
export type D3ZoomInstance = ZoomBehavior<Element, unknown>;
|
|
117
|
+
export type D3SelectionInstance = D3Selection<Element, unknown, null, undefined>;
|
|
118
|
+
export type D3ZoomHandler = (this: Element, event: any, d: unknown) => void;
|
|
119
|
+
export type UpdateNodeInternals = (nodeId: string | string[]) => void;
|
|
120
|
+
export type PanelPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-right';
|
|
121
|
+
export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>;
|
|
122
|
+
export declare enum SelectionMode {
|
|
123
|
+
Partial = "partial",
|
|
124
|
+
Full = "full"
|
|
125
|
+
}
|
|
126
|
+
export type SelectionRect = Rect & {
|
|
127
|
+
startX: number;
|
|
128
|
+
startY: number;
|
|
129
|
+
};
|
|
130
|
+
export type OnError = (id: string, message: string) => void;
|
|
131
|
+
export type UpdateNodePositions<NodeType extends InternalNodeBase = InternalNodeBase> = (dragItems: Map<string, NodeDragItem | NodeType>, dragging?: boolean) => void;
|
|
132
|
+
export type PanBy = (delta: XYPosition) => Promise<boolean>;
|
|
133
|
+
export declare const initialConnection: NoConnection;
|
|
134
|
+
export type NoConnection = {
|
|
135
|
+
inProgress: false;
|
|
136
|
+
isValid: null;
|
|
137
|
+
from: null;
|
|
138
|
+
fromHandle: null;
|
|
139
|
+
fromPosition: null;
|
|
140
|
+
fromNode: null;
|
|
141
|
+
to: null;
|
|
142
|
+
toHandle: null;
|
|
143
|
+
toPosition: null;
|
|
144
|
+
toNode: null;
|
|
145
|
+
pointer: null;
|
|
146
|
+
};
|
|
147
|
+
export type ConnectionInProgress<NodeType extends InternalNodeBase = InternalNodeBase> = {
|
|
148
|
+
inProgress: true;
|
|
149
|
+
isValid: boolean | null;
|
|
150
|
+
from: XYPosition;
|
|
151
|
+
fromHandle: Handle;
|
|
152
|
+
fromPosition: Position;
|
|
153
|
+
fromNode: NodeType;
|
|
154
|
+
to: XYPosition;
|
|
155
|
+
toHandle: Handle | null;
|
|
156
|
+
toPosition: Position;
|
|
157
|
+
toNode: NodeType | null;
|
|
158
|
+
pointer: XYPosition;
|
|
159
|
+
};
|
|
160
|
+
export type ConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = ConnectionInProgress<NodeType> | NoConnection;
|
|
161
|
+
export type FinalConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = (Omit<ConnectionInProgress<NodeType>, 'inProgress' | 'toPosition'> & {
|
|
162
|
+
toPosition: Position | null;
|
|
163
|
+
}) | Omit<NoConnection, 'inProgress'>;
|
|
164
|
+
export type UpdateConnection<NodeType extends InternalNodeBase = InternalNodeBase> = (params: ConnectionState<NodeType>) => void;
|
|
165
|
+
export type ColorModeClass = 'light' | 'dark';
|
|
166
|
+
export type ColorMode = ColorModeClass | 'system';
|
|
167
|
+
export type ConnectionLookup = Map<string, Map<string, HandleConnection>>;
|
|
168
|
+
export type OnBeforeDeleteBase<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase> = ({ nodes, edges, }: {
|
|
169
|
+
nodes: NodeType[];
|
|
170
|
+
edges: EdgeType[];
|
|
171
|
+
}) => Promise<boolean | {
|
|
172
|
+
nodes: NodeType[];
|
|
173
|
+
edges: EdgeType[];
|
|
174
|
+
}>;
|
|
175
|
+
export type ZIndexMode = 'auto' | 'basic' | 'manual';
|