diff --git a/.changeset/detail-rhythm-grid-gap.md b/.changeset/detail-rhythm-grid-gap.md deleted file mode 100644 index f4db14f..0000000 --- a/.changeset/detail-rhythm-grid-gap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@evmnow/contract-reader': patch ---- - -The action detail's vertical rhythm is now owned entirely by its grid gap (`--cr-action-detail-gap`) instead of a mix of gap and per-block margins. Grid auto-rows don't reliably include child margins in track sizing — a margined block (e.g. a custom `_component` card) could overflow its row and swallow the next section's spacing, making the gap above the source link inconsistent. Child margins inside `.cr-action-detail` are now neutralized, and every section — results, previews, custom components — gets the same separation. Tune spacing via `--cr-action-detail-gap`. diff --git a/.changeset/sdk-0-7-0-upgrade.md b/.changeset/sdk-0-7-0-upgrade.md deleted file mode 100644 index 34c1ed0..0000000 --- a/.changeset/sdk-0-7-0-upgrade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@evmnow/contract-reader': patch ---- - -Upgrade @evmnow/sdk to ^0.7.0: fixed Sourcify v2 integration (runtimeBytecode), chain-scoped metadata repository lookups, hardened merge/ENS/address handling, and new modular exports. diff --git a/.changeset/wave1-correctness-security-a11y.md b/.changeset/wave1-correctness-security-a11y.md deleted file mode 100644 index da9401c..0000000 --- a/.changeset/wave1-correctness-security-a11y.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@evmnow/contract-reader': patch ---- - -A round of correctness, security, performance, accessibility and packaging fixes across the reader: - -- Reads are now guarded by a request-generation counter (and action details are keyed per action), so switching actions while a read is in flight can no longer write a stale result or error into the new action's view. -- Malformed `min`/`max` bounds in payable value validation metadata no longer throw and break rendering — unparseable bounds are ignored. A non-empty transaction value that doesn't parse as ETH now shows a visible error and disables sending even without a metadata validation rule. -- `writeContractFunction` string values are now always ETH-denominated (`"1"` used to be treated as 1 wei while `"1.5"` was 1.5 ETH); bigints remain wei. -- Token info is keyed by lowercased address on both write and read, so checksummed metadata addresses resolve the same entry, and concurrent token metadata lookups are deduplicated in flight. -- Amount-like tuple members now render the same human-decimal amount input that arg building scales on submit, instead of silently multiplying raw input by 10^decimals. -- External metadata URLs are scheme-allowlisted (`https:`/`http:`/`data:image/*`) before binding into `img`/`iframe`/`a` sinks, and metadata-supplied validation regexes are length-capped and compiled once (invalid patterns are ignored) to mitigate ReDoS. -- Shiki (and the solidity grammar) now loads lazily when a source view first renders instead of shipping in the initial chunk, and token metadata gateway fetches time out after 15s instead of hanging forever. -- Inputs are associated with real labels and expose `aria-describedby`/`aria-invalid`; read results/errors announce via a polite live region; card expanders expose `aria-expanded`/`aria-controls`; preview toggles expose `aria-pressed`; the copy button shows a brief failed state when clipboard access is denied. -- Packaging: `nuxt`/`vue` are declared as peer dependencies, `viem` moved to a caret range compatible with `@wagmi/core`'s peer range, and the deep import into the wallet layer's ENS cache is isolated behind a single adapter module. diff --git a/.changeset/wave2-reader-view-orchestration.md b/.changeset/wave2-reader-view-orchestration.md deleted file mode 100644 index 6de6050..0000000 --- a/.changeset/wave2-reader-view-orchestration.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@evmnow/contract-reader': minor ---- - -New public composables and a component that extract generic reader orchestration out of consuming apps: - -- `useContractReaderView` — the shared reader-page orchestration: tab derivation from the ABI, view-state mapping over `useReaderQueryState`, wallet-gated action filtering, function source selection, overview stat links, and read-error bookkeeping (including clearing call errors on navigation and refetching metadata off discrete chain-id/RPC watch sources). Hosts wire it to their own wallet/metadata configuration and keep only branding and layout in the page. -- `useTokenAmountMeta` — token metadata resolution for amount-like params: resolves token identity (decimals/symbol, lowercased-address keyed, in-flight deduplicated) and connected-wallet balances, and derives per-input amount rendering/parsing info. -- `ActionResultPanel` (`components/Action/ResultPanel.vue`) — the read-result live region previously inlined in `ActionDetail`, rendering loading/fields/single-value/error states with the `address` slot passthrough. - -`ActionDetail` and the playground/reader pages now consume these; behavior is unchanged. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3752262..c78b089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ Generated from individual package changelogs — do not edit manually. ## 2026-07-06 +- **Minor** New public composables and a component that extract generic reader orchestration out of consuming apps: [`5100264`](https://github.com/evmnow/dapp/commit/5100264) + - `useContractReaderView` — the shared reader-page orchestration: tab derivation from the ABI, view-state mapping over `useReaderQueryState`, wallet-gated action filtering, function source selection, overview stat links, and read-error bookkeeping (including clearing call errors on navigation and refetching metadata off discrete chain-id/RPC watch sources). Hosts wire it to their own wallet/metadata configuration and keep only branding and layout in the page. + - `useTokenAmountMeta` — token metadata resolution for amount-like params: resolves token identity (decimals/symbol, lowercased-address keyed, in-flight deduplicated) and connected-wallet balances, and derives per-input amount rendering/parsing info. + - `ActionResultPanel` (`components/Action/ResultPanel.vue`) — the read-result live region previously inlined in `ActionDetail`, rendering loading/fields/single-value/error states with the `address` slot passthrough. + `ActionDetail` and the playground/reader pages now consume these; behavior is unchanged. + _`contract-reader`_ + +- The action detail's vertical rhythm is now owned entirely by its grid gap (`--cr-action-detail-gap`) instead of a mix of gap and per-block margins. Grid auto-rows don't reliably include child margins in track sizing — a margined block (e.g. a custom `_component` card) could overflow its row and swallow the next section's spacing, making the gap above the source link inconsistent. Child margins inside `.cr-action-detail` are now neutralized, and every section — results, previews, custom components — gets the same separation. Tune spacing via `--cr-action-detail-gap`. [`99aa30a`](https://github.com/evmnow/dapp/commit/99aa30a) + _`contract-reader`_ + - **Minor** Host-extensibility release — everything a consuming app previously had to work around is now a first-class API: [`ccec8b0`](https://github.com/evmnow/dapp/commit/ccec8b0) - **msg.value is exposed**: a new `value-field` slot (with `value`/`setValue`/`meta`/`label`/`disabled`/`error` scope) lets hosts render their own payable-value input, and the `actions` slot scope now includes `value` (ETH string) and `valueWei` for confirmation previews. - **Tuple-aware `field` slot**: the slot scope now exposes the full input record (`values`, `errors`, `setValue`) plus the resolved `amount` info, so hosts can render tuple members and amount inputs over layer state instead of mirroring it. diff --git a/packages/contract-reader/CHANGELOG.md b/packages/contract-reader/CHANGELOG.md index 2a9d4bf..60dec9d 100644 --- a/packages/contract-reader/CHANGELOG.md +++ b/packages/contract-reader/CHANGELOG.md @@ -1,5 +1,35 @@ # @evmnow/contract-reader +## 0.8.0 + +### Minor Changes + +- [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7) Thanks [@jwahdatehagh](https://github.com/jwahdatehagh)! - New public composables and a component that extract generic reader orchestration out of consuming apps: + + - `useContractReaderView` — the shared reader-page orchestration: tab derivation from the ABI, view-state mapping over `useReaderQueryState`, wallet-gated action filtering, function source selection, overview stat links, and read-error bookkeeping (including clearing call errors on navigation and refetching metadata off discrete chain-id/RPC watch sources). Hosts wire it to their own wallet/metadata configuration and keep only branding and layout in the page. + - `useTokenAmountMeta` — token metadata resolution for amount-like params: resolves token identity (decimals/symbol, lowercased-address keyed, in-flight deduplicated) and connected-wallet balances, and derives per-input amount rendering/parsing info. + - `ActionResultPanel` (`components/Action/ResultPanel.vue`) — the read-result live region previously inlined in `ActionDetail`, rendering loading/fields/single-value/error states with the `address` slot passthrough. + + `ActionDetail` and the playground/reader pages now consume these; behavior is unchanged. + +### Patch Changes + +- [`99aa30a`](https://github.com/evmnow/dapp/commit/99aa30a69b11ad6a2c26b4df0a522e16ca652410) Thanks [@jwahdatehagh](https://github.com/jwahdatehagh)! - The action detail's vertical rhythm is now owned entirely by its grid gap (`--cr-action-detail-gap`) instead of a mix of gap and per-block margins. Grid auto-rows don't reliably include child margins in track sizing — a margined block (e.g. a custom `_component` card) could overflow its row and swallow the next section's spacing, making the gap above the source link inconsistent. Child margins inside `.cr-action-detail` are now neutralized, and every section — results, previews, custom components — gets the same separation. Tune spacing via `--cr-action-detail-gap`. + +- [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7) Thanks [@jwahdatehagh](https://github.com/jwahdatehagh)! - Upgrade @evmnow/sdk to ^0.7.0: fixed Sourcify v2 integration (runtimeBytecode), chain-scoped metadata repository lookups, hardened merge/ENS/address handling, and new modular exports. + +- [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7) Thanks [@jwahdatehagh](https://github.com/jwahdatehagh)! - A round of correctness, security, performance, accessibility and packaging fixes across the reader: + + - Reads are now guarded by a request-generation counter (and action details are keyed per action), so switching actions while a read is in flight can no longer write a stale result or error into the new action's view. + - Malformed `min`/`max` bounds in payable value validation metadata no longer throw and break rendering — unparseable bounds are ignored. A non-empty transaction value that doesn't parse as ETH now shows a visible error and disables sending even without a metadata validation rule. + - `writeContractFunction` string values are now always ETH-denominated (`"1"` used to be treated as 1 wei while `"1.5"` was 1.5 ETH); bigints remain wei. + - Token info is keyed by lowercased address on both write and read, so checksummed metadata addresses resolve the same entry, and concurrent token metadata lookups are deduplicated in flight. + - Amount-like tuple members now render the same human-decimal amount input that arg building scales on submit, instead of silently multiplying raw input by 10^decimals. + - External metadata URLs are scheme-allowlisted (`https:`/`http:`/`data:image/*`) before binding into `img`/`iframe`/`a` sinks, and metadata-supplied validation regexes are length-capped and compiled once (invalid patterns are ignored) to mitigate ReDoS. + - Shiki (and the solidity grammar) now loads lazily when a source view first renders instead of shipping in the initial chunk, and token metadata gateway fetches time out after 15s instead of hanging forever. + - Inputs are associated with real labels and expose `aria-describedby`/`aria-invalid`; read results/errors announce via a polite live region; card expanders expose `aria-expanded`/`aria-controls`; preview toggles expose `aria-pressed`; the copy button shows a brief failed state when clipboard access is denied. + - Packaging: `nuxt`/`vue` are declared as peer dependencies, `viem` moved to a caret range compatible with `@wagmi/core`'s peer range, and the deep import into the wallet layer's ENS cache is isolated behind a single adapter module. + ## 0.7.0 ### Minor Changes diff --git a/packages/contract-reader/package.json b/packages/contract-reader/package.json index c3eb42a..26995a7 100644 --- a/packages/contract-reader/package.json +++ b/packages/contract-reader/package.json @@ -1,7 +1,7 @@ { "name": "@evmnow/contract-reader", "type": "module", - "version": "0.7.0", + "version": "0.8.0", "description": "Components, composables and utilities for inspecting and interacting with verified EVM smart contracts.", "license": "MIT", "main": "./nuxt.config.ts", diff --git a/packages/dapp/CHANGELOG.md b/packages/dapp/CHANGELOG.md index 2ac4772..9ca7b00 100644 --- a/packages/dapp/CHANGELOG.md +++ b/packages/dapp/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmnow/dapp +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`99aa30a`](https://github.com/evmnow/dapp/commit/99aa30a69b11ad6a2c26b4df0a522e16ca652410), [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7), [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7), [`5100264`](https://github.com/evmnow/dapp/commit/5100264014cd23e39d77e79089f1b2d175d1b5f7)]: + - @evmnow/contract-reader@0.8.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/dapp/package.json b/packages/dapp/package.json index 40cb4d1..5e3ff2e 100644 --- a/packages/dapp/package.json +++ b/packages/dapp/package.json @@ -2,7 +2,7 @@ "name": "@evmnow/dapp", "private": true, "type": "module", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "scripts": { "dev": "nuxt dev",