@opentabs-dev/opentabs-plugin-microsoft-word 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 +27 -38
- 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
|
@@ -248,18 +248,18 @@
|
|
|
248
248
|
|
|
249
249
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
250
250
|
var getLocalStorage = (key) => {
|
|
251
|
+
try {
|
|
252
|
+
return localStorage.getItem(key);
|
|
253
|
+
} catch {
|
|
254
|
+
}
|
|
251
255
|
let storage;
|
|
252
256
|
try {
|
|
253
|
-
storage =
|
|
257
|
+
storage = localStorage;
|
|
254
258
|
} catch {
|
|
255
259
|
return null;
|
|
256
260
|
}
|
|
257
|
-
if (storage) {
|
|
258
|
-
|
|
259
|
-
return storage.getItem(key);
|
|
260
|
-
} catch {
|
|
261
|
-
return null;
|
|
262
|
-
}
|
|
261
|
+
if (storage !== void 0) {
|
|
262
|
+
return null;
|
|
263
263
|
}
|
|
264
264
|
try {
|
|
265
265
|
const iframe = document.createElement("iframe");
|
|
@@ -287,19 +287,18 @@
|
|
|
287
287
|
}
|
|
288
288
|
return null;
|
|
289
289
|
};
|
|
290
|
+
try {
|
|
291
|
+
return search(localStorage);
|
|
292
|
+
} catch {
|
|
293
|
+
}
|
|
290
294
|
let storage;
|
|
291
295
|
try {
|
|
292
|
-
storage =
|
|
296
|
+
storage = localStorage;
|
|
293
297
|
} catch {
|
|
294
298
|
return null;
|
|
295
299
|
}
|
|
296
|
-
if (storage)
|
|
297
|
-
|
|
298
|
-
return search(storage);
|
|
299
|
-
} catch {
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
300
|
+
if (storage !== void 0)
|
|
301
|
+
return null;
|
|
303
302
|
try {
|
|
304
303
|
const iframe = document.createElement("iframe");
|
|
305
304
|
iframe.style.display = "none";
|
|
@@ -15654,21 +15653,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15654
15653
|
};
|
|
15655
15654
|
var src_default = new MicrosoftWordPlugin();
|
|
15656
15655
|
|
|
15657
|
-
// dist/
|
|
15656
|
+
// dist/_adapter_entry_c537bceb-a306-43a7-a859-aab859a56c7b.ts
|
|
15658
15657
|
if (!globalThis.__openTabs) {
|
|
15659
15658
|
globalThis.__openTabs = {};
|
|
15660
15659
|
} else {
|
|
15661
15660
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15662
15661
|
if (desc && !desc.writable) {
|
|
15663
|
-
const
|
|
15662
|
+
const ot2 = globalThis.__openTabs;
|
|
15664
15663
|
const newAdaptersObj = {};
|
|
15665
|
-
if (
|
|
15666
|
-
for (const key of Object.keys(
|
|
15667
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15664
|
+
if (ot2.adapters) {
|
|
15665
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
15666
|
+
const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
|
|
15668
15667
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15669
15668
|
}
|
|
15670
15669
|
}
|
|
15671
|
-
globalThis.__openTabs = Object.assign({},
|
|
15670
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
|
|
15672
15671
|
}
|
|
15673
15672
|
}
|
|
15674
15673
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15706,16 +15705,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15706
15705
|
}
|
|
15707
15706
|
};
|
|
15708
15707
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15709
|
-
var ot2 = globalThis.__openTabs;
|
|
15710
|
-
ot2._notifyReadinessChanged = () => {
|
|
15711
|
-
try {
|
|
15712
|
-
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15713
|
-
if (nonce) {
|
|
15714
|
-
window.postMessage({ type: "opentabs:readiness-changed", plugin: "microsoft-word", nonce }, "*");
|
|
15715
|
-
}
|
|
15716
|
-
} catch {
|
|
15717
|
-
}
|
|
15718
|
-
};
|
|
15719
15708
|
var existing = adapters["microsoft-word"];
|
|
15720
15709
|
if (existing) {
|
|
15721
15710
|
if (typeof existing.teardown === "function") {
|
|
@@ -15727,7 +15716,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15727
15716
|
}
|
|
15728
15717
|
}
|
|
15729
15718
|
if (!Reflect.deleteProperty(adapters, "microsoft-word")) {
|
|
15730
|
-
const
|
|
15719
|
+
const ot2 = globalThis.__openTabs;
|
|
15731
15720
|
const newAdapters = {};
|
|
15732
15721
|
for (const key of Object.keys(adapters)) {
|
|
15733
15722
|
if (key !== "microsoft-word") {
|
|
@@ -15735,7 +15724,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15735
15724
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15736
15725
|
}
|
|
15737
15726
|
}
|
|
15738
|
-
globalThis.__openTabs = Object.assign({},
|
|
15727
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
15739
15728
|
}
|
|
15740
15729
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15741
15730
|
for (const tool of src_default.tools) {
|
|
@@ -15796,12 +15785,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15796
15785
|
}
|
|
15797
15786
|
}
|
|
15798
15787
|
};
|
|
15799
|
-
const
|
|
15800
|
-
if (!
|
|
15788
|
+
const ot2 = globalThis.__openTabs;
|
|
15789
|
+
if (!ot2._navigationInterceptor) {
|
|
15801
15790
|
const origPushState = history.pushState.bind(history);
|
|
15802
15791
|
const origReplaceState = history.replaceState.bind(history);
|
|
15803
15792
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15804
|
-
|
|
15793
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15805
15794
|
history.pushState = function(...args) {
|
|
15806
15795
|
origPushState(...args);
|
|
15807
15796
|
for (const cb of callbacks.values()) {
|
|
@@ -15815,7 +15804,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15815
15804
|
}
|
|
15816
15805
|
};
|
|
15817
15806
|
}
|
|
15818
|
-
const interceptor =
|
|
15807
|
+
const interceptor = ot2._navigationInterceptor;
|
|
15819
15808
|
interceptor.callbacks.set("microsoft-word", checkUrl);
|
|
15820
15809
|
window.addEventListener("popstate", checkUrl);
|
|
15821
15810
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15870,5 +15859,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15870
15859
|
};
|
|
15871
15860
|
delete src_default.onDeactivate;
|
|
15872
15861
|
}
|
|
15873
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["microsoft-word"]){var a=o.adapters["microsoft-word"];a.__adapterHash="
|
|
15862
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["microsoft-word"]){var a=o.adapters["microsoft-word"];a.__adapterHash="c9582a6cf42e8e0f427d82c37d9589c50c4b4e2b0df5b6776c70dfff3f8b1b57";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,"microsoft-word",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15874
15863
|
//# sourceMappingURL=adapter.iife.js.map
|