@gjsify/adwaita-nativescript 0.51.1 → 0.52.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 (137) hide show
  1. package/lib/esm/builder/index.js +1 -0
  2. package/lib/esm/index.js +1 -1
  3. package/lib/esm/namespace/adw.js +1 -1
  4. package/lib/esm/namespace/gio.js +1 -0
  5. package/lib/esm/namespace/gtk.js +1 -1
  6. package/lib/esm/values/sidebar.js +1 -0
  7. package/lib/esm/values/tab-page.js +1 -0
  8. package/lib/esm/widgets/adw-action-row.js +1 -1
  9. package/lib/esm/widgets/adw-alert-dialog.js +1 -1
  10. package/lib/esm/widgets/adw-avatar.js +1 -1
  11. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  12. package/lib/esm/widgets/adw-button-row.js +1 -1
  13. package/lib/esm/widgets/adw-carousel-indicator-dots.js +1 -0
  14. package/lib/esm/widgets/adw-carousel-indicator-lines.js +1 -0
  15. package/lib/esm/widgets/adw-carousel.js +1 -1
  16. package/lib/esm/widgets/adw-clamp.js +1 -1
  17. package/lib/esm/widgets/adw-combo-row.js +1 -1
  18. package/lib/esm/widgets/adw-expander-row.js +1 -1
  19. package/lib/esm/widgets/adw-header-bar.js +1 -1
  20. package/lib/esm/widgets/adw-navigation-page.js +1 -0
  21. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  22. package/lib/esm/widgets/adw-preferences-group.js +1 -1
  23. package/lib/esm/widgets/adw-shortcut-label.js +1 -1
  24. package/lib/esm/widgets/adw-sidebar.js +1 -1
  25. package/lib/esm/widgets/adw-spin-row.js +1 -1
  26. package/lib/esm/widgets/adw-status-page.js +1 -1
  27. package/lib/esm/widgets/adw-tab-view.js +1 -1
  28. package/lib/esm/widgets/adw-toast-overlay.js +1 -1
  29. package/lib/esm/widgets/adw-toggle-group.js +1 -1
  30. package/lib/esm/widgets/adw-toggle.js +1 -0
  31. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  32. package/lib/esm/widgets/adw-view-stack.js +1 -1
  33. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  34. package/lib/esm/widgets/bottom-sheet-state.js +1 -1
  35. package/lib/esm/widgets/box-layout.js +1 -1
  36. package/lib/esm/widgets/builder-slots.js +1 -1
  37. package/lib/esm/widgets/carousel-indicator-base.js +1 -0
  38. package/lib/esm/widgets/carousel-state.js +1 -1
  39. package/lib/esm/widgets/chrome.js +1 -1
  40. package/lib/esm/widgets/gtk-action-bar.js +1 -0
  41. package/lib/esm/widgets/gtk-box.js +1 -1
  42. package/lib/esm/widgets/gtk-button.js +1 -1
  43. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  44. package/lib/esm/widgets/gtk-label.js +1 -1
  45. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  46. package/lib/esm/widgets/icon-theme.js +1 -1
  47. package/lib/esm/widgets/id-reference.js +1 -0
  48. package/lib/esm/widgets/index.js +1 -1
  49. package/lib/esm/widgets/signals.js +1 -1
  50. package/lib/esm/widgets/split-view-base.js +1 -1
  51. package/lib/esm/widgets/view-stack-page.js +1 -0
  52. package/lib/esm/widgets/view-switcher-base.js +1 -1
  53. package/lib/esm/widgets/widget-layout.js +1 -0
  54. package/lib/types/blueprint-markup.spec.d.ts +4 -0
  55. package/lib/types/blueprint-trees.spec.d.ts +1 -0
  56. package/lib/types/builder/index.d.ts +70 -0
  57. package/lib/types/clamp-child.spec.d.ts +2 -0
  58. package/lib/types/gallery-blueprints.spec.d.ts +1 -0
  59. package/lib/types/gtk-value-doors.spec.d.ts +1 -0
  60. package/lib/types/index.d.ts +2 -1
  61. package/lib/types/namespace/adw.d.ts +8 -0
  62. package/lib/types/namespace/gio.d.ts +1 -0
  63. package/lib/types/namespace/gtk.d.ts +3 -0
  64. package/lib/types/shared-trees.spec.d.ts +2 -0
  65. package/lib/types/testing/ns-core.d.mts +340 -0
  66. package/lib/types/value-lists.spec.d.ts +1 -0
  67. package/lib/types/values/sidebar.d.ts +46 -0
  68. package/lib/types/values/tab-page.d.ts +16 -0
  69. package/lib/types/view-switcher-stack.spec.d.ts +1 -0
  70. package/lib/types/widgets/adw-about-dialog.d.ts +12 -0
  71. package/lib/types/widgets/adw-action-row.d.ts +22 -0
  72. package/lib/types/widgets/adw-alert-dialog.d.ts +18 -1
  73. package/lib/types/widgets/adw-avatar.d.ts +12 -0
  74. package/lib/types/widgets/adw-banner.d.ts +12 -0
  75. package/lib/types/widgets/adw-bottom-sheet.d.ts +77 -6
  76. package/lib/types/widgets/adw-button-content.d.ts +12 -0
  77. package/lib/types/widgets/adw-button-row.d.ts +21 -0
  78. package/lib/types/widgets/adw-carousel-indicator-dots.d.ts +7 -0
  79. package/lib/types/widgets/adw-carousel-indicator-lines.d.ts +7 -0
  80. package/lib/types/widgets/adw-carousel.d.ts +31 -15
  81. package/lib/types/widgets/adw-clamp.d.ts +19 -0
  82. package/lib/types/widgets/adw-combo-row.d.ts +20 -1
  83. package/lib/types/widgets/adw-data-grid.d.ts +12 -0
  84. package/lib/types/widgets/adw-expander-row.d.ts +2 -0
  85. package/lib/types/widgets/adw-header-bar.d.ts +14 -0
  86. package/lib/types/widgets/adw-image-button.d.ts +12 -0
  87. package/lib/types/widgets/adw-navigation-page.d.ts +63 -0
  88. package/lib/types/widgets/adw-navigation-view.d.ts +18 -5
  89. package/lib/types/widgets/adw-preferences-dialog.d.ts +12 -0
  90. package/lib/types/widgets/adw-preferences-group.d.ts +14 -0
  91. package/lib/types/widgets/adw-preferences-page.d.ts +12 -0
  92. package/lib/types/widgets/adw-shortcut-label.d.ts +12 -0
  93. package/lib/types/widgets/adw-sidebar.d.ts +26 -0
  94. package/lib/types/widgets/adw-slider-row.d.ts +12 -0
  95. package/lib/types/widgets/adw-spin-row.d.ts +12 -1
  96. package/lib/types/widgets/adw-spinner.d.ts +12 -0
  97. package/lib/types/widgets/adw-split-button.d.ts +12 -0
  98. package/lib/types/widgets/adw-status-page.d.ts +46 -0
  99. package/lib/types/widgets/adw-tab-view.d.ts +60 -27
  100. package/lib/types/widgets/adw-toast-overlay.d.ts +20 -0
  101. package/lib/types/widgets/adw-toggle-group.d.ts +51 -3
  102. package/lib/types/widgets/adw-toggle.d.ts +41 -0
  103. package/lib/types/widgets/adw-toolbar-view.d.ts +22 -1
  104. package/lib/types/widgets/adw-view-stack.d.ts +53 -7
  105. package/lib/types/widgets/adw-view-switcher-bar.d.ts +19 -2
  106. package/lib/types/widgets/adw-window-title.d.ts +12 -0
  107. package/lib/types/widgets/adw-wrap-box.d.ts +12 -0
  108. package/lib/types/widgets/bottom-sheet-state.d.ts +40 -7
  109. package/lib/types/widgets/box-layout.d.ts +3 -17
  110. package/lib/types/widgets/builder-slots.d.ts +48 -0
  111. package/lib/types/widgets/button-content.d.ts +4 -3
  112. package/lib/types/widgets/carousel-indicator-base.d.ts +54 -0
  113. package/lib/types/widgets/carousel-state.d.ts +12 -9
  114. package/lib/types/widgets/chrome.d.ts +32 -6
  115. package/lib/types/widgets/construct-props.d.ts +46 -5
  116. package/lib/types/widgets/gtk-action-bar.d.ts +53 -0
  117. package/lib/types/widgets/gtk-box.d.ts +12 -0
  118. package/lib/types/widgets/gtk-button.d.ts +27 -0
  119. package/lib/types/widgets/gtk-drop-down.d.ts +23 -1
  120. package/lib/types/widgets/gtk-entry.d.ts +12 -0
  121. package/lib/types/widgets/gtk-image.d.ts +12 -0
  122. package/lib/types/widgets/gtk-label.d.ts +47 -1
  123. package/lib/types/widgets/gtk-menu-button.d.ts +22 -0
  124. package/lib/types/widgets/id-reference.d.ts +13 -0
  125. package/lib/types/widgets/index.d.ts +16 -5
  126. package/lib/types/widgets/signals.d.ts +14 -1
  127. package/lib/types/widgets/split-view-base.d.ts +26 -2
  128. package/lib/types/widgets/tab-view-state.d.ts +3 -3
  129. package/lib/types/widgets/view-stack-page.d.ts +98 -0
  130. package/lib/types/widgets/view-stack-state.d.ts +7 -3
  131. package/lib/types/widgets/view-switcher-base.d.ts +62 -0
  132. package/lib/types/widgets/widget-layout.d.ts +50 -0
  133. package/package.json +21 -11
  134. package/src/theme/adwaita.css +122 -1
  135. package/lib/esm/widgets/label-text.js +0 -1
  136. package/lib/types/widgets/label-text.d.ts +0 -13
  137. /package/lib/types/{label-text.spec.d.ts → gio-menu.spec.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { GridLayout, type EventData } from '@nativescript/core';
2
2
  import type { AdwInlineViewSwitcherDisplayMode, AdwViewSwitcherPolicy, ViewSwitcherState } from '@gjsify/adwaita-core';
3
+ import type { AdwViewStack } from './adw-view-stack.js';
3
4
  import { type AdwViewPage, type ViewSwitcherKind, type ViewSwitcherNotifyPayload } from './view-switcher-model.js';
4
5
  export type { AdwViewPage };
5
6
  /** Event name emitted when the selected view changes. Mirrors GObject `notify::selected`. */
@@ -14,6 +15,18 @@ export interface NotifyViewSelectedEventData extends EventData, ViewSwitcherNoti
14
15
  declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
15
16
  connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
16
17
  disconnect(handlerId: number): void;
18
+ get halign(): string;
19
+ set halign(value: string | number);
20
+ get valign(): string;
21
+ set valign(value: string | number);
22
+ get hexpand(): boolean;
23
+ set hexpand(value: boolean | string);
24
+ get vexpand(): boolean;
25
+ set vexpand(value: boolean | string);
26
+ get marginStart(): number;
27
+ set marginStart(value: number | string);
28
+ get marginEnd(): number;
29
+ set marginEnd(value: number | string);
17
30
  _emit(eventName: string): void;
18
31
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
19
32
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -27,6 +40,8 @@ declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
27
40
  * Subclasses set the bar/button CSS classes for their look.
28
41
  */
29
42
  export declare abstract class AdwViewSwitcherBase extends AdwViewSwitcherBase_base {
43
+ /** `stack` names an `AdwViewStack` of the same tree — see `./builder-slots.ts`. */
44
+ static readonly builderReferences: readonly string[];
30
45
  /** The horizontal switcher bar holding the buttons. */
31
46
  protected readonly _bar: GridLayout;
32
47
  /** `Adw.ViewSwitcher:policy`, default NARROW as in C. */
@@ -38,6 +53,20 @@ export declare abstract class AdwViewSwitcherBase extends AdwViewSwitcherBase_ba
38
53
  /** The headless selection + page model every derivation reads. */
39
54
  protected readonly _state: ViewSwitcherState;
40
55
  private _nodes;
56
+ /** The bound `Adw.ViewSwitcher:stack`, or `null` when this switcher carries its own pages. */
57
+ private _stack;
58
+ private _stackListener;
59
+ /**
60
+ * Whether the CONTENT views are this widget's children.
61
+ *
62
+ * `false` once a stack is bound: an `AdwViewStack` is itself the `GridLayout` its
63
+ * pages live in, so re-parenting them here would empty the stack the consumer just
64
+ * put in the window. The switcher is then the button bar alone, which is what
65
+ * `Adw.ViewSwitcher` is on GTK.
66
+ */
67
+ private _ownsContent;
68
+ /** Guards the round trip switcher -> stack -> `notify::visible-child` -> switcher. */
69
+ private _syncingFromStack;
41
70
  /** CSS class applied to the switcher bar — subclass-specific. */
42
71
  protected abstract get barClass(): string;
43
72
  /** CSS class applied to each switcher button — subclass-specific. */
@@ -64,6 +93,39 @@ export declare abstract class AdwViewSwitcherBase extends AdwViewSwitcherBase_ba
64
93
  * first VISIBLE page otherwise.
65
94
  */
66
95
  setViews(pages: AdwViewPage[]): void;
96
+ /**
97
+ * The half of {@link setViews} a bound stack shares: rebuild the bar, and take the
98
+ * content views only when `ownsContent`.
99
+ */
100
+ private _installPages;
101
+ /**
102
+ * Bind the switcher to an `AdwViewStack` — `adw_view_switcher_set_stack`.
103
+ *
104
+ * THE POINT OF IT is that on GTK the switcher and the stack are two widgets: the
105
+ * bar goes in a header bar, the stack fills the window body, and one property joins
106
+ * them. This surface only had the bundled form — `setViews()` with the content
107
+ * inlined — so a pane ported off GJS had to be rewritten around it. Bound, this
108
+ * widget renders its BUTTONS only: the stack keeps its pages and stays the thing
109
+ * that shows them, exactly as {@link AdwViewSwitcherBar} already does.
110
+ *
111
+ * The page list is read once here. It is re-read when the stack's page COUNT moves,
112
+ * which reaches us through `notify::visible-child` — `AdwViewStack.add` notifies on
113
+ * the auto-pick, and libadwaita rebuilds on the pages model's `items-changed`, which
114
+ * this surface has no counterpart for.
115
+ */
116
+ set_stack(stack: AdwViewStack | null): void;
117
+ /** The bound stack, or `null` — `Adw.ViewSwitcher:stack`. */
118
+ get stack(): AdwViewStack | null;
119
+ set stack(value: AdwViewStack | null);
120
+ private _unbindStack;
121
+ /**
122
+ * Take the bound stack's pages and selection.
123
+ *
124
+ * The buttons are rebuilt only when the page COUNT moved: a selection change must
125
+ * not replace the button under the user's finger, the same rule
126
+ * `selection_changed_cb` follows (adw-view-switcher.c:265-295).
127
+ */
128
+ private _syncFromStack;
67
129
  /** Build one button's NS nodes. Painted by {@link _applySelection}. */
68
130
  private _buildButton;
69
131
  /**
@@ -0,0 +1,50 @@
1
+ import type { Observable } from '@nativescript/core';
2
+ /**
3
+ * A constructor the mixin can wrap — the same shape `withSignals` accepts, restated here so
4
+ * this module does not import the one that applies it.
5
+ */
6
+ type ObservableConstructor = abstract new (...args: any[]) => Observable;
7
+ /** The six accessors the mixin adds. Named so a consumer can annotate with it. */
8
+ export interface GtkWidgetLayout {
9
+ /** `GtkWidget:halign` — a `Gtk.Align` nick, read back from `horizontalAlignment`. */
10
+ halign: string;
11
+ /** `GtkWidget:valign` — a `Gtk.Align` nick, read back from `verticalAlignment`. */
12
+ valign: string;
13
+ /** `GtkWidget:hexpand` — held; see the file header for which parents grant it. */
14
+ hexpand: boolean;
15
+ /** `GtkWidget:vexpand` — held; see the file header for which parents grant it. */
16
+ vexpand: boolean;
17
+ /** `GtkWidget:margin-start` — the leading edge, resolved against the text direction. */
18
+ marginStart: number;
19
+ /** `GtkWidget:margin-end` — the trailing edge, resolved against the text direction. */
20
+ marginEnd: number;
21
+ }
22
+ /**
23
+ * Give a `@nativescript/core` base GTK's widget layout properties.
24
+ *
25
+ * Applied by `withSignals` and nowhere else, so it reaches exactly the classes that meet the
26
+ * platform — the rule arm 6 of `check-nativescript-xml-doors.mjs` already holds for that
27
+ * mixin — and a subclass of a port class inherits it like any other accessor.
28
+ */
29
+ export declare function withGtkWidgetLayout<TBase extends ObservableConstructor>(Base: TBase): (abstract new (...args: any[]) => {
30
+ get halign(): string;
31
+ set halign(value: string | number);
32
+ get valign(): string;
33
+ set valign(value: string | number);
34
+ get hexpand(): boolean;
35
+ set hexpand(value: boolean | string);
36
+ get vexpand(): boolean;
37
+ set vexpand(value: boolean | string);
38
+ get marginStart(): number;
39
+ set marginStart(value: number | string);
40
+ get marginEnd(): number;
41
+ set marginEnd(value: number | string);
42
+ _emit(eventName: string): void;
43
+ addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
44
+ removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
45
+ notify<T extends import("@nativescript/core").EventData>(data: T): void;
46
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
47
+ set(name: string, value: unknown): void;
48
+ get(name: string): unknown;
49
+ }) & TBase;
50
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.51.1",
3
+ "version": "0.52.0",
4
4
  "description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -18,6 +18,10 @@
18
18
  "types": "./lib/types/namespace/gtk.d.ts",
19
19
  "default": "./lib/esm/namespace/gtk.js"
20
20
  },
21
+ "./builder": {
22
+ "types": "./lib/types/builder/index.d.ts",
23
+ "default": "./lib/esm/builder/index.js"
24
+ },
21
25
  "./theme/adwaita.css": "./src/theme/adwaita.css",
22
26
  "./fonts": {
23
27
  "types": "./lib/types/fonts.d.ts",
@@ -26,20 +30,24 @@
26
30
  },
27
31
  "files": [
28
32
  "lib",
33
+ "!lib/types/**/*.d.mts",
34
+ "!lib/types/**/*.spec.d.ts",
29
35
  "src/theme/adwaita.css"
30
36
  ],
31
37
  "scripts": {
32
- "clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs",
38
+ "clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs test.trees.gjs.mjs test.trees.node.mjs",
33
39
  "check": "gjsify tsc --noEmit",
34
40
  "build": "gjsify run build:gjsify && gjsify run build:types",
35
41
  "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
36
42
  "build:types": "gjsify tsc",
37
- "build:test": "gjsify run build:test:gjs && gjsify run build:test:node",
43
+ "build:test": "gjsify run build:test:gjs && gjsify run build:test:node && gjsify run build:test:trees:gjs && gjsify run build:test:trees:node",
38
44
  "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
39
45
  "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
46
+ "build:test:trees:gjs": "gjsify build src/test.trees.mts --app gjs --no-minify --alias @nativescript/core=../testing/ns-core.mjs --outfile test.trees.gjs.mjs",
47
+ "build:test:trees:node": "gjsify build src/test.trees.mts --app node --no-minify --alias @nativescript/core=../testing/ns-core.mjs --outfile test.trees.node.mjs",
40
48
  "test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
41
- "test:gjs": "gjsify run test.gjs.mjs",
42
- "test:node": "node test.node.mjs"
49
+ "test:gjs": "gjsify run test.gjs.mjs && gjsify run test.trees.gjs.mjs",
50
+ "test:node": "node test.node.mjs && node test.trees.node.mjs"
43
51
  },
44
52
  "keywords": [
45
53
  "gjs",
@@ -51,10 +59,10 @@
51
59
  "design-system"
52
60
  ],
53
61
  "dependencies": {
54
- "@gjsify/adwaita-core": "^0.51.1",
55
- "@gjsify/adwaita-fonts": "^0.51.1",
56
- "@gjsify/adwaita-icons": "^0.51.1",
57
- "@gjsify/native-platform": "^0.51.1"
62
+ "@gjsify/adwaita-core": "^0.52.0",
63
+ "@gjsify/adwaita-fonts": "^0.52.0",
64
+ "@gjsify/adwaita-icons": "^0.52.0",
65
+ "@gjsify/native-platform": "^0.52.0"
58
66
  },
59
67
  "peerDependencies": {
60
68
  "@nativescript/core": "*"
@@ -65,8 +73,10 @@
65
73
  }
66
74
  },
67
75
  "devDependencies": {
68
- "@gjsify/cli": "^0.51.1",
69
- "@gjsify/unit": "^0.51.1",
76
+ "@gjsify/blueprint": "^0.52.0",
77
+ "@gjsify/cli": "^0.52.0",
78
+ "@gjsify/unit": "^0.52.0",
79
+ "@gjsify/vite-plugin-blueprint": "^0.52.0",
70
80
  "@types/node": "^25.9.2",
71
81
  "typescript": "^6.0.3"
72
82
  },
@@ -494,9 +494,30 @@ Page.adw-window {
494
494
  color: rgba(0, 0, 0, 0.8);
495
495
  }
496
496
 
497
+ /* `%pill_button` — `padding: 10px 32px; border-radius: 9999px` (_buttons.scss:322-326,
498
+ * pin 42f647ff). The padding is the whole variant, and it is why this rule HAS to
499
+ * restate the height.
500
+ *
501
+ * `.adw-button` above pins `height: 38`, and a NativeScript `height` is an EXACT box
502
+ * where GTK's `min-height` is a floor — the same non-equivalence ADR 0034 measured for
503
+ * `adw-spinner.size`. So a variant that doubles the vertical padding cannot grow the
504
+ * box it sits in: the base budgets 38 − (5 + 5) = 28 for the label, and this one left
505
+ * 38 − (10 + 10) = 18 for a `.adw-button-label` at `font-size: 15`, whose line box does
506
+ * not fit in 18. The pill was clipped, and every consumer that wanted one had to
507
+ * override the height itself — which is how the defect surfaced, in Learn6502.
508
+ *
509
+ * 48 is 28 + (10 + 10): the base's own content box under this variant's padding. GTK
510
+ * derives the same direction from the same numbers — `min-height: 24px` + 5px twice is
511
+ * 34, + 10px twice is 44 — so the pill is taller than the plain button there too.
512
+ *
513
+ * THE RULE THIS VARIANT BROKE, stated because the next variant will meet it: in this
514
+ * stylesheet a class that changes vertical padding on a widget whose base pins an exact
515
+ * `height` must restate that height. `.adw-button.circular` does (34), and both split
516
+ * button halves do (38) beside their own padding. This one did not, and nothing said so. */
497
517
  .adw-button.pill {
498
518
  border-radius: 9999;
499
519
  padding: 10 32 10 32;
520
+ height: 48;
500
521
  }
501
522
 
502
523
  /* `%circular_button` — the explicit exception to the 9px rounded square: a full
@@ -693,6 +714,23 @@ Page.adw-window {
693
714
  vertical-align: center;
694
715
  }
695
716
 
717
+ /* ===== Action bar (Gtk.ActionBar) ===== */
718
+
719
+ /* libadwaita `actionbar > revealer > box`: the headerbar surface with a TOP hairline
720
+ (an inset shadow there; the NS subset has none, so a border) and 7/6px padding. */
721
+ .adw-action-bar {
722
+ background-color: #ffffff;
723
+ border-top-width: 1;
724
+ border-top-color: rgba(0, 0, 0, 0.1);
725
+ padding: 7 6 6 6;
726
+ }
727
+
728
+ .adw-action-bar-start,
729
+ .adw-action-bar-end {
730
+ margin: 0;
731
+ vertical-align: center;
732
+ }
733
+
696
734
  /* ===== Toolbar view ===== */
697
735
 
698
736
  .adw-toolbar-view {
@@ -983,6 +1021,15 @@ Page.adw-window {
983
1021
  margin: 16 0 0 0;
984
1022
  }
985
1023
 
1024
+ /* `.compact` (libadwaita `_misc.scss`, statuspage.compact): tighter margins and `.title-2`. */
1025
+ .adw-status-page.compact .adw-status-page-content {
1026
+ padding: 12 24 12 24;
1027
+ }
1028
+
1029
+ .adw-status-page.compact .adw-status-page-title {
1030
+ font-size: 15;
1031
+ }
1032
+
986
1033
  /* ===== Button row (full-width tappable row) ===== */
987
1034
 
988
1035
  .adw-button-row {
@@ -1326,7 +1373,10 @@ Page.adw-window {
1326
1373
  background-color: transparent;
1327
1374
  }
1328
1375
 
1329
- .adw-carousel-dots {
1376
+ /* The two indicators an app binds to a carousel (`Adw.CarouselIndicatorDots` /
1377
+ `…Lines`): a centred row of markers, the current one `active`. */
1378
+ .adw-carousel-indicator-dots,
1379
+ .adw-carousel-indicator-lines {
1330
1380
  padding: 8 0 8 0;
1331
1381
  }
1332
1382
 
@@ -1340,6 +1390,20 @@ Page.adw-window {
1340
1390
  color: #3584e4;
1341
1391
  }
1342
1392
 
1393
+ /* LINE_LENGTH 35, LINE_WIDTH 3, LINE_SPACING 5 (adw-carousel-indicator-lines.c); the
1394
+ opacity ramp is reduced to the two ends it runs between, 0.3 and 0.9. */
1395
+ .adw-carousel-line {
1396
+ width: 35;
1397
+ height: 3;
1398
+ border-radius: 1.5;
1399
+ margin: 0 2.5 0 2.5;
1400
+ background-color: rgba(0, 0, 6, 0.24);
1401
+ }
1402
+
1403
+ .adw-carousel-line.active {
1404
+ background-color: rgba(0, 0, 6, 0.72);
1405
+ }
1406
+
1343
1407
  /* ===== Navigation view ===== */
1344
1408
 
1345
1409
  .adw-navigation-view {
@@ -1431,6 +1495,12 @@ Page.adw-window {
1431
1495
 
1432
1496
  /* ===== Bottom sheet ===== */
1433
1497
 
1498
+ /* The scrim a modal sheet lays over its content while open — libadwaita's
1499
+ `> dimming` (_bottom-sheet.scss), at the strength `<adw-bottom-sheet>` paints it. */
1500
+ .adw-bottom-sheet-dimming {
1501
+ background-color: rgba(0, 0, 6, 0.32);
1502
+ }
1503
+
1434
1504
  .adw-bottom-sheet-panel {
1435
1505
  background-color: #ffffff;
1436
1506
  border-top-left-radius: 16;
@@ -1444,6 +1514,24 @@ Page.adw-window {
1444
1514
  margin: 0 0 6 0;
1445
1515
  }
1446
1516
 
1517
+ /* The collapsed form the sheet morphs out of, and the only thing a user can tap to
1518
+ open it. Flat and radius-less inside the panel, like libadwaita's
1519
+ `> sheet > stack > button` (_bottom-sheet.scss). */
1520
+ .adw-bottom-sheet-bottom-bar {
1521
+ padding: 8 0;
1522
+ }
1523
+
1524
+ .adw-bottom-sheet-bottom-bar:highlighted {
1525
+ background-color: rgba(0, 0, 0, 0.05);
1526
+ }
1527
+
1528
+ /* can-open off: the bar stays tappable and loses only its press feedback, because
1529
+ upstream refuses the click in the handler rather than disabling the button
1530
+ (adw-bottom-sheet.c:2033-2036). */
1531
+ .adw-bottom-sheet-inert:highlighted {
1532
+ background-color: transparent;
1533
+ }
1534
+
1447
1535
  /* ===== Toast (transient snackbar) ===== */
1448
1536
 
1449
1537
  .adw-toast {
@@ -1872,6 +1960,11 @@ Page.ns-dark.adw-window {
1872
1960
  border-bottom-color: rgba(255, 255, 255, 0.12);
1873
1961
  }
1874
1962
 
1963
+ .ns-dark .adw-action-bar {
1964
+ background-color: #2e2e32;
1965
+ border-top-color: rgba(255, 255, 255, 0.12);
1966
+ }
1967
+
1875
1968
  .ns-dark .adw-header-bar.flat {
1876
1969
  background-color: transparent;
1877
1970
  border-bottom-width: 0;
@@ -1997,6 +2090,18 @@ Page.ns-dark.adw-window {
1997
2090
  color: #ffffff;
1998
2091
  }
1999
2092
 
2093
+ /* The destructive content label needs the DARK scheme's red, and it needs its own rule
2094
+ * because the light one out-specifies the block above: `.adw-button.destructive-action
2095
+ * .adw-button-content-label` is three classes to that selector's two, so `#c01c28` — a
2096
+ * colour picked to sit on the light scheme's `rgba(224, 27, 36, 0.12)` — was winning on
2097
+ * the dark scheme's `rgba(192, 28, 40, 0.18)`. `.adw-button-label` got this override
2098
+ * (above); `.adw-button-content-label` was left behind, which is the asymmetry the
2099
+ * comment on `.adw-button-label` warns about read from the other side. The suggested
2100
+ * variant needs none: its `#ffffff` is right on `#3584e4` in both schemes. */
2101
+ .ns-dark .adw-button.destructive-action .adw-button-content-label {
2102
+ color: #ff7b80;
2103
+ }
2104
+
2000
2105
  /* ===== Dark: split button ===== */
2001
2106
 
2002
2107
  .ns-dark .adw-split-button-action,
@@ -2069,6 +2174,14 @@ Page.ns-dark.adw-window {
2069
2174
  color: #78aeed;
2070
2175
  }
2071
2176
 
2177
+ .ns-dark .adw-carousel-line {
2178
+ background-color: rgba(255, 255, 255, 0.3);
2179
+ }
2180
+
2181
+ .ns-dark .adw-carousel-line.active {
2182
+ background-color: rgba(255, 255, 255, 0.9);
2183
+ }
2184
+
2072
2185
  /* ===== Dark: navigation view ===== */
2073
2186
 
2074
2187
  .ns-dark .adw-navigation-view,
@@ -2137,6 +2250,14 @@ Page.ns-dark.adw-window {
2137
2250
  color: rgba(255, 255, 255, 0.3);
2138
2251
  }
2139
2252
 
2253
+ .ns-dark .adw-bottom-sheet-bottom-bar:highlighted {
2254
+ background-color: rgba(255, 255, 255, 0.07);
2255
+ }
2256
+
2257
+ .ns-dark .adw-bottom-sheet-inert:highlighted {
2258
+ background-color: transparent;
2259
+ }
2260
+
2140
2261
  /* ===== Dark: toast (dark base already; tune for dark page) ===== */
2141
2262
 
2142
2263
  .ns-dark .adw-toast {
@@ -1 +0,0 @@
1
- import"../_virtual/_rolldown/runtime.js";import{stripMarkup as e,stripMnemonic as t}from"@gjsify/adwaita-core";function labelDisplayText(n,r,i){let a=n??``,o=r?e(a)??a:a;return i?t(o):o}function labelMarkupIsUnparseable(t,n){return n&&e(t??``)===null}export{labelDisplayText,labelMarkupIsUnparseable};
@@ -1,13 +0,0 @@
1
- /**
2
- * The string a `Gtk.Label` puts in `Label.text` for a given `label` and the two flags
3
- * that transform it.
4
- *
5
- * ORDER MATTERS AND FOLLOWS THE C: markup is reduced first, the mnemonic marker second.
6
- * `gtk_label_set_markup_with_mnemonic` parses the markup and then takes the underscore out
7
- * of the resulting TEXT, so an `_` inside a tag's attributes is not a mnemonic. Doing it
8
- * the other way round would let `<span font_desc="Sans">` lose its underscore and stop
9
- * parsing.
10
- */
11
- export declare function labelDisplayText(label: string, useMarkup: boolean, useUnderline: boolean): string;
12
- /** Whether `label` carries markup this port could not reduce, so the raw string is shown. */
13
- export declare function labelMarkupIsUnparseable(label: string, useMarkup: boolean): boolean;