vobi_document 1.1.4 → 1.1.6

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.
Files changed (47) hide show
  1. package/dist/blocks.cjs +25 -25
  2. package/dist/blocks.d.cts +1 -1
  3. package/dist/blocks.d.ts +1 -1
  4. package/dist/blocks.js +1 -1
  5. package/dist/{chunk-3KIK2XTA.cjs → chunk-CSQHYPHU.cjs} +14 -14
  6. package/dist/{chunk-3KIK2XTA.cjs.map → chunk-CSQHYPHU.cjs.map} +1 -1
  7. package/dist/{chunk-D3JG6YEL.cjs → chunk-LQIV7LT7.cjs} +8 -8
  8. package/dist/{chunk-D3JG6YEL.cjs.map → chunk-LQIV7LT7.cjs.map} +1 -1
  9. package/dist/{chunk-2EVBMRJR.js → chunk-NLM2NZWH.js} +3 -3
  10. package/dist/{chunk-2EVBMRJR.js.map → chunk-NLM2NZWH.js.map} +1 -1
  11. package/dist/{chunk-P2FDTTXF.js → chunk-NPNQGHGK.js} +9 -9
  12. package/dist/{chunk-P2FDTTXF.js.map → chunk-NPNQGHGK.js.map} +1 -1
  13. package/dist/{chunk-EX252M4Y.js → chunk-PNCVE5YE.js} +3 -3
  14. package/dist/{chunk-EX252M4Y.js.map → chunk-PNCVE5YE.js.map} +1 -1
  15. package/dist/{chunk-5H27FECZ.cjs → chunk-RGA2OGHE.cjs} +4 -4
  16. package/dist/{chunk-5H27FECZ.cjs.map → chunk-RGA2OGHE.cjs.map} +1 -1
  17. package/dist/{chunk-CPU4SK5F.cjs → chunk-RGG5BGMG.cjs} +105 -105
  18. package/dist/chunk-RGG5BGMG.cjs.map +1 -0
  19. package/dist/{chunk-RP4T57MA.cjs → chunk-USMVHVHF.cjs} +9 -9
  20. package/dist/{chunk-RP4T57MA.cjs.map → chunk-USMVHVHF.cjs.map} +1 -1
  21. package/dist/{chunk-PBBPAMLP.js → chunk-Y7ADQ2HV.js} +93 -93
  22. package/dist/chunk-Y7ADQ2HV.js.map +1 -0
  23. package/dist/{chunk-DQ4AL6SJ.js → chunk-Z3ZCB3ZT.js} +4 -4
  24. package/dist/{chunk-DQ4AL6SJ.js.map → chunk-Z3ZCB3ZT.js.map} +1 -1
  25. package/dist/editor.cjs +14 -14
  26. package/dist/editor.d.cts +1 -1
  27. package/dist/editor.d.ts +1 -1
  28. package/dist/editor.js +2 -2
  29. package/dist/index.cjs +83 -83
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +6 -6
  33. package/dist/print.cjs +19 -19
  34. package/dist/print.cjs.map +1 -1
  35. package/dist/print.d.cts +1 -1
  36. package/dist/print.d.ts +1 -1
  37. package/dist/print.js +5 -5
  38. package/dist/print.js.map +1 -1
  39. package/dist/render.cjs +18 -18
  40. package/dist/render.d.cts +1 -1
  41. package/dist/render.d.ts +1 -1
  42. package/dist/render.js +3 -3
  43. package/dist/{theme-BuEFpQeZ.d.cts → theme-DWRLG-2_.d.cts} +1 -1
  44. package/dist/{theme-BuEFpQeZ.d.ts → theme-DWRLG-2_.d.ts} +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-CPU4SK5F.cjs.map +0 -1
  47. package/dist/chunk-PBBPAMLP.js.map +0 -1
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 chunkCPU4SK5F_cjs = require('./chunk-CPU4SK5F.cjs');
5
- var chunk5H27FECZ_cjs = require('./chunk-5H27FECZ.cjs');
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 = { ...chunk5H27FECZ_cjs.DEFAULT_PAGE_MARGINS, ...theme.page?.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 ?? chunk5H27FECZ_cjs.DEFAULT_DOCUMENT_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} ${headerH}px, transparent ${headerH}px);
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 ?? chunk5H27FECZ_cjs.DEFAULT_DOCUMENT_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(transparent ${NUMBER_STRIP_PX}px, ${footerBg} ${NUMBER_STRIP_PX}px);
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" ? chunk5H27FECZ_cjs.pageWidthPx(format) : chunk5H27FECZ_cjs.pageHeightPx(format);
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; }
@@ -236,7 +236,7 @@ var ASSET_TIMEOUT_MS = 5e3;
236
236
  var PREVIEW_BOOTSTRAP = `(function () {
237
237
  function send(type, detail) {
238
238
  if (window.parent && window.parent !== window) {
239
- window.parent.postMessage({ source: '${chunkCPU4SK5F_cjs.DG_MESSAGE_SOURCE}', type: type, detail: detail || null }, '*');
239
+ window.parent.postMessage({ source: '${chunkRGG5BGMG_cjs.DG_MESSAGE_SOURCE}', type: type, detail: detail || null }, '*');
240
240
  }
241
241
  }
242
242
  function waitAssets() {
@@ -251,8 +251,8 @@ var PREVIEW_BOOTSTRAP = `(function () {
251
251
  function run() {
252
252
  waitAssets()
253
253
  .then(function () { return window.PagedPolyfill.preview(); })
254
- .then(function () { send('${chunkCPU4SK5F_cjs.DG_READY}'); })
255
- ['catch'](function (err) { send('${chunkCPU4SK5F_cjs.DG_ERROR}', String((err && err.message) || err)); });
254
+ .then(function () { send('${chunkRGG5BGMG_cjs.DG_READY}'); })
255
+ ['catch'](function (err) { send('${chunkRGG5BGMG_cjs.DG_ERROR}', String((err && err.message) || err)); });
256
256
  }
257
257
  if (document.readyState === 'loading') {
258
258
  document.addEventListener('DOMContentLoaded', run);
@@ -287,7 +287,7 @@ var collectFontHrefs = (data, theme) => {
287
287
  const fontFamily = item?.props?.appearance?.fontFamily;
288
288
  if (fontFamily) ids.add(fontFamily);
289
289
  });
290
- return [...ids].map((id) => chunk5H27FECZ_cjs.gfontHref(id)).filter((href) => Boolean(href));
290
+ return [...ids].map((id) => chunkRGA2OGHE_cjs.gfontHref(id)).filter((href) => Boolean(href));
291
291
  };
292
292
  var renderBody = (opts) => {
293
293
  const sheet = new styledComponents.ServerStyleSheet();
@@ -295,7 +295,7 @@ var renderBody = (opts) => {
295
295
  const [first, ...rest] = opts.data.content ?? [];
296
296
  const coverBlock = first?.type === (opts.coverBlockKey ?? DEFAULT_COVER_BLOCK_KEY) ? first : null;
297
297
  const contentData = coverBlock ? { ...opts.data, content: rest } : opts.data;
298
- const documentRenderer = react.createElement(chunkCPU4SK5F_cjs.DocumentRenderer, {
298
+ const documentRenderer = react.createElement(chunkRGG5BGMG_cjs.DocumentRenderer, {
299
299
  registry: opts.registry,
300
300
  data: contentData,
301
301
  theme: opts.theme,
@@ -310,7 +310,7 @@ var renderBody = (opts) => {
310
310
  react.createElement(
311
311
  react.Fragment,
312
312
  null,
313
- coverBlock ? react.createElement(chunkCPU4SK5F_cjs.CoverPage, {
313
+ coverBlock ? react.createElement(chunkRGG5BGMG_cjs.CoverPage, {
314
314
  templateId: coverProps?.templateId,
315
315
  accent: coverProps?.accent,
316
316
  fields: coverProps?.fields,
@@ -318,13 +318,13 @@ var renderBody = (opts) => {
318
318
  textColor: coverProps?.textColor,
319
319
  bgColor: coverProps?.bgColor
320
320
  }) : null,
321
- react.createElement(chunkCPU4SK5F_cjs.HeaderBar, {
321
+ react.createElement(chunkRGG5BGMG_cjs.HeaderBar, {
322
322
  config: opts.theme?.header,
323
323
  companyInfo: opts.companyInfo,
324
324
  logoUrl: opts.theme?.logo?.url,
325
325
  documentFont: opts.theme?.documentFont
326
326
  }),
327
- react.createElement(chunkCPU4SK5F_cjs.FooterBar, {
327
+ react.createElement(chunkRGG5BGMG_cjs.FooterBar, {
328
328
  config: opts.theme?.footer,
329
329
  companyInfo: opts.companyInfo,
330
330
  documentFont: opts.theme?.documentFont
@@ -367,15 +367,15 @@ function buildDocumentHtml(opts) {
367
367
 
368
368
  Object.defineProperty(exports, "DG_ERROR", {
369
369
  enumerable: true,
370
- get: function () { return chunkCPU4SK5F_cjs.DG_ERROR; }
370
+ get: function () { return chunkRGG5BGMG_cjs.DG_ERROR; }
371
371
  });
372
372
  Object.defineProperty(exports, "DG_MESSAGE_SOURCE", {
373
373
  enumerable: true,
374
- get: function () { return chunkCPU4SK5F_cjs.DG_MESSAGE_SOURCE; }
374
+ get: function () { return chunkRGG5BGMG_cjs.DG_MESSAGE_SOURCE; }
375
375
  });
376
376
  Object.defineProperty(exports, "DG_READY", {
377
377
  enumerable: true,
378
- get: function () { return chunkCPU4SK5F_cjs.DG_READY; }
378
+ get: function () { return chunkRGG5BGMG_cjs.DG_READY; }
379
379
  });
380
380
  exports.DEFAULT_COVER_BLOCK_KEY = DEFAULT_COVER_BLOCK_KEY;
381
381
  exports.DEFAULT_NO_CUT_BLOCKS = DEFAULT_NO_CUT_BLOCKS;