@symbiote-native/components 1.0.0 → 3.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.
Files changed (110) hide show
  1. package/README.md +11 -13
  2. package/build/accessibility-props.d.ts +1 -1
  3. package/build/accessibility-props.js +2 -2
  4. package/build/behaviors/activity-indicator/index.android.d.ts +1 -0
  5. package/build/behaviors/activity-indicator/index.android.js +16 -0
  6. package/build/behaviors/activity-indicator/index.d.ts +3 -0
  7. package/build/behaviors/activity-indicator/index.ios.d.ts +1 -0
  8. package/build/behaviors/activity-indicator/index.ios.js +14 -0
  9. package/build/behaviors/activity-indicator/index.js +5 -0
  10. package/build/behaviors/activity-indicator/shared.d.ts +18 -0
  11. package/build/behaviors/activity-indicator/shared.js +120 -0
  12. package/build/behaviors/button.d.ts +13 -0
  13. package/build/behaviors/button.js +340 -0
  14. package/build/behaviors/image-background.d.ts +3 -0
  15. package/build/behaviors/image-background.js +155 -0
  16. package/build/behaviors/image.d.ts +1 -2
  17. package/build/behaviors/image.js +25 -106
  18. package/build/behaviors/input-accessory-view.d.ts +1 -2
  19. package/build/behaviors/input-accessory-view.js +49 -55
  20. package/build/behaviors/pressable.d.ts +59 -1
  21. package/build/behaviors/pressable.js +142 -96
  22. package/build/behaviors/refresh-control.d.ts +2 -0
  23. package/build/behaviors/refresh-control.js +96 -0
  24. package/build/behaviors/scroll-view/index.android.d.ts +1 -0
  25. package/build/behaviors/scroll-view/index.android.js +40 -0
  26. package/build/behaviors/scroll-view/index.d.ts +3 -0
  27. package/build/behaviors/scroll-view/index.ios.d.ts +1 -0
  28. package/build/behaviors/scroll-view/index.ios.js +10 -0
  29. package/build/behaviors/scroll-view/index.js +8 -0
  30. package/build/behaviors/scroll-view/responder.d.ts +4 -0
  31. package/build/behaviors/scroll-view/responder.js +202 -0
  32. package/build/behaviors/scroll-view/shared.d.ts +9 -0
  33. package/build/behaviors/scroll-view/shared.js +291 -0
  34. package/build/behaviors/scroll-view/sticky.d.ts +18 -0
  35. package/build/behaviors/scroll-view/sticky.js +581 -0
  36. package/build/behaviors/switch.d.ts +1 -1
  37. package/build/behaviors/switch.js +49 -88
  38. package/build/behaviors/text-input.d.ts +2 -2
  39. package/build/behaviors/text-input.js +244 -104
  40. package/build/behaviors/touchable-highlight.d.ts +9 -0
  41. package/build/behaviors/touchable-highlight.js +205 -0
  42. package/build/behaviors/touchable-native-feedback.d.ts +20 -0
  43. package/build/behaviors/touchable-native-feedback.js +254 -0
  44. package/build/behaviors/touchable-opacity.d.ts +12 -0
  45. package/build/behaviors/touchable-opacity.js +239 -0
  46. package/build/behaviors/touchable-without-feedback.d.ts +2 -0
  47. package/build/behaviors/touchable-without-feedback.js +231 -0
  48. package/build/component-names/index.android.js +31 -25
  49. package/build/component-names/index.ios.js +28 -23
  50. package/build/component-names/shared.d.ts +2 -1
  51. package/build/component-names/shared.js +16 -6
  52. package/build/descriptor.js +4 -4
  53. package/build/index.d.ts +26 -26
  54. package/build/index.js +56 -27
  55. package/build/register.d.ts +1 -0
  56. package/build/register.js +55 -0
  57. package/build/resolve-intrinsic.js +3 -9
  58. package/build/scroll-view-commands.d.ts +1 -5
  59. package/build/scroll-view-commands.js +23 -85
  60. package/build/state/flat-list.d.ts +2 -2
  61. package/build/state/flat-list.js +10 -2
  62. package/build/state/pressable.d.ts +6 -1
  63. package/build/state/pressable.js +63 -28
  64. package/build/state/section-list.d.ts +2 -0
  65. package/build/state/section-list.js +14 -7
  66. package/build/state/text-input.d.ts +10 -40
  67. package/build/state/text-input.js +17 -186
  68. package/build/state/touchable.d.ts +1 -0
  69. package/build/state/touchable.js +11 -8
  70. package/build/state/virtualized-list-reducer.d.ts +2 -2
  71. package/build/state/virtualized-list.d.ts +6 -6
  72. package/build/state/virtualized-list.js +71 -37
  73. package/build/text-props.d.ts +0 -8
  74. package/build/text-props.js +14 -25
  75. package/build/view/render-button.d.ts +11 -4
  76. package/build/view/render-button.js +74 -22
  77. package/build/view/render-image/index.d.ts +14 -1
  78. package/build/view/render-image/index.js +22 -147
  79. package/build/view/render-input-accessory-view.d.ts +1 -5
  80. package/build/view/render-input-accessory-view.js +26 -48
  81. package/build/view/render-keyboard-avoiding-view.d.ts +7 -1
  82. package/build/view/render-keyboard-avoiding-view.js +40 -1
  83. package/build/view/render-modal.d.ts +1 -1
  84. package/build/view/render-modal.js +18 -8
  85. package/build/view/render-pressable/index.d.ts +3 -0
  86. package/build/view/render-pressable/index.js +28 -0
  87. package/build/view/render-scroll-view.d.ts +1 -4
  88. package/build/view/render-scroll-view.js +17 -54
  89. package/build/view/render-switch.d.ts +4 -15
  90. package/build/view/render-switch.js +4 -42
  91. package/build/view/render-touchable-highlight.d.ts +1 -0
  92. package/build/view/render-touchable-native-feedback.d.ts +19 -1
  93. package/build/view/render-touchable-native-feedback.js +34 -9
  94. package/host-primitives.cjs +178 -280
  95. package/host-primitives.d.cts +0 -3
  96. package/package.json +8 -21
  97. package/build/fold-host-bag.d.ts +0 -15
  98. package/build/fold-host-bag.js +0 -99
  99. package/build/state-style.d.ts +0 -15
  100. package/build/state-style.js +0 -47
  101. package/build/view/render-activity-indicator.d.ts +0 -25
  102. package/build/view/render-activity-indicator.js +0 -88
  103. package/build/view/render-image-background.d.ts +0 -9
  104. package/build/view/render-image-background.js +0 -48
  105. package/build/view/render-text-input.d.ts +0 -11
  106. package/build/view/render-text-input.js +0 -39
  107. package/lowering-fixtures.cjs +0 -259
  108. package/lowering-fixtures.d.cts +0 -17
  109. package/specialize-state-style.cjs +0 -219
  110. package/specialize-state-style.d.cts +0 -15
@@ -1,36 +1,33 @@
1
- // The lowering SPEC — one description of which primitives compile to an intrinsic tag, what each
2
- // folds, and when a transform must refuse. Data only: no AST, no framework, no code to share.
1
+ // The PRIMITIVE SPEC — one description of which intrinsic tag each primitive is, what it folds,
2
+ // and which of its two Fabric views a prop selects. Data only: no AST, no framework, no code.
3
3
  //
4
- // WHY IT IS A `.cjs` AND NOT PART OF `src/`. Its consumers are Babel plugins and Metro
5
- // transformers (`adapters/vue/metro-vue-transformer.cjs`, `adapters/{vue,solid}/babel-lower-host-
6
- // primitives.cjs`), which run before any TS exists and cannot import from `src/`. That constraint
7
- // is why the map was copied per adapter in the first place — `adapters/vue/src/components.ts`
8
- // says so out loud: "keeps its own copy of this map (a .cjs cannot import from here)".
4
+ // WHY IT IS A `.cjs` AND NOT PART OF `src/`. Its consumers include build-tool files that run
5
+ // before any TS exists and cannot import from `src/` — `adapters/vue/intrinsic-tags.cjs`, which
6
+ // both Vue compilers read to answer element-vs-component. That constraint is why the map was
7
+ // copied per adapter in the first place.
9
8
  //
10
9
  // WHAT IT DOES NOT UNIFY, stated here so nobody hunts for a contradiction that is not one: this
11
- // says WHAT a fold is, never WHICH LAYER applies it. Svelte folds Text's defaults at compile time
12
- // because a lowered `symbiote-text` has no wrapper left to do it; Vue and Solid apply the same
13
- // fold at runtime in their renderers, where the wrapper used to. Both are correct.
10
+ // says WHAT a fold is, never WHICH LAYER applies it. Svelte folds Text's defaults in its DOM shim;
11
+ // Vue and Solid apply the same fold in their renderers. Both are correct.
14
12
  //
15
13
  // Four transforms carried their own copy of this before it existed, and it had already produced a
16
- // real behaviour split — see `aliases` below.
14
+ // real behaviour split — the `aliases` note below is what is left of it.
17
15
 
18
- // `intrinsicWhen` DECLARED AHEAD OF ITS FIRST ENTRY, like the refusal categories below it.
16
+ // `intrinsicWhen` DECLARED AHEAD OF ITS FIRST ENTRY.
19
17
  //
20
18
  // WHAT IT IS FOR. `TextInput` is the first primitive whose TAG depends on a prop: `multiline`
21
- // selects between two different Fabric views, `symbiote-text-input` and
22
- // `symbiote-text-input-multiline` (`src/view/render-text-input.ts:33`), not between two values of
23
- // one view. A transform prints a static tag, so it can resolve the choice only for a literal.
19
+ // selects between two different Fabric views, `text-input` and
20
+ // `text-input-multiline` (`src/view/render-text-input.ts:33`), not between two values of
21
+ // one view. `src/resolve-intrinsic.ts` reads it at element creation, where the value is known.
24
22
  //
25
23
  // ONE selector and ONE alternative, deliberately — not a map and not a list. There is exactly one
26
24
  // such prop in the whole surface, and a wider field would be invented rather than needed. Absent
27
25
  // `intrinsicWhen` means "one tag", so no existing entry changes.
28
26
  //
29
- // THE ACCEPTED STATIC FORMS ARE THREE, and the boundary is IDENTITY, not truthiness: a bare
30
- // attribute is `true`, an explicit boolean literal is itself, absence is `false`. Everything else
31
- // refuses — including a truthy non-boolean literal like `multiline={1}`, which a type-shaped check
32
- // would wave through. The spec types the selector as a boolean; guessing past that is exactly how a
33
- // silently wrong native view gets committed, and no later prop write can correct one.
27
+ // THE BOUNDARY IS IDENTITY, not truthiness: only `true` picks the alternative, and a truthy
28
+ // non-boolean like `multiline={1}` does not. The spec types the selector as a boolean; guessing
29
+ // past that commits the wrong native view, and no later prop write moves a node between views.
30
+ //
34
31
  // THE TYPEDEF BELOW IS NOT WHAT TYPESCRIPT READS. `host-primitives.d.cts` is a hand-written
35
32
  // declaration file, and a field added here and not there compiles fine in every `.cjs` transform
36
33
  // while failing `tsc` in the one consumer written in TypeScript — measured 2026-08-31, when
@@ -38,175 +35,166 @@
38
35
  // (vitest does not typecheck). The reverse is worse and silent: a field in the `.d.cts` and not
39
36
  // here typechecks everywhere and arrives `undefined` in all five transforms. Change both, together.
40
37
  /**
41
- * @typedef {{ op: 'nullish', value: unknown } | { op: 'notFalse' }} IFoldOp
42
38
  * @typedef {{ prop: string, intrinsic: string }} IIntrinsicWhen
43
- * @typedef {{ intrinsic: string, aliases: Record<string, string>, defaults: Record<string, IFoldOp>, intrinsicWhen?: IIntrinsicWhen }} IHostPrimitive
39
+ * @typedef {{ intrinsic: string, intrinsicWhen?: IIntrinsicWhen }} IHostPrimitive
44
40
  */
45
41
 
46
- // `id` is RN's W3C-named alias for `nativeID` and it WINS when both are set. Verified against RN
47
- // 0.86 rather than against our own adapters, because the three that implemented it disagreed:
48
- //
49
- // View.js:77-79 if (id !== undefined) processedProps.nativeID = id;
50
- // Text.js:222 const _nativeID = id ?? nativeID;
51
- //
52
- // Same outcome on both tags: `nativeID = id ?? nativeID`, and the raw `id` key must NOT reach
53
- // Fabric (no ViewConfig declares it, so it is silently dropped). What the adapters actually did:
54
- // Solid folded it on both tags, Svelte on View only (its `else` branch skips Text), and Vue on
55
- // neither — not in either transform, not in its renderer, not in `routeProp`. Vue's gap is OLDER
56
- // than lowering (its `View` wrapper was always a bare pass-through), so it is a standing
57
- // <adapters_reach_full_feature_parity> miss, not a lowering regression.
58
- //
59
- // WHICH LAYER APPLIES IT IS THE ADAPTER'S CHOICE, exactly as for `defaults` below. Solid and
60
- // Svelte rename at COMPILE time inside the lowering transform; Vue applies it at RUNTIME
61
- // (`PROP_ALIASES` in `adapters/vue/src/renderer/index.ts`, in `patchProp`) because Vue has FOUR
62
- // paths to a node — lowered SFC, lowered TSX, the component wrapper, and a hand-written
63
- // `h('symbiote-view', {id})` — and compile time only covers two of them. A transform reading this
64
- // spec must therefore not assume it owns the fold. Applying it at both layers happens to be
65
- // harmless here (the rename deletes `id`, so the second pass sees nothing), but that is a property
66
- // of THIS alias, not a licence.
67
- //
68
- // KNOWN DIVERGENCE FROM UPSTREAM, present in two adapters and not introduced by this file: when an
69
- // element carries BOTH `id` and `nativeID`, RN gives `id` unconditional priority, while a per-key
70
- // rename (Vue's runtime patchProp, Solid's compile-time rename producing two `nativeID`
71
- // attributes) lets the LAST one win. Honest parity needs per-node state; no example and no test
72
- // sets both today.
73
- const ID_ALIAS = { id: 'nativeID' };
42
+ // `aliases` LEFT THIS SPEC ON 2026-09-18, and what it held was one pair — `id` -> `nativeID` —
43
+ // repeated on all nineteen entries. It is `routeProp`'s now
44
+ // (`core/engine/cpp/tests/js/id-alias-coverage.itest.ts`), which reaches every node rather than
45
+ // every REGISTERED one, and resolves precedence the way upstream does instead of by write order.
74
46
 
75
47
  /** @type {Record<string, IHostPrimitive>} */
76
48
  const HOST_PRIMITIVES = {
77
49
  View: {
78
- intrinsic: 'symbiote-view',
79
- aliases: ID_ALIAS,
80
- defaults: {},
50
+ intrinsic: 'view',
81
51
  },
82
52
  // The five-way switch, thrown 2026-08-23 once all three transforms carried the refusals
83
- // (`observesState` below). `symbiote-pressable` resolves to the SAME `RCTView` a plain view does
53
+ // (`observesState` below). `pressable` resolves to the SAME `RCTView` a plain view does
84
54
  // — the tag exists only so the host-behavior registry, which is keyed by TAG and never by
85
55
  // resolved name, can find the press machine.
86
56
  //
87
- // No defaults, and only the `id` -> `nativeID` alias every primitive carries: a lowered Pressable
88
- // forwards its props otherwise untouched, and the machine reads them off `node.props` at event
89
- // time. (This read "No aliases and no defaults" while the line below already said `ID_ALIAS`, and
90
- // a Solid test injected a `Pressable` entry with `aliases: {}` on the strength of it.)
57
+ // No defaults: the tag forwards its props untouched, and the machine reads them off `node.props`
58
+ // at event time.
91
59
  Pressable: {
92
- intrinsic: 'symbiote-pressable',
93
- aliases: ID_ALIAS,
94
- defaults: {},
60
+ intrinsic: 'pressable',
95
61
  // Turns on `stateInTemplate` and `renderPropChild`. Without them a render-prop button becomes
96
62
  // a tag with no machine — the whole reason this entry landed last.
97
63
  observesState: true,
98
64
  },
65
+ // The three that were WITHHELD until their wrappers collapsed, landed 2026-09-11 now that none
66
+ // exists on any adapter. The condition the old note stated — "it lands when the wrappers collapse
67
+ // to a forwarder over the tag" — was met by deleting them outright.
68
+ //
69
+ // What the entry buys, since the tag and its behavior already worked without one: a hand-written
70
+ // `<scroll-view>` was resolving as a COMPONENT on Vue, because `adapters/vue/intrinsic-tags.cjs`
71
+ // derives its element set from this table and both Vue compilers read it. Missing here, the tag
72
+ // cost a dev-mode resolve warning per element plus the component codegen path — a slot closure
73
+ // instead of `_createElementBlock`.
74
+ TouchableOpacity: {
75
+ intrinsic: 'touchable-opacity',
76
+ },
77
+ TouchableHighlight: {
78
+ intrinsic: 'touchable-highlight',
79
+ },
80
+ // The second primitive whose TAG depends on a prop, and the first where the prop is one RN's own
81
+ // API takes (`<ScrollView horizontal>`): the axis is a SEPARATE native ViewManager, not a flag on
82
+ // one view (`behaviors/scroll-view/shared.ts:131`). So an app may write either spelling and
83
+ // `resolveIntrinsicTag` picks the view, which is also what puts `horizontal-scroll-view` into
84
+ // Vue's element set — a tag apps write directly and which would otherwise resolve as a component.
85
+ ScrollView: {
86
+ intrinsic: 'scroll-view',
87
+ intrinsicWhen: {
88
+ prop: 'horizontal',
89
+ intrinsic: 'horizontal-scroll-view',
90
+ },
91
+ },
99
92
  // Landed 2026-08-31, on the second attempt. The first threw the switch with the runtime half
100
93
  // unwired and was reverted the same hour; both gaps it exposed are closed here, and the record is
101
94
  // kept because the SEQUENCE is the reusable part — an entry here is a switch for four transforms
102
95
  // at once, so it goes in after every side is ready, never to prove the transforms work.
103
96
  //
104
- // 1. `registerTextInputBehavior()` is now called by `adapters/{vue,svelte,solid}/src/register.ts`,
105
- // the three that lower. React and Angular have no lowering transform, so no lowered node ever
106
- // exists there and neither carries a `register.ts` — the same reason they skip Pressable's.
107
- //
108
- // 2. The component path no longer shares these tags. It renders `symbiote-text-input-managed`
109
- // (`component-names/shared.ts`), because the registry is keyed by TAG and the wrappers run the
110
- // same machine in their own lifecycle — one shared tag would have installed both copies on a
111
- // wrapper-built node and fired `setInputFocused` twice per focus.
97
+ // `registerTextInputBehavior()` is called by every adapter's `src/register.ts`: the tag is the
98
+ // only path an app has, so the machine has exactly one owner per node.
112
99
  TextInput: {
113
- intrinsic: 'symbiote-text-input',
114
- aliases: ID_ALIAS,
115
- defaults: {},
100
+ intrinsic: 'text-input',
116
101
  // `multiline` picks between two SEPARATE native views, not one view with a flag, so the tag is
117
102
  // decided at compile time and a runtime selector must refuse — a wrong view here is
118
- // uncorrectable by any later prop write. `REFUSAL_CATEGORIES.dynamicIntrinsicChoice`.
103
+ // uncorrectable by any later prop write.
119
104
  intrinsicWhen: {
120
105
  prop: 'multiline',
121
- intrinsic: 'symbiote-text-input-multiline',
106
+ intrinsic: 'text-input-multiline',
122
107
  },
123
108
  },
124
109
  // Landed 2026-09-01, same order as TextInput and Image: runtime half built
125
- // (`core/components/src/behaviors/switch.ts`), registered by the four lowering adapters, proven
110
+ // (`core/components/src/behaviors/switch.ts`), registered by every adapter, proven
126
111
  // against the wrapper's payload (positive + negative controls, a break-tested async-timing case)
127
112
  // before this key existed.
128
113
  //
129
- // `-managed` twin, same reason as TextInput: the behavior carries a machine (mirrors the last
130
- // value native reported, sends a platform snap-back command on disagreement), so a wrapper-built
131
- // node — which already runs that same machine in its own lifecycle — must not also get the
132
- // engine's copy. `render-switch.ts` emits `symbiote-switch-managed`; this key's `intrinsic` is
133
- // the bare tag the behavior registry attaches to.
114
+ // The behavior carries a machine: it mirrors the last value native reported and sends a platform
115
+ // snap-back command on disagreement.
134
116
  //
135
- // IDEMPOTENCE OF THE FOLD IS MOOT HERE FOR A DIFFERENT REASON THAN IMAGE'S. Image's entry has no
136
- // `-managed` twin, so its fold genuinely CAN run twice (component then lowered, same tag), and
137
- // idempotence is what makes that safe — asserted, not assumed. Switch's fold is NOT trivial (it
138
- // maps `trackColor`/`thumbColor`/`ios_backgroundColor` to native prop names, keyed on
139
- // `Platform.OS`) and running it twice would NOT be a no-op — but the question never arises: the
140
- // `-managed` split means only the bare `symbiote-switch` tag ever carries this behavior, and the
141
- // wrapper never emits that tag, so no node's payload ever passes through this fold more than
142
- // once. Unreachable by construction, not idempotent by property — the same distinction
143
- // TextInput's own entry draws for its fold.
117
+ // ITS FOLD IS NOT IDEMPOTENT, and that is safe for a reason Image's entry does not share. Switch
118
+ // maps `trackColor`/`thumbColor`/`ios_backgroundColor` onto native prop names keyed on
119
+ // `Platform.OS`, so running it twice would NOT be a no-op — the question never arises because a
120
+ // payload reaches this fold once, on the one tag that carries the behavior. Unreachable by
121
+ // construction, not idempotent by property.
144
122
  //
145
123
  // No `observesState`: nothing in Switch's public surface is a function-valued style or a
146
124
  // render-prop child (`style?: IStyleProp<IViewStyle>`, never a callback), so neither
147
125
  // `stateInTemplate` nor `renderPropChild` applies — unlike Pressable, whose machine is what
148
126
  // forced that flag.
149
127
  Switch: {
150
- intrinsic: 'symbiote-switch',
151
- aliases: ID_ALIAS,
152
- defaults: {},
128
+ intrinsic: 'switch',
153
129
  },
130
+ // Filed as NOT LOWERABLE for a week under `.claude/rules/host-primitive-tier.md`'s "SECOND
131
+ // disqualifier" — its own node is a single element, but its POSITION is decided by the ScrollView
132
+ // and differs per platform (iOS a sibling before the content view, Android the scroll view's
133
+ // PARENT), and a per-node behavior cannot own a decision another component makes.
134
+ //
135
+ // That is settled and it was settled elsewhere: the ScrollView states the placement as DATA
136
+ // (`claimedChildren: { [REFRESH_CONTROL]: platform.claimMode }`, `behaviors/scroll-view/shared.ts`)
137
+ // and the ENGINE moves the node in `appendChild`. So the claim needs nothing from this primitive's
138
+ // own behavior — verified on a bare node with no wrapper anywhere, both platforms, in
139
+ // `behaviors/refresh-control.test.ts`.
140
+ //
141
+ // What the behavior owes is therefore only the CONTROLLED HANDSHAKE, and no fold at all: four of
142
+ // the five wrappers folded exactly `resolveAccessibilityProps`, which the engine already runs at
143
+ // `fabricProps` on every path — the same reason SafeAreaView has no behavior file.
144
+ //
145
+ // `id` is declared on all five wrappers, which it was not until 2026-09-01: upstream's
146
+ // RefreshControl spreads `...ViewProps` (RefreshControl.js:70), so its absence was a parity gap
147
+ // rather than a decision. The rename itself is the engine's.
148
+ RefreshControl: {
149
+ intrinsic: 'refresh-control',
150
+ // None. RN seeds nothing: `refreshing` is required, and every other prop is per-platform
151
+ // styling the native view defaults itself.
152
+ },
153
+ // `defaults` LEFT THIS SPEC ON 2026-09-18, and Text was the last entry that had any — RN's
154
+ // `ellipsizeMode ?? 'tail'` and `allowFontScaling !== false` (`Text.js:289,291`). The other
155
+ // eighteen entries had declared `{}` for months.
156
+ //
157
+ // It was the THIRD copy of that one rule. `applyTextDefaults` (`core/engine/src/fabric-props.ts`)
158
+ // and its C++ twin apply both to every node committing as `RCTText`, whoever authored it and
159
+ // whatever tag it carries — strictly WIDER than this table, which reached only a registered
160
+ // primitive. Proven redundant rather than argued: emptying it turned ZERO itests red, and the
161
+ // itests are the side that reads a real committed payload.
154
162
  Text: {
155
- intrinsic: 'symbiote-text',
156
- aliases: ID_ALIAS,
157
- // RN's Text.js applies both unconditionally on the non-virtual path. Each key below cites
158
- // the upstream line verbatim, because THIS DATA is now the thing that must not drift from RN.
159
- // The
160
- // authority on what they MEAN is `src/text-props.ts`'s resolveTextProps, which every wrapper
161
- // path already calls; this is the same fold expressed as data so a COMPILE-time transform can
162
- // emit it too. `notFalse`, never `nullish` — RN treats an explicit `undefined` like a missing
163
- // prop and only a literal `false` opts out. Emit both keys unconditionally: a fold whose two
164
- // branches emit different key sets is the hazard `.claude/rules/solid-descriptor-bridge.md` §1
165
- // exists for.
166
- defaults: {
167
- // Text.js:291 processedProps.ellipsizeMode = ellipsizeMode ?? 'tail';
168
- ellipsizeMode: { op: 'nullish', value: 'tail' },
169
- // Text.js:289 processedProps.allowFontScaling = allowFontScaling !== false;
170
- allowFontScaling: { op: 'notFalse' },
171
- },
163
+ intrinsic: 'text',
172
164
  },
173
165
  // FOLD-ONLY: the behavior registered for this tag carries a prop fold and nothing else — no
174
- // listeners, no commit hook, no per-node runtime (`core/components/src/behaviors/image.ts`). The
175
- // whole of the wrapper's body was prop mapping, so the lowered form owes exactly that.
166
+ // listeners, no commit hook, no per-node runtime (`core/components/src/behaviors/image.ts`).
176
167
  //
177
- // No `-managed` twin, unlike TextInput, and the reason is a measured PROPERTY rather than a
178
- // precedent: `mapImageProps` is idempotent, so registering the fold on the tag `renderImage`
179
- // already emits means a wrapper-built node simply folds a second time to no effect. Asserted in
180
- // `behaviors/image.test.ts`; break-tested. TextInput's split is NOT about idempotence (its fold
181
- // is idempotent too) — it is about one owner per node, because that behavior carries a machine.
168
+ // `mapImageProps` is idempotent, asserted in `behaviors/image.test.ts` and break-tested, so a bag
169
+ // that reaches the fold twice folds to no effect.
182
170
  //
183
- // Entered LAST, after the runtime half was built, registered by all four lowering adapters and
184
- // proven against the wrapper's payload. Adding this key is what makes every transform start
185
- // lowering `Image` at once, so a fold that had not landed would surface as a raw `src` reaching
186
- // Fabric — a key no ViewConfig declares, which throws nothing and paints nothing.
171
+ // The runtime half has to land before this key does: without the fold a raw `src` reaches Fabric,
172
+ // a key no ViewConfig declares, which throws nothing and paints nothing.
173
+ // THE ENTRY IS NOT OPTIONAL HERE, and the reason has nothing to do with folds: this table is what
174
+ // `adapters/vue/intrinsic-tags.cjs` derives element-vs-component from, and a hyphenated tag it
175
+ // does not name compiles to `resolveComponent("image-background")` — children become a slot the
176
+ // element path never reads, so the subtree renders BLANK with no error. `image`/`view`/`text` are
177
+ // real SVG element names and survive that gap; this one is not.
178
+ ImageBackground: {
179
+ intrinsic: 'image-background',
180
+ // None. The absolute-fill style, the box-dimension proxy and the Image mapping are all derived
181
+ // from live props at commit, which a compile-time seed cannot express.
182
+ },
187
183
  Image: {
188
- intrinsic: 'symbiote-image',
189
- aliases: ID_ALIAS,
184
+ intrinsic: 'image',
190
185
  // None. Every default RN's Image applies is already inside the shared mapping (the source
191
186
  // array shape, the width/height style fold, `alt` -> accessibilityLabel), which the behavior
192
187
  // runs at commit — so there is nothing left for a compile-time seed to do.
193
- defaults: {},
194
188
  },
195
- // Entered LAST, same order Image used: runtime half built, registered by the four lowering
196
- // adapters, and proven against the wrapper's payload before this key existed.
197
- //
198
189
  // The ONLY primitive so far whose intrinsic resolves to a different Fabric component per
199
190
  // platform — `RCTInputAccessoryView` on iOS, a plain `RCTView` on Android. The fold is
200
- // platform-invariant on purpose (it reproduces the wrapper's mapping on both, so the lowered and
201
- // wrapped paths cannot diverge per platform); what it does NOT do is repair what sits underneath,
202
- // where upstream RN renders nothing at all off iOS. That divergence predates the lowering, is
203
- // identical on both paths, and is with the owner as its own decision.
191
+ // platform-invariant on purpose; what it does NOT do is repair what sits underneath, where
192
+ // upstream RN renders nothing at all off iOS. That divergence is with the owner as its own
193
+ // decision.
204
194
  InputAccessoryView: {
205
- intrinsic: 'symbiote-input-accessory-view',
206
- aliases: ID_ALIAS,
195
+ intrinsic: 'input-accessory-view',
207
196
  // None. The mapping has no aliasing and no derived value — every consumed name leaves under the
208
197
  // same name — so there is nothing for a compile-time seed to do.
209
- defaults: {},
210
198
  },
211
199
  // The emptiest entry here, and deliberately so — the withholding protocol has nothing to protect
212
200
  // for this one. Every other primitive was held back until its runtime half existed and was proven
@@ -218,163 +206,73 @@ const HOST_PRIMITIVES = {
218
206
  //
219
207
  // Counted before writing, which is the only thing standing behind that claim: five
220
208
  // implementations, zero shared, none synthesizing a node — each renders ONE
221
- // `symbiote-safe-area-view` with children on its framework's own channel (React's third argument,
209
+ // `safe-area-view` with children on its framework's own channel (React's third argument,
222
210
  // a Vue slot, a Solid JSX child, Angular's `<ng-content>`, a Svelte snippet). That clears the
223
211
  // disqualifier in `.claude/rules/host-primitive-tier.md`.
224
- //
225
- // NO `ID_ALIAS`, and this is the one place SafeAreaView departs from every entry above it. The
226
- // alias exists to REPRODUCE a fold the wrapper performs; not one of the five SafeAreaView wrappers
227
- // folds `id`, and none declares it. Adding the alias here would make the lowered element fold a
228
- // prop its component spelling passes through untouched — a lowering that ADDS a capability, which
229
- // `.claude/rules/adapter-parity-audit.md` records as a bug in the same way as one that drops it.
230
- // That the five entries above all share `ID_ALIAS` is a property of those five primitives, not a
231
- // house style to copy: the sixth is where "every case so far did X" stops being a rule.
232
- //
233
- // The `id` surface gap itself is real and PRE-EXISTING — upstream's SafeAreaView takes `ViewProps`,
234
- // so RN accepts `id` where our wrappers do not. It predates lowering, is identical on both paths,
235
- // and closing it means adding `id` to five wrappers AND this alias together, never one of the two.
236
212
  SafeAreaView: {
237
- intrinsic: 'symbiote-safe-area-view',
238
- // ID_ALIAS was deliberately ABSENT here until 2026-09-01, because none of the five wrappers
239
- // declared `id` and aliasing on the lowered path alone would have made lowering ADD a fold the
240
- // component spelling does not perform. That exposed a real divergence — Solid's renderer folds
241
- // `id` from two string constants on the write path, so it aliased for a primitive whose spec
242
- // said not to (`adapters/solid/src/renderer-alias-fold.test.ts`, whose header predicted exactly
243
- // this the day a primitive stopped sharing the pair).
244
- //
245
- // Resolved by closing the gap rather than routing around it: `id` is now declared on all five
246
- // wrappers and folded here. That keeps Solid's constant-pair fast path (32 001 writes on a
247
- // benchmark create) and removes a real parity deficit — upstream's SafeAreaView takes the full
248
- // ViewProps surface, so RN accepts `id` where none of ours did. Half of this is not an option
249
- // in either direction: the alias without the prop folds a key nobody can pass, and the prop
250
- // without the alias sends a raw `id` to a view whose ViewConfig declares no such key.
251
- aliases: ID_ALIAS,
252
- defaults: {},
213
+ intrinsic: 'safe-area-view',
253
214
  },
254
- };
255
-
256
- // A transform must refuse — leave the element a component — whenever it hits one of these. The
257
- // categories are framework-independent; how each compiler DETECTS one is not, and stays in that
258
- // transform. Modelled on the Svelte preprocessor's set, which is the most developed of the three.
259
- //
260
- // Refusing is always safe: a refused element simply keeps today's behaviour. Guessing is not — a
261
- // half-read attribute set is a silently wrong render, on device only. Design every new category
262
- // around that asymmetry.
263
- // A stateful primitive carries `observesState: true`, and that flag is what turns the two refusal
264
- // categories below ON in a transform. Declared in one place so five transforms agree on the
265
- // spelling rather than inventing five.
266
- //
267
- // ADDING A STATEFUL ENTRY TO HOST_PRIMITIVES IS A FIVE-WAY SWITCH and must be the LAST step. Every
268
- // transform lowers whatever the spec lists, so an entry that lands before a transform can refuse
269
- // turns a render-prop button into a tag with no machine: a button that does not press, with nothing
270
- // red in any suite. `Pressable` was held back for exactly that and thrown only once all three
271
- // transforms carried the detections — verified by grep for `observesState` in
272
- // adapters/{solid,vue}/*.cjs and adapters/svelte/src/preprocessor/, not by asking.
273
- const REFUSAL_CATEGORIES = {
274
- // `{...spread}` / `v-bind="obj"` — the attribute set cannot be read whole.
275
- unreadableAttributeSet: 'an attribute set this transform cannot enumerate',
276
- // A computed or otherwise non-literal attribute KEY.
277
- unreadableKey: 'an attribute key this transform cannot resolve to a string',
278
- // A value shape the transform cannot reproduce in the lowered form.
279
- unreadableValue: 'an attribute value this transform cannot read whole',
280
- // `bind:` / `use:` / `{@attach}` / a template ref — binds the COMPONENT INSTANCE, which a
281
- // lowered element does not have.
282
- instanceBoundDirective:
283
- 'a directive that binds the component instance, not the host node',
284
- // RETIRED 2026-08-31 — `bagFold`, "an attribute whose fold needs to see its siblings (role,
285
- // aria-*)". Kept as a comment because the retirement carries two lessons the entry itself never
286
- // could.
287
- //
288
- // WHY IT IS GONE. The aria fold moved into the engine — `core/engine/src/accessibility-props.ts`,
289
- // called from `fabricProps`, the one point where the whole bag is known on BOTH commit paths — so
290
- // a lowered element gets it exactly like a wrapped one. The premise that a per-key element path
291
- // cannot fold a composite was right; the conclusion that a TRANSFORM had to refuse was not. The
292
- // fold belongs at the layer every path goes through, not at the one layer lowering removes.
215
+ // The one primitive that commits NO NODE: its intrinsic resolves to the engine's anchor, and the
216
+ // behavior (`src/behaviors/touchable-native-feedback.ts`) clones the owner's props onto the single
217
+ // child instead — RN's own shape (TouchableNativeFeedback.js:289,339). Entered in the same commit
218
+ // that deletes the five wrappers, because the registry is keyed by TAG: a wrapper still emitting
219
+ // its own `pressable` while the behavior is registered would put two press machines on one tree.
293
220
  //
294
- // AND IT WAS NEVER IN FORCE. Measured before removing it: of the four transforms, only Solid's
295
- // consulted this category. Vue's two lowered such elements happily and Svelte's preprocessor does
296
- // not contain the string `role` at all. So every lowered `aria-label` had been reaching Fabric as
297
- // a key no ViewConfig declares — the accessibility label silently dropped, on device only. This
298
- // constant is a VOCABULARY, not an enforcement point: writing a category down binds nobody, and
299
- // a transform that never consults it breaks nothing visible.
300
- //
301
- // What replaced it is a ROW, not a rule: `aria-bag-fold` in `lowering-fixtures.cjs`, verdict
302
- // `lower`, which every transform's runner must answer. Retiring or adding a category owes a row
303
- // there in the same change, or the prose goes unenforced again
304
- // (`.claude/rules/adapter-parity-audit.md`).
305
- // The two below exist for a STATEFUL primitive (Pressable) and nothing refuses on them yet.
306
- // They are declared ahead of the spec entry on purpose: the moment a stateful tag appears in
307
- // HOST_PRIMITIVES, every transform lowers it, and a transform that cannot yet refuse lowers a
308
- // render-prop button into a tag with no machine — a button that does not press, with nothing
309
- // red anywhere. So the spec entry goes in LAST, after all five can refuse, and the names live
310
- // here from the start so five detections do not invent five spellings of one rule.
311
- //
312
- // A functional `style` — `style={({pressed}) => …}`. The TEMPLATE reads the press state, which
313
- // is exactly what tier 2 cannot do: the state resolves below the framework, through the style
314
- // registry's `:active`, and never crosses back up. The migration target is a `:active` CSS rule,
315
- // not a smarter transform (`.claude/rules/host-primitive-tier.md`).
221
+ // No `defaults`: RN's TNF seeds nothing at all — every value it derives (`accessible`,
222
+ // `focusable`, `accessibilityState`, the ripple background) depends on ANOTHER prop or on a
223
+ // listener, which is a fold and not a default.
224
+ TouchableNativeFeedback: {
225
+ intrinsic: 'touchable-native-feedback',
226
+ },
227
+ // The SECOND primitive that commits no node, same anchor shape and same reason
228
+ // (TouchableWithoutFeedback.js:229,286). Its clone list is not TNF's: the passthrough half is
229
+ // copied only when SET (:281), there is no ripple, and `onBlur`/`onFocus` are cloned where TNF
230
+ // drops them — read `src/behaviors/touchable-without-feedback.ts`'s header rather than inheriting
231
+ // the neighbour's fold.
316
232
  //
317
- // DETECT IT AS AN ALLOW-LIST, NOT AS A HUNT FOR A FUNCTION LITERAL. All five transforms must land
318
- // the same side of this or they diverge on the one call site that hoists its style: `style={fn}`
319
- // is an Identifier at compile time and no transform can tell whether it holds an object or a
320
- // function. So only provably inert value shapes lower — object / array / literal / template
321
- // literal — and everything else refuses. The asymmetry is what settles it: a refused element
322
- // keeps exactly today's behaviour, while a wrongly lowered one is a button that renders and does
323
- // not respond.
324
- stateInTemplate: 'a prop whose value is not provably inert at compile time',
325
- // NOT A REFUSAL — kept as a named requirement because it was briefly written as one, and the
326
- // difference is worth the paragraph.
233
+ // Upstream's passthrough loop lets an explicit `nativeID` win over `id` here (:280-284, unlike
234
+ // TNF's :373); NOT reproduced — the engine resolves that precedence once, on the way in, and a
235
+ // per-primitive exception to it would be invisible from anywhere the app can see. No `defaults`:
236
+ // every value TWF derives depends on another prop or on a listener, which is a fold and not a
237
+ // default.
238
+ TouchableWithoutFeedback: {
239
+ intrinsic: 'touchable-without-feedback',
240
+ },
241
+ // RN's Button is a touchable wrapping a View wrapping a Text and takes NO children — `title` is a
242
+ // string prop (Button.js:363-388) — so the behavior owns the whole subtree and the tag is the
243
+ // only spelling. Entered in the same commit that deletes the five wrappers: the registry is keyed
244
+ // by TAG, and a wrapper still building its own View/Text under a registered `button` would give
245
+ // every existing Button a second copy of the subtree.
327
246
  //
328
- // The resting/pressed pair needs the style callback invoked twice. A transform that emits the
329
- // guard INLINE — `typeof f === 'function' ? f({pressed:false}) : f` — puts the expression in its
330
- // own output three times, so `style={getStyle()}` calls the author's function three times,
331
- // `style={bag[i]}` evaluates the index three times, and `style={flag ? a : b}` can take
332
- // different branches on different reads. Faced with that, the first instinct is to refuse those
333
- // shapes.
247
+ // `id` used to be PLATFORM-DEPENDENT here, and the record is worth keeping because it is what a
248
+ // per-primitive rename costs. Button's touchable is swapped by platform (Button.js:281-284), only
249
+ // the iOS arm renamed `id` itself, and with no entry in this table the committed payload read:
334
250
  //
335
- // THAT IS THE WRONG FIX, and encoding it in this file would have made one transform's emission
336
- // defect a law binding the others. The double read is a property of the EMISSION SHAPE, not of
337
- // the expression: wrap once — `resolveStateStyle(expr)` — and the expression is evaluated
338
- // exactly once while its RESULT is what gets called twice. All three shapes above then lower and
339
- // stay correct.
251
+ // iOS nativeID: 'from-id' id: absent the touchable-opacity fold
252
+ // Android nativeID: undefined id: 'from-id' a key no ViewConfig declares -> dropped
340
253
  //
341
- // So the rule for every transform is: **emit the style expression exactly once**, and assert it
342
- // on the output text (`occurrences(out, expr) === 1`) rather than trusting the shape. What
343
- // survives as a real contract is only that the callback must be PURE in `pressed` — its result is
344
- // invoked twice under any emission.
254
+ // A rename that runs once, for every node, on the way in cannot produce that shape at all.
345
255
  //
346
- // Caught by the Svelte session after this had been written here as a refusal and sent to two
347
- // adapters; the Vue session found the underlying double-read in the first place.
348
- emitStyleExpressionOnce:
349
- 'REQUIREMENT, not a refusal: wrap the style expression once, never repeat it in the output',
350
- // A function child with arity >= 1 — `{({pressed}) => …}`. Same rule, through children rather
351
- // than props. Arity ZERO is an ordinary lazy child, not a render prop, and must NOT refuse.
352
- renderPropChild:
353
- 'a function child that takes the primitive own state as an argument',
354
- // DECLARED AHEAD OF ITS SPEC ENTRY, the same way the two above were, and for the same reason: the
355
- // moment `TextInput` appears in HOST_PRIMITIVES every transform lowers it at once, and one that
356
- // cannot yet refuse would pick the WRONG Fabric view. Four detections written against a name that
357
- // already exists cannot invent four spellings of one rule.
256
+ // No `defaults`: every value RN's Button seeds is derived from another prop or from a listener
257
+ // (`accessible`, `focusable`, the greyed label, the uppercased title), which is a fold, not a
258
+ // default.
259
+ Button: {
260
+ intrinsic: 'button',
261
+ },
262
+ // RN wraps the native spinner in a centering `<View>` (ActivityIndicator.js:112), so this tag is
263
+ // that View and the behavior builds `activity-indicator-spinner` under it. Entered in the same
264
+ // commit that deletes the five wrappers: the registry is keyed by TAG, and a wrapper still
265
+ // painting its own spinner while the behavior is registered would give every indicator two.
358
266
  //
359
- // `multiline` is the first prop in this project that selects between TWO intrinsics —
360
- // `symbiote-text-input` and `symbiote-text-input-multiline` are different Fabric views, not one
361
- // view with a flag (`core/components/src/view/render-text-input.ts`). A transform prints a static
362
- // tag name, so it can resolve `multiline` only when the value is a literal. `multiline={isLong}`
363
- // is a RUNTIME value and there is no tag to print — the element must stay a component.
267
+ // `id` renames on the OWNER, before `slotPropsExcept` routes the survivor down — so the key that
268
+ // reaches the spinner is `nativeID`, which is where RN's `...restProps` puts it too
269
+ // (ActivityIndicator.js:99).
364
270
  //
365
- // NOT the same hazard as an unreadable attribute VALUE. A value the transform cannot read is a
366
- // prop that ends up wrong; this one ends up committing the wrong native view, which no prop write
367
- // can correct afterwards. Refusing keeps today's behaviour exactly.
368
- dynamicIntrinsicChoice:
369
- 'a prop that selects between two intrinsics and is not a compile-time literal',
271
+ // No `defaults`: `animating` and `hidesWhenStopped` ARE `notFalse` folds, but they belong to the
272
+ // SPINNER, and this table's ops are applied to the tag's own bag before any slot routing. They
273
+ // live in the behavior's spinner fold instead, which is the only layer that can see that node.
274
+ ActivityIndicator: {
275
+ intrinsic: 'activity-indicator',
276
+ },
370
277
  };
371
-
372
- // Lowering rewrites `class="x"` into an opaque bag expression, so any pass that matches on literal
373
- // attributes can no longer see it. Reversed against Svelte's style scoper, every scoped class
374
- // silently stopped being scoped — nothing threw, the styles just stopped applying on device. The
375
- // hazard belongs to any transform that folds attributes into an expression, not to Svelte, so it
376
- // is stated once here as an ordering contract.
377
- const LOWERING_RUNS_LAST =
378
- 'lowering is the LAST attribute-rewriting pass in its pipeline';
379
-
380
- module.exports = { HOST_PRIMITIVES, REFUSAL_CATEGORIES, LOWERING_RUNS_LAST };
278
+ module.exports = { HOST_PRIMITIVES };
@@ -6,7 +6,6 @@ export type IFoldOp = { op: 'nullish'; value: unknown } | { op: 'notFalse' };
6
6
 
7
7
  export interface IHostPrimitive {
8
8
  intrinsic: string;
9
- aliases: Readonly<Record<string, string>>;
10
9
  defaults: Readonly<Record<string, IFoldOp>>;
11
10
  /**
12
11
  * The primitive's own state is observable from the TEMPLATE, so a call site that reads it
@@ -31,5 +30,3 @@ export interface IHostPrimitive {
31
30
  }
32
31
 
33
32
  export declare const HOST_PRIMITIVES: Readonly<Record<string, IHostPrimitive>>;
34
- export declare const REFUSAL_CATEGORIES: Readonly<Record<string, string>>;
35
- export declare const LOWERING_RUNS_LAST: string;