praxis-kit 6.2.1 → 6.5.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 +20 -0
- package/dist/_shared/diagnostics.js +20 -0
- package/dist/{chunk-4YVNOMUS.js → chunk-AM5J6PY3.js} +839 -198
- package/dist/contract/index.d.ts +1 -0
- package/dist/lit/index.d.ts +1 -0
- package/dist/lit/index.js +828 -187
- package/dist/preact/index.d.ts +1 -0
- package/dist/preact/index.js +839 -198
- 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-DQTX4YS_.d.ts → react-options-DoFNqNdY.d.ts} +1 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +839 -198
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +839 -198
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +15 -0
- package/dist/vite-plugin/index.d.ts +20 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +839 -198
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +828 -187
- package/package.json +13 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A single-argument pure function — the shape `memoize()` wraps. */
|
|
2
|
+
type UnaryFn<T, R> = (arg: T) => R;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Caches the result of a pure, single-argument function in an unbounded `Map`.
|
|
6
|
+
*
|
|
7
|
+
* Best suited to functions that are expensive relative to a cache lookup and
|
|
8
|
+
* repeatedly called with a relatively small, bounded set of inputs (for
|
|
9
|
+
* example, a finite vocabulary of tokens or strings). Avoid memoizing
|
|
10
|
+
* unbounded or attacker-controlled input spaces, as the cache will grow
|
|
11
|
+
* without limit. Use `LRUCache` instead when cache size should remain bounded.
|
|
12
|
+
*/
|
|
13
|
+
declare function memoize<T, R>(fn: UnaryFn<T, R>): UnaryFn<T, R>;
|
|
14
|
+
|
|
15
|
+
export { memoize };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// ../../lib/primitive/src/utils/memoize.ts
|
|
2
|
+
function memoize(fn) {
|
|
3
|
+
const cache = /* @__PURE__ */ new Map();
|
|
4
|
+
return (arg) => {
|
|
5
|
+
if (cache.has(arg)) {
|
|
6
|
+
return cache.get(arg);
|
|
7
|
+
}
|
|
8
|
+
const result = fn(arg);
|
|
9
|
+
cache.set(arg, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
memoize
|
|
15
|
+
};
|
|
@@ -53,6 +53,26 @@ declare enum DiagnosticCode {
|
|
|
53
53
|
HtmlStandaloneRegionOverride = "HTML3005",
|
|
54
54
|
HtmlLandmarkRoleOverride = "HTML3006",
|
|
55
55
|
HtmlInvalidChild = "HTML3007",
|
|
56
|
+
HtmlRoleNotPermitted = "HTML3008",
|
|
57
|
+
HtmlInputUnsupportedType = "HTML3101",
|
|
58
|
+
HtmlInputCheckedIgnoredForType = "HTML3102",
|
|
59
|
+
HtmlInputMultipleIgnoredForType = "HTML3103",
|
|
60
|
+
HtmlInputMaxLengthIgnoredForType = "HTML3104",
|
|
61
|
+
HtmlInputMinLengthIgnoredForType = "HTML3105",
|
|
62
|
+
HtmlInputPatternIgnoredForType = "HTML3106",
|
|
63
|
+
HtmlInputMinIgnoredForType = "HTML3107",
|
|
64
|
+
HtmlInputMaxIgnoredForType = "HTML3108",
|
|
65
|
+
HtmlInputStepIgnoredForType = "HTML3109",
|
|
66
|
+
HtmlInputAcceptIgnoredForType = "HTML3110",
|
|
67
|
+
HtmlInputCaptureIgnoredForType = "HTML3111",
|
|
68
|
+
HtmlInputSizeIgnoredForType = "HTML3112",
|
|
69
|
+
HtmlInputAltIgnoredForType = "HTML3113",
|
|
70
|
+
HtmlInputHeightIgnoredForType = "HTML3114",
|
|
71
|
+
HtmlInputWidthIgnoredForType = "HTML3115",
|
|
72
|
+
A11yInputMissingAccessibleName = "A11Y8100",
|
|
73
|
+
A11yInputPlaceholderNotLabel = "A11Y8101",
|
|
74
|
+
A11yInputPasswordAutocomplete = "A11Y8102",
|
|
75
|
+
A11yInputRequiredReadOnlyConflict = "A11Y8103",
|
|
56
76
|
InvalidRenderingTarget = "RENDER4001",
|
|
57
77
|
LintDeadCompoundKey = "LINT5001",
|
|
58
78
|
LintDeadCompoundValue = "LINT5002",
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -237,6 +237,7 @@ type AriaResult = ValidResult | AriaInvalidResult;
|
|
|
237
237
|
|
|
238
238
|
type AriaRule<C extends AriaContext = AriaContext> = ((context: C) => readonly AriaResult[]) & {
|
|
239
239
|
readonly readsProps?: readonly string[];
|
|
240
|
+
readonly tags?: readonly string[];
|
|
240
241
|
};
|
|
241
242
|
|
|
242
243
|
type PropNormalizer = (props: Readonly<AnyRecord & IntrinsicProps>) => Partial<AnyRecord & IntrinsicProps>;
|