@gjsify/adwaita-nativescript 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.
Files changed (154) hide show
  1. package/lib/esm/builder/index.js +1 -1
  2. package/lib/esm/builder/param-values.js +1 -0
  3. package/lib/esm/canvas2d/canvas2d-bridge.js +1 -1
  4. package/lib/esm/capabilities.js +1 -1
  5. package/lib/esm/index.js +1 -1
  6. package/lib/esm/namespace/adw.js +1 -1
  7. package/lib/esm/namespace/gdk.js +1 -1
  8. package/lib/esm/namespace/gio.js +1 -1
  9. package/lib/esm/namespace/glib.js +1 -1
  10. package/lib/esm/namespace/gobject.js +1 -1
  11. package/lib/esm/namespace/gtk.js +1 -1
  12. package/lib/esm/widgets/adw-about-dialog.js +2 -1
  13. package/lib/esm/widgets/adw-action-row.js +1 -1
  14. package/lib/esm/widgets/adw-alert-dialog.js +1 -1
  15. package/lib/esm/widgets/adw-application-window.js +1 -1
  16. package/lib/esm/widgets/adw-avatar.js +1 -1
  17. package/lib/esm/widgets/adw-banner.js +1 -1
  18. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  19. package/lib/esm/widgets/adw-button-content.js +1 -1
  20. package/lib/esm/widgets/adw-carousel.js +1 -1
  21. package/lib/esm/widgets/adw-combo-row.js +1 -1
  22. package/lib/esm/widgets/adw-data-grid.js +1 -1
  23. package/lib/esm/widgets/adw-dialog.js +1 -1
  24. package/lib/esm/widgets/adw-entry-row.js +1 -1
  25. package/lib/esm/widgets/adw-expander-row.js +1 -1
  26. package/lib/esm/widgets/adw-image-button.js +1 -1
  27. package/lib/esm/widgets/adw-navigation-page.js +1 -1
  28. package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
  29. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  30. package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
  31. package/lib/esm/widgets/adw-password-entry-row.js +1 -1
  32. package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
  33. package/lib/esm/widgets/adw-preferences-page.js +1 -1
  34. package/lib/esm/widgets/adw-sidebar.js +1 -1
  35. package/lib/esm/widgets/adw-slider-row.js +1 -1
  36. package/lib/esm/widgets/adw-spin-row.js +1 -1
  37. package/lib/esm/widgets/adw-spinner.js +1 -1
  38. package/lib/esm/widgets/adw-split-button.js +1 -1
  39. package/lib/esm/widgets/adw-switch-row.js +1 -1
  40. package/lib/esm/widgets/adw-tab-view.js +1 -1
  41. package/lib/esm/widgets/adw-toast-overlay.js +1 -1
  42. package/lib/esm/widgets/adw-toggle-group.js +1 -1
  43. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  44. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  45. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  46. package/lib/esm/widgets/application.js +1 -1
  47. package/lib/esm/widgets/construct-props.js +1 -1
  48. package/lib/esm/widgets/gtk-action-bar.js +1 -1
  49. package/lib/esm/widgets/gtk-box.js +1 -1
  50. package/lib/esm/widgets/gtk-button.js +1 -1
  51. package/lib/esm/widgets/gtk-check-button.js +1 -1
  52. package/lib/esm/widgets/gtk-drawing-area.js +1 -1
  53. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  54. package/lib/esm/widgets/gtk-entry.js +1 -1
  55. package/lib/esm/widgets/gtk-grid.js +1 -1
  56. package/lib/esm/widgets/gtk-image.js +1 -1
  57. package/lib/esm/widgets/gtk-label.js +1 -1
  58. package/lib/esm/widgets/gtk-list-box.js +1 -1
  59. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  60. package/lib/esm/widgets/gtk-revealer.js +1 -1
  61. package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
  62. package/lib/esm/widgets/gtk-stack.js +1 -1
  63. package/lib/esm/widgets/gtk-text-view.js +1 -1
  64. package/lib/esm/widgets/gtk-toggle-button.js +1 -1
  65. package/lib/esm/widgets/gtk-window.js +1 -1
  66. package/lib/esm/widgets/icon-path.js +1 -1
  67. package/lib/esm/widgets/icon-render.js +1 -0
  68. package/lib/esm/widgets/icon-theme.js +1 -1
  69. package/lib/esm/widgets/index.js +1 -1
  70. package/lib/esm/widgets/signals.js +1 -1
  71. package/lib/esm/widgets/stack-page.js +1 -1
  72. package/lib/esm/widgets/view-stack-page.js +1 -1
  73. package/lib/esm/widgets/widget-layout.js +1 -1
  74. package/lib/esm/widgets/widget-mapping.js +1 -0
  75. package/lib/types/about-dialog-doors.spec.d.ts +1 -0
  76. package/lib/types/builder/index.d.ts +4 -0
  77. package/lib/types/builder/param-values.d.ts +21 -0
  78. package/lib/types/carousel-doors.spec.d.ts +1 -0
  79. package/lib/types/gio-resource.spec.d.ts +1 -0
  80. package/lib/types/gio.spec.d.ts +2 -0
  81. package/lib/types/icon-resources.spec.d.ts +2 -0
  82. package/lib/types/index.d.ts +2 -2
  83. package/lib/types/namespace/adw.d.ts +1 -1
  84. package/lib/types/namespace/gdk.d.ts +1 -0
  85. package/lib/types/namespace/gio.d.ts +2 -0
  86. package/lib/types/namespace/glib.d.ts +2 -1
  87. package/lib/types/namespace/gtk.d.ts +1 -0
  88. package/lib/types/param-values.spec.d.ts +1 -0
  89. package/lib/types/testing/ns-core.d.mts +55 -14
  90. package/lib/types/widget-map.spec.d.ts +1 -0
  91. package/lib/types/widgets/adw-about-dialog.d.ts +34 -2
  92. package/lib/types/widgets/adw-action-row.d.ts +10 -1
  93. package/lib/types/widgets/adw-alert-dialog.d.ts +37 -13
  94. package/lib/types/widgets/adw-application-window.d.ts +0 -3
  95. package/lib/types/widgets/adw-avatar.d.ts +10 -1
  96. package/lib/types/widgets/adw-banner.d.ts +10 -1
  97. package/lib/types/widgets/adw-bottom-sheet.d.ts +10 -1
  98. package/lib/types/widgets/adw-button-content.d.ts +10 -1
  99. package/lib/types/widgets/adw-carousel.d.ts +24 -3
  100. package/lib/types/widgets/adw-clamp.d.ts +10 -1
  101. package/lib/types/widgets/adw-combo-row.d.ts +4 -0
  102. package/lib/types/widgets/adw-data-grid.d.ts +10 -1
  103. package/lib/types/widgets/adw-header-bar.d.ts +10 -1
  104. package/lib/types/widgets/adw-image-button.d.ts +13 -2
  105. package/lib/types/widgets/adw-navigation-page.d.ts +10 -1
  106. package/lib/types/widgets/adw-navigation-view.d.ts +10 -1
  107. package/lib/types/widgets/adw-preferences-dialog.d.ts +10 -1
  108. package/lib/types/widgets/adw-preferences-group.d.ts +10 -1
  109. package/lib/types/widgets/adw-preferences-page.d.ts +10 -1
  110. package/lib/types/widgets/adw-shortcut-label.d.ts +10 -1
  111. package/lib/types/widgets/adw-sidebar.d.ts +10 -1
  112. package/lib/types/widgets/adw-slider-row.d.ts +10 -1
  113. package/lib/types/widgets/adw-spinner.d.ts +10 -1
  114. package/lib/types/widgets/adw-split-button.d.ts +10 -1
  115. package/lib/types/widgets/adw-status-page.d.ts +10 -1
  116. package/lib/types/widgets/adw-switch-row.d.ts +2 -0
  117. package/lib/types/widgets/adw-tab-view.d.ts +10 -1
  118. package/lib/types/widgets/adw-toast-overlay.d.ts +21 -17
  119. package/lib/types/widgets/adw-toggle-group.d.ts +10 -1
  120. package/lib/types/widgets/adw-toggle.d.ts +10 -1
  121. package/lib/types/widgets/adw-toolbar-view.d.ts +10 -1
  122. package/lib/types/widgets/adw-view-stack.d.ts +10 -1
  123. package/lib/types/widgets/adw-view-switcher-bar.d.ts +10 -1
  124. package/lib/types/widgets/adw-window-title.d.ts +10 -1
  125. package/lib/types/widgets/adw-wrap-box.d.ts +10 -1
  126. package/lib/types/widgets/application.d.ts +2 -1
  127. package/lib/types/widgets/carousel-indicator-base.d.ts +10 -1
  128. package/lib/types/widgets/construct-props.d.ts +11 -2
  129. package/lib/types/widgets/gtk-action-bar.d.ts +10 -1
  130. package/lib/types/widgets/gtk-button.d.ts +13 -2
  131. package/lib/types/widgets/gtk-check-button.d.ts +10 -0
  132. package/lib/types/widgets/gtk-drop-down.d.ts +10 -1
  133. package/lib/types/widgets/gtk-entry.d.ts +10 -1
  134. package/lib/types/widgets/gtk-image.d.ts +13 -2
  135. package/lib/types/widgets/gtk-label.d.ts +10 -1
  136. package/lib/types/widgets/gtk-popover-menu.d.ts +10 -1
  137. package/lib/types/widgets/gtk-stack.d.ts +10 -1
  138. package/lib/types/widgets/gtk-text-view.d.ts +10 -1
  139. package/lib/types/widgets/gtk-window.d.ts +5 -0
  140. package/lib/types/widgets/icon-path.d.ts +9 -0
  141. package/lib/types/widgets/icon-render.d.ts +9 -0
  142. package/lib/types/widgets/icon-theme.d.ts +43 -40
  143. package/lib/types/widgets/index.d.ts +4 -4
  144. package/lib/types/widgets/signals.d.ts +16 -1
  145. package/lib/types/widgets/split-view-base.d.ts +10 -1
  146. package/lib/types/widgets/stack-page.d.ts +10 -1
  147. package/lib/types/widgets/styled-layout-base.d.ts +10 -1
  148. package/lib/types/widgets/view-stack-page.d.ts +10 -1
  149. package/lib/types/widgets/view-switcher-base.d.ts +10 -1
  150. package/lib/types/widgets/widget-layout.d.ts +14 -0
  151. package/lib/types/widgets/widget-mapping.d.ts +9 -0
  152. package/package.json +14 -13
  153. package/src/testing/ns-core.mts +147 -18
  154. package/src/theme/adwaita.css +13 -2
@@ -13,7 +13,7 @@ export interface GtkTextBufferSubset {
13
13
  set_text(text: string, len?: number): void;
14
14
  insert_at_cursor(text: string, len?: number): void;
15
15
  }
16
- declare const GtkTextView_base: (abstract new (...args: any[]) => {
16
+ declare const GtkTextView_base: ((abstract new (...args: any[]) => {
17
17
  connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
18
18
  disconnect(handlerId: number): void;
19
19
  emit(eventName: string, ...args: unknown[]): void;
@@ -39,10 +39,17 @@ declare const GtkTextView_base: (abstract new (...args: any[]) => {
39
39
  set name(value: string | null);
40
40
  get tooltipText(): string;
41
41
  set tooltipText(value: string);
42
+ get tooltip_text(): string;
43
+ set tooltip_text(value: string);
42
44
  get widthRequest(): number;
43
45
  set widthRequest(value: number | string);
44
46
  get heightRequest(): number;
45
47
  set heightRequest(value: number | string);
48
+ get_visible(): boolean;
49
+ set_visible(visible: boolean): void;
50
+ get_mapped(): boolean;
51
+ get_tooltip_text(): string;
52
+ set_tooltip_text(text: string): void;
46
53
  set_direction(direction: number): void;
47
54
  get_direction(): number;
48
55
  get_first_child(): object | null;
@@ -61,6 +68,8 @@ declare const GtkTextView_base: (abstract new (...args: any[]) => {
61
68
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
62
69
  set(name: string, value: unknown): void;
63
70
  get(name: string): unknown;
71
+ }) & {
72
+ readonly emittedSignals: readonly string[];
64
73
  }) & typeof GridLayout;
65
74
  export declare class GtkTextView extends GtkTextView_base {
66
75
  static readonly GTypeName: string;
@@ -1,4 +1,5 @@
1
1
  import type { EventData, View } from '@nativescript/core';
2
+ import { type GtkApplication } from './application.js';
2
3
  import { type ConstructProps } from './construct-props.js';
3
4
  import { AdwSingleChildBase } from './single-child-base.js';
4
5
  export declare const NOTIFY_IS_ACTIVE = "notify::is-active";
@@ -14,6 +15,10 @@ export declare class GtkWindow extends AdwSingleChildBase {
14
15
  private readonly _closeRequest;
15
16
  private _unwatchForeground;
16
17
  private _unwatchBack;
18
+ /** `Gtk.Window:application`: setting it is `add_window` (ADR 0098), set by `defineWindowApplication`. */
19
+ application: GtkApplication | null;
20
+ get_application: () => GtkApplication | null;
21
+ set_application: (application: GtkApplication | null) => void;
17
22
  constructor(props?: ConstructProps<GtkWindow>);
18
23
  onLoaded(): void;
19
24
  onUnloaded(): void;
@@ -131,3 +131,12 @@ export declare function parseHexColorOrNull(hex: string): IconColorComponents |
131
131
  * icons use — a multi-digit rotation glued directly to the flags is not split.)
132
132
  */
133
133
  export declare function normalizeArcFlags(d: string): string;
134
+ /**
135
+ * `svg` with its content mapped onto the {@link ADWAITA_ICON_GRID} the rasterisers draw on.
136
+ *
137
+ * A compiled glyph is authored on that grid; a symbolic file an application ships need not be.
138
+ * Its `viewBox`, else its `width` and `height`, is scaled to fit and centred, as GTK fits an SVG
139
+ * into the requested size. A document already on the grid, or one that names no size, is returned
140
+ * as it is.
141
+ */
142
+ export declare function fitIconToGrid(svg: string): string;
@@ -0,0 +1,9 @@
1
+ import { type Image } from '@nativescript/core';
2
+ /**
3
+ * Draw `value` into `image` at `size` DIPs. A symbolic drawing is filled with `color`, a
4
+ * `.symbolic.png` tinted with it, any other PNG drawn as it is. `''` leaves the image alone, and
5
+ * so does a glyph the platform cannot rasterise (off a device, `renderSymbolicIcon` draws nothing).
6
+ */
7
+ export declare function drawIcon(image: Image, value: string, size: number, color: string): void;
8
+ /** Run `redraw` whenever the shared icon theme changes. Returns the unsubscribe function. */
9
+ export declare function onIconsChanged(redraw: () => void): () => void;
@@ -1,3 +1,4 @@
1
+ import { type IconDirection, type IconTheme, type ResourceIconMatch } from '@gjsify/adwaita-core';
1
2
  /**
2
3
  * The name every unresolvable name resolves TO.
3
4
  *
@@ -22,7 +23,7 @@ export type IconValueKind = 'empty' | 'name' | 'source';
22
23
  *
23
24
  * An SVG document is recognised by its FIRST non-space character being `<`, which admits
24
25
  * an XML prolog and a DOCTYPE ahead of the root element (both legitimate in an icon read
25
- * off a file, and `icon-registry.ts` on the web side takes the same two). An icon name is
26
+ * off a file). An icon name is
26
27
  * whatever `normalizeIconName` accepts: one CSS token once an optional `-symbolic` comes
27
28
  * off. Nothing is both, so nothing has to be guessed.
28
29
  *
@@ -36,49 +37,51 @@ export declare function iconValueKind(value: string | null | undefined): IconVal
36
37
  export declare function isIconAvailable(name: string | null | undefined): boolean;
37
38
  /** The subset's names, sorted — for a spec or a gate that has to enumerate them. */
38
39
  export declare function compiledIconNames(): string[];
39
- /** The names {@link registerIcon} has added, sorted. */
40
- export declare function registeredIconNames(): string[];
41
- /**
42
- * Make `name` resolvable from an Adwaita symbolic SVG source (what
43
- * `@gjsify/adwaita-icons` exports), for a glyph the compiled subset does not carry.
44
- *
45
- * import { registerIcon } from '@gjsify/adwaita-nativescript';
46
- * import { dialogErrorSymbolic } from '@gjsify/adwaita-icons/status';
47
- *
48
- * registerIcon('dialog-error-symbolic', dialogErrorSymbolic);
49
- * // …then anywhere: new Adw.StatusPage({ iconName: 'dialog-error-symbolic' })
50
- *
51
- * BOTH arguments are checked and a wrong one THROWS, the same verdict the web registry
52
- * reaches for the same reason: this is an explicit call, and quietly registering
53
- * something undrawable produces an icon strictly WORSE than an unregistered one — it
54
- * beats the `image-missing` fallback and draws nothing, while {@link isIconAvailable}
55
- * reports `true`.
56
- *
57
- * The SVG test is LEXICAL, not a parse, and that is a real limit rather than a shortcut:
58
- * NativeScript has no `DOMParser`, and the rasterisers here read the document with
59
- * `extractIconPaths`' own scanner. So a well-formed document with no `<svg>` root is
60
- * refused, and a malformed one inside an `<svg>` is accepted and draws whatever
61
- * `extractIconPaths` finds in it — which is the same thing it would have drawn had the
62
- * caller passed it straight to the widget.
63
- *
64
- * Registering a name the subset already compiles REPLACES the glyph.
65
- */
66
- export declare function registerIcon(name: string, svg: string): void;
67
- /**
68
- * {@link registerIcon} for a whole set — `{ 'move-to-window-symbolic': svg, … }`, the shape an
69
- * app's generated icon module exports, so it registers on import and no app code has to
70
- * loop. Validation is per entry and throws on the first bad one, after the good ones before
71
- * it were registered.
72
- */
73
- export declare function registerIcons(icons: Readonly<Record<string, string>>): void;
74
- /** Drop a registration, so the name falls back to the compiled subset. Test seam. */
75
- export declare function unregisterIcon(name: string): boolean;
76
40
  /**
77
41
  * A caller's icon value as the SVG document a rasteriser can read.
78
42
  *
79
43
  * The one function every icon property on this port goes through, so that a name means
80
44
  * the same thing on all of them. `''` stays `''` — see {@link IconValueKind}. A source
81
- * passes through untouched. A name resolves against the registrations, then the compiled
82
- * subset, then {@link ICON_FALLBACK_NAME}.
45
+ * passes through untouched. A name resolves against the compiled subset, then
46
+ * {@link ICON_FALLBACK_NAME}.
83
47
  */
84
48
  export declare function resolveIconSource(value: string | null | undefined): string;
49
+ /** What an icon value draws as on this port. */
50
+ export type IconDrawing =
51
+ /** An SVG document for `renderSymbolicIcon`, recoloured in the icon colour. */
52
+ {
53
+ readonly kind: 'svg';
54
+ readonly svg: string;
55
+ }
56
+ /** A PNG file as base64, for `ImageSource.fromBase64Sync`; a `symbolic` one is tinted. */
57
+ | {
58
+ readonly kind: 'png';
59
+ readonly base64: string;
60
+ readonly symbolic: boolean;
61
+ };
62
+ /** What an image hands its theme besides the name. */
63
+ export interface IconRequest {
64
+ /** In DIPs. */
65
+ readonly size: number;
66
+ /** The device scale; 1 when absent. */
67
+ readonly scale?: number;
68
+ readonly direction?: IconDirection;
69
+ }
70
+ /**
71
+ * Run `listener` after `theme`'s `changed` signal, once the cached resource drawings are gone —
72
+ * GTK's images redo their lookup then. Returns the unsubscribe function.
73
+ */
74
+ export declare function onIconThemeChanged(theme: IconTheme, listener: () => void): () => void;
75
+ /**
76
+ * Which file under `theme`'s resource paths answers the icon name `name`, or `'theme'`'s glyph
77
+ * when the current theme answers first; `null` when no resource takes part and the answer is
78
+ * {@link resolveIconSource}'s alone.
79
+ */
80
+ export declare function lookupThemeIcon(theme: IconTheme, name: string, request: IconRequest): ResourceIconMatch | null;
81
+ /**
82
+ * A caller's icon value as what it draws, with `theme`'s resource paths taking part in the
83
+ * lookup the way `gtk_icon_theme_lookup_by_gicon` has them take part for a `GtkImage`. `null` for
84
+ * `''`, as {@link resolveIconSource} answers `''`. Without a resource holding the name the answer
85
+ * is {@link resolveIconSource}'s.
86
+ */
87
+ export declare function resolveIconDrawing(theme: IconTheme, value: string | null | undefined, request: IconRequest): IconDrawing | null;
@@ -135,10 +135,10 @@ export { AdwSidebarItem, AdwSidebarSection } from '../values/sidebar.js';
135
135
  export type { AdwSidebarItemProps, AdwSidebarSectionProps } from '../values/sidebar.js';
136
136
  export { AdwBottomSheet, bottomSheetPanel, CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE } from './adw-bottom-sheet.js';
137
137
  export type { NotifyOpenEventData } from './adw-bottom-sheet.js';
138
- export { AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, } from './adw-toast-overlay.js';
138
+ export { AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from './adw-toast-overlay.js';
139
139
  export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from './adw-toast-overlay.js';
140
- export { AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE } from './adw-alert-dialog.js';
141
- export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, NotifyResponseEventData, OrderedConfirmResponses, } from './adw-alert-dialog.js';
140
+ export { AdwAlertDialog, AdwAlertResponses } from './adw-alert-dialog.js';
141
+ export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, } from './adw-alert-dialog.js';
142
142
  export { AdwAboutDialog, CLOSED as ABOUT_CLOSED } from './adw-about-dialog.js';
143
143
  export { AdwPreferencesDialog, CLOSED as PREFERENCES_CLOSED } from './adw-preferences-dialog.js';
144
144
  export { SimpleAction, SimpleActionGroup, activateWidgetAction, findActionGroup, insertActionGroup, } from './actions.js';
@@ -148,7 +148,7 @@ export { applyConstructProps, nsAlignment } from './construct-props.js';
148
148
  export type { ConstructProps } from './construct-props.js';
149
149
  export { GTK_ALIGN } from './gtk-align.js';
150
150
  export { DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, } from './gtk-icon-size.js';
151
- export { ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, registerIcon, registerIcons, registeredIconNames, resolveIconSource, unregisterIcon, } from './icon-theme.js';
151
+ export { ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, resolveIconSource, } from './icon-theme.js';
152
152
  export type { IconValueKind } from './icon-theme.js';
153
153
  export { ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, extractIconPaths, extractPathData, renderSymbolicIcon, } from './icons.js';
154
154
  export type { IconPath, SymbolicIconOptions } from './icons.js';
@@ -21,6 +21,11 @@ export interface GObjectSignals {
21
21
  /** `g_object_set_property`, routed the same way as {@link get_property}. */
22
22
  set_property(name: string, value: unknown): void;
23
23
  }
24
+ /**
25
+ * Every signal `ctor` emits: the own `emittedSignals` of each class up its chain, base first.
26
+ * A class declares only what it adds, so `GtkButton`'s `clicked` does not hide `map`.
27
+ */
28
+ export declare function emittedSignalsOf(ctor: unknown): readonly string[];
24
29
  /**
25
30
  * A constructor the mixin can wrap: anything that is an `Observable`, abstract or not.
26
31
  *
@@ -37,7 +42,7 @@ export type ObservableConstructor = abstract new (...args: any[]) => Observable;
37
42
  * — and never on a class whose base is already a widget of this package, which inherits
38
43
  * the two methods and would otherwise carry a second, identical copy one prototype up.
39
44
  */
40
- export declare function withSignals<TBase extends ObservableConstructor>(Base: TBase): (abstract new (...args: any[]) => {
45
+ export declare function withSignals<TBase extends ObservableConstructor>(Base: TBase): ((abstract new (...args: any[]) => {
41
46
  connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
42
47
  disconnect(handlerId: number): void;
43
48
  emit(eventName: string, ...args: unknown[]): void;
@@ -63,10 +68,17 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
63
68
  set name(value: string | null);
64
69
  get tooltipText(): string;
65
70
  set tooltipText(value: string);
71
+ get tooltip_text(): string;
72
+ set tooltip_text(value: string);
66
73
  get widthRequest(): number;
67
74
  set widthRequest(value: number | string);
68
75
  get heightRequest(): number;
69
76
  set heightRequest(value: number | string);
77
+ get_visible(): boolean;
78
+ set_visible(visible: boolean): void;
79
+ get_mapped(): boolean;
80
+ get_tooltip_text(): string;
81
+ set_tooltip_text(text: string): void;
70
82
  set_direction(direction: number): void;
71
83
  get_direction(): number;
72
84
  get_first_child(): object | null;
@@ -85,4 +97,7 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
85
97
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
86
98
  set(name: string, value: unknown): void;
87
99
  get(name: string): unknown;
100
+ }) & {
101
+ /** What every widget emits; a class's own list adds to it (`emittedSignalsOf`). */
102
+ readonly emittedSignals: readonly string[];
88
103
  }) & TBase;
@@ -10,7 +10,7 @@ export interface NotifyShowSidebarEventData extends EventData {
10
10
  /** Whether the view is in its collapsed (narrow) mode. */
11
11
  collapsed: boolean;
12
12
  }
13
- declare const AdwSplitViewBase_base: (abstract new (...args: any[]) => {
13
+ declare const AdwSplitViewBase_base: ((abstract new (...args: any[]) => {
14
14
  connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
15
15
  disconnect(handlerId: number): void;
16
16
  emit(eventName: string, ...args: unknown[]): void;
@@ -36,10 +36,17 @@ declare const AdwSplitViewBase_base: (abstract new (...args: any[]) => {
36
36
  set name(value: string | null);
37
37
  get tooltipText(): string;
38
38
  set tooltipText(value: string);
39
+ get tooltip_text(): string;
40
+ set tooltip_text(value: string);
39
41
  get widthRequest(): number;
40
42
  set widthRequest(value: number | string);
41
43
  get heightRequest(): number;
42
44
  set heightRequest(value: number | string);
45
+ get_visible(): boolean;
46
+ set_visible(visible: boolean): void;
47
+ get_mapped(): boolean;
48
+ get_tooltip_text(): string;
49
+ set_tooltip_text(text: string): void;
43
50
  set_direction(direction: number): void;
44
51
  get_direction(): number;
45
52
  get_first_child(): object | null;
@@ -58,6 +65,8 @@ declare const AdwSplitViewBase_base: (abstract new (...args: any[]) => {
58
65
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
59
66
  set(name: string, value: unknown): void;
60
67
  get(name: string): unknown;
68
+ }) & {
69
+ readonly emittedSignals: readonly string[];
61
70
  }) & typeof GridLayout;
62
71
  export declare abstract class AdwSplitViewBase<TState extends NsSplitViewState = NsSplitViewState> extends AdwSplitViewBase_base {
63
72
  /** Which widget's width rule applies — they differ once a pane has a minimum. */
@@ -8,7 +8,7 @@ interface AdoptingStack {
8
8
  interface AwaitingStack {
9
9
  _addChildFromBuilder(name: string, view: GtkStackPage): void;
10
10
  }
11
- declare const GtkStackPage_base: (abstract new (...args: any[]) => {
11
+ declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
12
12
  connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
13
13
  disconnect(handlerId: number): void;
14
14
  emit(eventName: string, ...args: unknown[]): void;
@@ -34,10 +34,17 @@ declare const GtkStackPage_base: (abstract new (...args: any[]) => {
34
34
  set name(value: string | null);
35
35
  get tooltipText(): string;
36
36
  set tooltipText(value: string);
37
+ get tooltip_text(): string;
38
+ set tooltip_text(value: string);
37
39
  get widthRequest(): number;
38
40
  set widthRequest(value: number | string);
39
41
  get heightRequest(): number;
40
42
  set heightRequest(value: number | string);
43
+ get_visible(): boolean;
44
+ set_visible(visible: boolean): void;
45
+ get_mapped(): boolean;
46
+ get_tooltip_text(): string;
47
+ set_tooltip_text(text: string): void;
41
48
  set_direction(direction: number): void;
42
49
  get_direction(): number;
43
50
  get_first_child(): object | null;
@@ -56,6 +63,8 @@ declare const GtkStackPage_base: (abstract new (...args: any[]) => {
56
63
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
57
64
  set(name: string, value: unknown): void;
58
65
  get(name: string): unknown;
66
+ }) & {
67
+ readonly emittedSignals: readonly string[];
59
68
  }) & typeof Observable;
60
69
  export declare class GtkStackPage extends GtkStackPage_base {
61
70
  static readonly GTypeName: string;
@@ -1,6 +1,6 @@
1
1
  import { GridLayout } from '@nativescript/core';
2
2
  import { type AdwStyleClassesInput } from './style-classes.js';
3
- declare const AdwStyledLayoutBase_base: (abstract new (...args: any[]) => {
3
+ declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
4
4
  connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
5
5
  disconnect(handlerId: number): void;
6
6
  emit(eventName: string, ...args: unknown[]): void;
@@ -26,10 +26,17 @@ declare const AdwStyledLayoutBase_base: (abstract new (...args: any[]) => {
26
26
  set name(value: string | null);
27
27
  get tooltipText(): string;
28
28
  set tooltipText(value: string);
29
+ get tooltip_text(): string;
30
+ set tooltip_text(value: string);
29
31
  get widthRequest(): number;
30
32
  set widthRequest(value: number | string);
31
33
  get heightRequest(): number;
32
34
  set heightRequest(value: number | string);
35
+ get_visible(): boolean;
36
+ set_visible(visible: boolean): void;
37
+ get_mapped(): boolean;
38
+ get_tooltip_text(): string;
39
+ set_tooltip_text(text: string): void;
33
40
  set_direction(direction: number): void;
34
41
  get_direction(): number;
35
42
  get_first_child(): object | null;
@@ -48,6 +55,8 @@ declare const AdwStyledLayoutBase_base: (abstract new (...args: any[]) => {
48
55
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
49
56
  set(name: string, value: unknown): void;
50
57
  get(name: string): unknown;
58
+ }) & {
59
+ readonly emittedSignals: readonly string[];
51
60
  }) & typeof GridLayout;
52
61
  export declare abstract class AdwStyledLayoutBase extends AdwStyledLayoutBase_base {
53
62
  private readonly _classList;
@@ -8,7 +8,7 @@ interface AdoptingStack {
8
8
  interface AwaitingStack {
9
9
  _addChildFromBuilder(name: string, view: AdwViewStackPage): void;
10
10
  }
11
- declare const AdwViewStackPage_base: (abstract new (...args: any[]) => {
11
+ declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
12
12
  connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => unknown): number;
13
13
  disconnect(handlerId: number): void;
14
14
  emit(eventName: string, ...args: unknown[]): void;
@@ -34,10 +34,17 @@ declare const AdwViewStackPage_base: (abstract new (...args: any[]) => {
34
34
  set name(value: string | null);
35
35
  get tooltipText(): string;
36
36
  set tooltipText(value: string);
37
+ get tooltip_text(): string;
38
+ set tooltip_text(value: string);
37
39
  get widthRequest(): number;
38
40
  set widthRequest(value: number | string);
39
41
  get heightRequest(): number;
40
42
  set heightRequest(value: number | string);
43
+ get_visible(): boolean;
44
+ set_visible(visible: boolean): void;
45
+ get_mapped(): boolean;
46
+ get_tooltip_text(): string;
47
+ set_tooltip_text(text: string): void;
41
48
  set_direction(direction: number): void;
42
49
  get_direction(): number;
43
50
  get_first_child(): object | null;
@@ -56,6 +63,8 @@ declare const AdwViewStackPage_base: (abstract new (...args: any[]) => {
56
63
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
57
64
  set(name: string, value: unknown): void;
58
65
  get(name: string): unknown;
66
+ }) & {
67
+ readonly emittedSignals: readonly string[];
59
68
  }) & typeof Observable;
60
69
  export declare class AdwViewStackPage extends AdwViewStackPage_base {
61
70
  static readonly GTypeName: string;
@@ -12,7 +12,7 @@ export declare const NOTIFY_SELECTED = "notify::selected";
12
12
  */
13
13
  export interface NotifyViewSelectedEventData extends EventData, ViewSwitcherNotifyPayload {
14
14
  }
15
- declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
15
+ declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
16
16
  connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
17
17
  disconnect(handlerId: number): void;
18
18
  emit(eventName: string, ...args: unknown[]): void;
@@ -38,10 +38,17 @@ declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
38
38
  set name(value: string | null);
39
39
  get tooltipText(): string;
40
40
  set tooltipText(value: string);
41
+ get tooltip_text(): string;
42
+ set tooltip_text(value: string);
41
43
  get widthRequest(): number;
42
44
  set widthRequest(value: number | string);
43
45
  get heightRequest(): number;
44
46
  set heightRequest(value: number | string);
47
+ get_visible(): boolean;
48
+ set_visible(visible: boolean): void;
49
+ get_mapped(): boolean;
50
+ get_tooltip_text(): string;
51
+ set_tooltip_text(text: string): void;
45
52
  set_direction(direction: number): void;
46
53
  get_direction(): number;
47
54
  get_first_child(): object | null;
@@ -60,6 +67,8 @@ declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
60
67
  notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
61
68
  set(name: string, value: unknown): void;
62
69
  get(name: string): unknown;
70
+ }) & {
71
+ readonly emittedSignals: readonly string[];
63
72
  }) & typeof GridLayout;
64
73
  /**
65
74
  * Shared base: a switcher bar (row 0) + a content area (row 1), one page visible.
@@ -30,6 +30,8 @@ export interface GtkWidgetLayout {
30
30
  name: string;
31
31
  /** `GtkWidget:tooltip-text` — the accessibility hint, plus a native long-press tooltip on Android. */
32
32
  tooltipText: string;
33
+ /** `GtkWidget:tooltip-text` under its GObject spelling — the same value as `tooltipText`. */
34
+ tooltip_text: string;
33
35
  /** `GtkWidget:width-request` — `minWidth`; `-1` is unset. */
34
36
  widthRequest: number;
35
37
  /** `GtkWidget:height-request` — `minHeight`; `-1` is unset. */
@@ -65,10 +67,22 @@ export declare abstract class GtkWidgetLayoutMembers {
65
67
  set name(value: string | null);
66
68
  get tooltipText(): string;
67
69
  set tooltipText(value: string);
70
+ get tooltip_text(): string;
71
+ set tooltip_text(value: string);
68
72
  get widthRequest(): number;
69
73
  set widthRequest(value: number | string);
70
74
  get heightRequest(): number;
71
75
  set heightRequest(value: number | string);
76
+ /** `gtk_widget_get_visible`: the `visible` property. */
77
+ get_visible(): boolean;
78
+ /** `gtk_widget_set_visible`: the `visible` property. */
79
+ set_visible(visible: boolean): void;
80
+ /** `gtk_widget_get_mapped`: loaded, and visible with every ancestor. */
81
+ get_mapped(): boolean;
82
+ /** `gtk_widget_get_tooltip_text`: the `tooltipText` property. */
83
+ get_tooltip_text(): string;
84
+ /** `gtk_widget_set_tooltip_text`: the `tooltipText` property. */
85
+ set_tooltip_text(text: string): void;
72
86
  /** `gtk_widget_set_direction`: written to the CSS `direction` a view resolves its margins by; NONE clears it. */
73
87
  set_direction(direction: number): void;
74
88
  /** `gtk_widget_get_direction`: LTR until set. */
@@ -0,0 +1,9 @@
1
+ /** `gtk_widget_get_mapped`: loaded, and visible all the way up. */
2
+ export declare function isMapped(view: object): boolean;
3
+ /**
4
+ * Watches `view` for `map` / `unmap` until the returned function is called. Its present state is
5
+ * recorded and not emitted.
6
+ */
7
+ export declare function watchMapping(target: object): () => void;
8
+ /** The two signals every widget emits through {@link watchMapping}. */
9
+ export declare const WIDGET_SIGNALS: readonly string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.64.1",
3
+ "version": "0.64.2-next.254",
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",
@@ -73,15 +73,15 @@
73
73
  "design-system"
74
74
  ],
75
75
  "dependencies": {
76
- "@gjsify/adwaita-core": "^0.64.1",
77
- "@gjsify/adwaita-fonts": "^0.64.1",
78
- "@gjsify/adwaita-icons": "^0.64.1",
79
- "@gjsify/canvas2d-core": "^0.64.1",
80
- "@gjsify/native-platform": "^0.64.1"
76
+ "@gjsify/adwaita-core": "0.64.2-next.254",
77
+ "@gjsify/adwaita-fonts": "0.64.2-next.254",
78
+ "@gjsify/adwaita-icons": "0.64.2-next.254",
79
+ "@gjsify/canvas2d-core": "0.64.2-next.254",
80
+ "@gjsify/native-platform": "0.64.2-next.254"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@nativescript/core": "*",
84
- "@gjsify/app-settings": "^0.64.1"
84
+ "@gjsify/app-settings": "0.64.2-next.254"
85
85
  },
86
86
  "peerDependenciesMeta": {
87
87
  "@nativescript/core": {
@@ -92,11 +92,11 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@gjsify/app-settings": "^0.64.1",
96
- "@gjsify/blueprint": "^0.64.1",
97
- "@gjsify/cli": "^0.64.1",
98
- "@gjsify/unit": "^0.64.1",
99
- "@gjsify/vite-plugin-blueprint": "^0.64.1",
95
+ "@gjsify/app-settings": "0.64.2-next.254",
96
+ "@gjsify/blueprint": "0.64.2-next.254",
97
+ "@gjsify/cli": "0.64.2-next.254",
98
+ "@gjsify/unit": "0.64.2-next.254",
99
+ "@gjsify/vite-plugin-blueprint": "0.64.2-next.254",
100
100
  "@types/node": "^25.9.2",
101
101
  "typescript": "^6.0.3"
102
102
  },
@@ -125,5 +125,6 @@
125
125
  "bugs": {
126
126
  "url": "https://github.com/gjsify/gjsify/issues"
127
127
  },
128
- "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme"
128
+ "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme",
129
+ "gitHead": "6c88ac780b9742fce781e9b35aa2f45c125d8064"
129
130
  }