@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
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design §7.2 S10, the one snapping rule that is about the DOM.
|
|
3
|
+
*
|
|
4
|
+
* It lives here rather than in `interaction/snapChanges.spec.ts`, where the
|
|
5
|
+
* plan drafted it, for a mechanical reason: the claim is "one `<svg>` with at
|
|
6
|
+
* most two `<line>` children, inside the viewport transform", and only the
|
|
7
|
+
* component that renders it can be asked what it made. The other five wiring
|
|
8
|
+
* rules stay pure and stay there.
|
|
9
|
+
*
|
|
10
|
+
* The guides are mounted inside a real `<ReactFlow>` because `ViewportPortal`
|
|
11
|
+
* renders into the store's viewport node. A test that mounted the svg on its
|
|
12
|
+
* own would assert the markup and prove nothing about where it lands, which is
|
|
13
|
+
* the half of S10 that matters.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
17
|
+
import { cleanup } from "@testing-library/react";
|
|
18
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
19
|
+
import type { SnapGuide } from "../interaction/snapAlignment";
|
|
20
|
+
import {
|
|
21
|
+
SnapGuides,
|
|
22
|
+
snapGuideClassName,
|
|
23
|
+
snapGuidePadding,
|
|
24
|
+
snapGuidesBounds,
|
|
25
|
+
snapGuidesClassName,
|
|
26
|
+
} from "./SnapGuides";
|
|
27
|
+
import { ReactFlow, ReactFlowProvider } from "./xy";
|
|
28
|
+
|
|
29
|
+
afterEach(cleanup);
|
|
30
|
+
|
|
31
|
+
const xGuide: SnapGuide = {
|
|
32
|
+
axis: "x",
|
|
33
|
+
position: 300,
|
|
34
|
+
start: 0,
|
|
35
|
+
end: 450,
|
|
36
|
+
nodeId: "c",
|
|
37
|
+
movingLine: "start",
|
|
38
|
+
candidateLine: "start",
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const yGuide: SnapGuide = {
|
|
42
|
+
axis: "y",
|
|
43
|
+
position: 200,
|
|
44
|
+
start: 10,
|
|
45
|
+
end: 620,
|
|
46
|
+
nodeId: "d",
|
|
47
|
+
movingLine: "center",
|
|
48
|
+
candidateLine: "end",
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
function mount(guides: readonly SnapGuide[], animated?: boolean) {
|
|
52
|
+
return renderWithProviders(
|
|
53
|
+
<ReactFlowProvider>
|
|
54
|
+
<ReactFlow nodes={[]} edges={[]} proOptions={{ hideAttribution: true }}>
|
|
55
|
+
<SnapGuides guides={guides} animated={animated} />
|
|
56
|
+
</ReactFlow>
|
|
57
|
+
</ReactFlowProvider>,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe("SnapGuides", () => {
|
|
62
|
+
it("renders nothing at all when there is nothing to align to", () => {
|
|
63
|
+
const { container } = mount([]);
|
|
64
|
+
expect(container.querySelector(`.${snapGuidesClassName}`)).toBeNull();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("renders ONE svg with one line for one guide", () => {
|
|
68
|
+
const { container } = mount([xGuide]);
|
|
69
|
+
expect(container.querySelectorAll(`.${snapGuidesClassName}`)).toHaveLength(1);
|
|
70
|
+
expect(container.querySelectorAll(`.${snapGuideClassName}`)).toHaveLength(1);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("renders ONE svg with two lines for both axes, never a layer per guide", () => {
|
|
74
|
+
const { container } = mount([xGuide, yGuide]);
|
|
75
|
+
expect(container.querySelectorAll(`.${snapGuidesClassName}`)).toHaveLength(1);
|
|
76
|
+
expect(container.querySelectorAll(`.${snapGuideClassName}`)).toHaveLength(2);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("puts the layer INSIDE the viewport, so pan and zoom carry it for free", () => {
|
|
80
|
+
const { container } = mount([xGuide]);
|
|
81
|
+
const viewport = container.querySelector(".react-flow__viewport");
|
|
82
|
+
expect(viewport).not.toBeNull();
|
|
83
|
+
expect(viewport?.querySelector(`.${snapGuidesClassName}`)).not.toBeNull();
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("draws a vertical line for an x guide and a horizontal one for a y guide", () => {
|
|
87
|
+
const { container } = mount([xGuide, yGuide]);
|
|
88
|
+
const box = snapGuidesBounds([xGuide, yGuide]);
|
|
89
|
+
if (!box) throw new Error("two guides have a box");
|
|
90
|
+
const [vertical, horizontal] = Array.from(container.querySelectorAll(`.${snapGuideClassName}`));
|
|
91
|
+
// Local coordinates: the layer is translated to `box`, so a line's numbers
|
|
92
|
+
// are its flow position minus the box origin.
|
|
93
|
+
expect([
|
|
94
|
+
vertical.getAttribute("x1"),
|
|
95
|
+
vertical.getAttribute("x2"),
|
|
96
|
+
vertical.getAttribute("y1"),
|
|
97
|
+
vertical.getAttribute("y2"),
|
|
98
|
+
]).toEqual([`${300 - box.x}`, `${300 - box.x}`, `${0 - box.y}`, `${450 - box.y}`]);
|
|
99
|
+
expect([
|
|
100
|
+
horizontal.getAttribute("x1"),
|
|
101
|
+
horizontal.getAttribute("x2"),
|
|
102
|
+
horizontal.getAttribute("y1"),
|
|
103
|
+
horizontal.getAttribute("y2"),
|
|
104
|
+
]).toEqual([`${10 - box.x}`, `${620 - box.x}`, `${200 - box.y}`, `${200 - box.y}`]);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it.each([[[xGuide]], [[yGuide]], [[xGuide, yGuide]]])(
|
|
108
|
+
"gives the layer a box that CONTAINS every line it draws",
|
|
109
|
+
(guides) => {
|
|
110
|
+
// The assertion that would have caught the invisible first version. It
|
|
111
|
+
// was `width={0} height={0}` with `overflow: visible`, drawing in flow
|
|
112
|
+
// coordinates: correct DOM, and nothing painted, because an outermost
|
|
113
|
+
// svg clips to its own viewport. Every other test in this file passed.
|
|
114
|
+
const { container } = mount(guides);
|
|
115
|
+
const svg = container.querySelector(`.${snapGuidesClassName}`);
|
|
116
|
+
if (!svg) throw new Error("a guide layer");
|
|
117
|
+
const width = Number(svg.getAttribute("width"));
|
|
118
|
+
const height = Number(svg.getAttribute("height"));
|
|
119
|
+
expect(width).toBeGreaterThan(0);
|
|
120
|
+
expect(height).toBeGreaterThan(0);
|
|
121
|
+
for (const line of Array.from(container.querySelectorAll(`.${snapGuideClassName}`))) {
|
|
122
|
+
for (const [attribute, extent] of [
|
|
123
|
+
["x1", width],
|
|
124
|
+
["x2", width],
|
|
125
|
+
["y1", height],
|
|
126
|
+
["y2", height],
|
|
127
|
+
] as const) {
|
|
128
|
+
const value = Number(line.getAttribute(attribute));
|
|
129
|
+
expect(value).toBeGreaterThanOrEqual(0);
|
|
130
|
+
expect(value).toBeLessThanOrEqual(extent);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
it("pads the box, so a centred stroke is not sliced in half by its own edge", () => {
|
|
137
|
+
const box = snapGuidesBounds([xGuide]);
|
|
138
|
+
expect(box).toEqual({
|
|
139
|
+
x: 300 - snapGuidePadding,
|
|
140
|
+
y: 0 - snapGuidePadding,
|
|
141
|
+
width: snapGuidePadding * 2,
|
|
142
|
+
height: 450 + snapGuidePadding * 2,
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it("has no box for no guides", () => {
|
|
147
|
+
expect(snapGuidesBounds([])).toBeNull();
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("carries the animated flag, which is all motion settings get to change", () => {
|
|
151
|
+
const { container } = mount([xGuide], false);
|
|
152
|
+
expect(container.querySelector(`.${snapGuidesClassName}`)?.getAttribute("data-animated")).toBe(
|
|
153
|
+
"false",
|
|
154
|
+
);
|
|
155
|
+
cleanup();
|
|
156
|
+
const on = mount([xGuide], true);
|
|
157
|
+
expect(
|
|
158
|
+
on.container.querySelector(`.${snapGuidesClassName}`)?.getAttribute("data-animated"),
|
|
159
|
+
).toBe("true");
|
|
160
|
+
});
|
|
161
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The alignment guides, design §7.2 S10.
|
|
3
|
+
*
|
|
4
|
+
* ONE `<svg>` with at most two `<line>` children, inside React Flow's viewport
|
|
5
|
+
* transform, cleared the moment the drag ends. Never a div per guide: a guide
|
|
6
|
+
* is a hairline across the canvas, and a div layer would need its own width,
|
|
7
|
+
* its own transform, and its own rounding, all of which the viewport already
|
|
8
|
+
* did for us.
|
|
9
|
+
*
|
|
10
|
+
* **The svg is SIZED to its lines, and that is not cosmetic.** The first
|
|
11
|
+
* version was `width={0} height={0}` with `overflow: visible`, drawing in flow
|
|
12
|
+
* coordinates — structurally right, and INVISIBLE in Chrome. The DOM was
|
|
13
|
+
* correct (one svg, two lines, right coordinates, stroke resolved from the var
|
|
14
|
+
* layer) and nothing painted, because an outermost `<svg>` clips to its own
|
|
15
|
+
* viewport and a zero-sized viewport has nothing inside it. Measured on
|
|
16
|
+
* `NodeGraph/Snapping → ZoomThreshold` by forcing the stroke to 6 px and
|
|
17
|
+
* screenshotting: still nothing. So the layer takes the bounding box of the
|
|
18
|
+
* guides, plus a small pad for the stroke, and draws in LOCAL coordinates.
|
|
19
|
+
*
|
|
20
|
+
* `vector-effect: non-scaling-stroke` in `css/graph.css` is what keeps a
|
|
21
|
+
* hairline a hairline at 4x zoom rather than a 2 px bar.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import type { SnapGuide } from "../interaction/snapAlignment";
|
|
25
|
+
import { ViewportPortal } from "./xy";
|
|
26
|
+
|
|
27
|
+
export const snapGuidesClassName = "mp-graph-guides";
|
|
28
|
+
export const snapGuideClassName = "mp-graph-guide";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Flow units of slack around the box. The stroke is centred on the line, so a
|
|
32
|
+
* box that ends exactly on it would clip half of it away; and at a pinched-out
|
|
33
|
+
* zoom the painted stroke is wider than the flow units it sits in.
|
|
34
|
+
*/
|
|
35
|
+
export const snapGuidePadding = 2;
|
|
36
|
+
|
|
37
|
+
export interface SnapGuidesBox {
|
|
38
|
+
readonly x: number;
|
|
39
|
+
readonly y: number;
|
|
40
|
+
readonly width: number;
|
|
41
|
+
readonly height: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The padded box that holds every line. Exported because the spec asserts it. */
|
|
45
|
+
export function snapGuidesBounds(guides: readonly SnapGuide[]): SnapGuidesBox | null {
|
|
46
|
+
if (guides.length === 0) return null;
|
|
47
|
+
let minX = Number.POSITIVE_INFINITY;
|
|
48
|
+
let minY = Number.POSITIVE_INFINITY;
|
|
49
|
+
let maxX = Number.NEGATIVE_INFINITY;
|
|
50
|
+
let maxY = Number.NEGATIVE_INFINITY;
|
|
51
|
+
for (const guide of guides) {
|
|
52
|
+
const [x1, y1, x2, y2] =
|
|
53
|
+
guide.axis === "x"
|
|
54
|
+
? [guide.position, guide.start, guide.position, guide.end]
|
|
55
|
+
: [guide.start, guide.position, guide.end, guide.position];
|
|
56
|
+
minX = Math.min(minX, x1, x2);
|
|
57
|
+
maxX = Math.max(maxX, x1, x2);
|
|
58
|
+
minY = Math.min(minY, y1, y2);
|
|
59
|
+
maxY = Math.max(maxY, y1, y2);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
x: minX - snapGuidePadding,
|
|
63
|
+
y: minY - snapGuidePadding,
|
|
64
|
+
width: maxX - minX + snapGuidePadding * 2,
|
|
65
|
+
height: maxY - minY + snapGuidePadding * 2,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface SnapGuidesProps {
|
|
70
|
+
readonly guides: readonly SnapGuide[];
|
|
71
|
+
/**
|
|
72
|
+
* Design §7.2 S11: motion settings fade the guide, they do not turn snapping
|
|
73
|
+
* off. False under `animation: "none"` and under OS reduced motion.
|
|
74
|
+
*/
|
|
75
|
+
readonly animated?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function SnapGuides({ guides, animated = true }: SnapGuidesProps) {
|
|
79
|
+
const box = snapGuidesBounds(guides);
|
|
80
|
+
if (!box) return null;
|
|
81
|
+
return (
|
|
82
|
+
<ViewportPortal>
|
|
83
|
+
<svg
|
|
84
|
+
className={snapGuidesClassName}
|
|
85
|
+
data-animated={animated ? "true" : "false"}
|
|
86
|
+
width={box.width}
|
|
87
|
+
height={box.height}
|
|
88
|
+
style={{
|
|
89
|
+
position: "absolute",
|
|
90
|
+
left: 0,
|
|
91
|
+
top: 0,
|
|
92
|
+
// The same mechanism React Flow moves its own nodes with, so the
|
|
93
|
+
// guide and the node it points at cannot round differently.
|
|
94
|
+
transform: `translate(${box.x}px, ${box.y}px)`,
|
|
95
|
+
overflow: "visible",
|
|
96
|
+
pointerEvents: "none",
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
{guides.map((guide) => (
|
|
100
|
+
<line
|
|
101
|
+
key={guide.axis}
|
|
102
|
+
className={snapGuideClassName}
|
|
103
|
+
data-axis={guide.axis}
|
|
104
|
+
x1={(guide.axis === "x" ? guide.position : guide.start) - box.x}
|
|
105
|
+
x2={(guide.axis === "x" ? guide.position : guide.end) - box.x}
|
|
106
|
+
y1={(guide.axis === "x" ? guide.start : guide.position) - box.y}
|
|
107
|
+
y2={(guide.axis === "x" ? guide.end : guide.position) - box.y}
|
|
108
|
+
/>
|
|
109
|
+
))}
|
|
110
|
+
</svg>
|
|
111
|
+
</ViewportPortal>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design §13.2's plain-div CONTROL condition, as a schema the DOM bundle can
|
|
3
|
+
* reach.
|
|
4
|
+
*
|
|
5
|
+
* The delta between this and `demoGraphSchema()` is the Tamagui cost, measured
|
|
6
|
+
* on the host in front of you instead of carried over from the web's ~10%. Same
|
|
7
|
+
* graph, same edges, same React Flow `Handle`s — only the node BODY changes,
|
|
8
|
+
* from the package's `GraphNode` frame to a bare styled `div`. The handles stay
|
|
9
|
+
* because removing them would change what React Flow itself does per node, and
|
|
10
|
+
* then the two cells would not be the same experiment.
|
|
11
|
+
*
|
|
12
|
+
* WHY IT IS HERE AND NOT IN THE STORY, which is where it was written.
|
|
13
|
+
*
|
|
14
|
+
* A `NodeKindSpec.render` is a `ComponentType`, so it cannot be JSON and cannot
|
|
15
|
+
* cross the bridge: the only string that crosses is `schemaId`, and the canvas
|
|
16
|
+
* resolves it inside the DOM bundle. `bench/Perf200.stories.tsx` runs on the
|
|
17
|
+
* Hermes side, so a schema built there is unreachable from the realm that has
|
|
18
|
+
* to render it. Measured on the iPhone 16e at m6: `Perf200 → Control` reported
|
|
19
|
+
* `render: no graph schema registered as "node-graph-demo-control"` and painted
|
|
20
|
+
* nothing, which left §13.2's mandated control condition unmeasurable on every
|
|
21
|
+
* device.
|
|
22
|
+
*
|
|
23
|
+
* Moving it into the package is only half the fix. The other half is that the
|
|
24
|
+
* app's `'use dom'` entry can now register MORE THAN ONE schema — see
|
|
25
|
+
* `NodeGraphDomRealmProps.schemas` — because an id-keyed lookup over a list is
|
|
26
|
+
* the thing that scales past the single special case the inner tree carried.
|
|
27
|
+
*
|
|
28
|
+
* The inline styles are deliberately dumb literals off the `currentColor`
|
|
29
|
+
* chain, with no token and no `useResolvedKnobs` anywhere in the subtree: a
|
|
30
|
+
* control that resolved tokens would be measuring a slice of the thing it is
|
|
31
|
+
* the control for.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
import type { GraphNodeRenderProps } from "../model/index";
|
|
35
|
+
import { createGraphSchema, defaultRules } from "../model/index";
|
|
36
|
+
import type { BuiltinEdgeData } from "../edges/edgeKinds";
|
|
37
|
+
import { builtinEdgeKinds } from "../edges/edgeKinds";
|
|
38
|
+
import type { DemoNodeData } from "./fixtures";
|
|
39
|
+
import { demoControlSchemaId, demoSchemaShape } from "./fixtures";
|
|
40
|
+
import { Handle, Position } from "./xy";
|
|
41
|
+
|
|
42
|
+
export function DemoControlBody<TData>({
|
|
43
|
+
ports,
|
|
44
|
+
measure,
|
|
45
|
+
title,
|
|
46
|
+
}: GraphNodeRenderProps<TData> & { readonly title: string }) {
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
style={{
|
|
50
|
+
width: measure?.width ?? 190,
|
|
51
|
+
minHeight: measure?.minHeight ?? 72,
|
|
52
|
+
boxSizing: "border-box",
|
|
53
|
+
border: "1px solid currentColor",
|
|
54
|
+
borderRadius: 8,
|
|
55
|
+
padding: 8,
|
|
56
|
+
font: "inherit",
|
|
57
|
+
opacity: 0.9,
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
<div style={{ fontWeight: 600 }}>{title}</div>
|
|
61
|
+
{ports.map((port, index) => (
|
|
62
|
+
<Handle
|
|
63
|
+
key={port.id}
|
|
64
|
+
id={port.id}
|
|
65
|
+
type={port.direction === "out" ? "source" : "target"}
|
|
66
|
+
position={port.side === "right" ? Position.Right : Position.Left}
|
|
67
|
+
style={{ top: 24 + index * 20, width: 8, height: 8, borderRadius: "50%" }}
|
|
68
|
+
/>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The same measures, ports and rules as the demo schema, with plain bodies.
|
|
76
|
+
*
|
|
77
|
+
* `demoSchemaShape()` rather than a second kind table, for the reason that
|
|
78
|
+
* module already gives: a second copy is a second thing to keep in step, and a
|
|
79
|
+
* control whose geometry drifted from the subject would measure two graphs.
|
|
80
|
+
*/
|
|
81
|
+
export function demoControlSchema() {
|
|
82
|
+
const shape = demoSchemaShape();
|
|
83
|
+
const body = (title: string) => (props: GraphNodeRenderProps<never>) => (
|
|
84
|
+
<DemoControlBody {...props} title={title} />
|
|
85
|
+
);
|
|
86
|
+
return createGraphSchema<DemoNodeData, BuiltinEdgeData>({
|
|
87
|
+
id: demoControlSchemaId,
|
|
88
|
+
nodes: {
|
|
89
|
+
source: { ...shape.nodes.source, render: body("Source") as never },
|
|
90
|
+
transform: { ...shape.nodes.transform, render: body("Transform") as never },
|
|
91
|
+
sink: { ...shape.nodes.sink, render: body("Sink") as never },
|
|
92
|
+
},
|
|
93
|
+
edges: builtinEdgeKinds,
|
|
94
|
+
rules: defaultRules,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The node body the task-1.11 spec and the `NodeGraph/NodeGraph` story both
|
|
3
|
+
* mount.
|
|
4
|
+
*
|
|
5
|
+
* It is what a CONSUMER writes: a `NodeKindSpec.render` that composes the
|
|
6
|
+
* package's `GraphNode` frame and `GraphPort` disc. Keeping it here rather than
|
|
7
|
+
* inside the story is deliberate — the spec and the story then assert the same
|
|
8
|
+
* tree, so a story that renders cannot be a story that renders something else.
|
|
9
|
+
*
|
|
10
|
+
* Its own file, and its own NAME, because `demoNodeBody.tsx` beside a
|
|
11
|
+
* `demoNodeBody.ts` would be ONE module on macOS. See the note in
|
|
12
|
+
* `nodes/nodeMeasure.ts`.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { GraphNodeRenderProps, PortSpec } from "../model/index";
|
|
16
|
+
import { createGraphSchema, defaultRules } from "../model/index";
|
|
17
|
+
import type { BuiltinEdgeData } from "../edges/edgeKinds";
|
|
18
|
+
import { builtinEdgeKinds } from "../edges/edgeKinds";
|
|
19
|
+
import { GraphNode } from "../nodes/GraphNode";
|
|
20
|
+
import { GraphPort } from "../nodes/GraphPort";
|
|
21
|
+
import type { GraphNodePort } from "../nodes/nodeMeasure";
|
|
22
|
+
import type { DemoNodeData } from "./fixtures";
|
|
23
|
+
import { demoSchemaShape } from "./fixtures";
|
|
24
|
+
|
|
25
|
+
interface BodyProps<TData> extends GraphNodeRenderProps<TData> {
|
|
26
|
+
readonly title: string;
|
|
27
|
+
readonly subtitle?: string;
|
|
28
|
+
readonly intent?: string;
|
|
29
|
+
readonly coarsePointer?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function Body<TData>({
|
|
33
|
+
id,
|
|
34
|
+
title,
|
|
35
|
+
subtitle,
|
|
36
|
+
intent,
|
|
37
|
+
ports,
|
|
38
|
+
selected,
|
|
39
|
+
dragging,
|
|
40
|
+
renderMode,
|
|
41
|
+
coarsePointer,
|
|
42
|
+
measure,
|
|
43
|
+
}: BodyProps<TData>) {
|
|
44
|
+
return (
|
|
45
|
+
<GraphNode
|
|
46
|
+
id={id}
|
|
47
|
+
title={title}
|
|
48
|
+
subtitle={subtitle}
|
|
49
|
+
intent={intent}
|
|
50
|
+
selected={selected}
|
|
51
|
+
dragging={dragging}
|
|
52
|
+
renderMode={renderMode}
|
|
53
|
+
coarsePointer={coarsePointer}
|
|
54
|
+
// The kind's own measure, so the painted frame is the width the canvas
|
|
55
|
+
// seeded React Flow with.
|
|
56
|
+
measure={measure}
|
|
57
|
+
// `PortSpec` is structurally the port the frame measures and labels; it
|
|
58
|
+
// adds `index`, `dataType` and `arity`, none of which paint.
|
|
59
|
+
ports={ports as readonly GraphNodePort[]}
|
|
60
|
+
renderPort={(port) => (
|
|
61
|
+
<GraphPort
|
|
62
|
+
id={port.id}
|
|
63
|
+
side={port.side}
|
|
64
|
+
direction={port.direction}
|
|
65
|
+
intent={intent}
|
|
66
|
+
coarsePointer={coarsePointer}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function DemoSourceBody(props: GraphNodeRenderProps<DemoNodeData["source"]>) {
|
|
74
|
+
return <Body {...props} title="Source" subtitle={`table: ${props.data.table}`} />;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function DemoTransformBody(props: GraphNodeRenderProps<DemoNodeData["transform"]>) {
|
|
78
|
+
return <Body {...props} title="Transform" subtitle={props.data.expression} intent="accent" />;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function DemoSinkBody(props: GraphNodeRenderProps<DemoNodeData["sink"]>) {
|
|
82
|
+
return <Body {...props} title="Sink" subtitle={`→ ${props.data.target}`} intent="success" />;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const bodies = {
|
|
86
|
+
source: DemoSourceBody,
|
|
87
|
+
transform: DemoTransformBody,
|
|
88
|
+
sink: DemoSinkBody,
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
/** The fixture schema with real bodies wired in. */
|
|
92
|
+
export function demoGraphSchema() {
|
|
93
|
+
const shape = demoSchemaShape();
|
|
94
|
+
return createGraphSchema<DemoNodeData, BuiltinEdgeData>({
|
|
95
|
+
id: shape.id,
|
|
96
|
+
nodes: {
|
|
97
|
+
source: { ...shape.nodes.source, render: bodies.source },
|
|
98
|
+
transform: { ...shape.nodes.transform, render: bodies.transform },
|
|
99
|
+
sink: { ...shape.nodes.sink, render: bodies.sink },
|
|
100
|
+
},
|
|
101
|
+
edges: builtinEdgeKinds,
|
|
102
|
+
rules: defaultRules,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Design §13.2's control condition, re-exported so `@multiplatform.one/node-graph/demo`
|
|
108
|
+
* serves BOTH schemas from one subpath.
|
|
109
|
+
*
|
|
110
|
+
* The app's `'use dom'` entry is the only module that can hand a schema to the
|
|
111
|
+
* canvas — a `render` is a component and cannot cross the bridge — and an entry
|
|
112
|
+
* that had to reach two subpaths to register two schemas would be an entry with
|
|
113
|
+
* a second way to get one of them wrong. It is a re-export rather than a second
|
|
114
|
+
* export map entry for the same reason `NodeGraphDomInner` imports this file
|
|
115
|
+
* statically: another `import()` in the DOM subtree makes Metro emit a shared
|
|
116
|
+
* `__common` chunk, and `expo export`'s html serializer then dies while exiting
|
|
117
|
+
* 0 (design §13.2).
|
|
118
|
+
*/
|
|
119
|
+
export { DemoControlBody, demoControlSchema } from "./demoControlBody";
|
|
120
|
+
|
|
121
|
+
export type { PortSpec };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One schema and one document, shared by the two task-1.11 specs and the story.
|
|
3
|
+
*
|
|
4
|
+
* A fixture module rather than a copy in each file: the story is the thing a
|
|
5
|
+
* reviewer looks at, and a story that drifts from what the specs assert is a
|
|
6
|
+
* story that proves nothing about the code under test.
|
|
7
|
+
*
|
|
8
|
+
* `.ts`, no JSX, and no component values — `NodeKindSpec.render` is filled in
|
|
9
|
+
* by whoever mounts these, because the model half of the package must stay
|
|
10
|
+
* importable without React (design §3.1).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { GraphDocument, GraphSchema, PortSpec } from "../model/index";
|
|
14
|
+
import { createGraphSchema, defaultRules } from "../model/index";
|
|
15
|
+
import type { BuiltinEdgeData } from "../edges/edgeKinds";
|
|
16
|
+
import { builtinEdgeKinds } from "../edges/edgeKinds";
|
|
17
|
+
|
|
18
|
+
export type DemoNodeData = {
|
|
19
|
+
readonly source: { readonly table: string };
|
|
20
|
+
readonly transform: { readonly expression: string };
|
|
21
|
+
readonly sink: { readonly target: string };
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const out = (id: string, label: string): PortSpec => ({
|
|
25
|
+
id,
|
|
26
|
+
side: "right",
|
|
27
|
+
direction: "out",
|
|
28
|
+
label,
|
|
29
|
+
});
|
|
30
|
+
const into = (id: string, label: string): PortSpec => ({
|
|
31
|
+
id,
|
|
32
|
+
side: "left",
|
|
33
|
+
direction: "in",
|
|
34
|
+
label,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** A stand-in `render`. `demoGraphSchema()` in demoNodeBody.tsx swaps in the real bodies. */
|
|
38
|
+
const noRender = (() => null) as unknown as never;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The schema WITHOUT its `render` components.
|
|
42
|
+
*
|
|
43
|
+
* Split out so `demoNodeBody.tsx` can supply real bodies over the same
|
|
44
|
+
* measures, ports and intents the model-only specs use. A second copy of the
|
|
45
|
+
* kind table is a second thing to keep in step.
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* The id the package's OWN demo schema registers under.
|
|
49
|
+
*
|
|
50
|
+
* A named constant rather than a literal in two places, because it is the one
|
|
51
|
+
* string that crosses the bridge: `NodeGraphDomInner` matches on it to register
|
|
52
|
+
* this schema inside the DOM bundle, where a story cannot reach. See the note
|
|
53
|
+
* there — a schema's `render` is a component and cannot be JSON, so the only
|
|
54
|
+
* way a canvas gets one is a module the DOM bundle itself imports.
|
|
55
|
+
*/
|
|
56
|
+
export const demoGraphSchemaId = "node-graph-demo";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The id the plain-div CONTROL schema registers under.
|
|
60
|
+
*
|
|
61
|
+
* Design §13.2 asks for a control condition in every measurement session so the
|
|
62
|
+
* Tamagui cost is measured rather than carried over from the web's ~10%. The
|
|
63
|
+
* control lived in `bench/Perf200.stories.tsx` until the m6 device pass, and a
|
|
64
|
+
* story runs on the Hermes side: only `schemaId` crosses the bridge, so on
|
|
65
|
+
* device the canvas looked the id up, missed, and reported
|
|
66
|
+
* `render: no graph schema registered as "node-graph-demo-control"`. The
|
|
67
|
+
* control condition was therefore unmeasurable on every device.
|
|
68
|
+
*
|
|
69
|
+
* It is a constant here, beside the schema it names, for the same reason the
|
|
70
|
+
* demo id is: it is a string two realms have to agree on.
|
|
71
|
+
*/
|
|
72
|
+
export const demoControlSchemaId = `${demoGraphSchemaId}-control`;
|
|
73
|
+
|
|
74
|
+
export function demoSchemaShape() {
|
|
75
|
+
return {
|
|
76
|
+
id: demoGraphSchemaId,
|
|
77
|
+
nodes: {
|
|
78
|
+
source: {
|
|
79
|
+
kind: "source" as const,
|
|
80
|
+
ports: [out("rows", "rows")],
|
|
81
|
+
defaultData: { table: "orders" },
|
|
82
|
+
measure: { width: 190, minHeight: 72 },
|
|
83
|
+
},
|
|
84
|
+
transform: {
|
|
85
|
+
kind: "transform" as const,
|
|
86
|
+
ports: [into("in", "rows"), out("ok", "ok"), out("err", "error")],
|
|
87
|
+
defaultData: { expression: "row => row" },
|
|
88
|
+
measure: { width: 190, minHeight: 72 },
|
|
89
|
+
intent: "accent",
|
|
90
|
+
},
|
|
91
|
+
sink: {
|
|
92
|
+
kind: "sink" as const,
|
|
93
|
+
ports: [into("in", "rows")],
|
|
94
|
+
defaultData: { target: "warehouse" },
|
|
95
|
+
// 240 on purpose: it is not a value the default 172/190/216 table can
|
|
96
|
+
// produce at any size stop, so a `measure` that fails to reach the
|
|
97
|
+
// painted node is visible rather than coincidentally right.
|
|
98
|
+
measure: { width: 240, minHeight: 72 },
|
|
99
|
+
intent: "success",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function demoSchema(): GraphSchema<DemoNodeData, BuiltinEdgeData> {
|
|
106
|
+
const shape = demoSchemaShape();
|
|
107
|
+
return createGraphSchema<DemoNodeData, BuiltinEdgeData>({
|
|
108
|
+
id: shape.id,
|
|
109
|
+
nodes: {
|
|
110
|
+
source: { ...shape.nodes.source, render: noRender },
|
|
111
|
+
transform: { ...shape.nodes.transform, render: noRender },
|
|
112
|
+
sink: { ...shape.nodes.sink, render: noRender },
|
|
113
|
+
},
|
|
114
|
+
edges: builtinEdgeKinds,
|
|
115
|
+
rules: defaultRules,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type Doc = GraphDocument<DemoNodeData, BuiltinEdgeData>;
|
|
120
|
+
|
|
121
|
+
/** Three nodes, one edge. Small enough that a failing assertion names a node. */
|
|
122
|
+
export function demoDocument(): Doc {
|
|
123
|
+
return {
|
|
124
|
+
version: 1,
|
|
125
|
+
nodes: [
|
|
126
|
+
{ id: "a", kind: "source", position: { x: 0, y: 0 }, data: { table: "orders" } },
|
|
127
|
+
{
|
|
128
|
+
id: "b",
|
|
129
|
+
kind: "transform",
|
|
130
|
+
position: { x: 260, y: 0 },
|
|
131
|
+
data: { expression: "row => row" },
|
|
132
|
+
},
|
|
133
|
+
{ id: "c", kind: "sink", position: { x: 520, y: 0 }, data: { target: "warehouse" } },
|
|
134
|
+
],
|
|
135
|
+
edges: [
|
|
136
|
+
{
|
|
137
|
+
id: "a->b",
|
|
138
|
+
kind: "flow",
|
|
139
|
+
source: { node: "a", port: "rows" },
|
|
140
|
+
target: { node: "b", port: "in" },
|
|
141
|
+
data: {},
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Twelve nodes and all four edge kinds — the `Main` story's graph, per design
|
|
149
|
+
* §12.1 ("the default editor, 12 nodes, all four edge kinds").
|
|
150
|
+
*/
|
|
151
|
+
export function demoDocumentLarge(count = 12): Doc {
|
|
152
|
+
const kinds = ["source", "transform", "sink"] as const;
|
|
153
|
+
const nodes: Doc["nodes"] = Array.from({ length: count }, (_, index) => {
|
|
154
|
+
const kind = kinds[index % kinds.length];
|
|
155
|
+
const data =
|
|
156
|
+
kind === "source"
|
|
157
|
+
? { table: `orders_${index}` }
|
|
158
|
+
: kind === "transform"
|
|
159
|
+
? { expression: `row => row.${index}` }
|
|
160
|
+
: { target: `warehouse_${index}` };
|
|
161
|
+
return {
|
|
162
|
+
id: `n${index}`,
|
|
163
|
+
kind,
|
|
164
|
+
position: { x: (index % 4) * 280, y: Math.floor(index / 4) * 200 },
|
|
165
|
+
data,
|
|
166
|
+
} as Doc["nodes"][number];
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
const edgeKinds = ["flow", "data", "error", "conditional"] as const;
|
|
170
|
+
const edges: Doc["edges"][number][] = [];
|
|
171
|
+
for (let index = 0; index + 1 < count; index += 1) {
|
|
172
|
+
const from = nodes[index];
|
|
173
|
+
const to = nodes[index + 1];
|
|
174
|
+
const sourcePort = from.kind === "source" ? "rows" : from.kind === "transform" ? "ok" : null;
|
|
175
|
+
if (!sourcePort) continue;
|
|
176
|
+
edges.push({
|
|
177
|
+
id: `${from.id}->${to.id}`,
|
|
178
|
+
kind: edgeKinds[edges.length % edgeKinds.length],
|
|
179
|
+
source: { node: from.id, port: sourcePort },
|
|
180
|
+
target: { node: to.id, port: "in" },
|
|
181
|
+
data: {},
|
|
182
|
+
} as Doc["edges"][number]);
|
|
183
|
+
}
|
|
184
|
+
return { version: 1, nodes, edges };
|
|
185
|
+
}
|