@metamask/snaps-sdk 6.10.0 → 6.11.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/CHANGELOG.md +8 -1
- package/dist/error-wrappers.d.cts +192 -192
- package/dist/error-wrappers.d.mts +192 -192
- package/dist/internals/error-wrappers.d.cts +12 -12
- package/dist/internals/error-wrappers.d.mts +12 -12
- package/dist/jsx/components/Card.cjs.map +1 -1
- package/dist/jsx/components/Card.d.cts +2 -1
- package/dist/jsx/components/Card.d.cts.map +1 -1
- package/dist/jsx/components/Card.d.mts +2 -1
- package/dist/jsx/components/Card.d.mts.map +1 -1
- package/dist/jsx/components/Card.mjs.map +1 -1
- package/dist/jsx/validation.cjs +16 -11
- package/dist/jsx/validation.cjs.map +1 -1
- package/dist/jsx/validation.d.cts +7 -7
- package/dist/jsx/validation.d.cts.map +1 -1
- package/dist/jsx/validation.d.mts +7 -7
- package/dist/jsx/validation.d.mts.map +1 -1
- package/dist/jsx/validation.mjs +15 -10
- package/dist/jsx/validation.mjs.map +1 -1
- package/dist/types/interface.cjs +8 -1
- package/dist/types/interface.cjs.map +1 -1
- package/dist/types/interface.d.cts +7 -1
- package/dist/types/interface.d.cts.map +1 -1
- package/dist/types/interface.d.mts +7 -1
- package/dist/types/interface.d.mts.map +1 -1
- package/dist/types/interface.mjs +7 -0
- package/dist/types/interface.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
17
17
|
new (message?: string): {
|
|
18
|
-
readonly "__#
|
|
19
|
-
readonly "__#
|
|
20
|
-
readonly "__#
|
|
21
|
-
readonly "__#
|
|
18
|
+
readonly "__#182157@#code": number;
|
|
19
|
+
readonly "__#182157@#message": string;
|
|
20
|
+
readonly "__#182157@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#182157@#stack"?: string | undefined;
|
|
22
22
|
readonly name: string;
|
|
23
23
|
readonly code: number;
|
|
24
24
|
readonly message: string;
|
|
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
|
29
29
|
cause?: unknown;
|
|
30
30
|
};
|
|
31
31
|
new (data?: Record<string, Json>): {
|
|
32
|
-
readonly "__#
|
|
33
|
-
readonly "__#
|
|
34
|
-
readonly "__#
|
|
35
|
-
readonly "__#
|
|
32
|
+
readonly "__#182157@#code": number;
|
|
33
|
+
readonly "__#182157@#message": string;
|
|
34
|
+
readonly "__#182157@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#182157@#stack"?: string | undefined;
|
|
36
36
|
readonly name: string;
|
|
37
37
|
readonly code: number;
|
|
38
38
|
readonly message: string;
|
|
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
|
43
43
|
cause?: unknown;
|
|
44
44
|
};
|
|
45
45
|
new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
|
|
46
|
-
readonly "__#
|
|
47
|
-
readonly "__#
|
|
48
|
-
readonly "__#
|
|
49
|
-
readonly "__#
|
|
46
|
+
readonly "__#182157@#code": number;
|
|
47
|
+
readonly "__#182157@#message": string;
|
|
48
|
+
readonly "__#182157@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#182157@#stack"?: string | undefined;
|
|
50
50
|
readonly name: string;
|
|
51
51
|
readonly code: number;
|
|
52
52
|
readonly message: string;
|
|
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
17
17
|
new (message?: string): {
|
|
18
|
-
readonly "__#
|
|
19
|
-
readonly "__#
|
|
20
|
-
readonly "__#
|
|
21
|
-
readonly "__#
|
|
18
|
+
readonly "__#91080@#code": number;
|
|
19
|
+
readonly "__#91080@#message": string;
|
|
20
|
+
readonly "__#91080@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#91080@#stack"?: string | undefined;
|
|
22
22
|
readonly name: string;
|
|
23
23
|
readonly code: number;
|
|
24
24
|
readonly message: string;
|
|
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
|
29
29
|
cause?: unknown;
|
|
30
30
|
};
|
|
31
31
|
new (data?: Record<string, Json>): {
|
|
32
|
-
readonly "__#
|
|
33
|
-
readonly "__#
|
|
34
|
-
readonly "__#
|
|
35
|
-
readonly "__#
|
|
32
|
+
readonly "__#91080@#code": number;
|
|
33
|
+
readonly "__#91080@#message": string;
|
|
34
|
+
readonly "__#91080@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#91080@#stack"?: string | undefined;
|
|
36
36
|
readonly name: string;
|
|
37
37
|
readonly code: number;
|
|
38
38
|
readonly message: string;
|
|
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
|
|
|
43
43
|
cause?: unknown;
|
|
44
44
|
};
|
|
45
45
|
new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
|
|
46
|
-
readonly "__#
|
|
47
|
-
readonly "__#
|
|
48
|
-
readonly "__#
|
|
49
|
-
readonly "__#
|
|
46
|
+
readonly "__#91080@#code": number;
|
|
47
|
+
readonly "__#91080@#message": string;
|
|
48
|
+
readonly "__#91080@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#91080@#stack"?: string | undefined;
|
|
50
50
|
readonly name: string;
|
|
51
51
|
readonly code: number;
|
|
52
52
|
readonly message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;
|
|
1
|
+
{"version":3,"file":"Card.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;AAoBnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACU,QAAA,IAAI,GAAG,IAAA,+BAAmB,EAAyB,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\nimport type { AddressElement } from './Address';\n\n/**\n * The props of the {@link Card} component.\n *\n * @property image - The image to show as part of the card, must be an SVG string.\n * @property title - The title.\n * @property description - The description, shown below the title.\n * @property value - The value, shown on the right side.\n * @property extra - An additional optional value shown below the value.\n */\nexport type CardProps = {\n image?: string | undefined;\n title: string | AddressElement;\n description?: string | undefined;\n value: string;\n extra?: string | undefined;\n};\n\nconst TYPE = 'Card';\n\n/**\n * A card component which can be used to display values within a card structure.\n *\n * @param props - The props of the component.\n * @param props.image - The image to show as part of the card, must be an SVG string.\n * @param props.title - The title.\n * @param props.description - The description, shown below the title.\n * @param props.value - The value, shown on the right side.\n * @param props.extra - An additional optional value shown below the value.\n * @returns A card element.\n * @example\n * <Card image=\"<svg />\" title=\"Title\" description=\"Description\" value=\"$1200\" extra=\"0.12 ETH\" />\n */\nexport const Card = createSnapComponent<CardProps, typeof TYPE>(TYPE);\n\n/**\n * A card element.\n *\n * @see Card\n */\nexport type CardElement = ReturnType<typeof Card>;\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AddressElement } from "./Address.cjs";
|
|
1
2
|
/**
|
|
2
3
|
* The props of the {@link Card} component.
|
|
3
4
|
*
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
*/
|
|
10
11
|
export type CardProps = {
|
|
11
12
|
image?: string | undefined;
|
|
12
|
-
title: string;
|
|
13
|
+
title: string | AddressElement;
|
|
13
14
|
description?: string | undefined;
|
|
14
15
|
value: string;
|
|
15
16
|
extra?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AddressElement } from "./Address.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* The props of the {@link Card} component.
|
|
3
4
|
*
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
*/
|
|
10
11
|
export type CardProps = {
|
|
11
12
|
image?: string | undefined;
|
|
12
|
-
title: string;
|
|
13
|
+
title: string | AddressElement;
|
|
13
14
|
description?: string | undefined;
|
|
14
15
|
value: string;
|
|
15
16
|
extra?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;
|
|
1
|
+
{"version":3,"file":"Card.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAoBnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAyB,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\nimport type { AddressElement } from './Address';\n\n/**\n * The props of the {@link Card} component.\n *\n * @property image - The image to show as part of the card, must be an SVG string.\n * @property title - The title.\n * @property description - The description, shown below the title.\n * @property value - The value, shown on the right side.\n * @property extra - An additional optional value shown below the value.\n */\nexport type CardProps = {\n image?: string | undefined;\n title: string | AddressElement;\n description?: string | undefined;\n value: string;\n extra?: string | undefined;\n};\n\nconst TYPE = 'Card';\n\n/**\n * A card component which can be used to display values within a card structure.\n *\n * @param props - The props of the component.\n * @param props.image - The image to show as part of the card, must be an SVG string.\n * @param props.title - The title.\n * @param props.description - The description, shown below the title.\n * @param props.value - The value, shown on the right side.\n * @param props.extra - An additional optional value shown below the value.\n * @returns A card element.\n * @example\n * <Card image=\"<svg />\" title=\"Title\" description=\"Description\" value=\"$1200\" extra=\"0.12 ETH\" />\n */\nexport const Card = createSnapComponent<CardProps, typeof TYPE>(TYPE);\n\n/**\n * A card element.\n *\n * @see Card\n */\nexport type CardElement = ReturnType<typeof Card>;\n"]}
|
package/dist/jsx/validation.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJSXElement = exports.JSXElementStruct = exports.RootJSXElementStruct = exports.ContainerStruct = exports.BoxChildStruct = exports.SpinnerStruct = exports.RowStruct = exports.TooltipStruct = exports.TooltipContentStruct = exports.TooltipChildStruct = exports.TextStruct = exports.LinkStruct = exports.HeadingStruct = exports.ValueStruct = exports.DividerStruct = exports.CopyableStruct = exports.FooterStruct = exports.FooterChildStruct = exports.SectionStruct = exports.BoxStruct = exports.BoxChildrenStruct = exports.AvatarStruct = exports.
|
|
3
|
+
exports.isJSXElement = exports.JSXElementStruct = exports.RootJSXElementStruct = exports.ContainerStruct = exports.BoxChildStruct = exports.SpinnerStruct = exports.RowStruct = exports.TooltipStruct = exports.TooltipContentStruct = exports.TooltipChildStruct = exports.TextStruct = exports.LinkStruct = exports.HeadingStruct = exports.ValueStruct = exports.DividerStruct = exports.CopyableStruct = exports.FooterStruct = exports.FooterChildStruct = exports.SectionStruct = exports.BoxStruct = exports.BoxChildrenStruct = exports.AvatarStruct = exports.FormattingStruct = exports.ItalicStruct = exports.BoldStruct = exports.FormStruct = exports.FormChildStruct = exports.FieldStruct = exports.FieldChildUnionStruct = exports.FileInputStruct = exports.RadioGroupStruct = exports.RadioStruct = exports.SelectorStruct = exports.SelectorOptionStruct = exports.CardStruct = exports.AddressStruct = exports.DropdownStruct = exports.OptionStruct = exports.InputStruct = exports.NumberInputPropsStruct = exports.PasswordInputPropsStruct = exports.TextInputPropsStruct = exports.GenericInputPropsStruct = exports.CheckboxStruct = exports.ButtonStruct = exports.IconStruct = exports.ImageStruct = exports.ElementStruct = exports.StringElementStruct = exports.KeyStruct = void 0;
|
|
4
4
|
exports.assertJSXElement = exports.isJSXElementUnsafe = void 0;
|
|
5
5
|
const superstruct_1 = require("@metamask/superstruct");
|
|
6
6
|
const utils_1 = require("@metamask/utils");
|
|
@@ -198,12 +198,26 @@ exports.DropdownStruct = element('Dropdown', {
|
|
|
198
198
|
value: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
199
199
|
children: children([exports.OptionStruct]),
|
|
200
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* A struct for the {@link AddressElement} type.
|
|
203
|
+
*/
|
|
204
|
+
exports.AddressStruct = element('Address', {
|
|
205
|
+
address: (0, internals_1.nullUnion)([utils_1.HexChecksumAddressStruct, utils_1.CaipAccountIdStruct]),
|
|
206
|
+
truncate: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
207
|
+
displayName: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
208
|
+
avatar: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
209
|
+
});
|
|
201
210
|
/**
|
|
202
211
|
* A struct for the {@link CardElement} type.
|
|
203
212
|
*/
|
|
204
213
|
exports.CardStruct = element('Card', {
|
|
205
214
|
image: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
206
|
-
title: (0,
|
|
215
|
+
title: (0, internals_1.selectiveUnion)((value) => {
|
|
216
|
+
if (typeof value === 'object') {
|
|
217
|
+
return exports.AddressStruct;
|
|
218
|
+
}
|
|
219
|
+
return (0, superstruct_1.string)();
|
|
220
|
+
}),
|
|
207
221
|
description: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
208
222
|
value: (0, superstruct_1.string)(),
|
|
209
223
|
extra: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
@@ -345,15 +359,6 @@ exports.ItalicStruct = element('Italic', {
|
|
|
345
359
|
]),
|
|
346
360
|
});
|
|
347
361
|
exports.FormattingStruct = (0, internals_1.typedUnion)([exports.BoldStruct, exports.ItalicStruct]);
|
|
348
|
-
/**
|
|
349
|
-
* A struct for the {@link AddressElement} type.
|
|
350
|
-
*/
|
|
351
|
-
exports.AddressStruct = element('Address', {
|
|
352
|
-
address: (0, internals_1.nullUnion)([utils_1.HexChecksumAddressStruct, utils_1.CaipAccountIdStruct]),
|
|
353
|
-
truncate: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
354
|
-
displayName: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
355
|
-
avatar: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
356
|
-
});
|
|
357
362
|
/**
|
|
358
363
|
* A struct for the {@link AvatarElement} type.
|
|
359
364
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.cjs","sourceRoot":"","sources":["../../src/jsx/validation.ts"],"names":[],"mappings":";;;;AAOA,uDAc+B;AAC/B,2CAMyB;AAGzB,sDAMsB;AAatB,uDAmCsB;AAEtB;;GAEG;AACU,QAAA,SAAS,GAAkB,IAAA,qBAAS,EAAC,CAAC,IAAA,oBAAM,GAAE,EAAE,IAAA,oBAAM,GAAE,CAAC,CAAC,CAAC;AAExE;;GAEG;AACU,QAAA,mBAAmB,GAA4B,QAAQ,CAAC;IACnE,IAAA,oBAAM,GAAE;CACT,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,aAAa,GAAiC,IAAA,oBAAM,EAAC;IAChE,IAAI,EAAE,IAAA,oBAAM,GAAE;IACd,KAAK,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IACnC,GAAG,EAAE,IAAA,sBAAQ,EAAC,iBAAS,CAAC;CACzB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,QAAQ,CACf,MAA4B;IAE5B,MAAM,cAAc,GAA2B,IAAA,0BAAc,EAAC,CAAC,KAAK,EAAE,EAAE;QACtE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,IAAA,mBAAK,EAAC,IAAA,kBAA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sBAAc;IACd,4BAAoB;IACpB,qBAAa;IACb,oBAAY;CACb,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,IAAA,gBAAE,EAAC,KAAK,EAAE,wBAAgB,CAAC,CAAC;AACrC,CAAC;AAFD,oCAEC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,CACL,IAAA,qBAAa,EAAC,KAAK,CAAC;QACpB,IAAA,mBAAW,EAAC,KAAK,EAAE,MAAM,CAAC;QAC1B,IAAA,mBAAW,EAAC,KAAK,EAAE,OAAO,CAAC;QAC3B,IAAA,mBAAW,EAAC,KAAK,EAAE,KAAK,CAAC,CAC1B,CAAC;AACJ,CAAC;AAPD,gDAOC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,4EAA4E;IAC5E,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,wCAAwC,IAAI,CAAC,SAAS,CACpD,KAAK,CACN,qFAAqF,CACvF,CAAC;IACJ,CAAC;AACH,CAAC;AAXD,4CAWC","sourcesContent":["import type {\n AnyStruct,\n Infer,\n InferStructTuple,\n ObjectSchema,\n Struct,\n} from '@metamask/superstruct';\nimport {\n is,\n boolean,\n optional,\n array,\n lazy,\n nullable,\n number,\n object,\n record,\n string,\n tuple,\n refine,\n assign,\n} from '@metamask/superstruct';\nimport {\n CaipAccountIdStruct,\n hasProperty,\n HexChecksumAddressStruct,\n isPlainObject,\n JsonStruct,\n} from '@metamask/utils';\n\nimport type { Describe } from '../internals';\nimport {\n literal,\n nullUnion,\n selectiveUnion,\n svg,\n typedUnion,\n} from '../internals';\nimport type { EmptyObject } from '../types';\nimport type {\n GenericSnapChildren,\n GenericSnapElement,\n JsonObject,\n Key,\n Nestable,\n SnapElement,\n SnapsChildren,\n StringElement,\n} from './component';\nimport type { AvatarElement } from './components';\nimport {\n type AddressElement,\n type BoldElement,\n type BoxElement,\n type ButtonElement,\n type CheckboxElement,\n type CardElement,\n type CopyableElement,\n type DividerElement,\n type DropdownElement,\n type OptionElement,\n type RadioElement,\n type RadioGroupElement,\n type FieldElement,\n type FormElement,\n type HeadingElement,\n type ImageElement,\n type InputElement,\n type ItalicElement,\n type JSXElement,\n type LinkElement,\n type RowElement,\n type SpinnerElement,\n type StandardFormattingElement,\n type TextElement,\n type TooltipElement,\n type ValueElement,\n type FileInputElement,\n type ContainerElement,\n type FooterElement,\n type IconElement,\n type SectionElement,\n type SelectorElement,\n type SelectorOptionElement,\n IconName,\n} from './components';\n\n/**\n * A struct for the {@link Key} type.\n */\nexport const KeyStruct: Describe<Key> = nullUnion([string(), number()]);\n\n/**\n * A struct for the {@link StringElement} type.\n */\nexport const StringElementStruct: Describe<StringElement> = children([\n string(),\n]);\n\n/**\n * A struct for the {@link GenericSnapElement} type.\n */\nexport const ElementStruct: Describe<GenericSnapElement> = object({\n type: string(),\n props: record(string(), JsonStruct),\n key: nullable(KeyStruct),\n});\n\n/**\n * A helper function for creating a struct for a {@link Nestable} type.\n *\n * @param struct - The struct for the type to test.\n * @returns The struct for the nestable type.\n */\nfunction nestable<Type, Schema>(\n struct: Struct<Type, Schema>,\n): Struct<Nestable<Type>, any> {\n const nestableStruct: Struct<Nestable<Type>> = selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return array(lazy(() => nestableStruct));\n }\n return struct;\n });\n\n return nestableStruct;\n}\n\n/**\n * A helper function for creating a struct which allows children of a specific\n * type, as well as `null` and `boolean`.\n *\n * @param structs - The structs to allow as children.\n * @returns The struct for the children.\n */\nfunction children<Head extends AnyStruct, Tail extends AnyStruct[]>(\n structs: [head: Head, ...tail: Tail],\n): Struct<\n Nestable<Infer<Head> | InferStructTuple<Tail>[number] | boolean | null>,\n null\n> {\n return nestable(\n nullable(\n selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n if (structs.length === 1) {\n return structs[0];\n }\n return nullUnion(structs);\n }),\n ),\n ) as unknown as Struct<\n Nestable<Infer<Head> | InferStructTuple<Tail>[number] | boolean | null>,\n null\n >;\n}\n\n/**\n * A helper function for creating a struct which allows a single child of a specific\n * type, as well as `null` and `boolean`.\n *\n * @param struct - The struct to allow as a single child.\n * @returns The struct for the children.\n */\nfunction singleChild<Type extends AnyStruct>(\n struct: Type,\n): Struct<Infer<Type> | boolean | null, null> {\n return nullable(\n selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n\n return struct;\n }),\n ) as unknown as Struct<Infer<Type> | boolean | null, null>;\n}\n\n/**\n * A helper function for creating a struct for a JSX element.\n *\n * @param name - The name of the element.\n * @param props - The props of the element.\n * @returns The struct for the element.\n */\nfunction element<Name extends string, Props extends ObjectSchema = EmptyObject>(\n name: Name,\n props: Props = {} as Props,\n) {\n return object({\n type: literal(name) as unknown as Struct<Name, Name>,\n props: object(props),\n key: nullable(KeyStruct),\n });\n}\n\n/**\n * A helper function for creating a struct for a JSX element with selective props.\n *\n * @param name - The name of the element.\n * @param selector - The selector function choosing the struct to validate with.\n * @returns The struct for the element.\n */\nfunction elementWithSelectiveProps<\n Name extends string,\n Selector extends (value: any) => AnyStruct,\n>(name: Name, selector: Selector) {\n return object({\n type: literal(name) as unknown as Struct<Name, Name>,\n props: selectiveUnion(selector),\n key: nullable(KeyStruct),\n });\n}\n\n/**\n * A struct for the {@link ImageElement} type.\n */\nexport const ImageStruct: Describe<ImageElement> = element('Image', {\n src: svg(),\n alt: optional(string()),\n});\n\nconst IconNameStruct: Struct<`${IconName}`, null> = nullUnion(\n Object.values(IconName).map((name) => literal(name)) as any,\n);\n\n/**\n * A struct for the {@link IconElement} type.\n */\nexport const IconStruct: Describe<IconElement> = element('Icon', {\n name: IconNameStruct,\n color: optional(\n nullUnion([literal('default'), literal('primary'), literal('muted')]),\n ),\n size: optional(nullUnion([literal('md'), literal('inherit')])),\n});\n\n/**\n * A struct for the {@link ButtonElement} type.\n */\nexport const ButtonStruct: Describe<ButtonElement> = element('Button', {\n children: children([StringElementStruct, ImageStruct, IconStruct]),\n name: optional(string()),\n type: optional(nullUnion([literal('button'), literal('submit')])),\n variant: optional(nullUnion([literal('primary'), literal('destructive')])),\n disabled: optional(boolean()),\n form: optional(string()),\n});\n\n/**\n * A struct for the {@link CheckboxElement} type.\n */\nexport const CheckboxStruct: Describe<CheckboxElement> = element('Checkbox', {\n name: string(),\n checked: optional(boolean()),\n label: optional(string()),\n variant: optional(nullUnion([literal('default'), literal('toggle')])),\n});\n\n/**\n * A struct for the generic input element props.\n */\nexport const GenericInputPropsStruct = object({\n name: string(),\n value: optional(string()),\n placeholder: optional(string()),\n});\n\n/**\n * A struct for the text type input props.\n */\nexport const TextInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('text'),\n }),\n);\n\n/**\n * A struct for the password type input props.\n */\nexport const PasswordInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('password'),\n }),\n);\n\n/**\n * A struct for the number type input props.\n */\nexport const NumberInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('number'),\n min: optional(number()),\n max: optional(number()),\n step: optional(number()),\n }),\n);\n\n/**\n * A struct for the {@link InputElement} type.\n */\nexport const InputStruct: Describe<InputElement> = elementWithSelectiveProps(\n 'Input',\n (value) => {\n if (isPlainObject(value) && hasProperty(value, 'type')) {\n switch (value.type) {\n case 'text':\n return TextInputPropsStruct;\n case 'password':\n return PasswordInputPropsStruct;\n case 'number':\n return NumberInputPropsStruct;\n default:\n return GenericInputPropsStruct;\n }\n }\n return GenericInputPropsStruct;\n },\n);\n\n/**\n * A struct for the {@link OptionElement} type.\n */\nexport const OptionStruct: Describe<OptionElement> = element('Option', {\n value: string(),\n children: string(),\n});\n\n/**\n * A struct for the {@link DropdownElement} type.\n */\nexport const DropdownStruct: Describe<DropdownElement> = element('Dropdown', {\n name: string(),\n value: optional(string()),\n children: children([OptionStruct]),\n});\n\n/**\n * A struct for the {@link CardElement} type.\n */\nexport const CardStruct: Describe<CardElement> = element('Card', {\n image: optional(string()),\n title: string(),\n description: optional(string()),\n value: string(),\n extra: optional(string()),\n});\n\n/**\n * A struct for the {@link SelectorOptionElement} type.\n */\nexport const SelectorOptionStruct: Describe<SelectorOptionElement> = element(\n 'SelectorOption',\n {\n value: string(),\n children: CardStruct,\n },\n);\n\n/**\n * A struct for the {@link SelectorElement} type.\n */\nexport const SelectorStruct: Describe<SelectorElement> = element('Selector', {\n name: string(),\n title: string(),\n value: optional(string()),\n children: children([SelectorOptionStruct]),\n});\n\n/**\n * A struct for the {@link RadioElement} type.\n */\nexport const RadioStruct: Describe<RadioElement> = element('Radio', {\n value: string(),\n children: string(),\n});\n\n/**\n * A struct for the {@link RadioGroupElement} type.\n */\nexport const RadioGroupStruct: Describe<RadioGroupElement> = element(\n 'RadioGroup',\n {\n name: string(),\n value: optional(string()),\n children: children([RadioStruct]),\n },\n);\n\n/**\n * A struct for the {@link FileInputElement} type.\n */\nexport const FileInputStruct: Describe<FileInputElement> = element(\n 'FileInput',\n {\n name: string(),\n accept: nullUnion([optional(array(string()))]),\n compact: optional(boolean()),\n },\n);\n\n/**\n * A subset of JSX elements that represent the tuple Box + Input of the Field children.\n */\nconst BOX_INPUT_LEFT = [\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n InputStruct,\n] as [typeof BoxChildStruct, typeof InputStruct];\n\n/**\n * A subset of JSX elements that represent the tuple Input + Box of the Field children.\n */\nconst BOX_INPUT_RIGHT = [\n InputStruct,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n] as [typeof InputStruct, typeof BoxChildStruct];\n\n/**\n * A subset of JSX elements that represent the tuple Box + Input + Box of the Field children.\n */\nconst BOX_INPUT_BOTH = [\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n InputStruct,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n] as [typeof BoxChildStruct, typeof InputStruct, typeof BoxChildStruct];\n\n/**\n * A subset of JSX elements that are allowed as single children of the Field component.\n */\nconst FIELD_CHILDREN_ARRAY = [\n InputStruct,\n DropdownStruct,\n RadioGroupStruct,\n FileInputStruct,\n CheckboxStruct,\n SelectorStruct,\n] as [\n typeof InputStruct,\n typeof DropdownStruct,\n typeof RadioGroupStruct,\n typeof FileInputStruct,\n typeof CheckboxStruct,\n typeof SelectorStruct,\n];\n\n/**\n * A union of the allowed children of the Field component.\n * This is mainly used in the simulator for validation purposes.\n */\nexport const FieldChildUnionStruct = nullUnion([\n ...FIELD_CHILDREN_ARRAY,\n ...BOX_INPUT_LEFT,\n ...BOX_INPUT_RIGHT,\n ...BOX_INPUT_BOTH,\n]);\n\n/**\n * A subset of JSX elements that are allowed as children of the Field component.\n */\nconst FieldChildStruct = nullUnion([\n tuple(BOX_INPUT_LEFT),\n tuple(BOX_INPUT_RIGHT),\n tuple(BOX_INPUT_BOTH),\n ...FIELD_CHILDREN_ARRAY,\n]) as unknown as Struct<\n | [InputElement, GenericSnapChildren]\n | [GenericSnapChildren, InputElement]\n | [GenericSnapChildren, InputElement, GenericSnapChildren]\n | DropdownElement\n | RadioGroupElement\n | FileInputElement\n | InputElement\n | CheckboxElement\n | SelectorElement,\n null\n>;\n\n/**\n * A struct for the {@link FieldElement} type.\n */\nexport const FieldStruct: Describe<FieldElement> = element('Field', {\n label: optional(string()),\n error: optional(string()),\n children: FieldChildStruct,\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Form component.\n */\nexport const FormChildStruct = children(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n [FieldStruct, lazy(() => BoxChildStruct)],\n) as unknown as Struct<SnapsChildren<GenericSnapElement>, null>;\n\n/**\n * A struct for the {@link FormElement} type.\n */\nexport const FormStruct: Describe<FormElement> = element('Form', {\n children: FormChildStruct,\n name: string(),\n});\n\n/**\n * A struct for the {@link BoldElement} type.\n */\nexport const BoldStruct: Describe<BoldElement> = element('Bold', {\n children: children([\n string(),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n lazy(() => ItalicStruct) as unknown as Struct<\n SnapElement<JsonObject, 'Italic'>\n >,\n ]),\n});\n\n/**\n * A struct for the {@link ItalicElement} type.\n */\nexport const ItalicStruct: Describe<ItalicElement> = element('Italic', {\n children: children([\n string(),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n lazy(() => BoldStruct) as unknown as Struct<\n SnapElement<JsonObject, 'Bold'>\n >,\n ]),\n});\n\nexport const FormattingStruct: Describe<StandardFormattingElement> = typedUnion(\n [BoldStruct, ItalicStruct],\n);\n\n/**\n * A struct for the {@link AddressElement} type.\n */\nexport const AddressStruct: Describe<AddressElement> = element('Address', {\n address: nullUnion([HexChecksumAddressStruct, CaipAccountIdStruct]),\n truncate: optional(boolean()),\n displayName: optional(boolean()),\n avatar: optional(boolean()),\n});\n\n/**\n * A struct for the {@link AvatarElement} type.\n */\nexport const AvatarStruct = element('Avatar', {\n address: CaipAccountIdStruct,\n size: optional(nullUnion([literal('sm'), literal('md'), literal('lg')])),\n}) as unknown as Struct<AvatarElement, null>;\n\nexport const BoxChildrenStruct = children(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n [lazy(() => BoxChildStruct)],\n) as unknown as Struct<SnapsChildren<GenericSnapElement>, null>;\n\n/**\n * A struct for the {@link BoxElement} type.\n */\nexport const BoxStruct: Describe<BoxElement> = element('Box', {\n children: BoxChildrenStruct,\n direction: optional(nullUnion([literal('horizontal'), literal('vertical')])),\n alignment: optional(\n nullUnion([\n literal('start'),\n literal('center'),\n literal('end'),\n literal('space-between'),\n literal('space-around'),\n ]),\n ),\n center: optional(boolean()),\n});\n\nconst FooterButtonStruct = refine(ButtonStruct, 'FooterButton', (value) => {\n if (\n typeof value.props.children === 'string' ||\n typeof value.props.children === 'boolean' ||\n value.props.children === null\n ) {\n return true;\n }\n\n if (Array.isArray(value.props.children)) {\n const hasNonTextElements = value.props.children.some(\n (child) =>\n typeof child !== 'string' &&\n typeof child !== 'boolean' &&\n child !== null,\n );\n\n if (!hasNonTextElements) {\n return true;\n }\n }\n\n return 'Footer buttons may only contain text.';\n});\n\n/**\n * A struct for the {@link SectionElement} type.\n */\nexport const SectionStruct: Describe<SectionElement> = element('Section', {\n children: BoxChildrenStruct,\n direction: optional(nullUnion([literal('horizontal'), literal('vertical')])),\n alignment: optional(\n nullUnion([\n literal('start'),\n literal('center'),\n literal('end'),\n literal('space-between'),\n literal('space-around'),\n ]),\n ),\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Footer component.\n * This set should include a single button or a tuple of two buttons.\n */\n\nexport const FooterChildStruct = selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return tuple([FooterButtonStruct, FooterButtonStruct]);\n }\n return FooterButtonStruct;\n});\n\n/**\n * A struct for the {@link FooterElement} type.\n */\nexport const FooterStruct: Describe<FooterElement> = element('Footer', {\n children: FooterChildStruct,\n});\n\n/**\n * A struct for the {@link CopyableElement} type.\n */\nexport const CopyableStruct: Describe<CopyableElement> = element('Copyable', {\n value: string(),\n sensitive: optional(boolean()),\n});\n\n/**\n * A struct for the {@link DividerElement} type.\n */\nexport const DividerStruct: Describe<DividerElement> = element('Divider');\n\n/**\n * A struct for the {@link ValueElement} type.\n */\nexport const ValueStruct: Describe<ValueElement> = element('Value', {\n value: string(),\n extra: string(),\n});\n\n/**\n * A struct for the {@link HeadingElement} type.\n */\nexport const HeadingStruct: Describe<HeadingElement> = element('Heading', {\n children: StringElementStruct,\n size: optional(nullUnion([literal('sm'), literal('md'), literal('lg')])),\n});\n\n/**\n * A struct for the {@link LinkElement} type.\n */\nexport const LinkStruct: Describe<LinkElement> = element('Link', {\n href: string(),\n children: children([\n FormattingStruct,\n string(),\n IconStruct,\n ImageStruct,\n AddressStruct,\n ]),\n});\n\n/**\n * A struct for the {@link TextElement} type.\n */\nexport const TextStruct: Describe<TextElement> = element('Text', {\n children: children([\n selectiveUnion((value) => {\n if (typeof value === 'string') {\n return string();\n }\n return typedUnion([BoldStruct, ItalicStruct, LinkStruct, IconStruct]);\n }),\n ]),\n alignment: optional(\n nullUnion([literal('start'), literal('center'), literal('end')]),\n ),\n color: optional(\n nullUnion([\n literal('default'),\n literal('alternative'),\n literal('muted'),\n literal('error'),\n literal('success'),\n literal('warning'),\n ]),\n ),\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Tooltip component.\n * This set should include all text components and the Image.\n */\nexport const TooltipChildStruct = selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n return typedUnion([\n TextStruct,\n BoldStruct,\n ItalicStruct,\n LinkStruct,\n ImageStruct,\n IconStruct,\n ]);\n});\n\n/**\n * A subset of JSX elements that are allowed as content of the Tooltip component.\n * This set should include all text components.\n */\nexport const TooltipContentStruct = selectiveUnion((value) => {\n if (typeof value === 'string') {\n return string();\n }\n return typedUnion([\n TextStruct,\n BoldStruct,\n ItalicStruct,\n LinkStruct,\n IconStruct,\n ]);\n});\n\n/**\n * A struct for the {@link TooltipElement} type.\n */\nexport const TooltipStruct: Describe<TooltipElement> = element('Tooltip', {\n children: nullable(TooltipChildStruct),\n content: TooltipContentStruct,\n});\n\n/**\n * A struct for the {@link RowElement} type.\n */\nexport const RowStruct: Describe<RowElement> = element('Row', {\n label: string(),\n children: typedUnion([\n AddressStruct,\n ImageStruct,\n TextStruct,\n ValueStruct,\n LinkStruct,\n ]),\n variant: optional(\n nullUnion([literal('default'), literal('warning'), literal('critical')]),\n ),\n tooltip: optional(string()),\n});\n\n/**\n * A struct for the {@link SpinnerElement} type.\n */\nexport const SpinnerStruct: Describe<SpinnerElement> = element('Spinner');\n\n/**\n * A subset of JSX elements that are allowed as children of the Box component.\n * This set includes all components, except components that need to be nested in\n * another component (e.g., Field must be contained in a Form).\n */\nexport const BoxChildStruct = typedUnion([\n AddressStruct,\n BoldStruct,\n BoxStruct,\n ButtonStruct,\n CopyableStruct,\n DividerStruct,\n DropdownStruct,\n RadioGroupStruct,\n FileInputStruct,\n FormStruct,\n HeadingStruct,\n InputStruct,\n ImageStruct,\n ItalicStruct,\n LinkStruct,\n RowStruct,\n SpinnerStruct,\n TextStruct,\n TooltipStruct,\n CheckboxStruct,\n CardStruct,\n IconStruct,\n SelectorStruct,\n SectionStruct,\n AvatarStruct,\n]);\n\n/**\n * A struct for the {@link ContainerElement} type.\n */\nexport const ContainerStruct: Describe<ContainerElement> = element(\n 'Container',\n {\n children: selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return tuple([BoxChildStruct, FooterStruct]);\n }\n return BoxChildStruct;\n }) as unknown as Struct<\n [GenericSnapElement, FooterElement] | GenericSnapElement,\n null\n >,\n },\n);\n\n/**\n * For now, the allowed JSX elements at the root are the same as the allowed\n * children of the Box component.\n */\nexport const RootJSXElementStruct = typedUnion([\n BoxChildStruct,\n ContainerStruct,\n]);\n\n/**\n * A struct for the {@link JSXElement} type.\n */\nexport const JSXElementStruct: Describe<JSXElement> = typedUnion([\n ButtonStruct,\n InputStruct,\n FileInputStruct,\n FieldStruct,\n FormStruct,\n BoldStruct,\n ItalicStruct,\n AddressStruct,\n BoxStruct,\n CopyableStruct,\n DividerStruct,\n HeadingStruct,\n ImageStruct,\n LinkStruct,\n RowStruct,\n SpinnerStruct,\n TextStruct,\n DropdownStruct,\n OptionStruct,\n RadioGroupStruct,\n RadioStruct,\n ValueStruct,\n TooltipStruct,\n CheckboxStruct,\n FooterStruct,\n ContainerStruct,\n CardStruct,\n IconStruct,\n SelectorStruct,\n SelectorOptionStruct,\n SectionStruct,\n AvatarStruct,\n]);\n\n/**\n * Check if a value is a JSX element.\n *\n * @param value - The value to check.\n * @returns True if the value is a JSX element, false otherwise.\n */\nexport function isJSXElement(value: unknown): value is JSXElement {\n return is(value, JSXElementStruct);\n}\n\n/**\n * Check if a value is a JSX element, without validating all of its contents.\n * This is useful when you want to validate the structure of a value, but not\n * all the children.\n *\n * This should only be used when you are sure that the value is safe to use,\n * i.e., after using {@link isJSXElement}.\n *\n * @param value - The value to check.\n * @returns True if the value is a JSX element, false otherwise.\n */\nexport function isJSXElementUnsafe(value: unknown): value is JSXElement {\n return (\n isPlainObject(value) &&\n hasProperty(value, 'type') &&\n hasProperty(value, 'props') &&\n hasProperty(value, 'key')\n );\n}\n\n/**\n * Assert that a value is a JSX element.\n *\n * @param value - The value to check.\n * @throws If the value is not a JSX element.\n */\nexport function assertJSXElement(value: unknown): asserts value is JSXElement {\n // TODO: We should use the error parsing utils from `snaps-utils` to improve\n // the error messages. It currently includes colours and potentially other\n // formatting that we might not want to include in the SDK.\n if (!isJSXElement(value)) {\n throw new Error(\n `Expected a JSX element, but received ${JSON.stringify(\n value,\n )}. Please refer to the documentation for the supported JSX elements and their props.`,\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"validation.cjs","sourceRoot":"","sources":["../../src/jsx/validation.ts"],"names":[],"mappings":";;;;AAOA,uDAc+B;AAC/B,2CAMyB;AAGzB,sDAMsB;AAatB,uDAmCsB;AAEtB;;GAEG;AACU,QAAA,SAAS,GAAkB,IAAA,qBAAS,EAAC,CAAC,IAAA,oBAAM,GAAE,EAAE,IAAA,oBAAM,GAAE,CAAC,CAAC,CAAC;AAExE;;GAEG;AACU,QAAA,mBAAmB,GAA4B,QAAQ,CAAC;IACnE,IAAA,oBAAM,GAAE;CACT,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,aAAa,GAAiC,IAAA,oBAAM,EAAC;IAChE,IAAI,EAAE,IAAA,oBAAM,GAAE;IACd,KAAK,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IACnC,GAAG,EAAE,IAAA,sBAAQ,EAAC,iBAAS,CAAC;CACzB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,QAAQ,CACf,MAA4B;IAE5B,MAAM,cAAc,GAA2B,IAAA,0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BAAW;IACX,kBAAU;IACV,kBAAU;IACV,oBAAY;IACZ,qBAAa;IACb,iBAAS;IACT,sBAAc;IACd,qBAAa;IACb,qBAAa;IACb,mBAAW;IACX,kBAAU;IACV,iBAAS;IACT,qBAAa;IACb,kBAAU;IACV,sBAAc;IACd,oBAAY;IACZ,wBAAgB;IAChB,mBAAW;IACX,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,oBAAY;IACZ,uBAAe;IACf,kBAAU;IACV,kBAAU;IACV,sBAAc;IACd,4BAAoB;IACpB,qBAAa;IACb,oBAAY;CACb,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,IAAA,gBAAE,EAAC,KAAK,EAAE,wBAAgB,CAAC,CAAC;AACrC,CAAC;AAFD,oCAEC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,CACL,IAAA,qBAAa,EAAC,KAAK,CAAC;QACpB,IAAA,mBAAW,EAAC,KAAK,EAAE,MAAM,CAAC;QAC1B,IAAA,mBAAW,EAAC,KAAK,EAAE,OAAO,CAAC;QAC3B,IAAA,mBAAW,EAAC,KAAK,EAAE,KAAK,CAAC,CAC1B,CAAC;AACJ,CAAC;AAPD,gDAOC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,4EAA4E;IAC5E,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,wCAAwC,IAAI,CAAC,SAAS,CACpD,KAAK,CACN,qFAAqF,CACvF,CAAC;IACJ,CAAC;AACH,CAAC;AAXD,4CAWC","sourcesContent":["import type {\n AnyStruct,\n Infer,\n InferStructTuple,\n ObjectSchema,\n Struct,\n} from '@metamask/superstruct';\nimport {\n is,\n boolean,\n optional,\n array,\n lazy,\n nullable,\n number,\n object,\n record,\n string,\n tuple,\n refine,\n assign,\n} from '@metamask/superstruct';\nimport {\n CaipAccountIdStruct,\n hasProperty,\n HexChecksumAddressStruct,\n isPlainObject,\n JsonStruct,\n} from '@metamask/utils';\n\nimport type { Describe } from '../internals';\nimport {\n literal,\n nullUnion,\n selectiveUnion,\n svg,\n typedUnion,\n} from '../internals';\nimport type { EmptyObject } from '../types';\nimport type {\n GenericSnapChildren,\n GenericSnapElement,\n JsonObject,\n Key,\n Nestable,\n SnapElement,\n SnapsChildren,\n StringElement,\n} from './component';\nimport type { AvatarElement } from './components';\nimport {\n type AddressElement,\n type BoldElement,\n type BoxElement,\n type ButtonElement,\n type CheckboxElement,\n type CardElement,\n type CopyableElement,\n type DividerElement,\n type DropdownElement,\n type OptionElement,\n type RadioElement,\n type RadioGroupElement,\n type FieldElement,\n type FormElement,\n type HeadingElement,\n type ImageElement,\n type InputElement,\n type ItalicElement,\n type JSXElement,\n type LinkElement,\n type RowElement,\n type SpinnerElement,\n type StandardFormattingElement,\n type TextElement,\n type TooltipElement,\n type ValueElement,\n type FileInputElement,\n type ContainerElement,\n type FooterElement,\n type IconElement,\n type SectionElement,\n type SelectorElement,\n type SelectorOptionElement,\n IconName,\n} from './components';\n\n/**\n * A struct for the {@link Key} type.\n */\nexport const KeyStruct: Describe<Key> = nullUnion([string(), number()]);\n\n/**\n * A struct for the {@link StringElement} type.\n */\nexport const StringElementStruct: Describe<StringElement> = children([\n string(),\n]);\n\n/**\n * A struct for the {@link GenericSnapElement} type.\n */\nexport const ElementStruct: Describe<GenericSnapElement> = object({\n type: string(),\n props: record(string(), JsonStruct),\n key: nullable(KeyStruct),\n});\n\n/**\n * A helper function for creating a struct for a {@link Nestable} type.\n *\n * @param struct - The struct for the type to test.\n * @returns The struct for the nestable type.\n */\nfunction nestable<Type, Schema>(\n struct: Struct<Type, Schema>,\n): Struct<Nestable<Type>, any> {\n const nestableStruct: Struct<Nestable<Type>> = selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return array(lazy(() => nestableStruct));\n }\n return struct;\n });\n\n return nestableStruct;\n}\n\n/**\n * A helper function for creating a struct which allows children of a specific\n * type, as well as `null` and `boolean`.\n *\n * @param structs - The structs to allow as children.\n * @returns The struct for the children.\n */\nfunction children<Head extends AnyStruct, Tail extends AnyStruct[]>(\n structs: [head: Head, ...tail: Tail],\n): Struct<\n Nestable<Infer<Head> | InferStructTuple<Tail>[number] | boolean | null>,\n null\n> {\n return nestable(\n nullable(\n selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n if (structs.length === 1) {\n return structs[0];\n }\n return nullUnion(structs);\n }),\n ),\n ) as unknown as Struct<\n Nestable<Infer<Head> | InferStructTuple<Tail>[number] | boolean | null>,\n null\n >;\n}\n\n/**\n * A helper function for creating a struct which allows a single child of a specific\n * type, as well as `null` and `boolean`.\n *\n * @param struct - The struct to allow as a single child.\n * @returns The struct for the children.\n */\nfunction singleChild<Type extends AnyStruct>(\n struct: Type,\n): Struct<Infer<Type> | boolean | null, null> {\n return nullable(\n selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n\n return struct;\n }),\n ) as unknown as Struct<Infer<Type> | boolean | null, null>;\n}\n\n/**\n * A helper function for creating a struct for a JSX element.\n *\n * @param name - The name of the element.\n * @param props - The props of the element.\n * @returns The struct for the element.\n */\nfunction element<Name extends string, Props extends ObjectSchema = EmptyObject>(\n name: Name,\n props: Props = {} as Props,\n) {\n return object({\n type: literal(name) as unknown as Struct<Name, Name>,\n props: object(props),\n key: nullable(KeyStruct),\n });\n}\n\n/**\n * A helper function for creating a struct for a JSX element with selective props.\n *\n * @param name - The name of the element.\n * @param selector - The selector function choosing the struct to validate with.\n * @returns The struct for the element.\n */\nfunction elementWithSelectiveProps<\n Name extends string,\n Selector extends (value: any) => AnyStruct,\n>(name: Name, selector: Selector) {\n return object({\n type: literal(name) as unknown as Struct<Name, Name>,\n props: selectiveUnion(selector),\n key: nullable(KeyStruct),\n });\n}\n\n/**\n * A struct for the {@link ImageElement} type.\n */\nexport const ImageStruct: Describe<ImageElement> = element('Image', {\n src: svg(),\n alt: optional(string()),\n});\n\nconst IconNameStruct: Struct<`${IconName}`, null> = nullUnion(\n Object.values(IconName).map((name) => literal(name)) as any,\n);\n\n/**\n * A struct for the {@link IconElement} type.\n */\nexport const IconStruct: Describe<IconElement> = element('Icon', {\n name: IconNameStruct,\n color: optional(\n nullUnion([literal('default'), literal('primary'), literal('muted')]),\n ),\n size: optional(nullUnion([literal('md'), literal('inherit')])),\n});\n\n/**\n * A struct for the {@link ButtonElement} type.\n */\nexport const ButtonStruct: Describe<ButtonElement> = element('Button', {\n children: children([StringElementStruct, ImageStruct, IconStruct]),\n name: optional(string()),\n type: optional(nullUnion([literal('button'), literal('submit')])),\n variant: optional(nullUnion([literal('primary'), literal('destructive')])),\n disabled: optional(boolean()),\n form: optional(string()),\n});\n\n/**\n * A struct for the {@link CheckboxElement} type.\n */\nexport const CheckboxStruct: Describe<CheckboxElement> = element('Checkbox', {\n name: string(),\n checked: optional(boolean()),\n label: optional(string()),\n variant: optional(nullUnion([literal('default'), literal('toggle')])),\n});\n\n/**\n * A struct for the generic input element props.\n */\nexport const GenericInputPropsStruct = object({\n name: string(),\n value: optional(string()),\n placeholder: optional(string()),\n});\n\n/**\n * A struct for the text type input props.\n */\nexport const TextInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('text'),\n }),\n);\n\n/**\n * A struct for the password type input props.\n */\nexport const PasswordInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('password'),\n }),\n);\n\n/**\n * A struct for the number type input props.\n */\nexport const NumberInputPropsStruct = assign(\n GenericInputPropsStruct,\n object({\n type: literal('number'),\n min: optional(number()),\n max: optional(number()),\n step: optional(number()),\n }),\n);\n\n/**\n * A struct for the {@link InputElement} type.\n */\nexport const InputStruct: Describe<InputElement> = elementWithSelectiveProps(\n 'Input',\n (value) => {\n if (isPlainObject(value) && hasProperty(value, 'type')) {\n switch (value.type) {\n case 'text':\n return TextInputPropsStruct;\n case 'password':\n return PasswordInputPropsStruct;\n case 'number':\n return NumberInputPropsStruct;\n default:\n return GenericInputPropsStruct;\n }\n }\n return GenericInputPropsStruct;\n },\n);\n\n/**\n * A struct for the {@link OptionElement} type.\n */\nexport const OptionStruct: Describe<OptionElement> = element('Option', {\n value: string(),\n children: string(),\n});\n\n/**\n * A struct for the {@link DropdownElement} type.\n */\nexport const DropdownStruct: Describe<DropdownElement> = element('Dropdown', {\n name: string(),\n value: optional(string()),\n children: children([OptionStruct]),\n});\n\n/**\n * A struct for the {@link AddressElement} type.\n */\nexport const AddressStruct: Describe<AddressElement> = element('Address', {\n address: nullUnion([HexChecksumAddressStruct, CaipAccountIdStruct]),\n truncate: optional(boolean()),\n displayName: optional(boolean()),\n avatar: optional(boolean()),\n});\n\n/**\n * A struct for the {@link CardElement} type.\n */\nexport const CardStruct: Describe<CardElement> = element('Card', {\n image: optional(string()),\n title: selectiveUnion((value) => {\n if (typeof value === 'object') {\n return AddressStruct;\n }\n return string();\n }),\n description: optional(string()),\n value: string(),\n extra: optional(string()),\n});\n\n/**\n * A struct for the {@link SelectorOptionElement} type.\n */\nexport const SelectorOptionStruct: Describe<SelectorOptionElement> = element(\n 'SelectorOption',\n {\n value: string(),\n children: CardStruct,\n },\n);\n\n/**\n * A struct for the {@link SelectorElement} type.\n */\nexport const SelectorStruct: Describe<SelectorElement> = element('Selector', {\n name: string(),\n title: string(),\n value: optional(string()),\n children: children([SelectorOptionStruct]),\n});\n\n/**\n * A struct for the {@link RadioElement} type.\n */\nexport const RadioStruct: Describe<RadioElement> = element('Radio', {\n value: string(),\n children: string(),\n});\n\n/**\n * A struct for the {@link RadioGroupElement} type.\n */\nexport const RadioGroupStruct: Describe<RadioGroupElement> = element(\n 'RadioGroup',\n {\n name: string(),\n value: optional(string()),\n children: children([RadioStruct]),\n },\n);\n\n/**\n * A struct for the {@link FileInputElement} type.\n */\nexport const FileInputStruct: Describe<FileInputElement> = element(\n 'FileInput',\n {\n name: string(),\n accept: nullUnion([optional(array(string()))]),\n compact: optional(boolean()),\n },\n);\n\n/**\n * A subset of JSX elements that represent the tuple Box + Input of the Field children.\n */\nconst BOX_INPUT_LEFT = [\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n InputStruct,\n] as [typeof BoxChildStruct, typeof InputStruct];\n\n/**\n * A subset of JSX elements that represent the tuple Input + Box of the Field children.\n */\nconst BOX_INPUT_RIGHT = [\n InputStruct,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n] as [typeof InputStruct, typeof BoxChildStruct];\n\n/**\n * A subset of JSX elements that represent the tuple Box + Input + Box of the Field children.\n */\nconst BOX_INPUT_BOTH = [\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n InputStruct,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n singleChild(lazy(() => BoxChildStruct)),\n] as [typeof BoxChildStruct, typeof InputStruct, typeof BoxChildStruct];\n\n/**\n * A subset of JSX elements that are allowed as single children of the Field component.\n */\nconst FIELD_CHILDREN_ARRAY = [\n InputStruct,\n DropdownStruct,\n RadioGroupStruct,\n FileInputStruct,\n CheckboxStruct,\n SelectorStruct,\n] as [\n typeof InputStruct,\n typeof DropdownStruct,\n typeof RadioGroupStruct,\n typeof FileInputStruct,\n typeof CheckboxStruct,\n typeof SelectorStruct,\n];\n\n/**\n * A union of the allowed children of the Field component.\n * This is mainly used in the simulator for validation purposes.\n */\nexport const FieldChildUnionStruct = nullUnion([\n ...FIELD_CHILDREN_ARRAY,\n ...BOX_INPUT_LEFT,\n ...BOX_INPUT_RIGHT,\n ...BOX_INPUT_BOTH,\n]);\n\n/**\n * A subset of JSX elements that are allowed as children of the Field component.\n */\nconst FieldChildStruct = nullUnion([\n tuple(BOX_INPUT_LEFT),\n tuple(BOX_INPUT_RIGHT),\n tuple(BOX_INPUT_BOTH),\n ...FIELD_CHILDREN_ARRAY,\n]) as unknown as Struct<\n | [InputElement, GenericSnapChildren]\n | [GenericSnapChildren, InputElement]\n | [GenericSnapChildren, InputElement, GenericSnapChildren]\n | DropdownElement\n | RadioGroupElement\n | FileInputElement\n | InputElement\n | CheckboxElement\n | SelectorElement,\n null\n>;\n\n/**\n * A struct for the {@link FieldElement} type.\n */\nexport const FieldStruct: Describe<FieldElement> = element('Field', {\n label: optional(string()),\n error: optional(string()),\n children: FieldChildStruct,\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Form component.\n */\nexport const FormChildStruct = children(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n [FieldStruct, lazy(() => BoxChildStruct)],\n) as unknown as Struct<SnapsChildren<GenericSnapElement>, null>;\n\n/**\n * A struct for the {@link FormElement} type.\n */\nexport const FormStruct: Describe<FormElement> = element('Form', {\n children: FormChildStruct,\n name: string(),\n});\n\n/**\n * A struct for the {@link BoldElement} type.\n */\nexport const BoldStruct: Describe<BoldElement> = element('Bold', {\n children: children([\n string(),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n lazy(() => ItalicStruct) as unknown as Struct<\n SnapElement<JsonObject, 'Italic'>\n >,\n ]),\n});\n\n/**\n * A struct for the {@link ItalicElement} type.\n */\nexport const ItalicStruct: Describe<ItalicElement> = element('Italic', {\n children: children([\n string(),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n lazy(() => BoldStruct) as unknown as Struct<\n SnapElement<JsonObject, 'Bold'>\n >,\n ]),\n});\n\nexport const FormattingStruct: Describe<StandardFormattingElement> = typedUnion(\n [BoldStruct, ItalicStruct],\n);\n\n/**\n * A struct for the {@link AvatarElement} type.\n */\nexport const AvatarStruct = element('Avatar', {\n address: CaipAccountIdStruct,\n size: optional(nullUnion([literal('sm'), literal('md'), literal('lg')])),\n}) as unknown as Struct<AvatarElement, null>;\n\nexport const BoxChildrenStruct = children(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n [lazy(() => BoxChildStruct)],\n) as unknown as Struct<SnapsChildren<GenericSnapElement>, null>;\n\n/**\n * A struct for the {@link BoxElement} type.\n */\nexport const BoxStruct: Describe<BoxElement> = element('Box', {\n children: BoxChildrenStruct,\n direction: optional(nullUnion([literal('horizontal'), literal('vertical')])),\n alignment: optional(\n nullUnion([\n literal('start'),\n literal('center'),\n literal('end'),\n literal('space-between'),\n literal('space-around'),\n ]),\n ),\n center: optional(boolean()),\n});\n\nconst FooterButtonStruct = refine(ButtonStruct, 'FooterButton', (value) => {\n if (\n typeof value.props.children === 'string' ||\n typeof value.props.children === 'boolean' ||\n value.props.children === null\n ) {\n return true;\n }\n\n if (Array.isArray(value.props.children)) {\n const hasNonTextElements = value.props.children.some(\n (child) =>\n typeof child !== 'string' &&\n typeof child !== 'boolean' &&\n child !== null,\n );\n\n if (!hasNonTextElements) {\n return true;\n }\n }\n\n return 'Footer buttons may only contain text.';\n});\n\n/**\n * A struct for the {@link SectionElement} type.\n */\nexport const SectionStruct: Describe<SectionElement> = element('Section', {\n children: BoxChildrenStruct,\n direction: optional(nullUnion([literal('horizontal'), literal('vertical')])),\n alignment: optional(\n nullUnion([\n literal('start'),\n literal('center'),\n literal('end'),\n literal('space-between'),\n literal('space-around'),\n ]),\n ),\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Footer component.\n * This set should include a single button or a tuple of two buttons.\n */\n\nexport const FooterChildStruct = selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return tuple([FooterButtonStruct, FooterButtonStruct]);\n }\n return FooterButtonStruct;\n});\n\n/**\n * A struct for the {@link FooterElement} type.\n */\nexport const FooterStruct: Describe<FooterElement> = element('Footer', {\n children: FooterChildStruct,\n});\n\n/**\n * A struct for the {@link CopyableElement} type.\n */\nexport const CopyableStruct: Describe<CopyableElement> = element('Copyable', {\n value: string(),\n sensitive: optional(boolean()),\n});\n\n/**\n * A struct for the {@link DividerElement} type.\n */\nexport const DividerStruct: Describe<DividerElement> = element('Divider');\n\n/**\n * A struct for the {@link ValueElement} type.\n */\nexport const ValueStruct: Describe<ValueElement> = element('Value', {\n value: string(),\n extra: string(),\n});\n\n/**\n * A struct for the {@link HeadingElement} type.\n */\nexport const HeadingStruct: Describe<HeadingElement> = element('Heading', {\n children: StringElementStruct,\n size: optional(nullUnion([literal('sm'), literal('md'), literal('lg')])),\n});\n\n/**\n * A struct for the {@link LinkElement} type.\n */\nexport const LinkStruct: Describe<LinkElement> = element('Link', {\n href: string(),\n children: children([\n FormattingStruct,\n string(),\n IconStruct,\n ImageStruct,\n AddressStruct,\n ]),\n});\n\n/**\n * A struct for the {@link TextElement} type.\n */\nexport const TextStruct: Describe<TextElement> = element('Text', {\n children: children([\n selectiveUnion((value) => {\n if (typeof value === 'string') {\n return string();\n }\n return typedUnion([BoldStruct, ItalicStruct, LinkStruct, IconStruct]);\n }),\n ]),\n alignment: optional(\n nullUnion([literal('start'), literal('center'), literal('end')]),\n ),\n color: optional(\n nullUnion([\n literal('default'),\n literal('alternative'),\n literal('muted'),\n literal('error'),\n literal('success'),\n literal('warning'),\n ]),\n ),\n});\n\n/**\n * A subset of JSX elements that are allowed as children of the Tooltip component.\n * This set should include all text components and the Image.\n */\nexport const TooltipChildStruct = selectiveUnion((value) => {\n if (typeof value === 'boolean') {\n return boolean();\n }\n return typedUnion([\n TextStruct,\n BoldStruct,\n ItalicStruct,\n LinkStruct,\n ImageStruct,\n IconStruct,\n ]);\n});\n\n/**\n * A subset of JSX elements that are allowed as content of the Tooltip component.\n * This set should include all text components.\n */\nexport const TooltipContentStruct = selectiveUnion((value) => {\n if (typeof value === 'string') {\n return string();\n }\n return typedUnion([\n TextStruct,\n BoldStruct,\n ItalicStruct,\n LinkStruct,\n IconStruct,\n ]);\n});\n\n/**\n * A struct for the {@link TooltipElement} type.\n */\nexport const TooltipStruct: Describe<TooltipElement> = element('Tooltip', {\n children: nullable(TooltipChildStruct),\n content: TooltipContentStruct,\n});\n\n/**\n * A struct for the {@link RowElement} type.\n */\nexport const RowStruct: Describe<RowElement> = element('Row', {\n label: string(),\n children: typedUnion([\n AddressStruct,\n ImageStruct,\n TextStruct,\n ValueStruct,\n LinkStruct,\n ]),\n variant: optional(\n nullUnion([literal('default'), literal('warning'), literal('critical')]),\n ),\n tooltip: optional(string()),\n});\n\n/**\n * A struct for the {@link SpinnerElement} type.\n */\nexport const SpinnerStruct: Describe<SpinnerElement> = element('Spinner');\n\n/**\n * A subset of JSX elements that are allowed as children of the Box component.\n * This set includes all components, except components that need to be nested in\n * another component (e.g., Field must be contained in a Form).\n */\nexport const BoxChildStruct = typedUnion([\n AddressStruct,\n BoldStruct,\n BoxStruct,\n ButtonStruct,\n CopyableStruct,\n DividerStruct,\n DropdownStruct,\n RadioGroupStruct,\n FileInputStruct,\n FormStruct,\n HeadingStruct,\n InputStruct,\n ImageStruct,\n ItalicStruct,\n LinkStruct,\n RowStruct,\n SpinnerStruct,\n TextStruct,\n TooltipStruct,\n CheckboxStruct,\n CardStruct,\n IconStruct,\n SelectorStruct,\n SectionStruct,\n AvatarStruct,\n]);\n\n/**\n * A struct for the {@link ContainerElement} type.\n */\nexport const ContainerStruct: Describe<ContainerElement> = element(\n 'Container',\n {\n children: selectiveUnion((value) => {\n if (Array.isArray(value)) {\n return tuple([BoxChildStruct, FooterStruct]);\n }\n return BoxChildStruct;\n }) as unknown as Struct<\n [GenericSnapElement, FooterElement] | GenericSnapElement,\n null\n >,\n },\n);\n\n/**\n * For now, the allowed JSX elements at the root are the same as the allowed\n * children of the Box component.\n */\nexport const RootJSXElementStruct = typedUnion([\n BoxChildStruct,\n ContainerStruct,\n]);\n\n/**\n * A struct for the {@link JSXElement} type.\n */\nexport const JSXElementStruct: Describe<JSXElement> = typedUnion([\n ButtonStruct,\n InputStruct,\n FileInputStruct,\n FieldStruct,\n FormStruct,\n BoldStruct,\n ItalicStruct,\n AddressStruct,\n BoxStruct,\n CopyableStruct,\n DividerStruct,\n HeadingStruct,\n ImageStruct,\n LinkStruct,\n RowStruct,\n SpinnerStruct,\n TextStruct,\n DropdownStruct,\n OptionStruct,\n RadioGroupStruct,\n RadioStruct,\n ValueStruct,\n TooltipStruct,\n CheckboxStruct,\n FooterStruct,\n ContainerStruct,\n CardStruct,\n IconStruct,\n SelectorStruct,\n SelectorOptionStruct,\n SectionStruct,\n AvatarStruct,\n]);\n\n/**\n * Check if a value is a JSX element.\n *\n * @param value - The value to check.\n * @returns True if the value is a JSX element, false otherwise.\n */\nexport function isJSXElement(value: unknown): value is JSXElement {\n return is(value, JSXElementStruct);\n}\n\n/**\n * Check if a value is a JSX element, without validating all of its contents.\n * This is useful when you want to validate the structure of a value, but not\n * all the children.\n *\n * This should only be used when you are sure that the value is safe to use,\n * i.e., after using {@link isJSXElement}.\n *\n * @param value - The value to check.\n * @returns True if the value is a JSX element, false otherwise.\n */\nexport function isJSXElementUnsafe(value: unknown): value is JSXElement {\n return (\n isPlainObject(value) &&\n hasProperty(value, 'type') &&\n hasProperty(value, 'props') &&\n hasProperty(value, 'key')\n );\n}\n\n/**\n * Assert that a value is a JSX element.\n *\n * @param value - The value to check.\n * @throws If the value is not a JSX element.\n */\nexport function assertJSXElement(value: unknown): asserts value is JSXElement {\n // TODO: We should use the error parsing utils from `snaps-utils` to improve\n // the error messages. It currently includes colours and potentially other\n // formatting that we might not want to include in the SDK.\n if (!isJSXElement(value)) {\n throw new Error(\n `Expected a JSX element, but received ${JSON.stringify(\n value,\n )}. Please refer to the documentation for the supported JSX elements and their props.`,\n );\n }\n}\n"]}
|
|
@@ -102,6 +102,10 @@ export declare const OptionStruct: Describe<OptionElement>;
|
|
|
102
102
|
* A struct for the {@link DropdownElement} type.
|
|
103
103
|
*/
|
|
104
104
|
export declare const DropdownStruct: Describe<DropdownElement>;
|
|
105
|
+
/**
|
|
106
|
+
* A struct for the {@link AddressElement} type.
|
|
107
|
+
*/
|
|
108
|
+
export declare const AddressStruct: Describe<AddressElement>;
|
|
105
109
|
/**
|
|
106
110
|
* A struct for the {@link CardElement} type.
|
|
107
111
|
*/
|
|
@@ -140,7 +144,7 @@ export declare const FieldChildUnionStruct: Struct<SnapElement<import("./compone
|
|
|
140
144
|
value: string;
|
|
141
145
|
children: string;
|
|
142
146
|
}, "Radio">>;
|
|
143
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").
|
|
147
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").AddressProps, "Address"> | SnapElement<import("./components/index.cjs").CardProps, "Card"> | SnapElement<import("./components/index.cjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.cjs").BoldProps, "Bold"> | SnapElement<import("./components/index.cjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.cjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.cjs").BoxProps, "Box"> | SnapElement<import("./components/index.cjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
144
148
|
children: StringElement;
|
|
145
149
|
size?: "md" | "sm" | "lg" | undefined;
|
|
146
150
|
}, "Heading"> | SnapElement<import("./components/index.cjs").LinkProps, "Link"> | SnapElement<import("./components/index.cjs").TextProps, "Text"> | SnapElement<import("./components/index.cjs").RowProps, "Row"> | SnapElement<import("./components/index.cjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.cjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -165,10 +169,6 @@ export declare const BoldStruct: Describe<BoldElement>;
|
|
|
165
169
|
*/
|
|
166
170
|
export declare const ItalicStruct: Describe<ItalicElement>;
|
|
167
171
|
export declare const FormattingStruct: Describe<StandardFormattingElement>;
|
|
168
|
-
/**
|
|
169
|
-
* A struct for the {@link AddressElement} type.
|
|
170
|
-
*/
|
|
171
|
-
export declare const AddressStruct: Describe<AddressElement>;
|
|
172
172
|
/**
|
|
173
173
|
* A struct for the {@link AvatarElement} type.
|
|
174
174
|
*/
|
|
@@ -255,7 +255,7 @@ export declare const BoxChildStruct: Struct<SnapElement<import("./components/ind
|
|
|
255
255
|
value: string;
|
|
256
256
|
children: string;
|
|
257
257
|
}, "Radio">>;
|
|
258
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").
|
|
258
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").AddressProps, "Address"> | SnapElement<import("./components/index.cjs").CardProps, "Card"> | SnapElement<import("./components/index.cjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.cjs").BoldProps, "Bold"> | SnapElement<import("./components/index.cjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.cjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.cjs").BoxProps, "Box"> | SnapElement<import("./components/index.cjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
259
259
|
children: StringElement;
|
|
260
260
|
size?: "md" | "sm" | "lg" | undefined;
|
|
261
261
|
}, "Heading"> | SnapElement<import("./components/index.cjs").LinkProps, "Link"> | SnapElement<import("./components/index.cjs").TextProps, "Text"> | SnapElement<import("./components/index.cjs").RowProps, "Row"> | SnapElement<import("./components/index.cjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.cjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -277,7 +277,7 @@ export declare const RootJSXElementStruct: Struct<SnapElement<import("./componen
|
|
|
277
277
|
value: string;
|
|
278
278
|
children: string;
|
|
279
279
|
}, "Radio">>;
|
|
280
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").
|
|
280
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.cjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.cjs").AddressProps, "Address"> | SnapElement<import("./components/index.cjs").CardProps, "Card"> | SnapElement<import("./components/index.cjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.cjs").BoldProps, "Bold"> | SnapElement<import("./components/index.cjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.cjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.cjs").BoxProps, "Box"> | SnapElement<import("./components/index.cjs").ContainerProps, "Container"> | SnapElement<import("./components/index.cjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
281
281
|
children: StringElement;
|
|
282
282
|
size?: "md" | "sm" | "lg" | undefined;
|
|
283
283
|
}, "Heading"> | SnapElement<import("./components/index.cjs").LinkProps, "Link"> | SnapElement<import("./components/index.cjs").TextProps, "Text"> | SnapElement<import("./components/index.cjs").RowProps, "Row"> | SnapElement<import("./components/index.cjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.cjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.cts","sourceRoot":"","sources":["../../src/jsx/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,MAAM,EACP,8BAA8B;AAwB/B,OAAO,KAAK,EAAE,QAAQ,EAAE,+BAAqB;AAS7C,OAAO,KAAK,EAEV,kBAAkB,EAElB,GAAG,EAEH,WAAW,EACX,aAAa,EACb,aAAa,EACd,wBAAoB;AAErB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,K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EH;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAS3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAsB3C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;sPAY7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,kTAW/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,cAAc,CAGjD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,UAAU,CAazC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAsB,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;sWA0BzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,gBAAgB,CAatD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;sWAG/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAiChD,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAOtE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAW5E"}
|
|
@@ -102,6 +102,10 @@ export declare const OptionStruct: Describe<OptionElement>;
|
|
|
102
102
|
* A struct for the {@link DropdownElement} type.
|
|
103
103
|
*/
|
|
104
104
|
export declare const DropdownStruct: Describe<DropdownElement>;
|
|
105
|
+
/**
|
|
106
|
+
* A struct for the {@link AddressElement} type.
|
|
107
|
+
*/
|
|
108
|
+
export declare const AddressStruct: Describe<AddressElement>;
|
|
105
109
|
/**
|
|
106
110
|
* A struct for the {@link CardElement} type.
|
|
107
111
|
*/
|
|
@@ -140,7 +144,7 @@ export declare const FieldChildUnionStruct: Struct<SnapElement<import("./compone
|
|
|
140
144
|
value: string;
|
|
141
145
|
children: string;
|
|
142
146
|
}, "Radio">>;
|
|
143
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").
|
|
147
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").AddressProps, "Address"> | SnapElement<import("./components/index.mjs").CardProps, "Card"> | SnapElement<import("./components/index.mjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.mjs").BoldProps, "Bold"> | SnapElement<import("./components/index.mjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.mjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.mjs").BoxProps, "Box"> | SnapElement<import("./components/index.mjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
144
148
|
children: StringElement;
|
|
145
149
|
size?: "md" | "sm" | "lg" | undefined;
|
|
146
150
|
}, "Heading"> | SnapElement<import("./components/index.mjs").LinkProps, "Link"> | SnapElement<import("./components/index.mjs").TextProps, "Text"> | SnapElement<import("./components/index.mjs").RowProps, "Row"> | SnapElement<import("./components/index.mjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.mjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -165,10 +169,6 @@ export declare const BoldStruct: Describe<BoldElement>;
|
|
|
165
169
|
*/
|
|
166
170
|
export declare const ItalicStruct: Describe<ItalicElement>;
|
|
167
171
|
export declare const FormattingStruct: Describe<StandardFormattingElement>;
|
|
168
|
-
/**
|
|
169
|
-
* A struct for the {@link AddressElement} type.
|
|
170
|
-
*/
|
|
171
|
-
export declare const AddressStruct: Describe<AddressElement>;
|
|
172
172
|
/**
|
|
173
173
|
* A struct for the {@link AvatarElement} type.
|
|
174
174
|
*/
|
|
@@ -255,7 +255,7 @@ export declare const BoxChildStruct: Struct<SnapElement<import("./components/ind
|
|
|
255
255
|
value: string;
|
|
256
256
|
children: string;
|
|
257
257
|
}, "Radio">>;
|
|
258
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").
|
|
258
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").AddressProps, "Address"> | SnapElement<import("./components/index.mjs").CardProps, "Card"> | SnapElement<import("./components/index.mjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.mjs").BoldProps, "Bold"> | SnapElement<import("./components/index.mjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.mjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.mjs").BoxProps, "Box"> | SnapElement<import("./components/index.mjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
259
259
|
children: StringElement;
|
|
260
260
|
size?: "md" | "sm" | "lg" | undefined;
|
|
261
261
|
}, "Heading"> | SnapElement<import("./components/index.mjs").LinkProps, "Link"> | SnapElement<import("./components/index.mjs").TextProps, "Text"> | SnapElement<import("./components/index.mjs").RowProps, "Row"> | SnapElement<import("./components/index.mjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.mjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -277,7 +277,7 @@ export declare const RootJSXElementStruct: Struct<SnapElement<import("./componen
|
|
|
277
277
|
value: string;
|
|
278
278
|
children: string;
|
|
279
279
|
}, "Radio">>;
|
|
280
|
-
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").
|
|
280
|
+
}, "RadioGroup"> | SnapElement<import("./components/index.mjs").FileInputProps, "FileInput"> | SnapElement<import("./components/index.mjs").AddressProps, "Address"> | SnapElement<import("./components/index.mjs").CardProps, "Card"> | SnapElement<import("./components/index.mjs").SelectorProps, "Selector"> | SnapElement<import("./components/index.mjs").BoldProps, "Bold"> | SnapElement<import("./components/index.mjs").ItalicProps, "Italic"> | SnapElement<import("./components/index.mjs").AvatarProps, "Avatar"> | SnapElement<import("./components/index.mjs").BoxProps, "Box"> | SnapElement<import("./components/index.mjs").ContainerProps, "Container"> | SnapElement<import("./components/index.mjs").CopyableProps, "Copyable"> | SnapElement<Record<string, never>, "Divider"> | SnapElement<{
|
|
281
281
|
children: StringElement;
|
|
282
282
|
size?: "md" | "sm" | "lg" | undefined;
|
|
283
283
|
}, "Heading"> | SnapElement<import("./components/index.mjs").LinkProps, "Link"> | SnapElement<import("./components/index.mjs").TextProps, "Text"> | SnapElement<import("./components/index.mjs").RowProps, "Row"> | SnapElement<import("./components/index.mjs").SectionProps, "Section"> | SnapElement<Record<string, never>, "Spinner"> | SnapElement<import("./components/index.mjs").TooltipProps, "Tooltip">, null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.mts","sourceRoot":"","sources":["../../src/jsx/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,MAAM,EACP,8BAA8B;AAwB/B,OAAO,KAAK,EAAE,QAAQ,EAAE,+BAAqB;AAS7C,OAAO,KAAK,EAEV,kBAAkB,EAElB,GAAG,EAEH,WAAW,EACX,aAAa,EACb,aAAa,EACd,wBAAoB;AAErB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KA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