@unocss/svelte-scoped 0.57.7 → 0.58.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.
@@ -240,8 +240,7 @@ async function generateStyles(rulesToGenerate, uno) {
240
240
  function removeOuterQuotes(input) {
241
241
  if (!input)
242
242
  return "";
243
- const match = input.match(/^(['"]).*\1$/);
244
- return match ? input.slice(1, -1) : input;
243
+ return /^(['"]).*\1$/.test(input) ? input.slice(1, -1) : input;
245
244
  }
246
245
 
247
246
  function writeUtilStyles([, selector, body, parent], s, node, childNode) {
@@ -232,8 +232,7 @@ async function generateStyles(rulesToGenerate, uno) {
232
232
  function removeOuterQuotes(input) {
233
233
  if (!input)
234
234
  return "";
235
- const match = input.match(/^(['"]).*\1$/);
236
- return match ? input.slice(1, -1) : input;
235
+ return /^(['"]).*\1$/.test(input) ? input.slice(1, -1) : input;
237
236
  }
238
237
 
239
238
  function writeUtilStyles([, selector, body, parent], s, node, childNode) {
package/dist/vite.cjs CHANGED
@@ -233,7 +233,7 @@ function createCssTransformerPlugins(context, cssTransformers) {
233
233
  name: `unocss:svelte-scoped-transformers:${enforce}`,
234
234
  enforce: enforce === "default" ? void 0 : enforce,
235
235
  async transform(code, id) {
236
- if (!id.match(core.cssIdRE) || id.match(svelteIdRE))
236
+ if (!core.cssIdRE.test(id) || svelteIdRE.test(id))
237
237
  return;
238
238
  context.uno.config.transformers = cssTransformers ?? [];
239
239
  return applyTransformers({
package/dist/vite.mjs CHANGED
@@ -223,7 +223,7 @@ function createCssTransformerPlugins(context, cssTransformers) {
223
223
  name: `unocss:svelte-scoped-transformers:${enforce}`,
224
224
  enforce: enforce === "default" ? void 0 : enforce,
225
225
  async transform(code, id) {
226
- if (!id.match(cssIdRE) || id.match(svelteIdRE))
226
+ if (!cssIdRE.test(id) || svelteIdRE.test(id))
227
227
  return;
228
228
  context.uno.config.transformers = cssTransformers ?? [];
229
229
  return applyTransformers({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/svelte-scoped",
3
3
  "type": "module",
4
- "version": "0.57.7",
4
+ "version": "0.58.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",
@@ -54,12 +54,12 @@
54
54
  "dependencies": {
55
55
  "css-tree": "^2.3.1",
56
56
  "magic-string": "^0.30.5",
57
- "@unocss/config": "0.57.7",
58
- "@unocss/reset": "0.57.7"
57
+ "@unocss/config": "0.58.0",
58
+ "@unocss/reset": "0.58.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "prettier-plugin-svelte": "^2.10.1",
62
- "svelte": "^4.2.4"
62
+ "svelte": "^4.2.8"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "unbuild",