@barocss/kit 0.10.3 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1432 -867
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -19
- package/dist/index.d.ts +13 -19
- package/dist/index.js +1432 -868
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -385,6 +385,11 @@ export declare type AstNode = {
|
|
|
385
385
|
* Whether to support opacity values
|
|
386
386
|
*/
|
|
387
387
|
supportsOpacity?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* #393: the handlers apply the opacity modifier of an arbitrary / custom-property value themselves (shadow
|
|
390
|
+
* alpha); otherwise functionalUtility mixes the emitted colour, and emits nothing if there is no colour to mix.
|
|
391
|
+
*/
|
|
392
|
+
ownsOpacity?: boolean;
|
|
388
393
|
/**
|
|
389
394
|
* The handler function that processes values
|
|
390
395
|
*
|
|
@@ -1015,6 +1020,9 @@ export declare type AstNode = {
|
|
|
1015
1020
|
|
|
1016
1021
|
export declare function registerUtility(util: UtilityRegistration, ctx?: Context): void;
|
|
1017
1022
|
|
|
1023
|
+
/** #393: a handler result meaning "this class is invalid": the engine stops trying other registrations. */
|
|
1024
|
+
export declare const REJECT_CLASS: AstNode[];
|
|
1025
|
+
|
|
1018
1026
|
export declare function resolveTheme(config: Config): Theme;
|
|
1019
1027
|
|
|
1020
1028
|
export declare function rootToCss(nodes: AstNode[], opts?: {
|
|
@@ -1023,27 +1031,13 @@ export declare type AstNode = {
|
|
|
1023
1031
|
|
|
1024
1032
|
export declare function rule(selector: string, nodes: AstNode[], source?: string): AstNode;
|
|
1025
1033
|
|
|
1034
|
+
export declare type RuleKey = Array<number | string>;
|
|
1035
|
+
|
|
1026
1036
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* The runtime discovers classes in DOM order, so without sorting `lg:px-8`
|
|
1030
|
-
* seen before `sm:px-6` would land earlier and lose at >= 1024px. Each rule
|
|
1031
|
-
* gets a sort key derived from its leading `@media` / `@container` preludes:
|
|
1032
|
-
*
|
|
1033
|
-
* 0 base, negated media (`not-md:` → `@media not (…)`, as Tailwind 4.3.3 orders them, #352),
|
|
1034
|
-
* state media (hover), motion/contrast, unknown
|
|
1035
|
-
* 1 max-* breakpoints (larger width first)
|
|
1036
|
-
* 2 min-* breakpoints (smaller width first)
|
|
1037
|
-
* 3 @max-* container queries (larger width first)
|
|
1038
|
-
* 4 @min-* container queries (smaller width first)
|
|
1039
|
-
* 5 orientation, dark (prefers-color-scheme), print, forced-colors
|
|
1040
|
-
*
|
|
1041
|
-
* Nested at-rules (e.g. `sm:dark:`) contribute one key pair per level, so
|
|
1042
|
-
* `sm:` < `sm:dark:` < `md:`. Equal keys keep discovery order.
|
|
1037
|
+
* Full sort key: the #254 variant pairs, then (#401) Tailwind's property sort and the class name.
|
|
1038
|
+
* `candidate` defaults to the rule's first class.
|
|
1043
1039
|
*/
|
|
1044
|
-
export declare
|
|
1045
|
-
|
|
1046
|
-
export declare function ruleSortKey(rule: string): RuleKey;
|
|
1040
|
+
export declare function ruleSortKey(rule: string, candidate?: string): RuleKey;
|
|
1047
1041
|
|
|
1048
1042
|
/** Internal hook for caches owned by contexts. */
|
|
1049
1043
|
export declare function setContextCacheReset(reset: () => void): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -385,6 +385,11 @@ export declare type AstNode = {
|
|
|
385
385
|
* Whether to support opacity values
|
|
386
386
|
*/
|
|
387
387
|
supportsOpacity?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* #393: the handlers apply the opacity modifier of an arbitrary / custom-property value themselves (shadow
|
|
390
|
+
* alpha); otherwise functionalUtility mixes the emitted colour, and emits nothing if there is no colour to mix.
|
|
391
|
+
*/
|
|
392
|
+
ownsOpacity?: boolean;
|
|
388
393
|
/**
|
|
389
394
|
* The handler function that processes values
|
|
390
395
|
*
|
|
@@ -1015,6 +1020,9 @@ export declare type AstNode = {
|
|
|
1015
1020
|
|
|
1016
1021
|
export declare function registerUtility(util: UtilityRegistration, ctx?: Context): void;
|
|
1017
1022
|
|
|
1023
|
+
/** #393: a handler result meaning "this class is invalid": the engine stops trying other registrations. */
|
|
1024
|
+
export declare const REJECT_CLASS: AstNode[];
|
|
1025
|
+
|
|
1018
1026
|
export declare function resolveTheme(config: Config): Theme;
|
|
1019
1027
|
|
|
1020
1028
|
export declare function rootToCss(nodes: AstNode[], opts?: {
|
|
@@ -1023,27 +1031,13 @@ export declare type AstNode = {
|
|
|
1023
1031
|
|
|
1024
1032
|
export declare function rule(selector: string, nodes: AstNode[], source?: string): AstNode;
|
|
1025
1033
|
|
|
1034
|
+
export declare type RuleKey = Array<number | string>;
|
|
1035
|
+
|
|
1026
1036
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* The runtime discovers classes in DOM order, so without sorting `lg:px-8`
|
|
1030
|
-
* seen before `sm:px-6` would land earlier and lose at >= 1024px. Each rule
|
|
1031
|
-
* gets a sort key derived from its leading `@media` / `@container` preludes:
|
|
1032
|
-
*
|
|
1033
|
-
* 0 base, negated media (`not-md:` → `@media not (…)`, as Tailwind 4.3.3 orders them, #352),
|
|
1034
|
-
* state media (hover), motion/contrast, unknown
|
|
1035
|
-
* 1 max-* breakpoints (larger width first)
|
|
1036
|
-
* 2 min-* breakpoints (smaller width first)
|
|
1037
|
-
* 3 @max-* container queries (larger width first)
|
|
1038
|
-
* 4 @min-* container queries (smaller width first)
|
|
1039
|
-
* 5 orientation, dark (prefers-color-scheme), print, forced-colors
|
|
1040
|
-
*
|
|
1041
|
-
* Nested at-rules (e.g. `sm:dark:`) contribute one key pair per level, so
|
|
1042
|
-
* `sm:` < `sm:dark:` < `md:`. Equal keys keep discovery order.
|
|
1037
|
+
* Full sort key: the #254 variant pairs, then (#401) Tailwind's property sort and the class name.
|
|
1038
|
+
* `candidate` defaults to the rule's first class.
|
|
1043
1039
|
*/
|
|
1044
|
-
export declare
|
|
1045
|
-
|
|
1046
|
-
export declare function ruleSortKey(rule: string): RuleKey;
|
|
1040
|
+
export declare function ruleSortKey(rule: string, candidate?: string): RuleKey;
|
|
1047
1041
|
|
|
1048
1042
|
/** Internal hook for caches owned by contexts. */
|
|
1049
1043
|
export declare function setContextCacheReset(reset: () => void): void;
|