@opentabs-dev/opentabs-plugin-coinbase 0.0.75 → 0.0.76

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.
@@ -14891,21 +14891,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14891
14891
  };
14892
14892
  var src_default = new CoinbasePlugin();
14893
14893
 
14894
- // dist/_adapter_entry_20668cd1-a91a-4dc7-b9f2-a85b8ed49866.ts
14894
+ // dist/_adapter_entry_96fef49b-451e-46a8-b9a0-6f811b38d917.ts
14895
14895
  if (!globalThis.__openTabs) {
14896
14896
  globalThis.__openTabs = {};
14897
14897
  } else {
14898
14898
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
14899
14899
  if (desc && !desc.writable) {
14900
- const ot2 = globalThis.__openTabs;
14900
+ const ot3 = globalThis.__openTabs;
14901
14901
  const newAdaptersObj = {};
14902
- if (ot2.adapters) {
14903
- for (const key of Object.keys(ot2.adapters)) {
14904
- const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
14902
+ if (ot3.adapters) {
14903
+ for (const key of Object.keys(ot3.adapters)) {
14904
+ const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
14905
14905
  if (d) Object.defineProperty(newAdaptersObj, key, d);
14906
14906
  }
14907
14907
  }
14908
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
14908
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
14909
14909
  }
14910
14910
  }
14911
14911
  if (!globalThis.__openTabs.adapters) {
@@ -14943,6 +14943,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14943
14943
  }
14944
14944
  };
14945
14945
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
14946
+ var ot2 = globalThis.__openTabs;
14947
+ ot2._notifyReadinessChanged = () => {
14948
+ try {
14949
+ const nonce = globalThis.__openTabs?._readinessNonce;
14950
+ if (nonce) {
14951
+ window.postMessage({ type: "opentabs:readiness-changed", plugin: "coinbase", nonce }, "*");
14952
+ }
14953
+ } catch {
14954
+ }
14955
+ };
14946
14956
  var existing = adapters["coinbase"];
14947
14957
  if (existing) {
14948
14958
  if (typeof existing.teardown === "function") {
@@ -14954,7 +14964,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14954
14964
  }
14955
14965
  }
14956
14966
  if (!Reflect.deleteProperty(adapters, "coinbase")) {
14957
- const ot2 = globalThis.__openTabs;
14967
+ const ot3 = globalThis.__openTabs;
14958
14968
  const newAdapters = {};
14959
14969
  for (const key of Object.keys(adapters)) {
14960
14970
  if (key !== "coinbase") {
@@ -14962,7 +14972,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14962
14972
  if (desc) Object.defineProperty(newAdapters, key, desc);
14963
14973
  }
14964
14974
  }
14965
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
14975
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
14966
14976
  }
14967
14977
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
14968
14978
  for (const tool of src_default.tools) {
@@ -15023,12 +15033,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15023
15033
  }
15024
15034
  }
15025
15035
  };
15026
- const ot2 = globalThis.__openTabs;
15027
- if (!ot2._navigationInterceptor) {
15036
+ const ot3 = globalThis.__openTabs;
15037
+ if (!ot3._navigationInterceptor) {
15028
15038
  const origPushState = history.pushState.bind(history);
15029
15039
  const origReplaceState = history.replaceState.bind(history);
15030
15040
  const callbacks = /* @__PURE__ */ new Map();
15031
- ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15041
+ ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15032
15042
  history.pushState = function(...args) {
15033
15043
  origPushState(...args);
15034
15044
  for (const cb of callbacks.values()) {
@@ -15042,7 +15052,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15042
15052
  }
15043
15053
  };
15044
15054
  }
15045
- const interceptor = ot2._navigationInterceptor;
15055
+ const interceptor = ot3._navigationInterceptor;
15046
15056
  interceptor.callbacks.set("coinbase", checkUrl);
15047
15057
  window.addEventListener("popstate", checkUrl);
15048
15058
  window.addEventListener("hashchange", checkUrl);
@@ -15097,5 +15107,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15097
15107
  };
15098
15108
  delete src_default.onDeactivate;
15099
15109
  }
15100
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["coinbase"]){var a=o.adapters["coinbase"];a.__adapterHash="5bd04797113e106d9becd6780f6a96681735b74823c9798b812dad541f7600ce";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"coinbase",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15110
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["coinbase"]){var a=o.adapters["coinbase"];a.__adapterHash="c6a1c684a53d8908d8ed10d444b469f8b3ca9e33c1c9574a25500b4f94383f9b";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"coinbase",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15101
15111
  //# sourceMappingURL=adapter.iife.js.map