@barocss/kit 0.8.0 → 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,14 +568,16 @@ 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
 
574
+ /**
575
+ * #323: true when emitted text contains a markup end-tag opener (less-than then slash). Generated CSS can be
576
+ * placed inside an HTML style element, where that sequence could end the element early. CSS escapes in the
577
+ * output never form it, and a lone less-than (range media queries) stays allowed.
578
+ */
579
+ export declare function hasHtmlEndTagOpener(text: string): boolean;
580
+
579
581
  export declare type HasItems = {
580
582
  items?: AstNode[];
581
583
  };
@@ -810,6 +812,14 @@ export declare type AstNode = {
810
812
  getProcessedClasses(): string[];
811
813
  }
812
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
+
813
823
  export declare function isDebug(): boolean;
814
824
 
815
825
  /**
@@ -823,6 +833,19 @@ export declare type AstNode = {
823
833
 
824
834
  export declare function isStructureSafeValue(value: string): boolean;
825
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
+
826
849
  /**
827
850
  * Converts a single BaroJsonInput object into an AST tree.
828
851
  * Bypasses string parsing and directly invokes utility/modifier handlers.