@unocss/preset-wind4 66.1.0-beta.6 → 66.1.0-beta.8
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 +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.mjs +53 -37
- package/dist/postprocess.d.mts +7 -5
- package/dist/postprocess.d.ts +7 -5
- package/dist/postprocess.mjs +2 -42
- package/dist/rules.d.mts +2 -2
- package/dist/rules.d.ts +2 -2
- package/dist/rules.mjs +3 -3
- package/dist/shared/{preset-wind4.fVfslvMN.mjs → preset-wind4.-dZRTBz8.mjs} +1 -1
- package/dist/shared/{preset-wind4.47ZKbxbU.mjs → preset-wind4.B0q3EwQ3.mjs} +39 -11
- package/dist/shared/{preset-wind4.MiZzPO05.d.mts → preset-wind4.BXbWGSRz.d.mts} +3 -1
- package/dist/shared/{preset-wind4.MiZzPO05.d.ts → preset-wind4.BXbWGSRz.d.ts} +3 -1
- package/dist/shared/{preset-wind4.We0XxImM.mjs → preset-wind4.BfiLVsoA.mjs} +32 -24
- package/dist/shared/{preset-wind4.39lqTMpc.mjs → preset-wind4.C100zP13.mjs} +1 -1
- package/dist/shared/{preset-wind4.BJEl798_.d.ts → preset-wind4.Ca5oWgxX.d.ts} +1 -1
- package/dist/shared/{preset-wind4.DIUjJahF.d.mts → preset-wind4.D71xGC6i.d.mts} +1 -1
- package/dist/shared/{preset-wind4.BvXCZB8z.mjs → preset-wind4.DolXDUDJ.mjs} +1 -1
- package/dist/shared/preset-wind4.Pg33yPuf.mjs +57 -0
- package/dist/shortcuts.d.mts +1 -1
- package/dist/shortcuts.d.ts +1 -1
- package/dist/shortcuts.mjs +3 -3
- package/dist/theme.d.mts +2 -2
- package/dist/theme.d.ts +2 -2
- package/dist/utils.d.mts +8 -5
- package/dist/utils.d.ts +8 -5
- package/dist/utils.mjs +11 -1
- package/dist/variants.d.mts +2 -2
- package/dist/variants.d.ts +2 -2
- package/dist/variants.mjs +2 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
|
-
import { Postprocessor, Preflight, Variant, PresetOptions } from '@unocss/core';
|
|
3
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
4
|
-
export { r as rules } from './shared/preset-wind4.
|
|
2
|
+
import { Postprocessor, Preflight, Variant, PresetOptions, Arrayable, CSSEntry, BaseContext } from '@unocss/core';
|
|
3
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
4
|
+
export { r as rules } from './shared/preset-wind4.D71xGC6i.mjs';
|
|
5
5
|
export { shortcuts } from './shortcuts.mjs';
|
|
6
6
|
export { t as theme } from './shared/preset-wind4.BOe5kxIw.mjs';
|
|
7
7
|
|
|
@@ -90,7 +90,16 @@ interface PresetWind4Options extends PresetOptions {
|
|
|
90
90
|
*
|
|
91
91
|
* @default 'on-demand'
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
themePreflight?: boolean | 'on-demand';
|
|
94
|
+
/**
|
|
95
|
+
* Resolve the layer utilits with custom logic.
|
|
96
|
+
*
|
|
97
|
+
* @param utility [key, value] {@link CSSEntry}
|
|
98
|
+
* @param layer Layer name
|
|
99
|
+
* @param ctx base generator context {@link BaseContext<Theme>}
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
utilityResolver?: Arrayable<(utility: CSSEntry, layer: string, ctx: BaseContext<Theme>) => void>;
|
|
94
103
|
}
|
|
95
104
|
declare const presetWind4: _unocss_core.PresetFactory<Theme, PresetWind4Options>;
|
|
96
105
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
|
-
import { Postprocessor, Preflight, Variant, PresetOptions } from '@unocss/core';
|
|
3
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
4
|
-
export { r as rules } from './shared/preset-wind4.
|
|
2
|
+
import { Postprocessor, Preflight, Variant, PresetOptions, Arrayable, CSSEntry, BaseContext } from '@unocss/core';
|
|
3
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
|
|
4
|
+
export { r as rules } from './shared/preset-wind4.Ca5oWgxX.js';
|
|
5
5
|
export { shortcuts } from './shortcuts.js';
|
|
6
6
|
export { t as theme } from './shared/preset-wind4.BOe5kxIw.js';
|
|
7
7
|
|
|
@@ -90,7 +90,16 @@ interface PresetWind4Options extends PresetOptions {
|
|
|
90
90
|
*
|
|
91
91
|
* @default 'on-demand'
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
themePreflight?: boolean | 'on-demand';
|
|
94
|
+
/**
|
|
95
|
+
* Resolve the layer utilits with custom logic.
|
|
96
|
+
*
|
|
97
|
+
* @param utility [key, value] {@link CSSEntry}
|
|
98
|
+
* @param layer Layer name
|
|
99
|
+
* @param ctx base generator context {@link BaseContext<Theme>}
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
utilityResolver?: Arrayable<(utility: CSSEntry, layer: string, ctx: BaseContext<Theme>) => void>;
|
|
94
103
|
}
|
|
95
104
|
declare const presetWind4: _unocss_core.PresetFactory<Theme, PresetWind4Options>;
|
|
96
105
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { LAYER_PREFLIGHTS, definePreset } from '@unocss/core';
|
|
1
|
+
import { LAYER_PREFLIGHTS, toArray, definePreset } from '@unocss/core';
|
|
2
2
|
import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
|
|
3
|
-
import {
|
|
3
|
+
import { b as themeTracking, K as compressCSS, P as PRESET_NAME, z as getThemeByKey, J as hyphenate, p as passThemeKey, j as globalKeywords, t as trackedTheme } from './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
4
4
|
import { alphaPlaceholdersRE } from '@unocss/rule-utils';
|
|
5
|
-
import { postprocessors } from './
|
|
6
|
-
import { l as variants } from './shared/preset-wind4.
|
|
5
|
+
import { p as postprocessors } from './shared/preset-wind4.Pg33yPuf.mjs';
|
|
6
|
+
import { l as variants } from './shared/preset-wind4.-dZRTBz8.mjs';
|
|
7
7
|
import { theme as theme$1 } from './theme.mjs';
|
|
8
|
-
import { s as shortcuts } from './shared/preset-wind4.
|
|
9
|
-
import { r as rules } from './shared/preset-wind4.
|
|
8
|
+
import { s as shortcuts } from './shared/preset-wind4.DolXDUDJ.mjs';
|
|
9
|
+
import { r as rules } from './shared/preset-wind4.BfiLVsoA.mjs';
|
|
10
10
|
import './colors.mjs';
|
|
11
|
-
import './shared/preset-wind4.
|
|
11
|
+
import './shared/preset-wind4.C100zP13.mjs';
|
|
12
12
|
|
|
13
13
|
const resetCSS = `
|
|
14
14
|
/*
|
|
@@ -399,7 +399,7 @@ function reset(options) {
|
|
|
399
399
|
if (options.reset === false)
|
|
400
400
|
return void 0;
|
|
401
401
|
return {
|
|
402
|
-
getCSS: () => {
|
|
402
|
+
getCSS: ({ generator }) => {
|
|
403
403
|
themeTracking("font", "sans");
|
|
404
404
|
themeTracking("font", "mono");
|
|
405
405
|
themeTracking("defaults", ["font", "family"]);
|
|
@@ -408,7 +408,7 @@ function reset(options) {
|
|
|
408
408
|
themeTracking("defaults", ["monoFont", "family"]);
|
|
409
409
|
themeTracking("defaults", ["monoFont", "featureSettings"]);
|
|
410
410
|
themeTracking("defaults", ["monoFont", "variationSettings"]);
|
|
411
|
-
return compressCSS(resetCSS);
|
|
411
|
+
return compressCSS(resetCSS, generator.config.envMode === "dev");
|
|
412
412
|
},
|
|
413
413
|
layer: LAYER_PREFLIGHTS
|
|
414
414
|
};
|
|
@@ -428,24 +428,23 @@ const ExcludeCssVarKeys = [
|
|
|
428
428
|
"media",
|
|
429
429
|
"supports"
|
|
430
430
|
];
|
|
431
|
-
function
|
|
432
|
-
|
|
431
|
+
function getThemeVarsMap(theme2, keys) {
|
|
432
|
+
const themeMap = /* @__PURE__ */ new Map([
|
|
433
|
+
["--spacing", theme2.spacing.DEFAULT]
|
|
434
|
+
]);
|
|
433
435
|
function process(obj, prefix) {
|
|
434
436
|
for (const key in obj) {
|
|
435
437
|
if (key === "DEFAULT" && Object.keys(obj).length === 1) {
|
|
436
|
-
|
|
437
|
-
`;
|
|
438
|
+
themeMap.set(hyphenate(`--${prefix}`), obj[key].replace(alphaPlaceholdersRE, "1"));
|
|
438
439
|
}
|
|
439
440
|
if (passThemeKey.includes(key))
|
|
440
441
|
continue;
|
|
441
442
|
if (Array.isArray(obj[key])) {
|
|
442
|
-
|
|
443
|
-
`;
|
|
443
|
+
themeMap.set(hyphenate(`--${prefix}-${key}`), obj[key].join(",").replace(alphaPlaceholdersRE, "1"));
|
|
444
444
|
} else if (typeof obj[key] === "object") {
|
|
445
445
|
process(obj[key], `${prefix}-${key}`);
|
|
446
446
|
} else {
|
|
447
|
-
|
|
448
|
-
`;
|
|
447
|
+
themeMap.set(hyphenate(`--${prefix}-${key}`), obj[key].replace(alphaPlaceholdersRE, "1"));
|
|
449
448
|
}
|
|
450
449
|
}
|
|
451
450
|
}
|
|
@@ -454,39 +453,56 @@ function themeToCSSVars(theme2, keys) {
|
|
|
454
453
|
continue;
|
|
455
454
|
process(theme2[key], key);
|
|
456
455
|
}
|
|
457
|
-
return
|
|
456
|
+
return themeMap;
|
|
458
457
|
}
|
|
459
458
|
function theme(options) {
|
|
460
459
|
return {
|
|
461
460
|
layer: "theme",
|
|
462
|
-
getCSS(
|
|
463
|
-
|
|
461
|
+
getCSS(ctx) {
|
|
462
|
+
const { theme: theme2, generator } = ctx;
|
|
463
|
+
if (options.themePreflight === false) {
|
|
464
464
|
return void 0;
|
|
465
|
-
}
|
|
465
|
+
}
|
|
466
|
+
let deps;
|
|
467
|
+
const generateCSS = (deps2) => {
|
|
468
|
+
if (options.utilityResolver) {
|
|
469
|
+
const resolver = toArray(options.utilityResolver);
|
|
470
|
+
for (const utility of deps2) {
|
|
471
|
+
for (const r of resolver) {
|
|
472
|
+
r(utility, "theme", ctx);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
const resovledDeps = deps2.map(([key, value]) => key && value ? `${key}: ${value};` : void 0).filter(Boolean);
|
|
477
|
+
if (resovledDeps.length === 0) {
|
|
478
|
+
return void 0;
|
|
479
|
+
}
|
|
480
|
+
const depCSS = resovledDeps.join("\n");
|
|
481
|
+
return compressCSS(`
|
|
482
|
+
:root, :host {
|
|
483
|
+
${depCSS}
|
|
484
|
+
}`, generator.config.envMode === "dev");
|
|
485
|
+
};
|
|
486
|
+
if (options.themePreflight === "on-demand") {
|
|
466
487
|
const self = generator.config.presets.find((p) => p.name === PRESET_NAME);
|
|
467
488
|
if (!self || self.meta.themeDeps.size === 0)
|
|
468
|
-
return;
|
|
469
|
-
|
|
489
|
+
return void 0;
|
|
490
|
+
deps = Array.from(self.meta.themeDeps).map((k) => {
|
|
470
491
|
const [key, prop] = k.split(":");
|
|
471
|
-
|
|
472
|
-
|
|
492
|
+
let v = getThemeByKey(theme2, key, prop.split("-")) ?? getThemeByKey(theme2, key, [prop]);
|
|
493
|
+
if (typeof v === "object") {
|
|
494
|
+
v = v.DEFAULT;
|
|
495
|
+
}
|
|
473
496
|
if (v) {
|
|
474
|
-
return `--${hyphenate(`${key}${prop !== "DEFAULT" ? `-${prop}` : ""}`)}
|
|
497
|
+
return [`--${hyphenate(`${key}${prop !== "DEFAULT" ? `-${prop}` : ""}`)}`, v];
|
|
475
498
|
}
|
|
476
499
|
return void 0;
|
|
477
|
-
});
|
|
478
|
-
return compressCSS(`
|
|
479
|
-
:root {
|
|
480
|
-
${depCSS.filter(Boolean).join("\n")}
|
|
481
|
-
}`);
|
|
500
|
+
}).filter(Boolean);
|
|
482
501
|
} else {
|
|
483
502
|
const keys = Object.keys(theme2).filter((k) => !ExcludeCssVarKeys.includes(k));
|
|
484
|
-
|
|
485
|
-
:root {
|
|
486
|
-
--spacing: ${theme2.spacing.DEFAULT};
|
|
487
|
-
${themeToCSSVars(theme2, keys).trim()}
|
|
488
|
-
}`);
|
|
503
|
+
deps = Array.from(getThemeVarsMap(theme2, keys));
|
|
489
504
|
}
|
|
505
|
+
return generateCSS(deps);
|
|
490
506
|
}
|
|
491
507
|
};
|
|
492
508
|
}
|
|
@@ -514,7 +530,7 @@ const presetWind4 = definePreset((options = {}) => {
|
|
|
514
530
|
options.attributifyPseudo = options.attributifyPseudo ?? false;
|
|
515
531
|
options.variablePrefix = options.variablePrefix ?? "un-";
|
|
516
532
|
options.important = options.important ?? false;
|
|
517
|
-
options.
|
|
533
|
+
options.themePreflight = options.themePreflight ?? "on-demand";
|
|
518
534
|
return {
|
|
519
535
|
name: PRESET_NAME,
|
|
520
536
|
rules,
|
package/dist/postprocess.d.mts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { PresetWind4Options } from './index.mjs';
|
|
2
2
|
export { postprocessors } from './index.mjs';
|
|
3
3
|
import { Postprocessor } from '@unocss/core';
|
|
4
|
-
import './shared/preset-wind4.
|
|
5
|
-
import './shared/preset-wind4.
|
|
4
|
+
import './shared/preset-wind4.BXbWGSRz.mjs';
|
|
5
|
+
import './shared/preset-wind4.D71xGC6i.mjs';
|
|
6
6
|
import './shortcuts.mjs';
|
|
7
7
|
import './shared/preset-wind4.BOe5kxIw.mjs';
|
|
8
8
|
|
|
9
|
-
declare function important(option: PresetWind4Options
|
|
9
|
+
declare function important({ important: option }: PresetWind4Options): Postprocessor[];
|
|
10
10
|
|
|
11
|
-
declare function
|
|
11
|
+
declare function utility({ utilityResolver }: PresetWind4Options): Postprocessor[];
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
declare function varPrefix({ variablePrefix: prefix }: PresetWind4Options): Postprocessor[];
|
|
14
|
+
|
|
15
|
+
export { important, utility, varPrefix };
|
package/dist/postprocess.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { PresetWind4Options } from './index.js';
|
|
2
2
|
export { postprocessors } from './index.js';
|
|
3
3
|
import { Postprocessor } from '@unocss/core';
|
|
4
|
-
import './shared/preset-wind4.
|
|
5
|
-
import './shared/preset-wind4.
|
|
4
|
+
import './shared/preset-wind4.BXbWGSRz.js';
|
|
5
|
+
import './shared/preset-wind4.Ca5oWgxX.js';
|
|
6
6
|
import './shortcuts.js';
|
|
7
7
|
import './shared/preset-wind4.BOe5kxIw.js';
|
|
8
8
|
|
|
9
|
-
declare function important(option: PresetWind4Options
|
|
9
|
+
declare function important({ important: option }: PresetWind4Options): Postprocessor[];
|
|
10
10
|
|
|
11
|
-
declare function
|
|
11
|
+
declare function utility({ utilityResolver }: PresetWind4Options): Postprocessor[];
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
declare function varPrefix({ variablePrefix: prefix }: PresetWind4Options): Postprocessor[];
|
|
14
|
+
|
|
15
|
+
export { important, utility, varPrefix };
|
package/dist/postprocess.mjs
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return [];
|
|
4
|
-
const wrapWithIs = (selector) => {
|
|
5
|
-
if (selector.startsWith(":is(") && selector.endsWith(")"))
|
|
6
|
-
return selector;
|
|
7
|
-
if (selector.includes("::"))
|
|
8
|
-
return selector.replace(/(.*?)((?:\s\*)?::.*)/, ":is($1)$2");
|
|
9
|
-
return `:is(${selector})`;
|
|
10
|
-
};
|
|
11
|
-
return [
|
|
12
|
-
option === true ? (util) => {
|
|
13
|
-
util.entries.forEach((i) => {
|
|
14
|
-
if (i[1] != null && !String(i[1]).endsWith("!important"))
|
|
15
|
-
i[1] += " !important";
|
|
16
|
-
});
|
|
17
|
-
} : (util) => {
|
|
18
|
-
if (!util.selector.startsWith(option))
|
|
19
|
-
util.selector = `${option} ${wrapWithIs(util.selector)}`;
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function varPrefix(prefix) {
|
|
25
|
-
const processor = (obj) => {
|
|
26
|
-
obj.entries.forEach((i) => {
|
|
27
|
-
i[0] = i[0].replace(/^--un-/, `--${prefix}`);
|
|
28
|
-
if (typeof i[1] === "string")
|
|
29
|
-
i[1] = i[1].replace(/var\(--un-/g, `var(--${prefix}`);
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
return prefix !== "un-" ? [processor] : [];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function postprocessors(options) {
|
|
36
|
-
return [
|
|
37
|
-
...important(options.important),
|
|
38
|
-
...varPrefix(options.variablePrefix)
|
|
39
|
-
];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { important, postprocessors, varPrefix };
|
|
1
|
+
export { i as important, p as postprocessors, u as utility, v as varPrefix } from './shared/preset-wind4.Pg33yPuf.mjs';
|
|
2
|
+
import '@unocss/core';
|
package/dist/rules.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Rule, CSSEntries, Shortcut, StaticRule } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
3
|
-
export { r as rules } from './shared/preset-wind4.
|
|
2
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
3
|
+
export { r as rules } from './shared/preset-wind4.D71xGC6i.mjs';
|
|
4
4
|
|
|
5
5
|
declare const verticalAligns: Rule<Theme>[];
|
|
6
6
|
declare const textAligns: Rule<Theme>[];
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Rule, CSSEntries, Shortcut, StaticRule } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
3
|
-
export { r as rules } from './shared/preset-wind4.
|
|
2
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
|
|
3
|
+
export { r as rules } from './shared/preset-wind4.Ca5oWgxX.js';
|
|
4
4
|
|
|
5
5
|
declare const verticalAligns: Rule<Theme>[];
|
|
6
6
|
declare const textAligns: Rule<Theme>[];
|
package/dist/rules.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { d as accents, am as accessibility, H as alignments, a as animations, c as appearance, _ as appearances, U as aspectRatio, aj as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, S as boxShadows, N as boxSizing, a7 as breaks, e as carets, n as colorScheme, p as columns, a0 as contains, a5 as contentVisibility, a6 as contents, aB as cssProperty, aA as cssVariables, $ as cursors, Z as displays, u as divides, al as dynamicViewportHeight, x as filters, y as flex, J as flexGridJustifiesAlignments, L as floats, ac as fontSmoothings, ab as fontStyles, ay as fontVariantNumeric, at as fonts, z as gaps, A as grids, j as handlerBorderStyle, ad as hyphens, i as imageRenderings, K as insets, ah as isolations, F as justifies, C as lineClamps, l as listStyle, W as margins, ak as mixBlendModes, Y as notLastChildSelector, ai as objectPositions, k as opacity, G as orders, o as outline, B as overflows, f as overscrolls, V as paddings, D as placeholders, I as placements, a1 as pointerEvents, E as positions, O as questionMark, a2 as resizes, P as rings, r as rules, ag as screenReadersAccess, s as scrollBehaviors, Q as scrolls, R as shadowProperties, T as sizes, X as spaces, az as splitShorthand, an as svgUtilities, au as tabSizes, ao as tables, t as textAligns, q as textDecorations, av as textIndents, a9 as textOverflows, ax as textShadows, aw as textStrokes, aa as textTransforms, a8 as textWraps, ap as touchActions, aq as transformBase, ar as transforms, as as transitions, a3 as userSelects, v as verticalAligns, aC as viewTransition, a4 as whitespaces, w as willChange, ae as writingModes, af as writingOrientations, M as zIndexes } from './shared/preset-wind4.
|
|
2
|
-
export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.
|
|
3
|
-
import './shared/preset-wind4.
|
|
1
|
+
export { d as accents, am as accessibility, H as alignments, a as animations, c as appearance, _ as appearances, U as aspectRatio, aj as backgroundBlendModes, b as backgroundStyles, m as bgColors, g as borderStyles, h as borders, S as boxShadows, N as boxSizing, a7 as breaks, e as carets, n as colorScheme, p as columns, a0 as contains, a5 as contentVisibility, a6 as contents, aB as cssProperty, aA as cssVariables, $ as cursors, Z as displays, u as divides, al as dynamicViewportHeight, x as filters, y as flex, J as flexGridJustifiesAlignments, L as floats, ac as fontSmoothings, ab as fontStyles, ay as fontVariantNumeric, at as fonts, z as gaps, A as grids, j as handlerBorderStyle, ad as hyphens, i as imageRenderings, K as insets, ah as isolations, F as justifies, C as lineClamps, l as listStyle, W as margins, ak as mixBlendModes, Y as notLastChildSelector, ai as objectPositions, k as opacity, G as orders, o as outline, B as overflows, f as overscrolls, V as paddings, D as placeholders, I as placements, a1 as pointerEvents, E as positions, O as questionMark, a2 as resizes, P as rings, r as rules, ag as screenReadersAccess, s as scrollBehaviors, Q as scrolls, R as shadowProperties, T as sizes, X as spaces, az as splitShorthand, an as svgUtilities, au as tabSizes, ao as tables, t as textAligns, q as textDecorations, av as textIndents, a9 as textOverflows, ax as textShadows, aw as textStrokes, aa as textTransforms, a8 as textWraps, ap as touchActions, aq as transformBase, ar as transforms, as as transitions, a3 as userSelects, v as verticalAligns, aC as viewTransition, a4 as whitespaces, w as willChange, ae as writingModes, af as writingOrientations, M as zIndexes } from './shared/preset-wind4.BfiLVsoA.mjs';
|
|
2
|
+
export { a as container, c as containerParent, b as containerShortcuts } from './shared/preset-wind4.C100zP13.mjs';
|
|
3
|
+
import './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
4
4
|
import '@unocss/core';
|
|
5
5
|
import '@unocss/rule-utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { variantGetParameter, variantMatcher, variantGetBracket, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent } from '@unocss/rule-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { c as h, r as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE, k as cssMathFnRE, l as cssVarFnRE, B as hasParseableColor } from './preset-wind4.B0q3EwQ3.mjs';
|
|
3
3
|
import { escapeRegExp, escapeSelector } from '@unocss/core';
|
|
4
4
|
|
|
5
5
|
const variantAria = {
|
|
@@ -140,6 +140,7 @@ const unitOnlyMap = {
|
|
|
140
140
|
};
|
|
141
141
|
const bracketTypeRe = /^\[(color|image|length|size|position|quoted|string):/i;
|
|
142
142
|
const splitComma = /,(?![^()]*\))/g;
|
|
143
|
+
const remRE = /(-?[.\d]+)rem/g;
|
|
143
144
|
|
|
144
145
|
const cssProps = [
|
|
145
146
|
// basic props
|
|
@@ -505,12 +506,15 @@ function colorCSSGenerator(data, property, varName, ctx) {
|
|
|
505
506
|
} else {
|
|
506
507
|
const alphaKey = `--un-${varName}-opacity`;
|
|
507
508
|
const value = key ? `var(--colors-${key})` : color;
|
|
508
|
-
if (key) {
|
|
509
|
-
themeTracking(`colors`, key);
|
|
510
|
-
}
|
|
511
509
|
css[alphaKey] = alpha;
|
|
512
510
|
css[property] = `color-mix(in oklch, ${value} var(${alphaKey}), transparent)${rawColorComment}`;
|
|
513
511
|
result.push(defineProperty(alphaKey, { syntax: "<percentage>", initialValue: "100%" }));
|
|
512
|
+
if (key) {
|
|
513
|
+
themeTracking(`colors`, key);
|
|
514
|
+
}
|
|
515
|
+
if (ctx?.theme) {
|
|
516
|
+
detectThemeValue(color, ctx.theme);
|
|
517
|
+
}
|
|
514
518
|
}
|
|
515
519
|
return result;
|
|
516
520
|
}
|
|
@@ -571,10 +575,16 @@ function parseThemeColor(theme, keys) {
|
|
|
571
575
|
no = scale;
|
|
572
576
|
_keys = keys.slice(0, -1);
|
|
573
577
|
}
|
|
574
|
-
const colorData =
|
|
578
|
+
const colorData = getThemeByKey(theme, "colors", _keys);
|
|
575
579
|
if (typeof colorData === "object") {
|
|
576
|
-
|
|
577
|
-
|
|
580
|
+
if (no && colorData[no]) {
|
|
581
|
+
color = colorData[no];
|
|
582
|
+
key = [..._keys, no].join("-");
|
|
583
|
+
} else if (!no && colorData.DEFAULT) {
|
|
584
|
+
color = colorData.DEFAULT;
|
|
585
|
+
no = "DEFAULT";
|
|
586
|
+
key = _keys.join("-");
|
|
587
|
+
}
|
|
578
588
|
} else if (typeof colorData === "string" && !no) {
|
|
579
589
|
color = colorData;
|
|
580
590
|
key = _keys.join("-");
|
|
@@ -587,15 +597,18 @@ function parseThemeColor(theme, keys) {
|
|
|
587
597
|
key
|
|
588
598
|
};
|
|
589
599
|
}
|
|
590
|
-
function
|
|
591
|
-
let obj = theme
|
|
600
|
+
function getThemeByKey(theme, themeKey, keys) {
|
|
601
|
+
let obj = theme[themeKey];
|
|
592
602
|
let index = -1;
|
|
593
603
|
for (const k of keys) {
|
|
594
604
|
index += 1;
|
|
595
605
|
if (obj && typeof obj !== "string") {
|
|
596
|
-
const camel = keys.slice(index).join("-")
|
|
606
|
+
const camel = camelize(keys.slice(index).join("-"));
|
|
597
607
|
if (obj[camel])
|
|
598
608
|
return obj[camel];
|
|
609
|
+
const hyphen = keys.slice(index).join("-");
|
|
610
|
+
if (obj[hyphen])
|
|
611
|
+
return obj[hyphen];
|
|
599
612
|
if (obj[k]) {
|
|
600
613
|
obj = obj[k];
|
|
601
614
|
continue;
|
|
@@ -650,7 +663,9 @@ function camelize(str) {
|
|
|
650
663
|
function hyphenate(str) {
|
|
651
664
|
return str.replace(/(?:^|\B)([A-Z])/g, "-$1").toLowerCase();
|
|
652
665
|
}
|
|
653
|
-
function compressCSS(css) {
|
|
666
|
+
function compressCSS(css, isDev = false) {
|
|
667
|
+
if (isDev)
|
|
668
|
+
return css.trim();
|
|
654
669
|
return css.trim().replace(/\s+/g, " ").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
655
670
|
}
|
|
656
671
|
function defineProperty(property, options = {}) {
|
|
@@ -661,5 +676,18 @@ function defineProperty(property, options = {}) {
|
|
|
661
676
|
} = options;
|
|
662
677
|
return `@property ${property} {syntax: "${syntax}";inherits: ${inherits};${initialValue != null ? `initial-value: ${initialValue};` : ""}}`;
|
|
663
678
|
}
|
|
679
|
+
function detectThemeValue(value, theme) {
|
|
680
|
+
if (value.startsWith("var(")) {
|
|
681
|
+
const variable = value.match(/var\(--([\w-]+)(?:,.*)?\)/)?.[1];
|
|
682
|
+
if (variable) {
|
|
683
|
+
const [key, ...path] = variable.split("-");
|
|
684
|
+
const themeValue = getThemeByKey(theme, key, path);
|
|
685
|
+
if (themeValue != null) {
|
|
686
|
+
themeTracking(key, path);
|
|
687
|
+
detectThemeValue(themeValue, theme);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
664
692
|
|
|
665
|
-
export {
|
|
693
|
+
export { colorVariable as A, hasParseableColor as B, CONTROL_MINI_NO_NEGATIVE as C, resolveVerticalBreakpoints as D, makeGlobalStaticRules as E, isCSSMathFn as F, isSize as G, transformXYZ as H, camelize as I, hyphenate as J, compressCSS as K, defineProperty as L, detectThemeValue as M, bracketTypeRe as N, PRESET_NAME as P, SpecialColorKey as S, remRE as a, themeTracking as b, h as c, directionMap as d, cornerMap as e, xyzArray as f, positionMap as g, handler as h, insetMap as i, globalKeywords as j, cssMathFnRE as k, cssVarFnRE as l, directionSize as m, numberResolver as n, colorableShadows as o, passThemeKey as p, colorCSSGenerator as q, resolveBreakpoints as r, splitShorthand as s, trackedTheme as t, colorResolver as u, valueHandlers as v, parseColor as w, xyzMap as x, parseThemeColor as y, getThemeByKey as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as globalKeywords, c as h, E as makeGlobalStaticRules, g as positionMap, w as parseColor, S as SpecialColorKey, L as defineProperty, b as themeTracking, M as detectThemeValue, u as colorResolver, F as isCSSMathFn, d as directionMap, B as hasParseableColor, e as cornerMap, p as passThemeKey, q as colorCSSGenerator, G as isSize, m as directionSize, n as numberResolver, o as colorableShadows, i as insetMap, J as hyphenate, r as resolveBreakpoints, H as transformXYZ, x as xyzMap, N as bracketTypeRe } from './preset-wind4.B0q3EwQ3.mjs';
|
|
2
2
|
import { notNull, uniq } from '@unocss/core';
|
|
3
|
-
import { a as container, c as containerParent } from './preset-wind4.
|
|
3
|
+
import { a as container, c as containerParent } from './preset-wind4.C100zP13.mjs';
|
|
4
4
|
import { getStringComponent } from '@unocss/rule-utils';
|
|
5
5
|
|
|
6
6
|
const verticalAlignAlias = {
|
|
@@ -138,13 +138,21 @@ function bgGradientColorResolver() {
|
|
|
138
138
|
const data = parseColor(body, theme);
|
|
139
139
|
if (data) {
|
|
140
140
|
const { color, key, alpha } = data;
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
if (color) {
|
|
142
|
+
if (Object.values(SpecialColorKey).includes(color)) {
|
|
143
|
+
css[`--un-gradient-${position}`] = color;
|
|
144
|
+
} else {
|
|
145
|
+
css[`--un-${position}-opacity`] = alpha;
|
|
146
|
+
const value = key ? `var(--colors-${key})` : color;
|
|
147
|
+
css[`--un-gradient-${position}`] = `color-mix(in oklab, ${value} var(--un-${position}-opacity), transparent)`;
|
|
148
|
+
yield defineProperty(`--un-${position}-opacity`, { syntax: "<percentage>", initialValue: "100%" });
|
|
149
|
+
}
|
|
150
|
+
if (key) {
|
|
151
|
+
themeTracking(`colors`, key);
|
|
152
|
+
}
|
|
153
|
+
if (theme) {
|
|
154
|
+
detectThemeValue(color, theme);
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
} else {
|
|
150
158
|
css[`--un-gradient-${position}`] = h.bracket.cssvar(body);
|
|
@@ -428,9 +436,9 @@ const borders = [
|
|
|
428
436
|
[/^(?:border|b)-([bi][se])-(?:style-)?(.+)$/, handlerBorderStyle]
|
|
429
437
|
];
|
|
430
438
|
function borderColorResolver(direction) {
|
|
431
|
-
return ([, body],
|
|
432
|
-
const data = parseColor(body, theme);
|
|
433
|
-
const result = colorCSSGenerator(data, `border${direction}-color`, "border");
|
|
439
|
+
return ([, body], ctx) => {
|
|
440
|
+
const data = parseColor(body, ctx.theme);
|
|
441
|
+
const result = colorCSSGenerator(data, `border${direction}-color`, "border", ctx);
|
|
434
442
|
if (result) {
|
|
435
443
|
const css = result[0];
|
|
436
444
|
if (data?.color && !Object.values(SpecialColorKey).includes(data.color) && direction && direction !== "") {
|
|
@@ -450,7 +458,7 @@ function handlerBorderColorOrSize([, a = "", b], ctx) {
|
|
|
450
458
|
if (isCSSMathFn(h.bracket(b)))
|
|
451
459
|
return handlerBorderSize(["", a, b]);
|
|
452
460
|
if (hasParseableColor(b, ctx.theme)) {
|
|
453
|
-
return directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx
|
|
461
|
+
return directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx)).filter(notNull).reduce((acc, item) => {
|
|
454
462
|
Object.assign(acc[0], item[0]);
|
|
455
463
|
acc[1] = uniq([acc[1], item[1]]).join("");
|
|
456
464
|
return acc.filter(Boolean);
|
|
@@ -715,7 +723,7 @@ const filterBaseKeys = [
|
|
|
715
723
|
"drop-shadow"
|
|
716
724
|
];
|
|
717
725
|
const filterProperties = filterBaseKeys.map((i) => defineProperty(`--un-${i}`)).join("\n");
|
|
718
|
-
const filterCSS = filterBaseKeys.map((i) => `var(--un-${i})`).join(" ");
|
|
726
|
+
const filterCSS = filterBaseKeys.map((i) => `var(--un-${i},)`).join(" ");
|
|
719
727
|
const backdropBaseKeys = [
|
|
720
728
|
"backdrop-blur",
|
|
721
729
|
"backdrop-brightness",
|
|
@@ -728,7 +736,7 @@ const backdropBaseKeys = [
|
|
|
728
736
|
"backdrop-sepia"
|
|
729
737
|
];
|
|
730
738
|
const backdropProperties = backdropBaseKeys.map((i) => defineProperty(`--un-${i}`)).join("\n");
|
|
731
|
-
const backdropCSS = backdropBaseKeys.map((i) => `var(--un-${i})`).join(" ");
|
|
739
|
+
const backdropCSS = backdropBaseKeys.map((i) => `var(--un-${i},)`).join(" ");
|
|
732
740
|
function percentWithDefault(str) {
|
|
733
741
|
let v = h.bracket.cssvar(str || "");
|
|
734
742
|
if (v != null)
|
|
@@ -1163,19 +1171,19 @@ const shadowProperties = {
|
|
|
1163
1171
|
insetRingColor: defineProperty("--un-inset-ring-color"),
|
|
1164
1172
|
insetRingShadow: defineProperty("--un-inset-ring-shadow", { initialValue: "0 0 #0000" }),
|
|
1165
1173
|
ringInset: defineProperty("--un-ring-inset"),
|
|
1166
|
-
ringOffsetWidth: defineProperty("--un-ring-offset-width", { syntax:
|
|
1174
|
+
ringOffsetWidth: defineProperty("--un-ring-offset-width", { syntax: "<length>", initialValue: "0px" }),
|
|
1167
1175
|
ringOffsetColor: defineProperty("--un-ring-offset-color"),
|
|
1168
1176
|
ringOffsetShadow: defineProperty("--un-ring-offset-shadow", { initialValue: "0 0 #0000" })
|
|
1169
1177
|
};
|
|
1170
1178
|
const boxShadows = [
|
|
1171
1179
|
// shadow
|
|
1172
|
-
[/^shadow(?:-(.+))?$/,
|
|
1180
|
+
[/^shadow(?:-(.+))?$/, handleShadow("shadow"), { autocomplete: ["shadow-$colors", "shadow-$shadow"] }],
|
|
1173
1181
|
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
1174
1182
|
// inset shadow
|
|
1175
|
-
[/^inset-shadow(?:-(.+))?$/,
|
|
1183
|
+
[/^inset-shadow(?:-(.+))?$/, handleShadow("insetShadow"), { autocomplete: ["inset-shadow-$colors", "inset-shadow-$insetShadow"] }],
|
|
1176
1184
|
[/^inset-shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-inset-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }]
|
|
1177
1185
|
];
|
|
1178
|
-
function
|
|
1186
|
+
function handleShadow(themeKey) {
|
|
1179
1187
|
return (match, ctx) => {
|
|
1180
1188
|
const [, d] = match;
|
|
1181
1189
|
const { theme } = ctx;
|
|
@@ -1188,7 +1196,7 @@ function hanldeShadow(themeKey) {
|
|
|
1188
1196
|
"--un-shadow": colorableShadows(v || c, `--un-${colorVar}-color`).join(","),
|
|
1189
1197
|
"box-shadow": "var(--un-inset-shadow), var(--un-inset-ring-shadow), var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
|
|
1190
1198
|
},
|
|
1191
|
-
Object.values(shadowProperties)
|
|
1199
|
+
...Object.values(shadowProperties)
|
|
1192
1200
|
];
|
|
1193
1201
|
}
|
|
1194
1202
|
return colorResolver(`--un-${colorVar}-color`, colorVar)(match, ctx);
|
|
@@ -1202,7 +1210,7 @@ const rings = [
|
|
|
1202
1210
|
if (v != null) {
|
|
1203
1211
|
return [
|
|
1204
1212
|
{
|
|
1205
|
-
"--un-ring-shadow": `var(--un-ring-inset) 0 0 0 calc(${v} + var(--un-ring-offset-width)) var(--un-ring-color, currentColor)`,
|
|
1213
|
+
"--un-ring-shadow": `var(--un-ring-inset,) 0 0 0 calc(${v} + var(--un-ring-offset-width)) var(--un-ring-color, currentColor)`,
|
|
1206
1214
|
"box-shadow": "var(--un-inset-shadow), var(--un-inset-ring-shadow), var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)"
|
|
1207
1215
|
},
|
|
1208
1216
|
Object.values(shadowProperties).join("\n")
|
|
@@ -1965,12 +1973,12 @@ const transitions = [
|
|
|
1965
1973
|
([, d]) => ({ "transition-delay": h.bracket.cssvar.time(d) })
|
|
1966
1974
|
],
|
|
1967
1975
|
[
|
|
1968
|
-
/^(?:transition-)?ease
|
|
1969
|
-
([, d], { theme }) => {
|
|
1976
|
+
/^(?:transition-)?ease(?:-(.+))?$/,
|
|
1977
|
+
([, d = "DEFAULT"], { theme }) => {
|
|
1970
1978
|
let v;
|
|
1971
1979
|
if (theme.ease?.[d]) {
|
|
1972
1980
|
themeTracking("ease", d);
|
|
1973
|
-
v = `var(--ease
|
|
1981
|
+
v = `var(--ease${d === "DEFAULT" ? "" : `-${d}`})`;
|
|
1974
1982
|
} else {
|
|
1975
1983
|
v = h.bracket.cssvar(d);
|
|
1976
1984
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isString } from '@unocss/core';
|
|
2
|
-
import {
|
|
2
|
+
import { r as resolveBreakpoints } from './preset-wind4.B0q3EwQ3.mjs';
|
|
3
3
|
|
|
4
4
|
const containerParent = [
|
|
5
5
|
[/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { toArray } from '@unocss/core';
|
|
2
|
+
|
|
3
|
+
function important({ important: option }) {
|
|
4
|
+
if (option == null || option === false)
|
|
5
|
+
return [];
|
|
6
|
+
const wrapWithIs = (selector) => {
|
|
7
|
+
if (selector.startsWith(":is(") && selector.endsWith(")"))
|
|
8
|
+
return selector;
|
|
9
|
+
if (selector.includes("::"))
|
|
10
|
+
return selector.replace(/(.*?)((?:\s\*)?::.*)/, ":is($1)$2");
|
|
11
|
+
return `:is(${selector})`;
|
|
12
|
+
};
|
|
13
|
+
return [
|
|
14
|
+
option === true ? (util) => {
|
|
15
|
+
util.entries.forEach((i) => {
|
|
16
|
+
if (i[1] != null && !String(i[1]).endsWith("!important"))
|
|
17
|
+
i[1] += " !important";
|
|
18
|
+
});
|
|
19
|
+
} : (util) => {
|
|
20
|
+
if (!util.selector.startsWith(option))
|
|
21
|
+
util.selector = `${option} ${wrapWithIs(util.selector)}`;
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function utility({ utilityResolver }) {
|
|
27
|
+
const processor = (util) => {
|
|
28
|
+
const resolvers = toArray(utilityResolver);
|
|
29
|
+
util.entries.forEach((i) => {
|
|
30
|
+
for (const resolver of resolvers) {
|
|
31
|
+
resolver(i, "default", {});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return utilityResolver ? [processor] : [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function varPrefix({ variablePrefix: prefix }) {
|
|
39
|
+
const processor = (obj) => {
|
|
40
|
+
obj.entries.forEach((i) => {
|
|
41
|
+
i[0] = i[0].replace(/^--un-/, `--${prefix}`);
|
|
42
|
+
if (typeof i[1] === "string")
|
|
43
|
+
i[1] = i[1].replace(/var\(--un-/g, `var(--${prefix}`);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return prefix !== "un-" ? [processor] : [];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function postprocessors(options) {
|
|
50
|
+
return [
|
|
51
|
+
important,
|
|
52
|
+
varPrefix,
|
|
53
|
+
utility
|
|
54
|
+
].flatMap((i) => i(options));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { important as i, postprocessors as p, utility as u, varPrefix as v };
|
package/dist/shortcuts.d.mts
CHANGED
package/dist/shortcuts.d.ts
CHANGED
package/dist/shortcuts.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { s as shortcuts } from './shared/preset-wind4.
|
|
2
|
-
import './shared/preset-wind4.
|
|
1
|
+
export { s as shortcuts } from './shared/preset-wind4.DolXDUDJ.mjs';
|
|
2
|
+
import './shared/preset-wind4.C100zP13.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
|
-
import './shared/preset-wind4.
|
|
4
|
+
import './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
5
5
|
import '@unocss/rule-utils';
|
package/dist/theme.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { colors } from './colors.mjs';
|
|
2
2
|
export { t as theme } from './shared/preset-wind4.BOe5kxIw.mjs';
|
|
3
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
4
|
-
export { C as Colors, a as ThemeAnimation } from './shared/preset-wind4.
|
|
3
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
4
|
+
export { C as Colors, a as ThemeAnimation } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
5
5
|
|
|
6
6
|
declare const animation: {
|
|
7
7
|
keyframes: {
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { colors } from './colors.js';
|
|
2
2
|
export { t as theme } from './shared/preset-wind4.BOe5kxIw.js';
|
|
3
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
4
|
-
export { C as Colors, a as ThemeAnimation } from './shared/preset-wind4.
|
|
3
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
|
|
4
|
+
export { C as Colors, a as ThemeAnimation } from './shared/preset-wind4.BXbWGSRz.js';
|
|
5
5
|
|
|
6
6
|
declare const animation: {
|
|
7
7
|
keyframes: {
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Arrayable, DynamicMatcher, RuleContext, CSSObject, CSSValueInput, VariantContext, StaticRule } from '@unocss/core';
|
|
1
|
+
import { Arrayable, CSSEntry, DynamicMatcher, RuleContext, CSSObject, CSSValueInput, VariantContext, StaticRule } from '@unocss/core';
|
|
2
2
|
import * as _unocss_rule_utils from '@unocss/rule-utils';
|
|
3
3
|
export * from '@unocss/rule-utils';
|
|
4
|
-
import { T as Theme
|
|
4
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
5
5
|
|
|
6
6
|
declare const PRESET_NAME = "@unocss/preset-wind4";
|
|
7
7
|
/** Keys will not appear in the theme variable. */
|
|
@@ -70,6 +70,8 @@ declare const globalKeywords: string[];
|
|
|
70
70
|
declare const cssMathFnRE: RegExp;
|
|
71
71
|
declare const cssVarFnRE: RegExp;
|
|
72
72
|
|
|
73
|
+
declare function createRemToPxResolver(base?: number): (utility: CSSEntry) => void;
|
|
74
|
+
|
|
73
75
|
declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
74
76
|
declare const SpecialColorKey: {
|
|
75
77
|
transparent: string;
|
|
@@ -121,7 +123,7 @@ declare function parseThemeColor(theme: Theme, keys: string[]): {
|
|
|
121
123
|
no: string | undefined;
|
|
122
124
|
key: string | undefined;
|
|
123
125
|
} | undefined;
|
|
124
|
-
declare function
|
|
126
|
+
declare function getThemeByKey(theme: Theme, themeKey: keyof Theme, keys: string[]): any;
|
|
125
127
|
declare function colorVariable(str: string, varName: string): string;
|
|
126
128
|
declare function hasParseableColor(color: string | undefined, theme: Theme): boolean;
|
|
127
129
|
declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>, key?: 'breakpoint' | 'verticalBreakpoint'): {
|
|
@@ -138,11 +140,12 @@ declare function isSize(str: string): boolean;
|
|
|
138
140
|
declare function transformXYZ(d: string, v: string, name: string): [string, string][];
|
|
139
141
|
declare function camelize(str: string): string;
|
|
140
142
|
declare function hyphenate(str: string): string;
|
|
141
|
-
declare function compressCSS(css: string): string;
|
|
143
|
+
declare function compressCSS(css: string, isDev?: boolean): string;
|
|
142
144
|
declare function defineProperty(property: string, options?: {
|
|
143
145
|
syntax?: string;
|
|
144
146
|
inherits?: boolean;
|
|
145
147
|
initialValue?: unknown;
|
|
146
148
|
}): string;
|
|
149
|
+
declare function detectThemeValue(value: string, theme: Theme): void;
|
|
147
150
|
|
|
148
|
-
export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, cssMathFnRE, cssVarFnRE, defineProperty, directionMap, directionSize,
|
|
151
|
+
export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, createRemToPxResolver, cssMathFnRE, cssVarFnRE, defineProperty, detectThemeValue, directionMap, directionSize, getThemeByKey, globalKeywords, h, handler, hasParseableColor, hyphenate, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, numberResolver, parseColor, parseThemeColor, passThemeKey, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, themeTracking, trackedTheme, transformXYZ, handlers as valueHandlers, xyzArray, xyzMap };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Arrayable, DynamicMatcher, RuleContext, CSSObject, CSSValueInput, VariantContext, StaticRule } from '@unocss/core';
|
|
1
|
+
import { Arrayable, CSSEntry, DynamicMatcher, RuleContext, CSSObject, CSSValueInput, VariantContext, StaticRule } from '@unocss/core';
|
|
2
2
|
import * as _unocss_rule_utils from '@unocss/rule-utils';
|
|
3
3
|
export * from '@unocss/rule-utils';
|
|
4
|
-
import { T as Theme
|
|
4
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
|
|
5
5
|
|
|
6
6
|
declare const PRESET_NAME = "@unocss/preset-wind4";
|
|
7
7
|
/** Keys will not appear in the theme variable. */
|
|
@@ -70,6 +70,8 @@ declare const globalKeywords: string[];
|
|
|
70
70
|
declare const cssMathFnRE: RegExp;
|
|
71
71
|
declare const cssVarFnRE: RegExp;
|
|
72
72
|
|
|
73
|
+
declare function createRemToPxResolver(base?: number): (utility: CSSEntry) => void;
|
|
74
|
+
|
|
73
75
|
declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
|
|
74
76
|
declare const SpecialColorKey: {
|
|
75
77
|
transparent: string;
|
|
@@ -121,7 +123,7 @@ declare function parseThemeColor(theme: Theme, keys: string[]): {
|
|
|
121
123
|
no: string | undefined;
|
|
122
124
|
key: string | undefined;
|
|
123
125
|
} | undefined;
|
|
124
|
-
declare function
|
|
126
|
+
declare function getThemeByKey(theme: Theme, themeKey: keyof Theme, keys: string[]): any;
|
|
125
127
|
declare function colorVariable(str: string, varName: string): string;
|
|
126
128
|
declare function hasParseableColor(color: string | undefined, theme: Theme): boolean;
|
|
127
129
|
declare function resolveBreakpoints({ theme, generator }: Readonly<VariantContext<Theme>>, key?: 'breakpoint' | 'verticalBreakpoint'): {
|
|
@@ -138,11 +140,12 @@ declare function isSize(str: string): boolean;
|
|
|
138
140
|
declare function transformXYZ(d: string, v: string, name: string): [string, string][];
|
|
139
141
|
declare function camelize(str: string): string;
|
|
140
142
|
declare function hyphenate(str: string): string;
|
|
141
|
-
declare function compressCSS(css: string): string;
|
|
143
|
+
declare function compressCSS(css: string, isDev?: boolean): string;
|
|
142
144
|
declare function defineProperty(property: string, options?: {
|
|
143
145
|
syntax?: string;
|
|
144
146
|
inherits?: boolean;
|
|
145
147
|
initialValue?: unknown;
|
|
146
148
|
}): string;
|
|
149
|
+
declare function detectThemeValue(value: string, theme: Theme): void;
|
|
147
150
|
|
|
148
|
-
export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, cssMathFnRE, cssVarFnRE, defineProperty, directionMap, directionSize,
|
|
151
|
+
export { CONTROL_MINI_NO_NEGATIVE, PRESET_NAME, SpecialColorKey, camelize, colorCSSGenerator, colorResolver, colorVariable, colorableShadows, compressCSS, cornerMap, createRemToPxResolver, cssMathFnRE, cssVarFnRE, defineProperty, detectThemeValue, directionMap, directionSize, getThemeByKey, globalKeywords, h, handler, hasParseableColor, hyphenate, insetMap, isCSSMathFn, isSize, makeGlobalStaticRules, numberResolver, parseColor, parseThemeColor, passThemeKey, positionMap, resolveBreakpoints, resolveVerticalBreakpoints, splitShorthand, themeTracking, trackedTheme, transformXYZ, handlers as valueHandlers, xyzArray, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as remRE } from './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
2
|
+
export { C as CONTROL_MINI_NO_NEGATIVE, P as PRESET_NAME, S as SpecialColorKey, I as camelize, q as colorCSSGenerator, u as colorResolver, A as colorVariable, o as colorableShadows, K as compressCSS, e as cornerMap, k as cssMathFnRE, l as cssVarFnRE, L as defineProperty, M as detectThemeValue, d as directionMap, m as directionSize, z as getThemeByKey, j as globalKeywords, c as h, h as handler, B as hasParseableColor, J as hyphenate, i as insetMap, F as isCSSMathFn, G as isSize, E as makeGlobalStaticRules, n as numberResolver, w as parseColor, y as parseThemeColor, p as passThemeKey, g as positionMap, r as resolveBreakpoints, D as resolveVerticalBreakpoints, s as splitShorthand, b as themeTracking, t as trackedTheme, H as transformXYZ, v as valueHandlers, f as xyzArray, x as xyzMap } from './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
2
3
|
export * from '@unocss/rule-utils';
|
|
3
4
|
import '@unocss/core';
|
|
5
|
+
|
|
6
|
+
function createRemToPxResolver(base = 16) {
|
|
7
|
+
return (utility) => {
|
|
8
|
+
if (typeof utility[1] === "string" && remRE.test(utility[1]))
|
|
9
|
+
utility[1] = utility[1].replace(remRE, (_, p1) => `${p1 * base}px`);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createRemToPxResolver };
|
package/dist/variants.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantObject, Variant, VariantFunction } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
2
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.mjs';
|
|
3
3
|
import { PresetWind4Options } from './index.mjs';
|
|
4
4
|
export { variants } from './index.mjs';
|
|
5
|
-
import './shared/preset-wind4.
|
|
5
|
+
import './shared/preset-wind4.D71xGC6i.mjs';
|
|
6
6
|
import './shortcuts.mjs';
|
|
7
7
|
import './shared/preset-wind4.BOe5kxIw.mjs';
|
|
8
8
|
|
package/dist/variants.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantObject, Variant, VariantFunction } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './shared/preset-wind4.
|
|
2
|
+
import { T as Theme } from './shared/preset-wind4.BXbWGSRz.js';
|
|
3
3
|
import { PresetWind4Options } from './index.js';
|
|
4
4
|
export { variants } from './index.js';
|
|
5
|
-
import './shared/preset-wind4.
|
|
5
|
+
import './shared/preset-wind4.Ca5oWgxX.js';
|
|
6
6
|
import './shortcuts.js';
|
|
7
7
|
import './shared/preset-wind4.BOe5kxIw.js';
|
|
8
8
|
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as calcMaxWidthBySize, D as placeholderModifier, v as variantAria, b as variantBreakpoints, d as variantChildren, h as variantColorsMediaOrClass, i as variantColorsScheme, e as variantCombinators, g as variantContainerQuery, q as variantContrasts, w as variantCssLayer, p as variantCustomMedia, j as variantDataAttribute, t as variantForcedColors, n as variantImportant, x as variantInternalLayer, m as variantLanguageDirections, r as variantMotions, C as variantNegative, s as variantOrientations, H as variantPartClasses, o as variantPrint, F as variantPseudoClassFunctions, E as variantPseudoClassesAndElements, y as variantScope, u as variantSelector, I as variantStartingStyle, B as variantStickyHover, J as variantSupports, f as variantSvgCombinators, a as variantTaggedAriaAttributes, k as variantTaggedDataAttributes, G as variantTaggedPseudoClasses, A as variantTheme, z as variantVariables, l as variants } from './shared/preset-wind4.
|
|
1
|
+
export { c as calcMaxWidthBySize, D as placeholderModifier, v as variantAria, b as variantBreakpoints, d as variantChildren, h as variantColorsMediaOrClass, i as variantColorsScheme, e as variantCombinators, g as variantContainerQuery, q as variantContrasts, w as variantCssLayer, p as variantCustomMedia, j as variantDataAttribute, t as variantForcedColors, n as variantImportant, x as variantInternalLayer, m as variantLanguageDirections, r as variantMotions, C as variantNegative, s as variantOrientations, H as variantPartClasses, o as variantPrint, F as variantPseudoClassFunctions, E as variantPseudoClassesAndElements, y as variantScope, u as variantSelector, I as variantStartingStyle, B as variantStickyHover, J as variantSupports, f as variantSvgCombinators, a as variantTaggedAriaAttributes, k as variantTaggedDataAttributes, G as variantTaggedPseudoClasses, A as variantTheme, z as variantVariables, l as variants } from './shared/preset-wind4.-dZRTBz8.mjs';
|
|
2
2
|
import '@unocss/rule-utils';
|
|
3
|
-
import './shared/preset-wind4.
|
|
3
|
+
import './shared/preset-wind4.B0q3EwQ3.mjs';
|
|
4
4
|
import '@unocss/core';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind4",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.1.0-beta.
|
|
4
|
+
"version": "66.1.0-beta.8",
|
|
5
5
|
"description": "Tailwind 4 compact preset for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@unocss/core": "66.1.0-beta.
|
|
69
|
-
"@unocss/extractor-arbitrary-variants": "66.1.0-beta.
|
|
70
|
-
"@unocss/rule-utils": "66.1.0-beta.
|
|
68
|
+
"@unocss/core": "66.1.0-beta.8",
|
|
69
|
+
"@unocss/extractor-arbitrary-variants": "66.1.0-beta.8",
|
|
70
|
+
"@unocss/rule-utils": "66.1.0-beta.8"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "unbuild",
|