@getcortexlabs/mavis-core 0.1.0-rc.14 → 0.1.0-rc.16
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 +2 -2
- package/dist/avatar.d.ts +5 -0
- package/dist/avatar.d.ts.map +1 -1
- package/dist/capabilities.d.ts +454 -1777
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +143 -82
- package/dist/capabilities.js.map +1 -1
- package/dist/contracts.d.ts +4 -4
- package/dist/experimental-regions.d.ts +5 -2
- package/dist/experimental-regions.d.ts.map +1 -1
- package/dist/experimental-regions.js +3 -0
- package/dist/experimental-regions.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/vue/advanced-collections.d.ts +16 -16
- package/dist/vue/animated-text.d.ts +4 -4
- package/dist/vue/chart.d.ts +5 -5
- package/dist/vue/command-palette.d.ts +4 -4
- package/dist/vue/component-props.d.ts +92 -22
- package/dist/vue/component-props.d.ts.map +1 -1
- package/dist/vue/component-props.js +4 -0
- package/dist/vue/component-props.js.map +1 -1
- package/dist/vue/composer.d.ts +11 -9
- package/dist/vue/composer.d.ts.map +1 -1
- package/dist/vue/composer.js +12 -16
- package/dist/vue/composer.js.map +1 -1
- package/dist/vue/configurator.d.ts +16 -16
- package/dist/vue/creative-controls.d.ts +11 -11
- package/dist/vue/dashboard-charts.d.ts +6 -6
- package/dist/vue/dashboard-effects.d.ts +7 -7
- package/dist/vue/date-picker.d.ts +52 -52
- package/dist/vue/discovery-controls.d.ts +8 -8
- package/dist/vue/editor-controls.d.ts +223 -0
- package/dist/vue/editor-controls.d.ts.map +1 -0
- package/dist/vue/editor-controls.js +323 -0
- package/dist/vue/editor-controls.js.map +1 -0
- package/dist/vue/global-components.d.ts +22 -1
- package/dist/vue/global-components.d.ts.map +1 -1
- package/dist/vue/image-cropper.d.ts +8 -8
- package/dist/vue/image-cropper.d.ts.map +1 -1
- package/dist/vue/index.d.ts +3 -2
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +1 -0
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/kanban.d.ts +2 -2
- package/dist/vue/marquee.d.ts +4 -4
- package/dist/vue/menu.d.ts +4 -4
- package/dist/vue/number-flow.d.ts +3 -3
- package/dist/vue/platform.d.ts +1 -2
- package/dist/vue/platform.d.ts.map +1 -1
- package/dist/vue/platform.js.map +1 -1
- package/dist/vue/props.d.ts +44 -44
- package/dist/vue/reveal-state.d.ts +1 -1
- package/dist/vue/scheduler.d.ts +10 -10
- package/dist/vue/screen-component-props.d.ts +10 -0
- package/dist/vue/screen-component-props.d.ts.map +1 -1
- package/dist/vue/screen-component-props.js +6 -0
- package/dist/vue/screen-component-props.js.map +1 -1
- package/dist/vue/scroll-frame.d.ts +29 -6
- package/dist/vue/scroll-frame.d.ts.map +1 -1
- package/dist/vue/scroll-frame.js +106 -43
- package/dist/vue/scroll-frame.js.map +1 -1
- package/dist/vue/speed-dial.d.ts +3 -3
- package/dist/vue/swipe-actions.d.ts +3 -3
- package/dist/vue/swipe-deck.d.ts +3 -3
- package/dist/vue/theme-provider.d.ts +17 -2
- package/dist/vue/theme-provider.d.ts.map +1 -1
- package/dist/vue/theme-provider.js +7 -1
- package/dist/vue/theme-provider.js.map +1 -1
- package/dist/vue/theme.d.ts +7 -0
- package/dist/vue/theme.d.ts.map +1 -1
- package/dist/vue/theme.js +23 -19
- package/dist/vue/theme.js.map +1 -1
- package/dist/vue/time-picker.d.ts +20 -20
- package/dist/vue/tour.d.ts +3 -3
- package/dist/vue/tree-view.d.ts +3 -3
- package/dist/vue/wayfinding-controls.d.ts +1 -1
- package/dist/vue/workflows.d.ts +3 -3
- package/package.json +1 -1
- package/src/avatar.ts +6 -0
- package/src/capabilities.ts +148 -82
- package/src/experimental-regions.ts +10 -2
- package/src/index.ts +2 -7
- package/src/vue/component-props.ts +4 -0
- package/src/vue/composer.ts +22 -16
- package/src/vue/editor-controls.ts +370 -0
- package/src/vue/global-components.ts +21 -1
- package/src/vue/index.ts +3 -1
- package/src/vue/platform.ts +1 -2
- package/src/vue/screen-component-props.ts +6 -0
- package/src/vue/scroll-frame.ts +140 -54
- package/src/vue/theme-provider.ts +14 -1
- package/src/vue/theme.ts +31 -18
- package/dist/macos-capabilities.generated.d.ts +0 -1738
- package/dist/macos-capabilities.generated.d.ts.map +0 -1
- package/dist/macos-capabilities.generated.js +0 -4191
- package/dist/macos-capabilities.generated.js.map +0 -1
- package/src/macos-capabilities.generated.ts +0 -4190
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type PropType } from '@vue/runtime-core';
|
|
2
2
|
import type { MavisTheme } from '../theme/types.js';
|
|
3
|
-
import { type AppearanceMode } from './theme.js';
|
|
3
|
+
import { type ThemePair, type AppearanceMode } from './theme.js';
|
|
4
4
|
export declare const themeProviderProps: {
|
|
5
5
|
theme: {
|
|
6
6
|
type: PropType<MavisTheme>;
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
|
+
themePair: {
|
|
10
|
+
type: PropType<ThemePair>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
9
13
|
darkTheme: {
|
|
10
14
|
type: PropType<MavisTheme>;
|
|
11
15
|
default: undefined;
|
|
@@ -21,6 +25,10 @@ export declare const MThemeProvider: import("@vue/runtime-core").DefineComponent
|
|
|
21
25
|
type: PropType<MavisTheme>;
|
|
22
26
|
default: undefined;
|
|
23
27
|
};
|
|
28
|
+
themePair: {
|
|
29
|
+
type: PropType<ThemePair>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
24
32
|
darkTheme: {
|
|
25
33
|
type: PropType<MavisTheme>;
|
|
26
34
|
default: undefined;
|
|
@@ -32,6 +40,7 @@ export declare const MThemeProvider: import("@vue/runtime-core").DefineComponent
|
|
|
32
40
|
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
33
41
|
[key: string]: any;
|
|
34
42
|
}>[] | undefined, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
43
|
+
'update:themePair': (_pair: ThemePair) => true;
|
|
35
44
|
'update:theme': (_theme: MavisTheme) => true;
|
|
36
45
|
'update:appearance': (_appearance: AppearanceMode) => true;
|
|
37
46
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
@@ -39,6 +48,10 @@ export declare const MThemeProvider: import("@vue/runtime-core").DefineComponent
|
|
|
39
48
|
type: PropType<MavisTheme>;
|
|
40
49
|
default: undefined;
|
|
41
50
|
};
|
|
51
|
+
themePair: {
|
|
52
|
+
type: PropType<ThemePair>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
42
55
|
darkTheme: {
|
|
43
56
|
type: PropType<MavisTheme>;
|
|
44
57
|
default: undefined;
|
|
@@ -48,11 +61,13 @@ export declare const MThemeProvider: import("@vue/runtime-core").DefineComponent
|
|
|
48
61
|
default: undefined;
|
|
49
62
|
};
|
|
50
63
|
}>> & Readonly<{
|
|
64
|
+
"onUpdate:themePair"?: ((_pair: ThemePair) => any) | undefined;
|
|
51
65
|
"onUpdate:theme"?: ((_theme: MavisTheme) => any) | undefined;
|
|
52
66
|
"onUpdate:appearance"?: ((_appearance: AppearanceMode) => any) | undefined;
|
|
53
67
|
}>, {
|
|
54
68
|
appearance: AppearanceMode;
|
|
55
|
-
darkTheme: MavisTheme;
|
|
56
69
|
theme: MavisTheme;
|
|
70
|
+
themePair: ThemePair;
|
|
71
|
+
darkTheme: MavisTheme;
|
|
57
72
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
58
73
|
//# sourceMappingURL=theme-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../src/vue/theme-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../src/vue/theme-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAEL,KAAK,SAAS,EAGd,KAAK,cAAc,EAEpB,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,kBAAkB;;cACJ,QAAQ,CAAC,UAAU,CAAC;;;;cAChB,QAAQ,CAAC,SAAS,CAAC;;;;cACnB,QAAQ,CAAC,UAAU,CAAC;;;;cACnB,QAAQ,CAAC,cAAc,CAAC;;;CACvD,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,cAAc;;cAPA,QAAQ,CAAC,UAAU,CAAC;;;;cAChB,QAAQ,CAAC,SAAS,CAAC;;;;cACnB,QAAQ,CAAC,UAAU,CAAC;;;;cACnB,QAAQ,CAAC,cAAc,CAAC;;;;;;gCASxB,SAAS;6BACZ,UAAU;uCACA,cAAc;;;cAd1B,QAAQ,CAAC,UAAU,CAAC;;;;cAChB,QAAQ,CAAC,SAAS,CAAC;;;;cACnB,QAAQ,CAAC,UAAU,CAAC;;;;cACnB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;0FAuEtD,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { computed, defineComponent, provide } from '@vue/runtime-core';
|
|
2
|
-
import { themeKey, useMavisTheme } from './theme.js';
|
|
2
|
+
import { checkedThemePair, themeKey, useMavisTheme, } from './theme.js';
|
|
3
3
|
export const themeProviderProps = {
|
|
4
4
|
theme: { type: Object, default: undefined },
|
|
5
|
+
themePair: { type: Object, default: undefined },
|
|
5
6
|
darkTheme: { type: Object, default: undefined },
|
|
6
7
|
appearance: { type: String, default: undefined },
|
|
7
8
|
};
|
|
@@ -11,6 +12,7 @@ export const MThemeProvider = defineComponent({
|
|
|
11
12
|
inheritAttrs: false,
|
|
12
13
|
props: themeProviderProps,
|
|
13
14
|
emits: {
|
|
15
|
+
'update:themePair': (_pair) => true,
|
|
14
16
|
'update:theme': (_theme) => true,
|
|
15
17
|
'update:appearance': (_appearance) => true,
|
|
16
18
|
},
|
|
@@ -21,6 +23,7 @@ export const MThemeProvider = defineComponent({
|
|
|
21
23
|
throw new RangeError('darkTheme must have dark appearance');
|
|
22
24
|
return {
|
|
23
25
|
...parent.themes.value,
|
|
26
|
+
...(props.themePair && checkedThemePair(props.themePair)),
|
|
24
27
|
...(props.theme ? { [props.theme.appearance]: props.theme } : {}),
|
|
25
28
|
...(props.darkTheme ? { dark: props.darkTheme } : {}),
|
|
26
29
|
};
|
|
@@ -46,6 +49,9 @@ export const MThemeProvider = defineComponent({
|
|
|
46
49
|
themes,
|
|
47
50
|
appearance,
|
|
48
51
|
systemAppearance: parent.systemAppearance,
|
|
52
|
+
setThemePair(pair) {
|
|
53
|
+
emit('update:themePair', checkedThemePair(pair));
|
|
54
|
+
},
|
|
49
55
|
setTheme(next) {
|
|
50
56
|
emit('update:theme', next);
|
|
51
57
|
emit('update:appearance', next.appearance);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.js","sourceRoot":"","sources":["../../src/vue/theme-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,mBAAmB,CAAA;AAErF,OAAO,
|
|
1
|
+
{"version":3,"file":"theme-provider.js","sourceRoot":"","sources":["../../src/vue/theme-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,mBAAmB,C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AM;YACN,UAAU;YACV,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,YAAY,CAAC,IAAI;gBACf,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAA;YAClD,CAAC;YACD,QAAQ,CAAC,IAAI;gBACX,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;gBAC1B,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;YAC5C,CAAC;YACD,aAAa,CAAC,IAAI;gBAChB,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;oBAC7C,MAAM,IAAI,UAAU,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAA;gBAC1D,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;YACjC,CAAC;YACD,iFAAiF;YACjF,OAAO,KAAI,CAAC;SACb,CAAA;QACD,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAC1B,OAAO,GAAG,EAAE;YACV,wEAAwE;YACxE,KAAK,KAAK,CAAC,KAAK,CAAA;YAChB,OAAO,KAAK,CAAC,OAAO,EAAE,EAAE,CAAA;QAC1B,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
package/dist/vue/theme.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export interface ThemeContextOptions {
|
|
|
13
13
|
appearance?: AppearanceMode;
|
|
14
14
|
source?: AppearanceSource;
|
|
15
15
|
}
|
|
16
|
+
export interface ThemePair {
|
|
17
|
+
light: MavisTheme;
|
|
18
|
+
dark: MavisTheme;
|
|
19
|
+
}
|
|
20
|
+
export declare function checkedThemePair({ light, dark }: ThemePair): ThemePair;
|
|
16
21
|
export declare function createThemeContext(options?: MavisTheme | ThemeContextOptions): {
|
|
17
22
|
theme: Readonly<import("@vue/reactivity").Ref<{
|
|
18
23
|
readonly name: string;
|
|
@@ -1186,6 +1191,8 @@ export declare function createThemeContext(options?: MavisTheme | ThemeContextOp
|
|
|
1186
1191
|
setAppearance(mode: AppearanceMode): void;
|
|
1187
1192
|
/** Registers the theme for its own appearance and pins that appearance. */
|
|
1188
1193
|
setTheme(next: MavisTheme): void;
|
|
1194
|
+
/** Replaces both palettes in one reactive write, preserving the appearance selection. */
|
|
1195
|
+
setThemePair(pair: ThemePair): void;
|
|
1189
1196
|
dispose(): void;
|
|
1190
1197
|
};
|
|
1191
1198
|
export type MavisThemeContext = ReturnType<typeof createThemeContext>;
|
package/dist/vue/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/vue/theme.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/vue/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAA;AAElD,gHAAgH;AAChH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,UAAU,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAChE;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,U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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2B7E,6FAA6F;;wBAEzE,cAAc;IAGlC,2EAA2E;mBAC5D,UAAU;IAMzB,yFAAyF;uBACtE,SAAS;;EAO/B;AACD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAErE,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,iBAAiB,CAAyB,CAAA;AAE9E,kFAAkF;AAClF,wBAAgB,aAAa,IAAI,iBAAiB,CAEjD"}
|
package/dist/vue/theme.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { inject, readonly, shallowRef } from '@vue/runtime-core';
|
|
1
|
+
import { computed, inject, readonly, shallowRef } from '@vue/runtime-core';
|
|
2
2
|
import { mavis } from '../theme/themes.js';
|
|
3
|
+
export function checkedThemePair({ light, dark }) {
|
|
4
|
+
if (light?.appearance !== 'light' || dark?.appearance !== 'dark')
|
|
5
|
+
throw new RangeError('A theme pair requires a light theme under light and a dark theme under dark.');
|
|
6
|
+
return { light, dark };
|
|
7
|
+
}
|
|
3
8
|
const modes = ['system', 'light', 'dark'];
|
|
4
9
|
function checkMode(mode) {
|
|
5
10
|
if (!modes.includes(mode))
|
|
@@ -9,29 +14,24 @@ function checkMode(mode) {
|
|
|
9
14
|
export function createThemeContext(options = {}) {
|
|
10
15
|
const config = 'colors' in options ? { theme: options } : options;
|
|
11
16
|
const initial = config.theme ?? mavis;
|
|
12
|
-
const
|
|
13
|
-
[initial.appearance]: initial,
|
|
14
|
-
});
|
|
17
|
+
const variants = { [initial.appearance]: initial };
|
|
15
18
|
if (config.darkTheme) {
|
|
16
19
|
if (config.darkTheme.appearance !== 'dark')
|
|
17
20
|
throw new RangeError('darkTheme must have dark appearance');
|
|
18
|
-
|
|
21
|
+
variants.dark = config.darkTheme;
|
|
19
22
|
}
|
|
20
|
-
const
|
|
21
|
-
const
|
|
23
|
+
const selection = shallowRef({ variants, mode: checkMode(config.appearance ?? 'system') });
|
|
24
|
+
const themes = computed(() => selection.value.variants);
|
|
25
|
+
const appearance = computed(() => selection.value.mode);
|
|
22
26
|
const systemAppearance = shallowRef(config.source?.current());
|
|
23
|
-
const
|
|
27
|
+
const theme = computed(() => {
|
|
24
28
|
const wanted = appearance.value === 'system'
|
|
25
29
|
? (systemAppearance.value ?? initial.appearance)
|
|
26
30
|
: appearance.value;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
resolve();
|
|
31
|
+
return themes.value[wanted] ?? themes.value[wanted === 'dark' ? 'light' : 'dark'] ?? initial;
|
|
32
|
+
});
|
|
31
33
|
const stop = config.source?.observe((next) => {
|
|
32
34
|
systemAppearance.value = next;
|
|
33
|
-
if (appearance.value === 'system')
|
|
34
|
-
resolve();
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
37
|
theme: readonly(theme),
|
|
@@ -40,14 +40,18 @@ export function createThemeContext(options = {}) {
|
|
|
40
40
|
/** The selection: `system` follows the device; `light` and `dark` are explicit overrides. */
|
|
41
41
|
appearance: readonly(appearance),
|
|
42
42
|
setAppearance(mode) {
|
|
43
|
-
|
|
44
|
-
resolve();
|
|
43
|
+
selection.value = { ...selection.value, mode: checkMode(mode) };
|
|
45
44
|
},
|
|
46
45
|
/** Registers the theme for its own appearance and pins that appearance. */
|
|
47
46
|
setTheme(next) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
selection.value = {
|
|
48
|
+
variants: { ...themes.value, [next.appearance]: next },
|
|
49
|
+
mode: next.appearance,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
/** Replaces both palettes in one reactive write, preserving the appearance selection. */
|
|
53
|
+
setThemePair(pair) {
|
|
54
|
+
selection.value = { variants: checkedThemePair(pair), mode: appearance.value };
|
|
51
55
|
},
|
|
52
56
|
dispose() {
|
|
53
57
|
stop?.();
|
package/dist/vue/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/vue/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/vue/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAA;AAC7F,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAwB1C,MAAM,UAAU,gBAAgB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAa;IACzD,IAAI,KAAK,EAAE,UAAU,KAAK,OAAO,IAAI,IAAI,EAAE,UAAU,KAAK,MAAM;QAC9D,MAAM,IAAI,UAAU,CAClB,8EAA8E,CAC/E,CAAA;IACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AACxB,CAAC;AAED,MAAM,KAAK,GAA8B,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAEpE,SAAS,SAAS,CAAC,IAAoB;IACrC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC3F,OAAO,IAAI,CAAA;AACb,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,UAA4C,EAA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AAG,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;AAChE,CAAC"}
|
|
@@ -218,8 +218,8 @@ export declare function createTimePicker(ui: {
|
|
|
218
218
|
};
|
|
219
219
|
}>> & Readonly<{
|
|
220
220
|
onFocus?: (() => any) | undefined;
|
|
221
|
-
"onUpdate:modelValue"?: ((_value: string | null) => any) | undefined;
|
|
222
221
|
onBlur?: (() => any) | undefined;
|
|
222
|
+
"onUpdate:modelValue"?: ((_value: string | null) => any) | undefined;
|
|
223
223
|
"onUpdate:draft"?: ((_value: string) => any) | undefined;
|
|
224
224
|
onValidityChange?: ((_value: TimeValidation) => any) | undefined;
|
|
225
225
|
}>, {
|
|
@@ -228,23 +228,23 @@ export declare function createTimePicker(ui: {
|
|
|
228
228
|
disabled: boolean;
|
|
229
229
|
error: string;
|
|
230
230
|
id: string;
|
|
231
|
-
grow: number;
|
|
232
231
|
modelValue: string | null;
|
|
233
232
|
width: import("../layout.js").Dimension;
|
|
234
|
-
|
|
233
|
+
grow: number;
|
|
234
|
+
placeholder: string;
|
|
235
|
+
helperText: string;
|
|
236
|
+
required: boolean;
|
|
235
237
|
readonly: boolean;
|
|
238
|
+
locale: import("../time.js").TimeLocale;
|
|
239
|
+
confirmLabel: string;
|
|
240
|
+
cancelLabel: string;
|
|
236
241
|
clearLabel: string;
|
|
237
|
-
helperText: string;
|
|
238
|
-
invalidLabel: string;
|
|
239
|
-
placeholder: string;
|
|
240
242
|
draft: string;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
+
invalidLabel: string;
|
|
244
|
+
minuteStep: number;
|
|
243
245
|
chooseLabel: string;
|
|
244
|
-
required: boolean;
|
|
245
246
|
hourLabel: string;
|
|
246
247
|
minuteLabel: string;
|
|
247
|
-
minuteStep: number;
|
|
248
248
|
periodLabel: string;
|
|
249
249
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any> & {
|
|
250
250
|
new (): InstanceType<import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
@@ -455,8 +455,8 @@ export declare function createTimePicker(ui: {
|
|
|
455
455
|
};
|
|
456
456
|
}>> & Readonly<{
|
|
457
457
|
onFocus?: (() => any) | undefined;
|
|
458
|
-
"onUpdate:modelValue"?: ((_value: string | null) => any) | undefined;
|
|
459
458
|
onBlur?: (() => any) | undefined;
|
|
459
|
+
"onUpdate:modelValue"?: ((_value: string | null) => any) | undefined;
|
|
460
460
|
"onUpdate:draft"?: ((_value: string) => any) | undefined;
|
|
461
461
|
onValidityChange?: ((_value: TimeValidation) => any) | undefined;
|
|
462
462
|
}>, {
|
|
@@ -465,23 +465,23 @@ export declare function createTimePicker(ui: {
|
|
|
465
465
|
disabled: boolean;
|
|
466
466
|
error: string;
|
|
467
467
|
id: string;
|
|
468
|
-
grow: number;
|
|
469
468
|
modelValue: string | null;
|
|
470
469
|
width: import("../layout.js").Dimension;
|
|
471
|
-
|
|
470
|
+
grow: number;
|
|
471
|
+
placeholder: string;
|
|
472
|
+
helperText: string;
|
|
473
|
+
required: boolean;
|
|
472
474
|
readonly: boolean;
|
|
475
|
+
locale: import("../time.js").TimeLocale;
|
|
476
|
+
confirmLabel: string;
|
|
477
|
+
cancelLabel: string;
|
|
473
478
|
clearLabel: string;
|
|
474
|
-
helperText: string;
|
|
475
|
-
invalidLabel: string;
|
|
476
|
-
placeholder: string;
|
|
477
479
|
draft: string;
|
|
478
|
-
|
|
479
|
-
|
|
480
|
+
invalidLabel: string;
|
|
481
|
+
minuteStep: number;
|
|
480
482
|
chooseLabel: string;
|
|
481
|
-
required: boolean;
|
|
482
483
|
hourLabel: string;
|
|
483
484
|
minuteLabel: string;
|
|
484
|
-
minuteStep: number;
|
|
485
485
|
periodLabel: string;
|
|
486
486
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>> & InputHandle;
|
|
487
487
|
};
|
package/dist/vue/tour.d.ts
CHANGED
|
@@ -93,15 +93,15 @@ export declare function createTour(ui: {
|
|
|
93
93
|
};
|
|
94
94
|
}>> & Readonly<{
|
|
95
95
|
onMissing?: ((_id: string) => any) | undefined;
|
|
96
|
-
"onUpdate:modelValue"?: ((_id: string | null) => any) | undefined;
|
|
97
96
|
onFinish?: ((_reason: string) => any) | undefined;
|
|
97
|
+
"onUpdate:modelValue"?: ((_id: string | null) => any) | undefined;
|
|
98
98
|
}>, {
|
|
99
99
|
modelValue: string | null;
|
|
100
100
|
animated: boolean;
|
|
101
|
-
backLabel: string;
|
|
102
101
|
nextLabel: string;
|
|
103
|
-
|
|
102
|
+
backLabel: string;
|
|
104
103
|
skipLabel: string;
|
|
104
|
+
finishLabel: string;
|
|
105
105
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
106
106
|
MTourTarget: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
107
107
|
name: {
|
package/dist/vue/tree-view.d.ts
CHANGED
|
@@ -95,17 +95,17 @@ export declare function createTreeView(ui: {
|
|
|
95
95
|
default: string;
|
|
96
96
|
};
|
|
97
97
|
}>> & Readonly<{
|
|
98
|
-
"onUpdate:modelValue"?: ((_key: ChoiceValue) => any) | undefined;
|
|
99
98
|
onLoad?: ((_node: TreeNode) => any) | undefined;
|
|
99
|
+
"onUpdate:modelValue"?: ((_key: ChoiceValue) => any) | undefined;
|
|
100
100
|
"onUpdate:expanded"?: ((_keys: ChoiceValue[]) => any) | undefined;
|
|
101
101
|
}>, {
|
|
102
102
|
expandedLabel: string;
|
|
103
103
|
collapsedLabel: string;
|
|
104
104
|
disabled: boolean;
|
|
105
|
+
expanded: readonly ChoiceValue[];
|
|
105
106
|
modelValue: ChoiceValue | null;
|
|
106
|
-
emptyLabel: string;
|
|
107
107
|
loadingLabel: string;
|
|
108
|
-
|
|
108
|
+
emptyLabel: string;
|
|
109
109
|
loadingKeys: readonly ChoiceValue[];
|
|
110
110
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
111
111
|
//# sourceMappingURL=tree-view.d.ts.map
|
|
@@ -91,8 +91,8 @@ export declare function createWayfindingControls(ui: Primitives, platform: 'web'
|
|
|
91
91
|
modelValue: import("../choice.js").ChoiceValue | null;
|
|
92
92
|
expandLabel: string;
|
|
93
93
|
collapseLabel: string;
|
|
94
|
-
collapsed: boolean;
|
|
95
94
|
collapsible: boolean;
|
|
95
|
+
collapsed: boolean;
|
|
96
96
|
currentLabel: string;
|
|
97
97
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
98
98
|
MBreadcrumb: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
package/dist/vue/workflows.d.ts
CHANGED
|
@@ -253,14 +253,14 @@ export declare function createWorkflows(ui: Primitives, platform: 'web' | 'nativ
|
|
|
253
253
|
modelValue: number;
|
|
254
254
|
loading: boolean;
|
|
255
255
|
emptyLabel: string;
|
|
256
|
-
nextLabel: string;
|
|
257
256
|
previousLabel: string;
|
|
257
|
+
nextLabel: string;
|
|
258
258
|
currentLabel: string;
|
|
259
|
-
invalidPageLabel: string;
|
|
260
|
-
pageLabel: string;
|
|
261
259
|
pageSize: number;
|
|
262
260
|
siblingCount: number;
|
|
261
|
+
pageLabel: string;
|
|
263
262
|
statusText: string;
|
|
263
|
+
invalidPageLabel: string;
|
|
264
264
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
265
265
|
};
|
|
266
266
|
export {};
|
package/package.json
CHANGED
package/src/avatar.ts
CHANGED