@bookipi/htmlgenerator 1.5.26-alpha2 → 1.5.26-alpha3
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.js +9 -20
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -20
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -14161,7 +14161,7 @@ var increaseHexColorIntensity = function increaseHexColorIntensity(hex, amount)
|
|
|
14161
14161
|
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
14162
14162
|
};
|
|
14163
14163
|
|
|
14164
|
-
var _templateObject$O, _templateObject2$p, _templateObject3$b, _templateObject4$1, _templateObject5$1
|
|
14164
|
+
var _templateObject$O, _templateObject2$p, _templateObject3$b, _templateObject4$1, _templateObject5$1;
|
|
14165
14165
|
var html$L = String.raw;
|
|
14166
14166
|
var coverHtml = function coverHtml(_ref) {
|
|
14167
14167
|
var slide = _ref.slide,
|
|
@@ -14183,22 +14183,11 @@ var coverHtml = function coverHtml(_ref) {
|
|
|
14183
14183
|
var centerContent = "\n " + (titlePosition === 'center' ? titleHtml : '') + "\n " + (subtitlePosition === 'center' ? subtitleHtml : '') + "\n ";
|
|
14184
14184
|
var bottomContent = "\n " + (titlePosition === 'bottom' ? titleHtml : '') + "\n " + (subtitlePosition === 'bottom' ? subtitleHtml : '') + "\n ";
|
|
14185
14185
|
if (layout === 'split') {
|
|
14186
|
-
var _background$
|
|
14187
|
-
var leftIsImage = ((_background$left = background.left) === null || _background$left === void 0 ? void 0 : _background$left.type) === 'image';
|
|
14186
|
+
var _background$right;
|
|
14188
14187
|
var rightIsImage = ((_background$right = background.right) === null || _background$right === void 0 ? void 0 : _background$right.type) === 'image';
|
|
14189
|
-
var
|
|
14190
|
-
var
|
|
14191
|
-
|
|
14192
|
-
if (leftIsImage) {
|
|
14193
|
-
outerSplitStyle = "background-image:url(" + escapeHtml(background.left.url) + ")";
|
|
14194
|
-
} else if (rightIsImage) {
|
|
14195
|
-
outerSplitStyle = "background-image:url(" + escapeHtml(background.right.url) + ")";
|
|
14196
|
-
} else if ((_background$right3 = background.right) !== null && _background$right3 !== void 0 && _background$right3.value) {
|
|
14197
|
-
outerSplitStyle = "background:" + escapeHtml(background.right.value);
|
|
14198
|
-
} else {
|
|
14199
|
-
outerSplitStyle = "background:" + escapeHtml(themeColors.background);
|
|
14200
|
-
}
|
|
14201
|
-
return html$L(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n <div class=\"slide split\" style=\"", "\">\n <!-- ensure theme background color sits behind split-inner as a reliable fallback -->\n <div\n class=\"slide-bg\"\n style=\"background-color:", "\"\n ></div>\n <div class=\"split-inner\">\n <div class=\"left-content\" style=\"", "\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n ", "\n </div>\n </div>\n "])), outerSplitStyle, escapeHtml(themeColors.background), leftBgStyle, topContent, centerContent, bottomContent, rightIsImage ? html$L(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["<div class=\"right-image\">\n <img src=\"", "\" alt=\"\" />\n </div>"])), escapeHtml(background.right.url)) : html$L(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["<div class=\"right-image\" style=\"", "\"></div>"])), rightBgStyle));
|
|
14188
|
+
var rightBgStyle = rightIsImage ? "background-image:url(" + escapeHtml(background.right.value) + ")" : "background:" + escapeHtml(background.right.value);
|
|
14189
|
+
var outerSplitStyle = "background:" + escapeHtml(themeColors.background);
|
|
14190
|
+
return html$L(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n <div class=\"slide split\" style=\"", "\">\n <div class=\"split-inner\">\n <div class=\"left-content\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n <div class=\"right-image\" style=\"", "\"></div>\n </div>\n </div>\n "])), outerSplitStyle, topContent, centerContent, bottomContent, rightBgStyle);
|
|
14202
14191
|
}
|
|
14203
14192
|
var isImage = background.type === 'image';
|
|
14204
14193
|
var hasOverlay = isImage && background.overlay;
|
|
@@ -14210,10 +14199,10 @@ var coverHtml = function coverHtml(_ref) {
|
|
|
14210
14199
|
} else {
|
|
14211
14200
|
bgStyle = '';
|
|
14212
14201
|
}
|
|
14213
|
-
return html$L(
|
|
14202
|
+
return html$L(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\" style=\"", "\">\n ", "\n <div class=\"cover-inner\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n </div>\n "])), bgStyle, isImage ? html$L(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["<img\n class=\"slide-bg\"\n src=\"", "\"\n />"])), escapeHtml(background.value || '')) : '', topContent, centerContent, bottomContent);
|
|
14214
14203
|
};
|
|
14215
14204
|
|
|
14216
|
-
var _templateObject$P, _templateObject2$q, _templateObject3$c, _templateObject4$2, _templateObject5$2, _templateObject6$
|
|
14205
|
+
var _templateObject$P, _templateObject2$q, _templateObject3$c, _templateObject4$2, _templateObject5$2, _templateObject6$1;
|
|
14217
14206
|
var html$M = String.raw;
|
|
14218
14207
|
var bulletHtml = function bulletHtml(_ref) {
|
|
14219
14208
|
var slide = _ref.slide,
|
|
@@ -14232,7 +14221,7 @@ var bulletHtml = function bulletHtml(_ref) {
|
|
|
14232
14221
|
return html$M(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;\"\n >\n <span\n style=\"width:12px;height:12px;border-radius:50%;background:", ";border:3px solid ", ";position:relative;z-index:2;align-self:flex-start;display:block;flex-shrink:0;margin-bottom:8px;margin-left:8px;\"\n ></span>\n <div style=\"min-width:0;\">\n ", "\n ", "\n </div>\n </li>\n "])), escapeHtml(markerBg), escapeHtml(markerBorder), title ? html$M(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["<h3\n class=\"subtitle\"\n style=\"margin:0 0 6px;font-weight:600;\"\n >\n ", "\n </h3>"])), escapeHtml(title)) : '', desc ? html$M(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["<p\n class=\"text\"\n style=\"margin:0;color:var(--theme-text-color);\"\n >\n ", "\n </p>"])), escapeHtml(desc)) : '');
|
|
14233
14222
|
}).join('');
|
|
14234
14223
|
var ulHtml = html$M(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["<ul\n class=\"bullets-ul\"\n style=\"display:flex;gap:24px;list-style:none;padding:0;justify-content:center;width:auto;\"\n >\n ", "\n </ul>"])), listItems);
|
|
14235
|
-
return html$M(_templateObject6$
|
|
14224
|
+
return html$M(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["<div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])), escapeHtml(slide.title || ''), ulHtml);
|
|
14236
14225
|
};
|
|
14237
14226
|
|
|
14238
14227
|
var _templateObject$Q, _templateObject2$r;
|
|
@@ -14344,7 +14333,7 @@ var presentationStyle = function presentationStyle(_ref) {
|
|
|
14344
14333
|
subtitle: '#111827',
|
|
14345
14334
|
text: '#111827'
|
|
14346
14335
|
} : _ref$theme;
|
|
14347
|
-
return html$S(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n <style>\n :root {\n --slide-width: 1600px;\n --slide-height: 900px;\n --rounded: 24px;\n --theme-bg: ", ";\n --theme-title-color: ", ";\n --theme-subtitle-color: ", ";\n --theme-text-color: ", ";\n --print-width: 29.7cm; /* A4 long side (landscape width) */\n --print-height: 21cm; /* A4 short side (landscape height) */\n }\n @page {\n size: var(--print-width) var(--print-height);\n margin: 0;\n }\n\n @media print {\n html,\n body {\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slides-export {\n padding: 0 !important;\n margin: 0 !important;\n gap: 0 !important;\n align-items: stretch !important;\n display: block !important;\n }\n .slide {\n width: var(--print-width) !important;\n height: var(--print-height) !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden !important;\n margin: 0 !important;\n page-break-inside: avoid !important;\n break-inside: avoid !important;\n page-break-after: always !important;\n break-after: page !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide + .slide {\n page-break-before: always !important;\n break-before: page !important;\n }\n .slide:first-child {\n page-break-before: auto !important;\n }\n .slide:last-child {\n page-break-after: auto !important;\n }\n .slide-bg {\n position: absolute !important;\n inset: 0 !important;\n width: 100% !important;\n height: 100% !important;\n }\n .slide img.slide-bg,\n .right-image img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n display: block !important;\n }\n * {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n }\n body {\n background: var(--theme-bg);\n margin: 0;\n padding: 0;\n }\n .slides-export {\n font-family: ", ";\n padding: 40px;\n display: flex;\n flex-direction: column;\n gap: 32px;\n align-items: center;\n }\n .slide {\n position: relative;\n width: var(--slide-width);\n height: var(--slide-height);\n border-radius: var(--rounded);\n background: var(--theme-bg);\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n page-break-inside: avoid;\n break-inside: avoid;\n page-break-after: always;\n break-after: page;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide:last-child {\n page-break-after: auto;\n break-after: auto;\n }\n .slide.split {\n display: flex;\n }\n .split-inner {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: flex;\n }\n .cover-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n .cover-row {\n width: 100%;\n
|
|
14336
|
+
return html$S(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n <style>\n :root {\n --slide-width: 1600px;\n --slide-height: 900px;\n --rounded: 24px;\n --theme-bg: ", ";\n --theme-title-color: ", ";\n --theme-subtitle-color: ", ";\n --theme-text-color: ", ";\n --print-width: 29.7cm; /* A4 long side (landscape width) */\n --print-height: 21cm; /* A4 short side (landscape height) */\n }\n @page {\n size: var(--print-width) var(--print-height);\n margin: 0;\n }\n\n @media print {\n html,\n body {\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slides-export {\n padding: 0 !important;\n margin: 0 !important;\n gap: 0 !important;\n align-items: stretch !important;\n display: block !important;\n }\n .slide {\n width: var(--print-width) !important;\n height: var(--print-height) !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden !important;\n margin: 0 !important;\n page-break-inside: avoid !important;\n break-inside: avoid !important;\n page-break-after: always !important;\n break-after: page !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide + .slide {\n page-break-before: always !important;\n break-before: page !important;\n }\n .slide:first-child {\n page-break-before: auto !important;\n }\n .slide:last-child {\n page-break-after: auto !important;\n }\n .slide-bg {\n position: absolute !important;\n inset: 0 !important;\n width: 100% !important;\n height: 100% !important;\n }\n .slide img.slide-bg,\n .right-image img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n display: block !important;\n }\n * {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n }\n body {\n background: var(--theme-bg);\n margin: 0;\n padding: 0;\n }\n .slides-export {\n font-family: ", ";\n padding: 40px;\n display: flex;\n flex-direction: column;\n gap: 32px;\n align-items: center;\n }\n .slide {\n position: relative;\n width: var(--slide-width);\n height: var(--slide-height);\n border-radius: var(--rounded);\n background: var(--theme-bg);\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n page-break-inside: avoid;\n break-inside: avoid;\n page-break-after: always;\n break-after: page;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide:last-child {\n page-break-after: auto;\n break-after: auto;\n }\n .slide.split {\n display: flex;\n }\n .split-inner {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: flex;\n }\n .cover-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n .cover-row {\n width: 100%;\n box-sizing: border-box;\n }\n .cover-center {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n .cover-title {\n font-weight: 700;\n margin: 0 0 12px;\n font-size: 64px;\n color: var(--theme-title-color);\n }\n .cover-subtitle {\n margin: 0;\n font-size: 28px;\n color: var(--theme-subtitle-color);\n }\n .left-content {\n flex: 1 1 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n z-index: 1;\n }\n .right-image {\n width: 50%;\n min-width: 0;\n background-position: center;\n background-size: cover;\n z-index: 0;\n }\n .right-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n }\n .slide-bg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n }\n .content {\n position: relative;\n z-index: 1;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n padding: 40px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .page-number {\n position: absolute;\n top: 12px;\n right: 16px;\n font-size: 14px;\n color: var(--theme-subtitle-color);\n background: rgba(255,255,255,0.0);\n padding: 4px 8px;\n border-radius: 6px;\n z-index: 3;\n pointer-events: none;\n }\n .slide--bullet .content {\n align-items: flex-start;\n }\n .slide--bullet .title,\n .slide--bullet .subtitle,\n .slide--bullet .text {\n align-self: start;\n text-align: left;\n }\n .slide--bullet .bullets-ul {\n margin-top: 48px;\n }\n .slide--process .content {\n align-items: flex-start;\n }\n .slide--process .title,\n .slide--process .subtitle,\n .slide--process .text {\n align-self: start;\n text-align: left;\n }\n .slide--process .bullets-ul {\n margin-top: 48px;\n }\n .title {\n font-weight: 700;\n font-size: 36px;\n margin: 0 0 8px;\n text-align: center;\n color: var(--theme-title-color);\n }\n .subtitle {\n font-weight: 500;\n font-size: 28px;\n margin: 0;\n text-align: center;\n color: var(--theme-subtitle-color);\n }\n .text {\n font-size: 20px;\n margin-top: 12px;\n text-align: center;\n color: var(--theme-text-color);\n }\n .bullets {\n padding-left: 24px;\n font-size: 20px;\n }\n .image-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .image-wrapper img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n @media (max-width: 1200px) {\n :root {\n --slide-width: 960px;\n --slide-height: 540px;\n }\n .title {\n font-size: 36px;\n }\n }\n @media (max-width: 720px) {\n :root {\n --slide-width: 360px;\n --slide-height: 640px;\n }\n .title {\n font-size: 28px;\n }\n }\n </style>\n"])), theme.background, theme.title, theme.subtitle, theme.text, fontStack);
|
|
14348
14337
|
};
|
|
14349
14338
|
|
|
14350
14339
|
var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$5;
|