@metamask/snaps-sdk 6.24.0 → 7.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/CHANGELOG.md +17 -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/form/AccountSelector.cjs +31 -0
- package/dist/jsx/components/form/AccountSelector.cjs.map +1 -0
- package/dist/jsx/components/form/AccountSelector.d.cts +50 -0
- package/dist/jsx/components/form/AccountSelector.d.cts.map +1 -0
- package/dist/jsx/components/form/AccountSelector.d.mts +50 -0
- package/dist/jsx/components/form/AccountSelector.d.mts.map +1 -0
- package/dist/jsx/components/form/AccountSelector.mjs +28 -0
- package/dist/jsx/components/form/AccountSelector.mjs.map +1 -0
- package/dist/jsx/components/form/index.cjs +2 -1
- package/dist/jsx/components/form/index.cjs.map +1 -1
- package/dist/jsx/components/form/index.d.cts +4 -2
- package/dist/jsx/components/form/index.d.cts.map +1 -1
- package/dist/jsx/components/form/index.d.mts +4 -2
- package/dist/jsx/components/form/index.d.mts.map +1 -1
- package/dist/jsx/components/form/index.mjs +2 -1
- package/dist/jsx/components/form/index.mjs.map +1 -1
- package/dist/jsx/validation.cjs +15 -2
- package/dist/jsx/validation.cjs.map +1 -1
- package/dist/jsx/validation.d.cts +8 -4
- package/dist/jsx/validation.d.cts.map +1 -1
- package/dist/jsx/validation.d.mts +8 -4
- package/dist/jsx/validation.d.mts.map +1 -1
- package/dist/jsx/validation.mjs +13 -0
- package/dist/jsx/validation.mjs.map +1 -1
- package/dist/types/handlers/user-input.cjs +18 -3
- package/dist/types/handlers/user-input.cjs.map +1 -1
- package/dist/types/handlers/user-input.d.cts +32 -0
- package/dist/types/handlers/user-input.d.cts.map +1 -1
- package/dist/types/handlers/user-input.d.mts +32 -0
- package/dist/types/handlers/user-input.d.mts.map +1 -1
- package/dist/types/handlers/user-input.mjs +19 -4
- package/dist/types/handlers/user-input.mjs.map +1 -1
- package/dist/types/interface.cjs +1 -0
- package/dist/types/interface.cjs.map +1 -1
- package/dist/types/interface.d.cts +13 -1
- package/dist/types/interface.d.cts.map +1 -1
- package/dist/types/interface.d.mts +13 -1
- package/dist/types/interface.d.mts.map +1 -1
- package/dist/types/interface.mjs +2 -1
- package/dist/types/interface.mjs.map +1 -1
- package/dist/types/methods/get-client-status.cjs.map +1 -1
- package/dist/types/methods/get-client-status.d.cts +1 -0
- package/dist/types/methods/get-client-status.d.cts.map +1 -1
- package/dist/types/methods/get-client-status.d.mts +1 -0
- package/dist/types/methods/get-client-status.d.mts.map +1 -1
- package/dist/types/methods/get-client-status.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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 "__#15613@#code": number;
|
|
19
|
+
readonly "__#15613@#message": string;
|
|
20
|
+
readonly "__#15613@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#15613@#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 "__#15613@#code": number;
|
|
33
|
+
readonly "__#15613@#message": string;
|
|
34
|
+
readonly "__#15613@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#15613@#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 "__#15613@#code": number;
|
|
47
|
+
readonly "__#15613@#message": string;
|
|
48
|
+
readonly "__#15613@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#15613@#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 "__#7808@#code": number;
|
|
19
|
+
readonly "__#7808@#message": string;
|
|
20
|
+
readonly "__#7808@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#7808@#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 "__#7808@#code": number;
|
|
33
|
+
readonly "__#7808@#message": string;
|
|
34
|
+
readonly "__#7808@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#7808@#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 "__#7808@#code": number;
|
|
47
|
+
readonly "__#7808@#message": string;
|
|
48
|
+
readonly "__#7808@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#7808@#stack"?: string | undefined;
|
|
50
50
|
readonly name: string;
|
|
51
51
|
readonly code: number;
|
|
52
52
|
readonly message: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountSelector = void 0;
|
|
4
|
+
const component_1 = require("../../component.cjs");
|
|
5
|
+
const TYPE = 'AccountSelector';
|
|
6
|
+
/**
|
|
7
|
+
* An account selector component, which is used to create an account selector.
|
|
8
|
+
*
|
|
9
|
+
* @param props - The props of the component.
|
|
10
|
+
* @param props.name - The name of the account selector. This is used to identify the
|
|
11
|
+
* state in the form data.
|
|
12
|
+
* @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.
|
|
13
|
+
* @param props.chainIds - The chain IDs to filter the accounts to show.
|
|
14
|
+
* @param props.switchGlobalAccount - Whether to switch the selected account in the client.
|
|
15
|
+
* @param props.value - The selected address.
|
|
16
|
+
* @returns An account selector element.
|
|
17
|
+
* @example
|
|
18
|
+
* <AccountSelector name="account-selector" />
|
|
19
|
+
* @example
|
|
20
|
+
* <AccountSelector name="account-selector" hideExternalAccounts />
|
|
21
|
+
* @example
|
|
22
|
+
* <AccountSelector name="account-selector" chainIds={['eip155:1']} />
|
|
23
|
+
* @example
|
|
24
|
+
* <AccountSelector name="account-selector" switchGlobalAccount />
|
|
25
|
+
* @example
|
|
26
|
+
* <AccountSelector name="account-selector" value="eip155:1:0x1234..." />
|
|
27
|
+
* @example
|
|
28
|
+
* <AccountSelector name="account-selector" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value="eip155:1:0x1234..." />
|
|
29
|
+
*/
|
|
30
|
+
exports.AccountSelector = (0, component_1.createSnapComponent)(TYPE);
|
|
31
|
+
//# sourceMappingURL=AccountSelector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSelector.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/AccountSelector.ts"],"names":[],"mappings":";;;AAEA,mDAAsD;AAoBtD,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,eAAe,GAAG,IAAA,+BAAmB,EAGhD,IAAI,CAAC,CAAC","sourcesContent":["import type { CaipAccountId, CaipChainId } from '@metamask/utils';\n\nimport { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link AccountSelector} component.\n *\n * @property name - The name of the account selector. This is used to identify the\n * state in the form data.\n * @property hideExternalAccounts - Whether to hide accounts that don't belong to the snap.\n * @property chainIds - The chain IDs to filter the accounts to show.\n * @property switchGlobalAccount - Whether to switch the selected account in the client.\n * @property value - The selected address.\n */\nexport type AccountSelectorProps = {\n name: string;\n hideExternalAccounts?: boolean | undefined;\n chainIds?: CaipChainId[] | undefined;\n switchGlobalAccount?: boolean | undefined;\n value?: CaipAccountId | undefined;\n};\n\nconst TYPE = 'AccountSelector';\n\n/**\n * An account selector component, which is used to create an account selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the account selector. This is used to identify the\n * state in the form data.\n * @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.\n * @param props.chainIds - The chain IDs to filter the accounts to show.\n * @param props.switchGlobalAccount - Whether to switch the selected account in the client.\n * @param props.value - The selected address.\n * @returns An account selector element.\n * @example\n * <AccountSelector name=\"account-selector\" />\n * @example\n * <AccountSelector name=\"account-selector\" hideExternalAccounts />\n * @example\n * <AccountSelector name=\"account-selector\" chainIds={['eip155:1']} />\n * @example\n * <AccountSelector name=\"account-selector\" switchGlobalAccount />\n * @example\n * <AccountSelector name=\"account-selector\" value=\"eip155:1:0x1234...\" />\n * @example\n * <AccountSelector name=\"account-selector\" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value=\"eip155:1:0x1234...\" />\n */\nexport const AccountSelector = createSnapComponent<\n AccountSelectorProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * An account selector element.\n *\n * @see AccountSelector\n */\nexport type AccountSelectorElement = ReturnType<typeof AccountSelector>;\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CaipAccountId, CaipChainId } from "@metamask/utils";
|
|
2
|
+
/**
|
|
3
|
+
* The props of the {@link AccountSelector} component.
|
|
4
|
+
*
|
|
5
|
+
* @property name - The name of the account selector. This is used to identify the
|
|
6
|
+
* state in the form data.
|
|
7
|
+
* @property hideExternalAccounts - Whether to hide accounts that don't belong to the snap.
|
|
8
|
+
* @property chainIds - The chain IDs to filter the accounts to show.
|
|
9
|
+
* @property switchGlobalAccount - Whether to switch the selected account in the client.
|
|
10
|
+
* @property value - The selected address.
|
|
11
|
+
*/
|
|
12
|
+
export type AccountSelectorProps = {
|
|
13
|
+
name: string;
|
|
14
|
+
hideExternalAccounts?: boolean | undefined;
|
|
15
|
+
chainIds?: CaipChainId[] | undefined;
|
|
16
|
+
switchGlobalAccount?: boolean | undefined;
|
|
17
|
+
value?: CaipAccountId | undefined;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* An account selector component, which is used to create an account selector.
|
|
21
|
+
*
|
|
22
|
+
* @param props - The props of the component.
|
|
23
|
+
* @param props.name - The name of the account selector. This is used to identify the
|
|
24
|
+
* state in the form data.
|
|
25
|
+
* @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.
|
|
26
|
+
* @param props.chainIds - The chain IDs to filter the accounts to show.
|
|
27
|
+
* @param props.switchGlobalAccount - Whether to switch the selected account in the client.
|
|
28
|
+
* @param props.value - The selected address.
|
|
29
|
+
* @returns An account selector element.
|
|
30
|
+
* @example
|
|
31
|
+
* <AccountSelector name="account-selector" />
|
|
32
|
+
* @example
|
|
33
|
+
* <AccountSelector name="account-selector" hideExternalAccounts />
|
|
34
|
+
* @example
|
|
35
|
+
* <AccountSelector name="account-selector" chainIds={['eip155:1']} />
|
|
36
|
+
* @example
|
|
37
|
+
* <AccountSelector name="account-selector" switchGlobalAccount />
|
|
38
|
+
* @example
|
|
39
|
+
* <AccountSelector name="account-selector" value="eip155:1:0x1234..." />
|
|
40
|
+
* @example
|
|
41
|
+
* <AccountSelector name="account-selector" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value="eip155:1:0x1234..." />
|
|
42
|
+
*/
|
|
43
|
+
export declare const AccountSelector: import("../../component.cjs").SnapComponent<AccountSelectorProps, "AccountSelector">;
|
|
44
|
+
/**
|
|
45
|
+
* An account selector element.
|
|
46
|
+
*
|
|
47
|
+
* @see AccountSelector
|
|
48
|
+
*/
|
|
49
|
+
export type AccountSelectorElement = ReturnType<typeof AccountSelector>;
|
|
50
|
+
//# sourceMappingURL=AccountSelector.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSelector.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/AccountSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wBAAwB;AAIlE;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACnC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,eAAe,kFAGrB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CaipAccountId, CaipChainId } from "@metamask/utils";
|
|
2
|
+
/**
|
|
3
|
+
* The props of the {@link AccountSelector} component.
|
|
4
|
+
*
|
|
5
|
+
* @property name - The name of the account selector. This is used to identify the
|
|
6
|
+
* state in the form data.
|
|
7
|
+
* @property hideExternalAccounts - Whether to hide accounts that don't belong to the snap.
|
|
8
|
+
* @property chainIds - The chain IDs to filter the accounts to show.
|
|
9
|
+
* @property switchGlobalAccount - Whether to switch the selected account in the client.
|
|
10
|
+
* @property value - The selected address.
|
|
11
|
+
*/
|
|
12
|
+
export type AccountSelectorProps = {
|
|
13
|
+
name: string;
|
|
14
|
+
hideExternalAccounts?: boolean | undefined;
|
|
15
|
+
chainIds?: CaipChainId[] | undefined;
|
|
16
|
+
switchGlobalAccount?: boolean | undefined;
|
|
17
|
+
value?: CaipAccountId | undefined;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* An account selector component, which is used to create an account selector.
|
|
21
|
+
*
|
|
22
|
+
* @param props - The props of the component.
|
|
23
|
+
* @param props.name - The name of the account selector. This is used to identify the
|
|
24
|
+
* state in the form data.
|
|
25
|
+
* @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.
|
|
26
|
+
* @param props.chainIds - The chain IDs to filter the accounts to show.
|
|
27
|
+
* @param props.switchGlobalAccount - Whether to switch the selected account in the client.
|
|
28
|
+
* @param props.value - The selected address.
|
|
29
|
+
* @returns An account selector element.
|
|
30
|
+
* @example
|
|
31
|
+
* <AccountSelector name="account-selector" />
|
|
32
|
+
* @example
|
|
33
|
+
* <AccountSelector name="account-selector" hideExternalAccounts />
|
|
34
|
+
* @example
|
|
35
|
+
* <AccountSelector name="account-selector" chainIds={['eip155:1']} />
|
|
36
|
+
* @example
|
|
37
|
+
* <AccountSelector name="account-selector" switchGlobalAccount />
|
|
38
|
+
* @example
|
|
39
|
+
* <AccountSelector name="account-selector" value="eip155:1:0x1234..." />
|
|
40
|
+
* @example
|
|
41
|
+
* <AccountSelector name="account-selector" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value="eip155:1:0x1234..." />
|
|
42
|
+
*/
|
|
43
|
+
export declare const AccountSelector: import("../../component.mjs").SnapComponent<AccountSelectorProps, "AccountSelector">;
|
|
44
|
+
/**
|
|
45
|
+
* An account selector element.
|
|
46
|
+
*
|
|
47
|
+
* @see AccountSelector
|
|
48
|
+
*/
|
|
49
|
+
export type AccountSelectorElement = ReturnType<typeof AccountSelector>;
|
|
50
|
+
//# sourceMappingURL=AccountSelector.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSelector.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/AccountSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wBAAwB;AAIlE;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACnC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,eAAe,kFAGrB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createSnapComponent } from "../../component.mjs";
|
|
2
|
+
const TYPE = 'AccountSelector';
|
|
3
|
+
/**
|
|
4
|
+
* An account selector component, which is used to create an account selector.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The props of the component.
|
|
7
|
+
* @param props.name - The name of the account selector. This is used to identify the
|
|
8
|
+
* state in the form data.
|
|
9
|
+
* @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.
|
|
10
|
+
* @param props.chainIds - The chain IDs to filter the accounts to show.
|
|
11
|
+
* @param props.switchGlobalAccount - Whether to switch the selected account in the client.
|
|
12
|
+
* @param props.value - The selected address.
|
|
13
|
+
* @returns An account selector element.
|
|
14
|
+
* @example
|
|
15
|
+
* <AccountSelector name="account-selector" />
|
|
16
|
+
* @example
|
|
17
|
+
* <AccountSelector name="account-selector" hideExternalAccounts />
|
|
18
|
+
* @example
|
|
19
|
+
* <AccountSelector name="account-selector" chainIds={['eip155:1']} />
|
|
20
|
+
* @example
|
|
21
|
+
* <AccountSelector name="account-selector" switchGlobalAccount />
|
|
22
|
+
* @example
|
|
23
|
+
* <AccountSelector name="account-selector" value="eip155:1:0x1234..." />
|
|
24
|
+
* @example
|
|
25
|
+
* <AccountSelector name="account-selector" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value="eip155:1:0x1234..." />
|
|
26
|
+
*/
|
|
27
|
+
export const AccountSelector = createSnapComponent(TYPE);
|
|
28
|
+
//# sourceMappingURL=AccountSelector.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSelector.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/AccountSelector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAoBtD,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAGhD,IAAI,CAAC,CAAC","sourcesContent":["import type { CaipAccountId, CaipChainId } from '@metamask/utils';\n\nimport { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link AccountSelector} component.\n *\n * @property name - The name of the account selector. This is used to identify the\n * state in the form data.\n * @property hideExternalAccounts - Whether to hide accounts that don't belong to the snap.\n * @property chainIds - The chain IDs to filter the accounts to show.\n * @property switchGlobalAccount - Whether to switch the selected account in the client.\n * @property value - The selected address.\n */\nexport type AccountSelectorProps = {\n name: string;\n hideExternalAccounts?: boolean | undefined;\n chainIds?: CaipChainId[] | undefined;\n switchGlobalAccount?: boolean | undefined;\n value?: CaipAccountId | undefined;\n};\n\nconst TYPE = 'AccountSelector';\n\n/**\n * An account selector component, which is used to create an account selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the account selector. This is used to identify the\n * state in the form data.\n * @param props.hideExternalAccounts - Whether to hide accounts that doesn't belong to the snap.\n * @param props.chainIds - The chain IDs to filter the accounts to show.\n * @param props.switchGlobalAccount - Whether to switch the selected account in the client.\n * @param props.value - The selected address.\n * @returns An account selector element.\n * @example\n * <AccountSelector name=\"account-selector\" />\n * @example\n * <AccountSelector name=\"account-selector\" hideExternalAccounts />\n * @example\n * <AccountSelector name=\"account-selector\" chainIds={['eip155:1']} />\n * @example\n * <AccountSelector name=\"account-selector\" switchGlobalAccount />\n * @example\n * <AccountSelector name=\"account-selector\" value=\"eip155:1:0x1234...\" />\n * @example\n * <AccountSelector name=\"account-selector\" hideExternalAccounts chainIds={['eip155:1']} switchGlobalAccount value=\"eip155:1:0x1234...\" />\n */\nexport const AccountSelector = createSnapComponent<\n AccountSelectorProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * An account selector element.\n *\n * @see AccountSelector\n */\nexport type AccountSelectorElement = ReturnType<typeof AccountSelector>;\n"]}
|
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AccountSelector.cjs"), exports);
|
|
18
|
+
__exportStar(require("./AddressInput.cjs"), exports);
|
|
17
19
|
__exportStar(require("./AssetSelector.cjs"), exports);
|
|
18
20
|
__exportStar(require("./Button.cjs"), exports);
|
|
19
21
|
__exportStar(require("./Checkbox.cjs"), exports);
|
|
@@ -27,5 +29,4 @@ __exportStar(require("./Form.cjs"), exports);
|
|
|
27
29
|
__exportStar(require("./Input.cjs"), exports);
|
|
28
30
|
__exportStar(require("./Selector.cjs"), exports);
|
|
29
31
|
__exportStar(require("./SelectorOption.cjs"), exports);
|
|
30
|
-
__exportStar(require("./AddressInput.cjs"), exports);
|
|
31
32
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,wDAAkC;AAClC,qDAA+B;AAC/B,sDAAgC;AAChC,+CAAyB;AACzB,iDAA2B;AAC3B,iDAA2B;AAC3B,+CAAyB;AACzB,8CAAwB;AACxB,mDAA6B;AAC7B,8CAAwB;AACxB,kDAA4B;AAC5B,6CAAuB;AACvB,8CAAwB;AACxB,iDAA2B;AAC3B,uDAAiC","sourcesContent":["import type { AccountSelectorElement } from './AccountSelector';\nimport type { AddressInputElement } from './AddressInput';\nimport type { AssetSelectorElement } from './AssetSelector';\nimport type { ButtonElement } from './Button';\nimport type { CheckboxElement } from './Checkbox';\nimport type { DropdownElement } from './Dropdown';\nimport type { FieldElement } from './Field';\nimport type { FileInputElement } from './FileInput';\nimport type { FormElement } from './Form';\nimport type { InputElement } from './Input';\nimport type { OptionElement } from './Option';\nimport type { RadioElement } from './Radio';\nimport type { RadioGroupElement } from './RadioGroup';\nimport type { SelectorElement } from './Selector';\nimport type { SelectorOptionElement } from './SelectorOption';\n\nexport * from './AccountSelector';\nexport * from './AddressInput';\nexport * from './AssetSelector';\nexport * from './Button';\nexport * from './Checkbox';\nexport * from './Dropdown';\nexport * from './Option';\nexport * from './Radio';\nexport * from './RadioGroup';\nexport * from './Field';\nexport * from './FileInput';\nexport * from './Form';\nexport * from './Input';\nexport * from './Selector';\nexport * from './SelectorOption';\n\nexport type StandardFormElement =\n | AccountSelectorElement\n | AddressInputElement\n | AssetSelectorElement\n | ButtonElement\n | CheckboxElement\n | FormElement\n | FieldElement\n | FileInputElement\n | InputElement\n | DropdownElement\n | OptionElement\n | RadioElement\n | RadioGroupElement\n | SelectorElement\n | SelectorOptionElement;\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AccountSelectorElement } from "./AccountSelector.cjs";
|
|
1
2
|
import type { AddressInputElement } from "./AddressInput.cjs";
|
|
2
3
|
import type { AssetSelectorElement } from "./AssetSelector.cjs";
|
|
3
4
|
import type { ButtonElement } from "./Button.cjs";
|
|
@@ -12,6 +13,8 @@ import type { RadioElement } from "./Radio.cjs";
|
|
|
12
13
|
import type { RadioGroupElement } from "./RadioGroup.cjs";
|
|
13
14
|
import type { SelectorElement } from "./Selector.cjs";
|
|
14
15
|
import type { SelectorOptionElement } from "./SelectorOption.cjs";
|
|
16
|
+
export * from "./AccountSelector.cjs";
|
|
17
|
+
export * from "./AddressInput.cjs";
|
|
15
18
|
export * from "./AssetSelector.cjs";
|
|
16
19
|
export * from "./Button.cjs";
|
|
17
20
|
export * from "./Checkbox.cjs";
|
|
@@ -25,6 +28,5 @@ export * from "./Form.cjs";
|
|
|
25
28
|
export * from "./Input.cjs";
|
|
26
29
|
export * from "./Selector.cjs";
|
|
27
30
|
export * from "./SelectorOption.cjs";
|
|
28
|
-
export
|
|
29
|
-
export type StandardFormElement = AssetSelectorElement | AddressInputElement | ButtonElement | CheckboxElement | FormElement | FieldElement | FileInputElement | InputElement | DropdownElement | OptionElement | RadioElement | RadioGroupElement | SelectorElement | SelectorOptionElement;
|
|
31
|
+
export type StandardFormElement = AccountSelectorElement | AddressInputElement | AssetSelectorElement | ButtonElement | CheckboxElement | FormElement | FieldElement | FileInputElement | InputElement | DropdownElement | OptionElement | RadioElement | RadioGroupElement | SelectorElement | SelectorOptionElement;
|
|
30
32
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,4BAAwB;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAqB;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D,oCAAgC;AAChC,6BAAyB;AACzB,+BAA2B;AAC3B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,4BAAwB;AACxB,gCAA4B;AAC5B,2BAAuB;AACvB,4BAAwB;AACxB,+BAA2B;AAC3B,qCAAiC;
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,8BAA0B;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,4BAAwB;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAqB;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D,sCAAkC;AAClC,mCAA+B;AAC/B,oCAAgC;AAChC,6BAAyB;AACzB,+BAA2B;AAC3B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,4BAAwB;AACxB,gCAA4B;AAC5B,2BAAuB;AACvB,4BAAwB;AACxB,+BAA2B;AAC3B,qCAAiC;AAEjC,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,GACpB,aAAa,GACb,eAAe,GACf,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,qBAAqB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AccountSelectorElement } from "./AccountSelector.mjs";
|
|
1
2
|
import type { AddressInputElement } from "./AddressInput.mjs";
|
|
2
3
|
import type { AssetSelectorElement } from "./AssetSelector.mjs";
|
|
3
4
|
import type { ButtonElement } from "./Button.mjs";
|
|
@@ -12,6 +13,8 @@ import type { RadioElement } from "./Radio.mjs";
|
|
|
12
13
|
import type { RadioGroupElement } from "./RadioGroup.mjs";
|
|
13
14
|
import type { SelectorElement } from "./Selector.mjs";
|
|
14
15
|
import type { SelectorOptionElement } from "./SelectorOption.mjs";
|
|
16
|
+
export * from "./AccountSelector.mjs";
|
|
17
|
+
export * from "./AddressInput.mjs";
|
|
15
18
|
export * from "./AssetSelector.mjs";
|
|
16
19
|
export * from "./Button.mjs";
|
|
17
20
|
export * from "./Checkbox.mjs";
|
|
@@ -25,6 +28,5 @@ export * from "./Form.mjs";
|
|
|
25
28
|
export * from "./Input.mjs";
|
|
26
29
|
export * from "./Selector.mjs";
|
|
27
30
|
export * from "./SelectorOption.mjs";
|
|
28
|
-
export
|
|
29
|
-
export type StandardFormElement = AssetSelectorElement | AddressInputElement | ButtonElement | CheckboxElement | FormElement | FieldElement | FileInputElement | InputElement | DropdownElement | OptionElement | RadioElement | RadioGroupElement | SelectorElement | SelectorOptionElement;
|
|
31
|
+
export type StandardFormElement = AccountSelectorElement | AddressInputElement | AssetSelectorElement | ButtonElement | CheckboxElement | FormElement | FieldElement | FileInputElement | InputElement | DropdownElement | OptionElement | RadioElement | RadioGroupElement | SelectorElement | SelectorOptionElement;
|
|
30
32
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,4BAAwB;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAqB;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D,oCAAgC;AAChC,6BAAyB;AACzB,+BAA2B;AAC3B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,4BAAwB;AACxB,gCAA4B;AAC5B,2BAAuB;AACvB,4BAAwB;AACxB,+BAA2B;AAC3B,qCAAiC;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,8BAA0B;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,4BAAwB;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAqB;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D,sCAAkC;AAClC,mCAA+B;AAC/B,oCAAgC;AAChC,6BAAyB;AACzB,+BAA2B;AAC3B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,4BAAwB;AACxB,gCAA4B;AAC5B,2BAAuB;AACvB,4BAAwB;AACxB,+BAA2B;AAC3B,qCAAiC;AAEjC,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,GACpB,aAAa,GACb,eAAe,GACf,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,qBAAqB,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./AccountSelector.mjs";
|
|
2
|
+
export * from "./AddressInput.mjs";
|
|
1
3
|
export * from "./AssetSelector.mjs";
|
|
2
4
|
export * from "./Button.mjs";
|
|
3
5
|
export * from "./Checkbox.mjs";
|
|
@@ -11,5 +13,4 @@ export * from "./Form.mjs";
|
|
|
11
13
|
export * from "./Input.mjs";
|
|
12
14
|
export * from "./Selector.mjs";
|
|
13
15
|
export * from "./SelectorOption.mjs";
|
|
14
|
-
export * from "./AddressInput.mjs";
|
|
15
16
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/index.ts"],"names":[],"mappings":"AAgBA,sCAAkC;AAClC,mCAA+B;AAC/B,oCAAgC;AAChC,6BAAyB;AACzB,+BAA2B;AAC3B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,iCAA6B;AAC7B,4BAAwB;AACxB,gCAA4B;AAC5B,2BAAuB;AACvB,4BAAwB;AACxB,+BAA2B;AAC3B,qCAAiC","sourcesContent":["import type { AccountSelectorElement } from './AccountSelector';\nimport type { AddressInputElement } from './AddressInput';\nimport type { AssetSelectorElement } from './AssetSelector';\nimport type { ButtonElement } from './Button';\nimport type { CheckboxElement } from './Checkbox';\nimport type { DropdownElement } from './Dropdown';\nimport type { FieldElement } from './Field';\nimport type { FileInputElement } from './FileInput';\nimport type { FormElement } from './Form';\nimport type { InputElement } from './Input';\nimport type { OptionElement } from './Option';\nimport type { RadioElement } from './Radio';\nimport type { RadioGroupElement } from './RadioGroup';\nimport type { SelectorElement } from './Selector';\nimport type { SelectorOptionElement } from './SelectorOption';\n\nexport * from './AccountSelector';\nexport * from './AddressInput';\nexport * from './AssetSelector';\nexport * from './Button';\nexport * from './Checkbox';\nexport * from './Dropdown';\nexport * from './Option';\nexport * from './Radio';\nexport * from './RadioGroup';\nexport * from './Field';\nexport * from './FileInput';\nexport * from './Form';\nexport * from './Input';\nexport * from './Selector';\nexport * from './SelectorOption';\n\nexport type StandardFormElement =\n | AccountSelectorElement\n | AddressInputElement\n | AssetSelectorElement\n | ButtonElement\n | CheckboxElement\n | FormElement\n | FieldElement\n | FileInputElement\n | InputElement\n | DropdownElement\n | OptionElement\n | RadioElement\n | RadioGroupElement\n | SelectorElement\n | SelectorOptionElement;\n"]}
|
package/dist/jsx/validation.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.assertJSXElement = exports.isJSXElementUnsafe = exports.isJSXElement = exports.JSXElementStruct = exports.RootJSXElementStruct = exports.ContainerStruct = exports.BoxChildStruct = void 0;
|
|
3
|
+
exports.RowStruct = exports.BannerStruct = exports.TooltipStruct = exports.TooltipContentStruct = exports.TooltipChildStruct = exports.ValueStruct = exports.TextStruct = exports.SkeletonStruct = exports.LinkStruct = exports.HeadingStruct = exports.DividerStruct = exports.CopyableStruct = exports.FooterStruct = exports.FooterChildStruct = exports.SectionStruct = exports.FormStruct = exports.FormChildStruct = exports.BoxStruct = exports.BoxChildrenStruct = exports.AvatarStruct = exports.FormattingStruct = exports.ItalicStruct = exports.BoldStruct = exports.FieldStruct = exports.FieldChildUnionStruct = exports.FileInputStruct = exports.RadioGroupStruct = exports.RadioStruct = exports.AssetSelectorStruct = exports.SelectorStruct = exports.SelectorOptionStruct = exports.CardStruct = exports.AccountSelectorStruct = exports.AddressStruct = exports.DropdownStruct = exports.OptionStruct = exports.AddressInputStruct = exports.InputStruct = exports.NumberInputPropsStruct = exports.PasswordInputPropsStruct = exports.TextInputPropsStruct = exports.GenericInputPropsStruct = exports.CheckboxStruct = exports.ButtonStruct = exports.IconStruct = exports.ImageStruct = exports.BorderRadiusStruct = exports.ElementStruct = exports.StringElementStruct = exports.KeyStruct = void 0;
|
|
4
|
+
exports.assertJSXElement = exports.isJSXElementUnsafe = exports.isJSXElement = exports.JSXElementStruct = exports.RootJSXElementStruct = exports.ContainerStruct = exports.BoxChildStruct = exports.SpinnerStruct = void 0;
|
|
5
5
|
const superstruct_1 = require("@metamask/superstruct");
|
|
6
6
|
const utils_1 = require("@metamask/utils");
|
|
7
7
|
const components_1 = require("./components/index.cjs");
|
|
@@ -237,6 +237,16 @@ exports.AddressStruct = element('Address', {
|
|
|
237
237
|
displayName: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
238
238
|
avatar: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
239
239
|
});
|
|
240
|
+
/**
|
|
241
|
+
* A struct for the {@link AccountSelectorElement} type.
|
|
242
|
+
*/
|
|
243
|
+
exports.AccountSelectorStruct = element('AccountSelector', {
|
|
244
|
+
name: (0, superstruct_1.string)(),
|
|
245
|
+
hideExternalAccounts: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
246
|
+
chainIds: (0, superstruct_1.optional)((0, superstruct_1.array)(utils_1.CaipChainIdStruct)),
|
|
247
|
+
switchGlobalAccount: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
|
|
248
|
+
value: (0, superstruct_1.optional)(utils_1.CaipAccountIdStruct),
|
|
249
|
+
});
|
|
240
250
|
/**
|
|
241
251
|
* A struct for the {@link CardElement} type.
|
|
242
252
|
*/
|
|
@@ -338,6 +348,7 @@ const BOX_INPUT_BOTH = [
|
|
|
338
348
|
const FIELD_CHILDREN_ARRAY = [
|
|
339
349
|
exports.AssetSelectorStruct,
|
|
340
350
|
exports.AddressInputStruct,
|
|
351
|
+
exports.AccountSelectorStruct,
|
|
341
352
|
exports.InputStruct,
|
|
342
353
|
exports.DropdownStruct,
|
|
343
354
|
exports.RadioGroupStruct,
|
|
@@ -654,6 +665,7 @@ exports.SpinnerStruct = element('Spinner');
|
|
|
654
665
|
* another component (e.g., Field must be contained in a Form).
|
|
655
666
|
*/
|
|
656
667
|
exports.BoxChildStruct = (0, internals_1.typedUnion)([
|
|
668
|
+
exports.AccountSelectorStruct,
|
|
657
669
|
exports.AddressStruct,
|
|
658
670
|
exports.AssetSelectorStruct,
|
|
659
671
|
exports.AddressInputStruct,
|
|
@@ -711,6 +723,7 @@ exports.RootJSXElementStruct = (0, internals_1.typedUnion)([
|
|
|
711
723
|
exports.JSXElementStruct = (0, internals_1.typedUnion)([
|
|
712
724
|
exports.AssetSelectorStruct,
|
|
713
725
|
exports.AddressInputStruct,
|
|
726
|
+
exports.AccountSelectorStruct,
|
|
714
727
|
exports.ButtonStruct,
|
|
715
728
|
exports.InputStruct,
|
|
716
729
|
exports.FileInputStruct,
|