@symbiote-native/vue 3.3.0 → 3.4.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/build/components/flat-list/index.d.ts +4 -3
- package/build/components/flat-list/index.js +18 -21
- package/build/components/input-accessory-view-props.d.ts +4 -4
- package/build/components/keyboard-avoiding-view.d.ts +11 -3
- package/build/components/keyboard-avoiding-view.js +38 -69
- package/build/components/layout-conformance-props.d.ts +4 -0
- package/build/components/layout-conformance-props.js +1 -0
- package/build/components/modal/index.d.ts +18 -5
- package/build/components/modal/index.js +53 -24
- package/build/components/refresh-control-props.d.ts +7 -7
- package/build/components/scroll-view/scroll-view-props.d.ts +8 -5
- package/build/components/section-list/index.d.ts +1 -1
- package/build/components/section-list/index.js +2 -6
- package/build/components/text-props.d.ts +3 -3
- package/build/components/touchable-props.d.ts +6 -6
- package/build/components/virtualized-list/index.d.ts +5 -75
- package/build/components/virtualized-list/index.js +130 -558
- package/build/components/virtualized-list/list-children.d.ts +18 -0
- package/build/components/virtualized-list/list-children.js +81 -0
- package/build/components/virtualized-list/list-elements.d.ts +7 -0
- package/build/components/virtualized-list/list-elements.js +29 -0
- package/build/components/virtualized-list/list-scroll-props.d.ts +20 -0
- package/build/components/virtualized-list/list-scroll-props.js +9 -0
- package/build/components/virtualized-list/narrow-props.d.ts +79 -0
- package/build/components/virtualized-list/narrow-props.js +89 -0
- package/build/components/virtualized-list/nested-scope.d.ts +3 -0
- package/build/components/virtualized-list/nested-scope.js +12 -0
- package/build/components/virtualized-list/user-handlers.d.ts +3 -0
- package/build/components/virtualized-list/user-handlers.js +24 -0
- package/build/components/virtualized-list/virtualized-list-props.d.ts +82 -0
- package/build/components/virtualized-list/virtualized-list-props.js +41 -0
- package/build/components/virtualized-section-list/index.d.ts +20 -5
- package/build/components/virtualized-section-list/index.js +81 -95
- package/build/components/virtualized-section-list/section-item-cell.d.ts +18 -0
- package/build/components/virtualized-section-list/section-item-cell.js +52 -0
- package/build/composables/use-animated-value.d.ts +7 -0
- package/build/composables/use-animated-value.js +14 -0
- package/build/composables/use-color-scheme.d.ts +1 -1
- package/build/create-transition/index.d.ts +2 -2
- package/build/create-transition/index.js +1 -1
- package/build/index.d.ts +13 -4
- package/build/index.js +16 -31
- package/build/modules/animated/index.d.ts +54 -41
- package/build/modules/animated/index.js +2 -26
- package/build/modules/app-registry/index.d.ts +3 -3
- package/build/modules/app-registry/index.js +2 -2
- package/build/modules/status-bar.js +22 -24
- package/metro-vue-transformer.cjs +165 -224
- package/package.json +6 -6
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// from @symbiote-native/engine (framework-agnostic, JS-driven), spread in verbatim. Both halves
|
|
4
4
|
// meet here so `Animated.timing(new Animated.Value(0), ...).start()` works against the
|
|
5
5
|
// Vue-driven engine.
|
|
6
|
-
import {
|
|
6
|
+
import { AnimatedDrivers, AnimatedMock, Platform, } from '@symbiote-native/engine';
|
|
7
7
|
import { FlatList } from '../../components/flat-list/index.js';
|
|
8
8
|
import { SectionList } from '../../components/section-list/index.js';
|
|
9
9
|
import { createAnimatedComponent } from './create-animated-component.js';
|
|
@@ -29,35 +29,11 @@ const AnimatedScrollView = createAnimatedComponent('scroll-view');
|
|
|
29
29
|
// `undefined` and rendering nothing.
|
|
30
30
|
let animatedFlatList;
|
|
31
31
|
let animatedSectionList;
|
|
32
|
-
// The live, JS-driven driver namespace (real frames). RN's AnimatedImplementation.
|
|
33
|
-
const liveDrivers = {
|
|
34
|
-
Value: AnimatedValue,
|
|
35
|
-
ValueXY: AnimatedValueXY,
|
|
36
|
-
Color: AnimatedColor,
|
|
37
|
-
Easing,
|
|
38
|
-
timing,
|
|
39
|
-
spring,
|
|
40
|
-
decay,
|
|
41
|
-
parallel,
|
|
42
|
-
sequence,
|
|
43
|
-
stagger,
|
|
44
|
-
loop,
|
|
45
|
-
delay,
|
|
46
|
-
add,
|
|
47
|
-
subtract,
|
|
48
|
-
multiply,
|
|
49
|
-
divide,
|
|
50
|
-
modulo,
|
|
51
|
-
diffClamp,
|
|
52
|
-
event,
|
|
53
|
-
forkEvent,
|
|
54
|
-
unforkEvent,
|
|
55
|
-
};
|
|
56
32
|
// RN swaps the WHOLE driver namespace for the mock when the host reports isDisableAnimations
|
|
57
33
|
// (reduced motion/test env): the mock keeps the same surface but jumps each animation to its
|
|
58
34
|
// final value synchronously, no frames. The animated COMPONENTS stay live in both branches; only
|
|
59
35
|
// the drivers/value/operators/events half is swapped.
|
|
60
|
-
const drivers = Platform.isDisableAnimations ? AnimatedMock :
|
|
36
|
+
const drivers = Platform.isDisableAnimations ? AnimatedMock : AnimatedDrivers;
|
|
61
37
|
export const Animated = {
|
|
62
38
|
View: AnimatedView,
|
|
63
39
|
Text: AnimatedText,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Component } from '@vue/runtime-core';
|
|
2
|
-
import { type IAppParameters } from '@symbiote-native/engine';
|
|
2
|
+
import { HeadlessJsTaskError, type IAppParameters } from '@symbiote-native/engine';
|
|
3
3
|
export type IComponentProvider = () => Component;
|
|
4
4
|
export type IWrapperComponentProvider = (appParameters: IAppParameters) => Component;
|
|
5
5
|
declare const AppRegistry: import("@symbiote-native/engine").IAppRegistry<IComponentProvider, IWrapperComponentProvider>, setHostRegistrar: (registrar: import("@symbiote-native/engine").IHostRegistrar) => void;
|
|
6
|
-
export { AppRegistry, setHostRegistrar };
|
|
7
|
-
export type { IAppParameters, IRunnable, IHostRegistrar, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from '@symbiote-native/engine';
|
|
6
|
+
export { AppRegistry, HeadlessJsTaskError, setHostRegistrar };
|
|
7
|
+
export type { IAppConfig, IAppParameters, IRunnable, IHostRegistrar, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from '@symbiote-native/engine';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// functional root (h() has no createElement-style prop/children spread of its own targets, so
|
|
7
7
|
// the wrap step is a render function rather than an object merge).
|
|
8
8
|
import { h, } from '@vue/runtime-core';
|
|
9
|
-
import { createAppRegistry, dlog, } from '@symbiote-native/engine';
|
|
9
|
+
import { createAppRegistry, dlog, HeadlessJsTaskError, } from '@symbiote-native/engine';
|
|
10
10
|
import { mount } from '../../render.js';
|
|
11
11
|
function runnableFor(componentProvider, getWrapperComponentProvider) {
|
|
12
12
|
return appParameters => {
|
|
@@ -27,4 +27,4 @@ function runnableFor(componentProvider, getWrapperComponentProvider) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const { AppRegistry, setHostRegistrar } = createAppRegistry(runnableFor);
|
|
30
|
-
export { AppRegistry, setHostRegistrar };
|
|
30
|
+
export { AppRegistry, HeadlessJsTaskError, setHostRegistrar };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
// StatusBar, the
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// component that renders NOTHING and re-applies the props through a watchEffect on mount + every
|
|
6
|
-
// prop change, with the imperative statics attached to the component object.
|
|
7
|
-
//
|
|
8
|
-
// Inputs arrive as attrs (untyped) and run through normalizeVueAttrs before each is narrowed by a guard.
|
|
9
|
-
import { defineComponent, watchEffect, } from '@vue/runtime-core';
|
|
10
|
-
import { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight, isOpaqueColorValue, } from '@symbiote-native/engine';
|
|
1
|
+
// Vue half of StatusBar, the props stack and statics live in the engine. It renders nothing, keeps
|
|
2
|
+
// one stack entry through `watchEffect` and releases it on unmount
|
|
3
|
+
import { defineComponent, onUnmounted, watchEffect, } from '@vue/runtime-core';
|
|
4
|
+
import { createStatusBarEntry, statusBarImperative, statusBarCurrentHeight, isProcessableColor, } from '@symbiote-native/engine';
|
|
11
5
|
import { normalizeVueAttrs } from '../utils/normalize-attrs.js';
|
|
6
|
+
const TRANSITIONS = [
|
|
7
|
+
'none',
|
|
8
|
+
'fade',
|
|
9
|
+
'slide',
|
|
10
|
+
];
|
|
12
11
|
function asBoolean(value) {
|
|
13
12
|
return typeof value === 'boolean' ? value : undefined;
|
|
14
13
|
}
|
|
@@ -19,20 +18,19 @@ function asBarStyle(value) {
|
|
|
19
18
|
? value
|
|
20
19
|
: undefined;
|
|
21
20
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
return value;
|
|
25
|
-
if (isOpaqueColorValue(value))
|
|
26
|
-
return value;
|
|
27
|
-
return undefined;
|
|
21
|
+
function asTransition(value) {
|
|
22
|
+
return TRANSITIONS.find(transition => transition === value);
|
|
28
23
|
}
|
|
29
24
|
function buildProps(attrs) {
|
|
30
25
|
return {
|
|
31
26
|
barStyle: asBarStyle(attrs.barStyle),
|
|
32
27
|
hidden: asBoolean(attrs.hidden),
|
|
33
28
|
animated: asBoolean(attrs.animated),
|
|
29
|
+
showHideTransition: asTransition(attrs.showHideTransition),
|
|
34
30
|
networkActivityIndicatorVisible: asBoolean(attrs.networkActivityIndicatorVisible),
|
|
35
|
-
backgroundColor:
|
|
31
|
+
backgroundColor: isProcessableColor(attrs.backgroundColor)
|
|
32
|
+
? attrs.backgroundColor
|
|
33
|
+
: undefined,
|
|
36
34
|
translucent: asBoolean(attrs.translucent),
|
|
37
35
|
};
|
|
38
36
|
}
|
|
@@ -40,21 +38,21 @@ const StatusBarComponent = defineComponent({
|
|
|
40
38
|
name: 'StatusBar',
|
|
41
39
|
inheritAttrs: false,
|
|
42
40
|
setup(_props, { attrs: rawAttrs }) {
|
|
43
|
-
|
|
44
|
-
//
|
|
41
|
+
const entry = createStatusBarEntry();
|
|
42
|
+
// `rawAttrs` is reactive, so every prop change replaces this entry
|
|
45
43
|
watchEffect(() => {
|
|
46
|
-
|
|
44
|
+
entry.apply(buildProps(normalizeVueAttrs(rawAttrs)));
|
|
47
45
|
});
|
|
46
|
+
// Popping restores what the stack held below this entry
|
|
47
|
+
onUnmounted(() => entry.release());
|
|
48
48
|
return () => null;
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
51
|
const StatusBarWithStatics = Object.assign(StatusBarComponent, statusBarImperative);
|
|
52
|
-
//
|
|
53
|
-
// (getter) so nothing touches native at import time; the Android engine impl resolves on access.
|
|
52
|
+
// A getter, not a value, so nothing touches native at import time
|
|
54
53
|
Object.defineProperty(StatusBarWithStatics, 'currentHeight', {
|
|
55
54
|
get: statusBarCurrentHeight,
|
|
56
55
|
enumerable: true,
|
|
57
56
|
});
|
|
58
|
-
// currentHeight is optional, so the
|
|
59
|
-
// runtime object's inferred type for this assignment to hold (no cast).
|
|
57
|
+
// `currentHeight` is optional, so the accessor need not appear on the inferred type (no cast)
|
|
60
58
|
export const StatusBar = StatusBarWithStatics;
|