vobi_document 1.0.2 → 1.1.1

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 (96) hide show
  1. package/README.md +23 -6
  2. package/dist/blocks.cjs +108 -0
  3. package/dist/blocks.cjs.map +1 -0
  4. package/dist/blocks.d.cts +214 -0
  5. package/dist/blocks.d.ts +214 -0
  6. package/dist/blocks.js +7 -0
  7. package/dist/blocks.js.map +1 -0
  8. package/dist/catalogContext-DenbX-OW.d.cts +15 -0
  9. package/dist/catalogContext-HGMU-w_4.d.ts +15 -0
  10. package/dist/chunk-26DSIOEY.cjs +68 -0
  11. package/dist/chunk-26DSIOEY.cjs.map +1 -0
  12. package/dist/chunk-3FTKM37U.cjs +1354 -0
  13. package/dist/chunk-3FTKM37U.cjs.map +1 -0
  14. package/dist/chunk-CZB7F2LA.js +90 -0
  15. package/dist/chunk-CZB7F2LA.js.map +1 -0
  16. package/dist/chunk-ERKU5FDV.cjs +407 -0
  17. package/dist/chunk-ERKU5FDV.cjs.map +1 -0
  18. package/dist/chunk-FKX46GKE.cjs +36 -0
  19. package/dist/chunk-FKX46GKE.cjs.map +1 -0
  20. package/dist/chunk-GR76U6FP.cjs +194 -0
  21. package/dist/chunk-GR76U6FP.cjs.map +1 -0
  22. package/dist/chunk-I22MGPXO.cjs +117 -0
  23. package/dist/chunk-I22MGPXO.cjs.map +1 -0
  24. package/dist/chunk-JYSA6IM5.js +1327 -0
  25. package/dist/chunk-JYSA6IM5.js.map +1 -0
  26. package/dist/chunk-L5FXGEKX.cjs +114 -0
  27. package/dist/chunk-L5FXGEKX.cjs.map +1 -0
  28. package/dist/chunk-LNBAFOVK.cjs +14 -0
  29. package/dist/chunk-LNBAFOVK.cjs.map +1 -0
  30. package/dist/chunk-M6FQVH76.js +824 -0
  31. package/dist/chunk-M6FQVH76.js.map +1 -0
  32. package/dist/chunk-MUSSJOOA.js +109 -0
  33. package/dist/chunk-MUSSJOOA.js.map +1 -0
  34. package/dist/chunk-N3IDPT3B.js +182 -0
  35. package/dist/chunk-N3IDPT3B.js.map +1 -0
  36. package/dist/chunk-OJZJJEJX.js +904 -0
  37. package/dist/chunk-OJZJJEJX.js.map +1 -0
  38. package/dist/chunk-PLQNNXS2.js +382 -0
  39. package/dist/chunk-PLQNNXS2.js.map +1 -0
  40. package/dist/chunk-QJ5W5EED.cjs +94 -0
  41. package/dist/chunk-QJ5W5EED.cjs.map +1 -0
  42. package/dist/chunk-QYBWIJXZ.js +98 -0
  43. package/dist/chunk-QYBWIJXZ.js.map +1 -0
  44. package/dist/chunk-RO3Y2MSU.cjs +844 -0
  45. package/dist/chunk-RO3Y2MSU.cjs.map +1 -0
  46. package/dist/chunk-RZOR3HOA.cjs +933 -0
  47. package/dist/chunk-RZOR3HOA.cjs.map +1 -0
  48. package/dist/chunk-SOIYSSU3.js +108 -0
  49. package/dist/chunk-SOIYSSU3.js.map +1 -0
  50. package/dist/chunk-SP5LCPDG.cjs +119 -0
  51. package/dist/chunk-SP5LCPDG.cjs.map +1 -0
  52. package/dist/chunk-W52ULJCW.js +61 -0
  53. package/dist/chunk-W52ULJCW.js.map +1 -0
  54. package/dist/chunk-ZOJBDFKU.js +12 -0
  55. package/dist/chunk-ZOJBDFKU.js.map +1 -0
  56. package/dist/editor.cjs +60 -0
  57. package/dist/editor.cjs.map +1 -0
  58. package/dist/editor.d.cts +190 -0
  59. package/dist/editor.d.ts +190 -0
  60. package/dist/editor.js +7 -0
  61. package/dist/editor.js.map +1 -0
  62. package/dist/index.cjs +436 -3753
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.cts +72 -7892
  65. package/dist/index.d.ts +72 -7892
  66. package/dist/index.js +22 -3662
  67. package/dist/index.js.map +1 -1
  68. package/dist/messages-Bi0JxNIH.d.cts +23 -0
  69. package/dist/messages-Bi0JxNIH.d.ts +23 -0
  70. package/dist/print.cjs +354 -0
  71. package/dist/print.cjs.map +1 -0
  72. package/dist/print.d.cts +43 -0
  73. package/dist/print.d.ts +43 -0
  74. package/dist/print.js +336 -0
  75. package/dist/print.js.map +1 -0
  76. package/dist/puck.cjs +8 -8
  77. package/dist/puck.cjs.map +1 -1
  78. package/dist/render.cjs +72 -0
  79. package/dist/render.cjs.map +1 -0
  80. package/dist/render.d.cts +93 -0
  81. package/dist/render.d.ts +93 -0
  82. package/dist/render.js +7 -0
  83. package/dist/render.js.map +1 -0
  84. package/dist/theme-BuEFpQeZ.d.cts +112 -0
  85. package/dist/theme-BuEFpQeZ.d.ts +112 -0
  86. package/dist/types-BgIugNWW.d.cts +25 -0
  87. package/dist/types-BgIugNWW.d.ts +25 -0
  88. package/dist/types-CvKSS1Sy.d.cts +38 -0
  89. package/dist/types-CvKSS1Sy.d.ts +38 -0
  90. package/dist/variables.cjs +111 -0
  91. package/dist/variables.cjs.map +1 -0
  92. package/dist/variables.d.cts +106 -0
  93. package/dist/variables.d.ts +106 -0
  94. package/dist/variables.js +6 -0
  95. package/dist/variables.js.map +1 -0
  96. package/package.json +39 -8
@@ -0,0 +1,844 @@
1
+ 'use strict';
2
+
3
+ var chunkERKU5FDV_cjs = require('./chunk-ERKU5FDV.cjs');
4
+ var chunkQJ5W5EED_cjs = require('./chunk-QJ5W5EED.cjs');
5
+ var chunkSP5LCPDG_cjs = require('./chunk-SP5LCPDG.cjs');
6
+ var react = require('react');
7
+ var core = require('@puckeditor/core');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ var styled6 = require('styled-components');
10
+
11
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
+
13
+ var styled6__default = /*#__PURE__*/_interopDefault(styled6);
14
+
15
+ function DocumentRenderer({
16
+ registry,
17
+ data,
18
+ theme = {},
19
+ catalog = [],
20
+ resolver,
21
+ ctx = {},
22
+ resolvedVariables,
23
+ unresolvedDisplay = "placeholder",
24
+ metadata
25
+ }) {
26
+ const config = react.useMemo(() => chunkERKU5FDV_cjs.buildConfig(registry), [registry]);
27
+ const [resolved, setResolved] = react.useState(resolvedVariables ?? {});
28
+ chunkERKU5FDV_cjs.useDocumentFont(theme.documentFont);
29
+ const keysHash = react.useMemo(() => chunkSP5LCPDG_cjs.extractBindingKeys(data).sort().join("|"), [data]);
30
+ const ctxHash = JSON.stringify(ctx);
31
+ react.useEffect(() => {
32
+ if (resolvedVariables || !resolver || keysHash === "") return void 0;
33
+ let active = true;
34
+ chunkQJ5W5EED_cjs.resolveDocumentVariables(data, catalog, resolver, ctx).then((next) => {
35
+ if (active) setResolved(next);
36
+ });
37
+ return () => {
38
+ active = false;
39
+ };
40
+ }, [resolvedVariables, resolver, catalog, keysHash, ctxHash]);
41
+ const effective = resolvedVariables ?? resolved;
42
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkERKU5FDV_cjs.DocumentThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsx(chunkSP5LCPDG_cjs.CatalogProvider, { catalog, children: /* @__PURE__ */ jsxRuntime.jsx(chunkSP5LCPDG_cjs.ResolvedProvider, { resolved: effective, unresolvedDisplay, children: /* @__PURE__ */ jsxRuntime.jsx(core.Render, { config, data, metadata }) }) }) });
43
+ }
44
+ var CoverEditContext = react.createContext({ editable: false });
45
+ function CoverField({ name, value, placeholder, as: Tag = "span", className }) {
46
+ const { editable, onFieldChange } = react.useContext(CoverEditContext);
47
+ if (!editable) return value ? /* @__PURE__ */ jsxRuntime.jsx(Tag, { className, children: value }) : null;
48
+ return /* @__PURE__ */ jsxRuntime.jsx(
49
+ Tag,
50
+ {
51
+ className,
52
+ "data-cover-field": name,
53
+ "data-placeholder": placeholder,
54
+ contentEditable: true,
55
+ suppressContentEditableWarning: true,
56
+ onBlur: (e) => onFieldChange?.(name, e.currentTarget.textContent?.trim() ?? ""),
57
+ onKeyDown: (e) => {
58
+ if (e.key === "Enter") {
59
+ e.preventDefault();
60
+ e.currentTarget.blur();
61
+ }
62
+ },
63
+ children: value
64
+ }
65
+ );
66
+ }
67
+ function CoverImage({ src, className }) {
68
+ const { editable, onImagePick } = react.useContext(CoverEditContext);
69
+ if (!editable) {
70
+ return src ? /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-cover-image": true, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "" }) }) : null;
71
+ }
72
+ return /* @__PURE__ */ jsxRuntime.jsx(
73
+ "div",
74
+ {
75
+ className,
76
+ "data-cover-image": true,
77
+ role: "button",
78
+ tabIndex: 0,
79
+ onClick: () => onImagePick?.(),
80
+ onKeyDown: (e) => {
81
+ if (e.key === "Enter" || e.key === " ") {
82
+ e.preventDefault();
83
+ onImagePick?.();
84
+ }
85
+ },
86
+ children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Adicionar imagem" })
87
+ }
88
+ );
89
+ }
90
+ var CoverFrame = styled6__default.default.div`
91
+ position: relative;
92
+ width: 100%;
93
+ height: 100%;
94
+ display: flex;
95
+ flex-direction: column;
96
+ overflow: hidden;
97
+ font-family: ${(p) => p.$font};
98
+ background: ${(p) => p.$bg ?? "#FFFFFF"};
99
+ color: ${(p) => p.$color ?? "#111827"};
100
+ overflow-wrap: break-word;
101
+
102
+ [data-cover-field][contenteditable] {
103
+ cursor: text;
104
+ border-radius: 3px;
105
+ outline: 1px dashed transparent;
106
+ outline-offset: 3px;
107
+ transition: outline-color 0.12s ease;
108
+ }
109
+ [data-cover-field][contenteditable]:hover {
110
+ outline-color: rgba(0, 90, 195, 0.45);
111
+ }
112
+ [data-cover-field][contenteditable]:focus {
113
+ outline: 1px solid rgba(0, 90, 195, 0.8);
114
+ }
115
+ [data-cover-field][contenteditable]:empty::before {
116
+ content: attr(data-placeholder);
117
+ opacity: 0.45;
118
+ font-style: italic;
119
+ }
120
+ [data-cover-image][role='button'] {
121
+ cursor: pointer;
122
+ outline: 1px dashed transparent;
123
+ outline-offset: 3px;
124
+ transition: outline-color 0.12s ease;
125
+ }
126
+ [data-cover-image][role='button']:hover {
127
+ outline-color: rgba(0, 90, 195, 0.45);
128
+ }
129
+ [data-cover-image] img {
130
+ width: 100%;
131
+ height: 100%;
132
+ object-fit: cover;
133
+ display: block;
134
+ }
135
+ `;
136
+ var FullBleedImage = styled6__default.default.div`
137
+ position: absolute;
138
+ inset: 0;
139
+
140
+ & > [data-cover-image] {
141
+ position: absolute;
142
+ inset: 0;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ color: #ffffff;
147
+ }
148
+
149
+ &::after {
150
+ content: '';
151
+ position: absolute;
152
+ inset: 0;
153
+ background: ${(p) => p.$overlay};
154
+ opacity: ${(p) => p.$overlayOpacity ?? 0.55};
155
+ }
156
+ `;
157
+ var CoverLogoImg = styled6__default.default.img`
158
+ max-height: 48px;
159
+ max-width: 160px;
160
+ object-fit: contain;
161
+ `;
162
+ styled6__default.default.div`
163
+ font-size: 11px;
164
+ letter-spacing: 0.04em;
165
+ opacity: 0.8;
166
+ `;
167
+ var HAIRLINE = "#d9d9d9";
168
+ var Chrome = styled6__default.default.div`
169
+ position: relative;
170
+ display: flex;
171
+ flex-direction: column;
172
+ justify-content: space-between;
173
+ height: 100%;
174
+ padding: 0 7cqw 8cqw;
175
+ `;
176
+ var TopRow = styled6__default.default.div`
177
+ display: flex;
178
+ justify-content: space-between;
179
+ align-items: flex-start;
180
+ gap: 4cqw;
181
+ `;
182
+ var Logo = styled6__default.default(CoverLogoImg)`
183
+ max-width: 17cqw;
184
+ max-height: 17cqw;
185
+ `;
186
+ var Company = styled6__default.default(CoverField)`
187
+ display: block;
188
+ margin-top: 5cqw;
189
+ max-width: 45cqw;
190
+ font-size: 2.94cqw;
191
+ font-weight: 800;
192
+ line-height: 1.15;
193
+ letter-spacing: 0.3cqw;
194
+ text-align: right;
195
+ text-transform: uppercase;
196
+ `;
197
+ var Head = styled6__default.default.div`
198
+ display: flex;
199
+ flex-direction: column;
200
+
201
+ &::before,
202
+ &::after {
203
+ content: '';
204
+ width: 19cqw;
205
+ height: 0.9cqw;
206
+ background: ${HAIRLINE};
207
+ }
208
+ &::before {
209
+ margin-bottom: 6cqw;
210
+ }
211
+ &::after {
212
+ margin-top: 6cqw;
213
+ }
214
+ `;
215
+ var Title = styled6__default.default(CoverField)`
216
+ display: block;
217
+ font-size: 8.82cqw;
218
+ font-weight: 800;
219
+ line-height: 1.15;
220
+ letter-spacing: 0.88cqw;
221
+ text-transform: uppercase;
222
+ `;
223
+ var Subtitle = styled6__default.default(CoverField)`
224
+ display: block;
225
+ margin-top: 3cqw;
226
+ font-size: 3.53cqw;
227
+ font-weight: 400;
228
+ line-height: 1.3;
229
+ `;
230
+ function Model1({ fields, theme, accent, textColor, bgColor }) {
231
+ return /* @__PURE__ */ jsxRuntime.jsxs(CoverFrame, { $font: chunkERKU5FDV_cjs.fontStack(theme?.documentFont), $bg: fields.imageUrl ? void 0 : bgColor, $color: textColor, children: [
232
+ fields.imageUrl ? /* @__PURE__ */ jsxRuntime.jsx(FullBleedImage, { $overlay: accent, $overlayOpacity: 0.85, children: /* @__PURE__ */ jsxRuntime.jsx(CoverImage, { src: fields.imageUrl }) }) : null,
233
+ /* @__PURE__ */ jsxRuntime.jsxs(Chrome, { children: [
234
+ /* @__PURE__ */ jsxRuntime.jsxs(TopRow, { children: [
235
+ theme?.logo?.url ? /* @__PURE__ */ jsxRuntime.jsx(Logo, { src: theme.logo.url, alt: "" }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
236
+ /* @__PURE__ */ jsxRuntime.jsx(Company, { name: "presentedBy", value: fields.presentedBy, placeholder: "Nome da empresa" })
237
+ ] }),
238
+ /* @__PURE__ */ jsxRuntime.jsxs(Head, { children: [
239
+ /* @__PURE__ */ jsxRuntime.jsx(Title, { name: "title", value: fields.title, placeholder: "Digite o t\xEDtulo..." }),
240
+ /* @__PURE__ */ jsxRuntime.jsx(Subtitle, { name: "subtitle", value: fields.subtitle, placeholder: "Digite o subt\xEDtulo..." })
241
+ ] })
242
+ ] })
243
+ ] });
244
+ }
245
+ var BAND_BG = "#e8ecf1";
246
+ var HAIRLINE2 = "#d5dae1";
247
+ var Hairline = styled6__default.default.div`
248
+ position: absolute;
249
+ left: 4.7%;
250
+ top: 3%;
251
+ height: 94%;
252
+ width: 1px;
253
+ background: ${HAIRLINE2};
254
+ `;
255
+ var Logo2 = styled6__default.default(CoverLogoImg)`
256
+ position: absolute;
257
+ left: 10.9%;
258
+ top: 6%;
259
+ max-height: 13.6cqw;
260
+ max-width: 32.7cqw;
261
+ `;
262
+ var AccentBar = styled6__default.default.div`
263
+ position: absolute;
264
+ left: 4.7%;
265
+ top: 22.3%;
266
+ width: 1.13cqw;
267
+ height: 28.7%;
268
+ background: ${(p) => p.$accent};
269
+ `;
270
+ var Head2 = styled6__default.default.div`
271
+ position: absolute;
272
+ left: 10.9%;
273
+ right: 6%;
274
+ top: 22.3%;
275
+ display: flex;
276
+ flex-direction: column;
277
+ `;
278
+ var Title2 = styled6__default.default(CoverField)`
279
+ display: block;
280
+ font-weight: 800;
281
+ font-size: 12.6cqw;
282
+ line-height: 1.2;
283
+ letter-spacing: -0.63cqw;
284
+ text-transform: uppercase;
285
+ `;
286
+ var DateLine = styled6__default.default(CoverField)`
287
+ display: block;
288
+ margin-top: 3.3cqw;
289
+ font-size: 4.5cqw;
290
+ font-weight: 400;
291
+ `;
292
+ var Band = styled6__default.default.div`
293
+ position: absolute;
294
+ left: 0;
295
+ bottom: 0;
296
+ width: 100%;
297
+ height: 29.2%;
298
+ background: ${BAND_BG};
299
+ display: flex;
300
+ flex-direction: column;
301
+ justify-content: center;
302
+ gap: 4.3cqw;
303
+ padding-left: 10.9%;
304
+ padding-right: 6%;
305
+ box-sizing: border-box;
306
+ `;
307
+ var Label = styled6__default.default.div`
308
+ font-size: 2.77cqw;
309
+ font-weight: 400;
310
+ `;
311
+ var Value = styled6__default.default(CoverField)`
312
+ display: block;
313
+ margin-top: 1cqw;
314
+ font-size: 3.4cqw;
315
+ font-weight: 700;
316
+ line-height: 1.3;
317
+ text-transform: uppercase;
318
+ `;
319
+ function Model2({ fields, theme, accent, textColor, bgColor }) {
320
+ const { editable } = react.useContext(CoverEditContext);
321
+ const showHead = editable || Boolean(fields.title || fields.date);
322
+ const showPrepared = editable || Boolean(fields.preparedFor);
323
+ const showPresented = editable || Boolean(fields.presentedBy);
324
+ const hasBand = showPrepared || showPresented;
325
+ return /* @__PURE__ */ jsxRuntime.jsxs(CoverFrame, { $font: chunkERKU5FDV_cjs.fontStack(theme?.documentFont), $bg: bgColor, $color: textColor, children: [
326
+ theme?.logo?.url ? /* @__PURE__ */ jsxRuntime.jsx(Logo2, { src: theme.logo.url, alt: "" }) : null,
327
+ showHead ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
328
+ /* @__PURE__ */ jsxRuntime.jsx(AccentBar, { $accent: accent }),
329
+ /* @__PURE__ */ jsxRuntime.jsxs(Head2, { "data-cover-head": true, children: [
330
+ /* @__PURE__ */ jsxRuntime.jsx(Title2, { name: "title", value: fields.title, placeholder: "Digite o t\xEDtulo..." }),
331
+ /* @__PURE__ */ jsxRuntime.jsx(DateLine, { name: "date", value: fields.date, placeholder: "M\xEAs e ano" })
332
+ ] })
333
+ ] }) : null,
334
+ hasBand ? /* @__PURE__ */ jsxRuntime.jsxs(Band, { "data-cover-band": true, children: [
335
+ showPrepared ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
336
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { children: "Preparada para" }),
337
+ /* @__PURE__ */ jsxRuntime.jsx(Value, { name: "preparedFor", value: fields.preparedFor, placeholder: "Nome do cliente" })
338
+ ] }) : null,
339
+ showPresented ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
340
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { children: "Apresentada por" }),
341
+ /* @__PURE__ */ jsxRuntime.jsx(Value, { name: "presentedBy", value: fields.presentedBy, placeholder: "Nome da empresa" })
342
+ ] }) : null
343
+ ] }) : null,
344
+ /* @__PURE__ */ jsxRuntime.jsx(Hairline, {})
345
+ ] });
346
+ }
347
+ var ImageBand = styled6__default.default.div`
348
+ position: relative;
349
+ width: 100%;
350
+ height: 42.9cqw;
351
+ flex-shrink: 0;
352
+ overflow: hidden;
353
+ background: #1a1a1a;
354
+
355
+ & > [data-cover-image] {
356
+ position: absolute;
357
+ inset: 0;
358
+ }
359
+ `;
360
+ var Logo3 = styled6__default.default(CoverLogoImg)`
361
+ position: absolute;
362
+ top: 1.2cqw;
363
+ right: 5.9cqw;
364
+ max-width: 14.7cqw;
365
+ max-height: 14.7cqw;
366
+ `;
367
+ var Body = styled6__default.default.div`
368
+ flex: 1;
369
+ display: flex;
370
+ flex-direction: column;
371
+ padding: 11.5cqw 9.4cqw 7.35cqw;
372
+ `;
373
+ var DateField = styled6__default.default(CoverField)`
374
+ display: block;
375
+ font-size: 2.94cqw;
376
+ font-weight: 400;
377
+ opacity: 0.5;
378
+ `;
379
+ var Title3 = styled6__default.default(CoverField)`
380
+ display: block;
381
+ margin-top: 2.35cqw;
382
+ font-size: 10.6cqw;
383
+ font-weight: 800;
384
+ line-height: 1.2;
385
+ text-transform: uppercase;
386
+ `;
387
+ var Subtitle2 = styled6__default.default(CoverField)`
388
+ display: block;
389
+ margin-top: 4.7cqw;
390
+ font-size: 3.53cqw;
391
+ font-weight: 400;
392
+ opacity: 0.62;
393
+ `;
394
+ var Parties = styled6__default.default.div`
395
+ margin-top: 13.8cqw;
396
+ display: flex;
397
+ flex-direction: column;
398
+ gap: 4.7cqw;
399
+ `;
400
+ var Label2 = styled6__default.default.div`
401
+ font-size: 3.53cqw;
402
+ font-weight: 600;
403
+ `;
404
+ var Value2 = styled6__default.default(CoverField)`
405
+ display: block;
406
+ margin-top: 0.7cqw;
407
+ font-size: 3.53cqw;
408
+ font-weight: 400;
409
+ opacity: 0.62;
410
+ `;
411
+ function Model3({ fields, theme, textColor, bgColor }) {
412
+ const { editable } = react.useContext(CoverEditContext);
413
+ const showPresented = editable || Boolean(fields.presentedBy);
414
+ const showPrepared = editable || Boolean(fields.preparedFor);
415
+ return /* @__PURE__ */ jsxRuntime.jsxs(CoverFrame, { $font: chunkERKU5FDV_cjs.fontStack(theme?.documentFont), $bg: bgColor, $color: textColor, children: [
416
+ /* @__PURE__ */ jsxRuntime.jsxs(ImageBand, { children: [
417
+ fields.imageUrl ? /* @__PURE__ */ jsxRuntime.jsx(CoverImage, { src: fields.imageUrl }) : null,
418
+ theme?.logo?.url ? /* @__PURE__ */ jsxRuntime.jsx(Logo3, { src: theme.logo.url, alt: "" }) : null
419
+ ] }),
420
+ /* @__PURE__ */ jsxRuntime.jsxs(Body, { children: [
421
+ /* @__PURE__ */ jsxRuntime.jsx(DateField, { name: "date", value: fields.date, placeholder: "M\xEAs e ano" }),
422
+ /* @__PURE__ */ jsxRuntime.jsx(Title3, { name: "title", value: fields.title, placeholder: "Digite o t\xEDtulo..." }),
423
+ /* @__PURE__ */ jsxRuntime.jsx(Subtitle2, { name: "subtitle", value: fields.subtitle, placeholder: "Digite o subt\xEDtulo..." }),
424
+ showPresented || showPrepared ? /* @__PURE__ */ jsxRuntime.jsxs(Parties, { "data-cover-parties": true, children: [
425
+ showPresented ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
426
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { children: "Apresentada por" }),
427
+ /* @__PURE__ */ jsxRuntime.jsx(Value2, { name: "presentedBy", value: fields.presentedBy, placeholder: "Nome da empresa" })
428
+ ] }) : null,
429
+ showPrepared ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
430
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { children: "Preparada para" }),
431
+ /* @__PURE__ */ jsxRuntime.jsx(Value2, { name: "preparedFor", value: fields.preparedFor, placeholder: "Nome do cliente" })
432
+ ] }) : null
433
+ ] }) : null
434
+ ] })
435
+ ] });
436
+ }
437
+ var Body2 = styled6__default.default.div`
438
+ display: flex;
439
+ flex-direction: column;
440
+ height: 100%;
441
+ padding: 4.12cqw 9.4cqw 0;
442
+ `;
443
+ var Logo4 = styled6__default.default(CoverLogoImg)`
444
+ max-width: 14.7cqw;
445
+ max-height: 14.7cqw;
446
+ `;
447
+ var Head3 = styled6__default.default.div`
448
+ margin-top: 23.2cqw;
449
+ display: flex;
450
+ flex-direction: column;
451
+ align-items: flex-start;
452
+ `;
453
+ var DateChip = styled6__default.default(CoverField)`
454
+ display: inline-block;
455
+ align-self: flex-start;
456
+ max-width: 100%;
457
+ background: ${(p) => p.$accent};
458
+ border-radius: 1000px;
459
+ padding: 1.18cqw 2.94cqw;
460
+ font-size: 2.94cqw;
461
+ font-weight: 400;
462
+ letter-spacing: -0.29cqw;
463
+ color: #ffffff;
464
+ `;
465
+ var Title4 = styled6__default.default(CoverField)`
466
+ display: block;
467
+ align-self: stretch;
468
+ margin-top: 3.5cqw;
469
+ font-size: 14.1cqw;
470
+ font-weight: 300;
471
+ line-height: 1.1;
472
+ letter-spacing: -1.41cqw;
473
+ `;
474
+ var Footer = styled6__default.default.div`
475
+ margin-top: auto;
476
+ padding-bottom: 11cqw;
477
+ display: flex;
478
+ gap: 6cqw;
479
+ `;
480
+ var Party = styled6__default.default.div`
481
+ flex: 1;
482
+ min-width: 0;
483
+ `;
484
+ var Label3 = styled6__default.default.div`
485
+ font-size: 3.53cqw;
486
+ font-weight: 300;
487
+ letter-spacing: -0.35cqw;
488
+ opacity: 0.72;
489
+ `;
490
+ var Value3 = styled6__default.default(CoverField)`
491
+ display: block;
492
+ margin-top: 1.5cqw;
493
+ font-size: 4.12cqw;
494
+ font-weight: 500;
495
+ letter-spacing: -0.41cqw;
496
+ `;
497
+ function Model4({ fields, theme, accent, textColor, bgColor }) {
498
+ const { editable } = react.useContext(CoverEditContext);
499
+ const showPrepared = editable || Boolean(fields.preparedFor);
500
+ const showPresented = editable || Boolean(fields.presentedBy);
501
+ return /* @__PURE__ */ jsxRuntime.jsx(CoverFrame, { $font: chunkERKU5FDV_cjs.fontStack(theme?.documentFont), $bg: bgColor, $color: textColor, children: /* @__PURE__ */ jsxRuntime.jsxs(Body2, { children: [
502
+ theme?.logo?.url ? /* @__PURE__ */ jsxRuntime.jsx(Logo4, { src: theme.logo.url, alt: "" }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
503
+ /* @__PURE__ */ jsxRuntime.jsxs(Head3, { children: [
504
+ /* @__PURE__ */ jsxRuntime.jsx(DateChip, { name: "date", value: fields.date, placeholder: "M\xEAs e ano", $accent: accent }),
505
+ /* @__PURE__ */ jsxRuntime.jsx(Title4, { name: "title", value: fields.title, placeholder: "Digite o t\xEDtulo..." })
506
+ ] }),
507
+ showPrepared || showPresented ? /* @__PURE__ */ jsxRuntime.jsxs(Footer, { "data-cover-footer": true, children: [
508
+ showPrepared ? /* @__PURE__ */ jsxRuntime.jsxs(Party, { children: [
509
+ /* @__PURE__ */ jsxRuntime.jsx(Label3, { children: "Apresentada para" }),
510
+ /* @__PURE__ */ jsxRuntime.jsx(Value3, { name: "preparedFor", value: fields.preparedFor, placeholder: "Nome do cliente" })
511
+ ] }) : null,
512
+ showPresented ? /* @__PURE__ */ jsxRuntime.jsxs(Party, { children: [
513
+ /* @__PURE__ */ jsxRuntime.jsx(Label3, { children: "Apresentada por" }),
514
+ /* @__PURE__ */ jsxRuntime.jsx(Value3, { name: "presentedBy", value: fields.presentedBy, placeholder: "Nome da empresa" })
515
+ ] }) : null
516
+ ] }) : null
517
+ ] }) });
518
+ }
519
+ var Spacer = styled6__default.default.div`
520
+ height: 24.4cqw;
521
+ flex-shrink: 0;
522
+ `;
523
+ var ImageBand2 = styled6__default.default.div`
524
+ position: relative;
525
+ width: 100%;
526
+ height: 64.4cqw;
527
+ flex-shrink: 0;
528
+ overflow: hidden;
529
+ background: #e8eef7;
530
+ `;
531
+ var Bar = styled6__default.default.div`
532
+ position: absolute;
533
+ width: 47.9cqw;
534
+ height: 2.06cqw;
535
+ background: ${(p) => p.$accent};
536
+ `;
537
+ var BarTop = styled6__default.default(Bar)`
538
+ top: 0;
539
+ right: 0;
540
+ `;
541
+ var BarBottom = styled6__default.default(Bar)`
542
+ bottom: 0;
543
+ left: 0;
544
+ `;
545
+ var Bottom = styled6__default.default.div`
546
+ flex: 1;
547
+ display: flex;
548
+ align-items: center;
549
+ gap: 7cqw;
550
+ padding: 0 4.7cqw 4cqw 7cqw;
551
+ `;
552
+ var LogoCol = styled6__default.default.div`
553
+ flex-shrink: 0;
554
+ width: 29.4cqw;
555
+ `;
556
+ var Logo5 = styled6__default.default(CoverLogoImg)`
557
+ max-width: 29.4cqw;
558
+ max-height: 29.4cqw;
559
+ `;
560
+ var TextCol = styled6__default.default.div`
561
+ flex: 1;
562
+ min-width: 0;
563
+ `;
564
+ var Title5 = styled6__default.default(CoverField)`
565
+ display: block;
566
+ font-size: 7.06cqw;
567
+ font-weight: 700;
568
+ line-height: 1.2;
569
+ text-transform: uppercase;
570
+ `;
571
+ var Subtitle3 = styled6__default.default(CoverField)`
572
+ display: block;
573
+ margin-top: 2.47cqw;
574
+ font-size: 2.94cqw;
575
+ font-weight: 400;
576
+ line-height: 1.2;
577
+ opacity: 0.72;
578
+ `;
579
+ var Presented = styled6__default.default.div`
580
+ margin-top: 3.5cqw;
581
+ font-size: 2.94cqw;
582
+ font-weight: 600;
583
+ line-height: 1.2;
584
+ `;
585
+ var PresentedValue = styled6__default.default(CoverField)`
586
+ font-weight: 600;
587
+ `;
588
+ function Model5({ fields, theme, accent, textColor, bgColor }) {
589
+ const { editable } = react.useContext(CoverEditContext);
590
+ const showPresented = editable || Boolean(fields.presentedBy);
591
+ return /* @__PURE__ */ jsxRuntime.jsxs(CoverFrame, { $font: chunkERKU5FDV_cjs.fontStack(theme?.documentFont), $bg: bgColor, $color: textColor, children: [
592
+ /* @__PURE__ */ jsxRuntime.jsx(Spacer, {}),
593
+ /* @__PURE__ */ jsxRuntime.jsx(ImageBand2, { children: fields.imageUrl ? /* @__PURE__ */ jsxRuntime.jsx(FullBleedImage, { $overlay: accent, $overlayOpacity: 0.5, children: /* @__PURE__ */ jsxRuntime.jsx(CoverImage, { src: fields.imageUrl }) }) : null }),
594
+ /* @__PURE__ */ jsxRuntime.jsxs(Bottom, { children: [
595
+ /* @__PURE__ */ jsxRuntime.jsx(LogoCol, { children: theme?.logo?.url ? /* @__PURE__ */ jsxRuntime.jsx(Logo5, { src: theme.logo.url, alt: "" }) : null }),
596
+ /* @__PURE__ */ jsxRuntime.jsxs(TextCol, { children: [
597
+ /* @__PURE__ */ jsxRuntime.jsx(Title5, { name: "title", value: fields.title, placeholder: "Digite o t\xEDtulo..." }),
598
+ /* @__PURE__ */ jsxRuntime.jsx(Subtitle3, { name: "subtitle", value: fields.subtitle, placeholder: "Digite o subt\xEDtulo..." }),
599
+ showPresented ? /* @__PURE__ */ jsxRuntime.jsxs(Presented, { children: [
600
+ "Apresentada por:",
601
+ " ",
602
+ /* @__PURE__ */ jsxRuntime.jsx(PresentedValue, { name: "presentedBy", value: fields.presentedBy, placeholder: "Nome da empresa" })
603
+ ] }) : null
604
+ ] })
605
+ ] }),
606
+ /* @__PURE__ */ jsxRuntime.jsx(BarTop, { $accent: accent }),
607
+ /* @__PURE__ */ jsxRuntime.jsx(BarBottom, { $accent: accent })
608
+ ] });
609
+ }
610
+
611
+ // src/render/chrome/covers/index.ts
612
+ var COVER_TEMPLATES = {
613
+ "model-1": Model1,
614
+ "model-2": Model2,
615
+ "model-3": Model3,
616
+ "model-4": Model4,
617
+ "model-5": Model5
618
+ };
619
+ var COVER_TEMPLATE_IDS = Object.keys(COVER_TEMPLATES);
620
+ var resolveCoverAccent = (accent, theme) => accent ?? theme?.colors?.brand ?? chunkERKU5FDV_cjs.DEFAULT_DOCUMENT_COLORS.brand;
621
+ var COVER_SURFACES = {
622
+ "model-1": "brand",
623
+ "model-2": "background",
624
+ "model-3": "brand",
625
+ "model-4": "brand",
626
+ "model-5": "background"
627
+ };
628
+ var ON_BRAND_TEXT = "#FFFFFF";
629
+ var resolveCoverColors = (templateId, { accent, textColor, bgColor }, theme) => {
630
+ const colors = { ...chunkERKU5FDV_cjs.DEFAULT_DOCUMENT_COLORS, ...theme?.colors };
631
+ const onBrand = (COVER_SURFACES[templateId ?? ""] ?? COVER_SURFACES["model-1"]) === "brand";
632
+ const resolvedAccent = resolveCoverAccent(accent, theme);
633
+ return {
634
+ accent: resolvedAccent,
635
+ textColor: textColor ?? (onBrand ? ON_BRAND_TEXT : colors.text),
636
+ bgColor: bgColor ?? (onBrand ? resolvedAccent : colors.background)
637
+ };
638
+ };
639
+ function CoverPage({ templateId, accent, fields, theme, textColor, bgColor }) {
640
+ if (!templateId) return null;
641
+ const colors = { ...chunkERKU5FDV_cjs.DEFAULT_DOCUMENT_COLORS, ...theme?.colors };
642
+ const vars = {
643
+ ["--doc-brand"]: colors.brand,
644
+ ["--doc-text"]: colors.text,
645
+ ["--doc-bg"]: colors.background
646
+ };
647
+ const Template = COVER_TEMPLATES[templateId] ?? COVER_TEMPLATES["model-1"];
648
+ const resolved = resolveCoverColors(templateId, { accent, textColor, bgColor }, theme);
649
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "dg-cover", style: vars, children: /* @__PURE__ */ jsxRuntime.jsx(Template, { fields: fields ?? {}, theme, ...resolved }) });
650
+ }
651
+ var BOX = { width: 14, height: 14, "aria-hidden": true };
652
+ var stroke = (inner) => /* @__PURE__ */ jsxRuntime.jsx(
653
+ "svg",
654
+ {
655
+ ...BOX,
656
+ viewBox: "0 0 24 24",
657
+ fill: "none",
658
+ stroke: "currentColor",
659
+ strokeWidth: 2,
660
+ strokeLinecap: "round",
661
+ strokeLinejoin: "round",
662
+ dangerouslySetInnerHTML: { __html: inner }
663
+ }
664
+ );
665
+ var brand = (viewBox, d) => /* @__PURE__ */ jsxRuntime.jsx("svg", { ...BOX, viewBox, fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d }) });
666
+ var COMPANY_INFO_ICONS = {
667
+ companyName: stroke(
668
+ '<path d="M12 10h.01" /><path d="M12 14h.01" /><path d="M12 6h.01" /><path d="M16 10h.01" /><path d="M16 14h.01" /><path d="M16 6h.01" /><path d="M8 10h.01" /><path d="M8 14h.01" /><path d="M8 6h.01" /><path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" /><rect x="4" y="2" width="16" height="20" rx="2" />'
669
+ ),
670
+ cnpj: stroke(
671
+ '<path d="M16 10h2" /><path d="M16 14h2" /><path d="M6.17 15a3 3 0 0 1 5.66 0" /><circle cx="9" cy="11" r="2" /><rect x="2" y="5" width="20" height="14" rx="2" />'
672
+ ),
673
+ phone: stroke(
674
+ '<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />'
675
+ ),
676
+ email: stroke(
677
+ '<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /><rect x="2" y="4" width="20" height="16" rx="2" />'
678
+ ),
679
+ address: stroke(
680
+ '<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" /><circle cx="12" cy="10" r="3" />'
681
+ ),
682
+ site: stroke(
683
+ '<circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" />'
684
+ ),
685
+ instagram: brand(
686
+ "0 0 448 512",
687
+ "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"
688
+ ),
689
+ facebook: brand(
690
+ "0 0 320 512",
691
+ "M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z"
692
+ ),
693
+ twitter: brand(
694
+ "0 0 512 512",
695
+ "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"
696
+ ),
697
+ linkedin: brand(
698
+ "0 0 448 512",
699
+ "M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"
700
+ )
701
+ };
702
+ var HeaderRoot = styled6__default.default.header`
703
+ height: 100%;
704
+ color: ${(props) => props.$color};
705
+ font-family: ${(props) => props.$font};
706
+ line-height: 1.5;
707
+ `;
708
+ var HeaderLayout = styled6__default.default.div`
709
+ display: flex;
710
+ align-items: center;
711
+ justify-content: space-between;
712
+ flex-direction: ${(props) => props.$reverse ? "row-reverse" : "row"};
713
+ gap: 16px;
714
+ height: 100%;
715
+ padding: 12px 0;
716
+ `;
717
+ var HeaderInfo = styled6__default.default.div`
718
+ display: flex;
719
+ flex-direction: column;
720
+ justify-content: center;
721
+ align-items: ${(props) => props.$alignEnd ? "flex-end" : "flex-start"};
722
+ min-width: 0;
723
+ font-size: 12px;
724
+ text-align: ${(props) => props.$alignEnd ? "right" : "left"};
725
+ `;
726
+ var InfoLine = styled6__default.default.span`
727
+ display: flex;
728
+ flex-direction: ${(props) => props.$iconAfter ? "row-reverse" : "row"};
729
+ align-items: center;
730
+ gap: 8px;
731
+ height: 22px;
732
+ font-weight: ${(props) => props.$strong ? 600 : 400};
733
+ font-size: ${(props) => props.$strong ? "12.5px" : "12px"};
734
+
735
+ svg {
736
+ flex-shrink: 0;
737
+ }
738
+ `;
739
+ var HeaderLogo = styled6__default.default.img`
740
+ max-height: 44px;
741
+ max-width: 180px;
742
+ object-fit: contain;
743
+ `;
744
+ var FooterRoot = styled6__default.default.footer`
745
+ height: 100%;
746
+ color: ${(props) => props.$color};
747
+ font-family: ${(props) => props.$font};
748
+ line-height: 1.5;
749
+ `;
750
+ var FooterLayout = styled6__default.default.div`
751
+ display: flex;
752
+ flex-direction: column;
753
+ justify-content: center;
754
+ height: 100%;
755
+ padding: 12px 0;
756
+ `;
757
+ var FooterInfoRows = styled6__default.default.div`
758
+ display: flex;
759
+ align-items: center;
760
+ justify-content: ${(props) => props.$justify};
761
+ flex-wrap: wrap;
762
+ column-gap: 24px;
763
+ font-size: 12px;
764
+ `;
765
+ var FooterItem = styled6__default.default.span`
766
+ display: inline-flex;
767
+ align-items: center;
768
+ gap: 6px;
769
+ height: 22px;
770
+ white-space: nowrap;
771
+
772
+ svg {
773
+ flex-shrink: 0;
774
+ }
775
+ `;
776
+ var HEADER_INFO_ORDER = ["companyName", "cnpj", "phone", "email", "address"];
777
+ function HeaderBar({ config, companyInfo = {}, logoUrl, documentFont }) {
778
+ if (!config?.enabled) return null;
779
+ const lines = HEADER_INFO_ORDER.filter(
780
+ (key) => config.info?.[key] && companyInfo[key]
781
+ );
782
+ const logoLeft = config.logoPosition === "left";
783
+ return /* @__PURE__ */ jsxRuntime.jsx(HeaderRoot, { className: "dg-running-header", $color: config.color ?? "#3F4759", $font: chunkERKU5FDV_cjs.fontStack(documentFont), children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderLayout, { $reverse: logoLeft, children: [
784
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderInfo, { $alignEnd: logoLeft, children: lines.map((key) => /* @__PURE__ */ jsxRuntime.jsxs(InfoLine, { $strong: key === "companyName", $iconAfter: logoLeft, children: [
785
+ COMPANY_INFO_ICONS[key],
786
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: companyInfo[key] })
787
+ ] }, key)) }),
788
+ logoUrl ? /* @__PURE__ */ jsxRuntime.jsx(HeaderLogo, { src: logoUrl, alt: "" }) : null
789
+ ] }) });
790
+ }
791
+ var FOOTER_INFO_ORDER = [
792
+ "phone",
793
+ "site",
794
+ "instagram",
795
+ "facebook",
796
+ "twitter",
797
+ "linkedin",
798
+ "email",
799
+ "address"
800
+ ];
801
+ var ALIGNMENT_TO_JUSTIFY = {
802
+ left: "flex-start",
803
+ center: "center",
804
+ right: "flex-end"
805
+ };
806
+ function FooterBar({ config, companyInfo = {}, documentFont }) {
807
+ const showBand = Boolean(config?.enabled);
808
+ const showPageNumber = Boolean(config?.pageNumber);
809
+ if (!showBand && !showPageNumber) return null;
810
+ const lines = showBand ? FOOTER_INFO_ORDER.filter(
811
+ (key) => config?.info?.[key] && companyInfo[key]
812
+ ) : [];
813
+ const justify = ALIGNMENT_TO_JUSTIFY[config?.alignment ?? "center"];
814
+ return /* @__PURE__ */ jsxRuntime.jsxs(FooterRoot, { className: "dg-running-footer", $color: config?.color ?? "#3F4759", $font: chunkERKU5FDV_cjs.fontStack(documentFont), children: [
815
+ showPageNumber ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dg-page-number" }) : null,
816
+ showBand ? /* @__PURE__ */ jsxRuntime.jsx(FooterLayout, { children: lines.length ? /* @__PURE__ */ jsxRuntime.jsx(FooterInfoRows, { $justify: justify, children: lines.map((key) => /* @__PURE__ */ jsxRuntime.jsxs(FooterItem, { children: [
817
+ COMPANY_INFO_ICONS[key],
818
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: companyInfo[key] })
819
+ ] }, key)) }) : null }) : null
820
+ ] });
821
+ }
822
+
823
+ // src/render/messages.ts
824
+ var DG_MESSAGE_SOURCE = "document-generator";
825
+ var DG_READY = "dg-ready";
826
+ var DG_ERROR = "dg-error";
827
+
828
+ exports.COMPANY_INFO_ICONS = COMPANY_INFO_ICONS;
829
+ exports.COVER_TEMPLATES = COVER_TEMPLATES;
830
+ exports.COVER_TEMPLATE_IDS = COVER_TEMPLATE_IDS;
831
+ exports.CoverEditContext = CoverEditContext;
832
+ exports.CoverPage = CoverPage;
833
+ exports.DG_ERROR = DG_ERROR;
834
+ exports.DG_MESSAGE_SOURCE = DG_MESSAGE_SOURCE;
835
+ exports.DG_READY = DG_READY;
836
+ exports.DocumentRenderer = DocumentRenderer;
837
+ exports.FOOTER_INFO_ORDER = FOOTER_INFO_ORDER;
838
+ exports.FooterBar = FooterBar;
839
+ exports.HEADER_INFO_ORDER = HEADER_INFO_ORDER;
840
+ exports.HeaderBar = HeaderBar;
841
+ exports.resolveCoverAccent = resolveCoverAccent;
842
+ exports.resolveCoverColors = resolveCoverColors;
843
+ //# sourceMappingURL=chunk-RO3Y2MSU.cjs.map
844
+ //# sourceMappingURL=chunk-RO3Y2MSU.cjs.map