@opentabs-dev/opentabs-plugin-npm 0.0.74 → 0.0.75
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/dist/adapter.iife.js +13 -23
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools/star-package.d.ts +7 -0
- package/dist/tools/star-package.d.ts.map +1 -0
- package/dist/tools/star-package.js +22 -0
- package/dist/tools/star-package.js.map +1 -0
- package/dist/tools/unstar-package.d.ts +7 -0
- package/dist/tools/unstar-package.d.ts.map +1 -0
- package/dist/tools/unstar-package.js +22 -0
- package/dist/tools/unstar-package.js.map +1 -0
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -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/
|
|
14793
|
+
// dist/_adapter_entry_3c28efb9-a62d-44e3-9e0e-9d7cd83bb765.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
|
|
14799
|
+
const ot2 = globalThis.__openTabs;
|
|
14800
14800
|
const newAdaptersObj = {};
|
|
14801
|
-
if (
|
|
14802
|
-
for (const key of Object.keys(
|
|
14803
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14801
|
+
if (ot2.adapters) {
|
|
14802
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
14803
|
+
const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
|
|
14804
14804
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14805
14805
|
}
|
|
14806
14806
|
}
|
|
14807
|
-
globalThis.__openTabs = Object.assign({},
|
|
14807
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
|
|
14808
14808
|
}
|
|
14809
14809
|
}
|
|
14810
14810
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -14842,16 +14842,6 @@ 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
|
-
};
|
|
14855
14845
|
var existing = adapters["npm"];
|
|
14856
14846
|
if (existing) {
|
|
14857
14847
|
if (typeof existing.teardown === "function") {
|
|
@@ -14863,7 +14853,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14863
14853
|
}
|
|
14864
14854
|
}
|
|
14865
14855
|
if (!Reflect.deleteProperty(adapters, "npm")) {
|
|
14866
|
-
const
|
|
14856
|
+
const ot2 = globalThis.__openTabs;
|
|
14867
14857
|
const newAdapters = {};
|
|
14868
14858
|
for (const key of Object.keys(adapters)) {
|
|
14869
14859
|
if (key !== "npm") {
|
|
@@ -14871,7 +14861,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14871
14861
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
14872
14862
|
}
|
|
14873
14863
|
}
|
|
14874
|
-
globalThis.__openTabs = Object.assign({},
|
|
14864
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
14875
14865
|
}
|
|
14876
14866
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
14877
14867
|
for (const tool of src_default.tools) {
|
|
@@ -14932,12 +14922,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14932
14922
|
}
|
|
14933
14923
|
}
|
|
14934
14924
|
};
|
|
14935
|
-
const
|
|
14936
|
-
if (!
|
|
14925
|
+
const ot2 = globalThis.__openTabs;
|
|
14926
|
+
if (!ot2._navigationInterceptor) {
|
|
14937
14927
|
const origPushState = history.pushState.bind(history);
|
|
14938
14928
|
const origReplaceState = history.replaceState.bind(history);
|
|
14939
14929
|
const callbacks = /* @__PURE__ */ new Map();
|
|
14940
|
-
|
|
14930
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
14941
14931
|
history.pushState = function(...args) {
|
|
14942
14932
|
origPushState(...args);
|
|
14943
14933
|
for (const cb of callbacks.values()) {
|
|
@@ -14951,7 +14941,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14951
14941
|
}
|
|
14952
14942
|
};
|
|
14953
14943
|
}
|
|
14954
|
-
const interceptor =
|
|
14944
|
+
const interceptor = ot2._navigationInterceptor;
|
|
14955
14945
|
interceptor.callbacks.set("npm", checkUrl);
|
|
14956
14946
|
window.addEventListener("popstate", checkUrl);
|
|
14957
14947
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15006,5 +14996,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15006
14996
|
};
|
|
15007
14997
|
delete src_default.onDeactivate;
|
|
15008
14998
|
}
|
|
15009
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["npm"]){var a=o.adapters["npm"];a.__adapterHash="
|
|
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});}})();
|
|
15010
15000
|
//# sourceMappingURL=adapter.iife.js.map
|