@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
package/src/tab-chip.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// The tab chip — one button in an AdwTabBox — and the two measurements that hang off
|
|
2
|
+
// it, shared by the two widgets that render one.
|
|
3
|
+
//
|
|
4
|
+
// WHY A SHARED MODULE. `<adw-tab-bar>` is libadwaita's tab bar as a widget of its own,
|
|
5
|
+
// and `<adw-tab-view>` has carried a merged one since before that existed. Both draw the
|
|
6
|
+
// SAME chip — the same five nodes in the same order, the same `.adw-tab-*` classes, the
|
|
7
|
+
// same derivations from `@gjsify/adwaita-core` — so the markup lives here once and each
|
|
8
|
+
// widget owns the parts that are genuinely its own: the bar the page list scrolls in, the
|
|
9
|
+
// selection, and whether the strip is revealed at all.
|
|
10
|
+
//
|
|
11
|
+
// The two measurements are here for the reason `adw-tab-view.ts` used `offsetLeft` and
|
|
12
|
+
// got it wrong: both are read in the BAR's scroll space, so both take the bar as an
|
|
13
|
+
// argument instead of finding an offsetParent, and neither can be reused by a caller that
|
|
14
|
+
// has a different strip.
|
|
15
|
+
//
|
|
16
|
+
// Reference: refs/libadwaita/src/adw-tab.c (the chip: title, icons, close button, pinned)
|
|
17
|
+
// Reference: refs/libadwaita/src/adw-tab-box.c (SPACING, update_visible, scroll_to_tab_full)
|
|
18
|
+
// Copyright (c) 2020-2022 Purism SPC / GNOME contributors (libadwaita). LGPLv2.1+.
|
|
19
|
+
// Modifications: Implemented for @gjsify/adwaita-web; the chip is a `<button>` and the
|
|
20
|
+
// indicator nodes are `<gtk-image>`.
|
|
21
|
+
|
|
22
|
+
import { tabCloseVisible, tabIconState, tabTooltip } from '@gjsify/adwaita-core';
|
|
23
|
+
import type { AdwTabPageState } from '@gjsify/adwaita-core';
|
|
24
|
+
|
|
25
|
+
import { type GtkImage, createGtkImage } from './elements/gtk-image.js';
|
|
26
|
+
|
|
27
|
+
export type AdwTabBarPage = AdwTabPageState<HTMLElement>;
|
|
28
|
+
|
|
29
|
+
/** `SPACING`: the slack `scroll_to_tab_full` allows before it scrolls (adw-tab-box.c:24). */
|
|
30
|
+
export const TAB_SPACING = 5;
|
|
31
|
+
|
|
32
|
+
/** The five nodes of one chip, held so a caller can refresh one without re-querying it. */
|
|
33
|
+
export interface TabChip {
|
|
34
|
+
/** The button itself: `role="tab"`, carrying `data-page-id`. */
|
|
35
|
+
el: HTMLButtonElement;
|
|
36
|
+
icon: GtkImage;
|
|
37
|
+
spinner: HTMLElement;
|
|
38
|
+
label: HTMLElement;
|
|
39
|
+
indicator: GtkImage;
|
|
40
|
+
close: HTMLButtonElement;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** What the chip asks its bar for; the bar owns the model and the page list. */
|
|
44
|
+
export interface TabChipHooks {
|
|
45
|
+
/** The chip was pressed — libadwaita's `select_page`. */
|
|
46
|
+
onSelect: () => void;
|
|
47
|
+
/** The close affordance was pressed; `AdwTab`'s own button, which stops propagation. */
|
|
48
|
+
onClose: () => void;
|
|
49
|
+
/** Pointer in or out of the chip, for `update_visible`'s `hovering` term. */
|
|
50
|
+
onHover: (hovering: boolean) => void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* One chip, node for node: the icon, the spinner that replaces it while the page is
|
|
55
|
+
* loading, the title, the attention indicator and the close affordance — in that order,
|
|
56
|
+
* because `AdwTab`'s template puts the close button LAST and the indicator before it.
|
|
57
|
+
*/
|
|
58
|
+
export const createTabChip = (hooks: TabChipHooks): TabChip => {
|
|
59
|
+
const el = document.createElement('button');
|
|
60
|
+
el.type = 'button';
|
|
61
|
+
el.className = 'adw-tab';
|
|
62
|
+
el.setAttribute('role', 'tab');
|
|
63
|
+
|
|
64
|
+
// Decorative mask-image nodes — <gtk-image> carries the convention, including the
|
|
65
|
+
// `-symbolic` strip, which is ours and not C's: there the name reaches `GtkImage`
|
|
66
|
+
// untouched.
|
|
67
|
+
const icon = createGtkImage(null, 'adw-tab-icon');
|
|
68
|
+
|
|
69
|
+
// `AdwTabPage:loading` swaps the icon image for an `AdwSpinnerPaintable` — the SAME
|
|
70
|
+
// paintable `Adw.Spinner` uses (`update_icons`). So this is a real `<adw-spinner>` in
|
|
71
|
+
// the icon's slot, not a ring drawn again in CSS: a CSS copy inherits every spinner
|
|
72
|
+
// defect independently.
|
|
73
|
+
const spinner = document.createElement('adw-spinner');
|
|
74
|
+
spinner.className = 'adw-tab-spinner';
|
|
75
|
+
spinner.setAttribute('size', '16');
|
|
76
|
+
spinner.hidden = true;
|
|
77
|
+
|
|
78
|
+
const label = document.createElement('span');
|
|
79
|
+
label.className = 'adw-tab-title';
|
|
80
|
+
|
|
81
|
+
const indicator = createGtkImage(null, 'adw-tab-indicator');
|
|
82
|
+
|
|
83
|
+
// Close affordance — a small flat button drawn with a CSS "×" glyph. NOT because the
|
|
84
|
+
// glyph is unavailable: `window-close` is in the ICONS map and has a mask class. It is a
|
|
85
|
+
// SIZING difference — upstream's close button is 24px around a 16px symbolic
|
|
86
|
+
// (adw-tab.ui:77) and a 16px-grid symbolic scaled into a narrower chip is a design
|
|
87
|
+
// change, not a rename.
|
|
88
|
+
//
|
|
89
|
+
// C's `can-focus=False` is NOT set here, and that is where the roving obligation
|
|
90
|
+
// decides it: `scripts/check-adwaita-keyboard-contract.mjs` holds a negative tabindex
|
|
91
|
+
// against the file that registers the arrow keys behind it, and a builder shared by two
|
|
92
|
+
// bars registers none. Each widget sets `close.tabIndex` beside its own key handling.
|
|
93
|
+
const close = document.createElement('button');
|
|
94
|
+
close.type = 'button';
|
|
95
|
+
close.className = 'adw-tab-close';
|
|
96
|
+
close.setAttribute('aria-label', 'Close tab');
|
|
97
|
+
close.addEventListener('click', (event) => {
|
|
98
|
+
event.stopPropagation();
|
|
99
|
+
hooks.onClose();
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
el.append(icon, spinner, label, indicator, close);
|
|
103
|
+
el.addEventListener('click', () => hooks.onSelect());
|
|
104
|
+
el.addEventListener('pointerenter', () => hooks.onHover(true));
|
|
105
|
+
el.addEventListener('pointerleave', () => hooks.onHover(false));
|
|
106
|
+
|
|
107
|
+
return { el, icon, spinner, label, indicator, close };
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* `update_icons`, `update_title` and `update_needs_attention` — everything about a chip
|
|
112
|
+
* that reads off its PAGE rather than off the bar. The bar keeps the geometry half
|
|
113
|
+
* ({@link refreshTabChipClose}) to itself, because that is measured against ITS scroll
|
|
114
|
+
* window and only it knows where the chip sits in it.
|
|
115
|
+
*/
|
|
116
|
+
export const refreshTabChip = (chip: TabChip, page: AdwTabBarPage, defaultIcon: string | null): void => {
|
|
117
|
+
chip.label.textContent = page.title;
|
|
118
|
+
// The tooltip is Pango MARKUP when the page sets one of its own. The DOM `title`
|
|
119
|
+
// attribute is a TEXT sink, so the markup is shown verbatim rather than pushed
|
|
120
|
+
// through an HTML sink — interpreting it would execute page-supplied markup.
|
|
121
|
+
chip.el.title = tabTooltip(page);
|
|
122
|
+
chip.el.classList.toggle('pinned', page.pinned);
|
|
123
|
+
chip.el.classList.toggle('needs-attention', page.needsAttention);
|
|
124
|
+
chip.el.classList.toggle('closing', page.closing);
|
|
125
|
+
|
|
126
|
+
const icons = tabIconState(page, defaultIcon);
|
|
127
|
+
chip.icon.iconName = icons.icon;
|
|
128
|
+
// The two occupy the same slot and are never both visible: C REPLACES the image's
|
|
129
|
+
// contents rather than stacking a second node.
|
|
130
|
+
chip.icon.hidden = !icons.iconVisible || icons.spinner;
|
|
131
|
+
// The spinner is mounted only while it spins, so an idle tab holds no element in the
|
|
132
|
+
// shared rAF ticker.
|
|
133
|
+
chip.spinner.hidden = !(icons.spinner && icons.iconVisible);
|
|
134
|
+
chip.indicator.iconName = page.indicatorIcon;
|
|
135
|
+
chip.indicator.hidden = !icons.indicatorVisible;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* `get_tab_position` in the BAR's scroll space: how far the chip sits from the strip's
|
|
140
|
+
* scroll origin, the one coordinate both `scroll_to_tab_full` and `update_visible` compare
|
|
141
|
+
* against the adjustment.
|
|
142
|
+
*
|
|
143
|
+
* Never `offsetLeft`. Nothing in a tab bar is positioned, so a chip's offsetParent is
|
|
144
|
+
* whichever positioned ancestor the HOST page happens to have; a bar that merely sits
|
|
145
|
+
* indented then measured every chip against the wrong origin and reported all of them
|
|
146
|
+
* clipped.
|
|
147
|
+
*/
|
|
148
|
+
export const chipPosition = (bar: HTMLElement, chip: HTMLElement): number =>
|
|
149
|
+
chip.getBoundingClientRect().left - bar.getBoundingClientRect().left + bar.scrollLeft;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* `update_visible` (adw-tab-box.c:769-797) as libadwaita applies it, with the pinned gate
|
|
153
|
+
* from `AdwTab` folded in: `(hovering && fullyVisible) || selected`, never on a pinned tab.
|
|
154
|
+
*
|
|
155
|
+
* `dragging` is constantly false — tab drag-and-drop is compositor work and is not modelled
|
|
156
|
+
* — and the SPACING slack C also demands is deliberately NOT transplanted, because it is not
|
|
157
|
+
* slack there either: the allocation loop starts the first tab at `pos = SPACING` and puts
|
|
158
|
+
* SPACING between tabs (:3270-3286), so `pos - SPACING >= value` is exactly "flush against
|
|
159
|
+
* the leading edge". A strip without those gaps would report the first chip clipped.
|
|
160
|
+
*/
|
|
161
|
+
export const refreshTabChipClose = (
|
|
162
|
+
bar: HTMLElement,
|
|
163
|
+
chip: TabChip,
|
|
164
|
+
page: AdwTabBarPage,
|
|
165
|
+
state: { hovering: boolean; selected: boolean },
|
|
166
|
+
): void => {
|
|
167
|
+
const value = bar.scrollLeft;
|
|
168
|
+
const pos = chipPosition(bar, chip.el);
|
|
169
|
+
const fullyVisible = pos >= value && pos + chip.el.offsetWidth <= value + bar.clientWidth;
|
|
170
|
+
chip.close.hidden = !tabCloseVisible({
|
|
171
|
+
hovering: state.hovering,
|
|
172
|
+
fullyVisible,
|
|
173
|
+
selected: state.selected,
|
|
174
|
+
dragging: false,
|
|
175
|
+
pinned: page.pinned,
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* `scroll_to_tab_full` (adw-tab-box.c:928-961): bring the chip inside the BAR's own scroll
|
|
181
|
+
* window, padded by half of whichever is smaller, the chip or the leftover.
|
|
182
|
+
*
|
|
183
|
+
* The bar is the only thing C ever scrolls for a tab — `scroll_to_tab_full` writes
|
|
184
|
+
* `self->adjustment`, the strip's own adjustment, and nothing else. The DOM has no such
|
|
185
|
+
* narrow API: `focus()` and `scrollIntoView()` both walk EVERY scrollable ancestor up to
|
|
186
|
+
* the window. So this moves `scrollLeft` by hand, and the caller passes `preventScroll` to
|
|
187
|
+
* `focus()`.
|
|
188
|
+
*/
|
|
189
|
+
export const scrollChipIntoBar = (bar: HTMLElement, chip: HTMLElement): void => {
|
|
190
|
+
const pageSize = bar.clientWidth;
|
|
191
|
+
const width = chip.offsetWidth;
|
|
192
|
+
// Unmeasured (detached, or still inside connectedCallback): nothing to scroll to.
|
|
193
|
+
if (pageSize <= 0 || width <= 0) return;
|
|
194
|
+
|
|
195
|
+
const value = bar.scrollLeft;
|
|
196
|
+
const pos = chipPosition(bar, chip);
|
|
197
|
+
const padding = Math.min(width, pageSize - width) / 2;
|
|
198
|
+
if (pos - TAB_SPACING < value) bar.scrollLeft = pos - padding;
|
|
199
|
+
else if (pos + width + TAB_SPACING > value + pageSize) bar.scrollLeft = pos + width + padding - pageSize;
|
|
200
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// The application's own classes, which a `.blp` names with a `$` (ADR 0093): `$SourceView`,
|
|
2
|
+
// or `template $MainButton : Adw.Bin` defining one. `SharedTreeNode.extern` says the tag is
|
|
3
|
+
// such a class, and this registry is where the shared-tree builder looks it up.
|
|
4
|
+
//
|
|
5
|
+
// The registry lives here and not in `@gjsify/adwaita-core` because the stored thing is the
|
|
6
|
+
// renderer's own: the tag of a custom element the application defines. A name like `Display`
|
|
7
|
+
// is not a valid custom-element name and no case rule can invent one, so the caller says which
|
|
8
|
+
// tag the class answers to. The application defines the element itself
|
|
9
|
+
// (through the custom element registry), which keeps this package's element set the one it ships.
|
|
10
|
+
|
|
11
|
+
const registry = new Map<string, string>();
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Registers the custom element `tag` as the class a `.blp` means by `$name`, spelled as the
|
|
15
|
+
* file spells it (`SourceView` for `$SourceView`). The element builds its own internals,
|
|
16
|
+
* typically from its own `.blp?shared-tree`, and must be defined by the time a tree uses it.
|
|
17
|
+
*
|
|
18
|
+
* Registering the same pair again is a no-op; a different tag under the same name is refused,
|
|
19
|
+
* as `Gtk.Builder` refuses a type registered twice.
|
|
20
|
+
*/
|
|
21
|
+
export function registerTemplateClass(name: string, tag: string): void {
|
|
22
|
+
const known = registry.get(name);
|
|
23
|
+
if (known !== undefined && known !== tag) {
|
|
24
|
+
throw new Error(`the template class '${name}' is already registered as <${known}>.`);
|
|
25
|
+
}
|
|
26
|
+
registry.set(name, tag);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** The tag `name` was registered under, or a refusal that names what is missing. */
|
|
30
|
+
export function templateTagFor(name: string): string {
|
|
31
|
+
const tag = registry.get(name);
|
|
32
|
+
if (tag === undefined) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
`the tree uses the class '$${name}', which no registerTemplateClass() call registered: ` +
|
|
35
|
+
'adwaita-web cannot build a class it does not know.',
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
if (customElements.get(tag) === undefined) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`the class '$${name}' is registered as <${tag}>, which nothing has defined in the custom element registry, so ` +
|
|
41
|
+
'the element would stay an empty unknown tag.',
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return tag;
|
|
45
|
+
}
|
package/src/test.browser.mts
CHANGED
|
@@ -23,11 +23,21 @@ import { AdwSplitViewsTest } from './split-views.spec.js';
|
|
|
23
23
|
import { AdwButtonRowTest } from './adw-button-row.spec.js';
|
|
24
24
|
import { AdwActionRowsTest } from './adw-action-rows.spec.js';
|
|
25
25
|
import { AdwBreakpointsTest } from './breakpoints.spec.js';
|
|
26
|
+
import { AdwBreakpointBinTest } from './adw-breakpoint-bin.spec.js';
|
|
27
|
+
import { AdwMultiLayoutViewTest } from './adw-multi-layout-view.spec.js';
|
|
26
28
|
import { AdwDataGridTest } from './adw-data-grid.spec.js';
|
|
27
29
|
import { AdwDialogTest } from './adw-dialog.spec.js';
|
|
30
|
+
import { AdwWindowTest } from './adw-window.spec.js';
|
|
31
|
+
import { AdwShortcutsTest } from './adw-shortcuts.spec.js';
|
|
32
|
+
import { AdwApplicationWindowTest } from './adw-application-window.spec.js';
|
|
28
33
|
import { AdwAlertDialogTest } from './adw-alert-dialog.spec.js';
|
|
29
34
|
import { GtkDropDownTest } from './gtk-drop-down.spec.js';
|
|
35
|
+
import { GtkDragIconTest } from './gtk-drag-icon.spec.js';
|
|
36
|
+
import { GtkDrawingAreaTest } from './gtk-drawing-area.spec.js';
|
|
37
|
+
import { GtkGLAreaTest } from './gtk-gl-area.spec.js';
|
|
38
|
+
import { GtkGraphicsOffloadTest } from './gtk-graphics-offload.spec.js';
|
|
30
39
|
import { AdwRowStateTest } from './adw-row-state.spec.js';
|
|
40
|
+
import { AdwRowTooltipTest } from './row-tooltip.spec.js';
|
|
31
41
|
import { AdwTabViewTest } from './adw-tab-view.spec.js';
|
|
32
42
|
import { AdwToastOverlayTest } from './adw-toast-overlay.spec.js';
|
|
33
43
|
import { AdwViewSwitcherBarTest } from './adw-view-switcher-bar.spec.js';
|
|
@@ -36,9 +46,17 @@ import { AdwWrapBoxTest } from './adw-wrap-box.spec.js';
|
|
|
36
46
|
import { AdwHeaderBarTest } from './adw-header-bar.spec.js';
|
|
37
47
|
import { GtkEntryTest } from './gtk-entry.spec.js';
|
|
38
48
|
import { GtkMenuButtonTest } from './gtk-menu-button.spec.js';
|
|
49
|
+
import { GtkPopoverTest } from './gtk-popover.spec.js';
|
|
50
|
+
import { GtkPopoverRoleTest } from './gtk-popover-role.spec.js';
|
|
51
|
+
import { GtkPopoverBinTest } from './gtk-popover-bin.spec.js';
|
|
52
|
+
import { GtkPopoverMenuTest } from './gtk-popover-menu.spec.js';
|
|
53
|
+
import { GtkPopoverMenuBarTest } from './gtk-popover-menu-bar.spec.js';
|
|
39
54
|
import { GioMenuTest } from './gio-menu.spec.js';
|
|
40
55
|
import { GtkValueDoorsTest } from './gtk-value-doors.spec.js';
|
|
41
56
|
import { GtkButtonTest } from './gtk-button.spec.js';
|
|
57
|
+
import { GtkAboutDialogTest } from './gtk-about-dialog.spec.js';
|
|
58
|
+
import { GtkEmojiChooserTest } from './gtk-emoji-chooser.spec.js';
|
|
59
|
+
import { GtkPrintDialogsTest } from './gtk-print-dialogs.spec.js';
|
|
42
60
|
import { AdwBannerTest } from './adw-banner.spec.js';
|
|
43
61
|
import { AdwButtonContentTest } from './adw-button-content.spec.js';
|
|
44
62
|
import { GtkImageTest } from './gtk-image.spec.js';
|
|
@@ -46,9 +64,70 @@ import { AdwIconRegistryTest } from './icon-registry.spec.js';
|
|
|
46
64
|
import { GtkSwitchTest } from './gtk-switch.spec.js';
|
|
47
65
|
import { AdwChecksTest } from './checks.spec.js';
|
|
48
66
|
import { GtkProgressBarTest } from './gtk-progress-bar.spec.js';
|
|
67
|
+
import { GtkLevelBarTest } from './gtk-level-bar.spec.js';
|
|
68
|
+
import { GtkSpinnerTest } from './gtk-spinner.spec.js';
|
|
69
|
+
import { GtkNotebookTest } from './gtk-notebook.spec.js';
|
|
70
|
+
import { GtkStackTest } from './gtk-stack.spec.js';
|
|
71
|
+
import { GtkStackSidebarTest } from './gtk-stack-sidebar.spec.js';
|
|
72
|
+
import { GtkStackSwitcherTest } from './gtk-stack-switcher.spec.js';
|
|
73
|
+
import { GtkColumnViewTest } from './gtk-column-view.spec.js';
|
|
74
|
+
import { GtkGridViewTest } from './gtk-grid-view.spec.js';
|
|
75
|
+
import { GtkListViewTest } from './gtk-list-view.spec.js';
|
|
76
|
+
import { GtkHeaderBarTest } from './gtk-header-bar.spec.js';
|
|
77
|
+
import { GtkWindowControlsTest } from './gtk-window-controls.spec.js';
|
|
78
|
+
import { GtkWindowTest } from './gtk-window.spec.js';
|
|
79
|
+
import { GtkApplicationWindowTest } from './gtk-application-window.spec.js';
|
|
80
|
+
import { GtkActionBarTest } from './gtk-action-bar.spec.js';
|
|
81
|
+
import { GtkSeparatorTest } from './gtk-separator.spec.js';
|
|
82
|
+
import { GtkCalendarTest } from './gtk-calendar.spec.js';
|
|
83
|
+
import { GtkFlowBoxTest } from './gtk-flow-box.spec.js';
|
|
84
|
+
import { GtkListBoxTest } from './gtk-list-box.spec.js';
|
|
85
|
+
import { GtkTreeExpanderTest } from './gtk-tree-expander.spec.js';
|
|
86
|
+
import { GtkToggleButtonTest } from './gtk-toggle-button.spec.js';
|
|
87
|
+
import { GtkExpanderTest } from './gtk-expander.spec.js';
|
|
88
|
+
import { GtkOverlayTest } from './gtk-overlay.spec.js';
|
|
89
|
+
import { GtkPanedTest } from './gtk-paned.spec.js';
|
|
90
|
+
import { GtkRevealerTest } from './gtk-revealer.spec.js';
|
|
91
|
+
import { GtkScaleTest } from './gtk-scale.spec.js';
|
|
92
|
+
import { GtkSpinButtonTest } from './gtk-spin-button.spec.js';
|
|
93
|
+
import { GtkPasswordEntryTest } from './gtk-password-entry.spec.js';
|
|
94
|
+
import { GtkSearchEntryTest } from './gtk-search-entry.spec.js';
|
|
95
|
+
import { GtkLinkButtonTest } from './gtk-link-button.spec.js';
|
|
96
|
+
import { GtkScaleButtonTest } from './gtk-scale-button.spec.js';
|
|
97
|
+
import { GtkColorDialogButtonTest } from './gtk-color-dialog-button.spec.js';
|
|
98
|
+
import { GtkFontDialogButtonTest } from './gtk-font-dialog-button.spec.js';
|
|
99
|
+
import { AdwBinTest } from './adw-bin.spec.js';
|
|
100
|
+
import { AdwClampScrollableTest } from './adw-clamp-scrollable.spec.js';
|
|
101
|
+
import { AdwPreferencesRowTest } from './adw-preferences-row.spec.js';
|
|
102
|
+
import { AdwTabBarTest } from './adw-tab-bar.spec.js';
|
|
103
|
+
import { AdwTabButtonTest } from './adw-tab-button.spec.js';
|
|
104
|
+
import { AdwTabOverviewTest } from './adw-tab-overview.spec.js';
|
|
105
|
+
import { AdwViewSwitcherSidebarTest } from './adw-view-switcher-sidebar.spec.js';
|
|
106
|
+
import { GtkEditableLabelTest } from './gtk-editable-label.spec.js';
|
|
107
|
+
import { GtkSearchBarTest } from './gtk-search-bar.spec.js';
|
|
108
|
+
import { GtkTextTest } from './gtk-text.spec.js';
|
|
109
|
+
import { GtkTextViewTest } from './gtk-text-view.spec.js';
|
|
110
|
+
import { GtkFrameTest } from './gtk-frame.spec.js';
|
|
111
|
+
import { GtkAspectFrameTest } from './gtk-aspect-frame.spec.js';
|
|
112
|
+
import { GtkCenterBoxTest } from './gtk-center-box.spec.js';
|
|
113
|
+
import { GtkGridTest } from './gtk-grid.spec.js';
|
|
114
|
+
import { GtkFixedTest } from './gtk-fixed.spec.js';
|
|
115
|
+
import { GtkScrolledWindowTest } from './gtk-scrolled-window.spec.js';
|
|
116
|
+
import { GtkScrollbarTest } from './gtk-scrollbar.spec.js';
|
|
117
|
+
import { GtkViewportTest } from './gtk-viewport.spec.js';
|
|
118
|
+
import { GtkWindowHandleTest } from './gtk-window-handle.spec.js';
|
|
49
119
|
import { GtkBoxTest } from './gtk-box.spec.js';
|
|
50
120
|
import { GtkLabelTest } from './gtk-label.spec.js';
|
|
121
|
+
// The media group, after `GtkLabelTest` because `<gtk-media-controls>` adopts its stream from
|
|
122
|
+
// the nearest ancestor `<gtk-video>` and `<gtk-inscription>` asserts the `.numeric`-shaped
|
|
123
|
+
// label rules `GtkLabelTest` established — neither is order-dependent, but grouping the four
|
|
124
|
+
// here is what makes the block findable.
|
|
125
|
+
import { GtkPictureTest } from './gtk-picture.spec.js';
|
|
126
|
+
import { GtkInscriptionTest } from './gtk-inscription.spec.js';
|
|
127
|
+
import { GtkVideoTest } from './gtk-video.spec.js';
|
|
128
|
+
import { GtkMediaControlsTest } from './gtk-media-controls.spec.js';
|
|
51
129
|
import { AdwAboutDialogTest } from './adw-about-dialog.spec.js';
|
|
130
|
+
import { AdwStatusPageTest } from './adw-status-page.spec.js';
|
|
52
131
|
import { AdwStyleClassesTest } from './style-classes.spec.js';
|
|
53
132
|
import { AdwAccentTest } from './adw-accent.spec.js';
|
|
54
133
|
import { AdwAppearanceTest } from './adw-appearance.spec.js';
|
|
@@ -58,25 +137,32 @@ import { AdwEmptySectionsTest } from './empty-sections.spec.js';
|
|
|
58
137
|
import { AdwSlottedChildrenTest } from './slotted-children.spec.js';
|
|
59
138
|
import { AdwKeyboardOperableTest } from './keyboard-operable.spec.js';
|
|
60
139
|
import { AdwFontsTest } from './adw-fonts.spec.js';
|
|
140
|
+
import { AdwConstructVectorsTest } from './construct-vectors.spec.js';
|
|
61
141
|
import { AdwSharedTreesTest } from './shared-trees.spec.js';
|
|
62
142
|
import { AdwBlueprintTreeTest } from './blueprint-tree.spec.js';
|
|
63
143
|
import { AdwValueListsTest } from './value-lists.spec.js';
|
|
64
144
|
import { AdwBlueprintLayoutTest } from './blueprint-layout.spec.js';
|
|
145
|
+
import { AdwWidgetSizeTest } from './widget-size.spec.js';
|
|
146
|
+
import { AdwSharedTreeMountTest } from './shared-tree-mount.spec.js';
|
|
65
147
|
import { AdwBlueprintMarkupTest } from './blueprint-markup.spec.js';
|
|
66
148
|
import { AdwTagsTest } from './tags.spec.js';
|
|
67
149
|
import { AdwFontStackTest } from './font-stack.spec.js';
|
|
68
150
|
|
|
69
151
|
run({
|
|
70
152
|
AdwSharedTreesTest,
|
|
153
|
+
AdwConstructVectorsTest,
|
|
71
154
|
AdwBlueprintTreeTest,
|
|
72
155
|
AdwValueListsTest,
|
|
73
156
|
AdwBlueprintLayoutTest,
|
|
157
|
+
AdwWidgetSizeTest,
|
|
158
|
+
AdwSharedTreeMountTest,
|
|
74
159
|
AdwBlueprintMarkupTest,
|
|
75
160
|
AdwTagsTest,
|
|
76
161
|
AdwKeyboardOperableTest,
|
|
77
162
|
AdwConnectLifecycleTest,
|
|
78
163
|
AdwEmptySectionsTest,
|
|
79
164
|
AdwSlottedChildrenTest,
|
|
165
|
+
AdwStatusPageTest,
|
|
80
166
|
AdwStyleClassesTest,
|
|
81
167
|
AdwAccentTest,
|
|
82
168
|
AdwAppearanceTest,
|
|
@@ -90,8 +176,68 @@ run({
|
|
|
90
176
|
GtkSwitchTest,
|
|
91
177
|
AdwChecksTest,
|
|
92
178
|
GtkProgressBarTest,
|
|
179
|
+
GtkLevelBarTest,
|
|
180
|
+
GtkSpinnerTest,
|
|
181
|
+
GtkStackTest,
|
|
182
|
+
GtkStackSwitcherTest,
|
|
183
|
+
GtkStackSidebarTest,
|
|
184
|
+
GtkNotebookTest,
|
|
185
|
+
GtkColumnViewTest,
|
|
186
|
+
GtkGridViewTest,
|
|
187
|
+
GtkListViewTest,
|
|
188
|
+
GtkHeaderBarTest,
|
|
189
|
+
GtkWindowControlsTest,
|
|
190
|
+
GtkWindowTest,
|
|
191
|
+
GtkApplicationWindowTest,
|
|
192
|
+
GtkActionBarTest,
|
|
193
|
+
GtkSeparatorTest,
|
|
194
|
+
GtkCalendarTest,
|
|
195
|
+
GtkFlowBoxTest,
|
|
196
|
+
GtkListBoxTest,
|
|
197
|
+
GtkTreeExpanderTest,
|
|
198
|
+
GtkDrawingAreaTest,
|
|
199
|
+
GtkDragIconTest,
|
|
200
|
+
GtkGLAreaTest,
|
|
201
|
+
GtkGraphicsOffloadTest,
|
|
202
|
+
GtkToggleButtonTest,
|
|
203
|
+
GtkExpanderTest,
|
|
204
|
+
GtkOverlayTest,
|
|
205
|
+
GtkPanedTest,
|
|
206
|
+
GtkRevealerTest,
|
|
207
|
+
GtkScaleTest,
|
|
208
|
+
GtkSpinButtonTest,
|
|
209
|
+
GtkPasswordEntryTest,
|
|
210
|
+
GtkSearchEntryTest,
|
|
211
|
+
GtkLinkButtonTest,
|
|
212
|
+
GtkScaleButtonTest,
|
|
213
|
+
GtkColorDialogButtonTest,
|
|
214
|
+
GtkFontDialogButtonTest,
|
|
215
|
+
AdwBinTest,
|
|
216
|
+
AdwClampScrollableTest,
|
|
217
|
+
AdwPreferencesRowTest,
|
|
218
|
+
AdwTabBarTest,
|
|
219
|
+
AdwTabButtonTest,
|
|
220
|
+
AdwTabOverviewTest,
|
|
221
|
+
AdwViewSwitcherSidebarTest,
|
|
222
|
+
GtkEditableLabelTest,
|
|
223
|
+
GtkTextTest,
|
|
224
|
+
GtkTextViewTest,
|
|
225
|
+
GtkSearchBarTest,
|
|
226
|
+
GtkFrameTest,
|
|
227
|
+
GtkAspectFrameTest,
|
|
228
|
+
GtkCenterBoxTest,
|
|
229
|
+
GtkGridTest,
|
|
230
|
+
GtkFixedTest,
|
|
231
|
+
GtkScrolledWindowTest,
|
|
232
|
+
GtkScrollbarTest,
|
|
233
|
+
GtkViewportTest,
|
|
234
|
+
GtkWindowHandleTest,
|
|
93
235
|
GtkBoxTest,
|
|
94
236
|
GtkLabelTest,
|
|
237
|
+
GtkPictureTest,
|
|
238
|
+
GtkInscriptionTest,
|
|
239
|
+
GtkVideoTest,
|
|
240
|
+
GtkMediaControlsTest,
|
|
95
241
|
AdwAvatarTest,
|
|
96
242
|
AdwCarouselTest,
|
|
97
243
|
AdwBottomSheetTest,
|
|
@@ -104,10 +250,16 @@ run({
|
|
|
104
250
|
AdwButtonRowTest,
|
|
105
251
|
AdwActionRowsTest,
|
|
106
252
|
AdwBreakpointsTest,
|
|
253
|
+
AdwBreakpointBinTest,
|
|
254
|
+
AdwMultiLayoutViewTest,
|
|
107
255
|
AdwDataGridTest,
|
|
108
256
|
AdwDialogTest,
|
|
257
|
+
AdwWindowTest,
|
|
258
|
+
AdwShortcutsTest,
|
|
259
|
+
AdwApplicationWindowTest,
|
|
109
260
|
GtkDropDownTest,
|
|
110
261
|
AdwRowStateTest,
|
|
262
|
+
AdwRowTooltipTest,
|
|
111
263
|
AdwTabViewTest,
|
|
112
264
|
AdwToastOverlayTest,
|
|
113
265
|
AdwViewSwitcherBarTest,
|
|
@@ -116,9 +268,17 @@ run({
|
|
|
116
268
|
AdwHeaderBarTest,
|
|
117
269
|
GtkEntryTest,
|
|
118
270
|
GtkMenuButtonTest,
|
|
271
|
+
GtkPopoverTest,
|
|
272
|
+
GtkPopoverRoleTest,
|
|
273
|
+
GtkPopoverBinTest,
|
|
274
|
+
GtkPopoverMenuTest,
|
|
275
|
+
GtkPopoverMenuBarTest,
|
|
119
276
|
GioMenuTest,
|
|
120
277
|
GtkValueDoorsTest,
|
|
121
278
|
GtkButtonTest,
|
|
279
|
+
GtkAboutDialogTest,
|
|
280
|
+
GtkEmojiChooserTest,
|
|
281
|
+
GtkPrintDialogsTest,
|
|
122
282
|
AdwViewStackTest,
|
|
123
283
|
AdwNavigationViewTest,
|
|
124
284
|
AdwSidebarTest,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// `width-request`, `height-request` AND AN AUTHORED `hexpand: false`, LAID OUT.
|
|
2
|
+
//
|
|
3
|
+
// The three-loader-ldraw sidebar is `Gtk.ScrolledWindow { width-request: 320; hexpand: false }`
|
|
4
|
+
// beside an expanding canvas. Nothing read either property, so a scrolled window (which is
|
|
5
|
+
// `flex: 1 1 0%`) and its sibling split the row in half and the sidebar came out ~50% wide
|
|
6
|
+
// where GTK gives it 320px. The assertions are the laid-out geometry, never the attribute.
|
|
7
|
+
|
|
8
|
+
import { describe, expect, it } from '@gjsify/unit';
|
|
9
|
+
import type { SharedTreeNode } from '@gjsify/adwaita-core/conformance';
|
|
10
|
+
|
|
11
|
+
import { mountSharedTree, writeProp } from './shared-tree-builder.js';
|
|
12
|
+
|
|
13
|
+
/** A row of 800px: a scrolled window carrying `sidebarProps`, and a box that expands. */
|
|
14
|
+
function mountRow(sidebarProps: NonNullable<SharedTreeNode['props']>) {
|
|
15
|
+
const tree: SharedTreeNode = {
|
|
16
|
+
tag: 'GtkBox',
|
|
17
|
+
props: { orientation: 'horizontal' },
|
|
18
|
+
children: [
|
|
19
|
+
{
|
|
20
|
+
tag: 'GtkScrolledWindow',
|
|
21
|
+
id: 'sidebar',
|
|
22
|
+
props: { 'hscrollbar-policy': 'never', ...sidebarProps },
|
|
23
|
+
children: [{ tag: 'GtkBox', props: { orientation: 'vertical' } }],
|
|
24
|
+
},
|
|
25
|
+
{ tag: 'GtkBox', id: 'content', props: { hexpand: true } },
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
const mounted = mountSharedTree(tree);
|
|
29
|
+
mounted.root.style.width = '800px';
|
|
30
|
+
mounted.root.style.height = '300px';
|
|
31
|
+
const byId = (id: string) => mounted.root.querySelector(`#${id}`) as HTMLElement;
|
|
32
|
+
return { ...mounted, byId };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const AdwWidgetSizeTest = async () => {
|
|
36
|
+
await describe('adwaita-web: width-request and an authored hexpand: false', async () => {
|
|
37
|
+
await it('a scrolled window with width-request 320 and hexpand false is 320px wide', async () => {
|
|
38
|
+
const { unmount, byId } = mountRow({ 'width-request': 320, hexpand: false });
|
|
39
|
+
try {
|
|
40
|
+
expect(byId('sidebar').getBoundingClientRect().width).toBe(320);
|
|
41
|
+
expect(byId('content').getBoundingClientRect().width).toBe(480);
|
|
42
|
+
} finally {
|
|
43
|
+
unmount();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
await it('without the authored false the scrolled window still shares the row', async () => {
|
|
48
|
+
const { unmount, byId } = mountRow({ 'width-request': 320 });
|
|
49
|
+
try {
|
|
50
|
+
expect(byId('sidebar').getBoundingClientRect().width).toBe(400);
|
|
51
|
+
} finally {
|
|
52
|
+
unmount();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
await it('width-request is a minimum: a wider natural size wins', async () => {
|
|
57
|
+
const tree: SharedTreeNode = {
|
|
58
|
+
tag: 'GtkBox',
|
|
59
|
+
props: { orientation: 'horizontal', 'width-request': 100, 'height-request': 40 },
|
|
60
|
+
children: [{ tag: 'GtkBox', id: 'wide', props: { 'width-request': 600 } }],
|
|
61
|
+
};
|
|
62
|
+
const { root, unmount } = mountSharedTree(tree);
|
|
63
|
+
try {
|
|
64
|
+
const style = getComputedStyle(root);
|
|
65
|
+
expect(`${style.minWidth} ${style.minHeight}`).toBe('100px 40px');
|
|
66
|
+
expect(getComputedStyle(root.querySelector('#wide') as Element).minWidth).toBe('600px');
|
|
67
|
+
} finally {
|
|
68
|
+
unmount();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
await it('-1 is "not set", and clears a request written earlier', async () => {
|
|
73
|
+
const { root, unmount } = mountSharedTree({ tag: 'GtkBox', props: { 'width-request': -1 } });
|
|
74
|
+
try {
|
|
75
|
+
expect(root.style.minWidth).toBe('');
|
|
76
|
+
writeProp(root, 'width-request', 200);
|
|
77
|
+
expect(root.style.minWidth).toBe('200px');
|
|
78
|
+
writeProp(root, 'width-request', -1);
|
|
79
|
+
expect(root.style.minWidth).toBe('');
|
|
80
|
+
} finally {
|
|
81
|
+
unmount();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
await it('vexpand false stops a scrolled window growing down a vertical box', async () => {
|
|
86
|
+
const tree: SharedTreeNode = {
|
|
87
|
+
tag: 'GtkBox',
|
|
88
|
+
props: { orientation: 'vertical' },
|
|
89
|
+
children: [
|
|
90
|
+
{ tag: 'GtkScrolledWindow', id: 'top', props: { 'height-request': 100, vexpand: false } },
|
|
91
|
+
{ tag: 'GtkBox', id: 'rest', props: { vexpand: true } },
|
|
92
|
+
],
|
|
93
|
+
};
|
|
94
|
+
const { root, unmount } = mountSharedTree(tree);
|
|
95
|
+
try {
|
|
96
|
+
root.style.width = '300px';
|
|
97
|
+
root.style.height = '400px';
|
|
98
|
+
expect((root.querySelector('#top') as HTMLElement).getBoundingClientRect().height).toBe(100);
|
|
99
|
+
} finally {
|
|
100
|
+
unmount();
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
await it('a later hexpand true takes over from an authored false', async () => {
|
|
105
|
+
const { unmount, byId } = mountRow({ 'width-request': 320, hexpand: false });
|
|
106
|
+
try {
|
|
107
|
+
const sidebar = byId('sidebar');
|
|
108
|
+
expect(sidebar.getAttribute('hexpand')).toBe('false');
|
|
109
|
+
writeProp(sidebar, 'hexpand', true);
|
|
110
|
+
expect(sidebar.getAttribute('hexpand')).toBe('');
|
|
111
|
+
expect(sidebar.getBoundingClientRect().width).toBe(400);
|
|
112
|
+
} finally {
|
|
113
|
+
unmount();
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|