@getcortexlabs/mavis 0.1.0-alpha.7 → 0.1.0-alpha.8
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 +5 -5
- package/dist/native/collection-motion.d.ts +5 -0
- package/dist/native/collection-motion.d.ts.map +1 -0
- package/dist/native/collection-motion.js +157 -0
- package/dist/native/collection-motion.js.map +1 -0
- package/dist/native/image-effects.d.ts +11 -0
- package/dist/native/image-effects.d.ts.map +1 -0
- package/dist/native/image-effects.js +61 -0
- package/dist/native/image-effects.js.map +1 -0
- package/dist/native/motion-region.d.ts.map +1 -1
- package/dist/native/motion-region.js +7 -2
- package/dist/native/motion-region.js.map +1 -1
- package/dist/native/motion-surface.d.ts +2 -2
- package/dist/native/motion-surface.d.ts.map +1 -1
- package/dist/native/motion-surface.js +44 -1
- package/dist/native/motion-surface.js.map +1 -1
- package/dist/native/platform-motion.d.ts +5 -0
- package/dist/native/platform-motion.d.ts.map +1 -0
- package/dist/native/platform-motion.js +90 -0
- package/dist/native/platform-motion.js.map +1 -0
- package/dist/native/surface-effects.d.ts +4 -0
- package/dist/native/surface-effects.d.ts.map +1 -0
- package/dist/native/surface-effects.js +31 -0
- package/dist/native/surface-effects.js.map +1 -0
- package/dist/native/visual-effects.d.ts +5 -0
- package/dist/native/visual-effects.d.ts.map +1 -0
- package/dist/native/visual-effects.js +126 -0
- package/dist/native/visual-effects.js.map +1 -0
- package/dist/vue/components/LoadingDecoration.d.ts +116 -0
- package/dist/vue/components/LoadingDecoration.d.ts.map +1 -0
- package/dist/vue/components/LoadingDecoration.js +34 -0
- package/dist/vue/components/LoadingDecoration.js.map +1 -0
- package/dist/vue/components/MAlert.d.ts +1 -1
- package/dist/vue/components/MAvatar.d.ts +1 -1
- package/dist/vue/components/MButton.d.ts +32 -10
- package/dist/vue/components/MButton.d.ts.map +1 -1
- package/dist/vue/components/MButton.js +29 -2
- package/dist/vue/components/MButton.js.map +1 -1
- package/dist/vue/components/MCard.d.ts +4 -4
- package/dist/vue/components/MChip.d.ts +1 -1
- package/dist/vue/components/MCombobox.d.ts +2 -2
- package/dist/vue/components/MDialog.d.ts +3 -0
- package/dist/vue/components/MDialog.d.ts.map +1 -1
- package/dist/vue/components/MEmptyState.d.ts +1 -1
- package/dist/vue/components/MIcon.d.ts +18 -0
- package/dist/vue/components/MIcon.d.ts.map +1 -1
- package/dist/vue/components/MIcon.js +13 -2
- package/dist/vue/components/MIcon.js.map +1 -1
- package/dist/vue/components/MImage.d.ts +12 -1
- package/dist/vue/components/MImage.d.ts.map +1 -1
- package/dist/vue/components/MImage.js +58 -3
- package/dist/vue/components/MImage.js.map +1 -1
- package/dist/vue/components/MInput.d.ts +4 -4
- package/dist/vue/components/MLink.d.ts +2 -2
- package/dist/vue/components/MListItem.d.ts +1 -1
- package/dist/vue/components/MReveal.d.ts +9 -9
- package/dist/vue/components/MScreen.d.ts +11 -1
- package/dist/vue/components/MScreen.d.ts.map +1 -1
- package/dist/vue/components/MScreen.js +26 -4
- package/dist/vue/components/MScreen.js.map +1 -1
- package/dist/vue/components/MSelect.d.ts +1 -1
- package/dist/vue/components/MSheet.d.ts +4 -4
- package/dist/vue/components/MSkeleton.d.ts +12 -1
- package/dist/vue/components/MSkeleton.d.ts.map +1 -1
- package/dist/vue/components/MSkeleton.js +5 -3
- package/dist/vue/components/MSkeleton.js.map +1 -1
- package/dist/vue/components/MStack.d.ts +9 -9
- package/dist/vue/components/MText.d.ts +11 -0
- package/dist/vue/components/MText.d.ts.map +1 -1
- package/dist/vue/components/MText.js +3 -1
- package/dist/vue/components/MText.js.map +1 -1
- package/dist/vue/components/layout.d.ts +30 -19
- package/dist/vue/components/layout.d.ts.map +1 -1
- package/dist/vue/components/layout.js +3 -1
- package/dist/vue/components/layout.js.map +1 -1
- package/dist/vue/use-motion-surface.d.ts +1 -1
- package/dist/vue/use-motion-surface.d.ts.map +1 -1
- package/dist/vue/use-motion-surface.js +31 -2
- package/dist/vue/use-motion-surface.js.map +1 -1
- package/package.json +3 -3
- package/src/native/collection-motion.ts +166 -0
- package/src/native/image-effects.ts +71 -0
- package/src/native/motion-region.ts +7 -2
- package/src/native/motion-surface.ts +51 -2
- package/src/native/platform-motion.ts +103 -0
- package/src/native/surface-effects.ts +33 -0
- package/src/native/visual-effects.ts +147 -0
- package/src/vue/components/LoadingDecoration.ts +38 -0
- package/src/vue/components/MButton.ts +33 -2
- package/src/vue/components/MIcon.ts +14 -2
- package/src/vue/components/MImage.ts +66 -2
- package/src/vue/components/MScreen.ts +31 -3
- package/src/vue/components/MSkeleton.ts +5 -3
- package/src/vue/components/MText.ts +7 -0
- package/src/vue/components/layout.ts +3 -0
- package/src/vue/use-motion-surface.ts +32 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type VNode } from 'nativescript-vue';
|
|
1
2
|
export declare const MScreen: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
2
3
|
scroll: BooleanConstructor;
|
|
3
4
|
dismissKeyboard: {
|
|
@@ -19,11 +20,15 @@ export declare const MScreen: import("nativescript-vue").DefineComponent<import(
|
|
|
19
20
|
} & {
|
|
20
21
|
default: undefined;
|
|
21
22
|
};
|
|
23
|
+
motionRegion: {
|
|
24
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionRegion>;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
22
27
|
motionScroll: {
|
|
23
28
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionScrollSource>;
|
|
24
29
|
default: undefined;
|
|
25
30
|
};
|
|
26
|
-
}>, () =>
|
|
31
|
+
}>, () => VNode<import("nativescript-vue").RendererNode, import("nativescript-vue").RendererElement, {
|
|
27
32
|
[key: string]: any;
|
|
28
33
|
}>, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {}, string, import("nativescript-vue").PublicProps, Readonly<import("nativescript-vue").ExtractPropTypes<{
|
|
29
34
|
scroll: BooleanConstructor;
|
|
@@ -46,6 +51,10 @@ export declare const MScreen: import("nativescript-vue").DefineComponent<import(
|
|
|
46
51
|
} & {
|
|
47
52
|
default: undefined;
|
|
48
53
|
};
|
|
54
|
+
motionRegion: {
|
|
55
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionRegion>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
49
58
|
motionScroll: {
|
|
50
59
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionScrollSource>;
|
|
51
60
|
default: undefined;
|
|
@@ -55,6 +64,7 @@ export declare const MScreen: import("nativescript-vue").DefineComponent<import(
|
|
|
55
64
|
accessibilityLabel: string;
|
|
56
65
|
id: string;
|
|
57
66
|
scroll: boolean;
|
|
67
|
+
motionRegion: import("@getcortexlabs/mavis-core/experimental").MotionRegion;
|
|
58
68
|
dismissKeyboard: boolean;
|
|
59
69
|
motionScroll: import("@getcortexlabs/mavis-core/experimental").MotionScrollSource;
|
|
60
70
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MScreen.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MScreen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MScreen.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MScreen.ts"],"names":[],"mappings":"AAGA,OAAO,EAUL,KAAK,KAAK,EACX,MAAM,kBAAkB,CAAA;AAoCzB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFA4GlB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useScrollMotion } from '../use-scroll-motion.js';
|
|
2
2
|
import { useAppToastHost } from '@getcortexlabs/mavis-core/vue';
|
|
3
3
|
import { MToast } from './MToast.js';
|
|
4
|
-
import { defineComponent, h, mergeProps, onBeforeUnmount, provide, registerElement, watch, } from 'nativescript-vue';
|
|
4
|
+
import { defineComponent, cloneVNode, Fragment, h, mergeProps, onBeforeUnmount, provide, registerElement, watch, } from 'nativescript-vue';
|
|
5
5
|
import { isIOS } from '@nativescript/core';
|
|
6
6
|
import { screenProps, useMavisTheme, layoutDirection } from '@getcortexlabs/mavis-core/vue';
|
|
7
7
|
import { MColumn } from './layout.js';
|
|
@@ -11,17 +11,33 @@ import { dismissKeyboardOn } from '../../native/keyboard-dismiss';
|
|
|
11
11
|
import { useNativeViewAttrs } from '../accessibility.js';
|
|
12
12
|
import { provideLayerHost } from '../layers.js';
|
|
13
13
|
import { expandLayerHost } from '../../native/sheet';
|
|
14
|
+
import { useMotionRegion } from '../use-motion-region.js';
|
|
14
15
|
registerElement('MavisScreenScroll', () => MavisScreenScroll, {
|
|
15
16
|
// NSVViewFlags.CONTENT_VIEW; ScrollView owns one content view.
|
|
16
17
|
viewFlags: 2,
|
|
17
18
|
});
|
|
18
19
|
// NSVViewFlags.LAYOUT_VIEW; the page container also puts the keyboard away.
|
|
19
20
|
registerElement('MavisScreen', () => MavisScreen, { viewFlags: 4 });
|
|
21
|
+
// Overlay children must remain siblings of the ScrollView for retained headers.
|
|
22
|
+
function placeOverlay(node, covered) {
|
|
23
|
+
if (node.type !== Fragment)
|
|
24
|
+
return cloneVNode(node, {
|
|
25
|
+
iosOverflowSafeArea: false,
|
|
26
|
+
...(covered ? { accessibilityHidden: true } : {}),
|
|
27
|
+
});
|
|
28
|
+
const copy = cloneVNode(node);
|
|
29
|
+
if (Array.isArray(copy.children))
|
|
30
|
+
copy.children = copy.children.map((child) => child && typeof child === 'object' && 'type' in child
|
|
31
|
+
? placeOverlay(child, covered)
|
|
32
|
+
: child);
|
|
33
|
+
return copy;
|
|
34
|
+
}
|
|
20
35
|
export const MScreen = defineComponent({
|
|
21
36
|
name: 'MScreen',
|
|
22
37
|
inheritAttrs: false,
|
|
23
38
|
props: screenProps,
|
|
24
39
|
setup(props, { attrs, slots }) {
|
|
40
|
+
const region = useMotionRegion(() => props.motionRegion);
|
|
25
41
|
const scrollMotion = useScrollMotion(() => props.motionScroll);
|
|
26
42
|
const { theme } = useMavisTheme();
|
|
27
43
|
const appToast = useAppToastHost();
|
|
@@ -49,7 +65,12 @@ export const MScreen = defineComponent({
|
|
|
49
65
|
const notices = presented.filter((layer) => layer.modal === false);
|
|
50
66
|
const covered = modal.length > 0;
|
|
51
67
|
// Page and ScrollView require one content view; the column also accepts multiple slot children.
|
|
52
|
-
const content = h(MColumn, {
|
|
68
|
+
const content = h(MColumn, {
|
|
69
|
+
accessibilityHidden: props.scroll ? undefined : covered,
|
|
70
|
+
// The retained scroll header reserves its spacer on this private host.
|
|
71
|
+
// Core's unset padding is not a numeric DIP value in every runtime.
|
|
72
|
+
style: { paddingTop: 0 },
|
|
73
|
+
}, {
|
|
53
74
|
default: () => [
|
|
54
75
|
slots.default?.(),
|
|
55
76
|
appToast?.requested.value
|
|
@@ -63,7 +84,7 @@ export const MScreen = defineComponent({
|
|
|
63
84
|
statusBarStyle: theme.value.appearance === 'dark' ? 'light' : 'dark',
|
|
64
85
|
androidStatusBarBackground: theme.value.colors.background,
|
|
65
86
|
}, nativeAttrs(), attrs), [
|
|
66
|
-
h('MavisScreen', {
|
|
87
|
+
h('MavisScreen', mergeProps(region, {
|
|
67
88
|
...(isIOS ? { clipToBounds: false } : {}),
|
|
68
89
|
onLoaded: (event) => {
|
|
69
90
|
container = event.object;
|
|
@@ -74,10 +95,11 @@ export const MScreen = defineComponent({
|
|
|
74
95
|
release = undefined;
|
|
75
96
|
container = undefined;
|
|
76
97
|
},
|
|
77
|
-
}, [
|
|
98
|
+
}), [
|
|
78
99
|
props.scroll
|
|
79
100
|
? h('MavisScreenScroll', { iosOverflowSafeArea: false, accessibilityHidden: covered, ...scrollMotion }, [content])
|
|
80
101
|
: content,
|
|
102
|
+
slots.overlay?.().map((node) => placeOverlay(node, covered)),
|
|
81
103
|
...notices.map((layer) => h(layer.component, { ...layer.props, covered, key: layer.key })),
|
|
82
104
|
// Layers such as sheets render above the content. Their host ignores Core's safe-area
|
|
83
105
|
// adjustment and grows over the whole window, so the sheet geometry can trust its frame
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MScreen.js","sourceRoot":"","sources":["../../../src/vue/components/MScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EACL,eAAe,EACf,CAAC,EACD,UAAU,EACV,eAAe,EACf,OAAO,EACP,eAAe,EACf,KAAK,
|
|
1
|
+
{"version":3,"file":"MScreen.js","sourceRoot":"","sources":["../../../src/vue/components/MScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EACL,eAAe,EACf,UAAU,EACV,QAAQ,EACR,CAAC,EACD,UAAU,EACV,eAAe,EACf,OAAO,EACP,eAAe,EACf,KAAK,GAEN,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,KAAK,EAA6B,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO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G,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAC7E;wBACH,CAAC,CAAC,IAAI;iBACT,CACF;aACF,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -128,9 +128,9 @@ export declare const MSelect: import("nativescript-vue").DefineComponent<import(
|
|
|
128
128
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
129
129
|
id: string;
|
|
130
130
|
disabled: boolean;
|
|
131
|
+
error: string;
|
|
131
132
|
grow: number;
|
|
132
133
|
shrink: number;
|
|
133
|
-
error: string;
|
|
134
134
|
modelValue: import("@getcortexlabs/mavis-core").ChoiceValue | null;
|
|
135
135
|
placeholder: string;
|
|
136
136
|
helperText: string;
|
|
@@ -35,9 +35,9 @@ declare const Sheet: import("nativescript-vue").DefineComponent<ExtractPropTypes
|
|
|
35
35
|
default: undefined;
|
|
36
36
|
};
|
|
37
37
|
align: {
|
|
38
|
-
type: PropType<"
|
|
38
|
+
type: PropType<"center" | "start" | "end" | "stretch">;
|
|
39
39
|
} & {
|
|
40
|
-
default: "
|
|
40
|
+
default: "center" | "start" | "end" | "stretch";
|
|
41
41
|
};
|
|
42
42
|
}>, () => null, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {
|
|
43
43
|
'update:open': (value: boolean) => boolean;
|
|
@@ -78,9 +78,9 @@ declare const Sheet: import("nativescript-vue").DefineComponent<ExtractPropTypes
|
|
|
78
78
|
default: undefined;
|
|
79
79
|
};
|
|
80
80
|
align: {
|
|
81
|
-
type: PropType<"
|
|
81
|
+
type: PropType<"center" | "start" | "end" | "stretch">;
|
|
82
82
|
} & {
|
|
83
|
-
default: "
|
|
83
|
+
default: "center" | "start" | "end" | "stretch";
|
|
84
84
|
};
|
|
85
85
|
}>> & Readonly<{
|
|
86
86
|
onClose?: ((reason: SheetCloseReason) => any) | undefined;
|
|
@@ -16,6 +16,11 @@ export declare const MSkeleton: import("nativescript-vue").DefineComponent<impor
|
|
|
16
16
|
type: BooleanConstructor;
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
|
+
effect: {
|
|
20
|
+
type: import("nativescript-vue").PropType<"pulse" | "shimmer">;
|
|
21
|
+
default: "pulse" | "shimmer";
|
|
22
|
+
validator: (value: "pulse" | "shimmer") => boolean;
|
|
23
|
+
};
|
|
19
24
|
grow: {
|
|
20
25
|
type: import("nativescript-vue").PropType<number>;
|
|
21
26
|
} & {
|
|
@@ -51,6 +56,11 @@ export declare const MSkeleton: import("nativescript-vue").DefineComponent<impor
|
|
|
51
56
|
type: BooleanConstructor;
|
|
52
57
|
default: boolean;
|
|
53
58
|
};
|
|
59
|
+
effect: {
|
|
60
|
+
type: import("nativescript-vue").PropType<"pulse" | "shimmer">;
|
|
61
|
+
default: "pulse" | "shimmer";
|
|
62
|
+
validator: (value: "pulse" | "shimmer") => boolean;
|
|
63
|
+
};
|
|
54
64
|
grow: {
|
|
55
65
|
type: import("nativescript-vue").PropType<number>;
|
|
56
66
|
} & {
|
|
@@ -70,9 +80,10 @@ export declare const MSkeleton: import("nativescript-vue").DefineComponent<impor
|
|
|
70
80
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
71
81
|
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
72
82
|
id: string;
|
|
83
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
73
84
|
grow: number;
|
|
74
85
|
shrink: number;
|
|
75
|
-
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
76
86
|
animated: boolean;
|
|
87
|
+
effect: "shimmer" | "pulse";
|
|
77
88
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
78
89
|
//# sourceMappingURL=MSkeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MSkeleton.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MSkeleton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MSkeleton.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MSkeleton.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFA8FpB,CAAA"}
|
|
@@ -3,6 +3,7 @@ import { Application } from '@nativescript/core';
|
|
|
3
3
|
import { animate, onReducedMotion, reducedMotion, set } from '@rafaelaugusto/jolt';
|
|
4
4
|
import { skeletonProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue';
|
|
5
5
|
import { MBox } from './layout.js';
|
|
6
|
+
import { LoadingDecoration } from './LoadingDecoration.js';
|
|
6
7
|
export const MSkeleton = defineComponent({
|
|
7
8
|
name: 'MSkeleton',
|
|
8
9
|
inheritAttrs: false,
|
|
@@ -64,7 +65,7 @@ export const MSkeleton = defineComponent({
|
|
|
64
65
|
}
|
|
65
66
|
watch(() => props.animated, update, { flush: 'post' });
|
|
66
67
|
onBeforeUnmount(release);
|
|
67
|
-
return () => h(MBox, mergeProps({
|
|
68
|
+
return () => h(props.effect === 'shimmer' ? LoadingDecoration : MBox, mergeProps({
|
|
68
69
|
style: {
|
|
69
70
|
alignSelf: props.width === undefined || props.width === 'auto' ? 'stretch' : 'flex-start',
|
|
70
71
|
},
|
|
@@ -79,8 +80,9 @@ export const MSkeleton = defineComponent({
|
|
|
79
80
|
accessible: false,
|
|
80
81
|
accessibilityHidden: true,
|
|
81
82
|
isUserInteractionEnabled: false,
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
...(props.effect === 'shimmer'
|
|
84
|
+
? { kind: 'shimmer', animated: props.animated }
|
|
85
|
+
: { onLoaded: loaded, onUnloaded: release }),
|
|
84
86
|
}));
|
|
85
87
|
},
|
|
86
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MSkeleton.js","sourceRoot":"","sources":["../../../src/vue/components/MSkeleton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACzF,OAAO,EAAE,WAAW,EAA6B,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"MSkeleton.js","sourceRoot":"","sources":["../../../src/vue/components/MSkeleton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACzF,OAAO,EAAE,WAAW,EAA6B,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,aAAa;IACpB,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,CAAA;QACjC,IAAI,IAAsB,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,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;YAC1C,UAAU,EAAE,KAAK;YACjB,mBAAmB,EAAE,IAAI;YACzB,wBAAwB,EAAE,KAAK;YAC/B,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS;gBAC5B,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;gBAC/C,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;SAC/C,CACF,CACF,CAAA;IACL,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -10,9 +10,9 @@ export declare const MStack: import("nativescript-vue").DefineComponent<import("
|
|
|
10
10
|
default: undefined;
|
|
11
11
|
};
|
|
12
12
|
align: {
|
|
13
|
-
type: import("nativescript-vue").PropType<"
|
|
13
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
14
14
|
} & {
|
|
15
|
-
default: "
|
|
15
|
+
default: "center" | "start" | "end" | "stretch";
|
|
16
16
|
};
|
|
17
17
|
gap: {
|
|
18
18
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -20,9 +20,9 @@ export declare const MStack: import("nativescript-vue").DefineComponent<import("
|
|
|
20
20
|
default: undefined;
|
|
21
21
|
};
|
|
22
22
|
justify: {
|
|
23
|
-
type: import("nativescript-vue").PropType<"
|
|
23
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
24
24
|
} & {
|
|
25
|
-
default: "
|
|
25
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
26
26
|
};
|
|
27
27
|
wrap: {
|
|
28
28
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -100,9 +100,9 @@ export declare const MStack: import("nativescript-vue").DefineComponent<import("
|
|
|
100
100
|
default: undefined;
|
|
101
101
|
};
|
|
102
102
|
align: {
|
|
103
|
-
type: import("nativescript-vue").PropType<"
|
|
103
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
104
104
|
} & {
|
|
105
|
-
default: "
|
|
105
|
+
default: "center" | "start" | "end" | "stretch";
|
|
106
106
|
};
|
|
107
107
|
gap: {
|
|
108
108
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -110,9 +110,9 @@ export declare const MStack: import("nativescript-vue").DefineComponent<import("
|
|
|
110
110
|
default: undefined;
|
|
111
111
|
};
|
|
112
112
|
justify: {
|
|
113
|
-
type: import("nativescript-vue").PropType<"
|
|
113
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
114
114
|
} & {
|
|
115
|
-
default: "
|
|
115
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
116
116
|
};
|
|
117
117
|
wrap: {
|
|
118
118
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -187,12 +187,12 @@ export declare const MStack: import("nativescript-vue").DefineComponent<import("
|
|
|
187
187
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
188
188
|
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
189
189
|
id: string;
|
|
190
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
190
191
|
align: "center" | "start" | "end" | "stretch";
|
|
191
192
|
grow: number;
|
|
192
193
|
shrink: number;
|
|
193
194
|
paddingX: import("@getcortexlabs/mavis-core").Spacing;
|
|
194
195
|
paddingY: import("@getcortexlabs/mavis-core").Spacing;
|
|
195
|
-
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
196
196
|
gap: import("@getcortexlabs/mavis-core").Spacing;
|
|
197
197
|
responsive: import("@getcortexlabs/mavis-core").StackResponsive;
|
|
198
198
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -54,6 +54,11 @@ export declare const MText: import("nativescript-vue").DefineComponent<import("n
|
|
|
54
54
|
} & {
|
|
55
55
|
default: undefined;
|
|
56
56
|
};
|
|
57
|
+
motionSurface: {
|
|
58
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionSurface>;
|
|
59
|
+
} & {
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
57
62
|
weight: {
|
|
58
63
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").FontWeight>;
|
|
59
64
|
} & {
|
|
@@ -117,6 +122,11 @@ export declare const MText: import("nativescript-vue").DefineComponent<import("n
|
|
|
117
122
|
} & {
|
|
118
123
|
default: undefined;
|
|
119
124
|
};
|
|
125
|
+
motionSurface: {
|
|
126
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionSurface>;
|
|
127
|
+
} & {
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
120
130
|
weight: {
|
|
121
131
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").FontWeight>;
|
|
122
132
|
} & {
|
|
@@ -134,6 +144,7 @@ export declare const MText: import("nativescript-vue").DefineComponent<import("n
|
|
|
134
144
|
align: "left" | "center" | "right";
|
|
135
145
|
grow: number;
|
|
136
146
|
shrink: number;
|
|
147
|
+
motionSurface: import("@getcortexlabs/mavis-core/experimental").MotionSurface;
|
|
137
148
|
weight: import("@getcortexlabs/mavis-core").FontWeight;
|
|
138
149
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
139
150
|
//# sourceMappingURL=MText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MText.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MText.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MText.d.ts","sourceRoot":"","sources":["../../../src/vue/components/MText.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAoEhB,CAAA"}
|
|
@@ -4,6 +4,7 @@ import { fontFamily, nonNegative, validateWeight } from '@getcortexlabs/mavis-co
|
|
|
4
4
|
import { isAndroid } from '@nativescript/core';
|
|
5
5
|
import { MavisLabel } from '../../native/label';
|
|
6
6
|
import { useNativeViewAttrs } from '../accessibility.js';
|
|
7
|
+
import { useMotionSurface } from '../use-motion-surface.js';
|
|
7
8
|
registerElement('MavisLabel', () => MavisLabel);
|
|
8
9
|
export const MText = defineComponent({
|
|
9
10
|
name: 'MText',
|
|
@@ -13,6 +14,7 @@ export const MText = defineComponent({
|
|
|
13
14
|
const { theme } = useMavisTheme();
|
|
14
15
|
const nativeAttrs = useNativeViewAttrs(props);
|
|
15
16
|
const shrink = useLayoutShrink();
|
|
17
|
+
const motion = useMotionSurface(() => props.motionSurface, () => true, () => props.text !== undefined);
|
|
16
18
|
return () => {
|
|
17
19
|
const type = theme.value.typography[props.variant];
|
|
18
20
|
const runs = props.text !== undefined ? [{ text: props.text }] : inlineContent(slots.default?.());
|
|
@@ -38,7 +40,7 @@ export const MText = defineComponent({
|
|
|
38
40
|
flexShrink: nonNegative(props.shrink ?? shrink.value, 'shrink'),
|
|
39
41
|
minWidth: 0,
|
|
40
42
|
},
|
|
41
|
-
}, nativeAttrs(), attrs), formatted
|
|
43
|
+
}, nativeAttrs(), attrs, { onLoaded: motion.onLoaded, onUnloaded: motion.onUnloaded }), formatted
|
|
42
44
|
? [
|
|
43
45
|
h('FormattedString', {}, runs.map((run) => {
|
|
44
46
|
if (run.tone && !(run.tone in theme.value.colors))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MText.js","sourceRoot":"","sources":["../../../src/vue/components/MText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"MText.js","sourceRoot":"","sources":["../../../src/vue/components/MText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,eAAe,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAA;AAE/C,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACnC,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,MAAM,EAAE,KAA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,CAAA;wBACxD,OAAO,CAAC,CAAC,MAAM,EAAE;4BACf,IAAI,EAAE,GAAG,CAAC,IAAI;4BACd,UAAU,EAAE,GAAG,CAAC,MAAM;4BACtB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;4BAC5C,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;yBAC3D,CAAC,CAAA;oBACJ,CAAC,CAAC,CACH;iBACF;gBACH,CAAC,CAAC,SAAS,CACd,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { Align, Justify } from '@getcortexlabs/mavis-core/vue';
|
|
2
2
|
export declare const MRow: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
3
3
|
align: {
|
|
4
|
-
type: import("nativescript-vue").PropType<"
|
|
4
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
5
5
|
} & {
|
|
6
|
-
default: "
|
|
6
|
+
default: "center" | "start" | "end" | "stretch";
|
|
7
7
|
};
|
|
8
8
|
gap: {
|
|
9
9
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -11,9 +11,9 @@ export declare const MRow: import("nativescript-vue").DefineComponent<import("na
|
|
|
11
11
|
default: undefined;
|
|
12
12
|
};
|
|
13
13
|
justify: {
|
|
14
|
-
type: import("nativescript-vue").PropType<"
|
|
14
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
15
15
|
} & {
|
|
16
|
-
default: "
|
|
16
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
17
17
|
};
|
|
18
18
|
wrap: {
|
|
19
19
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -82,9 +82,9 @@ export declare const MRow: import("nativescript-vue").DefineComponent<import("na
|
|
|
82
82
|
[key: string]: any;
|
|
83
83
|
}>, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {}, string, import("nativescript-vue").PublicProps, Readonly<import("nativescript-vue").ExtractPropTypes<{
|
|
84
84
|
align: {
|
|
85
|
-
type: import("nativescript-vue").PropType<"
|
|
85
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
86
86
|
} & {
|
|
87
|
-
default: "
|
|
87
|
+
default: "center" | "start" | "end" | "stretch";
|
|
88
88
|
};
|
|
89
89
|
gap: {
|
|
90
90
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -92,9 +92,9 @@ export declare const MRow: import("nativescript-vue").DefineComponent<import("na
|
|
|
92
92
|
default: undefined;
|
|
93
93
|
};
|
|
94
94
|
justify: {
|
|
95
|
-
type: import("nativescript-vue").PropType<"
|
|
95
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
96
96
|
} & {
|
|
97
|
-
default: "
|
|
97
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
98
98
|
};
|
|
99
99
|
wrap: {
|
|
100
100
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -168,19 +168,19 @@ export declare const MRow: import("nativescript-vue").DefineComponent<import("na
|
|
|
168
168
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
169
169
|
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
170
170
|
id: string;
|
|
171
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
171
172
|
align: "center" | "start" | "end" | "stretch";
|
|
172
173
|
grow: number;
|
|
173
174
|
shrink: number;
|
|
174
175
|
paddingX: import("@getcortexlabs/mavis-core").Spacing;
|
|
175
176
|
paddingY: import("@getcortexlabs/mavis-core").Spacing;
|
|
176
|
-
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
177
177
|
gap: import("@getcortexlabs/mavis-core").Spacing;
|
|
178
178
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
179
179
|
export declare const MColumn: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
180
180
|
align: {
|
|
181
|
-
type: import("nativescript-vue").PropType<"
|
|
181
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
182
182
|
} & {
|
|
183
|
-
default: "
|
|
183
|
+
default: "center" | "start" | "end" | "stretch";
|
|
184
184
|
};
|
|
185
185
|
gap: {
|
|
186
186
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -188,9 +188,9 @@ export declare const MColumn: import("nativescript-vue").DefineComponent<import(
|
|
|
188
188
|
default: undefined;
|
|
189
189
|
};
|
|
190
190
|
justify: {
|
|
191
|
-
type: import("nativescript-vue").PropType<"
|
|
191
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
192
192
|
} & {
|
|
193
|
-
default: "
|
|
193
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
194
194
|
};
|
|
195
195
|
wrap: {
|
|
196
196
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -259,9 +259,9 @@ export declare const MColumn: import("nativescript-vue").DefineComponent<import(
|
|
|
259
259
|
[key: string]: any;
|
|
260
260
|
}>, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {}, string, import("nativescript-vue").PublicProps, Readonly<import("nativescript-vue").ExtractPropTypes<{
|
|
261
261
|
align: {
|
|
262
|
-
type: import("nativescript-vue").PropType<"
|
|
262
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "stretch">;
|
|
263
263
|
} & {
|
|
264
|
-
default: "
|
|
264
|
+
default: "center" | "start" | "end" | "stretch";
|
|
265
265
|
};
|
|
266
266
|
gap: {
|
|
267
267
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core").Spacing>;
|
|
@@ -269,9 +269,9 @@ export declare const MColumn: import("nativescript-vue").DefineComponent<import(
|
|
|
269
269
|
default: undefined;
|
|
270
270
|
};
|
|
271
271
|
justify: {
|
|
272
|
-
type: import("nativescript-vue").PropType<"
|
|
272
|
+
type: import("nativescript-vue").PropType<"center" | "start" | "end" | "between" | "around">;
|
|
273
273
|
} & {
|
|
274
|
-
default: "
|
|
274
|
+
default: "center" | "start" | "end" | "between" | "around";
|
|
275
275
|
};
|
|
276
276
|
wrap: {
|
|
277
277
|
type: import("nativescript-vue").PropType<boolean>;
|
|
@@ -345,16 +345,21 @@ export declare const MColumn: import("nativescript-vue").DefineComponent<import(
|
|
|
345
345
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
346
346
|
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
347
347
|
id: string;
|
|
348
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
348
349
|
align: "center" | "start" | "end" | "stretch";
|
|
349
350
|
grow: number;
|
|
350
351
|
shrink: number;
|
|
351
352
|
paddingX: import("@getcortexlabs/mavis-core").Spacing;
|
|
352
353
|
paddingY: import("@getcortexlabs/mavis-core").Spacing;
|
|
353
|
-
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
354
354
|
gap: import("@getcortexlabs/mavis-core").Spacing;
|
|
355
355
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
356
356
|
/** Children share one cell; the last child is drawn on top. */
|
|
357
357
|
export declare const MBox: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
358
|
+
motionSurface: {
|
|
359
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionSurface>;
|
|
360
|
+
} & {
|
|
361
|
+
default: undefined;
|
|
362
|
+
};
|
|
358
363
|
motionRegion: {
|
|
359
364
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionRegion>;
|
|
360
365
|
} & {
|
|
@@ -421,6 +426,11 @@ export declare const MBox: import("nativescript-vue").DefineComponent<import("na
|
|
|
421
426
|
}>, () => import("nativescript-vue").VNode<import("nativescript-vue").RendererNode, import("nativescript-vue").RendererElement, {
|
|
422
427
|
[key: string]: any;
|
|
423
428
|
}>, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {}, string, import("nativescript-vue").PublicProps, Readonly<import("nativescript-vue").ExtractPropTypes<{
|
|
429
|
+
motionSurface: {
|
|
430
|
+
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionSurface>;
|
|
431
|
+
} & {
|
|
432
|
+
default: undefined;
|
|
433
|
+
};
|
|
424
434
|
motionRegion: {
|
|
425
435
|
type: import("nativescript-vue").PropType<import("@getcortexlabs/mavis-core/experimental").MotionRegion>;
|
|
426
436
|
} & {
|
|
@@ -491,11 +501,12 @@ export declare const MBox: import("nativescript-vue").DefineComponent<import("na
|
|
|
491
501
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
492
502
|
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
493
503
|
id: string;
|
|
504
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
494
505
|
grow: number;
|
|
495
506
|
shrink: number;
|
|
507
|
+
motionSurface: import("@getcortexlabs/mavis-core/experimental").MotionSurface;
|
|
496
508
|
paddingX: import("@getcortexlabs/mavis-core").Spacing;
|
|
497
509
|
paddingY: import("@getcortexlabs/mavis-core").Spacing;
|
|
498
|
-
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
499
510
|
motionRegion: import("@getcortexlabs/mavis-core/experimental").MotionRegion;
|
|
500
511
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
501
512
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/vue/components/layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/vue/components/layout.ts"],"names":[],"mappings":"AAiBA,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAuDnE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAA8B,CAAA;AAC/C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAAoC,CAAA;AAExD,+DAA+D;AAC/D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAuBf,CAAA"}
|
|
@@ -6,6 +6,7 @@ import { MavisFlexLayout } from '../../native/flex-layout';
|
|
|
6
6
|
import { MavisBox } from '../../native/box';
|
|
7
7
|
import { useNativeViewAttrs } from '../accessibility.js';
|
|
8
8
|
import { useMotionRegion } from '../use-motion-region.js';
|
|
9
|
+
import { useMotionSurface } from '../use-motion-surface.js';
|
|
9
10
|
registerElement('MavisFlexLayout', () => MavisFlexLayout, {
|
|
10
11
|
// NSVViewFlags.LAYOUT_VIEW is a const enum with no runtime export.
|
|
11
12
|
viewFlags: 4,
|
|
@@ -56,10 +57,11 @@ export const MBox = defineComponent({
|
|
|
56
57
|
props: motionBoxProps,
|
|
57
58
|
setup(props, { attrs, slots }) {
|
|
58
59
|
const region = useMotionRegion(() => props.motionRegion);
|
|
60
|
+
const surface = useMotionSurface(() => props.motionSurface);
|
|
59
61
|
const { theme } = useMavisTheme();
|
|
60
62
|
const nativeAttrs = useNativeViewAttrs(props);
|
|
61
63
|
const shrink = useLayoutShrink();
|
|
62
|
-
return () => h('MavisBox', mergeProps({ style: boxStyle(theme.value, props, shrink.value) }, nativeAttrs(), attrs, region), slots.default?.());
|
|
64
|
+
return () => h('MavisBox', mergeProps({ style: boxStyle(theme.value, props, shrink.value) }, nativeAttrs(), attrs, region, { onLoaded: surface.onLoaded, onUnloaded: surface.onUnloaded }), slots.default?.());
|
|
63
65
|
},
|
|
64
66
|
});
|
|
65
67
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/vue/components/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAA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