@getcortexlabs/mavis-web 0.1.0-rc.11.1 → 0.1.0-rc.12
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/components/MChip.d.ts +1 -1
- package/dist/components/MCombobox.d.ts +1 -1
- package/dist/components/MDialog.d.ts +2 -2
- package/dist/components/MFilePicker.d.ts +3 -3
- package/dist/components/MLink.d.ts +1 -1
- package/dist/components/MListItem.d.ts +1 -1
- package/dist/components/MPinInput.d.ts +57 -0
- package/dist/components/MPinInput.d.ts.map +1 -0
- package/dist/components/MPinInput.js +159 -0
- package/dist/components/MPinInput.js.map +1 -0
- package/dist/components/MPopover.d.ts.map +1 -1
- package/dist/components/MPopover.js +29 -19
- package/dist/components/MPopover.js.map +1 -1
- package/dist/components/MResizablePanels.d.ts +1 -1
- package/dist/components/MStack.d.ts +6 -6
- package/dist/components/MTimePicker.d.ts +4 -4
- package/dist/components/configurator.d.ts +1 -1
- package/dist/components/creative.d.ts +614 -0
- package/dist/components/creative.d.ts.map +1 -0
- package/dist/components/creative.js +191 -0
- package/dist/components/creative.js.map +1 -0
- package/dist/components/dashboard.d.ts +474 -0
- package/dist/components/dashboard.d.ts.map +1 -0
- package/dist/components/dashboard.js +286 -0
- package/dist/components/dashboard.js.map +1 -0
- package/dist/components/discovery.d.ts +2 -2
- package/dist/components/screen-components.d.ts +502 -0
- package/dist/components/screen-components.d.ts.map +1 -0
- package/dist/components/screen-components.js +67 -0
- package/dist/components/screen-components.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/use-motion-surface.d.ts.map +1 -1
- package/dist/use-motion-surface.js +27 -8
- package/dist/use-motion-surface.js.map +1 -1
- package/package.json +3 -3
- package/src/components/MPinInput.ts +194 -0
- package/src/components/MPopover.ts +33 -19
- package/src/components/creative.ts +240 -0
- package/src/components/dashboard.ts +353 -0
- package/src/components/screen-components.ts +86 -0
- package/src/index.ts +64 -0
- package/src/use-motion-surface.ts +40 -15
package/src/index.ts
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MKanban,
|
|
3
|
+
MDonutChart,
|
|
4
|
+
MSparkline,
|
|
5
|
+
MGradientBackground,
|
|
6
|
+
MParticleField,
|
|
7
|
+
MConfetti,
|
|
8
|
+
} from './components/dashboard.js'
|
|
9
|
+
import {
|
|
10
|
+
MColorPicker,
|
|
11
|
+
MSwipeDeck,
|
|
12
|
+
MGauge,
|
|
13
|
+
MTour,
|
|
14
|
+
MTourTarget,
|
|
15
|
+
MTransferList,
|
|
16
|
+
MMarquee,
|
|
17
|
+
} from './components/creative.js'
|
|
18
|
+
import {
|
|
19
|
+
MCollapsibleHeader,
|
|
20
|
+
MRefreshControl,
|
|
21
|
+
MComposer,
|
|
22
|
+
MSpeedDial,
|
|
23
|
+
MPinInput,
|
|
24
|
+
MAnimatedText,
|
|
25
|
+
} from './components/screen-components.js'
|
|
1
26
|
import {
|
|
2
27
|
MImageViewer,
|
|
3
28
|
MNumberFlow,
|
|
@@ -65,6 +90,25 @@ import { MReveal } from './components/MReveal.js'
|
|
|
65
90
|
import { MSheet } from './components/MSheet.js'
|
|
66
91
|
|
|
67
92
|
export {
|
|
93
|
+
MKanban,
|
|
94
|
+
MDonutChart,
|
|
95
|
+
MSparkline,
|
|
96
|
+
MGradientBackground,
|
|
97
|
+
MParticleField,
|
|
98
|
+
MConfetti,
|
|
99
|
+
MColorPicker,
|
|
100
|
+
MSwipeDeck,
|
|
101
|
+
MGauge,
|
|
102
|
+
MTour,
|
|
103
|
+
MTourTarget,
|
|
104
|
+
MTransferList,
|
|
105
|
+
MMarquee,
|
|
106
|
+
MCollapsibleHeader,
|
|
107
|
+
MRefreshControl,
|
|
108
|
+
MComposer,
|
|
109
|
+
MSpeedDial,
|
|
110
|
+
MPinInput,
|
|
111
|
+
MAnimatedText,
|
|
68
112
|
MImageViewer,
|
|
69
113
|
MNumberFlow,
|
|
70
114
|
MSortableList,
|
|
@@ -170,6 +214,26 @@ export function createMavis(options: MavisOptions = {}) {
|
|
|
170
214
|
if (components === false) return
|
|
171
215
|
for (const [name, component] of Object.entries(
|
|
172
216
|
components ?? {
|
|
217
|
+
MKanban,
|
|
218
|
+
MDonutChart,
|
|
219
|
+
MSparkline,
|
|
220
|
+
MGradientBackground,
|
|
221
|
+
MParticleField,
|
|
222
|
+
MConfetti,
|
|
223
|
+
MColorPicker,
|
|
224
|
+
MSwipeDeck,
|
|
225
|
+
MGauge,
|
|
226
|
+
MTour,
|
|
227
|
+
MTourTarget,
|
|
228
|
+
MTransferList,
|
|
229
|
+
MMarquee,
|
|
230
|
+
MCollapsibleHeader,
|
|
231
|
+
MRefreshControl,
|
|
232
|
+
MComposer,
|
|
233
|
+
MSpeedDial,
|
|
234
|
+
MPinInput,
|
|
235
|
+
MAnimatedText,
|
|
236
|
+
|
|
173
237
|
MImageViewer,
|
|
174
238
|
MNumberFlow,
|
|
175
239
|
MSortableList,
|
|
@@ -12,24 +12,49 @@ export function useMotionSurface(
|
|
|
12
12
|
const element = shallowRef<HTMLElement>()
|
|
13
13
|
const connected = computed(() => (surface() ? element.value : undefined))
|
|
14
14
|
useConnectedMotion(connected, useMotionContext(), (runtime, target) => {
|
|
15
|
+
// Responsive layout can resize a declared surface before an animation ends.
|
|
16
|
+
// Keep Jolt's geometry lease alive until every playback has been released.
|
|
17
|
+
let geometry: ReturnType<typeof runtime.observeGeometry> | undefined
|
|
18
|
+
const display = target.ownerDocument.defaultView!.getComputedStyle(target).display
|
|
19
|
+
if (!['inline', 'none', 'contents'].includes(display)) {
|
|
20
|
+
runtime.set(target, { scale: 1 })
|
|
21
|
+
geometry = runtime.observeGeometry(target)
|
|
22
|
+
}
|
|
15
23
|
let release: (() => void) | undefined
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
release =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
let stop: () => void
|
|
25
|
+
try {
|
|
26
|
+
stop = watch(
|
|
27
|
+
surface,
|
|
28
|
+
(reference) => {
|
|
29
|
+
release?.()
|
|
30
|
+
release = undefined
|
|
31
|
+
if (reference)
|
|
32
|
+
release = bindMotionSurface(
|
|
33
|
+
reference,
|
|
34
|
+
webMotionSurface(
|
|
35
|
+
runtime,
|
|
36
|
+
target,
|
|
37
|
+
() => true,
|
|
38
|
+
runtime,
|
|
39
|
+
undefined,
|
|
40
|
+
undefined,
|
|
41
|
+
plainText,
|
|
42
|
+
).adapter,
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
{ immediate: true, flush: 'post' },
|
|
46
|
+
)
|
|
47
|
+
} catch (error) {
|
|
48
|
+
geometry?.dispose()
|
|
49
|
+
throw error
|
|
50
|
+
}
|
|
30
51
|
return () => {
|
|
31
52
|
stop()
|
|
32
|
-
|
|
53
|
+
try {
|
|
54
|
+
release?.()
|
|
55
|
+
} finally {
|
|
56
|
+
geometry?.dispose()
|
|
57
|
+
}
|
|
33
58
|
}
|
|
34
59
|
})
|
|
35
60
|
return {
|