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