@symbiote-native/angular 0.8.0 → 2.0.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 +13 -10
- package/babel-register-composed.cjs +58 -18
- package/bin/symbiote-angular-dev.cjs +16 -4
- package/build/angular/anchor-host-registry.js +1 -15
- package/build/angular/anchor-host-registry.js.map +1 -1
- package/build/angular/change-detection-flush.d.ts +31 -0
- package/build/angular/change-detection-flush.js +110 -0
- package/build/angular/change-detection-flush.js.map +1 -0
- package/build/angular/components/activity-indicator-props.d.ts +2 -0
- package/build/angular/components/activity-indicator-props.js +2 -0
- package/build/angular/components/activity-indicator-props.js.map +1 -0
- package/build/angular/components/button-props.d.ts +2 -0
- package/build/angular/components/button-props.js +2 -0
- package/build/angular/components/button-props.js.map +1 -0
- package/build/angular/components/flat-list/index.d.ts +2 -1
- package/build/angular/components/flat-list/index.js +22 -10
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image-background-props.d.ts +6 -0
- package/build/angular/components/image-background-props.js +2 -0
- package/build/angular/components/image-background-props.js.map +1 -0
- package/build/angular/components/{image/shared.d.ts → image-shared.d.ts} +4 -4
- package/build/angular/components/{image/shared.js → image-shared.js} +39 -28
- package/build/angular/components/image-shared.js.map +1 -0
- package/build/angular/components/input-accessory-view-props.d.ts +7 -0
- package/build/angular/components/input-accessory-view-props.js +9 -0
- package/build/angular/components/input-accessory-view-props.js.map +1 -0
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +2 -1
- package/build/angular/components/keyboard-avoiding-view/index.js +28 -27
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.d.ts +2 -0
- package/build/angular/components/modal/index.js +33 -20
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable-props.d.ts +32 -0
- package/build/angular/components/pressable-props.js +11 -0
- package/build/angular/components/pressable-props.js.map +1 -0
- package/build/angular/components/refresh-control-props.d.ts +16 -0
- package/build/angular/components/refresh-control-props.js +14 -0
- package/build/angular/components/refresh-control-props.js.map +1 -0
- package/build/angular/components/safe-area-view-props.d.ts +7 -0
- package/build/angular/components/safe-area-view-props.js +11 -0
- package/build/angular/components/safe-area-view-props.js.map +1 -0
- package/build/angular/components/scroll-view-props.d.ts +76 -0
- package/build/angular/components/scroll-view-props.js +18 -0
- package/build/angular/components/scroll-view-props.js.map +1 -0
- package/build/angular/components/section-list/index.d.ts +3 -0
- package/build/angular/components/section-list/index.js +10 -1
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/text-input-props.d.ts +45 -0
- package/build/angular/components/text-input-props.js +18 -0
- package/build/angular/components/text-input-props.js.map +1 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.d.ts +6 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js +2 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js.map +1 -0
- package/build/angular/components/touchable-props.d.ts +14 -0
- package/build/angular/components/touchable-props.js +13 -0
- package/build/angular/components/touchable-props.js.map +1 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.d.ts +3 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js +2 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js.map +1 -0
- package/build/angular/components/virtualized-list/index.d.ts +8 -1
- package/build/angular/components/virtualized-list/index.js +373 -278
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +3 -0
- package/build/angular/components/virtualized-section-list/index.js +10 -1
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +21 -27
- package/build/angular/components.js +13 -15
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.d.ts +11 -2
- package/build/angular/create-portal/index.js +37 -11
- package/build/angular/create-portal/index.js.map +1 -1
- package/build/angular/create-tunnel/index.js +1 -1
- package/build/angular/element-props.d.ts +53 -0
- package/build/angular/element-props.js +2 -0
- package/build/angular/element-props.js.map +1 -0
- package/build/angular/elements.d.ts +528 -0
- package/build/angular/elements.js +1444 -0
- package/build/angular/elements.js.map +1 -0
- package/build/angular/gate-demand.d.ts +37 -0
- package/build/angular/gate-demand.js +84 -0
- package/build/angular/gate-demand.js.map +1 -0
- package/build/angular/host-instance/index.js +1 -1
- package/build/angular/index.d.ts +5 -2
- package/build/angular/index.js +16 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.d.ts +6 -6
- package/build/angular/modules/animated/create-animated-component.js +73 -81
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/animated/index.js +1 -1
- package/build/angular/modules/animated/index.js.map +1 -1
- package/build/angular/modules/image/index.d.ts +3 -0
- package/build/angular/modules/image/index.js +16 -0
- package/build/angular/modules/image/index.js.map +1 -0
- package/build/angular/primitives/index.d.ts +28 -16
- package/build/angular/primitives/index.js +77 -31
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +2 -3
- package/build/angular/primitives/shared.js +8 -53
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/register.d.ts +1 -0
- package/build/angular/register.js +16 -0
- package/build/angular/register.js.map +1 -0
- package/build/angular/render/index.js +4 -2
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/renderer/index.js +207 -60
- package/build/angular/renderer/index.js.map +1 -1
- package/build/angular/renderer/value-change.d.ts +2 -0
- package/build/angular/renderer/value-change.js +9 -0
- package/build/angular/renderer/value-change.js.map +1 -0
- package/metro-config.cjs +23 -5
- package/metro-css-parser.cjs +2 -1
- package/package.json +17 -7
- package/src/anchor-host-registry.ts +1 -15
- package/src/change-detection-flush.ts +120 -0
- package/src/components/activity-indicator-props.ts +21 -0
- package/src/components/button-props.ts +26 -0
- package/src/components/flat-list/index.ts +12 -4
- package/src/components/image-background-props.ts +24 -0
- package/src/components/{image/shared.ts → image-shared.ts} +57 -26
- package/src/components/input-accessory-view-props.ts +21 -0
- package/src/components/keyboard-avoiding-view/index.ts +27 -16
- package/src/components/modal/index.ts +32 -11
- package/src/components/pressable-props.ts +73 -0
- package/src/components/refresh-control-props.ts +43 -0
- package/src/components/safe-area-view-props.ts +28 -0
- package/src/components/scroll-view-props.ts +109 -0
- package/src/components/section-list/index.ts +18 -0
- package/src/components/text-input-props.ts +72 -0
- package/src/components/touchable-native-feedback/touchable-native-feedback-props.ts +23 -0
- package/src/components/touchable-props.ts +30 -0
- package/src/components/touchable-without-feedback/touchable-without-feedback-props.ts +21 -0
- package/src/components/virtualized-list/index.ts +254 -153
- package/src/components/virtualized-section-list/index.ts +18 -0
- package/src/components.ts +86 -35
- package/src/create-portal/index.ts +39 -9
- package/src/create-tunnel/index.ts +1 -1
- package/src/diagnostics.ts +1 -1
- package/src/element-props.ts +90 -0
- package/src/elements.ts +919 -0
- package/src/gate-demand.ts +109 -0
- package/src/host-instance/index.ts +1 -1
- package/src/index.ts +54 -15
- package/src/modules/animated/create-animated-component.ts +73 -59
- package/src/modules/animated/index.ts +1 -1
- package/src/modules/image/index.ts +18 -0
- package/src/primitives/index.ts +47 -16
- package/src/primitives/shared.ts +11 -44
- package/src/register.ts +15 -0
- package/src/render/index.ts +4 -2
- package/src/renderer/index.ts +239 -80
- package/src/renderer/value-change.ts +8 -0
- package/build/angular/components/activity-indicator/index.android.d.ts +0 -13
- package/build/angular/components/activity-indicator/index.android.js +0 -29
- package/build/angular/components/activity-indicator/index.android.js.map +0 -1
- package/build/angular/components/activity-indicator/index.d.ts +0 -1
- package/build/angular/components/activity-indicator/index.ios.d.ts +0 -9
- package/build/angular/components/activity-indicator/index.ios.js +0 -26
- package/build/angular/components/activity-indicator/index.ios.js.map +0 -1
- package/build/angular/components/activity-indicator/index.js +0 -4
- package/build/angular/components/activity-indicator/index.js.map +0 -1
- package/build/angular/components/activity-indicator/shared.d.ts +0 -67
- package/build/angular/components/activity-indicator/shared.js +0 -260
- package/build/angular/components/activity-indicator/shared.js.map +0 -1
- package/build/angular/components/button.d.ts +0 -65
- package/build/angular/components/button.js +0 -351
- package/build/angular/components/button.js.map +0 -1
- package/build/angular/components/image/index.android.d.ts +0 -15
- package/build/angular/components/image/index.android.js +0 -91
- package/build/angular/components/image/index.android.js.map +0 -1
- package/build/angular/components/image/index.d.ts +0 -1
- package/build/angular/components/image/index.ios.d.ts +0 -15
- package/build/angular/components/image/index.ios.js +0 -91
- package/build/angular/components/image/index.ios.js.map +0 -1
- package/build/angular/components/image/index.js +0 -3
- package/build/angular/components/image/index.js.map +0 -1
- package/build/angular/components/image/shared.js.map +0 -1
- package/build/angular/components/image-background.d.ts +0 -82
- package/build/angular/components/image-background.js +0 -434
- package/build/angular/components/image-background.js.map +0 -1
- package/build/angular/components/input-accessory-view/index.d.ts +0 -65
- package/build/angular/components/input-accessory-view/index.js +0 -290
- package/build/angular/components/input-accessory-view/index.js.map +0 -1
- package/build/angular/components/pressable/index.d.ts +0 -129
- package/build/angular/components/pressable/index.js +0 -473
- package/build/angular/components/pressable/index.js.map +0 -1
- package/build/angular/components/refresh-control/index.d.ts +0 -90
- package/build/angular/components/refresh-control/index.js +0 -380
- package/build/angular/components/refresh-control/index.js.map +0 -1
- package/build/angular/components/safe-area-view/index.d.ts +0 -62
- package/build/angular/components/safe-area-view/index.js +0 -287
- package/build/angular/components/safe-area-view/index.js.map +0 -1
- package/build/angular/components/scroll-view/index.android.d.ts +0 -20
- package/build/angular/components/scroll-view/index.android.js +0 -262
- package/build/angular/components/scroll-view/index.android.js.map +0 -1
- package/build/angular/components/scroll-view/index.d.ts +0 -3
- package/build/angular/components/scroll-view/index.ios.d.ts +0 -8
- package/build/angular/components/scroll-view/index.ios.js +0 -92
- package/build/angular/components/scroll-view/index.ios.js.map +0 -1
- package/build/angular/components/scroll-view/index.js +0 -6
- package/build/angular/components/scroll-view/index.js.map +0 -1
- package/build/angular/components/scroll-view/projection.d.ts +0 -67
- package/build/angular/components/scroll-view/projection.js +0 -560
- package/build/angular/components/scroll-view/projection.js.map +0 -1
- package/build/angular/components/scroll-view/shared.d.ts +0 -239
- package/build/angular/components/scroll-view/shared.js +0 -832
- package/build/angular/components/scroll-view/shared.js.map +0 -1
- package/build/angular/components/scroll-view/sticky-header.d.ts +0 -40
- package/build/angular/components/scroll-view/sticky-header.js +0 -224
- package/build/angular/components/scroll-view/sticky-header.js.map +0 -1
- package/build/angular/components/switch/index.android.d.ts +0 -24
- package/build/angular/components/switch/index.android.js +0 -112
- package/build/angular/components/switch/index.android.js.map +0 -1
- package/build/angular/components/switch/index.d.ts +0 -1
- package/build/angular/components/switch/index.ios.d.ts +0 -23
- package/build/angular/components/switch/index.ios.js +0 -111
- package/build/angular/components/switch/index.ios.js.map +0 -1
- package/build/angular/components/switch/index.js +0 -4
- package/build/angular/components/switch/index.js.map +0 -1
- package/build/angular/components/switch/shared.d.ts +0 -49
- package/build/angular/components/switch/shared.js +0 -191
- package/build/angular/components/switch/shared.js.map +0 -1
- package/build/angular/components/text-input.d.ts +0 -161
- package/build/angular/components/text-input.js +0 -659
- package/build/angular/components/text-input.js.map +0 -1
- package/build/angular/components/touchable/index.d.ts +0 -276
- package/build/angular/components/touchable/index.js +0 -1422
- package/build/angular/components/touchable/index.js.map +0 -1
- package/build/angular/components/touchable-native-feedback/index.d.ts +0 -86
- package/build/angular/components/touchable-native-feedback/index.js +0 -407
- package/build/angular/components/touchable-native-feedback/index.js.map +0 -1
- package/src/components/activity-indicator/index.android.ts +0 -23
- package/src/components/activity-indicator/index.ios.ts +0 -21
- package/src/components/activity-indicator/index.ts +0 -4
- package/src/components/activity-indicator/shared.ts +0 -225
- package/src/components/button.ts +0 -220
- package/src/components/image/index.android.ts +0 -99
- package/src/components/image/index.ios.ts +0 -99
- package/src/components/image/index.ts +0 -3
- package/src/components/image-background.ts +0 -290
- package/src/components/input-accessory-view/index.ts +0 -240
- package/src/components/pressable/index.ts +0 -462
- package/src/components/refresh-control/index.ts +0 -340
- package/src/components/safe-area-view/index.ts +0 -231
- package/src/components/scroll-view/index.android.ts +0 -205
- package/src/components/scroll-view/index.ios.ts +0 -81
- package/src/components/scroll-view/index.ts +0 -7
- package/src/components/scroll-view/projection.ts +0 -713
- package/src/components/scroll-view/shared.ts +0 -1066
- package/src/components/scroll-view/sticky-header.ts +0 -267
- package/src/components/switch/index.android.ts +0 -113
- package/src/components/switch/index.ios.ts +0 -112
- package/src/components/switch/index.ts +0 -4
- package/src/components/switch/shared.ts +0 -284
- package/src/components/text-input.ts +0 -613
- package/src/components/touchable/index.ts +0 -913
- package/src/components/touchable-native-feedback/index.ts +0 -317
package/src/components.ts
CHANGED
|
@@ -4,11 +4,21 @@
|
|
|
4
4
|
// real Angular input so RN `StyleProp` arrays/objects are flattened and forwarded through the
|
|
5
5
|
// custom renderer, instead of being misinterpreted by Angular's CSS style engine.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
7
|
+
// `ActivityIndicator` is a TAG — `<activity-indicator>`, matched by `ActivityIndicatorElement` — and there is nothing to import in its
|
|
8
|
+
// place. RN's ActivityIndicator has no statics, so the name exports nothing at all now; the prop
|
|
9
|
+
// type stays, for a component forwarding a bag.
|
|
10
|
+
export type { IActivityIndicatorProps } from './components/activity-indicator-props';
|
|
11
|
+
// `Image` is a TAG — `<image>`, matched by `ImageElement` — and the name now exports RN's Image
|
|
12
|
+
// STATICS namespace (`Image.getSize` / `.prefetch` / `.queryCache`), which is what an app still
|
|
13
|
+
// calls it for. `Animated.Image` keeps the component spelling; it is not a primitive.
|
|
14
|
+
export { Image } from './modules/image';
|
|
15
|
+
export type { IImageStatics } from './modules/image';
|
|
16
|
+
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
17
|
+
// `InputAccessoryView` is a TAG — `<input-accessory-view>`, matched by
|
|
18
|
+
// `InputAccessoryViewElement` — and there is nothing to import in its place. RN gives it no
|
|
19
|
+
// statics, so the name exports nothing at all now; an app's `imports: [InputAccessoryView]` becomes
|
|
20
|
+
// `imports: [InputAccessoryViewElement]`. Only the prop type stays.
|
|
21
|
+
export type { IAngularInputAccessoryViewProps } from './components/input-accessory-view-props';
|
|
12
22
|
export { Modal } from './components/modal';
|
|
13
23
|
export type {
|
|
14
24
|
IAngularModalProps,
|
|
@@ -24,56 +34,95 @@ export type {
|
|
|
24
34
|
IResizeMode,
|
|
25
35
|
IImageSize,
|
|
26
36
|
IImageCacheStatus,
|
|
27
|
-
} from '
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
} from '@symbiote-native/components';
|
|
38
|
+
// `Pressable` is a TAG — `<pressable>`, matched by `PressableElement` — and there is nothing to
|
|
39
|
+
// import in its place. RN gives it no statics, so the name exports nothing at all now; the press
|
|
40
|
+
// machine is an engine behavior on the node (`registerPressableBehavior`). An app's
|
|
41
|
+
// `imports: [Pressable]` becomes `imports: [PressableElement]`. Only the prop types stay.
|
|
42
|
+
export type {
|
|
43
|
+
IAngularPressableProps,
|
|
44
|
+
IAngularPressableInputs,
|
|
45
|
+
} from './components/pressable-props';
|
|
46
|
+
// `SafeAreaView` is a TAG — `<safe-area-view>`, matched by `SafeAreaViewElement` — and there is
|
|
47
|
+
// nothing to import in its place. RN gives it no statics, so the name exports nothing at all now;
|
|
48
|
+
// an app's `imports: [SafeAreaView]` becomes `imports: [SafeAreaViewElement]`. Only the prop type
|
|
49
|
+
// stays.
|
|
50
|
+
export type { IAngularSafeAreaViewProps } from './components/safe-area-view-props';
|
|
51
|
+
// `Switch` is a TAG — `<switch>`, matched by `SwitchElement` — and there is nothing to import in
|
|
52
|
+
// its place. RN gives it no statics, so the name exports nothing at all now; `[(value)]` is handled
|
|
53
|
+
// by the renderer and `[(ngModel)]` by `SwitchValueAccessor` (`../elements`), which is where the
|
|
54
|
+
// wrapper's `NG_VALUE_ACCESSOR` went. Only the prop types stay.
|
|
55
|
+
export type {
|
|
56
|
+
ISwitchProps,
|
|
57
|
+
ISwitchTrackColor,
|
|
58
|
+
ISwitchChangeEvent,
|
|
59
|
+
} from '@symbiote-native/components';
|
|
60
|
+
// `ImageBackground` is a TAG — `<image-background>`, matched by `ImageBackgroundElement` in
|
|
61
|
+
// `elements.ts` — and there is nothing to import in its place. The prop type stays, for a
|
|
62
|
+
// component forwarding a bag and for that directive's own input types.
|
|
63
|
+
export type { IAngularImageBackgroundProps } from './components/image-background-props';
|
|
36
64
|
export { KeyboardAvoidingView } from './components/keyboard-avoiding-view';
|
|
37
65
|
export type {
|
|
38
66
|
IAngularKeyboardAvoidingViewProps,
|
|
39
67
|
IKeyboardAvoidingBehavior,
|
|
40
68
|
} from './components/keyboard-avoiding-view';
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
// `RefreshControl` is a TAG — `<refresh-control>`, matched by `RefreshControlElement` — and there
|
|
70
|
+
// is nothing to import in its place. The controlled-spinner handshake is
|
|
71
|
+
// `registerRefreshControlBehavior` (`../register.ts`); only the prop type stays.
|
|
72
|
+
export type { IAngularRefreshControlProps } from './components/refresh-control-props';
|
|
73
|
+
// `TextInput` is a TAG — `<text-input>` / `<text-input-multiline>`, matched by `TextInputElement`
|
|
74
|
+
// and `MultilineTextInputElement` — and there is nothing to import in its place. RN gives it no
|
|
75
|
+
// statics, so the name exports nothing at all now; `[(value)]` is handled by the renderer,
|
|
76
|
+
// `[(ngModel)]` by `TextInputValueAccessor` (`../elements`), and the imperative handle by
|
|
77
|
+
// `buildTextInputHandle` from `@symbiote-native/components` over the node a template ref hands back.
|
|
78
|
+
export type { IAngularTextInputProps } from './components/text-input-props';
|
|
44
79
|
export type {
|
|
45
|
-
IAngularTextInputProps,
|
|
46
80
|
IEnterKeyHint,
|
|
47
81
|
IInputMode,
|
|
48
82
|
ISubmitBehavior,
|
|
49
83
|
ITextInputHandle,
|
|
50
84
|
ITextInputSelection,
|
|
51
|
-
|
|
52
|
-
|
|
85
|
+
ITextInputChangeEvent,
|
|
86
|
+
} from '@symbiote-native/components';
|
|
87
|
+
// `TouchableNativeFeedback` is now RN's STATIC NAMESPACE, not a component: the element is the tag
|
|
88
|
+
// `<touchable-native-feedback>`, matched by `TouchableNativeFeedbackElement` (../elements), which
|
|
89
|
+
// commits no node of its own and clones onto its single child. `.Ripple(…)` /
|
|
90
|
+
// `.SelectableBackground(…)` are unchanged; an app's `imports: [TouchableNativeFeedback]` becomes
|
|
91
|
+
// `imports: [TouchableNativeFeedbackElement]`.
|
|
92
|
+
export { TouchableNativeFeedback } from '@symbiote-native/components';
|
|
53
93
|
export type {
|
|
54
|
-
IAngularTouchableNativeFeedbackProps,
|
|
55
94
|
INativeFeedbackBackground,
|
|
56
95
|
IRippleBackground,
|
|
57
96
|
IThemeAttrBackground,
|
|
58
|
-
} from '
|
|
59
|
-
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
97
|
+
} from '@symbiote-native/components';
|
|
98
|
+
export type { IAngularTouchableNativeFeedbackProps } from './components/touchable-native-feedback/touchable-native-feedback-props';
|
|
99
|
+
// `TouchableOpacity` and `TouchableHighlight` are TAGS — `<touchable-opacity>` and
|
|
100
|
+
// `<touchable-highlight>`, matched by their element directives — and RN gives neither any statics,
|
|
101
|
+
// so the names export nothing at all now. Both machines run on the engine node
|
|
102
|
+
// (`registerTouchableOpacityBehavior` / `registerTouchableHighlightBehavior`). Only the prop types
|
|
103
|
+
// stay.
|
|
64
104
|
export type {
|
|
65
105
|
IAngularTouchableHighlightProps,
|
|
66
106
|
IAngularTouchableOpacityProps,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
} from './components/touchable-props';
|
|
108
|
+
// `TouchableWithoutFeedback` is a TAG — `<touchable-without-feedback>`, matched by
|
|
109
|
+
// `TouchableWithoutFeedbackElement` (../elements) — and RN gives it no statics, so like `Button` the
|
|
110
|
+
// name exports nothing now; an app's `imports: [TouchableWithoutFeedback]` becomes
|
|
111
|
+
// `imports: [TouchableWithoutFeedbackElement]`. Only the prop type stays.
|
|
112
|
+
export type { IAngularTouchableWithoutFeedbackProps } from './components/touchable-without-feedback/touchable-without-feedback-props';
|
|
113
|
+
// `ScrollView` is a TAG — `<scroll-view>` / `<horizontal-scroll-view>`, matched by
|
|
114
|
+
// `ScrollViewElement` / `HorizontalScrollViewElement` — and there is nothing to import in its
|
|
115
|
+
// place. The engine owns the content node, sticky headers and the refresh-control claim
|
|
116
|
+
// (`registerScrollViewBehavior`, `../register.ts`); the imperative handle comes from
|
|
117
|
+
// `buildScrollViewHandle` over the node a template ref hands back. Only the prop types stay.
|
|
70
118
|
export type {
|
|
71
119
|
IAngularScrollViewProps,
|
|
72
120
|
IScrollViewHandle,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
121
|
+
} from './components/scroll-view-props';
|
|
122
|
+
// `Button` is a TAG — `<button>`, matched by `ButtonElement` — and there is nothing to import in
|
|
123
|
+
// its place. RN's Button has no statics, so the name exports nothing at all now; the prop type
|
|
124
|
+
// stays, for a component forwarding a bag.
|
|
125
|
+
export type { IButtonProps } from './components/button-props';
|
|
77
126
|
export {
|
|
78
127
|
VirtualizedList,
|
|
79
128
|
VListEmptyDirective,
|
|
@@ -130,6 +179,8 @@ export {
|
|
|
130
179
|
HorizontalScrollContentView,
|
|
131
180
|
TextInputHost,
|
|
132
181
|
MultilineTextInputHost,
|
|
182
|
+
ManagedTextInputHost,
|
|
183
|
+
ManagedMultilineTextInputHost,
|
|
133
184
|
SwitchHost,
|
|
134
185
|
ActivityIndicatorHost,
|
|
135
186
|
SafeAreaViewHost,
|
|
@@ -152,6 +203,6 @@ export {
|
|
|
152
203
|
stableAnchorStyle,
|
|
153
204
|
} from './primitives/index';
|
|
154
205
|
|
|
155
|
-
// Public ergonomic aliases: <
|
|
206
|
+
// Public ergonomic aliases: <view> and <text> resolve directly to the primitive hosts
|
|
156
207
|
// (no extra Angular bookkeeping anchor), while the internal symbiote-* selectors remain
|
|
157
208
|
// available for composed adapter templates.
|
|
@@ -20,16 +20,23 @@
|
|
|
20
20
|
//
|
|
21
21
|
// The safe, fully-public-API mechanism: create the embedded view DIRECTLY inside a
|
|
22
22
|
// ViewContainerRef anchored at the destination, so there is nothing to move at all. That
|
|
23
|
-
// ViewContainerRef comes from `PortalOutletDirective`, a
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
// `
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
23
|
+
// ViewContainerRef comes from `PortalOutletDirective`, exported to a template variable with the
|
|
24
|
+
// same idiom `#form="ngForm"` uses. This also replaces the `isSymbioteNode` runtime guard
|
|
25
|
+
// React/Vue need (there `to` is an arbitrary JS value until validated): here `to` is typed as
|
|
26
|
+
// `PortalOutletDirective` — the only way to construct one is Angular's own template compiler
|
|
27
|
+
// resolving a template reference variable, so `strictTemplates` rejects anything else at compile
|
|
28
|
+
// time and there is nothing left to guard at runtime.
|
|
29
|
+
//
|
|
30
|
+
// THE MARKER GOES ON AN `<ng-container>` INSIDE THE TARGET, never on the target element. A
|
|
31
|
+
// ViewContainerRef anchors AT its host and `createEmbeddedView` inserts after that anchor, so
|
|
32
|
+
// `<view portalOutlet>` delivers a SIBLING where React's `createPortal(node, host)` and Vue's
|
|
33
|
+
// `<Teleport to>` deliver a child. Device-reported 2026-09-02: a card portaled into an absolutely
|
|
34
|
+
// positioned overlay laid out in the scroll flow, since the overlay cannot centre a node that is
|
|
35
|
+
// not in it.
|
|
30
36
|
|
|
31
37
|
import {
|
|
32
38
|
Directive,
|
|
39
|
+
ElementRef,
|
|
33
40
|
inject,
|
|
34
41
|
Input,
|
|
35
42
|
TemplateRef,
|
|
@@ -38,10 +45,19 @@ import {
|
|
|
38
45
|
type OnChanges,
|
|
39
46
|
type OnDestroy,
|
|
40
47
|
} from '@angular/core';
|
|
48
|
+
import { isAnchor, isSymbioteNode } from '@symbiote-native/engine';
|
|
41
49
|
|
|
42
50
|
/** Marks the destination for `*portal` — place it on whichever already-mounted host should
|
|
43
|
-
* paint the portaled content
|
|
44
|
-
* export it to a template variable and pass that
|
|
51
|
+
* paint the portaled content — on an `<ng-container>` INSIDE that host, never on the host
|
|
52
|
+
* element itself (see the file header) — then export it to a template variable and pass that
|
|
53
|
+
* variable as `*portal`'s target:
|
|
54
|
+
*
|
|
55
|
+
* ```html
|
|
56
|
+
* <view class="overlay-host">
|
|
57
|
+
* <ng-container portalOutlet #overlayHost="portalOutlet"></ng-container>
|
|
58
|
+
* </view>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
45
61
|
@Directive({
|
|
46
62
|
selector: '[portalOutlet]',
|
|
47
63
|
standalone: true,
|
|
@@ -49,6 +65,20 @@ import {
|
|
|
49
65
|
})
|
|
50
66
|
export class PortalOutletDirective {
|
|
51
67
|
readonly viewContainerRef = inject(ViewContainerRef);
|
|
68
|
+
|
|
69
|
+
constructor() {
|
|
70
|
+
// The wrong placement commits a valid tree that simply differs from React's, so nothing
|
|
71
|
+
// downstream can catch it. It has to fail where it is written.
|
|
72
|
+
const host: unknown = inject(ElementRef).nativeElement;
|
|
73
|
+
if (!isSymbioteNode(host) || !isAnchor(host)) {
|
|
74
|
+
throw new Error(
|
|
75
|
+
'portalOutlet must sit on an <ng-container> inside the target host, not on the host ' +
|
|
76
|
+
'element: a ViewContainerRef anchored at an element inserts AFTER it, so the ported ' +
|
|
77
|
+
'content would become the host\'s sibling. Write <view class="…">' +
|
|
78
|
+
'<ng-container portalOutlet #x="portalOutlet"></ng-container></view>.',
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
52
82
|
}
|
|
53
83
|
|
|
54
84
|
/** `*portal="overlayHost"` — renders the host element into whichever `PortalOutletDirective`
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// `*tunnelIn` directly on the portable content, the same way `*ngIf` sits directly on an
|
|
23
23
|
// element instead of wrapping it in a named `<ng-template>`:
|
|
24
24
|
// @if (toastVisible) {
|
|
25
|
-
// <
|
|
25
|
+
// <view *tunnelIn="overlayTunnel"><text>…</text></view>
|
|
26
26
|
// }
|
|
27
27
|
// …
|
|
28
28
|
// <tunnel-out [tunnel]="overlayTunnel" />
|
package/src/diagnostics.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
export interface IAngularProfile {
|
|
17
17
|
// Change-detection passes: RendererFactory2.end() runs once per ApplicationRef.tick().
|
|
18
18
|
cdPasses: number;
|
|
19
|
-
// Primitive host views (
|
|
19
|
+
// Primitive host views (view / text / ...) Angular actually walked. Divided by
|
|
20
20
|
// cdPasses this is the SIZE OF THE TREE one tick touches - the number that separates "the list is
|
|
21
21
|
// expensive" from "every mounted screen is re-checked because a list scrolled". The primitives are
|
|
22
22
|
// CheckAlways, and a Global tick refreshes every CheckAlways view in the application.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// The prop surface EVERY intrinsic tag accepts, and the type the element directives declare their
|
|
2
|
+
// shared inputs from.
|
|
3
|
+
//
|
|
4
|
+
// It is not a new contract: it is the agnostic base every adapter's own `IViewProps` is built on
|
|
5
|
+
// (`IAccessibilityProps` + `IAriaProps` + `IResponderProps`) plus RN's own View extras. Angular
|
|
6
|
+
// declares its own rather than importing another adapter's, per
|
|
7
|
+
// `<prop_types_split_agnostic_vs_per_adapter>` — and the fields below are the ones that genuinely
|
|
8
|
+
// differ, since a bare tag takes children from the template and a handle from `#ref`, so neither
|
|
9
|
+
// `children` nor `ref` appears here.
|
|
10
|
+
//
|
|
11
|
+
// `style` IS declared, reversing what this comment said until 2026-09-11. Leaving it to Angular's
|
|
12
|
+
// styling engine was not the conservative choice it reads as: an array decomposes into
|
|
13
|
+
// numeric-index keys there and a press-state CALLBACK throws out of `toStylingKeyValueArray`,
|
|
14
|
+
// aborting the enclosing template update — which is what an app writes, and what every deleted
|
|
15
|
+
// wrapper component accepted. The claim that a directive can reclaim it "solely by executing a
|
|
16
|
+
// linked AOT artifact" was answered rather than assumed: `elements.test.ts` compiles the binding
|
|
17
|
+
// through real ngtsc and runs the LINKED output. See `SymbioteElement.style`.
|
|
18
|
+
//
|
|
19
|
+
// `symbioteStyle` stays as an alias — it is public API and the renderer still folds it.
|
|
20
|
+
import type {
|
|
21
|
+
IAccessibilityProps,
|
|
22
|
+
IAriaProps,
|
|
23
|
+
IPressState,
|
|
24
|
+
IRectOffset,
|
|
25
|
+
IResponderProps,
|
|
26
|
+
} from '@symbiote-native/components';
|
|
27
|
+
import type {
|
|
28
|
+
ISymbioteEvent,
|
|
29
|
+
IStyleProp,
|
|
30
|
+
ITextStyle,
|
|
31
|
+
IViewStyle,
|
|
32
|
+
} from '@symbiote-native/engine';
|
|
33
|
+
|
|
34
|
+
type IEventHandler = (event: ISymbioteEvent) => void;
|
|
35
|
+
|
|
36
|
+
export interface IElementProps
|
|
37
|
+
extends IAccessibilityProps, IAriaProps, IResponderProps {
|
|
38
|
+
/** RN's modern W3C-named alias for `nativeID`; the renderer folds it (`PROP_ALIASES`). */
|
|
39
|
+
id?: string;
|
|
40
|
+
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
|
|
41
|
+
hitSlop?: IRectOffset | number;
|
|
42
|
+
focusable?: boolean;
|
|
43
|
+
collapsable?: boolean;
|
|
44
|
+
removeClippedSubviews?: boolean;
|
|
45
|
+
renderToHardwareTextureAndroid?: boolean;
|
|
46
|
+
shouldRasterizeIOS?: boolean;
|
|
47
|
+
needsOffscreenAlphaCompositing?: boolean;
|
|
48
|
+
/** The array-capable `[style]`, aliased to `style` in the renderer. */
|
|
49
|
+
symbioteStyle?: IStyleProp<IViewStyle>;
|
|
50
|
+
/**
|
|
51
|
+
* RN's own spelling. The press-state callback is in the union because a subclass cannot widen an
|
|
52
|
+
* inherited property and `<pressable>`/`<touchable-*>` are the tags that take one; on every other
|
|
53
|
+
* tag the engine resolves it at `pressed: false`.
|
|
54
|
+
*/
|
|
55
|
+
style?:
|
|
56
|
+
IStyleProp<IViewStyle> | ((state: IPressState) => IStyleProp<IViewStyle>);
|
|
57
|
+
onPress?: IEventHandler;
|
|
58
|
+
onPressIn?: IEventHandler;
|
|
59
|
+
onPressOut?: IEventHandler;
|
|
60
|
+
onPressMove?: IEventHandler;
|
|
61
|
+
onLongPress?: IEventHandler;
|
|
62
|
+
onLayout?: IEventHandler;
|
|
63
|
+
onFocus?: IEventHandler;
|
|
64
|
+
onBlur?: IEventHandler;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Text's own surface on top of the shared one. `onTextLayout` is an event, so it is not here. */
|
|
68
|
+
export interface ITextElementProps {
|
|
69
|
+
/** Narrows the shared `style` so `fontSize` / `fontWeight` type-check on a `<text>`. */
|
|
70
|
+
style?: IStyleProp<ITextStyle>;
|
|
71
|
+
numberOfLines?: number;
|
|
72
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';
|
|
73
|
+
selectable?: boolean;
|
|
74
|
+
adjustsFontSizeToFit?: boolean;
|
|
75
|
+
minimumFontScale?: number;
|
|
76
|
+
allowFontScaling?: boolean;
|
|
77
|
+
maxFontSizeMultiplier?: number | null;
|
|
78
|
+
selectionColor?: string;
|
|
79
|
+
// RN's Text carries it (Text.js) and Button hands it to the label so a screen reader announces
|
|
80
|
+
// the text as disabled along with the button holding it (Button.js:388).
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The sticky-header wrapper RN builds in JS (ScrollViewStickyHeader.js). */
|
|
85
|
+
export interface IStickyHeaderElementProps {
|
|
86
|
+
inverted?: boolean;
|
|
87
|
+
nextHeaderLayoutY?: number | null;
|
|
88
|
+
scrollAnimatedValue?: unknown;
|
|
89
|
+
scrollViewHeight?: number | null;
|
|
90
|
+
}
|