pagepilot-visual-editor 1.0.44 → 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-CnLfsbws.js → index-BK3AbMJq.js} +1 -1
- package/dist/{index-CFRx296W.cjs → index-BOlBe6A-.cjs} +1 -1
- package/dist/{index-BO4IFeAW.cjs → index-DvtLJLpG.cjs} +62 -63
- package/dist/{index-LXr2Pc6N.js → index-xn9J_HmL.js} +2015 -2012
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render.cjs +6 -7
- package/dist/render.js +79 -76
- package/dist/{xlsx-BTBqP-DW.js → xlsx-2UmlY1ds.js} +1 -1
- package/dist/{xlsx-BK0uTaY1.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,
|
|
@@ -19687,7 +19690,7 @@ async function Nd(e, t, n) {
|
|
|
19687
19690
|
}
|
|
19688
19691
|
};
|
|
19689
19692
|
})
|
|
19690
|
-
), { html: s } = Td(n.recordType ?? "page", () =>
|
|
19693
|
+
), { html: s } = Td(n.recordType ?? "page", () => lI(l, {
|
|
19691
19694
|
rootBlockId: n.rootBlockId,
|
|
19692
19695
|
injectTabsScrollSyncScript: n.injectTabsScrollSyncScript,
|
|
19693
19696
|
injectCarouselScript: n.injectCarouselScript,
|
|
@@ -19703,7 +19706,7 @@ async function Nd(e, t, n) {
|
|
|
19703
19706
|
}));
|
|
19704
19707
|
return s;
|
|
19705
19708
|
}
|
|
19706
|
-
async function
|
|
19709
|
+
async function kI(e, t) {
|
|
19707
19710
|
const { baseUrl: n, tenantId: r, pageId: o } = t, i = `${n.replace(/\/+$/, "")}/tenant/${r}/page/${o}`, l = Ui(t), s = await qi(
|
|
19708
19711
|
i,
|
|
19709
19712
|
{ method: "GET", headers: Zi(t) },
|
|
@@ -19715,7 +19718,7 @@ async function vI(e, t) {
|
|
|
19715
19718
|
);
|
|
19716
19719
|
return Nd(e, s.body, { ...t, fetchFn: l });
|
|
19717
19720
|
}
|
|
19718
|
-
async function
|
|
19721
|
+
async function wI(e, t) {
|
|
19719
19722
|
var d, f;
|
|
19720
19723
|
const { baseUrl: n, tenantId: r, pagePath: o, cache: a = !1, update: i = !0 } = t, s = `${n.replace(/\/+$/, "")}/tenant/${r}/pagebypath/${encodeURIComponent(
|
|
19721
19724
|
o
|
|
@@ -19731,14 +19734,14 @@ async function xI(e, t) {
|
|
|
19731
19734
|
const h = ((d = u.body) == null ? void 0 : d.data) ?? ((f = u.body) == null ? void 0 : f.payload) ?? u.body;
|
|
19732
19735
|
return Nd(e, h, { ...t, fetchFn: c });
|
|
19733
19736
|
}
|
|
19734
|
-
async function
|
|
19737
|
+
async function SI(e) {
|
|
19735
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);
|
|
19736
19739
|
if (c.ok) return c.body;
|
|
19737
19740
|
throw new Error(
|
|
19738
19741
|
`[pagepilot-visual-editor] renderToStaticHtml: GET ${l} → ${c.status}${c.text ? `: ${c.text}` : ""}`
|
|
19739
19742
|
);
|
|
19740
19743
|
}
|
|
19741
|
-
function
|
|
19744
|
+
function $I(e, t) {
|
|
19742
19745
|
if (!t) return e;
|
|
19743
19746
|
const n = /* @__PURE__ */ new Map();
|
|
19744
19747
|
for (const o of e) o != null && o.id && n.set(o.id, o);
|
|
@@ -19763,19 +19766,19 @@ function wI(e, t) {
|
|
|
19763
19766
|
}
|
|
19764
19767
|
return Array.from(n.values());
|
|
19765
19768
|
}
|
|
19766
|
-
async function
|
|
19767
|
-
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);
|
|
19768
19771
|
if (!r) return "";
|
|
19769
|
-
const o =
|
|
19772
|
+
const o = sI(n), a = $I(o, t.variables), i = Gi(r, a);
|
|
19770
19773
|
return Wi(i, t);
|
|
19771
19774
|
}
|
|
19772
|
-
function
|
|
19773
|
-
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);
|
|
19774
19777
|
}
|
|
19775
|
-
function
|
|
19778
|
+
function CI() {
|
|
19776
19779
|
return `block-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
19777
19780
|
}
|
|
19778
|
-
function
|
|
19781
|
+
function AI(e, t) {
|
|
19779
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) => ({
|
|
19780
19783
|
...n,
|
|
19781
19784
|
childrenIds: (n.childrenIds || []).map((r) => t[r] ?? r)
|
|
@@ -19793,15 +19796,15 @@ function _I(e, t) {
|
|
|
19793
19796
|
function kn(e, t) {
|
|
19794
19797
|
const n = ao(e, t), r = {};
|
|
19795
19798
|
n.forEach((a) => {
|
|
19796
|
-
r[a] =
|
|
19799
|
+
r[a] = CI();
|
|
19797
19800
|
});
|
|
19798
19801
|
const o = {};
|
|
19799
19802
|
return n.forEach((a) => {
|
|
19800
19803
|
const i = JSON.parse(JSON.stringify(e[a]));
|
|
19801
|
-
|
|
19804
|
+
AI(i, r), o[r[a]] = i;
|
|
19802
19805
|
}), { newBlocks: o, idMap: r, newRootId: r[t] };
|
|
19803
19806
|
}
|
|
19804
|
-
function
|
|
19807
|
+
function yI(e, t, n) {
|
|
19805
19808
|
var r, o, a, i;
|
|
19806
19809
|
for (const [l, s] of Object.entries(e)) {
|
|
19807
19810
|
if (!s || typeof s != "object") continue;
|
|
@@ -19928,7 +19931,7 @@ function CI(e, t, n) {
|
|
|
19928
19931
|
}
|
|
19929
19932
|
return null;
|
|
19930
19933
|
}
|
|
19931
|
-
function
|
|
19934
|
+
function II(e, t) {
|
|
19932
19935
|
var n, r, o;
|
|
19933
19936
|
for (const [a, i] of Object.entries(e)) {
|
|
19934
19937
|
if ((i == null ? void 0 : i.type) !== "FlexColumns") continue;
|
|
@@ -19941,7 +19944,7 @@ function AI(e, t) {
|
|
|
19941
19944
|
}
|
|
19942
19945
|
return null;
|
|
19943
19946
|
}
|
|
19944
|
-
function
|
|
19947
|
+
function RI(e, t) {
|
|
19945
19948
|
var n, r, o;
|
|
19946
19949
|
for (const [a, i] of Object.entries(e)) {
|
|
19947
19950
|
const l = (r = (n = i == null ? void 0 : i.data) == null ? void 0 : n.props) == null ? void 0 : r.cells;
|
|
@@ -19953,7 +19956,7 @@ function yI(e, t) {
|
|
|
19953
19956
|
}
|
|
19954
19957
|
return null;
|
|
19955
19958
|
}
|
|
19956
|
-
function
|
|
19959
|
+
function TI(e, t) {
|
|
19957
19960
|
var n, r, o;
|
|
19958
19961
|
for (const [a, i] of Object.entries(e)) {
|
|
19959
19962
|
if ((i == null ? void 0 : i.type) !== "Pagination") continue;
|
|
@@ -19966,7 +19969,7 @@ function II(e, t) {
|
|
|
19966
19969
|
}
|
|
19967
19970
|
return null;
|
|
19968
19971
|
}
|
|
19969
|
-
function
|
|
19972
|
+
function EI(e, t) {
|
|
19970
19973
|
var n, r, o;
|
|
19971
19974
|
for (const [a, i] of Object.entries(e)) {
|
|
19972
19975
|
const l = i == null ? void 0 : i.type;
|
|
@@ -20014,7 +20017,7 @@ function dc(e, t, n) {
|
|
|
20014
20017
|
}
|
|
20015
20018
|
}, { updatedDocument: S, newRootId: y };
|
|
20016
20019
|
}
|
|
20017
|
-
const o =
|
|
20020
|
+
const o = RI(e, n);
|
|
20018
20021
|
if (o) {
|
|
20019
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(
|
|
20020
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
|
|
@@ -20033,7 +20036,7 @@ function dc(e, t, n) {
|
|
|
20033
20036
|
}
|
|
20034
20037
|
}, newRootId: R };
|
|
20035
20038
|
}
|
|
20036
|
-
const a =
|
|
20039
|
+
const a = TI(e, n);
|
|
20037
20040
|
if (a) {
|
|
20038
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: [] });
|
|
20039
20042
|
let y = _.findIndex(
|
|
@@ -20050,7 +20053,7 @@ function dc(e, t, n) {
|
|
|
20050
20053
|
}
|
|
20051
20054
|
}, newRootId: I };
|
|
20052
20055
|
}
|
|
20053
|
-
const i =
|
|
20056
|
+
const i = II(e, n);
|
|
20054
20057
|
if (i) {
|
|
20055
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: [] });
|
|
20056
20059
|
let x = S.findIndex(
|
|
@@ -20067,7 +20070,7 @@ function dc(e, t, n) {
|
|
|
20067
20070
|
}
|
|
20068
20071
|
}, newRootId: y };
|
|
20069
20072
|
}
|
|
20070
|
-
const l =
|
|
20073
|
+
const l = EI(e, n);
|
|
20071
20074
|
if (l) {
|
|
20072
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(
|
|
20073
20076
|
(C, I) => I > l.itemIndex && (!Array.isArray(C == null ? void 0 : C.contentChildrenIds) || C.contentChildrenIds.length === 0)
|
|
@@ -20100,10 +20103,10 @@ function dc(e, t, n) {
|
|
|
20100
20103
|
}
|
|
20101
20104
|
}, newRootId: x };
|
|
20102
20105
|
}
|
|
20103
|
-
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);
|
|
20104
20107
|
return h && (u[h.parentId] = h.updatedParent), { updatedDocument: u, newRootId: c };
|
|
20105
20108
|
}
|
|
20106
|
-
function
|
|
20109
|
+
function NI(e, t) {
|
|
20107
20110
|
const n = (o) => Array.isArray(o) ? o.filter((a) => !t.has(a)) : o, r = {};
|
|
20108
20111
|
for (const [o, a] of Object.entries(e)) {
|
|
20109
20112
|
if (t.has(o)) continue;
|
|
@@ -20127,7 +20130,7 @@ function TI(e, t) {
|
|
|
20127
20130
|
}
|
|
20128
20131
|
return r;
|
|
20129
20132
|
}
|
|
20130
|
-
function
|
|
20133
|
+
function PI(e) {
|
|
20131
20134
|
var r;
|
|
20132
20135
|
const t = e == null ? void 0 : e.type, n = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.props) ?? {};
|
|
20133
20136
|
if (t === "Grid") {
|
|
@@ -20185,7 +20188,7 @@ function Vi(e, t) {
|
|
|
20185
20188
|
return r && r.containerId === t ? r : r && { ...r, containerId: t };
|
|
20186
20189
|
if (!ko(n.type))
|
|
20187
20190
|
return Er.set(n, null), null;
|
|
20188
|
-
const o =
|
|
20191
|
+
const o = PI(n);
|
|
20189
20192
|
if (!o)
|
|
20190
20193
|
return Er.set(n, null), null;
|
|
20191
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 };
|
|
@@ -20199,7 +20202,7 @@ function hc(e, t) {
|
|
|
20199
20202
|
}
|
|
20200
20203
|
return null;
|
|
20201
20204
|
}
|
|
20202
|
-
function
|
|
20205
|
+
function MI(e, t, n, r) {
|
|
20203
20206
|
var c;
|
|
20204
20207
|
const o = e[t];
|
|
20205
20208
|
if (!o || !ko(o.type)) return e;
|
|
@@ -20245,7 +20248,7 @@ function NI(e, t, n, r) {
|
|
|
20245
20248
|
[t]: { ...o, data: { ...o.data, props: { ...a, columnsCount: n, columns: s } } }
|
|
20246
20249
|
};
|
|
20247
20250
|
}
|
|
20248
|
-
function
|
|
20251
|
+
function LI(e, t, n) {
|
|
20249
20252
|
var c;
|
|
20250
20253
|
const r = e[t];
|
|
20251
20254
|
if (!r || !ko(r.type)) return e;
|
|
@@ -20292,7 +20295,7 @@ function PI(e, t, n) {
|
|
|
20292
20295
|
[t]: { ...r, data: { ...r.data, props: { ...l, columnsCount: i, columns: s.slice(0, i) } } }
|
|
20293
20296
|
};
|
|
20294
20297
|
}
|
|
20295
|
-
function
|
|
20298
|
+
function GI(e, t, n, r = "columns") {
|
|
20296
20299
|
const o = t == null ? void 0 : t.sourceBlockId;
|
|
20297
20300
|
if (!o || !e[o]) return null;
|
|
20298
20301
|
const a = Math.max(1, n);
|
|
@@ -20310,7 +20313,7 @@ function FI(e, t, n, r = "columns") {
|
|
|
20310
20313
|
h = !0;
|
|
20311
20314
|
break;
|
|
20312
20315
|
}
|
|
20313
|
-
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);
|
|
20314
20317
|
if (w === i) {
|
|
20315
20318
|
h = !0;
|
|
20316
20319
|
break;
|
|
@@ -20329,9 +20332,9 @@ function FI(e, t, n, r = "columns") {
|
|
|
20329
20332
|
const h = /* @__PURE__ */ new Set();
|
|
20330
20333
|
for (const f of u)
|
|
20331
20334
|
for (const p of ao(i, f)) h.add(p);
|
|
20332
|
-
i =
|
|
20335
|
+
i = NI(i, h);
|
|
20333
20336
|
const d = hc(i, o);
|
|
20334
|
-
d && (i =
|
|
20337
|
+
d && (i = LI(i, d, c)), l = l.slice(0, c - 1), s = 1 + l.length;
|
|
20335
20338
|
}
|
|
20336
20339
|
return { document: i, sourceBlockId: o, rowIds: l, achievedRowCount: s, capacityLimited: !1 };
|
|
20337
20340
|
}
|
|
@@ -20339,18 +20342,18 @@ export {
|
|
|
20339
20342
|
so as Reader,
|
|
20340
20343
|
Me as ReaderBlock,
|
|
20341
20344
|
Ty as ReaderBlockSchema,
|
|
20342
|
-
|
|
20345
|
+
FI as ReaderDocumentSchema,
|
|
20343
20346
|
kn as cloneSubtree,
|
|
20344
20347
|
Rd as extractApiRows,
|
|
20345
20348
|
hc as findRepeatableContainerOf,
|
|
20346
20349
|
Vi as getRepeatableContainerInfo,
|
|
20347
|
-
|
|
20350
|
+
MI as growContainerToFit,
|
|
20348
20351
|
ko as isRepeatableContainerType,
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20352
|
+
GI as reconcileRepeatFieldRowCount,
|
|
20353
|
+
hI as refreshApiDataSources,
|
|
20354
|
+
fI as refreshDocumentApiDataSources,
|
|
20355
|
+
NI as removeSubtree,
|
|
20356
|
+
HI as renderToStaticHtml,
|
|
20354
20357
|
yd as renderToStaticMarkup,
|
|
20355
|
-
|
|
20358
|
+
LI as shrinkContainerToFit
|
|
20356
20359
|
};
|
|
@@ -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",
|