@unocss/svelte-scoped 0.54.1 → 0.54.2
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 +1 -1
- package/dist/preprocess.mjs +1 -1
- package/dist/shared/{svelte-scoped.3314ac0d.mjs → svelte-scoped.2a355a56.mjs} +3 -5
- package/dist/shared/{svelte-scoped.eba83a7d.cjs → svelte-scoped.998034cc.cjs} +3 -5
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +4 -4
package/dist/preprocess.cjs
CHANGED
package/dist/preprocess.mjs
CHANGED
|
@@ -215,21 +215,19 @@ function updateTemplateCodeIfNeeded(codeUpdates, source, filename) {
|
|
|
215
215
|
map: s.generateMap({ hires: true, source: filename })
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const REMOVE_COMMENTS_TO_MAKE_GLOBAL_WRAPPING_EASY = true;
|
|
219
219
|
async function generateStyles(rulesToGenerate, uno) {
|
|
220
|
-
const originalShortcuts = uno.config.shortcuts;
|
|
221
220
|
const shortcutsForThisComponent = Object.entries(rulesToGenerate);
|
|
222
|
-
uno.config.shortcuts
|
|
221
|
+
uno.config.shortcuts.push(...shortcutsForThisComponent);
|
|
223
222
|
const selectorsToGenerate = Object.keys(rulesToGenerate);
|
|
224
223
|
const { css } = await uno.generate(
|
|
225
224
|
selectorsToGenerate,
|
|
226
225
|
{
|
|
227
226
|
preflights: false,
|
|
228
227
|
safelist: false,
|
|
229
|
-
minify:
|
|
228
|
+
minify: REMOVE_COMMENTS_TO_MAKE_GLOBAL_WRAPPING_EASY
|
|
230
229
|
}
|
|
231
230
|
);
|
|
232
|
-
uno.config.shortcuts = originalShortcuts;
|
|
233
231
|
const cssPreparedForSvelteCompiler = wrapSelectorsWithGlobal(css);
|
|
234
232
|
return cssPreparedForSvelteCompiler;
|
|
235
233
|
}
|
|
@@ -223,21 +223,19 @@ function updateTemplateCodeIfNeeded(codeUpdates, source, filename) {
|
|
|
223
223
|
map: s.generateMap({ hires: true, source: filename })
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const REMOVE_COMMENTS_TO_MAKE_GLOBAL_WRAPPING_EASY = true;
|
|
227
227
|
async function generateStyles(rulesToGenerate, uno) {
|
|
228
|
-
const originalShortcuts = uno.config.shortcuts;
|
|
229
228
|
const shortcutsForThisComponent = Object.entries(rulesToGenerate);
|
|
230
|
-
uno.config.shortcuts
|
|
229
|
+
uno.config.shortcuts.push(...shortcutsForThisComponent);
|
|
231
230
|
const selectorsToGenerate = Object.keys(rulesToGenerate);
|
|
232
231
|
const { css } = await uno.generate(
|
|
233
232
|
selectorsToGenerate,
|
|
234
233
|
{
|
|
235
234
|
preflights: false,
|
|
236
235
|
safelist: false,
|
|
237
|
-
minify:
|
|
236
|
+
minify: REMOVE_COMMENTS_TO_MAKE_GLOBAL_WRAPPING_EASY
|
|
238
237
|
}
|
|
239
238
|
);
|
|
240
|
-
uno.config.shortcuts = originalShortcuts;
|
|
241
239
|
const cssPreparedForSvelteCompiler = wrapSelectorsWithGlobal(css);
|
|
242
240
|
return cssPreparedForSvelteCompiler;
|
|
243
241
|
}
|
package/dist/vite.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const process = require('node:process');
|
|
|
4
4
|
const core = require('@unocss/core');
|
|
5
5
|
const config = require('@unocss/config');
|
|
6
6
|
const presetUno = require('@unocss/preset-uno');
|
|
7
|
-
const index = require('./shared/svelte-scoped.
|
|
7
|
+
const index = require('./shared/svelte-scoped.998034cc.cjs');
|
|
8
8
|
const node_fs = require('node:fs');
|
|
9
9
|
const node_path = require('node:path');
|
|
10
10
|
const node_url = require('node:url');
|
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.
|
|
5
|
+
import { U as UnocssSveltePreprocess } from './shared/svelte-scoped.2a355a56.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';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/svelte-scoped",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.54.
|
|
4
|
+
"version": "0.54.2",
|
|
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, 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.2",
|
|
57
|
-
"@unocss/config": "0.54.
|
|
58
|
-
"@unocss/reset": "0.54.
|
|
57
|
+
"@unocss/config": "0.54.2",
|
|
58
|
+
"@unocss/reset": "0.54.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"prettier-plugin-svelte": "^2.10.1",
|
|
62
|
-
"svelte": "^4.1.
|
|
62
|
+
"svelte": "^4.1.2"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "unbuild",
|