From 64868e0577fd74559cd68e9bf016e4534c9872d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 Mar 2024 18:01:35 +0000 Subject: [PATCH 01/21] chore: version packages --- .changeset/long-tips-whisper.md | 6 ------ packages/nft-renderer/CHANGELOG.md | 11 +++++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 6 ++++++ packages/rmrk-hooks/package.json | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) delete mode 100644 .changeset/long-tips-whisper.md diff --git a/.changeset/long-tips-whisper.md b/.changeset/long-tips-whisper.md deleted file mode 100644 index f849324..0000000 --- a/.changeset/long-tips-whisper.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rmrk-team/nft-renderer': minor -'@rmrk-team/rmrk-hooks': minor ---- - -fix nft-renderer config and add equipped item details to useGetComposedState diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 1953754..8cd1989 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,16 @@ # @rmrk-team/nft-renderer +## 0.2.0 + +### Minor Changes + +- [`325e6e2`](https://github.com/rmrk-team/rmrk-js/commit/325e6e2bec733177cbe86e966ffc821603653bb2) Thanks [@YuriGii](https://github.com/YuriGii)! - fix nft-renderer config and add equipped item details to useGetComposedState + +### Patch Changes + +- Updated dependencies [[`325e6e2`](https://github.com/rmrk-team/rmrk-js/commit/325e6e2bec733177cbe86e966ffc821603653bb2)]: + - @rmrk-team/rmrk-hooks@0.2.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index fe445d2..ee61644 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.1.2", + "version": "0.2.0", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index 04e0c61..abde698 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/rmrk-hooks +## 0.2.0 + +### Minor Changes + +- [`325e6e2`](https://github.com/rmrk-team/rmrk-js/commit/325e6e2bec733177cbe86e966ffc821603653bb2) Thanks [@YuriGii](https://github.com/YuriGii)! - fix nft-renderer config and add equipped item details to useGetComposedState + ## 0.1.2 ### Patch Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index 74f834c..ef73638 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.2", + "version": "0.2.0", "private": false, "access": "public", "repository": { From 4fdc5b6e6e3b7250651ea6fa452560f2ea72f1d0 Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 19 Mar 2024 13:38:37 +0100 Subject: [PATCH 02/21] Update ethereum render utils contract --- packages/rmrk-evm-utils/src/lib/rmrk-contract-addresses.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rmrk-evm-utils/src/lib/rmrk-contract-addresses.ts b/packages/rmrk-evm-utils/src/lib/rmrk-contract-addresses.ts index 64a47bf..032c66f 100644 --- a/packages/rmrk-evm-utils/src/lib/rmrk-contract-addresses.ts +++ b/packages/rmrk-evm-utils/src/lib/rmrk-contract-addresses.ts @@ -39,7 +39,7 @@ export const EVM_RMRK_CONTRACTS = { }, [mainnet.id]: { [NETWORK_CONTRACTS_PROPS.RMRKEquipRenderUtils]: - '0xEEDA3E023A8f0Db4E038f2d16d3CF39369D5bA8C', + '0x89c85a48d7dd136c152720a0cf2ee0a77fc6da64', [NETWORK_CONTRACTS_PROPS.RMRKBulkWriter]: '0xA1bE03772e25001df2B8A3F4FC88d8d3810A285e', [NETWORK_CONTRACTS_PROPS.RMRKCollectionUtils]: From de4a753de9c083a4314a24ac117bbec1a54650ec Mon Sep 17 00:00:00 2001 From: Yuri Date: Sat, 13 Apr 2024 19:42:37 +0200 Subject: [PATCH 03/21] use use-resize-observer package --- packages/rmrk-2d-renderer/package.json | 3 +- .../src/lib/rmrk-2d-renderer.tsx | 31 +++---------------- pnpm-lock.yaml | 18 +++++++++++ 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 1b9119b..72ba7d9 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -54,7 +54,8 @@ "isomorphic-dompurify": "^2.2.0", "lucide-react": "^0.303.0", "pixi.js": "^7.2.4", - "use-image": "^1.1.1" + "use-image": "^1.1.1", + "use-resize-observer": "^9.1.0" }, "devDependencies": { "@changesets/changelog-github": "^0.5.0", diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index f58a38e..9e7a4f9 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -12,27 +12,7 @@ import { css, cx } from 'styled-system/css'; import useImage from 'use-image'; import { Skeleton } from '../ui/skeleton.js'; import { INHERIT_RENDER_CONTEXT } from './consts.js'; - -const useObserveElementDimensions = (ref?: React.RefObject) => { - const [width, setWidth] = useState(0); - const [height, setHeight] = useState(0); - useEffect(() => { - const resizeObserver = new ResizeObserver((event) => { - // Depending on the layout, you may need to swap inlineSize with blockSize - // https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentBoxSize - setWidth(event[0]?.contentBoxSize[0]?.inlineSize || 0); - setHeight(event[0]?.contentBoxSize[0]?.blockSize || 0); - }); - - if (ref?.current) { - resizeObserver.observe(ref.current); - } - }, [ref?.current]); - - const isLoading = width === 0 || height === 0; - - return { width, height, isLoading }; -}; +import useResizeObserver from 'use-resize-observer'; const useGetResourceDimensions = () => { const [w, setW] = useState(0); @@ -58,11 +38,10 @@ const useGetResourceDimensions = () => { }; const useGetCanvasStateDimensions = (ref?: React.RefObject) => { - const { - width, - height, - isLoading: isLoadingParentDimensions, - } = useObserveElementDimensions(ref); + const { width = 0, height = 0 } = useResizeObserver({ ref }); + + const isLoadingParentDimensions = width === 0 || height === 0; + const { onResourceLoad, isLoading: isLoadingResourceDimensions, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8dad6dc..33afdd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -278,6 +278,9 @@ importers: use-image: specifier: ^1.1.1 version: 1.1.1(react-dom@18.2.0)(react@18.2.0) + use-resize-observer: + specifier: ^9.1.0 + version: 9.1.0(react-dom@18.2.0)(react@18.2.0) devDependencies: '@changesets/changelog-github': specifier: ^0.5.0 @@ -3139,6 +3142,10 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@juggle/resize-observer@3.4.0: + resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} + dev: false + /@lit-labs/ssr-dom-shim@1.1.2: resolution: {integrity: sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==} @@ -13843,6 +13850,17 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /use-resize-observer@9.1.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-R25VqO9Wb3asSD4eqtcxk8sJalvIOYBqS8MNZlpDSQ4l4xMQxC/J7Id9HoTqPq8FwULIn0PVW+OAqF2dyYbjow==} + peerDependencies: + react: 16.8.0 - 18 + react-dom: 16.8.0 - 18 + dependencies: + '@juggle/resize-observer': 3.4.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /use-sidecar@1.1.2(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} engines: {node: '>=10'} From f2f751451e7c9fd547c845e6b874f58e761ef8e7 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Sat, 13 Apr 2024 17:43:13 +0000 Subject: [PATCH 04/21] chore: format --- packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index 9e7a4f9..1a69a70 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -10,9 +10,9 @@ import React, { useEffect, useMemo } from 'react'; import { useCallback, useState } from 'react'; import { css, cx } from 'styled-system/css'; import useImage from 'use-image'; +import useResizeObserver from 'use-resize-observer'; import { Skeleton } from '../ui/skeleton.js'; import { INHERIT_RENDER_CONTEXT } from './consts.js'; -import useResizeObserver from 'use-resize-observer'; const useGetResourceDimensions = () => { const [w, setW] = useState(0); From 682e06570c345fe6ae26ad46000371b47421aa9a Mon Sep 17 00:00:00 2001 From: Yuri Date: Sat, 13 Apr 2024 19:44:47 +0200 Subject: [PATCH 05/21] v++ --- .changeset/tame-horses-smile.md | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/tame-horses-smile.md diff --git a/.changeset/tame-horses-smile.md b/.changeset/tame-horses-smile.md new file mode 100644 index 0000000..af56bfc --- /dev/null +++ b/.changeset/tame-horses-smile.md @@ -0,0 +1,6 @@ +--- +'@rmrk-team/nft-renderer': patch +'@rmrk-team/rmrk-2d-renderer': patch +--- + +Use use-resize-observer package instead of a custom hook diff --git a/README.md b/README.md index a1f5abe..2e8d3e2 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ This project uses [Biome.js](https://biomejs.dev) for code formatting (instead o Build all packages and generate a new changeset -When submitting a PR with a change that requires a new version, please run `pnpm changesets` and select appropriate type of version bump (major, minor or patch if none is selected). When PR is merged, the new version will be automatically published to npm +When submitting a PR with a change that requires a new version, please run `pnpm changeset` and select appropriate type of version bump (major, minor or patch if none is selected). When PR is merged, the new version will be automatically published to npm ## Credits: From b84d8dd5569de6c8fd706f865817e7055bbc55d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 13 Apr 2024 17:48:45 +0000 Subject: [PATCH 06/21] chore: version packages --- .changeset/tame-horses-smile.md | 6 ------ packages/nft-renderer/CHANGELOG.md | 10 ++++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-2d-renderer/CHANGELOG.md | 6 ++++++ packages/rmrk-2d-renderer/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 7 +++++++ packages/rmrk-hooks/package.json | 2 +- 7 files changed, 26 insertions(+), 9 deletions(-) delete mode 100644 .changeset/tame-horses-smile.md diff --git a/.changeset/tame-horses-smile.md b/.changeset/tame-horses-smile.md deleted file mode 100644 index af56bfc..0000000 --- a/.changeset/tame-horses-smile.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rmrk-team/nft-renderer': patch -'@rmrk-team/rmrk-2d-renderer': patch ---- - -Use use-resize-observer package instead of a custom hook diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 8cd1989..3aafa14 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,15 @@ # @rmrk-team/nft-renderer +## 0.2.1 + +### Patch Changes + +- [`682e065`](https://github.com/rmrk-team/rmrk-js/commit/682e06570c345fe6ae26ad46000371b47421aa9a) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Use use-resize-observer package instead of a custom hook + +- Updated dependencies [[`682e065`](https://github.com/rmrk-team/rmrk-js/commit/682e06570c345fe6ae26ad46000371b47421aa9a)]: + - @rmrk-team/rmrk-2d-renderer@0.1.1 + - @rmrk-team/rmrk-hooks@0.2.1 + ## 0.2.0 ### Minor Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index ee61644..e86038e 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.2.0", + "version": "0.2.1", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-2d-renderer/CHANGELOG.md b/packages/rmrk-2d-renderer/CHANGELOG.md index fa4b920..ce977d1 100644 --- a/packages/rmrk-2d-renderer/CHANGELOG.md +++ b/packages/rmrk-2d-renderer/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/rmrk-2d-renderer +## 0.1.1 + +### Patch Changes + +- [`682e065`](https://github.com/rmrk-team/rmrk-js/commit/682e06570c345fe6ae26ad46000371b47421aa9a) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Use use-resize-observer package instead of a custom hook + ## 0.1.0 ### Minor Changes diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 72ba7d9..005c8f8 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -3,7 +3,7 @@ "description": "React Pixi (Canvas) renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.0", + "version": "0.1.1", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index abde698..0ef5c6c 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,12 @@ # @rmrk-team/rmrk-hooks +## 0.2.1 + +### Patch Changes + +- Updated dependencies [[`682e065`](https://github.com/rmrk-team/rmrk-js/commit/682e06570c345fe6ae26ad46000371b47421aa9a)]: + - @rmrk-team/rmrk-2d-renderer@0.1.1 + ## 0.2.0 ### Minor Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index ef73638..76fe8aa 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.2.0", + "version": "0.2.1", "private": false, "access": "public", "repository": { From d86a276bbdd19e3b5d84638e4b44c6fbbe3da5e3 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 19 Apr 2024 14:52:32 +0200 Subject: [PATCH 07/21] Ship esm compliant imports --- packages/nft-renderer/package.json | 2 +- packages/nft-renderer/panda.config.ts | 3 ++- packages/nft-renderer/src/components/nft-renderer.tsx | 2 +- packages/nft-renderer/tsconfig.build.json | 5 +---- packages/nft-renderer/tsconfig.json | 2 +- packages/rmrk-2d-renderer/package.json | 4 ++-- packages/rmrk-2d-renderer/panda.config.ts | 4 +++- packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx | 3 ++- packages/rmrk-2d-renderer/tsconfig.build.json | 5 +---- 9 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index e86038e..eadfad2 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -16,7 +16,7 @@ "build:misc": "pnpm copy:styled-system && tsc-alias -p tsconfig.build.json", "build:postcss": "postcss -o dist/esm/styles/index.css src/styles/index.css", "build:panda": "panda cssgen --outfile dist/styles.css", - "copy:styled-system": "copyfiles ./styled-system/**/*.mjs ./styled-system/*.mjs dist/esm", + "copy:styled-system": "copyfiles --up 1 ./src/styled-system/**/*.js ./src/styled-system/*.js dist/esm", "prepare": "panda codegen", "dev": "pnpm --workspace-concurrency=1 run build:esm+types --watch && pnpm run build:misc --watch && pnpm run build:panda --watch", "clean": "rm -rf dist tsconfig.tsbuildinfo actions chains connectors query", diff --git a/packages/nft-renderer/panda.config.ts b/packages/nft-renderer/panda.config.ts index 6969414..ea2e4c2 100644 --- a/packages/nft-renderer/panda.config.ts +++ b/packages/nft-renderer/panda.config.ts @@ -15,8 +15,9 @@ export default defineConfig({ theme: { extend: {}, }, + outExtension: 'js', // The output directory for your css system - outdir: 'styled-system', + outdir: 'src/styled-system', jsxFramework: 'react', }); diff --git a/packages/nft-renderer/src/components/nft-renderer.tsx b/packages/nft-renderer/src/components/nft-renderer.tsx index 8ccb1cc..7c6873f 100644 --- a/packages/nft-renderer/src/components/nft-renderer.tsx +++ b/packages/nft-renderer/src/components/nft-renderer.tsx @@ -9,7 +9,7 @@ import { useRMRKConfig, } from '@rmrk-team/rmrk-hooks'; import React, { useEffect, useRef, useState } from 'react'; -import { css } from 'styled-system/css'; +import { css } from '../styled-system/css/css.js'; import { isAddress } from 'viem'; import type { Address } from 'viem'; import { usePublicClient, useReadContract } from 'wagmi'; diff --git a/packages/nft-renderer/tsconfig.build.json b/packages/nft-renderer/tsconfig.build.json index 340d2e6..3617638 100644 --- a/packages/nft-renderer/tsconfig.build.json +++ b/packages/nft-renderer/tsconfig.build.json @@ -11,10 +11,7 @@ "composite": true, "outDir": "./dist/esm", "rootDir": "src", - "declarationDir": "./dist/types", - "paths": { - "styled-system/css": ["./styled-system/css"], - } + "declarationDir": "./dist/types" }, "references": [ { diff --git a/packages/nft-renderer/tsconfig.json b/packages/nft-renderer/tsconfig.json index baed4a9..6ed6c42 100644 --- a/packages/nft-renderer/tsconfig.json +++ b/packages/nft-renderer/tsconfig.json @@ -4,5 +4,5 @@ "jsx": "react-jsx" }, "include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts"], - "exclude": [] + "exclude": [], } diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 005c8f8..74f7574 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -13,10 +13,10 @@ }, "scripts": { "build": "pnpm run clean && pnpm prepare && pnpm run build:esm+types", - "build:esm+types": "pnpm build:postcss && tsc -b tsconfig.build.json --declaration --declarationMap && pnpm copy:styled-system && tsc-alias -p tsconfig.build.json && pnpm build:panda", + "build:esm+types": "pnpm build:postcss && tsc -b tsconfig.build.json --declaration --declarationMap && pnpm copy:styled-system && pnpm build:panda", "build:postcss": "postcss -o dist/esm/styles/index.css src/styles/index.css", "build:panda": "panda cssgen --outfile dist/styles.css", - "copy:styled-system": "copyfiles ./styled-system/**/*.mjs ./styled-system/*.mjs dist/esm", + "copy:styled-system": "copyfiles --up 1 ./src/styled-system/**/*.js ./src/styled-system/*.js dist/esm", "prepare": "panda codegen", "dev": "pnpm run build:esm+types --watch", "clean": "rm -rf dist tsconfig.tsbuildinfo actions chains connectors query", diff --git a/packages/rmrk-2d-renderer/panda.config.ts b/packages/rmrk-2d-renderer/panda.config.ts index 26d31e5..594aff7 100644 --- a/packages/rmrk-2d-renderer/panda.config.ts +++ b/packages/rmrk-2d-renderer/panda.config.ts @@ -8,6 +8,8 @@ export default defineConfig({ // Where to look for your css declarations include: ['./src/**/*.{js,jsx,ts,tsx}'], + outExtension: 'js', + // Files to exclude exclude: [], @@ -17,6 +19,6 @@ export default defineConfig({ }, // The output directory for your css system - outdir: 'styled-system', + outdir: 'src/styled-system', jsxFramework: 'react', }); diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index 1a69a70..9cfa000 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -8,7 +8,8 @@ import type { ICanvas } from 'pixi.js'; import type { CSSProperties } from 'react'; import React, { useEffect, useMemo } from 'react'; import { useCallback, useState } from 'react'; -import { css, cx } from 'styled-system/css'; +import { css } from '../styled-system/css/css.js'; +import { cx } from '../styled-system/css/cx.js'; import useImage from 'use-image'; import useResizeObserver from 'use-resize-observer'; import { Skeleton } from '../ui/skeleton.js'; diff --git a/packages/rmrk-2d-renderer/tsconfig.build.json b/packages/rmrk-2d-renderer/tsconfig.build.json index 8e6267c..9e32505 100644 --- a/packages/rmrk-2d-renderer/tsconfig.build.json +++ b/packages/rmrk-2d-renderer/tsconfig.build.json @@ -11,10 +11,7 @@ "composite": true, "outDir": "./dist/esm", "rootDir": "src", - "declarationDir": "./dist/types", - "paths": { - "styled-system/css": ["./styled-system/css"], - } + "declarationDir": "./dist/types" }, "references": [ { From a47e4b4a691f8e52fd0a13e0002712b642ceb111 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 19 Apr 2024 15:00:33 +0200 Subject: [PATCH 08/21] Update deps --- apps/composable-nft-renderer-app/package.json | 10 +- packages/nft-renderer/package.json | 14 +- packages/rmrk-evm-utils/package.json | 10 +- packages/rmrk-hooks/package.json | 14 +- pnpm-lock.yaml | 252 ++++++++++-------- 5 files changed, 162 insertions(+), 138 deletions(-) diff --git a/apps/composable-nft-renderer-app/package.json b/apps/composable-nft-renderer-app/package.json index 5392658..1c85e48 100644 --- a/apps/composable-nft-renderer-app/package.json +++ b/apps/composable-nft-renderer-app/package.json @@ -12,19 +12,19 @@ "dependencies": { "@ark-ui/anatomy": "^1.2.0", "@ark-ui/react": "^1.2.1", - "@rainbow-me/rainbowkit": "^2.0.0-beta.1", + "@rainbow-me/rainbowkit": "^2.0.5", "@rmrk-team/nft-renderer": "workspace:*", "@rmrk-team/rmrk-2d-renderer": "workspace:*", "@rmrk-team/rmrk-evm-utils": "workspace:*", "@rmrk-team/rmrk-hooks": "workspace:*", - "@tanstack/react-query": "^5.17.12", + "@tanstack/react-query": "^5.29.2", "canvas": "^2.11.2", "lucide-react": "^0.303.0", "next": "13.4.1", "react": "18.2.0", "react-dom": "18.2.0", - "viem": "^2.5.0", - "wagmi": "^2.5.1" + "viem": "^2.9.23", + "wagmi": "^2.5.20" }, "devDependencies": { "@pandacss/dev": "^0.27.0", @@ -35,7 +35,7 @@ "@typescript-eslint/eslint-plugin": "5.58.0", "@typescript-eslint/parser": "5.58.0", "@zag-js/select": "^0.32.0", - "abitype": "^0.10.3", + "abitype": "^1.0.2", "eslint": "8.53.0", "eslint-config-next": "14.0.1", "eslint-config-prettier": "8.10.0", diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index eadfad2..73cd525 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -62,7 +62,7 @@ "@types/react": "18.2.33", "@types/react-dom": "18.2.14", "@vitejs/plugin-react": "^4.1.0", - "@wagmi/core": "^2.6.0", + "@wagmi/core": "^2.6.17", "copyfiles": "^2.4.1", "postcss": "^8.4.33", "postcss-cli": "^11.0.0", @@ -70,18 +70,18 @@ "react-dom": "18.2.0", "tsc-alias": "^1.8.8", "typescript": "^5.4.2", - "viem": "^2.5.0", + "viem": "^2.9.23", "vite": "^4.4.9", - "wagmi": "^2.5.1" + "wagmi": "^2.5.20" }, "peerDependencies": { - "@tanstack/react-query": ">=5.17.12", + "@tanstack/react-query": ">=5.29.2", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": ">=5.4.2", - "viem": ">=2.5.0", - "wagmi": ">=2.5.1", - "@wagmi/core": "^2.6.0" + "viem": ">=2.9.23", + "wagmi": ">=2.5.20", + "@wagmi/core": "^2.6.17" }, "license": "MIT", "authors": [ diff --git a/packages/rmrk-evm-utils/package.json b/packages/rmrk-evm-utils/package.json index e747d56..8697da5 100644 --- a/packages/rmrk-evm-utils/package.json +++ b/packages/rmrk-evm-utils/package.json @@ -43,20 +43,20 @@ "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.27.1", "@types/node": "18.16.9", - "abitype": "^0.10.3", + "abitype": "^1.0.2", "dotenv": "^16.3.2", "install": "^0.13.0", "pnpm": "^8.14.1", "ts-node": "10.9.1", "typescript": "^5.4.2", - "viem": "^2.5.0", - "wagmi": "^2.5.1", + "viem": "^2.9.23", + "wagmi": "^2.5.20", "zod": "^3.22.4" }, "peerDependencies": { "typescript": ">=5.4.2", - "viem": ">=2.5.0", - "wagmi": ">=2.5.1" + "viem": ">=2.9.23", + "wagmi": ">=2.5.20" }, "license": "MIT", "authors": [ diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index 76fe8aa..2f928d2 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -54,28 +54,28 @@ "devDependencies": { "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.27.1", - "@tanstack/react-query": "^5.17.12", + "@tanstack/react-query": "^5.29.2", "@types/node": "18.16.9", "@types/ramda": "^0.29.10", "@types/react": "18.2.33", "@types/react-dom": "18.2.14", "@vitejs/plugin-react": "^4.1.0", - "abitype": "^0.10.3", + "abitype": "^1.0.2", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "^5.4.2", - "viem": "^2.5.0", + "viem": "^2.9.23", "vite": "^4.4.9", - "wagmi": "^2.5.1" + "wagmi": "^2.5.20" }, "peerDependencies": { - "@tanstack/react-query": ">=5.17.12", + "@tanstack/react-query": ">=5.29.2", "abitype": ">=0.10.3", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": ">=5.4.2", - "viem": ">=2.5.0", - "wagmi": ">=2.5.1" + "viem": ">=2.9.23", + "wagmi": ">=2.5.20" }, "license": "MIT", "authors": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33afdd5..4802c2f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,8 @@ importers: specifier: ^1.2.1 version: 1.2.1(@internationalized/date@3.5.1)(react-dom@18.2.0)(react@18.2.0) '@rainbow-me/rainbowkit': - specifier: ^2.0.0-beta.1 - version: 2.0.0-beta.1(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.5.0)(wagmi@2.5.1) + specifier: ^2.0.5 + version: 2.0.5(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.9.23)(wagmi@2.5.20) '@rmrk-team/nft-renderer': specifier: workspace:* version: link:../../packages/nft-renderer @@ -84,8 +84,8 @@ importers: specifier: workspace:* version: link:../../packages/rmrk-hooks '@tanstack/react-query': - specifier: ^5.17.12 - version: 5.17.12(react@18.2.0) + specifier: ^5.29.2 + version: 5.29.2(react@18.2.0) canvas: specifier: ^2.11.2 version: 2.11.2 @@ -102,11 +102,11 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) viem: - specifier: ^2.5.0 - version: 2.5.0(typescript@5.4.2)(zod@3.22.4) + specifier: ^2.9.23 + version: 2.9.23(typescript@5.4.2)(zod@3.22.4) wagmi: - specifier: ^2.5.1 - version: 2.5.1(@tanstack/react-query@5.17.12)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0) + specifier: ^2.5.20 + version: 2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) devDependencies: '@pandacss/dev': specifier: ^0.27.0 @@ -133,8 +133,8 @@ importers: specifier: ^0.32.0 version: 0.32.0 abitype: - specifier: ^0.10.3 - version: 0.10.3(typescript@5.4.2)(zod@3.22.4) + specifier: ^1.0.2 + version: 1.0.2(typescript@5.4.2)(zod@3.22.4) eslint: specifier: 8.53.0 version: 8.53.0 @@ -186,7 +186,7 @@ importers: dependencies: '@rainbow-me/rainbowkit': specifier: ^2.0.0-beta.0 - version: 2.0.0-beta.1(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.5.0)(wagmi@2.5.1) + version: 2.0.0-beta.1(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.9.23)(wagmi@2.5.20) '@rmrk-team/ipfs-utils': specifier: workspace:* version: link:../ipfs-utils @@ -200,8 +200,8 @@ importers: specifier: workspace:* version: link:../rmrk-hooks '@tanstack/react-query': - specifier: '>=5.17.12' - version: 5.17.12(react@18.2.0) + specifier: '>=5.29.2' + version: 5.29.2(react@18.2.0) devDependencies: '@changesets/changelog-github': specifier: ^0.5.0 @@ -225,8 +225,8 @@ importers: specifier: ^4.1.0 version: 4.2.1(vite@4.5.1) '@wagmi/core': - specifier: ^2.6.0 - version: 2.6.0(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.5.0) + specifier: ^2.6.17 + version: 2.6.17(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.9.23) copyfiles: specifier: ^2.4.1 version: 2.4.1 @@ -249,14 +249,14 @@ importers: specifier: ^5.4.2 version: 5.4.2 viem: - specifier: ^2.5.0 - version: 2.5.0(typescript@5.4.2)(zod@3.22.4) + specifier: ^2.9.23 + version: 2.9.23(typescript@5.4.2)(zod@3.22.4) vite: specifier: ^4.4.9 version: 4.5.1(@types/node@18.16.9) wagmi: - specifier: ^2.5.1 - version: 2.5.1(@tanstack/react-query@5.17.12)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0) + specifier: ^2.5.20 + version: 2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) packages/rmrk-2d-renderer: dependencies: @@ -340,8 +340,8 @@ importers: specifier: 18.16.9 version: 18.16.9 abitype: - specifier: ^0.10.3 - version: 0.10.3(typescript@5.4.2)(zod@3.22.4) + specifier: ^1.0.2 + version: 1.0.2(typescript@5.4.2)(zod@3.22.4) dotenv: specifier: ^16.3.2 version: 16.3.2 @@ -358,11 +358,11 @@ importers: specifier: ^5.4.2 version: 5.4.2 viem: - specifier: ^2.5.0 - version: 2.5.0(typescript@5.4.2)(zod@3.22.4) + specifier: ^2.9.23 + version: 2.9.23(typescript@5.4.2)(zod@3.22.4) wagmi: - specifier: ^2.5.1 - version: 2.5.1(@tanstack/react-query@5.17.12)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4) + specifier: ^2.5.20 + version: 2.5.20(@tanstack/react-query@5.29.2)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4) zod: specifier: ^3.22.4 version: 3.22.4 @@ -407,8 +407,8 @@ importers: specifier: ^2.27.1 version: 2.27.1 '@tanstack/react-query': - specifier: ^5.17.12 - version: 5.17.12(react@18.2.0) + specifier: ^5.29.2 + version: 5.29.2(react@18.2.0) '@types/node': specifier: 18.16.9 version: 18.16.9 @@ -425,8 +425,8 @@ importers: specifier: ^4.1.0 version: 4.2.1(vite@4.5.1) abitype: - specifier: ^0.10.3 - version: 0.10.3(typescript@5.4.2)(zod@3.22.4) + specifier: ^1.0.2 + version: 1.0.2(typescript@5.4.2)(zod@3.22.4) react: specifier: 18.2.0 version: 18.2.0 @@ -437,14 +437,14 @@ importers: specifier: ^5.4.2 version: 5.4.2 viem: - specifier: ^2.5.0 - version: 2.5.0(typescript@5.4.2)(zod@3.22.4) + specifier: ^2.9.23 + version: 2.9.23(typescript@5.4.2)(zod@3.22.4) vite: specifier: ^4.4.9 version: 4.5.1(@types/node@18.16.9) wagmi: - specifier: ^2.5.1 - version: 2.5.1(@tanstack/react-query@5.17.12)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0) + specifier: ^2.5.20 + version: 2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) packages/types: dependencies: @@ -3267,8 +3267,8 @@ packages: resolution: {integrity: sha512-j6Z47VOmVyGMlnKXZmL0fyvWfEYtKWCA9yGZkU3FCsGZUT5lHGmvaV9JA5F2Y+010y7+ROtR3WMXIkvl/nVzqQ==} engines: {node: '>=12.0.0'} - /@metamask/sdk-communication-layer@0.14.1: - resolution: {integrity: sha512-K1KhkKMdAAPi079G/bX/cIazqT6qnkRnykrs7nA1sU2BouG7BYD4qPgv7ridc3BNIewnFg9eMzzYIgOgfXzJKw==} + /@metamask/sdk-communication-layer@0.14.3: + resolution: {integrity: sha512-yjSbj8y7fFbQXv2HBzUX6D9C8BimkCYP6BDV7hdw53W8b/GlYCtXVxUFajQ9tuO1xPTRjR/xt/dkdr2aCi6WGw==} dependencies: bufferutil: 4.0.8 cross-fetch: 3.1.8 @@ -3296,8 +3296,8 @@ packages: - '@types/react' - react-native - /@metamask/sdk@0.14.1(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1): - resolution: {integrity: sha512-52kfvnlyMXRO8/oPGoQOFMevSjgkLzpl8aGG6Ivx/6jiqSv5ScuOg6YdSWXR937Ts0zWE0V8KTUBMfnGGt0S9Q==} + /@metamask/sdk@0.14.3(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1): + resolution: {integrity: sha512-BYLs//nY2wioVSih78gOQI6sLIYY3vWkwVqXGYUgkBV+bi49bv+9S0m+hZ2cwiRaxfMYtKs0KvhAQ8weiYwDrg==} peerDependencies: react: ^18.2.0 react-native: '*' @@ -3310,7 +3310,7 @@ packages: '@metamask/onboarding': 1.0.1 '@metamask/post-message-stream': 6.2.0 '@metamask/providers': 10.2.1 - '@metamask/sdk-communication-layer': 0.14.1 + '@metamask/sdk-communication-layer': 0.14.3 '@metamask/sdk-install-modal-web': 0.14.1(@types/react@18.2.33)(react-native@0.73.2) '@react-native-async-storage/async-storage': 1.21.0(react-native@0.73.2) '@types/dom-screen-wake-lock': 1.0.3 @@ -4375,7 +4375,7 @@ packages: resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} dev: true - /@rainbow-me/rainbowkit@2.0.0-beta.1(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.5.0)(wagmi@2.5.1): + /@rainbow-me/rainbowkit@2.0.0-beta.1(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.9.23)(wagmi@2.5.20): resolution: {integrity: sha512-ahqf5wwHDWo0xBjZrH2uE1dLI4JsmPGTQW5yJvpMWaCGOR4MRZ8Uy7ytlKGhHva8FzlsBXhnNNwScLaiVss99Q==} engines: {node: '>=12.4'} peerDependencies: @@ -4394,8 +4394,32 @@ packages: react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.7(@types/react@18.2.33)(react@18.2.0) ua-parser-js: 1.0.37 - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) - wagmi: 2.5.1(@tanstack/react-query@5.17.12)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) + wagmi: 2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) + transitivePeerDependencies: + - '@types/react' + dev: false + + /@rainbow-me/rainbowkit@2.0.5(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0)(viem@2.9.23)(wagmi@2.5.20): + resolution: {integrity: sha512-JVBgl0J1EvYXrGxDJmqEVMFrjE3gGidHyacFilKu/zJdaHFGXogsmCG51DdaU3gsas0Aqbq9kqK13qk49VSfAg==} + engines: {node: '>=12.4'} + peerDependencies: + react: '>=17' + react-dom: '>=17' + viem: 2.x + wagmi: 2.x + dependencies: + '@vanilla-extract/css': 1.14.0 + '@vanilla-extract/dynamic': 2.1.0 + '@vanilla-extract/sprinkles': 1.6.1(@vanilla-extract/css@1.14.0) + clsx: 2.1.0 + qrcode: 1.5.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.7(@types/react@18.2.33)(react@18.2.0) + ua-parser-js: 1.0.37 + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) + wagmi: 2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) transitivePeerDependencies: - '@types/react' dev: false @@ -5097,15 +5121,15 @@ packages: dependencies: tslib: 2.6.2 - /@tanstack/query-core@5.17.10: - resolution: {integrity: sha512-bJ2oQUDBftvHcEkLS3gyzzShSeZpJyzNNRu8oHK13iNdsofyaDXtNO/c1Zy/PZYVX+PhqOXwoT42gMiEMRSSfQ==} + /@tanstack/query-core@5.29.0: + resolution: {integrity: sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==} - /@tanstack/react-query@5.17.12(react@18.2.0): - resolution: {integrity: sha512-mJQ+3da1ug4t9b+GycUuNzMs5hd6t+F4tJ1hqyaN/dlETP+bWwYwrv2GXFIbZIfI1K1Hu+XWZ6HUhRPbNtZ4QQ==} + /@tanstack/react-query@5.29.2(react@18.2.0): + resolution: {integrity: sha512-nyuWILR4u7H5moLGSiifLh8kIqQDLNOHGuSz0rcp+J75fNc8aQLyr5+I2JCHU3n+nJrTTW1ssgAD8HiKD7IFBQ==} peerDependencies: react: ^18.0.0 dependencies: - '@tanstack/query-core': 5.17.10 + '@tanstack/query-core': 5.29.0 react: 18.2.0 /@ts-morph/common@0.20.0: @@ -5644,10 +5668,10 @@ packages: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: true - /@wagmi/connectors@4.1.9(@types/react@18.2.33)(@wagmi/core@2.6.0)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0): - resolution: {integrity: sha512-4pz+oZemPW9JOmBmR0oq7pNJlR0oyLfaZMH4IfgATApumZ0uDlMLe6KY1JEbW202rHk0g+NNYYlJsSHYwhCCUg==} + /@wagmi/connectors@4.1.26(@types/react@18.2.33)(@wagmi/core@2.6.17)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23): + resolution: {integrity: sha512-0bANLzi4gZcszPnCj3l7+DPztCG+L+W1Zm/a02YmEh2MaQC/blBsbAdb2JALdW66HJJE8m4cNZjPJPTsS2/MQQ==} peerDependencies: - '@wagmi/core': 2.6.0 + '@wagmi/core': 2.6.17 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: @@ -5655,14 +5679,14 @@ packages: optional: true dependencies: '@coinbase/wallet-sdk': 3.9.1 - '@metamask/sdk': 0.14.1(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1) + '@metamask/sdk': 0.14.3(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1) '@safe-global/safe-apps-provider': 0.18.1(typescript@5.4.2)(zod@3.22.4) '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.2)(zod@3.22.4) - '@wagmi/core': 2.6.0(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.5.0) - '@walletconnect/ethereum-provider': 2.11.0(@types/react@18.2.33)(react@18.2.0) + '@wagmi/core': 2.6.17(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.9.23) + '@walletconnect/ethereum-provider': 2.11.2(@types/react@18.2.33)(react@18.2.0) '@walletconnect/modal': 2.6.2(@types/react@18.2.33)(react@18.2.0) typescript: 5.4.2 - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -5687,10 +5711,10 @@ packages: - utf-8-validate - zod - /@wagmi/connectors@4.1.9(@wagmi/core@2.6.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4): - resolution: {integrity: sha512-4pz+oZemPW9JOmBmR0oq7pNJlR0oyLfaZMH4IfgATApumZ0uDlMLe6KY1JEbW202rHk0g+NNYYlJsSHYwhCCUg==} + /@wagmi/connectors@4.1.26(@wagmi/core@2.6.17)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4): + resolution: {integrity: sha512-0bANLzi4gZcszPnCj3l7+DPztCG+L+W1Zm/a02YmEh2MaQC/blBsbAdb2JALdW66HJJE8m4cNZjPJPTsS2/MQQ==} peerDependencies: - '@wagmi/core': 2.6.0 + '@wagmi/core': 2.6.17 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: @@ -5698,14 +5722,14 @@ packages: optional: true dependencies: '@coinbase/wallet-sdk': 3.9.1 - '@metamask/sdk': 0.14.1(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1) + '@metamask/sdk': 0.14.3(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1) '@safe-global/safe-apps-provider': 0.18.1(typescript@5.4.2)(zod@3.22.4) '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.2)(zod@3.22.4) - '@wagmi/core': 2.6.0(react@18.2.0)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4) - '@walletconnect/ethereum-provider': 2.11.0(@types/react@18.2.33)(react@18.2.0) + '@wagmi/core': 2.6.17(react@18.2.0)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4) + '@walletconnect/ethereum-provider': 2.11.2(@types/react@18.2.33)(react@18.2.0) '@walletconnect/modal': 2.6.2(@types/react@18.2.33)(react@18.2.0) typescript: 5.4.2 - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -5731,8 +5755,8 @@ packages: - zod dev: true - /@wagmi/core@2.6.0(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.5.0): - resolution: {integrity: sha512-z/9lVFG+mCQnATtdS/rFsOLp/Kf3DlpBM5aiDAahwXG405BgXl5SdFt7HkLefFmEnVon7ZN8a1eExSPJGlaRlA==} + /@wagmi/core@2.6.17(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.9.23): + resolution: {integrity: sha512-Ghr7PlD5HO1YJrsaC52j/csgaigBAiTR7cFiwrY7WdwvWLsR5na4Dv6KfHTU3d3al0CKDLanQdRS5nB4mX1M+g==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' @@ -5746,7 +5770,7 @@ packages: eventemitter3: 5.0.1 mipd: 0.0.5(typescript@5.4.2)(zod@3.22.4) typescript: 5.4.2 - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) zustand: 4.4.1(@types/react@18.2.33)(react@18.2.0) transitivePeerDependencies: - '@types/react' @@ -5756,8 +5780,8 @@ packages: - utf-8-validate - zod - /@wagmi/core@2.6.0(react@18.2.0)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4): - resolution: {integrity: sha512-z/9lVFG+mCQnATtdS/rFsOLp/Kf3DlpBM5aiDAahwXG405BgXl5SdFt7HkLefFmEnVon7ZN8a1eExSPJGlaRlA==} + /@wagmi/core@2.6.17(react@18.2.0)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4): + resolution: {integrity: sha512-Ghr7PlD5HO1YJrsaC52j/csgaigBAiTR7cFiwrY7WdwvWLsR5na4Dv6KfHTU3d3al0CKDLanQdRS5nB4mX1M+g==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' @@ -5771,7 +5795,7 @@ packages: eventemitter3: 5.0.1 mipd: 0.0.5(typescript@5.4.2)(zod@3.22.4) typescript: 5.4.2 - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) zustand: 4.4.1(@types/react@18.2.33)(react@18.2.0) transitivePeerDependencies: - '@types/react' @@ -5782,8 +5806,8 @@ packages: - zod dev: true - /@walletconnect/core@2.11.0: - resolution: {integrity: sha512-2Tjp5BCevI7dbmqo/OrCjX4tqgMqwJNQLlQAlphqPfvwlF9+tIu6pGcVbSN3U9zyXzWIZCeleqEaWUeSeET4Ew==} + /@walletconnect/core@2.11.2: + resolution: {integrity: sha512-bB4SiXX8hX3/hyBfVPC5gwZCXCl+OPj+/EDVM71iAO3TDsh78KPbrVAbDnnsbHzZVHlsMohtXX3j5XVsheN3+g==} dependencies: '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-provider': 1.0.13 @@ -5796,8 +5820,8 @@ packages: '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/types': 2.11.2 + '@walletconnect/utils': 2.11.2 events: 3.3.0 isomorphic-unfetch: 3.1.0 lodash.isequal: 4.5.0 @@ -5825,18 +5849,18 @@ packages: dependencies: tslib: 1.14.1 - /@walletconnect/ethereum-provider@2.11.0(@types/react@18.2.33)(react@18.2.0): - resolution: {integrity: sha512-YrTeHVjuSuhlUw7SQ6xBJXDuJ6iAC+RwINm9nVhoKYJSHAy3EVSJZOofMKrnecL0iRMtD29nj57mxAInIBRuZA==} + /@walletconnect/ethereum-provider@2.11.2(@types/react@18.2.33)(react@18.2.0): + resolution: {integrity: sha512-BUDqee0Uy2rCZVkW5Ao3q6Ado/3fePYnFdryVF+YL6bPhj+xQZ5OfKodl+uvs7Rwq++O5wTX2RqOTzpW7+v+Mg==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/modal': 2.6.2(@types/react@18.2.33)(react@18.2.0) - '@walletconnect/sign-client': 2.11.0 - '@walletconnect/types': 2.11.0 - '@walletconnect/universal-provider': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/sign-client': 2.11.2 + '@walletconnect/types': 2.11.2 + '@walletconnect/universal-provider': 2.11.2 + '@walletconnect/utils': 2.11.2 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -5992,17 +6016,17 @@ packages: dependencies: tslib: 1.14.1 - /@walletconnect/sign-client@2.11.0: - resolution: {integrity: sha512-H2ukscibBS+6WrzQWh+WyVBqO5z4F5et12JcwobdwgHnJSlqIoZxqnUYYWNCI5rUR5UKsKWaUyto4AE9N5dw4Q==} + /@walletconnect/sign-client@2.11.2: + resolution: {integrity: sha512-MfBcuSz2GmMH+P7MrCP46mVE5qhP0ZyWA0FyIH6/WuxQ6G+MgKsGfaITqakpRPsykWOJq8tXMs3XvUPDU413OQ==} dependencies: - '@walletconnect/core': 2.11.0 + '@walletconnect/core': 2.11.2 '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/types': 2.11.2 + '@walletconnect/utils': 2.11.2 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -6027,8 +6051,8 @@ packages: dependencies: tslib: 1.14.1 - /@walletconnect/types@2.11.0: - resolution: {integrity: sha512-AB5b1lrEbCGHxqS2vqfCkIoODieH+ZAUp9rA1O2ftrhnqDJiJK983Df87JhYhECsQUBHHfALphA8ydER0q+9sw==} + /@walletconnect/types@2.11.2: + resolution: {integrity: sha512-p632MFB+lJbip2cvtXPBQslpUdiw1sDtQ5y855bOlAGquay+6fZ4h1DcDePeKQDQM3P77ax2a9aNPZxV6y/h1Q==} dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 @@ -6051,17 +6075,17 @@ packages: - '@vercel/kv' - supports-color - /@walletconnect/universal-provider@2.11.0: - resolution: {integrity: sha512-zgJv8jDvIMP4Qse/D9oIRXGdfoNqonsrjPZanQ/CHNe7oXGOBiQND2IIeX+tS0H7uNA0TPvctljCLiIN9nw4eA==} + /@walletconnect/universal-provider@2.11.2: + resolution: {integrity: sha512-cNtIn5AVoDxKAJ4PmB8m5adnf5mYQMUamEUPKMVvOPscfGtIMQEh9peKsh2AN5xcRVDbgluC01Id545evFyymw==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 - '@walletconnect/sign-client': 2.11.0 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/sign-client': 2.11.2 + '@walletconnect/types': 2.11.2 + '@walletconnect/utils': 2.11.2 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -6081,8 +6105,8 @@ packages: - supports-color - utf-8-validate - /@walletconnect/utils@2.11.0: - resolution: {integrity: sha512-hxkHPlTlDQILHfIKXlmzgNJau/YcSBC3XHUSuZuKZbNEw3duFT6h6pm3HT/1+j1a22IG05WDsNBuTCRkwss+BQ==} + /@walletconnect/utils@2.11.2: + resolution: {integrity: sha512-LyfdmrnZY6dWqlF4eDrx5jpUwsB2bEPjoqR5Z6rXPiHJKUOdJt7az+mNOn5KTSOlRpd1DmozrBrWr+G9fFLYVw==} dependencies: '@stablelib/chacha20poly1305': 1.0.1 '@stablelib/hkdf': 1.0.1 @@ -6092,7 +6116,7 @@ packages: '@walletconnect/relay-api': 1.0.9 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 + '@walletconnect/types': 2.11.2 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -6726,11 +6750,11 @@ packages: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: false - /abitype@0.10.3(typescript@5.4.2)(zod@3.22.4): - resolution: {integrity: sha512-tRN+7XIa7J9xugdbRzFv/95ka5ivR/sRe01eiWvM0HWWjHuigSZEACgKa0sj4wGuekTDtghCx+5Izk/cOi78pQ==} + /abitype@0.9.8(typescript@5.4.2)(zod@3.22.4): + resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.22.0 + zod: ^3 >=3.19.1 peerDependenciesMeta: typescript: optional: true @@ -6739,13 +6763,12 @@ packages: dependencies: typescript: 5.4.2 zod: 3.22.4 - dev: true - /abitype@0.9.8(typescript@5.4.2)(zod@3.22.4): - resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + /abitype@1.0.0(typescript@5.4.2)(zod@3.22.4): + resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.19.1 + zod: ^3 >=3.22.0 peerDependenciesMeta: typescript: optional: true @@ -6755,8 +6778,8 @@ packages: typescript: 5.4.2 zod: 3.22.4 - /abitype@1.0.0(typescript@5.4.2)(zod@3.22.4): - resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} + /abitype@1.0.2(typescript@5.4.2)(zod@3.22.4): + resolution: {integrity: sha512-aFt4k2H+eiAKy/zxtnORa9iIb10BMBeWL18l8v4+QuwYEBXPxxjSB1bFZCzQmKPoj8m7j68K705l3uY+E2gAjg==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -6768,6 +6791,7 @@ packages: dependencies: typescript: 5.4.2 zod: 3.22.4 + dev: true /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -13982,8 +14006,8 @@ packages: - utf-8-validate - zod - /viem@2.5.0(typescript@5.4.2)(zod@3.22.4): - resolution: {integrity: sha512-ytHXIWtlgPs4mcsGxXjJrQ25v+N4dE2hBzgCU8CVv4iXNh3PRFRgyYa7igZlmxiMVzkfSHHADOtivS980JhilA==} + /viem@2.9.23(typescript@5.4.2)(zod@3.22.4): + resolution: {integrity: sha512-KolNI8H8tNkOA6xkC5UnlQjoorJxk4F1F9h42pHnH9/CtrWG9Ka4xmAWwhO2xKNPA2sNsAsJLmedBsz2uvaQow==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -14170,8 +14194,8 @@ packages: dependencies: xml-name-validator: 5.0.0 - /wagmi@2.5.1(@tanstack/react-query@5.17.12)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0): - resolution: {integrity: sha512-ZDKz9B1hGH0R6GeRlBd6YAF9em5mK2D+A2LgKSMnlI3wDVlr+9hA4ej/rboCtmNMMnZ81/0xr77NG9H8sc1wyg==} + /wagmi@2.5.20(@tanstack/react-query@5.29.2)(@types/react@18.2.33)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23): + resolution: {integrity: sha512-K/9qk6+t/+NKFdbQyB7LtFgl3UXnGjvgyzAyfMQ+dF56uTSJipQwc94CSlN8kdQXTIOvhUSK2P7WJrdTEd15AA==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' @@ -14181,13 +14205,13 @@ packages: typescript: optional: true dependencies: - '@tanstack/react-query': 5.17.12(react@18.2.0) - '@wagmi/connectors': 4.1.9(@types/react@18.2.33)(@wagmi/core@2.6.0)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0) - '@wagmi/core': 2.6.0(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.5.0) + '@tanstack/react-query': 5.29.2(react@18.2.0) + '@wagmi/connectors': 4.1.26(@types/react@18.2.33)(@wagmi/core@2.6.17)(react-dom@18.2.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23) + '@wagmi/core': 2.6.17(@types/react@18.2.33)(react@18.2.0)(typescript@5.4.2)(viem@2.9.23) react: 18.2.0 typescript: 5.4.2 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -14213,8 +14237,8 @@ packages: - utf-8-validate - zod - /wagmi@2.5.1(@tanstack/react-query@5.17.12)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4): - resolution: {integrity: sha512-ZDKz9B1hGH0R6GeRlBd6YAF9em5mK2D+A2LgKSMnlI3wDVlr+9hA4ej/rboCtmNMMnZ81/0xr77NG9H8sc1wyg==} + /wagmi@2.5.20(@tanstack/react-query@5.29.2)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4): + resolution: {integrity: sha512-K/9qk6+t/+NKFdbQyB7LtFgl3UXnGjvgyzAyfMQ+dF56uTSJipQwc94CSlN8kdQXTIOvhUSK2P7WJrdTEd15AA==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' @@ -14224,13 +14248,13 @@ packages: typescript: optional: true dependencies: - '@tanstack/react-query': 5.17.12(react@18.2.0) - '@wagmi/connectors': 4.1.9(@wagmi/core@2.6.0)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4) - '@wagmi/core': 2.6.0(react@18.2.0)(typescript@5.4.2)(viem@2.5.0)(zod@3.22.4) + '@tanstack/react-query': 5.29.2(react@18.2.0) + '@wagmi/connectors': 4.1.26(@wagmi/core@2.6.17)(react-native@0.73.2)(react@18.2.0)(rollup@2.79.1)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4) + '@wagmi/core': 2.6.17(react@18.2.0)(typescript@5.4.2)(viem@2.9.23)(zod@3.22.4) react: 18.2.0 typescript: 5.4.2 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 2.5.0(typescript@5.4.2)(zod@3.22.4) + viem: 2.9.23(typescript@5.4.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' From a1cfe3b5d7b19ba5eac03c1be3a475753053b425 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 19 Apr 2024 15:01:13 +0200 Subject: [PATCH 09/21] v++ --- .changeset/swift-books-kneel.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/swift-books-kneel.md diff --git a/.changeset/swift-books-kneel.md b/.changeset/swift-books-kneel.md new file mode 100644 index 0000000..4b49791 --- /dev/null +++ b/.changeset/swift-books-kneel.md @@ -0,0 +1,10 @@ +--- +'@rmrk-team/ipfs-utils': patch +'@rmrk-team/nft-renderer': patch +'@rmrk-team/rmrk-2d-renderer': patch +'@rmrk-team/rmrk-evm-utils': patch +'@rmrk-team/rmrk-hooks': patch +'@rmrk-team/types': patch +--- + +Improve esm export and update all deps From 24537fb0378df46d19fd2cffb400abfa895ead81 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Fri, 19 Apr 2024 13:02:17 +0000 Subject: [PATCH 10/21] chore: format --- packages/nft-renderer/src/components/nft-renderer.tsx | 2 +- packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nft-renderer/src/components/nft-renderer.tsx b/packages/nft-renderer/src/components/nft-renderer.tsx index 7c6873f..b4cb2e6 100644 --- a/packages/nft-renderer/src/components/nft-renderer.tsx +++ b/packages/nft-renderer/src/components/nft-renderer.tsx @@ -9,11 +9,11 @@ import { useRMRKConfig, } from '@rmrk-team/rmrk-hooks'; import React, { useEffect, useRef, useState } from 'react'; -import { css } from '../styled-system/css/css.js'; import { isAddress } from 'viem'; import type { Address } from 'viem'; import { usePublicClient, useReadContract } from 'wagmi'; import type { Chain } from 'wagmi/chains'; +import { css } from '../styled-system/css/css.js'; import type { RenderPart } from '../types/types.js'; const useIsAddressAContract = ({ diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index 9cfa000..4480508 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -8,10 +8,10 @@ import type { ICanvas } from 'pixi.js'; import type { CSSProperties } from 'react'; import React, { useEffect, useMemo } from 'react'; import { useCallback, useState } from 'react'; -import { css } from '../styled-system/css/css.js'; -import { cx } from '../styled-system/css/cx.js'; import useImage from 'use-image'; import useResizeObserver from 'use-resize-observer'; +import { css } from '../styled-system/css/css.js'; +import { cx } from '../styled-system/css/cx.js'; import { Skeleton } from '../ui/skeleton.js'; import { INHERIT_RENDER_CONTEXT } from './consts.js'; From 5000dbf1ab67763a9cca9aa92372264ba36fa11b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Apr 2024 13:04:07 +0000 Subject: [PATCH 11/21] chore: version packages --- .changeset/swift-books-kneel.md | 10 ---------- packages/ipfs-utils/CHANGELOG.md | 9 +++++++++ packages/ipfs-utils/package.json | 2 +- packages/nft-renderer/CHANGELOG.md | 12 ++++++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-2d-renderer/CHANGELOG.md | 9 +++++++++ packages/rmrk-2d-renderer/package.json | 2 +- packages/rmrk-evm-utils/CHANGELOG.md | 6 ++++++ packages/rmrk-evm-utils/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 12 ++++++++++++ packages/rmrk-hooks/package.json | 2 +- packages/types/CHANGELOG.md | 6 ++++++ packages/types/package.json | 2 +- 13 files changed, 60 insertions(+), 16 deletions(-) delete mode 100644 .changeset/swift-books-kneel.md diff --git a/.changeset/swift-books-kneel.md b/.changeset/swift-books-kneel.md deleted file mode 100644 index 4b49791..0000000 --- a/.changeset/swift-books-kneel.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@rmrk-team/ipfs-utils': patch -'@rmrk-team/nft-renderer': patch -'@rmrk-team/rmrk-2d-renderer': patch -'@rmrk-team/rmrk-evm-utils': patch -'@rmrk-team/rmrk-hooks': patch -'@rmrk-team/types': patch ---- - -Improve esm export and update all deps diff --git a/packages/ipfs-utils/CHANGELOG.md b/packages/ipfs-utils/CHANGELOG.md index 152c2b2..2677284 100644 --- a/packages/ipfs-utils/CHANGELOG.md +++ b/packages/ipfs-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # @rmrk-team/ipfs-utils +## 0.1.1 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + +- Updated dependencies [[`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425)]: + - @rmrk-team/types@0.1.1 + ## 0.1.0 ### Minor Changes diff --git a/packages/ipfs-utils/package.json b/packages/ipfs-utils/package.json index 154591a..b87c9d7 100644 --- a/packages/ipfs-utils/package.json +++ b/packages/ipfs-utils/package.json @@ -3,7 +3,7 @@ "description": "IPFS utils for RMRK NFTs", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.0", + "version": "0.1.1", "private": false, "access": "public", "repository": { diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 3aafa14..8c518bd 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,17 @@ # @rmrk-team/nft-renderer +## 0.2.2 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + +- Updated dependencies [[`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425)]: + - @rmrk-team/ipfs-utils@0.1.1 + - @rmrk-team/rmrk-2d-renderer@0.1.2 + - @rmrk-team/rmrk-evm-utils@0.1.2 + - @rmrk-team/rmrk-hooks@0.2.2 + ## 0.2.1 ### Patch Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index 73cd525..b02818c 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.2.1", + "version": "0.2.2", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-2d-renderer/CHANGELOG.md b/packages/rmrk-2d-renderer/CHANGELOG.md index ce977d1..4627a04 100644 --- a/packages/rmrk-2d-renderer/CHANGELOG.md +++ b/packages/rmrk-2d-renderer/CHANGELOG.md @@ -1,5 +1,14 @@ # @rmrk-team/rmrk-2d-renderer +## 0.1.2 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + +- Updated dependencies [[`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425)]: + - @rmrk-team/ipfs-utils@0.1.1 + ## 0.1.1 ### Patch Changes diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 74f7574..1e381c0 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -3,7 +3,7 @@ "description": "React Pixi (Canvas) renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.1", + "version": "0.1.2", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-evm-utils/CHANGELOG.md b/packages/rmrk-evm-utils/CHANGELOG.md index 27122d3..303d65d 100644 --- a/packages/rmrk-evm-utils/CHANGELOG.md +++ b/packages/rmrk-evm-utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/rmrk-evm-utils +## 0.1.2 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + ## 0.1.1 ### Patch Changes diff --git a/packages/rmrk-evm-utils/package.json b/packages/rmrk-evm-utils/package.json index 8697da5..c3520be 100644 --- a/packages/rmrk-evm-utils/package.json +++ b/packages/rmrk-evm-utils/package.json @@ -3,7 +3,7 @@ "description": "Typescript utilities and actions for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.1", + "version": "0.1.2", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index 0ef5c6c..9a9b20a 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,17 @@ # @rmrk-team/rmrk-hooks +## 0.2.2 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + +- Updated dependencies [[`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425)]: + - @rmrk-team/ipfs-utils@0.1.1 + - @rmrk-team/rmrk-2d-renderer@0.1.2 + - @rmrk-team/rmrk-evm-utils@0.1.2 + - @rmrk-team/types@0.1.1 + ## 0.2.1 ### Patch Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index 2f928d2..3dad36d 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.2.1", + "version": "0.2.2", "private": false, "access": "public", "repository": { diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 10f96d5..6b0faf1 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/types +## 0.1.1 + +### Patch Changes + +- [`a1cfe3b`](https://github.com/rmrk-team/rmrk-js/commit/a1cfe3b5d7b19ba5eac03c1be3a475753053b425) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Improve esm export and update all deps + ## 0.1.0 ### Minor Changes diff --git a/packages/types/package.json b/packages/types/package.json index 496a029..4a6fe14 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -3,7 +3,7 @@ "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", "description": "Types to be used in combination with other packages of the RMRK EVM monorepo", - "version": "0.1.0", + "version": "0.1.1", "private": false, "access": "public", "repository": { From e5e1e99ec533fc3924be8f51f68f5c99edbda6a9 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 11:57:30 +0200 Subject: [PATCH 12/21] Don't try to sanitize blob urls in 2d renderer --- .../ipfs-utils/src/lib/fetch-ipfs-metadata.ts | 16 +++++++++------- packages/ipfs-utils/src/lib/ipfs.ts | 4 ++++ .../src/lib/hooks/use-fetch-ipfs-metadata.ts | 13 ++++++++----- .../src/lib/hooks/use-fetch-ipfs-metadatas.ts | 13 ++++++++----- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts b/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts index dcb97ab..49dfe81 100644 --- a/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts +++ b/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts @@ -8,12 +8,16 @@ import { } from './ipfs.js'; import { isBase64Metadata } from './is-base-64-metadata.js'; +type Options = { + shouldSanitizeIpfsUrls?: boolean; + ipfsGatewayUrl?: string +}; + export const fetchIpfsMetadata = async ( metadataUri?: string | null, - ipfsGatewayUrl = DEFAULT_IPFS_GATEWAY_URLS[ - DEFAULT_IPFS_GATEWAY_KEYS.cloudflare - ], + options?: Options ): Promise => { + const { shouldSanitizeIpfsUrls = true, ipfsGatewayUrl = DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.pinata] } = options || {}; if (metadataUri && isBase64Metadata(metadataUri)) { return JSON.parse(getBase64Value(metadataUri)); // TODO: validation } @@ -25,16 +29,14 @@ export const fetchIpfsMetadata = async ( const { animation_url, image, external_url, ...restMetadata } = metadata || {}; - const primaryMedia = - animation_url || (metadata as Metadata)?.mediaUri || image; const thumbnail = (metadata as Metadata)?.thumbnailUri || (animation_url ? image : ''); if (provider) { return { ...restMetadata, - mediaUri: sanitizeIpfsUrl(primaryMedia || '', provider), - thumbnailUri: sanitizeIpfsUrl(thumbnail || '', provider), + mediaUri: shouldSanitizeIpfsUrls ? sanitizeIpfsUrl((metadata as Metadata)?.mediaUri || '', provider) : (metadata as Metadata)?.mediaUri, + thumbnailUri: shouldSanitizeIpfsUrls ? sanitizeIpfsUrl(thumbnail || '', provider) : thumbnail, externalUri: (metadata as Metadata).externalUri || external_url, }; } diff --git a/packages/ipfs-utils/src/lib/ipfs.ts b/packages/ipfs-utils/src/lib/ipfs.ts index 295c3bf..bc01d41 100644 --- a/packages/ipfs-utils/src/lib/ipfs.ts +++ b/packages/ipfs-utils/src/lib/ipfs.ts @@ -108,5 +108,9 @@ export const sanitizeIpfsUrl = ( ); } + if (ipfsUrl.startsWith('blob:')) { + return ipfsUrl; + } + return ''; }; diff --git a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts index 6f4cce3..b8b37a6 100644 --- a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts +++ b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts @@ -8,7 +8,7 @@ import { useRMRKConfig } from '../RMRKContextProvider.js'; type Props = { metadataUri: string | undefined; ipfsGatewayUrl?: string }; -type Options = { enabled?: boolean }; +type Options = { enabled?: boolean, shouldSanitizeIpfsUrls?: boolean; }; /** * Fetches IPFS metadata and returns the result using React Query's `useQuery` hook. @@ -24,15 +24,18 @@ export const useFetchIpfsMetadata = ( options?: Options, ) => { const rmrkConfig = useRMRKConfig(); - const { enabled = true } = options || {}; + const { enabled = true, shouldSanitizeIpfsUrls = true } = options || {}; return useQuery({ queryKey: ['fetchIpfsMetadata', metadataUri], queryFn: () => { return fetchIpfsMetadata( metadataUri, - ipfsGatewayUrl || - rmrkConfig?.ipfsGateway || - DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + { + ipfsGatewayUrl: ipfsGatewayUrl || + rmrkConfig?.ipfsGateway || + DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + shouldSanitizeIpfsUrls + } ); }, enabled, diff --git a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts index a27ffdf..ab3beb9 100644 --- a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts +++ b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts @@ -12,7 +12,7 @@ type Props = { ipfsGatewayUrl?: string; }; -type Options = { enabled?: boolean }; +type Options = { enabled?: boolean, shouldSanitizeIpfsUrls?: boolean; }; /** * A custom hook that fetches IPFS metadata for the given URIs. @@ -32,7 +32,7 @@ export const useFetchIpfsMetadatas = ( options?: Options, ) => { const rmrkConfig = useRMRKConfig(); - const { enabled = true } = options || {}; + const { enabled = true, shouldSanitizeIpfsUrls = true } = options || {}; const results = useQueries({ queries: (metadataUris || []).map((metadataUri) => ({ @@ -40,9 +40,12 @@ export const useFetchIpfsMetadatas = ( queryFn: () => fetchIpfsMetadata( metadataUri, - ipfsGatewayUrl || - rmrkConfig?.ipfsGateway || - DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + { + ipfsGatewayUrl: ipfsGatewayUrl || + rmrkConfig?.ipfsGateway || + DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + shouldSanitizeIpfsUrls + } ), enabled, })), From d7bf85039ab8900c3192e94452aef0b5f0d0c2a4 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Mon, 22 Apr 2024 09:58:07 +0000 Subject: [PATCH 13/21] chore: format --- .../ipfs-utils/src/lib/fetch-ipfs-metadata.ts | 19 ++++++++++++++----- .../src/lib/hooks/use-fetch-ipfs-metadata.ts | 18 ++++++++---------- .../src/lib/hooks/use-fetch-ipfs-metadatas.ts | 18 ++++++++---------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts b/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts index 49dfe81..1c132e2 100644 --- a/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts +++ b/packages/ipfs-utils/src/lib/fetch-ipfs-metadata.ts @@ -10,14 +10,19 @@ import { isBase64Metadata } from './is-base-64-metadata.js'; type Options = { shouldSanitizeIpfsUrls?: boolean; - ipfsGatewayUrl?: string + ipfsGatewayUrl?: string; }; export const fetchIpfsMetadata = async ( metadataUri?: string | null, - options?: Options + options?: Options, ): Promise => { - const { shouldSanitizeIpfsUrls = true, ipfsGatewayUrl = DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.pinata] } = options || {}; + const { + shouldSanitizeIpfsUrls = true, + ipfsGatewayUrl = DEFAULT_IPFS_GATEWAY_URLS[ + DEFAULT_IPFS_GATEWAY_KEYS.pinata + ], + } = options || {}; if (metadataUri && isBase64Metadata(metadataUri)) { return JSON.parse(getBase64Value(metadataUri)); // TODO: validation } @@ -35,8 +40,12 @@ export const fetchIpfsMetadata = async ( if (provider) { return { ...restMetadata, - mediaUri: shouldSanitizeIpfsUrls ? sanitizeIpfsUrl((metadata as Metadata)?.mediaUri || '', provider) : (metadata as Metadata)?.mediaUri, - thumbnailUri: shouldSanitizeIpfsUrls ? sanitizeIpfsUrl(thumbnail || '', provider) : thumbnail, + mediaUri: shouldSanitizeIpfsUrls + ? sanitizeIpfsUrl((metadata as Metadata)?.mediaUri || '', provider) + : (metadata as Metadata)?.mediaUri, + thumbnailUri: shouldSanitizeIpfsUrls + ? sanitizeIpfsUrl(thumbnail || '', provider) + : thumbnail, externalUri: (metadata as Metadata).externalUri || external_url, }; } diff --git a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts index b8b37a6..568c50c 100644 --- a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts +++ b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadata.ts @@ -8,7 +8,7 @@ import { useRMRKConfig } from '../RMRKContextProvider.js'; type Props = { metadataUri: string | undefined; ipfsGatewayUrl?: string }; -type Options = { enabled?: boolean, shouldSanitizeIpfsUrls?: boolean; }; +type Options = { enabled?: boolean; shouldSanitizeIpfsUrls?: boolean }; /** * Fetches IPFS metadata and returns the result using React Query's `useQuery` hook. @@ -28,15 +28,13 @@ export const useFetchIpfsMetadata = ( return useQuery({ queryKey: ['fetchIpfsMetadata', metadataUri], queryFn: () => { - return fetchIpfsMetadata( - metadataUri, - { - ipfsGatewayUrl: ipfsGatewayUrl || - rmrkConfig?.ipfsGateway || - DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], - shouldSanitizeIpfsUrls - } - ); + return fetchIpfsMetadata(metadataUri, { + ipfsGatewayUrl: + ipfsGatewayUrl || + rmrkConfig?.ipfsGateway || + DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + shouldSanitizeIpfsUrls, + }); }, enabled, }); diff --git a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts index ab3beb9..55ad892 100644 --- a/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts +++ b/packages/rmrk-hooks/src/lib/hooks/use-fetch-ipfs-metadatas.ts @@ -12,7 +12,7 @@ type Props = { ipfsGatewayUrl?: string; }; -type Options = { enabled?: boolean, shouldSanitizeIpfsUrls?: boolean; }; +type Options = { enabled?: boolean; shouldSanitizeIpfsUrls?: boolean }; /** * A custom hook that fetches IPFS metadata for the given URIs. @@ -38,15 +38,13 @@ export const useFetchIpfsMetadatas = ( queries: (metadataUris || []).map((metadataUri) => ({ queryKey: ['fetchIpfsMetadata', metadataUri], queryFn: () => - fetchIpfsMetadata( - metadataUri, - { - ipfsGatewayUrl: ipfsGatewayUrl || - rmrkConfig?.ipfsGateway || - DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], - shouldSanitizeIpfsUrls - } - ), + fetchIpfsMetadata(metadataUri, { + ipfsGatewayUrl: + ipfsGatewayUrl || + rmrkConfig?.ipfsGateway || + DEFAULT_IPFS_GATEWAY_URLS[DEFAULT_IPFS_GATEWAY_KEYS.cloudflare], + shouldSanitizeIpfsUrls, + }), enabled, })), }); From f52a1a5376fa7e5b4c04773042e7da49fd9ad012 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 11:58:22 +0200 Subject: [PATCH 14/21] v++ --- .changeset/sour-olives-report.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/sour-olives-report.md diff --git a/.changeset/sour-olives-report.md b/.changeset/sour-olives-report.md new file mode 100644 index 0000000..d72e2a2 --- /dev/null +++ b/.changeset/sour-olives-report.md @@ -0,0 +1,8 @@ +--- +'@rmrk-team/ipfs-utils': patch +'@rmrk-team/nft-renderer': patch +'@rmrk-team/rmrk-2d-renderer': patch +'@rmrk-team/rmrk-hooks': patch +--- + +Don't sanitize blob: uris in ipfs utils From 11cb7ca4655de53322b5950d5236b0d7fcfe993e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Apr 2024 10:00:59 +0000 Subject: [PATCH 15/21] chore: version packages --- .changeset/sour-olives-report.md | 8 -------- packages/ipfs-utils/CHANGELOG.md | 6 ++++++ packages/ipfs-utils/package.json | 2 +- packages/nft-renderer/CHANGELOG.md | 11 +++++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-2d-renderer/CHANGELOG.md | 9 +++++++++ packages/rmrk-2d-renderer/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 10 ++++++++++ packages/rmrk-hooks/package.json | 2 +- 9 files changed, 40 insertions(+), 12 deletions(-) delete mode 100644 .changeset/sour-olives-report.md diff --git a/.changeset/sour-olives-report.md b/.changeset/sour-olives-report.md deleted file mode 100644 index d72e2a2..0000000 --- a/.changeset/sour-olives-report.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@rmrk-team/ipfs-utils': patch -'@rmrk-team/nft-renderer': patch -'@rmrk-team/rmrk-2d-renderer': patch -'@rmrk-team/rmrk-hooks': patch ---- - -Don't sanitize blob: uris in ipfs utils diff --git a/packages/ipfs-utils/CHANGELOG.md b/packages/ipfs-utils/CHANGELOG.md index 2677284..23e493d 100644 --- a/packages/ipfs-utils/CHANGELOG.md +++ b/packages/ipfs-utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/ipfs-utils +## 0.1.2 + +### Patch Changes + +- [`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Don't sanitize blob: uris in ipfs utils + ## 0.1.1 ### Patch Changes diff --git a/packages/ipfs-utils/package.json b/packages/ipfs-utils/package.json index b87c9d7..8d7e254 100644 --- a/packages/ipfs-utils/package.json +++ b/packages/ipfs-utils/package.json @@ -3,7 +3,7 @@ "description": "IPFS utils for RMRK NFTs", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.1", + "version": "0.1.2", "private": false, "access": "public", "repository": { diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 8c518bd..3d13d8e 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,16 @@ # @rmrk-team/nft-renderer +## 0.2.3 + +### Patch Changes + +- [`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Don't sanitize blob: uris in ipfs utils + +- Updated dependencies [[`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012)]: + - @rmrk-team/ipfs-utils@0.1.2 + - @rmrk-team/rmrk-2d-renderer@0.1.3 + - @rmrk-team/rmrk-hooks@0.2.3 + ## 0.2.2 ### Patch Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index b02818c..ed2ce63 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.2.2", + "version": "0.2.3", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-2d-renderer/CHANGELOG.md b/packages/rmrk-2d-renderer/CHANGELOG.md index 4627a04..afe6a76 100644 --- a/packages/rmrk-2d-renderer/CHANGELOG.md +++ b/packages/rmrk-2d-renderer/CHANGELOG.md @@ -1,5 +1,14 @@ # @rmrk-team/rmrk-2d-renderer +## 0.1.3 + +### Patch Changes + +- [`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Don't sanitize blob: uris in ipfs utils + +- Updated dependencies [[`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012)]: + - @rmrk-team/ipfs-utils@0.1.2 + ## 0.1.2 ### Patch Changes diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 1e381c0..42ab56a 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -3,7 +3,7 @@ "description": "React Pixi (Canvas) renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.2", + "version": "0.1.3", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index 9a9b20a..4cad35d 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,15 @@ # @rmrk-team/rmrk-hooks +## 0.2.3 + +### Patch Changes + +- [`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - Don't sanitize blob: uris in ipfs utils + +- Updated dependencies [[`f52a1a5`](https://github.com/rmrk-team/rmrk-js/commit/f52a1a5376fa7e5b4c04773042e7da49fd9ad012)]: + - @rmrk-team/ipfs-utils@0.1.2 + - @rmrk-team/rmrk-2d-renderer@0.1.3 + ## 0.2.2 ### Patch Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index 3dad36d..96a7dc5 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.2.2", + "version": "0.2.3", "private": false, "access": "public", "repository": { From 895565aa3ad706cca6818db1dbab940029a0d5e2 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 12:20:43 +0200 Subject: [PATCH 16/21] fix: clear extractImageTimeout timeout on onMount --- .../src/lib/rmrk-2d-renderer.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index 4480508..651a3ac 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -5,7 +5,7 @@ import DOMPurify from 'isomorphic-dompurify'; import { Loader2 } from 'lucide-react'; import { Application, Resource, Texture } from 'pixi.js'; import type { ICanvas } from 'pixi.js'; -import type { CSSProperties } from 'react'; +import { type CSSProperties, useRef } from 'react'; import React, { useEffect, useMemo } from 'react'; import { useCallback, useState } from 'react'; import useImage from 'use-image'; @@ -73,18 +73,28 @@ const useBackdropImage = ( // Get image from canvas to apply as a backdrop background const extractImage = async (pixiApp: Application) => { - const blob = await pixiApp.renderer.extract.image(pixiApp.stage); - setBgImage(blob.src); + if (pixiApp.stage) { + const blob = await pixiApp.renderer.extract.image(pixiApp.stage); + setBgImage(blob.src); + } }; + const extractImageTimeout = useRef(); + // Get image from canvas to apply as a backdrop background useEffect(() => { if (!bgImage && !!pixiApp && enabled) { // Wait for the canvas to be rendered - setTimeout(() => { + extractImageTimeout.current = setTimeout(() => { extractImage(pixiApp); }, 600); } + + return () => { + if (extractImageTimeout.current) { + clearTimeout(extractImageTimeout.current); + } + }; }, [pixiApp, enabled, bgImage, extractImage]); return bgImage; From e69102aaad38c0bd720639dbb4cb022e796d152a Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 12:21:17 +0200 Subject: [PATCH 17/21] v++ --- .changeset/green-ants-destroy.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/green-ants-destroy.md diff --git a/.changeset/green-ants-destroy.md b/.changeset/green-ants-destroy.md new file mode 100644 index 0000000..c8234d6 --- /dev/null +++ b/.changeset/green-ants-destroy.md @@ -0,0 +1,6 @@ +--- +'@rmrk-team/nft-renderer': patch +'@rmrk-team/rmrk-2d-renderer': patch +--- + +fix: clear extractImageTimeout timeout on unmount From 2e0149c8702820f330b8015121afb7697b6871ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Apr 2024 10:23:59 +0000 Subject: [PATCH 18/21] chore: version packages --- .changeset/green-ants-destroy.md | 6 ------ packages/nft-renderer/CHANGELOG.md | 10 ++++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-2d-renderer/CHANGELOG.md | 6 ++++++ packages/rmrk-2d-renderer/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 7 +++++++ packages/rmrk-hooks/package.json | 2 +- 7 files changed, 26 insertions(+), 9 deletions(-) delete mode 100644 .changeset/green-ants-destroy.md diff --git a/.changeset/green-ants-destroy.md b/.changeset/green-ants-destroy.md deleted file mode 100644 index c8234d6..0000000 --- a/.changeset/green-ants-destroy.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rmrk-team/nft-renderer': patch -'@rmrk-team/rmrk-2d-renderer': patch ---- - -fix: clear extractImageTimeout timeout on unmount diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 3d13d8e..672a9db 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,15 @@ # @rmrk-team/nft-renderer +## 0.2.4 + +### Patch Changes + +- [`e69102a`](https://github.com/rmrk-team/rmrk-js/commit/e69102aaad38c0bd720639dbb4cb022e796d152a) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - fix: clear extractImageTimeout timeout on unmount + +- Updated dependencies [[`e69102a`](https://github.com/rmrk-team/rmrk-js/commit/e69102aaad38c0bd720639dbb4cb022e796d152a)]: + - @rmrk-team/rmrk-2d-renderer@0.1.4 + - @rmrk-team/rmrk-hooks@0.2.4 + ## 0.2.3 ### Patch Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index ed2ce63..91034ef 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.2.3", + "version": "0.2.4", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-2d-renderer/CHANGELOG.md b/packages/rmrk-2d-renderer/CHANGELOG.md index afe6a76..34705cb 100644 --- a/packages/rmrk-2d-renderer/CHANGELOG.md +++ b/packages/rmrk-2d-renderer/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/rmrk-2d-renderer +## 0.1.4 + +### Patch Changes + +- [`e69102a`](https://github.com/rmrk-team/rmrk-js/commit/e69102aaad38c0bd720639dbb4cb022e796d152a) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - fix: clear extractImageTimeout timeout on unmount + ## 0.1.3 ### Patch Changes diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index 42ab56a..ef35996 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -3,7 +3,7 @@ "description": "React Pixi (Canvas) renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.3", + "version": "0.1.4", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index 4cad35d..e1890cd 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,12 @@ # @rmrk-team/rmrk-hooks +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`e69102a`](https://github.com/rmrk-team/rmrk-js/commit/e69102aaad38c0bd720639dbb4cb022e796d152a)]: + - @rmrk-team/rmrk-2d-renderer@0.1.4 + ## 0.2.3 ### Patch Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index 96a7dc5..aa05357 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.2.3", + "version": "0.2.4", "private": false, "access": "public", "repository": { From 661c169362fdd90f2287686adda1aa2a28e70d88 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 17:53:18 +0200 Subject: [PATCH 19/21] fix: all urls should come pre-sanitized to 2d renderer --- packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx index 651a3ac..cf786a9 100644 --- a/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx +++ b/packages/rmrk-2d-renderer/src/lib/rmrk-2d-renderer.tsx @@ -1,5 +1,4 @@ import { Container, Sprite, Stage, useApp } from '@pixi/react'; -import { sanitizeIpfsUrl } from '@rmrk-team/ipfs-utils'; import DOMPurify from 'isomorphic-dompurify'; // import { Skeleton } from './ui/skeleton'; import { Loader2 } from 'lucide-react'; @@ -283,8 +282,7 @@ const useCreateResourceTexture = ( onLoad: (w: number, h: number) => void, theme?: Record, ) => { - const url = sanitizeIpfsUrl(src); - const [image] = (useImage as unknown as useImage)(url, 'anonymous'); + const [image] = (useImage as unknown as useImage)(src, 'anonymous'); useEffect(() => { if (image) { @@ -297,7 +295,7 @@ const useCreateResourceTexture = ( useEffect(() => { const downloadImage = async () => { - const response = await fetch(url); + const response = await fetch(src); const contentType = response.headers.get('content-type'); const code = await response.text(); @@ -348,14 +346,14 @@ const useCreateResourceTexture = ( } }; - if (url && theme) { + if (src && theme) { downloadImage(); } if (image && !theme) { setResourceTexture(Texture.from(image)); } - }, [url, image, theme]); + }, [src, image, theme]); return resourceTexture; }; From ca64edc69e805f0ea9f83b4df654bc5cf2579535 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 22 Apr 2024 17:53:52 +0200 Subject: [PATCH 20/21] Create three-pumpkins-pay.md --- .changeset/three-pumpkins-pay.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/three-pumpkins-pay.md diff --git a/.changeset/three-pumpkins-pay.md b/.changeset/three-pumpkins-pay.md new file mode 100644 index 0000000..c6f0db1 --- /dev/null +++ b/.changeset/three-pumpkins-pay.md @@ -0,0 +1,5 @@ +--- +'@rmrk-team/rmrk-2d-renderer': patch +--- + +All urls should come pre-sanitized to 2d renderer From eaecc50a1c62ef46576834132f45f37f833a0b13 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Apr 2024 15:56:37 +0000 Subject: [PATCH 21/21] chore: version packages --- .changeset/three-pumpkins-pay.md | 5 ----- packages/nft-renderer/CHANGELOG.md | 8 ++++++++ packages/nft-renderer/package.json | 2 +- packages/rmrk-2d-renderer/CHANGELOG.md | 6 ++++++ packages/rmrk-2d-renderer/package.json | 2 +- packages/rmrk-hooks/CHANGELOG.md | 7 +++++++ packages/rmrk-hooks/package.json | 2 +- 7 files changed, 24 insertions(+), 8 deletions(-) delete mode 100644 .changeset/three-pumpkins-pay.md diff --git a/.changeset/three-pumpkins-pay.md b/.changeset/three-pumpkins-pay.md deleted file mode 100644 index c6f0db1..0000000 --- a/.changeset/three-pumpkins-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rmrk-team/rmrk-2d-renderer': patch ---- - -All urls should come pre-sanitized to 2d renderer diff --git a/packages/nft-renderer/CHANGELOG.md b/packages/nft-renderer/CHANGELOG.md index 672a9db..52bf293 100644 --- a/packages/nft-renderer/CHANGELOG.md +++ b/packages/nft-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @rmrk-team/nft-renderer +## 0.2.5 + +### Patch Changes + +- Updated dependencies [[`ca64edc`](https://github.com/rmrk-team/rmrk-js/commit/ca64edc69e805f0ea9f83b4df654bc5cf2579535)]: + - @rmrk-team/rmrk-2d-renderer@0.1.5 + - @rmrk-team/rmrk-hooks@0.2.5 + ## 0.2.4 ### Patch Changes diff --git a/packages/nft-renderer/package.json b/packages/nft-renderer/package.json index 91034ef..0dc2c6c 100644 --- a/packages/nft-renderer/package.json +++ b/packages/nft-renderer/package.json @@ -2,7 +2,7 @@ "name": "@rmrk-team/nft-renderer", "description": "React NFT renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", - "version": "0.2.4", + "version": "0.2.5", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-2d-renderer/CHANGELOG.md b/packages/rmrk-2d-renderer/CHANGELOG.md index 34705cb..1d586d2 100644 --- a/packages/rmrk-2d-renderer/CHANGELOG.md +++ b/packages/rmrk-2d-renderer/CHANGELOG.md @@ -1,5 +1,11 @@ # @rmrk-team/rmrk-2d-renderer +## 0.1.5 + +### Patch Changes + +- [`ca64edc`](https://github.com/rmrk-team/rmrk-js/commit/ca64edc69e805f0ea9f83b4df654bc5cf2579535) Thanks [@Yuripetusko](https://github.com/Yuripetusko)! - All urls should come pre-sanitized to 2d renderer + ## 0.1.4 ### Patch Changes diff --git a/packages/rmrk-2d-renderer/package.json b/packages/rmrk-2d-renderer/package.json index ef35996..c119470 100644 --- a/packages/rmrk-2d-renderer/package.json +++ b/packages/rmrk-2d-renderer/package.json @@ -3,7 +3,7 @@ "description": "React Pixi (Canvas) renderer for multi layered composable NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.1.4", + "version": "0.1.5", "private": false, "access": "public", "repository": { diff --git a/packages/rmrk-hooks/CHANGELOG.md b/packages/rmrk-hooks/CHANGELOG.md index e1890cd..040d525 100644 --- a/packages/rmrk-hooks/CHANGELOG.md +++ b/packages/rmrk-hooks/CHANGELOG.md @@ -1,5 +1,12 @@ # @rmrk-team/rmrk-hooks +## 0.2.5 + +### Patch Changes + +- Updated dependencies [[`ca64edc`](https://github.com/rmrk-team/rmrk-js/commit/ca64edc69e805f0ea9f83b4df654bc5cf2579535)]: + - @rmrk-team/rmrk-2d-renderer@0.1.5 + ## 0.2.4 ### Patch Changes diff --git a/packages/rmrk-hooks/package.json b/packages/rmrk-hooks/package.json index aa05357..0584dd6 100644 --- a/packages/rmrk-hooks/package.json +++ b/packages/rmrk-hooks/package.json @@ -3,7 +3,7 @@ "description": "React hooks for working with NFTs built on RMRK standards", "bugs": "https://github.com/rmrk-team/rmrk-js/issues", "homepage": "https://github.com/rmrk-team/rmrk-js", - "version": "0.2.4", + "version": "0.2.5", "private": false, "access": "public", "repository": {