@opentabs-dev/opentabs-plugin-github 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.
@@ -15650,21 +15650,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15650
15650
  };
15651
15651
  var src_default = new GitHubPlugin();
15652
15652
 
15653
- // dist/_adapter_entry_f01a8c16-8441-4301-8bb7-2fd426e4b7cc.ts
15653
+ // dist/_adapter_entry_81bc4434-49a3-4175-89c4-824103523f96.ts
15654
15654
  if (!globalThis.__openTabs) {
15655
15655
  globalThis.__openTabs = {};
15656
15656
  } else {
15657
15657
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
15658
15658
  if (desc && !desc.writable) {
15659
- const ot2 = globalThis.__openTabs;
15659
+ const ot3 = globalThis.__openTabs;
15660
15660
  const newAdaptersObj = {};
15661
- if (ot2.adapters) {
15662
- for (const key of Object.keys(ot2.adapters)) {
15663
- const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
15661
+ if (ot3.adapters) {
15662
+ for (const key of Object.keys(ot3.adapters)) {
15663
+ const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
15664
15664
  if (d) Object.defineProperty(newAdaptersObj, key, d);
15665
15665
  }
15666
15666
  }
15667
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
15667
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
15668
15668
  }
15669
15669
  }
15670
15670
  if (!globalThis.__openTabs.adapters) {
@@ -15702,6 +15702,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15702
15702
  }
15703
15703
  };
15704
15704
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
15705
+ var ot2 = globalThis.__openTabs;
15706
+ ot2._notifyReadinessChanged = () => {
15707
+ try {
15708
+ const nonce = globalThis.__openTabs?._readinessNonce;
15709
+ if (nonce) {
15710
+ window.postMessage({ type: "opentabs:readiness-changed", plugin: "github", nonce }, "*");
15711
+ }
15712
+ } catch {
15713
+ }
15714
+ };
15705
15715
  var existing = adapters["github"];
15706
15716
  if (existing) {
15707
15717
  if (typeof existing.teardown === "function") {
@@ -15713,7 +15723,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15713
15723
  }
15714
15724
  }
15715
15725
  if (!Reflect.deleteProperty(adapters, "github")) {
15716
- const ot2 = globalThis.__openTabs;
15726
+ const ot3 = globalThis.__openTabs;
15717
15727
  const newAdapters = {};
15718
15728
  for (const key of Object.keys(adapters)) {
15719
15729
  if (key !== "github") {
@@ -15721,7 +15731,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15721
15731
  if (desc) Object.defineProperty(newAdapters, key, desc);
15722
15732
  }
15723
15733
  }
15724
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
15734
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
15725
15735
  }
15726
15736
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
15727
15737
  for (const tool of src_default.tools) {
@@ -15782,12 +15792,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15782
15792
  }
15783
15793
  }
15784
15794
  };
15785
- const ot2 = globalThis.__openTabs;
15786
- if (!ot2._navigationInterceptor) {
15795
+ const ot3 = globalThis.__openTabs;
15796
+ if (!ot3._navigationInterceptor) {
15787
15797
  const origPushState = history.pushState.bind(history);
15788
15798
  const origReplaceState = history.replaceState.bind(history);
15789
15799
  const callbacks = /* @__PURE__ */ new Map();
15790
- ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15800
+ ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15791
15801
  history.pushState = function(...args) {
15792
15802
  origPushState(...args);
15793
15803
  for (const cb of callbacks.values()) {
@@ -15801,7 +15811,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15801
15811
  }
15802
15812
  };
15803
15813
  }
15804
- const interceptor = ot2._navigationInterceptor;
15814
+ const interceptor = ot3._navigationInterceptor;
15805
15815
  interceptor.callbacks.set("github", checkUrl);
15806
15816
  window.addEventListener("popstate", checkUrl);
15807
15817
  window.addEventListener("hashchange", checkUrl);
@@ -15856,5 +15866,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15856
15866
  };
15857
15867
  delete src_default.onDeactivate;
15858
15868
  }
15859
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["github"]){var a=o.adapters["github"];a.__adapterHash="17a386e4d34b1939b51fb61b48ac7ae610b5a778a04fd6a08f8d5bb9ab987f61";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,"github",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15869
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["github"]){var a=o.adapters["github"];a.__adapterHash="eaeffc6a59ae91d862c2fbf0f20fa03c45a069a6d97f797b7b3827ddb5454cfb";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,"github",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15860
15870
  //# sourceMappingURL=adapter.iife.js.map