@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,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM SHELL — everything a `'use dom'` entry needs except the directive.
|
|
3
|
+
*
|
|
4
|
+
* Exported at `@multiplatform.one/node-graph/dom-inner`, source-resolved on
|
|
5
|
+
* every condition, because the entry itself is APP-OWNED (design §9.3). A
|
|
6
|
+
* schema's `render` is a component and a Tamagui config is a live object, so
|
|
7
|
+
* neither can be JSON and neither can cross the bridge: both have to come from
|
|
8
|
+
* a module the DOM BUNDLE imports, and a DOM bundle is rooted at the file
|
|
9
|
+
* carrying `'use dom'`. The package cannot own that file any more than it can
|
|
10
|
+
* own the schema registry, so it owns everything else and the app writes three
|
|
11
|
+
* lines around it.
|
|
12
|
+
*
|
|
13
|
+
* This file exists to be BORING. Design 9.4's third layer: a blank WebView is
|
|
14
|
+
* what a parse error looks like from the outside, and a parse error in a
|
|
15
|
+
* top-level dependency happens before any error boundary exists. So the shell
|
|
16
|
+
* imports nothing of ours at the top, stamps how far boot got on a global as
|
|
17
|
+
* early as the module body allows, and only then reaches for the real tree
|
|
18
|
+
* through a dynamic `import()` inside a try/catch. Under Metro that becomes a
|
|
19
|
+
* `require`, so a module-eval throw is catchable and reportable instead of
|
|
20
|
+
* fatal.
|
|
21
|
+
*
|
|
22
|
+
* Two consequences worth naming, because both look like mistakes:
|
|
23
|
+
*
|
|
24
|
+
* - It is a `.ts` with `createElement`, not a `.tsx`. The automatic JSX
|
|
25
|
+
* runtime injects a top-level `import { jsx } from "react/jsx-runtime"`, so
|
|
26
|
+
* "no top-level import" is not literally achievable in a `.tsx`, and the
|
|
27
|
+
* honest version of the invariant is "no top-level import of anything that
|
|
28
|
+
* can throw".
|
|
29
|
+
* - The boot stamp is written INLINE rather than through `boot.ts`, which
|
|
30
|
+
* already has a function for it. Importing that function would be a
|
|
31
|
+
* top-level import of ours. `boot.ts` exports `bootGlobalKey` and
|
|
32
|
+
* `domEntry.spec.ts` asserts this file names the same slot, so the
|
|
33
|
+
* duplication cannot drift.
|
|
34
|
+
*
|
|
35
|
+
* The imperative handle lives HERE rather than in the inner tree, so
|
|
36
|
+
* `ref.current.fitView()` after a failed boot is a no-op that reports, not a
|
|
37
|
+
* `TypeError` on a canvas that never mounted. The inner tree registers the
|
|
38
|
+
* real implementations into `commands` when it mounts.
|
|
39
|
+
*
|
|
40
|
+
* WHAT THE APP'S ENTRY ADDS, and why it cannot be here (measured on the
|
|
41
|
+
* iPhone 16e simulator and on emulator-5592 at task 2.7/2.8): `getConfig()`
|
|
42
|
+
* threw inside the DOM bundle because `createThemeConfig` is a FACTORY the app
|
|
43
|
+
* calls and nothing in `public/node-graph`'s import graph calls it, so the
|
|
44
|
+
* canvas mounted with no `TamaguiProvider` and the first Tamagui component
|
|
45
|
+
* threw `Missing theme.` on both platforms. `config` is now a prop, and the
|
|
46
|
+
* one place it can come from is a static import in the app's own entry.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
import { Component, createElement, useEffect, useMemo, useRef, useState } from "react";
|
|
50
|
+
import { useDOMImperativeHandle } from "expo/dom";
|
|
51
|
+
import type { ComponentType, ErrorInfo, ReactNode, Ref } from "react";
|
|
52
|
+
import type { DOMImperativeFactory, DOMProps } from "expo/dom";
|
|
53
|
+
import type { TamaguiInternalConfig } from "@tamagui/web";
|
|
54
|
+
import type { EdgeKindDefs, GraphSchema, NodeKindDefs } from "../model/index";
|
|
55
|
+
import type { GraphCommandSlot, GraphCommands, NodeGraphHandle } from "../react-flow/graphHandle";
|
|
56
|
+
import type { FontFaceWire, GraphEventWire } from "./wire";
|
|
57
|
+
|
|
58
|
+
// The heartbeat's first beat. Before this line the only things that have run
|
|
59
|
+
// are `react` and `expo/dom`, both of which are present by construction inside
|
|
60
|
+
// a DOM bundle.
|
|
61
|
+
//
|
|
62
|
+
// `startedAt` is stamped here and only here: every later stage carries it
|
|
63
|
+
// forward, so `at - startedAt` is how long boot took. That elapsed number is
|
|
64
|
+
// what the native watchdog's budget is set from, and before MPO-211 there was
|
|
65
|
+
// none — design 9.4's 4000 ms was a guess, and on emulator-5590 rebooted
|
|
66
|
+
// fresh it was the wrong guess.
|
|
67
|
+
const bootAt = Date.now();
|
|
68
|
+
(globalThis as unknown as Record<string, unknown>).__mp_graph_boot = {
|
|
69
|
+
stage: "script",
|
|
70
|
+
at: bootAt,
|
|
71
|
+
startedAt: bootAt,
|
|
72
|
+
history: ["script"],
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The canvas options that are not knobs. JSON because they cross the bridge;
|
|
77
|
+
* every field optional because a host that sets none should still get the
|
|
78
|
+
* package's measured defaults, which live in `NodeGraphDomInner`.
|
|
79
|
+
*/
|
|
80
|
+
export interface NodeGraphDomOptions {
|
|
81
|
+
readonly readOnly?: boolean;
|
|
82
|
+
/** Touch surface: widens the port pitch and makes fields display-only. */
|
|
83
|
+
readonly coarsePointer?: boolean;
|
|
84
|
+
readonly onlyRenderVisibleElements?: boolean;
|
|
85
|
+
readonly fitView?: boolean;
|
|
86
|
+
readonly overviewZoom?: number;
|
|
87
|
+
/** Drop nodes and edges the schema does not know instead of refusing the document. */
|
|
88
|
+
readonly dropUnknownKinds?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Arms design §7.3's long press INSIDE the WebView (milestone 6).
|
|
91
|
+
*
|
|
92
|
+
* A boolean and not a hook, because it has to cross the bridge. The gesture
|
|
93
|
+
* needs `.react-flow__pane`, which exists only in the DOM realm — the story
|
|
94
|
+
* that wired the interceptor to a HOST-tree ref could not mount on native at
|
|
95
|
+
* all (`View config getter callback for component 'div'`), and would not have
|
|
96
|
+
* reached the right element if it had.
|
|
97
|
+
*
|
|
98
|
+
* Arm / select / cancel come back as `{ t: "lasso" }` on the wire, with a
|
|
99
|
+
* haptic HINT on `arm`: a WebView cannot buzz and whether a buzz is right is
|
|
100
|
+
* the shell's call.
|
|
101
|
+
*/
|
|
102
|
+
readonly longPressLasso?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* `pan` or `select`, design §7.3 — the toolbar's mode, crossing the bridge.
|
|
105
|
+
*
|
|
106
|
+
* It is a prop on `NodeGraphWeb` and was never in this options object, so on
|
|
107
|
+
* native the toolbar flipped its own label and the canvas never heard. MPO-212
|
|
108
|
+
* recorded the mode flip as proven on device from the READOUT; what a 190 pt
|
|
109
|
+
* drag then failed to do in select mode was therefore unexplained. It is
|
|
110
|
+
* explained: `panOnDrag` inside the WebView stayed `true`.
|
|
111
|
+
*/
|
|
112
|
+
readonly interactionMode?: "pan" | "select";
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface NodeGraphDomProps {
|
|
116
|
+
/**
|
|
117
|
+
* The serialized document. A STRING on purpose: one `JSON.parse` inside
|
|
118
|
+
* beats structured prop walking across the marshaller, and an identity check
|
|
119
|
+
* becomes a string compare.
|
|
120
|
+
*/
|
|
121
|
+
readonly documentJson: string;
|
|
122
|
+
/** Monotonic, stamped by the host. See the echo gate in `wire.ts`. */
|
|
123
|
+
readonly rev: number;
|
|
124
|
+
readonly envelopeJson: string;
|
|
125
|
+
/** The schema is looked up by id: a `render` is a component and cannot be JSON. */
|
|
126
|
+
readonly schemaId: string;
|
|
127
|
+
readonly optionsJson: string;
|
|
128
|
+
readonly extraFaces?: readonly FontFaceWire[];
|
|
129
|
+
/** ONE channel. Adding an event never changes the bridge surface. */
|
|
130
|
+
readonly onEvent: (eventJson: string) => Promise<void>;
|
|
131
|
+
readonly dom?: DOMProps;
|
|
132
|
+
readonly ref?: Ref<NodeGraphDomHandle>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Design §9.1's handle, DEFINED in `react-flow/graphHandle.ts` and re-exported
|
|
137
|
+
* here under its bridge name.
|
|
138
|
+
*
|
|
139
|
+
* It moved in milestone 6 because `NodeGraphWeb` now publishes the SAME handle
|
|
140
|
+
* through `graphRef` — one command surface on both platforms, so a story writes
|
|
141
|
+
* one toolbar — and a web build must not take an edge, even an erased one, to a
|
|
142
|
+
* module whose first import is `expo/dom`. The names here are unchanged, so
|
|
143
|
+
* `@multiplatform.one/node-graph/dom-inner` still exports exactly what it did.
|
|
144
|
+
*/
|
|
145
|
+
export type { GraphCommandSlot, GraphCommands, NodeGraphHandle } from "../react-flow/graphHandle";
|
|
146
|
+
export type NodeGraphDomHandle = NodeGraphHandle;
|
|
147
|
+
/** What the inner tree registers once React Flow is mounted and reachable. */
|
|
148
|
+
export type GraphDomCommands = GraphCommands;
|
|
149
|
+
export type GraphDomCommandSlot = GraphCommandSlot;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* What the APP's `'use dom'` entry supplies on top of the bridge props: the two
|
|
153
|
+
* things that are live objects rather than JSON, so the two things that can
|
|
154
|
+
* only arrive from a module the DOM bundle itself imports.
|
|
155
|
+
*/
|
|
156
|
+
export interface NodeGraphDomRealmProps<
|
|
157
|
+
N extends NodeKindDefs = NodeKindDefs,
|
|
158
|
+
E extends EdgeKindDefs = EdgeKindDefs,
|
|
159
|
+
> {
|
|
160
|
+
/**
|
|
161
|
+
* The app's `createTamagui` result. Without it `getConfig()` throws inside
|
|
162
|
+
* the WebView and the first Tamagui component dies with `Missing theme.` —
|
|
163
|
+
* which is exactly what milestone 2 died of before this prop existed.
|
|
164
|
+
*/
|
|
165
|
+
readonly config?: TamaguiInternalConfig;
|
|
166
|
+
/**
|
|
167
|
+
* The schema BY VALUE, for the common app that has ONE.
|
|
168
|
+
*
|
|
169
|
+
* Kept beside `schemas` rather than folded into it: one schema is the common
|
|
170
|
+
* case, and making every consumer write a single-element array to say so
|
|
171
|
+
* would be ceremony charged to the majority.
|
|
172
|
+
*/
|
|
173
|
+
readonly schema?: GraphSchema<N, E>;
|
|
174
|
+
/**
|
|
175
|
+
* Every schema this entry can render, looked up BY ID (milestone 6 device
|
|
176
|
+
* pass).
|
|
177
|
+
*
|
|
178
|
+
* A `render` is a `ComponentType`: it cannot be JSON, so it cannot cross the
|
|
179
|
+
* bridge, and the only string that does is `schemaId`. An entry that could
|
|
180
|
+
* supply exactly one schema was therefore an app that could show exactly one
|
|
181
|
+
* kind of canvas on device — measured on the iPhone 16e, where
|
|
182
|
+
* `NodeGraph/Perf200` → `Control` reported
|
|
183
|
+
* `render: no graph schema registered as "node-graph-demo-control"` and
|
|
184
|
+
* painted nothing, which left design §13.2's mandated plain-div control
|
|
185
|
+
* condition unmeasurable on every device.
|
|
186
|
+
*
|
|
187
|
+
* The inner tree builds an id-keyed registry out of this list and looks the
|
|
188
|
+
* inbound `schemaId` up in it. A schema whose id does not match is NEVER
|
|
189
|
+
* substituted: a silent substitution renders the wrong nodes instead of
|
|
190
|
+
* reporting anything, which is worse than a fallback that says what is
|
|
191
|
+
* missing. An app that would rather not thread a prop calls
|
|
192
|
+
* `registerGraphSchema` in a module its entry imports; the inner tree prefers
|
|
193
|
+
* that registry, so the two mechanisms compose rather than compete.
|
|
194
|
+
*/
|
|
195
|
+
readonly schemas?: readonly GraphSchema<N, E>[];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface NodeGraphDomShellProps<
|
|
199
|
+
N extends NodeKindDefs = NodeKindDefs,
|
|
200
|
+
E extends EdgeKindDefs = EdgeKindDefs,
|
|
201
|
+
>
|
|
202
|
+
extends NodeGraphDomProps, NodeGraphDomRealmProps<N, E> {}
|
|
203
|
+
|
|
204
|
+
export interface NodeGraphDomInnerProps extends NodeGraphDomProps {
|
|
205
|
+
readonly commands: GraphDomCommandSlot;
|
|
206
|
+
readonly config?: TamaguiInternalConfig;
|
|
207
|
+
/** Erased at this boundary exactly as `registerGraphSchema` erases it. */
|
|
208
|
+
readonly schema?: GraphSchema<never, never>;
|
|
209
|
+
/** The same erasure, for the id-keyed list. */
|
|
210
|
+
readonly schemas?: readonly GraphSchema<never, never>[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
type InnerModule = { readonly NodeGraphDomInner: ComponentType<NodeGraphDomInnerProps> };
|
|
214
|
+
|
|
215
|
+
function messageOf(error: unknown): string {
|
|
216
|
+
return error instanceof Error ? error.message : String(error);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface BoundaryProps {
|
|
220
|
+
readonly report: (event: GraphEventWire) => void;
|
|
221
|
+
readonly children?: ReactNode;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Design 9.4 layer 5's error boundary, and it is the only layer that can say
|
|
226
|
+
* WHAT went wrong.
|
|
227
|
+
*
|
|
228
|
+
* Measured on the iPhone 16e simulator: a render throw inside the canvas
|
|
229
|
+
* reached `window.onerror`, which reported the message `"Script error."` and
|
|
230
|
+
* nothing else. That is not a bug in the handler — a browser sanitises
|
|
231
|
+
* `onerror` to exactly that string when the throw came from a script loaded
|
|
232
|
+
* from a different origin than the document, and an Expo DOM component's
|
|
233
|
+
* `<script src>` is precisely that. So the host saw `phase: "runtime"`, kept
|
|
234
|
+
* the canvas (correctly, a runtime error is not fatal), the watchdog fired
|
|
235
|
+
* four seconds later, and the failure had no description anywhere.
|
|
236
|
+
*
|
|
237
|
+
* React hands the boundary the real Error object, so this one does. It lives
|
|
238
|
+
* in the ENTRY rather than the inner tree because the throw it exists to catch
|
|
239
|
+
* is the inner tree's own render, and a boundary inside the thing that throws
|
|
240
|
+
* catches nothing. A class component and `createElement`, importing only
|
|
241
|
+
* `react`, so the entry's "no top-level import of anything that can throw"
|
|
242
|
+
* invariant still holds.
|
|
243
|
+
*/
|
|
244
|
+
class GraphRenderBoundary extends Component<BoundaryProps, { message: string | null }> {
|
|
245
|
+
state: { message: string | null } = { message: null };
|
|
246
|
+
|
|
247
|
+
static getDerivedStateFromError(error: unknown): { message: string | null } {
|
|
248
|
+
return { message: error instanceof Error ? error.message : String(error) };
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
componentDidCatch(error: unknown, info: ErrorInfo) {
|
|
252
|
+
this.props.report({
|
|
253
|
+
t: "error",
|
|
254
|
+
phase: "render",
|
|
255
|
+
message: messageOf(error),
|
|
256
|
+
stack: error instanceof Error ? error.stack : (info.componentStack ?? undefined),
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
render() {
|
|
261
|
+
if (this.state.message !== null) {
|
|
262
|
+
return createElement(
|
|
263
|
+
"div",
|
|
264
|
+
{ "data-graph-boot-error": "render", role: "alert" },
|
|
265
|
+
`node-graph failed to render: ${this.state.message}`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
return this.props.children;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export function NodeGraphDomShell<
|
|
273
|
+
N extends NodeKindDefs = NodeKindDefs,
|
|
274
|
+
E extends EdgeKindDefs = EdgeKindDefs,
|
|
275
|
+
>(props: NodeGraphDomShellProps<N, E>) {
|
|
276
|
+
const { config, onEvent, schema, schemas } = props;
|
|
277
|
+
const commands = useRef<GraphCommands | null>(null);
|
|
278
|
+
const [Inner, setInner] = useState<ComponentType<NodeGraphDomInnerProps> | null>(null);
|
|
279
|
+
const [moduleError, setModuleError] = useState<string | null>(null);
|
|
280
|
+
|
|
281
|
+
// `encodeGraphEvent` lives in `wire.ts` and this file may not import it, so
|
|
282
|
+
// the one `JSON.stringify` the entry needs is written out. It is the same
|
|
283
|
+
// union, type-checked against it.
|
|
284
|
+
const report = useMemo(
|
|
285
|
+
() => (event: GraphEventWire) => {
|
|
286
|
+
void onEvent(JSON.stringify(event));
|
|
287
|
+
},
|
|
288
|
+
[onEvent],
|
|
289
|
+
);
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Every command, forwarded through a TYPED intermediate.
|
|
293
|
+
*
|
|
294
|
+
* It was six hand-written arrows and milestone 6 makes it eleven. Hand-writing
|
|
295
|
+
* eleven is how one gets forgotten, and a forgotten one is a button that
|
|
296
|
+
* silently does nothing on a phone with no console to find it in. Annotating
|
|
297
|
+
* the literal `NodeGraphHandle` is what makes that a BUILD error: the object
|
|
298
|
+
* is checked against the interface before the cast, so a method added to
|
|
299
|
+
* `graphHandle.ts` and not forwarded here fails `typecheck`.
|
|
300
|
+
*
|
|
301
|
+
* The cast is still needed and still here once: the handle is JSON-shaped by
|
|
302
|
+
* contract (`DOMImperativeFactory`'s index signature) and the typed view of it
|
|
303
|
+
* is `NodeGraphHandle`, and the two cannot both be expressed at once.
|
|
304
|
+
*
|
|
305
|
+
* Written out rather than looped over `graphCommandNames`, because looping
|
|
306
|
+
* would need a RUNTIME import of that tuple and this file may carry none of
|
|
307
|
+
* ours (design §9.4 layer 3, and `domEntry.spec.ts` holds the import list to
|
|
308
|
+
* `react` and `expo/dom`). The tuple's job is the spec's, not this file's.
|
|
309
|
+
*/
|
|
310
|
+
useDOMImperativeHandle(
|
|
311
|
+
props.ref as Ref<DOMImperativeFactory>,
|
|
312
|
+
() => {
|
|
313
|
+
const typed: NodeGraphHandle = {
|
|
314
|
+
fitView: () => commands.current?.fitView(),
|
|
315
|
+
relayout: () => commands.current?.relayout(),
|
|
316
|
+
zoomTo: (zoom) => commands.current?.zoomTo(Number(zoom)),
|
|
317
|
+
centerOn: (nodeId) => commands.current?.centerOn(String(nodeId)),
|
|
318
|
+
setSelection: (ids) => commands.current?.setSelection((ids as string[]) ?? []),
|
|
319
|
+
exportViewport: () => commands.current?.exportViewport(),
|
|
320
|
+
undo: () => commands.current?.undo(),
|
|
321
|
+
redo: () => commands.current?.redo(),
|
|
322
|
+
perfStart: (label) => commands.current?.perfStart(String(label)),
|
|
323
|
+
perfStop: (label) => commands.current?.perfStop(String(label)),
|
|
324
|
+
perfMark: (label) => commands.current?.perfMark(String(label)),
|
|
325
|
+
setViewport: (x, y, zoom) =>
|
|
326
|
+
commands.current?.setViewport(Number(x), Number(y), Number(zoom)),
|
|
327
|
+
synthPinch: (scale, steps) => commands.current?.synthPinch(Number(scale), Number(steps)),
|
|
328
|
+
};
|
|
329
|
+
return typed as unknown as DOMImperativeFactory;
|
|
330
|
+
},
|
|
331
|
+
[],
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
useEffect(() => {
|
|
335
|
+
let cancelled = false;
|
|
336
|
+
void (async () => {
|
|
337
|
+
try {
|
|
338
|
+
const loaded = (await import("./NodeGraphDomInner")) as InnerModule;
|
|
339
|
+
if (cancelled) return;
|
|
340
|
+
// The functional form, because React would otherwise call a component
|
|
341
|
+
// passed to `setState` as an updater.
|
|
342
|
+
setInner(() => loaded.NodeGraphDomInner);
|
|
343
|
+
} catch (error) {
|
|
344
|
+
if (cancelled) return;
|
|
345
|
+
const message = messageOf(error);
|
|
346
|
+
setModuleError(message);
|
|
347
|
+
// Written INLINE, not through `recordGraphError`, for the same reason
|
|
348
|
+
// the boot stage is: this file may carry no top-level import of ours
|
|
349
|
+
// that could itself throw (design 9.4 layer 3), and a dynamic import
|
|
350
|
+
// inside the handler for a failed dynamic import is not a place to put
|
|
351
|
+
// faith. `diagnostics/lastError.ts` exports the key, and
|
|
352
|
+
// `useGraphDiagnostics.spec.tsx` asserts this literal still matches it.
|
|
353
|
+
//
|
|
354
|
+
// First-write-wins, matching the reader: a module-eval throw drags a
|
|
355
|
+
// train of render errors behind it, and the cause is the one worth
|
|
356
|
+
// reporting.
|
|
357
|
+
const slot = globalThis as unknown as Record<string, unknown>;
|
|
358
|
+
if (!slot.__mp_graph_error) {
|
|
359
|
+
slot.__mp_graph_error = {
|
|
360
|
+
phase: "module",
|
|
361
|
+
message,
|
|
362
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
363
|
+
at: Date.now(),
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
report({
|
|
367
|
+
t: "error",
|
|
368
|
+
phase: "module",
|
|
369
|
+
message,
|
|
370
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
})();
|
|
374
|
+
return () => {
|
|
375
|
+
cancelled = true;
|
|
376
|
+
};
|
|
377
|
+
}, [report]);
|
|
378
|
+
|
|
379
|
+
if (moduleError) {
|
|
380
|
+
// Not a blank rectangle even on web, where there is no native watchdog to
|
|
381
|
+
// catch this. On native, layer 4 has already drawn `GraphFallback`.
|
|
382
|
+
return createElement(
|
|
383
|
+
"div",
|
|
384
|
+
{ "data-graph-boot-error": "module", role: "alert" },
|
|
385
|
+
`node-graph failed to load: ${moduleError}`,
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
if (!Inner) return null;
|
|
389
|
+
return createElement(
|
|
390
|
+
GraphRenderBoundary,
|
|
391
|
+
{ report },
|
|
392
|
+
createElement(Inner, {
|
|
393
|
+
...props,
|
|
394
|
+
commands,
|
|
395
|
+
config,
|
|
396
|
+
// The same erasure `registerGraphSchema` performs, in the one place the
|
|
397
|
+
// typed app boundary meets the id-keyed registry.
|
|
398
|
+
schema: schema as unknown as GraphSchema<never, never> | undefined,
|
|
399
|
+
schemas: schemas as unknown as readonly GraphSchema<never, never>[] | undefined,
|
|
400
|
+
}),
|
|
401
|
+
);
|
|
402
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The boot heartbeat's ELAPSED time — the number design 9.4's watchdog should
|
|
3
|
+
* have been set from and never was.
|
|
4
|
+
*
|
|
5
|
+
* `stage` alone answers "how far did it get". It cannot answer "was 4000 ms
|
|
6
|
+
* enough", which is the question emulator-5590 asked by failing the watchdog on
|
|
7
|
+
* a canvas that rendered on the first Retry (MPO-211). `startedAt` is stamped
|
|
8
|
+
* once per attempt and carried forward by every later stage, so `now -
|
|
9
|
+
* startedAt` is the whole boot rather than the gap since the last stamp.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
13
|
+
import {
|
|
14
|
+
bootGlobalKey,
|
|
15
|
+
graphReadySettleMs,
|
|
16
|
+
readBootElapsedMs,
|
|
17
|
+
readBootRecord,
|
|
18
|
+
resetBoot,
|
|
19
|
+
stampBootStage,
|
|
20
|
+
} from "./boot";
|
|
21
|
+
|
|
22
|
+
function slot(): Record<string, unknown> {
|
|
23
|
+
return globalThis as unknown as Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
resetBoot();
|
|
28
|
+
vi.useFakeTimers();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
afterEach(() => {
|
|
32
|
+
vi.useRealTimers();
|
|
33
|
+
resetBoot();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe("the boot record's start", () => {
|
|
37
|
+
it("is stamped once and carried forward, so elapsed is the whole boot", () => {
|
|
38
|
+
vi.setSystemTime(new Date(1_000_000));
|
|
39
|
+
stampBootStage("script");
|
|
40
|
+
vi.setSystemTime(new Date(1_000_400));
|
|
41
|
+
stampBootStage("module");
|
|
42
|
+
vi.setSystemTime(new Date(1_002_500));
|
|
43
|
+
stampBootStage("ready");
|
|
44
|
+
|
|
45
|
+
const record = readBootRecord();
|
|
46
|
+
expect(record?.startedAt).toBe(1_000_000);
|
|
47
|
+
// `at` moved with the last stamp; `startedAt` did not. Re-stamping the
|
|
48
|
+
// start on every stage would report every boot as instant.
|
|
49
|
+
expect(record?.at).toBe(1_002_500);
|
|
50
|
+
expect(readBootElapsedMs(1_002_500)).toBe(2500);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("restarts with `script`, because Retry is a new WebView", () => {
|
|
54
|
+
vi.setSystemTime(new Date(1_000_000));
|
|
55
|
+
stampBootStage("script");
|
|
56
|
+
vi.setSystemTime(new Date(1_005_000));
|
|
57
|
+
stampBootStage("script");
|
|
58
|
+
expect(readBootRecord()?.startedAt).toBe(1_005_000);
|
|
59
|
+
expect(readBootElapsedMs(1_005_100)).toBe(100);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("reads back a record the entry wrote inline, which carries no startedAt", () => {
|
|
63
|
+
// `NodeGraphDomShell.ts` may not import this module, so an older bundle's
|
|
64
|
+
// inline stamp can be `{ stage, at, history }`. Reading that back as an
|
|
65
|
+
// elapsed time of zero is honest; reading it as `now - 0` would report a
|
|
66
|
+
// boot that took fifty-six years.
|
|
67
|
+
slot()[bootGlobalKey] = { stage: "script", at: 1_000_000, history: ["script"] };
|
|
68
|
+
expect(readBootRecord()?.startedAt).toBe(1_000_000);
|
|
69
|
+
expect(readBootElapsedMs(1_000_250)).toBe(250);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("has no elapsed time where there is no record", () => {
|
|
73
|
+
expect(readBootElapsedMs()).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("never reports a negative elapsed time when a clock steps backwards", () => {
|
|
77
|
+
vi.setSystemTime(new Date(1_000_000));
|
|
78
|
+
stampBootStage("script");
|
|
79
|
+
expect(readBootElapsedMs(999_000)).toBe(0);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe("the settle grace", () => {
|
|
84
|
+
it("leaves room over GraphFaces' own asset-URL timeout", () => {
|
|
85
|
+
// `GraphFaces` waits 1500 ms for an asset URL before falling back to the
|
|
86
|
+
// bytes. A grace at or under that would snapshot the delivery mid-probe and
|
|
87
|
+
// report `pending` for a face that was about to resolve.
|
|
88
|
+
expect(graphReadySettleMs).toBeGreaterThan(1500);
|
|
89
|
+
});
|
|
90
|
+
});
|
package/src/dom/boot.ts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The boot heartbeat, design 9.4 layer 3.
|
|
3
|
+
*
|
|
4
|
+
* `import.meta` in a dependency is a PARSE error in a classic script, so the
|
|
5
|
+
* script never executes, so no error boundary is reachable, so the WebView is a
|
|
6
|
+
* blank rectangle with no console the user can see. Layers 1 and 2 stop that
|
|
7
|
+
* one at build time. This layer answers the next question: when a WebView does
|
|
8
|
+
* come up empty, HOW FAR did it get?
|
|
9
|
+
*
|
|
10
|
+
* The record lives on `globalThis` rather than in a module-scoped variable
|
|
11
|
+
* because two different pieces of code write it. `NodeGraphDom.ts` stamps
|
|
12
|
+
* `script` INLINE — it cannot import this module, since the entry must carry no
|
|
13
|
+
* top-level import of ours that could itself throw — and the tree it then
|
|
14
|
+
* dynamic-imports stamps the rest through `stampBootStage`. A module variable
|
|
15
|
+
* would give those two separate records, and the fallback would report the
|
|
16
|
+
* emptier one.
|
|
17
|
+
*
|
|
18
|
+
* Everything here therefore treats the global as untrusted: a record another
|
|
19
|
+
* library clobbered, or the bare `{ stage: "script" }` the entry wrote with no
|
|
20
|
+
* history, both read back cleanly instead of throwing inside the error path.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Design 9.4: `script -> module -> faces -> provider -> flow -> ready`. */
|
|
24
|
+
export const bootStages = ["script", "module", "faces", "provider", "flow", "ready"] as const;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* How long the canvas waits for its own diagnostics to settle before stamping
|
|
28
|
+
* `ready` anyway (MPO-211).
|
|
29
|
+
*
|
|
30
|
+
* `ready` carries design 9.5's record, and two of its fields are unknowable at
|
|
31
|
+
* the instant the document parses: React Flow has not measured the pane, so
|
|
32
|
+
* with culling on no node body has mounted, and `GraphFaces` has not heard back
|
|
33
|
+
* from `document.fonts`. Emitting immediately reported `nodesMounted: 0` and
|
|
34
|
+
* every face `pending` on a canvas that was about to paint correctly.
|
|
35
|
+
*
|
|
36
|
+
* 1800 is `GraphFaces`' own 1500 ms asset-URL timeout plus a margin, so a face
|
|
37
|
+
* that falls back to base64 reports the fallback rather than being caught mid
|
|
38
|
+
* probe. It lives HERE rather than beside the canvas because the native
|
|
39
|
+
* watchdog has to be larger than it, and a watchdog that undercut this would
|
|
40
|
+
* declare a healthy canvas dead while it was still filling in its own panel.
|
|
41
|
+
*/
|
|
42
|
+
export const graphReadySettleMs = 1800;
|
|
43
|
+
|
|
44
|
+
export type BootStage = (typeof bootStages)[number];
|
|
45
|
+
|
|
46
|
+
export interface BootRecord {
|
|
47
|
+
readonly stage: BootStage;
|
|
48
|
+
/** `Date.now()` at the stamp, so diagnostics can show where boot spent its time. */
|
|
49
|
+
readonly at: number;
|
|
50
|
+
/**
|
|
51
|
+
* `Date.now()` when the record was CREATED — the first stamp of this attempt.
|
|
52
|
+
*
|
|
53
|
+
* `at - startedAt` is how long boot has taken, which is the number the native
|
|
54
|
+
* watchdog's budget has to be set from. Without it the 4000 ms of design
|
|
55
|
+
* 9.4 was a guess, and on emulator-5590 rebooted fresh it was the wrong one:
|
|
56
|
+
* the watchdog fired, the fallback blamed a parse error, and Retry rendered
|
|
57
|
+
* the canvas immediately (MPO-211).
|
|
58
|
+
*/
|
|
59
|
+
readonly startedAt: number;
|
|
60
|
+
readonly history: readonly BootStage[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The key `NodeGraphDom.ts` writes inline. Exported so `domEntry.spec.ts` can
|
|
65
|
+
* assert the entry's literal and this module's reader still name the same slot
|
|
66
|
+
* — the one place the two halves of the heartbeat could silently drift.
|
|
67
|
+
*/
|
|
68
|
+
export const bootGlobalKey = "__mp_graph_boot";
|
|
69
|
+
|
|
70
|
+
function slot(): Record<string, unknown> {
|
|
71
|
+
return globalThis as unknown as Record<string, unknown>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function bootStageIndex(stage: BootStage): number {
|
|
75
|
+
return (bootStages as readonly string[]).indexOf(stage);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function isBootStage(value: unknown): value is BootStage {
|
|
79
|
+
return typeof value === "string" && (bootStages as readonly string[]).includes(value);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The record as written, normalised. A raw `{ stage: "script" }` from the entry
|
|
84
|
+
* gains the history it never had; anything unrecognisable reads as `null`.
|
|
85
|
+
*/
|
|
86
|
+
export function readBootRecord(): BootRecord | null {
|
|
87
|
+
const raw = slot()[bootGlobalKey];
|
|
88
|
+
if (!raw || typeof raw !== "object") return null;
|
|
89
|
+
const record = raw as Partial<BootRecord>;
|
|
90
|
+
if (!isBootStage(record.stage)) return null;
|
|
91
|
+
const history = Array.isArray(record.history) ? record.history.filter(isBootStage) : [];
|
|
92
|
+
const at = typeof record.at === "number" ? record.at : 0;
|
|
93
|
+
return {
|
|
94
|
+
stage: record.stage,
|
|
95
|
+
at,
|
|
96
|
+
// A raw `{ stage: "script" }` from the entry has no `startedAt`; reading it
|
|
97
|
+
// back as `at` makes the elapsed time zero rather than a decade, which is
|
|
98
|
+
// the honest answer for a record that never carried a start.
|
|
99
|
+
startedAt: typeof record.startedAt === "number" ? record.startedAt : at,
|
|
100
|
+
history: history.length > 0 ? history : [record.stage],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Milliseconds since this attempt's first stamp, or `null` with no record.
|
|
106
|
+
*
|
|
107
|
+
* This is the measurement the native watchdog's budget is set from, and it is
|
|
108
|
+
* reported in design 9.5's panel so the budget can be re-set from a device
|
|
109
|
+
* rather than from a guess.
|
|
110
|
+
*/
|
|
111
|
+
export function readBootElapsedMs(now: number = Date.now()): number | null {
|
|
112
|
+
const record = readBootRecord();
|
|
113
|
+
if (!record || record.startedAt === 0) return null;
|
|
114
|
+
return Math.max(0, now - record.startedAt);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function readBootStage(): BootStage | null {
|
|
118
|
+
return readBootRecord()?.stage ?? null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Record that boot reached `stage`, and return the stage the record now holds.
|
|
123
|
+
*
|
|
124
|
+
* Forward only. The watchdog's fallback names the last stage reached, so a
|
|
125
|
+
* stamp that could move the record backwards would understate how far boot got
|
|
126
|
+
* and point whoever reads it at the wrong layer. `script` is the one exception:
|
|
127
|
+
* Retry remounts the WebView under a new key, and boot genuinely starts over.
|
|
128
|
+
*/
|
|
129
|
+
export function stampBootStage(stage: BootStage): BootStage {
|
|
130
|
+
const previous = readBootRecord();
|
|
131
|
+
if (stage === "script" || !previous) {
|
|
132
|
+
const now = Date.now();
|
|
133
|
+
const fresh: BootRecord = { stage, at: now, startedAt: now, history: [stage] };
|
|
134
|
+
slot()[bootGlobalKey] = fresh;
|
|
135
|
+
return stage;
|
|
136
|
+
}
|
|
137
|
+
if (bootStageIndex(stage) <= bootStageIndex(previous.stage)) return previous.stage;
|
|
138
|
+
slot()[bootGlobalKey] = {
|
|
139
|
+
stage,
|
|
140
|
+
at: Date.now(),
|
|
141
|
+
// Carried forward, never re-stamped: the elapsed time is measured from the
|
|
142
|
+
// start of the attempt, and a later stage resetting it would report every
|
|
143
|
+
// boot as instant.
|
|
144
|
+
startedAt: previous.startedAt,
|
|
145
|
+
history: [...previous.history, stage],
|
|
146
|
+
} satisfies BootRecord;
|
|
147
|
+
return stage;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Test seam, and what Retry calls before remounting. */
|
|
151
|
+
export function resetBoot(): void {
|
|
152
|
+
delete slot()[bootGlobalKey];
|
|
153
|
+
}
|