@react-x11/components 0.9.0 → 0.11.0

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 (579) hide show
  1. package/README.md +10 -4
  2. package/dist/charts/node.d.ts +11 -1
  3. package/dist/charts/node.d.ts.map +1 -1
  4. package/dist/charts/node.js +44 -14
  5. package/dist/charts/node.js.map +1 -1
  6. package/dist/charts/render.d.ts +12 -3
  7. package/dist/charts/render.d.ts.map +1 -1
  8. package/dist/charts/render.js +94 -25
  9. package/dist/charts/render.js.map +1 -1
  10. package/dist/code/index.d.ts.map +1 -1
  11. package/dist/code/index.js +27 -24
  12. package/dist/code/index.js.map +1 -1
  13. package/dist/code-editor/completion.d.ts.map +1 -1
  14. package/dist/code-editor/completion.js +3 -2
  15. package/dist/code-editor/completion.js.map +1 -1
  16. package/dist/code-editor/index.d.ts.map +1 -1
  17. package/dist/code-editor/index.js +19 -0
  18. package/dist/code-editor/index.js.map +1 -1
  19. package/dist/code-editor/node.d.ts +177 -7
  20. package/dist/code-editor/node.d.ts.map +1 -1
  21. package/dist/code-editor/node.js +1329 -164
  22. package/dist/code-editor/node.js.map +1 -1
  23. package/dist/code-language/index.d.ts +1 -1
  24. package/dist/code-language/index.d.ts.map +1 -1
  25. package/dist/code-language/index.js +1 -1
  26. package/dist/code-language/index.js.map +1 -1
  27. package/dist/code-language/languages/glsl.d.ts.map +1 -1
  28. package/dist/code-language/languages/glsl.js +10 -2
  29. package/dist/code-language/languages/glsl.js.map +1 -1
  30. package/dist/code-language/languages/javascript.d.ts.map +1 -1
  31. package/dist/code-language/languages/javascript.js +18 -3
  32. package/dist/code-language/languages/javascript.js.map +1 -1
  33. package/dist/code-language/languages/json.d.ts.map +1 -1
  34. package/dist/code-language/languages/json.js +10 -2
  35. package/dist/code-language/languages/json.js.map +1 -1
  36. package/dist/code-language/languages/shell.d.ts.map +1 -1
  37. package/dist/code-language/languages/shell.js +10 -2
  38. package/dist/code-language/languages/shell.js.map +1 -1
  39. package/dist/code-language/languages/sql.d.ts.map +1 -1
  40. package/dist/code-language/languages/sql.js +20 -2
  41. package/dist/code-language/languages/sql.js.map +1 -1
  42. package/dist/code-language/runs.d.ts +31 -0
  43. package/dist/code-language/runs.d.ts.map +1 -1
  44. package/dist/code-language/runs.js +105 -0
  45. package/dist/code-language/runs.js.map +1 -1
  46. package/dist/code-language/stream.d.ts +22 -0
  47. package/dist/code-language/stream.d.ts.map +1 -1
  48. package/dist/code-language/stream.js +259 -9
  49. package/dist/code-language/stream.js.map +1 -1
  50. package/dist/code-language/types.d.ts +5 -4
  51. package/dist/code-language/types.d.ts.map +1 -1
  52. package/dist/codeblock/index.d.ts +26 -2
  53. package/dist/codeblock/index.d.ts.map +1 -1
  54. package/dist/codeblock/index.js +57 -4
  55. package/dist/codeblock/index.js.map +1 -1
  56. package/dist/flow/draw.d.ts +50 -0
  57. package/dist/flow/draw.d.ts.map +1 -1
  58. package/dist/flow/draw.js +132 -33
  59. package/dist/flow/draw.js.map +1 -1
  60. package/dist/flow/gl/color.d.ts +13 -0
  61. package/dist/flow/gl/color.d.ts.map +1 -0
  62. package/dist/flow/gl/color.js +82 -0
  63. package/dist/flow/gl/color.js.map +1 -0
  64. package/dist/flow/gl/index.d.ts +60 -0
  65. package/dist/flow/gl/index.d.ts.map +1 -0
  66. package/dist/flow/gl/index.js +283 -0
  67. package/dist/flow/gl/index.js.map +1 -0
  68. package/dist/flow/gl/pack.d.ts +133 -0
  69. package/dist/flow/gl/pack.d.ts.map +1 -0
  70. package/dist/flow/gl/pack.js +408 -0
  71. package/dist/flow/gl/pack.js.map +1 -0
  72. package/dist/flow/gl/renderer.d.ts +95 -0
  73. package/dist/flow/gl/renderer.d.ts.map +1 -0
  74. package/dist/flow/gl/renderer.js +459 -0
  75. package/dist/flow/gl/renderer.js.map +1 -0
  76. package/dist/flow/gl/shaders.d.ts +79 -0
  77. package/dist/flow/gl/shaders.d.ts.map +1 -0
  78. package/dist/flow/gl/shaders.js +346 -0
  79. package/dist/flow/gl/shaders.js.map +1 -0
  80. package/dist/flow/gl/text.d.ts +318 -0
  81. package/dist/flow/gl/text.d.ts.map +1 -0
  82. package/dist/flow/gl/text.js +1103 -0
  83. package/dist/flow/gl/text.js.map +1 -0
  84. package/dist/flow/index.d.ts +1 -1
  85. package/dist/flow/index.d.ts.map +1 -1
  86. package/dist/flow/index.js +619 -64
  87. package/dist/flow/index.js.map +1 -1
  88. package/dist/flow/node.d.ts +621 -72
  89. package/dist/flow/node.d.ts.map +1 -1
  90. package/dist/flow/node.js +2253 -1018
  91. package/dist/flow/node.js.map +1 -1
  92. package/dist/flow/paint.d.ts +35 -0
  93. package/dist/flow/paint.d.ts.map +1 -0
  94. package/dist/flow/paint.js +393 -0
  95. package/dist/flow/paint.js.map +1 -0
  96. package/dist/flow/paths.d.ts +14 -0
  97. package/dist/flow/paths.d.ts.map +1 -1
  98. package/dist/flow/paths.js +45 -19
  99. package/dist/flow/paths.js.map +1 -1
  100. package/dist/flow/scene.d.ts +584 -0
  101. package/dist/flow/scene.d.ts.map +1 -0
  102. package/dist/flow/scene.js +1453 -0
  103. package/dist/flow/scene.js.map +1 -0
  104. package/dist/flow/types.d.ts +111 -1
  105. package/dist/flow/types.d.ts.map +1 -1
  106. package/dist/html/controls.d.ts +28 -0
  107. package/dist/html/controls.d.ts.map +1 -1
  108. package/dist/html/controls.js +52 -2
  109. package/dist/html/controls.js.map +1 -1
  110. package/dist/html/css/calc.d.ts +14 -0
  111. package/dist/html/css/calc.d.ts.map +1 -0
  112. package/dist/html/css/calc.js +344 -0
  113. package/dist/html/css/calc.js.map +1 -0
  114. package/dist/html/css/cascade.d.ts +262 -6
  115. package/dist/html/css/cascade.d.ts.map +1 -1
  116. package/dist/html/css/cascade.js +1373 -67
  117. package/dist/html/css/cascade.js.map +1 -1
  118. package/dist/html/css/color.d.ts +23 -0
  119. package/dist/html/css/color.d.ts.map +1 -0
  120. package/dist/html/css/color.js +740 -0
  121. package/dist/html/css/color.js.map +1 -0
  122. package/dist/html/css/content.d.ts +92 -0
  123. package/dist/html/css/content.d.ts.map +1 -0
  124. package/dist/html/css/content.js +388 -0
  125. package/dist/html/css/content.js.map +1 -0
  126. package/dist/html/css/counter-styles.d.ts +76 -0
  127. package/dist/html/css/counter-styles.d.ts.map +1 -0
  128. package/dist/html/css/counter-styles.js +893 -0
  129. package/dist/html/css/counter-styles.js.map +1 -0
  130. package/dist/html/css/decode.d.ts +12 -0
  131. package/dist/html/css/decode.d.ts.map +1 -0
  132. package/dist/html/css/decode.js +116 -0
  133. package/dist/html/css/decode.js.map +1 -0
  134. package/dist/html/css/parse.d.ts +110 -10
  135. package/dist/html/css/parse.d.ts.map +1 -1
  136. package/dist/html/css/parse.js +1473 -180
  137. package/dist/html/css/parse.js.map +1 -1
  138. package/dist/html/css/style.d.ts +501 -15
  139. package/dist/html/css/style.d.ts.map +1 -1
  140. package/dist/html/css/style.js +3729 -206
  141. package/dist/html/css/style.js.map +1 -1
  142. package/dist/html/css/ua.d.ts.map +1 -1
  143. package/dist/html/css/ua.js +65 -16
  144. package/dist/html/css/ua.js.map +1 -1
  145. package/dist/html/css/values.d.ts +37 -3
  146. package/dist/html/css/values.d.ts.map +1 -1
  147. package/dist/html/css/values.js +122 -48
  148. package/dist/html/css/values.js.map +1 -1
  149. package/dist/html/css/vars.d.ts +52 -0
  150. package/dist/html/css/vars.d.ts.map +1 -0
  151. package/dist/html/css/vars.js +358 -0
  152. package/dist/html/css/vars.js.map +1 -0
  153. package/dist/html/dom.d.ts +30 -4
  154. package/dist/html/dom.d.ts.map +1 -1
  155. package/dist/html/dom.js +278 -17
  156. package/dist/html/dom.js.map +1 -1
  157. package/dist/html/fonts.d.ts +106 -0
  158. package/dist/html/fonts.d.ts.map +1 -0
  159. package/dist/html/fonts.js +565 -0
  160. package/dist/html/fonts.js.map +1 -0
  161. package/dist/html/gif.d.ts +15 -0
  162. package/dist/html/gif.d.ts.map +1 -0
  163. package/dist/html/gif.js +229 -0
  164. package/dist/html/gif.js.map +1 -0
  165. package/dist/html/index.d.ts +50 -11
  166. package/dist/html/index.d.ts.map +1 -1
  167. package/dist/html/index.js +115 -9
  168. package/dist/html/index.js.map +1 -1
  169. package/dist/html/layout/block.d.ts +226 -3
  170. package/dist/html/layout/block.d.ts.map +1 -1
  171. package/dist/html/layout/block.js +3077 -219
  172. package/dist/html/layout/block.js.map +1 -1
  173. package/dist/html/layout/boxes.d.ts +367 -17
  174. package/dist/html/layout/boxes.d.ts.map +1 -1
  175. package/dist/html/layout/boxes.js +1742 -182
  176. package/dist/html/layout/boxes.js.map +1 -1
  177. package/dist/html/layout/cache.d.ts +58 -0
  178. package/dist/html/layout/cache.d.ts.map +1 -0
  179. package/dist/html/layout/cache.js +224 -0
  180. package/dist/html/layout/cache.js.map +1 -0
  181. package/dist/html/layout/collapse.d.ts +45 -0
  182. package/dist/html/layout/collapse.d.ts.map +1 -0
  183. package/dist/html/layout/collapse.js +246 -0
  184. package/dist/html/layout/collapse.js.map +1 -0
  185. package/dist/html/layout/css-grid.d.ts +7 -0
  186. package/dist/html/layout/css-grid.d.ts.map +1 -0
  187. package/dist/html/layout/css-grid.js +900 -0
  188. package/dist/html/layout/css-grid.js.map +1 -0
  189. package/dist/html/layout/flex.d.ts.map +1 -1
  190. package/dist/html/layout/flex.js +1025 -89
  191. package/dist/html/layout/flex.js.map +1 -1
  192. package/dist/html/layout/floats.d.ts +45 -6
  193. package/dist/html/layout/floats.d.ts.map +1 -1
  194. package/dist/html/layout/floats.js +113 -14
  195. package/dist/html/layout/floats.js.map +1 -1
  196. package/dist/html/layout/grid-lines.d.ts +39 -0
  197. package/dist/html/layout/grid-lines.d.ts.map +1 -0
  198. package/dist/html/layout/grid-lines.js +119 -0
  199. package/dist/html/layout/grid-lines.js.map +1 -0
  200. package/dist/html/layout/grid.d.ts +53 -0
  201. package/dist/html/layout/grid.d.ts.map +1 -0
  202. package/dist/html/layout/grid.js +153 -0
  203. package/dist/html/layout/grid.js.map +1 -0
  204. package/dist/html/layout/inline.d.ts +154 -1
  205. package/dist/html/layout/inline.d.ts.map +1 -1
  206. package/dist/html/layout/inline.js +3598 -175
  207. package/dist/html/layout/inline.js.map +1 -1
  208. package/dist/html/layout/shaping.d.ts +6 -0
  209. package/dist/html/layout/shaping.d.ts.map +1 -0
  210. package/dist/html/layout/shaping.js +100 -0
  211. package/dist/html/layout/shaping.js.map +1 -0
  212. package/dist/html/layout/table.d.ts +3 -0
  213. package/dist/html/layout/table.d.ts.map +1 -1
  214. package/dist/html/layout/table.js +681 -175
  215. package/dist/html/layout/table.js.map +1 -1
  216. package/dist/html/layout/tracks.d.ts +44 -0
  217. package/dist/html/layout/tracks.d.ts.map +1 -0
  218. package/dist/html/layout/tracks.js +349 -0
  219. package/dist/html/layout/tracks.js.map +1 -0
  220. package/dist/html/node.d.ts +169 -4
  221. package/dist/html/node.d.ts.map +1 -1
  222. package/dist/html/node.js +1429 -137
  223. package/dist/html/node.js.map +1 -1
  224. package/dist/html/paint.d.ts +92 -3
  225. package/dist/html/paint.d.ts.map +1 -1
  226. package/dist/html/paint.js +3635 -107
  227. package/dist/html/paint.js.map +1 -1
  228. package/dist/html/resources.d.ts +60 -14
  229. package/dist/html/resources.d.ts.map +1 -1
  230. package/dist/html/resources.js +122 -36
  231. package/dist/html/resources.js.map +1 -1
  232. package/dist/html/surfaces.d.ts +23 -0
  233. package/dist/html/surfaces.d.ts.map +1 -0
  234. package/dist/html/surfaces.js +68 -0
  235. package/dist/html/surfaces.js.map +1 -0
  236. package/dist/html/svg.d.ts +80 -0
  237. package/dist/html/svg.d.ts.map +1 -0
  238. package/dist/html/svg.js +442 -0
  239. package/dist/html/svg.js.map +1 -0
  240. package/dist/html/url.d.ts +23 -0
  241. package/dist/html/url.d.ts.map +1 -0
  242. package/dist/html/url.js +80 -0
  243. package/dist/html/url.js.map +1 -0
  244. package/dist/index.d.ts +1 -1
  245. package/dist/index.d.ts.map +1 -1
  246. package/dist/index.js.map +1 -1
  247. package/dist/internal/codelines.d.ts +42 -0
  248. package/dist/internal/codelines.d.ts.map +1 -0
  249. package/dist/internal/codelines.js +170 -0
  250. package/dist/internal/codelines.js.map +1 -0
  251. package/dist/internal/collate.d.ts +3 -0
  252. package/dist/internal/collate.d.ts.map +1 -0
  253. package/dist/internal/collate.js +11 -0
  254. package/dist/internal/collate.js.map +1 -0
  255. package/dist/internal/markdown/ast.d.ts +11 -0
  256. package/dist/internal/markdown/ast.d.ts.map +1 -1
  257. package/dist/internal/markdown/parse.d.ts.map +1 -1
  258. package/dist/internal/markdown/parse.js +109 -8
  259. package/dist/internal/markdown/parse.js.map +1 -1
  260. package/dist/internal/prewarm.d.ts +18 -0
  261. package/dist/internal/prewarm.d.ts.map +1 -0
  262. package/dist/internal/prewarm.js +42 -0
  263. package/dist/internal/prewarm.js.map +1 -0
  264. package/dist/internal/sdf.d.ts +20 -0
  265. package/dist/internal/sdf.d.ts.map +1 -0
  266. package/dist/internal/sdf.js +216 -0
  267. package/dist/internal/sdf.js.map +1 -0
  268. package/dist/internal/splice.d.ts +12 -0
  269. package/dist/internal/splice.d.ts.map +1 -0
  270. package/dist/internal/splice.js +23 -0
  271. package/dist/internal/splice.js.map +1 -0
  272. package/dist/internal/window.d.ts +12 -0
  273. package/dist/internal/window.d.ts.map +1 -1
  274. package/dist/internal/window.js +23 -6
  275. package/dist/internal/window.js.map +1 -1
  276. package/dist/maps/anchors.d.ts +6 -1
  277. package/dist/maps/anchors.d.ts.map +1 -1
  278. package/dist/maps/anchors.js +260 -1
  279. package/dist/maps/anchors.js.map +1 -1
  280. package/dist/maps/controller.d.ts +57 -0
  281. package/dist/maps/controller.d.ts.map +1 -1
  282. package/dist/maps/controller.js +97 -18
  283. package/dist/maps/controller.js.map +1 -1
  284. package/dist/maps/gl/buckets.d.ts +5 -1
  285. package/dist/maps/gl/buckets.d.ts.map +1 -1
  286. package/dist/maps/gl/buckets.js +5 -2
  287. package/dist/maps/gl/buckets.js.map +1 -1
  288. package/dist/maps/gl/build-worker.d.ts +2 -0
  289. package/dist/maps/gl/build-worker.d.ts.map +1 -1
  290. package/dist/maps/gl/build-worker.js +1 -1
  291. package/dist/maps/gl/build-worker.js.map +1 -1
  292. package/dist/maps/gl/cover.d.ts +23 -4
  293. package/dist/maps/gl/cover.d.ts.map +1 -1
  294. package/dist/maps/gl/cover.js +61 -48
  295. package/dist/maps/gl/cover.js.map +1 -1
  296. package/dist/maps/gl/placement.d.ts +21 -8
  297. package/dist/maps/gl/placement.d.ts.map +1 -1
  298. package/dist/maps/gl/placement.js +133 -58
  299. package/dist/maps/gl/placement.js.map +1 -1
  300. package/dist/maps/gl/renderer.d.ts +36 -4
  301. package/dist/maps/gl/renderer.d.ts.map +1 -1
  302. package/dist/maps/gl/renderer.js +81 -24
  303. package/dist/maps/gl/renderer.js.map +1 -1
  304. package/dist/maps/gl/shaders.d.ts +18 -17
  305. package/dist/maps/gl/shaders.d.ts.map +1 -1
  306. package/dist/maps/gl/shaders.js +34 -32
  307. package/dist/maps/gl/shaders.js.map +1 -1
  308. package/dist/maps/gl/store.d.ts +10 -0
  309. package/dist/maps/gl/store.d.ts.map +1 -1
  310. package/dist/maps/gl/store.js +47 -4
  311. package/dist/maps/gl/store.js.map +1 -1
  312. package/dist/maps/gl/text.d.ts +153 -24
  313. package/dist/maps/gl/text.d.ts.map +1 -1
  314. package/dist/maps/gl/text.js +379 -63
  315. package/dist/maps/gl/text.js.map +1 -1
  316. package/dist/maps/gl/view.d.ts +293 -2
  317. package/dist/maps/gl/view.d.ts.map +1 -1
  318. package/dist/maps/gl/view.js +317 -82
  319. package/dist/maps/gl/view.js.map +1 -1
  320. package/dist/maps/icons.d.ts +32 -0
  321. package/dist/maps/icons.d.ts.map +1 -0
  322. package/dist/maps/icons.js +151 -0
  323. package/dist/maps/icons.js.map +1 -0
  324. package/dist/maps/index.d.ts +2 -0
  325. package/dist/maps/index.d.ts.map +1 -1
  326. package/dist/maps/index.js +2 -0
  327. package/dist/maps/index.js.map +1 -1
  328. package/dist/maps/labels.d.ts +56 -4
  329. package/dist/maps/labels.d.ts.map +1 -1
  330. package/dist/maps/labels.js +213 -46
  331. package/dist/maps/labels.js.map +1 -1
  332. package/dist/maps/node.d.ts +17 -0
  333. package/dist/maps/node.d.ts.map +1 -1
  334. package/dist/maps/node.js +64 -30
  335. package/dist/maps/node.js.map +1 -1
  336. package/dist/maps/proj.d.ts +48 -0
  337. package/dist/maps/proj.d.ts.map +1 -1
  338. package/dist/maps/proj.js +73 -0
  339. package/dist/maps/proj.js.map +1 -1
  340. package/dist/maps/sources.d.ts +5 -3
  341. package/dist/maps/sources.d.ts.map +1 -1
  342. package/dist/maps/sources.js +5 -3
  343. package/dist/maps/sources.js.map +1 -1
  344. package/dist/maps/style.d.ts +35 -0
  345. package/dist/maps/style.d.ts.map +1 -1
  346. package/dist/maps/style.js.map +1 -1
  347. package/dist/maps/styles.d.ts +12 -0
  348. package/dist/maps/styles.d.ts.map +1 -1
  349. package/dist/maps/styles.js +120 -6
  350. package/dist/maps/styles.js.map +1 -1
  351. package/dist/maps/tiles.d.ts +31 -11
  352. package/dist/maps/tiles.d.ts.map +1 -1
  353. package/dist/maps/tiles.js +61 -27
  354. package/dist/maps/tiles.js.map +1 -1
  355. package/dist/maps/types.d.ts +28 -4
  356. package/dist/maps/types.d.ts.map +1 -1
  357. package/dist/markdown/index.d.ts.map +1 -1
  358. package/dist/markdown/index.js +209 -68
  359. package/dist/markdown/index.js.map +1 -1
  360. package/dist/markdown/spans.d.ts.map +1 -1
  361. package/dist/markdown/spans.js +6 -0
  362. package/dist/markdown/spans.js.map +1 -1
  363. package/dist/qml/containers.d.ts.map +1 -1
  364. package/dist/qml/containers.js +6 -1
  365. package/dist/qml/containers.js.map +1 -1
  366. package/dist/qml/interaction.d.ts.map +1 -1
  367. package/dist/qml/interaction.js +38 -5
  368. package/dist/qml/interaction.js.map +1 -1
  369. package/dist/qml/layouts.d.ts.map +1 -1
  370. package/dist/qml/layouts.js +21 -6
  371. package/dist/qml/layouts.js.map +1 -1
  372. package/dist/qml/qtquick.d.ts.map +1 -1
  373. package/dist/qml/qtquick.js +9 -2
  374. package/dist/qml/qtquick.js.map +1 -1
  375. package/dist/qml/react.d.ts.map +1 -1
  376. package/dist/qml/react.js +9 -7
  377. package/dist/qml/react.js.map +1 -1
  378. package/dist/reorder/clock.d.ts +7 -0
  379. package/dist/reorder/clock.d.ts.map +1 -0
  380. package/dist/reorder/clock.js +26 -0
  381. package/dist/reorder/clock.js.map +1 -0
  382. package/dist/reorder/index.d.ts +25 -3
  383. package/dist/reorder/index.d.ts.map +1 -1
  384. package/dist/reorder/index.js +64 -19
  385. package/dist/reorder/index.js.map +1 -1
  386. package/dist/rich-text-editor/index.d.ts +0 -11
  387. package/dist/rich-text-editor/index.d.ts.map +1 -1
  388. package/dist/rich-text-editor/index.js +38 -9
  389. package/dist/rich-text-editor/index.js.map +1 -1
  390. package/dist/rich-text-editor/keymap.d.ts.map +1 -1
  391. package/dist/rich-text-editor/keymap.js +2 -1
  392. package/dist/rich-text-editor/keymap.js.map +1 -1
  393. package/dist/rich-text-editor/keys.d.ts +17 -6
  394. package/dist/rich-text-editor/keys.d.ts.map +1 -1
  395. package/dist/rich-text-editor/keys.js +135 -26
  396. package/dist/rich-text-editor/keys.js.map +1 -1
  397. package/dist/rich-text-editor/markdown.d.ts.map +1 -1
  398. package/dist/rich-text-editor/markdown.js +30 -1
  399. package/dist/rich-text-editor/markdown.js.map +1 -1
  400. package/dist/rich-text-editor/marks.d.ts +9 -0
  401. package/dist/rich-text-editor/marks.d.ts.map +1 -0
  402. package/dist/rich-text-editor/marks.js +83 -0
  403. package/dist/rich-text-editor/marks.js.map +1 -0
  404. package/dist/rich-text-editor/render.d.ts.map +1 -1
  405. package/dist/rich-text-editor/render.js +28 -10
  406. package/dist/rich-text-editor/render.js.map +1 -1
  407. package/dist/rich-text-editor/replace.d.ts +13 -0
  408. package/dist/rich-text-editor/replace.d.ts.map +1 -0
  409. package/dist/rich-text-editor/replace.js +64 -0
  410. package/dist/rich-text-editor/replace.js.map +1 -0
  411. package/dist/rich-text-editor/toolbar.d.ts.map +1 -1
  412. package/dist/rich-text-editor/toolbar.js +1 -1
  413. package/dist/rich-text-editor/toolbar.js.map +1 -1
  414. package/dist/rich-text-editor/virtual.d.ts.map +1 -1
  415. package/dist/rich-text-editor/virtual.js +17 -0
  416. package/dist/rich-text-editor/virtual.js.map +1 -1
  417. package/dist/richtext/node.d.ts +46 -2
  418. package/dist/richtext/node.d.ts.map +1 -1
  419. package/dist/richtext/node.js +187 -4
  420. package/dist/richtext/node.js.map +1 -1
  421. package/dist/richtext/runs.d.ts +13 -8
  422. package/dist/richtext/runs.d.ts.map +1 -1
  423. package/dist/richtext/runs.js +18 -8
  424. package/dist/richtext/runs.js.map +1 -1
  425. package/dist/table/index.d.ts.map +1 -1
  426. package/dist/table/index.js +23 -0
  427. package/dist/table/index.js.map +1 -1
  428. package/dist/table/rows.d.ts +3 -2
  429. package/dist/table/rows.d.ts.map +1 -1
  430. package/dist/table/rows.js +20 -6
  431. package/dist/table/rows.js.map +1 -1
  432. package/dist/terminal/index.d.ts.map +1 -1
  433. package/dist/terminal/index.js +4 -0
  434. package/dist/terminal/index.js.map +1 -1
  435. package/dist/terminal/vt/pty.d.ts +13 -2
  436. package/dist/terminal/vt/pty.d.ts.map +1 -1
  437. package/dist/terminal/vt/pty.js +18 -3
  438. package/dist/terminal/vt/pty.js.map +1 -1
  439. package/dist/terminal-output/index.d.ts.map +1 -1
  440. package/dist/terminal-output/index.js +103 -23
  441. package/dist/terminal-output/index.js.map +1 -1
  442. package/dist/terminal-output/runs.d.ts +4 -1
  443. package/dist/terminal-output/runs.d.ts.map +1 -1
  444. package/dist/terminal-output/runs.js +5 -1
  445. package/dist/terminal-output/runs.js.map +1 -1
  446. package/dist/three/canvas.d.ts.map +1 -1
  447. package/dist/three/canvas.js +85 -7
  448. package/dist/three/canvas.js.map +1 -1
  449. package/dist/three/events.d.ts +22 -4
  450. package/dist/three/events.d.ts.map +1 -1
  451. package/dist/three/events.js +34 -4
  452. package/dist/three/events.js.map +1 -1
  453. package/dist/tree/index.d.ts.map +1 -1
  454. package/dist/tree/index.js +17 -0
  455. package/dist/tree/index.js.map +1 -1
  456. package/package.json +42 -33
  457. package/src/charts/node.ts +62 -26
  458. package/src/charts/render.ts +120 -30
  459. package/src/code/index.ts +36 -32
  460. package/src/code-editor/completion.ts +3 -2
  461. package/src/code-editor/index.ts +19 -0
  462. package/src/code-editor/node.ts +1574 -184
  463. package/src/code-language/index.ts +1 -1
  464. package/src/code-language/languages/glsl.ts +12 -2
  465. package/src/code-language/languages/javascript.ts +21 -4
  466. package/src/code-language/languages/json.ts +12 -2
  467. package/src/code-language/languages/shell.ts +12 -2
  468. package/src/code-language/languages/sql.ts +22 -2
  469. package/src/code-language/runs.ts +111 -1
  470. package/src/code-language/stream.ts +257 -17
  471. package/src/code-language/types.ts +5 -4
  472. package/src/codeblock/index.ts +68 -4
  473. package/src/flow/draw.ts +167 -41
  474. package/src/flow/gl/color.ts +85 -0
  475. package/src/flow/gl/index.ts +342 -0
  476. package/src/flow/gl/pack.ts +585 -0
  477. package/src/flow/gl/renderer.ts +679 -0
  478. package/src/flow/gl/shaders.ts +371 -0
  479. package/src/flow/gl/text.ts +1295 -0
  480. package/src/flow/index.ts +794 -67
  481. package/src/flow/node.ts +2496 -1256
  482. package/src/flow/paint.ts +511 -0
  483. package/src/flow/paths.ts +80 -15
  484. package/src/flow/scene.ts +2199 -0
  485. package/src/flow/types.ts +113 -1
  486. package/src/html/controls.ts +73 -2
  487. package/src/html/css/calc.ts +385 -0
  488. package/src/html/css/cascade.ts +1481 -62
  489. package/src/html/css/color.ts +755 -0
  490. package/src/html/css/content.ts +417 -0
  491. package/src/html/css/counter-styles.ts +973 -0
  492. package/src/html/css/decode.ts +130 -0
  493. package/src/html/css/parse.ts +1514 -160
  494. package/src/html/css/style.ts +4131 -223
  495. package/src/html/css/ua.ts +66 -17
  496. package/src/html/css/values.ts +150 -50
  497. package/src/html/css/vars.ts +348 -0
  498. package/src/html/dom.ts +284 -17
  499. package/src/html/fonts.ts +641 -0
  500. package/src/html/gif.ts +233 -0
  501. package/src/html/index.ts +180 -20
  502. package/src/html/layout/block.ts +3560 -208
  503. package/src/html/layout/boxes.ts +2141 -190
  504. package/src/html/layout/cache.ts +289 -0
  505. package/src/html/layout/collapse.ts +317 -0
  506. package/src/html/layout/css-grid.ts +1063 -0
  507. package/src/html/layout/flex.ts +1115 -106
  508. package/src/html/layout/floats.ts +128 -14
  509. package/src/html/layout/grid-lines.ts +141 -0
  510. package/src/html/layout/grid.ts +181 -0
  511. package/src/html/layout/inline.ts +4187 -192
  512. package/src/html/layout/shaping.ts +140 -0
  513. package/src/html/layout/table.ts +696 -186
  514. package/src/html/layout/tracks.ts +437 -0
  515. package/src/html/node.ts +1585 -156
  516. package/src/html/paint.ts +4582 -267
  517. package/src/html/resources.ts +161 -50
  518. package/src/html/surfaces.ts +81 -0
  519. package/src/html/svg.ts +504 -0
  520. package/src/html/url.ts +86 -0
  521. package/src/index.ts +2 -0
  522. package/src/internal/codelines.ts +200 -0
  523. package/src/internal/collate.ts +12 -0
  524. package/src/internal/markdown/ast.ts +11 -0
  525. package/src/internal/markdown/parse.ts +154 -11
  526. package/src/internal/prewarm.ts +45 -0
  527. package/src/internal/sdf.ts +227 -0
  528. package/src/internal/splice.ts +25 -0
  529. package/src/internal/window.ts +36 -5
  530. package/src/maps/anchors.ts +307 -1
  531. package/src/maps/controller.ts +116 -31
  532. package/src/maps/gl/buckets.ts +5 -1
  533. package/src/maps/gl/build-worker.ts +13 -2
  534. package/src/maps/gl/cover.ts +79 -44
  535. package/src/maps/gl/placement.ts +221 -69
  536. package/src/maps/gl/renderer.ts +104 -20
  537. package/src/maps/gl/shaders.ts +35 -32
  538. package/src/maps/gl/store.ts +66 -17
  539. package/src/maps/gl/text.ts +444 -71
  540. package/src/maps/gl/view.ts +361 -96
  541. package/src/maps/icons.ts +183 -0
  542. package/src/maps/index.ts +4 -0
  543. package/src/maps/labels.ts +269 -49
  544. package/src/maps/node.ts +82 -49
  545. package/src/maps/proj.ts +87 -0
  546. package/src/maps/sources.ts +5 -3
  547. package/src/maps/style.ts +32 -0
  548. package/src/maps/styles.ts +215 -4
  549. package/src/maps/tiles.ts +64 -31
  550. package/src/maps/types.ts +28 -4
  551. package/src/markdown/index.ts +293 -92
  552. package/src/markdown/spans.ts +5 -0
  553. package/src/qml/containers.tsx +6 -1
  554. package/src/qml/interaction.tsx +42 -5
  555. package/src/qml/layouts.tsx +21 -6
  556. package/src/qml/qtquick.tsx +9 -2
  557. package/src/qml/react.tsx +7 -5
  558. package/src/reorder/clock.ts +27 -0
  559. package/src/reorder/index.ts +100 -27
  560. package/src/rich-text-editor/index.ts +37 -12
  561. package/src/rich-text-editor/keymap.ts +1 -1
  562. package/src/rich-text-editor/keys.ts +135 -26
  563. package/src/rich-text-editor/markdown.ts +36 -1
  564. package/src/rich-text-editor/marks.ts +101 -0
  565. package/src/rich-text-editor/render.ts +49 -12
  566. package/src/rich-text-editor/replace.ts +85 -0
  567. package/src/rich-text-editor/toolbar.ts +1 -1
  568. package/src/rich-text-editor/virtual.ts +25 -0
  569. package/src/richtext/node.ts +235 -14
  570. package/src/richtext/runs.ts +23 -12
  571. package/src/table/index.ts +29 -0
  572. package/src/table/rows.ts +18 -8
  573. package/src/terminal/index.ts +4 -0
  574. package/src/terminal/vt/pty.ts +16 -2
  575. package/src/terminal-output/index.ts +129 -31
  576. package/src/terminal-output/runs.ts +16 -2
  577. package/src/three/canvas.ts +102 -8
  578. package/src/three/events.ts +49 -9
  579. package/src/tree/index.ts +19 -0
@@ -2,12 +2,34 @@ import { Node } from 'react-x11/node';
2
2
  import type { A11ySceneAction, A11ySceneItem } from 'react-x11/node';
3
3
  import type { Context2D } from 'react-x11/node';
4
4
  import type { KeyboardEvent, MouseEvent, WheelEvent } from 'react-x11';
5
- import type { FitViewOptions, FlowNode, FlowNodeType, FlowRect, FlowInstance, HandleSpec, Viewport, XYPosition } from './types.js';
5
+ import type { PainterOptions } from './draw.js';
6
+ import type { FlowScene } from './scene.js';
7
+ import type { FitViewOptions, FlowBodyBudget, FlowNode, FlowNodeType, FlowRect, FlowInstance, HandleSpec, Viewport, XYPosition } from './types.js';
6
8
  /** Registration key, `kind` and JSX tag, one string — react-x11 rejects a
7
9
  * node whose `kind` is not the name it was registered under, because `kind`
8
10
  * is what paint order, the test queries and the DEV style assertion all
9
11
  * match on. */
10
12
  export declare const ELEMENT = "flowgraph";
13
+ /** A canvas `<Flow>` paints a panel on: a core node, asked to repaint its
14
+ * own box. */
15
+ interface PanelCanvas {
16
+ invalidate(layout: boolean, damage: unknown, reason: string): void;
17
+ /** Where a claim of the canvas lands: its box and core's damage slop,
18
+ * device pixels. */
19
+ paintBounds?(): FlowRect;
20
+ /** Its box, device pixels. */
21
+ readonly abs?: FlowRect;
22
+ }
23
+ /**
24
+ * The pane's time: what a pan is stamped with, and what the dashes' march
25
+ * reads to decide it has held still. A test holds it (test/flow.test.ts):
26
+ * a runner that spends longer than the dashes' wait over one step of a pan
27
+ * lets them march in the middle of it — as they should — and a test of the
28
+ * pan cannot tell that from a march it should not have made.
29
+ */
30
+ export declare const flowClock: {
31
+ now: () => number;
32
+ };
11
33
  type AnyNode = FlowNode<unknown>;
12
34
  type AnyType = FlowNodeType<unknown>;
13
35
  /** A node, resolved: its size and its handle specs, both of which only
@@ -56,21 +78,146 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
56
78
  * when the app applies the changes it is being sent. Cleared on release,
57
79
  * which is also how a refused drag snaps back. */
58
80
  private _dragTo;
81
+ /** Whether the pane's edges are stroked a pen at a time (`EDGE_BATCH`):
82
+ * chosen by a pass over the whole pane, and followed by every pass over
83
+ * part of it until the next. */
84
+ private _batch;
59
85
  /** The box a resize is currently making, for the same reason. */
60
86
  private _resizeTo;
61
- /** What was last handed to `onNodeBodies`, so the React half is told only
62
- * when something actually moved. */
63
- private _bodiesKey;
87
+ /** The bodies last sent, re-sent as the same array when only the origin
88
+ * moved, and that origin — and each one by id, reused as the same object
89
+ * when nothing about it changed, so the React half re-renders the card
90
+ * that moved and not the ones beside it. */
91
+ private _bodies;
92
+ private _bodiesById;
93
+ private _bodiesOrigin;
94
+ /** Bodies held back while the zoom moves (`_holdBodies`): whether they
95
+ * are, the zoom last seen, the timer that brings them back and when the
96
+ * last held step was. */
97
+ private _bodiesHeld;
98
+ private _seenZoom;
99
+ private _bodiesRest;
100
+ private _bodiesAt;
101
+ /** Mounted cards `<Flow>` shows, painted in the bodies' layer — which
102
+ * the 2D pane then leaves out (`setShownBodies`, `_cardInLayer`). */
103
+ private _shownBodies;
104
+ /** The canvases `<Flow>` paints the minimap and controls on, over the
105
+ * bodies — while there are any, the graph leaves the panels out. */
106
+ private _panelCanvases;
107
+ /** The fit the minimap on screen was painted with: every pass over it
108
+ * since its corner was last claimed whole resolved the same one. Set by
109
+ * the pass that paints it (`_sceneInput`), read by what a move claims
110
+ * there (`_miniMapMoves`). */
111
+ private _miniMapShown;
112
+ private _panelsKey;
113
+ /** The budget's model (`_holdBodies`, `_frameTick`): what a body adds to a
114
+ * zoom step, what a step costs with none re-scaled, the last frame's
115
+ * time, and what the step awaiting its frame did. */
116
+ private _bodyStepMs;
117
+ private _baseStepMs;
118
+ private _lastFrameAt;
119
+ private _zoomStep;
64
120
  private _dashPhase;
121
+ /** The box the bodies are laid out in, which a 2D pan carries. */
122
+ private _bodiesLayer;
123
+ /** When a pan last asked to blit — the dash timer waits for it. */
124
+ private _blittedPanAt;
125
+ /** When the view last moved, and when the dash timer last came round,
126
+ * ticking or not: a 2D pan's dashes wait for a view that held still. */
127
+ private _viewMovedAt;
128
+ private _tickAt;
129
+ /** When the dash timer last marched, and what a 2D frame has cost lately
130
+ * — the paint, and the server's answer to the frame before it; a running
131
+ * mean, ms: what a tick waits on. */
132
+ private _marchedAt;
133
+ private _tickCost;
65
134
  private _animTimer;
66
135
  /** Inside `paint`, where an invalidation would only schedule a redraw of
67
136
  * the frame being drawn. */
68
137
  private _painting;
138
+ /** Routes that survived the last frame — see {@link SceneCache}. */
139
+ private readonly _sceneCache;
140
+ /** Asks the GL surface for a frame, while one is drawing this pane. */
141
+ private _glRequest;
142
+ /**
143
+ * Bumped by every repaint this element asks for that is *not* a pure pan
144
+ * — which is how the GL surface knows the graph it holds on the GPU is
145
+ * still the graph, and a frame is only a new offset. Errs one way on
146
+ * purpose: anything it cannot see is covered by the rest of the key
147
+ * (`glFrame`), and a rebuild too many costs a frame's packing, where one
148
+ * too few draws the wrong graph.
149
+ */
150
+ private _worldVersion;
151
+ /**
152
+ * The same for the nodes a drag is moving under GL, which are lifted out
153
+ * of the world for as long as it moves them (`_lifted`): a step changes
154
+ * them and nothing else, so it moves this and the world stays on the GPU.
155
+ * Rebuilding the world was the whole of a drag step's cost — 5-7 ms of
156
+ * scene and packing a step at 2,000 nodes, for one card.
157
+ */
158
+ private _liftVersion;
159
+ /** The lifted ids, for the drag gesture they were made for, and a count
160
+ * of every change to them — the world's key, since the world is built
161
+ * without them. */
162
+ private _liftSet;
163
+ private _liftFor;
164
+ private _liftGen;
165
+ /** Whether a marching edge is in the world, or in the lifted layer. */
166
+ private _worldAnimated;
167
+ private _liftedAnimated;
168
+ /** The last nodes commit changed lifted nodes and nothing else. */
169
+ private _liftOnly;
170
+ /** The overscan the GL world was culled to, in its own pinned
171
+ * coordinates, and the key it was built under. */
172
+ private _worldCull;
173
+ private _worldCullId;
174
+ private _worldZoom;
175
+ /** When the zoom last moved, whether that move continued a stream of
176
+ * them — a gesture, where one alone is a jump — and the timer that asks
177
+ * for the frame that rebuilds the GL world once the stream stops. */
178
+ private _zoomAt;
179
+ private _zoomStream;
180
+ /** When the frame that drew the latest zoom step began, and when it last
181
+ * finished a pass: an animation's next step follows the frame that drew
182
+ * its last, however long that frame took (`_applyViewport`). */
183
+ private _zoomFrameAt;
184
+ private _zoomDrawnAt;
185
+ private _zoomRest;
186
+ /** A 2D paint drew labels scaled mid-zoom, and owes them at their own
187
+ * sizes once it rests. */
188
+ private _textApproximated;
189
+ /**
190
+ * Mid-zoom on the 2D renderer: the graph and its ground as the gesture
191
+ * drew them once, on a surface of their own, composited scaled for every
192
+ * step after — the GL renderer's world drawn scaled, in a bitmap. A step
193
+ * used to stroke every edge, fill every card and lay the grid again, 20 ms
194
+ * of Direct2D a step over the stress lattice, for a picture the next step
195
+ * moved off. Dropped when the zoom rests, which paints it all again
196
+ * exactly, and whenever the graph itself changes.
197
+ */
198
+ private _zoomShot;
199
+ /** What the last `GRAPH_PAINTS_KEPT` whole paints of the graph cost, ms,
200
+ * newest last: the steps of a zoom painted live and the pictures painted
201
+ * for zooms, the two passes that say what a step would cost live — and
202
+ * not a zoom's first step, which sets every label at its size once and
203
+ * says what the steps after it will not. Whether a zoom is worth a
204
+ * picture (`ZOOM_SHOT_WORTH_MS`); empty until a zoom has painted, so the
205
+ * first one starts live. */
206
+ private _graphPaints;
207
+ /** A 2D drag's pictures (`_liftShotFor`), and the gesture that is not to
208
+ * have any: one whose view moved under it, where a picture a step would
209
+ * cost two full paints a step. */
210
+ private _liftShot;
211
+ private _liftShotRefused;
69
212
  /** Inside a live input dispatch — what makes a body emission `sync`.
70
213
  * Motion and the wheel run at continuous priority, whose React updates
71
214
  * can trail the pane's own painting by frames; an emission made under
72
215
  * this flag asks the receiver to commit before the dispatch returns. */
73
216
  private _gestureSync;
217
+ /** Inside a call through `FlowInstance` (`fromHandle`) — an application's
218
+ * handler, timer or animation loop moving the viewport. Its emissions ask
219
+ * to commit inline too. */
220
+ private _handleSync;
74
221
  /** The scene has been offered to assistive tech at least once — items
75
222
  * only exist once layout has placed them, which no commit marks. */
76
223
  private _sceneAnnounced;
@@ -96,7 +243,19 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
96
243
  private _themeString;
97
244
  private _textOptions;
98
245
  private _measure;
246
+ /** The same shaping, both dimensions: what a scene's label chips are
247
+ * sized from. `_measure` answers a width because `measureNode` only ever
248
+ * wanted one. */
249
+ private _measureBox;
250
+ /**
251
+ * The palette, resolved once for the theme and the `palette` prop it was
252
+ * resolved from. Every text measured asks for it (`_textOptions`), and
253
+ * resolving it tints the accent and reads the background's lightness out
254
+ * of a colour string: a 2D pan's passes measured their labels with a
255
+ * fresh one each. The theme object is replaced when it changes.
256
+ */
99
257
  private _palette;
258
+ private _paletteHeld;
100
259
  /**
101
260
  * Rebuild the node index when — and only when — one of its inputs changed
102
261
  * identity. Sizes come out of the font stack, so the face is an input too:
@@ -149,10 +308,16 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
149
308
  */
150
309
  private _nodeDamage;
151
310
  private _rebuildNodes;
311
+ /** The paint order: by `zIndex`, a selected node over the rest of its
312
+ * layer, and declaration order breaking ties. */
313
+ private _sortOrder;
152
314
  private _rebuildEdges;
153
315
  /** who touches whom — what a moved node's damage has to include */
154
316
  private _rebuildAdjacency;
155
317
  private _viewport;
318
+ /** The viewport with the pane's window origin folded in — what every
319
+ * graph-to-window conversion shared with `./scene.ts` takes. */
320
+ private _screenViewport;
156
321
  /**
157
322
  * Device pixels per logical pixel — the display scale this pane's window
158
323
  * resolved to (react-x11's docs/scale.md): `1` on an ordinary display,
@@ -181,6 +346,24 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
181
346
  * for goes through here; the full ones pass `abs`, which is device
182
347
  * already. */
183
348
  private _claim;
349
+ /** Whether the pane draws the minimap itself. On a canvas of its own —
350
+ * under mounted bodies — it is `invalidate`'s to repaint. */
351
+ private _drawsMiniMap;
352
+ /**
353
+ * What moving or resizing `moves` changed in the minimap's corner, where
354
+ * the pane draws it: each node's place there before and after, while the
355
+ * fit is the one on screen — the graph's bounds with the viewport's,
356
+ * which put every node where it is there — and the whole corner when it
357
+ * is not, since every node moves in it then. A drag of one node among
358
+ * 2,000 claimed the corner on every step, and every such pass built and
359
+ * filled all 2,000 again, where it builds what it reaches now
360
+ * (`buildMiniMap`). Asked against the fit on screen rather than the one
361
+ * before the change, a step works the fit out once, and not at all when
362
+ * nothing moved on screen.
363
+ */
364
+ private _miniMapMoves;
365
+ /** A gesture's step, claimed in the minimap: `_miniMapMoves`. */
366
+ private _claimMiniMapMoves;
184
367
  /**
185
368
  * The pane proper: `abs` inset by border and padding, off core's own
186
369
  * resolved layout (react-x11#254) — so a `<Flow style={{ borderWidth: 1,
@@ -206,6 +389,38 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
206
389
  * resizable, because eight dots on every node is a graph nobody can
207
390
  * read. */
208
391
  private _grips;
392
+ /**
393
+ * One entry as `./scene.ts` takes it: the live gesture state resolved
394
+ * away, so everything past this point is pure. A drag's position and a
395
+ * resize's box are already in `rect`, and `grips` is already filtered by
396
+ * whatever the handles took.
397
+ *
398
+ * Built per call rather than cached: `rectOf` is what keeps a drag in step
399
+ * with the commit that has not landed yet, and a cache here is a cache of
400
+ * last frame's positions.
401
+ */
402
+ /** Whether a React body is mounted over this node — which is what makes
403
+ * its card draw a title bar rather than a centred label, and what
404
+ * `_emitBodies` reports a box for. */
405
+ private _mounted;
406
+ /**
407
+ * The frame being painted: each node's scene source, and the two lists a
408
+ * 2D pass builds its scene from. A frame paints its damage as several
409
+ * passes — a pan's strips, its pinned furniture, the corners of a rounded
410
+ * pane — and the scene cache culls the graph to the screen once for all
411
+ * of them (`SceneCache.edgesOnScreen`), keyed on these very lists, so
412
+ * every pass has to be handed the same ones. The passes run one after
413
+ * another in a single task, so a microtask queued by the first forgets
414
+ * the frame after the last — the same reasoning as `_reportFrame`.
415
+ */
416
+ private _frame;
417
+ private _paintedFrame;
418
+ private _sourceOf;
419
+ /** A 2D pass's node lists, the same arrays for every pass of a frame. */
420
+ private _frameLists;
421
+ private _source;
422
+ /** Not through `_source`: a source carries its grips, and `_grips` asks
423
+ * where the handles are — the pair would recur. */
209
424
  private _handlesOf;
210
425
  /**
211
426
  * A node's box on screen, **on whole device pixels**.
@@ -233,28 +448,43 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
233
448
  * the shift exposed — which `paintDamage()` then hands to `paint`, so the
234
449
  * existing culling draws the sliver and nothing else.
235
450
  *
236
- * The furniture — minimap, zoom controls — is pinned to the pane while
237
- * its pixels would ride the blit, so its bands are carved out of the
238
- * region that shifts and claimed as ordinary damage. The blit gate tests
239
- * foreign claims against the *rect* (react-x11#309/#310), so a claim
240
- * sitting edge to edge with it leaves the frame a blit: the middle of
241
- * the pane is copied, the strips repaint with the new viewport, and the
242
- * panels repaint in place.
451
+ * The furniture — minimap, zoom controls — stays put while the graph
452
+ * moves, so it is handed over as `pinned` (react-x11#682, 2.22): the
453
+ * whole pane is copied, and core repaints each panel and the image of
454
+ * it the copy dragged along, with the strips the shift exposed.
455
+ *
456
+ * Mounted node bodies ride it. They are laid out in one box beside the
457
+ * pane, which a pan moves by exactly the pan, so their pixels move with
458
+ * the pane's: the box goes to `scrollContents` as a rider
459
+ * (react-x11#671), its commit claims nothing, and what it leaves or
460
+ * reaches outside the rect is all it costs. `<Flow>` clips it to the pane for that. A body entering or
461
+ * leaving the pane, or changing as it goes, claims inside the rect and
462
+ * declines that frame's blit; the next one blits again.
243
463
  *
244
464
  * Still a full repaint when:
245
465
  * - the zoom moved (scaling is not a blit) or the shift is fractional on
246
466
  * the device grid — every real pan gesture is whole device pixels;
247
- * - mounted node bodies exist: they are core-owned siblings whose
248
- * gesture-time commits claim *inside* the rect every step, which
249
- * declines the blit anyway — bailing early skips the churn;
250
- * - the furniture bands would eat the pane (a tiny pane, or panels on
251
- * both the top and the bottom of a short one).
467
+ * - bodies are mounted and `<Flow>` has not handed their box over;
468
+ * - the pane is too small to be worth it; and core falls back itself
469
+ * when the repairs would repaint most of it.
252
470
  */
253
471
  private _blitPan;
254
472
  /** Zoom about a point that must not move — the pointer under a wheel, the
255
473
  * pane's centre for a keyboard zoom. */
256
474
  private _zoomAbout;
257
475
  private _fit;
476
+ /**
477
+ * `fn`, as a call through the handle. A programmatic pan — an animation
478
+ * loop stepping `setViewport` — moves the pane at once and the bodies'
479
+ * box through React, and on React's schedule the box caught up with the
480
+ * pane in jumps: several steps' worth in one commit, landing in a frame
481
+ * whose blit shifted by one. A rider that moves by more than the blit is
482
+ * a layout move, so that frame repainted the pane whole — a fifth of the
483
+ * frames of a pan over mounted bodies (`_blitPan`). Marked like a
484
+ * gesture's, the emission commits before the call returns, and the box
485
+ * moves by exactly the pan in the frame that blits it.
486
+ */
487
+ fromHandle<T>(fn: () => T): T;
258
488
  getViewport(): Viewport;
259
489
  setViewport(viewport: Partial<Viewport>): void;
260
490
  zoomIn(step?: number): void;
@@ -296,11 +526,14 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
296
526
  * the square root of the gap (see `paths.ts`) — `8` where the shoulder
297
527
  * uses `6.25`, so the bound is generous rather than tight.
298
528
  */
529
+ /** The coarse box with the label's plate in it: what an edge that
530
+ * changes has to claim, where its route alone would leave a plate's
531
+ * ends. */
532
+ private _edgeInkBox;
299
533
  private _edgeCoarseBox;
300
534
  /** The drawn handle, in screen pixels. Capped as well as floored: a dot
301
535
  * that scaled all the way up would be a saucer at 2.5×, and the thing it
302
536
  * marks — a point on the border — does not get bigger. */
303
- private _handleRadius;
304
537
  private _connectable;
305
538
  private _draggable;
306
539
  /** Pick the handle an edge attaches to: the one it names, else the only
@@ -310,7 +543,6 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
310
543
  * Null when either end is missing — an edge to a node that was removed is
311
544
  * a normal state during an edit, not an error. */
312
545
  private _edgeGeometry;
313
- private _centre;
314
546
  private _corner;
315
547
  private _controlsOptions;
316
548
  private _controlButtons;
@@ -319,13 +551,22 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
319
551
  * is no minimap or nothing to put in it. */
320
552
  private _miniMap;
321
553
  private _miniToGraph;
322
- private _miniToScreen;
323
554
  defaultMouseDown(ev: MouseEvent): void;
324
555
  defaultMouseDrag(ev: MouseEvent): void;
325
556
  private _dragDispatch;
326
557
  defaultMouseUp(ev: MouseEvent): void;
327
558
  defaultContextMenu(ev: MouseEvent): void;
328
559
  private _clickNode;
560
+ /**
561
+ * The nodes a drag is moving, once it has moved them: lifted out of the
562
+ * rest of the graph for the rest of the gesture. Under GL the world is
563
+ * built without them and they are a layer of their own (`glFrame`), so
564
+ * each step packs them and their edges and leaves the world on the GPU;
565
+ * in 2D the rest is two pictures a step copies from (`_liftShotFor`).
566
+ * Null otherwise — and under GL the change back is a change of the
567
+ * world's key, which rebuilds it with them in.
568
+ */
569
+ private _lifted;
329
570
  private _dragStep;
330
571
  /** The box a resize is making, reported as it goes. A grip that moves the
331
572
  * top or the left edge moves the node too, so both changes go out — an
@@ -336,6 +577,28 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
336
577
  * the damage it has to claim, so the two cannot disagree. */
337
578
  private _connectionPath;
338
579
  private _validConnection;
580
+ /**
581
+ * What one step of a box selection changes on screen: a band round each
582
+ * side of the box that moved, across the whole of both boxes. That covers
583
+ * the outline where it was and where it is, and the tint where one box
584
+ * lies over the graph and the other does not; a side that held still —
585
+ * the two the gesture is anchored by — changed only where a moving side
586
+ * shortened or lengthened it, which that side's band covers. Claiming the
587
+ * box round both repainted everything under the selection, every node and
588
+ * edge in it, on every step: 21 ms of a step on the stress example's
589
+ * fan-out, which is what made a sweep lag the pointer.
590
+ *
591
+ * The bands are cut on the device grid so that none of them overlaps
592
+ * another: core merges overlapping damage into the box round it, which is
593
+ * the whole selection again — and a pass over a translucent tint must not
594
+ * paint it twice. Claimed past this element's own `invalidate`, whose one
595
+ * job here would be to repaint the minimap and the controls on their
596
+ * canvases, and a box selection moves nothing on either.
597
+ *
598
+ * Under GL the box is the overlay's, drawn every frame: a step is a frame
599
+ * and not a change to the world, which a claim would have rebuilt.
600
+ */
601
+ private _claimSelectStep;
339
602
  private _selectBox;
340
603
  /** Wheel: zoom about the pointer, or pan when zooming is off. The seam
341
604
  * runs it after the app's own `onWheel` and not at all if that vetoed;
@@ -382,79 +645,365 @@ export declare class FlowGraphNode extends Node implements FlowInstance {
382
645
  private _stopAnimation;
383
646
  paint(ctx: Context2D): void;
384
647
  /**
385
- * Where every mounted node body belongs, relative to the pane's own
386
- * top-left. Sent only when the list changed, so a repaint that moved
387
- * nothing does not re-render React — but a pan does, once per frame,
388
- * which is the cost `render` is documented to carry.
648
+ * Everything `buildScene` reads, gathered from the element once.
649
+ *
650
+ * The two node lists differ on purpose: `nodes` is the paint order with a
651
+ * dragged node lifted to the top, and `all` is every node, because the
652
+ * minimap summarises the graph rather than the pass.
653
+ */
654
+ invalidate(layout?: boolean, damage?: Parameters<Node['invalidate']>[1], reason?: string): void;
655
+ /** A 2D frame's cost so far, while its flush is still painting passes. */
656
+ private _frameCost;
657
+ /**
658
+ * One `onFrame` per window flush, however many damage passes it painted.
659
+ * The window paints its passes one after another in a single task, so a
660
+ * microtask queued by the first runs after the last — and reports the
661
+ * frame whole, which is what a frame rate counts.
662
+ */
663
+ private _reportFrame;
664
+ private get _gl();
665
+ /** What the GL renderer's label atlas sets strings with: this pane's app,
666
+ * for its staging surface, and the options its 2D painter measures with
667
+ * — so a label is cut and placed the same on both renderers. Null where
668
+ * there is no text engine to ask. */
669
+ glText(): {
670
+ app: unknown;
671
+ options: PainterOptions;
672
+ } | null;
673
+ /**
674
+ * The GL surface's hook: how it asks for frames. Set while a surface draws
675
+ * this pane, cleared when it goes — and until it is set the pane draws
676
+ * itself, so a surface that is still loading shows the 2D graph rather
677
+ * than an empty box.
678
+ */
679
+ setGlRequest(request: (() => void) | null): void;
680
+ /**
681
+ * One GL frame's worth of scene, in the two layers the renderer keeps
682
+ * apart (`./gl/renderer.ts`): the **world**, rebuilt only when it changed
683
+ * since the key the surface last drew, and the **overlay**, every frame.
684
+ *
685
+ * The world is built at a pinned origin and culled to an *overscan* — the
686
+ * view grown by a pane in every direction — so a pan inside it changes
687
+ * nothing but `offset`. When the view leaves the overscan, or the zoom
688
+ * moves, the overscan is re-centred and the world rebuilt; at every other
689
+ * frame of a pan the world comes back `null` and the renderer draws the
690
+ * buffers already on the GPU.
691
+ *
692
+ * A zoom *gesture* is drawn the same way: while the zoom keeps moving,
693
+ * each step draws the world on the GPU magnified by `zoom` — the view's
694
+ * zoom over the one it was built at — and the world is rebuilt at the
695
+ * zoom the gesture stopped at, `GL_ZOOM_REST_MS` after its last step.
696
+ * Rebuilding every step was the whole of a zoom's cost: a scene built,
697
+ * packed and uploaded per step, 19 ms of it on a 300-node graph, where a
698
+ * pan step is a uniform. What a magnified world gets wrong until then is
699
+ * what a zoom does not scale linearly — a label's raster, the hairlines
700
+ * with a floor of a pixel, the detail that appears past a zoom — which is
701
+ * what every map does during a pinch. A single jump — a control's button,
702
+ * `fitView`, `setViewport` — is not a stream and rebuilds at once, and so
703
+ * does a step that would magnify one build by more than `GL_ZOOM_SPAN`
704
+ * or show more of the graph than the overscan holds.
705
+ *
706
+ * The key is everything the world is a function of that this element can
707
+ * name: its version (every repaint but a view change moves it), the
708
+ * overscan, the zoom it was built at, and the palette and face — the two
709
+ * a theme change moves, which core announces to the window rather than
710
+ * to this element.
711
+ *
712
+ * Everything a 2D paint does around its drawing happens here too: the
713
+ * pending fit, the dash timer, the first scene announcement, the bodies.
714
+ */
715
+ glFrame(lastKey: string | null, lastLifted?: string | null): {
716
+ world: FlowScene | null;
717
+ key: string;
718
+ lifted: FlowScene | null | undefined;
719
+ liftedKey: string | null;
720
+ offset: XYPosition;
721
+ zoom: number;
722
+ overlay: FlowScene;
723
+ phase: number;
724
+ moving: boolean;
725
+ } | null;
726
+ /** The frame that rebuilds the GL world once a zoom gesture stops — asked
727
+ * for `GL_ZOOM_REST_MS` after its last step, however many steps the
728
+ * timer outlived. */
729
+ private _restZoom;
730
+ /** A whole paint of the graph took `ms` (`_graphPaints`). */
731
+ private _noteGraphPaint;
732
+ /** The median of the graph's last whole paints — the lower of the two
733
+ * middle ones for an even count — or zero before the first. */
734
+ private _graphPaintMs;
735
+ /** Whether a pass over `clip` painted the whole pane — what a zoom step
736
+ * paints, and the only pass whose cost says what one would. */
737
+ /** Whether a pass (`paintDamage()`, device pixels) repaints every pixel
738
+ * of the pane, unlike {@link _wholePane}'s nine tenths. */
739
+ private _coversPane;
740
+ private _wholePane;
741
+ /**
742
+ * The graph painted once onto a surface of its own for the zoom gesture
743
+ * under way — made at the gesture's first step that finds none — or null
744
+ * where there is no surface to paint on.
745
+ */
746
+ private _zoomShotFor;
747
+ /** Where the gesture's picture lands at the viewport of the moment, in
748
+ * the pane's logical pixels: a world point drawn at `w·z₀ + v₀` is at
749
+ * `w·z + v`, so the picture is scaled by `z / z₀` about the pane's corner
750
+ * and moved by `v − v₀·z/z₀`. */
751
+ private _shotRect;
752
+ private _compositeShot;
753
+ /**
754
+ * The pane this pass reaches that the gesture's picture does not: nothing
755
+ * while zooming in about a point in the pane, a ring round it zooming out,
756
+ * a side after a pan. Up to four bands — above, below, and either side
757
+ * between them — each reaching a pixel under the picture's edge, which
758
+ * its filtering leaves half there.
759
+ */
760
+ private _uncovered;
761
+ private _dropZoomShot;
762
+ /**
763
+ * The pictures a 2D drag copies from — made on the first pass of the
764
+ * gesture that has its nodes lifted, and kept while the graph under them
765
+ * and the view hold still. A drag step repainted the box round the moved
766
+ * node and every edge on it, and an edge is as long as it is: the stress
767
+ * lattice sends its last rows' edges back to its first nodes, so dragging
768
+ * one repainted the window a step, every card and edge in it, at 46-57
769
+ * fps on Cocoa. Cutting the damage finer did not help — core merges a
770
+ * frame's rects down to four, and a long diagonal's pieces merge back to
771
+ * most of the pane. Copying what did not move is what does.
772
+ *
773
+ * Null where there is no offscreen surface, and for a gesture whose view
774
+ * moved while it held pictures: it paints live from then on, rather than
775
+ * paint the graph twice a step.
776
+ */
777
+ private _liftShotFor;
778
+ /**
779
+ * One of a drag's pictures, copied into this pass's rect of the pane —
780
+ * the whole pane on a full pass. The ground's picture is opaque and is
781
+ * *copied*, which the server does as a copy rather than a blend (`copy`
782
+ * is XRender's `Src`, and a memcpy on Cocoa); the cards' picture is
783
+ * blended in only where a card is (`only`). On XQuartz the two blends of
784
+ * the step's box — as big as the moved node's longest edge — were most
785
+ * of what a drag cost the server.
786
+ */
787
+ private _compositeLift;
788
+ /** A rect of the pane, logical pixels, drawn from the same rect of a
789
+ * picture of it — on whole device pixels, so nothing is resampled. */
790
+ private _copyShotRect;
791
+ private _dropLiftShot;
792
+ /** Whether a zoom gesture is moving: a stream of zoom steps, the last of
793
+ * them under `GL_ZOOM_REST_MS` ago. A single step — a button, `fitView`,
794
+ * an app's `setViewport` — is not one. */
795
+ private _zoomMoving;
796
+ /** Whether this pass's damage reaches the minimap's corner at all —
797
+ * answered from the panel's box alone, without resolving the map. */
798
+ private _miniMapReached;
799
+ /** The minimap's panel, in logical window pixels, or null without one. */
800
+ private _miniMapCorner;
801
+ /**
802
+ * Everything `buildScene` reads, for one of three uses:
803
+ *
804
+ * - `'all'` — the 2D renderer's pass: the pane as it is, culled to this
805
+ * pass's damage.
806
+ * - `{ world }` — the GL graph: built at a **pinned origin** (the viewport's
807
+ * translation and the pane's origin both left out, so a pan does not
808
+ * change a vertex) and culled to the overscan `world` rather than the
809
+ * pane, with none of the pane's furniture.
810
+ * - `'overlay'` — the GL furniture: the pane's background, grid, selection,
811
+ * minimap and controls, and no graph at all.
812
+ */
813
+ /**
814
+ * The order nodes are drawn in, bottom to top: `zIndex`, then selection,
815
+ * then declaration (`_order`), with a node being dragged lifted over all
816
+ * of them. The one order both halves of a node follow — its card in the
817
+ * scene, its mounted body in `_emitBodies` — so a body is stacked over
818
+ * the bodies of the cards under its own, and under the ones above.
819
+ */
820
+ private _paintOrder;
821
+ private _sceneInput;
822
+ /**
823
+ * Where every mounted node body belongs, and where the graph's origin is.
824
+ *
825
+ * The two are sent apart because they change apart. A body's rect is
826
+ * relative to the **graph's origin on screen** — its position times the
827
+ * zoom — which a pan does not move; the origin is the viewport's
828
+ * translation, which is all a pan moves. So a pan re-sends the *same*
829
+ * bodies array with a new origin, `<Flow>` moves the one box they are
830
+ * laid out in, and React re-renders none of them: the per-step commit of
831
+ * every mounted body's position is what held a pan over 48 of them to 57
832
+ * frames a second. A drag, a zoom, a selection or a body entering the pane
833
+ * sends a new array, as before.
389
834
  */
390
835
  private _emitBodies;
391
- /** The grid, drawn only inside `region` — the pass's damage on a partial
392
- * repaint, the pane on a full one. Alignment stays anchored to the
393
- * viewport origin, so the region never changes where a dot falls. */
394
- private _paintGrid;
836
+ /**
837
+ * Whether mounted bodies sit this zoom out.
838
+ *
839
+ * A zoom changes every body's scale, and a scale is not a transform: each
840
+ * body is styled, laid out, its text shaped and its pixels painted again,
841
+ * at the new size, per step. That is about a millisecond a body on this
842
+ * class of machine — 42 bodies held a zoom to 15 frames a second where
843
+ * the graph alone costs 13 ms a step. So each step of a zoom *gesture*
844
+ * predicts what re-scaling the bodies on screen would add, and when that
845
+ * is over `BODY_BUDGET_MS` they sit the gesture out: still mounted — no
846
+ * state is lost — but hidden (`display: 'none'`) and untouched, while the
847
+ * cards, their labels and the edges carry it. Once the zoom has held still
848
+ * for
849
+ * `BODY_ZOOM_REST_MS` they come back, laid out once at the new scale. A
850
+ * handful of bodies fits the budget and zooms live.
851
+ *
852
+ * The prediction is bodies × what one costs, measured from the pane's own
853
+ * frames (`_frameTick`) — so a slower machine holds sooner. Once held, a
854
+ * gesture stays held until it rests: bodies blinking in and out as the
855
+ * count crosses the line would be worse than either.
856
+ *
857
+ * Only a stream counts: a gesture's steps — the wheel, a pinch, the keys
858
+ * (`_gestureSync`) — or an animation's, `setViewport` a frame at a time,
859
+ * each zoom under `GL_ZOOM_REST_MS` after the one before (`_zoomStream`,
860
+ * the rule the zoom's picture and its scaled labels already follow). A
861
+ * single programmatic jump — `fitView`, `setViewport`, a control's button
862
+ * — applies at once, so an app that sets the viewport and reads the result
863
+ * sees it; the pane never animates a viewport of its own. An animation
864
+ * that stepped every body at every frame held a zoom over the stress
865
+ * example's charts to 10 frames a second.
866
+ */
867
+ private _holdBodies;
868
+ /** Bring the held bodies back once the zoom has held still for
869
+ * `BODY_ZOOM_REST_MS` — judged on the pane's clock, like the zoom's own
870
+ * rest (`_restZoom`): a timer that comes due while steps are still
871
+ * arriving waits out what is left of the rest instead. */
872
+ private _restBodies;
873
+ /**
874
+ * What the bodies' rest is counted from: the last step of the zoom, or
875
+ * the frame that drew it where that came later. A step the window has not
876
+ * drawn yet is a zoom still moving — the frame is late, not the gesture
877
+ * over — and counted from the step alone, a frame a server took half a
878
+ * second to answer brought the bodies back between two steps of one
879
+ * animation, whose next frame re-scaled all of them and was late in turn.
880
+ * Past `BODY_REST_CAP_MS` without that frame they come back anyway: a
881
+ * surface that stopped drawing must not keep them out for good.
882
+ */
883
+ private _restFrom;
884
+ /**
885
+ * Paint one mounted node's card — fill, border, header, handles, grips —
886
+ * into `ctx`, a `<canvas>` in the bodies' layer (`<Flow>`), exactly as the
887
+ * scene paints it. `ctx` is at the canvas's origin, `abs` its place in
888
+ * the window in device pixels.
889
+ *
890
+ * Why the card is painted twice: the bodies share one layer over every
891
+ * card — over the GL surface, or beside the 2D pane — so a body could not
892
+ * go under a card that was over its own. It painted over that card's
893
+ * header, border and handles: a selected node's outline hidden behind the
894
+ * body of the node under it. A card painted in the bodies' layer, just
895
+ * under its own body, is stacked with it in the cards' paint order, and
896
+ * covers the card the graph drew for it.
897
+ */
898
+ paintCard(id: string, ctx: unknown, abs: XYPosition): void;
899
+ /**
900
+ * Whether a card is the bodies' layer's to draw and not the pane's: on
901
+ * the 2D renderer, shown there and the bodies not held out of a zoom.
902
+ *
903
+ * **Never under GL.** The layer and the GL frame reach the screen by two
904
+ * paths — the layer is the surface's overlay, painted and presented with
905
+ * the window's frame, and a GL frame is swapped on the surface's own
906
+ * turn — and this element cannot order them. So a card left to the layer
907
+ * was, on some path, a card nobody drew: edges crossing the empty place
908
+ * where it should be. The first paint of a scene of charts did that until
909
+ * the layer had painted; a GL frame landing between a zoom's hold and the
910
+ * commit that hid the bodies did it; and on macOS a wheel notch did it,
911
+ * painting the overlay inside its own dispatch 20–25 ms before the GL
912
+ * frame it asked for — a frame of bare edges at the start of every zoom
913
+ * that held the bodies. Each was fixed by ordering one more path.
914
+ *
915
+ * The world draws every card instead, mounted or not, and the layer only
916
+ * ever adds to it: its card and body land on the world's copy of that
917
+ * card. Whatever order the two paths take, the worst the screen can show
918
+ * is a body a frame early or late, over a card that is there. What it
919
+ * costs is a few dozen cards more in a world build, drawn under their
920
+ * copies. The 2D pane is painted in the same pass as the layer, in one
921
+ * frame, and it leaves them out.
922
+ */
923
+ private _cardInLayer;
924
+ /**
925
+ * The cards `<Flow>` has on screen in the bodies' layer (`paintCard`),
926
+ * which the 2D pane then leaves out. Told after the commit that shows
927
+ * them, so no 2D frame lacks both; told the empty set while bodies are
928
+ * held out of a zoom, when their cards are the pane's again. Under GL it
929
+ * changes nothing drawn: the world draws every card (`_cardInLayer`).
930
+ */
931
+ setShownBodies(ids: ReadonlySet<string>): void;
932
+ /**
933
+ * The canvases `<Flow>` paints the minimap and controls on, over its
934
+ * bodies (`paintPanels`): the bodies' layer is over the graph, so panels
935
+ * the graph drew went under any card that reached them. While there are
936
+ * any the graph leaves the panels out, and every change to the pane asks
937
+ * them to repaint. Presses still land on the pane: the canvases take
938
+ * none.
939
+ */
940
+ /** The panel canvases the minimap is painted on — the ones whose box
941
+ * reaches its corner. */
942
+ private _miniMapCanvases;
943
+ /**
944
+ * The box `<Flow>` lays the node bodies out in, beside this pane, under
945
+ * the 2D renderer — null under GL, and with no bodies to lay out. A pan
946
+ * hands it to `scrollContents` as a rider: its pixels move with the
947
+ * pane's.
948
+ */
949
+ setBodiesLayer(layer: unknown): void;
950
+ setPanelCanvases(canvases: readonly PanelCanvas[]): void;
951
+ /** Where the minimap and the controls are, relative to the pane's
952
+ * top-left, logical — with a pixel round for their borders. */
953
+ panelRects(): FlowRect[];
954
+ /** Paint the minimap and the controls into `ctx`, a canvas whose place in
955
+ * the window, in device pixels, is `abs` — as the scene paints them. */
956
+ paintPanels(ctx: unknown, abs: FlowRect): void;
957
+ /** Tell `<Flow>` where the panels are when that changed (`onPanels`). */
958
+ private _emitPanels;
959
+ /** `adaptive` as a number of milliseconds: `Infinity` never holds. */
960
+ private _budgetMs;
961
+ /** Where the mounted bodies stand against the budget — reported with
962
+ * every frame (`FlowFrameStats.bodies`). */
963
+ bodyBudget(): FlowBodyBudget;
964
+ /**
965
+ * A frame was drawn: time the zoom step it carried, into the model
966
+ * `_holdBodies` predicts from. A step with no body re-scaled is the
967
+ * baseline; one that re-scaled some says what each cost over it. Passes
968
+ * a millisecond or two apart are one frame (the 2D renderer paints a
969
+ * frame's damage as several), and a gap long enough to be the user
970
+ * pausing is not a step at all.
971
+ */
972
+ private _frameTick;
395
973
  /**
396
974
  * The grid as one repeating fill (ntk#263): a step-sized tile drawn once,
397
975
  * a `createPattern('repeat')` over it, and one composite for the whole
398
- * region — where the runs path pays a region-sized coverage mask.
976
+ * region — where the runs path in `./paint.ts` pays a region-sized
977
+ * coverage mask.
399
978
  *
400
- * Two decisions with reasons:
979
+ * Handed to `paintScene` as its grid painter, and answering **false** when
980
+ * it does not apply, so the universal path takes over. Two decisions with
981
+ * reasons:
401
982
  *
402
983
  * - **Integral device steps only.** The tile is a pixmap, so its size is
403
- * whole pixels; at a fractional step the pattern would drift against
404
- * the graph's own coordinates — against `snapToGrid`, against node
405
- * positions — by a fraction per tile, and a grid that slides under the
406
- * content it grids is worse than a slower exact one.
984
+ * whole pixels; at a fractional step the pattern would drift against the
985
+ * graph's own coordinates — against `snapToGrid`, against node positions
986
+ * — by a fraction per tile, and a grid that slides under the content it
987
+ * grids is worse than a slower exact one.
407
988
  * - **The phase lives in the tile, not in a picture transform.** An
408
989
  * untransformed repeat is anchored to the window origin, so the grid's
409
990
  * alignment is baked in by drawing the mark at `origin mod tile` — and
410
991
  * re-baking when the origin moves. A `setTransform` translate says the
411
992
  * same thing in one request, but a *transformed* repeat forfeits the
412
- * server's untransformed fast path — on the in-process test server
413
- * that was ~180 ms a frame of per-pixel arithmetic, and re-rendering a
414
- * 24px tile is a handful of requests on any server.
993
+ * server's untransformed fast path — on the in-process test server that
994
+ * was ~180 ms a frame of per-pixel arithmetic, and re-rendering a 24px
995
+ * tile is a handful of requests on any server.
996
+ *
997
+ * An arrow property rather than a method: it is passed as a value, and a
998
+ * method would arrive with no `this`.
415
999
  */
416
- private _paintGridPattern;
1000
+ private _grid;
417
1001
  private _makeGridSurface;
418
1002
  /** Draw one grid cell with the mark at the phase point, wrapped — a mark
419
1003
  * near an edge is drawn again a tile over, so the seam never cuts it.
420
1004
  * Device pixels throughout: `unit` is how many of them a graph unit is. */
421
1005
  private _renderGridTile;
422
1006
  private _dropGridTile;
423
- /** Draws every visible edge; answers whether any of them is animated, so
424
- * the caller knows whether to keep a timer alive. */
425
- private _paintEdges;
426
- /** An arrowhead's three or four points, added to the pile for its colour
427
- * rather than drawn — see {@link StrokeBuckets} for why. */
428
- private _collectMarker;
429
- private _paintNodes;
430
- private _paintNode;
431
- private _mounted;
432
- private _paintGrips;
433
- /** The built-in node: a card with a label, an optional second line and an
434
- * optional accent stripe down its leading edge. */
435
- /** The card itself: one rounded box, and the accent stripe if it has one.
436
- * With a `batch` the box joins the pile for its appearance instead of
437
- * being drawn on its own. */
438
- private _paintCardShape;
439
- /** The label and its second line — the half of a card that has to come
440
- * after every card when they are batched. */
441
- private _paintCardInk;
442
- /**
443
- * Handles are drawn one disc at a time, and that is the measured answer
444
- * rather than the obvious one.
445
- *
446
- * Batching them into a single path halved the requests and made the frame
447
- * *slower*: a path's mask is its bounding box, so forty dots scattered
448
- * across the pane rasterize to a paneful of mask — three quarters of a
449
- * megabyte — where forty small ones cost a kilobyte each. Batching pays
450
- * for the edges because an edge already spans that box; it does not pay
451
- * for anything small and scattered.
452
- */
453
- private _paintHandles;
454
- private _paintConnection;
455
- private _paintSelectionBox;
456
- private _paintMiniMap;
457
- private _paintControls;
458
1007
  }
459
1008
  export {};
460
1009
  //# sourceMappingURL=node.d.ts.map