@multiplatform.one/node-graph 7.7.2
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/README.md +80 -0
- package/css/graph.css +171 -0
- package/demo.ts +14 -0
- package/dist/cjs/NodeGraph.cjs +34 -0
- package/dist/cjs/NodeGraph.native.js +37 -0
- package/dist/cjs/NodeGraph.native.js.map +1 -0
- package/dist/cjs/bench/frameSampler.cjs +290 -0
- package/dist/cjs/bench/frameSampler.native.js +409 -0
- package/dist/cjs/bench/frameSampler.native.js.map +1 -0
- package/dist/cjs/bench/generateGraph.cjs +125 -0
- package/dist/cjs/bench/generateGraph.native.js +128 -0
- package/dist/cjs/bench/generateGraph.native.js.map +1 -0
- package/dist/cjs/diagnostics/GraphDiagnostics.cjs +154 -0
- package/dist/cjs/diagnostics/GraphDiagnostics.native.js +166 -0
- package/dist/cjs/diagnostics/GraphDiagnostics.native.js.map +1 -0
- package/dist/cjs/diagnostics/LiveGraphDiagnostics.cjs +101 -0
- package/dist/cjs/diagnostics/LiveGraphDiagnostics.native.js +106 -0
- package/dist/cjs/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
- package/dist/cjs/diagnostics/fromWire.cjs +48 -0
- package/dist/cjs/diagnostics/fromWire.native.js +51 -0
- package/dist/cjs/diagnostics/fromWire.native.js.map +1 -0
- package/dist/cjs/diagnostics/lastError.cjs +67 -0
- package/dist/cjs/diagnostics/lastError.native.js +75 -0
- package/dist/cjs/diagnostics/lastError.native.js.map +1 -0
- package/dist/cjs/diagnostics/types.cjs +18 -0
- package/dist/cjs/diagnostics/types.native.js +21 -0
- package/dist/cjs/diagnostics/types.native.js.map +1 -0
- package/dist/cjs/diagnostics/useGraphDiagnostics.cjs +69 -0
- package/dist/cjs/diagnostics/useGraphDiagnostics.native.js +75 -0
- package/dist/cjs/diagnostics/useGraphDiagnostics.native.js.map +1 -0
- package/dist/cjs/dom/GraphDomLayout.cjs +37 -0
- package/dist/cjs/dom/GraphDomLayout.native.js +40 -0
- package/dist/cjs/dom/GraphDomLayout.native.js.map +1 -0
- package/dist/cjs/dom/boot.cjs +100 -0
- package/dist/cjs/dom/boot.native.js +111 -0
- package/dist/cjs/dom/boot.native.js.map +1 -0
- package/dist/cjs/dom/wire.cjs +215 -0
- package/dist/cjs/dom/wire.native.js +274 -0
- package/dist/cjs/dom/wire.native.js.map +1 -0
- package/dist/cjs/edges/GraphEdge.cjs +169 -0
- package/dist/cjs/edges/GraphEdge.native.js +178 -0
- package/dist/cjs/edges/GraphEdge.native.js.map +1 -0
- package/dist/cjs/edges/edgeKinds.cjs +51 -0
- package/dist/cjs/edges/edgeKinds.native.js +54 -0
- package/dist/cjs/edges/edgeKinds.native.js.map +1 -0
- package/dist/cjs/edges/edgeStyle.cjs +94 -0
- package/dist/cjs/edges/edgeStyle.native.js +99 -0
- package/dist/cjs/edges/edgeStyle.native.js.map +1 -0
- package/dist/cjs/index.cjs +197 -0
- package/dist/cjs/index.native.js +200 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/interaction/lassoIntercept.cjs +54 -0
- package/dist/cjs/interaction/lassoIntercept.native.js +57 -0
- package/dist/cjs/interaction/lassoIntercept.native.js.map +1 -0
- package/dist/cjs/interaction/legalTargets.cjs +75 -0
- package/dist/cjs/interaction/legalTargets.native.js +118 -0
- package/dist/cjs/interaction/legalTargets.native.js.map +1 -0
- package/dist/cjs/interaction/snapAlignment.cjs +165 -0
- package/dist/cjs/interaction/snapAlignment.native.js +245 -0
- package/dist/cjs/interaction/snapAlignment.native.js.map +1 -0
- package/dist/cjs/interaction/snapChanges.cjs +214 -0
- package/dist/cjs/interaction/snapChanges.native.js +269 -0
- package/dist/cjs/interaction/snapChanges.native.js.map +1 -0
- package/dist/cjs/interaction/spatialHash.cjs +97 -0
- package/dist/cjs/interaction/spatialHash.native.js +165 -0
- package/dist/cjs/interaction/spatialHash.native.js.map +1 -0
- package/dist/cjs/interaction/useLassoSelect.cjs +259 -0
- package/dist/cjs/interaction/useLassoSelect.native.js +287 -0
- package/dist/cjs/interaction/useLassoSelect.native.js.map +1 -0
- package/dist/cjs/knobs/KnobEnvelopeProvider.cjs +77 -0
- package/dist/cjs/knobs/KnobEnvelopeProvider.native.js +85 -0
- package/dist/cjs/knobs/KnobEnvelopeProvider.native.js.map +1 -0
- package/dist/cjs/knobs/envelope.cjs +59 -0
- package/dist/cjs/knobs/envelope.native.js +78 -0
- package/dist/cjs/knobs/envelope.native.js.map +1 -0
- package/dist/cjs/knobs/graphKnobs.cjs +39 -0
- package/dist/cjs/knobs/graphKnobs.native.js +43 -0
- package/dist/cjs/knobs/graphKnobs.native.js.map +1 -0
- package/dist/cjs/knobs/useKnobEnvelope.cjs +108 -0
- package/dist/cjs/knobs/useKnobEnvelope.native.js +140 -0
- package/dist/cjs/knobs/useKnobEnvelope.native.js.map +1 -0
- package/dist/cjs/layout/dagre.cjs +125 -0
- package/dist/cjs/layout/dagre.native.js +259 -0
- package/dist/cjs/layout/dagre.native.js.map +1 -0
- package/dist/cjs/layout/layout.cjs +84 -0
- package/dist/cjs/layout/layout.native.js +112 -0
- package/dist/cjs/layout/layout.native.js.map +1 -0
- package/dist/cjs/layout/runner.cjs +194 -0
- package/dist/cjs/layout/runner.native.js +247 -0
- package/dist/cjs/layout/runner.native.js.map +1 -0
- package/dist/cjs/layout/structuredCloneShim.cjs +80 -0
- package/dist/cjs/layout/structuredCloneShim.native.js +160 -0
- package/dist/cjs/layout/structuredCloneShim.native.js.map +1 -0
- package/dist/cjs/layout/types.cjs +18 -0
- package/dist/cjs/layout/types.native.js +21 -0
- package/dist/cjs/layout/types.native.js.map +1 -0
- package/dist/cjs/layout/worker.entry.cjs +58 -0
- package/dist/cjs/layout/worker.entry.native.js +75 -0
- package/dist/cjs/layout/worker.entry.native.js.map +1 -0
- package/dist/cjs/layout/worker.generated.cjs +32 -0
- package/dist/cjs/layout/worker.generated.native.js +35 -0
- package/dist/cjs/layout/worker.generated.native.js.map +1 -0
- package/dist/cjs/model/commands.cjs +235 -0
- package/dist/cjs/model/commands.native.js +317 -0
- package/dist/cjs/model/commands.native.js.map +1 -0
- package/dist/cjs/model/connect.cjs +159 -0
- package/dist/cjs/model/connect.native.js +239 -0
- package/dist/cjs/model/connect.native.js.map +1 -0
- package/dist/cjs/model/document.cjs +18 -0
- package/dist/cjs/model/document.native.js +21 -0
- package/dist/cjs/model/document.native.js.map +1 -0
- package/dist/cjs/model/history.cjs +121 -0
- package/dist/cjs/model/history.native.js +178 -0
- package/dist/cjs/model/history.native.js.map +1 -0
- package/dist/cjs/model/index.cjs +60 -0
- package/dist/cjs/model/index.native.js +63 -0
- package/dist/cjs/model/index.native.js.map +1 -0
- package/dist/cjs/model/schema.cjs +63 -0
- package/dist/cjs/model/schema.native.js +68 -0
- package/dist/cjs/model/schema.native.js.map +1 -0
- package/dist/cjs/model/select.cjs +78 -0
- package/dist/cjs/model/select.native.js +107 -0
- package/dist/cjs/model/select.native.js.map +1 -0
- package/dist/cjs/model/serialize.cjs +332 -0
- package/dist/cjs/model/serialize.native.js +374 -0
- package/dist/cjs/model/serialize.native.js.map +1 -0
- package/dist/cjs/native/DomOnlyStory.cjs +60 -0
- package/dist/cjs/native/DomOnlyStory.native.js +66 -0
- package/dist/cjs/native/DomOnlyStory.native.js.map +1 -0
- package/dist/cjs/native/GraphToolbar.cjs +101 -0
- package/dist/cjs/native/GraphToolbar.native.js +107 -0
- package/dist/cjs/native/GraphToolbar.native.js.map +1 -0
- package/dist/cjs/native/domEntryRegistry.cjs +39 -0
- package/dist/cjs/native/domEntryRegistry.native.js +42 -0
- package/dist/cjs/native/domEntryRegistry.native.js.map +1 -0
- package/dist/cjs/native/graphChildren.cjs +45 -0
- package/dist/cjs/native/graphChildren.native.js +50 -0
- package/dist/cjs/native/graphChildren.native.js.map +1 -0
- package/dist/cjs/nodes/GraphNode.cjs +161 -0
- package/dist/cjs/nodes/GraphNode.native.js +206 -0
- package/dist/cjs/nodes/GraphNode.native.js.map +1 -0
- package/dist/cjs/nodes/GraphPort.cjs +104 -0
- package/dist/cjs/nodes/GraphPort.native.js +108 -0
- package/dist/cjs/nodes/GraphPort.native.js.map +1 -0
- package/dist/cjs/nodes/handleGeometry.cjs +98 -0
- package/dist/cjs/nodes/handleGeometry.native.js +104 -0
- package/dist/cjs/nodes/handleGeometry.native.js.map +1 -0
- package/dist/cjs/nodes/lod.cjs +41 -0
- package/dist/cjs/nodes/lod.native.js +45 -0
- package/dist/cjs/nodes/lod.native.js.map +1 -0
- package/dist/cjs/nodes/nodeMeasure.cjs +108 -0
- package/dist/cjs/nodes/nodeMeasure.native.js +134 -0
- package/dist/cjs/nodes/nodeMeasure.native.js.map +1 -0
- package/dist/cjs/nodes/overviewNode.cjs +74 -0
- package/dist/cjs/nodes/overviewNode.native.js +81 -0
- package/dist/cjs/nodes/overviewNode.native.js.map +1 -0
- package/dist/cjs/react-flow/ConnectionPuck.cjs +122 -0
- package/dist/cjs/react-flow/ConnectionPuck.native.js +143 -0
- package/dist/cjs/react-flow/ConnectionPuck.native.js.map +1 -0
- package/dist/cjs/react-flow/GraphActions.cjs +47 -0
- package/dist/cjs/react-flow/GraphActions.native.js +51 -0
- package/dist/cjs/react-flow/GraphActions.native.js.map +1 -0
- package/dist/cjs/react-flow/GraphCommandBridge.cjs +238 -0
- package/dist/cjs/react-flow/GraphCommandBridge.native.js +272 -0
- package/dist/cjs/react-flow/GraphCommandBridge.native.js.map +1 -0
- package/dist/cjs/react-flow/GraphNodeHost.cjs +77 -0
- package/dist/cjs/react-flow/GraphNodeHost.native.js +89 -0
- package/dist/cjs/react-flow/GraphNodeHost.native.js.map +1 -0
- package/dist/cjs/react-flow/GraphPaintProbe.cjs +60 -0
- package/dist/cjs/react-flow/GraphPaintProbe.native.js +65 -0
- package/dist/cjs/react-flow/GraphPaintProbe.native.js.map +1 -0
- package/dist/cjs/react-flow/GraphZoomVar.cjs +42 -0
- package/dist/cjs/react-flow/GraphZoomVar.native.js +48 -0
- package/dist/cjs/react-flow/GraphZoomVar.native.js.map +1 -0
- package/dist/cjs/react-flow/LassoOverlay.cjs +47 -0
- package/dist/cjs/react-flow/LassoOverlay.native.js +51 -0
- package/dist/cjs/react-flow/LassoOverlay.native.js.map +1 -0
- package/dist/cjs/react-flow/NodeGraphWeb.cjs +386 -0
- package/dist/cjs/react-flow/NodeGraphWeb.native.js +515 -0
- package/dist/cjs/react-flow/NodeGraphWeb.native.js.map +1 -0
- package/dist/cjs/react-flow/SnapGuides.cjs +89 -0
- package/dist/cjs/react-flow/SnapGuides.native.js +114 -0
- package/dist/cjs/react-flow/SnapGuides.native.js.map +1 -0
- package/dist/cjs/react-flow/demoControlBody.cjs +93 -0
- package/dist/cjs/react-flow/demoControlBody.native.js +104 -0
- package/dist/cjs/react-flow/demoControlBody.native.js.map +1 -0
- package/dist/cjs/react-flow/demoNodeBody.cjs +121 -0
- package/dist/cjs/react-flow/demoNodeBody.native.js +131 -0
- package/dist/cjs/react-flow/demoNodeBody.native.js.map +1 -0
- package/dist/cjs/react-flow/fixtures.cjs +215 -0
- package/dist/cjs/react-flow/fixtures.native.js +225 -0
- package/dist/cjs/react-flow/fixtures.native.js.map +1 -0
- package/dist/cjs/react-flow/flowAdapter.cjs +121 -0
- package/dist/cjs/react-flow/flowAdapter.native.js +133 -0
- package/dist/cjs/react-flow/flowAdapter.native.js.map +1 -0
- package/dist/cjs/react-flow/graphHandle.cjs +28 -0
- package/dist/cjs/react-flow/graphHandle.native.js +31 -0
- package/dist/cjs/react-flow/graphHandle.native.js.map +1 -0
- package/dist/cjs/react-flow/nodeCensus.cjs +56 -0
- package/dist/cjs/react-flow/nodeCensus.native.js +80 -0
- package/dist/cjs/react-flow/nodeCensus.native.js.map +1 -0
- package/dist/cjs/react-flow/useGraphController.cjs +297 -0
- package/dist/cjs/react-flow/useGraphController.native.js +393 -0
- package/dist/cjs/react-flow/useGraphController.native.js.map +1 -0
- package/dist/cjs/react-flow/xy.cjs +60 -0
- package/dist/cjs/react-flow/xy.native.js +63 -0
- package/dist/cjs/react-flow/xy.native.js.map +1 -0
- package/dist/cjs/theme/GraphFaces.cjs +114 -0
- package/dist/cjs/theme/GraphFaces.native.js +181 -0
- package/dist/cjs/theme/GraphFaces.native.js.map +1 -0
- package/dist/cjs/theme/GraphVarsStyle.cjs +88 -0
- package/dist/cjs/theme/GraphVarsStyle.native.js +100 -0
- package/dist/cjs/theme/GraphVarsStyle.native.js.map +1 -0
- package/dist/cjs/theme/faces.cjs +121 -0
- package/dist/cjs/theme/faces.generated.cjs +48 -0
- package/dist/cjs/theme/faces.generated.native.js +51 -0
- package/dist/cjs/theme/faces.generated.native.js.map +1 -0
- package/dist/cjs/theme/faces.native.js +133 -0
- package/dist/cjs/theme/faces.native.js.map +1 -0
- package/dist/cjs/theme/graphVars.cjs +318 -0
- package/dist/cjs/theme/graphVars.native.js +351 -0
- package/dist/cjs/theme/graphVars.native.js.map +1 -0
- package/dist/esm/NodeGraph.mjs +9 -0
- package/dist/esm/NodeGraph.mjs.map +1 -0
- package/dist/esm/NodeGraph.native.js +9 -0
- package/dist/esm/NodeGraph.native.js.map +1 -0
- package/dist/esm/bench/frameSampler.mjs +255 -0
- package/dist/esm/bench/frameSampler.mjs.map +1 -0
- package/dist/esm/bench/frameSampler.native.js +371 -0
- package/dist/esm/bench/frameSampler.native.js.map +1 -0
- package/dist/esm/bench/generateGraph.mjs +99 -0
- package/dist/esm/bench/generateGraph.mjs.map +1 -0
- package/dist/esm/bench/generateGraph.native.js +99 -0
- package/dist/esm/bench/generateGraph.native.js.map +1 -0
- package/dist/esm/diagnostics/GraphDiagnostics.mjs +128 -0
- package/dist/esm/diagnostics/GraphDiagnostics.mjs.map +1 -0
- package/dist/esm/diagnostics/GraphDiagnostics.native.js +137 -0
- package/dist/esm/diagnostics/GraphDiagnostics.native.js.map +1 -0
- package/dist/esm/diagnostics/LiveGraphDiagnostics.mjs +76 -0
- package/dist/esm/diagnostics/LiveGraphDiagnostics.mjs.map +1 -0
- package/dist/esm/diagnostics/LiveGraphDiagnostics.native.js +78 -0
- package/dist/esm/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
- package/dist/esm/diagnostics/fromWire.mjs +23 -0
- package/dist/esm/diagnostics/fromWire.mjs.map +1 -0
- package/dist/esm/diagnostics/fromWire.native.js +23 -0
- package/dist/esm/diagnostics/fromWire.native.js.map +1 -0
- package/dist/esm/diagnostics/lastError.mjs +39 -0
- package/dist/esm/diagnostics/lastError.mjs.map +1 -0
- package/dist/esm/diagnostics/lastError.native.js +44 -0
- package/dist/esm/diagnostics/lastError.native.js.map +1 -0
- package/dist/esm/diagnostics/types.mjs +2 -0
- package/dist/esm/diagnostics/types.mjs.map +1 -0
- package/dist/esm/diagnostics/types.native.js +2 -0
- package/dist/esm/diagnostics/types.native.js.map +1 -0
- package/dist/esm/diagnostics/useGraphDiagnostics.mjs +44 -0
- package/dist/esm/diagnostics/useGraphDiagnostics.mjs.map +1 -0
- package/dist/esm/diagnostics/useGraphDiagnostics.native.js +47 -0
- package/dist/esm/diagnostics/useGraphDiagnostics.native.js.map +1 -0
- package/dist/esm/dom/GraphDomLayout.mjs +11 -0
- package/dist/esm/dom/GraphDomLayout.mjs.map +1 -0
- package/dist/esm/dom/GraphDomLayout.native.js +11 -0
- package/dist/esm/dom/GraphDomLayout.native.js.map +1 -0
- package/dist/esm/dom/boot.mjs +67 -0
- package/dist/esm/dom/boot.mjs.map +1 -0
- package/dist/esm/dom/boot.native.js +75 -0
- package/dist/esm/dom/boot.native.js.map +1 -0
- package/dist/esm/dom/wire.mjs +183 -0
- package/dist/esm/dom/wire.mjs.map +1 -0
- package/dist/esm/dom/wire.native.js +239 -0
- package/dist/esm/dom/wire.native.js.map +1 -0
- package/dist/esm/edges/GraphEdge.mjs +139 -0
- package/dist/esm/edges/GraphEdge.mjs.map +1 -0
- package/dist/esm/edges/GraphEdge.native.js +145 -0
- package/dist/esm/edges/GraphEdge.native.js.map +1 -0
- package/dist/esm/edges/edgeKinds.mjs +25 -0
- package/dist/esm/edges/edgeKinds.mjs.map +1 -0
- package/dist/esm/edges/edgeKinds.native.js +25 -0
- package/dist/esm/edges/edgeKinds.native.js.map +1 -0
- package/dist/esm/edges/edgeStyle.mjs +63 -0
- package/dist/esm/edges/edgeStyle.mjs.map +1 -0
- package/dist/esm/edges/edgeStyle.native.js +65 -0
- package/dist/esm/edges/edgeStyle.native.js.map +1 -0
- package/dist/esm/index.mjs +50 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +50 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/interaction/lassoIntercept.mjs +29 -0
- package/dist/esm/interaction/lassoIntercept.mjs.map +1 -0
- package/dist/esm/interaction/lassoIntercept.native.js +29 -0
- package/dist/esm/interaction/lassoIntercept.native.js.map +1 -0
- package/dist/esm/interaction/legalTargets.mjs +48 -0
- package/dist/esm/interaction/legalTargets.mjs.map +1 -0
- package/dist/esm/interaction/legalTargets.native.js +88 -0
- package/dist/esm/interaction/legalTargets.native.js.map +1 -0
- package/dist/esm/interaction/snapAlignment.mjs +137 -0
- package/dist/esm/interaction/snapAlignment.mjs.map +1 -0
- package/dist/esm/interaction/snapAlignment.native.js +214 -0
- package/dist/esm/interaction/snapAlignment.native.js.map +1 -0
- package/dist/esm/interaction/snapChanges.mjs +184 -0
- package/dist/esm/interaction/snapChanges.mjs.map +1 -0
- package/dist/esm/interaction/snapChanges.native.js +236 -0
- package/dist/esm/interaction/snapChanges.native.js.map +1 -0
- package/dist/esm/interaction/spatialHash.mjs +71 -0
- package/dist/esm/interaction/spatialHash.mjs.map +1 -0
- package/dist/esm/interaction/spatialHash.native.js +136 -0
- package/dist/esm/interaction/spatialHash.native.js.map +1 -0
- package/dist/esm/interaction/useLassoSelect.mjs +231 -0
- package/dist/esm/interaction/useLassoSelect.mjs.map +1 -0
- package/dist/esm/interaction/useLassoSelect.native.js +256 -0
- package/dist/esm/interaction/useLassoSelect.native.js.map +1 -0
- package/dist/esm/knobs/KnobEnvelopeProvider.mjs +51 -0
- package/dist/esm/knobs/KnobEnvelopeProvider.mjs.map +1 -0
- package/dist/esm/knobs/KnobEnvelopeProvider.native.js +56 -0
- package/dist/esm/knobs/KnobEnvelopeProvider.native.js.map +1 -0
- package/dist/esm/knobs/envelope.mjs +29 -0
- package/dist/esm/knobs/envelope.mjs.map +1 -0
- package/dist/esm/knobs/envelope.native.js +45 -0
- package/dist/esm/knobs/envelope.native.js.map +1 -0
- package/dist/esm/knobs/graphKnobs.mjs +14 -0
- package/dist/esm/knobs/graphKnobs.mjs.map +1 -0
- package/dist/esm/knobs/graphKnobs.native.js +15 -0
- package/dist/esm/knobs/graphKnobs.native.js.map +1 -0
- package/dist/esm/knobs/useKnobEnvelope.mjs +83 -0
- package/dist/esm/knobs/useKnobEnvelope.mjs.map +1 -0
- package/dist/esm/knobs/useKnobEnvelope.native.js +112 -0
- package/dist/esm/knobs/useKnobEnvelope.native.js.map +1 -0
- package/dist/esm/layout/dagre.mjs +99 -0
- package/dist/esm/layout/dagre.mjs.map +1 -0
- package/dist/esm/layout/dagre.native.js +230 -0
- package/dist/esm/layout/dagre.native.js.map +1 -0
- package/dist/esm/layout/layout.mjs +57 -0
- package/dist/esm/layout/layout.mjs.map +1 -0
- package/dist/esm/layout/layout.native.js +82 -0
- package/dist/esm/layout/layout.native.js.map +1 -0
- package/dist/esm/layout/runner.mjs +164 -0
- package/dist/esm/layout/runner.mjs.map +1 -0
- package/dist/esm/layout/runner.native.js +214 -0
- package/dist/esm/layout/runner.native.js.map +1 -0
- package/dist/esm/layout/structuredCloneShim.mjs +54 -0
- package/dist/esm/layout/structuredCloneShim.mjs.map +1 -0
- package/dist/esm/layout/structuredCloneShim.native.js +131 -0
- package/dist/esm/layout/structuredCloneShim.native.js.map +1 -0
- package/dist/esm/layout/types.mjs +2 -0
- package/dist/esm/layout/types.mjs.map +1 -0
- package/dist/esm/layout/types.native.js +2 -0
- package/dist/esm/layout/types.native.js.map +1 -0
- package/dist/esm/layout/worker.entry.mjs +33 -0
- package/dist/esm/layout/worker.entry.mjs.map +1 -0
- package/dist/esm/layout/worker.entry.native.js +47 -0
- package/dist/esm/layout/worker.entry.native.js.map +1 -0
- package/dist/esm/layout/worker.generated.mjs +5 -0
- package/dist/esm/layout/worker.generated.mjs.map +1 -0
- package/dist/esm/layout/worker.generated.native.js +5 -0
- package/dist/esm/layout/worker.generated.native.js.map +1 -0
- package/dist/esm/model/commands.mjs +209 -0
- package/dist/esm/model/commands.mjs.map +1 -0
- package/dist/esm/model/commands.native.js +288 -0
- package/dist/esm/model/commands.native.js.map +1 -0
- package/dist/esm/model/connect.mjs +124 -0
- package/dist/esm/model/connect.mjs.map +1 -0
- package/dist/esm/model/connect.native.js +201 -0
- package/dist/esm/model/connect.native.js.map +1 -0
- package/dist/esm/model/document.mjs +2 -0
- package/dist/esm/model/document.mjs.map +1 -0
- package/dist/esm/model/document.native.js +2 -0
- package/dist/esm/model/document.native.js.map +1 -0
- package/dist/esm/model/history.mjs +96 -0
- package/dist/esm/model/history.mjs.map +1 -0
- package/dist/esm/model/history.native.js +150 -0
- package/dist/esm/model/history.native.js.map +1 -0
- package/dist/esm/model/index.mjs +8 -0
- package/dist/esm/model/index.mjs.map +1 -0
- package/dist/esm/model/index.native.js +8 -0
- package/dist/esm/model/index.native.js.map +1 -0
- package/dist/esm/model/schema.mjs +32 -0
- package/dist/esm/model/schema.mjs.map +1 -0
- package/dist/esm/model/schema.native.js +34 -0
- package/dist/esm/model/schema.native.js.map +1 -0
- package/dist/esm/model/select.mjs +49 -0
- package/dist/esm/model/select.mjs.map +1 -0
- package/dist/esm/model/select.native.js +75 -0
- package/dist/esm/model/select.native.js.map +1 -0
- package/dist/esm/model/serialize.mjs +306 -0
- package/dist/esm/model/serialize.mjs.map +1 -0
- package/dist/esm/model/serialize.native.js +345 -0
- package/dist/esm/model/serialize.native.js.map +1 -0
- package/dist/esm/native/DomOnlyStory.mjs +33 -0
- package/dist/esm/native/DomOnlyStory.mjs.map +1 -0
- package/dist/esm/native/DomOnlyStory.native.js +36 -0
- package/dist/esm/native/DomOnlyStory.native.js.map +1 -0
- package/dist/esm/native/GraphToolbar.mjs +76 -0
- package/dist/esm/native/GraphToolbar.mjs.map +1 -0
- package/dist/esm/native/GraphToolbar.native.js +79 -0
- package/dist/esm/native/GraphToolbar.native.js.map +1 -0
- package/dist/esm/native/domEntryRegistry.mjs +12 -0
- package/dist/esm/native/domEntryRegistry.mjs.map +1 -0
- package/dist/esm/native/domEntryRegistry.native.js +12 -0
- package/dist/esm/native/domEntryRegistry.native.js.map +1 -0
- package/dist/esm/native/graphChildren.mjs +18 -0
- package/dist/esm/native/graphChildren.mjs.map +1 -0
- package/dist/esm/native/graphChildren.native.js +20 -0
- package/dist/esm/native/graphChildren.native.js.map +1 -0
- package/dist/esm/nodes/GraphNode.mjs +136 -0
- package/dist/esm/nodes/GraphNode.mjs.map +1 -0
- package/dist/esm/nodes/GraphNode.native.js +178 -0
- package/dist/esm/nodes/GraphNode.native.js.map +1 -0
- package/dist/esm/nodes/GraphPort.mjs +79 -0
- package/dist/esm/nodes/GraphPort.mjs.map +1 -0
- package/dist/esm/nodes/GraphPort.native.js +80 -0
- package/dist/esm/nodes/GraphPort.native.js.map +1 -0
- package/dist/esm/nodes/handleGeometry.mjs +65 -0
- package/dist/esm/nodes/handleGeometry.mjs.map +1 -0
- package/dist/esm/nodes/handleGeometry.native.js +68 -0
- package/dist/esm/nodes/handleGeometry.native.js.map +1 -0
- package/dist/esm/nodes/lod.mjs +13 -0
- package/dist/esm/nodes/lod.mjs.map +1 -0
- package/dist/esm/nodes/lod.native.js +14 -0
- package/dist/esm/nodes/lod.native.js.map +1 -0
- package/dist/esm/nodes/nodeMeasure.mjs +72 -0
- package/dist/esm/nodes/nodeMeasure.mjs.map +1 -0
- package/dist/esm/nodes/nodeMeasure.native.js +95 -0
- package/dist/esm/nodes/nodeMeasure.native.js.map +1 -0
- package/dist/esm/nodes/overviewNode.mjs +49 -0
- package/dist/esm/nodes/overviewNode.mjs.map +1 -0
- package/dist/esm/nodes/overviewNode.native.js +53 -0
- package/dist/esm/nodes/overviewNode.native.js.map +1 -0
- package/dist/esm/react-flow/ConnectionPuck.mjs +96 -0
- package/dist/esm/react-flow/ConnectionPuck.mjs.map +1 -0
- package/dist/esm/react-flow/ConnectionPuck.native.js +114 -0
- package/dist/esm/react-flow/ConnectionPuck.native.js.map +1 -0
- package/dist/esm/react-flow/GraphActions.mjs +21 -0
- package/dist/esm/react-flow/GraphActions.mjs.map +1 -0
- package/dist/esm/react-flow/GraphActions.native.js +22 -0
- package/dist/esm/react-flow/GraphActions.native.js.map +1 -0
- package/dist/esm/react-flow/GraphCommandBridge.mjs +213 -0
- package/dist/esm/react-flow/GraphCommandBridge.mjs.map +1 -0
- package/dist/esm/react-flow/GraphCommandBridge.native.js +244 -0
- package/dist/esm/react-flow/GraphCommandBridge.native.js.map +1 -0
- package/dist/esm/react-flow/GraphNodeHost.mjs +50 -0
- package/dist/esm/react-flow/GraphNodeHost.mjs.map +1 -0
- package/dist/esm/react-flow/GraphNodeHost.native.js +59 -0
- package/dist/esm/react-flow/GraphNodeHost.native.js.map +1 -0
- package/dist/esm/react-flow/GraphPaintProbe.mjs +35 -0
- package/dist/esm/react-flow/GraphPaintProbe.mjs.map +1 -0
- package/dist/esm/react-flow/GraphPaintProbe.native.js +37 -0
- package/dist/esm/react-flow/GraphPaintProbe.native.js.map +1 -0
- package/dist/esm/react-flow/GraphZoomVar.mjs +16 -0
- package/dist/esm/react-flow/GraphZoomVar.mjs.map +1 -0
- package/dist/esm/react-flow/GraphZoomVar.native.js +19 -0
- package/dist/esm/react-flow/GraphZoomVar.native.js.map +1 -0
- package/dist/esm/react-flow/LassoOverlay.mjs +22 -0
- package/dist/esm/react-flow/LassoOverlay.mjs.map +1 -0
- package/dist/esm/react-flow/LassoOverlay.native.js +23 -0
- package/dist/esm/react-flow/LassoOverlay.native.js.map +1 -0
- package/dist/esm/react-flow/NodeGraphWeb.mjs +359 -0
- package/dist/esm/react-flow/NodeGraphWeb.mjs.map +1 -0
- package/dist/esm/react-flow/NodeGraphWeb.native.js +485 -0
- package/dist/esm/react-flow/NodeGraphWeb.native.js.map +1 -0
- package/dist/esm/react-flow/SnapGuides.mjs +60 -0
- package/dist/esm/react-flow/SnapGuides.mjs.map +1 -0
- package/dist/esm/react-flow/SnapGuides.native.js +82 -0
- package/dist/esm/react-flow/SnapGuides.native.js.map +1 -0
- package/dist/esm/react-flow/demoControlBody.mjs +67 -0
- package/dist/esm/react-flow/demoControlBody.mjs.map +1 -0
- package/dist/esm/react-flow/demoControlBody.native.js +75 -0
- package/dist/esm/react-flow/demoControlBody.native.js.map +1 -0
- package/dist/esm/react-flow/demoNodeBody.mjs +91 -0
- package/dist/esm/react-flow/demoNodeBody.mjs.map +1 -0
- package/dist/esm/react-flow/demoNodeBody.native.js +98 -0
- package/dist/esm/react-flow/demoNodeBody.native.js.map +1 -0
- package/dist/esm/react-flow/fixtures.mjs +185 -0
- package/dist/esm/react-flow/fixtures.mjs.map +1 -0
- package/dist/esm/react-flow/fixtures.native.js +192 -0
- package/dist/esm/react-flow/fixtures.native.js.map +1 -0
- package/dist/esm/react-flow/flowAdapter.mjs +94 -0
- package/dist/esm/react-flow/flowAdapter.mjs.map +1 -0
- package/dist/esm/react-flow/flowAdapter.native.js +103 -0
- package/dist/esm/react-flow/flowAdapter.native.js.map +1 -0
- package/dist/esm/react-flow/graphHandle.mjs +3 -0
- package/dist/esm/react-flow/graphHandle.mjs.map +1 -0
- package/dist/esm/react-flow/graphHandle.native.js +3 -0
- package/dist/esm/react-flow/graphHandle.native.js.map +1 -0
- package/dist/esm/react-flow/nodeCensus.mjs +28 -0
- package/dist/esm/react-flow/nodeCensus.mjs.map +1 -0
- package/dist/esm/react-flow/nodeCensus.native.js +49 -0
- package/dist/esm/react-flow/nodeCensus.native.js.map +1 -0
- package/dist/esm/react-flow/useGraphController.mjs +269 -0
- package/dist/esm/react-flow/useGraphController.mjs.map +1 -0
- package/dist/esm/react-flow/useGraphController.native.js +362 -0
- package/dist/esm/react-flow/useGraphController.native.js.map +1 -0
- package/dist/esm/react-flow/xy.mjs +8 -0
- package/dist/esm/react-flow/xy.mjs.map +1 -0
- package/dist/esm/react-flow/xy.native.js +8 -0
- package/dist/esm/react-flow/xy.native.js.map +1 -0
- package/dist/esm/theme/GraphFaces.mjs +88 -0
- package/dist/esm/theme/GraphFaces.mjs.map +1 -0
- package/dist/esm/theme/GraphFaces.native.js +152 -0
- package/dist/esm/theme/GraphFaces.native.js.map +1 -0
- package/dist/esm/theme/GraphVarsStyle.mjs +59 -0
- package/dist/esm/theme/GraphVarsStyle.mjs.map +1 -0
- package/dist/esm/theme/GraphVarsStyle.native.js +68 -0
- package/dist/esm/theme/GraphVarsStyle.native.js.map +1 -0
- package/dist/esm/theme/faces.generated.mjs +23 -0
- package/dist/esm/theme/faces.generated.mjs.map +1 -0
- package/dist/esm/theme/faces.generated.native.js +23 -0
- package/dist/esm/theme/faces.generated.native.js.map +1 -0
- package/dist/esm/theme/faces.mjs +89 -0
- package/dist/esm/theme/faces.mjs.map +1 -0
- package/dist/esm/theme/faces.native.js +98 -0
- package/dist/esm/theme/faces.native.js.map +1 -0
- package/dist/esm/theme/graphVars.mjs +284 -0
- package/dist/esm/theme/graphVars.mjs.map +1 -0
- package/dist/esm/theme/graphVars.native.js +314 -0
- package/dist/esm/theme/graphVars.native.js.map +1 -0
- package/dist/jsx/NodeGraph.mjs +9 -0
- package/dist/jsx/NodeGraph.mjs.map +1 -0
- package/dist/jsx/NodeGraph.native.js +37 -0
- package/dist/jsx/NodeGraph.native.js.map +1 -0
- package/dist/jsx/bench/frameSampler.mjs +255 -0
- package/dist/jsx/bench/frameSampler.mjs.map +1 -0
- package/dist/jsx/bench/frameSampler.native.js +409 -0
- package/dist/jsx/bench/frameSampler.native.js.map +1 -0
- package/dist/jsx/bench/generateGraph.mjs +99 -0
- package/dist/jsx/bench/generateGraph.mjs.map +1 -0
- package/dist/jsx/bench/generateGraph.native.js +128 -0
- package/dist/jsx/bench/generateGraph.native.js.map +1 -0
- package/dist/jsx/diagnostics/GraphDiagnostics.mjs +128 -0
- package/dist/jsx/diagnostics/GraphDiagnostics.mjs.map +1 -0
- package/dist/jsx/diagnostics/GraphDiagnostics.native.js +166 -0
- package/dist/jsx/diagnostics/GraphDiagnostics.native.js.map +1 -0
- package/dist/jsx/diagnostics/LiveGraphDiagnostics.mjs +76 -0
- package/dist/jsx/diagnostics/LiveGraphDiagnostics.mjs.map +1 -0
- package/dist/jsx/diagnostics/LiveGraphDiagnostics.native.js +106 -0
- package/dist/jsx/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
- package/dist/jsx/diagnostics/fromWire.mjs +23 -0
- package/dist/jsx/diagnostics/fromWire.mjs.map +1 -0
- package/dist/jsx/diagnostics/fromWire.native.js +51 -0
- package/dist/jsx/diagnostics/fromWire.native.js.map +1 -0
- package/dist/jsx/diagnostics/lastError.mjs +39 -0
- package/dist/jsx/diagnostics/lastError.mjs.map +1 -0
- package/dist/jsx/diagnostics/lastError.native.js +75 -0
- package/dist/jsx/diagnostics/lastError.native.js.map +1 -0
- package/dist/jsx/diagnostics/types.mjs +2 -0
- package/dist/jsx/diagnostics/types.mjs.map +1 -0
- package/dist/jsx/diagnostics/types.native.js +21 -0
- package/dist/jsx/diagnostics/types.native.js.map +1 -0
- package/dist/jsx/diagnostics/useGraphDiagnostics.mjs +44 -0
- package/dist/jsx/diagnostics/useGraphDiagnostics.mjs.map +1 -0
- package/dist/jsx/diagnostics/useGraphDiagnostics.native.js +75 -0
- package/dist/jsx/diagnostics/useGraphDiagnostics.native.js.map +1 -0
- package/dist/jsx/dom/GraphDomLayout.mjs +11 -0
- package/dist/jsx/dom/GraphDomLayout.mjs.map +1 -0
- package/dist/jsx/dom/GraphDomLayout.native.js +40 -0
- package/dist/jsx/dom/GraphDomLayout.native.js.map +1 -0
- package/dist/jsx/dom/boot.mjs +67 -0
- package/dist/jsx/dom/boot.mjs.map +1 -0
- package/dist/jsx/dom/boot.native.js +111 -0
- package/dist/jsx/dom/boot.native.js.map +1 -0
- package/dist/jsx/dom/wire.mjs +183 -0
- package/dist/jsx/dom/wire.mjs.map +1 -0
- package/dist/jsx/dom/wire.native.js +274 -0
- package/dist/jsx/dom/wire.native.js.map +1 -0
- package/dist/jsx/edges/GraphEdge.mjs +139 -0
- package/dist/jsx/edges/GraphEdge.mjs.map +1 -0
- package/dist/jsx/edges/GraphEdge.native.js +178 -0
- package/dist/jsx/edges/GraphEdge.native.js.map +1 -0
- package/dist/jsx/edges/edgeKinds.mjs +25 -0
- package/dist/jsx/edges/edgeKinds.mjs.map +1 -0
- package/dist/jsx/edges/edgeKinds.native.js +54 -0
- package/dist/jsx/edges/edgeKinds.native.js.map +1 -0
- package/dist/jsx/edges/edgeStyle.mjs +63 -0
- package/dist/jsx/edges/edgeStyle.mjs.map +1 -0
- package/dist/jsx/edges/edgeStyle.native.js +99 -0
- package/dist/jsx/edges/edgeStyle.native.js.map +1 -0
- package/dist/jsx/index.js +50 -0
- package/dist/jsx/index.js.map +1 -0
- package/dist/jsx/index.mjs +50 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +200 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/dist/jsx/interaction/lassoIntercept.mjs +29 -0
- package/dist/jsx/interaction/lassoIntercept.mjs.map +1 -0
- package/dist/jsx/interaction/lassoIntercept.native.js +57 -0
- package/dist/jsx/interaction/lassoIntercept.native.js.map +1 -0
- package/dist/jsx/interaction/legalTargets.mjs +48 -0
- package/dist/jsx/interaction/legalTargets.mjs.map +1 -0
- package/dist/jsx/interaction/legalTargets.native.js +118 -0
- package/dist/jsx/interaction/legalTargets.native.js.map +1 -0
- package/dist/jsx/interaction/snapAlignment.mjs +137 -0
- package/dist/jsx/interaction/snapAlignment.mjs.map +1 -0
- package/dist/jsx/interaction/snapAlignment.native.js +245 -0
- package/dist/jsx/interaction/snapAlignment.native.js.map +1 -0
- package/dist/jsx/interaction/snapChanges.mjs +184 -0
- package/dist/jsx/interaction/snapChanges.mjs.map +1 -0
- package/dist/jsx/interaction/snapChanges.native.js +269 -0
- package/dist/jsx/interaction/snapChanges.native.js.map +1 -0
- package/dist/jsx/interaction/spatialHash.mjs +71 -0
- package/dist/jsx/interaction/spatialHash.mjs.map +1 -0
- package/dist/jsx/interaction/spatialHash.native.js +165 -0
- package/dist/jsx/interaction/spatialHash.native.js.map +1 -0
- package/dist/jsx/interaction/useLassoSelect.mjs +231 -0
- package/dist/jsx/interaction/useLassoSelect.mjs.map +1 -0
- package/dist/jsx/interaction/useLassoSelect.native.js +287 -0
- package/dist/jsx/interaction/useLassoSelect.native.js.map +1 -0
- package/dist/jsx/knobs/KnobEnvelopeProvider.mjs +51 -0
- package/dist/jsx/knobs/KnobEnvelopeProvider.mjs.map +1 -0
- package/dist/jsx/knobs/KnobEnvelopeProvider.native.js +85 -0
- package/dist/jsx/knobs/KnobEnvelopeProvider.native.js.map +1 -0
- package/dist/jsx/knobs/envelope.mjs +29 -0
- package/dist/jsx/knobs/envelope.mjs.map +1 -0
- package/dist/jsx/knobs/envelope.native.js +78 -0
- package/dist/jsx/knobs/envelope.native.js.map +1 -0
- package/dist/jsx/knobs/graphKnobs.mjs +14 -0
- package/dist/jsx/knobs/graphKnobs.mjs.map +1 -0
- package/dist/jsx/knobs/graphKnobs.native.js +43 -0
- package/dist/jsx/knobs/graphKnobs.native.js.map +1 -0
- package/dist/jsx/knobs/useKnobEnvelope.mjs +83 -0
- package/dist/jsx/knobs/useKnobEnvelope.mjs.map +1 -0
- package/dist/jsx/knobs/useKnobEnvelope.native.js +140 -0
- package/dist/jsx/knobs/useKnobEnvelope.native.js.map +1 -0
- package/dist/jsx/layout/dagre.mjs +99 -0
- package/dist/jsx/layout/dagre.mjs.map +1 -0
- package/dist/jsx/layout/dagre.native.js +259 -0
- package/dist/jsx/layout/dagre.native.js.map +1 -0
- package/dist/jsx/layout/layout.mjs +57 -0
- package/dist/jsx/layout/layout.mjs.map +1 -0
- package/dist/jsx/layout/layout.native.js +112 -0
- package/dist/jsx/layout/layout.native.js.map +1 -0
- package/dist/jsx/layout/runner.mjs +164 -0
- package/dist/jsx/layout/runner.mjs.map +1 -0
- package/dist/jsx/layout/runner.native.js +247 -0
- package/dist/jsx/layout/runner.native.js.map +1 -0
- package/dist/jsx/layout/structuredCloneShim.mjs +54 -0
- package/dist/jsx/layout/structuredCloneShim.mjs.map +1 -0
- package/dist/jsx/layout/structuredCloneShim.native.js +160 -0
- package/dist/jsx/layout/structuredCloneShim.native.js.map +1 -0
- package/dist/jsx/layout/types.mjs +2 -0
- package/dist/jsx/layout/types.mjs.map +1 -0
- package/dist/jsx/layout/types.native.js +21 -0
- package/dist/jsx/layout/types.native.js.map +1 -0
- package/dist/jsx/layout/worker.entry.mjs +33 -0
- package/dist/jsx/layout/worker.entry.mjs.map +1 -0
- package/dist/jsx/layout/worker.entry.native.js +75 -0
- package/dist/jsx/layout/worker.entry.native.js.map +1 -0
- package/dist/jsx/layout/worker.generated.mjs +5 -0
- package/dist/jsx/layout/worker.generated.mjs.map +1 -0
- package/dist/jsx/layout/worker.generated.native.js +35 -0
- package/dist/jsx/layout/worker.generated.native.js.map +1 -0
- package/dist/jsx/model/commands.mjs +209 -0
- package/dist/jsx/model/commands.mjs.map +1 -0
- package/dist/jsx/model/commands.native.js +317 -0
- package/dist/jsx/model/commands.native.js.map +1 -0
- package/dist/jsx/model/connect.mjs +124 -0
- package/dist/jsx/model/connect.mjs.map +1 -0
- package/dist/jsx/model/connect.native.js +239 -0
- package/dist/jsx/model/connect.native.js.map +1 -0
- package/dist/jsx/model/document.mjs +2 -0
- package/dist/jsx/model/document.mjs.map +1 -0
- package/dist/jsx/model/document.native.js +21 -0
- package/dist/jsx/model/document.native.js.map +1 -0
- package/dist/jsx/model/history.mjs +96 -0
- package/dist/jsx/model/history.mjs.map +1 -0
- package/dist/jsx/model/history.native.js +178 -0
- package/dist/jsx/model/history.native.js.map +1 -0
- package/dist/jsx/model/index.mjs +8 -0
- package/dist/jsx/model/index.mjs.map +1 -0
- package/dist/jsx/model/index.native.js +63 -0
- package/dist/jsx/model/index.native.js.map +1 -0
- package/dist/jsx/model/schema.mjs +32 -0
- package/dist/jsx/model/schema.mjs.map +1 -0
- package/dist/jsx/model/schema.native.js +68 -0
- package/dist/jsx/model/schema.native.js.map +1 -0
- package/dist/jsx/model/select.mjs +49 -0
- package/dist/jsx/model/select.mjs.map +1 -0
- package/dist/jsx/model/select.native.js +107 -0
- package/dist/jsx/model/select.native.js.map +1 -0
- package/dist/jsx/model/serialize.mjs +306 -0
- package/dist/jsx/model/serialize.mjs.map +1 -0
- package/dist/jsx/model/serialize.native.js +374 -0
- package/dist/jsx/model/serialize.native.js.map +1 -0
- package/dist/jsx/native/DomOnlyStory.mjs +33 -0
- package/dist/jsx/native/DomOnlyStory.mjs.map +1 -0
- package/dist/jsx/native/DomOnlyStory.native.js +66 -0
- package/dist/jsx/native/DomOnlyStory.native.js.map +1 -0
- package/dist/jsx/native/GraphToolbar.mjs +76 -0
- package/dist/jsx/native/GraphToolbar.mjs.map +1 -0
- package/dist/jsx/native/GraphToolbar.native.js +107 -0
- package/dist/jsx/native/GraphToolbar.native.js.map +1 -0
- package/dist/jsx/native/domEntryRegistry.mjs +12 -0
- package/dist/jsx/native/domEntryRegistry.mjs.map +1 -0
- package/dist/jsx/native/domEntryRegistry.native.js +42 -0
- package/dist/jsx/native/domEntryRegistry.native.js.map +1 -0
- package/dist/jsx/native/graphChildren.mjs +18 -0
- package/dist/jsx/native/graphChildren.mjs.map +1 -0
- package/dist/jsx/native/graphChildren.native.js +50 -0
- package/dist/jsx/native/graphChildren.native.js.map +1 -0
- package/dist/jsx/nodes/GraphNode.mjs +136 -0
- package/dist/jsx/nodes/GraphNode.mjs.map +1 -0
- package/dist/jsx/nodes/GraphNode.native.js +206 -0
- package/dist/jsx/nodes/GraphNode.native.js.map +1 -0
- package/dist/jsx/nodes/GraphPort.mjs +79 -0
- package/dist/jsx/nodes/GraphPort.mjs.map +1 -0
- package/dist/jsx/nodes/GraphPort.native.js +108 -0
- package/dist/jsx/nodes/GraphPort.native.js.map +1 -0
- package/dist/jsx/nodes/handleGeometry.mjs +65 -0
- package/dist/jsx/nodes/handleGeometry.mjs.map +1 -0
- package/dist/jsx/nodes/handleGeometry.native.js +104 -0
- package/dist/jsx/nodes/handleGeometry.native.js.map +1 -0
- package/dist/jsx/nodes/lod.mjs +13 -0
- package/dist/jsx/nodes/lod.mjs.map +1 -0
- package/dist/jsx/nodes/lod.native.js +45 -0
- package/dist/jsx/nodes/lod.native.js.map +1 -0
- package/dist/jsx/nodes/nodeMeasure.mjs +72 -0
- package/dist/jsx/nodes/nodeMeasure.mjs.map +1 -0
- package/dist/jsx/nodes/nodeMeasure.native.js +134 -0
- package/dist/jsx/nodes/nodeMeasure.native.js.map +1 -0
- package/dist/jsx/nodes/overviewNode.mjs +49 -0
- package/dist/jsx/nodes/overviewNode.mjs.map +1 -0
- package/dist/jsx/nodes/overviewNode.native.js +81 -0
- package/dist/jsx/nodes/overviewNode.native.js.map +1 -0
- package/dist/jsx/react-flow/ConnectionPuck.mjs +96 -0
- package/dist/jsx/react-flow/ConnectionPuck.mjs.map +1 -0
- package/dist/jsx/react-flow/ConnectionPuck.native.js +143 -0
- package/dist/jsx/react-flow/ConnectionPuck.native.js.map +1 -0
- package/dist/jsx/react-flow/GraphActions.mjs +21 -0
- package/dist/jsx/react-flow/GraphActions.mjs.map +1 -0
- package/dist/jsx/react-flow/GraphActions.native.js +51 -0
- package/dist/jsx/react-flow/GraphActions.native.js.map +1 -0
- package/dist/jsx/react-flow/GraphCommandBridge.mjs +213 -0
- package/dist/jsx/react-flow/GraphCommandBridge.mjs.map +1 -0
- package/dist/jsx/react-flow/GraphCommandBridge.native.js +272 -0
- package/dist/jsx/react-flow/GraphCommandBridge.native.js.map +1 -0
- package/dist/jsx/react-flow/GraphNodeHost.mjs +50 -0
- package/dist/jsx/react-flow/GraphNodeHost.mjs.map +1 -0
- package/dist/jsx/react-flow/GraphNodeHost.native.js +89 -0
- package/dist/jsx/react-flow/GraphNodeHost.native.js.map +1 -0
- package/dist/jsx/react-flow/GraphPaintProbe.mjs +35 -0
- package/dist/jsx/react-flow/GraphPaintProbe.mjs.map +1 -0
- package/dist/jsx/react-flow/GraphPaintProbe.native.js +65 -0
- package/dist/jsx/react-flow/GraphPaintProbe.native.js.map +1 -0
- package/dist/jsx/react-flow/GraphZoomVar.mjs +16 -0
- package/dist/jsx/react-flow/GraphZoomVar.mjs.map +1 -0
- package/dist/jsx/react-flow/GraphZoomVar.native.js +48 -0
- package/dist/jsx/react-flow/GraphZoomVar.native.js.map +1 -0
- package/dist/jsx/react-flow/LassoOverlay.mjs +22 -0
- package/dist/jsx/react-flow/LassoOverlay.mjs.map +1 -0
- package/dist/jsx/react-flow/LassoOverlay.native.js +51 -0
- package/dist/jsx/react-flow/LassoOverlay.native.js.map +1 -0
- package/dist/jsx/react-flow/NodeGraphWeb.mjs +359 -0
- package/dist/jsx/react-flow/NodeGraphWeb.mjs.map +1 -0
- package/dist/jsx/react-flow/NodeGraphWeb.native.js +515 -0
- package/dist/jsx/react-flow/NodeGraphWeb.native.js.map +1 -0
- package/dist/jsx/react-flow/SnapGuides.mjs +60 -0
- package/dist/jsx/react-flow/SnapGuides.mjs.map +1 -0
- package/dist/jsx/react-flow/SnapGuides.native.js +114 -0
- package/dist/jsx/react-flow/SnapGuides.native.js.map +1 -0
- package/dist/jsx/react-flow/demoControlBody.mjs +67 -0
- package/dist/jsx/react-flow/demoControlBody.mjs.map +1 -0
- package/dist/jsx/react-flow/demoControlBody.native.js +104 -0
- package/dist/jsx/react-flow/demoControlBody.native.js.map +1 -0
- package/dist/jsx/react-flow/demoNodeBody.mjs +91 -0
- package/dist/jsx/react-flow/demoNodeBody.mjs.map +1 -0
- package/dist/jsx/react-flow/demoNodeBody.native.js +131 -0
- package/dist/jsx/react-flow/demoNodeBody.native.js.map +1 -0
- package/dist/jsx/react-flow/fixtures.mjs +185 -0
- package/dist/jsx/react-flow/fixtures.mjs.map +1 -0
- package/dist/jsx/react-flow/fixtures.native.js +225 -0
- package/dist/jsx/react-flow/fixtures.native.js.map +1 -0
- package/dist/jsx/react-flow/flowAdapter.mjs +94 -0
- package/dist/jsx/react-flow/flowAdapter.mjs.map +1 -0
- package/dist/jsx/react-flow/flowAdapter.native.js +133 -0
- package/dist/jsx/react-flow/flowAdapter.native.js.map +1 -0
- package/dist/jsx/react-flow/graphHandle.mjs +3 -0
- package/dist/jsx/react-flow/graphHandle.mjs.map +1 -0
- package/dist/jsx/react-flow/graphHandle.native.js +31 -0
- package/dist/jsx/react-flow/graphHandle.native.js.map +1 -0
- package/dist/jsx/react-flow/nodeCensus.mjs +28 -0
- package/dist/jsx/react-flow/nodeCensus.mjs.map +1 -0
- package/dist/jsx/react-flow/nodeCensus.native.js +80 -0
- package/dist/jsx/react-flow/nodeCensus.native.js.map +1 -0
- package/dist/jsx/react-flow/useGraphController.mjs +269 -0
- package/dist/jsx/react-flow/useGraphController.mjs.map +1 -0
- package/dist/jsx/react-flow/useGraphController.native.js +393 -0
- package/dist/jsx/react-flow/useGraphController.native.js.map +1 -0
- package/dist/jsx/react-flow/xy.mjs +8 -0
- package/dist/jsx/react-flow/xy.mjs.map +1 -0
- package/dist/jsx/react-flow/xy.native.js +63 -0
- package/dist/jsx/react-flow/xy.native.js.map +1 -0
- package/dist/jsx/theme/GraphFaces.mjs +88 -0
- package/dist/jsx/theme/GraphFaces.mjs.map +1 -0
- package/dist/jsx/theme/GraphFaces.native.js +181 -0
- package/dist/jsx/theme/GraphFaces.native.js.map +1 -0
- package/dist/jsx/theme/GraphVarsStyle.mjs +59 -0
- package/dist/jsx/theme/GraphVarsStyle.mjs.map +1 -0
- package/dist/jsx/theme/GraphVarsStyle.native.js +100 -0
- package/dist/jsx/theme/GraphVarsStyle.native.js.map +1 -0
- package/dist/jsx/theme/faces.generated.mjs +23 -0
- package/dist/jsx/theme/faces.generated.mjs.map +1 -0
- package/dist/jsx/theme/faces.generated.native.js +51 -0
- package/dist/jsx/theme/faces.generated.native.js.map +1 -0
- package/dist/jsx/theme/faces.mjs +89 -0
- package/dist/jsx/theme/faces.mjs.map +1 -0
- package/dist/jsx/theme/faces.native.js +133 -0
- package/dist/jsx/theme/faces.native.js.map +1 -0
- package/dist/jsx/theme/graphVars.mjs +284 -0
- package/dist/jsx/theme/graphVars.mjs.map +1 -0
- package/dist/jsx/theme/graphVars.native.js +351 -0
- package/dist/jsx/theme/graphVars.native.js.map +1 -0
- package/dom-inner.ts +21 -0
- package/metro/index.js +174 -0
- package/metro/index.spec.mjs +235 -0
- package/model.ts +9 -0
- package/package.json +137 -0
- package/src/NodeGraph.native.spec.ts +164 -0
- package/src/NodeGraph.native.tsx +278 -0
- package/src/NodeGraph.tsx +27 -0
- package/src/bench/Perf200.stories.tsx +351 -0
- package/src/bench/frameSampler.spec.ts +467 -0
- package/src/bench/frameSampler.ts +516 -0
- package/src/bench/generateGraph.ts +138 -0
- package/src/diagnostics/GraphDiagnostics.spec.tsx +206 -0
- package/src/diagnostics/GraphDiagnostics.stories.tsx +194 -0
- package/src/diagnostics/GraphDiagnostics.tsx +140 -0
- package/src/diagnostics/LiveGraphDiagnostics.native.tsx +61 -0
- package/src/diagnostics/LiveGraphDiagnostics.tsx +121 -0
- package/src/diagnostics/deliberateBreak.ts +35 -0
- package/src/diagnostics/fromWire.spec.ts +74 -0
- package/src/diagnostics/fromWire.ts +48 -0
- package/src/diagnostics/lastError.ts +91 -0
- package/src/diagnostics/types.ts +103 -0
- package/src/diagnostics/useGraphDiagnostics.spec.tsx +199 -0
- package/src/diagnostics/useGraphDiagnostics.ts +85 -0
- package/src/dom/GraphDomLayout.spec.tsx +56 -0
- package/src/dom/GraphDomLayout.tsx +49 -0
- package/src/dom/NodeGraphDom.ts +43 -0
- package/src/dom/NodeGraphDomInner.tsx +524 -0
- package/src/dom/NodeGraphDomShell.ts +402 -0
- package/src/dom/boot.spec.ts +90 -0
- package/src/dom/boot.ts +153 -0
- package/src/dom/domEntry.spec.ts +481 -0
- package/src/dom/importGraph.spec.ts +287 -0
- package/src/dom/schemaRegistry.spec.tsx +182 -0
- package/src/dom/wire.spec.ts +486 -0
- package/src/dom/wire.ts +493 -0
- package/src/edges/Edges.stories.tsx +271 -0
- package/src/edges/GraphEdge.tsx +198 -0
- package/src/edges/edgeKinds.ts +51 -0
- package/src/edges/edgeStyle.spec.ts +295 -0
- package/src/edges/edgeStyle.ts +124 -0
- package/src/index.native.ts +147 -0
- package/src/index.ts +243 -0
- package/src/interaction/Lasso.stories.tsx +198 -0
- package/src/interaction/Snapping.stories.tsx +189 -0
- package/src/interaction/lassoIntercept.spec.ts +166 -0
- package/src/interaction/lassoIntercept.ts +81 -0
- package/src/interaction/legalTargets.spec.ts +304 -0
- package/src/interaction/legalTargets.ts +91 -0
- package/src/interaction/snapAlignment.spec.ts +412 -0
- package/src/interaction/snapAlignment.ts +209 -0
- package/src/interaction/snapChanges.spec.ts +273 -0
- package/src/interaction/snapChanges.ts +292 -0
- package/src/interaction/spatialHash.spec.ts +168 -0
- package/src/interaction/spatialHash.ts +128 -0
- package/src/interaction/useLassoSelect.spec.tsx +487 -0
- package/src/interaction/useLassoSelect.ts +489 -0
- package/src/knobs/KnobEnvelopeProvider.tsx +110 -0
- package/src/knobs/envelope.spec.tsx +371 -0
- package/src/knobs/envelope.ts +130 -0
- package/src/knobs/envelopeTheme.spec.ts +58 -0
- package/src/knobs/graphKnobs.ts +36 -0
- package/src/knobs/useKnobEnvelope.ts +152 -0
- package/src/layout/AutoLayout.stories.tsx +338 -0
- package/src/layout/dagre.ts +149 -0
- package/src/layout/layout.spec.ts +244 -0
- package/src/layout/layout.ts +121 -0
- package/src/layout/runner.spec.ts +365 -0
- package/src/layout/runner.ts +256 -0
- package/src/layout/structuredCloneShim.spec.ts +103 -0
- package/src/layout/structuredCloneShim.ts +106 -0
- package/src/layout/types.ts +112 -0
- package/src/layout/worker.entry.ts +74 -0
- package/src/layout/worker.generated.spec.ts +157 -0
- package/src/layout/worker.generated.ts +32 -0
- package/src/model/commands.spec.ts +214 -0
- package/src/model/commands.ts +209 -0
- package/src/model/connect.spec.ts +444 -0
- package/src/model/connect.ts +281 -0
- package/src/model/document.ts +121 -0
- package/src/model/history.spec.ts +278 -0
- package/src/model/history.ts +153 -0
- package/src/model/index.ts +74 -0
- package/src/model/schema.ts +177 -0
- package/src/model/select.spec.ts +220 -0
- package/src/model/select.ts +88 -0
- package/src/model/serialize.spec.ts +393 -0
- package/src/model/serialize.ts +395 -0
- package/src/native/DomOnlyStory.tsx +72 -0
- package/src/native/GraphFallback.native.tsx +123 -0
- package/src/native/GraphToolbar.tsx +171 -0
- package/src/native/NodeGraph.native.tsx +505 -0
- package/src/native/domEntryRegistry.spec.ts +66 -0
- package/src/native/domEntryRegistry.ts +45 -0
- package/src/native/graphChildren.spec.ts +67 -0
- package/src/native/graphChildren.ts +62 -0
- package/src/native/graphFallback.spec.ts +49 -0
- package/src/native/graphHandleRemount.spec.tsx +189 -0
- package/src/nodes/GraphNode.spec.tsx +270 -0
- package/src/nodes/GraphNode.stories.tsx +451 -0
- package/src/nodes/GraphNode.tsx +240 -0
- package/src/nodes/GraphPort.spec.tsx +442 -0
- package/src/nodes/GraphPort.stories.tsx +407 -0
- package/src/nodes/GraphPort.tsx +117 -0
- package/src/nodes/Overview.stories.tsx +237 -0
- package/src/nodes/handleGeometry.spec.ts +161 -0
- package/src/nodes/handleGeometry.ts +232 -0
- package/src/nodes/lod.spec.tsx +300 -0
- package/src/nodes/lod.ts +69 -0
- package/src/nodes/nodeMeasure.spec.ts +245 -0
- package/src/nodes/nodeMeasure.ts +216 -0
- package/src/nodes/overviewNode.tsx +71 -0
- package/src/packageShape.spec.ts +145 -0
- package/src/react-flow/ConnectionPuck.spec.tsx +242 -0
- package/src/react-flow/ConnectionPuck.tsx +175 -0
- package/src/react-flow/GraphActions.tsx +64 -0
- package/src/react-flow/GraphCommandBridge.spec.tsx +130 -0
- package/src/react-flow/GraphCommandBridge.tsx +288 -0
- package/src/react-flow/GraphNodeHost.tsx +101 -0
- package/src/react-flow/GraphPaintProbe.spec.tsx +116 -0
- package/src/react-flow/GraphPaintProbe.tsx +65 -0
- package/src/react-flow/GraphZoomVar.tsx +48 -0
- package/src/react-flow/LassoOverlay.tsx +59 -0
- package/src/react-flow/NodeGraphWeb.spec.tsx +441 -0
- package/src/react-flow/NodeGraphWeb.stories.tsx +260 -0
- package/src/react-flow/NodeGraphWeb.tsx +645 -0
- package/src/react-flow/SnapGuides.spec.tsx +161 -0
- package/src/react-flow/SnapGuides.tsx +113 -0
- package/src/react-flow/demoControlBody.tsx +96 -0
- package/src/react-flow/demoNodeBody.tsx +121 -0
- package/src/react-flow/fixtures.ts +185 -0
- package/src/react-flow/flowAdapter.ts +170 -0
- package/src/react-flow/graphHandle.ts +112 -0
- package/src/react-flow/nodeCensus.spec.ts +66 -0
- package/src/react-flow/nodeCensus.ts +69 -0
- package/src/react-flow/useGraphController.spec.tsx +849 -0
- package/src/react-flow/useGraphController.ts +473 -0
- package/src/react-flow/xy.spec.ts +182 -0
- package/src/react-flow/xy.ts +131 -0
- package/src/theme/GraphFaces.spec.tsx +101 -0
- package/src/theme/GraphFaces.tsx +218 -0
- package/src/theme/GraphVarsStyle.tsx +113 -0
- package/src/theme/faces.generated.ts +53 -0
- package/src/theme/faces.spec.ts +228 -0
- package/src/theme/faces.ts +275 -0
- package/src/theme/graphCss.spec.ts +111 -0
- package/src/theme/graphVars.spec.ts +322 -0
- package/src/theme/graphVars.ts +441 -0
- package/types/NodeGraph.d.ts +17 -0
- package/types/NodeGraph.d.ts.map +1 -0
- package/types/NodeGraph.native.d.ts +142 -0
- package/types/NodeGraph.native.d.ts.map +1 -0
- package/types/bench/frameSampler.d.ts +235 -0
- package/types/bench/frameSampler.d.ts.map +1 -0
- package/types/bench/generateGraph.d.ts +43 -0
- package/types/bench/generateGraph.d.ts.map +1 -0
- package/types/diagnostics/GraphDiagnostics.d.ts +30 -0
- package/types/diagnostics/GraphDiagnostics.d.ts.map +1 -0
- package/types/diagnostics/LiveGraphDiagnostics.d.ts +27 -0
- package/types/diagnostics/LiveGraphDiagnostics.d.ts.map +1 -0
- package/types/diagnostics/LiveGraphDiagnostics.native.d.ts +25 -0
- package/types/diagnostics/LiveGraphDiagnostics.native.d.ts.map +1 -0
- package/types/diagnostics/deliberateBreak.d.ts +28 -0
- package/types/diagnostics/deliberateBreak.d.ts.map +1 -0
- package/types/diagnostics/fromWire.d.ts +17 -0
- package/types/diagnostics/fromWire.d.ts.map +1 -0
- package/types/diagnostics/lastError.d.ts +50 -0
- package/types/diagnostics/lastError.d.ts.map +1 -0
- package/types/diagnostics/types.d.ts +101 -0
- package/types/diagnostics/types.d.ts.map +1 -0
- package/types/diagnostics/useGraphDiagnostics.d.ts +23 -0
- package/types/diagnostics/useGraphDiagnostics.d.ts.map +1 -0
- package/types/dom/GraphDomLayout.d.ts +40 -0
- package/types/dom/GraphDomLayout.d.ts.map +1 -0
- package/types/dom/NodeGraphDom.d.ts +4 -0
- package/types/dom/NodeGraphDom.d.ts.map +1 -0
- package/types/dom/NodeGraphDomInner.d.ts +26 -0
- package/types/dom/NodeGraphDomInner.d.ts.map +1 -0
- package/types/dom/NodeGraphDomShell.d.ts +221 -0
- package/types/dom/NodeGraphDomShell.d.ts.map +1 -0
- package/types/dom/boot.d.ts +90 -0
- package/types/dom/boot.d.ts.map +1 -0
- package/types/dom/wire.d.ts +355 -0
- package/types/dom/wire.d.ts.map +1 -0
- package/types/edges/GraphEdge.d.ts +59 -0
- package/types/edges/GraphEdge.d.ts.map +1 -0
- package/types/edges/edgeKinds.d.ts +43 -0
- package/types/edges/edgeKinds.d.ts.map +1 -0
- package/types/edges/edgeStyle.d.ts +79 -0
- package/types/edges/edgeStyle.d.ts.map +1 -0
- package/types/index.d.ts +123 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.native.d.ts +86 -0
- package/types/index.native.d.ts.map +1 -0
- package/types/interaction/lassoIntercept.d.ts +58 -0
- package/types/interaction/lassoIntercept.d.ts.map +1 -0
- package/types/interaction/legalTargets.d.ts +59 -0
- package/types/interaction/legalTargets.d.ts.map +1 -0
- package/types/interaction/snapAlignment.d.ts +85 -0
- package/types/interaction/snapAlignment.d.ts.map +1 -0
- package/types/interaction/snapChanges.d.ts +133 -0
- package/types/interaction/snapChanges.d.ts.map +1 -0
- package/types/interaction/spatialHash.d.ts +37 -0
- package/types/interaction/spatialHash.d.ts.map +1 -0
- package/types/interaction/useLassoSelect.d.ts +151 -0
- package/types/interaction/useLassoSelect.d.ts.map +1 -0
- package/types/knobs/KnobEnvelopeProvider.d.ts +45 -0
- package/types/knobs/KnobEnvelopeProvider.d.ts.map +1 -0
- package/types/knobs/envelope.d.ts +99 -0
- package/types/knobs/envelope.d.ts.map +1 -0
- package/types/knobs/graphKnobs.d.ts +26 -0
- package/types/knobs/graphKnobs.d.ts.map +1 -0
- package/types/knobs/useKnobEnvelope.d.ts +43 -0
- package/types/knobs/useKnobEnvelope.d.ts.map +1 -0
- package/types/layout/dagre.d.ts +39 -0
- package/types/layout/dagre.d.ts.map +1 -0
- package/types/layout/layout.d.ts +58 -0
- package/types/layout/layout.d.ts.map +1 -0
- package/types/layout/runner.d.ts +60 -0
- package/types/layout/runner.d.ts.map +1 -0
- package/types/layout/structuredCloneShim.d.ts +44 -0
- package/types/layout/structuredCloneShim.d.ts.map +1 -0
- package/types/layout/types.d.ts +113 -0
- package/types/layout/types.d.ts.map +1 -0
- package/types/layout/worker.entry.d.ts +34 -0
- package/types/layout/worker.entry.d.ts.map +1 -0
- package/types/layout/worker.generated.d.ts +26 -0
- package/types/layout/worker.generated.d.ts.map +1 -0
- package/types/model/commands.d.ts +49 -0
- package/types/model/commands.d.ts.map +1 -0
- package/types/model/connect.d.ts +83 -0
- package/types/model/connect.d.ts.map +1 -0
- package/types/model/document.d.ts +111 -0
- package/types/model/document.d.ts.map +1 -0
- package/types/model/history.d.ts +40 -0
- package/types/model/history.d.ts.map +1 -0
- package/types/model/index.d.ts +20 -0
- package/types/model/index.d.ts.map +1 -0
- package/types/model/schema.d.ts +136 -0
- package/types/model/schema.d.ts.map +1 -0
- package/types/model/select.d.ts +41 -0
- package/types/model/select.d.ts.map +1 -0
- package/types/model/serialize.d.ts +33 -0
- package/types/model/serialize.d.ts.map +1 -0
- package/types/native/DomOnlyStory.d.ts +49 -0
- package/types/native/DomOnlyStory.d.ts.map +1 -0
- package/types/native/GraphFallback.native.d.ts +41 -0
- package/types/native/GraphFallback.native.d.ts.map +1 -0
- package/types/native/GraphToolbar.d.ts +75 -0
- package/types/native/GraphToolbar.d.ts.map +1 -0
- package/types/native/NodeGraph.native.d.ts +128 -0
- package/types/native/NodeGraph.native.d.ts.map +1 -0
- package/types/native/domEntryRegistry.d.ts +33 -0
- package/types/native/domEntryRegistry.d.ts.map +1 -0
- package/types/native/graphChildren.d.ts +36 -0
- package/types/native/graphChildren.d.ts.map +1 -0
- package/types/nodes/GraphNode.d.ts +48 -0
- package/types/nodes/GraphNode.d.ts.map +1 -0
- package/types/nodes/GraphPort.d.ts +41 -0
- package/types/nodes/GraphPort.d.ts.map +1 -0
- package/types/nodes/handleGeometry.d.ts +183 -0
- package/types/nodes/handleGeometry.d.ts.map +1 -0
- package/types/nodes/lod.d.ts +55 -0
- package/types/nodes/lod.d.ts.map +1 -0
- package/types/nodes/nodeMeasure.d.ts +146 -0
- package/types/nodes/nodeMeasure.d.ts.map +1 -0
- package/types/nodes/overviewNode.d.ts +34 -0
- package/types/nodes/overviewNode.d.ts.map +1 -0
- package/types/react-flow/ConnectionPuck.d.ts +62 -0
- package/types/react-flow/ConnectionPuck.d.ts.map +1 -0
- package/types/react-flow/GraphActions.d.ts +45 -0
- package/types/react-flow/GraphActions.d.ts.map +1 -0
- package/types/react-flow/GraphCommandBridge.d.ts +45 -0
- package/types/react-flow/GraphCommandBridge.d.ts.map +1 -0
- package/types/react-flow/GraphNodeHost.d.ts +32 -0
- package/types/react-flow/GraphNodeHost.d.ts.map +1 -0
- package/types/react-flow/GraphPaintProbe.d.ts +26 -0
- package/types/react-flow/GraphPaintProbe.d.ts.map +1 -0
- package/types/react-flow/GraphZoomVar.d.ts +31 -0
- package/types/react-flow/GraphZoomVar.d.ts.map +1 -0
- package/types/react-flow/LassoOverlay.d.ts +39 -0
- package/types/react-flow/LassoOverlay.d.ts.map +1 -0
- package/types/react-flow/NodeGraphWeb.d.ts +195 -0
- package/types/react-flow/NodeGraphWeb.d.ts.map +1 -0
- package/types/react-flow/SnapGuides.d.ts +49 -0
- package/types/react-flow/SnapGuides.d.ts.map +1 -0
- package/types/react-flow/demoControlBody.d.ts +47 -0
- package/types/react-flow/demoControlBody.d.ts.map +1 -0
- package/types/react-flow/demoNodeBody.d.ts +37 -0
- package/types/react-flow/demoNodeBody.d.ts.map +1 -0
- package/types/react-flow/fixtures.d.ts +107 -0
- package/types/react-flow/fixtures.d.ts.map +1 -0
- package/types/react-flow/flowAdapter.d.ts +56 -0
- package/types/react-flow/flowAdapter.d.ts.map +1 -0
- package/types/react-flow/graphHandle.d.ts +90 -0
- package/types/react-flow/graphHandle.d.ts.map +1 -0
- package/types/react-flow/nodeCensus.d.ts +42 -0
- package/types/react-flow/nodeCensus.d.ts.map +1 -0
- package/types/react-flow/useGraphController.d.ts +93 -0
- package/types/react-flow/useGraphController.d.ts.map +1 -0
- package/types/react-flow/xy.d.ts +84 -0
- package/types/react-flow/xy.d.ts.map +1 -0
- package/types/theme/GraphFaces.d.ts +82 -0
- package/types/theme/GraphFaces.d.ts.map +1 -0
- package/types/theme/GraphVarsStyle.d.ts +56 -0
- package/types/theme/GraphVarsStyle.d.ts.map +1 -0
- package/types/theme/faces.d.ts +152 -0
- package/types/theme/faces.d.ts.map +1 -0
- package/types/theme/faces.generated.d.ts +27 -0
- package/types/theme/faces.generated.d.ts.map +1 -0
- package/types/theme/graphVars.d.ts +155 -0
- package/types/theme/graphVars.d.ts.map +1 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web barrel.
|
|
3
|
+
*
|
|
4
|
+
* The model half is NOT re-exported here. It has its own condition
|
|
5
|
+
* (`@multiplatform.one/node-graph/model`) so a server, a CLI, a Frappe hook or
|
|
6
|
+
* the CI bench can import it without React or `@xyflow` — re-exporting it from
|
|
7
|
+
* this file would defeat that by making one import pull the whole editor.
|
|
8
|
+
*
|
|
9
|
+
* `css/graph.css` is imported by `NodeGraphWeb`, so a consumer of `NodeGraph`
|
|
10
|
+
* gets it automatically. A consumer who mounts `ReactFlow` themselves imports
|
|
11
|
+
* `@multiplatform.one/node-graph/css/graph.css`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export { NodeGraph } from "./NodeGraph";
|
|
15
|
+
export type { NodeGraphProps } from "./NodeGraph";
|
|
16
|
+
export { graphCanvasDefaults, NodeGraphWeb } from "./react-flow/NodeGraphWeb";
|
|
17
|
+
export type { NodeGraphWebProps } from "./react-flow/NodeGraphWeb";
|
|
18
|
+
export { defaultGraphNodeType, useGraphController } from "./react-flow/useGraphController";
|
|
19
|
+
export type {
|
|
20
|
+
GraphController,
|
|
21
|
+
GraphRelayoutOptions,
|
|
22
|
+
UseGraphControllerOptions,
|
|
23
|
+
} from "./react-flow/useGraphController";
|
|
24
|
+
export { GraphActionsProvider, useGraphActions } from "./react-flow/GraphActions";
|
|
25
|
+
/**
|
|
26
|
+
* The imperative handle (design §9.1), on the WEB barrel as well as the native
|
|
27
|
+
* one. Milestone 6: a control is either a sibling on this handle or a
|
|
28
|
+
* serializable option, and a web story that could not rehearse the native shape
|
|
29
|
+
* would be a story that proves nothing about the phone.
|
|
30
|
+
*/
|
|
31
|
+
export { graphCommandNames } from "./react-flow/graphHandle";
|
|
32
|
+
export type { GraphCommands, GraphCommandSlot, NodeGraphHandle } from "./react-flow/graphHandle";
|
|
33
|
+
export { GraphCommandBridge } from "./react-flow/GraphCommandBridge";
|
|
34
|
+
export type { GraphCommandBridgeProps } from "./react-flow/GraphCommandBridge";
|
|
35
|
+
export { GraphPaintProbe } from "./react-flow/GraphPaintProbe";
|
|
36
|
+
export { GraphZoomVar, graphZoomVarName } from "./react-flow/GraphZoomVar";
|
|
37
|
+
export { DomOnlyStory, domOnlyStoryDecorator, hasDomRealm } from "./native/DomOnlyStory";
|
|
38
|
+
export type { DomOnlyStoryProps } from "./native/DomOnlyStory";
|
|
39
|
+
/**
|
|
40
|
+
* The event union, on the WEB barrel too. `NodeGraphWeb.onGraphEvent` hands it
|
|
41
|
+
* out, so a web consumer needs the type to declare its handler — the same union
|
|
42
|
+
* that crosses the bridge as JSON on native, which is what lets one story file
|
|
43
|
+
* read a runner on both.
|
|
44
|
+
*/
|
|
45
|
+
export type { GraphEventWire, LassoPhaseWire, PerfReportWire } from "./dom/wire";
|
|
46
|
+
export type { GraphActions } from "./react-flow/GraphActions";
|
|
47
|
+
export type { GraphFlowNodeData } from "./react-flow/flowAdapter";
|
|
48
|
+
export { toFlowEdges, toFlowNodes } from "./react-flow/flowAdapter";
|
|
49
|
+
export { GraphNodeHost, useGraphHost } from "./react-flow/GraphNodeHost";
|
|
50
|
+
export { ConnectionPuck, connectionPuckLabel } from "./react-flow/ConnectionPuck";
|
|
51
|
+
export type { ConnectionPuckLabel, ConnectionPuckProps } from "./react-flow/ConnectionPuck";
|
|
52
|
+
export { filterLegalCandidates, isLegalTarget, legalTargets } from "./interaction/legalTargets";
|
|
53
|
+
export type { LegalTargetQuery } from "./interaction/legalTargets";
|
|
54
|
+
export {
|
|
55
|
+
mountedNodeCount,
|
|
56
|
+
registerMountedNode,
|
|
57
|
+
resetNodeCensus,
|
|
58
|
+
subscribeNodeCensus,
|
|
59
|
+
} from "./react-flow/nodeCensus";
|
|
60
|
+
export { demoControlSchemaId, demoGraphSchemaId } from "./react-flow/fixtures";
|
|
61
|
+
export type { GraphHostValue } from "./react-flow/GraphNodeHost";
|
|
62
|
+
|
|
63
|
+
export { GraphEdge, graphEdgeType, graphEdgeTypes } from "./edges/GraphEdge";
|
|
64
|
+
export type { GraphEdgeData } from "./edges/GraphEdge";
|
|
65
|
+
export { builtinEdgeKindNames, builtinEdgeKinds } from "./edges/edgeKinds";
|
|
66
|
+
export type { BuiltinEdgeData, BuiltinEdgeKind } from "./edges/edgeKinds";
|
|
67
|
+
export {
|
|
68
|
+
dashAnimation,
|
|
69
|
+
edgeAppearances,
|
|
70
|
+
edgeMarkerEnd,
|
|
71
|
+
edgeStrokeWidth,
|
|
72
|
+
edgeStrokeWidths,
|
|
73
|
+
resolveEdgeStyle,
|
|
74
|
+
} from "./edges/edgeStyle";
|
|
75
|
+
export type { EdgeAppearance, EdgeMarker, EdgePathKind, EdgeStyle } from "./edges/edgeStyle";
|
|
76
|
+
|
|
77
|
+
export { GraphBootFailure, GraphDiagnostics } from "./diagnostics/GraphDiagnostics";
|
|
78
|
+
export { graphDiagnosticsFromWire } from "./diagnostics/fromWire";
|
|
79
|
+
export type { GraphDiagnosticsProps } from "./diagnostics/GraphDiagnostics";
|
|
80
|
+
export { useGraphDiagnostics } from "./diagnostics/useGraphDiagnostics";
|
|
81
|
+
export {
|
|
82
|
+
graphErrorGlobalKey,
|
|
83
|
+
readGraphError,
|
|
84
|
+
recordGraphError,
|
|
85
|
+
resetGraphError,
|
|
86
|
+
} from "./diagnostics/lastError";
|
|
87
|
+
export type { GraphErrorRecord } from "./diagnostics/lastError";
|
|
88
|
+
export type {
|
|
89
|
+
GraphDiagnostics as GraphDiagnosticsRecord,
|
|
90
|
+
GraphDiagnosticsInput,
|
|
91
|
+
GraphFaceDelivery,
|
|
92
|
+
GraphRenderer,
|
|
93
|
+
LayoutRunnerKind,
|
|
94
|
+
} from "./diagnostics/types";
|
|
95
|
+
|
|
96
|
+
export { GraphFaces, useGraphFaces } from "./theme/GraphFaces";
|
|
97
|
+
export type { GraphFacesProps, GraphFaceSource, GraphFaceStatus } from "./theme/GraphFaces";
|
|
98
|
+
export {
|
|
99
|
+
corruptFirstFamily,
|
|
100
|
+
faceBytes,
|
|
101
|
+
graphFaceCeilingBytes,
|
|
102
|
+
graphFaceCss,
|
|
103
|
+
graphFaces,
|
|
104
|
+
probeFamily,
|
|
105
|
+
probeRenderedFamily,
|
|
106
|
+
splitFontStack,
|
|
107
|
+
} from "./theme/faces";
|
|
108
|
+
export type {
|
|
109
|
+
FaceProbe,
|
|
110
|
+
GraphFaceAsset,
|
|
111
|
+
GraphFaceCategory,
|
|
112
|
+
GraphFaceDeclaration,
|
|
113
|
+
} from "./theme/faces";
|
|
114
|
+
export { generatedGraphFaces } from "./theme/faces.generated";
|
|
115
|
+
|
|
116
|
+
export { KnobEnvelopeProvider } from "./knobs/KnobEnvelopeProvider";
|
|
117
|
+
export { resolveEnvelopeThemeName } from "./knobs/KnobEnvelopeProvider";
|
|
118
|
+
export type { KnobEnvelopeProviderProps } from "./knobs/KnobEnvelopeProvider";
|
|
119
|
+
export {
|
|
120
|
+
knobEnvelopeIdentity,
|
|
121
|
+
knobEnvelopeSchemaVersion,
|
|
122
|
+
knobsForEnvelope,
|
|
123
|
+
} from "./knobs/envelope";
|
|
124
|
+
export type { GraphFontRef, KnobEnvelope } from "./knobs/envelope";
|
|
125
|
+
export { useKnobEnvelope } from "./knobs/useKnobEnvelope";
|
|
126
|
+
export type { UseKnobEnvelopeOptions } from "./knobs/useKnobEnvelope";
|
|
127
|
+
export { useGraphNodeKnobs } from "./knobs/graphKnobs";
|
|
128
|
+
export type { GraphNodeKnobs, UseGraphNodeKnobsOptions } from "./knobs/graphKnobs";
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
lassoFlowProps,
|
|
132
|
+
lassoHoldMs,
|
|
133
|
+
lassoSlopPx,
|
|
134
|
+
useLassoSelect,
|
|
135
|
+
} from "./interaction/useLassoSelect";
|
|
136
|
+
export type {
|
|
137
|
+
GraphInteractionMode,
|
|
138
|
+
LassoFlowProps,
|
|
139
|
+
LassoLongPressOptions,
|
|
140
|
+
LassoSelect,
|
|
141
|
+
LassoViewportPort,
|
|
142
|
+
UseLassoSelectOptions,
|
|
143
|
+
} from "./interaction/useLassoSelect";
|
|
144
|
+
export { installLassoIntercept } from "./interaction/lassoIntercept";
|
|
145
|
+
export type { LassoIntercept, LassoInterceptOptions } from "./interaction/lassoIntercept";
|
|
146
|
+
export { LassoOverlay } from "./react-flow/LassoOverlay";
|
|
147
|
+
export type { LassoOverlayProps } from "./react-flow/LassoOverlay";
|
|
148
|
+
export { GraphToolbar } from "./native/GraphToolbar";
|
|
149
|
+
export type { GraphToolbarProps } from "./native/GraphToolbar";
|
|
150
|
+
|
|
151
|
+
export { GraphNode } from "./nodes/GraphNode";
|
|
152
|
+
export type { GraphNodeProps } from "./nodes/GraphNode";
|
|
153
|
+
export { GraphPort } from "./nodes/GraphPort";
|
|
154
|
+
export { defaultOverviewZoom, detailOpacity, isOverview, lodForZoom } from "./nodes/lod";
|
|
155
|
+
export type { GraphRenderMode } from "./nodes/lod";
|
|
156
|
+
export { OverviewNode } from "./nodes/overviewNode";
|
|
157
|
+
export type { OverviewNodeProps } from "./nodes/overviewNode";
|
|
158
|
+
export type { GraphPortProps } from "./nodes/GraphPort";
|
|
159
|
+
export {
|
|
160
|
+
FINE_PORT_HIT_MIN,
|
|
161
|
+
paintedPortSize,
|
|
162
|
+
paintedPortSizePx,
|
|
163
|
+
portConnectionRadius,
|
|
164
|
+
portGeometry,
|
|
165
|
+
portHitSize,
|
|
166
|
+
portRegionInset,
|
|
167
|
+
} from "./nodes/handleGeometry";
|
|
168
|
+
export type { PortGeometry, PortRect } from "./nodes/handleGeometry";
|
|
169
|
+
export {
|
|
170
|
+
containerRadiusPx,
|
|
171
|
+
defaultNodeMeasure,
|
|
172
|
+
FINE_PORT_PITCH,
|
|
173
|
+
graphNodeMeasure,
|
|
174
|
+
graphNodeMinHeight,
|
|
175
|
+
graphNodeRadius,
|
|
176
|
+
graphNodeRadiusPx,
|
|
177
|
+
graphNodeWidth,
|
|
178
|
+
nodePanelPaddingPx,
|
|
179
|
+
nodeRadiusTokenPx,
|
|
180
|
+
portSpacing,
|
|
181
|
+
verticalPortCrowd,
|
|
182
|
+
} from "./nodes/nodeMeasure";
|
|
183
|
+
export type {
|
|
184
|
+
GraphNodeMeasure,
|
|
185
|
+
GraphNodePort,
|
|
186
|
+
GraphNodeRadiusKnob,
|
|
187
|
+
GraphNodeSizeKnob,
|
|
188
|
+
GraphNodeSpaceKnob,
|
|
189
|
+
GraphPortSide,
|
|
190
|
+
} from "./nodes/nodeMeasure";
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
GraphVars,
|
|
194
|
+
graphRootClassName,
|
|
195
|
+
graphVarsSheet,
|
|
196
|
+
useGraphCssVars,
|
|
197
|
+
} from "./theme/GraphVarsStyle";
|
|
198
|
+
export type { GraphVarsProps } from "./theme/GraphVarsStyle";
|
|
199
|
+
export { graphCssVars } from "./theme/graphVars";
|
|
200
|
+
export type { GraphCssVarsOptions, GraphThemeAccess } from "./theme/graphVars";
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The DOM-entry registry, on the WEB barrel too, and that is deliberate.
|
|
204
|
+
*
|
|
205
|
+
* A cross-platform app registers its `'use dom'` entry from one shared module
|
|
206
|
+
* (design §9.3), and a shared module has to resolve on both platforms or the
|
|
207
|
+
* web build fails on a name only the native barrel carries. The registry itself
|
|
208
|
+
* is platform-neutral — a module-level slot and two functions, no React Native
|
|
209
|
+
* import — and on web nothing reads it, because `NodeGraphWeb` mounts React
|
|
210
|
+
* Flow directly and there is no bridge to cross.
|
|
211
|
+
*/
|
|
212
|
+
export {
|
|
213
|
+
clearNodeGraphDomEntry,
|
|
214
|
+
getNodeGraphDomEntry,
|
|
215
|
+
setNodeGraphDomEntry,
|
|
216
|
+
} from "./native/domEntryRegistry";
|
|
217
|
+
export type { NodeGraphDomEntry } from "./native/domEntryRegistry";
|
|
218
|
+
|
|
219
|
+
export { layoutWithDagre, defaultLayoutSpacing } from "./layout/dagre";
|
|
220
|
+
export { buildLayoutRequest, layout, reconcilePositions } from "./layout/layout";
|
|
221
|
+
export type { GraphLayoutOptions } from "./layout/layout";
|
|
222
|
+
export {
|
|
223
|
+
createLayoutRunner,
|
|
224
|
+
defaultProbeTimeoutMs,
|
|
225
|
+
getLayoutRunner,
|
|
226
|
+
readLayoutRunnerFallback,
|
|
227
|
+
resetLayoutRunner,
|
|
228
|
+
resolveRunner,
|
|
229
|
+
} from "./layout/runner";
|
|
230
|
+
export type { LayoutRunner, LayoutRunnerFallback, LayoutRunnerOptions } from "./layout/runner";
|
|
231
|
+
export type {
|
|
232
|
+
LayoutDirection,
|
|
233
|
+
LayoutEdgeInput,
|
|
234
|
+
LayoutEngine,
|
|
235
|
+
LayoutNodeInput,
|
|
236
|
+
LayoutOptions,
|
|
237
|
+
LayoutRequest,
|
|
238
|
+
LayoutResult,
|
|
239
|
+
LayoutWorkerRequest,
|
|
240
|
+
LayoutWorkerResponse,
|
|
241
|
+
} from "./layout/types";
|
|
242
|
+
export { cloneStructured, ensureStructuredClone } from "./layout/structuredCloneShim";
|
|
243
|
+
export { layoutWorkerBytes, layoutWorkerSha256 } from "./layout/worker.generated";
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `NodeGraph/Lasso` — the two ways into a marquee on touch (design §7.3).
|
|
3
|
+
*
|
|
4
|
+
* `ToolbarMode` is the free one and it ships first: the toolbar flips
|
|
5
|
+
* `interactionMode`, the canvas re-renders with `panOnDrag={false}`, and React
|
|
6
|
+
* Flow's own touch guard then lets a finger start a selection instead of a pan.
|
|
7
|
+
* There is no mechanism of ours in that path at all, which is the point.
|
|
8
|
+
*
|
|
9
|
+
* HOW TO SEE IT, and it does need touch emulation — a mouse takes a different
|
|
10
|
+
* branch of the same guard and would show a marquee in either mode, proving
|
|
11
|
+
* nothing:
|
|
12
|
+
*
|
|
13
|
+
* 1. DevTools → device toolbar (⌘⇧M), or `emulate` with a touch-capable
|
|
14
|
+
* device in the chrome-devtools MCP.
|
|
15
|
+
* 2. In `pan` mode, drag across the canvas: the graph pans.
|
|
16
|
+
* 3. Press `Select`, drag the same stroke: a marquee is drawn and the nodes
|
|
17
|
+
* it crosses come back selected. `SelectionMode.Partial`, so crossing is
|
|
18
|
+
* enough — you do not have to enclose them, which on a phone you cannot
|
|
19
|
+
* see well enough to do.
|
|
20
|
+
*
|
|
21
|
+
* WHAT MILESTONE 6 CHANGED, and why `LongPress` exists as a story again.
|
|
22
|
+
*
|
|
23
|
+
* `LongPress` used to call `useLassoSelect` on the HOST side and hand it a
|
|
24
|
+
* `<div ref>` of its own. On device that story did not render at all — `View
|
|
25
|
+
* config getter callback for component "div" must be a function` — and it could
|
|
26
|
+
* not have worked if it had: the pane the interceptor must take `touchmove`
|
|
27
|
+
* away from lives inside the WebView, in a different JS realm, and a host-side
|
|
28
|
+
* ref can never reach it. MPO-212's 3.7 gate was recorded as CANNOT BE
|
|
29
|
+
* ATTEMPTED for exactly that reason.
|
|
30
|
+
*
|
|
31
|
+
* So the gesture moved into the canvas, where the pane is, and the story arms
|
|
32
|
+
* it with a serializable option: `longPressLasso`. `arm`, `select` and `cancel`
|
|
33
|
+
* come back on the wire, which is how the readout below works on both
|
|
34
|
+
* platforms from one file. `interactionMode` now crosses the bridge too — it
|
|
35
|
+
* was a `NodeGraphWeb` prop that was never in the DOM options, so on device the
|
|
36
|
+
* toolbar flipped its own label and `panOnDrag` inside the WebView stayed true.
|
|
37
|
+
*
|
|
38
|
+
* `ToolbarMode` is unchanged in mechanism and is still the shippable half.
|
|
39
|
+
* Whether the long press works under a real WKWebView and a real Android
|
|
40
|
+
* WebView is still the open question design §7.3 named; what changed is that it
|
|
41
|
+
* can now be asked.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
45
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
46
|
+
import { useCallback, useState } from "react";
|
|
47
|
+
import { SizableText, XStack, YStack } from "tamagui";
|
|
48
|
+
import type { GraphEventWire } from "../dom/wire";
|
|
49
|
+
import type { NodeId } from "../model/index";
|
|
50
|
+
import { GraphToolbar } from "../native/GraphToolbar";
|
|
51
|
+
import { hasDomRealm } from "../native/DomOnlyStory";
|
|
52
|
+
import { NodeGraph } from "../NodeGraph";
|
|
53
|
+
import { demoGraphSchema } from "../react-flow/demoNodeBody";
|
|
54
|
+
import { demoDocumentLarge } from "../react-flow/fixtures";
|
|
55
|
+
import { Background, Controls } from "../react-flow/xy";
|
|
56
|
+
import type { GraphInteractionMode } from "./useLassoSelect";
|
|
57
|
+
|
|
58
|
+
const schema = demoGraphSchema();
|
|
59
|
+
|
|
60
|
+
const meta: Meta<typeof NodeGraph> = {
|
|
61
|
+
title: "NodeGraph/Lasso",
|
|
62
|
+
component: NodeGraph,
|
|
63
|
+
parameters: {
|
|
64
|
+
status: { type: "beta" },
|
|
65
|
+
layout: "fullscreen",
|
|
66
|
+
docs: {
|
|
67
|
+
description: {
|
|
68
|
+
component:
|
|
69
|
+
"Marquee selection on touch. Toolbar mode is upstream's own path: panOnDrag={false} is the only value that opens React Flow's touch guard at Pane/index.tsx:146, so the mode toggle is the whole mechanism. The long press is ours, and since milestone 6 it runs INSIDE the canvas's realm — the pane it intercepts exists only there, which is why the previous host-side version could not mount on native at all. Needs DevTools touch emulation to tell apart from a mouse drag, which passes a different arm of the same guard.",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export default meta;
|
|
75
|
+
|
|
76
|
+
type Story = StoryObj<typeof NodeGraph>;
|
|
77
|
+
|
|
78
|
+
/** React Flow's own chrome. A legitimate child on web, nothing on native. */
|
|
79
|
+
function Chrome() {
|
|
80
|
+
if (!hasDomRealm) return null;
|
|
81
|
+
return (
|
|
82
|
+
<>
|
|
83
|
+
<Background />
|
|
84
|
+
<Controls />
|
|
85
|
+
</>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function ToolbarModeStory() {
|
|
90
|
+
const [mode, setMode] = useState<GraphInteractionMode>("pan");
|
|
91
|
+
const [selected, setSelected] = useState<readonly NodeId[]>([]);
|
|
92
|
+
|
|
93
|
+
const onGraphEvent = useCallback((event: GraphEventWire) => {
|
|
94
|
+
if (event.t === "selection") setSelected(event.ids);
|
|
95
|
+
}, []);
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<YStack width="100%" height={560} padding="$3" gap="$3">
|
|
99
|
+
<XStack alignItems="center" gap="$3" flexWrap="wrap">
|
|
100
|
+
<GraphToolbar mode={mode} onModeChange={setMode} />
|
|
101
|
+
<SizableText fontFamily="$mono" size="$2">
|
|
102
|
+
{`mode: ${mode} · panOnDrag: ${String(mode !== "select")} · selected: ${
|
|
103
|
+
selected.length ? selected.join(", ") : "none"
|
|
104
|
+
}`}
|
|
105
|
+
</SizableText>
|
|
106
|
+
</XStack>
|
|
107
|
+
<YStack flex={1}>
|
|
108
|
+
<NodeGraph
|
|
109
|
+
schema={schema}
|
|
110
|
+
defaultDocument={demoDocumentLarge(12)}
|
|
111
|
+
interactionMode={mode}
|
|
112
|
+
coarsePointer
|
|
113
|
+
onGraphEvent={onGraphEvent}
|
|
114
|
+
>
|
|
115
|
+
<Chrome />
|
|
116
|
+
</NodeGraph>
|
|
117
|
+
</YStack>
|
|
118
|
+
</YStack>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const ToolbarMode: Story = {
|
|
123
|
+
// Cascades on purpose — see the note on `NodeGraph/Overview → Main`. A
|
|
124
|
+
// `cascade={false}` with no `overrides` would discard every Storybook global
|
|
125
|
+
// and make this page look like a component that ignores its knobs.
|
|
126
|
+
render: () => (
|
|
127
|
+
<Preset>
|
|
128
|
+
<ToolbarModeStory />
|
|
129
|
+
</Preset>
|
|
130
|
+
),
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
function LongPressStory() {
|
|
134
|
+
const [mode, setMode] = useState<GraphInteractionMode>("pan");
|
|
135
|
+
const [selected, setSelected] = useState<readonly NodeId[]>([]);
|
|
136
|
+
const [armed, setArmed] = useState(false);
|
|
137
|
+
const [arms, setArms] = useState(0);
|
|
138
|
+
const [cancels, setCancels] = useState(0);
|
|
139
|
+
const [haptics, setHaptics] = useState(0);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The whole readout, off ONE channel. It is the same union on web and across
|
|
143
|
+
* the bridge, which is why this story file is not two story files.
|
|
144
|
+
*/
|
|
145
|
+
const onGraphEvent = useCallback((event: GraphEventWire) => {
|
|
146
|
+
if (event.t !== "lasso") return;
|
|
147
|
+
if (event.haptic) setHaptics((count) => count + 1);
|
|
148
|
+
if (event.phase === "arm") {
|
|
149
|
+
setArmed(true);
|
|
150
|
+
setArms((count) => count + 1);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
setArmed(false);
|
|
154
|
+
if (event.phase === "select") setSelected(event.ids);
|
|
155
|
+
else setCancels((count) => count + 1);
|
|
156
|
+
}, []);
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<YStack width="100%" height={560} padding="$3" gap="$3">
|
|
160
|
+
<XStack alignItems="center" gap="$3" flexWrap="wrap">
|
|
161
|
+
<GraphToolbar mode={mode} onModeChange={setMode} />
|
|
162
|
+
<SizableText fontFamily="$mono" size="$2">
|
|
163
|
+
{`armed: ${String(armed)} · arms: ${arms} · cancels: ${cancels} · haptics: ${haptics}`}
|
|
164
|
+
</SizableText>
|
|
165
|
+
</XStack>
|
|
166
|
+
<SizableText fontFamily="$mono" size="$2" opacity={0.75}>
|
|
167
|
+
{`selected: ${selected.length ? selected.join(", ") : "none"}`}
|
|
168
|
+
</SizableText>
|
|
169
|
+
<SizableText size="$2" opacity={0.7}>
|
|
170
|
+
Hold for 350 ms without moving more than 10 px, then drag. The interceptor takes the move
|
|
171
|
+
stream away from d3-zoom inside the canvas's own realm, so the marquee draws and the graph
|
|
172
|
+
underneath does not pan. A second finger cancels: a pinch is not a lasso.
|
|
173
|
+
</SizableText>
|
|
174
|
+
<YStack flex={1}>
|
|
175
|
+
<NodeGraph
|
|
176
|
+
schema={schema}
|
|
177
|
+
defaultDocument={demoDocumentLarge(12)}
|
|
178
|
+
interactionMode={mode}
|
|
179
|
+
coarsePointer
|
|
180
|
+
// The whole of task 6.4, as one serializable boolean. It used to be a
|
|
181
|
+
// hook the story called against a ref in the wrong realm.
|
|
182
|
+
longPressLasso
|
|
183
|
+
onGraphEvent={onGraphEvent}
|
|
184
|
+
>
|
|
185
|
+
<Chrome />
|
|
186
|
+
</NodeGraph>
|
|
187
|
+
</YStack>
|
|
188
|
+
</YStack>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export const LongPress: Story = {
|
|
193
|
+
render: () => (
|
|
194
|
+
<Preset>
|
|
195
|
+
<LongPressStory />
|
|
196
|
+
</Preset>
|
|
197
|
+
),
|
|
198
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `NodeGraph/Snapping` — design §12.1, and the place task 3.3's verify line is
|
|
3
|
+
* carried out: drag at zoom 0.5 and at zoom 2 and the pull has to feel the same.
|
|
4
|
+
*
|
|
5
|
+
* The three stories map to the rules that cannot be seen in a unit test:
|
|
6
|
+
*
|
|
7
|
+
* - `Main` — one node against two neighbours, and the guides that appear.
|
|
8
|
+
* - `MultiSelect` — S6. Shift-click two nodes and drag; the SELECTION's box
|
|
9
|
+
* snaps and the two nodes keep their spacing. A per-node snapper deforms the
|
|
10
|
+
* pair here, visibly.
|
|
11
|
+
* - `ZoomThreshold` — S2. The readout prints the live zoom and the threshold
|
|
12
|
+
* in flow units, so "the pull feels the same" is checkable instead of felt:
|
|
13
|
+
* at 0.5x the flow threshold doubles and at 2x it halves, which is what
|
|
14
|
+
* keeps the SCREEN distance fixed.
|
|
15
|
+
*
|
|
16
|
+
* Every node starts a few units off its neighbour's line on purpose. A graph
|
|
17
|
+
* laid out on a grid is already aligned, and a snap that fires on the first
|
|
18
|
+
* pixel of a drag shows nothing.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
22
|
+
import { SizableText, XStack, YStack } from "tamagui";
|
|
23
|
+
import type { BuiltinEdgeData } from "../edges/edgeKinds";
|
|
24
|
+
import type { GraphDocument } from "../model/index";
|
|
25
|
+
import { NodeGraph } from "../NodeGraph";
|
|
26
|
+
import { demoGraphSchema } from "../react-flow/demoNodeBody";
|
|
27
|
+
import type { DemoNodeData } from "../react-flow/fixtures";
|
|
28
|
+
import { Background, Controls, useStore } from "../react-flow/xy";
|
|
29
|
+
import { defaultSnapThresholdPx } from "./snapAlignment";
|
|
30
|
+
|
|
31
|
+
type Doc = GraphDocument<DemoNodeData, BuiltinEdgeData>;
|
|
32
|
+
|
|
33
|
+
const schema = demoGraphSchema();
|
|
34
|
+
|
|
35
|
+
const meta: Meta<typeof NodeGraph> = {
|
|
36
|
+
title: "NodeGraph/Snapping",
|
|
37
|
+
component: NodeGraph,
|
|
38
|
+
parameters: {
|
|
39
|
+
status: { type: "beta" },
|
|
40
|
+
layout: "fullscreen",
|
|
41
|
+
docs: {
|
|
42
|
+
description: {
|
|
43
|
+
component:
|
|
44
|
+
"Alignment snapping (design 7.2). A drag is snapped to a neighbour's left, centre or right line and to its top, middle or bottom line, nearest per axis independently, with the threshold measured in SCREEN pixels and divided by the zoom. Guides are one svg with at most two lines, inside the viewport transform. The end of a drag is never snapped: that frame is the one the document commits.",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
argTypes: {
|
|
49
|
+
coarsePointer: { control: "boolean", description: "Touch surface — a 12 px pull, not 8" },
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
|
|
54
|
+
type Story = StoryObj<typeof NodeGraph>;
|
|
55
|
+
|
|
56
|
+
/** Deliberately 3 to 6 units off every line the neighbours offer. */
|
|
57
|
+
function unalignedDocument(): Doc {
|
|
58
|
+
return {
|
|
59
|
+
version: 1,
|
|
60
|
+
nodes: [
|
|
61
|
+
{ id: "anchorA", kind: "source", position: { x: 0, y: 0 }, data: { table: "orders" } },
|
|
62
|
+
{ id: "anchorB", kind: "sink", position: { x: 560, y: 320 }, data: { target: "warehouse" } },
|
|
63
|
+
{
|
|
64
|
+
id: "drag-me",
|
|
65
|
+
kind: "transform",
|
|
66
|
+
position: { x: 274, y: 166 },
|
|
67
|
+
data: { expression: "drag me at either zoom" },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
edges: [
|
|
71
|
+
{
|
|
72
|
+
id: "anchorA->drag-me",
|
|
73
|
+
kind: "flow",
|
|
74
|
+
source: { node: "anchorA", port: "rows" },
|
|
75
|
+
target: { node: "drag-me", port: "in" },
|
|
76
|
+
data: {},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Two nodes 200 apart, five units off the anchor's lines. Drag them together. */
|
|
83
|
+
function pairDocument(): Doc {
|
|
84
|
+
return {
|
|
85
|
+
version: 1,
|
|
86
|
+
nodes: [
|
|
87
|
+
{ id: "anchor", kind: "sink", position: { x: 0, y: 340 }, data: { target: "warehouse" } },
|
|
88
|
+
{ id: "pair-1", kind: "source", position: { x: 5, y: 40 }, data: { table: "orders_1" } },
|
|
89
|
+
{ id: "pair-2", kind: "source", position: { x: 325, y: 40 }, data: { table: "orders_2" } },
|
|
90
|
+
],
|
|
91
|
+
edges: [],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function Canvas({ children, height = 520 }: { children: React.ReactNode; height?: number }) {
|
|
96
|
+
return (
|
|
97
|
+
<YStack width="100%" height={height} padding="$3">
|
|
98
|
+
{children}
|
|
99
|
+
</YStack>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Lives INSIDE the canvas, because the zoom is store state and the store only
|
|
105
|
+
* exists under the provider the editor mounts for you.
|
|
106
|
+
*/
|
|
107
|
+
function ZoomReadout({ coarsePointer = false }: { coarsePointer?: boolean }) {
|
|
108
|
+
const zoom = useStore((state) => state.transform[2]);
|
|
109
|
+
const screenPx = coarsePointer ? defaultSnapThresholdPx.coarse : defaultSnapThresholdPx.fine;
|
|
110
|
+
return (
|
|
111
|
+
<XStack
|
|
112
|
+
position="absolute"
|
|
113
|
+
top="$2"
|
|
114
|
+
left="$2"
|
|
115
|
+
gap="$3"
|
|
116
|
+
padding="$2"
|
|
117
|
+
borderRadius="$3"
|
|
118
|
+
backgroundColor="$background"
|
|
119
|
+
opacity={0.9}
|
|
120
|
+
zIndex={10}
|
|
121
|
+
>
|
|
122
|
+
<SizableText size="$2">{`zoom ${zoom.toFixed(2)}x`}</SizableText>
|
|
123
|
+
<SizableText size="$2" opacity={0.7}>
|
|
124
|
+
{`pull ${screenPx} screen px = ${(screenPx / zoom).toFixed(1)} flow units`}
|
|
125
|
+
</SizableText>
|
|
126
|
+
</XStack>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const Main: Story = {
|
|
131
|
+
render: (args) => (
|
|
132
|
+
<Canvas>
|
|
133
|
+
<SizableText size="$2" opacity={0.7} paddingBottom="$2">
|
|
134
|
+
Drag `drag-me`. A vertical guide means its left, centre or right lined up with a
|
|
135
|
+
neighbour's; a horizontal one means the same on the other axis. Let go and the guides clear.
|
|
136
|
+
</SizableText>
|
|
137
|
+
<YStack flex={1}>
|
|
138
|
+
<NodeGraph
|
|
139
|
+
schema={schema}
|
|
140
|
+
defaultDocument={unalignedDocument()}
|
|
141
|
+
coarsePointer={args.coarsePointer}
|
|
142
|
+
>
|
|
143
|
+
<Background />
|
|
144
|
+
<Controls />
|
|
145
|
+
</NodeGraph>
|
|
146
|
+
</YStack>
|
|
147
|
+
</Canvas>
|
|
148
|
+
),
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const MultiSelect: Story = {
|
|
152
|
+
render: () => (
|
|
153
|
+
<Canvas>
|
|
154
|
+
<SizableText size="$2" opacity={0.7} paddingBottom="$2">
|
|
155
|
+
Shift-click both `pair-*` nodes, then drag either one. The 320 units between them never
|
|
156
|
+
changes: the SELECTION's bounding box is what snaps, and one delta moves both (S6).
|
|
157
|
+
</SizableText>
|
|
158
|
+
<YStack flex={1}>
|
|
159
|
+
<NodeGraph schema={schema} defaultDocument={pairDocument()}>
|
|
160
|
+
<Background />
|
|
161
|
+
<Controls />
|
|
162
|
+
</NodeGraph>
|
|
163
|
+
</YStack>
|
|
164
|
+
</Canvas>
|
|
165
|
+
),
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const ZoomThreshold: Story = {
|
|
169
|
+
render: (args) => (
|
|
170
|
+
<Canvas height={560}>
|
|
171
|
+
<SizableText size="$2" opacity={0.7} paddingBottom="$2">
|
|
172
|
+
Zoom to 0.50x, drag `drag-me` until a guide fires, and note how far off it was. Zoom to
|
|
173
|
+
2.00x and do it again. The flow-unit number in the readout changes by 4x; the distance your
|
|
174
|
+
cursor travels does not. That is S2.
|
|
175
|
+
</SizableText>
|
|
176
|
+
<YStack flex={1}>
|
|
177
|
+
<NodeGraph
|
|
178
|
+
schema={schema}
|
|
179
|
+
defaultDocument={unalignedDocument()}
|
|
180
|
+
coarsePointer={args.coarsePointer}
|
|
181
|
+
>
|
|
182
|
+
<Background />
|
|
183
|
+
<Controls />
|
|
184
|
+
<ZoomReadout coarsePointer={args.coarsePointer} />
|
|
185
|
+
</NodeGraph>
|
|
186
|
+
</YStack>
|
|
187
|
+
</Canvas>
|
|
188
|
+
),
|
|
189
|
+
};
|