@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.cjs
CHANGED
|
@@ -151,7 +151,8 @@ __export(index_exports, {
|
|
|
151
151
|
scopeCustomCSS: () => scopeCustomCSS,
|
|
152
152
|
stringifyQueryParams: () => stringifyQueryParams,
|
|
153
153
|
systemFonts: () => systemFonts,
|
|
154
|
-
toBase64: () => toBase64
|
|
154
|
+
toBase64: () => toBase64,
|
|
155
|
+
toBlockId: () => toBlockId
|
|
155
156
|
});
|
|
156
157
|
module.exports = __toCommonJS(index_exports);
|
|
157
158
|
|
|
@@ -3401,7 +3402,7 @@ function getSectionSettingsFromProps(props, sectionSchema) {
|
|
|
3401
3402
|
(block) => block.type === blockType
|
|
3402
3403
|
);
|
|
3403
3404
|
return {
|
|
3404
|
-
id,
|
|
3405
|
+
id: toBlockId(id),
|
|
3405
3406
|
type: blockType,
|
|
3406
3407
|
disabled: isDisabled,
|
|
3407
3408
|
settings: blockSchema?.fields?.reduce(
|
|
@@ -3430,6 +3431,12 @@ function toSchemaFieldId(fieldId) {
|
|
|
3430
3431
|
}
|
|
3431
3432
|
return fieldId.replace(/·/g, ".");
|
|
3432
3433
|
}
|
|
3434
|
+
function toBlockId(id) {
|
|
3435
|
+
if (!id) {
|
|
3436
|
+
return id;
|
|
3437
|
+
}
|
|
3438
|
+
return id.replace(/\./g, "_");
|
|
3439
|
+
}
|
|
3433
3440
|
|
|
3434
3441
|
// src/utils/md5.ts
|
|
3435
3442
|
function md5(inputString) {
|
|
@@ -16384,18 +16391,11 @@ function bind58(_liquidSwell) {
|
|
|
16384
16391
|
}
|
|
16385
16392
|
|
|
16386
16393
|
// src/liquid/filters/shopify/img_url.ts
|
|
16387
|
-
function bind59(
|
|
16388
|
-
return function filterImgUrl(input, ...params) {
|
|
16389
|
-
|
|
16390
|
-
|
|
16391
|
-
|
|
16392
|
-
if (input.url) {
|
|
16393
|
-
url = input.url;
|
|
16394
|
-
} else {
|
|
16395
|
-
return "";
|
|
16396
|
-
}
|
|
16397
|
-
} else {
|
|
16398
|
-
url = String(input);
|
|
16394
|
+
function bind59(liquidSwell) {
|
|
16395
|
+
return async function filterImgUrl(input, ...params) {
|
|
16396
|
+
const url = await getImageUrlFromInput(input, liquidSwell);
|
|
16397
|
+
if (typeof url !== "string" || url === "") {
|
|
16398
|
+
return "";
|
|
16399
16399
|
}
|
|
16400
16400
|
const query = [];
|
|
16401
16401
|
params.forEach((param) => {
|
|
@@ -20195,6 +20195,7 @@ function getHtmlCache(env, cacheRules) {
|
|
|
20195
20195
|
scopeCustomCSS,
|
|
20196
20196
|
stringifyQueryParams,
|
|
20197
20197
|
systemFonts,
|
|
20198
|
-
toBase64
|
|
20198
|
+
toBase64,
|
|
20199
|
+
toBlockId
|
|
20199
20200
|
});
|
|
20200
20201
|
//# sourceMappingURL=index.cjs.map
|