@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,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A REAL canvas with design §9.5's panel under it — the web half.
|
|
3
|
+
*
|
|
4
|
+
* WHY IT EXISTS (MPO-211). `NodeGraph/Diagnostics` was a harness: it walked the
|
|
5
|
+
* boot stages by hand and fed the panel synthetic input, including
|
|
6
|
+
* `nodesMounted: loaded ? 12 : 0` — a literal, in the one story whose job was
|
|
7
|
+
* to prove that number. A harness that hardcodes the thing it exists to prove
|
|
8
|
+
* is worse than no harness, so the harness keeps the half it is genuinely good
|
|
9
|
+
* at (breaking the bundle on purpose) and this component owns the measured
|
|
10
|
+
* half.
|
|
11
|
+
*
|
|
12
|
+
* Every number below comes from the canvas mounted beside it:
|
|
13
|
+
*
|
|
14
|
+
* - `nodesMounted` from `nodeCensus`, which counts `GraphNodeHost` instances
|
|
15
|
+
* and therefore counts node bodies React Flow actually rendered;
|
|
16
|
+
* - `nodesInDocument` from the document handed to the canvas;
|
|
17
|
+
* - `faces` from design §6.3's corrupted-first-family probe, run against a
|
|
18
|
+
* node title the canvas rendered;
|
|
19
|
+
* - `faceDelivery` from `GraphFaces`, which is how the panel says whether the
|
|
20
|
+
* asset URL answered or the base64 carried it.
|
|
21
|
+
*
|
|
22
|
+
* The native twin is `LiveGraphDiagnostics.native.tsx`, and it reads the same
|
|
23
|
+
* record out of the WebView's `ready` event instead. Only a `.native.tsx`
|
|
24
|
+
* twin, never a `.web.*` one (MPO-192).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { useCallback, useEffect, useState, useSyncExternalStore } from "react";
|
|
28
|
+
import { SizableText, YStack } from "tamagui";
|
|
29
|
+
import { useKnobEnvelope } from "../knobs/useKnobEnvelope";
|
|
30
|
+
import { NodeGraph } from "../NodeGraph";
|
|
31
|
+
import { demoGraphSchema } from "../react-flow/demoNodeBody";
|
|
32
|
+
import { demoDocumentLarge } from "../react-flow/fixtures";
|
|
33
|
+
import { mountedNodeCount, subscribeNodeCensus } from "../react-flow/nodeCensus";
|
|
34
|
+
import { Background } from "../react-flow/xy";
|
|
35
|
+
import { GraphFaces } from "../theme/GraphFaces";
|
|
36
|
+
import type { GraphFaceStatus } from "../theme/GraphFaces";
|
|
37
|
+
import { probeRenderedFamily } from "../theme/faces";
|
|
38
|
+
import type { FaceProbe } from "../theme/faces";
|
|
39
|
+
import { GraphDiagnostics } from "./GraphDiagnostics";
|
|
40
|
+
import { useGraphDiagnostics } from "./useGraphDiagnostics";
|
|
41
|
+
|
|
42
|
+
const schema = demoGraphSchema();
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The same twelve `NodeGraph/NodeGraph` → `Main` mounts, built once at module
|
|
46
|
+
* scope so a re-render cannot hand the canvas a new document identity.
|
|
47
|
+
*/
|
|
48
|
+
const document12 = demoDocumentLarge(12);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The URLs `apps/storybook` serves from `public/fonts` (`staticDirs`).
|
|
52
|
+
*
|
|
53
|
+
* Named here so the WEB panel reports `asset` delivery while the device panel
|
|
54
|
+
* reports `inline` — the two mechanisms of §6.3, each proven where it is the
|
|
55
|
+
* one that runs.
|
|
56
|
+
*/
|
|
57
|
+
const webAssetUris = {
|
|
58
|
+
"inter-400": "/fonts/inter-400.woff2",
|
|
59
|
+
"inter-700": "/fonts/inter-700.woff2",
|
|
60
|
+
} as const;
|
|
61
|
+
|
|
62
|
+
export function LiveGraphDiagnostics() {
|
|
63
|
+
const nodesMounted = useSyncExternalStore(
|
|
64
|
+
subscribeNodeCensus,
|
|
65
|
+
mountedNodeCount,
|
|
66
|
+
mountedNodeCount,
|
|
67
|
+
);
|
|
68
|
+
const [faces, setFaces] = useState<readonly FaceProbe[]>([]);
|
|
69
|
+
const [faceDelivery, setFaceDelivery] = useState<readonly GraphFaceStatus[]>([]);
|
|
70
|
+
const envelope = useKnobEnvelope({});
|
|
71
|
+
|
|
72
|
+
const onFaceStatus = useCallback(
|
|
73
|
+
(statuses: readonly GraphFaceStatus[]) => setFaceDelivery(statuses),
|
|
74
|
+
[],
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
// Probed once the faces have resolved AND a node has mounted: a width
|
|
78
|
+
// measured before either is worthless, and `probeFamily` would report it as
|
|
79
|
+
// inconclusive rather than as a miss.
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (nodesMounted === 0) return;
|
|
82
|
+
let live = true;
|
|
83
|
+
void (async () => {
|
|
84
|
+
await globalThis.document.fonts.ready;
|
|
85
|
+
if (!live) return;
|
|
86
|
+
const title = globalThis.document.querySelector("[data-graph-node-title]");
|
|
87
|
+
if (!title) return;
|
|
88
|
+
const probe = probeRenderedFamily(title);
|
|
89
|
+
if (probe.stack) setFaces([probe]);
|
|
90
|
+
})();
|
|
91
|
+
return () => {
|
|
92
|
+
live = false;
|
|
93
|
+
};
|
|
94
|
+
}, [nodesMounted]);
|
|
95
|
+
|
|
96
|
+
const diagnostics = useGraphDiagnostics({
|
|
97
|
+
renderer: "react-flow-web",
|
|
98
|
+
faces,
|
|
99
|
+
faceDelivery,
|
|
100
|
+
nodesMounted,
|
|
101
|
+
nodesInDocument: document12.nodes.length,
|
|
102
|
+
culling: true,
|
|
103
|
+
renderMode: "detail",
|
|
104
|
+
scheme: envelope.scheme,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<YStack gap="$3" padding="$3">
|
|
109
|
+
<GraphFaces assetUris={webAssetUris} onStatus={onFaceStatus} />
|
|
110
|
+
<YStack width="100%" height={360}>
|
|
111
|
+
<NodeGraph schema={schema} defaultDocument={document12}>
|
|
112
|
+
<Background />
|
|
113
|
+
</NodeGraph>
|
|
114
|
+
</YStack>
|
|
115
|
+
<SizableText size="$2" opacity={0.6}>
|
|
116
|
+
Every value below is read off the canvas above. Nothing here is a literal.
|
|
117
|
+
</SizableText>
|
|
118
|
+
<GraphDiagnostics diagnostics={diagnostics} show />
|
|
119
|
+
</YStack>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A module that throws when it is evaluated. That is its whole job.
|
|
3
|
+
*
|
|
4
|
+
* Design §9.5 asks for a story toggle that "deliberately breaks the bundle so
|
|
5
|
+
* the fallback path is a story rather than a hope". A toggle that only sets a
|
|
6
|
+
* flag would exercise a branch, not the failure — the real failure is a module
|
|
7
|
+
* whose EVALUATION throws inside `await import(...)`, which is what the boot
|
|
8
|
+
* heartbeat of §9.4 layer 3 is built to catch and what the diagnostics panel
|
|
9
|
+
* has to be able to name.
|
|
10
|
+
*
|
|
11
|
+
* SAFE TO SHIP, and `GraphDiagnostics.stories.tsx` is the only importer:
|
|
12
|
+
*
|
|
13
|
+
* - It is reached exclusively through a dynamic `import()` behind a story
|
|
14
|
+
* control, so nothing evaluates it unless a human flips the switch.
|
|
15
|
+
* - The package build EXCLUDES THIS FILE BY NAME, so no compiled copy exists.
|
|
16
|
+
* Excluding only `*.stories.*` was not enough and the first build proved
|
|
17
|
+
* it: `tamagui-build` compiles every source file it finds, reachable or
|
|
18
|
+
* not, and emitted `dist/esm/diagnostics/deliberateBreak.mjs`. The exclude
|
|
19
|
+
* pattern is the same mechanism that keeps the DOM entry out of `dist`.
|
|
20
|
+
* - `GraphDiagnostics.spec.tsx` asserts no non-story module under `src/`
|
|
21
|
+
* imports it, so it cannot quietly acquire a second caller.
|
|
22
|
+
*
|
|
23
|
+
* The message is written to look like the failure it stands in for: the
|
|
24
|
+
* `import.meta` parse error that blanks a WebView with no reachable error
|
|
25
|
+
* boundary (design §9.4).
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
throw new Error(
|
|
29
|
+
"deliberate break: Cannot use 'import.meta' outside a module (simulated, node-graph diagnostics story)",
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
// TypeScript treats a file with no import or export as a global script, and a
|
|
33
|
+
// global script cannot be the target of `import()`. This is what makes the file
|
|
34
|
+
// a module; it never runs, because the throw above is unconditional.
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ready` payload becoming design §9.5's record.
|
|
3
|
+
*
|
|
4
|
+
* The interesting half is `layoutRunner`: the wire types it as a plain string
|
|
5
|
+
* so milestone 4 can add a runner without a bridge change, and the record types
|
|
6
|
+
* it as a union the panel renders. A cast would let a canvas one version ahead
|
|
7
|
+
* put a runner name on screen that this build knows nothing about; narrowing to
|
|
8
|
+
* `none` says "no runner I recognise" instead, which is the honest reading of
|
|
9
|
+
* an unknown value.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { describe, expect, it } from "vitest";
|
|
13
|
+
import type { GraphDiagnosticsWire } from "../dom/wire";
|
|
14
|
+
import { graphDiagnosticsFromWire } from "./fromWire";
|
|
15
|
+
|
|
16
|
+
const wire: GraphDiagnosticsWire = {
|
|
17
|
+
stage: "ready",
|
|
18
|
+
bootMs: 1204,
|
|
19
|
+
renderer: "react-flow-dom",
|
|
20
|
+
xyflowVersion: "12.11.5",
|
|
21
|
+
layoutRunner: "none",
|
|
22
|
+
faces: [
|
|
23
|
+
{
|
|
24
|
+
stack: 'Inter, "Helvetica Neue", sans-serif',
|
|
25
|
+
widthStack: 210.13,
|
|
26
|
+
widthFirstCorrupted: 205.28,
|
|
27
|
+
matched: true,
|
|
28
|
+
conclusive: true,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
faceDelivery: [{ id: "inter-400", family: "Inter", weight: 400, source: "inline" }],
|
|
32
|
+
nodesMounted: 10,
|
|
33
|
+
nodesInDocument: 12,
|
|
34
|
+
culling: true,
|
|
35
|
+
renderMode: "detail",
|
|
36
|
+
scheme: "dark",
|
|
37
|
+
lastError: null,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
describe("graphDiagnosticsFromWire", () => {
|
|
41
|
+
it("carries every field the panel renders", () => {
|
|
42
|
+
const record = graphDiagnosticsFromWire(wire);
|
|
43
|
+
expect(record.stage).toBe("ready");
|
|
44
|
+
expect(record.bootMs).toBe(1204);
|
|
45
|
+
expect(record.nodesMounted).toBe(10);
|
|
46
|
+
expect(record.nodesInDocument).toBe(12);
|
|
47
|
+
expect(record.faces).toHaveLength(1);
|
|
48
|
+
expect(record.faceDelivery[0]?.source).toBe("inline");
|
|
49
|
+
expect(record.scheme).toBe("dark");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("keeps a runner kind it recognises", () => {
|
|
53
|
+
expect(graphDiagnosticsFromWire({ ...wire, layoutRunner: "worker-blob" }).layoutRunner).toBe(
|
|
54
|
+
"worker-blob",
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("narrows a runner it does not recognise to none, rather than casting", () => {
|
|
59
|
+
// A canvas from a later milestone naming a runner this build has never
|
|
60
|
+
// heard of. Reporting the string verbatim would put an unknown runner on
|
|
61
|
+
// screen as if this build knew what it meant.
|
|
62
|
+
expect(graphDiagnosticsFromWire({ ...wire, layoutRunner: "elk-worker" }).layoutRunner).toBe(
|
|
63
|
+
"none",
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("passes an error through as the panel's banner reads it", () => {
|
|
68
|
+
const record = graphDiagnosticsFromWire({
|
|
69
|
+
...wire,
|
|
70
|
+
lastError: { phase: "module", message: "boom" },
|
|
71
|
+
});
|
|
72
|
+
expect(record.lastError).toEqual({ phase: "module", message: "boom" });
|
|
73
|
+
});
|
|
74
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ready` event's payload, as design §9.5's record.
|
|
3
|
+
*
|
|
4
|
+
* The two shapes are the same fields with one deliberate difference:
|
|
5
|
+
* `GraphDiagnosticsWire.layoutRunner` is a plain string, so adding a layout
|
|
6
|
+
* runner in milestone 4 is not a bridge change. This is the one place that
|
|
7
|
+
* difference is reconciled, and an unknown runner narrows to `"none"` rather
|
|
8
|
+
* than being cast — a value the panel invented would read as a runner that ran.
|
|
9
|
+
*
|
|
10
|
+
* Everything else crosses unchanged. `FaceProbeWire` and `FaceProbe` are the
|
|
11
|
+
* same five fields, and `graphDiagnosticsWireFields` in `wire.spec.ts` is what
|
|
12
|
+
* holds them to that.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { GraphDiagnosticsWire } from "../dom/wire";
|
|
16
|
+
import type { GraphDiagnostics, LayoutRunnerKind } from "./types";
|
|
17
|
+
|
|
18
|
+
const layoutRunnerKinds: readonly LayoutRunnerKind[] = [
|
|
19
|
+
"worker-blob",
|
|
20
|
+
"worker-url",
|
|
21
|
+
"hermes-inline",
|
|
22
|
+
"inline",
|
|
23
|
+
"none",
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function asLayoutRunner(value: string): LayoutRunnerKind {
|
|
27
|
+
return (layoutRunnerKinds as readonly string[]).includes(value)
|
|
28
|
+
? (value as LayoutRunnerKind)
|
|
29
|
+
: "none";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function graphDiagnosticsFromWire(wire: GraphDiagnosticsWire): GraphDiagnostics {
|
|
33
|
+
return {
|
|
34
|
+
stage: wire.stage,
|
|
35
|
+
bootMs: wire.bootMs,
|
|
36
|
+
renderer: wire.renderer,
|
|
37
|
+
xyflowVersion: wire.xyflowVersion,
|
|
38
|
+
layoutRunner: asLayoutRunner(wire.layoutRunner),
|
|
39
|
+
faces: wire.faces,
|
|
40
|
+
faceDelivery: wire.faceDelivery,
|
|
41
|
+
nodesMounted: wire.nodesMounted,
|
|
42
|
+
nodesInDocument: wire.nodesInDocument,
|
|
43
|
+
culling: wire.culling,
|
|
44
|
+
renderMode: wire.renderMode,
|
|
45
|
+
scheme: wire.scheme,
|
|
46
|
+
lastError: wire.lastError,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one error worth reporting, kept where both halves of boot can reach it.
|
|
3
|
+
*
|
|
4
|
+
* Same shape and same reason as `dom/boot.ts`: `NodeGraphDom.ts` must carry no
|
|
5
|
+
* top-level import of ours that could itself throw (design §9.4 layer 3), so it
|
|
6
|
+
* writes this slot INLINE from its own catch block. A module-scoped variable
|
|
7
|
+
* would give the entry and the diagnostics panel two separate records, and the
|
|
8
|
+
* panel would report the empty one.
|
|
9
|
+
*
|
|
10
|
+
* Everything here treats the global as untrusted. A record another library
|
|
11
|
+
* clobbered, or a phase outside the wire's four, reads back as `null` rather
|
|
12
|
+
* than throwing inside the error path — which is the one path where a second
|
|
13
|
+
* throw costs you the diagnosis.
|
|
14
|
+
*
|
|
15
|
+
* Design: docs/design/node-graph-editor.md §9.5.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { GraphErrorPhase } from "../dom/wire";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The key `NodeGraphDom.ts` writes inline.
|
|
22
|
+
*
|
|
23
|
+
* Exported so `useGraphDiagnostics.spec.tsx` can assert the entry's literal and
|
|
24
|
+
* this module's reader still name the same slot — the one place the two halves
|
|
25
|
+
* could silently drift.
|
|
26
|
+
*/
|
|
27
|
+
export const graphErrorGlobalKey = "__mp_graph_error";
|
|
28
|
+
|
|
29
|
+
export interface GraphErrorRecord {
|
|
30
|
+
readonly phase: GraphErrorPhase;
|
|
31
|
+
readonly message: string;
|
|
32
|
+
readonly stack?: string;
|
|
33
|
+
/** `Date.now()` at the record, so a panel can say how long ago it happened. */
|
|
34
|
+
readonly at: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const phases: readonly GraphErrorPhase[] = ["boot", "module", "render", "runtime"];
|
|
38
|
+
|
|
39
|
+
function slot(): Record<string, unknown> {
|
|
40
|
+
return globalThis as unknown as Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function isPhase(value: unknown): value is GraphErrorPhase {
|
|
44
|
+
return typeof value === "string" && (phases as readonly string[]).includes(value);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The record as written, normalised. Anything unrecognisable reads as `null`. */
|
|
48
|
+
export function readGraphError(): GraphErrorRecord | null {
|
|
49
|
+
const raw = slot()[graphErrorGlobalKey];
|
|
50
|
+
if (!raw || typeof raw !== "object") return null;
|
|
51
|
+
const record = raw as Partial<GraphErrorRecord>;
|
|
52
|
+
if (!isPhase(record.phase)) return null;
|
|
53
|
+
if (typeof record.message !== "string") return null;
|
|
54
|
+
return {
|
|
55
|
+
phase: record.phase,
|
|
56
|
+
message: record.message,
|
|
57
|
+
stack: typeof record.stack === "string" ? record.stack : undefined,
|
|
58
|
+
at: typeof record.at === "number" ? record.at : 0,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Record an error, keeping the FIRST one.
|
|
64
|
+
*
|
|
65
|
+
* A module-eval throw usually produces a train of render errors behind it, and
|
|
66
|
+
* last-write-wins would report the consequence while the cause scrolled off.
|
|
67
|
+
* `resetGraphError` is what Retry calls before remounting, so a genuinely new
|
|
68
|
+
* boot is not judged on the previous one's failure.
|
|
69
|
+
*/
|
|
70
|
+
export function recordGraphError(error: {
|
|
71
|
+
readonly phase: GraphErrorPhase;
|
|
72
|
+
readonly message: string;
|
|
73
|
+
readonly stack?: string;
|
|
74
|
+
}): GraphErrorRecord | null {
|
|
75
|
+
if (!isPhase(error.phase) || typeof error.message !== "string") return readGraphError();
|
|
76
|
+
const previous = readGraphError();
|
|
77
|
+
if (previous) return previous;
|
|
78
|
+
const record: GraphErrorRecord = {
|
|
79
|
+
phase: error.phase,
|
|
80
|
+
message: error.message,
|
|
81
|
+
stack: error.stack,
|
|
82
|
+
at: Date.now(),
|
|
83
|
+
};
|
|
84
|
+
slot()[graphErrorGlobalKey] = record;
|
|
85
|
+
return record;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Test seam, and what Retry calls before remounting. */
|
|
89
|
+
export function resetGraphError(): void {
|
|
90
|
+
delete slot()[graphErrorGlobalKey];
|
|
91
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a WebView that came up wrong is able to tell you (design §9.5).
|
|
3
|
+
*
|
|
4
|
+
* Every field here answers a question an agent reading a device screenshot has
|
|
5
|
+
* to be able to answer without a console: how far did boot get, which renderer
|
|
6
|
+
* drew this, which layout runner resolved, did the face actually paint, how
|
|
7
|
+
* many nodes mounted, and what threw first.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { BootStage } from "../dom/boot";
|
|
11
|
+
import type { LayoutRunnerKind as LayoutEngineRunnerKind } from "../layout/types";
|
|
12
|
+
import type { GraphErrorPhase } from "../dom/wire";
|
|
13
|
+
import type { FaceProbe } from "../theme/faces";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Design §8's four, plus `none`.
|
|
17
|
+
*
|
|
18
|
+
* `none` is not in the design's union and is not a fifth strategy — it is the
|
|
19
|
+
* honest state before a canvas has resolved a runner. The alternative was
|
|
20
|
+
* reporting `inline`, which is a real runner and would read as "the worker
|
|
21
|
+
* fallback fired" to exactly the person the field exists for.
|
|
22
|
+
*
|
|
23
|
+
* The four are IMPORTED rather than restated. Milestone 4 made
|
|
24
|
+
* `layout/types.ts` the definition, and two hand-kept copies of a union is how
|
|
25
|
+
* a fifth runner ends up reportable in one file and not the other.
|
|
26
|
+
*/
|
|
27
|
+
export type LayoutRunnerKind = LayoutEngineRunnerKind | "none";
|
|
28
|
+
|
|
29
|
+
export type GraphRenderer = "react-flow-web" | "react-flow-dom";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Which of design 6.3's two mechanisms actually delivered a face.
|
|
33
|
+
*
|
|
34
|
+
* On device this is the whole answer to "did the asset URL work, or did the
|
|
35
|
+
* 211 KB of base64 carry it" — a question nothing on screen could answer
|
|
36
|
+
* before MPO-211, because `GraphFaces` reported it to a callback the panel
|
|
37
|
+
* never saw. `pending` means the probe has not answered yet, and is reported
|
|
38
|
+
* rather than guessed.
|
|
39
|
+
*/
|
|
40
|
+
export interface GraphFaceDelivery {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly family: string;
|
|
43
|
+
readonly weight: number;
|
|
44
|
+
readonly source: "asset" | "inline" | "pending" | "failed";
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GraphDiagnostics {
|
|
48
|
+
readonly stage: BootStage | null;
|
|
49
|
+
/**
|
|
50
|
+
* Milliseconds from the entry's `script` stamp to this record, or `null`
|
|
51
|
+
* where no boot record exists.
|
|
52
|
+
*
|
|
53
|
+
* The number the native watchdog's budget is set FROM (MPO-211). Design
|
|
54
|
+
* 9.4's 4000 ms was never measured; on emulator-5590 rebooted fresh it
|
|
55
|
+
* fired on a canvas that then rendered on the first Retry.
|
|
56
|
+
*/
|
|
57
|
+
readonly bootMs: number | null;
|
|
58
|
+
readonly renderer: GraphRenderer;
|
|
59
|
+
readonly xyflowVersion: string;
|
|
60
|
+
readonly layoutRunner: LayoutRunnerKind;
|
|
61
|
+
readonly faces: readonly FaceProbe[];
|
|
62
|
+
/** Which mechanism delivered each declared face. Empty where none was mounted. */
|
|
63
|
+
readonly faceDelivery: readonly GraphFaceDelivery[];
|
|
64
|
+
/**
|
|
65
|
+
* Node bodies React Flow has MOUNTED, from `nodeCensus` — not the document's
|
|
66
|
+
* node count, which is the field below.
|
|
67
|
+
*
|
|
68
|
+
* The two differ whenever `culling` is true: the demo document has 12 nodes
|
|
69
|
+
* and mounts 10 at the default viewport. Reporting one number for both is
|
|
70
|
+
* what made "renders 12 nodes" unreadable off a device screenshot.
|
|
71
|
+
*/
|
|
72
|
+
readonly nodesMounted: number;
|
|
73
|
+
/** Nodes in the document the canvas parsed. */
|
|
74
|
+
readonly nodesInDocument: number;
|
|
75
|
+
readonly culling: boolean;
|
|
76
|
+
readonly renderMode: "detail" | "overview";
|
|
77
|
+
readonly scheme: "light" | "dark";
|
|
78
|
+
readonly lastError: { readonly phase: GraphErrorPhase; readonly message: string } | null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* What the caller knows, as against what this module derives.
|
|
83
|
+
*
|
|
84
|
+
* The split is deliberate. `stage`, `xyflowVersion` and `lastError` are read
|
|
85
|
+
* from module state and cannot be faked by a caller; the rest are live values
|
|
86
|
+
* only the canvas holds. Making the canvas hand them in beats reaching into
|
|
87
|
+
* React Flow's store from a second place — `renderMode` in particular is
|
|
88
|
+
* already computed once, in `GraphNodeHost`, from the live zoom.
|
|
89
|
+
*/
|
|
90
|
+
export interface GraphDiagnosticsInput {
|
|
91
|
+
readonly renderer: GraphRenderer;
|
|
92
|
+
readonly nodesMounted: number;
|
|
93
|
+
readonly nodesInDocument: number;
|
|
94
|
+
readonly culling: boolean;
|
|
95
|
+
readonly renderMode: "detail" | "overview";
|
|
96
|
+
readonly scheme: "light" | "dark";
|
|
97
|
+
/** Omitted until `resolveRunner()` has answered. Reported as `none`. */
|
|
98
|
+
readonly layoutRunner?: LayoutRunnerKind;
|
|
99
|
+
/** From `probeRenderedFamily`. Omitted reports as an empty list, never absent. */
|
|
100
|
+
readonly faces?: readonly FaceProbe[];
|
|
101
|
+
/** From `GraphFaces`' `onStatus`. Omitted reports as an empty list, never absent. */
|
|
102
|
+
readonly faceDelivery?: readonly GraphFaceDelivery[];
|
|
103
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostics, and the failure they exist for (design §9.5, MPO-211 task 2.6).
|
|
3
|
+
*
|
|
4
|
+
* A WebView that comes up empty has no console the user can open. Layers 1-4 of
|
|
5
|
+
* design §9.4 stop the blank rectangle; this is what makes the surviving
|
|
6
|
+
* failure legible — which stage boot reached, which renderer, which layout
|
|
7
|
+
* runner, whether the face painted, and what threw.
|
|
8
|
+
*
|
|
9
|
+
* The line that carries the most weight: **a thrown module import surfaces as
|
|
10
|
+
* `lastError.phase === "module"` rather than a blank render.** That is the
|
|
11
|
+
* failure design §9.4 layer 3 is built around, and the one an agent reading a
|
|
12
|
+
* screenshot has to be able to name.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { renderHook } from "@testing-library/react";
|
|
16
|
+
import fs from "node:fs";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
19
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
20
|
+
import { resetBoot, stampBootStage } from "../dom/boot";
|
|
21
|
+
import { xyflowVersion } from "../react-flow/xy";
|
|
22
|
+
import {
|
|
23
|
+
graphErrorGlobalKey,
|
|
24
|
+
readGraphError,
|
|
25
|
+
recordGraphError,
|
|
26
|
+
resetGraphError,
|
|
27
|
+
} from "./lastError";
|
|
28
|
+
import { useGraphDiagnostics } from "./useGraphDiagnostics";
|
|
29
|
+
|
|
30
|
+
const baseInput = {
|
|
31
|
+
renderer: "react-flow-dom",
|
|
32
|
+
nodesMounted: 12,
|
|
33
|
+
nodesInDocument: 12,
|
|
34
|
+
culling: true,
|
|
35
|
+
renderMode: "detail",
|
|
36
|
+
scheme: "light",
|
|
37
|
+
} as const;
|
|
38
|
+
|
|
39
|
+
afterEach(() => {
|
|
40
|
+
resetBoot();
|
|
41
|
+
resetGraphError();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
describe("useGraphDiagnostics", () => {
|
|
45
|
+
it("reports the last boot stage, not the first", () => {
|
|
46
|
+
stampBootStage("script");
|
|
47
|
+
stampBootStage("module");
|
|
48
|
+
stampBootStage("faces");
|
|
49
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
50
|
+
expect(result.current.stage).toBe("faces");
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("RE-READS the stage on a later render, not once at mount", () => {
|
|
54
|
+
// Found on the Storybook, not here, and then brought back as a spec. The
|
|
55
|
+
// hook derives from two globals nothing in its input mentions, so a memo
|
|
56
|
+
// keyed on the input alone captures them at mount and never looks again —
|
|
57
|
+
// and the boot stages are stamped by an EFFECT, which runs after that
|
|
58
|
+
// first render. The panel then reports `stage: none` on a boot that
|
|
59
|
+
// reached `faces`, which is the one number it exists to get right.
|
|
60
|
+
const { result, rerender } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
61
|
+
expect(result.current.stage).toBeNull();
|
|
62
|
+
stampBootStage("script");
|
|
63
|
+
stampBootStage("module");
|
|
64
|
+
rerender();
|
|
65
|
+
expect(result.current.stage).toBe("module");
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("RE-READS lastError on a later render, for the same reason", () => {
|
|
69
|
+
const { result, rerender } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
70
|
+
expect(result.current.lastError).toBeNull();
|
|
71
|
+
recordGraphError({ phase: "module", message: "thrown after mount" });
|
|
72
|
+
rerender();
|
|
73
|
+
expect(result.current.lastError?.phase).toBe("module");
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("keeps a stable identity when nothing moved, so a consumer memo still holds", () => {
|
|
77
|
+
const { result, rerender } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
78
|
+
const first = result.current;
|
|
79
|
+
rerender();
|
|
80
|
+
expect(result.current).toBe(first);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("reports a null stage when boot never stamped one, rather than inventing script", () => {
|
|
84
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
85
|
+
expect(result.current.stage).toBeNull();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("reports the real @xyflow version, and it is not the empty string task 2.4 emitted", () => {
|
|
89
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
90
|
+
expect(result.current.xyflowVersion).toBe(xyflowVersion);
|
|
91
|
+
expect(result.current.xyflowVersion).not.toBe("");
|
|
92
|
+
expect(result.current.xyflowVersion).toMatch(/^\d+\.\d+\.\d+/);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("reports layoutRunner as none until milestone 4 resolves one, never a guess", () => {
|
|
96
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
97
|
+
expect(result.current.layoutRunner).toBe("none");
|
|
98
|
+
const resolved = renderHook(() =>
|
|
99
|
+
useGraphDiagnostics({ ...baseInput, layoutRunner: "worker-blob" }),
|
|
100
|
+
);
|
|
101
|
+
expect(resolved.result.current.layoutRunner).toBe("worker-blob");
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("passes renderMode, culling, scheme and the mounted count straight through", () => {
|
|
105
|
+
const { result } = renderHook(() =>
|
|
106
|
+
useGraphDiagnostics({
|
|
107
|
+
...baseInput,
|
|
108
|
+
renderMode: "overview",
|
|
109
|
+
culling: false,
|
|
110
|
+
scheme: "dark",
|
|
111
|
+
nodesMounted: 200,
|
|
112
|
+
nodesInDocument: 200,
|
|
113
|
+
}),
|
|
114
|
+
);
|
|
115
|
+
expect(result.current.renderMode).toBe("overview");
|
|
116
|
+
expect(result.current.culling).toBe(false);
|
|
117
|
+
expect(result.current.scheme).toBe("dark");
|
|
118
|
+
expect(result.current.nodesMounted).toBe(200);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("reports the face probes it was handed", () => {
|
|
122
|
+
const faces = [
|
|
123
|
+
{
|
|
124
|
+
stack: "Inter, sans-serif",
|
|
125
|
+
widthStack: 100,
|
|
126
|
+
widthFirstCorrupted: 120,
|
|
127
|
+
matched: true,
|
|
128
|
+
conclusive: true,
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
const { result } = renderHook(() => useGraphDiagnostics({ ...baseInput, faces }));
|
|
132
|
+
expect(result.current.faces).toEqual(faces);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("reports no faces as an empty list, not as a missing key", () => {
|
|
136
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
137
|
+
expect(result.current.faces).toEqual([]);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
describe("the module-import failure — what design §9.4 layer 3 exists for", () => {
|
|
142
|
+
it('surfaces a thrown module import as lastError.phase === "module"', () => {
|
|
143
|
+
recordGraphError({ phase: "module", message: "Cannot use 'import.meta' outside a module" });
|
|
144
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
145
|
+
expect(result.current.lastError).not.toBeNull();
|
|
146
|
+
expect(result.current.lastError?.phase).toBe("module");
|
|
147
|
+
expect(result.current.lastError?.message).toContain("import.meta");
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("keeps the FIRST error rather than the last, because a cascade buries the cause", () => {
|
|
151
|
+
// A module-eval throw usually produces render errors behind it. The one
|
|
152
|
+
// worth reporting is the one that started it.
|
|
153
|
+
recordGraphError({ phase: "module", message: "the real cause" });
|
|
154
|
+
recordGraphError({ phase: "render", message: "a consequence" });
|
|
155
|
+
expect(readGraphError()?.phase).toBe("module");
|
|
156
|
+
expect(readGraphError()?.message).toBe("the real cause");
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it("reads a record another library clobbered as null instead of throwing", () => {
|
|
160
|
+
(globalThis as unknown as Record<string, unknown>)[graphErrorGlobalKey] = "not an object";
|
|
161
|
+
expect(readGraphError()).toBeNull();
|
|
162
|
+
const { result } = renderHook(() => useGraphDiagnostics(baseInput));
|
|
163
|
+
expect(result.current.lastError).toBeNull();
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("refuses a phase outside the wire's four", () => {
|
|
167
|
+
recordGraphError({ phase: "wat" as never, message: "x" });
|
|
168
|
+
expect(readGraphError()).toBeNull();
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe("the shell writes the slot this module reads", () => {
|
|
173
|
+
// `NodeGraphDomShell.ts` cannot import this module — it must carry no
|
|
174
|
+
// top-level import of ours that could itself throw (design §9.4 layer 3) — so
|
|
175
|
+
// it writes the global INLINE. That literal and this module's key are the one
|
|
176
|
+
// place the two halves could silently drift, exactly as `bootGlobalKey` is
|
|
177
|
+
// for boot.
|
|
178
|
+
//
|
|
179
|
+
// It moved out of `NodeGraphDom.ts` when the `'use dom'` entry became
|
|
180
|
+
// app-owned (design §9.3): the entry is now three lines an app copies, and
|
|
181
|
+
// every mechanism this asserts lives one file down.
|
|
182
|
+
const entry = fs.readFileSync(
|
|
183
|
+
path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../dom/NodeGraphDomShell.ts"),
|
|
184
|
+
"utf8",
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
it("names the same global key", () => {
|
|
188
|
+
expect(entry).toContain(graphErrorGlobalKey);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it("records the module phase from its own catch block", () => {
|
|
192
|
+
expect(entry).toMatch(/phase:\s*"module"/);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
it("still renders an alert rather than returning null on a module error", () => {
|
|
196
|
+
expect(entry).toContain("data-graph-boot-error");
|
|
197
|
+
expect(entry).toMatch(/role:\s*"alert"/);
|
|
198
|
+
});
|
|
199
|
+
});
|