@ng-desktop/platform 0.3.0 → 0.4.1

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 (56) hide show
  1. package/README.md +43 -7
  2. package/fesm2022/bridge-fs-compute.d.ts +1 -1
  3. package/fesm2022/bridge-fs-compute.js +5 -2
  4. package/fesm2022/bridge-sqlite.d.ts +0 -1
  5. package/fesm2022/bridge-sqlite.js +2 -12
  6. package/fesm2022/bridge.d.ts +62 -2
  7. package/fesm2022/bridge.js +406 -219
  8. package/fesm2022/css-style-parser.d.ts +33 -0
  9. package/fesm2022/css-style-parser.js +259 -0
  10. package/fesm2022/ecosystem-compat.d.ts +0 -1
  11. package/fesm2022/ecosystem-compat.js +9 -10
  12. package/fesm2022/image-loader.d.ts +1 -2
  13. package/fesm2022/image-loader.js +1 -2
  14. package/fesm2022/index.d.ts +5 -3
  15. package/fesm2022/index.js +4 -2
  16. package/fesm2022/native-directives.d.ts +188 -0
  17. package/fesm2022/native-directives.js +742 -0
  18. package/fesm2022/native-element.d.ts +7 -2
  19. package/fesm2022/native-element.js +21 -2
  20. package/fesm2022/native-renderer.d.ts +44 -3
  21. package/fesm2022/native-renderer.js +951 -44
  22. package/fesm2022/native-title.d.ts +1 -1
  23. package/fesm2022/native-title.js +17 -5
  24. package/fesm2022/platform.d.ts +2 -2
  25. package/fesm2022/platform.js +8 -2
  26. package/fesm2022/system-providers.d.ts +2 -1
  27. package/fesm2022/system-providers.js +63 -13
  28. package/fesm2022/viewport-scroller.d.ts +2 -1
  29. package/fesm2022/viewport-scroller.js +19 -7
  30. package/fesm2022/virtual-list.component.d.ts +57 -0
  31. package/fesm2022/virtual-list.component.js +200 -0
  32. package/package.json +4 -2
  33. package/fesm2022/bridge-fs-compute.d.ts.map +0 -1
  34. package/fesm2022/bridge-fs-compute.js.map +0 -1
  35. package/fesm2022/bridge-sqlite.d.ts.map +0 -1
  36. package/fesm2022/bridge-sqlite.js.map +0 -1
  37. package/fesm2022/bridge.d.ts.map +0 -1
  38. package/fesm2022/bridge.js.map +0 -1
  39. package/fesm2022/ecosystem-compat.d.ts.map +0 -1
  40. package/fesm2022/ecosystem-compat.js.map +0 -1
  41. package/fesm2022/image-loader.d.ts.map +0 -1
  42. package/fesm2022/image-loader.js.map +0 -1
  43. package/fesm2022/index.d.ts.map +0 -1
  44. package/fesm2022/index.js.map +0 -1
  45. package/fesm2022/native-element.d.ts.map +0 -1
  46. package/fesm2022/native-element.js.map +0 -1
  47. package/fesm2022/native-renderer.d.ts.map +0 -1
  48. package/fesm2022/native-renderer.js.map +0 -1
  49. package/fesm2022/native-title.d.ts.map +0 -1
  50. package/fesm2022/native-title.js.map +0 -1
  51. package/fesm2022/platform.d.ts.map +0 -1
  52. package/fesm2022/platform.js.map +0 -1
  53. package/fesm2022/system-providers.d.ts.map +0 -1
  54. package/fesm2022/system-providers.js.map +0 -1
  55. package/fesm2022/viewport-scroller.d.ts.map +0 -1
  56. package/fesm2022/viewport-scroller.js.map +0 -1
@@ -0,0 +1,742 @@
1
+ import { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ function getElementAttribute(el, name) {
4
+ if (!el || typeof el !== 'object') {
5
+ return undefined;
6
+ }
7
+ const attrs = el.attributes;
8
+ if (attrs instanceof Map) {
9
+ return attrs.get(name);
10
+ }
11
+ if (attrs && typeof attrs.getNamedItem === 'function') {
12
+ return attrs.getNamedItem(name)?.value;
13
+ }
14
+ return undefined;
15
+ }
16
+ function setCachedAttribute(el, name, value) {
17
+ if (!el || typeof el !== 'object') {
18
+ return;
19
+ }
20
+ const attrs = el.attributes;
21
+ if (attrs instanceof Map) {
22
+ attrs.set(name, value);
23
+ }
24
+ }
25
+ function hasElementAttribute(el, name) {
26
+ if (!el || typeof el !== 'object') {
27
+ return false;
28
+ }
29
+ const attrs = el.attributes;
30
+ if (attrs instanceof Map) {
31
+ return attrs.has(name);
32
+ }
33
+ if (attrs && typeof attrs.getNamedItem === 'function') {
34
+ return attrs.getNamedItem(name) !== null;
35
+ }
36
+ return false;
37
+ }
38
+ function syncNativeAttr(renderer, el, name, value) {
39
+ if (value === undefined) {
40
+ return;
41
+ }
42
+ if (value === null) {
43
+ if (hasElementAttribute(el, name)) {
44
+ renderer.removeAttribute(el, name);
45
+ }
46
+ return;
47
+ }
48
+ const strVal = String(value);
49
+ if (getElementAttribute(el, name) === strVal) {
50
+ return;
51
+ }
52
+ renderer.setAttribute(el, name, strVal);
53
+ }
54
+ function syncNativeProp(renderer, el, name, value) {
55
+ if (value === undefined) {
56
+ return;
57
+ }
58
+ const strVal = value === null ? '' : String(value);
59
+ if (getElementAttribute(el, name) === strVal) {
60
+ return;
61
+ }
62
+ setCachedAttribute(el, name, strVal);
63
+ renderer.setProperty(el, name, strVal);
64
+ }
65
+ function isTruthyDisabledInput(value) {
66
+ if (value === undefined || value === null || value === false || value === 0) {
67
+ return false;
68
+ }
69
+ if (typeof value === 'string') {
70
+ const lower = value.trim().toLowerCase();
71
+ return lower !== 'false' && lower !== '0' && lower !== 'null' && lower !== 'undefined';
72
+ }
73
+ return Boolean(value);
74
+ }
75
+ /**
76
+ * Common layout, visibility, accessibility, and interaction directive covering all native desktop
77
+ * widget elements (`<ng-*>`, `<gtk-*>`, `<adw-*>`).
78
+ */
79
+ export class NativeElementDirective {
80
+ renderer = inject(Renderer2);
81
+ el = inject(ElementRef).nativeElement;
82
+ set hexpand(val) {
83
+ syncNativeAttr(this.renderer, this.el, 'hexpand', val);
84
+ }
85
+ set vexpand(val) {
86
+ syncNativeAttr(this.renderer, this.el, 'vexpand', val);
87
+ }
88
+ set halign(val) {
89
+ syncNativeAttr(this.renderer, this.el, 'halign', val);
90
+ }
91
+ set valign(val) {
92
+ syncNativeAttr(this.renderer, this.el, 'valign', val);
93
+ }
94
+ set width(val) {
95
+ syncNativeAttr(this.renderer, this.el, 'width', val);
96
+ }
97
+ set height(val) {
98
+ syncNativeAttr(this.renderer, this.el, 'height', val);
99
+ }
100
+ set minWidth(val) {
101
+ syncNativeAttr(this.renderer, this.el, 'min-width', val);
102
+ }
103
+ set minHeight(val) {
104
+ syncNativeAttr(this.renderer, this.el, 'min-height', val);
105
+ }
106
+ set margin(val) {
107
+ syncNativeAttr(this.renderer, this.el, 'margin', val);
108
+ }
109
+ set marginTop(val) {
110
+ syncNativeAttr(this.renderer, this.el, 'margin-top', val);
111
+ }
112
+ set marginBottom(val) {
113
+ syncNativeAttr(this.renderer, this.el, 'margin-bottom', val);
114
+ }
115
+ set marginStart(val) {
116
+ syncNativeAttr(this.renderer, this.el, 'margin-start', val);
117
+ }
118
+ set marginEnd(val) {
119
+ syncNativeAttr(this.renderer, this.el, 'margin-end', val);
120
+ }
121
+ set visible(val) {
122
+ syncNativeAttr(this.renderer, this.el, 'visible', val);
123
+ }
124
+ set sensitive(val) {
125
+ syncNativeAttr(this.renderer, this.el, 'sensitive', val);
126
+ }
127
+ set disabled(val) {
128
+ if (val === undefined) {
129
+ return;
130
+ }
131
+ const nextSensitive = isTruthyDisabledInput(val) ? 'false' : 'true';
132
+ if (getElementAttribute(this.el, 'sensitive') === nextSensitive) {
133
+ return;
134
+ }
135
+ this.renderer.setProperty(this.el, 'disabled', val);
136
+ }
137
+ set tooltip(val) {
138
+ syncNativeAttr(this.renderer, this.el, 'tooltip', val);
139
+ }
140
+ set eventMask(val) {
141
+ syncNativeAttr(this.renderer, this.el, 'event-mask', val);
142
+ }
143
+ set dropTarget(val) {
144
+ syncNativeAttr(this.renderer, this.el, 'drop-target', val);
145
+ }
146
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
147
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeElementDirective, isStandalone: true, selector: "ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar,ng-scroll,gtk-scrolled-window,ng-box,gtk-box,ng-grid,gtk-grid,ng-separator,gtk-separator,ng-button,gtk-button,ng-label,gtk-label,ng-entry,gtk-entry,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-flow,ng-flow-box,gtk-flow-box,ng-spinner,gtk-spinner,ng-progress-bar,gtk-progress-bar,ng-paned,gtk-paned,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-text-view,gtk-text-view,ng-password-entry,gtk-password-entry,ng-spin-button,gtk-spin-button,ng-search-entry,gtk-search-entry,ng-clamp,adw-clamp,ng-list,ng-table,gtk-list-box,gtk-list-view,ng-popover,gtk-popover,ng-menu,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row", inputs: { hexpand: "hexpand", vexpand: "vexpand", halign: "halign", valign: "valign", width: "width", height: "height", minWidth: ["min-width", "minWidth"], minHeight: ["min-height", "minHeight"], margin: "margin", marginTop: ["margin-top", "marginTop"], marginBottom: ["margin-bottom", "marginBottom"], marginStart: ["margin-start", "marginStart"], marginEnd: ["margin-end", "marginEnd"], visible: "visible", sensitive: "sensitive", disabled: "disabled", tooltip: "tooltip", eventMask: ["event-mask", "eventMask"], dropTarget: ["drop-target", "dropTarget"] }, ngImport: i0 });
148
+ }
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeElementDirective, decorators: [{
150
+ type: Directive,
151
+ args: [{
152
+ selector: 'ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar,ng-scroll,gtk-scrolled-window,ng-box,gtk-box,ng-grid,gtk-grid,ng-separator,gtk-separator,ng-button,gtk-button,ng-label,gtk-label,ng-entry,gtk-entry,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-flow,ng-flow-box,gtk-flow-box,ng-spinner,gtk-spinner,ng-progress-bar,gtk-progress-bar,ng-paned,gtk-paned,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-text-view,gtk-text-view,ng-password-entry,gtk-password-entry,ng-spin-button,gtk-spin-button,ng-search-entry,gtk-search-entry,ng-clamp,adw-clamp,ng-list,ng-table,gtk-list-box,gtk-list-view,ng-popover,gtk-popover,ng-menu,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row',
153
+ standalone: true,
154
+ }]
155
+ }], propDecorators: { hexpand: [{
156
+ type: Input
157
+ }], vexpand: [{
158
+ type: Input
159
+ }], halign: [{
160
+ type: Input
161
+ }], valign: [{
162
+ type: Input
163
+ }], width: [{
164
+ type: Input
165
+ }], height: [{
166
+ type: Input
167
+ }], minWidth: [{
168
+ type: Input,
169
+ args: ['min-width']
170
+ }], minHeight: [{
171
+ type: Input,
172
+ args: ['min-height']
173
+ }], margin: [{
174
+ type: Input
175
+ }], marginTop: [{
176
+ type: Input,
177
+ args: ['margin-top']
178
+ }], marginBottom: [{
179
+ type: Input,
180
+ args: ['margin-bottom']
181
+ }], marginStart: [{
182
+ type: Input,
183
+ args: ['margin-start']
184
+ }], marginEnd: [{
185
+ type: Input,
186
+ args: ['margin-end']
187
+ }], visible: [{
188
+ type: Input
189
+ }], sensitive: [{
190
+ type: Input
191
+ }], disabled: [{
192
+ type: Input
193
+ }], tooltip: [{
194
+ type: Input
195
+ }], eventMask: [{
196
+ type: Input,
197
+ args: ['event-mask']
198
+ }], dropTarget: [{
199
+ type: Input,
200
+ args: ['drop-target']
201
+ }] } });
202
+ /**
203
+ * Typed directive for top-level native windows, dialogs, and header bars (`<ng-window>`,
204
+ * `<ng-dialog>`, `<ng-header-bar>`).
205
+ */
206
+ export class NativeWindowDirective {
207
+ renderer = inject(Renderer2);
208
+ el = inject(ElementRef).nativeElement;
209
+ set title(val) {
210
+ syncNativeProp(this.renderer, this.el, 'title', val);
211
+ }
212
+ set subtitle(val) {
213
+ syncNativeAttr(this.renderer, this.el, 'subtitle', val);
214
+ }
215
+ set showTitleButtons(val) {
216
+ syncNativeAttr(this.renderer, this.el, 'show-title-buttons', val);
217
+ }
218
+ set icon(val) {
219
+ syncNativeAttr(this.renderer, this.el, 'icon', val);
220
+ }
221
+ set resizable(val) {
222
+ syncNativeAttr(this.renderer, this.el, 'resizable', val);
223
+ }
224
+ set decorated(val) {
225
+ syncNativeAttr(this.renderer, this.el, 'decorated', val);
226
+ }
227
+ set modal(val) {
228
+ syncNativeAttr(this.renderer, this.el, 'modal', val);
229
+ }
230
+ set transientForAttr(val) {
231
+ syncNativeAttr(this.renderer, this.el, 'transient-for', val);
232
+ }
233
+ set transientFor(val) {
234
+ syncNativeAttr(this.renderer, this.el, 'transient-for', val);
235
+ }
236
+ set preventClose(val) {
237
+ syncNativeAttr(this.renderer, this.el, 'prevent-close', val);
238
+ }
239
+ set preventCloseAttr(val) {
240
+ syncNativeAttr(this.renderer, this.el, 'prevent-close', val);
241
+ }
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeWindowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
243
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeWindowDirective, isStandalone: true, selector: "ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar", inputs: { title: "title", subtitle: "subtitle", showTitleButtons: ["show-title-buttons", "showTitleButtons"], icon: "icon", resizable: "resizable", decorated: "decorated", modal: "modal", transientForAttr: ["transient-for", "transientForAttr"], transientFor: "transientFor", preventClose: "preventClose", preventCloseAttr: ["prevent-close", "preventCloseAttr"] }, ngImport: i0 });
244
+ }
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeWindowDirective, decorators: [{
246
+ type: Directive,
247
+ args: [{
248
+ selector: 'ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar',
249
+ standalone: true,
250
+ }]
251
+ }], propDecorators: { title: [{
252
+ type: Input
253
+ }], subtitle: [{
254
+ type: Input
255
+ }], showTitleButtons: [{
256
+ type: Input,
257
+ args: ['show-title-buttons']
258
+ }], icon: [{
259
+ type: Input
260
+ }], resizable: [{
261
+ type: Input
262
+ }], decorated: [{
263
+ type: Input
264
+ }], modal: [{
265
+ type: Input
266
+ }], transientForAttr: [{
267
+ type: Input,
268
+ args: ['transient-for']
269
+ }], transientFor: [{
270
+ type: Input
271
+ }], preventClose: [{
272
+ type: Input
273
+ }], preventCloseAttr: [{
274
+ type: Input,
275
+ args: ['prevent-close']
276
+ }] } });
277
+ /**
278
+ * Typed directive for native layout containers, grids, flow boxes, split panes, stacks, clamps,
279
+ * scroll viewports, separators, and expanders.
280
+ */
281
+ export class NativeContainerDirective {
282
+ renderer = inject(Renderer2);
283
+ el = inject(ElementRef).nativeElement;
284
+ set orientation(val) {
285
+ syncNativeAttr(this.renderer, this.el, 'orientation', val);
286
+ }
287
+ set spacing(val) {
288
+ syncNativeAttr(this.renderer, this.el, 'spacing', val);
289
+ }
290
+ set gap(val) {
291
+ syncNativeAttr(this.renderer, this.el, 'gap', val);
292
+ }
293
+ set rowSpacing(val) {
294
+ syncNativeAttr(this.renderer, this.el, 'row-spacing', val);
295
+ }
296
+ set columnSpacing(val) {
297
+ syncNativeAttr(this.renderer, this.el, 'column-spacing', val);
298
+ }
299
+ set minChildren(val) {
300
+ syncNativeAttr(this.renderer, this.el, 'min-children', val);
301
+ }
302
+ set maxChildren(val) {
303
+ syncNativeAttr(this.renderer, this.el, 'max-children', val);
304
+ }
305
+ set minPerRow(val) {
306
+ syncNativeAttr(this.renderer, this.el, 'min-per-row', val);
307
+ }
308
+ set maxPerRow(val) {
309
+ syncNativeAttr(this.renderer, this.el, 'max-per-row', val);
310
+ }
311
+ set homogeneous(val) {
312
+ syncNativeAttr(this.renderer, this.el, 'homogeneous', val);
313
+ }
314
+ set position(val) {
315
+ syncNativeAttr(this.renderer, this.el, 'position', val);
316
+ }
317
+ set visibleChild(val) {
318
+ syncNativeAttr(this.renderer, this.el, 'visible-child', val);
319
+ }
320
+ set activePage(val) {
321
+ syncNativeAttr(this.renderer, this.el, 'active-page', val);
322
+ }
323
+ set transition(val) {
324
+ syncNativeAttr(this.renderer, this.el, 'transition', val);
325
+ }
326
+ set transitionType(val) {
327
+ syncNativeAttr(this.renderer, this.el, 'transition-type', val);
328
+ }
329
+ set label(val) {
330
+ syncNativeAttr(this.renderer, this.el, 'label', val);
331
+ }
332
+ set title(val) {
333
+ syncNativeAttr(this.renderer, this.el, 'title', val);
334
+ }
335
+ set expanded(val) {
336
+ syncNativeAttr(this.renderer, this.el, 'expanded', val);
337
+ }
338
+ set open(val) {
339
+ syncNativeAttr(this.renderer, this.el, 'open', val);
340
+ }
341
+ set maxSize(val) {
342
+ syncNativeAttr(this.renderer, this.el, 'max-size', val);
343
+ }
344
+ set maximumSize(val) {
345
+ syncNativeAttr(this.renderer, this.el, 'maximum-size', val);
346
+ }
347
+ set scrollTo(val) {
348
+ syncNativeAttr(this.renderer, this.el, 'scroll-to', val);
349
+ }
350
+ set scrollAnchor(val) {
351
+ syncNativeAttr(this.renderer, this.el, 'scroll-anchor', val);
352
+ }
353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
354
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeContainerDirective, isStandalone: true, selector: "ng-box,gtk-box,ng-grid,gtk-grid,ng-flow,ng-flow-box,gtk-flow-box,ng-paned,gtk-paned,ng-scroll,gtk-scrolled-window,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-clamp,adw-clamp,ng-separator,gtk-separator", inputs: { orientation: "orientation", spacing: "spacing", gap: "gap", rowSpacing: ["row-spacing", "rowSpacing"], columnSpacing: ["column-spacing", "columnSpacing"], minChildren: ["min-children", "minChildren"], maxChildren: ["max-children", "maxChildren"], minPerRow: ["min-per-row", "minPerRow"], maxPerRow: ["max-per-row", "maxPerRow"], homogeneous: "homogeneous", position: "position", visibleChild: ["visible-child", "visibleChild"], activePage: ["active-page", "activePage"], transition: "transition", transitionType: ["transition-type", "transitionType"], label: "label", title: "title", expanded: "expanded", open: "open", maxSize: ["max-size", "maxSize"], maximumSize: ["maximum-size", "maximumSize"], scrollTo: ["scroll-to", "scrollTo"], scrollAnchor: ["scroll-anchor", "scrollAnchor"] }, ngImport: i0 });
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeContainerDirective, decorators: [{
357
+ type: Directive,
358
+ args: [{
359
+ selector: 'ng-box,gtk-box,ng-grid,gtk-grid,ng-flow,ng-flow-box,gtk-flow-box,ng-paned,gtk-paned,ng-scroll,gtk-scrolled-window,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-clamp,adw-clamp,ng-separator,gtk-separator',
360
+ standalone: true,
361
+ }]
362
+ }], propDecorators: { orientation: [{
363
+ type: Input
364
+ }], spacing: [{
365
+ type: Input
366
+ }], gap: [{
367
+ type: Input
368
+ }], rowSpacing: [{
369
+ type: Input,
370
+ args: ['row-spacing']
371
+ }], columnSpacing: [{
372
+ type: Input,
373
+ args: ['column-spacing']
374
+ }], minChildren: [{
375
+ type: Input,
376
+ args: ['min-children']
377
+ }], maxChildren: [{
378
+ type: Input,
379
+ args: ['max-children']
380
+ }], minPerRow: [{
381
+ type: Input,
382
+ args: ['min-per-row']
383
+ }], maxPerRow: [{
384
+ type: Input,
385
+ args: ['max-per-row']
386
+ }], homogeneous: [{
387
+ type: Input
388
+ }], position: [{
389
+ type: Input
390
+ }], visibleChild: [{
391
+ type: Input,
392
+ args: ['visible-child']
393
+ }], activePage: [{
394
+ type: Input,
395
+ args: ['active-page']
396
+ }], transition: [{
397
+ type: Input
398
+ }], transitionType: [{
399
+ type: Input,
400
+ args: ['transition-type']
401
+ }], label: [{
402
+ type: Input
403
+ }], title: [{
404
+ type: Input
405
+ }], expanded: [{
406
+ type: Input
407
+ }], open: [{
408
+ type: Input
409
+ }], maxSize: [{
410
+ type: Input,
411
+ args: ['max-size']
412
+ }], maximumSize: [{
413
+ type: Input,
414
+ args: ['maximum-size']
415
+ }], scrollTo: [{
416
+ type: Input,
417
+ args: ['scroll-to']
418
+ }], scrollAnchor: [{
419
+ type: Input,
420
+ args: ['scroll-anchor']
421
+ }] } });
422
+ /**
423
+ * Typed directive for native labels and action buttons (`<ng-label>`, `<ng-button>`).
424
+ */
425
+ export class NativeTextWidgetDirective {
426
+ renderer = inject(Renderer2);
427
+ el = inject(ElementRef).nativeElement;
428
+ set label(val) {
429
+ syncNativeProp(this.renderer, this.el, 'label', val);
430
+ }
431
+ set text(val) {
432
+ syncNativeProp(this.renderer, this.el, 'text', val);
433
+ }
434
+ set wrap(val) {
435
+ syncNativeAttr(this.renderer, this.el, 'wrap', val);
436
+ }
437
+ set selectable(val) {
438
+ syncNativeAttr(this.renderer, this.el, 'selectable', val);
439
+ }
440
+ set ellipsize(val) {
441
+ syncNativeAttr(this.renderer, this.el, 'ellipsize', val);
442
+ }
443
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextWidgetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
444
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeTextWidgetDirective, isStandalone: true, selector: "ng-button,gtk-button,ng-label,gtk-label", inputs: { label: "label", text: "text", wrap: "wrap", selectable: "selectable", ellipsize: "ellipsize" }, ngImport: i0 });
445
+ }
446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextWidgetDirective, decorators: [{
447
+ type: Directive,
448
+ args: [{
449
+ selector: 'ng-button,gtk-button,ng-label,gtk-label',
450
+ standalone: true,
451
+ }]
452
+ }], propDecorators: { label: [{
453
+ type: Input
454
+ }], text: [{
455
+ type: Input
456
+ }], wrap: [{
457
+ type: Input
458
+ }], selectable: [{
459
+ type: Input
460
+ }], ellipsize: [{
461
+ type: Input
462
+ }] } });
463
+ /**
464
+ * Typed directive for native images, level bars, progress bars, and spinners.
465
+ */
466
+ export class NativeMediaAndMeterDirective {
467
+ renderer = inject(Renderer2);
468
+ el = inject(ElementRef).nativeElement;
469
+ set src(val) {
470
+ syncNativeProp(this.renderer, this.el, 'src', val);
471
+ }
472
+ set ngSrc(val) {
473
+ syncNativeProp(this.renderer, this.el, 'ngSrc', val);
474
+ }
475
+ set alt(val) {
476
+ syncNativeAttr(this.renderer, this.el, 'alt', val);
477
+ }
478
+ set value(val) {
479
+ syncNativeAttr(this.renderer, this.el, 'value', val);
480
+ }
481
+ set min(val) {
482
+ syncNativeAttr(this.renderer, this.el, 'min', val);
483
+ }
484
+ set max(val) {
485
+ syncNativeAttr(this.renderer, this.el, 'max', val);
486
+ }
487
+ set indeterminate(val) {
488
+ syncNativeAttr(this.renderer, this.el, 'indeterminate', val);
489
+ }
490
+ set active(val) {
491
+ syncNativeAttr(this.renderer, this.el, 'active', val);
492
+ }
493
+ set spinning(val) {
494
+ syncNativeAttr(this.renderer, this.el, 'spinning', val);
495
+ }
496
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeMediaAndMeterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
497
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeMediaAndMeterDirective, isStandalone: true, selector: "ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-progress-bar,gtk-progress-bar,ng-spinner,gtk-spinner", inputs: { src: "src", ngSrc: "ngSrc", alt: "alt", value: "value", min: "min", max: "max", indeterminate: "indeterminate", active: "active", spinning: "spinning" }, ngImport: i0 });
498
+ }
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeMediaAndMeterDirective, decorators: [{
500
+ type: Directive,
501
+ args: [{
502
+ selector: 'ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-progress-bar,gtk-progress-bar,ng-spinner,gtk-spinner',
503
+ standalone: true,
504
+ }]
505
+ }], propDecorators: { src: [{
506
+ type: Input
507
+ }], ngSrc: [{
508
+ type: Input
509
+ }], alt: [{
510
+ type: Input
511
+ }], value: [{
512
+ type: Input
513
+ }], min: [{
514
+ type: Input
515
+ }], max: [{
516
+ type: Input
517
+ }], indeterminate: [{
518
+ type: Input
519
+ }], active: [{
520
+ type: Input
521
+ }], spinning: [{
522
+ type: Input
523
+ }] } });
524
+ /**
525
+ * Typed directive for native text inputs, switches, checkboxes, sliders, dropdowns, and spin buttons.
526
+ */
527
+ export class NativeInputWidgetDirective {
528
+ renderer = inject(Renderer2);
529
+ el = inject(ElementRef).nativeElement;
530
+ set placeholder(val) {
531
+ syncNativeAttr(this.renderer, this.el, 'placeholder', val);
532
+ }
533
+ set value(val) {
534
+ syncNativeAttr(this.renderer, this.el, 'value', val);
535
+ }
536
+ set text(val) {
537
+ syncNativeAttr(this.renderer, this.el, 'text', val);
538
+ }
539
+ set active(val) {
540
+ syncNativeAttr(this.renderer, this.el, 'active', val);
541
+ }
542
+ set checked(val) {
543
+ syncNativeAttr(this.renderer, this.el, 'checked', val);
544
+ }
545
+ set label(val) {
546
+ syncNativeAttr(this.renderer, this.el, 'label', val);
547
+ }
548
+ set options(val) {
549
+ syncNativeAttr(this.renderer, this.el, 'options', val);
550
+ }
551
+ set selected(val) {
552
+ syncNativeAttr(this.renderer, this.el, 'selected', val);
553
+ }
554
+ set editable(val) {
555
+ syncNativeAttr(this.renderer, this.el, 'editable', val);
556
+ }
557
+ set monospace(val) {
558
+ syncNativeAttr(this.renderer, this.el, 'monospace', val);
559
+ }
560
+ set showPeekIcon(val) {
561
+ syncNativeAttr(this.renderer, this.el, 'show-peek-icon', val);
562
+ }
563
+ set peek(val) {
564
+ syncNativeAttr(this.renderer, this.el, 'peek', val);
565
+ }
566
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeInputWidgetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
567
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeInputWidgetDirective, isStandalone: true, selector: "ng-entry,gtk-entry,ng-search-entry,gtk-search-entry,ng-password-entry,gtk-password-entry,ng-text-view,gtk-text-view,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-spin-button,gtk-spin-button,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row", inputs: { placeholder: "placeholder", value: "value", text: "text", active: "active", checked: "checked", label: "label", options: "options", selected: "selected", editable: "editable", monospace: "monospace", showPeekIcon: ["show-peek-icon", "showPeekIcon"], peek: "peek" }, ngImport: i0 });
568
+ }
569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeInputWidgetDirective, decorators: [{
570
+ type: Directive,
571
+ args: [{
572
+ selector: 'ng-entry,gtk-entry,ng-search-entry,gtk-search-entry,ng-password-entry,gtk-password-entry,ng-text-view,gtk-text-view,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-spin-button,gtk-spin-button,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row',
573
+ standalone: true,
574
+ }]
575
+ }], propDecorators: { placeholder: [{
576
+ type: Input
577
+ }], value: [{
578
+ type: Input
579
+ }], text: [{
580
+ type: Input
581
+ }], active: [{
582
+ type: Input
583
+ }], checked: [{
584
+ type: Input
585
+ }], label: [{
586
+ type: Input
587
+ }], options: [{
588
+ type: Input
589
+ }], selected: [{
590
+ type: Input
591
+ }], editable: [{
592
+ type: Input
593
+ }], monospace: [{
594
+ type: Input
595
+ }], showPeekIcon: [{
596
+ type: Input,
597
+ args: ['show-peek-icon']
598
+ }], peek: [{
599
+ type: Input
600
+ }] } });
601
+ /**
602
+ * Typed directive for native virtualized lists and tables (`<ng-list>`, `<ng-table>`).
603
+ */
604
+ export class NativeListDirective {
605
+ renderer = inject(Renderer2);
606
+ el = inject(ElementRef).nativeElement;
607
+ set selectionModeAttr(val) {
608
+ syncNativeAttr(this.renderer, this.el, 'selection-mode', val);
609
+ }
610
+ set selectionMode(val) {
611
+ syncNativeAttr(this.renderer, this.el, 'selection-mode', val);
612
+ }
613
+ set showSeparatorsAttr(val) {
614
+ syncNativeAttr(this.renderer, this.el, 'show-separators', val);
615
+ }
616
+ set showSeparators(val) {
617
+ syncNativeAttr(this.renderer, this.el, 'show-separators', val);
618
+ }
619
+ set separators(val) {
620
+ syncNativeAttr(this.renderer, this.el, 'separators', val);
621
+ }
622
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
623
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeListDirective, isStandalone: true, selector: "ng-list,ng-table,gtk-list-box,gtk-list-view", inputs: { selectionModeAttr: ["selection-mode", "selectionModeAttr"], selectionMode: "selectionMode", showSeparatorsAttr: ["show-separators", "showSeparatorsAttr"], showSeparators: "showSeparators", separators: "separators" }, ngImport: i0 });
624
+ }
625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeListDirective, decorators: [{
626
+ type: Directive,
627
+ args: [{
628
+ selector: 'ng-list,ng-table,gtk-list-box,gtk-list-view',
629
+ standalone: true,
630
+ }]
631
+ }], propDecorators: { selectionModeAttr: [{
632
+ type: Input,
633
+ args: ['selection-mode']
634
+ }], selectionMode: [{
635
+ type: Input
636
+ }], showSeparatorsAttr: [{
637
+ type: Input,
638
+ args: ['show-separators']
639
+ }], showSeparators: [{
640
+ type: Input
641
+ }], separators: [{
642
+ type: Input
643
+ }] } });
644
+ /**
645
+ * Typed directive for native anchored popovers and context menus (`<ng-popover>`, `<ng-menu>`).
646
+ */
647
+ export class NativePopoverDirective {
648
+ renderer = inject(Renderer2);
649
+ el = inject(ElementRef).nativeElement;
650
+ set open(val) {
651
+ syncNativeAttr(this.renderer, this.el, 'open', val);
652
+ }
653
+ set position(val) {
654
+ syncNativeAttr(this.renderer, this.el, 'position', val);
655
+ }
656
+ set placement(val) {
657
+ syncNativeAttr(this.renderer, this.el, 'placement', val);
658
+ }
659
+ set autohide(val) {
660
+ syncNativeAttr(this.renderer, this.el, 'autohide', val);
661
+ }
662
+ set hasArrowAttr(val) {
663
+ syncNativeAttr(this.renderer, this.el, 'has-arrow', val);
664
+ }
665
+ set hasArrow(val) {
666
+ syncNativeAttr(this.renderer, this.el, 'has-arrow', val);
667
+ }
668
+ set anchor(val) {
669
+ syncNativeAttr(this.renderer, this.el, 'anchor', val);
670
+ }
671
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativePopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
672
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativePopoverDirective, isStandalone: true, selector: "ng-popover,gtk-popover,ng-menu", inputs: { open: "open", position: "position", placement: "placement", autohide: "autohide", hasArrowAttr: ["has-arrow", "hasArrowAttr"], hasArrow: "hasArrow", anchor: "anchor" }, ngImport: i0 });
673
+ }
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativePopoverDirective, decorators: [{
675
+ type: Directive,
676
+ args: [{
677
+ selector: 'ng-popover,gtk-popover,ng-menu',
678
+ standalone: true,
679
+ }]
680
+ }], propDecorators: { open: [{
681
+ type: Input
682
+ }], position: [{
683
+ type: Input
684
+ }], placement: [{
685
+ type: Input
686
+ }], autohide: [{
687
+ type: Input
688
+ }], hasArrowAttr: [{
689
+ type: Input,
690
+ args: ['has-arrow']
691
+ }], hasArrow: [{
692
+ type: Input
693
+ }], anchor: [{
694
+ type: Input
695
+ }] } });
696
+ /**
697
+ * Typed directive for native numeric range & stepper inputs (`<ng-slider>`, `<ng-spin-button>`),
698
+ * isolating `min`/`max`/`step` away from boolean toggles for Signal Forms type safety.
699
+ */
700
+ export class NativeNumericRangeDirective {
701
+ renderer = inject(Renderer2);
702
+ el = inject(ElementRef).nativeElement;
703
+ set min(val) {
704
+ syncNativeAttr(this.renderer, this.el, 'min', val);
705
+ }
706
+ set max(val) {
707
+ syncNativeAttr(this.renderer, this.el, 'max', val);
708
+ }
709
+ set step(val) {
710
+ syncNativeAttr(this.renderer, this.el, 'step', val);
711
+ }
712
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumericRangeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
713
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeNumericRangeDirective, isStandalone: true, selector: "ng-slider,ng-scale,gtk-scale,ng-spin-button,gtk-spin-button,adw-spin-row", inputs: { min: "min", max: "max", step: "step" }, ngImport: i0 });
714
+ }
715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumericRangeDirective, decorators: [{
716
+ type: Directive,
717
+ args: [{
718
+ selector: 'ng-slider,ng-scale,gtk-scale,ng-spin-button,gtk-spin-button,adw-spin-row',
719
+ standalone: true,
720
+ }]
721
+ }], propDecorators: { min: [{
722
+ type: Input
723
+ }], max: [{
724
+ type: Input
725
+ }], step: [{
726
+ type: Input
727
+ }] } });
728
+ /**
729
+ * Convenience directive bundle enabling typed bindings on `<ng-*>`, `<gtk-*>`, and `<adw-*>` tags
730
+ * in standalone Angular components without `CUSTOM_ELEMENTS_SCHEMA`.
731
+ */
732
+ export const NATIVE_UI_DIRECTIVES = [
733
+ NativeElementDirective,
734
+ NativeWindowDirective,
735
+ NativeContainerDirective,
736
+ NativeTextWidgetDirective,
737
+ NativeMediaAndMeterDirective,
738
+ NativeInputWidgetDirective,
739
+ NativeNumericRangeDirective,
740
+ NativeListDirective,
741
+ NativePopoverDirective,
742
+ ];