@unocss/preset-wind4 66.3.2 → 66.4.0

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
@@ -114,4 +114,5 @@ interface PresetWind4Options extends PresetOptions {
114
114
  }
115
115
  declare const presetWind4: _unocss_core.PresetFactory<Theme, PresetWind4Options>;
116
116
 
117
- export { type DarkModeSelectors, type PreflightsTheme, type PresetWind4Options, Theme, presetWind4 as default, postprocessors, preflights, presetWind4, shorthands, variants };
117
+ export { Theme, presetWind4 as default, postprocessors, preflights, presetWind4, shorthands, variants };
118
+ export type { DarkModeSelectors, PreflightsTheme, PresetWind4Options };
package/dist/index.d.ts CHANGED
@@ -114,4 +114,5 @@ interface PresetWind4Options extends PresetOptions {
114
114
  }
115
115
  declare const presetWind4: _unocss_core.PresetFactory<Theme, PresetWind4Options>;
116
116
 
117
- export { type DarkModeSelectors, type PreflightsTheme, type PresetWind4Options, Theme, presetWind4 as default, postprocessors, preflights, presetWind4, shorthands, variants };
117
+ export { Theme, presetWind4 as default, postprocessors, preflights, presetWind4, shorthands, variants };
118
+ export type { DarkModeSelectors, PreflightsTheme, PresetWind4Options };
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { uniq, toArray, definePreset } from '@unocss/core';
2
2
  import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
3
- import { n as trackedProperties, k as themeTracking, M as compressCSS, z as getThemeByKey, m as detectThemeValue, t as trackedTheme, g as globalKeywords, P as PRESET_NAME } from './shared/preset-wind4.B6AdPBSv.mjs';
3
+ import { n as trackedProperties, k as themeTracking, M as compressCSS, z as getThemeByKey, m as detectThemeValue, t as trackedTheme, g as globalKeywords, P as PRESET_NAME } from './shared/preset-wind4.Dh6P6wnz.mjs';
4
4
  import { alphaPlaceholdersRE } from '@unocss/rule-utils';
5
5
  import { postprocessors } from './postprocess.mjs';
6
- import { k as variants } from './shared/preset-wind4.CSYWJ8rI.mjs';
6
+ import { k as variants } from './shared/preset-wind4.CGl5yp9H.mjs';
7
7
  import { theme as theme$1 } from './theme.mjs';
8
- import { s as shortcuts } from './shared/preset-wind4.9XNkkElt.mjs';
9
- import { r as rules } from './shared/preset-wind4.CfYOwu2f.mjs';
8
+ import { s as shortcuts } from './shared/preset-wind4.DJR3nFnD.mjs';
9
+ import { r as rules } from './shared/preset-wind4.CqdenNgh.mjs';
10
10
  import './colors.mjs';
11
- import './shared/preset-wind4.B7G_ZuoA.mjs';
11
+ import './shared/preset-wind4.Y5BADsqi.mjs';
12
12
 
13
13
  function properties() {
14
14
  return {
@@ -376,6 +376,14 @@ textarea {
376
376
  padding-block: 0;
377
377
  }
378
378
 
379
+ /*
380
+ Center dropdown marker shown on inputs with paired \`<datalist>\`s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499)
381
+ */
382
+
383
+ ::-webkit-calendar-picker-indicator {
384
+ line-height: 1;
385
+ }
386
+
379
387
  /*
380
388
  Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
381
389
  */
@@ -9,16 +9,18 @@ function important({ important: option }) {
9
9
  return `:is(${selector})`;
10
10
  };
11
11
  return [
12
- option === true ? (util) => {
12
+ (util) => {
13
13
  if (util.layer === "properties")
14
14
  return;
15
- util.entries.forEach((i) => {
16
- if (i[1] != null && !String(i[1]).endsWith("!important"))
17
- i[1] += " !important";
18
- });
19
- } : (util) => {
20
- if (!util.selector.startsWith(option))
21
- util.selector = `${option} ${wrapWithIs(util.selector)}`;
15
+ if (option === true) {
16
+ util.entries.forEach((i) => {
17
+ if (i[1] != null && !String(i[1]).endsWith("!important"))
18
+ i[1] += " !important";
19
+ });
20
+ } else {
21
+ if (!util.selector.startsWith(option))
22
+ util.selector = `${option} ${wrapWithIs(util.selector)}`;
23
+ }
22
24
  }
23
25
  ];
24
26
  }
package/dist/rules.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { d as accents, an as accessibility, I as alignments, a as animations, c as appearance, $ as appearances, V as aspectRatio, ak as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, T as boxShadows, O as boxSizing, a8 as breaks, e as carets, n as colorScheme, p as columns, a1 as contains, a6 as contentVisibility, a7 as contents, aD as cssProperty, aC as cssVariables, a0 as cursors, _ as displays, u as divides, am as dynamicViewportHeight, ao as fieldSizing, x as filters, y as flex, K as flexGridJustifiesAlignments, M as floats, ad as fontSmoothings, ac as fontStyles, aA as fontVariantNumeric, av as fonts, z as gaps, A as grids, j as handlerBorderStyle, ae as hyphens, i as imageRenderings, L as insets, ai as isolations, G as justifies, C as lineClamps, l as listStyle, X as margins, D as masks, al as mixBlendModes, Z as notLastChildSelector, aj as objectPositions, k as opacity, H as orders, o as outline, B as overflows, f as overscrolls, W as paddings, E as placeholders, J as placements, a2 as pointerEvents, F as positions, P as questionMark, a3 as resizes, Q as rings, r as rules, ah as screenReadersAccess, s as scrollBehaviors, R as scrolls, S as shadowProperties, U as sizes, Y as spaces, aB as splitShorthand, ap as svgUtilities, aw as tabSizes, aq as tables, t as textAligns, q as textDecorations, ax as textIndents, aa as textOverflows, az as textShadows, ay as textStrokes, ab as textTransforms, a9 as textWraps, ar as touchActions, as as transformBase, at as transforms, au as transitions, a4 as userSelects, v as verticalAligns, aE as viewTransition, a5 as whitespaces, w as willChange, af as writingModes, ag as writingOrientations, N as zIndexes } from './shared/preset-wind4.CfYOwu2f.mjs';
2
- export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.B7G_ZuoA.mjs';
3
- import './shared/preset-wind4.B6AdPBSv.mjs';
1
+ export { d as accents, an as accessibility, I as alignments, a as animations, c as appearance, $ as appearances, V as aspectRatio, ak as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, T as boxShadows, O as boxSizing, a8 as breaks, e as carets, n as colorScheme, p as columns, a1 as contains, a6 as contentVisibility, a7 as contents, aD as cssProperty, aC as cssVariables, a0 as cursors, _ as displays, u as divides, am as dynamicViewportHeight, ao as fieldSizing, x as filters, y as flex, K as flexGridJustifiesAlignments, M as floats, ad as fontSmoothings, ac as fontStyles, aA as fontVariantNumeric, av as fonts, z as gaps, A as grids, j as handlerBorderStyle, ae as hyphens, i as imageRenderings, L as insets, ai as isolations, G as justifies, C as lineClamps, l as listStyle, X as margins, D as masks, al as mixBlendModes, Z as notLastChildSelector, aj as objectPositions, k as opacity, H as orders, o as outline, B as overflows, f as overscrolls, W as paddings, E as placeholders, J as placements, a2 as pointerEvents, F as positions, P as questionMark, a3 as resizes, Q as rings, r as rules, ah as screenReadersAccess, s as scrollBehaviors, R as scrolls, S as shadowProperties, U as sizes, Y as spaces, aB as splitShorthand, ap as svgUtilities, aw as tabSizes, aq as tables, t as textAligns, q as textDecorations, ax as textIndents, aa as textOverflows, az as textShadows, ay as textStrokes, ab as textTransforms, a9 as textWraps, ar as touchActions, as as transformBase, at as transforms, au as transitions, a4 as userSelects, v as verticalAligns, aE as viewTransition, a5 as whitespaces, w as willChange, af as writingModes, ag as writingOrientations, N as zIndexes } from './shared/preset-wind4.CqdenNgh.mjs';
2
+ export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.Y5BADsqi.mjs';
3
+ import './shared/preset-wind4.Dh6P6wnz.mjs';
4
4
  import '@unocss/core';
5
5
  import '@unocss/rule-utils';
@@ -1,5 +1,5 @@
1
1
  import { variantGetParameter, calcMaxWidthBySize, variantMatcher, variantGetBracket, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent, createPartClasses, createPseudoClassesAndElements, createPseudoClassFunctions, createTaggedPseudoClasses } from '@unocss/rule-utils';
2
- import { b as h, r as resolveBreakpoints, C as CONTROL_NO_NEGATIVE, f as cssMathFnRE, j as cssVarFnRE, E as hasParseableColor } from './preset-wind4.B6AdPBSv.mjs';
2
+ import { b as h, r as resolveBreakpoints, C as CONTROL_NO_NEGATIVE, f as cssMathFnRE, j as cssVarFnRE, E as hasParseableColor } from './preset-wind4.Dh6P6wnz.mjs';
3
3
  import { toArray } from '@unocss/core';
4
4
 
5
5
  const variantAria = {
@@ -319,6 +319,11 @@ function variantImportant() {
319
319
  };
320
320
  }
321
321
 
322
+ const variantInert = variantMatcher("inert", (input) => ({
323
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}${input.selector}`,
324
+ selector: "&:is([inert],[inert] *)"
325
+ }));
326
+
322
327
  const variantNoscript = variantParentMatcher("noscript", "@media (scripting: none)");
323
328
  const variantScripting = {
324
329
  name: "scripting",
@@ -707,6 +712,7 @@ function variants(options) {
707
712
  ...variantLanguageDirections,
708
713
  variantScope,
709
714
  ...variantChildren,
715
+ variantInert,
710
716
  variantContainerQuery,
711
717
  variantVariables,
712
718
  ...variantTaggedDataAttributes,
@@ -1,6 +1,6 @@
1
- import { g as globalKeywords, b as h, G as makeGlobalStaticRules, p as positionMap, w as parseColor, S as SpecialColorKey, l as generateThemeVariable, H as defineProperty, k as themeTracking, m as detectThemeValue, B as colorResolver, I as isCSSMathFn, d as directionMap, E as hasParseableColor, c as cornerMap, A as colorCSSGenerator, J as isSize, s as directionSize, q as numberResolver, D as colorableShadows, L as hyphenate, i as insetMap, r as resolveBreakpoints, C as CONTROL_NO_NEGATIVE, x as xyzMap, N as splitComma, e as xyzArray, O as bracketTypeRe } from './preset-wind4.B6AdPBSv.mjs';
1
+ import { g as globalKeywords, b as h, G as makeGlobalStaticRules, p as positionMap, w as parseColor, S as SpecialColorKey, l as generateThemeVariable, H as defineProperty, k as themeTracking, m as detectThemeValue, B as colorResolver, I as isCSSMathFn, d as directionMap, E as hasParseableColor, c as cornerMap, A as colorCSSGenerator, J as isSize, s as directionSize, q as numberResolver, D as colorableShadows, L as hyphenate, i as insetMap, r as resolveBreakpoints, C as CONTROL_NO_NEGATIVE, x as xyzMap, N as splitComma, e as xyzArray, O as bracketTypeRe } from './preset-wind4.Dh6P6wnz.mjs';
2
2
  import { symbols, notNull } from '@unocss/core';
3
- import { a as container, c as containerParent } from './preset-wind4.B7G_ZuoA.mjs';
3
+ import { a as container, c as containerParent } from './preset-wind4.Y5BADsqi.mjs';
4
4
  import { getStringComponent } from '@unocss/rule-utils';
5
5
 
6
6
  const verticalAlignAlias = {
@@ -238,6 +238,7 @@ const backgroundStyles = [
238
238
  ["bg-auto", { "background-size": "auto" }],
239
239
  ["bg-cover", { "background-size": "cover" }],
240
240
  ["bg-contain", { "background-size": "contain" }],
241
+ [/^bg-size-(.+)$/, ([, v]) => ({ "background-size": h.bracket.cssvar(v) })],
241
242
  // attachments
242
243
  ["bg-fixed", { "background-attachment": "fixed" }],
243
244
  ["bg-local", { "background-attachment": "local" }],
@@ -899,24 +900,16 @@ const flex = [
899
900
  ];
900
901
 
901
902
  const directions = {
902
- "": "",
903
- "x": "column-",
904
- "y": "row-",
905
- "col": "column-",
906
- "row": "row-"
903
+ "": [""],
904
+ "x": ["column-"],
905
+ "y": ["row-"],
906
+ "col": ["column-"],
907
+ "row": ["row-"]
907
908
  };
908
- function handleGap([, d = "", s]) {
909
- const v = numberResolver(s);
910
- if (v != null) {
911
- themeTracking(`spacing`);
912
- return { [`${directions[d]}gap`]: `calc(var(--spacing) * ${v})` };
913
- }
914
- return { [`${directions[d]}gap`]: h.bracket.cssvar.global.rem(s) };
915
- }
916
909
  const gaps = [
917
- [/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-<num>"] }],
918
- [/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }],
919
- [/^(?:flex-|grid-)?gap-(col|row)-?(.+)$/, handleGap, { autocomplete: ["gap-(col|row)-$spacing", "gap-(col|row)-<num>"] }]
910
+ [/^(?:flex-|grid-)?gap-?()(.+)$/, directionSize("gap", directions, (p, i) => `${i}${p}`), { autocomplete: ["gap-$spacing", "gap-<num>"] }],
911
+ [/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, directionSize("gap", directions, (p, i) => `${i}${p}`), { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }],
912
+ [/^(?:flex-|grid-)?gap-(col|row)-?(.+)$/, directionSize("gap", directions, (p, i) => `${i}${p}`), { autocomplete: ["gap-(col|row)-$spacing", "gap-(col|row)-<num>"] }]
920
913
  ];
921
914
 
922
915
  function rowCol(s) {
@@ -1702,7 +1695,10 @@ const breaks = [
1702
1695
  ["break-words", { "overflow-wrap": "break-word" }],
1703
1696
  ["break-all", { "word-break": "break-all" }],
1704
1697
  ["break-keep", { "word-break": "keep-all" }],
1705
- ["break-anywhere", { "overflow-wrap": "anywhere" }]
1698
+ ["break-anywhere", { "overflow-wrap": "anywhere" }],
1699
+ ["wrap-break-word", { "overflow-wrap": "break-word" }],
1700
+ ["wrap-anywhere", { "overflow-wrap": "anywhere" }],
1701
+ ["wrap-normal", { "overflow-wrap": "normal" }]
1706
1702
  ];
1707
1703
  const textWraps = [
1708
1704
  ["text-wrap", { "text-wrap": "wrap" }],
@@ -1,4 +1,4 @@
1
- import { b as containerShortcuts } from './preset-wind4.B7G_ZuoA.mjs';
1
+ import { b as containerShortcuts } from './preset-wind4.Y5BADsqi.mjs';
2
2
 
3
3
  const shortcuts = [
4
4
  ...containerShortcuts
@@ -427,57 +427,24 @@ function numberResolver(size, defaultValue) {
427
427
  return num;
428
428
  }
429
429
  }
430
- function directionSize(propertyPrefix) {
431
- function parseNumberWithUnit(str) {
432
- const match = str.match(numberWithUnitRE);
433
- if (match) {
434
- const [, n, unit] = match;
435
- const num = Number.parseFloat(n);
436
- if (!Number.isNaN(num))
437
- return [num, unit];
438
- }
439
- return [void 0, void 0];
440
- }
441
- function resolveSpace(theme) {
442
- let base;
443
- let unit;
444
- if (theme.spacing?.DEFAULT) {
445
- const [v, u] = parseNumberWithUnit(theme.spacing.DEFAULT);
446
- if (v != null && u != null) {
447
- base = v;
448
- unit = u;
449
- }
450
- }
451
- return Object.entries(theme.spacing ?? {}).reduce((acc, [key, value]) => {
452
- const [v, u] = parseNumberWithUnit(value);
453
- if (v != null && u != null && u === unit) {
454
- acc[key] = v / base;
455
- } else {
456
- acc[key] = value;
457
- }
458
- return acc;
459
- }, {});
460
- }
430
+ function directionSize(property, map = directionMap, formatter = (p, d) => `${p}${d}`) {
461
431
  return ([_, direction, size], { theme }) => {
462
432
  if (size != null && direction != null) {
463
- const spaceMap = resolveSpace(theme);
464
433
  let v;
465
434
  const isNegative = size.startsWith("-");
466
435
  if (isNegative)
467
436
  size = size.slice(1);
468
- v = numberResolver(size, spaceMap[size]);
469
- if (v != null) {
470
- if (!Number.isNaN(v)) {
471
- themeTracking("spacing");
472
- return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, `calc(var(--spacing) * ${isNegative ? "-" : ""}${v})`]);
473
- } else {
474
- themeTracking("spacing", size);
475
- return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, isNegative ? `calc(var(--spacing-${size} * -1)` : `var(--spacing-${size})`]);
476
- }
437
+ v = numberResolver(size);
438
+ if (v != null && !Number.isNaN(v)) {
439
+ themeTracking("spacing");
440
+ return map[direction].map((i) => [formatter(property, i), `calc(var(--spacing) * ${isNegative ? "-" : ""}${v})`]);
441
+ } else if (theme.spacing && size in theme.spacing) {
442
+ themeTracking("spacing", size);
443
+ return map[direction].map((i) => [formatter(property, i), isNegative ? `calc(var(--spacing-${size}) * -1)` : `var(--spacing-${size})`]);
477
444
  }
478
445
  v = h.bracket.cssvar.global.auto.fraction.rem(isNegative ? `-${size}` : size);
479
446
  if (v != null) {
480
- return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]);
447
+ return map[direction].map((i) => [formatter(property, i), v]);
481
448
  }
482
449
  }
483
450
  };
@@ -1,5 +1,5 @@
1
1
  import { isString } from '@unocss/core';
2
- import { r as resolveBreakpoints } from './preset-wind4.B6AdPBSv.mjs';
2
+ import { r as resolveBreakpoints } from './preset-wind4.Dh6P6wnz.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.9XNkkElt.mjs';
2
- import './shared/preset-wind4.B7G_ZuoA.mjs';
1
+ export { s as shortcuts } from './shared/preset-wind4.DJR3nFnD.mjs';
2
+ import './shared/preset-wind4.Y5BADsqi.mjs';
3
3
  import '@unocss/core';
4
- import './shared/preset-wind4.B6AdPBSv.mjs';
4
+ import './shared/preset-wind4.Dh6P6wnz.mjs';
5
5
  import '@unocss/rule-utils';
package/dist/utils.d.mts CHANGED
@@ -53,11 +53,32 @@ declare const handlers_px: typeof px;
53
53
  declare const handlers_rem: typeof rem;
54
54
  declare const handlers_time: typeof time;
55
55
  declare namespace handlers {
56
- export { handlers_auto as auto, handlers_bracket as bracket, handlers_bracketOfColor as bracketOfColor, handlers_bracketOfFamily as bracketOfFamily, handlers_bracketOfLength as bracketOfLength, handlers_bracketOfNumber as bracketOfNumber, handlers_bracketOfPosition as bracketOfPosition, handlers_cssvar as cssvar, handlers_degree as degree, handlers_fraction as fraction, handlers_global as global, handlers_none as none, handlers_number as number, handlers_numberWithUnit as numberWithUnit, handlers_percent as percent, handlers_position as position, handlers_properties as properties, handlers_px as px, handlers_rem as rem, handlers_time as time };
56
+ export {
57
+ handlers_auto as auto,
58
+ handlers_bracket as bracket,
59
+ handlers_bracketOfColor as bracketOfColor,
60
+ handlers_bracketOfFamily as bracketOfFamily,
61
+ handlers_bracketOfLength as bracketOfLength,
62
+ handlers_bracketOfNumber as bracketOfNumber,
63
+ handlers_bracketOfPosition as bracketOfPosition,
64
+ handlers_cssvar as cssvar,
65
+ handlers_degree as degree,
66
+ handlers_fraction as fraction,
67
+ handlers_global as global,
68
+ handlers_none as none,
69
+ handlers_number as number,
70
+ handlers_numberWithUnit as numberWithUnit,
71
+ handlers_percent as percent,
72
+ handlers_position as position,
73
+ handlers_properties as properties,
74
+ handlers_px as px,
75
+ handlers_rem as rem,
76
+ handlers_time as time,
77
+ };
57
78
  }
58
79
 
59
- declare const handler: _unocss_rule_utils.ValueHandler<"number" | "none" | "properties" | "position" | "global" | "px" | "auto" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree">;
60
- declare const h: _unocss_rule_utils.ValueHandler<"number" | "none" | "properties" | "position" | "global" | "px" | "auto" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree">;
80
+ declare const handler: _unocss_rule_utils.ValueHandler<"number" | "none" | "numberWithUnit" | "auto" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree" | "global" | "properties" | "position">;
81
+ declare const h: _unocss_rule_utils.ValueHandler<"number" | "none" | "numberWithUnit" | "auto" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree" | "global" | "properties" | "position">;
61
82
 
62
83
  declare const directionMap: Record<string, string[]>;
63
84
  declare const insetMap: Record<string, string[]>;
@@ -87,12 +108,13 @@ declare function createRemToPxProcessor(base?: number): (utilObjectOrEntry: Util
87
108
 
88
109
  declare function numberResolver(size: string, defaultValue?: string | number): number | undefined;
89
110
  /**
90
- * Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
111
+ * Returns a {@link DynamicMatcher} that generates spacing CSS properties for directional utilities.
91
112
  *
92
- * @param propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
93
- * @see {@link directionMap}
113
+ * @param property - The base CSS property name (e.g. 'margin', 'padding').
114
+ * @param map - Optional mapping of direction keys to property postfixes. Defaults to {@link directionMap}.
115
+ * @param formatter - Optional function to format the final property name. Defaults to `(p, d) => \`\${p}\${d}\``.
94
116
  */
95
- declare function directionSize(propertyPrefix: string): DynamicMatcher<Theme>;
117
+ declare function directionSize(property: string, map?: Record<string, string[]>, formatter?: (p: string, d: string) => string): DynamicMatcher<Theme>;
96
118
  /**
97
119
  * Split utility shorthand delimited by / or :
98
120
  */
package/dist/utils.d.ts CHANGED
@@ -53,11 +53,32 @@ declare const handlers_px: typeof px;
53
53
  declare const handlers_rem: typeof rem;
54
54
  declare const handlers_time: typeof time;
55
55
  declare namespace handlers {
56
- export { handlers_auto as auto, handlers_bracket as bracket, handlers_bracketOfColor as bracketOfColor, handlers_bracketOfFamily as bracketOfFamily, handlers_bracketOfLength as bracketOfLength, handlers_bracketOfNumber as bracketOfNumber, handlers_bracketOfPosition as bracketOfPosition, handlers_cssvar as cssvar, handlers_degree as degree, handlers_fraction as fraction, handlers_global as global, handlers_none as none, handlers_number as number, handlers_numberWithUnit as numberWithUnit, handlers_percent as percent, handlers_position as position, handlers_properties as properties, handlers_px as px, handlers_rem as rem, handlers_time as time };
56
+ export {
57
+ handlers_auto as auto,
58
+ handlers_bracket as bracket,
59
+ handlers_bracketOfColor as bracketOfColor,
60
+ handlers_bracketOfFamily as bracketOfFamily,
61
+ handlers_bracketOfLength as bracketOfLength,
62
+ handlers_bracketOfNumber as bracketOfNumber,
63
+ handlers_bracketOfPosition as bracketOfPosition,
64
+ handlers_cssvar as cssvar,
65
+ handlers_degree as degree,
66
+ handlers_fraction as fraction,
67
+ handlers_global as global,
68
+ handlers_none as none,
69
+ handlers_number as number,
70
+ handlers_numberWithUnit as numberWithUnit,
71
+ handlers_percent as percent,
72
+ handlers_position as position,
73
+ handlers_properties as properties,
74
+ handlers_px as px,
75
+ handlers_rem as rem,
76
+ handlers_time as time,
77
+ };
57
78
  }
58
79
 
59
- declare const handler: _unocss_rule_utils.ValueHandler<"number" | "none" | "properties" | "position" | "global" | "px" | "auto" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree">;
60
- declare const h: _unocss_rule_utils.ValueHandler<"number" | "none" | "properties" | "position" | "global" | "px" | "auto" | "numberWithUnit" | "rem" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree">;
80
+ declare const handler: _unocss_rule_utils.ValueHandler<"number" | "none" | "numberWithUnit" | "auto" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree" | "global" | "properties" | "position">;
81
+ declare const h: _unocss_rule_utils.ValueHandler<"number" | "none" | "numberWithUnit" | "auto" | "rem" | "px" | "percent" | "fraction" | "bracket" | "bracketOfColor" | "bracketOfLength" | "bracketOfPosition" | "bracketOfFamily" | "bracketOfNumber" | "cssvar" | "time" | "degree" | "global" | "properties" | "position">;
61
82
 
62
83
  declare const directionMap: Record<string, string[]>;
63
84
  declare const insetMap: Record<string, string[]>;
@@ -87,12 +108,13 @@ declare function createRemToPxProcessor(base?: number): (utilObjectOrEntry: Util
87
108
 
88
109
  declare function numberResolver(size: string, defaultValue?: string | number): number | undefined;
89
110
  /**
90
- * Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
111
+ * Returns a {@link DynamicMatcher} that generates spacing CSS properties for directional utilities.
91
112
  *
92
- * @param propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
93
- * @see {@link directionMap}
113
+ * @param property - The base CSS property name (e.g. 'margin', 'padding').
114
+ * @param map - Optional mapping of direction keys to property postfixes. Defaults to {@link directionMap}.
115
+ * @param formatter - Optional function to format the final property name. Defaults to `(p, d) => \`\${p}\${d}\``.
94
116
  */
95
- declare function directionSize(propertyPrefix: string): DynamicMatcher<Theme>;
117
+ declare function directionSize(property: string, map?: Record<string, string[]>, formatter?: (p: string, d: string) => string): DynamicMatcher<Theme>;
96
118
  /**
97
119
  * Split utility shorthand delimited by / or :
98
120
  */
package/dist/utils.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as remRE } from './shared/preset-wind4.B6AdPBSv.mjs';
2
- export { C as CONTROL_NO_NEGATIVE, P as PRESET_NAME, S as SpecialColorKey, K as camelize, A as colorCSSGenerator, B as colorResolver, D as colorableShadows, M as compressCSS, c as cornerMap, f as cssMathFnRE, j as cssVarFnRE, H as defineProperty, m as detectThemeValue, d as directionMap, s as directionSize, l as generateThemeVariable, z as getThemeByKey, g as globalKeywords, b as h, h as handler, E as hasParseableColor, L as hyphenate, i as insetMap, I as isCSSMathFn, J as isSize, G as makeGlobalStaticRules, q as numberResolver, w as parseColor, y as parseThemeColor, p as positionMap, o as propertyTracking, r as resolveBreakpoints, F as resolveVerticalBreakpoints, u as splitShorthand, k as themeTracking, n as trackedProperties, t as trackedTheme, v as valueHandlers, e as xyzArray, x as xyzMap } from './shared/preset-wind4.B6AdPBSv.mjs';
1
+ import { a as remRE } from './shared/preset-wind4.Dh6P6wnz.mjs';
2
+ export { C as CONTROL_NO_NEGATIVE, P as PRESET_NAME, S as SpecialColorKey, K as camelize, A as colorCSSGenerator, B as colorResolver, D as colorableShadows, M as compressCSS, c as cornerMap, f as cssMathFnRE, j as cssVarFnRE, H as defineProperty, m as detectThemeValue, d as directionMap, s as directionSize, l as generateThemeVariable, z as getThemeByKey, g as globalKeywords, b as h, h as handler, E as hasParseableColor, L as hyphenate, i as insetMap, I as isCSSMathFn, J as isSize, G as makeGlobalStaticRules, q as numberResolver, w as parseColor, y as parseThemeColor, p as positionMap, o as propertyTracking, r as resolveBreakpoints, F as resolveVerticalBreakpoints, u as splitShorthand, k as themeTracking, n as trackedProperties, t as trackedTheme, v as valueHandlers, e as xyzArray, x as xyzMap } from './shared/preset-wind4.Dh6P6wnz.mjs';
3
3
  export * from '@unocss/rule-utils';
4
4
  import '@unocss/core';
5
5
 
package/dist/variants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { F as placeholderModifier, v as variantAria, b as variantBreakpoints, c as variantChildren, g as variantColorsMediaOrClass, h as variantColorsScheme, d as variantCombinators, f as variantContainerQuery, r as variantContrasts, x as variantCssLayer, q as variantCustomMedia, i as variantDataAttribute, u as variantForcedColors, D as variantImplicitGroup, m as variantImportant, y as variantInternalLayer, l as variantLanguageDirections, s as variantMotions, E as variantNegative, n as variantNoscript, t as variantOrientations, J as variantPartClasses, p as variantPrint, H as variantPseudoClassFunctions, G as variantPseudoClassesAndElements, z as variantScope, o as variantScripting, w as variantSelector, K as variantStartingStyle, C as variantStickyHover, L as variantSupports, e as variantSvgCombinators, a as variantTaggedAriaAttributes, j as variantTaggedDataAttributes, I as variantTaggedPseudoClasses, B as variantTheme, A as variantVariables, k as variants } from './shared/preset-wind4.CSYWJ8rI.mjs';
1
+ export { F as placeholderModifier, v as variantAria, b as variantBreakpoints, c as variantChildren, g as variantColorsMediaOrClass, h as variantColorsScheme, d as variantCombinators, f as variantContainerQuery, r as variantContrasts, x as variantCssLayer, q as variantCustomMedia, i as variantDataAttribute, u as variantForcedColors, D as variantImplicitGroup, m as variantImportant, y as variantInternalLayer, l as variantLanguageDirections, s as variantMotions, E as variantNegative, n as variantNoscript, t as variantOrientations, J as variantPartClasses, p as variantPrint, H as variantPseudoClassFunctions, G as variantPseudoClassesAndElements, z as variantScope, o as variantScripting, w as variantSelector, K as variantStartingStyle, C as variantStickyHover, L as variantSupports, e as variantSvgCombinators, a as variantTaggedAriaAttributes, j as variantTaggedDataAttributes, I as variantTaggedPseudoClasses, B as variantTheme, A as variantVariables, k as variants } from './shared/preset-wind4.CGl5yp9H.mjs';
2
2
  import '@unocss/rule-utils';
3
- import './shared/preset-wind4.B6AdPBSv.mjs';
3
+ import './shared/preset-wind4.Dh6P6wnz.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.3.2",
4
+ "version": "66.4.0",
5
5
  "description": "Tailwind 4 compact preset for UnoCSS",
6
6
  "authors": [
7
7
  {
@@ -18,7 +18,7 @@
18
18
  "homepage": "https://unocss.dev",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "https://github.com/unocss/unocss",
21
+ "url": "git+https://github.com/unocss/unocss.git",
22
22
  "directory": "packages-presets/preset-wind4"
23
23
  },
24
24
  "bugs": {
@@ -74,9 +74,9 @@
74
74
  "dist"
75
75
  ],
76
76
  "dependencies": {
77
- "@unocss/core": "66.3.2",
78
- "@unocss/extractor-arbitrary-variants": "66.3.2",
79
- "@unocss/rule-utils": "66.3.2"
77
+ "@unocss/core": "66.4.0",
78
+ "@unocss/rule-utils": "66.4.0",
79
+ "@unocss/extractor-arbitrary-variants": "66.4.0"
80
80
  },
81
81
  "scripts": {
82
82
  "build": "unbuild",