@symbiote-native/angular 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel-register-composed.cjs +11 -3
- package/build/angular/anchor-host-registry.d.ts +2 -0
- package/build/angular/anchor-host-registry.js +84 -0
- package/build/angular/anchor-host-registry.js.map +1 -0
- package/build/angular/components/input-accessory-view/index.d.ts +2 -1
- package/build/angular/components/input-accessory-view/index.js +28 -39
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/projection.js +70 -48
- package/build/angular/components/scroll-view/projection.js.map +1 -1
- package/build/angular/components/scroll-view/shared.js +28 -25
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.d.ts +6 -7
- package/build/angular/components/scroll-view/sticky-header.js +82 -65
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +2 -5
- package/build/angular/components/touchable/index.js +36 -56
- package/build/angular/components/touchable/index.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +5 -20
- package/build/angular/components/virtualized-list/index.js +145 -275
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.js +2 -4
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/index.d.ts +2 -1
- package/build/angular/index.js +6 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/renderer/index.d.ts +0 -1
- package/build/angular/renderer/index.js +5 -60
- package/build/angular/renderer/index.js.map +1 -1
- package/package.json +9 -7
- package/src/__tests__/responder-nested-cd.test.ts +1 -1
- package/src/anchor-host-registry.ts +88 -0
- package/src/components/input-accessory-view/index.ts +30 -39
- package/src/components/scroll-view/projection.ts +76 -46
- package/src/components/scroll-view/shared.ts +27 -19
- package/src/components/scroll-view/sticky-header.ts +89 -64
- package/src/components/touchable/index.ts +52 -66
- package/src/components/virtualized-list/index.ts +157 -368
- package/src/components/virtualized-section-list/index.ts +6 -3
- package/src/index.ts +6 -1
- package/src/renderer/index.ts +5 -63
- package/src/renderer/renderer.test.ts +2 -1
- package/build/bootstrap.d.ts +0 -7
- package/build/bootstrap.js +0 -14
- package/build/components/activity-indicator/index.android.d.ts +0 -9
- package/build/components/activity-indicator/index.android.js +0 -64
- package/build/components/activity-indicator/index.d.ts +0 -1
- package/build/components/activity-indicator/index.ios.d.ts +0 -5
- package/build/components/activity-indicator/index.ios.js +0 -64
- package/build/components/activity-indicator/index.js +0 -3
- package/build/components/activity-indicator/shared.d.ts +0 -64
- package/build/components/activity-indicator/shared.js +0 -424
- package/build/components/button.d.ts +0 -60
- package/build/components/button.js +0 -456
- package/build/components/flat-list/index.d.ts +0 -119
- package/build/components/flat-list/index.js +0 -691
- package/build/components/image/index.android.d.ts +0 -7
- package/build/components/image/index.android.js +0 -88
- package/build/components/image/index.d.ts +0 -1
- package/build/components/image/index.ios.d.ts +0 -7
- package/build/components/image/index.ios.js +0 -88
- package/build/components/image/index.js +0 -2
- package/build/components/image/shared.d.ts +0 -101
- package/build/components/image/shared.js +0 -405
- package/build/components/image-background.d.ts +0 -78
- package/build/components/image-background.js +0 -583
- package/build/components/input-accessory-view/index.d.ts +0 -56
- package/build/components/input-accessory-view/index.js +0 -403
- package/build/components/keyboard-avoiding-view/index.d.ts +0 -79
- package/build/components/keyboard-avoiding-view/index.js +0 -504
- package/build/components/modal/index.d.ts +0 -89
- package/build/components/modal/index.js +0 -529
- package/build/components/pressable/index.d.ts +0 -120
- package/build/components/pressable/index.js +0 -639
- package/build/components/refresh-control/index.d.ts +0 -83
- package/build/components/refresh-control/index.js +0 -509
- package/build/components/safe-area-view/index.d.ts +0 -54
- package/build/components/safe-area-view/index.js +0 -388
- package/build/components/scroll-view/index.android.d.ts +0 -16
- package/build/components/scroll-view/index.android.js +0 -228
- package/build/components/scroll-view/index.d.ts +0 -3
- package/build/components/scroll-view/index.ios.d.ts +0 -6
- package/build/components/scroll-view/index.ios.js +0 -113
- package/build/components/scroll-view/index.js +0 -5
- package/build/components/scroll-view/projection.d.ts +0 -32
- package/build/components/scroll-view/projection.js +0 -311
- package/build/components/scroll-view/shared.d.ts +0 -225
- package/build/components/scroll-view/shared.js +0 -757
- package/build/components/scroll-view/sticky-header.d.ts +0 -38
- package/build/components/scroll-view/sticky-header.js +0 -257
- package/build/components/section-list/index.d.ts +0 -113
- package/build/components/section-list/index.js +0 -768
- package/build/components/switch/index.android.d.ts +0 -17
- package/build/components/switch/index.android.js +0 -107
- package/build/components/switch/index.d.ts +0 -1
- package/build/components/switch/index.ios.d.ts +0 -16
- package/build/components/switch/index.ios.js +0 -106
- package/build/components/switch/index.js +0 -3
- package/build/components/switch/shared.d.ts +0 -37
- package/build/components/switch/shared.js +0 -176
- package/build/components/text-input.d.ts +0 -150
- package/build/components/text-input.js +0 -821
- package/build/components/touchable/index.d.ts +0 -241
- package/build/components/touchable/index.js +0 -1672
- package/build/components/touchable-native-feedback/index.d.ts +0 -80
- package/build/components/touchable-native-feedback/index.js +0 -545
- package/build/components/virtualized-list/directives.d.ts +0 -41
- package/build/components/virtualized-list/directives.js +0 -249
- package/build/components/virtualized-list/index.d.ts +0 -265
- package/build/components/virtualized-list/index.js +0 -1343
- package/build/components/virtualized-section-list/directives.d.ts +0 -28
- package/build/components/virtualized-section-list/directives.js +0 -148
- package/build/components/virtualized-section-list/index.d.ts +0 -175
- package/build/components/virtualized-section-list/index.js +0 -854
- package/build/components.d.ts +0 -39
- package/build/components.js +0 -37
- package/build/create-portal/index.d.ts +0 -17
- package/build/create-portal/index.js +0 -128
- package/build/create-tunnel/index.d.ts +0 -29
- package/build/create-tunnel/index.js +0 -181
- package/build/descriptor-to-angular/index.d.ts +0 -19
- package/build/descriptor-to-angular/index.js +0 -186
- package/build/host-instance/index.d.ts +0 -2
- package/build/host-instance/index.js +0 -36
- package/build/index.d.ts +0 -21
- package/build/index.js +0 -40
- package/build/modules/animated/animated-leaf-binder/index.d.ts +0 -14
- package/build/modules/animated/animated-leaf-binder/index.js +0 -90
- package/build/modules/animated/animated-leaf-binder.d.ts +0 -14
- package/build/modules/animated/animated-leaf-binder.js +0 -90
- package/build/modules/animated/create-animated-component.d.ts +0 -48
- package/build/modules/animated/create-animated-component.js +0 -425
- package/build/modules/animated/index.d.ts +0 -51
- package/build/modules/animated/index.js +0 -58
- package/build/modules/app-registry/index.d.ts +0 -7
- package/build/modules/app-registry/index.js +0 -22
- package/build/modules/status-bar/index.d.ts +0 -17
- package/build/modules/status-bar/index.js +0 -121
- package/build/primitives/index.d.ts +0 -32
- package/build/primitives/index.js +0 -386
- package/build/primitives/shared.d.ts +0 -83
- package/build/primitives/shared.js +0 -230
- package/build/render/index.d.ts +0 -11
- package/build/render/index.js +0 -170
- package/build/renderer/index.d.ts +0 -38
- package/build/renderer/index.js +0 -355
- package/build/services/color-scheme.service.d.ts +0 -13
- package/build/services/color-scheme.service.js +0 -72
- package/build/services/index.d.ts +0 -2
- package/build/services/index.js +0 -2
- package/build/services/window-dimensions.service.d.ts +0 -13
- package/build/services/window-dimensions.service.js +0 -83
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
// createAnimatedComponent for @symbiote-native/angular: the Angular twin of the React/Vue
|
|
2
|
-
// wrapper. React/Vue have a runtime HOC (`createAnimatedComponent(Component)` builds a
|
|
3
|
-
// fresh wrapped component on the fly). Angular has NO such idiom AND it cannot have one:
|
|
4
|
-
// the AOT-under-Metro build compiles every @Component at build
|
|
5
|
-
// time and ships NO JIT compiler to Hermes, so a runtime `Component({...})(class)` would
|
|
6
|
-
// throw. The idiomatic, AOT-safe equivalent is therefore an EXPLICIT set of standalone
|
|
7
|
-
// components — AnimatedView / AnimatedText / AnimatedImage / AnimatedScrollView — each a
|
|
8
|
-
// thin @Component over the matching host primitive, all sharing one abstract lifecycle
|
|
9
|
-
// base. The mechanism (build an AnimatedProps leaf, reduce animated props to current
|
|
10
|
-
// values for the first paint, bind the leaf to the committed host node, swap leaves on
|
|
11
|
-
// re-render, tear down on destroy) lives once in AnimatedComponentBase; only the per-host
|
|
12
|
-
// template differs.
|
|
13
|
-
//
|
|
14
|
-
// The framework-agnostic half (reduceProps / readPassthroughStyle / resolveHostNode /
|
|
15
|
-
// AnimatedProps / attachNativeEventHandler / isNativeAnimatedAvailable) comes from
|
|
16
|
-
// @symbiote-native/engine, shared verbatim with React and Vue. Angular supplies
|
|
17
|
-
// only the lifecycle wiring. The per-frame path NEVER goes through Angular change
|
|
18
|
-
// detection: value.setValue / animation -> flushValue -> AnimatedProps.update() ->
|
|
19
|
-
// setNativeProps(node), exactly as on the other adapters.
|
|
20
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
21
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
22
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
23
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
24
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
25
|
-
var _, done = false;
|
|
26
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
27
|
-
var context = {};
|
|
28
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
29
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
30
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
31
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
32
|
-
if (kind === "accessor") {
|
|
33
|
-
if (result === void 0) continue;
|
|
34
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
35
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
36
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
37
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
38
|
-
}
|
|
39
|
-
else if (_ = accept(result)) {
|
|
40
|
-
if (kind === "field") initializers.unshift(_);
|
|
41
|
-
else descriptor[key] = _;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
45
|
-
done = true;
|
|
46
|
-
};
|
|
47
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
48
|
-
var useValue = arguments.length > 2;
|
|
49
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
50
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
51
|
-
}
|
|
52
|
-
return useValue ? value : void 0;
|
|
53
|
-
};
|
|
54
|
-
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, Directive, ElementRef, inject, ViewChild, } from '@angular/core';
|
|
55
|
-
import { isNativeAnimatedAvailable, isSymbioteNode, reduceProps, readPassthroughStyle, resolveHostNode, } from '@symbiote-native/engine';
|
|
56
|
-
import { selectScrollIntrinsics } from '@symbiote-native/components';
|
|
57
|
-
import { Image, ScrollView, Text, View } from '../../components';
|
|
58
|
-
import { anchorHostStyle, ViewHost, TextHost, ImageHost, ScrollViewHost, SymbioteHostPropsDirective, } from '../../primitives';
|
|
59
|
-
import { FlatList } from '../../components/flat-list';
|
|
60
|
-
import { IMAGE_INPUTS, IMAGE_OUTPUTS, ImageBase, resolveImageProps, } from '../../components/image/shared';
|
|
61
|
-
import { SectionList } from '../../components/section-list';
|
|
62
|
-
import { AnimatedLeafBinder } from './animated-leaf-binder';
|
|
63
|
-
// RN's prop carrying explicit (already-rasterized) values that override the animated prop in
|
|
64
|
-
// the COMMITTED props (sticky-header passthrough). Named once so the directive input and the
|
|
65
|
-
// reconcile agree.
|
|
66
|
-
const PASSTHROUGH_PROP = 'passthroughAnimatedPropExplicitValues';
|
|
67
|
-
// The inputs every animated wrapper accepts. `style` is the (possibly animated) style — the
|
|
68
|
-
// common path (TouchableOpacity passes `[style, { opacity }]`). `animatedProps` is the generic
|
|
69
|
-
// escape hatch for any OTHER prop that may hold an AnimatedNode or an Animated.event handler,
|
|
70
|
-
// plus static host props to forward (the React/Vue `rest`). The passthrough drives native.
|
|
71
|
-
// Each concrete @Component re-lists these (Angular's inputs-on-base convention, mirroring
|
|
72
|
-
// Switch/Image), so they are inherited consistently.
|
|
73
|
-
export const ANIMATED_INPUTS = ['style', 'animatedProps', PASSTHROUGH_PROP];
|
|
74
|
-
export const ANIMATED_IMAGE_INPUTS = [...IMAGE_INPUTS, 'animatedProps', PASSTHROUGH_PROP];
|
|
75
|
-
// The shared lifecycle for every animated wrapper. Concrete subclasses add ONLY a @Component
|
|
76
|
-
// decorator (selector + the host-primitive template) — no behavior. Plain fields (no @Input
|
|
77
|
-
// here): the inputs are declared on each concrete via ANIMATED_INPUTS, the adapter convention.
|
|
78
|
-
// @Directive() (no selector) is the Angular-sanctioned decorator for an abstract base that
|
|
79
|
-
// declares lifecycle hooks — without it ngtsc rejects the inherited hooks (NG2007).
|
|
80
|
-
let AnimatedComponentBase = (() => {
|
|
81
|
-
let _classDecorators = [Directive()];
|
|
82
|
-
let _classDescriptor;
|
|
83
|
-
let _classExtraInitializers = [];
|
|
84
|
-
let _classThis;
|
|
85
|
-
let _hostDirective_decorators;
|
|
86
|
-
let _hostDirective_initializers = [];
|
|
87
|
-
let _hostDirective_extraInitializers = [];
|
|
88
|
-
var AnimatedComponentBase = class {
|
|
89
|
-
static { _classThis = this; }
|
|
90
|
-
static {
|
|
91
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
92
|
-
_hostDirective_decorators = [ViewChild(SymbioteHostPropsDirective)];
|
|
93
|
-
__esDecorate(null, null, _hostDirective_decorators, { kind: "field", name: "hostDirective", static: false, private: false, access: { has: obj => "hostDirective" in obj, get: obj => obj.hostDirective, set: (obj, value) => { obj.hostDirective = value; } }, metadata: _metadata }, _hostDirective_initializers, _hostDirective_extraInitializers);
|
|
94
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
95
|
-
AnimatedComponentBase = _classThis = _classDescriptor.value;
|
|
96
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
97
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
98
|
-
}
|
|
99
|
-
style;
|
|
100
|
-
animatedProps;
|
|
101
|
-
passthroughAnimatedPropExplicitValues;
|
|
102
|
-
// This component's OWN host — every Animated* wrapper is a non-painting ANCHOR
|
|
103
|
-
// (ANCHOR_HOST_COMPONENTS in renderer.ts), so a `class="..."` at the use site resolves onto
|
|
104
|
-
// THIS element, never the real inner host primitive one level down (see anchorHostStyle's doc
|
|
105
|
-
// comment in primitives/shared.ts — the same reason ScrollView's own scrollProps merges it in).
|
|
106
|
-
elementRef = inject(ElementRef);
|
|
107
|
-
// The directive sitting on the inner host primitive; its `node` is the committed SymbioteNode
|
|
108
|
-
// the leaf binds to. Inherited by the decorated subclass (Angular collects base-class queries).
|
|
109
|
-
hostDirective = __runInitializers(this, _hostDirective_initializers, void 0);
|
|
110
|
-
// The leaf-lifecycle orchestration (build/attach/swap/bind/detach an AnimatedProps leaf) is a
|
|
111
|
-
// Pure Fabrication shared with AnimatedImage, which cannot extend this class (it must extend
|
|
112
|
-
// ImageBase — see the file header). `resolveNode` stays a resolver, not a captured node: the
|
|
113
|
-
// committed node only exists after `hostDirective` is populated post-view-init.
|
|
114
|
-
leafBinder = (__runInitializers(this, _hostDirective_extraInitializers), new AnimatedLeafBinder(() => this.hostNode(), this.constructor.name));
|
|
115
|
-
// Set once the view (and the inner host directive) exists; ngOnChanges before then is a no-op.
|
|
116
|
-
viewReady = false;
|
|
117
|
-
// The concrete props for the host element each change-detection pass: animated entries reduced
|
|
118
|
-
// to their current value, then the passthrough style layered on top (last wins via the style
|
|
119
|
-
// array, which the commit layer flattens) so the ShadowTree carries the current transform.
|
|
120
|
-
get reducedProps() {
|
|
121
|
-
const reduced = reduceProps(this.mergedProps());
|
|
122
|
-
const passthroughStyle = readPassthroughStyle(this.passthroughAnimatedPropExplicitValues);
|
|
123
|
-
if (passthroughStyle !== undefined) {
|
|
124
|
-
reduced['style'] =
|
|
125
|
-
reduced['style'] === undefined ? passthroughStyle : [reduced['style'], passthroughStyle];
|
|
126
|
-
}
|
|
127
|
-
reduced['style'] = [anchorHostStyle(this.elementRef), reduced['style']];
|
|
128
|
-
return reduced;
|
|
129
|
-
}
|
|
130
|
-
ngAfterViewInit() {
|
|
131
|
-
this.viewReady = true;
|
|
132
|
-
this.reconcile();
|
|
133
|
-
}
|
|
134
|
-
ngOnChanges() {
|
|
135
|
-
this.reconcile();
|
|
136
|
-
}
|
|
137
|
-
ngOnDestroy() {
|
|
138
|
-
this.leafBinder.destroy();
|
|
139
|
-
}
|
|
140
|
-
// A non-stable [animatedProps]/[style] input (a fresh object literal in the template) pushes
|
|
141
|
-
// a new reference on every change-detection pass of the HOST view, re-triggering this on every
|
|
142
|
-
// unrelated interaction elsewhere in the app — DEBUG=1 turns this into a visible tick count in
|
|
143
|
-
// AnimatedLeafBinder.reconcile, so an unexpectedly high rate for a component nobody is
|
|
144
|
-
// animating is the tell (see AnimatedScrollView's stable-reference fix in examples/angular/App.ts).
|
|
145
|
-
reconcile() {
|
|
146
|
-
if (!this.viewReady)
|
|
147
|
-
return;
|
|
148
|
-
const props = this.mergedProps();
|
|
149
|
-
const hasPassthroughAnimatedValues = this.passthroughAnimatedPropExplicitValues !== null &&
|
|
150
|
-
this.passthroughAnimatedPropExplicitValues !== undefined;
|
|
151
|
-
const wantsNative = hasPassthroughAnimatedValues && isNativeAnimatedAvailable();
|
|
152
|
-
this.leafBinder.reconcile(props, wantsNative);
|
|
153
|
-
}
|
|
154
|
-
// Merge the dedicated `style` input over the generic `animatedProps` bag into one props map —
|
|
155
|
-
// the equivalent of React/Vue `rest`. `style` wins so `[style]` and `[animatedProps].style`
|
|
156
|
-
// never disagree.
|
|
157
|
-
mergedProps() {
|
|
158
|
-
const base = this.animatedProps ?? {};
|
|
159
|
-
return this.style === undefined ? { ...base } : { ...base, style: this.style };
|
|
160
|
-
}
|
|
161
|
-
// The committed host node held by IDENTITY. resolveHostNode unwraps an imperative scroll
|
|
162
|
-
// handle to the underlying SymbioteNode (View / Text already hand back the node directly);
|
|
163
|
-
// the isSymbioteNode guard keeps us off a cast.
|
|
164
|
-
hostNode() {
|
|
165
|
-
const resolved = resolveHostNode(this.hostDirective?.node);
|
|
166
|
-
return isSymbioteNode(resolved) ? resolved : null;
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
return AnimatedComponentBase = _classThis;
|
|
170
|
-
})();
|
|
171
|
-
export { AnimatedComponentBase };
|
|
172
|
-
let AnimatedView = (() => {
|
|
173
|
-
let _classDecorators = [Component({
|
|
174
|
-
selector: 'AnimatedView, symbiote-animated-view',
|
|
175
|
-
standalone: true,
|
|
176
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
177
|
-
imports: [SymbioteHostPropsDirective, ViewHost],
|
|
178
|
-
inputs: ANIMATED_INPUTS,
|
|
179
|
-
template: `
|
|
180
|
-
<symbiote-view [symbioteHostProps]="reducedProps">
|
|
181
|
-
<ng-content></ng-content>
|
|
182
|
-
</symbiote-view>
|
|
183
|
-
`,
|
|
184
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
-
})];
|
|
186
|
-
let _classDescriptor;
|
|
187
|
-
let _classExtraInitializers = [];
|
|
188
|
-
let _classThis;
|
|
189
|
-
let _classSuper = AnimatedComponentBase;
|
|
190
|
-
var AnimatedView = class extends _classSuper {
|
|
191
|
-
static { _classThis = this; }
|
|
192
|
-
static {
|
|
193
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
194
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
195
|
-
AnimatedView = _classThis = _classDescriptor.value;
|
|
196
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
197
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
return AnimatedView = _classThis;
|
|
201
|
-
})();
|
|
202
|
-
export { AnimatedView };
|
|
203
|
-
let AnimatedText = (() => {
|
|
204
|
-
let _classDecorators = [Component({
|
|
205
|
-
selector: 'AnimatedText, symbiote-animated-text',
|
|
206
|
-
standalone: true,
|
|
207
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
208
|
-
imports: [SymbioteHostPropsDirective, TextHost],
|
|
209
|
-
inputs: ANIMATED_INPUTS,
|
|
210
|
-
template: `
|
|
211
|
-
<symbiote-text [symbioteHostProps]="reducedProps">
|
|
212
|
-
<ng-content></ng-content>
|
|
213
|
-
</symbiote-text>
|
|
214
|
-
`,
|
|
215
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
216
|
-
})];
|
|
217
|
-
let _classDescriptor;
|
|
218
|
-
let _classExtraInitializers = [];
|
|
219
|
-
let _classThis;
|
|
220
|
-
let _classSuper = AnimatedComponentBase;
|
|
221
|
-
var AnimatedText = class extends _classSuper {
|
|
222
|
-
static { _classThis = this; }
|
|
223
|
-
static {
|
|
224
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
225
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
226
|
-
AnimatedText = _classThis = _classDescriptor.value;
|
|
227
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
228
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
return AnimatedText = _classThis;
|
|
232
|
-
})();
|
|
233
|
-
export { AnimatedText };
|
|
234
|
-
let AnimatedImage = (() => {
|
|
235
|
-
let _classDecorators = [Component({
|
|
236
|
-
selector: 'AnimatedImage, symbiote-animated-image',
|
|
237
|
-
standalone: true,
|
|
238
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
239
|
-
imports: [SymbioteHostPropsDirective, ImageHost],
|
|
240
|
-
inputs: ANIMATED_IMAGE_INPUTS,
|
|
241
|
-
outputs: IMAGE_OUTPUTS,
|
|
242
|
-
template: `
|
|
243
|
-
<symbiote-image
|
|
244
|
-
[symbioteHostProps]="animatedImageProps"
|
|
245
|
-
(accessibilityAction)="handleAccessibilityAction($event)"
|
|
246
|
-
(accessibilityTap)="handleAccessibilityTap($event)"
|
|
247
|
-
(magicTap)="handleMagicTap($event)"
|
|
248
|
-
(accessibilityEscape)="handleAccessibilityEscape($event)"
|
|
249
|
-
(loadStart)="handleLoadStart($event)"
|
|
250
|
-
(load)="handleLoad($event)"
|
|
251
|
-
(loadEnd)="handleLoadEnd($event)"
|
|
252
|
-
(error)="handleError($event)"
|
|
253
|
-
(progress)="handleProgress($event)"
|
|
254
|
-
(partialLoad)="handlePartialLoad($event)"
|
|
255
|
-
>
|
|
256
|
-
<ng-content></ng-content>
|
|
257
|
-
</symbiote-image>
|
|
258
|
-
`,
|
|
259
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
260
|
-
})];
|
|
261
|
-
let _classDescriptor;
|
|
262
|
-
let _classExtraInitializers = [];
|
|
263
|
-
let _classThis;
|
|
264
|
-
let _classSuper = ImageBase;
|
|
265
|
-
let _hostDirective_decorators;
|
|
266
|
-
let _hostDirective_initializers = [];
|
|
267
|
-
let _hostDirective_extraInitializers = [];
|
|
268
|
-
var AnimatedImage = class extends _classSuper {
|
|
269
|
-
static { _classThis = this; }
|
|
270
|
-
static {
|
|
271
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
272
|
-
_hostDirective_decorators = [ViewChild(SymbioteHostPropsDirective)];
|
|
273
|
-
__esDecorate(null, null, _hostDirective_decorators, { kind: "field", name: "hostDirective", static: false, private: false, access: { has: obj => "hostDirective" in obj, get: obj => obj.hostDirective, set: (obj, value) => { obj.hostDirective = value; } }, metadata: _metadata }, _hostDirective_initializers, _hostDirective_extraInitializers);
|
|
274
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
275
|
-
AnimatedImage = _classThis = _classDescriptor.value;
|
|
276
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
277
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
278
|
-
}
|
|
279
|
-
animatedProps;
|
|
280
|
-
passthroughAnimatedPropExplicitValues;
|
|
281
|
-
// AnimatedImage is a non-painting ANCHOR too (ANCHOR_HOST_COMPONENTS) — see the matching
|
|
282
|
-
// comment on AnimatedComponentBase.elementRef.
|
|
283
|
-
elementRef = inject(ElementRef);
|
|
284
|
-
hostDirective = __runInitializers(this, _hostDirective_initializers, void 0);
|
|
285
|
-
// Same Pure Fabrication AnimatedComponentBase holds — see its matching comment. AnimatedImage
|
|
286
|
-
// can't extend AnimatedComponentBase (it must extend ImageBase, see the file header), so it
|
|
287
|
-
// gets the leaf-lifecycle via composition instead of duplicating it.
|
|
288
|
-
leafBinder = (__runInitializers(this, _hostDirective_extraInitializers), new AnimatedLeafBinder(() => this.hostNode(), this.constructor.name));
|
|
289
|
-
viewReady = false;
|
|
290
|
-
get animatedImageProps() {
|
|
291
|
-
const reduced = reduceProps(this.mergedProps());
|
|
292
|
-
const passthroughStyle = readPassthroughStyle(this.passthroughAnimatedPropExplicitValues);
|
|
293
|
-
if (passthroughStyle !== undefined) {
|
|
294
|
-
reduced['style'] =
|
|
295
|
-
reduced['style'] === undefined ? passthroughStyle : [reduced['style'], passthroughStyle];
|
|
296
|
-
}
|
|
297
|
-
const resolved = resolveImageProps(reduced);
|
|
298
|
-
resolved['style'] = [anchorHostStyle(this.elementRef), resolved['style']];
|
|
299
|
-
return resolved;
|
|
300
|
-
}
|
|
301
|
-
ngAfterViewInit() {
|
|
302
|
-
this.viewReady = true;
|
|
303
|
-
this.reconcile();
|
|
304
|
-
}
|
|
305
|
-
ngOnChanges() {
|
|
306
|
-
this.reconcile();
|
|
307
|
-
}
|
|
308
|
-
ngOnDestroy() {
|
|
309
|
-
this.leafBinder.destroy();
|
|
310
|
-
}
|
|
311
|
-
reconcile() {
|
|
312
|
-
if (!this.viewReady)
|
|
313
|
-
return;
|
|
314
|
-
const props = this.mergedProps();
|
|
315
|
-
const hasPassthroughAnimatedValues = this.passthroughAnimatedPropExplicitValues !== null &&
|
|
316
|
-
this.passthroughAnimatedPropExplicitValues !== undefined;
|
|
317
|
-
const wantsNative = hasPassthroughAnimatedValues && isNativeAnimatedAvailable();
|
|
318
|
-
this.leafBinder.reconcile(props, wantsNative);
|
|
319
|
-
}
|
|
320
|
-
mergedProps() {
|
|
321
|
-
const props = { ...(this.animatedProps ?? {}) };
|
|
322
|
-
for (const [key, value] of Object.entries(this.imageInputProps)) {
|
|
323
|
-
if (value !== undefined)
|
|
324
|
-
props[key] = value;
|
|
325
|
-
}
|
|
326
|
-
return props;
|
|
327
|
-
}
|
|
328
|
-
hostNode() {
|
|
329
|
-
const resolved = resolveHostNode(this.hostDirective?.node);
|
|
330
|
-
return isSymbioteNode(resolved) ? resolved : null;
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
return AnimatedImage = _classThis;
|
|
334
|
-
})();
|
|
335
|
-
export { AnimatedImage };
|
|
336
|
-
let AnimatedScrollView = (() => {
|
|
337
|
-
let _classDecorators = [Component({
|
|
338
|
-
selector: 'AnimatedScrollView, symbiote-animated-scroll-view',
|
|
339
|
-
standalone: true,
|
|
340
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
341
|
-
imports: [SymbioteHostPropsDirective, ScrollViewHost],
|
|
342
|
-
inputs: ANIMATED_INPUTS,
|
|
343
|
-
template: `
|
|
344
|
-
<symbiote-scroll-view [symbioteHostProps]="reducedProps">
|
|
345
|
-
<symbiote-scroll-content [symbioteHostProps]="contentProps">
|
|
346
|
-
<ng-content></ng-content>
|
|
347
|
-
</symbiote-scroll-content>
|
|
348
|
-
</symbiote-scroll-view>
|
|
349
|
-
`,
|
|
350
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
351
|
-
})];
|
|
352
|
-
let _classDescriptor;
|
|
353
|
-
let _classExtraInitializers = [];
|
|
354
|
-
let _classThis;
|
|
355
|
-
let _classSuper = AnimatedComponentBase;
|
|
356
|
-
var AnimatedScrollView = class extends _classSuper {
|
|
357
|
-
static { _classThis = this; }
|
|
358
|
-
static {
|
|
359
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
360
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
361
|
-
AnimatedScrollView = _classThis = _classDescriptor.value;
|
|
362
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
363
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
364
|
-
}
|
|
365
|
-
// RN defaults nested scrolling ON (ScrollView.js `nestedScrollEnabled ?? true`) — Android
|
|
366
|
-
// needs it explicit or a ScrollView nested inside another scrollable container never
|
|
367
|
-
// receives touch (swallowed by the outer scroll view; iOS doesn't gate on this). The real
|
|
368
|
-
// ScrollView component already defaults this (scroll-view/shared.ts), but AnimatedScrollView
|
|
369
|
-
// talks to the raw primitive directly and has no such defaulting, so it must apply it too.
|
|
370
|
-
//
|
|
371
|
-
// scrollViewBaseStyle (overflow: 'scroll' + the per-axis flexDirection) is the OTHER thing
|
|
372
|
-
// the real ScrollView applies that this bespoke template used to skip entirely — without it,
|
|
373
|
-
// iOS Fabric never clips the scroll view's content to its own frame (Android's native
|
|
374
|
-
// ViewGroup clips regardless of the style prop, which is why this was invisible there). This
|
|
375
|
-
// wrapper has no dedicated `horizontal` input (only the generic `animatedProps`/`style`
|
|
376
|
-
// surface), and its template is hardcoded to the vertical intrinsics
|
|
377
|
-
// (symbiote-scroll-view/symbiote-scroll-content, not the horizontal variants), so
|
|
378
|
-
// selectScrollIntrinsics is always called with isHorizontal=false here — matching what the
|
|
379
|
-
// template can actually render.
|
|
380
|
-
get reducedProps() {
|
|
381
|
-
const reduced = super.reducedProps;
|
|
382
|
-
const { scrollViewBaseStyle } = selectScrollIntrinsics(false, undefined);
|
|
383
|
-
const withScrollBase = {
|
|
384
|
-
...reduced,
|
|
385
|
-
style: [scrollViewBaseStyle, reduced.style],
|
|
386
|
-
};
|
|
387
|
-
return withScrollBase.nestedScrollEnabled === undefined
|
|
388
|
-
? { ...withScrollBase, nestedScrollEnabled: true }
|
|
389
|
-
: withScrollBase;
|
|
390
|
-
}
|
|
391
|
-
// The content (inner) view's props: contentStyle from the same intrinsics selection, plus
|
|
392
|
-
// `collapsable: false` (the Android multi-child fix this file's tests already cover) — mirrors
|
|
393
|
-
// the real ScrollView's own `contentProps` getter (scroll-view/shared.ts).
|
|
394
|
-
get contentProps() {
|
|
395
|
-
const { contentStyle } = selectScrollIntrinsics(false, undefined);
|
|
396
|
-
return { style: contentStyle, collapsable: false };
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
return AnimatedScrollView = _classThis;
|
|
400
|
-
})();
|
|
401
|
-
export { AnimatedScrollView };
|
|
402
|
-
// List components are already explicit AOT-compiled Angular components with their own full input
|
|
403
|
-
// surface and inner ScrollView composition. Expose them in the Animated namespace without runtime
|
|
404
|
-
// synthesis; app code passes animated style/onScroll through the existing list inputs.
|
|
405
|
-
export const AnimatedFlatList = FlatList;
|
|
406
|
-
export const AnimatedSectionList = SectionList;
|
|
407
|
-
// Surface-parity shim for the React/Vue `createAnimatedComponent(Component)`. Angular cannot
|
|
408
|
-
// synthesize a component at runtime (no JIT under AOT/Metro — see the file header), so this maps
|
|
409
|
-
// the built-in primitives to their pre-authored wrappers and refuses anything else with a
|
|
410
|
-
// pointer to the real Angular idiom: author a standalone @Component extending
|
|
411
|
-
// AnimatedComponentBase.
|
|
412
|
-
export function createAnimatedComponent(base) {
|
|
413
|
-
if (base === View)
|
|
414
|
-
return AnimatedView;
|
|
415
|
-
if (base === Text)
|
|
416
|
-
return AnimatedText;
|
|
417
|
-
if (base === Image)
|
|
418
|
-
return AnimatedImage;
|
|
419
|
-
if (base === ScrollView)
|
|
420
|
-
return AnimatedScrollView;
|
|
421
|
-
throw new Error('createAnimatedComponent: Angular cannot synthesize a component at runtime (no JIT compiler ' +
|
|
422
|
-
'under AOT/Metro). Author an explicit standalone @Component extending AnimatedComponentBase ' +
|
|
423
|
-
'instead. The built-in primitives View / Text / Image / ScrollView map to ' +
|
|
424
|
-
'AnimatedView / AnimatedText / AnimatedImage / AnimatedScrollView.');
|
|
425
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { AnimatedValue, AnimatedValueXY, AnimatedColor, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent } from '@symbiote-native/engine';
|
|
2
|
-
import { AnimatedImage, AnimatedScrollView, AnimatedText, AnimatedView, createAnimatedComponent } from './create-animated-component';
|
|
3
|
-
export { AnimatedComponentBase, AnimatedFlatList, AnimatedImage, AnimatedScrollView, AnimatedSectionList, AnimatedText, AnimatedView, createAnimatedComponent, } from './create-animated-component';
|
|
4
|
-
export declare const Animated: {
|
|
5
|
-
Value: typeof AnimatedValue;
|
|
6
|
-
ValueXY: typeof AnimatedValueXY;
|
|
7
|
-
Color: typeof AnimatedColor;
|
|
8
|
-
Easing: {
|
|
9
|
-
step0(n: number): number;
|
|
10
|
-
step1(n: number): number;
|
|
11
|
-
linear(t: number): number;
|
|
12
|
-
ease(t: number): number;
|
|
13
|
-
quad(t: number): number;
|
|
14
|
-
cubic(t: number): number;
|
|
15
|
-
poly(n: number): import("@symbiote-native/engine").IEasingFunction;
|
|
16
|
-
sin(t: number): number;
|
|
17
|
-
circle(t: number): number;
|
|
18
|
-
exp(t: number): number;
|
|
19
|
-
elastic(bounciness?: number): import("@symbiote-native/engine").IEasingFunction;
|
|
20
|
-
back(s?: number): import("@symbiote-native/engine").IEasingFunction;
|
|
21
|
-
bounce(t: number): number;
|
|
22
|
-
bezier(x1: number, y1: number, x2: number, y2: number): import("@symbiote-native/engine").IEasingFunction;
|
|
23
|
-
in(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
24
|
-
out(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
25
|
-
inOut(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
26
|
-
};
|
|
27
|
-
timing: typeof timing;
|
|
28
|
-
spring: typeof spring;
|
|
29
|
-
decay: typeof decay;
|
|
30
|
-
parallel: typeof parallel;
|
|
31
|
-
sequence: typeof sequence;
|
|
32
|
-
stagger: typeof stagger;
|
|
33
|
-
loop: typeof loop;
|
|
34
|
-
delay: typeof delay;
|
|
35
|
-
add: typeof add;
|
|
36
|
-
subtract: typeof subtract;
|
|
37
|
-
multiply: typeof multiply;
|
|
38
|
-
divide: typeof divide;
|
|
39
|
-
modulo: typeof modulo;
|
|
40
|
-
diffClamp: typeof diffClamp;
|
|
41
|
-
event: typeof event;
|
|
42
|
-
forkEvent: typeof forkEvent;
|
|
43
|
-
unforkEvent: typeof unforkEvent;
|
|
44
|
-
View: typeof AnimatedView;
|
|
45
|
-
Text: typeof AnimatedText;
|
|
46
|
-
Image: typeof AnimatedImage;
|
|
47
|
-
ScrollView: typeof AnimatedScrollView;
|
|
48
|
-
FlatList: typeof import("../..").FlatList;
|
|
49
|
-
SectionList: typeof import("../..").SectionList;
|
|
50
|
-
createAnimatedComponent: typeof createAnimatedComponent;
|
|
51
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// The Animated namespace for @symbiote-native/angular: the Angular twin of adapters/vue/src/modules/
|
|
2
|
-
// animated/index.ts. The animated COMPONENTS (View / Text / Image / ScrollView) are explicit
|
|
3
|
-
// standalone components (Angular has no runtime HOC — see create-animated-component.ts); the
|
|
4
|
-
// value graph, easing and imperative drivers come from @symbiote-native/engine (framework-agnostic,
|
|
5
|
-
// JS-driven), spread in verbatim. Both halves meet here so the familiar surface,
|
|
6
|
-
// `Animated.timing(new Animated.Value(0), …).start()`, works against the Angular-driven engine.
|
|
7
|
-
import { AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedMock, Easing, Platform, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, } from '@symbiote-native/engine';
|
|
8
|
-
import { AnimatedFlatList, AnimatedImage, AnimatedScrollView, AnimatedSectionList, AnimatedText, AnimatedView, createAnimatedComponent, } from './create-animated-component';
|
|
9
|
-
export { AnimatedComponentBase, AnimatedFlatList, AnimatedImage, AnimatedScrollView, AnimatedSectionList, AnimatedText, AnimatedView, createAnimatedComponent, } from './create-animated-component';
|
|
10
|
-
// ScrollView is exposed DIRECTLY, not behind the lazy getter the React/Vue modules use: that
|
|
11
|
-
// getter only exists to defer a RUNTIME createAnimatedComponent(ScrollView) past module init so
|
|
12
|
-
// it cannot read ScrollView inside its own TDZ during an import cycle. AnimatedScrollView here is
|
|
13
|
-
// a statically-declared component that never reads the ScrollView class at init (it targets the
|
|
14
|
-
// `symbiote-scroll-view` host by string), so there is no cycle to defer.
|
|
15
|
-
//
|
|
16
|
-
// FlatList / SectionList are exposed as explicit AOT-safe list entries now that the Angular list
|
|
17
|
-
// components exist. Angular still cannot synthesize arbitrary animated wrappers at runtime; custom
|
|
18
|
-
// animated components remain explicit standalone components over AnimatedComponentBase.
|
|
19
|
-
// The live, JS-driven driver namespace (real frames). RN's AnimatedImplementation.
|
|
20
|
-
const liveDrivers = {
|
|
21
|
-
Value: AnimatedValue,
|
|
22
|
-
ValueXY: AnimatedValueXY,
|
|
23
|
-
Color: AnimatedColor,
|
|
24
|
-
Easing,
|
|
25
|
-
timing,
|
|
26
|
-
spring,
|
|
27
|
-
decay,
|
|
28
|
-
parallel,
|
|
29
|
-
sequence,
|
|
30
|
-
stagger,
|
|
31
|
-
loop,
|
|
32
|
-
delay,
|
|
33
|
-
add,
|
|
34
|
-
subtract,
|
|
35
|
-
multiply,
|
|
36
|
-
divide,
|
|
37
|
-
modulo,
|
|
38
|
-
diffClamp,
|
|
39
|
-
event,
|
|
40
|
-
forkEvent,
|
|
41
|
-
unforkEvent,
|
|
42
|
-
};
|
|
43
|
-
// RN swaps the WHOLE driver namespace for the mock when the host reports isDisableAnimations
|
|
44
|
-
// (reduced motion / test env): the mock keeps the same surface but jumps each animation to its
|
|
45
|
-
// final value synchronously, no frames. The animated COMPONENTS are live in both branches; only
|
|
46
|
-
// the drivers/value/operators/events half is swapped, exactly like RN spreading `...Animated`
|
|
47
|
-
// (impl or mock) over the same components.
|
|
48
|
-
const drivers = Platform.isDisableAnimations ? AnimatedMock : liveDrivers;
|
|
49
|
-
export const Animated = {
|
|
50
|
-
View: AnimatedView,
|
|
51
|
-
Text: AnimatedText,
|
|
52
|
-
Image: AnimatedImage,
|
|
53
|
-
ScrollView: AnimatedScrollView,
|
|
54
|
-
FlatList: AnimatedFlatList,
|
|
55
|
-
SectionList: AnimatedSectionList,
|
|
56
|
-
createAnimatedComponent,
|
|
57
|
-
...drivers,
|
|
58
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Type } from '@angular/core';
|
|
2
|
-
import { type IAppParameters } from '@symbiote-native/engine';
|
|
3
|
-
export type IComponentProvider = () => Type<unknown>;
|
|
4
|
-
export type IWrapperComponentProvider = (appParameters: IAppParameters) => Type<unknown>;
|
|
5
|
-
declare const AppRegistry: import("@symbiote-native/engine").IAppRegistry<IComponentProvider, IWrapperComponentProvider>, setHostRegistrar: (registrar: import("@symbiote-native/engine").IHostRegistrar) => void;
|
|
6
|
-
export { AppRegistry, setHostRegistrar };
|
|
7
|
-
export type { IAppParameters, IRunnable, IHostRegistrar, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from '@symbiote-native/engine';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// AppRegistry: the JS entry point RN apps already use:
|
|
2
|
-
// AppRegistry.registerComponent(appKey, () => App)
|
|
3
|
-
// The registry bookkeeping (sections, host-registrar bridge, headless tasks) is
|
|
4
|
-
// framework-agnostic and lives in @symbiote-native/engine's createAppRegistry; this file supplies
|
|
5
|
-
// only the one Angular-specific seam — building a runnable from a component provider via
|
|
6
|
-
// `mount`'s wrapper/initialProps support (render.ts) — so examples/angular's own
|
|
7
|
-
// registerRunnable + mount call can move onto the same entry point React/Vue already have.
|
|
8
|
-
import { createAppRegistry, dlog, } from '@symbiote-native/engine';
|
|
9
|
-
import { mount } from '../../render';
|
|
10
|
-
function runnableFor(componentProvider, getWrapperComponentProvider) {
|
|
11
|
-
return appParameters => {
|
|
12
|
-
dlog(`AppRegistry: mounting on rootTag ${String(appParameters.rootTag)}`);
|
|
13
|
-
// Read live (not at registration time) so setWrapperComponentProvider affects every
|
|
14
|
-
// runnable's next run, not just future ones.
|
|
15
|
-
mount(appParameters.rootTag, componentProvider(), {
|
|
16
|
-
initialProps: appParameters.initialProps,
|
|
17
|
-
wrapperComponent: getWrapperComponentProvider()?.(appParameters),
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const { AppRegistry, setHostRegistrar } = createAppRegistry(runnableFor);
|
|
22
|
-
export { AppRegistry, setHostRegistrar };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type OnChanges, type SimpleChanges } from '@angular/core';
|
|
2
|
-
import { type IColorValue, type IStatusBarStyle } from '@symbiote-native/engine';
|
|
3
|
-
export type { IStatusBarProps, IStatusBarStyle } from '@symbiote-native/engine';
|
|
4
|
-
declare class StatusBarComponent implements OnChanges {
|
|
5
|
-
barStyle?: IStatusBarStyle;
|
|
6
|
-
hidden?: boolean;
|
|
7
|
-
animated?: boolean;
|
|
8
|
-
networkActivityIndicatorVisible?: boolean;
|
|
9
|
-
backgroundColor?: IColorValue;
|
|
10
|
-
translucent?: boolean;
|
|
11
|
-
ngOnChanges(_changes: SimpleChanges): void;
|
|
12
|
-
private buildProps;
|
|
13
|
-
}
|
|
14
|
-
declare const StatusBarWithStatics: typeof StatusBarComponent & import("@symbiote-native/engine").IStatusBarImperative;
|
|
15
|
-
export declare const StatusBar: typeof StatusBarWithStatics & {
|
|
16
|
-
readonly currentHeight?: number;
|
|
17
|
-
};
|