@unocss/svelte-scoped 0.56.4 → 0.57.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/dist/preprocess.cjs +8 -1
- package/dist/preprocess.mjs +8 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +5 -5
package/dist/preprocess.cjs
CHANGED
|
@@ -401,7 +401,14 @@ function checkForApply(content, _applyVariables) {
|
|
|
401
401
|
applyVariables
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
async function transformStyle({
|
|
404
|
+
async function transformStyle({
|
|
405
|
+
content,
|
|
406
|
+
uno,
|
|
407
|
+
prepend,
|
|
408
|
+
filename,
|
|
409
|
+
applyVariables,
|
|
410
|
+
hasThemeFn
|
|
411
|
+
}) {
|
|
405
412
|
const s = new MagicString__default(content);
|
|
406
413
|
if (applyVariables?.length)
|
|
407
414
|
await transformApply({ s, uno, applyVariables });
|
package/dist/preprocess.mjs
CHANGED
|
@@ -393,7 +393,14 @@ function checkForApply(content, _applyVariables) {
|
|
|
393
393
|
applyVariables
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
async function transformStyle({
|
|
396
|
+
async function transformStyle({
|
|
397
|
+
content,
|
|
398
|
+
uno,
|
|
399
|
+
prepend,
|
|
400
|
+
filename,
|
|
401
|
+
applyVariables,
|
|
402
|
+
hasThemeFn
|
|
403
|
+
}) {
|
|
397
404
|
const s = new MagicString(content);
|
|
398
405
|
if (applyVariables?.length)
|
|
399
406
|
await transformApply({ s, uno, applyVariables });
|
package/dist/vite.cjs
CHANGED
|
@@ -78,7 +78,7 @@ function replaceGlobalStylesPlaceholder(code, stylesTag) {
|
|
|
78
78
|
const captureQuoteMark = "([\"'`])";
|
|
79
79
|
const matchCapturedQuoteMark = "\\1";
|
|
80
80
|
const QUOTES_WITH_PLACEHOLDER_RE = new RegExp(captureQuoteMark + GLOBAL_STYLES_PLACEHOLDER + matchCapturedQuoteMark);
|
|
81
|
-
const escapedStylesTag = stylesTag.replaceAll(
|
|
81
|
+
const escapedStylesTag = stylesTag.replaceAll(/\\(?![`$])/g, "\\\\").replaceAll(/(?<!\\)([`$])/g, "\\$1");
|
|
82
82
|
return code.replace(QUOTES_WITH_PLACEHOLDER_RE, `\`${escapedStylesTag}\``);
|
|
83
83
|
}
|
|
84
84
|
async function generateGlobalCss(uno, injectReset) {
|
package/dist/vite.mjs
CHANGED
|
@@ -68,7 +68,7 @@ function replaceGlobalStylesPlaceholder(code, stylesTag) {
|
|
|
68
68
|
const captureQuoteMark = "([\"'`])";
|
|
69
69
|
const matchCapturedQuoteMark = "\\1";
|
|
70
70
|
const QUOTES_WITH_PLACEHOLDER_RE = new RegExp(captureQuoteMark + GLOBAL_STYLES_PLACEHOLDER + matchCapturedQuoteMark);
|
|
71
|
-
const escapedStylesTag = stylesTag.replaceAll(
|
|
71
|
+
const escapedStylesTag = stylesTag.replaceAll(/\\(?![`$])/g, "\\\\").replaceAll(/(?<!\\)([`$])/g, "\\$1");
|
|
72
72
|
return code.replace(QUOTES_WITH_PLACEHOLDER_RE, `\`${escapedStylesTag}\``);
|
|
73
73
|
}
|
|
74
74
|
async function generateGlobalCss(uno, injectReset) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/svelte-scoped",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.57.0",
|
|
5
5
|
"description": "Use UnoCSS in a modular fashion with styles being stored only in the Svelte component they are used in: Vite plugin for apps, Svelte preprocessor for component libraries",
|
|
6
6
|
"author": "Jacob Bowdoin",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"css-tree": "^2.3.1",
|
|
56
|
-
"magic-string": "^0.30.
|
|
57
|
-
"@unocss/config": "0.
|
|
58
|
-
"@unocss/reset": "0.
|
|
56
|
+
"magic-string": "^0.30.5",
|
|
57
|
+
"@unocss/config": "0.57.0",
|
|
58
|
+
"@unocss/reset": "0.57.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"prettier-plugin-svelte": "^2.10.1",
|
|
62
|
-
"svelte": "^4.2.
|
|
62
|
+
"svelte": "^4.2.2"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "unbuild",
|