@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.
Files changed (70) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/error-wrappers.d.cts +192 -192
  3. package/dist/error-wrappers.d.mts +192 -192
  4. package/dist/internals/error-wrappers.d.cts +12 -12
  5. package/dist/internals/error-wrappers.d.mts +12 -12
  6. package/dist/jsx/components/Avatar.cjs +20 -0
  7. package/dist/jsx/components/Avatar.cjs.map +1 -0
  8. package/dist/jsx/components/Avatar.d.cts +31 -0
  9. package/dist/jsx/components/Avatar.d.cts.map +1 -0
  10. package/dist/jsx/components/Avatar.d.mts +31 -0
  11. package/dist/jsx/components/Avatar.d.mts.map +1 -0
  12. package/dist/jsx/components/Avatar.mjs +17 -0
  13. package/dist/jsx/components/Avatar.mjs.map +1 -0
  14. package/dist/jsx/components/Heading.cjs +1 -1
  15. package/dist/jsx/components/Heading.cjs.map +1 -1
  16. package/dist/jsx/components/Heading.d.cts +3 -3
  17. package/dist/jsx/components/Heading.d.cts.map +1 -1
  18. package/dist/jsx/components/Heading.d.mts +3 -3
  19. package/dist/jsx/components/Heading.d.mts.map +1 -1
  20. package/dist/jsx/components/Heading.mjs +1 -1
  21. package/dist/jsx/components/Heading.mjs.map +1 -1
  22. package/dist/jsx/components/form/Input.cjs +8 -0
  23. package/dist/jsx/components/form/Input.cjs.map +1 -1
  24. package/dist/jsx/components/form/Input.d.cts +32 -6
  25. package/dist/jsx/components/form/Input.d.cts.map +1 -1
  26. package/dist/jsx/components/form/Input.d.mts +32 -6
  27. package/dist/jsx/components/form/Input.d.mts.map +1 -1
  28. package/dist/jsx/components/form/Input.mjs +8 -0
  29. package/dist/jsx/components/form/Input.mjs.map +1 -1
  30. package/dist/jsx/components/index.cjs +1 -0
  31. package/dist/jsx/components/index.cjs.map +1 -1
  32. package/dist/jsx/components/index.d.cts +3 -1
  33. package/dist/jsx/components/index.d.cts.map +1 -1
  34. package/dist/jsx/components/index.d.mts +3 -1
  35. package/dist/jsx/components/index.d.mts.map +1 -1
  36. package/dist/jsx/components/index.mjs +1 -0
  37. package/dist/jsx/components/index.mjs.map +1 -1
  38. package/dist/jsx/index.cjs +1 -2
  39. package/dist/jsx/index.cjs.map +1 -1
  40. package/dist/jsx/index.d.cts +1 -1
  41. package/dist/jsx/index.d.cts.map +1 -1
  42. package/dist/jsx/index.d.mts +1 -1
  43. package/dist/jsx/index.d.mts.map +1 -1
  44. package/dist/jsx/index.mjs +1 -1
  45. package/dist/jsx/index.mjs.map +1 -1
  46. package/dist/jsx/validation.cjs +67 -36
  47. package/dist/jsx/validation.cjs.map +1 -1
  48. package/dist/jsx/validation.d.cts +70 -15
  49. package/dist/jsx/validation.d.cts.map +1 -1
  50. package/dist/jsx/validation.d.mts +70 -15
  51. package/dist/jsx/validation.d.mts.map +1 -1
  52. package/dist/jsx/validation.mjs +66 -36
  53. package/dist/jsx/validation.mjs.map +1 -1
  54. package/dist/types/global.cjs.map +1 -1
  55. package/dist/types/global.d.cts.map +1 -1
  56. package/dist/types/global.d.mts.map +1 -1
  57. package/dist/types/global.mjs.map +1 -1
  58. package/dist/types/images.cjs.map +1 -1
  59. package/dist/types/images.d.cts.map +1 -1
  60. package/dist/types/images.d.mts.map +1 -1
  61. package/dist/types/images.mjs.map +1 -1
  62. package/dist/types/interface.d.cts +2 -2
  63. package/dist/types/interface.d.mts +2 -2
  64. package/dist/types/methods/notify.cjs.map +1 -1
  65. package/dist/types/methods/notify.d.cts +2 -21
  66. package/dist/types/methods/notify.d.cts.map +1 -1
  67. package/dist/types/methods/notify.d.mts +2 -21
  68. package/dist/types/methods/notify.d.mts.map +1 -1
  69. package/dist/types/methods/notify.mjs.map +1 -1
  70. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
- import { type EnumToUnion } from "../../internals/index.cjs";
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.Native>;
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,KAAK,WAAW,EAAE,kCAAwB;AACnD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,4BAAkB;AAEnB;;;;;GAKG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB;IACE,IAAI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AAY,GAAG,IAAI,CAAC"}
@@ -1,5 +1,4 @@
1
- import { type EnumToUnion } from "../../internals/index.mjs";
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.Native>;
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,KAAK,WAAW,EAAE,kCAAwB;AACnD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,4BAAk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AAY,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":"AAiBA;;;;;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';\nimport type {\n AddressElement,\n BoldElement,\n BoxElement,\n CopyableElement,\n DividerElement,\n IconElement,\n ImageElement,\n ItalicElement,\n LinkElement,\n RowElement,\n TextElement,\n TooltipElement,\n ValueElement,\n} from '../../jsx';\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 | {\n type: EnumToUnion<NotificationType.Native>;\n message: string;\n }\n | {\n type: EnumToUnion<NotificationType.InApp>;\n message: string;\n }\n | {\n type: EnumToUnion<NotificationType.InApp>;\n message: string;\n content: NotificationComponent;\n title: string;\n }\n | {\n type: EnumToUnion<NotificationType.InApp>;\n message: string;\n content: NotificationComponent;\n title: string;\n footerLink: { href: string; text: 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\nexport type NotificationComponent =\n | BoxElement\n | CopyableElement\n | BoldElement\n | ItalicElement\n | AddressElement\n | DividerElement\n | ValueElement\n | RowElement\n | TextElement\n | TooltipElement\n | IconElement\n | ImageElement\n | LinkElement;\n"]}
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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-sdk",
3
- "version": "6.8.0",
3
+ "version": "6.9.0",
4
4
  "description": "A library containing the core functionality for building MetaMask Snaps",
5
5
  "keywords": [
6
6
  "MetaMask",