@unocss/vite
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -274,3 +274,3 @@ var __create = Object.create; | ||
var import_core = __toModule(require("@unocss/core")); | ||
var colorResolver = (attribute, varName) => ([, body], theme2) => { | ||
var colorResolver = (attribute, varName) => ([, body], { theme: theme2 }) => { | ||
var _a; | ||
@@ -381,3 +381,3 @@ const [main, opacity2] = body.split(/(?:\/|:)/); | ||
} | ||
function handlerRounded([, a, b], theme2) { | ||
function handlerRounded([, a, b], { theme: theme2 }) { | ||
var _a; | ||
@@ -436,3 +436,3 @@ const [d, s = "DEFAULT"] = cornerMap[a] ? [a, b] : ["", a]; | ||
var fontsFamilies = [ | ||
[/^font-(\w+)$/, ([, d], theme2) => { | ||
[/^font-(\w+)$/, ([, d], { theme: theme2 }) => { | ||
var _a; | ||
@@ -459,3 +459,3 @@ const font = (_a = theme2.fontFamily) == null ? void 0 : _a[d]; | ||
var fontSizes = [ | ||
[/^text-([^-]+)$/, ([, s = "base"], theme2) => { | ||
[/^text-([^-]+)$/, ([, s = "base"], { theme: theme2 }) => { | ||
var _a; | ||
@@ -480,3 +480,3 @@ const result = (0, import_core2.toArray)(((_a = theme2.fontSize) == null ? void 0 : _a[s]) || handler.bracket.rem(s)); | ||
var leadings = [ | ||
[/^(?:leading|lh)-([^-]+)$/, ([, s], theme2) => { | ||
[/^(?:leading|lh)-([^-]+)$/, ([, s], { theme: theme2 }) => { | ||
var _a; | ||
@@ -489,3 +489,3 @@ const v = ((_a = theme2.lineHeight) == null ? void 0 : _a[s]) || handler.bracket.rem(s); | ||
var trackings = [ | ||
[/^tracking-([^-]+)$/, ([, s], theme2) => { | ||
[/^tracking-([^-]+)$/, ([, s], { theme: theme2 }) => { | ||
var _a; | ||
@@ -562,4 +562,4 @@ const v = ((_a = theme2.letterSpacing) == null ? void 0 : _a[s]) || handler.bracket.rem(s); | ||
[/^(?:grid-)?col-end-(.+)$/, ([, v]) => ({ "grid-column-end": `${v}` })], | ||
[/^(?:grid-)?auto-rows-(.+)$/, ([, v], theme2) => ({ "grid-auto-rows": `${autoDirection(v, theme2)}` })], | ||
[/^(?:grid-)?auto-cols-(.+)$/, ([, v], theme2) => ({ "grid-auto-columns": `${autoDirection(v, theme2)}` })], | ||
[/^(?:grid-)?auto-rows-(.+)$/, ([, v], { theme: theme2 }) => ({ "grid-auto-rows": `${autoDirection(v, theme2)}` })], | ||
[/^(?:grid-)?auto-cols-(.+)$/, ([, v], { theme: theme2 }) => ({ "grid-auto-columns": `${autoDirection(v, theme2)}` })], | ||
[/^(?:grid-)?row-((?!(start)|(end)).+)$/, ([, v]) => { | ||
@@ -724,3 +724,3 @@ const shortArr = v.split("-"); | ||
var shadows = [ | ||
[/^shadow-?(.*)$/, ([, d], theme2) => { | ||
[/^shadow-?(.*)$/, ([, d], { theme: theme2 }) => { | ||
var _a; | ||
@@ -1668,2 +1668,3 @@ const value = (_a = theme2 == null ? void 0 : theme2.textShadow) == null ? void 0 : _a[d || "DEFAULT"]; | ||
var READY_CALLBACK = "/__unocss_ready"; | ||
var JS_RE = /\.[mc]?[tj]sx?$/; | ||
function GlobalModeDevPlugin({ config, uno, tokens, onInvalidate, scan }) { | ||
@@ -1722,3 +1723,3 @@ let server; | ||
scan(code, id); | ||
if (!isSSR && (mainEntry == null || mainEntry === id) && !id.includes("node_modules/vite")) { | ||
if (!isSSR && (mainEntry == null || mainEntry === id) && !id.includes("node_modules/vite") && JS_RE.test(id)) { | ||
mainEntry = id; | ||
@@ -1855,2 +1856,3 @@ return { | ||
var PLACEHOLDER_RE = /#--unocss--\s*{\s*--unocss:\s*true;?\s*}/; | ||
var JS_RE2 = /\.[mc]?[tj]sx?$/; | ||
function GlobalModeBuildPlugin({ uno, config, scan, tokens }) { | ||
@@ -1871,3 +1873,3 @@ const filter = (0, import_pluginutils5.createFilter)(config.include || defaultInclude, config.exclude || defaultExclude); | ||
tasks.push(scan(code, id)); | ||
if (mainEntry === id || mainEntry == null && !id.includes("node_modules/vite") && !id.endsWith(".html") && id.startsWith("/")) { | ||
if (mainEntry === id || mainEntry == null && !id.includes("node_modules/vite") && JS_RE2.test(id) && id.startsWith("/")) { | ||
mainEntry = id; | ||
@@ -1874,0 +1876,0 @@ return { |
{ | ||
"name": "@unocss/vite", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "", | ||
@@ -32,5 +32,5 @@ "keywords": [], | ||
"@rollup/pluginutils": "^4.1.1", | ||
"@unocss/config": "0.2.2", | ||
"@unocss/core": "0.2.2", | ||
"@unocss/scope": "0.2.2", | ||
"@unocss/config": "0.3.0", | ||
"@unocss/core": "0.3.0", | ||
"@unocss/scope": "0.3.0", | ||
"nanoevents": "^6.0.2" | ||
@@ -37,0 +37,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114156
3878
+ Added@unocss/config@0.3.0(transitive)
+ Added@unocss/core@0.3.0(transitive)
+ Added@unocss/scope@0.3.0(transitive)
- Removed@unocss/config@0.2.2(transitive)
- Removed@unocss/core@0.2.2(transitive)
- Removed@unocss/scope@0.2.2(transitive)
Updated@unocss/config@0.3.0
Updated@unocss/core@0.3.0
Updated@unocss/scope@0.3.0