@gjsify/adwaita-nativescript 0.64.14 → 0.64.15

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 (77) hide show
  1. package/lib/esm/name-selector.js +1 -0
  2. package/lib/esm/platform-host.js +1 -1
  3. package/lib/esm/widgets/adw-image-button.js +1 -1
  4. package/lib/esm/widgets/adw-split-button.js +1 -1
  5. package/lib/esm/widgets/bin-layout.js +1 -0
  6. package/lib/esm/widgets/css-names.js +1 -0
  7. package/lib/esm/widgets/gtk-button.js +1 -1
  8. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  9. package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
  10. package/lib/esm/widgets/menu-slot.js +1 -1
  11. package/lib/esm/widgets/scrolled-window-policy.js +1 -1
  12. package/lib/esm/widgets/signals.js +1 -1
  13. package/lib/esm/widgets/widget-layout.js +1 -1
  14. package/lib/types/button-bin.spec.d.ts +2 -0
  15. package/lib/types/css-length.spec.d.ts +2 -0
  16. package/lib/types/css-names.spec.d.ts +1 -0
  17. package/lib/types/menu-button-properties.spec.d.ts +2 -0
  18. package/lib/types/menu-model-route-d.node-gi.spec.d.ts +2 -0
  19. package/lib/types/name-selector.d.ts +20 -0
  20. package/lib/types/name-selector.spec.d.ts +2 -0
  21. package/lib/types/testing/ns-core.d.mts +19 -0
  22. package/lib/types/widgets/adw-about-dialog.d.ts +2 -0
  23. package/lib/types/widgets/adw-action-row.d.ts +2 -0
  24. package/lib/types/widgets/adw-alert-dialog.d.ts +2 -0
  25. package/lib/types/widgets/adw-avatar.d.ts +2 -0
  26. package/lib/types/widgets/adw-banner.d.ts +2 -0
  27. package/lib/types/widgets/adw-bottom-sheet.d.ts +2 -0
  28. package/lib/types/widgets/adw-button-content.d.ts +2 -0
  29. package/lib/types/widgets/adw-carousel.d.ts +2 -0
  30. package/lib/types/widgets/adw-clamp.d.ts +2 -0
  31. package/lib/types/widgets/adw-data-grid.d.ts +2 -0
  32. package/lib/types/widgets/adw-header-bar.d.ts +2 -0
  33. package/lib/types/widgets/adw-image-button.d.ts +4 -2
  34. package/lib/types/widgets/adw-navigation-page.d.ts +2 -0
  35. package/lib/types/widgets/adw-navigation-view.d.ts +2 -0
  36. package/lib/types/widgets/adw-preferences-group.d.ts +2 -0
  37. package/lib/types/widgets/adw-preferences-page.d.ts +2 -0
  38. package/lib/types/widgets/adw-shortcut-label.d.ts +2 -0
  39. package/lib/types/widgets/adw-sidebar.d.ts +2 -0
  40. package/lib/types/widgets/adw-slider-row.d.ts +2 -0
  41. package/lib/types/widgets/adw-spinner.d.ts +2 -0
  42. package/lib/types/widgets/adw-split-button.d.ts +42 -27
  43. package/lib/types/widgets/adw-status-page.d.ts +2 -0
  44. package/lib/types/widgets/adw-tab-view.d.ts +2 -0
  45. package/lib/types/widgets/adw-toast-overlay.d.ts +2 -0
  46. package/lib/types/widgets/adw-toggle-group.d.ts +2 -0
  47. package/lib/types/widgets/adw-toggle.d.ts +2 -0
  48. package/lib/types/widgets/adw-toolbar-view.d.ts +2 -0
  49. package/lib/types/widgets/adw-view-stack.d.ts +2 -0
  50. package/lib/types/widgets/adw-view-switcher-bar.d.ts +2 -0
  51. package/lib/types/widgets/adw-window-title.d.ts +2 -0
  52. package/lib/types/widgets/adw-wrap-box.d.ts +2 -0
  53. package/lib/types/widgets/bin-layout.d.ts +12 -0
  54. package/lib/types/widgets/carousel-indicator-base.d.ts +2 -0
  55. package/lib/types/widgets/css-names.d.ts +9 -0
  56. package/lib/types/widgets/gtk-action-bar.d.ts +2 -0
  57. package/lib/types/widgets/gtk-button.d.ts +8 -5
  58. package/lib/types/widgets/gtk-drop-down.d.ts +2 -0
  59. package/lib/types/widgets/gtk-entry.d.ts +2 -0
  60. package/lib/types/widgets/gtk-image.d.ts +2 -0
  61. package/lib/types/widgets/gtk-label.d.ts +2 -0
  62. package/lib/types/widgets/gtk-menu-button.d.ts +26 -20
  63. package/lib/types/widgets/gtk-popover-menu.d.ts +2 -0
  64. package/lib/types/widgets/gtk-scrolled-window.d.ts +9 -0
  65. package/lib/types/widgets/gtk-stack.d.ts +2 -0
  66. package/lib/types/widgets/gtk-text-view.d.ts +2 -0
  67. package/lib/types/widgets/menu-slot.d.ts +15 -4
  68. package/lib/types/widgets/scrolled-window-policy.d.ts +4 -2
  69. package/lib/types/widgets/signals.d.ts +2 -0
  70. package/lib/types/widgets/split-view-base.d.ts +2 -0
  71. package/lib/types/widgets/stack-page.d.ts +2 -0
  72. package/lib/types/widgets/styled-layout-base.d.ts +2 -0
  73. package/lib/types/widgets/view-stack-page.d.ts +2 -0
  74. package/lib/types/widgets/view-switcher-base.d.ts +2 -0
  75. package/lib/types/widgets/widget-layout.d.ts +2 -0
  76. package/package.json +18 -14
  77. package/src/testing/ns-core.mts +39 -0
@@ -263,6 +263,16 @@ export class View extends Observable {
263
263
  * missing so the first `className` write died inside a constructor.
264
264
  */
265
265
  readonly cssClasses: Set<string> = new Set();
266
+ /**
267
+ * The real `View.cssType` derives `typeName.toLowerCase()` on first read and keeps it in
268
+ * `_cssType`; a subclass accessor wins over both, which is what a port widget relies on.
269
+ */
270
+ get cssType(): string | undefined {
271
+ return this.constructor.name.toLowerCase();
272
+ }
273
+
274
+ set cssType(_value: string | undefined) {}
275
+
266
276
  /**
267
277
  * `'auto'` until written, and HELD ON THE {@link Style} as `widthProperty` /
268
278
  * `heightProperty` are (`ui/styling/style-properties.ts` registers both on `Style`;
@@ -624,6 +634,17 @@ export class StackLayout extends LayoutBase {
624
634
  orientation: 'horizontal' | 'vertical' = 'vertical';
625
635
  }
626
636
 
637
+ /**
638
+ * Upstream's `DockLayout`, of which only `stretchLastChild` is state a spec can read — the
639
+ * docking itself is `onLayout`'s arithmetic on a real allocation and happens nowhere off a
640
+ * device. `true` is the platform default (`ui/layouts/dock-layout/dock-layout-common`), and a
641
+ * double that started at `false` would let `widgets/bin-layout.ts` rely on a default it does
642
+ * not have.
643
+ */
644
+ export class DockLayout extends LayoutBase {
645
+ stretchLastChild: boolean = true;
646
+ }
647
+
627
648
  export type GridUnitType = 'auto' | 'star' | 'pixel';
628
649
 
629
650
  export class ItemSpec {
@@ -1280,3 +1301,21 @@ export const ApplicationSettings = {
1280
1301
  SETTINGS.set(key, value);
1281
1302
  },
1282
1303
  };
1304
+
1305
+ /** `CSSHelper.createSelector('#x')` answers an `IdSelector`; the double is the stock one's shape. */
1306
+ class MockIdSelector {
1307
+ id: string | undefined;
1308
+ constructor(id: string) {
1309
+ this.id = id;
1310
+ }
1311
+ match(node: { id?: string }): boolean {
1312
+ return node.id === this.id;
1313
+ }
1314
+ lookupSort(sorter: { sortAsUniversal(selector: unknown): void }, base?: unknown): void {
1315
+ sorter.sortAsUniversal(base ?? this);
1316
+ }
1317
+ }
1318
+
1319
+ export const CSSHelper = {
1320
+ createSelector: (selector: string): object => new MockIdSelector(selector.slice(1)),
1321
+ };