@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.
Files changed (1121) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +80 -0
  3. package/css/graph.css +171 -0
  4. package/demo.ts +14 -0
  5. package/dist/cjs/NodeGraph.cjs +34 -0
  6. package/dist/cjs/NodeGraph.native.js +37 -0
  7. package/dist/cjs/NodeGraph.native.js.map +1 -0
  8. package/dist/cjs/bench/frameSampler.cjs +290 -0
  9. package/dist/cjs/bench/frameSampler.native.js +409 -0
  10. package/dist/cjs/bench/frameSampler.native.js.map +1 -0
  11. package/dist/cjs/bench/generateGraph.cjs +125 -0
  12. package/dist/cjs/bench/generateGraph.native.js +128 -0
  13. package/dist/cjs/bench/generateGraph.native.js.map +1 -0
  14. package/dist/cjs/diagnostics/GraphDiagnostics.cjs +154 -0
  15. package/dist/cjs/diagnostics/GraphDiagnostics.native.js +166 -0
  16. package/dist/cjs/diagnostics/GraphDiagnostics.native.js.map +1 -0
  17. package/dist/cjs/diagnostics/LiveGraphDiagnostics.cjs +101 -0
  18. package/dist/cjs/diagnostics/LiveGraphDiagnostics.native.js +106 -0
  19. package/dist/cjs/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
  20. package/dist/cjs/diagnostics/fromWire.cjs +48 -0
  21. package/dist/cjs/diagnostics/fromWire.native.js +51 -0
  22. package/dist/cjs/diagnostics/fromWire.native.js.map +1 -0
  23. package/dist/cjs/diagnostics/lastError.cjs +67 -0
  24. package/dist/cjs/diagnostics/lastError.native.js +75 -0
  25. package/dist/cjs/diagnostics/lastError.native.js.map +1 -0
  26. package/dist/cjs/diagnostics/types.cjs +18 -0
  27. package/dist/cjs/diagnostics/types.native.js +21 -0
  28. package/dist/cjs/diagnostics/types.native.js.map +1 -0
  29. package/dist/cjs/diagnostics/useGraphDiagnostics.cjs +69 -0
  30. package/dist/cjs/diagnostics/useGraphDiagnostics.native.js +75 -0
  31. package/dist/cjs/diagnostics/useGraphDiagnostics.native.js.map +1 -0
  32. package/dist/cjs/dom/GraphDomLayout.cjs +37 -0
  33. package/dist/cjs/dom/GraphDomLayout.native.js +40 -0
  34. package/dist/cjs/dom/GraphDomLayout.native.js.map +1 -0
  35. package/dist/cjs/dom/boot.cjs +100 -0
  36. package/dist/cjs/dom/boot.native.js +111 -0
  37. package/dist/cjs/dom/boot.native.js.map +1 -0
  38. package/dist/cjs/dom/wire.cjs +215 -0
  39. package/dist/cjs/dom/wire.native.js +274 -0
  40. package/dist/cjs/dom/wire.native.js.map +1 -0
  41. package/dist/cjs/edges/GraphEdge.cjs +169 -0
  42. package/dist/cjs/edges/GraphEdge.native.js +178 -0
  43. package/dist/cjs/edges/GraphEdge.native.js.map +1 -0
  44. package/dist/cjs/edges/edgeKinds.cjs +51 -0
  45. package/dist/cjs/edges/edgeKinds.native.js +54 -0
  46. package/dist/cjs/edges/edgeKinds.native.js.map +1 -0
  47. package/dist/cjs/edges/edgeStyle.cjs +94 -0
  48. package/dist/cjs/edges/edgeStyle.native.js +99 -0
  49. package/dist/cjs/edges/edgeStyle.native.js.map +1 -0
  50. package/dist/cjs/index.cjs +197 -0
  51. package/dist/cjs/index.native.js +200 -0
  52. package/dist/cjs/index.native.js.map +1 -0
  53. package/dist/cjs/interaction/lassoIntercept.cjs +54 -0
  54. package/dist/cjs/interaction/lassoIntercept.native.js +57 -0
  55. package/dist/cjs/interaction/lassoIntercept.native.js.map +1 -0
  56. package/dist/cjs/interaction/legalTargets.cjs +75 -0
  57. package/dist/cjs/interaction/legalTargets.native.js +118 -0
  58. package/dist/cjs/interaction/legalTargets.native.js.map +1 -0
  59. package/dist/cjs/interaction/snapAlignment.cjs +165 -0
  60. package/dist/cjs/interaction/snapAlignment.native.js +245 -0
  61. package/dist/cjs/interaction/snapAlignment.native.js.map +1 -0
  62. package/dist/cjs/interaction/snapChanges.cjs +214 -0
  63. package/dist/cjs/interaction/snapChanges.native.js +269 -0
  64. package/dist/cjs/interaction/snapChanges.native.js.map +1 -0
  65. package/dist/cjs/interaction/spatialHash.cjs +97 -0
  66. package/dist/cjs/interaction/spatialHash.native.js +165 -0
  67. package/dist/cjs/interaction/spatialHash.native.js.map +1 -0
  68. package/dist/cjs/interaction/useLassoSelect.cjs +259 -0
  69. package/dist/cjs/interaction/useLassoSelect.native.js +287 -0
  70. package/dist/cjs/interaction/useLassoSelect.native.js.map +1 -0
  71. package/dist/cjs/knobs/KnobEnvelopeProvider.cjs +77 -0
  72. package/dist/cjs/knobs/KnobEnvelopeProvider.native.js +85 -0
  73. package/dist/cjs/knobs/KnobEnvelopeProvider.native.js.map +1 -0
  74. package/dist/cjs/knobs/envelope.cjs +59 -0
  75. package/dist/cjs/knobs/envelope.native.js +78 -0
  76. package/dist/cjs/knobs/envelope.native.js.map +1 -0
  77. package/dist/cjs/knobs/graphKnobs.cjs +39 -0
  78. package/dist/cjs/knobs/graphKnobs.native.js +43 -0
  79. package/dist/cjs/knobs/graphKnobs.native.js.map +1 -0
  80. package/dist/cjs/knobs/useKnobEnvelope.cjs +108 -0
  81. package/dist/cjs/knobs/useKnobEnvelope.native.js +140 -0
  82. package/dist/cjs/knobs/useKnobEnvelope.native.js.map +1 -0
  83. package/dist/cjs/layout/dagre.cjs +125 -0
  84. package/dist/cjs/layout/dagre.native.js +259 -0
  85. package/dist/cjs/layout/dagre.native.js.map +1 -0
  86. package/dist/cjs/layout/layout.cjs +84 -0
  87. package/dist/cjs/layout/layout.native.js +112 -0
  88. package/dist/cjs/layout/layout.native.js.map +1 -0
  89. package/dist/cjs/layout/runner.cjs +194 -0
  90. package/dist/cjs/layout/runner.native.js +247 -0
  91. package/dist/cjs/layout/runner.native.js.map +1 -0
  92. package/dist/cjs/layout/structuredCloneShim.cjs +80 -0
  93. package/dist/cjs/layout/structuredCloneShim.native.js +160 -0
  94. package/dist/cjs/layout/structuredCloneShim.native.js.map +1 -0
  95. package/dist/cjs/layout/types.cjs +18 -0
  96. package/dist/cjs/layout/types.native.js +21 -0
  97. package/dist/cjs/layout/types.native.js.map +1 -0
  98. package/dist/cjs/layout/worker.entry.cjs +58 -0
  99. package/dist/cjs/layout/worker.entry.native.js +75 -0
  100. package/dist/cjs/layout/worker.entry.native.js.map +1 -0
  101. package/dist/cjs/layout/worker.generated.cjs +32 -0
  102. package/dist/cjs/layout/worker.generated.native.js +35 -0
  103. package/dist/cjs/layout/worker.generated.native.js.map +1 -0
  104. package/dist/cjs/model/commands.cjs +235 -0
  105. package/dist/cjs/model/commands.native.js +317 -0
  106. package/dist/cjs/model/commands.native.js.map +1 -0
  107. package/dist/cjs/model/connect.cjs +159 -0
  108. package/dist/cjs/model/connect.native.js +239 -0
  109. package/dist/cjs/model/connect.native.js.map +1 -0
  110. package/dist/cjs/model/document.cjs +18 -0
  111. package/dist/cjs/model/document.native.js +21 -0
  112. package/dist/cjs/model/document.native.js.map +1 -0
  113. package/dist/cjs/model/history.cjs +121 -0
  114. package/dist/cjs/model/history.native.js +178 -0
  115. package/dist/cjs/model/history.native.js.map +1 -0
  116. package/dist/cjs/model/index.cjs +60 -0
  117. package/dist/cjs/model/index.native.js +63 -0
  118. package/dist/cjs/model/index.native.js.map +1 -0
  119. package/dist/cjs/model/schema.cjs +63 -0
  120. package/dist/cjs/model/schema.native.js +68 -0
  121. package/dist/cjs/model/schema.native.js.map +1 -0
  122. package/dist/cjs/model/select.cjs +78 -0
  123. package/dist/cjs/model/select.native.js +107 -0
  124. package/dist/cjs/model/select.native.js.map +1 -0
  125. package/dist/cjs/model/serialize.cjs +332 -0
  126. package/dist/cjs/model/serialize.native.js +374 -0
  127. package/dist/cjs/model/serialize.native.js.map +1 -0
  128. package/dist/cjs/native/DomOnlyStory.cjs +60 -0
  129. package/dist/cjs/native/DomOnlyStory.native.js +66 -0
  130. package/dist/cjs/native/DomOnlyStory.native.js.map +1 -0
  131. package/dist/cjs/native/GraphToolbar.cjs +101 -0
  132. package/dist/cjs/native/GraphToolbar.native.js +107 -0
  133. package/dist/cjs/native/GraphToolbar.native.js.map +1 -0
  134. package/dist/cjs/native/domEntryRegistry.cjs +39 -0
  135. package/dist/cjs/native/domEntryRegistry.native.js +42 -0
  136. package/dist/cjs/native/domEntryRegistry.native.js.map +1 -0
  137. package/dist/cjs/native/graphChildren.cjs +45 -0
  138. package/dist/cjs/native/graphChildren.native.js +50 -0
  139. package/dist/cjs/native/graphChildren.native.js.map +1 -0
  140. package/dist/cjs/nodes/GraphNode.cjs +161 -0
  141. package/dist/cjs/nodes/GraphNode.native.js +206 -0
  142. package/dist/cjs/nodes/GraphNode.native.js.map +1 -0
  143. package/dist/cjs/nodes/GraphPort.cjs +104 -0
  144. package/dist/cjs/nodes/GraphPort.native.js +108 -0
  145. package/dist/cjs/nodes/GraphPort.native.js.map +1 -0
  146. package/dist/cjs/nodes/handleGeometry.cjs +98 -0
  147. package/dist/cjs/nodes/handleGeometry.native.js +104 -0
  148. package/dist/cjs/nodes/handleGeometry.native.js.map +1 -0
  149. package/dist/cjs/nodes/lod.cjs +41 -0
  150. package/dist/cjs/nodes/lod.native.js +45 -0
  151. package/dist/cjs/nodes/lod.native.js.map +1 -0
  152. package/dist/cjs/nodes/nodeMeasure.cjs +108 -0
  153. package/dist/cjs/nodes/nodeMeasure.native.js +134 -0
  154. package/dist/cjs/nodes/nodeMeasure.native.js.map +1 -0
  155. package/dist/cjs/nodes/overviewNode.cjs +74 -0
  156. package/dist/cjs/nodes/overviewNode.native.js +81 -0
  157. package/dist/cjs/nodes/overviewNode.native.js.map +1 -0
  158. package/dist/cjs/react-flow/ConnectionPuck.cjs +122 -0
  159. package/dist/cjs/react-flow/ConnectionPuck.native.js +143 -0
  160. package/dist/cjs/react-flow/ConnectionPuck.native.js.map +1 -0
  161. package/dist/cjs/react-flow/GraphActions.cjs +47 -0
  162. package/dist/cjs/react-flow/GraphActions.native.js +51 -0
  163. package/dist/cjs/react-flow/GraphActions.native.js.map +1 -0
  164. package/dist/cjs/react-flow/GraphCommandBridge.cjs +238 -0
  165. package/dist/cjs/react-flow/GraphCommandBridge.native.js +272 -0
  166. package/dist/cjs/react-flow/GraphCommandBridge.native.js.map +1 -0
  167. package/dist/cjs/react-flow/GraphNodeHost.cjs +77 -0
  168. package/dist/cjs/react-flow/GraphNodeHost.native.js +89 -0
  169. package/dist/cjs/react-flow/GraphNodeHost.native.js.map +1 -0
  170. package/dist/cjs/react-flow/GraphPaintProbe.cjs +60 -0
  171. package/dist/cjs/react-flow/GraphPaintProbe.native.js +65 -0
  172. package/dist/cjs/react-flow/GraphPaintProbe.native.js.map +1 -0
  173. package/dist/cjs/react-flow/GraphZoomVar.cjs +42 -0
  174. package/dist/cjs/react-flow/GraphZoomVar.native.js +48 -0
  175. package/dist/cjs/react-flow/GraphZoomVar.native.js.map +1 -0
  176. package/dist/cjs/react-flow/LassoOverlay.cjs +47 -0
  177. package/dist/cjs/react-flow/LassoOverlay.native.js +51 -0
  178. package/dist/cjs/react-flow/LassoOverlay.native.js.map +1 -0
  179. package/dist/cjs/react-flow/NodeGraphWeb.cjs +386 -0
  180. package/dist/cjs/react-flow/NodeGraphWeb.native.js +515 -0
  181. package/dist/cjs/react-flow/NodeGraphWeb.native.js.map +1 -0
  182. package/dist/cjs/react-flow/SnapGuides.cjs +89 -0
  183. package/dist/cjs/react-flow/SnapGuides.native.js +114 -0
  184. package/dist/cjs/react-flow/SnapGuides.native.js.map +1 -0
  185. package/dist/cjs/react-flow/demoControlBody.cjs +93 -0
  186. package/dist/cjs/react-flow/demoControlBody.native.js +104 -0
  187. package/dist/cjs/react-flow/demoControlBody.native.js.map +1 -0
  188. package/dist/cjs/react-flow/demoNodeBody.cjs +121 -0
  189. package/dist/cjs/react-flow/demoNodeBody.native.js +131 -0
  190. package/dist/cjs/react-flow/demoNodeBody.native.js.map +1 -0
  191. package/dist/cjs/react-flow/fixtures.cjs +215 -0
  192. package/dist/cjs/react-flow/fixtures.native.js +225 -0
  193. package/dist/cjs/react-flow/fixtures.native.js.map +1 -0
  194. package/dist/cjs/react-flow/flowAdapter.cjs +121 -0
  195. package/dist/cjs/react-flow/flowAdapter.native.js +133 -0
  196. package/dist/cjs/react-flow/flowAdapter.native.js.map +1 -0
  197. package/dist/cjs/react-flow/graphHandle.cjs +28 -0
  198. package/dist/cjs/react-flow/graphHandle.native.js +31 -0
  199. package/dist/cjs/react-flow/graphHandle.native.js.map +1 -0
  200. package/dist/cjs/react-flow/nodeCensus.cjs +56 -0
  201. package/dist/cjs/react-flow/nodeCensus.native.js +80 -0
  202. package/dist/cjs/react-flow/nodeCensus.native.js.map +1 -0
  203. package/dist/cjs/react-flow/useGraphController.cjs +297 -0
  204. package/dist/cjs/react-flow/useGraphController.native.js +393 -0
  205. package/dist/cjs/react-flow/useGraphController.native.js.map +1 -0
  206. package/dist/cjs/react-flow/xy.cjs +60 -0
  207. package/dist/cjs/react-flow/xy.native.js +63 -0
  208. package/dist/cjs/react-flow/xy.native.js.map +1 -0
  209. package/dist/cjs/theme/GraphFaces.cjs +114 -0
  210. package/dist/cjs/theme/GraphFaces.native.js +181 -0
  211. package/dist/cjs/theme/GraphFaces.native.js.map +1 -0
  212. package/dist/cjs/theme/GraphVarsStyle.cjs +88 -0
  213. package/dist/cjs/theme/GraphVarsStyle.native.js +100 -0
  214. package/dist/cjs/theme/GraphVarsStyle.native.js.map +1 -0
  215. package/dist/cjs/theme/faces.cjs +121 -0
  216. package/dist/cjs/theme/faces.generated.cjs +48 -0
  217. package/dist/cjs/theme/faces.generated.native.js +51 -0
  218. package/dist/cjs/theme/faces.generated.native.js.map +1 -0
  219. package/dist/cjs/theme/faces.native.js +133 -0
  220. package/dist/cjs/theme/faces.native.js.map +1 -0
  221. package/dist/cjs/theme/graphVars.cjs +318 -0
  222. package/dist/cjs/theme/graphVars.native.js +351 -0
  223. package/dist/cjs/theme/graphVars.native.js.map +1 -0
  224. package/dist/esm/NodeGraph.mjs +9 -0
  225. package/dist/esm/NodeGraph.mjs.map +1 -0
  226. package/dist/esm/NodeGraph.native.js +9 -0
  227. package/dist/esm/NodeGraph.native.js.map +1 -0
  228. package/dist/esm/bench/frameSampler.mjs +255 -0
  229. package/dist/esm/bench/frameSampler.mjs.map +1 -0
  230. package/dist/esm/bench/frameSampler.native.js +371 -0
  231. package/dist/esm/bench/frameSampler.native.js.map +1 -0
  232. package/dist/esm/bench/generateGraph.mjs +99 -0
  233. package/dist/esm/bench/generateGraph.mjs.map +1 -0
  234. package/dist/esm/bench/generateGraph.native.js +99 -0
  235. package/dist/esm/bench/generateGraph.native.js.map +1 -0
  236. package/dist/esm/diagnostics/GraphDiagnostics.mjs +128 -0
  237. package/dist/esm/diagnostics/GraphDiagnostics.mjs.map +1 -0
  238. package/dist/esm/diagnostics/GraphDiagnostics.native.js +137 -0
  239. package/dist/esm/diagnostics/GraphDiagnostics.native.js.map +1 -0
  240. package/dist/esm/diagnostics/LiveGraphDiagnostics.mjs +76 -0
  241. package/dist/esm/diagnostics/LiveGraphDiagnostics.mjs.map +1 -0
  242. package/dist/esm/diagnostics/LiveGraphDiagnostics.native.js +78 -0
  243. package/dist/esm/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
  244. package/dist/esm/diagnostics/fromWire.mjs +23 -0
  245. package/dist/esm/diagnostics/fromWire.mjs.map +1 -0
  246. package/dist/esm/diagnostics/fromWire.native.js +23 -0
  247. package/dist/esm/diagnostics/fromWire.native.js.map +1 -0
  248. package/dist/esm/diagnostics/lastError.mjs +39 -0
  249. package/dist/esm/diagnostics/lastError.mjs.map +1 -0
  250. package/dist/esm/diagnostics/lastError.native.js +44 -0
  251. package/dist/esm/diagnostics/lastError.native.js.map +1 -0
  252. package/dist/esm/diagnostics/types.mjs +2 -0
  253. package/dist/esm/diagnostics/types.mjs.map +1 -0
  254. package/dist/esm/diagnostics/types.native.js +2 -0
  255. package/dist/esm/diagnostics/types.native.js.map +1 -0
  256. package/dist/esm/diagnostics/useGraphDiagnostics.mjs +44 -0
  257. package/dist/esm/diagnostics/useGraphDiagnostics.mjs.map +1 -0
  258. package/dist/esm/diagnostics/useGraphDiagnostics.native.js +47 -0
  259. package/dist/esm/diagnostics/useGraphDiagnostics.native.js.map +1 -0
  260. package/dist/esm/dom/GraphDomLayout.mjs +11 -0
  261. package/dist/esm/dom/GraphDomLayout.mjs.map +1 -0
  262. package/dist/esm/dom/GraphDomLayout.native.js +11 -0
  263. package/dist/esm/dom/GraphDomLayout.native.js.map +1 -0
  264. package/dist/esm/dom/boot.mjs +67 -0
  265. package/dist/esm/dom/boot.mjs.map +1 -0
  266. package/dist/esm/dom/boot.native.js +75 -0
  267. package/dist/esm/dom/boot.native.js.map +1 -0
  268. package/dist/esm/dom/wire.mjs +183 -0
  269. package/dist/esm/dom/wire.mjs.map +1 -0
  270. package/dist/esm/dom/wire.native.js +239 -0
  271. package/dist/esm/dom/wire.native.js.map +1 -0
  272. package/dist/esm/edges/GraphEdge.mjs +139 -0
  273. package/dist/esm/edges/GraphEdge.mjs.map +1 -0
  274. package/dist/esm/edges/GraphEdge.native.js +145 -0
  275. package/dist/esm/edges/GraphEdge.native.js.map +1 -0
  276. package/dist/esm/edges/edgeKinds.mjs +25 -0
  277. package/dist/esm/edges/edgeKinds.mjs.map +1 -0
  278. package/dist/esm/edges/edgeKinds.native.js +25 -0
  279. package/dist/esm/edges/edgeKinds.native.js.map +1 -0
  280. package/dist/esm/edges/edgeStyle.mjs +63 -0
  281. package/dist/esm/edges/edgeStyle.mjs.map +1 -0
  282. package/dist/esm/edges/edgeStyle.native.js +65 -0
  283. package/dist/esm/edges/edgeStyle.native.js.map +1 -0
  284. package/dist/esm/index.mjs +50 -0
  285. package/dist/esm/index.mjs.map +1 -0
  286. package/dist/esm/index.native.js +50 -0
  287. package/dist/esm/index.native.js.map +1 -0
  288. package/dist/esm/interaction/lassoIntercept.mjs +29 -0
  289. package/dist/esm/interaction/lassoIntercept.mjs.map +1 -0
  290. package/dist/esm/interaction/lassoIntercept.native.js +29 -0
  291. package/dist/esm/interaction/lassoIntercept.native.js.map +1 -0
  292. package/dist/esm/interaction/legalTargets.mjs +48 -0
  293. package/dist/esm/interaction/legalTargets.mjs.map +1 -0
  294. package/dist/esm/interaction/legalTargets.native.js +88 -0
  295. package/dist/esm/interaction/legalTargets.native.js.map +1 -0
  296. package/dist/esm/interaction/snapAlignment.mjs +137 -0
  297. package/dist/esm/interaction/snapAlignment.mjs.map +1 -0
  298. package/dist/esm/interaction/snapAlignment.native.js +214 -0
  299. package/dist/esm/interaction/snapAlignment.native.js.map +1 -0
  300. package/dist/esm/interaction/snapChanges.mjs +184 -0
  301. package/dist/esm/interaction/snapChanges.mjs.map +1 -0
  302. package/dist/esm/interaction/snapChanges.native.js +236 -0
  303. package/dist/esm/interaction/snapChanges.native.js.map +1 -0
  304. package/dist/esm/interaction/spatialHash.mjs +71 -0
  305. package/dist/esm/interaction/spatialHash.mjs.map +1 -0
  306. package/dist/esm/interaction/spatialHash.native.js +136 -0
  307. package/dist/esm/interaction/spatialHash.native.js.map +1 -0
  308. package/dist/esm/interaction/useLassoSelect.mjs +231 -0
  309. package/dist/esm/interaction/useLassoSelect.mjs.map +1 -0
  310. package/dist/esm/interaction/useLassoSelect.native.js +256 -0
  311. package/dist/esm/interaction/useLassoSelect.native.js.map +1 -0
  312. package/dist/esm/knobs/KnobEnvelopeProvider.mjs +51 -0
  313. package/dist/esm/knobs/KnobEnvelopeProvider.mjs.map +1 -0
  314. package/dist/esm/knobs/KnobEnvelopeProvider.native.js +56 -0
  315. package/dist/esm/knobs/KnobEnvelopeProvider.native.js.map +1 -0
  316. package/dist/esm/knobs/envelope.mjs +29 -0
  317. package/dist/esm/knobs/envelope.mjs.map +1 -0
  318. package/dist/esm/knobs/envelope.native.js +45 -0
  319. package/dist/esm/knobs/envelope.native.js.map +1 -0
  320. package/dist/esm/knobs/graphKnobs.mjs +14 -0
  321. package/dist/esm/knobs/graphKnobs.mjs.map +1 -0
  322. package/dist/esm/knobs/graphKnobs.native.js +15 -0
  323. package/dist/esm/knobs/graphKnobs.native.js.map +1 -0
  324. package/dist/esm/knobs/useKnobEnvelope.mjs +83 -0
  325. package/dist/esm/knobs/useKnobEnvelope.mjs.map +1 -0
  326. package/dist/esm/knobs/useKnobEnvelope.native.js +112 -0
  327. package/dist/esm/knobs/useKnobEnvelope.native.js.map +1 -0
  328. package/dist/esm/layout/dagre.mjs +99 -0
  329. package/dist/esm/layout/dagre.mjs.map +1 -0
  330. package/dist/esm/layout/dagre.native.js +230 -0
  331. package/dist/esm/layout/dagre.native.js.map +1 -0
  332. package/dist/esm/layout/layout.mjs +57 -0
  333. package/dist/esm/layout/layout.mjs.map +1 -0
  334. package/dist/esm/layout/layout.native.js +82 -0
  335. package/dist/esm/layout/layout.native.js.map +1 -0
  336. package/dist/esm/layout/runner.mjs +164 -0
  337. package/dist/esm/layout/runner.mjs.map +1 -0
  338. package/dist/esm/layout/runner.native.js +214 -0
  339. package/dist/esm/layout/runner.native.js.map +1 -0
  340. package/dist/esm/layout/structuredCloneShim.mjs +54 -0
  341. package/dist/esm/layout/structuredCloneShim.mjs.map +1 -0
  342. package/dist/esm/layout/structuredCloneShim.native.js +131 -0
  343. package/dist/esm/layout/structuredCloneShim.native.js.map +1 -0
  344. package/dist/esm/layout/types.mjs +2 -0
  345. package/dist/esm/layout/types.mjs.map +1 -0
  346. package/dist/esm/layout/types.native.js +2 -0
  347. package/dist/esm/layout/types.native.js.map +1 -0
  348. package/dist/esm/layout/worker.entry.mjs +33 -0
  349. package/dist/esm/layout/worker.entry.mjs.map +1 -0
  350. package/dist/esm/layout/worker.entry.native.js +47 -0
  351. package/dist/esm/layout/worker.entry.native.js.map +1 -0
  352. package/dist/esm/layout/worker.generated.mjs +5 -0
  353. package/dist/esm/layout/worker.generated.mjs.map +1 -0
  354. package/dist/esm/layout/worker.generated.native.js +5 -0
  355. package/dist/esm/layout/worker.generated.native.js.map +1 -0
  356. package/dist/esm/model/commands.mjs +209 -0
  357. package/dist/esm/model/commands.mjs.map +1 -0
  358. package/dist/esm/model/commands.native.js +288 -0
  359. package/dist/esm/model/commands.native.js.map +1 -0
  360. package/dist/esm/model/connect.mjs +124 -0
  361. package/dist/esm/model/connect.mjs.map +1 -0
  362. package/dist/esm/model/connect.native.js +201 -0
  363. package/dist/esm/model/connect.native.js.map +1 -0
  364. package/dist/esm/model/document.mjs +2 -0
  365. package/dist/esm/model/document.mjs.map +1 -0
  366. package/dist/esm/model/document.native.js +2 -0
  367. package/dist/esm/model/document.native.js.map +1 -0
  368. package/dist/esm/model/history.mjs +96 -0
  369. package/dist/esm/model/history.mjs.map +1 -0
  370. package/dist/esm/model/history.native.js +150 -0
  371. package/dist/esm/model/history.native.js.map +1 -0
  372. package/dist/esm/model/index.mjs +8 -0
  373. package/dist/esm/model/index.mjs.map +1 -0
  374. package/dist/esm/model/index.native.js +8 -0
  375. package/dist/esm/model/index.native.js.map +1 -0
  376. package/dist/esm/model/schema.mjs +32 -0
  377. package/dist/esm/model/schema.mjs.map +1 -0
  378. package/dist/esm/model/schema.native.js +34 -0
  379. package/dist/esm/model/schema.native.js.map +1 -0
  380. package/dist/esm/model/select.mjs +49 -0
  381. package/dist/esm/model/select.mjs.map +1 -0
  382. package/dist/esm/model/select.native.js +75 -0
  383. package/dist/esm/model/select.native.js.map +1 -0
  384. package/dist/esm/model/serialize.mjs +306 -0
  385. package/dist/esm/model/serialize.mjs.map +1 -0
  386. package/dist/esm/model/serialize.native.js +345 -0
  387. package/dist/esm/model/serialize.native.js.map +1 -0
  388. package/dist/esm/native/DomOnlyStory.mjs +33 -0
  389. package/dist/esm/native/DomOnlyStory.mjs.map +1 -0
  390. package/dist/esm/native/DomOnlyStory.native.js +36 -0
  391. package/dist/esm/native/DomOnlyStory.native.js.map +1 -0
  392. package/dist/esm/native/GraphToolbar.mjs +76 -0
  393. package/dist/esm/native/GraphToolbar.mjs.map +1 -0
  394. package/dist/esm/native/GraphToolbar.native.js +79 -0
  395. package/dist/esm/native/GraphToolbar.native.js.map +1 -0
  396. package/dist/esm/native/domEntryRegistry.mjs +12 -0
  397. package/dist/esm/native/domEntryRegistry.mjs.map +1 -0
  398. package/dist/esm/native/domEntryRegistry.native.js +12 -0
  399. package/dist/esm/native/domEntryRegistry.native.js.map +1 -0
  400. package/dist/esm/native/graphChildren.mjs +18 -0
  401. package/dist/esm/native/graphChildren.mjs.map +1 -0
  402. package/dist/esm/native/graphChildren.native.js +20 -0
  403. package/dist/esm/native/graphChildren.native.js.map +1 -0
  404. package/dist/esm/nodes/GraphNode.mjs +136 -0
  405. package/dist/esm/nodes/GraphNode.mjs.map +1 -0
  406. package/dist/esm/nodes/GraphNode.native.js +178 -0
  407. package/dist/esm/nodes/GraphNode.native.js.map +1 -0
  408. package/dist/esm/nodes/GraphPort.mjs +79 -0
  409. package/dist/esm/nodes/GraphPort.mjs.map +1 -0
  410. package/dist/esm/nodes/GraphPort.native.js +80 -0
  411. package/dist/esm/nodes/GraphPort.native.js.map +1 -0
  412. package/dist/esm/nodes/handleGeometry.mjs +65 -0
  413. package/dist/esm/nodes/handleGeometry.mjs.map +1 -0
  414. package/dist/esm/nodes/handleGeometry.native.js +68 -0
  415. package/dist/esm/nodes/handleGeometry.native.js.map +1 -0
  416. package/dist/esm/nodes/lod.mjs +13 -0
  417. package/dist/esm/nodes/lod.mjs.map +1 -0
  418. package/dist/esm/nodes/lod.native.js +14 -0
  419. package/dist/esm/nodes/lod.native.js.map +1 -0
  420. package/dist/esm/nodes/nodeMeasure.mjs +72 -0
  421. package/dist/esm/nodes/nodeMeasure.mjs.map +1 -0
  422. package/dist/esm/nodes/nodeMeasure.native.js +95 -0
  423. package/dist/esm/nodes/nodeMeasure.native.js.map +1 -0
  424. package/dist/esm/nodes/overviewNode.mjs +49 -0
  425. package/dist/esm/nodes/overviewNode.mjs.map +1 -0
  426. package/dist/esm/nodes/overviewNode.native.js +53 -0
  427. package/dist/esm/nodes/overviewNode.native.js.map +1 -0
  428. package/dist/esm/react-flow/ConnectionPuck.mjs +96 -0
  429. package/dist/esm/react-flow/ConnectionPuck.mjs.map +1 -0
  430. package/dist/esm/react-flow/ConnectionPuck.native.js +114 -0
  431. package/dist/esm/react-flow/ConnectionPuck.native.js.map +1 -0
  432. package/dist/esm/react-flow/GraphActions.mjs +21 -0
  433. package/dist/esm/react-flow/GraphActions.mjs.map +1 -0
  434. package/dist/esm/react-flow/GraphActions.native.js +22 -0
  435. package/dist/esm/react-flow/GraphActions.native.js.map +1 -0
  436. package/dist/esm/react-flow/GraphCommandBridge.mjs +213 -0
  437. package/dist/esm/react-flow/GraphCommandBridge.mjs.map +1 -0
  438. package/dist/esm/react-flow/GraphCommandBridge.native.js +244 -0
  439. package/dist/esm/react-flow/GraphCommandBridge.native.js.map +1 -0
  440. package/dist/esm/react-flow/GraphNodeHost.mjs +50 -0
  441. package/dist/esm/react-flow/GraphNodeHost.mjs.map +1 -0
  442. package/dist/esm/react-flow/GraphNodeHost.native.js +59 -0
  443. package/dist/esm/react-flow/GraphNodeHost.native.js.map +1 -0
  444. package/dist/esm/react-flow/GraphPaintProbe.mjs +35 -0
  445. package/dist/esm/react-flow/GraphPaintProbe.mjs.map +1 -0
  446. package/dist/esm/react-flow/GraphPaintProbe.native.js +37 -0
  447. package/dist/esm/react-flow/GraphPaintProbe.native.js.map +1 -0
  448. package/dist/esm/react-flow/GraphZoomVar.mjs +16 -0
  449. package/dist/esm/react-flow/GraphZoomVar.mjs.map +1 -0
  450. package/dist/esm/react-flow/GraphZoomVar.native.js +19 -0
  451. package/dist/esm/react-flow/GraphZoomVar.native.js.map +1 -0
  452. package/dist/esm/react-flow/LassoOverlay.mjs +22 -0
  453. package/dist/esm/react-flow/LassoOverlay.mjs.map +1 -0
  454. package/dist/esm/react-flow/LassoOverlay.native.js +23 -0
  455. package/dist/esm/react-flow/LassoOverlay.native.js.map +1 -0
  456. package/dist/esm/react-flow/NodeGraphWeb.mjs +359 -0
  457. package/dist/esm/react-flow/NodeGraphWeb.mjs.map +1 -0
  458. package/dist/esm/react-flow/NodeGraphWeb.native.js +485 -0
  459. package/dist/esm/react-flow/NodeGraphWeb.native.js.map +1 -0
  460. package/dist/esm/react-flow/SnapGuides.mjs +60 -0
  461. package/dist/esm/react-flow/SnapGuides.mjs.map +1 -0
  462. package/dist/esm/react-flow/SnapGuides.native.js +82 -0
  463. package/dist/esm/react-flow/SnapGuides.native.js.map +1 -0
  464. package/dist/esm/react-flow/demoControlBody.mjs +67 -0
  465. package/dist/esm/react-flow/demoControlBody.mjs.map +1 -0
  466. package/dist/esm/react-flow/demoControlBody.native.js +75 -0
  467. package/dist/esm/react-flow/demoControlBody.native.js.map +1 -0
  468. package/dist/esm/react-flow/demoNodeBody.mjs +91 -0
  469. package/dist/esm/react-flow/demoNodeBody.mjs.map +1 -0
  470. package/dist/esm/react-flow/demoNodeBody.native.js +98 -0
  471. package/dist/esm/react-flow/demoNodeBody.native.js.map +1 -0
  472. package/dist/esm/react-flow/fixtures.mjs +185 -0
  473. package/dist/esm/react-flow/fixtures.mjs.map +1 -0
  474. package/dist/esm/react-flow/fixtures.native.js +192 -0
  475. package/dist/esm/react-flow/fixtures.native.js.map +1 -0
  476. package/dist/esm/react-flow/flowAdapter.mjs +94 -0
  477. package/dist/esm/react-flow/flowAdapter.mjs.map +1 -0
  478. package/dist/esm/react-flow/flowAdapter.native.js +103 -0
  479. package/dist/esm/react-flow/flowAdapter.native.js.map +1 -0
  480. package/dist/esm/react-flow/graphHandle.mjs +3 -0
  481. package/dist/esm/react-flow/graphHandle.mjs.map +1 -0
  482. package/dist/esm/react-flow/graphHandle.native.js +3 -0
  483. package/dist/esm/react-flow/graphHandle.native.js.map +1 -0
  484. package/dist/esm/react-flow/nodeCensus.mjs +28 -0
  485. package/dist/esm/react-flow/nodeCensus.mjs.map +1 -0
  486. package/dist/esm/react-flow/nodeCensus.native.js +49 -0
  487. package/dist/esm/react-flow/nodeCensus.native.js.map +1 -0
  488. package/dist/esm/react-flow/useGraphController.mjs +269 -0
  489. package/dist/esm/react-flow/useGraphController.mjs.map +1 -0
  490. package/dist/esm/react-flow/useGraphController.native.js +362 -0
  491. package/dist/esm/react-flow/useGraphController.native.js.map +1 -0
  492. package/dist/esm/react-flow/xy.mjs +8 -0
  493. package/dist/esm/react-flow/xy.mjs.map +1 -0
  494. package/dist/esm/react-flow/xy.native.js +8 -0
  495. package/dist/esm/react-flow/xy.native.js.map +1 -0
  496. package/dist/esm/theme/GraphFaces.mjs +88 -0
  497. package/dist/esm/theme/GraphFaces.mjs.map +1 -0
  498. package/dist/esm/theme/GraphFaces.native.js +152 -0
  499. package/dist/esm/theme/GraphFaces.native.js.map +1 -0
  500. package/dist/esm/theme/GraphVarsStyle.mjs +59 -0
  501. package/dist/esm/theme/GraphVarsStyle.mjs.map +1 -0
  502. package/dist/esm/theme/GraphVarsStyle.native.js +68 -0
  503. package/dist/esm/theme/GraphVarsStyle.native.js.map +1 -0
  504. package/dist/esm/theme/faces.generated.mjs +23 -0
  505. package/dist/esm/theme/faces.generated.mjs.map +1 -0
  506. package/dist/esm/theme/faces.generated.native.js +23 -0
  507. package/dist/esm/theme/faces.generated.native.js.map +1 -0
  508. package/dist/esm/theme/faces.mjs +89 -0
  509. package/dist/esm/theme/faces.mjs.map +1 -0
  510. package/dist/esm/theme/faces.native.js +98 -0
  511. package/dist/esm/theme/faces.native.js.map +1 -0
  512. package/dist/esm/theme/graphVars.mjs +284 -0
  513. package/dist/esm/theme/graphVars.mjs.map +1 -0
  514. package/dist/esm/theme/graphVars.native.js +314 -0
  515. package/dist/esm/theme/graphVars.native.js.map +1 -0
  516. package/dist/jsx/NodeGraph.mjs +9 -0
  517. package/dist/jsx/NodeGraph.mjs.map +1 -0
  518. package/dist/jsx/NodeGraph.native.js +37 -0
  519. package/dist/jsx/NodeGraph.native.js.map +1 -0
  520. package/dist/jsx/bench/frameSampler.mjs +255 -0
  521. package/dist/jsx/bench/frameSampler.mjs.map +1 -0
  522. package/dist/jsx/bench/frameSampler.native.js +409 -0
  523. package/dist/jsx/bench/frameSampler.native.js.map +1 -0
  524. package/dist/jsx/bench/generateGraph.mjs +99 -0
  525. package/dist/jsx/bench/generateGraph.mjs.map +1 -0
  526. package/dist/jsx/bench/generateGraph.native.js +128 -0
  527. package/dist/jsx/bench/generateGraph.native.js.map +1 -0
  528. package/dist/jsx/diagnostics/GraphDiagnostics.mjs +128 -0
  529. package/dist/jsx/diagnostics/GraphDiagnostics.mjs.map +1 -0
  530. package/dist/jsx/diagnostics/GraphDiagnostics.native.js +166 -0
  531. package/dist/jsx/diagnostics/GraphDiagnostics.native.js.map +1 -0
  532. package/dist/jsx/diagnostics/LiveGraphDiagnostics.mjs +76 -0
  533. package/dist/jsx/diagnostics/LiveGraphDiagnostics.mjs.map +1 -0
  534. package/dist/jsx/diagnostics/LiveGraphDiagnostics.native.js +106 -0
  535. package/dist/jsx/diagnostics/LiveGraphDiagnostics.native.js.map +1 -0
  536. package/dist/jsx/diagnostics/fromWire.mjs +23 -0
  537. package/dist/jsx/diagnostics/fromWire.mjs.map +1 -0
  538. package/dist/jsx/diagnostics/fromWire.native.js +51 -0
  539. package/dist/jsx/diagnostics/fromWire.native.js.map +1 -0
  540. package/dist/jsx/diagnostics/lastError.mjs +39 -0
  541. package/dist/jsx/diagnostics/lastError.mjs.map +1 -0
  542. package/dist/jsx/diagnostics/lastError.native.js +75 -0
  543. package/dist/jsx/diagnostics/lastError.native.js.map +1 -0
  544. package/dist/jsx/diagnostics/types.mjs +2 -0
  545. package/dist/jsx/diagnostics/types.mjs.map +1 -0
  546. package/dist/jsx/diagnostics/types.native.js +21 -0
  547. package/dist/jsx/diagnostics/types.native.js.map +1 -0
  548. package/dist/jsx/diagnostics/useGraphDiagnostics.mjs +44 -0
  549. package/dist/jsx/diagnostics/useGraphDiagnostics.mjs.map +1 -0
  550. package/dist/jsx/diagnostics/useGraphDiagnostics.native.js +75 -0
  551. package/dist/jsx/diagnostics/useGraphDiagnostics.native.js.map +1 -0
  552. package/dist/jsx/dom/GraphDomLayout.mjs +11 -0
  553. package/dist/jsx/dom/GraphDomLayout.mjs.map +1 -0
  554. package/dist/jsx/dom/GraphDomLayout.native.js +40 -0
  555. package/dist/jsx/dom/GraphDomLayout.native.js.map +1 -0
  556. package/dist/jsx/dom/boot.mjs +67 -0
  557. package/dist/jsx/dom/boot.mjs.map +1 -0
  558. package/dist/jsx/dom/boot.native.js +111 -0
  559. package/dist/jsx/dom/boot.native.js.map +1 -0
  560. package/dist/jsx/dom/wire.mjs +183 -0
  561. package/dist/jsx/dom/wire.mjs.map +1 -0
  562. package/dist/jsx/dom/wire.native.js +274 -0
  563. package/dist/jsx/dom/wire.native.js.map +1 -0
  564. package/dist/jsx/edges/GraphEdge.mjs +139 -0
  565. package/dist/jsx/edges/GraphEdge.mjs.map +1 -0
  566. package/dist/jsx/edges/GraphEdge.native.js +178 -0
  567. package/dist/jsx/edges/GraphEdge.native.js.map +1 -0
  568. package/dist/jsx/edges/edgeKinds.mjs +25 -0
  569. package/dist/jsx/edges/edgeKinds.mjs.map +1 -0
  570. package/dist/jsx/edges/edgeKinds.native.js +54 -0
  571. package/dist/jsx/edges/edgeKinds.native.js.map +1 -0
  572. package/dist/jsx/edges/edgeStyle.mjs +63 -0
  573. package/dist/jsx/edges/edgeStyle.mjs.map +1 -0
  574. package/dist/jsx/edges/edgeStyle.native.js +99 -0
  575. package/dist/jsx/edges/edgeStyle.native.js.map +1 -0
  576. package/dist/jsx/index.js +50 -0
  577. package/dist/jsx/index.js.map +1 -0
  578. package/dist/jsx/index.mjs +50 -0
  579. package/dist/jsx/index.mjs.map +1 -0
  580. package/dist/jsx/index.native.js +200 -0
  581. package/dist/jsx/index.native.js.map +1 -0
  582. package/dist/jsx/interaction/lassoIntercept.mjs +29 -0
  583. package/dist/jsx/interaction/lassoIntercept.mjs.map +1 -0
  584. package/dist/jsx/interaction/lassoIntercept.native.js +57 -0
  585. package/dist/jsx/interaction/lassoIntercept.native.js.map +1 -0
  586. package/dist/jsx/interaction/legalTargets.mjs +48 -0
  587. package/dist/jsx/interaction/legalTargets.mjs.map +1 -0
  588. package/dist/jsx/interaction/legalTargets.native.js +118 -0
  589. package/dist/jsx/interaction/legalTargets.native.js.map +1 -0
  590. package/dist/jsx/interaction/snapAlignment.mjs +137 -0
  591. package/dist/jsx/interaction/snapAlignment.mjs.map +1 -0
  592. package/dist/jsx/interaction/snapAlignment.native.js +245 -0
  593. package/dist/jsx/interaction/snapAlignment.native.js.map +1 -0
  594. package/dist/jsx/interaction/snapChanges.mjs +184 -0
  595. package/dist/jsx/interaction/snapChanges.mjs.map +1 -0
  596. package/dist/jsx/interaction/snapChanges.native.js +269 -0
  597. package/dist/jsx/interaction/snapChanges.native.js.map +1 -0
  598. package/dist/jsx/interaction/spatialHash.mjs +71 -0
  599. package/dist/jsx/interaction/spatialHash.mjs.map +1 -0
  600. package/dist/jsx/interaction/spatialHash.native.js +165 -0
  601. package/dist/jsx/interaction/spatialHash.native.js.map +1 -0
  602. package/dist/jsx/interaction/useLassoSelect.mjs +231 -0
  603. package/dist/jsx/interaction/useLassoSelect.mjs.map +1 -0
  604. package/dist/jsx/interaction/useLassoSelect.native.js +287 -0
  605. package/dist/jsx/interaction/useLassoSelect.native.js.map +1 -0
  606. package/dist/jsx/knobs/KnobEnvelopeProvider.mjs +51 -0
  607. package/dist/jsx/knobs/KnobEnvelopeProvider.mjs.map +1 -0
  608. package/dist/jsx/knobs/KnobEnvelopeProvider.native.js +85 -0
  609. package/dist/jsx/knobs/KnobEnvelopeProvider.native.js.map +1 -0
  610. package/dist/jsx/knobs/envelope.mjs +29 -0
  611. package/dist/jsx/knobs/envelope.mjs.map +1 -0
  612. package/dist/jsx/knobs/envelope.native.js +78 -0
  613. package/dist/jsx/knobs/envelope.native.js.map +1 -0
  614. package/dist/jsx/knobs/graphKnobs.mjs +14 -0
  615. package/dist/jsx/knobs/graphKnobs.mjs.map +1 -0
  616. package/dist/jsx/knobs/graphKnobs.native.js +43 -0
  617. package/dist/jsx/knobs/graphKnobs.native.js.map +1 -0
  618. package/dist/jsx/knobs/useKnobEnvelope.mjs +83 -0
  619. package/dist/jsx/knobs/useKnobEnvelope.mjs.map +1 -0
  620. package/dist/jsx/knobs/useKnobEnvelope.native.js +140 -0
  621. package/dist/jsx/knobs/useKnobEnvelope.native.js.map +1 -0
  622. package/dist/jsx/layout/dagre.mjs +99 -0
  623. package/dist/jsx/layout/dagre.mjs.map +1 -0
  624. package/dist/jsx/layout/dagre.native.js +259 -0
  625. package/dist/jsx/layout/dagre.native.js.map +1 -0
  626. package/dist/jsx/layout/layout.mjs +57 -0
  627. package/dist/jsx/layout/layout.mjs.map +1 -0
  628. package/dist/jsx/layout/layout.native.js +112 -0
  629. package/dist/jsx/layout/layout.native.js.map +1 -0
  630. package/dist/jsx/layout/runner.mjs +164 -0
  631. package/dist/jsx/layout/runner.mjs.map +1 -0
  632. package/dist/jsx/layout/runner.native.js +247 -0
  633. package/dist/jsx/layout/runner.native.js.map +1 -0
  634. package/dist/jsx/layout/structuredCloneShim.mjs +54 -0
  635. package/dist/jsx/layout/structuredCloneShim.mjs.map +1 -0
  636. package/dist/jsx/layout/structuredCloneShim.native.js +160 -0
  637. package/dist/jsx/layout/structuredCloneShim.native.js.map +1 -0
  638. package/dist/jsx/layout/types.mjs +2 -0
  639. package/dist/jsx/layout/types.mjs.map +1 -0
  640. package/dist/jsx/layout/types.native.js +21 -0
  641. package/dist/jsx/layout/types.native.js.map +1 -0
  642. package/dist/jsx/layout/worker.entry.mjs +33 -0
  643. package/dist/jsx/layout/worker.entry.mjs.map +1 -0
  644. package/dist/jsx/layout/worker.entry.native.js +75 -0
  645. package/dist/jsx/layout/worker.entry.native.js.map +1 -0
  646. package/dist/jsx/layout/worker.generated.mjs +5 -0
  647. package/dist/jsx/layout/worker.generated.mjs.map +1 -0
  648. package/dist/jsx/layout/worker.generated.native.js +35 -0
  649. package/dist/jsx/layout/worker.generated.native.js.map +1 -0
  650. package/dist/jsx/model/commands.mjs +209 -0
  651. package/dist/jsx/model/commands.mjs.map +1 -0
  652. package/dist/jsx/model/commands.native.js +317 -0
  653. package/dist/jsx/model/commands.native.js.map +1 -0
  654. package/dist/jsx/model/connect.mjs +124 -0
  655. package/dist/jsx/model/connect.mjs.map +1 -0
  656. package/dist/jsx/model/connect.native.js +239 -0
  657. package/dist/jsx/model/connect.native.js.map +1 -0
  658. package/dist/jsx/model/document.mjs +2 -0
  659. package/dist/jsx/model/document.mjs.map +1 -0
  660. package/dist/jsx/model/document.native.js +21 -0
  661. package/dist/jsx/model/document.native.js.map +1 -0
  662. package/dist/jsx/model/history.mjs +96 -0
  663. package/dist/jsx/model/history.mjs.map +1 -0
  664. package/dist/jsx/model/history.native.js +178 -0
  665. package/dist/jsx/model/history.native.js.map +1 -0
  666. package/dist/jsx/model/index.mjs +8 -0
  667. package/dist/jsx/model/index.mjs.map +1 -0
  668. package/dist/jsx/model/index.native.js +63 -0
  669. package/dist/jsx/model/index.native.js.map +1 -0
  670. package/dist/jsx/model/schema.mjs +32 -0
  671. package/dist/jsx/model/schema.mjs.map +1 -0
  672. package/dist/jsx/model/schema.native.js +68 -0
  673. package/dist/jsx/model/schema.native.js.map +1 -0
  674. package/dist/jsx/model/select.mjs +49 -0
  675. package/dist/jsx/model/select.mjs.map +1 -0
  676. package/dist/jsx/model/select.native.js +107 -0
  677. package/dist/jsx/model/select.native.js.map +1 -0
  678. package/dist/jsx/model/serialize.mjs +306 -0
  679. package/dist/jsx/model/serialize.mjs.map +1 -0
  680. package/dist/jsx/model/serialize.native.js +374 -0
  681. package/dist/jsx/model/serialize.native.js.map +1 -0
  682. package/dist/jsx/native/DomOnlyStory.mjs +33 -0
  683. package/dist/jsx/native/DomOnlyStory.mjs.map +1 -0
  684. package/dist/jsx/native/DomOnlyStory.native.js +66 -0
  685. package/dist/jsx/native/DomOnlyStory.native.js.map +1 -0
  686. package/dist/jsx/native/GraphToolbar.mjs +76 -0
  687. package/dist/jsx/native/GraphToolbar.mjs.map +1 -0
  688. package/dist/jsx/native/GraphToolbar.native.js +107 -0
  689. package/dist/jsx/native/GraphToolbar.native.js.map +1 -0
  690. package/dist/jsx/native/domEntryRegistry.mjs +12 -0
  691. package/dist/jsx/native/domEntryRegistry.mjs.map +1 -0
  692. package/dist/jsx/native/domEntryRegistry.native.js +42 -0
  693. package/dist/jsx/native/domEntryRegistry.native.js.map +1 -0
  694. package/dist/jsx/native/graphChildren.mjs +18 -0
  695. package/dist/jsx/native/graphChildren.mjs.map +1 -0
  696. package/dist/jsx/native/graphChildren.native.js +50 -0
  697. package/dist/jsx/native/graphChildren.native.js.map +1 -0
  698. package/dist/jsx/nodes/GraphNode.mjs +136 -0
  699. package/dist/jsx/nodes/GraphNode.mjs.map +1 -0
  700. package/dist/jsx/nodes/GraphNode.native.js +206 -0
  701. package/dist/jsx/nodes/GraphNode.native.js.map +1 -0
  702. package/dist/jsx/nodes/GraphPort.mjs +79 -0
  703. package/dist/jsx/nodes/GraphPort.mjs.map +1 -0
  704. package/dist/jsx/nodes/GraphPort.native.js +108 -0
  705. package/dist/jsx/nodes/GraphPort.native.js.map +1 -0
  706. package/dist/jsx/nodes/handleGeometry.mjs +65 -0
  707. package/dist/jsx/nodes/handleGeometry.mjs.map +1 -0
  708. package/dist/jsx/nodes/handleGeometry.native.js +104 -0
  709. package/dist/jsx/nodes/handleGeometry.native.js.map +1 -0
  710. package/dist/jsx/nodes/lod.mjs +13 -0
  711. package/dist/jsx/nodes/lod.mjs.map +1 -0
  712. package/dist/jsx/nodes/lod.native.js +45 -0
  713. package/dist/jsx/nodes/lod.native.js.map +1 -0
  714. package/dist/jsx/nodes/nodeMeasure.mjs +72 -0
  715. package/dist/jsx/nodes/nodeMeasure.mjs.map +1 -0
  716. package/dist/jsx/nodes/nodeMeasure.native.js +134 -0
  717. package/dist/jsx/nodes/nodeMeasure.native.js.map +1 -0
  718. package/dist/jsx/nodes/overviewNode.mjs +49 -0
  719. package/dist/jsx/nodes/overviewNode.mjs.map +1 -0
  720. package/dist/jsx/nodes/overviewNode.native.js +81 -0
  721. package/dist/jsx/nodes/overviewNode.native.js.map +1 -0
  722. package/dist/jsx/react-flow/ConnectionPuck.mjs +96 -0
  723. package/dist/jsx/react-flow/ConnectionPuck.mjs.map +1 -0
  724. package/dist/jsx/react-flow/ConnectionPuck.native.js +143 -0
  725. package/dist/jsx/react-flow/ConnectionPuck.native.js.map +1 -0
  726. package/dist/jsx/react-flow/GraphActions.mjs +21 -0
  727. package/dist/jsx/react-flow/GraphActions.mjs.map +1 -0
  728. package/dist/jsx/react-flow/GraphActions.native.js +51 -0
  729. package/dist/jsx/react-flow/GraphActions.native.js.map +1 -0
  730. package/dist/jsx/react-flow/GraphCommandBridge.mjs +213 -0
  731. package/dist/jsx/react-flow/GraphCommandBridge.mjs.map +1 -0
  732. package/dist/jsx/react-flow/GraphCommandBridge.native.js +272 -0
  733. package/dist/jsx/react-flow/GraphCommandBridge.native.js.map +1 -0
  734. package/dist/jsx/react-flow/GraphNodeHost.mjs +50 -0
  735. package/dist/jsx/react-flow/GraphNodeHost.mjs.map +1 -0
  736. package/dist/jsx/react-flow/GraphNodeHost.native.js +89 -0
  737. package/dist/jsx/react-flow/GraphNodeHost.native.js.map +1 -0
  738. package/dist/jsx/react-flow/GraphPaintProbe.mjs +35 -0
  739. package/dist/jsx/react-flow/GraphPaintProbe.mjs.map +1 -0
  740. package/dist/jsx/react-flow/GraphPaintProbe.native.js +65 -0
  741. package/dist/jsx/react-flow/GraphPaintProbe.native.js.map +1 -0
  742. package/dist/jsx/react-flow/GraphZoomVar.mjs +16 -0
  743. package/dist/jsx/react-flow/GraphZoomVar.mjs.map +1 -0
  744. package/dist/jsx/react-flow/GraphZoomVar.native.js +48 -0
  745. package/dist/jsx/react-flow/GraphZoomVar.native.js.map +1 -0
  746. package/dist/jsx/react-flow/LassoOverlay.mjs +22 -0
  747. package/dist/jsx/react-flow/LassoOverlay.mjs.map +1 -0
  748. package/dist/jsx/react-flow/LassoOverlay.native.js +51 -0
  749. package/dist/jsx/react-flow/LassoOverlay.native.js.map +1 -0
  750. package/dist/jsx/react-flow/NodeGraphWeb.mjs +359 -0
  751. package/dist/jsx/react-flow/NodeGraphWeb.mjs.map +1 -0
  752. package/dist/jsx/react-flow/NodeGraphWeb.native.js +515 -0
  753. package/dist/jsx/react-flow/NodeGraphWeb.native.js.map +1 -0
  754. package/dist/jsx/react-flow/SnapGuides.mjs +60 -0
  755. package/dist/jsx/react-flow/SnapGuides.mjs.map +1 -0
  756. package/dist/jsx/react-flow/SnapGuides.native.js +114 -0
  757. package/dist/jsx/react-flow/SnapGuides.native.js.map +1 -0
  758. package/dist/jsx/react-flow/demoControlBody.mjs +67 -0
  759. package/dist/jsx/react-flow/demoControlBody.mjs.map +1 -0
  760. package/dist/jsx/react-flow/demoControlBody.native.js +104 -0
  761. package/dist/jsx/react-flow/demoControlBody.native.js.map +1 -0
  762. package/dist/jsx/react-flow/demoNodeBody.mjs +91 -0
  763. package/dist/jsx/react-flow/demoNodeBody.mjs.map +1 -0
  764. package/dist/jsx/react-flow/demoNodeBody.native.js +131 -0
  765. package/dist/jsx/react-flow/demoNodeBody.native.js.map +1 -0
  766. package/dist/jsx/react-flow/fixtures.mjs +185 -0
  767. package/dist/jsx/react-flow/fixtures.mjs.map +1 -0
  768. package/dist/jsx/react-flow/fixtures.native.js +225 -0
  769. package/dist/jsx/react-flow/fixtures.native.js.map +1 -0
  770. package/dist/jsx/react-flow/flowAdapter.mjs +94 -0
  771. package/dist/jsx/react-flow/flowAdapter.mjs.map +1 -0
  772. package/dist/jsx/react-flow/flowAdapter.native.js +133 -0
  773. package/dist/jsx/react-flow/flowAdapter.native.js.map +1 -0
  774. package/dist/jsx/react-flow/graphHandle.mjs +3 -0
  775. package/dist/jsx/react-flow/graphHandle.mjs.map +1 -0
  776. package/dist/jsx/react-flow/graphHandle.native.js +31 -0
  777. package/dist/jsx/react-flow/graphHandle.native.js.map +1 -0
  778. package/dist/jsx/react-flow/nodeCensus.mjs +28 -0
  779. package/dist/jsx/react-flow/nodeCensus.mjs.map +1 -0
  780. package/dist/jsx/react-flow/nodeCensus.native.js +80 -0
  781. package/dist/jsx/react-flow/nodeCensus.native.js.map +1 -0
  782. package/dist/jsx/react-flow/useGraphController.mjs +269 -0
  783. package/dist/jsx/react-flow/useGraphController.mjs.map +1 -0
  784. package/dist/jsx/react-flow/useGraphController.native.js +393 -0
  785. package/dist/jsx/react-flow/useGraphController.native.js.map +1 -0
  786. package/dist/jsx/react-flow/xy.mjs +8 -0
  787. package/dist/jsx/react-flow/xy.mjs.map +1 -0
  788. package/dist/jsx/react-flow/xy.native.js +63 -0
  789. package/dist/jsx/react-flow/xy.native.js.map +1 -0
  790. package/dist/jsx/theme/GraphFaces.mjs +88 -0
  791. package/dist/jsx/theme/GraphFaces.mjs.map +1 -0
  792. package/dist/jsx/theme/GraphFaces.native.js +181 -0
  793. package/dist/jsx/theme/GraphFaces.native.js.map +1 -0
  794. package/dist/jsx/theme/GraphVarsStyle.mjs +59 -0
  795. package/dist/jsx/theme/GraphVarsStyle.mjs.map +1 -0
  796. package/dist/jsx/theme/GraphVarsStyle.native.js +100 -0
  797. package/dist/jsx/theme/GraphVarsStyle.native.js.map +1 -0
  798. package/dist/jsx/theme/faces.generated.mjs +23 -0
  799. package/dist/jsx/theme/faces.generated.mjs.map +1 -0
  800. package/dist/jsx/theme/faces.generated.native.js +51 -0
  801. package/dist/jsx/theme/faces.generated.native.js.map +1 -0
  802. package/dist/jsx/theme/faces.mjs +89 -0
  803. package/dist/jsx/theme/faces.mjs.map +1 -0
  804. package/dist/jsx/theme/faces.native.js +133 -0
  805. package/dist/jsx/theme/faces.native.js.map +1 -0
  806. package/dist/jsx/theme/graphVars.mjs +284 -0
  807. package/dist/jsx/theme/graphVars.mjs.map +1 -0
  808. package/dist/jsx/theme/graphVars.native.js +351 -0
  809. package/dist/jsx/theme/graphVars.native.js.map +1 -0
  810. package/dom-inner.ts +21 -0
  811. package/metro/index.js +174 -0
  812. package/metro/index.spec.mjs +235 -0
  813. package/model.ts +9 -0
  814. package/package.json +137 -0
  815. package/src/NodeGraph.native.spec.ts +164 -0
  816. package/src/NodeGraph.native.tsx +278 -0
  817. package/src/NodeGraph.tsx +27 -0
  818. package/src/bench/Perf200.stories.tsx +351 -0
  819. package/src/bench/frameSampler.spec.ts +467 -0
  820. package/src/bench/frameSampler.ts +516 -0
  821. package/src/bench/generateGraph.ts +138 -0
  822. package/src/diagnostics/GraphDiagnostics.spec.tsx +206 -0
  823. package/src/diagnostics/GraphDiagnostics.stories.tsx +194 -0
  824. package/src/diagnostics/GraphDiagnostics.tsx +140 -0
  825. package/src/diagnostics/LiveGraphDiagnostics.native.tsx +61 -0
  826. package/src/diagnostics/LiveGraphDiagnostics.tsx +121 -0
  827. package/src/diagnostics/deliberateBreak.ts +35 -0
  828. package/src/diagnostics/fromWire.spec.ts +74 -0
  829. package/src/diagnostics/fromWire.ts +48 -0
  830. package/src/diagnostics/lastError.ts +91 -0
  831. package/src/diagnostics/types.ts +103 -0
  832. package/src/diagnostics/useGraphDiagnostics.spec.tsx +199 -0
  833. package/src/diagnostics/useGraphDiagnostics.ts +85 -0
  834. package/src/dom/GraphDomLayout.spec.tsx +56 -0
  835. package/src/dom/GraphDomLayout.tsx +49 -0
  836. package/src/dom/NodeGraphDom.ts +43 -0
  837. package/src/dom/NodeGraphDomInner.tsx +524 -0
  838. package/src/dom/NodeGraphDomShell.ts +402 -0
  839. package/src/dom/boot.spec.ts +90 -0
  840. package/src/dom/boot.ts +153 -0
  841. package/src/dom/domEntry.spec.ts +481 -0
  842. package/src/dom/importGraph.spec.ts +287 -0
  843. package/src/dom/schemaRegistry.spec.tsx +182 -0
  844. package/src/dom/wire.spec.ts +486 -0
  845. package/src/dom/wire.ts +493 -0
  846. package/src/edges/Edges.stories.tsx +271 -0
  847. package/src/edges/GraphEdge.tsx +198 -0
  848. package/src/edges/edgeKinds.ts +51 -0
  849. package/src/edges/edgeStyle.spec.ts +295 -0
  850. package/src/edges/edgeStyle.ts +124 -0
  851. package/src/index.native.ts +147 -0
  852. package/src/index.ts +243 -0
  853. package/src/interaction/Lasso.stories.tsx +198 -0
  854. package/src/interaction/Snapping.stories.tsx +189 -0
  855. package/src/interaction/lassoIntercept.spec.ts +166 -0
  856. package/src/interaction/lassoIntercept.ts +81 -0
  857. package/src/interaction/legalTargets.spec.ts +304 -0
  858. package/src/interaction/legalTargets.ts +91 -0
  859. package/src/interaction/snapAlignment.spec.ts +412 -0
  860. package/src/interaction/snapAlignment.ts +209 -0
  861. package/src/interaction/snapChanges.spec.ts +273 -0
  862. package/src/interaction/snapChanges.ts +292 -0
  863. package/src/interaction/spatialHash.spec.ts +168 -0
  864. package/src/interaction/spatialHash.ts +128 -0
  865. package/src/interaction/useLassoSelect.spec.tsx +487 -0
  866. package/src/interaction/useLassoSelect.ts +489 -0
  867. package/src/knobs/KnobEnvelopeProvider.tsx +110 -0
  868. package/src/knobs/envelope.spec.tsx +371 -0
  869. package/src/knobs/envelope.ts +130 -0
  870. package/src/knobs/envelopeTheme.spec.ts +58 -0
  871. package/src/knobs/graphKnobs.ts +36 -0
  872. package/src/knobs/useKnobEnvelope.ts +152 -0
  873. package/src/layout/AutoLayout.stories.tsx +338 -0
  874. package/src/layout/dagre.ts +149 -0
  875. package/src/layout/layout.spec.ts +244 -0
  876. package/src/layout/layout.ts +121 -0
  877. package/src/layout/runner.spec.ts +365 -0
  878. package/src/layout/runner.ts +256 -0
  879. package/src/layout/structuredCloneShim.spec.ts +103 -0
  880. package/src/layout/structuredCloneShim.ts +106 -0
  881. package/src/layout/types.ts +112 -0
  882. package/src/layout/worker.entry.ts +74 -0
  883. package/src/layout/worker.generated.spec.ts +157 -0
  884. package/src/layout/worker.generated.ts +32 -0
  885. package/src/model/commands.spec.ts +214 -0
  886. package/src/model/commands.ts +209 -0
  887. package/src/model/connect.spec.ts +444 -0
  888. package/src/model/connect.ts +281 -0
  889. package/src/model/document.ts +121 -0
  890. package/src/model/history.spec.ts +278 -0
  891. package/src/model/history.ts +153 -0
  892. package/src/model/index.ts +74 -0
  893. package/src/model/schema.ts +177 -0
  894. package/src/model/select.spec.ts +220 -0
  895. package/src/model/select.ts +88 -0
  896. package/src/model/serialize.spec.ts +393 -0
  897. package/src/model/serialize.ts +395 -0
  898. package/src/native/DomOnlyStory.tsx +72 -0
  899. package/src/native/GraphFallback.native.tsx +123 -0
  900. package/src/native/GraphToolbar.tsx +171 -0
  901. package/src/native/NodeGraph.native.tsx +505 -0
  902. package/src/native/domEntryRegistry.spec.ts +66 -0
  903. package/src/native/domEntryRegistry.ts +45 -0
  904. package/src/native/graphChildren.spec.ts +67 -0
  905. package/src/native/graphChildren.ts +62 -0
  906. package/src/native/graphFallback.spec.ts +49 -0
  907. package/src/native/graphHandleRemount.spec.tsx +189 -0
  908. package/src/nodes/GraphNode.spec.tsx +270 -0
  909. package/src/nodes/GraphNode.stories.tsx +451 -0
  910. package/src/nodes/GraphNode.tsx +240 -0
  911. package/src/nodes/GraphPort.spec.tsx +442 -0
  912. package/src/nodes/GraphPort.stories.tsx +407 -0
  913. package/src/nodes/GraphPort.tsx +117 -0
  914. package/src/nodes/Overview.stories.tsx +237 -0
  915. package/src/nodes/handleGeometry.spec.ts +161 -0
  916. package/src/nodes/handleGeometry.ts +232 -0
  917. package/src/nodes/lod.spec.tsx +300 -0
  918. package/src/nodes/lod.ts +69 -0
  919. package/src/nodes/nodeMeasure.spec.ts +245 -0
  920. package/src/nodes/nodeMeasure.ts +216 -0
  921. package/src/nodes/overviewNode.tsx +71 -0
  922. package/src/packageShape.spec.ts +145 -0
  923. package/src/react-flow/ConnectionPuck.spec.tsx +242 -0
  924. package/src/react-flow/ConnectionPuck.tsx +175 -0
  925. package/src/react-flow/GraphActions.tsx +64 -0
  926. package/src/react-flow/GraphCommandBridge.spec.tsx +130 -0
  927. package/src/react-flow/GraphCommandBridge.tsx +288 -0
  928. package/src/react-flow/GraphNodeHost.tsx +101 -0
  929. package/src/react-flow/GraphPaintProbe.spec.tsx +116 -0
  930. package/src/react-flow/GraphPaintProbe.tsx +65 -0
  931. package/src/react-flow/GraphZoomVar.tsx +48 -0
  932. package/src/react-flow/LassoOverlay.tsx +59 -0
  933. package/src/react-flow/NodeGraphWeb.spec.tsx +441 -0
  934. package/src/react-flow/NodeGraphWeb.stories.tsx +260 -0
  935. package/src/react-flow/NodeGraphWeb.tsx +645 -0
  936. package/src/react-flow/SnapGuides.spec.tsx +161 -0
  937. package/src/react-flow/SnapGuides.tsx +113 -0
  938. package/src/react-flow/demoControlBody.tsx +96 -0
  939. package/src/react-flow/demoNodeBody.tsx +121 -0
  940. package/src/react-flow/fixtures.ts +185 -0
  941. package/src/react-flow/flowAdapter.ts +170 -0
  942. package/src/react-flow/graphHandle.ts +112 -0
  943. package/src/react-flow/nodeCensus.spec.ts +66 -0
  944. package/src/react-flow/nodeCensus.ts +69 -0
  945. package/src/react-flow/useGraphController.spec.tsx +849 -0
  946. package/src/react-flow/useGraphController.ts +473 -0
  947. package/src/react-flow/xy.spec.ts +182 -0
  948. package/src/react-flow/xy.ts +131 -0
  949. package/src/theme/GraphFaces.spec.tsx +101 -0
  950. package/src/theme/GraphFaces.tsx +218 -0
  951. package/src/theme/GraphVarsStyle.tsx +113 -0
  952. package/src/theme/faces.generated.ts +53 -0
  953. package/src/theme/faces.spec.ts +228 -0
  954. package/src/theme/faces.ts +275 -0
  955. package/src/theme/graphCss.spec.ts +111 -0
  956. package/src/theme/graphVars.spec.ts +322 -0
  957. package/src/theme/graphVars.ts +441 -0
  958. package/types/NodeGraph.d.ts +17 -0
  959. package/types/NodeGraph.d.ts.map +1 -0
  960. package/types/NodeGraph.native.d.ts +142 -0
  961. package/types/NodeGraph.native.d.ts.map +1 -0
  962. package/types/bench/frameSampler.d.ts +235 -0
  963. package/types/bench/frameSampler.d.ts.map +1 -0
  964. package/types/bench/generateGraph.d.ts +43 -0
  965. package/types/bench/generateGraph.d.ts.map +1 -0
  966. package/types/diagnostics/GraphDiagnostics.d.ts +30 -0
  967. package/types/diagnostics/GraphDiagnostics.d.ts.map +1 -0
  968. package/types/diagnostics/LiveGraphDiagnostics.d.ts +27 -0
  969. package/types/diagnostics/LiveGraphDiagnostics.d.ts.map +1 -0
  970. package/types/diagnostics/LiveGraphDiagnostics.native.d.ts +25 -0
  971. package/types/diagnostics/LiveGraphDiagnostics.native.d.ts.map +1 -0
  972. package/types/diagnostics/deliberateBreak.d.ts +28 -0
  973. package/types/diagnostics/deliberateBreak.d.ts.map +1 -0
  974. package/types/diagnostics/fromWire.d.ts +17 -0
  975. package/types/diagnostics/fromWire.d.ts.map +1 -0
  976. package/types/diagnostics/lastError.d.ts +50 -0
  977. package/types/diagnostics/lastError.d.ts.map +1 -0
  978. package/types/diagnostics/types.d.ts +101 -0
  979. package/types/diagnostics/types.d.ts.map +1 -0
  980. package/types/diagnostics/useGraphDiagnostics.d.ts +23 -0
  981. package/types/diagnostics/useGraphDiagnostics.d.ts.map +1 -0
  982. package/types/dom/GraphDomLayout.d.ts +40 -0
  983. package/types/dom/GraphDomLayout.d.ts.map +1 -0
  984. package/types/dom/NodeGraphDom.d.ts +4 -0
  985. package/types/dom/NodeGraphDom.d.ts.map +1 -0
  986. package/types/dom/NodeGraphDomInner.d.ts +26 -0
  987. package/types/dom/NodeGraphDomInner.d.ts.map +1 -0
  988. package/types/dom/NodeGraphDomShell.d.ts +221 -0
  989. package/types/dom/NodeGraphDomShell.d.ts.map +1 -0
  990. package/types/dom/boot.d.ts +90 -0
  991. package/types/dom/boot.d.ts.map +1 -0
  992. package/types/dom/wire.d.ts +355 -0
  993. package/types/dom/wire.d.ts.map +1 -0
  994. package/types/edges/GraphEdge.d.ts +59 -0
  995. package/types/edges/GraphEdge.d.ts.map +1 -0
  996. package/types/edges/edgeKinds.d.ts +43 -0
  997. package/types/edges/edgeKinds.d.ts.map +1 -0
  998. package/types/edges/edgeStyle.d.ts +79 -0
  999. package/types/edges/edgeStyle.d.ts.map +1 -0
  1000. package/types/index.d.ts +123 -0
  1001. package/types/index.d.ts.map +1 -0
  1002. package/types/index.native.d.ts +86 -0
  1003. package/types/index.native.d.ts.map +1 -0
  1004. package/types/interaction/lassoIntercept.d.ts +58 -0
  1005. package/types/interaction/lassoIntercept.d.ts.map +1 -0
  1006. package/types/interaction/legalTargets.d.ts +59 -0
  1007. package/types/interaction/legalTargets.d.ts.map +1 -0
  1008. package/types/interaction/snapAlignment.d.ts +85 -0
  1009. package/types/interaction/snapAlignment.d.ts.map +1 -0
  1010. package/types/interaction/snapChanges.d.ts +133 -0
  1011. package/types/interaction/snapChanges.d.ts.map +1 -0
  1012. package/types/interaction/spatialHash.d.ts +37 -0
  1013. package/types/interaction/spatialHash.d.ts.map +1 -0
  1014. package/types/interaction/useLassoSelect.d.ts +151 -0
  1015. package/types/interaction/useLassoSelect.d.ts.map +1 -0
  1016. package/types/knobs/KnobEnvelopeProvider.d.ts +45 -0
  1017. package/types/knobs/KnobEnvelopeProvider.d.ts.map +1 -0
  1018. package/types/knobs/envelope.d.ts +99 -0
  1019. package/types/knobs/envelope.d.ts.map +1 -0
  1020. package/types/knobs/graphKnobs.d.ts +26 -0
  1021. package/types/knobs/graphKnobs.d.ts.map +1 -0
  1022. package/types/knobs/useKnobEnvelope.d.ts +43 -0
  1023. package/types/knobs/useKnobEnvelope.d.ts.map +1 -0
  1024. package/types/layout/dagre.d.ts +39 -0
  1025. package/types/layout/dagre.d.ts.map +1 -0
  1026. package/types/layout/layout.d.ts +58 -0
  1027. package/types/layout/layout.d.ts.map +1 -0
  1028. package/types/layout/runner.d.ts +60 -0
  1029. package/types/layout/runner.d.ts.map +1 -0
  1030. package/types/layout/structuredCloneShim.d.ts +44 -0
  1031. package/types/layout/structuredCloneShim.d.ts.map +1 -0
  1032. package/types/layout/types.d.ts +113 -0
  1033. package/types/layout/types.d.ts.map +1 -0
  1034. package/types/layout/worker.entry.d.ts +34 -0
  1035. package/types/layout/worker.entry.d.ts.map +1 -0
  1036. package/types/layout/worker.generated.d.ts +26 -0
  1037. package/types/layout/worker.generated.d.ts.map +1 -0
  1038. package/types/model/commands.d.ts +49 -0
  1039. package/types/model/commands.d.ts.map +1 -0
  1040. package/types/model/connect.d.ts +83 -0
  1041. package/types/model/connect.d.ts.map +1 -0
  1042. package/types/model/document.d.ts +111 -0
  1043. package/types/model/document.d.ts.map +1 -0
  1044. package/types/model/history.d.ts +40 -0
  1045. package/types/model/history.d.ts.map +1 -0
  1046. package/types/model/index.d.ts +20 -0
  1047. package/types/model/index.d.ts.map +1 -0
  1048. package/types/model/schema.d.ts +136 -0
  1049. package/types/model/schema.d.ts.map +1 -0
  1050. package/types/model/select.d.ts +41 -0
  1051. package/types/model/select.d.ts.map +1 -0
  1052. package/types/model/serialize.d.ts +33 -0
  1053. package/types/model/serialize.d.ts.map +1 -0
  1054. package/types/native/DomOnlyStory.d.ts +49 -0
  1055. package/types/native/DomOnlyStory.d.ts.map +1 -0
  1056. package/types/native/GraphFallback.native.d.ts +41 -0
  1057. package/types/native/GraphFallback.native.d.ts.map +1 -0
  1058. package/types/native/GraphToolbar.d.ts +75 -0
  1059. package/types/native/GraphToolbar.d.ts.map +1 -0
  1060. package/types/native/NodeGraph.native.d.ts +128 -0
  1061. package/types/native/NodeGraph.native.d.ts.map +1 -0
  1062. package/types/native/domEntryRegistry.d.ts +33 -0
  1063. package/types/native/domEntryRegistry.d.ts.map +1 -0
  1064. package/types/native/graphChildren.d.ts +36 -0
  1065. package/types/native/graphChildren.d.ts.map +1 -0
  1066. package/types/nodes/GraphNode.d.ts +48 -0
  1067. package/types/nodes/GraphNode.d.ts.map +1 -0
  1068. package/types/nodes/GraphPort.d.ts +41 -0
  1069. package/types/nodes/GraphPort.d.ts.map +1 -0
  1070. package/types/nodes/handleGeometry.d.ts +183 -0
  1071. package/types/nodes/handleGeometry.d.ts.map +1 -0
  1072. package/types/nodes/lod.d.ts +55 -0
  1073. package/types/nodes/lod.d.ts.map +1 -0
  1074. package/types/nodes/nodeMeasure.d.ts +146 -0
  1075. package/types/nodes/nodeMeasure.d.ts.map +1 -0
  1076. package/types/nodes/overviewNode.d.ts +34 -0
  1077. package/types/nodes/overviewNode.d.ts.map +1 -0
  1078. package/types/react-flow/ConnectionPuck.d.ts +62 -0
  1079. package/types/react-flow/ConnectionPuck.d.ts.map +1 -0
  1080. package/types/react-flow/GraphActions.d.ts +45 -0
  1081. package/types/react-flow/GraphActions.d.ts.map +1 -0
  1082. package/types/react-flow/GraphCommandBridge.d.ts +45 -0
  1083. package/types/react-flow/GraphCommandBridge.d.ts.map +1 -0
  1084. package/types/react-flow/GraphNodeHost.d.ts +32 -0
  1085. package/types/react-flow/GraphNodeHost.d.ts.map +1 -0
  1086. package/types/react-flow/GraphPaintProbe.d.ts +26 -0
  1087. package/types/react-flow/GraphPaintProbe.d.ts.map +1 -0
  1088. package/types/react-flow/GraphZoomVar.d.ts +31 -0
  1089. package/types/react-flow/GraphZoomVar.d.ts.map +1 -0
  1090. package/types/react-flow/LassoOverlay.d.ts +39 -0
  1091. package/types/react-flow/LassoOverlay.d.ts.map +1 -0
  1092. package/types/react-flow/NodeGraphWeb.d.ts +195 -0
  1093. package/types/react-flow/NodeGraphWeb.d.ts.map +1 -0
  1094. package/types/react-flow/SnapGuides.d.ts +49 -0
  1095. package/types/react-flow/SnapGuides.d.ts.map +1 -0
  1096. package/types/react-flow/demoControlBody.d.ts +47 -0
  1097. package/types/react-flow/demoControlBody.d.ts.map +1 -0
  1098. package/types/react-flow/demoNodeBody.d.ts +37 -0
  1099. package/types/react-flow/demoNodeBody.d.ts.map +1 -0
  1100. package/types/react-flow/fixtures.d.ts +107 -0
  1101. package/types/react-flow/fixtures.d.ts.map +1 -0
  1102. package/types/react-flow/flowAdapter.d.ts +56 -0
  1103. package/types/react-flow/flowAdapter.d.ts.map +1 -0
  1104. package/types/react-flow/graphHandle.d.ts +90 -0
  1105. package/types/react-flow/graphHandle.d.ts.map +1 -0
  1106. package/types/react-flow/nodeCensus.d.ts +42 -0
  1107. package/types/react-flow/nodeCensus.d.ts.map +1 -0
  1108. package/types/react-flow/useGraphController.d.ts +93 -0
  1109. package/types/react-flow/useGraphController.d.ts.map +1 -0
  1110. package/types/react-flow/xy.d.ts +84 -0
  1111. package/types/react-flow/xy.d.ts.map +1 -0
  1112. package/types/theme/GraphFaces.d.ts +82 -0
  1113. package/types/theme/GraphFaces.d.ts.map +1 -0
  1114. package/types/theme/GraphVarsStyle.d.ts +56 -0
  1115. package/types/theme/GraphVarsStyle.d.ts.map +1 -0
  1116. package/types/theme/faces.d.ts +152 -0
  1117. package/types/theme/faces.d.ts.map +1 -0
  1118. package/types/theme/faces.generated.d.ts +27 -0
  1119. package/types/theme/faces.generated.d.ts.map +1 -0
  1120. package/types/theme/graphVars.d.ts +155 -0
  1121. package/types/theme/graphVars.d.ts.map +1 -0
@@ -0,0 +1,402 @@
1
+ /**
2
+ * The DOM SHELL — everything a `'use dom'` entry needs except the directive.
3
+ *
4
+ * Exported at `@multiplatform.one/node-graph/dom-inner`, source-resolved on
5
+ * every condition, because the entry itself is APP-OWNED (design §9.3). A
6
+ * schema's `render` is a component and a Tamagui config is a live object, so
7
+ * neither can be JSON and neither can cross the bridge: both have to come from
8
+ * a module the DOM BUNDLE imports, and a DOM bundle is rooted at the file
9
+ * carrying `'use dom'`. The package cannot own that file any more than it can
10
+ * own the schema registry, so it owns everything else and the app writes three
11
+ * lines around it.
12
+ *
13
+ * This file exists to be BORING. Design 9.4's third layer: a blank WebView is
14
+ * what a parse error looks like from the outside, and a parse error in a
15
+ * top-level dependency happens before any error boundary exists. So the shell
16
+ * imports nothing of ours at the top, stamps how far boot got on a global as
17
+ * early as the module body allows, and only then reaches for the real tree
18
+ * through a dynamic `import()` inside a try/catch. Under Metro that becomes a
19
+ * `require`, so a module-eval throw is catchable and reportable instead of
20
+ * fatal.
21
+ *
22
+ * Two consequences worth naming, because both look like mistakes:
23
+ *
24
+ * - It is a `.ts` with `createElement`, not a `.tsx`. The automatic JSX
25
+ * runtime injects a top-level `import { jsx } from "react/jsx-runtime"`, so
26
+ * "no top-level import" is not literally achievable in a `.tsx`, and the
27
+ * honest version of the invariant is "no top-level import of anything that
28
+ * can throw".
29
+ * - The boot stamp is written INLINE rather than through `boot.ts`, which
30
+ * already has a function for it. Importing that function would be a
31
+ * top-level import of ours. `boot.ts` exports `bootGlobalKey` and
32
+ * `domEntry.spec.ts` asserts this file names the same slot, so the
33
+ * duplication cannot drift.
34
+ *
35
+ * The imperative handle lives HERE rather than in the inner tree, so
36
+ * `ref.current.fitView()` after a failed boot is a no-op that reports, not a
37
+ * `TypeError` on a canvas that never mounted. The inner tree registers the
38
+ * real implementations into `commands` when it mounts.
39
+ *
40
+ * WHAT THE APP'S ENTRY ADDS, and why it cannot be here (measured on the
41
+ * iPhone 16e simulator and on emulator-5592 at task 2.7/2.8): `getConfig()`
42
+ * threw inside the DOM bundle because `createThemeConfig` is a FACTORY the app
43
+ * calls and nothing in `public/node-graph`'s import graph calls it, so the
44
+ * canvas mounted with no `TamaguiProvider` and the first Tamagui component
45
+ * threw `Missing theme.` on both platforms. `config` is now a prop, and the
46
+ * one place it can come from is a static import in the app's own entry.
47
+ */
48
+
49
+ import { Component, createElement, useEffect, useMemo, useRef, useState } from "react";
50
+ import { useDOMImperativeHandle } from "expo/dom";
51
+ import type { ComponentType, ErrorInfo, ReactNode, Ref } from "react";
52
+ import type { DOMImperativeFactory, DOMProps } from "expo/dom";
53
+ import type { TamaguiInternalConfig } from "@tamagui/web";
54
+ import type { EdgeKindDefs, GraphSchema, NodeKindDefs } from "../model/index";
55
+ import type { GraphCommandSlot, GraphCommands, NodeGraphHandle } from "../react-flow/graphHandle";
56
+ import type { FontFaceWire, GraphEventWire } from "./wire";
57
+
58
+ // The heartbeat's first beat. Before this line the only things that have run
59
+ // are `react` and `expo/dom`, both of which are present by construction inside
60
+ // a DOM bundle.
61
+ //
62
+ // `startedAt` is stamped here and only here: every later stage carries it
63
+ // forward, so `at - startedAt` is how long boot took. That elapsed number is
64
+ // what the native watchdog's budget is set from, and before MPO-211 there was
65
+ // none — design 9.4's 4000 ms was a guess, and on emulator-5590 rebooted
66
+ // fresh it was the wrong guess.
67
+ const bootAt = Date.now();
68
+ (globalThis as unknown as Record<string, unknown>).__mp_graph_boot = {
69
+ stage: "script",
70
+ at: bootAt,
71
+ startedAt: bootAt,
72
+ history: ["script"],
73
+ };
74
+
75
+ /**
76
+ * The canvas options that are not knobs. JSON because they cross the bridge;
77
+ * every field optional because a host that sets none should still get the
78
+ * package's measured defaults, which live in `NodeGraphDomInner`.
79
+ */
80
+ export interface NodeGraphDomOptions {
81
+ readonly readOnly?: boolean;
82
+ /** Touch surface: widens the port pitch and makes fields display-only. */
83
+ readonly coarsePointer?: boolean;
84
+ readonly onlyRenderVisibleElements?: boolean;
85
+ readonly fitView?: boolean;
86
+ readonly overviewZoom?: number;
87
+ /** Drop nodes and edges the schema does not know instead of refusing the document. */
88
+ readonly dropUnknownKinds?: boolean;
89
+ /**
90
+ * Arms design §7.3's long press INSIDE the WebView (milestone 6).
91
+ *
92
+ * A boolean and not a hook, because it has to cross the bridge. The gesture
93
+ * needs `.react-flow__pane`, which exists only in the DOM realm — the story
94
+ * that wired the interceptor to a HOST-tree ref could not mount on native at
95
+ * all (`View config getter callback for component 'div'`), and would not have
96
+ * reached the right element if it had.
97
+ *
98
+ * Arm / select / cancel come back as `{ t: "lasso" }` on the wire, with a
99
+ * haptic HINT on `arm`: a WebView cannot buzz and whether a buzz is right is
100
+ * the shell's call.
101
+ */
102
+ readonly longPressLasso?: boolean;
103
+ /**
104
+ * `pan` or `select`, design §7.3 — the toolbar's mode, crossing the bridge.
105
+ *
106
+ * It is a prop on `NodeGraphWeb` and was never in this options object, so on
107
+ * native the toolbar flipped its own label and the canvas never heard. MPO-212
108
+ * recorded the mode flip as proven on device from the READOUT; what a 190 pt
109
+ * drag then failed to do in select mode was therefore unexplained. It is
110
+ * explained: `panOnDrag` inside the WebView stayed `true`.
111
+ */
112
+ readonly interactionMode?: "pan" | "select";
113
+ }
114
+
115
+ export interface NodeGraphDomProps {
116
+ /**
117
+ * The serialized document. A STRING on purpose: one `JSON.parse` inside
118
+ * beats structured prop walking across the marshaller, and an identity check
119
+ * becomes a string compare.
120
+ */
121
+ readonly documentJson: string;
122
+ /** Monotonic, stamped by the host. See the echo gate in `wire.ts`. */
123
+ readonly rev: number;
124
+ readonly envelopeJson: string;
125
+ /** The schema is looked up by id: a `render` is a component and cannot be JSON. */
126
+ readonly schemaId: string;
127
+ readonly optionsJson: string;
128
+ readonly extraFaces?: readonly FontFaceWire[];
129
+ /** ONE channel. Adding an event never changes the bridge surface. */
130
+ readonly onEvent: (eventJson: string) => Promise<void>;
131
+ readonly dom?: DOMProps;
132
+ readonly ref?: Ref<NodeGraphDomHandle>;
133
+ }
134
+
135
+ /**
136
+ * Design §9.1's handle, DEFINED in `react-flow/graphHandle.ts` and re-exported
137
+ * here under its bridge name.
138
+ *
139
+ * It moved in milestone 6 because `NodeGraphWeb` now publishes the SAME handle
140
+ * through `graphRef` — one command surface on both platforms, so a story writes
141
+ * one toolbar — and a web build must not take an edge, even an erased one, to a
142
+ * module whose first import is `expo/dom`. The names here are unchanged, so
143
+ * `@multiplatform.one/node-graph/dom-inner` still exports exactly what it did.
144
+ */
145
+ export type { GraphCommandSlot, GraphCommands, NodeGraphHandle } from "../react-flow/graphHandle";
146
+ export type NodeGraphDomHandle = NodeGraphHandle;
147
+ /** What the inner tree registers once React Flow is mounted and reachable. */
148
+ export type GraphDomCommands = GraphCommands;
149
+ export type GraphDomCommandSlot = GraphCommandSlot;
150
+
151
+ /**
152
+ * What the APP's `'use dom'` entry supplies on top of the bridge props: the two
153
+ * things that are live objects rather than JSON, so the two things that can
154
+ * only arrive from a module the DOM bundle itself imports.
155
+ */
156
+ export interface NodeGraphDomRealmProps<
157
+ N extends NodeKindDefs = NodeKindDefs,
158
+ E extends EdgeKindDefs = EdgeKindDefs,
159
+ > {
160
+ /**
161
+ * The app's `createTamagui` result. Without it `getConfig()` throws inside
162
+ * the WebView and the first Tamagui component dies with `Missing theme.` —
163
+ * which is exactly what milestone 2 died of before this prop existed.
164
+ */
165
+ readonly config?: TamaguiInternalConfig;
166
+ /**
167
+ * The schema BY VALUE, for the common app that has ONE.
168
+ *
169
+ * Kept beside `schemas` rather than folded into it: one schema is the common
170
+ * case, and making every consumer write a single-element array to say so
171
+ * would be ceremony charged to the majority.
172
+ */
173
+ readonly schema?: GraphSchema<N, E>;
174
+ /**
175
+ * Every schema this entry can render, looked up BY ID (milestone 6 device
176
+ * pass).
177
+ *
178
+ * A `render` is a `ComponentType`: it cannot be JSON, so it cannot cross the
179
+ * bridge, and the only string that does is `schemaId`. An entry that could
180
+ * supply exactly one schema was therefore an app that could show exactly one
181
+ * kind of canvas on device — measured on the iPhone 16e, where
182
+ * `NodeGraph/Perf200` → `Control` reported
183
+ * `render: no graph schema registered as "node-graph-demo-control"` and
184
+ * painted nothing, which left design §13.2's mandated plain-div control
185
+ * condition unmeasurable on every device.
186
+ *
187
+ * The inner tree builds an id-keyed registry out of this list and looks the
188
+ * inbound `schemaId` up in it. A schema whose id does not match is NEVER
189
+ * substituted: a silent substitution renders the wrong nodes instead of
190
+ * reporting anything, which is worse than a fallback that says what is
191
+ * missing. An app that would rather not thread a prop calls
192
+ * `registerGraphSchema` in a module its entry imports; the inner tree prefers
193
+ * that registry, so the two mechanisms compose rather than compete.
194
+ */
195
+ readonly schemas?: readonly GraphSchema<N, E>[];
196
+ }
197
+
198
+ export interface NodeGraphDomShellProps<
199
+ N extends NodeKindDefs = NodeKindDefs,
200
+ E extends EdgeKindDefs = EdgeKindDefs,
201
+ >
202
+ extends NodeGraphDomProps, NodeGraphDomRealmProps<N, E> {}
203
+
204
+ export interface NodeGraphDomInnerProps extends NodeGraphDomProps {
205
+ readonly commands: GraphDomCommandSlot;
206
+ readonly config?: TamaguiInternalConfig;
207
+ /** Erased at this boundary exactly as `registerGraphSchema` erases it. */
208
+ readonly schema?: GraphSchema<never, never>;
209
+ /** The same erasure, for the id-keyed list. */
210
+ readonly schemas?: readonly GraphSchema<never, never>[];
211
+ }
212
+
213
+ type InnerModule = { readonly NodeGraphDomInner: ComponentType<NodeGraphDomInnerProps> };
214
+
215
+ function messageOf(error: unknown): string {
216
+ return error instanceof Error ? error.message : String(error);
217
+ }
218
+
219
+ interface BoundaryProps {
220
+ readonly report: (event: GraphEventWire) => void;
221
+ readonly children?: ReactNode;
222
+ }
223
+
224
+ /**
225
+ * Design 9.4 layer 5's error boundary, and it is the only layer that can say
226
+ * WHAT went wrong.
227
+ *
228
+ * Measured on the iPhone 16e simulator: a render throw inside the canvas
229
+ * reached `window.onerror`, which reported the message `"Script error."` and
230
+ * nothing else. That is not a bug in the handler — a browser sanitises
231
+ * `onerror` to exactly that string when the throw came from a script loaded
232
+ * from a different origin than the document, and an Expo DOM component's
233
+ * `<script src>` is precisely that. So the host saw `phase: "runtime"`, kept
234
+ * the canvas (correctly, a runtime error is not fatal), the watchdog fired
235
+ * four seconds later, and the failure had no description anywhere.
236
+ *
237
+ * React hands the boundary the real Error object, so this one does. It lives
238
+ * in the ENTRY rather than the inner tree because the throw it exists to catch
239
+ * is the inner tree's own render, and a boundary inside the thing that throws
240
+ * catches nothing. A class component and `createElement`, importing only
241
+ * `react`, so the entry's "no top-level import of anything that can throw"
242
+ * invariant still holds.
243
+ */
244
+ class GraphRenderBoundary extends Component<BoundaryProps, { message: string | null }> {
245
+ state: { message: string | null } = { message: null };
246
+
247
+ static getDerivedStateFromError(error: unknown): { message: string | null } {
248
+ return { message: error instanceof Error ? error.message : String(error) };
249
+ }
250
+
251
+ componentDidCatch(error: unknown, info: ErrorInfo) {
252
+ this.props.report({
253
+ t: "error",
254
+ phase: "render",
255
+ message: messageOf(error),
256
+ stack: error instanceof Error ? error.stack : (info.componentStack ?? undefined),
257
+ });
258
+ }
259
+
260
+ render() {
261
+ if (this.state.message !== null) {
262
+ return createElement(
263
+ "div",
264
+ { "data-graph-boot-error": "render", role: "alert" },
265
+ `node-graph failed to render: ${this.state.message}`,
266
+ );
267
+ }
268
+ return this.props.children;
269
+ }
270
+ }
271
+
272
+ export function NodeGraphDomShell<
273
+ N extends NodeKindDefs = NodeKindDefs,
274
+ E extends EdgeKindDefs = EdgeKindDefs,
275
+ >(props: NodeGraphDomShellProps<N, E>) {
276
+ const { config, onEvent, schema, schemas } = props;
277
+ const commands = useRef<GraphCommands | null>(null);
278
+ const [Inner, setInner] = useState<ComponentType<NodeGraphDomInnerProps> | null>(null);
279
+ const [moduleError, setModuleError] = useState<string | null>(null);
280
+
281
+ // `encodeGraphEvent` lives in `wire.ts` and this file may not import it, so
282
+ // the one `JSON.stringify` the entry needs is written out. It is the same
283
+ // union, type-checked against it.
284
+ const report = useMemo(
285
+ () => (event: GraphEventWire) => {
286
+ void onEvent(JSON.stringify(event));
287
+ },
288
+ [onEvent],
289
+ );
290
+
291
+ /**
292
+ * Every command, forwarded through a TYPED intermediate.
293
+ *
294
+ * It was six hand-written arrows and milestone 6 makes it eleven. Hand-writing
295
+ * eleven is how one gets forgotten, and a forgotten one is a button that
296
+ * silently does nothing on a phone with no console to find it in. Annotating
297
+ * the literal `NodeGraphHandle` is what makes that a BUILD error: the object
298
+ * is checked against the interface before the cast, so a method added to
299
+ * `graphHandle.ts` and not forwarded here fails `typecheck`.
300
+ *
301
+ * The cast is still needed and still here once: the handle is JSON-shaped by
302
+ * contract (`DOMImperativeFactory`'s index signature) and the typed view of it
303
+ * is `NodeGraphHandle`, and the two cannot both be expressed at once.
304
+ *
305
+ * Written out rather than looped over `graphCommandNames`, because looping
306
+ * would need a RUNTIME import of that tuple and this file may carry none of
307
+ * ours (design §9.4 layer 3, and `domEntry.spec.ts` holds the import list to
308
+ * `react` and `expo/dom`). The tuple's job is the spec's, not this file's.
309
+ */
310
+ useDOMImperativeHandle(
311
+ props.ref as Ref<DOMImperativeFactory>,
312
+ () => {
313
+ const typed: NodeGraphHandle = {
314
+ fitView: () => commands.current?.fitView(),
315
+ relayout: () => commands.current?.relayout(),
316
+ zoomTo: (zoom) => commands.current?.zoomTo(Number(zoom)),
317
+ centerOn: (nodeId) => commands.current?.centerOn(String(nodeId)),
318
+ setSelection: (ids) => commands.current?.setSelection((ids as string[]) ?? []),
319
+ exportViewport: () => commands.current?.exportViewport(),
320
+ undo: () => commands.current?.undo(),
321
+ redo: () => commands.current?.redo(),
322
+ perfStart: (label) => commands.current?.perfStart(String(label)),
323
+ perfStop: (label) => commands.current?.perfStop(String(label)),
324
+ perfMark: (label) => commands.current?.perfMark(String(label)),
325
+ setViewport: (x, y, zoom) =>
326
+ commands.current?.setViewport(Number(x), Number(y), Number(zoom)),
327
+ synthPinch: (scale, steps) => commands.current?.synthPinch(Number(scale), Number(steps)),
328
+ };
329
+ return typed as unknown as DOMImperativeFactory;
330
+ },
331
+ [],
332
+ );
333
+
334
+ useEffect(() => {
335
+ let cancelled = false;
336
+ void (async () => {
337
+ try {
338
+ const loaded = (await import("./NodeGraphDomInner")) as InnerModule;
339
+ if (cancelled) return;
340
+ // The functional form, because React would otherwise call a component
341
+ // passed to `setState` as an updater.
342
+ setInner(() => loaded.NodeGraphDomInner);
343
+ } catch (error) {
344
+ if (cancelled) return;
345
+ const message = messageOf(error);
346
+ setModuleError(message);
347
+ // Written INLINE, not through `recordGraphError`, for the same reason
348
+ // the boot stage is: this file may carry no top-level import of ours
349
+ // that could itself throw (design 9.4 layer 3), and a dynamic import
350
+ // inside the handler for a failed dynamic import is not a place to put
351
+ // faith. `diagnostics/lastError.ts` exports the key, and
352
+ // `useGraphDiagnostics.spec.tsx` asserts this literal still matches it.
353
+ //
354
+ // First-write-wins, matching the reader: a module-eval throw drags a
355
+ // train of render errors behind it, and the cause is the one worth
356
+ // reporting.
357
+ const slot = globalThis as unknown as Record<string, unknown>;
358
+ if (!slot.__mp_graph_error) {
359
+ slot.__mp_graph_error = {
360
+ phase: "module",
361
+ message,
362
+ stack: error instanceof Error ? error.stack : undefined,
363
+ at: Date.now(),
364
+ };
365
+ }
366
+ report({
367
+ t: "error",
368
+ phase: "module",
369
+ message,
370
+ stack: error instanceof Error ? error.stack : undefined,
371
+ });
372
+ }
373
+ })();
374
+ return () => {
375
+ cancelled = true;
376
+ };
377
+ }, [report]);
378
+
379
+ if (moduleError) {
380
+ // Not a blank rectangle even on web, where there is no native watchdog to
381
+ // catch this. On native, layer 4 has already drawn `GraphFallback`.
382
+ return createElement(
383
+ "div",
384
+ { "data-graph-boot-error": "module", role: "alert" },
385
+ `node-graph failed to load: ${moduleError}`,
386
+ );
387
+ }
388
+ if (!Inner) return null;
389
+ return createElement(
390
+ GraphRenderBoundary,
391
+ { report },
392
+ createElement(Inner, {
393
+ ...props,
394
+ commands,
395
+ config,
396
+ // The same erasure `registerGraphSchema` performs, in the one place the
397
+ // typed app boundary meets the id-keyed registry.
398
+ schema: schema as unknown as GraphSchema<never, never> | undefined,
399
+ schemas: schemas as unknown as readonly GraphSchema<never, never>[] | undefined,
400
+ }),
401
+ );
402
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * The boot heartbeat's ELAPSED time — the number design 9.4's watchdog should
3
+ * have been set from and never was.
4
+ *
5
+ * `stage` alone answers "how far did it get". It cannot answer "was 4000 ms
6
+ * enough", which is the question emulator-5590 asked by failing the watchdog on
7
+ * a canvas that rendered on the first Retry (MPO-211). `startedAt` is stamped
8
+ * once per attempt and carried forward by every later stage, so `now -
9
+ * startedAt` is the whole boot rather than the gap since the last stamp.
10
+ */
11
+
12
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
13
+ import {
14
+ bootGlobalKey,
15
+ graphReadySettleMs,
16
+ readBootElapsedMs,
17
+ readBootRecord,
18
+ resetBoot,
19
+ stampBootStage,
20
+ } from "./boot";
21
+
22
+ function slot(): Record<string, unknown> {
23
+ return globalThis as unknown as Record<string, unknown>;
24
+ }
25
+
26
+ beforeEach(() => {
27
+ resetBoot();
28
+ vi.useFakeTimers();
29
+ });
30
+
31
+ afterEach(() => {
32
+ vi.useRealTimers();
33
+ resetBoot();
34
+ });
35
+
36
+ describe("the boot record's start", () => {
37
+ it("is stamped once and carried forward, so elapsed is the whole boot", () => {
38
+ vi.setSystemTime(new Date(1_000_000));
39
+ stampBootStage("script");
40
+ vi.setSystemTime(new Date(1_000_400));
41
+ stampBootStage("module");
42
+ vi.setSystemTime(new Date(1_002_500));
43
+ stampBootStage("ready");
44
+
45
+ const record = readBootRecord();
46
+ expect(record?.startedAt).toBe(1_000_000);
47
+ // `at` moved with the last stamp; `startedAt` did not. Re-stamping the
48
+ // start on every stage would report every boot as instant.
49
+ expect(record?.at).toBe(1_002_500);
50
+ expect(readBootElapsedMs(1_002_500)).toBe(2500);
51
+ });
52
+
53
+ it("restarts with `script`, because Retry is a new WebView", () => {
54
+ vi.setSystemTime(new Date(1_000_000));
55
+ stampBootStage("script");
56
+ vi.setSystemTime(new Date(1_005_000));
57
+ stampBootStage("script");
58
+ expect(readBootRecord()?.startedAt).toBe(1_005_000);
59
+ expect(readBootElapsedMs(1_005_100)).toBe(100);
60
+ });
61
+
62
+ it("reads back a record the entry wrote inline, which carries no startedAt", () => {
63
+ // `NodeGraphDomShell.ts` may not import this module, so an older bundle's
64
+ // inline stamp can be `{ stage, at, history }`. Reading that back as an
65
+ // elapsed time of zero is honest; reading it as `now - 0` would report a
66
+ // boot that took fifty-six years.
67
+ slot()[bootGlobalKey] = { stage: "script", at: 1_000_000, history: ["script"] };
68
+ expect(readBootRecord()?.startedAt).toBe(1_000_000);
69
+ expect(readBootElapsedMs(1_000_250)).toBe(250);
70
+ });
71
+
72
+ it("has no elapsed time where there is no record", () => {
73
+ expect(readBootElapsedMs()).toBeNull();
74
+ });
75
+
76
+ it("never reports a negative elapsed time when a clock steps backwards", () => {
77
+ vi.setSystemTime(new Date(1_000_000));
78
+ stampBootStage("script");
79
+ expect(readBootElapsedMs(999_000)).toBe(0);
80
+ });
81
+ });
82
+
83
+ describe("the settle grace", () => {
84
+ it("leaves room over GraphFaces' own asset-URL timeout", () => {
85
+ // `GraphFaces` waits 1500 ms for an asset URL before falling back to the
86
+ // bytes. A grace at or under that would snapshot the delivery mid-probe and
87
+ // report `pending` for a face that was about to resolve.
88
+ expect(graphReadySettleMs).toBeGreaterThan(1500);
89
+ });
90
+ });
@@ -0,0 +1,153 @@
1
+ /**
2
+ * The boot heartbeat, design 9.4 layer 3.
3
+ *
4
+ * `import.meta` in a dependency is a PARSE error in a classic script, so the
5
+ * script never executes, so no error boundary is reachable, so the WebView is a
6
+ * blank rectangle with no console the user can see. Layers 1 and 2 stop that
7
+ * one at build time. This layer answers the next question: when a WebView does
8
+ * come up empty, HOW FAR did it get?
9
+ *
10
+ * The record lives on `globalThis` rather than in a module-scoped variable
11
+ * because two different pieces of code write it. `NodeGraphDom.ts` stamps
12
+ * `script` INLINE — it cannot import this module, since the entry must carry no
13
+ * top-level import of ours that could itself throw — and the tree it then
14
+ * dynamic-imports stamps the rest through `stampBootStage`. A module variable
15
+ * would give those two separate records, and the fallback would report the
16
+ * emptier one.
17
+ *
18
+ * Everything here therefore treats the global as untrusted: a record another
19
+ * library clobbered, or the bare `{ stage: "script" }` the entry wrote with no
20
+ * history, both read back cleanly instead of throwing inside the error path.
21
+ */
22
+
23
+ /** Design 9.4: `script -> module -> faces -> provider -> flow -> ready`. */
24
+ export const bootStages = ["script", "module", "faces", "provider", "flow", "ready"] as const;
25
+
26
+ /**
27
+ * How long the canvas waits for its own diagnostics to settle before stamping
28
+ * `ready` anyway (MPO-211).
29
+ *
30
+ * `ready` carries design 9.5's record, and two of its fields are unknowable at
31
+ * the instant the document parses: React Flow has not measured the pane, so
32
+ * with culling on no node body has mounted, and `GraphFaces` has not heard back
33
+ * from `document.fonts`. Emitting immediately reported `nodesMounted: 0` and
34
+ * every face `pending` on a canvas that was about to paint correctly.
35
+ *
36
+ * 1800 is `GraphFaces`' own 1500 ms asset-URL timeout plus a margin, so a face
37
+ * that falls back to base64 reports the fallback rather than being caught mid
38
+ * probe. It lives HERE rather than beside the canvas because the native
39
+ * watchdog has to be larger than it, and a watchdog that undercut this would
40
+ * declare a healthy canvas dead while it was still filling in its own panel.
41
+ */
42
+ export const graphReadySettleMs = 1800;
43
+
44
+ export type BootStage = (typeof bootStages)[number];
45
+
46
+ export interface BootRecord {
47
+ readonly stage: BootStage;
48
+ /** `Date.now()` at the stamp, so diagnostics can show where boot spent its time. */
49
+ readonly at: number;
50
+ /**
51
+ * `Date.now()` when the record was CREATED — the first stamp of this attempt.
52
+ *
53
+ * `at - startedAt` is how long boot has taken, which is the number the native
54
+ * watchdog's budget has to be set from. Without it the 4000 ms of design
55
+ * 9.4 was a guess, and on emulator-5590 rebooted fresh it was the wrong one:
56
+ * the watchdog fired, the fallback blamed a parse error, and Retry rendered
57
+ * the canvas immediately (MPO-211).
58
+ */
59
+ readonly startedAt: number;
60
+ readonly history: readonly BootStage[];
61
+ }
62
+
63
+ /**
64
+ * The key `NodeGraphDom.ts` writes inline. Exported so `domEntry.spec.ts` can
65
+ * assert the entry's literal and this module's reader still name the same slot
66
+ * — the one place the two halves of the heartbeat could silently drift.
67
+ */
68
+ export const bootGlobalKey = "__mp_graph_boot";
69
+
70
+ function slot(): Record<string, unknown> {
71
+ return globalThis as unknown as Record<string, unknown>;
72
+ }
73
+
74
+ export function bootStageIndex(stage: BootStage): number {
75
+ return (bootStages as readonly string[]).indexOf(stage);
76
+ }
77
+
78
+ function isBootStage(value: unknown): value is BootStage {
79
+ return typeof value === "string" && (bootStages as readonly string[]).includes(value);
80
+ }
81
+
82
+ /**
83
+ * The record as written, normalised. A raw `{ stage: "script" }` from the entry
84
+ * gains the history it never had; anything unrecognisable reads as `null`.
85
+ */
86
+ export function readBootRecord(): BootRecord | null {
87
+ const raw = slot()[bootGlobalKey];
88
+ if (!raw || typeof raw !== "object") return null;
89
+ const record = raw as Partial<BootRecord>;
90
+ if (!isBootStage(record.stage)) return null;
91
+ const history = Array.isArray(record.history) ? record.history.filter(isBootStage) : [];
92
+ const at = typeof record.at === "number" ? record.at : 0;
93
+ return {
94
+ stage: record.stage,
95
+ at,
96
+ // A raw `{ stage: "script" }` from the entry has no `startedAt`; reading it
97
+ // back as `at` makes the elapsed time zero rather than a decade, which is
98
+ // the honest answer for a record that never carried a start.
99
+ startedAt: typeof record.startedAt === "number" ? record.startedAt : at,
100
+ history: history.length > 0 ? history : [record.stage],
101
+ };
102
+ }
103
+
104
+ /**
105
+ * Milliseconds since this attempt's first stamp, or `null` with no record.
106
+ *
107
+ * This is the measurement the native watchdog's budget is set from, and it is
108
+ * reported in design 9.5's panel so the budget can be re-set from a device
109
+ * rather than from a guess.
110
+ */
111
+ export function readBootElapsedMs(now: number = Date.now()): number | null {
112
+ const record = readBootRecord();
113
+ if (!record || record.startedAt === 0) return null;
114
+ return Math.max(0, now - record.startedAt);
115
+ }
116
+
117
+ export function readBootStage(): BootStage | null {
118
+ return readBootRecord()?.stage ?? null;
119
+ }
120
+
121
+ /**
122
+ * Record that boot reached `stage`, and return the stage the record now holds.
123
+ *
124
+ * Forward only. The watchdog's fallback names the last stage reached, so a
125
+ * stamp that could move the record backwards would understate how far boot got
126
+ * and point whoever reads it at the wrong layer. `script` is the one exception:
127
+ * Retry remounts the WebView under a new key, and boot genuinely starts over.
128
+ */
129
+ export function stampBootStage(stage: BootStage): BootStage {
130
+ const previous = readBootRecord();
131
+ if (stage === "script" || !previous) {
132
+ const now = Date.now();
133
+ const fresh: BootRecord = { stage, at: now, startedAt: now, history: [stage] };
134
+ slot()[bootGlobalKey] = fresh;
135
+ return stage;
136
+ }
137
+ if (bootStageIndex(stage) <= bootStageIndex(previous.stage)) return previous.stage;
138
+ slot()[bootGlobalKey] = {
139
+ stage,
140
+ at: Date.now(),
141
+ // Carried forward, never re-stamped: the elapsed time is measured from the
142
+ // start of the attempt, and a later stage resetting it would report every
143
+ // boot as instant.
144
+ startedAt: previous.startedAt,
145
+ history: [...previous.history, stage],
146
+ } satisfies BootRecord;
147
+ return stage;
148
+ }
149
+
150
+ /** Test seam, and what Retry calls before remounting. */
151
+ export function resetBoot(): void {
152
+ delete slot()[bootGlobalKey];
153
+ }