@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,395 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialization, design §4.6.
|
|
3
|
+
*
|
|
4
|
+
* Two properties carry the weight. `parseDocument` NEVER throws: a corrupt
|
|
5
|
+
* document renders an `EmptyState`, never a blank WebView, and on native there
|
|
6
|
+
* is no console to find the exception in. And the output is canonical —
|
|
7
|
+
* geometry rounded to 2 dp, document keys in a declared order, consumer payload
|
|
8
|
+
* keys sorted — so the same graph saved twice produces the same bytes and a
|
|
9
|
+
* change is a readable diff rather than a whole-file rewrite.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
DocumentProblem,
|
|
14
|
+
DocumentSchema,
|
|
15
|
+
EdgeKindDefs,
|
|
16
|
+
GraphDocument,
|
|
17
|
+
GraphEdgeOf,
|
|
18
|
+
GraphNodeOf,
|
|
19
|
+
JsonValue,
|
|
20
|
+
NodeKindDefs,
|
|
21
|
+
Result,
|
|
22
|
+
Size,
|
|
23
|
+
Viewport,
|
|
24
|
+
XY,
|
|
25
|
+
} from "./document";
|
|
26
|
+
|
|
27
|
+
export interface ParseOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Drop nodes and edges whose kind the schema does not know, instead of
|
|
30
|
+
* refusing the document. For a read-only viewer that would rather show most
|
|
31
|
+
* of the graph than nothing. Edges left dangling by a dropped node are
|
|
32
|
+
* dropped with it — a graph with an edge pointing at nothing is not a
|
|
33
|
+
* partial render, it is a broken one.
|
|
34
|
+
*/
|
|
35
|
+
readonly dropUnknownKinds?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const documentVersion = 1;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 2 dp via the decimal string, not `Math.round(v * 100) / 100`.
|
|
42
|
+
*
|
|
43
|
+
* The two disagree, and the disagreement is measured in `serialize.spec.ts`.
|
|
44
|
+
* 190.005 is stored as 190.00499999999999545; `toFixed` reads that and gives
|
|
45
|
+
* 190, while the multiply rounds a second time and gives 190.01. `toFixed`
|
|
46
|
+
* follows the number actually held, so the output depends only on the value and
|
|
47
|
+
* not on the arithmetic that produced it. Canonical output needs exactly that.
|
|
48
|
+
*/
|
|
49
|
+
function round2(value: number): number {
|
|
50
|
+
const rounded = Number(value.toFixed(2));
|
|
51
|
+
// -0 serializes as `-0` and compares equal to 0, so two structurally equal
|
|
52
|
+
// documents could differ by a sign that means nothing. Normalise it away.
|
|
53
|
+
return Object.is(rounded, -0) ? 0 : rounded;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function roundXY(value: XY): XY {
|
|
57
|
+
return { x: round2(value.x), y: round2(value.y) };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Consumer payloads have no declared key order, so canonical order is sorted. */
|
|
61
|
+
function canonical(value: unknown): unknown {
|
|
62
|
+
if (Array.isArray(value)) return value.map(canonical);
|
|
63
|
+
if (value === null || typeof value !== "object") return value;
|
|
64
|
+
const source = value as Record<string, unknown>;
|
|
65
|
+
const out: Record<string, unknown> = {};
|
|
66
|
+
for (const key of Object.keys(source).sort()) out[key] = canonical(source[key]);
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Emits the document's own keys in a declared order and everything below them
|
|
72
|
+
* canonically. `JSON.stringify` walks insertion order, so the order below IS
|
|
73
|
+
* the format.
|
|
74
|
+
*/
|
|
75
|
+
export function serializeDocument<N extends NodeKindDefs, E extends EdgeKindDefs>(
|
|
76
|
+
doc: GraphDocument<N, E>,
|
|
77
|
+
): string {
|
|
78
|
+
const out: Record<string, unknown> = { version: doc.version };
|
|
79
|
+
out.nodes = doc.nodes.map((node) => {
|
|
80
|
+
const shaped: Record<string, unknown> = {
|
|
81
|
+
id: node.id,
|
|
82
|
+
kind: node.kind,
|
|
83
|
+
position: roundXY(node.position),
|
|
84
|
+
data: canonical(node.data),
|
|
85
|
+
};
|
|
86
|
+
if (node.size) {
|
|
87
|
+
shaped.size = { width: round2(node.size.width), height: round2(node.size.height) };
|
|
88
|
+
}
|
|
89
|
+
if (node.parent !== undefined) shaped.parent = node.parent;
|
|
90
|
+
if (node.locked !== undefined) shaped.locked = node.locked;
|
|
91
|
+
return shaped;
|
|
92
|
+
});
|
|
93
|
+
out.edges = doc.edges.map((edge) => {
|
|
94
|
+
const shaped: Record<string, unknown> = {
|
|
95
|
+
id: edge.id,
|
|
96
|
+
kind: edge.kind,
|
|
97
|
+
source: { node: edge.source.node, port: edge.source.port },
|
|
98
|
+
target: { node: edge.target.node, port: edge.target.port },
|
|
99
|
+
data: canonical(edge.data),
|
|
100
|
+
};
|
|
101
|
+
if (edge.label !== undefined) shaped.label = edge.label;
|
|
102
|
+
return shaped;
|
|
103
|
+
});
|
|
104
|
+
if (doc.viewport) {
|
|
105
|
+
out.viewport = {
|
|
106
|
+
x: round2(doc.viewport.x),
|
|
107
|
+
y: round2(doc.viewport.y),
|
|
108
|
+
zoom: round2(doc.viewport.zoom),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (doc.meta) out.meta = canonical(doc.meta);
|
|
112
|
+
return JSON.stringify(out, null, 2);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface Collector {
|
|
116
|
+
readonly problems: DocumentProblem[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function fail(collector: Collector, path: string, code: string, message: string): void {
|
|
120
|
+
collector.problems.push({ path, code, message });
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
124
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function readXY(value: unknown, path: string, collector: Collector): XY | undefined {
|
|
128
|
+
if (!isPlainObject(value)) {
|
|
129
|
+
fail(collector, path, "not-an-object", "expected an object with numeric x and y");
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
let ok = true;
|
|
133
|
+
for (const axis of ["x", "y"] as const) {
|
|
134
|
+
if (typeof value[axis] !== "number" || !Number.isFinite(value[axis])) {
|
|
135
|
+
fail(collector, `${path}.${axis}`, "not-a-finite-number", `expected a finite number`);
|
|
136
|
+
ok = false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return ok ? { x: round2(value.x as number), y: round2(value.y as number) } : undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function readSize(value: unknown, path: string, collector: Collector): Size | undefined {
|
|
143
|
+
if (!isPlainObject(value)) {
|
|
144
|
+
fail(collector, path, "not-an-object", "expected an object with numeric width and height");
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
let ok = true;
|
|
148
|
+
for (const axis of ["width", "height"] as const) {
|
|
149
|
+
if (typeof value[axis] !== "number" || !Number.isFinite(value[axis])) {
|
|
150
|
+
fail(collector, `${path}.${axis}`, "not-a-finite-number", `expected a finite number`);
|
|
151
|
+
ok = false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return ok
|
|
155
|
+
? { width: round2(value.width as number), height: round2(value.height as number) }
|
|
156
|
+
: undefined;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function readViewport(value: unknown, collector: Collector): Viewport | undefined {
|
|
160
|
+
const xy = readXY(value, "viewport", collector);
|
|
161
|
+
const zoom = isPlainObject(value) ? value.zoom : undefined;
|
|
162
|
+
if (typeof zoom !== "number" || !Number.isFinite(zoom)) {
|
|
163
|
+
fail(collector, "viewport.zoom", "not-a-finite-number", "expected a finite number");
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
return xy ? { ...xy, zoom: round2(zoom) } : undefined;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function readString(
|
|
170
|
+
source: Record<string, unknown>,
|
|
171
|
+
key: string,
|
|
172
|
+
path: string,
|
|
173
|
+
collector: Collector,
|
|
174
|
+
): string | undefined {
|
|
175
|
+
const value = source[key];
|
|
176
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
177
|
+
fail(collector, `${path}.${key}`, "not-a-non-empty-string", "expected a non-empty string");
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function readPortRef(
|
|
184
|
+
value: unknown,
|
|
185
|
+
path: string,
|
|
186
|
+
collector: Collector,
|
|
187
|
+
): { node: string; port: string } | undefined {
|
|
188
|
+
if (!isPlainObject(value)) {
|
|
189
|
+
fail(collector, path, "not-an-object", "expected { node, port }");
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
const node = readString(value, "node", path, collector);
|
|
193
|
+
const port = readString(value, "port", path, collector);
|
|
194
|
+
return node !== undefined && port !== undefined ? { node, port } : undefined;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Never throws. Every path out of this function is a `Result`, including the
|
|
199
|
+
* one where something below it does throw.
|
|
200
|
+
*/
|
|
201
|
+
export function parseDocument<N extends NodeKindDefs, E extends EdgeKindDefs>(
|
|
202
|
+
raw: string | unknown,
|
|
203
|
+
schema: DocumentSchema<N, E>,
|
|
204
|
+
options: ParseOptions = {},
|
|
205
|
+
): Result<GraphDocument<N, E>, readonly DocumentProblem[]> {
|
|
206
|
+
try {
|
|
207
|
+
return parseUnsafe<N, E>(raw, schema, options);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
// A bug here must still not take the canvas down. It reports as a problem
|
|
210
|
+
// like any other and the caller renders an EmptyState.
|
|
211
|
+
return {
|
|
212
|
+
ok: false,
|
|
213
|
+
error: [
|
|
214
|
+
{
|
|
215
|
+
path: "",
|
|
216
|
+
code: "internal-error",
|
|
217
|
+
message: error instanceof Error ? error.message : String(error),
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function parseUnsafe<N extends NodeKindDefs, E extends EdgeKindDefs>(
|
|
225
|
+
raw: string | unknown,
|
|
226
|
+
schema: DocumentSchema<N, E>,
|
|
227
|
+
options: ParseOptions,
|
|
228
|
+
): Result<GraphDocument<N, E>, readonly DocumentProblem[]> {
|
|
229
|
+
const collector: Collector = { problems: [] };
|
|
230
|
+
let value: unknown = raw;
|
|
231
|
+
|
|
232
|
+
if (typeof raw === "string") {
|
|
233
|
+
try {
|
|
234
|
+
value = JSON.parse(raw);
|
|
235
|
+
} catch (error) {
|
|
236
|
+
return {
|
|
237
|
+
ok: false,
|
|
238
|
+
error: [
|
|
239
|
+
{
|
|
240
|
+
path: "",
|
|
241
|
+
code: "invalid-json",
|
|
242
|
+
message: error instanceof Error ? error.message : "could not be parsed as JSON",
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (!isPlainObject(value)) {
|
|
250
|
+
return {
|
|
251
|
+
ok: false,
|
|
252
|
+
error: [{ path: "", code: "not-an-object", message: "a document is a JSON object" }],
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (value.version !== documentVersion) {
|
|
257
|
+
fail(
|
|
258
|
+
collector,
|
|
259
|
+
"version",
|
|
260
|
+
"unsupported-version",
|
|
261
|
+
`expected version ${documentVersion}, got ${JSON.stringify(value.version)}`,
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const nodeKinds = new Set(Object.keys(schema.nodes));
|
|
266
|
+
const edgeKinds = new Set(Object.keys(schema.edges));
|
|
267
|
+
const drop = options.dropUnknownKinds === true;
|
|
268
|
+
|
|
269
|
+
const nodes: GraphNodeOf<N>[] = [];
|
|
270
|
+
const nodeIds = new Set<string>();
|
|
271
|
+
if (!Array.isArray(value.nodes)) {
|
|
272
|
+
fail(collector, "nodes", "not-an-array", "expected an array of nodes");
|
|
273
|
+
} else {
|
|
274
|
+
value.nodes.forEach((entry, index) => {
|
|
275
|
+
const path = `nodes[${index}]`;
|
|
276
|
+
if (!isPlainObject(entry)) {
|
|
277
|
+
fail(collector, path, "not-an-object", "expected a node object");
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const id = readString(entry, "id", path, collector);
|
|
281
|
+
const kind = readString(entry, "kind", path, collector);
|
|
282
|
+
const position = readXY(entry.position, `${path}.position`, collector);
|
|
283
|
+
if (kind !== undefined && !nodeKinds.has(kind)) {
|
|
284
|
+
if (drop) return;
|
|
285
|
+
fail(
|
|
286
|
+
collector,
|
|
287
|
+
`${path}.kind`,
|
|
288
|
+
"unknown-node-kind",
|
|
289
|
+
`the schema has no node kind ${JSON.stringify(kind)}`,
|
|
290
|
+
);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (!("data" in entry)) {
|
|
294
|
+
fail(collector, `${path}.data`, "missing-field", "a node carries its kind's data");
|
|
295
|
+
}
|
|
296
|
+
if (id !== undefined && nodeIds.has(id)) {
|
|
297
|
+
fail(
|
|
298
|
+
collector,
|
|
299
|
+
`${path}.id`,
|
|
300
|
+
"duplicate-id",
|
|
301
|
+
`node id ${JSON.stringify(id)} is used twice`,
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
const size = "size" in entry ? readSize(entry.size, `${path}.size`, collector) : undefined;
|
|
305
|
+
if (id === undefined || kind === undefined || position === undefined) return;
|
|
306
|
+
nodeIds.add(id);
|
|
307
|
+
const node: Record<string, unknown> = { id, kind, position, data: entry.data };
|
|
308
|
+
if (size) node.size = size;
|
|
309
|
+
if (typeof entry.parent === "string") node.parent = entry.parent;
|
|
310
|
+
if (typeof entry.locked === "boolean") node.locked = entry.locked;
|
|
311
|
+
nodes.push(node as GraphNodeOf<N>);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const edges: GraphEdgeOf<E>[] = [];
|
|
316
|
+
const edgeIds = new Set<string>();
|
|
317
|
+
if (!Array.isArray(value.edges)) {
|
|
318
|
+
fail(collector, "edges", "not-an-array", "expected an array of edges");
|
|
319
|
+
} else {
|
|
320
|
+
value.edges.forEach((entry, index) => {
|
|
321
|
+
const path = `edges[${index}]`;
|
|
322
|
+
if (!isPlainObject(entry)) {
|
|
323
|
+
fail(collector, path, "not-an-object", "expected an edge object");
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const id = readString(entry, "id", path, collector);
|
|
327
|
+
const kind = readString(entry, "kind", path, collector);
|
|
328
|
+
const source = readPortRef(entry.source, `${path}.source`, collector);
|
|
329
|
+
const target = readPortRef(entry.target, `${path}.target`, collector);
|
|
330
|
+
if (kind !== undefined && !edgeKinds.has(kind)) {
|
|
331
|
+
if (drop) return;
|
|
332
|
+
fail(
|
|
333
|
+
collector,
|
|
334
|
+
`${path}.kind`,
|
|
335
|
+
"unknown-edge-kind",
|
|
336
|
+
`the schema has no edge kind ${JSON.stringify(kind)}`,
|
|
337
|
+
);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
if (!("data" in entry)) {
|
|
341
|
+
fail(collector, `${path}.data`, "missing-field", "an edge carries its kind's data");
|
|
342
|
+
}
|
|
343
|
+
if (id !== undefined && edgeIds.has(id)) {
|
|
344
|
+
fail(
|
|
345
|
+
collector,
|
|
346
|
+
`${path}.id`,
|
|
347
|
+
"duplicate-id",
|
|
348
|
+
`edge id ${JSON.stringify(id)} is used twice`,
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
for (const [end, ref] of [
|
|
352
|
+
["source", source],
|
|
353
|
+
["target", target],
|
|
354
|
+
] as const) {
|
|
355
|
+
if (ref && !nodeIds.has(ref.node)) {
|
|
356
|
+
// Under dropUnknownKinds the node may have been dropped on purpose,
|
|
357
|
+
// so the edge goes with it instead of reporting.
|
|
358
|
+
if (drop) return;
|
|
359
|
+
fail(
|
|
360
|
+
collector,
|
|
361
|
+
`${path}.${end}.node`,
|
|
362
|
+
"dangling-edge-endpoint",
|
|
363
|
+
`no node ${JSON.stringify(ref.node)} in this document`,
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (id === undefined || kind === undefined || source === undefined || target === undefined) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
edgeIds.add(id);
|
|
371
|
+
const edge: Record<string, unknown> = { id, kind, source, target, data: entry.data };
|
|
372
|
+
if (typeof entry.label === "string") edge.label = entry.label;
|
|
373
|
+
edges.push(edge as GraphEdgeOf<E>);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const viewport =
|
|
378
|
+
value.viewport === undefined ? undefined : readViewport(value.viewport, collector);
|
|
379
|
+
|
|
380
|
+
let meta: Readonly<Record<string, JsonValue>> | undefined;
|
|
381
|
+
if (value.meta !== undefined) {
|
|
382
|
+
if (!isPlainObject(value.meta)) {
|
|
383
|
+
fail(collector, "meta", "not-an-object", "meta is a JSON object");
|
|
384
|
+
} else {
|
|
385
|
+
meta = value.meta as Readonly<Record<string, JsonValue>>;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (collector.problems.length > 0) return { ok: false, error: collector.problems };
|
|
390
|
+
|
|
391
|
+
const doc: Record<string, unknown> = { version: documentVersion, nodes, edges };
|
|
392
|
+
if (viewport) doc.viewport = viewport;
|
|
393
|
+
if (meta) doc.meta = meta;
|
|
394
|
+
return { ok: true, value: doc as unknown as GraphDocument<N, E> };
|
|
395
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a DOM-only story draws on Hermes (milestone 6, task 6.8).
|
|
3
|
+
*
|
|
4
|
+
* Some stories in this package are about the DOM and nothing else: a `<span>`
|
|
5
|
+
* with a corrupted font stack, a `<style>` element, a React Flow `Handle` — a
|
|
6
|
+
* `div` — mounted OUTSIDE a canvas so the port can be seen off it. React Native
|
|
7
|
+
* answers a lowercase intrinsic it does not know with `View config getter
|
|
8
|
+
* callback for component "div" must be a function` and takes the whole tree
|
|
9
|
+
* down, so on the Kitchen Sink those stories were a red box. Measured on the
|
|
10
|
+
* iPhone 16e at MPO-211 and again on MPO-212's device pass.
|
|
11
|
+
*
|
|
12
|
+
* A red box is the worst of the three possible outcomes. It looks like a defect
|
|
13
|
+
* in the thing being demonstrated, it hides which stories actually work, and it
|
|
14
|
+
* teaches a reader nothing about where the answer IS. `FontProof` had already
|
|
15
|
+
* solved this by hand — it draws a sentence naming `NodeGraph → Diagnostics →
|
|
16
|
+
* Live`, where the probe that ran inside the WebView is rendered. This is that
|
|
17
|
+
* guard, extracted, so the next DOM-only story costs one decorator instead of
|
|
18
|
+
* twenty lines.
|
|
19
|
+
*
|
|
20
|
+
* `hasDomRealm` is a `document` check and not a `Platform.OS` check on purpose:
|
|
21
|
+
* `react-native` is an OPTIONAL peer of this package, and a story file must not
|
|
22
|
+
* be the thing that makes it required. It is also the more honest question —
|
|
23
|
+
* what these stories need is a DOM, and a DOM is exactly what is being tested
|
|
24
|
+
* for.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { SizableText, YStack } from "tamagui";
|
|
28
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
29
|
+
|
|
30
|
+
/** True in a browser and inside the canvas's WebView; false on Hermes. */
|
|
31
|
+
export const hasDomRealm = typeof globalThis.document !== "undefined";
|
|
32
|
+
|
|
33
|
+
export interface DomOnlyStoryProps {
|
|
34
|
+
/** What this story needs a DOM for, in a clause. */
|
|
35
|
+
readonly needs: string;
|
|
36
|
+
/** Where the same thing CAN be read on device. A story title, not a URL. */
|
|
37
|
+
readonly readInstead?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One line, not an error.
|
|
42
|
+
*
|
|
43
|
+
* Every style is a whole `knobProps.*` fragment spread (AGENTS.md); nothing here
|
|
44
|
+
* cherry-picks a resolved token and nothing here is a literal.
|
|
45
|
+
*/
|
|
46
|
+
export function DomOnlyStory({ needs, readInstead }: DomOnlyStoryProps) {
|
|
47
|
+
const { knobProps } = useResolvedKnobs();
|
|
48
|
+
return (
|
|
49
|
+
<YStack {...knobProps.gap} {...knobProps.panelPadding}>
|
|
50
|
+
<SizableText {...knobProps.body} {...knobProps.label}>
|
|
51
|
+
{`Web only — this story ${needs}, and there is no DOM on this side of the bridge.`}
|
|
52
|
+
</SizableText>
|
|
53
|
+
{readInstead ? (
|
|
54
|
+
<SizableText {...knobProps.body} {...knobProps.label} opacity={0.75}>
|
|
55
|
+
{`On device, read ${readInstead} instead.`}
|
|
56
|
+
</SizableText>
|
|
57
|
+
) : null}
|
|
58
|
+
</YStack>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* A Storybook decorator, so guarding a whole file is one line in its `meta`.
|
|
64
|
+
*
|
|
65
|
+
* It replaces the story rather than wrapping it: the point is that the tree
|
|
66
|
+
* below must never be constructed, and a wrapper that rendered its child and
|
|
67
|
+
* then apologised would still have thrown on the way.
|
|
68
|
+
*/
|
|
69
|
+
export function domOnlyStoryDecorator(props: DomOnlyStoryProps) {
|
|
70
|
+
return (Story: () => React.ReactElement) =>
|
|
71
|
+
hasDomRealm ? <Story /> : <DomOnlyStory {...props} />;
|
|
72
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the user sees instead of a blank rectangle.
|
|
3
|
+
*
|
|
4
|
+
* Design 9.4 layer 4. The WebView failed, and the one thing worth knowing is
|
|
5
|
+
* HOW FAR it got: `script` means the bundle parsed and nothing else ran,
|
|
6
|
+
* `module` means the tree failed to evaluate, `flow` means React Flow mounted
|
|
7
|
+
* and never painted. Each sends a reader to a different layer, and a spinner
|
|
8
|
+
* that never resolves sends them nowhere.
|
|
9
|
+
*
|
|
10
|
+
* Built from `tamagui` and the real `useResolvedKnobs`, deliberately NOT from
|
|
11
|
+
* `@multiplatform.one/components`' `EmptyState`: components is an OPTIONAL
|
|
12
|
+
* peer, and a fallback that cannot render because its own dependency is absent
|
|
13
|
+
* is not a fallback. The rest of the native shell — toolbar, sheet, inspector —
|
|
14
|
+
* may use components freely.
|
|
15
|
+
*
|
|
16
|
+
* Every style comes from a whole `knobProps.*` fragment spread (AGENTS.md);
|
|
17
|
+
* nothing here cherry-picks a resolved token and nothing here is a literal.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
21
|
+
import { Button, SizableText, YStack } from "tamagui";
|
|
22
|
+
import type { BootStage } from "../dom/boot";
|
|
23
|
+
|
|
24
|
+
export type GraphFallbackReason = "no-ready" | "no-dom-entry" | "module" | "render" | "runtime";
|
|
25
|
+
|
|
26
|
+
export interface GraphFallbackProps {
|
|
27
|
+
/** Whether ANY event arrived from the canvas. A stage-less failure reads differently either way. */
|
|
28
|
+
readonly started?: boolean;
|
|
29
|
+
readonly reason: GraphFallbackReason;
|
|
30
|
+
/** The last stage the WebView stamped, or `null` if it never stamped one. */
|
|
31
|
+
readonly stage?: BootStage | null;
|
|
32
|
+
readonly message?: string;
|
|
33
|
+
/** The watchdog budget that ran out, so the reader knows what "did not finish" cost. */
|
|
34
|
+
readonly waitedMs?: number;
|
|
35
|
+
readonly onRetry?: () => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const reasonTitles: Record<GraphFallbackReason, string> = {
|
|
39
|
+
"no-ready": "The graph did not finish loading",
|
|
40
|
+
// Not a failure of the canvas — the canvas was never started. Design §9.3:
|
|
41
|
+
// the `'use dom'` entry is app-owned, and no app supplied one.
|
|
42
|
+
"no-dom-entry": "The graph has no DOM entry",
|
|
43
|
+
module: "The graph failed to load",
|
|
44
|
+
render: "The graph could not be drawn",
|
|
45
|
+
runtime: "The graph stopped",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* `stage: null` gets its own sentence rather than the word "null".
|
|
50
|
+
*
|
|
51
|
+
* Nothing stamped at all means the script never executed, which is what a
|
|
52
|
+
* parse error looks like from out here — a different problem from stopping AT
|
|
53
|
+
* `script`, and the two must not read the same.
|
|
54
|
+
*/
|
|
55
|
+
export function graphFallbackDetail(
|
|
56
|
+
stage: BootStage | null | undefined,
|
|
57
|
+
started?: boolean,
|
|
58
|
+
reason?: GraphFallbackReason,
|
|
59
|
+
waitedMs?: number,
|
|
60
|
+
): string {
|
|
61
|
+
// This one is not about how far boot got, because boot never began: no
|
|
62
|
+
// WebView was created at all. Saying "it never started" here would be true
|
|
63
|
+
// and useless, and would send the reader looking for a parse error.
|
|
64
|
+
if (reason === "no-dom-entry") {
|
|
65
|
+
return "No `'use dom'` entry was supplied, so no WebView was created.";
|
|
66
|
+
}
|
|
67
|
+
const waited = waitedMs ? ` after ${waitedMs} ms` : "";
|
|
68
|
+
if (stage) return `It reached "${stage}" and stopped there${waited}.`;
|
|
69
|
+
// Measured on the iPhone 16e simulator, and the reason this took an argument:
|
|
70
|
+
// the canvas reported a render error over the bridge — so it plainly HAD
|
|
71
|
+
// started — and this line still read "it never started", which sent the next
|
|
72
|
+
// reader looking for a parse error that was not there. The host only learns a
|
|
73
|
+
// stage from `ready`, so an error before that leaves the stage null while
|
|
74
|
+
// proving the script ran.
|
|
75
|
+
if (started) return `It started and reported a problem before it finished loading${waited}.`;
|
|
76
|
+
// WHY THIS NO LONGER NAMES A PARSE ERROR (MPO-211). It used to read "It never
|
|
77
|
+
// started, which usually means the bundle failed to parse." On emulator-5590,
|
|
78
|
+
// rebooted fresh, that is exactly what a reader saw — and nothing had failed
|
|
79
|
+
// to parse: the WebView was still starting, and Retry rendered the canvas at
|
|
80
|
+
// once. A watchdog cannot tell "dead" from "slow", so the line now says only
|
|
81
|
+
// what it knows and names the likelier of the two first.
|
|
82
|
+
return (
|
|
83
|
+
`Nothing came back from the WebView${waited}. ` +
|
|
84
|
+
"A slow cold start is the usual cause — Retry is often enough. " +
|
|
85
|
+
"A bundle that fails to parse looks identical from out here, and would " +
|
|
86
|
+
"still be silent on a retry."
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function GraphFallback({
|
|
91
|
+
message,
|
|
92
|
+
onRetry,
|
|
93
|
+
reason,
|
|
94
|
+
stage,
|
|
95
|
+
started,
|
|
96
|
+
waitedMs,
|
|
97
|
+
}: GraphFallbackProps) {
|
|
98
|
+
const { knobProps } = useResolvedKnobs();
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<YStack
|
|
102
|
+
accessibilityRole="alert"
|
|
103
|
+
alignItems="center"
|
|
104
|
+
flex={1}
|
|
105
|
+
justifyContent="center"
|
|
106
|
+
{...knobProps.gap}
|
|
107
|
+
{...knobProps.panelPadding}
|
|
108
|
+
>
|
|
109
|
+
<SizableText {...knobProps.label} textAlign="center">
|
|
110
|
+
{reasonTitles[reason]}
|
|
111
|
+
</SizableText>
|
|
112
|
+
<SizableText {...knobProps.body} {...knobProps.label} textAlign="center">
|
|
113
|
+
{graphFallbackDetail(stage, started, reason, waitedMs)}
|
|
114
|
+
</SizableText>
|
|
115
|
+
{message ? (
|
|
116
|
+
<SizableText {...knobProps.body} {...knobProps.label} opacity={0.75} textAlign="center">
|
|
117
|
+
{message}
|
|
118
|
+
</SizableText>
|
|
119
|
+
) : null}
|
|
120
|
+
{onRetry ? <Button onPress={onRetry}>Retry</Button> : null}
|
|
121
|
+
</YStack>
|
|
122
|
+
);
|
|
123
|
+
}
|