@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,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE ONLY `@xyflow` import site in this package.
|
|
3
|
+
*
|
|
4
|
+
* `no-restricted-imports` in the repo's `oxlintrc.json` refuses `@xyflow/*`
|
|
5
|
+
* everywhere else under `public/node-graph/src`, so a React Flow major bump has
|
|
6
|
+
* exactly one reconciliation site instead of thirty. `xy.spec.ts` asserts every
|
|
7
|
+
* name below still resolves and that the installed version is inside the range
|
|
8
|
+
* `package.json` declares, so an upgrade fails CI rather than a user.
|
|
9
|
+
*
|
|
10
|
+
* The list is deliberately narrow. It is what the editor uses, not a mirror of
|
|
11
|
+
* upstream — a name nobody imports is a name nobody reconciles. Add one here
|
|
12
|
+
* (and to the spec's list) when a task actually needs it.
|
|
13
|
+
*
|
|
14
|
+
* Upgrade runbook: README.md.
|
|
15
|
+
*
|
|
16
|
+
* ONE name comes from `@xyflow/system` rather than `@xyflow/react`:
|
|
17
|
+
* `getHandlePosition`. React Flow does not re-export it (its own index re-lists
|
|
18
|
+
* `getBezierPath` and friends and stops there), and it is the function that
|
|
19
|
+
* turns a handle's measured BOX into the point an edge is drawn to — which is
|
|
20
|
+
* the whole reason the 44pt hit region is a pseudo-element and not element
|
|
21
|
+
* growth (design 7.1 H2). Asserting that law against our own reimplementation
|
|
22
|
+
* would prove nothing, so the spec calls the real one. `package.json` pins
|
|
23
|
+
* `@xyflow/system` to the exact version `@xyflow/react` pins, and `xy.spec.ts`
|
|
24
|
+
* fails if the two ever split.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export { getHandlePosition } from "@xyflow/system";
|
|
28
|
+
export type { Handle as HandleBounds, InternalNodeBase } from "@xyflow/system";
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
applyEdgeChanges,
|
|
32
|
+
applyNodeChanges,
|
|
33
|
+
Background,
|
|
34
|
+
BaseEdge,
|
|
35
|
+
Controls,
|
|
36
|
+
EdgeLabelRenderer,
|
|
37
|
+
getBezierPath,
|
|
38
|
+
getSmoothStepPath,
|
|
39
|
+
getStraightPath,
|
|
40
|
+
Handle,
|
|
41
|
+
MarkerType,
|
|
42
|
+
MiniMap,
|
|
43
|
+
Position,
|
|
44
|
+
ReactFlow,
|
|
45
|
+
ReactFlowProvider,
|
|
46
|
+
SelectionMode,
|
|
47
|
+
useEdgesState,
|
|
48
|
+
useNodesState,
|
|
49
|
+
useReactFlow,
|
|
50
|
+
useStore,
|
|
51
|
+
useStoreApi,
|
|
52
|
+
useUpdateNodeInternals,
|
|
53
|
+
/**
|
|
54
|
+
* The guide layer has to live INSIDE `.react-flow__viewport` so the pan and
|
|
55
|
+
* zoom transform applies to it for free (design §7.2 S10). This portal is the
|
|
56
|
+
* only supported way in; rendering a sibling and re-deriving the transform is
|
|
57
|
+
* how a guide ends up one frame behind the node it points at.
|
|
58
|
+
*/
|
|
59
|
+
ViewportPortal,
|
|
60
|
+
} from "@xyflow/react";
|
|
61
|
+
|
|
62
|
+
export type {
|
|
63
|
+
ColorMode,
|
|
64
|
+
Connection,
|
|
65
|
+
Edge,
|
|
66
|
+
EdgeChange,
|
|
67
|
+
EdgeMarkerType,
|
|
68
|
+
EdgeProps,
|
|
69
|
+
EdgeTypes,
|
|
70
|
+
HandleType,
|
|
71
|
+
IsValidConnection,
|
|
72
|
+
Node,
|
|
73
|
+
NodeChange,
|
|
74
|
+
NodeProps,
|
|
75
|
+
NodeTypes,
|
|
76
|
+
OnConnect,
|
|
77
|
+
ReactFlowInstance,
|
|
78
|
+
Viewport,
|
|
79
|
+
XYPosition,
|
|
80
|
+
} from "@xyflow/react";
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The installed React Flow version, as a plain string.
|
|
84
|
+
*
|
|
85
|
+
* Diagnostics has to report it (design §9.5) and only THIS file may reach
|
|
86
|
+
* `@xyflow`, so it is declared here rather than read at the use site. A literal
|
|
87
|
+
* rather than an import of `@xyflow/react/package.json`: that path is not in
|
|
88
|
+
* the package's exports map on every condition, and a bundler that cannot
|
|
89
|
+
* resolve it would take the whole canvas down to report a version string.
|
|
90
|
+
*
|
|
91
|
+
* `xy.spec.ts` asserts this equals the installed version, so it cannot drift
|
|
92
|
+
* from reality — an upgrade that forgets it fails CI rather than a user.
|
|
93
|
+
*/
|
|
94
|
+
export const xyflowVersion = "12.11.5";
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The class React Flow puts on its pane element.
|
|
98
|
+
*
|
|
99
|
+
* A class name is part of @xyflow's DOM contract exactly as its exported
|
|
100
|
+
* symbols are, so it belongs at the same boundary they do. The long press has
|
|
101
|
+
* to FIND the pane to listen on it (`useLassoSelect.ts`) — that is a DOM
|
|
102
|
+
* lookup, not a paint rule, and a paint rule is what `checkGraphVarsCoverage`
|
|
103
|
+
* exists to keep out of `src`. Hardcoding the string at the call site would
|
|
104
|
+
* have been the wrong kind of coupling either way: when an upgrade renames the
|
|
105
|
+
* class, a `querySelector` returns null and the long press dies in silence, so
|
|
106
|
+
* the rename should have exactly one place to land.
|
|
107
|
+
*/
|
|
108
|
+
export const reactFlowPaneSelector = ".react-flow__pane";
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The class React Flow puts on a node element. Same boundary rule as
|
|
112
|
+
* `reactFlowPaneSelector`, and for the same reason: it is a DOM lookup, not a
|
|
113
|
+
* paint rule, and a rename should have exactly one place to land.
|
|
114
|
+
*
|
|
115
|
+
* The lookup this exists for is `NodeGraph/AutoLayout`'s position stamp, which
|
|
116
|
+
* reads each node's CSS `transform` — React Flow places a node with a
|
|
117
|
+
* transform and never with a layout offset, so `offsetLeft` / `offsetTop` are
|
|
118
|
+
* 0 at every arrangement and a stamp built on them is a constant.
|
|
119
|
+
*/
|
|
120
|
+
export const reactFlowNodeSelector = ".react-flow__node";
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The class React Flow puts on the pan/zoom viewport — the ONE element whose
|
|
124
|
+
* transform carries the whole canvas.
|
|
125
|
+
*
|
|
126
|
+
* Same boundary rule as the pane and node selectors. The frame sampler's
|
|
127
|
+
* `didMove` probe (design §13.2) reads this transform to tell a real pan from
|
|
128
|
+
* an idle page, and a rename that silently returned `null` there would turn
|
|
129
|
+
* every perf run into a discarded one with no explanation.
|
|
130
|
+
*/
|
|
131
|
+
export const reactFlowViewportSelector = ".react-flow__viewport";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `source: "inline"` MEANS — and the bug that made it mean nothing.
|
|
3
|
+
*
|
|
4
|
+
* The branch that reports it carried a comment promising to "confirm THOSE
|
|
5
|
+
* land" and then marked the face `inline` without asking `document.fonts`
|
|
6
|
+
* anything. Measured on the iPhone 16e at MPO-211: the canvas reported every
|
|
7
|
+
* face `inline`, design 6.3's probe ran on the way to `ready` — which the
|
|
8
|
+
* canvas now waits for the faces to settle before emitting — and measured the
|
|
9
|
+
* FALLBACK family, reporting `MISS · 205.28px vs 205.28px` on a canvas whose
|
|
10
|
+
* labels painted in Inter a moment later. The verdict arrived before the thing
|
|
11
|
+
* it judged.
|
|
12
|
+
*
|
|
13
|
+
* `document.fonts` is stubbed rather than exercised: happy-dom has no real
|
|
14
|
+
* font loading, and what these specs are about is which question the hook
|
|
15
|
+
* asks, not whether a WOFF2 decodes.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
19
|
+
import { cleanup, waitFor } from "@testing-library/react";
|
|
20
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
21
|
+
import { GraphFaces } from "./GraphFaces";
|
|
22
|
+
import type { GraphFaceStatus } from "./GraphFaces";
|
|
23
|
+
import type { GraphFaceAsset } from "./faces";
|
|
24
|
+
|
|
25
|
+
const face: GraphFaceAsset = {
|
|
26
|
+
id: "inter-400",
|
|
27
|
+
family: "Inter",
|
|
28
|
+
weight: 400,
|
|
29
|
+
style: "normal",
|
|
30
|
+
category: "sans-serif",
|
|
31
|
+
source: "apps/storybook/public/fonts/inter-400.woff2",
|
|
32
|
+
base64: "AAAA",
|
|
33
|
+
byteLength: 3,
|
|
34
|
+
sha256: "0".repeat(64),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
interface FontsStub {
|
|
38
|
+
load: ReturnType<typeof vi.fn>;
|
|
39
|
+
check: ReturnType<typeof vi.fn>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Installs a `document.fonts` that answers however the test says. */
|
|
43
|
+
function stubFonts(answer: boolean): FontsStub {
|
|
44
|
+
const fonts: FontsStub = {
|
|
45
|
+
load: vi.fn(async () => (answer ? [{}] : [])),
|
|
46
|
+
check: vi.fn(() => answer),
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(document, "fonts", { value: fonts, configurable: true });
|
|
49
|
+
return fonts;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
afterEach(() => {
|
|
53
|
+
cleanup();
|
|
54
|
+
Reflect.deleteProperty(document, "fonts");
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
async function statusesFor(assetUris?: Record<string, string>) {
|
|
58
|
+
const seen: (readonly GraphFaceStatus[])[] = [];
|
|
59
|
+
renderWithProviders(
|
|
60
|
+
<GraphFaces
|
|
61
|
+
assetUris={assetUris}
|
|
62
|
+
faces={[face]}
|
|
63
|
+
onStatus={(statuses) => seen.push(statuses)}
|
|
64
|
+
timeoutMs={50}
|
|
65
|
+
/>,
|
|
66
|
+
);
|
|
67
|
+
await waitFor(() => expect(seen.at(-1)?.[0]?.source).not.toBe("pending"));
|
|
68
|
+
return seen.at(-1) as readonly GraphFaceStatus[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
describe("GraphFaces delivery", () => {
|
|
72
|
+
it("confirms the bytes landed before reporting inline", async () => {
|
|
73
|
+
const fonts = stubFonts(true);
|
|
74
|
+
const statuses = await statusesFor();
|
|
75
|
+
expect(statuses[0]?.source).toBe("inline");
|
|
76
|
+
// The whole point: it ASKED. Without this call `inline` is a guess, and
|
|
77
|
+
// the probe that runs on the strength of it measures the fallback.
|
|
78
|
+
expect(fonts.load).toHaveBeenCalledWith('400 16px "Inter"');
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("reports failed, not inline, when the bytes never land", async () => {
|
|
82
|
+
stubFonts(false);
|
|
83
|
+
const statuses = await statusesFor();
|
|
84
|
+
expect(statuses[0]?.source).toBe("failed");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("prefers the asset URL when it answers", async () => {
|
|
88
|
+
stubFonts(true);
|
|
89
|
+
const statuses = await statusesFor({ "inter-400": "/fonts/inter-400.woff2" });
|
|
90
|
+
expect(statuses[0]?.source).toBe("asset");
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("starts at pending, so nothing reads a delivery that has not resolved", () => {
|
|
94
|
+
stubFonts(true);
|
|
95
|
+
const seen: (readonly GraphFaceStatus[])[] = [];
|
|
96
|
+
renderWithProviders(
|
|
97
|
+
<GraphFaces faces={[face]} onStatus={(statuses) => seen.push(statuses)} timeoutMs={50} />,
|
|
98
|
+
);
|
|
99
|
+
expect(seen[0]?.[0]?.source).toBe("pending");
|
|
100
|
+
});
|
|
101
|
+
});
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the `$body` face into the WebView, asset URL first, bytes second.
|
|
3
|
+
*
|
|
4
|
+
* Design §6.3's two mechanisms, in the order it names them:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Asset URL.** A consumer hands in the URL Expo produced from a
|
|
7
|
+
* `require()` of the face. Nothing rides in the bundle for that face.
|
|
8
|
+
* 2. **Inline base64.** Whatever the first path did not deliver, this does.
|
|
9
|
+
* Proven, and the reason `faces.generated.ts` exists.
|
|
10
|
+
*
|
|
11
|
+
* The switch between them is not a guess. `document.fonts.load` is awaited and
|
|
12
|
+
* `document.fonts.check` is read back, so a URL that 404s inside the WebView —
|
|
13
|
+
* the exact failure that makes the primary path unverified on device — demotes
|
|
14
|
+
* that face to its bytes instead of leaving the canvas in a fallback family
|
|
15
|
+
* nobody notices.
|
|
16
|
+
*
|
|
17
|
+
* IMPORTING THIS PULLS THE PAYLOAD. `faces.generated.ts` is ~200 KB of base64
|
|
18
|
+
* and this module's default argument references it, so a consumer that already
|
|
19
|
+
* registers Inter (every web app in this repo does, through Tamagui) should not
|
|
20
|
+
* mount `GraphFaces` at all. The DOM bundle is who it is for.
|
|
21
|
+
*
|
|
22
|
+
* Design: docs/design/node-graph-editor.md §6.3.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { type ReactNode, useEffect, useMemo, useState } from "react";
|
|
26
|
+
import { type GraphFaceAsset, graphFaceCss } from "./faces";
|
|
27
|
+
import { generatedGraphFaces } from "./faces.generated";
|
|
28
|
+
|
|
29
|
+
/** Which of the two mechanisms actually delivered a face. */
|
|
30
|
+
export type GraphFaceSource = "asset" | "inline" | "pending" | "failed";
|
|
31
|
+
|
|
32
|
+
/** Per-face outcome, for the diagnostics panel and the `FontProof` story. */
|
|
33
|
+
export interface GraphFaceStatus {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly family: string;
|
|
36
|
+
readonly weight: number;
|
|
37
|
+
readonly source: GraphFaceSource;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GraphFacesProps {
|
|
41
|
+
/** Defaults to the generated payload. */
|
|
42
|
+
readonly faces?: readonly GraphFaceAsset[];
|
|
43
|
+
/**
|
|
44
|
+
* `require()`d asset URLs by face id. A face named here is tried from its URL
|
|
45
|
+
* first; a face absent here goes straight to its bytes.
|
|
46
|
+
*/
|
|
47
|
+
readonly assetUris?: Readonly<Record<string, string>>;
|
|
48
|
+
/**
|
|
49
|
+
* How long to wait for the asset URL before falling back, in ms.
|
|
50
|
+
*
|
|
51
|
+
* 1500, well inside the native watchdog's 4000 ms (design §9.4 layer 4), so a
|
|
52
|
+
* slow face degrades to base64 rather than letting the whole WebView be
|
|
53
|
+
* declared dead.
|
|
54
|
+
*/
|
|
55
|
+
readonly timeoutMs?: number;
|
|
56
|
+
readonly onStatus?: (statuses: readonly GraphFaceStatus[]) => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** `${weight} 16px "${family}"` — the shorthand `document.fonts` wants. */
|
|
60
|
+
function faceQuery(face: GraphFaceAsset): string {
|
|
61
|
+
return `${face.weight} 16px "${face.family}"`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function loadWithin(query: string, timeoutMs: number): Promise<boolean> {
|
|
65
|
+
const fonts = typeof document === "undefined" ? undefined : document.fonts;
|
|
66
|
+
if (!fonts) return false;
|
|
67
|
+
// Promise.race rather than an abort: FontFaceSet.load has no cancellation, so
|
|
68
|
+
// a hung fetch would otherwise hold the canvas at the fallback family for as
|
|
69
|
+
// long as the network takes.
|
|
70
|
+
const timed = new Promise<boolean>((resolve) => {
|
|
71
|
+
setTimeout(() => resolve(false), timeoutMs);
|
|
72
|
+
});
|
|
73
|
+
const loaded = fonts
|
|
74
|
+
.load(query)
|
|
75
|
+
.then((matched) => matched.length > 0 && fonts.check(query))
|
|
76
|
+
.catch(() => false);
|
|
77
|
+
return Promise.race([loaded, timed]);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Resolves each face to the mechanism that actually delivered it.
|
|
82
|
+
*
|
|
83
|
+
* Returns the URIs still worth honouring, so the sheet re-renders with base64
|
|
84
|
+
* for the ones that did not answer.
|
|
85
|
+
*/
|
|
86
|
+
export function useGraphFaces(
|
|
87
|
+
faces: readonly GraphFaceAsset[],
|
|
88
|
+
assetUris: Readonly<Record<string, string>> | undefined,
|
|
89
|
+
timeoutMs: number,
|
|
90
|
+
): {
|
|
91
|
+
readonly uris: Readonly<Record<string, string>>;
|
|
92
|
+
readonly statuses: readonly GraphFaceStatus[];
|
|
93
|
+
} {
|
|
94
|
+
const requested = useMemo(() => assetUris ?? {}, [assetUris]);
|
|
95
|
+
const [resolved, setResolved] = useState<Readonly<Record<string, GraphFaceSource>>>({});
|
|
96
|
+
|
|
97
|
+
const requestedKey = useMemo(() => JSON.stringify(requested), [requested]);
|
|
98
|
+
const facesKey = useMemo(() => faces.map((face) => face.id).join(","), [faces]);
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
let live = true;
|
|
102
|
+
const run = async () => {
|
|
103
|
+
const next: Record<string, GraphFaceSource> = {};
|
|
104
|
+
for (const face of faces) {
|
|
105
|
+
const query = faceQuery(face);
|
|
106
|
+
if (requested[face.id]) {
|
|
107
|
+
// eslint-disable-next-line no-await-in-loop
|
|
108
|
+
const ok = await loadWithin(query, timeoutMs);
|
|
109
|
+
if (ok) {
|
|
110
|
+
next[face.id] = "asset";
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
// The URL did not answer. The sheet has not re-rendered with the
|
|
114
|
+
// bytes yet — that happens on the render this `setResolved` causes —
|
|
115
|
+
// so there is nothing to confirm in this pass. Reported as `inline`
|
|
116
|
+
// optimistically, which is the one case where the value means
|
|
117
|
+
// "falling back" rather than "landed".
|
|
118
|
+
next[face.id] = "inline";
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* No URL was offered, so the sheet ALREADY carries this face's bytes
|
|
123
|
+
* and the load is confirmable right now — so confirm it.
|
|
124
|
+
*
|
|
125
|
+
* It did not, until MPO-211. The branch's own comment said it would
|
|
126
|
+
* ("confirm THOSE land") and the code marked `inline` without asking,
|
|
127
|
+
* which made `source: "inline"` mean "we gave up on the URL" rather
|
|
128
|
+
* than "the bytes are available". Measured on the iPhone 16e: the
|
|
129
|
+
* canvas reported every face `inline` and design 6.3's probe, which
|
|
130
|
+
* runs on the way to `ready`, then measured the FALLBACK family and
|
|
131
|
+
* reported `MISS · 205.28px vs 205.28px` on a canvas whose labels were
|
|
132
|
+
* about to paint in Inter. A verdict that arrives before the thing it
|
|
133
|
+
* judges is worse than no verdict.
|
|
134
|
+
*
|
|
135
|
+
* This is the path the DOM bundle takes for every face: a `require()`d
|
|
136
|
+
* asset URL is the host's to produce and cannot cross the bridge, so
|
|
137
|
+
* the canvas mounts `GraphFaces` with no `assetUris` at all.
|
|
138
|
+
*/
|
|
139
|
+
// eslint-disable-next-line no-await-in-loop
|
|
140
|
+
const landed = await loadWithin(query, timeoutMs);
|
|
141
|
+
next[face.id] = landed ? "inline" : "failed";
|
|
142
|
+
}
|
|
143
|
+
if (live) setResolved(next);
|
|
144
|
+
};
|
|
145
|
+
void run();
|
|
146
|
+
return () => {
|
|
147
|
+
live = false;
|
|
148
|
+
};
|
|
149
|
+
// biome-ignore-start: the two keys ARE the dependencies; the arrays behind
|
|
150
|
+
// them get a fresh identity every render and would re-probe at 60 Hz.
|
|
151
|
+
// oxlint-disable-next-line exhaustive-deps
|
|
152
|
+
}, [facesKey, requestedKey, timeoutMs]);
|
|
153
|
+
// biome-ignore-end
|
|
154
|
+
|
|
155
|
+
const uris = useMemo(() => {
|
|
156
|
+
const out: Record<string, string> = {};
|
|
157
|
+
for (const face of faces) {
|
|
158
|
+
const uri = requested[face.id];
|
|
159
|
+
// Before the probe answers, honour the URL: rendering base64 first and
|
|
160
|
+
// swapping to the URL later would download both.
|
|
161
|
+
if (uri && resolved[face.id] !== "inline") out[face.id] = uri;
|
|
162
|
+
}
|
|
163
|
+
return out;
|
|
164
|
+
}, [faces, requested, resolved]);
|
|
165
|
+
|
|
166
|
+
const statuses = useMemo(
|
|
167
|
+
() =>
|
|
168
|
+
faces.map((face) => ({
|
|
169
|
+
id: face.id,
|
|
170
|
+
family: face.family,
|
|
171
|
+
weight: face.weight,
|
|
172
|
+
source: resolved[face.id] ?? ("pending" as GraphFaceSource),
|
|
173
|
+
})),
|
|
174
|
+
[faces, resolved],
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
return { uris, statuses };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The `@font-face` sheet, plus the asset-URL-first resolution behind it.
|
|
182
|
+
*
|
|
183
|
+
* Renders NOTHING where there is no DOM, and that is not defensive coding — it
|
|
184
|
+
* is the component being honest about what it is. This is a `<style>` element
|
|
185
|
+
* and nothing else; `<style>` is a browser intrinsic, and React Native answers a
|
|
186
|
+
* lowercase intrinsic it does not know with
|
|
187
|
+
* `View config getter callback for component "style" must be a function`, which
|
|
188
|
+
* takes the whole tree down. Measured on the iPhone 16e at task 2.7: the
|
|
189
|
+
* `NodeGraph/GraphNode` → `FontProof` story mounts this directly and died
|
|
190
|
+
* exactly there, on a device where the story's own error boundary was the only
|
|
191
|
+
* thing between it and a blank screen.
|
|
192
|
+
*
|
|
193
|
+
* The hooks run either way, so the rules of hooks hold and the status callback
|
|
194
|
+
* still fires; only the element is withheld. A caller on native gets `null` and
|
|
195
|
+
* should read `GraphDiagnostics`, where the probe that ran INSIDE the WebView
|
|
196
|
+
* arrives over the `ready` event.
|
|
197
|
+
*/
|
|
198
|
+
export function GraphFaces({
|
|
199
|
+
faces = generatedGraphFaces,
|
|
200
|
+
assetUris,
|
|
201
|
+
timeoutMs = 1500,
|
|
202
|
+
onStatus,
|
|
203
|
+
}: GraphFacesProps): ReactNode {
|
|
204
|
+
const { uris, statuses } = useGraphFaces(faces, assetUris, timeoutMs);
|
|
205
|
+
const sheet = useMemo(() => graphFaceCss(faces, uris), [faces, uris]);
|
|
206
|
+
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
onStatus?.(statuses);
|
|
209
|
+
}, [onStatus, statuses]);
|
|
210
|
+
|
|
211
|
+
if (typeof document === "undefined") return null;
|
|
212
|
+
|
|
213
|
+
return (
|
|
214
|
+
<style data-mpo-graph-faces={String(faces.length)} suppressHydrationWarning>
|
|
215
|
+
{sheet}
|
|
216
|
+
</style>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The var layer as one `<style>` tag, plus the adapter that reads a live
|
|
3
|
+
* Tamagui theme into `GraphThemeAccess`.
|
|
4
|
+
*
|
|
5
|
+
* Design 6.2 names this file `GraphVars.tsx`, next to `graphVars.ts`. Those two
|
|
6
|
+
* are the SAME module specifier on a case-insensitive filesystem, and the
|
|
7
|
+
* resolver's extension order (.ts before .tsx) means `import … from
|
|
8
|
+
* "./GraphVars"` silently returns `graphVars.ts` — measured on macOS, where
|
|
9
|
+
* `head ./GraphVars.ts` prints the pure module. The COMPONENT keeps its design
|
|
10
|
+
* name; only the file gains a suffix, so `graphVars.ts` and the lint check's
|
|
11
|
+
* exemption path are unchanged.
|
|
12
|
+
*
|
|
13
|
+
* Design: docs/design/node-graph-editor.md 6.2.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { type ReactNode, useMemo } from "react";
|
|
17
|
+
import { getVariable, useTheme as useTamaguiTheme } from "tamagui";
|
|
18
|
+
import type { ResolvedKnobs } from "@multiplatform.one/theme";
|
|
19
|
+
import { type GraphCssVarsOptions, type GraphThemeAccess, graphCssVars } from "./graphVars";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The class the graph root carries; every rule in `css/graph.css` is scoped to it.
|
|
23
|
+
*
|
|
24
|
+
* `mp-graph`, not `mp-graph-root`: design 7.1 and 7.5 write the selectors as
|
|
25
|
+
* `.mp-graph .react-flow__handle` and `.mp-graph .react-flow__pane`, and the
|
|
26
|
+
* port rules landed by task 1.9 use that prefix. One name, and it is the
|
|
27
|
+
* design's. Nothing outside this constant may spell it.
|
|
28
|
+
*/
|
|
29
|
+
export const graphRootClassName = "mp-graph";
|
|
30
|
+
|
|
31
|
+
export interface GraphVarsProps {
|
|
32
|
+
/** The `--xy-*` / `--mpo-graph-*` layer, from `graphCssVars` or straight off the envelope. */
|
|
33
|
+
readonly vars: Readonly<Record<string, string>>;
|
|
34
|
+
readonly scheme: "light" | "dark";
|
|
35
|
+
/**
|
|
36
|
+
* The envelope's revision. The sheet is rebuilt on THIS and nothing else:
|
|
37
|
+
* `vars` is derived from the envelope, so its revision is the authority on
|
|
38
|
+
* whether anything moved, and a fresh `vars` object identity on every render
|
|
39
|
+
* would otherwise re-serialize the whole sheet at 60 Hz during a drag.
|
|
40
|
+
* `graphCss.spec.ts` pins that behaviour rather than leaving it as a comment.
|
|
41
|
+
*/
|
|
42
|
+
readonly revision: number;
|
|
43
|
+
/** Scope selector. Defaults to the graph root class. */
|
|
44
|
+
readonly selector?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A CSS custom-property block, deterministic in key order so a diff is readable. */
|
|
48
|
+
export function graphVarsSheet(
|
|
49
|
+
vars: Readonly<Record<string, string>>,
|
|
50
|
+
scheme: "light" | "dark",
|
|
51
|
+
selector: string,
|
|
52
|
+
): string {
|
|
53
|
+
const declarations = Object.keys(vars)
|
|
54
|
+
.sort()
|
|
55
|
+
.map((name) => ` ${name}: ${vars[name]};`)
|
|
56
|
+
.join("\n");
|
|
57
|
+
return `${selector} {\n color-scheme: ${scheme};\n${declarations}\n}\n`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function GraphVars({ vars, scheme, revision, selector }: GraphVarsProps): ReactNode {
|
|
61
|
+
const scope = selector ?? `.${graphRootClassName}`;
|
|
62
|
+
// biome-ignore-start: the revision IS the dependency — see the prop's doc.
|
|
63
|
+
// oxlint-disable-next-line exhaustive-deps
|
|
64
|
+
const sheet = useMemo(() => graphVarsSheet(vars, scheme, scope), [revision, scope]);
|
|
65
|
+
// biome-ignore-end
|
|
66
|
+
return (
|
|
67
|
+
<style data-mpo-graph-vars={String(revision)} suppressHydrationWarning>
|
|
68
|
+
{sheet}
|
|
69
|
+
</style>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Read a live Tamagui theme into the two forms `graphCssVars` needs.
|
|
75
|
+
*
|
|
76
|
+
* The CSS form comes from the Variable itself (`var(--…)` on web) rather than
|
|
77
|
+
* from a reconstructed prefix, so nothing here has to know how Tamagui names
|
|
78
|
+
* its custom properties. The raw form is the literal value, and is used only by
|
|
79
|
+
* the two blended entries.
|
|
80
|
+
*/
|
|
81
|
+
export function useGraphThemeAccess(): GraphThemeAccess {
|
|
82
|
+
const theme = useTamaguiTheme();
|
|
83
|
+
return useMemo(() => {
|
|
84
|
+
const read = (key: string): unknown => (theme as unknown as Record<string, unknown>)[key];
|
|
85
|
+
return {
|
|
86
|
+
css: (key: string) => {
|
|
87
|
+
const value = read(key);
|
|
88
|
+
if (value == null) return undefined;
|
|
89
|
+
const variable = (value as { variable?: string }).variable;
|
|
90
|
+
if (typeof variable === "string" && variable) return variable;
|
|
91
|
+
const resolved = getVariable(value as never);
|
|
92
|
+
return typeof resolved === "string" ? resolved : undefined;
|
|
93
|
+
},
|
|
94
|
+
raw: (key: string) => {
|
|
95
|
+
const value = read(key);
|
|
96
|
+
if (value == null) return undefined;
|
|
97
|
+
if (typeof value === "string") return value;
|
|
98
|
+
const val = (value as { val?: unknown }).val;
|
|
99
|
+
return typeof val === "string" ? val : undefined;
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}, [theme]);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** `graphCssVars` against the live theme. */
|
|
106
|
+
export function useGraphCssVars(
|
|
107
|
+
resolved: ResolvedKnobs,
|
|
108
|
+
options?: GraphCssVarsOptions,
|
|
109
|
+
): Record<string, string> {
|
|
110
|
+
const theme = useGraphThemeAccess();
|
|
111
|
+
const pointer = options?.pointer;
|
|
112
|
+
return useMemo(() => graphCssVars(resolved, theme, { pointer }), [resolved, theme, pointer]);
|
|
113
|
+
}
|