@gjsify/adwaita-web 0.53.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/dist/adwaita-web.css +8070 -3037
  2. package/dist/adwaita-web.css.map +1 -1
  3. package/lib/types/adw-application-window.spec.d.ts +1 -0
  4. package/lib/types/adw-bin.spec.d.ts +1 -0
  5. package/lib/types/adw-breakpoint-bin.spec.d.ts +1 -0
  6. package/lib/types/adw-clamp-scrollable.spec.d.ts +1 -0
  7. package/lib/types/adw-multi-layout-view.spec.d.ts +1 -0
  8. package/lib/types/adw-preferences-row.spec.d.ts +1 -0
  9. package/lib/types/adw-shortcuts.spec.d.ts +1 -0
  10. package/lib/types/adw-tab-bar.spec.d.ts +1 -0
  11. package/lib/types/adw-tab-button.spec.d.ts +1 -0
  12. package/lib/types/adw-tab-overview.spec.d.ts +1 -0
  13. package/lib/types/adw-view-switcher-sidebar.spec.d.ts +1 -0
  14. package/lib/types/adw-window.spec.d.ts +1 -0
  15. package/lib/types/breakpoints.d.ts +14 -3
  16. package/lib/types/construct-vectors.spec.d.ts +1 -0
  17. package/lib/types/elements/adw-application-window.d.ts +27 -0
  18. package/lib/types/elements/adw-bin.d.ts +17 -0
  19. package/lib/types/elements/adw-breakpoint-bin.d.ts +67 -0
  20. package/lib/types/elements/adw-clamp-scrollable.d.ts +38 -0
  21. package/lib/types/elements/adw-dialog.d.ts +10 -0
  22. package/lib/types/elements/adw-layout-slot.d.ts +19 -0
  23. package/lib/types/elements/adw-multi-layout-view.d.ts +101 -0
  24. package/lib/types/elements/adw-preferences-row.d.ts +31 -0
  25. package/lib/types/elements/adw-shortcuts-dialog.d.ts +13 -0
  26. package/lib/types/elements/adw-shortcuts-item.d.ts +36 -0
  27. package/lib/types/elements/adw-shortcuts-section.d.ts +14 -0
  28. package/lib/types/elements/adw-sidebar.d.ts +5 -0
  29. package/lib/types/elements/adw-switch-row.d.ts +3 -0
  30. package/lib/types/elements/adw-tab-bar.d.ts +108 -0
  31. package/lib/types/elements/adw-tab-button.d.ts +32 -0
  32. package/lib/types/elements/adw-tab-overview.d.ts +199 -0
  33. package/lib/types/elements/adw-tab-view.d.ts +19 -23
  34. package/lib/types/elements/adw-view-switcher-sidebar.d.ts +84 -0
  35. package/lib/types/elements/adw-window.d.ts +40 -0
  36. package/lib/types/elements/gtk-about-dialog.d.ts +146 -0
  37. package/lib/types/elements/gtk-application-window.d.ts +34 -0
  38. package/lib/types/elements/gtk-aspect-frame.d.ts +27 -0
  39. package/lib/types/elements/gtk-button.d.ts +9 -0
  40. package/lib/types/elements/gtk-calendar.d.ts +159 -0
  41. package/lib/types/elements/gtk-center-box.d.ts +39 -0
  42. package/lib/types/elements/gtk-color-dialog-button.d.ts +69 -0
  43. package/lib/types/elements/gtk-column-view.d.ts +50 -0
  44. package/lib/types/elements/gtk-drag-icon.d.ts +78 -0
  45. package/lib/types/elements/gtk-drawing-area.d.ts +95 -0
  46. package/lib/types/elements/gtk-editable-label.d.ts +33 -0
  47. package/lib/types/elements/gtk-emoji-chooser.d.ts +84 -0
  48. package/lib/types/elements/gtk-entry.d.ts +20 -1
  49. package/lib/types/elements/gtk-expander.d.ts +49 -0
  50. package/lib/types/elements/gtk-fixed.d.ts +13 -0
  51. package/lib/types/elements/gtk-flow-box-child.d.ts +14 -0
  52. package/lib/types/elements/gtk-flow-box.d.ts +87 -0
  53. package/lib/types/elements/gtk-font-dialog-button.d.ts +83 -0
  54. package/lib/types/elements/gtk-frame.d.ts +24 -0
  55. package/lib/types/elements/gtk-gl-area.d.ts +136 -0
  56. package/lib/types/elements/gtk-graphics-offload.d.ts +24 -0
  57. package/lib/types/elements/gtk-grid-view.d.ts +39 -0
  58. package/lib/types/elements/gtk-grid.d.ts +27 -0
  59. package/lib/types/elements/gtk-header-bar.d.ts +60 -0
  60. package/lib/types/elements/gtk-inscription.d.ts +64 -0
  61. package/lib/types/elements/gtk-label.d.ts +3 -0
  62. package/lib/types/elements/gtk-level-bar.d.ts +59 -0
  63. package/lib/types/elements/gtk-link-button.d.ts +29 -0
  64. package/lib/types/elements/gtk-list-box-row.d.ts +54 -0
  65. package/lib/types/elements/gtk-list-box.d.ts +100 -0
  66. package/lib/types/elements/gtk-list-view.d.ts +73 -0
  67. package/lib/types/elements/gtk-media-controls.d.ts +142 -0
  68. package/lib/types/elements/gtk-notebook.d.ts +148 -0
  69. package/lib/types/elements/gtk-overlay.d.ts +22 -0
  70. package/lib/types/elements/gtk-page-setup-unix-dialog.d.ts +87 -0
  71. package/lib/types/elements/gtk-paned.d.ts +121 -0
  72. package/lib/types/elements/gtk-password-entry.d.ts +27 -0
  73. package/lib/types/elements/gtk-picture.d.ts +66 -0
  74. package/lib/types/elements/gtk-popover-bin.d.ts +82 -0
  75. package/lib/types/elements/gtk-popover-menu-bar.d.ts +66 -0
  76. package/lib/types/elements/gtk-popover-menu.d.ts +83 -0
  77. package/lib/types/elements/gtk-popover.d.ts +28 -3
  78. package/lib/types/elements/gtk-print-unix-dialog.d.ts +167 -0
  79. package/lib/types/elements/gtk-revealer.d.ts +55 -0
  80. package/lib/types/elements/gtk-scale-button.d.ts +59 -0
  81. package/lib/types/elements/gtk-scale.d.ts +98 -0
  82. package/lib/types/elements/gtk-scrollbar.d.ts +124 -0
  83. package/lib/types/elements/gtk-scrolled-window.d.ts +121 -0
  84. package/lib/types/elements/gtk-search-bar.d.ts +39 -0
  85. package/lib/types/elements/gtk-search-entry.d.ts +27 -0
  86. package/lib/types/elements/gtk-separator.d.ts +10 -0
  87. package/lib/types/elements/gtk-spin-button.d.ts +94 -0
  88. package/lib/types/elements/gtk-spinner.d.ts +14 -0
  89. package/lib/types/elements/gtk-stack-sidebar.d.ts +43 -0
  90. package/lib/types/elements/gtk-stack-switcher.d.ts +58 -0
  91. package/lib/types/elements/gtk-stack.d.ts +154 -0
  92. package/lib/types/elements/gtk-switch.d.ts +4 -1
  93. package/lib/types/elements/gtk-text-view.d.ts +62 -0
  94. package/lib/types/elements/gtk-text.d.ts +45 -0
  95. package/lib/types/elements/gtk-toggle-button.d.ts +45 -0
  96. package/lib/types/elements/gtk-tree-expander.d.ts +38 -0
  97. package/lib/types/elements/gtk-video.d.ts +97 -0
  98. package/lib/types/elements/gtk-viewport.d.ts +84 -0
  99. package/lib/types/elements/gtk-window-controls.d.ts +80 -0
  100. package/lib/types/elements/gtk-window-handle.d.ts +39 -0
  101. package/lib/types/elements/gtk-window.d.ts +97 -0
  102. package/lib/types/elements/justification.d.ts +2 -0
  103. package/lib/types/elements/popover-menu.d.ts +18 -0
  104. package/lib/types/elements/roving-focus.d.ts +29 -1
  105. package/lib/types/emoji-data.d.ts +38 -0
  106. package/lib/types/font-description.d.ts +96 -0
  107. package/lib/types/gtk-about-dialog.spec.d.ts +1 -0
  108. package/lib/types/gtk-action-bar.spec.d.ts +1 -0
  109. package/lib/types/gtk-application-window.spec.d.ts +1 -0
  110. package/lib/types/gtk-aspect-frame.spec.d.ts +1 -0
  111. package/lib/types/gtk-calendar.spec.d.ts +1 -0
  112. package/lib/types/gtk-center-box.spec.d.ts +1 -0
  113. package/lib/types/gtk-color-dialog-button.spec.d.ts +1 -0
  114. package/lib/types/gtk-column-view.spec.d.ts +1 -0
  115. package/lib/types/gtk-drag-icon.spec.d.ts +1 -0
  116. package/lib/types/gtk-drawing-area.spec.d.ts +1 -0
  117. package/lib/types/gtk-editable-label.spec.d.ts +1 -0
  118. package/lib/types/gtk-emoji-chooser.spec.d.ts +1 -0
  119. package/lib/types/gtk-expander.spec.d.ts +1 -0
  120. package/lib/types/gtk-fixed.spec.d.ts +1 -0
  121. package/lib/types/gtk-flow-box.spec.d.ts +1 -0
  122. package/lib/types/gtk-font-dialog-button.spec.d.ts +1 -0
  123. package/lib/types/gtk-frame.spec.d.ts +1 -0
  124. package/lib/types/gtk-gl-area.spec.d.ts +1 -0
  125. package/lib/types/gtk-graphics-offload.spec.d.ts +1 -0
  126. package/lib/types/gtk-grid-view.spec.d.ts +1 -0
  127. package/lib/types/gtk-grid.spec.d.ts +1 -0
  128. package/lib/types/gtk-header-bar.spec.d.ts +1 -0
  129. package/lib/types/gtk-inscription.spec.d.ts +1 -0
  130. package/lib/types/gtk-level-bar.spec.d.ts +1 -0
  131. package/lib/types/gtk-link-button.spec.d.ts +1 -0
  132. package/lib/types/gtk-list-box.spec.d.ts +1 -0
  133. package/lib/types/gtk-list-view.spec.d.ts +1 -0
  134. package/lib/types/gtk-media-controls.spec.d.ts +1 -0
  135. package/lib/types/gtk-notebook.spec.d.ts +1 -0
  136. package/lib/types/gtk-overlay.spec.d.ts +1 -0
  137. package/lib/types/gtk-paned.spec.d.ts +1 -0
  138. package/lib/types/gtk-password-entry.spec.d.ts +1 -0
  139. package/lib/types/gtk-picture.spec.d.ts +1 -0
  140. package/lib/types/gtk-popover-bin.spec.d.ts +1 -0
  141. package/lib/types/gtk-popover-menu-bar.spec.d.ts +1 -0
  142. package/lib/types/gtk-popover-menu.spec.d.ts +1 -0
  143. package/lib/types/gtk-popover-role.spec.d.ts +1 -0
  144. package/lib/types/gtk-popover.spec.d.ts +1 -0
  145. package/lib/types/gtk-print-dialogs.spec.d.ts +1 -0
  146. package/lib/types/gtk-revealer.spec.d.ts +1 -0
  147. package/lib/types/gtk-scale-button.spec.d.ts +1 -0
  148. package/lib/types/gtk-scale.spec.d.ts +1 -0
  149. package/lib/types/gtk-scrollbar.spec.d.ts +1 -0
  150. package/lib/types/gtk-scrolled-window.spec.d.ts +1 -0
  151. package/lib/types/gtk-search-bar.spec.d.ts +1 -0
  152. package/lib/types/gtk-search-entry.spec.d.ts +1 -0
  153. package/lib/types/gtk-separator.spec.d.ts +1 -0
  154. package/lib/types/gtk-spin-button.spec.d.ts +1 -0
  155. package/lib/types/gtk-spinner.spec.d.ts +1 -0
  156. package/lib/types/gtk-stack-sidebar.spec.d.ts +1 -0
  157. package/lib/types/gtk-stack-switcher.spec.d.ts +1 -0
  158. package/lib/types/gtk-stack.spec.d.ts +1 -0
  159. package/lib/types/gtk-text-view.spec.d.ts +1 -0
  160. package/lib/types/gtk-text.spec.d.ts +1 -0
  161. package/lib/types/gtk-toggle-button.spec.d.ts +1 -0
  162. package/lib/types/gtk-tree-expander.spec.d.ts +1 -0
  163. package/lib/types/gtk-video.spec.d.ts +1 -0
  164. package/lib/types/gtk-viewport.spec.d.ts +1 -0
  165. package/lib/types/gtk-window-controls.spec.d.ts +1 -0
  166. package/lib/types/gtk-window-handle.spec.d.ts +1 -0
  167. package/lib/types/gtk-window.spec.d.ts +1 -0
  168. package/lib/types/index.d.ts +4 -1
  169. package/lib/types/list-view-dom.d.ts +44 -0
  170. package/lib/types/namespace/adw.d.ts +12 -0
  171. package/lib/types/namespace/gtk.d.ts +61 -0
  172. package/lib/types/page-setup.d.ts +100 -0
  173. package/lib/types/scroll-shading.d.ts +15 -1
  174. package/lib/types/shared-tree-builder.d.ts +30 -2
  175. package/lib/types/signals.d.ts +4 -0
  176. package/lib/types/styles.generated.d.ts +1 -1
  177. package/lib/types/tab-chip.d.ts +73 -0
  178. package/lib/types/template-classes.d.ts +11 -0
  179. package/package.json +12 -8
  180. package/scss/_action_row.scss +2 -2
  181. package/scss/_application_window.scss +26 -0
  182. package/scss/_aspect_frame.scss +25 -0
  183. package/scss/_bin.scss +26 -0
  184. package/scss/_button.scss +45 -0
  185. package/scss/_calendar.scss +176 -0
  186. package/scss/_center_box.scss +25 -0
  187. package/scss/_checks.scss +6 -1
  188. package/scss/_clamp_scrollable.scss +28 -0
  189. package/scss/_color_button.scss +67 -0
  190. package/scss/_column_view.scss +126 -0
  191. package/scss/_drag_icon.scss +55 -0
  192. package/scss/_drawing.scss +85 -0
  193. package/scss/_emoji_chooser.scss +213 -0
  194. package/scss/_entry.scss +13 -5
  195. package/scss/_entry_row.scss +1 -1
  196. package/scss/_expander.scss +113 -0
  197. package/scss/_fixed.scss +29 -0
  198. package/scss/_flow_box.scss +94 -0
  199. package/scss/_font_button.scss +63 -0
  200. package/scss/_frame.scss +41 -0
  201. package/scss/_grid.scss +19 -0
  202. package/scss/_grid_view.scss +46 -0
  203. package/scss/_gtk_about_dialog.scss +186 -0
  204. package/scss/_headerbar.scss +132 -0
  205. package/scss/_icons.generated.scss +186 -0
  206. package/scss/_inscription.scss +125 -0
  207. package/scss/_level_bar.scss +190 -0
  208. package/scss/_link.scss +82 -0
  209. package/scss/_list_box.scss +88 -0
  210. package/scss/_list_view.scss +96 -0
  211. package/scss/_media_controls.scss +139 -0
  212. package/scss/_overlay.scss +68 -0
  213. package/scss/_paned.scss +130 -0
  214. package/scss/_password_entry.scss +83 -0
  215. package/scss/_picture.scss +80 -0
  216. package/scss/_popover_bin.scss +53 -0
  217. package/scss/_popover_menu_bar.scss +104 -0
  218. package/scss/_preferences_row.scss +51 -0
  219. package/scss/_print_dialogs.scss +328 -0
  220. package/scss/_reset.scss +21 -19
  221. package/scss/_revealer.scss +37 -0
  222. package/scss/_row.scss +20 -5
  223. package/scss/_scale.scss +298 -0
  224. package/scss/_scale_button.scss +167 -0
  225. package/scss/_scrollbar.scss +230 -0
  226. package/scss/_scrolled_window.scss +131 -0
  227. package/scss/_search_bar.scss +118 -0
  228. package/scss/_search_entry.scss +86 -0
  229. package/scss/_separator.scss +44 -0
  230. package/scss/_shortcuts_dialog.scss +100 -0
  231. package/scss/_spin_button.scss +172 -0
  232. package/scss/_spin_row.scss +56 -8
  233. package/scss/_spinner.scss +85 -4
  234. package/scss/_stack.scss +729 -0
  235. package/scss/_switch.scss +13 -5
  236. package/scss/_switch_row.scss +10 -0
  237. package/scss/_tab_bar.scss +317 -0
  238. package/scss/_tab_button.scss +98 -0
  239. package/scss/_tab_overview.scss +483 -0
  240. package/scss/_text.scss +182 -0
  241. package/scss/_theme.scss +1 -1
  242. package/scss/_tree_expander.scss +62 -0
  243. package/scss/_variables.scss +43 -21
  244. package/scss/_video.scss +146 -0
  245. package/scss/_view_switcher_sidebar.scss +112 -0
  246. package/scss/_viewport.scss +50 -0
  247. package/scss/_window.scss +118 -1
  248. package/scss/_window_handle.scss +20 -0
  249. package/scss/adwaita-skin.scss +109 -0
  250. package/src/adw-action-rows.spec.ts +76 -0
  251. package/src/adw-application-window.spec.ts +118 -0
  252. package/src/adw-bin.spec.ts +75 -0
  253. package/src/adw-breakpoint-bin.spec.ts +324 -0
  254. package/src/adw-clamp-scrollable.spec.ts +189 -0
  255. package/src/adw-multi-layout-view.spec.ts +243 -0
  256. package/src/adw-preferences-row.spec.ts +164 -0
  257. package/src/adw-row-state.spec.ts +142 -0
  258. package/src/adw-shortcuts.spec.ts +155 -0
  259. package/src/adw-tab-bar.spec.ts +287 -0
  260. package/src/adw-tab-button.spec.ts +101 -0
  261. package/src/adw-tab-overview.spec.ts +443 -0
  262. package/src/adw-view-switcher-sidebar.spec.ts +281 -0
  263. package/src/adw-window.spec.ts +129 -0
  264. package/src/breakpoints.ts +25 -8
  265. package/src/capabilities.d.mts +3 -0
  266. package/src/capabilities.mjs +18 -0
  267. package/src/connect-lifecycle.spec.ts +12 -0
  268. package/src/construct-vectors.spec.ts +175 -0
  269. package/src/elements/adw-application-window.ts +154 -0
  270. package/src/elements/adw-bin.ts +101 -0
  271. package/src/elements/adw-breakpoint-bin.ts +287 -0
  272. package/src/elements/adw-clamp-scrollable.ts +207 -0
  273. package/src/elements/adw-dialog.ts +19 -0
  274. package/src/elements/adw-layout-slot.ts +95 -0
  275. package/src/elements/adw-multi-layout-view.ts +326 -0
  276. package/src/elements/adw-preferences-row.ts +150 -0
  277. package/src/elements/adw-shortcuts-dialog.ts +52 -0
  278. package/src/elements/adw-shortcuts-item.ts +171 -0
  279. package/src/elements/adw-shortcuts-section.ts +86 -0
  280. package/src/elements/adw-sidebar.ts +42 -3
  281. package/src/elements/adw-switch-row.ts +28 -1
  282. package/src/elements/adw-tab-bar.ts +529 -0
  283. package/src/elements/adw-tab-button.ts +194 -0
  284. package/src/elements/adw-tab-overview.ts +1011 -0
  285. package/src/elements/adw-tab-view.ts +66 -145
  286. package/src/elements/adw-toggle-group.ts +20 -5
  287. package/src/elements/adw-view-stack.ts +18 -0
  288. package/src/elements/adw-view-switcher-sidebar.ts +332 -0
  289. package/src/elements/adw-window.ts +185 -11
  290. package/src/elements/checks.ts +35 -8
  291. package/src/elements/gtk-about-dialog.ts +811 -0
  292. package/src/elements/gtk-application-window.ts +108 -0
  293. package/src/elements/gtk-aspect-frame.ts +160 -0
  294. package/src/elements/gtk-button.ts +12 -0
  295. package/src/elements/gtk-calendar.ts +757 -0
  296. package/src/elements/gtk-center-box.ts +184 -0
  297. package/src/elements/gtk-color-dialog-button.ts +278 -0
  298. package/src/elements/gtk-column-view.ts +320 -0
  299. package/src/elements/gtk-drag-icon.ts +257 -0
  300. package/src/elements/gtk-drawing-area.ts +303 -0
  301. package/src/elements/gtk-editable-label.ts +204 -0
  302. package/src/elements/gtk-emoji-chooser.ts +542 -0
  303. package/src/elements/gtk-entry.ts +39 -5
  304. package/src/elements/gtk-expander.ts +301 -0
  305. package/src/elements/gtk-fixed.ts +99 -0
  306. package/src/elements/gtk-flow-box-child.ts +68 -0
  307. package/src/elements/gtk-flow-box.ts +480 -0
  308. package/src/elements/gtk-font-dialog-button.ts +432 -0
  309. package/src/elements/gtk-frame.ts +174 -0
  310. package/src/elements/gtk-gl-area.ts +476 -0
  311. package/src/elements/gtk-graphics-offload.ts +130 -0
  312. package/src/elements/gtk-grid-view.ts +168 -0
  313. package/src/elements/gtk-grid.ts +127 -0
  314. package/src/elements/gtk-header-bar.ts +273 -0
  315. package/src/elements/gtk-inscription.ts +387 -0
  316. package/src/elements/gtk-label.ts +19 -11
  317. package/src/elements/gtk-level-bar.ts +323 -0
  318. package/src/elements/gtk-link-button.ts +138 -0
  319. package/src/elements/gtk-list-box-row.ts +195 -0
  320. package/src/elements/gtk-list-box.ts +413 -0
  321. package/src/elements/gtk-list-view.ts +370 -0
  322. package/src/elements/gtk-media-controls.ts +509 -0
  323. package/src/elements/gtk-notebook.ts +664 -0
  324. package/src/elements/gtk-overlay.ts +149 -0
  325. package/src/elements/gtk-page-setup-unix-dialog.ts +420 -0
  326. package/src/elements/gtk-paned.ts +597 -0
  327. package/src/elements/gtk-password-entry.ts +170 -0
  328. package/src/elements/gtk-picture.ts +254 -0
  329. package/src/elements/gtk-popover-bin.ts +332 -0
  330. package/src/elements/gtk-popover-menu-bar.ts +355 -0
  331. package/src/elements/gtk-popover-menu.ts +339 -0
  332. package/src/elements/gtk-popover.ts +92 -10
  333. package/src/elements/gtk-print-unix-dialog.ts +989 -0
  334. package/src/elements/gtk-progress-bar.ts +24 -11
  335. package/src/elements/gtk-revealer.ts +406 -0
  336. package/src/elements/gtk-scale-button.ts +358 -0
  337. package/src/elements/gtk-scale.ts +492 -0
  338. package/src/elements/gtk-scrollbar.ts +528 -0
  339. package/src/elements/gtk-scrolled-window.ts +642 -0
  340. package/src/elements/gtk-search-bar.ts +200 -0
  341. package/src/elements/gtk-search-entry.ts +172 -0
  342. package/src/elements/gtk-separator.ts +52 -0
  343. package/src/elements/gtk-spin-button.ts +475 -0
  344. package/src/elements/gtk-spinner.ts +126 -0
  345. package/src/elements/gtk-stack-sidebar.ts +212 -0
  346. package/src/elements/gtk-stack-switcher.ts +279 -0
  347. package/src/elements/gtk-stack.ts +748 -0
  348. package/src/elements/gtk-switch.ts +52 -19
  349. package/src/elements/gtk-text-view.ts +290 -0
  350. package/src/elements/gtk-text.ts +219 -0
  351. package/src/elements/gtk-toggle-button.ts +239 -0
  352. package/src/elements/gtk-tree-expander.ts +243 -0
  353. package/src/elements/gtk-video.ts +423 -0
  354. package/src/elements/gtk-viewport.ts +277 -0
  355. package/src/elements/gtk-window-controls.ts +341 -0
  356. package/src/elements/gtk-window-handle.ts +221 -0
  357. package/src/elements/gtk-window.ts +366 -0
  358. package/src/elements/justification.ts +24 -0
  359. package/src/elements/popover-menu.ts +24 -0
  360. package/src/elements/roving-focus.ts +53 -21
  361. package/src/emoji-data.ts +577 -0
  362. package/src/entry-rows.spec.ts +31 -0
  363. package/src/font-description.ts +238 -0
  364. package/src/gtk-about-dialog.spec.ts +250 -0
  365. package/src/gtk-action-bar.spec.ts +89 -0
  366. package/src/gtk-application-window.spec.ts +107 -0
  367. package/src/gtk-aspect-frame.spec.ts +114 -0
  368. package/src/gtk-calendar.spec.ts +589 -0
  369. package/src/gtk-center-box.spec.ts +125 -0
  370. package/src/gtk-color-dialog-button.spec.ts +141 -0
  371. package/src/gtk-column-view.spec.ts +154 -0
  372. package/src/gtk-drag-icon.spec.ts +190 -0
  373. package/src/gtk-drawing-area.spec.ts +211 -0
  374. package/src/gtk-editable-label.spec.ts +190 -0
  375. package/src/gtk-emoji-chooser.spec.ts +173 -0
  376. package/src/gtk-entry.spec.ts +23 -0
  377. package/src/gtk-expander.spec.ts +170 -0
  378. package/src/gtk-fixed.spec.ts +97 -0
  379. package/src/gtk-flow-box.spec.ts +289 -0
  380. package/src/gtk-font-dialog-button.spec.ts +166 -0
  381. package/src/gtk-frame.spec.ts +119 -0
  382. package/src/gtk-gl-area.spec.ts +361 -0
  383. package/src/gtk-graphics-offload.spec.ts +119 -0
  384. package/src/gtk-grid-view.spec.ts +106 -0
  385. package/src/gtk-grid.spec.ts +122 -0
  386. package/src/gtk-header-bar.spec.ts +202 -0
  387. package/src/gtk-inscription.spec.ts +235 -0
  388. package/src/gtk-level-bar.spec.ts +199 -0
  389. package/src/gtk-link-button.spec.ts +117 -0
  390. package/src/gtk-list-box.spec.ts +422 -0
  391. package/src/gtk-list-view.spec.ts +203 -0
  392. package/src/gtk-media-controls.spec.ts +295 -0
  393. package/src/gtk-notebook.spec.ts +546 -0
  394. package/src/gtk-overlay.spec.ts +141 -0
  395. package/src/gtk-paned.spec.ts +267 -0
  396. package/src/gtk-password-entry.spec.ts +150 -0
  397. package/src/gtk-picture.spec.ts +172 -0
  398. package/src/gtk-popover-bin.spec.ts +229 -0
  399. package/src/gtk-popover-menu-bar.spec.ts +296 -0
  400. package/src/gtk-popover-menu.spec.ts +261 -0
  401. package/src/gtk-popover-role.spec.ts +138 -0
  402. package/src/gtk-popover.spec.ts +264 -0
  403. package/src/gtk-print-dialogs.spec.ts +251 -0
  404. package/src/gtk-revealer.spec.ts +164 -0
  405. package/src/gtk-scale-button.spec.ts +218 -0
  406. package/src/gtk-scale.spec.ts +213 -0
  407. package/src/gtk-scrollbar.spec.ts +244 -0
  408. package/src/gtk-scrolled-window.spec.ts +262 -0
  409. package/src/gtk-search-bar.spec.ts +179 -0
  410. package/src/gtk-search-entry.spec.ts +142 -0
  411. package/src/gtk-separator.spec.ts +74 -0
  412. package/src/gtk-spin-button.spec.ts +186 -0
  413. package/src/gtk-spinner.spec.ts +130 -0
  414. package/src/gtk-stack-sidebar.spec.ts +217 -0
  415. package/src/gtk-stack-switcher.spec.ts +249 -0
  416. package/src/gtk-stack.spec.ts +432 -0
  417. package/src/gtk-text-view.spec.ts +189 -0
  418. package/src/gtk-text.spec.ts +163 -0
  419. package/src/gtk-toggle-button.spec.ts +186 -0
  420. package/src/gtk-tree-expander.spec.ts +201 -0
  421. package/src/gtk-video.spec.ts +240 -0
  422. package/src/gtk-viewport.spec.ts +140 -0
  423. package/src/gtk-window-controls.spec.ts +232 -0
  424. package/src/gtk-window-handle.spec.ts +158 -0
  425. package/src/gtk-window.spec.ts +190 -0
  426. package/src/index.ts +9 -1
  427. package/src/keyboard-operable.spec.ts +33 -1
  428. package/src/list-view-dom.ts +121 -0
  429. package/src/namespace/adw.ts +12 -0
  430. package/src/namespace/gtk.ts +61 -0
  431. package/src/page-setup.ts +222 -0
  432. package/src/scroll-shading.ts +18 -1
  433. package/src/shared-tree-builder.ts +263 -21
  434. package/src/signals.ts +15 -0
  435. package/src/source-view/theme.ts +11 -5
  436. package/src/style-classes.spec.ts +9 -8
  437. package/src/styles.generated.ts +1 -1
  438. package/src/tab-chip.ts +200 -0
  439. package/src/template-classes.ts +45 -0
  440. package/src/test.browser.mts +152 -0
@@ -34,10 +34,15 @@
34
34
  // package's `exports` map ships only `.`, and a new subpath would buy nothing for a module
35
35
  // this small, most of which (the `SharedTreeNode` type) is erased at build anyway.
36
36
 
37
- import type { SharedTreeNode } from '@gjsify/adwaita-core/conformance';
37
+ import { createBreakpointDriver, parseBreakpointCondition, type BreakpointSize } from '@gjsify/adwaita-core';
38
+ import { assertTreeConstructs, type SharedTreeNode } from '@gjsify/adwaita-core/conformance';
38
39
  import { GTK_WIDGET_MARGIN_CSS, attributeOf, hostTagOf, propertyOf } from '@gjsify/adwaita-core/tags';
39
40
 
41
+ import { observeAdaptiveSize } from './breakpoints.js';
42
+ import { capabilities } from './capabilities.mjs';
43
+ import { dispatchedSignalsOf } from './signals.js';
40
44
  import { slottedChildrenOf } from './slotted-children.js';
45
+ import { templateTagFor } from './template-classes.js';
41
46
 
42
47
  /** One authored placement, kept so {@link mountSharedTree} can hold the renderer to it. */
43
48
  interface PlacedChild {
@@ -56,6 +61,29 @@ interface ExtendedNode {
56
61
  interface BuildRecord {
57
62
  placed: PlacedChild[];
58
63
  extended: ExtendedNode[];
64
+ /** Every authored id and the element it built, which a `bind` source is looked up in. */
65
+ ids: Map<string, HTMLElement>;
66
+ /** The `bindings` of every node, resolved once every id exists (a source may be built after its target). */
67
+ binds: PendingBind[];
68
+ /** The nodes that carry `breakpoints`, wired once every id exists (a setter may name a later sibling). */
69
+ breakpointHosts: { el: HTMLElement; node: SharedTreeNode }[];
70
+ /** Undoes what the build wired to the outside (the size observers); {@link mountSharedTree}'s `unmount` runs it. */
71
+ disposers: (() => void)[];
72
+ /** The size source a `breakpoints` node is driven from; a `ResizeObserver` unless the caller supplies one. */
73
+ observeSize?: SizeSource;
74
+ /** The object a signal handler's NAME is resolved against (ADR 0093 § 3), as `Gtk.BuilderScope` does. */
75
+ scope?: Readonly<Record<string, unknown>>;
76
+ }
77
+
78
+ /** Calls `onSize` with the host's measured size, now and on every change; returns its disposer. */
79
+ export type SizeSource = (element: Element, onSize: (size: BreakpointSize) => void) => () => void;
80
+
81
+ interface PendingBind {
82
+ el: HTMLElement;
83
+ property: string;
84
+ source: string;
85
+ sourceProperty: string;
86
+ flags: readonly string[];
59
87
  }
60
88
 
61
89
  /**
@@ -103,29 +131,175 @@ function isWritable(el: object, member: string): boolean {
103
131
  * container. A DETACHED build therefore cannot check a slot either: an element that has not
104
132
  * upgraded has declared no slots yet, so the refusal below belongs to the mount.
105
133
  */
106
- export function buildSharedTree(node: SharedTreeNode, record: BuildRecord = { placed: [], extended: [] }): HTMLElement {
107
- const el = document.createElement(hostTagOf(node.tag));
134
+ export function buildSharedTree(node: SharedTreeNode, record: BuildRecord = newRecord()): HTMLElement {
135
+ // ADR 0093 § 2: the whole tree is checked against the capability table before an element is
136
+ // created. A refused `layout` is named with its node and the reason the table gives.
137
+ assertTreeConstructs('adwaita-web', capabilities, node);
138
+ const root = buildNode(node, record);
139
+ for (const bind of record.binds) bindProperty(bind, record);
140
+ for (const host of record.breakpointHosts) bindBreakpoints(host.el, host.node, record);
141
+ return root;
142
+ }
143
+
144
+ /** A fresh record, with the scope when the caller has one. */
145
+ function newRecord(scope?: Readonly<Record<string, unknown>>, observeSize?: SizeSource): BuildRecord {
146
+ return {
147
+ placed: [],
148
+ extended: [],
149
+ ids: new Map(),
150
+ binds: [],
151
+ breakpointHosts: [],
152
+ disposers: [],
153
+ ...(scope === undefined ? {} : { scope }),
154
+ ...(observeSize === undefined ? {} : { observeSize }),
155
+ };
156
+ }
157
+
158
+ /** What a setter's target held before any breakpoint wrote it: the member's value or the attribute's. */
159
+ type Original = { member: unknown } | { attribute: string | null };
160
+
161
+ /**
162
+ * ADR 0093's `breakpoints`: each setter's `object` resolves to the element built for that id and
163
+ * the write is the one an authored prop takes. The parent's own box is the size source (a
164
+ * `ResizeObserver`; an Adwaita condition is written against the window, which a page rarely is),
165
+ * and `adwaita-core` picks the breakpoint and the restores.
166
+ *
167
+ * Refused by name, never dropped: a setter whose object is not an id of this tree (`template`
168
+ * included) and a condition the grammar cannot read, which libadwaita would drop silently.
169
+ */
170
+ function bindBreakpoints(el: HTMLElement, node: SharedTreeNode, record: BuildRecord): void {
171
+ const definitions = (node.breakpoints ?? []).map((breakpoint) => {
172
+ if (parseBreakpointCondition(breakpoint.condition) === null) {
173
+ throw new Error(
174
+ `<${el.localName}> \`condition ("${breakpoint.condition}")\` is not an Adwaita breakpoint condition.`,
175
+ );
176
+ }
177
+ return {
178
+ condition: breakpoint.condition,
179
+ setters: breakpoint.setters.map((setter) => {
180
+ const object = record.ids.get(setter.object);
181
+ if (object === undefined) {
182
+ throw new Error(
183
+ `<${el.localName}> breakpoint setter \`${setter.object}.${setter.property}\` names no object: ` +
184
+ `nothing in this tree has the id '${setter.object}'.`,
185
+ );
186
+ }
187
+ return { object, property: setter.property, value: setter.value };
188
+ }),
189
+ };
190
+ });
191
+ const driver = createBreakpointDriver<HTMLElement>(definitions, {
192
+ read(target, property) {
193
+ const member = propertyOf(property);
194
+ const current = (target as unknown as Record<string, unknown>)[member];
195
+ if (typeof current === 'boolean' && isWritable(target, member))
196
+ return { member: current } satisfies Original;
197
+ return { attribute: target.getAttribute(attributeOf(property)) } satisfies Original;
198
+ },
199
+ write(target, property, value) {
200
+ const member = propertyOf(property);
201
+ if (typeof value === 'object' && value !== null && 'member' in value) {
202
+ (target as unknown as Record<string, unknown>)[member] = (value as { member: unknown }).member;
203
+ } else if (typeof value === 'object' && value !== null && 'attribute' in value) {
204
+ const attribute = (value as { attribute: string | null }).attribute;
205
+ if (attribute === null) target.removeAttribute(attributeOf(property));
206
+ else target.setAttribute(attributeOf(property), attribute);
207
+ } else if (typeof value === 'boolean' && isWritable(target, member)) {
208
+ (target as unknown as Record<string, unknown>)[member] = value;
209
+ } else writeProp(target, property, value as string | number | boolean);
210
+ },
211
+ });
212
+ record.disposers.push((record.observeSize ?? observeAdaptiveSize)(el, (size) => driver.evaluate(size)));
213
+ }
214
+
215
+ /**
216
+ * ADR 0093's `bindings`, the simple form: the target property takes the source's value now and
217
+ * again on every `notify::<property>` the source dispatches (`G_BINDING_SYNC_CREATE`, which is
218
+ * what GtkBuilder's `bind-flags` default means).
219
+ *
220
+ * Refused by name, never dropped: a source that is not an id of this tree (`template` included),
221
+ * a source element that does not dispatch `notify::<property>`, a target without a writable
222
+ * property, and any flag, which this first slice has not verified. An element dispatches
223
+ * `notify::…` only while connected, so a tree built but never attached follows once, at build.
224
+ */
225
+ function bindProperty(bind: PendingBind, record: BuildRecord): void {
226
+ const { el, property, source, sourceProperty, flags } = bind;
227
+ const where = `<${el.localName}> \`${property}: bind ${source}.${sourceProperty}\``;
228
+ const from = record.ids.get(source);
229
+ if (from === undefined) {
230
+ throw new Error(`${where} names no object: nothing in this tree has the id '${source}'.`);
231
+ }
232
+ if (flags.length > 0) {
233
+ throw new Error(
234
+ `${where} carries ${flags.join(', ')}: adwaita-web binds the plain form only until each flag is ` +
235
+ 'verified against GObject.',
236
+ );
237
+ }
238
+ const notification = `notify::${sourceProperty}`;
239
+ const declared = dispatchedSignalsOf(from);
240
+ const event = declared[notification];
241
+ if (event === undefined) {
242
+ throw new Error(
243
+ `${where}: <${from.localName}> dispatches no '${notification}', so the target would follow the source ` +
244
+ `once and never again. It dispatches: ${Object.keys(declared).join(', ') || 'none'}.`,
245
+ );
246
+ }
247
+ const targetMember = propertyOf(property);
248
+ const sourceMember = propertyOf(sourceProperty);
249
+ if (!isWritable(el, targetMember)) {
250
+ throw new Error(`${where}: <${el.localName}> has no writable property '${targetMember}'.`);
251
+ }
252
+ const follow = () => {
253
+ (el as unknown as Record<string, unknown>)[targetMember] = (from as unknown as Record<string, unknown>)[
254
+ sourceMember
255
+ ];
256
+ };
257
+ follow();
258
+ from.addEventListener(event, follow);
259
+ }
260
+
261
+ /** One authored property, written as the element reads it; a breakpoint setter takes the same door. */
262
+ function writeProp(el: HTMLElement, prop: string, value: string | number | boolean): void {
263
+ const member = propertyOf(prop);
264
+ if (value === false && isWritable(el, member)) (el as unknown as Record<string, unknown>)[member] = false;
265
+ else if (typeof value === 'boolean') el.toggleAttribute(attributeOf(prop), value);
266
+ else el.setAttribute(attributeOf(prop), String(value));
267
+ // A margin is also inline style (`GTK_WIDGET_MARGIN_CSS` says why); the attribute
268
+ // stays, since it is what the tree authored and what a reader of the DOM looks for.
269
+ const margin = GTK_WIDGET_MARGIN_CSS[attributeOf(prop)];
270
+ if (margin !== undefined) el.style.setProperty(margin, `${Number(value)}px`);
271
+ }
272
+
273
+ function buildNode(node: SharedTreeNode, record: BuildRecord): HTMLElement {
274
+ // An `extern` node is built by the class the application registered under its name (ADR 0093).
275
+ const el = document.createElement(node.extern === true ? templateTagFor(node.tag) : hostTagOf(node.tag));
108
276
  // The id is how the TypeScript beside a `.blp` reaches this element
109
277
  // (`root.querySelector('#…')`), the counterpart of `InternalChildren` on GTK.
110
- if (node.id !== undefined) el.id = node.id;
111
- for (const [prop, value] of Object.entries(node.props ?? {})) {
112
- const member = propertyOf(prop);
113
- if (value === false && isWritable(el, member)) (el as unknown as Record<string, unknown>)[member] = false;
114
- else if (typeof value === 'boolean') el.toggleAttribute(attributeOf(prop), value);
115
- else el.setAttribute(attributeOf(prop), String(value));
116
- // A margin is also inline style (`GTK_WIDGET_MARGIN_CSS` says why); the attribute
117
- // stays, since it is what the tree authored and what a reader of the DOM looks for.
118
- const margin = GTK_WIDGET_MARGIN_CSS[attributeOf(prop)];
119
- if (margin !== undefined) el.style.setProperty(margin, `${Number(value)}px`);
278
+ if (node.id !== undefined) {
279
+ el.id = node.id;
280
+ record.ids.set(node.id, el);
120
281
  }
282
+ for (const [property, binding] of Object.entries(node.bindings ?? {})) {
283
+ record.binds.push({
284
+ el,
285
+ property,
286
+ source: binding.source,
287
+ sourceProperty: binding.property,
288
+ flags: binding.flags ?? [],
289
+ });
290
+ }
291
+ for (const [prop, value] of Object.entries(node.props ?? {})) writeProp(el, prop, value);
292
+ if (node.breakpoints !== undefined) record.breakpointHosts.push({ el, node });
121
293
  // `styleClasses` is `GtkWidget:css-classes`, and this renderer's door for it is the
122
294
  // `class` attribute — what `.title-1`, `.dimmed` and `.card` select on. Unread, a
123
295
  // `.blp`'s `styles ["title-1"]` reached the tree and never the page.
124
296
  if (node.styleClasses !== undefined && node.styleClasses.length > 0) el.classList.add(...node.styleClasses);
125
297
  writeExtensions(el, node);
298
+ bindSignals(el, node, record);
126
299
  if (node.extensions !== undefined) record.extended.push({ el, node });
127
300
  for (const child of node.children ?? []) {
128
- const childEl = buildSharedTree(child, record);
301
+ const childEl = buildNode(child, record);
302
+ if (child.page !== undefined) writePage(el, childEl, child);
129
303
  if (child.slot !== undefined) {
130
304
  childEl.setAttribute('slot', child.slot);
131
305
  record.placed.push({ parent: el, child: childEl, slot: child.slot });
@@ -135,6 +309,43 @@ export function buildSharedTree(node: SharedTreeNode, record: BuildRecord = { pl
135
309
  return el;
136
310
  }
137
311
 
312
+ /**
313
+ * ADR 0093's `signals`: each handler NAME is looked up on the scope the builder was handed and
314
+ * listened for as the DOM event the element declares for that GTK signal.
315
+ *
316
+ * Refused by name, never dropped: a missing scope or handler (as `Gtk.Builder` refuses one), a
317
+ * signal the element does not declare, and the `swapped`, `after` and `object` forms, which this
318
+ * first slice has not verified against GTK's argument order and emission phase.
319
+ */
320
+ function bindSignals(el: HTMLElement, node: SharedTreeNode, record: BuildRecord): void {
321
+ const declared = dispatchedSignalsOf(el);
322
+ for (const signal of node.signals ?? []) {
323
+ const name = signal.detail === undefined ? signal.name : `${signal.name}::${signal.detail}`;
324
+ const event = declared[name];
325
+ if (event === undefined) {
326
+ throw new Error(
327
+ `<${el.localName}> declares no signal '${name}', so the handler '${signal.handler}' would never ` +
328
+ `run. It dispatches: ${Object.keys(declared).join(', ') || 'none'}.`,
329
+ );
330
+ }
331
+ if (signal.object !== undefined || (signal.flags?.length ?? 0) > 0) {
332
+ throw new Error(
333
+ `the handler '${signal.handler}' for '${name}' uses ${signal.object === undefined ? '' : 'an object '}` +
334
+ `${(signal.flags ?? []).join(', ')}: adwaita-web binds plain handlers only until each of those ` +
335
+ 'is verified against GTK.',
336
+ );
337
+ }
338
+ const handler = record.scope?.[signal.handler];
339
+ if (typeof handler !== 'function') {
340
+ throw new Error(
341
+ `the tree binds the handler '${signal.handler}' for '${name}', and the scope ` +
342
+ `${record.scope === undefined ? 'was not given (pass `scope`)' : 'has no such function'}.`,
343
+ );
344
+ }
345
+ el.addEventListener(event, (domEvent) => handler.call(record.scope, domEvent));
346
+ }
347
+ }
348
+
138
349
  /**
139
350
  * ADR 0072's `extensions`, written in the markup this package already reads for each.
140
351
  *
@@ -217,10 +428,12 @@ function refuseUnheldExtensions(extended: readonly ExtendedNode[]): void {
217
428
  * purpose. An undefined element has exactly ONE destination — itself — so a placement
218
429
  * cannot land anywhere but where the tree authored it; what such a tree is really missing
219
430
  * is the WIDGET, which is a wider gap than a slot and not this refusal's claim to make.
220
- * (`AdwApplicationWindow` is the live case: a real `.blp` roots at one and this package has
221
- * no element for it.) A DEFINED element that routes no named slot is refused like any
222
- * other: it built a structure and chose not to route into it, so a name it does not have
223
- * would leave the child beside that structure.
431
+ * (It was `AdwApplicationWindow`, which `showcases/gtk/effect-adw-services/src/window.blp`
432
+ * roots at while this package had no element for it. That element now exists, so the live
433
+ * case is the opposite one: `<adw-window>` and `<adw-application-window>` both declare
434
+ * `content`, which is what that file's `content:` becomes.) A DEFINED element that routes
435
+ * no named slot is refused like any other: it built a structure and chose not to route
436
+ * into it, so a name it does not have would leave the child beside that structure.
224
437
  */
225
438
  function refuseUnknownSlots(placed: readonly PlacedChild[]): void {
226
439
  for (const { parent, child, slot } of placed) {
@@ -249,9 +462,12 @@ export interface MountedSharedTree {
249
462
  * instantiation half a caller reading the corpus's elements normally wants; a bare
250
463
  * `buildSharedTree` is for a caller that already has somewhere of its own to attach it.
251
464
  */
252
- export function mountSharedTree(node: SharedTreeNode): MountedSharedTree {
465
+ export function mountSharedTree(
466
+ node: SharedTreeNode,
467
+ options: { scope?: Readonly<Record<string, unknown>>; observeSize?: SizeSource } = {},
468
+ ): MountedSharedTree {
253
469
  const host = document.createElement('div');
254
- const record: BuildRecord = { placed: [], extended: [] };
470
+ const record = newRecord(options.scope, options.observeSize);
255
471
  host.append(buildSharedTree(node, record));
256
472
  document.body.append(host);
257
473
  // After the append, because that is what upgrades the elements and runs the binds the
@@ -261,8 +477,34 @@ export function mountSharedTree(node: SharedTreeNode): MountedSharedTree {
261
477
  refuseUnknownSlots(record.placed);
262
478
  refuseUnheldExtensions(record.extended);
263
479
  } catch (error) {
480
+ for (const dispose of record.disposers) dispose();
264
481
  host.remove();
265
482
  throw error;
266
483
  }
267
- return { root: host.firstElementChild as HTMLElement, unmount: () => host.remove() };
484
+ return {
485
+ root: host.firstElementChild as HTMLElement,
486
+ unmount: () => {
487
+ for (const dispose of record.disposers) dispose();
488
+ host.remove();
489
+ },
490
+ };
491
+ }
492
+
493
+ /**
494
+ * A `page` as the attributes `<gtk-notebook>` (`tab-label`) and `<gtk-stack>` (`name`, `title`)
495
+ * read off their children. Any other parent is refused by name: the attributes would be written
496
+ * and read by nobody.
497
+ */
498
+ function writePage(parent: HTMLElement, child: HTMLElement, node: SharedTreeNode): void {
499
+ const { page } = node;
500
+ if (parent.localName === 'gtk-notebook') {
501
+ if (page?.label !== undefined) child.setAttribute('tab-label', page.label);
502
+ } else if (parent.localName === 'gtk-stack') {
503
+ if (page?.name !== undefined) child.setAttribute('name', page.name);
504
+ if (page?.label !== undefined) child.setAttribute('title', page.label);
505
+ } else {
506
+ throw new Error(
507
+ `adwaita-web's shared-tree builder: <${node.tag}> has a page, and <${parent.localName}> has no pages.`,
508
+ );
509
+ }
268
510
  }
package/src/signals.ts ADDED
@@ -0,0 +1,15 @@
1
+ // The GTK signals an element dispatches, and the DOM event each one arrives as (ADR 0093 § 3).
2
+ //
3
+ // A GTK signal name is not a DOM event name — `clicked` is a native `click` here, `notify::active`
4
+ // is a `CustomEvent` of that very name — so a `.blp`'s `clicked => $onClicked()` cannot be wired by
5
+ // the name alone, and an element that dispatches nothing under it must not be wired silently. Each
6
+ // element declares its signals in a `static signals` the way it declares its `slots`, and the
7
+ // builder refuses a signal the element does not declare.
8
+
9
+ /** GTK signal name → the DOM event type the element dispatches it as. */
10
+ export type DispatchedSignals = Readonly<Record<string, string>>;
11
+
12
+ /** The signals `el`'s class declares, or none. */
13
+ export function dispatchedSignalsOf(el: Element): DispatchedSignals {
14
+ return (el.constructor as { signals?: DispatchedSignals }).signals ?? {};
15
+ }
@@ -35,13 +35,19 @@ import {
35
35
  * `_variables.scss` is where that stack is argued about (it explains why
36
36
  * 'Cantarell' is dropped from it), so it is where it lives.
37
37
  *
38
- * The `var()` FALLBACK is a second copy by construction — it has to be, or a page
39
- * that loads the stylesheet without the theme tokens gets no stack at all — so it
40
- * is kept to the token's own value and nothing longer, and a tail entry landing in
41
- * `_variables.scss` (#1817 added 'Consolas') has to land here too.
38
+ * The repeat is still a SECOND COPY, and a copy of a value the conformance rule
39
+ * CAN see is the failure this constant was created to end — a tail edited in one
40
+ * place and not the other is an editor in one typeface and a label beside it in
41
+ * another, which is the same bug one argument shorter. It is a `var()` FALLBACK,
42
+ * so the token wins whenever the stylesheet is loaded and this only answers for a
43
+ * page that loaded the element without the theme. Nothing enforces the agreement:
44
+ * `stylesheet-font-families` reads `.css`/`.scss`, and reaching a TS string literal
45
+ * would make it a JS parser, which its own header rules out. So it stays a step of
46
+ * the same edit, and `status/open-todos/adwaita-web.md` § "`<adw-source-view>` has
47
+ * no browser suite" is where the missing check is tracked.
42
48
  */
43
49
  const MONO_FONT =
44
- "var(--monospace-font-family, 'Adwaita Mono', ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace)";
50
+ "var(--monospace-font-family, 'Adwaita Mono', ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', 'Menlo', monospace)";
45
51
 
46
52
  /** The CodeMirror EditorView theme mapping `.cm-*` chrome to Adwaita tokens. */
47
53
  export const adwaitaEditorTheme = EditorView.theme({
@@ -45,8 +45,10 @@ const SHIPPED = { shipped: true } as const;
45
45
  const deprecated = (replacement: string) =>
46
46
  ({ shipped: false, reason: `deprecated upstream — use ${replacement}` }) as const;
47
47
 
48
- /** No counterpart in this renderer (yet), with the reason. */
49
- const unported = (reason: string) => ({ shipped: false, reason }) as const;
48
+ // There is no "no counterpart in this renderer YET" form any more: every class this ledger
49
+ // documents either ships a rule or is deprecated upstream, the last of the unported ones
50
+ // (`.inline`) becoming a rule with `<gtk-text-view>` and `<gtk-search-bar>`. An entry that
51
+ // does need one gets its own form back, with the reason it has no rule.
50
52
 
51
53
  /**
52
54
  * Every class `style-classes.md` documents, and what this package does about it.
@@ -117,12 +119,11 @@ export const DOCUMENTED_STYLE_CLASSES: Record<string, { shipped: boolean; reason
117
119
  // Development window
118
120
  devel: SHIPPED,
119
121
  // Inline
120
- inline: unported(
121
- 'applies to GtkSearchBar, AdwTabBar and GtkTextView. This renderer ports none of ' +
122
- 'the three — <adw-tab-view> is the tab CONTENT, not AdwTabBar — and upstream ' +
123
- 'excludes GtkSourceView, which is the one text widget here (<adw-source-view>). ' +
124
- 'The class ships with the first of those three widgets, not before.',
125
- ),
122
+ // SHIPPED since `<gtk-text-view>` and `<gtk-search-bar>` arrived: upstream applies
123
+ // `.inline` to GtkTextView (`_views.scss:31-36`) and to GtkSearchBar
124
+ // (`_toolbars.scss:156-158`), and both elements carry the rule in `scss/_text.scss` and
125
+ // `scss/_search_bar.scss`. AdwTabBar and GtkSourceView still have no counterpart here.
126
+ inline: SHIPPED,
126
127
  // Undershoot indicators
127
128
  'undershoot-top': SHIPPED,
128
129
  'undershoot-bottom': SHIPPED,