@unocss/vite 0.58.9 → 0.59.0
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/package.json +23 -16
- package/dist/client.cjs +0 -54
- package/dist/client.d.cts +0 -2
- package/dist/index.cjs +0 -1270
- package/dist/index.d.cts +0 -78
package/dist/index.d.cts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as vite from 'vite';
|
|
2
|
-
import { Plugin } from 'vite';
|
|
3
|
-
import { UserConfig, UnocssPluginContext, UserConfigDefaults } from '@unocss/core';
|
|
4
|
-
|
|
5
|
-
interface VitePluginConfig<Theme extends object = object> extends UserConfig<Theme> {
|
|
6
|
-
/**
|
|
7
|
-
* Enable UnoCSS inspector
|
|
8
|
-
*
|
|
9
|
-
* @default true
|
|
10
|
-
*/
|
|
11
|
-
inspector?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* CSS Generation mode
|
|
14
|
-
*
|
|
15
|
-
* - `global` - generate a single CSS sheet for entire App
|
|
16
|
-
* - `dist-chunk` - generate a CSS sheet for each code chunk on build, great for MPA
|
|
17
|
-
* - `per-module` - generate a CSS sheet for each module, can be scoped
|
|
18
|
-
* - `vue-scoped` - inject generated CSS to Vue SFC's `<style scoped>` for isolation
|
|
19
|
-
* - `shadow-dom` - inject generated CSS to `Shadow DOM` css style block for each web component
|
|
20
|
-
*
|
|
21
|
-
* @default 'global'
|
|
22
|
-
*/
|
|
23
|
-
mode?: 'global' | 'per-module' | 'vue-scoped' | 'dist-chunk' | 'shadow-dom';
|
|
24
|
-
/**
|
|
25
|
-
* Transform CSS for `@apply` directive
|
|
26
|
-
*
|
|
27
|
-
* @experimental
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
transformCSS?: boolean | 'pre' | 'post';
|
|
31
|
-
/**
|
|
32
|
-
* Make the generated css processed by postcss (https://vitejs.dev/guide/features.html#postcss)
|
|
33
|
-
*
|
|
34
|
-
* @default true
|
|
35
|
-
*/
|
|
36
|
-
postcss?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Use top level await in HMR code to avoid FOUC on dev time.
|
|
39
|
-
*
|
|
40
|
-
* You usually don't need to disable this, unless you are developing on
|
|
41
|
-
* a browser that does not support top level await.
|
|
42
|
-
*
|
|
43
|
-
* This will only affect on dev time.
|
|
44
|
-
*
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
hmrTopLevelAwait?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Fetch mode in devtools.
|
|
50
|
-
*
|
|
51
|
-
* Some server does not configure its CORS and you may want to set this to 'no-cors'.
|
|
52
|
-
* See https://github.com/unocss/unocss/issues/2822.
|
|
53
|
-
*
|
|
54
|
-
* @default 'cors'
|
|
55
|
-
*/
|
|
56
|
-
fetchMode?: 'cors' | 'navigate' | 'no-cors' | 'same-origin';
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
declare function ChunkModeBuildPlugin({ uno, filter }: UnocssPluginContext): Plugin;
|
|
60
|
-
|
|
61
|
-
declare function GlobalModeDevPlugin({ uno, tokens, tasks, flushTasks, affectedModules, onInvalidate, extract, filter, getConfig }: UnocssPluginContext): Plugin[];
|
|
62
|
-
|
|
63
|
-
declare function GlobalModeBuildPlugin(ctx: UnocssPluginContext<VitePluginConfig>): Plugin[];
|
|
64
|
-
|
|
65
|
-
declare function GlobalModePlugin(ctx: UnocssPluginContext): vite.Plugin<any>[];
|
|
66
|
-
|
|
67
|
-
declare function PerModuleModePlugin({ uno, filter }: UnocssPluginContext): Plugin[];
|
|
68
|
-
|
|
69
|
-
declare function VueScopedPlugin({ uno, ready }: UnocssPluginContext): Plugin;
|
|
70
|
-
|
|
71
|
-
declare function defineConfig<Theme extends object>(config: VitePluginConfig<Theme>): VitePluginConfig<Theme>;
|
|
72
|
-
interface UnocssVitePluginAPI {
|
|
73
|
-
getContext: () => UnocssPluginContext<VitePluginConfig>;
|
|
74
|
-
getMode: () => VitePluginConfig['mode'];
|
|
75
|
-
}
|
|
76
|
-
declare function UnocssPlugin<Theme extends object>(configOrPath?: VitePluginConfig<Theme> | string, defaults?: UserConfigDefaults): Plugin[];
|
|
77
|
-
|
|
78
|
-
export { ChunkModeBuildPlugin, GlobalModeBuildPlugin, GlobalModeDevPlugin, GlobalModePlugin, PerModuleModePlugin, type UnocssVitePluginAPI, type VitePluginConfig, VueScopedPlugin, UnocssPlugin as default, defineConfig };
|