@unocss/preset-wind4 66.1.0-beta.8 → 66.1.0-beta.9

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/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Postprocessor, Preflight, Variant, PresetOptions, Arrayable, CSSEntry, BaseContext } from '@unocss/core';
3
+ export { shortcuts } from './shortcuts.mjs';
3
4
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
4
5
  export { r as rules } from './shared/preset-wind4.D71xGC6i.mjs';
5
- export { shortcuts } from './shortcuts.mjs';
6
6
  export { t as theme } from './shared/preset-wind4.BOe5kxIw.mjs';
7
7
 
8
8
  declare function postprocessors(options: PresetWind4Options): Postprocessor[];
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Postprocessor, Preflight, Variant, PresetOptions, Arrayable, CSSEntry, BaseContext } from '@unocss/core';
3
+ export { shortcuts } from './shortcuts.js';
3
4
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
4
5
  export { r as rules } from './shared/preset-wind4.Ca5oWgxX.js';
5
- export { shortcuts } from './shortcuts.js';
6
6
  export { t as theme } from './shared/preset-wind4.BOe5kxIw.js';
7
7
 
8
8
  declare function postprocessors(options: PresetWind4Options): Postprocessor[];
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { LAYER_PREFLIGHTS, toArray, definePreset } from '@unocss/core';
2
2
  import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
3
- import { b as themeTracking, K as compressCSS, P as PRESET_NAME, z as getThemeByKey, J as hyphenate, p as passThemeKey, j as globalKeywords, t as trackedTheme } from './shared/preset-wind4.B0q3EwQ3.mjs';
3
+ import { b as themeTracking, K as compressCSS, P as PRESET_NAME, z as getThemeByKey, J as hyphenate, p as passThemeKey, j as globalKeywords, t as trackedTheme } from './shared/preset-wind4.CbSMpnSp.mjs';
4
4
  import { alphaPlaceholdersRE } from '@unocss/rule-utils';
5
5
  import { p as postprocessors } from './shared/preset-wind4.Pg33yPuf.mjs';
6
- import { l as variants } from './shared/preset-wind4.-dZRTBz8.mjs';
6
+ import { l as variants } from './shared/preset-wind4.BgYY8vln.mjs';
7
7
  import { theme as theme$1 } from './theme.mjs';
8
- import { s as shortcuts } from './shared/preset-wind4.DolXDUDJ.mjs';
9
- import { r as rules } from './shared/preset-wind4.BfiLVsoA.mjs';
8
+ import { s as shortcuts } from './shared/preset-wind4.BLH55jNO.mjs';
9
+ import { r as rules } from './shared/preset-wind4.BNxtnClY.mjs';
10
10
  import './colors.mjs';
11
- import './shared/preset-wind4.C100zP13.mjs';
11
+ import './shared/preset-wind4.Ch1Z_NI2.mjs';
12
12
 
13
13
  const resetCSS = `
14
14
  /*
@@ -473,11 +473,11 @@ function theme(options) {
473
473
  }
474
474
  }
475
475
  }
476
- const resovledDeps = deps2.map(([key, value]) => key && value ? `${key}: ${value};` : void 0).filter(Boolean);
477
- if (resovledDeps.length === 0) {
476
+ const resolvedDeps = deps2.map(([key, value]) => key && value ? `${key}: ${value};` : void 0).filter(Boolean);
477
+ if (resolvedDeps.length === 0) {
478
478
  return void 0;
479
479
  }
480
- const depCSS = resovledDeps.join("\n");
480
+ const depCSS = resolvedDeps.join("\n");
481
481
  return compressCSS(`
482
482
  :root, :host {
483
483
  ${depCSS}
@@ -537,7 +537,8 @@ const presetWind4 = definePreset((options = {}) => {
537
537
  shortcuts,
538
538
  theme: theme$1,
539
539
  layers: {
540
- theme: -150
540
+ "cssvar-property": -200,
541
+ "theme": -150
541
542
  },
542
543
  preflights: preflights(options),
543
544
  variants: variants(options),
@@ -1,9 +1,9 @@
1
1
  import { PresetWind4Options } from './index.mjs';
2
2
  export { postprocessors } from './index.mjs';
3
3
  import { Postprocessor } from '@unocss/core';
4
+ import './shortcuts.mjs';
4
5
  import './shared/preset-wind4.BXbWGSRz.mjs';
5
6
  import './shared/preset-wind4.D71xGC6i.mjs';
6
- import './shortcuts.mjs';
7
7
  import './shared/preset-wind4.BOe5kxIw.mjs';
8
8
 
9
9
  declare function important({ important: option }: PresetWind4Options): Postprocessor[];
@@ -1,9 +1,9 @@
1
1
  import { PresetWind4Options } from './index.js';
2
2
  export { postprocessors } from './index.js';
3
3
  import { Postprocessor } from '@unocss/core';
4
+ import './shortcuts.js';
4
5
  import './shared/preset-wind4.BXbWGSRz.js';
5
6
  import './shared/preset-wind4.Ca5oWgxX.js';
6
- import './shortcuts.js';
7
7
  import './shared/preset-wind4.BOe5kxIw.js';
8
8
 
9
9
  declare function important({ important: option }: PresetWind4Options): Postprocessor[];
package/dist/rules.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Rule, CSSEntries, Shortcut, StaticRule } from '@unocss/core';
1
+ import { Rule, CSSEntries, Shortcut, StaticRule, CSSValueInput } from '@unocss/core';
2
2
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
3
3
  export { r as rules } from './shared/preset-wind4.D71xGC6i.mjs';
4
4
 
@@ -81,18 +81,18 @@ declare const rings: Rule<Theme>[];
81
81
  declare const scrolls: Rule<Theme>[];
82
82
 
83
83
  declare const shadowProperties: {
84
- shadow: string;
85
- shadowColor: string;
86
- insetShadow: string;
87
- insetShadowColor: string;
88
- ringColor: string;
89
- ringShadow: string;
90
- insetRingColor: string;
91
- insetRingShadow: string;
92
- ringInset: string;
93
- ringOffsetWidth: string;
94
- ringOffsetColor: string;
95
- ringOffsetShadow: string;
84
+ shadow: CSSValueInput;
85
+ shadowColor: CSSValueInput;
86
+ insetShadow: CSSValueInput;
87
+ insetShadowColor: CSSValueInput;
88
+ ringColor: CSSValueInput;
89
+ ringShadow: CSSValueInput;
90
+ insetRingColor: CSSValueInput;
91
+ insetRingShadow: CSSValueInput;
92
+ ringInset: CSSValueInput;
93
+ ringOffsetWidth: CSSValueInput;
94
+ ringOffsetColor: CSSValueInput;
95
+ ringOffsetShadow: CSSValueInput;
96
96
  };
97
97
  declare const boxShadows: Rule<Theme>[];
98
98
 
package/dist/rules.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Rule, CSSEntries, Shortcut, StaticRule } from '@unocss/core';
1
+ import { Rule, CSSEntries, Shortcut, StaticRule, CSSValueInput } from '@unocss/core';
2
2
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
3
3
  export { r as rules } from './shared/preset-wind4.Ca5oWgxX.js';
4
4
 
@@ -81,18 +81,18 @@ declare const rings: Rule<Theme>[];
81
81
  declare const scrolls: Rule<Theme>[];
82
82
 
83
83
  declare const shadowProperties: {
84
- shadow: string;
85
- shadowColor: string;
86
- insetShadow: string;
87
- insetShadowColor: string;
88
- ringColor: string;
89
- ringShadow: string;
90
- insetRingColor: string;
91
- insetRingShadow: string;
92
- ringInset: string;
93
- ringOffsetWidth: string;
94
- ringOffsetColor: string;
95
- ringOffsetShadow: string;
84
+ shadow: CSSValueInput;
85
+ shadowColor: CSSValueInput;
86
+ insetShadow: CSSValueInput;
87
+ insetShadowColor: CSSValueInput;
88
+ ringColor: CSSValueInput;
89
+ ringShadow: CSSValueInput;
90
+ insetRingColor: CSSValueInput;
91
+ insetRingShadow: CSSValueInput;
92
+ ringInset: CSSValueInput;
93
+ ringOffsetWidth: CSSValueInput;
94
+ ringOffsetColor: CSSValueInput;
95
+ ringOffsetShadow: CSSValueInput;
96
96
  };
97
97
  declare const boxShadows: Rule<Theme>[];
98
98
 
package/dist/rules.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { d as accents, am as accessibility, H as alignments, a as animations, c as appearance, _ as appearances, U as aspectRatio, aj as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, S as boxShadows, N as boxSizing, a7 as breaks, e as carets, n as colorScheme, p as columns, a0 as contains, a5 as contentVisibility, a6 as contents, aB as cssProperty, aA as cssVariables, $ as cursors, Z as displays, u as divides, al as dynamicViewportHeight, x as filters, y as flex, J as flexGridJustifiesAlignments, L as floats, ac as fontSmoothings, ab as fontStyles, ay as fontVariantNumeric, at as fonts, z as gaps, A as grids, j as handlerBorderStyle, ad as hyphens, i as imageRenderings, K as insets, ah as isolations, F as justifies, C as lineClamps, l as listStyle, W as margins, ak as mixBlendModes, Y as notLastChildSelector, ai as objectPositions, k as opacity, G as orders, o as outline, B as overflows, f as overscrolls, V as paddings, D as placeholders, I as placements, a1 as pointerEvents, E as positions, O as questionMark, a2 as resizes, P as rings, r as rules, ag as screenReadersAccess, s as scrollBehaviors, Q as scrolls, R as shadowProperties, T as sizes, X as spaces, az as splitShorthand, an as svgUtilities, au as tabSizes, ao as tables, t as textAligns, q as textDecorations, av as textIndents, a9 as textOverflows, ax as textShadows, aw as textStrokes, aa as textTransforms, a8 as textWraps, ap as touchActions, aq as transformBase, ar as transforms, as as transitions, a3 as userSelects, v as verticalAligns, aC as viewTransition, a4 as whitespaces, w as willChange, ae as writingModes, af as writingOrientations, M as zIndexes } from './shared/preset-wind4.BfiLVsoA.mjs';
2
- export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.C100zP13.mjs';
3
- import './shared/preset-wind4.B0q3EwQ3.mjs';
1
+ export { d as accents, am as accessibility, H as alignments, a as animations, c as appearance, _ as appearances, U as aspectRatio, aj as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, S as boxShadows, N as boxSizing, a7 as breaks, e as carets, n as colorScheme, p as columns, a0 as contains, a5 as contentVisibility, a6 as contents, aB as cssProperty, aA as cssVariables, $ as cursors, Z as displays, u as divides, al as dynamicViewportHeight, x as filters, y as flex, J as flexGridJustifiesAlignments, L as floats, ac as fontSmoothings, ab as fontStyles, ay as fontVariantNumeric, at as fonts, z as gaps, A as grids, j as handlerBorderStyle, ad as hyphens, i as imageRenderings, K as insets, ah as isolations, F as justifies, C as lineClamps, l as listStyle, W as margins, ak as mixBlendModes, Y as notLastChildSelector, ai as objectPositions, k as opacity, G as orders, o as outline, B as overflows, f as overscrolls, V as paddings, D as placeholders, I as placements, a1 as pointerEvents, E as positions, O as questionMark, a2 as resizes, P as rings, r as rules, ag as screenReadersAccess, s as scrollBehaviors, Q as scrolls, R as shadowProperties, T as sizes, X as spaces, az as splitShorthand, an as svgUtilities, au as tabSizes, ao as tables, t as textAligns, q as textDecorations, av as textIndents, a9 as textOverflows, ax as textShadows, aw as textStrokes, aa as textTransforms, a8 as textWraps, ap as touchActions, aq as transformBase, ar as transforms, as as transitions, a3 as userSelects, v as verticalAligns, aC as viewTransition, a4 as whitespaces, w as willChange, ae as writingModes, af as writingOrientations, M as zIndexes } from './shared/preset-wind4.BNxtnClY.mjs';
2
+ export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.Ch1Z_NI2.mjs';
3
+ import './shared/preset-wind4.CbSMpnSp.mjs';
4
4
  import '@unocss/core';
5
5
  import '@unocss/rule-utils';
@@ -1,4 +1,4 @@
1
- import { b as containerShortcuts } from './preset-wind4.C100zP13.mjs';
1
+ import { b as containerShortcuts } from './preset-wind4.Ch1Z_NI2.mjs';
2
2
 
3
3
  const shortcuts = [
4
4
  ...containerShortcuts
@@ -1,6 +1,6 @@
1
- import { j as globalKeywords, c as h, E as makeGlobalStaticRules, g as positionMap, w as parseColor, S as SpecialColorKey, L as defineProperty, b as themeTracking, M as detectThemeValue, u as colorResolver, F as isCSSMathFn, d as directionMap, B as hasParseableColor, e as cornerMap, p as passThemeKey, q as colorCSSGenerator, G as isSize, m as directionSize, n as numberResolver, o as colorableShadows, i as insetMap, J as hyphenate, r as resolveBreakpoints, H as transformXYZ, x as xyzMap, N as bracketTypeRe } from './preset-wind4.B0q3EwQ3.mjs';
2
- import { notNull, uniq } from '@unocss/core';
3
- import { a as container, c as containerParent } from './preset-wind4.C100zP13.mjs';
1
+ import { j as globalKeywords, c as h, E as makeGlobalStaticRules, g as positionMap, w as parseColor, S as SpecialColorKey, L as defineProperty, b as themeTracking, M as detectThemeValue, u as colorResolver, F as isCSSMathFn, d as directionMap, B as hasParseableColor, e as cornerMap, p as passThemeKey, q as colorCSSGenerator, G as isSize, m as directionSize, n as numberResolver, o as colorableShadows, i as insetMap, J as hyphenate, r as resolveBreakpoints, H as transformXYZ, x as xyzMap, N as bracketTypeRe } from './preset-wind4.CbSMpnSp.mjs';
2
+ import { notNull } from '@unocss/core';
3
+ import { a as container, c as containerParent } from './preset-wind4.Ch1Z_NI2.mjs';
4
4
  import { getStringComponent } from '@unocss/rule-utils';
5
5
 
6
6
  const verticalAlignAlias = {
@@ -184,7 +184,8 @@ function bgGradientColorResolver() {
184
184
  };
185
185
  break;
186
186
  }
187
- yield Object.values(properties).join("\n");
187
+ for (const p of Object.values(properties))
188
+ yield p;
188
189
  }
189
190
  };
190
191
  }
@@ -193,7 +194,8 @@ function bgGradientPositionResolver() {
193
194
  yield {
194
195
  [`--un-gradient-${mode}-position`]: `${h.bracket.cssvar.percent(body)}`
195
196
  };
196
- yield Object.values(properties).join("\n");
197
+ for (const p of Object.values(properties))
198
+ yield p;
197
199
  };
198
200
  }
199
201
  const backgroundStyles = [
@@ -458,11 +460,14 @@ function handlerBorderColorOrSize([, a = "", b], ctx) {
458
460
  if (isCSSMathFn(h.bracket(b)))
459
461
  return handlerBorderSize(["", a, b]);
460
462
  if (hasParseableColor(b, ctx.theme)) {
461
- return directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx)).filter(notNull).reduce((acc, item) => {
462
- Object.assign(acc[0], item[0]);
463
- acc[1] = uniq([acc[1], item[1]]).join("");
464
- return acc.filter(Boolean);
465
- }, [{}]);
463
+ const direcetions = directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx)).filter(notNull);
464
+ return [
465
+ direcetions.map((d) => d[0]).reduce((acc, item) => {
466
+ Object.assign(acc, item);
467
+ return acc;
468
+ }, {}),
469
+ ...direcetions.flatMap((d) => d.slice(1))
470
+ ];
466
471
  }
467
472
  }
468
473
  }
@@ -722,7 +727,7 @@ const filterBaseKeys = [
722
727
  "sepia",
723
728
  "drop-shadow"
724
729
  ];
725
- const filterProperties = filterBaseKeys.map((i) => defineProperty(`--un-${i}`)).join("\n");
730
+ const filterProperties = filterBaseKeys.map((i) => defineProperty(`--un-${i}`));
726
731
  const filterCSS = filterBaseKeys.map((i) => `var(--un-${i},)`).join(" ");
727
732
  const backdropBaseKeys = [
728
733
  "backdrop-blur",
@@ -735,7 +740,7 @@ const backdropBaseKeys = [
735
740
  "backdrop-saturate",
736
741
  "backdrop-sepia"
737
742
  ];
738
- const backdropProperties = backdropBaseKeys.map((i) => defineProperty(`--un-${i}`)).join("\n");
743
+ const backdropProperties = backdropBaseKeys.map((i) => defineProperty(`--un-${i}`));
739
744
  const backdropCSS = backdropBaseKeys.map((i) => `var(--un-${i},)`).join(" ");
740
745
  function percentWithDefault(str) {
741
746
  let v = h.bracket.cssvar(str || "");
@@ -756,7 +761,7 @@ function toFilter(varName, resolver) {
756
761
  "-webkit-backdrop-filter": backdropCSS,
757
762
  "backdrop-filter": backdropCSS
758
763
  },
759
- backdropProperties
764
+ ...backdropProperties
760
765
  ];
761
766
  } else {
762
767
  return [
@@ -764,7 +769,7 @@ function toFilter(varName, resolver) {
764
769
  [`--un-${varName}`]: `${varName}(${value})`,
765
770
  filter: filterCSS
766
771
  },
767
- filterProperties
772
+ ...filterProperties
768
773
  ];
769
774
  }
770
775
  }
@@ -779,7 +784,7 @@ function dropShadowResolver([, s], { theme }) {
779
784
  "--un-drop-shadow": `drop-shadow(${shadows.join(") drop-shadow(")})`,
780
785
  "filter": filterCSS
781
786
  },
782
- filterProperties
787
+ ...filterProperties
783
788
  ];
784
789
  }
785
790
  v = h.bracket.cssvar(s) ?? (s === "none" ? "" : void 0);
@@ -789,7 +794,7 @@ function dropShadowResolver([, s], { theme }) {
789
794
  "--un-drop-shadow": v ? `drop-shadow(${v})` : v,
790
795
  "filter": filterCSS
791
796
  },
792
- filterProperties
797
+ ...filterProperties
793
798
  ];
794
799
  }
795
800
  }
@@ -1213,7 +1218,7 @@ const rings = [
1213
1218
  "--un-ring-shadow": `var(--un-ring-inset,) 0 0 0 calc(${v} + var(--un-ring-offset-width)) var(--un-ring-color, currentColor)`,
1214
1219
  "box-shadow": "var(--un-inset-shadow), var(--un-inset-ring-shadow), var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
1215
1220
  },
1216
- Object.values(shadowProperties).join("\n")
1221
+ ...Object.values(shadowProperties)
1217
1222
  ];
1218
1223
  }
1219
1224
  }],
@@ -1228,7 +1233,7 @@ const rings = [
1228
1233
  "--un-inset-ring-shadow": `inset 0 0 0 ${v} var(--un-inset-ring-color, currentColor)`,
1229
1234
  "box-shadow": "var(--un-inset-shadow), var(--un-inset-ring-shadow), var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
1230
1235
  },
1231
- Object.values(shadowProperties).join("\n")
1236
+ ...Object.values(shadowProperties)
1232
1237
  ];
1233
1238
  }
1234
1239
  }],
@@ -1412,7 +1417,7 @@ const contains = [
1412
1417
  "--un-contain-size": d,
1413
1418
  "contain": containValues.map((i) => `var(--un-contain-${i})`).join(" ")
1414
1419
  },
1415
- containValues.map((i) => defineProperty(`--un-contain-${i}`)).join("\n")
1420
+ ...containValues.map((i) => defineProperty(`--un-contain-${i}`))
1416
1421
  ] : void 0;
1417
1422
  }],
1418
1423
  ["contain-strict", { contain: "strict" }],
@@ -1694,7 +1699,8 @@ const tables = [
1694
1699
  "--un-border-spacing-y": v,
1695
1700
  "border-spacing": "var(--un-border-spacing-x) var(--un-border-spacing-y)"
1696
1701
  };
1697
- yield ["x", "y"].map((d) => defineProperty(`--un-border-spacing-${d}`, { syntax: "<length>", initialValue: "0" })).join("\n");
1702
+ for (const d of ["x", "y"])
1703
+ yield defineProperty(`--un-border-spacing-${d}`, { syntax: "<length>", initialValue: "0" });
1698
1704
  }
1699
1705
  }, { autocomplete: ["border-spacing", "border-spacing-$spacing"] }],
1700
1706
  [/^border-spacing-([xy])-(.+)$/, function* ([, d, s], { theme }) {
@@ -1704,7 +1710,8 @@ const tables = [
1704
1710
  [`--un-border-spacing-${d}`]: v,
1705
1711
  "border-spacing": "var(--un-border-spacing-x) var(--un-border-spacing-y)"
1706
1712
  };
1707
- yield ["x", "y"].map((d2) => defineProperty(`--un-border-spacing-${d2}`, { syntax: "<length>", initialValue: "0" })).join("\n");
1713
+ for (const d2 of ["x", "y"])
1714
+ yield defineProperty(`--un-border-spacing-${d2}`, { syntax: "<length>", initialValue: "0" });
1708
1715
  }
1709
1716
  }, { autocomplete: ["border-spacing-(x|y)", "border-spacing-(x|y)-$spacing"] }],
1710
1717
  ["caption-top", { "caption-side": "top" }],
@@ -1729,28 +1736,31 @@ function resolveValue(s, theme) {
1729
1736
  }
1730
1737
 
1731
1738
  const touchActionValue = "var(--un-pan-x) var(--un-pan-y) var(--un-pinch-zoom)";
1732
- const touchActionProperty = ["pan-x", "pan-y", "pinch-zoom"].map((d) => defineProperty(`--un-${d}`)).join("\n");
1739
+ const touchActionProperties = ["pan-x", "pan-y", "pinch-zoom"].map((d) => defineProperty(`--un-${d}`));
1733
1740
  const touchActions = [
1734
1741
  [/^touch-pan-(x|left|right)$/, function* ([, d]) {
1735
1742
  yield {
1736
1743
  "--un-pan-x": `pan-${d}`,
1737
1744
  "touch-action": touchActionValue
1738
1745
  };
1739
- yield touchActionProperty;
1746
+ for (const p of touchActionProperties)
1747
+ yield p;
1740
1748
  }, { autocomplete: ["touch-pan", "touch-pan-(x|left|right|y|up|down)"] }],
1741
1749
  [/^touch-pan-(y|up|down)$/, function* ([, d]) {
1742
1750
  yield {
1743
1751
  "--un-pan-y": `pan-${d}`,
1744
1752
  "touch-action": touchActionValue
1745
1753
  };
1746
- yield touchActionProperty;
1754
+ for (const p of touchActionProperties)
1755
+ yield p;
1747
1756
  }],
1748
1757
  [/^touch-pinch-zoom$/, function* () {
1749
1758
  yield {
1750
1759
  "--un-pinch-zoom": "pinch-zoom",
1751
1760
  "touch-action": touchActionValue
1752
1761
  };
1753
- yield touchActionProperty;
1762
+ for (const p of touchActionProperties)
1763
+ yield p;
1754
1764
  }],
1755
1765
  ["touch-auto", { "touch-action": "auto" }],
1756
1766
  ["touch-manipulation", { "touch-action": "manipulation" }],
@@ -1852,7 +1862,7 @@ function handleTranslate([, d, b]) {
1852
1862
  ...transformXYZ(d, typeof v === "number" ? `calc(var(--spacing) * ${v})` : v, "translate"),
1853
1863
  ["translate", `var(--un-translate-x) var(--un-translate-y)${d === "z" ? " var(--un-translate-z)" : ""}`]
1854
1864
  ],
1855
- ["x", "y", "z"].map((d2) => defineProperty(`--un-translate-${d2}`, { initialValue: 0 })).join("\n")
1865
+ ...["x", "y", "z"].map((d2) => defineProperty(`--un-translate-${d2}`, { initialValue: 0 }))
1856
1866
  ];
1857
1867
  }
1858
1868
  }
@@ -1869,7 +1879,7 @@ function handleScale([, d, b]) {
1869
1879
  ...transformXYZ(d, v, "scale"),
1870
1880
  ["scale", `var(--un-scale-x) var(--un-scale-y)${d === "z" ? " var(--un-scale-z)" : ""}`]
1871
1881
  ],
1872
- ["x", "y", "z"].map((d2) => defineProperty(`--un-scale-${d2}`, { initialValue: 1 })).join("\n")
1882
+ ...["x", "y", "z"].map((d2) => defineProperty(`--un-scale-${d2}`, { initialValue: 1 }))
1873
1883
  ];
1874
1884
  }
1875
1885
  }
@@ -1887,8 +1897,8 @@ function handleRotate([, d = "", b]) {
1887
1897
  ...transformXYZ(d, v.endsWith("deg") ? `rotate${d.toUpperCase()}(${v})` : v, "rotate"),
1888
1898
  ["transform", transform]
1889
1899
  ],
1890
- ["x", "y", "z"].map((d2) => defineProperty(`--un-rotate-${d2}`, { initialValue: `rotate${d2.toUpperCase()}(0)` })).join("\n"),
1891
- ["x", "y"].map((d2) => defineProperty(`--un-skew-${d2}`, { initialValue: `skew${d2.toUpperCase()}(0)` })).join("\n")
1900
+ ...["x", "y", "z"].map((d2) => defineProperty(`--un-rotate-${d2}`, { initialValue: `rotate${d2.toUpperCase()}(0)` })),
1901
+ ...["x", "y"].map((d2) => defineProperty(`--un-skew-${d2}`, { initialValue: `skew${d2.toUpperCase()}(0)` }))
1892
1902
  ];
1893
1903
  } else {
1894
1904
  return {
@@ -1906,8 +1916,8 @@ function handleSkew([, d, b]) {
1906
1916
  ...ds.map((_d) => [`--un-skew${_d}`, v.endsWith("deg") ? `skew${_d.slice(1).toUpperCase()}(${v})` : v]),
1907
1917
  ["transform", transform]
1908
1918
  ],
1909
- ["x", "y", "z"].map((d2) => defineProperty(`--un-rotate-${d2}`, { initialValue: `rotate${d2.toUpperCase()}(0)` })).join("\n"),
1910
- ["x", "y"].map((d2) => defineProperty(`--un-skew-${d2}`, { initialValue: `skew${d2.toUpperCase()}(0)` })).join("\n")
1919
+ ...["x", "y", "z"].map((d2) => defineProperty(`--un-rotate-${d2}`, { initialValue: `rotate${d2.toUpperCase()}(0)` })),
1920
+ ...["x", "y"].map((d2) => defineProperty(`--un-skew-${d2}`, { initialValue: `skew${d2.toUpperCase()}(0)` }))
1911
1921
  ];
1912
1922
  }
1913
1923
  }
@@ -2203,19 +2213,19 @@ const fontVariantNumericProperties = [
2203
2213
  defineProperty("--un-numeric-figure"),
2204
2214
  defineProperty("--un-numeric-spacing"),
2205
2215
  defineProperty("--un-numeric-fraction")
2206
- ].join("\n");
2216
+ ];
2207
2217
  const baseFontVariantNumeric = {
2208
2218
  "font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)"
2209
2219
  };
2210
2220
  const fontVariantNumeric = [
2211
- ["ordinal", [{ "--un-ordinal": "ordinal", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2212
- ["slashed-zero", [{ "--un-slashed-zero": "slashed-zero", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2213
- ["lining-nums", [{ "--un-numeric-figure": "lining-nums", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2214
- ["oldstyle-nums", [{ "--un-numeric-figure": "oldstyle-nums", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2215
- ["proportional-nums", [{ "--un-numeric-spacing": "proportional-nums", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2216
- ["tabular-nums", [{ "--un-numeric-spacing": "tabular-nums", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2217
- ["diagonal-fractions", [{ "--un-numeric-fraction": "diagonal-fractions", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2218
- ["stacked-fractions", [{ "--un-numeric-fraction": "stacked-fractions", ...baseFontVariantNumeric }, fontVariantNumericProperties]],
2221
+ ["ordinal", [{ "--un-ordinal": "ordinal", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2222
+ ["slashed-zero", [{ "--un-slashed-zero": "slashed-zero", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2223
+ ["lining-nums", [{ "--un-numeric-figure": "lining-nums", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2224
+ ["oldstyle-nums", [{ "--un-numeric-figure": "oldstyle-nums", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2225
+ ["proportional-nums", [{ "--un-numeric-spacing": "proportional-nums", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2226
+ ["tabular-nums", [{ "--un-numeric-spacing": "tabular-nums", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2227
+ ["diagonal-fractions", [{ "--un-numeric-fraction": "diagonal-fractions", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2228
+ ["stacked-fractions", [{ "--un-numeric-fraction": "stacked-fractions", ...baseFontVariantNumeric }, ...fontVariantNumericProperties]],
2219
2229
  ["normal-nums", [{ "font-variant-numeric": "normal" }]]
2220
2230
  ];
2221
2231
  function handleText([, s = "base"], { theme }) {
@@ -1,5 +1,5 @@
1
1
  import { variantGetParameter, variantMatcher, variantGetBracket, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent } from '@unocss/rule-utils';
2
- import { c as h, r as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE, k as cssMathFnRE, l as cssVarFnRE, B as hasParseableColor } from './preset-wind4.B0q3EwQ3.mjs';
2
+ import { c as h, r as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE, k as cssMathFnRE, l as cssVarFnRE, B as hasParseableColor } from './preset-wind4.CbSMpnSp.mjs';
3
3
  import { escapeRegExp, escapeSelector } from '@unocss/core';
4
4
 
5
5
  const variantAria = {
@@ -1,4 +1,4 @@
1
- import { toArray, escapeSelector } from '@unocss/core';
1
+ import { toArray, escapeSelector, symbols } from '@unocss/core';
2
2
  import { createValueHandler, parseCssColor, getStringComponents, colorToString, getStringComponent } from '@unocss/rule-utils';
3
3
 
4
4
  const PRESET_NAME = "@unocss/preset-wind4";
@@ -674,7 +674,22 @@ function defineProperty(property, options = {}) {
674
674
  inherits = false,
675
675
  initialValue
676
676
  } = options;
677
- return `@property ${property} {syntax: "${syntax}";inherits: ${inherits};${initialValue != null ? `initial-value: ${initialValue};` : ""}}`;
677
+ const value = {
678
+ [symbols.shortcutsNoMerge]: true,
679
+ [symbols.noMerge]: true,
680
+ [symbols.variants]: () => [
681
+ {
682
+ parent: "",
683
+ layer: "cssvar-property",
684
+ selector: () => `@property ${property}`
685
+ }
686
+ ],
687
+ syntax: JSON.stringify(syntax),
688
+ inherits: inherits ? "true" : "false"
689
+ };
690
+ if (initialValue != null)
691
+ value["initial-value"] = JSON.stringify(initialValue);
692
+ return value;
678
693
  }
679
694
  function detectThemeValue(value, theme) {
680
695
  if (value.startsWith("var(")) {
@@ -1,5 +1,5 @@
1
1
  import { isString } from '@unocss/core';
2
- import { r as resolveBreakpoints } from './preset-wind4.B0q3EwQ3.mjs';
2
+ import { r as resolveBreakpoints } from './preset-wind4.CbSMpnSp.mjs';
3
3
 
4
4
  const containerParent = [
5
5
  [/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => {
@@ -1,5 +1,5 @@
1
- export { s as shortcuts } from './shared/preset-wind4.DolXDUDJ.mjs';
2
- import './shared/preset-wind4.C100zP13.mjs';
1
+ export { s as shortcuts } from './shared/preset-wind4.BLH55jNO.mjs';
2
+ import './shared/preset-wind4.Ch1Z_NI2.mjs';
3
3
  import '@unocss/core';
4
- import './shared/preset-wind4.B0q3EwQ3.mjs';
4
+ import './shared/preset-wind4.CbSMpnSp.mjs';
5
5
  import '@unocss/rule-utils';
package/dist/utils.d.mts CHANGED
@@ -90,7 +90,7 @@ declare function directionSize(propertyPrefix: string): DynamicMatcher<Theme>;
90
90
  */
91
91
  declare function splitShorthand(body: string, type: string): string[] | undefined;
92
92
  declare function colorableShadows(shadows: string | string[], colorVar: string): string[];
93
- declare function colorCSSGenerator(data: ReturnType<typeof parseColor>, property: string, varName: string, ctx?: RuleContext<Theme>): [CSSObject, string?] | undefined;
93
+ declare function colorCSSGenerator(data: ReturnType<typeof parseColor>, property: string, varName: string, ctx?: RuleContext<Theme>): [CSSObject, ...CSSValueInput[]] | undefined;
94
94
  declare function colorResolver(property: string, varName: string): ([, body]: string[], ctx: RuleContext<Theme>) => (CSSValueInput | string)[] | undefined;
95
95
  /**
96
96
  * Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
@@ -145,7 +145,7 @@ declare function defineProperty(property: string, options?: {
145
145
  syntax?: string;
146
146
  inherits?: boolean;
147
147
  initialValue?: unknown;
148
- }): string;
148
+ }): CSSValueInput;
149
149
  declare function detectThemeValue(value: string, theme: Theme): void;
150
150
 
151
151
  export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, createRemToPxResolver, cssMathFnRE, cssVarFnRE, defineProperty, detectThemeValue, directionMap, directionSize, getThemeByKey, globalKeywords, h, handler, hasParseableColor, hyphenate, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, numberResolver, parseColor, parseThemeColor, passThemeKey, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, themeTracking, trackedTheme, transformXYZ, handlers as valueHandlers, xyzArray, xyzMap };
package/dist/utils.d.ts CHANGED
@@ -90,7 +90,7 @@ declare function directionSize(propertyPrefix: string): DynamicMatcher<Theme>;
90
90
  */
91
91
  declare function splitShorthand(body: string, type: string): string[] | undefined;
92
92
  declare function colorableShadows(shadows: string | string[], colorVar: string): string[];
93
- declare function colorCSSGenerator(data: ReturnType<typeof parseColor>, property: string, varName: string, ctx?: RuleContext<Theme>): [CSSObject, string?] | undefined;
93
+ declare function colorCSSGenerator(data: ReturnType<typeof parseColor>, property: string, varName: string, ctx?: RuleContext<Theme>): [CSSObject, ...CSSValueInput[]] | undefined;
94
94
  declare function colorResolver(property: string, varName: string): ([, body]: string[], ctx: RuleContext<Theme>) => (CSSValueInput | string)[] | undefined;
95
95
  /**
96
96
  * Parse color string into {@link ParsedColorValue} (if possible). Color value will first be matched to theme object before parsing.
@@ -145,7 +145,7 @@ declare function defineProperty(property: string, options?: {
145
145
  syntax?: string;
146
146
  inherits?: boolean;
147
147
  initialValue?: unknown;
148
- }): string;
148
+ }): CSSValueInput;
149
149
  declare function detectThemeValue(value: string, theme: Theme): void;
150
150
 
151
151
  export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, createRemToPxResolver, cssMathFnRE, cssVarFnRE, defineProperty, detectThemeValue, directionMap, directionSize, getThemeByKey, globalKeywords, h, handler, hasParseableColor, hyphenate, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, numberResolver, parseColor, parseThemeColor, passThemeKey, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, themeTracking, trackedTheme, transformXYZ, handlers as valueHandlers, xyzArray, xyzMap };
package/dist/utils.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as remRE } from './shared/preset-wind4.B0q3EwQ3.mjs';
2
- export { C as CONTROL_MINI_NO_NEGATIVE, P as PRESET_NAME, S as SpecialColorKey, I as camelize, q as colorCSSGenerator, u as colorResolver, A as colorVariable, o as colorableShadows, K as compressCSS, e as cornerMap, k as cssMathFnRE, l as cssVarFnRE, L as defineProperty, M as detectThemeValue, d as directionMap, m as directionSize, z as getThemeByKey, j as globalKeywords, c as h, h as handler, B as hasParseableColor, J as hyphenate, i as insetMap, F as isCSSMathFn, G as isSize, E as makeGlobalStaticRules, n as numberResolver, w as parseColor, y as parseThemeColor, p as passThemeKey, g as positionMap, r as resolveBreakpoints, D as resolveVerticalBreakpoints, s as splitShorthand, b as themeTracking, t as trackedTheme, H as transformXYZ, v as valueHandlers, f as xyzArray, x as xyzMap } from './shared/preset-wind4.B0q3EwQ3.mjs';
1
+ import { a as remRE } from './shared/preset-wind4.CbSMpnSp.mjs';
2
+ export { C as CONTROL_MINI_NO_NEGATIVE, P as PRESET_NAME, S as SpecialColorKey, I as camelize, q as colorCSSGenerator, u as colorResolver, A as colorVariable, o as colorableShadows, K as compressCSS, e as cornerMap, k as cssMathFnRE, l as cssVarFnRE, L as defineProperty, M as detectThemeValue, d as directionMap, m as directionSize, z as getThemeByKey, j as globalKeywords, c as h, h as handler, B as hasParseableColor, J as hyphenate, i as insetMap, F as isCSSMathFn, G as isSize, E as makeGlobalStaticRules, n as numberResolver, w as parseColor, y as parseThemeColor, p as passThemeKey, g as positionMap, r as resolveBreakpoints, D as resolveVerticalBreakpoints, s as splitShorthand, b as themeTracking, t as trackedTheme, H as transformXYZ, v as valueHandlers, f as xyzArray, x as xyzMap } from './shared/preset-wind4.CbSMpnSp.mjs';
3
3
  export * from '@unocss/rule-utils';
4
4
  import '@unocss/core';
5
5
 
@@ -2,8 +2,8 @@ import { VariantObject, Variant, VariantFunction } from '@unocss/core';
2
2
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
3
3
  import { PresetWind4Options } from './index.mjs';
4
4
  export { variants } from './index.mjs';
5
- import './shared/preset-wind4.D71xGC6i.mjs';
6
5
  import './shortcuts.mjs';
6
+ import './shared/preset-wind4.D71xGC6i.mjs';
7
7
  import './shared/preset-wind4.BOe5kxIw.mjs';
8
8
 
9
9
  declare const variantAria: VariantObject<Theme>;
@@ -2,8 +2,8 @@ import { VariantObject, Variant, VariantFunction } from '@unocss/core';
2
2
  import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
3
3
  import { PresetWind4Options } from './index.js';
4
4
  export { variants } from './index.js';
5
- import './shared/preset-wind4.Ca5oWgxX.js';
6
5
  import './shortcuts.js';
6
+ import './shared/preset-wind4.Ca5oWgxX.js';
7
7
  import './shared/preset-wind4.BOe5kxIw.js';
8
8
 
9
9
  declare const variantAria: VariantObject<Theme>;
package/dist/variants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as calcMaxWidthBySize, D as placeholderModifier, v as variantAria, b as variantBreakpoints, d as variantChildren, h as variantColorsMediaOrClass, i as variantColorsScheme, e as variantCombinators, g as variantContainerQuery, q as variantContrasts, w as variantCssLayer, p as variantCustomMedia, j as variantDataAttribute, t as variantForcedColors, n as variantImportant, x as variantInternalLayer, m as variantLanguageDirections, r as variantMotions, C as variantNegative, s as variantOrientations, H as variantPartClasses, o as variantPrint, F as variantPseudoClassFunctions, E as variantPseudoClassesAndElements, y as variantScope, u as variantSelector, I as variantStartingStyle, B as variantStickyHover, J as variantSupports, f as variantSvgCombinators, a as variantTaggedAriaAttributes, k as variantTaggedDataAttributes, G as variantTaggedPseudoClasses, A as variantTheme, z as variantVariables, l as variants } from './shared/preset-wind4.-dZRTBz8.mjs';
1
+ export { c as calcMaxWidthBySize, D as placeholderModifier, v as variantAria, b as variantBreakpoints, d as variantChildren, h as variantColorsMediaOrClass, i as variantColorsScheme, e as variantCombinators, g as variantContainerQuery, q as variantContrasts, w as variantCssLayer, p as variantCustomMedia, j as variantDataAttribute, t as variantForcedColors, n as variantImportant, x as variantInternalLayer, m as variantLanguageDirections, r as variantMotions, C as variantNegative, s as variantOrientations, H as variantPartClasses, o as variantPrint, F as variantPseudoClassFunctions, E as variantPseudoClassesAndElements, y as variantScope, u as variantSelector, I as variantStartingStyle, B as variantStickyHover, J as variantSupports, f as variantSvgCombinators, a as variantTaggedAriaAttributes, k as variantTaggedDataAttributes, G as variantTaggedPseudoClasses, A as variantTheme, z as variantVariables, l as variants } from './shared/preset-wind4.BgYY8vln.mjs';
2
2
  import '@unocss/rule-utils';
3
- import './shared/preset-wind4.B0q3EwQ3.mjs';
3
+ import './shared/preset-wind4.CbSMpnSp.mjs';
4
4
  import '@unocss/core';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind4",
3
3
  "type": "module",
4
- "version": "66.1.0-beta.8",
4
+ "version": "66.1.0-beta.9",
5
5
  "description": "Tailwind 4 compact preset for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -65,9 +65,9 @@
65
65
  "dist"
66
66
  ],
67
67
  "dependencies": {
68
- "@unocss/core": "66.1.0-beta.8",
69
- "@unocss/extractor-arbitrary-variants": "66.1.0-beta.8",
70
- "@unocss/rule-utils": "66.1.0-beta.8"
68
+ "@unocss/core": "66.1.0-beta.9",
69
+ "@unocss/rule-utils": "66.1.0-beta.9",
70
+ "@unocss/extractor-arbitrary-variants": "66.1.0-beta.9"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "unbuild",