@metamask/snaps-sdk 6.18.0 → 6.20.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 +29 -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/internals/index.cjs +0 -1
- package/dist/internals/index.cjs.map +1 -1
- package/dist/internals/index.d.cts +1 -1
- package/dist/internals/index.d.cts.map +1 -1
- package/dist/internals/index.d.mts +1 -1
- package/dist/internals/index.d.mts.map +1 -1
- package/dist/internals/index.mjs +0 -1
- package/dist/internals/index.mjs.map +1 -1
- package/dist/internals/jsx.cjs.map +1 -1
- package/dist/internals/jsx.d.cts +2 -1
- package/dist/internals/jsx.d.cts.map +1 -1
- package/dist/internals/jsx.d.mts +2 -1
- package/dist/internals/jsx.d.mts.map +1 -1
- package/dist/internals/jsx.mjs.map +1 -1
- package/dist/jsx/components/Banner.cjs.map +1 -1
- package/dist/jsx/components/Banner.d.cts +1 -1
- package/dist/jsx/components/Banner.d.cts.map +1 -1
- package/dist/jsx/components/Banner.d.mts +1 -1
- package/dist/jsx/components/Banner.d.mts.map +1 -1
- package/dist/jsx/components/Banner.mjs.map +1 -1
- package/dist/jsx/components/Box.cjs +4 -0
- package/dist/jsx/components/Box.cjs.map +1 -1
- package/dist/jsx/components/Box.d.cts +5 -1
- package/dist/jsx/components/Box.d.cts.map +1 -1
- package/dist/jsx/components/Box.d.mts +5 -1
- package/dist/jsx/components/Box.d.mts.map +1 -1
- package/dist/jsx/components/Box.mjs +4 -0
- package/dist/jsx/components/Box.mjs.map +1 -1
- package/dist/jsx/components/Card.cjs.map +1 -1
- package/dist/jsx/components/Card.d.cts.map +1 -1
- package/dist/jsx/components/Card.d.mts.map +1 -1
- package/dist/jsx/components/Card.mjs.map +1 -1
- package/dist/jsx/components/Container.cjs.map +1 -1
- package/dist/jsx/components/Container.d.cts +1 -1
- package/dist/jsx/components/Container.d.cts.map +1 -1
- package/dist/jsx/components/Container.d.mts +1 -1
- package/dist/jsx/components/Container.d.mts.map +1 -1
- package/dist/jsx/components/Container.mjs.map +1 -1
- package/dist/jsx/components/Footer.cjs.map +1 -1
- package/dist/jsx/components/Footer.d.cts.map +1 -1
- package/dist/jsx/components/Footer.d.mts.map +1 -1
- package/dist/jsx/components/Footer.mjs.map +1 -1
- package/dist/jsx/components/Image.cjs.map +1 -1
- package/dist/jsx/components/Image.d.cts.map +1 -1
- package/dist/jsx/components/Image.d.mts.map +1 -1
- package/dist/jsx/components/Image.mjs.map +1 -1
- package/dist/jsx/components/Link.cjs.map +1 -1
- package/dist/jsx/components/Link.d.cts +1 -1
- package/dist/jsx/components/Link.d.cts.map +1 -1
- package/dist/jsx/components/Link.d.mts +1 -1
- package/dist/jsx/components/Link.d.mts.map +1 -1
- package/dist/jsx/components/Link.mjs.map +1 -1
- package/dist/jsx/components/Row.cjs.map +1 -1
- package/dist/jsx/components/Row.d.cts.map +1 -1
- package/dist/jsx/components/Row.d.mts.map +1 -1
- package/dist/jsx/components/Row.mjs.map +1 -1
- package/dist/jsx/components/Skeleton.cjs.map +1 -1
- package/dist/jsx/components/Skeleton.d.cts.map +1 -1
- package/dist/jsx/components/Skeleton.d.mts.map +1 -1
- package/dist/jsx/components/Skeleton.mjs.map +1 -1
- package/dist/jsx/components/Text.cjs.map +1 -1
- package/dist/jsx/components/Text.d.cts +1 -1
- package/dist/jsx/components/Text.d.cts.map +1 -1
- package/dist/jsx/components/Text.d.mts +1 -1
- package/dist/jsx/components/Text.d.mts.map +1 -1
- package/dist/jsx/components/Text.mjs.map +1 -1
- package/dist/jsx/components/Tooltip.cjs.map +1 -1
- package/dist/jsx/components/Tooltip.d.cts.map +1 -1
- package/dist/jsx/components/Tooltip.d.mts.map +1 -1
- package/dist/jsx/components/Tooltip.mjs.map +1 -1
- package/dist/jsx/components/Value.cjs.map +1 -1
- package/dist/jsx/components/Value.d.cts.map +1 -1
- package/dist/jsx/components/Value.d.mts.map +1 -1
- package/dist/jsx/components/Value.mjs.map +1 -1
- package/dist/jsx/components/form/AddressInput.cjs +20 -0
- package/dist/jsx/components/form/AddressInput.cjs.map +1 -0
- package/dist/jsx/components/form/AddressInput.d.cts +24 -0
- package/dist/jsx/components/form/AddressInput.d.cts.map +1 -0
- package/dist/jsx/components/form/AddressInput.d.mts +24 -0
- package/dist/jsx/components/form/AddressInput.d.mts.map +1 -0
- package/dist/jsx/components/form/AddressInput.mjs +17 -0
- package/dist/jsx/components/form/AddressInput.mjs.map +1 -0
- package/dist/jsx/components/form/AssetSelector.cjs +37 -0
- package/dist/jsx/components/form/AssetSelector.cjs.map +1 -0
- package/dist/jsx/components/form/AssetSelector.d.cts +55 -0
- package/dist/jsx/components/form/AssetSelector.d.cts.map +1 -0
- package/dist/jsx/components/form/AssetSelector.d.mts +55 -0
- package/dist/jsx/components/form/AssetSelector.d.mts.map +1 -0
- package/dist/jsx/components/form/AssetSelector.mjs +34 -0
- package/dist/jsx/components/form/AssetSelector.mjs.map +1 -0
- package/dist/jsx/components/form/Dropdown.cjs.map +1 -1
- package/dist/jsx/components/form/Dropdown.d.cts +1 -1
- package/dist/jsx/components/form/Dropdown.d.cts.map +1 -1
- package/dist/jsx/components/form/Dropdown.d.mts +1 -1
- package/dist/jsx/components/form/Dropdown.d.mts.map +1 -1
- package/dist/jsx/components/form/Dropdown.mjs.map +1 -1
- package/dist/jsx/components/form/Field.cjs.map +1 -1
- package/dist/jsx/components/form/Field.d.cts +4 -2
- package/dist/jsx/components/form/Field.d.cts.map +1 -1
- package/dist/jsx/components/form/Field.d.mts +4 -2
- package/dist/jsx/components/form/Field.d.mts.map +1 -1
- package/dist/jsx/components/form/Field.mjs.map +1 -1
- package/dist/jsx/components/form/Option.cjs +0 -2
- package/dist/jsx/components/form/Option.cjs.map +1 -1
- package/dist/jsx/components/form/Option.d.cts.map +1 -1
- package/dist/jsx/components/form/Option.d.mts.map +1 -1
- package/dist/jsx/components/form/Option.mjs +0 -2
- package/dist/jsx/components/form/Option.mjs.map +1 -1
- package/dist/jsx/components/form/RadioGroup.cjs.map +1 -1
- package/dist/jsx/components/form/RadioGroup.d.cts +1 -1
- package/dist/jsx/components/form/RadioGroup.d.cts.map +1 -1
- package/dist/jsx/components/form/RadioGroup.d.mts +1 -1
- package/dist/jsx/components/form/RadioGroup.d.mts.map +1 -1
- package/dist/jsx/components/form/RadioGroup.mjs.map +1 -1
- package/dist/jsx/components/form/Selector.cjs.map +1 -1
- package/dist/jsx/components/form/Selector.d.cts +1 -1
- package/dist/jsx/components/form/Selector.d.cts.map +1 -1
- package/dist/jsx/components/form/Selector.d.mts +1 -1
- package/dist/jsx/components/form/Selector.d.mts.map +1 -1
- package/dist/jsx/components/form/Selector.mjs.map +1 -1
- package/dist/jsx/components/form/index.cjs +2 -0
- package/dist/jsx/components/form/index.cjs.map +1 -1
- package/dist/jsx/components/form/index.d.cts +5 -1
- package/dist/jsx/components/form/index.d.cts.map +1 -1
- package/dist/jsx/components/form/index.d.mts +5 -1
- package/dist/jsx/components/form/index.d.mts.map +1 -1
- package/dist/jsx/components/form/index.mjs +2 -0
- package/dist/jsx/components/form/index.mjs.map +1 -1
- package/dist/jsx/components/index.cjs +0 -1
- package/dist/jsx/components/index.cjs.map +1 -1
- package/dist/jsx/components/index.d.cts +1 -1
- package/dist/jsx/components/index.d.cts.map +1 -1
- package/dist/jsx/components/index.d.mts +1 -1
- package/dist/jsx/components/index.d.mts.map +1 -1
- package/dist/jsx/components/index.mjs +0 -1
- package/dist/jsx/components/index.mjs.map +1 -1
- package/dist/jsx/validation.cjs +30 -4
- package/dist/jsx/validation.cjs.map +1 -1
- package/dist/jsx/validation.d.cts +13 -6
- package/dist/jsx/validation.d.cts.map +1 -1
- package/dist/jsx/validation.d.mts +13 -6
- package/dist/jsx/validation.d.mts.map +1 -1
- package/dist/jsx/validation.mjs +29 -3
- package/dist/jsx/validation.mjs.map +1 -1
- package/dist/types/caip.cjs +40 -0
- package/dist/types/caip.cjs.map +1 -1
- package/dist/types/caip.d.cts +13 -1
- package/dist/types/caip.d.cts.map +1 -1
- package/dist/types/caip.d.mts +13 -1
- package/dist/types/caip.d.mts.map +1 -1
- package/dist/types/caip.mjs +39 -1
- package/dist/types/caip.mjs.map +1 -1
- package/dist/types/handlers/index.cjs +0 -9
- package/dist/types/handlers/index.cjs.map +1 -1
- package/dist/types/handlers/index.d.cts +9 -9
- package/dist/types/handlers/index.d.cts.map +1 -1
- package/dist/types/handlers/index.d.mts +9 -9
- package/dist/types/handlers/index.d.mts.map +1 -1
- package/dist/types/handlers/index.mjs +0 -9
- package/dist/types/handlers/index.mjs.map +1 -1
- package/dist/types/handlers/signature.cjs.map +1 -1
- package/dist/types/handlers/signature.d.cts +1 -1
- package/dist/types/handlers/signature.d.cts.map +1 -1
- package/dist/types/handlers/signature.d.mts +1 -1
- package/dist/types/handlers/signature.d.mts.map +1 -1
- package/dist/types/handlers/signature.mjs.map +1 -1
- package/dist/types/handlers/user-input.cjs +9 -3
- package/dist/types/handlers/user-input.cjs.map +1 -1
- package/dist/types/handlers/user-input.d.cts +44 -3
- package/dist/types/handlers/user-input.d.cts.map +1 -1
- package/dist/types/handlers/user-input.d.mts +44 -3
- package/dist/types/handlers/user-input.d.mts.map +1 -1
- package/dist/types/handlers/user-input.mjs +8 -2
- package/dist/types/handlers/user-input.mjs.map +1 -1
- package/dist/types/images.cjs.map +1 -1
- package/dist/types/images.mjs.map +1 -1
- package/dist/types/index.cjs +2 -5
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +2 -5
- package/dist/types/index.mjs.map +1 -1
- package/dist/types/interface.cjs +8 -2
- package/dist/types/interface.cjs.map +1 -1
- package/dist/types/interface.d.cts +17 -1
- package/dist/types/interface.d.cts.map +1 -1
- package/dist/types/interface.d.mts +17 -1
- package/dist/types/interface.d.mts.map +1 -1
- package/dist/types/interface.mjs +9 -3
- package/dist/types/interface.mjs.map +1 -1
- package/dist/types/methods/get-bip32-entropy.cjs.map +1 -1
- package/dist/types/methods/get-bip32-entropy.d.cts +8 -4
- package/dist/types/methods/get-bip32-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-bip32-entropy.d.mts +8 -4
- package/dist/types/methods/get-bip32-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-bip32-entropy.mjs.map +1 -1
- package/dist/types/methods/get-bip32-public-key.cjs.map +1 -1
- package/dist/types/methods/get-bip32-public-key.d.cts +9 -5
- package/dist/types/methods/get-bip32-public-key.d.cts.map +1 -1
- package/dist/types/methods/get-bip32-public-key.d.mts +9 -5
- package/dist/types/methods/get-bip32-public-key.d.mts.map +1 -1
- package/dist/types/methods/get-bip32-public-key.mjs.map +1 -1
- package/dist/types/methods/get-bip44-entropy.cjs.map +1 -1
- package/dist/types/methods/get-bip44-entropy.d.cts +8 -3
- package/dist/types/methods/get-bip44-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-bip44-entropy.d.mts +8 -3
- package/dist/types/methods/get-bip44-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-bip44-entropy.mjs.map +1 -1
- package/dist/types/methods/get-entropy.cjs.map +1 -1
- package/dist/types/methods/get-entropy.d.cts +14 -5
- package/dist/types/methods/get-entropy.d.cts.map +1 -1
- package/dist/types/methods/get-entropy.d.mts +14 -5
- package/dist/types/methods/get-entropy.d.mts.map +1 -1
- package/dist/types/methods/get-entropy.mjs.map +1 -1
- package/dist/types/methods/index.cjs +0 -26
- package/dist/types/methods/index.cjs.map +1 -1
- package/dist/types/methods/index.d.cts +27 -26
- package/dist/types/methods/index.d.cts.map +1 -1
- package/dist/types/methods/index.d.mts +27 -26
- package/dist/types/methods/index.d.mts.map +1 -1
- package/dist/types/methods/index.mjs +0 -26
- package/dist/types/methods/index.mjs.map +1 -1
- package/dist/types/methods/list-entropy-sources.cjs +3 -0
- package/dist/types/methods/list-entropy-sources.cjs.map +1 -0
- package/dist/types/methods/list-entropy-sources.d.cts +31 -0
- package/dist/types/methods/list-entropy-sources.d.cts.map +1 -0
- package/dist/types/methods/list-entropy-sources.d.mts +31 -0
- package/dist/types/methods/list-entropy-sources.d.mts.map +1 -0
- package/dist/types/methods/list-entropy-sources.mjs +2 -0
- package/dist/types/methods/list-entropy-sources.mjs.map +1 -0
- package/dist/types/methods/methods.cjs.map +1 -1
- package/dist/types/methods/methods.d.cts +3 -1
- package/dist/types/methods/methods.d.cts.map +1 -1
- package/dist/types/methods/methods.d.mts +3 -1
- package/dist/types/methods/methods.d.mts.map +1 -1
- package/dist/types/methods/methods.mjs.map +1 -1
- package/dist/types/snap.cjs.map +1 -1
- package/dist/types/snap.d.cts.map +1 -1
- package/dist/types/snap.d.mts.map +1 -1
- package/dist/types/snap.mjs.map +1 -1
- package/dist/ui/builder.cjs.map +1 -1
- package/dist/ui/builder.d.cts.map +1 -1
- package/dist/ui/builder.d.mts.map +1 -1
- package/dist/ui/builder.mjs.map +1 -1
- package/dist/ui/components/form.cjs +2 -2
- package/dist/ui/components/form.cjs.map +1 -1
- package/dist/ui/components/form.d.cts.map +1 -1
- package/dist/ui/components/form.d.mts.map +1 -1
- package/dist/ui/components/form.mjs +2 -2
- package/dist/ui/components/form.mjs.map +1 -1
- package/dist/ui/components/input.cjs +0 -2
- package/dist/ui/components/input.cjs.map +1 -1
- package/dist/ui/components/input.d.cts.map +1 -1
- package/dist/ui/components/input.d.mts.map +1 -1
- package/dist/ui/components/input.mjs +0 -2
- package/dist/ui/components/input.mjs.map +1 -1
- package/dist/ui/components/panel.cjs +3 -3
- package/dist/ui/components/panel.cjs.map +1 -1
- package/dist/ui/components/panel.d.cts.map +1 -1
- package/dist/ui/components/panel.d.mts.map +1 -1
- package/dist/ui/components/panel.mjs +3 -3
- package/dist/ui/components/panel.mjs.map +1 -1
- package/dist/ui/components/row.cjs +3 -3
- package/dist/ui/components/row.cjs.map +1 -1
- package/dist/ui/components/row.d.cts.map +1 -1
- package/dist/ui/components/row.d.mts.map +1 -1
- package/dist/ui/components/row.mjs +3 -3
- package/dist/ui/components/row.mjs.map +1 -1
- package/dist/ui/nodes.cjs +0 -1
- package/dist/ui/nodes.cjs.map +1 -1
- package/dist/ui/nodes.d.cts.map +1 -1
- package/dist/ui/nodes.d.mts.map +1 -1
- package/dist/ui/nodes.mjs +0 -1
- package/dist/ui/nodes.mjs.map +1 -1
- package/jsx-dev-runtime.d.ts +0 -2
- package/jsx-dev-runtime.js +0 -2
- package/jsx-runtime.d.ts +0 -2
- package/jsx-runtime.js +0 -2
- package/jsx.d.ts +1 -1
- package/jsx.js +0 -2
- package/package.json +8 -22
|
@@ -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 "__#188773@#code": number;
|
|
19
|
+
readonly "__#188773@#message": string;
|
|
20
|
+
readonly "__#188773@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#188773@#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 "__#188773@#code": number;
|
|
33
|
+
readonly "__#188773@#message": string;
|
|
34
|
+
readonly "__#188773@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#188773@#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 "__#188773@#code": number;
|
|
47
|
+
readonly "__#188773@#message": string;
|
|
48
|
+
readonly "__#188773@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#188773@#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 "__#94388@#code": number;
|
|
19
|
+
readonly "__#94388@#message": string;
|
|
20
|
+
readonly "__#94388@#data"?: Record<string, Json> | undefined;
|
|
21
|
+
readonly "__#94388@#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 "__#94388@#code": number;
|
|
33
|
+
readonly "__#94388@#message": string;
|
|
34
|
+
readonly "__#94388@#data"?: Record<string, Json> | undefined;
|
|
35
|
+
readonly "__#94388@#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 "__#94388@#code": number;
|
|
47
|
+
readonly "__#94388@#message": string;
|
|
48
|
+
readonly "__#94388@#data"?: Record<string, Json> | undefined;
|
|
49
|
+
readonly "__#94388@#stack"?: string | undefined;
|
|
50
50
|
readonly name: string;
|
|
51
51
|
readonly code: number;
|
|
52
52
|
readonly message: string;
|
package/dist/internals/index.cjs
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./error-wrappers.cjs"), exports);
|
|
18
18
|
__exportStar(require("./errors.cjs"), exports);
|
|
19
|
-
__exportStar(require("./helpers.cjs"), exports);
|
|
20
19
|
__exportStar(require("./structs.cjs"), exports);
|
|
21
20
|
__exportStar(require("./jsx.cjs"), exports);
|
|
22
21
|
__exportStar(require("./svg.cjs"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAiC;AACjC,+CAAyB;
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAiC;AACjC,+CAAyB;AAEzB,gDAA0B;AAC1B,4CAAsB;AACtB,4CAAsB","sourcesContent":["export * from './error-wrappers';\nexport * from './errors';\nexport type * from './helpers';\nexport * from './structs';\nexport * from './jsx';\nexport * from './svg';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;AACzB,mCAA+B;AAC/B,8BAA0B;AAC1B,0BAAsB;AACtB,0BAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;AACzB,mCAA+B;AAC/B,8BAA0B;AAC1B,0BAAsB;AACtB,0BAAsB"}
|
package/dist/internals/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qCAAiC;AACjC,6BAAyB;AAEzB,8BAA0B;AAC1B,0BAAsB;AACtB,0BAAsB","sourcesContent":["export * from './error-wrappers';\nexport * from './errors';\nexport type * from './helpers';\nexport * from './structs';\nexport * from './jsx';\nexport * from './svg';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.cjs","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":";;;AAcA,2CAAkC;
|
|
1
|
+
{"version":3,"file":"jsx.cjs","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":";;;AAcA,2CAAkC;AAyElC;;;;;;;GAOG;AACH,SAAgB,SAAS,CACvB,OAAoC;IAEpC,OAAO,IAAA,eAAK,EAAC,OAAO,CAGnB,CAAC;AACJ,CAAC;AAPD,8BAOC","sourcesContent":["import type {\n AnyStruct,\n EnumSchema,\n Infer,\n InferStructTuple,\n IsExactMatch,\n IsMatch,\n IsRecord,\n IsTuple,\n Struct,\n UnionToIntersection,\n} from '@metamask/superstruct';\nimport type { CaipChainId } from '@metamask/utils';\n\nimport { union } from './structs';\nimport type { EmptyObject } from '../types';\n\n/**\n * Check if a type is a union. Infers `true` if it is a union, otherwise\n * `false`.\n */\ntype IsUnion<Type> = [Type] extends [UnionToIntersection<Type>] ? false : true;\n\n/**\n * Get a struct schema for a type.\n *\n * This is copied from `superstruct` but fixes some issues with the original\n * implementation.\n */\ntype StructSchema<Type> =\n IsUnion<Type> extends true\n ? null\n : [Type] extends [EmptyObject]\n ? EmptyObject\n : [Type] extends [string | undefined | null]\n ? [Type] extends [`0x${string}`]\n ? null\n : [Type] extends [CaipChainId]\n ? null\n : [Type] extends [IsMatch<Type, string | undefined | null>]\n ? null\n : [Type] extends [IsUnion<Type>]\n ? EnumSchema<Type>\n : Type\n : [Type] extends [number | undefined | null]\n ? [Type] extends [IsMatch<Type, number | undefined | null>]\n ? null\n : [Type] extends [IsUnion<Type>]\n ? EnumSchema<Type>\n : Type\n : [Type] extends [boolean]\n ? [Type] extends [IsExactMatch<Type, boolean>]\n ? null\n : Type\n : Type extends\n | bigint\n | symbol\n | undefined\n | null\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n | Function\n | Date\n | Error\n | RegExp\n | Map<any, any>\n | WeakMap<any, any>\n | Set<any>\n | WeakSet<any>\n | Promise<any>\n ? null\n : Type extends (infer E)[]\n ? Type extends IsTuple<Type>\n ? null\n : Struct<E>\n : Type extends object\n ? Type extends IsRecord<Type>\n ? null\n : {\n [InnerKey in keyof Type]: Describe<Type[InnerKey]>;\n }\n : null;\n\n/**\n * Describe a struct type.\n */\nexport type Describe<Type> = Struct<Type, StructSchema<Type>>;\n\n/**\n * Create a union struct that uses `null` for the schema type, for better\n * compatibility with `Describe`.\n *\n * @param structs - The structs to union.\n * @returns The `superstruct` struct, which validates that the value satisfies\n * one of the structs.\n */\nexport function nullUnion<Head extends AnyStruct, Tail extends AnyStruct[]>(\n structs: [head: Head, ...tail: Tail],\n): Struct<Infer<Head> | InferStructTuple<Tail>[number], null> {\n return union(structs) as unknown as Struct<\n Infer<Head> | InferStructTuple<Tail>[number],\n null\n >;\n}\n"]}
|
package/dist/internals/jsx.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AnyStruct, EnumSchema, Infer, InferStructTuple, IsExactMatch, IsMatch, IsRecord, IsTuple, Struct, UnionToIntersection } from "@metamask/superstruct";
|
|
2
|
+
import type { CaipChainId } from "@metamask/utils";
|
|
2
3
|
import type { EmptyObject } from "../types/index.cjs";
|
|
3
4
|
/**
|
|
4
5
|
* Check if a type is a union. Infers `true` if it is a union, otherwise
|
|
@@ -11,7 +12,7 @@ type IsUnion<Type> = [Type] extends [UnionToIntersection<Type>] ? false : true;
|
|
|
11
12
|
* This is copied from `superstruct` but fixes some issues with the original
|
|
12
13
|
* implementation.
|
|
13
14
|
*/
|
|
14
|
-
type StructSchema<Type> = IsUnion<Type> extends true ? null : [Type] extends [EmptyObject] ? EmptyObject : [Type] extends [string | undefined | null] ? [Type] extends [`0x${string}`] ? null : [Type] extends [IsMatch<Type, string | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [number | undefined | null] ? [Type] extends [IsMatch<Type, number | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [boolean] ? [Type] extends [IsExactMatch<Type, boolean>] ? null : Type : Type extends bigint | symbol | undefined | null | Function | Date | Error | RegExp | Map<any, any> | WeakMap<any, any> | Set<any> | WeakSet<any> | Promise<any> ? null : Type extends (infer E)[] ? Type extends IsTuple<Type> ? null : Struct<E> : Type extends object ? Type extends IsRecord<Type> ? null : {
|
|
15
|
+
type StructSchema<Type> = IsUnion<Type> extends true ? null : [Type] extends [EmptyObject] ? EmptyObject : [Type] extends [string | undefined | null] ? [Type] extends [`0x${string}`] ? null : [Type] extends [CaipChainId] ? null : [Type] extends [IsMatch<Type, string | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [number | undefined | null] ? [Type] extends [IsMatch<Type, number | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [boolean] ? [Type] extends [IsExactMatch<Type, boolean>] ? null : Type : Type extends bigint | symbol | undefined | null | Function | Date | Error | RegExp | Map<any, any> | WeakMap<any, any> | Set<any> | WeakSet<any> | Promise<any> ? null : Type extends (infer E)[] ? Type extends IsTuple<Type> ? null : Struct<E> : Type extends object ? Type extends IsRecord<Type> ? null : {
|
|
15
16
|
[InnerKey in keyof Type]: Describe<Type[InnerKey]>;
|
|
16
17
|
} : null;
|
|
17
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.d.cts","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,mBAAmB,EACpB,8BAA8B;
|
|
1
|
+
{"version":3,"file":"jsx.d.cts","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"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"}
|
package/dist/internals/jsx.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AnyStruct, EnumSchema, Infer, InferStructTuple, IsExactMatch, IsMatch, IsRecord, IsTuple, Struct, UnionToIntersection } from "@metamask/superstruct";
|
|
2
|
+
import type { CaipChainId } from "@metamask/utils";
|
|
2
3
|
import type { EmptyObject } from "../types/index.mjs";
|
|
3
4
|
/**
|
|
4
5
|
* Check if a type is a union. Infers `true` if it is a union, otherwise
|
|
@@ -11,7 +12,7 @@ type IsUnion<Type> = [Type] extends [UnionToIntersection<Type>] ? false : true;
|
|
|
11
12
|
* This is copied from `superstruct` but fixes some issues with the original
|
|
12
13
|
* implementation.
|
|
13
14
|
*/
|
|
14
|
-
type StructSchema<Type> = IsUnion<Type> extends true ? null : [Type] extends [EmptyObject] ? EmptyObject : [Type] extends [string | undefined | null] ? [Type] extends [`0x${string}`] ? null : [Type] extends [IsMatch<Type, string | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [number | undefined | null] ? [Type] extends [IsMatch<Type, number | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [boolean] ? [Type] extends [IsExactMatch<Type, boolean>] ? null : Type : Type extends bigint | symbol | undefined | null | Function | Date | Error | RegExp | Map<any, any> | WeakMap<any, any> | Set<any> | WeakSet<any> | Promise<any> ? null : Type extends (infer E)[] ? Type extends IsTuple<Type> ? null : Struct<E> : Type extends object ? Type extends IsRecord<Type> ? null : {
|
|
15
|
+
type StructSchema<Type> = IsUnion<Type> extends true ? null : [Type] extends [EmptyObject] ? EmptyObject : [Type] extends [string | undefined | null] ? [Type] extends [`0x${string}`] ? null : [Type] extends [CaipChainId] ? null : [Type] extends [IsMatch<Type, string | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [number | undefined | null] ? [Type] extends [IsMatch<Type, number | undefined | null>] ? null : [Type] extends [IsUnion<Type>] ? EnumSchema<Type> : Type : [Type] extends [boolean] ? [Type] extends [IsExactMatch<Type, boolean>] ? null : Type : Type extends bigint | symbol | undefined | null | Function | Date | Error | RegExp | Map<any, any> | WeakMap<any, any> | Set<any> | WeakSet<any> | Promise<any> ? null : Type extends (infer E)[] ? Type extends IsTuple<Type> ? null : Struct<E> : Type extends object ? Type extends IsRecord<Type> ? null : {
|
|
15
16
|
[InnerKey in keyof Type]: Describe<Type[InnerKey]>;
|
|
16
17
|
} : null;
|
|
17
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.d.mts","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,mBAAmB,EACpB,8BAA8B;
|
|
1
|
+
{"version":3,"file":"jsx.d.mts","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.mjs","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,sBAAkB;
|
|
1
|
+
{"version":3,"file":"jsx.mjs","sourceRoot":"","sources":["../../src/internals/jsx.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAyElC;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,OAAoC;IAEpC,OAAO,KAAK,CAAC,OAAO,CAGnB,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AnyStruct,\n EnumSchema,\n Infer,\n InferStructTuple,\n IsExactMatch,\n IsMatch,\n IsRecord,\n IsTuple,\n Struct,\n UnionToIntersection,\n} from '@metamask/superstruct';\nimport type { CaipChainId } from '@metamask/utils';\n\nimport { union } from './structs';\nimport type { EmptyObject } from '../types';\n\n/**\n * Check if a type is a union. Infers `true` if it is a union, otherwise\n * `false`.\n */\ntype IsUnion<Type> = [Type] extends [UnionToIntersection<Type>] ? false : true;\n\n/**\n * Get a struct schema for a type.\n *\n * This is copied from `superstruct` but fixes some issues with the original\n * implementation.\n */\ntype StructSchema<Type> =\n IsUnion<Type> extends true\n ? null\n : [Type] extends [EmptyObject]\n ? EmptyObject\n : [Type] extends [string | undefined | null]\n ? [Type] extends [`0x${string}`]\n ? null\n : [Type] extends [CaipChainId]\n ? null\n : [Type] extends [IsMatch<Type, string | undefined | null>]\n ? null\n : [Type] extends [IsUnion<Type>]\n ? EnumSchema<Type>\n : Type\n : [Type] extends [number | undefined | null]\n ? [Type] extends [IsMatch<Type, number | undefined | null>]\n ? null\n : [Type] extends [IsUnion<Type>]\n ? EnumSchema<Type>\n : Type\n : [Type] extends [boolean]\n ? [Type] extends [IsExactMatch<Type, boolean>]\n ? null\n : Type\n : Type extends\n | bigint\n | symbol\n | undefined\n | null\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n | Function\n | Date\n | Error\n | RegExp\n | Map<any, any>\n | WeakMap<any, any>\n | Set<any>\n | WeakSet<any>\n | Promise<any>\n ? null\n : Type extends (infer E)[]\n ? Type extends IsTuple<Type>\n ? null\n : Struct<E>\n : Type extends object\n ? Type extends IsRecord<Type>\n ? null\n : {\n [InnerKey in keyof Type]: Describe<Type[InnerKey]>;\n }\n : null;\n\n/**\n * Describe a struct type.\n */\nexport type Describe<Type> = Struct<Type, StructSchema<Type>>;\n\n/**\n * Create a union struct that uses `null` for the schema type, for better\n * compatibility with `Describe`.\n *\n * @param structs - The structs to union.\n * @returns The `superstruct` struct, which validates that the value satisfies\n * one of the structs.\n */\nexport function nullUnion<Head extends AnyStruct, Tail extends AnyStruct[]>(\n structs: [head: Head, ...tail: Tail],\n): Struct<Infer<Head> | InferStructTuple<Tail>[number], null> {\n return union(structs) as unknown as Struct<\n Infer<Head> | InferStructTuple<Tail>[number],\n null\n >;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Banner.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":";;;AAMA,gDAAuE;AA2BvE,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form/Button';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\nimport type { SkeletonElement } from './Skeleton';\nimport type { TextElement } from './Text';\nimport { createSnapComponent, type SnapsChildren } from '../component';\n\n/**\n * Types of children components that can be used with Banner.\n */\nexport type BannerChildren = SnapsChildren<\n | TextElement\n | StandardFormattingElement\n | LinkElement\n | IconElement\n | ButtonElement\n | SkeletonElement\n>;\n\n/**\n * The props of the {@link Banner} component.\n *\n * @param children - The content to display in the banner.\n * @param title - Title of the banner.\n * @param severity - Severity level of the banner.\n */\nexport type BannerProps = {\n children: BannerChildren;\n title: string;\n severity: 'danger' | 'info' | 'success' | 'warning';\n};\n\nconst TYPE = 'Banner';\n\n/**\n * A Banner component, which is used to display custom banner alerts.\n *\n * @param props - The props of the component.\n * @param props.children - The content to display in the banner.\n * @param props.title - Title of the banner.\n * @param props.severity - Severity level of the banner.\n * @example\n * <Banner title=\"Success banner\" severity=\"success\">\n * <Text>Here is the banner content!</Text>\n * </Banner>\n */\nexport const Banner = createSnapComponent<BannerProps, typeof TYPE>(TYPE);\n\n/**\n * A Banner element.\n *\n * @see Banner\n */\nexport type BannerElement = ReturnType<typeof Banner>;\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type SnapsChildren } from "../component.cjs";
|
|
2
1
|
import type { ButtonElement } from "./form/Button.cjs";
|
|
3
2
|
import type { StandardFormattingElement } from "./formatting/index.cjs";
|
|
4
3
|
import type { IconElement } from "./Icon.cjs";
|
|
5
4
|
import type { LinkElement } from "./Link.cjs";
|
|
6
5
|
import type { SkeletonElement } from "./Skeleton.cjs";
|
|
7
6
|
import type { TextElement } from "./Text.cjs";
|
|
7
|
+
import { type SnapsChildren } from "../component.cjs";
|
|
8
8
|
/**
|
|
9
9
|
* Types of children components that can be used with Banner.
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Banner.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,0BAAsB;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,EAAuB,KAAK,aAAa,EAAE,yBAAqB;AAEvE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CACtC,WAAW,GACX,yBAAyB,GACzB,WAAW,GACX,WAAW,GACX,aAAa,GACb,eAAe,CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type SnapsChildren } from "../component.mjs";
|
|
2
1
|
import type { ButtonElement } from "./form/Button.mjs";
|
|
3
2
|
import type { StandardFormattingElement } from "./formatting/index.mjs";
|
|
4
3
|
import type { IconElement } from "./Icon.mjs";
|
|
5
4
|
import type { LinkElement } from "./Link.mjs";
|
|
6
5
|
import type { SkeletonElement } from "./Skeleton.mjs";
|
|
7
6
|
import type { TextElement } from "./Text.mjs";
|
|
7
|
+
import { type SnapsChildren } from "../component.mjs";
|
|
8
8
|
/**
|
|
9
9
|
* Types of children components that can be used with Banner.
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Banner.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,0BAAsB;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,EAAuB,KAAK,aAAa,EAAE,yBAAqB;AAEvE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CACtC,WAAW,GACX,yBAAyB,GACzB,WAAW,GACX,WAAW,GACX,aAAa,GACb,eAAe,CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Banner.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAsB,yBAAqB;AA2BvE,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form/Button';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\nimport type { SkeletonElement } from './Skeleton';\nimport type { TextElement } from './Text';\nimport { createSnapComponent, type SnapsChildren } from '../component';\n\n/**\n * Types of children components that can be used with Banner.\n */\nexport type BannerChildren = SnapsChildren<\n | TextElement\n | StandardFormattingElement\n | LinkElement\n | IconElement\n | ButtonElement\n | SkeletonElement\n>;\n\n/**\n * The props of the {@link Banner} component.\n *\n * @param children - The content to display in the banner.\n * @param title - Title of the banner.\n * @param severity - Severity level of the banner.\n */\nexport type BannerProps = {\n children: BannerChildren;\n title: string;\n severity: 'danger' | 'info' | 'success' | 'warning';\n};\n\nconst TYPE = 'Banner';\n\n/**\n * A Banner component, which is used to display custom banner alerts.\n *\n * @param props - The props of the component.\n * @param props.children - The content to display in the banner.\n * @param props.title - Title of the banner.\n * @param props.severity - Severity level of the banner.\n * @example\n * <Banner title=\"Success banner\" severity=\"success\">\n * <Text>Here is the banner content!</Text>\n * </Banner>\n */\nexport const Banner = createSnapComponent<BannerProps, typeof TYPE>(TYPE);\n\n/**\n * A Banner element.\n *\n * @see Banner\n */\nexport type BannerElement = ReturnType<typeof Banner>;\n"]}
|
|
@@ -8,6 +8,10 @@ const TYPE = 'Box';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - The props of the component.
|
|
10
10
|
* @param props.children - The children of the box.
|
|
11
|
+
* @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
12
|
+
* @param props.alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
13
|
+
* @param props.crossAlignment - The cross alignment mode to use within the box.
|
|
14
|
+
* @param props.center - Whether to center the children within the box. Defaults to `false`.
|
|
11
15
|
* @returns A box element.
|
|
12
16
|
* @example
|
|
13
17
|
* <Box>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AA0BnD,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB
|
|
1
|
+
{"version":3,"file":"Box.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AA0BnD,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB;;;;;;;;;;;;;;GAcG;AACU,QAAA,GAAG,GAAG,IAAA,+BAAmB,EAAwB,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement, SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Box} component.\n *\n * @property children - The children of the box.\n * @property direction - The direction to stack the components within the box. Defaults to `vertical`.\n * @property alignment - The alignment mode to use within the box. Defaults to `start`.\n * @property crossAlignment - The cross alignment mode to use within the box.\n * @property center - Whether to center the children within the box. Defaults to `false`.\n */\nexport type BoxProps = {\n // We can't use `JSXElement` because it causes a circular reference.\n children: SnapsChildren<GenericSnapElement>;\n direction?: 'vertical' | 'horizontal' | undefined;\n alignment?:\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | undefined;\n crossAlignment?: 'start' | 'center' | 'end';\n center?: boolean | undefined;\n};\n\nconst TYPE = 'Box';\n\n/**\n * A box component, which is used to group multiple components together.\n *\n * @param props - The props of the component.\n * @param props.children - The children of the box.\n * @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.\n * @param props.alignment - The alignment mode to use within the box. Defaults to `start`.\n * @param props.crossAlignment - The cross alignment mode to use within the box.\n * @param props.center - Whether to center the children within the box. Defaults to `false`.\n * @returns A box element.\n * @example\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n */\nexport const Box = createSnapComponent<BoxProps, typeof TYPE>(TYPE);\n\n/**\n * A box element.\n *\n * @see Box\n */\nexport type BoxElement = ReturnType<typeof Box>;\n"]}
|
|
@@ -5,7 +5,7 @@ import type { GenericSnapElement, SnapsChildren } from "../component.cjs";
|
|
|
5
5
|
* @property children - The children of the box.
|
|
6
6
|
* @property direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
7
7
|
* @property alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
8
|
-
* @property crossAlignment - The cross alignment mode to use within the box.
|
|
8
|
+
* @property crossAlignment - The cross alignment mode to use within the box.
|
|
9
9
|
* @property center - Whether to center the children within the box. Defaults to `false`.
|
|
10
10
|
*/
|
|
11
11
|
export type BoxProps = {
|
|
@@ -20,6 +20,10 @@ export type BoxProps = {
|
|
|
20
20
|
*
|
|
21
21
|
* @param props - The props of the component.
|
|
22
22
|
* @param props.children - The children of the box.
|
|
23
|
+
* @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
24
|
+
* @param props.alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
25
|
+
* @param props.crossAlignment - The cross alignment mode to use within the box.
|
|
26
|
+
* @param props.center - Whether to center the children within the box. Defaults to `false`.
|
|
23
27
|
* @returns A box element.
|
|
24
28
|
* @example
|
|
25
29
|
* <Box>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,yBAAqB;AAGtE;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,EACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,eAAe,GACf,cAAc,GACd,SAAS,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAIF
|
|
1
|
+
{"version":3,"file":"Box.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,yBAAqB;AAGtE;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,EACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,eAAe,GACf,cAAc,GACd,SAAS,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,GAAG,uDAAmD,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { GenericSnapElement, SnapsChildren } from "../component.mjs";
|
|
|
5
5
|
* @property children - The children of the box.
|
|
6
6
|
* @property direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
7
7
|
* @property alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
8
|
-
* @property crossAlignment - The cross alignment mode to use within the box.
|
|
8
|
+
* @property crossAlignment - The cross alignment mode to use within the box.
|
|
9
9
|
* @property center - Whether to center the children within the box. Defaults to `false`.
|
|
10
10
|
*/
|
|
11
11
|
export type BoxProps = {
|
|
@@ -20,6 +20,10 @@ export type BoxProps = {
|
|
|
20
20
|
*
|
|
21
21
|
* @param props - The props of the component.
|
|
22
22
|
* @param props.children - The children of the box.
|
|
23
|
+
* @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
24
|
+
* @param props.alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
25
|
+
* @param props.crossAlignment - The cross alignment mode to use within the box.
|
|
26
|
+
* @param props.center - Whether to center the children within the box. Defaults to `false`.
|
|
23
27
|
* @returns A box element.
|
|
24
28
|
* @example
|
|
25
29
|
* <Box>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,yBAAqB;AAGtE;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,EACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,eAAe,GACf,cAAc,GACd,SAAS,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAIF
|
|
1
|
+
{"version":3,"file":"Box.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,yBAAqB;AAGtE;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,EACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,eAAe,GACf,cAAc,GACd,SAAS,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,GAAG,uDAAmD,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC"}
|
|
@@ -5,6 +5,10 @@ const TYPE = 'Box';
|
|
|
5
5
|
*
|
|
6
6
|
* @param props - The props of the component.
|
|
7
7
|
* @param props.children - The children of the box.
|
|
8
|
+
* @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.
|
|
9
|
+
* @param props.alignment - The alignment mode to use within the box. Defaults to `start`.
|
|
10
|
+
* @param props.crossAlignment - The cross alignment mode to use within the box.
|
|
11
|
+
* @param props.center - Whether to center the children within the box. Defaults to `false`.
|
|
8
12
|
* @returns A box element.
|
|
9
13
|
* @example
|
|
10
14
|
* <Box>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AA0BnD,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB
|
|
1
|
+
{"version":3,"file":"Box.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Box.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AA0BnD,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,mBAAmB,CAAwB,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement, SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Box} component.\n *\n * @property children - The children of the box.\n * @property direction - The direction to stack the components within the box. Defaults to `vertical`.\n * @property alignment - The alignment mode to use within the box. Defaults to `start`.\n * @property crossAlignment - The cross alignment mode to use within the box.\n * @property center - Whether to center the children within the box. Defaults to `false`.\n */\nexport type BoxProps = {\n // We can't use `JSXElement` because it causes a circular reference.\n children: SnapsChildren<GenericSnapElement>;\n direction?: 'vertical' | 'horizontal' | undefined;\n alignment?:\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | undefined;\n crossAlignment?: 'start' | 'center' | 'end';\n center?: boolean | undefined;\n};\n\nconst TYPE = 'Box';\n\n/**\n * A box component, which is used to group multiple components together.\n *\n * @param props - The props of the component.\n * @param props.children - The children of the box.\n * @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.\n * @param props.alignment - The alignment mode to use within the box. Defaults to `start`.\n * @param props.crossAlignment - The cross alignment mode to use within the box.\n * @param props.center - Whether to center the children within the box. Defaults to `false`.\n * @returns A box element.\n * @example\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n */\nexport const Box = createSnapComponent<BoxProps, typeof TYPE>(TYPE);\n\n/**\n * A box element.\n *\n * @see Box\n */\nexport type BoxElement = ReturnType<typeof Box>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Card.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAmBnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACU,QAAA,IAAI,GAAG,IAAA,+BAAmB,EAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { AddressElement } from './Address';\nimport { createSnapComponent } from '../component';\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 +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":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAGhD;;;;;;;;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.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":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAGhD;;;;;;;;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":"
|
|
1
|
+
{"version":3,"file":"Card.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Card.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAmBnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { AddressElement } from './Address';\nimport { createSnapComponent } from '../component';\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Container.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":";;;AAEA,gDAAmD;AAiBnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,SAAS,GAAG,IAAA,+BAAmB,EAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { FooterElement } from './Footer';\nimport type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\n\n/**\n * Definition of container background colors.\n */\nexport type ContainerBackgroundColor = 'default' | 'alternative';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n backgroundColor?: ContainerBackgroundColor | undefined;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.backgroundColor - The color of the background.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container backgroundColor=\"default\">\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Container.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAGvD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;IACnE,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Container.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAGvD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;IACnE,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Container.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAiBnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { FooterElement } from './Footer';\nimport type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\n\n/**\n * Definition of container background colors.\n */\nexport type ContainerBackgroundColor = 'default' | 'alternative';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n backgroundColor?: ContainerBackgroundColor | undefined;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.backgroundColor - The color of the background.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container backgroundColor=\"default\">\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Footer.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAWnD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Footer} component.\n *\n * @property children - The single or multiple buttons in the footer.\n */\nexport type FooterProps = {\n children: ButtonElement | [ButtonElement, ButtonElement];\n};\n\nconst TYPE = 'Footer';\n\n/**\n * A footer component, which is used to create a footer with buttons.\n *\n * @param props - The props of the component.\n * @param props.children - The single or multiple buttons in the footer.\n * @returns A footer element.\n * @example\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n */\nexport const Footer = createSnapComponent<FooterProps, typeof TYPE>(TYPE);\n\n/**\n * A footer element.\n *\n * @see Footer\n */\nexport type FooterElement = ReturnType<typeof Footer>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Footer.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAe;AAG5C;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;CAC1D,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Footer.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAe;AAG5C;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;CAC1D,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Footer.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAWnD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Footer} component.\n *\n * @property children - The single or multiple buttons in the footer.\n */\nexport type FooterProps = {\n children: ButtonElement | [ButtonElement, ButtonElement];\n};\n\nconst TYPE = 'Footer';\n\n/**\n * A footer component, which is used to create a footer with buttons.\n *\n * @param props - The props of the component.\n * @param props.children - The single or multiple buttons in the footer.\n * @returns A footer element.\n * @example\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n */\nexport const Footer = createSnapComponent<FooterProps, typeof TYPE>(TYPE);\n\n/**\n * A footer element.\n *\n * @see Footer\n */\nexport type FooterElement = ReturnType<typeof Footer>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Image.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Image.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Image.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAiBnD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import type { BorderRadius } from './utils';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Image} component.\n *\n * @property src - The SVG image to display. This should be an SVG string, and\n * other formats such as PNG and JPEG are not supported directly. You can use\n * the `data:` URL scheme to embed images inside the SVG.\n * @property alt - The alternative text of the image, which describes the image\n * for users who cannot see it.\n */\ntype ImageProps = {\n src: string;\n alt?: string | undefined;\n borderRadius?: BorderRadius | undefined;\n};\n\nconst TYPE = 'Image';\n\n/**\n * An image component, which is used to display an image.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.src - The URL of the image to display. This should be an SVG\n * string, and other formats such as PNG and JPEG are not supported directly.\n * You can use the `data:` URL scheme to embed images inside the SVG.\n * @param props.alt - The alternative text of the image, which describes the\n * image for users who cannot see it.\n * @param props.borderRadius - The border radius applied to the image.\n * @returns An image element.\n * @example\n * <Image src=\"<svg>...</svg>\" alt=\"An example image\" />\n */\nexport const Image = createSnapComponent<ImageProps, typeof TYPE>(TYPE);\n\n/**\n * An image element.\n *\n * @see Image\n */\nexport type ImageElement = ReturnType<typeof Image>;\n"]}
|