@unocss/preset-mini 0.44.7 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const colors = require('./colors2.cjs');
4
- const variants$1 = require('./variants.cjs');
3
+ const colors = require('./colors.cjs');
5
4
  const core = require('@unocss/core');
5
+ const variants$1 = require('./variants.cjs');
6
6
 
7
7
  const regexCache = {};
8
8
  const calcMaxWidthBySize = (size) => {
@@ -1,6 +1,6 @@
1
- import { k as resolveBreakpoints, o as getComponent, h as handler, C as CONTROL_MINI_NO_NEGATIVE } from './colors2.mjs';
2
- import { v as variantParentMatcher, a as variantMatcher } from './variants.mjs';
1
+ import { l as resolveBreakpoints, q as getComponent, h as handler, C as CONTROL_MINI_NO_NEGATIVE } from './colors.mjs';
3
2
  import { escapeRegExp } from '@unocss/core';
3
+ import { v as variantParentMatcher, a as variantMatcher } from './variants.mjs';
4
4
 
5
5
  const regexCache = {};
6
6
  const calcMaxWidthBySize = (size) => {
package/dist/colors.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const colors = require('./chunks/colors.cjs');
5
+ const colors = require('./chunks/colors2.cjs');
6
6
 
7
7
 
8
8
 
package/dist/colors.mjs CHANGED
@@ -1 +1 @@
1
- export { c as colors } from './chunks/colors.mjs';
1
+ export { c as colors } from './chunks/colors2.mjs';
package/dist/index.cjs CHANGED
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
- const _default = require('./chunks/default.cjs');
7
- const _default$1 = require('./chunks/default2.cjs');
6
+ require('./chunks/decoration.cjs');
7
+ const colors$1 = require('./chunks/colors.cjs');
8
+ const _default$1 = require('./chunks/default.cjs');
9
+ const colors = require('./chunks/colors2.cjs');
10
+ const _default = require('./chunks/default2.cjs');
8
11
  const _default$2 = require('./chunks/default3.cjs');
9
- const colors = require('./chunks/colors.cjs');
10
- const colors$1 = require('./chunks/colors2.cjs');
11
- require('./chunks/transform.cjs');
12
12
  require('./chunks/variants.cjs');
13
13
 
14
14
  const preflights = [
@@ -47,9 +47,9 @@ function VarPrefixPostprocessor(prefix) {
47
47
  };
48
48
  }
49
49
 
50
- exports.theme = _default.theme;
51
- exports.colors = colors.colors;
52
50
  exports.parseColor = colors$1.parseColor;
51
+ exports.colors = colors.colors;
52
+ exports.theme = _default.theme;
53
53
  exports["default"] = presetMini;
54
54
  exports.preflights = preflights;
55
55
  exports.presetMini = presetMini;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Preflight, PresetOptions, Preset } from '@unocss/core';
2
+ export { c as colors } from './colors-f2b5968c.js';
3
+ export { t as theme } from './default-0fe8c7f8.js';
2
4
  import { T as Theme } from './types-9e30040a.js';
3
5
  export { T as Theme, a as ThemeAnimation } from './types-9e30040a.js';
4
- export { t as theme } from './default-0fe8c7f8.js';
5
- export { c as colors } from './colors-f2b5968c.js';
6
6
  export { p as parseColor } from './utilities-00da4436.js';
7
7
 
8
8
  declare const preflights: Preflight[];
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { entriesToCss } from '@unocss/core';
2
- import { t as theme } from './chunks/default.mjs';
3
- export { t as theme } from './chunks/default.mjs';
4
- import { r as rules } from './chunks/default2.mjs';
2
+ import './chunks/decoration.mjs';
3
+ export { p as parseColor } from './chunks/colors.mjs';
4
+ import { r as rules } from './chunks/default.mjs';
5
+ export { c as colors } from './chunks/colors2.mjs';
6
+ import { t as theme } from './chunks/default2.mjs';
7
+ export { t as theme } from './chunks/default2.mjs';
5
8
  import { v as variants } from './chunks/default3.mjs';
6
- export { c as colors } from './chunks/colors.mjs';
7
- export { p as parseColor } from './chunks/colors2.mjs';
8
- import './chunks/transform.mjs';
9
9
  import './chunks/variants.mjs';
10
10
 
11
11
  const preflights = [
package/dist/rules.cjs CHANGED
@@ -2,70 +2,70 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const _default = require('./chunks/default2.cjs');
6
- const transform = require('./chunks/transform.cjs');
7
- require('./chunks/colors2.cjs');
5
+ const decoration = require('./chunks/decoration.cjs');
6
+ const _default = require('./chunks/default.cjs');
7
+ require('./chunks/colors.cjs');
8
8
  require('@unocss/core');
9
9
 
10
10
 
11
11
 
12
- exports.alignments = _default.alignments;
13
- exports.appearance = _default.appearance;
12
+ exports.alignments = decoration.alignments;
13
+ exports.appearance = decoration.appearance;
14
+ exports.appearances = decoration.appearances;
15
+ exports.borderStyles = decoration.borderStyles;
16
+ exports.borders = decoration.borders;
17
+ exports.boxShadows = decoration.boxShadows;
18
+ exports.boxShadowsBase = decoration.boxShadowsBase;
19
+ exports.boxSizing = decoration.boxSizing;
20
+ exports.breaks = decoration.breaks;
21
+ exports.contents = decoration.contents;
22
+ exports.cursors = decoration.cursors;
23
+ exports.displays = decoration.displays;
24
+ exports.floats = decoration.floats;
25
+ exports.fontSmoothings = decoration.fontSmoothings;
26
+ exports.fontStyles = decoration.fontStyles;
27
+ exports.fonts = decoration.fonts;
28
+ exports.handlerBorderStyle = decoration.handlerBorderStyle;
29
+ exports.insets = decoration.insets;
30
+ exports.justifies = decoration.justifies;
31
+ exports.orders = decoration.orders;
32
+ exports.outline = decoration.outline;
33
+ exports.overflows = decoration.overflows;
34
+ exports.placements = decoration.placements;
35
+ exports.pointerEvents = decoration.pointerEvents;
36
+ exports.positions = decoration.positions;
37
+ exports.resizes = decoration.resizes;
38
+ exports.ringBase = decoration.ringBase;
39
+ exports.rings = decoration.rings;
40
+ exports.tabSizes = decoration.tabSizes;
41
+ exports.textAligns = decoration.textAligns;
42
+ exports.textDecorations = decoration.textDecorations;
43
+ exports.textIndents = decoration.textIndents;
44
+ exports.textOverflows = decoration.textOverflows;
45
+ exports.textShadows = decoration.textShadows;
46
+ exports.textStrokes = decoration.textStrokes;
47
+ exports.textTransforms = decoration.textTransforms;
48
+ exports.transformBase = decoration.transformBase;
49
+ exports.transforms = decoration.transforms;
50
+ exports.transitions = decoration.transitions;
51
+ exports.userSelects = decoration.userSelects;
52
+ exports.varEmpty = decoration.varEmpty;
53
+ exports.verticalAligns = decoration.verticalAligns;
54
+ exports.whitespaces = decoration.whitespaces;
55
+ exports.willChange = decoration.willChange;
56
+ exports.zIndexes = decoration.zIndexes;
14
57
  exports.aspectRatio = _default.aspectRatio;
15
58
  exports.bgColors = _default.bgColors;
16
- exports.borderStyles = _default.borderStyles;
17
- exports.borders = _default.borders;
18
- exports.boxSizing = _default.boxSizing;
19
59
  exports.cssProperty = _default.cssProperty;
20
60
  exports.cssVariables = _default.cssVariables;
21
61
  exports.flex = _default.flex;
22
- exports.floats = _default.floats;
23
- exports.fonts = _default.fonts;
24
62
  exports.gaps = _default.gaps;
25
63
  exports.grids = _default.grids;
26
- exports.handlerBorderStyle = _default.handlerBorderStyle;
27
- exports.insets = _default.insets;
28
- exports.justifies = _default.justifies;
29
64
  exports.margins = _default.margins;
30
65
  exports.opacity = _default.opacity;
31
- exports.orders = _default.orders;
32
- exports.outline = _default.outline;
33
- exports.overflows = _default.overflows;
34
66
  exports.paddings = _default.paddings;
35
- exports.placements = _default.placements;
36
- exports.positions = _default.positions;
37
67
  exports.questionMark = _default.questionMark;
38
68
  exports.rules = _default.rules;
39
69
  exports.sizes = _default.sizes;
40
70
  exports.svgUtilities = _default.svgUtilities;
41
- exports.tabSizes = _default.tabSizes;
42
- exports.textAligns = _default.textAligns;
43
71
  exports.textColors = _default.textColors;
44
- exports.textDecorations = _default.textDecorations;
45
- exports.textIndents = _default.textIndents;
46
- exports.textShadows = _default.textShadows;
47
- exports.textStrokes = _default.textStrokes;
48
- exports.transitions = _default.transitions;
49
- exports.verticalAligns = _default.verticalAligns;
50
- exports.willChange = _default.willChange;
51
- exports.zIndexes = _default.zIndexes;
52
- exports.appearances = transform.appearances;
53
- exports.boxShadows = transform.boxShadows;
54
- exports.boxShadowsBase = transform.boxShadowsBase;
55
- exports.breaks = transform.breaks;
56
- exports.contents = transform.contents;
57
- exports.cursors = transform.cursors;
58
- exports.displays = transform.displays;
59
- exports.fontSmoothings = transform.fontSmoothings;
60
- exports.fontStyles = transform.fontStyles;
61
- exports.pointerEvents = transform.pointerEvents;
62
- exports.resizes = transform.resizes;
63
- exports.ringBase = transform.ringBase;
64
- exports.rings = transform.rings;
65
- exports.textOverflows = transform.textOverflows;
66
- exports.textTransforms = transform.textTransforms;
67
- exports.transformBase = transform.transformBase;
68
- exports.transforms = transform.transforms;
69
- exports.userSelects = transform.userSelects;
70
- exports.varEmpty = transform.varEmpty;
71
- exports.whitespaces = transform.whitespaces;
package/dist/rules.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { n as alignments, a as appearance, B as aspectRatio, f as bgColors, b as borderStyles, c as borders, x as boxSizing, M as cssProperty, L as cssVariables, g as flex, u as floats, G as fonts, i as gaps, j as grids, h as handlerBorderStyle, s as insets, l as justifies, D as margins, d as opacity, m as orders, o as outline, k as overflows, C as paddings, q as placements, p as positions, y as questionMark, r as rules, A as sizes, E as svgUtilities, H as tabSizes, t as textAligns, e as textColors, N as textDecorations, I as textIndents, K as textShadows, J as textStrokes, F as transitions, v as verticalAligns, w as willChange, z as zIndexes } from './chunks/default2.mjs';
2
- export { k as appearances, h as boxShadows, b as boxShadowsBase, m as breaks, c as contents, j as cursors, d as displays, g as fontSmoothings, f as fontStyles, p as pointerEvents, l as resizes, r as ringBase, i as rings, a as textOverflows, e as textTransforms, t as transformBase, n as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './chunks/transform.mjs';
3
- import './chunks/colors2.mjs';
1
+ export { E as alignments, B as appearance, q as appearances, Q as borderStyles, b as borders, n as boxShadows, O as boxShadowsBase, J as boxSizing, y as breaks, c as contents, o as cursors, d as displays, H as floats, m as fontSmoothings, l as fontStyles, f as fonts, R as handlerBorderStyle, G as insets, D as justifies, C as orders, A as outline, z as overflows, F as placements, s as pointerEvents, p as positions, u as resizes, P as ringBase, r as rings, t as tabSizes, k as textAligns, g as textDecorations, a as textIndents, e as textOverflows, i as textShadows, h as textStrokes, j as textTransforms, N as transformBase, L as transforms, K as transitions, w as userSelects, S as varEmpty, v as verticalAligns, x as whitespaces, M as willChange, I as zIndexes } from './chunks/decoration.mjs';
2
+ export { c as aspectRatio, b as bgColors, h as cssProperty, e as cssVariables, f as flex, g as gaps, a as grids, m as margins, o as opacity, p as paddings, q as questionMark, r as rules, s as sizes, d as svgUtilities, t as textColors } from './chunks/default.mjs';
3
+ import './chunks/colors.mjs';
4
4
  import '@unocss/core';
package/dist/theme.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const colors = require('./chunks/colors.cjs');
6
- const _default = require('./chunks/default.cjs');
7
- require('./chunks/transform.cjs');
8
- require('./chunks/colors2.cjs');
5
+ const colors = require('./chunks/colors2.cjs');
6
+ const _default = require('./chunks/default2.cjs');
7
+ require('./chunks/decoration.cjs');
8
+ require('./chunks/colors.cjs');
9
9
  require('@unocss/core');
10
10
 
11
11
 
package/dist/theme.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { c as colors } from './chunks/colors.mjs';
2
- export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, z as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './chunks/default.mjs';
3
- import './chunks/transform.mjs';
4
- import './chunks/colors2.mjs';
1
+ export { c as colors } from './chunks/colors2.mjs';
2
+ export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, z as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './chunks/default2.mjs';
3
+ import './chunks/decoration.mjs';
4
+ import './chunks/colors.mjs';
5
5
  import '@unocss/core';
package/dist/utils.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const colors = require('./chunks/colors2.cjs');
5
+ const colors = require('./chunks/colors.cjs');
6
6
  const variants = require('./chunks/variants.cjs');
7
7
  require('@unocss/core');
8
8
 
package/dist/utils.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { C as CONTROL_MINI_NO_NEGATIVE, e as colorOpacityToString, c as colorResolver, b as colorToString, i as colorableShadows, f as cornerMap, d as directionMap, l as directionSize, o as getComponent, w as getComponents, g as globalKeywords, u as h, h as handler, a as hasParseableColor, s as hex2rgba, j as insetMap, m as makeGlobalStaticRules, p as parseColor, t as parseCssColor, q as positionMap, k as resolveBreakpoints, r as resolveVerticalBreakpoints, v as valueHandlers, x as xyzMap } from './chunks/colors2.mjs';
1
+ export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, i as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getComponent, w as getComponents, g as globalKeywords, u as h, h as handler, a as hasParseableColor, s as hex2rgba, j as insetMap, m as makeGlobalStaticRules, p as parseColor, t as parseCssColor, k as positionMap, l as resolveBreakpoints, r as resolveVerticalBreakpoints, v as valueHandlers, x as xyzMap } from './chunks/colors.mjs';
2
2
  export { a as variantMatcher, v as variantParentMatcher } from './chunks/variants.mjs';
3
3
  import '@unocss/core';
package/dist/variants.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const _default = require('./chunks/default3.cjs');
6
- require('./chunks/colors2.cjs');
6
+ require('./chunks/colors.cjs');
7
7
  require('@unocss/core');
8
8
  require('./chunks/variants.cjs');
9
9
 
@@ -1,8 +1,8 @@
1
1
  import { Variant, VariantObject } from '@unocss/core';
2
2
  import { T as Theme } from './types-9e30040a.js';
3
3
  import { PresetMiniOptions } from './index.js';
4
- import './default-0fe8c7f8.js';
5
4
  import './colors-f2b5968c.js';
5
+ import './default-0fe8c7f8.js';
6
6
  import './utilities-00da4436.js';
7
7
 
8
8
  declare const variantBreakpoints: Variant<Theme>;
package/dist/variants.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  export { p as partClasses, a as variantBreakpoints, e as variantColorsMediaOrClass, b as variantCombinators, h as variantCssLayer, d as variantCustomMedia, o as variantImportant, i as variantInternalLayer, f as variantLanguageDirections, q as variantNegative, c as variantPrint, m as variantPseudoClassFunctions, l as variantPseudoClassesAndElements, j as variantScope, g as variantSelector, n as variantTaggedPseudoClasses, k as variantVariables, v as variants } from './chunks/default3.mjs';
2
- import './chunks/colors2.mjs';
2
+ import './chunks/colors.mjs';
3
3
  import '@unocss/core';
4
4
  import './chunks/variants.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.44.7",
3
+ "version": "0.45.1",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "*.css"
62
62
  ],
63
63
  "dependencies": {
64
- "@unocss/core": "0.44.7"
64
+ "@unocss/core": "0.45.1"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",
@@ -1,298 +0,0 @@
1
- 'use strict';
2
-
3
- const colors = require('./colors2.cjs');
4
-
5
- const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
6
- const varEmpty = " ";
7
- const displays = [
8
- ["inline", { display: "inline" }],
9
- ["block", { display: "block" }],
10
- ["inline-block", { display: "inline-block" }],
11
- ["contents", { display: "contents" }],
12
- ["flow-root", { display: "flow-root" }],
13
- ["list-item", { display: "list-item" }],
14
- ["hidden", { display: "none" }],
15
- [/^display-(.+)$/, ([, c]) => ({ display: colors.handler.bracket.cssvar.global(c) || c })]
16
- ];
17
- const appearances = [
18
- ["visible", { visibility: "visible" }],
19
- ["invisible", { visibility: "hidden" }],
20
- ["backface-visible", { "backface-visibility": "visible" }],
21
- ["backface-hidden", { "backface-visibility": "hidden" }],
22
- ...colors.makeGlobalStaticRules("backface", "backface-visibility")
23
- ];
24
- const cursors = [
25
- [/^cursor-(.+)$/, ([, c]) => ({ cursor: colors.handler.bracket.cssvar.global(c) })],
26
- ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
27
- ];
28
- const pointerEvents = [
29
- ["pointer-events-auto", { "pointer-events": "auto" }],
30
- ["pointer-events-none", { "pointer-events": "none" }],
31
- ...colors.makeGlobalStaticRules("pointer-events")
32
- ];
33
- const resizes = [
34
- ["resize-x", { resize: "horizontal" }],
35
- ["resize-y", { resize: "vertical" }],
36
- ["resize", { resize: "both" }],
37
- ["resize-none", { resize: "none" }],
38
- ...colors.makeGlobalStaticRules("resize")
39
- ];
40
- const userSelects = [
41
- ["select-auto", { "user-select": "auto" }],
42
- ["select-all", { "user-select": "all" }],
43
- ["select-text", { "user-select": "text" }],
44
- ["select-none", { "user-select": "none" }],
45
- ...colors.makeGlobalStaticRules("select", "user-select")
46
- ];
47
- const whitespaces = [
48
- [
49
- /^(?:whitespace-|ws-)([-\w]+)$/,
50
- ([, v]) => ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces", ...colors.globalKeywords].includes(v) ? { "white-space": v } : void 0,
51
- { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" }
52
- ]
53
- ];
54
- const contents = [
55
- [/^content-\[(.+)\]$/, ([, v]) => ({ content: `"${v}"` })],
56
- [/^content-(\$.+)]$/, ([, v]) => ({ content: colors.handler.cssvar(v) })],
57
- ["content-empty", { content: '""' }],
58
- ["content-none", { content: '""' }]
59
- ];
60
- const breaks = [
61
- ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
62
- ["break-words", { "overflow-wrap": "break-word" }],
63
- ["break-all", { "word-break": "break-all" }]
64
- ];
65
- const textOverflows = [
66
- ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }],
67
- ["text-ellipsis", { "text-overflow": "ellipsis" }],
68
- ["text-clip", { "text-overflow": "clip" }]
69
- ];
70
- const textTransforms = [
71
- ["case-upper", { "text-transform": "uppercase" }],
72
- ["case-lower", { "text-transform": "lowercase" }],
73
- ["case-capital", { "text-transform": "capitalize" }],
74
- ["case-normal", { "text-transform": "none" }],
75
- ...colors.makeGlobalStaticRules("case", "text-transform")
76
- ];
77
- const fontStyles = [
78
- ["italic", { "font-style": "italic" }],
79
- ["not-italic", { "font-style": "normal" }],
80
- ["font-italic", { "font-style": "italic" }],
81
- ["font-not-italic", { "font-style": "normal" }],
82
- ["oblique", { "font-style": "oblique" }],
83
- ["not-oblique", { "font-style": "normal" }],
84
- ["font-oblique", { "font-style": "oblique" }],
85
- ["font-not-oblique", { "font-style": "normal" }]
86
- ];
87
- const fontSmoothings = [
88
- ["antialiased", {
89
- "-webkit-font-smoothing": "antialiased",
90
- "-moz-osx-font-smoothing": "grayscale",
91
- "font-smoothing": "grayscale"
92
- }],
93
- ["subpixel-antialiased", {
94
- "-webkit-font-smoothing": "auto",
95
- "-moz-osx-font-smoothing": "auto",
96
- "font-smoothing": "auto"
97
- }]
98
- ];
99
-
100
- const ringBase = {
101
- "--un-ring-inset": varEmpty,
102
- "--un-ring-offset-width": "0px",
103
- "--un-ring-offset-color": "#fff",
104
- "--un-ring-width": "0px",
105
- "--un-ring-color": "rgba(147,197,253,0.5)",
106
- "--un-shadow": "0 0 rgba(0,0,0,0)"
107
- };
108
- const rings = [
109
- [/^ring(?:-(.+))?$/, ([, d], { theme }) => {
110
- const value = theme.ringWidth?.[d || "DEFAULT"] ?? colors.handler.px(d || "1");
111
- if (value) {
112
- return {
113
- "--un-ring-width": value,
114
- "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
115
- "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)",
116
- "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
117
- };
118
- }
119
- }, { autocomplete: "ring-$ringWidth" }],
120
- [/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? colors.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
121
- ["ring-offset", { "--un-ring-offset-width": "1px" }],
122
- [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? colors.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
123
- [/^ring-(.+)$/, colors.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
124
- [/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
125
- [/^ring-offset-(.+)$/, colors.colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
126
- [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
127
- ["ring-inset", { "--un-ring-inset": "inset" }]
128
- ];
129
-
130
- const boxShadowsBase = {
131
- "--un-ring-offset-shadow": "0 0 rgba(0,0,0,0)",
132
- "--un-ring-shadow": "0 0 rgba(0,0,0,0)",
133
- "--un-shadow-inset": varEmpty,
134
- "--un-shadow": "0 0 rgba(0,0,0,0)"
135
- };
136
- const boxShadows = [
137
- [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
138
- const v = theme.boxShadow?.[d || "DEFAULT"];
139
- if (v) {
140
- return {
141
- "--un-shadow": colors.colorableShadows(v, "--un-shadow-color").join(","),
142
- "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
143
- };
144
- }
145
- }, { autocomplete: "shadow-$boxShadow" }],
146
- [/^shadow-(.+)$/, colors.colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
147
- [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
148
- ["shadow-inset", { "--un-shadow-inset": "inset" }]
149
- ];
150
-
151
- const transformValues = [
152
- "translate",
153
- "rotate",
154
- "scale"
155
- ];
156
- const transformCpu = [
157
- "translateX(var(--un-translate-x))",
158
- "translateY(var(--un-translate-y))",
159
- "translateZ(var(--un-translate-z))",
160
- "rotate(var(--un-rotate))",
161
- "rotateX(var(--un-rotate-x))",
162
- "rotateY(var(--un-rotate-y))",
163
- "rotateZ(var(--un-rotate-z))",
164
- "skewX(var(--un-skew-x))",
165
- "skewY(var(--un-skew-y))",
166
- "scaleX(var(--un-scale-x))",
167
- "scaleY(var(--un-scale-y))",
168
- "scaleZ(var(--un-scale-z))"
169
- ].join(" ");
170
- const transformGpu = [
171
- "translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
172
- "rotate(var(--un-rotate))",
173
- "rotateX(var(--un-rotate-x))",
174
- "rotateY(var(--un-rotate-y))",
175
- "rotateZ(var(--un-rotate-z))",
176
- "skewX(var(--un-skew-x))",
177
- "skewY(var(--un-skew-y))",
178
- "scaleX(var(--un-scale-x))",
179
- "scaleY(var(--un-scale-y))",
180
- "scaleZ(var(--un-scale-z))"
181
- ].join(" ");
182
- const transformBase = {
183
- "--un-rotate": 0,
184
- "--un-rotate-x": 0,
185
- "--un-rotate-y": 0,
186
- "--un-rotate-z": 0,
187
- "--un-scale-x": 1,
188
- "--un-scale-y": 1,
189
- "--un-scale-z": 1,
190
- "--un-skew-x": 0,
191
- "--un-skew-y": 0,
192
- "--un-translate-x": 0,
193
- "--un-translate-y": 0,
194
- "--un-translate-z": 0
195
- };
196
- const transforms = [
197
- [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": colors.positionMap[s] ?? colors.handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(colors.positionMap).join("|")})`, `origin-(${Object.keys(colors.positionMap).join("|")})`] }],
198
- [/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
199
- const v = colors.handler.bracket.cssvar.px.numberWithUnit(s);
200
- if (v != null) {
201
- return {
202
- "-webkit-perspective": v,
203
- "perspective": v
204
- };
205
- }
206
- }],
207
- [/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
208
- const v = colors.handler.bracket.cssvar(s) ?? (s.length >= 3 ? colors.positionMap[s] : void 0);
209
- if (v != null) {
210
- return {
211
- "-webkit-perspective-origin": v,
212
- "perspective-origin": v
213
- };
214
- }
215
- }],
216
- [/^(?:transform-)?translate-()(.+)$/, handleTranslate],
217
- [/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
218
- [/^(?:transform-)?rotate-()(.+)$/, handleRotate],
219
- [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
220
- [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
221
- [/^(?:transform-)?scale-()(.+)$/, handleScale],
222
- [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
223
- [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
224
- [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
225
- ["transform", { transform: transformCpu }],
226
- ["transform-cpu", { transform: transformCpu }],
227
- ["transform-gpu", { transform: transformGpu }],
228
- ["transform-none", { transform: "none" }],
229
- ...colors.makeGlobalStaticRules("transform")
230
- ];
231
- function handleTranslate([, d, b], { theme }) {
232
- const v = theme.spacing?.[b] ?? colors.handler.bracket.cssvar.fraction.rem(b);
233
- if (v != null) {
234
- return [
235
- ...colors.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
236
- ["transform", transformCpu]
237
- ];
238
- }
239
- }
240
- function handleScale([, d, b]) {
241
- const v = colors.handler.bracket.cssvar.fraction.percent(b);
242
- if (v != null) {
243
- return [
244
- ...colors.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
245
- ["transform", transformCpu]
246
- ];
247
- }
248
- }
249
- function handleRotate([, d = "", b]) {
250
- const v = colors.handler.bracket.cssvar.degree(b);
251
- if (v != null) {
252
- if (d) {
253
- return {
254
- "--un-rotate": 0,
255
- [`--un-rotate-${d}`]: v,
256
- "transform": transformCpu
257
- };
258
- } else {
259
- return {
260
- "--un-rotate-x": 0,
261
- "--un-rotate-y": 0,
262
- "--un-rotate-z": 0,
263
- "--un-rotate": v,
264
- "transform": transformCpu
265
- };
266
- }
267
- }
268
- }
269
- function handleSkew([, d, b]) {
270
- const v = colors.handler.bracket.cssvar.degree(b);
271
- if (v != null) {
272
- return {
273
- [`--un-skew-${d}`]: v,
274
- transform: transformCpu
275
- };
276
- }
277
- }
278
-
279
- exports.appearances = appearances;
280
- exports.boxShadows = boxShadows;
281
- exports.boxShadowsBase = boxShadowsBase;
282
- exports.breaks = breaks;
283
- exports.contents = contents;
284
- exports.cursors = cursors;
285
- exports.displays = displays;
286
- exports.fontSmoothings = fontSmoothings;
287
- exports.fontStyles = fontStyles;
288
- exports.pointerEvents = pointerEvents;
289
- exports.resizes = resizes;
290
- exports.ringBase = ringBase;
291
- exports.rings = rings;
292
- exports.textOverflows = textOverflows;
293
- exports.textTransforms = textTransforms;
294
- exports.transformBase = transformBase;
295
- exports.transforms = transforms;
296
- exports.userSelects = userSelects;
297
- exports.varEmpty = varEmpty;
298
- exports.whitespaces = whitespaces;