@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,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The toolbar that owns the interaction mode (design §7.3, §7.5; task 3.6).
|
|
3
|
+
*
|
|
4
|
+
* It lives under `src/native/` because the shell it belongs to is the native
|
|
5
|
+
* one — a WebView cannot draw chrome the OS will treat as chrome, and design
|
|
6
|
+
* §7.6 already puts every control outside the canvas. It is NOT a `.native.tsx`
|
|
7
|
+
* twin: it is plain Tamagui and it renders identically on the web canvas, which
|
|
8
|
+
* is what makes the web story a real rehearsal of the phone rather than a
|
|
9
|
+
* different component that happens to look similar.
|
|
10
|
+
*
|
|
11
|
+
* MILESTONE 6 GAVE IT THE REST OF THE CONTROLS. Tidy, Undo and Redo used to
|
|
12
|
+
* live inside `NodeGraph/AutoLayout` as `children` of the canvas, which native
|
|
13
|
+
* drops — so on device the story painted 12 nodes with no way to lay them out,
|
|
14
|
+
* `layoutRunner` read `none` on every host, and MPO-213's device criterion had
|
|
15
|
+
* no way to be attempted. They are here now because here is a SIBLING, and a
|
|
16
|
+
* sibling is one of the two legal places a control can go (design §9.1). Each
|
|
17
|
+
* is rendered only when its handler is given, so a canvas with no auto-layout
|
|
18
|
+
* does not grow three dead buttons.
|
|
19
|
+
*
|
|
20
|
+
* Two decisions worth stating:
|
|
21
|
+
*
|
|
22
|
+
* - `fitView` is a BUTTON and not a double-tap. Design §7.5: a hidden gesture
|
|
23
|
+
* that fights the platform's own double-tap zoom is worse than a visible
|
|
24
|
+
* control. It renders only when a handler is given, so a read-only canvas
|
|
25
|
+
* does not grow a dead button.
|
|
26
|
+
* - selection is shown by DROPPING `chromeless` on the active button and
|
|
27
|
+
* spreading the `textWeight` fragment onto it, never by a colour. Both are
|
|
28
|
+
* Tamagui's own, so the active stop follows whatever theme the envelope
|
|
29
|
+
* resolved and there is no literal here to drift from it. (`themeInverse`
|
|
30
|
+
* would have been the obvious choice and is not a prop in Tamagui 2.7.6;
|
|
31
|
+
* `ThemeProps` carries no `inverse` either, so the pressed state is
|
|
32
|
+
* fill-and-weight rather than a theme flip.)
|
|
33
|
+
*
|
|
34
|
+
* Every style comes from a whole `knobProps.*` fragment spread (AGENTS.md).
|
|
35
|
+
* Built from `tamagui` rather than `@multiplatform.one/components`, which is an
|
|
36
|
+
* optional peer of this package.
|
|
37
|
+
*
|
|
38
|
+
* A11y is expressed with `role` / `aria-*` and not with the React Native
|
|
39
|
+
* `accessibility*` names, matching the house count (113 `aria-label` against 15
|
|
40
|
+
* `accessibilityLabel` under public/components, and `role="toolbar"` in
|
|
41
|
+
* `layouts/toolbar.tsx`). Measured in Chrome: Tamagui's `Button` forwards
|
|
42
|
+
* `accessibilityLabel`, `accessibilityRole` and `accessibilityState` straight to
|
|
43
|
+
* the DOM node, and React logs an error per prop per button. React Native
|
|
44
|
+
* >= 0.71 understands `aria-*` and `role`, so this is the spelling that is
|
|
45
|
+
* correct on both platforms rather than a web-only concession.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
49
|
+
import { Button, XStack } from "tamagui";
|
|
50
|
+
import type { GraphInteractionMode } from "../interaction/useLassoSelect";
|
|
51
|
+
|
|
52
|
+
export interface GraphToolbarProps {
|
|
53
|
+
readonly mode: GraphInteractionMode;
|
|
54
|
+
readonly onModeChange: (mode: GraphInteractionMode) => void;
|
|
55
|
+
/** Design §7.5. Omitted, the button is not rendered. */
|
|
56
|
+
readonly onFitView?: () => void;
|
|
57
|
+
/** Auto-layout, design §8. Omitted, the button is not rendered. */
|
|
58
|
+
readonly onTidy?: () => void;
|
|
59
|
+
readonly onUndo?: () => void;
|
|
60
|
+
readonly onRedo?: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Undo and Redo are disabled from the HOST's knowledge of the history, not
|
|
63
|
+
* from the canvas's.
|
|
64
|
+
*
|
|
65
|
+
* On native the journal lives on the far side of the bridge and nothing
|
|
66
|
+
* reports `canUndo` across it, so a native shell that has applied commits
|
|
67
|
+
* knows this and the canvas does not. Both default to enabled: a disabled
|
|
68
|
+
* button that should have worked is a worse failure than a press that turns
|
|
69
|
+
* out to be a no-op, and `history.undo` returns the same document when there
|
|
70
|
+
* is nothing to undo.
|
|
71
|
+
*/
|
|
72
|
+
readonly canUndo?: boolean;
|
|
73
|
+
readonly canRedo?: boolean;
|
|
74
|
+
/** True while a relayout is in flight, so Tidy cannot be double-pressed. */
|
|
75
|
+
readonly busy?: boolean;
|
|
76
|
+
readonly disabled?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const modeLabels: Record<GraphInteractionMode, string> = {
|
|
80
|
+
pan: "Pan",
|
|
81
|
+
select: "Select",
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const modes: readonly GraphInteractionMode[] = ["pan", "select"];
|
|
85
|
+
|
|
86
|
+
export function GraphToolbar({
|
|
87
|
+
busy = false,
|
|
88
|
+
canRedo = true,
|
|
89
|
+
canUndo = true,
|
|
90
|
+
disabled,
|
|
91
|
+
mode,
|
|
92
|
+
onFitView,
|
|
93
|
+
onModeChange,
|
|
94
|
+
onRedo,
|
|
95
|
+
onTidy,
|
|
96
|
+
onUndo,
|
|
97
|
+
}: GraphToolbarProps) {
|
|
98
|
+
const { knobProps } = useResolvedKnobs({ component: "GraphToolbar" });
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<XStack
|
|
102
|
+
role="toolbar"
|
|
103
|
+
alignItems="center"
|
|
104
|
+
{...knobProps.gap}
|
|
105
|
+
{...knobProps.panelPadding}
|
|
106
|
+
{...knobProps.elevatedSurface}
|
|
107
|
+
>
|
|
108
|
+
{modes.map((candidate) => {
|
|
109
|
+
const active = candidate === mode;
|
|
110
|
+
return (
|
|
111
|
+
<Button
|
|
112
|
+
key={candidate}
|
|
113
|
+
aria-label={`${modeLabels[candidate]} mode`}
|
|
114
|
+
aria-pressed={active}
|
|
115
|
+
chromeless={!active}
|
|
116
|
+
disabled={disabled}
|
|
117
|
+
onPress={() => onModeChange(candidate)}
|
|
118
|
+
size={knobProps.sizeToken}
|
|
119
|
+
{...(active ? knobProps.textWeight : {})}
|
|
120
|
+
>
|
|
121
|
+
{modeLabels[candidate]}
|
|
122
|
+
</Button>
|
|
123
|
+
);
|
|
124
|
+
})}
|
|
125
|
+
{onFitView ? (
|
|
126
|
+
<Button
|
|
127
|
+
aria-label="Fit the graph to the view"
|
|
128
|
+
chromeless
|
|
129
|
+
disabled={disabled}
|
|
130
|
+
onPress={onFitView}
|
|
131
|
+
size={knobProps.sizeToken}
|
|
132
|
+
>
|
|
133
|
+
Fit
|
|
134
|
+
</Button>
|
|
135
|
+
) : null}
|
|
136
|
+
{onTidy ? (
|
|
137
|
+
<Button
|
|
138
|
+
aria-label="Tidy the graph"
|
|
139
|
+
chromeless
|
|
140
|
+
disabled={disabled || busy}
|
|
141
|
+
onPress={onTidy}
|
|
142
|
+
size={knobProps.sizeToken}
|
|
143
|
+
>
|
|
144
|
+
{busy ? "Tidying…" : "Tidy"}
|
|
145
|
+
</Button>
|
|
146
|
+
) : null}
|
|
147
|
+
{onUndo ? (
|
|
148
|
+
<Button
|
|
149
|
+
aria-label="Undo"
|
|
150
|
+
chromeless
|
|
151
|
+
disabled={disabled || !canUndo}
|
|
152
|
+
onPress={onUndo}
|
|
153
|
+
size={knobProps.sizeToken}
|
|
154
|
+
>
|
|
155
|
+
Undo
|
|
156
|
+
</Button>
|
|
157
|
+
) : null}
|
|
158
|
+
{onRedo ? (
|
|
159
|
+
<Button
|
|
160
|
+
aria-label="Redo"
|
|
161
|
+
chromeless
|
|
162
|
+
disabled={disabled || !canRedo}
|
|
163
|
+
onPress={onRedo}
|
|
164
|
+
size={knobProps.sizeToken}
|
|
165
|
+
>
|
|
166
|
+
Redo
|
|
167
|
+
</Button>
|
|
168
|
+
) : null}
|
|
169
|
+
</XStack>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The native host: the WebView, the watchdog, and the fallback.
|
|
3
|
+
*
|
|
4
|
+
* Design 9.4 layer 4. A DOM component that never comes up is, by default, a
|
|
5
|
+
* blank rectangle — the parse error that caused it happened before any error
|
|
6
|
+
* boundary existed, and there is no console on a phone to find it in. So this
|
|
7
|
+
* file starts a timer at mount and, if no `{ t: "ready" }` arrives inside
|
|
8
|
+
* `readyTimeoutMs`, draws `GraphFallback` naming the last boot stage the
|
|
9
|
+
* WebView managed to stamp.
|
|
10
|
+
*
|
|
11
|
+
* The retry is a REMOUNT under a new key, not a reload: the boot record is a
|
|
12
|
+
* global inside the WebView, and a new key gives boot a fresh one rather than
|
|
13
|
+
* a second attempt reading the first one's stages.
|
|
14
|
+
*
|
|
15
|
+
* The host owns `rev`. Every commit the canvas emits proposes `rev + 1`; this
|
|
16
|
+
* file applies the commands, stamps the new rev and hands the document back.
|
|
17
|
+
* The canvas's own echo gate then refuses the document it caused, so a drag
|
|
18
|
+
* does not fight itself. `wire.ts` holds the gate and the reasoning.
|
|
19
|
+
*
|
|
20
|
+
* WHAT IT NO LONGER OWNS (design §9.3, MPO-211): the `'use dom'` entry. It used
|
|
21
|
+
* to render the package's own, and the package's own can never see a consumer's
|
|
22
|
+
* Tamagui config or schema — both are live objects, so both can only arrive
|
|
23
|
+
* from a module the DOM BUNDLE imports, and a DOM bundle is rooted at the file
|
|
24
|
+
* carrying the directive. Measured on the iPhone 16e simulator and on
|
|
25
|
+
* emulator-5592: `render: Missing theme.`, identically on both platforms,
|
|
26
|
+
* because `getConfig()` threw inside the WebView. So the entry is a PROP now,
|
|
27
|
+
* and a host given none draws `GraphFallback` naming that rather than booting a
|
|
28
|
+
* WebView that is guaranteed to fail four seconds later.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
import {
|
|
32
|
+
createElement,
|
|
33
|
+
useCallback,
|
|
34
|
+
useEffect,
|
|
35
|
+
useImperativeHandle,
|
|
36
|
+
useMemo,
|
|
37
|
+
useRef,
|
|
38
|
+
useState,
|
|
39
|
+
} from "react";
|
|
40
|
+
import type { Ref } from "react";
|
|
41
|
+
import type {
|
|
42
|
+
NodeGraphDomHandle,
|
|
43
|
+
NodeGraphDomOptions,
|
|
44
|
+
NodeGraphDomProps,
|
|
45
|
+
} from "../dom/NodeGraphDomShell";
|
|
46
|
+
import type { BootStage } from "../dom/boot";
|
|
47
|
+
import { decodeGraphEvent } from "../dom/wire";
|
|
48
|
+
import type { GraphDiagnosticsWire, GraphEventWire, PerfReportWire } from "../dom/wire";
|
|
49
|
+
import type { NodeGraphHandle } from "../react-flow/graphHandle";
|
|
50
|
+
import type { KnobEnvelope } from "../knobs/envelope";
|
|
51
|
+
import type { NodeId, Viewport } from "../model/index";
|
|
52
|
+
import { recordGraphError, resetGraphError } from "../diagnostics/lastError";
|
|
53
|
+
import { GraphFallback } from "./GraphFallback.native";
|
|
54
|
+
import type { GraphFallbackReason } from "./GraphFallback.native";
|
|
55
|
+
import { getNodeGraphDomEntry } from "./domEntryRegistry";
|
|
56
|
+
import type { NodeGraphDomEntry } from "./domEntryRegistry";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The watchdog budget. Design 9.4 said 4000; this is the measured replacement.
|
|
60
|
+
*
|
|
61
|
+
* 4000 was never measured — the design's own words were that "a cold WKWebView
|
|
62
|
+
* start with a first-run font fetch is comfortably under it". On emulator-5590,
|
|
63
|
+
* rebooted fresh, it was not: the watchdog fired, the fallback blamed a parse
|
|
64
|
+
* error, and Retry rendered the canvas immediately. Nothing had failed. A
|
|
65
|
+
* watchdog cannot tell a dead canvas from a slow one, so the only safe budget
|
|
66
|
+
* is one set from a real cold start with headroom over it.
|
|
67
|
+
*
|
|
68
|
+
* Two things go into the number now:
|
|
69
|
+
*
|
|
70
|
+
* - the cold WebView start itself, which the canvas MEASURES and reports as
|
|
71
|
+
* `bootMs` in design 9.5's panel, so this constant can be re-set from a
|
|
72
|
+
* device instead of from a guess;
|
|
73
|
+
* - `graphReadySettleMs` (1800), which the canvas deliberately waits before
|
|
74
|
+
* stamping `ready` so its own diagnostics are filled in rather than
|
|
75
|
+
* reporting `nodesMounted: 0` and every face `pending`.
|
|
76
|
+
*
|
|
77
|
+
* This MUST stay comfortably above their sum. A watchdog that undercut the
|
|
78
|
+
* settle grace would declare a healthy canvas dead while it was filling in its
|
|
79
|
+
* own panel, which is a worse version of exactly the bug this replaces.
|
|
80
|
+
*/
|
|
81
|
+
export const readyTimeoutMs = 12000;
|
|
82
|
+
|
|
83
|
+
export interface NodeGraphNativeProps {
|
|
84
|
+
readonly documentJson: string;
|
|
85
|
+
readonly rev: number;
|
|
86
|
+
readonly envelope: KnobEnvelope;
|
|
87
|
+
readonly schemaId: string;
|
|
88
|
+
readonly options?: NodeGraphDomOptions;
|
|
89
|
+
/** Commands the canvas proposes, already JSON. The host applies and re-stamps `rev`. */
|
|
90
|
+
readonly onCommit?: (rev: number, commandsJson: string) => void;
|
|
91
|
+
readonly onSelection?: (ids: readonly NodeId[]) => void;
|
|
92
|
+
readonly onViewport?: (viewport: Viewport) => void;
|
|
93
|
+
readonly onNodeActivate?: (id: NodeId) => void;
|
|
94
|
+
readonly onConnectionRefused?: (code: string, message: string) => void;
|
|
95
|
+
readonly onHaptic?: (kind: "selection" | "impact" | "warning") => void;
|
|
96
|
+
readonly onReady?: (diagnostics: GraphDiagnosticsWire) => void;
|
|
97
|
+
readonly onError?: (event: Extract<GraphEventWire, { t: "error" }>) => void;
|
|
98
|
+
/**
|
|
99
|
+
* The canvas painted. Milestone 6: this, and not `ready`, is what the
|
|
100
|
+
* watchdog is measured against — see the effect below.
|
|
101
|
+
*/
|
|
102
|
+
readonly onPaint?: (bootMs: number | null) => void;
|
|
103
|
+
readonly onLayoutResult?: (result: {
|
|
104
|
+
runner: string;
|
|
105
|
+
ms: number;
|
|
106
|
+
nodeCount: number;
|
|
107
|
+
/** Present when the engine REJECTED. `runner` is `none` and `ms` is 0 there. */
|
|
108
|
+
error?: string;
|
|
109
|
+
}) => void;
|
|
110
|
+
readonly onPerfReport?: (report: PerfReportWire) => void;
|
|
111
|
+
readonly onLasso?: (event: Extract<GraphEventWire, { t: "lasso" }>) => void;
|
|
112
|
+
/**
|
|
113
|
+
* EVERY decoded event, before the typed callbacks fire. One name that means
|
|
114
|
+
* the same thing on both platforms, so one story file can serve both.
|
|
115
|
+
*/
|
|
116
|
+
readonly onGraphEvent?: (event: GraphEventWire) => void;
|
|
117
|
+
/**
|
|
118
|
+
* The imperative handle, forwarded to the DOM component. It is the ONLY way a
|
|
119
|
+
* native sibling can drive this canvas, so it is a prop and not an internal
|
|
120
|
+
* ref — which is what it was, and which is why nothing on a device could ever
|
|
121
|
+
* press Tidy.
|
|
122
|
+
*/
|
|
123
|
+
readonly graphRef?: Ref<NodeGraphHandle>;
|
|
124
|
+
/** Overridable so a test can make the watchdog fire without waiting four seconds. */
|
|
125
|
+
readonly readyTimeoutMs?: number;
|
|
126
|
+
/**
|
|
127
|
+
* D1 is unruled. The gate that passed used Expo's OWN DOM WebView, and
|
|
128
|
+
* `@expo/dom-webview` is what this repo carries — `react-native-webview` is in
|
|
129
|
+
* no package.json here. So the default is `useExpoDOMWebView: true`, which is
|
|
130
|
+
* exactly what was proven, and a consumer who adds `react-native-webview` can
|
|
131
|
+
* override the whole `dom` prop.
|
|
132
|
+
*/
|
|
133
|
+
readonly dom?: NonNullable<NodeGraphDomProps["dom"]>;
|
|
134
|
+
/**
|
|
135
|
+
* The app's `'use dom'` entry. Design §9.3: it imports the app's tamagui
|
|
136
|
+
* config and its schema registration and renders `NodeGraphDomShell`, and
|
|
137
|
+
* nothing inside this package can stand in for it.
|
|
138
|
+
*
|
|
139
|
+
* Falls back to `getNodeGraphDomEntry()` so a story that lives in this
|
|
140
|
+
* package — which cannot import an app's config — still gets a canvas once
|
|
141
|
+
* the app has registered one.
|
|
142
|
+
*/
|
|
143
|
+
readonly domEntry?: NodeGraphDomEntry;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const defaultDomProps = { matchContents: false, useExpoDOMWebView: true } as const;
|
|
147
|
+
|
|
148
|
+
export function NodeGraphNative(props: NodeGraphNativeProps) {
|
|
149
|
+
const {
|
|
150
|
+
documentJson,
|
|
151
|
+
envelope,
|
|
152
|
+
onCommit,
|
|
153
|
+
onConnectionRefused,
|
|
154
|
+
onError,
|
|
155
|
+
onGraphEvent,
|
|
156
|
+
onHaptic,
|
|
157
|
+
onLasso,
|
|
158
|
+
onLayoutResult,
|
|
159
|
+
onNodeActivate,
|
|
160
|
+
onPaint,
|
|
161
|
+
onPerfReport,
|
|
162
|
+
onReady,
|
|
163
|
+
onSelection,
|
|
164
|
+
onViewport,
|
|
165
|
+
options,
|
|
166
|
+
rev,
|
|
167
|
+
schemaId,
|
|
168
|
+
} = props;
|
|
169
|
+
const timeout = props.readyTimeoutMs ?? readyTimeoutMs;
|
|
170
|
+
|
|
171
|
+
const [attempt, setAttempt] = useState(0);
|
|
172
|
+
const [ready, setReady] = useState(false);
|
|
173
|
+
/**
|
|
174
|
+
* The canvas PAINTED. Milestone 6, and the fix for a watchdog that fired on a
|
|
175
|
+
* working canvas.
|
|
176
|
+
*
|
|
177
|
+
* `ready` is deliberately late: the canvas waits `graphReadySettleMs` (1800)
|
|
178
|
+
* so the diagnostics it carries are filled in rather than reporting
|
|
179
|
+
* `nodesMounted: 0` and every face `pending`. That is right for the panel and
|
|
180
|
+
* wrong for a liveness check. Measured on emulator-5592: the 12 s budget
|
|
181
|
+
* fired on a canvas that was already on screen, and on emulator-5590 Retry
|
|
182
|
+
* did not recover it. The watchdog was timing the clock that is allowed to be
|
|
183
|
+
* slow.
|
|
184
|
+
*
|
|
185
|
+
* So the budget is now measured against `paint`, the frame after React Flow's
|
|
186
|
+
* first render. The budget itself is UNCHANGED — 12000 was set from a real
|
|
187
|
+
* cold start and nothing about that measurement has been re-taken — but it is
|
|
188
|
+
* now spent on the question it was always meant to answer: are there pixels.
|
|
189
|
+
*/
|
|
190
|
+
const [painted, setPainted] = useState(false);
|
|
191
|
+
/**
|
|
192
|
+
* A retry that re-CREATES the WebView, in two phases.
|
|
193
|
+
*
|
|
194
|
+
* Bumping `attempt` gave the entry a new `key`, which is a remount of the
|
|
195
|
+
* React element — and on emulator-5590 that was not enough to recover: the
|
|
196
|
+
* old WebView was still being torn down as the new one mounted. Rendering
|
|
197
|
+
* nothing for one commit forces the unmount to complete before the next
|
|
198
|
+
* `createElement` runs, so the second attempt gets a genuinely new WebView
|
|
199
|
+
* with a fresh boot record rather than a second pass over the first one's.
|
|
200
|
+
*/
|
|
201
|
+
const [restarting, setRestarting] = useState(false);
|
|
202
|
+
/**
|
|
203
|
+
* Whether ANY event has crossed the bridge on this attempt.
|
|
204
|
+
*
|
|
205
|
+
* The host only learns a boot STAGE from `ready`, so a failure before that
|
|
206
|
+
* leaves `stage` null — which the fallback used to render as "it never
|
|
207
|
+
* started". Measured on the simulator: the canvas reported a render error,
|
|
208
|
+
* so it had plainly started, and the message sent the reader hunting a parse
|
|
209
|
+
* error that did not exist.
|
|
210
|
+
*/
|
|
211
|
+
const [started, setStarted] = useState(false);
|
|
212
|
+
/**
|
|
213
|
+
* The last thing the canvas said, whatever its phase.
|
|
214
|
+
*
|
|
215
|
+
* A `runtime` error is deliberately NOT fatal — replacing a working canvas
|
|
216
|
+
* because one handler threw would be the worse failure — but when the
|
|
217
|
+
* WATCHDOG then fires, this is the only description of what went wrong that
|
|
218
|
+
* exists on this side of the bridge, and it was being thrown away. Measured
|
|
219
|
+
* on the iPhone 16e simulator: the fallback read "it started and reported a
|
|
220
|
+
* problem" while holding the problem's text and printing none of it.
|
|
221
|
+
*/
|
|
222
|
+
const lastReport = useRef<string | null>(null);
|
|
223
|
+
const [stage, setStage] = useState<BootStage | null>(null);
|
|
224
|
+
const [failure, setFailure] = useState<{
|
|
225
|
+
reason: GraphFallbackReason;
|
|
226
|
+
message?: string;
|
|
227
|
+
} | null>(null);
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* THE DOM ENTRY GETS A REF THIS COMPONENT OWNS, AND NEVER THE CONSUMER'S.
|
|
231
|
+
*
|
|
232
|
+
* `expo/dom`'s `RawWebView` installs its imperative proxy in the RENDER body,
|
|
233
|
+
* guarded by `ref.current == null`, and nothing nulls it afterwards — React
|
|
234
|
+
* does not manage a ref a component assigns to itself. Hand it the same ref
|
|
235
|
+
* object twice and the second WebView never publishes a proxy: the first
|
|
236
|
+
* one's is still sitting there, the guard is false, and every command goes on
|
|
237
|
+
* forwarding into a WebView that has been torn down. Nothing throws. The
|
|
238
|
+
* canvas paints and pans. The buttons stop working.
|
|
239
|
+
*
|
|
240
|
+
* That is one bug behind two of the m6 device findings. `Tidy` never answered
|
|
241
|
+
* on either Android emulator — and BOTH had come up through the watchdog +
|
|
242
|
+
* Retry path, which is `attempt + 1`, a keyed remount, while iOS never did.
|
|
243
|
+
* `Perf200`'s culling toggle was a `key` on `<NodeGraph>`, so culling-off was
|
|
244
|
+
* only reachable through a remount, and its `perfStart` / `perfStop` both went
|
|
245
|
+
* to the dead proxy — leaving the readout on `sampling…` forever.
|
|
246
|
+
*
|
|
247
|
+
* Nulling the shared ref is NOT the fix: React renders the new subtree before
|
|
248
|
+
* it runs the old one's cleanups, so a null on unmount lands after the new
|
|
249
|
+
* instance has already skipped its install, and wipes the proxy that was
|
|
250
|
+
* about to work. The fix is to stop sharing. A fresh object per `attempt`, so
|
|
251
|
+
* a Retry-recreated WebView always sees `null` and installs; and the
|
|
252
|
+
* consumer's `graphRef` is published through a stable forwarder below — the
|
|
253
|
+
* same shape `NodeGraphWeb` uses for `commandSlot`, for the same reason.
|
|
254
|
+
*/
|
|
255
|
+
const entryRef = useMemo<{ current: NodeGraphDomHandle | null }>(
|
|
256
|
+
() => ({ current: null }),
|
|
257
|
+
[attempt],
|
|
258
|
+
);
|
|
259
|
+
// Read through a ref so the forwarder can be built ONCE. A forwarder rebuilt
|
|
260
|
+
// per attempt would hand a sibling toolbar a new object mid-session.
|
|
261
|
+
const liveRef = useRef(entryRef);
|
|
262
|
+
liveRef.current = entryRef;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The consumer's handle: stable, and null-safe by construction.
|
|
266
|
+
*
|
|
267
|
+
* Written out rather than looped over `graphCommandNames`, for the reason the
|
|
268
|
+
* shell writes its thirteen out — annotating the literal `NodeGraphHandle` is
|
|
269
|
+
* what makes a command added to the interface and forgotten here a BUILD
|
|
270
|
+
* error rather than a button that silently does nothing on a phone.
|
|
271
|
+
*/
|
|
272
|
+
const handle = useMemo<NodeGraphHandle>(
|
|
273
|
+
() => ({
|
|
274
|
+
fitView: () => liveRef.current.current?.fitView(),
|
|
275
|
+
relayout: () => liveRef.current.current?.relayout(),
|
|
276
|
+
zoomTo: (zoom) => liveRef.current.current?.zoomTo(zoom),
|
|
277
|
+
centerOn: (nodeId) => liveRef.current.current?.centerOn(nodeId),
|
|
278
|
+
setSelection: (ids) => liveRef.current.current?.setSelection(ids),
|
|
279
|
+
exportViewport: () => liveRef.current.current?.exportViewport(),
|
|
280
|
+
undo: () => liveRef.current.current?.undo(),
|
|
281
|
+
redo: () => liveRef.current.current?.redo(),
|
|
282
|
+
perfStart: (label) => liveRef.current.current?.perfStart(label),
|
|
283
|
+
perfStop: (label) => liveRef.current.current?.perfStop(label),
|
|
284
|
+
perfMark: (label) => liveRef.current.current?.perfMark(label),
|
|
285
|
+
setViewport: (x, y, zoom) => liveRef.current.current?.setViewport(x, y, zoom),
|
|
286
|
+
synthPinch: (scale, steps) => liveRef.current.current?.synthPinch(scale, steps),
|
|
287
|
+
}),
|
|
288
|
+
[],
|
|
289
|
+
);
|
|
290
|
+
useImperativeHandle(props.graphRef, () => handle, [handle]);
|
|
291
|
+
|
|
292
|
+
// A new attempt is a new WebView, so everything the last one reported is
|
|
293
|
+
// stale. Resetting here rather than in the retry handler keeps the two in
|
|
294
|
+
// step even if a consumer remounts us for its own reasons.
|
|
295
|
+
useEffect(() => {
|
|
296
|
+
setReady(false);
|
|
297
|
+
setPainted(false);
|
|
298
|
+
setStage(null);
|
|
299
|
+
setStarted(false);
|
|
300
|
+
setFailure(null);
|
|
301
|
+
lastReport.current = null;
|
|
302
|
+
// A new attempt must not be judged on the previous one's failure; the
|
|
303
|
+
// diagnostics panel reads this slot on the Hermes side.
|
|
304
|
+
resetGraphError();
|
|
305
|
+
}, [attempt]);
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The watchdog. It stops on the FIRST of paint or ready, which in practice is
|
|
309
|
+
* always paint — `ready` cannot arrive before the canvas has painted, and it
|
|
310
|
+
* is held back another 1800 ms after that on purpose.
|
|
311
|
+
*
|
|
312
|
+
* `ready` stays in the condition anyway rather than being replaced by it: a
|
|
313
|
+
* canvas that somehow reported ready without a paint marker is alive, and a
|
|
314
|
+
* watchdog that killed it on a missing marker would be a new way to fail.
|
|
315
|
+
*/
|
|
316
|
+
useEffect(() => {
|
|
317
|
+
if (ready || painted || restarting) return;
|
|
318
|
+
const timer = setTimeout(
|
|
319
|
+
() => setFailure({ reason: "no-ready", message: lastReport.current ?? undefined }),
|
|
320
|
+
timeout,
|
|
321
|
+
);
|
|
322
|
+
return () => clearTimeout(timer);
|
|
323
|
+
}, [attempt, painted, ready, restarting, timeout]);
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Phase two of the retry: one commit with no WebView, then a new one.
|
|
327
|
+
*
|
|
328
|
+
* `setRestarting(false)` in an effect rather than in the click handler is the
|
|
329
|
+
* whole mechanism — the render between them is the one that unmounts.
|
|
330
|
+
*/
|
|
331
|
+
useEffect(() => {
|
|
332
|
+
if (!restarting) return;
|
|
333
|
+
setRestarting(false);
|
|
334
|
+
}, [restarting]);
|
|
335
|
+
|
|
336
|
+
const onEvent = useCallback(
|
|
337
|
+
async (eventJson: string) => {
|
|
338
|
+
setStarted(true);
|
|
339
|
+
let event: GraphEventWire;
|
|
340
|
+
try {
|
|
341
|
+
event = decodeGraphEvent(eventJson);
|
|
342
|
+
} catch (error) {
|
|
343
|
+
// A tag this build does not know means the DOM bundle and this host are
|
|
344
|
+
// out of step. That is worth surfacing, not swallowing.
|
|
345
|
+
onError?.({
|
|
346
|
+
t: "error",
|
|
347
|
+
phase: "runtime",
|
|
348
|
+
message: error instanceof Error ? error.message : String(error),
|
|
349
|
+
});
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
// Before the switch, and before any typed callback: a consumer reading the
|
|
353
|
+
// raw channel should see an event even when a handler below throws.
|
|
354
|
+
onGraphEvent?.(event);
|
|
355
|
+
switch (event.t) {
|
|
356
|
+
case "ready":
|
|
357
|
+
setReady(true);
|
|
358
|
+
setStage(event.diagnostics.stage);
|
|
359
|
+
onReady?.(event.diagnostics);
|
|
360
|
+
return;
|
|
361
|
+
case "commit":
|
|
362
|
+
onCommit?.(event.rev, event.commandsJson);
|
|
363
|
+
return;
|
|
364
|
+
case "selection":
|
|
365
|
+
onSelection?.(event.ids);
|
|
366
|
+
return;
|
|
367
|
+
case "viewport":
|
|
368
|
+
onViewport?.(event.viewport);
|
|
369
|
+
return;
|
|
370
|
+
case "nodeActivate":
|
|
371
|
+
onNodeActivate?.(event.id);
|
|
372
|
+
return;
|
|
373
|
+
case "connectRefused":
|
|
374
|
+
onConnectionRefused?.(event.code, event.message);
|
|
375
|
+
return;
|
|
376
|
+
case "haptic":
|
|
377
|
+
onHaptic?.(event.kind);
|
|
378
|
+
return;
|
|
379
|
+
case "metrics":
|
|
380
|
+
return;
|
|
381
|
+
case "paint":
|
|
382
|
+
setPainted(true);
|
|
383
|
+
onPaint?.(event.bootMs);
|
|
384
|
+
return;
|
|
385
|
+
case "layoutResult":
|
|
386
|
+
onLayoutResult?.({
|
|
387
|
+
runner: event.runner,
|
|
388
|
+
ms: event.ms,
|
|
389
|
+
nodeCount: event.nodeCount,
|
|
390
|
+
error: event.error,
|
|
391
|
+
});
|
|
392
|
+
return;
|
|
393
|
+
case "perfReport":
|
|
394
|
+
onPerfReport?.(event.report);
|
|
395
|
+
return;
|
|
396
|
+
case "lasso":
|
|
397
|
+
onLasso?.(event);
|
|
398
|
+
// A lasso that armed is the moment design §7.3 L3 asks for a buzz,
|
|
399
|
+
// and the shell is the only thing that can produce one. The hint
|
|
400
|
+
// rides the event; acting on it is still the consumer's call.
|
|
401
|
+
if (event.haptic) onHaptic?.(event.haptic);
|
|
402
|
+
return;
|
|
403
|
+
case "error":
|
|
404
|
+
lastReport.current = `${event.phase}: ${event.message}`;
|
|
405
|
+
// The canvas and this host are different JS realms, so the panel of
|
|
406
|
+
// design 9.5 — which reads a global — can never see what the WebView
|
|
407
|
+
// recorded. Copying it across is what makes `NodeGraph/Diagnostics`
|
|
408
|
+
// able to report a DOM-side failure at all.
|
|
409
|
+
recordGraphError({ phase: event.phase, message: event.message, stack: event.stack });
|
|
410
|
+
// `module` and `render` are fatal to the canvas; `runtime` is not,
|
|
411
|
+
// and replacing a working canvas with a fallback because one handler
|
|
412
|
+
// threw would be the worse failure.
|
|
413
|
+
if (event.phase !== "runtime") {
|
|
414
|
+
setFailure({
|
|
415
|
+
reason: event.phase === "boot" ? "no-ready" : event.phase,
|
|
416
|
+
message: event.message,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
onError?.(event);
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
[
|
|
424
|
+
onCommit,
|
|
425
|
+
onConnectionRefused,
|
|
426
|
+
onError,
|
|
427
|
+
onGraphEvent,
|
|
428
|
+
onHaptic,
|
|
429
|
+
onLasso,
|
|
430
|
+
onLayoutResult,
|
|
431
|
+
onNodeActivate,
|
|
432
|
+
onPaint,
|
|
433
|
+
onPerfReport,
|
|
434
|
+
onReady,
|
|
435
|
+
onSelection,
|
|
436
|
+
onViewport,
|
|
437
|
+
],
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
const envelopeJson = useMemo(() => JSON.stringify(envelope), [envelope]);
|
|
441
|
+
const optionsJson = useMemo(() => JSON.stringify(options ?? {}), [options]);
|
|
442
|
+
const domProps = useMemo(() => ({ ...defaultDomProps, ...props.dom }), [props.dom]);
|
|
443
|
+
const entry = props.domEntry ?? getNodeGraphDomEntry();
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* No entry is not a timeout and must not read like one. Reported before a
|
|
447
|
+
* WebView is even created, because there is nothing to wait for: the canvas
|
|
448
|
+
* would come up, fail to find a config, and say so four seconds later.
|
|
449
|
+
*/
|
|
450
|
+
if (!entry) {
|
|
451
|
+
return (
|
|
452
|
+
<GraphFallback
|
|
453
|
+
message={
|
|
454
|
+
"no DOM entry supplied — pass `domEntry`, or call `setNodeGraphDomEntry` " +
|
|
455
|
+
"with a module whose first statement is 'use dom' and which imports the " +
|
|
456
|
+
"app's tamagui config and schema registration."
|
|
457
|
+
}
|
|
458
|
+
reason="no-dom-entry"
|
|
459
|
+
stage={null}
|
|
460
|
+
started={false}
|
|
461
|
+
/>
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (failure) {
|
|
466
|
+
return (
|
|
467
|
+
<GraphFallback
|
|
468
|
+
message={failure.message}
|
|
469
|
+
onRetry={() => {
|
|
470
|
+
setRestarting(true);
|
|
471
|
+
setAttempt((value) => value + 1);
|
|
472
|
+
}}
|
|
473
|
+
reason={failure.reason}
|
|
474
|
+
stage={stage}
|
|
475
|
+
started={started}
|
|
476
|
+
// Only the timeout waited. A reported `module` or `render` failure came
|
|
477
|
+
// back when it came back, and printing a budget beside it would read as
|
|
478
|
+
// if the budget were the cause.
|
|
479
|
+
waitedMs={failure.reason === "no-ready" ? timeout : undefined}
|
|
480
|
+
/>
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// The one commit with no WebView. See `restarting`: a new `key` alone did not
|
|
485
|
+
// recover emulator-5590, because the old WebView was still tearing down.
|
|
486
|
+
if (restarting) return null;
|
|
487
|
+
|
|
488
|
+
// `createElement`, not JSX: `entry` is a value chosen at runtime and JSX on a
|
|
489
|
+
// lowercase-bound component reads as an intrinsic element.
|
|
490
|
+
return createElement(entry, {
|
|
491
|
+
key: attempt,
|
|
492
|
+
dom: domProps,
|
|
493
|
+
documentJson,
|
|
494
|
+
envelopeJson,
|
|
495
|
+
onEvent,
|
|
496
|
+
optionsJson,
|
|
497
|
+
// This component's own, one per attempt. Never `props.graphRef`: see
|
|
498
|
+
// `entryRef` above — a ref object the entry writes into is a ref object
|
|
499
|
+
// only the entry may own, and the consumer reaches the same commands
|
|
500
|
+
// through the forwarder `useImperativeHandle` publishes.
|
|
501
|
+
ref: entryRef,
|
|
502
|
+
rev,
|
|
503
|
+
schemaId,
|
|
504
|
+
});
|
|
505
|
+
}
|