@symbiote-native/vue 1.0.0 → 2.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.
- package/README.md +9 -9
- package/babel-jsx.cjs +7 -8
- package/build/components/activity-indicator-props.d.ts +5 -0
- package/build/components/activity-indicator-props.js +1 -0
- package/build/components/button-props.d.ts +5 -0
- package/build/components/button-props.js +1 -0
- package/build/components/flat-list/index.d.ts +3 -3
- package/build/components/flat-list/index.js +2 -2
- package/build/components/image-background-props.d.ts +7 -0
- package/build/components/image-background-props.js +1 -0
- package/build/components/image-props.d.ts +5 -0
- package/build/components/image-props.js +5 -0
- package/build/components/{input-accessory-view.d.ts → input-accessory-view-props.d.ts} +1 -3
- package/build/components/input-accessory-view-props.js +5 -0
- package/build/components/keyboard-avoiding-view.js +3 -3
- package/build/components/modal/index.js +1 -1
- package/build/components/pressable-props.d.ts +29 -0
- package/build/components/pressable-props.js +12 -0
- package/build/components/refresh-control-props.d.ts +16 -0
- package/build/components/refresh-control-props.js +9 -0
- package/build/components/safe-area-view-props.d.ts +6 -0
- package/build/components/safe-area-view-props.js +5 -0
- package/build/components/scroll-view/{shared.d.ts → scroll-view-props.d.ts} +4 -27
- package/build/components/scroll-view/scroll-view-props.js +1 -0
- package/build/components/section-list/index.d.ts +3 -3
- package/build/components/switch/switch-props.d.ts +6 -0
- package/build/components/switch/switch-props.js +1 -0
- package/build/components/text-input/text-input-props.d.ts +5 -0
- package/build/components/text-input/text-input-props.js +1 -0
- package/build/components/text-props.d.ts +24 -0
- package/build/components/text-props.js +6 -0
- package/build/components/touchable-native-feedback-props.d.ts +6 -0
- package/build/components/touchable-native-feedback-props.js +1 -0
- package/build/components/touchable-props.d.ts +15 -0
- package/build/components/touchable-props.js +1 -0
- package/build/components/touchable-without-feedback-props.d.ts +3 -0
- package/build/components/touchable-without-feedback-props.js +1 -0
- package/build/components/view-props.d.ts +29 -0
- package/build/components/view-props.js +5 -0
- package/build/components/virtualized-list/index.d.ts +3 -3
- package/build/components/virtualized-list/index.js +42 -37
- package/build/components/virtualized-section-list/index.d.ts +3 -3
- package/build/descriptor-to-vue.js +2 -2
- package/build/index.d.ts +24 -27
- package/build/index.js +31 -16
- package/build/intrinsic-elements.d.ts +19 -0
- package/build/intrinsic-elements.js +1 -0
- package/build/jsx-runtime.d.ts +67 -0
- package/build/jsx-runtime.js +1 -0
- package/build/modules/animated/index.d.ts +3 -1
- package/build/modules/animated/index.js +20 -19
- package/build/modules/image/index.d.ts +3 -0
- package/build/modules/image/index.js +13 -0
- package/build/register.d.ts +1 -1
- package/build/register.js +13 -33
- package/build/renderer/index.js +58 -7
- package/build/runtime-helpers/index.d.ts +10 -1
- package/build/runtime-helpers/index.js +47 -11
- package/intrinsic-tags.cjs +52 -0
- package/metro-vue-transformer.cjs +55 -345
- package/package.json +12 -8
- package/babel-lower-host-primitives.cjs +0 -225
- package/build/components/activity-indicator/index.android.d.ts +0 -4
- package/build/components/activity-indicator/index.android.js +0 -10
- package/build/components/activity-indicator/index.d.ts +0 -1
- package/build/components/activity-indicator/index.ios.d.ts +0 -4
- package/build/components/activity-indicator/index.ios.js +0 -10
- package/build/components/activity-indicator/index.js +0 -4
- package/build/components/activity-indicator/shared.d.ts +0 -8
- package/build/components/activity-indicator/shared.js +0 -48
- package/build/components/button.d.ts +0 -14
- package/build/components/button.js +0 -61
- package/build/components/image-background.d.ts +0 -9
- package/build/components/image-background.js +0 -103
- package/build/components/image.d.ts +0 -9
- package/build/components/image.js +0 -90
- package/build/components/input-accessory-view.js +0 -41
- package/build/components/pressable.d.ts +0 -58
- package/build/components/pressable.js +0 -233
- package/build/components/refresh-control.d.ts +0 -20
- package/build/components/refresh-control.js +0 -47
- package/build/components/safe-area-view.d.ts +0 -9
- package/build/components/safe-area-view.js +0 -33
- package/build/components/scroll-view/index.android.d.ts +0 -4
- package/build/components/scroll-view/index.android.js +0 -64
- package/build/components/scroll-view/index.d.ts +0 -1
- package/build/components/scroll-view/index.ios.d.ts +0 -4
- package/build/components/scroll-view/index.ios.js +0 -17
- package/build/components/scroll-view/index.js +0 -4
- package/build/components/scroll-view/shared.js +0 -271
- package/build/components/scroll-view/sticky-header.d.ts +0 -7
- package/build/components/scroll-view/sticky-header.js +0 -208
- package/build/components/switch/index.android.d.ts +0 -12
- package/build/components/switch/index.android.js +0 -13
- package/build/components/switch/index.d.ts +0 -2
- package/build/components/switch/index.ios.d.ts +0 -12
- package/build/components/switch/index.ios.js +0 -11
- package/build/components/switch/index.js +0 -5
- package/build/components/switch/shared.d.ts +0 -23
- package/build/components/switch/shared.js +0 -126
- package/build/components/text-input/index.d.ts +0 -24
- package/build/components/text-input/index.js +0 -260
- package/build/components/touchable-native-feedback.d.ts +0 -24
- package/build/components/touchable-native-feedback.js +0 -82
- package/build/components/touchable.d.ts +0 -50
- package/build/components/touchable.js +0 -281
- package/build/components.d.ts +0 -53
- package/build/components.js +0 -45
- package/build/state-style.d.ts +0 -1
- package/build/state-style.js +0 -13
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
// scroll commands would silently no-op. The folded listState is a PLAIN object (not reactive) —
|
|
28
28
|
// mutating it never triggers Vue; the `version` ref is bumped when a transition changes render state.
|
|
29
29
|
import { computed, defineComponent, getCurrentInstance, h, isVNode, onBeforeUnmount, ref, shallowRef, watch, } from '@vue/runtime-core';
|
|
30
|
-
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, buildListPlan, buildViewabilityPairs, createInitialListState, isSeparatorGapInRange, listEffectSignature, readLayoutLength, readLayoutOffset, readScrollOffset, reduceList, resolveItemKey, } from '@symbiote-native/components';
|
|
31
|
-
import { dlog, } from '@symbiote-native/engine';
|
|
32
|
-
import { ScrollView } from '../scroll-view';
|
|
33
|
-
import { RefreshControl } from '../refresh-control.js';
|
|
30
|
+
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, buildListPlan, buildScrollViewHandle, buildViewabilityPairs, createInitialListState, isSeparatorGapInRange, listEffectSignature, readLayoutLength, readLayoutOffset, readScrollOffset, reduceList, resolveItemKey, } from '@symbiote-native/components';
|
|
31
|
+
import { dlog, isSymbioteNode, } from '@symbiote-native/engine';
|
|
34
32
|
import { normalizeVueAttrs } from '../../utils/normalize-attrs.js';
|
|
35
33
|
import { componentFromSlot } from '../../utils/slots-to-render-props.js';
|
|
36
34
|
// The typed inputs VirtualizedList reads off `props`; everything else (raw scroll, keyboard*,
|
|
@@ -74,9 +72,6 @@ const EMIT_KEYS = [
|
|
|
74
72
|
function isHandler(value) {
|
|
75
73
|
return typeof value === 'function';
|
|
76
74
|
}
|
|
77
|
-
function isRecord(value) {
|
|
78
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
79
|
-
}
|
|
80
75
|
function isComponent(value) {
|
|
81
76
|
return (typeof value === 'function' || (typeof value === 'object' && value !== null));
|
|
82
77
|
}
|
|
@@ -118,9 +113,6 @@ function renderSeparatorElement(component, leadingItem, trailingItem, overrides)
|
|
|
118
113
|
};
|
|
119
114
|
return h(component, props);
|
|
120
115
|
}
|
|
121
|
-
function isScrollViewHandle(value) {
|
|
122
|
-
return isRecord(value) && typeof value.scrollTo === 'function';
|
|
123
|
-
}
|
|
124
116
|
export const VirtualizedList = defineComponent((props, { attrs, expose, emit, slots, }) => {
|
|
125
117
|
// Bumped when a transition changes render-relevant state, so the `metrics` computed and the
|
|
126
118
|
// render fn re-run (listState is plain, non-reactive, so mutating it triggers nothing itself).
|
|
@@ -129,13 +121,17 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
129
121
|
// The offset we are imperatively driving native to. A fresh object identity each push so the
|
|
130
122
|
// commit path re-applies it even when the numeric value repeats. undefined = none pending.
|
|
131
123
|
const commandedOffset = ref(undefined);
|
|
132
|
-
// shallowRef, NOT ref:
|
|
133
|
-
// identity through the engine's WeakMap mirror. A deep ref would
|
|
134
|
-
// imperative scroll (scrollToOffset/Index/…) would miss the node
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
124
|
+
// shallowRef, NOT ref: `<scroll-view>` is a tag now, so its `ref` hands back the raw engine
|
|
125
|
+
// node directly, reached by identity through the engine's WeakMap mirror. A deep ref would
|
|
126
|
+
// proxy the object and every imperative scroll (scrollToOffset/Index/…) would miss the node
|
|
127
|
+
// and silently no-op.
|
|
128
|
+
const scrollNodeRef = shallowRef(null);
|
|
129
|
+
const setScrollNodeRef = (el) => {
|
|
130
|
+
scrollNodeRef.value = isSymbioteNode(el) ? el : null;
|
|
138
131
|
};
|
|
132
|
+
// Built once: `getNode` is lazy, read on every call, so this stays valid across the ref
|
|
133
|
+
// transitioning from null to the committed node.
|
|
134
|
+
const scrollHandle = buildScrollViewHandle(() => scrollNodeRef.value);
|
|
139
135
|
// The five list events are emits, so Vue strips their onX listeners from $attrs. Detect listener
|
|
140
136
|
// presence off the instance's own vnode props (what the parent passed), exactly like FlatList, so
|
|
141
137
|
// an emit bridge is wired ONLY when the consumer actually listens (preserving the RefreshControl /
|
|
@@ -243,10 +239,13 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
243
239
|
const targetOffset = p.horizontal
|
|
244
240
|
? { x: clamped, y: EMPTY_OFFSET }
|
|
245
241
|
: { x: EMPTY_OFFSET, y: clamped };
|
|
246
|
-
|
|
247
|
-
if (handle !== null) {
|
|
242
|
+
if (scrollNodeRef.value !== null) {
|
|
248
243
|
dlog(`Vue VirtualizedList scrollTo offset=${clamped} animated=${animated} (horizontal=${p.horizontal})`);
|
|
249
|
-
|
|
244
|
+
scrollHandle.scrollTo({
|
|
245
|
+
x: targetOffset.x,
|
|
246
|
+
y: targetOffset.y,
|
|
247
|
+
animated,
|
|
248
|
+
});
|
|
250
249
|
return;
|
|
251
250
|
}
|
|
252
251
|
dlog(`Vue VirtualizedList scrollTo offset=${clamped} pending-ref`);
|
|
@@ -411,12 +410,12 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
411
410
|
dispatch({ kind: 'scroll-to-end', animated: params?.animated ?? true });
|
|
412
411
|
},
|
|
413
412
|
flashScrollIndicators: () => {
|
|
414
|
-
scrollHandle.
|
|
413
|
+
scrollHandle.flashScrollIndicators();
|
|
415
414
|
},
|
|
416
|
-
getNativeScrollRef: () =>
|
|
417
|
-
getScrollableNode: () =>
|
|
418
|
-
getScrollResponder: () =>
|
|
419
|
-
getScrollNode: () =>
|
|
415
|
+
getNativeScrollRef: () => scrollNodeRef.value !== null ? scrollHandle : null,
|
|
416
|
+
getScrollableNode: () => scrollNodeRef.value !== null ? scrollHandle : null,
|
|
417
|
+
getScrollResponder: () => scrollNodeRef.value !== null ? scrollHandle : null,
|
|
418
|
+
getScrollNode: () => scrollNodeRef.value,
|
|
420
419
|
recordInteraction: () => {
|
|
421
420
|
dispatch({ kind: 'record-interaction' });
|
|
422
421
|
},
|
|
@@ -451,13 +450,13 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
451
450
|
: undefined;
|
|
452
451
|
const header = resolveElement(p.listHeaderComponent);
|
|
453
452
|
if (header !== undefined) {
|
|
454
|
-
children.push(h('
|
|
453
|
+
children.push(h('view', { key: 'list-header' }, [header]));
|
|
455
454
|
}
|
|
456
455
|
let renderedStickyIndices = [];
|
|
457
456
|
if (m.count === FIRST_INDEX) {
|
|
458
457
|
const empty = resolveElement(p.listEmptyComponent);
|
|
459
458
|
if (empty !== undefined) {
|
|
460
|
-
children.push(h('
|
|
459
|
+
children.push(h('view', { key: 'list-empty' }, [empty]));
|
|
461
460
|
}
|
|
462
461
|
}
|
|
463
462
|
else {
|
|
@@ -474,7 +473,7 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
474
473
|
});
|
|
475
474
|
renderedStickyIndices = plan.stickyChildPositions;
|
|
476
475
|
if (plan.leadingExtent > EMPTY_OFFSET) {
|
|
477
|
-
children.push(h('
|
|
476
|
+
children.push(h('view', {
|
|
478
477
|
key: 'spacer-leading',
|
|
479
478
|
style: p.horizontal
|
|
480
479
|
? { width: plan.leadingExtent }
|
|
@@ -512,7 +511,7 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
512
511
|
cell.index < m.count - 1
|
|
513
512
|
? renderSeparatorElement(p.itemSeparatorComponent, item, p.getItem(p.data, cell.index + 1), separatorOverrides.get(cell.index))
|
|
514
513
|
: undefined;
|
|
515
|
-
children.push(h('
|
|
514
|
+
children.push(h('view', {
|
|
516
515
|
key: `cell-${cell.key}`,
|
|
517
516
|
onLayout: makeCellMeasure(cell.index),
|
|
518
517
|
style: cellInverted,
|
|
@@ -524,7 +523,7 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
524
523
|
if (plan.forcedStickyCell !== undefined) {
|
|
525
524
|
pushCell(plan.forcedStickyCell);
|
|
526
525
|
if (plan.gapExtent > EMPTY_OFFSET) {
|
|
527
|
-
children.push(h('
|
|
526
|
+
children.push(h('view', {
|
|
528
527
|
key: 'spacer-gap',
|
|
529
528
|
style: p.horizontal
|
|
530
529
|
? { width: plan.gapExtent }
|
|
@@ -536,7 +535,7 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
536
535
|
pushCell(plan.cells[cellPos]);
|
|
537
536
|
}
|
|
538
537
|
if (plan.trailingExtent > EMPTY_OFFSET) {
|
|
539
|
-
children.push(h('
|
|
538
|
+
children.push(h('view', {
|
|
540
539
|
key: 'spacer-trailing',
|
|
541
540
|
style: p.horizontal
|
|
542
541
|
? { width: plan.trailingExtent }
|
|
@@ -546,7 +545,7 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
546
545
|
}
|
|
547
546
|
const footer = resolveElement(p.listFooterComponent);
|
|
548
547
|
if (footer !== undefined) {
|
|
549
|
-
children.push(h('
|
|
548
|
+
children.push(h('view', { key: 'list-footer' }, [footer]));
|
|
550
549
|
}
|
|
551
550
|
const resolvedContentContainerStyle = p.horizontal
|
|
552
551
|
? [p.contentContainerStyle, { width: m.total }]
|
|
@@ -554,14 +553,15 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
554
553
|
const resolvedStyle = p.inverted
|
|
555
554
|
? [p.style, p.horizontal ? INVERTED_X_STYLE : INVERTED_Y_STYLE]
|
|
556
555
|
: p.style;
|
|
556
|
+
// `horizontal` is NOT in the bag: the axis is the TAG (`horizontal-scroll-view`), so passing
|
|
557
|
+
// it would be redundant at best and a contradiction the behavior has to warn about at worst.
|
|
557
558
|
const scrollProps = {
|
|
558
559
|
...p.forwarded,
|
|
559
560
|
style: resolvedStyle,
|
|
560
561
|
contentContainerStyle: resolvedContentContainerStyle,
|
|
561
|
-
horizontal: p.horizontal,
|
|
562
562
|
onScroll,
|
|
563
563
|
onLayout: onViewportLayout,
|
|
564
|
-
ref:
|
|
564
|
+
ref: setScrollNodeRef,
|
|
565
565
|
};
|
|
566
566
|
// The raw scroll-lifecycle callbacks (onScrollBeginDrag/…) and scrollEventThrottle are NOT in
|
|
567
567
|
// PROP_KEYS, so they already ride through via ...p.forwarded. The keyboard props come from
|
|
@@ -588,18 +588,23 @@ export const VirtualizedList = defineComponent((props, { attrs, expose, emit, sl
|
|
|
588
588
|
(header !== undefined ? 1 : 0),
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
// Pull-to-refresh: when a @refresh listener is present,
|
|
592
|
-
//
|
|
591
|
+
// Pull-to-refresh: when a @refresh listener is present, the RefreshControl is an ordinary
|
|
592
|
+
// FIRST CHILD on both platforms rather than a prop — the scroll behavior CLAIMS it, so the
|
|
593
|
+
// engine keeps it beside the content view on iOS and inverts the tree on Android. The
|
|
593
594
|
// onRefresh bridge is gated on the listener, so an unlistened list builds no control.
|
|
595
|
+
let refreshControl;
|
|
594
596
|
if (p.onRefresh !== undefined) {
|
|
595
597
|
dlog('Vue VirtualizedList wiring RefreshControl (@refresh listened)');
|
|
596
|
-
|
|
598
|
+
refreshControl = h('refresh-control', {
|
|
597
599
|
refreshing: p.refreshing,
|
|
598
600
|
onRefresh: p.onRefresh,
|
|
599
601
|
progressViewOffset: p.progressViewOffset,
|
|
600
602
|
});
|
|
601
603
|
}
|
|
602
|
-
|
|
604
|
+
// The scroll TAG, not a wrapper: the engine builds the content node, carries
|
|
605
|
+
// `contentContainerStyle` onto it and places the refresh control. `ref` hands back the
|
|
606
|
+
// engine node, which is what `buildScrollViewHandle` drives for the imperative scrolls.
|
|
607
|
+
return h(p.horizontal ? 'horizontal-scroll-view' : 'scroll-view', scrollProps, refreshControl === undefined ? children : [refreshControl, ...children]);
|
|
603
608
|
};
|
|
604
609
|
}, {
|
|
605
610
|
name: 'VirtualizedList',
|
|
@@ -68,21 +68,21 @@ export type IVirtualizedSectionListEmits = {
|
|
|
68
68
|
refresh: () => void;
|
|
69
69
|
};
|
|
70
70
|
export declare const VirtualizedSectionList: new <ItemT>(props: (IVirtualizedSectionListProps<ItemT> & ({} | {
|
|
71
|
-
onRefresh?: (() => any) | undefined;
|
|
72
71
|
onEndReached?: ((info: {
|
|
73
72
|
distanceFromEnd: number;
|
|
74
73
|
}) => any) | undefined;
|
|
75
74
|
onStartReached?: ((info: {
|
|
76
75
|
distanceFromStart: number;
|
|
77
76
|
}) => any) | undefined;
|
|
78
|
-
})) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<IVirtualizedSectionListProps<ItemT> & ({} | {
|
|
79
77
|
onRefresh?: (() => any) | undefined;
|
|
78
|
+
})) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<IVirtualizedSectionListProps<ItemT> & ({} | {
|
|
80
79
|
onEndReached?: ((info: {
|
|
81
80
|
distanceFromEnd: number;
|
|
82
81
|
}) => any) | undefined;
|
|
83
82
|
onStartReached?: ((info: {
|
|
84
83
|
distanceFromStart: number;
|
|
85
84
|
}) => any) | undefined;
|
|
85
|
+
onRefresh?: (() => any) | undefined;
|
|
86
86
|
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} | IVirtualizedSectionListEmits, import("vue").PublicProps, {}, false, {}, import("vue").SlotsType<IVirtualizedSectionListSlots<ItemT>>, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
87
87
|
P: {};
|
|
88
88
|
B: {};
|
|
@@ -91,11 +91,11 @@ export declare const VirtualizedSectionList: new <ItemT>(props: (IVirtualizedSec
|
|
|
91
91
|
M: {};
|
|
92
92
|
Defaults: {};
|
|
93
93
|
}, (IVirtualizedSectionListProps<ItemT> & {}) | (IVirtualizedSectionListProps<ItemT> & {
|
|
94
|
-
onRefresh?: (() => any) | undefined;
|
|
95
94
|
onEndReached?: ((info: {
|
|
96
95
|
distanceFromEnd: number;
|
|
97
96
|
}) => any) | undefined;
|
|
98
97
|
onStartReached?: ((info: {
|
|
99
98
|
distanceFromStart: number;
|
|
100
99
|
}) => any) | undefined;
|
|
100
|
+
onRefresh?: (() => any) | undefined;
|
|
101
101
|
}), {}, {}, {}, {}, {}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The descriptor→element bridge for Vue. A render function in @symbiote-native/components returns
|
|
2
2
|
// a framework-agnostic `Descriptor` tree; this maps it onto Vue vnodes via h(). The host
|
|
3
|
-
// vnode (`
|
|
4
|
-
// renderer → engine → Fabric, exactly like a hand-written h('
|
|
3
|
+
// vnode (`view`, `activity-indicator`, …) flows on through the Vue custom
|
|
4
|
+
// renderer → engine → Fabric, exactly like a hand-written h('view'). The React
|
|
5
5
|
// twin is `adapters/react/src/descriptor-to-react.ts`.
|
|
6
6
|
import { h } from '@vue/runtime-core';
|
|
7
7
|
export function descriptorToVue(node) {
|
package/build/index.d.ts
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import './register';
|
|
2
|
+
export * from 'vue';
|
|
2
3
|
export { mount, unmount, setAppConfigurator } from './render';
|
|
3
4
|
export type { IAppConfigurator } from './render';
|
|
4
5
|
export { Teleport, type ITeleportTarget } from './create-portal';
|
|
5
6
|
export { createTunnel, type ITunnel } from './create-tunnel';
|
|
6
|
-
export {
|
|
7
|
+
export type { IViewProps } from './components/view-props';
|
|
8
|
+
export type { ITextProps } from './components/text-props';
|
|
9
|
+
export type { ISymbioteIntrinsicTag, ISymbioteHostAttributes, } from './intrinsic-elements';
|
|
7
10
|
export type { IAccessibilityProps, IAriaProps, IAccessibilityRole, IRole, IAccessibilityStateValue, IAccessibilityValue, IAccessibilityActionInfo, IResponderProps, } from '@symbiote-native/components';
|
|
8
11
|
export { findNodeHandle } from './host-instance';
|
|
9
12
|
export type { IHostInstance } from './host-instance';
|
|
10
|
-
export { Image
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
-
export type {
|
|
14
|
-
export {
|
|
15
|
-
export type { ISwitchProps, ISwitchTrackColor } from './components/switch';
|
|
16
|
-
export {
|
|
17
|
-
export type {
|
|
18
|
-
export {
|
|
19
|
-
export type {
|
|
20
|
-
export {
|
|
21
|
-
export type {
|
|
22
|
-
export {
|
|
23
|
-
export type {
|
|
24
|
-
export {
|
|
25
|
-
export type {
|
|
26
|
-
export { TextInput } from './components/text-input';
|
|
27
|
-
export type { ITextInputProps, ITextInputHandle, } from './components/text-input';
|
|
13
|
+
export { Image } from './modules/image';
|
|
14
|
+
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
15
|
+
export type { IImageProps } from './components/image-props';
|
|
16
|
+
export type { IImageSource, IImageSourceProp, IResizeMode, IImageSize, IImageCacheStatus, } from '@symbiote-native/components';
|
|
17
|
+
export type { IActivityIndicatorProps } from './components/activity-indicator-props';
|
|
18
|
+
export type { ISwitchProps, ISwitchTrackColor, ISwitchChangeEvent, } from './components/switch/switch-props';
|
|
19
|
+
export type { IScrollViewProps, IScrollViewHandle, } from './components/scroll-view/scroll-view-props';
|
|
20
|
+
export type { IPressableProps, IPressState, IPressableAndroidRippleConfig, } from './components/pressable-props';
|
|
21
|
+
export type { ITouchableOpacityProps, ITouchableHighlightProps, } from './components/touchable-props';
|
|
22
|
+
export type { ITouchableWithoutFeedbackProps } from './components/touchable-without-feedback-props';
|
|
23
|
+
export { TouchableNativeFeedback } from '@symbiote-native/components';
|
|
24
|
+
export type { INativeFeedbackBackground, IThemeAttrBackground, IRippleBackground, } from '@symbiote-native/components';
|
|
25
|
+
export type { ITouchableNativeFeedbackProps } from './components/touchable-native-feedback-props';
|
|
26
|
+
export type { IButtonProps } from './components/button-props';
|
|
27
|
+
export type { ITextInputProps } from './components/text-input/text-input-props';
|
|
28
|
+
export type { ITextInputHandle, ITextInputChangeEvent, } from '@symbiote-native/components';
|
|
28
29
|
export { VirtualizedList } from './components/virtualized-list';
|
|
29
30
|
export type { IVirtualizedListProps, IVirtualizedListSlots, IVirtualizedListEmits, IVirtualizedListHandle, ISeparators, ISeparatorProps, IViewToken, IViewableItemsChangedInfo, IViewabilityConfig, IViewabilityConfigCallbackPair, ICellLayout, } from './components/virtualized-list';
|
|
30
31
|
export { FlatList } from './components/flat-list';
|
|
@@ -33,19 +34,15 @@ export { VirtualizedSectionList } from './components/virtualized-section-list';
|
|
|
33
34
|
export type { IVirtualizedSectionListProps, IVirtualizedSectionListSlots, IVirtualizedSectionListEmits, IVirtualizedSectionListHandle, } from './components/virtualized-section-list';
|
|
34
35
|
export { SectionList } from './components/section-list';
|
|
35
36
|
export type { ISection, ISectionListProps, ISectionListSlots, ISectionListEmits, ISectionListHandle, } from './components/section-list';
|
|
36
|
-
export {
|
|
37
|
-
export type {
|
|
38
|
-
export { RefreshControl } from './components/refresh-control';
|
|
39
|
-
export type { IRefreshControlProps, IRefreshControlEmits, } from './components/refresh-control';
|
|
37
|
+
export type { ISafeAreaViewProps } from './components/safe-area-view-props';
|
|
38
|
+
export type { IRefreshControlProps } from './components/refresh-control-props';
|
|
40
39
|
export { descriptorToVue } from './descriptor-to-vue';
|
|
41
40
|
export { normalizeVueAttrs } from './utils/normalize-attrs';
|
|
42
41
|
export { resolveModelValue, emitModelUpdate } from './utils/model-binding';
|
|
43
42
|
export { createSymbioteRenderer } from './renderer';
|
|
44
43
|
export { Animated, createAnimatedComponent } from './modules/animated';
|
|
45
|
-
export {
|
|
46
|
-
export type {
|
|
47
|
-
export { InputAccessoryView } from './components/input-accessory-view';
|
|
48
|
-
export type { IInputAccessoryViewProps } from './components/input-accessory-view';
|
|
44
|
+
export type { IImageBackgroundProps } from './components/image-background-props';
|
|
45
|
+
export type { IInputAccessoryViewProps } from './components/input-accessory-view-props';
|
|
49
46
|
export { Modal } from './components/modal';
|
|
50
47
|
export type { IModalProps, IModalEmits, IModalAnimationType, IModalPresentationStyle, IModalOrientation, IModalOrientationChangeEvent, } from './components/modal';
|
|
51
48
|
export { KeyboardAvoidingView } from './components/keyboard-avoiding-view';
|
package/build/index.js
CHANGED
|
@@ -2,10 +2,31 @@
|
|
|
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
4
|
// Side-effect import, FIRST and deliberately not a re-export: it installs the engine-side press
|
|
5
|
-
// machine that a lowered `<
|
|
5
|
+
// machine that a lowered `<pressable>` needs. `export * from './register'` or a bare
|
|
6
6
|
// import sitting beside a re-export of the same specifier both go lazy under Metro's production
|
|
7
7
|
// `inlineRequires` and the registration silently never runs in a release build. See register.ts.
|
|
8
8
|
import './register.js';
|
|
9
|
+
// Re-exports Vue's ENTIRE public API (ref, computed, defineComponent, unref, …), which looks like
|
|
10
|
+
// scope creep on an otherwise carefully curated barrel — it is not ergonomics, it is what makes
|
|
11
|
+
// `vueCompilerOptions.lib: "@symbiote-native/vue"` (examples/*/tsconfig.typecheck.json) safe to
|
|
12
|
+
// set. Volar/`@vue/language-core` generates virtual TS referencing `import(lib).unref`,
|
|
13
|
+
// `import(lib).GlobalComponents`, `.GlobalDirectives`, `.ShallowRef`, `.ObjectDirective` — always
|
|
14
|
+
// off `lib`'s ROOT import, never a subpath — so pointing `lib` at us without this line breaks
|
|
15
|
+
// EVERY `.vue` SFC's template check with `Cannot find name` the moment Volar's codegen touches any
|
|
16
|
+
// of them. `lib`'s other consumer, `optionsWrapper`'s `(await import(lib)).defineComponent(...)`,
|
|
17
|
+
// only fires for a plain `<script>` `export default {}` block (`isExportRawObject`,
|
|
18
|
+
// `@vue/language-core/lib/codegen/script/index.js`) — every `.vue` file in this repo uses
|
|
19
|
+
// `<script setup>`, so that branch never runs and defineComponent needing to resolve from here too
|
|
20
|
+
// is moot in practice, not something this wildcard has to get right on its own.
|
|
21
|
+
//
|
|
22
|
+
// WHY `lib` NEEDS TO BE US AT ALL: plain `"vue"` (Volar's default) types `__VLS_IntrinsicElements`
|
|
23
|
+
// and `GlobalComponents` off `vue`'s own `jsx-runtime`/ambient augmentation — the SAME
|
|
24
|
+
// `view`/`text`/`image`/`switch`-collide-with-real-SVG-elements problem documented in
|
|
25
|
+
// `jsx-runtime.ts` and `intrinsic-elements.ts`, but for `.vue` TEMPLATES rather than TSX. Volar's
|
|
26
|
+
// native-vs-component branch (`!isNativeTag(tag)`) reads `IntrinsicElements` from
|
|
27
|
+
// `import('${lib}/jsx-runtime')`, so redirecting `lib` to our own package is what finally reaches
|
|
28
|
+
// OUR jsx-runtime.ts (real `IViewProps`/`ITextProps`/… on all 4 collision tags) for those four.
|
|
29
|
+
export * from 'vue';
|
|
9
30
|
export { mount, unmount, setAppConfigurator } from './render.js';
|
|
10
31
|
// The portal: Vue's own <Teleport>, guarded so `to` must be a node/surface this renderer actually
|
|
11
32
|
// mounted (there is no querySelector). It MOVES host nodes, so it reaches any already-mounted
|
|
@@ -15,26 +36,22 @@ export { mount, unmount, setAppConfigurator } from './render.js';
|
|
|
15
36
|
// into an <Out/> the destination has to render. See create-portal/index.ts.
|
|
16
37
|
export { Teleport } from './create-portal/index.js';
|
|
17
38
|
export { createTunnel } from './create-tunnel/index.js';
|
|
18
|
-
export { View, Text } from './components.js';
|
|
19
39
|
// IHostInstance is the raw engine node (Vue host refs fall through to it; imperative methods
|
|
20
40
|
// live on each component's expose() handle).
|
|
21
41
|
export { findNodeHandle } from './host-instance/index.js';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export {
|
|
42
|
+
// `Image` is a TAG — `<image>`. What survives the name is the STATICS namespace, and it lives in
|
|
43
|
+
// `modules/` beside Alert/Share because it carries no view; the prop type stays, for a component
|
|
44
|
+
// forwarding a bag.
|
|
45
|
+
export { Image } from './modules/image/index.js';
|
|
46
|
+
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
47
|
+
// `TouchableNativeFeedback` is now RN's STATIC NAMESPACE, not a component: the element is the tag
|
|
48
|
+
// `<touchable-native-feedback>`, which commits no node of its own and clones onto its single child.
|
|
49
|
+
// `TouchableNativeFeedback.Ripple(…)` / `.SelectableBackground(…)` are unchanged.
|
|
50
|
+
export { TouchableNativeFeedback } from '@symbiote-native/components';
|
|
31
51
|
export { VirtualizedList } from './components/virtualized-list/index.js';
|
|
32
52
|
export { FlatList } from './components/flat-list/index.js';
|
|
33
53
|
export { VirtualizedSectionList } from './components/virtualized-section-list/index.js';
|
|
34
54
|
export { SectionList } from './components/section-list/index.js';
|
|
35
|
-
// RefreshControl hosts the wrapped scroll view via its default slot.
|
|
36
|
-
export { SafeAreaView } from './components/safe-area-view.js';
|
|
37
|
-
export { RefreshControl } from './components/refresh-control.js';
|
|
38
55
|
export { descriptorToVue } from './descriptor-to-vue.js';
|
|
39
56
|
// Exported so an external wrapper package (e.g. @symbiote-native/slider/vue over a third-party
|
|
40
57
|
// native view) can fold its incoming attrs/v-model through the SAME transform rather than
|
|
@@ -43,8 +60,6 @@ export { normalizeVueAttrs } from './utils/normalize-attrs.js';
|
|
|
43
60
|
export { resolveModelValue, emitModelUpdate } from './utils/model-binding.js';
|
|
44
61
|
export { createSymbioteRenderer } from './renderer/index.js';
|
|
45
62
|
export { Animated, createAnimatedComponent } from './modules/animated/index.js';
|
|
46
|
-
export { ImageBackground } from './components/image-background.js';
|
|
47
|
-
export { InputAccessoryView } from './components/input-accessory-view.js';
|
|
48
63
|
export { Modal } from './components/modal/index.js';
|
|
49
64
|
export { KeyboardAvoidingView } from './components/keyboard-avoiding-view.js';
|
|
50
65
|
export { StatusBar } from './modules/status-bar.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PublicProps } from '@vue/runtime-core';
|
|
2
|
+
import type { ISymbioteIntrinsic, ICrossTypedIntrinsics } from '@symbiote-native/components';
|
|
3
|
+
import type { ICrossedPrimitiveProps } from './jsx-runtime';
|
|
4
|
+
export interface ISymbioteHostAttributes {
|
|
5
|
+
[attribute: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
type IDefineIntrinsic<Props> = new () => {
|
|
8
|
+
/** @deprecated Template prop types only — this property does not exist at runtime. */
|
|
9
|
+
$props: Props & PublicProps;
|
|
10
|
+
};
|
|
11
|
+
type IDefineIntrinsicMap<M> = {
|
|
12
|
+
[K in keyof M]: IDefineIntrinsic<M[K]>;
|
|
13
|
+
};
|
|
14
|
+
declare module 'vue' {
|
|
15
|
+
interface GlobalComponents extends ICrossTypedIntrinsics<IDefineIntrinsic<ISymbioteHostAttributes>, IDefineIntrinsicMap<ICrossedPrimitiveProps>> {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export type ISymbioteIntrinsicTag = ISymbioteIntrinsic;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { VNode } from '@vue/runtime-core';
|
|
2
|
+
import type { ICrossTypedIntrinsics } from '@symbiote-native/components';
|
|
3
|
+
import type { IViewProps } from './components/view-props';
|
|
4
|
+
import type { ITextProps } from './components/text-props';
|
|
5
|
+
import type { IPressableProps } from './components/pressable-props';
|
|
6
|
+
import type { IButtonProps } from './components/button-props';
|
|
7
|
+
import type { IImageProps } from './components/image-props';
|
|
8
|
+
import type { IImageBackgroundProps } from './components/image-background-props';
|
|
9
|
+
import type { IInputAccessoryViewProps } from './components/input-accessory-view-props';
|
|
10
|
+
import type { IRefreshControlProps } from './components/refresh-control-props';
|
|
11
|
+
import type { ISafeAreaViewProps } from './components/safe-area-view-props';
|
|
12
|
+
import type { ITouchableNativeFeedbackProps } from './components/touchable-native-feedback-props';
|
|
13
|
+
import type { ITouchableOpacityProps, ITouchableHighlightProps } from './components/touchable-props';
|
|
14
|
+
import type { ITouchableWithoutFeedbackProps } from './components/touchable-without-feedback-props';
|
|
15
|
+
import type { IScrollViewProps } from './components/scroll-view/scroll-view-props';
|
|
16
|
+
import type { ISwitchProps } from './components/switch/switch-props';
|
|
17
|
+
import type { ITextInputProps } from './components/text-input/text-input-props';
|
|
18
|
+
import type { IModalProps } from './components/modal';
|
|
19
|
+
import type { IActivityIndicatorProps } from './components/activity-indicator-props';
|
|
20
|
+
export {};
|
|
21
|
+
export interface ICrossedPrimitiveProps {
|
|
22
|
+
view: IViewProps;
|
|
23
|
+
text: ITextProps;
|
|
24
|
+
pressable: IPressableProps;
|
|
25
|
+
button: IButtonProps;
|
|
26
|
+
image: IImageProps;
|
|
27
|
+
'image-background': IImageBackgroundProps;
|
|
28
|
+
'input-accessory-view': IInputAccessoryViewProps;
|
|
29
|
+
'refresh-control': IRefreshControlProps;
|
|
30
|
+
'safe-area-view': ISafeAreaViewProps;
|
|
31
|
+
'touchable-native-feedback': ITouchableNativeFeedbackProps;
|
|
32
|
+
'touchable-opacity': ITouchableOpacityProps;
|
|
33
|
+
'touchable-highlight': ITouchableHighlightProps;
|
|
34
|
+
'touchable-without-feedback': ITouchableWithoutFeedbackProps;
|
|
35
|
+
'scroll-view': IScrollViewProps;
|
|
36
|
+
switch: ISwitchProps;
|
|
37
|
+
'text-input': ITextInputProps;
|
|
38
|
+
modal: IModalProps;
|
|
39
|
+
'activity-indicator': IActivityIndicatorProps;
|
|
40
|
+
}
|
|
41
|
+
interface IHostAttributes {
|
|
42
|
+
[attribute: string]: unknown;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace JSX {
|
|
45
|
+
export interface Element extends VNode {
|
|
46
|
+
}
|
|
47
|
+
export interface ElementClass {
|
|
48
|
+
$props: {};
|
|
49
|
+
}
|
|
50
|
+
export interface ElementAttributesProperty {
|
|
51
|
+
$props: {};
|
|
52
|
+
}
|
|
53
|
+
export interface IntrinsicAttributes {
|
|
54
|
+
key?: string | number | symbol;
|
|
55
|
+
[name: string]: unknown;
|
|
56
|
+
}
|
|
57
|
+
type IWithJsxAttrs<Props> = Props & {
|
|
58
|
+
key?: string | number | symbol;
|
|
59
|
+
ref?: import('@vue/runtime-core').VNodeRef;
|
|
60
|
+
};
|
|
61
|
+
export interface IntrinsicElements extends ICrossTypedIntrinsics<IHostAttributes, {
|
|
62
|
+
[K in keyof ICrossedPrimitiveProps]: IWithJsxAttrs<ICrossedPrimitiveProps[K]>;
|
|
63
|
+
}> {
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
66
|
+
}
|
|
67
|
+
export type ISymbioteIntrinsicTag = keyof JSX.IntrinsicElements;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,7 +50,9 @@ export declare const Animated: {
|
|
|
50
50
|
Image: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
51
51
|
[key: string]: any;
|
|
52
52
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
53
|
-
ScrollView:
|
|
53
|
+
ScrollView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
56
|
FlatList: ReturnType<typeof createAnimatedComponent>;
|
|
55
57
|
SectionList: ReturnType<typeof createAnimatedComponent>;
|
|
56
58
|
createAnimatedComponent: typeof createAnimatedComponent;
|
|
@@ -4,25 +4,29 @@
|
|
|
4
4
|
// meet here so `Animated.timing(new Animated.Value(0), ...).start()` works against the
|
|
5
5
|
// 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.js';
|
|
8
|
-
import { Image } from '../../components/image.js';
|
|
9
|
-
import { ScrollView } from '../../components/scroll-view';
|
|
10
7
|
import { FlatList } from '../../components/flat-list/index.js';
|
|
11
8
|
import { SectionList } from '../../components/section-list/index.js';
|
|
12
9
|
import { createAnimatedComponent } from './create-animated-component.js';
|
|
13
10
|
export { createAnimatedComponent } from './create-animated-component.js';
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
// The TAGS, not components — there are no View/Text/Image components left to alias, and a string
|
|
12
|
+
// base is what `createAnimatedComponent` already handles (`animated-tag-base.test.ts`): it renders
|
|
13
|
+
// the intrinsic and the ref falls through to the raw engine node, the same fall-through the
|
|
14
|
+
// functional wrappers used to provide.
|
|
15
|
+
//
|
|
16
|
+
// Wrapping is itself vestigial — the engine resolves an AnimatedNode written into any prop of any
|
|
17
|
+
// host node (`core/engine/src/animated/host-binding.ts`), so `<view :style="{ opacity: v }">` needs
|
|
18
|
+
// no wrapper at all. These stay as RN-compatible aliases until the namespace is retired.
|
|
19
|
+
const AnimatedView = createAnimatedComponent('view');
|
|
20
|
+
const AnimatedText = createAnimatedComponent('text');
|
|
21
|
+
const AnimatedImage = createAnimatedComponent('image');
|
|
22
|
+
// `scroll-view` is a TAG now too (no more component, no more scroll-view/sticky-header cycle to
|
|
23
|
+
// dodge), so it takes the same eager shape as View/Text/Image above.
|
|
24
|
+
const AnimatedScrollView = createAnimatedComponent('scroll-view');
|
|
25
|
+
// LAZY, memoized getters, mirroring RN's `get FlatList()`. Kept deferred past module init even
|
|
26
|
+
// though the scroll-view cycle these once rode is gone (ScrollView above is eager now) — neither
|
|
27
|
+
// FlatList nor VirtualizedList imports this module, so there is no proven cycle left, but nothing
|
|
28
|
+
// forces one to stay absent either. Cheap insurance against a half-evaluated module handing back
|
|
29
|
+
// `undefined` and rendering nothing.
|
|
26
30
|
let animatedFlatList;
|
|
27
31
|
let animatedSectionList;
|
|
28
32
|
// The live, JS-driven driver namespace (real frames). RN's AnimatedImplementation.
|
|
@@ -58,10 +62,7 @@ export const Animated = {
|
|
|
58
62
|
View: AnimatedView,
|
|
59
63
|
Text: AnimatedText,
|
|
60
64
|
Image: AnimatedImage,
|
|
61
|
-
|
|
62
|
-
animatedScrollView ??= createAnimatedComponent(ScrollView);
|
|
63
|
-
return animatedScrollView;
|
|
64
|
-
},
|
|
65
|
+
ScrollView: AnimatedScrollView,
|
|
65
66
|
get FlatList() {
|
|
66
67
|
animatedFlatList ??= createAnimatedComponent(FlatList);
|
|
67
68
|
return animatedFlatList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// RN's Image STATICS — `getSize`, `prefetch`, `queryCache`, `abortPrefetch`, `resolveAssetSource`.
|
|
2
|
+
//
|
|
3
|
+
// IN `modules/`, NOT `components/`. The primitive is the `<image>` tag and its fold runs in the
|
|
4
|
+
// engine (`behaviors/image.ts`); what is left under the name `Image` is an imperative API with no
|
|
5
|
+
// view, which is what this bucket is for. Sitting in `components/` made a statics object read as a
|
|
6
|
+
// component.
|
|
7
|
+
//
|
|
8
|
+
// A NAMESPACE OBJECT rather than five bare functions, deliberately: `Alert`, `Share`, `Linking`
|
|
9
|
+
// and `Vibration` are all `export const X = {…}`, and an app porting from RN writes
|
|
10
|
+
// `Image.getSize(...)` verbatim. Shared verbatim via `imageStatics`, the same source every other
|
|
11
|
+
// adapter's Image uses.
|
|
12
|
+
import { imageStatics } from '@symbiote-native/components';
|
|
13
|
+
export const Image = imageStatics;
|
package/build/register.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@symbiote-native/components/register';
|