@unocss/transformer-directives 65.4.0 → 65.4.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.
- package/README.md +3 -2
- package/dist/index.mjs +5 -5
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ To use rules with `:`, you will need to quote the value
|
|
|
58
58
|
|
|
59
59
|
```css
|
|
60
60
|
.custom-div {
|
|
61
|
-
--at-apply:
|
|
61
|
+
--at-apply: 'hover:text-red';
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -92,7 +92,7 @@ The `@screen` directive allows you to create media queries that reference your b
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
/* ... */
|
|
95
|
-
|
|
95
|
+
...;
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
Will be transformed to:
|
|
@@ -116,6 +116,7 @@ Will be transformed to:
|
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
#### Breakpoint Variant Support
|
|
119
|
+
|
|
119
120
|
`@screen` also supports `lt`、`at` variants
|
|
120
121
|
|
|
121
122
|
##### `@screen lt`
|
package/dist/index.mjs
CHANGED
|
@@ -113,7 +113,7 @@ async function transformIconString(uno, icon, color) {
|
|
|
113
113
|
autoInstall,
|
|
114
114
|
cwd: collectionsNodeResolvePath,
|
|
115
115
|
// avoid warn from @iconify/loader: we'll warn below if not found
|
|
116
|
-
warn:
|
|
116
|
+
warn: undefined,
|
|
117
117
|
customizations: {
|
|
118
118
|
...customizations,
|
|
119
119
|
trimCustomSvg: true,
|
|
@@ -128,7 +128,7 @@ async function transformIconString(uno, icon, color) {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
const loader = await api.createNodeLoader?.() || (async () =>
|
|
131
|
+
const loader = await api.createNodeLoader?.() || (async () => undefined);
|
|
132
132
|
for (const p of toArray(prefix)) {
|
|
133
133
|
if (icon.startsWith(p)) {
|
|
134
134
|
icon = icon.slice(p.length);
|
|
@@ -193,7 +193,7 @@ function handleScreen({ code, uno }, node) {
|
|
|
193
193
|
breakpoints = uno.userConfig.theme.breakpoints;
|
|
194
194
|
if (!breakpoints)
|
|
195
195
|
breakpoints = uno.config.theme.breakpoints;
|
|
196
|
-
return breakpoints ? Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) :
|
|
196
|
+
return breakpoints ? Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) : undefined;
|
|
197
197
|
};
|
|
198
198
|
const variantEntries = (resolveBreakpoints() ?? []).map(({ point, size }, idx) => [point, size, idx]);
|
|
199
199
|
const generateMediaQuery = (breakpointName2, prefix2) => {
|
|
@@ -232,8 +232,8 @@ function calcMaxWidthBySize(size) {
|
|
|
232
232
|
async function transformDirectives(code, uno, options, filename, originalCode, offset) {
|
|
233
233
|
let { applyVariable } = options;
|
|
234
234
|
const varStyle = options.varStyle;
|
|
235
|
-
if (applyVariable ===
|
|
236
|
-
if (varStyle !==
|
|
235
|
+
if (applyVariable === undefined) {
|
|
236
|
+
if (varStyle !== undefined)
|
|
237
237
|
applyVariable = varStyle ? [`${varStyle}apply`] : [];
|
|
238
238
|
applyVariable = ["--at-apply", "--uno-apply", "--uno"];
|
|
239
239
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-directives",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "65.4.
|
|
4
|
+
"version": "65.4.3",
|
|
5
5
|
"description": "UnoCSS transformer for `@apply` directive",
|
|
6
6
|
"author": "hannoeru <me@hanlee.co>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://unocss.dev",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/unocss/unocss",
|
|
12
|
-
"directory": "packages/transformer-directives"
|
|
12
|
+
"directory": "packages-presets/transformer-directives"
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/unocss/unocss/issues"
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"css-tree": "^3.1.0",
|
|
36
|
-
"@unocss/core": "65.4.
|
|
37
|
-
"@unocss/rule-utils": "65.4.
|
|
36
|
+
"@unocss/core": "65.4.3",
|
|
37
|
+
"@unocss/rule-utils": "65.4.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"magic-string": "^0.30.17"
|