pagepilot-visual-editor 1.0.43 → 1.0.45
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/email-builder-core/renderers/dedupeStyleTags.d.ts +1 -0
- package/dist/{index-BUtnK58L.js → index-BK3AbMJq.js} +1 -1
- package/dist/{index-DEnWBBqj.cjs → index-BOlBe6A-.cjs} +1 -1
- package/dist/{index-C-4OVLjk.cjs → index-DvtLJLpG.cjs} +62 -63
- package/dist/{index-DvEcR48I.js → index-xn9J_HmL.js} +2018 -2012
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render.cjs +6 -7
- package/dist/render.js +82 -76
- package/dist/renderToStaticHtml.d.ts +3 -0
- package/dist/{xlsx-D_Hwvvx2.js → xlsx-2UmlY1ds.js} +1 -1
- package/dist/{xlsx-BsoVkcdE.cjs → xlsx-DGKT6-hB.cjs} +1 -1
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -6863,9 +6863,9 @@ const mx = $().regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/), bx =
|
|
|
6863
6863
|
};
|
|
6864
6864
|
let Ax = 0;
|
|
6865
6865
|
function yx({ style: e, props: t }) {
|
|
6866
|
-
var
|
|
6866
|
+
var p;
|
|
6867
6867
|
const n = _e(() => `ahd-hv-text-${++Ax}`, []), r = Dt(n, t == null ? void 0 : t.hoverEffect, {
|
|
6868
|
-
themedBorderColor: B((
|
|
6868
|
+
themedBorderColor: B((p = t == null ? void 0 : t.hoverEffect) == null ? void 0 : p.borderColor, "borderAdaptive"),
|
|
6869
6869
|
scaleFromContainer: !0,
|
|
6870
6870
|
borderFromContainer: !0,
|
|
6871
6871
|
defaultScale: 1
|
|
@@ -6893,7 +6893,7 @@ function yx({ style: e, props: t }) {
|
|
|
6893
6893
|
overflowWrap: "break-word"
|
|
6894
6894
|
}, h = a, d = nu(
|
|
6895
6895
|
go((t == null ? void 0 : t.text) ?? Cx.text)
|
|
6896
|
-
);
|
|
6896
|
+
), f = ix(d);
|
|
6897
6897
|
return /* @__PURE__ */ O(
|
|
6898
6898
|
"div",
|
|
6899
6899
|
{
|
|
@@ -6910,11 +6910,11 @@ function yx({ style: e, props: t }) {
|
|
|
6910
6910
|
.text-block a{color:var(--pp-link,#2563eb);text-decoration:underline}/* keep in sync with LINK_COLOR (editor-sample InlineTextToolbar/types.ts) */
|
|
6911
6911
|
.text-block pre,.text-block code{white-space:pre-wrap;word-break:break-all;overflow-x:auto;max-width:100%}
|
|
6912
6912
|
${ux}
|
|
6913
|
-
${wi}
|
|
6914
|
-
${ix(d)}`
|
|
6913
|
+
${wi}`
|
|
6915
6914
|
}
|
|
6916
6915
|
}
|
|
6917
6916
|
),
|
|
6917
|
+
f && /* @__PURE__ */ b("style", { dangerouslySetInnerHTML: { __html: f } }),
|
|
6918
6918
|
/* @__PURE__ */ b("div", { style: h, dangerouslySetInnerHTML: { __html: d } })
|
|
6919
6919
|
]
|
|
6920
6920
|
}
|
|
@@ -18428,7 +18428,7 @@ const _d = {
|
|
|
18428
18428
|
schema: q_,
|
|
18429
18429
|
Component: Y_
|
|
18430
18430
|
}
|
|
18431
|
-
}, Ty = e1(_d),
|
|
18431
|
+
}, Ty = e1(_d), FI = Tn($(), Ty), Ey = Qx(_d);
|
|
18432
18432
|
function Me({ id: e }) {
|
|
18433
18433
|
var _, y, C, I, R, E, L;
|
|
18434
18434
|
const t = Iy(), { staticRender: n, injectElementIds: r, mainBlockId: o, hoistedSkipLinkId: a, hoistedA11yToolsId: i } = Ry(), l = t[e];
|
|
@@ -19151,7 +19151,10 @@ Ad.map((e) => {
|
|
|
19151
19151
|
}`;
|
|
19152
19152
|
}).join(`
|
|
19153
19153
|
`);
|
|
19154
|
-
const eI = (e) => {
|
|
19154
|
+
const eI = /<style(\s[^>]*)?>[\s\S]*?<\/style>/gi, tI = (e) => {
|
|
19155
|
+
const t = /* @__PURE__ */ new Set();
|
|
19156
|
+
return e.replace(eI, (n) => t.has(n) ? "" : (t.add(n), n));
|
|
19157
|
+
}, nI = (e) => {
|
|
19155
19158
|
let t = 0;
|
|
19156
19159
|
const n = e.replace(/<style([^>]*)>([\s\S]*?)<\/style>/gi, (r, o, a) => {
|
|
19157
19160
|
t++;
|
|
@@ -19249,7 +19252,7 @@ function yd(e, {
|
|
|
19249
19252
|
]
|
|
19250
19253
|
}
|
|
19251
19254
|
), q = zd(Q);
|
|
19252
|
-
let te = o ?
|
|
19255
|
+
let te = tI(o ? nI(q) : q);
|
|
19253
19256
|
const Se = [
|
|
19254
19257
|
P && rc,
|
|
19255
19258
|
M && oc,
|
|
@@ -19263,15 +19266,15 @@ function yd(e, {
|
|
|
19263
19266
|
function Id(e) {
|
|
19264
19267
|
return ((e == null ? void 0 : e.sectionType) || "internal") === "external";
|
|
19265
19268
|
}
|
|
19266
|
-
function
|
|
19269
|
+
function rI(e) {
|
|
19267
19270
|
var t;
|
|
19268
19271
|
return String((e == null ? void 0 : e.identifier) || ((t = e == null ? void 0 : e.metadata) == null ? void 0 : t.identifier) || "");
|
|
19269
19272
|
}
|
|
19270
|
-
function
|
|
19271
|
-
const t =
|
|
19273
|
+
function oI(e) {
|
|
19274
|
+
const t = rI(e);
|
|
19272
19275
|
return t ? `<div id="${Gr(t)}"></div>` : "";
|
|
19273
19276
|
}
|
|
19274
|
-
function
|
|
19277
|
+
function aI(e, t = {}) {
|
|
19275
19278
|
var a;
|
|
19276
19279
|
if (!e) return "";
|
|
19277
19280
|
const n = t.rootBlockId ?? "root", r = ((a = e == null ? void 0 : e[n]) == null ? void 0 : a.data) ?? {}, o = t.rootOverrides ?? {};
|
|
@@ -19304,7 +19307,7 @@ function rI(e, t = {}) {
|
|
|
19304
19307
|
function Gr(e) {
|
|
19305
19308
|
return String(e).replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
19306
19309
|
}
|
|
19307
|
-
function
|
|
19310
|
+
function iI(e, t, n = {}) {
|
|
19308
19311
|
var d, f, p;
|
|
19309
19312
|
const r = t.find((m) => !Id(m)), o = ((p = (f = (d = r == null ? void 0 : r.contentMetadata) == null ? void 0 : d.document) == null ? void 0 : f.root) == null ? void 0 : p.data) ?? {}, a = n.lang || o.lang || "en", i = n.canvasColor || o.canvasColor || "#FFFFFF", l = n.fontFamily || (typeof o.fontFamily == "string" ? o.fontFamily : "Inter, system-ui, sans-serif"), s = n.seoTitle ? `<title>${Gr(n.seoTitle)}</title>` : "", c = n.seoDescription ? `<meta name="description" content="${Gr(n.seoDescription)}" />` : "", u = n.extraHead ?? "", h = n.extraBodyBottom ?? "";
|
|
19310
19313
|
return `<!doctype html>
|
|
@@ -19327,17 +19330,17 @@ ${h}
|
|
|
19327
19330
|
</body>
|
|
19328
19331
|
</html>`;
|
|
19329
19332
|
}
|
|
19330
|
-
function
|
|
19333
|
+
function lI(e, t = {}) {
|
|
19331
19334
|
const n = t.includeExternalSections ?? !0, r = t.wrapInDocumentShell ?? !0, o = [], a = e.map((l) => {
|
|
19332
19335
|
var u;
|
|
19333
19336
|
if (Id(l)) {
|
|
19334
|
-
const h =
|
|
19337
|
+
const h = oI(l);
|
|
19335
19338
|
return n && h && o.push(h), { ...l, content: h };
|
|
19336
19339
|
}
|
|
19337
19340
|
const s = (u = l == null ? void 0 : l.contentMetadata) == null ? void 0 : u.document;
|
|
19338
19341
|
if (!s)
|
|
19339
19342
|
return l != null && l.content && o.push(String(l.content)), l;
|
|
19340
|
-
const c =
|
|
19343
|
+
const c = aI(s, t);
|
|
19341
19344
|
return c && o.push(c), {
|
|
19342
19345
|
...l,
|
|
19343
19346
|
content: c,
|
|
@@ -19349,12 +19352,12 @@ function aI(e, t = {}) {
|
|
|
19349
19352
|
}), i = o.join(`
|
|
19350
19353
|
`);
|
|
19351
19354
|
return r ? {
|
|
19352
|
-
html:
|
|
19355
|
+
html: iI(i, e, t),
|
|
19353
19356
|
sectionHtml: o,
|
|
19354
19357
|
flushedSections: a
|
|
19355
19358
|
} : { html: i, sectionHtml: o, flushedSections: a };
|
|
19356
19359
|
}
|
|
19357
|
-
function
|
|
19360
|
+
function sI(e) {
|
|
19358
19361
|
var a, i, l, s, c, u, h, d, f, p, m;
|
|
19359
19362
|
if (!e) return [];
|
|
19360
19363
|
const t = e.configuration ?? {}, n = (i = (a = t == null ? void 0 : t.root) == null ? void 0 : a.data) == null ? void 0 : i.formFields;
|
|
@@ -19375,7 +19378,7 @@ function iI(e) {
|
|
|
19375
19378
|
const o = (m = (p = (f = (d = (h = t == null ? void 0 : t.step) == null ? void 0 : h.contentMetadata) == null ? void 0 : d.document) == null ? void 0 : f.root) == null ? void 0 : p.data) == null ? void 0 : m.formFields;
|
|
19376
19379
|
return Array.isArray(o) && o.length > 0 ? o : Array.isArray(e.formFields) ? e.formFields : [];
|
|
19377
19380
|
}
|
|
19378
|
-
function
|
|
19381
|
+
function cI(e) {
|
|
19379
19382
|
var n, r, o, a, i, l, s;
|
|
19380
19383
|
if (!e || typeof e != "object") return null;
|
|
19381
19384
|
const t = e.configuration;
|
|
@@ -19421,7 +19424,7 @@ function Rd(e, t) {
|
|
|
19421
19424
|
}
|
|
19422
19425
|
return null;
|
|
19423
19426
|
}
|
|
19424
|
-
function
|
|
19427
|
+
function uI(e, t) {
|
|
19425
19428
|
if (!t || t.length === 0) {
|
|
19426
19429
|
const r = {};
|
|
19427
19430
|
for (const [o, a] of Object.entries(e))
|
|
@@ -19435,7 +19438,7 @@ function sI(e, t) {
|
|
|
19435
19438
|
}
|
|
19436
19439
|
return e.id !== void 0 && n.id === void 0 && (n.id = String(e.id)), n;
|
|
19437
19440
|
}
|
|
19438
|
-
async function
|
|
19441
|
+
async function dI(e, t, n, r) {
|
|
19439
19442
|
if (typeof AbortController > "u") return n(e, t);
|
|
19440
19443
|
const o = new AbortController(), a = setTimeout(() => o.abort(), r);
|
|
19441
19444
|
try {
|
|
@@ -19444,7 +19447,7 @@ async function cI(e, t, n, r) {
|
|
|
19444
19447
|
clearTimeout(a);
|
|
19445
19448
|
}
|
|
19446
19449
|
}
|
|
19447
|
-
async function
|
|
19450
|
+
async function hI(e, t = {}) {
|
|
19448
19451
|
var h;
|
|
19449
19452
|
const n = Array.isArray(e) ? e : [], r = n.filter(
|
|
19450
19453
|
(d) => {
|
|
@@ -19474,7 +19477,7 @@ async function uI(e, t = {}) {
|
|
|
19474
19477
|
var v;
|
|
19475
19478
|
const { apiUrl: f, apiMethod: p = "GET", apiItemPath: m } = d.dataSource;
|
|
19476
19479
|
try {
|
|
19477
|
-
const w = await
|
|
19480
|
+
const w = await dI(
|
|
19478
19481
|
f,
|
|
19479
19482
|
{
|
|
19480
19483
|
method: p,
|
|
@@ -19488,7 +19491,7 @@ async function uI(e, t = {}) {
|
|
|
19488
19491
|
const k = await w.json(), S = Rd(k, m);
|
|
19489
19492
|
if (!S)
|
|
19490
19493
|
throw new Error(`GET ${f} → response had no array of rows`);
|
|
19491
|
-
const x = S.map((_) =>
|
|
19494
|
+
const x = S.map((_) => uI(_, d.itemFields));
|
|
19492
19495
|
return l += 1, { id: d.id, value: x };
|
|
19493
19496
|
} catch (w) {
|
|
19494
19497
|
const k = w instanceof Error ? w : new Error(String(w));
|
|
@@ -19503,10 +19506,10 @@ async function uI(e, t = {}) {
|
|
|
19503
19506
|
(d) => c.has(d.id) ? { ...d, value: c.get(d.id) } : d
|
|
19504
19507
|
), attempted: r.length, refreshed: l, errors: i };
|
|
19505
19508
|
}
|
|
19506
|
-
async function
|
|
19509
|
+
async function fI(e, t = {}) {
|
|
19507
19510
|
var r, o;
|
|
19508
19511
|
const n = (o = (r = e == null ? void 0 : e.root) == null ? void 0 : r.data) == null ? void 0 : o.formFields;
|
|
19509
|
-
return
|
|
19512
|
+
return hI(Array.isArray(n) ? n : [], t);
|
|
19510
19513
|
}
|
|
19511
19514
|
function Td(e, t) {
|
|
19512
19515
|
if (!e) return t();
|
|
@@ -19517,19 +19520,19 @@ function Td(e, t) {
|
|
|
19517
19520
|
Ll(null);
|
|
19518
19521
|
}
|
|
19519
19522
|
}
|
|
19520
|
-
function
|
|
19523
|
+
function pI(e) {
|
|
19521
19524
|
const t = e;
|
|
19522
19525
|
return !!(t.pageId && t.baseUrl && t.tenantId);
|
|
19523
19526
|
}
|
|
19524
|
-
function
|
|
19527
|
+
function gI(e) {
|
|
19525
19528
|
const t = e;
|
|
19526
19529
|
return !!(t.pagePath && t.baseUrl && t.tenantId);
|
|
19527
19530
|
}
|
|
19528
|
-
function
|
|
19531
|
+
function mI(e) {
|
|
19529
19532
|
const t = e;
|
|
19530
19533
|
return !!(t.templateId && t.baseUrl);
|
|
19531
19534
|
}
|
|
19532
|
-
function
|
|
19535
|
+
function bI(e) {
|
|
19533
19536
|
if (!e || typeof e != "object") return e;
|
|
19534
19537
|
const t = Hi(e);
|
|
19535
19538
|
return !t || t.length === 0 ? e : Gi(e, t);
|
|
@@ -19541,7 +19544,7 @@ async function uc(e, t) {
|
|
|
19541
19544
|
if (!n || n.length === 0)
|
|
19542
19545
|
return { document: e, apiRefresh: null };
|
|
19543
19546
|
let r = n, o = null;
|
|
19544
|
-
return t.refreshApiDataSources && (o = await
|
|
19547
|
+
return t.refreshApiDataSources && (o = await fI(e, {
|
|
19545
19548
|
fetchFn: t.fetchFn,
|
|
19546
19549
|
headers: t.apiDataSourceHeaders,
|
|
19547
19550
|
timeoutMs: t.apiDataSourceTimeoutMs,
|
|
@@ -19551,7 +19554,7 @@ async function uc(e, t) {
|
|
|
19551
19554
|
apiRefresh: o
|
|
19552
19555
|
};
|
|
19553
19556
|
}
|
|
19554
|
-
const
|
|
19557
|
+
const vI = /* @__PURE__ */ new Set([
|
|
19555
19558
|
"ColumnsContainer",
|
|
19556
19559
|
"FlexColumns",
|
|
19557
19560
|
"Grid",
|
|
@@ -19595,7 +19598,7 @@ const mI = /* @__PURE__ */ new Set([
|
|
|
19595
19598
|
"Mdx",
|
|
19596
19599
|
"QuillBlock"
|
|
19597
19600
|
]);
|
|
19598
|
-
function
|
|
19601
|
+
function xI(e) {
|
|
19599
19602
|
var r, o, a;
|
|
19600
19603
|
const t = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.props) ?? {};
|
|
19601
19604
|
return {
|
|
@@ -19613,7 +19616,7 @@ function Ed(e) {
|
|
|
19613
19616
|
const n = {};
|
|
19614
19617
|
for (const [r, o] of Object.entries(e)) {
|
|
19615
19618
|
const a = o == null ? void 0 : o.type;
|
|
19616
|
-
a && !
|
|
19619
|
+
a && !vI.has(a) ? (n[r] = xI(o), t = !0, console.warn(
|
|
19617
19620
|
`[pagepilot-visual-editor] renderToStaticHtml: block "${r}" has unsupported type "${a}" — coerced to Text.`
|
|
19618
19621
|
)) : n[r] = o;
|
|
19619
19622
|
}
|
|
@@ -19622,7 +19625,7 @@ function Ed(e) {
|
|
|
19622
19625
|
function Wi(e, t) {
|
|
19623
19626
|
var i;
|
|
19624
19627
|
if (!e) return "";
|
|
19625
|
-
const n = t.rootBlockId ?? "root", r =
|
|
19628
|
+
const n = t.rootBlockId ?? "root", r = bI(e), o = Ed(r), a = ((i = o == null ? void 0 : o[n]) == null ? void 0 : i.data) ?? {};
|
|
19626
19629
|
return Td(t.recordType, () => yd(o, {
|
|
19627
19630
|
rootBlockId: n,
|
|
19628
19631
|
injectElementIds: t.injectElementIds ?? !0,
|
|
@@ -19633,6 +19636,9 @@ function Wi(e, t) {
|
|
|
19633
19636
|
accessibilityTools: t.accessibilityTools ?? a.accessibilityTools,
|
|
19634
19637
|
injectTabsScrollSyncScript: t.injectTabsScrollSyncScript,
|
|
19635
19638
|
injectCarouselScript: t.injectCarouselScript,
|
|
19639
|
+
injectPaginationScript: t.injectPaginationScript,
|
|
19640
|
+
injectAnimationScript: t.injectAnimationScript,
|
|
19641
|
+
injectPostMessageScript: t.injectPostMessageScript,
|
|
19636
19642
|
injectFontAssets: t.injectFontAssets,
|
|
19637
19643
|
seo: t.seo,
|
|
19638
19644
|
headHtml: t.headHtml,
|
|
@@ -19684,7 +19690,7 @@ async function Nd(e, t, n) {
|
|
|
19684
19690
|
}
|
|
19685
19691
|
};
|
|
19686
19692
|
})
|
|
19687
|
-
), { html: s } = Td(n.recordType ?? "page", () =>
|
|
19693
|
+
), { html: s } = Td(n.recordType ?? "page", () => lI(l, {
|
|
19688
19694
|
rootBlockId: n.rootBlockId,
|
|
19689
19695
|
injectTabsScrollSyncScript: n.injectTabsScrollSyncScript,
|
|
19690
19696
|
injectCarouselScript: n.injectCarouselScript,
|
|
@@ -19700,7 +19706,7 @@ async function Nd(e, t, n) {
|
|
|
19700
19706
|
}));
|
|
19701
19707
|
return s;
|
|
19702
19708
|
}
|
|
19703
|
-
async function
|
|
19709
|
+
async function kI(e, t) {
|
|
19704
19710
|
const { baseUrl: n, tenantId: r, pageId: o } = t, i = `${n.replace(/\/+$/, "")}/tenant/${r}/page/${o}`, l = Ui(t), s = await qi(
|
|
19705
19711
|
i,
|
|
19706
19712
|
{ method: "GET", headers: Zi(t) },
|
|
@@ -19712,7 +19718,7 @@ async function vI(e, t) {
|
|
|
19712
19718
|
);
|
|
19713
19719
|
return Nd(e, s.body, { ...t, fetchFn: l });
|
|
19714
19720
|
}
|
|
19715
|
-
async function
|
|
19721
|
+
async function wI(e, t) {
|
|
19716
19722
|
var d, f;
|
|
19717
19723
|
const { baseUrl: n, tenantId: r, pagePath: o, cache: a = !1, update: i = !0 } = t, s = `${n.replace(/\/+$/, "")}/tenant/${r}/pagebypath/${encodeURIComponent(
|
|
19718
19724
|
o
|
|
@@ -19728,14 +19734,14 @@ async function xI(e, t) {
|
|
|
19728
19734
|
const h = ((d = u.body) == null ? void 0 : d.data) ?? ((f = u.body) == null ? void 0 : f.payload) ?? u.body;
|
|
19729
19735
|
return Nd(e, h, { ...t, fetchFn: c });
|
|
19730
19736
|
}
|
|
19731
|
-
async function
|
|
19737
|
+
async function SI(e) {
|
|
19732
19738
|
const { baseUrl: t, tenantId: n, templateId: r, isGlobal: o = !1 } = e, a = t.replace(/\/+$/, ""), i = Ui(e), l = o ? `${a}/global-template/${r}` : `${a}/tenant/${n}/template/${r}`, s = o ? { "Content-Type": "application/json" } : Zi(e), c = await qi(l, { method: "GET", headers: s }, i);
|
|
19733
19739
|
if (c.ok) return c.body;
|
|
19734
19740
|
throw new Error(
|
|
19735
19741
|
`[pagepilot-visual-editor] renderToStaticHtml: GET ${l} → ${c.status}${c.text ? `: ${c.text}` : ""}`
|
|
19736
19742
|
);
|
|
19737
19743
|
}
|
|
19738
|
-
function
|
|
19744
|
+
function $I(e, t) {
|
|
19739
19745
|
if (!t) return e;
|
|
19740
19746
|
const n = /* @__PURE__ */ new Map();
|
|
19741
19747
|
for (const o of e) o != null && o.id && n.set(o.id, o);
|
|
@@ -19760,19 +19766,19 @@ function wI(e, t) {
|
|
|
19760
19766
|
}
|
|
19761
19767
|
return Array.from(n.values());
|
|
19762
19768
|
}
|
|
19763
|
-
async function
|
|
19764
|
-
const n = await
|
|
19769
|
+
async function _I(e, t) {
|
|
19770
|
+
const n = await SI(t), r = cI(n) ?? (e && Object.keys(e).length > 0 ? e : null);
|
|
19765
19771
|
if (!r) return "";
|
|
19766
|
-
const o =
|
|
19772
|
+
const o = sI(n), a = $I(o, t.variables), i = Gi(r, a);
|
|
19767
19773
|
return Wi(i, t);
|
|
19768
19774
|
}
|
|
19769
|
-
function
|
|
19770
|
-
return
|
|
19775
|
+
function HI(e, t) {
|
|
19776
|
+
return mI(t) ? _I(e, t) : gI(t) ? wI(e, t) : pI(t) ? kI(e, t) : Wi(e, t);
|
|
19771
19777
|
}
|
|
19772
|
-
function
|
|
19778
|
+
function CI() {
|
|
19773
19779
|
return `block-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
19774
19780
|
}
|
|
19775
|
-
function
|
|
19781
|
+
function AI(e, t) {
|
|
19776
19782
|
e.data && (Array.isArray(e.data.childrenIds) && (e.data.childrenIds = e.data.childrenIds.map((n) => t[n] ?? n)), e.data.props && (Array.isArray(e.data.props.childrenIds) && (e.data.props.childrenIds = e.data.props.childrenIds.map((n) => t[n] ?? n)), Array.isArray(e.data.props.startChildrenIds) && (e.data.props.startChildrenIds = e.data.props.startChildrenIds.map((n) => t[n] ?? n)), Array.isArray(e.data.props.endChildrenIds) && (e.data.props.endChildrenIds = e.data.props.endChildrenIds.map((n) => t[n] ?? n)), Array.isArray(e.data.props.columns) && (e.data.props.columns = e.data.props.columns.map((n) => ({
|
|
19777
19783
|
...n,
|
|
19778
19784
|
childrenIds: (n.childrenIds || []).map((r) => t[r] ?? r)
|
|
@@ -19790,15 +19796,15 @@ function _I(e, t) {
|
|
|
19790
19796
|
function kn(e, t) {
|
|
19791
19797
|
const n = ao(e, t), r = {};
|
|
19792
19798
|
n.forEach((a) => {
|
|
19793
|
-
r[a] =
|
|
19799
|
+
r[a] = CI();
|
|
19794
19800
|
});
|
|
19795
19801
|
const o = {};
|
|
19796
19802
|
return n.forEach((a) => {
|
|
19797
19803
|
const i = JSON.parse(JSON.stringify(e[a]));
|
|
19798
|
-
|
|
19804
|
+
AI(i, r), o[r[a]] = i;
|
|
19799
19805
|
}), { newBlocks: o, idMap: r, newRootId: r[t] };
|
|
19800
19806
|
}
|
|
19801
|
-
function
|
|
19807
|
+
function yI(e, t, n) {
|
|
19802
19808
|
var r, o, a, i;
|
|
19803
19809
|
for (const [l, s] of Object.entries(e)) {
|
|
19804
19810
|
if (!s || typeof s != "object") continue;
|
|
@@ -19925,7 +19931,7 @@ function CI(e, t, n) {
|
|
|
19925
19931
|
}
|
|
19926
19932
|
return null;
|
|
19927
19933
|
}
|
|
19928
|
-
function
|
|
19934
|
+
function II(e, t) {
|
|
19929
19935
|
var n, r, o;
|
|
19930
19936
|
for (const [a, i] of Object.entries(e)) {
|
|
19931
19937
|
if ((i == null ? void 0 : i.type) !== "FlexColumns") continue;
|
|
@@ -19938,7 +19944,7 @@ function AI(e, t) {
|
|
|
19938
19944
|
}
|
|
19939
19945
|
return null;
|
|
19940
19946
|
}
|
|
19941
|
-
function
|
|
19947
|
+
function RI(e, t) {
|
|
19942
19948
|
var n, r, o;
|
|
19943
19949
|
for (const [a, i] of Object.entries(e)) {
|
|
19944
19950
|
const l = (r = (n = i == null ? void 0 : i.data) == null ? void 0 : n.props) == null ? void 0 : r.cells;
|
|
@@ -19950,7 +19956,7 @@ function yI(e, t) {
|
|
|
19950
19956
|
}
|
|
19951
19957
|
return null;
|
|
19952
19958
|
}
|
|
19953
|
-
function
|
|
19959
|
+
function TI(e, t) {
|
|
19954
19960
|
var n, r, o;
|
|
19955
19961
|
for (const [a, i] of Object.entries(e)) {
|
|
19956
19962
|
if ((i == null ? void 0 : i.type) !== "Pagination") continue;
|
|
@@ -19963,7 +19969,7 @@ function II(e, t) {
|
|
|
19963
19969
|
}
|
|
19964
19970
|
return null;
|
|
19965
19971
|
}
|
|
19966
|
-
function
|
|
19972
|
+
function EI(e, t) {
|
|
19967
19973
|
var n, r, o;
|
|
19968
19974
|
for (const [a, i] of Object.entries(e)) {
|
|
19969
19975
|
const l = i == null ? void 0 : i.type;
|
|
@@ -20011,7 +20017,7 @@ function dc(e, t, n) {
|
|
|
20011
20017
|
}
|
|
20012
20018
|
}, { updatedDocument: S, newRootId: y };
|
|
20013
20019
|
}
|
|
20014
|
-
const o =
|
|
20020
|
+
const o = RI(e, n);
|
|
20015
20021
|
if (o) {
|
|
20016
20022
|
const m = e[o.gridId], v = m.data.props ?? {}, w = v.columnsCount ?? 2, k = v.rowsCount ?? 2, S = Array.isArray(v.cells) ? v.cells : [], _ = S.some(
|
|
20017
20023
|
(P) => (P == null ? void 0 : P.colStart) != null || (P == null ? void 0 : P.rowStart) != null || (P == null ? void 0 : P.colSpan) != null || (P == null ? void 0 : P.rowSpan) != null
|
|
@@ -20030,7 +20036,7 @@ function dc(e, t, n) {
|
|
|
20030
20036
|
}
|
|
20031
20037
|
}, newRootId: R };
|
|
20032
20038
|
}
|
|
20033
|
-
const a =
|
|
20039
|
+
const a = TI(e, n);
|
|
20034
20040
|
if (a) {
|
|
20035
20041
|
const m = e[a.paginationId], v = m.data.props ?? {}, w = v.columnsCount ?? 2, k = v.rowsCount ?? 2, S = Array.isArray(v.cells) ? v.cells : [], x = Math.max(w * k, S.length), _ = Array.from({ length: x }, (L, P) => S[P] ?? { childrenIds: [] });
|
|
20036
20042
|
let y = _.findIndex(
|
|
@@ -20047,7 +20053,7 @@ function dc(e, t, n) {
|
|
|
20047
20053
|
}
|
|
20048
20054
|
}, newRootId: I };
|
|
20049
20055
|
}
|
|
20050
|
-
const i =
|
|
20056
|
+
const i = II(e, n);
|
|
20051
20057
|
if (i) {
|
|
20052
20058
|
const m = e[i.flexId], v = m.data.props ?? {}, w = v.columnsCount ?? 2, k = Array.isArray(v.columns) ? v.columns : [], S = Array.from({ length: w }, (R, E) => k[E] ?? { childrenIds: [] });
|
|
20053
20059
|
let x = S.findIndex(
|
|
@@ -20064,7 +20070,7 @@ function dc(e, t, n) {
|
|
|
20064
20070
|
}
|
|
20065
20071
|
}, newRootId: y };
|
|
20066
20072
|
}
|
|
20067
|
-
const l =
|
|
20073
|
+
const l = EI(e, n);
|
|
20068
20074
|
if (l) {
|
|
20069
20075
|
let m = e[l.parentId], v = Array.isArray((p = m.data.props) == null ? void 0 : p.items) ? m.data.props.items : [], w = e, k = v.findIndex(
|
|
20070
20076
|
(C, I) => I > l.itemIndex && (!Array.isArray(C == null ? void 0 : C.contentChildrenIds) || C.contentChildrenIds.length === 0)
|
|
@@ -20097,10 +20103,10 @@ function dc(e, t, n) {
|
|
|
20097
20103
|
}
|
|
20098
20104
|
}, newRootId: x };
|
|
20099
20105
|
}
|
|
20100
|
-
const { newBlocks: s, newRootId: c } = kn(e, t), u = { ...e, ...s }, h =
|
|
20106
|
+
const { newBlocks: s, newRootId: c } = kn(e, t), u = { ...e, ...s }, h = yI(u, n, c);
|
|
20101
20107
|
return h && (u[h.parentId] = h.updatedParent), { updatedDocument: u, newRootId: c };
|
|
20102
20108
|
}
|
|
20103
|
-
function
|
|
20109
|
+
function NI(e, t) {
|
|
20104
20110
|
const n = (o) => Array.isArray(o) ? o.filter((a) => !t.has(a)) : o, r = {};
|
|
20105
20111
|
for (const [o, a] of Object.entries(e)) {
|
|
20106
20112
|
if (t.has(o)) continue;
|
|
@@ -20124,7 +20130,7 @@ function TI(e, t) {
|
|
|
20124
20130
|
}
|
|
20125
20131
|
return r;
|
|
20126
20132
|
}
|
|
20127
|
-
function
|
|
20133
|
+
function PI(e) {
|
|
20128
20134
|
var r;
|
|
20129
20135
|
const t = e == null ? void 0 : e.type, n = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.props) ?? {};
|
|
20130
20136
|
if (t === "Grid") {
|
|
@@ -20182,7 +20188,7 @@ function Vi(e, t) {
|
|
|
20182
20188
|
return r && r.containerId === t ? r : r && { ...r, containerId: t };
|
|
20183
20189
|
if (!ko(n.type))
|
|
20184
20190
|
return Er.set(n, null), null;
|
|
20185
|
-
const o =
|
|
20191
|
+
const o = PI(n);
|
|
20186
20192
|
if (!o)
|
|
20187
20193
|
return Er.set(n, null), null;
|
|
20188
20194
|
const { slotCount: a, slots: i } = o, l = i.findIndex((u) => u.childrenIds.length > 0), s = i.filter((u) => u.childrenIds.length === 0).length, c = { containerId: t, type: n.type, slotCount: a, slots: i, firstFilledSlot: l, emptySlotCount: s };
|
|
@@ -20196,7 +20202,7 @@ function hc(e, t) {
|
|
|
20196
20202
|
}
|
|
20197
20203
|
return null;
|
|
20198
20204
|
}
|
|
20199
|
-
function
|
|
20205
|
+
function MI(e, t, n, r) {
|
|
20200
20206
|
var c;
|
|
20201
20207
|
const o = e[t];
|
|
20202
20208
|
if (!o || !ko(o.type)) return e;
|
|
@@ -20242,7 +20248,7 @@ function NI(e, t, n, r) {
|
|
|
20242
20248
|
[t]: { ...o, data: { ...o.data, props: { ...a, columnsCount: n, columns: s } } }
|
|
20243
20249
|
};
|
|
20244
20250
|
}
|
|
20245
|
-
function
|
|
20251
|
+
function LI(e, t, n) {
|
|
20246
20252
|
var c;
|
|
20247
20253
|
const r = e[t];
|
|
20248
20254
|
if (!r || !ko(r.type)) return e;
|
|
@@ -20289,7 +20295,7 @@ function PI(e, t, n) {
|
|
|
20289
20295
|
[t]: { ...r, data: { ...r.data, props: { ...l, columnsCount: i, columns: s.slice(0, i) } } }
|
|
20290
20296
|
};
|
|
20291
20297
|
}
|
|
20292
|
-
function
|
|
20298
|
+
function GI(e, t, n, r = "columns") {
|
|
20293
20299
|
const o = t == null ? void 0 : t.sourceBlockId;
|
|
20294
20300
|
if (!o || !e[o]) return null;
|
|
20295
20301
|
const a = Math.max(1, n);
|
|
@@ -20307,7 +20313,7 @@ function FI(e, t, n, r = "columns") {
|
|
|
20307
20313
|
h = !0;
|
|
20308
20314
|
break;
|
|
20309
20315
|
}
|
|
20310
|
-
const m = Vi(i, p), v = ((m == null ? void 0 : m.slotCount) ?? 0) + (a - s), w =
|
|
20316
|
+
const m = Vi(i, p), v = ((m == null ? void 0 : m.slotCount) ?? 0) + (a - s), w = MI(i, p, v, r);
|
|
20311
20317
|
if (w === i) {
|
|
20312
20318
|
h = !0;
|
|
20313
20319
|
break;
|
|
@@ -20326,9 +20332,9 @@ function FI(e, t, n, r = "columns") {
|
|
|
20326
20332
|
const h = /* @__PURE__ */ new Set();
|
|
20327
20333
|
for (const f of u)
|
|
20328
20334
|
for (const p of ao(i, f)) h.add(p);
|
|
20329
|
-
i =
|
|
20335
|
+
i = NI(i, h);
|
|
20330
20336
|
const d = hc(i, o);
|
|
20331
|
-
d && (i =
|
|
20337
|
+
d && (i = LI(i, d, c)), l = l.slice(0, c - 1), s = 1 + l.length;
|
|
20332
20338
|
}
|
|
20333
20339
|
return { document: i, sourceBlockId: o, rowIds: l, achievedRowCount: s, capacityLimited: !1 };
|
|
20334
20340
|
}
|
|
@@ -20336,18 +20342,18 @@ export {
|
|
|
20336
20342
|
so as Reader,
|
|
20337
20343
|
Me as ReaderBlock,
|
|
20338
20344
|
Ty as ReaderBlockSchema,
|
|
20339
|
-
|
|
20345
|
+
FI as ReaderDocumentSchema,
|
|
20340
20346
|
kn as cloneSubtree,
|
|
20341
20347
|
Rd as extractApiRows,
|
|
20342
20348
|
hc as findRepeatableContainerOf,
|
|
20343
20349
|
Vi as getRepeatableContainerInfo,
|
|
20344
|
-
|
|
20350
|
+
MI as growContainerToFit,
|
|
20345
20351
|
ko as isRepeatableContainerType,
|
|
20346
|
-
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20352
|
+
GI as reconcileRepeatFieldRowCount,
|
|
20353
|
+
hI as refreshApiDataSources,
|
|
20354
|
+
fI as refreshDocumentApiDataSources,
|
|
20355
|
+
NI as removeSubtree,
|
|
20356
|
+
HI as renderToStaticHtml,
|
|
20351
20357
|
yd as renderToStaticMarkup,
|
|
20352
|
-
|
|
20358
|
+
LI as shrinkContainerToFit
|
|
20353
20359
|
};
|
|
@@ -12,6 +12,9 @@ interface BaseRenderOptions {
|
|
|
12
12
|
accessibilityTools?: any;
|
|
13
13
|
injectTabsScrollSyncScript?: boolean;
|
|
14
14
|
injectCarouselScript?: boolean;
|
|
15
|
+
injectPaginationScript?: boolean;
|
|
16
|
+
injectAnimationScript?: boolean;
|
|
17
|
+
injectPostMessageScript?: boolean;
|
|
15
18
|
injectFontAssets?: boolean;
|
|
16
19
|
seo?: any;
|
|
17
20
|
headHtml?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const $0=require("./index-
|
|
1
|
+
"use strict";const $0=require("./index-DvtLJLpG.cjs"),B0=require("./_commonjs-dynamic-modules-DMkBISW1.cjs");function op(i0,Wr){for(var l=0;l<Wr.length;l++){const x=Wr[l];if(typeof x!="string"&&!Array.isArray(x)){for(const a in x)if(a!=="default"&&!(a in i0)){const e=Object.getOwnPropertyDescriptor(x,a);e&&Object.defineProperty(i0,a,e.get?e:{enumerable:!0,get:()=>x[a]})}}}return Object.freeze(Object.defineProperty(i0,Symbol.toStringTag,{value:"Module"}))}var gi={exports:{}},xi={exports:{}},Ef;function Cf(){return Ef||(Ef=1,function(i0){var Wr={version:"1.14.0"};Wr[437]=function(){for(var l=`\0\x07\b
|
|
2
2
|
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `,x=[],a={},e=0;e!=l.length;++e)l.charCodeAt(e)!==65533&&(a[l.charAt(e)]=e),x[e]=l.charAt(e);return{enc:a,dec:x}}(),Wr[620]=function(){for(var l=`\0\x07\b
|
|
3
3
|
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàąçêëèïîćÄĄĘęłôöĆûùŚÖܢ٥śƒŹŻóÓńŃźż¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `,x=[],a={},e=0;e!=l.length;++e)l.charCodeAt(e)!==65533&&(a[l.charAt(e)]=e),x[e]=l.charAt(e);return{enc:a,dec:x}}(),Wr[737]=function(){for(var l=`\0\x07\b
|
|
4
4
|
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ `,x=[],a={},e=0;e!=l.length;++e)l.charCodeAt(e)!==65533&&(a[l.charAt(e)]=e),x[e]=l.charAt(e);return{enc:a,dec:x}}(),Wr[850]=function(){for(var l=`\0\x07\b
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pagepilot-visual-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Standalone visual editor — drop <PagePilotEditor> into any React app and get Style/Layout/Inspect/Layers panels, drag-and-drop blocks, undo/redo, dirty-tracked save, multi-section pages, and light/dark themes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|