@gjsify/adwaita-web 0.54.0 → 0.56.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.
- package/README.md +8 -0
- package/dist/adwaita-web.css +8146 -3011
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/adw-application-window.spec.d.ts +1 -0
- package/lib/types/adw-bin.spec.d.ts +1 -0
- package/lib/types/adw-breakpoint-bin.spec.d.ts +1 -0
- package/lib/types/adw-clamp-scrollable.spec.d.ts +1 -0
- package/lib/types/adw-multi-layout-view.spec.d.ts +1 -0
- package/lib/types/adw-preferences-row.spec.d.ts +1 -0
- package/lib/types/adw-shortcuts.spec.d.ts +1 -0
- package/lib/types/adw-status-page.spec.d.ts +1 -0
- package/lib/types/adw-tab-bar.spec.d.ts +1 -0
- package/lib/types/adw-tab-button.spec.d.ts +1 -0
- package/lib/types/adw-tab-overview.spec.d.ts +1 -0
- package/lib/types/adw-view-switcher-sidebar.spec.d.ts +1 -0
- package/lib/types/adw-window.spec.d.ts +1 -0
- package/lib/types/attributes.d.ts +19 -0
- package/lib/types/breakpoints.d.ts +14 -3
- package/lib/types/construct-vectors.spec.d.ts +1 -0
- package/lib/types/elements/adw-action-row.d.ts +4 -0
- package/lib/types/elements/adw-application-window.d.ts +27 -0
- package/lib/types/elements/adw-bin.d.ts +17 -0
- package/lib/types/elements/adw-breakpoint-bin.d.ts +67 -0
- package/lib/types/elements/adw-clamp-scrollable.d.ts +38 -0
- package/lib/types/elements/adw-combo-row.d.ts +4 -0
- package/lib/types/elements/adw-dialog.d.ts +10 -0
- package/lib/types/elements/adw-entry-row.d.ts +6 -0
- package/lib/types/elements/adw-expander-row.d.ts +2 -0
- package/lib/types/elements/adw-header-bar.d.ts +6 -0
- package/lib/types/elements/adw-layout-slot.d.ts +19 -0
- package/lib/types/elements/adw-multi-layout-view.d.ts +101 -0
- package/lib/types/elements/adw-overlay-split-view.d.ts +13 -0
- package/lib/types/elements/adw-preferences-row.d.ts +31 -0
- package/lib/types/elements/adw-shortcuts-dialog.d.ts +13 -0
- package/lib/types/elements/adw-shortcuts-item.d.ts +36 -0
- package/lib/types/elements/adw-shortcuts-section.d.ts +14 -0
- package/lib/types/elements/adw-sidebar.d.ts +8 -2
- package/lib/types/elements/adw-spin-row.d.ts +6 -0
- package/lib/types/elements/adw-switch-row.d.ts +7 -0
- package/lib/types/elements/adw-tab-bar.d.ts +108 -0
- package/lib/types/elements/adw-tab-button.d.ts +32 -0
- package/lib/types/elements/adw-tab-overview.d.ts +199 -0
- package/lib/types/elements/adw-tab-view.d.ts +19 -23
- package/lib/types/elements/adw-toggle-group.d.ts +17 -0
- package/lib/types/elements/adw-view-switcher-sidebar.d.ts +84 -0
- package/lib/types/elements/adw-window.d.ts +40 -0
- package/lib/types/elements/gtk-about-dialog.d.ts +146 -0
- package/lib/types/elements/gtk-application-window.d.ts +34 -0
- package/lib/types/elements/gtk-aspect-frame.d.ts +27 -0
- package/lib/types/elements/gtk-button.d.ts +9 -0
- package/lib/types/elements/gtk-calendar.d.ts +159 -0
- package/lib/types/elements/gtk-center-box.d.ts +39 -0
- package/lib/types/elements/gtk-color-dialog-button.d.ts +69 -0
- package/lib/types/elements/gtk-column-view.d.ts +50 -0
- package/lib/types/elements/gtk-drag-icon.d.ts +78 -0
- package/lib/types/elements/gtk-drawing-area.d.ts +95 -0
- package/lib/types/elements/gtk-editable-label.d.ts +33 -0
- package/lib/types/elements/gtk-emoji-chooser.d.ts +84 -0
- package/lib/types/elements/gtk-entry.d.ts +20 -1
- package/lib/types/elements/gtk-expander.d.ts +49 -0
- package/lib/types/elements/gtk-fixed.d.ts +13 -0
- package/lib/types/elements/gtk-flow-box-child.d.ts +14 -0
- package/lib/types/elements/gtk-flow-box.d.ts +87 -0
- package/lib/types/elements/gtk-font-dialog-button.d.ts +83 -0
- package/lib/types/elements/gtk-frame.d.ts +24 -0
- package/lib/types/elements/gtk-gl-area.d.ts +136 -0
- package/lib/types/elements/gtk-graphics-offload.d.ts +24 -0
- package/lib/types/elements/gtk-grid-view.d.ts +39 -0
- package/lib/types/elements/gtk-grid.d.ts +27 -0
- package/lib/types/elements/gtk-header-bar.d.ts +60 -0
- package/lib/types/elements/gtk-inscription.d.ts +64 -0
- package/lib/types/elements/gtk-label.d.ts +3 -0
- package/lib/types/elements/gtk-level-bar.d.ts +59 -0
- package/lib/types/elements/gtk-link-button.d.ts +29 -0
- package/lib/types/elements/gtk-list-box-row.d.ts +54 -0
- package/lib/types/elements/gtk-list-box.d.ts +100 -0
- package/lib/types/elements/gtk-list-view.d.ts +73 -0
- package/lib/types/elements/gtk-media-controls.d.ts +142 -0
- package/lib/types/elements/gtk-notebook.d.ts +148 -0
- package/lib/types/elements/gtk-overlay.d.ts +22 -0
- package/lib/types/elements/gtk-page-setup-unix-dialog.d.ts +87 -0
- package/lib/types/elements/gtk-paned.d.ts +121 -0
- package/lib/types/elements/gtk-password-entry.d.ts +27 -0
- package/lib/types/elements/gtk-picture.d.ts +66 -0
- package/lib/types/elements/gtk-popover-bin.d.ts +82 -0
- package/lib/types/elements/gtk-popover-menu-bar.d.ts +66 -0
- package/lib/types/elements/gtk-popover-menu.d.ts +83 -0
- package/lib/types/elements/gtk-popover.d.ts +28 -3
- package/lib/types/elements/gtk-print-unix-dialog.d.ts +167 -0
- package/lib/types/elements/gtk-revealer.d.ts +55 -0
- package/lib/types/elements/gtk-scale-button.d.ts +59 -0
- package/lib/types/elements/gtk-scale.d.ts +98 -0
- package/lib/types/elements/gtk-scrollbar.d.ts +124 -0
- package/lib/types/elements/gtk-scrolled-window.d.ts +129 -0
- package/lib/types/elements/gtk-search-bar.d.ts +39 -0
- package/lib/types/elements/gtk-search-entry.d.ts +27 -0
- package/lib/types/elements/gtk-separator.d.ts +10 -0
- package/lib/types/elements/gtk-spin-button.d.ts +94 -0
- package/lib/types/elements/gtk-spinner.d.ts +14 -0
- package/lib/types/elements/gtk-stack-sidebar.d.ts +43 -0
- package/lib/types/elements/gtk-stack-switcher.d.ts +58 -0
- package/lib/types/elements/gtk-stack.d.ts +154 -0
- package/lib/types/elements/gtk-switch.d.ts +4 -1
- package/lib/types/elements/gtk-text-view.d.ts +62 -0
- package/lib/types/elements/gtk-text.d.ts +45 -0
- package/lib/types/elements/gtk-toggle-button.d.ts +45 -0
- package/lib/types/elements/gtk-tree-expander.d.ts +38 -0
- package/lib/types/elements/gtk-video.d.ts +97 -0
- package/lib/types/elements/gtk-viewport.d.ts +84 -0
- package/lib/types/elements/gtk-window-controls.d.ts +80 -0
- package/lib/types/elements/gtk-window-handle.d.ts +39 -0
- package/lib/types/elements/gtk-window.d.ts +103 -0
- package/lib/types/elements/justification.d.ts +2 -0
- package/lib/types/elements/popover-menu.d.ts +18 -0
- package/lib/types/elements/roving-focus.d.ts +29 -1
- package/lib/types/emoji-data.d.ts +38 -0
- package/lib/types/font-description.d.ts +96 -0
- package/lib/types/gtk-about-dialog.spec.d.ts +1 -0
- package/lib/types/gtk-action-bar.spec.d.ts +1 -0
- package/lib/types/gtk-application-window.spec.d.ts +1 -0
- package/lib/types/gtk-aspect-frame.spec.d.ts +1 -0
- package/lib/types/gtk-calendar.spec.d.ts +1 -0
- package/lib/types/gtk-center-box.spec.d.ts +1 -0
- package/lib/types/gtk-color-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-column-view.spec.d.ts +1 -0
- package/lib/types/gtk-drag-icon.spec.d.ts +1 -0
- package/lib/types/gtk-drawing-area.spec.d.ts +1 -0
- package/lib/types/gtk-editable-label.spec.d.ts +1 -0
- package/lib/types/gtk-emoji-chooser.spec.d.ts +1 -0
- package/lib/types/gtk-expander.spec.d.ts +1 -0
- package/lib/types/gtk-fixed.spec.d.ts +1 -0
- package/lib/types/gtk-flow-box.spec.d.ts +1 -0
- package/lib/types/gtk-font-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-frame.spec.d.ts +1 -0
- package/lib/types/gtk-gl-area.spec.d.ts +1 -0
- package/lib/types/gtk-graphics-offload.spec.d.ts +1 -0
- package/lib/types/gtk-grid-view.spec.d.ts +1 -0
- package/lib/types/gtk-grid.spec.d.ts +1 -0
- package/lib/types/gtk-header-bar.spec.d.ts +1 -0
- package/lib/types/gtk-inscription.spec.d.ts +1 -0
- package/lib/types/gtk-level-bar.spec.d.ts +1 -0
- package/lib/types/gtk-link-button.spec.d.ts +1 -0
- package/lib/types/gtk-list-box.spec.d.ts +1 -0
- package/lib/types/gtk-list-view.spec.d.ts +1 -0
- package/lib/types/gtk-media-controls.spec.d.ts +1 -0
- package/lib/types/gtk-notebook.spec.d.ts +1 -0
- package/lib/types/gtk-overlay.spec.d.ts +1 -0
- package/lib/types/gtk-paned.spec.d.ts +1 -0
- package/lib/types/gtk-password-entry.spec.d.ts +1 -0
- package/lib/types/gtk-picture.spec.d.ts +1 -0
- package/lib/types/gtk-popover-bin.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu-bar.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu.spec.d.ts +1 -0
- package/lib/types/gtk-popover-role.spec.d.ts +1 -0
- package/lib/types/gtk-popover.spec.d.ts +1 -0
- package/lib/types/gtk-print-dialogs.spec.d.ts +1 -0
- package/lib/types/gtk-revealer.spec.d.ts +1 -0
- package/lib/types/gtk-scale-button.spec.d.ts +1 -0
- package/lib/types/gtk-scale.spec.d.ts +1 -0
- package/lib/types/gtk-scrollbar.spec.d.ts +1 -0
- package/lib/types/gtk-scrolled-window.spec.d.ts +1 -0
- package/lib/types/gtk-search-bar.spec.d.ts +1 -0
- package/lib/types/gtk-search-entry.spec.d.ts +1 -0
- package/lib/types/gtk-separator.spec.d.ts +1 -0
- package/lib/types/gtk-spin-button.spec.d.ts +1 -0
- package/lib/types/gtk-spinner.spec.d.ts +1 -0
- package/lib/types/gtk-stack-sidebar.spec.d.ts +1 -0
- package/lib/types/gtk-stack-switcher.spec.d.ts +1 -0
- package/lib/types/gtk-stack.spec.d.ts +1 -0
- package/lib/types/gtk-text-view.spec.d.ts +1 -0
- package/lib/types/gtk-text.spec.d.ts +1 -0
- package/lib/types/gtk-toggle-button.spec.d.ts +1 -0
- package/lib/types/gtk-tree-expander.spec.d.ts +1 -0
- package/lib/types/gtk-video.spec.d.ts +1 -0
- package/lib/types/gtk-viewport.spec.d.ts +1 -0
- package/lib/types/gtk-window-controls.spec.d.ts +1 -0
- package/lib/types/gtk-window-handle.spec.d.ts +1 -0
- package/lib/types/gtk-window.spec.d.ts +1 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/list-view-dom.d.ts +44 -0
- package/lib/types/namespace/adw.d.ts +12 -0
- package/lib/types/namespace/gtk.d.ts +61 -0
- package/lib/types/page-setup.d.ts +100 -0
- package/lib/types/row-line-clamp.d.ts +20 -0
- package/lib/types/row-tooltip.d.ts +8 -0
- package/lib/types/row-tooltip.spec.d.ts +1 -0
- package/lib/types/scroll-shading.d.ts +15 -1
- package/lib/types/shared-tree-builder.d.ts +75 -17
- package/lib/types/shared-tree-mount.spec.d.ts +1 -0
- package/lib/types/signals.d.ts +4 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/lib/types/tab-chip.d.ts +73 -0
- package/lib/types/template-classes.d.ts +11 -0
- package/lib/types/widget-size.spec.d.ts +1 -0
- package/package.json +12 -8
- package/scss/_action_row.scss +41 -17
- package/scss/_application_window.scss +26 -0
- package/scss/_aspect_frame.scss +25 -0
- package/scss/_bin.scss +26 -0
- package/scss/_button.scss +45 -0
- package/scss/_button_row.scss +5 -0
- package/scss/_calendar.scss +176 -0
- package/scss/_center_box.scss +25 -0
- package/scss/_checks.scss +6 -1
- package/scss/_clamp_scrollable.scss +28 -0
- package/scss/_color_button.scss +67 -0
- package/scss/_column_view.scss +126 -0
- package/scss/_drag_icon.scss +55 -0
- package/scss/_drawing.scss +85 -0
- package/scss/_emoji_chooser.scss +213 -0
- package/scss/_entry.scss +13 -5
- package/scss/_entry_row.scss +1 -1
- package/scss/_expander.scss +113 -0
- package/scss/_expander_row.scss +36 -3
- package/scss/_fixed.scss +29 -0
- package/scss/_flow_box.scss +94 -0
- package/scss/_font_button.scss +63 -0
- package/scss/_frame.scss +41 -0
- package/scss/_grid.scss +19 -0
- package/scss/_grid_view.scss +46 -0
- package/scss/_gtk_about_dialog.scss +186 -0
- package/scss/_headerbar.scss +134 -1
- package/scss/_icons.generated.scss +186 -0
- package/scss/_inscription.scss +125 -0
- package/scss/_level_bar.scss +190 -0
- package/scss/_link.scss +82 -0
- package/scss/_list_box.scss +88 -0
- package/scss/_list_view.scss +96 -0
- package/scss/_media_controls.scss +139 -0
- package/scss/_overlay.scss +68 -0
- package/scss/_paned.scss +130 -0
- package/scss/_password_entry.scss +83 -0
- package/scss/_picture.scss +80 -0
- package/scss/_popover_bin.scss +53 -0
- package/scss/_popover_menu_bar.scss +104 -0
- package/scss/_preferences_row.scss +60 -0
- package/scss/_print_dialogs.scss +328 -0
- package/scss/_reset.scss +21 -19
- package/scss/_revealer.scss +37 -0
- package/scss/_row.scss +36 -5
- package/scss/_scale.scss +298 -0
- package/scss/_scale_button.scss +167 -0
- package/scss/_scrollbar.scss +230 -0
- package/scss/_scrolled_window.scss +131 -0
- package/scss/_search_bar.scss +118 -0
- package/scss/_search_entry.scss +86 -0
- package/scss/_separator.scss +44 -0
- package/scss/_shortcuts_dialog.scss +100 -0
- package/scss/_spin_button.scss +172 -0
- package/scss/_spin_row.scss +56 -8
- package/scss/_spinner.scss +85 -4
- package/scss/_stack.scss +729 -0
- package/scss/_status_page.scss +1 -1
- package/scss/_switch.scss +13 -5
- package/scss/_switch_row.scss +10 -0
- package/scss/_tab_bar.scss +317 -0
- package/scss/_tab_button.scss +98 -0
- package/scss/_tab_overview.scss +483 -0
- package/scss/_text.scss +182 -0
- package/scss/_theme.scss +1 -1
- package/scss/_toggle_group.scss +28 -0
- package/scss/_tree_expander.scss +62 -0
- package/scss/_variables.scss +1 -1
- package/scss/_video.scss +146 -0
- package/scss/_view_switcher_sidebar.scss +112 -0
- package/scss/_viewport.scss +50 -0
- package/scss/_widget.scss +14 -3
- package/scss/_window.scss +131 -2
- package/scss/_window_handle.scss +20 -0
- package/scss/adwaita-skin.scss +109 -0
- package/src/adw-action-rows.spec.ts +331 -0
- package/src/adw-application-window.spec.ts +118 -0
- package/src/adw-bin.spec.ts +75 -0
- package/src/adw-breakpoint-bin.spec.ts +324 -0
- package/src/adw-clamp-scrollable.spec.ts +189 -0
- package/src/adw-header-bar.spec.ts +18 -0
- package/src/adw-multi-layout-view.spec.ts +243 -0
- package/src/adw-preferences-row.spec.ts +164 -0
- package/src/adw-row-state.spec.ts +142 -0
- package/src/adw-shortcuts.spec.ts +155 -0
- package/src/adw-status-page.spec.ts +124 -0
- package/src/adw-tab-bar.spec.ts +287 -0
- package/src/adw-tab-button.spec.ts +101 -0
- package/src/adw-tab-overview.spec.ts +443 -0
- package/src/adw-view-switcher-sidebar.spec.ts +281 -0
- package/src/adw-window.spec.ts +129 -0
- package/src/attributes.ts +52 -0
- package/src/breakpoints.ts +25 -8
- package/src/capabilities.d.mts +3 -0
- package/src/capabilities.mjs +21 -0
- package/src/connect-lifecycle.spec.ts +12 -0
- package/src/construct-vectors.spec.ts +175 -0
- package/src/elements/adw-action-row.ts +31 -2
- package/src/elements/adw-alert-dialog.ts +4 -1
- package/src/elements/adw-application-window.ts +154 -0
- package/src/elements/adw-bin.ts +101 -0
- package/src/elements/adw-breakpoint-bin.ts +287 -0
- package/src/elements/adw-button-row.ts +7 -1
- package/src/elements/adw-clamp-scrollable.ts +207 -0
- package/src/elements/adw-combo-row.ts +26 -1
- package/src/elements/adw-dialog.ts +19 -0
- package/src/elements/adw-entry-row.ts +22 -12
- package/src/elements/adw-expander-row.ts +34 -1
- package/src/elements/adw-header-bar.ts +18 -4
- package/src/elements/adw-layout-slot.ts +95 -0
- package/src/elements/adw-multi-layout-view.ts +326 -0
- package/src/elements/adw-overlay-split-view.ts +29 -6
- package/src/elements/adw-preferences-row.ts +153 -0
- package/src/elements/adw-shortcuts-dialog.ts +52 -0
- package/src/elements/adw-shortcuts-item.ts +171 -0
- package/src/elements/adw-shortcuts-section.ts +86 -0
- package/src/elements/adw-sidebar.ts +74 -7
- package/src/elements/adw-spin-row.ts +37 -2
- package/src/elements/adw-status-page.ts +10 -2
- package/src/elements/adw-switch-row.ts +53 -2
- package/src/elements/adw-tab-bar.ts +529 -0
- package/src/elements/adw-tab-button.ts +194 -0
- package/src/elements/adw-tab-overview.ts +1011 -0
- package/src/elements/adw-tab-view.ts +66 -145
- package/src/elements/adw-toggle-group.ts +138 -14
- package/src/elements/adw-view-stack.ts +18 -0
- package/src/elements/adw-view-switcher-sidebar.ts +332 -0
- package/src/elements/adw-window.ts +190 -11
- package/src/elements/checks.ts +35 -8
- package/src/elements/gtk-about-dialog.ts +811 -0
- package/src/elements/gtk-application-window.ts +108 -0
- package/src/elements/gtk-aspect-frame.ts +160 -0
- package/src/elements/gtk-button.ts +12 -0
- package/src/elements/gtk-calendar.ts +757 -0
- package/src/elements/gtk-center-box.ts +184 -0
- package/src/elements/gtk-color-dialog-button.ts +278 -0
- package/src/elements/gtk-column-view.ts +320 -0
- package/src/elements/gtk-drag-icon.ts +257 -0
- package/src/elements/gtk-drawing-area.ts +303 -0
- package/src/elements/gtk-editable-label.ts +204 -0
- package/src/elements/gtk-emoji-chooser.ts +542 -0
- package/src/elements/gtk-entry.ts +39 -5
- package/src/elements/gtk-expander.ts +301 -0
- package/src/elements/gtk-fixed.ts +99 -0
- package/src/elements/gtk-flow-box-child.ts +68 -0
- package/src/elements/gtk-flow-box.ts +480 -0
- package/src/elements/gtk-font-dialog-button.ts +432 -0
- package/src/elements/gtk-frame.ts +174 -0
- package/src/elements/gtk-gl-area.ts +476 -0
- package/src/elements/gtk-graphics-offload.ts +130 -0
- package/src/elements/gtk-grid-view.ts +168 -0
- package/src/elements/gtk-grid.ts +127 -0
- package/src/elements/gtk-header-bar.ts +273 -0
- package/src/elements/gtk-inscription.ts +387 -0
- package/src/elements/gtk-label.ts +19 -11
- package/src/elements/gtk-level-bar.ts +323 -0
- package/src/elements/gtk-link-button.ts +138 -0
- package/src/elements/gtk-list-box-row.ts +195 -0
- package/src/elements/gtk-list-box.ts +413 -0
- package/src/elements/gtk-list-view.ts +370 -0
- package/src/elements/gtk-media-controls.ts +509 -0
- package/src/elements/gtk-notebook.ts +664 -0
- package/src/elements/gtk-overlay.ts +149 -0
- package/src/elements/gtk-page-setup-unix-dialog.ts +420 -0
- package/src/elements/gtk-paned.ts +597 -0
- package/src/elements/gtk-password-entry.ts +170 -0
- package/src/elements/gtk-picture.ts +254 -0
- package/src/elements/gtk-popover-bin.ts +332 -0
- package/src/elements/gtk-popover-menu-bar.ts +355 -0
- package/src/elements/gtk-popover-menu.ts +339 -0
- package/src/elements/gtk-popover.ts +92 -10
- package/src/elements/gtk-print-unix-dialog.ts +989 -0
- package/src/elements/gtk-progress-bar.ts +24 -11
- package/src/elements/gtk-revealer.ts +406 -0
- package/src/elements/gtk-scale-button.ts +358 -0
- package/src/elements/gtk-scale.ts +492 -0
- package/src/elements/gtk-scrollbar.ts +528 -0
- package/src/elements/gtk-scrolled-window.ts +653 -0
- package/src/elements/gtk-search-bar.ts +200 -0
- package/src/elements/gtk-search-entry.ts +172 -0
- package/src/elements/gtk-separator.ts +52 -0
- package/src/elements/gtk-spin-button.ts +475 -0
- package/src/elements/gtk-spinner.ts +126 -0
- package/src/elements/gtk-stack-sidebar.ts +212 -0
- package/src/elements/gtk-stack-switcher.ts +279 -0
- package/src/elements/gtk-stack.ts +748 -0
- package/src/elements/gtk-switch.ts +52 -19
- package/src/elements/gtk-text-view.ts +290 -0
- package/src/elements/gtk-text.ts +219 -0
- package/src/elements/gtk-toggle-button.ts +239 -0
- package/src/elements/gtk-tree-expander.ts +243 -0
- package/src/elements/gtk-video.ts +423 -0
- package/src/elements/gtk-viewport.ts +277 -0
- package/src/elements/gtk-window-controls.ts +341 -0
- package/src/elements/gtk-window-handle.ts +221 -0
- package/src/elements/gtk-window.ts +372 -0
- package/src/elements/justification.ts +24 -0
- package/src/elements/popover-menu.ts +24 -0
- package/src/elements/roving-focus.ts +53 -21
- package/src/emoji-data.ts +577 -0
- package/src/entry-rows.spec.ts +31 -0
- package/src/font-description.ts +238 -0
- package/src/gtk-about-dialog.spec.ts +250 -0
- package/src/gtk-action-bar.spec.ts +89 -0
- package/src/gtk-application-window.spec.ts +107 -0
- package/src/gtk-aspect-frame.spec.ts +114 -0
- package/src/gtk-calendar.spec.ts +589 -0
- package/src/gtk-center-box.spec.ts +125 -0
- package/src/gtk-color-dialog-button.spec.ts +141 -0
- package/src/gtk-column-view.spec.ts +154 -0
- package/src/gtk-drag-icon.spec.ts +190 -0
- package/src/gtk-drawing-area.spec.ts +211 -0
- package/src/gtk-editable-label.spec.ts +190 -0
- package/src/gtk-emoji-chooser.spec.ts +173 -0
- package/src/gtk-entry.spec.ts +23 -0
- package/src/gtk-expander.spec.ts +170 -0
- package/src/gtk-fixed.spec.ts +97 -0
- package/src/gtk-flow-box.spec.ts +289 -0
- package/src/gtk-font-dialog-button.spec.ts +166 -0
- package/src/gtk-frame.spec.ts +119 -0
- package/src/gtk-gl-area.spec.ts +361 -0
- package/src/gtk-graphics-offload.spec.ts +119 -0
- package/src/gtk-grid-view.spec.ts +106 -0
- package/src/gtk-grid.spec.ts +122 -0
- package/src/gtk-header-bar.spec.ts +202 -0
- package/src/gtk-inscription.spec.ts +235 -0
- package/src/gtk-level-bar.spec.ts +199 -0
- package/src/gtk-link-button.spec.ts +117 -0
- package/src/gtk-list-box.spec.ts +422 -0
- package/src/gtk-list-view.spec.ts +203 -0
- package/src/gtk-media-controls.spec.ts +295 -0
- package/src/gtk-notebook.spec.ts +546 -0
- package/src/gtk-overlay.spec.ts +141 -0
- package/src/gtk-paned.spec.ts +267 -0
- package/src/gtk-password-entry.spec.ts +150 -0
- package/src/gtk-picture.spec.ts +172 -0
- package/src/gtk-popover-bin.spec.ts +229 -0
- package/src/gtk-popover-menu-bar.spec.ts +296 -0
- package/src/gtk-popover-menu.spec.ts +261 -0
- package/src/gtk-popover-role.spec.ts +138 -0
- package/src/gtk-popover.spec.ts +264 -0
- package/src/gtk-print-dialogs.spec.ts +251 -0
- package/src/gtk-revealer.spec.ts +164 -0
- package/src/gtk-scale-button.spec.ts +218 -0
- package/src/gtk-scale.spec.ts +213 -0
- package/src/gtk-scrollbar.spec.ts +244 -0
- package/src/gtk-scrolled-window.spec.ts +262 -0
- package/src/gtk-search-bar.spec.ts +179 -0
- package/src/gtk-search-entry.spec.ts +142 -0
- package/src/gtk-separator.spec.ts +74 -0
- package/src/gtk-spin-button.spec.ts +186 -0
- package/src/gtk-spinner.spec.ts +130 -0
- package/src/gtk-stack-sidebar.spec.ts +217 -0
- package/src/gtk-stack-switcher.spec.ts +249 -0
- package/src/gtk-stack.spec.ts +432 -0
- package/src/gtk-text-view.spec.ts +189 -0
- package/src/gtk-text.spec.ts +163 -0
- package/src/gtk-toggle-button.spec.ts +186 -0
- package/src/gtk-tree-expander.spec.ts +201 -0
- package/src/gtk-video.spec.ts +240 -0
- package/src/gtk-viewport.spec.ts +140 -0
- package/src/gtk-window-controls.spec.ts +232 -0
- package/src/gtk-window-handle.spec.ts +158 -0
- package/src/gtk-window.spec.ts +202 -0
- package/src/index.ts +9 -1
- package/src/keyboard-operable.spec.ts +77 -9
- package/src/list-view-dom.ts +121 -0
- package/src/namespace/adw.ts +12 -0
- package/src/namespace/gtk.ts +61 -0
- package/src/page-setup.ts +222 -0
- package/src/row-line-clamp.ts +74 -0
- package/src/row-tooltip.spec.ts +313 -0
- package/src/row-tooltip.ts +52 -0
- package/src/scroll-shading.ts +18 -1
- package/src/shared-tree-builder.ts +336 -41
- package/src/shared-tree-mount.spec.ts +130 -0
- package/src/shared-trees.spec.ts +15 -0
- package/src/signals.ts +15 -0
- package/src/style-classes.spec.ts +9 -8
- package/src/styles.generated.ts +1 -1
- package/src/tab-chip.ts +200 -0
- package/src/template-classes.ts +45 -0
- package/src/test.browser.mts +160 -0
- package/src/widget-size.spec.ts +117 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type PageSetup, type PageUnit } from '../page-setup.js';
|
|
2
|
+
import { AdwDialog } from './adw-dialog.js';
|
|
3
|
+
/** One row of the "Format for:" drop down. */
|
|
4
|
+
export interface PrinterInfo {
|
|
5
|
+
/** `gtk_printer_get_name` — what `format-for-printer` is compared against. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
/** `gtk_printer_get_location`, the dimmed second line of the row. */
|
|
8
|
+
readonly location?: string;
|
|
9
|
+
}
|
|
10
|
+
/** The one `GtkPrintSettings` key this dialog reads or writes. */
|
|
11
|
+
export interface PrintSettingsData {
|
|
12
|
+
/** `format-for-printer` — the printer name the settings belong to. */
|
|
13
|
+
readonly 'format-for-printer'?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class GtkPageSetupUnixDialog extends AdwDialog {
|
|
16
|
+
private _built;
|
|
17
|
+
static get observedAttributes(): string[];
|
|
18
|
+
private _printerEl;
|
|
19
|
+
private _paperEl;
|
|
20
|
+
private _sizeLabelEl;
|
|
21
|
+
private _radios;
|
|
22
|
+
private _printers;
|
|
23
|
+
/** The setups in the drop-down, in the order the C appends them. */
|
|
24
|
+
private _setups;
|
|
25
|
+
/** `last_setup` — the size the drop down is put back to when a row is not a size. */
|
|
26
|
+
private _lastSetup;
|
|
27
|
+
private _printSettings;
|
|
28
|
+
private _unit;
|
|
29
|
+
/** The unit the two labels speak — `_gtk_print_get_default_user_units` is mm here. */
|
|
30
|
+
get unit(): PageUnit;
|
|
31
|
+
set unit(value: PageUnit);
|
|
32
|
+
/**
|
|
33
|
+
* The printer list GTK discovers through a print backend. A browser has no CUPS, so
|
|
34
|
+
* this is an INPUT; the row every dialog starts with is added by the element itself.
|
|
35
|
+
*/
|
|
36
|
+
get printers(): PrinterInfo[];
|
|
37
|
+
set printers(value: readonly PrinterInfo[]);
|
|
38
|
+
/**
|
|
39
|
+
* The current page setup — `gtk_page_setup_unix_dialog_get_page_setup`, which returns
|
|
40
|
+
* the SELECTED setup with the orientation the radios hold.
|
|
41
|
+
*/
|
|
42
|
+
get pageSetup(): PageSetup;
|
|
43
|
+
/**
|
|
44
|
+
* `gtk_page_setup_unix_dialog_set_page_setup`: select the matching row, appending the
|
|
45
|
+
* setup when no row matches (`set_paper_size` with `add_item` TRUE), then set the
|
|
46
|
+
* orientation radios.
|
|
47
|
+
*/
|
|
48
|
+
set pageSetup(value: PageSetup);
|
|
49
|
+
/** `gtk_page_setup_unix_dialog_get_print_settings` — the object, not a copy of it. */
|
|
50
|
+
get printSettings(): PrintSettingsData | null;
|
|
51
|
+
/** Selects the printer named by `format-for-printer`, as the setter does. */
|
|
52
|
+
set printSettings(value: PrintSettingsData | null);
|
|
53
|
+
connectedCallback(): void;
|
|
54
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
55
|
+
private _build;
|
|
56
|
+
/** A `GtkDropDown` with its label as the accessible name, `column-span 3`. */
|
|
57
|
+
private _dropDown;
|
|
58
|
+
/** A grid label — right-aligned, `use-underline` in the `.ui`, no keyvals here. */
|
|
59
|
+
private _label;
|
|
60
|
+
/**
|
|
61
|
+
* The `.dialog-action-area` row: `_Cancel` (GTK_RESPONSE_CANCEL) and `_Apply`
|
|
62
|
+
* (GTK_RESPONSE_OK), which is the label `gtk_dialog_add_buttons` gives the OK response
|
|
63
|
+
* in this dialog. Escape is the close action the base class already binds.
|
|
64
|
+
*/
|
|
65
|
+
private _actions;
|
|
66
|
+
private _respond;
|
|
67
|
+
/** The drop-down's rows: the pseudo printer first, then the caller's. */
|
|
68
|
+
private _printerRows;
|
|
69
|
+
/**
|
|
70
|
+
* `fill_paper_sizes_from_printer` (:470-491): with no printer — which includes the
|
|
71
|
+
* "Any Printer" row, because `printer_changed_callback` clears it before the call
|
|
72
|
+
* (:576-580) — the list is the twelve common sizes. A REAL printer would bring its
|
|
73
|
+
* own `gtk_printer_list_papers`, which needs the backend this port has not.
|
|
74
|
+
*/
|
|
75
|
+
private _fillPaperSizes;
|
|
76
|
+
/** The selected setup, before the radios' orientation is folded in. */
|
|
77
|
+
private _current;
|
|
78
|
+
private _orientation;
|
|
79
|
+
private _setOrientation;
|
|
80
|
+
private _renderSetup;
|
|
81
|
+
/** `printer_changed_callback` (:557-609): the paper list follows the printer. */
|
|
82
|
+
private _printerChanged;
|
|
83
|
+
/** `paper_size_changed` (:635-758). */
|
|
84
|
+
private _paperChanged;
|
|
85
|
+
/** The radios' side of `get_orientation` — the label follows them. */
|
|
86
|
+
private _orientationChanged;
|
|
87
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type BoxOrientation } from '@gjsify/adwaita-core';
|
|
2
|
+
/** The inputs of `gtk_paned_compute_position`, one per field it reads. */
|
|
3
|
+
export interface PanedPositionInput {
|
|
4
|
+
/** The paned's own allocation along the axis, minus the handle — its `allocation`. */
|
|
5
|
+
allocation: number;
|
|
6
|
+
/** The start child's size REQUEST along the axis. */
|
|
7
|
+
startRequest: number;
|
|
8
|
+
/** The end child's size REQUEST along the axis. */
|
|
9
|
+
endRequest: number;
|
|
10
|
+
resizeStart: boolean;
|
|
11
|
+
resizeEnd: boolean;
|
|
12
|
+
shrinkStart: boolean;
|
|
13
|
+
shrinkEnd: boolean;
|
|
14
|
+
/** `position_set` — whether the app or the user has placed the divider. */
|
|
15
|
+
positionSet: boolean;
|
|
16
|
+
/** `start_child_size` — the divider as last allocated or set; `0` when unset. */
|
|
17
|
+
startChildSize: number;
|
|
18
|
+
/** `last_allocation` — what `startChildSize` was measured against. */
|
|
19
|
+
lastAllocation: number;
|
|
20
|
+
}
|
|
21
|
+
/** What `gtk_paned_compute_position` writes back through its three out-parameters. */
|
|
22
|
+
export interface PanedPosition {
|
|
23
|
+
min: number;
|
|
24
|
+
max: number;
|
|
25
|
+
position: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `gtk_paned_compute_position` (gtkpaned.c:1092-1146), statement for statement.
|
|
29
|
+
*
|
|
30
|
+
* Exported so a spec can pin the arithmetic without a layout. The branch keyed on
|
|
31
|
+
* `lastAllocation` is the one a browser cannot reach on its own — there is no "position was
|
|
32
|
+
* set before the first allocation" moment in a flex layout — so it is the piece only a table
|
|
33
|
+
* of inputs can hold.
|
|
34
|
+
*/
|
|
35
|
+
export declare function computePanedPosition(input: PanedPositionInput): PanedPosition;
|
|
36
|
+
export declare class GtkPaned extends HTMLElement {
|
|
37
|
+
private _startEl;
|
|
38
|
+
private _handleEl;
|
|
39
|
+
private _endEl;
|
|
40
|
+
private _initialized;
|
|
41
|
+
/** `start_child_size` — the divider. `-1` is GTK's "unset". */
|
|
42
|
+
private _position;
|
|
43
|
+
/** `position_set` — GTK's read-only flag; see the header. */
|
|
44
|
+
private _positionSet;
|
|
45
|
+
/** What `gtk_paned_compute_position` last produced for `min_position`. */
|
|
46
|
+
private _minPosition;
|
|
47
|
+
/** …and for `max_position`. */
|
|
48
|
+
private _maxPosition;
|
|
49
|
+
/** `last_allocation` — the allocation the current position was computed against. */
|
|
50
|
+
private _lastAllocation;
|
|
51
|
+
/** `drag_pos` — where inside the handle the gesture began (gtkpaned.c:930-940). */
|
|
52
|
+
private _dragPos;
|
|
53
|
+
private _dragging;
|
|
54
|
+
private _resize;
|
|
55
|
+
static get observedAttributes(): string[];
|
|
56
|
+
/** `GtkOrientable:orientation` — which way the divider runs. */
|
|
57
|
+
get orientation(): BoxOrientation;
|
|
58
|
+
set orientation(value: BoxOrientation);
|
|
59
|
+
/** `Gtk.Paned:position` — the divider in pixels; `-1` puts it back to derived. */
|
|
60
|
+
get position(): number;
|
|
61
|
+
set position(value: number);
|
|
62
|
+
/** `Gtk.Paned:position-set` — read-only in GTK; only `position` moves it. */
|
|
63
|
+
get positionSet(): boolean;
|
|
64
|
+
/** `Gtk.AccessibleRange:min-position` as the last computation left it. */
|
|
65
|
+
get minPosition(): number;
|
|
66
|
+
/** `Gtk.AccessibleRange:max-position` as the last computation left it. */
|
|
67
|
+
get maxPosition(): number;
|
|
68
|
+
/** `Gtk.Paned:wide-handle` — the stronger visual separation. */
|
|
69
|
+
get wideHandle(): boolean;
|
|
70
|
+
set wideHandle(value: boolean);
|
|
71
|
+
/** `Gtk.Paned:start-child` — the light-DOM node in the leading pane. */
|
|
72
|
+
get startChild(): Element | null;
|
|
73
|
+
/** `Gtk.Paned:end-child` — the light-DOM node in the trailing pane. */
|
|
74
|
+
get endChild(): Element | null;
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
disconnectedCallback(): void;
|
|
77
|
+
attributeChangedCallback(name: string): void;
|
|
78
|
+
private _property;
|
|
79
|
+
private _observe;
|
|
80
|
+
/** `gtk_paned_set_position` (gtkpaned.c:1874-1910), with its two notifications. */
|
|
81
|
+
private setPosition;
|
|
82
|
+
/** `gtk_paned_calc_position` (gtkpaned.c:1021-1053): compute, place, notify, remember. */
|
|
83
|
+
private _layout;
|
|
84
|
+
/**
|
|
85
|
+
* A child's SIZE REQUEST — what `gtk_widget_measure` answers with.
|
|
86
|
+
*
|
|
87
|
+
* `flex: none` pins the item to its content size, which is exactly a GTK size request,
|
|
88
|
+
* and the read is one forced reflow. It has to be a separate pass: the laid-out size of a
|
|
89
|
+
* pane that is currently `flex-grow: 1` is its ALLOCATION, and feeding that back as a
|
|
90
|
+
* request is how a paned ends up re-deriving its own divisor.
|
|
91
|
+
*/
|
|
92
|
+
private _sizeRequest;
|
|
93
|
+
/**
|
|
94
|
+
* `shrink-*` is "can this child be made smaller than its requisition", which in CSS is
|
|
95
|
+
* whether the AUTOMATIC minimum applies — `min-width: auto` is the flex automatic
|
|
96
|
+
* minimum, so `min-width: 0` is the permission and leaving the longhand alone is the
|
|
97
|
+
* prohibition.
|
|
98
|
+
*/
|
|
99
|
+
private _applyMinimum;
|
|
100
|
+
/**
|
|
101
|
+
* `notify::<property>`, with the DETAIL keyed by the JS property name — the spelling
|
|
102
|
+
* `<adw-expander-row>`, `<adw-entry-row>` and `<gtk-switch>` use, and the one a caller
|
|
103
|
+
* destructures. `notify::position-set` therefore carries `{ positionSet }`.
|
|
104
|
+
*/
|
|
105
|
+
private _notify;
|
|
106
|
+
/** `is_rtl` (gtkpaned.c:1533-1536): only a horizontal paned mirrors. */
|
|
107
|
+
private get _isRtl();
|
|
108
|
+
/** `gesture_drag_begin_cb` (gtkpaned.c:915-955) — the capture and `drag_pos`. */
|
|
109
|
+
private readonly _onPointerDown;
|
|
110
|
+
/** `update_drag` (gtkpaned.c:1538-1573), from the capture phase. */
|
|
111
|
+
private readonly _onPointerMove;
|
|
112
|
+
private readonly _onPointerUp;
|
|
113
|
+
/**
|
|
114
|
+
* `gtk_paned_move_handle` (gtkpaned.c:2286-2353) over `add_move_binding`'s key list
|
|
115
|
+
* (gtkpaned.c:768-785). `Escape` and `Return`/Space are `cancel-position` /
|
|
116
|
+
* `accept-position`, which GTK binds to no handler of its own — they are the signals an
|
|
117
|
+
* embedding application listens for — so they are dispatched as events and left to
|
|
118
|
+
* bubble rather than swallowed here.
|
|
119
|
+
*/
|
|
120
|
+
private readonly _onKeyDown;
|
|
121
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GtkEntry } from './gtk-entry.js';
|
|
2
|
+
export declare class GtkPasswordEntry extends GtkEntry {
|
|
3
|
+
/** The headless peek + caps-lock derivation, composing the entry's own state. */
|
|
4
|
+
private readonly _entry;
|
|
5
|
+
private readonly _password;
|
|
6
|
+
private _toggle;
|
|
7
|
+
private _peekIcon;
|
|
8
|
+
private _capsLock;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
/** Whether the contents are shown in clear text (`GtkText:visibility`). */
|
|
11
|
+
get revealed(): boolean;
|
|
12
|
+
set revealed(value: boolean);
|
|
13
|
+
/** Whether Caps Lock is engaged, as last observed from a keyboard event. */
|
|
14
|
+
get capsLockOn(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Feed the platform's Caps Lock state in — GDK reads it off the keyboard device
|
|
17
|
+
* (`gdk_device_get_caps_lock_state`), which a browser exposes only on keyboard events.
|
|
18
|
+
* Public so a host that knows better (a virtual keyboard, a test) can drive it directly.
|
|
19
|
+
*/
|
|
20
|
+
setCapsLockOn(on: boolean): void;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
attributeChangedCallback(name: string, oldValue: string | null, value: string | null): void;
|
|
23
|
+
/** A focus change re-derives, because the warning's visibility is `editing && …`. */
|
|
24
|
+
private _passwordChanged;
|
|
25
|
+
/** `notify_visibility_cb`, applied to the DOM. */
|
|
26
|
+
private _applyPassword;
|
|
27
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** `GtkContentFit`, in enum order — the four nicks the GIR and CSS share. */
|
|
2
|
+
export declare const PICTURE_CONTENT_FIT_MODES: readonly ["fill", "contain", "cover", "scale-down"];
|
|
3
|
+
export type PictureContentFit = (typeof PICTURE_CONTENT_FIT_MODES)[number];
|
|
4
|
+
/** `GTK_CONTENT_FIT_CONTAIN`, the default the C installs (gtkpicture.c:530, :555). */
|
|
5
|
+
export declare const DEFAULT_PICTURE_CONTENT_FIT: PictureContentFit;
|
|
6
|
+
/**
|
|
7
|
+
* `GtkPicture:content-fit` from its nick, with the C's own guard: an unknown nick is left
|
|
8
|
+
* to the default rather than coerced to `fill`, which is the one value that would silently
|
|
9
|
+
* distort every picture a page writes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizePictureContentFit(value: unknown): PictureContentFit;
|
|
12
|
+
export declare class GtkPicture extends HTMLElement {
|
|
13
|
+
private _initialized;
|
|
14
|
+
static get observedAttributes(): string[];
|
|
15
|
+
/**
|
|
16
|
+
* `GtkPicture:alternative-text` (gtkpicture.c:474-483) — the accessible NAME of the
|
|
17
|
+
* picture. It is NOT `alt`: the GIR property is `alternative-text`, and the element
|
|
18
|
+
* carries that spelling so the attribute and the property are one write.
|
|
19
|
+
*/
|
|
20
|
+
get alternativeText(): string;
|
|
21
|
+
set alternativeText(value: string);
|
|
22
|
+
/** `GtkPicture:can-shrink` (gtkpicture.c:486-497). Defaults to TRUE (gtkpicture.c:554). */
|
|
23
|
+
get canShrink(): boolean;
|
|
24
|
+
set canShrink(value: boolean);
|
|
25
|
+
/** `GtkPicture:content-fit` (gtkpicture.c:520-531). Defaults to CONTAIN. */
|
|
26
|
+
get contentFit(): PictureContentFit;
|
|
27
|
+
set contentFit(value: PictureContentFit);
|
|
28
|
+
/**
|
|
29
|
+
* `GtkPicture:isolate-contents` (gtkpicture.c:538-549). Defaults to TRUE
|
|
30
|
+
* (gtkpicture.c:555) — the same absent-is-true rule {@link canShrink} follows, and for
|
|
31
|
+
* the same reason: the C installs the value in `init`, before any attribute is read.
|
|
32
|
+
*/
|
|
33
|
+
get isolateContents(): boolean;
|
|
34
|
+
set isolateContents(value: boolean);
|
|
35
|
+
/**
|
|
36
|
+
* `GtkPicture:keep-aspect-ratio` — DEPRECATED in 4.8, and implemented rather than
|
|
37
|
+
* dropped, because the C did not drop it (gtkpicture.c:1006-1040).
|
|
38
|
+
*
|
|
39
|
+
* The setter is a MAPPING, not a stored boolean (gtkpicture.c:1017-1021): TRUE sets
|
|
40
|
+
* `content-fit` to CONTAIN, FALSE sets it to FILL. The getter is the INVERSE test over
|
|
41
|
+
* the live `content-fit` (gtkpicture.c:1040), so a picture authored as `cover` or
|
|
42
|
+
* `scale-down` reads `true` back — those two preserve the ratio, exactly as CONTAIN
|
|
43
|
+
* does, and returning `false` for them would contradict the property's own definition.
|
|
44
|
+
*/
|
|
45
|
+
get keepAspectRatio(): boolean;
|
|
46
|
+
set keepAspectRatio(value: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* `setAttribute` runs the custom-element reaction for a write that changes nothing,
|
|
49
|
+
* while every GObject setter here returns early when the value is already right
|
|
50
|
+
* (gtkpicture.c:1111-1112). This is the guard that makes "notify only on a real
|
|
51
|
+
* change" true.
|
|
52
|
+
*/
|
|
53
|
+
private _write;
|
|
54
|
+
/**
|
|
55
|
+
* A boolean whose GIR default is TRUE needs three states, not two: absent means TRUE
|
|
56
|
+
* (the default the C installs in `init`), `=""` means TRUE, and `="false"` means FALSE.
|
|
57
|
+
* `toggleAttribute` alone would make absent and empty the same state, which is right for
|
|
58
|
+
* a FALSE-defaulted property and wrong for every one of these three.
|
|
59
|
+
*/
|
|
60
|
+
private _toggle;
|
|
61
|
+
connectedCallback(): void;
|
|
62
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
63
|
+
/** The `notify::` detail for `name`: the PROPERTY, parsed, not the raw attribute. */
|
|
64
|
+
private _property;
|
|
65
|
+
private _render;
|
|
66
|
+
}
|