@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,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GraphNode measure recipe — pure. No React, no DOM, no `@xyflow`.
|
|
3
|
+
*
|
|
4
|
+
* A node is a CONTAINER, not a control (design §11 Size). Everything here
|
|
5
|
+
* exists to keep it off the control-height ladder: the width rides a per-kind
|
|
6
|
+
* table, the radius caps at the node's own padding, and the minimum height is
|
|
7
|
+
* floored by how many ports have to fit down one edge.
|
|
8
|
+
*
|
|
9
|
+
* Pure on purpose. `graphNode.spec.ts` runs it in Node with no renderer, so
|
|
10
|
+
* the laws are falsifiable before a pixel exists.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
capContainerRadius,
|
|
15
|
+
type Knobs,
|
|
16
|
+
MIN_PRESS_TARGET,
|
|
17
|
+
resolveRadiusForPart,
|
|
18
|
+
} from "@multiplatform.one/theme";
|
|
19
|
+
|
|
20
|
+
export type GraphNodeSizeKnob = Knobs["size"];
|
|
21
|
+
export type GraphNodeSpaceKnob = Knobs["space"];
|
|
22
|
+
export type GraphNodeRadiusKnob = Knobs["borderRadius"];
|
|
23
|
+
|
|
24
|
+
export type GraphPortSide = "left" | "right" | "top" | "bottom";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The structural subset of `PortSpec` this module needs to measure a node.
|
|
28
|
+
*
|
|
29
|
+
* TODO(task 1.3): replace with `PortSpec` from `../model` once the schema
|
|
30
|
+
* lands. It is declared structurally compatible on purpose — `PortSpec` adds
|
|
31
|
+
* `index`, `dataType` and `arity`, none of which change a measurement — so the
|
|
32
|
+
* swap is an import change, not a rewrite.
|
|
33
|
+
*/
|
|
34
|
+
export interface GraphNodePort {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly side: GraphPortSide;
|
|
37
|
+
readonly direction: "in" | "out";
|
|
38
|
+
readonly label?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** `NodeKindSpec.measure` (design §4.3): width fixed per kind, height knob-driven. */
|
|
42
|
+
export interface GraphNodeMeasure {
|
|
43
|
+
readonly width: number;
|
|
44
|
+
readonly minHeight: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The default per-kind measure table (design §11 Size: "default 172 / 190 / 216").
|
|
49
|
+
*
|
|
50
|
+
* A kind that declares its own `measure` overrides this entirely; the table is
|
|
51
|
+
* what an undeclared kind falls back to. `minHeight` anchors on design §5's
|
|
52
|
+
* measured node heights (62 px compact, 72 px default) with `large` one step
|
|
53
|
+
* above, rather than a number invented here.
|
|
54
|
+
*/
|
|
55
|
+
export const defaultNodeMeasure: Record<GraphNodeSizeKnob, GraphNodeMeasure> = {
|
|
56
|
+
small: { width: 172, minHeight: 62 },
|
|
57
|
+
medium: { width: 190, minHeight: 72 },
|
|
58
|
+
large: { width: 216, minHeight: 84 },
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Container padding in px per `space` stop.
|
|
63
|
+
*
|
|
64
|
+
* Mirrors `panelPaddingPxMap` in `resolveKnobs.ts`, which is private to that
|
|
65
|
+
* module — the resolver mirrors the same numbers for the same reason (it stays
|
|
66
|
+
* pure, so it cannot read live tokens). `graphNode.spec.ts` pins this mirror
|
|
67
|
+
* against `capContainerRadius(..., "full")`, which returns the padding px
|
|
68
|
+
* itself, so a change in the resolver fails the spec here instead of drifting.
|
|
69
|
+
*/
|
|
70
|
+
export const nodePanelPaddingPx: Record<GraphNodeSpaceKnob, number> = {
|
|
71
|
+
small: 13,
|
|
72
|
+
medium: 18,
|
|
73
|
+
large: 32,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Vertical pitch between two ports on the same node edge.
|
|
78
|
+
*
|
|
79
|
+
* Coarse pointers get the press floor itself (design §7.1 H4: two ports closer
|
|
80
|
+
* than the hit diameter would have overlapping discs and the wrong one would
|
|
81
|
+
* win). Fine pointers get 24, which is H3's fine-pointer hit diameter and is
|
|
82
|
+
* already above every painted stop (8 / 10 / 12), so the pitch never has to
|
|
83
|
+
* consult the painted ladder — that is what keeps this module independent of
|
|
84
|
+
* `handleGeometry.ts` rather than circular with it.
|
|
85
|
+
*/
|
|
86
|
+
export const FINE_PORT_PITCH = 24;
|
|
87
|
+
|
|
88
|
+
export function portSpacing(opts: { readonly coarsePointer: boolean }): number {
|
|
89
|
+
return opts.coarsePointer ? MIN_PRESS_TARGET : FINE_PORT_PITCH;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* §11 Size, GraphNode frame: `remap` to `NodeKindSpec.measure.width`.
|
|
94
|
+
*
|
|
95
|
+
* The size knob reaches the width only through the per-kind table. It never
|
|
96
|
+
* reaches the control-height recipe (`knobProps.control.height`), because a
|
|
97
|
+
* node is a container and a container that steps with a control ladder is a
|
|
98
|
+
* control wearing a frame.
|
|
99
|
+
*/
|
|
100
|
+
export function graphNodeWidth(opts: {
|
|
101
|
+
readonly size: GraphNodeSizeKnob;
|
|
102
|
+
readonly measure?: Partial<GraphNodeMeasure>;
|
|
103
|
+
}): number {
|
|
104
|
+
return opts.measure?.width ?? defaultNodeMeasure[opts.size].width;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* How many ports stack down the tallest vertical edge.
|
|
109
|
+
*
|
|
110
|
+
* Height crowding is per EDGE, not per node: `left` and `right` ports stack
|
|
111
|
+
* vertically and can collide with their own side's neighbours, never with the
|
|
112
|
+
* opposite side's. `top` / `bottom` ports stack horizontally and constrain
|
|
113
|
+
* width, so they do not enter a height floor at all.
|
|
114
|
+
*/
|
|
115
|
+
export function verticalPortCrowd(ports: readonly GraphNodePort[]): number {
|
|
116
|
+
let left = 0;
|
|
117
|
+
let right = 0;
|
|
118
|
+
for (const port of ports) {
|
|
119
|
+
if (port.side === "left") left += 1;
|
|
120
|
+
else if (port.side === "right") right += 1;
|
|
121
|
+
}
|
|
122
|
+
return Math.max(left, right);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* §7.1 H4, the floor half: a node is tall enough for every port on its
|
|
127
|
+
* busiest edge to be a real target, instead of ports silently stealing hits
|
|
128
|
+
* from each other.
|
|
129
|
+
*/
|
|
130
|
+
export function graphNodeMinHeight(opts: {
|
|
131
|
+
readonly size: GraphNodeSizeKnob;
|
|
132
|
+
readonly ports: readonly GraphNodePort[];
|
|
133
|
+
readonly portSpacingPx: number;
|
|
134
|
+
readonly measure?: Partial<GraphNodeMeasure>;
|
|
135
|
+
}): number {
|
|
136
|
+
const declared = opts.measure?.minHeight ?? defaultNodeMeasure[opts.size].minHeight;
|
|
137
|
+
return Math.max(declared, verticalPortCrowd(opts.ports) * opts.portSpacingPx);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* §11 Radius, GraphNode frame: CONTAINER-CAP. The Tamagui value to paint —
|
|
142
|
+
* the radius token while it fits inside the node's own padding, the padding px
|
|
143
|
+
* once it would not.
|
|
144
|
+
*/
|
|
145
|
+
export function graphNodeRadius(knobs: {
|
|
146
|
+
readonly borderRadius: GraphNodeRadiusKnob;
|
|
147
|
+
readonly space: GraphNodeSpaceKnob;
|
|
148
|
+
}): string | number {
|
|
149
|
+
return capContainerRadius(knobs.borderRadius, knobs.space);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Radius TOKEN → px.
|
|
154
|
+
*
|
|
155
|
+
* Mirrors `borderRadiusMap` / `radiusPxMap` in `resolveKnobs.ts`, both private
|
|
156
|
+
* to that module. Needed because `capContainerRadius` returns either a token
|
|
157
|
+
* (`"$4"`) or a px number, and a rendered node has to report ONE number.
|
|
158
|
+
* `graphNode.spec.ts` pins the whole map against the doctrine table at every
|
|
159
|
+
* stop and space, so a token that stops meaning what it says fails there.
|
|
160
|
+
*/
|
|
161
|
+
export const nodeRadiusTokenPx: Readonly<Record<string, number>> = {
|
|
162
|
+
$0: 0,
|
|
163
|
+
$2: 5,
|
|
164
|
+
$4: 9,
|
|
165
|
+
$6: 16,
|
|
166
|
+
$12: 50,
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* px for whatever `capContainerRadius` resolved to. A number is already the
|
|
171
|
+
* capped px; a token goes through the mirror above.
|
|
172
|
+
*/
|
|
173
|
+
export function containerRadiusPx(value: string | number): number {
|
|
174
|
+
if (typeof value === "number") return value;
|
|
175
|
+
const px = nodeRadiusTokenPx[value];
|
|
176
|
+
if (px === undefined) {
|
|
177
|
+
throw new Error(
|
|
178
|
+
`containerRadiusPx: "${value}" is not a radius token this module mirrors — add it to nodeRadiusTokenPx beside the resolver's borderRadiusMap`,
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
return px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The same radius in px, resolved through the DG-RAD doctrine table rather
|
|
186
|
+
* than the resolver.
|
|
187
|
+
*
|
|
188
|
+
* Two independent implementations of one law: `graphNodeRadius` goes through
|
|
189
|
+
* `capContainerRadius` (resolver), this goes through `resolveRadiusForPart`
|
|
190
|
+
* (doctrine). `graphNode.spec.ts` asserts they agree at every stop, so a
|
|
191
|
+
* doctrine/resolver drift is a failing test rather than a corner that quietly
|
|
192
|
+
* clips a child.
|
|
193
|
+
*/
|
|
194
|
+
export function graphNodeRadiusPx(knobs: {
|
|
195
|
+
readonly borderRadius: GraphNodeRadiusKnob;
|
|
196
|
+
readonly space: GraphNodeSpaceKnob;
|
|
197
|
+
}): number {
|
|
198
|
+
return resolveRadiusForPart({
|
|
199
|
+
radiusClass: "CONTAINER-CAP",
|
|
200
|
+
stop: knobs.borderRadius,
|
|
201
|
+
paddingPx: nodePanelPaddingPx[knobs.space],
|
|
202
|
+
}).px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** The complete measure a node is seeded with BEFORE first paint (design §5). */
|
|
206
|
+
export function graphNodeMeasure(opts: {
|
|
207
|
+
readonly size: GraphNodeSizeKnob;
|
|
208
|
+
readonly ports: readonly GraphNodePort[];
|
|
209
|
+
readonly portSpacingPx: number;
|
|
210
|
+
readonly measure?: Partial<GraphNodeMeasure>;
|
|
211
|
+
}): GraphNodeMeasure {
|
|
212
|
+
return {
|
|
213
|
+
width: graphNodeWidth(opts),
|
|
214
|
+
minHeight: graphNodeMinHeight(opts),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overview body: one plain box with the resolved background (design §5).
|
|
3
|
+
*
|
|
4
|
+
* At 500 nodes and zoom 0.2, a Tamagui body per node is 500 knob resolutions,
|
|
5
|
+
* 500 subtrees and 500 observer callbacks to paint something the size of a
|
|
6
|
+
* postage stamp. This is what a consumer swaps in instead, and it is also what
|
|
7
|
+
* the merged single-path edge layer will sit behind in v1.1.
|
|
8
|
+
*
|
|
9
|
+
* The load-bearing part is not the div, it is the MEASURE. Width and minimum
|
|
10
|
+
* height come from `nodeMeasure.ts` — the same recipe `GraphNode` uses, given
|
|
11
|
+
* the same knobs and the same ports — so swapping the body cannot change the
|
|
12
|
+
* node's box, and React Flow's per-node `ResizeObserver` has nothing to report.
|
|
13
|
+
* A "small grey rectangle" here would move every edge endpoint on the canvas
|
|
14
|
+
* the moment a user zoomed out, which is the failure design §5 is written
|
|
15
|
+
* against.
|
|
16
|
+
*
|
|
17
|
+
* `lod.spec.tsx` asserts the box against `GraphNode`'s rather than against a
|
|
18
|
+
* number, so the two cannot drift.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
22
|
+
import { YStack } from "tamagui";
|
|
23
|
+
import type { GraphNodeMeasure, GraphNodePort, GraphNodeSizeKnob } from "./nodeMeasure";
|
|
24
|
+
import { graphNodeMinHeight, graphNodeWidth, portSpacing } from "./nodeMeasure";
|
|
25
|
+
|
|
26
|
+
export interface OverviewNodeProps {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/** Same ports the detail body would render. They set the height floor. */
|
|
29
|
+
readonly ports?: readonly GraphNodePort[];
|
|
30
|
+
/** Semantic intent — reaches the resolver, never a colour prop. */
|
|
31
|
+
readonly intent?: string;
|
|
32
|
+
readonly selected?: boolean;
|
|
33
|
+
/** `NodeKindSpec.measure`; falls back to the per-kind default table. */
|
|
34
|
+
readonly measure?: Partial<GraphNodeMeasure>;
|
|
35
|
+
/** true on a touch surface — widens the port pitch, raising the floor. */
|
|
36
|
+
readonly coarsePointer?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function OverviewNode({
|
|
40
|
+
id,
|
|
41
|
+
ports,
|
|
42
|
+
intent,
|
|
43
|
+
selected = false,
|
|
44
|
+
measure,
|
|
45
|
+
coarsePointer = false,
|
|
46
|
+
}: OverviewNodeProps) {
|
|
47
|
+
// The same resolver call the detail body makes, so the fill is the fill the
|
|
48
|
+
// user was just looking at rather than a second grey invented here.
|
|
49
|
+
const { knobProps } = useResolvedKnobs({ component: "GraphNode", intent });
|
|
50
|
+
const size = knobProps.size as GraphNodeSizeKnob;
|
|
51
|
+
const portSpacingPx = portSpacing({ coarsePointer });
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<YStack
|
|
55
|
+
data-graph-node={id}
|
|
56
|
+
data-graph-node-render-mode="overview"
|
|
57
|
+
data-graph-node-overview=""
|
|
58
|
+
data-graph-node-width={String(graphNodeWidth({ size, measure }))}
|
|
59
|
+
{...knobProps.surface}
|
|
60
|
+
{...knobProps.containerRadius}
|
|
61
|
+
width={graphNodeWidth({ size, measure })}
|
|
62
|
+
minHeight={graphNodeMinHeight({ size, ports: ports ?? [], portSpacingPx, measure })}
|
|
63
|
+
position="relative"
|
|
64
|
+
// §7.1 H6, and it matters more here, not less: the ports are still
|
|
65
|
+
// mounted on the node in overview mode, so a clipping frame would eat
|
|
66
|
+
// them exactly as it would in detail.
|
|
67
|
+
overflow="visible"
|
|
68
|
+
opacity={selected ? 1 : 0.9}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The package's own shape is load-bearing, so it is specced like code.
|
|
3
|
+
*
|
|
4
|
+
* Three of these four assertions are about a resolver nobody can see failing
|
|
5
|
+
* until a bundle breaks: Metro picks the FIRST condition it recognises and
|
|
6
|
+
* never reconsiders `source` or `default` (MPO-185), and `./dom` has to stay
|
|
7
|
+
* pinned to source on every condition because storybook-expo's
|
|
8
|
+
* `resolveWorkspaceNativeMain` prefers `dist/esm/index.native.js` whenever it
|
|
9
|
+
* exists and a compiled copy would shadow the `'use dom'` directive.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { existsSync } from "node:fs";
|
|
13
|
+
import { readFile } from "node:fs/promises";
|
|
14
|
+
import path from "node:path";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
16
|
+
import { beforeAll, describe, expect, it } from "vitest";
|
|
17
|
+
|
|
18
|
+
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
19
|
+
|
|
20
|
+
/** What Metro's file-based fallback accepts at `<pkg>/<subpath>` (lint.mjs:873). */
|
|
21
|
+
const metroFallbackExtensions = ["ts", "tsx", "js", "jsx", "mjs", "cjs"];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The condition names Metro matches per platform when
|
|
25
|
+
* `resolver.unstable_enablePackageExports` is on (lint.mjs:868). Neither
|
|
26
|
+
* `source` nor `types` is ever in the set.
|
|
27
|
+
*/
|
|
28
|
+
const metroPlatformConditions = {
|
|
29
|
+
ios: new Set(["react-native", "import", "require", "default"]),
|
|
30
|
+
web: new Set(["browser", "import", "require", "default"]),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type ExportTarget = string | { [condition: string]: ExportTarget } | ExportTarget[];
|
|
34
|
+
|
|
35
|
+
interface PackageJson {
|
|
36
|
+
readonly dependencies?: Record<string, string>;
|
|
37
|
+
readonly devDependencies?: Record<string, string>;
|
|
38
|
+
readonly exports: Record<string, ExportTarget>;
|
|
39
|
+
readonly peerDependencies?: Record<string, string>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let pkg: PackageJson;
|
|
43
|
+
|
|
44
|
+
beforeAll(async () => {
|
|
45
|
+
pkg = JSON.parse(await readFile(path.join(packageRoot, "package.json"), "utf8")) as PackageJson;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/** Every leaf string in an exports entry, whatever the condition nesting. */
|
|
49
|
+
function targetLeaves(target: ExportTarget): string[] {
|
|
50
|
+
if (typeof target === "string") return [target];
|
|
51
|
+
if (Array.isArray(target)) return target.flatMap(targetLeaves);
|
|
52
|
+
return Object.values(target).flatMap(targetLeaves);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function declaresSourceCondition(target: ExportTarget): boolean {
|
|
56
|
+
if (typeof target === "string") return false;
|
|
57
|
+
if (Array.isArray(target)) return target.some(declaresSourceCondition);
|
|
58
|
+
return Object.entries(target).some(
|
|
59
|
+
([condition, value]) => condition === "source" || declaresSourceCondition(value),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** The first target Metro would pick for one condition set, in declaration order. */
|
|
64
|
+
function metroExportTarget(target: ExportTarget, conditions: Set<string>): string | null {
|
|
65
|
+
if (typeof target === "string") return target;
|
|
66
|
+
if (Array.isArray(target)) {
|
|
67
|
+
for (const item of target) {
|
|
68
|
+
const hit = metroExportTarget(item, conditions);
|
|
69
|
+
if (hit) return hit;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
for (const [condition, value] of Object.entries(target)) {
|
|
74
|
+
if (!conditions.has(condition)) continue;
|
|
75
|
+
const hit = metroExportTarget(value, conditions);
|
|
76
|
+
if (hit) return hit;
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function hasMetroFallback(subpath: string): boolean {
|
|
82
|
+
const base = path.join(packageRoot, subpath.replace(/^\.\//, ""));
|
|
83
|
+
if (metroFallbackExtensions.some((ext) => existsSync(`${base}.${ext}`))) return true;
|
|
84
|
+
if (existsSync(path.join(base, "package.json"))) return true;
|
|
85
|
+
return metroFallbackExtensions.some((ext) => existsSync(path.join(base, `index.${ext}`)));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
describe("package shape", () => {
|
|
89
|
+
it('exports["."] declares a source condition', () => {
|
|
90
|
+
expect(declaresSourceCondition(pkg.exports["."])).toBe(true);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("declares the model, dom, dom-inner, demo and metro subpaths", () => {
|
|
94
|
+
expect(Object.keys(pkg.exports)).toEqual(
|
|
95
|
+
expect.arrayContaining(["./model", "./dom", "./dom-inner", "./demo", "./metro"]),
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* `./dom-inner` is what an APP's `'use dom'` entry imports (design §9.3), so
|
|
101
|
+
* it lives under the same pin as `./dom`: every runtime condition on source.
|
|
102
|
+
*/
|
|
103
|
+
/**
|
|
104
|
+
* `./demo` is pinned to source too, and for a reason neither of the others
|
|
105
|
+
* has: it must be the SAME MODULE INSTANCE the canvas's inner tree imports.
|
|
106
|
+
* An app's `'use dom'` entry supplies the schema by value, and a schema built
|
|
107
|
+
* from `dist/` would carry a second copy of `GraphNode` and `GraphPort` —
|
|
108
|
+
* Tamagui `styled()` components from a different build, rendering inside a
|
|
109
|
+
* provider from this one. One bundle, two node implementations.
|
|
110
|
+
*/
|
|
111
|
+
it("resolves ./dom, ./dom-inner and ./demo to a path under src/ on every condition", () => {
|
|
112
|
+
for (const subpath of ["./dom", "./dom-inner", "./demo"]) {
|
|
113
|
+
const leaves = targetLeaves(pkg.exports[subpath]);
|
|
114
|
+
expect(leaves.length, subpath).toBeGreaterThan(0);
|
|
115
|
+
for (const leaf of leaves) {
|
|
116
|
+
// `types` may point at the emitted declaration; every runtime condition
|
|
117
|
+
// must stay on source, or the "use dom" directive has to survive esbuild
|
|
118
|
+
// and nobody has proven it does.
|
|
119
|
+
if (leaf.startsWith("./types/")) continue;
|
|
120
|
+
expect(leaf, subpath).toMatch(/^\.\/src\//);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it("keeps @multiplatform.one/components an optional peer, never a dependency", () => {
|
|
126
|
+
expect(pkg.peerDependencies?.["@multiplatform.one/components"]).toBeDefined();
|
|
127
|
+
expect(pkg.dependencies?.["@multiplatform.one/components"]).toBeUndefined();
|
|
128
|
+
expect(pkg.devDependencies?.["@multiplatform.one/components"]).toBeUndefined();
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it("gives every dist-resolving subpath a Metro file fallback", () => {
|
|
132
|
+
const missing: string[] = [];
|
|
133
|
+
for (const [subpath, target] of Object.entries(pkg.exports)) {
|
|
134
|
+
if (subpath === "." || !subpath.startsWith("./") || subpath.includes("*")) continue;
|
|
135
|
+
if (hasMetroFallback(subpath)) continue;
|
|
136
|
+
for (const [platform, conditions] of Object.entries(metroPlatformConditions)) {
|
|
137
|
+
const resolved = metroExportTarget(target, conditions);
|
|
138
|
+
if (!resolved?.startsWith("./dist/")) continue;
|
|
139
|
+
missing.push(`"${subpath}" resolves to ${resolved} on ${platform}, which is never built`);
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
expect(missing).toEqual([]);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task 3.5, the rendered half.
|
|
3
|
+
*
|
|
4
|
+
* The decision — which candidate is worth naming — is a pure function and is
|
|
5
|
+
* asserted as one. What is left for a render is the two things a pure function
|
|
6
|
+
* cannot say: that the puck reads REACT FLOW'S OWN connection state rather
|
|
7
|
+
* than a shape we invented, and that it does not ride the pan/zoom matrix.
|
|
8
|
+
*
|
|
9
|
+
* So the connection is driven through the real store (`useStoreApi`), not a
|
|
10
|
+
* mocked `useStore`. A mock would assert that our selector agrees with our
|
|
11
|
+
* mock, which is the failure mode this file exists to avoid: the puck's whole
|
|
12
|
+
* job is to be right about a library's state.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { Preset, Surface } from "@multiplatform.one/theme";
|
|
16
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
17
|
+
import { cleanup } from "@testing-library/react";
|
|
18
|
+
import { useEffect } from "react";
|
|
19
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
20
|
+
import type { PortRef } from "../model/index";
|
|
21
|
+
import { ConnectionPuck, connectionPuckLabel } from "./ConnectionPuck";
|
|
22
|
+
import { demoGraphSchema } from "./demoNodeBody";
|
|
23
|
+
import { demoDocument } from "./fixtures";
|
|
24
|
+
import { NodeGraphWeb } from "./NodeGraphWeb";
|
|
25
|
+
import { useStoreApi } from "./xy";
|
|
26
|
+
|
|
27
|
+
afterEach(cleanup);
|
|
28
|
+
|
|
29
|
+
const doc = demoDocument;
|
|
30
|
+
const schema = demoGraphSchema;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The demo fixture, in the terms this file needs:
|
|
34
|
+
* a (source) -- rows --> b (transform) -- ok / err --> c (sink)
|
|
35
|
+
* and `a.rows -> b.in` ALREADY EXISTS, which is what makes `b.in` a duplicate
|
|
36
|
+
* and therefore the illegal candidate every case below leans on.
|
|
37
|
+
*/
|
|
38
|
+
const fromA: PortRef = { node: "a", port: "rows" };
|
|
39
|
+
|
|
40
|
+
describe("connectionPuckLabel", () => {
|
|
41
|
+
const base = { document: doc(), schema: schema() };
|
|
42
|
+
|
|
43
|
+
it("is null when no connection is in progress", () => {
|
|
44
|
+
expect(connectionPuckLabel({ ...base, source: null, candidate: null })).toBeNull();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("names the candidate node and port when the candidate is legal", () => {
|
|
48
|
+
const label = connectionPuckLabel({
|
|
49
|
+
...base,
|
|
50
|
+
source: fromA,
|
|
51
|
+
candidate: { node: "c", port: "in" },
|
|
52
|
+
});
|
|
53
|
+
expect(label).toMatchObject({ legal: true, target: "c:in" });
|
|
54
|
+
expect(label?.text).toContain("c");
|
|
55
|
+
// The PORT's label, not its id, when the schema gives it one.
|
|
56
|
+
expect(label?.text).toContain("rows");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("falls back to naming the source when the candidate is refused", () => {
|
|
60
|
+
// `a.rows -> b.in` is already in the document, so it is a duplicate.
|
|
61
|
+
const label = connectionPuckLabel({
|
|
62
|
+
...base,
|
|
63
|
+
source: fromA,
|
|
64
|
+
candidate: { node: "b", port: "in" },
|
|
65
|
+
});
|
|
66
|
+
expect(label).toMatchObject({ legal: false, target: "" });
|
|
67
|
+
expect(label?.text).toContain("from");
|
|
68
|
+
expect(label?.text).toContain("a");
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("falls back the same way over open canvas, with no candidate at all", () => {
|
|
72
|
+
const label = connectionPuckLabel({ ...base, source: fromA, candidate: null });
|
|
73
|
+
expect(label).toMatchObject({ legal: false, target: "" });
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("uses a consumer's node name when one is supplied", () => {
|
|
77
|
+
const label = connectionPuckLabel({
|
|
78
|
+
...base,
|
|
79
|
+
source: fromA,
|
|
80
|
+
candidate: { node: "c", port: "in" },
|
|
81
|
+
nodeLabel: (id) => (id === "c" ? "Warehouse" : undefined),
|
|
82
|
+
});
|
|
83
|
+
expect(label?.text).toContain("Warehouse");
|
|
84
|
+
expect(label?.text).not.toContain("c /");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("falls back to the port id when the schema declares no label", () => {
|
|
88
|
+
const label = connectionPuckLabel({
|
|
89
|
+
...base,
|
|
90
|
+
source: fromA,
|
|
91
|
+
candidate: { node: "nope", port: "mystery" },
|
|
92
|
+
});
|
|
93
|
+
// An unresolvable candidate is not legal, so the SOURCE is named — and the
|
|
94
|
+
// source resolves, so this is still a real name rather than an id soup.
|
|
95
|
+
expect(label?.legal).toBe(false);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Drives React Flow's own connection state, then reads what the puck did.
|
|
101
|
+
*
|
|
102
|
+
* `fromHandle` / `toHandle` carry more fields on a real drag; the puck reads
|
|
103
|
+
* `nodeId` and `id`, and constructing a full `Handle` would be theatre.
|
|
104
|
+
*/
|
|
105
|
+
function DriveConnection({ to }: { to: { nodeId: string; id: string } | null }) {
|
|
106
|
+
const store = useStoreApi();
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
store.setState({
|
|
109
|
+
connection: {
|
|
110
|
+
inProgress: true,
|
|
111
|
+
isValid: null,
|
|
112
|
+
from: { x: 0, y: 0 },
|
|
113
|
+
to: { x: 0, y: 0 },
|
|
114
|
+
fromPosition: "right",
|
|
115
|
+
toPosition: "left",
|
|
116
|
+
fromNode: null,
|
|
117
|
+
toNode: null,
|
|
118
|
+
fromHandle: { nodeId: "a", id: "rows", type: "source" },
|
|
119
|
+
toHandle: to ? { ...to, type: "target" } : null,
|
|
120
|
+
},
|
|
121
|
+
} as never);
|
|
122
|
+
}, [store, to]);
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The canvas mounts its OWN puck (`connectionPuck` defaults to true), so this
|
|
128
|
+
* adds only the driver. Rendering a second `<ConnectionPuck>` as a child is
|
|
129
|
+
* what the "exactly one div" case below refuses, and it caught precisely that
|
|
130
|
+
* mistake in this file before the case was written down.
|
|
131
|
+
*/
|
|
132
|
+
function mountWithConnection(to: { nodeId: string; id: string } | null) {
|
|
133
|
+
return renderWithProviders(
|
|
134
|
+
<Preset cascade={false}>
|
|
135
|
+
<Surface size="medium" density="comfortable">
|
|
136
|
+
<NodeGraphWeb schema={schema()} defaultDocument={doc()}>
|
|
137
|
+
<DriveConnection to={to} />
|
|
138
|
+
</NodeGraphWeb>
|
|
139
|
+
</Surface>
|
|
140
|
+
</Preset>,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function puckOf(container: HTMLElement): HTMLElement | null {
|
|
145
|
+
return container.querySelector("[data-graph-connection-puck]");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
describe("the puck reads React Flow's own connection state", () => {
|
|
149
|
+
it("renders nothing while no connection is in progress", () => {
|
|
150
|
+
const { container } = renderWithProviders(
|
|
151
|
+
<Preset cascade={false}>
|
|
152
|
+
<Surface size="medium" density="comfortable">
|
|
153
|
+
<NodeGraphWeb schema={schema()} defaultDocument={doc()} />
|
|
154
|
+
</Surface>
|
|
155
|
+
</Preset>,
|
|
156
|
+
);
|
|
157
|
+
expect(puckOf(container)).toBeNull();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it("names the legal candidate the store snapped to", () => {
|
|
161
|
+
const { container } = mountWithConnection({ nodeId: "c", id: "in" });
|
|
162
|
+
const puck = puckOf(container);
|
|
163
|
+
expect(puck).not.toBeNull();
|
|
164
|
+
expect(puck?.getAttribute("data-graph-puck-legal")).toBe("true");
|
|
165
|
+
expect(puck?.getAttribute("data-graph-puck-target")).toBe("c:in");
|
|
166
|
+
expect(puck?.textContent).toContain("c");
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it("refuses to name a candidate the rules reject, even though React Flow snapped to it", () => {
|
|
170
|
+
// The magnetic case, and the reason the filter exists: `connectionRadius`
|
|
171
|
+
// is the 44 px hit diameter, so a finger 20 px off a duplicate port still
|
|
172
|
+
// snaps to it. The puck must not promise what the drop will refuse.
|
|
173
|
+
const { container } = mountWithConnection({ nodeId: "b", id: "in" });
|
|
174
|
+
const puck = puckOf(container);
|
|
175
|
+
expect(puck?.getAttribute("data-graph-puck-legal")).toBe("false");
|
|
176
|
+
expect(puck?.getAttribute("data-graph-puck-target")).toBe("");
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it("is exactly ONE div, however many ports the graph has", () => {
|
|
180
|
+
const { container } = mountWithConnection({ nodeId: "c", id: "in" });
|
|
181
|
+
expect(container.querySelectorAll("[data-graph-connection-puck]")).toHaveLength(1);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("can be turned off, for a consumer that draws its own", () => {
|
|
185
|
+
const { container } = renderWithProviders(
|
|
186
|
+
<Preset cascade={false}>
|
|
187
|
+
<Surface size="medium" density="comfortable">
|
|
188
|
+
<NodeGraphWeb schema={schema()} defaultDocument={doc()} connectionPuck={false}>
|
|
189
|
+
<DriveConnection to={{ nodeId: "c", id: "in" }} />
|
|
190
|
+
</NodeGraphWeb>
|
|
191
|
+
</Surface>
|
|
192
|
+
</Preset>,
|
|
193
|
+
);
|
|
194
|
+
expect(puckOf(container)).toBeNull();
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("mounted a second time renders a second div — which is why the canvas owns it", () => {
|
|
198
|
+
const { container } = renderWithProviders(
|
|
199
|
+
<Preset cascade={false}>
|
|
200
|
+
<Surface size="medium" density="comfortable">
|
|
201
|
+
<NodeGraphWeb schema={schema()} defaultDocument={doc()} connectionPuck={false}>
|
|
202
|
+
<DriveConnection to={{ nodeId: "c", id: "in" }} />
|
|
203
|
+
<ConnectionPuck document={doc()} schema={schema()} />
|
|
204
|
+
</NodeGraphWeb>
|
|
205
|
+
</Surface>
|
|
206
|
+
</Preset>,
|
|
207
|
+
);
|
|
208
|
+
expect(container.querySelectorAll("[data-graph-connection-puck]")).toHaveLength(1);
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Counter-scaled, measured rather than claimed.
|
|
214
|
+
*
|
|
215
|
+
* happy-dom lays nothing out, so a `getBoundingClientRect` here is zeros and
|
|
216
|
+
* would pass whatever the puck did. What IS observable is placement: React
|
|
217
|
+
* Flow's children are siblings of `.react-flow__viewport`, and only the
|
|
218
|
+
* viewport carries the pan/zoom matrix. An element outside it cannot scale
|
|
219
|
+
* with the graph, and an element inside it cannot help but. So the assertion
|
|
220
|
+
* is the DOM relationship, which is the mechanism, not the symptom. The
|
|
221
|
+
* symptom — the puck staying the same physical size through a pinch — is the
|
|
222
|
+
* device arm's, and it is recorded as pending.
|
|
223
|
+
*/
|
|
224
|
+
describe("the puck does not ride the pan/zoom matrix", () => {
|
|
225
|
+
it("renders outside .react-flow__viewport", () => {
|
|
226
|
+
const { container } = mountWithConnection({ nodeId: "c", id: "in" });
|
|
227
|
+
const puck = puckOf(container);
|
|
228
|
+
expect(puck).not.toBeNull();
|
|
229
|
+
expect(puck?.closest(".react-flow__viewport")).toBeNull();
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
it("still renders inside the canvas root, so it moves with the graph's box", () => {
|
|
233
|
+
const { container } = mountWithConnection({ nodeId: "c", id: "in" });
|
|
234
|
+
expect(puckOf(container)?.closest(".react-flow")).not.toBeNull();
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it("applies no scale of its own — a 1/zoom here would shrink it when zooming IN", () => {
|
|
238
|
+
const { container } = mountWithConnection({ nodeId: "c", id: "in" });
|
|
239
|
+
const transform = puckOf(container)?.style.transform ?? "";
|
|
240
|
+
expect(transform).not.toContain("scale");
|
|
241
|
+
});
|
|
242
|
+
});
|