@starweave-lab/unocss-preset 0.0.3 → 0.0.4
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 +7 -0
- package/dist/index.mjs +28 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,6 +8,13 @@ export interface PresetUnocssOptions {
|
|
|
8
8
|
* @default undefined
|
|
9
9
|
*/
|
|
10
10
|
prefix?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Extra color tokens used by border utilities, in addition to the theme.
|
|
13
|
+
* Useful when tokens are defined through custom UnoCSS rules instead of
|
|
14
|
+
* `theme.colors`, for example `borderColors: borderColorTokens`.
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
borderColors?: Record<string, unknown>;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -239,13 +239,13 @@ function toPercentage(value) {
|
|
|
239
239
|
return `${raw.includes(".") && number <= 1 ? number * 100 : number}%`;
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
|
-
* Looks a color up in the theme. A leading `border-`
|
|
243
|
-
* `border-regular` resolves the `regular` token.
|
|
242
|
+
* Looks a color up in the preset options and the theme. A leading `border-`
|
|
243
|
+
* is ignored so that `border-regular` resolves the `regular` token.
|
|
244
244
|
*/
|
|
245
|
-
function resolveThemeColor(input, theme) {
|
|
245
|
+
function resolveThemeColor(input, theme, borderColors) {
|
|
246
246
|
const lookup = (key) => {
|
|
247
247
|
const parts = key.split("-");
|
|
248
|
-
return lookupColor(theme.colors, parts) ?? lookupColor(theme.borderColor, parts);
|
|
248
|
+
return lookupColor(borderColors, parts) ?? lookupColor(theme.colors, parts) ?? lookupColor(theme.borderColor, parts);
|
|
249
249
|
};
|
|
250
250
|
return lookup(input) ?? (input.startsWith("border-") ? lookup(input.slice(7)) : void 0);
|
|
251
251
|
}
|
|
@@ -259,13 +259,13 @@ function resolveThemeColor(input, theme) {
|
|
|
259
259
|
* - `[border-regular]` → the `regular` theme color
|
|
260
260
|
* - `red` / `rgb(1,2,3)` → raw CSS colors
|
|
261
261
|
*/
|
|
262
|
-
function resolveColor(input, theme) {
|
|
262
|
+
function resolveColor(input, theme, borderColors) {
|
|
263
263
|
const [raw, opacity] = splitOpacity(input);
|
|
264
264
|
let resolved;
|
|
265
265
|
if (raw.startsWith("[") && raw.endsWith("]")) {
|
|
266
266
|
const inner = raw.slice(1, -1);
|
|
267
|
-
resolved = resolveThemeColor(inner, theme) ?? inner.replaceAll("_", " ");
|
|
268
|
-
} else resolved = resolveThemeColor(raw, theme) ?? (namedColors.has(raw.toLowerCase()) || isColorFunction(raw) ? raw : void 0);
|
|
267
|
+
resolved = resolveThemeColor(inner, theme, borderColors) ?? inner.replaceAll("_", " ");
|
|
268
|
+
} else resolved = resolveThemeColor(raw, theme, borderColors) ?? (namedColors.has(raw.toLowerCase()) || isColorFunction(raw) ? raw : void 0);
|
|
269
269
|
if (!resolved) return;
|
|
270
270
|
if (opacity === void 0) return resolved;
|
|
271
271
|
const percent = toPercentage(opacity);
|
|
@@ -285,16 +285,18 @@ function resolveColor(input, theme) {
|
|
|
285
285
|
* b-1-primary/50 → 所有方向 1px solid color-mix(primary 50%, transparent)
|
|
286
286
|
* b-t-1-[#fff] → border-top: 1px solid #fff
|
|
287
287
|
*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
288
|
+
function createBorderRules(borderColors) {
|
|
289
|
+
return [[/^b-(?:(all|[trblxy])-)?(?:(solid|dashed|dotted|double)-)?(\d+)-(.+)$/, ([, direction, style, width, color], { theme }) => {
|
|
290
|
+
if (!width || !color) return;
|
|
291
|
+
const resolvedColor = resolveColor(color, theme, borderColors);
|
|
292
|
+
if (!resolvedColor) return;
|
|
293
|
+
const shorthand = `${width}px ${style ?? "solid"} ${resolvedColor}`;
|
|
294
|
+
const declarations = {};
|
|
295
|
+
if (!direction || direction === "all") declarations.border = shorthand;
|
|
296
|
+
else for (const s of borderDirections[direction]) declarations[`border-${s}`] = shorthand;
|
|
297
|
+
return declarations;
|
|
298
|
+
}]];
|
|
299
|
+
}
|
|
298
300
|
const contentVisibilityRules = [
|
|
299
301
|
"auto",
|
|
300
302
|
"hidden",
|
|
@@ -374,12 +376,14 @@ const shadowRules = [[/^shadow-(?:([trbl]|all)(?:-(sm|md|lg|xl|2xl))?|(sm|md|lg|
|
|
|
374
376
|
}]];
|
|
375
377
|
//#endregion
|
|
376
378
|
//#region src/rules/index.ts
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
function createRules(options = {}) {
|
|
380
|
+
return [
|
|
381
|
+
...createBorderRules(options.borderColors),
|
|
382
|
+
...textSizeRules,
|
|
383
|
+
...contentVisibilityRules,
|
|
384
|
+
...shadowRules
|
|
385
|
+
];
|
|
386
|
+
}
|
|
383
387
|
//#endregion
|
|
384
388
|
//#region src/index.ts
|
|
385
389
|
/**
|
|
@@ -410,7 +414,7 @@ const presetUnocss = definePreset((options = {}) => {
|
|
|
410
414
|
const { prefix } = options;
|
|
411
415
|
return {
|
|
412
416
|
name: "unocss-preset",
|
|
413
|
-
rules,
|
|
417
|
+
rules: createRules(options),
|
|
414
418
|
variants: [hocusVariant],
|
|
415
419
|
shortcuts,
|
|
416
420
|
prefix
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["sizes","sizes"],"sources":["../src/shortcuts/size.ts","../src/shortcuts/element.ts","../src/shortcuts/layout.ts","../src/shortcuts/motion.ts","../src/shortcuts/effect.ts","../src/shortcuts/index.ts","../src/rules/text.ts","../src/rules/border.ts","../src/rules/content-visibility.ts","../src/rules/shadow.ts","../src/rules/index.ts","../src/index.ts"],"sourcesContent":["/**\n * Sizing shortcuts for filling a container.\n *\n * - `full` — `w-full h-full`\n * - `min-full` — `min-w-full min-h-full`\n * - `max-full` — `max-w-full max-h-full`\n * - `full-flex` — full width, flexible height (`flex-1`, `min-h-0`)\n */\nexport const sizes = {\n full: 'w-full h-full',\n 'min-full': 'min-w-full min-h-full',\n 'max-full': 'max-w-full max-h-full',\n 'full-flex': 'w-full min-h-0 flex-1',\n}\n","// Overlays only fade, so a standard easing curve fits better than a spring.\nconst easeOverlay = 'ease-[cubic-bezier(0.4,0,0.2,1)]'\nexport const elements = {\n // button\n button:\n 'flex items-center justify-center grow-0 shrink-0 bg-transparent border-none outline-none appearance-none touch-none cursor-pointer select-none focus-visible:outline-none',\n 'reset-button':\n 'p-0 m-0 bg-transparent border-none outline-none appearance-none touch-none cursor-pointer select-none focus-visible:outline-none',\n 'block-button':\n 'block w-full bg-transparent border-0 border-none outline-none appearance-none box-border cursor-pointer select-none',\n\n link: 'text-primary cursor-pointer hover:underline',\n 'img-cover': 'block w-full h-full object-cover',\n 'img-contain': 'block w-full h-full object-contain',\n avatar: 'inline-block rounded-full object-cover shrink-0 bg-gray-100',\n clickable: 'cursor-pointer select-none',\n\n // 悬浮层\n overlay: `absolute inset-0 w-full h-full z-50 bg-black/30 backdrop-blur-sm transition-opacity duration-200 ${easeOverlay}`,\n 'overlay-full': `fixed inset-0 w-full h-full z-50 bg-black/30 backdrop-blur-sm transition-opacity duration-200 ${easeOverlay}`,\n}\n","/**\n * Flex layout shortcuts.\n *\n * - `flex-center` / `flex-x-center` / `flex-y-center`\n * - `flex-between` / `flex-between-center` / `flex-center-between`\n */\nconst flexLayouts = {\n 'flex-center': 'flex justify-center items-center',\n 'flex-x-center': 'flex justify-center',\n 'flex-y-center': 'flex items-center',\n 'flex-between': 'flex justify-between',\n 'flex-between-center': 'flex justify-between items-center',\n 'flex-center-between': 'flex justify-center items-stretch',\n}\n\n/**\n * Grid layout shortcuts, including `grid-equal-cols` which auto-fits\n * equal-width columns.\n */\nconst gridLayouts = {\n 'grid-center': 'grid place-content-center',\n 'grid-x-center': 'grid justify-center',\n 'grid-y-center': 'grid items-center',\n 'grid-stretch': 'grid items-stretch',\n 'grid-between': 'grid justify-between',\n 'grid-between-center': 'grid justify-between items-center',\n 'grid-center-between': 'grid place-content-between',\n 'grid-equal-cols': 'grid grid-cols-[repeat(auto-fit,minmax(0,1fr))]',\n}\n\n/**\n * Absolute/fixed centering shortcuts, aligned on both axes or a single axis.\n */\nconst positionLayouts = {\n 'absolute-center': 'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2',\n 'absolute-x-center': 'absolute left-1/2 transform -translate-x-1/2',\n 'absolute-y-center': 'absolute top-1/2 transform -translate-y-1/2',\n 'fixed-center': 'fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2',\n 'fixed-x-center': 'fixed left-1/2 transform -translate-x-1/2',\n 'fixed-y-center': 'fixed top-1/2 transform -translate-y-1/2',\n}\n\nexport const layouts = {\n ...flexLayouts,\n ...gridLayouts,\n ...positionLayouts,\n}\n","// Spring easing gives movement shortcuts their bounce.\nconst easeMotion = 'ease-[cubic-bezier(0.34,1.56,0.64,1)]'\n\nexport const motions = {\n // 按下弹簧效果\n 'motion-press': `transition-transform duration-300 ${easeMotion} active:scale-[0.96] motion-reduce:transition-none`,\n // 悬浮浮起\n 'motion-float': `transition-transform duration-200 ${easeMotion} hover:-translate-y-1`,\n // 悬浮放大\n 'motion-scale': `transition-transform duration-200 ${easeMotion} hover:scale-[1.02]`,\n // 悬浮缩小\n 'motion-shrink': `transition-transform duration-200 ${easeMotion} hover:scale-[0.98]`,\n // 悬浮旋转\n 'motion-rotate': `transition-transform duration-200 ${easeMotion} hover:rotate-3`,\n // 悬浮透明度变化\n 'motion-fade': `transition-opacity duration-200 ${easeMotion} hover:opacity-70`,\n}\n","// Effects are subtle feedback, so use a simple ease-out instead of a spring.\nconst easeEffect = 'ease-out'\n\nexport const effects = {\n // 选中状态\n 'effect-selected': 'bg-primary/10 text-primary',\n // 输入框聚焦反馈\n 'effect-focus': `transition duration-200 ${easeEffect} focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20`,\n // 通用交互反馈\n 'effect-interactive': `cursor-pointer transition-colors duration-200 ${easeEffect} hover:bg-gray-100 active:bg-gray-200`,\n // 聚焦轮廓\n 'effect-outline-ring': `transition duration-200 ${easeEffect} outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,\n // 禁用状态\n 'effect-disabled': 'disabled:cursor-not-allowed disabled:opacity-50',\n // 骨架屏基础样式\n 'effect-skeleton': 'animate-pulse rounded-md bg-gray-200 dark:bg-gray-800',\n // 悬浮阴影\n 'effect-shadow': `transition-shadow duration-200 ${easeEffect} hover:shadow-md`,\n // 悬浮边框高亮\n 'effect-border': `transition-colors duration-200 ${easeEffect} hover:border-primary`,\n // 悬浮高亮\n 'effect-highlight': `transition-colors duration-200 ${easeEffect} hover:bg-primary/10 hover:border-primary`,\n}\n","import { sizes } from './size'\nimport { elements } from './element'\nimport { layouts } from './layout'\nimport { motions } from './motion'\nimport { effects } from './effect'\n\nexport const shortcuts = {\n ...sizes,\n ...elements,\n ...layouts,\n ...motions,\n ...effects,\n}\n","import type { Rule } from '@unocss/core'\n\nconst textSizes = {\n xs: {\n 'font-size': '12px',\n 'line-height': '14px',\n },\n sm: {\n 'font-size': '14px',\n 'line-height': '18px',\n },\n base: {\n 'font-size': '16px',\n 'line-height': '24px',\n },\n md: {\n 'font-size': '18px',\n 'line-height': '28px',\n },\n '2md': {\n 'font-size': '20px',\n 'line-height': '32px',\n },\n lg: {\n 'font-size': '24px',\n 'line-height': '34px',\n },\n xl: {\n 'font-size': '28px',\n 'line-height': '40px',\n },\n '2xl': {\n 'font-size': '36px',\n 'line-height': '42px',\n },\n '3xl': {\n 'font-size': '48px',\n 'line-height': '56px',\n },\n '4xl': {\n 'font-size': '60px',\n 'line-height': '72px',\n },\n '5xl': {\n 'font-size': '72px',\n 'line-height': '80px',\n },\n} as const\nexport type TextSizeKeys = keyof typeof textSizes\nconst textSizePattern = Object.keys(textSizes).join('|')\n\nexport const textSizeRules: Rule[] = [\n [new RegExp(`^text-(${textSizePattern})$`), ([, key]) => textSizes[key as TextSizeKeys]],\n]\n","import type { Rule } from '@unocss/core'\n\ntype BorderDirection = 't' | 'r' | 'b' | 'l' | 'x' | 'y' | 'all'\n\nconst borderDirections: Record<BorderDirection, string[]> = {\n t: ['top'],\n r: ['right'],\n b: ['bottom'],\n l: ['left'],\n x: ['left', 'right'],\n y: ['top', 'bottom'],\n all: ['top', 'right', 'bottom', 'left'],\n}\n\n/**\n * Resolves a theme color path such as `primary`, `blue-500` or `light-blue-500`.\n * Longer keys win so theme entries containing hyphens still work.\n */\nfunction lookupColor(colors: unknown, parts: string[]): string | undefined {\n if (!colors || typeof colors !== 'object') return\n for (let size = parts.length; size > 0; size--) {\n const key = parts.slice(0, size).join('-')\n if (!(key in colors)) continue\n const value = (colors as Record<string, unknown>)[key]\n if (size === parts.length) {\n if (typeof value === 'string') return value\n continue\n }\n const nested = lookupColor(value, parts.slice(size))\n if (nested) return nested\n }\n}\n\nfunction isColorFunction(value: string): boolean {\n return /^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|var)\\(/i.test(value)\n}\n\nconst namedColors = new Set(\n `aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue\n blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk\n crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki\n darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen\n darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue\n dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite\n gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki\n lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan\n lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen\n lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen\n magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen\n mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream\n mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid\n palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum\n powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown\n seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen\n steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke\n yellow yellowgreen currentcolor`.split(/\\s+/),\n)\n\n/**\n * Splits the opacity modifier from the color at a `/` outside any brackets or\n * parentheses, so arbitrary values such as `[rgb(1_2_3_/_50%)]` stay intact.\n */\nfunction splitOpacity(input: string): [string, string | undefined] {\n let depth = 0\n let slash = -1\n\n for (let i = 0; i < input.length; i++) {\n const char = input[i]\n if (char === '[' || char === '(') depth++\n else if (char === ']' || char === ')') depth--\n else if (char === '/' && depth === 0) slash = i\n }\n\n if (slash < 0) return [input, undefined]\n return [input.slice(0, slash), input.slice(slash + 1)]\n}\n\nfunction toPercentage(value: string): string | undefined {\n const raw = value.startsWith('[') && value.endsWith(']') ? value.slice(1, -1) : value\n if (/^(?:\\d+(?:\\.\\d+)?|\\.\\d+)%$/.test(raw)) return raw\n if (!raw) return\n\n const number = Number(raw)\n if (!Number.isFinite(number) || number < 0) return\n\n const percent = raw.includes('.') && number <= 1 ? number * 100 : number\n return `${percent}%`\n}\n\ninterface ColorTheme {\n colors?: unknown\n borderColor?: unknown\n}\n\n/**\n * Looks a color up in the theme. A leading `border-` is ignored so that\n * `border-regular` resolves the `regular` token.\n */\nfunction resolveThemeColor(input: string, theme: ColorTheme): string | undefined {\n const lookup = (key: string) => {\n const parts = key.split('-')\n return lookupColor(theme.colors, parts) ?? lookupColor(theme.borderColor, parts)\n }\n\n return (\n lookup(input) ??\n (input.startsWith('border-') ? lookup(input.slice('border-'.length)) : undefined)\n )\n}\n\n/**\n * Resolves theme colors, opacity modifiers and arbitrary values.\n *\n * - `primary` → theme color\n * - `blue-500` → nested theme color\n * - `primary/50` → `color-mix(...)`\n * - `[#fff]` → `#fff`\n * - `[border-regular]` → the `regular` theme color\n * - `red` / `rgb(1,2,3)` → raw CSS colors\n */\nfunction resolveColor(input: string, theme: ColorTheme): string | undefined {\n const [raw, opacity] = splitOpacity(input)\n\n let resolved: string | undefined\n if (raw.startsWith('[') && raw.endsWith(']')) {\n const inner = raw.slice(1, -1)\n // Arbitrary values still resolve theme colors, e.g. `[primary]` → `#3b82f6`.\n resolved = resolveThemeColor(inner, theme) ?? inner.replaceAll('_', ' ')\n } else {\n resolved =\n resolveThemeColor(raw, theme) ??\n (namedColors.has(raw.toLowerCase()) || isColorFunction(raw) ? raw : undefined)\n }\n\n if (!resolved) return\n if (opacity === undefined) return resolved\n\n const percent = toPercentage(opacity)\n if (!percent) return\n\n return `color-mix(in srgb, ${resolved} ${percent}, transparent)`\n}\n\n/**\n * 边框规则,格式为: b-边框方向(不写默认生成所有方向)-边框样式(不写默认为solid)-边框长度(必须写)-边框颜色, 例子:\n *\n * @examples\n *\n * b-1-primary → 所有方向 1px solid primary\n * b-all-1-primary → 所有方向 1px solid primary\n * b-t-1-primary → border-top: 1px solid primary\n * b-t-dashed-1-primary → border-top: 1px dashed primary\n * b-b-dashed-2-red → border-bottom: 2px dashed red\n * b-1-primary/50 → 所有方向 1px solid color-mix(primary 50%, transparent)\n * b-t-1-[#fff] → border-top: 1px solid #fff\n */\nexport const borderRules: Rule[] = [\n [\n /^b-(?:(all|[trblxy])-)?(?:(solid|dashed|dotted|double)-)?(\\d+)-(.+)$/,\n ([, direction, style, width, color], { theme }) => {\n if (!width || !color) return\n const resolvedColor = resolveColor(color, theme as ColorTheme)\n if (!resolvedColor) return\n\n const shorthand = `${width}px ${style ?? 'solid'} ${resolvedColor}`\n const declarations: Record<string, string> = {}\n if (!direction || direction === 'all') {\n declarations.border = shorthand\n } else {\n for (const s of borderDirections[direction as BorderDirection]) {\n declarations[`border-${s}`] = shorthand\n }\n }\n return declarations\n },\n ],\n]\n","import type { Rule } from '@unocss/core'\nconst values = ['auto', 'hidden', 'visible'] as const\n\nexport const contentVisibilityRules: Rule[] = values.map((value) => [\n `cv-${value}`,\n { 'content-visibility': value },\n])\n","import type { Rule } from '@unocss/core'\n\ntype Direction = 't' | 'r' | 'b' | 'l' | 'all'\ntype SizeKey = 'sm' | 'md' | '' | 'lg' | 'xl' | '2xl'\n\ninterface Size {\n offset: number\n blur: number\n spread: number\n color: string\n}\ntype BoxShadowStyles = Record<string, { 'box-shadow': string }>\n\nconst directions: Direction[] = ['t', 'r', 'b', 'l', 'all']\nconst sizes: Record<SizeKey, Size> = {\n sm: { offset: 1, blur: 2, spread: 0, color: 'rgba(0, 0, 0, 0.05)' },\n '': { offset: 1, blur: 3, spread: 0, color: 'rgba(0, 0, 0, 0.1)' },\n md: { offset: 4, blur: 6, spread: -1, color: 'rgba(0, 0, 0, 0.1)' },\n lg: { offset: 10, blur: 15, spread: -3, color: 'rgba(0, 0, 0, 0.1)' },\n xl: { offset: 20, blur: 25, spread: -5, color: 'rgba(0, 0, 0, 0.1)' },\n '2xl': { offset: 25, blur: 50, spread: -12, color: 'rgba(0, 0, 0, 0.25)' },\n}\n\n/** X/Y multipliers for each direction; `all` is centered. */\nconst offsets: Record<Direction, [number, number]> = {\n t: [0, -1],\n r: [1, 0],\n b: [0, 1],\n l: [-1, 0],\n all: [0, 0],\n}\n\nfunction createBoxShadow(direction: Direction, size: Size): string {\n const [x, y] = offsets[direction]\n return `${x * size.offset}px ${y * size.offset}px ${size.blur}px ${size.spread}px ${size.color}`\n}\n\nconst sizeEntries = Object.entries(sizes) as Array<[SizeKey, Size]>\n\nconst shadows: BoxShadowStyles = Object.fromEntries(\n directions.flatMap((direction) =>\n sizeEntries.map(([sizeKey, size]) => [\n `${direction}${sizeKey ? `-${sizeKey}` : ''}`,\n { 'box-shadow': createBoxShadow(direction, size) },\n ]),\n ),\n)\n\n/**\n * 规则格式: shadow-[方向][-尺寸]\n *\n * - 方向: `t` / `r` / `b` / `l` / `all`,不写时等同于 `all`\n * - 尺寸: `sm` / `md` / `lg` / `xl` / `2xl`,不写时为默认尺寸\n */\nexport const shadowRules: Rule[] = [\n [\n /^shadow-(?:([trbl]|all)(?:-(sm|md|lg|xl|2xl))?|(sm|md|lg|xl|2xl))$/,\n ([, direction, size, sizeOnly]) => {\n const resolvedSize = size ?? sizeOnly\n const key = `${direction ?? 'all'}${resolvedSize ? `-${resolvedSize}` : ''}`\n return shadows[key]\n },\n ],\n]\n","import { textSizeRules } from './text'\nimport { borderRules } from './border'\nimport { contentVisibilityRules } from './content-visibility'\nimport { shadowRules } from './shadow'\n\nexport const rules = [...borderRules, ...textSizeRules, ...contentVisibilityRules, ...shadowRules]\n","import type { Preset, Variant } from '@unocss/core'\nimport { definePreset } from '@unocss/core'\nimport { shortcuts } from './shortcuts'\nimport { rules } from './rules'\n\n/**\n * Options accepted by {@link presetUnocss}.\n */\nexport interface PresetUnocssOptions {\n /**\n * Prefix applied to every generated utility, for example `u-`.\n * @default undefined\n */\n prefix?: string\n}\n\n/**\n * `hocus:` variant matching both `:hover` and `:focus-visible`.\n */\nconst hocusVariant: Variant = {\n name: 'hocus',\n match: (matcher) => {\n if (!matcher.startsWith('hocus:')) return\n return {\n matcher: matcher.slice('hocus:'.length),\n selector: (selector) => `${selector}:hover, ${selector}:focus-visible`,\n }\n },\n}\n\n/**\n *\n * @example\n * ```ts\n * import presetUnocss from '@starweave-lab/unocss-preset'\n *\n * export default defineConfig({\n * presets: [presetWind4(), presetUnocss()],\n * })\n * ```\n */\nexport const presetUnocss = definePreset<PresetUnocssOptions>((options = {}) => {\n const { prefix } = options\n const preset: Preset = {\n name: 'unocss-preset',\n rules,\n variants: [hocusVariant],\n shortcuts,\n prefix: prefix,\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Aa,GAAG;CAAe,GAAG;CAAwB,GAAG;AAAW;;;;;;ACcjG,MAAM,eAAwB;CAC5B,MAAM;CACN,QAAQ,YAAY;EAClB,IAAI,CAAC,QAAQ,WAAW,QAAQ,GAAG;EACnC,OAAO;GACL,SAAS,QAAQ,MAAM,CAAe;GACtC,WAAW,aAAa,GAAG,SAAS,UAAU,SAAS;EACzD;CACF;AACF;;;;;;;;;;;;AAaA,MAAa,eAAe,cAAmC,UAAU,CAAC,MAAM;CAC9E,MAAM,EAAE,WAAW;CAQnB,OAAO;EANL,MAAM;EACN;EACA,UAAU,CAAC,YAAY;EACvB;EACQ;CAEE;AACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["sizes","sizes"],"sources":["../src/shortcuts/size.ts","../src/shortcuts/element.ts","../src/shortcuts/layout.ts","../src/shortcuts/motion.ts","../src/shortcuts/effect.ts","../src/shortcuts/index.ts","../src/rules/text.ts","../src/rules/border.ts","../src/rules/content-visibility.ts","../src/rules/shadow.ts","../src/rules/index.ts","../src/index.ts"],"sourcesContent":["/**\n * Sizing shortcuts for filling a container.\n *\n * - `full` — `w-full h-full`\n * - `min-full` — `min-w-full min-h-full`\n * - `max-full` — `max-w-full max-h-full`\n * - `full-flex` — full width, flexible height (`flex-1`, `min-h-0`)\n */\nexport const sizes = {\n full: 'w-full h-full',\n 'min-full': 'min-w-full min-h-full',\n 'max-full': 'max-w-full max-h-full',\n 'full-flex': 'w-full min-h-0 flex-1',\n}\n","// Overlays only fade, so a standard easing curve fits better than a spring.\nconst easeOverlay = 'ease-[cubic-bezier(0.4,0,0.2,1)]'\nexport const elements = {\n // button\n button:\n 'flex items-center justify-center grow-0 shrink-0 bg-transparent border-none outline-none appearance-none touch-none cursor-pointer select-none focus-visible:outline-none',\n 'reset-button':\n 'p-0 m-0 bg-transparent border-none outline-none appearance-none touch-none cursor-pointer select-none focus-visible:outline-none',\n 'block-button':\n 'block w-full bg-transparent border-0 border-none outline-none appearance-none box-border cursor-pointer select-none',\n\n link: 'text-primary cursor-pointer hover:underline',\n 'img-cover': 'block w-full h-full object-cover',\n 'img-contain': 'block w-full h-full object-contain',\n avatar: 'inline-block rounded-full object-cover shrink-0 bg-gray-100',\n clickable: 'cursor-pointer select-none',\n\n // 悬浮层\n overlay: `absolute inset-0 w-full h-full z-50 bg-black/30 backdrop-blur-sm transition-opacity duration-200 ${easeOverlay}`,\n 'overlay-full': `fixed inset-0 w-full h-full z-50 bg-black/30 backdrop-blur-sm transition-opacity duration-200 ${easeOverlay}`,\n}\n","/**\n * Flex layout shortcuts.\n *\n * - `flex-center` / `flex-x-center` / `flex-y-center`\n * - `flex-between` / `flex-between-center` / `flex-center-between`\n */\nconst flexLayouts = {\n 'flex-center': 'flex justify-center items-center',\n 'flex-x-center': 'flex justify-center',\n 'flex-y-center': 'flex items-center',\n 'flex-between': 'flex justify-between',\n 'flex-between-center': 'flex justify-between items-center',\n 'flex-center-between': 'flex justify-center items-stretch',\n}\n\n/**\n * Grid layout shortcuts, including `grid-equal-cols` which auto-fits\n * equal-width columns.\n */\nconst gridLayouts = {\n 'grid-center': 'grid place-content-center',\n 'grid-x-center': 'grid justify-center',\n 'grid-y-center': 'grid items-center',\n 'grid-stretch': 'grid items-stretch',\n 'grid-between': 'grid justify-between',\n 'grid-between-center': 'grid justify-between items-center',\n 'grid-center-between': 'grid place-content-between',\n 'grid-equal-cols': 'grid grid-cols-[repeat(auto-fit,minmax(0,1fr))]',\n}\n\n/**\n * Absolute/fixed centering shortcuts, aligned on both axes or a single axis.\n */\nconst positionLayouts = {\n 'absolute-center': 'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2',\n 'absolute-x-center': 'absolute left-1/2 transform -translate-x-1/2',\n 'absolute-y-center': 'absolute top-1/2 transform -translate-y-1/2',\n 'fixed-center': 'fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2',\n 'fixed-x-center': 'fixed left-1/2 transform -translate-x-1/2',\n 'fixed-y-center': 'fixed top-1/2 transform -translate-y-1/2',\n}\n\nexport const layouts = {\n ...flexLayouts,\n ...gridLayouts,\n ...positionLayouts,\n}\n","// Spring easing gives movement shortcuts their bounce.\nconst easeMotion = 'ease-[cubic-bezier(0.34,1.56,0.64,1)]'\n\nexport const motions = {\n // 按下弹簧效果\n 'motion-press': `transition-transform duration-300 ${easeMotion} active:scale-[0.96] motion-reduce:transition-none`,\n // 悬浮浮起\n 'motion-float': `transition-transform duration-200 ${easeMotion} hover:-translate-y-1`,\n // 悬浮放大\n 'motion-scale': `transition-transform duration-200 ${easeMotion} hover:scale-[1.02]`,\n // 悬浮缩小\n 'motion-shrink': `transition-transform duration-200 ${easeMotion} hover:scale-[0.98]`,\n // 悬浮旋转\n 'motion-rotate': `transition-transform duration-200 ${easeMotion} hover:rotate-3`,\n // 悬浮透明度变化\n 'motion-fade': `transition-opacity duration-200 ${easeMotion} hover:opacity-70`,\n}\n","// Effects are subtle feedback, so use a simple ease-out instead of a spring.\nconst easeEffect = 'ease-out'\n\nexport const effects = {\n // 选中状态\n 'effect-selected': 'bg-primary/10 text-primary',\n // 输入框聚焦反馈\n 'effect-focus': `transition duration-200 ${easeEffect} focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20`,\n // 通用交互反馈\n 'effect-interactive': `cursor-pointer transition-colors duration-200 ${easeEffect} hover:bg-gray-100 active:bg-gray-200`,\n // 聚焦轮廓\n 'effect-outline-ring': `transition duration-200 ${easeEffect} outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2`,\n // 禁用状态\n 'effect-disabled': 'disabled:cursor-not-allowed disabled:opacity-50',\n // 骨架屏基础样式\n 'effect-skeleton': 'animate-pulse rounded-md bg-gray-200 dark:bg-gray-800',\n // 悬浮阴影\n 'effect-shadow': `transition-shadow duration-200 ${easeEffect} hover:shadow-md`,\n // 悬浮边框高亮\n 'effect-border': `transition-colors duration-200 ${easeEffect} hover:border-primary`,\n // 悬浮高亮\n 'effect-highlight': `transition-colors duration-200 ${easeEffect} hover:bg-primary/10 hover:border-primary`,\n}\n","import { sizes } from './size'\nimport { elements } from './element'\nimport { layouts } from './layout'\nimport { motions } from './motion'\nimport { effects } from './effect'\n\nexport const shortcuts = {\n ...sizes,\n ...elements,\n ...layouts,\n ...motions,\n ...effects,\n}\n","import type { Rule } from '@unocss/core'\n\nconst textSizes = {\n xs: {\n 'font-size': '12px',\n 'line-height': '14px',\n },\n sm: {\n 'font-size': '14px',\n 'line-height': '18px',\n },\n base: {\n 'font-size': '16px',\n 'line-height': '24px',\n },\n md: {\n 'font-size': '18px',\n 'line-height': '28px',\n },\n '2md': {\n 'font-size': '20px',\n 'line-height': '32px',\n },\n lg: {\n 'font-size': '24px',\n 'line-height': '34px',\n },\n xl: {\n 'font-size': '28px',\n 'line-height': '40px',\n },\n '2xl': {\n 'font-size': '36px',\n 'line-height': '42px',\n },\n '3xl': {\n 'font-size': '48px',\n 'line-height': '56px',\n },\n '4xl': {\n 'font-size': '60px',\n 'line-height': '72px',\n },\n '5xl': {\n 'font-size': '72px',\n 'line-height': '80px',\n },\n} as const\nexport type TextSizeKeys = keyof typeof textSizes\nconst textSizePattern = Object.keys(textSizes).join('|')\n\nexport const textSizeRules: Rule[] = [\n [new RegExp(`^text-(${textSizePattern})$`), ([, key]) => textSizes[key as TextSizeKeys]],\n]\n","import type { Rule } from '@unocss/core'\n\ntype BorderDirection = 't' | 'r' | 'b' | 'l' | 'x' | 'y' | 'all'\n\nconst borderDirections: Record<BorderDirection, string[]> = {\n t: ['top'],\n r: ['right'],\n b: ['bottom'],\n l: ['left'],\n x: ['left', 'right'],\n y: ['top', 'bottom'],\n all: ['top', 'right', 'bottom', 'left'],\n}\n\n/**\n * Resolves a theme color path such as `primary`, `blue-500` or `light-blue-500`.\n * Longer keys win so theme entries containing hyphens still work.\n */\nfunction lookupColor(colors: unknown, parts: string[]): string | undefined {\n if (!colors || typeof colors !== 'object') return\n for (let size = parts.length; size > 0; size--) {\n const key = parts.slice(0, size).join('-')\n if (!(key in colors)) continue\n const value = (colors as Record<string, unknown>)[key]\n if (size === parts.length) {\n if (typeof value === 'string') return value\n continue\n }\n const nested = lookupColor(value, parts.slice(size))\n if (nested) return nested\n }\n}\n\nfunction isColorFunction(value: string): boolean {\n return /^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|var)\\(/i.test(value)\n}\n\nconst namedColors = new Set(\n `aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue\n blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk\n crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki\n darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen\n darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue\n dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite\n gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki\n lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan\n lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen\n lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen\n magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen\n mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream\n mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid\n palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum\n powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown\n seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen\n steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke\n yellow yellowgreen currentcolor`.split(/\\s+/),\n)\n\n/**\n * Splits the opacity modifier from the color at a `/` outside any brackets or\n * parentheses, so arbitrary values such as `[rgb(1_2_3_/_50%)]` stay intact.\n */\nfunction splitOpacity(input: string): [string, string | undefined] {\n let depth = 0\n let slash = -1\n\n for (let i = 0; i < input.length; i++) {\n const char = input[i]\n if (char === '[' || char === '(') depth++\n else if (char === ']' || char === ')') depth--\n else if (char === '/' && depth === 0) slash = i\n }\n\n if (slash < 0) return [input, undefined]\n return [input.slice(0, slash), input.slice(slash + 1)]\n}\n\nfunction toPercentage(value: string): string | undefined {\n const raw = value.startsWith('[') && value.endsWith(']') ? value.slice(1, -1) : value\n if (/^(?:\\d+(?:\\.\\d+)?|\\.\\d+)%$/.test(raw)) return raw\n if (!raw) return\n\n const number = Number(raw)\n if (!Number.isFinite(number) || number < 0) return\n\n const percent = raw.includes('.') && number <= 1 ? number * 100 : number\n return `${percent}%`\n}\n\ninterface ColorTheme {\n colors?: unknown\n borderColor?: unknown\n}\n\n/**\n * Looks a color up in the preset options and the theme. A leading `border-`\n * is ignored so that `border-regular` resolves the `regular` token.\n */\nfunction resolveThemeColor(\n input: string,\n theme: ColorTheme,\n borderColors: unknown,\n): string | undefined {\n const lookup = (key: string) => {\n const parts = key.split('-')\n return (\n lookupColor(borderColors, parts) ??\n lookupColor(theme.colors, parts) ??\n lookupColor(theme.borderColor, parts)\n )\n }\n\n return (\n lookup(input) ??\n (input.startsWith('border-') ? lookup(input.slice('border-'.length)) : undefined)\n )\n}\n\n/**\n * Resolves theme colors, opacity modifiers and arbitrary values.\n *\n * - `primary` → theme color\n * - `blue-500` → nested theme color\n * - `primary/50` → `color-mix(...)`\n * - `[#fff]` → `#fff`\n * - `[border-regular]` → the `regular` theme color\n * - `red` / `rgb(1,2,3)` → raw CSS colors\n */\nfunction resolveColor(input: string, theme: ColorTheme, borderColors: unknown): string | undefined {\n const [raw, opacity] = splitOpacity(input)\n\n let resolved: string | undefined\n if (raw.startsWith('[') && raw.endsWith(']')) {\n const inner = raw.slice(1, -1)\n // Arbitrary values still resolve theme colors, e.g. `[primary]` → `#3b82f6`.\n resolved = resolveThemeColor(inner, theme, borderColors) ?? inner.replaceAll('_', ' ')\n } else {\n resolved =\n resolveThemeColor(raw, theme, borderColors) ??\n (namedColors.has(raw.toLowerCase()) || isColorFunction(raw) ? raw : undefined)\n }\n\n if (!resolved) return\n if (opacity === undefined) return resolved\n\n const percent = toPercentage(opacity)\n if (!percent) return\n\n return `color-mix(in srgb, ${resolved} ${percent}, transparent)`\n}\n\n/**\n * 边框规则,格式为: b-边框方向(不写默认生成所有方向)-边框样式(不写默认为solid)-边框长度(必须写)-边框颜色, 例子:\n *\n * @examples\n *\n * b-1-primary → 所有方向 1px solid primary\n * b-all-1-primary → 所有方向 1px solid primary\n * b-t-1-primary → border-top: 1px solid primary\n * b-t-dashed-1-primary → border-top: 1px dashed primary\n * b-b-dashed-2-red → border-bottom: 2px dashed red\n * b-1-primary/50 → 所有方向 1px solid color-mix(primary 50%, transparent)\n * b-t-1-[#fff] → border-top: 1px solid #fff\n */\nexport function createBorderRules(borderColors?: unknown): Rule[] {\n return [\n [\n /^b-(?:(all|[trblxy])-)?(?:(solid|dashed|dotted|double)-)?(\\d+)-(.+)$/,\n ([, direction, style, width, color], { theme }) => {\n if (!width || !color) return\n const resolvedColor = resolveColor(color, theme as ColorTheme, borderColors)\n if (!resolvedColor) return\n\n const shorthand = `${width}px ${style ?? 'solid'} ${resolvedColor}`\n const declarations: Record<string, string> = {}\n if (!direction || direction === 'all') {\n declarations.border = shorthand\n } else {\n for (const s of borderDirections[direction as BorderDirection]) {\n declarations[`border-${s}`] = shorthand\n }\n }\n return declarations\n },\n ],\n ]\n}\n","import type { Rule } from '@unocss/core'\nconst values = ['auto', 'hidden', 'visible'] as const\n\nexport const contentVisibilityRules: Rule[] = values.map((value) => [\n `cv-${value}`,\n { 'content-visibility': value },\n])\n","import type { Rule } from '@unocss/core'\n\ntype Direction = 't' | 'r' | 'b' | 'l' | 'all'\ntype SizeKey = 'sm' | 'md' | '' | 'lg' | 'xl' | '2xl'\n\ninterface Size {\n offset: number\n blur: number\n spread: number\n color: string\n}\ntype BoxShadowStyles = Record<string, { 'box-shadow': string }>\n\nconst directions: Direction[] = ['t', 'r', 'b', 'l', 'all']\nconst sizes: Record<SizeKey, Size> = {\n sm: { offset: 1, blur: 2, spread: 0, color: 'rgba(0, 0, 0, 0.05)' },\n '': { offset: 1, blur: 3, spread: 0, color: 'rgba(0, 0, 0, 0.1)' },\n md: { offset: 4, blur: 6, spread: -1, color: 'rgba(0, 0, 0, 0.1)' },\n lg: { offset: 10, blur: 15, spread: -3, color: 'rgba(0, 0, 0, 0.1)' },\n xl: { offset: 20, blur: 25, spread: -5, color: 'rgba(0, 0, 0, 0.1)' },\n '2xl': { offset: 25, blur: 50, spread: -12, color: 'rgba(0, 0, 0, 0.25)' },\n}\n\n/** X/Y multipliers for each direction; `all` is centered. */\nconst offsets: Record<Direction, [number, number]> = {\n t: [0, -1],\n r: [1, 0],\n b: [0, 1],\n l: [-1, 0],\n all: [0, 0],\n}\n\nfunction createBoxShadow(direction: Direction, size: Size): string {\n const [x, y] = offsets[direction]\n return `${x * size.offset}px ${y * size.offset}px ${size.blur}px ${size.spread}px ${size.color}`\n}\n\nconst sizeEntries = Object.entries(sizes) as Array<[SizeKey, Size]>\n\nconst shadows: BoxShadowStyles = Object.fromEntries(\n directions.flatMap((direction) =>\n sizeEntries.map(([sizeKey, size]) => [\n `${direction}${sizeKey ? `-${sizeKey}` : ''}`,\n { 'box-shadow': createBoxShadow(direction, size) },\n ]),\n ),\n)\n\n/**\n * 规则格式: shadow-[方向][-尺寸]\n *\n * - 方向: `t` / `r` / `b` / `l` / `all`,不写时等同于 `all`\n * - 尺寸: `sm` / `md` / `lg` / `xl` / `2xl`,不写时为默认尺寸\n */\nexport const shadowRules: Rule[] = [\n [\n /^shadow-(?:([trbl]|all)(?:-(sm|md|lg|xl|2xl))?|(sm|md|lg|xl|2xl))$/,\n ([, direction, size, sizeOnly]) => {\n const resolvedSize = size ?? sizeOnly\n const key = `${direction ?? 'all'}${resolvedSize ? `-${resolvedSize}` : ''}`\n return shadows[key]\n },\n ],\n]\n","import type { Rule } from '@unocss/core'\nimport { textSizeRules } from './text'\nimport { createBorderRules } from './border'\nimport { contentVisibilityRules } from './content-visibility'\nimport { shadowRules } from './shadow'\n\ninterface RuleOptions {\n borderColors?: unknown\n}\n\nexport function createRules(options: RuleOptions = {}): Rule[] {\n return [\n ...createBorderRules(options.borderColors),\n ...textSizeRules,\n ...contentVisibilityRules,\n ...shadowRules,\n ]\n}\n","import type { Preset, Variant } from '@unocss/core'\nimport { definePreset } from '@unocss/core'\nimport { shortcuts } from './shortcuts'\nimport { createRules } from './rules'\n\n/**\n * Options accepted by {@link presetUnocss}.\n */\nexport interface PresetUnocssOptions {\n /**\n * Prefix applied to every generated utility, for example `u-`.\n * @default undefined\n */\n prefix?: string\n /**\n * Extra color tokens used by border utilities, in addition to the theme.\n * Useful when tokens are defined through custom UnoCSS rules instead of\n * `theme.colors`, for example `borderColors: borderColorTokens`.\n * @default undefined\n */\n borderColors?: Record<string, unknown>\n}\n\n/**\n * `hocus:` variant matching both `:hover` and `:focus-visible`.\n */\nconst hocusVariant: Variant = {\n name: 'hocus',\n match: (matcher) => {\n if (!matcher.startsWith('hocus:')) return\n return {\n matcher: matcher.slice('hocus:'.length),\n selector: (selector) => `${selector}:hover, ${selector}:focus-visible`,\n }\n },\n}\n\n/**\n *\n * @example\n * ```ts\n * import presetUnocss from '@starweave-lab/unocss-preset'\n *\n * export default defineConfig({\n * presets: [presetWind4(), presetUnocss()],\n * })\n * ```\n */\nexport const presetUnocss = definePreset<PresetUnocssOptions>((options = {}) => {\n const { prefix } = options\n const preset: Preset = {\n name: 'unocss-preset',\n rules: createRules(options),\n variants: [hocusVariant],\n shortcuts,\n prefix: prefix,\n }\n return preset\n})\n\nexport default presetUnocss\n"],"mappings":";;;;;;;;;;AAQA,MAAaA,UAAQ;CACnB,MAAM;CACN,YAAY;CACZ,YAAY;CACZ,aAAa;AACf;;;ACZA,MAAM,cAAc;AACpB,MAAa,WAAW;CAEtB,QACE;CACF,gBACE;CACF,gBACE;CAEF,MAAM;CACN,aAAa;CACb,eAAe;CACf,QAA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