@symbiote-native/angular 0.7.0 → 0.8.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 +3 -3
- package/build/angular/bootstrap.js +1 -1
- package/build/angular/bootstrap.js.map +1 -1
- package/build/angular/components/activity-indicator/index.android.js +7 -2
- package/build/angular/components/activity-indicator/index.android.js.map +1 -1
- package/build/angular/components/activity-indicator/index.ios.js +3 -1
- package/build/angular/components/activity-indicator/index.ios.js.map +1 -1
- package/build/angular/components/activity-indicator/shared.d.ts +1 -1
- package/build/angular/components/activity-indicator/shared.js +1 -1
- package/build/angular/components/activity-indicator/shared.js.map +1 -1
- package/build/angular/components/button.js +13 -5
- package/build/angular/components/button.js.map +1 -1
- package/build/angular/components/flat-list/index.d.ts +1 -1
- package/build/angular/components/flat-list/index.js +47 -14
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image/index.android.js +4 -2
- package/build/angular/components/image/index.android.js.map +1 -1
- package/build/angular/components/image/index.ios.js +4 -2
- package/build/angular/components/image/index.ios.js.map +1 -1
- package/build/angular/components/image/shared.js +18 -6
- package/build/angular/components/image/shared.js.map +1 -1
- package/build/angular/components/image-background.js +22 -8
- package/build/angular/components/image-background.js.map +1 -1
- package/build/angular/components/input-accessory-view/index.js +7 -2
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +1 -0
- package/build/angular/components/keyboard-avoiding-view/index.js +39 -9
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.js +7 -2
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable/index.d.ts +1 -1
- package/build/angular/components/pressable/index.js +6 -2
- package/build/angular/components/pressable/index.js.map +1 -1
- package/build/angular/components/refresh-control/index.js +3 -1
- package/build/angular/components/refresh-control/index.js.map +1 -1
- package/build/angular/components/safe-area-view/index.js +3 -1
- package/build/angular/components/safe-area-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/index.android.js +44 -14
- package/build/angular/components/scroll-view/index.android.js.map +1 -1
- package/build/angular/components/scroll-view/index.ios.js +13 -5
- package/build/angular/components/scroll-view/index.ios.js.map +1 -1
- package/build/angular/components/scroll-view/projection.d.ts +32 -0
- package/build/angular/components/scroll-view/projection.js +212 -47
- package/build/angular/components/scroll-view/projection.js.map +1 -1
- package/build/angular/components/scroll-view/shared.js +28 -7
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.js +7 -3
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/section-list/index.d.ts +6 -1
- package/build/angular/components/section-list/index.js +63 -18
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/switch/index.android.js +17 -3
- package/build/angular/components/switch/index.android.js.map +1 -1
- package/build/angular/components/switch/index.ios.js +17 -3
- package/build/angular/components/switch/index.ios.js.map +1 -1
- package/build/angular/components/switch/shared.d.ts +1 -1
- package/build/angular/components/switch/shared.js +5 -2
- package/build/angular/components/switch/shared.js.map +1 -1
- package/build/angular/components/text-input.d.ts +1 -1
- package/build/angular/components/text-input.js +25 -5
- package/build/angular/components/text-input.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +29 -7
- package/build/angular/components/touchable/index.js +246 -69
- package/build/angular/components/touchable/index.js.map +1 -1
- package/build/angular/components/touchable-native-feedback/index.js +2 -2
- package/build/angular/components/touchable-native-feedback/index.js.map +1 -1
- package/build/angular/components/virtualized-list/directives.js +4 -0
- package/build/angular/components/virtualized-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +5 -2
- package/build/angular/components/virtualized-list/index.js +197 -60
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +18 -1
- package/build/angular/components/virtualized-section-list/index.js +90 -21
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +1 -1
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.js +5 -1
- package/build/angular/create-portal/index.js.map +1 -1
- package/build/angular/create-tunnel/index.js.map +1 -1
- package/build/angular/descriptor-to-angular/index.js +3 -1
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/diagnostics.d.ts +33 -0
- package/build/angular/diagnostics.js +82 -0
- package/build/angular/diagnostics.js.map +1 -0
- package/build/angular/host-instance/index.js +1 -1
- package/build/angular/host-instance/index.js.map +1 -1
- package/build/angular/index.d.ts +5 -2
- package/build/angular/index.js +15 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.js +27 -9
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/app-registry/index.js.map +1 -1
- package/build/angular/modules/status-bar/index.js +1 -1
- package/build/angular/modules/status-bar/index.js.map +1 -1
- package/build/angular/primitives/index.d.ts +19 -2
- package/build/angular/primitives/index.js +39 -3
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +9 -1
- package/build/angular/primitives/shared.js +49 -3
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/render/index.js +48 -5
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/renderer/index.d.ts +1 -0
- package/build/angular/renderer/index.js +37 -2
- package/build/angular/renderer/index.js.map +1 -1
- package/build/angular/services/color-scheme.service.js.map +1 -1
- package/build/angular/services/window-dimensions.service.js +1 -1
- package/build/angular/services/window-dimensions.service.js.map +1 -1
- package/package.json +5 -5
- package/src/bootstrap.ts +4 -1
- package/src/components/activity-indicator/index.android.ts +7 -2
- package/src/components/activity-indicator/index.ios.ts +3 -1
- package/src/components/activity-indicator/shared.ts +32 -13
- package/src/components/button.ts +19 -6
- package/src/components/flat-list/index.ts +91 -29
- package/src/components/image/index.android.ts +9 -2
- package/src/components/image/index.ios.ts +9 -2
- package/src/components/image/shared.ts +58 -19
- package/src/components/image-background.ts +29 -10
- package/src/components/input-accessory-view/index.ts +27 -10
- package/src/components/keyboard-avoiding-view/index.ts +55 -15
- package/src/components/modal/index.ts +22 -8
- package/src/components/pressable/index.ts +51 -21
- package/src/components/refresh-control/index.ts +22 -8
- package/src/components/safe-area-view/index.ts +16 -7
- package/src/components/scroll-view/index.android.ts +31 -9
- package/src/components/scroll-view/index.ios.ts +17 -4
- package/src/components/scroll-view/projection.ts +290 -63
- package/src/components/scroll-view/shared.ts +93 -26
- package/src/components/scroll-view/sticky-header.ts +25 -8
- package/src/components/section-list/index.ts +61 -19
- package/src/components/switch/index.android.ts +14 -3
- package/src/components/switch/index.ios.ts +14 -3
- package/src/components/switch/shared.ts +15 -4
- package/src/components/text-input.ts +45 -13
- package/src/components/touchable/index.ts +296 -72
- package/src/components/touchable-native-feedback/index.ts +32 -10
- package/src/components/virtualized-list/directives.ts +19 -5
- package/src/components/virtualized-list/index.ts +274 -72
- package/src/components/virtualized-section-list/directives.ts +6 -3
- package/src/components/virtualized-section-list/index.ts +146 -34
- package/src/components.ts +4 -1
- package/src/create-portal/index.ts +8 -2
- package/src/create-tunnel/index.ts +3 -1
- package/src/descriptor-to-angular/index.ts +29 -8
- package/src/diagnostics.ts +138 -0
- package/src/host-instance/index.ts +9 -3
- package/src/index.ts +31 -2
- package/src/modules/animated/create-animated-component.ts +44 -15
- package/src/modules/app-registry/index.ts +3 -1
- package/src/modules/status-bar/index.ts +13 -4
- package/src/primitives/index.ts +46 -2
- package/src/primitives/shared.ts +70 -9
- package/src/render/index.ts +56 -6
- package/src/renderer/index.ts +76 -14
- package/src/services/color-scheme.service.ts +3 -1
- package/src/services/window-dimensions.service.ts +11 -4
|
@@ -44,8 +44,16 @@ import {
|
|
|
44
44
|
type IPressableAndroidRippleConfig,
|
|
45
45
|
type IRectOffset,
|
|
46
46
|
} from '@symbiote-native/components';
|
|
47
|
-
import {
|
|
48
|
-
|
|
47
|
+
import {
|
|
48
|
+
dlog,
|
|
49
|
+
isSymbioteEvent,
|
|
50
|
+
type ISymbioteEvent,
|
|
51
|
+
} from '@symbiote-native/engine';
|
|
52
|
+
import {
|
|
53
|
+
anchorHostStyle,
|
|
54
|
+
SymbioteHostPropsDirective,
|
|
55
|
+
ViewHost,
|
|
56
|
+
} from '../../primitives';
|
|
49
57
|
import { Pressable, type IAngularPressableInputs } from '../pressable';
|
|
50
58
|
|
|
51
59
|
export type {
|
|
@@ -58,7 +66,10 @@ export type {
|
|
|
58
66
|
// feedback config) minus children (Angular takes children via <ng-content>) and minus the press/
|
|
59
67
|
// hover events (declared as this component's OWN @Output()s below). Declared per-adapter over the
|
|
60
68
|
// shared Pressable INPUT surface.
|
|
61
|
-
export type IAngularTouchableNativeFeedbackProps = Omit<
|
|
69
|
+
export type IAngularTouchableNativeFeedbackProps = Omit<
|
|
70
|
+
IAngularPressableInputs,
|
|
71
|
+
'style'
|
|
72
|
+
> & {
|
|
62
73
|
background?: INativeFeedbackBackground;
|
|
63
74
|
useForeground?: boolean;
|
|
64
75
|
};
|
|
@@ -107,7 +118,8 @@ export class TouchableNativeFeedback
|
|
|
107
118
|
// The static helpers are pure config-dict producers; they live as members on the component class
|
|
108
119
|
// so callers reach them as `TouchableNativeFeedback.Ripple(...)`, exactly like RN.
|
|
109
120
|
static readonly SelectableBackground = selectableBackground;
|
|
110
|
-
static readonly SelectableBackgroundBorderless =
|
|
121
|
+
static readonly SelectableBackgroundBorderless =
|
|
122
|
+
selectableBackgroundBorderless;
|
|
111
123
|
static readonly Ripple = rippleBackground;
|
|
112
124
|
static readonly canUseNativeForeground = canUseNativeForeground;
|
|
113
125
|
|
|
@@ -144,8 +156,10 @@ export class TouchableNativeFeedback
|
|
|
144
156
|
@Input() accessibilityValue?: IAccessibilityProps['accessibilityValue'];
|
|
145
157
|
@Input() accessibilityActions?: IAccessibilityProps['accessibilityActions'];
|
|
146
158
|
@Input() accessibilityLabelledBy?: string | string[];
|
|
147
|
-
@Input()
|
|
148
|
-
|
|
159
|
+
@Input()
|
|
160
|
+
importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
|
|
161
|
+
@Input()
|
|
162
|
+
accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
|
|
149
163
|
@Input() screenReaderFocusable?: boolean;
|
|
150
164
|
@Input() accessibilityViewIsModal?: boolean;
|
|
151
165
|
@Input() accessibilityElementsHidden?: boolean;
|
|
@@ -222,7 +236,10 @@ export class TouchableNativeFeedback
|
|
|
222
236
|
// backgroundProps picks the foreground slot only where the platform supports it, else the
|
|
223
237
|
// background slot (canUseNativeForeground) — shared with React/Vue. One side is always undefined.
|
|
224
238
|
get feedback(): Record<string, INativeFeedbackBackground> {
|
|
225
|
-
return backgroundProps(
|
|
239
|
+
return backgroundProps(
|
|
240
|
+
this.resolvedBackground,
|
|
241
|
+
this.useForeground === true,
|
|
242
|
+
);
|
|
226
243
|
}
|
|
227
244
|
|
|
228
245
|
// Assembles the SAME resolved values the template used to bind one-by-one into a single
|
|
@@ -261,7 +278,10 @@ export class TouchableNativeFeedback
|
|
|
261
278
|
accessibilityLabel: this.accessibilityLabel,
|
|
262
279
|
accessibilityHint: this.accessibilityHint,
|
|
263
280
|
accessibilityRole: this.accessibilityRole,
|
|
264
|
-
accessibilityState: resolveDisabledAccessibilityState(
|
|
281
|
+
accessibilityState: resolveDisabledAccessibilityState(
|
|
282
|
+
this.accessibilityState,
|
|
283
|
+
this.disabled,
|
|
284
|
+
),
|
|
265
285
|
accessibilityValue: this.accessibilityValue,
|
|
266
286
|
accessibilityActions: this.accessibilityActions,
|
|
267
287
|
accessibilityLabelledBy: this.accessibilityLabelledBy,
|
|
@@ -272,8 +292,10 @@ export class TouchableNativeFeedback
|
|
|
272
292
|
accessibilityElementsHidden: this.accessibilityElementsHidden,
|
|
273
293
|
accessibilityIgnoresInvertColors: this.accessibilityIgnoresInvertColors,
|
|
274
294
|
accessibilityLanguage: this.accessibilityLanguage,
|
|
275
|
-
accessibilityRespondsToUserInteraction:
|
|
276
|
-
|
|
295
|
+
accessibilityRespondsToUserInteraction:
|
|
296
|
+
this.accessibilityRespondsToUserInteraction,
|
|
297
|
+
accessibilityShowsLargeContentViewer:
|
|
298
|
+
this.accessibilityShowsLargeContentViewer,
|
|
277
299
|
accessibilityLargeContentTitle: this.accessibilityLargeContentTitle,
|
|
278
300
|
role: this.role,
|
|
279
301
|
'aria-label': this.ariaLabel,
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
type SimpleChanges,
|
|
37
37
|
} from '@angular/core';
|
|
38
38
|
import { dlog } from '@symbiote-native/engine';
|
|
39
|
+
import { countAngular } from '../../diagnostics';
|
|
39
40
|
import type { ISeparators } from '@symbiote-native/components';
|
|
40
41
|
|
|
41
42
|
let vListOutletInstanceCounter = 0;
|
|
@@ -68,7 +69,8 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
68
69
|
// typed at the call site (let-item: ItemT, let-index: number, let-separators: ISeparators).
|
|
69
70
|
@Directive({ selector: '[vListItem]', standalone: true })
|
|
70
71
|
export class VListItemDirective<ItemT = unknown> {
|
|
71
|
-
readonly templateRef =
|
|
72
|
+
readonly templateRef =
|
|
73
|
+
inject<TemplateRef<IVListItemContext<ItemT>>>(TemplateRef);
|
|
72
74
|
|
|
73
75
|
static ngTemplateContextGuard<T>(
|
|
74
76
|
_dir: VListItemDirective<T>,
|
|
@@ -101,7 +103,8 @@ export class VListEmptyDirective {
|
|
|
101
103
|
// types the `let-` bindings against the separator props.
|
|
102
104
|
@Directive({ selector: '[vListSeparator]', standalone: true })
|
|
103
105
|
export class VListSeparatorDirective<ItemT = unknown> {
|
|
104
|
-
readonly templateRef =
|
|
106
|
+
readonly templateRef =
|
|
107
|
+
inject<TemplateRef<IVListSeparatorContext<ItemT>>>(TemplateRef);
|
|
105
108
|
|
|
106
109
|
static ngTemplateContextGuard<T>(
|
|
107
110
|
_dir: VListSeparatorDirective<T>,
|
|
@@ -130,20 +133,28 @@ export class VListOutletDirective<C = unknown> implements OnChanges, OnDestroy {
|
|
|
130
133
|
`Angular VListOutlet#${this.instanceId} templateRef CHANGED (was=${changes['templateRef'].previousValue !== undefined} now=${this.templateRef !== undefined}) -> clear + recreate`,
|
|
131
134
|
);
|
|
132
135
|
this.viewContainer.clear();
|
|
136
|
+
countAngular('outletCreates');
|
|
133
137
|
this.viewRef =
|
|
134
138
|
this.templateRef === undefined
|
|
135
139
|
? null
|
|
136
|
-
: this.viewContainer.createEmbeddedView(
|
|
140
|
+
: this.viewContainer.createEmbeddedView(
|
|
141
|
+
this.templateRef,
|
|
142
|
+
this.context,
|
|
143
|
+
);
|
|
137
144
|
return;
|
|
138
145
|
}
|
|
139
146
|
if (this.viewRef !== null && this.context !== undefined) {
|
|
140
|
-
|
|
147
|
+
countAngular('outletUpdates');
|
|
148
|
+
dlog(
|
|
149
|
+
`Angular VListOutlet#${this.instanceId} context updated, markForCheck`,
|
|
150
|
+
);
|
|
141
151
|
this.updateContext(this.viewRef.context, this.context);
|
|
142
152
|
this.viewRef.markForCheck();
|
|
143
153
|
}
|
|
144
154
|
}
|
|
145
155
|
|
|
146
156
|
ngOnDestroy(): void {
|
|
157
|
+
countAngular('outletDestroys');
|
|
147
158
|
dlog(`Angular VListOutlet#${this.instanceId} destroyed`);
|
|
148
159
|
this.viewContainer.clear();
|
|
149
160
|
}
|
|
@@ -158,7 +169,10 @@ export class VListOutletDirective<C = unknown> implements OnChanges, OnDestroy {
|
|
|
158
169
|
}
|
|
159
170
|
}
|
|
160
171
|
|
|
161
|
-
function copyContextFields(
|
|
172
|
+
function copyContextFields(
|
|
173
|
+
target: Record<string, unknown>,
|
|
174
|
+
source: Record<string, unknown>,
|
|
175
|
+
): void {
|
|
162
176
|
for (const key of Object.keys(target)) {
|
|
163
177
|
if (!(key in source)) delete target[key];
|
|
164
178
|
}
|