@fastkit/vui 0.6.12 → 0.6.13
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/dist/tool/index.js +16 -7
- package/dist/tool/vite-plugin.d.ts +2 -2
- package/dist/tool/vite-plugin.d.ts.map +1 -1
- package/dist/vui.cjs.js +564 -51
- package/dist/vui.cjs.prod.js +564 -51
- package/dist/vui.css +393 -0
- package/dist/vui.d.ts +699 -16
- package/dist/vui.esm-bundler.js +526 -53
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/package.json +6 -6
package/dist/tool/index.js
CHANGED
|
@@ -37,18 +37,18 @@ import './icon-font';
|
|
|
37
37
|
export function installVui(app: App) {
|
|
38
38
|
_installVuiPlugin(app, {
|
|
39
39
|
colorScheme,
|
|
40
|
-
|
|
40
|
+
uiSettings: <%~ it.uiSettings %>,
|
|
41
41
|
icons: <%~ it.icons %>,
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export default installVui;
|
|
46
46
|
`.trim();
|
|
47
|
-
async function renderTemplate({ colorScheme, mediaMatch,
|
|
47
|
+
async function renderTemplate({ colorScheme, mediaMatch, uiSettings, icons, __dev, }) {
|
|
48
48
|
const result = await eta.render(TEMPLATE, {
|
|
49
49
|
colorScheme,
|
|
50
50
|
mediaMatch,
|
|
51
|
-
|
|
51
|
+
uiSettings: JSON.stringify(uiSettings),
|
|
52
52
|
icons: JSON.stringify(icons),
|
|
53
53
|
__dev,
|
|
54
54
|
}, { async: true });
|
|
@@ -82,9 +82,18 @@ function getBuiltinsDir() {
|
|
|
82
82
|
function viteVuiPlugin(options = {}) {
|
|
83
83
|
const plugins = [];
|
|
84
84
|
const builtinsDir = getBuiltinsDir();
|
|
85
|
-
const { colorScheme = path__default.join(builtinsDir, 'color-scheme'), mediaMatch = path__default.join(builtinsDir, 'media-match'), iconFont, iconFontDefaults, onBooted, onBootError,
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
const { colorScheme = path__default.join(builtinsDir, 'color-scheme'), mediaMatch = path__default.join(builtinsDir, 'media-match'), iconFont, iconFontDefaults, onBooted, onBootError, uiSettings = {
|
|
86
|
+
primaryScope: 'primary',
|
|
87
|
+
plainVariant: 'plain',
|
|
88
|
+
containedVariant: 'contained',
|
|
89
|
+
errorScope: 'error',
|
|
90
|
+
buttonDefault: {
|
|
91
|
+
color: 'base',
|
|
92
|
+
variant: 'contained',
|
|
93
|
+
},
|
|
94
|
+
dialogOk: {
|
|
95
|
+
color: 'primary',
|
|
96
|
+
},
|
|
88
97
|
}, icons = {
|
|
89
98
|
menuDown: 'mdi-menu-down',
|
|
90
99
|
}, __dev, } = options;
|
|
@@ -159,7 +168,7 @@ export {};
|
|
|
159
168
|
const settings = {
|
|
160
169
|
colorScheme: path__default.join(colorSchemeDest, 'color-scheme.info'),
|
|
161
170
|
mediaMatch: path__default.join(mediaMatchDest, 'media-match'),
|
|
162
|
-
|
|
171
|
+
uiSettings,
|
|
163
172
|
icons,
|
|
164
173
|
__dev,
|
|
165
174
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
import { RawIconFontEntry, IconFontSettings } from '@fastkit/icon-font-gen';
|
|
3
3
|
import { VuiServiceOptions } from '../service';
|
|
4
|
-
export interface ViteVuiPluginOptions extends Partial<Pick<VuiServiceOptions, '
|
|
4
|
+
export interface ViteVuiPluginOptions extends Partial<Pick<VuiServiceOptions, 'uiSettings' | 'icons'>> {
|
|
5
5
|
dynamicDest?: string;
|
|
6
6
|
colorScheme?: string;
|
|
7
7
|
mediaMatch?: string;
|
|
@@ -11,7 +11,7 @@ export interface ViteVuiPluginOptions extends Partial<Pick<VuiServiceOptions, 'c
|
|
|
11
11
|
onBootError?: (err: unknown) => any;
|
|
12
12
|
__dev?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export interface ViteVuiPluginResultSettings extends Pick<VuiServiceOptions, '
|
|
14
|
+
export interface ViteVuiPluginResultSettings extends Pick<VuiServiceOptions, 'uiSettings' | 'icons'> {
|
|
15
15
|
colorScheme: string;
|
|
16
16
|
mediaMatch: string;
|
|
17
17
|
__dev?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vui/src/tool/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkF/C,MAAM,WAAW,oBACf,SAAQ,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vui/src/tool/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkF/C,MAAM,WAAW,oBACf,SAAQ,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAGD,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,OAAO,CAAC;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,2BAA2B,CAAC;IACtC,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CA+HrB"}
|