@unocss/preset-mini 0.36.0 → 0.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
- import { g as globalKeywords, h as handler, d as directionMap, c as cornerMap, i as insetMap } from './index.mjs';
2
- import { c as colorResolver, h as hasParseableColor, p as parseColor, a as colorToString, b as colorableShadows, r as resolveVerticalBreakpoints, d as resolveBreakpoints, e as directionSize } from './utilities.mjs';
3
- import { toArray, CONTROL_SHORTCUT_NO_MERGE } from '@unocss/core';
4
- import { a as transforms } from './transform.mjs';
1
+ import { g as globalKeywords, h as handler, c as colorResolver, d as directionMap, a as hasParseableColor, p as parseColor, b as colorToString, e as cornerMap, f as colorableShadows, i as insetMap, r as resolveVerticalBreakpoints, j as resolveBreakpoints, k as directionSize } from './utilities.mjs';
2
+ import { toArray } from '@unocss/core';
3
+ import { d as displays, c as contents, a as textOverflows, e as textTransforms, f as fontStyles, g as fontSmoothings, h as boxShadows, i as rings, j as cursors, k as appearances, p as pointerEvents, l as resizes, u as userSelects, w as whitespaces, m as breaks, n as transforms } from './transform.mjs';
5
4
 
6
5
  const verticalAlignAlias = {
7
6
  "mid": "middle",
@@ -505,146 +504,6 @@ const boxSizing = [
505
504
  ["box-content", { "box-sizing": "content-box" }]
506
505
  ];
507
506
 
508
- const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
509
- const displays = [
510
- ["inline", { display: "inline" }],
511
- ["block", { display: "block" }],
512
- ["inline-block", { display: "inline-block" }],
513
- ["contents", { display: "contents" }],
514
- ["flow-root", { display: "flow-root" }],
515
- ["list-item", { display: "list-item" }],
516
- ["hidden", { display: "none" }],
517
- [/^display-(.+)$/, ([, c]) => ({ display: handler.bracket.cssvar(c) || c })]
518
- ];
519
- const appearances = [
520
- ["visible", { visibility: "visible" }],
521
- ["invisible", { visibility: "hidden" }],
522
- ["backface-visible", { "backface-visibility": "visible" }],
523
- ["backface-hidden", { "backface-visibility": "hidden" }]
524
- ];
525
- const cursors = [
526
- [/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar(c) || c })]
527
- ];
528
- const pointerEvents = [
529
- ["pointer-events-auto", { "pointer-events": "auto" }],
530
- ["pointer-events-none", { "pointer-events": "none" }]
531
- ];
532
- const resizes = [
533
- ["resize-x", { resize: "horizontal" }],
534
- ["resize-y", { resize: "vertical" }],
535
- ["resize", { resize: "both" }],
536
- ["resize-none", { resize: "none" }]
537
- ];
538
- const userSelects = [
539
- ["select-auto", { "user-select": "auto" }],
540
- ["select-all", { "user-select": "all" }],
541
- ["select-text", { "user-select": "text" }],
542
- ["select-none", { "user-select": "none" }]
543
- ];
544
- const whitespaces = [
545
- [/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)$/, ([, v]) => ({ "white-space": v }), { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }]
546
- ];
547
- const contents = [
548
- [/^content-(.+)$/, ([, v]) => {
549
- const c = handler.bracket.cssvar(v);
550
- return { content: c == null ? `"${v}"` : c };
551
- }],
552
- ["content-empty", { content: '""' }],
553
- ["content-none", { content: '""' }]
554
- ];
555
- const breaks = [
556
- ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
557
- ["break-words", { "overflow-wrap": "break-word" }],
558
- ["break-all", { "word-break": "break-all" }]
559
- ];
560
- const textOverflows = [
561
- ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
562
- ["text-ellipsis", { "text-overflow": "ellipsis" }],
563
- ["text-clip", { "text-overflow": "clip" }]
564
- ];
565
- const textTransforms = [
566
- ["case-upper", { "text-transform": "uppercase" }],
567
- ["case-lower", { "text-transform": "lowercase" }],
568
- ["case-capital", { "text-transform": "capitalize" }],
569
- ["case-normal", { "text-transform": "none" }]
570
- ];
571
- const fontStyles = [
572
- ["italic", { "font-style": "italic" }],
573
- ["not-italic", { "font-style": "normal" }],
574
- ["font-italic", { "font-style": "italic" }],
575
- ["font-not-italic", { "font-style": "normal" }],
576
- ["oblique", { "font-style": "oblique" }],
577
- ["not-oblique", { "font-style": "normal" }],
578
- ["font-oblique", { "font-style": "oblique" }],
579
- ["font-not-oblique", { "font-style": "normal" }]
580
- ];
581
- const fontSmoothings = [
582
- ["antialiased", {
583
- "-webkit-font-smoothing": "antialiased",
584
- "-moz-osx-font-smoothing": "grayscale",
585
- "font-smoothing": "grayscale"
586
- }],
587
- ["subpixel-antialiased", {
588
- "-webkit-font-smoothing": "auto",
589
- "-moz-osx-font-smoothing": "auto",
590
- "font-smoothing": "auto"
591
- }]
592
- ];
593
-
594
- const rings = [
595
- [/^ring(?:-(.+))?$/, ([, d], { theme }) => {
596
- const value = theme.ringWidth?.[d || "DEFAULT"] ?? handler.px(d || "1");
597
- if (value) {
598
- return [
599
- {
600
- [CONTROL_SHORTCUT_NO_MERGE]: "",
601
- "--un-ring-inset": varEmpty,
602
- "--un-ring-offset-width": "0px",
603
- "--un-ring-offset-color": "#fff",
604
- "--un-ring-width": "0px",
605
- "--un-ring-color": "rgba(147,197,253,0.5)"
606
- },
607
- {
608
- "--un-ring-width": value,
609
- "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
610
- "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
611
- "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
612
- }
613
- ];
614
- }
615
- }, { autocomplete: "ring-$ringWidth" }],
616
- [/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
617
- ["ring-offset", { "--un-ring-offset-width": "1px" }],
618
- [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
619
- [/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
620
- [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
621
- [/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
622
- [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
623
- ["ring-inset", { "--un-ring-inset": "inset" }]
624
- ];
625
-
626
- const boxShadows = [
627
- [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
628
- const v = theme.boxShadow?.[d || "DEFAULT"];
629
- if (v) {
630
- return [
631
- {
632
- [CONTROL_SHORTCUT_NO_MERGE]: "",
633
- "--un-shadow-inset": varEmpty,
634
- "--un-shadow": "0 0 #0000"
635
- },
636
- {
637
- "--un-shadow": colorableShadows(v, "--un-shadow-color").join(","),
638
- "box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
639
- }
640
- ];
641
- }
642
- }, { autocomplete: "shadow-$boxShadow" }],
643
- [/^shadow-(.+)$/, colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
644
- [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
645
- ["shadow-inset", { "--un-shadow-inset": "inset" }]
646
- ];
647
-
648
507
  const sizeMapping = {
649
508
  h: "height",
650
509
  w: "width",
@@ -858,4 +717,4 @@ const rules = [
858
717
  questionMark
859
718
  ].flat(1);
860
719
 
861
- export { textDecorations as $, sizes as A, aspectRatio as B, paddings as C, margins as D, varEmpty as E, displays as F, appearances as G, cursors as H, pointerEvents as I, resizes as J, userSelects as K, whitespaces as L, contents as M, breaks as N, textOverflows as O, textTransforms as P, fontStyles as Q, fontSmoothings as R, svgUtilities as S, transitions as T, fonts as U, tabSizes as V, textIndents as W, textStrokes as X, textShadows as Y, cssVariables as Z, cssProperty as _, appearance as a, borders as b, opacity as c, textColors as d, bgColors as e, flex as f, gaps as g, grids as h, overflows as i, justifies as j, orders as k, alignments as l, placements as m, insets as n, outline as o, positions as p, floats as q, rules as r, boxSizing as s, textAligns as t, questionMark as u, verticalAligns as v, willChange as w, rings as x, boxShadows as y, zIndexes as z };
720
+ export { paddings as A, margins as B, svgUtilities as C, transitions as D, fonts as E, tabSizes as F, textIndents as G, textStrokes as H, textShadows as I, cssVariables as J, cssProperty as K, textDecorations as L, appearance as a, borders as b, opacity as c, textColors as d, bgColors as e, flex as f, gaps as g, grids as h, overflows as i, justifies as j, orders as k, alignments as l, placements as m, insets as n, outline as o, positions as p, floats as q, rules as r, boxSizing as s, textAligns as t, questionMark as u, verticalAligns as v, willChange as w, sizes as x, aspectRatio as y, zIndexes as z };
@@ -1,4 +1,4 @@
1
- import { d as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE } from './utilities.mjs';
1
+ import { j as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE } from './utilities.mjs';
2
2
  import { v as variantParentMatcher, a as variantMatcher } from './variants.mjs';
3
3
  import { escapeRegExp } from '@unocss/core';
4
4
 
@@ -1,6 +1,143 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index.cjs');
3
+ const utilities = require('./utilities.cjs');
4
+
5
+ const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
6
+ const displays = [
7
+ ["inline", { display: "inline" }],
8
+ ["block", { display: "block" }],
9
+ ["inline-block", { display: "inline-block" }],
10
+ ["contents", { display: "contents" }],
11
+ ["flow-root", { display: "flow-root" }],
12
+ ["list-item", { display: "list-item" }],
13
+ ["hidden", { display: "none" }],
14
+ [/^display-(.+)$/, ([, c]) => ({ display: utilities.handler.bracket.cssvar(c) || c })]
15
+ ];
16
+ const appearances = [
17
+ ["visible", { visibility: "visible" }],
18
+ ["invisible", { visibility: "hidden" }],
19
+ ["backface-visible", { "backface-visibility": "visible" }],
20
+ ["backface-hidden", { "backface-visibility": "hidden" }]
21
+ ];
22
+ const cursors = [
23
+ [/^cursor-(.+)$/, ([, c]) => ({ cursor: utilities.handler.bracket.cssvar(c) || c })]
24
+ ];
25
+ const pointerEvents = [
26
+ ["pointer-events-auto", { "pointer-events": "auto" }],
27
+ ["pointer-events-none", { "pointer-events": "none" }]
28
+ ];
29
+ const resizes = [
30
+ ["resize-x", { resize: "horizontal" }],
31
+ ["resize-y", { resize: "vertical" }],
32
+ ["resize", { resize: "both" }],
33
+ ["resize-none", { resize: "none" }]
34
+ ];
35
+ const userSelects = [
36
+ ["select-auto", { "user-select": "auto" }],
37
+ ["select-all", { "user-select": "all" }],
38
+ ["select-text", { "user-select": "text" }],
39
+ ["select-none", { "user-select": "none" }]
40
+ ];
41
+ const whitespaces = [
42
+ [/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)$/, ([, v]) => ({ "white-space": v }), { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }]
43
+ ];
44
+ const contents = [
45
+ [/^content-(.+)$/, ([, v]) => {
46
+ const c = utilities.handler.bracket.cssvar(v);
47
+ return { content: c == null ? `"${v}"` : c };
48
+ }],
49
+ ["content-empty", { content: '""' }],
50
+ ["content-none", { content: '""' }]
51
+ ];
52
+ const breaks = [
53
+ ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
54
+ ["break-words", { "overflow-wrap": "break-word" }],
55
+ ["break-all", { "word-break": "break-all" }]
56
+ ];
57
+ const textOverflows = [
58
+ ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
59
+ ["text-ellipsis", { "text-overflow": "ellipsis" }],
60
+ ["text-clip", { "text-overflow": "clip" }]
61
+ ];
62
+ const textTransforms = [
63
+ ["case-upper", { "text-transform": "uppercase" }],
64
+ ["case-lower", { "text-transform": "lowercase" }],
65
+ ["case-capital", { "text-transform": "capitalize" }],
66
+ ["case-normal", { "text-transform": "none" }]
67
+ ];
68
+ const fontStyles = [
69
+ ["italic", { "font-style": "italic" }],
70
+ ["not-italic", { "font-style": "normal" }],
71
+ ["font-italic", { "font-style": "italic" }],
72
+ ["font-not-italic", { "font-style": "normal" }],
73
+ ["oblique", { "font-style": "oblique" }],
74
+ ["not-oblique", { "font-style": "normal" }],
75
+ ["font-oblique", { "font-style": "oblique" }],
76
+ ["font-not-oblique", { "font-style": "normal" }]
77
+ ];
78
+ const fontSmoothings = [
79
+ ["antialiased", {
80
+ "-webkit-font-smoothing": "antialiased",
81
+ "-moz-osx-font-smoothing": "grayscale",
82
+ "font-smoothing": "grayscale"
83
+ }],
84
+ ["subpixel-antialiased", {
85
+ "-webkit-font-smoothing": "auto",
86
+ "-moz-osx-font-smoothing": "auto",
87
+ "font-smoothing": "auto"
88
+ }]
89
+ ];
90
+
91
+ const ringBase = {
92
+ "--un-ring-inset": varEmpty,
93
+ "--un-ring-offset-width": "0px",
94
+ "--un-ring-offset-color": "#fff",
95
+ "--un-ring-width": "0px",
96
+ "--un-ring-color": "rgba(147,197,253,0.5)",
97
+ "--un-shadow": "0 0 #0000"
98
+ };
99
+ const rings = [
100
+ [/^ring(?:-(.+))?$/, ([, d], { theme }) => {
101
+ const value = theme.ringWidth?.[d || "DEFAULT"] ?? utilities.handler.px(d || "1");
102
+ if (value) {
103
+ return {
104
+ "--un-ring-width": value,
105
+ "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
106
+ "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
107
+ "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
108
+ };
109
+ }
110
+ }, { autocomplete: "ring-$ringWidth" }],
111
+ [/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
112
+ ["ring-offset", { "--un-ring-offset-width": "1px" }],
113
+ [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
114
+ [/^ring-(.+)$/, utilities.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
115
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
116
+ [/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
117
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
118
+ ["ring-inset", { "--un-ring-inset": "inset" }]
119
+ ];
120
+
121
+ const boxShadowsBase = {
122
+ "--un-ring-offset-shadow": "0 0 #0000",
123
+ "--un-ring-shadow": "0 0 #0000",
124
+ "--un-shadow-inset": varEmpty,
125
+ "--un-shadow": "0 0 #0000"
126
+ };
127
+ const boxShadows = [
128
+ [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
129
+ const v = theme.boxShadow?.[d || "DEFAULT"];
130
+ if (v) {
131
+ return {
132
+ "--un-shadow": utilities.colorableShadows(v, "--un-shadow-color").join(","),
133
+ "box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
134
+ };
135
+ }
136
+ }, { autocomplete: "shadow-$boxShadow" }],
137
+ [/^shadow-(.+)$/, utilities.colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
138
+ [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
139
+ ["shadow-inset", { "--un-shadow-inset": "inset" }]
140
+ ];
4
141
 
5
142
  const transformCpu = [
6
143
  "translateX(var(--un-translate-x))",
@@ -44,9 +181,9 @@ const transformBase = {
44
181
  "--un-transform": transformCpu
45
182
  };
46
183
  const transforms = [
47
- [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": index.positionMap[s] ?? index.handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(index.positionMap).join("|")})`, `origin-(${Object.keys(index.positionMap).join("|")})`] }],
184
+ [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": utilities.positionMap[s] ?? utilities.handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(utilities.positionMap).join("|")})`, `origin-(${Object.keys(utilities.positionMap).join("|")})`] }],
48
185
  [/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
49
- const v = index.handler.bracket.cssvar.px.numberWithUnit(s);
186
+ const v = utilities.handler.bracket.cssvar.px.numberWithUnit(s);
50
187
  if (v != null) {
51
188
  return {
52
189
  "-webkit-perspective": v,
@@ -55,7 +192,7 @@ const transforms = [
55
192
  }
56
193
  }],
57
194
  [/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
58
- const v = index.handler.bracket.cssvar(s) ?? (s.length >= 3 ? index.positionMap[s] : void 0);
195
+ const v = utilities.handler.bracket.cssvar(s) ?? (s.length >= 3 ? utilities.positionMap[s] : void 0);
59
196
  if (v != null) {
60
197
  return {
61
198
  "-webkit-perspective-origin": v,
@@ -78,25 +215,25 @@ const transforms = [
78
215
  ["transform-none", { transform: "none" }]
79
216
  ];
80
217
  function handleTranslate([, d, b], { theme }) {
81
- const v = theme.spacing?.[b] ?? index.handler.bracket.cssvar.fraction.rem(b);
218
+ const v = theme.spacing?.[b] ?? utilities.handler.bracket.cssvar.fraction.rem(b);
82
219
  if (v != null) {
83
220
  return [
84
- ...index.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
221
+ ...utilities.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
85
222
  ["transform", "var(--un-transform)"]
86
223
  ];
87
224
  }
88
225
  }
89
226
  function handleScale([, d, b]) {
90
- const v = index.handler.bracket.cssvar.fraction.percent(b);
227
+ const v = utilities.handler.bracket.cssvar.fraction.percent(b);
91
228
  if (v != null) {
92
229
  return [
93
- ...index.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
230
+ ...utilities.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
94
231
  ["transform", "var(--un-transform)"]
95
232
  ];
96
233
  }
97
234
  }
98
235
  function handleRotate([, d = "", b]) {
99
- const v = index.handler.bracket.cssvar.degree(b);
236
+ const v = utilities.handler.bracket.cssvar.degree(b);
100
237
  if (v != null) {
101
238
  if (d) {
102
239
  return {
@@ -116,7 +253,7 @@ function handleRotate([, d = "", b]) {
116
253
  }
117
254
  }
118
255
  function handleSkew([, d, b]) {
119
- const v = index.handler.bracket.cssvar.degree(b);
256
+ const v = utilities.handler.bracket.cssvar.degree(b);
120
257
  if (v != null) {
121
258
  return {
122
259
  [`--un-skew-${d}`]: v,
@@ -125,5 +262,23 @@ function handleSkew([, d, b]) {
125
262
  }
126
263
  }
127
264
 
265
+ exports.appearances = appearances;
266
+ exports.boxShadows = boxShadows;
267
+ exports.boxShadowsBase = boxShadowsBase;
268
+ exports.breaks = breaks;
269
+ exports.contents = contents;
270
+ exports.cursors = cursors;
271
+ exports.displays = displays;
272
+ exports.fontSmoothings = fontSmoothings;
273
+ exports.fontStyles = fontStyles;
274
+ exports.pointerEvents = pointerEvents;
275
+ exports.resizes = resizes;
276
+ exports.ringBase = ringBase;
277
+ exports.rings = rings;
278
+ exports.textOverflows = textOverflows;
279
+ exports.textTransforms = textTransforms;
128
280
  exports.transformBase = transformBase;
129
281
  exports.transforms = transforms;
282
+ exports.userSelects = userSelects;
283
+ exports.varEmpty = varEmpty;
284
+ exports.whitespaces = whitespaces;
@@ -1,4 +1,141 @@
1
- import { p as positionMap, h as handler, x as xyzMap } from './index.mjs';
1
+ import { h as handler, c as colorResolver, f as colorableShadows, l as positionMap, x as xyzMap } from './utilities.mjs';
2
+
3
+ const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
4
+ const displays = [
5
+ ["inline", { display: "inline" }],
6
+ ["block", { display: "block" }],
7
+ ["inline-block", { display: "inline-block" }],
8
+ ["contents", { display: "contents" }],
9
+ ["flow-root", { display: "flow-root" }],
10
+ ["list-item", { display: "list-item" }],
11
+ ["hidden", { display: "none" }],
12
+ [/^display-(.+)$/, ([, c]) => ({ display: handler.bracket.cssvar(c) || c })]
13
+ ];
14
+ const appearances = [
15
+ ["visible", { visibility: "visible" }],
16
+ ["invisible", { visibility: "hidden" }],
17
+ ["backface-visible", { "backface-visibility": "visible" }],
18
+ ["backface-hidden", { "backface-visibility": "hidden" }]
19
+ ];
20
+ const cursors = [
21
+ [/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar(c) || c })]
22
+ ];
23
+ const pointerEvents = [
24
+ ["pointer-events-auto", { "pointer-events": "auto" }],
25
+ ["pointer-events-none", { "pointer-events": "none" }]
26
+ ];
27
+ const resizes = [
28
+ ["resize-x", { resize: "horizontal" }],
29
+ ["resize-y", { resize: "vertical" }],
30
+ ["resize", { resize: "both" }],
31
+ ["resize-none", { resize: "none" }]
32
+ ];
33
+ const userSelects = [
34
+ ["select-auto", { "user-select": "auto" }],
35
+ ["select-all", { "user-select": "all" }],
36
+ ["select-text", { "user-select": "text" }],
37
+ ["select-none", { "user-select": "none" }]
38
+ ];
39
+ const whitespaces = [
40
+ [/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)$/, ([, v]) => ({ "white-space": v }), { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }]
41
+ ];
42
+ const contents = [
43
+ [/^content-(.+)$/, ([, v]) => {
44
+ const c = handler.bracket.cssvar(v);
45
+ return { content: c == null ? `"${v}"` : c };
46
+ }],
47
+ ["content-empty", { content: '""' }],
48
+ ["content-none", { content: '""' }]
49
+ ];
50
+ const breaks = [
51
+ ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
52
+ ["break-words", { "overflow-wrap": "break-word" }],
53
+ ["break-all", { "word-break": "break-all" }]
54
+ ];
55
+ const textOverflows = [
56
+ ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
57
+ ["text-ellipsis", { "text-overflow": "ellipsis" }],
58
+ ["text-clip", { "text-overflow": "clip" }]
59
+ ];
60
+ const textTransforms = [
61
+ ["case-upper", { "text-transform": "uppercase" }],
62
+ ["case-lower", { "text-transform": "lowercase" }],
63
+ ["case-capital", { "text-transform": "capitalize" }],
64
+ ["case-normal", { "text-transform": "none" }]
65
+ ];
66
+ const fontStyles = [
67
+ ["italic", { "font-style": "italic" }],
68
+ ["not-italic", { "font-style": "normal" }],
69
+ ["font-italic", { "font-style": "italic" }],
70
+ ["font-not-italic", { "font-style": "normal" }],
71
+ ["oblique", { "font-style": "oblique" }],
72
+ ["not-oblique", { "font-style": "normal" }],
73
+ ["font-oblique", { "font-style": "oblique" }],
74
+ ["font-not-oblique", { "font-style": "normal" }]
75
+ ];
76
+ const fontSmoothings = [
77
+ ["antialiased", {
78
+ "-webkit-font-smoothing": "antialiased",
79
+ "-moz-osx-font-smoothing": "grayscale",
80
+ "font-smoothing": "grayscale"
81
+ }],
82
+ ["subpixel-antialiased", {
83
+ "-webkit-font-smoothing": "auto",
84
+ "-moz-osx-font-smoothing": "auto",
85
+ "font-smoothing": "auto"
86
+ }]
87
+ ];
88
+
89
+ const ringBase = {
90
+ "--un-ring-inset": varEmpty,
91
+ "--un-ring-offset-width": "0px",
92
+ "--un-ring-offset-color": "#fff",
93
+ "--un-ring-width": "0px",
94
+ "--un-ring-color": "rgba(147,197,253,0.5)",
95
+ "--un-shadow": "0 0 #0000"
96
+ };
97
+ const rings = [
98
+ [/^ring(?:-(.+))?$/, ([, d], { theme }) => {
99
+ const value = theme.ringWidth?.[d || "DEFAULT"] ?? handler.px(d || "1");
100
+ if (value) {
101
+ return {
102
+ "--un-ring-width": value,
103
+ "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
104
+ "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
105
+ "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
106
+ };
107
+ }
108
+ }, { autocomplete: "ring-$ringWidth" }],
109
+ [/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
110
+ ["ring-offset", { "--un-ring-offset-width": "1px" }],
111
+ [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
112
+ [/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
113
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
114
+ [/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
115
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
116
+ ["ring-inset", { "--un-ring-inset": "inset" }]
117
+ ];
118
+
119
+ const boxShadowsBase = {
120
+ "--un-ring-offset-shadow": "0 0 #0000",
121
+ "--un-ring-shadow": "0 0 #0000",
122
+ "--un-shadow-inset": varEmpty,
123
+ "--un-shadow": "0 0 #0000"
124
+ };
125
+ const boxShadows = [
126
+ [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
127
+ const v = theme.boxShadow?.[d || "DEFAULT"];
128
+ if (v) {
129
+ return {
130
+ "--un-shadow": colorableShadows(v, "--un-shadow-color").join(","),
131
+ "box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
132
+ };
133
+ }
134
+ }, { autocomplete: "shadow-$boxShadow" }],
135
+ [/^shadow-(.+)$/, colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
136
+ [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
137
+ ["shadow-inset", { "--un-shadow-inset": "inset" }]
138
+ ];
2
139
 
3
140
  const transformCpu = [
4
141
  "translateX(var(--un-translate-x))",
@@ -123,4 +260,4 @@ function handleSkew([, d, b]) {
123
260
  }
124
261
  }
125
262
 
126
- export { transforms as a, transformBase as t };
263
+ export { textOverflows as a, boxShadowsBase as b, contents as c, displays as d, textTransforms as e, fontStyles as f, fontSmoothings as g, boxShadows as h, rings as i, cursors as j, appearances as k, resizes as l, breaks as m, transforms as n, pointerEvents as p, ringBase as r, transformBase as t, userSelects as u, varEmpty as v, whitespaces as w };