praxis-kit 4.0.1 → 4.0.3
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 +212 -0
- package/dist/_shared/diagnostics.js +289 -0
- package/dist/{chunk-TJRHF6MS.js → chunk-DRGZ4ZI2.js} +79 -208
- package/dist/codemod/index.js +23 -15
- package/dist/contract/index.d.ts +7 -146
- package/dist/eslint/index.js +21 -17
- package/dist/lit/index.d.ts +2 -143
- package/dist/lit/index.js +74 -203
- package/dist/{merge-refs-CEpa0zK1.d.ts → merge-refs-B0YcfdtP.d.ts} +14 -155
- package/dist/preact/index.d.ts +2 -143
- package/dist/preact/index.js +79 -208
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.js +1 -1
- package/dist/react/legacy.d.ts +3 -2
- package/dist/react/legacy.js +1 -1
- package/dist/solid/index.d.ts +2 -143
- package/dist/solid/index.js +83 -212
- package/dist/svelte/index.d.ts +2 -143
- package/dist/svelte/index.js +83 -212
- package/dist/tailwind/index.d.ts +2 -143
- package/dist/tailwind/index.js +11 -119
- package/dist/vue/index.d.ts +2 -143
- package/dist/vue/index.js +79 -208
- package/dist/web/index.d.ts +2 -143
- package/dist/web/index.js +74 -203
- package/package.json +4 -4
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequireAtLeastOne, Simplify, ReadonlyDeep, OmitIndexSignature } from 'type-fest';
|
|
2
|
+
import { Diagnostics, DiagnosticInput } from '../_shared/diagnostics.js';
|
|
2
3
|
import { JSX } from 'solid-js';
|
|
3
4
|
|
|
4
5
|
type StringMap<T = unknown> = Record<string, T>;
|
|
@@ -23,148 +24,6 @@ type IntrinsicProps = AnyRecord & {
|
|
|
23
24
|
};
|
|
24
25
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
25
26
|
|
|
26
|
-
declare enum DiagnosticCategory {
|
|
27
|
-
Contract = 0,
|
|
28
|
-
HTML = 1,
|
|
29
|
-
ARIA = 2,
|
|
30
|
-
Composition = 3,
|
|
31
|
-
Rendering = 4,
|
|
32
|
-
Accessibility = 5,
|
|
33
|
-
Performance = 6,
|
|
34
|
-
Internal = 7,
|
|
35
|
-
Deprecation = 8,
|
|
36
|
-
Lint = 9
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare enum DiagnosticCode {
|
|
40
|
-
MissingRequiredChild = "COMP1001",
|
|
41
|
-
InvalidParent = "COMP1002",
|
|
42
|
-
InvalidChild = "COMP1003",
|
|
43
|
-
UnexpectedChild = "COMP1004",
|
|
44
|
-
AmbiguousChild = "COMP1005",
|
|
45
|
-
CardinalityMin = "COMP1006",
|
|
46
|
-
CardinalityMax = "COMP1007",
|
|
47
|
-
PositionViolation = "COMP1008",
|
|
48
|
-
AllowedAsViolation = "COMP1009",
|
|
49
|
-
SlotExclusive = "SLOT1001",
|
|
50
|
-
SlotSingleChild = "SLOT1002",
|
|
51
|
-
SlotDiscardedChildren = "SLOT1003",
|
|
52
|
-
SlotRenderFn = "SLOT1004",
|
|
53
|
-
MissingAriaRelationship = "ARIA2001",
|
|
54
|
-
AriaViolation = "ARIA2002",
|
|
55
|
-
AriaAttributeInvalid = "ARIA2003",
|
|
56
|
-
AriaMissingLiveRegion = "ARIA2004",
|
|
57
|
-
AriaMissingAtomic = "ARIA2005",
|
|
58
|
-
AriaRelevantInvalidToken = "ARIA2006",
|
|
59
|
-
AriaRelevantSuperseded = "ARIA2007",
|
|
60
|
-
AriaInvalidRole = "ARIA2008",
|
|
61
|
-
AriaMissingAccessibleName = "ARIA2009",
|
|
62
|
-
AriaAttributeOnPresentational = "ARIA2010",
|
|
63
|
-
AriaHiddenOnFocusable = "ARIA2011",
|
|
64
|
-
AriaRequiredProperty = "ARIA2012",
|
|
65
|
-
AriaInvalidAttributeValue = "ARIA2013",
|
|
66
|
-
AriaRedundantLevelAttribute = "ARIA2014",
|
|
67
|
-
InvalidHeadingHierarchy = "HTML3001",
|
|
68
|
-
HtmlEmptyRole = "HTML3002",
|
|
69
|
-
HtmlImplicitRoleRedundant = "HTML3003",
|
|
70
|
-
HtmlImplicitRoleOverride = "HTML3004",
|
|
71
|
-
HtmlStandaloneRegionOverride = "HTML3005",
|
|
72
|
-
HtmlLandmarkRoleOverride = "HTML3006",
|
|
73
|
-
HtmlInvalidChild = "HTML3007",
|
|
74
|
-
InvalidRenderingTarget = "RENDER4001",
|
|
75
|
-
LintDeadCompoundKey = "LINT5001",
|
|
76
|
-
LintDeadCompoundValue = "LINT5002",
|
|
77
|
-
LintDeadCompoundNonLiteral = "LINT5003",
|
|
78
|
-
LintMissingStrict = "LINT5004",
|
|
79
|
-
LintInvalidDefaultKey = "LINT5005",
|
|
80
|
-
LintInvalidDefaultValue = "LINT5006",
|
|
81
|
-
LintInvalidDefaultNonLiteral = "LINT5007",
|
|
82
|
-
LintNegativeMin = "LINT5008",
|
|
83
|
-
LintNegativeMax = "LINT5009",
|
|
84
|
-
LintMaxLessThanMin = "LINT5010",
|
|
85
|
-
LintZeroMax = "LINT5011",
|
|
86
|
-
LintMultipleFirst = "LINT5012",
|
|
87
|
-
LintMultipleLast = "LINT5013",
|
|
88
|
-
LintMinSumExceedsCapacity = "LINT5014",
|
|
89
|
-
LintCardinalityViolation = "LINT5015",
|
|
90
|
-
LintAriaTagOverride = "LINT5016",
|
|
91
|
-
ContractUnknownVariantDim = "COMP1010",
|
|
92
|
-
ContractUnknownVariantValue = "COMP1011",
|
|
93
|
-
ContractUnknownRecipeKey = "COMP1012",
|
|
94
|
-
ContractInvalidVariantValue = "COMP1013",
|
|
95
|
-
TailwindMultipleDisplayProps = "CSS6001",
|
|
96
|
-
TailwindReservedLayoutLiteral = "CSS6002",
|
|
97
|
-
TailwindDeadVariantClass = "CSS6003",
|
|
98
|
-
PluginInvalidShape = "PLUGIN7001",
|
|
99
|
-
PluginPipelineReturnType = "PLUGIN7002",
|
|
100
|
-
InternalError = "INTERNAL9000"
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
interface SourcePosition {
|
|
104
|
-
line: number;
|
|
105
|
-
col: number;
|
|
106
|
-
}
|
|
107
|
-
interface SourceLocation {
|
|
108
|
-
file: string;
|
|
109
|
-
start: SourcePosition;
|
|
110
|
-
end?: SourcePosition;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
declare enum Severity$1 {
|
|
114
|
-
Debug = 0,
|
|
115
|
-
Info = 1,
|
|
116
|
-
Warning = 2,
|
|
117
|
-
Error = 3,
|
|
118
|
-
Fatal = 4
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface DiagnosticSuggestion {
|
|
122
|
-
title: string;
|
|
123
|
-
description?: string;
|
|
124
|
-
fix?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
type Context = AnyRecord;
|
|
128
|
-
type Metadata = AnyRecord;
|
|
129
|
-
interface Diagnostic {
|
|
130
|
-
code: DiagnosticCode;
|
|
131
|
-
severity: Severity$1;
|
|
132
|
-
category: DiagnosticCategory;
|
|
133
|
-
message: string;
|
|
134
|
-
rationale?: string;
|
|
135
|
-
component?: string;
|
|
136
|
-
contract?: string;
|
|
137
|
-
location?: SourceLocation;
|
|
138
|
-
suggestions?: DiagnosticSuggestion[];
|
|
139
|
-
context?: Context;
|
|
140
|
-
metadata?: Metadata;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
declare enum Enforcement {
|
|
144
|
-
Ignore = 0,
|
|
145
|
-
Report = 1,
|
|
146
|
-
Throw = 2
|
|
147
|
-
}
|
|
148
|
-
interface DiagnosticPolicy {
|
|
149
|
-
resolve(diagnostic: Diagnostic): Enforcement;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
interface DiagnosticReporter {
|
|
153
|
-
report(diagnostic: Diagnostic): void;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
type DiagnosticInput = Except<Diagnostic, 'severity'>;
|
|
157
|
-
declare class Diagnostics {
|
|
158
|
-
private readonly reporter;
|
|
159
|
-
private readonly policy;
|
|
160
|
-
readonly active: boolean;
|
|
161
|
-
constructor(reporter: DiagnosticReporter, policy?: DiagnosticPolicy);
|
|
162
|
-
report(diagnostic: Diagnostic): Diagnostic;
|
|
163
|
-
warn(input: DiagnosticInput): Diagnostic;
|
|
164
|
-
error(input: DiagnosticInput): Diagnostic;
|
|
165
|
-
info(input: DiagnosticInput): Diagnostic;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
27
|
type MinMax = {
|
|
169
28
|
min: number;
|
|
170
29
|
max: number;
|