@octanejs/rainbowkit 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/rainbowkit",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@wagmi/core": "3.6.4",
39
- "@octanejs/wagmi": "0.0.1"
39
+ "@octanejs/wagmi": "0.0.3"
40
40
  },
41
41
  "peerDependencies": {
42
- "@octanejs/tanstack-query": "0.1.20",
43
- "octane": "0.1.21"
42
+ "@octanejs/tanstack-query": "0.1.22",
43
+ "octane": "0.1.23"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@testing-library/jest-dom": "^6.9.1",
@@ -50,8 +50,8 @@
50
50
  "react-dom": "^19.2.7",
51
51
  "viem": "2.55.10",
52
52
  "vitest": "^4.1.10",
53
- "octane": "0.1.21",
54
- "@octanejs/tanstack-query": "0.1.20"
53
+ "@octanejs/tanstack-query": "0.1.22",
54
+ "octane": "0.1.23"
55
55
  },
56
56
  "scripts": {
57
57
  "test": "vitest run --root ../.. --project rainbowkit --project rainbowkit-ssr"
@@ -35,10 +35,16 @@ export function WalletButton(props: WalletButtonProps) {
35
35
  ? props.children({ ready, connect, error: mutation.error })
36
36
  : props.children;
37
37
  }
38
+ // Returning an ARRAY makes these a keyed list to octane's reconciler, so both
39
+ // slots need keys or it matches them by position and warns. They are two fixed
40
+ // roles — the control, and an error that comes and goes beneath it — so the
41
+ // role name IS the stable identity: the button keeps its DOM node (and focus)
42
+ // when the error appears or clears, instead of being matched against the <p>.
38
43
  return [
39
44
  createElement(
40
45
  'button',
41
46
  {
47
+ key: 'wallet-button',
42
48
  type: 'button',
43
49
  className: 'rk-wallet-button',
44
50
  disabled: !ready || context?.connecting || mutation.isPending,
@@ -49,7 +55,7 @@ export function WalletButton(props: WalletButtonProps) {
49
55
  mutation.error
50
56
  ? createElement(
51
57
  'p',
52
- { role: 'alert', className: 'rk-wallet-error' },
58
+ { key: 'wallet-error', role: 'alert', className: 'rk-wallet-error' },
53
59
  mutation.error instanceof Error ? mutation.error.message : 'The wallet request failed.',
54
60
  )
55
61
  : null,