@getcortexlabs/mavis-web 0.1.0-alpha.6 → 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 +4 -4
- package/dist/collection-motion.d.ts +4 -0
- package/dist/collection-motion.d.ts.map +1 -0
- package/dist/collection-motion.js +97 -0
- package/dist/collection-motion.js.map +1 -0
- package/dist/components/ChoicePaint.d.ts +17 -0
- package/dist/components/ChoicePaint.d.ts.map +1 -0
- package/dist/components/ChoicePaint.js +81 -0
- package/dist/components/ChoicePaint.js.map +1 -0
- package/dist/components/DateCalendar.d.ts +3 -3
- package/dist/components/LoadingDecoration.d.ts +116 -0
- package/dist/components/LoadingDecoration.d.ts.map +1 -0
- package/dist/components/LoadingDecoration.js +35 -0
- package/dist/components/LoadingDecoration.js.map +1 -0
- package/dist/components/MAccordion.d.ts +1 -1
- package/dist/components/MAlert.d.ts +1 -1
- package/dist/components/MAvatar.d.ts +2 -2
- package/dist/components/MBadge.d.ts +1 -1
- package/dist/components/MButton.d.ts +36 -14
- package/dist/components/MButton.d.ts.map +1 -1
- package/dist/components/MButton.js +15 -1
- package/dist/components/MButton.js.map +1 -1
- package/dist/components/MCard.d.ts +6 -5
- package/dist/components/MCard.d.ts.map +1 -1
- package/dist/components/MCard.js +9 -2
- package/dist/components/MCard.js.map +1 -1
- package/dist/components/MCheckbox.d.ts +1 -1
- package/dist/components/MCheckbox.d.ts.map +1 -1
- package/dist/components/MCheckbox.js +8 -3
- package/dist/components/MCheckbox.js.map +1 -1
- package/dist/components/MChip.d.ts +3 -3
- package/dist/components/MCombobox.d.ts +1 -1
- package/dist/components/MCombobox.d.ts.map +1 -1
- package/dist/components/MCombobox.js +10 -0
- package/dist/components/MCombobox.js.map +1 -1
- package/dist/components/MDatePicker.d.ts +16 -16
- package/dist/components/MDialog.d.ts +4 -1
- package/dist/components/MDialog.d.ts.map +1 -1
- package/dist/components/MDialog.js +69 -4
- package/dist/components/MDialog.js.map +1 -1
- package/dist/components/MEmptyState.d.ts +2 -2
- package/dist/components/MFilePicker.d.ts +2 -2
- package/dist/components/MIcon.d.ts +19 -1
- package/dist/components/MIcon.d.ts.map +1 -1
- package/dist/components/MIcon.js +6 -2
- package/dist/components/MIcon.js.map +1 -1
- package/dist/components/MImage.d.ts +203 -0
- package/dist/components/MImage.d.ts.map +1 -0
- package/dist/components/MImage.js +148 -0
- package/dist/components/MImage.js.map +1 -0
- package/dist/components/MInput.d.ts +6 -6
- package/dist/components/MLink.d.ts +3 -3
- package/dist/components/MListItem.d.ts +1 -1
- package/dist/components/MProgress.d.ts +3 -3
- package/dist/components/MRadioGroup.d.ts +1 -1
- package/dist/components/MRadioGroup.d.ts.map +1 -1
- package/dist/components/MRadioGroup.js +5 -3
- package/dist/components/MRadioGroup.js.map +1 -1
- package/dist/components/MReveal.d.ts +11 -11
- package/dist/components/MScreen.d.ts +9 -0
- package/dist/components/MScreen.d.ts.map +1 -1
- package/dist/components/MScreen.js +37 -24
- package/dist/components/MScreen.js.map +1 -1
- package/dist/components/MSegmentedControl.d.ts +1 -1
- package/dist/components/MSelect.d.ts +1 -1
- package/dist/components/MSelect.d.ts.map +1 -1
- package/dist/components/MSelect.js +6 -0
- package/dist/components/MSelect.js.map +1 -1
- package/dist/components/MSeparator.d.ts +1 -1
- package/dist/components/MSheet.d.ts +5 -5
- package/dist/components/MSheet.d.ts.map +1 -1
- package/dist/components/MSheet.js +20 -13
- package/dist/components/MSheet.js.map +1 -1
- package/dist/components/MSkeleton.d.ts +12 -1
- package/dist/components/MSkeleton.d.ts.map +1 -1
- package/dist/components/MSkeleton.js +10 -4
- package/dist/components/MSkeleton.js.map +1 -1
- package/dist/components/MStack.d.ts +13 -13
- package/dist/components/MSwitch.d.ts +1 -1
- package/dist/components/MSwitch.d.ts.map +1 -1
- package/dist/components/MSwitch.js +9 -2
- package/dist/components/MSwitch.js.map +1 -1
- package/dist/components/MTabs.d.ts +1 -1
- package/dist/components/MText.d.ts +17 -6
- package/dist/components/MText.d.ts.map +1 -1
- package/dist/components/MText.js +8 -3
- package/dist/components/MText.js.map +1 -1
- package/dist/components/configurator.d.ts +541 -0
- package/dist/components/configurator.d.ts.map +1 -0
- package/dist/components/configurator.js +20 -0
- package/dist/components/configurator.js.map +1 -0
- package/dist/components/layout.d.ts +46 -35
- package/dist/components/layout.d.ts.map +1 -1
- package/dist/components/layout.js +3 -1
- package/dist/components/layout.js.map +1 -1
- package/dist/components/workflows.d.ts +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +4 -0
- package/dist/experimental.js.map +1 -1
- package/dist/image-effects.d.ts +11 -0
- package/dist/image-effects.d.ts.map +1 -0
- package/dist/image-effects.js +65 -0
- package/dist/image-effects.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/motion-region.d.ts.map +1 -1
- package/dist/motion-region.js +10 -1
- package/dist/motion-region.js.map +1 -1
- package/dist/motion-surface.d.ts +5 -1
- package/dist/motion-surface.d.ts.map +1 -1
- package/dist/motion-surface.js +107 -4
- package/dist/motion-surface.js.map +1 -1
- package/dist/platform-motion.d.ts +4 -0
- package/dist/platform-motion.d.ts.map +1 -0
- package/dist/platform-motion.js +23 -0
- package/dist/platform-motion.js.map +1 -0
- package/dist/scroll-motion.d.ts.map +1 -1
- package/dist/scroll-motion.js +17 -4
- package/dist/scroll-motion.js.map +1 -1
- package/dist/sheet-motion.d.ts +6 -2
- package/dist/sheet-motion.d.ts.map +1 -1
- package/dist/sheet-motion.js +56 -155
- package/dist/sheet-motion.js.map +1 -1
- package/dist/surface-effects.d.ts +4 -0
- package/dist/surface-effects.d.ts.map +1 -0
- package/dist/surface-effects.js +28 -0
- package/dist/surface-effects.js.map +1 -0
- package/dist/use-motion-surface.d.ts +8 -0
- package/dist/use-motion-surface.d.ts.map +1 -0
- package/dist/use-motion-surface.js +33 -0
- package/dist/use-motion-surface.js.map +1 -0
- package/dist/visual-effects.d.ts +4 -0
- package/dist/visual-effects.d.ts.map +1 -0
- package/dist/visual-effects.js +120 -0
- package/dist/visual-effects.js.map +1 -0
- package/package.json +3 -3
- package/src/collection-motion.ts +107 -0
- package/src/components/ChoicePaint.ts +96 -0
- package/src/components/LoadingDecoration.ts +39 -0
- package/src/components/MButton.ts +15 -1
- package/src/components/MCard.ts +9 -1
- package/src/components/MCheckbox.ts +14 -3
- package/src/components/MCombobox.ts +10 -0
- package/src/components/MDialog.ts +78 -4
- package/src/components/MIcon.ts +10 -1
- package/src/components/MImage.ts +168 -0
- package/src/components/MRadioGroup.ts +9 -3
- package/src/components/MScreen.ts +26 -2
- package/src/components/MSelect.ts +5 -0
- package/src/components/MSheet.ts +29 -18
- package/src/components/MSkeleton.ts +13 -4
- package/src/components/MSwitch.ts +14 -3
- package/src/components/MText.ts +11 -2
- package/src/components/configurator.ts +24 -0
- package/src/components/layout.ts +3 -0
- package/src/experimental.ts +8 -0
- package/src/image-effects.ts +78 -0
- package/src/index.ts +8 -0
- package/src/motion-region.ts +10 -1
- package/src/motion-surface.ts +107 -4
- package/src/platform-motion.ts +36 -0
- package/src/scroll-motion.ts +15 -3
- package/src/sheet-motion.ts +51 -152
- package/src/style.css +31 -15
- package/src/surface-effects.ts +33 -0
- package/src/use-motion-surface.ts +43 -0
- package/src/visual-effects.ts +139 -0
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Mavis for Vue Web
|
|
2
2
|
|
|
3
|
-
Vue Web components and themes for Mavis UI, version `0.1.0-alpha.
|
|
3
|
+
Vue Web components and themes for Mavis UI, version `0.1.0-alpha.8`. Experimental prerelease for testing in real apps; the API can change between alpha versions. Licensed under MIT.
|
|
4
4
|
|
|
5
5
|
In an existing Vue application:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install @getcortexlabs/mavis-web@0.1.0-alpha.
|
|
8
|
+
npm install @getcortexlabs/mavis-web@0.1.0-alpha.8 @rafaelaugusto/jolt@0.1.0-rc.10
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```ts
|
|
@@ -19,10 +19,10 @@ createApp(App).use(createMavis()).mount('#app')
|
|
|
19
19
|
|
|
20
20
|
The stylesheet supplies focus indicators, box overlays, and motion. The plugin registers the layout, typography, form, selection, feedback and overlay components, including scoped themes and inline text. Vue also accepts their `m-*` spellings. See the [component reference](https://mavis-ui.getcortexlabs.com/components/) for the full catalog.
|
|
21
21
|
|
|
22
|
-
Themes and Vue context come from `@getcortexlabs/mavis-core`. This source checkout requires Jolt 0.1.0-rc.
|
|
22
|
+
Themes and Vue context come from `@getcortexlabs/mavis-core`. This source checkout requires Jolt 0.1.0-rc.10 as a peer for component motion and deferred DOM attachment. Browser consumers do not install NativeScript; Mavis uses only Jolt /web and /web/vue. See the [motion guide](https://mavis-ui.getcortexlabs.com/guide/motion).
|
|
23
23
|
|
|
24
24
|
Use `MText.as` for HTML heading semantics. Buttons emit a payload-free `click` and retain native HTML keyboard activation. Sliders expose semantic values to accessibility APIs, including fractional steps. Theme state belongs to each app. The package is safe to import during server rendering.
|
|
25
25
|
|
|
26
26
|
Tested with Vue 3.5.42, Vite 6.4.5, TypeScript 6.0.3 and vue-tsc 3.3.13. See the [Web guide](https://mavis-ui.getcortexlabs.com/guide/web) for setup and portability limits, and the [release notes](https://github.com/getcortexlabs/mavis-ui/blob/main/CHANGELOG.md) for the alpha boundary.
|
|
27
27
|
|
|
28
|
-
Alpha.
|
|
28
|
+
Alpha.8 requires Jolt **0.1.0-rc.10** for the experimental visual effects, retained collections, platform motion and sensor integrations. Keep the Mavis packages at the same version. Rebuild native applications after upgrading Jolt.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WebRuntime } from '@rafaelaugusto/jolt/web';
|
|
2
|
+
import { type MotionRegionAdapter, type MotionSurfaceAdapter } from '@getcortexlabs/mavis-core/experimental';
|
|
3
|
+
export declare function webCollectionMotion(runtime: WebRuntime, target: HTMLElement, resolve: (surface: MotionSurfaceAdapter) => HTMLElement): Pick<MotionRegionAdapter, 'scrollHeader' | 'reorder'>;
|
|
4
|
+
//# sourceMappingURL=collection-motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-motion.d.ts","sourceRoot":"","sources":["../src/collection-motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,wCAAwC,CAAA;AAG/C,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,WAAW,GACtD,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,SAAS,CAAC,CA8FvD"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { mapMotionItems, } from '@getcortexlabs/mavis-core/experimental';
|
|
2
|
+
import { webScrollElement } from './scroll-motion.js';
|
|
3
|
+
export function webCollectionMotion(runtime, target, resolve) {
|
|
4
|
+
return {
|
|
5
|
+
scrollHeader(source, options) {
|
|
6
|
+
const scroll = webScrollElement(source);
|
|
7
|
+
if (!target.contains(scroll))
|
|
8
|
+
throw new TypeError('Declare MScreen inside the header motion region.');
|
|
9
|
+
const { header, artwork, title, toolbar, toolbarTitle, section, items, ...rest } = options;
|
|
10
|
+
const headerElement = resolve(header), sectionElement = resolve(section);
|
|
11
|
+
const originalMargin = sectionElement.style.marginTop;
|
|
12
|
+
let writtenMargin;
|
|
13
|
+
const restoreSection = () => {
|
|
14
|
+
if (sectionElement.style.marginTop === writtenMargin)
|
|
15
|
+
sectionElement.style.marginTop = originalMargin;
|
|
16
|
+
};
|
|
17
|
+
let control;
|
|
18
|
+
try {
|
|
19
|
+
control = runtime.scrollHeader(scroll, {
|
|
20
|
+
...rest,
|
|
21
|
+
header: headerElement,
|
|
22
|
+
artwork: resolve(artwork),
|
|
23
|
+
title: resolve(title),
|
|
24
|
+
toolbarTitle: resolve(toolbarTitle),
|
|
25
|
+
section: sectionElement,
|
|
26
|
+
// Native owns the section's absolute offset; Web translates its resting layout.
|
|
27
|
+
// Reuse Jolt's geometry reads so resizing never needs another observer or clock.
|
|
28
|
+
expanded: () => {
|
|
29
|
+
const height = options.expanded ?? headerElement.offsetHeight;
|
|
30
|
+
if (writtenMargin === undefined || sectionElement.style.marginTop === writtenMargin) {
|
|
31
|
+
writtenMargin = `${height}px`;
|
|
32
|
+
sectionElement.style.marginTop = writtenMargin;
|
|
33
|
+
}
|
|
34
|
+
return height;
|
|
35
|
+
},
|
|
36
|
+
minimum: options.minimum ?? (() => resolve(toolbar).getBoundingClientRect().height),
|
|
37
|
+
items: () => mapMotionItems(items(), resolve),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
restoreSection();
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
ready: true,
|
|
46
|
+
get state() {
|
|
47
|
+
return { offset: control.state.offset, refreshing: control.state.refreshing };
|
|
48
|
+
},
|
|
49
|
+
refresh: () => control.refresh(),
|
|
50
|
+
cancelRefresh: () => control.cancelRefresh(),
|
|
51
|
+
remeasure: async () => {
|
|
52
|
+
control.remeasure();
|
|
53
|
+
},
|
|
54
|
+
preserveAnchor: async (change) => {
|
|
55
|
+
await control.preserveAnchor(change);
|
|
56
|
+
},
|
|
57
|
+
scrollToItem: (key, animated = true) => control.scrollToItem(key, { behavior: animated ? 'smooth' : 'instant' }),
|
|
58
|
+
scrollToTop: (animated = true) => control.scrollToTop({ behavior: animated ? 'smooth' : 'instant' }),
|
|
59
|
+
pause: () => control.pause(),
|
|
60
|
+
play: () => control.play(),
|
|
61
|
+
dispose: () => {
|
|
62
|
+
try {
|
|
63
|
+
control.dispose();
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
restoreSection();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
reorder(options) {
|
|
72
|
+
const { container, scroll, items, accessibility, ...rest } = options;
|
|
73
|
+
const read = () => mapMotionItems(items(), resolve);
|
|
74
|
+
const control = runtime.reorder(resolve(container), {
|
|
75
|
+
...rest,
|
|
76
|
+
items: read,
|
|
77
|
+
scrollContainer: webScrollElement(scroll),
|
|
78
|
+
handle: (row) => read().find((item) => item.target === row)?.handle ?? row,
|
|
79
|
+
accessibility: { label: accessibility?.label, announcement: accessibility?.announcement },
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
get activeKey() {
|
|
83
|
+
return control.activeKey;
|
|
84
|
+
},
|
|
85
|
+
move: (key, before) => control.move(key, before),
|
|
86
|
+
moveUp: (key) => control.moveUp(key),
|
|
87
|
+
moveDown: (key) => control.moveDown(key),
|
|
88
|
+
refresh: () => control.refresh(),
|
|
89
|
+
cancel: () => control.cancel(),
|
|
90
|
+
pause: () => control.pause(),
|
|
91
|
+
play: () => control.play(),
|
|
92
|
+
dispose: () => control.dispose(),
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=collection-motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-motion.js","sourceRoot":"","sources":["../src/collection-motion.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,GAGf,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,UAAU,mBAAmB,CACjC,OAAmB,EACnB,MAAmB,EACnB,OAAuD;IAEvD,OAAO;QACL,YAAY,CAAC,MAAM,EAAE,OAAO;YAC1B,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;YACvC,IAAI,CAAC,MAAM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,CAAC,GAAG,CAAC;gBACpC,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;gBACxC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;gBAChC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE;gBAC9B,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE;gBAC5B,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;gBAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;aACjC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type ChoicePaint } from '@getcortexlabs/mavis-core';
|
|
3
|
+
/** One paint owner per decorative surface; native control semantics remain in the parent. */
|
|
4
|
+
export declare const ChoicePaintSurface: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
paint: {
|
|
6
|
+
type: PropType<ChoicePaint>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
paint: {
|
|
13
|
+
type: PropType<ChoicePaint>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
//# sourceMappingURL=ChoicePaint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoicePaint.d.ts","sourceRoot":"","sources":["../../src/components/ChoicePaint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnE,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAK1E,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB;;cAGK,QAAQ,CAAC,WAAW,CAAC;;;;;;;cAArB,QAAQ,CAAC,WAAW,CAAC;;;iGAqFvD,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defineComponent, h, ref, watch } from 'vue';
|
|
2
|
+
import { choiceMotion } from '@getcortexlabs/mavis-core';
|
|
3
|
+
import { useMavisTheme } from '@getcortexlabs/mavis-core/vue';
|
|
4
|
+
import { useConnectedMotion } from '../connected-motion.js';
|
|
5
|
+
import { useMotionContext } from '../motion-context.js';
|
|
6
|
+
/** One paint owner per decorative surface; native control semantics remain in the parent. */
|
|
7
|
+
export const ChoicePaintSurface = defineComponent({
|
|
8
|
+
name: 'MavisChoicePaint',
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: { paint: { type: Object, required: true } },
|
|
11
|
+
setup(props, { slots, attrs }) {
|
|
12
|
+
const element = ref();
|
|
13
|
+
const { theme } = useMavisTheme();
|
|
14
|
+
const forcedColors = ref(false);
|
|
15
|
+
const initial = {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
inset: 'calc(-1 * var(--m-choice-border, 0px))',
|
|
18
|
+
border: 'inherit',
|
|
19
|
+
borderRadius: 'inherit',
|
|
20
|
+
boxSizing: 'border-box',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
...props.paint,
|
|
25
|
+
};
|
|
26
|
+
useConnectedMotion(element, useMotionContext(), (runtime, target) => {
|
|
27
|
+
const forced = target.ownerDocument.defaultView.matchMedia('(forced-colors: active)');
|
|
28
|
+
let playback;
|
|
29
|
+
let geometry;
|
|
30
|
+
function update(instant = false) {
|
|
31
|
+
forcedColors.value = forced.matches;
|
|
32
|
+
if (forced.matches) {
|
|
33
|
+
playback?.stop();
|
|
34
|
+
playback = undefined;
|
|
35
|
+
runtime.release(target);
|
|
36
|
+
geometry?.dispose();
|
|
37
|
+
geometry = undefined;
|
|
38
|
+
for (const key of ['background-color', 'border-color', 'color'])
|
|
39
|
+
target.style.removeProperty(key);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (!geometry) {
|
|
43
|
+
runtime.set(target, props.paint);
|
|
44
|
+
geometry = runtime.observeGeometry(target);
|
|
45
|
+
}
|
|
46
|
+
const previous = playback;
|
|
47
|
+
playback = runtime.animate(target, props.paint, instant ? { duration: 0 } : choiceMotion(theme.value));
|
|
48
|
+
previous?.stop();
|
|
49
|
+
}
|
|
50
|
+
const changed = () => update(true);
|
|
51
|
+
forced.addEventListener('change', changed);
|
|
52
|
+
update(true);
|
|
53
|
+
const unwatch = watch(() => [props.paint, theme.value.motion], () => update(), { deep: true, flush: 'post' });
|
|
54
|
+
return () => {
|
|
55
|
+
unwatch();
|
|
56
|
+
forced.removeEventListener('change', changed);
|
|
57
|
+
playback?.stop();
|
|
58
|
+
runtime.release(target);
|
|
59
|
+
geometry?.dispose();
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
return () => h('span', { ...attrs, 'aria-hidden': 'true' }, [
|
|
63
|
+
h('span', {
|
|
64
|
+
ref: element,
|
|
65
|
+
style: {
|
|
66
|
+
...initial,
|
|
67
|
+
// Vue patches style objects on slot updates. Preserve the paint written by Jolt.
|
|
68
|
+
...Object.fromEntries(Object.keys(props.paint).map((key) => [
|
|
69
|
+
key,
|
|
70
|
+
forcedColors.value
|
|
71
|
+
? undefined
|
|
72
|
+
: element.value?.style?.[key] ||
|
|
73
|
+
initial[key],
|
|
74
|
+
])),
|
|
75
|
+
},
|
|
76
|
+
'data-m-choice-paint': '',
|
|
77
|
+
}, slots.default?.()),
|
|
78
|
+
]);
|
|
79
|
+
},
|
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
|
|
@@ -83,13 +83,13 @@ export declare const DateCalendar: import("vue").DefineComponent<import("vue").E
|
|
|
83
83
|
onSelect?: ((value: `${number}-${number}-${number}`) => any) | undefined;
|
|
84
84
|
"onUpdate:activeDate"?: ((value: `${number}-${number}-${number}`) => any) | undefined;
|
|
85
85
|
}>, {
|
|
86
|
+
min: `${number}-${number}-${number}`;
|
|
87
|
+
max: `${number}-${number}-${number}`;
|
|
88
|
+
locale: import("@getcortexlabs/mavis-core").DateLocale;
|
|
86
89
|
selected: `${number}-${number}-${number}` | null;
|
|
87
90
|
rangeStart: `${number}-${number}-${number}` | null;
|
|
88
91
|
rangeEnd: `${number}-${number}-${number}` | null;
|
|
89
|
-
min: `${number}-${number}-${number}`;
|
|
90
|
-
max: `${number}-${number}-${number}`;
|
|
91
92
|
unavailableDates: readonly `${number}-${number}-${number}`[];
|
|
92
|
-
locale: import("@getcortexlabs/mavis-core").DateLocale;
|
|
93
93
|
firstDayOfWeek: number;
|
|
94
94
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
95
95
|
//# sourceMappingURL=DateCalendar.d.ts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export declare const LoadingDecoration: import("vue").DefineComponent<import("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("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("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
|
+
radius: number | import("@getcortexlabs/mavis-core").Radius;
|
|
106
|
+
color: string;
|
|
107
|
+
id: string;
|
|
108
|
+
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
109
|
+
height: import("@getcortexlabs/mavis-core").Dimension;
|
|
110
|
+
grow: number;
|
|
111
|
+
shrink: number;
|
|
112
|
+
size: number;
|
|
113
|
+
animated: boolean;
|
|
114
|
+
effect: "shimmer" | "pulse";
|
|
115
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
116
|
+
//# sourceMappingURL=LoadingDecoration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingDecoration.d.ts","sourceRoot":"","sources":["../../src/components/LoadingDecoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAInE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA6BxE,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps } from '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
|
+
inert: '',
|
|
30
|
+
'aria-hidden': 'true',
|
|
31
|
+
style: { pointerEvents: 'none' },
|
|
32
|
+
}));
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=LoadingDecoration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingDecoration.js","sourceRoot":"","sources":["../../src/components/LoadingDecoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAA;AACnE,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,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,MAAM;YACrB,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE;SACjC,CAAC,CACH,CAAA;IACL,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -104,10 +104,10 @@ export declare const MAccordion: import("vue").DefineComponent<import("vue").Ext
|
|
|
104
104
|
"onUpdate:modelValue"?: ((value: import("@getcortexlabs/mavis-core").ChoiceValue[]) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
106
|
disabled: boolean;
|
|
107
|
+
id: string;
|
|
107
108
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
108
109
|
grow: number;
|
|
109
110
|
shrink: number;
|
|
110
|
-
id: string;
|
|
111
111
|
accessibilityHidden: boolean;
|
|
112
112
|
modelValue: readonly import("@getcortexlabs/mavis-core").ChoiceValue[];
|
|
113
113
|
multiple: boolean;
|
|
@@ -95,10 +95,10 @@ export declare const MAlert: import("vue").DefineComponent<import("vue").Extract
|
|
|
95
95
|
}>> & Readonly<{
|
|
96
96
|
onClose?: (() => any) | undefined;
|
|
97
97
|
}>, {
|
|
98
|
+
id: string;
|
|
98
99
|
width: import("@getcortexlabs/mavis-core").Dimension;
|
|
99
100
|
grow: number;
|
|
100
101
|
shrink: number;
|
|
101
|
-
id: string;
|
|
102
102
|
accessibilityHidden: boolean;
|
|
103
103
|
tone: "error" | "warning" | "success" | "info";
|
|
104
104
|
dismissible: boolean;
|
|
@@ -69,12 +69,12 @@ export declare const MAvatar: import("vue").DefineComponent<import("vue").Extrac
|
|
|
69
69
|
default: undefined;
|
|
70
70
|
};
|
|
71
71
|
}>> & Readonly<{}>, {
|
|
72
|
-
|
|
72
|
+
shape: "square" | "circle";
|
|
73
73
|
id: string;
|
|
74
|
+
name: string;
|
|
74
75
|
accessibilityLabel: string;
|
|
75
76
|
accessibilityHidden: boolean;
|
|
76
77
|
size: "sm" | "md" | "lg" | "xl";
|
|
77
78
|
src: string;
|
|
78
|
-
shape: "circle" | "square";
|
|
79
79
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
80
80
|
//# sourceMappingURL=MAvatar.d.ts.map
|
|
@@ -64,7 +64,7 @@ export declare const MBadge: import("vue").DefineComponent<import("vue").Extract
|
|
|
64
64
|
id: string;
|
|
65
65
|
accessibilityLabel: string;
|
|
66
66
|
accessibilityHidden: boolean;
|
|
67
|
-
size: "sm" | "md";
|
|
68
67
|
tone: "primary" | "accent" | "warning" | "success" | "danger" | "neutral";
|
|
68
|
+
size: "sm" | "md";
|
|
69
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
70
70
|
//# sourceMappingURL=MBadge.d.ts.map
|