@symbiote-native/vue 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 (114) hide show
  1. package/README.md +13 -12
  2. package/babel-jsx.cjs +26 -18
  3. package/build/components/activity-indicator-props.d.ts +5 -0
  4. package/build/components/activity-indicator-props.js +1 -0
  5. package/build/components/button-props.d.ts +5 -0
  6. package/build/components/button-props.js +1 -0
  7. package/build/components/flat-list/index.d.ts +3 -3
  8. package/build/components/flat-list/index.js +3 -3
  9. package/build/components/image-background-props.d.ts +7 -0
  10. package/build/components/image-background-props.js +1 -0
  11. package/build/components/image-props.d.ts +5 -0
  12. package/build/components/image-props.js +5 -0
  13. package/build/components/{input-accessory-view.d.ts → input-accessory-view-props.d.ts} +1 -3
  14. package/build/components/input-accessory-view-props.js +5 -0
  15. package/build/components/keyboard-avoiding-view.js +9 -5
  16. package/build/components/modal/index.js +1 -1
  17. package/build/components/pressable-props.d.ts +31 -0
  18. package/build/components/pressable-props.js +12 -0
  19. package/build/components/refresh-control-props.d.ts +16 -0
  20. package/build/components/refresh-control-props.js +9 -0
  21. package/build/components/safe-area-view-props.d.ts +6 -0
  22. package/build/components/safe-area-view-props.js +5 -0
  23. package/build/components/scroll-view/{shared.d.ts → scroll-view-props.d.ts} +4 -27
  24. package/build/components/scroll-view/scroll-view-props.js +1 -0
  25. package/build/components/section-list/index.d.ts +3 -3
  26. package/build/components/switch/switch-props.d.ts +6 -0
  27. package/build/components/switch/switch-props.js +1 -0
  28. package/build/components/text-input/text-input-props.d.ts +5 -0
  29. package/build/components/text-input/text-input-props.js +1 -0
  30. package/build/components/text-props.d.ts +24 -0
  31. package/build/components/text-props.js +6 -0
  32. package/build/components/touchable-native-feedback-props.d.ts +7 -0
  33. package/build/components/touchable-native-feedback-props.js +1 -0
  34. package/build/components/touchable-props.d.ts +17 -0
  35. package/build/components/touchable-props.js +1 -0
  36. package/build/components/touchable-without-feedback-props.d.ts +5 -0
  37. package/build/components/touchable-without-feedback-props.js +1 -0
  38. package/build/components/view-props.d.ts +29 -0
  39. package/build/components/view-props.js +5 -0
  40. package/build/components/virtualized-list/index.d.ts +3 -3
  41. package/build/components/virtualized-list/index.js +64 -46
  42. package/build/components/virtualized-section-list/index.d.ts +3 -3
  43. package/build/descriptor-to-vue.js +2 -2
  44. package/build/host-instance/index.js +2 -2
  45. package/build/index.d.ts +24 -27
  46. package/build/index.js +31 -16
  47. package/build/intrinsic-elements.d.ts +19 -0
  48. package/build/intrinsic-elements.js +1 -0
  49. package/build/jsx-runtime.d.ts +67 -0
  50. package/build/jsx-runtime.js +1 -0
  51. package/build/modules/animated/index.d.ts +41 -20
  52. package/build/modules/animated/index.js +20 -19
  53. package/build/modules/image/index.d.ts +3 -0
  54. package/build/modules/image/index.js +13 -0
  55. package/build/register.d.ts +1 -1
  56. package/build/register.js +13 -33
  57. package/build/renderer/index.js +108 -54
  58. package/build/runtime-helpers/index.d.ts +10 -1
  59. package/build/runtime-helpers/index.js +56 -22
  60. package/build/utils/normalize-attrs.js +3 -3
  61. package/intrinsic-tags.cjs +52 -0
  62. package/metro-vue-transformer.cjs +55 -345
  63. package/package.json +13 -9
  64. package/babel-lower-host-primitives.cjs +0 -225
  65. package/build/components/activity-indicator/index.android.d.ts +0 -4
  66. package/build/components/activity-indicator/index.android.js +0 -10
  67. package/build/components/activity-indicator/index.d.ts +0 -1
  68. package/build/components/activity-indicator/index.ios.d.ts +0 -4
  69. package/build/components/activity-indicator/index.ios.js +0 -10
  70. package/build/components/activity-indicator/index.js +0 -4
  71. package/build/components/activity-indicator/shared.d.ts +0 -8
  72. package/build/components/activity-indicator/shared.js +0 -48
  73. package/build/components/button.d.ts +0 -14
  74. package/build/components/button.js +0 -61
  75. package/build/components/image-background.d.ts +0 -9
  76. package/build/components/image-background.js +0 -103
  77. package/build/components/image.d.ts +0 -9
  78. package/build/components/image.js +0 -90
  79. package/build/components/input-accessory-view.js +0 -41
  80. package/build/components/pressable.d.ts +0 -58
  81. package/build/components/pressable.js +0 -233
  82. package/build/components/refresh-control.d.ts +0 -20
  83. package/build/components/refresh-control.js +0 -47
  84. package/build/components/safe-area-view.d.ts +0 -9
  85. package/build/components/safe-area-view.js +0 -33
  86. package/build/components/scroll-view/index.android.d.ts +0 -4
  87. package/build/components/scroll-view/index.android.js +0 -64
  88. package/build/components/scroll-view/index.d.ts +0 -1
  89. package/build/components/scroll-view/index.ios.d.ts +0 -4
  90. package/build/components/scroll-view/index.ios.js +0 -17
  91. package/build/components/scroll-view/index.js +0 -4
  92. package/build/components/scroll-view/shared.js +0 -271
  93. package/build/components/scroll-view/sticky-header.d.ts +0 -7
  94. package/build/components/scroll-view/sticky-header.js +0 -208
  95. package/build/components/switch/index.android.d.ts +0 -12
  96. package/build/components/switch/index.android.js +0 -13
  97. package/build/components/switch/index.d.ts +0 -2
  98. package/build/components/switch/index.ios.d.ts +0 -12
  99. package/build/components/switch/index.ios.js +0 -11
  100. package/build/components/switch/index.js +0 -5
  101. package/build/components/switch/shared.d.ts +0 -23
  102. package/build/components/switch/shared.js +0 -126
  103. package/build/components/text-input/index.d.ts +0 -24
  104. package/build/components/text-input/index.js +0 -260
  105. package/build/components/touchable-native-feedback.d.ts +0 -24
  106. package/build/components/touchable-native-feedback.js +0 -82
  107. package/build/components/touchable.d.ts +0 -50
  108. package/build/components/touchable.js +0 -281
  109. package/build/components.d.ts +0 -53
  110. package/build/components.js +0 -45
  111. package/build/composables/use-raw-attrs.d.ts +0 -1
  112. package/build/composables/use-raw-attrs.js +0 -26
  113. package/build/state-style.d.ts +0 -1
  114. package/build/state-style.js +0 -13
package/README.md CHANGED
@@ -27,8 +27,8 @@ npm install @symbiote-native/vue react-native vue
27
27
  `react-native` and `vue` stay your app's own top-level dependencies — this package only replaces
28
28
  the JS renderer that drives them. **TSX** needs nothing beyond the install above; **SFC**
29
29
  additionally needs a Metro transformer for `.vue` files (see
30
- [`examples/vue-sfc`](../../examples/vue-sfc)'s `metro.config.js`), since there's no
31
- `create-symbiote` scaffolder yet to wire it for you.
30
+ [`examples/vue-sfc`](../../examples/vue-sfc)'s `metro.config.js`) — `npx @symbiote-native/cli new`
31
+ wires this for a new app; an existing app still needs it copied in by hand.
32
32
 
33
33
  ---
34
34
 
@@ -66,23 +66,23 @@ RNAppRegistry.registerRunnable(appName, ({ rootTag }) => {
66
66
  });
67
67
  ```
68
68
 
69
- The app is ordinary Vue — it just imports primitives from `@symbiote-native/vue` instead of
70
- `react-native`. A tap→increment counter, authored in TSX:
69
+ The app is ordinary Vue. The primitives are TAGS — `<view>`, `<text>`, `<pressable>` — so there is
70
+ nothing to import for them at all; both Vue compilers resolve them as elements and the renderer
71
+ maps each to its Fabric view. A tap→increment counter, authored in TSX:
71
72
 
72
73
  ```jsx
73
74
  import { ref } from '@vue/runtime-core';
74
- import { View, Text, Pressable } from '@symbiote-native/vue';
75
75
 
76
76
  export default {
77
77
  setup() {
78
78
  const count = ref(0);
79
79
  return () => (
80
- <View style={{ padding: 24 }}>
81
- <Text>Taps: {count.value}</Text>
82
- <Pressable onPress={() => count.value++}>
83
- <Text>Tap me</Text>
84
- </Pressable>
85
- </View>
80
+ <view style={{ padding: 24 }}>
81
+ <text>Taps: {count.value}</text>
82
+ <pressable onPress={() => count.value++}>
83
+ <text>Tap me</text>
84
+ </pressable>
85
+ </view>
86
86
  );
87
87
  },
88
88
  };
@@ -102,7 +102,8 @@ the demo above is the first one running on the iOS simulator:
102
102
  ## Parity — and the one gap
103
103
 
104
104
  Both adapters reach the same primitives, runtime modules, `Animated` on both drivers, gestures,
105
- accessibility, and the `VirtualizedList` family. That parity is **structural, not hand-copied**: the
105
+ accessibility, and the `VirtualizedList` family, verified on-device on iOS and Android. That
106
+ parity is **structural, not hand-copied**: the
106
107
  component logic (state machines + render functions) is written **once** in `@symbiote-native/components`,
107
108
  and each adapter supplies only its lifecycle (Vue's `ref`/`watch` + the descriptor→`h()` bridge).
108
109
 
package/babel-jsx.cjs CHANGED
@@ -11,38 +11,46 @@
11
11
  // so it has to stay in the app's plugins array, where the app also controls its position relative
12
12
  // to its own plugins. A preset would move it after every plugin and silently change that order.
13
13
  //
14
- // The two entries are handed out together because either alone is broken:
15
- //
16
- // lowering only -> `symbiote-view` compiles to resolveComponent("symbiote-view"), a
17
- // component that resolves to nothing, with SLOT children an element path
18
- // never mounts. Blank subtree, no error.
19
- // isCustomElement only -> nothing was rewritten, so <View> is still a Vue component and the whole
20
- // point (one component instance per node on ~73% of the tree) is unpaid.
21
- //
22
- // Same "both halves or nothing" invariant the SFC path states in metro-vue-transformer.cjs, and the
23
- // reason it is expressed as one require() here rather than two lines of documentation.
14
+ // `isCustomElement` is the load-bearing option: without it `<view>` compiles to
15
+ // `resolveComponent("view")`, a component that resolves to nothing, with SLOT children an element
16
+ // path never mounts. Blank subtree, no error.
24
17
  //
25
18
  // @vue/babel-plugin-jsx is OUR dependency and require() resolves relative to this file, so the app
26
19
  // declares no extra devDependency — same reasoning as ./metro-css-parser.cjs.
27
-
20
+ //
21
+ // `optimize: true` defaults ON, an app may override it. The plugin's own README calls it
22
+ // experimental ("the optimized code may skip certain re-renders... we strongly recommend thorough
23
+ // testing") because it generates PatchFlags/dynamicProps from JSX's syntax alone, without the
24
+ // template compiler's data-flow analysis. `.vue` SFCs get the equivalent from `@vue/compiler-sfc`
25
+ // unconditionally already (`metro-vue-transformer.cjs`) — this closes the same gap for TSX, which
26
+ // had none. `vue-row-component-shape-cost.itest.ts` measured why it matters: a stateful component
27
+ // re-render pays for `hasPropsChanged`'s full `Object.keys(nextProps)` walk on every patch, even
28
+ // when nothing changed; a patchFlag lets Vue check only the flagged dynamic keys instead.
29
+ // Correctness (a changed prop still recommits, a conditional branch still flips, a keyed list still
30
+ // reorders, and — the shape that actually matters here — a child COMPONENT still re-renders when a
31
+ // nested prop field changes) is pinned in `optimize-flag-safety.test.ts`, including the exact
32
+ // stateful-row shape the itest above measures; that file also confirms a measurable, reproducible
33
+ // JS-side speedup on the identical partial-relabel pattern. NOT verified on-device/Hermes — only
34
+ // headless, through this adapter's real renderer.
28
35
  const vueJsx = require('@vue/babel-plugin-jsx');
29
- const lowerHostPrimitives = require('./babel-lower-host-primitives.cjs');
30
36
 
31
- // Every `symbiote-*` tag is an intrinsic the renderer resolves through descriptorFor, never a Vue
32
- // component — including one an app writes by hand, which is why this is a prefix test rather than a
33
- // list of the two tags the lowering emits.
34
- const SYMBIOTE_TAG_PREFIX = 'symbiote-';
37
+ // An intrinsic the renderer resolves through descriptorFor, never a Vue component — including one
38
+ // an app writes by hand. A CLOSED set and not a prefix or shape test: an app's own kebab-case
39
+ // component looks identical to ours since the `symbiote-` marker was dropped, and answering true
40
+ // for it would stop resolving it with nothing red.
41
+ const INTRINSIC_TAGS = require('./intrinsic-tags.cjs');
35
42
 
36
43
  function isSymbioteIntrinsic(tag) {
37
- return tag.startsWith(SYMBIOTE_TAG_PREFIX);
44
+ return INTRINSIC_TAGS.has(tag);
38
45
  }
39
46
 
40
47
  module.exports = function symbioteVueJsx(options = {}) {
41
48
  return [
42
- lowerHostPrimitives,
43
49
  [
44
50
  vueJsx,
45
51
  {
52
+ // A default an app may override — see the file-level comment above for what backs it.
53
+ optimize: true,
46
54
  ...options,
47
55
  // Last, deliberately: an app may pass other @vue/babel-plugin-jsx options through, but
48
56
  // overriding this one silently produces output this adapter cannot render.
@@ -0,0 +1,5 @@
1
+ import type { IActivityIndicatorProps as IActivityIndicatorBaseProps } from '@symbiote-native/components';
2
+ import type { IClassNameValue } from '@symbiote-native/engine';
3
+ export type IActivityIndicatorProps = IActivityIndicatorBaseProps & {
4
+ class?: IClassNameValue;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { IClassNameValue } from '@symbiote-native/engine';
2
+ import type { IButtonProps as ICoreButtonProps } from '@symbiote-native/components';
3
+ export type IButtonProps = ICoreButtonProps & {
4
+ class?: IClassNameValue;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -37,7 +37,6 @@ export type IFlatListEmits<ItemT> = {
37
37
  }) => void;
38
38
  };
39
39
  export declare const FlatList: new <ItemT>(props: (IFlatListProps<ItemT> & ({} | {
40
- onRefresh?: (() => any) | undefined;
41
40
  onViewableItemsChanged?: ((info: IViewableItemsChangedInfo<ItemT>) => any) | undefined;
42
41
  onEndReached?: ((info: {
43
42
  distanceFromEnd: number;
@@ -45,13 +44,13 @@ export declare const FlatList: new <ItemT>(props: (IFlatListProps<ItemT> & ({} |
45
44
  onStartReached?: ((info: {
46
45
  distanceFromStart: number;
47
46
  }) => any) | undefined;
47
+ onRefresh?: (() => any) | undefined;
48
48
  onScrollToIndexFailed?: ((info: {
49
49
  index: number;
50
50
  highestMeasuredFrameIndex: number;
51
51
  averageItemLength: number;
52
52
  }) => any) | undefined;
53
53
  })) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<IFlatListProps<ItemT> & ({} | {
54
- onRefresh?: (() => any) | undefined;
55
54
  onViewableItemsChanged?: ((info: IViewableItemsChangedInfo<ItemT>) => any) | undefined;
56
55
  onEndReached?: ((info: {
57
56
  distanceFromEnd: number;
@@ -59,6 +58,7 @@ export declare const FlatList: new <ItemT>(props: (IFlatListProps<ItemT> & ({} |
59
58
  onStartReached?: ((info: {
60
59
  distanceFromStart: number;
61
60
  }) => any) | undefined;
61
+ onRefresh?: (() => any) | undefined;
62
62
  onScrollToIndexFailed?: ((info: {
63
63
  index: number;
64
64
  highestMeasuredFrameIndex: number;
@@ -72,7 +72,6 @@ export declare const FlatList: new <ItemT>(props: (IFlatListProps<ItemT> & ({} |
72
72
  M: {};
73
73
  Defaults: {};
74
74
  }, (IFlatListProps<ItemT> & {}) | (IFlatListProps<ItemT> & {
75
- onRefresh?: (() => any) | undefined;
76
75
  onViewableItemsChanged?: ((info: IViewableItemsChangedInfo<ItemT>) => any) | undefined;
77
76
  onEndReached?: ((info: {
78
77
  distanceFromEnd: number;
@@ -80,6 +79,7 @@ export declare const FlatList: new <ItemT>(props: (IFlatListProps<ItemT> & ({} |
80
79
  onStartReached?: ((info: {
81
80
  distanceFromStart: number;
82
81
  }) => any) | undefined;
82
+ onRefresh?: (() => any) | undefined;
83
83
  onScrollToIndexFailed?: ((info: {
84
84
  index: number;
85
85
  highestMeasuredFrameIndex: number;
@@ -133,11 +133,11 @@ export const FlatList = defineComponent((props, { attrs, expose, emit, slots, })
133
133
  const key = keyExtractor ? keyExtractor(item, index) : String(index);
134
134
  // The row IS the virtualized cell, so every item in it shares the row's separators
135
135
  // handle (the divider sits between rows, not columns), like RN's multi-column FlatList.
136
- return h('symbiote-view', { key, style: { flex: 1 } }, slots.item !== undefined
136
+ return h('view', { key, style: { flex: 1 } }, slots.item !== undefined
137
137
  ? slots.item({ item, index, separators: info.separators })
138
138
  : []);
139
139
  });
140
- return [h('symbiote-view', { style: rowStyle }, cells)];
140
+ return [h('view', { style: rowStyle }, cells)];
141
141
  };
142
142
  // Viewability over rows expands back to per-item tokens so the caller sees item-level
143
143
  // visibility, not row-level (shared expandRowViewability).
@@ -165,7 +165,7 @@ export const FlatList = defineComponent((props, { attrs, expose, emit, slots, })
165
165
  data: rows,
166
166
  getItem: (_source, index) => rows[index],
167
167
  getItemCount: () => rows.length,
168
- keyExtractor: rowKeyExtractor,
168
+ keyExtractor: (row) => rowKeyExtractor(row, keyExtractor),
169
169
  onEndReached: endReached,
170
170
  onStartReached: startReached,
171
171
  onRefresh: refresh,
@@ -0,0 +1,7 @@
1
+ import type { IImageProps } from '@symbiote-native/components';
2
+ import type { IClassNameValue, IStyleProp, IViewStyle } from '@symbiote-native/engine';
3
+ export interface IImageBackgroundProps extends Omit<IImageProps, 'style'> {
4
+ style?: IStyleProp<IViewStyle>;
5
+ imageStyle?: IStyleProp<IViewStyle> | string;
6
+ class?: IClassNameValue;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { IImageProps as IImageBaseProps } from '@symbiote-native/components';
2
+ import type { IClassNameValue } from '@symbiote-native/engine';
3
+ export type IImageProps = IImageBaseProps & {
4
+ class?: IClassNameValue;
5
+ };
@@ -0,0 +1,5 @@
1
+ // The `<image>` tag's prop surface. The wrapper is gone: the whole source/src/srcSet resolution,
2
+ // the width/height -> style fold and `alt` -> accessibility now run in `registerImageBehavior`, on
3
+ // the tag itself. The Image STATICS moved to `modules/image` — an imperative API with no view,
4
+ // which living beside a component made read as one.
5
+ export {};
@@ -1,5 +1,4 @@
1
- import { type FunctionalComponent } from '@vue/runtime-core';
2
- import { type IAccessibilityProps, type IAriaProps } from '@symbiote-native/components';
1
+ import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
3
2
  import type { IClassNameValue, IStyleProp, IViewStyle } from '@symbiote-native/engine';
4
3
  export interface IInputAccessoryViewProps extends IAccessibilityProps, IAriaProps {
5
4
  nativeID?: string;
@@ -7,4 +6,3 @@ export interface IInputAccessoryViewProps extends IAccessibilityProps, IAriaProp
7
6
  style?: IStyleProp<IViewStyle>;
8
7
  class?: IClassNameValue;
9
8
  }
10
- export declare const InputAccessoryView: FunctionalComponent<{}, {}, any, {}>;
@@ -0,0 +1,5 @@
1
+ // The `<input-accessory-view>` tag's prop surface. The wrapper is gone: it narrowed attrs, called
2
+ // `renderInputAccessoryView` and nested the slot children under the host — and that fold is now
3
+ // `registerInputAccessoryViewBehavior`'s, running on the tag itself. The prop type stays, for a
4
+ // component forwarding a bag.
5
+ export {};
@@ -9,7 +9,7 @@
9
9
  // rawAttrs runs through normalizeVueAttrs so a template `:keyboard-vertical-offset` resolves.
10
10
  import { defineComponent, h, ref, onMounted, onUnmounted, } from '@vue/runtime-core';
11
11
  import { Keyboard, Platform, dlog, } from '@symbiote-native/engine';
12
- import { computeInset, keyboardAvoidingEventNamesFor, readKeyboardFrame, readPrefersCrossFadeTransitions, readLayoutFrame, resolveKeyboardAvoidingLayout, resolveAccessibilityProps, DEFAULT_VERTICAL_OFFSET, } from '@symbiote-native/components';
12
+ import { computeInset, configureKeyboardAvoidingAnimation, keyboardAvoidingEventNamesFor, readKeyboardAnimationTiming, readKeyboardFrame, readPrefersCrossFadeTransitions, readLayoutFrame, resolveKeyboardAvoidingLayout, resolveAccessibilityProps, DEFAULT_VERTICAL_OFFSET, } from '@symbiote-native/components';
13
13
  import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
14
14
  function isStyleProp(value) {
15
15
  return typeof value === 'object' && value !== null;
@@ -53,14 +53,18 @@ export const KeyboardAvoidingView = defineComponent((_props, { attrs: rawAttrs,
53
53
  };
54
54
  const onShow = (payload) => {
55
55
  const keyboard = readKeyboardFrame(payload);
56
+ const previousInset = inset.value;
56
57
  const next = computeInset(frame, keyboard, verticalOffset(), {
57
58
  behavior: asBehavior(currentAttrs().behavior),
58
59
  // The inset CURRENTLY applied (RN's this.state.bottom), read live off the reactive cell:
59
60
  // in 'height' mode the wrapper is shrunk by it, so the next onLayout under-reports the
60
61
  // frame by exactly that much and core adds it back.
61
- previousInset: inset.value,
62
+ previousInset,
62
63
  prefersCrossFadeTransitions,
63
64
  });
65
+ // RN's `_updateBottomIfNecessary` skips the animation when the inset did not change.
66
+ if (next !== previousInset)
67
+ configureKeyboardAvoidingAnimation(readKeyboardAnimationTiming(payload), currentAttrs().enabled !== false);
64
68
  dlog(`KeyboardAvoidingView show -> inset ${next}`);
65
69
  inset.value = next;
66
70
  };
@@ -122,11 +126,11 @@ export const KeyboardAvoidingView = defineComponent((_props, { attrs: rawAttrs,
122
126
  // 'nested' pushes the children in an inner view by `bottom: inset`; the wrapper modes
123
127
  // adjust the single wrapper directly.
124
128
  if (layout.kind === 'nested') {
125
- return h('symbiote-view', wrapperProps, [
126
- h('symbiote-view', { style: layout.innerStyle }, childNodes),
129
+ return h('view', wrapperProps, [
130
+ h('view', { style: layout.innerStyle }, childNodes),
127
131
  ]);
128
132
  }
129
- return h('symbiote-view', wrapperProps, childNodes);
133
+ return h('view', wrapperProps, childNodes);
130
134
  };
131
135
  }, {
132
136
  name: 'KeyboardAvoidingView',
@@ -108,7 +108,7 @@ export const Modal = defineComponent((_props, { attrs: rawAttrs, slots, emit })
108
108
  style: isStyleProp(attrs.style) ? attrs.style : undefined,
109
109
  passthrough: resolveAccessibilityProps(forwardAttrs(attrs)),
110
110
  });
111
- // root = symbiote-modal > [container]; the slot children nest UNDER the container View, never
111
+ // root = modal > [container]; the slot children nest UNDER the container View, never
112
112
  // as a direct sibling of the host (RN's modal content layout).
113
113
  const [container] = root.children;
114
114
  if (typeof container === 'string')
@@ -0,0 +1,31 @@
1
+ import type { IClassNameValue, IStyleProp, IViewStyle } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps, IPressHandler, IPressState, IPressableAndroidRippleConfig, IRectOffset } from '@symbiote-native/components';
3
+ import type { VNodeRef } from '@vue/runtime-core';
4
+ export type { IPressState, IPressableAndroidRippleConfig, } from '@symbiote-native/components';
5
+ export interface IPressableProps extends IAccessibilityProps, IAriaProps {
6
+ onPress?: IPressHandler;
7
+ onPressIn?: IPressHandler;
8
+ onPressOut?: IPressHandler;
9
+ onPressMove?: IPressHandler;
10
+ onLongPress?: IPressHandler;
11
+ delayLongPress?: number;
12
+ disabled?: boolean;
13
+ focusable?: boolean;
14
+ cancelable?: boolean;
15
+ blockNativeResponder?: boolean;
16
+ hitSlop?: IRectOffset;
17
+ testOnly_pressed?: boolean;
18
+ pressRetentionOffset?: IRectOffset;
19
+ unstable_pressDelay?: number;
20
+ minPressDuration?: number;
21
+ android_ripple?: IPressableAndroidRippleConfig;
22
+ android_disableSound?: boolean;
23
+ onHoverIn?: IPressHandler;
24
+ onHoverOut?: IPressHandler;
25
+ delayHoverIn?: number;
26
+ delayHoverOut?: number;
27
+ testID?: string;
28
+ style?: IStyleProp<IViewStyle> | ((state: IPressState) => IStyleProp<IViewStyle>);
29
+ class?: IClassNameValue;
30
+ ref?: VNodeRef;
31
+ }
@@ -0,0 +1,12 @@
1
+ // The `<pressable>` tag's prop surface. The press machine — timers, the retention region, the
2
+ // long-press and hover legs, the `disabled`/`focusable`/`accessible` folds and the Android ripple —
3
+ // lives on the engine node as `core/components/src/behaviors/pressable.ts`, wired by
4
+ // `../register`. `@press` / `@press-in` / … reach it as ordinary `onPress` / `onPressIn` props.
5
+ //
6
+ // THERE IS NO SCOPED SLOT, and that is the one surface a tag cannot carry: press state lives on the
7
+ // engine node and never crosses back into Vue's reactivity, so `#default="{ pressed }"` has no
8
+ // channel. A `style` CALLBACK still works — the engine resolves it at both values of `pressed`
9
+ // (`isStyleCallback`, `core/engine/src/node.ts`) — and a `:active` CSS rule is cheaper still. A
10
+ // CHILD that needs the state has to be given it: mirror `@press-in`/`@press-out` into a local ref,
11
+ // which is what any app styling a descendant does.
12
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { IClassNameValue } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
3
+ export interface IRefreshControlProps extends IAccessibilityProps, IAriaProps {
4
+ refreshing: boolean;
5
+ id?: string;
6
+ onRefresh?: () => void | Promise<void>;
7
+ tintColor?: string;
8
+ title?: string;
9
+ titleColor?: string;
10
+ progressViewOffset?: number;
11
+ colors?: readonly string[];
12
+ progressBackgroundColor?: string;
13
+ size?: 'default' | 'large';
14
+ enabled?: boolean;
15
+ class?: IClassNameValue;
16
+ }
@@ -0,0 +1,9 @@
1
+ // The `<refresh-control>` tag's prop surface. The wrapper is gone: it forwarded every prop and
2
+ // turned the host's `onRefresh` into a typed `refresh` emit, which a tag needs no help with —
3
+ // `@refresh` compiles to an `onRefresh` prop and `routeProp` sends it to the native `topRefresh`
4
+ // event. The controlled-spinner handshake lives in `registerRefreshControlBehavior`.
5
+ //
6
+ // Where the node SITS is still the parent's decision and differs per platform: on iOS a
7
+ // PullToRefreshView sibling inside the ScrollView, on Android an AndroidSwipeRefreshLayout wrapping
8
+ // it. `registerScrollViewBehavior` claims the tag and places it.
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { IClassNameValue } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
3
+ export type ISafeAreaViewProps = IAccessibilityProps & IAriaProps & {
4
+ id?: string;
5
+ class?: IClassNameValue;
6
+ };
@@ -0,0 +1,5 @@
1
+ // The `<safe-area-view>` tag's prop surface. The wrapper is gone: its whole body was
2
+ // `normalizeVueAttrs` + `resolveAccessibilityProps` + one `h()`, and both folds now run below every
3
+ // path — kebab->camel and `id -> nativeID` in the renderer's `patchProp`, aria/role in the engine's
4
+ // `fabricProps`. The prop type stays, for a component forwarding a bag.
5
+ export {};
@@ -1,7 +1,5 @@
1
- import { type VNode } from '@vue/runtime-core';
2
- import { type IAccessibilityProps, type IAriaProps, type ISymbioteIntrinsic } from '@symbiote-native/components';
3
- import { type IClassNameValue, type IStyleProp, type ISymbioteEvent, type IViewStyle } from '@symbiote-native/engine';
4
- import { type IStickyHeaderComponentType } from './sticky-header';
1
+ import type { IClassNameValue, ISymbioteEvent, IStyleProp, IViewStyle } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
5
3
  export type { IScrollViewHandle } from '@symbiote-native/components';
6
4
  type IScrollHandler = (event: ISymbioteEvent) => void;
7
5
  export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
@@ -25,9 +23,8 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
25
23
  x: number;
26
24
  y: number;
27
25
  };
28
- refreshControl?: VNode;
29
26
  removeClippedSubviews?: boolean;
30
- class?: IClassNameValue;
27
+ onContentSizeChange?: (width: number, height: number) => void;
31
28
  snapToInterval?: number;
32
29
  snapToOffsets?: number[];
33
30
  snapToAlignment?: 'start' | 'center' | 'end';
@@ -36,7 +33,6 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
36
33
  disableIntervalMomentum?: boolean;
37
34
  stickyHeaderIndices?: number[];
38
35
  invertStickyHeaders?: boolean;
39
- StickyHeaderComponent?: IStickyHeaderComponentType;
40
36
  keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
41
37
  keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
42
38
  maintainVisibleContentPosition?: {
@@ -73,24 +69,5 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
73
69
  onMomentumScrollBegin?: IScrollHandler;
74
70
  onMomentumScrollEnd?: IScrollHandler;
75
71
  onScrollToTop?: IScrollHandler;
72
+ class?: IClassNameValue;
76
73
  }
77
- export type IScrollViewEmits = {
78
- contentSizeChange: (width: number, height: number) => boolean;
79
- };
80
- export interface IScrollViewAssembleInput {
81
- scrollViewIntrinsic: ISymbioteIntrinsic;
82
- scrollProps: Record<string, unknown>;
83
- content: VNode;
84
- refreshControl: VNode | undefined;
85
- scrollViewBaseStyle: IViewStyle;
86
- userStyle: IStyleProp<IViewStyle> | undefined;
87
- layoutSplitStyle: IStyleProp<IViewStyle>;
88
- scrollOuterProps: Record<string, unknown>;
89
- setNodeRef: (el: unknown) => void;
90
- }
91
- export interface IScrollViewPlatform {
92
- assemble: (input: IScrollViewAssembleInput) => VNode;
93
- }
94
- export declare function createScrollView(platform: IScrollViewPlatform): import("vue").DefineSetupFnComponent<IScrollViewProps, IScrollViewEmits, {}, IScrollViewProps & {
95
- onContentSizeChange?: ((width: number, height: number) => any) | undefined;
96
- }, import("vue").PublicProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -6,21 +6,21 @@ export type ISectionListProps<ItemT> = IVirtualizedSectionListProps<ItemT>;
6
6
  export type ISectionListEmits = IVirtualizedSectionListEmits;
7
7
  export type ISectionListSlots<ItemT> = IVirtualizedSectionListSlots<ItemT>;
8
8
  export declare const SectionList: new <ItemT>(props: (ISectionListProps<ItemT> & ({} | {
9
- onRefresh?: (() => any) | undefined;
10
9
  onEndReached?: ((info: {
11
10
  distanceFromEnd: number;
12
11
  }) => any) | undefined;
13
12
  onStartReached?: ((info: {
14
13
  distanceFromStart: number;
15
14
  }) => any) | undefined;
16
- })) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<ISectionListProps<ItemT> & ({} | {
17
15
  onRefresh?: (() => any) | undefined;
16
+ })) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<ISectionListProps<ItemT> & ({} | {
18
17
  onEndReached?: ((info: {
19
18
  distanceFromEnd: number;
20
19
  }) => any) | undefined;
21
20
  onStartReached?: ((info: {
22
21
  distanceFromStart: number;
23
22
  }) => any) | undefined;
23
+ onRefresh?: (() => any) | undefined;
24
24
  }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} | IVirtualizedSectionListEmits, import("vue").PublicProps, {}, false, {}, import("vue").SlotsType<ISectionListSlots<ItemT>>, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
25
25
  P: {};
26
26
  B: {};
@@ -29,11 +29,11 @@ export declare const SectionList: new <ItemT>(props: (ISectionListProps<ItemT> &
29
29
  M: {};
30
30
  Defaults: {};
31
31
  }, (ISectionListProps<ItemT> & {}) | (ISectionListProps<ItemT> & {
32
- onRefresh?: (() => any) | undefined;
33
32
  onEndReached?: ((info: {
34
33
  distanceFromEnd: number;
35
34
  }) => any) | undefined;
36
35
  onStartReached?: ((info: {
37
36
  distanceFromStart: number;
38
37
  }) => any) | undefined;
38
+ onRefresh?: (() => any) | undefined;
39
39
  }), {}, {}, {}, {}, {}>;
@@ -0,0 +1,6 @@
1
+ import type { IClassNameValue } from '@symbiote-native/engine';
2
+ import type { ISwitchProps as ISwitchBaseProps } from '@symbiote-native/components';
3
+ export type ISwitchProps = ISwitchBaseProps & {
4
+ class?: IClassNameValue;
5
+ };
6
+ export type { ISwitchTrackColor, ISwitchChangeEvent, } from '@symbiote-native/components';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { IClassNameValue } from '@symbiote-native/engine';
2
+ import type { ITextInputProps as ITextInputBaseProps } from '@symbiote-native/components';
3
+ export type ITextInputProps = ITextInputBaseProps & {
4
+ class?: IClassNameValue;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { IClassNameValue, IStyleProp, ISymbioteEvent, ITextStyle } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
3
+ import type { VNodeRef } from '@vue/runtime-core';
4
+ export interface ITextProps extends IAccessibilityProps, IAriaProps {
5
+ style?: IStyleProp<ITextStyle>;
6
+ class?: IClassNameValue;
7
+ onPress?: (event: ISymbioteEvent) => void;
8
+ onLongPress?: (event: ISymbioteEvent) => void;
9
+ onPressIn?: (event: ISymbioteEvent) => void;
10
+ onPressOut?: (event: ISymbioteEvent) => void;
11
+ onLayout?: (event: ISymbioteEvent) => void;
12
+ onTextLayout?: (event: ISymbioteEvent) => void;
13
+ numberOfLines?: number;
14
+ ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';
15
+ selectable?: boolean;
16
+ disabled?: boolean;
17
+ adjustsFontSizeToFit?: boolean;
18
+ minimumFontScale?: number;
19
+ allowFontScaling?: boolean;
20
+ maxFontSizeMultiplier?: number | null;
21
+ selectionColor?: string;
22
+ ref?: VNodeRef;
23
+ key?: string | number | symbol;
24
+ }
@@ -0,0 +1,6 @@
1
+ // The `<text>` tag's prop surface. There is no `Text` component: the wrapper's one job beyond
2
+ // forwarding attrs was RN's `Text.js` defaults (`ellipsizeMode: 'tail'`, `allowFontScaling: true`),
3
+ // and those are seeded in the renderer's `createElement` (`seedTextDefaults`) plus re-seeded in
4
+ // `patchProp` when a value arrives as an explicit `undefined`. A `<text>` inside another `<text>`
5
+ // still commits as `RCTVirtualText`; that is the engine's commit walk, never an adapter's.
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { INativeFeedbackBackground } from '@symbiote-native/components';
2
+ import type { IPressableProps } from './pressable-props';
3
+ export type ITouchableNativeFeedbackProps = Omit<IPressableProps, 'style'> & {
4
+ background?: INativeFeedbackBackground;
5
+ useForeground?: boolean;
6
+ touchSoundDisabled?: boolean;
7
+ };
@@ -0,0 +1,17 @@
1
+ import type { IStyleProp, IViewStyle } from '@symbiote-native/engine';
2
+ import type { IPressTimingProps } from '@symbiote-native/components';
3
+ import type { IPressableProps } from './pressable-props';
4
+ export type ITouchableBaseProps = Omit<IPressableProps, 'style'> & IPressTimingProps & {
5
+ style?: IStyleProp<IViewStyle>;
6
+ };
7
+ export interface ITouchableOpacityProps extends ITouchableBaseProps {
8
+ activeOpacity?: number;
9
+ }
10
+ export interface ITouchableHighlightProps extends ITouchableBaseProps {
11
+ activeOpacity?: number;
12
+ underlayColor?: string;
13
+ touchSoundDisabled?: boolean;
14
+ testOnly_pressed?: boolean;
15
+ onShowUnderlay?: () => void;
16
+ onHideUnderlay?: () => void;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { IPressTimingProps } from '@symbiote-native/components';
2
+ import type { IPressableProps } from './pressable-props';
3
+ export type ITouchableWithoutFeedbackProps = Omit<IPressableProps, 'style'> & IPressTimingProps & {
4
+ touchSoundDisabled?: boolean;
5
+ };
@@ -0,0 +1,29 @@
1
+ import type { IClassNameValue, IStyleProp, ISymbioteEvent, IViewStyle } from '@symbiote-native/engine';
2
+ import type { IAccessibilityProps, IAriaProps, IResponderProps } from '@symbiote-native/components';
3
+ import type { VNodeRef } from '@vue/runtime-core';
4
+ export interface IViewProps extends IAccessibilityProps, IAriaProps, IResponderProps {
5
+ style?: IStyleProp<IViewStyle>;
6
+ class?: IClassNameValue;
7
+ onPress?: (event: ISymbioteEvent) => void;
8
+ onPressIn?: (event: ISymbioteEvent) => void;
9
+ onPressOut?: (event: ISymbioteEvent) => void;
10
+ onLayout?: (event: ISymbioteEvent) => void;
11
+ onFocus?: (event: ISymbioteEvent) => void;
12
+ onBlur?: (event: ISymbioteEvent) => void;
13
+ pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
14
+ hitSlop?: number | {
15
+ top?: number;
16
+ left?: number;
17
+ bottom?: number;
18
+ right?: number;
19
+ };
20
+ id?: string;
21
+ focusable?: boolean;
22
+ collapsable?: boolean;
23
+ removeClippedSubviews?: boolean;
24
+ renderToHardwareTextureAndroid?: boolean;
25
+ shouldRasterizeIOS?: boolean;
26
+ needsOffscreenAlphaCompositing?: boolean;
27
+ ref?: VNodeRef;
28
+ key?: string | number | symbol;
29
+ }