react-native-gtkx 0.1.0-alpha.3 → 0.2.0-alpha.1

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 (193) hide show
  1. package/README.md +41 -3
  2. package/dist/adw/index.d.ts +3 -0
  3. package/dist/adw/index.js +41 -0
  4. package/dist/adw/index.js.map +1 -0
  5. package/dist/adw/widgets.generated.d.ts +63 -0
  6. package/dist/adw/widgets.generated.js +125 -0
  7. package/dist/adw/widgets.generated.js.map +1 -0
  8. package/dist/animated/create-animated.js +1 -1
  9. package/dist/animated/create-animated.js.map +1 -1
  10. package/dist/animated/index.js +3 -3
  11. package/dist/animated/index.js.map +1 -1
  12. package/dist/common/content.d.ts +69 -0
  13. package/dist/common/content.js +84 -0
  14. package/dist/common/content.js.map +1 -0
  15. package/dist/common/index.d.ts +3 -0
  16. package/dist/common/index.js +19 -0
  17. package/dist/common/index.js.map +1 -0
  18. package/dist/common/navigation-stack.d.ts +84 -0
  19. package/dist/common/navigation-stack.js +313 -0
  20. package/dist/common/navigation-stack.js.map +1 -0
  21. package/dist/common/widget.d.ts +83 -0
  22. package/dist/common/widget.js +142 -0
  23. package/dist/common/widget.js.map +1 -0
  24. package/dist/components/animated.d.ts +3 -2
  25. package/dist/components/animated.js +85 -66
  26. package/dist/components/animated.js.map +1 -1
  27. package/dist/components/app-registry.d.ts +10 -1
  28. package/dist/components/app-registry.js +8 -3
  29. package/dist/components/app-registry.js.map +1 -1
  30. package/dist/components/pressable.js +109 -16
  31. package/dist/components/pressable.js.map +1 -1
  32. package/dist/components/rect-store.d.ts +11 -1
  33. package/dist/components/rect-store.js +27 -3
  34. package/dist/components/rect-store.js.map +1 -1
  35. package/dist/components/svg/animated-support.d.ts +19 -0
  36. package/dist/components/svg/animated-support.js +64 -0
  37. package/dist/components/svg/animated-support.js.map +1 -0
  38. package/dist/components/svg/context.d.ts +8 -0
  39. package/dist/components/svg/context.js +15 -0
  40. package/dist/components/svg/context.js.map +1 -0
  41. package/dist/components/svg/gradients.d.ts +31 -0
  42. package/dist/components/svg/gradients.js +93 -0
  43. package/dist/components/svg/gradients.js.map +1 -0
  44. package/dist/components/svg/group.d.ts +8 -0
  45. package/dist/components/svg/group.js +30 -0
  46. package/dist/components/svg/group.js.map +1 -0
  47. package/dist/components/svg/index.d.ts +6 -0
  48. package/dist/components/svg/index.js +5 -0
  49. package/dist/components/svg/index.js.map +1 -0
  50. package/dist/components/svg/node.d.ts +7 -0
  51. package/dist/components/svg/node.js +7 -0
  52. package/dist/components/svg/node.js.map +1 -0
  53. package/dist/components/svg/paint.d.ts +24 -0
  54. package/dist/components/svg/paint.js +57 -0
  55. package/dist/components/svg/paint.js.map +1 -0
  56. package/dist/components/svg/shapes.d.ts +47 -0
  57. package/dist/components/svg/shapes.js +51 -0
  58. package/dist/components/svg/shapes.js.map +1 -0
  59. package/dist/components/svg/svg.d.ts +14 -0
  60. package/dist/components/svg/svg.js +48 -0
  61. package/dist/components/svg/svg.js.map +1 -0
  62. package/dist/components/svg/use-shape-node.d.ts +12 -0
  63. package/dist/components/svg/use-shape-node.js +52 -0
  64. package/dist/components/svg/use-shape-node.js.map +1 -0
  65. package/dist/components/text-input.js +3 -2
  66. package/dist/components/text-input.js.map +1 -1
  67. package/dist/components/text.js +11 -2
  68. package/dist/components/text.js.map +1 -1
  69. package/dist/components/use-layout-child.js +47 -4
  70. package/dist/components/use-layout-child.js.map +1 -1
  71. package/dist/contracts.d.ts +12 -1
  72. package/dist/contracts.js +2 -3
  73. package/dist/contracts.js.map +1 -1
  74. package/dist/gtk/index.d.ts +6 -0
  75. package/dist/gtk/index.js +39 -0
  76. package/dist/gtk/index.js.map +1 -0
  77. package/dist/gtk/widgets.generated.d.ts +103 -0
  78. package/dist/gtk/widgets.generated.js +206 -0
  79. package/dist/gtk/widgets.generated.js.map +1 -0
  80. package/dist/gtkx/bridge/index.d.ts +9 -4
  81. package/dist/gtkx/bridge/index.js +41 -5
  82. package/dist/gtkx/bridge/index.js.map +1 -1
  83. package/dist/gtkx/bridge/layout-manager.d.ts +2 -1
  84. package/dist/gtkx/bridge/layout-manager.js +31 -9
  85. package/dist/gtkx/bridge/layout-manager.js.map +1 -1
  86. package/dist/gtkx/bridge/svg-node.d.ts +79 -0
  87. package/dist/gtkx/bridge/svg-node.js +367 -0
  88. package/dist/gtkx/bridge/svg-node.js.map +1 -0
  89. package/dist/gtkx/bridge/theme.js +1 -1
  90. package/dist/gtkx/bridge/theme.js.map +1 -1
  91. package/dist/gtkx/bridge/use-signal.js +21 -10
  92. package/dist/gtkx/bridge/use-signal.js.map +1 -1
  93. package/dist/gtkx/bridge/widgets.generated.d.ts +2 -0
  94. package/dist/gtkx/bridge/widgets.generated.js +14 -0
  95. package/dist/gtkx/bridge/widgets.generated.js.map +1 -0
  96. package/dist/index.js +1 -1
  97. package/dist/index.js.map +1 -1
  98. package/dist/mcp/bin.d.ts +2 -0
  99. package/dist/mcp/bin.js +17 -0
  100. package/dist/mcp/bin.js.map +1 -0
  101. package/dist/mcp/data/generated.d.ts +1282 -0
  102. package/dist/mcp/data/generated.js +1148 -0
  103. package/dist/mcp/data/generated.js.map +1 -0
  104. package/dist/mcp/index.d.ts +5 -0
  105. package/dist/mcp/index.js +9 -0
  106. package/dist/mcp/index.js.map +1 -0
  107. package/dist/mcp/list.d.ts +4 -0
  108. package/dist/mcp/list.js +56 -0
  109. package/dist/mcp/list.js.map +1 -0
  110. package/dist/mcp/resolve.d.ts +55 -0
  111. package/dist/mcp/resolve.js +151 -0
  112. package/dist/mcp/resolve.js.map +1 -0
  113. package/dist/mcp/search.d.ts +13 -0
  114. package/dist/mcp/search.js +48 -0
  115. package/dist/mcp/search.js.map +1 -0
  116. package/dist/mcp/server.d.ts +7 -0
  117. package/dist/mcp/server.js +135 -0
  118. package/dist/mcp/server.js.map +1 -0
  119. package/dist/mcp/tool.d.ts +21 -0
  120. package/dist/mcp/tool.js +36 -0
  121. package/dist/mcp/tool.js.map +1 -0
  122. package/dist/metro/index.js +10 -0
  123. package/dist/metro/index.js.map +1 -1
  124. package/dist/navigation/index.d.ts +50 -13
  125. package/dist/navigation/index.js +183 -148
  126. package/dist/navigation/index.js.map +1 -1
  127. package/dist/navigation/option-warnings.js +9 -1
  128. package/dist/navigation/option-warnings.js.map +1 -1
  129. package/dist/navigation/sidebar.d.ts +177 -9
  130. package/dist/navigation/sidebar.js +284 -10
  131. package/dist/navigation/sidebar.js.map +1 -1
  132. package/dist/runner/index.d.ts +22 -2
  133. package/dist/runner/index.js +163 -12
  134. package/dist/runner/index.js.map +1 -1
  135. package/dist/sea/assemble.d.ts +29 -0
  136. package/dist/sea/assemble.js +129 -0
  137. package/dist/sea/assemble.js.map +1 -0
  138. package/dist/sea/bundle.d.ts +61 -0
  139. package/dist/sea/bundle.js +202 -0
  140. package/dist/sea/bundle.js.map +1 -0
  141. package/dist/sea/gtkx-config-module.d.ts +18 -0
  142. package/dist/sea/gtkx-config-module.js +67 -0
  143. package/dist/sea/gtkx-config-module.js.map +1 -0
  144. package/dist/sea/native-shim.d.ts +40 -0
  145. package/dist/sea/native-shim.js +121 -0
  146. package/dist/sea/native-shim.js.map +1 -0
  147. package/dist/sea/react-anchor-plugin.d.ts +2 -0
  148. package/dist/sea/react-anchor-plugin.js +30 -0
  149. package/dist/sea/react-anchor-plugin.js.map +1 -0
  150. package/dist/style/colors.js +3 -1
  151. package/dist/style/colors.js.map +1 -1
  152. package/dist/style/index.d.ts +1 -0
  153. package/dist/style/index.js +3 -2
  154. package/dist/style/index.js.map +1 -1
  155. package/dist/style/registry.gtkx.js +1 -1
  156. package/dist/style/registry.gtkx.js.map +1 -1
  157. package/dist/style/split-style.js +3 -3
  158. package/dist/style/split-style.js.map +1 -1
  159. package/dist/style/text-align.js +1 -1
  160. package/dist/style/text-align.js.map +1 -1
  161. package/dist/style/transform.d.ts +22 -0
  162. package/dist/style/transform.js +137 -0
  163. package/dist/style/transform.js.map +1 -0
  164. package/dist/style/visual-css.js +3 -2
  165. package/dist/style/visual-css.js.map +1 -1
  166. package/dist/svg/geometry.d.ts +19 -0
  167. package/dist/svg/geometry.js +80 -0
  168. package/dist/svg/geometry.js.map +1 -0
  169. package/dist/svg/gradient-geometry.d.ts +15 -0
  170. package/dist/svg/gradient-geometry.js +18 -0
  171. package/dist/svg/gradient-geometry.js.map +1 -0
  172. package/dist/svg/transform.d.ts +22 -0
  173. package/dist/svg/transform.js +74 -0
  174. package/dist/svg/transform.js.map +1 -0
  175. package/dist/svg/view-box.d.ts +34 -0
  176. package/dist/svg/view-box.js +108 -0
  177. package/dist/svg/view-box.js.map +1 -0
  178. package/dist/svg-compat/index.d.ts +1 -0
  179. package/dist/svg-compat/index.js +16 -0
  180. package/dist/svg-compat/index.js.map +1 -0
  181. package/dist/testing/index.d.ts +14 -0
  182. package/dist/testing/index.js +14 -0
  183. package/dist/testing/index.js.map +1 -0
  184. package/dist/vite/index.d.ts +7 -3
  185. package/dist/vite/index.js +16 -3
  186. package/dist/vite/index.js.map +1 -1
  187. package/dist/vitest/index.d.ts +52 -0
  188. package/dist/vitest/index.js +58 -0
  189. package/dist/vitest/index.js.map +1 -0
  190. package/dist/vitest/setup.d.ts +4 -0
  191. package/dist/vitest/setup.js +22 -0
  192. package/dist/vitest/setup.js.map +1 -0
  193. package/package.json +47 -8
@@ -0,0 +1,206 @@
1
+ // GENERATED FILE — do not edit by hand.
2
+ // Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM
3
+ // after `npm run codegen` picks up a gtkx update; see
4
+ // scripts/widget-surface/classification.json for the full classification
5
+ // and .claude/epics/widget-surface/ for the rules behind it.
6
+ //
7
+ // Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and
8
+ // renders bare outside RN layout (see wrapReactNative in ../common/widget).
9
+ // Raw: toplevels and child-only widgets, where a wrapper box would be
10
+ // invalid GTK rather than a convenience — exported as gtkx binds them, same
11
+ // as the hand-picked ones were before this file existed.
12
+ import { wrapReactNative } from "../common/widget";
13
+ import { GtkActionBar as RawGtkActionBar, GtkAppChooserButton as RawGtkAppChooserButton, GtkAppChooserWidget as RawGtkAppChooserWidget, GtkAspectFrame as RawGtkAspectFrame, GtkBox as RawGtkBox, GtkButton as RawGtkButton, GtkCalendar as RawGtkCalendar, GtkCellView as RawGtkCellView, GtkCenterBox as RawGtkCenterBox, GtkCheckButton as RawGtkCheckButton, GtkColorButton as RawGtkColorButton, GtkColorChooserWidget as RawGtkColorChooserWidget, GtkColorDialogButton as RawGtkColorDialogButton, GtkColumnView as RawGtkColumnView, GtkComboBox as RawGtkComboBox, GtkComboBoxText as RawGtkComboBoxText, GtkDragIcon as RawGtkDragIcon, GtkDrawingArea as RawGtkDrawingArea, GtkDropDown as RawGtkDropDown, GtkEditableLabel as RawGtkEditableLabel, GtkEmojiChooser as RawGtkEmojiChooser, GtkEntry as RawGtkEntry, GtkExpander as RawGtkExpander, GtkFileChooserWidget as RawGtkFileChooserWidget, GtkFixed as RawGtkFixed, GtkFlowBox as RawGtkFlowBox, GtkFontButton as RawGtkFontButton, GtkFontChooserWidget as RawGtkFontChooserWidget, GtkFontDialogButton as RawGtkFontDialogButton, GtkFrame as RawGtkFrame, GtkGLArea as RawGtkGLArea, GtkGraphicsOffload as RawGtkGraphicsOffload, GtkGrid as RawGtkGrid, GtkGridView as RawGtkGridView, GtkHeaderBar as RawGtkHeaderBar, GtkIconView as RawGtkIconView, GtkImage as RawGtkImage, GtkInfoBar as RawGtkInfoBar, GtkInscription as RawGtkInscription, GtkLabel as RawGtkLabel, GtkLevelBar as RawGtkLevelBar, GtkLinkButton as RawGtkLinkButton, GtkListBox as RawGtkListBox, GtkListView as RawGtkListView, GtkLockButton as RawGtkLockButton, GtkMediaControls as RawGtkMediaControls, GtkMenuButton as RawGtkMenuButton, GtkNotebook as RawGtkNotebook, GtkOverlay as RawGtkOverlay, GtkPaned as RawGtkPaned, GtkPasswordEntry as RawGtkPasswordEntry, GtkPicture as RawGtkPicture, GtkPopover as RawGtkPopover, GtkPopoverBin as RawGtkPopoverBin, GtkPopoverMenu as RawGtkPopoverMenu, GtkPopoverMenuBar as RawGtkPopoverMenuBar, GtkProgressBar as RawGtkProgressBar, GtkRange as RawGtkRange, GtkRevealer as RawGtkRevealer, GtkScale as RawGtkScale, GtkScaleButton as RawGtkScaleButton, GtkScrollbar as RawGtkScrollbar, GtkScrolledWindow as RawGtkScrolledWindow, GtkSearchBar as RawGtkSearchBar, GtkSearchEntry as RawGtkSearchEntry, GtkSeparator as RawGtkSeparator, GtkShortcutLabel as RawGtkShortcutLabel, GtkShortcutsGroup as RawGtkShortcutsGroup, GtkShortcutsSection as RawGtkShortcutsSection, GtkShortcutsShortcut as RawGtkShortcutsShortcut, GtkSpinButton as RawGtkSpinButton, GtkSpinner as RawGtkSpinner, GtkStack as RawGtkStack, GtkStackSidebar as RawGtkStackSidebar, GtkStackSwitcher as RawGtkStackSwitcher, GtkStatusbar as RawGtkStatusbar, GtkSwitch as RawGtkSwitch, GtkText as RawGtkText, GtkTextView as RawGtkTextView, GtkToggleButton as RawGtkToggleButton, GtkTreeExpander as RawGtkTreeExpander, GtkTreeView as RawGtkTreeView, GtkVideo as RawGtkVideo, GtkViewport as RawGtkViewport, GtkVolumeButton as RawGtkVolumeButton, GtkWindowControls as RawGtkWindowControls, GtkWindowHandle as RawGtkWindowHandle, } from "../gtkx/bridge/widgets.generated";
14
+ export const GtkActionBar = wrapReactNative(RawGtkActionBar);
15
+ export const GtkAppChooserButton = wrapReactNative(RawGtkAppChooserButton);
16
+ export const GtkAppChooserWidget = wrapReactNative(RawGtkAppChooserWidget);
17
+ export const GtkAspectFrame = wrapReactNative(RawGtkAspectFrame);
18
+ export const GtkBox = wrapReactNative(RawGtkBox);
19
+ export const GtkButton = wrapReactNative(RawGtkButton);
20
+ export const GtkCalendar = wrapReactNative(RawGtkCalendar);
21
+ export const GtkCellView = wrapReactNative(RawGtkCellView);
22
+ export const GtkCenterBox = wrapReactNative(RawGtkCenterBox);
23
+ export const GtkCheckButton = wrapReactNative(RawGtkCheckButton);
24
+ export const GtkColorButton = wrapReactNative(RawGtkColorButton);
25
+ export const GtkColorChooserWidget = wrapReactNative(RawGtkColorChooserWidget);
26
+ export const GtkColorDialogButton = wrapReactNative(RawGtkColorDialogButton);
27
+ export const GtkColumnView = wrapReactNative(RawGtkColumnView);
28
+ export const GtkComboBox = wrapReactNative(RawGtkComboBox);
29
+ export const GtkComboBoxText = wrapReactNative(RawGtkComboBoxText);
30
+ export const GtkDragIcon = wrapReactNative(RawGtkDragIcon);
31
+ export const GtkDrawingArea = wrapReactNative(RawGtkDrawingArea);
32
+ export const GtkDropDown = wrapReactNative(RawGtkDropDown);
33
+ export const GtkEditableLabel = wrapReactNative(RawGtkEditableLabel);
34
+ export const GtkEmojiChooser = wrapReactNative(RawGtkEmojiChooser);
35
+ export const GtkEntry = wrapReactNative(RawGtkEntry);
36
+ export const GtkExpander = wrapReactNative(RawGtkExpander);
37
+ export const GtkFileChooserWidget = wrapReactNative(RawGtkFileChooserWidget);
38
+ export const GtkFixed = wrapReactNative(RawGtkFixed);
39
+ export const GtkFlowBox = wrapReactNative(RawGtkFlowBox);
40
+ export const GtkFontButton = wrapReactNative(RawGtkFontButton);
41
+ export const GtkFontChooserWidget = wrapReactNative(RawGtkFontChooserWidget);
42
+ export const GtkFontDialogButton = wrapReactNative(RawGtkFontDialogButton);
43
+ export const GtkFrame = wrapReactNative(RawGtkFrame);
44
+ export const GtkGLArea = wrapReactNative(RawGtkGLArea);
45
+ export const GtkGraphicsOffload = wrapReactNative(RawGtkGraphicsOffload);
46
+ export const GtkGrid = wrapReactNative(RawGtkGrid);
47
+ export const GtkGridView = wrapReactNative(RawGtkGridView);
48
+ export const GtkHeaderBar = wrapReactNative(RawGtkHeaderBar);
49
+ export const GtkIconView = wrapReactNative(RawGtkIconView);
50
+ export const GtkImage = wrapReactNative(RawGtkImage);
51
+ export const GtkInfoBar = wrapReactNative(RawGtkInfoBar);
52
+ export const GtkInscription = wrapReactNative(RawGtkInscription);
53
+ export const GtkLabel = wrapReactNative(RawGtkLabel);
54
+ export const GtkLevelBar = wrapReactNative(RawGtkLevelBar);
55
+ export const GtkLinkButton = wrapReactNative(RawGtkLinkButton);
56
+ export const GtkListBox = wrapReactNative(RawGtkListBox);
57
+ export const GtkListView = wrapReactNative(RawGtkListView);
58
+ export const GtkLockButton = wrapReactNative(RawGtkLockButton);
59
+ export const GtkMediaControls = wrapReactNative(RawGtkMediaControls);
60
+ export const GtkMenuButton = wrapReactNative(RawGtkMenuButton);
61
+ export const GtkNotebook = wrapReactNative(RawGtkNotebook);
62
+ export const GtkOverlay = wrapReactNative(RawGtkOverlay);
63
+ export const GtkPaned = wrapReactNative(RawGtkPaned);
64
+ export const GtkPasswordEntry = wrapReactNative(RawGtkPasswordEntry);
65
+ export const GtkPicture = wrapReactNative(RawGtkPicture);
66
+ export const GtkPopover = wrapReactNative(RawGtkPopover);
67
+ export const GtkPopoverBin = wrapReactNative(RawGtkPopoverBin);
68
+ export const GtkPopoverMenu = wrapReactNative(RawGtkPopoverMenu);
69
+ export const GtkPopoverMenuBar = wrapReactNative(RawGtkPopoverMenuBar);
70
+ export const GtkProgressBar = wrapReactNative(RawGtkProgressBar);
71
+ export const GtkRange = wrapReactNative(RawGtkRange);
72
+ export const GtkRevealer = wrapReactNative(RawGtkRevealer);
73
+ export const GtkScale = wrapReactNative(RawGtkScale);
74
+ export const GtkScaleButton = wrapReactNative(RawGtkScaleButton);
75
+ export const GtkScrollbar = wrapReactNative(RawGtkScrollbar);
76
+ export const GtkScrolledWindow = wrapReactNative(RawGtkScrolledWindow);
77
+ export const GtkSearchBar = wrapReactNative(RawGtkSearchBar);
78
+ export const GtkSearchEntry = wrapReactNative(RawGtkSearchEntry);
79
+ export const GtkSeparator = wrapReactNative(RawGtkSeparator);
80
+ export const GtkShortcutLabel = wrapReactNative(RawGtkShortcutLabel);
81
+ export const GtkShortcutsGroup = wrapReactNative(RawGtkShortcutsGroup);
82
+ export const GtkShortcutsSection = wrapReactNative(RawGtkShortcutsSection);
83
+ export const GtkShortcutsShortcut = wrapReactNative(RawGtkShortcutsShortcut);
84
+ export const GtkSpinButton = wrapReactNative(RawGtkSpinButton);
85
+ export const GtkSpinner = wrapReactNative(RawGtkSpinner);
86
+ export const GtkStack = wrapReactNative(RawGtkStack);
87
+ export const GtkStackSidebar = wrapReactNative(RawGtkStackSidebar);
88
+ export const GtkStackSwitcher = wrapReactNative(RawGtkStackSwitcher);
89
+ export const GtkStatusbar = wrapReactNative(RawGtkStatusbar);
90
+ export const GtkSwitch = wrapReactNative(RawGtkSwitch);
91
+ export const GtkText = wrapReactNative(RawGtkText);
92
+ export const GtkTextView = wrapReactNative(RawGtkTextView);
93
+ export const GtkToggleButton = wrapReactNative(RawGtkToggleButton);
94
+ export const GtkTreeExpander = wrapReactNative(RawGtkTreeExpander);
95
+ export const GtkTreeView = wrapReactNative(RawGtkTreeView);
96
+ export const GtkVideo = wrapReactNative(RawGtkVideo);
97
+ export const GtkViewport = wrapReactNative(RawGtkViewport);
98
+ export const GtkVolumeButton = wrapReactNative(RawGtkVolumeButton);
99
+ export const GtkWindowControls = wrapReactNative(RawGtkWindowControls);
100
+ export const GtkWindowHandle = wrapReactNative(RawGtkWindowHandle);
101
+ export { GtkAboutDialog, // toplevel (derives Gtk.Window)
102
+ GtkAppChooserDialog, // toplevel (derives Gtk.Window)
103
+ GtkApplicationWindow, // toplevel (derives Gtk.Window)
104
+ GtkAssistant, // toplevel (derives Gtk.Window)
105
+ GtkColorChooserDialog, // toplevel (derives Gtk.Window)
106
+ GtkDialog, // toplevel (derives Gtk.Window)
107
+ GtkFileChooserDialog, // toplevel (derives Gtk.Window)
108
+ GtkFlowBoxChild, // child-only (derives Gtk.FlowBoxChild)
109
+ GtkFontChooserDialog, // toplevel (derives Gtk.Window)
110
+ GtkListBoxRow, // child-only (derives Gtk.ListBoxRow)
111
+ GtkMessageDialog, // toplevel (derives Gtk.Window)
112
+ GtkPageSetupUnixDialog, // toplevel (derives Gtk.Window)
113
+ GtkPrintUnixDialog, // toplevel (derives Gtk.Window)
114
+ GtkShortcutsWindow, // toplevel (derives Gtk.Window)
115
+ GtkWindow, // toplevel (derives Gtk.Window)
116
+ } from "../gtkx/bridge/widgets.generated";
117
+ export const GTK_WRAPPED_WIDGET_NAMES = [
118
+ "GtkActionBar",
119
+ "GtkAppChooserButton",
120
+ "GtkAppChooserWidget",
121
+ "GtkAspectFrame",
122
+ "GtkBox",
123
+ "GtkButton",
124
+ "GtkCalendar",
125
+ "GtkCellView",
126
+ "GtkCenterBox",
127
+ "GtkCheckButton",
128
+ "GtkColorButton",
129
+ "GtkColorChooserWidget",
130
+ "GtkColorDialogButton",
131
+ "GtkColumnView",
132
+ "GtkComboBox",
133
+ "GtkComboBoxText",
134
+ "GtkDragIcon",
135
+ "GtkDrawingArea",
136
+ "GtkDropDown",
137
+ "GtkEditableLabel",
138
+ "GtkEmojiChooser",
139
+ "GtkEntry",
140
+ "GtkExpander",
141
+ "GtkFileChooserWidget",
142
+ "GtkFixed",
143
+ "GtkFlowBox",
144
+ "GtkFontButton",
145
+ "GtkFontChooserWidget",
146
+ "GtkFontDialogButton",
147
+ "GtkFrame",
148
+ "GtkGLArea",
149
+ "GtkGraphicsOffload",
150
+ "GtkGrid",
151
+ "GtkGridView",
152
+ "GtkHeaderBar",
153
+ "GtkIconView",
154
+ "GtkImage",
155
+ "GtkInfoBar",
156
+ "GtkInscription",
157
+ "GtkLabel",
158
+ "GtkLevelBar",
159
+ "GtkLinkButton",
160
+ "GtkListBox",
161
+ "GtkListView",
162
+ "GtkLockButton",
163
+ "GtkMediaControls",
164
+ "GtkMenuButton",
165
+ "GtkNotebook",
166
+ "GtkOverlay",
167
+ "GtkPaned",
168
+ "GtkPasswordEntry",
169
+ "GtkPicture",
170
+ "GtkPopover",
171
+ "GtkPopoverBin",
172
+ "GtkPopoverMenu",
173
+ "GtkPopoverMenuBar",
174
+ "GtkProgressBar",
175
+ "GtkRange",
176
+ "GtkRevealer",
177
+ "GtkScale",
178
+ "GtkScaleButton",
179
+ "GtkScrollbar",
180
+ "GtkScrolledWindow",
181
+ "GtkSearchBar",
182
+ "GtkSearchEntry",
183
+ "GtkSeparator",
184
+ "GtkShortcutLabel",
185
+ "GtkShortcutsGroup",
186
+ "GtkShortcutsSection",
187
+ "GtkShortcutsShortcut",
188
+ "GtkSpinButton",
189
+ "GtkSpinner",
190
+ "GtkStack",
191
+ "GtkStackSidebar",
192
+ "GtkStackSwitcher",
193
+ "GtkStatusbar",
194
+ "GtkSwitch",
195
+ "GtkText",
196
+ "GtkTextView",
197
+ "GtkToggleButton",
198
+ "GtkTreeExpander",
199
+ "GtkTreeView",
200
+ "GtkVideo",
201
+ "GtkViewport",
202
+ "GtkVolumeButton",
203
+ "GtkWindowControls",
204
+ "GtkWindowHandle",
205
+ ];
206
+ //# sourceMappingURL=widgets.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../src/gtk/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,4EAA4E;AAC5E,yDAAyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,YAAY,IAAI,eAAe,EAC/B,mBAAmB,IAAI,sBAAsB,EAC7C,mBAAmB,IAAI,sBAAsB,EAC7C,cAAc,IAAI,iBAAiB,EACnC,MAAM,IAAI,SAAS,EACnB,SAAS,IAAI,YAAY,EACzB,WAAW,IAAI,cAAc,EAC7B,WAAW,IAAI,cAAc,EAC7B,YAAY,IAAI,eAAe,EAC/B,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,qBAAqB,IAAI,wBAAwB,EACjD,oBAAoB,IAAI,uBAAuB,EAC/C,aAAa,IAAI,gBAAgB,EAC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;IACb,gBAAgB;IAChB,aAAa;IACb,kBAAkB;IAClB,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,sBAAsB;IACtB,UAAU;IACV,YAAY;IACZ,eAAe;IACf,sBAAsB;IACtB,qBAAqB;IACrB,UAAU;IACV,WAAW;IACX,oBAAoB;IACpB,SAAS;IACT,aAAa;IACb,cAAc;IACd,aAAa;IACb,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,eAAe;IACf,YAAY;IACZ,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,YAAY;IACZ,UAAU;IACV,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,YAAY;IACZ,UAAU;IACV,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,WAAW;IACX,SAAS;IACT,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,aAAa;IACb,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;CACT,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and\n// renders bare outside RN layout (see wrapReactNative in ../common/widget).\n// Raw: toplevels and child-only widgets, where a wrapper box would be\n// invalid GTK rather than a convenience — exported as gtkx binds them, same\n// as the hand-picked ones were before this file existed.\n\nimport { wrapReactNative } from \"../common/widget\"\nimport {\n GtkActionBar as RawGtkActionBar,\n GtkAppChooserButton as RawGtkAppChooserButton,\n GtkAppChooserWidget as RawGtkAppChooserWidget,\n GtkAspectFrame as RawGtkAspectFrame,\n GtkBox as RawGtkBox,\n GtkButton as RawGtkButton,\n GtkCalendar as RawGtkCalendar,\n GtkCellView as RawGtkCellView,\n GtkCenterBox as RawGtkCenterBox,\n GtkCheckButton as RawGtkCheckButton,\n GtkColorButton as RawGtkColorButton,\n GtkColorChooserWidget as RawGtkColorChooserWidget,\n GtkColorDialogButton as RawGtkColorDialogButton,\n GtkColumnView as RawGtkColumnView,\n GtkComboBox as RawGtkComboBox,\n GtkComboBoxText as RawGtkComboBoxText,\n GtkDragIcon as RawGtkDragIcon,\n GtkDrawingArea as RawGtkDrawingArea,\n GtkDropDown as RawGtkDropDown,\n GtkEditableLabel as RawGtkEditableLabel,\n GtkEmojiChooser as RawGtkEmojiChooser,\n GtkEntry as RawGtkEntry,\n GtkExpander as RawGtkExpander,\n GtkFileChooserWidget as RawGtkFileChooserWidget,\n GtkFixed as RawGtkFixed,\n GtkFlowBox as RawGtkFlowBox,\n GtkFontButton as RawGtkFontButton,\n GtkFontChooserWidget as RawGtkFontChooserWidget,\n GtkFontDialogButton as RawGtkFontDialogButton,\n GtkFrame as RawGtkFrame,\n GtkGLArea as RawGtkGLArea,\n GtkGraphicsOffload as RawGtkGraphicsOffload,\n GtkGrid as RawGtkGrid,\n GtkGridView as RawGtkGridView,\n GtkHeaderBar as RawGtkHeaderBar,\n GtkIconView as RawGtkIconView,\n GtkImage as RawGtkImage,\n GtkInfoBar as RawGtkInfoBar,\n GtkInscription as RawGtkInscription,\n GtkLabel as RawGtkLabel,\n GtkLevelBar as RawGtkLevelBar,\n GtkLinkButton as RawGtkLinkButton,\n GtkListBox as RawGtkListBox,\n GtkListView as RawGtkListView,\n GtkLockButton as RawGtkLockButton,\n GtkMediaControls as RawGtkMediaControls,\n GtkMenuButton as RawGtkMenuButton,\n GtkNotebook as RawGtkNotebook,\n GtkOverlay as RawGtkOverlay,\n GtkPaned as RawGtkPaned,\n GtkPasswordEntry as RawGtkPasswordEntry,\n GtkPicture as RawGtkPicture,\n GtkPopover as RawGtkPopover,\n GtkPopoverBin as RawGtkPopoverBin,\n GtkPopoverMenu as RawGtkPopoverMenu,\n GtkPopoverMenuBar as RawGtkPopoverMenuBar,\n GtkProgressBar as RawGtkProgressBar,\n GtkRange as RawGtkRange,\n GtkRevealer as RawGtkRevealer,\n GtkScale as RawGtkScale,\n GtkScaleButton as RawGtkScaleButton,\n GtkScrollbar as RawGtkScrollbar,\n GtkScrolledWindow as RawGtkScrolledWindow,\n GtkSearchBar as RawGtkSearchBar,\n GtkSearchEntry as RawGtkSearchEntry,\n GtkSeparator as RawGtkSeparator,\n GtkShortcutLabel as RawGtkShortcutLabel,\n GtkShortcutsGroup as RawGtkShortcutsGroup,\n GtkShortcutsSection as RawGtkShortcutsSection,\n GtkShortcutsShortcut as RawGtkShortcutsShortcut,\n GtkSpinButton as RawGtkSpinButton,\n GtkSpinner as RawGtkSpinner,\n GtkStack as RawGtkStack,\n GtkStackSidebar as RawGtkStackSidebar,\n GtkStackSwitcher as RawGtkStackSwitcher,\n GtkStatusbar as RawGtkStatusbar,\n GtkSwitch as RawGtkSwitch,\n GtkText as RawGtkText,\n GtkTextView as RawGtkTextView,\n GtkToggleButton as RawGtkToggleButton,\n GtkTreeExpander as RawGtkTreeExpander,\n GtkTreeView as RawGtkTreeView,\n GtkVideo as RawGtkVideo,\n GtkViewport as RawGtkViewport,\n GtkVolumeButton as RawGtkVolumeButton,\n GtkWindowControls as RawGtkWindowControls,\n GtkWindowHandle as RawGtkWindowHandle,\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const GtkActionBar = wrapReactNative(RawGtkActionBar)\nexport const GtkAppChooserButton = wrapReactNative(RawGtkAppChooserButton)\nexport const GtkAppChooserWidget = wrapReactNative(RawGtkAppChooserWidget)\nexport const GtkAspectFrame = wrapReactNative(RawGtkAspectFrame)\nexport const GtkBox = wrapReactNative(RawGtkBox)\nexport const GtkButton = wrapReactNative(RawGtkButton)\nexport const GtkCalendar = wrapReactNative(RawGtkCalendar)\nexport const GtkCellView = wrapReactNative(RawGtkCellView)\nexport const GtkCenterBox = wrapReactNative(RawGtkCenterBox)\nexport const GtkCheckButton = wrapReactNative(RawGtkCheckButton)\nexport const GtkColorButton = wrapReactNative(RawGtkColorButton)\nexport const GtkColorChooserWidget = wrapReactNative(RawGtkColorChooserWidget)\nexport const GtkColorDialogButton = wrapReactNative(RawGtkColorDialogButton)\nexport const GtkColumnView = wrapReactNative(RawGtkColumnView)\nexport const GtkComboBox = wrapReactNative(RawGtkComboBox)\nexport const GtkComboBoxText = wrapReactNative(RawGtkComboBoxText)\nexport const GtkDragIcon = wrapReactNative(RawGtkDragIcon)\nexport const GtkDrawingArea = wrapReactNative(RawGtkDrawingArea)\nexport const GtkDropDown = wrapReactNative(RawGtkDropDown)\nexport const GtkEditableLabel = wrapReactNative(RawGtkEditableLabel)\nexport const GtkEmojiChooser = wrapReactNative(RawGtkEmojiChooser)\nexport const GtkEntry = wrapReactNative(RawGtkEntry)\nexport const GtkExpander = wrapReactNative(RawGtkExpander)\nexport const GtkFileChooserWidget = wrapReactNative(RawGtkFileChooserWidget)\nexport const GtkFixed = wrapReactNative(RawGtkFixed)\nexport const GtkFlowBox = wrapReactNative(RawGtkFlowBox)\nexport const GtkFontButton = wrapReactNative(RawGtkFontButton)\nexport const GtkFontChooserWidget = wrapReactNative(RawGtkFontChooserWidget)\nexport const GtkFontDialogButton = wrapReactNative(RawGtkFontDialogButton)\nexport const GtkFrame = wrapReactNative(RawGtkFrame)\nexport const GtkGLArea = wrapReactNative(RawGtkGLArea)\nexport const GtkGraphicsOffload = wrapReactNative(RawGtkGraphicsOffload)\nexport const GtkGrid = wrapReactNative(RawGtkGrid)\nexport const GtkGridView = wrapReactNative(RawGtkGridView)\nexport const GtkHeaderBar = wrapReactNative(RawGtkHeaderBar)\nexport const GtkIconView = wrapReactNative(RawGtkIconView)\nexport const GtkImage = wrapReactNative(RawGtkImage)\nexport const GtkInfoBar = wrapReactNative(RawGtkInfoBar)\nexport const GtkInscription = wrapReactNative(RawGtkInscription)\nexport const GtkLabel = wrapReactNative(RawGtkLabel)\nexport const GtkLevelBar = wrapReactNative(RawGtkLevelBar)\nexport const GtkLinkButton = wrapReactNative(RawGtkLinkButton)\nexport const GtkListBox = wrapReactNative(RawGtkListBox)\nexport const GtkListView = wrapReactNative(RawGtkListView)\nexport const GtkLockButton = wrapReactNative(RawGtkLockButton)\nexport const GtkMediaControls = wrapReactNative(RawGtkMediaControls)\nexport const GtkMenuButton = wrapReactNative(RawGtkMenuButton)\nexport const GtkNotebook = wrapReactNative(RawGtkNotebook)\nexport const GtkOverlay = wrapReactNative(RawGtkOverlay)\nexport const GtkPaned = wrapReactNative(RawGtkPaned)\nexport const GtkPasswordEntry = wrapReactNative(RawGtkPasswordEntry)\nexport const GtkPicture = wrapReactNative(RawGtkPicture)\nexport const GtkPopover = wrapReactNative(RawGtkPopover)\nexport const GtkPopoverBin = wrapReactNative(RawGtkPopoverBin)\nexport const GtkPopoverMenu = wrapReactNative(RawGtkPopoverMenu)\nexport const GtkPopoverMenuBar = wrapReactNative(RawGtkPopoverMenuBar)\nexport const GtkProgressBar = wrapReactNative(RawGtkProgressBar)\nexport const GtkRange = wrapReactNative(RawGtkRange)\nexport const GtkRevealer = wrapReactNative(RawGtkRevealer)\nexport const GtkScale = wrapReactNative(RawGtkScale)\nexport const GtkScaleButton = wrapReactNative(RawGtkScaleButton)\nexport const GtkScrollbar = wrapReactNative(RawGtkScrollbar)\nexport const GtkScrolledWindow = wrapReactNative(RawGtkScrolledWindow)\nexport const GtkSearchBar = wrapReactNative(RawGtkSearchBar)\nexport const GtkSearchEntry = wrapReactNative(RawGtkSearchEntry)\nexport const GtkSeparator = wrapReactNative(RawGtkSeparator)\nexport const GtkShortcutLabel = wrapReactNative(RawGtkShortcutLabel)\nexport const GtkShortcutsGroup = wrapReactNative(RawGtkShortcutsGroup)\nexport const GtkShortcutsSection = wrapReactNative(RawGtkShortcutsSection)\nexport const GtkShortcutsShortcut = wrapReactNative(RawGtkShortcutsShortcut)\nexport const GtkSpinButton = wrapReactNative(RawGtkSpinButton)\nexport const GtkSpinner = wrapReactNative(RawGtkSpinner)\nexport const GtkStack = wrapReactNative(RawGtkStack)\nexport const GtkStackSidebar = wrapReactNative(RawGtkStackSidebar)\nexport const GtkStackSwitcher = wrapReactNative(RawGtkStackSwitcher)\nexport const GtkStatusbar = wrapReactNative(RawGtkStatusbar)\nexport const GtkSwitch = wrapReactNative(RawGtkSwitch)\nexport const GtkText = wrapReactNative(RawGtkText)\nexport const GtkTextView = wrapReactNative(RawGtkTextView)\nexport const GtkToggleButton = wrapReactNative(RawGtkToggleButton)\nexport const GtkTreeExpander = wrapReactNative(RawGtkTreeExpander)\nexport const GtkTreeView = wrapReactNative(RawGtkTreeView)\nexport const GtkVideo = wrapReactNative(RawGtkVideo)\nexport const GtkViewport = wrapReactNative(RawGtkViewport)\nexport const GtkVolumeButton = wrapReactNative(RawGtkVolumeButton)\nexport const GtkWindowControls = wrapReactNative(RawGtkWindowControls)\nexport const GtkWindowHandle = wrapReactNative(RawGtkWindowHandle)\n\nexport {\n GtkAboutDialog, // toplevel (derives Gtk.Window)\n GtkAppChooserDialog, // toplevel (derives Gtk.Window)\n GtkApplicationWindow, // toplevel (derives Gtk.Window)\n GtkAssistant, // toplevel (derives Gtk.Window)\n GtkColorChooserDialog, // toplevel (derives Gtk.Window)\n GtkDialog, // toplevel (derives Gtk.Window)\n GtkFileChooserDialog, // toplevel (derives Gtk.Window)\n GtkFlowBoxChild, // child-only (derives Gtk.FlowBoxChild)\n GtkFontChooserDialog, // toplevel (derives Gtk.Window)\n GtkListBoxRow, // child-only (derives Gtk.ListBoxRow)\n GtkMessageDialog, // toplevel (derives Gtk.Window)\n GtkPageSetupUnixDialog, // toplevel (derives Gtk.Window)\n GtkPrintUnixDialog, // toplevel (derives Gtk.Window)\n GtkShortcutsWindow, // toplevel (derives Gtk.Window)\n GtkWindow, // toplevel (derives Gtk.Window)\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const GTK_WRAPPED_WIDGET_NAMES = [\n \"GtkActionBar\",\n \"GtkAppChooserButton\",\n \"GtkAppChooserWidget\",\n \"GtkAspectFrame\",\n \"GtkBox\",\n \"GtkButton\",\n \"GtkCalendar\",\n \"GtkCellView\",\n \"GtkCenterBox\",\n \"GtkCheckButton\",\n \"GtkColorButton\",\n \"GtkColorChooserWidget\",\n \"GtkColorDialogButton\",\n \"GtkColumnView\",\n \"GtkComboBox\",\n \"GtkComboBoxText\",\n \"GtkDragIcon\",\n \"GtkDrawingArea\",\n \"GtkDropDown\",\n \"GtkEditableLabel\",\n \"GtkEmojiChooser\",\n \"GtkEntry\",\n \"GtkExpander\",\n \"GtkFileChooserWidget\",\n \"GtkFixed\",\n \"GtkFlowBox\",\n \"GtkFontButton\",\n \"GtkFontChooserWidget\",\n \"GtkFontDialogButton\",\n \"GtkFrame\",\n \"GtkGLArea\",\n \"GtkGraphicsOffload\",\n \"GtkGrid\",\n \"GtkGridView\",\n \"GtkHeaderBar\",\n \"GtkIconView\",\n \"GtkImage\",\n \"GtkInfoBar\",\n \"GtkInscription\",\n \"GtkLabel\",\n \"GtkLevelBar\",\n \"GtkLinkButton\",\n \"GtkListBox\",\n \"GtkListView\",\n \"GtkLockButton\",\n \"GtkMediaControls\",\n \"GtkMenuButton\",\n \"GtkNotebook\",\n \"GtkOverlay\",\n \"GtkPaned\",\n \"GtkPasswordEntry\",\n \"GtkPicture\",\n \"GtkPopover\",\n \"GtkPopoverBin\",\n \"GtkPopoverMenu\",\n \"GtkPopoverMenuBar\",\n \"GtkProgressBar\",\n \"GtkRange\",\n \"GtkRevealer\",\n \"GtkScale\",\n \"GtkScaleButton\",\n \"GtkScrollbar\",\n \"GtkScrolledWindow\",\n \"GtkSearchBar\",\n \"GtkSearchEntry\",\n \"GtkSeparator\",\n \"GtkShortcutLabel\",\n \"GtkShortcutsGroup\",\n \"GtkShortcutsSection\",\n \"GtkShortcutsShortcut\",\n \"GtkSpinButton\",\n \"GtkSpinner\",\n \"GtkStack\",\n \"GtkStackSidebar\",\n \"GtkStackSwitcher\",\n \"GtkStatusbar\",\n \"GtkSwitch\",\n \"GtkText\",\n \"GtkTextView\",\n \"GtkToggleButton\",\n \"GtkTreeExpander\",\n \"GtkTreeView\",\n \"GtkVideo\",\n \"GtkViewport\",\n \"GtkVolumeButton\",\n \"GtkWindowControls\",\n \"GtkWindowHandle\",\n] as const\n"]}
@@ -2,17 +2,22 @@ import * as Adw from "@gtkx/gi/adw";
2
2
  import * as Gdk from "@gtkx/gi/gdk";
3
3
  import * as Gio from "@gtkx/gi/gio";
4
4
  import * as GLib from "@gtkx/gi/glib";
5
+ import * as GObject from "@gtkx/gi/gobject";
5
6
  import * as Graphene from "@gtkx/gi/graphene";
6
7
  import * as Gsk from "@gtkx/gi/gsk";
7
8
  import * as Gtk from "@gtkx/gi/gtk";
8
9
  import * as Pango from "@gtkx/gi/pango";
9
- export { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango };
10
- export { AdwApplicationWindow, AdwHeaderBar, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwToolbarView, } from "@gtkx/jsx/adw";
11
- export { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkEntry, GtkGestureClick, GtkLabel, GtkListBox, GtkListBoxRow, GtkPicture, GtkScrolledWindow, GtkSpinner, GtkSwitch, GtkTextView, GtkWindow, } from "@gtkx/jsx/gtk";
12
- export { createPortal, createRoot, quit, useApplication, useParentWindow, useProperty, type Root, } from "@gtkx/react";
10
+ export { Adw, Gdk, Gio, GLib, GObject, Graphene, Gsk, Gtk, Pango };
11
+ export { GtkApplication, GtkGestureClick } from "@gtkx/jsx/gtk";
12
+ export { GMenu, GSimpleAction } from "@gtkx/jsx/gio";
13
+ export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle, } from "@gtkx/jsx/adw";
14
+ export { GtkAdjustment, GtkDragSource, GtkDropTarget, GtkShortcut, GtkShortcutController, GtkTextBuffer, } from "@gtkx/jsx/gtk";
15
+ export * from "./widgets.generated";
16
+ export { createPortal, createRoot, quit, rootElement, useApplication, useBindSetting, useParentWindow, useProperty, useSetting, type Root, type RootElement, type SettingsSchema, type SettingsSchemaKeys, type SettingValue, } from "@gtkx/react";
13
17
  export { useSignal } from "./use-signal";
14
18
  export { css, cx, injectGlobal } from "@gtkx/css";
15
19
  export { createTextProbe, measureWidget, toNumber } from "./measure";
16
20
  export { getViewBoxComponent, setBoxPassthrough } from "./view-box";
21
+ export { getSvgNodeComponent, getSvgNodeDescriptor, queueSvgRedraw, resolveSvgColor, resolveSvgPaint, setSvgNodeDescriptor, type SvgDefsDescriptor, type SvgGradientUnits, type SvgGroupDescriptor, type SvgLinearGradientDescriptor, type SvgNodeDescriptor, type SvgPaintSpec, type SvgRadialGradientDescriptor, type SvgShapeDescriptor, type SvgStopDescriptor, type SvgSvgDescriptor, } from "./svg-node";
17
22
  export { allocateChild, attachRnLayout, detachRnLayout, queueAllocate, queueResize, type RnLayoutHooks, type RnLayoutOrientation, } from "./layout-manager";
18
23
  export { colorScheme, styleManager } from "./theme";
@@ -1,7 +1,7 @@
1
1
  // The ONLY module allowed to import @gtkx/* (enforced by eslint no-restricted-imports).
2
2
  // gtkx is an RC dependency: when its API moves, this bridge absorbs the change.
3
3
  //
4
- // rc.1 caveats baked into this surface (see docs/research/yoga-gtk-spike.md):
4
+ // Caveats baked into this surface (catalogued in docs/gtkx-rc2-notes.md):
5
5
  // - 64-bit FFI values arrive as BigInt → normalize with toNumber() at this boundary
6
6
  // import-then-export (not `export * as`): the latter is the one syntax the
7
7
  // stock @react-native/babel-preset cannot transform — this form keeps
@@ -10,20 +10,56 @@ import * as Adw from "@gtkx/gi/adw";
10
10
  import * as Gdk from "@gtkx/gi/gdk";
11
11
  import * as Gio from "@gtkx/gi/gio";
12
12
  import * as GLib from "@gtkx/gi/glib";
13
+ import * as GObject from "@gtkx/gi/gobject";
13
14
  import * as Graphene from "@gtkx/gi/graphene";
14
15
  import * as Gsk from "@gtkx/gi/gsk";
15
16
  import * as Gtk from "@gtkx/gi/gtk";
16
17
  import * as Pango from "@gtkx/gi/pango";
17
- export { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango };
18
- export { AdwApplicationWindow, AdwHeaderBar, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwToolbarView, } from "@gtkx/jsx/adw";
19
- export { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkEntry, GtkGestureClick, GtkLabel, GtkListBox, GtkListBoxRow, GtkPicture, GtkScrolledWindow, GtkSpinner, GtkSwitch, GtkTextView, GtkWindow, } from "@gtkx/jsx/gtk";
20
- export { createPortal, createRoot, quit, useApplication, useParentWindow, useProperty, } from "@gtkx/react";
18
+ export { Adw, Gdk, Gio, GLib, GObject, Graphene, Gsk, Gtk, Pango };
19
+ // GtkApplication and GtkGestureClick are not Gtk.Widget subclasses (an
20
+ // application object and an event controller, respectively), so the widget
21
+ // surface generator never sees them kept here by hand, same as before it
22
+ // existed.
23
+ export { GtkApplication, GtkGestureClick } from "@gtkx/jsx/gtk";
24
+ // Auxiliary gtkx JSX elements that are not Gtk.Widget/Adw.Widget subclasses
25
+ // either, same reason as the pair above — scripts/generate-widget-surface.ts
26
+ // only classifies widgets, so these fall into its "notAWidget" bucket
27
+ // (see scripts/widget-surface/classification.json) and are otherwise
28
+ // unreachable through react-native-gtkx/gtk or /adw. Every one of these is a
29
+ // real, necessary building block for a real app: actions and menus (Gio),
30
+ // a responsive breakpoint (Adw), a text buffer and an adjustment (the model
31
+ // objects GtkTextView/GtkSpinRow etc. bind to), keyboard shortcuts, and the
32
+ // two drag-and-drop controllers.
33
+ //
34
+ // Adw.Breakpoint specifically: independently verified
35
+ // (`Adw.Breakpoint.prototype instanceof Gtk.Widget === false`, prototype
36
+ // chain bottoms out at plain GObject.Object) — it draws nothing and has no
37
+ // size, it is a declaration (a condition plus a set of property setters)
38
+ // attached to a Window/ApplicationWindow/Dialog/BreakpointBin. Running it
39
+ // through wrapReactNative would give it a Yoga node for a widget that
40
+ // occupies no space: a layout bug, not a convenience. Adw.BreakpointBin (a
41
+ // real widget, the container that scopes breakpoints to a subtree) is
42
+ // wrapped normally in ./widgets.generated instead, and is what
43
+ // createSidebarNavigator's own collapse pairs AdwBreakpoint with (see
44
+ // docs/platform-layer.md, "Two ways to react to size").
45
+ export { GMenu, GSimpleAction } from "@gtkx/jsx/gio";
46
+ export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle, } from "@gtkx/jsx/adw";
47
+ export { GtkAdjustment, GtkDragSource, GtkDropTarget, GtkShortcut, GtkShortcutController, GtkTextBuffer, } from "@gtkx/jsx/gtk";
48
+ // The full widget surface — every GTK/Adwaita class gtkx binds that derives
49
+ // Gtk.Widget, raw. src/gtk/widgets.generated and src/adw/widgets.generated
50
+ // wrap most of them with wrapReactNative; this file is where @gtkx/jsx is
51
+ // still allowed to be imported directly (see the eslint carve-out for
52
+ // src/gtkx/bridge/**), so they pull the raw widgets from here rather than
53
+ // from @gtkx/jsx themselves.
54
+ export * from "./widgets.generated";
55
+ export { createPortal, createRoot, quit, rootElement, useApplication, useBindSetting, useParentWindow, useProperty, useSetting, } from "@gtkx/react";
21
56
  // useSignal comes from ./use-signal, not @gtkx/react — see the workaround note
22
57
  // there (rc.2 delivers a stale handler).
23
58
  export { useSignal } from "./use-signal";
24
59
  export { css, cx, injectGlobal } from "@gtkx/css";
25
60
  export { createTextProbe, measureWidget, toNumber } from "./measure";
26
61
  export { getViewBoxComponent, setBoxPassthrough } from "./view-box";
62
+ export { getSvgNodeComponent, getSvgNodeDescriptor, queueSvgRedraw, resolveSvgColor, resolveSvgPaint, setSvgNodeDescriptor, } from "./svg-node";
27
63
  export { allocateChild, attachRnLayout, detachRnLayout, queueAllocate, queueResize, } from "./layout-manager";
28
64
  export { colorScheme, styleManager } from "./theme";
29
65
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/index.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,gFAAgF;AAChF,EAAE;AACF,8EAA8E;AAC9E,oFAAoF;AAEpF,2EAA2E;AAC3E,sEAAsE;AACtE,qDAAqD;AACrD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAA;AAEzD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,GACf,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,WAAW,GAEZ,MAAM,aAAa,CAAA;AAEpB,+EAA+E;AAC/E,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,GAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA","sourcesContent":["// The ONLY module allowed to import @gtkx/* (enforced by eslint no-restricted-imports).\n// gtkx is an RC dependency: when its API moves, this bridge absorbs the change.\n//\n// rc.1 caveats baked into this surface (see docs/research/yoga-gtk-spike.md):\n// - 64-bit FFI values arrive as BigInt → normalize with toNumber() at this boundary\n\n// import-then-export (not `export * as`): the latter is the one syntax the\n// stock @react-native/babel-preset cannot transform — this form keeps\n// consumer apps on their unmodified RN Babel config.\nimport * as Adw from \"@gtkx/gi/adw\"\nimport * as Gdk from \"@gtkx/gi/gdk\"\nimport * as Gio from \"@gtkx/gi/gio\"\nimport * as GLib from \"@gtkx/gi/glib\"\nimport * as Graphene from \"@gtkx/gi/graphene\"\nimport * as Gsk from \"@gtkx/gi/gsk\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport * as Pango from \"@gtkx/gi/pango\"\n\nexport { Adw, Gdk, Gio, GLib, Graphene, Gsk, Gtk, Pango }\n\nexport {\n AdwApplicationWindow,\n AdwHeaderBar,\n AdwNavigationPage,\n AdwNavigationSplitView,\n AdwNavigationView,\n AdwToolbarView,\n} from \"@gtkx/jsx/adw\"\n\nexport {\n GtkApplication,\n GtkApplicationWindow,\n GtkBox,\n GtkButton,\n GtkEntry,\n GtkGestureClick,\n GtkLabel,\n GtkListBox,\n GtkListBoxRow,\n GtkPicture,\n GtkScrolledWindow,\n GtkSpinner,\n GtkSwitch,\n GtkTextView,\n GtkWindow,\n} from \"@gtkx/jsx/gtk\"\n\nexport {\n createPortal,\n createRoot,\n quit,\n useApplication,\n useParentWindow,\n useProperty,\n type Root,\n} from \"@gtkx/react\"\n\n// useSignal comes from ./use-signal, not @gtkx/react — see the workaround note\n// there (rc.2 delivers a stale handler).\nexport { useSignal } from \"./use-signal\"\n\nexport { css, cx, injectGlobal } from \"@gtkx/css\"\n\nexport { createTextProbe, measureWidget, toNumber } from \"./measure\"\nexport { getViewBoxComponent, setBoxPassthrough } from \"./view-box\"\nexport {\n allocateChild,\n attachRnLayout,\n detachRnLayout,\n queueAllocate,\n queueResize,\n type RnLayoutHooks,\n type RnLayoutOrientation,\n} from \"./layout-manager\"\nexport { colorScheme, styleManager } from \"./theme\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/index.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,gFAAgF;AAChF,EAAE;AACF,0EAA0E;AAC1E,oFAAoF;AAEpF,2EAA2E;AAC3E,sEAAsE;AACtE,qDAAqD;AACrD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAA;AAElE,u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EACL,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,oBAAoB,GAWrB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,GAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA","sourcesContent":["// The ONLY module allowed to import @gtkx/* (enforced by eslint no-restricted-imports).\n// gtkx is an RC dependency: when its API moves, this bridge absorbs the change.\n//\n// Caveats baked into this surface (catalogued in docs/gtkx-rc2-notes.md):\n// - 64-bit FFI values arrive as BigInt → normalize with toNumber() at this boundary\n\n// import-then-export (not `export * as`): the latter is the one syntax the\n// stock @react-native/babel-preset cannot transform — this form keeps\n// consumer apps on their unmodified RN Babel config.\nimport * as Adw from \"@gtkx/gi/adw\"\nimport * as Gdk from \"@gtkx/gi/gdk\"\nimport * as Gio from \"@gtkx/gi/gio\"\nimport * as GLib from \"@gtkx/gi/glib\"\nimport * as GObject from \"@gtkx/gi/gobject\"\nimport * as Graphene from \"@gtkx/gi/graphene\"\nimport * as Gsk from \"@gtkx/gi/gsk\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport * as Pango from \"@gtkx/gi/pango\"\n\nexport { Adw, Gdk, Gio, GLib, GObject, Graphene, Gsk, Gtk, Pango }\n\n// GtkApplication and GtkGestureClick are not Gtk.Widget subclasses (an\n// application object and an event controller, respectively), so the widget\n// surface generator never sees them — kept here by hand, same as before it\n// existed.\nexport { GtkApplication, GtkGestureClick } from \"@gtkx/jsx/gtk\"\n\n// Auxiliary gtkx JSX elements that are not Gtk.Widget/Adw.Widget subclasses\n// either, same reason as the pair above — scripts/generate-widget-surface.ts\n// only classifies widgets, so these fall into its \"notAWidget\" bucket\n// (see scripts/widget-surface/classification.json) and are otherwise\n// unreachable through react-native-gtkx/gtk or /adw. Every one of these is a\n// real, necessary building block for a real app: actions and menus (Gio),\n// a responsive breakpoint (Adw), a text buffer and an adjustment (the model\n// objects GtkTextView/GtkSpinRow etc. bind to), keyboard shortcuts, and the\n// two drag-and-drop controllers.\n//\n// Adw.Breakpoint specifically: independently verified\n// (`Adw.Breakpoint.prototype instanceof Gtk.Widget === false`, prototype\n// chain bottoms out at plain GObject.Object) — it draws nothing and has no\n// size, it is a declaration (a condition plus a set of property setters)\n// attached to a Window/ApplicationWindow/Dialog/BreakpointBin. Running it\n// through wrapReactNative would give it a Yoga node for a widget that\n// occupies no space: a layout bug, not a convenience. Adw.BreakpointBin (a\n// real widget, the container that scopes breakpoints to a subtree) is\n// wrapped normally in ./widgets.generated instead, and is what\n// createSidebarNavigator's own collapse pairs AdwBreakpoint with (see\n// docs/platform-layer.md, \"Two ways to react to size\").\nexport { GMenu, GSimpleAction } from \"@gtkx/jsx/gio\"\nexport {\n AdwBreakpoint,\n AdwShortcutsItem,\n AdwShortcutsSection,\n AdwToggle,\n} from \"@gtkx/jsx/adw\"\nexport {\n GtkAdjustment,\n GtkDragSource,\n GtkDropTarget,\n GtkShortcut,\n GtkShortcutController,\n GtkTextBuffer,\n} from \"@gtkx/jsx/gtk\"\n\n// The full widget surface — every GTK/Adwaita class gtkx binds that derives\n// Gtk.Widget, raw. src/gtk/widgets.generated and src/adw/widgets.generated\n// wrap most of them with wrapReactNative; this file is where @gtkx/jsx is\n// still allowed to be imported directly (see the eslint carve-out for\n// src/gtkx/bridge/**), so they pull the raw widgets from here rather than\n// from @gtkx/jsx themselves.\nexport * from \"./widgets.generated\"\n\nexport {\n createPortal,\n createRoot,\n quit,\n rootElement,\n useApplication,\n useBindSetting,\n useParentWindow,\n useProperty,\n useSetting,\n type Root,\n type RootElement,\n type SettingsSchema,\n type SettingsSchemaKeys,\n type SettingValue,\n} from \"@gtkx/react\"\n\n// useSignal comes from ./use-signal, not @gtkx/react — see the workaround note\n// there (rc.2 delivers a stale handler).\nexport { useSignal } from \"./use-signal\"\n\nexport { css, cx, injectGlobal } from \"@gtkx/css\"\n\nexport { createTextProbe, measureWidget, toNumber } from \"./measure\"\nexport { getViewBoxComponent, setBoxPassthrough } from \"./view-box\"\nexport {\n getSvgNodeComponent,\n getSvgNodeDescriptor,\n queueSvgRedraw,\n resolveSvgColor,\n resolveSvgPaint,\n setSvgNodeDescriptor,\n type SvgDefsDescriptor,\n type SvgGradientUnits,\n type SvgGroupDescriptor,\n type SvgLinearGradientDescriptor,\n type SvgNodeDescriptor,\n type SvgPaintSpec,\n type SvgRadialGradientDescriptor,\n type SvgShapeDescriptor,\n type SvgStopDescriptor,\n type SvgSvgDescriptor,\n} from \"./svg-node\"\nexport {\n allocateChild,\n attachRnLayout,\n detachRnLayout,\n queueAllocate,\n queueResize,\n type RnLayoutHooks,\n type RnLayoutOrientation,\n} from \"./layout-manager\"\nexport { colorScheme, styleManager } from \"./theme\"\n"]}
@@ -1,4 +1,5 @@
1
1
  import * as Gtk from "@gtkx/gi/gtk";
2
+ import type { Transform2D } from "../../contracts";
2
3
  export type RnLayoutOrientation = "horizontal" | "vertical";
3
4
  export type RnLayoutHooks = {
4
5
  measure(orientation: RnLayoutOrientation, forSize: number): number;
@@ -6,6 +7,6 @@ export type RnLayoutHooks = {
6
7
  };
7
8
  export declare const attachRnLayout: (widget: Gtk.Widget, hooks: RnLayoutHooks) => void;
8
9
  export declare const detachRnLayout: (widget: Gtk.Widget) => void;
9
- export declare const allocateChild: (child: Gtk.Widget, x: number, y: number, width: number, height: number) => void;
10
+ export declare const allocateChild: (child: Gtk.Widget, x: number, y: number, width: number, height: number, matrix?: Transform2D | null) => void;
10
11
  export declare const queueAllocate: (widget: Gtk.Widget) => void;
11
12
  export declare const queueResize: (widget: Gtk.Widget) => void;
@@ -7,6 +7,7 @@
7
7
  // minimum ratchet, overflow children inflating ancestors, and widget minimums
8
8
  // pushing rects.
9
9
  import * as Gdk from "@gtkx/gi/gdk";
10
+ import * as Gsk from "@gtkx/gi/gsk";
10
11
  import * as Gtk from "@gtkx/gi/gtk";
11
12
  import { registerClass } from "@gtkx/runtime";
12
13
  // The class must exist before any instance is created, but registration needs
@@ -66,15 +67,36 @@ export const detachRnLayout = (widget) => {
66
67
  hooksByManager.delete(manager);
67
68
  widget.setLayoutManager(null);
68
69
  };
69
- // Places one child at an exact rect. Only meaningful from inside an allocate()
70
- // hook GTK forbids size-allocating outside the layout phase.
71
- export const allocateChild = (child, x, y, width, height) => {
72
- child.sizeAllocate(new Gdk.Rectangle({
73
- x: Math.round(x),
74
- y: Math.round(y),
75
- width: Math.max(0, Math.round(width)),
76
- height: Math.max(0, Math.round(height)),
77
- }), -1);
70
+ // Places one child at an exact rect, optionally under a visual transform.
71
+ // Only meaningful from inside an allocate() hook GTK forbids
72
+ // size-allocating outside the layout phase.
73
+ //
74
+ // The transform path is gtk_widget_allocate(), which is what
75
+ // gtk_widget_size_allocate() itself calls with a plain translate — the child
76
+ // keeps the width/height Yoga gave it and only its placement matrix changes,
77
+ // which is exactly RN's "transforms are visual only". GTK4 inverts that
78
+ // matrix in gtk_widget_pick(), so input follows the rotated/scaled shape for
79
+ // free (measured: docs/research/transforms.md).
80
+ export const allocateChild = (child, x, y, width, height, matrix = null) => {
81
+ const left = Math.round(x);
82
+ const top = Math.round(y);
83
+ const w = Math.max(0, Math.round(width));
84
+ const h = Math.max(0, Math.round(height));
85
+ if (!matrix) {
86
+ child.sizeAllocate(new Gdk.Rectangle({ x: left, y: top, width: w, height: h }), -1);
87
+ return;
88
+ }
89
+ // RN's transform origin is the centre of the view, so the matrix GTK gets
90
+ // is T(left + cx, top + cy) · matrix · T(-cx, -cy) — folded into the six
91
+ // components here rather than chained through GskTransform, which would
92
+ // cost five FFI hops instead of one.
93
+ const cx = w / 2;
94
+ const cy = h / 2;
95
+ const transform = Gsk.Transform.new().matrix2d(matrix.xx, matrix.yx, matrix.xy, matrix.yy, left + cx - (matrix.xx * cx + matrix.xy * cy) + matrix.dx, top + cy - (matrix.yx * cx + matrix.yy * cy) + matrix.dy);
96
+ // gtk_widget_allocate consumes the transform (transfer full) and gtkx
97
+ // hands ownership over with it — never unref it here (that aborts on
98
+ // GLib's rc-box magic assertion).
99
+ child.allocate(w, h, -1, transform);
78
100
  };
79
101
  // Engine flush → new rects for the same container size: schedule allocation
80
102
  // only. A measure-affecting change must use queueResize instead.
@@ -1 +1 @@
1
- {"version":3,"file":"layout-manager.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/layout-manager.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,wEAAwE;AACxE,+EAA+E;AAC/E,6EAA6E;AAC7E,0EAA0E;AAC1E,8EAA8E;AAC9E,iBAAiB;AACjB,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAY7C,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,6CAA6C;AAC7C,IAAI,iBAAiB,GAAyC,IAAI,CAAA;AAElE,MAAM,cAAc,GAAG,IAAI,OAAO,EAAoC,CAAA;AAEtE,MAAM,gBAAgB,GAAG,GAAgC,EAAE;IACzD,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAED,MAAM,YAAa,SAAQ,GAAG,CAAC,aAAa;QACjC,OAAO,CACd,OAAmB,EACnB,WAA4B,EAC5B,OAAe;YAEf,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YACtC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;YACvB,CAAC;YACD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,WAAW,KAAK,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EACtE,O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C,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7C,OAAM;IACR,CAAC;IACD,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC9B,MAAM,CAAC,gBAAgB,CAAC,IAAoC,CAAC,CAAA;AAC/D,CAAC,CAAA;AAED,+EAA+E;AAC/E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,KAAiB,EACjB,CAAS,EACT,CAAS,EACT,KAAa,EACb,MAAc,EACR,EAAE;IACR,KAAK,CAAC,YAAY,CAChB,IAAI,GAAG,CAAC,SAAS,CAAC;QAChB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAChB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAChB,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KACxC,CAAC,EACF,CAAC,CAAC,CACH,CAAA;AACH,CAAC,CAAA;AAED,4EAA4E;AAC5E,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAkB,EAAQ,EAAE;IACxD,MAAM,CAAC,aAAa,EAAE,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAQ,EAAE;IACtD,MAAM,CAAC,WAAW,EAAE,CAAA;AACtB,CAAC,CAAA","sourcesContent":["// RnGtkxLayout — a GObject subclass of GtkLayoutManager registered entirely\n// from JS (docs/research/layout-manager.md, \"B0\"). The manager obeys ONLY the\n// layout engine: measure() reports the engine-provided size (minimum ==\n// natural, children are never queried) and allocate() delegates to the engine,\n// which places every child at exactly its computed rect via allocateChild().\n// This is what removes the GTK-vs-RN layout conflicts at the root: window\n// minimum ratchet, overflow children inflating ancestors, and widget minimums\n// pushing rects.\nimport * as Gdk from \"@gtkx/gi/gdk\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport { registerClass } from \"@gtkx/runtime\"\n\nexport type RnLayoutOrientation = \"horizontal\" | \"vertical\"\n\nexport type RnLayoutHooks = {\n // Engine-provided size for the given axis; minimum == natural == this value.\n measure(orientation: RnLayoutOrientation, forSize: number): number\n // Called during GTK's allocation phase with the container's final size.\n // The engine must size-allocate every child (allocateChild) synchronously.\n allocate(width: number, height: number): void\n}\n\n// The class must exist before any instance is created, but registration needs\n// GObject to be initialized — both hold after the bridge is imported, so the\n// class is registered lazily on first attach (also keeps the module safe to\n// import in environments without a display).\nlet RnGtkxLayoutClass: (new () => Gtk.LayoutManager) | null = null\n\nconst hooksByManager = new WeakMap<Gtk.LayoutManager, RnLayoutHooks>()\n\nconst ensureRegistered = (): new () => Gtk.LayoutManager => {\n if (RnGtkxLayoutClass) {\n return RnGtkxLayoutClass\n }\n\n class RnGtkxLayout extends Gtk.LayoutManager {\n override measure(\n _widget: Gtk.Widget,\n orientation: Gtk.Orientation,\n forSize: number,\n ): [number, number, number, number] {\n const hooks = hooksByManager.get(this)\n if (!hooks) {\n return [0, 0, -1, -1]\n }\n const size = hooks.measure(\n orientation === Gtk.Orientation.HORIZONTAL ? \"horizontal\" : \"vertical\",\n forSize,\n )\n return [size, size, -1, -1]\n }\n\n // Trailing vfunc params (baseline; widget) are dropped — JS tolerates the\n // arity mismatch and the linter rejects unused trailing args.\n override allocate(\n _widget: Gtk.Widget,\n width: number,\n height: number,\n ): void {\n hooksByManager.get(this)?.allocate(width, height)\n }\n\n override getRequestMode(): Gtk.SizeRequestMode {\n return Gtk.SizeRequestMode.CONSTANT_SIZE\n }\n }\n\n // Explicit typeName: bundlers minify class names and registerClass derives\n // the GType name from klass.name by default (FINDINGS §1).\n registerClass(RnGtkxLayout, { typeName: \"RnGtkxLayout\" })\n RnGtkxLayoutClass = RnGtkxLayout\n return RnGtkxLayout\n}\n\n// Replaces the widget's layout manager with an RnGtkxLayout driven by `hooks`.\n// The container must attach its children in a layout-child-free way (GtkBox\n// append / set_parent) — GtkFixed.put demands a GtkFixedLayoutChild from the\n// current manager and is incompatible (FINDINGS §2).\nexport const attachRnLayout = (\n widget: Gtk.Widget,\n hooks: RnLayoutHooks,\n): void => {\n const Klass = ensureRegistered()\n if (hooksByManager.has(widget.getLayoutManager() as Gtk.LayoutManager)) {\n throw new Error(\"attachRnLayout: widget already has an RnGtkxLayout\")\n }\n const manager = new Klass()\n hooksByManager.set(manager, hooks)\n widget.setLayoutManager(manager)\n}\n\n// Drops the hooks and hands layout back to a fresh manager of the widget's\n// own class default. Safe to call on widgets that were never attached.\nexport const detachRnLayout = (widget: Gtk.Widget): void => {\n const manager = widget.getLayoutManager() as Gtk.LayoutManager | null\n if (!manager || !hooksByManager.has(manager)) {\n return\n }\n hooksByManager.delete(manager)\n widget.setLayoutManager(null as unknown as Gtk.LayoutManager)\n}\n\n// Places one child at an exact rect. Only meaningful from inside an allocate()\n// hook — GTK forbids size-allocating outside the layout phase.\nexport const allocateChild = (\n child: Gtk.Widget,\n x: number,\n y: number,\n width: number,\n height: number,\n): void => {\n child.sizeAllocate(\n new Gdk.Rectangle({\n x: Math.round(x),\n y: Math.round(y),\n width: Math.max(0, Math.round(width)),\n height: Math.max(0, Math.round(height)),\n }),\n -1,\n )\n}\n\n// Engine flush → new rects for the same container size: schedule allocation\n// only. A measure-affecting change must use queueResize instead.\nexport const queueAllocate = (widget: Gtk.Widget): void => {\n widget.queueAllocate()\n}\n\nexport const queueResize = (widget: Gtk.Widget): void => {\n widget.queueResize()\n}\n"]}
1
+ {"version":3,"file":"layout-manager.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/layout-manager.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,wEAAwE;AACxE,+EAA+E;AAC/E,6EAA6E;AAC7E,0EAA0E;AAC1E,8EAA8E;AAC9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AE,GAAG,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,CACzD,CAAA;IACD,sEAAsE;IACtE,qEAAqE;IACrE,kCAAkC;IAClC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AACrC,CAAC,CAAA;AAED,4EAA4E;AAC5E,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAkB,EAAQ,EAAE;IACxD,MAAM,CAAC,aAAa,EAAE,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAQ,EAAE;IACtD,MAAM,CAAC,WAAW,EAAE,CAAA;AACtB,CAAC,CAAA","sourcesContent":["// RnGtkxLayout — a GObject subclass of GtkLayoutManager registered entirely\n// from JS (docs/research/layout-manager.md, \"B0\"). The manager obeys ONLY the\n// layout engine: measure() reports the engine-provided size (minimum ==\n// natural, children are never queried) and allocate() delegates to the engine,\n// which places every child at exactly its computed rect via allocateChild().\n// This is what removes the GTK-vs-RN layout conflicts at the root: window\n// minimum ratchet, overflow children inflating ancestors, and widget minimums\n// pushing rects.\nimport * as Gdk from \"@gtkx/gi/gdk\"\nimport * as Gsk from \"@gtkx/gi/gsk\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport { registerClass } from \"@gtkx/runtime\"\nimport type { Transform2D } from \"../../contracts\"\n\nexport type RnLayoutOrientation = \"horizontal\" | \"vertical\"\n\nexport type RnLayoutHooks = {\n // Engine-provided size for the given axis; minimum == natural == this value.\n measure(orientation: RnLayoutOrientation, forSize: number): number\n // Called during GTK's allocation phase with the container's final size.\n // The engine must size-allocate every child (allocateChild) synchronously.\n allocate(width: number, height: number): void\n}\n\n// The class must exist before any instance is created, but registration needs\n// GObject to be initialized — both hold after the bridge is imported, so the\n// class is registered lazily on first attach (also keeps the module safe to\n// import in environments without a display).\nlet RnGtkxLayoutClass: (new () => Gtk.LayoutManager) | null = null\n\nconst hooksByManager = new WeakMap<Gtk.LayoutManager, RnLayoutHooks>()\n\nconst ensureRegistered = (): new () => Gtk.LayoutManager => {\n if (RnGtkxLayoutClass) {\n return RnGtkxLayoutClass\n }\n\n class RnGtkxLayout extends Gtk.LayoutManager {\n override measure(\n _widget: Gtk.Widget,\n orientation: Gtk.Orientation,\n forSize: number,\n ): [number, number, number, number] {\n const hooks = hooksByManager.get(this)\n if (!hooks) {\n return [0, 0, -1, -1]\n }\n const size = hooks.measure(\n orientation === Gtk.Orientation.HORIZONTAL ? \"horizontal\" : \"vertical\",\n forSize,\n )\n return [size, size, -1, -1]\n }\n\n // Trailing vfunc params (baseline; widget) are dropped — JS tolerates the\n // arity mismatch and the linter rejects unused trailing args.\n override allocate(\n _widget: Gtk.Widget,\n width: number,\n height: number,\n ): void {\n hooksByManager.get(this)?.allocate(width, height)\n }\n\n override getRequestMode(): Gtk.SizeRequestMode {\n return Gtk.SizeRequestMode.CONSTANT_SIZE\n }\n }\n\n // Explicit typeName: bundlers minify class names and registerClass derives\n // the GType name from klass.name by default (FINDINGS §1).\n registerClass(RnGtkxLayout, { typeName: \"RnGtkxLayout\" })\n RnGtkxLayoutClass = RnGtkxLayout\n return RnGtkxLayout\n}\n\n// Replaces the widget's layout manager with an RnGtkxLayout driven by `hooks`.\n// The container must attach its children in a layout-child-free way (GtkBox\n// append / set_parent) — GtkFixed.put demands a GtkFixedLayoutChild from the\n// current manager and is incompatible (FINDINGS §2).\nexport const attachRnLayout = (\n widget: Gtk.Widget,\n hooks: RnLayoutHooks,\n): void => {\n const Klass = ensureRegistered()\n if (hooksByManager.has(widget.getLayoutManager() as Gtk.LayoutManager)) {\n throw new Error(\"attachRnLayout: widget already has an RnGtkxLayout\")\n }\n const manager = new Klass()\n hooksByManager.set(manager, hooks)\n widget.setLayoutManager(manager)\n}\n\n// Drops the hooks and hands layout back to a fresh manager of the widget's\n// own class default. Safe to call on widgets that were never attached.\nexport const detachRnLayout = (widget: Gtk.Widget): void => {\n const manager = widget.getLayoutManager() as Gtk.LayoutManager | null\n if (!manager || !hooksByManager.has(manager)) {\n return\n }\n hooksByManager.delete(manager)\n widget.setLayoutManager(null as unknown as Gtk.LayoutManager)\n}\n\n// Places one child at an exact rect, optionally under a visual transform.\n// Only meaningful from inside an allocate() hook — GTK forbids\n// size-allocating outside the layout phase.\n//\n// The transform path is gtk_widget_allocate(), which is what\n// gtk_widget_size_allocate() itself calls with a plain translate — the child\n// keeps the width/height Yoga gave it and only its placement matrix changes,\n// which is exactly RN's \"transforms are visual only\". GTK4 inverts that\n// matrix in gtk_widget_pick(), so input follows the rotated/scaled shape for\n// free (measured: docs/research/transforms.md).\nexport const allocateChild = (\n child: Gtk.Widget,\n x: number,\n y: number,\n width: number,\n height: number,\n matrix: Transform2D | null = null,\n): void => {\n const left = Math.round(x)\n const top = Math.round(y)\n const w = Math.max(0, Math.round(width))\n const h = Math.max(0, Math.round(height))\n\n if (!matrix) {\n child.sizeAllocate(\n new Gdk.Rectangle({ x: left, y: top, width: w, height: h }),\n -1,\n )\n return\n }\n\n // RN's transform origin is the centre of the view, so the matrix GTK gets\n // is T(left + cx, top + cy) · matrix · T(-cx, -cy) — folded into the six\n // components here rather than chained through GskTransform, which would\n // cost five FFI hops instead of one.\n const cx = w / 2\n const cy = h / 2\n const transform = Gsk.Transform.new().matrix2d(\n matrix.xx,\n matrix.yx,\n matrix.xy,\n matrix.yy,\n left + cx - (matrix.xx * cx + matrix.xy * cy) + matrix.dx,\n top + cy - (matrix.yx * cx + matrix.yy * cy) + matrix.dy,\n )\n // gtk_widget_allocate consumes the transform (transfer full) and gtkx\n // hands ownership over with it — never unref it here (that aborts on\n // GLib's rc-box magic assertion).\n child.allocate(w, h, -1, transform)\n}\n\n// Engine flush → new rects for the same container size: schedule allocation\n// only. A measure-affecting change must use queueResize instead.\nexport const queueAllocate = (widget: Gtk.Widget): void => {\n widget.queueAllocate()\n}\n\nexport const queueResize = (widget: Gtk.Widget): void => {\n widget.queueResize()\n}\n"]}
@@ -0,0 +1,79 @@
1
+ import * as Gdk from "@gtkx/gi/gdk";
2
+ import * as Gsk from "@gtkx/gi/gsk";
3
+ import * as Gtk from "@gtkx/gi/gtk";
4
+ import { createElementComponent } from "@gtkx/react/internal";
5
+ import type { SvgTransformOp } from "../../svg/transform";
6
+ import { type PreserveAspectRatio, type ViewBox } from "../../svg/view-box";
7
+ export type SvgPaintSpec = {
8
+ kind: "color";
9
+ rgba: Gdk.RGBA;
10
+ } | {
11
+ kind: "ref";
12
+ id: string;
13
+ };
14
+ export type SvgGradientUnits = "objectBoundingBox" | "userSpaceOnUse";
15
+ export type SvgSvgDescriptor = {
16
+ kind: "svg";
17
+ viewBox: ViewBox | null;
18
+ preserveAspectRatio: PreserveAspectRatio;
19
+ };
20
+ export type SvgGroupDescriptor = {
21
+ kind: "g";
22
+ transformOps: SvgTransformOp[];
23
+ opacity: number;
24
+ };
25
+ export type SvgShapeDescriptor = {
26
+ kind: "shape";
27
+ path: Gsk.Path | null;
28
+ fill: SvgPaintSpec | null;
29
+ fillOpacity: number;
30
+ fillRule: Gsk.FillRule;
31
+ stroke: SvgPaintSpec | null;
32
+ strokeOpacity: number;
33
+ strokeWidth: number;
34
+ strokeLinecap: Gsk.LineCap;
35
+ strokeLinejoin: Gsk.LineJoin;
36
+ strokeMiterlimit: number;
37
+ strokeDasharray: number[] | null;
38
+ strokeDashoffset: number;
39
+ opacity: number;
40
+ };
41
+ export type SvgDefsDescriptor = {
42
+ kind: "defs";
43
+ };
44
+ export type SvgLinearGradientDescriptor = {
45
+ kind: "gradient";
46
+ type: "linear";
47
+ id: string;
48
+ units: SvgGradientUnits;
49
+ x1: number;
50
+ y1: number;
51
+ x2: number;
52
+ y2: number;
53
+ };
54
+ export type SvgRadialGradientDescriptor = {
55
+ kind: "gradient";
56
+ type: "radial";
57
+ id: string;
58
+ units: SvgGradientUnits;
59
+ cx: number;
60
+ cy: number;
61
+ r: number;
62
+ };
63
+ export type SvgStopDescriptor = {
64
+ kind: "stop";
65
+ offset: number;
66
+ color: Gdk.RGBA;
67
+ };
68
+ export type SvgNodeDescriptor = SvgSvgDescriptor | SvgGroupDescriptor | SvgShapeDescriptor | SvgDefsDescriptor | SvgLinearGradientDescriptor | SvgRadialGradientDescriptor | SvgStopDescriptor;
69
+ export declare const setSvgNodeDescriptor: (widget: Gtk.Widget, descriptor: SvgNodeDescriptor) => void;
70
+ export declare const getSvgNodeDescriptor: (widget: Gtk.Widget) => SvgNodeDescriptor | undefined;
71
+ export declare const resolveSvgColor: (spec: string | undefined) => Gdk.RGBA | null;
72
+ export declare const resolveSvgPaint: (spec: string | undefined) => SvgPaintSpec | null;
73
+ type SvgNodeComponent = ReturnType<typeof createElementComponent>;
74
+ export declare const getSvgNodeComponent: () => SvgNodeComponent;
75
+ /** Imperative invalidation channel for SVG: paint-only changes (including
76
+ * Animated-driven ones) call this instead of queueAllocate/queueResize —
77
+ * nothing here ever touches Yoga. */
78
+ export declare const queueSvgRedraw: (rootWidget: Gtk.Widget) => void;
79
+ export {};