@opentabs-dev/opentabs-plugin-panda-express 0.0.75 → 0.0.77
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 +32 -20
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +10 -4
- package/dist/tools/remove-product-from-basket.d.ts +0 -19
- package/dist/tools/remove-product-from-basket.d.ts.map +0 -1
- package/dist/tools/remove-product-from-basket.js +0 -26
- package/dist/tools/remove-product-from-basket.js.map +0 -1
- package/dist/tools/reorder.d.ts +0 -18
- package/dist/tools/reorder.d.ts.map +0 -1
- package/dist/tools/reorder.js +0 -30
- package/dist/tools/reorder.js.map +0 -1
package/dist/adapter.iife.js
CHANGED
|
@@ -245,18 +245,18 @@
|
|
|
245
245
|
|
|
246
246
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
247
247
|
var getLocalStorage = (key) => {
|
|
248
|
-
try {
|
|
249
|
-
return localStorage.getItem(key);
|
|
250
|
-
} catch {
|
|
251
|
-
}
|
|
252
248
|
let storage;
|
|
253
249
|
try {
|
|
254
|
-
storage = localStorage;
|
|
250
|
+
storage = window.localStorage;
|
|
255
251
|
} catch {
|
|
256
252
|
return null;
|
|
257
253
|
}
|
|
258
|
-
if (storage
|
|
259
|
-
|
|
254
|
+
if (storage) {
|
|
255
|
+
try {
|
|
256
|
+
return storage.getItem(key);
|
|
257
|
+
} catch {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
260
|
}
|
|
261
261
|
try {
|
|
262
262
|
const iframe = document.createElement("iframe");
|
|
@@ -289,6 +289,8 @@
|
|
|
289
289
|
* (e.g., 'https://github.com'), not a match pattern.
|
|
290
290
|
*/
|
|
291
291
|
homepage;
|
|
292
|
+
/** Typed configuration schema — declares settings that users provide via config.json or the side panel. */
|
|
293
|
+
configSchema;
|
|
292
294
|
};
|
|
293
295
|
|
|
294
296
|
// src/panda-api.ts
|
|
@@ -14897,21 +14899,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14897
14899
|
};
|
|
14898
14900
|
var src_default = new PandaExpressPlugin();
|
|
14899
14901
|
|
|
14900
|
-
// dist/
|
|
14902
|
+
// dist/_adapter_entry_5774323c-16f6-4794-940f-439ce54fd668.ts
|
|
14901
14903
|
if (!globalThis.__openTabs) {
|
|
14902
14904
|
globalThis.__openTabs = {};
|
|
14903
14905
|
} else {
|
|
14904
14906
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
14905
14907
|
if (desc && !desc.writable) {
|
|
14906
|
-
const
|
|
14908
|
+
const ot3 = globalThis.__openTabs;
|
|
14907
14909
|
const newAdaptersObj = {};
|
|
14908
|
-
if (
|
|
14909
|
-
for (const key of Object.keys(
|
|
14910
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14910
|
+
if (ot3.adapters) {
|
|
14911
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
14912
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
14911
14913
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14912
14914
|
}
|
|
14913
14915
|
}
|
|
14914
|
-
globalThis.__openTabs = Object.assign({},
|
|
14916
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
14915
14917
|
}
|
|
14916
14918
|
}
|
|
14917
14919
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -14949,6 +14951,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14949
14951
|
}
|
|
14950
14952
|
};
|
|
14951
14953
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
14954
|
+
var ot2 = globalThis.__openTabs;
|
|
14955
|
+
ot2._notifyReadinessChanged = () => {
|
|
14956
|
+
try {
|
|
14957
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
14958
|
+
if (nonce) {
|
|
14959
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "panda-express", nonce }, "*");
|
|
14960
|
+
}
|
|
14961
|
+
} catch {
|
|
14962
|
+
}
|
|
14963
|
+
};
|
|
14952
14964
|
var existing = adapters["panda-express"];
|
|
14953
14965
|
if (existing) {
|
|
14954
14966
|
if (typeof existing.teardown === "function") {
|
|
@@ -14960,7 +14972,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14960
14972
|
}
|
|
14961
14973
|
}
|
|
14962
14974
|
if (!Reflect.deleteProperty(adapters, "panda-express")) {
|
|
14963
|
-
const
|
|
14975
|
+
const ot3 = globalThis.__openTabs;
|
|
14964
14976
|
const newAdapters = {};
|
|
14965
14977
|
for (const key of Object.keys(adapters)) {
|
|
14966
14978
|
if (key !== "panda-express") {
|
|
@@ -14968,7 +14980,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14968
14980
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
14969
14981
|
}
|
|
14970
14982
|
}
|
|
14971
|
-
globalThis.__openTabs = Object.assign({},
|
|
14983
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
14972
14984
|
}
|
|
14973
14985
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
14974
14986
|
for (const tool of src_default.tools) {
|
|
@@ -15029,12 +15041,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15029
15041
|
}
|
|
15030
15042
|
}
|
|
15031
15043
|
};
|
|
15032
|
-
const
|
|
15033
|
-
if (!
|
|
15044
|
+
const ot3 = globalThis.__openTabs;
|
|
15045
|
+
if (!ot3._navigationInterceptor) {
|
|
15034
15046
|
const origPushState = history.pushState.bind(history);
|
|
15035
15047
|
const origReplaceState = history.replaceState.bind(history);
|
|
15036
15048
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15037
|
-
|
|
15049
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15038
15050
|
history.pushState = function(...args) {
|
|
15039
15051
|
origPushState(...args);
|
|
15040
15052
|
for (const cb of callbacks.values()) {
|
|
@@ -15048,7 +15060,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15048
15060
|
}
|
|
15049
15061
|
};
|
|
15050
15062
|
}
|
|
15051
|
-
const interceptor =
|
|
15063
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15052
15064
|
interceptor.callbacks.set("panda-express", checkUrl);
|
|
15053
15065
|
window.addEventListener("popstate", checkUrl);
|
|
15054
15066
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15103,5 +15115,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15103
15115
|
};
|
|
15104
15116
|
delete src_default.onDeactivate;
|
|
15105
15117
|
}
|
|
15106
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="
|
|
15118
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="3beb91adec3042c019b32a9033fe9d01d529f44e66f9a014866c22996a312ba8";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});}})();
|
|
15107
15119
|
//# sourceMappingURL=adapter.iife.js.map
|