@ng-desktop/platform 0.5.0 → 0.7.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.
- package/README.md +0 -1
- package/fesm2022/bridge.d.ts +5 -0
- package/fesm2022/bridge.js +1 -0
- package/fesm2022/css-style-parser.d.ts +16 -3
- package/fesm2022/css-style-parser.js +534 -104
- package/fesm2022/ecosystem-compat.d.ts +3 -5
- package/fesm2022/ecosystem-compat.js +16 -25
- package/fesm2022/index.d.ts +3 -1
- package/fesm2022/index.js +3 -1
- package/fesm2022/native-directives.d.ts +5 -2
- package/fesm2022/native-directives.js +17 -11
- package/fesm2022/native-element.d.ts +2 -0
- package/fesm2022/native-element.js +2 -0
- package/fesm2022/native-renderer.d.ts +4 -1
- package/fesm2022/native-renderer.js +88 -6
- package/fesm2022/system-providers.js +2 -1
- package/fesm2022/virtual-grid.component.d.ts +68 -0
- package/fesm2022/virtual-grid.component.js +324 -0
- package/fesm2022/virtual-layout.d.ts +71 -0
- package/fesm2022/virtual-layout.js +279 -0
- package/fesm2022/virtual-list.component.d.ts +25 -13
- package/fesm2022/virtual-list.component.js +156 -73
- package/package.json +1 -1
|
@@ -42,8 +42,7 @@ export declare const NATIVE_BRIDGE: InjectionToken<NgNativeBridge>;
|
|
|
42
42
|
export declare class NativeStorage implements Storage {
|
|
43
43
|
private readonly store;
|
|
44
44
|
private readonly bridge;
|
|
45
|
-
|
|
46
|
-
constructor(bridge?: NgNativeBridge | null);
|
|
45
|
+
constructor();
|
|
47
46
|
private ensureTable;
|
|
48
47
|
get length(): number;
|
|
49
48
|
key(index: number): string | null;
|
|
@@ -51,7 +50,7 @@ export declare class NativeStorage implements Storage {
|
|
|
51
50
|
setItem(key: string, value: string): void;
|
|
52
51
|
removeItem(key: string): void;
|
|
53
52
|
clear(): void;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeStorage,
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeStorage, never>;
|
|
55
54
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
56
55
|
}
|
|
57
56
|
/**
|
|
@@ -61,11 +60,10 @@ export declare class NativeStorage implements Storage {
|
|
|
61
60
|
export declare class NativeAriaAnnouncer {
|
|
62
61
|
private readonly announcements;
|
|
63
62
|
private readonly bridge;
|
|
64
|
-
constructor(bridge?: NgNativeBridge | null);
|
|
65
63
|
announce(message: string, politeness?: AriaPoliteness): Promise<void>;
|
|
66
64
|
clear(): void;
|
|
67
65
|
history(): readonly NativeAriaAnnouncement[];
|
|
68
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeAriaAnnouncer,
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NativeAriaAnnouncer, never>;
|
|
69
67
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
70
68
|
}
|
|
71
69
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inject, Injectable, InjectionToken, makeEnvironmentProviders, } from '@angular/core';
|
|
2
2
|
import { ensureNgNativeBridge } from './bridge.js';
|
|
3
3
|
import { getNativeActiveElement, NativeElementNode } from './native-element.js';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -9,16 +9,22 @@ export const NATIVE_BRIDGE = new InjectionToken('NATIVE_BRIDGE', {
|
|
|
9
9
|
providedIn: 'root',
|
|
10
10
|
factory: () => ensureNgNativeBridge(),
|
|
11
11
|
});
|
|
12
|
+
function resolveOptionalBridge() {
|
|
13
|
+
try {
|
|
14
|
+
return inject(NATIVE_BRIDGE, { optional: true }) ?? ensureNgNativeBridge();
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return ensureNgNativeBridge();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
12
20
|
/**
|
|
13
21
|
* Web `Storage`-compatible persistence adapter backed by the native SQLite engine (`ng_native_storage`)
|
|
14
22
|
* and an in-memory map, enabling `@ngrx/store` meta-reducers and state hydration without a browser DOM.
|
|
15
23
|
*/
|
|
16
24
|
export class NativeStorage {
|
|
17
25
|
store = new Map();
|
|
18
|
-
bridge;
|
|
19
|
-
|
|
20
|
-
constructor(bridge) {
|
|
21
|
-
this.bridge = bridge ?? ensureNgNativeBridge();
|
|
26
|
+
bridge = resolveOptionalBridge();
|
|
27
|
+
constructor() {
|
|
22
28
|
this.ensureTable();
|
|
23
29
|
}
|
|
24
30
|
ensureTable() {
|
|
@@ -51,11 +57,9 @@ export class NativeStorage {
|
|
|
51
57
|
}
|
|
52
58
|
setItem(key, value) {
|
|
53
59
|
const strValue = String(value);
|
|
54
|
-
const idNum = this.nextId++;
|
|
55
60
|
this.store.set(key, strValue);
|
|
56
61
|
try {
|
|
57
62
|
this.bridge.sqliteExecute(`INSERT OR REPLACE INTO ng_native_storage (key, val) VALUES ('${escapeSqlLiteral(key)}', '${escapeSqlLiteral(strValue)}')`);
|
|
58
|
-
this.bridge.setAttribute('__ng_native_storage__', `k_${idNum}`, key);
|
|
59
63
|
}
|
|
60
64
|
catch {
|
|
61
65
|
// In-memory store remains consistent when disk persistence is unavailable
|
|
@@ -79,28 +83,20 @@ export class NativeStorage {
|
|
|
79
83
|
// Ignore bridge persistence error in restricted sandboxes
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeStorage, deps: [
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
87
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeStorage, providedIn: 'root' });
|
|
84
88
|
}
|
|
85
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeStorage, decorators: [{
|
|
86
90
|
type: Injectable,
|
|
87
91
|
args: [{ providedIn: 'root' }]
|
|
88
|
-
}], ctorParameters: () => [
|
|
89
|
-
type: Optional
|
|
90
|
-
}, {
|
|
91
|
-
type: Inject,
|
|
92
|
-
args: [NATIVE_BRIDGE]
|
|
93
|
-
}] }] });
|
|
92
|
+
}], ctorParameters: () => [] });
|
|
94
93
|
/**
|
|
95
94
|
* Headless `@angular/cdk/a11y` `LiveAnnouncer`-compatible service for `@angular/aria` and native
|
|
96
95
|
* GTK4/WinUI/AppKit accessibility announcements.
|
|
97
96
|
*/
|
|
98
97
|
export class NativeAriaAnnouncer {
|
|
99
98
|
announcements = [];
|
|
100
|
-
bridge;
|
|
101
|
-
constructor(bridge) {
|
|
102
|
-
this.bridge = bridge ?? ensureNgNativeBridge();
|
|
103
|
-
}
|
|
99
|
+
bridge = resolveOptionalBridge();
|
|
104
100
|
announce(message, politeness = 'polite') {
|
|
105
101
|
const clean = String(message ?? '').trim();
|
|
106
102
|
if (!clean) {
|
|
@@ -116,18 +112,13 @@ export class NativeAriaAnnouncer {
|
|
|
116
112
|
history() {
|
|
117
113
|
return this.announcements;
|
|
118
114
|
}
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeAriaAnnouncer, deps: [
|
|
115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeAriaAnnouncer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
120
116
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeAriaAnnouncer, providedIn: 'root' });
|
|
121
117
|
}
|
|
122
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeAriaAnnouncer, decorators: [{
|
|
123
119
|
type: Injectable,
|
|
124
120
|
args: [{ providedIn: 'root' }]
|
|
125
|
-
}]
|
|
126
|
-
type: Optional
|
|
127
|
-
}, {
|
|
128
|
-
type: Inject,
|
|
129
|
-
args: [NATIVE_BRIDGE]
|
|
130
|
-
}] }] });
|
|
121
|
+
}] });
|
|
131
122
|
/**
|
|
132
123
|
* Redux DevTools (`__REDUX_DEVTOOLS_EXTENSION__`) bridge allowing `@ngrx/store-devtools`
|
|
133
124
|
* to attach cleanly inside JavaScriptCore / QuickJS without browser extensions.
|
package/fesm2022/index.d.ts
CHANGED
|
@@ -9,4 +9,6 @@ export { NATIVE_WINDOW_NODE_ID, NativeTitleService, provideNativeTitle } from '.
|
|
|
9
9
|
export { bootstrapNativeApplication, provideNativePlatform, type NativeBootstrapContext, } from './platform';
|
|
10
10
|
export { matchesKeyboardEvent, NativeKeyEventsPlugin, NativeSystemErrorHandler, provideNativeErrorHandler, provideNativeKeyEvents, provideSystemLocale, type NativeKeyEventPayload, } from './system-providers';
|
|
11
11
|
export { NativeViewportScroller, provideNativeViewportScroller } from './viewport-scroller';
|
|
12
|
-
export {
|
|
12
|
+
export { computeVariableVirtualSliceRange, computeVirtualGridSliceRange, computeVirtualSliceRange, FenwickOffsetTree, type VirtualGridSliceOptions, type VirtualGridSliceRange, type VirtualSliceRange, } from './virtual-layout';
|
|
13
|
+
export { NativeVirtualGridComponent, type NativeVirtualGridEntry, type NativeVirtualGridItemContext, } from './virtual-grid.component';
|
|
14
|
+
export { NativeVirtualListComponent, type NativeVirtualItemContext, type NativeVirtualListEntry, type NativeVirtualRowActivatedEvent, } from './virtual-list.component';
|
package/fesm2022/index.js
CHANGED
|
@@ -9,4 +9,6 @@ export { NATIVE_WINDOW_NODE_ID, NativeTitleService, provideNativeTitle } from '.
|
|
|
9
9
|
export { bootstrapNativeApplication, provideNativePlatform, } from './platform.js';
|
|
10
10
|
export { matchesKeyboardEvent, NativeKeyEventsPlugin, NativeSystemErrorHandler, provideNativeErrorHandler, provideNativeKeyEvents, provideSystemLocale, } from './system-providers.js';
|
|
11
11
|
export { NativeViewportScroller, provideNativeViewportScroller } from './viewport-scroller.js';
|
|
12
|
-
export { computeVirtualSliceRange,
|
|
12
|
+
export { computeVariableVirtualSliceRange, computeVirtualGridSliceRange, computeVirtualSliceRange, FenwickOffsetTree, } from './virtual-layout.js';
|
|
13
|
+
export { NativeVirtualGridComponent, } from './virtual-grid.component.js';
|
|
14
|
+
export { NativeVirtualListComponent, } from './virtual-list.component.js';
|
|
@@ -28,8 +28,10 @@ export declare class NativeElementDirective {
|
|
|
28
28
|
set tooltip(val: NativeAttrInput);
|
|
29
29
|
set eventMask(val: NativeAttrInput);
|
|
30
30
|
set dropTarget(val: NativeBoolInput);
|
|
31
|
+
set col(val: NativeNumberInput);
|
|
32
|
+
set row(val: NativeNumberInput);
|
|
31
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<NativeElementDirective, never>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NativeElementDirective, "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", never, { "hexpand": { "alias": "hexpand"; "required": false; }; "vexpand": { "alias": "vexpand"; "required": false; }; "halign": { "alias": "halign"; "required": false; }; "valign": { "alias": "valign"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minWidth": { "alias": "min-width"; "required": false; }; "minHeight": { "alias": "min-height"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "marginTop": { "alias": "margin-top"; "required": false; }; "marginBottom": { "alias": "margin-bottom"; "required": false; }; "marginStart": { "alias": "margin-start"; "required": false; }; "marginEnd": { "alias": "margin-end"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "sensitive": { "alias": "sensitive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "eventMask": { "alias": "event-mask"; "required": false; }; "dropTarget": { "alias": "drop-target"; "required": false; }; }, {}, never, never, true, never>;
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NativeElementDirective, "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", never, { "hexpand": { "alias": "hexpand"; "required": false; }; "vexpand": { "alias": "vexpand"; "required": false; }; "halign": { "alias": "halign"; "required": false; }; "valign": { "alias": "valign"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minWidth": { "alias": "min-width"; "required": false; }; "minHeight": { "alias": "min-height"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "marginTop": { "alias": "margin-top"; "required": false; }; "marginBottom": { "alias": "margin-bottom"; "required": false; }; "marginStart": { "alias": "margin-start"; "required": false; }; "marginEnd": { "alias": "margin-end"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "sensitive": { "alias": "sensitive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "eventMask": { "alias": "event-mask"; "required": false; }; "dropTarget": { "alias": "drop-target"; "required": false; }; "col": { "alias": "col"; "required": false; }; "row": { "alias": "row"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Typed directive for top-level native windows, dialogs, and header bars (`<ng-window>`,
|
|
@@ -68,6 +70,7 @@ export declare class NativeContainerDirective {
|
|
|
68
70
|
set maxChildren(val: NativeNumberInput);
|
|
69
71
|
set minPerRow(val: NativeNumberInput);
|
|
70
72
|
set maxPerRow(val: NativeNumberInput);
|
|
73
|
+
set columns(val: NativeNumberInput);
|
|
71
74
|
set homogeneous(val: NativeBoolInput);
|
|
72
75
|
set position(val: NativeNumberInput);
|
|
73
76
|
set visibleChild(val: NativeAttrInput);
|
|
@@ -83,7 +86,7 @@ export declare class NativeContainerDirective {
|
|
|
83
86
|
set scrollTo(val: NativeAttrInput);
|
|
84
87
|
set scrollAnchor(val: NativeAttrInput);
|
|
85
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<NativeContainerDirective, never>;
|
|
86
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NativeContainerDirective, "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", never, { "orientation": { "alias": "orientation"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "rowSpacing": { "alias": "row-spacing"; "required": false; }; "columnSpacing": { "alias": "column-spacing"; "required": false; }; "minChildren": { "alias": "min-children"; "required": false; }; "maxChildren": { "alias": "max-children"; "required": false; }; "minPerRow": { "alias": "min-per-row"; "required": false; }; "maxPerRow": { "alias": "max-per-row"; "required": false; }; "homogeneous": { "alias": "homogeneous"; "required": false; }; "position": { "alias": "position"; "required": false; }; "visibleChild": { "alias": "visible-child"; "required": false; }; "activePage": { "alias": "active-page"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "transitionType": { "alias": "transition-type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "title": { "alias": "title"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "open": { "alias": "open"; "required": false; }; "maxSize": { "alias": "max-size"; "required": false; }; "maximumSize": { "alias": "maximum-size"; "required": false; }; "scrollTo": { "alias": "scroll-to"; "required": false; }; "scrollAnchor": { "alias": "scroll-anchor"; "required": false; }; }, {}, never, never, true, never>;
|
|
89
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NativeContainerDirective, "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", never, { "orientation": { "alias": "orientation"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "rowSpacing": { "alias": "row-spacing"; "required": false; }; "columnSpacing": { "alias": "column-spacing"; "required": false; }; "minChildren": { "alias": "min-children"; "required": false; }; "maxChildren": { "alias": "max-children"; "required": false; }; "minPerRow": { "alias": "min-per-row"; "required": false; }; "maxPerRow": { "alias": "max-per-row"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "homogeneous": { "alias": "homogeneous"; "required": false; }; "position": { "alias": "position"; "required": false; }; "visibleChild": { "alias": "visible-child"; "required": false; }; "activePage": { "alias": "active-page"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "transitionType": { "alias": "transition-type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "title": { "alias": "title"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "open": { "alias": "open"; "required": false; }; "maxSize": { "alias": "max-size"; "required": false; }; "maximumSize": { "alias": "maximum-size"; "required": false; }; "scrollTo": { "alias": "scroll-to"; "required": false; }; "scrollAnchor": { "alias": "scroll-anchor"; "required": false; }; }, {}, never, never, true, never>;
|
|
87
90
|
}
|
|
88
91
|
/**
|
|
89
92
|
* Typed directive for native labels and action buttons (`<ng-label>`, `<ng-button>`).
|
|
@@ -143,14 +143,19 @@ export class NativeElementDirective {
|
|
|
143
143
|
set dropTarget(val) {
|
|
144
144
|
syncNativeAttr(this.renderer, this.el, 'drop-target', val);
|
|
145
145
|
}
|
|
146
|
+
set col(val) {
|
|
147
|
+
syncNativeAttr(this.renderer, this.el, 'col', val);
|
|
148
|
+
}
|
|
149
|
+
set row(val) {
|
|
150
|
+
syncNativeAttr(this.renderer, this.el, 'row', val);
|
|
151
|
+
}
|
|
146
152
|
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 });
|
|
153
|
+
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"], col: "col", row: "row" }, ngImport: i0 });
|
|
148
154
|
}
|
|
149
155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeElementDirective, decorators: [{
|
|
150
156
|
type: Directive,
|
|
151
157
|
args: [{
|
|
152
158
|
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
159
|
}]
|
|
155
160
|
}], propDecorators: { hexpand: [{
|
|
156
161
|
type: Input
|
|
@@ -198,6 +203,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
198
203
|
}], dropTarget: [{
|
|
199
204
|
type: Input,
|
|
200
205
|
args: ['drop-target']
|
|
206
|
+
}], col: [{
|
|
207
|
+
type: Input
|
|
208
|
+
}], row: [{
|
|
209
|
+
type: Input
|
|
201
210
|
}] } });
|
|
202
211
|
/**
|
|
203
212
|
* Typed directive for top-level native windows, dialogs, and header bars (`<ng-window>`,
|
|
@@ -246,7 +255,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
246
255
|
type: Directive,
|
|
247
256
|
args: [{
|
|
248
257
|
selector: 'ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar',
|
|
249
|
-
standalone: true,
|
|
250
258
|
}]
|
|
251
259
|
}], propDecorators: { title: [{
|
|
252
260
|
type: Input
|
|
@@ -308,6 +316,9 @@ export class NativeContainerDirective {
|
|
|
308
316
|
set maxPerRow(val) {
|
|
309
317
|
syncNativeAttr(this.renderer, this.el, 'max-per-row', val);
|
|
310
318
|
}
|
|
319
|
+
set columns(val) {
|
|
320
|
+
syncNativeAttr(this.renderer, this.el, 'columns', val);
|
|
321
|
+
}
|
|
311
322
|
set homogeneous(val) {
|
|
312
323
|
syncNativeAttr(this.renderer, this.el, 'homogeneous', val);
|
|
313
324
|
}
|
|
@@ -351,13 +362,12 @@ export class NativeContainerDirective {
|
|
|
351
362
|
syncNativeAttr(this.renderer, this.el, 'scroll-anchor', val);
|
|
352
363
|
}
|
|
353
364
|
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 });
|
|
365
|
+
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"], columns: "columns", 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
366
|
}
|
|
356
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeContainerDirective, decorators: [{
|
|
357
368
|
type: Directive,
|
|
358
369
|
args: [{
|
|
359
370
|
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
371
|
}]
|
|
362
372
|
}], propDecorators: { orientation: [{
|
|
363
373
|
type: Input
|
|
@@ -383,6 +393,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
383
393
|
}], maxPerRow: [{
|
|
384
394
|
type: Input,
|
|
385
395
|
args: ['max-per-row']
|
|
396
|
+
}], columns: [{
|
|
397
|
+
type: Input
|
|
386
398
|
}], homogeneous: [{
|
|
387
399
|
type: Input
|
|
388
400
|
}], position: [{
|
|
@@ -447,7 +459,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
447
459
|
type: Directive,
|
|
448
460
|
args: [{
|
|
449
461
|
selector: 'ng-button,gtk-button,ng-label,gtk-label',
|
|
450
|
-
standalone: true,
|
|
451
462
|
}]
|
|
452
463
|
}], propDecorators: { label: [{
|
|
453
464
|
type: Input
|
|
@@ -500,7 +511,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
500
511
|
type: Directive,
|
|
501
512
|
args: [{
|
|
502
513
|
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
514
|
}]
|
|
505
515
|
}], propDecorators: { src: [{
|
|
506
516
|
type: Input
|
|
@@ -570,7 +580,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
570
580
|
type: Directive,
|
|
571
581
|
args: [{
|
|
572
582
|
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
583
|
}]
|
|
575
584
|
}], propDecorators: { placeholder: [{
|
|
576
585
|
type: Input
|
|
@@ -626,7 +635,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
626
635
|
type: Directive,
|
|
627
636
|
args: [{
|
|
628
637
|
selector: 'ng-list,ng-table,gtk-list-box,gtk-list-view',
|
|
629
|
-
standalone: true,
|
|
630
638
|
}]
|
|
631
639
|
}], propDecorators: { selectionModeAttr: [{
|
|
632
640
|
type: Input,
|
|
@@ -675,7 +683,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
675
683
|
type: Directive,
|
|
676
684
|
args: [{
|
|
677
685
|
selector: 'ng-popover,gtk-popover,ng-menu',
|
|
678
|
-
standalone: true,
|
|
679
686
|
}]
|
|
680
687
|
}], propDecorators: { open: [{
|
|
681
688
|
type: Input
|
|
@@ -716,7 +723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
716
723
|
type: Directive,
|
|
717
724
|
args: [{
|
|
718
725
|
selector: 'ng-slider,ng-scale,gtk-scale,ng-spin-button,gtk-spin-button,adw-spin-row',
|
|
719
|
-
standalone: true,
|
|
720
726
|
}]
|
|
721
727
|
}], propDecorators: { min: [{
|
|
722
728
|
type: Input
|
|
@@ -36,6 +36,8 @@ export declare class NativeElementNode {
|
|
|
36
36
|
readonly styles: Map<string, string>;
|
|
37
37
|
private readonly listeners;
|
|
38
38
|
textContent: string;
|
|
39
|
+
encapsulationScope: string | null;
|
|
40
|
+
hostEncapsulationScope: string | null;
|
|
39
41
|
readonly classList: {
|
|
40
42
|
add: (...tokens: string[]) => void;
|
|
41
43
|
remove: (...tokens: string[]) => void;
|
|
@@ -25,6 +25,8 @@ export class NativeElementNode {
|
|
|
25
25
|
styles = new Map();
|
|
26
26
|
listeners = new Map();
|
|
27
27
|
textContent = '';
|
|
28
|
+
encapsulationScope = null;
|
|
29
|
+
hostEncapsulationScope = null;
|
|
28
30
|
classList;
|
|
29
31
|
constructor(id, tag, isComment = false, isVirtual = false, isText = false) {
|
|
30
32
|
this.id = id;
|
|
@@ -31,12 +31,13 @@ export declare class NativeRenderer2 extends Renderer2 {
|
|
|
31
31
|
private readonly bridge;
|
|
32
32
|
private readonly nodesById;
|
|
33
33
|
private readonly nextId;
|
|
34
|
+
private readonly scopedClassesByScope;
|
|
34
35
|
private readonly hooks?;
|
|
35
36
|
private readonly materializedTextLabels;
|
|
36
37
|
private readonly imageLoadSeq;
|
|
37
38
|
private readonly enabledEventTokens;
|
|
38
39
|
private readonly pendingVirtualListeners;
|
|
39
|
-
constructor(bridge: NgNativeBridge, nodesById: Map<string, NativeElementNode>, nextId: () => string, hooks?: NativeRendererHooks);
|
|
40
|
+
constructor(bridge: NgNativeBridge, nodesById: Map<string, NativeElementNode>, nextId: () => string, hooks?: NativeRendererHooks, scopedClassesByScope?: Map<string, Set<string>>);
|
|
40
41
|
private destroySubtreeNodes;
|
|
41
42
|
destroy(): void;
|
|
42
43
|
createElement(name: string, _namespace?: string | null): NativeElementNode;
|
|
@@ -77,6 +78,8 @@ export declare class NativeRendererFactory2 implements RendererFactory2 {
|
|
|
77
78
|
private readonly nodesById;
|
|
78
79
|
private readonly defaultRenderer;
|
|
79
80
|
private readonly registeredTypeIds;
|
|
81
|
+
private readonly scopedClassesByScope;
|
|
82
|
+
private readonly sharedRootVars;
|
|
80
83
|
private nodeCounter;
|
|
81
84
|
private primaryWindowId;
|
|
82
85
|
private primaryScrollId;
|
|
@@ -9,6 +9,7 @@ const VIRTUAL_ANGULAR_TAGS = new Set([
|
|
|
9
9
|
'ng-content',
|
|
10
10
|
'ng-component',
|
|
11
11
|
'ng-virtual-list',
|
|
12
|
+
'ng-virtual-grid',
|
|
12
13
|
]);
|
|
13
14
|
const TEXT_BEARING_TAGS = new Set([
|
|
14
15
|
'ng-label',
|
|
@@ -213,6 +214,7 @@ function mapNativeEventNames(eventName) {
|
|
|
213
214
|
case 'dragleave':
|
|
214
215
|
return ['dragleave'];
|
|
215
216
|
case 'drop':
|
|
217
|
+
case 'file-drop':
|
|
216
218
|
return ['drop', 'files-dropped'];
|
|
217
219
|
default:
|
|
218
220
|
return [eventName];
|
|
@@ -318,17 +320,19 @@ export class NativeRenderer2 extends Renderer2 {
|
|
|
318
320
|
bridge;
|
|
319
321
|
nodesById;
|
|
320
322
|
nextId;
|
|
323
|
+
scopedClassesByScope;
|
|
321
324
|
hooks;
|
|
322
325
|
materializedTextLabels = new Map();
|
|
323
326
|
imageLoadSeq = new WeakMap();
|
|
324
327
|
enabledEventTokens = new Map();
|
|
325
328
|
pendingVirtualListeners = new WeakMap();
|
|
326
|
-
constructor(bridge, nodesById, nextId, hooks) {
|
|
329
|
+
constructor(bridge, nodesById, nextId, hooks, scopedClassesByScope = new Map()) {
|
|
327
330
|
super();
|
|
328
331
|
this.bridge = bridge;
|
|
329
332
|
this.nodesById = nodesById;
|
|
330
333
|
this.nextId = nextId;
|
|
331
334
|
this.hooks = hooks;
|
|
335
|
+
this.scopedClassesByScope = scopedClassesByScope;
|
|
332
336
|
this.destroyNode = (node) => {
|
|
333
337
|
if (node instanceof NativeElementNode) {
|
|
334
338
|
this.destroySubtreeNodes(node, true);
|
|
@@ -500,6 +504,33 @@ export class NativeRenderer2 extends Renderer2 {
|
|
|
500
504
|
return node.nextSibling;
|
|
501
505
|
}
|
|
502
506
|
setAttribute(el, name, value, _namespace) {
|
|
507
|
+
if (name.startsWith('_ngcontent-')) {
|
|
508
|
+
const scopeToken = name.slice('_ngcontent-'.length);
|
|
509
|
+
if (scopeToken && el.encapsulationScope !== scopeToken) {
|
|
510
|
+
el.encapsulationScope = scopeToken;
|
|
511
|
+
if (!el.isVirtual) {
|
|
512
|
+
const scopedSet = this.scopedClassesByScope.get(scopeToken);
|
|
513
|
+
if (scopedSet) {
|
|
514
|
+
for (const existing of el.classes) {
|
|
515
|
+
if (scopedSet.has(existing)) {
|
|
516
|
+
this.bridge.addClass(el.id, `${existing}__${scopeToken}`);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
if (name.startsWith('_nghost-')) {
|
|
525
|
+
const hostToken = name.slice('_nghost-'.length);
|
|
526
|
+
if (hostToken && el.hostEncapsulationScope !== hostToken) {
|
|
527
|
+
el.hostEncapsulationScope = hostToken;
|
|
528
|
+
if (!el.isVirtual && this.scopedClassesByScope.get(hostToken)?.has('__host')) {
|
|
529
|
+
this.bridge.addClass(el.id, `__host__${hostToken}`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
503
534
|
if (isInternalAngularAttr(name)) {
|
|
504
535
|
return;
|
|
505
536
|
}
|
|
@@ -561,12 +592,20 @@ export class NativeRenderer2 extends Renderer2 {
|
|
|
561
592
|
el.classes.add(name);
|
|
562
593
|
if (!el.isVirtual) {
|
|
563
594
|
this.bridge.addClass(el.id, name);
|
|
595
|
+
if (el.encapsulationScope &&
|
|
596
|
+
this.scopedClassesByScope.get(el.encapsulationScope)?.has(name)) {
|
|
597
|
+
this.bridge.addClass(el.id, `${name}__${el.encapsulationScope}`);
|
|
598
|
+
}
|
|
564
599
|
}
|
|
565
600
|
}
|
|
566
601
|
removeClass(el, name) {
|
|
567
602
|
el.classes.delete(name);
|
|
568
603
|
if (!el.isVirtual) {
|
|
569
604
|
this.bridge.removeClass(el.id, name);
|
|
605
|
+
if (el.encapsulationScope &&
|
|
606
|
+
this.scopedClassesByScope.get(el.encapsulationScope)?.has(name)) {
|
|
607
|
+
this.bridge.removeClass(el.id, `${name}__${el.encapsulationScope}`);
|
|
608
|
+
}
|
|
570
609
|
}
|
|
571
610
|
}
|
|
572
611
|
setStyle(el, style, value, _flags) {
|
|
@@ -629,7 +668,36 @@ export class NativeRenderer2 extends Renderer2 {
|
|
|
629
668
|
removeStyle(el, style, _flags) {
|
|
630
669
|
el.styles.delete(style);
|
|
631
670
|
if (!el.isVirtual) {
|
|
632
|
-
|
|
671
|
+
const key = style.trim().toLowerCase();
|
|
672
|
+
let nativeAttr = style;
|
|
673
|
+
if (key === 'flex' || key === 'flex-grow' || key === 'width') {
|
|
674
|
+
nativeAttr = 'hexpand';
|
|
675
|
+
}
|
|
676
|
+
else if (key === 'height') {
|
|
677
|
+
nativeAttr = 'vexpand';
|
|
678
|
+
}
|
|
679
|
+
else if (key === 'flex-direction') {
|
|
680
|
+
nativeAttr = 'orientation';
|
|
681
|
+
}
|
|
682
|
+
else if (key === 'gap') {
|
|
683
|
+
nativeAttr = 'spacing';
|
|
684
|
+
}
|
|
685
|
+
else if (key === 'row-gap' || key === 'column-gap') {
|
|
686
|
+
nativeAttr = key.replace('-gap', '-spacing');
|
|
687
|
+
}
|
|
688
|
+
else if (key === 'justify-self') {
|
|
689
|
+
nativeAttr = 'halign';
|
|
690
|
+
}
|
|
691
|
+
else if (key === 'align-self') {
|
|
692
|
+
nativeAttr = 'valign';
|
|
693
|
+
}
|
|
694
|
+
else if (key === 'margin-left') {
|
|
695
|
+
nativeAttr = 'margin-start';
|
|
696
|
+
}
|
|
697
|
+
else if (key === 'margin-right') {
|
|
698
|
+
nativeAttr = 'margin-end';
|
|
699
|
+
}
|
|
700
|
+
this.bridge.setAttribute(el.id, nativeAttr, '');
|
|
633
701
|
}
|
|
634
702
|
}
|
|
635
703
|
setProperty(el, name, value) {
|
|
@@ -760,6 +828,14 @@ export class NativeRenderer2 extends Renderer2 {
|
|
|
760
828
|
};
|
|
761
829
|
}
|
|
762
830
|
if (target.isVirtual) {
|
|
831
|
+
// Built-in virtual containers own their internal <ng-scroll> / <ng-list> and expose scrollBottom /
|
|
832
|
+
// rowActivated as Angular outputs; forwarding host DOM listeners would fire them twice with raw payloads.
|
|
833
|
+
if (((target.tag === 'ng-virtual-list' || target.tag === 'ng-virtual-grid') &&
|
|
834
|
+
(eventName === 'scrollBottom' || eventName === 'scroll-bottom')) ||
|
|
835
|
+
(target.tag === 'ng-virtual-list' &&
|
|
836
|
+
(eventName === 'rowActivated' || eventName === 'row-activated'))) {
|
|
837
|
+
return () => { };
|
|
838
|
+
}
|
|
763
839
|
const reg = {
|
|
764
840
|
nativeEvents,
|
|
765
841
|
eventName,
|
|
@@ -1031,6 +1107,12 @@ export class NativeRendererFactory2 {
|
|
|
1031
1107
|
nodesById = new Map();
|
|
1032
1108
|
defaultRenderer;
|
|
1033
1109
|
registeredTypeIds = new Set();
|
|
1110
|
+
scopedClassesByScope = new Map();
|
|
1111
|
+
sharedRootVars = {
|
|
1112
|
+
baseVars: new Map(),
|
|
1113
|
+
lightVars: new Map(),
|
|
1114
|
+
darkVars: new Map(),
|
|
1115
|
+
};
|
|
1034
1116
|
nodeCounter = 1;
|
|
1035
1117
|
primaryWindowId = null;
|
|
1036
1118
|
primaryScrollId = null;
|
|
@@ -1043,21 +1125,21 @@ export class NativeRendererFactory2 {
|
|
|
1043
1125
|
this.primaryWindowId = id;
|
|
1044
1126
|
}
|
|
1045
1127
|
}
|
|
1046
|
-
else if (tag === 'ng-scroll' || tag === '
|
|
1128
|
+
else if (tag === 'ng-scroll' || tag === 'gtk-scrolled-window') {
|
|
1047
1129
|
if (!this.primaryScrollId || !this.nodesById.has(this.primaryScrollId)) {
|
|
1048
1130
|
this.primaryScrollId = id;
|
|
1049
1131
|
}
|
|
1050
1132
|
}
|
|
1051
1133
|
},
|
|
1052
1134
|
getPrimaryWindowId: () => this.getPrimaryWindowId(),
|
|
1053
|
-
});
|
|
1135
|
+
}, this.scopedClassesByScope);
|
|
1054
1136
|
}
|
|
1055
1137
|
createRenderer(_hostElement, type) {
|
|
1056
1138
|
if (type?.styles?.length) {
|
|
1057
1139
|
const typeKey = type.id || '__anonymous__';
|
|
1058
1140
|
if (!this.registeredTypeIds.has(typeKey)) {
|
|
1059
1141
|
this.registeredTypeIds.add(typeKey);
|
|
1060
|
-
registerParsedStyles(this.bridge, type.styles);
|
|
1142
|
+
registerParsedStyles(this.bridge, type.styles, this.scopedClassesByScope, this.sharedRootVars);
|
|
1061
1143
|
}
|
|
1062
1144
|
}
|
|
1063
1145
|
return this.defaultRenderer;
|
|
@@ -1086,7 +1168,7 @@ export class NativeRendererFactory2 {
|
|
|
1086
1168
|
return this.primaryScrollId;
|
|
1087
1169
|
}
|
|
1088
1170
|
for (const node of this.nodesById.values()) {
|
|
1089
|
-
if (!node.isVirtual && (node.tag === 'ng-scroll' || node.tag === '
|
|
1171
|
+
if (!node.isVirtual && (node.tag === 'ng-scroll' || node.tag === 'gtk-scrolled-window')) {
|
|
1090
1172
|
this.primaryScrollId = node.id;
|
|
1091
1173
|
return node.id;
|
|
1092
1174
|
}
|
|
@@ -90,7 +90,8 @@ export class NativeKeyEventsPlugin extends EventManagerPlugin {
|
|
|
90
90
|
}
|
|
91
91
|
supports(eventName) {
|
|
92
92
|
const lower = eventName.trim().toLowerCase();
|
|
93
|
-
return (lower.startsWith('keydown.')
|
|
93
|
+
return ((lower.startsWith('keydown.') && lower.length > 8) ||
|
|
94
|
+
(lower.startsWith('keyup.') && lower.length > 6));
|
|
94
95
|
}
|
|
95
96
|
addEventListener(element, eventName, handler) {
|
|
96
97
|
const baseEvent = eventName.trim().toLowerCase().startsWith('keyup.') ? 'keyup' : 'keydown';
|