@getcortexlabs/mavis 0.1.0-alpha.7 → 0.1.0-alpha.9
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 +7 -5
- package/dist/date-format.android.d.ts +5 -0
- package/dist/date-format.android.d.ts.map +1 -0
- package/dist/date-format.android.js +39 -0
- package/dist/date-format.android.js.map +1 -0
- package/dist/date-format.d.ts +3 -0
- package/dist/date-format.d.ts.map +1 -0
- package/dist/date-format.ios.d.ts +5 -0
- package/dist/date-format.ios.d.ts.map +1 -0
- package/dist/date-format.ios.js +29 -0
- package/dist/date-format.ios.js.map +1 -0
- package/dist/date-format.js +2 -0
- package/dist/date-format.js.map +1 -0
- 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/date-format.android.d.ts +5 -0
- package/dist/native/date-format.android.d.ts.map +1 -0
- package/dist/native/date-format.android.js +39 -0
- package/dist/native/date-format.android.js.map +1 -0
- package/dist/native/date-format.d.ts +6 -0
- package/dist/native/date-format.d.ts.map +1 -0
- package/dist/native/date-format.ios.d.ts +5 -0
- package/dist/native/date-format.ios.d.ts.map +1 -0
- package/dist/native/date-format.ios.js +29 -0
- package/dist/native/date-format.ios.js.map +1 -0
- package/dist/native/date-format.js +8 -0
- package/dist/native/date-format.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/DateCalendar.d.ts +1 -1
- 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 +33 -5
- package/dist/vue/components/MButton.js.map +1 -1
- package/dist/vue/components/MCard.d.ts +4 -4
- package/dist/vue/components/MCard.d.ts.map +1 -1
- package/dist/vue/components/MCard.js +4 -3
- package/dist/vue/components/MCard.js.map +1 -1
- package/dist/vue/components/MChip.d.ts +1 -1
- package/dist/vue/components/MCombobox.d.ts +2 -2
- package/dist/vue/components/MDatePicker.d.ts +56 -8
- package/dist/vue/components/MDatePicker.d.ts.map +1 -1
- package/dist/vue/components/MDatePicker.js +4 -14
- package/dist/vue/components/MDatePicker.js.map +1 -1
- 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/MGrid.d.ts +165 -0
- package/dist/vue/components/MGrid.d.ts.map +1 -0
- package/dist/vue/components/MGrid.js +52 -0
- package/dist/vue/components/MGrid.js.map +1 -0
- 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 +57 -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 +6 -6
- package/dist/vue/components/MInput.d.ts.map +1 -1
- package/dist/vue/components/MInput.js +15 -0
- package/dist/vue/components/MInput.js.map +1 -1
- package/dist/vue/components/MLink.d.ts +2 -2
- package/dist/vue/components/MLink.d.ts.map +1 -1
- package/dist/vue/components/MLink.js +6 -11
- package/dist/vue/components/MLink.js.map +1 -1
- 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 +13 -4
- package/dist/vue/components/MSheet.d.ts.map +1 -1
- 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/configurator.d.ts +3 -3
- 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/index.d.ts +11 -11
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +12 -12
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/services.d.ts +16 -0
- package/dist/vue/services.d.ts.map +1 -0
- package/dist/vue/services.js +18 -0
- package/dist/vue/services.js.map +1 -0
- 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 +15 -4
- package/src/date-format.ts +2 -0
- package/src/native/collection-motion.ts +166 -0
- package/src/native/date-format.android.ts +72 -0
- package/src/native/date-format.ios.ts +54 -0
- package/src/native/date-format.ts +17 -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 +37 -4
- package/src/vue/components/MCard.ts +4 -2
- package/src/vue/components/MDatePicker.ts +3 -11
- package/src/vue/components/MGrid.ts +86 -0
- package/src/vue/components/MIcon.ts +14 -2
- package/src/vue/components/MImage.ts +66 -2
- package/src/vue/components/MInput.ts +14 -3
- package/src/vue/components/MLink.ts +12 -9
- 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/index.ts +63 -69
- package/src/vue/services.ts +32 -0
- package/src/vue/use-motion-surface.ts +32 -1
|
@@ -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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,11 @@ export declare const MNumberInput: {
|
|
|
112
112
|
placeholder: string;
|
|
113
113
|
helperText: string;
|
|
114
114
|
readonly: boolean;
|
|
115
|
+
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
115
116
|
min: number;
|
|
116
117
|
max: number;
|
|
117
118
|
step: number;
|
|
118
119
|
draft: string;
|
|
119
|
-
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
120
120
|
incrementLabel: string;
|
|
121
121
|
decrementLabel: string;
|
|
122
122
|
}, true, {}, {}, import("nativescript-vue").GlobalComponents, import("nativescript-vue").GlobalDirectives, string, {}, any, import("nativescript-vue").ComponentProvideOptions, {
|
|
@@ -233,11 +233,11 @@ export declare const MNumberInput: {
|
|
|
233
233
|
placeholder: string;
|
|
234
234
|
helperText: string;
|
|
235
235
|
readonly: boolean;
|
|
236
|
+
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
236
237
|
min: number;
|
|
237
238
|
max: number;
|
|
238
239
|
step: number;
|
|
239
240
|
draft: string;
|
|
240
|
-
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
241
241
|
incrementLabel: string;
|
|
242
242
|
decrementLabel: string;
|
|
243
243
|
}>;
|
|
@@ -357,11 +357,11 @@ export declare const MNumberInput: {
|
|
|
357
357
|
placeholder: string;
|
|
358
358
|
helperText: string;
|
|
359
359
|
readonly: boolean;
|
|
360
|
+
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
360
361
|
min: number;
|
|
361
362
|
max: number;
|
|
362
363
|
step: number;
|
|
363
364
|
draft: string;
|
|
364
|
-
locale: import("@getcortexlabs/mavis-core").NumberLocale;
|
|
365
365
|
incrementLabel: string;
|
|
366
366
|
decrementLabel: string;
|
|
367
367
|
}, {}, string, {}, import("nativescript-vue").GlobalComponents, import("nativescript-vue").GlobalDirectives, string, import("nativescript-vue").ComponentProvideOptions> & import("nativescript-vue").VNodeProps & import("nativescript-vue").AllowedComponentProps & import("nativescript-vue").ComponentCustomProps & (new () => import("@getcortexlabs/mavis-core").InputHandle), MMultiSelect: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
@@ -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,MAAM,yBAAyB,CAAA;
|
|
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,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,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAM,MAAM,GAAG,eAAe,EAAE,CAAA;QAChC,OAAO,GAAG,EAAE,CACV,CAAC,CACC,UAAU,EACV,UAAU,CACR,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EACrD,WAAW,EAAE,EACb,KAAK,EACL,MAAM,EACN,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAC/D,EACD,KAAK,CAAC,OAAO,EAAE,EAAE,CAClB,CAAA;IACL,CAAC;CACF,CAAC,CAAA"}
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MNumberInput, MMultiSelect } from './components/configurator.js';
|
|
2
2
|
import { MImage } from './components/MImage.js';
|
|
3
3
|
import { MStack } from './components/MStack.js';
|
|
4
|
+
import { MGrid } from './components/MGrid.js';
|
|
4
5
|
import { MLink } from './components/MLink.js';
|
|
5
6
|
import { MDatePicker, MDateRangePicker } from './components/MDatePicker.js';
|
|
6
7
|
import { MCombobox } from './components/MCombobox.js';
|
|
@@ -8,8 +9,11 @@ import { MFilePicker } from './components/MFilePicker.js';
|
|
|
8
9
|
import { MFormGroup, MFormErrors, MSteps, MPagination } from './components/workflows.js';
|
|
9
10
|
import { MChip } from './components/MChip.js';
|
|
10
11
|
import { MEmptyState } from './components/MEmptyState.js';
|
|
11
|
-
import type { App } from 'nativescript-vue';
|
|
12
|
-
import {
|
|
12
|
+
import type { App, Component } from 'nativescript-vue';
|
|
13
|
+
import { type MavisServiceOptions } from './services.js';
|
|
14
|
+
export { createMavisServices } from './services.js';
|
|
15
|
+
export type { MavisServiceOptions } from './services.js';
|
|
16
|
+
import { MThemeProvider, MSpan } from '@getcortexlabs/mavis-core/vue';
|
|
13
17
|
import { MScreen } from './components/MScreen.js';
|
|
14
18
|
import { MBox, MRow, MColumn } from './components/layout.js';
|
|
15
19
|
import { MCard } from './components/MCard.js';
|
|
@@ -36,19 +40,15 @@ import { MInput } from './components/MInput.js';
|
|
|
36
40
|
import { MIcon } from './components/MIcon.js';
|
|
37
41
|
import { MReveal } from './components/MReveal.js';
|
|
38
42
|
import { MSheet } from './components/MSheet.js';
|
|
39
|
-
import {
|
|
40
|
-
export { MThemeProvider, MSpan, MScreen, MBox, MRow, MColumn, MStack, MLink, MCard, MText, MButton, MSlider, MSwitch, MCheckbox, MRadioGroup, MSelect, MToast, MDialog, MTabs, MSkeleton, MChip, MEmptyState, MProgress, MAccordion, MSegmentedControl, MAlert, MListItem, MSeparator, MAvatar, MBadge, MInput, MIcon, MReveal, MSheet, MDatePicker, MDateRangePicker, MNumberInput, MMultiSelect, MImage, MCombobox, MFilePicker, MFormGroup, MFormErrors, MSteps, MPagination, };
|
|
41
|
-
export { useMavisTheme, useToast, useFormController, useFormField, useFileSelection, } from '@getcortexlabs/mavis-core/vue';
|
|
43
|
+
import type { ClaimSystemBack, SystemBackClaimant } from './system-back.js';
|
|
44
|
+
export { MThemeProvider, MSpan, MScreen, MBox, MRow, MColumn, MStack, MGrid, MLink, MCard, MText, MButton, MSlider, MSwitch, MCheckbox, MRadioGroup, MSelect, MToast, MDialog, MTabs, MSkeleton, MChip, MEmptyState, MProgress, MAccordion, MSegmentedControl, MAlert, MListItem, MSeparator, MAvatar, MBadge, MInput, MIcon, MReveal, MSheet, MDatePicker, MDateRangePicker, MNumberInput, MMultiSelect, MImage, MCombobox, MFilePicker, MFormGroup, MFormErrors, MSteps, MPagination, };
|
|
45
|
+
export { useMavisTheme, useToast, useFormController, useFormField, useFileSelection, useMavisNavigation, } from '@getcortexlabs/mavis-core/vue';
|
|
42
46
|
export type { MavisThemeContext, Appearance, AppearanceMode, AppearanceSource, } from '@getcortexlabs/mavis-core/vue';
|
|
43
47
|
export type { Align, Justify } from './components/layout.js';
|
|
44
48
|
export type {} from '@getcortexlabs/mavis-core/vue';
|
|
45
49
|
export type { SystemBackClaimant, ClaimSystemBack };
|
|
46
|
-
export type MavisOptions =
|
|
47
|
-
|
|
48
|
-
closeLabel?: string;
|
|
49
|
-
};
|
|
50
|
-
/** Lets a router hand the Android back press to an open sheet first, e.g. vue-router-ns `claimSystemBack`. */
|
|
51
|
-
claimSystemBack?: ClaimSystemBack;
|
|
50
|
+
export type MavisOptions = MavisServiceOptions & {
|
|
51
|
+
components?: false | Record<string, Component>;
|
|
52
52
|
};
|
|
53
53
|
/** Create one plugin per application; `system` appearance follows the device. Vue also resolves MButton as <m-button>. */
|
|
54
54
|
export declare function createMavis(options?: MavisOptions): {
|
package/dist/vue/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vue/index.ts"],"names":[],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,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,WAAW,EACX,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,EACL,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,MAAM,EACN,WAAW,GACZ,CAAA;AACD,OAAO,EACL,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAC5D,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEnD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAA;AAEnD,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG;IAAE,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAAE,CAAA;AAEnG,0HAA0H;AAC1H,wBAAgB,WAAW,CAAC,OAAO,GAAE,YAAiB;iBAErC,GAAG;EA0DnB;AAED,cAAc,aAAa,CAAA"}
|
package/dist/vue/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MNumberInput, MMultiSelect } from './components/configurator.js';
|
|
2
2
|
import { MImage } from './components/MImage.js';
|
|
3
3
|
import { MStack } from './components/MStack.js';
|
|
4
|
+
import { MGrid } from './components/MGrid.js';
|
|
4
5
|
import { MLink } from './components/MLink.js';
|
|
5
6
|
import { MDatePicker, MDateRangePicker } from './components/MDatePicker.js';
|
|
6
7
|
import { MCombobox } from './components/MCombobox.js';
|
|
@@ -8,8 +9,9 @@ import { MFilePicker } from './components/MFilePicker.js';
|
|
|
8
9
|
import { MFormGroup, MFormErrors, MSteps, MPagination } from './components/workflows.js';
|
|
9
10
|
import { MChip } from './components/MChip.js';
|
|
10
11
|
import { MEmptyState } from './components/MEmptyState.js';
|
|
11
|
-
import {
|
|
12
|
-
|
|
12
|
+
import { createMavisServices } from './services.js';
|
|
13
|
+
export { createMavisServices } from './services.js';
|
|
14
|
+
import { MThemeProvider, MSpan } from '@getcortexlabs/mavis-core/vue';
|
|
13
15
|
import { MScreen } from './components/MScreen.js';
|
|
14
16
|
import { MBox, MRow, MColumn } from './components/layout.js';
|
|
15
17
|
import { MCard } from './components/MCard.js';
|
|
@@ -36,20 +38,17 @@ import { MInput } from './components/MInput.js';
|
|
|
36
38
|
import { MIcon } from './components/MIcon.js';
|
|
37
39
|
import { MReveal } from './components/MReveal.js';
|
|
38
40
|
import { MSheet } from './components/MSheet.js';
|
|
39
|
-
|
|
40
|
-
export {
|
|
41
|
-
export { useMavisTheme, useToast, useFormController, useFormField, useFileSelection, } from '@getcortexlabs/mavis-core/vue';
|
|
41
|
+
export { MThemeProvider, MSpan, MScreen, MBox, MRow, MColumn, MStack, MGrid, MLink, MCard, MText, MButton, MSlider, MSwitch, MCheckbox, MRadioGroup, MSelect, MToast, MDialog, MTabs, MSkeleton, MChip, MEmptyState, MProgress, MAccordion, MSegmentedControl, MAlert, MListItem, MSeparator, MAvatar, MBadge, MInput, MIcon, MReveal, MSheet, MDatePicker, MDateRangePicker, MNumberInput, MMultiSelect, MImage, MCombobox, MFilePicker, MFormGroup, MFormErrors, MSteps, MPagination, };
|
|
42
|
+
export { useMavisTheme, useToast, useFormController, useFormField, useFileSelection, useMavisNavigation, } from '@getcortexlabs/mavis-core/vue';
|
|
42
43
|
/** Create one plugin per application; `system` appearance follows the device. Vue also resolves MButton as <m-button>. */
|
|
43
44
|
export function createMavis(options = {}) {
|
|
44
45
|
return {
|
|
45
46
|
install(app) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
app.onUnmount(() => context.dispose());
|
|
52
|
-
for (const [name, component] of Object.entries({
|
|
47
|
+
const { components, ...services } = options;
|
|
48
|
+
createMavisServices(services).install(app);
|
|
49
|
+
if (components === false)
|
|
50
|
+
return;
|
|
51
|
+
for (const [name, component] of Object.entries(components ?? {
|
|
53
52
|
MThemeProvider,
|
|
54
53
|
MSpan,
|
|
55
54
|
MScreen,
|
|
@@ -57,6 +56,7 @@ export function createMavis(options = {}) {
|
|
|
57
56
|
MRow,
|
|
58
57
|
MColumn,
|
|
59
58
|
MStack,
|
|
59
|
+
MGrid,
|
|
60
60
|
MLink,
|
|
61
61
|
MCard,
|
|
62
62
|
MText,
|
package/dist/vue/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C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AK;gBACL,OAAO;gBACP,MAAM;gBACN,WAAW;gBACX,gBAAgB;gBAChB,YAAY;gBACZ,YAAY;gBACZ,MAAM;gBACN,SAAS;gBACT,WAAW;gBACX,UAAU;gBACV,WAAW;gBACX,MAAM;gBACN,WAAW;aACZ,CACF,EAAE,CAAC;gBACF,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;YAChC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App } from 'nativescript-vue';
|
|
2
|
+
import type { MavisNavigation } from '@getcortexlabs/mavis-core';
|
|
3
|
+
import { type ThemeContextOptions } from '@getcortexlabs/mavis-core/vue';
|
|
4
|
+
import { type ClaimSystemBack } from './system-back.js';
|
|
5
|
+
export type MavisServiceOptions = Omit<ThemeContextOptions, 'source'> & {
|
|
6
|
+
toast?: {
|
|
7
|
+
closeLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
claimSystemBack?: ClaimSystemBack;
|
|
10
|
+
navigation?: MavisNavigation;
|
|
11
|
+
};
|
|
12
|
+
/** Application-owned services without global component registration. */
|
|
13
|
+
export declare function createMavisServices(options?: MavisServiceOptions): {
|
|
14
|
+
install(app: App): void;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/vue/services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEtE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,UAAU,CAAC,EAAE,eAAe,CAAA;CAC7B,CAAA;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,mBAAwB;iBAEpD,GAAG;EAUnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createThemeContext, installAppToast, themeKey, navigationKey, } from '@getcortexlabs/mavis-core/vue';
|
|
2
|
+
import { systemAppearance } from '../native/appearance';
|
|
3
|
+
import { systemBackKey } from './system-back.js';
|
|
4
|
+
/** Application-owned services without global component registration. */
|
|
5
|
+
export function createMavisServices(options = {}) {
|
|
6
|
+
return {
|
|
7
|
+
install(app) {
|
|
8
|
+
installAppToast(app, options.toast);
|
|
9
|
+
const { toast: _toast, claimSystemBack, navigation, ...theme } = options;
|
|
10
|
+
const context = createThemeContext({ ...theme, source: systemAppearance() });
|
|
11
|
+
app.provide(themeKey, context);
|
|
12
|
+
app.provide(systemBackKey, claimSystemBack);
|
|
13
|
+
app.provide(navigationKey, navigation);
|
|
14
|
+
app.onUnmount(() => context.dispose());
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/vue/services.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,QAAQ,EACR,aAAa,GAEd,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAA;AAQtE,wEAAwE;AACxE,MAAM,UAAU,mBAAmB,CAAC,UAA+B,EAAE;IACnE,OAAO;QACL,OAAO,CAAC,GAAQ;YACd,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;YACnC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;YACxE,MAAM,OAAO,GAAG,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAA;YAC5E,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;YAC9B,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,CAAC,CAAA;YAC3C,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;YACtC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;QACxC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventData } from '@nativescript/core';
|
|
2
2
|
import { type MotionSurface } from '@getcortexlabs/mavis-core/experimental';
|
|
3
|
-
export declare function useMotionSurface(surface: () => MotionSurface | undefined, enabled?: () => boolean): {
|
|
3
|
+
export declare function useMotionSurface(surface: () => MotionSurface | undefined, enabled?: () => boolean, plainText?: () => boolean, afterLayout?: boolean): {
|
|
4
4
|
allowsActivation: () => boolean;
|
|
5
5
|
onLoaded(event: EventData): void;
|
|
6
6
|
onUnloaded: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-motion-surface.d.ts","sourceRoot":"","sources":["../../src/vue/use-motion-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,oBAAoB,CAAA;AAGzD,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,wCAAwC,CAAA;AAI/C,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,aAAa,GAAG,SAAS,EACxC,OAAO,GAAE,MAAM,OAAoB;;
|
|
1
|
+
{"version":3,"file":"use-motion-surface.d.ts","sourceRoot":"","sources":["../../src/vue/use-motion-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,oBAAoB,CAAA;AAGzD,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,wCAAwC,CAAA;AAI/C,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,aAAa,GAAG,SAAS,EACxC,OAAO,GAAE,MAAM,OAAoB,EACnC,SAAS,GAAE,MAAM,OAAqB,EACtC,WAAW,UAAQ;;oBA6FD,SAAS;;EAM5B"}
|
|
@@ -3,12 +3,18 @@ import { animate, set, onReducedMotion } from '@rafaelaugusto/jolt';
|
|
|
3
3
|
import { bindMotionSurface, } from '@getcortexlabs/mavis-core/experimental';
|
|
4
4
|
import { nativeContinuousSurface } from '../native/motion-surface.js';
|
|
5
5
|
import { nativeMotionOwner } from '../native/motion-owner.js';
|
|
6
|
-
export function useMotionSurface(surface, enabled = () => true) {
|
|
6
|
+
export function useMotionSurface(surface, enabled = () => true, plainText = () => false, afterLayout = false) {
|
|
7
7
|
let view;
|
|
8
8
|
let unbind;
|
|
9
9
|
let offPreference;
|
|
10
10
|
let continuous;
|
|
11
11
|
const active = new Map();
|
|
12
|
+
let layoutView;
|
|
13
|
+
let layoutQueued = false;
|
|
14
|
+
const clearLayout = () => {
|
|
15
|
+
layoutView?.off('layoutChanged', laidOut);
|
|
16
|
+
layoutView = undefined;
|
|
17
|
+
};
|
|
12
18
|
const release = () => {
|
|
13
19
|
unbind?.();
|
|
14
20
|
unbind = undefined;
|
|
@@ -25,7 +31,19 @@ export function useMotionSurface(surface, enabled = () => true) {
|
|
|
25
31
|
const reference = surface();
|
|
26
32
|
if (!target || !reference)
|
|
27
33
|
return;
|
|
28
|
-
|
|
34
|
+
if (afterLayout &&
|
|
35
|
+
(!target.isLayoutValid ||
|
|
36
|
+
target.getActualSize().width <= 0 ||
|
|
37
|
+
target.getActualSize().height <= 0)) {
|
|
38
|
+
if (layoutView !== target) {
|
|
39
|
+
clearLayout();
|
|
40
|
+
layoutView = target;
|
|
41
|
+
target.on('layoutChanged', laidOut);
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
clearLayout();
|
|
46
|
+
continuous = nativeContinuousSurface(target, enabled, plainText);
|
|
29
47
|
unbind = bindMotionSurface(reference, nativeMotionOwner({
|
|
30
48
|
...continuous.adapter,
|
|
31
49
|
animate(values, options) {
|
|
@@ -57,7 +75,18 @@ export function useMotionSurface(surface, enabled = () => true) {
|
|
|
57
75
|
set(target, values);
|
|
58
76
|
});
|
|
59
77
|
};
|
|
78
|
+
const laidOut = () => {
|
|
79
|
+
if (layoutQueued)
|
|
80
|
+
return;
|
|
81
|
+
layoutQueued = true;
|
|
82
|
+
void Promise.resolve().then(() => {
|
|
83
|
+
layoutQueued = false;
|
|
84
|
+
if (view)
|
|
85
|
+
bind();
|
|
86
|
+
});
|
|
87
|
+
};
|
|
60
88
|
const unloaded = () => {
|
|
89
|
+
clearLayout();
|
|
61
90
|
release();
|
|
62
91
|
view = undefined;
|
|
63
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-motion-surface.js","sourceRoot":"","sources":["../../src/vue/use-motion-surface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,EACL,iBAAiB,GAGlB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,MAAM,UAAU,gBAAgB,CAC9B,OAAwC,EACxC,UAAyB,GAAG,EAAE,CAAC,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EAAE;QACpB,WAAW,EAAE,CAAA;QACb,OAAO,EAAE,CAAA;QACT,IAAI,GAAG,SAAS,CAAA;IAClB,CAAC,CAAA;IACD,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IACvC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC9D,eAAe,CAAC,QAAQ,CAAC,CAAA;IACzB,OAAO;QACL,gBAAgB,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,IAAI;QAC9D,QAAQ,CAAC,KAAgB;YACvB,IAAI,GAAG,KAAK,CAAC,MAAc,CAAA;YAC3B,IAAI,EAAE,CAAA;QACR,CAAC;QACD,UAAU,EAAE,QAAQ;KACrB,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getcortexlabs/mavis",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.9",
|
|
4
4
|
"description": "Mavis UI foundations for NativeScript, with a Vue integration.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"sideEffects":
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"./dist/vue/components/layout.js",
|
|
8
|
+
"./src/vue/components/layout.ts"
|
|
9
|
+
],
|
|
7
10
|
"exports": {
|
|
8
11
|
"./app-icons": {
|
|
9
12
|
"types": "./dist/app-icons.d.ts",
|
|
@@ -16,6 +19,14 @@
|
|
|
16
19
|
"./vue": {
|
|
17
20
|
"types": "./dist/vue/index.d.ts",
|
|
18
21
|
"default": "./dist/vue/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./vue/services": {
|
|
24
|
+
"types": "./dist/vue/services.d.ts",
|
|
25
|
+
"default": "./dist/vue/services.js"
|
|
26
|
+
},
|
|
27
|
+
"./date-format": {
|
|
28
|
+
"types": "./dist/date-format.d.ts",
|
|
29
|
+
"default": "./dist/date-format.js"
|
|
19
30
|
}
|
|
20
31
|
},
|
|
21
32
|
"files": [
|
|
@@ -32,7 +43,7 @@
|
|
|
32
43
|
},
|
|
33
44
|
"peerDependencies": {
|
|
34
45
|
"@nativescript/core": "^9.1.3",
|
|
35
|
-
"@rafaelaugusto/jolt": "^0.1.0-rc.
|
|
46
|
+
"@rafaelaugusto/jolt": "^0.1.0-rc.10",
|
|
36
47
|
"nativescript-vue": "^3.1.3"
|
|
37
48
|
},
|
|
38
49
|
"peerDependenciesMeta": {
|
|
@@ -41,7 +52,7 @@
|
|
|
41
52
|
}
|
|
42
53
|
},
|
|
43
54
|
"dependencies": {
|
|
44
|
-
"@getcortexlabs/mavis-core": "0.1.0-alpha.
|
|
55
|
+
"@getcortexlabs/mavis-core": "0.1.0-alpha.9"
|
|
45
56
|
},
|
|
46
57
|
"nativescript": {
|
|
47
58
|
"platforms": {
|