vobi_document 1.1.0 → 1.1.2
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/blocks.cjs +33 -25
- package/dist/blocks.d.cts +14 -1
- package/dist/blocks.d.ts +14 -1
- package/dist/blocks.js +3 -3
- package/dist/{chunk-ERKU5FDV.cjs → chunk-2VZW2MGO.cjs} +20 -2
- package/dist/chunk-2VZW2MGO.cjs.map +1 -0
- package/dist/{chunk-NDHTMYPA.cjs → chunk-A427FKMP.cjs} +20 -20
- package/dist/{chunk-NDHTMYPA.cjs.map → chunk-A427FKMP.cjs.map} +1 -1
- package/dist/{chunk-6GRYRVU5.js → chunk-BEG6KN5X.js} +5 -5
- package/dist/{chunk-6GRYRVU5.js.map → chunk-BEG6KN5X.js.map} +1 -1
- package/dist/{chunk-2EBYURIX.js → chunk-CZB7F2LA.js} +3 -3
- package/dist/{chunk-2EBYURIX.js.map → chunk-CZB7F2LA.js.map} +1 -1
- package/dist/{chunk-AQ5FAAP6.cjs → chunk-GR76U6FP.cjs} +37 -11
- package/dist/chunk-GR76U6FP.cjs.map +1 -0
- package/dist/{chunk-KUB3TYG2.cjs → chunk-I22MGPXO.cjs} +22 -7
- package/dist/chunk-I22MGPXO.cjs.map +1 -0
- package/dist/{chunk-X2BLERM5.cjs → chunk-KALUNX3C.cjs} +35 -27
- package/dist/chunk-KALUNX3C.cjs.map +1 -0
- package/dist/{chunk-JEVWEGSE.js → chunk-MUSSJOOA.js} +21 -7
- package/dist/chunk-MUSSJOOA.js.map +1 -0
- package/dist/{chunk-ABIEQHS2.js → chunk-N3IDPT3B.js} +31 -8
- package/dist/chunk-N3IDPT3B.js.map +1 -0
- package/dist/{chunk-IUDN2CGP.js → chunk-OJZJJEJX.js} +73 -32
- package/dist/chunk-OJZJJEJX.js.map +1 -0
- package/dist/{chunk-PLQNNXS2.js → chunk-QEWDIL2H.js} +20 -3
- package/dist/chunk-QEWDIL2H.js.map +1 -0
- package/dist/{chunk-ZXWOZZXO.cjs → chunk-QJ5W5EED.cjs} +4 -4
- package/dist/{chunk-ZXWOZZXO.cjs.map → chunk-QJ5W5EED.cjs.map} +1 -1
- package/dist/{chunk-HMTCQOEV.js → chunk-QRVQXVZC.js} +23 -15
- package/dist/chunk-QRVQXVZC.js.map +1 -0
- package/dist/{chunk-KCZKC3OG.js → chunk-QU6XF6OQ.js} +3 -3
- package/dist/{chunk-KCZKC3OG.js.map → chunk-QU6XF6OQ.js.map} +1 -1
- package/dist/{chunk-MHTTFNK2.cjs → chunk-RZOR3HOA.cjs} +80 -37
- package/dist/chunk-RZOR3HOA.cjs.map +1 -0
- package/dist/{chunk-U56KVTK5.cjs → chunk-SFKH6QYD.cjs} +8 -8
- package/dist/{chunk-U56KVTK5.cjs.map → chunk-SFKH6QYD.cjs.map} +1 -1
- package/dist/{chunk-M2TPAU2F.js → chunk-SOIYSSU3.js} +32 -3
- package/dist/chunk-SOIYSSU3.js.map +1 -0
- package/dist/{chunk-IRFFN74K.cjs → chunk-SP5LCPDG.cjs} +32 -2
- package/dist/chunk-SP5LCPDG.cjs.map +1 -0
- package/dist/editor.cjs +16 -16
- package/dist/editor.js +4 -4
- package/dist/index.cjs +132 -108
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/print.cjs +50 -18
- package/dist/print.cjs.map +1 -1
- package/dist/print.js +37 -5
- package/dist/print.js.map +1 -1
- package/dist/render.cjs +20 -20
- package/dist/render.js +5 -5
- package/dist/variables.cjs +41 -25
- package/dist/variables.d.cts +34 -2
- package/dist/variables.d.ts +34 -2
- package/dist/variables.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-ABIEQHS2.js.map +0 -1
- package/dist/chunk-AQ5FAAP6.cjs.map +0 -1
- package/dist/chunk-ERKU5FDV.cjs.map +0 -1
- package/dist/chunk-HMTCQOEV.js.map +0 -1
- package/dist/chunk-IRFFN74K.cjs.map +0 -1
- package/dist/chunk-IUDN2CGP.js.map +0 -1
- package/dist/chunk-JEVWEGSE.js.map +0 -1
- package/dist/chunk-KUB3TYG2.cjs.map +0 -1
- package/dist/chunk-M2TPAU2F.js.map +0 -1
- package/dist/chunk-MHTTFNK2.cjs.map +0 -1
- package/dist/chunk-PLQNNXS2.js.map +0 -1
- package/dist/chunk-X2BLERM5.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ import { ReactNode, CSSProperties } from 'react';
|
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { a as VariableCatalog, V as VariableDef } from './types-BgIugNWW.js';
|
|
11
11
|
export { R as ResolvedVariables, U as UnresolvedDisplay, b as VariableContext, c as VariableResolver, d as VariableType } from './types-BgIugNWW.js';
|
|
12
|
-
export { ButtonBlock, CONTENT_ICON_CATALOG, CONTENT_ICON_NAMES, ContentIcon, ContentIconDef, ContentIconProps, DividerBlock, HeadingBlock, IconTextBlock, ImageBlock, ImageGridBlock, ImageTextBlock, ListBlock, PageBreakBlock, QuoteBlock, RichText, RichTextProps, SpacerBlock, TableBlock, TextBlock, TwoColumnsBlock, blocksByKey, defaultBlocks, defineBlock, overrideBlock } from './blocks.js';
|
|
12
|
+
export { ButtonBlock, CONTENT_ICON_CATALOG, CONTENT_ICON_NAMES, ContentIcon, ContentIconDef, ContentIconProps, DOCUMENT_PROSE_CSS, DOCUMENT_TEXT_CSS, DividerBlock, HeadingBlock, IconTextBlock, ImageBlock, ImageGridBlock, ImageTextBlock, ListBlock, PageBreakBlock, QuoteBlock, RichText, RichTextProps, SpacerBlock, TableBlock, TextBlock, TwoColumnsBlock, blocksByKey, defaultBlocks, defineBlock, overrideBlock } from './blocks.js';
|
|
13
13
|
export { ColorPicker, ColorPickerPanel, ColorPickerPanelProps, ColorPickerProps, DEFAULT_COLOR_PRESETS, DataUpdater, DisabledBlock, DocumentEditor, DocumentEditorApi, DocumentEditorApiRef, DocumentEditorProps, DocumentHeaderApi, DocumentSettingsModal, DocumentSettingsModalProps, PuckState, SaveStatus, SettingsRenderProps, UseDocumentAutosaveOptions, UseDocumentAutosaveResult, hexToRgb, installModifierStateShim, normalizeHex, ptBrDictionary, rgbToHex, useDocumentAutosave, usePuckState } from './editor.js';
|
|
14
14
|
export { COMPANY_INFO_ICONS, COVER_TEMPLATE_IDS, CoverColorOverrides, CoverColors, CoverEditable, CoverEditableProps, CoverPage, CoverTemplateStatic, CoverTemplateStaticProps, DocumentRenderer, DocumentRendererProps, FOOTER_INFO_ORDER, FooterBar, HEADER_INFO_ORDER, HeaderBar, resolveCoverAccent, resolveCoverColors } from './render.js';
|
|
15
15
|
export { C as CompanyInfo, D as DG_ERROR, a as DG_MESSAGE_SOURCE, b as DG_READY } from './messages-Bi0JxNIH.js';
|
|
16
|
-
export { CHIP_CLASS, INVALID_CHIP_CLASS, NOT_INFORMED_LABEL, ResolvedProvider, VariableMenu, buildVariableChipHtml, collectVariableIssues, extractBindingKeys, findInvalidBindings, formatResolvedValues, formatValue, resolveDocumentVariables, resolveVariableHtml, useResolvedVariables, useUnresolvedDisplay, variableCatalogSchema, variableDefSchema, variableTypeSchema } from './variables.js';
|
|
16
|
+
export { CHIP_CLASS, EMPTY_CHIP_CLASS, INVALID_CHIP_CLASS, MenuAnchor, MenuPlacement, MenuViewport, NOT_INFORMED_LABEL, ResolvedProvider, VARIABLE_MENU_MAX_HEIGHT, VARIABLE_MENU_WIDTH, VariableMenu, buildVariableChipHtml, collectVariableIssues, extractBindingKeys, findInvalidBindings, formatResolvedValues, formatValue, placeVariableMenu, resolveDocumentVariables, resolveVariableHtml, useResolvedVariables, useUnresolvedDisplay, variableCatalogSchema, variableDefSchema, variableTypeSchema } from './variables.js';
|
|
17
17
|
export { C as CatalogProvider, T as Translator, u as useCatalog, a as useTranslator } from './catalogContext-HGMU-w_4.js';
|
|
18
18
|
import 'styled-components';
|
|
19
19
|
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { ButtonBlock, CONTENT_ICON_CATALOG, CONTENT_ICON_NAMES, ContentIcon, DividerBlock, HeadingBlock, IconTextBlock, ImageBlock, ImageGridBlock, ImageTextBlock, ListBlock, PageBreakBlock, QuoteBlock, RichText, SpacerBlock, TableBlock, TextBlock, TwoColumnsBlock, blocksByKey, defaultBlocks, defineBlock, overrideBlock } from './chunk-
|
|
2
|
-
import { themeSchema } from './chunk-
|
|
3
|
-
export { ColorPicker, ColorPickerPanel, DEFAULT_COLOR_PRESETS, DEFAULT_DOCUMENT_FONT_ID, DEFAULT_FOOTER_CONFIG, DEFAULT_HEADER_CONFIG, DocumentEditor, DocumentSettingsModal, coverFieldsSchema, footerConfigSchema, headerConfigSchema, hexToRgb, installModifierStateShim, normalizeHex, pageFormatSchema, ptBrDictionary, resolveTheme, rgbToHex, themeSchema, useDocumentAutosave, usePuckState } from './chunk-
|
|
1
|
+
export { ButtonBlock, CONTENT_ICON_CATALOG, CONTENT_ICON_NAMES, ContentIcon, DOCUMENT_PROSE_CSS, DOCUMENT_TEXT_CSS, DividerBlock, HeadingBlock, IconTextBlock, ImageBlock, ImageGridBlock, ImageTextBlock, ListBlock, PageBreakBlock, QuoteBlock, RichText, SpacerBlock, TableBlock, TextBlock, TwoColumnsBlock, blocksByKey, defaultBlocks, defineBlock, overrideBlock } from './chunk-OJZJJEJX.js';
|
|
2
|
+
import { themeSchema } from './chunk-QRVQXVZC.js';
|
|
3
|
+
export { ColorPicker, ColorPickerPanel, DEFAULT_COLOR_PRESETS, DEFAULT_DOCUMENT_FONT_ID, DEFAULT_FOOTER_CONFIG, DEFAULT_HEADER_CONFIG, DocumentEditor, DocumentSettingsModal, coverFieldsSchema, footerConfigSchema, headerConfigSchema, hexToRgb, installModifierStateShim, normalizeHex, pageFormatSchema, ptBrDictionary, resolveTheme, rgbToHex, themeSchema, useDocumentAutosave, usePuckState } from './chunk-QRVQXVZC.js';
|
|
4
4
|
import './chunk-QYBWIJXZ.js';
|
|
5
|
-
export { CoverEditable, CoverTemplateStatic } from './chunk-
|
|
5
|
+
export { CoverEditable, CoverTemplateStatic } from './chunk-QU6XF6OQ.js';
|
|
6
6
|
import './chunk-ZOJBDFKU.js';
|
|
7
|
-
export { COMPANY_INFO_ICONS, COVER_TEMPLATE_IDS, CoverPage, DG_ERROR, DG_MESSAGE_SOURCE, DG_READY, DocumentRenderer, FOOTER_INFO_ORDER, FooterBar, HEADER_INFO_ORDER, HeaderBar, resolveCoverAccent, resolveCoverColors } from './chunk-
|
|
8
|
-
export { DEFAULT_DOCUMENT_COLORS, DEFAULT_DOCUMENT_FONT, DEFAULT_PAGE_MARGINS, DOCUMENT_FONTS, DocumentPage, DocumentThemeProvider, EditorShell, FONT_WEIGHT, PageFrame, appearanceToStyle, buildConfig, fontStack, gfontHref, marginsToPadding, pageWidthPx, useDocumentFont, useDocumentTheme } from './chunk-
|
|
9
|
-
import { variableCatalogSchema } from './chunk-
|
|
10
|
-
export { VariableMenu, variableCatalogSchema, variableDefSchema, variableTypeSchema } from './chunk-
|
|
11
|
-
export { CHIP_CLASS, INVALID_CHIP_CLASS, NOT_INFORMED_LABEL, buildVariableChipHtml, collectVariableIssues, resolveVariableHtml } from './chunk-
|
|
12
|
-
export { formatResolvedValues, formatValue, resolveDocumentVariables } from './chunk-
|
|
13
|
-
import { findInvalidBindings } from './chunk-
|
|
14
|
-
export { CatalogProvider, ResolvedProvider, extractBindingKeys, findInvalidBindings, useCatalog, useResolvedVariables, useTranslator, useUnresolvedDisplay } from './chunk-
|
|
7
|
+
export { COMPANY_INFO_ICONS, COVER_TEMPLATE_IDS, CoverPage, DG_ERROR, DG_MESSAGE_SOURCE, DG_READY, DocumentRenderer, FOOTER_INFO_ORDER, FooterBar, HEADER_INFO_ORDER, HeaderBar, resolveCoverAccent, resolveCoverColors } from './chunk-BEG6KN5X.js';
|
|
8
|
+
export { DEFAULT_DOCUMENT_COLORS, DEFAULT_DOCUMENT_FONT, DEFAULT_PAGE_MARGINS, DOCUMENT_FONTS, DocumentPage, DocumentThemeProvider, EditorShell, FONT_WEIGHT, PageFrame, appearanceToStyle, buildConfig, fontStack, gfontHref, marginsToPadding, pageWidthPx, useDocumentFont, useDocumentTheme } from './chunk-QEWDIL2H.js';
|
|
9
|
+
import { variableCatalogSchema } from './chunk-N3IDPT3B.js';
|
|
10
|
+
export { VARIABLE_MENU_MAX_HEIGHT, VARIABLE_MENU_WIDTH, VariableMenu, placeVariableMenu, variableCatalogSchema, variableDefSchema, variableTypeSchema } from './chunk-N3IDPT3B.js';
|
|
11
|
+
export { CHIP_CLASS, EMPTY_CHIP_CLASS, INVALID_CHIP_CLASS, NOT_INFORMED_LABEL, buildVariableChipHtml, collectVariableIssues, resolveVariableHtml } from './chunk-MUSSJOOA.js';
|
|
12
|
+
export { formatResolvedValues, formatValue, resolveDocumentVariables } from './chunk-CZB7F2LA.js';
|
|
13
|
+
import { findInvalidBindings } from './chunk-SOIYSSU3.js';
|
|
14
|
+
export { CatalogProvider, ResolvedProvider, extractBindingKeys, findInvalidBindings, useCatalog, useResolvedVariables, useTranslator, useUnresolvedDisplay } from './chunk-SOIYSSU3.js';
|
|
15
15
|
export { ActionBar, createUsePuck, registerOverlayPortal, useGetPuck, usePuck } from './chunk-GVBGVF6Y.js';
|
|
16
16
|
import { z } from 'zod';
|
|
17
17
|
|
package/dist/print.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkLNBAFOVK_cjs = require('./chunk-LNBAFOVK.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var chunkA427FKMP_cjs = require('./chunk-A427FKMP.cjs');
|
|
5
|
+
var chunk2VZW2MGO_cjs = require('./chunk-2VZW2MGO.cjs');
|
|
6
|
+
require('./chunk-QJ5W5EED.cjs');
|
|
7
|
+
require('./chunk-SP5LCPDG.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var server = require('react-dom/server');
|
|
10
10
|
var styledComponents = require('styled-components');
|
|
@@ -29,7 +29,7 @@ function footerHeightPx(theme = {}) {
|
|
|
29
29
|
var DEFAULT_NO_CUT_BLOCKS = ["Image", "Button", "Divider", "IconText", "ImageGrid", "ImageText"];
|
|
30
30
|
function buildPageCss(theme = {}, opts = {}) {
|
|
31
31
|
const noCutBlocks = opts.noCutBlockKeys ?? DEFAULT_NO_CUT_BLOCKS;
|
|
32
|
-
const margins = { ...
|
|
32
|
+
const margins = { ...chunk2VZW2MGO_cjs.DEFAULT_PAGE_MARGINS, ...theme.page?.margins };
|
|
33
33
|
const format = theme.page?.format ?? "A4";
|
|
34
34
|
const size = theme.page?.orientation === "landscape" ? `${format} landscape` : format;
|
|
35
35
|
const hasHeader = Boolean(theme.header?.enabled);
|
|
@@ -39,7 +39,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
39
39
|
const hasCover = Boolean(opts.hasCover);
|
|
40
40
|
const headerH = headerHeightPx(theme);
|
|
41
41
|
const footerH = footerHeightPx(theme);
|
|
42
|
-
const pageBg = theme.colors?.background ??
|
|
42
|
+
const pageBg = theme.colors?.background ?? chunk2VZW2MGO_cjs.DEFAULT_DOCUMENT_COLORS.background;
|
|
43
43
|
const top = hasHeader ? headerH + CONTENT_GAP_PX : margins.top;
|
|
44
44
|
const numberBase = hasFooter ? footerH : margins.bottom;
|
|
45
45
|
const bottom = hasFooterBox ? numberBase + NUMBER_STRIP_PX : margins.bottom;
|
|
@@ -98,7 +98,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
98
98
|
font-size: 12px;
|
|
99
99
|
font-weight: 500;
|
|
100
100
|
line-height: 18px;
|
|
101
|
-
color: ${theme.colors?.text ??
|
|
101
|
+
color: ${theme.colors?.text ?? chunk2VZW2MGO_cjs.DEFAULT_DOCUMENT_COLORS.text};
|
|
102
102
|
}`);
|
|
103
103
|
}
|
|
104
104
|
if (hasFooter) {
|
|
@@ -117,6 +117,8 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
117
117
|
padding: 0;
|
|
118
118
|
}`);
|
|
119
119
|
parts.push(`${noCutBlocks.map((key) => `[data-docgen-block="${key}"]`).join(",\n")} { break-inside: avoid; }`);
|
|
120
|
+
const pageH = theme.page?.orientation === "landscape" ? chunk2VZW2MGO_cjs.pageWidthPx(format) : chunk2VZW2MGO_cjs.pageHeightPx(format);
|
|
121
|
+
parts.push(`:where([data-docgen-block]) img { max-height: ${pageH - top - bottom}px; object-fit: contain; }`);
|
|
120
122
|
parts.push(`[data-docgen-block="PageBreak"] { break-after: page; }
|
|
121
123
|
[data-docgen-block] { orphans: 2; widows: 2; }
|
|
122
124
|
.dg-no-break { break-inside: avoid; }
|
|
@@ -199,12 +201,41 @@ var REPEAT_TABLE_HEADERS = `(function () {
|
|
|
199
201
|
window.Paged.registerHandlers(RepeatingTableHeaders);
|
|
200
202
|
})();`;
|
|
201
203
|
|
|
204
|
+
// src/render/undisplayedFix.ts
|
|
205
|
+
var UNDISPLAYED_FIX = `(function () {
|
|
206
|
+
var handlers = window.Paged && window.Paged.registeredHandlers;
|
|
207
|
+
if (!handlers) return;
|
|
208
|
+
|
|
209
|
+
handlers.forEach(function (Handler) {
|
|
210
|
+
var proto = Handler && Handler.prototype;
|
|
211
|
+
if (!proto || typeof proto.filter !== 'function' || typeof proto.sortDisplayedSelectors !== 'function') return;
|
|
212
|
+
|
|
213
|
+
proto.filter = function (content) {
|
|
214
|
+
var sorted = this.sortDisplayedSelectors(content, this.displayRules);
|
|
215
|
+
var matches = sorted.matches;
|
|
216
|
+
var selectors = sorted.selectors;
|
|
217
|
+
|
|
218
|
+
for (var i = 0; i < matches.length; i++) {
|
|
219
|
+
var selector = selectors[i];
|
|
220
|
+
if (this.removable(matches[i]) && selector[selector.length - 1].value === 'none') {
|
|
221
|
+
matches[i].dataset.undisplayed = 'undisplayed';
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
var styled = content.querySelectorAll('[style]');
|
|
226
|
+
for (var j = 0; j < styled.length; j++) {
|
|
227
|
+
if (styled[j].style.display === 'none') styled[j].dataset.undisplayed = 'undisplayed';
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
})();`;
|
|
232
|
+
|
|
202
233
|
// src/render/previewBootstrap.ts
|
|
203
234
|
var ASSET_TIMEOUT_MS = 5e3;
|
|
204
235
|
var PREVIEW_BOOTSTRAP = `(function () {
|
|
205
236
|
function send(type, detail) {
|
|
206
237
|
if (window.parent && window.parent !== window) {
|
|
207
|
-
window.parent.postMessage({ source: '${
|
|
238
|
+
window.parent.postMessage({ source: '${chunkA427FKMP_cjs.DG_MESSAGE_SOURCE}', type: type, detail: detail || null }, '*');
|
|
208
239
|
}
|
|
209
240
|
}
|
|
210
241
|
function waitAssets() {
|
|
@@ -219,8 +250,8 @@ var PREVIEW_BOOTSTRAP = `(function () {
|
|
|
219
250
|
function run() {
|
|
220
251
|
waitAssets()
|
|
221
252
|
.then(function () { return window.PagedPolyfill.preview(); })
|
|
222
|
-
.then(function () { send('${
|
|
223
|
-
['catch'](function (err) { send('${
|
|
253
|
+
.then(function () { send('${chunkA427FKMP_cjs.DG_READY}'); })
|
|
254
|
+
['catch'](function (err) { send('${chunkA427FKMP_cjs.DG_ERROR}', String((err && err.message) || err)); });
|
|
224
255
|
}
|
|
225
256
|
if (document.readyState === 'loading') {
|
|
226
257
|
document.addEventListener('DOMContentLoaded', run);
|
|
@@ -255,7 +286,7 @@ var collectFontHrefs = (data, theme) => {
|
|
|
255
286
|
const fontFamily = item?.props?.appearance?.fontFamily;
|
|
256
287
|
if (fontFamily) ids.add(fontFamily);
|
|
257
288
|
});
|
|
258
|
-
return [...ids].map((id) =>
|
|
289
|
+
return [...ids].map((id) => chunk2VZW2MGO_cjs.gfontHref(id)).filter((href) => Boolean(href));
|
|
259
290
|
};
|
|
260
291
|
var renderBody = (opts) => {
|
|
261
292
|
const sheet = new styledComponents.ServerStyleSheet();
|
|
@@ -263,7 +294,7 @@ var renderBody = (opts) => {
|
|
|
263
294
|
const [first, ...rest] = opts.data.content ?? [];
|
|
264
295
|
const coverBlock = first?.type === (opts.coverBlockKey ?? DEFAULT_COVER_BLOCK_KEY) ? first : null;
|
|
265
296
|
const contentData = coverBlock ? { ...opts.data, content: rest } : opts.data;
|
|
266
|
-
const documentRenderer = react.createElement(
|
|
297
|
+
const documentRenderer = react.createElement(chunkA427FKMP_cjs.DocumentRenderer, {
|
|
267
298
|
registry: opts.registry,
|
|
268
299
|
data: contentData,
|
|
269
300
|
theme: opts.theme,
|
|
@@ -278,7 +309,7 @@ var renderBody = (opts) => {
|
|
|
278
309
|
react.createElement(
|
|
279
310
|
react.Fragment,
|
|
280
311
|
null,
|
|
281
|
-
coverBlock ? react.createElement(
|
|
312
|
+
coverBlock ? react.createElement(chunkA427FKMP_cjs.CoverPage, {
|
|
282
313
|
templateId: coverProps?.templateId,
|
|
283
314
|
accent: coverProps?.accent,
|
|
284
315
|
fields: coverProps?.fields,
|
|
@@ -286,13 +317,13 @@ var renderBody = (opts) => {
|
|
|
286
317
|
textColor: coverProps?.textColor,
|
|
287
318
|
bgColor: coverProps?.bgColor
|
|
288
319
|
}) : null,
|
|
289
|
-
react.createElement(
|
|
320
|
+
react.createElement(chunkA427FKMP_cjs.HeaderBar, {
|
|
290
321
|
config: opts.theme?.header,
|
|
291
322
|
companyInfo: opts.companyInfo,
|
|
292
323
|
logoUrl: opts.theme?.logo?.url,
|
|
293
324
|
documentFont: opts.theme?.documentFont
|
|
294
325
|
}),
|
|
295
|
-
react.createElement(
|
|
326
|
+
react.createElement(chunkA427FKMP_cjs.FooterBar, {
|
|
296
327
|
config: opts.theme?.footer,
|
|
297
328
|
companyInfo: opts.companyInfo,
|
|
298
329
|
documentFont: opts.theme?.documentFont
|
|
@@ -324,6 +355,7 @@ function buildDocumentHtml(opts) {
|
|
|
324
355
|
"<style>body { margin: 0; background: #E8E9EB; } .pagedjs_page { box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18); margin: 16px auto; }</style>",
|
|
325
356
|
"<script>window.PagedConfig = { auto: false };</script>",
|
|
326
357
|
`<script>${PAGEDJS_SOURCE}</script>`,
|
|
358
|
+
`<script>${UNDISPLAYED_FIX}</script>`,
|
|
327
359
|
`<script>${REPEAT_TABLE_HEADERS}</script>`,
|
|
328
360
|
`<script>${PREVIEW_BOOTSTRAP}</script>`,
|
|
329
361
|
"</head>",
|
|
@@ -334,15 +366,15 @@ function buildDocumentHtml(opts) {
|
|
|
334
366
|
|
|
335
367
|
Object.defineProperty(exports, "DG_ERROR", {
|
|
336
368
|
enumerable: true,
|
|
337
|
-
get: function () { return
|
|
369
|
+
get: function () { return chunkA427FKMP_cjs.DG_ERROR; }
|
|
338
370
|
});
|
|
339
371
|
Object.defineProperty(exports, "DG_MESSAGE_SOURCE", {
|
|
340
372
|
enumerable: true,
|
|
341
|
-
get: function () { return
|
|
373
|
+
get: function () { return chunkA427FKMP_cjs.DG_MESSAGE_SOURCE; }
|
|
342
374
|
});
|
|
343
375
|
Object.defineProperty(exports, "DG_READY", {
|
|
344
376
|
enumerable: true,
|
|
345
|
-
get: function () { return
|
|
377
|
+
get: function () { return chunkA427FKMP_cjs.DG_READY; }
|
|
346
378
|
});
|
|
347
379
|
exports.DEFAULT_COVER_BLOCK_KEY = DEFAULT_COVER_BLOCK_KEY;
|
|
348
380
|
exports.DEFAULT_NO_CUT_BLOCKS = DEFAULT_NO_CUT_BLOCKS;
|