@doiim/reown-appkit 1.8.19-doiim.11 → 1.8.19-doiim.12

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doiim/reown-appkit",
3
- "version": "1.8.19-doiim.11",
3
+ "version": "1.8.19-doiim.12",
4
4
  "type": "module",
5
5
  "main": "./dist/esm/exports/index.js",
6
6
  "types": "./dist/types/exports/index.d.ts",
@@ -5,12 +5,14 @@ const DOIIM_FEATURES_DEFAULTS = {
5
5
  allWalletsPosition: 'top',
6
6
  excludeWalletNames: ['Brave Wallet', 'Binance Wallet']
7
7
  };
8
- // Reown modal theme variables. The fork ships its visual identity here
9
- // (brand yellow accent, navy color-mix, Inter, sharp 1px radius) so a
10
- // consumer that just calls `createAppKit({...})` gets the doiim look
11
- // without wiring a design.ts. To override, consumers pass their own
12
- // `themeVariables` to createAppKit the merge below treats the entire
13
- // object as a single key (full-replace) per the precedence rules.
8
+ /**
9
+ * Reown modal theme variables. The fork ships its visual identity here
10
+ * (brand yellow accent, navy color-mix, Inter, sharp 1px radius) so a
11
+ * consumer that just calls `createAppKit({...})` gets the doiim look
12
+ * without wiring a design.ts. To override, consumers pass their own
13
+ * `themeVariables` to createAppKit - the merge below treats the entire
14
+ * object as a single key (full-replace) per the precedence rules.
15
+ */
14
16
  const DOIIM_THEME_VARIABLES = {
15
17
  '--w3m-accent': '#FFC107',
16
18
  '--w3m-color-mix': '#1A1B3F',
@@ -24,13 +26,15 @@ const DOIIM_THEME_VARIABLES = {
24
26
  };
25
27
  const DOIIM_DEFAULTS = {
26
28
  features: DOIIM_FEATURES_DEFAULTS,
27
- // Strip Reown's default "featured" suggestions so e.g. Binance Wallet
28
- // doesn't appear unsolicited.
29
+ /**
30
+ * Strip Reown's default "featured" suggestions so e.g. Binance Wallet
31
+ * doesn't appear unsolicited.
32
+ */
29
33
  featuredWalletIds: [],
30
- // Hide Binance Web3 Wallet by WalletConnect explorer id.
34
+ /** Hide Binance Web3 Wallet by WalletConnect explorer id. */
31
35
  excludeWalletIds: ['8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a138eaf2'],
32
- // Smart Accounts power the passkey-as-signer flow.
33
- defaultAccountTypes: { eip155: 'smartAccount' },
36
+ /** Keep Reown auth as an EOA signer so consumers can wrap it or opt back in. */
37
+ defaultAccountTypes: { eip155: 'eoa' },
34
38
  themeVariables: DOIIM_THEME_VARIABLES
35
39
  };
36
40
  /**
@@ -42,8 +46,8 @@ const DOIIM_DEFAULTS = {
42
46
  *
43
47
  * Per-field rules:
44
48
  *
45
- * - Top-level scalars (`projectId`, `themeMode`, ): consumer overrides.
46
- * - Top-level arrays (`featuredWalletIds`, `excludeWalletIds`, ): consumer
49
+ * - Top-level scalars (`projectId`, `themeMode`, ...): consumer overrides.
50
+ * - Top-level arrays (`featuredWalletIds`, `excludeWalletIds`, ...): consumer
47
51
  * full-replaces. Pass `excludeWalletIds: []` to wipe doiim's Binance
48
52
  * filter; pass nothing to keep it.
49
53
  * - `features` and `defaultAccountTypes`: shallow-merged so consumer
@@ -55,8 +59,8 @@ const DOIIM_DEFAULTS = {
55
59
  *
56
60
  * @example
57
61
  * createAppKit({ projectId, adapters, networks, metadata: { name: 'P2Pix' } })
58
- * // modal renders with passkey CTA, no Binance, light theme is consumer's call,
59
- * // metadata.url = window.location.origin
62
+ * // -> modal renders with passkey CTA, no Binance, light theme is consumer's call,
63
+ * // metadata.url = window.location.origin
60
64
  *
61
65
  * @example
62
66
  * // Override a single feature sub-key (others stay from defaults):
@@ -66,13 +70,6 @@ const DOIIM_DEFAULTS = {
66
70
  * // Wipe an array default:
67
71
  * createAppKit({ ..., excludeWalletIds: [] })
68
72
  */
69
- // `@base-org/account` and `@coinbase/wallet-sdk` both inject an inline
70
- // telemetry script (`cca-lite.coinbase.com/amp` + `/metrics`) that pings on
71
- // init *and on every click*. Their loader short-circuits if
72
- // `window.ClientAnalytics` is already defined, and every subsequent
73
- // `logEvent`/`identify` call routes through it — so a no-op stub installed
74
- // before the SDKs initialize neutralizes both the init beacon and the
75
- // per-interaction telemetry without forking the upstream packages.
76
73
  function silenceCoinbaseTelemetry() {
77
74
  if (typeof window === 'undefined') {
78
75
  return;
@@ -81,7 +78,9 @@ function silenceCoinbaseTelemetry() {
81
78
  if (w.ClientAnalytics) {
82
79
  return;
83
80
  }
84
- const noop = () => undefined;
81
+ function noop() {
82
+ return undefined;
83
+ }
85
84
  w.ClientAnalytics = {
86
85
  init: noop,
87
86
  identify: noop,
@@ -103,11 +102,13 @@ export function applyDoiimDefaults(options) {
103
102
  ...(options.defaultAccountTypes ?? {})
104
103
  }
105
104
  };
106
- // Default metadata.url to the actual page origin in the browser. Consumers
107
- // typically know `name`/`description`/`icons` ahead of time but `url`
108
- // varies by deploy environment having the fork fill it from
109
- // window.location.origin removes a class of bugs (the "page url differs
110
- // from metadata.url" warning, wallet trust checks failing on localhost).
105
+ /**
106
+ * Default metadata.url to the actual page origin in the browser. Consumers
107
+ * typically know `name`/`description`/`icons` ahead of time but `url`
108
+ * varies by deploy environment. Having the fork fill it from
109
+ * window.location.origin removes a class of bugs (the "page url differs
110
+ * from metadata.url" warning, wallet trust checks failing on localhost).
111
+ */
111
112
  if (merged.metadata && !merged.metadata.url && typeof window !== 'undefined') {
112
113
  merged.metadata = { ...merged.metadata, url: window.location.origin };
113
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DoiimDefaults.js","sourceRoot":"","sources":["../../../../src/utils/DoiimDefaults.ts"],"names":[],"mappings":"AAWA,MAAM,uBAAuB,GAAG;IAC9B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC;IACvD,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAC7D,kBAAkB,EAAE,KAAK;IACzB,kBAAkB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AC5B;QACD,mBAAmB,EAAE;YACnB,GAAG,CAAC,cAAc,CAAC,mBAAmB,IAAI,EAAE,CAAC;YAC7C,GAAG,CAAC,OAAO,CAAC,mBAAmB,IAAI,EAAE,CAAC;SACvC;KACc,CAAA;IAEjB;;;;;;OAMG;IACH,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAC7E,MAAM,CAAC,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;IACvE,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1,4 +1,13 @@
1
1
  import type { AppKitOptions } from './TypesUtil.js';
2
+ /**
3
+ * Doiim fork opinionated defaults.
4
+ *
5
+ * Consumers (P2Pix and others) used to repeat the same set of options
6
+ * in every createAppKit() call. They live here so the fork ships with
7
+ * a configured-out-of-the-box modal: passkey first, no Binance,
8
+ * analytics disabled. Override any of these by passing the same key to
9
+ * createAppKit() - user options win.
10
+ */
2
11
  type CreateAppKit = Omit<AppKitOptions, 'sdkType' | 'sdkVersion' | 'basic'>;
3
12
  export declare function applyDoiimDefaults(options: CreateAppKit): CreateAppKit;
4
13
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doiim/reown-appkit",
3
- "version": "1.8.19-doiim.11",
3
+ "version": "1.8.19-doiim.12",
4
4
  "type": "module",
5
5
  "main": "./dist/esm/exports/index.js",
6
6
  "types": "./dist/types/exports/index.d.ts",
@@ -122,11 +122,11 @@
122
122
  "semver": "7.7.2",
123
123
  "valtio": "2.1.7",
124
124
  "viem": ">=2.45.0",
125
- "@doiim/reown-appkit-controllers": "1.8.19-doiim.11",
126
- "@doiim/reown-appkit-scaffold-ui": "1.8.19-doiim.11",
127
125
  "@doiim/reown-appkit-common": "1.8.19-doiim.11",
128
- "@doiim/reown-appkit-utils": "1.8.19-doiim.11",
126
+ "@doiim/reown-appkit-scaffold-ui": "1.8.19-doiim.11",
127
+ "@doiim/reown-appkit-controllers": "1.8.19-doiim.11",
129
128
  "@doiim/reown-appkit-ui": "1.8.19-doiim.11",
129
+ "@doiim/reown-appkit-utils": "1.8.19-doiim.11",
130
130
  "@doiim/reown-appkit-wallet": "1.8.19-doiim.11",
131
131
  "@reown/appkit-polyfills": "1.8.19"
132
132
  },