react-x11 2.15.3 → 2.16.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 (57) hide show
  1. package/README.md +37 -0
  2. package/package.json +3 -3
  3. package/src/Reconciler.js +85 -22
  4. package/src/anchor.js +60 -18
  5. package/src/capabilities.js +29 -4
  6. package/src/cocoa/app.js +15 -9
  7. package/src/cocoa/context2d.js +23 -0
  8. package/src/cocoa/fonts.js +78 -0
  9. package/src/cocoa/presenter.js +17 -0
  10. package/src/cocoa/promotion.js +20 -0
  11. package/src/cocoa/relaunch.js +8 -3
  12. package/src/cocoa/symbols.js +64 -0
  13. package/src/cocoa/threaded.js +24 -4
  14. package/src/cocoa/window.js +362 -139
  15. package/src/components/ProgressBar.js +1 -1
  16. package/src/components/Slider.js +72 -39
  17. package/src/components/anchor.js +7 -2
  18. package/src/components/index.js +1 -0
  19. package/src/components/theme.js +32 -28
  20. package/src/desktopcapabilityhooks.js +29 -6
  21. package/src/filedialoghooks.js +3 -5
  22. package/src/frame/childmain.js +8 -20
  23. package/src/frame/env.js +2 -10
  24. package/src/icontheme.js +240 -0
  25. package/src/imagesource.js +83 -1
  26. package/src/index.js +3 -0
  27. package/src/node.d.ts +7 -0
  28. package/src/nodes/animation.js +17 -47
  29. package/src/nodes/cascade.js +17 -2
  30. package/src/nodes/image.js +63 -1
  31. package/src/nodes/kinds.js +12 -0
  32. package/src/nodes/layout.js +5 -1
  33. package/src/nodes/node.js +17 -3
  34. package/src/nodes/paint.js +117 -0
  35. package/src/nodes/scope.js +259 -0
  36. package/src/nodes/scrollable.js +53 -6
  37. package/src/nodes/text.js +2 -0
  38. package/src/nodes/textarea.js +1 -1
  39. package/src/nodes/textinput.js +1 -1
  40. package/src/nodes/window/anchoring.js +45 -18
  41. package/src/nodes/window/flush.js +6 -5
  42. package/src/nodes/window/popup.js +10 -0
  43. package/src/nodes/window/size.js +40 -2
  44. package/src/nodes/window/window.js +41 -14
  45. package/src/registry.js +2 -1
  46. package/src/settings.js +332 -0
  47. package/src/statusnotifier.js +164 -17
  48. package/src/styles.js +212 -8
  49. package/src/symbols.js +200 -0
  50. package/src/testing/mock-app.js +10 -0
  51. package/src/trayhooks.js +21 -5
  52. package/src/types/capabilities.d.ts +13 -1
  53. package/src/types/components.d.ts +33 -0
  54. package/src/types/elements.d.ts +57 -6
  55. package/src/types/style.d.ts +57 -0
  56. package/src/types/system.d.ts +104 -0
  57. package/src/types/tray.d.ts +14 -2
@@ -7,8 +7,12 @@ import type { DesktopBackend, TrayFeatures } from './capabilities.js';
7
7
 
8
8
  export interface TrayClickEvent {
9
9
  button: 'left' | 'right' | 'middle';
10
- /** Where the click was, in global top-left screen coordinates the anchor
11
- * for a popup of your own. */
10
+ /** Where the click was: global top-left screen coordinates in **logical
11
+ * pixels**, the unit a `<popup>`'s `x`/`y` and `anchor={{ rect }}` take —
12
+ * the anchor for a popup of your own. The freedesktop protocol names no
13
+ * unit for its point and hosts differ, so there it is read against the
14
+ * monitors and the pointer; docs/desktop.md "The tray" says where that
15
+ * cannot tell. */
12
16
  x: number;
13
17
  y: number;
14
18
  /** The item's rect. `0` on the freedesktop rung, whose protocol has none —
@@ -73,6 +77,14 @@ export interface TrayState {
73
77
  * flips it back.
74
78
  */
75
79
  available: boolean;
80
+ /**
81
+ * Whether `available` is an answer yet: true on the first frame on macOS,
82
+ * where the status item is made there and then, and for `null` options;
83
+ * on the freedesktop tray, once the host has taken or refused the item. An
84
+ * app whose whole UI is its tray renders nothing until this, instead of a
85
+ * fallback window that flashes on every start.
86
+ */
87
+ settled: boolean;
76
88
  /** Which mechanism took it, or null. */
77
89
  backend: DesktopBackend | null;
78
90
  /** What that mechanism can do. Empty until `available` settles. */