navne-default-ad 1.2.4 → 1.3.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0
4
+
5
+ - Standardize classic and publication renders on one shared layout: direct,
6
+ positive section margins with no global flex gap.
7
+ - Preserve consumer-specific and Strapi-driven typography independently from
8
+ the shared spacing model.
9
+ - Standardize obituary and thank-you field flow and `pre-line` whitespace.
10
+ - Apply active interaction classes/styles to populated fields as well as empty
11
+ placeholders.
12
+ - Highlight the complete visual name block when either `firstName` or
13
+ `lastName` is active.
14
+ - Export `sharedDefaultAdLayout` for explicit layout-level reuse.
15
+
16
+ ## 1.2.5
17
+
18
+ - Match legacy Strapi templates with a missing/null `gap` by rendering no flex section gap.
19
+ - Preserve `pre-line` for publication thank-you ceremony/message while keeping thank-you text at legacy `white-space: normal`.
20
+
3
21
  ## 1.2.4
4
22
 
5
23
  - Preserve legacy `white-space: normal` for ceremony, message, and thanks fields in publication thank-you ads.
package/README.md CHANGED
@@ -40,11 +40,12 @@ Importing the component also references its CSS, but the explicit stylesheet imp
40
40
  - `DefaultAdProps`: data, style, mode, formatter, placeholder, and standard `div` props.
41
41
  - `DefaultAdData`, `DefaultAdContact`, `DefaultAdTextFields`, `DefaultAdIcon`: normalized input model.
42
42
  - `DefaultAdStyle`, `DefaultAdTypography`, `DefaultAdSpacing`: layout and template controls.
43
- - `classicDefaultAdStyle`: current fixed AdBuilder look.
44
- - `publicationDefaultAdStyle`: current publication viewer defaults.
45
- - `styleFromLegacyTemplate`: converts existing Strapi template numeric/font fields.
43
+ - `sharedDefaultAdLayout`: canonical padding, spacing, margins, and dimensions for every consumer.
44
+ - `classicDefaultAdStyle`: shared layout plus the fixed AdBuilder typography.
45
+ - `publicationDefaultAdStyle`: shared layout plus the publication typography defaults.
46
+ - `styleFromLegacyTemplate`: converts existing Strapi font sizes, leading, tracking, and font families while retaining the shared layout.
46
47
 
47
- Use `variant="classic"` for AdBuilder's legacy ordering and `variant="publication"` for the digital-obituaries ordering (including thank-you ads).
48
+ `variant="classic"` and `variant="publication"` remain accepted for source compatibility and diagnostics, but both now use the same field order, whitespace, and spacing model.
48
49
 
49
50
  ### Interactive builders
50
51
 
package/dist/index.cjs CHANGED
@@ -23,18 +23,38 @@ __export(index_exports, {
23
23
  DefaultAd: () => DefaultAd,
24
24
  classicDefaultAdStyle: () => classicDefaultAdStyle,
25
25
  publicationDefaultAdStyle: () => publicationDefaultAdStyle,
26
+ sharedDefaultAdLayout: () => sharedDefaultAdLayout,
26
27
  styleFromLegacyTemplate: () => styleFromLegacyTemplate
27
28
  });
28
29
  module.exports = __toCommonJS(index_exports);
29
30
 
30
31
  // src/presets.ts
31
- var classicDefaultAdStyle = {
32
+ var sharedDefaultAdLayout = {
32
33
  columnsMm: 86,
33
34
  heightMm: null,
34
35
  paddingMm: 4,
35
36
  horizontalPaddingMm: 2,
36
37
  border: false,
37
38
  borderWidthPt: 1.4,
39
+ spacing: {
40
+ iconToText: 11,
41
+ introToTitle: 8,
42
+ // These values originated as unitless React styles and therefore retain
43
+ // their established numeric geometry.
44
+ textToName: 4.2,
45
+ iconToName: 4.95,
46
+ dateTop: 5.6,
47
+ deceasedTop: 6,
48
+ memorialTop: 6,
49
+ senderTop: 8,
50
+ ceremonyTop: 8,
51
+ thanksTop: 7,
52
+ donationTop: 7,
53
+ sectionGapMm: 0
54
+ }
55
+ };
56
+ var classicDefaultAdStyle = {
57
+ ...sharedDefaultAdLayout,
38
58
  typography: {
39
59
  fontFamily: "var(--default-ad-font-primary, Schoolbook, Georgia, serif)",
40
60
  secondaryFontFamily: "var(--default-ad-font-secondary, Schoolbook, Georgia, serif)",
@@ -60,25 +80,10 @@ var classicDefaultAdStyle = {
60
80
  thanksLeading: 12,
61
81
  donationSize: 10,
62
82
  donationLeading: 12
63
- },
64
- spacing: {
65
- iconToText: 11,
66
- introToTitle: 8,
67
- // The legacy component passed these two values as unitless React styles (CSS px).
68
- textToName: 4.2,
69
- iconToName: 4.95,
70
- dateTop: 5.6,
71
- deceasedTop: 6,
72
- memorialTop: 6,
73
- senderTop: 8,
74
- ceremonyTop: 8,
75
- thanksTop: 7,
76
- donationTop: 7,
77
- sectionGapMm: 0
78
83
  }
79
84
  };
80
85
  var publicationDefaultAdStyle = {
81
- ...classicDefaultAdStyle,
86
+ ...sharedDefaultAdLayout,
82
87
  typography: {
83
88
  ...classicDefaultAdStyle.typography,
84
89
  fontFamily: "var(--default-ad-font-primary, Raleway, Arial, sans-serif)",
@@ -104,13 +109,6 @@ var publicationDefaultAdStyle = {
104
109
  thanksLeading: 13,
105
110
  donationSize: 11,
106
111
  donationLeading: 13
107
- },
108
- spacing: {
109
- ...classicDefaultAdStyle.spacing,
110
- iconToText: 0,
111
- introToTitle: 0,
112
- textToName: 0,
113
- sectionGapMm: 2
114
112
  }
115
113
  };
116
114
  function styleFromLegacyTemplate(template) {
@@ -134,27 +132,9 @@ function styleFromLegacyTemplate(template) {
134
132
  ...fontPair(template.thanksText, "thanksSize", "thanksLeading"),
135
133
  ...fontPair(template.donationText, "donationSize", "donationLeading"),
136
134
  ...tracking(template.longDatesText)
137
- },
138
- spacing: {
139
- ...publicationDefaultAdStyle.spacing,
140
- ...gapMm(template.gap),
141
- iconToText: template.textToIcon,
142
- introToTitle: template.titleToText,
143
- textToName: template.fullnameToText,
144
- dateTop: template.datesTextMT,
145
- deceasedTop: template.deceasedTextMT,
146
- memorialTop: template.memorialTextMT,
147
- senderTop: template.senderTextMT,
148
- ceremonyTop: template.ceremonyTextMT,
149
- thanksTop: template.thanksTextMT,
150
- donationTop: template.donationTextMT
151
135
  }
152
136
  };
153
137
  }
154
- function gapMm(value) {
155
- const gap = value?.match(/gap-\[(-?[\d.]+)mm\]/)?.[1];
156
- return gap ? { sectionGapMm: Number(gap) } : {};
157
- }
158
138
  function fontPair(value, sizeKey, leadingKey) {
159
139
  if (!value) return {};
160
140
  const size = value.match(/text-\[(-?[\d.]+)pt\]/)?.[1];
@@ -206,7 +186,7 @@ function Text({ children, className = "", style, field, interaction }) {
206
186
  if (empty) {
207
187
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-field-placeholder-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": field, className: `gda-text gda-field-empty ${className} ${fieldState?.className ?? ""}`.trim(), style: { ...style, ...fieldState?.style }, ...events, children: fieldState?.placeholder }) });
208
188
  }
209
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": field, className: `gda-text ${className}`.trim(), style, ...events, children });
189
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": field, className: `gda-text ${className} ${fieldState?.active ? fieldState.className ?? "" : ""}`.trim(), style: { ...style, ...fieldState?.active ? fieldState.style : void 0 }, ...events, children });
210
190
  }
211
191
  function fieldEvents(field, interaction) {
212
192
  return {
@@ -249,12 +229,10 @@ function DefaultAd({
249
229
  const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);
250
230
  const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);
251
231
  const headerMargins = calculateHeaderMargins({
252
- variant,
253
232
  first: hasVisualFirst,
254
233
  second: hasVisualSecond,
255
234
  hasName: hasVisualName,
256
235
  hasIcon: Boolean(icon),
257
- typography,
258
236
  spacing
259
237
  });
260
238
  const { firstMargin, secondMargin, nameMargin } = headerMargins;
@@ -262,6 +240,7 @@ function DefaultAd({
262
240
  const ceremonyCode = contact.ceremony?.code;
263
241
  const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;
264
242
  const secondaryFontStyle = typography.secondaryFontFamily != null ? { fontFamily: typography.secondaryFontFamily } : {};
243
+ const activeNameState = interaction?.fields?.firstName?.active ? interaction.fields.firstName : interaction?.fields?.lastName?.active ? interaction.fields.lastName : void 0;
265
244
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
266
245
  "div",
267
246
  {
@@ -271,6 +250,7 @@ function DefaultAd({
271
250
  "data-ad-content": "",
272
251
  "data-ad-ready": "true",
273
252
  "data-mode": mode,
253
+ "data-variant": variant,
274
254
  className: `gda-root ${className}`.trim(),
275
255
  style: {
276
256
  width: `${layout.columnsMm}mm`,
@@ -302,28 +282,28 @@ function DefaultAd({
302
282
  {
303
283
  field: type === "thanks" ? "thanksIntro" : "intro",
304
284
  interaction,
305
- className: `${type === "thanks" ? "gda-bold" : ""} ${variant === "classic" ? "gda-break" : ""}`,
285
+ className: `${type === "thanks" ? "gda-bold" : ""} gda-break`,
306
286
  style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, firstMargin),
307
287
  children: type === "thanks" && first ? first : type === "obituaries" ? first : null
308
288
  }
309
289
  ),
310
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: variant === "classic" ? "gda-break" : "", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
311
- hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [
290
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
291
+ hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `gda-name gda-bold gda-secondary-font ${activeNameState?.className ?? ""}`.trim(), style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle, ...activeNameState?.style }, children: [
312
292
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NamePart, { field: "firstName", value: contact.firstName, interaction }),
313
293
  " ",
314
294
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NamePart, { field: "lastName", value: contact.lastName, interaction })
315
- ] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `gda-placeholder ${variant === "classic" ? "gda-name gda-bold gda-secondary-font" : ""}`, style: variant === "classic" ? textStyle(typography.nameSize, typography.nameLeading, nameMargin) : void 0, children: emptyNamePlaceholder }) : null,
295
+ ] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null,
316
296
  contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
317
297
  "div",
318
298
  {
319
299
  className: `gda-dates ${isSingleColumn ? "gda-dates-single" : ""}`,
320
- style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn && variant === "classic" ? { gap: `${spacing.dateTop}pt` } : {} },
300
+ style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
321
301
  children: [
322
- contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: !contact.birthDate ? interaction?.fields?.birthDate?.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...!contact.birthDate ? interaction?.fields?.birthDate?.style : {} }, children: [
302
+ contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {} }, children: [
323
303
  "\u273B ",
324
304
  contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder
325
305
  ] }) : null,
326
- contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { "data-default-ad-field": "deathDate", ...fieldEvents("deathDate", interaction), className: !contact.deathDate ? interaction?.fields?.deathDate?.className : void 0, style: { fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...!contact.deathDate ? interaction?.fields?.deathDate?.style : {} }, children: [
306
+ contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { "data-default-ad-field": "deathDate", ...fieldEvents("deathDate", interaction), className: interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : void 0, style: { fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {} }, children: [
327
307
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "gda-death-cross", "aria-hidden": "true", children: "\u271D\uFE0E" }),
328
308
  " ",
329
309
  contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder
@@ -332,54 +312,38 @@ function DefaultAd({
332
312
  }
333
313
  ) : null,
334
314
  type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop), children: text.deceased }) : null,
335
- variant === "publication" && type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThankYouFields, { text, fmt, typography, spacing, interaction, variant, includeThanks: true }) : null,
336
- !(mode === "builder" && type === "thanks") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "memorial", interaction, className: `gda-italic ${variant === "classic" ? "gda-break" : ""}`, style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
337
- (type === "obituaries" || variant === "publication") && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, className: `${type === "obituaries" ? "gda-bold " : ""}gda-secondary-font`, style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }, children: text.sender }) : null,
315
+ type === "obituaries" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
316
+ type === "obituaries" && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, className: "gda-bold gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }, children: text.sender }) : null,
338
317
  (type === "obituaries" || variant === "publication") && ceremonyCode !== "NoCeremony" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gda-text", style: textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop), children: [
339
- contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: !contact.church ? interaction?.fields?.church?.className : void 0, style: !contact.church ? interaction?.fields?.church?.style : void 0, children: contact.church ? contact.church.length > 15 ? `${ceremonyLabel ?? ""}
318
+ contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: `gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? "" : ""}`.trim(), style: interaction?.fields?.church?.active ? interaction.fields.church.style : void 0, children: contact.church ? contact.church.length > 15 ? `${ceremonyLabel ?? ""}
340
319
  ${contact.church}` : `${ceremonyLabel ?? ""} ${contact.church}`.trim() : interaction?.fields?.church?.placeholder }) : null,
341
- contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), className: !contact.funeralDate ? interaction?.fields?.funeralDate?.className : void 0, style: !contact.funeralDate ? interaction?.fields?.funeralDate?.style : void 0, children: contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder }) : null
320
+ contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), className: interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : void 0, style: interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : void 0, children: contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder }) : null
342
321
  ] }) : null,
343
- variant === "classic" && type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThankYouFields, { text, fmt, typography, spacing, interaction, variant }) : null,
344
- !(variant === "publication" && type === "thanks") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "thanks", interaction, className: variant === "classic" ? "gda-break" : "gda-whitespace-normal", style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }) : null,
345
- variant === "classic" && type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, style: textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), children: text.sender }) : null,
322
+ type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThankYouFields, { text, fmt, typography, spacing, interaction }) : null,
323
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "thanks", interaction, className: "gda-break", style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }),
324
+ type === "thanks" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "sender", interaction, className: "gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }, children: text.sender }) : null,
346
325
  text.donation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gda-divider", style: { marginTop: `${spacing.donationTop}pt` } }) : null,
347
- text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "donation", interaction, className: `gda-donation gda-break ${variant === "publication" ? "gda-whitespace-normal" : ""}`, style: textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop), children: text.donation }) : null
326
+ text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "donation", interaction, className: "gda-donation gda-break", style: textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop), children: text.donation }) : null
348
327
  ]
349
328
  }
350
329
  );
351
330
  }
352
- function calculateHeaderMargins({ variant, first, second, hasName, hasIcon, typography, spacing }) {
353
- if (variant === "classic") {
354
- return {
355
- firstMargin: first && hasIcon ? spacing.iconToText : 0,
356
- secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
357
- nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
358
- };
359
- }
360
- const introExtra = (typography.introLeading - typography.introSize) / 2;
361
- const titleExtra = (typography.titleLeading - typography.titleSize) / 2;
362
- const nameExtra = (typography.nameLeading - typography.nameSize) / 2;
331
+ function calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }) {
363
332
  return {
364
- firstMargin: first && hasIcon ? spacing.iconToText - typography.introSize - introExtra : 0,
365
- secondMargin: second ? first ? spacing.introToTitle - typography.titleSize - titleExtra - introExtra : hasIcon ? spacing.iconToText - typography.titleSize - titleExtra : 0 : 0,
366
- nameMargin: hasName ? first || second ? spacing.textToName - typography.nameSize - nameExtra - titleExtra : hasIcon ? spacing.iconToText - typography.nameSize - nameExtra : 0 : 0
333
+ firstMargin: first && hasIcon ? spacing.iconToText : 0,
334
+ secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
335
+ nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
367
336
  };
368
337
  }
369
338
  function NamePart({ field, value, interaction }) {
370
339
  const state = interaction?.fields?.[field];
371
340
  if (!value && !state?.active) return null;
372
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-default-ad-field": field, className: !value ? state?.className : void 0, style: !value ? state?.style : void 0, ...fieldEvents(field, interaction), children: value || state?.placeholder });
341
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-default-ad-field": field, ...fieldEvents(field, interaction), children: value || state?.placeholder });
373
342
  }
374
- function ThankYouFields({ text, fmt, typography, spacing, interaction, variant, includeThanks = false }) {
375
- const breakClass = variant === "classic" ? "gda-break" : "gda-whitespace-normal";
376
- const ceremonySize = variant === "classic" ? typography.bodySize : typography.bodySize;
377
- const ceremonyLeading = variant === "classic" ? typography.bodyLeading : typography.bodyLeading;
378
- const ceremonyTop = variant === "classic" ? spacing.thanksTop : spacing.deceasedTop;
343
+ function ThankYouFields({ text, fmt, typography, spacing, interaction }) {
379
344
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
380
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "ceremony", interaction, className: breakClass, style: textStyle(ceremonySize, ceremonyLeading, ceremonyTop), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }),
381
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "message", interaction, className: breakClass, style: textStyle(typography.bodySize, typography.bodyLeading, variant === "classic" ? spacing.thanksTop : spacing.deceasedTop), children: text.message }),
382
- includeThanks ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "thanks", interaction, className: breakClass, style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }) : null
345
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "ceremony", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { field: "message", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop), children: text.message })
383
347
  ] });
384
348
  }
385
349
  // Annotate the CommonJS export names for ESM import in node:
@@ -387,6 +351,7 @@ function ThankYouFields({ text, fmt, typography, spacing, interaction, variant,
387
351
  DefaultAd,
388
352
  classicDefaultAdStyle,
389
353
  publicationDefaultAdStyle,
354
+ sharedDefaultAdLayout,
390
355
  styleFromLegacyTemplate
391
356
  });
392
357
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["export { DefaultAd } from \"./DefaultAd\";\nexport { classicDefaultAdStyle, publicationDefaultAdStyle, styleFromLegacyTemplate } from \"./presets\";\nexport type {\n DefaultAdContact,\n DefaultAdData,\n DefaultAdFormatters,\n DefaultAdField,\n DefaultAdFieldState,\n DefaultAdInteraction,\n DefaultAdIcon,\n DefaultAdMode,\n DefaultAdProps,\n DefaultAdSpacing,\n DefaultAdStyle,\n DefaultAdTextFields,\n DefaultAdType,\n DefaultAdVariant,\n DefaultAdTypography,\n LegacyAdTemplate,\n} from \"./types\";\n","import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // The legacy component passed these two values as unitless React styles (CSS px).\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...classicDefaultAdStyle,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n spacing: {\n ...classicDefaultAdStyle.spacing,\n iconToText: 0,\n introToTitle: 0,\n textToName: 0,\n sectionGapMm: 2,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n spacing: {\n ...publicationDefaultAdStyle.spacing,\n ...gapMm(template.gap),\n iconToText: template.textToIcon,\n introToTitle: template.titleToText,\n textToName: template.fullnameToText,\n dateTop: template.datesTextMT,\n deceasedTop: template.deceasedTextMT,\n memorialTop: template.memorialTextMT,\n senderTop: template.senderTextMT,\n ceremonyTop: template.ceremonyTextMT,\n thanksTop: template.thanksTextMT,\n donationTop: template.donationTextMT,\n },\n };\n}\n\nfunction gapMm(value: string | undefined): { sectionGapMm?: number } {\n const gap = value?.match(/gap-\\[(-?[\\d.]+)mm\\]/)?.[1];\n return gap ? { sectionGapMm: Number(gap) } : {};\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&amp;/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className}`.trim()} style={style} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n variant, first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), typography, spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} ${variant === \"classic\" ? \"gda-break\" : \"\"}`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className={variant === \"classic\" ? \"gda-break\" : \"\"} style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className={`gda-placeholder ${variant === \"classic\" ? \"gda-name gda-bold gda-secondary-font\" : \"\"}`} style={variant === \"classic\" ? textStyle(typography.nameSize, typography.nameLeading, nameMargin) : undefined}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn && variant === \"classic\" ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={!contact.birthDate ? interaction?.fields?.birthDate?.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(!contact.birthDate ? interaction?.fields?.birthDate?.style : {}) }}>\n &#10043; {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={!contact.deathDate ? interaction?.fields?.deathDate?.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(!contact.deathDate ? interaction?.fields?.deathDate?.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {variant === \"publication\" && type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} variant={variant} includeThanks /> : null}\n {!(mode === \"builder\" && type === \"thanks\") ? <Text field=\"memorial\" interaction={interaction} className={`gda-italic ${variant === \"classic\" ? \"gda-break\" : \"\"}`} style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {(type === \"obituaries\" || variant === \"publication\") && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className={`${type === \"obituaries\" ? \"gda-bold \" : \"\"}gda-secondary-font`} style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {(type === \"obituaries\" || variant === \"publication\") && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={!contact.church ? interaction?.fields?.church?.className : undefined} style={!contact.church ? interaction?.fields?.church?.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={!contact.funeralDate ? interaction?.fields?.funeralDate?.className : undefined} style={!contact.funeralDate ? interaction?.fields?.funeralDate?.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {variant === \"classic\" && type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} variant={variant} /> : null}\n {!(variant === \"publication\" && type === \"thanks\") ? <Text field=\"thanks\" interaction={interaction} className={variant === \"classic\" ? \"gda-break\" : \"gda-whitespace-normal\"} style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text> : null}\n {variant === \"classic\" && type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} style={textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop)}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className={`gda-donation gda-break ${variant === \"publication\" ? \"gda-whitespace-normal\" : \"\"}`} style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ variant, first, second, hasName, hasIcon, typography, spacing }: any) {\n if (variant === \"classic\") {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n }\n\n const introExtra = (typography.introLeading - typography.introSize) / 2;\n const titleExtra = (typography.titleLeading - typography.titleSize) / 2;\n const nameExtra = (typography.nameLeading - typography.nameSize) / 2;\n return {\n firstMargin: first && hasIcon ? spacing.iconToText - typography.introSize - introExtra : 0,\n secondMargin: second ? first\n ? spacing.introToTitle - typography.titleSize - titleExtra - introExtra\n : hasIcon ? spacing.iconToText - typography.titleSize - titleExtra : 0 : 0,\n nameMargin: hasName ? first || second\n ? spacing.textToName - typography.nameSize - nameExtra - titleExtra\n : hasIcon ? spacing.iconToText - typography.nameSize - nameExtra : 0 : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n if (!value && !state?.active) return null;\n return <span data-default-ad-field={field} className={!value ? state?.className : undefined} style={!value ? state?.style : undefined} {...fieldEvents(field, interaction)}>{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction, variant, includeThanks = false }: any) {\n const breakClass = variant === \"classic\" ? \"gda-break\" : \"gda-whitespace-normal\";\n const ceremonySize = variant === \"classic\" ? typography.bodySize : typography.bodySize;\n const ceremonyLeading = variant === \"classic\" ? typography.bodyLeading : typography.bodyLeading;\n const ceremonyTop = variant === \"classic\" ? spacing.thanksTop : spacing.deceasedTop;\n return <>\n <Text field=\"ceremony\" interaction={interaction} className={breakClass} style={textStyle(ceremonySize, ceremonyLeading, ceremonyTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className={breakClass} style={textStyle(typography.bodySize, typography.bodyLeading, variant === \"classic\" ? spacing.thanksTop : spacing.deceasedTop)}>{text.message}</Text>\n {includeThanks ? <Text field=\"thanks\" interaction={interaction} className={breakClass} style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text> : null}\n </>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,wBAAkD;AAAA,EAC7D,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AAAA,IACV,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,WAAW;AAAA,IACX,cAAc;AAAA,IACd,WAAW;AAAA,IACX,cAAc;AAAA,IACd,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,cAAc;AAAA,IACd,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA,IAEd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEO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Q;AAAA,IACpN,gBAAgB,4CAAC,QAAK,OAAM,UAAS,aAA0B,WAAW,YAAY,OAAO,UAAU,WAAW,YAAY,WAAW,eAAe,QAAQ,SAAS,GAAI,eAAK,QAAO,IAAU;AAAA,KACtM;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["export { DefaultAd } from \"./DefaultAd\";\nexport { classicDefaultAdStyle, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate } from \"./presets\";\nexport type {\n DefaultAdContact,\n DefaultAdData,\n DefaultAdFormatters,\n DefaultAdField,\n DefaultAdFieldState,\n DefaultAdInteraction,\n DefaultAdIcon,\n DefaultAdMode,\n DefaultAdProps,\n DefaultAdSpacing,\n DefaultAdStyle,\n DefaultAdTextFields,\n DefaultAdType,\n DefaultAdVariant,\n DefaultAdTypography,\n LegacyAdTemplate,\n} from \"./types\";\n","import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&amp;/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const activeNameState = interaction?.fields?.firstName?.active\n ? interaction.fields.firstName\n : interaction?.fields?.lastName?.active\n ? interaction.fields.lastName\n : undefined;\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? (\n <div className={`gda-name gda-bold gda-secondary-font ${activeNameState?.className ?? \"\"}`.trim()} style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle, ...activeNameState?.style }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n &#10043; {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {(type === \"obituaries\" || variant === \"publication\") && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={`gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? \"\" : \"\"}`.trim()} style={interaction?.fields?.church?.active ? interaction.fields.church.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : undefined} style={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} /> : null}\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text>\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }: any) {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n if (!value && !state?.active) return null;\n return <span data-default-ad-field={field} {...fieldEvents(field, interaction)}>{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction }: any) {\n return <>\n <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.message}</Text>\n </>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;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AAe,UAAU,QAAQ,aAAa,IAAK;AAAA,IAC3F,YAAY,UAAW,SAAS,SAAS,QAAQ,aAAa,UAAU,QAAQ,aAAa,IAAK;AAAA,EACpG;AACF;AAEA,SAAS,SAAS,EAAE,OAAO,OAAO,YAAY,GAAmG;AAC/I,QAAM,QAAQ,aAAa,SAAS,KAAK;AACzC,MAAI,CAAC,SAAS,CAAC,OAAO,OAAQ,QAAO;AACrC,SAAO,4CAAC,UAAK,yBAAuB,OAAQ,GAAG,YAAY,OAAO,WAAW,GAAI,mBAAS,OAAO,aAAY;AAC/G;AAEA,SAAS,eAAe,EAAE,MAAM,KAAK,YAAY,SAAS,YAAY,GAAQ;AAC5E,SAAO,4EACL;AAAA,gDAAC,QAAK,OAAM,YAAW,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,WAAW,IAAI,eAAe,KAAK,QAAQ,IAAI,MAAK;AAAA,IACnN,4CAAC,QAAK,OAAM,WAAU,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,SAAQ;AAAA,KACxK;AACF;","names":[]}
package/dist/index.css CHANGED
@@ -21,8 +21,8 @@
21
21
  font-weight: 400;
22
22
  white-space: pre-line;
23
23
  }
24
- .gda-whitespace-normal {
25
- white-space: normal;
24
+ .gda-whitespace-pre-line {
25
+ white-space: pre-line;
26
26
  }
27
27
  .gda-break {
28
28
  overflow-wrap: break-word;
@@ -45,7 +45,6 @@
45
45
  .gda-icon {
46
46
  display: flex;
47
47
  justify-content: center;
48
- line-height: 0;
49
48
  }
50
49
  .gda-dates {
51
50
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles.css"],"sourcesContent":[".gda-root {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n color: #000;\n background: #fff;\n stroke: #000;\n text-align: center;\n box-shadow: 0 0 30px -10px rgb(0 0 0 / 30%);\n transition: all 700ms;\n}\n.gda-root *, .gda-root *::before, .gda-root *::after { box-sizing: border-box; }\n.gda-text { font-weight: 400; white-space: pre-line; }\n.gda-whitespace-normal { white-space: normal; }\n.gda-break { overflow-wrap: break-word; }\n.gda-name { white-space: normal; }\n.gda-balance { text-wrap: balance; }\n.gda-bold { font-weight: 700; }\n.gda-italic { font-style: italic; }\n.gda-secondary-font { font-family: var(--default-ad-font-secondary, inherit); }\n.gda-icon { display: flex; justify-content: center; line-height: 0; }\n.gda-dates { display: flex; width: 100%; flex-flow: row nowrap; justify-content: center; gap: 4mm; font-weight: 400; white-space: nowrap; }\n.gda-dates-single { flex-direction: column; gap: 0; }\n.gda-death-cross { font-family: \"Times New Roman\", Times, serif; }\n.gda-divider { width: 3rem; margin-right: auto; margin-left: auto; border-top: 1.4pt solid #000; }\n.gda-donation { margin-right: 19pt; margin-left: 19pt; }\n.gda-placeholder { opacity: .25; }\n.gda-field-placeholder-container { display: flex; justify-content: center; }\n.gda-field-empty.gda-donation { margin-right: 0; margin-left: 0; }\n.gda-field-empty.gda-balance { text-wrap: initial; }\n"],"mappings":";AAAA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,YAAU;AACV,SAAO;AACP,cAAY;AACZ,UAAQ;AACR,cAAY;AACZ,cAAY,EAAE,EAAE,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE;AACvC,cAAY,IAAI;AAClB;AACA,CAbC,SAaS;AAAG,CAbZ,SAasB,CAAC;AAAU,CAbjC,SAa2C,CAAC;AAAU,cAAY;AAAY;AAC/E,CAAC;AAAW,eAAa;AAAK,eAAa;AAAU;AACrD,CAAC;AAAwB,eAAa;AAAQ;AAC9C,CAAC;AAAY,iBAAe;AAAY;AACxC,CAAC;AAAW,eAAa;AAAQ;AACjC,CAAC;AAAc,aAAW;AAAS;AACnC,CAAC;AAAW,eAAa;AAAK;AAC9B,CAAC;AAAa,cAAY;AAAQ;AAClC,CAAC;AAAqB,eAAa,IAAI,2BAA2B,EAAE;AAAU;AAC9E,CAAC;AAAW,WAAS;AAAM,mBAAiB;AAAQ,eAAa;AAAG;AACpE,CAAC;AAAY,WAAS;AAAM,SAAO;AAAM,aAAW,IAAI;AAAQ,mBAAiB;AAAQ,OAAK;AAAK,eAAa;AAAK,eAAa;AAAQ;AAC1I,CAAC;AAAmB,kBAAgB;AAAQ,OAAK;AAAG;AACpD,CAAC;AAAkB;AAAA,IAAa,iBAAiB;AAAA,IAAE,KAAK;AAAA,IAAE;AAAO;AACjE,CAAC;AAAc,SAAO;AAAM,gBAAc;AAAM,eAAa;AAAM,cAAY,MAAM,MAAM;AAAM;AACjG,CAAC;AAAe,gBAAc;AAAM,eAAa;AAAM;AACvD,CAAC;AAAkB,WAAS;AAAK;AACjC,CAAC;AAAkC,WAAS;AAAM,mBAAiB;AAAQ;AAC3E,CAAC,eAAe,CAHf;AAG+B,gBAAc;AAAG,eAAa;AAAG;AACjE,CADC,eACe,CAbf;AAa8B,aAAW;AAAS;","names":[]}
1
+ {"version":3,"sources":["../src/styles.css"],"sourcesContent":[".gda-root {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n color: #000;\n background: #fff;\n stroke: #000;\n text-align: center;\n box-shadow: 0 0 30px -10px rgb(0 0 0 / 30%);\n transition: all 700ms;\n}\n.gda-root *, .gda-root *::before, .gda-root *::after { box-sizing: border-box; }\n.gda-text { font-weight: 400; white-space: pre-line; }\n.gda-whitespace-pre-line { white-space: pre-line; }\n.gda-break { overflow-wrap: break-word; }\n.gda-name { white-space: normal; }\n.gda-balance { text-wrap: balance; }\n.gda-bold { font-weight: 700; }\n.gda-italic { font-style: italic; }\n.gda-secondary-font { font-family: var(--default-ad-font-secondary, inherit); }\n.gda-icon { display: flex; justify-content: center; }\n.gda-dates { display: flex; width: 100%; flex-flow: row nowrap; justify-content: center; gap: 4mm; font-weight: 400; white-space: nowrap; }\n.gda-dates-single { flex-direction: column; gap: 0; }\n.gda-death-cross { font-family: \"Times New Roman\", Times, serif; }\n.gda-divider { width: 3rem; margin-right: auto; margin-left: auto; border-top: 1.4pt solid #000; }\n.gda-donation { margin-right: 19pt; margin-left: 19pt; }\n.gda-placeholder { opacity: .25; }\n.gda-field-placeholder-container { display: flex; justify-content: center; }\n.gda-field-empty.gda-donation { margin-right: 0; margin-left: 0; }\n.gda-field-empty.gda-balance { text-wrap: initial; }\n"],"mappings":";AAAA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,YAAU;AACV,SAAO;AACP,cAAY;AACZ,UAAQ;AACR,cAAY;AACZ,cAAY,EAAE,EAAE,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE;AACvC,cAAY,IAAI;AAClB;AACA,CAbC,SAaS;AAAG,CAbZ,SAasB,CAAC;AAAU,CAbjC,SAa2C,CAAC;AAAU,cAAY;AAAY;AAC/E,CAAC;AAAW,eAAa;AAAK,eAAa;AAAU;AACrD,CAAC;AAA0B,eAAa;AAAU;AAClD,CAAC;AAAY,iBAAe;AAAY;AACxC,CAAC;AAAW,eAAa;AAAQ;AACjC,CAAC;AAAc,aAAW;AAAS;AACnC,CAAC;AAAW,eAAa;AAAK;AAC9B,CAAC;AAAa,cAAY;AAAQ;AAClC,CAAC;AAAqB,eAAa,IAAI,2BAA2B,EAAE;AAAU;AAC9E,CAAC;AAAW,WAAS;AAAM,mBAAiB;AAAQ;AACpD,CAAC;AAAY,WAAS;AAAM,SAAO;AAAM,aAAW,IAAI;AAAQ,mBAAiB;AAAQ,OAAK;AAAK,eAAa;AAAK,eAAa;AAAQ;AAC1I,CAAC;AAAmB,kBAAgB;AAAQ,OAAK;AAAG;AACpD,CAAC;AAAkB;AAAA,IAAa,iBAAiB;AAAA,IAAE,KAAK;AAAA,IAAE;AAAO;AACjE,CAAC;AAAc,SAAO;AAAM,gBAAc;AAAM,eAAa;AAAM,cAAY,MAAM,MAAM;AAAM;AACjG,CAAC;AAAe,gBAAc;AAAM,eAAa;AAAM;AACvD,CAAC;AAAkB,WAAS;AAAK;AACjC,CAAC;AAAkC,WAAS;AAAM,mBAAiB;AAAQ;AAC3E,CAAC,eAAe,CAHf;AAG+B,gBAAc;AAAG,eAAa;AAAG;AACjE,CADC,eACe,CAbf;AAa8B,aAAW;AAAS;","names":[]}
package/dist/index.d.mts CHANGED
@@ -125,7 +125,7 @@ interface DefaultAdProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
125
125
  data: DefaultAdData;
126
126
  style?: DefaultAdStyle;
127
127
  mode?: DefaultAdMode;
128
- /** Preserves the field order and ceremony behavior of each legacy consumer. */
128
+ /** Compatibility/diagnostic label; both variants use the shared visual layout. */
129
129
  variant?: DefaultAdVariant;
130
130
  /** Direct ref to the measured ad element; no wrapper is introduced. */
131
131
  rootRef?: Ref<HTMLDivElement>;
@@ -172,8 +172,34 @@ interface LegacyAdTemplate {
172
172
 
173
173
  declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, ...htmlProps }: DefaultAdProps): react.JSX.Element;
174
174
 
175
+ /**
176
+ * Canonical layout shared by every consumer. Typography is deliberately kept
177
+ * out of this object so applications can still select licensed/dynamic fonts.
178
+ */
179
+ declare const sharedDefaultAdLayout: {
180
+ readonly columnsMm: 86;
181
+ readonly heightMm: null;
182
+ readonly paddingMm: 4;
183
+ readonly horizontalPaddingMm: 2;
184
+ readonly border: false;
185
+ readonly borderWidthPt: 1.4;
186
+ readonly spacing: {
187
+ readonly iconToText: 11;
188
+ readonly introToTitle: 8;
189
+ readonly textToName: 4.2;
190
+ readonly iconToName: 4.95;
191
+ readonly dateTop: 5.6;
192
+ readonly deceasedTop: 6;
193
+ readonly memorialTop: 6;
194
+ readonly senderTop: 8;
195
+ readonly ceremonyTop: 8;
196
+ readonly thanksTop: 7;
197
+ readonly donationTop: 7;
198
+ readonly sectionGapMm: 0;
199
+ };
200
+ };
175
201
  declare const classicDefaultAdStyle: Readonly<DefaultAdStyle>;
176
202
  declare const publicationDefaultAdStyle: Readonly<DefaultAdStyle>;
177
203
  declare function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle;
178
204
 
179
- export { DefaultAd, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, publicationDefaultAdStyle, styleFromLegacyTemplate };
205
+ export { DefaultAd, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate };
package/dist/index.d.ts CHANGED
@@ -125,7 +125,7 @@ interface DefaultAdProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
125
125
  data: DefaultAdData;
126
126
  style?: DefaultAdStyle;
127
127
  mode?: DefaultAdMode;
128
- /** Preserves the field order and ceremony behavior of each legacy consumer. */
128
+ /** Compatibility/diagnostic label; both variants use the shared visual layout. */
129
129
  variant?: DefaultAdVariant;
130
130
  /** Direct ref to the measured ad element; no wrapper is introduced. */
131
131
  rootRef?: Ref<HTMLDivElement>;
@@ -172,8 +172,34 @@ interface LegacyAdTemplate {
172
172
 
173
173
  declare function DefaultAd({ data, style, mode, variant, rootRef, interaction, formatters, showEmptyNamePlaceholder, emptyNamePlaceholder, className, rootStyle, ...htmlProps }: DefaultAdProps): react.JSX.Element;
174
174
 
175
+ /**
176
+ * Canonical layout shared by every consumer. Typography is deliberately kept
177
+ * out of this object so applications can still select licensed/dynamic fonts.
178
+ */
179
+ declare const sharedDefaultAdLayout: {
180
+ readonly columnsMm: 86;
181
+ readonly heightMm: null;
182
+ readonly paddingMm: 4;
183
+ readonly horizontalPaddingMm: 2;
184
+ readonly border: false;
185
+ readonly borderWidthPt: 1.4;
186
+ readonly spacing: {
187
+ readonly iconToText: 11;
188
+ readonly introToTitle: 8;
189
+ readonly textToName: 4.2;
190
+ readonly iconToName: 4.95;
191
+ readonly dateTop: 5.6;
192
+ readonly deceasedTop: 6;
193
+ readonly memorialTop: 6;
194
+ readonly senderTop: 8;
195
+ readonly ceremonyTop: 8;
196
+ readonly thanksTop: 7;
197
+ readonly donationTop: 7;
198
+ readonly sectionGapMm: 0;
199
+ };
200
+ };
175
201
  declare const classicDefaultAdStyle: Readonly<DefaultAdStyle>;
176
202
  declare const publicationDefaultAdStyle: Readonly<DefaultAdStyle>;
177
203
  declare function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle;
178
204
 
179
- export { DefaultAd, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, publicationDefaultAdStyle, styleFromLegacyTemplate };
205
+ export { DefaultAd, type DefaultAdContact, type DefaultAdData, type DefaultAdField, type DefaultAdFieldState, type DefaultAdFormatters, type DefaultAdIcon, type DefaultAdInteraction, type DefaultAdMode, type DefaultAdProps, type DefaultAdSpacing, type DefaultAdStyle, type DefaultAdTextFields, type DefaultAdType, type DefaultAdTypography, type DefaultAdVariant, type LegacyAdTemplate, classicDefaultAdStyle, publicationDefaultAdStyle, sharedDefaultAdLayout, styleFromLegacyTemplate };
package/dist/index.js CHANGED
@@ -1,11 +1,30 @@
1
1
  // src/presets.ts
2
- var classicDefaultAdStyle = {
2
+ var sharedDefaultAdLayout = {
3
3
  columnsMm: 86,
4
4
  heightMm: null,
5
5
  paddingMm: 4,
6
6
  horizontalPaddingMm: 2,
7
7
  border: false,
8
8
  borderWidthPt: 1.4,
9
+ spacing: {
10
+ iconToText: 11,
11
+ introToTitle: 8,
12
+ // These values originated as unitless React styles and therefore retain
13
+ // their established numeric geometry.
14
+ textToName: 4.2,
15
+ iconToName: 4.95,
16
+ dateTop: 5.6,
17
+ deceasedTop: 6,
18
+ memorialTop: 6,
19
+ senderTop: 8,
20
+ ceremonyTop: 8,
21
+ thanksTop: 7,
22
+ donationTop: 7,
23
+ sectionGapMm: 0
24
+ }
25
+ };
26
+ var classicDefaultAdStyle = {
27
+ ...sharedDefaultAdLayout,
9
28
  typography: {
10
29
  fontFamily: "var(--default-ad-font-primary, Schoolbook, Georgia, serif)",
11
30
  secondaryFontFamily: "var(--default-ad-font-secondary, Schoolbook, Georgia, serif)",
@@ -31,25 +50,10 @@ var classicDefaultAdStyle = {
31
50
  thanksLeading: 12,
32
51
  donationSize: 10,
33
52
  donationLeading: 12
34
- },
35
- spacing: {
36
- iconToText: 11,
37
- introToTitle: 8,
38
- // The legacy component passed these two values as unitless React styles (CSS px).
39
- textToName: 4.2,
40
- iconToName: 4.95,
41
- dateTop: 5.6,
42
- deceasedTop: 6,
43
- memorialTop: 6,
44
- senderTop: 8,
45
- ceremonyTop: 8,
46
- thanksTop: 7,
47
- donationTop: 7,
48
- sectionGapMm: 0
49
53
  }
50
54
  };
51
55
  var publicationDefaultAdStyle = {
52
- ...classicDefaultAdStyle,
56
+ ...sharedDefaultAdLayout,
53
57
  typography: {
54
58
  ...classicDefaultAdStyle.typography,
55
59
  fontFamily: "var(--default-ad-font-primary, Raleway, Arial, sans-serif)",
@@ -75,13 +79,6 @@ var publicationDefaultAdStyle = {
75
79
  thanksLeading: 13,
76
80
  donationSize: 11,
77
81
  donationLeading: 13
78
- },
79
- spacing: {
80
- ...classicDefaultAdStyle.spacing,
81
- iconToText: 0,
82
- introToTitle: 0,
83
- textToName: 0,
84
- sectionGapMm: 2
85
82
  }
86
83
  };
87
84
  function styleFromLegacyTemplate(template) {
@@ -105,27 +102,9 @@ function styleFromLegacyTemplate(template) {
105
102
  ...fontPair(template.thanksText, "thanksSize", "thanksLeading"),
106
103
  ...fontPair(template.donationText, "donationSize", "donationLeading"),
107
104
  ...tracking(template.longDatesText)
108
- },
109
- spacing: {
110
- ...publicationDefaultAdStyle.spacing,
111
- ...gapMm(template.gap),
112
- iconToText: template.textToIcon,
113
- introToTitle: template.titleToText,
114
- textToName: template.fullnameToText,
115
- dateTop: template.datesTextMT,
116
- deceasedTop: template.deceasedTextMT,
117
- memorialTop: template.memorialTextMT,
118
- senderTop: template.senderTextMT,
119
- ceremonyTop: template.ceremonyTextMT,
120
- thanksTop: template.thanksTextMT,
121
- donationTop: template.donationTextMT
122
105
  }
123
106
  };
124
107
  }
125
- function gapMm(value) {
126
- const gap = value?.match(/gap-\[(-?[\d.]+)mm\]/)?.[1];
127
- return gap ? { sectionGapMm: Number(gap) } : {};
128
- }
129
108
  function fontPair(value, sizeKey, leadingKey) {
130
109
  if (!value) return {};
131
110
  const size = value.match(/text-\[(-?[\d.]+)pt\]/)?.[1];
@@ -177,7 +156,7 @@ function Text({ children, className = "", style, field, interaction }) {
177
156
  if (empty) {
178
157
  return /* @__PURE__ */ jsx("div", { className: "gda-field-placeholder-container", children: /* @__PURE__ */ jsx("div", { "data-default-ad-field": field, className: `gda-text gda-field-empty ${className} ${fieldState?.className ?? ""}`.trim(), style: { ...style, ...fieldState?.style }, ...events, children: fieldState?.placeholder }) });
179
158
  }
180
- return /* @__PURE__ */ jsx("div", { "data-default-ad-field": field, className: `gda-text ${className}`.trim(), style, ...events, children });
159
+ return /* @__PURE__ */ jsx("div", { "data-default-ad-field": field, className: `gda-text ${className} ${fieldState?.active ? fieldState.className ?? "" : ""}`.trim(), style: { ...style, ...fieldState?.active ? fieldState.style : void 0 }, ...events, children });
181
160
  }
182
161
  function fieldEvents(field, interaction) {
183
162
  return {
@@ -220,12 +199,10 @@ function DefaultAd({
220
199
  const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);
221
200
  const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);
222
201
  const headerMargins = calculateHeaderMargins({
223
- variant,
224
202
  first: hasVisualFirst,
225
203
  second: hasVisualSecond,
226
204
  hasName: hasVisualName,
227
205
  hasIcon: Boolean(icon),
228
- typography,
229
206
  spacing
230
207
  });
231
208
  const { firstMargin, secondMargin, nameMargin } = headerMargins;
@@ -233,6 +210,7 @@ function DefaultAd({
233
210
  const ceremonyCode = contact.ceremony?.code;
234
211
  const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;
235
212
  const secondaryFontStyle = typography.secondaryFontFamily != null ? { fontFamily: typography.secondaryFontFamily } : {};
213
+ const activeNameState = interaction?.fields?.firstName?.active ? interaction.fields.firstName : interaction?.fields?.lastName?.active ? interaction.fields.lastName : void 0;
236
214
  return /* @__PURE__ */ jsxs(
237
215
  "div",
238
216
  {
@@ -242,6 +220,7 @@ function DefaultAd({
242
220
  "data-ad-content": "",
243
221
  "data-ad-ready": "true",
244
222
  "data-mode": mode,
223
+ "data-variant": variant,
245
224
  className: `gda-root ${className}`.trim(),
246
225
  style: {
247
226
  width: `${layout.columnsMm}mm`,
@@ -273,28 +252,28 @@ function DefaultAd({
273
252
  {
274
253
  field: type === "thanks" ? "thanksIntro" : "intro",
275
254
  interaction,
276
- className: `${type === "thanks" ? "gda-bold" : ""} ${variant === "classic" ? "gda-break" : ""}`,
255
+ className: `${type === "thanks" ? "gda-bold" : ""} gda-break`,
277
256
  style: textStyle(type === "thanks" ? 14 : typography.introSize, typography.introLeading, firstMargin),
278
257
  children: type === "thanks" && first ? first : type === "obituaries" ? first : null
279
258
  }
280
259
  ),
281
- /* @__PURE__ */ jsx(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: variant === "classic" ? "gda-break" : "", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
282
- hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsx(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsxs("div", { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [
260
+ /* @__PURE__ */ jsx(Text, { field: type === "thanks" ? "briefIntroduction" : "title", interaction, className: "gda-break", style: textStyle(typography.titleSize, typography.titleLeading, secondMargin), children: type === "thanks" && second ? fmt.lowercaseFirst(second) : type === "obituaries" ? second : null }),
261
+ hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsx(Text, { className: "gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: [contact.firstName, contact.lastName].filter(Boolean).join(" ") }) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? /* @__PURE__ */ jsxs("div", { className: `gda-name gda-bold gda-secondary-font ${activeNameState?.className ?? ""}`.trim(), style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle, ...activeNameState?.style }, children: [
283
262
  /* @__PURE__ */ jsx(NamePart, { field: "firstName", value: contact.firstName, interaction }),
284
263
  " ",
285
264
  /* @__PURE__ */ jsx(NamePart, { field: "lastName", value: contact.lastName, interaction })
286
- ] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ jsx("div", { className: `gda-placeholder ${variant === "classic" ? "gda-name gda-bold gda-secondary-font" : ""}`, style: variant === "classic" ? textStyle(typography.nameSize, typography.nameLeading, nameMargin) : void 0, children: emptyNamePlaceholder }) : null,
265
+ ] }) : showEmptyNamePlaceholder ? /* @__PURE__ */ jsx("div", { className: "gda-placeholder gda-name gda-bold gda-secondary-font", style: { ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }, children: emptyNamePlaceholder }) : null,
287
266
  contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) || contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ jsxs(
288
267
  "div",
289
268
  {
290
269
  className: `gda-dates ${isSingleColumn ? "gda-dates-single" : ""}`,
291
- style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn && variant === "classic" ? { gap: `${spacing.dateTop}pt` } : {} },
270
+ style: { marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {} },
292
271
  children: [
293
- contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ jsxs("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: !contact.birthDate ? interaction?.fields?.birthDate?.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...!contact.birthDate ? interaction?.fields?.birthDate?.style : {} }, children: [
272
+ contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? /* @__PURE__ */ jsxs("span", { "data-default-ad-field": "birthDate", ...fieldEvents("birthDate", interaction), className: interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : void 0, style: { fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {} }, children: [
294
273
  "\u273B ",
295
274
  contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder
296
275
  ] }) : null,
297
- contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ jsxs("span", { "data-default-ad-field": "deathDate", ...fieldEvents("deathDate", interaction), className: !contact.deathDate ? interaction?.fields?.deathDate?.className : void 0, style: { fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...!contact.deathDate ? interaction?.fields?.deathDate?.style : {} }, children: [
276
+ contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? /* @__PURE__ */ jsxs("span", { "data-default-ad-field": "deathDate", ...fieldEvents("deathDate", interaction), className: interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : void 0, style: { fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}, ...interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {} }, children: [
298
277
  /* @__PURE__ */ jsx("span", { className: "gda-death-cross", "aria-hidden": "true", children: "\u271D\uFE0E" }),
299
278
  " ",
300
279
  contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder
@@ -303,60 +282,45 @@ function DefaultAd({
303
282
  }
304
283
  ) : null,
305
284
  type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "deceased", interaction, className: "gda-balance", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop), children: text.deceased }) : null,
306
- variant === "publication" && type === "thanks" ? /* @__PURE__ */ jsx(ThankYouFields, { text, fmt, typography, spacing, interaction, variant, includeThanks: true }) : null,
307
- !(mode === "builder" && type === "thanks") ? /* @__PURE__ */ jsx(Text, { field: "memorial", interaction, className: `gda-italic ${variant === "classic" ? "gda-break" : ""}`, style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
308
- (type === "obituaries" || variant === "publication") && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, className: `${type === "obituaries" ? "gda-bold " : ""}gda-secondary-font`, style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }, children: text.sender }) : null,
285
+ type === "obituaries" ? /* @__PURE__ */ jsx(Text, { field: "memorial", interaction, className: "gda-italic gda-break", style: textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop), children: text.memorial }) : null,
286
+ type === "obituaries" && (text.sender || interaction?.fields?.sender?.active) ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, className: "gda-bold gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }, children: text.sender }) : null,
309
287
  (type === "obituaries" || variant === "publication") && ceremonyCode !== "NoCeremony" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ jsxs("div", { className: "gda-text", style: textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop), children: [
310
- contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: !contact.church ? interaction?.fields?.church?.className : void 0, style: !contact.church ? interaction?.fields?.church?.style : void 0, children: contact.church ? contact.church.length > 15 ? `${ceremonyLabel ?? ""}
288
+ contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "church", ...fieldEvents("church", interaction), className: `gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? "" : ""}`.trim(), style: interaction?.fields?.church?.active ? interaction.fields.church.style : void 0, children: contact.church ? contact.church.length > 15 ? `${ceremonyLabel ?? ""}
311
289
  ${contact.church}` : `${ceremonyLabel ?? ""} ${contact.church}`.trim() : interaction?.fields?.church?.placeholder }) : null,
312
- contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), className: !contact.funeralDate ? interaction?.fields?.funeralDate?.className : void 0, style: !contact.funeralDate ? interaction?.fields?.funeralDate?.style : void 0, children: contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder }) : null
290
+ contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? /* @__PURE__ */ jsx("div", { "data-default-ad-field": "funeralDate", ...fieldEvents("funeralDate", interaction), className: interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : void 0, style: interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : void 0, children: contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder }) : null
313
291
  ] }) : null,
314
- variant === "classic" && type === "thanks" ? /* @__PURE__ */ jsx(ThankYouFields, { text, fmt, typography, spacing, interaction, variant }) : null,
315
- !(variant === "publication" && type === "thanks") ? /* @__PURE__ */ jsx(Text, { field: "thanks", interaction, className: variant === "classic" ? "gda-break" : "gda-whitespace-normal", style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }) : null,
316
- variant === "classic" && type === "thanks" ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, style: textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), children: text.sender }) : null,
292
+ type === "thanks" ? /* @__PURE__ */ jsx(ThankYouFields, { text, fmt, typography, spacing, interaction }) : null,
293
+ /* @__PURE__ */ jsx(Text, { field: "thanks", interaction, className: "gda-break", style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }),
294
+ type === "thanks" ? /* @__PURE__ */ jsx(Text, { field: "sender", interaction, className: "gda-secondary-font", style: { ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }, children: text.sender }) : null,
317
295
  text.donation ? /* @__PURE__ */ jsx("div", { className: "gda-divider", style: { marginTop: `${spacing.donationTop}pt` } }) : null,
318
- text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ jsx(Text, { field: "donation", interaction, className: `gda-donation gda-break ${variant === "publication" ? "gda-whitespace-normal" : ""}`, style: textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop), children: text.donation }) : null
296
+ text.donation || interaction?.fields?.donation?.active ? /* @__PURE__ */ jsx(Text, { field: "donation", interaction, className: "gda-donation gda-break", style: textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop), children: text.donation }) : null
319
297
  ]
320
298
  }
321
299
  );
322
300
  }
323
- function calculateHeaderMargins({ variant, first, second, hasName, hasIcon, typography, spacing }) {
324
- if (variant === "classic") {
325
- return {
326
- firstMargin: first && hasIcon ? spacing.iconToText : 0,
327
- secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
328
- nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
329
- };
330
- }
331
- const introExtra = (typography.introLeading - typography.introSize) / 2;
332
- const titleExtra = (typography.titleLeading - typography.titleSize) / 2;
333
- const nameExtra = (typography.nameLeading - typography.nameSize) / 2;
301
+ function calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }) {
334
302
  return {
335
- firstMargin: first && hasIcon ? spacing.iconToText - typography.introSize - introExtra : 0,
336
- secondMargin: second ? first ? spacing.introToTitle - typography.titleSize - titleExtra - introExtra : hasIcon ? spacing.iconToText - typography.titleSize - titleExtra : 0 : 0,
337
- nameMargin: hasName ? first || second ? spacing.textToName - typography.nameSize - nameExtra - titleExtra : hasIcon ? spacing.iconToText - typography.nameSize - nameExtra : 0 : 0
303
+ firstMargin: first && hasIcon ? spacing.iconToText : 0,
304
+ secondMargin: second ? first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0 : 0,
305
+ nameMargin: hasName ? first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0 : 0
338
306
  };
339
307
  }
340
308
  function NamePart({ field, value, interaction }) {
341
309
  const state = interaction?.fields?.[field];
342
310
  if (!value && !state?.active) return null;
343
- return /* @__PURE__ */ jsx("span", { "data-default-ad-field": field, className: !value ? state?.className : void 0, style: !value ? state?.style : void 0, ...fieldEvents(field, interaction), children: value || state?.placeholder });
311
+ return /* @__PURE__ */ jsx("span", { "data-default-ad-field": field, ...fieldEvents(field, interaction), children: value || state?.placeholder });
344
312
  }
345
- function ThankYouFields({ text, fmt, typography, spacing, interaction, variant, includeThanks = false }) {
346
- const breakClass = variant === "classic" ? "gda-break" : "gda-whitespace-normal";
347
- const ceremonySize = variant === "classic" ? typography.bodySize : typography.bodySize;
348
- const ceremonyLeading = variant === "classic" ? typography.bodyLeading : typography.bodyLeading;
349
- const ceremonyTop = variant === "classic" ? spacing.thanksTop : spacing.deceasedTop;
313
+ function ThankYouFields({ text, fmt, typography, spacing, interaction }) {
350
314
  return /* @__PURE__ */ jsxs(Fragment, { children: [
351
- /* @__PURE__ */ jsx(Text, { field: "ceremony", interaction, className: breakClass, style: textStyle(ceremonySize, ceremonyLeading, ceremonyTop), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }),
352
- /* @__PURE__ */ jsx(Text, { field: "message", interaction, className: breakClass, style: textStyle(typography.bodySize, typography.bodyLeading, variant === "classic" ? spacing.thanksTop : spacing.deceasedTop), children: text.message }),
353
- includeThanks ? /* @__PURE__ */ jsx(Text, { field: "thanks", interaction, className: breakClass, style: textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop), children: text.thanks }) : null
315
+ /* @__PURE__ */ jsx(Text, { field: "ceremony", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop), children: text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null }),
316
+ /* @__PURE__ */ jsx(Text, { field: "message", interaction, className: "gda-break", style: textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop), children: text.message })
354
317
  ] });
355
318
  }
356
319
  export {
357
320
  DefaultAd,
358
321
  classicDefaultAdStyle,
359
322
  publicationDefaultAdStyle,
323
+ sharedDefaultAdLayout,
360
324
  styleFromLegacyTemplate
361
325
  };
362
326
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // The legacy component passed these two values as unitless React styles (CSS px).\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...classicDefaultAdStyle,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n spacing: {\n ...classicDefaultAdStyle.spacing,\n iconToText: 0,\n introToTitle: 0,\n textToName: 0,\n sectionGapMm: 2,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n spacing: {\n ...publicationDefaultAdStyle.spacing,\n ...gapMm(template.gap),\n iconToText: template.textToIcon,\n introToTitle: template.titleToText,\n textToName: template.fullnameToText,\n dateTop: template.datesTextMT,\n deceasedTop: template.deceasedTextMT,\n memorialTop: template.memorialTextMT,\n senderTop: template.senderTextMT,\n ceremonyTop: template.ceremonyTextMT,\n thanksTop: template.thanksTextMT,\n donationTop: template.donationTextMT,\n },\n };\n}\n\nfunction gapMm(value: string | undefined): { sectionGapMm?: number } {\n const gap = value?.match(/gap-\\[(-?[\\d.]+)mm\\]/)?.[1];\n return gap ? { sectionGapMm: Number(gap) } : {};\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&amp;/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className}`.trim()} style={style} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n variant, first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), typography, spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} ${variant === \"classic\" ? \"gda-break\" : \"\"}`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className={variant === \"classic\" ? \"gda-break\" : \"\"} style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? (\n <div className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className={`gda-placeholder ${variant === \"classic\" ? \"gda-name gda-bold gda-secondary-font\" : \"\"}`} style={variant === \"classic\" ? textStyle(typography.nameSize, typography.nameLeading, nameMargin) : undefined}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn && variant === \"classic\" ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={!contact.birthDate ? interaction?.fields?.birthDate?.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(!contact.birthDate ? interaction?.fields?.birthDate?.style : {}) }}>\n &#10043; {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={!contact.deathDate ? interaction?.fields?.deathDate?.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(!contact.deathDate ? interaction?.fields?.deathDate?.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {variant === \"publication\" && type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} variant={variant} includeThanks /> : null}\n {!(mode === \"builder\" && type === \"thanks\") ? <Text field=\"memorial\" interaction={interaction} className={`gda-italic ${variant === \"classic\" ? \"gda-break\" : \"\"}`} style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {(type === \"obituaries\" || variant === \"publication\") && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className={`${type === \"obituaries\" ? \"gda-bold \" : \"\"}gda-secondary-font`} style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {(type === \"obituaries\" || variant === \"publication\") && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={!contact.church ? interaction?.fields?.church?.className : undefined} style={!contact.church ? interaction?.fields?.church?.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={!contact.funeralDate ? interaction?.fields?.funeralDate?.className : undefined} style={!contact.funeralDate ? interaction?.fields?.funeralDate?.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {variant === \"classic\" && type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} variant={variant} /> : null}\n {!(variant === \"publication\" && type === \"thanks\") ? <Text field=\"thanks\" interaction={interaction} className={variant === \"classic\" ? \"gda-break\" : \"gda-whitespace-normal\"} style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text> : null}\n {variant === \"classic\" && type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} style={textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop)}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className={`gda-donation gda-break ${variant === \"publication\" ? \"gda-whitespace-normal\" : \"\"}`} style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ variant, first, second, hasName, hasIcon, typography, spacing }: any) {\n if (variant === \"classic\") {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n }\n\n const introExtra = (typography.introLeading - typography.introSize) / 2;\n const titleExtra = (typography.titleLeading - typography.titleSize) / 2;\n const nameExtra = (typography.nameLeading - typography.nameSize) / 2;\n return {\n firstMargin: first && hasIcon ? spacing.iconToText - typography.introSize - introExtra : 0,\n secondMargin: second ? first\n ? spacing.introToTitle - typography.titleSize - titleExtra - introExtra\n : hasIcon ? spacing.iconToText - typography.titleSize - titleExtra : 0 : 0,\n nameMargin: hasName ? first || second\n ? spacing.textToName - typography.nameSize - nameExtra - titleExtra\n : hasIcon ? spacing.iconToText - typography.nameSize - nameExtra : 0 : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n if (!value && !state?.active) return null;\n return <span data-default-ad-field={field} className={!value ? state?.className : undefined} style={!value ? state?.style : undefined} {...fieldEvents(field, interaction)}>{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction, variant, includeThanks = false }: any) {\n const breakClass = variant === \"classic\" ? \"gda-break\" : \"gda-whitespace-normal\";\n const ceremonySize = variant === \"classic\" ? typography.bodySize : typography.bodySize;\n const ceremonyLeading = variant === \"classic\" ? typography.bodyLeading : typography.bodyLeading;\n const ceremonyTop = variant === \"classic\" ? spacing.thanksTop : spacing.deceasedTop;\n return <>\n <Text field=\"ceremony\" interaction={interaction} className={breakClass} style={textStyle(ceremonySize, ceremonyLeading, ceremonyTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className={breakClass} style={textStyle(typography.bodySize, typography.bodyLeading, variant === \"classic\" ? spacing.thanksTop : spacing.deceasedTop)}>{text.message}</Text>\n {includeThanks ? <Text field=\"thanks\" interaction={interaction} className={breakClass} style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text> : null}\n </>;\n}\n"],"mappings":";AAEO,IAAM,wBAAkD;AAAA,EAC7D,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AA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yBAAuB,OAAO,WAAW,CAAC,QAAQ,OAAO,YAAY,QAAW,OAAO,CAAC,QAAQ,OAAO,QAAQ,QAAY,GAAG,YAAY,OAAO,WAAW,GAAI,mBAAS,OAAO,aAAY;AAC3M;AAEA,SAAS,eAAe,EAAE,MAAM,KAAK,YAAY,SAAS,aAAa,SAAS,gBAAgB,MAAM,GAAQ;AAC5G,QAAM,aAAa,YAAY,YAAY,cAAc;AACzD,QAAM,eAAe,YAAY,YAAY,WAAW,WAAW,WAAW;AAC9E,QAAM,kBAAkB,YAAY,YAAY,WAAW,cAAc,WAAW;AACpF,QAAM,cAAc,YAAY,YAAY,QAAQ,YAAY,QAAQ;AACxE,SAAO,iCACL;AAAA,wBAAC,QAAK,OAAM,YAAW,aAA0B,WAAW,YAAY,OAAO,UAAU,cAAc,iBAAiB,WAAW,GAAI,eAAK,WAAW,IAAI,eAAe,KAAK,QAAQ,IAAI,MAAK;AAAA,IAChM,oBAAC,QAAK,OAAM,WAAU,aAA0B,WAAW,YAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,YAAY,YAAY,QAAQ,YAAY,QAAQ,WAAW,GAAI,eAAK,SAAQ;AAAA,IACpN,gBAAgB,oBAAC,QAAK,OAAM,UAAS,aAA0B,WAAW,YAAY,OAAO,UAAU,WAAW,YAAY,WAAW,eAAe,QAAQ,SAAS,GAAI,eAAK,QAAO,IAAU;AAAA,KACtM;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/presets.ts","../src/utils.ts","../src/DefaultAd.tsx"],"sourcesContent":["import type { DefaultAdStyle, LegacyAdTemplate } from \"./types\";\n\n/**\n * Canonical layout shared by every consumer. Typography is deliberately kept\n * out of this object so applications can still select licensed/dynamic fonts.\n */\nexport const sharedDefaultAdLayout = {\n columnsMm: 86,\n heightMm: null,\n paddingMm: 4,\n horizontalPaddingMm: 2,\n border: false,\n borderWidthPt: 1.4,\n spacing: {\n iconToText: 11,\n introToTitle: 8,\n // These values originated as unitless React styles and therefore retain\n // their established numeric geometry.\n textToName: 4.2,\n iconToName: 4.95,\n dateTop: 5.6,\n deceasedTop: 6,\n memorialTop: 6,\n senderTop: 8,\n ceremonyTop: 8,\n thanksTop: 7,\n donationTop: 7,\n sectionGapMm: 0,\n },\n} as const satisfies Readonly<DefaultAdStyle>;\n\nexport const classicDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n fontFamily: \"var(--default-ad-font-primary, Schoolbook, Georgia, serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Schoolbook, Georgia, serif)\",\n introSize: 10,\n introLeading: 12,\n titleSize: 10,\n titleLeading: 12,\n nameSize: 14,\n nameLeading: 16.8,\n dateSize: 10,\n longDateSize: 10,\n longDateLetterSpacing: \"-0.01em\",\n dateLeading: 12,\n bodySize: 10,\n bodyLeading: 12,\n memorialSize: 10,\n memorialLeading: 12,\n senderSize: 10,\n senderLeading: 12,\n ceremonySize: 10,\n ceremonyLeading: 12,\n thanksSize: 10,\n thanksLeading: 12,\n donationSize: 10,\n donationLeading: 12,\n },\n};\n\nexport const publicationDefaultAdStyle: Readonly<DefaultAdStyle> = {\n ...sharedDefaultAdLayout,\n typography: {\n ...classicDefaultAdStyle.typography,\n fontFamily: \"var(--default-ad-font-primary, Raleway, Arial, sans-serif)\",\n secondaryFontFamily: \"var(--default-ad-font-secondary, Athelas, Georgia, serif)\",\n introSize: 11,\n introLeading: 13,\n titleSize: 11,\n titleLeading: 13,\n nameSize: 17,\n nameLeading: 15,\n dateSize: 11.5,\n longDateSize: 11,\n longDateLetterSpacing: \"-0.01em\",\n bodySize: 12,\n bodyLeading: 13,\n memorialSize: 12,\n memorialLeading: 13,\n senderSize: 13,\n senderLeading: 13,\n ceremonySize: 11,\n ceremonyLeading: 13,\n thanksSize: 11,\n thanksLeading: 13,\n donationSize: 11,\n donationLeading: 13,\n },\n};\n\nexport function styleFromLegacyTemplate(template?: LegacyAdTemplate | null): DefaultAdStyle {\n if (!template) return publicationDefaultAdStyle;\n return {\n ...publicationDefaultAdStyle,\n typography: {\n ...publicationDefaultAdStyle.typography,\n fontFamily: template.font1 || publicationDefaultAdStyle.typography?.fontFamily,\n secondaryFontFamily: template.font2 || publicationDefaultAdStyle.typography?.secondaryFontFamily,\n introSize: template.introSize,\n introLeading: template.introLeading,\n titleSize: template.titleSize,\n titleLeading: template.titleLeading,\n nameSize: template.fullnameSize,\n nameLeading: template.fullnameLeading,\n ...fontPair(template.deceasedText, \"bodySize\", \"bodyLeading\"),\n ...fontPair(template.memorialText, \"memorialSize\", \"memorialLeading\"),\n ...fontPair(template.senderText, \"senderSize\", \"senderLeading\"),\n ...fontPair(template.ceremonyText, \"ceremonySize\", \"ceremonyLeading\"),\n ...fontPair(template.thanksText, \"thanksSize\", \"thanksLeading\"),\n ...fontPair(template.donationText, \"donationSize\", \"donationLeading\"),\n ...tracking(template.longDatesText),\n },\n };\n}\n\nfunction fontPair(value: string | undefined, sizeKey: string, leadingKey: string): Record<string, number> {\n if (!value) return {};\n const size = value.match(/text-\\[(-?[\\d.]+)pt\\]/)?.[1];\n const leading = value.match(/leading-\\[(-?[\\d.]+)pt\\]/)?.[1];\n return {\n ...(size ? { [sizeKey]: Number(size) } : {}),\n ...(leading ? { [leadingKey]: Number(leading) } : {}),\n };\n}\n\nfunction tracking(value: string | undefined): { longDateLetterSpacing?: string } {\n const amount = value?.match(/tracking-\\[([^\\]]+)\\]/)?.[1];\n return amount ? { longDateLetterSpacing: amount } : {};\n}\n","import type { DefaultAdFormatters } from \"./types\";\n\nexport const defaultFormatters: Required<DefaultAdFormatters> = {\n date(value) {\n const match = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n return match ? `${match[3]}.${match[2]}.${match[1]}` : value;\n },\n funeralDate(value, hideYear) {\n if (!hideYear) return value;\n return value.replace(/([.\\/-])\\d{4}(?=\\D|$)/, \"\");\n },\n lowercaseFirst(value) {\n return value ? value.charAt(0).toLocaleLowerCase() + value.slice(1) : value;\n },\n};\n\nexport function mergeDefined<T extends object>(base: T, overrides?: Partial<T>): T {\n if (!overrides) return { ...base };\n return Object.fromEntries(\n Object.entries({ ...base, ...overrides }).filter(([, value]) => value !== undefined),\n ) as T;\n}\n\nexport function decodeSvgMarkup(value: string): string {\n return value\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#(?:0*39|x0*27);/gi, \"'\")\n .replace(/&amp;/g, \"&\");\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { classicDefaultAdStyle } from \"./presets\";\nimport type { DefaultAdField, DefaultAdInteraction, DefaultAdProps, DefaultAdSpacing, DefaultAdTypography } from \"./types\";\nimport { decodeSvgMarkup, defaultFormatters, mergeDefined } from \"./utils\";\nimport \"./styles.css\";\n\nfunction textStyle(size: number, leading: number, marginTop: number): CSSProperties {\n return { fontSize: `${size}pt`, lineHeight: `${leading}pt`, marginTop: `${marginTop}pt` };\n}\n\nfunction Text({ children, className = \"\", style, field, interaction }: { children?: ReactNode; className?: string; style: CSSProperties; field?: DefaultAdField; interaction?: DefaultAdInteraction }) {\n const fieldState = field ? interaction?.fields?.[field] : undefined;\n const empty = children === null || children === undefined || children === \"\";\n if (empty && !fieldState?.active) return null;\n const events = field ? fieldEvents(field, interaction) : {};\n if (empty) {\n return <div className=\"gda-field-placeholder-container\"><div data-default-ad-field={field} className={`gda-text gda-field-empty ${className} ${fieldState?.className ?? \"\"}`.trim()} style={{ ...style, ...fieldState?.style }} {...events}>{fieldState?.placeholder}</div></div>;\n }\n return <div data-default-ad-field={field} className={`gda-text ${className} ${fieldState?.active ? fieldState.className ?? \"\" : \"\"}`.trim()} style={{ ...style, ...(fieldState?.active ? fieldState.style : undefined) }} {...events}>{children}</div>;\n}\n\nfunction fieldEvents(field: DefaultAdField, interaction?: DefaultAdInteraction) {\n return {\n onFocus: interaction?.onFieldFocus ? () => interaction.onFieldFocus?.(field) : undefined,\n onBlur: interaction?.onFieldBlur ? () => interaction.onFieldBlur?.(field) : undefined,\n onClick: interaction?.onFieldClick ? () => interaction.onFieldClick?.(field) : undefined,\n };\n}\n\nexport function DefaultAd({\n data,\n style,\n mode = \"published\",\n variant = \"classic\",\n rootRef,\n interaction,\n formatters,\n showEmptyNamePlaceholder = mode === \"builder\",\n emptyNamePlaceholder = \"Fornavn Efternavn\",\n className = \"\",\n rootStyle,\n ...htmlProps\n}: DefaultAdProps) {\n const typography = mergeDefined(\n classicDefaultAdStyle.typography as Required<DefaultAdTypography>,\n style?.typography,\n );\n const spacing = mergeDefined(\n classicDefaultAdStyle.spacing as Required<DefaultAdSpacing>,\n style?.spacing,\n );\n const layout = mergeDefined(classicDefaultAdStyle, style);\n const fmt = { ...defaultFormatters, ...formatters };\n const { contact, text, icon, type } = data;\n const hasName = Boolean(contact.firstName || contact.lastName);\n const first = type === \"thanks\" ? text.thanksIntro : text.intro;\n const second = type === \"thanks\" ? text.briefIntroduction : text.title;\n const firstField = type === \"thanks\" ? \"thanksIntro\" : \"intro\";\n const secondField = type === \"thanks\" ? \"briefIntroduction\" : \"title\";\n const hasVisualFirst = Boolean(first || interaction?.fields?.[firstField]?.active);\n const hasVisualSecond = Boolean(second || interaction?.fields?.[secondField]?.active);\n const hasVisualName = hasName || Boolean(interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active);\n const headerMargins = calculateHeaderMargins({\n first: hasVisualFirst, second: hasVisualSecond, hasName: hasVisualName, hasIcon: Boolean(icon), spacing,\n });\n const { firstMargin, secondMargin, nameMargin } = headerMargins;\n const isSingleColumn = Number(layout.columnsMm) === 41;\n const ceremonyCode = contact.ceremony?.code;\n const ceremonyLabel = contact.ceremony?.label ?? ceremonyCode;\n const secondaryFontStyle: CSSProperties = typography.secondaryFontFamily != null\n ? { fontFamily: typography.secondaryFontFamily }\n : {};\n const activeNameState = interaction?.fields?.firstName?.active\n ? interaction.fields.firstName\n : interaction?.fields?.lastName?.active\n ? interaction.fields.lastName\n : undefined;\n\n return (\n <div\n {...htmlProps}\n ref={rootRef}\n data-default-ad=\"\"\n data-ad-content=\"\"\n data-ad-ready=\"true\"\n data-mode={mode}\n data-variant={variant}\n className={`gda-root ${className}`.trim()}\n style={{\n width: `${layout.columnsMm}mm`,\n minWidth: `${layout.columnsMm}mm`,\n ...(layout.heightMm != null ? { height: `${layout.heightMm}mm` } : {}),\n padding: `${layout.paddingMm}mm ${layout.horizontalPaddingMm}mm`,\n border: layout.border ? `${layout.borderWidthPt}pt solid black` : 0,\n gap: `${spacing.sectionGapMm}mm`,\n ...(typography.fontFamily != null ? { fontFamily: typography.fontFamily } : {}),\n ...rootStyle,\n }}\n >\n {icon ? (\n <div className=\"gda-icon\">\n <svg className={icon.className} xmlns=\"http://www.w3.org/2000/svg\"\n width={Number(icon.width) + 16} height={Number(icon.height) + 16}\n viewBox={icon.viewBox} role={icon.title ? \"img\" : undefined} aria-label={icon.title} aria-hidden={icon.title ? undefined : true}\n dangerouslySetInnerHTML={{ __html: decodeSvgMarkup(icon.svg) }} />\n </div>\n ) : null}\n\n <Text field={type === \"thanks\" ? \"thanksIntro\" : \"intro\"} interaction={interaction} className={`${type === \"thanks\" ? \"gda-bold\" : \"\"} gda-break`}\n style={textStyle(type === \"thanks\" ? 14 : typography.introSize, typography.introLeading, firstMargin)}>\n {type === \"thanks\" && first ? first : type === \"obituaries\" ? first : null}\n </Text>\n <Text field={type === \"thanks\" ? \"briefIntroduction\" : \"title\"} interaction={interaction} className=\"gda-break\" style={textStyle(typography.titleSize, typography.titleLeading, secondMargin)}>\n {type === \"thanks\" && second ? fmt.lowercaseFirst(second) : type === \"obituaries\" ? second : null}\n </Text>\n\n {hasName && !interaction?.fields?.firstName?.active && !interaction?.fields?.lastName?.active ? (\n <Text className=\"gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>\n {[contact.firstName, contact.lastName].filter(Boolean).join(\" \")}\n </Text>\n ) : hasName || interaction?.fields?.firstName?.active || interaction?.fields?.lastName?.active ? (\n <div className={`gda-name gda-bold gda-secondary-font ${activeNameState?.className ?? \"\"}`.trim()} style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle, ...activeNameState?.style }}>\n <NamePart field=\"firstName\" value={contact.firstName} interaction={interaction} />{\" \"}\n <NamePart field=\"lastName\" value={contact.lastName} interaction={interaction} />\n </div>\n ) : showEmptyNamePlaceholder ? <div className=\"gda-placeholder gda-name gda-bold gda-secondary-font\" style={{ ...textStyle(typography.nameSize, typography.nameLeading, nameMargin), ...secondaryFontStyle }}>{emptyNamePlaceholder}</div> : null}\n\n {(contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active)) || (contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active)) ? (\n <div className={`gda-dates ${isSingleColumn ? \"gda-dates-single\" : \"\"}`}\n style={{ marginTop: `${spacing.dateTop}pt`, lineHeight: `${typography.dateLeading}pt`, ...(isSingleColumn ? { gap: `${spacing.dateTop}pt` } : {}) }}>\n {contact.showBirthDate && (contact.birthDate || interaction?.fields?.birthDate?.active) ? (\n <span data-default-ad-field=\"birthDate\" {...fieldEvents(\"birthDate\", interaction)} className={interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.className : undefined} style={{ fontSize: `${contact.birthDate && fmt.date(contact.birthDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.birthDate && fmt.date(contact.birthDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.birthDate?.active ? interaction.fields.birthDate.style : {}) }}>\n &#10043; {contact.birthDate ? fmt.date(contact.birthDate) : interaction?.fields?.birthDate?.placeholder}\n </span>\n ) : null}\n {contact.showDeathDate && (contact.deathDate || interaction?.fields?.deathDate?.active) ? (\n <span data-default-ad-field=\"deathDate\" {...fieldEvents(\"deathDate\", interaction)} className={interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.className : undefined} style={{ fontSize: `${contact.deathDate && fmt.date(contact.deathDate).length > 10 ? typography.longDateSize : typography.dateSize}pt`, ...(contact.deathDate && fmt.date(contact.deathDate).length > 10 ? { letterSpacing: typography.longDateLetterSpacing } : {}), ...(interaction?.fields?.deathDate?.active ? interaction.fields.deathDate.style : {}) }}>\n <span className=\"gda-death-cross\" aria-hidden=\"true\">✝︎</span> {contact.deathDate ? fmt.date(contact.deathDate) : interaction?.fields?.deathDate?.placeholder}\n </span>\n ) : null}\n </div>\n ) : null}\n\n {type === \"obituaries\" ? <Text field=\"deceased\" interaction={interaction} className=\"gda-balance\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.deceasedTop)}>{text.deceased}</Text> : null}\n {type === \"obituaries\" ? <Text field=\"memorial\" interaction={interaction} className=\"gda-italic gda-break\" style={textStyle(typography.memorialSize, typography.memorialLeading, spacing.memorialTop)}>{text.memorial}</Text> : null}\n {type === \"obituaries\" && (text.sender || interaction?.fields?.sender?.active) ? <Text field=\"sender\" interaction={interaction} className=\"gda-bold gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.senderTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n\n {(type === \"obituaries\" || variant === \"publication\") && ceremonyCode !== \"NoCeremony\" && (contact.showChurch || contact.showFuneralDate) && (contact.church || contact.funeralDate || interaction?.fields?.church?.active || interaction?.fields?.funeralDate?.active) ? (\n <div className=\"gda-text\" style={textStyle(typography.ceremonySize, typography.ceremonyLeading, spacing.ceremonyTop)}>\n {contact.showChurch && (contact.church || interaction?.fields?.church?.active) ? <div data-default-ad-field=\"church\" {...fieldEvents(\"church\", interaction)} className={`gda-whitespace-pre-line ${interaction?.fields?.church?.active ? interaction.fields.church.className ?? \"\" : \"\"}`.trim()} style={interaction?.fields?.church?.active ? interaction.fields.church.style : undefined}>{contact.church ? (contact.church.length > 15 ? `${ceremonyLabel ?? \"\"} \\n ${contact.church}` : `${ceremonyLabel ?? \"\"} ${contact.church}`.trim()) : interaction?.fields?.church?.placeholder}</div> : null}\n {contact.showFuneralDate && (contact.funeralDate || interaction?.fields?.funeralDate?.active) ? <div data-default-ad-field=\"funeralDate\" {...fieldEvents(\"funeralDate\", interaction)} className={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.className : undefined} style={interaction?.fields?.funeralDate?.active ? interaction.fields.funeralDate.style : undefined}>{contact.funeralDate ? fmt.funeralDate(contact.funeralDate, Boolean(contact.hideFuneralYear)) : interaction?.fields?.funeralDate?.placeholder}</div> : null}\n </div>\n ) : null}\n\n {type === \"thanks\" ? <ThankYouFields text={text} fmt={fmt} typography={typography} spacing={spacing} interaction={interaction} /> : null}\n <Text field=\"thanks\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.thanksSize, typography.thanksLeading, spacing.thanksTop)}>{text.thanks}</Text>\n {type === \"thanks\" ? <Text field=\"sender\" interaction={interaction} className=\"gda-secondary-font\" style={{ ...textStyle(typography.senderSize, typography.senderLeading, spacing.thanksTop), ...secondaryFontStyle }}>{text.sender}</Text> : null}\n {text.donation ? <div className=\"gda-divider\" style={{ marginTop: `${spacing.donationTop}pt` }} /> : null}\n {text.donation || interaction?.fields?.donation?.active ? <Text field=\"donation\" interaction={interaction} className=\"gda-donation gda-break\" style={textStyle(typography.donationSize, typography.donationLeading, spacing.donationTop)}>{text.donation}</Text> : null}\n </div>\n );\n}\n\nfunction calculateHeaderMargins({ first, second, hasName, hasIcon, spacing }: any) {\n return {\n firstMargin: first && hasIcon ? spacing.iconToText : 0,\n secondMargin: second ? (first ? spacing.introToTitle : hasIcon ? spacing.iconToText : 0) : 0,\n nameMargin: hasName ? (first || second ? spacing.textToName : hasIcon ? spacing.iconToName : 0) : 0,\n };\n}\n\nfunction NamePart({ field, value, interaction }: { field: \"firstName\" | \"lastName\"; value?: string | null; interaction?: DefaultAdInteraction }) {\n const state = interaction?.fields?.[field];\n if (!value && !state?.active) return null;\n return <span data-default-ad-field={field} {...fieldEvents(field, interaction)}>{value || state?.placeholder}</span>;\n}\n\nfunction ThankYouFields({ text, fmt, typography, spacing, interaction }: any) {\n return <>\n <Text field=\"ceremony\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.ceremony ? fmt.lowercaseFirst(text.ceremony) : null}</Text>\n <Text field=\"message\" interaction={interaction} className=\"gda-break\" style={textStyle(typography.bodySize, typography.bodyLeading, spacing.thanksTop)}>{text.message}</Text>\n </>;\n}\n"],"mappings":";AAMO,IAAM,wBAAwB;AAAA,EACnC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA;AAAA,IAGd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEO,IAAM,wBAAkD;AAAA,EAC7D,GAAG;AAAA,EACH,YAAY;AAAA,IACV,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,WAAW;AAAA,IACX,cAAc;AAAA,IACd,WAAW;AAAA,IACX,cAAc;AAAA,IACd,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,cAAc;AAAA,IACd,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AACF;AAEO,IAAM,4BAAsD;AAAA,EACjE,GAAG;AAAA,EACH,YAAY;AAAA,IACV,GAAG,sBAA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AC,QAAK,OAAM,YAAW,aAA0B,WAAU,0BAAyB,OAAO,UAAU,WAAW,cAAc,WAAW,iBAAiB,QAAQ,WAAW,GAAI,eAAK,UAAS,IAAU;AAAA;AAAA;AAAA,EACrQ;AAEJ;AAEA,SAAS,uBAAuB,EAAE,OAAO,QAAQ,SAAS,SAAS,QAAQ,GAAQ;AACjF,SAAO;AAAA,IACL,aAAa,SAAS,UAAU,QAAQ,aAAa;AAAA,IACrD,cAAc,SAAU,QAAQ,QAAQ,eAAe,UAAU,QAAQ,aAAa,IAAK;AAAA,IAC3F,YAAY,UAAW,SAAS,SAAS,QAAQ,aAAa,UAAU,QAAQ,aAAa,IAAK;AAAA,EACpG;AACF;AAEA,SAAS,SAAS,EAAE,OAAO,OAAO,YAAY,GAAmG;AAC/I,QAAM,QAAQ,aAAa,SAAS,KAAK;AACzC,MAAI,CAAC,SAAS,CAAC,OAAO,OAAQ,QAAO;AACrC,SAAO,oBAAC,UAAK,yBAAuB,OAAQ,GAAG,YAAY,OAAO,WAAW,GAAI,mBAAS,OAAO,aAAY;AAC/G;AAEA,SAAS,eAAe,EAAE,MAAM,KAAK,YAAY,SAAS,YAAY,GAAQ;AAC5E,SAAO,iCACL;AAAA,wBAAC,QAAK,OAAM,YAAW,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,WAAW,IAAI,eAAe,KAAK,QAAQ,IAAI,MAAK;AAAA,IACnN,oBAAC,QAAK,OAAM,WAAU,aAA0B,WAAU,aAAY,OAAO,UAAU,WAAW,UAAU,WAAW,aAAa,QAAQ,SAAS,GAAI,eAAK,SAAQ;AAAA,KACxK;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "navne-default-ad",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "Reusable obituary and thank-you advertisement renderer",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": ["**/*.css"],