@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 CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.58.9",
3
+ "type": "module",
4
+ "version": "0.59.0",
4
5
  "description": "The Vite plugin for UnoCSS",
5
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
7
  "license": "MIT",
@@ -22,19 +23,25 @@
22
23
  "sideEffects": false,
23
24
  "exports": {
24
25
  ".": {
25
- "types": "./dist/index.d.ts",
26
- "import": "./dist/index.mjs",
27
- "require": "./dist/index.cjs"
26
+ "types": "./dist/index.d.mts",
27
+ "default": "./dist/index.mjs"
28
28
  },
29
29
  "./client": {
30
- "types": "./dist/client.d.ts",
31
- "import": "./dist/client.mjs",
32
- "require": "./dist/client.cjs"
30
+ "types": "./dist/client.d.mts",
31
+ "default": "./dist/client.mjs"
33
32
  }
34
33
  },
35
- "main": "dist/index.cjs",
34
+ "main": "dist/index.mjs",
36
35
  "module": "dist/index.mjs",
37
36
  "types": "dist/index.d.ts",
37
+ "typesVersions": {
38
+ "*": {
39
+ "*": [
40
+ "./dist/*",
41
+ "./*"
42
+ ]
43
+ }
44
+ },
38
45
  "files": [
39
46
  "dist"
40
47
  ],
@@ -46,16 +53,16 @@
46
53
  "@rollup/pluginutils": "^5.1.0",
47
54
  "chokidar": "^3.6.0",
48
55
  "fast-glob": "^3.3.2",
49
- "magic-string": "^0.30.8",
50
- "@unocss/config": "0.58.9",
51
- "@unocss/core": "0.58.9",
52
- "@unocss/inspector": "0.58.9",
53
- "@unocss/scope": "0.58.9",
54
- "@unocss/transformer-directives": "0.58.9"
56
+ "magic-string": "^0.30.9",
57
+ "@unocss/config": "0.59.0",
58
+ "@unocss/inspector": "0.59.0",
59
+ "@unocss/core": "0.59.0",
60
+ "@unocss/scope": "0.59.0",
61
+ "@unocss/transformer-directives": "0.59.0"
55
62
  },
56
63
  "devDependencies": {
57
- "vite": "^5.2.7",
58
- "@unocss/shared-integration": "0.58.9"
64
+ "vite": "^5.2.8",
65
+ "@unocss/shared-integration": "0.59.0"
59
66
  },
60
67
  "scripts": {
61
68
  "build": "unbuild",
package/dist/client.cjs DELETED
@@ -1,54 +0,0 @@
1
- 'use strict';
2
-
3
- function post(data, config) {
4
- return fetch("__POST_PATH__", {
5
- ...config,
6
- method: "POST",
7
- headers: {
8
- "Content-Type": "application/json"
9
- },
10
- body: JSON.stringify(data)
11
- });
12
- }
13
- function include(set, v) {
14
- for (const i of v)
15
- set.add(i);
16
- }
17
- console.log(
18
- "%c[unocss] devtools support enabled %c\nread more at https://windicss.org",
19
- "background:#0ea5e9; color:white; padding: 1px 4px; border-radius: 3px;",
20
- ""
21
- );
22
- const visitedClasses = /* @__PURE__ */ new Set();
23
- const pendingClasses = /* @__PURE__ */ new Set();
24
- let _timer;
25
- function schedule() {
26
- if (_timer != null)
27
- clearTimeout(_timer);
28
- _timer = setTimeout(() => {
29
- if (pendingClasses.size) {
30
- post(
31
- { type: "add-classes", data: Array.from(pendingClasses) },
32
- { mode: "__POST_FETCH_MODE__" }
33
- );
34
- include(visitedClasses, pendingClasses);
35
- pendingClasses.clear();
36
- }
37
- }, 10);
38
- }
39
- const mutationObserver = new MutationObserver((mutations) => {
40
- mutations.forEach((mutation) => {
41
- if (mutation.attributeName === "class" && mutation.target) {
42
- Array.from(mutation.target.classList || []).forEach((i) => {
43
- if (!visitedClasses.has(i))
44
- pendingClasses.add(i);
45
- });
46
- schedule();
47
- }
48
- });
49
- });
50
- mutationObserver.observe(document.documentElement || document.body, {
51
- childList: true,
52
- subtree: true,
53
- attributes: true
54
- });
package/dist/client.d.cts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }