@metamask/snaps-sdk 6.8.0 → 6.9.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/Avatar.cjs +20 -0
- package/dist/jsx/components/Avatar.cjs.map +1 -0
- package/dist/jsx/components/Avatar.d.cts +31 -0
- package/dist/jsx/components/Avatar.d.cts.map +1 -0
- package/dist/jsx/components/Avatar.d.mts +31 -0
- package/dist/jsx/components/Avatar.d.mts.map +1 -0
- package/dist/jsx/components/Avatar.mjs +17 -0
- package/dist/jsx/components/Avatar.mjs.map +1 -0
- package/dist/jsx/components/Heading.cjs +1 -1
- package/dist/jsx/components/Heading.cjs.map +1 -1
- package/dist/jsx/components/Heading.d.cts +3 -3
- package/dist/jsx/components/Heading.d.cts.map +1 -1
- package/dist/jsx/components/Heading.d.mts +3 -3
- package/dist/jsx/components/Heading.d.mts.map +1 -1
- package/dist/jsx/components/Heading.mjs +1 -1
- package/dist/jsx/components/Heading.mjs.map +1 -1
- package/dist/jsx/components/form/Input.cjs +8 -0
- package/dist/jsx/components/form/Input.cjs.map +1 -1
- package/dist/jsx/components/form/Input.d.cts +32 -6
- package/dist/jsx/components/form/Input.d.cts.map +1 -1
- package/dist/jsx/components/form/Input.d.mts +32 -6
- package/dist/jsx/components/form/Input.d.mts.map +1 -1
- package/dist/jsx/components/form/Input.mjs +8 -0
- package/dist/jsx/components/form/Input.mjs.map +1 -1
- package/dist/jsx/components/index.cjs +1 -0
- package/dist/jsx/components/index.cjs.map +1 -1
- package/dist/jsx/components/index.d.cts +3 -1
- package/dist/jsx/components/index.d.cts.map +1 -1
- package/dist/jsx/components/index.d.mts +3 -1
- package/dist/jsx/components/index.d.mts.map +1 -1
- package/dist/jsx/components/index.mjs +1 -0
- package/dist/jsx/components/index.mjs.map +1 -1
- package/dist/jsx/index.cjs +1 -2
- package/dist/jsx/index.cjs.map +1 -1
- package/dist/jsx/index.d.cts +1 -1
- package/dist/jsx/index.d.cts.map +1 -1
- package/dist/jsx/index.d.mts +1 -1
- package/dist/jsx/index.d.mts.map +1 -1
- package/dist/jsx/index.mjs +1 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/validation.cjs +67 -36
- package/dist/jsx/validation.cjs.map +1 -1
- package/dist/jsx/validation.d.cts +70 -15
- package/dist/jsx/validation.d.cts.map +1 -1
- package/dist/jsx/validation.d.mts +70 -15
- package/dist/jsx/validation.d.mts.map +1 -1
- package/dist/jsx/validation.mjs +66 -36
- package/dist/jsx/validation.mjs.map +1 -1
- package/dist/types/global.cjs.map +1 -1
- package/dist/types/global.d.cts.map +1 -1
- package/dist/types/global.d.mts.map +1 -1
- package/dist/types/global.mjs.map +1 -1
- package/dist/types/images.cjs.map +1 -1
- package/dist/types/images.d.cts.map +1 -1
- package/dist/types/images.d.mts.map +1 -1
- package/dist/types/images.mjs.map +1 -1
- package/dist/types/interface.d.cts +2 -2
- package/dist/types/interface.d.mts +2 -2
- package/dist/types/methods/notify.cjs.map +1 -1
- package/dist/types/methods/notify.d.cts +2 -21
- package/dist/types/methods/notify.d.cts.map +1 -1
- package/dist/types/methods/notify.d.mts +2 -21
- package/dist/types/methods/notify.d.mts.map +1 -1
- package/dist/types/methods/notify.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AddressElement, BoldElement, BoxElement, CopyableElement, DividerElement, IconElement, ImageElement, ItalicElement, LinkElement, RowElement, TextElement, TooltipElement, ValueElement } from "../../jsx/index.cjs";
|
|
1
|
+
import type { EnumToUnion } from "../../internals/index.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* The types of notifications that can be displayed.
|
|
5
4
|
*
|
|
@@ -17,25 +16,8 @@ export declare enum NotificationType {
|
|
|
17
16
|
* @property message - The message to display in the notification.
|
|
18
17
|
*/
|
|
19
18
|
export type NotifyParams = {
|
|
20
|
-
type: EnumToUnion<NotificationType
|
|
19
|
+
type: EnumToUnion<NotificationType>;
|
|
21
20
|
message: string;
|
|
22
|
-
} | {
|
|
23
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
24
|
-
message: string;
|
|
25
|
-
} | {
|
|
26
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
27
|
-
message: string;
|
|
28
|
-
content: NotificationComponent;
|
|
29
|
-
title: string;
|
|
30
|
-
} | {
|
|
31
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
32
|
-
message: string;
|
|
33
|
-
content: NotificationComponent;
|
|
34
|
-
title: string;
|
|
35
|
-
footerLink: {
|
|
36
|
-
href: string;
|
|
37
|
-
text: string;
|
|
38
|
-
};
|
|
39
21
|
};
|
|
40
22
|
/**
|
|
41
23
|
* The result returned by the `snap_notify` method.
|
|
@@ -43,5 +25,4 @@ export type NotifyParams = {
|
|
|
43
25
|
* This method does not return anything.
|
|
44
26
|
*/
|
|
45
27
|
export type NotifyResult = null;
|
|
46
|
-
export type NotificationComponent = BoxElement | CopyableElement | BoldElement | ItalicElement | AddressElement | DividerElement | ValueElement | RowElement | TextElement | TooltipElement | IconElement | ImageElement | LinkElement;
|
|
47
28
|
//# sourceMappingURL=notify.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.cts","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"notify.d.cts","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kCAAwB;AAEnD;;;;;GAKG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AddressElement, BoldElement, BoxElement, CopyableElement, DividerElement, IconElement, ImageElement, ItalicElement, LinkElement, RowElement, TextElement, TooltipElement, ValueElement } from "../../jsx/index.mjs";
|
|
1
|
+
import type { EnumToUnion } from "../../internals/index.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* The types of notifications that can be displayed.
|
|
5
4
|
*
|
|
@@ -17,25 +16,8 @@ export declare enum NotificationType {
|
|
|
17
16
|
* @property message - The message to display in the notification.
|
|
18
17
|
*/
|
|
19
18
|
export type NotifyParams = {
|
|
20
|
-
type: EnumToUnion<NotificationType
|
|
19
|
+
type: EnumToUnion<NotificationType>;
|
|
21
20
|
message: string;
|
|
22
|
-
} | {
|
|
23
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
24
|
-
message: string;
|
|
25
|
-
} | {
|
|
26
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
27
|
-
message: string;
|
|
28
|
-
content: NotificationComponent;
|
|
29
|
-
title: string;
|
|
30
|
-
} | {
|
|
31
|
-
type: EnumToUnion<NotificationType.InApp>;
|
|
32
|
-
message: string;
|
|
33
|
-
content: NotificationComponent;
|
|
34
|
-
title: string;
|
|
35
|
-
footerLink: {
|
|
36
|
-
href: string;
|
|
37
|
-
text: string;
|
|
38
|
-
};
|
|
39
21
|
};
|
|
40
22
|
/**
|
|
41
23
|
* The result returned by the `snap_notify` method.
|
|
@@ -43,5 +25,4 @@ export type NotifyParams = {
|
|
|
43
25
|
* This method does not return anything.
|
|
44
26
|
*/
|
|
45
27
|
export type NotifyResult = null;
|
|
46
|
-
export type NotificationComponent = BoxElement | CopyableElement | BoldElement | ItalicElement | AddressElement | DividerElement | ValueElement | RowElement | TextElement | TooltipElement | IconElement | ImageElement | LinkElement;
|
|
47
28
|
//# sourceMappingURL=notify.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.mts","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"notify.d.mts","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kCAAwB;AAEnD;;;;;GAKG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.mjs","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notify.mjs","sourceRoot":"","sources":["../../../src/types/methods/notify.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","sourcesContent":["import type { EnumToUnion } from '../../internals';\n\n/**\n * The types of notifications that can be displayed.\n *\n * - `InApp` - A notification that is displayed in by the MetaMask extension.\n * - `Native` - A notification that is displayed by the operating system.\n */\nexport enum NotificationType {\n InApp = 'inApp',\n Native = 'native',\n}\n\n/**\n * The request parameters for the `snap_notify` method.\n *\n * @property type - The type of notification to display.\n * @property message - The message to display in the notification.\n */\nexport type NotifyParams = {\n type: EnumToUnion<NotificationType>;\n message: string;\n};\n\n/**\n * The result returned by the `snap_notify` method.\n *\n * This method does not return anything.\n */\nexport type NotifyResult = null;\n"]}
|