@opentabs-dev/opentabs-plugin-onenote 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.
- package/dist/adapter.iife.js +31 -20
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -271,18 +271,19 @@
|
|
|
271
271
|
}
|
|
272
272
|
return null;
|
|
273
273
|
};
|
|
274
|
-
try {
|
|
275
|
-
return search(localStorage);
|
|
276
|
-
} catch {
|
|
277
|
-
}
|
|
278
274
|
let storage;
|
|
279
275
|
try {
|
|
280
|
-
storage = localStorage;
|
|
276
|
+
storage = window.localStorage;
|
|
281
277
|
} catch {
|
|
282
278
|
return null;
|
|
283
279
|
}
|
|
284
|
-
if (storage
|
|
285
|
-
|
|
280
|
+
if (storage) {
|
|
281
|
+
try {
|
|
282
|
+
return search(storage);
|
|
283
|
+
} catch {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
286
287
|
try {
|
|
287
288
|
const iframe = document.createElement("iframe");
|
|
288
289
|
iframe.style.display = "none";
|
|
@@ -14657,21 +14658,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14657
14658
|
};
|
|
14658
14659
|
var src_default = new OneNotePlugin();
|
|
14659
14660
|
|
|
14660
|
-
// dist/
|
|
14661
|
+
// dist/_adapter_entry_a92b778a-2f37-437d-b50c-dce9e521bddf.ts
|
|
14661
14662
|
if (!globalThis.__openTabs) {
|
|
14662
14663
|
globalThis.__openTabs = {};
|
|
14663
14664
|
} else {
|
|
14664
14665
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
14665
14666
|
if (desc && !desc.writable) {
|
|
14666
|
-
const
|
|
14667
|
+
const ot3 = globalThis.__openTabs;
|
|
14667
14668
|
const newAdaptersObj = {};
|
|
14668
|
-
if (
|
|
14669
|
-
for (const key of Object.keys(
|
|
14670
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14669
|
+
if (ot3.adapters) {
|
|
14670
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
14671
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
14671
14672
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14672
14673
|
}
|
|
14673
14674
|
}
|
|
14674
|
-
globalThis.__openTabs = Object.assign({},
|
|
14675
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
14675
14676
|
}
|
|
14676
14677
|
}
|
|
14677
14678
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -14709,6 +14710,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14709
14710
|
}
|
|
14710
14711
|
};
|
|
14711
14712
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
14713
|
+
var ot2 = globalThis.__openTabs;
|
|
14714
|
+
ot2._notifyReadinessChanged = () => {
|
|
14715
|
+
try {
|
|
14716
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
14717
|
+
if (nonce) {
|
|
14718
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "onenote", nonce }, "*");
|
|
14719
|
+
}
|
|
14720
|
+
} catch {
|
|
14721
|
+
}
|
|
14722
|
+
};
|
|
14712
14723
|
var existing = adapters["onenote"];
|
|
14713
14724
|
if (existing) {
|
|
14714
14725
|
if (typeof existing.teardown === "function") {
|
|
@@ -14720,7 +14731,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14720
14731
|
}
|
|
14721
14732
|
}
|
|
14722
14733
|
if (!Reflect.deleteProperty(adapters, "onenote")) {
|
|
14723
|
-
const
|
|
14734
|
+
const ot3 = globalThis.__openTabs;
|
|
14724
14735
|
const newAdapters = {};
|
|
14725
14736
|
for (const key of Object.keys(adapters)) {
|
|
14726
14737
|
if (key !== "onenote") {
|
|
@@ -14728,7 +14739,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14728
14739
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
14729
14740
|
}
|
|
14730
14741
|
}
|
|
14731
|
-
globalThis.__openTabs = Object.assign({},
|
|
14742
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
14732
14743
|
}
|
|
14733
14744
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
14734
14745
|
for (const tool of src_default.tools) {
|
|
@@ -14789,12 +14800,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14789
14800
|
}
|
|
14790
14801
|
}
|
|
14791
14802
|
};
|
|
14792
|
-
const
|
|
14793
|
-
if (!
|
|
14803
|
+
const ot3 = globalThis.__openTabs;
|
|
14804
|
+
if (!ot3._navigationInterceptor) {
|
|
14794
14805
|
const origPushState = history.pushState.bind(history);
|
|
14795
14806
|
const origReplaceState = history.replaceState.bind(history);
|
|
14796
14807
|
const callbacks = /* @__PURE__ */ new Map();
|
|
14797
|
-
|
|
14808
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
14798
14809
|
history.pushState = function(...args) {
|
|
14799
14810
|
origPushState(...args);
|
|
14800
14811
|
for (const cb of callbacks.values()) {
|
|
@@ -14808,7 +14819,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14808
14819
|
}
|
|
14809
14820
|
};
|
|
14810
14821
|
}
|
|
14811
|
-
const interceptor =
|
|
14822
|
+
const interceptor = ot3._navigationInterceptor;
|
|
14812
14823
|
interceptor.callbacks.set("onenote", checkUrl);
|
|
14813
14824
|
window.addEventListener("popstate", checkUrl);
|
|
14814
14825
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -14863,5 +14874,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14863
14874
|
};
|
|
14864
14875
|
delete src_default.onDeactivate;
|
|
14865
14876
|
}
|
|
14866
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["onenote"]){var a=o.adapters["onenote"];a.__adapterHash="
|
|
14877
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["onenote"]){var a=o.adapters["onenote"];a.__adapterHash="957daeb0bfaf3b98575d2e536ef25ea1405484a4998043ce60339b39a6a1fbf9";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,"onenote",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
14867
14878
|
//# sourceMappingURL=adapter.iife.js.map
|