@react-x11/components 0.7.1 → 0.9.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 (354) hide show
  1. package/README.md +295 -51
  2. package/dist/charts/node.d.ts +1 -1
  3. package/dist/charts/node.d.ts.map +1 -1
  4. package/dist/charts/node.js +6 -2
  5. package/dist/charts/node.js.map +1 -1
  6. package/dist/color-picker/ColorPicker.d.ts.map +1 -1
  7. package/dist/color-picker/ColorPicker.js +43 -33
  8. package/dist/color-picker/ColorPicker.js.map +1 -1
  9. package/dist/embed/client.d.ts +48 -3
  10. package/dist/embed/client.d.ts.map +1 -1
  11. package/dist/embed/client.js +79 -5
  12. package/dist/embed/client.js.map +1 -1
  13. package/dist/embed/index.d.ts +1 -1
  14. package/dist/embed/index.d.ts.map +1 -1
  15. package/dist/embed/index.js +1 -1
  16. package/dist/embed/index.js.map +1 -1
  17. package/dist/html/node.d.ts +3 -1
  18. package/dist/html/node.d.ts.map +1 -1
  19. package/dist/html/node.js +7 -5
  20. package/dist/html/node.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/{markdown → internal/markdown}/ast.d.ts +12 -0
  26. package/dist/internal/markdown/ast.d.ts.map +1 -0
  27. package/dist/internal/markdown/ast.js +22 -0
  28. package/dist/internal/markdown/ast.js.map +1 -0
  29. package/dist/internal/markdown/parse.d.ts.map +1 -0
  30. package/dist/{markdown → internal/markdown}/parse.js +112 -22
  31. package/dist/internal/markdown/parse.js.map +1 -0
  32. package/dist/internal/markdown/stringify.d.ts +4 -0
  33. package/dist/internal/markdown/stringify.d.ts.map +1 -0
  34. package/dist/internal/markdown/stringify.js +684 -0
  35. package/dist/internal/markdown/stringify.js.map +1 -0
  36. package/dist/internal/markdown/tags.d.ts.map +1 -0
  37. package/dist/internal/markdown/tags.js.map +1 -0
  38. package/dist/internal/scroll.d.ts +3 -2
  39. package/dist/internal/scroll.d.ts.map +1 -1
  40. package/dist/internal/scroll.js +33 -15
  41. package/dist/internal/scroll.js.map +1 -1
  42. package/dist/internal/units.d.ts +2 -0
  43. package/dist/internal/units.d.ts.map +1 -0
  44. package/dist/internal/units.js +35 -0
  45. package/dist/internal/units.js.map +1 -0
  46. package/dist/internal/window.d.ts.map +1 -1
  47. package/dist/internal/window.js +4 -2
  48. package/dist/internal/window.js.map +1 -1
  49. package/dist/maps/anchors.d.ts +98 -0
  50. package/dist/maps/anchors.d.ts.map +1 -0
  51. package/dist/maps/anchors.js +531 -0
  52. package/dist/maps/anchors.js.map +1 -0
  53. package/dist/maps/controller.d.ts +283 -0
  54. package/dist/maps/controller.d.ts.map +1 -0
  55. package/dist/maps/controller.js +743 -0
  56. package/dist/maps/controller.js.map +1 -0
  57. package/dist/maps/gl/buckets.d.ts +95 -0
  58. package/dist/maps/gl/buckets.d.ts.map +1 -0
  59. package/dist/maps/gl/buckets.js +362 -0
  60. package/dist/maps/gl/buckets.js.map +1 -0
  61. package/dist/maps/gl/build-worker.d.ts +13 -0
  62. package/dist/maps/gl/build-worker.d.ts.map +1 -0
  63. package/dist/maps/gl/build-worker.js +44 -0
  64. package/dist/maps/gl/build-worker.js.map +1 -0
  65. package/dist/maps/gl/color.d.ts +8 -0
  66. package/dist/maps/gl/color.d.ts.map +1 -0
  67. package/dist/maps/gl/color.js +57 -0
  68. package/dist/maps/gl/color.js.map +1 -0
  69. package/dist/maps/gl/cover.d.ts +51 -0
  70. package/dist/maps/gl/cover.d.ts.map +1 -0
  71. package/dist/maps/gl/cover.js +124 -0
  72. package/dist/maps/gl/cover.js.map +1 -0
  73. package/dist/maps/gl/index.d.ts +3 -0
  74. package/dist/maps/gl/index.d.ts.map +1 -0
  75. package/dist/maps/gl/index.js +20 -0
  76. package/dist/maps/gl/index.js.map +1 -0
  77. package/dist/maps/gl/markers.d.ts +28 -0
  78. package/dist/maps/gl/markers.d.ts.map +1 -0
  79. package/dist/maps/gl/markers.js +60 -0
  80. package/dist/maps/gl/markers.js.map +1 -0
  81. package/dist/maps/gl/overlays.d.ts +68 -0
  82. package/dist/maps/gl/overlays.d.ts.map +1 -0
  83. package/dist/maps/gl/overlays.js +300 -0
  84. package/dist/maps/gl/overlays.js.map +1 -0
  85. package/dist/maps/gl/pane.d.ts +12 -0
  86. package/dist/maps/gl/pane.d.ts.map +1 -0
  87. package/dist/maps/gl/pane.js +37 -0
  88. package/dist/maps/gl/pane.js.map +1 -0
  89. package/dist/maps/gl/placement.d.ts +111 -0
  90. package/dist/maps/gl/placement.d.ts.map +1 -0
  91. package/dist/maps/gl/placement.js +567 -0
  92. package/dist/maps/gl/placement.js.map +1 -0
  93. package/dist/maps/gl/renderer.d.ts +352 -0
  94. package/dist/maps/gl/renderer.d.ts.map +1 -0
  95. package/dist/maps/gl/renderer.js +1127 -0
  96. package/dist/maps/gl/renderer.js.map +1 -0
  97. package/dist/maps/gl/shaders.d.ts +120 -0
  98. package/dist/maps/gl/shaders.d.ts.map +1 -0
  99. package/dist/maps/gl/shaders.js +451 -0
  100. package/dist/maps/gl/shaders.js.map +1 -0
  101. package/dist/maps/gl/store.d.ts +115 -0
  102. package/dist/maps/gl/store.d.ts.map +1 -0
  103. package/dist/maps/gl/store.js +469 -0
  104. package/dist/maps/gl/store.js.map +1 -0
  105. package/dist/maps/gl/text.d.ts +154 -0
  106. package/dist/maps/gl/text.d.ts.map +1 -0
  107. package/dist/maps/gl/text.js +382 -0
  108. package/dist/maps/gl/text.js.map +1 -0
  109. package/dist/maps/gl/view.d.ts +54 -0
  110. package/dist/maps/gl/view.d.ts.map +1 -0
  111. package/dist/maps/gl/view.js +974 -0
  112. package/dist/maps/gl/view.js.map +1 -0
  113. package/dist/maps/index.d.ts +1 -1
  114. package/dist/maps/index.d.ts.map +1 -1
  115. package/dist/maps/index.js +216 -52
  116. package/dist/maps/index.js.map +1 -1
  117. package/dist/maps/labels.d.ts +37 -16
  118. package/dist/maps/labels.d.ts.map +1 -1
  119. package/dist/maps/labels.js +188 -119
  120. package/dist/maps/labels.js.map +1 -1
  121. package/dist/maps/node.d.ts +162 -56
  122. package/dist/maps/node.d.ts.map +1 -1
  123. package/dist/maps/node.js +607 -515
  124. package/dist/maps/node.js.map +1 -1
  125. package/dist/maps/overlay.d.ts +72 -9
  126. package/dist/maps/overlay.d.ts.map +1 -1
  127. package/dist/maps/overlay.js +108 -28
  128. package/dist/maps/overlay.js.map +1 -1
  129. package/dist/maps/paint.d.ts +3 -0
  130. package/dist/maps/paint.d.ts.map +1 -1
  131. package/dist/maps/paint.js.map +1 -1
  132. package/dist/maps/proj.d.ts +14 -0
  133. package/dist/maps/proj.d.ts.map +1 -1
  134. package/dist/maps/proj.js +28 -0
  135. package/dist/maps/proj.js.map +1 -1
  136. package/dist/maps/renderer.d.ts +69 -0
  137. package/dist/maps/renderer.d.ts.map +1 -0
  138. package/dist/maps/renderer.js +66 -0
  139. package/dist/maps/renderer.js.map +1 -0
  140. package/dist/maps/sources.d.ts +25 -3
  141. package/dist/maps/sources.d.ts.map +1 -1
  142. package/dist/maps/sources.js +17 -0
  143. package/dist/maps/sources.js.map +1 -1
  144. package/dist/maps/theme.d.ts +19 -0
  145. package/dist/maps/theme.d.ts.map +1 -0
  146. package/dist/maps/theme.js +44 -0
  147. package/dist/maps/theme.js.map +1 -0
  148. package/dist/maps/tiles.d.ts +117 -17
  149. package/dist/maps/tiles.d.ts.map +1 -1
  150. package/dist/maps/tiles.js +163 -30
  151. package/dist/maps/tiles.js.map +1 -1
  152. package/dist/maps/types.d.ts +188 -20
  153. package/dist/maps/types.d.ts.map +1 -1
  154. package/dist/markdown/expressions.d.ts +1 -1
  155. package/dist/markdown/expressions.d.ts.map +1 -1
  156. package/dist/markdown/expressions.js.map +1 -1
  157. package/dist/markdown/index.d.ts +7 -6
  158. package/dist/markdown/index.d.ts.map +1 -1
  159. package/dist/markdown/index.js +9 -7
  160. package/dist/markdown/index.js.map +1 -1
  161. package/dist/markdown/spans.d.ts +1 -1
  162. package/dist/markdown/spans.d.ts.map +1 -1
  163. package/dist/media-player/index.d.ts +11 -3
  164. package/dist/media-player/index.d.ts.map +1 -1
  165. package/dist/media-player/index.js +13 -2
  166. package/dist/media-player/index.js.map +1 -1
  167. package/dist/rich-text-editor/clipboard.d.ts +23 -0
  168. package/dist/rich-text-editor/clipboard.d.ts.map +1 -0
  169. package/dist/rich-text-editor/clipboard.js +307 -0
  170. package/dist/rich-text-editor/clipboard.js.map +1 -0
  171. package/dist/rich-text-editor/collab.d.ts +32 -0
  172. package/dist/rich-text-editor/collab.d.ts.map +1 -0
  173. package/dist/rich-text-editor/collab.js +55 -0
  174. package/dist/rich-text-editor/collab.js.map +1 -0
  175. package/dist/rich-text-editor/commands.d.ts +50 -0
  176. package/dist/rich-text-editor/commands.d.ts.map +1 -0
  177. package/dist/rich-text-editor/commands.js +376 -0
  178. package/dist/rich-text-editor/commands.js.map +1 -0
  179. package/dist/rich-text-editor/drag.d.ts +68 -0
  180. package/dist/rich-text-editor/drag.d.ts.map +1 -0
  181. package/dist/rich-text-editor/drag.js +148 -0
  182. package/dist/rich-text-editor/drag.js.map +1 -0
  183. package/dist/rich-text-editor/html.d.ts +145 -0
  184. package/dist/rich-text-editor/html.d.ts.map +1 -0
  185. package/dist/rich-text-editor/html.js +516 -0
  186. package/dist/rich-text-editor/html.js.map +1 -0
  187. package/dist/rich-text-editor/index.d.ts +263 -0
  188. package/dist/rich-text-editor/index.d.ts.map +1 -0
  189. package/dist/rich-text-editor/index.js +822 -0
  190. package/dist/rich-text-editor/index.js.map +1 -0
  191. package/dist/rich-text-editor/inline.d.ts +94 -0
  192. package/dist/rich-text-editor/inline.d.ts.map +1 -0
  193. package/dist/rich-text-editor/inline.js +252 -0
  194. package/dist/rich-text-editor/inline.js.map +1 -0
  195. package/dist/rich-text-editor/keymap.d.ts +71 -0
  196. package/dist/rich-text-editor/keymap.d.ts.map +1 -0
  197. package/dist/rich-text-editor/keymap.js +393 -0
  198. package/dist/rich-text-editor/keymap.js.map +1 -0
  199. package/dist/rich-text-editor/keys.d.ts +29 -0
  200. package/dist/rich-text-editor/keys.d.ts.map +1 -0
  201. package/dist/rich-text-editor/keys.js +93 -0
  202. package/dist/rich-text-editor/keys.js.map +1 -0
  203. package/dist/rich-text-editor/look.d.ts +71 -0
  204. package/dist/rich-text-editor/look.d.ts.map +1 -0
  205. package/dist/rich-text-editor/look.js +342 -0
  206. package/dist/rich-text-editor/look.js.map +1 -0
  207. package/dist/rich-text-editor/markdown.d.ts +18 -0
  208. package/dist/rich-text-editor/markdown.d.ts.map +1 -0
  209. package/dist/rich-text-editor/markdown.js +496 -0
  210. package/dist/rich-text-editor/markdown.js.map +1 -0
  211. package/dist/rich-text-editor/nodes.d.ts +135 -0
  212. package/dist/rich-text-editor/nodes.d.ts.map +1 -0
  213. package/dist/rich-text-editor/nodes.js +397 -0
  214. package/dist/rich-text-editor/nodes.js.map +1 -0
  215. package/dist/rich-text-editor/render.d.ts +68 -0
  216. package/dist/rich-text-editor/render.d.ts.map +1 -0
  217. package/dist/rich-text-editor/render.js +500 -0
  218. package/dist/rich-text-editor/render.js.map +1 -0
  219. package/dist/rich-text-editor/schema.d.ts +16 -0
  220. package/dist/rich-text-editor/schema.d.ts.map +1 -0
  221. package/dist/rich-text-editor/schema.js +386 -0
  222. package/dist/rich-text-editor/schema.js.map +1 -0
  223. package/dist/rich-text-editor/store.d.ts +11 -0
  224. package/dist/rich-text-editor/store.d.ts.map +1 -0
  225. package/dist/rich-text-editor/store.js +43 -0
  226. package/dist/rich-text-editor/store.js.map +1 -0
  227. package/dist/rich-text-editor/suggest.d.ts +127 -0
  228. package/dist/rich-text-editor/suggest.d.ts.map +1 -0
  229. package/dist/rich-text-editor/suggest.js +0 -0
  230. package/dist/rich-text-editor/suggest.js.map +1 -0
  231. package/dist/rich-text-editor/tables.d.ts +41 -0
  232. package/dist/rich-text-editor/tables.d.ts.map +1 -0
  233. package/dist/rich-text-editor/tables.js +204 -0
  234. package/dist/rich-text-editor/tables.js.map +1 -0
  235. package/dist/rich-text-editor/toolbar.d.ts +58 -0
  236. package/dist/rich-text-editor/toolbar.d.ts.map +1 -0
  237. package/dist/rich-text-editor/toolbar.js +548 -0
  238. package/dist/rich-text-editor/toolbar.js.map +1 -0
  239. package/dist/rich-text-editor/view.d.ts +368 -0
  240. package/dist/rich-text-editor/view.d.ts.map +1 -0
  241. package/dist/rich-text-editor/view.js +1968 -0
  242. package/dist/rich-text-editor/view.js.map +1 -0
  243. package/dist/rich-text-editor/virtual.d.ts +54 -0
  244. package/dist/rich-text-editor/virtual.d.ts.map +1 -0
  245. package/dist/rich-text-editor/virtual.js +262 -0
  246. package/dist/rich-text-editor/virtual.js.map +1 -0
  247. package/dist/richtext/node.d.ts +25 -2
  248. package/dist/richtext/node.d.ts.map +1 -1
  249. package/dist/richtext/node.js +46 -24
  250. package/dist/richtext/node.js.map +1 -1
  251. package/dist/table/index.d.ts.map +1 -1
  252. package/dist/table/index.js +14 -5
  253. package/dist/table/index.js.map +1 -1
  254. package/dist/terminal/backends.d.ts +4 -1
  255. package/dist/terminal/backends.d.ts.map +1 -1
  256. package/dist/terminal/backends.js.map +1 -1
  257. package/dist/terminal/index.d.ts +18 -7
  258. package/dist/terminal/index.d.ts.map +1 -1
  259. package/dist/terminal/index.js +28 -11
  260. package/dist/terminal/index.js.map +1 -1
  261. package/dist/terminal/vt/node.d.ts +56 -3
  262. package/dist/terminal/vt/node.d.ts.map +1 -1
  263. package/dist/terminal/vt/node.js +106 -26
  264. package/dist/terminal/vt/node.js.map +1 -1
  265. package/dist/terminal/vt/renderer.d.ts +4 -0
  266. package/dist/terminal/vt/renderer.d.ts.map +1 -1
  267. package/dist/terminal/vt/renderer.js +14 -5
  268. package/dist/terminal/vt/renderer.js.map +1 -1
  269. package/dist/tree/index.d.ts.map +1 -1
  270. package/dist/tree/index.js +6 -4
  271. package/dist/tree/index.js.map +1 -1
  272. package/package.json +23 -4
  273. package/src/charts/node.ts +6 -2
  274. package/src/color-picker/ColorPicker.ts +107 -81
  275. package/src/embed/client.ts +102 -8
  276. package/src/embed/index.ts +2 -0
  277. package/src/html/node.ts +7 -5
  278. package/src/index.ts +2 -0
  279. package/src/{markdown → internal/markdown}/ast.ts +24 -7
  280. package/src/{markdown → internal/markdown}/parse.ts +134 -24
  281. package/src/internal/markdown/stringify.ts +772 -0
  282. package/src/internal/scroll.ts +39 -18
  283. package/src/internal/units.ts +34 -0
  284. package/src/internal/window.ts +4 -2
  285. package/src/maps/anchors.ts +607 -0
  286. package/src/maps/controller.ts +999 -0
  287. package/src/maps/gl/buckets.ts +457 -0
  288. package/src/maps/gl/build-worker.ts +55 -0
  289. package/src/maps/gl/color.ts +62 -0
  290. package/src/maps/gl/cover.ts +170 -0
  291. package/src/maps/gl/index.ts +23 -0
  292. package/src/maps/gl/markers.ts +83 -0
  293. package/src/maps/gl/overlays.ts +379 -0
  294. package/src/maps/gl/pane.ts +42 -0
  295. package/src/maps/gl/placement.ts +816 -0
  296. package/src/maps/gl/renderer.ts +1576 -0
  297. package/src/maps/gl/shaders.ts +486 -0
  298. package/src/maps/gl/store.ts +566 -0
  299. package/src/maps/gl/text.ts +495 -0
  300. package/src/maps/gl/view.ts +1224 -0
  301. package/src/maps/index.ts +270 -81
  302. package/src/maps/labels.ts +214 -121
  303. package/src/maps/node.ts +763 -629
  304. package/src/maps/overlay.ts +148 -43
  305. package/src/maps/paint.ts +3 -0
  306. package/src/maps/proj.ts +31 -0
  307. package/src/maps/renderer.ts +155 -0
  308. package/src/maps/sources.ts +38 -3
  309. package/src/maps/theme.ts +51 -0
  310. package/src/maps/tiles.ts +191 -33
  311. package/src/maps/types.ts +188 -20
  312. package/src/markdown/expressions.ts +5 -1
  313. package/src/markdown/index.ts +14 -11
  314. package/src/markdown/spans.ts +1 -1
  315. package/src/media-player/index.ts +18 -4
  316. package/src/rich-text-editor/clipboard.ts +439 -0
  317. package/src/rich-text-editor/collab.ts +91 -0
  318. package/src/rich-text-editor/commands.ts +448 -0
  319. package/src/rich-text-editor/dom-globals.d.ts +23 -0
  320. package/src/rich-text-editor/drag.ts +211 -0
  321. package/src/rich-text-editor/html.ts +619 -0
  322. package/src/rich-text-editor/index.ts +1331 -0
  323. package/src/rich-text-editor/inline.ts +345 -0
  324. package/src/rich-text-editor/keymap.ts +510 -0
  325. package/src/rich-text-editor/keys.ts +119 -0
  326. package/src/rich-text-editor/look.ts +427 -0
  327. package/src/rich-text-editor/markdown.ts +653 -0
  328. package/src/rich-text-editor/nodes.ts +497 -0
  329. package/src/rich-text-editor/render.ts +800 -0
  330. package/src/rich-text-editor/schema.ts +431 -0
  331. package/src/rich-text-editor/store.ts +39 -0
  332. package/src/rich-text-editor/suggest.ts +597 -0
  333. package/src/rich-text-editor/tables.ts +272 -0
  334. package/src/rich-text-editor/toolbar.ts +724 -0
  335. package/src/rich-text-editor/view.ts +2287 -0
  336. package/src/rich-text-editor/virtual.ts +347 -0
  337. package/src/richtext/node.ts +59 -30
  338. package/src/table/index.ts +14 -5
  339. package/src/terminal/backends.ts +4 -1
  340. package/src/terminal/index.ts +43 -15
  341. package/src/terminal/vt/node.ts +128 -29
  342. package/src/terminal/vt/renderer.ts +27 -5
  343. package/src/tree/index.ts +6 -4
  344. package/dist/markdown/ast.d.ts.map +0 -1
  345. package/dist/markdown/ast.js +0 -17
  346. package/dist/markdown/ast.js.map +0 -1
  347. package/dist/markdown/parse.d.ts.map +0 -1
  348. package/dist/markdown/parse.js.map +0 -1
  349. package/dist/markdown/tags.d.ts.map +0 -1
  350. package/dist/markdown/tags.js.map +0 -1
  351. /package/dist/{markdown → internal/markdown}/parse.d.ts +0 -0
  352. /package/dist/{markdown → internal/markdown}/tags.d.ts +0 -0
  353. /package/dist/{markdown → internal/markdown}/tags.js +0 -0
  354. /package/src/{markdown → internal/markdown}/tags.ts +0 -0
package/README.md CHANGED
@@ -11,10 +11,10 @@ needs a change to core to exist, and core does not grow to carry it.
11
11
  reference page per component, rendered from [`docs/`](docs/README.md). This
12
12
  README is the tour; that is the detail.
13
13
 
14
- > **Installable now.** react-x11 2.0.0 is on npm, so the peer range this
15
- > package declares resolves and `npm install` just works. The published
16
- > release is `0.1.0`; `master` carries components added since, so use a
17
- > checkout if you want what is not in that release yet.
14
+ > **Installable now.** The published release is `0.8.0`, and the react-x11
15
+ > range it declares resolves off the registry, so `npm install` just works.
16
+ > `master` carries what has landed since, so use a checkout if you want
17
+ > something not in that release yet.
18
18
 
19
19
  ## What is here, and what is in core
20
20
 
@@ -36,10 +36,51 @@ This package carries it when **all** of these hold:
36
36
  So `<box>`, `<text>`, `<window>`, buttons, menus, dialogs and the rest of the
37
37
  widget set are core. Heavier, more specialised things live here.
38
38
 
39
- The line can also fall inside a single feature. `<glarea>` is core — it is a
40
- real X window on a GLX visual, which is renderer internals. A Three.js-shaped
41
- scene graph drawn into it is not: that is composition over a public element,
42
- and it belongs here.
39
+ The line can also fall inside a single feature. `<glarea>` is core — a real
40
+ child surface on a GL visual, created in the commit phase, which is renderer
41
+ internals whichever backend is under it. A Three.js-shaped scene graph drawn
42
+ into it is not: that is composition over a public element, and it belongs
43
+ here.
44
+
45
+ ## Two backends, and the three components that only run on one
46
+
47
+ react-x11 has two backend families now — X11, and a native macOS one that
48
+ speaks to Cocoa with no X server anywhere (`createRoot({ backend })`, or
49
+ `REACT_X11_BACKEND`). **Almost everything in this package is neutral about
50
+ which**, because almost everything here is either composition over core's
51
+ host elements or a registered element that draws through core's 2D context,
52
+ and both are backend contracts rather than X ones. `<Map>`, the vt terminal,
53
+ `<Flow>`, `<Html>`, `<Markdown>`, the charts and the rest render on either.
54
+
55
+ The exceptions are the components built on **XEmbed**, and they are
56
+ exceptions because cross-process window embedding does not exist on macOS at
57
+ all — there is no `<foreign>` to build on, which react-x11's own
58
+ [`docs/macos.md`](https://github.com/sidorares/react-x11/blob/master/docs/macos.md)
59
+ names this package in as much:
60
+
61
+ | Component | On the Cocoa backend |
62
+ | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
+ | `<Terminal>`, embedded backends (xterm, urxvt, alacritty) | No equivalent. `backend="auto"` skips them and lands on `backend="vt"`, which is native and needs no emulator installed anyway; one named outright reports `status: 'unavailable'` and renders `fallback`. |
64
+ | `<MediaPlayer>` | No equivalent — mpv's `--wid` and VLC's `--drawable-xid` are X mechanisms. Reports `status: 'unavailable'` and renders `fallback`. |
65
+ | `<TrayHost>` | Reports `status: 'unavailable'` and renders `fallback`; there is no manager selection to take. Putting an icon _in_ a Mac's status bar is the other direction, and is core's `useTray()`. |
66
+
67
+ `<Three>` is the one that looks like it should be on that list and is not: it
68
+ draws through `<glarea>`, which the Cocoa backend implements as GL into a
69
+ CALayer, so the scene graph runs there too — on a third GL path rather than
70
+ none. [Its reference](docs/components/three.md) has the table.
71
+
72
+ All three find out from the app, not the machine. `<Terminal backend="auto">`
73
+ asks whether the app can host an embedded window before it probes `PATH`, so
74
+ a Mac with XQuartz's xterm installed still gets the vt terminal on the Cocoa
75
+ backend, and an app that runs on both can leave `backend` alone. An emulator
76
+ named outright is refused out loud: `status: 'unavailable'`, `fallback`, and
77
+ an `EmbedUnsupportedError` for `onError`.
78
+
79
+ The other X-shaped behaviour to know about is **PRIMARY**: selecting text
80
+ publishing to the X PRIMARY selection, and middle-click pasting it, are what
81
+ X11 desktops do and what this package's document surfaces take part in. On
82
+ macOS there is one pasteboard and no such convention, so what is described
83
+ as PRIMARY below is the X11 backend's half of the story.
43
84
 
44
85
  ## Install
45
86
 
@@ -51,8 +92,14 @@ npm install @react-x11/components react react-x11
51
92
  host element mutates state inside react-x11, so a second copy of the renderer
52
93
  would leave you with an element that lays out correctly and never paints.
53
94
 
54
- Core must be **2.0.0 or newer**: that is the release the subpaths this
55
- package imports (`react-x11/host`, `/node`, `/style`) arrived in.
95
+ Core must be **2.11.0 or newer**. The floor is a running one rather than a
96
+ one-time gate — it moves whenever a component here adopts something core
97
+ just landed, and the last few moves were the Cocoa glyph-run seams
98
+ (`^2.5.0`), the chunked Cocoa stroke `<Map>` wanted (`^2.6.1`), the desktop
99
+ calendar's move into core (`^2.9.1`) and the eyedropper's macOS rung
100
+ (`^2.11.0`). The subpaths this package imports are `react-x11` itself plus
101
+ `/host`, `/node`, `/style`, `/keysyms`, `/ntk`, `/yoga` and
102
+ `/jsx-runtime`.
56
103
 
57
104
  ## Usage
58
105
 
@@ -115,26 +162,31 @@ import type { CodeEditorProps } from '@react-x11/components';
115
162
 
116
163
  ## Components
117
164
 
118
- | Component | Import | |
119
- | ---------------- | --------------------------------------- | ------------------------------------------------------------ |
120
- | `Calendar` | `@react-x11/components/calendar` | A month grid: one date or a range, any day blockable. |
121
- | `DatePicker` | `@react-x11/components/calendar` | That calendar on a popup, behind a field. |
122
- | `LineChart` … | `@react-x11/components/charts` | Cartesian charts; a million points is a normal input. |
123
- | `ColorPicker` … | `@react-x11/components/color-picker` | A colour input: field, hue, alpha, swatches, eyedropper. |
124
- | `Code` | `@react-x11/components/code` | A static code block: highlighted, selectable. |
125
- | `CodeEditor` | `@react-x11/components/code-editor` | Multiline code editing: highlighting, completion. |
126
- | `Flow` | `@react-x11/components/flow` | A directed-graph editor: nodes, edges, pan and zoom. |
127
- | `Html` | `@react-x11/components/html` | A static HTML + CSS document, selectable, with seams. |
128
- | `Map` | `@react-x11/components/maps` | A 2D vector-tile map: pan, zoom, markers, overlays. |
129
- | `Markdown` | `@react-x11/components/markdown` | Streaming-friendly GFM with cross-block selection. |
130
- | `MediaPlayer` | `@react-x11/components/media-player` | mpv or VLC, embedded, with real transport control. |
131
- | `ReorderList` … | `@react-x11/components/reorder` | A drag-and-drop list, over core's own drag and drop. |
132
- | `Table` | `@react-x11/components/table` | A data table: sortable, virtualized, any row height. |
133
- | `Terminal` | `@react-x11/components/terminal` | A real terminal: an embedded emulator, or its own. |
134
- | `TerminalOutput` | `@react-x11/components/terminal-output` | A captured session, rendered. `<Terminal>`'s static sibling. |
135
- | `Timeline` … | `@react-x11/components/timeline` | A run of events: a mark per step, a line between. |
136
- | `TrayHost` | `@react-x11/components/tray-host` | The system tray: applications dock their icons in. |
137
- | `Tree` | `@react-x11/components/tree` | A disclosure tree: seams throughout, and virtualized. |
165
+ | Component | Import | |
166
+ | ---------------- | ---------------------------------------- | ------------------------------------------------------------ |
167
+ | `Calendar` | `@react-x11/components/calendar` | A month grid: one date or a range, any day blockable. |
168
+ | `DatePicker` | `@react-x11/components/calendar` | That calendar on a popup, behind a field. |
169
+ | `LineChart` … | `@react-x11/components/charts` | Cartesian charts; a million points is a normal input. |
170
+ | `ColorPicker` … | `@react-x11/components/color-picker` | A colour input: field, hue, alpha, swatches, eyedropper. |
171
+ | `Code` | `@react-x11/components/code` | A static code block: highlighted, selectable. |
172
+ | `CodeEditor` | `@react-x11/components/code-editor` | Multiline code editing: highlighting, completion. |
173
+ | `Flow` | `@react-x11/components/flow` | A directed-graph editor: nodes, edges, pan and zoom. |
174
+ | `Formula` | `@react-x11/components/formula` | TeX mathematics: KaTeX layout, native ink, selectable. |
175
+ | `Html` | `@react-x11/components/html` | A static HTML + CSS document, selectable, with seams. |
176
+ | `Map` | `@react-x11/components/maps` | A 2D vector-tile map: pan, zoom, markers, overlays. |
177
+ | `Markdown` | `@react-x11/components/markdown` | Streaming-friendly GFM with cross-block selection. |
178
+ | `MediaPlayer` | `@react-x11/components/media-player` | mpv or VLC, embedded, with real transport control. |
179
+ | `QmlView` | `@react-x11/components/qml` | Qt's QML language as an authoring layer. No Qt. |
180
+ | `ReorderList` … | `@react-x11/components/reorder` | A drag-and-drop list, over core's own drag and drop. |
181
+ | `RichTextEditor` | `@react-x11/components/rich-text-editor` | WYSIWYG editing over ProseMirror; markdown in and out. |
182
+ | `Table` | `@react-x11/components/table` | A data table: sortable, virtualized, any row height. |
183
+ | `Tabs` … | `@react-x11/components/tabs` | One visible panel at a time, five strip styles. |
184
+ | `Terminal` | `@react-x11/components/terminal` | A real terminal: an embedded emulator, or its own. |
185
+ | `TerminalOutput` | `@react-x11/components/terminal-output` | A captured session, rendered. `<Terminal>`'s static sibling. |
186
+ | `Canvas` … | `@react-x11/components/three` | A three-fiber-shaped 3D scene over either GL backend. |
187
+ | `Timeline` … | `@react-x11/components/timeline` | A run of events: a mark per step, a line between. |
188
+ | `TrayHost` | `@react-x11/components/tray-host` | The system tray: applications dock their icons in. |
189
+ | `Tree` | `@react-x11/components/tree` | A disclosure tree: seams throughout, and virtualized. |
138
190
 
139
191
  Five shared modules sit underneath and are importable on their own:
140
192
  `/richtext` (the styled-text element a document selects across),
@@ -147,7 +199,7 @@ spawn, watch and hand-back lifecycle both XEmbed wrappers are built on).
147
199
  Selecting text is **core's**, not this package's: a `<box selectable>` is
148
200
  a surface, everything under it that answers for its own text is in the
149
201
  selection, and the drag, the word and block granularities, Ctrl+A, Ctrl+C
150
- and PRIMARY come with it (react-x11#291). `<Markdown>` and `<Code>` set
202
+ and (on X11) PRIMARY come with it (react-x11#291). `<Markdown>` and `<Code>` set
151
203
  that prop and say which parts are chrome; the elements underneath answer
152
204
  `textContent`/`textIndexAt`/`textCaretRect`/`textRangeRects`, which is all
153
205
  an element of your own has to do to join a document.
@@ -218,9 +270,10 @@ What "put a lot of effort into performance" means here, concretely:
218
270
  a per-pixel-column min/max index (a pyramid over the data, built lazily
219
271
  and extended on append), so a million points in a 90px cell cost ~90
220
272
  rectangles. A million points that fall on one pixel render one pixel.
221
- - **Server-side drawing commands by default, pixels when they win.** A
222
- dense line goes out as one batched `FillRectangles` (~8 bytes per pixel
223
- column); a sparse one as a real antialiased path. The one place a pixel
273
+ - **Drawing commands by default, pixels when they win.** A dense line goes
274
+ out as one batched `fillRects` — on X11 that is a `FillRectangles` at
275
+ ~8 bytes per pixel column, and the wire cost `onFrameStats` reports is
276
+ that one; a sparse line goes as a real antialiased path. The one place a pixel
224
277
  push wins — a scatter covering most of the plot — is detected by
225
278
  comparing the actual byte costs, and flips to one composited density
226
279
  image.
@@ -278,8 +331,8 @@ markdown→HTML pass anywhere — and is exported (`parseMarkdown`) with the
278
331
  AST types.
279
332
 
280
333
  **Selection is the point.** Text selects across every block — drag,
281
- double-click a word, triple-click a block, Ctrl+A, Ctrl+C — and a mouse-up
282
- with a selection takes the X11 PRIMARY selection, so middle-click paste
334
+ double-click a word, triple-click a block, Ctrl+A, Ctrl+C — and on X11 a
335
+ mouse-up with a selection takes the PRIMARY selection, so middle-click paste
283
336
  works everywhere. All of that is core's `selectable` (react-x11#291); what
284
337
  this component adds is which parts are chrome, so copied text is clean:
285
338
  list markers stay behind, and the separators come from the layout, which
@@ -372,6 +425,26 @@ explicit `language={…}`) and the look is shared with `<Markdown>`'s fenced
372
425
  blocks, so the two agree in one window. Selection and copy are core's; the
373
426
  line-number gutter is `selectable={false}`, so copied code pastes clean.
374
427
 
428
+ ## Mathematics
429
+
430
+ ```jsx
431
+ import { Formula } from '@react-x11/components/formula';
432
+
433
+ <Formula tex="x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}" display selectable />;
434
+ ```
435
+
436
+ TeX, rendered natively. KaTeX — an optional dependency — parses the source
437
+ into its virtual DOM, and this package's `formula` element lays that tree out
438
+ and draws it through the app's font manager, using KaTeX's own faces. Every
439
+ glyph answers core's four text accessors, so the mathematics is **part of the
440
+ selection** rather than an opaque picture: on its own with `selectable`, or as
441
+ one block inside any `selectable` document. `partial` holds the last tree that
442
+ parsed while more source is still arriving, which is what makes it safe to
443
+ append to a formula a model is still writing. A ` ```math ` fence in a
444
+ document becomes one through `<Markdown>`'s `fences` map, which is opt-in —
445
+ that seam is how `<Markdown>` hosts a component without importing it.
446
+ [The reference](docs/components/formula.md) has the rest.
447
+
375
448
  ## A terminal session you already have: `<TerminalOutput>`
376
449
 
377
450
  The static sibling of `<Terminal>`, exactly as `<Code>` is `<CodeEditor>`'s.
@@ -473,6 +546,40 @@ pipeline beside galleries of the sizes and variants;
473
546
  [the reference](docs/components/timeline.md) has the rest, including why
474
547
  every indicator's chip is opaque.
475
548
 
549
+ ## Tabs
550
+
551
+ One visible panel at a time. The API is
552
+ [Chakra UI's Tabs](https://chakra-ui.com/docs/components/tabs) with its parts
553
+ spelled flat, exactly as `<Timeline>` spells its own:
554
+
555
+ ```jsx
556
+ import {
557
+ Tabs,
558
+ TabsList,
559
+ TabsTrigger,
560
+ TabsContent,
561
+ } from '@react-x11/components/tabs';
562
+
563
+ <Tabs defaultValue="members">
564
+ <TabsList>
565
+ <TabsTrigger value="members">Members</TabsTrigger>
566
+ <TabsTrigger value="projects">Projects</TabsTrigger>
567
+ </TabsList>
568
+ <TabsContent value="members">…</TabsContent>
569
+ <TabsContent value="projects">…</TabsContent>
570
+ </Tabs>;
571
+ ```
572
+
573
+ The vocabulary is Chakra's too — `value`/`defaultValue`/`onValueChange`, five
574
+ strip variants (`line`, `subtle`, `enclosed`, `outline`, `plain`), `size`,
575
+ `orientation`, `activationMode`, `fitted`, `lazyMount` — so a snippet from
576
+ their docs is the same tree with the dots removed. It supersedes core's tabs
577
+ the way `<Tree>` supersedes core's tree: the keyboard and RTL behaviour a
578
+ user has already learnt, without the items-array API. The one prop Chakra has
579
+ no counterpart for is `overflow`: a horizontal strip that runs out of room
580
+ puts the tabs that do not fit in a menu at its end rather than off its own
581
+ edge. [The reference](docs/components/tabs.md) has the rest.
582
+
476
583
  ## A drag-and-drop list
477
584
 
478
585
  `<ReorderList>` is a list the user reorders by dragging its items — or by
@@ -617,8 +724,8 @@ import {
617
724
  ```
618
725
 
619
726
  Editing is the full expected set: selection (keyboard and mouse, word and
620
- line variants), undo/redo with coalescing, X11 clipboard including PRIMARY
621
- and middle-click paste, auto-indent, Tab/Shift+Tab indentation, Ctrl+/
727
+ line variants), undo/redo with coalescing, the system clipboard — including
728
+ PRIMARY and middle-click paste on X11 — auto-indent, Tab/Shift+Tab indentation, Ctrl+/
622
729
  comment toggling, bracket matching, and LSP-shaped `diagnostics` squiggles.
623
730
  Escape then Tab leaves the field. Ctrl+Space asks for completions.
624
731
 
@@ -640,6 +747,48 @@ LSP `textDocument/completion` call, so a language-server client is "just
640
747
  another source". `npm run examples:code-editor` shows the three input-field
641
748
  use cases side by side.
642
749
 
750
+ ## The rich text editor
751
+
752
+ WYSIWYG editing — notes, comments, a chat composer, a document pane — with
753
+ markdown as the value unless you say otherwise:
754
+
755
+ ```jsx
756
+ import { RichTextEditor } from '@react-x11/components/rich-text-editor';
757
+
758
+ <RichTextEditor
759
+ defaultValue={note.body}
760
+ onChange={(ev) => save(ev.value)}
761
+ placeholder="Write something…"
762
+ toolbar
763
+ style={{ flexGrow: 1 }}
764
+ />;
765
+ ```
766
+
767
+ The model is [ProseMirror](https://prosemirror.net)'s — its schema,
768
+ transactions, commands and plugin system, unmodified — and the view is this
769
+ package's: blocks are `<box>` composition, every paragraph is a retained text
770
+ element that draws its own caret and selection band, and the object a plugin
771
+ is handed is an `EditorView` in everything but the DOM. So keymaps, input
772
+ rules, history and decoration plugins written for a browser run as they are;
773
+ the ones that reach into the DOM do not. The document is GFM — headings,
774
+ marks, links, nested and task lists, quotes, fenced code highlighted by the
775
+ same language seam as `<CodeEditor>`, tables — with the markdown shortcuts
776
+ people type anyway (`# `, `- `, `[ ] `, `**bold**`), undo, a clipboard that
777
+ pastes a web page as structure and the editor's own copies back whole, the
778
+ right-click edit menu, IME preedit at the caret, and Escape then Tab to leave.
779
+
780
+ The props are one element all the way up: `value` + `onChange` never mention
781
+ ProseMirror; `toolbar`, `placeholder`, `readOnly` and `submitOnEnter` are the
782
+ behaviours an app would otherwise wire by hand; `format="html"`, `markStyles`
783
+ and `nodeViews` change what the document is written in and how its parts
784
+ look; `plugins`, `editorProps` and `schema` are ProseMirror's own seams; and
785
+ `state` + `dispatchTransaction` hand the whole `EditorState` to the app. It is
786
+ imported from its subpath only — ProseMirror's declarations name DOM globals,
787
+ and the barrel would hand that to every app. `npm run examples:rich-text-editor`
788
+ shows a notes pane beside a chat composer.
789
+ [The reference](docs/components/rich-text-editor.md) has the props;
790
+ [the PRD](docs/prd-rich-text-editor.md) has the survey and the reasons.
791
+
643
792
  ## The graph editor
644
793
 
645
794
  A directed graph you can edit — a pipeline, a state machine, a dependency
@@ -857,6 +1006,71 @@ architecture.
857
1006
 
858
1007
  [mvt]: https://github.com/mapbox/vector-tile-spec
859
1008
 
1009
+ ## A 3D scene
1010
+
1011
+ A [react-three-fiber](https://docs.pmnd.rs/react-three-fiber)-shaped scene
1012
+ graph over core's `<glarea>`. There is no three.js and no WebGL underneath —
1013
+ the element names, the prop shapes, `attach`, dashed paths, `useFrame` /
1014
+ `useThree` and `extend()` follow r3f, and what differs is the pipeline.
1015
+
1016
+ ```jsx
1017
+ import { Canvas, useFrame } from '@react-x11/components/three';
1018
+
1019
+ <Canvas camera={{ position: [3, 3, 6], fov: 50 }} style={{ flexGrow: 1 }}>
1020
+ <ambientLight intensity={0.4} />
1021
+ <pointLight position={[5, 6, 6]} />
1022
+ <mesh position={[0, 0.5, 0]}>
1023
+ <boxGeometry args={[1, 1, 1]} />
1024
+ <meshStandardMaterial color="hotpink" />
1025
+ </mesh>
1026
+ </Canvas>;
1027
+ ```
1028
+
1029
+ This is the worked example at the top of this file of a boundary running
1030
+ _through_ a feature: `<glarea>` is a real GL surface created in the commit
1031
+ phase, which is renderer internals and stayed in core; the scene graph over it
1032
+ is composition, and it is here.
1033
+
1034
+ Which pipeline draws is the connection's business, not the scene's. **Indirect
1035
+ GLX** encodes GL 1.x into the X connection and survives a network hop, at the
1036
+ cost of shaders and post-processing — the protocol encodes neither. **Direct**
1037
+ rendering (the `x11-dri` addon: DRI3 on Linux, Apple-DRI under XQuartz, CGL
1038
+ into a CALayer on the native macOS backend) is OpenGL ES 2 on the GPU, and it
1039
+ is where `<shaderMaterial>` and `<effectComposer>` work. The same JSX renders
1040
+ on all of them; the two direct-only families throw at creation naming the
1041
+ reason rather than showing a blank surface, so a scene that would rather
1042
+ degrade can branch. [The reference](docs/components/three.md) is the table,
1043
+ including the JSX pragma the intrinsic element names want.
1044
+
1045
+ ## QML, without Qt
1046
+
1047
+ Qt's declarative UI language as an authoring layer — the parser, the reactive
1048
+ binding graph and the object model are this package's own, with zero
1049
+ dependencies and no Qt anywhere:
1050
+
1051
+ ```jsx
1052
+ import { QmlView } from '@react-x11/components/qml';
1053
+
1054
+ <QmlView
1055
+ source={`
1056
+ import QtQuick 2.15
1057
+ Rectangle {
1058
+ width: 300; height: 120; color: "#101418"
1059
+ property int count: 0
1060
+ Text { anchors.centerIn: parent; color: "white"; text: "clicks: " + count }
1061
+ MouseArea { anchors.fill: parent; onClicked: count++ }
1062
+ }
1063
+ `}
1064
+ />;
1065
+ ```
1066
+
1067
+ Everything visible is an ordinary `<box>`, `<text>` or `<image>` committed
1068
+ through the renderer, so theming, damage tracking, accessibility and the test
1069
+ harness all apply to QML content without knowing it is QML. It registers no
1070
+ host element; the one import-time side effect is populating the family's own
1071
+ QtQuick type registry, which touches no core state and shakes out with the
1072
+ family. [The reference](docs/components/qml.md) has the rest.
1073
+
860
1074
  ## The user's real calendar
861
1075
 
862
1076
  `<Calendar dayContent>` is the seam the desktop's own events hang off, and
@@ -901,9 +1115,9 @@ handed, so nothing sits between the two — **that string format is the whole
901
1115
  contract between the two packages**, and it is why the grid never had to know
902
1116
  what an event is.
903
1117
 
904
- This package shipped the D-Bus half until 0.4.0, as
1118
+ This package shipped the D-Bus half through 0.6.0, as
905
1119
  `@react-x11/components/desktop-calendar`. It moved to core in react-x11 2.9.1
906
- and the subpath is gone: a calendar is one of the things an app does _outside_
1120
+ and 0.7.0 deleted the subpath: a calendar is one of the things an app does _outside_
907
1121
  its own windows, like notifications, the tray and the file dialog, and every
908
1122
  one of those is a ladder in core with a freedesktop rung and a macOS one — the
909
1123
  macOS rung here reaches EventKit through `@windowkit/appkit`, which only core
@@ -924,6 +1138,12 @@ These two are the same component twice, and they are what core's `<foreign>`
924
1138
  element was added for: a react-x11 app can now **host** another X client
925
1139
  rather than only drawing its own pixels.
926
1140
 
1141
+ **Both are X11-only**, and the heading says why: an X client is what they
1142
+ host. macOS has no cross-process window embedding to build the same thing
1143
+ on, so on the Cocoa backend `<Terminal backend="vt">` is the terminal and
1144
+ `<MediaPlayer>` has no counterpart — see
1145
+ [Two backends](#two-backends-and-the-three-components-that-only-run-on-one).
1146
+
927
1147
  ```jsx
928
1148
  import { Terminal } from '@react-x11/components';
929
1149
 
@@ -993,9 +1213,10 @@ without an xterm in CI.
993
1213
 
994
1214
  One prop changes the terminal from a hosted X client into a native element: a
995
1215
  pty (through a pluggable `PtyHost`), [`@xterm/headless`][xterm-headless] as
996
- the escape-sequence state machine, and a cell-grid renderer that draws with
997
- XRender glyph runs into a retained offscreen surface, scrolls with a
998
- server-side copy, and coalesces onto react-x11's vblank-paced frame clock.
1216
+ the escape-sequence state machine, and a cell-grid renderer that draws glyph
1217
+ runs into a retained offscreen surface, scrolls it in place, and coalesces
1218
+ onto react-x11's frame clock. One renderer, both backends: XRender runs and a
1219
+ server-side copy on X11, CoreText runs into a CG bitmap on macOS.
999
1220
 
1000
1221
  ```jsx
1001
1222
  <Terminal
@@ -1056,8 +1277,8 @@ Keyboard, mouse and selection are what a terminal user expects: xterm-compatible
1056
1277
  key encoding (application cursor/keypad modes, the modifier parameter
1057
1278
  scheme, `Alt` as an ESC prefix), mouse reporting in the tracking mode the
1058
1279
  program asked for (with Shift as the universal "let me select instead"
1059
- override), char/word/line selection that publishes PRIMARY, middle-click
1060
- paste, Ctrl+Shift+C/V, bracketed paste, and OSC 52 clipboard **writes** —
1280
+ override), char/word/line selection that publishes PRIMARY on X11,
1281
+ middle-click paste, Ctrl+Shift+C/V, bracketed paste, and OSC 52 clipboard **writes** —
1061
1282
  never reads, which are answered with nothing whatever a program asks for.
1062
1283
 
1063
1284
  Escape arms one pass-through Tab, so the terminal is not a keyboard trap;
@@ -1125,7 +1346,11 @@ The same protocol as the two above, pointed the other way. `<Terminal>` and
1125
1346
  `<MediaPlayer>` spawn a program into a container they own; a tray is handed
1126
1347
  windows by applications that were already running, and the
1127
1348
  [system tray spec](http://specifications.freedesktop.org/systemtray/latest/)
1128
- is XEmbed's biggest surviving consumer.
1349
+ is XEmbed's biggest surviving consumer. **X11-only**, for the same reason the
1350
+ two above are: on the Cocoa backend there is no manager selection to take, so
1351
+ it reports `status: 'unavailable'` and renders `fallback` — the same posture
1352
+ it has against the headless test server. Putting an icon _in_ a Mac's status
1353
+ bar is the other direction and is core's `useTray()`.
1129
1354
 
1130
1355
  ```jsx
1131
1356
  import { TrayHost } from '@react-x11/components';
@@ -1180,13 +1405,26 @@ publish a tray icon over D-Bus, a complete panel supports both, and SNI
1180
1405
  shares nothing with this except intent — it belongs beside `<TrayHost>`
1181
1406
  rather than inside it.
1182
1407
 
1408
+ ## Applications built with react-x11
1409
+
1410
+ Both of these use this package as well as core, so they double as worked
1411
+ examples of its components inside a real program:
1412
+
1413
+ - **[react-x11-workbench](https://github.com/sidorares/react-x11-workbench)**
1414
+ (`@react-x11/workbench`) — a component workshop: develop, test and compare
1415
+ react-x11 components in isolation. It does the job Storybook does, for a
1416
+ toolkit with no browser to put an iframe in, and its sidebar is `<Tree>`.
1417
+ - **[x11-protocol-visualizer](https://github.com/sidorares/x11-protocol-visualizer)**
1418
+ (`x11vis`) — a man-in-the-middle X11 proxy with a live protocol inspector
1419
+ that decodes every request, reply, event and error down to the byte. Its
1420
+ own UI is built from `<Table>`, `<Tree>`, `<Tabs>`, `<Code>` and
1421
+ `<CodeEditor>`: an X11 client inspecting X11 clients — or, on macOS, drawn
1422
+ by AppKit through core's Cocoa backend.
1423
+
1183
1424
  ## Roadmap
1184
1425
 
1185
1426
  Candidates to move here:
1186
1427
 
1187
- - The 3D scene graph and a Three.js / react-three-fiber-shaped layer, with
1188
- `<glarea>` itself staying in core.
1189
- - `<Tabs>`, undecided — it may well stay in core.
1190
1428
  - The inline half of MDX — a component in the middle of a sentence, which is
1191
1429
  gated on a `<richtext>` run that can reserve advance width for an embedded
1192
1430
  element. Block-position components and expressions have shipped;
@@ -1196,8 +1434,14 @@ Candidates to move here:
1196
1434
  `dbusmenu.js`, and a complete panel wants both.
1197
1435
 
1198
1436
  `<Table>` above supersedes core's `<Table>` the way `<Tree>` supersedes
1199
- core's tree; whether core's remainder is stripped down or removed outright
1200
- is core's decision, still open — `docs/prd-table.md` records the contract.
1437
+ core's tree, and `<Tabs>` supersedes core's tabs the same way; whether core's
1438
+ remainder in each case is stripped down or removed outright is core's
1439
+ decision, still open — `docs/prd-table.md` records the table's contract.
1440
+
1441
+ The 3D scene graph landed while this list still called it a candidate:
1442
+ `@react-x11/components/three` is the react-three-fiber-shaped layer, and
1443
+ `<glarea>` stayed in core exactly as planned. That is the worked example at
1444
+ the top of this file of a boundary running _through_ a feature.
1201
1445
 
1202
1446
  `<Markdown>` above **replaces** core's ntk-backed `<markdown>` element, and
1203
1447
  `<Html>` now replaces `HtmlView` and core's `<html>` (ntk's document widgets
@@ -85,7 +85,7 @@ export declare class ChartPlotNode extends Node {
85
85
  private _layout;
86
86
  private _cachedSpec;
87
87
  private _cachedTheme;
88
- private _host;
88
+ private _renderHost;
89
89
  private _paintCtx;
90
90
  paint(ctx: Context2D): void;
91
91
  private _paintGridAndAxes;
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/charts/node.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,WAAW,CAAC;AAqBnB,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAc,MAAM,WAAW,CAAC;AAEvE,OAAO,KAAK,EAGV,QAAQ,EAIT,MAAM,aAAa,CAAC;AAIrB,wEAAwE;AACxE,eAAO,MAAM,OAAO,cAAc,CAAC;AAEnC;;sDAEsD;AACtD,MAAM,WAAW,eAAe;IAC9B,CAAC,CAA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C;CACF"}
@@ -455,7 +455,11 @@ export class ChartPlotNode extends Node {
455
455
  _cachedSpec;
456
456
  _cachedTheme;
457
457
  // --- render host ---------------------------------------------------------
458
- _host() {
458
+ // Not `_host`: core's `Node` sets a `_host` field on every node (react-x11
459
+ // 2.12 and later), and a field on the instance shadows a method of the
460
+ // same name — every chart threw in `paint`. `test/node-fields.test.ts`
461
+ // keeps the next such name from getting through.
462
+ _renderHost() {
459
463
  return {
460
464
  scatterGrid: (id, key, _n) => {
461
465
  let grid = this._scatterGrids.get(id);
@@ -549,7 +553,7 @@ export class ChartPlotNode extends Node {
549
553
  xScale: layout.xScale,
550
554
  yScale: layout.yScale,
551
555
  stats,
552
- host: this._host(),
556
+ host: this._renderHost(),
553
557
  scale: this._scale,
554
558
  };
555
559
  for (const geom of layout.geoms)