praxis-kit 4.0.1 → 4.1.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/_shared/diagnostics.d.ts +209 -0
- package/dist/_shared/diagnostics.js +289 -0
- package/dist/{chunk-TJRHF6MS.js → chunk-LA6WGQA6.js} +1023 -822
- package/dist/codemod/index.js +23 -15
- package/dist/contract/index.d.ts +46 -173
- package/dist/eslint/index.js +21 -17
- package/dist/lit/index.d.ts +44 -173
- package/dist/lit/index.js +705 -598
- package/dist/preact/index.d.ts +47 -174
- package/dist/preact/index.js +1077 -886
- package/dist/react/index.d.ts +25 -11
- package/dist/react/index.js +21 -143
- package/dist/react/legacy.d.ts +4 -3
- package/dist/react/legacy.js +28 -147
- package/dist/{merge-refs-CEpa0zK1.d.ts → react-options-XrRof248.d.ts} +170 -255
- package/dist/solid/index.d.ts +47 -174
- package/dist/solid/index.js +630 -538
- package/dist/svelte/index.d.ts +57 -177
- package/dist/svelte/index.js +609 -534
- package/dist/tailwind/index.d.ts +23 -157
- package/dist/tailwind/index.js +11 -119
- package/dist/vite-plugin/index.d.ts +10 -12
- package/dist/vue/index.d.ts +47 -174
- package/dist/vue/index.js +969 -897
- package/dist/web/index.d.ts +45 -174
- package/dist/web/index.js +707 -594
- package/package.json +6 -6
package/dist/codemod/index.js
CHANGED
|
@@ -12,7 +12,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw mod = 0, e;
|
|
19
|
+
}
|
|
16
20
|
};
|
|
17
21
|
var __copyProps = (to, from, except, desc) => {
|
|
18
22
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -211604,9 +211608,9 @@ var require_commonjs = __commonJS({
|
|
|
211604
211608
|
}
|
|
211605
211609
|
});
|
|
211606
211610
|
|
|
211607
|
-
// ../../node_modules/.pnpm/brace-expansion@5.0.
|
|
211611
|
+
// ../../node_modules/.pnpm/brace-expansion@5.0.7/node_modules/brace-expansion/dist/commonjs/index.js
|
|
211608
211612
|
var require_commonjs2 = __commonJS({
|
|
211609
|
-
"../../node_modules/.pnpm/brace-expansion@5.0.
|
|
211613
|
+
"../../node_modules/.pnpm/brace-expansion@5.0.7/node_modules/brace-expansion/dist/commonjs/index.js"(exports) {
|
|
211610
211614
|
"use strict";
|
|
211611
211615
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
211612
211616
|
exports.EXPANSION_MAX = void 0;
|
|
@@ -211682,17 +211686,19 @@ var require_commonjs2 = __commonJS({
|
|
|
211682
211686
|
}
|
|
211683
211687
|
function expand_(str, max, isTop) {
|
|
211684
211688
|
const expansions = [];
|
|
211685
|
-
|
|
211686
|
-
|
|
211687
|
-
|
|
211688
|
-
|
|
211689
|
-
|
|
211690
|
-
|
|
211691
|
-
|
|
211692
|
-
|
|
211693
|
-
|
|
211689
|
+
for (; ; ) {
|
|
211690
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str);
|
|
211691
|
+
if (!m)
|
|
211692
|
+
return [str];
|
|
211693
|
+
const pre = m.pre;
|
|
211694
|
+
if (/\$$/.test(m.pre)) {
|
|
211695
|
+
const post2 = m.post.length ? expand_(m.post, max, false) : [""];
|
|
211696
|
+
for (let k = 0; k < post2.length && k < max; k++) {
|
|
211697
|
+
const expansion = pre + "{" + m.body + "}" + post2[k];
|
|
211698
|
+
expansions.push(expansion);
|
|
211699
|
+
}
|
|
211700
|
+
return expansions;
|
|
211694
211701
|
}
|
|
211695
|
-
} else {
|
|
211696
211702
|
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
211697
211703
|
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
211698
211704
|
const isSequence = isNumericSequence || isAlphaSequence;
|
|
@@ -211700,10 +211706,12 @@ var require_commonjs2 = __commonJS({
|
|
|
211700
211706
|
if (!isSequence && !isOptions) {
|
|
211701
211707
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
211702
211708
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
211703
|
-
|
|
211709
|
+
isTop = true;
|
|
211710
|
+
continue;
|
|
211704
211711
|
}
|
|
211705
211712
|
return [str];
|
|
211706
211713
|
}
|
|
211714
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
211707
211715
|
let n;
|
|
211708
211716
|
if (isSequence) {
|
|
211709
211717
|
n = m.body.split(/\.\./);
|
|
@@ -211767,8 +211775,8 @@ var require_commonjs2 = __commonJS({
|
|
|
211767
211775
|
}
|
|
211768
211776
|
}
|
|
211769
211777
|
}
|
|
211778
|
+
return expansions;
|
|
211770
211779
|
}
|
|
211771
|
-
return expansions;
|
|
211772
211780
|
}
|
|
211773
211781
|
}
|
|
211774
211782
|
});
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Diagnostics as Diagnostics$1, DiagnosticInput } from '../_shared/diagnostics.js';
|
|
2
|
+
import { RequireAtLeastOne, Simplify, ReadonlyDeep } from 'type-fest';
|
|
2
3
|
|
|
3
4
|
type StringMap<T = unknown> = Record<string, T>;
|
|
4
5
|
type AnyRecord = StringMap<unknown>;
|
|
6
|
+
type EmptyRecord = Record<never, never>;
|
|
5
7
|
|
|
6
8
|
type IntrinsicTag = keyof HTMLElementTagNameMap;
|
|
7
9
|
|
|
@@ -12,7 +14,6 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
12
14
|
|
|
13
15
|
type Booleanish = boolean | 'true' | 'false';
|
|
14
16
|
type ClassName = string | string[];
|
|
15
|
-
type EmptyRecord = Record<never, never>;
|
|
16
17
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
17
18
|
type Numberish = number | `${number}`;
|
|
18
19
|
type Primitive = string | number | boolean;
|
|
@@ -22,148 +23,6 @@ type IntrinsicProps = AnyRecord & {
|
|
|
22
23
|
};
|
|
23
24
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
24
25
|
|
|
25
|
-
declare enum DiagnosticCategory {
|
|
26
|
-
Contract = 0,
|
|
27
|
-
HTML = 1,
|
|
28
|
-
ARIA = 2,
|
|
29
|
-
Composition = 3,
|
|
30
|
-
Rendering = 4,
|
|
31
|
-
Accessibility = 5,
|
|
32
|
-
Performance = 6,
|
|
33
|
-
Internal = 7,
|
|
34
|
-
Deprecation = 8,
|
|
35
|
-
Lint = 9
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
declare enum DiagnosticCode {
|
|
39
|
-
MissingRequiredChild = "COMP1001",
|
|
40
|
-
InvalidParent = "COMP1002",
|
|
41
|
-
InvalidChild = "COMP1003",
|
|
42
|
-
UnexpectedChild = "COMP1004",
|
|
43
|
-
AmbiguousChild = "COMP1005",
|
|
44
|
-
CardinalityMin = "COMP1006",
|
|
45
|
-
CardinalityMax = "COMP1007",
|
|
46
|
-
PositionViolation = "COMP1008",
|
|
47
|
-
AllowedAsViolation = "COMP1009",
|
|
48
|
-
SlotExclusive = "SLOT1001",
|
|
49
|
-
SlotSingleChild = "SLOT1002",
|
|
50
|
-
SlotDiscardedChildren = "SLOT1003",
|
|
51
|
-
SlotRenderFn = "SLOT1004",
|
|
52
|
-
MissingAriaRelationship = "ARIA2001",
|
|
53
|
-
AriaViolation = "ARIA2002",
|
|
54
|
-
AriaAttributeInvalid = "ARIA2003",
|
|
55
|
-
AriaMissingLiveRegion = "ARIA2004",
|
|
56
|
-
AriaMissingAtomic = "ARIA2005",
|
|
57
|
-
AriaRelevantInvalidToken = "ARIA2006",
|
|
58
|
-
AriaRelevantSuperseded = "ARIA2007",
|
|
59
|
-
AriaInvalidRole = "ARIA2008",
|
|
60
|
-
AriaMissingAccessibleName = "ARIA2009",
|
|
61
|
-
AriaAttributeOnPresentational = "ARIA2010",
|
|
62
|
-
AriaHiddenOnFocusable = "ARIA2011",
|
|
63
|
-
AriaRequiredProperty = "ARIA2012",
|
|
64
|
-
AriaInvalidAttributeValue = "ARIA2013",
|
|
65
|
-
AriaRedundantLevelAttribute = "ARIA2014",
|
|
66
|
-
InvalidHeadingHierarchy = "HTML3001",
|
|
67
|
-
HtmlEmptyRole = "HTML3002",
|
|
68
|
-
HtmlImplicitRoleRedundant = "HTML3003",
|
|
69
|
-
HtmlImplicitRoleOverride = "HTML3004",
|
|
70
|
-
HtmlStandaloneRegionOverride = "HTML3005",
|
|
71
|
-
HtmlLandmarkRoleOverride = "HTML3006",
|
|
72
|
-
HtmlInvalidChild = "HTML3007",
|
|
73
|
-
InvalidRenderingTarget = "RENDER4001",
|
|
74
|
-
LintDeadCompoundKey = "LINT5001",
|
|
75
|
-
LintDeadCompoundValue = "LINT5002",
|
|
76
|
-
LintDeadCompoundNonLiteral = "LINT5003",
|
|
77
|
-
LintMissingStrict = "LINT5004",
|
|
78
|
-
LintInvalidDefaultKey = "LINT5005",
|
|
79
|
-
LintInvalidDefaultValue = "LINT5006",
|
|
80
|
-
LintInvalidDefaultNonLiteral = "LINT5007",
|
|
81
|
-
LintNegativeMin = "LINT5008",
|
|
82
|
-
LintNegativeMax = "LINT5009",
|
|
83
|
-
LintMaxLessThanMin = "LINT5010",
|
|
84
|
-
LintZeroMax = "LINT5011",
|
|
85
|
-
LintMultipleFirst = "LINT5012",
|
|
86
|
-
LintMultipleLast = "LINT5013",
|
|
87
|
-
LintMinSumExceedsCapacity = "LINT5014",
|
|
88
|
-
LintCardinalityViolation = "LINT5015",
|
|
89
|
-
LintAriaTagOverride = "LINT5016",
|
|
90
|
-
ContractUnknownVariantDim = "COMP1010",
|
|
91
|
-
ContractUnknownVariantValue = "COMP1011",
|
|
92
|
-
ContractUnknownRecipeKey = "COMP1012",
|
|
93
|
-
ContractInvalidVariantValue = "COMP1013",
|
|
94
|
-
TailwindMultipleDisplayProps = "CSS6001",
|
|
95
|
-
TailwindReservedLayoutLiteral = "CSS6002",
|
|
96
|
-
TailwindDeadVariantClass = "CSS6003",
|
|
97
|
-
PluginInvalidShape = "PLUGIN7001",
|
|
98
|
-
PluginPipelineReturnType = "PLUGIN7002",
|
|
99
|
-
InternalError = "INTERNAL9000"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface SourcePosition {
|
|
103
|
-
line: number;
|
|
104
|
-
col: number;
|
|
105
|
-
}
|
|
106
|
-
interface SourceLocation {
|
|
107
|
-
file: string;
|
|
108
|
-
start: SourcePosition;
|
|
109
|
-
end?: SourcePosition;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
declare enum Severity$1 {
|
|
113
|
-
Debug = 0,
|
|
114
|
-
Info = 1,
|
|
115
|
-
Warning = 2,
|
|
116
|
-
Error = 3,
|
|
117
|
-
Fatal = 4
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
interface DiagnosticSuggestion {
|
|
121
|
-
title: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
fix?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
type Context = AnyRecord;
|
|
127
|
-
type Metadata = AnyRecord;
|
|
128
|
-
interface Diagnostic {
|
|
129
|
-
code: DiagnosticCode;
|
|
130
|
-
severity: Severity$1;
|
|
131
|
-
category: DiagnosticCategory;
|
|
132
|
-
message: string;
|
|
133
|
-
rationale?: string;
|
|
134
|
-
component?: string;
|
|
135
|
-
contract?: string;
|
|
136
|
-
location?: SourceLocation;
|
|
137
|
-
suggestions?: DiagnosticSuggestion[];
|
|
138
|
-
context?: Context;
|
|
139
|
-
metadata?: Metadata;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
declare enum Enforcement {
|
|
143
|
-
Ignore = 0,
|
|
144
|
-
Report = 1,
|
|
145
|
-
Throw = 2
|
|
146
|
-
}
|
|
147
|
-
interface DiagnosticPolicy {
|
|
148
|
-
resolve(diagnostic: Diagnostic): Enforcement;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
interface DiagnosticReporter {
|
|
152
|
-
report(diagnostic: Diagnostic): void;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
type DiagnosticInput = Except<Diagnostic, 'severity'>;
|
|
156
|
-
declare class Diagnostics {
|
|
157
|
-
private readonly reporter;
|
|
158
|
-
private readonly policy;
|
|
159
|
-
readonly active: boolean;
|
|
160
|
-
constructor(reporter: DiagnosticReporter, policy?: DiagnosticPolicy);
|
|
161
|
-
report(diagnostic: Diagnostic): Diagnostic;
|
|
162
|
-
warn(input: DiagnosticInput): Diagnostic;
|
|
163
|
-
error(input: DiagnosticInput): Diagnostic;
|
|
164
|
-
info(input: DiagnosticInput): Diagnostic;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
26
|
type MinMax = {
|
|
168
27
|
min: number;
|
|
169
28
|
max: number;
|
|
@@ -191,34 +50,16 @@ type ValidResult = {
|
|
|
191
50
|
valid: true;
|
|
192
51
|
};
|
|
193
52
|
|
|
194
|
-
type RequireAtLeastOneIfNotEmpty<T> = keyof T extends never ? EmptyRecord : RequireAtLeastOne<T>;
|
|
195
|
-
type CompoundVariantConditionValue<V extends VariantMap, K extends keyof V> = VariantKey<V, K> | NonEmptyArray<VariantKey<V, K>>;
|
|
196
|
-
type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
197
|
-
[K in keyof V]: CompoundVariantConditionValue<V, K>;
|
|
198
|
-
}>;
|
|
199
|
-
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
200
|
-
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
201
|
-
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
202
|
-
class: VariantValue;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
interface CVACompounds<V extends VariantMap> {
|
|
206
|
-
compoundVariants?: readonly CompoundVariant<V>[];
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
interface CVADefaults<V extends VariantMap> {
|
|
210
|
-
defaultVariants?: DefaultVariants<V>;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
interface CVAVariants<V extends VariantMap> {
|
|
214
|
-
variants?: V;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
53
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
54
|
+
|
|
218
55
|
type VariantValue = string | string[];
|
|
56
|
+
|
|
219
57
|
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
58
|
+
|
|
220
59
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
60
|
+
|
|
221
61
|
type VariantKey<V extends VariantMap, K extends keyof V> = StringToBoolean<keyof V[K] & string>;
|
|
62
|
+
|
|
222
63
|
/**
|
|
223
64
|
* A partial selection of variant states authored at factory definition time.
|
|
224
65
|
*
|
|
@@ -228,10 +69,12 @@ type VariantKey<V extends VariantMap, K extends keyof V> = StringToBoolean<keyof
|
|
|
228
69
|
type VariantSelection<V extends VariantMap> = {
|
|
229
70
|
[K in keyof V]?: keyof V[K];
|
|
230
71
|
};
|
|
72
|
+
|
|
231
73
|
type NormalizedVariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
232
74
|
type DefaultVariants<V extends VariantMap> = {
|
|
233
75
|
[K in keyof V]?: NormalizedVariantValue<keyof V[K] & string>;
|
|
234
76
|
};
|
|
77
|
+
|
|
235
78
|
/**
|
|
236
79
|
* A static, immutable map of named presets to partial variant selections.
|
|
237
80
|
*
|
|
@@ -239,8 +82,32 @@ type DefaultVariants<V extends VariantMap> = {
|
|
|
239
82
|
* avoiding the need to repeat variant combinations at each call site.
|
|
240
83
|
*/
|
|
241
84
|
type RecipeMap<V extends VariantMap = VariantMap> = Readonly<Record<string, VariantSelection<V>>>;
|
|
85
|
+
|
|
242
86
|
type RecipeTarget<TVariants extends VariantMap = VariantMap> = VariantSelection<TVariants>;
|
|
243
87
|
|
|
88
|
+
type RequireAtLeastOneIfNotEmpty<T> = keyof T extends never ? EmptyRecord : RequireAtLeastOne<T>;
|
|
89
|
+
type CompoundVariantConditionValue<V extends VariantMap, K extends keyof V> = VariantKey<V, K> | NonEmptyArray<VariantKey<V, K>>;
|
|
90
|
+
type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
91
|
+
[K in keyof V]: CompoundVariantConditionValue<V, K>;
|
|
92
|
+
}>;
|
|
93
|
+
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
94
|
+
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
95
|
+
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
96
|
+
class: VariantValue;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
interface CVACompounds<V extends VariantMap> {
|
|
100
|
+
compoundVariants?: readonly CompoundVariant<V>[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface CVADefaults<V extends VariantMap> {
|
|
104
|
+
defaultVariants?: DefaultVariants<V>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface CVAVariants<V extends VariantMap> {
|
|
108
|
+
variants?: V;
|
|
109
|
+
}
|
|
110
|
+
|
|
244
111
|
interface BaseClassOptions {
|
|
245
112
|
baseClassName?: ClassName;
|
|
246
113
|
}
|
|
@@ -271,7 +138,11 @@ type ClassPlugin<TProps extends AnyRecord = EmptyRecord> = Readonly<{
|
|
|
271
138
|
readonly _pluginProps?: TProps;
|
|
272
139
|
}>;
|
|
273
140
|
|
|
274
|
-
type ClassPluginFactory<TProps extends AnyRecord = EmptyRecord> = <V extends VariantMap>(options: ClassPipelineOptions<V>, diagnostics: Diagnostics) => ClassPlugin<TProps>;
|
|
141
|
+
type ClassPluginFactory<TProps extends AnyRecord = EmptyRecord> = <V extends VariantMap>(options: ClassPipelineOptions<V>, diagnostics: Diagnostics$1) => ClassPlugin<TProps>;
|
|
142
|
+
/** `ClassPluginFactory` with its plugin-owned-props generic erased — the common form used
|
|
143
|
+
* wherever a factory's concrete plugin-props shape isn't tracked (factory generics,
|
|
144
|
+
* capability wiring). */
|
|
145
|
+
type AnyClassPluginFactory = ClassPluginFactory<AnyRecord> | undefined;
|
|
275
146
|
|
|
276
147
|
type AriaContext = {
|
|
277
148
|
readonly tag: IntrinsicTag;
|
|
@@ -323,7 +194,7 @@ type AriaRule<C extends AriaContext = AriaContext> = (context: C) => readonly Ar
|
|
|
323
194
|
type PropNormalizer = (props: Readonly<AnyRecord & IntrinsicProps>) => Partial<AnyRecord & IntrinsicProps>;
|
|
324
195
|
|
|
325
196
|
type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
326
|
-
readonly diagnostics?: Diagnostics;
|
|
197
|
+
readonly diagnostics?: Diagnostics$1;
|
|
327
198
|
readonly aria?: readonly AriaRule[];
|
|
328
199
|
readonly children?: readonly ChildRuleInput[];
|
|
329
200
|
readonly props?: readonly PropNormalizer[];
|
|
@@ -331,7 +202,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
331
202
|
readonly allowedAs?: readonly TAllowed[];
|
|
332
203
|
};
|
|
333
204
|
|
|
334
|
-
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends RecipeMap<V> = Readonly<EmptyRecord>, TPlugin extends
|
|
205
|
+
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends RecipeMap<V> = Readonly<EmptyRecord>, TPlugin extends AnyClassPluginFactory = AnyClassPluginFactory> = {
|
|
335
206
|
readonly base?: ClassName;
|
|
336
207
|
readonly variants?: V;
|
|
337
208
|
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
@@ -345,8 +216,8 @@ type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPre
|
|
|
345
216
|
type NormalizeFn<Props extends AnyRecord = AnyRecord> = {
|
|
346
217
|
normalize(props: Readonly<Props & IntrinsicProps>): Props & IntrinsicProps;
|
|
347
218
|
}['normalize'];
|
|
348
|
-
type AnyFactoryOptions = FactoryOptions<ElementType, AnyRecord, VariantMap, RecipeMap<VariantMap>,
|
|
349
|
-
type FactoryOptions<TDefault extends ElementType = ElementType, Props extends AnyRecord = EmptyRecord, V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends RecipeMap<V> = Readonly<EmptyRecord>, TPlugin extends
|
|
219
|
+
type AnyFactoryOptions = FactoryOptions<ElementType, AnyRecord, VariantMap, RecipeMap<VariantMap>, AnyClassPluginFactory>;
|
|
220
|
+
type FactoryOptions<TDefault extends ElementType = ElementType, Props extends AnyRecord = EmptyRecord, V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends RecipeMap<V> = Readonly<EmptyRecord>, TPlugin extends AnyClassPluginFactory = AnyClassPluginFactory, TAllowed extends ElementType = ElementType> = {
|
|
350
221
|
readonly tag?: TDefault;
|
|
351
222
|
readonly name?: string;
|
|
352
223
|
readonly defaults?: Partial<NoInfer<Props>>;
|
|
@@ -382,4 +253,6 @@ declare const selectedContract: EnforcementOptions;
|
|
|
382
253
|
|
|
383
254
|
declare function mergeContracts(...contracts: readonly EnforcementOptions[]): EnforcementOptions;
|
|
384
255
|
|
|
385
|
-
|
|
256
|
+
type Diagnostics = Diagnostics$1;
|
|
257
|
+
|
|
258
|
+
export { type AnyFactoryOptions, type Diagnostics, type PropNormalizer, activeContract, activeProps, disabledContract, disabledProps, expandedContract, expandedProps, invalidContract, invalidProps, loadingContract, loadingProps, mergeContracts, pressedContract, pressedProps, readonlyContract, readonlyProps, selectedContract, selectedProps };
|
package/dist/eslint/index.js
CHANGED
|
@@ -5,7 +5,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
|
|
8
|
+
try {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw mod = 0, e;
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
var __copyProps = (to, from, except, desc) => {
|
|
11
15
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -24,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
28
|
mod
|
|
25
29
|
));
|
|
26
30
|
|
|
27
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
31
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
|
|
28
32
|
var require_deepMerge = __commonJS({
|
|
29
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
33
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js"(exports) {
|
|
30
34
|
"use strict";
|
|
31
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
36
|
exports.isObjectNotArray = isObjectNotArray;
|
|
@@ -59,9 +63,9 @@ var require_deepMerge = __commonJS({
|
|
|
59
63
|
}
|
|
60
64
|
});
|
|
61
65
|
|
|
62
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
66
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
|
|
63
67
|
var require_applyDefault = __commonJS({
|
|
64
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
68
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js"(exports) {
|
|
65
69
|
"use strict";
|
|
66
70
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
71
|
exports.applyDefault = applyDefault;
|
|
@@ -86,9 +90,9 @@ var require_applyDefault = __commonJS({
|
|
|
86
90
|
}
|
|
87
91
|
});
|
|
88
92
|
|
|
89
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
93
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
|
|
90
94
|
var require_parserSeemsToBeTSESLint = __commonJS({
|
|
91
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
95
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js"(exports) {
|
|
92
96
|
"use strict";
|
|
93
97
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94
98
|
exports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;
|
|
@@ -98,9 +102,9 @@ var require_parserSeemsToBeTSESLint = __commonJS({
|
|
|
98
102
|
}
|
|
99
103
|
});
|
|
100
104
|
|
|
101
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
105
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
|
|
102
106
|
var require_getParserServices = __commonJS({
|
|
103
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
107
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js"(exports) {
|
|
104
108
|
"use strict";
|
|
105
109
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
106
110
|
exports.getParserServices = getParserServices;
|
|
@@ -131,17 +135,17 @@ var require_getParserServices = __commonJS({
|
|
|
131
135
|
}
|
|
132
136
|
});
|
|
133
137
|
|
|
134
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
138
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
|
|
135
139
|
var require_InferTypesFromRule = __commonJS({
|
|
136
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
140
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js"(exports) {
|
|
137
141
|
"use strict";
|
|
138
142
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
139
143
|
}
|
|
140
144
|
});
|
|
141
145
|
|
|
142
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
146
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
|
|
143
147
|
var require_nullThrows = __commonJS({
|
|
144
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
148
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js"(exports) {
|
|
145
149
|
"use strict";
|
|
146
150
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147
151
|
exports.NullThrowsReasons = void 0;
|
|
@@ -159,9 +163,9 @@ var require_nullThrows = __commonJS({
|
|
|
159
163
|
}
|
|
160
164
|
});
|
|
161
165
|
|
|
162
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
166
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
|
|
163
167
|
var require_RuleCreator = __commonJS({
|
|
164
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
168
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js"(exports) {
|
|
165
169
|
"use strict";
|
|
166
170
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
167
171
|
exports.RuleCreator = RuleCreator8;
|
|
@@ -207,9 +211,9 @@ var require_RuleCreator = __commonJS({
|
|
|
207
211
|
}
|
|
208
212
|
});
|
|
209
213
|
|
|
210
|
-
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
214
|
+
// ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
|
|
211
215
|
var require_eslint_utils = __commonJS({
|
|
212
|
-
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.
|
|
216
|
+
"../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.6.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js"(exports) {
|
|
213
217
|
"use strict";
|
|
214
218
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
215
219
|
if (k2 === void 0) k2 = k;
|