@gjsify/adwaita-web 0.53.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adwaita-web.css +8070 -3037
- 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 +43 -21
- 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/source-view/theme.ts +11 -5
- 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,159 @@
|
|
|
1
|
+
import { type AdwCalendarCell, type AdwCalendarDate } from '@gjsify/adwaita-core';
|
|
2
|
+
export declare class GtkCalendar extends HTMLElement {
|
|
3
|
+
private _headerEl;
|
|
4
|
+
private _monthEl;
|
|
5
|
+
private _yearEl;
|
|
6
|
+
private _arrowEls;
|
|
7
|
+
private _gridEl;
|
|
8
|
+
private _dayNameEls;
|
|
9
|
+
private _weekNumberEls;
|
|
10
|
+
private _cellEls;
|
|
11
|
+
private _marked;
|
|
12
|
+
private _date;
|
|
13
|
+
/** `focus_row` / `focus_col` collapsed into one index into the 42 cells, -1 for neither. */
|
|
14
|
+
private _focus;
|
|
15
|
+
private _initialized;
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
/**
|
|
18
|
+
* `GtkCalendar:date` — the selected date as `YYYY-MM-DD`, `GDateTime`'s own ISO form.
|
|
19
|
+
*
|
|
20
|
+
* Unset means TODAY, which is what `gtk_calendar_init` seeds it with
|
|
21
|
+
* (`g_date_time_new_now_local`, gtkcalendar.c:851) — so the getter answers today when no
|
|
22
|
+
* attribute is present, rather than the epoch the C starts from before its first select.
|
|
23
|
+
*/
|
|
24
|
+
get date(): string;
|
|
25
|
+
set date(value: string);
|
|
26
|
+
/** `GtkCalendar:year` — DEPRECATED in 4.20 in favour of `date` (:396-403). */
|
|
27
|
+
get year(): number;
|
|
28
|
+
set year(value: number);
|
|
29
|
+
/**
|
|
30
|
+
* `GtkCalendar:month` — DEPRECATED in 4.20, and 0-11, not 1-12 (:405-417). The one place
|
|
31
|
+
* this element is not in `GDateTime`'s own numbering, and it is the attribute that says so.
|
|
32
|
+
*/
|
|
33
|
+
get month(): number;
|
|
34
|
+
set month(value: number);
|
|
35
|
+
/** `GtkCalendar:day` — DEPRECATED in 4.20 in favour of `date` (:419-428). */
|
|
36
|
+
get day(): number;
|
|
37
|
+
set day(value: number);
|
|
38
|
+
/** Default TRUE (:441-443), so the attribute is the OFF switch. */
|
|
39
|
+
get showHeading(): boolean;
|
|
40
|
+
set showHeading(value: boolean);
|
|
41
|
+
/** Default TRUE (:450-452), read the same way. */
|
|
42
|
+
get showDayNames(): boolean;
|
|
43
|
+
set showDayNames(value: boolean);
|
|
44
|
+
/** Default FALSE (:458-460), read the same way. */
|
|
45
|
+
get showWeekNumbers(): boolean;
|
|
46
|
+
set showWeekNumbers(value: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* Which day the grid's first column is — `calendar->week_start`, PORT-ONLY.
|
|
49
|
+
*
|
|
50
|
+
* The C reads it out of the locale (`_NL_TIME_FIRST_WEEKDAY` plus `_NL_TIME_WEEK_1STDAY`,
|
|
51
|
+
* gtkcalendar.c:700-718) and has no property for it, and this port does the same by
|
|
52
|
+
* default through `Intl.Locale.getWeekInfo()`. The ATTRIBUTE is the addition, and it is
|
|
53
|
+
* what makes a gallery preview reproducible: a grid whose leading blanks follow the
|
|
54
|
+
* machine's locale is a screenshot that differs per reader, and the C's own
|
|
55
|
+
* `calendar:week_start:0` translatable string (gtkcalendar.c:712-719) is the same
|
|
56
|
+
* override upstream.
|
|
57
|
+
*
|
|
58
|
+
* 0 is Sunday and 6 is Saturday — `GDateTime`'s own numbering, so it is the value
|
|
59
|
+
* `calendarDays` subtracts with and the value every vector table carries.
|
|
60
|
+
*/
|
|
61
|
+
get weekStart(): number;
|
|
62
|
+
set weekStart(value: number);
|
|
63
|
+
/** The 31-slot table — `gtk_calendar_get_day_is_marked`, so a mark does not change state. */
|
|
64
|
+
get markedDays(): number[];
|
|
65
|
+
constructor();
|
|
66
|
+
connectedCallback(): void;
|
|
67
|
+
attributeChangedCallback(name?: string): void;
|
|
68
|
+
/** `gtk_calendar_mark_day` (:1650-1666). */
|
|
69
|
+
markDay(day: number): void;
|
|
70
|
+
/** `gtk_calendar_unmark_day` (:1686-1704). */
|
|
71
|
+
unmarkDay(day: number): void;
|
|
72
|
+
/** `gtk_calendar_get_day_is_marked` (:1668-1682). */
|
|
73
|
+
dayIsMarked(day: number): boolean;
|
|
74
|
+
/** `gtk_calendar_clear_marks` (:1589-1613). */
|
|
75
|
+
clearMarks(): void;
|
|
76
|
+
/** The six rows of seven, as the C's `day[row][col]` pair. */
|
|
77
|
+
get cells(): readonly AdwCalendarCell[];
|
|
78
|
+
/** The date every write resolves against. */
|
|
79
|
+
get selectedDate(): AdwCalendarDate;
|
|
80
|
+
private _buildHeader;
|
|
81
|
+
private _buildGrid;
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the attributes into the one date they all name.
|
|
84
|
+
*
|
|
85
|
+
* THE ATTRIBUTE THAT CHANGED WINS, which is the C's own rule:
|
|
86
|
+
* `gtk_calendar_set_year` builds a new `GDateTime` from the same day in the new year and
|
|
87
|
+
* hands it to the same `calendar_select_day_internal` (gtkcalendar.c:860-880), so a write
|
|
88
|
+
* to a deprecated half AFTER a `date` write MOVES the date rather than being ignored for
|
|
89
|
+
* one being on the element. Reading `date` unconditionally would pin the element to its
|
|
90
|
+
* first write.
|
|
91
|
+
*
|
|
92
|
+
* At connect no attribute has "changed" and `date` wins, because it is the one the three
|
|
93
|
+
* halves are deprecated IN FAVOUR of. With none of them the answer is today, which is what
|
|
94
|
+
* `gtk_calendar_init` seeds (:849-851).
|
|
95
|
+
*/
|
|
96
|
+
private _adoptAttributes;
|
|
97
|
+
/**
|
|
98
|
+
* Repaint everything the date decides: the heading, the 42 cells' text and classes, the six
|
|
99
|
+
* week numbers and the four arrows' sensitivity.
|
|
100
|
+
*
|
|
101
|
+
* The cells are NOT rebuilt — the same 42 buttons are reused and re-pointed, so a focus
|
|
102
|
+
* cell and its scroll position survive a month change, which is what `calendar_queue_refresh`
|
|
103
|
+
* gets from the widget layer upstream.
|
|
104
|
+
*/
|
|
105
|
+
private _render;
|
|
106
|
+
/**
|
|
107
|
+
* The six week numbers — `week_of_year` of the LAST cell of each row, which is the C's own
|
|
108
|
+
* rule (gtkcalendar.c:1143-1165): the row's week is the week its Sunday-through-Saturday
|
|
109
|
+
* run belongs to, and the row's last cell is its Saturday.
|
|
110
|
+
*/
|
|
111
|
+
private _paintWeekNumbers;
|
|
112
|
+
/** The per-cell state flags `calendar_update_day_labels` raises (:979-1053). */
|
|
113
|
+
private _paintStates;
|
|
114
|
+
/** `calendar_update_navigation_buttons` (:1055-1084). */
|
|
115
|
+
private _paintArrows;
|
|
116
|
+
private _paintDayNames;
|
|
117
|
+
/**
|
|
118
|
+
* `show_heading`, `show_day_names` and `show_week_numbers` — the three visibility flags
|
|
119
|
+
* `gtk_calendar_init` and the setters flip (gtkcalendar.c:815-816, :1690-1700,
|
|
120
|
+
* :1756-1762). One of them hides the whole header BOX and the other two a row of labels,
|
|
121
|
+
* which is why they are one method rather than three writes.
|
|
122
|
+
*/
|
|
123
|
+
private _paintVisibility;
|
|
124
|
+
private _onArrow;
|
|
125
|
+
/**
|
|
126
|
+
* `calendar_set_month_prev` and its three siblings: step the date, select it WITHOUT
|
|
127
|
+
* `emit_day_signal`, then emit the arrow's own signal (:868-919).
|
|
128
|
+
*/
|
|
129
|
+
private _navigate;
|
|
130
|
+
/**
|
|
131
|
+
* The C's tail, line for line (:1169-1190): `::day-selected` and the `day` notify INSIDE
|
|
132
|
+
* `if (day_changed)`, the `month` and `year` notifies each inside its own, and `date`
|
|
133
|
+
* unconditionally — because the function that got here changed something.
|
|
134
|
+
*/
|
|
135
|
+
private _emitDaySelected;
|
|
136
|
+
/**
|
|
137
|
+
* A click on a cell — `calendar_select_and_focus_day` reached from
|
|
138
|
+
* `gtk_calendar_button_press` (:1311-1353).
|
|
139
|
+
*
|
|
140
|
+
* A cell from another month PAGES first: that is the `MONTH_PREV` / `MONTH_NEXT` branch of
|
|
141
|
+
* the Space handler (:1521-1534), and a click lands on the same cell either way.
|
|
142
|
+
*/
|
|
143
|
+
private _onCellClick;
|
|
144
|
+
/**
|
|
145
|
+
* `calendar_select_and_focus_day` (:1195-1213) — the date, WITH `::day-selected`, and the
|
|
146
|
+
* cursor on it.
|
|
147
|
+
*/
|
|
148
|
+
private _selectDate;
|
|
149
|
+
/**
|
|
150
|
+
* The key table: arrows move the cursor (`move_focus`, :1386-1452) and Space selects the
|
|
151
|
+
* cell it is on; `Ctrl` with any arrow is the MONTH and YEAR walk (:1454-1534).
|
|
152
|
+
*/
|
|
153
|
+
private _onKeyDown;
|
|
154
|
+
/**
|
|
155
|
+
* `move_focus` (:1386-1452) over the 6x7 grid, wrapping at the edges exactly as the C does
|
|
156
|
+
* (`focus_row < 0 → 5`, `focus_col < 0 → 6`).
|
|
157
|
+
*/
|
|
158
|
+
private _moveFocus;
|
|
159
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** `Gtk.BaselinePosition`'s three nicks, in the order GTK measures them (gtkcenterbox.c:267-271). */
|
|
2
|
+
declare const BASELINE_POSITIONS: {
|
|
3
|
+
readonly top: 0;
|
|
4
|
+
readonly center: 0.5;
|
|
5
|
+
readonly bottom: 1;
|
|
6
|
+
};
|
|
7
|
+
export type BaselinePosition = keyof typeof BASELINE_POSITIONS;
|
|
8
|
+
export declare class GtkCenterBox extends HTMLElement {
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
/**
|
|
11
|
+
* `Gtk.CenterBox:baseline-position` — `top`, `center` (the pspec default) or `bottom`.
|
|
12
|
+
* An unknown nick is the default, the same answer an enum nick GTK does not know gets.
|
|
13
|
+
*/
|
|
14
|
+
get baselinePosition(): BaselinePosition;
|
|
15
|
+
set baselinePosition(value: BaselinePosition);
|
|
16
|
+
/**
|
|
17
|
+
* `Gtk.CenterBox:shrink-center-last` — TRUE (the pspec default, gtkcenterbox.c:330-333)
|
|
18
|
+
* shrinks the start and end children before the centre; FALSE shrinks the centre first.
|
|
19
|
+
* The default is the AFFIRMATIVE one, so it is the ABSENCE of the attribute — a bare
|
|
20
|
+
* `<gtk-center-box>` is a TRUE box, and `shrink-center-last="false"` is what turns it off.
|
|
21
|
+
*/
|
|
22
|
+
get shrinkCenterLast(): boolean;
|
|
23
|
+
set shrinkCenterLast(value: boolean);
|
|
24
|
+
/** `Gtk.CenterBox:start-widget` — the child pinned to the start. */
|
|
25
|
+
get startWidget(): HTMLElement | null;
|
|
26
|
+
set startWidget(value: HTMLElement | null);
|
|
27
|
+
/** `Gtk.CenterBox:center-widget` — the child that takes the space between the other two. */
|
|
28
|
+
get centerWidget(): HTMLElement | null;
|
|
29
|
+
set centerWidget(value: HTMLElement | null);
|
|
30
|
+
/** `Gtk.CenterBox:end-widget` — the child pinned to the end. */
|
|
31
|
+
get endWidget(): HTMLElement | null;
|
|
32
|
+
set endWidget(value: HTMLElement | null);
|
|
33
|
+
connectedCallback(): void;
|
|
34
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
35
|
+
private _normalized;
|
|
36
|
+
private _assign;
|
|
37
|
+
private _sync;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** A `GdkRGBA` — the four channels of `GtkColorDialogButton:rgba`, each 0…1. */
|
|
2
|
+
export interface GdkRgbaValue {
|
|
3
|
+
red: number;
|
|
4
|
+
green: number;
|
|
5
|
+
blue: number;
|
|
6
|
+
alpha: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `GtkColorDialog`'s three parameters, under the property names. `filter` and `font-map`
|
|
10
|
+
* are font dialog's; the colour one holds exactly these.
|
|
11
|
+
*/
|
|
12
|
+
export interface ColorDialogParameters {
|
|
13
|
+
/** Whether the chooser is modal. Default `TRUE`, as in the GIR. */
|
|
14
|
+
modal?: boolean;
|
|
15
|
+
/** The chooser's title. Default `null`. */
|
|
16
|
+
title?: string | null;
|
|
17
|
+
/** Whether colours may carry alpha. Default `TRUE`, as in the GIR. */
|
|
18
|
+
withAlpha?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class GtkColorDialogButton extends HTMLElement {
|
|
21
|
+
private _buttonEl;
|
|
22
|
+
private _swatchEl;
|
|
23
|
+
private _inputEl;
|
|
24
|
+
private _dialog;
|
|
25
|
+
private _rgba;
|
|
26
|
+
/** `self->cancellable != NULL` — a chooser run is in progress (:396-419). */
|
|
27
|
+
private _pending;
|
|
28
|
+
private _initialized;
|
|
29
|
+
static get observedAttributes(): string[];
|
|
30
|
+
/** `GtkColorDialogButton:rgba` — the selected colour. */
|
|
31
|
+
get rgba(): GdkRgbaValue;
|
|
32
|
+
set rgba(value: string | GdkRgbaValue);
|
|
33
|
+
/** `GtkColorDialogButton:dialog` — the chooser this button opens, or `null` for none. */
|
|
34
|
+
get dialog(): ColorDialogParameters | null;
|
|
35
|
+
set dialog(value: ColorDialogParameters | null);
|
|
36
|
+
connectedCallback(): void;
|
|
37
|
+
attributeChangedCallback(name?: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* The `::activate` action signal (:283-296), which `activated()` binds straight to
|
|
40
|
+
* `gtk_widget_activate (self->button)` (:378-382): pressing the button and activating
|
|
41
|
+
* the widget are the same thing, and both pop the chooser.
|
|
42
|
+
*/
|
|
43
|
+
activate(): void;
|
|
44
|
+
/** `button_clicked` (:394-419) — the whole run, and it is one guard deep. */
|
|
45
|
+
private _choose;
|
|
46
|
+
/** `update_button_sensitivity` (:380-391), with the run guard explained in the header. */
|
|
47
|
+
private _renderSensitivity;
|
|
48
|
+
private _renderSwatch;
|
|
49
|
+
}
|
|
50
|
+
/** `gdk_rgba_equal` — four exact comparisons, so a write of the same colour is not one. */
|
|
51
|
+
export declare function rgbaEqual(a: GdkRgbaValue, b: GdkRgbaValue): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* `scale_round` (:329-333) — `floor (value * scale + 0.5)`, clamped into 0…scale.
|
|
54
|
+
*/
|
|
55
|
+
export declare function scaleRound(value: number, scale: number): number;
|
|
56
|
+
/** `accessible_color_name` (:334-347), with the Alpha clause only while it is translucent. */
|
|
57
|
+
export declare function describeColor(color: GdkRgbaValue): string;
|
|
58
|
+
/** `#rrggbb` for an opaque colour and `rgba(...)` for a translucent one — the two an author writes. */
|
|
59
|
+
export declare function formatHex(color: GdkRgbaValue): string;
|
|
60
|
+
/**
|
|
61
|
+
* Any CSS colour the browser understands → a `GdkRGBA`.
|
|
62
|
+
*
|
|
63
|
+
* The PARSE IS THE BROWSER'S, through CSSOM: an unrecognised value leaves
|
|
64
|
+
* `style.color` empty, and a recognised one comes back normalised to `rgb()`/`rgba()`.
|
|
65
|
+
* That is why `#abc`, `hsl()`, `color-mix()` and a named colour all work here without a
|
|
66
|
+
* second parser — and why the one thing that cannot be parsed is refused rather than
|
|
67
|
+
* guessed at, which is what the C's `G_IS_VALUE`/`gdk_rgba_parse` pair does.
|
|
68
|
+
*/
|
|
69
|
+
export declare function parseCssColor(value: string): GdkRgbaValue | null;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type AdwColumnViewColumn, type AdwColumnViewSort, type AdwListItemFactory } from '@gjsify/adwaita-core';
|
|
2
|
+
import { GtkListView } from './gtk-list-view.js';
|
|
3
|
+
/** A per-column renderer — `Gtk.ColumnViewColumn:factory`, keyed by the column's id. */
|
|
4
|
+
export type GtkColumnViewFactories = Readonly<Record<string, AdwListItemFactory<Node>>>;
|
|
5
|
+
export declare class GtkColumnView extends GtkListView {
|
|
6
|
+
private _headerEl;
|
|
7
|
+
private _columns;
|
|
8
|
+
private _factories;
|
|
9
|
+
private _sorter;
|
|
10
|
+
private _dragged;
|
|
11
|
+
static get observedAttributes(): string[];
|
|
12
|
+
/** `Gtk.ColumnView:columns`, as descriptors rather than as a read-only `Gio.ListModel`. */
|
|
13
|
+
get columns(): AdwColumnViewColumn[];
|
|
14
|
+
set columns(value: readonly AdwColumnViewColumn[] | null);
|
|
15
|
+
/** Per-column factories, keyed by `Gtk.ColumnViewColumn:id`. */
|
|
16
|
+
get columnFactories(): GtkColumnViewFactories;
|
|
17
|
+
set columnFactories(value: GtkColumnViewFactories | null);
|
|
18
|
+
/** `gtk_column_view_get_sorter`'s state — which column, which direction. */
|
|
19
|
+
get sorter(): AdwColumnViewSort | null;
|
|
20
|
+
set sorter(value: AdwColumnViewSort | null);
|
|
21
|
+
get showRowSeparators(): boolean;
|
|
22
|
+
set showRowSeparators(value: boolean);
|
|
23
|
+
get showColumnSeparators(): boolean;
|
|
24
|
+
set showColumnSeparators(value: boolean);
|
|
25
|
+
get reorderable(): boolean;
|
|
26
|
+
set reorderable(value: boolean);
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
attributeChangedCallback(name?: string): void;
|
|
29
|
+
protected _applyAttributes(): void;
|
|
30
|
+
protected get _viewClass(): string;
|
|
31
|
+
protected get _rowClass(): string;
|
|
32
|
+
protected _createRow(position: number): HTMLElement | null;
|
|
33
|
+
/** One `cell`: the column's own factory, or the portable field its `key` names. */
|
|
34
|
+
private _createCell;
|
|
35
|
+
/** The header row — one button per visible column, with its sort indicator. */
|
|
36
|
+
private _renderHeader;
|
|
37
|
+
private _createHeaderCell;
|
|
38
|
+
/**
|
|
39
|
+
* Column reordering by dragging a header — `Gtk.ColumnView:reorderable`.
|
|
40
|
+
*
|
|
41
|
+
* The HTML drag-and-drop events rather than a pointer drag, because the header is a
|
|
42
|
+
* `<button>` and a pointer drag would have to suppress its own click; `draggable`
|
|
43
|
+
* suppresses it for us, which is also what keeps a drag from sorting the column it
|
|
44
|
+
* started on.
|
|
45
|
+
*/
|
|
46
|
+
private _makeDraggable;
|
|
47
|
+
private _applySorter;
|
|
48
|
+
/** One track list for the header and every row, so the two cannot fall out of step. */
|
|
49
|
+
private _applyTracks;
|
|
50
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** The `rgba()` string a `GdkRGBA` value paints, as the colour swatch shows it. */
|
|
2
|
+
interface Rgba {
|
|
3
|
+
readonly red: number;
|
|
4
|
+
readonly green: number;
|
|
5
|
+
readonly blue: number;
|
|
6
|
+
readonly alpha?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class GtkDragIcon extends HTMLElement {
|
|
9
|
+
private _pointerX;
|
|
10
|
+
private _pointerY;
|
|
11
|
+
private _dragging;
|
|
12
|
+
/** The document listeners, released the moment the drag ends (see `_begin`). */
|
|
13
|
+
private _onDragOver;
|
|
14
|
+
private _onDragEnd;
|
|
15
|
+
/** The drag this icon is for: GTK destroys the icon when THAT drag ends (:57-58). */
|
|
16
|
+
private _transfer;
|
|
17
|
+
static get observedAttributes(): any[];
|
|
18
|
+
/**
|
|
19
|
+
* `gtk_drag_icon_get_for_drag` (:392-421), for a browser drag: the icon in use, or a
|
|
20
|
+
* new one. A declared `<gtk-drag-icon>` this drag can have is that one — see the header
|
|
21
|
+
* for when it cannot.
|
|
22
|
+
*/
|
|
23
|
+
static getForDrag(event: DragEvent): GtkDragIcon;
|
|
24
|
+
/**
|
|
25
|
+
* `gtk_drag_icon_create_widget_for_value` (:529-556): the widget a drag shows for a
|
|
26
|
+
* value. The C answers for SIX types — a string is a `GtkLabel` (:531-534), a
|
|
27
|
+
* `GDK_TYPE_PAINTABLE` and a `G_TYPE_FILE` are `GtkImage`s with the `large-icons`
|
|
28
|
+
* class (:535-543, :554-573), a `GdkRGBA` is a `GtkColorSwatch` (:544-553), a
|
|
29
|
+
* `GtkTextBuffer` is a `GtkPicture` of its selection and a `GSK_TYPE_RENDER_NODE` an
|
|
30
|
+
* image of its bounds (:574-602) — and returns `NULL` for anything else (:603-605).
|
|
31
|
+
*
|
|
32
|
+
* TWO OF THE SIX HAVE AN ANSWER HERE, and the other four are NAMED rather than
|
|
33
|
+
* quietly folded into the `null`: a paintable and a file are a picture an icon theme
|
|
34
|
+
* picks, which a browser has no query for (`g_file_query_info (… "standard::icon")`
|
|
35
|
+
* is a file-system answer), and a text buffer's drag icon is a PAINTED selection
|
|
36
|
+
* (`gtk_text_util_create_rich_drag_icon`) that this package has no text view to take
|
|
37
|
+
* one from. `null` for those is the C's own answer for a value it cannot make a
|
|
38
|
+
* widget for, so the return type still means what it means in the C.
|
|
39
|
+
*
|
|
40
|
+
* The swatch is a painted div rather than a `<gtk-color-swatch>`: this package ships no
|
|
41
|
+
* colour-swatch element, and for a drag icon the swatch is nothing but the colour it
|
|
42
|
+
* carries — `set_can_drag`/`set_can_drop` FALSE (:546-547), so it takes no input and
|
|
43
|
+
* accepts none.
|
|
44
|
+
*/
|
|
45
|
+
static createWidgetForValue(value: string | Rgba | null): Element | null;
|
|
46
|
+
/**
|
|
47
|
+
* `GtkDragIcon:child` — the widget displayed as the drag icon, `null` until set. GTK's
|
|
48
|
+
* setter unparents the old child, parents the new one and notifies (:468-490); the
|
|
49
|
+
* getter here is the light-DOM child, so an icon declared in markup with content needs
|
|
50
|
+
* no imperative call at all.
|
|
51
|
+
*/
|
|
52
|
+
get child(): Element | null;
|
|
53
|
+
set child(node: Element | null);
|
|
54
|
+
/** `set_child` + `show` — the shape a drag source actually uses. */
|
|
55
|
+
setChild(node: Element | null): void;
|
|
56
|
+
connectedCallback(): void;
|
|
57
|
+
disconnectedCallback(): void;
|
|
58
|
+
/**
|
|
59
|
+
* The drag has begun. The platform's own ghost is asked away with a transparent image,
|
|
60
|
+
* and from here the icon follows the pointer — `gtk_drag_icon_move_resize` (:138-150)
|
|
61
|
+
* on every `dragover`, which is the one event a browser delivers continuously while a
|
|
62
|
+
* drag is in flight.
|
|
63
|
+
*/
|
|
64
|
+
beginDrag(event: DragEvent): void;
|
|
65
|
+
/** The drag ended: GTK destroys the icon, and this hides it instead. */
|
|
66
|
+
endDrag(): void;
|
|
67
|
+
/** Whether a drag is in flight — the C's mapped flag, and what `hidden` answers to. */
|
|
68
|
+
get dragging(): boolean;
|
|
69
|
+
private _observe;
|
|
70
|
+
private _unobserve;
|
|
71
|
+
/**
|
|
72
|
+
* `gtk_drag_icon_move_resize` (:138-150): the icon is moved to the pointer. Fixed
|
|
73
|
+
* positioning plus a transform is the one CSS door into the top layer a page has, and
|
|
74
|
+
* the hotspot is `(0, 0)` — see the header for why.
|
|
75
|
+
*/
|
|
76
|
+
private _render;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `GtkDrawingAreaDrawFunc` with the `user_data` / `destroy` pair dropped — see the header.
|
|
3
|
+
*
|
|
4
|
+
* @param area the drawing area being painted, as the C's first argument
|
|
5
|
+
* @param cr a 2D context over the whole allocation, in logical pixels
|
|
6
|
+
* @param width the width of the allocation — NOT of `content-width`
|
|
7
|
+
* @param height the height of the allocation — NOT of `content-height`
|
|
8
|
+
*/
|
|
9
|
+
export type GtkDrawingAreaDrawFunc = (area: GtkDrawingArea, cr: CanvasRenderingContext2D, width: number, height: number) => void;
|
|
10
|
+
export declare class GtkDrawingArea extends HTMLElement {
|
|
11
|
+
private _canvas;
|
|
12
|
+
private _context;
|
|
13
|
+
private _initialized;
|
|
14
|
+
private _drawFunc;
|
|
15
|
+
/** The last allocation the draw function was called with, as `::resize` sees it. */
|
|
16
|
+
private _width;
|
|
17
|
+
private _height;
|
|
18
|
+
/** The last device pixel ratio the backing store was built for. */
|
|
19
|
+
private _scale;
|
|
20
|
+
private _resize;
|
|
21
|
+
private _frame;
|
|
22
|
+
static get observedAttributes(): string[];
|
|
23
|
+
/** `Gtk.DrawingArea:content-width` — the minimum AND natural width. Defaults to 0. */
|
|
24
|
+
get contentWidth(): number;
|
|
25
|
+
set contentWidth(v: number);
|
|
26
|
+
/** `Gtk.DrawingArea:content-height` — the minimum AND natural height. Defaults to 0. */
|
|
27
|
+
get contentHeight(): number;
|
|
28
|
+
set contentHeight(v: number);
|
|
29
|
+
/**
|
|
30
|
+
* Every GObject setter here returns early when the value is already right
|
|
31
|
+
* (gtkdrawingarea.c:373, :423), while `setAttribute` runs the reaction for a write
|
|
32
|
+
* that changes nothing — so the guard that makes "notify only on a real change" true
|
|
33
|
+
* for the numeric half is the same one `<gtk-level-bar>` uses.
|
|
34
|
+
*/
|
|
35
|
+
private _write;
|
|
36
|
+
/** `GtkDrawingAreaDrawFunc`, or `null` — GTK's default, which paints nothing (:251). */
|
|
37
|
+
get drawFunc(): GtkDrawingAreaDrawFunc | null;
|
|
38
|
+
set drawFunc(fn: GtkDrawingAreaDrawFunc | null);
|
|
39
|
+
/**
|
|
40
|
+
* `gtk_drawing_area_set_draw_func` (gtkdrawingarea.c:474-491): store the function and
|
|
41
|
+
* `queue_draw`, which is what repaints. Passing `null` clears it, and the next
|
|
42
|
+
* snapshot leaves the widget blank — the C's early return at :251.
|
|
43
|
+
*/
|
|
44
|
+
setDrawFunc(fn: GtkDrawingAreaDrawFunc | null): void;
|
|
45
|
+
/**
|
|
46
|
+
* `gtk_widget_queue_draw` on this widget: the documented way to ask for the draw
|
|
47
|
+
* function to be called again (gtkdrawingarea.c:127-129).
|
|
48
|
+
*
|
|
49
|
+
* AND WHY IT IS NOT IMMEDIATE. `queue_draw` marks the window dirty and the frame clock
|
|
50
|
+
* draws it on the next frame, so a draw function that calls `queue_draw` keeps
|
|
51
|
+
* ANIMATING rather than recursing — and a 2D canvas drawn synchronously would turn the
|
|
52
|
+
* same application into a stack overflow. One animation frame is the browser's frame
|
|
53
|
+
* clock, and coalescing through it is what makes "paint from the function" a loop and
|
|
54
|
+
* not a crash. Several requests before the frame are one frame, as in the C.
|
|
55
|
+
*/
|
|
56
|
+
queueDraw(): void;
|
|
57
|
+
connectedCallback(): void;
|
|
58
|
+
disconnectedCallback(): void;
|
|
59
|
+
attributeChangedCallback(name: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* `measure` returns one number per axis as the minimum AND the natural size
|
|
62
|
+
* (gtkdrawingarea.c:210-231), and CSS has a property for each half — so the element
|
|
63
|
+
* publishes the number once and `_drawing.scss` reads it twice. A zero removes the
|
|
64
|
+
* property rather than declaring `0px`, because `var(--adw-drawing-width, auto)` is
|
|
65
|
+
* how "no intrinsic size" is spelled.
|
|
66
|
+
*/
|
|
67
|
+
private _publishSize;
|
|
68
|
+
private _observe;
|
|
69
|
+
/**
|
|
70
|
+
* `gtk_drawing_area_size_allocate` (:233-238) emits `::resize` and does nothing else —
|
|
71
|
+
* the signal IS the allocation path. The browser learns the allocation from the
|
|
72
|
+
* observer instead, so the signal is emitted from here, and only when the allocation
|
|
73
|
+
* really changed: GTK reaches `size_allocate` on every layout pass, and the signal
|
|
74
|
+
* is documented as firing "each time the widget is changed" (:312-314).
|
|
75
|
+
*/
|
|
76
|
+
private _allocated;
|
|
77
|
+
/**
|
|
78
|
+
* One frame. `gtk_drawing_area_snapshot` (:240-267) measures the ALLOCATION, not the
|
|
79
|
+
* properties, and calls the function with it; the browser gets the allocation from the
|
|
80
|
+
* observer instead of from the snapshot, and the drawing itself is the 2D context the
|
|
81
|
+
* canvas already owns.
|
|
82
|
+
*/
|
|
83
|
+
private _draw;
|
|
84
|
+
/** The backing store is rebuilt when the display's ratio changes, not every frame. */
|
|
85
|
+
private _devicePixelRatio;
|
|
86
|
+
/** The `notify::` detail for `name`: the PROPERTY, parsed, not the raw attribute. */
|
|
87
|
+
private _notify;
|
|
88
|
+
/** The last allocation, as `::resize` reported it — the spec reads it back. */
|
|
89
|
+
get allocation(): {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
};
|
|
93
|
+
/** The ratio the backing store was built at, as the header describes. */
|
|
94
|
+
get pixelScale(): number;
|
|
95
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare class GtkEditableLabel extends HTMLElement {
|
|
2
|
+
private _label;
|
|
3
|
+
private _entry;
|
|
4
|
+
private _initialized;
|
|
5
|
+
private _grace;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
/** `Gtk.Editable:text` — what the label shows, which is the committed draft. */
|
|
8
|
+
get text(): string;
|
|
9
|
+
set text(value: string);
|
|
10
|
+
/** `Gtk.Editable:editable` — defaults TRUE. FALSE refuses to start editing. */
|
|
11
|
+
get editable(): boolean;
|
|
12
|
+
set editable(value: boolean);
|
|
13
|
+
/**
|
|
14
|
+
* `GtkEditableLabel:editing` — TRUE while the entry is the stack's visible child, so it
|
|
15
|
+
* is the ATTRIBUTE as on every other boolean here. Setting it is what starts or stops
|
|
16
|
+
* editing, because the C's property setter does exactly that (gtkeditablelabel.c:406-411).
|
|
17
|
+
*/
|
|
18
|
+
get editing(): boolean;
|
|
19
|
+
set editing(value: boolean);
|
|
20
|
+
/** `gtk_editable_label_start_editing` — refused while `editable` is FALSE, as in the C. */
|
|
21
|
+
startEditing(): void;
|
|
22
|
+
/**
|
|
23
|
+
* `gtk_editable_label_stop_editing` — `commit` decides whether the drafted text becomes
|
|
24
|
+
* the label's; FALSE resets the entry to the label instead (gtkeditablelabel.c:637-656).
|
|
25
|
+
*/
|
|
26
|
+
stopEditing(commit?: boolean): void;
|
|
27
|
+
/** The inner native entry, for focus and selection. */
|
|
28
|
+
get entry(): HTMLInputElement;
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
32
|
+
private _render;
|
|
33
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type EmojiEntry } from '../emoji-data.js';
|
|
2
|
+
import { GtkPopover } from './gtk-popover.js';
|
|
3
|
+
export declare class GtkEmojiChooser extends GtkPopover {
|
|
4
|
+
private _built;
|
|
5
|
+
private _entry;
|
|
6
|
+
private _listEl;
|
|
7
|
+
private _emptyEl;
|
|
8
|
+
private _sections;
|
|
9
|
+
/** The entry a button was built from — `emoji-data` has no reverse lookup. */
|
|
10
|
+
private _entryOf;
|
|
11
|
+
/** `recently-used-emoji` — the GSettings key, held in memory here (see the header). */
|
|
12
|
+
private _recent;
|
|
13
|
+
/**
|
|
14
|
+
* The Ctrl state `should_close` reads off the keyboard (:433-448). A DOM event's
|
|
15
|
+
* `ctrlKey` says what the key that caused IT was, and a `click` synthesised from a
|
|
16
|
+
* keyboard activation carries no modifier at all, so the state is tracked from the key
|
|
17
|
+
* events themselves — which is what `gdk_device_get_modifier_state` answers.
|
|
18
|
+
*/
|
|
19
|
+
private _ctrl;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
/** The emoji picked most recently, newest first — what `recently-used-emoji` holds. */
|
|
22
|
+
get recentEmoji(): EmojiEntry[];
|
|
23
|
+
/**
|
|
24
|
+
* Pick an entry the flow box's `child-activated` would have delivered — which is what
|
|
25
|
+
* a consumer inserting an emoji from elsewhere needs, and what a test drives the recents
|
|
26
|
+
* with. `fromRecent` is `emoji_activated`'s own half of the recent check: an entry
|
|
27
|
+
* picked out of the recent list is not recorded a second time.
|
|
28
|
+
*/
|
|
29
|
+
pick(entry: EmojiEntry, fromRecent?: boolean): void;
|
|
30
|
+
/** The `.emoji-searchbar` box: the magnifying glyph and the search entry. */
|
|
31
|
+
private _buildSearchbar;
|
|
32
|
+
/** The `empty` stack page: the big glyph and the two lines under it. */
|
|
33
|
+
private _buildEmptyPage;
|
|
34
|
+
/** One flow box per category, each under its own heading label. */
|
|
35
|
+
private _buildSections;
|
|
36
|
+
/**
|
|
37
|
+
* The toolbar: one `.emoji-section` button per section, recent FIRST (the struct
|
|
38
|
+
* order), each with its own symbolic and the `.ui`'s tooltip.
|
|
39
|
+
*
|
|
40
|
+
* The icons are written out one call per section rather than looked up from a table:
|
|
41
|
+
* each name is USED there, which is what makes it a name this stylesheet has to be
|
|
42
|
+
* able to draw — `scripts/check-adwaita-icon-masks.mjs` reads exactly that.
|
|
43
|
+
*/
|
|
44
|
+
private _buildToolbar;
|
|
45
|
+
/** `button.image-button.emoji-section` — flat, circular, 32px, with a tooltip. */
|
|
46
|
+
private _sectionButton;
|
|
47
|
+
/**
|
|
48
|
+
* One emoji: a `<button>` holding the glyph at `PANGO_SCALE_X_LARGE`, labelled with
|
|
49
|
+
* the English name — the name the search reads, so it is the accessible name too.
|
|
50
|
+
*/
|
|
51
|
+
private _emojiButton;
|
|
52
|
+
/** `filter_func` + `match_tokens`: EVERY term must be a PREFIX of a token of the name
|
|
53
|
+
* or of one of the keywords. `g_str_tokenize_and_fold` case-folds, hence lower-casing
|
|
54
|
+
* both sides. */
|
|
55
|
+
private _matches;
|
|
56
|
+
/** `search_changed` — invalidate every section, then `update_headings`. */
|
|
57
|
+
private _filter;
|
|
58
|
+
/** `emoji_activated` — emit, remember, and pop down unless Ctrl is held. */
|
|
59
|
+
private _activate;
|
|
60
|
+
/** `add_recent_item` (:390) — newest first, no duplicates, at most `MAX_RECENT`. */
|
|
61
|
+
private _remember;
|
|
62
|
+
/** `populate_recent_section` (:366-388): the list, its visibility and its button. */
|
|
63
|
+
private _renderRecents;
|
|
64
|
+
/**
|
|
65
|
+
* `show_variations` (:508-548): the plain form and the five skin tones
|
|
66
|
+
* (`add_emoji (box, FALSE, emoji_data, 0, …)` then `1F3FB`…`1F3FF`), in a popover over
|
|
67
|
+
* the emoji — and only for an emoji that HAS them, which is `has_variations` (:489).
|
|
68
|
+
*/
|
|
69
|
+
private _showVariations;
|
|
70
|
+
private _closeVariations;
|
|
71
|
+
/** `scroll_to_section` (:312-330) — to the heading, minus `BOX_SPACE`. */
|
|
72
|
+
private _scrollTo;
|
|
73
|
+
/** `gtk_emoji_chooser_scroll_section` (:1198) — Ctrl+N / Ctrl+P over the visible ones. */
|
|
74
|
+
private _scrollSection;
|
|
75
|
+
/** `activate_search` (:1019) — the first result of the first non-empty section. */
|
|
76
|
+
private _activateFirstResult;
|
|
77
|
+
/**
|
|
78
|
+
* `adj_value_changed` (:814-870): the section the scroll position is INSIDE is the
|
|
79
|
+
* checked one, so the toolbar follows the list without any interaction of its own.
|
|
80
|
+
*/
|
|
81
|
+
private _sectionAt;
|
|
82
|
+
private _currentSection;
|
|
83
|
+
private _markSection;
|
|
84
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export declare class GtkEntry extends HTMLElement {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `protected`, not `private`: `GtkPasswordEntry` and `GtkSearchEntry` subclass this
|
|
4
|
+
* element and restyle or wrap the very input it builds (the password field's Caps Lock
|
|
5
|
+
* and peek listeners, the search field's leading icon and trailing clear button), so the
|
|
6
|
+
* inner node is theirs to reach as well as this class's.
|
|
7
|
+
*/
|
|
8
|
+
protected _input: HTMLInputElement;
|
|
3
9
|
private _initialized;
|
|
4
10
|
private _maxLength;
|
|
5
11
|
static get observedAttributes(): string[];
|
|
@@ -10,8 +16,21 @@ export declare class GtkEntry extends HTMLElement {
|
|
|
10
16
|
set maxLength(value: number);
|
|
11
17
|
/** `Gtk.Entry:text-length` — code points, not UTF-16 units. */
|
|
12
18
|
get textLength(): number;
|
|
19
|
+
/**
|
|
20
|
+
* `Gtk.Entry:placeholder-text`, the name a Blueprint file and the gallery trees use.
|
|
21
|
+
* `placeholder` stays for markup written before the GTK spelling was read.
|
|
22
|
+
*/
|
|
23
|
+
private placeholderAttribute;
|
|
24
|
+
/** `Gtk.Widget:width-request` — a minimum width in px; -1 or absent leaves the natural one. */
|
|
25
|
+
private applyWidthRequest;
|
|
13
26
|
/** The inner native input (for focus/selection). */
|
|
14
27
|
get input(): HTMLInputElement;
|
|
15
28
|
connectedCallback(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Declared so a subclass can override it and still reach the base: the custom-element
|
|
31
|
+
* lifecycle hooks a subclass chains (`super.disconnectedCallback()`) have to exist on
|
|
32
|
+
* the class it extends, and `GtkSearchEntry` drops its pending search timeout here.
|
|
33
|
+
*/
|
|
34
|
+
disconnectedCallback(): void;
|
|
16
35
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
17
36
|
}
|