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.
- package/dist/{chunk-VUULGK5M.js → chunk-4YVNOMUS.js} +607 -564
- package/dist/contract/index.d.ts +11 -3
- package/dist/eslint/index.js +1 -1
- package/dist/guards/index.d.ts +36 -0
- package/dist/guards/index.js +62 -0
- package/dist/lit/index.d.ts +9 -2
- package/dist/lit/index.js +389 -340
- package/dist/preact/index.d.ts +9 -2
- package/dist/preact/index.js +496 -453
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/dist/react/legacy.d.ts +2 -2
- package/dist/react/legacy.js +1 -1
- package/dist/{react-options-AitAOrje.d.ts → react-options-DQTX4YS_.d.ts} +9 -2
- package/dist/solid/index.d.ts +9 -2
- package/dist/solid/index.js +485 -440
- package/dist/svelte/Polymorphic.svelte +2 -2
- package/dist/svelte/index.d.ts +10 -3
- package/dist/svelte/index.js +385 -340
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.js +3 -3
- package/dist/vue/index.d.ts +9 -2
- package/dist/vue/index.js +472 -421
- package/dist/web/index.d.ts +9 -2
- package/dist/web/index.js +389 -340
- package/package.json +10 -3
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ interface BaseClassOptions {
|
|
|
84
84
|
baseClassName?: ClassName;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string;
|
|
87
|
+
type ClassPipelineFn = (tag: unknown, props: AnyRecord, className?: ClassName, recipe?: string) => string | undefined;
|
|
88
88
|
|
|
89
89
|
interface RecipeOptions<TVariants extends VariantMap = VariantMap> {
|
|
90
90
|
recipeMap?: Record<string, RecipeTarget<TVariants>>;
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../lib/primitive/src/utils/
|
|
1
|
+
// ../../lib/primitive/src/utils/type-guards.ts
|
|
2
2
|
function isString(value) {
|
|
3
3
|
return typeof value === "string";
|
|
4
4
|
}
|
|
@@ -376,7 +376,7 @@ function createClassPipeline(resolved) {
|
|
|
376
376
|
const staticClasses = staticResolver.resolve(tag, recipe !== void 0);
|
|
377
377
|
const variantClasses = variantResolver.resolve({ props, recipe });
|
|
378
378
|
if (!className)
|
|
379
|
-
return staticClasses && variantClasses ? `${staticClasses} ${variantClasses}` : staticClasses || variantClasses;
|
|
379
|
+
return (staticClasses && variantClasses ? `${staticClasses} ${variantClasses}` : staticClasses || variantClasses) || void 0;
|
|
380
380
|
return cn(staticClasses, variantClasses, className);
|
|
381
381
|
};
|
|
382
382
|
}
|
|
@@ -701,7 +701,7 @@ function createTailwindPipeline(options, diagnostics) {
|
|
|
701
701
|
const compoundDims = compoundDimensions(getCompoundVariants(options));
|
|
702
702
|
const resolveLayoutContext = (tag, props, className, recipe) => {
|
|
703
703
|
const mode = resolveLayout(devDiagnostics, props);
|
|
704
|
-
const resolvedClasses = innerPipeline(tag, props, className, recipe);
|
|
704
|
+
const resolvedClasses = innerPipeline(tag, props, className, recipe) ?? "";
|
|
705
705
|
const tokens = classifyTokens(resolvedClasses);
|
|
706
706
|
const state = new LayoutState(mode);
|
|
707
707
|
const filtered = tokens.filter((token) => evaluator.evaluate(token, state));
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -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
|
declare function defineContractComponent<O extends FactoryOptions>(options: O): <R>(factory: (options: O) => R) => R;
|