@charisol/plexo-sdk 1.1.8 → 1.1.9
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Every other text-bearing element type (heading, paragraph, ...) gets a Typography
|
|
4
|
+
* accordion with Font/Color/Size/Align controls — blog_title/blog_content/blog_date/
|
|
5
|
+
* blog_author/blog_categories had none at all, so there was no way to set (or even see,
|
|
6
|
+
* before SortableElement.tsx's sample-content preview) the text color a real post would
|
|
7
|
+
* render with. These are placeholders (see compiler.ts's data-plexo-blog-* output — the
|
|
8
|
+
* host substitutes real per-post text at render time), so there's no "Text Content" field
|
|
9
|
+
* to edit here, only the base typography the substituted content inherits.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BlogTextPropertiesAccordion: React.FC<any>;
|
package/dist/index.js
CHANGED
|
@@ -53314,7 +53314,215 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53314
53314
|
})
|
|
53315
53315
|
})
|
|
53316
53316
|
] });
|
|
53317
|
-
}, eW =
|
|
53317
|
+
}, eW = [
|
|
53318
|
+
"blog_title",
|
|
53319
|
+
"blog_content",
|
|
53320
|
+
"blog_date",
|
|
53321
|
+
"blog_author",
|
|
53322
|
+
"blog_categories"
|
|
53323
|
+
], tW = {
|
|
53324
|
+
blog_title: {
|
|
53325
|
+
fontSize: "32px",
|
|
53326
|
+
fontWeight: "800",
|
|
53327
|
+
color: "#1e293b"
|
|
53328
|
+
},
|
|
53329
|
+
blog_content: {
|
|
53330
|
+
fontSize: "16px",
|
|
53331
|
+
fontWeight: "400",
|
|
53332
|
+
color: "#334155"
|
|
53333
|
+
},
|
|
53334
|
+
blog_date: {
|
|
53335
|
+
fontSize: "14px",
|
|
53336
|
+
fontWeight: "400",
|
|
53337
|
+
color: "#64748b"
|
|
53338
|
+
},
|
|
53339
|
+
blog_author: {
|
|
53340
|
+
fontSize: "14px",
|
|
53341
|
+
fontWeight: "600",
|
|
53342
|
+
color: "#334155"
|
|
53343
|
+
},
|
|
53344
|
+
blog_categories: {
|
|
53345
|
+
fontSize: "13px",
|
|
53346
|
+
fontWeight: "600",
|
|
53347
|
+
color: "#4f46e5"
|
|
53348
|
+
}
|
|
53349
|
+
}, nW = (e) => {
|
|
53350
|
+
let { selectedElement: t, currentStyles: n, openAccordions: r, toggleAccordion: i, onTransientStyleChange: a, AccordionSection: o, InlineSelect: s, InlineColorPicker: c, InlineAlignment: l, InlineCounter: u } = e;
|
|
53351
|
+
if (!t || !eW.includes(t.type)) return null;
|
|
53352
|
+
let d = tW[t.type], f = v.reduce((e, t) => (e[t.style] || (e[t.style] = []), e[t.style].push(t), e), {}), p = [
|
|
53353
|
+
{
|
|
53354
|
+
label: "── System ──",
|
|
53355
|
+
value: "__sep__",
|
|
53356
|
+
disabled: !0
|
|
53357
|
+
},
|
|
53358
|
+
{
|
|
53359
|
+
label: "System Sans",
|
|
53360
|
+
value: "sans-serif"
|
|
53361
|
+
},
|
|
53362
|
+
{
|
|
53363
|
+
label: "System Serif",
|
|
53364
|
+
value: "serif"
|
|
53365
|
+
},
|
|
53366
|
+
{
|
|
53367
|
+
label: "System Mono",
|
|
53368
|
+
value: "monospace"
|
|
53369
|
+
},
|
|
53370
|
+
{
|
|
53371
|
+
label: "── Sans-serif ──",
|
|
53372
|
+
value: "__sep_sans__",
|
|
53373
|
+
disabled: !0
|
|
53374
|
+
},
|
|
53375
|
+
...(f.sans || []).map((e) => ({
|
|
53376
|
+
label: e.label,
|
|
53377
|
+
value: e.value
|
|
53378
|
+
})),
|
|
53379
|
+
{
|
|
53380
|
+
label: "── Serif ──",
|
|
53381
|
+
value: "__sep_serif__",
|
|
53382
|
+
disabled: !0
|
|
53383
|
+
},
|
|
53384
|
+
...(f.serif || []).map((e) => ({
|
|
53385
|
+
label: e.label,
|
|
53386
|
+
value: e.value
|
|
53387
|
+
})),
|
|
53388
|
+
{
|
|
53389
|
+
label: "── Display ──",
|
|
53390
|
+
value: "__sep_display__",
|
|
53391
|
+
disabled: !0
|
|
53392
|
+
},
|
|
53393
|
+
...(f.display || []).map((e) => ({
|
|
53394
|
+
label: e.label,
|
|
53395
|
+
value: e.value
|
|
53396
|
+
})),
|
|
53397
|
+
{
|
|
53398
|
+
label: "── Handwriting ──",
|
|
53399
|
+
value: "__sep_hw__",
|
|
53400
|
+
disabled: !0
|
|
53401
|
+
},
|
|
53402
|
+
...(f.handwriting || []).map((e) => ({
|
|
53403
|
+
label: e.label,
|
|
53404
|
+
value: e.value
|
|
53405
|
+
})),
|
|
53406
|
+
{
|
|
53407
|
+
label: "── Monospace ──",
|
|
53408
|
+
value: "__sep_mono__",
|
|
53409
|
+
disabled: !0
|
|
53410
|
+
},
|
|
53411
|
+
...(f.mono || []).map((e) => ({
|
|
53412
|
+
label: e.label,
|
|
53413
|
+
value: e.value
|
|
53414
|
+
}))
|
|
53415
|
+
];
|
|
53416
|
+
return /* @__PURE__ */ P(o, {
|
|
53417
|
+
title: "Typography",
|
|
53418
|
+
isOpen: r.typography,
|
|
53419
|
+
onToggle: () => i("typography"),
|
|
53420
|
+
children: /* @__PURE__ */ F("div", {
|
|
53421
|
+
className: "flex flex-col gap-1",
|
|
53422
|
+
children: [
|
|
53423
|
+
/* @__PURE__ */ P(s, {
|
|
53424
|
+
label: "Font Family",
|
|
53425
|
+
value: n.fontFamily || "'Plus Jakarta Sans', sans-serif",
|
|
53426
|
+
options: p,
|
|
53427
|
+
onChange: (e) => {
|
|
53428
|
+
e.startsWith("__sep") || a("fontFamily", e);
|
|
53429
|
+
}
|
|
53430
|
+
}),
|
|
53431
|
+
/* @__PURE__ */ P(s, {
|
|
53432
|
+
label: "Font Weight",
|
|
53433
|
+
value: n.fontWeight || d.fontWeight,
|
|
53434
|
+
options: [
|
|
53435
|
+
{
|
|
53436
|
+
label: "Thin",
|
|
53437
|
+
value: "100"
|
|
53438
|
+
},
|
|
53439
|
+
{
|
|
53440
|
+
label: "Extra Light",
|
|
53441
|
+
value: "200"
|
|
53442
|
+
},
|
|
53443
|
+
{
|
|
53444
|
+
label: "Light",
|
|
53445
|
+
value: "300"
|
|
53446
|
+
},
|
|
53447
|
+
{
|
|
53448
|
+
label: "Regular",
|
|
53449
|
+
value: "400"
|
|
53450
|
+
},
|
|
53451
|
+
{
|
|
53452
|
+
label: "Medium",
|
|
53453
|
+
value: "500"
|
|
53454
|
+
},
|
|
53455
|
+
{
|
|
53456
|
+
label: "Semi-Bold",
|
|
53457
|
+
value: "600"
|
|
53458
|
+
},
|
|
53459
|
+
{
|
|
53460
|
+
label: "Bold",
|
|
53461
|
+
value: "700"
|
|
53462
|
+
},
|
|
53463
|
+
{
|
|
53464
|
+
label: "Extra-Bold",
|
|
53465
|
+
value: "800"
|
|
53466
|
+
},
|
|
53467
|
+
{
|
|
53468
|
+
label: "Black",
|
|
53469
|
+
value: "900"
|
|
53470
|
+
}
|
|
53471
|
+
],
|
|
53472
|
+
onChange: (e) => a("fontWeight", e)
|
|
53473
|
+
}),
|
|
53474
|
+
/* @__PURE__ */ P(u, {
|
|
53475
|
+
label: "Font Size",
|
|
53476
|
+
value: n.fontSize || d.fontSize,
|
|
53477
|
+
units: [
|
|
53478
|
+
"px",
|
|
53479
|
+
"em",
|
|
53480
|
+
"rem",
|
|
53481
|
+
"vw"
|
|
53482
|
+
],
|
|
53483
|
+
min: 8,
|
|
53484
|
+
max: 120,
|
|
53485
|
+
onChange: (e) => a("fontSize", e)
|
|
53486
|
+
}),
|
|
53487
|
+
/* @__PURE__ */ P(c, {
|
|
53488
|
+
label: "Color",
|
|
53489
|
+
value: n.color || d.color,
|
|
53490
|
+
onChange: (e) => a("color", e)
|
|
53491
|
+
}),
|
|
53492
|
+
/* @__PURE__ */ P(l, {
|
|
53493
|
+
label: "Text Align",
|
|
53494
|
+
value: n.textAlign || "left",
|
|
53495
|
+
onChange: (e) => a("textAlign", e)
|
|
53496
|
+
}),
|
|
53497
|
+
/* @__PURE__ */ P(u, {
|
|
53498
|
+
label: "Line Height",
|
|
53499
|
+
value: n.lineHeight || "150%",
|
|
53500
|
+
units: [
|
|
53501
|
+
"%",
|
|
53502
|
+
"em",
|
|
53503
|
+
"px"
|
|
53504
|
+
],
|
|
53505
|
+
min: 80,
|
|
53506
|
+
max: 300,
|
|
53507
|
+
step: 5,
|
|
53508
|
+
onChange: (e) => a("lineHeight", e)
|
|
53509
|
+
}),
|
|
53510
|
+
/* @__PURE__ */ P(u, {
|
|
53511
|
+
label: "Letter Spacing",
|
|
53512
|
+
value: n.letterSpacing || "0px",
|
|
53513
|
+
units: [
|
|
53514
|
+
"px",
|
|
53515
|
+
"em",
|
|
53516
|
+
"rem"
|
|
53517
|
+
],
|
|
53518
|
+
min: -5,
|
|
53519
|
+
max: 20,
|
|
53520
|
+
onChange: (e) => a("letterSpacing", e)
|
|
53521
|
+
})
|
|
53522
|
+
]
|
|
53523
|
+
})
|
|
53524
|
+
});
|
|
53525
|
+
}, rW = (e) => /* @__PURE__ */ F(N, { children: [
|
|
53318
53526
|
/* @__PURE__ */ P(kU, { ...e }),
|
|
53319
53527
|
/* @__PURE__ */ P(jU, { ...e }),
|
|
53320
53528
|
/* @__PURE__ */ P(NU, { ...e }),
|
|
@@ -53331,10 +53539,11 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53331
53539
|
/* @__PURE__ */ P(KU, { ...e }),
|
|
53332
53540
|
/* @__PURE__ */ P(qU, { ...e }),
|
|
53333
53541
|
/* @__PURE__ */ P($U, { ...e }),
|
|
53542
|
+
/* @__PURE__ */ P(nW, { ...e }),
|
|
53334
53543
|
/* @__PURE__ */ P(JU, { ...e }),
|
|
53335
53544
|
/* @__PURE__ */ P(YU, { ...e }),
|
|
53336
53545
|
/* @__PURE__ */ P(XU, { ...e })
|
|
53337
|
-
] }),
|
|
53546
|
+
] }), iW = ({ message: e, onClose: t }) => /* @__PURE__ */ P("div", {
|
|
53338
53547
|
className: "plexo-alert-top fixed left-1/2 top-4 z-[1400] w-full max-w-[460px] -translate-x-1/2 px-4 pointer-events-none",
|
|
53339
53548
|
children: /* @__PURE__ */ P("div", {
|
|
53340
53549
|
className: "plexo-alert-top-card rounded-xl border shadow-2xl w-full px-4 py-3 pointer-events-auto",
|
|
@@ -53355,7 +53564,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53355
53564
|
})]
|
|
53356
53565
|
})
|
|
53357
53566
|
})
|
|
53358
|
-
}),
|
|
53567
|
+
}), aW = ({ widths: e, percentages: t }) => /* @__PURE__ */ P("div", {
|
|
53359
53568
|
className: "w-full h-full flex items-stretch gap-1 overflow-hidden",
|
|
53360
53569
|
children: e.map((e, n) => /* @__PURE__ */ P("div", {
|
|
53361
53570
|
style: {
|
|
@@ -53371,7 +53580,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53371
53580
|
children: t[n]
|
|
53372
53581
|
})
|
|
53373
53582
|
}, `${e}-${n}`))
|
|
53374
|
-
}),
|
|
53583
|
+
}), oW = ({ children: e, rowIds: t, disabled: n }) => {
|
|
53375
53584
|
let { setNodeRef: r, isOver: i } = xe({
|
|
53376
53585
|
id: "canvas-root",
|
|
53377
53586
|
data: { type: "canvas" },
|
|
@@ -53389,10 +53598,10 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53389
53598
|
})
|
|
53390
53599
|
})
|
|
53391
53600
|
});
|
|
53392
|
-
},
|
|
53601
|
+
}, sW = (e, t) => {
|
|
53393
53602
|
let n = t === "tablet" ? "tablet" : t === "mobile" ? "mobile" : null, r = n === "tablet" ? e.styleTablet : n === "mobile" ? e.styleMobile : void 0;
|
|
53394
53603
|
return S(e.style, r, n);
|
|
53395
|
-
},
|
|
53604
|
+
}, cW = ({ row: e, selectedRowId: t, selectRow: n, previewMode: r, children: i, deviceView: a, selectedElementId: o }) => {
|
|
53396
53605
|
let { attributes: s, listeners: c, setNodeRef: l, transform: u, transition: d, isDragging: f, isOver: p } = L({
|
|
53397
53606
|
id: e.id,
|
|
53398
53607
|
data: {
|
|
@@ -53403,7 +53612,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53403
53612
|
}), m = pe(Me), h = p && m.overId === e.id && m.edge === "bottom", g = {
|
|
53404
53613
|
transform: Ee.Transform.toString(u),
|
|
53405
53614
|
transition: d,
|
|
53406
|
-
...
|
|
53615
|
+
...sW(e, a)
|
|
53407
53616
|
}, _ = t === e.id, v = o && e.columns.some((e) => e.elements.some((e) => e.id === o) || (e.nestedRows || []).some((e) => e.id === o || e.columns.some((e) => e.elements.some((e) => e.id === o))));
|
|
53408
53617
|
return /* @__PURE__ */ F("div", {
|
|
53409
53618
|
ref: l,
|
|
@@ -53431,7 +53640,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53431
53640
|
})
|
|
53432
53641
|
]
|
|
53433
53642
|
});
|
|
53434
|
-
},
|
|
53643
|
+
}, lW = ({ row: e, parentRowId: t, parentColId: n, selectedRowId: r, selectRow: i, previewMode: a, children: o, deviceView: s, selectedElementId: c }) => {
|
|
53435
53644
|
let { attributes: l, listeners: u, setNodeRef: d, transform: f, transition: p, isDragging: m, isOver: h } = L({
|
|
53436
53645
|
id: e.id,
|
|
53437
53646
|
data: {
|
|
@@ -53444,7 +53653,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53444
53653
|
}), g = pe(Me), _ = h && g.overId === e.id && g.edge === "bottom", v = {
|
|
53445
53654
|
transform: Ee.Transform.toString(f),
|
|
53446
53655
|
transition: p,
|
|
53447
|
-
...
|
|
53656
|
+
...sW(e, s)
|
|
53448
53657
|
}, y = r === e.id, b = c && e.columns.some((e) => e.elements.some((e) => e.id === c) || (e.nestedRows || []).some((e) => e.id === c || e.columns.some((e) => e.elements.some((e) => e.id === c))));
|
|
53449
53658
|
return /* @__PURE__ */ F("div", {
|
|
53450
53659
|
ref: d,
|
|
@@ -53472,11 +53681,11 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53472
53681
|
})
|
|
53473
53682
|
]
|
|
53474
53683
|
});
|
|
53475
|
-
},
|
|
53684
|
+
}, uW = (e) => e.parentRowId && e.parentColId ? /* @__PURE__ */ P(lW, {
|
|
53476
53685
|
...e,
|
|
53477
53686
|
parentRowId: e.parentRowId,
|
|
53478
53687
|
parentColId: e.parentColId
|
|
53479
|
-
}) : /* @__PURE__ */ P(
|
|
53688
|
+
}) : /* @__PURE__ */ P(cW, { ...e }), dW = ({ col: e, rowId: n, parentRowId: r, parentColId: i, selectedColumnId: a, selectColumn: o, previewMode: s, children: c, deviceView: l }) => {
|
|
53480
53689
|
let { setNodeRef: u, isOver: d } = xe({
|
|
53481
53690
|
id: e.id,
|
|
53482
53691
|
data: {
|
|
@@ -53524,7 +53733,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53524
53733
|
})
|
|
53525
53734
|
})]
|
|
53526
53735
|
});
|
|
53527
|
-
},
|
|
53736
|
+
}, fW = ({ filter: e, onSelect: t, currentValue: n }) => {
|
|
53528
53737
|
let [r, i] = A(!1), a = k(null), o = k(null), [s, c] = A({
|
|
53529
53738
|
top: 0,
|
|
53530
53739
|
left: 0
|
|
@@ -53618,7 +53827,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53618
53827
|
}, e.key);
|
|
53619
53828
|
})
|
|
53620
53829
|
}), document.body)] });
|
|
53621
|
-
},
|
|
53830
|
+
}, pW = ({ label: e, value: t, onChange: n, textColor: r, backgroundColor: i }) => {
|
|
53622
53831
|
let [a, o] = A(!1), s = k(null), c = k(null), l = k(null), u = !t || t === "transparent", d = ((e) => {
|
|
53623
53832
|
let t = "#ffffff", n = 100, r = (e || "").trim().toLowerCase();
|
|
53624
53833
|
if (r.startsWith("#")) if (r.length === 9) {
|
|
@@ -53741,7 +53950,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53741
53950
|
className: "w-20 bg-transparent text-right font-mono text-sm outline-none pr-1",
|
|
53742
53951
|
style: { color: "var(--builder-input-text)" }
|
|
53743
53952
|
}),
|
|
53744
|
-
/* @__PURE__ */ P(
|
|
53953
|
+
/* @__PURE__ */ P(fW, {
|
|
53745
53954
|
filter: (e) => e.type === "color" || /^#[0-9a-fA-F]{3,8}$|^rgba?\(|^hsla?\(/.test(e.value),
|
|
53746
53955
|
onSelect: n,
|
|
53747
53956
|
currentValue: t
|
|
@@ -53880,7 +54089,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53880
54089
|
]
|
|
53881
54090
|
})]
|
|
53882
54091
|
});
|
|
53883
|
-
},
|
|
54092
|
+
}, mW = ({ elem: t, columnId: r, rowId: o, selectedElementId: m, selectElement: h, deviceView: g, transientStyle: _, transientAttr: v, updateElement: y, onTransientStyleChange: b, onTransientAttrChange: x, clearTransientOverrides: C, duplicateElement: w, deleteElement: T, previewMode: E, useAi: ee, aiProvider: te, aiTier: ne, apiKey: re, externalUserId: ie, templateKind: ae, onRequestComment: oe, ICONS: se, getFormFields: ce, getDefaultStyle: le, isElementHiddenForView: ue, renderSocialIcon: de, onNotify: fe, textColor: me = "#e2e8f0", backgroundColor: he = "#0e1526", customCss: ge = "", mergeTags: j = [], themeBgColor: _e = "#273df2" }) => {
|
|
53884
54093
|
let { attributes: M, listeners: ve, setNodeRef: ye, transform: be, transition: xe, isDragging: Se, isOver: Ce } = L({
|
|
53885
54094
|
id: t.id,
|
|
53886
54095
|
data: {
|
|
@@ -54300,7 +54509,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54300
54509
|
className: "absolute top-full mt-2 left-0 p-3 rounded-xl border border-slate-700 shadow-2xl z-[99999] w-72",
|
|
54301
54510
|
style: { backgroundColor: he },
|
|
54302
54511
|
onClick: (e) => e.stopPropagation(),
|
|
54303
|
-
children: /* @__PURE__ */ P(
|
|
54512
|
+
children: /* @__PURE__ */ P(pW, {
|
|
54304
54513
|
label: "Text Color",
|
|
54305
54514
|
value: H.color || "#6366f1",
|
|
54306
54515
|
textColor: me,
|
|
@@ -54324,7 +54533,7 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54324
54533
|
className: "absolute top-full mt-2 left-0 p-3 rounded-xl border border-slate-700 shadow-2xl z-[99999] w-72",
|
|
54325
54534
|
style: { backgroundColor: he },
|
|
54326
54535
|
onClick: (e) => e.stopPropagation(),
|
|
54327
|
-
children: /* @__PURE__ */ P(
|
|
54536
|
+
children: /* @__PURE__ */ P(pW, {
|
|
54328
54537
|
label: "Highlight Color",
|
|
54329
54538
|
value: H.backgroundColor || "#ffffff",
|
|
54330
54539
|
textColor: me,
|
|
@@ -55400,13 +55609,13 @@ var IU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
55400
55609
|
};
|
|
55401
55610
|
//#endregion
|
|
55402
55611
|
//#region src/components/inlineControls/InlineCounter.tsx
|
|
55403
|
-
function
|
|
55612
|
+
function hW(e, t) {
|
|
55404
55613
|
if (t) return t;
|
|
55405
55614
|
let n = e.toLowerCase();
|
|
55406
55615
|
return n.includes("font size") || n.includes("font-size") ? "font-size" : n.includes("font weight") || n.includes("font-weight") || n.includes("weight") ? "font-weight" : n.includes("line height") || n.includes("line-height") ? "line-height" : n.includes("letter spacing") || n.includes("letter-spacing") ? "letter-spacing" : n.includes("border radius") || n.includes("border-radius") || n.includes("rounded") ? "border-radius" : n.includes("blur") ? "filter-blur" : null;
|
|
55407
55616
|
}
|
|
55408
|
-
var
|
|
55409
|
-
let l = String(t || "").match(/^([+-]?\d+(?:\.\d+)?)(.*)$/), u = l ? parseFloat(l[1]) : 0, d = l && l[2] ? l[2].trim() : r && r.length > 0 ? r[0] : n, f =
|
|
55617
|
+
var gW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 500, step: o = 1, onChange: s, strataTokenKey: c }) => {
|
|
55618
|
+
let l = String(t || "").match(/^([+-]?\d+(?:\.\d+)?)(.*)$/), u = l ? parseFloat(l[1]) : 0, d = l && l[2] ? l[2].trim() : r && r.length > 0 ? r[0] : n, f = hW(e, c), p = (e) => {
|
|
55410
55619
|
s(`${e}${d}`);
|
|
55411
55620
|
}, m = (e) => {
|
|
55412
55621
|
s(`${u}${e}`);
|
|
@@ -55419,7 +55628,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55419
55628
|
}), /* @__PURE__ */ F("div", {
|
|
55420
55629
|
className: "flex items-center gap-1.5",
|
|
55421
55630
|
children: [
|
|
55422
|
-
f && /* @__PURE__ */ P(
|
|
55631
|
+
f && /* @__PURE__ */ P(fW, {
|
|
55423
55632
|
filter: (e) => e.key.includes(f),
|
|
55424
55633
|
onSelect: (e) => s(e),
|
|
55425
55634
|
currentValue: t
|
|
@@ -55490,7 +55699,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55490
55699
|
]
|
|
55491
55700
|
})]
|
|
55492
55701
|
});
|
|
55493
|
-
},
|
|
55702
|
+
}, _W = ({ label: e, value: t, options: n, onChange: r }) => /* @__PURE__ */ F("div", {
|
|
55494
55703
|
className: "flex items-center justify-between py-3 border-b border-slate-800/10 last:border-b-0",
|
|
55495
55704
|
children: [/* @__PURE__ */ P("span", {
|
|
55496
55705
|
className: "text-sm text-slate-300 font-semibold leading-5 tracking-[0.01em]",
|
|
@@ -55503,7 +55712,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55503
55712
|
menuClassName: "min-w-[190px]",
|
|
55504
55713
|
align: "right"
|
|
55505
55714
|
})]
|
|
55506
|
-
}),
|
|
55715
|
+
}), vW = ({ label: e, value: t, onChange: n }) => {
|
|
55507
55716
|
let r = [
|
|
55508
55717
|
{
|
|
55509
55718
|
value: "left",
|
|
@@ -55541,7 +55750,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55541
55750
|
}, e.value))
|
|
55542
55751
|
})]
|
|
55543
55752
|
});
|
|
55544
|
-
},
|
|
55753
|
+
}, yW = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ F("div", {
|
|
55545
55754
|
className: "flex flex-col gap-2 py-3 border-b border-slate-800/10 last:border-b-0",
|
|
55546
55755
|
children: [/* @__PURE__ */ P("span", {
|
|
55547
55756
|
className: "text-[11px] text-slate-350 font-semibold uppercase tracking-[0.12em] leading-5",
|
|
@@ -55557,7 +55766,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55557
55766
|
color: "var(--builder-input-text)"
|
|
55558
55767
|
}
|
|
55559
55768
|
})]
|
|
55560
|
-
}),
|
|
55769
|
+
}), bW = ({ label: e, value: t, rows: n = 4, onChange: r, codeMode: i }) => /* @__PURE__ */ F("div", {
|
|
55561
55770
|
className: "flex flex-col gap-2 py-3 border-b border-slate-800/10 last:border-b-0",
|
|
55562
55771
|
children: [/* @__PURE__ */ P("span", {
|
|
55563
55772
|
className: "text-[11px] text-slate-350 font-semibold uppercase tracking-[0.12em] leading-5",
|
|
@@ -55575,7 +55784,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55575
55784
|
fontFamily: i ? "Fira Code, Consolas, Monaco, monospace" : void 0
|
|
55576
55785
|
}
|
|
55577
55786
|
})]
|
|
55578
|
-
}),
|
|
55787
|
+
}), xW = ({ styles: e, onChange: t }) => {
|
|
55579
55788
|
let [n, r] = A(!1), i = parseInt(e.borderRadius) || 0, a = parseInt(e.borderTopLeftRadius) || i || 0, o = parseInt(e.borderTopRightRadius) || i || 0, s = parseInt(e.borderBottomRightRadius) || i || 0, c = parseInt(e.borderBottomLeftRadius) || i || 0, l = (e) => {
|
|
55580
55789
|
t("borderRadius", e), t("borderTopLeftRadius", e), t("borderTopRightRadius", e), t("borderBottomRightRadius", e), t("borderBottomLeftRadius", e);
|
|
55581
55790
|
}, u = (n, r) => {
|
|
@@ -55602,7 +55811,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55602
55811
|
}), /* @__PURE__ */ F("div", {
|
|
55603
55812
|
className: "flex items-center gap-1.5",
|
|
55604
55813
|
children: [
|
|
55605
|
-
/* @__PURE__ */ P(
|
|
55814
|
+
/* @__PURE__ */ P(fW, {
|
|
55606
55815
|
filter: (e) => e.key.includes("border-radius") && e.type === "dimension",
|
|
55607
55816
|
onSelect: l,
|
|
55608
55817
|
currentValue: `${i}px`
|
|
@@ -55622,7 +55831,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55622
55831
|
}), n ? /* @__PURE__ */ F("div", {
|
|
55623
55832
|
className: "grid grid-cols-1 gap-2 mt-1.5",
|
|
55624
55833
|
children: [
|
|
55625
|
-
/* @__PURE__ */ P(
|
|
55834
|
+
/* @__PURE__ */ P(gW, {
|
|
55626
55835
|
label: "Top-Left",
|
|
55627
55836
|
value: `${a}px`,
|
|
55628
55837
|
units: [
|
|
@@ -55633,7 +55842,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55633
55842
|
],
|
|
55634
55843
|
onChange: (e) => u("borderTopLeftRadius", e)
|
|
55635
55844
|
}),
|
|
55636
|
-
/* @__PURE__ */ P(
|
|
55845
|
+
/* @__PURE__ */ P(gW, {
|
|
55637
55846
|
label: "Top-Right",
|
|
55638
55847
|
value: `${o}px`,
|
|
55639
55848
|
units: [
|
|
@@ -55644,7 +55853,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55644
55853
|
],
|
|
55645
55854
|
onChange: (e) => u("borderTopRightRadius", e)
|
|
55646
55855
|
}),
|
|
55647
|
-
/* @__PURE__ */ P(
|
|
55856
|
+
/* @__PURE__ */ P(gW, {
|
|
55648
55857
|
label: "Bottom-Right",
|
|
55649
55858
|
value: `${s}px`,
|
|
55650
55859
|
units: [
|
|
@@ -55655,7 +55864,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55655
55864
|
],
|
|
55656
55865
|
onChange: (e) => u("borderBottomRightRadius", e)
|
|
55657
55866
|
}),
|
|
55658
|
-
/* @__PURE__ */ P(
|
|
55867
|
+
/* @__PURE__ */ P(gW, {
|
|
55659
55868
|
label: "Bottom-Left",
|
|
55660
55869
|
value: `${c}px`,
|
|
55661
55870
|
units: [
|
|
@@ -55667,7 +55876,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55667
55876
|
onChange: (e) => u("borderBottomLeftRadius", e)
|
|
55668
55877
|
})
|
|
55669
55878
|
]
|
|
55670
|
-
}) : /* @__PURE__ */ P(
|
|
55879
|
+
}) : /* @__PURE__ */ P(gW, {
|
|
55671
55880
|
label: "All Sides",
|
|
55672
55881
|
value: `${i}px`,
|
|
55673
55882
|
units: [
|
|
@@ -55679,28 +55888,28 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55679
55888
|
onChange: l
|
|
55680
55889
|
})]
|
|
55681
55890
|
});
|
|
55682
|
-
},
|
|
55891
|
+
}, SW = {
|
|
55683
55892
|
offsetX: 0,
|
|
55684
55893
|
offsetY: 4,
|
|
55685
55894
|
blur: 6,
|
|
55686
55895
|
spread: -1,
|
|
55687
55896
|
color: "#0000001a"
|
|
55688
|
-
},
|
|
55897
|
+
}, CW = (e) => {
|
|
55689
55898
|
let t = (e || "").trim();
|
|
55690
|
-
if (!t || t === "none") return
|
|
55899
|
+
if (!t || t === "none") return SW;
|
|
55691
55900
|
let n = t.match(/^(-?[\d.]+)px\s+(-?[\d.]+)px(?:\s+(-?[\d.]+)px)?(?:\s+(-?[\d.]+)px)?\s*(.*)$/);
|
|
55692
|
-
if (!n) return
|
|
55901
|
+
if (!n) return SW;
|
|
55693
55902
|
let [, r, i, a, o, s] = n;
|
|
55694
55903
|
return {
|
|
55695
55904
|
offsetX: parseFloat(r) || 0,
|
|
55696
55905
|
offsetY: parseFloat(i) || 0,
|
|
55697
55906
|
blur: a === void 0 ? 0 : parseFloat(a) || 0,
|
|
55698
55907
|
spread: o === void 0 ? 0 : parseFloat(o) || 0,
|
|
55699
|
-
color: s?.trim() ||
|
|
55908
|
+
color: s?.trim() || SW.color
|
|
55700
55909
|
};
|
|
55701
|
-
},
|
|
55702
|
-
let n = !e.boxShadow || e.boxShadow === "none", r =
|
|
55703
|
-
t("boxShadow",
|
|
55910
|
+
}, wW = (e) => `${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.spread}px ${e.color}`, TW = ({ styles: e, onChange: t }) => {
|
|
55911
|
+
let n = !e.boxShadow || e.boxShadow === "none", r = CW(e.boxShadow), i = (e) => {
|
|
55912
|
+
t("boxShadow", wW({
|
|
55704
55913
|
...r,
|
|
55705
55914
|
...e
|
|
55706
55915
|
}));
|
|
@@ -55714,42 +55923,42 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55714
55923
|
children: "Box Shadow"
|
|
55715
55924
|
}), /* @__PURE__ */ P("button", {
|
|
55716
55925
|
type: "button",
|
|
55717
|
-
onClick: () => t("boxShadow", n ?
|
|
55926
|
+
onClick: () => t("boxShadow", n ? wW(r) : "none"),
|
|
55718
55927
|
className: `plexo-switch-track plexo-switch-track-sm ${n ? "plexo-switch-track-off" : "plexo-switch-track-on"}`,
|
|
55719
55928
|
children: /* @__PURE__ */ P("span", { className: `plexo-switch-thumb plexo-switch-thumb-sm ${n ? "plexo-switch-thumb-off" : "plexo-switch-thumb-on-sm"}` })
|
|
55720
55929
|
})]
|
|
55721
55930
|
}), !n && /* @__PURE__ */ F("div", {
|
|
55722
55931
|
className: "grid grid-cols-1 gap-2 mt-1.5",
|
|
55723
55932
|
children: [
|
|
55724
|
-
/* @__PURE__ */ P(
|
|
55933
|
+
/* @__PURE__ */ P(gW, {
|
|
55725
55934
|
label: "Offset X",
|
|
55726
55935
|
value: `${r.offsetX}px`,
|
|
55727
55936
|
min: -100,
|
|
55728
55937
|
max: 100,
|
|
55729
55938
|
onChange: (e) => i({ offsetX: parseFloat(e) || 0 })
|
|
55730
55939
|
}),
|
|
55731
|
-
/* @__PURE__ */ P(
|
|
55940
|
+
/* @__PURE__ */ P(gW, {
|
|
55732
55941
|
label: "Offset Y",
|
|
55733
55942
|
value: `${r.offsetY}px`,
|
|
55734
55943
|
min: -100,
|
|
55735
55944
|
max: 100,
|
|
55736
55945
|
onChange: (e) => i({ offsetY: parseFloat(e) || 0 })
|
|
55737
55946
|
}),
|
|
55738
|
-
/* @__PURE__ */ P(
|
|
55947
|
+
/* @__PURE__ */ P(gW, {
|
|
55739
55948
|
label: "Blur",
|
|
55740
55949
|
value: `${r.blur}px`,
|
|
55741
55950
|
min: 0,
|
|
55742
55951
|
max: 200,
|
|
55743
55952
|
onChange: (e) => i({ blur: parseFloat(e) || 0 })
|
|
55744
55953
|
}),
|
|
55745
|
-
/* @__PURE__ */ P(
|
|
55954
|
+
/* @__PURE__ */ P(gW, {
|
|
55746
55955
|
label: "Spread",
|
|
55747
55956
|
value: `${r.spread}px`,
|
|
55748
55957
|
min: -100,
|
|
55749
55958
|
max: 100,
|
|
55750
55959
|
onChange: (e) => i({ spread: parseFloat(e) || 0 })
|
|
55751
55960
|
}),
|
|
55752
|
-
/* @__PURE__ */ P(
|
|
55961
|
+
/* @__PURE__ */ P(pW, {
|
|
55753
55962
|
label: "Shadow Color",
|
|
55754
55963
|
value: r.color,
|
|
55755
55964
|
onChange: (e) => i({ color: e })
|
|
@@ -55757,20 +55966,20 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55757
55966
|
]
|
|
55758
55967
|
})]
|
|
55759
55968
|
});
|
|
55760
|
-
},
|
|
55969
|
+
}, EW = ({ onSelect: e }) => /* @__PURE__ */ P("div", {
|
|
55761
55970
|
className: "grid grid-cols-1 gap-2.5",
|
|
55762
55971
|
children: ee.map((t, n) => /* @__PURE__ */ P("button", {
|
|
55763
55972
|
onClick: () => e(t.widths),
|
|
55764
55973
|
className: "group w-full h-14 bg-[#09132a] border border-slate-700/80 hover:border-cyan-400 p-2 flex items-center justify-between transition",
|
|
55765
55974
|
children: /* @__PURE__ */ P("div", {
|
|
55766
55975
|
className: "flex-1 h-full",
|
|
55767
|
-
children: /* @__PURE__ */ P(
|
|
55976
|
+
children: /* @__PURE__ */ P(aW, {
|
|
55768
55977
|
widths: t.widths,
|
|
55769
55978
|
percentages: t.percentages
|
|
55770
55979
|
})
|
|
55771
55980
|
})
|
|
55772
55981
|
}, n))
|
|
55773
|
-
}),
|
|
55982
|
+
}), DW = ({ label: e, stylePrefix: t, styles: n, onChange: r, allowNegative: i = !1 }) => {
|
|
55774
55983
|
let a = i ? -500 : 0, o = {
|
|
55775
55984
|
all: t,
|
|
55776
55985
|
top: `${t}Top`,
|
|
@@ -55803,7 +56012,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55803
56012
|
}), /* @__PURE__ */ F("div", {
|
|
55804
56013
|
className: "flex items-center gap-1.5",
|
|
55805
56014
|
children: [
|
|
55806
|
-
/* @__PURE__ */ P(
|
|
56015
|
+
/* @__PURE__ */ P(fW, {
|
|
55807
56016
|
filter: (e) => (e.key.includes("space-padding") || e.key.includes("space-gap") || e.key.includes("space-margin")) && (e.type === "dimension" || /px$|rem$|em$/.test(e.value)),
|
|
55808
56017
|
onSelect: h,
|
|
55809
56018
|
currentValue: `${u}px`
|
|
@@ -55823,7 +56032,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55823
56032
|
}), s ? /* @__PURE__ */ F("div", {
|
|
55824
56033
|
className: "grid grid-cols-1 gap-2 mt-1.5",
|
|
55825
56034
|
children: [
|
|
55826
|
-
/* @__PURE__ */ P(
|
|
56035
|
+
/* @__PURE__ */ P(gW, {
|
|
55827
56036
|
label: "Top",
|
|
55828
56037
|
value: `${d}px`,
|
|
55829
56038
|
units: [
|
|
@@ -55835,7 +56044,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55835
56044
|
min: a,
|
|
55836
56045
|
onChange: (e) => g(o.top, e)
|
|
55837
56046
|
}),
|
|
55838
|
-
/* @__PURE__ */ P(
|
|
56047
|
+
/* @__PURE__ */ P(gW, {
|
|
55839
56048
|
label: "Right",
|
|
55840
56049
|
value: `${m}px`,
|
|
55841
56050
|
units: [
|
|
@@ -55847,7 +56056,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55847
56056
|
min: a,
|
|
55848
56057
|
onChange: (e) => g(o.right, e)
|
|
55849
56058
|
}),
|
|
55850
|
-
/* @__PURE__ */ P(
|
|
56059
|
+
/* @__PURE__ */ P(gW, {
|
|
55851
56060
|
label: "Bottom",
|
|
55852
56061
|
value: `${f}px`,
|
|
55853
56062
|
units: [
|
|
@@ -55859,7 +56068,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55859
56068
|
min: a,
|
|
55860
56069
|
onChange: (e) => g(o.bottom, e)
|
|
55861
56070
|
}),
|
|
55862
|
-
/* @__PURE__ */ P(
|
|
56071
|
+
/* @__PURE__ */ P(gW, {
|
|
55863
56072
|
label: "Left",
|
|
55864
56073
|
value: `${p}px`,
|
|
55865
56074
|
units: [
|
|
@@ -55872,7 +56081,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55872
56081
|
onChange: (e) => g(o.left, e)
|
|
55873
56082
|
})
|
|
55874
56083
|
]
|
|
55875
|
-
}) : /* @__PURE__ */ P(
|
|
56084
|
+
}) : /* @__PURE__ */ P(gW, {
|
|
55876
56085
|
label: "All Sides",
|
|
55877
56086
|
value: `${u}px`,
|
|
55878
56087
|
units: [
|
|
@@ -55885,7 +56094,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55885
56094
|
onChange: h
|
|
55886
56095
|
})]
|
|
55887
56096
|
});
|
|
55888
|
-
},
|
|
56097
|
+
}, OW = ({ label: e, onUploadMock: t }) => /* @__PURE__ */ F("div", {
|
|
55889
56098
|
className: "py-1",
|
|
55890
56099
|
children: [/* @__PURE__ */ P("label", {
|
|
55891
56100
|
className: "text-xs text-slate-400 font-medium block mb-1.5",
|
|
@@ -55895,7 +56104,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55895
56104
|
className: "w-full h-12 border border-dashed border-slate-800/60 hover:border-indigo-500 rounded-md flex flex-col items-center justify-center gap-0.5 text-slate-550 hover:text-indigo-400 bg-slate-950/20 hover:bg-indigo-500/[0.01] transition select-none text-[10px] font-semibold",
|
|
55896
56105
|
children: /* @__PURE__ */ P("span", { children: "Upload File" })
|
|
55897
56106
|
})]
|
|
55898
|
-
}),
|
|
56107
|
+
}), kW = { body: {
|
|
55899
56108
|
style: {
|
|
55900
56109
|
background: "#ffffffff",
|
|
55901
56110
|
padding: "32px"
|
|
@@ -55939,7 +56148,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
55939
56148
|
}]
|
|
55940
56149
|
}]
|
|
55941
56150
|
}]
|
|
55942
|
-
} },
|
|
56151
|
+
} }, AW = ({ apiKey: e, mode: t, onSave: n, isSavingLayout: r, setIsSavingLayout: i, normalizeTemplateWithDefaults: a, templateId: o, allowPublishLandingPage: s }) => {
|
|
55943
56152
|
let c = fe(() => JSON.parse(JSON.stringify(Ie.getState().template)), []), l = fe(async (t) => {
|
|
55944
56153
|
let n = c(), r = a(n);
|
|
55945
56154
|
if (t === "email") {
|
|
@@ -56013,8 +56222,8 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
56013
56222
|
exportDesign: l,
|
|
56014
56223
|
handleBuiltInSave: u
|
|
56015
56224
|
};
|
|
56016
|
-
},
|
|
56017
|
-
let [e, t] = A(() => typeof window < "u" ? window.innerWidth :
|
|
56225
|
+
}, jW = 1280, MW = (e) => e < 768 ? "mobile" : e < 1280 ? "tablet" : "desktop", NW = () => {
|
|
56226
|
+
let [e, t] = A(() => typeof window < "u" ? window.innerWidth : jW);
|
|
56018
56227
|
return O(() => {
|
|
56019
56228
|
if (typeof window > "u") return;
|
|
56020
56229
|
let e = null, n = () => {
|
|
@@ -56027,14 +56236,14 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
56027
56236
|
};
|
|
56028
56237
|
}, []), {
|
|
56029
56238
|
width: e,
|
|
56030
|
-
category:
|
|
56239
|
+
category: MW(e)
|
|
56031
56240
|
};
|
|
56032
|
-
},
|
|
56241
|
+
}, PW = (e) => {
|
|
56033
56242
|
let t = {};
|
|
56034
56243
|
return e.tokens.forEach((e) => {
|
|
56035
56244
|
t[e.cssVariableName] = e, t[e.id] = e;
|
|
56036
56245
|
}), t;
|
|
56037
|
-
},
|
|
56246
|
+
}, FW = (e, t) => {
|
|
56038
56247
|
let n = { ...e }, r = e.style || {}, i = {};
|
|
56039
56248
|
return Object.entries(r).forEach(([e, n]) => {
|
|
56040
56249
|
if (typeof n == "string" && t[n]) {
|
|
@@ -56042,7 +56251,7 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
56042
56251
|
i[e] = `var(${r.cssVariableName})`;
|
|
56043
56252
|
} else i[e] = n;
|
|
56044
56253
|
}), n.style = i, n;
|
|
56045
|
-
},
|
|
56254
|
+
}, IW = (e, t) => e.tokens.filter((e) => e.category === t), LW = (e) => `:root {\n${e.tokens.map((e) => ` ${e.cssVariableName}: ${e.value};`).join("\n")}\n}`, RW = (e, t) => e ? e.startsWith("var(") ? e : t[e] ? `var(${t[e].cssVariableName})` : e : "", zW = (e, t = "") => {
|
|
56046
56255
|
let n = "";
|
|
56047
56256
|
switch (e.category) {
|
|
56048
56257
|
case "color":
|
|
@@ -56064,10 +56273,10 @@ var pW = ({ label: e, value: t, unit: n = "px", units: r, min: i = 0, max: a = 5
|
|
|
56064
56273
|
}
|
|
56065
56274
|
return n;
|
|
56066
56275
|
};
|
|
56067
|
-
function
|
|
56276
|
+
function BW(e) {
|
|
56068
56277
|
return /^#[0-9a-fA-F]{3,8}$/.test(e) || /^rgb|^hsl/.test(e) ? "color" : /px$|rem$|em$|%$/.test(e) ? "spacing" : /^\d+(\.\d+)?$/.test(e) ? "number" : "string";
|
|
56069
56278
|
}
|
|
56070
|
-
async function
|
|
56279
|
+
async function VW(e, t) {
|
|
56071
56280
|
if (!e || !e.trim()) return !1;
|
|
56072
56281
|
try {
|
|
56073
56282
|
let n = `https://snapshot.strata.charisol.io/snapshots/${e}/strata.json`, r = await fetch(n);
|
|
@@ -56079,7 +56288,7 @@ async function RW(e, t) {
|
|
|
56079
56288
|
key: e,
|
|
56080
56289
|
name: t.name || e,
|
|
56081
56290
|
value: n,
|
|
56082
|
-
type: t.type ||
|
|
56291
|
+
type: t.type || BW(n)
|
|
56083
56292
|
};
|
|
56084
56293
|
})), !0;
|
|
56085
56294
|
} catch (e) {
|
|
@@ -56088,7 +56297,7 @@ async function RW(e, t) {
|
|
|
56088
56297
|
}
|
|
56089
56298
|
//#endregion
|
|
56090
56299
|
//#region src/components/PlexoBuilder.tsx
|
|
56091
|
-
var
|
|
56300
|
+
var HW = (e) => ({ body: {
|
|
56092
56301
|
style: {
|
|
56093
56302
|
background: "#0b0f19",
|
|
56094
56303
|
padding: "24px"
|
|
@@ -56111,11 +56320,11 @@ var zW = (e) => ({ body: {
|
|
|
56111
56320
|
}]
|
|
56112
56321
|
}]
|
|
56113
56322
|
}]
|
|
56114
|
-
} }),
|
|
56323
|
+
} }), UW = (e, t, n) => {
|
|
56115
56324
|
if (t === void 0 && n === void 0) return e;
|
|
56116
56325
|
let r = JSON.parse(JSON.stringify(e));
|
|
56117
56326
|
return r.body.style = r.body.style || {}, t !== void 0 && (r.body.style.customCss = t), n !== void 0 && (r.body.style.customJs = n), r;
|
|
56118
|
-
},
|
|
56327
|
+
}, WW = (e, t) => {
|
|
56119
56328
|
let n = e.trim(), r = n.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
|
|
56120
56329
|
if (r) {
|
|
56121
56330
|
let e = r[1], n = e.length === 3 ? e.split("").map((e) => `${e}${e}`).join("") : e;
|
|
@@ -56134,7 +56343,7 @@ var zW = (e) => ({ body: {
|
|
|
56134
56343
|
}
|
|
56135
56344
|
}
|
|
56136
56345
|
return `rgba(79, 70, 229, ${t})`;
|
|
56137
|
-
},
|
|
56346
|
+
}, GW = ({ title: e, plan: t }) => /* @__PURE__ */ F("div", {
|
|
56138
56347
|
className: "flex flex-col items-center justify-center gap-3 py-10 px-4 text-center rounded-lg border border-dashed",
|
|
56139
56348
|
style: { borderColor: "var(--builder-border-color)" },
|
|
56140
56349
|
children: [
|
|
@@ -56161,7 +56370,7 @@ var zW = (e) => ({ body: {
|
|
|
56161
56370
|
children: "Upgrade your plan to unlock this feature."
|
|
56162
56371
|
})
|
|
56163
56372
|
]
|
|
56164
|
-
}),
|
|
56373
|
+
}), KW = (e, t = 1200, n = 1200, r = .8) => new Promise((i) => {
|
|
56165
56374
|
if (!e.type.startsWith("image/")) {
|
|
56166
56375
|
i(e);
|
|
56167
56376
|
return;
|
|
@@ -56194,13 +56403,13 @@ var zW = (e) => ({ body: {
|
|
|
56194
56403
|
}, "image/jpeg", r);
|
|
56195
56404
|
}, o.onerror = () => i(e), o.src = a.target?.result;
|
|
56196
56405
|
}, a.onerror = () => i(e), a.readAsDataURL(e);
|
|
56197
|
-
}),
|
|
56406
|
+
}), qW = de((e, n) => {
|
|
56198
56407
|
let { showSaveButton: r = !1, mode: i, apiKey: a, backgroundColor: o = "#0e1526", themeBgColor: s = "#4f46e5", themeFgColor: c = "#ffffff", textColor: l = "#e2e8f0", builderFontFamily: u = "'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif", initialTemplate: d, initialHtml: f, initialCss: p, initialJs: m, onSave: h, useAi: g, aiProvider: _, aiTier: v, externalUserId: y, onUpload: b, customUpload: x, disableImageUpload: w = !1, autoSave: ee = !1, autoSaveDuration: te = 3e3, unsplashKey: ie, pexelsKey: ae, pixabayKey: se, allowPublishLandingPage: ce = !1, templateId: D, headerLeftContent: le, headerRightContent: ue, mergeTags: de, isBlogLayout: fe = !1, readOnly: pe = !1, commentMode: _e = !1, onRequestComment: M } = e, ve = e.__internalPlan, ye = IH(a, ve), be = jH(ye.plan), xe = e.themeBgColor === void 0 ? ye.branding?.brandColor ?? s : s, Se = k(null), { template: Ce, selectedElementId: we, selectedRowId: I, selectedColumnId: L, past: Te, future: Ee, selectElement: R, selectRow: De, selectColumn: Oe, undo: ke, redo: Ne, hydrateTemplate: Pe, addRow: Fe, moveRow: Le, addElement: z, moveElement: ze, updateElement: Be, deleteElement: Ve, duplicateElement: Ue, deleteRow: We, duplicateRow: Ge, updateRowStyle: Ke, updateRowAttrs: qe, updateColumnStyle: Je, updateColumnAttrs: Ye, updateTemplateBodyStyle: Xe, updateRowColumns: Ze, updateColumnWidth: Qe, addColumnToRow: B, deleteColumnFromRow: V, duplicateColumn: $e, addUploadedImage: et, addNestedRowToColumn: tt, nestRowInColumn: nt, moveNestedRowToTopLevel: H, moveNestedRowBetweenColumns: U } = Ie(), [rt, it] = A(null), at = Ce?.body?.publishConfig?.apiKeyOverride ?? "", ot = () => at.trim() || a, st = (e) => typeof window < "u" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") && window.location.port !== "3000" ? `http://localhost:3000${e}` : e, ct = (e, t) => {
|
|
56199
56408
|
it(t), It(e), R(null), De(null), Oe(null);
|
|
56200
56409
|
}, lt = {
|
|
56201
56410
|
useAi: Ce.body.aiConfig?.useAi ?? g,
|
|
56202
56411
|
tier: Ce.body.aiConfig?.tier || v
|
|
56203
|
-
}, ut = _ || ye.aiProvider, dt = ye.status === "valid" ? ye.manageLandingPagePublishing : ce, ft = i === "email" ? "EMAIL" : "LANDING_PAGE", [pt, mt] = A(null), [ht, gt] = A(je), [_t, vt] = A("desktop"), [yt, bt] = A("600px"), [xt, St] = A("imac"), [Ct, wt] = A("design"), [Tt, Et] = A(!1), Dt = pe || Tt, [Ot, kt] = A("light"), { width: At, category: jt } =
|
|
56412
|
+
}, ut = _ || ye.aiProvider, dt = ye.status === "valid" ? ye.manageLandingPagePublishing : ce, ft = i === "email" ? "EMAIL" : "LANDING_PAGE", [pt, mt] = A(null), [ht, gt] = A(je), [_t, vt] = A("desktop"), [yt, bt] = A("600px"), [xt, St] = A("imac"), [Ct, wt] = A("design"), [Tt, Et] = A(!1), Dt = pe || Tt, [Ot, kt] = A("light"), { width: At, category: jt } = NW(), Mt = jt !== "desktop", [Nt, Pt] = A(!1), [Ft, It] = A("content"), [Lt, Rt] = A("all"), [zt, Bt] = A([]), [Vt, Ht] = A(!1), [Ut, Wt] = A(null), [Gt, Kt] = A(0), [qt, Jt] = A(""), [Yt, Xt] = A(""), [Zt, Qt] = A([]);
|
|
56204
56413
|
O(() => {
|
|
56205
56414
|
let e = !1;
|
|
56206
56415
|
return (async () => {
|
|
@@ -56285,7 +56494,7 @@ var zW = (e) => ({ body: {
|
|
|
56285
56494
|
D,
|
|
56286
56495
|
a
|
|
56287
56496
|
]);
|
|
56288
|
-
let { sensors: Dn, getJson: On, exportDesign: kn, handleBuiltInSave: An } =
|
|
56497
|
+
let { sensors: Dn, getJson: On, exportDesign: kn, handleBuiltInSave: An } = AW({
|
|
56289
56498
|
apiKey: a,
|
|
56290
56499
|
mode: i,
|
|
56291
56500
|
onSave: h,
|
|
@@ -56339,7 +56548,7 @@ var zW = (e) => ({ body: {
|
|
|
56339
56548
|
h
|
|
56340
56549
|
]), O(() => {
|
|
56341
56550
|
let e = f?.trim(), t, n, r = p === void 0 ? "__undefined__" : p, i = m === void 0 ? "__undefined__" : m;
|
|
56342
|
-
d ? (n = `json:${JSON.stringify(d)}:css:${r}:js:${i}`, t =
|
|
56551
|
+
d ? (n = `json:${JSON.stringify(d)}:css:${r}:js:${i}`, t = UW(d, p, m)) : e ? (n = `html:${e}:css:${r}:js:${i}`, t = UW(HW(e), p, m)) : (n = `demo:css:${r}:js:${i}`, t = UW(kW, p, m)), wn.current !== n && (wn.current = n, Pe(t));
|
|
56343
56552
|
}, [
|
|
56344
56553
|
d,
|
|
56345
56554
|
f,
|
|
@@ -56363,7 +56572,7 @@ var zW = (e) => ({ body: {
|
|
|
56363
56572
|
let e = Ce?.body?.style?.strataConfig?.projectId, t = typeof window < "u" ? localStorage.getItem("plexo-strata-config") : null, n = t ? JSON.parse(t) : null, r = e || n?.projectId;
|
|
56364
56573
|
if (r) {
|
|
56365
56574
|
let e = Ie.getState().setStrataTokens;
|
|
56366
|
-
|
|
56575
|
+
VW(r, e);
|
|
56367
56576
|
}
|
|
56368
56577
|
}, [(Ce?.body?.style)?.strataConfig?.projectId]), O(() => {
|
|
56369
56578
|
rn(null), on(null), sn.current && clearTimeout(sn.current);
|
|
@@ -56892,7 +57101,7 @@ var zW = (e) => ({ body: {
|
|
|
56892
57101
|
}
|
|
56893
57102
|
return;
|
|
56894
57103
|
}
|
|
56895
|
-
}, tr = (e, n, r) => /* @__PURE__ */ P(
|
|
57104
|
+
}, tr = (e, n, r) => /* @__PURE__ */ P(uW, {
|
|
56896
57105
|
row: e,
|
|
56897
57106
|
parentRowId: n,
|
|
56898
57107
|
parentColId: r,
|
|
@@ -56901,7 +57110,7 @@ var zW = (e) => ({ body: {
|
|
|
56901
57110
|
previewMode: Dt,
|
|
56902
57111
|
deviceView: _t,
|
|
56903
57112
|
selectedElementId: we,
|
|
56904
|
-
children: e.columns.map((i) => /* @__PURE__ */ P(
|
|
57113
|
+
children: e.columns.map((i) => /* @__PURE__ */ P(dW, {
|
|
56905
57114
|
col: i,
|
|
56906
57115
|
rowId: e.id,
|
|
56907
57116
|
parentRowId: n,
|
|
@@ -56980,7 +57189,7 @@ var zW = (e) => ({ body: {
|
|
|
56980
57189
|
})]
|
|
56981
57190
|
}) : /* @__PURE__ */ P(N, { children: t(i).map((t) => {
|
|
56982
57191
|
let n = i.elements.find((e) => e.id === t);
|
|
56983
|
-
if (n) return /* @__PURE__ */ P(
|
|
57192
|
+
if (n) return /* @__PURE__ */ P(mW, {
|
|
56984
57193
|
elem: n,
|
|
56985
57194
|
columnId: i.id,
|
|
56986
57195
|
rowId: e.id,
|
|
@@ -57092,7 +57301,7 @@ var zW = (e) => ({ body: {
|
|
|
57092
57301
|
let n = t.name;
|
|
57093
57302
|
try {
|
|
57094
57303
|
let e = t;
|
|
57095
|
-
t.type.startsWith("image/") && (Fn(`Compressing "${n}"...`), e = await
|
|
57304
|
+
t.type.startsWith("image/") && (Fn(`Compressing "${n}"...`), e = await KW(t)), Fn(`Uploading "${n}"...`);
|
|
57096
57305
|
let r = "", i = x || b;
|
|
57097
57306
|
if (i) {
|
|
57098
57307
|
let t = await i(e);
|
|
@@ -57349,9 +57558,9 @@ var zW = (e) => ({ body: {
|
|
|
57349
57558
|
themeBgColor: xe,
|
|
57350
57559
|
textColor: l,
|
|
57351
57560
|
fontFamily: u,
|
|
57352
|
-
borderColor:
|
|
57353
|
-
panelColor:
|
|
57354
|
-
mutedTextColor:
|
|
57561
|
+
borderColor: WW(xe, .35),
|
|
57562
|
+
panelColor: WW(o, .68),
|
|
57563
|
+
mutedTextColor: WW(l, .76),
|
|
57355
57564
|
themeOnAccent: c,
|
|
57356
57565
|
inputBackground: c,
|
|
57357
57566
|
inputText: PH(c, l),
|
|
@@ -57535,9 +57744,9 @@ var zW = (e) => ({ body: {
|
|
|
57535
57744
|
"--builder-input-border": J.inputBorder,
|
|
57536
57745
|
"--theme-fg": J.themeOnAccent,
|
|
57537
57746
|
"--theme-accent": J.themeBgColor,
|
|
57538
|
-
"--theme-accent-strong":
|
|
57539
|
-
"--theme-accent-soft":
|
|
57540
|
-
"--theme-accent-border-soft":
|
|
57747
|
+
"--theme-accent-strong": WW(J.themeBgColor, .86),
|
|
57748
|
+
"--theme-accent-soft": WW(J.themeBgColor, .16),
|
|
57749
|
+
"--theme-accent-border-soft": WW(J.themeBgColor, .35),
|
|
57541
57750
|
"--theme-accent-text": J.themeOnAccent
|
|
57542
57751
|
},
|
|
57543
57752
|
children: [
|
|
@@ -57545,7 +57754,7 @@ var zW = (e) => ({ body: {
|
|
|
57545
57754
|
rel: "stylesheet",
|
|
57546
57755
|
href: Pn
|
|
57547
57756
|
}),
|
|
57548
|
-
bn && /* @__PURE__ */ P(
|
|
57757
|
+
bn && /* @__PURE__ */ P(iW, {
|
|
57549
57758
|
message: bn.message,
|
|
57550
57759
|
onClose: In
|
|
57551
57760
|
}),
|
|
@@ -57801,7 +58010,7 @@ var zW = (e) => ({ body: {
|
|
|
57801
58010
|
fontFamily: W.body.style.fontFamily || "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif"
|
|
57802
58011
|
},
|
|
57803
58012
|
className: `${Dt ? "min-h-[460px]" : "min-h-full"}`,
|
|
57804
|
-
children: /* @__PURE__ */ P(
|
|
58013
|
+
children: /* @__PURE__ */ P(oW, {
|
|
57805
58014
|
rowIds: hr,
|
|
57806
58015
|
disabled: Dt,
|
|
57807
58016
|
children: W.body.rows.length === 0 ? /* @__PURE__ */ F("div", {
|
|
@@ -57925,7 +58134,7 @@ var zW = (e) => ({ body: {
|
|
|
57925
58134
|
isOpen: $t.columnsSection,
|
|
57926
58135
|
onToggle: () => tn("columnsSection"),
|
|
57927
58136
|
contentClassName: "px-4 pb-4 pt-0 flex flex-col gap-0 bg-transparent",
|
|
57928
|
-
children: /* @__PURE__ */ P(
|
|
58137
|
+
children: /* @__PURE__ */ P(EW, { onSelect: (e) => Ze(lr.id, e) })
|
|
57929
58138
|
}),
|
|
57930
58139
|
/* @__PURE__ */ P(XH, {
|
|
57931
58140
|
title: "Row Properties",
|
|
@@ -57934,7 +58143,7 @@ var zW = (e) => ({ body: {
|
|
|
57934
58143
|
children: /* @__PURE__ */ F("div", {
|
|
57935
58144
|
className: "flex flex-col gap-1",
|
|
57936
58145
|
children: [
|
|
57937
|
-
/* @__PURE__ */ P(
|
|
58146
|
+
/* @__PURE__ */ P(gW, {
|
|
57938
58147
|
label: "Height",
|
|
57939
58148
|
value: q.height || "auto",
|
|
57940
58149
|
units: [
|
|
@@ -57947,26 +58156,26 @@ var zW = (e) => ({ body: {
|
|
|
57947
58156
|
max: 2e3,
|
|
57948
58157
|
onChange: (e) => G("height", e)
|
|
57949
58158
|
}),
|
|
57950
|
-
/* @__PURE__ */ P(
|
|
58159
|
+
/* @__PURE__ */ P(pW, {
|
|
57951
58160
|
label: "Background Color",
|
|
57952
58161
|
value: q.backgroundColor || "#ffffff",
|
|
57953
58162
|
onChange: (e) => G("backgroundColor", e)
|
|
57954
58163
|
}),
|
|
57955
|
-
/* @__PURE__ */ P(
|
|
58164
|
+
/* @__PURE__ */ P(pW, {
|
|
57956
58165
|
label: "Content Background Color",
|
|
57957
58166
|
value: q.contentBackgroundColor || "#ffffff",
|
|
57958
58167
|
onChange: (e) => G("contentBackgroundColor", e)
|
|
57959
58168
|
}),
|
|
57960
|
-
/* @__PURE__ */ P(
|
|
58169
|
+
/* @__PURE__ */ P(vW, {
|
|
57961
58170
|
label: "Content Alignment",
|
|
57962
58171
|
value: q.textAlign || "left",
|
|
57963
58172
|
onChange: (e) => G("textAlign", e)
|
|
57964
58173
|
}),
|
|
57965
|
-
/* @__PURE__ */ P(
|
|
58174
|
+
/* @__PURE__ */ P(OW, {
|
|
57966
58175
|
label: "Upload background",
|
|
57967
58176
|
onUploadMock: rr
|
|
57968
58177
|
}),
|
|
57969
|
-
/* @__PURE__ */ P(
|
|
58178
|
+
/* @__PURE__ */ P(yW, {
|
|
57970
58179
|
label: "Image URL",
|
|
57971
58180
|
value: (() => {
|
|
57972
58181
|
let e = q.backgroundImage || "", t = e.match(/^url\(['"]?([^'"\)]+)['"]?\)$/);
|
|
@@ -57986,27 +58195,27 @@ var zW = (e) => ({ body: {
|
|
|
57986
58195
|
});
|
|
57987
58196
|
}
|
|
57988
58197
|
}),
|
|
57989
|
-
/* @__PURE__ */ P(
|
|
58198
|
+
/* @__PURE__ */ P(DW, {
|
|
57990
58199
|
label: "Padding",
|
|
57991
58200
|
stylePrefix: "padding",
|
|
57992
58201
|
styles: q,
|
|
57993
58202
|
onChange: G
|
|
57994
58203
|
}),
|
|
57995
|
-
/* @__PURE__ */ P(
|
|
58204
|
+
/* @__PURE__ */ P(DW, {
|
|
57996
58205
|
label: "Margin",
|
|
57997
58206
|
stylePrefix: "margin",
|
|
57998
58207
|
styles: q,
|
|
57999
58208
|
onChange: G,
|
|
58000
58209
|
allowNegative: !0
|
|
58001
58210
|
}),
|
|
58002
|
-
/* @__PURE__ */ P(
|
|
58211
|
+
/* @__PURE__ */ P(gW, {
|
|
58003
58212
|
label: "Border Width",
|
|
58004
58213
|
value: q.borderWidth || "1px",
|
|
58005
58214
|
min: 0,
|
|
58006
58215
|
max: 12,
|
|
58007
58216
|
onChange: (e) => G("borderWidth", e)
|
|
58008
58217
|
}),
|
|
58009
|
-
/* @__PURE__ */ P(
|
|
58218
|
+
/* @__PURE__ */ P(_W, {
|
|
58010
58219
|
label: "Border Style",
|
|
58011
58220
|
value: q.borderStyle || "solid",
|
|
58012
58221
|
options: [
|
|
@@ -58029,12 +58238,12 @@ var zW = (e) => ({ body: {
|
|
|
58029
58238
|
],
|
|
58030
58239
|
onChange: (e) => G("borderStyle", e)
|
|
58031
58240
|
}),
|
|
58032
|
-
/* @__PURE__ */ P(
|
|
58241
|
+
/* @__PURE__ */ P(pW, {
|
|
58033
58242
|
label: "Border Color",
|
|
58034
58243
|
value: q.borderColor || "#e2e8f0",
|
|
58035
58244
|
onChange: (e) => G("borderColor", e)
|
|
58036
58245
|
}),
|
|
58037
|
-
/* @__PURE__ */ P(
|
|
58246
|
+
/* @__PURE__ */ P(xW, {
|
|
58038
58247
|
styles: q,
|
|
58039
58248
|
onChange: G
|
|
58040
58249
|
})
|
|
@@ -58047,13 +58256,13 @@ var zW = (e) => ({ body: {
|
|
|
58047
58256
|
onToggle: () => tn("actions"),
|
|
58048
58257
|
children: /* @__PURE__ */ F("div", {
|
|
58049
58258
|
className: "flex flex-col gap-1",
|
|
58050
|
-
children: [/* @__PURE__ */ P(
|
|
58259
|
+
children: [/* @__PURE__ */ P(yW, {
|
|
58051
58260
|
label: "HTML ID",
|
|
58052
58261
|
value: lr?.htmlId || "",
|
|
58053
58262
|
onChange: (e) => {
|
|
58054
58263
|
I && qe(I, { htmlId: e });
|
|
58055
58264
|
}
|
|
58056
|
-
}), /* @__PURE__ */ P(
|
|
58265
|
+
}), /* @__PURE__ */ P(yW, {
|
|
58057
58266
|
label: "HTML Class Names",
|
|
58058
58267
|
value: lr?.htmlClass || "",
|
|
58059
58268
|
onChange: (e) => {
|
|
@@ -58107,7 +58316,7 @@ var zW = (e) => ({ body: {
|
|
|
58107
58316
|
children: /* @__PURE__ */ F("div", {
|
|
58108
58317
|
className: "flex flex-col gap-1",
|
|
58109
58318
|
children: [
|
|
58110
|
-
/* @__PURE__ */ P(
|
|
58319
|
+
/* @__PURE__ */ P(gW, {
|
|
58111
58320
|
label: "Width",
|
|
58112
58321
|
value: ur?.width || "100%",
|
|
58113
58322
|
units: [
|
|
@@ -58122,7 +58331,7 @@ var zW = (e) => ({ body: {
|
|
|
58122
58331
|
L && e && Qe(L, e);
|
|
58123
58332
|
}
|
|
58124
58333
|
}),
|
|
58125
|
-
/* @__PURE__ */ P(
|
|
58334
|
+
/* @__PURE__ */ P(gW, {
|
|
58126
58335
|
label: "Height",
|
|
58127
58336
|
value: q.height || "auto",
|
|
58128
58337
|
units: [
|
|
@@ -58169,7 +58378,7 @@ var zW = (e) => ({ body: {
|
|
|
58169
58378
|
})]
|
|
58170
58379
|
}),
|
|
58171
58380
|
q.display === "flex" && /* @__PURE__ */ F(N, { children: [
|
|
58172
|
-
/* @__PURE__ */ P(
|
|
58381
|
+
/* @__PURE__ */ P(gW, {
|
|
58173
58382
|
label: "Gap",
|
|
58174
58383
|
value: q.gap || "10px",
|
|
58175
58384
|
units: [
|
|
@@ -58254,32 +58463,32 @@ var zW = (e) => ({ body: {
|
|
|
58254
58463
|
}, e.value))
|
|
58255
58464
|
})]
|
|
58256
58465
|
}),
|
|
58257
|
-
/* @__PURE__ */ P(
|
|
58466
|
+
/* @__PURE__ */ P(pW, {
|
|
58258
58467
|
label: "Background Color",
|
|
58259
58468
|
value: q.backgroundColor || "transparent",
|
|
58260
58469
|
onChange: (e) => G("backgroundColor", e)
|
|
58261
58470
|
}),
|
|
58262
|
-
/* @__PURE__ */ P(
|
|
58471
|
+
/* @__PURE__ */ P(DW, {
|
|
58263
58472
|
label: "Padding",
|
|
58264
58473
|
stylePrefix: "padding",
|
|
58265
58474
|
styles: q,
|
|
58266
58475
|
onChange: G
|
|
58267
58476
|
}),
|
|
58268
|
-
/* @__PURE__ */ P(
|
|
58477
|
+
/* @__PURE__ */ P(DW, {
|
|
58269
58478
|
label: "Margin",
|
|
58270
58479
|
stylePrefix: "margin",
|
|
58271
58480
|
styles: q,
|
|
58272
58481
|
onChange: G,
|
|
58273
58482
|
allowNegative: !0
|
|
58274
58483
|
}),
|
|
58275
|
-
/* @__PURE__ */ P(
|
|
58484
|
+
/* @__PURE__ */ P(gW, {
|
|
58276
58485
|
label: "Border Width",
|
|
58277
58486
|
value: q.borderWidth || "0px",
|
|
58278
58487
|
min: 0,
|
|
58279
58488
|
max: 12,
|
|
58280
58489
|
onChange: (e) => G("borderWidth", e)
|
|
58281
58490
|
}),
|
|
58282
|
-
/* @__PURE__ */ P(
|
|
58491
|
+
/* @__PURE__ */ P(_W, {
|
|
58283
58492
|
label: "Border Style",
|
|
58284
58493
|
value: q.borderStyle || "solid",
|
|
58285
58494
|
options: [
|
|
@@ -58302,25 +58511,25 @@ var zW = (e) => ({ body: {
|
|
|
58302
58511
|
],
|
|
58303
58512
|
onChange: (e) => G("borderStyle", e)
|
|
58304
58513
|
}),
|
|
58305
|
-
/* @__PURE__ */ P(
|
|
58514
|
+
/* @__PURE__ */ P(pW, {
|
|
58306
58515
|
label: "Border Color",
|
|
58307
58516
|
value: q.borderColor || "#cbd5e1",
|
|
58308
58517
|
onChange: (e) => G("borderColor", e)
|
|
58309
58518
|
}),
|
|
58310
|
-
/* @__PURE__ */ P(
|
|
58519
|
+
/* @__PURE__ */ P(xW, {
|
|
58311
58520
|
styles: q,
|
|
58312
58521
|
onChange: G
|
|
58313
58522
|
}),
|
|
58314
|
-
/* @__PURE__ */ P(
|
|
58523
|
+
/* @__PURE__ */ P(TW, {
|
|
58315
58524
|
styles: q,
|
|
58316
58525
|
onChange: G
|
|
58317
58526
|
}),
|
|
58318
|
-
/* @__PURE__ */ P(
|
|
58527
|
+
/* @__PURE__ */ P(yW, {
|
|
58319
58528
|
label: "HTML ID",
|
|
58320
58529
|
value: dr.htmlId || "",
|
|
58321
58530
|
onChange: (e) => Wn("htmlId", e)
|
|
58322
58531
|
}),
|
|
58323
|
-
/* @__PURE__ */ P(
|
|
58532
|
+
/* @__PURE__ */ P(yW, {
|
|
58324
58533
|
label: "HTML Class Names",
|
|
58325
58534
|
value: dr.htmlClass || "",
|
|
58326
58535
|
onChange: (e) => Wn("htmlClass", e)
|
|
@@ -58338,7 +58547,7 @@ var zW = (e) => ({ body: {
|
|
|
58338
58547
|
]
|
|
58339
58548
|
})
|
|
58340
58549
|
})] }),
|
|
58341
|
-
/* @__PURE__ */ P(
|
|
58550
|
+
/* @__PURE__ */ P(rW, {
|
|
58342
58551
|
selectedElement: K,
|
|
58343
58552
|
currentAttrs: dr,
|
|
58344
58553
|
currentStyles: q,
|
|
@@ -58347,16 +58556,16 @@ var zW = (e) => ({ body: {
|
|
|
58347
58556
|
onTransientAttrChange: Wn,
|
|
58348
58557
|
onTransientStyleChange: G,
|
|
58349
58558
|
AccordionSection: XH,
|
|
58350
|
-
InlineTextInput:
|
|
58351
|
-
InlineSelect:
|
|
58352
|
-
InlineColorPicker:
|
|
58353
|
-
InlineAlignment:
|
|
58354
|
-
InlineCounter:
|
|
58559
|
+
InlineTextInput: yW,
|
|
58560
|
+
InlineSelect: _W,
|
|
58561
|
+
InlineColorPicker: pW,
|
|
58562
|
+
InlineAlignment: vW,
|
|
58563
|
+
InlineCounter: gW,
|
|
58355
58564
|
Toggle: hU,
|
|
58356
|
-
InlineTextArea:
|
|
58357
|
-
SpacingControls:
|
|
58358
|
-
BorderRadiusControls:
|
|
58359
|
-
BoxShadowControls:
|
|
58565
|
+
InlineTextArea: bW,
|
|
58566
|
+
SpacingControls: DW,
|
|
58567
|
+
BorderRadiusControls: xW,
|
|
58568
|
+
BoxShadowControls: TW,
|
|
58360
58569
|
handleUploadMock: rr,
|
|
58361
58570
|
disableImageUpload: w,
|
|
58362
58571
|
onOpenImageLibrary: ct,
|
|
@@ -58396,7 +58605,7 @@ var zW = (e) => ({ body: {
|
|
|
58396
58605
|
}),
|
|
58397
58606
|
Ft === "blocks" && /* @__PURE__ */ P(YH, {
|
|
58398
58607
|
DraggablePaletteItem: eU,
|
|
58399
|
-
LayoutPreview:
|
|
58608
|
+
LayoutPreview: aW,
|
|
58400
58609
|
tierFeatures: be,
|
|
58401
58610
|
onTapAdd: jt === "mobile" ? Yn : void 0
|
|
58402
58611
|
}),
|
|
@@ -58410,13 +58619,13 @@ var zW = (e) => ({ body: {
|
|
|
58410
58619
|
handleUploadFavicon: ir,
|
|
58411
58620
|
disableImageUpload: w,
|
|
58412
58621
|
onOpenImageLibrary: ct,
|
|
58413
|
-
InlineColorPicker:
|
|
58414
|
-
InlineAlignment:
|
|
58415
|
-
InlineSelect:
|
|
58622
|
+
InlineColorPicker: pW,
|
|
58623
|
+
InlineAlignment: vW,
|
|
58624
|
+
InlineSelect: _W,
|
|
58416
58625
|
Toggle: hU,
|
|
58417
|
-
InlineTextInput:
|
|
58418
|
-
InlineTextArea:
|
|
58419
|
-
SpacingControls:
|
|
58626
|
+
InlineTextInput: yW,
|
|
58627
|
+
InlineTextArea: bW,
|
|
58628
|
+
SpacingControls: DW,
|
|
58420
58629
|
notify: Fn
|
|
58421
58630
|
}),
|
|
58422
58631
|
Ft === "images" && (be.stockImagesEnabled ? /* @__PURE__ */ P(QH, {
|
|
@@ -58432,7 +58641,7 @@ var zW = (e) => ({ body: {
|
|
|
58432
58641
|
applyImageToSelection: Or,
|
|
58433
58642
|
ICONS: X,
|
|
58434
58643
|
panelBackgroundColor: o
|
|
58435
|
-
}) : /* @__PURE__ */ P(
|
|
58644
|
+
}) : /* @__PURE__ */ P(GW, {
|
|
58436
58645
|
title: "Stock Images",
|
|
58437
58646
|
plan: "PRO"
|
|
58438
58647
|
})),
|
|
@@ -58447,7 +58656,7 @@ var zW = (e) => ({ body: {
|
|
|
58447
58656
|
ICONS: X,
|
|
58448
58657
|
panelBackgroundColor: o
|
|
58449
58658
|
}),
|
|
58450
|
-
Ft === "strata" && (be.strataEnabled ? /* @__PURE__ */ P(fU, {}) : /* @__PURE__ */ P(
|
|
58659
|
+
Ft === "strata" && (be.strataEnabled ? /* @__PURE__ */ P(fU, {}) : /* @__PURE__ */ P(GW, {
|
|
58451
58660
|
title: "Strata Design System",
|
|
58452
58661
|
plan: "PRO"
|
|
58453
58662
|
})),
|
|
@@ -58590,10 +58799,10 @@ var zW = (e) => ({ body: {
|
|
|
58590
58799
|
})
|
|
58591
58800
|
});
|
|
58592
58801
|
});
|
|
58593
|
-
|
|
58802
|
+
qW.displayName = "PlexoBuilder";
|
|
58594
58803
|
//#endregion
|
|
58595
58804
|
//#region src/playground.tsx
|
|
58596
|
-
var
|
|
58805
|
+
var JW = de((e, t) => {
|
|
58597
58806
|
let n = k(null), r = k(null), i = k(null), [a, o] = A(1), s = k(1), [c, l] = A(!0);
|
|
58598
58807
|
return me(t, () => ({
|
|
58599
58808
|
exportDesign: async (e) => {
|
|
@@ -58648,13 +58857,13 @@ var GW = de((e, t) => {
|
|
|
58648
58857
|
width: "100%",
|
|
58649
58858
|
height: "100%"
|
|
58650
58859
|
},
|
|
58651
|
-
children: /* @__PURE__ */ P(
|
|
58860
|
+
children: /* @__PURE__ */ P(qW, {
|
|
58652
58861
|
ref: n,
|
|
58653
58862
|
...e
|
|
58654
58863
|
})
|
|
58655
58864
|
})]
|
|
58656
58865
|
});
|
|
58657
58866
|
});
|
|
58658
|
-
|
|
58867
|
+
JW.displayName = "PlexoBuilder";
|
|
58659
58868
|
//#endregion
|
|
58660
|
-
export { NV as ColumnJSONSchema, MV as ElementJSONSchema,
|
|
58869
|
+
export { NV as ColumnJSONSchema, MV as ElementJSONSchema, JW as PlexoBuilder, tH as PlexoRenderer, PV as RowJSONSchema, UV as SafeHTML, zV as TemplateJSONSchema, FW as applyTokensToElement, E as compileToHTML, y as compileToHTMLWithStrataAuto, ne as compileToPlainText, PW as createTokenMapping, zW as createTokenSwatch, LW as generateTokenCSS, IW as getTokensByCategory, ae as injectStrataBundle, ce as parseJsonToTargetFormat, RW as resolveTokenValue, DV as safeJsonParse, HV as sanitizeHtml, EV as sanitizeObject, VV as sanitizeStyleObject, BV as sanitizeStyleString };
|
package/package.json
CHANGED