@unocss/vite 0.54.1 → 0.54.3

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/index.cjs CHANGED
@@ -1192,7 +1192,14 @@ function UnocssPlugin(configOrPath, defaults = {}) {
1192
1192
  const plugins = [
1193
1193
  ConfigHMRPlugin(ctx),
1194
1194
  ...createTransformerPlugins(ctx),
1195
- ...createDevtoolsPlugin(ctx)
1195
+ ...createDevtoolsPlugin(ctx),
1196
+ {
1197
+ name: "unocss:api",
1198
+ api: {
1199
+ getContext: () => ctx,
1200
+ getMode: () => mode
1201
+ }
1202
+ }
1196
1203
  ];
1197
1204
  if (inlineConfig.inspector !== false)
1198
1205
  plugins.push(UnocssInspector__default(ctx));
package/dist/index.d.ts CHANGED
@@ -60,6 +60,10 @@ declare function PerModuleModePlugin({ uno, filter }: UnocssPluginContext): Plug
60
60
  declare function VueScopedPlugin({ uno, ready }: UnocssPluginContext): Plugin;
61
61
 
62
62
  declare function defineConfig<Theme extends object>(config: VitePluginConfig<Theme>): VitePluginConfig<Theme>;
63
+ interface UnocssVitePluginAPI {
64
+ getContext(): UnocssPluginContext<VitePluginConfig>;
65
+ getMode(): VitePluginConfig['mode'];
66
+ }
63
67
  declare function UnocssPlugin<Theme extends object>(configOrPath?: VitePluginConfig<Theme> | string, defaults?: UserConfigDefaults): Plugin[];
64
68
 
65
- export { ChunkModeBuildPlugin, GlobalModeBuildPlugin, GlobalModeDevPlugin, GlobalModePlugin, PerModuleModePlugin, VitePluginConfig, VueScopedPlugin, UnocssPlugin as default, defineConfig };
69
+ export { ChunkModeBuildPlugin, GlobalModeBuildPlugin, GlobalModeDevPlugin, GlobalModePlugin, PerModuleModePlugin, UnocssVitePluginAPI, VitePluginConfig, VueScopedPlugin, UnocssPlugin as default, defineConfig };
package/dist/index.mjs CHANGED
@@ -1178,7 +1178,14 @@ function UnocssPlugin(configOrPath, defaults = {}) {
1178
1178
  const plugins = [
1179
1179
  ConfigHMRPlugin(ctx),
1180
1180
  ...createTransformerPlugins(ctx),
1181
- ...createDevtoolsPlugin(ctx)
1181
+ ...createDevtoolsPlugin(ctx),
1182
+ {
1183
+ name: "unocss:api",
1184
+ api: {
1185
+ getContext: () => ctx,
1186
+ getMode: () => mode
1187
+ }
1188
+ }
1182
1189
  ];
1183
1190
  if (inlineConfig.inspector !== false)
1184
1191
  plugins.push(UnocssInspector(ctx));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.54.1",
3
+ "version": "0.54.3",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -23,13 +23,13 @@
23
23
  "exports": {
24
24
  ".": {
25
25
  "types": "./dist/index.d.ts",
26
- "require": "./dist/index.cjs",
27
- "import": "./dist/index.mjs"
26
+ "import": "./dist/index.mjs",
27
+ "require": "./dist/index.cjs"
28
28
  },
29
29
  "./client": {
30
30
  "types": "./dist/client.d.ts",
31
- "require": "./dist/client.cjs",
32
- "import": "./dist/client.mjs"
31
+ "import": "./dist/client.mjs",
32
+ "require": "./dist/client.cjs"
33
33
  }
34
34
  },
35
35
  "main": "dist/index.cjs",
@@ -47,15 +47,15 @@
47
47
  "chokidar": "^3.5.3",
48
48
  "fast-glob": "^3.3.1",
49
49
  "magic-string": "^0.30.2",
50
- "@unocss/config": "0.54.1",
51
- "@unocss/core": "0.54.1",
52
- "@unocss/inspector": "0.54.1",
53
- "@unocss/scope": "0.54.1",
54
- "@unocss/transformer-directives": "0.54.1"
50
+ "@unocss/config": "0.54.3",
51
+ "@unocss/core": "0.54.3",
52
+ "@unocss/inspector": "0.54.3",
53
+ "@unocss/scope": "0.54.3",
54
+ "@unocss/transformer-directives": "0.54.3"
55
55
  },
56
56
  "devDependencies": {
57
- "vite": "^4.4.7",
58
- "@unocss/shared-integration": "0.54.1"
57
+ "vite": "^4.4.9",
58
+ "@unocss/shared-integration": "0.54.3"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "unbuild",