@charisol/plexo-sdk 1.0.36 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-B23a0JeZ.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-BSPA3AY-.js";
2
2
  export { c as DEFAULT_BODY_FONT_FAMILY, i as FORM_NON_CSS_STYLE_KEYS, o as collectResponsiveRule, n as compileToHTML, e as compileToHTMLWithStrataAuto, a as compileToPlainText, s as convertSectionRowToPlexoRow, t as getFormDefaultStyle, r as getInlineStylesImportant, l as injectStrataBundle };
@@ -1,23 +1,32 @@
1
+ import { c as e, d as t, f as n, l as r, n as i, o as a, t as o, u as s } from "./iconSvgStatic-JHlo_YyU.js";
1
2
  //#region src/utilities/compilerClient.ts
2
- var e = /* @__PURE__ */ new Set([
3
+ var c = {
4
+ facebook: "facebook",
5
+ x: "twitter",
6
+ twitter: "twitter",
7
+ linkedin: "linkedin",
8
+ instagram: "instagram",
9
+ youtube: "youtube",
10
+ pinterest: "pinterest"
11
+ }, l = /* @__PURE__ */ new Set([
3
12
  "selectable",
4
13
  "draggable",
5
14
  "duplicatable",
6
15
  "deletable",
7
16
  "hideable",
8
17
  "locked"
9
- ]), t = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), n = (e = {}) => Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}:${String(t)};`).join(""), r = (...e) => e.map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), i = (t, n) => {
10
- let r = { ...t.attributes || {} };
11
- if (n === "email") for (let t of e) delete r[t];
12
- return r;
13
- }, a = (e, a) => {
14
- let o = i(e, a), s = n(e.style || {}), c = r(o.htmlClassNames, o.htmlClass, o.validationClass, o.validationClassName), l = t(o.name || o.fieldName || "field"), u = t(o.placeholder || ""), d = o.required ? " required" : "";
15
- if (a === "email") return `<mj-table><tr><td style="padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;${s}">${u || l}</td></tr></mj-table>`;
16
- let f = t(o.inputType || o.type || (e.type === "input" ? o.kind || "text" : e.type)), p = o.htmlId ? ` id="${t(o.htmlId)}"` : "", m = c ? ` class="${t(c)}"` : "";
17
- return e.type === "textarea" ? `<textarea${p}${m} name="${l}" placeholder="${u}" style="${s}"${d}>${t(o.value || "")}</textarea>` : e.type === "select" ? `<select${p}${m} name="${l}" style="${s}"${d}>${(o.options || []).map((e) => `<option value="${t(e.value)}">${t(e.label)}</option>`).join("")}</select>` : `<input${p}${m} type="${f}" name="${l}" placeholder="${u}" value="${t(o.value || "")}" style="${s}"${d} />`;
18
- }, o = (e, o) => {
19
- let s = i(e, o), c = n(e.style || {}), l = r(s.htmlClassNames, s.htmlClass), u = s.htmlId ? ` id="${t(s.htmlId)}"` : "", d = l ? ` class="${t(l)}"` : "", f = t(s.actionUrl || s.action || "#"), p = t(s.method || "POST"), m = s.fields || [], h = t(s.submitLabel || "Submit");
20
- return o === "email" ? `<mj-table><tr><td style="${c}"><table role="presentation" width="100%">${m.map((e) => `<tr><td style="padding:8px 0;font-family:Arial,sans-serif;color:#334155;"><strong>${t(e.label || e.name || "Field")}</strong><br/><span style="display:inline-block;margin-top:4px;padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;">${t(e.placeholder || "") || "&nbsp;"}</span></td></tr>`).join("")}<tr><td style="padding-top:12px;"><a href="${t(s.href || s.submitHref || "#")}" style="display:inline-block;padding:10px 16px;background:#0f172a;color:#ffffff;text-decoration:none;border-radius:6px;">${h}</a></td></tr></table></td></tr></mj-table>` : `<form${u}${d} action="${f}" method="${p}" style="${c}">${m.map((t) => a({
18
+ ]), u = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), d = (e = {}) => Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "").map(([e, t]) => `${e.replace(/([A-Z])/g, "-$1").toLowerCase()}:${String(t)};`).join(""), f = (...e) => e.map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), p = (e, t) => {
19
+ let n = { ...e.attributes || {} };
20
+ if (t === "email") for (let e of l) delete n[e];
21
+ return n;
22
+ }, m = (e, t) => {
23
+ let n = p(e, t), r = d(e.style || {}), i = f(n.htmlClassNames, n.htmlClass, n.validationClass, n.validationClassName), a = u(n.name || n.fieldName || "field"), o = u(n.placeholder || ""), s = n.required ? " required" : "";
24
+ if (t === "email") return `<mj-table><tr><td style="padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;${r}">${o || a}</td></tr></mj-table>`;
25
+ let c = u(n.inputType || n.type || (e.type === "input" ? n.kind || "text" : e.type)), l = n.htmlId ? ` id="${u(n.htmlId)}"` : "", m = i ? ` class="${u(i)}"` : "";
26
+ return e.type === "textarea" ? `<textarea${l}${m} name="${a}" placeholder="${o}" style="${r}"${s}>${u(n.value || "")}</textarea>` : e.type === "select" ? `<select${l}${m} name="${a}" style="${r}"${s}>${(n.options || []).map((e) => `<option value="${u(e.value)}">${u(e.label)}</option>`).join("")}</select>` : `<input${l}${m} type="${c}" name="${a}" placeholder="${o}" value="${u(n.value || "")}" style="${r}"${s} />`;
27
+ }, h = (e, t) => {
28
+ let n = p(e, t), r = d(e.style || {}), i = f(n.htmlClassNames, n.htmlClass), a = n.htmlId ? ` id="${u(n.htmlId)}"` : "", o = i ? ` class="${u(i)}"` : "", s = u(n.actionUrl || n.action || "#"), c = u(n.method || "POST"), l = n.fields || [], h = u(n.submitLabel || "Submit");
29
+ return t === "email" ? `<mj-table><tr><td style="${r}"><table role="presentation" width="100%">${l.map((e) => `<tr><td style="padding:8px 0;font-family:Arial,sans-serif;color:#334155;"><strong>${u(e.label || e.name || "Field")}</strong><br/><span style="display:inline-block;margin-top:4px;padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;">${u(e.placeholder || "") || "&nbsp;"}</span></td></tr>`).join("")}<tr><td style="padding-top:12px;"><a href="${u(n.href || n.submitHref || "#")}" style="display:inline-block;padding:10px 16px;background:#0f172a;color:#ffffff;text-decoration:none;border-radius:6px;">${h}</a></td></tr></table></td></tr></mj-table>` : `<form${a}${o} action="${s}" method="${c}" style="${r}">${l.map((t) => m({
21
30
  id: `${e.id}-${String(t.name || t.label || "field")}`,
22
31
  type: t.kind === "textarea" || t.kind === "select" ? t.kind : "input",
23
32
  style: {
@@ -26,36 +35,87 @@ var e = /* @__PURE__ */ new Set([
26
35
  },
27
36
  attributes: t
28
37
  }, "landing_page")).join("")}<button type="submit">${h}</button></form>`;
29
- }, s = (e, s) => {
30
- let c = i(e, s), l = n(e.style || {}), u = c.htmlId ? ` id="${t(c.htmlId)}"` : "", d = r(c.htmlClassNames, c.htmlClass, s === "landing_page" && c.hideOnMobile ? "hidden md:block" : ""), f = d ? ` class="${t(d)}"` : "", p = typeof c.customCss == "string" && c.customCss.trim() ? c.customCss.trim() : "", m = p && s === "landing_page" ? `<style>${p}</style>` : "";
31
- if (e.type === "form_container") return `${m}${o(e, s)}`;
32
- if (e.type === "input" || e.type === "select" || e.type === "textarea") return `${m}${a(e, s)}`;
33
- if (s === "email") {
34
- if (e.type === "button") {
35
- let e = t(c.href || "#"), n = t(c.text || "Button");
36
- return `<mj-button href="${e}" css-class="${c.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="10px 16px">${n}</mj-button>`;
37
- }
38
- return e.type === "image" ? `<mj-image src="${t(c.src || "")}" alt="${t(c.alt || "")}" />` : `<mj-text${u}${f} css-class="${c.hideOnDesktop ? "desktop-hide" : ""}">${t(c.text || c.htmlContent || "")}</mj-text>`;
38
+ }, g = (e = {}, t = {}) => {
39
+ let n = [], r = e.fontSize || t.fontSize, i = e.fontWeight || t.fontWeight;
40
+ return r && n.push(`font-size="${u(String(r))}"`), i && n.push(`font-weight="${u(String(i))}"`), e.color && n.push(`color="${u(String(e.color))}"`), e.fontFamily && n.push(`font-family="${u(String(e.fontFamily))}"`), e.lineHeight && n.push(`line-height="${u(String(e.lineHeight))}"`), e.letterSpacing && n.push(`letter-spacing="${u(String(e.letterSpacing))}"`), e.textAlign && n.push(`align="${u(String(e.textAlign))}"`), e.backgroundColor && n.push(`container-background-color="${u(String(e.backgroundColor))}"`), n.join(" ");
41
+ }, _ = (l, _) => {
42
+ let v = p(l, _), y = d(l.style || {}), b = v.htmlId ? ` id="${u(v.htmlId)}"` : "", x = f(v.htmlClassNames, v.htmlClass, _ === "landing_page" && v.hideOnMobile ? "hidden md:block" : ""), S = x ? ` class="${u(x)}"` : "", C = typeof v.customCss == "string" && v.customCss.trim() ? v.customCss.trim() : "", w = C && _ === "landing_page" ? `<style>${C}</style>` : "";
43
+ if (l.type === "form_container") return `${w}${h(l, _)}`;
44
+ if (l.type === "input" || l.type === "select" || l.type === "textarea") return `${w}${m(l, _)}`;
45
+ if (_ === "email") {
46
+ if (l.type === "button") {
47
+ let e = u(v.href || "#"), t = u(v.text || "Button"), n = i(l).width, r = n === "auto" ? "" : ` width="${u(n)}"`;
48
+ return `<mj-button href="${e}" css-class="${v.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="10px 16px"${r}>${t}</mj-button>`;
49
+ }
50
+ if (l.type === "image") {
51
+ let e = a(l), t = e.width && e.width !== "100%" ? ` width="${u(e.width)}"` : "", n = e.height && e.height !== "auto" ? ` height="${u(e.height)}"` : "";
52
+ return `<mj-image src="${u(v.src || "")}" alt="${u(v.alt || "")}"${t}${n} />`;
53
+ }
54
+ if (l.type === "social") {
55
+ let e = r(l), t = e.filter((e) => c[e.provider]), n = e.filter((e) => !c[e.provider]);
56
+ return `${t.length ? `<mj-social font-size="13px" icon-size="30px" mode="horizontal">${t.map((e) => `<mj-social-element name="${c[e.provider]}" href="${u(e.url)}" background-color="${u(e.backgroundColor)}" color="${u(e.color)}"></mj-social-element>`).join("")}</mj-social>` : ""}${n.length ? `<mj-text align="center">${n.map((e) => `<a href="${u(e.url)}" style="color: ${u(e.color)}; text-decoration: none; margin: 0 6px;">${u(e.provider)}</a>`).join("")}</mj-text>` : ""}`;
57
+ }
58
+ if (l.type === "menu") return `<mj-navbar hamburger="hamburger">${e(l).map((e) => `<mj-navbar-link href="${u(e.href)}">${u(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
59
+ if (l.type === "table") {
60
+ let e = s(l), t = l.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, r = (r, i, a) => {
61
+ let o = a ? "th" : "td", s = a ? t.headerBgColor || "#f8fafc" : e.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", c = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569";
62
+ return `<tr>${r.map((e) => `<${o} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${s}; color: ${c};">${u(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
63
+ }, i = +!!e.enableHeader, a = e.enableFooter ? e.cells.length - 1 : e.cells.length;
64
+ return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : ""}<tbody>${e.cells.slice(i, Math.max(i, a)).map((e, t) => r(e, t, !1)).join("")}</tbody>${e.enableFooter && e.cells.length > i ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
65
+ }
66
+ if (l.type === "video") {
67
+ let e = n(v.videoUrl), t = v.linkType === "email" ? `mailto:${v.href || ""}` : v.href || v.videoUrl || "#";
68
+ return `<mj-image src="${u(e.thumbnailUrl)}" href="${u(t)}" alt="${u(v.alt || "Video preview")}" />`;
69
+ }
70
+ if (l.type === "timer") {
71
+ let e = t(v.targetDate), n = v.showLabels !== !1;
72
+ return `<mj-text align="center"><div style="font-size: 28px; font-weight: 800;">${e.days}d ${e.hours}h ${e.minutes}m ${e.seconds}s</div>${n ? `<div style="font-size: 12px; color: #64748b;">Countdown to ${u(v.targetDate || "")}</div>` : ""}</mj-text>`;
73
+ }
74
+ if (l.type === "carousel") {
75
+ let e = Array.isArray(v.images) ? v.images : [];
76
+ return e.length === 0 ? "<mj-text align=\"center\">No images in carousel</mj-text>" : `<mj-carousel>${e.map((e) => `<mj-carousel-image src="${u(e.src)}" alt="${u(e.alt || "")}" />`).join("")}</mj-carousel>`;
77
+ }
78
+ if (l.type === "icon") {
79
+ let e = parseInt(String(v.iconSize || 48), 10) || 48, t = l.style?.color || "#1e293b";
80
+ return `<mj-text align="center">${o(v.iconName, e, t)}</mj-text>`;
81
+ }
82
+ let d = v.hideOnDesktop ? "desktop-hide" : "";
83
+ if (l.type === "heading" || l.type === "paragraph" || l.type === "text") {
84
+ let e = l.type === "heading" ? {
85
+ fontSize: "24px",
86
+ fontWeight: "700"
87
+ } : { fontSize: "14px" }, t = g(l.style || {}, e);
88
+ return `<mj-text${t ? ` ${t}` : ""} css-class="${d}">${u(v.text || "")}</mj-text>`;
89
+ }
90
+ if (l.type === "spacer") {
91
+ let e = l.style?.height || "24px";
92
+ return `<mj-spacer height="${u(String(e))}" />`;
93
+ }
94
+ if (l.type === "divider") {
95
+ let e = l.style || {};
96
+ return `<mj-divider border-width="${u(String(e.borderWidth || "1px"))}" border-style="${u(String(e.borderStyle || "solid"))}" border-color="${u(String(e.borderColor || "#334155"))}" />`;
97
+ }
98
+ return l.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${u(v.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${u(v.description || "Card description.")}</span></mj-text>` : l.type === "html" ? `<mj-text css-class="${d}">${v.htmlContent || v.text || ""}</mj-text>` : `<mj-text${b}${S} css-class="${d}">${u(v.text || v.htmlContent || "")}</mj-text>`;
39
99
  }
40
- switch (e.type) {
41
- case "heading": return `${m}<h2${u}${f} style="${l}">${t(c.text || "Heading")}</h2>`;
100
+ switch (l.type) {
101
+ case "heading": return `${w}<h2${b}${S} style="${y}">${u(v.text || "Heading")}</h2>`;
42
102
  case "paragraph":
43
- case "text": return `${m}<p${u}${f} style="${l}">${t(c.text || "")}</p>`;
44
- case "button": return `${m}<a${u}${f} href="${t(c.href || "#")}" style="${l}">${t(c.text || "Button")}</a>`;
45
- case "image": return `${m}<img${u}${f} src="${t(c.src || "")}" alt="${t(c.alt || "")}" style="${l}" />`;
46
- case "html": return `${m}<div${u}${f} style="${l}">${String(c.htmlContent || "")}</div>`;
47
- default: return `${m}<div${u}${f} style="${l}">${t(c.text || "")}</div>`;
103
+ case "text": return `${w}<p${b}${S} style="${y}">${u(v.text || "")}</p>`;
104
+ case "button": return `${w}<a${b}${S} href="${u(v.href || "#")}" style="${y}">${u(v.text || "Button")}</a>`;
105
+ case "image": return `${w}<img${b}${S} src="${u(v.src || "")}" alt="${u(v.alt || "")}" style="${y}" />`;
106
+ case "html": return `${w}<div${b}${S} style="${y}">${String(v.htmlContent || "")}</div>`;
107
+ default: return `${w}<div${b}${S} style="${y}">${u(v.text || "")}</div>`;
48
108
  }
49
- }, c = (e, r) => {
50
- if (r === "email") {
51
- let n = e.elements.map((e) => s(e, r)).join("");
52
- return `<mj-column width="${t(e.width || "100%")}">${n}</mj-column>`;
109
+ }, v = (e, t) => {
110
+ if (t === "email") {
111
+ let n = e.elements.map((e) => _(e, t)).join("");
112
+ return `<mj-column width="${u(e.width || "100%")}">${n}</mj-column>`;
53
113
  }
54
- let i = n(e.styles || {}), a = e.elements.map((e) => s(e, r)).join(""), o = (Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => l(e, r)).join("");
55
- return `<div style="width:${t(e.width || "100%")};${i}">${a}${o}</div>`;
56
- }, l = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}">${e.columns.map((e) => c(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${n(e.style || {})}">${e.columns.map((e) => c(e, t)).join("")}</section>`, u = (e, t) => {
57
- let r = (e.body?.rows || []).map((e) => l(e, t)).join(""), i = n(e.body?.style || {});
58
- return t === "email" ? `<mjml><mj-head><mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }</mj-style></mj-head><mj-body><mj-section><mj-column><mj-wrapper css-class="email-root" padding="0"><mj-text css-class="preheader" padding="0" font-size="1px" color="#ffffff">&nbsp;</mj-text></mj-wrapper></mj-column></mj-section>${r}</mj-body></mjml>` : `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${i}"><main>${r}</main></body></html>`;
114
+ let n = d(e.styles || {}), r = e.elements.map((e) => _(e, t)).join(""), i = (Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => y(e, t)).join("");
115
+ return `<div style="width:${u(e.width || "100%")};${n}">${r}${i}</div>`;
116
+ }, y = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}">${e.columns.map((e) => v(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${d(e.style || {})}">${e.columns.map((e) => v(e, t)).join("")}</section>`, b = (e, t) => {
117
+ let n = (e.body?.rows || []).map((e) => y(e, t)).join(""), r = d(e.body?.style || {});
118
+ return t === "email" ? `<mjml><mj-head><mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }</mj-style></mj-head><mj-body><mj-section><mj-column><mj-text css-class="preheader" padding="0" font-size="1px" color="#ffffff">&nbsp;</mj-text></mj-column></mj-section>${n}</mj-body></mjml>` : `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${r}"><main>${n}</main></body></html>`;
59
119
  };
60
120
  //#endregion
61
- export { u as parseJsonToTargetFormat };
121
+ export { b as parseJsonToTargetFormat };
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { TemplateJSON } from '../utilities/types';
3
+ import { type ImportResult } from './ImportModal';
3
4
  interface CodeViewerProps {
4
5
  activeTab: 'json' | 'html' | 'text';
5
6
  template: TemplateJSON;
6
7
  compiledHtml: string;
7
8
  compiledText: string;
8
9
  onNotify?: (message: string) => void;
10
+ onImportJson?: (jsonText: string) => ImportResult;
11
+ onImportHtml?: (htmlText: string) => ImportResult;
9
12
  theme?: {
10
13
  panelColor: string;
11
14
  borderColor: string;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ export interface ImportModalTheme {
3
+ panelColor?: string;
4
+ borderColor?: string;
5
+ textColor?: string;
6
+ themeBgColor?: string;
7
+ mutedTextColor?: string;
8
+ }
9
+ export interface ImportResult {
10
+ ok: boolean;
11
+ error?: string;
12
+ }
13
+ interface ImportModalProps {
14
+ open: boolean;
15
+ onClose: () => void;
16
+ title: string;
17
+ description: string;
18
+ accept: string;
19
+ placeholder: string;
20
+ onImport: (content: string) => ImportResult;
21
+ theme?: ImportModalTheme;
22
+ }
23
+ /**
24
+ * Generic paste/drop/browse-file import modal, shared by the Json and Html tabs'
25
+ * "Import" buttons in CodeViewer.tsx. Themed via the same {panelColor, borderColor,
26
+ * textColor, themeBgColor, mutedTextColor} shape CodeViewer/TopHeader already receive
27
+ * from the host's PlexoBuilder theme props, rather than a hardcoded look — no dialog/modal
28
+ * primitive existed anywhere in this codebase to reuse, so this is built directly against
29
+ * plain div overlays + the browser's native drag/drop and File APIs.
30
+ */
31
+ export declare const ImportModal: React.FC<ImportModalProps>;
32
+ export {};
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { SitePage } from '../../utilities/playground.interfaces';
3
+ export interface ResolvedSitePage {
4
+ id: string;
5
+ path: string;
6
+ label: string;
7
+ }
8
+ /**
9
+ * Computes each page's full resolved path ("/blog/post-1") and a breadcrumb
10
+ * label ("Blog / Post 1") by walking its parent chain — shared by the Menu
11
+ * and Button internal-link pickers.
12
+ */
13
+ export declare function resolveSitePages(sitePages: SitePage[]): Map<string, ResolvedSitePage>;
14
+ interface InternalLinkFieldProps {
15
+ value: string;
16
+ onChange: (value: string) => void;
17
+ sitePages: SitePage[];
18
+ }
19
+ /**
20
+ * Href field used by Menu items and the Button element: when the current
21
+ * landing page belongs to a multi-page site, offers a "Page on this site"
22
+ * picker (a dropdown of every page, resolved to a plain relative URL) next
23
+ * to the usual free-text "External URL" field. Falls back to a plain input
24
+ * when there's no site context (email templates, standalone pages, or
25
+ * sitePages hasn't loaded yet) so behavior is unchanged for those cases.
26
+ */
27
+ export declare const InternalLinkField: React.FC<InternalLinkFieldProps>;
28
+ export {};