@media-quest/builder 0.0.36 → 0.0.38
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/public-api.js +29 -16
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -2
- package/src/Builder-schema-dto.ts +16 -7
- package/src/Builder-schema.ts +1 -0
- package/src/theme/Default-theme.ts +14 -10
package/dist/public-api.js
CHANGED
|
@@ -1425,8 +1425,6 @@ var BuilderOptionTheme;
|
|
|
1425
1425
|
const BTN_BORDER_STYLE = "solid";
|
|
1426
1426
|
const FONT_WEIGHT = 500;
|
|
1427
1427
|
const FONT_SIZE = 36;
|
|
1428
|
-
const MAIN_TEXT_FONT_SIZE = { _unit: "px", value: 36 };
|
|
1429
|
-
const MAIN_TEXT_WIDTH = { _unit: "percent", value: 80 };
|
|
1430
1428
|
const BTN_PADDING_LEFT = 10;
|
|
1431
1429
|
const BTN_PADDING_TOP = 10;
|
|
1432
1430
|
const buttonBaseCss = () => ({
|
|
@@ -1490,18 +1488,22 @@ var BuilderOptionTheme;
|
|
|
1490
1488
|
return optionTheme;
|
|
1491
1489
|
};
|
|
1492
1490
|
})(BuilderOptionTheme || (BuilderOptionTheme = {}));
|
|
1493
|
-
var
|
|
1494
|
-
var
|
|
1495
|
-
var
|
|
1496
|
-
var
|
|
1491
|
+
var MAIN_TEXT_FONT_SIZE = { _unit: "px", value: 40 };
|
|
1492
|
+
var MAIN_TEXT_WIDTH = { _unit: "percent", value: 76 };
|
|
1493
|
+
var textHighTop = 30;
|
|
1494
|
+
var textLowTop = 72;
|
|
1495
|
+
var audioHighTop = 30;
|
|
1496
|
+
var audioLowTop = 72;
|
|
1497
1497
|
var textBase = {
|
|
1498
|
-
width:
|
|
1498
|
+
width: MAIN_TEXT_WIDTH,
|
|
1499
1499
|
// backgroundColor: "red",
|
|
1500
1500
|
top: textHighTop,
|
|
1501
|
-
left:
|
|
1502
|
-
|
|
1501
|
+
left: 14,
|
|
1502
|
+
lineHeight: 1.2,
|
|
1503
|
+
textAlign: "left",
|
|
1503
1504
|
textColor: "black",
|
|
1504
|
-
|
|
1505
|
+
transform: "translate(0, -50%)",
|
|
1506
|
+
fontSize: MAIN_TEXT_FONT_SIZE
|
|
1505
1507
|
};
|
|
1506
1508
|
var textHigh = { ...textBase, top: textHighTop };
|
|
1507
1509
|
var textLow = { ...textHigh, top: textLowTop };
|
|
@@ -1512,6 +1514,7 @@ var audioBase = {
|
|
|
1512
1514
|
top: audioHighTop,
|
|
1513
1515
|
cursor: "pointer",
|
|
1514
1516
|
opacity: 0.8,
|
|
1517
|
+
transform: "translate(0, -50%)",
|
|
1515
1518
|
visibility: "visible"
|
|
1516
1519
|
};
|
|
1517
1520
|
var audioHigh = { ...audioBase, top: audioHighTop };
|
|
@@ -2958,20 +2961,29 @@ var blockAutoplayVideo = (dto) => {
|
|
|
2958
2961
|
return dto;
|
|
2959
2962
|
};
|
|
2960
2963
|
var overrideVideoUrl = (dto, baseUrl) => {
|
|
2961
|
-
|
|
2962
|
-
|
|
2964
|
+
const mainMedia = dto.mainMedia;
|
|
2965
|
+
if (mainMedia && mainMedia.kind === "main-video") {
|
|
2966
|
+
const url = [baseUrl, mainMedia.file.id].join("/");
|
|
2967
|
+
const file = { ...mainMedia.file, downloadUrl: url };
|
|
2968
|
+
dto.mainMedia = { ...mainMedia, file };
|
|
2963
2969
|
}
|
|
2964
2970
|
return dto;
|
|
2965
2971
|
};
|
|
2966
2972
|
var overrideImageUrl = (dto, baseUrl) => {
|
|
2967
|
-
|
|
2968
|
-
|
|
2973
|
+
const mainMedia = dto.mainMedia;
|
|
2974
|
+
if (mainMedia && mainMedia.kind === "main-image") {
|
|
2975
|
+
const url = [baseUrl, mainMedia.file.id].join("/");
|
|
2976
|
+
const file = { ...mainMedia.file, downloadUrl: url };
|
|
2977
|
+
dto.mainMedia = { ...mainMedia, file };
|
|
2969
2978
|
}
|
|
2970
2979
|
return dto;
|
|
2971
2980
|
};
|
|
2972
2981
|
var overrideAudioUrl = (dto, baseUrl) => {
|
|
2973
|
-
|
|
2974
|
-
|
|
2982
|
+
const newAudioFile = { ...dto };
|
|
2983
|
+
const audioFile = newAudioFile.mainText.audioFile;
|
|
2984
|
+
if (audioFile) {
|
|
2985
|
+
const url = [baseUrl, audioFile.id].join("/");
|
|
2986
|
+
dto.mainText.audioFile = { ...audioFile, downloadUrl: url };
|
|
2975
2987
|
}
|
|
2976
2988
|
return dto;
|
|
2977
2989
|
};
|
|
@@ -3199,6 +3211,7 @@ var BuilderSchema = class _BuilderSchema {
|
|
|
3199
3211
|
}
|
|
3200
3212
|
});
|
|
3201
3213
|
let moduleDto = builderSchema.toJson();
|
|
3214
|
+
console.log(options.mediaAssets);
|
|
3202
3215
|
if (options.mediaAssets) {
|
|
3203
3216
|
const { videoFilesBaseUrl, audioFilesBaseUrl, imageFilesBaseUrl } = options.mediaAssets;
|
|
3204
3217
|
moduleDto = BuilderSchemaDto.overrideAllMediaUrls(moduleDto, {
|