@barocss/kit 0.6.0 → 0.8.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.d.ts CHANGED
@@ -219,6 +219,15 @@ export declare type AstNode = {
219
219
  * clear caches that belong to another context.
220
220
  */
221
221
  clearCacheOnContextChange?: boolean;
222
+ /**
223
+ * #287: static custom utilities, the runtime mirror of a stylesheet's static `@utility name { ... }`.
224
+ * Name → declarations (property → value; CSS custom properties allowed). Each one is registered on
225
+ * this context only; variants and `!` apply as usual. A name equal to a built-in extends it like
226
+ * `@utility` in Tailwind 4: the built-in declarations are emitted first, then the custom ones (a later
227
+ * duplicate property wins). An entry with an invalid name, property or value is skipped whole.
228
+ * @example utilities: { 'max-w-app': { 'max-width': '72rem', 'margin-inline': 'auto' } }
229
+ */
230
+ utilities?: CustomUtilities;
222
231
  [key: string]: unknown;
223
232
  }
224
233
 
@@ -237,6 +246,12 @@ export declare type AstNode = {
237
246
 
238
247
  export declare function createContext(configObj: Config): Context;
239
248
 
249
+ /** #287: static custom utilities by class name. */
250
+ export declare type CustomUtilities = Record<string, CustomUtilityDeclarations>;
251
+
252
+ /** #287: declarations of one static custom utility (property → value). */
253
+ export declare type CustomUtilityDeclarations = Record<string, string | number>;
254
+
240
255
  export declare function decl(prop: string, value: string | [string, string][], source?: string): AstNode;
241
256
 
242
257
  export declare type DeclPath = PathNode[];
@@ -845,6 +860,8 @@ export declare type AstNode = {
845
860
  sort?: number;
846
861
  description?: string;
847
862
  source?: string;
863
+ /** Static variant name; lets the parser tell `placeholder-shown:` (variant) from a `placeholder-*` utility (#307). */
864
+ name?: string;
848
865
  };
849
866
 
850
867
  export declare const modifierRegistry: ModifierRegistration[];