vobi_document 1.1.5 → 1.1.7
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/{chunk-3F5SJWGQ.cjs → chunk-CSQHYPHU.cjs} +14 -14
- package/dist/{chunk-3F5SJWGQ.cjs.map → chunk-CSQHYPHU.cjs.map} +1 -1
- package/dist/{chunk-LQAZBMG4.cjs → chunk-LQIV7LT7.cjs} +8 -8
- package/dist/{chunk-LQAZBMG4.cjs.map → chunk-LQIV7LT7.cjs.map} +1 -1
- package/dist/{chunk-4BAC7SQD.js → chunk-NLM2NZWH.js} +3 -3
- package/dist/{chunk-4BAC7SQD.js.map → chunk-NLM2NZWH.js.map} +1 -1
- package/dist/{chunk-QQHKBSAG.js → chunk-PNCVE5YE.js} +3 -3
- package/dist/{chunk-QQHKBSAG.js.map → chunk-PNCVE5YE.js.map} +1 -1
- package/dist/{chunk-GDLKTYDB.cjs → chunk-RGA2OGHE.cjs} +3 -3
- package/dist/{chunk-GDLKTYDB.cjs.map → chunk-RGA2OGHE.cjs.map} +1 -1
- package/dist/{chunk-RKYQRL6M.cjs → chunk-RGG5BGMG.cjs} +17 -17
- package/dist/chunk-RGG5BGMG.cjs.map +1 -0
- package/dist/{chunk-MFBZNNYC.js → chunk-Y7ADQ2HV.js} +4 -4
- package/dist/chunk-Y7ADQ2HV.js.map +1 -0
- package/dist/{chunk-K6ZKB5EA.js → chunk-Z3ZCB3ZT.js} +3 -3
- package/dist/{chunk-K6ZKB5EA.js.map → chunk-Z3ZCB3ZT.js.map} +1 -1
- package/dist/editor.cjs +14 -14
- package/dist/editor.js +2 -2
- package/dist/index.cjs +58 -58
- package/dist/index.js +5 -5
- package/dist/print.cjs +60 -25
- package/dist/print.cjs.map +1 -1
- package/dist/print.js +46 -11
- package/dist/print.js.map +1 -1
- package/dist/render.cjs +18 -18
- package/dist/render.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-MFBZNNYC.js.map +0 -1
- package/dist/chunk-RKYQRL6M.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkUSMVHVHF_cjs = require('./chunk-USMVHVHF.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkCSQHYPHU_cjs = require('./chunk-CSQHYPHU.cjs');
|
|
5
5
|
require('./chunk-L5FXGEKX.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkLQIV7LT7_cjs = require('./chunk-LQIV7LT7.cjs');
|
|
7
7
|
require('./chunk-LNBAFOVK.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var chunkRGG5BGMG_cjs = require('./chunk-RGG5BGMG.cjs');
|
|
9
|
+
var chunkRGA2OGHE_cjs = require('./chunk-RGA2OGHE.cjs');
|
|
10
10
|
var chunkGR76U6FP_cjs = require('./chunk-GR76U6FP.cjs');
|
|
11
11
|
var chunkI22MGPXO_cjs = require('./chunk-I22MGPXO.cjs');
|
|
12
12
|
var chunkQJ5W5EED_cjs = require('./chunk-QJ5W5EED.cjs');
|
|
@@ -60,7 +60,7 @@ function buildPuckDataSchema(registry) {
|
|
|
60
60
|
function buildDocumentSchema(registry, options = {}) {
|
|
61
61
|
const base = zod.z.object({
|
|
62
62
|
data: buildPuckDataSchema(registry),
|
|
63
|
-
theme:
|
|
63
|
+
theme: chunkCSQHYPHU_cjs.themeSchema.optional(),
|
|
64
64
|
variables: chunkGR76U6FP_cjs.variableCatalogSchema.default({ catalog: [] })
|
|
65
65
|
}).strict();
|
|
66
66
|
const { catalog } = options;
|
|
@@ -176,215 +176,215 @@ Object.defineProperty(exports, "overrideBlock", {
|
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "ColorPicker", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkCSQHYPHU_cjs.ColorPicker; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "ColorPickerPanel", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkCSQHYPHU_cjs.ColorPickerPanel; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "DEFAULT_COLOR_PRESETS", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkCSQHYPHU_cjs.DEFAULT_COLOR_PRESETS; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "DEFAULT_DOCUMENT_FONT_ID", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkCSQHYPHU_cjs.DEFAULT_DOCUMENT_FONT_ID; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "DEFAULT_FOOTER_CONFIG", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkCSQHYPHU_cjs.DEFAULT_FOOTER_CONFIG; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "DEFAULT_HEADER_CONFIG", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkCSQHYPHU_cjs.DEFAULT_HEADER_CONFIG; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "DocumentEditor", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkCSQHYPHU_cjs.DocumentEditor; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "DocumentSettingsModal", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkCSQHYPHU_cjs.DocumentSettingsModal; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "coverFieldsSchema", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkCSQHYPHU_cjs.coverFieldsSchema; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "footerConfigSchema", {
|
|
214
214
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkCSQHYPHU_cjs.footerConfigSchema; }
|
|
216
216
|
});
|
|
217
217
|
Object.defineProperty(exports, "headerConfigSchema", {
|
|
218
218
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkCSQHYPHU_cjs.headerConfigSchema; }
|
|
220
220
|
});
|
|
221
221
|
Object.defineProperty(exports, "hexToRgb", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkCSQHYPHU_cjs.hexToRgb; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "installModifierStateShim", {
|
|
226
226
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkCSQHYPHU_cjs.installModifierStateShim; }
|
|
228
228
|
});
|
|
229
229
|
Object.defineProperty(exports, "normalizeHex", {
|
|
230
230
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkCSQHYPHU_cjs.normalizeHex; }
|
|
232
232
|
});
|
|
233
233
|
Object.defineProperty(exports, "pageFormatSchema", {
|
|
234
234
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkCSQHYPHU_cjs.pageFormatSchema; }
|
|
236
236
|
});
|
|
237
237
|
Object.defineProperty(exports, "ptBrDictionary", {
|
|
238
238
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkCSQHYPHU_cjs.ptBrDictionary; }
|
|
240
240
|
});
|
|
241
241
|
Object.defineProperty(exports, "resolveTheme", {
|
|
242
242
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkCSQHYPHU_cjs.resolveTheme; }
|
|
244
244
|
});
|
|
245
245
|
Object.defineProperty(exports, "rgbToHex", {
|
|
246
246
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkCSQHYPHU_cjs.rgbToHex; }
|
|
248
248
|
});
|
|
249
249
|
Object.defineProperty(exports, "themeSchema", {
|
|
250
250
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkCSQHYPHU_cjs.themeSchema; }
|
|
252
252
|
});
|
|
253
253
|
Object.defineProperty(exports, "useDocumentAutosave", {
|
|
254
254
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkCSQHYPHU_cjs.useDocumentAutosave; }
|
|
256
256
|
});
|
|
257
257
|
Object.defineProperty(exports, "usePuckState", {
|
|
258
258
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkCSQHYPHU_cjs.usePuckState; }
|
|
260
260
|
});
|
|
261
261
|
Object.defineProperty(exports, "CoverEditable", {
|
|
262
262
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkLQIV7LT7_cjs.CoverEditable; }
|
|
264
264
|
});
|
|
265
265
|
Object.defineProperty(exports, "CoverTemplateStatic", {
|
|
266
266
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkLQIV7LT7_cjs.CoverTemplateStatic; }
|
|
268
268
|
});
|
|
269
269
|
Object.defineProperty(exports, "COMPANY_INFO_ICONS", {
|
|
270
270
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
271
|
+
get: function () { return chunkRGG5BGMG_cjs.COMPANY_INFO_ICONS; }
|
|
272
272
|
});
|
|
273
273
|
Object.defineProperty(exports, "COVER_TEMPLATE_IDS", {
|
|
274
274
|
enumerable: true,
|
|
275
|
-
get: function () { return
|
|
275
|
+
get: function () { return chunkRGG5BGMG_cjs.COVER_TEMPLATE_IDS; }
|
|
276
276
|
});
|
|
277
277
|
Object.defineProperty(exports, "CoverPage", {
|
|
278
278
|
enumerable: true,
|
|
279
|
-
get: function () { return
|
|
279
|
+
get: function () { return chunkRGG5BGMG_cjs.CoverPage; }
|
|
280
280
|
});
|
|
281
281
|
Object.defineProperty(exports, "DG_ERROR", {
|
|
282
282
|
enumerable: true,
|
|
283
|
-
get: function () { return
|
|
283
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_ERROR; }
|
|
284
284
|
});
|
|
285
285
|
Object.defineProperty(exports, "DG_MESSAGE_SOURCE", {
|
|
286
286
|
enumerable: true,
|
|
287
|
-
get: function () { return
|
|
287
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_MESSAGE_SOURCE; }
|
|
288
288
|
});
|
|
289
289
|
Object.defineProperty(exports, "DG_READY", {
|
|
290
290
|
enumerable: true,
|
|
291
|
-
get: function () { return
|
|
291
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_READY; }
|
|
292
292
|
});
|
|
293
293
|
Object.defineProperty(exports, "DocumentRenderer", {
|
|
294
294
|
enumerable: true,
|
|
295
|
-
get: function () { return
|
|
295
|
+
get: function () { return chunkRGG5BGMG_cjs.DocumentRenderer; }
|
|
296
296
|
});
|
|
297
297
|
Object.defineProperty(exports, "FOOTER_INFO_ORDER", {
|
|
298
298
|
enumerable: true,
|
|
299
|
-
get: function () { return
|
|
299
|
+
get: function () { return chunkRGG5BGMG_cjs.FOOTER_INFO_ORDER; }
|
|
300
300
|
});
|
|
301
301
|
Object.defineProperty(exports, "FooterBar", {
|
|
302
302
|
enumerable: true,
|
|
303
|
-
get: function () { return
|
|
303
|
+
get: function () { return chunkRGG5BGMG_cjs.FooterBar; }
|
|
304
304
|
});
|
|
305
305
|
Object.defineProperty(exports, "HEADER_INFO_ORDER", {
|
|
306
306
|
enumerable: true,
|
|
307
|
-
get: function () { return
|
|
307
|
+
get: function () { return chunkRGG5BGMG_cjs.HEADER_INFO_ORDER; }
|
|
308
308
|
});
|
|
309
309
|
Object.defineProperty(exports, "HeaderBar", {
|
|
310
310
|
enumerable: true,
|
|
311
|
-
get: function () { return
|
|
311
|
+
get: function () { return chunkRGG5BGMG_cjs.HeaderBar; }
|
|
312
312
|
});
|
|
313
313
|
Object.defineProperty(exports, "resolveCoverAccent", {
|
|
314
314
|
enumerable: true,
|
|
315
|
-
get: function () { return
|
|
315
|
+
get: function () { return chunkRGG5BGMG_cjs.resolveCoverAccent; }
|
|
316
316
|
});
|
|
317
317
|
Object.defineProperty(exports, "resolveCoverColors", {
|
|
318
318
|
enumerable: true,
|
|
319
|
-
get: function () { return
|
|
319
|
+
get: function () { return chunkRGG5BGMG_cjs.resolveCoverColors; }
|
|
320
320
|
});
|
|
321
321
|
Object.defineProperty(exports, "DEFAULT_DOCUMENT_COLORS", {
|
|
322
322
|
enumerable: true,
|
|
323
|
-
get: function () { return
|
|
323
|
+
get: function () { return chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_COLORS; }
|
|
324
324
|
});
|
|
325
325
|
Object.defineProperty(exports, "DEFAULT_DOCUMENT_FONT", {
|
|
326
326
|
enumerable: true,
|
|
327
|
-
get: function () { return
|
|
327
|
+
get: function () { return chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_FONT; }
|
|
328
328
|
});
|
|
329
329
|
Object.defineProperty(exports, "DEFAULT_PAGE_MARGINS", {
|
|
330
330
|
enumerable: true,
|
|
331
|
-
get: function () { return
|
|
331
|
+
get: function () { return chunkRGA2OGHE_cjs.DEFAULT_PAGE_MARGINS; }
|
|
332
332
|
});
|
|
333
333
|
Object.defineProperty(exports, "DOCUMENT_FONTS", {
|
|
334
334
|
enumerable: true,
|
|
335
|
-
get: function () { return
|
|
335
|
+
get: function () { return chunkRGA2OGHE_cjs.DOCUMENT_FONTS; }
|
|
336
336
|
});
|
|
337
337
|
Object.defineProperty(exports, "DocumentPage", {
|
|
338
338
|
enumerable: true,
|
|
339
|
-
get: function () { return
|
|
339
|
+
get: function () { return chunkRGA2OGHE_cjs.DocumentPage; }
|
|
340
340
|
});
|
|
341
341
|
Object.defineProperty(exports, "DocumentThemeProvider", {
|
|
342
342
|
enumerable: true,
|
|
343
|
-
get: function () { return
|
|
343
|
+
get: function () { return chunkRGA2OGHE_cjs.DocumentThemeProvider; }
|
|
344
344
|
});
|
|
345
345
|
Object.defineProperty(exports, "EditorShell", {
|
|
346
346
|
enumerable: true,
|
|
347
|
-
get: function () { return
|
|
347
|
+
get: function () { return chunkRGA2OGHE_cjs.EditorShell; }
|
|
348
348
|
});
|
|
349
349
|
Object.defineProperty(exports, "FONT_WEIGHT", {
|
|
350
350
|
enumerable: true,
|
|
351
|
-
get: function () { return
|
|
351
|
+
get: function () { return chunkRGA2OGHE_cjs.FONT_WEIGHT; }
|
|
352
352
|
});
|
|
353
353
|
Object.defineProperty(exports, "PageFrame", {
|
|
354
354
|
enumerable: true,
|
|
355
|
-
get: function () { return
|
|
355
|
+
get: function () { return chunkRGA2OGHE_cjs.PageFrame; }
|
|
356
356
|
});
|
|
357
357
|
Object.defineProperty(exports, "appearanceToStyle", {
|
|
358
358
|
enumerable: true,
|
|
359
|
-
get: function () { return
|
|
359
|
+
get: function () { return chunkRGA2OGHE_cjs.appearanceToStyle; }
|
|
360
360
|
});
|
|
361
361
|
Object.defineProperty(exports, "buildConfig", {
|
|
362
362
|
enumerable: true,
|
|
363
|
-
get: function () { return
|
|
363
|
+
get: function () { return chunkRGA2OGHE_cjs.buildConfig; }
|
|
364
364
|
});
|
|
365
365
|
Object.defineProperty(exports, "fontStack", {
|
|
366
366
|
enumerable: true,
|
|
367
|
-
get: function () { return
|
|
367
|
+
get: function () { return chunkRGA2OGHE_cjs.fontStack; }
|
|
368
368
|
});
|
|
369
369
|
Object.defineProperty(exports, "gfontHref", {
|
|
370
370
|
enumerable: true,
|
|
371
|
-
get: function () { return
|
|
371
|
+
get: function () { return chunkRGA2OGHE_cjs.gfontHref; }
|
|
372
372
|
});
|
|
373
373
|
Object.defineProperty(exports, "marginsToPadding", {
|
|
374
374
|
enumerable: true,
|
|
375
|
-
get: function () { return
|
|
375
|
+
get: function () { return chunkRGA2OGHE_cjs.marginsToPadding; }
|
|
376
376
|
});
|
|
377
377
|
Object.defineProperty(exports, "pageWidthPx", {
|
|
378
378
|
enumerable: true,
|
|
379
|
-
get: function () { return
|
|
379
|
+
get: function () { return chunkRGA2OGHE_cjs.pageWidthPx; }
|
|
380
380
|
});
|
|
381
381
|
Object.defineProperty(exports, "useDocumentFont", {
|
|
382
382
|
enumerable: true,
|
|
383
|
-
get: function () { return
|
|
383
|
+
get: function () { return chunkRGA2OGHE_cjs.useDocumentFont; }
|
|
384
384
|
});
|
|
385
385
|
Object.defineProperty(exports, "useDocumentTheme", {
|
|
386
386
|
enumerable: true,
|
|
387
|
-
get: function () { return
|
|
387
|
+
get: function () { return chunkRGA2OGHE_cjs.useDocumentTheme; }
|
|
388
388
|
});
|
|
389
389
|
Object.defineProperty(exports, "VARIABLE_MENU_MAX_HEIGHT", {
|
|
390
390
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
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-NPNQGHGK.js';
|
|
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-
|
|
2
|
+
import { themeSchema } from './chunk-PNCVE5YE.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-PNCVE5YE.js';
|
|
4
4
|
import './chunk-QYBWIJXZ.js';
|
|
5
|
-
export { CoverEditable, CoverTemplateStatic } from './chunk-
|
|
5
|
+
export { CoverEditable, CoverTemplateStatic } from './chunk-NLM2NZWH.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-
|
|
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-Y7ADQ2HV.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-Z3ZCB3ZT.js';
|
|
9
9
|
import { variableCatalogSchema } from './chunk-N3IDPT3B.js';
|
|
10
10
|
export { VARIABLE_MENU_MAX_HEIGHT, VARIABLE_MENU_WIDTH, VariableMenu, placeVariableMenu, variableCatalogSchema, variableDefSchema, variableTypeSchema } from './chunk-N3IDPT3B.js';
|
|
11
11
|
export { CHIP_CLASS, EMPTY_CHIP_CLASS, INVALID_CHIP_CLASS, NOT_INFORMED_LABEL, buildVariableChipHtml, collectVariableIssues, resolveVariableHtml } from './chunk-MUSSJOOA.js';
|
package/dist/print.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkLNBAFOVK_cjs = require('./chunk-LNBAFOVK.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkRGG5BGMG_cjs = require('./chunk-RGG5BGMG.cjs');
|
|
5
|
+
var chunkRGA2OGHE_cjs = require('./chunk-RGA2OGHE.cjs');
|
|
6
6
|
require('./chunk-QJ5W5EED.cjs');
|
|
7
7
|
require('./chunk-SP5LCPDG.cjs');
|
|
8
8
|
var react = require('react');
|
|
@@ -30,7 +30,7 @@ function footerHeightPx(theme = {}) {
|
|
|
30
30
|
var DEFAULT_NO_CUT_BLOCKS = ["Image", "Button", "Divider", "IconText", "ImageGrid", "ImageText"];
|
|
31
31
|
function buildPageCss(theme = {}, opts = {}) {
|
|
32
32
|
const noCutBlocks = opts.noCutBlockKeys ?? DEFAULT_NO_CUT_BLOCKS;
|
|
33
|
-
const margins = { ...
|
|
33
|
+
const margins = { ...chunkRGA2OGHE_cjs.DEFAULT_PAGE_MARGINS, ...theme.page?.margins };
|
|
34
34
|
const format = theme.page?.format ?? "A4";
|
|
35
35
|
const size = theme.page?.orientation === "landscape" ? `${format} landscape` : format;
|
|
36
36
|
const hasHeader = Boolean(theme.header?.enabled);
|
|
@@ -40,7 +40,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
40
40
|
const hasCover = Boolean(opts.hasCover);
|
|
41
41
|
const headerH = headerHeightPx(theme);
|
|
42
42
|
const footerH = footerHeightPx(theme);
|
|
43
|
-
const pageBg = theme.colors?.background ??
|
|
43
|
+
const pageBg = theme.colors?.background ?? chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_COLORS.background;
|
|
44
44
|
const top = hasHeader ? headerH + CONTENT_GAP_PX : margins.top;
|
|
45
45
|
const numberBase = hasFooter ? footerH : margins.bottom;
|
|
46
46
|
const bottom = hasFooterBox ? numberBase + NUMBER_STRIP_PX : margins.bottom;
|
|
@@ -82,7 +82,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
82
82
|
.pagedjs_page .pagedjs_margin-top,
|
|
83
83
|
.pagedjs_page .pagedjs_margin-top-left-corner-holder,
|
|
84
84
|
.pagedjs_page .pagedjs_margin-top-right-corner-holder {
|
|
85
|
-
background: linear-gradient(${headerBg} ${
|
|
85
|
+
background: linear-gradient(${headerBg}, ${headerBg}) no-repeat 0 0 / 100% ${headerH}px;
|
|
86
86
|
}`);
|
|
87
87
|
}
|
|
88
88
|
if (hasFooterBox) {
|
|
@@ -99,7 +99,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
99
99
|
font-size: 12px;
|
|
100
100
|
font-weight: 500;
|
|
101
101
|
line-height: 18px;
|
|
102
|
-
color: ${theme.colors?.text ??
|
|
102
|
+
color: ${theme.colors?.text ?? chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_COLORS.text};
|
|
103
103
|
}`);
|
|
104
104
|
}
|
|
105
105
|
if (hasFooter) {
|
|
@@ -107,7 +107,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
107
107
|
parts.push(`.pagedjs_page .pagedjs_margin-bottom,
|
|
108
108
|
.pagedjs_page .pagedjs_margin-bottom-left-corner-holder,
|
|
109
109
|
.pagedjs_page .pagedjs_margin-bottom-right-corner-holder {
|
|
110
|
-
background: linear-gradient(
|
|
110
|
+
background: linear-gradient(${footerBg}, ${footerBg}) no-repeat 0 100% / 100% ${footerH}px;
|
|
111
111
|
}`);
|
|
112
112
|
}
|
|
113
113
|
parts.push(`.pagedjs_page_content [data-docgen-root] {
|
|
@@ -118,7 +118,7 @@ function buildPageCss(theme = {}, opts = {}) {
|
|
|
118
118
|
padding: 0;
|
|
119
119
|
}`);
|
|
120
120
|
parts.push(`${noCutBlocks.map((key) => `[data-docgen-block="${key}"]`).join(",\n")} { break-inside: avoid; }`);
|
|
121
|
-
const pageH = theme.page?.orientation === "landscape" ?
|
|
121
|
+
const pageH = theme.page?.orientation === "landscape" ? chunkRGA2OGHE_cjs.pageWidthPx(format) : chunkRGA2OGHE_cjs.pageHeightPx(format);
|
|
122
122
|
parts.push(`:where([data-docgen-block]) img { max-height: ${pageH - top - bottom}px; object-fit: contain; }`);
|
|
123
123
|
parts.push(`[data-docgen-block="PageBreak"] { break-after: page; }
|
|
124
124
|
[data-docgen-block] { orphans: 2; widows: 2; }
|
|
@@ -156,6 +156,36 @@ var REPEAT_TABLE_HEADERS = `(function () {
|
|
|
156
156
|
return ancestors;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
function isIgnorable(node) {
|
|
160
|
+
return node.nodeType === 8 || (node.nodeType === 3 && !node.textContent.trim());
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function nextSignificantNode(node) {
|
|
164
|
+
var sibling = node.nextSibling;
|
|
165
|
+
while (sibling) {
|
|
166
|
+
if (!isIgnorable(sibling)) return sibling;
|
|
167
|
+
sibling = sibling.nextSibling;
|
|
168
|
+
}
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function nodeAfter(node, limiter) {
|
|
173
|
+
if (limiter && node === limiter) return null;
|
|
174
|
+
var significant = nextSignificantNode(node);
|
|
175
|
+
if (significant) return significant;
|
|
176
|
+
var current = node;
|
|
177
|
+
while ((current = current.parentNode)) {
|
|
178
|
+
if (limiter && current === limiter) return null;
|
|
179
|
+
significant = nextSignificantNode(current);
|
|
180
|
+
if (significant) return significant;
|
|
181
|
+
}
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function hasChildTag(el, tag) {
|
|
186
|
+
return Array.prototype.slice.call(el.children).some(function (child) { return child.tagName === tag; });
|
|
187
|
+
}
|
|
188
|
+
|
|
159
189
|
class RepeatingTableHeaders extends window.Paged.Handler {
|
|
160
190
|
constructor(chunker, polisher, caller) {
|
|
161
191
|
super(chunker, polisher, caller);
|
|
@@ -177,7 +207,8 @@ var REPEAT_TABLE_HEADERS = `(function () {
|
|
|
177
207
|
var thead = node.tagName === 'THEAD' ? node : findFirstAncestor(node, 'thead');
|
|
178
208
|
if (thead) {
|
|
179
209
|
var lastTheadNode = thead.hasChildNodes() ? thead.lastChild : thead;
|
|
180
|
-
|
|
210
|
+
var next = nodeAfter(lastTheadNode, chunker.source);
|
|
211
|
+
if (next) breakToken.node = next;
|
|
181
212
|
}
|
|
182
213
|
}
|
|
183
214
|
|
|
@@ -188,12 +219,16 @@ var REPEAT_TABLE_HEADERS = `(function () {
|
|
|
188
219
|
if (!renderedTable || renderedTable.getAttribute('data-repeated-headers')) return;
|
|
189
220
|
var sourceTable = self.chunker.source.querySelector("[data-ref='" + ref + "']");
|
|
190
221
|
if (!sourceTable) return;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
222
|
+
if (!hasChildTag(renderedTable, 'COLGROUP')) {
|
|
223
|
+
var firstChild = renderedTable.firstChild;
|
|
224
|
+
sourceTable.querySelectorAll('colgroup').forEach(function (colgroup) {
|
|
225
|
+
renderedTable.insertBefore(colgroup.cloneNode(true), firstChild);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
195
228
|
var thead = sourceTable.querySelector('thead');
|
|
196
|
-
if (thead
|
|
229
|
+
if (thead && !hasChildTag(renderedTable, 'THEAD')) {
|
|
230
|
+
renderedTable.insertBefore(thead.cloneNode(true), renderedTable.firstChild);
|
|
231
|
+
}
|
|
197
232
|
renderedTable.setAttribute('data-repeated-headers', 'true');
|
|
198
233
|
});
|
|
199
234
|
}
|
|
@@ -236,7 +271,7 @@ var ASSET_TIMEOUT_MS = 5e3;
|
|
|
236
271
|
var PREVIEW_BOOTSTRAP = `(function () {
|
|
237
272
|
function send(type, detail) {
|
|
238
273
|
if (window.parent && window.parent !== window) {
|
|
239
|
-
window.parent.postMessage({ source: '${
|
|
274
|
+
window.parent.postMessage({ source: '${chunkRGG5BGMG_cjs.DG_MESSAGE_SOURCE}', type: type, detail: detail || null }, '*');
|
|
240
275
|
}
|
|
241
276
|
}
|
|
242
277
|
function waitAssets() {
|
|
@@ -251,8 +286,8 @@ var PREVIEW_BOOTSTRAP = `(function () {
|
|
|
251
286
|
function run() {
|
|
252
287
|
waitAssets()
|
|
253
288
|
.then(function () { return window.PagedPolyfill.preview(); })
|
|
254
|
-
.then(function () { send('${
|
|
255
|
-
['catch'](function (err) { send('${
|
|
289
|
+
.then(function () { send('${chunkRGG5BGMG_cjs.DG_READY}'); })
|
|
290
|
+
['catch'](function (err) { send('${chunkRGG5BGMG_cjs.DG_ERROR}', String((err && err.message) || err)); });
|
|
256
291
|
}
|
|
257
292
|
if (document.readyState === 'loading') {
|
|
258
293
|
document.addEventListener('DOMContentLoaded', run);
|
|
@@ -287,7 +322,7 @@ var collectFontHrefs = (data, theme) => {
|
|
|
287
322
|
const fontFamily = item?.props?.appearance?.fontFamily;
|
|
288
323
|
if (fontFamily) ids.add(fontFamily);
|
|
289
324
|
});
|
|
290
|
-
return [...ids].map((id) =>
|
|
325
|
+
return [...ids].map((id) => chunkRGA2OGHE_cjs.gfontHref(id)).filter((href) => Boolean(href));
|
|
291
326
|
};
|
|
292
327
|
var renderBody = (opts) => {
|
|
293
328
|
const sheet = new styledComponents.ServerStyleSheet();
|
|
@@ -295,7 +330,7 @@ var renderBody = (opts) => {
|
|
|
295
330
|
const [first, ...rest] = opts.data.content ?? [];
|
|
296
331
|
const coverBlock = first?.type === (opts.coverBlockKey ?? DEFAULT_COVER_BLOCK_KEY) ? first : null;
|
|
297
332
|
const contentData = coverBlock ? { ...opts.data, content: rest } : opts.data;
|
|
298
|
-
const documentRenderer = react.createElement(
|
|
333
|
+
const documentRenderer = react.createElement(chunkRGG5BGMG_cjs.DocumentRenderer, {
|
|
299
334
|
registry: opts.registry,
|
|
300
335
|
data: contentData,
|
|
301
336
|
theme: opts.theme,
|
|
@@ -310,7 +345,7 @@ var renderBody = (opts) => {
|
|
|
310
345
|
react.createElement(
|
|
311
346
|
react.Fragment,
|
|
312
347
|
null,
|
|
313
|
-
coverBlock ? react.createElement(
|
|
348
|
+
coverBlock ? react.createElement(chunkRGG5BGMG_cjs.CoverPage, {
|
|
314
349
|
templateId: coverProps?.templateId,
|
|
315
350
|
accent: coverProps?.accent,
|
|
316
351
|
fields: coverProps?.fields,
|
|
@@ -318,13 +353,13 @@ var renderBody = (opts) => {
|
|
|
318
353
|
textColor: coverProps?.textColor,
|
|
319
354
|
bgColor: coverProps?.bgColor
|
|
320
355
|
}) : null,
|
|
321
|
-
react.createElement(
|
|
356
|
+
react.createElement(chunkRGG5BGMG_cjs.HeaderBar, {
|
|
322
357
|
config: opts.theme?.header,
|
|
323
358
|
companyInfo: opts.companyInfo,
|
|
324
359
|
logoUrl: opts.theme?.logo?.url,
|
|
325
360
|
documentFont: opts.theme?.documentFont
|
|
326
361
|
}),
|
|
327
|
-
react.createElement(
|
|
362
|
+
react.createElement(chunkRGG5BGMG_cjs.FooterBar, {
|
|
328
363
|
config: opts.theme?.footer,
|
|
329
364
|
companyInfo: opts.companyInfo,
|
|
330
365
|
documentFont: opts.theme?.documentFont
|
|
@@ -367,15 +402,15 @@ function buildDocumentHtml(opts) {
|
|
|
367
402
|
|
|
368
403
|
Object.defineProperty(exports, "DG_ERROR", {
|
|
369
404
|
enumerable: true,
|
|
370
|
-
get: function () { return
|
|
405
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_ERROR; }
|
|
371
406
|
});
|
|
372
407
|
Object.defineProperty(exports, "DG_MESSAGE_SOURCE", {
|
|
373
408
|
enumerable: true,
|
|
374
|
-
get: function () { return
|
|
409
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_MESSAGE_SOURCE; }
|
|
375
410
|
});
|
|
376
411
|
Object.defineProperty(exports, "DG_READY", {
|
|
377
412
|
enumerable: true,
|
|
378
|
-
get: function () { return
|
|
413
|
+
get: function () { return chunkRGG5BGMG_cjs.DG_READY; }
|
|
379
414
|
});
|
|
380
415
|
exports.DEFAULT_COVER_BLOCK_KEY = DEFAULT_COVER_BLOCK_KEY;
|
|
381
416
|
exports.DEFAULT_NO_CUT_BLOCKS = DEFAULT_NO_CUT_BLOCKS;
|