@swell/apps-sdk 1.0.179 → 1.0.180
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/index.cjs +16 -15
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +12 -13
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +2 -2
- package/dist/src/easyblocks/index.d.ts +1 -1
- package/dist/src/easyblocks/utils.d.ts +1 -0
- package/dist/src/liquid/filters/image_url.d.ts +1 -0
- package/dist/src/liquid/filters/shopify/img_url.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3279,7 +3279,7 @@
|
|
|
3279
3279
|
(block) => block.type === blockType
|
|
3280
3280
|
);
|
|
3281
3281
|
return {
|
|
3282
|
-
id,
|
|
3282
|
+
id: toBlockId(id),
|
|
3283
3283
|
type: blockType,
|
|
3284
3284
|
disabled: isDisabled,
|
|
3285
3285
|
settings: blockSchema?.fields?.reduce(
|
|
@@ -3308,6 +3308,12 @@
|
|
|
3308
3308
|
}
|
|
3309
3309
|
return fieldId.replace(/·/g, ".");
|
|
3310
3310
|
}
|
|
3311
|
+
function toBlockId(id) {
|
|
3312
|
+
if (!id) {
|
|
3313
|
+
return id;
|
|
3314
|
+
}
|
|
3315
|
+
return id.replace(/\./g, "_");
|
|
3316
|
+
}
|
|
3311
3317
|
|
|
3312
3318
|
// src/utils/md5.ts
|
|
3313
3319
|
function md5(inputString) {
|
|
@@ -16262,18 +16268,11 @@ ${injects.join("\n")}<\/script>`;
|
|
|
16262
16268
|
}
|
|
16263
16269
|
|
|
16264
16270
|
// src/liquid/filters/shopify/img_url.ts
|
|
16265
|
-
function bind59(
|
|
16266
|
-
return function filterImgUrl(input, ...params) {
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
if (input.url) {
|
|
16271
|
-
url = input.url;
|
|
16272
|
-
} else {
|
|
16273
|
-
return "";
|
|
16274
|
-
}
|
|
16275
|
-
} else {
|
|
16276
|
-
url = String(input);
|
|
16271
|
+
function bind59(liquidSwell) {
|
|
16272
|
+
return async function filterImgUrl(input, ...params) {
|
|
16273
|
+
const url = await getImageUrlFromInput(input, liquidSwell);
|
|
16274
|
+
if (typeof url !== "string" || url === "") {
|
|
16275
|
+
return "";
|
|
16277
16276
|
}
|
|
16278
16277
|
const query = [];
|
|
16279
16278
|
params.forEach((param) => {
|