praxis-kit 6.1.0 → 6.2.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.
@@ -138,7 +138,7 @@ interface BaseClassOptions {
138
138
  baseClassName?: ClassName;
139
139
  }
140
140
 
141
- type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string;
141
+ type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string | undefined;
142
142
 
143
143
  interface RecipeOptions<TVariants extends VariantMap = VariantMap> {
144
144
  recipeMap?: Record<string, RecipeTarget<TVariants>>;
@@ -216,7 +216,9 @@ type AriaInvalidWithoutFix<M extends string = string> = AriaInvalidBase<M> & {
216
216
  type AriaInvalidResult<M extends string = string> = AriaInvalidWithFix<M> | AriaInvalidWithoutFix<M>;
217
217
  type AriaResult = ValidResult | AriaInvalidResult;
218
218
 
219
- type AriaRule<C extends AriaContext = AriaContext> = (context: C) => readonly AriaResult[];
219
+ type AriaRule<C extends AriaContext = AriaContext> = ((context: C) => readonly AriaResult[]) & {
220
+ readonly readsProps?: readonly string[];
221
+ };
220
222
 
221
223
  type PropNormalizer = (props: Readonly<AnyRecord & IntrinsicProps>) => Partial<AnyRecord & IntrinsicProps>;
222
224
 
@@ -267,6 +269,11 @@ type FactoryOptions<TDefault extends ElementType = ElementType, Props extends An
267
269
  readonly normalize?: NormalizeFn<NoInfer<Props>>;
268
270
  readonly styling?: StylingOptions<V, TPreset, TPlugin>;
269
271
  readonly enforcement?: EnforcementOptions<TAllowed>;
272
+ /**
273
+ * Adapter-resolved diagnostics default, spread in by `resolveAdapterCommonOptions`. Not meant to
274
+ * be set directly by component authors — use `enforcement.diagnostics` to override per component.
275
+ */
276
+ readonly diagnostics?: Diagnostics;
270
277
  };
271
278
 
272
279
  type FilterPredicate = (key: string, variantKeys: ReadonlySet<string>) => boolean;