@unocss/svelte-scoped 0.60.2 → 0.60.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.
@@ -1,4 +1,4 @@
1
- export { U as default } from './shared/svelte-scoped.C09cUrHO.mjs';
1
+ export { U as default } from './shared/svelte-scoped.B2pGrYZi.mjs';
2
2
  import 'node:process';
3
3
  import '@unocss/core';
4
4
  import '@unocss/preset-uno';
@@ -5,16 +5,16 @@ import { loadConfig } from '@unocss/config';
5
5
  import MagicString from 'magic-string';
6
6
  import { generate, parse, clone, walk } from 'css-tree';
7
7
 
8
- const NOT_PRECEEDED_BY_DIGIT_OR_OPEN_PARENTHESIS_RE = /(?<![\d(])/;
9
- const SELECTOR_STARTING_WITH_BRACKET_OR_PERIOD_RE = /([[\.][\S\s]+?)/;
10
- const STYLES_RE = /({[\S\s]+?})/;
11
- const EXTRACT_SELECTOR_RE = new RegExp(NOT_PRECEEDED_BY_DIGIT_OR_OPEN_PARENTHESIS_RE.source + SELECTOR_STARTING_WITH_BRACKET_OR_PERIOD_RE.source + STYLES_RE.source, "g");
8
+ const NOT_PRECEDED_BY_DIGIT_OR_OPEN_PARENTHESIS_RE = /(?<![\d(])/;
9
+ const SELECTOR_STARTING_WITH_BRACKET_OR_PERIOD_RE = /([[.][\s\S]+?)/;
10
+ const STYLES_RE = /(\{[\s\S]+?\})/;
11
+ const EXTRACT_SELECTOR_RE = new RegExp(NOT_PRECEDED_BY_DIGIT_OR_OPEN_PARENTHESIS_RE.source + SELECTOR_STARTING_WITH_BRACKET_OR_PERIOD_RE.source + STYLES_RE.source, "g");
12
12
  function wrapSelectorsWithGlobal(css) {
13
13
  return css.replace(EXTRACT_SELECTOR_RE, ":global($1)$2");
14
14
  }
15
15
 
16
- const classesRE$1 = /class=(["'\`])([\S\s]*?)\1/g;
17
- const classDirectivesRE = /class:([\S]+?)="?{/g;
16
+ const classesRE$1 = /class=(["'`])([\s\S]*?)\1/g;
17
+ const classDirectivesRE = /class:(\S+?)="?\{/g;
18
18
  const classDirectivesShorthandRE = /class:([^=>\s/]+)[{>\s/]/g;
19
19
  function findClasses(code) {
20
20
  const matchedClasses = [...code.matchAll(classesRE$1)];
@@ -129,8 +129,8 @@ async function sortClassesIntoCategories(body, options, uno, filename) {
129
129
  return { rulesToGenerate, ignore };
130
130
  }
131
131
 
132
- const expressionsRE = /\S*{[^{}]+?}\S*/g;
133
- const classesRE = /(["'\`])([\S\s]*?)\1/g;
132
+ const expressionsRE = /\S*\{[^{}]+\}\S*/g;
133
+ const classesRE = /(["'`])([\s\S]*?)\1/g;
134
134
  async function processExpressions(body, options, uno, filename) {
135
135
  const rulesToGenerate = {};
136
136
  const updatedExpressions = [];
package/dist/vite.mjs CHANGED
@@ -2,7 +2,7 @@ import process from 'node:process';
2
2
  import { cssIdRE, createGenerator } from '@unocss/core';
3
3
  import { loadConfig } from '@unocss/config';
4
4
  import presetUno from '@unocss/preset-uno';
5
- import { U as UnocssSveltePreprocess } from './shared/svelte-scoped.C09cUrHO.mjs';
5
+ import { U as UnocssSveltePreprocess } from './shared/svelte-scoped.B2pGrYZi.mjs';
6
6
  import { readFileSync, existsSync, statSync } from 'node:fs';
7
7
  import { dirname, resolve } from 'node:path';
8
8
  import { fileURLToPath } from 'node:url';
@@ -192,7 +192,6 @@ async function applyTransformers(ctx, original, id, enforce = "default") {
192
192
  }
193
193
  }
194
194
  if (code !== original) {
195
- ctx.affectedModules.add(id);
196
195
  return {
197
196
  code,
198
197
  map: remapping(maps, (_, ctx2) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/svelte-scoped",
3
3
  "type": "module",
4
- "version": "0.60.2",
4
+ "version": "0.60.3",
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",
@@ -52,12 +52,12 @@
52
52
  "dependencies": {
53
53
  "css-tree": "^2.3.1",
54
54
  "magic-string": "^0.30.10",
55
- "@unocss/reset": "0.60.2",
56
- "@unocss/config": "0.60.2"
55
+ "@unocss/reset": "0.60.3",
56
+ "@unocss/config": "0.60.3"
57
57
  },
58
58
  "devDependencies": {
59
59
  "prettier-plugin-svelte": "^2.10.1",
60
- "svelte": "^4.2.16"
60
+ "svelte": "^4.2.17"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "unbuild",