@symbiote-native/angular 3.1.0 → 3.1.2

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.
Files changed (62) hide show
  1. package/README.md +91 -30
  2. package/build/angular/change-detection-flush.d.ts +2 -3
  3. package/build/angular/change-detection-flush.js +7 -11
  4. package/build/angular/change-detection-flush.js.map +1 -1
  5. package/build/angular/components/image-shared.js +6 -9
  6. package/build/angular/components/image-shared.js.map +1 -1
  7. package/build/angular/components/input-accessory-view-props.js +3 -4
  8. package/build/angular/components/input-accessory-view-props.js.map +1 -1
  9. package/build/angular/components/pressable-props.js +2 -4
  10. package/build/angular/components/pressable-props.js.map +1 -1
  11. package/build/angular/components/refresh-control-props.js +3 -5
  12. package/build/angular/components/refresh-control-props.js.map +1 -1
  13. package/build/angular/components/safe-area-view-props.js +3 -5
  14. package/build/angular/components/safe-area-view-props.js.map +1 -1
  15. package/build/angular/components/scroll-view-props.js +3 -6
  16. package/build/angular/components/scroll-view-props.js.map +1 -1
  17. package/build/angular/components/section-list/index.js.map +1 -1
  18. package/build/angular/components/text-input-props.js +3 -4
  19. package/build/angular/components/text-input-props.js.map +1 -1
  20. package/build/angular/components/touchable-props.js +3 -5
  21. package/build/angular/components/touchable-props.js.map +1 -1
  22. package/build/angular/components/virtualized-list/index.js +9 -19
  23. package/build/angular/components/virtualized-list/index.js.map +1 -1
  24. package/build/angular/components/virtualized-section-list/index.js.map +1 -1
  25. package/build/angular/create-portal/index.js +3 -6
  26. package/build/angular/create-portal/index.js.map +1 -1
  27. package/build/angular/elements.js +4 -17
  28. package/build/angular/elements.js.map +1 -1
  29. package/build/angular/gate-demand.js +1 -1
  30. package/build/angular/gate-demand.js.map +1 -1
  31. package/build/angular/index.js +6 -28
  32. package/build/angular/index.js.map +1 -1
  33. package/build/angular/modules/animated/create-animated-component.js.map +1 -1
  34. package/build/angular/primitives/index.d.ts +0 -15
  35. package/build/angular/primitives/index.js +5 -19
  36. package/build/angular/primitives/index.js.map +1 -1
  37. package/build/angular/primitives/shared.js +3 -6
  38. package/build/angular/primitives/shared.js.map +1 -1
  39. package/build/angular/renderer/index.js +6 -24
  40. package/build/angular/renderer/index.js.map +1 -1
  41. package/metro-config.cjs +3 -24
  42. package/package.json +6 -6
  43. package/src/change-detection-flush.ts +7 -11
  44. package/src/components/image-shared.ts +6 -9
  45. package/src/components/input-accessory-view-props.ts +3 -4
  46. package/src/components/pressable-props.ts +2 -4
  47. package/src/components/refresh-control-props.ts +3 -5
  48. package/src/components/safe-area-view-props.ts +3 -5
  49. package/src/components/scroll-view-props.ts +3 -6
  50. package/src/components/section-list/index.ts +0 -1
  51. package/src/components/text-input-props.ts +3 -4
  52. package/src/components/touchable-props.ts +3 -5
  53. package/src/components/virtualized-list/index.ts +6 -12
  54. package/src/components/virtualized-section-list/index.ts +0 -1
  55. package/src/create-portal/index.ts +3 -6
  56. package/src/elements.ts +10 -26
  57. package/src/gate-demand.ts +1 -1
  58. package/src/index.ts +6 -28
  59. package/src/modules/animated/create-animated-component.ts +3 -7
  60. package/src/primitives/index.ts +5 -19
  61. package/src/primitives/shared.ts +3 -6
  62. package/src/renderer/index.ts +6 -24
@@ -21,21 +21,8 @@ export {
21
21
  })
22
22
  export class ViewHost extends SymbiotePrimitiveHost {}
23
23
 
24
- /**
25
- * Text is an ORDINARY primitive host as of 2026-09-18, and the two `@Input()`s it used to declare
26
- * are gone with the code that needed them.
27
- *
28
- * They existed for one stated reason: a default can only be applied by code that can SEE whether the
29
- * caller supplied a value, and a pass-through host binding is invisible to the component — so the
30
- * defaults had to be applied where the inputs were readable. That argument was sound and it is now
31
- * answered one layer down. The payload builder reads the AUTHORED bag, so it can tell an absent
32
- * `ellipsizeMode` from an explicit `clip` without anyone declaring anything; the rule is keyed on the
33
- * component (`foldTextDefaults`, `SymbioteFabricProps.cpp`) and reaches every `RCTText` however it
34
- * was spelled.
35
- *
36
- * The pass-through is therefore the CORRECT path for both props now, and `text-defaults.test.ts`'s
37
- * "never overwrites a value the caller supplied" is what proves the authored value still arrives.
38
- */
24
+ // Text is an ordinary primitive host — no `@Input()`s for defaults; `foldTextDefaults` (C++)
25
+ // reads the authored bag directly, so an absent value never needs declaring here.
39
26
  @Component({
40
27
  selector: 'text',
41
28
  standalone: true,
@@ -99,10 +86,9 @@ export class MultilineTextInputHost extends SymbiotePrimitiveHost {}
99
86
  })
100
87
  export class SwitchHost extends SymbiotePrimitiveHost {}
101
88
 
102
- // The centering RCTView RN wraps the spinner in (ActivityIndicator.js:112), not the spinner —
103
- // which is what this tag resolved to until 2026-09-09. The native view moved to
104
- // `activity-indicator-spinner`, built by the engine's ActivityIndicator behavior, so nothing writes
105
- // it in a template and it needs no host here.
89
+ // The centering RCTView RN wraps the spinner in (ActivityIndicator.js:112) is
90
+ // `activity-indicator-spinner`, built by the engine's ActivityIndicator behavior — nothing writes
91
+ // it in a template, so it needs no host here.
106
92
  @Component({
107
93
  selector: 'activity-indicator',
108
94
  standalone: true,
@@ -287,12 +287,9 @@ export class SymbioteHostPropsDirective {
287
287
  return this.elementRef.nativeElement;
288
288
  }
289
289
 
290
- // MEASURED 2026-08-20, headless 1000-row create: writing every key of every bag cost 104 000
291
- // engine setProp calls where Solid's identical screen cost 12 000 — and 90 000 of them carried
292
- // `undefined`. A composed component's bag is a FIXED-SHAPE literal (Pressable's is ~48 keys,
293
- // most of them unset on any given instance), so the first push of a fresh node spends most of
294
- // its work deleting keys the node never had. Diffing per key removes exactly that: an unset key
295
- // is skipped on mount and still written the moment it changes to or from a real value.
290
+ // A composed component's bag is a FIXED-SHAPE literal, most keys unset on any given instance, so
291
+ // writing every key on the first push spends most of its work on keys the node never had.
292
+ // Diffing per key skips an unset one on mount and writes it only when it gains a real value.
296
293
  set symbioteHostProps(props: Record<string, unknown>) {
297
294
  const pushed = this.pushed;
298
295
  // Only keys the node actually carries, so the vanished-key sweep below walks a handful rather
@@ -62,17 +62,9 @@ function isRecord(value: unknown): value is Record<string, unknown> {
62
62
  return typeof value === 'object' && value !== null;
63
63
  }
64
64
 
65
- // RN's TWO TEXT DEFAULTS LEFT THIS RENDERER ENTIRELY ON 2026-09-18, in two steps a fortnight apart.
66
- // The SEED went first, to the payload builder — writing them as props cost a crossing every time an
67
- // app authored the same value (6 000 per 1 000-row create, `writesOfUnchanged`). What stayed was a
68
- // resolver for the clear-back path: a write of `undefined` looked up the default instead of clearing.
69
- //
70
- // That is gone too, and for the reason the seed was: `applyTextDefaults` (and its C++ twin) runs on
71
- // EVERY commit of every `RCTText`, so a cleared key is absent for exactly as long as it takes the
72
- // payload builder to supply the default again. The resolver was answering a question nothing asks.
73
- //
74
- // `PROP_ALIASES` (`id` -> `nativeID`) left this renderer on 2026-09-18 — `routeProp` resolves it
75
- // for every adapter now, so every path that can set a prop still reaches it.
65
+ // RN's two TEXT DEFAULTS and `PROP_ALIASES` (`id` -> `nativeID`) are NOT resolved here: text
66
+ // defaults run once per commit in `applyTextDefaults` (C++ twin included), and `routeProp` resolves
67
+ // aliases for every adapter — every path that can set a prop still reaches both.
76
68
  // Angular's two-way sugar `[(value)]` compiles to a `(valueChange)` binding; the engine knows the
77
69
  // same fold as the function prop `onValueChange`. See `listen()`. The two names live in a leaf
78
70
  // module so `elements.ts`'s ControlValueAccessor can name them without importing this cyclic file.
@@ -636,19 +628,9 @@ export class SymbioteRenderer implements Renderer2 {
636
628
  this.surface.requestCommit();
637
629
  }
638
630
 
639
- // FlatList/VirtualizedList cells are content projected into a component host (our
640
- // ANCHOR_HOST_COMPONENTS, e.g. ScrollView) — Angular's own addLViewToLContainer
641
- // (.vendors/angular node_manipulation.ts/container.ts) treats a null parent here as "defer —
642
- // the child component's own <ng-content>/ɵɵprojection will place this once its structure
643
- // resolves" (e.g. ScrollView's `@if(isHorizontal)` branch). Renderer2's contract types this
644
- // return as nullable for exactly that reason; returning `this.surface` as a non-null fallback
645
- // defeated that defer check and caused premature top-level insertion (2026-07: FlatList cells
646
- // rendered outside their ScrollView).
647
- //
648
- // Safe only because appendChild/insertBefore above now also treat a null parent as "skip, wait
649
- // for projection" — a second Angular call site (`insertAnchorNode`, hit whenever a directive
650
- // does `inject(ViewContainerRef)`, e.g. VListOutletDirective) forwards this null straight into
651
- // insertBefore without checking it; without that guard it crashed on-device.
631
+ // FlatList/VirtualizedList cells project into a component host (ANCHOR_HOST_COMPONENTS, e.g.
632
+ // ScrollView); Angular defers insertion on a null parent until projection resolves, so a
633
+ // non-null fallback here breaks that. appendChild/insertBefore/insertAnchorNode skip null too.
652
634
  parentNode(node: IHostNode): IHostElement | null {
653
635
  return parentOf(node) ?? null;
654
636
  }