react-x11 2.11.0 → 2.13.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 (100) hide show
  1. package/README.md +278 -129
  2. package/package.json +12 -4
  3. package/src/Reconciler.js +19 -31
  4. package/src/a11y.js +2 -2
  5. package/src/anchor.js +7 -5
  6. package/src/appcontext.js +59 -30
  7. package/src/bootstrap.js +14 -0
  8. package/src/clientmessage.js +1 -1
  9. package/src/cocoa/app.js +303 -49
  10. package/src/cocoa/bezels.js +175 -30
  11. package/src/cocoa/dnd.js +27 -13
  12. package/src/cocoa/fonts.js +3 -3
  13. package/src/cocoa/glarea.js +24 -5
  14. package/src/cocoa/main.d.ts +8 -0
  15. package/src/cocoa/main.js +43 -0
  16. package/src/cocoa/overlay.js +159 -0
  17. package/src/cocoa/panehost.js +15 -5
  18. package/src/cocoa/presenter.js +13 -9
  19. package/src/cocoa/promotion.js +17 -7
  20. package/src/cocoa/relaunch.js +207 -0
  21. package/src/cocoa/threaded.js +246 -0
  22. package/src/cocoa/window.js +256 -42
  23. package/src/components/Select.js +2 -2
  24. package/src/components/anchor.js +3 -3
  25. package/src/components/native.js +12 -7
  26. package/src/components/theme.js +2 -2
  27. package/src/debug.js +1 -1
  28. package/src/decorations.js +1 -1
  29. package/src/editmenu.js +2 -2
  30. package/src/embedding.js +31 -0
  31. package/src/errors.js +46 -0
  32. package/src/events.js +78 -18
  33. package/src/foreignnodes.js +59 -5
  34. package/src/frames.js +2 -2
  35. package/src/glnodes.js +172 -41
  36. package/src/gloverlay.js +383 -0
  37. package/src/grid.js +1653 -0
  38. package/src/host.d.ts +230 -1
  39. package/src/host.js +11 -3
  40. package/src/imagesource.js +1 -1
  41. package/src/index.d.ts +34 -4
  42. package/src/index.js +9 -1
  43. package/src/layouts.js +721 -0
  44. package/src/node.d.ts +16 -3
  45. package/src/node.js +19 -21
  46. package/src/nodes/animation.js +644 -0
  47. package/src/nodes/box.js +21 -0
  48. package/src/nodes/boxpaint.js +473 -0
  49. package/src/nodes/canvas.js +269 -0
  50. package/src/nodes/cascade.js +600 -0
  51. package/src/nodes/damage.js +183 -0
  52. package/src/nodes/edithistory.js +124 -0
  53. package/src/nodes/editmenupopup.js +260 -0
  54. package/src/nodes/hittest.js +185 -0
  55. package/src/nodes/image.js +266 -0
  56. package/src/nodes/install.js +75 -0
  57. package/src/nodes/invalidate.js +465 -0
  58. package/src/nodes/kinds.js +31 -0
  59. package/src/nodes/layout.js +439 -0
  60. package/src/nodes/layouthost.js +949 -0
  61. package/src/nodes/node.js +868 -0
  62. package/src/nodes/paint.js +466 -0
  63. package/src/nodes/position.js +366 -0
  64. package/src/nodes/preedit.js +127 -0
  65. package/src/nodes/queries.js +330 -0
  66. package/src/nodes/rects.js +102 -0
  67. package/src/nodes/scrollable.js +891 -0
  68. package/src/nodes/scrollbars.js +138 -0
  69. package/src/nodes/scrollblit.js +1034 -0
  70. package/src/nodes/selectable.js +142 -0
  71. package/src/nodes/styling.js +225 -0
  72. package/src/nodes/text.js +649 -0
  73. package/src/nodes/textarea.js +391 -0
  74. package/src/nodes/textinput.js +1146 -0
  75. package/src/nodes/util.js +17 -0
  76. package/src/nodes/window/anchoring.js +161 -0
  77. package/src/nodes/window/capabilities.js +190 -0
  78. package/src/nodes/window/debugpaint.js +83 -0
  79. package/src/nodes/window/droptarget.js +145 -0
  80. package/src/nodes/window/floors.js +577 -0
  81. package/src/nodes/window/flush.js +369 -0
  82. package/src/nodes/window/hints.js +482 -0
  83. package/src/nodes/window/listeners.js +222 -0
  84. package/src/nodes/window/popup.js +71 -0
  85. package/src/nodes/window/size.js +591 -0
  86. package/src/nodes/window/window.js +954 -0
  87. package/src/palette.js +1 -1
  88. package/src/registry.js +7 -3
  89. package/src/styles.js +137 -15
  90. package/src/svgnodes.js +2 -1
  91. package/src/testing/harness.js +2 -2
  92. package/src/textselection.js +5 -3
  93. package/src/trace-registry.js +1 -1
  94. package/src/types/components.d.ts +38 -6
  95. package/src/types/elements.d.ts +26 -14
  96. package/src/types/nodes.d.ts +17 -2
  97. package/src/types/style.d.ts +94 -3
  98. package/src/windowstate.js +1 -1
  99. package/src/yoga.js +1 -1
  100. package/src/nodes.js +0 -13120
package/src/node.d.ts CHANGED
@@ -504,8 +504,10 @@ export declare class Node {
504
504
  * An element whose node is one node never needs it; being painted at all
505
505
  * means it is inside the pass. An element that draws a **scene** into one
506
506
  * node culls against it the way core culls the tree, instead of redrawing
507
- * the scene into a clip that throws most of it away. Window coordinates,
508
- * the same space as `abs`; read-only.
507
+ * the scene into a clip that throws most of it away. Core counts a pixel
508
+ * short of the rect as inside it, for the antialiasing that inks just
509
+ * past a shape's bounds. Window coordinates, the same space as `abs`;
510
+ * read-only.
509
511
  */
510
512
  paintDamage(): Rect | null;
511
513
  /**
@@ -818,5 +820,16 @@ export declare class WindowNode extends Node {}
818
820
  export declare class PopupNode extends WindowNode {}
819
821
  /** The precedents for an element owning a real child X window — a surface of
820
822
  * its own, and one holding somebody else's window. */
821
- export declare class GlAreaNode extends Node {}
823
+ export declare class GlAreaNode extends Node {
824
+ /**
825
+ * `true`: the pointer over the surface is dispatched through the owning
826
+ * window's event manager, at this node, on this backend. So an element
827
+ * built on `<glarea>` must not listen for the pointer on `node.window` —
828
+ * on X11 that selects the event on the surface's own window, and X then
829
+ * delivers it there instead of to the tree. Readable without rendering,
830
+ * as `GlAreaNode.prototype.forwardsPointer`; absent on a core that does
831
+ * not deliver it.
832
+ */
833
+ readonly forwardsPointer: true;
834
+ }
822
835
  export declare class ForeignNode extends Node {}
package/src/node.js CHANGED
@@ -13,27 +13,25 @@
13
13
  // they run after the application's own handlers and not at all if one of
14
14
  // those called `preventDefault`, which is the ordering that makes an
15
15
  // interactive element composable rather than something to work around.
16
- export {
17
- Node,
18
- // `class MyPane extends Scrollable(Node)` the same mixin <box> and
19
- // <window> use, so a registered element can honour `overflow: 'scroll'`
20
- // with the wheel, the keys, the bars and the a11y role already wired.
21
- Scrollable,
22
- // The `measureContent` body of an element whose content has a size of its
23
- // own and an aspect ratio to keep — what <image> and <svg> answer with.
24
- intrinsicSize,
25
- // The cadence a caret blinks at, so an element that draws one is in step
26
- // with `<textinput>` rather than a few tens of milliseconds beside it.
27
- CARET_BLINK_MS,
28
- BoxNode,
29
- TextNode,
30
- ImageNode,
31
- CanvasNode,
32
- TextInputNode,
33
- TextAreaNode,
34
- WindowNode,
35
- PopupNode,
36
- } from './nodes.js';
16
+ export { Node } from './nodes/node.js';
17
+ // `class MyPane extends Scrollable(Node)` — the same mixin <box> and
18
+ // <window> use, so a registered element can honour `overflow: 'scroll'`
19
+ // with the wheel, the keys, the bars and the a11y role already wired.
20
+ export { Scrollable } from './nodes/scrollable.js';
21
+ // The `measureContent` body of an element whose content has a size of its
22
+ // own and an aspect ratio to keep what <image> and <svg> answer with.
23
+ export { intrinsicSize } from './nodes/layout.js';
24
+ // The cadence a caret blinks at, so an element that draws one is in step
25
+ // with `<textinput>` rather than a few tens of milliseconds beside it.
26
+ export { CARET_BLINK_MS } from './nodes/textinput.js';
27
+ export { BoxNode } from './nodes/box.js';
28
+ export { TextNode } from './nodes/text.js';
29
+ export { ImageNode } from './nodes/image.js';
30
+ export { CanvasNode } from './nodes/canvas.js';
31
+ export { TextInputNode } from './nodes/textinput.js';
32
+ export { TextAreaNode } from './nodes/textarea.js';
33
+ export { WindowNode } from './nodes/window/window.js';
34
+ export { PopupNode } from './nodes/window/popup.js';
37
35
 
38
36
  // The two precedents for an element that owns a real child X window rather
39
37
  // than painting into its parent's: registered with `drawn: false`, realized