@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,332 @@
|
|
|
1
|
+
// <gtk-popover-bin> — one child, and a popover to present from it. GTK 4.22's answer to
|
|
2
|
+
// "anywhere in my window should be able to offer a menu": wrap the widget, and the
|
|
3
|
+
// container owns the `Gtk.Popover`, the gestures and the `menu.popup` action.
|
|
4
|
+
//
|
|
5
|
+
// Its four behaviours are all short, and all are in gtkpopoverbin.c:
|
|
6
|
+
//
|
|
7
|
+
// · `menu-model` BUILDS the popover: `gtk_popover_bin_set_menu_model` creates a
|
|
8
|
+
// `gtk_popover_menu_new_from_model (model)`, pins it to `GTK_POS_BOTTOM` and adopts it
|
|
9
|
+
// (gtkpopoverbin.c:474-500). `popover` and `menu-model` are the SAME slot from two
|
|
10
|
+
// directions and each one CLEARS the other (`set_popover` clears the model,
|
|
11
|
+
// gtkpopoverbin.c:543-551) — so they are one field here too, not two that can disagree.
|
|
12
|
+
// · `handle-input` is the gesture pair: a `GtkGestureClick` on button 0 that pops the
|
|
13
|
+
// popover up only when the event `gdk_event_triggers_context_menu` (right click on
|
|
14
|
+
// Linux, ctrl-click on macOS) and DENIES the sequence otherwise, plus a touch-only
|
|
15
|
+
// long press that always pops (:156-189, :624-655). A plain left click therefore
|
|
16
|
+
// reaches the child untouched, which is the whole reason the gesture is separate.
|
|
17
|
+
// · The popover is presented AT THE POINTER: `popup_at_position` sets `pointing-to` to
|
|
18
|
+
// `(x, y)` when there is one and to the bottom-start (or bottom-end under RTL) corner
|
|
19
|
+
// of the bin when the call carries none (:129-154) — the shape GTK's
|
|
20
|
+
// `gtk_popover_menu_new_from_model` gets on a secondary click.
|
|
21
|
+
// · The child wears `.has-open-popup` WHILE the popover is mapped, and loses it on unmap
|
|
22
|
+
// (:117-126) — libadwaita's signal to the child that it is the row that generated the
|
|
23
|
+
// open popup (`_lists.scss:57`, `_sidebars.scss:132`), which is what a list row or a
|
|
24
|
+
// sidebar row needs to stay highlighted.
|
|
25
|
+
//
|
|
26
|
+
// `menu.popup` is an ACTION, not a method (gtkpopoverbin.c:381), so the element exposes it
|
|
27
|
+
// as an event the keyboard can dispatch and as `popup()` for a call — the action itself is
|
|
28
|
+
// GTK plumbing with no browser counterpart.
|
|
29
|
+
//
|
|
30
|
+
// Attributes:
|
|
31
|
+
// menu-model — the portable menu model as JSON (ADR 0042); builds the popover.
|
|
32
|
+
// handle-input — boolean, default FALSE — GTK's default. When set, a right click and a
|
|
33
|
+
// long press open the popover at the pointer.
|
|
34
|
+
// Properties:
|
|
35
|
+
// menuModel — the model, normalised (get/set). Setting it REPLACES any popover.
|
|
36
|
+
// popoverElement — the `<gtk-popover>` this bin presents (get/set; setting it drops
|
|
37
|
+
// the model, as GTK does). `GtkPopoverBin`'s own name for it is `popover`,
|
|
38
|
+
// which `HTMLElement` already spells as a string attribute for the DOM
|
|
39
|
+
// Popover API — so the element adds the suffix instead of shadowing it.
|
|
40
|
+
// handleInput — whether input opens the popover (get/set).
|
|
41
|
+
// actions — what the action group publishes about the actions the menu names.
|
|
42
|
+
// Methods:
|
|
43
|
+
// popup() — the `menu.popup` action. popdown() — dismiss it.
|
|
44
|
+
// Events:
|
|
45
|
+
// `notify::menu-model` (CustomEvent, bubbles, detail = { menuModel }) — the model changed,
|
|
46
|
+
// which in GTK is ALSO the notify for `:popover` (gtkpopoverbin.c:586-587): one slot,
|
|
47
|
+
// one notification pair.
|
|
48
|
+
// `menu.popup` (CustomEvent, bubbles) — the action's activation, dispatched so a keyboard
|
|
49
|
+
// binding or a test can fire it the way `gtk_widget_activate_action` would.
|
|
50
|
+
//
|
|
51
|
+
// KNOWN_GAPS — none of the scalar properties: `handle-input` is observed, and `child`,
|
|
52
|
+
// `popover` and `menu-model` are widget-typed, which `check-adwaita-element-properties.mjs`
|
|
53
|
+
// excludes from the scalar surface.
|
|
54
|
+
//
|
|
55
|
+
// Reference: refs/gtk/gtk/gtkpopoverbin.c (the class docs :30-42, `popup_at_position`
|
|
56
|
+
// :129-154, the gestures :156-189, `set_menu_model` :474-500, `set_popover` :543-587,
|
|
57
|
+
// `set_handle_input` :624-655, the `.has-open-popup` handlers :117-126)
|
|
58
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_lists.scss:57 (`row.has-open-popup`)
|
|
59
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_sidebars.scss:132 (the sidebar row)
|
|
60
|
+
// Copyright (c) GNOME contributors (GTK, libadwaita). LGPLv2.1+
|
|
61
|
+
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web.
|
|
62
|
+
|
|
63
|
+
import {
|
|
64
|
+
ADW_MENU_SURFACE_WEB,
|
|
65
|
+
assertMenuRenderable,
|
|
66
|
+
menuRefusals,
|
|
67
|
+
normalizeMenuModel,
|
|
68
|
+
parseMenuModel,
|
|
69
|
+
} from '@gjsify/adwaita-core';
|
|
70
|
+
import type { AdwMenuActions, AdwMenuInput, AdwMenuModel } from '@gjsify/adwaita-core';
|
|
71
|
+
|
|
72
|
+
// Both definitions have to be there before this module's own can build them in
|
|
73
|
+
// `connectedCallback`; a combined `import { GtkPopoverMenu }` would be elided, because the
|
|
74
|
+
// bindings are only used in type position.
|
|
75
|
+
import './gtk-popover-menu.js';
|
|
76
|
+
|
|
77
|
+
import type { GtkPopoverMenu } from './gtk-popover-menu.js';
|
|
78
|
+
|
|
79
|
+
/** How long a press must last to count as a long press — GTK's own default. */
|
|
80
|
+
const LONG_PRESS_MS = 500;
|
|
81
|
+
|
|
82
|
+
export class GtkPopoverBin extends HTMLElement {
|
|
83
|
+
private _model: AdwMenuModel = [];
|
|
84
|
+
private _popover: GtkPopoverMenu | null = null;
|
|
85
|
+
private _actions: AdwMenuActions | null = null;
|
|
86
|
+
private _initialized = false;
|
|
87
|
+
private _longPressTimer: ReturnType<typeof setTimeout> | null = null;
|
|
88
|
+
|
|
89
|
+
static get observedAttributes() {
|
|
90
|
+
return ['menu-model', 'handle-input'];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** The menu model, normalised (ADR 0042). */
|
|
94
|
+
get menuModel(): AdwMenuModel {
|
|
95
|
+
return this._model;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The model the popover is built from — ONE slot with `popover`, because GTK's two
|
|
100
|
+
* setters clear each other (gtkpopoverbin.c:474-500, :543-551). A model REPLACES the
|
|
101
|
+
* popover; a popover DROPS the model, and both notify for both properties.
|
|
102
|
+
*/
|
|
103
|
+
set menuModel(value: AdwMenuInput | AdwMenuModel) {
|
|
104
|
+
this._model = normalizeMenuModel(value as AdwMenuInput);
|
|
105
|
+
assertMenuRenderable(this._model, ADW_MENU_SURFACE_WEB);
|
|
106
|
+
this._adoptPopover(this._buildPopover());
|
|
107
|
+
this._notifyModel();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The popover this bin presents, or `null`.
|
|
112
|
+
*
|
|
113
|
+
* NOT `popover`, which is `GtkPopoverBin`'s GObject name and also `HTMLElement`'s: the
|
|
114
|
+
* DOM's Popover API spells a string attribute `popover`, and shadowing it with a widget
|
|
115
|
+
* would make the element disagree with the platform it sits on. The `Element` suffix is
|
|
116
|
+
* what this package already uses where a GIR name is taken (`childElement` below, and
|
|
117
|
+
* `Adw.NavigationPage`'s own `navigationPage`).
|
|
118
|
+
*/
|
|
119
|
+
get popoverElement(): GtkPopoverMenu | null {
|
|
120
|
+
return this._popover;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
set popoverElement(value: GtkPopoverMenu | null) {
|
|
124
|
+
this._model = [];
|
|
125
|
+
this._adoptPopover(value);
|
|
126
|
+
this._notifyModel();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Whether a right click or a long press opens the popover. GTK's default is FALSE. */
|
|
130
|
+
get handleInput(): boolean {
|
|
131
|
+
return this.hasAttribute('handle-input');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
set handleInput(value: boolean) {
|
|
135
|
+
this.toggleAttribute('handle-input', !!value);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** What the action group publishes about the actions the menu names (ADR 0042). */
|
|
139
|
+
get actions(): AdwMenuActions | null {
|
|
140
|
+
return this._actions;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
set actions(value: AdwMenuActions | null) {
|
|
144
|
+
this._actions = value ?? null;
|
|
145
|
+
if (this._popover !== null) this._popover.actions = this._actions;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
connectedCallback() {
|
|
149
|
+
if (this._initialized) return;
|
|
150
|
+
this._initialized = true;
|
|
151
|
+
// `gtk_widget_class_set_css_name (widget_class, "popoverbin")` (gtkpopoverbin.c:382).
|
|
152
|
+
this.classList.add('adw-popover-bin');
|
|
153
|
+
this.addEventListener('contextmenu', (event) => this._onContextMenu(event));
|
|
154
|
+
this.addEventListener('keydown', (event) => this._onKeyDown(event));
|
|
155
|
+
this._wireGestures();
|
|
156
|
+
if (this._model.length === 0) this._model = this._parseMenuAttr();
|
|
157
|
+
if (this._model.length > 0) this._adoptPopover(this._buildPopover());
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
disconnectedCallback() {
|
|
161
|
+
this._cancelLongPress();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
attributeChangedCallback(name?: string) {
|
|
165
|
+
if (!this._initialized) return;
|
|
166
|
+
if (name === 'handle-input') {
|
|
167
|
+
// `set_handle_input` adds the click gesture, the touch-only long press AND the
|
|
168
|
+
// Menu key shortcut when it turns on, and removes all three when it turns off
|
|
169
|
+
// (gtkpopoverbin.c:624-672). Two of the three are listeners this element owns,
|
|
170
|
+
// so the flag gates them rather than the flag changing anything else.
|
|
171
|
+
if (!this.handleInput) this._cancelLongPress();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (name === 'menu-model') {
|
|
175
|
+
this._model = this._parseMenuAttr();
|
|
176
|
+
this._adoptPopover(this._model.length > 0 ? this._buildPopover() : null);
|
|
177
|
+
this._notifyModel();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** The `menu.popup` action — present the popover. */
|
|
182
|
+
popup(): void {
|
|
183
|
+
this.dispatchEvent(new CustomEvent('menu.popup', { bubbles: true }));
|
|
184
|
+
const popover = this._popover;
|
|
185
|
+
if (popover !== null) popover.open = true;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** Dismiss the popover. */
|
|
189
|
+
popdown(): void {
|
|
190
|
+
this._popover?.popdown();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** The widget whose `.has-open-popup` follows the popover, when the bin has one. */
|
|
194
|
+
get childElement(): HTMLElement | null {
|
|
195
|
+
const first = this.firstElementChild;
|
|
196
|
+
if (first === null || first === this._popover) return null;
|
|
197
|
+
return first as HTMLElement;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// --- the gesture pair (gtkpopoverbin.c:156-189) -----------------------------
|
|
201
|
+
//
|
|
202
|
+
// A plain left click must reach the child, so the handler DENIES everything it does not
|
|
203
|
+
// claim — `gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED)`. In the DOM that
|
|
204
|
+
// is "do nothing": there is no claim to make, and `contextmenu` is a separate event the
|
|
205
|
+
// browser only fires for the gesture GTK's check recognises.
|
|
206
|
+
private _wireGestures(): void {
|
|
207
|
+
this.addEventListener('pointerdown', (event) => {
|
|
208
|
+
if (!this.handleInput || this._popover === null) return;
|
|
209
|
+
// `pressed_cb` only claims when `gdk_event_triggers_context_menu`, which is the
|
|
210
|
+
// SECOND button on Linux and ctrl-click on macOS. In the browser that is the
|
|
211
|
+
// `contextmenu` event below, so here the long press is all that is left.
|
|
212
|
+
this._cancelLongPress();
|
|
213
|
+
if (event.pointerType !== 'touch') return;
|
|
214
|
+
this._longPressTimer = setTimeout(() => {
|
|
215
|
+
this._longPressTimer = null;
|
|
216
|
+
// `long_pressed_cb` claims and pops at the pointer (:178-187).
|
|
217
|
+
this._popupAt(event);
|
|
218
|
+
}, LONG_PRESS_MS);
|
|
219
|
+
});
|
|
220
|
+
this.addEventListener('pointerup', () => this._cancelLongPress());
|
|
221
|
+
this.addEventListener('pointercancel', () => this._cancelLongPress());
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
private _cancelLongPress(): void {
|
|
225
|
+
if (this._longPressTimer === null) return;
|
|
226
|
+
clearTimeout(this._longPressTimer);
|
|
227
|
+
this._longPressTimer = null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
private _onContextMenu(event: Event): void {
|
|
231
|
+
if (!this.handleInput || this._popover === null) return;
|
|
232
|
+
// `gtk_gesture_set_state (…, CLAIMED)` + `gtk_event_controller_reset` (:170-175):
|
|
233
|
+
// the context menu event is consumed here, so the browser's own menu stays away.
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
this._popupAt(event as MouseEvent);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* `popup_at_position` WITH the pointer's coordinates, which is the branch that sets
|
|
240
|
+
* `pointing-to` to `(x, y)` (gtkpopoverbin.c:141-145). `<gtk-popover>` has no
|
|
241
|
+
* `pointing-to` to set — placement is the `position`/`align` pair, the same gap the
|
|
242
|
+
* element's own KNOWN_GAPS records — so the call is the plain `popup()` and what the
|
|
243
|
+
* reader sees is GTK's: the menu under the child.
|
|
244
|
+
*/
|
|
245
|
+
private _popupAt(_event: MouseEvent): void {
|
|
246
|
+
const popover = this._popover;
|
|
247
|
+
if (popover !== null) popover.open = true;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The Menu key, which is the shortcut GTK installs next to the gestures
|
|
252
|
+
* (`gtk_shortcut_trigger_create_for_menu`, gtkpopoverbin.c:643-649). GTK builds the
|
|
253
|
+
* trigger in the platform's canonical form, which a keydown cannot carry, so the
|
|
254
|
+
* un-modified key beside Shift is the whole binding here.
|
|
255
|
+
*/
|
|
256
|
+
private _onKeyDown(event: KeyboardEvent): void {
|
|
257
|
+
if (event.key !== 'ContextMenu' && event.key !== 'F10') return;
|
|
258
|
+
if (event.shiftKey) return;
|
|
259
|
+
if (this._popover === null) return;
|
|
260
|
+
event.preventDefault();
|
|
261
|
+
this.popup();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
private _buildPopover(): GtkPopoverMenu | null {
|
|
265
|
+
if (this._model.length === 0) return null;
|
|
266
|
+
const popover = document.createElement('gtk-popover-menu') as GtkPopoverMenu;
|
|
267
|
+
// `gtk_popover_set_position (popover, GTK_POS_BOTTOM)` in the same function
|
|
268
|
+
// (gtkpopoverbin.c:493), on a popover `gtk_popover_menu_new_from_model` made.
|
|
269
|
+
popover.setAttribute('position', 'bottom');
|
|
270
|
+
popover.setAttribute('align', 'start');
|
|
271
|
+
popover.menuModel = this._model;
|
|
272
|
+
popover.actions = this._actions;
|
|
273
|
+
popover.anchor = this;
|
|
274
|
+
return popover;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* `set_popover` (gtkpopoverbin.c:543-587): hide and unparent the old one, parent the
|
|
279
|
+
* new one, and wire the map/unmap handlers that carry `.has-open-popup` on the child.
|
|
280
|
+
*/
|
|
281
|
+
private _adoptPopover(next: GtkPopoverMenu | null): void {
|
|
282
|
+
const previous = this._popover;
|
|
283
|
+
if (previous !== null && previous !== next) {
|
|
284
|
+
previous.popdown();
|
|
285
|
+
previous.remove();
|
|
286
|
+
}
|
|
287
|
+
this._popover = next;
|
|
288
|
+
const child = this.childElement;
|
|
289
|
+
if (next === null) {
|
|
290
|
+
child?.classList.remove('has-open-popup');
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
next.subscribe((open) => {
|
|
294
|
+
// `on_popover_map` / `on_popover_unmap` (:117-126). The class is what libadwaita
|
|
295
|
+
// styles to say WHICH row opened the popup (`_lists.scss:57`), so it belongs to
|
|
296
|
+
// the child and not to the bin.
|
|
297
|
+
child?.classList.toggle('has-open-popup', open);
|
|
298
|
+
});
|
|
299
|
+
this.appendChild(next);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* `g_object_notify_by_pspec` is called for `:popover` AND `:menu-model` by BOTH setters
|
|
304
|
+
* (gtkpopoverbin.c:502, :586-587), because the two are one slot. One event carrying
|
|
305
|
+
* both is the faithful reading, and the second notify GTK sends separately has no state
|
|
306
|
+
* of its own to report.
|
|
307
|
+
*/
|
|
308
|
+
private _notifyModel(): void {
|
|
309
|
+
this.dispatchEvent(
|
|
310
|
+
new CustomEvent('notify::menu-model', {
|
|
311
|
+
bubbles: true,
|
|
312
|
+
detail: { menuModel: this._model, popover: this._popover },
|
|
313
|
+
}),
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* The `menu-model` ATTRIBUTE through the core parser, refusing a `custom` item the way
|
|
319
|
+
* every menu-bearing surface here does: markup is parsed by the browser, so a throw from
|
|
320
|
+
* `connectedCallback` would reach nobody and the menu would be silently empty.
|
|
321
|
+
*/
|
|
322
|
+
private _parseMenuAttr(): AdwMenuModel {
|
|
323
|
+
const model = normalizeMenuModel(parseMenuModel(this.getAttribute('menu-model')));
|
|
324
|
+
const refusals = menuRefusals(model, ADW_MENU_SURFACE_WEB);
|
|
325
|
+
if (refusals.length === 0) return model;
|
|
326
|
+
console.error(`${ADW_MENU_SURFACE_WEB.name} cannot render this menu, so it has none:`);
|
|
327
|
+
for (const refusal of refusals) console.error(` [${refusal.path.join('.')}] ${refusal.message}`);
|
|
328
|
+
return [];
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
customElements.define('gtk-popover-bin', GtkPopoverBin);
|