@gjsify/adwaita-web 0.54.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.
- package/dist/adwaita-web.css +8066 -3033
- 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-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/breakpoints.d.ts +14 -3
- package/lib/types/construct-vectors.spec.d.ts +1 -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-dialog.d.ts +10 -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-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 +5 -0
- package/lib/types/elements/adw-switch-row.d.ts +3 -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-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 +121 -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 +97 -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/scroll-shading.d.ts +15 -1
- package/lib/types/shared-tree-builder.d.ts +30 -2
- 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/package.json +12 -8
- package/scss/_action_row.scss +2 -2
- 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/_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/_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 +132 -0
- 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 +51 -0
- package/scss/_print_dialogs.scss +328 -0
- package/scss/_reset.scss +21 -19
- package/scss/_revealer.scss +37 -0
- package/scss/_row.scss +20 -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/_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/_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/_window.scss +118 -1
- package/scss/_window_handle.scss +20 -0
- package/scss/adwaita-skin.scss +109 -0
- package/src/adw-action-rows.spec.ts +76 -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-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-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/breakpoints.ts +25 -8
- package/src/capabilities.d.mts +3 -0
- package/src/capabilities.mjs +18 -0
- package/src/connect-lifecycle.spec.ts +12 -0
- package/src/construct-vectors.spec.ts +175 -0
- 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-clamp-scrollable.ts +207 -0
- package/src/elements/adw-dialog.ts +19 -0
- package/src/elements/adw-layout-slot.ts +95 -0
- package/src/elements/adw-multi-layout-view.ts +326 -0
- package/src/elements/adw-preferences-row.ts +150 -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 +42 -3
- package/src/elements/adw-switch-row.ts +28 -1
- 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 +20 -5
- 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 +185 -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 +642 -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 +366 -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 +190 -0
- package/src/index.ts +9 -1
- package/src/keyboard-operable.spec.ts +33 -1
- 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/scroll-shading.ts +18 -1
- package/src/shared-tree-builder.ts +263 -21
- 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 +152 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { type PageSetup } from '../page-setup.js';
|
|
2
|
+
import { AdwDialog } from './adw-dialog.js';
|
|
3
|
+
/** The `GtkPrintCapabilities` nicks, in enum order (the GIR's own spelling). */
|
|
4
|
+
declare const CAPABILITY_NICKS: readonly ["collate", "copies", "generate-pdf", "generate-ps", "number-up", "number-up-layout", "page-set", "preview", "reverse", "scale"];
|
|
5
|
+
/** One `GtkPrintCapabilities` nick. */
|
|
6
|
+
export type PrintCapability = (typeof CAPABILITY_NICKS)[number];
|
|
7
|
+
/** One row of the printer list — what `GtkPrinter` answers name / location / icon for. */
|
|
8
|
+
export interface PrinterInfo {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly location?: string;
|
|
11
|
+
/** The `.ui`'s icon column, from the printer's own `icon-name`. */
|
|
12
|
+
readonly iconName?: string;
|
|
13
|
+
/** `gtk_printer_is_accepting_jobs` — what gates the Print button. */
|
|
14
|
+
readonly acceptsJobs?: boolean;
|
|
15
|
+
/** `gtk_printer_get_capabilities` — the second half of every sensitivity gate. */
|
|
16
|
+
readonly capabilities?: readonly PrintCapability[];
|
|
17
|
+
/** Whether the row passes `is_printer_active` (:1164-1186). */
|
|
18
|
+
readonly active?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The `Gtk.PrintSettings` this dialog carries, in the keys its own UI sets. */
|
|
21
|
+
export interface PrintSettingsData {
|
|
22
|
+
/** `format-for-printer` — the printer the settings belong to. */
|
|
23
|
+
readonly 'format-for-printer'?: string;
|
|
24
|
+
/** `copies` — a string, because `GtkPrintSettings` values are all strings. */
|
|
25
|
+
readonly copies?: string;
|
|
26
|
+
/** `collate` / `reverse` — `"0"` or `"1"`, as CUPS writes them. */
|
|
27
|
+
readonly collate?: string;
|
|
28
|
+
readonly reverse?: string;
|
|
29
|
+
/** `page-set` — `all` / `even` / `odd`, the index into `PAGE_SET_ITEMS`. */
|
|
30
|
+
readonly 'page-set'?: string;
|
|
31
|
+
/** `scale` — a percentage, as a string. */
|
|
32
|
+
readonly scale?: string;
|
|
33
|
+
/** `orientation` — `portrait` … `reverse-landscape`. */
|
|
34
|
+
readonly orientation?: string;
|
|
35
|
+
/** `print-at` — an ISO timestamp for the "At:" branch. */
|
|
36
|
+
readonly 'print-at'?: string;
|
|
37
|
+
/** `printer-setting-…` — the per-printer option groups of the Job tab. */
|
|
38
|
+
readonly [key: string]: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare class GtkPrintUnixDialog extends AdwDialog {
|
|
41
|
+
private _built;
|
|
42
|
+
private _printers;
|
|
43
|
+
private _selected;
|
|
44
|
+
private _settings;
|
|
45
|
+
private _pageSetup;
|
|
46
|
+
private _printerListEl;
|
|
47
|
+
private _switcherEl;
|
|
48
|
+
private _panelEl;
|
|
49
|
+
private _tabPages;
|
|
50
|
+
private _tab;
|
|
51
|
+
private _currentPage;
|
|
52
|
+
private _supportSelection;
|
|
53
|
+
private _hasSelection;
|
|
54
|
+
private _manual;
|
|
55
|
+
private _range;
|
|
56
|
+
private _printAt;
|
|
57
|
+
private _printButton;
|
|
58
|
+
private _previewButton;
|
|
59
|
+
private _conflictsEl;
|
|
60
|
+
private _capabilityControls;
|
|
61
|
+
private _collateCheck;
|
|
62
|
+
private _reverseCheck;
|
|
63
|
+
private _copiesInput;
|
|
64
|
+
private _paperDrop;
|
|
65
|
+
private _orientationDrop;
|
|
66
|
+
private _pageRangeInput;
|
|
67
|
+
private _selectionRadio;
|
|
68
|
+
private _currentPageRadio;
|
|
69
|
+
private _rangeRadios;
|
|
70
|
+
private _atInput;
|
|
71
|
+
static get observedAttributes(): string[];
|
|
72
|
+
/** `current-page`, in 0-based document pages; -1 disables "Current Page". */
|
|
73
|
+
get currentPage(): number;
|
|
74
|
+
set currentPage(value: number);
|
|
75
|
+
/** Whether the page-setup controls are EMBEDDED rather than in their own dialog. */
|
|
76
|
+
get embedPageSetup(): boolean;
|
|
77
|
+
set embedPageSetup(value: boolean);
|
|
78
|
+
/** Whether the application has a selection to print. */
|
|
79
|
+
get hasSelection(): boolean;
|
|
80
|
+
set hasSelection(value: boolean);
|
|
81
|
+
/** Whether the application supports printing a selection. */
|
|
82
|
+
get supportSelection(): boolean;
|
|
83
|
+
set supportSelection(value: boolean);
|
|
84
|
+
/** The capabilities the APPLICATION handles, as `GtkPrintCapabilities` nicks. */
|
|
85
|
+
get manualCapabilities(): PrintCapability[];
|
|
86
|
+
set manualCapabilities(value: readonly PrintCapability[]);
|
|
87
|
+
/** The chosen printer, or `null` — `gtk_print_unix_dialog_get_selected_printer`. */
|
|
88
|
+
get selectedPrinter(): PrinterInfo | null;
|
|
89
|
+
/** The page setup, as the plain `PageSetup` the value model defines. */
|
|
90
|
+
get pageSetup(): PageSetup;
|
|
91
|
+
set pageSetup(value: PageSetup);
|
|
92
|
+
/** The print settings, in the keys the dialog's own controls write. */
|
|
93
|
+
get printSettings(): PrintSettingsData;
|
|
94
|
+
set printSettings(value: PrintSettingsData);
|
|
95
|
+
/**
|
|
96
|
+
* Which of the four range buttons is active — the radio group the `.ui` calls the
|
|
97
|
+
* Range frame. GTK has no property for it either: the dialog READS whichever of the four
|
|
98
|
+
* `GtkCheckButton`s is active (`dialog_get_page_range`), and that is what this holds.
|
|
99
|
+
*/
|
|
100
|
+
get range(): 'all' | 'current' | 'selection' | 'pages';
|
|
101
|
+
set range(value: 'all' | 'current' | 'selection' | 'pages');
|
|
102
|
+
/** The printers a print backend would have discovered. An INPUT here — see the header. */
|
|
103
|
+
get printers(): PrinterInfo[];
|
|
104
|
+
set printers(value: readonly PrinterInfo[]);
|
|
105
|
+
connectedCallback(): void;
|
|
106
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
107
|
+
/**
|
|
108
|
+
* `manual-capabilities` takes the nick SET the GIR generates, `|`-separated —
|
|
109
|
+
* `manual-capabilities="page-set|copies|collate|reverse|scale|preview"`. Unknown
|
|
110
|
+
* nicks are dropped, which is what the GIR-validated setter does with them.
|
|
111
|
+
*/
|
|
112
|
+
private _readManual;
|
|
113
|
+
protected decorateHeader(header: HTMLElement): void;
|
|
114
|
+
private _build;
|
|
115
|
+
/**
|
|
116
|
+
* Every page of the notebook, built once and hidden but for the visible one —
|
|
117
|
+
* which is what `GtkNotebook` holds: all seven pages exist whether shown or not,
|
|
118
|
+
* so the capability pass can reach every control from the first render.
|
|
119
|
+
*/
|
|
120
|
+
private _renderPanel;
|
|
121
|
+
private _buildTab;
|
|
122
|
+
/** General: the printer list, then Range and Copies. */
|
|
123
|
+
private _buildGeneral;
|
|
124
|
+
/** `page_collate_preview`: four thumbnails whose NUMBERS show the ordering. */
|
|
125
|
+
private _buildCollatePreview;
|
|
126
|
+
/** Page Setup: Layout and Paper beside the sheet preview. */
|
|
127
|
+
private _buildPageSetup;
|
|
128
|
+
/**
|
|
129
|
+
* `page_layout_preview` (:2683) + `draw_page` (:2283): the sheet at 110px on its long
|
|
130
|
+
* edge, divided by the number-up grid with each cell numbered in the number-up order.
|
|
131
|
+
* The ruler the C draws around it is decoration outside the sheet and is not painted.
|
|
132
|
+
*/
|
|
133
|
+
private _buildSheetPreview;
|
|
134
|
+
/** Job: Job Details, Print Document, Add Cover Page. */
|
|
135
|
+
private _buildJob;
|
|
136
|
+
/**
|
|
137
|
+
* One of the four option pages: the scrolled viewport + grid the C's
|
|
138
|
+
* `GtkPrinterOptionWidget`s are added to. There are none without a backend, so the grid
|
|
139
|
+
* is empty and says so rather than inventing options.
|
|
140
|
+
*/
|
|
141
|
+
private _buildOptionsPage;
|
|
142
|
+
/** The option grid, one row per option group the backend would offer. */
|
|
143
|
+
private _optionsGrid;
|
|
144
|
+
/** The conflicts action bar — hidden until `mark_conflicts` finds one (:3050-3060). */
|
|
145
|
+
private _buildConflicts;
|
|
146
|
+
/** Preview / Cancel / Print, in the `.ui`'s order and with its own response ids. */
|
|
147
|
+
private _buildActions;
|
|
148
|
+
private _respond;
|
|
149
|
+
/**
|
|
150
|
+
* One `frame_templateN`: a BOLD heading over a grid, which is the shape every group in
|
|
151
|
+
* the `.ui` has — `box > box > grid` with the heading's `weight=bold`.
|
|
152
|
+
*/
|
|
153
|
+
private _group;
|
|
154
|
+
private _labelledRow;
|
|
155
|
+
private _dropDown;
|
|
156
|
+
private _radio;
|
|
157
|
+
private _check;
|
|
158
|
+
private _frame;
|
|
159
|
+
/** `selected_printer_changed` (:1821-1915) — the list and what selecting does. */
|
|
160
|
+
private _printerChanged;
|
|
161
|
+
private _paperChanged;
|
|
162
|
+
/** Every capability the dialog currently has: the manual half OR the printer's. */
|
|
163
|
+
private _capabilities;
|
|
164
|
+
/** `update_dialog_from_capabilities` (:1563-1592), every line of it. */
|
|
165
|
+
private _renderPrint;
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Every `GtkRevealerTransitionType` nick, in GIR order. */
|
|
2
|
+
declare const TRANSITION_TYPES: readonly ["none", "crossfade", "slide-right", "slide-left", "slide-up", "slide-down", "swing-right", "swing-left", "swing-up", "swing-down", "fade-slide-right", "fade-slide-left", "fade-slide-up", "fade-slide-down"];
|
|
3
|
+
export type RevealerTransitionType = (typeof TRANSITION_TYPES)[number];
|
|
4
|
+
export declare class GtkRevealer extends HTMLElement {
|
|
5
|
+
private _clipEl;
|
|
6
|
+
private _initialized;
|
|
7
|
+
/** `current_pos` — 0 hidden, 1 shown. */
|
|
8
|
+
private _position;
|
|
9
|
+
/** `target_pos` — where the running animation is headed. */
|
|
10
|
+
private _target;
|
|
11
|
+
private _frame;
|
|
12
|
+
private _startedAt;
|
|
13
|
+
/** The child's own size — `child_width` / `child_height` in the C. */
|
|
14
|
+
private _naturalWidth;
|
|
15
|
+
private _naturalHeight;
|
|
16
|
+
private _resize;
|
|
17
|
+
static get observedAttributes(): string[];
|
|
18
|
+
/** `Gtk.Revealer:reveal-child` — whether the child should be revealed. */
|
|
19
|
+
get revealChild(): boolean;
|
|
20
|
+
set revealChild(value: boolean);
|
|
21
|
+
/** `Gtk.Revealer:child-revealed` — read-only; the header says why it inverts. */
|
|
22
|
+
get childRevealed(): boolean;
|
|
23
|
+
/** `Gtk.Revealer:transition-type`. An unknown nick leaves `slide-down` in place. */
|
|
24
|
+
get transitionType(): RevealerTransitionType;
|
|
25
|
+
set transitionType(value: RevealerTransitionType);
|
|
26
|
+
/** `Gtk.Revealer:transition-duration`, in ms. An unparseable one is the default. */
|
|
27
|
+
get transitionDuration(): number;
|
|
28
|
+
set transitionDuration(value: number);
|
|
29
|
+
/** `Gtk.Revealer:child` — the light-DOM node the clip box adopted. */
|
|
30
|
+
get child(): Element | null;
|
|
31
|
+
connectedCallback(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
34
|
+
/**
|
|
35
|
+
* Point the measurement at the CHILD, not at the clip box.
|
|
36
|
+
*
|
|
37
|
+
* The C asks the child for its requisition (gtkrevealer.c:140) and scales the result,
|
|
38
|
+
* so the child is the subject; observing the clip box instead would report the ALREADY
|
|
39
|
+
* SCALED box, and the scale would then be applied twice.
|
|
40
|
+
*/
|
|
41
|
+
private _observeChild;
|
|
42
|
+
/** `gtk_revealer_start_animation` (gtkrevealer.c:275-322). `@returns` whether it moved. */
|
|
43
|
+
private _animate;
|
|
44
|
+
/** `gtk_revealer_animate_cb` (gtkrevealer.c:255-272). */
|
|
45
|
+
private _tick;
|
|
46
|
+
private _finish;
|
|
47
|
+
/** `effective_transition` (gtkrevealer.c:121-141). */
|
|
48
|
+
private get effectiveTransition();
|
|
49
|
+
/** `get_child_size_scale` (gtkrevealer.c:144-186) for one axis. */
|
|
50
|
+
private _scale;
|
|
51
|
+
/** `gtk_revealer_set_position` (gtkrevealer.c:212-251). */
|
|
52
|
+
private _setPosition;
|
|
53
|
+
private _render;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import './gtk-popover.js';
|
|
2
|
+
export declare class GtkScaleButton extends HTMLElement {
|
|
3
|
+
private readonly _state;
|
|
4
|
+
private _buttonEl;
|
|
5
|
+
private _glyph;
|
|
6
|
+
private _dockEl;
|
|
7
|
+
private _rangeEl;
|
|
8
|
+
private _minusEl;
|
|
9
|
+
private _plusEl;
|
|
10
|
+
private _icons;
|
|
11
|
+
private _initialized;
|
|
12
|
+
/** Set while a render writes the range, so its `input` echo is not fed back. */
|
|
13
|
+
private _syncing;
|
|
14
|
+
static get observedAttributes(): string[];
|
|
15
|
+
/** `Gtk.ScaleButton:value` — always inside the adjustment's range. */
|
|
16
|
+
get value(): number;
|
|
17
|
+
set value(value: number);
|
|
18
|
+
/** `Gtk.ScaleButton:active` — read-only upstream, so read-only here. */
|
|
19
|
+
get active(): boolean;
|
|
20
|
+
/** `Gtk.ScaleButton:icons` — the icon names the value picks from. */
|
|
21
|
+
get icons(): string[];
|
|
22
|
+
set icons(value: string[]);
|
|
23
|
+
/** `Gtk.ScaleButton:has-frame` — false by default, which is a flat button here. */
|
|
24
|
+
get hasFrame(): boolean;
|
|
25
|
+
set hasFrame(value: boolean);
|
|
26
|
+
/** `GtkOrientable:orientation` — vertical by default, the GTK shape of the button. */
|
|
27
|
+
get orientation(): 'horizontal' | 'vertical';
|
|
28
|
+
set orientation(value: 'horizontal' | 'vertical');
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
attributeChangedCallback(name?: string): void;
|
|
31
|
+
/** `cb_scale_value_changed` (:1092-1114) — the icon, the steppers, then the signals. */
|
|
32
|
+
private _applyValue;
|
|
33
|
+
/** The range, from GTK's default with whatever `adjustment` authored over it. */
|
|
34
|
+
private _syncAdjustment;
|
|
35
|
+
private _render;
|
|
36
|
+
private _stepButton;
|
|
37
|
+
private _toggleDock;
|
|
38
|
+
/** `gtk_scale_popup` (:940-948) — press the button in, which pops the dock up. */
|
|
39
|
+
private _dock;
|
|
40
|
+
/** The dock closing on its own — an outside click or Escape. */
|
|
41
|
+
private _renderDock;
|
|
42
|
+
/** `button_click` (:1000-1013): one PAGE increment, and the end of the range stops it. */
|
|
43
|
+
private _step;
|
|
44
|
+
/** Space / Return / Enter pop up, Escape pops down — the bindings `class_init` adds. */
|
|
45
|
+
private _onKeyDown;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* `gtk_scale_button_update_icon` (:1040-1098) — which of the icon names the value picks.
|
|
49
|
+
* Transcribed including the arithmetic, because "spread evenly" is only true of the
|
|
50
|
+
* interior: `lower` and `upper` always take the first two names.
|
|
51
|
+
*/
|
|
52
|
+
export declare function selectIcon(icons: string[], value: number, lower: number, upper: number): string;
|
|
53
|
+
/**
|
|
54
|
+
* The `icons` attribute, as the portable array a list-model property takes elsewhere
|
|
55
|
+
* (ADR 0046). Total in every failure mode, because malformed JSON is an author slip that
|
|
56
|
+
* must not stop the element upgrading — and an empty list has an answer of its own,
|
|
57
|
+
* `image-missing` (:1046-1050).
|
|
58
|
+
*/
|
|
59
|
+
export declare function parseIcons(raw: string | null | undefined): string[];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { AdwAdjustment, AdwAdjustmentInput, BoxOrientation } from '@gjsify/adwaita-core';
|
|
2
|
+
/** `Gtk.PositionType` nicks, as `GtkScale:value-pos` spells them. */
|
|
3
|
+
declare const VALUE_POSITIONS: readonly ["left", "right", "top", "bottom"];
|
|
4
|
+
/** `GtkScale:value-pos` in the order libadwaita lays the value out: default `top`. */
|
|
5
|
+
type ValuePosition = (typeof VALUE_POSITIONS)[number];
|
|
6
|
+
/**
|
|
7
|
+
* `gtk_scale_format_value`'s default arm plus `weed_out_neg_zero` (gtkscale.c:1230-1245).
|
|
8
|
+
*
|
|
9
|
+
* Exported for the widget's own spec; `<gtk-spin-button>` carries the SAME `g_strdup_printf
|
|
10
|
+
* ("%0.*f")` in its own C (`gtk_spin_button_format_for_value`, gtkspinbutton.c:1319-1326) with
|
|
11
|
+
* a different `digits` default, and reuses this rather than growing a second copy of it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatScaleValue(value: number, digits: number): string;
|
|
14
|
+
export declare class GtkScale extends HTMLElement {
|
|
15
|
+
/** The headless `Gtk.Adjustment`: the range, the clamp and the two signals (ADR 0004, ADR 0047). */
|
|
16
|
+
private readonly _range;
|
|
17
|
+
private _trough;
|
|
18
|
+
private _highlight;
|
|
19
|
+
private _fill;
|
|
20
|
+
private _slider;
|
|
21
|
+
private _value;
|
|
22
|
+
private _initialized;
|
|
23
|
+
private _pointerId;
|
|
24
|
+
static get observedAttributes(): string[];
|
|
25
|
+
/** `GtkOrientable:orientation` — `horizontal` (the default) or `vertical`. */
|
|
26
|
+
get orientation(): BoxOrientation;
|
|
27
|
+
set orientation(value: BoxOrientation);
|
|
28
|
+
/** The numeric range — `Gtk.Range:adjustment`, as the portable value. Writes MERGE. */
|
|
29
|
+
get adjustment(): AdwAdjustment;
|
|
30
|
+
set adjustment(value: AdwAdjustmentInput | string);
|
|
31
|
+
/** `Gtk.Range:value` — always inside `adjustmentRange`. */
|
|
32
|
+
get value(): number;
|
|
33
|
+
set value(v: number);
|
|
34
|
+
/** `Gtk.Range:inverted`. */
|
|
35
|
+
get inverted(): boolean;
|
|
36
|
+
set inverted(value: boolean);
|
|
37
|
+
/** `GtkScale:draw-value` — whether the value is shown beside the slider. */
|
|
38
|
+
get drawValue(): boolean;
|
|
39
|
+
set drawValue(value: boolean);
|
|
40
|
+
/** `GtkScale:value-pos` — `left`, `right`, `top` (the default) or `bottom`. */
|
|
41
|
+
get valuePos(): ValuePosition;
|
|
42
|
+
set valuePos(value: ValuePosition);
|
|
43
|
+
/** `GtkScale:has-origin` — the default, so the highlight exists unless it is cleared. */
|
|
44
|
+
get hasOrigin(): boolean;
|
|
45
|
+
set hasOrigin(value: boolean);
|
|
46
|
+
/** `GtkScale:digits` — decimal places in the value text. */
|
|
47
|
+
get digits(): number;
|
|
48
|
+
set digits(value: number);
|
|
49
|
+
/** `Gtk.Range:fill-level` — the buffer level a media player would draw. */
|
|
50
|
+
get fillLevel(): number;
|
|
51
|
+
set fillLevel(value: number);
|
|
52
|
+
/** `Gtk.Range:show-fill-level` — no property by default, as `gtk_range_init` leaves it. */
|
|
53
|
+
get showFillLevel(): boolean;
|
|
54
|
+
set showFillLevel(value: boolean);
|
|
55
|
+
/** `Gtk.Range:restrict-to-fill-level`. */
|
|
56
|
+
get restrictToFillLevel(): boolean;
|
|
57
|
+
set restrictToFillLevel(value: boolean);
|
|
58
|
+
/** The knob, for a consumer that needs to measure it (`coord_to_value` needs its length). */
|
|
59
|
+
get slider(): HTMLElement;
|
|
60
|
+
connectedCallback(): void;
|
|
61
|
+
attributeChangedCallback(name: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* `gtk_range_real_change_value`'s write, with the range's own clamp inside `SpinState`.
|
|
64
|
+
*
|
|
65
|
+
* `restrict-to-fill-level` and `round-digits` are `GtkRange`'s own two lines before the
|
|
66
|
+
* CLAMP (gtkrange.c:2873-2891), so they belong here rather than in the element's setter.
|
|
67
|
+
* `interactive` is what separates a drag from a programmatic write in `SpinState`.
|
|
68
|
+
*/
|
|
69
|
+
private _setValue;
|
|
70
|
+
/**
|
|
71
|
+
* `coord_to_value` (gtkrange.c:1838-1878), which is `GtkScale`'s whole pointer mapping.
|
|
72
|
+
*
|
|
73
|
+
* A SCALE sets `slider_size_fixed`, so the fraction is `coord / trough_length` and the
|
|
74
|
+
* slider's own length does not shorten the track — the knob's CENTRE is the value. An
|
|
75
|
+
* equal-length degenerate trough answers 1.0, as C does.
|
|
76
|
+
*/
|
|
77
|
+
private _valueAtCoord;
|
|
78
|
+
/**
|
|
79
|
+
* `should_invert` (gtkrange.c:1806-1818) for a scale, which is always `flippable`
|
|
80
|
+
* (`gtk_scale_init`, gtkscale.c:838).
|
|
81
|
+
*
|
|
82
|
+
* A horizontal scale in a RIGHT-TO-LEFT document is the case the `flippable` flag
|
|
83
|
+
* exists for: `inverted` false already reads backwards there, so the two cancel and
|
|
84
|
+
* the fraction is used as it comes.
|
|
85
|
+
*/
|
|
86
|
+
private _shouldInvert;
|
|
87
|
+
private _onPointerDown;
|
|
88
|
+
private _onPointerMove;
|
|
89
|
+
private _onPointerUp;
|
|
90
|
+
/**
|
|
91
|
+
* The keys `GtkScale` binds (gtkscale.c:745-800), and none of them is orientation-bound:
|
|
92
|
+
* the C says so in its own comment, because a blind user should not have to know which
|
|
93
|
+
* way the slider runs.
|
|
94
|
+
*/
|
|
95
|
+
private _onKeyDown;
|
|
96
|
+
private _render;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { type AdwAdjustment, type AdwAdjustmentInput, type BoxOrientation } from '@gjsify/adwaita-core';
|
|
2
|
+
/** `GtkScrollType`'s six kinds, which is what a `scroll-child` names. */
|
|
3
|
+
export type GtkScrollType = 'step-backward' | 'step-forward' | 'page-backward' | 'page-forward' | 'start' | 'end';
|
|
4
|
+
export declare class GtkScrollbar extends HTMLElement {
|
|
5
|
+
private _trough;
|
|
6
|
+
private _slider;
|
|
7
|
+
private _observer;
|
|
8
|
+
private _built;
|
|
9
|
+
private _adjustment;
|
|
10
|
+
/** `priv->slide_initial_slider_position` — the slider's position when the drag began. */
|
|
11
|
+
private _grabPosition;
|
|
12
|
+
/** `priv->slide_initial_coordinate_delta` — how far into the slider the pointer was. */
|
|
13
|
+
private _grabDelta;
|
|
14
|
+
/** `priv->zoom` — the fine adjustment, `.fine-tune` and all. */
|
|
15
|
+
private _zoom;
|
|
16
|
+
private _dragging;
|
|
17
|
+
static get observedAttributes(): string[];
|
|
18
|
+
/** `GtkOrientable:orientation` — HORIZONTAL in `gtk_scrollbar_init`; unknown is that. */
|
|
19
|
+
get orientation(): BoxOrientation;
|
|
20
|
+
set orientation(value: BoxOrientation);
|
|
21
|
+
/**
|
|
22
|
+
* `GtkScrollbar:adjustment` — the range this bar moves, as the portable value.
|
|
23
|
+
*
|
|
24
|
+
* NEVER `null`, which is the half of this property that is easy to get wrong: GTK's
|
|
25
|
+
* pspec default is NULL, but `gtk_range_set_adjustment` answers a NULL with the ZERO
|
|
26
|
+
* adjustment (gtkrange.c:687-688) and `gtk_range_get_adjustment` creates it on demand
|
|
27
|
+
* (gtkrange.c:658-659), so a bare `GtkScrollbar` reads back a real adjustment whose
|
|
28
|
+
* `upper` is 0. A read that could return null would be a property GTK's own does not
|
|
29
|
+
* have, and the slider geometry would have to carry a second "nothing here" case.
|
|
30
|
+
*
|
|
31
|
+
* A string is read as the JSON the attribute carries, so the property and the
|
|
32
|
+
* attribute are one write; a partial object MERGES, which is
|
|
33
|
+
* `gtk_adjustment_configure`'s own contract (gtkadjustment.c). Assigning `null` is
|
|
34
|
+
* `gtk_scrollbar_set_adjustment (self, NULL)`: the zero adjustment again, and the
|
|
35
|
+
* property is assigned rather than merged.
|
|
36
|
+
*/
|
|
37
|
+
get adjustment(): AdwAdjustment;
|
|
38
|
+
set adjustment(value: AdwAdjustmentInput | string | null);
|
|
39
|
+
/** The position, which is the adjustment's own value (gtkrange.c:1168-1176). */
|
|
40
|
+
get value(): number;
|
|
41
|
+
/**
|
|
42
|
+
* `gtk_adjustment_set_value`: move the range, clamped, and announce it.
|
|
43
|
+
*
|
|
44
|
+
* A scrollbar is a VIEW of an adjustment it does not own, so the `value-changed`
|
|
45
|
+
* CustomEvent (bubbles, detail `{ adjustment }`) stands for `GtkAdjustment`'s signal —
|
|
46
|
+
* and `<gtk-scrolled-window>` is what listens, exactly as GTK reads the adjustment off
|
|
47
|
+
* the scrollbar it owns (`gtk_scrolled_window_scroll_child`, gtkscrolledwindow.c:3007).
|
|
48
|
+
*
|
|
49
|
+
* Over the zero adjustment `set_value` CLAMPS to 0 and reports no change, so a bar with
|
|
50
|
+
* no adjustment of its own is inert without being a special case anywhere.
|
|
51
|
+
*/
|
|
52
|
+
set value(value: number);
|
|
53
|
+
/**
|
|
54
|
+
* The value one `GtkScrollType` moves by, which is `gtk_scrolled_window_scroll_child`'s
|
|
55
|
+
* switch.
|
|
56
|
+
*
|
|
57
|
+
* `scrollBy` is a platform method with a delta form, so both are here and the KIND of the
|
|
58
|
+
* argument decides — a `GtkScrollType` nick moves the adjustment, a number or a
|
|
59
|
+
* `ScrollToOptions` is the scrollport's own call, which a bar has none of (it is not a
|
|
60
|
+
* scrollport) and which therefore lands on no adjustment and does nothing.
|
|
61
|
+
*/
|
|
62
|
+
scrollBy(kind: GtkScrollType): void;
|
|
63
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
64
|
+
scrollBy(x: number, y: number): void;
|
|
65
|
+
/** How far a wheel detent moves the value: `scroll_delta_to_value` on a WHEEL unit. */
|
|
66
|
+
scrollByWheel(deltaY: number, deltaMode: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* `gtk_range_get_range_area`-ish: the length of the trough, which is what the slider
|
|
69
|
+
* is a fraction of. Read on demand so a caller can scale with the same numbers.
|
|
70
|
+
*/
|
|
71
|
+
private get _troughLength();
|
|
72
|
+
connectedCallback(): void;
|
|
73
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
74
|
+
private _notify;
|
|
75
|
+
/**
|
|
76
|
+
* The trough's three rules and the slider's drag, at the settings default
|
|
77
|
+
* (`gtk_range_click_gesture_pressed`, gtkrange.c:2018-2138).
|
|
78
|
+
*/
|
|
79
|
+
private _onPointerDown;
|
|
80
|
+
/**
|
|
81
|
+
* `update_slider_position`: the pointer's travel since the grab, scaled by the zoom,
|
|
82
|
+
* added to where the slider WAS — so the slider keeps the offset it was grabbed at.
|
|
83
|
+
*/
|
|
84
|
+
private _onPointerMove;
|
|
85
|
+
private _onPointerEnd;
|
|
86
|
+
private _endDrag;
|
|
87
|
+
/**
|
|
88
|
+
* Keep the gesture alive past the bar's own edges, which is what `GtkGestureDrag` does
|
|
89
|
+
* upstream for as long as the button is held.
|
|
90
|
+
*
|
|
91
|
+
* `setPointerCapture` THROWS for a pointer id the platform is no longer tracking, and an
|
|
92
|
+
* exception here would abort the gesture before the warp or the page that follows it —
|
|
93
|
+
* which is not a state a scrollbar can be in. So a refused capture is a drag that ends at
|
|
94
|
+
* the bar's edge, and the synchronous move still happens.
|
|
95
|
+
*/
|
|
96
|
+
private _capture;
|
|
97
|
+
/** The keys `GtkScrollbar`'s own doc names: the arrow keys step, Page Up/Down page. */
|
|
98
|
+
private _onKeyDown;
|
|
99
|
+
private _onWheel;
|
|
100
|
+
private _setZoom;
|
|
101
|
+
/** `update_slider_position`'s zoom: the trough per unit of range, or the fallback. */
|
|
102
|
+
private _zoomFactor;
|
|
103
|
+
/**
|
|
104
|
+
* `gtk_range_compute_slider_position`, in CSS pixels.
|
|
105
|
+
*
|
|
106
|
+
* The slider's length is a fraction of the WHOLE adjustment range and its position a
|
|
107
|
+
* fraction of the SCROLLABLE one, which is why the two denominators differ and why
|
|
108
|
+
* neither is a plain percentage of the trough. A range with nothing to scroll is the
|
|
109
|
+
* `trough_length == slider_length` case upstream and answers 1.0.
|
|
110
|
+
*/
|
|
111
|
+
private _render;
|
|
112
|
+
/** Where the slider's START is along the trough, in pixels. */
|
|
113
|
+
private _sliderPosition;
|
|
114
|
+
/** The slider's own length, in pixels, from the last layout. */
|
|
115
|
+
private _sliderSize;
|
|
116
|
+
/**
|
|
117
|
+
* `coord_to_value` (gtkrange.c:1842-1886): a coordinate along the trough scaled by the
|
|
118
|
+
* FREE space — the trough less the slider — because the slider's centre has to reach
|
|
119
|
+
* both ends and not one of them twice over.
|
|
120
|
+
*/
|
|
121
|
+
private _coordinateValue;
|
|
122
|
+
/** The pointer's coordinate along the trough, from the trough's own box. */
|
|
123
|
+
private _coordinate;
|
|
124
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { GtkViewport } from './gtk-viewport.js';
|
|
2
|
+
/** `GtkPolicyType`'s four nicks; `automatic` is the pspec's default for both bars. */
|
|
3
|
+
export type GtkPolicyType = 'always' | 'never' | 'automatic' | 'external';
|
|
4
|
+
/** `GtkCornerType`'s four corners, `top-left` being the pspec's default. */
|
|
5
|
+
export type GtkCornerType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
6
|
+
/** `Gtk.PositionType`'s four edges, as `edge-reached` and `edge-overshot` name them. */
|
|
7
|
+
export type GtkPositionType = 'left' | 'right' | 'top' | 'bottom';
|
|
8
|
+
/** `Gtk.DirectionType`'s two, as `move-focus-out` names them. */
|
|
9
|
+
export type GtkDirectionType = 'forward' | 'backward';
|
|
10
|
+
export declare class GtkScrolledWindow extends HTMLElement {
|
|
11
|
+
private _viewport;
|
|
12
|
+
private _bars;
|
|
13
|
+
private _shading;
|
|
14
|
+
private _observer;
|
|
15
|
+
private _hoverable;
|
|
16
|
+
private _fadeTimer;
|
|
17
|
+
private _built;
|
|
18
|
+
static get observedAttributes(): string[];
|
|
19
|
+
/** `GtkScrolledWindow:hscrollbar-policy` — `automatic` in the pspec. */
|
|
20
|
+
get hscrollbarPolicy(): GtkPolicyType;
|
|
21
|
+
set hscrollbarPolicy(value: GtkPolicyType);
|
|
22
|
+
/** `GtkScrolledWindow:vscrollbar-policy` — `automatic` in the pspec. */
|
|
23
|
+
get vscrollbarPolicy(): GtkPolicyType;
|
|
24
|
+
set vscrollbarPolicy(value: GtkPolicyType);
|
|
25
|
+
/** `GtkScrolledWindow:window-placement` — where the contents sit against the bars. */
|
|
26
|
+
get windowPlacement(): GtkCornerType;
|
|
27
|
+
set windowPlacement(value: GtkCornerType);
|
|
28
|
+
/** `GtkScrolledWindow:has-frame` — the `.frame` style class on the node, and nothing more. */
|
|
29
|
+
get hasFrame(): boolean;
|
|
30
|
+
set hasFrame(value: boolean);
|
|
31
|
+
/** `GtkScrolledWindow:overlay-scrolling` — TRUE in the pspec, and unknown is that. */
|
|
32
|
+
get overlayScrolling(): boolean;
|
|
33
|
+
set overlayScrolling(value: boolean);
|
|
34
|
+
/** `GtkScrolledWindow:min-content-width`, in px, or `null` for the pspec's -1. */
|
|
35
|
+
get minContentWidth(): number | null;
|
|
36
|
+
set minContentWidth(value: number | null);
|
|
37
|
+
/** `GtkScrolledWindow:min-content-height`, in px, or `null` for the pspec's -1. */
|
|
38
|
+
get minContentHeight(): number | null;
|
|
39
|
+
set minContentHeight(value: number | null);
|
|
40
|
+
/** `GtkScrolledWindow:max-content-width`, in px, or `null` for the pspec's -1. */
|
|
41
|
+
get maxContentWidth(): number | null;
|
|
42
|
+
set maxContentWidth(value: number | null);
|
|
43
|
+
/** `GtkScrolledWindow:max-content-height`, in px, or `null` for the pspec's -1. */
|
|
44
|
+
get maxContentHeight(): number | null;
|
|
45
|
+
set maxContentHeight(value: number | null);
|
|
46
|
+
/** `GtkScrolledWindow:propagate-natural-width` — FALSE in the pspec, so absent is that. */
|
|
47
|
+
get propagateNaturalWidth(): boolean;
|
|
48
|
+
set propagateNaturalWidth(value: boolean);
|
|
49
|
+
/** `GtkScrolledWindow:propagate-natural-height` — FALSE in the pspec, so absent is that. */
|
|
50
|
+
get propagateNaturalHeight(): boolean;
|
|
51
|
+
set propagateNaturalHeight(value: boolean);
|
|
52
|
+
/**
|
|
53
|
+
* `gtk_scrolled_window_get_hscrollbar` / `get_vscrollbar`, as METHODS and not getters.
|
|
54
|
+
*
|
|
55
|
+
* `connect-lifecycle.spec.ts` reads a get-only accessor returning an element as an
|
|
56
|
+
* invitation to append into it, and a scrollbar that is not visible is not an append
|
|
57
|
+
* point — which is the whole of what a getter here would be asking for.
|
|
58
|
+
*/
|
|
59
|
+
hscrollbar(): HTMLElement | null;
|
|
60
|
+
vscrollbar(): HTMLElement | null;
|
|
61
|
+
/** The `<gtk-viewport>` the child sits in — the one GTK's `set_child` builds for itself. */
|
|
62
|
+
get viewport(): GtkViewport;
|
|
63
|
+
connectedCallback(): void;
|
|
64
|
+
disconnectedCallback(): void;
|
|
65
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
66
|
+
/** The NORMALISED value a notify carries, which is the property and not the raw attribute. */
|
|
67
|
+
private _normalized;
|
|
68
|
+
private _writeSizeRequest;
|
|
69
|
+
/**
|
|
70
|
+
* `priv->use_indicators` — the AND of the property with the `gtk-overlay-scrolling`
|
|
71
|
+
* setting, whose browser spelling is whether a pointer that can hover exists at all.
|
|
72
|
+
*/
|
|
73
|
+
private get _useIndicators();
|
|
74
|
+
/** Everything the pspec's own state decides: the classes, the bars, the sizes. */
|
|
75
|
+
private _sync;
|
|
76
|
+
private _size;
|
|
77
|
+
/** The viewport's adjustment for one axis, which is where GTK reads the scrollbar's. */
|
|
78
|
+
private _adjustment;
|
|
79
|
+
/**
|
|
80
|
+
* `may_hscroll` / `may_vscroll`: a bar that is DRAWN, or an EXTERNAL policy, which is a
|
|
81
|
+
* scrollbar this window does not show but can still be driven with.
|
|
82
|
+
*/
|
|
83
|
+
private _mayScroll;
|
|
84
|
+
/**
|
|
85
|
+
* The viewport moved: hand the position to the bars, ask whether an edge was REACHED
|
|
86
|
+
* (`maybe_emit_edge_reached` fires whenever the adjustment lands exactly on `lower` or
|
|
87
|
+
* `upper - page_size`, gtkscrolledwindow.c:3629-3661) and fade the indicators in.
|
|
88
|
+
*/
|
|
89
|
+
private _onViewportValue;
|
|
90
|
+
/**
|
|
91
|
+
* A bar moved: move the scrollport. GTK's direction is the other way round — the
|
|
92
|
+
* adjustment belongs to the scrollbar and the scrolled window reads it — which is why
|
|
93
|
+
* the bar is given the adjustment here instead of owning it: the numbers are the same
|
|
94
|
+
* either way, and one writer per side is what keeps them from fighting.
|
|
95
|
+
*/
|
|
96
|
+
private _onBarValue;
|
|
97
|
+
private _edgeReached;
|
|
98
|
+
/**
|
|
99
|
+
* `_gtk_scrolled_window_set_adjustment_value`'s `EDGE_OVERSHOT`, from the shading
|
|
100
|
+
* controller's unclamped position: negative is the near edge, positive the far one,
|
|
101
|
+
* and `0` is the settled case the C returns without emitting — it is the value CLAMPED
|
|
102
|
+
* to `lower - MAX_OVERSHOOT_DISTANCE` and `upper - page_size + MAX_OVERSHOOT_DISTANCE`
|
|
103
|
+
* that the signal compares (gtkscrolledwindow.c:3306-3352).
|
|
104
|
+
*/
|
|
105
|
+
private _edgeOvershot;
|
|
106
|
+
/** The keys of `gtk_scrolled_window_class_init`, and the two signals they emit. */
|
|
107
|
+
private _onKeyDown;
|
|
108
|
+
/**
|
|
109
|
+
* `indicator_start_fade(indicator, 1.0)` on every value change, and
|
|
110
|
+
* `maybe_hide_indicator`'s check `INDICATOR_FADE_OUT_DELAY` after the last one — a poll
|
|
111
|
+
* upstream, one timer here, and `!indicator->over` is the `.hovering` class (a pointer
|
|
112
|
+
* over the indicator holds it open).
|
|
113
|
+
*/
|
|
114
|
+
private _fadeIn;
|
|
115
|
+
private _fadeOut;
|
|
116
|
+
private _clearFade;
|
|
117
|
+
private _onIndicatorOver;
|
|
118
|
+
private _onIndicatorOut;
|
|
119
|
+
private _onHoverableChange;
|
|
120
|
+
private _releaseHoverable;
|
|
121
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare class GtkSearchBar extends HTMLElement {
|
|
2
|
+
private _box;
|
|
3
|
+
private _center;
|
|
4
|
+
private _close;
|
|
5
|
+
private _initialized;
|
|
6
|
+
private _capture;
|
|
7
|
+
private readonly _onCapturedKey;
|
|
8
|
+
private readonly _onInput;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
/** `Gtk.SearchBar:search-mode-enabled` — the revealer's `reveal-child`. Defaults FALSE. */
|
|
11
|
+
get searchModeEnabled(): boolean;
|
|
12
|
+
set searchModeEnabled(value: boolean);
|
|
13
|
+
/** `Gtk.SearchBar:show-close-button` — the `.close` button at the end of the box. */
|
|
14
|
+
get showCloseButton(): boolean;
|
|
15
|
+
set showCloseButton(value: boolean);
|
|
16
|
+
/** `Gtk.SearchBar:key-capture-widget` — where printable keys start a search. */
|
|
17
|
+
get keyCaptureWidget(): HTMLElement | null;
|
|
18
|
+
set keyCaptureWidget(widget: HTMLElement | null);
|
|
19
|
+
/** The editable the C's `connect_entry` would have bound: the first field inside the bar. */
|
|
20
|
+
get entry(): HTMLInputElement | HTMLTextAreaElement | null;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
disconnectedCallback(): void;
|
|
23
|
+
attributeChangedCallback(name: string, _old: string | null, _value: string | null): void;
|
|
24
|
+
private _render;
|
|
25
|
+
/**
|
|
26
|
+
* `reveal_child_changed_cb` (gtksearchbar.c:183-205): revealing focuses the entry,
|
|
27
|
+
* hiding clears it. Run on a real CHANGE only — at init the C's own notify fires before
|
|
28
|
+
* the handler is connected, so a child that arrives with the bar is left alone.
|
|
29
|
+
*/
|
|
30
|
+
private _applyReveal;
|
|
31
|
+
private _revealFromTyping;
|
|
32
|
+
/**
|
|
33
|
+
* The key-capture path (gtksearchbar.c:525-556): a printable key on the capture widget
|
|
34
|
+
* opens the bar and goes into the entry, which is what forwarding the event does in the C.
|
|
35
|
+
* Modified keys and the functional keys are left alone — GTK forwards them, but a bar
|
|
36
|
+
* that opened on every arrow key would not be a search bar.
|
|
37
|
+
*/
|
|
38
|
+
private _captureKey;
|
|
39
|
+
}
|