@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
@@ -0,0 +1,59 @@
1
+ import { type BoxOrientation } from '@gjsify/adwaita-core';
2
+ /** `GtkLevelBarMode`, spelled as the GIR's enum nicks (:1004-1008). */
3
+ type LevelBarMode = 'continuous' | 'discrete';
4
+ export declare class GtkLevelBar extends HTMLElement {
5
+ private _trough;
6
+ private _initialized;
7
+ /** Offset name → value, kept sorted ascending exactly as the C's `GList` is. */
8
+ private _offsets;
9
+ static get observedAttributes(): string[];
10
+ /** `Gtk.LevelBar:value` — the filled level. */
11
+ get value(): number;
12
+ set value(v: number);
13
+ /** `Gtk.LevelBar:min-value` — the low end of the interval. Defaults to 0. */
14
+ get minValue(): number;
15
+ set minValue(v: number);
16
+ /** `Gtk.LevelBar:max-value` — the high end of the interval. Defaults to 1. */
17
+ get maxValue(): number;
18
+ set maxValue(v: number);
19
+ /** `Gtk.LevelBar:mode` — one filled block, or one per unit of the interval. */
20
+ get mode(): LevelBarMode;
21
+ set mode(v: LevelBarMode);
22
+ /** `Gtk.LevelBar:inverted` — grow from the far end. */
23
+ get inverted(): boolean;
24
+ set inverted(v: boolean);
25
+ /** `GtkOrientable:orientation` (gtklevelbar.c:825-835). Horizontal fills rightwards. */
26
+ get orientation(): BoxOrientation;
27
+ set orientation(v: BoxOrientation);
28
+ /**
29
+ * `setAttribute` runs the custom-element reaction for a write that changes nothing,
30
+ * while every GObject setter here returns early when the value is already right
31
+ * (gtklevelbar.c:1186-1187, :1224-1225, :1300-1301, :1260-1261). This is the guard
32
+ * that makes "notify only on a real change" true for the numeric and enum half.
33
+ */
34
+ private _write;
35
+ get disabled(): boolean;
36
+ set disabled(v: boolean);
37
+ /**
38
+ * `gtk_level_bar_add_offset_value` (gtklevelbar.c:1395-1411): replaces the value of
39
+ * an offset of the same name, keeps the list sorted, refuses a value outside the
40
+ * interval (`g_return_if_fail (gtk_level_bar_value_in_interval (…))`, :1403), and
41
+ * emits `offset-changed` — but only when the value actually moved (:259-260).
42
+ */
43
+ addOffsetValue(name: string, value: number): void;
44
+ /** `gtk_level_bar_remove_offset_value` (gtklevelbar.c:1362-1377). */
45
+ removeOffsetValue(name: string): void;
46
+ /** `gtk_level_bar_get_offset_value` (gtklevelbar.c:1423-1443) — `null` when absent. */
47
+ offsetValue(name: string): number | null;
48
+ connectedCallback(): void;
49
+ attributeChangedCallback(name: string): void;
50
+ private _notify;
51
+ /** One interval endpoint CLAMPS every offset into the new range — the other does not. */
52
+ private _clampOffsets;
53
+ /** The `notify::` detail for `name`: the PROPERTY, parsed, not the raw attribute. */
54
+ private _property;
55
+ private _render;
56
+ /** One `block` node, `filled` or `empty`, wearing the offset's class (:635-652). */
57
+ private _block;
58
+ }
59
+ export {};
@@ -0,0 +1,29 @@
1
+ import { GtkButton } from './gtk-button.js';
2
+ export declare class GtkLinkButton extends GtkButton {
3
+ private _wired;
4
+ static get observedAttributes(): string[];
5
+ /** `Gtk.LinkButton:uri` — the address this button points at. */
6
+ get uri(): string;
7
+ set uri(value: string);
8
+ /**
9
+ * `Gtk.LinkButton:visited` — whether the link has been followed. The state flag
10
+ * GTK swaps here is what the stylesheet paints as `:visited`, and the `VISITED`
11
+ * accessibility state beside it; see the header.
12
+ */
13
+ get visited(): boolean;
14
+ set visited(value: boolean);
15
+ connectedCallback(): void;
16
+ attributeChangedCallback(name?: string): void;
17
+ /**
18
+ * `::activate-link` — cancelable, because the signal is a boolean accumulator
19
+ * (gtklinkbutton.c:216-238) and `preventDefault()` is the DOM spelling of a handler
20
+ * returning TRUE. Nothing cancelled ⇒ the default handler runs.
21
+ */
22
+ private _activateLink;
23
+ /**
24
+ * The launcher call, on its own method so a caller (or a spec) can stand in for the
25
+ * window the desktop would have opened.
26
+ */
27
+ protected launch(uri: string): void;
28
+ protected decorate(button: HTMLButtonElement): void;
29
+ }
@@ -0,0 +1,54 @@
1
+ export declare class GtkListBoxRow extends HTMLElement {
2
+ private _contentsEl;
3
+ private _activation?;
4
+ private _initialized;
5
+ static get observedAttributes(): string[];
6
+ /**
7
+ * `GtkListBoxRow:activatable` — TRUE by default (gtklistbox.c:3961), so this is the OFF
8
+ * switch and the attribute is read as `activatable="false"`.
9
+ */
10
+ get activatable(): boolean;
11
+ set activatable(value: boolean);
12
+ /**
13
+ * `GtkListBoxRow:selectable` — TRUE by default (gtklistbox.c:3962), read the same way as
14
+ * `activatable`.
15
+ */
16
+ get selectable(): boolean;
17
+ set selectable(value: boolean);
18
+ /** Where this row sits in its box, or -1 while it has no box. */
19
+ get index(): number;
20
+ /**
21
+ * Whether this row is selected — `gtk_list_box_row_is_selected`, answered by the parent so
22
+ * a row moved between boxes never carries a stale answer.
23
+ */
24
+ get selected(): boolean;
25
+ /** `GtkListBoxRow:child`, as the light-DOM child it already is. */
26
+ get child(): Element | null;
27
+ connectedCallback(): void;
28
+ /**
29
+ * Hand this row's `.activatable` class and tab stop to its box.
30
+ *
31
+ * Both are the box's to derive and neither is derivable here: `can_select` is the BOX's
32
+ * `selection-mode` (gtklistbox.c:3606-3609) and the tab stop is `GtkListBox:tab-behavior`,
33
+ * where `all` gives every activatable row its own stop and `item`/`cell` hand out a
34
+ * roving one — the split `gtk_list_box_focus` draws by walking rows between Tab presses
35
+ * only under `GTK_LIST_TAB_ALL` (gtklistbox.c:2037, :2067). The keys stay the row's:
36
+ * Enter and Space are `GtkListBoxRow`'s own (see `row-activation.ts`).
37
+ */
38
+ claim(): void;
39
+ /** Give the row back to itself, for a box that no longer manages it. */
40
+ release(): void;
41
+ /** What the box last said about itself; TRUE until a box narrows it. */
42
+ private _canSelect;
43
+ /** Set by {@link claim}. While it is set the row derives neither class nor tab stop. */
44
+ private _claimed;
45
+ attributeChangedCallback(): void;
46
+ /**
47
+ * Re-derive the tab stop and the `.activatable` class.
48
+ *
49
+ * Public because the box owns the second half of the class rule — it knows
50
+ * `selection-mode`, this row does not — and calls this for every row when that changes.
51
+ */
52
+ syncClasses(canSelect: boolean): void;
53
+ private _syncActivation;
54
+ }
@@ -0,0 +1,100 @@
1
+ import { type AdwBoxSelectionMode } from '@gjsify/adwaita-core';
2
+ import type { GtkListBoxRow } from './gtk-list-box-row.js';
3
+ import './gtk-list-box-row.js';
4
+ /** `GtkListTabBehavior`'s nicks — `cell` behaves as `item` outside a cell-based box. */
5
+ export type GtkListTabBehavior = 'all' | 'item' | 'cell';
6
+ /** An unknown nick is `all`, the ParamSpec's default (gtklistbox.c:574-578). */
7
+ export declare function normalizeListTabBehavior(raw: string | null | undefined): GtkListTabBehavior;
8
+ export declare class GtkListBox extends HTMLElement {
9
+ private _rows;
10
+ private _selection;
11
+ /** `box->selected_row`, `-1` for the C's NULL. */
12
+ private _anchor;
13
+ private _initialized;
14
+ static get observedAttributes(): string[];
15
+ /** `GtkListBox:selection-mode` — the four `Gtk.SelectionMode` values. */
16
+ get selectionMode(): AdwBoxSelectionMode;
17
+ set selectionMode(value: AdwBoxSelectionMode);
18
+ /** Default TRUE (gtklistbox.c:543), so the attribute is the OFF switch. */
19
+ get activateOnSingleClick(): boolean;
20
+ set activateOnSingleClick(value: boolean);
21
+ /**
22
+ * `GtkListBox:accept-unpaired-release` — FALSE by default (gtklistbox.c:552-553).
23
+ *
24
+ * Upstream this decides whether a press followed by a release somewhere else still
25
+ * activates the row under the press (:1922-1935). A browser delivers `click` on the
26
+ * NEAREST COMMON ANCESTOR of the press and the release, so a release outside the row
27
+ * reaches this box rather than the row — and this attribute says whether that box-level
28
+ * click selects the row the press started on or is dropped.
29
+ */
30
+ get acceptUnpairedRelease(): boolean;
31
+ set acceptUnpairedRelease(value: boolean);
32
+ get showSeparators(): boolean;
33
+ set showSeparators(value: boolean);
34
+ /** `GtkListBox:tab-behavior` (4.18) — `all` | `item` | `cell`. */
35
+ get tabBehavior(): GtkListTabBehavior;
36
+ set tabBehavior(value: GtkListTabBehavior);
37
+ /** The rows, in order. */
38
+ get rows(): readonly GtkListBoxRow[];
39
+ /**
40
+ * The selected positions, ascending.
41
+ *
42
+ * NOT a GIR property: `GtkListBox` exposes its selection through the `row-selected` /
43
+ * `selected-rows-changed` SIGNALS and the `get_selected_rows()` METHOD, and this element
44
+ * spells the signal as `notify::selected-rows` so a `notify::` listener finds the shape it
45
+ * expects everywhere else in the package.
46
+ */
47
+ get selectedRows(): number[];
48
+ set selectedRows(value: Iterable<number> | number | null);
49
+ /** `gtk_list_box_selected_foreach`, as the rows themselves. */
50
+ get selectedRowElements(): GtkListBoxRow[];
51
+ connectedCallback(): void;
52
+ attributeChangedCallback(name?: string): void;
53
+ /** `gtk_list_box_select_row` (gtklistbox.c:915-933). `null` is the C's unselect-all (:926). */
54
+ selectRow(row: GtkListBoxRow | null): void;
55
+ /** `gtk_list_box_unselect_row` (gtklistbox.c:943-950). */
56
+ unselectRow(row: GtkListBoxRow): void;
57
+ /** `gtk_list_box_select_all` — refused unless the mode is `multiple` (:963-964). */
58
+ selectAll(): void;
59
+ /** `gtk_list_box_unselect_all` — refused in `browse`, a no-op on an empty selection. */
60
+ unselectAll(): void;
61
+ /** The classes and ARIA that follow directly from the attributes. */
62
+ private _applyAttributes;
63
+ /** Re-read the children and re-derive everything that follows from them. */
64
+ private _collectRows;
65
+ /**
66
+ * Re-derive every row's `.activatable` class, its `aria-selected` and the roving tabindex.
67
+ *
68
+ * Called on connect, on `selection-mode`, and from the childList observer, so a row
69
+ * appended after connect is in the selection from its first frame.
70
+ */
71
+ private _syncRows;
72
+ /** The tab stops `tab-behavior` hands out: one per row, or one for the whole box. */
73
+ private _syncTabIndexes;
74
+ /**
75
+ * One click. Selection always follows; activation depends on the click COUNT, which a
76
+ * plain `click` cannot say — so the count comes from `detail` and a second click arrives
77
+ * here too.
78
+ */
79
+ private _onClick;
80
+ /** The double-click arm, for the browser that reports the second click as `detail === 2`. */
81
+ private _onDoubleClick;
82
+ /**
83
+ * `Ctrl`+Space is `toggle-cursor-row` (gtklistbox.c:753-755) and nothing else is: Enter and
84
+ * Space reach the ROW, which `attachRowActivation` owns, and this box must not answer the
85
+ * same key twice.
86
+ */
87
+ private _onKeyDown;
88
+ /** The row a click or key landed in, or null. */
89
+ private _rowAt;
90
+ /** One click or `Ctrl`+Space — `gtk_list_box_update_selection_full` (:1799-1871). */
91
+ private _updateSelection;
92
+ /** `gtk_list_box_activate` (:1873-1884) — an unactivatable row emits nothing. */
93
+ private _activate;
94
+ /**
95
+ * The two signals GObject emits for every selection change (:594-616) plus the notify a
96
+ * declarative port owes. `selected-rows-changed` is `RUN_FIRST` upstream and carries
97
+ * nothing, so its `detail` stays empty.
98
+ */
99
+ private _emitSelection;
100
+ }
@@ -0,0 +1,73 @@
1
+ import { ListViewState, type AdwComboOption, type AdwListItemFactory, type AdwListModelInput, type AdwListSelectionMode, type BoxOrientation } from '@gjsify/adwaita-core';
2
+ /** `GtkListTabBehavior`'s nicks — `cell` behaves as `item` outside a cell-based view. */
3
+ export type GtkListTabBehavior = 'all' | 'item' | 'cell';
4
+ /** An unknown nick is `all`, the ParamSpec's default (gtklistview.c:965-969). */
5
+ export declare function normalizeListTabBehavior(raw: string | null | undefined): GtkListTabBehavior;
6
+ export declare class GtkListView extends HTMLElement {
7
+ protected _listEl: HTMLDivElement;
8
+ protected _rows: HTMLElement[];
9
+ /** The model + selection machine all three views share (ADR 0004, ADR 0089). */
10
+ protected readonly _state: ListViewState;
11
+ protected _factory: AdwListItemFactory<Node>;
12
+ private _initialized;
13
+ static get observedAttributes(): string[];
14
+ /** The list model (`Gtk.ListView:model`, minus the selection ADR 0046 declined). */
15
+ get model(): AdwComboOption[];
16
+ set model(value: AdwListModelInput);
17
+ /** The per-item renderer — `Gtk.ListView:factory`, as one function. */
18
+ get factory(): AdwListItemFactory<Node>;
19
+ set factory(value: AdwListItemFactory<Node> | null);
20
+ /** The selected positions, ascending. Assigning replaces the selection. */
21
+ get selected(): number[];
22
+ set selected(value: Iterable<number> | number | null);
23
+ get selectionMode(): AdwListSelectionMode;
24
+ set selectionMode(value: AdwListSelectionMode);
25
+ get showSeparators(): boolean;
26
+ set showSeparators(value: boolean);
27
+ get singleClickActivate(): boolean;
28
+ set singleClickActivate(value: boolean);
29
+ get enableRubberband(): boolean;
30
+ set enableRubberband(value: boolean);
31
+ get tabBehavior(): GtkListTabBehavior;
32
+ set tabBehavior(value: GtkListTabBehavior);
33
+ /**
34
+ * `GtkOrientable:orientation` — which way the rows run.
35
+ *
36
+ * VERTICAL by default, and NOT through `normalizeBoxOrientation`: that helper is
37
+ * `GtkBox`'s parser and answers the interface default, horizontal. `GtkListBase` sets
38
+ * `priv->orientation = GTK_ORIENTATION_VERTICAL` in its own init
39
+ * (gtklistbase.c:2070), which is why every GTK list view scrolls DOWN out of the box.
40
+ * Taking the shared helper's default here put `.horizontal` on every list view,
41
+ * flowed the rows across, pointed the arrow keys at the wrong axis and stopped the
42
+ * `show-separators` rule matching — one wrong default, three symptoms.
43
+ */
44
+ get orientation(): BoxOrientation;
45
+ set orientation(value: BoxOrientation);
46
+ connectedCallback(): void;
47
+ attributeChangedCallback(name?: string): void;
48
+ /** The classes and ARIA that follow directly from the attributes. */
49
+ protected _applyAttributes(): void;
50
+ /**
51
+ * The class the HOST wears. GTK names its views by CSS node — `listview`, `gridview`,
52
+ * `columnview` — and the three partials select on the tag, so this is what a consumer
53
+ * or a page rule has to spell; a subclass wearing the base's class would offer one
54
+ * name for two widgets.
55
+ */
56
+ protected get _viewClass(): string;
57
+ /** The CSS node name GTK gives each child — `row` here, `child` in a grid view. */
58
+ protected get _rowClass(): string;
59
+ /** Build every row from scratch — the factory changed, or the view did. */
60
+ protected _renderRows(): void;
61
+ /** One row: the factory's node inside the element GTK calls `row`. */
62
+ protected _createRow(position: number): HTMLElement | null;
63
+ private _selectRow;
64
+ private _activateRow;
65
+ private _onSelectionChanged;
66
+ /** The per-row selected state, and the one tab stop a roving tabindex leaves open. */
67
+ protected _syncSelectedStates(): void;
68
+ /**
69
+ * Apply one `items-changed` — remove `removed` rows at `position`, insert `added`
70
+ * fresh ones there, leave every other row standing.
71
+ */
72
+ private _applyItemsChanged;
73
+ }
@@ -0,0 +1,142 @@
1
+ /**
2
+ * The four `audio-volume-*` names `GtkVolumeButton` derives from a 0…1 level, one constant
3
+ * each rather than an array of them, in the ORDER `icons_symbolic` holds them
4
+ * (gtkvolumebutton.c:74-77) — which is muted, HIGH, low, medium, and not the order of the
5
+ * levels.
6
+ *
7
+ * The shape is load-bearing, not stylistic. `check-adwaita-icon-masks.mjs` reads an emitted
8
+ * icon name out of the SOURCE with a regex for a SCREAMING_SNAKE constant whose name ends in
9
+ * `ICON` or `ICON_NAME` and whose value is a plain string literal — that is how
10
+ * `PASSWORD_REVEAL_ICON_NAME` and the about dialog's glyph are found. Four literals inside an
11
+ * array are invisible to it, so its second arm would report four ICONS entries nothing emits
12
+ * while all four really are emitted. The `-symbolic` suffix is likewise kept on the value:
13
+ * `normalizeIconName` accepts either spelling, and dropping it buys nothing.
14
+ */
15
+ export declare const VOLUME_MUTED_ICON = "audio-volume-muted-symbolic";
16
+ /** The FULL-SCALE name — `[1]` in the list, so only the exact `upper` reaches it. */
17
+ export declare const VOLUME_HIGH_ICON = "audio-volume-high-symbolic";
18
+ /** Below a half — `[2]`, the lower of the two middle names. */
19
+ export declare const VOLUME_LOW_ICON = "audio-volume-low-symbolic";
20
+ /** From a half up to — but not at — full scale — `[3]`. */
21
+ export declare const VOLUME_MEDIUM_ICON = "audio-volume-medium-symbolic";
22
+ /**
23
+ * The icon `GtkVolumeButton` shows at `volume` (0…1), as `gtk_scale_button_update_icon`
24
+ * derives it (gtkscalebutton.c:1086-1104): the exact `lower` is `[0]` (muted), the exact
25
+ * `upper` is `[1]` (high), and a value between them indexes `[2]`/`[3]` by
26
+ * `(guint)((value − lower) / step) + 2` with `step = (upper − lower) / (num_icons − 2)` — a
27
+ * HALF for a 0…1 adjustment over four icons.
28
+ */
29
+ export declare function volumeIconFor(volume: number): string;
30
+ /**
31
+ * `totem_time_to_string` (gtkmediacontrols.c:75-132), in seconds.
32
+ *
33
+ * The `remaining` bump is the C's own (`:81-82`) and it is not a rounding fudge: the C
34
+ * computes the remaining time as `duration - timestamp` and then increments `_time` — the
35
+ * WHOLE TOTAL, not the seconds field — so that `current + remaining = total` holds for a
36
+ * whole second of playback rather than being one second short at every boundary. That is why
37
+ * 300 s of remaining time reads `-5:01` and not `-5:00`: the seconds field only appears to
38
+ * move when the input's own seconds are zero, and the increment carries at 59.
39
+ *
40
+ * NOTHING HERE FLOORS A NEGATIVE, because the C does not. `_time % 60` in C99 keeps the sign
41
+ * of the dividend, so five seconds negative is zero minutes and `-5` seconds and the
42
+ * function returns the nonsense `0:-5`; the C's CALLERS guard the subtraction instead
43
+ * (`duration > timestamp ? duration - timestamp : 0`, :364), and so does every call site
44
+ * here. The C's arithmetic is transcribed rather than repaired, so a caller that skips the
45
+ * guard sees what GTK would have shown.
46
+ *
47
+ * The hour branch is `hour > 0 || force_hour` — an ELEVEN-MINUTE video is `11:03`, not
48
+ * `0:11:03` — and `force_hour` is FALSE at every call site in the C (`:358, :364, :389`).
49
+ * It stays a parameter because it is part of the function's contract, not because anything
50
+ * here passes it.
51
+ *
52
+ * @param seconds total or remaining time, in seconds; a negative is NOT floored here, exactly
53
+ * as it is not in the C — see above.
54
+ */
55
+ export declare function mediaTimeToString(seconds: number, remaining?: boolean, forceHour?: boolean): string;
56
+ export declare class GtkMediaControls extends HTMLElement {
57
+ private _initialized;
58
+ private _playButton;
59
+ private _timeLabel;
60
+ private _seekScale;
61
+ private _durationLabel;
62
+ private _volumeButton;
63
+ /** The icon node INSIDE the volume button — the popover is its sibling child. */
64
+ private _volumeIcon;
65
+ private _volumePopover;
66
+ private _volumeScale;
67
+ private _media;
68
+ /** Whether the user is dragging the seek scale — the C's own re-entrancy guard. */
69
+ private _seeking;
70
+ private _volume;
71
+ connectedCallback(): void;
72
+ /** The `<video>` these controls drive — the browser's answer to a `GtkMediaStream`. */
73
+ get media(): HTMLVideoElement | null;
74
+ /** The current position in seconds. */
75
+ get timestamp(): number;
76
+ /** The media's duration in seconds, or 0 while unknown. */
77
+ get duration(): number;
78
+ /** The volume level, 0…1, matching `volume_adjustment`'s range. */
79
+ get volume(): number;
80
+ set volume(value: number);
81
+ /**
82
+ * Whether the bar is live — the C's `gtk_media_controls_set_sensitive`.
83
+ *
84
+ * Loosely typed on purpose: `_adoptMedia` coerces its optional chain to `null`, and this
85
+ * answers "is there a stream" for any field state rather than only the two the coercion
86
+ * produces. A `!== null` test here read `undefined` as a stream.
87
+ */
88
+ get sensitive(): boolean;
89
+ /** `play_button_clicked` (ui/gtkmediacontrols.ui) — the button's only action. */
90
+ private _togglePlay;
91
+ /**
92
+ * `time_adjustment_changed` (ui/gtkmediacontrols.ui): the scale's value IS the position,
93
+ * in seconds. The `_seeking` guard is the C's own — `update_timestamp` writes the scale
94
+ * from the stream, so without it a drag would fight the playback it is dragging through.
95
+ */
96
+ private _onSeekInput;
97
+ private _onVolumeInput;
98
+ private _setVolume;
99
+ private _renderVolume;
100
+ private _toggleVolumePopover;
101
+ /**
102
+ * The media element these controls drive. A `<gtk-media-controls>` normally sits INSIDE a
103
+ * `<gtk-video>` (the template's `controls_revealer` child), so the nearest ancestor video
104
+ * is the stream — and a controls bar used on its own names one with a `for` attribute
105
+ * holding an id.
106
+ *
107
+ * The optional chain's `undefined` IS COERCED TO `null`, and that is not tidiness: `?? null`
108
+ * is what keeps `_media` in the domain `sensitive` and `_render` compare against. A bar with
109
+ * no enclosing video used to store `undefined` here, `undefined !== null` then reported the
110
+ * template's `sensitive` 0 bar as LIVE, and the `!this._media.paused` at the end of
111
+ * `_render` threw `can't access property "paused", this._media is undefined` — which is the
112
+ * uncaught error `tests/browser/specs/adwaita-upgrade-order.spec.ts` fails on. `null` is
113
+ * what `gtk_media_controls_new()` leaves behind: the template has no stream at all, and
114
+ * `sensitive` is 0 until one is set (ui/gtkmediacontrols.ui).
115
+ */
116
+ private _adoptMedia;
117
+ /** The listeners bound on `_media`, so `_detachMedia` removes the SAME ones. */
118
+ private _mediaListeners;
119
+ private _detachMedia;
120
+ /**
121
+ * `update_timestamp` (gtkmediacontrols.c:352-366). TWO cases and they are not
122
+ * symmetric: with no duration, the POSITION label shows the elapsed time and the
123
+ * DURATION label is hidden (`:358-359`); with a duration, the DURATION label shows the
124
+ * NEGATIVE remaining time and is visible only when the duration is greater than zero
125
+ * (`:389-391`).
126
+ */
127
+ private _updateTimestamp;
128
+ /** `gtk_media_controls_set_duration` (gtkmediacontrols.c:380-392): the scale's range is
129
+ * the media's own duration, and the `upper` 10 of the template is only the pre-stream
130
+ * placeholder. */
131
+ private _updateDuration;
132
+ /** The play button's icon, `play_button_clicked`'s counterpart in `ui/gtkvideo.ui`'s
133
+ * `gtk_video_update_playing`: `media-playback-start-symbolic` stopped,
134
+ * `media-playback-pause-symbolic` playing. */
135
+ private _updatePlaying;
136
+ /**
137
+ * The whole bar's sensitivity. The template ships `sensitive` 0
138
+ * (ui/gtkmediacontrols.ui), so an unattached bar is inert — which is what `insensitive`
139
+ * carries here, and why the spec can assert it before any media is adopted.
140
+ */
141
+ private _render;
142
+ }
@@ -0,0 +1,148 @@
1
+ /** `GtkPositionType`, spelled as the GIR's enum nicks. `top` is the property default. */
2
+ export type NotebookTabPos = 'top' | 'bottom' | 'left' | 'right';
3
+ /** The browser's page descriptor — the stand-in for the `GtkNotebookPage` GObject. */
4
+ export interface NotebookPageInfo {
5
+ /** `GtkNotebookPage:tab-label` — the tab's text. `null` when absent. */
6
+ tabLabel: string | null;
7
+ /** `GtkNotebookPage:menu-label` — the text of the menu entry. `null` when absent. */
8
+ menuLabel: string | null;
9
+ /** `GtkNotebookPage:tab-fill` — the tab fills its allocation. Defaults to TRUE. */
10
+ tabFill: boolean;
11
+ /** `GtkNotebookPage:tab-expand` — the tab expands. Defaults to false. */
12
+ tabExpand: boolean;
13
+ /** `GtkNotebookPage:reorderable` — the user may drag the tab. */
14
+ reorderable: boolean;
15
+ /** `GtkNotebookPage:detachable` — read and reflected; the drag itself is not ported. */
16
+ detachable: boolean;
17
+ /** `GtkWidget:visible` on the child, as the DOM's `hidden`. */
18
+ visible: boolean;
19
+ /** `GtkNotebookPage:child`. */
20
+ child: HTMLElement;
21
+ }
22
+ export declare class GtkNotebook extends HTMLElement {
23
+ private _current;
24
+ private _initialized;
25
+ private _initializedChildren;
26
+ private _header;
27
+ private _tabs;
28
+ private _observer;
29
+ private _tabNodes;
30
+ private _menu;
31
+ static get observedAttributes(): string[];
32
+ /**
33
+ * `Gtk.Notebook:page` — the index of the current page, `-1` when there is none.
34
+ *
35
+ * LIVE rather than the value last written: `get_property` returns
36
+ * `gtk_notebook_get_current_page (notebook)` (gtknotebook.c:1977-1979), so the
37
+ * attribute is an INPUT and this is the answer — a switch reached by clicking a tab
38
+ * is visible through the property without anything having written it. A negative
39
+ * WRITE means the LAST page (gtknotebook.c:6054).
40
+ */
41
+ get page(): number;
42
+ set page(v: number);
43
+ /** `Gtk.Notebook:tab-pos` — which edge the tabs are on. Defaults to `top`. */
44
+ get tabPos(): NotebookTabPos;
45
+ set tabPos(v: NotebookTabPos);
46
+ /** `Gtk.Notebook:show-tabs` — the tab strip itself. Defaults to true. */
47
+ get showTabs(): boolean;
48
+ set showTabs(v: boolean);
49
+ /** `Gtk.Notebook:show-border` — the border around the tab strip. Defaults to true. */
50
+ get showBorder(): boolean;
51
+ set showBorder(v: boolean);
52
+ /** `Gtk.Notebook:scrollable` — GTK's scroll arrows. Defaults to false. */
53
+ get scrollable(): boolean;
54
+ set scrollable(v: boolean);
55
+ /** `Gtk.Notebook:enable-popup` — the right-click page menu. Defaults to false. */
56
+ get enablePopup(): boolean;
57
+ set enablePopup(v: boolean);
58
+ /** `Gtk.Notebook:group-name` — the drag-and-drop group. Defaults to `null`. */
59
+ get groupName(): string | null;
60
+ set groupName(v: string | null);
61
+ /** The current page's child, or `null` — `gtk_notebook_get_nth_page` at `page`. */
62
+ get currentPage(): HTMLElement | null;
63
+ /** `gtk_notebook_get_n_pages` as the browser spells it. */
64
+ get nPages(): number;
65
+ /** `gtk_notebook_get_nth_page` (gtknotebook.c:5956-5977): a child, or null. */
66
+ getNthPage(n: number): HTMLElement | null;
67
+ /** `gtk_notebook_page_num` (gtknotebook.c:6006-6020): an index, `-1` when absent. */
68
+ pageNum(child: HTMLElement): number;
69
+ /** The descriptor of one child, `null` when it is not a page of this notebook. */
70
+ getPage(child: HTMLElement): NotebookPageInfo | null;
71
+ /** `By CHILD rather than by index — `gtk_notebook_page_num` for the index and
72
+ * `gtk_notebook_set_current_page` for the switch (gtknotebook.c:6006, :6046). There is
73
+ * no `gtk_notebook_set_page` to transcribe: GTK 4 dropped it. */
74
+ setPage(child: HTMLElement): boolean;
75
+ /**
76
+ * `gtk_notebook_next_page` (gtknotebook.c:6070-6088) — which searches with
77
+ * `gtk_notebook_search_page (…, STEP_NEXT, TRUE)`, so a HIDDEN page is stepped over
78
+ * rather than ending the walk, and the end of the notebook is simply nothing
79
+ * (:6079-6080).
80
+ */
81
+ nextPage(): boolean;
82
+ /** `gtk_notebook_prev_page` (gtknotebook.c:6096-6113), the same search backwards. */
83
+ prevPage(): boolean;
84
+ /**
85
+ * `gtk_notebook_set_current_page` (gtknotebook.c:6046-6060) into
86
+ * `real_switch_page` (gtknotebook.c:5436-5498): a negative index is the last page,
87
+ * an out-of-range one does nothing, and a page whose child is hidden is refused.
88
+ */
89
+ setCurrentPage(index: number): boolean;
90
+ /** `gtk_notebook_append_page` (gtknotebook.c:5807-5870) — the child is the page. */
91
+ appendPage(child: HTMLElement, tabLabel?: string | null): number;
92
+ /**
93
+ * `gtk_notebook_insert_page` (gtknotebook.c:5807-5870). A negative `position` means
94
+ * the end, which is what `append_page` passes.
95
+ */
96
+ insertPage(child: HTMLElement, position: number, tabLabel?: string | null): number;
97
+ /** `gtk_notebook_remove_page` (gtknotebook.c:5899-5932). */
98
+ removePage(child: HTMLElement): boolean;
99
+ /** Rebuild the tabs by hand, for a consumer that mutated a page in place. */
100
+ refresh(): void;
101
+ connectedCallback(): void;
102
+ disconnectedCallback(): void;
103
+ attributeChangedCallback(name: string): void;
104
+ /**
105
+ * `switch-page` is emitted BEFORE the switch (gtknotebook.c:5518-5523) and
106
+ * `real_switch_page` runs after it, so a listener sees the page being switched TO
107
+ * while `page` still reads the old one — the order C's own handlers rely on.
108
+ */
109
+ private _switchTo;
110
+ private _notify;
111
+ private _property;
112
+ private _write;
113
+ /** A boolean property with a non-false default: absent means the default. */
114
+ private _flag;
115
+ /** The children, in page order — the header is the widget's own, never a page. */
116
+ private _pages;
117
+ private _page;
118
+ private _initChild;
119
+ private _firstVisible;
120
+ /**
121
+ * `gtk_notebook_search_page` with `find_visible` TRUE (gtknotebook.c:4412-4470): walk
122
+ * from the current page in `direction`, skipping every page whose child is hidden, and
123
+ * switch to the first one that takes. Off either end there is nothing, which is the
124
+ * FALSE both `next_page` and `prev_page` return.
125
+ */
126
+ private _searchPage;
127
+ /**
128
+ * The neighbour a REMOVAL hands the notebook to: the pages that followed the removed
129
+ * one, then the pages that came before it — `search_page (…, STEP_NEXT, TRUE)` and
130
+ * then `search_page (…, STEP_PREV, TRUE)` (gtknotebook.c:4281-4282), which is a wrap
131
+ * rather than a one-way walk. `position` is where the removed page WAS.
132
+ */
133
+ private _takeOver;
134
+ private _onMutations;
135
+ /** Which edge the tabs are on, with RTL's left/right swap (gtknotebook.c:1741-1757). */
136
+ private _effectiveTabPos;
137
+ private _render;
138
+ private _buildTab;
139
+ /**
140
+ * `enable-popup`'s right-click menu (`gtk_notebook_popup_enable`,
141
+ * gtknotebook.c:6420-6462 builds it and `gtk_notebook_popup_menu` at :2684-2692 pops
142
+ * it up) as a DOM listbox of
143
+ * the same pages. C builds it with `gtk_menu_model` and a GtkPopover; the page set
144
+ * and the selection are the same, the widget is not.
145
+ */
146
+ private readonly _onContextMenu;
147
+ private _closeMenu;
148
+ }
@@ -0,0 +1,22 @@
1
+ export declare class GtkOverlay extends HTMLElement {
2
+ private _childEl;
3
+ private _layerEl;
4
+ private _initialized;
5
+ /**
6
+ * GTK recomputes the edge classes on every allocation of an overlay child, which is a
7
+ * frame-clock fact this renderer does not have; a ResizeObserver on the layer is the
8
+ * honest substitute — it fires on the changes the C would answer to.
9
+ */
10
+ private _resize;
11
+ /** The two things a child can do that change which edge it is pinned to. */
12
+ private _mutations;
13
+ static get observedAttributes(): any[];
14
+ /** `Gtk.Overlay:child` — the main child, as the light-DOM node the host adopted. */
15
+ get child(): Element | null;
16
+ /** The absolutely-positioned layer every `slot="overlay"` child lands in. */
17
+ get overlayLayer(): HTMLDivElement;
18
+ connectedCallback(): void;
19
+ disconnectedCallback(): void;
20
+ private _observe;
21
+ private _syncEdgeClasses;
22
+ }