@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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Image, isIOS, isAndroid } from '@nativescript/core';
|
|
2
|
+
import { particles, confetti, liquid, symbolEffect, followKeyboard } from '@rafaelaugusto/jolt';
|
|
3
|
+
import { blur } from '@rafaelaugusto/jolt/blur';
|
|
4
|
+
import { shape } from '@rafaelaugusto/jolt/shapes';
|
|
5
|
+
import { loadedMotionImage, nativeImageEffect } from './image-effects.js';
|
|
6
|
+
export function nativeSurfaceEffects(target) {
|
|
7
|
+
return {
|
|
8
|
+
particles: (options) => ({
|
|
9
|
+
supported: isIOS || isAndroid,
|
|
10
|
+
dispose: particles(target, options),
|
|
11
|
+
}),
|
|
12
|
+
confetti: (options) => ({ supported: isIOS || isAndroid, dispose: confetti(target, options) }),
|
|
13
|
+
blur: (options) => blur(target, options),
|
|
14
|
+
shape: (options) => shape(target, options),
|
|
15
|
+
liquid(options) {
|
|
16
|
+
const effect = liquid(loadedMotionImage(target), options);
|
|
17
|
+
return {
|
|
18
|
+
supported: isIOS,
|
|
19
|
+
pause: () => effect.pause(),
|
|
20
|
+
resume: () => effect.resume(),
|
|
21
|
+
dispose: () => effect.stop(),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
imageEffect: (name, options, live) => nativeImageEffect(target, name, options, live),
|
|
25
|
+
symbolEffect: (name, options) => target instanceof Image
|
|
26
|
+
? symbolEffect(target, name, options)
|
|
27
|
+
: { finished: Promise.resolve(false), stop() { } },
|
|
28
|
+
followKeyboard: (options) => ({ dispose: followKeyboard(target, options) }),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=surface-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-effects.js","sourceRoot":"","sources":["../../src/native/surface-effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAa,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,MAAM,UAAU,oBAAoB,CAAC,MAAY;IAC/C,OAAO;QACL,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACvB,SAAS,EAAE,KAAK,IAAI,SAAS;YAC7B,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;SACpC,CAAC;QACF,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,IAAI,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;QAC9F,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;QACxC,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC;QAC1C,MAAM,CAAC,OAAO;YACZ,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;YACzD,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;gBAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE;aAC7B,CAAA;QACH,CAAC;QACD,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;QACpF,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAC9B,MAAM,YAAY,KAAK;YACrB,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;YACrC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,KAAI,CAAC,EAAE;QACrD,cAAc,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;KAC5E,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type View } from '@nativescript/core';
|
|
2
|
+
import { type DerivedValue, type DerivedColor } from '@rafaelaugusto/jolt';
|
|
3
|
+
import { type MotionVisualAdapter } from '@getcortexlabs/mavis-core/experimental';
|
|
4
|
+
export declare function nativeVisualEffects(target: View, sources: WeakMap<object, DerivedValue>, colors: WeakMap<object, DerivedColor>, plainText: () => boolean): MotionVisualAdapter;
|
|
5
|
+
//# sourceMappingURL=visual-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-effects.d.ts","sourceRoot":"","sources":["../../src/native/visual-effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,mBAAmB,EAGzB,MAAM,wCAAwC,CAAA;AAG/C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,EACtC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,EACrC,SAAS,EAAE,MAAM,OAAO,GACvB,mBAAmB,CAwHrB"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Label, Image, isIOS } from '@nativescript/core';
|
|
2
|
+
import { nativeSurfaceEffects } from './surface-effects.js';
|
|
3
|
+
import { gradient, shimmer, loader, reveal, conceal, animateText, rollTo, } from '@rafaelaugusto/jolt';
|
|
4
|
+
import { mapGradientBindings, } from '@getcortexlabs/mavis-core/experimental';
|
|
5
|
+
const circles = new WeakMap();
|
|
6
|
+
export function nativeVisualEffects(target, sources, colors, plainText) {
|
|
7
|
+
const text = () => {
|
|
8
|
+
if (!plainText() || !(target instanceof Label) || target.formattedText)
|
|
9
|
+
throw new TypeError('Declare a motionSurface on MText with an explicit text prop; rich/slotted text is unsupported.');
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
...nativeSurfaceEffects(target),
|
|
14
|
+
supports: (effect) => {
|
|
15
|
+
if (effect === 'text')
|
|
16
|
+
return plainText();
|
|
17
|
+
if (effect === 'symbol')
|
|
18
|
+
return isIOS && target instanceof Image && Boolean(target.ios?.image?.symbolImage);
|
|
19
|
+
if (effect === 'image')
|
|
20
|
+
return target instanceof Image;
|
|
21
|
+
if (effect === 'liquid')
|
|
22
|
+
return isIOS && target instanceof Image;
|
|
23
|
+
return (['gradient', 'particles', 'confetti', 'blur', 'shape', 'keyboard'].includes(effect) || isIOS);
|
|
24
|
+
},
|
|
25
|
+
gradient(options) {
|
|
26
|
+
const paint = gradient(target, options);
|
|
27
|
+
return {
|
|
28
|
+
type: paint.type,
|
|
29
|
+
get suspended() {
|
|
30
|
+
return paint.suspended;
|
|
31
|
+
},
|
|
32
|
+
animate: (values, options) => paint.animate(values, options),
|
|
33
|
+
set: (values) => paint.set(values),
|
|
34
|
+
stop: () => paint.stop(),
|
|
35
|
+
suspend: () => paint.suspend(),
|
|
36
|
+
resume: () => paint.resume(),
|
|
37
|
+
bind(values) {
|
|
38
|
+
const dispose = paint.bind(mapGradientBindings(values, (value) => sources.get(value), (value) => colors.get(value)));
|
|
39
|
+
return { dispose };
|
|
40
|
+
},
|
|
41
|
+
dispose: () => paint.remove(),
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
shimmer: (options) => ({ supported: isIOS, dispose: shimmer(target, options) }),
|
|
45
|
+
loader: (options) => ({ supported: isIOS, dispose: loader(target, options) }),
|
|
46
|
+
animateText: (options) => animateText(text(), options),
|
|
47
|
+
rollTo: (value, options) => rollTo(text(), value, options),
|
|
48
|
+
circular() {
|
|
49
|
+
circles.get(target)?.dispose();
|
|
50
|
+
const hidden = target.accessibilityHidden, interactive = target.isUserInteractionEnabled;
|
|
51
|
+
const visibility = target.visibility;
|
|
52
|
+
let active, locked = false, generation = 0, disposed = false;
|
|
53
|
+
let writtenVisibility;
|
|
54
|
+
const focused = (view) => {
|
|
55
|
+
if (view.ios?.isFirstResponder)
|
|
56
|
+
return true;
|
|
57
|
+
let found = false;
|
|
58
|
+
view.eachChildView((child) => {
|
|
59
|
+
found = focused(child);
|
|
60
|
+
return !found;
|
|
61
|
+
});
|
|
62
|
+
return found;
|
|
63
|
+
};
|
|
64
|
+
const unlock = () => {
|
|
65
|
+
if (!locked)
|
|
66
|
+
return;
|
|
67
|
+
locked = false;
|
|
68
|
+
if (target.accessibilityHidden)
|
|
69
|
+
target.accessibilityHidden = hidden;
|
|
70
|
+
if (!target.isUserInteractionEnabled)
|
|
71
|
+
target.isUserInteractionEnabled = interactive;
|
|
72
|
+
};
|
|
73
|
+
const run = (open, options = {}) => {
|
|
74
|
+
if (isIOS && !open && focused(target))
|
|
75
|
+
throw new Error('Move focus outside the circular surface before conceal().');
|
|
76
|
+
const handle = open
|
|
77
|
+
? reveal(target, { from: options.origin, duration: options.duration })
|
|
78
|
+
: conceal(target, { to: options.origin, duration: options.duration });
|
|
79
|
+
const token = ++generation;
|
|
80
|
+
active = handle;
|
|
81
|
+
if (isIOS)
|
|
82
|
+
writtenVisibility = target.visibility;
|
|
83
|
+
if (isIOS) {
|
|
84
|
+
if (open)
|
|
85
|
+
unlock();
|
|
86
|
+
else {
|
|
87
|
+
locked = true;
|
|
88
|
+
target.accessibilityHidden = true;
|
|
89
|
+
target.isUserInteractionEnabled = false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
void handle.finished.then((completed) => {
|
|
93
|
+
if (token !== generation || disposed)
|
|
94
|
+
return;
|
|
95
|
+
active = undefined;
|
|
96
|
+
if (completed && isIOS)
|
|
97
|
+
writtenVisibility = target.visibility;
|
|
98
|
+
if (!completed && target.visibility !== 'hidden')
|
|
99
|
+
unlock();
|
|
100
|
+
});
|
|
101
|
+
return handle;
|
|
102
|
+
};
|
|
103
|
+
const control = {
|
|
104
|
+
supported: isIOS,
|
|
105
|
+
reveal: (options) => run(true, options),
|
|
106
|
+
conceal: (options) => run(false, options),
|
|
107
|
+
dispose() {
|
|
108
|
+
if (disposed)
|
|
109
|
+
return;
|
|
110
|
+
disposed = true;
|
|
111
|
+
generation++;
|
|
112
|
+
active?.stop();
|
|
113
|
+
unlock();
|
|
114
|
+
if (circles.get(target) === control) {
|
|
115
|
+
circles.delete(target);
|
|
116
|
+
if (isIOS && writtenVisibility !== undefined && target.visibility === writtenVisibility)
|
|
117
|
+
target.visibility = visibility;
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
circles.set(target, control);
|
|
122
|
+
return control;
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=visual-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-effects.js","sourceRoot":"","sources":["../../src/native/visual-effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAa,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,WAAW,EACX,MAAM,GAGP,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,mBAAmB,GAIpB,MAAM,wCAAwC,CAAA;AAE/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAA6B,CAAA;AACxD,MAAM,UAAU,mBAAmB,CACjC,MAAY,EACZ,OAAsC,EACtC,MAAqC,EACrC,SAAwB;IAExB,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,MAAM,YAAY,KAAK,CAAC,IAAI,MAAM,CAAC,aAAa;YACpE,MAAM,IAAI,SAAS,CACjB,gGAAgG,CACjG,CAAA;QACH,OAAO,MAAM,CAAA;IACf,CAAC,CAAA;IACD,OAAO;QACL,GAAG,oBAAoB,CAAC,MAAM,CAAC;QAC/B,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACnB,IAAI,MAAM,KAAK,MAAM;gBAAE,OAAO,SAAS,EAAE,CAAA;YACzC,IAAI,MAAM,KAAK,QAAQ;gBACrB,OAAO,KAAK,IAAI,MAAM,YAAY,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;YACpF,IAA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C,IAAI,KAAK,KAAK,UAAU,IAAI,QAAQ;wBAAE,OAAM;oBAC5C,MAAM,GAAG,SAAS,CAAA;oBAClB,IAAI,SAAS,IAAI,KAAK;wBAAE,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAA;oBAC7D,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,QAAQ;wBAAE,MAAM,EAAE,CAAA;gBAC5D,CAAC,CAAC,CAAA;gBACF,OAAO,MAAM,CAAA;YACf,CAAC,CAAA;YACD,MAAM,OAAO,GAAG;gBACd,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,CAAC,OAAiD,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC;gBACjF,OAAO,EAAE,CAAC,OAAkD,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC;gBACpF,OAAO;oBACL,IAAI,QAAQ;wBAAE,OAAM;oBACpB,QAAQ,GAAG,IAAI,CAAA;oBACf,UAAU,EAAE,CAAA;oBACZ,MAAM,EAAE,IAAI,EAAE,CAAA;oBACd,MAAM,EAAE,CAAA;oBACR,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE,CAAC;wBACpC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;wBACtB,IAAI,KAAK,IAAI,iBAAiB,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,iBAAiB;4BACrF,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;oBAClC,CAAC;gBACH,CAAC;aACF,CAAA;YACD,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;YAC5B,OAAO,OAAO,CAAA;QAChB,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type PropType } from 'nativescript-vue';
|
|
2
|
+
export declare const LoadingDecoration: import("nativescript-vue").DefineComponent<import("nativescript-vue").ExtractPropTypes<{
|
|
3
|
+
kind: {
|
|
4
|
+
type: PropType<"shimmer" | "dots" | "bars" | "ring">;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
width: {
|
|
16
|
+
type: PropType<import("@getcortexlabs/mavis-core").Dimension>;
|
|
17
|
+
} & {
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
height: {
|
|
21
|
+
default: number;
|
|
22
|
+
type: PropType<import("@getcortexlabs/mavis-core").Dimension>;
|
|
23
|
+
};
|
|
24
|
+
radius: {
|
|
25
|
+
default: string;
|
|
26
|
+
type: PropType<number | import("@getcortexlabs/mavis-core").Radius>;
|
|
27
|
+
};
|
|
28
|
+
animated: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
effect: {
|
|
33
|
+
type: PropType<"pulse" | "shimmer">;
|
|
34
|
+
default: "pulse" | "shimmer";
|
|
35
|
+
validator: (value: "pulse" | "shimmer") => boolean;
|
|
36
|
+
};
|
|
37
|
+
grow: {
|
|
38
|
+
type: PropType<number>;
|
|
39
|
+
} & {
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
shrink: {
|
|
43
|
+
type: PropType<number>;
|
|
44
|
+
} & {
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
id: {
|
|
48
|
+
type: PropType<string>;
|
|
49
|
+
} & {
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
}>, () => import("nativescript-vue").VNode<import("nativescript-vue").RendererNode, import("nativescript-vue").RendererElement, {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}>, {}, {}, {}, import("nativescript-vue").ComponentOptionsMixin, import("nativescript-vue").ComponentOptionsMixin, {}, string, import("nativescript-vue").PublicProps, Readonly<import("nativescript-vue").ExtractPropTypes<{
|
|
55
|
+
kind: {
|
|
56
|
+
type: PropType<"shimmer" | "dots" | "bars" | "ring">;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
color: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: number;
|
|
66
|
+
};
|
|
67
|
+
width: {
|
|
68
|
+
type: PropType<import("@getcortexlabs/mavis-core").Dimension>;
|
|
69
|
+
} & {
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
72
|
+
height: {
|
|
73
|
+
default: number;
|
|
74
|
+
type: PropType<import("@getcortexlabs/mavis-core").Dimension>;
|
|
75
|
+
};
|
|
76
|
+
radius: {
|
|
77
|
+
default: string;
|
|
78
|
+
type: PropType<number | import("@getcortexlabs/mavis-core").Radius>;
|
|
79
|
+
};
|
|
80
|
+
animated: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
effect: {
|
|
85
|
+
type: PropType<"pulse" | "shimmer">;
|
|
86
|
+
default: "pulse" | "shimmer";
|
|
87
|
+
validator: (value: "pulse" | "shimmer") => boolean;
|
|
88
|
+
};
|
|
89
|
+
grow: {
|
|
90
|
+
type: PropType<number>;
|
|
91
|
+
} & {
|
|
92
|
+
default: number;
|
|
93
|
+
};
|
|
94
|
+
shrink: {
|
|
95
|
+
type: PropType<number>;
|
|
96
|
+
} & {
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
id: {
|
|
100
|
+
type: PropType<string>;
|
|
101
|
+
} & {
|
|
102
|
+
default: undefined;
|
|
103
|
+
};
|
|
104
|
+
}>> & Readonly<{}>, {
|
|
105
|
+
color: string;
|
|
106
|
+
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
107
|
+
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
108
|
+
id: string;
|
|
109
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
110
|
+
grow: number;
|
|
111
|
+
shrink: number;
|
|
112
|
+
size: number;
|
|
113
|
+
animated: boolean;
|
|
114
|
+
effect: "shimmer" | "pulse";
|
|
115
|
+
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
116
|
+
//# sourceMappingURL=LoadingDecoration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingDecoration.d.ts","sourceRoot":"","sources":["../../../src/vue/components/LoadingDecoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAIhF,eAAO,MAAM,iBAAiB;;cAKF,QAAQ,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA9C,QAAQ,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFA4BxE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps } from 'nativescript-vue';
|
|
2
|
+
import { skeletonProps, useLoadingDecoration } from '@getcortexlabs/mavis-core/vue';
|
|
3
|
+
import { MBox } from './layout.js';
|
|
4
|
+
export const LoadingDecoration = defineComponent({
|
|
5
|
+
name: 'MavisLoadingDecoration',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
...skeletonProps,
|
|
9
|
+
kind: { type: String, required: true },
|
|
10
|
+
color: { type: String, default: undefined },
|
|
11
|
+
size: { type: Number, default: 24 },
|
|
12
|
+
},
|
|
13
|
+
setup(props, { attrs }) {
|
|
14
|
+
const surface = useLoadingDecoration(() => ({
|
|
15
|
+
kind: props.kind,
|
|
16
|
+
animated: props.animated,
|
|
17
|
+
size: props.size,
|
|
18
|
+
color: props.color,
|
|
19
|
+
}));
|
|
20
|
+
return () => h(MBox, mergeProps(attrs, {
|
|
21
|
+
id: props.id,
|
|
22
|
+
width: props.width,
|
|
23
|
+
height: props.height,
|
|
24
|
+
radius: props.radius,
|
|
25
|
+
grow: props.grow,
|
|
26
|
+
shrink: props.shrink,
|
|
27
|
+
motionSurface: surface,
|
|
28
|
+
accessibilityHidden: true,
|
|
29
|
+
accessible: false,
|
|
30
|
+
isUserInteractionEnabled: false,
|
|
31
|
+
}));
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=LoadingDecoration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingDecoration.js","sourceRoot":"","sources":["../../../src/vue/components/LoadingDecoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAC/C,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,GAAG,aAAa;QAChB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAwD,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxF,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QAC3C,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;KACpC;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,MAAM,OAAO,GAAG,oBAAoB,CAAC,GAAG,EAAE,CAAC,CAAC;YAC1C,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC,CAAA;QACH,OAAO,GAAG,EAAE,CACV,CAAC,CACC,IAAI,EACJ,UAAU,CAAC,KAAK,EAAE;YAChB,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,aAAa,EAAE,OAAO;YACtB,mBAAmB,EAAE,IAAI;YACzB,UAAU,EAAE,KAAK;YACjB,wBAAwB,EAAE,KAAK;SAChC,CAAC,CACH,CAAA;IACL,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -98,7 +98,7 @@ export declare const MAlert: import("nativescript-vue").DefineComponent<import("
|
|
|
98
98
|
accessibilityHidden: boolean;
|
|
99
99
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
100
100
|
id: string;
|
|
101
|
-
tone: "
|
|
101
|
+
tone: "error" | "warning" | "success" | "info";
|
|
102
102
|
grow: number;
|
|
103
103
|
shrink: number;
|
|
104
104
|
dismissible: boolean;
|
|
@@ -72,9 +72,9 @@ export declare const MAvatar: import("nativescript-vue").DefineComponent<import(
|
|
|
72
72
|
accessibilityHidden: boolean;
|
|
73
73
|
accessibilityLabel: string;
|
|
74
74
|
id: string;
|
|
75
|
+
shape: "circle" | "square";
|
|
75
76
|
name: string;
|
|
76
77
|
size: "sm" | "md" | "lg" | "xl";
|
|
77
78
|
src: string;
|
|
78
|
-
shape: "circle" | "square";
|
|
79
79
|
}, {}, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;
|
|
80
80
|
//# sourceMappingURL=MAvatar.d.ts.map
|