@opentabs-dev/opentabs-plugin-npm 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.
@@ -14790,21 +14790,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14790
14790
  };
14791
14791
  var src_default = new NpmPlugin();
14792
14792
 
14793
- // dist/_adapter_entry_3c28efb9-a62d-44e3-9e0e-9d7cd83bb765.ts
14793
+ // dist/_adapter_entry_7864abc4-c9d4-4320-b8aa-e139f8a10b0d.ts
14794
14794
  if (!globalThis.__openTabs) {
14795
14795
  globalThis.__openTabs = {};
14796
14796
  } else {
14797
14797
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
14798
14798
  if (desc && !desc.writable) {
14799
- const ot2 = globalThis.__openTabs;
14799
+ const ot3 = globalThis.__openTabs;
14800
14800
  const newAdaptersObj = {};
14801
- if (ot2.adapters) {
14802
- for (const key of Object.keys(ot2.adapters)) {
14803
- const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
14801
+ if (ot3.adapters) {
14802
+ for (const key of Object.keys(ot3.adapters)) {
14803
+ const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
14804
14804
  if (d) Object.defineProperty(newAdaptersObj, key, d);
14805
14805
  }
14806
14806
  }
14807
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
14807
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
14808
14808
  }
14809
14809
  }
14810
14810
  if (!globalThis.__openTabs.adapters) {
@@ -14842,6 +14842,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14842
14842
  }
14843
14843
  };
14844
14844
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
14845
+ var ot2 = globalThis.__openTabs;
14846
+ ot2._notifyReadinessChanged = () => {
14847
+ try {
14848
+ const nonce = globalThis.__openTabs?._readinessNonce;
14849
+ if (nonce) {
14850
+ window.postMessage({ type: "opentabs:readiness-changed", plugin: "npm", nonce }, "*");
14851
+ }
14852
+ } catch {
14853
+ }
14854
+ };
14845
14855
  var existing = adapters["npm"];
14846
14856
  if (existing) {
14847
14857
  if (typeof existing.teardown === "function") {
@@ -14853,7 +14863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14853
14863
  }
14854
14864
  }
14855
14865
  if (!Reflect.deleteProperty(adapters, "npm")) {
14856
- const ot2 = globalThis.__openTabs;
14866
+ const ot3 = globalThis.__openTabs;
14857
14867
  const newAdapters = {};
14858
14868
  for (const key of Object.keys(adapters)) {
14859
14869
  if (key !== "npm") {
@@ -14861,7 +14871,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14861
14871
  if (desc) Object.defineProperty(newAdapters, key, desc);
14862
14872
  }
14863
14873
  }
14864
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
14874
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
14865
14875
  }
14866
14876
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
14867
14877
  for (const tool of src_default.tools) {
@@ -14922,12 +14932,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14922
14932
  }
14923
14933
  }
14924
14934
  };
14925
- const ot2 = globalThis.__openTabs;
14926
- if (!ot2._navigationInterceptor) {
14935
+ const ot3 = globalThis.__openTabs;
14936
+ if (!ot3._navigationInterceptor) {
14927
14937
  const origPushState = history.pushState.bind(history);
14928
14938
  const origReplaceState = history.replaceState.bind(history);
14929
14939
  const callbacks = /* @__PURE__ */ new Map();
14930
- ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
14940
+ ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
14931
14941
  history.pushState = function(...args) {
14932
14942
  origPushState(...args);
14933
14943
  for (const cb of callbacks.values()) {
@@ -14941,7 +14951,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14941
14951
  }
14942
14952
  };
14943
14953
  }
14944
- const interceptor = ot2._navigationInterceptor;
14954
+ const interceptor = ot3._navigationInterceptor;
14945
14955
  interceptor.callbacks.set("npm", checkUrl);
14946
14956
  window.addEventListener("popstate", checkUrl);
14947
14957
  window.addEventListener("hashchange", checkUrl);
@@ -14996,5 +15006,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14996
15006
  };
14997
15007
  delete src_default.onDeactivate;
14998
15008
  }
14999
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["npm"]){var a=o.adapters["npm"];a.__adapterHash="5c1197b18965cefb114690b315e599d5292e7cd8a55f266d5da9419ac0f49a3a";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,"npm",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15009
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["npm"]){var a=o.adapters["npm"];a.__adapterHash="31aa7dab1cf87bd24245552931823be86fb64beb0e507ba503674c5e85b5b17b";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,"npm",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15000
15010
  //# sourceMappingURL=adapter.iife.js.map