@barocss/kit 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -568,11 +568,6 @@ export declare type AstNode = {
568
568
  */
569
569
  export declare function hasCommentDelimiter(text: string): boolean;
570
570
 
571
- /**
572
- * #224: true when a utility value (or a whole utility token) cannot change the structure of the declaration block it
573
- * is pasted into. Rejects, outside quotes: `{`, `}`, `;`, unbalanced or mismatched ()/[], and a quote left open.
574
- * Commas are allowed (values are not selector lists), so this is isSafeVariantValue with top-level commas allowed.
575
- */
576
571
  /** #248: a comment opener or closer anywhere in a variant (quoted or not) could leave a comment unclosed in the output. */
577
572
  export declare function hasCommentToken(value: string): boolean;
578
573
 
@@ -817,6 +812,14 @@ export declare type AstNode = {
817
812
  getProcessedClasses(): string[];
818
813
  }
819
814
 
815
+ /**
816
+ * #332: true when an emitted selector or at-rule prelude has balanced, correctly nested `()`, `[]` and `{}` and
817
+ * no open quote. CSS escapes (backslash pairs) and quoted strings are skipped, so escaped brackets from a class
818
+ * name never count. Top-level commas are allowed (selector lists, `:is(a, b)`). Checked on the final composed
819
+ * string: an unbalanced prelude in concatenated CSS text would swallow the rules that follow it.
820
+ */
821
+ export declare function isBalancedPrelude(text: string): boolean;
822
+
820
823
  export declare function isDebug(): boolean;
821
824
 
822
825
  /**
@@ -830,6 +833,19 @@ export declare type AstNode = {
830
833
 
831
834
  export declare function isStructureSafeValue(value: string): boolean;
832
835
 
836
+ /**
837
+ * #224: true when a utility value (or a whole utility token) cannot change the structure of the declaration block it
838
+ * is pasted into. Rejects, outside quotes: `{`, `}`, `;`, unbalanced or mismatched ()/[], and a quote left open.
839
+ * Commas are allowed (values are not selector lists), so this is isSafeVariantValue with top-level commas allowed.
840
+ */
841
+ /**
842
+ * #332: a variant token's bracket groups must be well formed. An empty group (`[]`, as in an empty
843
+ * `has-[]`/`group-has-[]`/`[]` variant) has nothing to select and emits nothing. A token that opens with `[`
844
+ * is one arbitrary variant: its first group must close at the token's last character, so two adjacent groups
845
+ * are never read as a single variant whose inner text is unbalanced. CSS escapes and quoted strings are skipped.
846
+ */
847
+ export declare function isWellFormedVariantBrackets(value: string): boolean;
848
+
833
849
  /**
834
850
  * Converts a single BaroJsonInput object into an AST tree.
835
851
  * Bypasses string parsing and directly invokes utility/modifier handlers.