@gjsify/adwaita-web 0.64.1 → 0.64.2-next.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -88
- package/dist/adwaita-web.css +91 -12
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/accessible.d.ts +8 -0
- package/lib/types/application.d.ts +1 -1
- package/lib/types/child-slot.spec.d.ts +1 -0
- package/lib/types/compute-expand.d.ts +5 -0
- package/lib/types/compute-expand.spec.d.ts +1 -0
- package/lib/types/container-fill.spec.d.ts +1 -0
- package/lib/types/elements/adw-about-dialog.d.ts +28 -1
- package/lib/types/elements/adw-action-row.d.ts +2 -1
- package/lib/types/elements/adw-alert-dialog.d.ts +80 -19
- package/lib/types/elements/adw-avatar.d.ts +2 -1
- package/lib/types/elements/adw-banner.d.ts +2 -1
- package/lib/types/elements/adw-bin.d.ts +2 -1
- package/lib/types/elements/adw-bottom-sheet.d.ts +5 -4
- package/lib/types/elements/adw-breakpoint-bin.d.ts +2 -1
- package/lib/types/elements/adw-button-content.d.ts +2 -1
- package/lib/types/elements/adw-button-row.d.ts +2 -1
- package/lib/types/elements/adw-card.d.ts +2 -1
- package/lib/types/elements/adw-carousel.d.ts +20 -3
- package/lib/types/elements/adw-clamp-scrollable.d.ts +2 -1
- package/lib/types/elements/adw-clamp.d.ts +2 -1
- package/lib/types/elements/adw-combo-row.d.ts +6 -1
- package/lib/types/elements/adw-data-grid.d.ts +2 -1
- package/lib/types/elements/adw-dialog.d.ts +2 -1
- package/lib/types/elements/adw-entry-row.d.ts +2 -1
- package/lib/types/elements/adw-expander-row.d.ts +2 -1
- package/lib/types/elements/adw-header-bar.d.ts +2 -1
- package/lib/types/elements/adw-inline-view-switcher.d.ts +3 -2
- package/lib/types/elements/adw-layout-slot.d.ts +2 -1
- package/lib/types/elements/adw-multi-layout-view.d.ts +2 -1
- package/lib/types/elements/adw-navigation-split-view.d.ts +2 -1
- package/lib/types/elements/adw-navigation-view.d.ts +3 -2
- package/lib/types/elements/adw-overlay-split-view.d.ts +2 -1
- package/lib/types/elements/adw-preferences-dialog.d.ts +5 -4
- package/lib/types/elements/adw-preferences-group.d.ts +2 -1
- package/lib/types/elements/adw-preferences-row.d.ts +2 -1
- package/lib/types/elements/adw-shortcut-label.d.ts +2 -1
- package/lib/types/elements/adw-shortcuts-item.d.ts +2 -1
- package/lib/types/elements/adw-shortcuts-section.d.ts +2 -1
- package/lib/types/elements/adw-sidebar.d.ts +4 -3
- package/lib/types/elements/adw-spin-row.d.ts +2 -1
- package/lib/types/elements/adw-spinner.d.ts +2 -1
- package/lib/types/elements/adw-split-button.d.ts +2 -1
- package/lib/types/elements/adw-status-page.d.ts +2 -1
- package/lib/types/elements/adw-switch-row.d.ts +4 -1
- package/lib/types/elements/adw-tab-bar.d.ts +2 -1
- package/lib/types/elements/adw-tab-button.d.ts +2 -1
- package/lib/types/elements/adw-tab-overview.d.ts +2 -1
- package/lib/types/elements/adw-tab-view.d.ts +3 -2
- package/lib/types/elements/adw-toast-overlay.d.ts +10 -30
- package/lib/types/elements/adw-toggle-group.d.ts +3 -2
- package/lib/types/elements/adw-toolbar-view.d.ts +2 -1
- package/lib/types/elements/adw-view-stack.d.ts +3 -1
- package/lib/types/elements/adw-view-switcher-bar.d.ts +2 -1
- package/lib/types/elements/adw-view-switcher-sidebar.d.ts +2 -1
- package/lib/types/elements/adw-view-switcher.d.ts +3 -2
- package/lib/types/elements/adw-window-features.d.ts +8 -0
- package/lib/types/elements/adw-window-title.d.ts +2 -1
- package/lib/types/elements/adw-wrap-box.d.ts +2 -1
- package/lib/types/elements/checks.d.ts +16 -1
- package/lib/types/elements/gtk-action-bar.d.ts +2 -1
- package/lib/types/elements/gtk-application-window.d.ts +1 -4
- package/lib/types/elements/gtk-aspect-frame.d.ts +2 -1
- package/lib/types/elements/gtk-box.d.ts +5 -1
- package/lib/types/elements/gtk-button.d.ts +5 -7
- package/lib/types/elements/gtk-calendar.d.ts +2 -1
- package/lib/types/elements/gtk-center-box.d.ts +2 -1
- package/lib/types/elements/gtk-color-dialog-button.d.ts +2 -1
- package/lib/types/elements/gtk-drag-icon.d.ts +2 -1
- package/lib/types/elements/gtk-drawing-area.d.ts +2 -1
- package/lib/types/elements/gtk-drop-down.d.ts +2 -1
- package/lib/types/elements/gtk-editable-label.d.ts +2 -1
- package/lib/types/elements/gtk-emoji-chooser.d.ts +2 -0
- package/lib/types/elements/gtk-entry.d.ts +2 -1
- package/lib/types/elements/gtk-expander.d.ts +2 -1
- package/lib/types/elements/gtk-fixed.d.ts +2 -1
- package/lib/types/elements/gtk-flow-box-child.d.ts +2 -1
- package/lib/types/elements/gtk-flow-box.d.ts +2 -1
- package/lib/types/elements/gtk-font-dialog-button.d.ts +2 -1
- package/lib/types/elements/gtk-frame.d.ts +2 -1
- package/lib/types/elements/gtk-gl-area.d.ts +2 -1
- package/lib/types/elements/gtk-graphics-offload.d.ts +2 -1
- package/lib/types/elements/gtk-grid.d.ts +2 -1
- package/lib/types/elements/gtk-header-bar.d.ts +2 -1
- package/lib/types/elements/gtk-image.d.ts +5 -6
- package/lib/types/elements/gtk-inscription.d.ts +2 -1
- package/lib/types/elements/gtk-label.d.ts +10 -3
- package/lib/types/elements/gtk-level-bar.d.ts +2 -1
- package/lib/types/elements/gtk-list-box-row.d.ts +2 -1
- package/lib/types/elements/gtk-list-box.d.ts +2 -1
- package/lib/types/elements/gtk-list-view.d.ts +2 -1
- package/lib/types/elements/gtk-media-controls.d.ts +2 -1
- package/lib/types/elements/gtk-menu-button.d.ts +2 -1
- package/lib/types/elements/gtk-notebook.d.ts +2 -1
- package/lib/types/elements/gtk-overlay.d.ts +2 -1
- package/lib/types/elements/gtk-paned.d.ts +2 -1
- package/lib/types/elements/gtk-picture.d.ts +2 -1
- package/lib/types/elements/gtk-popover-bin.d.ts +2 -1
- package/lib/types/elements/gtk-popover-menu-bar.d.ts +2 -1
- package/lib/types/elements/gtk-popover-menu.d.ts +2 -0
- package/lib/types/elements/gtk-popover.d.ts +7 -1
- package/lib/types/elements/gtk-progress-bar.d.ts +2 -1
- package/lib/types/elements/gtk-revealer.d.ts +2 -1
- package/lib/types/elements/gtk-scale-button.d.ts +2 -1
- package/lib/types/elements/gtk-scale.d.ts +2 -1
- package/lib/types/elements/gtk-scrollbar.d.ts +2 -1
- package/lib/types/elements/gtk-scrolled-window.d.ts +2 -1
- package/lib/types/elements/gtk-search-bar.d.ts +2 -1
- package/lib/types/elements/gtk-separator.d.ts +2 -1
- package/lib/types/elements/gtk-spin-button.d.ts +2 -1
- package/lib/types/elements/gtk-spinner.d.ts +2 -1
- package/lib/types/elements/gtk-stack-page.d.ts +29 -0
- package/lib/types/elements/gtk-stack-sidebar.d.ts +2 -1
- package/lib/types/elements/gtk-stack-switcher.d.ts +2 -1
- package/lib/types/elements/gtk-stack.d.ts +13 -1
- package/lib/types/elements/gtk-switch.d.ts +2 -1
- package/lib/types/elements/gtk-text-view.d.ts +2 -1
- package/lib/types/elements/gtk-text.d.ts +2 -1
- package/lib/types/elements/gtk-tree-expander.d.ts +2 -1
- package/lib/types/elements/gtk-video.d.ts +2 -1
- package/lib/types/elements/gtk-viewport.d.ts +2 -1
- package/lib/types/elements/gtk-window-controls.d.ts +2 -1
- package/lib/types/elements/gtk-window-handle.d.ts +2 -1
- package/lib/types/elements/gtk-window.d.ts +18 -2
- package/lib/types/gobject-elements.d.ts +15 -0
- package/lib/types/gtksource/gtk-source-view.d.ts +2 -1
- package/lib/types/{icon-registry.spec.d.ts → icon-masks.spec.d.ts} +1 -1
- package/lib/types/icon-theme.d.ts +15 -35
- package/lib/types/index.d.ts +3 -4
- package/lib/types/learn6502-window.spec.d.ts +1 -0
- package/lib/types/namespace/adw.d.ts +1 -1
- package/lib/types/namespace/gdk.d.ts +1 -0
- package/lib/types/namespace/gio.d.ts +1 -0
- package/lib/types/namespace/glib.d.ts +2 -1
- package/lib/types/namespace/gtk.d.ts +2 -0
- package/lib/types/shared-tree-builder.d.ts +31 -0
- package/lib/types/signals.d.ts +5 -1
- package/lib/types/source-view/adw-source-view.d.ts +2 -1
- package/lib/types/styles.generated.d.ts +1 -1
- package/lib/types/widget-element.d.ts +25 -0
- package/lib/types/widget-map.spec.d.ts +1 -0
- package/lib/types/widget-mapping.d.ts +7 -0
- package/lib/types/widget-visible.spec.d.ts +1 -0
- package/lib/types/window-maximize.spec.d.ts +1 -0
- package/package.json +13 -12
- package/scss/_about_dialog.scss +46 -1
- package/scss/_bin.scss +6 -3
- package/scss/_checks.scss +5 -2
- package/scss/_icon.scss +3 -4
- package/scss/_labels.scss +2 -2
- package/scss/_overlay.scss +11 -1
- package/scss/_overlay_split_view.scss +10 -0
- package/scss/_reset.scss +1 -1
- package/scss/_scrolled_window.scss +15 -0
- package/scss/_stack.scss +8 -2
- package/scss/_toast.scss +13 -3
- package/scss/_widget.scss +5 -1
- package/scss/_window.scss +16 -0
- package/src/accessible.ts +29 -0
- package/src/adw-about-dialog.spec.ts +81 -12
- package/src/adw-action-rows.spec.ts +2 -2
- package/src/adw-alert-dialog.spec.ts +71 -5
- package/src/adw-bin.spec.ts +4 -3
- package/src/adw-button-content.spec.ts +1 -1
- package/src/adw-carousel.spec.ts +49 -1
- package/src/adw-header-bar.spec.ts +18 -0
- package/src/adw-toast-overlay.spec.ts +68 -24
- package/src/application.spec.ts +44 -0
- package/src/application.ts +13 -18
- package/src/capabilities.mjs +2 -3
- package/src/checks.spec.ts +51 -1
- package/src/child-slot.spec.ts +71 -0
- package/src/compute-expand.spec.ts +186 -0
- package/src/compute-expand.ts +134 -0
- package/src/construct-vectors.spec.ts +97 -7
- package/src/container-fill.spec.ts +70 -0
- package/src/elements/adw-about-dialog.ts +152 -9
- package/src/elements/adw-action-row.ts +2 -1
- package/src/elements/adw-alert-dialog.ts +177 -46
- package/src/elements/adw-application-window.ts +0 -3
- package/src/elements/adw-avatar.ts +2 -1
- package/src/elements/adw-banner.ts +2 -1
- package/src/elements/adw-bin.ts +2 -1
- package/src/elements/adw-bottom-sheet.ts +5 -4
- package/src/elements/adw-breakpoint-bin.ts +5 -1
- package/src/elements/adw-button-content.ts +2 -1
- package/src/elements/adw-button-row.ts +2 -1
- package/src/elements/adw-card.ts +2 -1
- package/src/elements/adw-carousel.ts +62 -3
- package/src/elements/adw-clamp-scrollable.ts +2 -1
- package/src/elements/adw-clamp.ts +2 -1
- package/src/elements/adw-combo-row.ts +15 -1
- package/src/elements/adw-data-grid.ts +2 -1
- package/src/elements/adw-dialog.ts +5 -2
- package/src/elements/adw-entry-row.ts +2 -1
- package/src/elements/adw-expander-row.ts +2 -1
- package/src/elements/adw-header-bar.ts +6 -1
- package/src/elements/adw-inline-view-switcher.ts +3 -2
- package/src/elements/adw-layout-slot.ts +2 -1
- package/src/elements/adw-multi-layout-view.ts +2 -1
- package/src/elements/adw-navigation-split-view.ts +2 -1
- package/src/elements/adw-navigation-view.ts +3 -2
- package/src/elements/adw-overlay-split-view.ts +2 -1
- package/src/elements/adw-preferences-dialog.ts +6 -4
- package/src/elements/adw-preferences-group.ts +2 -1
- package/src/elements/adw-preferences-row.ts +2 -1
- package/src/elements/adw-shortcut-label.ts +2 -1
- package/src/elements/adw-shortcuts-item.ts +2 -1
- package/src/elements/adw-shortcuts-section.ts +2 -1
- package/src/elements/adw-sidebar.ts +4 -3
- package/src/elements/adw-spin-row.ts +2 -1
- package/src/elements/adw-spinner.ts +2 -1
- package/src/elements/adw-split-button.ts +2 -1
- package/src/elements/adw-status-page.ts +2 -1
- package/src/elements/adw-switch-row.ts +10 -1
- package/src/elements/adw-tab-bar.ts +2 -1
- package/src/elements/adw-tab-button.ts +2 -1
- package/src/elements/adw-tab-overview.ts +2 -1
- package/src/elements/adw-tab-view.ts +3 -2
- package/src/elements/adw-toast-overlay.ts +37 -70
- package/src/elements/adw-toggle-group.ts +3 -2
- package/src/elements/adw-toolbar-view.ts +2 -1
- package/src/elements/adw-view-stack.ts +39 -1
- package/src/elements/adw-view-switcher-bar.ts +2 -1
- package/src/elements/adw-view-switcher-sidebar.ts +2 -1
- package/src/elements/adw-view-switcher.ts +3 -2
- package/src/elements/adw-window-features.ts +14 -2
- package/src/elements/adw-window-title.ts +2 -1
- package/src/elements/adw-wrap-box.ts +2 -1
- package/src/elements/checks.ts +85 -6
- package/src/elements/gtk-action-bar.ts +2 -1
- package/src/elements/gtk-application-window.ts +3 -8
- package/src/elements/gtk-aspect-frame.ts +2 -1
- package/src/elements/gtk-box.ts +56 -1
- package/src/elements/gtk-button.ts +10 -22
- package/src/elements/gtk-calendar.ts +2 -1
- package/src/elements/gtk-center-box.ts +2 -1
- package/src/elements/gtk-color-dialog-button.ts +2 -1
- package/src/elements/gtk-drag-icon.ts +6 -1
- package/src/elements/gtk-drawing-area.ts +2 -1
- package/src/elements/gtk-drop-down.ts +2 -1
- package/src/elements/gtk-editable-label.ts +2 -1
- package/src/elements/gtk-emoji-chooser.ts +5 -0
- package/src/elements/gtk-entry.ts +2 -1
- package/src/elements/gtk-expander.ts +2 -1
- package/src/elements/gtk-fixed.ts +2 -1
- package/src/elements/gtk-flow-box-child.ts +5 -2
- package/src/elements/gtk-flow-box.ts +2 -1
- package/src/elements/gtk-font-dialog-button.ts +2 -1
- package/src/elements/gtk-frame.ts +2 -1
- package/src/elements/gtk-gl-area.ts +2 -1
- package/src/elements/gtk-graphics-offload.ts +5 -2
- package/src/elements/gtk-grid.ts +2 -1
- package/src/elements/gtk-header-bar.ts +2 -1
- package/src/elements/gtk-image.ts +14 -15
- package/src/elements/gtk-inscription.ts +2 -1
- package/src/elements/gtk-label.ts +12 -5
- package/src/elements/gtk-level-bar.ts +2 -1
- package/src/elements/gtk-list-box-row.ts +5 -2
- package/src/elements/gtk-list-box.ts +2 -1
- package/src/elements/gtk-list-view.ts +2 -1
- package/src/elements/gtk-media-controls.ts +2 -1
- package/src/elements/gtk-menu-button.ts +2 -1
- package/src/elements/gtk-notebook.ts +2 -1
- package/src/elements/gtk-overlay.ts +7 -5
- package/src/elements/gtk-paned.ts +9 -2
- package/src/elements/gtk-picture.ts +2 -1
- package/src/elements/gtk-popover-bin.ts +5 -1
- package/src/elements/gtk-popover-menu-bar.ts +2 -1
- package/src/elements/gtk-popover-menu.ts +5 -0
- package/src/elements/gtk-popover.ts +14 -1
- package/src/elements/gtk-progress-bar.ts +2 -1
- package/src/elements/gtk-revealer.ts +2 -1
- package/src/elements/gtk-scale-button.ts +2 -1
- package/src/elements/gtk-scale.ts +2 -1
- package/src/elements/gtk-scrollbar.ts +2 -1
- package/src/elements/gtk-scrolled-window.ts +8 -5
- package/src/elements/gtk-search-bar.ts +7 -6
- package/src/elements/gtk-separator.ts +2 -1
- package/src/elements/gtk-spin-button.ts +2 -1
- package/src/elements/gtk-spinner.ts +2 -1
- package/src/elements/gtk-stack-page.ts +112 -0
- package/src/elements/gtk-stack-sidebar.ts +2 -1
- package/src/elements/gtk-stack-switcher.ts +2 -1
- package/src/elements/gtk-stack.ts +52 -6
- package/src/elements/gtk-switch.ts +2 -1
- package/src/elements/gtk-text-view.ts +2 -1
- package/src/elements/gtk-text.ts +2 -1
- package/src/elements/gtk-tree-expander.ts +5 -1
- package/src/elements/gtk-video.ts +2 -1
- package/src/elements/gtk-viewport.ts +6 -1
- package/src/elements/gtk-window-controls.ts +2 -1
- package/src/elements/gtk-window-handle.ts +6 -1
- package/src/elements/gtk-window.ts +57 -7
- package/src/gio.spec.ts +13 -3
- package/src/glib.spec.ts +9 -0
- package/src/gobject-elements.ts +44 -2
- package/src/gtk-label.spec.ts +39 -0
- package/src/gtk-scrolled-window.spec.ts +6 -6
- package/src/gtk-stack.spec.ts +170 -0
- package/src/gtk-value-doors.spec.ts +19 -0
- package/src/gtk-window.spec.ts +2 -2
- package/src/gtksource/gtk-source-view.ts +2 -1
- package/src/{icon-registry.spec.ts → icon-masks.spec.ts} +4 -100
- package/src/icon-theme.spec.ts +69 -124
- package/src/icon-theme.ts +29 -119
- package/src/index.ts +5 -9
- package/src/keyboard-operable.spec.ts +3 -3
- package/src/learn6502-window.spec.ts +113 -0
- package/src/namespace/adw.ts +1 -1
- package/src/namespace/gdk.ts +1 -0
- package/src/namespace/gio.ts +8 -0
- package/src/namespace/glib.ts +4 -0
- package/src/namespace/gtk.ts +2 -0
- package/src/shared-tree-builder.ts +131 -13
- package/src/shared-trees.spec.ts +15 -1
- package/src/signals.ts +11 -2
- package/src/slotted-children.spec.ts +24 -0
- package/src/slotted-children.ts +18 -2
- package/src/source-view/adw-source-view.ts +2 -1
- package/src/split-button.spec.ts +1 -1
- package/src/style-manager.spec.ts +13 -0
- package/src/style-manager.ts +6 -0
- package/src/styles.generated.ts +1 -1
- package/src/test.browser.mts +16 -2
- package/src/value-lists.spec.ts +3 -3
- package/src/widget-element.ts +75 -0
- package/src/widget-map.spec.ts +116 -0
- package/src/widget-mapping.ts +100 -0
- package/src/widget-visible.spec.ts +148 -0
- package/src/window-maximize.spec.ts +93 -0
- package/lib/types/icon-registry.d.ts +0 -37
- package/src/icon-registry.ts +0 -163
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type DispatchedSignals } from './signals.js';
|
|
2
|
+
export declare class WidgetElement extends HTMLElement {
|
|
3
|
+
/** `Gtk.Widget::map` / `::unmap`, which every subclass inherits (`dispatchedSignalsOf`). */
|
|
4
|
+
static readonly signals: DispatchedSignals;
|
|
5
|
+
/** `Gtk.Widget:visible`. */
|
|
6
|
+
get visible(): boolean;
|
|
7
|
+
set visible(value: boolean);
|
|
8
|
+
/** `gtk_widget_get_visible`. */
|
|
9
|
+
get_visible(): boolean;
|
|
10
|
+
/** `gtk_widget_set_visible`. */
|
|
11
|
+
set_visible(visible: boolean): void;
|
|
12
|
+
/** `gtk_widget_get_mapped`: on screen, which is in the document and rendered. */
|
|
13
|
+
get_mapped(): boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare class TooltipElement extends WidgetElement {
|
|
16
|
+
/** `Gtk.Widget:tooltip-text`, the `tooltip-text` attribute; `null` while unset. */
|
|
17
|
+
get tooltip_text(): string | null;
|
|
18
|
+
set tooltip_text(value: string | null);
|
|
19
|
+
get tooltipText(): string | null;
|
|
20
|
+
set tooltipText(value: string | null);
|
|
21
|
+
/** `gtk_widget_get_tooltip_text`. */
|
|
22
|
+
get_tooltip_text(): string | null;
|
|
23
|
+
/** `gtk_widget_set_tooltip_text`. */
|
|
24
|
+
set_tooltip_text(text: string | null): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WidgetMapTest: () => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** `gtk_widget_get_mapped`: in the document, and rendered. */
|
|
2
|
+
export declare function isMapped(el: Element): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Watches `el` for `map` / `unmap` while the returned function has not been called. Its present
|
|
5
|
+
* state is recorded and not emitted, as connecting a handler in GTK emits nothing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function watchMapping(el: HTMLElement): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwWidgetVisibleTest: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WindowMaximizeTest: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-web",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.2-next.254",
|
|
4
4
|
"description": "Adwaita/Libadwaita web components for browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"@codemirror/language": "^6.12.4",
|
|
59
59
|
"@codemirror/state": "^6.7.0",
|
|
60
60
|
"@codemirror/view": "^6.43.4",
|
|
61
|
-
"@gjsify/adwaita-core": "
|
|
62
|
-
"@gjsify/adwaita-fonts": "
|
|
63
|
-
"@gjsify/adwaita-icons": "
|
|
64
|
-
"@gjsify/gtksource-core": "
|
|
61
|
+
"@gjsify/adwaita-core": "0.64.2-next.254",
|
|
62
|
+
"@gjsify/adwaita-fonts": "0.64.2-next.254",
|
|
63
|
+
"@gjsify/adwaita-icons": "0.64.2-next.254",
|
|
64
|
+
"@gjsify/gtksource-core": "0.64.2-next.254",
|
|
65
65
|
"@lezer/highlight": "^1.2.3"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@gjsify/app-settings": "
|
|
68
|
+
"@gjsify/app-settings": "0.64.2-next.254"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@gjsify/app-settings": {
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@gjsify/app-settings": "
|
|
77
|
-
"@gjsify/blueprint": "
|
|
78
|
-
"@gjsify/cli": "
|
|
79
|
-
"@gjsify/unit": "
|
|
80
|
-
"@gjsify/vite-plugin-blueprint": "
|
|
76
|
+
"@gjsify/app-settings": "0.64.2-next.254",
|
|
77
|
+
"@gjsify/blueprint": "0.64.2-next.254",
|
|
78
|
+
"@gjsify/cli": "0.64.2-next.254",
|
|
79
|
+
"@gjsify/unit": "0.64.2-next.254",
|
|
80
|
+
"@gjsify/vite-plugin-blueprint": "0.64.2-next.254",
|
|
81
81
|
"sass": "^1.101.0",
|
|
82
82
|
"typescript": "^6.0.3"
|
|
83
83
|
},
|
|
@@ -114,5 +114,6 @@
|
|
|
114
114
|
"bugs": {
|
|
115
115
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
116
116
|
},
|
|
117
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/adwaita-web#readme"
|
|
117
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/adwaita-web#readme",
|
|
118
|
+
"gitHead": "6c88ac780b9742fce781e9b35aa2f45c125d8064"
|
|
118
119
|
}
|
package/scss/_about_dialog.scss
CHANGED
|
@@ -63,7 +63,9 @@ adw-about-dialog {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// The
|
|
66
|
+
// The toast overlay (template `toast_overlay`) and the navigation view inside it
|
|
67
|
+
// fill the sheet; each page is a column.
|
|
68
|
+
adw-toast-overlay,
|
|
67
69
|
adw-navigation-view,
|
|
68
70
|
.adw-navigation-view-pages,
|
|
69
71
|
.adw-navigation-page {
|
|
@@ -213,6 +215,49 @@ adw-about-dialog {
|
|
|
213
215
|
white-space: pre-wrap;
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
// --- What's New: the release-notes buffer (a GtkTextView with its text tags) ---
|
|
219
|
+
// Reference: adw-about-dialog.ui (release_notes_buffer tags: heading, em, code, bullet)
|
|
220
|
+
.adw-about-dialog-release-notes {
|
|
221
|
+
margin: var(--spacing-s) 0 0;
|
|
222
|
+
font-size: var(--font-size-base);
|
|
223
|
+
line-height: 1.5;
|
|
224
|
+
white-space: pre-wrap;
|
|
225
|
+
|
|
226
|
+
[data-tag='heading'] {
|
|
227
|
+
font-weight: 800;
|
|
228
|
+
font-size: 1.2em;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-tag='em'] {
|
|
232
|
+
font-style: italic;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
[data-tag='code'] {
|
|
236
|
+
font-family: var(--monospace-font-family);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
[data-tag='bullet'] {
|
|
240
|
+
opacity: var(--dim-opacity);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// --- Troubleshooting → Debugging Information ---
|
|
245
|
+
.adw-about-dialog-debug-info {
|
|
246
|
+
margin: var(--spacing-s) 0 0;
|
|
247
|
+
padding: var(--spacing-s);
|
|
248
|
+
font-family: var(--monospace-font-family);
|
|
249
|
+
font-size: var(--font-size-small);
|
|
250
|
+
white-space: pre-wrap;
|
|
251
|
+
overflow-wrap: anywhere;
|
|
252
|
+
border-radius: var(--card-radius);
|
|
253
|
+
background-color: var(--card-bg-color);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.adw-about-dialog-copy {
|
|
257
|
+
align-self: center;
|
|
258
|
+
margin-top: var(--spacing-m);
|
|
259
|
+
}
|
|
260
|
+
|
|
216
261
|
.adw-about-dialog-copyright {
|
|
217
262
|
margin: var(--spacing-s) 0 0;
|
|
218
263
|
font-size: var(--font-size-small);
|
package/scss/_bin.scss
CHANGED
|
@@ -14,13 +14,16 @@
|
|
|
14
14
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
15
15
|
|
|
16
16
|
adw-bin {
|
|
17
|
-
display:
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
18
19
|
|
|
19
20
|
// One child, and it fills — `gtk_bin_layout_allocate` allocates the whole widget to
|
|
20
21
|
// its single child. `:only-child` rather than `> *` because a bin keeps ONE
|
|
21
22
|
// (`adw_bin_set_child` unparents the one it replaces), so the case where the selector
|
|
22
|
-
// could match two is one the element has already refused.
|
|
23
|
+
// could match two is one the element has already refused. Flex stretch rather than
|
|
24
|
+
// `block-size: 100%`: a percentage needs a definite parent height, which a bin that is
|
|
25
|
+
// itself a flex item (a stack page) only has by the stretch algorithm.
|
|
23
26
|
> :only-child {
|
|
24
|
-
|
|
27
|
+
flex: 1 1 auto;
|
|
25
28
|
}
|
|
26
29
|
}
|
package/scss/_checks.scss
CHANGED
|
@@ -183,7 +183,8 @@ gtk-check-button .adw-check-indicator {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
// `radio { border-radius: 100% }` (:73-74)
|
|
186
|
-
adw-radio .adw-check-indicator
|
|
186
|
+
adw-radio .adw-check-indicator,
|
|
187
|
+
gtk-check-button[radio] .adw-check-indicator {
|
|
187
188
|
border-radius: 100%;
|
|
188
189
|
}
|
|
189
190
|
|
|
@@ -194,7 +195,8 @@ gtk-check-button[checked] .adw-check-indicator::after {
|
|
|
194
195
|
-webkit-mask-image: $check-glyph;
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
adw-radio[checked] .adw-check-indicator::after
|
|
198
|
+
adw-radio[checked] .adw-check-indicator::after,
|
|
199
|
+
gtk-check-button[radio][checked] .adw-check-indicator::after {
|
|
198
200
|
background-color: currentColor;
|
|
199
201
|
mask-image: $bullet-glyph;
|
|
200
202
|
-webkit-mask-image: $bullet-glyph;
|
|
@@ -206,6 +208,7 @@ adw-radio[checked] .adw-check-indicator::after {
|
|
|
206
208
|
// specificity, same outcome here — and the same precedence `resolveCheckState`
|
|
207
209
|
// in `@gjsify/adwaita-core` encodes for the a11y value.
|
|
208
210
|
gtk-check-button[indeterminate] .adw-check-indicator::after,
|
|
211
|
+
gtk-check-button[radio][indeterminate] .adw-check-indicator::after,
|
|
209
212
|
adw-radio[indeterminate] .adw-check-indicator::after {
|
|
210
213
|
background-color: currentColor;
|
|
211
214
|
mask-image: $dash-glyph;
|
package/scss/_icon.scss
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
// specificity this rule would come last and override every generated mask class
|
|
77
77
|
// — every icon in the package would draw the broken glyph. `:where()` scores
|
|
78
78
|
// 0,0,0, so ANY `.adw-icon--<name>` rule beats it wherever it sits in the
|
|
79
|
-
// cascade
|
|
79
|
+
// cascade.
|
|
80
80
|
:where(.adw-icon) {
|
|
81
81
|
mask-image: var(--icon-image-missing);
|
|
82
82
|
-webkit-mask-image: var(--icon-image-missing);
|
|
@@ -97,9 +97,8 @@
|
|
|
97
97
|
background-color: transparent;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// A FULL-COLOUR icon —
|
|
101
|
-
//
|
|
102
|
-
// theme tries them. It is drawn as-is, the way GTK draws `hicolor/…/apps/<app-id>.svg`: no
|
|
100
|
+
// A FULL-COLOUR icon — a resource file `<gtk-image>` resolves a name to after the theme's
|
|
101
|
+
// symbolic glyph, in the order GTK's theme tries them. It is drawn as-is, the way GTK draws `hicolor/…/apps/<app-id>.svg`: no
|
|
103
102
|
// mask and no `currentColor` fill, only the image the element puts in `background-image`.
|
|
104
103
|
//
|
|
105
104
|
// The modifier is NOT `adw-icon--…`, so the rule above never sees it as a mask class.
|
package/scss/_labels.scss
CHANGED
|
@@ -104,8 +104,8 @@ gtk-label {
|
|
|
104
104
|
// both cases need the same span and the same measurement pass.
|
|
105
105
|
.adw-label-text {
|
|
106
106
|
display: block;
|
|
107
|
-
// A
|
|
108
|
-
//
|
|
107
|
+
// A shrink-to-fit width may never push the label wider than its container.
|
|
108
|
+
// `gtk-label.ts`'s measured cap replaces this inline as `min(100%, <width>px)`.
|
|
109
109
|
max-width: 100%;
|
|
110
110
|
}
|
|
111
111
|
|
package/scss/_overlay.scss
CHANGED
|
@@ -38,13 +38,23 @@
|
|
|
38
38
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
39
39
|
|
|
40
40
|
gtk-overlay {
|
|
41
|
-
|
|
41
|
+
// A column flex box rather than a block: `gtk_overlay_size_allocate` hands the main child
|
|
42
|
+
// the overlay's WHOLE allocation (gtkoverlay.c), and a block would give it only its content
|
|
43
|
+
// height. With an auto height the overlay still measures as its child (the child's
|
|
44
|
+
// `flex-basis: auto` is the content), with a definite one the child grows to fill it.
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
42
47
|
position: relative;
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
.adw-overlay-child {
|
|
46
51
|
// The main child, in the host's own flow — see the header.
|
|
47
52
|
display: contents;
|
|
53
|
+
|
|
54
|
+
// Fill the allocation on the main axis; the cross axis stretches by default.
|
|
55
|
+
> * {
|
|
56
|
+
flex: 1 1 auto;
|
|
57
|
+
}
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
.adw-overlay-layer {
|
|
@@ -71,6 +71,16 @@ adw-overlay-split-view {
|
|
|
71
71
|
align-self: stretch;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// Both panes are AdwBins in the C (`content_bin` / `sidebar_bin`,
|
|
75
|
+
// adw-overlay-split-view.c:1127-1138), allocated the pane's full height (:573-610,
|
|
76
|
+
// :654-690) — so the pane's widget fills it, as `_bin.scss` does for `<adw-bin>`.
|
|
77
|
+
.adw-osv-content,
|
|
78
|
+
.adw-osv-sidebar {
|
|
79
|
+
> :only-child {
|
|
80
|
+
flex: 1 1 auto;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
// Docked — the sidebar sits in the flex row and the hidden part is taken off
|
|
75
85
|
// its own edge by a negative margin the element computes.
|
|
76
86
|
&:not(.collapsed) .adw-osv-sidebar {
|
package/scss/_reset.scss
CHANGED
|
@@ -48,7 +48,7 @@ $adw-components:
|
|
|
48
48
|
gtk-link-button, gtk-list-box, gtk-list-box-row, gtk-list-view, gtk-media-controls, gtk-menu-button, gtk-overlay, gtk-page-setup-unix-dialog, gtk-paned,
|
|
49
49
|
gtk-password-entry, gtk-picture, gtk-popover, gtk-popover-bin, gtk-popover-menu, gtk-popover-menu-bar, gtk-print-unix-dialog,
|
|
50
50
|
gtk-progress-bar, gtk-revealer, gtk-scale, gtk-scale-button, gtk-scrollbar, gtk-scrolled-window, gtk-search-bar, gtk-search-entry, gtk-separator, gtk-source-view,
|
|
51
|
-
gtk-spin-button, gtk-spinner, gtk-stack, gtk-stack-sidebar, gtk-stack-switcher, gtk-switch, gtk-text, gtk-text-view, gtk-toggle-button, gtk-tree-expander, gtk-video, gtk-viewport,
|
|
51
|
+
gtk-spin-button, gtk-spinner, gtk-stack, gtk-stack-page, gtk-stack-sidebar, gtk-stack-switcher, gtk-switch, gtk-text, gtk-text-view, gtk-toggle-button, gtk-tree-expander, gtk-video, gtk-viewport,
|
|
52
52
|
gtk-window, gtk-window-controls, gtk-window-handle;
|
|
53
53
|
|
|
54
54
|
// Roots: re-root the inherited typographic properties (and the box model) so a
|
|
@@ -52,8 +52,23 @@ gtk-scrolled-window {
|
|
|
52
52
|
flex: 1 1 0%;
|
|
53
53
|
overflow: hidden;
|
|
54
54
|
|
|
55
|
+
// THE CHILD IS NOT PART OF THE REQUEST on a scrolling axis: `gtk_scrolled_window_measure`
|
|
56
|
+
// reports `min-content-*` (default 0) plus the bars (gtkscrolledwindow.c:1821-1960), and adds
|
|
57
|
+
// the child's minimum only under a NEVER policy and its natural only with
|
|
58
|
+
// `propagate-natural-*` — which `_sync()` writes as an inline `width` / `height`. A zero
|
|
59
|
+
// size with `min-*: 100%` is that request in grid terms: a percentage is cyclic while the
|
|
60
|
+
// tracks are sized, so the item contributes nothing, and at layout it resolves against the
|
|
61
|
+
// cell and fills it. Without it the cell grew to the content's height, a window in a 600px
|
|
62
|
+
// box measured 2229px and had nothing left to scroll. `max-*: 100%` keeps a `max-content`
|
|
63
|
+
// request from overflowing the cell it asked for.
|
|
55
64
|
> gtk-viewport {
|
|
56
65
|
grid-area: 1 / 1;
|
|
66
|
+
width: 0;
|
|
67
|
+
height: 0;
|
|
68
|
+
min-width: 100%;
|
|
69
|
+
min-height: 100%;
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
max-height: 100%;
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
// The vertical bar spans BOTH rows, which is `gtk_widget_size_allocate` giving it the
|
package/scss/_stack.scss
CHANGED
|
@@ -60,13 +60,19 @@ gtk-stack {
|
|
|
60
60
|
// looks at the VISIBLE child alone on that axis (gtkstack.c:2899-2905) — the stack is
|
|
61
61
|
// as big as the current page. Turned off, the stack is as big as the LARGEST page,
|
|
62
62
|
// which is `max-content` on the cross axis and `flex: 1 1 auto` along the main one.
|
|
63
|
-
|
|
63
|
+
//
|
|
64
|
+
// The element reflects the flag as an ABSENT attribute or `=""` for TRUE and
|
|
65
|
+
// `="false"` for FALSE (`_flag`: `raw !== 'false'`, absent → the default TRUE), so
|
|
66
|
+
// only the literal `'false'` is the non-homogeneous state. `:not([hhomogeneous])`
|
|
67
|
+
// read a missing attribute as false and gave every default stack's page
|
|
68
|
+
// `width: max-content`, a zero-width page for a child with no intrinsic width.
|
|
69
|
+
&[hhomogeneous='false'] > .adw-stack-page {
|
|
64
70
|
flex: 0 1 auto;
|
|
65
71
|
width: max-content;
|
|
66
72
|
max-width: 100%;
|
|
67
73
|
}
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
&[vhomogeneous='false'] > .adw-stack-page {
|
|
70
76
|
height: max-content;
|
|
71
77
|
max-height: 100%;
|
|
72
78
|
}
|
package/scss/_toast.scss
CHANGED
|
@@ -12,12 +12,22 @@
|
|
|
12
12
|
|
|
13
13
|
adw-toast-overlay {
|
|
14
14
|
position: relative;
|
|
15
|
-
display:
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
16
17
|
|
|
17
|
-
// The wrapped content (Adw.ToastOverlay :child) occupies the overlay's box
|
|
18
|
+
// The wrapped content (Adw.ToastOverlay :child) occupies the overlay's box: AdwToastOverlay
|
|
19
|
+
// allocates its child the full size (adw-toast-overlay.c size_allocate). A percentage height
|
|
20
|
+
// resolves against an indefinite one inside a block parent, so the fill is flex stretch.
|
|
18
21
|
.adw-toast-overlay-content {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
min-height: 0;
|
|
19
26
|
width: 100%;
|
|
20
|
-
|
|
27
|
+
|
|
28
|
+
> * {
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
// The toast slot: layered over the bottom edge of the overlay and centered,
|
package/scss/_widget.scss
CHANGED
|
@@ -50,8 +50,12 @@
|
|
|
50
50
|
margin-block: auto;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// `data-computed-*` is `gtk_widget_compute_expand` for a child that authored no value: a bin
|
|
54
|
+
// whose descendant expands grows too (gtkboxlayout.c:793). `gtk-box.ts` writes it.
|
|
53
55
|
gtk-box:not([orientation='vertical']) > [hexpand]:not([hexpand='false']),
|
|
54
|
-
gtk-box[orientation='vertical'] > [vexpand]:not([vexpand='false'])
|
|
56
|
+
gtk-box[orientation='vertical'] > [vexpand]:not([vexpand='false']),
|
|
57
|
+
gtk-box:not([orientation='vertical']) > [data-computed-hexpand],
|
|
58
|
+
gtk-box[orientation='vertical'] > [data-computed-vexpand] {
|
|
55
59
|
flex-grow: 1;
|
|
56
60
|
}
|
|
57
61
|
|
package/scss/_window.scss
CHANGED
|
@@ -43,6 +43,15 @@ adw-application-window {
|
|
|
43
43
|
box-shadow: none;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// A maximized or fullscreen window ignores its default size and fills the work area
|
|
47
|
+
// (gtkwindow.c); on a page that is the containing block. The element drops its inline
|
|
48
|
+
// `default-width`/`default-height` in these states so this can apply, and keeps the minimum.
|
|
49
|
+
&[maximized]:not([maximized="false"]),
|
|
50
|
+
&[fullscreened]:not([fullscreened="false"]) {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
46
55
|
// `present()` and `hide-on-close` toggle `hidden`, which `display: flex` would override.
|
|
47
56
|
&[hidden] {
|
|
48
57
|
display: none;
|
|
@@ -110,6 +119,13 @@ gtk-application-window {
|
|
|
110
119
|
box-shadow: none;
|
|
111
120
|
}
|
|
112
121
|
|
|
122
|
+
// The same fill as `adw-window` above: the default size is only the restored size.
|
|
123
|
+
&[maximized]:not([maximized="false"]),
|
|
124
|
+
&[fullscreened]:not([fullscreened="false"]) {
|
|
125
|
+
width: 100%;
|
|
126
|
+
height: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
113
129
|
// The strip: an application's `titlebar` slot, or the two window-control groups and the
|
|
114
130
|
// window's own title. `min-width: 0` on the title is what lets a long one ellipsize
|
|
115
131
|
// instead of pushing the end controls out of the frame.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// The accessible name and description of a widget whose ROLE lives on an inner control.
|
|
2
|
+
//
|
|
3
|
+
// A `.blp`'s `accessibility { label: …; description: …; }` reaches this renderer as the host's
|
|
4
|
+
// `aria-label` / `aria-description` (`shared-tree-builder.ts`). Where the host itself carries
|
|
5
|
+
// the role that is the whole door. `<gtk-button>` and `<gtk-check-button>` do not: the role is
|
|
6
|
+
// on the inner `<button>` / `<input>`, and an `aria-label` on a role-less host is one no
|
|
7
|
+
// assistive technology reads. Those elements observe both attributes and copy them onto the
|
|
8
|
+
// control here, so `GTK_ACCESSIBLE_PROPERTY_LABEL` lands where GTK's lands: on the widget that
|
|
9
|
+
// is announced.
|
|
10
|
+
//
|
|
11
|
+
// Reference: refs/gtk/gtk/gtkaccessible.c (gtk_accessible_update_property)
|
|
12
|
+
// Copyright (c) GNOME contributors (GTK). LGPLv2.1+.
|
|
13
|
+
|
|
14
|
+
/** The `accessibility { }` names a host forwards: `label` and `description`, as ARIA spells them. */
|
|
15
|
+
export const FORWARDED_ARIA = ['aria-label', 'aria-description'] as const;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Copies the host's {@link FORWARDED_ARIA} attributes onto `control`, removing what the host
|
|
19
|
+
* no longer has. Returns whether the host named the control, so a caller with a fallback name
|
|
20
|
+
* of its own (an icon-only button) writes that only where the tree wrote none.
|
|
21
|
+
*/
|
|
22
|
+
export function forwardAccessibleName(host: Element, control: Element): boolean {
|
|
23
|
+
for (const name of FORWARDED_ARIA) {
|
|
24
|
+
const value = host.getAttribute(name);
|
|
25
|
+
if (value === null) control.removeAttribute(name);
|
|
26
|
+
else control.setAttribute(name, value);
|
|
27
|
+
}
|
|
28
|
+
return host.hasAttribute('aria-label');
|
|
29
|
+
}
|
|
@@ -7,21 +7,27 @@
|
|
|
7
7
|
// and `website` is the one input the Details-visibility predicate leaves OUT.
|
|
8
8
|
import { describe, expect, it } from '@gjsify/unit';
|
|
9
9
|
|
|
10
|
-
import { ADW_ABOUT_DIALOG_LABELS, stripMnemonic } from '@gjsify/adwaita-core';
|
|
10
|
+
import { ADW_ABOUT_DIALOG_LABELS, type ReleaseNotesSegment, type Toast, stripMnemonic } from '@gjsify/adwaita-core';
|
|
11
11
|
import {
|
|
12
12
|
ABOUT_DIALOG_CREDITS_LEGAL_VECTORS,
|
|
13
13
|
ABOUT_DIALOG_DETAILS_VECTORS,
|
|
14
|
+
ABOUT_DIALOG_DOOR_VECTORS,
|
|
14
15
|
ABOUT_DIALOG_HEADER_VECTORS,
|
|
15
16
|
ABOUT_DIALOG_SUPPORT_VECTORS,
|
|
17
|
+
type AboutDialogDoorLike,
|
|
16
18
|
CREDITS_SECTIONS_VECTORS,
|
|
17
19
|
CREDIT_PERSON_VECTORS,
|
|
20
|
+
RELEASE_NOTES_VECTORS,
|
|
21
|
+
driveAboutDialogDoorVectors,
|
|
22
|
+
driveReleaseNotesVectors,
|
|
18
23
|
} from '@gjsify/adwaita-core/conformance';
|
|
19
24
|
|
|
20
25
|
/** The label a renderer without an accelerator layer paints for a row. */
|
|
21
26
|
const label = (key: keyof typeof ADW_ABOUT_DIALOG_LABELS) => stripMnemonic(ADW_ABOUT_DIALOG_LABELS[key]);
|
|
22
27
|
|
|
23
28
|
interface Mounted {
|
|
24
|
-
dialog: HTMLElement &
|
|
29
|
+
dialog: HTMLElement &
|
|
30
|
+
AboutDialogDoorLike & { developers: string[]; designers: string[]; artists: string[]; documenters: string[] };
|
|
25
31
|
host: HTMLElement;
|
|
26
32
|
/** Every `window.open` the dialog performed, most recent last. */
|
|
27
33
|
opened: string[];
|
|
@@ -157,22 +163,23 @@ export const AdwAboutDialogTest = async () => {
|
|
|
157
163
|
});
|
|
158
164
|
|
|
159
165
|
await describe('adw-about-dialog main page (update_details vectors)', async () => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const { website, comments, visible, rule } = vector;
|
|
164
|
-
await it(`website=${website} comments=${comments} — ${rule}`, () => {
|
|
166
|
+
for (const vector of ABOUT_DIALOG_DETAILS_VECTORS) {
|
|
167
|
+
const { website, comments, customLinks, releaseNotes, visible, rule } = vector;
|
|
168
|
+
await it(`website=${website} comments=${comments} links=${customLinks} notes=${releaseNotes} — ${rule}`, () => {
|
|
165
169
|
const mounted = mount({
|
|
166
170
|
'application-name': 'Builder',
|
|
167
171
|
...(website ? { website: 'https://example.org' } : {}),
|
|
168
172
|
...(comments ? { comments: 'A description.' } : {}),
|
|
173
|
+
...(releaseNotes ? { 'release-notes': '<p>Hi</p>' } : {}),
|
|
169
174
|
});
|
|
175
|
+
if (customLinks) mounted.dialog.add_link('_Docs', 'https://example.org/docs');
|
|
170
176
|
|
|
171
177
|
const main = page(mounted.dialog, 'main');
|
|
172
178
|
const details = page(mounted.dialog, 'details');
|
|
173
179
|
|
|
174
180
|
expect({
|
|
175
181
|
detailsGroup: group(mounted.dialog, 'details') !== null,
|
|
182
|
+
whatsNewRow: hasRow(main, label('whatsNewRow')),
|
|
176
183
|
detailsRow: hasRow(main, label('detailsRow')),
|
|
177
184
|
websiteRow: hasRow(main, label('websiteRow')),
|
|
178
185
|
commentsLabel: details?.querySelector('.adw-about-dialog-comments') != null,
|
|
@@ -180,6 +187,7 @@ export const AdwAboutDialogTest = async () => {
|
|
|
180
187
|
detailsWebsiteRow: hasRow(details, label('websiteRow')),
|
|
181
188
|
}).toStrictEqual({
|
|
182
189
|
detailsGroup: visible.detailsGroup,
|
|
190
|
+
whatsNewRow: visible.whatsNewRow,
|
|
183
191
|
detailsRow: visible.detailsRow,
|
|
184
192
|
websiteRow: visible.websiteRow,
|
|
185
193
|
commentsLabel: visible.commentsLabel,
|
|
@@ -203,15 +211,14 @@ export const AdwAboutDialogTest = async () => {
|
|
|
203
211
|
});
|
|
204
212
|
|
|
205
213
|
await describe('adw-about-dialog main page (update_support vectors)', async () => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const { supportUrl, issueUrl, visible, rule } = vector;
|
|
210
|
-
await it(`support=${supportUrl} issue=${issueUrl} — ${rule}`, () => {
|
|
214
|
+
for (const vector of ABOUT_DIALOG_SUPPORT_VECTORS) {
|
|
215
|
+
const { supportUrl, issueUrl, debugInfo, visible, rule } = vector;
|
|
216
|
+
await it(`support=${supportUrl} issue=${issueUrl} debug=${debugInfo} — ${rule}`, () => {
|
|
211
217
|
const mounted = mount({
|
|
212
218
|
'application-name': 'Builder',
|
|
213
219
|
...(supportUrl ? { 'support-url': 'https://example.org/help' } : {}),
|
|
214
220
|
...(issueUrl ? { 'issue-url': 'https://example.org/issues' } : {}),
|
|
221
|
+
...(debugInfo ? { 'debug-info': 'GTK 4.20' } : {}),
|
|
215
222
|
});
|
|
216
223
|
|
|
217
224
|
const main = page(mounted.dialog, 'main');
|
|
@@ -219,10 +226,12 @@ export const AdwAboutDialogTest = async () => {
|
|
|
219
226
|
supportGroup: group(mounted.dialog, 'support') !== null,
|
|
220
227
|
supportRow: hasRow(main, label('supportRow')),
|
|
221
228
|
issueRow: hasRow(main, label('issueRow')),
|
|
229
|
+
troubleshootingRow: hasRow(main, label('troubleshootingRow')),
|
|
222
230
|
}).toStrictEqual({
|
|
223
231
|
supportGroup: visible.supportGroup,
|
|
224
232
|
supportRow: visible.supportRow,
|
|
225
233
|
issueRow: visible.issueRow,
|
|
234
|
+
troubleshootingRow: visible.troubleshootingRow,
|
|
226
235
|
});
|
|
227
236
|
|
|
228
237
|
mounted.dispose();
|
|
@@ -340,6 +349,66 @@ export const AdwAboutDialogTest = async () => {
|
|
|
340
349
|
});
|
|
341
350
|
});
|
|
342
351
|
|
|
352
|
+
// The notes, debug and link doors, on the vectors real `gi://Adw` passes.
|
|
353
|
+
const doorMounts: Mounted[] = [];
|
|
354
|
+
const doorSubject = {
|
|
355
|
+
name: 'adw-about-dialog',
|
|
356
|
+
isOracle: false,
|
|
357
|
+
labels: { ...ADW_ABOUT_DIALOG_LABELS, websiteRow: label('websiteRow') },
|
|
358
|
+
isGLibUntranslated: true,
|
|
359
|
+
makeDialog(): AboutDialogDoorLike {
|
|
360
|
+
const mounted = mount({ 'application-name': 'Builder' });
|
|
361
|
+
doorMounts.push(mounted);
|
|
362
|
+
return mounted.dialog;
|
|
363
|
+
},
|
|
364
|
+
whatsNew(dialog: AboutDialogDoorLike): ReleaseNotesSegment[] {
|
|
365
|
+
const notes =
|
|
366
|
+
page(dialog as Mounted['dialog'], 'whatsnew')?.querySelectorAll(
|
|
367
|
+
'.adw-about-dialog-release-notes > span',
|
|
368
|
+
) ?? [];
|
|
369
|
+
return [...notes].map((span) => ({
|
|
370
|
+
text: span.textContent ?? '',
|
|
371
|
+
tag: (span.dataset['tag'] ?? null) as ReleaseNotesSegment['tag'],
|
|
372
|
+
}));
|
|
373
|
+
},
|
|
374
|
+
isRowVisible(dialog: AboutDialogDoorLike, row: 'whatsNewRow' | 'detailsRow' | 'troubleshootingRow'): boolean {
|
|
375
|
+
return hasRow(page(dialog as Mounted['dialog'], 'main'), label(row));
|
|
376
|
+
},
|
|
377
|
+
debugInfoText(dialog: AboutDialogDoorLike): string {
|
|
378
|
+
return (dialog as Mounted['dialog']).querySelector('pre.adw-about-dialog-debug-info')?.textContent ?? '';
|
|
379
|
+
},
|
|
380
|
+
linkTitles(dialog: AboutDialogDoorLike): string[] {
|
|
381
|
+
return rowTitles(group(dialog as Mounted['dialog'], 'links'));
|
|
382
|
+
},
|
|
383
|
+
dispose() {
|
|
384
|
+
for (const mounted of doorMounts.splice(0)) mounted.dispose();
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
await driveReleaseNotesVectors(doorSubject, { describe, it, expect }, RELEASE_NOTES_VECTORS);
|
|
388
|
+
await driveAboutDialogDoorVectors(doorSubject, { describe, it, expect }, ABOUT_DIALOG_DOOR_VECTORS);
|
|
389
|
+
|
|
390
|
+
await describe('adw-about-dialog new_from_appdata and Copy Text', async () => {
|
|
391
|
+
await it('refuses new_from_appdata by name', () => {
|
|
392
|
+
const ctor = customElements.get('adw-about-dialog') as unknown as {
|
|
393
|
+
new_from_appdata(path: string): unknown;
|
|
394
|
+
};
|
|
395
|
+
expect(() => ctor.new_from_appdata('/org/example/App/metainfo.xml')).toThrow(
|
|
396
|
+
'Adw.AboutDialog.new_from_appdata',
|
|
397
|
+
);
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
await it('shows the Copied toast when Copy Text copies the debug info', () => {
|
|
401
|
+
const mounted = mount({ 'application-name': 'Builder', 'debug-info': 'GTK 4.20' });
|
|
402
|
+
const copy = page(mounted.dialog, 'debuginfo')!.querySelector('.adw-about-dialog-copy') as HTMLElement;
|
|
403
|
+
copy.click();
|
|
404
|
+
const overlay = mounted.dialog.querySelector('adw-toast-overlay') as unknown as {
|
|
405
|
+
currentToast: Toast | null;
|
|
406
|
+
};
|
|
407
|
+
expect(overlay.currentToast?.title).toBe(ADW_ABOUT_DIALOG_LABELS.copiedToast);
|
|
408
|
+
mounted.dispose();
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
|
|
343
412
|
// An opened dialog has to OCCUPY SPACE, and no other test here can see that: they
|
|
344
413
|
// all read the built DOM, and all passed while the sheet measured 360×0.
|
|
345
414
|
//
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
|
|
29
29
|
import { normalizeIconName } from '@gjsify/adwaita-core';
|
|
30
30
|
|
|
31
|
-
import { isIconAvailable } from './icon-
|
|
32
|
-
import { fallbackMask, maskOf } from './icon-
|
|
31
|
+
import { isIconAvailable } from './icon-theme.js';
|
|
32
|
+
import { fallbackMask, maskOf } from './icon-masks.spec.js';
|
|
33
33
|
|
|
34
34
|
import type { AdwActionRow } from './elements/adw-action-row.js';
|
|
35
35
|
import type { AdwComboRow } from './elements/adw-combo-row.js';
|