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.
@@ -1,5 +1,5 @@
1
- import { U as UnknownProps, E as ElementType, a as EmptyRecord, V as VariantMap, R as RecipeMap, A as AnyClassPluginFactory, b as ReactFactoryOptions, P as PolymorphicComponent, c as PolymorphicGenerics, d as ExtractPluginProps } from '../react-options-AitAOrje.js';
2
- export { e as AnyFactoryOptions, f as ElementRef, F as FactoryOptions, g as PolymorphicProps, h as PolymorphicWithAsChild, i as PolymorphicWithRender, j as RenderCallbackProps, S as Slottable, k as SlottableProps, m as composeRefs, l as defineContractComponent, m as mergeRefs } from '../react-options-AitAOrje.js';
1
+ import { U as UnknownProps, E as ElementType, a as EmptyRecord, V as VariantMap, R as RecipeMap, A as AnyClassPluginFactory, b as ReactFactoryOptions, P as PolymorphicComponent, c as PolymorphicGenerics, d as ExtractPluginProps } from '../react-options-DQTX4YS_.js';
2
+ export { e as AnyFactoryOptions, f as ElementRef, F as FactoryOptions, g as PolymorphicProps, h as PolymorphicWithAsChild, i as PolymorphicWithRender, j as RenderCallbackProps, S as Slottable, k as SlottableProps, m as composeRefs, l as defineContractComponent, m as mergeRefs } from '../react-options-DQTX4YS_.js';
3
3
  import * as react from 'react';
4
4
  import { ReactElement, Ref } from 'react';
5
5
  import 'type-fest';
@@ -12,7 +12,7 @@ import {
12
12
  makeCloneSlotChild,
13
13
  mergeRefs,
14
14
  render
15
- } from "../chunk-VUULGK5M.js";
15
+ } from "../chunk-4YVNOMUS.js";
16
16
 
17
17
  // ../../adapters/react/src/current/slot/composeRefs.ts
18
18
  function getChildRef(element) {
@@ -1,5 +1,5 @@
1
- import { E as ElementType, U as UnknownProps, a as EmptyRecord, V as VariantMap, R as RecipeMap, A as AnyClassPluginFactory, b as ReactFactoryOptions, P as PolymorphicComponent, c as PolymorphicGenerics, d as ExtractPluginProps } from '../react-options-AitAOrje.js';
2
- export { e as AnyFactoryOptions, f as ElementRef, F as FactoryOptions, g as PolymorphicProps, h as PolymorphicWithAsChild, i as PolymorphicWithRender, j as RenderCallbackProps, S as Slottable, k as SlottableProps, l as defineContractComponent, m as mergeRefs } from '../react-options-AitAOrje.js';
1
+ import { E as ElementType, U as UnknownProps, a as EmptyRecord, V as VariantMap, R as RecipeMap, A as AnyClassPluginFactory, b as ReactFactoryOptions, P as PolymorphicComponent, c as PolymorphicGenerics, d as ExtractPluginProps } from '../react-options-DQTX4YS_.js';
2
+ export { e as AnyFactoryOptions, f as ElementRef, F as FactoryOptions, g as PolymorphicProps, h as PolymorphicWithAsChild, i as PolymorphicWithRender, j as RenderCallbackProps, S as Slottable, k as SlottableProps, l as defineContractComponent, m as mergeRefs } from '../react-options-DQTX4YS_.js';
3
3
  import * as react from 'react';
4
4
  import 'type-fest';
5
5
  import '../_shared/diagnostics.js';
@@ -13,7 +13,7 @@ import {
13
13
  makeCloneSlotChild,
14
14
  mergeRefs,
15
15
  render
16
- } from "../chunk-VUULGK5M.js";
16
+ } from "../chunk-4YVNOMUS.js";
17
17
 
18
18
  // ../../adapters/react/src/legacy/create-contract-component.ts
19
19
  import { forwardRef as forwardRef2 } from "react";
@@ -157,7 +157,7 @@ interface BaseClassOptions {
157
157
  baseClassName?: ClassName;
158
158
  }
159
159
 
160
- type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string;
160
+ type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string | undefined;
161
161
 
162
162
  interface RecipeOptions<TVariants extends VariantMap = VariantMap> {
163
163
  recipeMap?: Record<string, RecipeTarget<TVariants>>;
@@ -235,7 +235,9 @@ type AriaInvalidWithoutFix<M extends string = string> = AriaInvalidBase<M> & {
235
235
  type AriaInvalidResult<M extends string = string> = AriaInvalidWithFix<M> | AriaInvalidWithoutFix<M>;
236
236
  type AriaResult = ValidResult | AriaInvalidResult;
237
237
 
238
- type AriaRule<C extends AriaContext = AriaContext> = (context: C) => readonly AriaResult[];
238
+ type AriaRule<C extends AriaContext = AriaContext> = ((context: C) => readonly AriaResult[]) & {
239
+ readonly readsProps?: readonly string[];
240
+ };
239
241
 
240
242
  type PropNormalizer = (props: Readonly<AnyRecord & IntrinsicProps>) => Partial<AnyRecord & IntrinsicProps>;
241
243
 
@@ -286,6 +288,11 @@ type FactoryOptions<TDefault extends ElementType = ElementType, Props extends An
286
288
  readonly normalize?: NormalizeFn<NoInfer<Props>>;
287
289
  readonly styling?: StylingOptions<V, TPreset, TPlugin>;
288
290
  readonly enforcement?: EnforcementOptions<TAllowed>;
291
+ /**
292
+ * Adapter-resolved diagnostics default, spread in by `resolveAdapterCommonOptions`. Not meant to
293
+ * be set directly by component authors — use `enforcement.diagnostics` to override per component.
294
+ */
295
+ readonly diagnostics?: Diagnostics;
289
296
  };
290
297
 
291
298
  type MetadataMap = AnyRecord;
@@ -156,7 +156,7 @@ interface BaseClassOptions {
156
156
  baseClassName?: ClassName;
157
157
  }
158
158
 
159
- type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string;
159
+ type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string | undefined;
160
160
 
161
161
  interface RecipeOptions<TVariants extends VariantMap = VariantMap> {
162
162
  recipeMap?: Record<string, RecipeTarget<TVariants>>;
@@ -234,7 +234,9 @@ type AriaInvalidWithoutFix<M extends string = string> = AriaInvalidBase<M> & {
234
234
  type AriaInvalidResult<M extends string = string> = AriaInvalidWithFix<M> | AriaInvalidWithoutFix<M>;
235
235
  type AriaResult = ValidResult | AriaInvalidResult;
236
236
 
237
- type AriaRule<C extends AriaContext = AriaContext> = (context: C) => readonly AriaResult[];
237
+ type AriaRule<C extends AriaContext = AriaContext> = ((context: C) => readonly AriaResult[]) & {
238
+ readonly readsProps?: readonly string[];
239
+ };
238
240
 
239
241
  type PropNormalizer = (props: Readonly<AnyRecord & IntrinsicProps>) => Partial<AnyRecord & IntrinsicProps>;
240
242
 
@@ -285,6 +287,11 @@ type FactoryOptions<TDefault extends ElementType = ElementType, Props extends An
285
287
  readonly normalize?: NormalizeFn<NoInfer<Props>>;
286
288
  readonly styling?: StylingOptions<V, TPreset, TPlugin>;
287
289
  readonly enforcement?: EnforcementOptions<TAllowed>;
290
+ /**
291
+ * Adapter-resolved diagnostics default, spread in by `resolveAdapterCommonOptions`. Not meant to
292
+ * be set directly by component authors — use `enforcement.diagnostics` to override per component.
293
+ */
294
+ readonly diagnostics?: Diagnostics;
288
295
  };
289
296
 
290
297
  declare function defineContractComponent<O extends FactoryOptions>(options: O): <R>(factory: (options: O) => R) => R;