@gjsify/adwaita-core 0.64.12-next.281 → 0.64.13-next.283

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 (46) hide show
  1. package/lib/esm/action-row.js +1 -1
  2. package/lib/esm/conformance/action-row.js +1 -1
  3. package/lib/esm/conformance/expander-row.js +1 -0
  4. package/lib/esm/conformance/index.js +1 -1
  5. package/lib/esm/conformance/label-markup.js +1 -0
  6. package/lib/esm/conformance/label.js +1 -1
  7. package/lib/esm/conformance/list.js +1 -1
  8. package/lib/esm/conformance/rows.js +1 -1
  9. package/lib/esm/conformance/split-button.js +1 -1
  10. package/lib/esm/default-translate.js +1 -0
  11. package/lib/esm/glib.js +1 -1
  12. package/lib/esm/gtk-platform.js +1 -1
  13. package/lib/esm/index.js +1 -1
  14. package/lib/esm/label-markup.js +1 -0
  15. package/lib/esm/label.js +1 -1
  16. package/lib/esm/list.js +1 -1
  17. package/lib/esm/option-list.js +1 -0
  18. package/lib/esm/pango-markup.js +1 -1
  19. package/lib/esm/rows.js +1 -1
  20. package/lib/esm/split-button.js +1 -1
  21. package/lib/types/action-row.d.ts +5 -1
  22. package/lib/types/conformance/action-row.d.ts +28 -0
  23. package/lib/types/conformance/expander-row.d.ts +40 -0
  24. package/lib/types/conformance/index.d.ts +10 -6
  25. package/lib/types/conformance/label-markup.d.ts +73 -0
  26. package/lib/types/conformance/list.d.ts +46 -39
  27. package/lib/types/conformance/rows.d.ts +62 -2
  28. package/lib/types/conformance/split-button.d.ts +7 -3
  29. package/lib/types/default-translate.d.ts +6 -0
  30. package/lib/types/default-translate.spec.d.ts +2 -0
  31. package/lib/types/engine.d.ts +40 -6
  32. package/lib/types/glib.d.ts +40 -0
  33. package/lib/types/glib.spec.d.ts +2 -0
  34. package/lib/types/gtk-platform.d.ts +9 -0
  35. package/lib/types/index.d.ts +13 -7
  36. package/lib/types/label-markup.d.ts +129 -0
  37. package/lib/types/label-markup.spec.d.ts +2 -0
  38. package/lib/types/label.d.ts +6 -0
  39. package/lib/types/list-view.d.ts +4 -4
  40. package/lib/types/list.d.ts +9 -23
  41. package/lib/types/option-list.d.ts +128 -0
  42. package/lib/types/option-list.spec.d.ts +2 -0
  43. package/lib/types/pango-markup.d.ts +47 -2
  44. package/lib/types/rows.d.ts +193 -65
  45. package/lib/types/split-button.d.ts +28 -6
  46. package/package.json +4 -4
@@ -28,7 +28,11 @@ export interface SplitButtonChange {
28
28
  mode: SplitButtonContentMode;
29
29
  /** The label, or `null` unless {@link mode} is `'label'`. */
30
30
  label: string | null;
31
- /** The icon name, or `null` unless {@link mode} is `'icon'`. */
31
+ /**
32
+ * The icon name as `get_icon_name` reads it back: `null` unless {@link mode} is
33
+ * `'icon'`, and `null` as well for an icon name set to `''`
34
+ * ({@link gtkButtonIconNameReadback}).
35
+ */
32
36
  iconName: string | null;
33
37
  /** The child widget — the app's in `'child'` mode, an opaque internal node in `'label'`/`'icon'` mode. */
34
38
  child: object | null;
@@ -135,6 +139,11 @@ export declare class SplitButtonState {
135
139
  /** Subscribe to state changes. Returns an unsubscribe function. */
136
140
  subscribe(listener: SplitButtonListener): () => void;
137
141
  private _emit;
142
+ /**
143
+ * The `notify::*` sequence a content mutation owes, per {@link CONTENT_NOTIFY_ORDER}.
144
+ * Reads the PRE-state, so every caller must build its list before mutating.
145
+ */
146
+ private _contentNotify;
138
147
  /** Which content slot is filled. */
139
148
  get mode(): SplitButtonContentMode;
140
149
  /** The label, or `null` unless {@link mode} is `'label'`. */
@@ -145,11 +154,19 @@ export declare class SplitButtonState {
145
154
  * C, clearing it is a side effect of setting another slot.
146
155
  */
147
156
  setLabel(label: string): boolean;
148
- /** The icon name, or `null` unless {@link mode} is `'icon'`. */
157
+ /**
158
+ * The icon name as `adw_split_button_get_icon_name` reads it back — `null` unless
159
+ * {@link mode} is `'icon'`, and `null` as well for an icon name set to `''`, which
160
+ * leaves GtkButton's internal image EMPTY ({@link gtkButtonIconNameReadback}).
161
+ */
149
162
  get iconName(): string | null;
150
163
  /**
151
164
  * Set the icon name, clearing `label` and `child`. A non-string is rejected —
152
165
  * `g_return_if_fail (icon_name != NULL)`.
166
+ *
167
+ * The guard is C's `g_strcmp0 (icon_name, get_icon_name (self))`: against the
168
+ * READBACK, so `''` is never equal to the `null` it reads back as and every
169
+ * `setIconName('')` is a change that notifies afresh.
153
170
  */
154
171
  setIconName(iconName: string): boolean;
155
172
  /**
@@ -190,15 +207,20 @@ export declare class SplitButtonState {
190
207
  * from a renderer's point of view. A model that is non-empty but draws nothing — one
191
208
  * empty section — is NOT collapsed: it has a node, so it is a menu, which is the
192
209
  * answer GTK gives for the same `GMenu`.
210
+ *
211
+ * Notifies both properties per {@link DROPDOWN_NOTIFY_ORDER}; the guard is on the
212
+ * menu model ALONE, so clearing it on a popover-only button emits nothing.
193
213
  */
194
214
  setMenuModel(input: AdwMenuInput | null | undefined): boolean;
195
215
  /** The popover: the one the app set, or the model-derived stand-in, or `null`. */
196
216
  get popover(): object | null;
197
217
  /**
198
- * Set the popover, dissociating any menu model. The cleared property is notified before
199
- * the set one, the order `set_label()`/`set_icon_name`/`set_child` use throughout this
200
- * widget; GtkMenuButton's own internal ordering is not observable from the upstream
201
- * suite, which only counts per-property notifications.
218
+ * Set (or clear, with `null`) the popover, dissociating any menu model. Both properties
219
+ * are notified per {@link DROPDOWN_NOTIFY_ORDER}, UNCONDITIONALLY — setting a popover on
220
+ * a split button that never had a menu model still emits `notify::menu-model`.
221
+ *
222
+ * The guard is pointer equality on the popover ALONE, so handing back the
223
+ * model-derived popover is a no-op that leaves the menu model in place.
202
224
  */
203
225
  setPopover(popover: object | null | undefined): boolean;
204
226
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-core",
3
- "version": "0.64.12-next.281",
3
+ "version": "0.64.13-next.283",
4
4
  "description": "Headless Adwaita widget behavior (breakpoint condition grammar + apply/unapply state machine, color-scheme observable, avatar derivation) shared by the web and NativeScript Adwaita renderers — pure TS, no platform imports",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -67,9 +67,9 @@
67
67
  "headless"
68
68
  ],
69
69
  "devDependencies": {
70
- "@gjsify/cli": "0.64.12-next.281",
70
+ "@gjsify/cli": "0.64.13-next.283",
71
71
  "@gjsify/node-gi": "file:../../../packages/node-gi/node-gi",
72
- "@gjsify/unit": "0.64.12-next.281",
72
+ "@gjsify/unit": "0.64.13-next.283",
73
73
  "@types/node": "^25.9.2",
74
74
  "typescript": "^6.0.3"
75
75
  },
@@ -93,5 +93,5 @@
93
93
  "url": "https://github.com/gjsify/gjsify/issues"
94
94
  },
95
95
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/adwaita-core#readme",
96
- "gitHead": "c4d2e266c0d9849860b9828c14ebfe37b6d493b8"
96
+ "gitHead": "05fae97125a374e84bf57c2d2d086fb53523f205"
97
97
  }