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