diff --git a/package.json b/package.json index d30d9c208a..a7f18c0361 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "62.0.0", + "version": "63.0.0", "private": true, "repository": { "type": "git", diff --git a/packages/examples/package.json b/packages/examples/package.json index 2f06313a18..994989ff9e 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/example-snaps", - "version": "3.7.0", + "version": "3.8.0", "private": true, "repository": { "type": "git", diff --git a/packages/examples/packages/bip32/snap.manifest.json b/packages/examples/packages/bip32/snap.manifest.json index 2acc3430e6..917e7f7520 100644 --- a/packages/examples/packages/bip32/snap.manifest.json +++ b/packages/examples/packages/bip32/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "meplfIhDKAdAYfRjk1slGTks3rI6+uPewth+sL7o/Go=", + "shasum": "JOwxvU/zickgUrCb6Vsa03osvS8h8Or0ssN5WAEYqgQ=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/bip44/snap.manifest.json b/packages/examples/packages/bip44/snap.manifest.json index b21a1db41a..a8fd4f4fe3 100644 --- a/packages/examples/packages/bip44/snap.manifest.json +++ b/packages/examples/packages/bip44/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "hM4uyKv1VEidiHratstws0S/LdBzPWjOQncUkHBNDP0=", + "shasum": "sY6KE/5G0d6g8v9+saFlVfjJB+r6kg+f4jySqEqj0zA=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/browserify-plugin/snap.manifest.json b/packages/examples/packages/browserify-plugin/snap.manifest.json index 9ca1082f37..0463ce2c16 100644 --- a/packages/examples/packages/browserify-plugin/snap.manifest.json +++ b/packages/examples/packages/browserify-plugin/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "uFeB4RsFZsV7ZYjLPEp8R+R96iuN9gpHjYB1MKUy0bw=", + "shasum": "zeHY6l18y/lxNkWb5Layo4y2KbJ5ZRaDOz8PoP6AUUM=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/browserify/snap.manifest.json b/packages/examples/packages/browserify/snap.manifest.json index e4f36d7c03..0d813d71aa 100644 --- a/packages/examples/packages/browserify/snap.manifest.json +++ b/packages/examples/packages/browserify/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "9RcL8rtVPwRiXki5Vs+pEA6lO1CthaofVv2UQF1COlY=", + "shasum": "92cIjIH4LfT5grYiEa+/6nOuUkJU3SR4qUTfUnQ7nKA=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/client-status/snap.manifest.json b/packages/examples/packages/client-status/snap.manifest.json index 3c27f9032c..c45ea86c30 100644 --- a/packages/examples/packages/client-status/snap.manifest.json +++ b/packages/examples/packages/client-status/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "BmrBVhdD2ZmEdDjNVdEiVSzd3uS8PiGgmZcvYmHnHxw=", + "shasum": "LIEfTJkmBerzzNgD7VVfFzhxjjunEc4l6EKz9cxvzuo=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/cronjobs/snap.manifest.json b/packages/examples/packages/cronjobs/snap.manifest.json index 6beb76defc..dc54928d39 100644 --- a/packages/examples/packages/cronjobs/snap.manifest.json +++ b/packages/examples/packages/cronjobs/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "oZbPamYypPK6BHoVJ/Mx0l7pLIBjQRBtbZNZWyDMPGs=", + "shasum": "jBSm0Pd1EcloSf/lr+K64/a/TPN7oI6+49et6cJXFJI=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/dialogs/snap.manifest.json b/packages/examples/packages/dialogs/snap.manifest.json index d56d58df82..57dacb5c08 100644 --- a/packages/examples/packages/dialogs/snap.manifest.json +++ b/packages/examples/packages/dialogs/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "prxccwZ+383T+7jjMrSabwO74aBRyoKEnnP1o7r1Aac=", + "shasum": "z7HF9NygYAgyVReMBWQiPG5akcFLFcIDbiJIp5RKjpk=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/ethereum-provider/snap.manifest.json b/packages/examples/packages/ethereum-provider/snap.manifest.json index 2e06422fbb..33c8f41fde 100644 --- a/packages/examples/packages/ethereum-provider/snap.manifest.json +++ b/packages/examples/packages/ethereum-provider/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "GSpRcUSfCYEWViNqYyG3NdTa4/nO8EGukSHvGBVXtT8=", + "shasum": "MQnui43vhpY3B+dRXqWSss/c6fgxiAKn49ubcricdZ4=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/ethers-js/snap.manifest.json b/packages/examples/packages/ethers-js/snap.manifest.json index 1561e38dc2..425e36d3c3 100644 --- a/packages/examples/packages/ethers-js/snap.manifest.json +++ b/packages/examples/packages/ethers-js/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "bG6octHXbG5c1Keftfj2kCbHcATOJMnVe5oy4ENLGYM=", + "shasum": "WXXLk/VebRcuzw6MmNYKipycvgucYk8Ue7ouWTzSWnE=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/file-upload/snap.manifest.json b/packages/examples/packages/file-upload/snap.manifest.json index 001a5d998c..d6ef49ea10 100644 --- a/packages/examples/packages/file-upload/snap.manifest.json +++ b/packages/examples/packages/file-upload/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "dRJ64XJAM36aNfsZBN7FC8fGmh/4b3nd0V0wJZQfmzk=", + "shasum": "kwXrElRAEQp7uAYR3FiLcTL6cFgDouSz+7mFeapPNvM=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/get-entropy/snap.manifest.json b/packages/examples/packages/get-entropy/snap.manifest.json index d6b20a49c1..77d16beced 100644 --- a/packages/examples/packages/get-entropy/snap.manifest.json +++ b/packages/examples/packages/get-entropy/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "z/xO4vaYBErIumDuzkS1JuWD0w3M/JQzrkl7QdH+Rsw=", + "shasum": "TqW6Vqbg+AnLOtcUO/CYrOkmEiblLAfA0tQgGB1GBas=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/get-file/snap.manifest.json b/packages/examples/packages/get-file/snap.manifest.json index f8010e3d09..acaa343541 100644 --- a/packages/examples/packages/get-file/snap.manifest.json +++ b/packages/examples/packages/get-file/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "RY6WMOfBdTEWYMUX7zIzNy7ZmMjZdxEZUbsW4d7bAWc=", + "shasum": "l2wz+7FX6NJlQzn5FTRnGWbjcKWHYz7bHZlhT/aDy/U=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/home-page/snap.manifest.json b/packages/examples/packages/home-page/snap.manifest.json index 8c1a57c967..780e9767a8 100644 --- a/packages/examples/packages/home-page/snap.manifest.json +++ b/packages/examples/packages/home-page/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "7w5lE7ZVBqS66ghFwA5z3USgqOxh6vU2d71JBi5dx+s=", + "shasum": "Z68vDlz95cA8kLP1RLS4kVri20UGqg46iwYWEMx0iwg=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/images/snap.manifest.json b/packages/examples/packages/images/snap.manifest.json index 2ebb259b78..6af60600e1 100644 --- a/packages/examples/packages/images/snap.manifest.json +++ b/packages/examples/packages/images/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "xJUmec7F6/It7kfSljqHWM76MSJSmytZlPvlgyLxxXI=", + "shasum": "Fj92CH4apRpr5Ov1cS64QKZKx473XCcaAlGeQom2r8c=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/interactive-ui/snap.manifest.json b/packages/examples/packages/interactive-ui/snap.manifest.json index 23c09c39b3..ac746b3adc 100644 --- a/packages/examples/packages/interactive-ui/snap.manifest.json +++ b/packages/examples/packages/interactive-ui/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "rvE1wmZmbTWiskg2VPVLbn8KT2PFkFQ5v3tGFqybsRE=", + "shasum": "ZjuGd/nFHLF5iAzqOC07a4n2e1lj7c5YDlLf1xTBXiM=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/invoke-snap/packages/consumer-signer/snap.manifest.json b/packages/examples/packages/invoke-snap/packages/consumer-signer/snap.manifest.json index b6219626cd..f108570ce7 100644 --- a/packages/examples/packages/invoke-snap/packages/consumer-signer/snap.manifest.json +++ b/packages/examples/packages/invoke-snap/packages/consumer-signer/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "dsc+T0qqSAe1LoKYI/8HPVk3yBktRoaRSOvRMjlF5B8=", + "shasum": "waQIHo3IV3Is3QwzZTlY2+HJawI/FIbOpIZpYTbYvcw=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json b/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json index d538a916e6..27adac35cf 100644 --- a/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json +++ b/packages/examples/packages/invoke-snap/packages/core-signer/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "XZ4Pt2LJwOMXBm1wQXtJP3l/qZgC218Z/n3xYE8BGjM=", + "shasum": "8pktGn0Ft/wATrNFg8IVH85DvmMO6fuU/6EQg5s+Aio=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/json-rpc/snap.manifest.json b/packages/examples/packages/json-rpc/snap.manifest.json index 1f15ba024d..3682596575 100644 --- a/packages/examples/packages/json-rpc/snap.manifest.json +++ b/packages/examples/packages/json-rpc/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "wokl2HTmrbZObmcc1MH9a7so9xrZkXNhRcCqtfepGA0=", + "shasum": "7hkIg1lbb5FHNDPBgEwwlpUmyPaYl1XkUASXJ7xCOCo=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/jsx/CHANGELOG.md b/packages/examples/packages/jsx/CHANGELOG.md index 7953d5ff9b..efd624e476 100644 --- a/packages/examples/packages/jsx/CHANGELOG.md +++ b/packages/examples/packages/jsx/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.0] +### Added +- Made JSX example use Card component ([#2665](https://github.com/MetaMask/snaps/pull/2665)) + ## [1.1.1] ### Fixed - Move bold tags in JSX Example Snap ([#2520](https://github.com/MetaMask/snaps/pull/2520)) @@ -18,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add JSX example Snap ([#2258](https://github.com/MetaMask/snaps/pull/2258)) -[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/jsx-example-snap@1.1.1...HEAD +[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/jsx-example-snap@1.2.0...HEAD +[1.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/jsx-example-snap@1.1.1...@metamask/jsx-example-snap@1.2.0 [1.1.1]: https://github.com/MetaMask/snaps/compare/@metamask/jsx-example-snap@1.1.0...@metamask/jsx-example-snap@1.1.1 [1.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/jsx-example-snap@1.0.0...@metamask/jsx-example-snap@1.1.0 [1.0.0]: https://github.com/MetaMask/snaps/releases/tag/@metamask/jsx-example-snap@1.0.0 diff --git a/packages/examples/packages/jsx/package.json b/packages/examples/packages/jsx/package.json index 1083d64a41..8ad44655ff 100644 --- a/packages/examples/packages/jsx/package.json +++ b/packages/examples/packages/jsx/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/jsx-example-snap", - "version": "1.1.1", + "version": "1.2.0", "description": "MetaMask example snap demonstrating the use of JSX for UI components.", "repository": { "type": "git", diff --git a/packages/examples/packages/jsx/snap.manifest.json b/packages/examples/packages/jsx/snap.manifest.json index bb82c77ab6..9b1fff6e53 100644 --- a/packages/examples/packages/jsx/snap.manifest.json +++ b/packages/examples/packages/jsx/snap.manifest.json @@ -1,5 +1,5 @@ { - "version": "1.1.1", + "version": "1.2.0", "description": "MetaMask example snap demonstrating the use of JSX for UI components.", "proposedName": "JSX Example Snap", "repository": { @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "v2qKGCM4FTPM6wUB4lbKO556tDV00aYZDjd3RxvMcsI=", + "shasum": "GsfsvX0Rtni/n0O5cBV2lHiB4NKcew1jqJUgwOdJPr4=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/lifecycle-hooks/snap.manifest.json b/packages/examples/packages/lifecycle-hooks/snap.manifest.json index 88dc983401..5c8ad46ecf 100644 --- a/packages/examples/packages/lifecycle-hooks/snap.manifest.json +++ b/packages/examples/packages/lifecycle-hooks/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "iyRAkal8Vql5iD1XJwIp/9KNi/kk3HjlfdfklQf3UW0=", + "shasum": "6n5QAtB6dz2x4AcuayWf0EAbRUCXjaeMsD0JKOJ5KOo=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/localization/snap.manifest.json b/packages/examples/packages/localization/snap.manifest.json index 2330e551b1..5a3edd22ee 100644 --- a/packages/examples/packages/localization/snap.manifest.json +++ b/packages/examples/packages/localization/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "LofJCTQeoNFWE+F1S1OTGzcUyJPJiTskgK9aIRrt1NM=", + "shasum": "h1wTfQqs+0KKrXzWCNGjf7/4Ocd6Uit49pZspWTt5Ys=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/manage-state/snap.manifest.json b/packages/examples/packages/manage-state/snap.manifest.json index 416a85065a..a4c73b4496 100644 --- a/packages/examples/packages/manage-state/snap.manifest.json +++ b/packages/examples/packages/manage-state/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "f6IlmDjDvF8G3hEaIF8mrBl5irEpYgg6WPqpdk7P+is=", + "shasum": "zo2YoNg+9LOJyQ3pIl0c7N9UURcdJ4KYEM2a09v4lu0=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/network-access/snap.manifest.json b/packages/examples/packages/network-access/snap.manifest.json index 6af024bf18..85e3fc87a6 100644 --- a/packages/examples/packages/network-access/snap.manifest.json +++ b/packages/examples/packages/network-access/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "JtcrsUNAGdf3v4dr4uo1XQgom71wdtifM/rh54HgnEs=", + "shasum": "nLLIiMjtrVekCZ07IJUm5esGuBOZ64M2ZaNnyLtoWR0=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/notifications/snap.manifest.json b/packages/examples/packages/notifications/snap.manifest.json index d9db789b5b..1c285c2834 100644 --- a/packages/examples/packages/notifications/snap.manifest.json +++ b/packages/examples/packages/notifications/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "Nm2UUq7WZAa+oFy8y08o0bDHwLrVKpP00WW+F/UVw4o=", + "shasum": "8QtkpiMxeIxiEEqorF1ZniCwIYImx+eer4rnA17ytG4=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/rollup-plugin/snap.manifest.json b/packages/examples/packages/rollup-plugin/snap.manifest.json index 689f5119d6..bb691f3513 100644 --- a/packages/examples/packages/rollup-plugin/snap.manifest.json +++ b/packages/examples/packages/rollup-plugin/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "DFfEzW8wLRohClvMLn+mN/pN+YmB39HgrDcQavUDISg=", + "shasum": "MNgIiJCENwqwiLtGr1olZRi2R/NdNRjdi1i60z5I718=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/signature-insights/snap.manifest.json b/packages/examples/packages/signature-insights/snap.manifest.json index a85625b34d..8fd067d949 100644 --- a/packages/examples/packages/signature-insights/snap.manifest.json +++ b/packages/examples/packages/signature-insights/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "hsCvm1U9gV/4FzppkTRoVd8kjAmDHc1ar2KaV1SLUcM=", + "shasum": "N0qkFYPSKpTCVzI6rZ+m4sMSq8pJP1bS8EkCQgirdas=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/transaction-insights/snap.manifest.json b/packages/examples/packages/transaction-insights/snap.manifest.json index fdc321a4b3..83a1b74a57 100644 --- a/packages/examples/packages/transaction-insights/snap.manifest.json +++ b/packages/examples/packages/transaction-insights/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "Vizjf/UbRArRlUspGuMRFkCZXEMwK20c/8wTCJhNSc0=", + "shasum": "6qpXWnnjXRJb1iMxJ+zSAk0K57vwB/MISvXHBc6vwT4=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/wasm/snap.manifest.json b/packages/examples/packages/wasm/snap.manifest.json index 7abc742414..e099e41cc0 100644 --- a/packages/examples/packages/wasm/snap.manifest.json +++ b/packages/examples/packages/wasm/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "I5yXL+XH56rFZiJfGc6Pq4v4lcXwuUIhkk/vbMbS5O4=", + "shasum": "JMSRZlFEnhZl3VfvQLDEIFDVklKfsUygtH4urJWU6Uc=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/examples/packages/webpack-plugin/snap.manifest.json b/packages/examples/packages/webpack-plugin/snap.manifest.json index 7c5ba582e7..dcf5955c14 100644 --- a/packages/examples/packages/webpack-plugin/snap.manifest.json +++ b/packages/examples/packages/webpack-plugin/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snaps.git" }, "source": { - "shasum": "5hX1yMdOi/HxZesj7T4qXvR/Cu4GVpQHnfbavDPS45U=", + "shasum": "CgeYAVUiVlBrxly2CUuvQm7QRvVoPlxS7EGRNulVmVs=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/snaps-cli/CHANGELOG.md b/packages/snaps-cli/CHANGELOG.md index a7a83eac03..9498ac729c 100644 --- a/packages/snaps-cli/CHANGELOG.md +++ b/packages/snaps-cli/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.3.1] +### Fixed +- Hide browserlist warning where applicable ([#2664](https://github.com/MetaMask/snaps/pull/2664)) + ## [6.3.0] ### Changed - Improve manifest validation output ([#2572](https://github.com/MetaMask/snaps/pull/2572)) @@ -166,7 +170,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The version of the package no longer needs to match the version of all other MetaMask Snaps packages. -[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.3.0...HEAD +[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.3.1...HEAD +[6.3.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.3.0...@metamask/snaps-cli@6.3.1 [6.3.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.2.1...@metamask/snaps-cli@6.3.0 [6.2.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.2.0...@metamask/snaps-cli@6.2.1 [6.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.1.1...@metamask/snaps-cli@6.2.0 diff --git a/packages/snaps-cli/package.json b/packages/snaps-cli/package.json index 35113928f3..23753c98b4 100644 --- a/packages/snaps-cli/package.json +++ b/packages/snaps-cli/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/snaps-cli", - "version": "6.3.0", + "version": "6.3.1", "description": "A CLI for developing MetaMask Snaps.", "repository": { "type": "git", diff --git a/packages/snaps-controllers/CHANGELOG.md b/packages/snaps-controllers/CHANGELOG.md index 0436798a2a..e8033d18e5 100644 --- a/packages/snaps-controllers/CHANGELOG.md +++ b/packages/snaps-controllers/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [9.5.0] +### Added +- Add `Selector` component ([#2645](https://github.com/MetaMask/snaps/pull/2645)) +- Add missing types for `getState` action & `stateChange` event ([#2655](https://github.com/MetaMask/snaps/pull/2655), [#2659](https://github.com/MetaMask/snaps/pull/2659)) + +### Fixed +- Fix `fetch` binding under LavaMoat ([#2642](https://github.com/MetaMask/snaps/pull/2642)) + ## [9.4.0] ### Added - Add `RadioGroup` component ([#2592](https://github.com/MetaMask/snaps/pull/2592)) @@ -348,7 +356,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The version of the package no longer needs to match the version of all other MetaMask Snaps packages. -[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.4.0...HEAD +[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.5.0...HEAD +[9.5.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.4.0...@metamask/snaps-controllers@9.5.0 [9.4.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.3.1...@metamask/snaps-controllers@9.4.0 [9.3.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.3.0...@metamask/snaps-controllers@9.3.1 [9.3.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@9.2.0...@metamask/snaps-controllers@9.3.0 diff --git a/packages/snaps-controllers/package.json b/packages/snaps-controllers/package.json index cec30b479c..ab3f5a2bb1 100644 --- a/packages/snaps-controllers/package.json +++ b/packages/snaps-controllers/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/snaps-controllers", - "version": "9.4.0", + "version": "9.5.0", "description": "Controllers for MetaMask Snaps.", "repository": { "type": "git", diff --git a/packages/snaps-sdk/CHANGELOG.md b/packages/snaps-sdk/CHANGELOG.md index e000900b56..9b9d71ae55 100644 --- a/packages/snaps-sdk/CHANGELOG.md +++ b/packages/snaps-sdk/CHANGELOG.md @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.3.0] +### Added +- Add `Selector` component ([#2645](https://github.com/MetaMask/snaps/pull/2645)) +- Add `Icon` component ([#2638](https://github.com/MetaMask/snaps/pull/2638)) +- Add `color` prop to `Text` component ([#2660](https://github.com/MetaMask/snaps/pull/2660)) + +### Changed +- `Button` children are now allowed to be `Image` and `Icon` ([#2641](https://github.com/MetaMask/snaps/pull/2641)) + ## [6.2.1] ### Fixed - Add structs to `typedUnion` schema ([#2623](https://github.com/MetaMask/snaps/pull/2623)) @@ -215,7 +224,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release of this package. -[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.2.1...HEAD +[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.3.0...HEAD +[6.3.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.2.1...@metamask/snaps-sdk@6.3.0 [6.2.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.2.0...@metamask/snaps-sdk@6.2.1 [6.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.1.1...@metamask/snaps-sdk@6.2.0 [6.1.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@6.1.0...@metamask/snaps-sdk@6.1.1 diff --git a/packages/snaps-sdk/package.json b/packages/snaps-sdk/package.json index ad17334e0e..087d189c08 100644 --- a/packages/snaps-sdk/package.json +++ b/packages/snaps-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/snaps-sdk", - "version": "6.2.1", + "version": "6.3.0", "repository": { "type": "git", "url": "https://github.com/MetaMask/snaps.git" diff --git a/packages/snaps-sdk/src/jsx/components/Section.test.tsx b/packages/snaps-sdk/src/jsx/components/Section.test.tsx new file mode 100644 index 0000000000..029c5c6d1e --- /dev/null +++ b/packages/snaps-sdk/src/jsx/components/Section.test.tsx @@ -0,0 +1,118 @@ +import { Address } from './Address'; +import { Row } from './Row'; +import { Section } from './Section'; +import { Text } from './Text'; + +describe('Section', () => { + it('renders a section', () => { + const result = ( +
+ Hello +
+ ); + + expect(result).toStrictEqual({ + type: 'Section', + key: null, + props: { + children: { + type: 'Text', + key: null, + props: { + children: 'Hello', + }, + }, + }, + }); + }); + + it('renders a section with multiple children', () => { + const result = ( +
+ +
+ + +
+ +
+ ); + + expect(result).toStrictEqual({ + type: 'Section', + key: null, + props: { + children: [ + { + type: 'Row', + key: null, + props: { + label: 'From', + children: { + type: 'Address', + key: null, + props: { + address: '0x1234567890123456789012345678901234567890', + }, + }, + }, + }, + { + type: 'Row', + key: null, + props: { + label: 'To', + tooltip: 'This address has been deemed dangerous.', + variant: 'warning', + children: { + type: 'Address', + key: null, + props: { + address: '0x0000000000000000000000000000000000000000', + }, + }, + }, + }, + ], + }, + }); + }); + + it('renders a section with props', () => { + const result = ( +
+ Hello + World +
+ ); + + expect(result).toStrictEqual({ + type: 'Section', + key: null, + props: { + direction: 'horizontal', + alignment: 'space-between', + children: [ + { + type: 'Text', + key: null, + props: { + children: 'Hello', + }, + }, + { + type: 'Text', + key: null, + props: { + children: 'World', + }, + }, + ], + }, + }); + }); +}); diff --git a/packages/snaps-sdk/src/jsx/components/Section.ts b/packages/snaps-sdk/src/jsx/components/Section.ts new file mode 100644 index 0000000000..abeb084609 --- /dev/null +++ b/packages/snaps-sdk/src/jsx/components/Section.ts @@ -0,0 +1,50 @@ +import type { GenericSnapElement, SnapsChildren } from '../component'; +import { createSnapComponent } from '../component'; + +/** + * The props of the {@link Section} component. + * + * @property children - The children of the section. + */ +export type SectionProps = { + // We can't use `JSXElement` because it causes a circular reference. + children: SnapsChildren; + direction?: 'vertical' | 'horizontal' | undefined; + alignment?: + | 'start' + | 'center' + | 'end' + | 'space-between' + | 'space-around' + | undefined; +}; + +const TYPE = 'Section'; + +/** + * A section component, which is used to group multiple components together. + * The component itself is 16px padded with a default background and a border radius of 8px. + * + * @param props - The props of the component. + * @param props.children - The children of the section. + * @param props.direction - The direction that the children are aligned. + * @param props.alignment - The alignment of the children (a justify-content value). + * @returns A section element. + * @example + *
+ * + *
+ * + * + *
+ * + *
+ */ +export const Section = createSnapComponent(TYPE); + +/** + * A section element. + * + * @see Section + */ +export type SectionElement = ReturnType; diff --git a/packages/snaps-sdk/src/jsx/components/index.ts b/packages/snaps-sdk/src/jsx/components/index.ts index cee6d789b2..d063143a03 100644 --- a/packages/snaps-sdk/src/jsx/components/index.ts +++ b/packages/snaps-sdk/src/jsx/components/index.ts @@ -12,6 +12,7 @@ import type { IconElement } from './Icon'; import type { ImageElement } from './Image'; import type { LinkElement } from './Link'; import type { RowElement } from './Row'; +import type { SectionElement } from './Section'; import type { SpinnerElement } from './Spinner'; import type { TextElement } from './Text'; import type { TooltipElement } from './Tooltip'; @@ -35,6 +36,7 @@ export * from './Text'; export * from './Tooltip'; export * from './Footer'; export * from './Container'; +export * from './Section'; /** * A built-in JSX element, which can be used in a Snap user interface. @@ -55,6 +57,7 @@ export type JSXElement = | ImageElement | LinkElement | RowElement + | SectionElement | SpinnerElement | TextElement | TooltipElement; diff --git a/packages/snaps-sdk/src/jsx/validation.test.tsx b/packages/snaps-sdk/src/jsx/validation.test.tsx index c9a6064536..5d9fa9638c 100644 --- a/packages/snaps-sdk/src/jsx/validation.test.tsx +++ b/packages/snaps-sdk/src/jsx/validation.test.tsx @@ -31,6 +31,7 @@ import { Icon, Selector, SelectorOption, + Section, } from './components'; import { AddressStruct, @@ -66,6 +67,7 @@ import { ValueStruct, IconStruct, SelectorStruct, + SectionStruct, } from './validation'; describe('KeyStruct', () => { @@ -516,6 +518,9 @@ describe('FooterStruct', () => { , +
+ +
, ])('validates a footer element', (value) => { expect(is(value, FooterStruct)).toBe(true); }); @@ -539,6 +544,25 @@ describe('FooterStruct', () => { alt , +
+ +
, +
+ + +
, +
+ +
, ])('does not validate "%p"', (value) => { expect(is(value, FooterStruct)).toBe(false); }); @@ -1165,6 +1189,70 @@ describe('ValueStruct', () => { }); }); +describe('SectionStruct', () => { + it.each([ +
+ + Hello world! + +
, +
+ +
+ + +
+ +
, +
+ foo + + alt + +
, +
+ foo + + alt + +
, + ])('validates a section element', (value) => { + expect(is(value, SectionStruct)).toBe(true); + }); + + it.each([ + 'foo', + 42, + null, + undefined, + {}, + [], + // @ts-expect-error - Invalid props. +
, + // @ts-expect-error - Invalid props. +
, + foo, + + foo + , + + alt + , + // @ts-expect-error - Invalid props. +
+ + Hello world! + +
, + ])('does not validate "%p"', (value) => { + expect(is(value, SectionStruct)).toBe(false); + }); +}); + describe('isJSXElement', () => { it.each([ foo, diff --git a/packages/snaps-sdk/src/jsx/validation.ts b/packages/snaps-sdk/src/jsx/validation.ts index dc03e09602..ae95c87e24 100644 --- a/packages/snaps-sdk/src/jsx/validation.ts +++ b/packages/snaps-sdk/src/jsx/validation.ts @@ -17,6 +17,7 @@ import { record, string, tuple, + refine, } from '@metamask/superstruct'; import { hasProperty, @@ -68,6 +69,7 @@ import { type ContainerElement, type FooterElement, type IconElement, + type SectionElement, type SelectorElement, type SelectorOptionElement, IconName, @@ -411,13 +413,55 @@ export const BoxStruct: Describe = element('Box', { ), }); +const FooterButtonStruct = refine(ButtonStruct, 'FooterButton', (value) => { + if ( + typeof value.props.children === 'string' || + typeof value.props.children === 'boolean' || + value.props.children === null + ) { + return true; + } + + if (Array.isArray(value.props.children)) { + const hasNonTextElements = value.props.children.some( + (child) => + typeof child !== 'string' && + typeof child !== 'boolean' && + child !== null, + ); + + if (!hasNonTextElements) { + return true; + } + } + + return 'Footer buttons must contain text'; +}); + +/** + * A struct for the {@link SectionElement} type. + */ +export const SectionStruct: Describe = element('Section', { + children: BoxChildrenStruct, + direction: optional(nullUnion([literal('horizontal'), literal('vertical')])), + alignment: optional( + nullUnion([ + literal('start'), + literal('center'), + literal('end'), + literal('space-between'), + literal('space-around'), + ]), + ), +}); + /** * A subset of JSX elements that are allowed as children of the Footer component. * This set should include a single button or a tuple of two buttons. */ export const FooterChildStruct = nullUnion([ - tuple([ButtonStruct, ButtonStruct]), - ButtonStruct, + tuple([FooterButtonStruct, FooterButtonStruct]), + FooterButtonStruct, ]); /** @@ -589,6 +633,7 @@ export const BoxChildStruct = typedUnion([ CardStruct, IconStruct, SelectorStruct, + SectionStruct, ]); /** @@ -634,6 +679,7 @@ export const JSXElementStruct: Describe = typedUnion([ IconStruct, SelectorStruct, SelectorOptionStruct, + SectionStruct, ]); /** diff --git a/packages/test-snaps/CHANGELOG.md b/packages/test-snaps/CHANGELOG.md index d3386fc0fb..9980e649f7 100644 --- a/packages/test-snaps/CHANGELOG.md +++ b/packages/test-snaps/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.13.0] +### Changed +- Use latest versions of example Snaps ([#2670](https://github.com/MetaMask/snaps/pull/2670)) + ## [2.12.0] ### Added - Add `Custom` button to the dialog example snap in `test-snaps` ([#2618](https://github.com/MetaMask/snaps/pull/2618)) @@ -134,7 +138,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix NPM package name of the network access snap ([#1621](https://github.com/MetaMask/snaps/pull/1621)) -[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.12.0...HEAD +[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.13.0...HEAD +[2.13.0]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.12.0...@metamask/test-snaps@2.13.0 [2.12.0]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.11.0...@metamask/test-snaps@2.12.0 [2.11.0]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.10.0...@metamask/test-snaps@2.11.0 [2.10.0]: https://github.com/MetaMask/snaps/compare/@metamask/test-snaps@2.9.0...@metamask/test-snaps@2.10.0 diff --git a/packages/test-snaps/package.json b/packages/test-snaps/package.json index 7b6229cb9b..c60d54f882 100644 --- a/packages/test-snaps/package.json +++ b/packages/test-snaps/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/test-snaps", - "version": "2.12.0", + "version": "2.13.0", "private": true, "description": "The test snaps website for MetaMask Snaps, used for end-to-end testing.", "repository": { diff --git a/yarn.lock b/yarn.lock index 994934591a..e8bad6943b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9841,7 +9841,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": +"braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -17202,12 +17202,12 @@ __metadata: linkType: hard "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" dependencies: - braces: ^3.0.2 + braces: ^3.0.3 picomatch: ^2.3.1 - checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc + checksum: 79920eb634e6f400b464a954fcfa589c4e7c7143209488e44baf627f9affc8b1e306f41f4f0deedde97e69cb725920879462d3e750ab3bd3c1aed675bb3a8966 languageName: node linkType: hard