@opentabs-dev/opentabs-plugin-panda-express 0.0.82 → 0.0.83
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 +20 -16
- package/dist/adapter.iife.js.map +2 -2
- package/dist/tools.json +1 -1
- package/package.json +11 -4
package/dist/adapter.iife.js
CHANGED
|
@@ -244,10 +244,26 @@
|
|
|
244
244
|
ot.log = log;
|
|
245
245
|
|
|
246
246
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
247
|
+
var withIframeFallback = (fn) => {
|
|
248
|
+
try {
|
|
249
|
+
const iframe = document.createElement("iframe");
|
|
250
|
+
iframe.style.display = "none";
|
|
251
|
+
document.body.appendChild(iframe);
|
|
252
|
+
try {
|
|
253
|
+
const iframeStorage = iframe.contentWindow?.localStorage;
|
|
254
|
+
return iframeStorage ? fn(iframeStorage) : null;
|
|
255
|
+
} finally {
|
|
256
|
+
document.body.removeChild(iframe);
|
|
257
|
+
}
|
|
258
|
+
} catch {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
var getWindowLocalStorage = () => window.localStorage;
|
|
247
263
|
var getLocalStorage = (key) => {
|
|
248
264
|
let storage;
|
|
249
265
|
try {
|
|
250
|
-
storage =
|
|
266
|
+
storage = getWindowLocalStorage();
|
|
251
267
|
} catch {
|
|
252
268
|
return null;
|
|
253
269
|
}
|
|
@@ -258,19 +274,7 @@
|
|
|
258
274
|
return null;
|
|
259
275
|
}
|
|
260
276
|
}
|
|
261
|
-
|
|
262
|
-
const iframe = document.createElement("iframe");
|
|
263
|
-
iframe.style.display = "none";
|
|
264
|
-
document.body.appendChild(iframe);
|
|
265
|
-
try {
|
|
266
|
-
const iframeStorage = iframe.contentWindow?.localStorage;
|
|
267
|
-
return iframeStorage ? iframeStorage.getItem(key) : null;
|
|
268
|
-
} finally {
|
|
269
|
-
document.body.removeChild(iframe);
|
|
270
|
-
}
|
|
271
|
-
} catch {
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
277
|
+
return withIframeFallback((s) => s.getItem(key));
|
|
274
278
|
};
|
|
275
279
|
|
|
276
280
|
// node_modules/@opentabs-dev/plugin-sdk/dist/index.js
|
|
@@ -14899,7 +14903,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14899
14903
|
};
|
|
14900
14904
|
var src_default = new PandaExpressPlugin();
|
|
14901
14905
|
|
|
14902
|
-
// dist/
|
|
14906
|
+
// dist/_adapter_entry_c13580ac-f10a-48b7-b0df-7565681f9f7e.ts
|
|
14903
14907
|
if (!globalThis.__openTabs) {
|
|
14904
14908
|
globalThis.__openTabs = {};
|
|
14905
14909
|
} else {
|
|
@@ -15115,5 +15119,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15115
15119
|
};
|
|
15116
15120
|
delete src_default.onDeactivate;
|
|
15117
15121
|
}
|
|
15118
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="
|
|
15122
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="f6ca5c7c7a4f8b8ce09ed70a8e621de2637f94bb90b6f1d623fab6846e120b62";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,"panda-express",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15119
15123
|
//# sourceMappingURL=adapter.iife.js.map
|