@symbiote-native/angular 0.3.1 → 0.3.3
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 +1 -4
- package/babel-linker.cjs +1 -2
- package/bin/symbiote-angular-dev.cjs +2 -2
- package/build/angular/components/activity-indicator/index.android.js +3 -3
- package/build/angular/components/activity-indicator/index.ios.js +3 -3
- package/build/angular/components/activity-indicator/index.js +1 -1
- package/build/angular/components/activity-indicator/index.js.map +1 -1
- package/build/angular/components/activity-indicator/shared.js +3 -3
- package/build/angular/components/button.js +6 -6
- package/build/angular/components/button.js.map +1 -1
- package/build/angular/components/flat-list/index.js +4 -5
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image/index.android.js +3 -3
- package/build/angular/components/image/index.ios.js +3 -3
- package/build/angular/components/image-background.js +3 -3
- package/build/angular/components/input-accessory-view.js +3 -3
- package/build/angular/components/keyboard-avoiding-view.js +5 -5
- package/build/angular/components/keyboard-avoiding-view.js.map +1 -1
- package/build/angular/components/modal.js +3 -3
- package/build/angular/components/pressable/index.js +3 -3
- package/build/angular/components/refresh-control.js +5 -5
- package/build/angular/components/refresh-control.js.map +1 -1
- package/build/angular/components/safe-area-view.js +6 -7
- package/build/angular/components/safe-area-view.js.map +1 -1
- package/build/angular/components/scroll-view/index.android.js +8 -8
- package/build/angular/components/scroll-view/index.android.js.map +1 -1
- package/build/angular/components/scroll-view/index.ios.js +6 -6
- package/build/angular/components/scroll-view/index.ios.js.map +1 -1
- package/build/angular/components/scroll-view/index.js +1 -1
- package/build/angular/components/scroll-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/shared.js +9 -9
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.js +4 -4
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/section-list/index.js +3 -3
- package/build/angular/components/switch/index.android.js +3 -3
- package/build/angular/components/switch/index.ios.js +3 -3
- package/build/angular/components/switch/shared.js +3 -3
- package/build/angular/components/text-input.js +3 -3
- package/build/angular/components/touchable-native-feedback.js +5 -5
- package/build/angular/components/touchable-native-feedback.js.map +1 -1
- package/build/angular/components/touchable.js +12 -12
- package/build/angular/components/touchable.js.map +1 -1
- package/build/angular/components/virtualized-list/directives.js +19 -20
- package/build/angular/components/virtualized-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-list/index.js +7 -8
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/directives.js +13 -14
- package/build/angular/components/virtualized-section-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.js +5 -5
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/create-portal.js +9 -9
- package/build/angular/create-portal.js.map +1 -1
- package/build/angular/create-tunnel.js +6 -6
- package/build/angular/descriptor-to-angular/index.js +6 -6
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/index.js +6 -7
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.js +17 -17
- 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/status-bar.js +3 -3
- package/build/angular/primitives/index.js +45 -45
- package/build/angular/primitives/shared.d.ts +1 -2
- package/build/angular/primitives/shared.js +8 -9
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/render.js +2 -3
- package/build/angular/render.js.map +1 -1
- package/build/angular/renderer.js +4 -6
- package/build/angular/renderer.js.map +1 -1
- package/build/angular/services/color-scheme.service.js +3 -3
- package/build/angular/services/window-dimensions.service.js +3 -3
- package/build/components/activity-indicator/index.js +1 -1
- package/build/components/button.js +3 -3
- package/build/components/flat-list/index.js +1 -2
- package/build/components/keyboard-avoiding-view.js +2 -2
- package/build/components/refresh-control.js +2 -2
- package/build/components/safe-area-view.js +3 -4
- package/build/components/scroll-view/index.android.js +2 -2
- package/build/components/scroll-view/index.ios.js +3 -3
- package/build/components/scroll-view/index.js +1 -1
- package/build/components/scroll-view/shared.js +3 -3
- package/build/components/scroll-view/sticky-header.js +1 -1
- package/build/components/touchable-native-feedback.js +2 -2
- package/build/components/touchable.js +3 -3
- package/build/components/virtualized-list/directives.js +1 -2
- package/build/components/virtualized-list/index.js +4 -5
- package/build/components/virtualized-section-list/directives.js +1 -2
- package/build/components/virtualized-section-list/index.js +2 -2
- package/build/create-portal.js +3 -3
- package/build/descriptor-to-angular/index.js +3 -3
- package/build/index.js +6 -7
- package/build/modules/animated/create-animated-component.js +2 -2
- package/build/modules/animated/index.js +1 -1
- package/build/primitives/shared.d.ts +1 -2
- package/build/primitives/shared.js +2 -3
- package/build/render.js +2 -3
- package/build/renderer.js +4 -6
- package/metro-config.cjs +3 -4
- package/metro-css-parser.cjs +1 -2
- package/package.json +5 -5
- package/src/__tests__/responder-change-detection.test.ts +1 -1
- package/src/__tests__/responder-nested-cd.test.ts +1 -1
- package/src/components/activity-indicator/activity-indicator-class-style.test.ts +1 -1
- package/src/components/activity-indicator/index.ts +1 -1
- package/src/components/button.ts +3 -3
- package/src/components/flat-list/flat-list-array-style.test.ts +1 -1
- package/src/components/flat-list/flat-list-class-style.test.ts +1 -1
- package/src/components/flat-list/flat-list-scroll-containment.test.ts +2 -2
- package/src/components/flat-list/index.ts +1 -2
- package/src/components/image/image-class-style.test.ts +1 -1
- package/src/components/image-background-class-style.test.ts +1 -1
- package/src/components/image-background.ts +1 -1
- package/src/components/keyboard-avoiding-view.ts +4 -4
- package/src/components/refresh-control.ts +5 -4
- package/src/components/safe-area-view.ts +5 -5
- package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +1 -1
- package/src/components/scroll-view/index.android.ts +2 -2
- package/src/components/scroll-view/index.ios.ts +3 -3
- package/src/components/scroll-view/index.ts +1 -1
- package/src/components/scroll-view/scroll-view-class-style.test.ts +1 -1
- package/src/components/scroll-view/shared.ts +5 -5
- package/src/components/scroll-view/sticky-header.ts +1 -1
- package/src/components/text-input-class-style.test.ts +1 -1
- package/src/components/text-input.ts +2 -2
- package/src/components/touchable-native-feedback.ts +3 -3
- package/src/components/touchable.ts +5 -5
- package/src/components/virtualized-list/directives.ts +1 -2
- package/src/components/virtualized-list/index.ts +6 -7
- package/src/components/virtualized-list/virtualized-list-class-style.test.ts +1 -1
- package/src/components/virtualized-section-list/directives.ts +1 -2
- package/src/components/virtualized-section-list/index.ts +4 -4
- package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +1 -1
- package/src/create-portal.ts +3 -3
- package/src/descriptor-to-angular/index.ts +3 -3
- package/src/host-instance/host-instance.test.ts +1 -1
- package/src/index.ts +6 -7
- package/src/modules/animated/create-animated-component.ts +2 -2
- package/src/modules/animated/index.ts +1 -1
- package/src/modules/app-registry/app-registry.test.ts +3 -3
- package/src/primitives/shared.ts +2 -3
- package/src/render.test.ts +3 -3
- package/src/render.ts +2 -3
- package/src/renderer.test.ts +1 -1
- package/src/renderer.ts +4 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Co-located Angular-driven test
|
|
1
|
+
// Co-located Angular-driven test, Angular twin of adapters/react/src/modules/
|
|
2
2
|
// app-registry/app-registry.test.tsx. Proves the AppRegistry entry point:
|
|
3
3
|
// `registerComponent(appKey, () => App)` stores a runnable that calls `mount` (driving
|
|
4
4
|
// @symbiote-native/engine) AND bridges it to the host registrar (RN's own AppRegistry, injected via
|
|
@@ -19,8 +19,8 @@ const ROOT_TAG = 212;
|
|
|
19
19
|
const WRAPPED_APP_KEY = 'canary-wrapped';
|
|
20
20
|
const WRAPPED_ROOT_TAG = 213;
|
|
21
21
|
|
|
22
|
-
// Angular's mount() batches change detection on a microtask
|
|
23
|
-
//
|
|
22
|
+
// Angular's mount() batches change detection on a microtask, so a committed native tag isn't
|
|
23
|
+
// available synchronously — assertions on the committed tree need one tick, same as Vue.
|
|
24
24
|
const tick = (): Promise<void> => new Promise(resolve => setTimeout(resolve, 0));
|
|
25
25
|
|
|
26
26
|
class TestText {}
|
package/src/primitives/shared.ts
CHANGED
|
@@ -36,8 +36,7 @@ import {
|
|
|
36
36
|
*
|
|
37
37
|
* Skipping this call for a new `ANCHOR_HOST_COMPONENTS` entry compiles clean under `tsc` AND a
|
|
38
38
|
* real `ngc` AOT build — no type error, no template error — it just silently drops `class="..."`
|
|
39
|
-
* forever; only a device/simulator render (or a committed-node style assertion) catches it.
|
|
40
|
-
* the `angular-adapter` skill §21 for the device-confirmed incident and the full checklist.
|
|
39
|
+
* forever; only a device/simulator render (or a committed-node style assertion) catches it.
|
|
41
40
|
*/
|
|
42
41
|
export function anchorHostStyle(elementRef: ElementRef<unknown>): unknown {
|
|
43
42
|
const node = elementRef.nativeElement;
|
|
@@ -178,7 +177,7 @@ export class SymbioteHostPropsDirective {
|
|
|
178
177
|
// so the next root tick repaints the mutation. It targets the directive's injecting view
|
|
179
178
|
// (`_cdRefInjectingView`, i.e. the host component), unlike `detectChanges()` which acts on a
|
|
180
179
|
// resolved `_lView` that is NOT the host component here. The Angular twin of what React/Vue get
|
|
181
|
-
// for free (setState / proxy reactivity).
|
|
180
|
+
// for free (setState / proxy reactivity).
|
|
182
181
|
private wrapCallback(key: string, value: unknown): unknown {
|
|
183
182
|
if (!ON_PREFIX.test(key) || typeof value !== 'function') return value;
|
|
184
183
|
const handler = value as (...args: unknown[]) => unknown;
|
package/src/render.test.ts
CHANGED
|
@@ -139,9 +139,9 @@ describe('Angular mount', () => {
|
|
|
139
139
|
|
|
140
140
|
expect(fabric.serialize(fabric.appRoot().children)).toContain('RCTRawText "tapped 1×"');
|
|
141
141
|
// UnrelatedSiblingChild has no dirty descendant of its own, so it must not be re-checked
|
|
142
|
-
// just because CounterChild (a completely separate branch) got pressed.
|
|
143
|
-
//
|
|
144
|
-
//
|
|
142
|
+
// just because CounterChild (a completely separate branch) got pressed. This does NOT prove
|
|
143
|
+
// the root's own template stays untouched — the root's template still re-runs on every
|
|
144
|
+
// press (see render.ts).
|
|
145
145
|
expect(unrelatedRenderCount).toBe(afterFirstPaint);
|
|
146
146
|
});
|
|
147
147
|
});
|
package/src/render.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// (no DOM) — createEnvironmentInjector + createComponent over @angular/core only, with our
|
|
4
4
|
// SymbioteRendererFactory provided so Angular drives the engine, which commits into
|
|
5
5
|
// nativeFabricUIManager; RN's own renderer never in the path. Angular twin of
|
|
6
|
-
// adapters/vue/src/render.ts.
|
|
6
|
+
// adapters/vue/src/render.ts.
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
createElement as createEngineElement,
|
|
@@ -143,8 +143,7 @@ export function mount(
|
|
|
143
143
|
// behavior, true in every Angular app, not something this swap changes. What DOES
|
|
144
144
|
// still protect a sibling branch from an unrelated press is a genuine child
|
|
145
145
|
// `@Component` boundary — SignalView-compiled children are skip-eligible regardless of
|
|
146
|
-
// this scheduler
|
|
147
|
-
// including the test that disproved the stronger claim before it shipped).
|
|
146
|
+
// this scheduler.
|
|
148
147
|
...provideZonelessChangeDetectionInternal(),
|
|
149
148
|
ColorSchemeService,
|
|
150
149
|
WindowDimensionsService,
|
package/src/renderer.test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Co-located headless test for the Angular renderer seam
|
|
1
|
+
// Co-located headless test for the Angular renderer seam. Drives SymbioteRenderer
|
|
2
2
|
// directly — no Angular runtime, no compiler — against the shared fake Fabric slot, proving
|
|
3
3
|
// each Renderer2 method maps onto the engine mutation API and commits a correct Fabric tree.
|
|
4
4
|
// The bootstrap (mount → createComponent) is validated separately on a real host / the AOT
|
package/src/renderer.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// DOM directly — every paint goes through Renderer2 (created per-component by
|
|
3
3
|
// RendererFactory2). We provide OUR factory, so each Renderer2 method maps onto the
|
|
4
4
|
// engine's tiny mutation API; the engine owns all Fabric clone-on-write, shared with
|
|
5
|
-
// every other adapter. This is the Angular twin of adapters/vue/src/renderer.ts
|
|
6
|
-
//
|
|
5
|
+
// every other adapter. This is the Angular twin of adapters/vue/src/renderer.ts — proof
|
|
6
|
+
// that the same engine mutation API drives both frameworks.
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
appendChild,
|
|
@@ -150,8 +150,7 @@ function assertTextPlacement(child: ISymbioteNode, parent: IHostElement): void {
|
|
|
150
150
|
|
|
151
151
|
// One renderer per mounted surface. Every mutation asks the surface to (microtask-
|
|
152
152
|
// coalesced) recommit — the same seam Vue uses; a burst of Angular change-detection
|
|
153
|
-
// mutations collapses into one completeRoot.
|
|
154
|
-
// instance for all components.
|
|
153
|
+
// mutations collapses into one completeRoot.
|
|
155
154
|
export class SymbioteRenderer implements Renderer2 {
|
|
156
155
|
readonly data: Record<string, unknown> = {};
|
|
157
156
|
// Angular calls destroyNode per-node only when this is non-null; teardown happens in
|
|
@@ -313,8 +312,7 @@ export class SymbioteRenderer implements Renderer2 {
|
|
|
313
312
|
}
|
|
314
313
|
|
|
315
314
|
// Ivy compiles every class= / [class.foo] / [ngClass] form down to per-token addClass/
|
|
316
|
-
// removeClass calls (never a single setAttribute('class', ...)
|
|
317
|
-
// vendored Ivy sources, see the symbiote-sfc-style-compiler skill), so a per-node token set
|
|
315
|
+
// removeClass calls (never a single setAttribute('class', ...) call), so a per-node token set
|
|
318
316
|
// is accumulated here and re-joined into one string on every change, then handed to
|
|
319
317
|
// routeProp('class', ...) exactly like Vue's template `class="..."` and React's JSX
|
|
320
318
|
// `className="..."` — all three resolve through the SAME centralized class+style merge in
|