@unocss/preset-wind4 66.6.7 → 66.7.0-beta.1
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/{container-_7pdPWQl.mjs → container-BwY4Hhe2.mjs} +1 -1
- package/dist/{index-Br5yJM3P.d.mts → index-DRmQ2SKQ.d.mts} +3 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/postprocess.d.mts +1 -1
- package/dist/rules.mjs +203 -195
- package/dist/shortcuts.d.mts +1 -1
- package/dist/shortcuts.mjs +1 -1
- package/dist/{utils-BamiTVVE.mjs → utils-CqAvZsCu.mjs} +42 -27
- package/dist/utils.d.mts +3 -4
- package/dist/utils.mjs +1 -1
- package/dist/{variants-BQhcPCjX.mjs → variants-pAIxzNbQ.mjs} +19 -19
- package/dist/variants.d.mts +1 -1
- package/dist/variants.mjs +1 -1
- package/package.json +4 -4
package/dist/shortcuts.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { W as shortcuts } from "./index-
|
|
1
|
+
import { W as shortcuts } from "./index-DRmQ2SKQ.mjs";
|
|
2
2
|
export { shortcuts };
|
package/dist/shortcuts.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
|
|
2
2
|
import { escapeSelector, symbols, toArray } from "@unocss/core";
|
|
3
|
-
import { colorToString, createValueHandler, getStringComponent, getStringComponents, isInterpolatedMethod, parseCssColor } from "@unocss/rule-utils";
|
|
3
|
+
import { colorToString, createValueHandler, getStringComponent, getStringComponents, isInterpolatedMethod, parseCssColor, transformThemeFn } from "@unocss/rule-utils";
|
|
4
4
|
//#region src/utils/constant.ts
|
|
5
5
|
const PRESET_NAME = "@unocss/preset-wind4";
|
|
6
6
|
const CONTROL_NO_NEGATIVE = "$$mini-no-negative";
|
|
@@ -137,9 +137,10 @@ const unitOnlyMap = {
|
|
|
137
137
|
lvh: 100,
|
|
138
138
|
lvw: 100
|
|
139
139
|
};
|
|
140
|
-
const bracketTypeRe = /^\[(color|image|length|size|position|quoted|string|number|family):/i;
|
|
140
|
+
const bracketTypeRe = /^\[(color|image|length|size|width|position|quoted|string|number|family):/i;
|
|
141
141
|
const splitComma = /,(?![^()]*\))/g;
|
|
142
142
|
const remRE = /(-?[.\d]+)rem/g;
|
|
143
|
+
const cssVarsRE = /(?<!var\()--([\w.-]+)(\([^)]+\)|,[#.\s\w]+)?/g;
|
|
143
144
|
//#endregion
|
|
144
145
|
//#region src/utils/handlers/handlers.ts
|
|
145
146
|
var handlers_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -276,13 +277,23 @@ function fraction(str) {
|
|
|
276
277
|
return `${round(num * 100)}%`;
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Process a theme variable reference and retrieve its value and corresponding CSS variable key.
|
|
282
|
+
*
|
|
283
|
+
* @example theme => Theme object
|
|
284
|
+
* @example themeKey => 'colors
|
|
285
|
+
* @example themeKeyPaths => ['blue', '500']
|
|
286
|
+
* @example varPaths => 'colors.blue.500'
|
|
287
|
+
*
|
|
288
|
+
* @returns An object containing the resolved value from the theme and the corresponding CSS variable key.
|
|
289
|
+
*/
|
|
290
|
+
function processThemeVariable(theme, themeKey, themeKeyPaths, varPaths) {
|
|
291
|
+
const valOrObj = getThemeByKey(theme, themeKey, themeKeyPaths);
|
|
281
292
|
const hasDefault = typeof valOrObj === "object" && "DEFAULT" in valOrObj;
|
|
282
|
-
if (hasDefault)
|
|
293
|
+
if (hasDefault) themeKeyPaths.push("DEFAULT");
|
|
283
294
|
const val = hasDefault ? valOrObj.DEFAULT : valOrObj;
|
|
284
|
-
const varKey = hasDefault &&
|
|
285
|
-
if (val != null) themeTracking(
|
|
295
|
+
const varKey = hasDefault && themeKey !== "spacing" ? `${varPaths}.DEFAULT` : varPaths;
|
|
296
|
+
if (val != null) themeTracking(themeKey, themeKeyPaths.length ? themeKeyPaths : void 0);
|
|
286
297
|
return {
|
|
287
298
|
val,
|
|
288
299
|
varKey
|
|
@@ -301,23 +312,24 @@ function bracketWithType(str, requiredType, theme) {
|
|
|
301
312
|
}
|
|
302
313
|
if (!base) return;
|
|
303
314
|
if (base === "=\"\"") return;
|
|
304
|
-
if (base
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
315
|
+
if (theme) base = transformThemeFn(base, theme);
|
|
316
|
+
const matches = Array.from(base.matchAll(cssVarsRE));
|
|
317
|
+
for (const match of matches) {
|
|
318
|
+
const [full, varPaths, _value] = match;
|
|
319
|
+
if (theme) {
|
|
320
|
+
const [key, ...paths] = varPaths.split(".");
|
|
321
|
+
const { val, varKey } = processThemeVariable(theme, key, paths, varPaths);
|
|
322
|
+
if (val != null) {
|
|
323
|
+
const cssVar = `--${varKey.replaceAll(".", "-")}`;
|
|
324
|
+
if (_value && !_value.startsWith(",")) base = base.replace(full, `calc(var(${cssVar}) * ${_value.slice(1, -1)})`);
|
|
325
|
+
else {
|
|
326
|
+
const fallback = _value?.slice(1);
|
|
327
|
+
base = base.replace(full, `var(${cssVar}${fallback ? `, ${fallback}` : ""})`);
|
|
328
|
+
}
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
320
331
|
}
|
|
332
|
+
base = base.replace(full, `var(${full})`);
|
|
321
333
|
}
|
|
322
334
|
let curly = 0;
|
|
323
335
|
for (const i of base) if (i === "[") curly += 1;
|
|
@@ -346,7 +358,7 @@ function bracketOfColor(str, theme) {
|
|
|
346
358
|
return bracketWithType(str, "color", theme);
|
|
347
359
|
}
|
|
348
360
|
function bracketOfLength(str, theme) {
|
|
349
|
-
return bracketWithType(str, "length", theme) || bracketWithType(str, "size", theme);
|
|
361
|
+
return bracketWithType(str, "length", theme) || bracketWithType(str, "size", theme) || bracketWithType(str, "width", theme);
|
|
350
362
|
}
|
|
351
363
|
function bracketOfPosition(str, theme) {
|
|
352
364
|
return bracketWithType(str, "position", theme);
|
|
@@ -478,7 +490,7 @@ function parseColor(body, theme) {
|
|
|
478
490
|
if (!split) return;
|
|
479
491
|
let opacity;
|
|
480
492
|
let [main, opacityOrModifier, modifier] = split;
|
|
481
|
-
if (isInterpolatedMethod(opacityOrModifier) || isInterpolatedMethod(h.bracket(opacityOrModifier ?? ""))) modifier = opacityOrModifier;
|
|
493
|
+
if (isInterpolatedMethod(opacityOrModifier) || isInterpolatedMethod(h.bracket(opacityOrModifier ?? "", theme))) modifier = opacityOrModifier;
|
|
482
494
|
else opacity = opacityOrModifier;
|
|
483
495
|
const colors = main.replace(/([a-z])(\d)(?![-_a-z])/g, "$1-$2").split(/-/g);
|
|
484
496
|
const [name] = colors;
|
|
@@ -501,11 +513,14 @@ function parseColor(body, theme) {
|
|
|
501
513
|
}
|
|
502
514
|
return {
|
|
503
515
|
opacity,
|
|
504
|
-
modifier: modifier && h.bracket.cssvar(modifier) || modifier,
|
|
516
|
+
modifier: modifier && h.bracket.cssvar(modifier, theme) || modifier,
|
|
505
517
|
name,
|
|
506
518
|
no,
|
|
507
519
|
color: color ?? SpecialColorKey[name],
|
|
508
|
-
alpha: h.bracket.cssvar.percent(opacity ?? ""),
|
|
520
|
+
alpha: h.bracket.cssvar.percent(opacity ?? "", theme),
|
|
521
|
+
/**
|
|
522
|
+
* Keys means the color is from theme object.
|
|
523
|
+
*/
|
|
509
524
|
keys,
|
|
510
525
|
get cssColor() {
|
|
511
526
|
return parseCssColor(this.color);
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { C as Theme } from "./theme-C7zgiweA.mjs";
|
|
2
2
|
import { Arrayable, CSSEntry, CSSObject, CSSValueInput, DynamicMatcher, RuleContext, StaticRule, UtilObject, VariantContext } from "@unocss/core";
|
|
3
|
-
import * as _unocss_rule_utils0 from "@unocss/rule-utils";
|
|
4
3
|
export * from "@unocss/rule-utils";
|
|
5
4
|
|
|
6
5
|
//#region src/utils/constant.d.ts
|
|
@@ -36,8 +35,8 @@ declare function position(str: string): string | undefined;
|
|
|
36
35
|
declare function none(str: string): "none" | undefined;
|
|
37
36
|
//#endregion
|
|
38
37
|
//#region src/utils/handlers/index.d.ts
|
|
39
|
-
declare const handler:
|
|
40
|
-
declare const h:
|
|
38
|
+
declare const handler: import("@unocss/rule-utils").ValueHandler<string, Theme>;
|
|
39
|
+
declare const h: import("@unocss/rule-utils").ValueHandler<string, Theme>;
|
|
41
40
|
//#endregion
|
|
42
41
|
//#region src/utils/mappings.d.ts
|
|
43
42
|
declare const directionMap: Record<string, string[]>;
|
|
@@ -108,7 +107,7 @@ declare function parseColor(body: string, theme: Theme): {
|
|
|
108
107
|
* Keys means the color is from theme object.
|
|
109
108
|
*/
|
|
110
109
|
keys: string[] | undefined;
|
|
111
|
-
readonly cssColor:
|
|
110
|
+
readonly cssColor: import("@unocss/rule-utils").CSSColorValue | undefined;
|
|
112
111
|
} | undefined;
|
|
113
112
|
declare function parseThemeColor(theme: Theme, keys: string[]): {
|
|
114
113
|
color: string;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as xyzMap, C as parseThemeColor, D as h, E as splitShorthand, F as directionMap, H as PRESET_NAME, I as globalKeywords, L as insetMap, M as cornerMap, N as cssMathFnRE, O as handler, P as cssVarFnRE, R as positionMap, S as parseColor, T as resolveVerticalBreakpoints, U as SpecialColorKey, V as CONTROL_NO_NEGATIVE, _ as hyphenate, a as themeTracking, b as makeGlobalStaticRules, c as camelize, d as colorableShadows, f as compressCSS, g as hasParseableColor, h as getThemeByKey, i as propertyTracking, k as handlers_exports, l as colorCSSGenerator, m as directionSize, n as detectThemeValue, o as trackedProperties, p as defineProperty, r as generateThemeVariable, s as trackedTheme, t as createRemToPxProcessor, u as colorResolver, v as isCSSMathFn, w as resolveBreakpoints, x as numberResolver, y as isSize, z as xyzArray } from "./utils-
|
|
1
|
+
import { B as xyzMap, C as parseThemeColor, D as h, E as splitShorthand, F as directionMap, H as PRESET_NAME, I as globalKeywords, L as insetMap, M as cornerMap, N as cssMathFnRE, O as handler, P as cssVarFnRE, R as positionMap, S as parseColor, T as resolveVerticalBreakpoints, U as SpecialColorKey, V as CONTROL_NO_NEGATIVE, _ as hyphenate, a as themeTracking, b as makeGlobalStaticRules, c as camelize, d as colorableShadows, f as compressCSS, g as hasParseableColor, h as getThemeByKey, i as propertyTracking, k as handlers_exports, l as colorCSSGenerator, m as directionSize, n as detectThemeValue, o as trackedProperties, p as defineProperty, r as generateThemeVariable, s as trackedTheme, t as createRemToPxProcessor, u as colorResolver, v as isCSSMathFn, w as resolveBreakpoints, x as numberResolver, y as isSize, z as xyzArray } from "./utils-CqAvZsCu.mjs";
|
|
2
2
|
export * from "@unocss/rule-utils";
|
|
3
3
|
export { CONTROL_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorableShadows, compressCSS, cornerMap, createRemToPxProcessor, cssMathFnRE, cssVarFnRE, defineProperty, detectThemeValue, directionMap, directionSize, generateThemeVariable, getThemeByKey, globalKeywords, h, handler, hasParseableColor, hyphenate, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, numberResolver, parseColor, parseThemeColor, positionMap, propertyTracking, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, themeTracking, trackedProperties, trackedTheme, handlers_exports as valueHandlers, xyzArray, xyzMap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as h, N as cssMathFnRE, P as cssVarFnRE, g as hasParseableColor, w as resolveBreakpoints } from "./utils-
|
|
1
|
+
import { D as h, N as cssMathFnRE, P as cssVarFnRE, g as hasParseableColor, w as resolveBreakpoints } from "./utils-CqAvZsCu.mjs";
|
|
2
2
|
import { toArray } from "@unocss/core";
|
|
3
3
|
import { calcMaxWidthBySize, createPartClasses, createPseudoClassFunctions, createPseudoClassesAndElements, createTaggedPseudoClasses, getBracket, getStringComponent, hasThemeFn, transformThemeFn, variantGetBracket, variantGetParameter, variantMatcher, variantParentMatcher } from "@unocss/rule-utils";
|
|
4
4
|
//#region src/variants/aria.ts
|
|
@@ -8,7 +8,7 @@ const variantAria = {
|
|
|
8
8
|
const variant = variantGetParameter("aria-", matcher, ctx.generator.config.separators);
|
|
9
9
|
if (variant) {
|
|
10
10
|
const [match, rest] = variant;
|
|
11
|
-
const aria = h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
|
|
11
|
+
const aria = h.bracket(match, ctx.theme) ?? ctx.theme.aria?.[match] ?? "";
|
|
12
12
|
if (aria) return {
|
|
13
13
|
matcher: rest,
|
|
14
14
|
selector: (s) => `${s}[aria-${aria}]`
|
|
@@ -25,7 +25,7 @@ function taggedAria(tagName) {
|
|
|
25
25
|
const variant = variantGetParameter(`${tagName}-aria-`, matcher, ctx.generator.config.separators);
|
|
26
26
|
if (variant) {
|
|
27
27
|
const [match, rest, label] = variant;
|
|
28
|
-
const ariaAttribute = h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
|
|
28
|
+
const ariaAttribute = h.bracket(match, ctx.theme) ?? ctx.theme.aria?.[match] ?? "";
|
|
29
29
|
if (ariaAttribute) {
|
|
30
30
|
const tagSelectorMap = {
|
|
31
31
|
group: `&:is(:where(.group${label ? `\\/${label}` : ""})[aria-${ariaAttribute}] *)`,
|
|
@@ -143,7 +143,7 @@ function scopeMatcher(name, combinator) {
|
|
|
143
143
|
}
|
|
144
144
|
if (!body) return;
|
|
145
145
|
}
|
|
146
|
-
let bracketValue = h.bracket(body[0]) ?? "";
|
|
146
|
+
let bracketValue = h.bracket(body[0], ctx.theme) ?? "";
|
|
147
147
|
if (bracketValue === "") bracketValue = "*";
|
|
148
148
|
return {
|
|
149
149
|
matcher: body[1],
|
|
@@ -170,7 +170,7 @@ const variantContainerQuery = {
|
|
|
170
170
|
const variant = variantGetParameter("@", matcher, ctx.generator.config.separators);
|
|
171
171
|
if (variant) {
|
|
172
172
|
const [match, rest, label] = variant;
|
|
173
|
-
const unbracket = h.bracket(match);
|
|
173
|
+
const unbracket = h.bracket(match, ctx.theme);
|
|
174
174
|
let container;
|
|
175
175
|
if (unbracket) container = h.numberWithUnit(unbracket);
|
|
176
176
|
else container = ctx.theme.container?.[match] ?? "";
|
|
@@ -214,7 +214,7 @@ const variantDataAttribute = {
|
|
|
214
214
|
const variant = variantGetParameter("data-", matcher, ctx.generator.config.separators);
|
|
215
215
|
if (variant) {
|
|
216
216
|
const [match, rest] = variant;
|
|
217
|
-
const dataAttribute = h.bracket(match) ?? ctx.theme.data?.[match] ?? "";
|
|
217
|
+
const dataAttribute = h.bracket(match, ctx.theme) ?? ctx.theme.data?.[match] ?? "";
|
|
218
218
|
if (dataAttribute) return {
|
|
219
219
|
matcher: rest,
|
|
220
220
|
selector: (s) => `${s}[data-${dataAttribute}]`
|
|
@@ -230,7 +230,7 @@ function taggedData(tagName) {
|
|
|
230
230
|
const variant = variantGetParameter(`${tagName}-data-`, matcher, ctx.generator.config.separators);
|
|
231
231
|
if (variant) {
|
|
232
232
|
const [match, rest, label] = variant;
|
|
233
|
-
const dataAttribute = h.bracket(match) ?? ctx.theme.data?.[match] ?? "";
|
|
233
|
+
const dataAttribute = h.bracket(match, ctx.theme) ?? ctx.theme.data?.[match] ?? "";
|
|
234
234
|
if (dataAttribute) {
|
|
235
235
|
const tagSelectorMap = {
|
|
236
236
|
group: `&:is(:where(.group${label ? `\\/${label}` : ""})[data-${dataAttribute}] *)`,
|
|
@@ -327,7 +327,7 @@ const variantCustomMedia = {
|
|
|
327
327
|
const variant = variantGetParameter("media-", matcher, ctx.generator.config.separators);
|
|
328
328
|
if (variant) {
|
|
329
329
|
const [match, rest] = variant;
|
|
330
|
-
let media = h.bracket(match) ?? "";
|
|
330
|
+
let media = h.bracket(match, ctx.theme) ?? "";
|
|
331
331
|
if (media === "") media = ctx.theme.media?.[match] ?? "";
|
|
332
332
|
if (media) return {
|
|
333
333
|
matcher: rest,
|
|
@@ -353,7 +353,7 @@ const variantSelector = {
|
|
|
353
353
|
const variant = variantGetBracket("selector-", matcher, ctx.generator.config.separators);
|
|
354
354
|
if (variant) {
|
|
355
355
|
const [match, rest] = variant;
|
|
356
|
-
const selector = h.bracket(match);
|
|
356
|
+
const selector = h.bracket(match, ctx.theme);
|
|
357
357
|
if (selector) return {
|
|
358
358
|
matcher: rest,
|
|
359
359
|
selector: () => selector
|
|
@@ -367,7 +367,7 @@ const variantCssLayer = {
|
|
|
367
367
|
const variant = variantGetParameter("layer-", matcher, ctx.generator.config.separators);
|
|
368
368
|
if (variant) {
|
|
369
369
|
const [match, rest] = variant;
|
|
370
|
-
const layer = h.bracket(match) ?? match;
|
|
370
|
+
const layer = h.bracket(match, ctx.theme) ?? match;
|
|
371
371
|
if (layer) return {
|
|
372
372
|
matcher: rest,
|
|
373
373
|
handle: (input, next) => next({
|
|
@@ -384,7 +384,7 @@ const variantInternalLayer = {
|
|
|
384
384
|
const variant = variantGetParameter("uno-layer-", matcher, ctx.generator.config.separators);
|
|
385
385
|
if (variant) {
|
|
386
386
|
const [match, rest] = variant;
|
|
387
|
-
const layer = h.bracket(match) ?? match;
|
|
387
|
+
const layer = h.bracket(match, ctx.theme) ?? match;
|
|
388
388
|
if (layer) return {
|
|
389
389
|
matcher: rest,
|
|
390
390
|
layer
|
|
@@ -398,7 +398,7 @@ const variantScope = {
|
|
|
398
398
|
const variant = variantGetBracket("scope-", matcher, ctx.generator.config.separators);
|
|
399
399
|
if (variant) {
|
|
400
400
|
const [match, rest] = variant;
|
|
401
|
-
const scope = h.bracket(match);
|
|
401
|
+
const scope = h.bracket(match, ctx.theme);
|
|
402
402
|
if (scope) return {
|
|
403
403
|
matcher: rest,
|
|
404
404
|
selector: (s) => `${scope} $$ ${s}`
|
|
@@ -418,7 +418,7 @@ const variantVariables = {
|
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
if (newMatcher == null) return;
|
|
421
|
-
const variant = h.bracket(match) ?? "";
|
|
421
|
+
const variant = h.bracket(match, ctx.theme) ?? "";
|
|
422
422
|
const useParent = variant.startsWith("@");
|
|
423
423
|
if (!(useParent || variant.includes("&"))) return;
|
|
424
424
|
return {
|
|
@@ -459,7 +459,7 @@ const variantImplicitGroup = {
|
|
|
459
459
|
const variant = variantGetParameter("in-", matcher, ctx.generator.config.separators);
|
|
460
460
|
if (variant) {
|
|
461
461
|
const [match, rest] = variant;
|
|
462
|
-
const group = h.bracket(match) ?? match;
|
|
462
|
+
const group = h.bracket(match, ctx.theme) ?? match;
|
|
463
463
|
if (group) return {
|
|
464
464
|
matcher: rest,
|
|
465
465
|
handle: (input, next) => next({
|
|
@@ -513,7 +513,7 @@ const variantNegative = {
|
|
|
513
513
|
return {
|
|
514
514
|
matcher: matcher.slice(1),
|
|
515
515
|
body: (body) => {
|
|
516
|
-
if (body.
|
|
516
|
+
if (body.some((v) => v[0] === "$$mini-no-negative")) return;
|
|
517
517
|
let changed = false;
|
|
518
518
|
for (const v of body) {
|
|
519
519
|
const [prop, rawValue, meta] = v;
|
|
@@ -538,12 +538,12 @@ const placeholderModifier = (input, { theme }) => {
|
|
|
538
538
|
const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
|
|
539
539
|
if (m) {
|
|
540
540
|
const [, pre = "", p, body] = m;
|
|
541
|
-
if (hasParseableColor(body, theme) || hasOpacityValue(body)) return { matcher: `${pre}placeholder-$ ${p}${body}` };
|
|
541
|
+
if (hasParseableColor(body, theme) || hasOpacityValue(body, theme)) return { matcher: `${pre}placeholder-$ ${p}${body}` };
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
function hasOpacityValue(body) {
|
|
544
|
+
function hasOpacityValue(body, theme) {
|
|
545
545
|
const match = body.match(/^op(?:acity)?-?(.+)$/);
|
|
546
|
-
if (match && match[1] != null) return h.bracket.percent(match[1]) != null;
|
|
546
|
+
if (match && match[1] != null) return h.bracket.percent(match[1], theme) != null;
|
|
547
547
|
return false;
|
|
548
548
|
}
|
|
549
549
|
//#endregion
|
|
@@ -593,7 +593,7 @@ const variantSupports = {
|
|
|
593
593
|
const variant = variantGetParameter("supports-", matcher, ctx.generator.config.separators);
|
|
594
594
|
if (variant) {
|
|
595
595
|
const [match, rest] = variant;
|
|
596
|
-
let supports = h.bracket(match) ?? "";
|
|
596
|
+
let supports = h.bracket(match, ctx.theme) ?? "";
|
|
597
597
|
if (supports === "") supports = ctx.theme.supports?.[match] ?? "";
|
|
598
598
|
if (supports) {
|
|
599
599
|
if (!(supports.startsWith("(") && supports.endsWith(")"))) supports = `(${supports})`;
|
package/dist/variants.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as variantLanguageDirections, B as variantBreakpoints, C as variantForcedColors, D as variantPrint, E as variantOrientations, F as variantColorsScheme, H as variantTaggedAriaAttributes, I as variantContainerQuery, L as variantCombinators, M as variantDataAttribute, N as variantTaggedDataAttributes, O as variantScripting, P as variantColorsMediaOrClass, R as variantSvgCombinators, S as variantCustomMedia, T as variantNoscript, V as variantAria, _ as variantSelector, a as variantSupports, b as variantVariables, c as variantPseudoClassFunctions, d as placeholderModifier, f as variantNegative, g as variantScope, h as variantInternalLayer, j as variants, k as variantImportant, l as variantPseudoClassesAndElements, m as variantImplicitGroup, o as variantStartingStyle, p as variantCssLayer, s as variantPartClasses, u as variantTaggedPseudoClasses, v as variantStickyHover, w as variantMotions, x as variantContrasts, y as variantTheme, z as variantChildren } from "./index-
|
|
1
|
+
import { A as variantLanguageDirections, B as variantBreakpoints, C as variantForcedColors, D as variantPrint, E as variantOrientations, F as variantColorsScheme, H as variantTaggedAriaAttributes, I as variantContainerQuery, L as variantCombinators, M as variantDataAttribute, N as variantTaggedDataAttributes, O as variantScripting, P as variantColorsMediaOrClass, R as variantSvgCombinators, S as variantCustomMedia, T as variantNoscript, V as variantAria, _ as variantSelector, a as variantSupports, b as variantVariables, c as variantPseudoClassFunctions, d as placeholderModifier, f as variantNegative, g as variantScope, h as variantInternalLayer, j as variants, k as variantImportant, l as variantPseudoClassesAndElements, m as variantImplicitGroup, o as variantStartingStyle, p as variantCssLayer, s as variantPartClasses, u as variantTaggedPseudoClasses, v as variantStickyHover, w as variantMotions, x as variantContrasts, y as variantTheme, z as variantChildren } from "./index-DRmQ2SKQ.mjs";
|
|
2
2
|
export { placeholderModifier, variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantColorsScheme, variantCombinators, variantContainerQuery, variantContrasts, variantCssLayer, variantCustomMedia, variantDataAttribute, variantForcedColors, variantImplicitGroup, variantImportant, variantInternalLayer, variantLanguageDirections, variantMotions, variantNegative, variantNoscript, variantOrientations, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantScripting, variantSelector, variantStartingStyle, variantStickyHover, variantSupports, variantSvgCombinators, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
package/dist/variants.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as variantColorsMediaOrClass, C as variantOrientations, D as variantLanguageDirections, E as variantImportant, F as variantChildren, I as variantBreakpoints, L as variantAria, M as variantContainerQuery, N as variantCombinators, O as variantDataAttribute, P as variantSvgCombinators, R as variantTaggedAriaAttributes, S as variantNoscript, T as variantScripting, _ as variantVariables, a as variantPseudoClassFunctions, b as variantForcedColors, c as placeholderModifier, d as variantImplicitGroup, f as variantInternalLayer, g as variantTheme, h as variantStickyHover, i as variantPartClasses, j as variantColorsScheme, k as variantTaggedDataAttributes, l as variantNegative, m as variantSelector, n as variantSupports, o as variantPseudoClassesAndElements, p as variantScope, r as variantStartingStyle, s as variantTaggedPseudoClasses, t as variants, u as variantCssLayer, v as variantContrasts, w as variantPrint, x as variantMotions, y as variantCustomMedia } from "./variants-
|
|
1
|
+
import { A as variantColorsMediaOrClass, C as variantOrientations, D as variantLanguageDirections, E as variantImportant, F as variantChildren, I as variantBreakpoints, L as variantAria, M as variantContainerQuery, N as variantCombinators, O as variantDataAttribute, P as variantSvgCombinators, R as variantTaggedAriaAttributes, S as variantNoscript, T as variantScripting, _ as variantVariables, a as variantPseudoClassFunctions, b as variantForcedColors, c as placeholderModifier, d as variantImplicitGroup, f as variantInternalLayer, g as variantTheme, h as variantStickyHover, i as variantPartClasses, j as variantColorsScheme, k as variantTaggedDataAttributes, l as variantNegative, m as variantSelector, n as variantSupports, o as variantPseudoClassesAndElements, p as variantScope, r as variantStartingStyle, s as variantTaggedPseudoClasses, t as variants, u as variantCssLayer, v as variantContrasts, w as variantPrint, x as variantMotions, y as variantCustomMedia } from "./variants-pAIxzNbQ.mjs";
|
|
2
2
|
export { placeholderModifier, variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantColorsScheme, variantCombinators, variantContainerQuery, variantContrasts, variantCssLayer, variantCustomMedia, variantDataAttribute, variantForcedColors, variantImplicitGroup, variantImportant, variantInternalLayer, variantLanguageDirections, variantMotions, variantNegative, variantNoscript, variantOrientations, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantScripting, variantSelector, variantStartingStyle, variantStickyHover, variantSupports, variantSvgCombinators, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind4",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.
|
|
4
|
+
"version": "66.7.0-beta.1",
|
|
5
5
|
"description": "Tailwind 4 compact preset for UnoCSS",
|
|
6
6
|
"authors": [
|
|
7
7
|
{
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"dist"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@unocss/core": "66.
|
|
58
|
-
"@unocss/
|
|
59
|
-
"@unocss/
|
|
57
|
+
"@unocss/core": "66.7.0-beta.1",
|
|
58
|
+
"@unocss/rule-utils": "66.7.0-beta.1",
|
|
59
|
+
"@unocss/extractor-arbitrary-variants": "66.7.0-beta.1"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsdown --config-loader unrun",
|