@symbiote-native/vue 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/build/bootstrap.js +1 -1
  2. package/build/components/activity-indicator/index.android.js +1 -1
  3. package/build/components/activity-indicator/index.ios.js +1 -1
  4. package/build/components/activity-indicator/index.js +1 -1
  5. package/build/components/activity-indicator/shared.js +2 -2
  6. package/build/components/button.js +3 -3
  7. package/build/components/flat-list/index.js +2 -2
  8. package/build/components/image-background.js +2 -2
  9. package/build/components/image.js +2 -2
  10. package/build/components/input-accessory-view.js +1 -1
  11. package/build/components/keyboard-avoiding-view.js +1 -1
  12. package/build/components/modal.js +1 -1
  13. package/build/components/pressable.js +2 -2
  14. package/build/components/refresh-control.js +1 -1
  15. package/build/components/safe-area-view.js +1 -1
  16. package/build/components/scroll-view/index.android.js +1 -1
  17. package/build/components/scroll-view/index.ios.js +1 -1
  18. package/build/components/scroll-view/index.js +1 -1
  19. package/build/components/scroll-view/shared.js +2 -2
  20. package/build/components/scroll-view/sticky-header.js +1 -1
  21. package/build/components/section-list/index.js +2 -2
  22. package/build/components/switch/index.android.js +1 -1
  23. package/build/components/switch/index.ios.js +1 -1
  24. package/build/components/switch/index.js +1 -1
  25. package/build/components/switch/shared.js +3 -3
  26. package/build/components/text-input/index.js +3 -3
  27. package/build/components/touchable-native-feedback.js +3 -3
  28. package/build/components/touchable.js +3 -3
  29. package/build/components/virtualized-list/index.js +4 -4
  30. package/build/components/virtualized-section-list/index.js +2 -2
  31. package/build/components.js +1 -1
  32. package/build/index.js +32 -32
  33. package/build/modules/animated/create-animated-component.js +1 -1
  34. package/build/modules/animated/index.js +5 -5
  35. package/build/modules/app-registry/index.js +1 -1
  36. package/build/modules/status-bar.js +1 -1
  37. package/build/render.js +1 -1
  38. package/package.json +3 -3
@@ -4,7 +4,7 @@
4
4
  // header for why anything importing react-native must stay there.
5
5
  import { AppRegistry as RNAppRegistry } from 'react-native';
6
6
  import { bootstrapHost } from '@symbiote-native/components/bootstrap';
7
- import { AppRegistry, setHostRegistrar } from './modules/app-registry';
7
+ import { AppRegistry, setHostRegistrar } from './modules/app-registry/index.js';
8
8
  // Mirrors real Vue's createApp(App).mount(selector) two-step idiom.
9
9
  export function createApp(App, options = {}) {
10
10
  return {
@@ -2,7 +2,7 @@
2
2
  // ProgressBar's setStyle(); without it the view throws "setStyle() not called") and
3
3
  // `indeterminate: true`, and its default color is the theme (null). Metro picks this on an
4
4
  // Android host; no Platform.OS read. Mirrors the React adapter's Android binding. See ADR 0020.
5
- import { createActivityIndicator } from './shared';
5
+ import { createActivityIndicator } from './shared.js';
6
6
  export const ActivityIndicator = createActivityIndicator({
7
7
  // RN: `color = Platform.OS === 'ios' ? GRAY : null`. Android lets the theme color it.
8
8
  defaultColor: null,
@@ -1,7 +1,7 @@
1
1
  // ActivityIndicator on iOS: RCTActivityIndicatorView takes the size enum + a GRAY default
2
2
  // color and no extra native props. Also the base (activity-indicator.ts re-exports it) for
3
3
  // headless / web. Mirrors the React adapter's iOS binding. See ADR 0020.
4
- import { createActivityIndicator } from './shared';
4
+ import { createActivityIndicator } from './shared.js';
5
5
  // RN's iOS default spinner color (Libraries/.../ActivityIndicator.js GRAY).
6
6
  const IOS_DEFAULT_COLOR = '#999999';
7
7
  export const ActivityIndicator = createActivityIndicator({
@@ -1,4 +1,4 @@
1
1
  // Base / default ActivityIndicator. Re-exports the iOS build. Metro overrides this with
2
2
  // activity-indicator.ios.ts / .android.ts on a real host; under tsx / tsc / web the host
3
3
  // resolves here. Filename is the selector, no Platform.OS read. See ADR 0020.
4
- export * from './index.ios';
4
+ export * from './index.ios.js';
@@ -9,8 +9,8 @@
9
9
  // indeterminate) are supplied by the .ios/.android files via `IActivityIndicatorPlatform`.
10
10
  import { defineComponent } from '@vue/runtime-core';
11
11
  import { renderActivityIndicator } from '@symbiote-native/components';
12
- import { descriptorToVue } from '../../descriptor-to-vue';
13
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
12
+ import { descriptorToVue } from '../../descriptor-to-vue.js';
13
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
14
14
  function normalizeSize(size) {
15
15
  if (size === 'large')
16
16
  return 'large';
@@ -4,9 +4,9 @@
4
4
  // forwards the native-only props. The Vue twin of the React adapter's Button.
5
5
  import { defineComponent, h } from '@vue/runtime-core';
6
6
  import { BUTTON_ACCESSIBILITY_ROLE, resolveButtonTextStyle, } from '@symbiote-native/components';
7
- import { Text } from '../components';
8
- import { TouchableOpacity } from './touchable';
9
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
7
+ import { Text } from '../components.js';
8
+ import { TouchableOpacity } from './touchable.js';
9
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
10
10
  // The props Button consumes / re-maps itself; everything else (accessibility, aria, TV-focus,
11
11
  // testID, nativeID) forwards to the TouchableOpacity. `title` becomes the Text child; onPress and
12
12
  // disabled re-map; touchSoundDisabled maps to the pressable's android_disableSound.
@@ -16,8 +16,8 @@
16
16
  import { defineComponent, getCurrentInstance, h, shallowRef, } from '@vue/runtime-core';
17
17
  import { SINGLE_COLUMN, chunkIntoRows, expandRowViewability, firstItemOfRow, lastItemOfRow, rowKeyExtractor, } from '@symbiote-native/components';
18
18
  import { dlog, resolveClassName, } from '@symbiote-native/engine';
19
- import { VirtualizedList } from '../virtualized-list';
20
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
19
+ import { VirtualizedList } from '../virtualized-list/index.js';
20
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
21
21
  // VirtualizedList is itself a generic component (generic construct signature), which h()'s overloads
22
22
  // can't resolve. Drive it through a loose functional-component handle (generic-component h()
23
23
  // limitation — the ItemT surface is proven at the typed FlatList boundary above).
@@ -10,8 +10,8 @@
10
10
  import { h } from '@vue/runtime-core';
11
11
  import { renderImageBackground, resolveAccessibilityProps, } from '@symbiote-native/components';
12
12
  import { resolveClassName, } from '@symbiote-native/engine';
13
- import { descriptorToVue } from '../descriptor-to-vue';
14
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
13
+ import { descriptorToVue } from '../descriptor-to-vue.js';
14
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
15
15
  function asString(value) {
16
16
  return typeof value === 'string' ? value : undefined;
17
17
  }
@@ -13,8 +13,8 @@
13
13
  // the forward-only rest (events, blurRadius, capInsets, testID, accessibility*) is typed as the
14
14
  // a11y intersection so resolveAccessibilityProps folds aria-* into accessibility* over it.
15
15
  import { imageStatics, renderImage, resolveAccessibilityProps, } from '@symbiote-native/components';
16
- import { descriptorToVue } from '../descriptor-to-vue';
17
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
16
+ import { descriptorToVue } from '../descriptor-to-vue.js';
17
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
18
18
  export { setImageSourceResolver } from '@symbiote-native/components';
19
19
  function asString(value) {
20
20
  return typeof value === 'string' ? value : undefined;
@@ -9,7 +9,7 @@
9
9
  // so resolveAccessibilityProps lands aria-* onto the host node.
10
10
  import { h } from '@vue/runtime-core';
11
11
  import { renderInputAccessoryView, resolveAccessibilityProps, } from '@symbiote-native/components';
12
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
12
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
13
13
  function asString(value) {
14
14
  return typeof value === 'string' ? value : undefined;
15
15
  }
@@ -12,7 +12,7 @@
12
12
  import { defineComponent, h, ref, onMounted, onUnmounted } from '@vue/runtime-core';
13
13
  import { Keyboard, KEYBOARD_EVENT, dlog, } from '@symbiote-native/engine';
14
14
  import { computeInset, readKeyboardFrame, readLayoutFrame, resolveKeyboardAvoidingLayout, resolveAccessibilityProps, DEFAULT_VERTICAL_OFFSET, } from '@symbiote-native/components';
15
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
15
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
16
16
  // A style prop is an object (a style record) or an array of them; numbers/strings/null degrade
17
17
  // to undefined (the engine flattens what it gets). A runtime guard, not a cast.
18
18
  function isStyleProp(value) {
@@ -13,7 +13,7 @@
13
13
  import { defineComponent, h, ref, watch } from '@vue/runtime-core';
14
14
  import { createInitialModalState, modalReducer, renderModal, resolveAccessibilityProps, shouldRenderModal, } from '@symbiote-native/components';
15
15
  import { dlog, } from '@symbiote-native/engine';
16
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
16
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
17
17
  function asBoolean(value) {
18
18
  return typeof value === 'boolean' ? value : undefined;
19
19
  }
@@ -15,8 +15,8 @@
15
15
  import { defineComponent, h, ref, shallowRef } from '@vue/runtime-core';
16
16
  import { createPressHandlers, createPressRuntime, rippleProps, buildPressableListeners, resolveDisabledAccessibilityState, noteHoverNoop, resolveAccessibilityProps, DEFAULT_DELAY_LONG_PRESS_MS, } from '@symbiote-native/components';
17
17
  import { measure, isSymbioteNode, } from '@symbiote-native/engine';
18
- import { View } from '../components';
19
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
18
+ import { View } from '../components.js';
19
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
20
20
  // The emits-options validator for the full press surface. Reused verbatim as the `emits` of every
21
21
  // Touchable* wrapper (they expose the same events), so the runtime list lives in exactly one place.
22
22
  export const PRESSABLE_EMITS = {
@@ -14,7 +14,7 @@
14
14
  import { defineComponent, h } from '@vue/runtime-core';
15
15
  import { dlog } from '@symbiote-native/engine';
16
16
  import { resolveAccessibilityProps, } from '@symbiote-native/components';
17
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
17
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
18
18
  // Copy every non-consumed attr into a bag typed as the a11y intersection (the accumulator is BUILT
19
19
  // at that type, a real narrowing, not a cast), then fold aria-*/role into the canonical
20
20
  // accessibility* props. Children cross via slots, never attrs. When the Android wrap re-invokes
@@ -10,7 +10,7 @@
10
10
  import { defineComponent, h } from '@vue/runtime-core';
11
11
  import { dlog } from '@symbiote-native/engine';
12
12
  import { resolveAccessibilityProps, } from '@symbiote-native/components';
13
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
13
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
14
14
  // Copy every attr into a bag typed as the a11y intersection (the accumulator is BUILT at that
15
15
  // type, a real narrowing, not a cast), then fold aria-*/role into the canonical accessibility*
16
16
  // props before they reach the host. style / onLayout / testID forward unchanged.
@@ -15,7 +15,7 @@
15
15
  import { h, isVNode } from '@vue/runtime-core';
16
16
  import { dlog } from '@symbiote-native/engine';
17
17
  import { splitLayoutProps } from '@symbiote-native/components';
18
- import { createScrollView } from './shared';
18
+ import { createScrollView } from './shared.js';
19
19
  function isRecord(value) {
20
20
  return typeof value === 'object' && value !== null && !Array.isArray(value);
21
21
  }
@@ -4,7 +4,7 @@
4
4
  // childless sibling. Also the base (scroll-view.ts re-exports it) for headless / web. Metro picks
5
5
  // this on an iOS host; no Platform.OS read. Mirrors the React adapter's iOS binding.
6
6
  import { h } from '@vue/runtime-core';
7
- import { createScrollView } from './shared';
7
+ import { createScrollView } from './shared.js';
8
8
  export const ScrollView = createScrollView({
9
9
  assemble: input => {
10
10
  // Sibling placement: RefreshControl before content (RN iOS). The node ref stays on the scroll
@@ -1,4 +1,4 @@
1
1
  // Base / default ScrollView. Re-exports the iOS build. Metro overrides this with
2
2
  // scroll-view.ios.ts / scroll-view.android.ts on a real host; under tsx / tsc / web the host
3
3
  // resolves here. Filename is the selector, no Platform.OS read. See ADR 0020 / 0024.
4
- export * from './index.ios';
4
+ export * from './index.ios.js';
@@ -21,8 +21,8 @@
21
21
  import { defineComponent, h, isVNode, markRaw, onBeforeUnmount, ref, shallowRef, watch, } from '@vue/runtime-core';
22
22
  import { attachStickyScroll, buildScrollViewHandle, didContentSizeChange, forwardScrollEvent, readLayoutDimension, resolveAccessibilityProps, resolveDecelerationRate, selectScrollIntrinsics, } from '@symbiote-native/components';
23
23
  import { AnimatedValue, dlog, event as animatedEvent, isClassNameValue, isNativeAnimatedAvailable, isSymbioteNode, resolveClassName, } from '@symbiote-native/engine';
24
- import { wrapStickyHeaders } from './sticky-header';
25
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
24
+ import { wrapStickyHeaders } from './sticky-header.js';
25
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
26
26
  function isHandler(value) {
27
27
  return typeof value === 'function';
28
28
  }
@@ -14,7 +14,7 @@
14
14
  import { defineComponent, h, isVNode, ref, shallowRef, watch, watchEffect, markRaw, } from '@vue/runtime-core';
15
15
  import { AnimatedValue, AnimatedInterpolation, Platform, dlog, } from '@symbiote-native/engine';
16
16
  import { computeStickyInterpolation, nextStickyHeaderY, readLayoutNumber, stickyDebounceMs, STICKY_HEADER_Z_INDEX, } from '@symbiote-native/components';
17
- import { Animated } from '../../modules/animated';
17
+ import { Animated } from '../../modules/animated/index.js';
18
18
  function isHandler(value) {
19
19
  return typeof value === 'function';
20
20
  }
@@ -12,8 +12,8 @@
12
12
  // synthesized events (endReached/startReached/refresh) are bridged, gated on listener presence so
13
13
  // the inner list keeps its RefreshControl / edge-reached gating.
14
14
  import { defineComponent, getCurrentInstance, h, shallowRef, } from '@vue/runtime-core';
15
- import { VirtualizedSectionList, } from '../virtualized-section-list';
16
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
15
+ import { VirtualizedSectionList, } from '../virtualized-section-list/index.js';
16
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
17
17
  // VirtualizedSectionList is a generic component (generic construct signature), which h()'s overloads
18
18
  // can't resolve. Drive it through a loose functional-component handle (generic-component h() limit).
19
19
  const VirtualizedSectionListHost = VirtualizedSectionList;
@@ -2,7 +2,7 @@
2
2
  // trackTintColor (the color for the CURRENT value), and snaps native back via the
3
3
  // `setNativeValue` command. Metro picks this on an Android host; no Platform.OS read.
4
4
  // Mirrors the React adapter's Android binding. See ADR 0020.
5
- import { createSwitch } from './shared';
5
+ import { createSwitch } from './shared.js';
6
6
  export const Switch = createSwitch({
7
7
  snapBackCommand: 'setNativeValue',
8
8
  trackColorProps: (value, trackColor) => ({
@@ -1,7 +1,7 @@
1
1
  // Switch on iOS: the native Switch takes onTintColor (ON-track) / tintColor (OFF-track) and
2
2
  // snaps native back via the `setValue` command. Also the base (switch.ts re-exports it) for
3
3
  // headless / web. Mirrors the React adapter's iOS binding. See ADR 0020.
4
- import { createSwitch } from './shared';
4
+ import { createSwitch } from './shared.js';
5
5
  export const Switch = createSwitch({
6
6
  snapBackCommand: 'setValue',
7
7
  trackColorProps: (_value, trackColor) => ({
@@ -2,4 +2,4 @@
2
2
  // switch.android.ts on a real host; under tsx / tsc / web the host resolves here. Filename is
3
3
  // the selector, no Platform.OS read. See ADR 0020. Switch is the first component to bring the
4
4
  // state half (the reducer) into the Vue adapter: render-and-state, not render-only.
5
- export * from './index.ios';
5
+ export * from './index.ios.js';
@@ -12,9 +12,9 @@
12
12
  import { defineComponent, ref, shallowRef, watch } from '@vue/runtime-core';
13
13
  import { renderSwitch, switchReducer, createInitialSwitchState, shouldSnapBack, valueFromChange, } from '@symbiote-native/components';
14
14
  import { dispatchViewCommand, isSymbioteNode, dlog, } from '@symbiote-native/engine';
15
- import { descriptorToVue } from '../../descriptor-to-vue';
16
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
17
- import { resolveModelValue, emitModelUpdate } from '../../utils/model-binding';
15
+ import { descriptorToVue } from '../../descriptor-to-vue.js';
16
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
17
+ import { resolveModelValue, emitModelUpdate } from '../../utils/model-binding.js';
18
18
  function isRecord(value) {
19
19
  return typeof value === 'object' && value !== null && !Array.isArray(value);
20
20
  }
@@ -15,9 +15,9 @@
15
15
  import { defineComponent, onBeforeUnmount, ref, shallowRef, watch } from '@vue/runtime-core';
16
16
  import { resolveAccessibilityProps, resolveTextInputProps, renderTextInput, foldText, textFromChange, eventCountFromChange, shouldCommandText, INITIAL_EVENT_COUNT, SELECTION_NONE, } from '@symbiote-native/components';
17
17
  import { dispatchViewCommand, isSymbioteNode, dlog, blurTextInput, setInputFocused, setInputBlurred, whenCommitted, } from '@symbiote-native/engine';
18
- import { descriptorToVue } from '../../descriptor-to-vue';
19
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
20
- import { resolveModelValue, emitModelUpdate } from '../../utils/model-binding';
18
+ import { descriptorToVue } from '../../descriptor-to-vue.js';
19
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
20
+ import { resolveModelValue, emitModelUpdate } from '../../utils/model-binding.js';
21
21
  function isRecord(value) {
22
22
  return typeof value === 'object' && value !== null && !Array.isArray(value);
23
23
  }
@@ -6,9 +6,9 @@
6
6
  import { defineComponent, h } from '@vue/runtime-core';
7
7
  import { backgroundProps, canUseNativeForeground, rippleBackground, selectableBackground, selectableBackgroundBorderless, } from '@symbiote-native/components';
8
8
  import { dlog } from '@symbiote-native/engine';
9
- import { View } from '../components';
10
- import { Pressable, emitPressableEvents, PRESSABLE_EMITS, } from './pressable';
11
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
9
+ import { View } from '../components.js';
10
+ import { Pressable, emitPressableEvents, PRESSABLE_EMITS, } from './pressable.js';
11
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
12
12
  const HANDLED = ['background', 'useForeground'];
13
13
  function forwardAttrs(attrs) {
14
14
  const result = {};
@@ -13,9 +13,9 @@
13
13
  import { defineComponent, h } from '@vue/runtime-core';
14
14
  import { computePressOutWait, DEFAULT_ACTIVE_OPACITY, DEFAULT_HIGHLIGHT_CHILD_OPACITY, DEFAULT_MIN_PRESS_DURATION_MS, DEFAULT_UNDERLAY_COLOR, OPACITY_ACTIVE_DURATION_MS, OPACITY_INACTIVE_DURATION_MS, RESTING_OPACITY, } from '@symbiote-native/components';
15
15
  import { dlog, } from '@symbiote-native/engine';
16
- import { Pressable, emitPressableEvents, PRESSABLE_EMITS, } from './pressable';
17
- import { Animated } from '../modules/animated';
18
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
16
+ import { Pressable, emitPressableEvents, PRESSABLE_EMITS, } from './pressable.js';
17
+ import { Animated } from '../modules/animated/index.js';
18
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
19
19
  function numberOr(value, fallback) {
20
20
  return typeof value === 'number' ? value : fallback;
21
21
  }
@@ -27,10 +27,10 @@
27
27
  import { computed, defineComponent, getCurrentInstance, h, isVNode, onBeforeUnmount, ref, shallowRef, watch, } from '@vue/runtime-core';
28
28
  import { DEFAULT_END_REACHED_THRESHOLD, DEFAULT_INITIAL_NUM_TO_RENDER, DEFAULT_MAX_TO_RENDER_PER_BATCH, DEFAULT_START_REACHED_THRESHOLD, DEFAULT_UPDATE_CELLS_BATCHING_PERIOD, DEFAULT_WINDOW_SIZE, EMPTY_OFFSET, FIRST_INDEX, INVERTED_X_STYLE, INVERTED_Y_STYLE, NO_CONTENT_LENGTH_SENT, averageMeasuredLength, buildListPlan, buildOffsets, buildViewabilityPairs, computeEndReached, computeStartReached, computeViewableSet, computeWindow, diffViewable, highestMeasuredIndex, maxMinimumViewTime, offsetForIndex, readLayoutLength, readScrollOffset, throttleWindow, } from '@symbiote-native/components';
29
29
  import { dlog, } from '@symbiote-native/engine';
30
- import { ScrollView } from '../scroll-view';
31
- import { RefreshControl } from '../refresh-control';
32
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
33
- import { componentFromSlot } from '../../utils/slots-to-render-props';
30
+ import { ScrollView } from '../scroll-view/index.js';
31
+ import { RefreshControl } from '../refresh-control.js';
32
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
33
+ import { componentFromSlot } from '../../utils/slots-to-render-props.js';
34
34
  // The typed inputs VirtualizedList reads off `props`; everything else (raw scroll, keyboard*,
35
35
  // accessibility, testID, …) falls through $attrs onto the inner ScrollView. Listed for the runtime
36
36
  // `props` declaration (keyof can't derive it: the index signature widens keyof to `string`). The
@@ -18,8 +18,8 @@
18
18
  import { defineComponent, getCurrentInstance, h, shallowRef, } from '@vue/runtime-core';
19
19
  import { flattenSections, scrollLocationToFlatIndex, sectionEntryKey, unwrapEntryItem, } from '@symbiote-native/components';
20
20
  import { Platform, dlog, } from '@symbiote-native/engine';
21
- import { VirtualizedList } from '../virtualized-list';
22
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
21
+ import { VirtualizedList } from '../virtualized-list/index.js';
22
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
23
23
  // VirtualizedList is a generic component (generic construct signature), which h()'s overloads can't
24
24
  // resolve. Drive it through a loose functional-component handle (generic-component h() limitation).
25
25
  const VirtualizedListHost = VirtualizedList;
@@ -9,7 +9,7 @@
9
9
  // stateful component's ref would resolve to a useless component proxy, which is why
10
10
  // createAnimatedComponent (which captures the host node via that ref) needs the fall-through.
11
11
  import { h } from '@vue/runtime-core';
12
- import { normalizeVueAttrs } from './utils/normalize-attrs';
12
+ import { normalizeVueAttrs } from './utils/normalize-attrs.js';
13
13
  function hostComponent(intrinsic, name) {
14
14
  // A functional component's ctx is Omit<SetupContext, 'expose'> (no instance to expose); let the
15
15
  // FunctionalComponent target infer the param types rather than annotate SetupContext.
package/build/index.js CHANGED
@@ -1,83 +1,83 @@
1
1
  // @symbiote-native/vue: a thin Vue 3 reconciler over @symbiote-native/engine. createRenderer maps
2
2
  // each RendererOptions call onto the engine's mutation API; all Fabric clone-on-write
3
3
  // lives in the engine, shared with every other adapter. App code names only @symbiote-native/vue.
4
- export { mount, unmount } from './render';
4
+ export { mount, unmount } from './render.js';
5
5
  // createTunnel: cross-surface content sharing (Teleport stays same-surface-only by design —
6
6
  // see create-tunnel.ts and the vue-adapter-directives skill for why).
7
- export { createTunnel } from './create-tunnel';
8
- export { View, Text } from './components';
7
+ export { createTunnel } from './create-tunnel.js';
8
+ export { View, Text } from './components.js';
9
9
  // findNodeHandle: RN's ref -> native reactTag lookup, the Vue twin of the React adapter's
10
10
  // host-instance resolution. IHostInstance is the raw engine node (Vue host refs fall
11
11
  // through to it; imperative methods live on each component's expose() handle).
12
- export { findNodeHandle } from './host-instance';
12
+ export { findNodeHandle } from './host-instance/index.js';
13
13
  // Image. Full parity with React: source/src/srcSet resolution, the width/height → style fold,
14
14
  // alt → accessibility, and the Image statics (getSize / prefetch / queryCache / …) are shared
15
15
  // verbatim from @symbiote-native/components via renderImage; Vue supplies only the functional bridge.
16
- export { Image, setImageSourceResolver } from './components/image';
16
+ export { Image, setImageSourceResolver } from './components/image.js';
17
17
  // First component off the shared @symbiote-native/components layer: render-only, drives the
18
18
  // agnostic renderActivityIndicator through descriptorToVue. Proof the layer is reusable:
19
19
  // the render fn is shared verbatim with React; Vue supplies only the bridge.
20
- export { ActivityIndicator } from './components/activity-indicator';
20
+ export { ActivityIndicator } from './components/activity-indicator/index.js';
21
21
  // First component to bring the state half into Vue (the lastNativeReport reducer + the
22
22
  // snap-back watch); render shared verbatim with React, Vue supplies the reactive lifecycle.
23
- export { Switch } from './components/switch';
23
+ export { Switch } from './components/switch/index.js';
24
24
  // ScrollView. Full parity (ADR 0024): vertical + horizontal, every pass-through prop, the
25
25
  // synthesized onContentSizeChange, the imperative handle via expose() + shallowRef, RefreshControl
26
26
  // (iOS sibling / Android wrap, Phase 2), and sticky headers (Phase 3: the scroll AnimatedValue,
27
27
  // the headerLayoutYs cross-talk, and the per-header Animated.View wrap). The pure math (intrinsics,
28
28
  // decelerationRate, content-size dedupe, the handle, the sticky interpolation) is shared verbatim
29
29
  // with React from @symbiote-native/components.
30
- export { ScrollView } from './components/scroll-view';
30
+ export { ScrollView } from './components/scroll-view/index.js';
31
31
  // Pressable family. Full parity with React (the 3-layer split): the press state machine + render
32
32
  // decisions are shared in @symbiote-native/components; Vue supplies the reactivity + descriptor bridge.
33
- export { Pressable } from './components/pressable';
34
- export { TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, } from './components/touchable';
35
- export { TouchableNativeFeedback } from './components/touchable-native-feedback';
36
- export { Button } from './components/button';
33
+ export { Pressable } from './components/pressable.js';
34
+ export { TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, } from './components/touchable.js';
35
+ export { TouchableNativeFeedback } from './components/touchable-native-feedback.js';
36
+ export { Button } from './components/button.js';
37
37
  // TextInput. Full parity with React (the 3-layer split): the value/selection folds + the
38
38
  // controlled-write predicate live in @symbiote-native/components; Vue supplies the reactivity
39
39
  // (shallowRef host node, post-flush watch) + the imperative handle via expose().
40
- export { TextInput } from './components/text-input';
40
+ export { TextInput } from './components/text-input/index.js';
41
41
  // VirtualizedList family. Full parity with React: the windowing math (visible range, cell
42
42
  // keys, viewability token diffing, edge-reached, the list plan) is shared in
43
43
  // @symbiote-native/components; Vue supplies the reactive lifecycle + the per-cell element.
44
- export { VirtualizedList } from './components/virtualized-list';
45
- export { FlatList } from './components/flat-list';
46
- export { VirtualizedSectionList } from './components/virtualized-section-list';
47
- export { SectionList } from './components/section-list';
44
+ export { VirtualizedList } from './components/virtualized-list/index.js';
45
+ export { FlatList } from './components/flat-list/index.js';
46
+ export { VirtualizedSectionList } from './components/virtualized-section-list/index.js';
47
+ export { SectionList } from './components/section-list/index.js';
48
48
  // Phase 2 (ADR 0024): SafeAreaView + RefreshControl, wired into ScrollView with the iOS-sibling /
49
49
  // Android-wrap platform split. RefreshControl hosts the wrapped scroll view via its default slot.
50
- export { SafeAreaView } from './components/safe-area-view';
51
- export { RefreshControl } from './components/refresh-control';
52
- export { descriptorToVue } from './descriptor-to-vue';
50
+ export { SafeAreaView } from './components/safe-area-view.js';
51
+ export { RefreshControl } from './components/refresh-control.js';
52
+ export { descriptorToVue } from './descriptor-to-vue.js';
53
53
  // normalizeVueAttrs: the kebab→camel attr fold every component applies at entry. Exported so an
54
54
  // external wrapper package (e.g. @symbiote-native/slider/vue over a third-party native view) can fold
55
55
  // its incoming attrs through the SAME transform rather than reimplementing it.
56
- export { normalizeVueAttrs } from './utils/normalize-attrs';
56
+ export { normalizeVueAttrs } from './utils/normalize-attrs.js';
57
57
  // resolveModelValue/emitModelUpdate: the v-model (Rule 6, vue-adapter-events skill) helper every
58
58
  // controlled-value component uses. Exported for the same external-package reason as
59
59
  // normalizeVueAttrs above (e.g. @symbiote-native/slider/vue).
60
- export { resolveModelValue, emitModelUpdate } from './utils/model-binding';
61
- export { createSymbioteRenderer } from './renderer';
60
+ export { resolveModelValue, emitModelUpdate } from './utils/model-binding.js';
61
+ export { createSymbioteRenderer } from './renderer.js';
62
62
  // Animated (ADR 0024 Phase 3a): Animated.View/Text/Image + the lazy Animated.ScrollView over the
63
63
  // Vue primitives, with the value graph / easing / drivers spread from @symbiote-native/engine. The wrap
64
64
  // mechanism (createAnimatedComponent) is the Vue twin of React's; the pure leaves live in the
65
65
  // engine.
66
- export { Animated, createAnimatedComponent } from './modules/animated';
66
+ export { Animated, createAnimatedComponent } from './modules/animated/index.js';
67
67
  // Visual components off the shared @symbiote-native/components layer (wave: simple-visual).
68
- export { ImageBackground } from './components/image-background';
69
- export { InputAccessoryView } from './components/input-accessory-view';
70
- export { Modal } from './components/modal';
68
+ export { ImageBackground } from './components/image-background.js';
69
+ export { InputAccessoryView } from './components/input-accessory-view.js';
70
+ export { Modal } from './components/modal.js';
71
71
  // KeyboardAvoidingView: full parity via the shared inset math; Vue owns the Keyboard subscription.
72
- export { KeyboardAvoidingView } from './components/keyboard-avoiding-view';
72
+ export { KeyboardAvoidingView } from './components/keyboard-avoiding-view.js';
73
73
  // StatusBar: declarative component + the shared imperative API.
74
- export { StatusBar } from './modules/status-bar';
74
+ export { StatusBar } from './modules/status-bar.js';
75
75
  // AppRegistry: RN's app entry point over `mount`. setHostRegistrar wires RN's own
76
76
  // registrar so the native Fabric host finds our runnable by app key.
77
- export { AppRegistry, setHostRegistrar } from './modules/app-registry';
77
+ export { AppRegistry, setHostRegistrar } from './modules/app-registry/index.js';
78
78
  // Vue composables over the core device-state modules.
79
- export { useColorScheme } from './composables/use-color-scheme';
80
- export { useWindowDimensions } from './composables/use-window-dimensions';
79
+ export { useColorScheme } from './composables/use-color-scheme.js';
80
+ export { useWindowDimensions } from './composables/use-window-dimensions.js';
81
81
  // Imperative runtime modules: the SAME module both adapters share, re-exported from @symbiote-native/engine.
82
82
  export { Alert, Share, ActionSheetIOS, Linking, Vibration, ToastAndroid, Settings, I18nManager, Dimensions, Appearance, AppState, Keyboard, KEYBOARD_EVENT, BackHandler, PermissionsAndroid, PERMISSIONS, RESULTS, AccessibilityInfo, LayoutAnimation, } from '@symbiote-native/engine';
83
83
  // Re-export the framework-agnostic engine surface (pure utilities + diagnostics).
@@ -13,7 +13,7 @@
13
13
  // value.setValue / animation -> flushValue -> AnimatedProps.update() -> setNativeProps(node).
14
14
  import { defineComponent, h, onBeforeUnmount, onMounted, onUpdated, shallowRef, } from '@vue/runtime-core';
15
15
  import { AnimatedProps, attachNativeEventHandler, isNativeAnimatedAvailable, reduceProps, readPassthroughStyle, resolveHostNode, } from '@symbiote-native/engine';
16
- import { normalizeVueAttrs } from '../../utils/normalize-attrs';
16
+ import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
17
17
  // RN's prop carrying explicit (already-rasterized) values that override the animated prop in
18
18
  // the COMMITTED props (sticky-header passthrough). Named once here so render/reconcile agree.
19
19
  const PASSTHROUGH_PROP = 'passthroughAnimatedPropExplicitValues';
@@ -4,11 +4,11 @@
4
4
  // JS-driven, ADR 0016), spread in verbatim. Both halves meet here so the familiar surface,
5
5
  // `Animated.timing(new Animated.Value(0), …).start()`, works against the Vue-driven engine.
6
6
  import { AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedMock, Easing, Platform, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, } from '@symbiote-native/engine';
7
- import { View, Text } from '../../components';
8
- import { Image } from '../../components/image';
9
- import { ScrollView } from '../../components/scroll-view';
10
- import { createAnimatedComponent } from './create-animated-component';
11
- export { createAnimatedComponent } from './create-animated-component';
7
+ import { View, Text } from '../../components.js';
8
+ import { Image } from '../../components/image.js';
9
+ import { ScrollView } from '../../components/scroll-view/index.js';
10
+ import { createAnimatedComponent } from './create-animated-component.js';
11
+ export { createAnimatedComponent } from './create-animated-component.js';
12
12
  // View/Text are pure host primitives; Image is the functional renderImage wrapper, and all expose
13
13
  // their host node via ref fall-through, so wrap them eagerly.
14
14
  const AnimatedView = createAnimatedComponent(View);
@@ -9,7 +9,7 @@
9
9
  // React already has.
10
10
  import { h } from '@vue/runtime-core';
11
11
  import { createAppRegistry, dlog, } from '@symbiote-native/engine';
12
- import { mount } from '../../render';
12
+ import { mount } from '../../render.js';
13
13
  function runnableFor(componentProvider, getWrapperComponentProvider) {
14
14
  return appParameters => {
15
15
  dlog(`AppRegistry: mounting on rootTag ${String(appParameters.rootTag)}`);
@@ -11,7 +11,7 @@
11
11
  // (untyped) and run through normalizeVueAttrs (kebab→camel) before each is narrowed by a guard.
12
12
  import { defineComponent, watchEffect } from '@vue/runtime-core';
13
13
  import { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight, isOpaqueColorValue, } from '@symbiote-native/engine';
14
- import { normalizeVueAttrs } from '../utils/normalize-attrs';
14
+ import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
15
15
  function asBoolean(value) {
16
16
  return typeof value === 'boolean' ? value : undefined;
17
17
  }
package/build/render.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // a surface for it and let the Vue renderer drive the engine, which commits into
3
3
  // nativeFabricUIManager; RN's own renderer never in the path.
4
4
  import { createSurface, disposeRoot, dlog, } from '@symbiote-native/engine';
5
- import { createSymbioteRenderer } from './renderer';
5
+ import { createSymbioteRenderer } from './renderer.js';
6
6
  // One Vue app per surface, so a surface can be torn down (unmount) or cleanly
7
7
  // re-mounted on the same rootTag: the bridgeless host stops and restarts a surface on
8
8
  // Fast Refresh and on lifecycle/focus changes, reusing the rootTag.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/vue",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "SymbioteNative's Vue adapter — a @vue/runtime-core createRenderer driving real native iOS/Android views through the same engine as the React adapter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,9 +44,9 @@
44
44
  "@vue/compiler-core": "^3.5.13",
45
45
  "@vue/compiler-sfc": "^3.5.13",
46
46
  "@vue/runtime-core": "^3.5.13",
47
- "@symbiote-native/components": "0.2.0",
47
+ "@symbiote-native/components": "0.2.1",
48
48
  "@symbiote-native/css-parser": "0.2.0",
49
- "@symbiote-native/engine": "0.1.1"
49
+ "@symbiote-native/engine": "0.1.2"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "vue": ">=3.5.0",