@gjsify/adwaita-web 0.44.0 → 0.46.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.
Files changed (114) hide show
  1. package/README.md +8 -6
  2. package/dist/adwaita-web.css +96 -96
  3. package/dist/adwaita-web.css.map +1 -1
  4. package/lib/types/elements/adw-entry-row.d.ts +2 -2
  5. package/lib/types/elements/adw-expander-row.d.ts +1 -1
  6. package/lib/types/elements/adw-header-bar.d.ts +16 -8
  7. package/lib/types/elements/adw-split-button.d.ts +1 -1
  8. package/lib/types/elements/adw-switch-row.d.ts +1 -1
  9. package/lib/types/elements/adw-wrap-box.d.ts +1 -1
  10. package/lib/types/elements/{adw-checks.d.ts → checks.d.ts} +9 -2
  11. package/lib/types/elements/{adw-button.d.ts → gtk-button.d.ts} +1 -1
  12. package/lib/types/elements/{adw-drop-down.d.ts → gtk-drop-down.d.ts} +6 -6
  13. package/lib/types/elements/{adw-entry.d.ts → gtk-entry.d.ts} +1 -1
  14. package/lib/types/elements/{adw-icon.d.ts → gtk-image.d.ts} +2 -2
  15. package/lib/types/elements/{adw-menu-button.d.ts → gtk-menu-button.d.ts} +13 -4
  16. package/lib/types/elements/{adw-popover.d.ts → gtk-popover.d.ts} +9 -9
  17. package/lib/types/elements/{adw-progress-bar.d.ts → gtk-progress-bar.d.ts} +1 -1
  18. package/lib/types/elements/{adw-switch.d.ts → gtk-switch.d.ts} +2 -2
  19. package/lib/types/elements/view-switcher-dom.d.ts +4 -4
  20. package/lib/types/exported-elements.d.ts +10 -0
  21. package/lib/types/gtk-button.spec.d.ts +1 -0
  22. package/lib/types/gtk-drop-down.spec.d.ts +1 -0
  23. package/lib/types/gtk-entry.spec.d.ts +1 -0
  24. package/lib/types/gtk-image.spec.d.ts +1 -0
  25. package/lib/types/gtk-menu-button.spec.d.ts +1 -0
  26. package/lib/types/gtk-progress-bar.spec.d.ts +1 -0
  27. package/lib/types/gtk-switch.spec.d.ts +1 -0
  28. package/lib/types/icon-registry.d.ts +2 -2
  29. package/lib/types/index.d.ts +13 -51
  30. package/lib/types/namespace/adw.d.ts +44 -0
  31. package/lib/types/namespace/gtk.d.ts +9 -0
  32. package/lib/types/styles.generated.d.ts +1 -1
  33. package/package.json +9 -6
  34. package/scss/_about_dialog.scss +1 -1
  35. package/scss/_button.scss +4 -4
  36. package/scss/_checks.scss +6 -6
  37. package/scss/_drop_down.scss +3 -3
  38. package/scss/_entry.scss +3 -3
  39. package/scss/_expander_row.scss +1 -1
  40. package/scss/_icon.scss +4 -4
  41. package/scss/_menu_button.scss +3 -3
  42. package/scss/_popover.scss +2 -2
  43. package/scss/_progress_bar.scss +4 -4
  44. package/scss/_reset.scss +10 -8
  45. package/scss/_split_button.scss +1 -1
  46. package/scss/_style_classes.scss +9 -9
  47. package/scss/_switch.scss +2 -2
  48. package/scss/_switch_row.scss +1 -1
  49. package/scss/_toast.scss +1 -1
  50. package/scss/adwaita-skin.scss +2 -2
  51. package/src/adw-action-rows.spec.ts +2 -2
  52. package/src/adw-button-content.spec.ts +1 -1
  53. package/src/adw-header-bar.spec.ts +9 -4
  54. package/src/adw-tab-view.spec.ts +71 -0
  55. package/src/bottom-sheet.spec.ts +2 -2
  56. package/src/{adw-checks.spec.ts → checks.spec.ts} +11 -11
  57. package/src/chrome.spec.ts +2 -2
  58. package/src/connect-lifecycle.spec.ts +10 -7
  59. package/src/elements/adw-about-dialog.ts +6 -6
  60. package/src/elements/adw-avatar.ts +4 -4
  61. package/src/elements/adw-button-content.ts +6 -6
  62. package/src/elements/adw-button-row.ts +6 -6
  63. package/src/elements/adw-combo-row.ts +1 -1
  64. package/src/elements/adw-entry-row.ts +5 -5
  65. package/src/elements/adw-expander-row.ts +10 -10
  66. package/src/elements/adw-header-bar.ts +34 -13
  67. package/src/elements/adw-navigation-view.ts +24 -4
  68. package/src/elements/adw-password-entry-row.ts +3 -3
  69. package/src/elements/adw-sidebar.ts +4 -4
  70. package/src/elements/adw-split-button.ts +14 -14
  71. package/src/elements/adw-status-page.ts +4 -4
  72. package/src/elements/adw-switch-row.ts +8 -8
  73. package/src/elements/adw-tab-view.ts +32 -10
  74. package/src/elements/adw-toast-overlay.ts +2 -2
  75. package/src/elements/adw-toggle-group.ts +3 -3
  76. package/src/elements/adw-view-switcher-bar.ts +3 -3
  77. package/src/elements/adw-view-switcher.ts +3 -3
  78. package/src/elements/{adw-checks.ts → checks.ts} +13 -6
  79. package/src/elements/{adw-button.ts → gtk-button.ts} +6 -6
  80. package/src/elements/{adw-drop-down.ts → gtk-drop-down.ts} +18 -18
  81. package/src/elements/{adw-entry.ts → gtk-entry.ts} +4 -4
  82. package/src/elements/{adw-icon.ts → gtk-image.ts} +5 -5
  83. package/src/elements/{adw-menu-button.ts → gtk-menu-button.ts} +27 -18
  84. package/src/elements/{adw-popover.ts → gtk-popover.ts} +18 -18
  85. package/src/elements/{adw-progress-bar.ts → gtk-progress-bar.ts} +5 -5
  86. package/src/elements/{adw-switch.ts → gtk-switch.ts} +4 -4
  87. package/src/elements/view-switcher-dom.ts +5 -5
  88. package/src/exported-elements.ts +50 -0
  89. package/src/{adw-button.spec.ts → gtk-button.spec.ts} +6 -6
  90. package/src/{adw-drop-down.spec.ts → gtk-drop-down.spec.ts} +17 -17
  91. package/src/{adw-entry.spec.ts → gtk-entry.spec.ts} +8 -8
  92. package/src/{adw-icon.spec.ts → gtk-image.spec.ts} +21 -21
  93. package/src/{adw-menu-button.spec.ts → gtk-menu-button.spec.ts} +6 -6
  94. package/src/{adw-progress-bar.spec.ts → gtk-progress-bar.spec.ts} +12 -12
  95. package/src/{adw-switch.spec.ts → gtk-switch.spec.ts} +20 -20
  96. package/src/icon-registry.spec.ts +6 -6
  97. package/src/icon-registry.ts +6 -6
  98. package/src/index.ts +64 -63
  99. package/src/namespace/adw.ts +99 -0
  100. package/src/namespace/gtk.ts +22 -0
  101. package/src/preferences-search.ts +1 -1
  102. package/src/slotted-children.spec.ts +5 -3
  103. package/src/source-view/adw-source-view.ts +2 -2
  104. package/src/split-button.spec.ts +5 -5
  105. package/src/styles.generated.ts +1 -1
  106. package/src/test.browser.mts +15 -15
  107. package/lib/types/adw-button.spec.d.ts +0 -1
  108. package/lib/types/adw-drop-down.spec.d.ts +0 -1
  109. package/lib/types/adw-entry.spec.d.ts +0 -1
  110. package/lib/types/adw-icon.spec.d.ts +0 -1
  111. package/lib/types/adw-menu-button.spec.d.ts +0 -1
  112. package/lib/types/adw-progress-bar.spec.d.ts +0 -1
  113. package/lib/types/adw-switch.spec.d.ts +0 -1
  114. /package/lib/types/{adw-checks.spec.d.ts → checks.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-web",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "description": "Adwaita/Libadwaita web components for browser targets",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -45,14 +45,14 @@
45
45
  "@codemirror/language": "^6.12.4",
46
46
  "@codemirror/state": "^6.7.0",
47
47
  "@codemirror/view": "^6.43.4",
48
- "@gjsify/adwaita-core": "^0.44.0",
49
- "@gjsify/adwaita-fonts": "^0.44.0",
50
- "@gjsify/adwaita-icons": "^0.44.0",
48
+ "@gjsify/adwaita-core": "^0.46.0",
49
+ "@gjsify/adwaita-fonts": "^0.46.0",
50
+ "@gjsify/adwaita-icons": "^0.46.0",
51
51
  "@lezer/highlight": "^1.2.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@gjsify/cli": "^0.44.0",
55
- "@gjsify/unit": "^0.44.0",
54
+ "@gjsify/cli": "^0.46.0",
55
+ "@gjsify/unit": "^0.46.0",
56
56
  "sass": "^1.101.0",
57
57
  "typescript": "^6.0.3"
58
58
  },
@@ -75,6 +75,9 @@
75
75
  "navigator",
76
76
  "process"
77
77
  ]
78
+ },
79
+ "widgetVocabulary": {
80
+ "role": "renderer"
78
81
  }
79
82
  },
80
83
  "license": "MIT",
@@ -149,7 +149,7 @@ adw-about-dialog {
149
149
  height: 96px;
150
150
  margin-top: var(--spacing-s);
151
151
  margin-bottom: var(--spacing-m);
152
- // Mask-driven adw-icon scaled up to the about-dialog app-icon size.
152
+ // Mask-driven .adw-icon skin scaled up to the about-dialog app-icon size.
153
153
  -webkit-mask-size: contain;
154
154
  mask-size: contain;
155
155
  background-color: currentColor;
package/scss/_button.scss CHANGED
@@ -1,11 +1,11 @@
1
- // _button.scss — adw-button + Adwaita button styles + symbolic icons + .linked.
1
+ // _button.scss — gtk-button + Adwaita button styles + symbolic icons + .linked.
2
2
  // Reference: refs/libadwaita/src/stylesheet/widgets/_buttons.scss
3
3
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
4
4
  // Modifications: Adapted for @gjsify/adwaita-web Web Components.
5
5
 
6
- // <adw-button> is a thin host that renders an inner <button class="adw-button">;
6
+ // <gtk-button> is a thin host that renders an inner <button class="adw-button">;
7
7
  // the class set is the real styling API and works on a plain <button> too.
8
- adw-button {
8
+ gtk-button {
9
9
  display: inline-flex;
10
10
  }
11
11
 
@@ -159,7 +159,7 @@ adw-button {
159
159
 
160
160
  // The symbolic icon (`.adw-icon`) used to be declared here, because the first
161
161
  // widget that needed one was the button. It is `scss/_icon.scss` now — every
162
- // other widget needs one too, and `<adw-icon>` is an element.
162
+ // other widget needs one too, and `<gtk-image>` is an element.
163
163
 
164
164
  // The linked group is `scss/_style_classes.scss` now, under libadwaita's own
165
165
  // `.linked` name (with `.adw-linked` kept as an alias): the documented class is
package/scss/_checks.scss CHANGED
@@ -1,4 +1,4 @@
1
- // _checks.scss — <adw-checkbox> AND <adw-radio>, in ONE partial.
1
+ // _checks.scss — <gtk-check-button> AND <adw-radio>, in ONE partial.
2
2
  //
3
3
  // WHY ONE FILE FOR TWO ELEMENTS. Upstream's
4
4
  // `refs/libadwaita/src/stylesheet/widgets/_checks.scss` merges them deliberately:
@@ -51,7 +51,7 @@ $bullet-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
51
51
  $dash-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath fill='black' d='M 3 5 A 2 2 0 0 0 1 7 A 2 2 0 0 0 3 9 L 11 9 A 2 2 0 0 0 13 7 A 2 2 0 0 0 11 5 Z'/%3E%3C/svg%3E");
52
52
 
53
53
  // `checkbutton { … }` (:3-18) — the host is the button, not the indicator.
54
- adw-checkbox,
54
+ gtk-check-button,
55
55
  adw-radio {
56
56
  position: relative;
57
57
  display: inline-flex;
@@ -176,7 +176,7 @@ adw-radio {
176
176
  }
177
177
 
178
178
  // `check { border-radius: $check_radius }` (:67-68)
179
- adw-checkbox .adw-check-indicator {
179
+ gtk-check-button .adw-check-indicator {
180
180
  border-radius: 6px;
181
181
  }
182
182
 
@@ -186,7 +186,7 @@ adw-radio .adw-check-indicator {
186
186
  }
187
187
 
188
188
  // `check:checked` → check.svg (:70) / `radio:checked` → bullet.svg (:76)
189
- adw-checkbox[checked] .adw-check-indicator::after {
189
+ gtk-check-button[checked] .adw-check-indicator::after {
190
190
  mask-image: $check-glyph;
191
191
  -webkit-mask-image: $check-glyph;
192
192
  }
@@ -201,7 +201,7 @@ adw-radio[checked] .adw-check-indicator::after {
201
201
  // wins over the check/bullet on a control that is both. Same order, same
202
202
  // specificity, same outcome here — and the same precedence `resolveCheckState`
203
203
  // in `@gjsify/adwaita-core` encodes for the a11y value.
204
- adw-checkbox[indeterminate] .adw-check-indicator::after,
204
+ gtk-check-button[indeterminate] .adw-check-indicator::after,
205
205
  adw-radio[indeterminate] .adw-check-indicator::after {
206
206
  mask-image: $dash-glyph;
207
207
  -webkit-mask-image: $dash-glyph;
@@ -209,7 +209,7 @@ adw-radio[indeterminate] .adw-check-indicator::after {
209
209
 
210
210
  // `checkbutton.selection-mode { … }` (:83-95) — the big round check used in a
211
211
  // selection-mode header bar.
212
- adw-checkbox.selection-mode,
212
+ gtk-check-button.selection-mode,
213
213
  adw-radio.selection-mode {
214
214
  border-radius: 100px;
215
215
 
@@ -1,8 +1,8 @@
1
- // _drop_down.scss — adw-drop-down: a standalone dropdown selector (the web
1
+ // _drop_down.scss — gtk-drop-down: a standalone dropdown selector (the web
2
2
  // counterpart of Gtk.DropDown). A normal Adwaita button showing the current
3
3
  // selection + a `pan-down` chevron, dropping an elevated Adwaita popover list of
4
4
  // options. The popover reproduces libadwaita's popover.menu > contents surface
5
- // (soft triple shadow), the items its modelbutton rows, matching <adw-menu-button>.
5
+ // (soft triple shadow), the items its modelbutton rows, matching <gtk-menu-button>.
6
6
  // Reference: refs/libadwaita/src/stylesheet/widgets/_popovers.scss (popover > contents)
7
7
  // Reference: refs/libadwaita/src/stylesheet/widgets/_menus.scss (modelbutton rows)
8
8
  // Reference: refs/libadwaita/src/stylesheet/widgets/_dropdowns.scss (dropdown button)
@@ -76,7 +76,7 @@
76
76
  opacity: 0.55;
77
77
  }
78
78
 
79
- // The popover SURFACE is `<adw-popover>`'s (`_popover.scss`, the `[menu]`
79
+ // The popover SURFACE is `<gtk-popover>`'s (`_popover.scss`, the `[menu]`
80
80
  // variant — a dropdown's popover is a `popover.menu`, _dropdowns.scss:22).
81
81
  // What stays here is what libadwaita ALSO scopes to `dropdown`:
82
82
  // - the extra 6px above the contents (`popover.menu { padding-top: 6px }`,
package/scss/_entry.scss CHANGED
@@ -1,10 +1,10 @@
1
- // _entry.scss — adw-entry / .adw-entry text input (e.g. a browser URL bar).
1
+ // _entry.scss — gtk-entry / .adw-entry text input (e.g. a browser URL bar).
2
2
  // Reference: refs/libadwaita/src/stylesheet/widgets/_entries.scss
3
3
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
4
4
  // Modifications: Adapted for @gjsify/adwaita-web Web Components.
5
5
 
6
- // <adw-entry> hosts an inner <input class="adw-entry">; it fills its flex slot.
7
- adw-entry {
6
+ // <gtk-entry> hosts an inner <input class="adw-entry">; it fills its flex slot.
7
+ gtk-entry {
8
8
  display: flex;
9
9
  flex: 1;
10
10
  min-width: 0;
@@ -69,7 +69,7 @@ adw-expander-row {
69
69
  transform: rotate(180deg);
70
70
  }
71
71
 
72
- // The optional enable switch is `<adw-switch>` and needs no geometry of its
72
+ // The optional enable switch is `<gtk-switch>` and needs no geometry of its
73
73
  // own — `.adw-expander-row-enable-switch` is a query/override hook only. This
74
74
  // block used to be a character-for-character copy of the switch row's toggle
75
75
  // (44×24 box, hidden input, 20px knob, translateX(20px), focus ring), because
package/scss/_icon.scss CHANGED
@@ -1,4 +1,4 @@
1
- // _icon.scss — the symbolic icon box behind <adw-icon>.
1
+ // _icon.scss — the symbolic icon box behind <gtk-image>.
2
2
  //
3
3
  // A symbolic icon is rendered as a CSS mask rather than an <img> or inline SVG,
4
4
  // so `currentColor` drives the fill and the glyph re-themes with whatever
@@ -36,7 +36,7 @@
36
36
 
37
37
  // `currentColor` IS the icon: the mask is painted with the inherited colour,
38
38
  // so a suggested-action button's `--accent-fg-color` has to reach it. Since
39
- // <adw-icon> is a custom element it is also in `$adw-components`, and the
39
+ // <gtk-image> is a custom element it is also in `$adw-components`, and the
40
40
  // ADR-0010 boundary reset re-roots `color` on every entry there — which would
41
41
  // otherwise repaint every icon in `--window-fg-color` regardless of its host.
42
42
  // Class beats type selector, so this restores inheritance.
@@ -66,7 +66,7 @@
66
66
  // adw-inline-view-switcher.c:142), and GTK's icon theme returns the same
67
67
  // broken-image paintable for a name it cannot find. So the three renderers end
68
68
  // up on ONE glyph: GTK draws it from the system theme, the web draws it from
69
- // here, and NativeScript cannot reach the state at all — its AdwIcon takes SVG
69
+ // here, and NativeScript cannot reach the state at all — its GtkImage takes SVG
70
70
  // SOURCE, not a name, so a missing icon there is a missing import the compiler
71
71
  // rejects. Nothing THROWS, on any of the three: an icon is decorative and taking
72
72
  // an application down over a glyph is a failure mode none of them has.
@@ -82,7 +82,7 @@
82
82
  -webkit-mask-image: var(--icon-image-missing);
83
83
  }
84
84
 
85
- // …and NO name at all draws nothing, rather than the broken glyph. `<adw-icon>`
85
+ // …and NO name at all draws nothing, rather than the broken glyph. `<gtk-image>`
86
86
  // leaves the node classless only when `icon-name` is ABSENT or EMPTY, which is the
87
87
  // state where the HOST decided against an icon — the tab strip's indicator slot,
88
88
  // the avatar's fallback while initials show. `Gtk.Image` with a NULL icon-name
@@ -1,4 +1,4 @@
1
- // _menu_button.scss — adw-menu-button styling: a flat (or circular) icon button
1
+ // _menu_button.scss — gtk-menu-button styling: a flat (or circular) icon button
2
2
  // that drops an Adwaita-styled popover menu (the web counterpart of
3
3
  // Adw.MenuButton / Gtk.MenuButton). The button mirrors libadwaita's flat/circular
4
4
  // `menubutton > button`; the popover reproduces `popover.menu > contents` with
@@ -77,8 +77,8 @@
77
77
  }
78
78
  }
79
79
 
80
- // The surface, the heading and the item row are `<adw-popover>`'s —
81
- // `_popover.scss` (`adw-popover`, `.adw-popover-title`, `.adw-popover-item`).
80
+ // The surface, the heading and the item row are `<gtk-popover>`'s —
81
+ // `_popover.scss` (`gtk-popover`, `.adw-popover-title`, `.adw-popover-item`).
82
82
  // What used to be here was one of three hand-rolled copies: a
83
83
  // `--card-radius` (12px) surface where libadwaita's is 15px, and a
84
84
  // `calc(var(--button-radius) - 2px)` (7px) row where `modelbutton` is 9px.
@@ -1,4 +1,4 @@
1
- // _popover.scss — <adw-popover>, the one popover surface in this package.
1
+ // _popover.scss — <gtk-popover>, the one popover surface in this package.
2
2
  //
3
3
  // It replaces three hand-rolled copies (`.adw-menu-button-popover`,
4
4
  // `.adw-drop-down-popover`, `.adw-split-button-menu`) that disagreed with
@@ -38,7 +38,7 @@
38
38
  // drop-down already used; the split button's 4px was the odd one out.
39
39
  $popover-gap: 6px;
40
40
 
41
- adw-popover {
41
+ gtk-popover {
42
42
  // $popover_radius = $menu_radius + 6 (_common.scss:10,13). Exposed as a token
43
43
  // so consumers re-theme it the same way as the rest (ADR 0010), with the
44
44
  // libadwaita value as the fallback.
@@ -1,4 +1,4 @@
1
- // _progress_bar.scss — <adw-progress-bar>, the determinate partner to
1
+ // _progress_bar.scss — <gtk-progress-bar>, the determinate partner to
2
2
  // <adw-spinner>.
3
3
  //
4
4
  // TWO SOURCES, AND WHICH HALF CAME FROM WHICH — the two disagree, so this is not
@@ -24,7 +24,7 @@
24
24
  //
25
25
  // NOT PORTED, deliberately: `progressbar.vertical` (:10-15) and the four
26
26
  // `progress.{left,right,top,bottom}` corner-radius rules (:37-55). Both exist
27
- // for orientations and trough-splitting `<adw-progress-bar>` does not expose —
27
+ // for orientations and trough-splitting `<gtk-progress-bar>` does not expose —
28
28
  // there is no `orientation` attribute — and a rule nothing can ever select is a
29
29
  // rule that rots.
30
30
  //
@@ -39,7 +39,7 @@
39
39
  // `.dimmed` / `.numeric`, which the text node @extends exactly as upstream does.
40
40
  @use 'labels';
41
41
 
42
- adw-progress-bar {
42
+ gtk-progress-bar {
43
43
  display: flex;
44
44
  flex-direction: column;
45
45
  gap: var(--spacing-xs);
@@ -104,7 +104,7 @@ adw-progress-bar {
104
104
  // The `.osd` variant (:59-83): a hairline bar with no trough at all, the way
105
105
  // it is drawn under a header bar. `[osd]` is the attribute this element takes;
106
106
  // `.osd` is libadwaita's DOCUMENTED spelling for the same variant, and
107
- // `_style_classes.scss` excludes `adw-progress-bar` from the generic OSD
107
+ // `_style_classes.scss` excludes `gtk-progress-bar` from the generic OSD
108
108
  // surface exactly so the class lands here instead of turning the bar into a
109
109
  // dark translucent box.
110
110
  &[osd],
package/scss/_reset.scss CHANGED
@@ -18,7 +18,9 @@
18
18
  // neutralises.
19
19
 
20
20
  // Every custom element adwaita-web defines — one entry per `customElements
21
- // .define('adw-…')` call under `src/`.
21
+ // .define(…)` call under `src/`, in BOTH namespaces: a tag carries the prefix of
22
+ // the library that owns its GType (ADR 0034 clause 1), so `gtk-entry` is on this
23
+ // list beside `adw-action-row`.
22
24
  //
23
25
  // DERIVED, NOT REMEMBERED: `scripts/check-adwaita-reset-components.mjs` walks
24
26
  // those calls and fails on any tag missing from this list (and on any entry with
@@ -29,19 +31,19 @@
29
31
  $adw-components:
30
32
  adw-about-dialog, adw-action-row, adw-alert-dialog, adw-alert-response,
31
33
  adw-avatar, adw-banner, adw-bottom-sheet, adw-bottom-sheet-content,
32
- adw-bottom-sheet-sheet, adw-button, adw-button-content, adw-button-row,
34
+ adw-bottom-sheet-sheet, gtk-button, adw-button-content, adw-button-row,
33
35
  adw-card, adw-carousel, adw-carousel-indicator-dots,
34
- adw-carousel-indicator-lines, adw-checkbox, adw-clamp, adw-combo-row,
36
+ adw-carousel-indicator-lines, gtk-check-button, adw-clamp, adw-combo-row,
35
37
  adw-data-grid,
36
- adw-dialog, adw-drop-down, adw-entry, adw-entry-row, adw-expander-row,
37
- adw-header-bar, adw-icon, adw-inline-view-switcher, adw-menu-button,
38
+ adw-dialog, gtk-drop-down, gtk-entry, adw-entry-row, adw-expander-row,
39
+ adw-header-bar, gtk-image, adw-inline-view-switcher, gtk-menu-button,
38
40
  adw-navigation-page,
39
41
  adw-navigation-split-view, adw-navigation-view, adw-overlay-split-view,
40
- adw-password-entry-row, adw-popover, adw-preferences-dialog,
41
- adw-preferences-group, adw-preferences-page, adw-progress-bar, adw-radio,
42
+ adw-password-entry-row, gtk-popover, adw-preferences-dialog,
43
+ adw-preferences-group, adw-preferences-page, gtk-progress-bar, adw-radio,
42
44
  adw-shortcut-label, adw-sidebar, adw-sidebar-item,
43
45
  adw-sidebar-section, adw-source-view, adw-spinner, adw-spin-row,
44
- adw-split-button, adw-status-page, adw-switch, adw-switch-row,
46
+ adw-split-button, adw-status-page, gtk-switch, adw-switch-row,
45
47
  adw-tab-page, adw-tab-view, adw-toast-overlay, adw-toggle, adw-toggle-group,
46
48
  adw-toolbar-view, adw-view-stack, adw-view-stack-page, adw-view-switcher,
47
49
  adw-view-switcher-bar, adw-view-switcher-page, adw-window, adw-window-title,
@@ -111,7 +111,7 @@
111
111
  }
112
112
  }
113
113
 
114
- // The dropdown menu is `<adw-popover>` (`_popover.scss`), and this was the
114
+ // The dropdown menu is `<gtk-popover>` (`_popover.scss`), and this was the
115
115
  // WORST of the three hand-rolled surfaces: `--button-radius` (9px) where
116
116
  // libadwaita's popover is 15px, under a two-layer shadow that exists nowhere
117
117
  // in the vendored stylesheet (`popover > contents` has three,
@@ -186,7 +186,7 @@
186
186
  // split buttons go flat — unless they are `.raised`, `.suggested-action`,
187
187
  // `.destructive-action`, `.opaque`, or sit inside a `.linked` group. Text-only
188
188
  // buttons keep their frame, which is why this cannot be a blanket
189
- // `.toolbar adw-button { … }`.
189
+ // `.toolbar gtk-button { … }`.
190
190
  $_keeps-frame: ':not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque)';
191
191
 
192
192
  .toolbar {
@@ -195,9 +195,9 @@ $_keeps-frame: ':not(.raised):not(.suggested-action):not(.destructive-action):no
195
195
  gap: 6px;
196
196
  padding: 6px;
197
197
 
198
- adw-button#{$_keeps-frame} .adw-button.icon-only,
199
- adw-button#{$_keeps-frame}:has(adw-button-content) .adw-button,
200
- adw-menu-button#{$_keeps-frame} .adw-button,
198
+ gtk-button#{$_keeps-frame} .adw-button.icon-only,
199
+ gtk-button#{$_keeps-frame}:has(adw-button-content) .adw-button,
200
+ gtk-menu-button#{$_keeps-frame} .adw-button,
201
201
  adw-split-button#{$_keeps-frame} .adw-button {
202
202
  background-color: transparent;
203
203
 
@@ -215,8 +215,8 @@ $_keeps-frame: ':not(.raised):not(.suggested-action):not(.destructive-action):no
215
215
  // group only reads as one control if its members are raised.
216
216
  .linked,
217
217
  .adw-linked {
218
- adw-button#{$_keeps-frame} .adw-button,
219
- adw-menu-button#{$_keeps-frame} .adw-button,
218
+ gtk-button#{$_keeps-frame} .adw-button,
219
+ gtk-menu-button#{$_keeps-frame} .adw-button,
220
220
  adw-split-button#{$_keeps-frame} .adw-button {
221
221
  background-color: var(--button-bg-color);
222
222
 
@@ -265,7 +265,7 @@ $_keeps-frame: ':not(.raised):not(.suggested-action):not(.destructive-action):no
265
265
  //
266
266
  // This is a token REBIND, not just a colour: everything accent-coloured inside
267
267
  // an OSD surface turns white without knowing it is inside one.
268
- .osd:not(adw-progress-bar):not(adw-button):not(adw-menu-button):not(adw-split-button):not(
268
+ .osd:not(gtk-progress-bar):not(gtk-button):not(gtk-menu-button):not(adw-split-button):not(
269
269
  adw-inline-view-switcher
270
270
  ) {
271
271
  --accent-bg-color: rgb(255 255 255 / 75%);
@@ -295,8 +295,8 @@ $_keeps-frame: ':not(.raised):not(.suggested-action):not(.destructive-action):no
295
295
  // it USED to add a 2px gap between children, which is a segmented look, not a
296
296
  // linked one. The gap is gone; a consumer who wanted it can say `gap`.
297
297
  // The styled node is either the child itself (a bare `.adw-button` /
298
- // `.adw-entry`) or one rendered inside the child host element (`<adw-button>`,
299
- // `<adw-menu-button>`, `<adw-drop-down>`, …) — so both spellings are matched
298
+ // `.adw-entry`) or one rendered inside the child host element (`<gtk-button>`,
299
+ // `<gtk-menu-button>`, `<gtk-drop-down>`, …) — so both spellings are matched
300
300
  // rather than enumerating host tags the way GTK has to.
301
301
  $_linked-nodes: '.adw-button', '.adw-entry';
302
302
 
package/scss/_switch.scss CHANGED
@@ -1,4 +1,4 @@
1
- // _switch.scss — the <adw-switch> control: a track, a hidden checkbox and a
1
+ // _switch.scss — the <gtk-switch> control: a track, a hidden checkbox and a
2
2
  // sliding knob. UNSCOPED, which is the whole point of the partial.
3
3
  //
4
4
  // WHY IT IS ITS OWN FILE. These rules used to live inside `_switch_row.scss`,
@@ -24,7 +24,7 @@
24
24
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
25
25
  // Copyright (c) 2025 csm (adwaita-web). MIT License.
26
26
  // Modifications: Adapted for @gjsify/adwaita-web Web Components; lifted out of
27
- // `adw-switch-row {}` so <adw-switch> is usable anywhere.
27
+ // `adw-switch-row {}` so <gtk-switch> is usable anywhere.
28
28
 
29
29
  .adw-switch {
30
30
  position: relative;
@@ -1,6 +1,6 @@
1
1
  // _switch_row.scss — adw-switch-row styling.
2
2
  //
3
- // The TOGGLE is not here: it is `<adw-switch>` and `scss/_switch.scss`. It used
3
+ // The TOGGLE is not here: it is `<gtk-switch>` and `scss/_switch.scss`. It used
4
4
  // to be, nested under `adw-switch-row {`, which is exactly why `.adw-switch` was
5
5
  // unreachable from anywhere else and `_expander_row.scss` grew a
6
6
  // character-for-character copy of it.
package/scss/_toast.scss CHANGED
@@ -121,7 +121,7 @@ adw-toast-overlay {
121
121
  }
122
122
 
123
123
  // Close affordance — `window-close-symbolic` in a 24px circle, as upstream builds it
124
- // (adw-toast-widget.ui:64). The element supplies the <adw-icon>; this only places it.
124
+ // (adw-toast-widget.ui:64). The element supplies the <gtk-image>; this only places it.
125
125
  .adw-toast-close-button {
126
126
  box-sizing: border-box;
127
127
  flex-shrink: 0;
@@ -13,7 +13,7 @@
13
13
  // Style-isolation boundary — emitted before the components so their own rules
14
14
  // override this typographic/box-model floor (see _reset.scss).
15
15
  @use 'reset';
16
- // The ONE symbolic-icon box, behind <adw-icon>. Emitted before every widget that
16
+ // The ONE symbolic-icon box, behind <gtk-image>. Emitted before every widget that
17
17
  // draws one, so a context that sizes its own icons (the about dialog's 96px, the
18
18
  // split button's 14px arrows, the view switcher's 16px) still wins on ordinary
19
19
  // specificity.
@@ -46,7 +46,7 @@
46
46
  @use 'menu_button';
47
47
  @use 'drop_down';
48
48
  @use 'toggle_group';
49
- // The ONE toggle, behind <adw-switch>. Emitted before `switch_row` and
49
+ // The ONE toggle, behind <gtk-switch>. Emitted before `switch_row` and
50
50
  // `expander_row`, the two widgets that host one — and which each carried their
51
51
  // own copy of it until it was lifted out of `adw-switch-row {}`.
52
52
  @use 'switch';
@@ -253,9 +253,9 @@ export const AdwActionRowsTest = async () => {
253
253
  setAttr(row, 'start-icon-name', vector.startIconName);
254
254
  setAttr(row, 'end-icon-name', vector.endIconName);
255
255
 
256
- // The two `image.icon.{start,end}` nodes are <adw-icon>, not hand-rolled
256
+ // The two `image.icon.{start,end}` nodes are <gtk-image>, not hand-rolled
257
257
  // decorative spans.
258
- const icons = Array.from(row.querySelectorAll('adw-icon')) as HTMLElement[];
258
+ const icons = Array.from(row.querySelectorAll('gtk-image')) as HTMLElement[];
259
259
  expect(icons.length).toBe(2);
260
260
  expect(!icons[0]!.hidden).toBe(vector.startIconVisible);
261
261
  expect(!icons[1]!.hidden).toBe(vector.endIconVisible);
@@ -122,7 +122,7 @@ export const AdwButtonContentTest = async () => {
122
122
  // the generated classes never carry `-symbolic`. This element used
123
123
  // to interpolate the raw name, so `icon-name="folder-download-symbolic"`
124
124
  // asked for `.adw-icon--folder-download-symbolic`, a class that has
125
- // never existed, and drew an empty 16px box. `<adw-icon>` applies
125
+ // never existed, and drew an empty 16px box. `<gtk-image>` applies
126
126
  // `normalizeIconName`, which also makes the `' '` row assertable
127
127
  // instead of skipped: a space is not one CSS token, so it lands on
128
128
  // `image-missing` — the missing icon that row's own rule records GTK
@@ -4,9 +4,13 @@
4
4
  // the open document keeps its construction-time title otherwise, and nothing notices
5
5
  // because the attribute is still there and A title still renders.
6
6
  //
7
- // `Adw.HeaderBar` builds its centre from `title`/`subtitle` through a derived
8
- // `AdwWindowTitle` bound to the properties, unless a `title-widget` replaces it — the
9
- // either/or the `slot="center"` case below asserts.
7
+ // The either/or the `slot="center"` case below asserts IS `Adw.HeaderBar`'s: setting
8
+ // `title-widget` empties the centre bin (adw-header-bar.c:1201), and clearing it builds the
9
+ // derived centre again (:1211). What C builds there is a plain `gtk_label_new (NULL)`
10
+ // (`construct_title_label`, :512) with no subtitle, and no `title` property behind it —
11
+ // `update_title` (:475) resolves one from the ancestry. The `<adw-window-title>` centre and
12
+ // the title/subtitle PAIR are this port's DIVERGENCE, named in `elements/adw-header-bar.ts`
13
+ // and recorded as `HeaderBarRenderState.derivedSubtitle` in `@gjsify/adwaita-core`.
10
14
 
11
15
  import { describe, expect, it } from '@gjsify/unit';
12
16
 
@@ -122,7 +126,8 @@ export const AdwHeaderBarTest = async () => {
122
126
  });
123
127
  });
124
128
 
125
- // The centre is the `<adw-window-title>` Adw.HeaderBar itself derives, so the three
129
+ // The centre is an `<adw-window-title>` — this port's divergence, not the bare
130
+ // `GtkLabel` `construct_title_label` builds (adw-header-bar.c:512) — so the three
126
131
  // rules that element holds through @gjsify/adwaita-core reach the header bar too.
127
132
  // None of them did while the centre was a bare span.
128
133
  await describe('<adw-header-bar> derives an <adw-window-title>', async () => {
@@ -75,6 +75,77 @@ export const AdwTabViewTest = async () => {
75
75
  });
76
76
  });
77
77
 
78
+ // ONE HALF of the upgrade-order defect; the other half is the define order at the
79
+ // foot of `elements/adw-tab-view.ts`, which no test in this realm can observe —
80
+ // both names are already registered by the time a spec runs, and `define` is what
81
+ // upgrades. What IS reproducible here is the STATE that order produced: a real
82
+ // `<adw-tab-page>` next to an `<adw-tab-view>` that is still an ordinary
83
+ // HTMLElement. `document.implementation.createHTMLDocument()` has no browsing
84
+ // context, so nothing it creates is ever upgraded; adopting the element carries it
85
+ // into this document without upgrading it, which INSERTING it would do.
86
+ //
87
+ // Constructing both with `document.createElement` instead would pass either way —
88
+ // both are defined, so both come back upgraded and the ancestor always has the
89
+ // method. The parse-then-define order the site hits is covered in
90
+ // `tests/browser/specs/adwaita-upgrade-order.spec.ts`.
91
+ await describe('adw-tab-page beside an un-upgraded view', async () => {
92
+ await it('reports nothing when the view has none of its methods yet', async () => {
93
+ const view = document.adoptNode(
94
+ document.implementation.createHTMLDocument('').createElement('adw-tab-view'),
95
+ );
96
+ expect('syncDeclaredPage' in view).toBe(false);
97
+ const page = document.createElement('adw-tab-page');
98
+ view.appendChild(page);
99
+
100
+ // A custom-element reaction never throws INTO its caller: the exception is
101
+ // REPORTED, so `setAttribute` returns normally whether or not the callback
102
+ // blew up and only a listener sees the difference. `preventDefault` keeps a
103
+ // red run from also logging it at the console.
104
+ const reported: string[] = [];
105
+ const onError = (event: ErrorEvent) => {
106
+ reported.push(event.message);
107
+ event.preventDefault();
108
+ };
109
+ window.addEventListener('error', onError);
110
+ page.setAttribute('title', 'One');
111
+ window.removeEventListener('error', onError);
112
+
113
+ expect(reported).toStrictEqual([]);
114
+ expect(page.getAttribute('title')).toBe('One');
115
+ });
116
+
117
+ await it('leaves a page appended after connect unadopted rather than throwing', async () => {
118
+ // The imperative surface is `appendPage`; a bare DOM append is out of
119
+ // contract, and the point here is only that it fails QUIETLY — the page
120
+ // carries no `data-page-id`, so `syncDeclaredPage` has no record to touch.
121
+ //
122
+ // "rather than throwing" is ASSERTED and not assumed. Without the listener
123
+ // this test measured only the two counts, and both hold whether or not the
124
+ // callback blew up: a custom-element reaction is REPORTED, never rethrown
125
+ // into `setAttribute`, so the model is untouched either way. Measured — with
126
+ // `syncDeclaredPage` mutated to throw on exactly this path, the whole
127
+ // in-bundle suite of 4631 stayed green and only an unrelated spec's global
128
+ // error sweep noticed.
129
+ const view = makeTabView();
130
+ const late = document.createElement('adw-tab-page');
131
+ view.appendChild(late);
132
+
133
+ const reported: string[] = [];
134
+ const onError = (event: ErrorEvent) => {
135
+ reported.push(event.message);
136
+ event.preventDefault();
137
+ };
138
+ window.addEventListener('error', onError);
139
+ late.setAttribute('title', 'Late');
140
+ window.removeEventListener('error', onError);
141
+
142
+ expect(reported).toStrictEqual([]);
143
+ expect(view.nPages).toBe(3);
144
+ expect(chips(view).length).toBe(3);
145
+ view.parentElement?.remove();
146
+ });
147
+ });
148
+
78
149
  await describe('adw-tab-view expand-tabs / no-close', async () => {
79
150
  await it('no-close hides every close affordance', async () => {
80
151
  const view = makeTabView('no-close');
@@ -259,7 +259,7 @@ export const AdwBottomSheetTest = async () => {
259
259
  const tpl = document.createElement('template');
260
260
  tpl.innerHTML =
261
261
  '<adw-bottom-sheet open="true" modal="true" can-close="true">' +
262
- '<adw-bottom-sheet-content><adw-button pill>Toggle sheet</adw-button></adw-bottom-sheet-content>' +
262
+ '<adw-bottom-sheet-content><gtk-button pill>Toggle sheet</gtk-button></adw-bottom-sheet-content>' +
263
263
  '<adw-bottom-sheet-sheet><button id="inside">Inside</button></adw-bottom-sheet-sheet>' +
264
264
  '</adw-bottom-sheet>';
265
265
  const stage = document.createElement('div');
@@ -269,7 +269,7 @@ export const AdwBottomSheetTest = async () => {
269
269
  const sheet = stage.querySelector('adw-bottom-sheet') as AdwBottomSheet;
270
270
  expect(sheet.open).toBe(true);
271
271
 
272
- const toggle = sheet.querySelector('.adw-bottom-sheet-content adw-button') as HTMLElement;
272
+ const toggle = sheet.querySelector('.adw-bottom-sheet-content gtk-button') as HTMLElement;
273
273
  expect(toggle).toBeTruthy();
274
274
  expect(insideSheet(sheet).id).toBe('inside');
275
275
  // What the page binds: a listener on the custom element, driven by a click