@gtkx/react 0.21.0 → 1.0.0-rc.2

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 (599) hide show
  1. package/README.md +137 -34
  2. package/dist/adw/config.d.ts +2 -0
  3. package/dist/adw/config.d.ts.map +1 -0
  4. package/dist/adw/config.js +2 -0
  5. package/dist/adw/config.js.map +1 -0
  6. package/dist/adw/dialog.d.ts +8 -0
  7. package/dist/adw/dialog.d.ts.map +1 -0
  8. package/dist/adw/dialog.js +25 -0
  9. package/dist/adw/dialog.js.map +1 -0
  10. package/dist/adw/element-behaviors.d.ts +2 -0
  11. package/dist/adw/element-behaviors.d.ts.map +1 -0
  12. package/dist/adw/element-behaviors.js +299 -0
  13. package/dist/adw/element-behaviors.js.map +1 -0
  14. package/dist/adw/element-config.d.ts +9 -0
  15. package/dist/adw/element-config.d.ts.map +1 -0
  16. package/dist/adw/element-config.js +137 -0
  17. package/dist/adw/element-config.js.map +1 -0
  18. package/dist/adw/index.d.ts +4 -0
  19. package/dist/adw/index.d.ts.map +1 -0
  20. package/dist/adw/index.js +3 -0
  21. package/dist/adw/index.js.map +1 -0
  22. package/dist/adw/prop-types.d.ts +29 -0
  23. package/dist/adw/prop-types.d.ts.map +1 -0
  24. package/dist/adw/prop-types.js +2 -0
  25. package/dist/adw/prop-types.js.map +1 -0
  26. package/dist/bootstrap.d.ts +2 -0
  27. package/dist/bootstrap.d.ts.map +1 -0
  28. package/dist/bootstrap.js +5 -0
  29. package/dist/bootstrap.js.map +1 -0
  30. package/dist/components/application.d.ts +10 -0
  31. package/dist/components/application.d.ts.map +1 -0
  32. package/dist/components/application.js +39 -0
  33. package/dist/components/application.js.map +1 -0
  34. package/dist/components/element.d.ts +6 -0
  35. package/dist/components/element.d.ts.map +1 -0
  36. package/dist/components/element.js +29 -0
  37. package/dist/components/element.js.map +1 -0
  38. package/dist/components/window.d.ts +8 -0
  39. package/dist/components/window.d.ts.map +1 -0
  40. package/dist/components/window.js +22 -0
  41. package/dist/components/window.js.map +1 -0
  42. package/dist/config.d.ts +4 -0
  43. package/dist/config.d.ts.map +1 -0
  44. package/dist/config.js +3 -0
  45. package/dist/config.js.map +1 -0
  46. package/dist/element-behaviors.d.ts +2 -0
  47. package/dist/element-behaviors.d.ts.map +1 -0
  48. package/dist/element-behaviors.js +348 -0
  49. package/dist/element-behaviors.js.map +1 -0
  50. package/dist/element-config.d.ts +10 -0
  51. package/dist/element-config.d.ts.map +1 -0
  52. package/dist/element-config.js +146 -0
  53. package/dist/element-config.js.map +1 -0
  54. package/dist/hooks/use-application.d.ts +9 -0
  55. package/dist/hooks/use-application.d.ts.map +1 -0
  56. package/dist/hooks/use-application.js +14 -0
  57. package/dist/hooks/use-application.js.map +1 -0
  58. package/dist/hooks/use-bind-setting.d.ts +23 -0
  59. package/dist/hooks/use-bind-setting.d.ts.map +1 -0
  60. package/dist/hooks/use-bind-setting.js +30 -0
  61. package/dist/hooks/use-bind-setting.js.map +1 -0
  62. package/dist/hooks/use-merged-refs.d.ts +8 -0
  63. package/dist/hooks/use-merged-refs.d.ts.map +1 -0
  64. package/dist/hooks/use-merged-refs.js +48 -0
  65. package/dist/hooks/use-merged-refs.js.map +1 -0
  66. package/dist/hooks/use-object-value.d.ts +5 -0
  67. package/dist/hooks/use-object-value.d.ts.map +1 -0
  68. package/dist/hooks/use-object-value.js +29 -0
  69. package/dist/hooks/use-object-value.js.map +1 -0
  70. package/dist/hooks/use-parent-window.d.ts +9 -0
  71. package/dist/hooks/use-parent-window.d.ts.map +1 -0
  72. package/dist/hooks/use-parent-window.js +8 -0
  73. package/dist/hooks/use-parent-window.js.map +1 -0
  74. package/dist/hooks/use-property.d.ts +14 -0
  75. package/dist/hooks/use-property.d.ts.map +1 -0
  76. package/dist/hooks/use-property.js +14 -0
  77. package/dist/hooks/use-property.js.map +1 -0
  78. package/dist/hooks/use-setting.d.ts +14 -0
  79. package/dist/hooks/use-setting.d.ts.map +1 -0
  80. package/dist/hooks/use-setting.js +20 -0
  81. package/dist/hooks/use-setting.js.map +1 -0
  82. package/dist/hooks/use-signal.d.ts +24 -0
  83. package/dist/hooks/use-signal.d.ts.map +1 -0
  84. package/dist/hooks/use-signal.js +31 -0
  85. package/dist/hooks/use-signal.js.map +1 -0
  86. package/dist/index.d.ts +13 -7
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +9 -7
  89. package/dist/index.js.map +1 -1
  90. package/dist/internal.d.ts +13 -0
  91. package/dist/internal.d.ts.map +1 -0
  92. package/dist/internal.js +12 -0
  93. package/dist/internal.js.map +1 -0
  94. package/dist/prop-types.d.ts +110 -0
  95. package/dist/prop-types.d.ts.map +1 -0
  96. package/dist/prop-types.js +2 -0
  97. package/dist/prop-types.js.map +1 -0
  98. package/dist/reconciler/apply-props.d.ts +11 -0
  99. package/dist/reconciler/apply-props.d.ts.map +1 -0
  100. package/dist/reconciler/apply-props.js +190 -0
  101. package/dist/reconciler/apply-props.js.map +1 -0
  102. package/dist/reconciler/behaviors.d.ts +59 -0
  103. package/dist/reconciler/behaviors.d.ts.map +1 -0
  104. package/dist/reconciler/behaviors.js +172 -0
  105. package/dist/reconciler/behaviors.js.map +1 -0
  106. package/dist/reconciler/child-routing.d.ts +5 -0
  107. package/dist/reconciler/child-routing.d.ts.map +1 -0
  108. package/dist/reconciler/child-routing.js +156 -0
  109. package/dist/reconciler/child-routing.js.map +1 -0
  110. package/dist/reconciler/host-config.d.ts +9 -0
  111. package/dist/reconciler/host-config.d.ts.map +1 -0
  112. package/dist/reconciler/host-config.js +214 -0
  113. package/dist/reconciler/host-config.js.map +1 -0
  114. package/dist/reconciler/instance.d.ts +5 -0
  115. package/dist/reconciler/instance.d.ts.map +1 -0
  116. package/dist/reconciler/instance.js +49 -0
  117. package/dist/reconciler/instance.js.map +1 -0
  118. package/dist/reconciler/metadata.d.ts +17 -0
  119. package/dist/reconciler/metadata.d.ts.map +1 -0
  120. package/dist/reconciler/metadata.js +82 -0
  121. package/dist/reconciler/metadata.js.map +1 -0
  122. package/dist/reconciler/node.d.ts +76 -0
  123. package/dist/reconciler/node.d.ts.map +1 -0
  124. package/dist/reconciler/node.js +53 -0
  125. package/dist/reconciler/node.js.map +1 -0
  126. package/dist/reconciler/placement.d.ts +5 -0
  127. package/dist/reconciler/placement.d.ts.map +1 -0
  128. package/dist/reconciler/placement.js +175 -0
  129. package/dist/reconciler/placement.js.map +1 -0
  130. package/dist/reconciler/registry.d.ts +92 -0
  131. package/dist/reconciler/registry.d.ts.map +1 -0
  132. package/dist/reconciler/registry.js +64 -0
  133. package/dist/reconciler/registry.js.map +1 -0
  134. package/dist/reconciler/root-element.d.ts +11 -0
  135. package/dist/reconciler/root-element.d.ts.map +1 -0
  136. package/dist/reconciler/root-element.js +7 -0
  137. package/dist/reconciler/root-element.js.map +1 -0
  138. package/dist/reconciler/root.d.ts +56 -0
  139. package/dist/reconciler/root.d.ts.map +1 -0
  140. package/dist/reconciler/root.js +109 -0
  141. package/dist/reconciler/root.js.map +1 -0
  142. package/dist/reconciler/signals.d.ts +10 -0
  143. package/dist/reconciler/signals.d.ts.map +1 -0
  144. package/dist/reconciler/signals.js +70 -0
  145. package/dist/reconciler/signals.js.map +1 -0
  146. package/dist/reconciler/text.d.ts +19 -0
  147. package/dist/reconciler/text.d.ts.map +1 -0
  148. package/dist/reconciler/text.js +276 -0
  149. package/dist/reconciler/text.js.map +1 -0
  150. package/dist/utils/accessible-metadata.d.ts +12 -0
  151. package/dist/utils/accessible-metadata.d.ts.map +1 -0
  152. package/dist/utils/accessible-metadata.js +25 -0
  153. package/dist/utils/accessible-metadata.js.map +1 -0
  154. package/dist/utils/accessible-props.d.ts +60 -0
  155. package/dist/utils/accessible-props.d.ts.map +1 -0
  156. package/dist/utils/accessible-props.js +181 -0
  157. package/dist/utils/accessible-props.js.map +1 -0
  158. package/dist/utils/ref-prop.d.ts +15 -0
  159. package/dist/utils/ref-prop.d.ts.map +1 -0
  160. package/dist/utils/ref-prop.js +18 -0
  161. package/dist/utils/ref-prop.js.map +1 -0
  162. package/dist/utils/settings.d.ts +17 -0
  163. package/dist/utils/settings.d.ts.map +1 -0
  164. package/dist/utils/settings.js +37 -0
  165. package/dist/utils/settings.js.map +1 -0
  166. package/dist/utils/variant.d.ts +57 -0
  167. package/dist/utils/variant.d.ts.map +1 -0
  168. package/dist/utils/variant.js +197 -0
  169. package/dist/utils/variant.js.map +1 -0
  170. package/env.d.ts +9 -0
  171. package/package.json +49 -10
  172. package/src/adw/config.ts +1 -0
  173. package/src/adw/dialog.tsx +35 -0
  174. package/src/adw/element-behaviors.ts +379 -0
  175. package/src/adw/element-config.ts +140 -0
  176. package/src/adw/index.ts +4 -0
  177. package/src/adw/prop-types.ts +42 -0
  178. package/src/bootstrap.ts +5 -0
  179. package/src/components/application.tsx +62 -0
  180. package/src/components/element.tsx +47 -0
  181. package/src/components/window.tsx +35 -0
  182. package/src/config.ts +3 -0
  183. package/src/element-behaviors.ts +424 -0
  184. package/src/element-config.ts +148 -0
  185. package/src/env.d.ts +1 -0
  186. package/src/hooks/use-application.ts +19 -0
  187. package/src/hooks/use-bind-setting.ts +51 -0
  188. package/src/hooks/use-merged-refs.ts +64 -0
  189. package/src/hooks/use-object-value.ts +54 -0
  190. package/src/hooks/use-parent-window.ts +11 -0
  191. package/src/hooks/use-property.ts +23 -0
  192. package/src/hooks/use-setting.ts +34 -0
  193. package/src/hooks/use-signal.ts +60 -0
  194. package/src/index.ts +14 -14
  195. package/src/internal.ts +13 -0
  196. package/src/prop-types.ts +142 -0
  197. package/src/reconciler/apply-props.ts +265 -0
  198. package/src/reconciler/behaviors.ts +324 -0
  199. package/src/reconciler/child-routing.ts +202 -0
  200. package/src/reconciler/host-config.ts +278 -0
  201. package/src/reconciler/instance.ts +82 -0
  202. package/src/reconciler/metadata.ts +119 -0
  203. package/src/reconciler/node.ts +161 -0
  204. package/src/reconciler/placement.ts +255 -0
  205. package/src/reconciler/registry.ts +161 -0
  206. package/src/reconciler/root-element.ts +12 -0
  207. package/src/reconciler/root.ts +175 -0
  208. package/src/reconciler/signals.ts +113 -0
  209. package/src/reconciler/text.ts +407 -0
  210. package/src/utils/accessible-metadata.ts +31 -0
  211. package/src/utils/accessible-props.ts +279 -0
  212. package/src/utils/ref-prop.ts +30 -0
  213. package/src/utils/settings.ts +69 -0
  214. package/src/utils/variant.ts +368 -0
  215. package/dist/components/compound.d.ts +0 -40
  216. package/dist/components/compound.d.ts.map +0 -1
  217. package/dist/components/compound.js +0 -46
  218. package/dist/components/compound.js.map +0 -1
  219. package/dist/components/list.d.ts +0 -75
  220. package/dist/components/list.d.ts.map +0 -1
  221. package/dist/components/list.js +0 -81
  222. package/dist/components/list.js.map +0 -1
  223. package/dist/components/slot-widget.d.ts +0 -15
  224. package/dist/components/slot-widget.d.ts.map +0 -1
  225. package/dist/components/slot-widget.js +0 -37
  226. package/dist/components/slot-widget.js.map +0 -1
  227. package/dist/errors.d.ts +0 -15
  228. package/dist/errors.d.ts.map +0 -1
  229. package/dist/errors.js +0 -44
  230. package/dist/errors.js.map +0 -1
  231. package/dist/factory.d.ts +0 -5
  232. package/dist/factory.d.ts.map +0 -1
  233. package/dist/factory.js +0 -37
  234. package/dist/factory.js.map +0 -1
  235. package/dist/generated/compounds.d.ts +0 -2672
  236. package/dist/generated/compounds.d.ts.map +0 -1
  237. package/dist/generated/compounds.js +0 -2624
  238. package/dist/generated/compounds.js.map +0 -1
  239. package/dist/generated/internal.d.ts +0 -16
  240. package/dist/generated/internal.d.ts.map +0 -1
  241. package/dist/generated/internal.js +0 -3638
  242. package/dist/generated/internal.js.map +0 -1
  243. package/dist/generated/jsx.d.ts +0 -17074
  244. package/dist/generated/jsx.d.ts.map +0 -1
  245. package/dist/generated/jsx.js +0 -6715
  246. package/dist/generated/jsx.js.map +0 -1
  247. package/dist/generated/registry.d.ts +0 -5
  248. package/dist/generated/registry.d.ts.map +0 -1
  249. package/dist/generated/registry.js +0 -13
  250. package/dist/generated/registry.js.map +0 -1
  251. package/dist/host-config.d.ts +0 -24
  252. package/dist/host-config.d.ts.map +0 -1
  253. package/dist/host-config.js +0 -172
  254. package/dist/host-config.js.map +0 -1
  255. package/dist/jsx.d.ts +0 -974
  256. package/dist/jsx.d.ts.map +0 -1
  257. package/dist/jsx.js +0 -8
  258. package/dist/jsx.js.map +0 -1
  259. package/dist/metadata.d.ts +0 -5
  260. package/dist/metadata.d.ts.map +0 -1
  261. package/dist/metadata.js +0 -33
  262. package/dist/metadata.js.map +0 -1
  263. package/dist/node.d.ts +0 -25
  264. package/dist/node.d.ts.map +0 -1
  265. package/dist/node.js +0 -85
  266. package/dist/node.js.map +0 -1
  267. package/dist/nodes/adjustable.d.ts +0 -11
  268. package/dist/nodes/adjustable.d.ts.map +0 -1
  269. package/dist/nodes/adjustable.js +0 -46
  270. package/dist/nodes/adjustable.js.map +0 -1
  271. package/dist/nodes/alert-dialog-response.d.ts +0 -15
  272. package/dist/nodes/alert-dialog-response.d.ts.map +0 -1
  273. package/dist/nodes/alert-dialog-response.js +0 -61
  274. package/dist/nodes/alert-dialog-response.js.map +0 -1
  275. package/dist/nodes/alert-dialog.d.ts +0 -14
  276. package/dist/nodes/alert-dialog.d.ts.map +0 -1
  277. package/dist/nodes/alert-dialog.js +0 -41
  278. package/dist/nodes/alert-dialog.js.map +0 -1
  279. package/dist/nodes/animation.d.ts +0 -39
  280. package/dist/nodes/animation.d.ts.map +0 -1
  281. package/dist/nodes/animation.js +0 -326
  282. package/dist/nodes/animation.js.map +0 -1
  283. package/dist/nodes/application.d.ts +0 -12
  284. package/dist/nodes/application.d.ts.map +0 -1
  285. package/dist/nodes/application.js +0 -51
  286. package/dist/nodes/application.js.map +0 -1
  287. package/dist/nodes/calendar.d.ts +0 -18
  288. package/dist/nodes/calendar.d.ts.map +0 -1
  289. package/dist/nodes/calendar.js +0 -28
  290. package/dist/nodes/calendar.js.map +0 -1
  291. package/dist/nodes/color-dialog-button.d.ts +0 -15
  292. package/dist/nodes/color-dialog-button.d.ts.map +0 -1
  293. package/dist/nodes/color-dialog-button.js +0 -43
  294. package/dist/nodes/color-dialog-button.js.map +0 -1
  295. package/dist/nodes/column-view-column.d.ts +0 -36
  296. package/dist/nodes/column-view-column.d.ts.map +0 -1
  297. package/dist/nodes/column-view-column.js +0 -168
  298. package/dist/nodes/column-view-column.js.map +0 -1
  299. package/dist/nodes/container-slot.d.ts +0 -18
  300. package/dist/nodes/container-slot.d.ts.map +0 -1
  301. package/dist/nodes/container-slot.js +0 -81
  302. package/dist/nodes/container-slot.js.map +0 -1
  303. package/dist/nodes/dialog.d.ts +0 -10
  304. package/dist/nodes/dialog.d.ts.map +0 -1
  305. package/dist/nodes/dialog.js +0 -20
  306. package/dist/nodes/dialog.js.map +0 -1
  307. package/dist/nodes/drawing-area.d.ts +0 -19
  308. package/dist/nodes/drawing-area.d.ts.map +0 -1
  309. package/dist/nodes/drawing-area.js +0 -40
  310. package/dist/nodes/drawing-area.js.map +0 -1
  311. package/dist/nodes/event-controller.d.ts +0 -15
  312. package/dist/nodes/event-controller.d.ts.map +0 -1
  313. package/dist/nodes/event-controller.js +0 -73
  314. package/dist/nodes/event-controller.js.map +0 -1
  315. package/dist/nodes/fixed-child.d.ts +0 -19
  316. package/dist/nodes/fixed-child.d.ts.map +0 -1
  317. package/dist/nodes/fixed-child.js +0 -99
  318. package/dist/nodes/fixed-child.js.map +0 -1
  319. package/dist/nodes/font-dialog-button.d.ts +0 -15
  320. package/dist/nodes/font-dialog-button.d.ts.map +0 -1
  321. package/dist/nodes/font-dialog-button.js +0 -76
  322. package/dist/nodes/font-dialog-button.js.map +0 -1
  323. package/dist/nodes/grid-child.d.ts +0 -19
  324. package/dist/nodes/grid-child.d.ts.map +0 -1
  325. package/dist/nodes/grid-child.js +0 -94
  326. package/dist/nodes/grid-child.js.map +0 -1
  327. package/dist/nodes/internal/accessible.d.ts +0 -5
  328. package/dist/nodes/internal/accessible.d.ts.map +0 -1
  329. package/dist/nodes/internal/accessible.js +0 -119
  330. package/dist/nodes/internal/accessible.js.map +0 -1
  331. package/dist/nodes/internal/bound-item.d.ts +0 -4
  332. package/dist/nodes/internal/bound-item.d.ts.map +0 -1
  333. package/dist/nodes/internal/bound-item.js +0 -2
  334. package/dist/nodes/internal/bound-item.js.map +0 -1
  335. package/dist/nodes/internal/construct.d.ts +0 -3
  336. package/dist/nodes/internal/construct.d.ts.map +0 -1
  337. package/dist/nodes/internal/construct.js +0 -44
  338. package/dist/nodes/internal/construct.js.map +0 -1
  339. package/dist/nodes/internal/predicates.d.ts +0 -51
  340. package/dist/nodes/internal/predicates.d.ts.map +0 -1
  341. package/dist/nodes/internal/predicates.js +0 -36
  342. package/dist/nodes/internal/predicates.js.map +0 -1
  343. package/dist/nodes/internal/props.d.ts +0 -6
  344. package/dist/nodes/internal/props.d.ts.map +0 -1
  345. package/dist/nodes/internal/props.js +0 -43
  346. package/dist/nodes/internal/props.js.map +0 -1
  347. package/dist/nodes/internal/signal-store.d.ts +0 -22
  348. package/dist/nodes/internal/signal-store.d.ts.map +0 -1
  349. package/dist/nodes/internal/signal-store.js +0 -98
  350. package/dist/nodes/internal/signal-store.js.map +0 -1
  351. package/dist/nodes/internal/text-buffer-controller.d.ts +0 -40
  352. package/dist/nodes/internal/text-buffer-controller.d.ts.map +0 -1
  353. package/dist/nodes/internal/text-buffer-controller.js +0 -327
  354. package/dist/nodes/internal/text-buffer-controller.js.map +0 -1
  355. package/dist/nodes/internal/widget.d.ts +0 -8
  356. package/dist/nodes/internal/widget.d.ts.map +0 -1
  357. package/dist/nodes/internal/widget.js +0 -68
  358. package/dist/nodes/internal/widget.js.map +0 -1
  359. package/dist/nodes/level-bar.d.ts +0 -12
  360. package/dist/nodes/level-bar.d.ts.map +0 -1
  361. package/dist/nodes/level-bar.js +0 -24
  362. package/dist/nodes/level-bar.js.map +0 -1
  363. package/dist/nodes/list-item-node.d.ts +0 -12
  364. package/dist/nodes/list-item-node.d.ts.map +0 -1
  365. package/dist/nodes/list-item-node.js +0 -45
  366. package/dist/nodes/list-item-node.js.map +0 -1
  367. package/dist/nodes/list.d.ts +0 -100
  368. package/dist/nodes/list.d.ts.map +0 -1
  369. package/dist/nodes/list.js +0 -950
  370. package/dist/nodes/list.js.map +0 -1
  371. package/dist/nodes/menu.d.ts +0 -7
  372. package/dist/nodes/menu.d.ts.map +0 -1
  373. package/dist/nodes/menu.js +0 -20
  374. package/dist/nodes/menu.js.map +0 -1
  375. package/dist/nodes/models/menu.d.ts +0 -47
  376. package/dist/nodes/models/menu.d.ts.map +0 -1
  377. package/dist/nodes/models/menu.js +0 -240
  378. package/dist/nodes/models/menu.js.map +0 -1
  379. package/dist/nodes/navigation-page.d.ts +0 -19
  380. package/dist/nodes/navigation-page.d.ts.map +0 -1
  381. package/dist/nodes/navigation-page.js +0 -129
  382. package/dist/nodes/navigation-page.js.map +0 -1
  383. package/dist/nodes/navigation-view.d.ts +0 -19
  384. package/dist/nodes/navigation-view.d.ts.map +0 -1
  385. package/dist/nodes/navigation-view.js +0 -51
  386. package/dist/nodes/navigation-view.js.map +0 -1
  387. package/dist/nodes/notebook-page-tab.d.ts +0 -15
  388. package/dist/nodes/notebook-page-tab.d.ts.map +0 -1
  389. package/dist/nodes/notebook-page-tab.js +0 -40
  390. package/dist/nodes/notebook-page-tab.js.map +0 -1
  391. package/dist/nodes/notebook-page.d.ts +0 -29
  392. package/dist/nodes/notebook-page.d.ts.map +0 -1
  393. package/dist/nodes/notebook-page.js +0 -151
  394. package/dist/nodes/notebook-page.js.map +0 -1
  395. package/dist/nodes/notebook.d.ts +0 -16
  396. package/dist/nodes/notebook.d.ts.map +0 -1
  397. package/dist/nodes/notebook.js +0 -31
  398. package/dist/nodes/notebook.js.map +0 -1
  399. package/dist/nodes/overlay-child.d.ts +0 -20
  400. package/dist/nodes/overlay-child.d.ts.map +0 -1
  401. package/dist/nodes/overlay-child.js +0 -109
  402. package/dist/nodes/overlay-child.js.map +0 -1
  403. package/dist/nodes/popover-menu.d.ts +0 -19
  404. package/dist/nodes/popover-menu.d.ts.map +0 -1
  405. package/dist/nodes/popover-menu.js +0 -54
  406. package/dist/nodes/popover-menu.js.map +0 -1
  407. package/dist/nodes/scale.d.ts +0 -10
  408. package/dist/nodes/scale.d.ts.map +0 -1
  409. package/dist/nodes/scale.js +0 -19
  410. package/dist/nodes/scale.js.map +0 -1
  411. package/dist/nodes/scrolled-window.d.ts +0 -11
  412. package/dist/nodes/scrolled-window.d.ts.map +0 -1
  413. package/dist/nodes/scrolled-window.js +0 -18
  414. package/dist/nodes/scrolled-window.js.map +0 -1
  415. package/dist/nodes/search-bar.d.ts +0 -11
  416. package/dist/nodes/search-bar.d.ts.map +0 -1
  417. package/dist/nodes/search-bar.js +0 -16
  418. package/dist/nodes/search-bar.js.map +0 -1
  419. package/dist/nodes/shortcut.d.ts +0 -19
  420. package/dist/nodes/shortcut.d.ts.map +0 -1
  421. package/dist/nodes/shortcut.js +0 -72
  422. package/dist/nodes/shortcut.js.map +0 -1
  423. package/dist/nodes/slot.d.ts +0 -21
  424. package/dist/nodes/slot.d.ts.map +0 -1
  425. package/dist/nodes/slot.js +0 -102
  426. package/dist/nodes/slot.js.map +0 -1
  427. package/dist/nodes/source-view.d.ts +0 -18
  428. package/dist/nodes/source-view.d.ts.map +0 -1
  429. package/dist/nodes/source-view.js +0 -94
  430. package/dist/nodes/source-view.js.map +0 -1
  431. package/dist/nodes/spin-row.d.ts +0 -14
  432. package/dist/nodes/spin-row.d.ts.map +0 -1
  433. package/dist/nodes/spin-row.js +0 -46
  434. package/dist/nodes/spin-row.js.map +0 -1
  435. package/dist/nodes/stack-page.d.ts +0 -22
  436. package/dist/nodes/stack-page.d.ts.map +0 -1
  437. package/dist/nodes/stack-page.js +0 -140
  438. package/dist/nodes/stack-page.js.map +0 -1
  439. package/dist/nodes/stack.d.ts +0 -13
  440. package/dist/nodes/stack.d.ts.map +0 -1
  441. package/dist/nodes/stack.js +0 -21
  442. package/dist/nodes/stack.js.map +0 -1
  443. package/dist/nodes/switch-row.d.ts +0 -11
  444. package/dist/nodes/switch-row.d.ts.map +0 -1
  445. package/dist/nodes/switch-row.js +0 -15
  446. package/dist/nodes/switch-row.js.map +0 -1
  447. package/dist/nodes/text-anchor.d.ts +0 -23
  448. package/dist/nodes/text-anchor.d.ts.map +0 -1
  449. package/dist/nodes/text-anchor.js +0 -74
  450. package/dist/nodes/text-anchor.js.map +0 -1
  451. package/dist/nodes/text-content.d.ts +0 -12
  452. package/dist/nodes/text-content.d.ts.map +0 -1
  453. package/dist/nodes/text-content.js +0 -2
  454. package/dist/nodes/text-content.js.map +0 -1
  455. package/dist/nodes/text-paintable.d.ts +0 -19
  456. package/dist/nodes/text-paintable.d.ts.map +0 -1
  457. package/dist/nodes/text-paintable.js +0 -42
  458. package/dist/nodes/text-paintable.js.map +0 -1
  459. package/dist/nodes/text-segment.d.ts +0 -18
  460. package/dist/nodes/text-segment.d.ts.map +0 -1
  461. package/dist/nodes/text-segment.js +0 -38
  462. package/dist/nodes/text-segment.js.map +0 -1
  463. package/dist/nodes/text-tag.d.ts +0 -38
  464. package/dist/nodes/text-tag.d.ts.map +0 -1
  465. package/dist/nodes/text-tag.js +0 -247
  466. package/dist/nodes/text-tag.js.map +0 -1
  467. package/dist/nodes/text-view.d.ts +0 -29
  468. package/dist/nodes/text-view.d.ts.map +0 -1
  469. package/dist/nodes/text-view.js +0 -80
  470. package/dist/nodes/text-view.js.map +0 -1
  471. package/dist/nodes/toggle-group.d.ts +0 -17
  472. package/dist/nodes/toggle-group.d.ts.map +0 -1
  473. package/dist/nodes/toggle-group.js +0 -65
  474. package/dist/nodes/toggle-group.js.map +0 -1
  475. package/dist/nodes/toggle.d.ts +0 -16
  476. package/dist/nodes/toggle.d.ts.map +0 -1
  477. package/dist/nodes/toggle.js +0 -61
  478. package/dist/nodes/toggle.js.map +0 -1
  479. package/dist/nodes/virtual.d.ts +0 -7
  480. package/dist/nodes/virtual.d.ts.map +0 -1
  481. package/dist/nodes/virtual.js +0 -9
  482. package/dist/nodes/virtual.js.map +0 -1
  483. package/dist/nodes/web-view.d.ts +0 -11
  484. package/dist/nodes/web-view.d.ts.map +0 -1
  485. package/dist/nodes/web-view.js +0 -16
  486. package/dist/nodes/web-view.js.map +0 -1
  487. package/dist/nodes/widget.d.ts +0 -26
  488. package/dist/nodes/widget.d.ts.map +0 -1
  489. package/dist/nodes/widget.js +0 -308
  490. package/dist/nodes/widget.js.map +0 -1
  491. package/dist/nodes/window.d.ts +0 -31
  492. package/dist/nodes/window.d.ts.map +0 -1
  493. package/dist/nodes/window.js +0 -122
  494. package/dist/nodes/window.js.map +0 -1
  495. package/dist/portal.d.ts +0 -29
  496. package/dist/portal.d.ts.map +0 -1
  497. package/dist/portal.js +0 -35
  498. package/dist/portal.js.map +0 -1
  499. package/dist/reconciler.d.ts +0 -34
  500. package/dist/reconciler.d.ts.map +0 -1
  501. package/dist/reconciler.js +0 -48
  502. package/dist/reconciler.js.map +0 -1
  503. package/dist/registry.d.ts +0 -18
  504. package/dist/registry.d.ts.map +0 -1
  505. package/dist/registry.js +0 -98
  506. package/dist/registry.js.map +0 -1
  507. package/dist/render.d.ts +0 -117
  508. package/dist/render.d.ts.map +0 -1
  509. package/dist/render.js +0 -159
  510. package/dist/render.js.map +0 -1
  511. package/dist/types.d.ts +0 -6
  512. package/dist/types.d.ts.map +0 -1
  513. package/dist/types.js +0 -2
  514. package/dist/types.js.map +0 -1
  515. package/dist/use-property.d.ts +0 -29
  516. package/dist/use-property.d.ts.map +0 -1
  517. package/dist/use-property.js +0 -44
  518. package/dist/use-property.js.map +0 -1
  519. package/dist/use-setting.d.ts +0 -36
  520. package/dist/use-setting.d.ts.map +0 -1
  521. package/dist/use-setting.js +0 -68
  522. package/dist/use-setting.js.map +0 -1
  523. package/src/components/compound.tsx +0 -57
  524. package/src/components/list.tsx +0 -140
  525. package/src/components/slot-widget.tsx +0 -46
  526. package/src/errors.ts +0 -53
  527. package/src/factory.ts +0 -62
  528. package/src/generated/compounds.ts +0 -2741
  529. package/src/generated/internal.ts +0 -3642
  530. package/src/generated/jsx.ts +0 -17383
  531. package/src/generated/registry.ts +0 -17
  532. package/src/host-config.ts +0 -219
  533. package/src/jsx.ts +0 -1033
  534. package/src/metadata.ts +0 -43
  535. package/src/node.ts +0 -107
  536. package/src/nodes/adjustable.ts +0 -68
  537. package/src/nodes/alert-dialog-response.ts +0 -78
  538. package/src/nodes/alert-dialog.ts +0 -55
  539. package/src/nodes/animation.ts +0 -409
  540. package/src/nodes/application.ts +0 -61
  541. package/src/nodes/calendar.ts +0 -42
  542. package/src/nodes/color-dialog-button.ts +0 -69
  543. package/src/nodes/column-view-column.ts +0 -189
  544. package/src/nodes/container-slot.ts +0 -100
  545. package/src/nodes/dialog.ts +0 -25
  546. package/src/nodes/drawing-area.ts +0 -53
  547. package/src/nodes/event-controller.ts +0 -96
  548. package/src/nodes/fixed-child.ts +0 -122
  549. package/src/nodes/font-dialog-button.ts +0 -107
  550. package/src/nodes/grid-child.ts +0 -116
  551. package/src/nodes/internal/accessible.ts +0 -155
  552. package/src/nodes/internal/bound-item.ts +0 -4
  553. package/src/nodes/internal/construct.ts +0 -60
  554. package/src/nodes/internal/predicates.ts +0 -80
  555. package/src/nodes/internal/props.ts +0 -51
  556. package/src/nodes/internal/signal-store.ts +0 -141
  557. package/src/nodes/internal/text-buffer-controller.ts +0 -417
  558. package/src/nodes/internal/widget.ts +0 -74
  559. package/src/nodes/level-bar.ts +0 -36
  560. package/src/nodes/list-item-node.ts +0 -53
  561. package/src/nodes/list.ts +0 -1082
  562. package/src/nodes/menu.ts +0 -27
  563. package/src/nodes/models/menu.ts +0 -314
  564. package/src/nodes/navigation-page.ts +0 -154
  565. package/src/nodes/navigation-view.ts +0 -66
  566. package/src/nodes/notebook-page-tab.ts +0 -55
  567. package/src/nodes/notebook-page.ts +0 -189
  568. package/src/nodes/notebook.ts +0 -42
  569. package/src/nodes/overlay-child.ts +0 -130
  570. package/src/nodes/popover-menu.ts +0 -67
  571. package/src/nodes/scale.ts +0 -28
  572. package/src/nodes/scrolled-window.ts +0 -23
  573. package/src/nodes/search-bar.ts +0 -27
  574. package/src/nodes/shortcut.ts +0 -86
  575. package/src/nodes/slot.ts +0 -138
  576. package/src/nodes/source-view.ts +0 -130
  577. package/src/nodes/spin-row.ts +0 -72
  578. package/src/nodes/stack-page.ts +0 -170
  579. package/src/nodes/stack.ts +0 -35
  580. package/src/nodes/switch-row.ts +0 -26
  581. package/src/nodes/text-anchor.ts +0 -88
  582. package/src/nodes/text-content.ts +0 -14
  583. package/src/nodes/text-paintable.ts +0 -51
  584. package/src/nodes/text-segment.ts +0 -55
  585. package/src/nodes/text-tag.ts +0 -298
  586. package/src/nodes/text-view.ts +0 -100
  587. package/src/nodes/toggle-group.ts +0 -81
  588. package/src/nodes/toggle.ts +0 -72
  589. package/src/nodes/virtual.ts +0 -16
  590. package/src/nodes/web-view.ts +0 -22
  591. package/src/nodes/widget.ts +0 -369
  592. package/src/nodes/window.ts +0 -172
  593. package/src/portal.ts +0 -37
  594. package/src/reconciler.ts +0 -52
  595. package/src/registry.ts +0 -119
  596. package/src/render.tsx +0 -192
  597. package/src/types.ts +0 -13
  598. package/src/use-property.ts +0 -58
  599. package/src/use-setting.ts +0 -96
package/README.md CHANGED
@@ -1,70 +1,173 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/eugeniodepalo/gtkx/main/logo.svg" alt="GTKX" width="100" height="100">
2
+ <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/logo.svg" alt="GTKX" width="100" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">GTKX</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Linux application development for the modern age powered by GTK4 and React</strong>
8
+ The React framework for Linux.<br />
9
+ Build GTK4 and Adwaita apps in TypeScript, with React components and hooks driving GNOME's own widgets. What you ship is a GNOME app.
9
10
  </p>
10
11
 
11
12
  <p align="center">
12
- <a href="https://www.npmjs.com/package/@gtkx/react"><img src="https://img.shields.io/npm/v/@gtkx/react.svg" alt="npm version"></a>
13
- <a href="https://github.com/gtkx-org/gtkx/actions"><img src="https://img.shields.io/github/actions/workflow/status/eugeniodepalo/gtkx/ci.yml" alt="CI"></a>
14
- <a href="https://github.com/gtkx-org/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License"></a>
15
- <a href="https://github.com/gtkx-org/gtkx/discussions"><img src="https://img.shields.io/badge/discussions-GitHub-blue" alt="GitHub Discussions"></a>
13
+ <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/v/create-gtkx?color=cb3837&logo=npm&label=create-gtkx" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/dm/create-gtkx?color=cb3837&logo=npm&label=downloads" alt="npm downloads" /></a>
15
+ <img src="https://img.shields.io/badge/node-%E2%89%A524-339933?logo=node.js&logoColor=white" alt="Node >= 24" />
16
+ <a href="https://github.com/gtkx-org/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License: MPL-2.0" /></a>
17
+ <a href="https://github.com/gtkx-org/gtkx/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/gtkx-org/gtkx/ci.yml?branch=main&logo=github&label=CI" alt="CI status" /></a>
18
+ <img src="https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white" alt="TypeScript" />
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://gtkx.dev">Homepage</a> &middot;
23
+ <a href="https://gtkx.dev/guide/why-gtkx">Documentation</a> &middot;
24
+ <a href="https://github.com/gtkx-org/gtkx/tree/main/examples">Examples</a> &middot;
25
+ <a href="https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md">Contributing</a>
16
26
  </p>
17
27
 
18
28
  ---
19
29
 
30
+ GTKX generates fully typed bindings for the entire GTK4 and Adwaita surface directly from GObject-Introspection. On top of those bindings you get the React programming model: components and hooks driving GObject instances, with Fast Refresh while you develop.
31
+
20
32
  <p align="center">
21
- <img src="https://raw.githubusercontent.com/eugeniodepalo/gtkx/main/demo.gif" alt="GTKX Demo" width="100%">
33
+ <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/examples/tutorial/assets/screenshot.png" alt="The Tasks app: an Adwaita window with a sidebar of smart views and colored lists on the left, and a boxed task list on the right." />
22
34
  </p>
23
35
 
24
- ---
36
+ <p align="center">
37
+ <em>The Tasks app you build in the <a href="https://gtkx.dev/tutorial/">tutorial</a>.</em>
38
+ </p>
39
+
40
+ ## Demo
41
+
42
+ The intrinsic elements in this snippet render GTK4 widgets, and ordinary React hooks and events drive them:
43
+
44
+ ```tsx
45
+ import * as Gtk from "@gtkx/gi/gtk";
46
+ import { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
47
+ import { createRoot, quit } from "@gtkx/react";
48
+ import { useState } from "react";
49
+
50
+ const Counter = () => {
51
+ const [count, setCount] = useState(0);
52
+
53
+ return (
54
+ <GtkApplicationWindow
55
+ title="Hello GTKX"
56
+ defaultWidth={400}
57
+ defaultHeight={300}
58
+ onCloseRequest={quit}
59
+ >
60
+ <GtkBox
61
+ orientation={Gtk.Orientation.VERTICAL}
62
+ spacing={20}
63
+ marginTop={40}
64
+ marginBottom={40}
65
+ marginStart={40}
66
+ marginEnd={40}
67
+ valign={Gtk.Align.CENTER}
68
+ halign={Gtk.Align.CENTER}
69
+ >
70
+ <GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
71
+ <GtkLabel cssClasses={["title-2"]}>{`Count: ${count}`}</GtkLabel>
72
+ <GtkButton
73
+ label="Increment"
74
+ onClicked={() => setCount((c) => c + 1)}
75
+ cssClasses={["suggested-action", "pill"]}
76
+ />
77
+ </GtkBox>
78
+ </GtkApplicationWindow>
79
+ );
80
+ };
81
+
82
+ const App = () => (
83
+ <GtkApplication>
84
+ <Counter />
85
+ </GtkApplication>
86
+ );
87
+
88
+ createRoot().render(<App />);
89
+ ```
90
+
91
+ This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world) example, with `app.tsx` and `index.tsx` combined into a single snippet. `@gtkx/gi` and `@gtkx/jsx` are per-project bindings generated by the CLI, not packages you install from npm.
92
+
93
+ ## Why GTKX
94
+
95
+ ### A declarative layer for the GNOME stack
96
+
97
+ GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing re-renders that interface when your application state changes, and nothing hot-reloads it as you work. GTKX adds that missing layer, and the tooling around it, on top of the stack you already know:
98
+
99
+ - a React reconciler that exposes every GObject as a JSX element,
100
+ - a CLI for scaffolding, development, and production builds,
101
+ - a dev server with Fast Refresh that patches your running UI in place,
102
+ - CSS-in-JS styling and high-level list, grid, and dialog components,
103
+ - a Testing Library-style API for querying and driving your widgets in tests,
104
+ - and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
105
+
106
+ ### The full GNOME API surface
107
+
108
+ React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX exposes it: GTK4, Adwaita, and any other GObject-Introspection library on your system. Linux-only by design.
109
+
110
+ ### Why Node.js, and why generated bindings
111
+
112
+ GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [why-gtkx guide](https://gtkx.dev/guide/why-gtkx) covers the comparison in full.
25
113
 
26
- GTKX is a modern framework for building native Linux applications using React and GTK. It provides the full range of GTK4, GLib, and Node.js APIs, allowing you to create rich, performant desktop applications with the tools and libraries you already know.
114
+ GTKX generates the TypeScript types and the native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. Codegen covers the whole GTK4 and Adwaita surface.
27
115
 
28
- ## Features
116
+ At runtime, the native Rust core calls straight into the system GTK4, Adwaita, and GLib libraries through libffi, without loading libgirepository at all.
29
117
 
30
- - **React 19** — Hooks, concurrent features, and the component model you know
31
- - **Fully native Node.js environment** - Runs on vanilla Node.js, with the help of a Neon native module
32
- - **TypeScript first** — Full type safety with auto-generated bindings
33
- - **Rich GLib support** — Provides bindings for most modern GLib/GObject libraries, including Adwaita
34
- - **HMR** — Fast refresh during development powered by Vite
35
- - **CSS-in-JS styling** — Easy styling with GTK CSS powered by Emotion
36
- - **Testing library** — Testing Library-inspired API for testing components and E2E
118
+ ## Quick start
37
119
 
38
- ## Quick Start
120
+ GTKX is Linux-only and needs Node.js 24 or later. See [Requirements](#requirements).
39
121
 
40
- ```bash
41
- npx @gtkx/cli create my-app
122
+ Scaffold a new app with the `create-gtkx` initializer:
123
+
124
+ ```sh
125
+ npm create gtkx@rc
126
+ ```
127
+
128
+ The same command works with other package managers: `pnpm create gtkx@rc` or `yarn create gtkx@rc`.
129
+
130
+ Then run your new app:
131
+
132
+ ```sh
42
133
  cd my-app
43
134
  npm run dev
44
135
  ```
45
136
 
46
- ## Examples
137
+ To go further, follow the [tutorial](https://gtkx.dev/tutorial/).
47
138
 
48
- Explore complete applications in the [`examples/`](./examples) directory:
139
+ ## Documentation
49
140
 
50
- - **[hello-world](./examples/hello-world)** Minimal application showing a counter
51
- - **[gtk-demo](./examples/gtk-demo)** — Full replica of the official GTK demo app
52
- - **[tutorial](./examples/tutorial)** — Notes app from the tutorial with GSettings and Adwaita
53
- - **[browser](./examples/browser)** — Simple browser using WebKitWebView
141
+ The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tutorial that builds a complete GNOME app, from scaffolding to packaging and shipping, plus guides and a full API reference.
54
142
 
55
- ## Documentation
143
+ **[Read the docs &rarr;](https://gtkx.dev/guide/why-gtkx)**
56
144
 
57
- Visit [https://gtkx.dev](https://gtkx.dev) for the full documentation.
145
+ ## Requirements
58
146
 
59
- ## Contributing
147
+ GTKX is Linux-only. You need:
60
148
 
61
- Contributions are welcome! Please see the [contributing guidelines](./CONTRIBUTING.md).
149
+ - Linux with the GTK4 (4.20 or later), Adwaita (1.8 or later), and GLib development libraries
150
+ - Node.js 24 or later
62
151
 
63
- ## Community
152
+ The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
153
+
154
+ ## Examples
155
+
156
+ Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
157
+
158
+ - [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the counter above.
159
+ - [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): a React port of the official GTK4 widget showcase, covering lists, dialogs, gestures, CSS, and OpenGL.
160
+ - [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): a WebKitWebView-based web browser.
161
+ - [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
162
+
163
+ ## Status
164
+
165
+ GTKX 1.0 is at the release candidate stage.
166
+
167
+ ## Contributing
64
168
 
65
- - [GitHub Discussions](https://github.com/gtkx-org/gtkx/discussions) Questions, ideas, and general discussion
66
- - [Issue Tracker](https://github.com/gtkx-org/gtkx/issues) — Bug reports and feature requests
169
+ Contributions are welcome. See [CONTRIBUTING.md](https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md), the [Code of Conduct](https://github.com/gtkx-org/gtkx/blob/main/CODE_OF_CONDUCT.md), and the [security policy](https://github.com/gtkx-org/gtkx/blob/main/SECURITY.md). Building the repo needs Node.js 24 or later, pnpm, and a Rust toolchain.
67
170
 
68
171
  ## License
69
172
 
70
- [MPL-2.0](./LICENSE)
173
+ GTKX is licensed under [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
@@ -0,0 +1,2 @@
1
+ export { BUILTIN_ELEMENTS } from "./element-config.js";
2
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/adw/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { BUILTIN_ELEMENTS } from "./element-config.js";
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/adw/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { BUILTIN_ELEMENTS } from \"./element-config.js\";\n"]}
@@ -0,0 +1,8 @@
1
+ import type * as Adw from "@gtkx/gi/adw";
2
+ import { type ElementType, type ReactNode, type Ref } from "react";
3
+ type DialogComponentProps = {
4
+ ref?: Ref<Adw.Dialog | null> | undefined;
5
+ };
6
+ declare const createDialogComponent: (Component: ElementType) => ((props: DialogComponentProps) => ReactNode);
7
+ export { createDialogComponent };
8
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/adw/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAA6B,MAAM,OAAO,CAAC;AAM9F,KAAK,oBAAoB,GAAG;IACxB,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,qBAAqB,GAAI,WAAW,WAAW,KAAG,CAAC,CAAC,KAAK,EAAE,oBAAoB,KAAK,SAAS,CAqBlG,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useLayoutEffect, useState } from "react";
3
+ import { useMergedRef } from "../hooks/use-merged-refs.js";
4
+ import { useParentWindow } from "../hooks/use-parent-window.js";
5
+ import { rootElement } from "../reconciler/root-element.js";
6
+ import { createPortal } from "../reconciler/root.js";
7
+ const createDialogComponent = (Component) => {
8
+ return ({ ref, ...rest }) => {
9
+ const parent = useParentWindow();
10
+ const [dialog, setDialog] = useState(null);
11
+ useLayoutEffect(() => {
12
+ if (!dialog) {
13
+ return;
14
+ }
15
+ dialog.present(parent);
16
+ return () => {
17
+ dialog.forceClose();
18
+ };
19
+ }, [dialog, parent]);
20
+ const mergedRef = useMergedRef(ref, setDialog);
21
+ return createPortal(_jsx(Component, { ref: mergedRef, ...rest }), rootElement);
22
+ };
23
+ };
24
+ export { createDialogComponent };
25
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/adw/dialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAA8C,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMrD,MAAM,qBAAqB,GAAG,CAAC,SAAsB,EAAgD,EAAE;IACnG,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,EAAwB,EAAa,EAAE;QACzD,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;QACjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAoB,IAAI,CAAC,CAAC;QAE9D,eAAe,CAAC,GAAG,EAAE;YACjB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,OAAO;YACX,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAEvB,OAAO,GAAG,EAAE;gBACR,MAAM,CAAC,UAAU,EAAE,CAAC;YACxB,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAErB,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE/C,OAAO,YAAY,CAAC,KAAC,SAAS,IAAC,GAAG,EAAE,SAAS,KAAM,IAAI,GAAI,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import type * as Adw from \"@gtkx/gi/adw\";\nimport { type ElementType, type ReactNode, type Ref, useLayoutEffect, useState } from \"react\";\nimport { useMergedRef } from \"../hooks/use-merged-refs.js\";\nimport { useParentWindow } from \"../hooks/use-parent-window.js\";\nimport { rootElement } from \"../reconciler/root-element.js\";\nimport { createPortal } from \"../reconciler/root.js\";\n\ntype DialogComponentProps = {\n ref?: Ref<Adw.Dialog | null> | undefined;\n};\n\nconst createDialogComponent = (Component: ElementType): ((props: DialogComponentProps) => ReactNode) => {\n return ({ ref, ...rest }: DialogComponentProps): ReactNode => {\n const parent = useParentWindow();\n const [dialog, setDialog] = useState<Adw.Dialog | null>(null);\n\n useLayoutEffect(() => {\n if (!dialog) {\n return;\n }\n\n dialog.present(parent);\n\n return () => {\n dialog.forceClose();\n };\n }, [dialog, parent]);\n\n const mergedRef = useMergedRef(ref, setDialog);\n\n return createPortal(<Component ref={mergedRef} {...rest} />, rootElement);\n };\n};\n\nexport { createDialogComponent };\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=element-behaviors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-behaviors.d.ts","sourceRoot":"","sources":["../../src/adw/element-behaviors.ts"],"names":[],"mappings":""}
@@ -0,0 +1,299 @@
1
+ import * as Adw from "@gtkx/gi/adw";
2
+ import { addRemoveSlot, adoptedChildrenSlot, boxSlot, childSetterSlot, contentSetterSlot, deferred, list, slot, } from "../reconciler/behaviors.js";
3
+ import { registerElements } from "../reconciler/registry.js";
4
+ import { BUILTIN_ELEMENTS } from "./element-config.js";
5
+ const childSetter = childSetterSlot();
6
+ const contentSetter = contentSetterSlot();
7
+ const breakpoints = slot("breakpoints", "AdwBreakpoint", {
8
+ attach: (host, breakpoint) => {
9
+ host.addBreakpoint(breakpoint);
10
+ },
11
+ });
12
+ const prefixSuffix = [
13
+ slot("prefix", "GtkWidget", {
14
+ attach: (row, child) => {
15
+ row.addPrefix(child);
16
+ },
17
+ detach: (row, child) => {
18
+ row.remove(child);
19
+ },
20
+ }),
21
+ slot("suffix", "GtkWidget", {
22
+ attach: (row, child) => {
23
+ row.addSuffix(child);
24
+ },
25
+ detach: (row, child) => {
26
+ row.remove(child);
27
+ },
28
+ }),
29
+ ];
30
+ const pageHostChildren = addRemoveSlot("children", "AdwPreferencesPage", (host, page) => {
31
+ host.add(page);
32
+ }, (host, page) => {
33
+ host.remove(page);
34
+ });
35
+ /** The runtime half of the built-in element configuration: the behaviors bound to each GObject type. */
36
+ const BUILTIN_BEHAVIORS = {
37
+ AdwBin: {
38
+ behaviors: [childSetter],
39
+ },
40
+ AdwClamp: {
41
+ behaviors: [childSetter],
42
+ },
43
+ AdwClampScrollable: {
44
+ behaviors: [childSetter],
45
+ },
46
+ AdwNavigationPage: {
47
+ behaviors: [childSetter],
48
+ },
49
+ AdwSplitButton: {
50
+ behaviors: [childSetter],
51
+ },
52
+ AdwStatusPage: {
53
+ behaviors: [childSetter],
54
+ },
55
+ AdwTabOverview: {
56
+ behaviors: [childSetter],
57
+ },
58
+ AdwToastOverlay: {
59
+ behaviors: [childSetter],
60
+ },
61
+ AdwToggle: {
62
+ behaviors: [childSetter],
63
+ },
64
+ AdwBottomSheet: {
65
+ behaviors: [contentSetter],
66
+ },
67
+ AdwFlap: {
68
+ behaviors: [contentSetter],
69
+ },
70
+ AdwOverlaySplitView: {
71
+ behaviors: [contentSetter],
72
+ },
73
+ AdwDialog: {
74
+ behaviors: [childSetter, breakpoints],
75
+ },
76
+ AdwApplicationWindow: {
77
+ behaviors: [contentSetter, breakpoints],
78
+ },
79
+ AdwWindow: {
80
+ behaviors: [contentSetter, breakpoints],
81
+ },
82
+ AdwBreakpointBin: {
83
+ behaviors: [
84
+ childSetter,
85
+ addRemoveSlot("breakpoints", "AdwBreakpoint", (bin, breakpoint) => {
86
+ bin.addBreakpoint(breakpoint);
87
+ }, (bin, breakpoint) => {
88
+ bin.removeBreakpoint(breakpoint);
89
+ }),
90
+ ],
91
+ },
92
+ AdwActionRow: {
93
+ behaviors: prefixSuffix,
94
+ },
95
+ AdwEntryRow: {
96
+ behaviors: prefixSuffix,
97
+ },
98
+ AdwExpanderRow: {
99
+ behaviors: [
100
+ ...prefixSuffix,
101
+ addRemoveSlot("rows", "GtkWidget", (row, child) => {
102
+ row.addRow(child);
103
+ }, (row, child) => {
104
+ row.remove(child);
105
+ }),
106
+ addRemoveSlot("actions", "GtkWidget", (row, child) => {
107
+ row.addAction(child);
108
+ }, (row, child) => {
109
+ row.remove(child);
110
+ }),
111
+ ],
112
+ },
113
+ AdwNavigationSplitView: {
114
+ behaviors: [contentSetterSlot("AdwNavigationPage")],
115
+ },
116
+ AdwLeaflet: {
117
+ behaviors: [boxSlot()],
118
+ },
119
+ AdwWrapBox: {
120
+ behaviors: [boxSlot()],
121
+ },
122
+ AdwCarousel: {
123
+ behaviors: [
124
+ slot("children", "GtkWidget", {
125
+ attach: (carousel, child, info) => {
126
+ carousel.insert(child, info.index);
127
+ },
128
+ detach: (carousel, child) => {
129
+ carousel.remove(child);
130
+ },
131
+ reorder: (carousel, child, info) => {
132
+ carousel.reorder(child, info.index);
133
+ },
134
+ }),
135
+ ],
136
+ },
137
+ AdwPreferencesPage: {
138
+ behaviors: [
139
+ slot("children", "AdwPreferencesGroup", {
140
+ attach: (page, group, info) => {
141
+ page.insert(group, info.index);
142
+ },
143
+ detach: (page, group) => {
144
+ page.remove(group);
145
+ },
146
+ }),
147
+ ],
148
+ },
149
+ AdwPreferencesDialog: {
150
+ behaviors: [pageHostChildren],
151
+ },
152
+ AdwPreferencesWindow: {
153
+ behaviors: [pageHostChildren],
154
+ },
155
+ AdwPreferencesGroup: {
156
+ behaviors: [
157
+ addRemoveSlot("children", "GtkWidget", (group, child) => {
158
+ group.add(child);
159
+ }, (group, child) => {
160
+ group.remove(child);
161
+ }),
162
+ ],
163
+ },
164
+ AdwSqueezer: {
165
+ behaviors: [
166
+ addRemoveSlot("children", "GtkWidget", (squeezer, child) => {
167
+ squeezer.add(child);
168
+ }, (squeezer, child) => {
169
+ squeezer.remove(child);
170
+ }),
171
+ ],
172
+ },
173
+ AdwTabView: {
174
+ behaviors: [
175
+ slot("children", "GtkWidget", {
176
+ attach: (view, child, info) => view.insert(child, info.index),
177
+ reorder: (view, _child, info) => {
178
+ if (info.adopted instanceof Adw.TabPage) {
179
+ view.reorderPage(info.adopted, info.index);
180
+ }
181
+ },
182
+ detach: (view, _child, info) => {
183
+ if (info.adopted instanceof Adw.TabPage) {
184
+ view.closePage(info.adopted);
185
+ }
186
+ },
187
+ resolve: (view, child) => view.getPage(child),
188
+ }),
189
+ ],
190
+ },
191
+ AdwNavigationView: {
192
+ behaviors: [
193
+ addRemoveSlot("children", "AdwNavigationPage", (view, page) => {
194
+ view.add(page);
195
+ }, (view, page) => {
196
+ view.remove(page);
197
+ }),
198
+ ],
199
+ },
200
+ AdwViewStack: {
201
+ behaviors: [
202
+ adoptedChildrenSlot("GtkWidget", (stack, child) => stack.add(child), (stack, child) => {
203
+ stack.remove(child);
204
+ }),
205
+ deferred("visibleChildName", (stack, name) => stack.getChildByName(name) !== null),
206
+ ],
207
+ },
208
+ AdwToolbarView: {
209
+ behaviors: [
210
+ contentSetterSlot(),
211
+ slot("topBar", "GtkWidget", {
212
+ attach: (view, child) => {
213
+ view.addTopBar(child);
214
+ },
215
+ detach: (view, child) => {
216
+ view.remove(child);
217
+ },
218
+ }),
219
+ slot("bottomBar", "GtkWidget", {
220
+ attach: (view, child) => {
221
+ view.addBottomBar(child);
222
+ },
223
+ detach: (view, child) => {
224
+ view.remove(child);
225
+ },
226
+ }),
227
+ ],
228
+ },
229
+ AdwHeaderBar: {
230
+ behaviors: [
231
+ slot("start", "GtkWidget", {
232
+ attach: (bar, child) => {
233
+ bar.packStart(child);
234
+ },
235
+ detach: (bar, child) => {
236
+ bar.remove(child);
237
+ },
238
+ }),
239
+ slot("end", "GtkWidget", {
240
+ attach: (bar, child) => {
241
+ bar.packEnd(child);
242
+ },
243
+ detach: (bar, child) => {
244
+ bar.remove(child);
245
+ },
246
+ }),
247
+ ],
248
+ },
249
+ AdwShortcutsDialog: {
250
+ behaviors: [
251
+ slot("children", "AdwShortcutsSection", {
252
+ attach: (dialog, section) => {
253
+ dialog.add(section);
254
+ },
255
+ }),
256
+ ],
257
+ },
258
+ AdwShortcutsSection: {
259
+ behaviors: [
260
+ slot("children", "AdwShortcutsItem", {
261
+ attach: (section, item) => {
262
+ section.add(item);
263
+ },
264
+ }),
265
+ ],
266
+ },
267
+ AdwToggleGroup: {
268
+ behaviors: [
269
+ addRemoveSlot("children", "AdwToggle", (group, toggle) => {
270
+ group.add(toggle);
271
+ }, (group, toggle) => {
272
+ group.remove(toggle);
273
+ }),
274
+ deferred("activeName", (group, name) => group.getToggleByName(name) !== null),
275
+ deferred("active"),
276
+ ],
277
+ },
278
+ AdwAlertDialog: {
279
+ behaviors: [
280
+ list("responses", {
281
+ add: (dialog, response) => {
282
+ dialog.addResponse(response.id, response.label);
283
+ if (response.appearance !== undefined) {
284
+ dialog.setResponseAppearance(response.id, response.appearance);
285
+ }
286
+ if (response.enabled !== undefined) {
287
+ dialog.setResponseEnabled(response.id, response.enabled);
288
+ }
289
+ },
290
+ remove: (dialog, response) => {
291
+ dialog.removeResponse(response.id);
292
+ },
293
+ }),
294
+ ],
295
+ },
296
+ };
297
+ registerElements(BUILTIN_ELEMENTS);
298
+ registerElements(BUILTIN_BEHAVIORS);
299
+ //# sourceMappingURL=element-behaviors.js.map
@@ -0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,\n adoptedChildrenSlot,\n boxSlot,\n childSetterSlot,\n contentSetterSlot,\n deferred,\n list,\n slot,\n} from \"../reconciler/behaviors.js\";\nimport { type ElementConfig, registerElements } from \"../reconciler/registry.js\";\nimport { BUILTIN_ELEMENTS } from \"./element-config.js\";\n\ntype AdwChildSetter =\n | Adw.Bin |\n Adw.BreakpointBin |\n Adw.Clamp |\n Adw.ClampScrollable |\n Adw.Dialog |\n Adw.NavigationPage |\n Adw.SplitButton |\n Adw.StatusPage |\n Adw.TabOverview |\n Adw.ToastOverlay |\n Adw.Toggle;\n\ntype AdwContentSetter = Adw.ApplicationWindow | Adw.BottomSheet | Adw.Flap | Adw.OverlaySplitView | Adw.Window;\ntype BreakpointHost = Adw.ApplicationWindow | Adw.Window | Adw.Dialog;\ntype PageHost = Adw.PreferencesDialog | Adw.PreferencesWindow;\ntype PrefixSuffixRow = Adw.ActionRow | Adw.EntryRow | Adw.ExpanderRow;\n\nconst childSetter = childSetterSlot<AdwChildSetter>();\nconst contentSetter = contentSetterSlot<AdwContentSetter>();\n\nconst breakpoints = slot<BreakpointHost, Adw.Breakpoint>(\"breakpoints\", \"AdwBreakpoint\", {\n attach: (host, breakpoint) => {\n host.addBreakpoint(breakpoint);\n },\n});\n\nconst prefixSuffix = [\n slot<PrefixSuffixRow, Gtk.Widget>(\"prefix\", \"GtkWidget\", {\n attach: (row, child) => {\n row.addPrefix(child);\n },\n detach: (row, child) => {\n row.remove(child);\n },\n }),\n slot<PrefixSuffixRow, Gtk.Widget>(\"suffix\", \"GtkWidget\", {\n attach: (row, child) => {\n row.addSuffix(child);\n },\n detach: (row, child) => {\n row.remove(child);\n },\n }),\n];\n\nconst pageHostChildren = addRemoveSlot<Adw.PreferencesPage, PageHost>(\n \"children\",\n \"AdwPreferencesPage\",\n (host, page) => {\n host.add(page);\n },\n (host, page) => {\n host.remove(page);\n },\n);\n\n/** The runtime half of the built-in element configuration: the behaviors bound to each GObject type. */\nconst BUILTIN_BEHAVIORS: Record<string, ElementConfig<never>> = {\n AdwBin: {\n behaviors: [childSetter],\n },\n AdwClamp: {\n behaviors: [childSetter],\n },\n AdwClampScrollable: {\n behaviors: [childSetter],\n },\n AdwNavigationPage: {\n behaviors: [childSetter],\n },\n AdwSplitButton: {\n behaviors: [childSetter],\n },\n AdwStatusPage: {\n behaviors: [childSetter],\n },\n AdwTabOverview: {\n behaviors: [childSetter],\n },\n AdwToastOverlay: {\n behaviors: [childSetter],\n },\n AdwToggle: {\n behaviors: [childSetter],\n },\n AdwBottomSheet: {\n behaviors: [contentSetter],\n },\n AdwFlap: {\n behaviors: [contentSetter],\n },\n AdwOverlaySplitView: {\n behaviors: [contentSetter],\n },\n AdwDialog: {\n behaviors: [childSetter, breakpoints],\n },\n AdwApplicationWindow: {\n behaviors: [contentSetter, breakpoints],\n },\n AdwWindow: {\n behaviors: [contentSetter, breakpoints],\n },\n AdwBreakpointBin: {\n behaviors: [\n childSetter,\n addRemoveSlot<Adw.Breakpoint, Adw.BreakpointBin>(\n \"breakpoints\",\n \"AdwBreakpoint\",\n (bin, breakpoint) => {\n bin.addBreakpoint(breakpoint);\n },\n (bin, breakpoint) => {\n bin.removeBreakpoint(breakpoint);\n },\n ),\n ],\n },\n AdwActionRow: {\n behaviors: prefixSuffix,\n },\n AdwEntryRow: {\n behaviors: prefixSuffix,\n },\n AdwExpanderRow: {\n behaviors: [\n ...prefixSuffix,\n addRemoveSlot<Gtk.Widget, Adw.ExpanderRow>(\n \"rows\",\n \"GtkWidget\",\n (row, child) => {\n row.addRow(child);\n },\n (row, child) => {\n row.remove(child);\n },\n ),\n addRemoveSlot<Gtk.Widget, Adw.ExpanderRow>(\n \"actions\",\n \"GtkWidget\",\n (row, child) => {\n row.addAction(child);\n },\n (row, child) => {\n row.remove(child);\n },\n ),\n ],\n },\n AdwNavigationSplitView: {\n behaviors: [contentSetterSlot<Adw.NavigationSplitView, Adw.NavigationPage>(\"AdwNavigationPage\")],\n },\n AdwLeaflet: {\n behaviors: [boxSlot<Adw.Leaflet | Adw.WrapBox>()],\n },\n AdwWrapBox: {\n behaviors: [boxSlot<Adw.Leaflet | Adw.WrapBox>()],\n },\n AdwCarousel: {\n behaviors: [\n slot<Adw.Carousel, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (carousel, child, info) => {\n carousel.insert(child, info.index);\n },\n detach: (carousel, child) => {\n carousel.remove(child);\n },\n reorder: (carousel, child, info) => {\n carousel.reorder(child, info.index);\n },\n }),\n ],\n },\n AdwPreferencesPage: {\n behaviors: [\n slot<Adw.PreferencesPage, Adw.PreferencesGroup>(\"children\", \"AdwPreferencesGroup\", {\n attach: (page, group, info) => {\n page.insert(group, info.index);\n },\n detach: (page, group) => {\n page.remove(group);\n },\n }),\n ],\n },\n AdwPreferencesDialog: {\n behaviors: [pageHostChildren],\n },\n AdwPreferencesWindow: {\n behaviors: [pageHostChildren],\n },\n AdwPreferencesGroup: {\n behaviors: [\n addRemoveSlot<Gtk.Widget, Adw.PreferencesGroup>(\n \"children\",\n \"GtkWidget\",\n (group, child) => {\n group.add(child);\n },\n (group, child) => {\n group.remove(child);\n },\n ),\n ],\n },\n AdwSqueezer: {\n behaviors: [\n addRemoveSlot<Gtk.Widget, Adw.Squeezer>(\n \"children\",\n \"GtkWidget\",\n (squeezer, child) => {\n squeezer.add(child);\n },\n (squeezer, child) => {\n squeezer.remove(child);\n },\n ),\n ],\n },\n AdwTabView: {\n behaviors: [\n slot<Adw.TabView, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (view, child, info) => view.insert(child, info.index),\n reorder: (view, _child, info) => {\n if (info.adopted instanceof Adw.TabPage) {\n view.reorderPage(info.adopted, info.index);\n }\n },\n detach: (view, _child, info) => {\n if (info.adopted instanceof Adw.TabPage) {\n view.closePage(info.adopted);\n }\n },\n resolve: (view, child) => view.getPage(child),\n }),\n ],\n },\n AdwNavigationView: {\n behaviors: [\n addRemoveSlot<Adw.NavigationPage, Adw.NavigationView>(\n \"children\",\n \"AdwNavigationPage\",\n (view, page) => {\n view.add(page);\n },\n (view, page) => {\n view.remove(page);\n },\n ),\n ],\n },\n AdwViewStack: {\n behaviors: [\n adoptedChildrenSlot<Adw.ViewStack, Gtk.Widget>(\n \"GtkWidget\",\n (stack, child) => stack.add(child),\n (stack, child) => {\n stack.remove(child);\n },\n ),\n deferred<Adw.ViewStack, string>(\"visibleChildName\", (stack, name) => stack.getChildByName(name) !== null),\n ],\n },\n AdwToolbarView: {\n behaviors: [\n contentSetterSlot<Adw.ToolbarView>(),\n slot<Adw.ToolbarView, Gtk.Widget>(\"topBar\", \"GtkWidget\", {\n attach: (view, child) => {\n view.addTopBar(child);\n },\n detach: (view, child) => {\n view.remove(child);\n },\n }),\n slot<Adw.ToolbarView, Gtk.Widget>(\"bottomBar\", \"GtkWidget\", {\n attach: (view, child) => {\n view.addBottomBar(child);\n },\n detach: (view, child) => {\n view.remove(child);\n },\n }),\n ],\n },\n AdwHeaderBar: {\n behaviors: [\n slot<Adw.HeaderBar, Gtk.Widget>(\"start\", \"GtkWidget\", {\n attach: (bar, child) => {\n bar.packStart(child);\n },\n detach: (bar, child) => {\n bar.remove(child);\n },\n }),\n slot<Adw.HeaderBar, Gtk.Widget>(\"end\", \"GtkWidget\", {\n attach: (bar, child) => {\n bar.packEnd(child);\n },\n detach: (bar, child) => {\n bar.remove(child);\n },\n }),\n ],\n },\n AdwShortcutsDialog: {\n behaviors: [\n slot<Adw.ShortcutsDialog, Adw.ShortcutsSection>(\"children\", \"AdwShortcutsSection\", {\n attach: (dialog, section) => {\n dialog.add(section);\n },\n }),\n ],\n },\n AdwShortcutsSection: {\n behaviors: [\n slot<Adw.ShortcutsSection, Adw.ShortcutsItem>(\"children\", \"AdwShortcutsItem\", {\n attach: (section, item) => {\n section.add(item);\n },\n }),\n ],\n },\n AdwToggleGroup: {\n behaviors: [\n addRemoveSlot<Adw.Toggle, Adw.ToggleGroup>(\n \"children\",\n \"AdwToggle\",\n (group, toggle) => {\n group.add(toggle);\n },\n (group, toggle) => {\n group.remove(toggle);\n },\n ),\n deferred<Adw.ToggleGroup, string>(\"activeName\", (group, name) => group.getToggleByName(name) !== null),\n deferred(\"active\"),\n ],\n },\n AdwAlertDialog: {\n behaviors: [\n list<Adw.AlertDialog, AlertDialogResponse>(\"responses\", {\n add: (dialog, response) => {\n dialog.addResponse(response.id, response.label);\n\n if (response.appearance !== undefined) {\n dialog.setResponseAppearance(response.id, response.appearance);\n }\n\n if (response.enabled !== undefined) {\n dialog.setResponseEnabled(response.id, response.enabled);\n }\n },\n remove: (dialog, response) => {\n dialog.removeResponse(response.id);\n },\n }),\n ],\n },\n};\n\nregisterElements(BUILTIN_ELEMENTS);\nregisterElements(BUILTIN_BEHAVIORS);\n"]}
@@ -0,0 +1,9 @@
1
+ import { type ElementConfig } from "../reconciler/registry.js";
2
+ /**
3
+ * The static, runtime-free half of the built-in element configuration: which base props interface each
4
+ * generated element extends, which component wraps it, and whether its GObject is created lazily by its
5
+ * parent. Codegen imports this module, so it must never reach the GObject bindings.
6
+ */
7
+ declare const BUILTIN_ELEMENTS: Record<string, ElementConfig>;
8
+ export { BUILTIN_ELEMENTS };
9
+ //# sourceMappingURL=element-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-config.d.ts","sourceRoot":"","sources":["../../src/adw/element-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA+B,MAAM,2BAA2B,CAAC;AAM5F;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA0HnD,CAAC;AAMF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}