@chaibuilder/sdk 4.0.0-beta.22 → 4.0.0-beta.24
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/{2SSKDMRQ-DVWVGtU8.cjs → 2SSKDMRQ-C6XmPkPR.cjs} +1 -1
- package/dist/{2SSKDMRQ-SUA5eA2S.js → 2SSKDMRQ-DTcPSOGn.js} +2 -2
- package/dist/{AP7HFJJL-CUN5zddU.cjs → AP7HFJJL-6aBLUYOi.cjs} +1 -1
- package/dist/{AP7HFJJL-Co5bLh3I.js → AP7HFJJL-CVazlaEj.js} +1 -1
- package/dist/{IconPicker-BZvFj3cg.js → IconPicker-CcBoA1K0.js} +1 -1
- package/dist/{IconPicker-Bmz6vXB8.cjs → IconPicker-sbWeQ9M9.cjs} +1 -1
- package/dist/{WDYDFRGG-BpSteEEf.cjs → WDYDFRGG-BtzyRDmj.cjs} +1 -1
- package/dist/{WDYDFRGG-DjCIT9L-.js → WDYDFRGG-CwiYliX0.js} +2 -2
- package/dist/{active-in-another-tab-DfRJcvAz.js → active-in-another-tab-B4O3FEEg.js} +2 -2
- package/dist/{active-in-another-tab-C8-vpt8f.cjs → active-in-another-tab-DRJY0QqU.cjs} +1 -1
- package/dist/{add-new-language-page-jZ7Pg0Fv.js → add-new-language-page-BfYL9jXF.js} +3 -3
- package/dist/{add-new-language-page-B2BEmfil.cjs → add-new-language-page-CKIRTFjr.cjs} +1 -1
- package/dist/{add-new-page-YZF_XF8X.js → add-new-page-DVgxz4fs.js} +2 -2
- package/dist/{add-new-page-DbEBB3w7.cjs → add-new-page-dzN_CD2c.cjs} +1 -1
- package/dist/{ai-panel-content-C8ecaQnv.js → ai-panel-content-D5eFLI_B.js} +3 -3
- package/dist/{ai-panel-content-Bf_ojKwt.cjs → ai-panel-content-Dyw4RHCV.cjs} +1 -1
- package/dist/{ai-panel-default-lang-BC8Gq_jl.js → ai-panel-default-lang-Cj7meZBD.js} +3 -3
- package/dist/{ai-panel-default-lang-DokOmE_Q.cjs → ai-panel-default-lang-DEj9Qx2M.cjs} +2 -2
- package/dist/{ai-panel-other-lang-BJ30SL7z.js → ai-panel-other-lang-Cbi6HKzd.js} +3 -3
- package/dist/{ai-panel-other-lang-Ccx1t8pp.cjs → ai-panel-other-lang-Da2XLEcm.cjs} +1 -1
- package/dist/{ai-prompt-input-SfeB6a2j.js → ai-prompt-input-B6QoqT9B.js} +1 -1
- package/dist/{ai-prompt-input-ED14e6NE.cjs → ai-prompt-input-DXS8gzex.cjs} +1 -1
- package/dist/{ai-translation-prompt-BRRzei71.js → ai-translation-prompt-Dmq_Ahjf.js} +1 -1
- package/dist/{ai-translation-prompt-spS-OC6L.cjs → ai-translation-prompt-Uswft8iz.cjs} +1 -1
- package/dist/{code-editor-CIqswl5j.cjs → code-editor-DbSBrsUA.cjs} +1 -1
- package/dist/{code-editor-CYiIxUKp.js → code-editor-wQWmwFKW.js} +1 -1
- package/dist/{continue-editing-in-this-client-vICoETHN.js → continue-editing-in-this-client-BV0OrgEU.js} +2 -2
- package/dist/{continue-editing-in-this-client-B3CnmiZ2.cjs → continue-editing-in-this-client-Dkkzk8YZ.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -1
- package/dist/{css-import-modal-CHFZPXXQ.cjs → css-import-modal-C3f5sphx.cjs} +1 -1
- package/dist/{css-import-modal-DautOct0.js → css-import-modal-Co_YLkLB.js} +1 -1
- package/dist/{delete-design-token-BmWHk_Ap.js → delete-design-token-CJPAcsWp.js} +1 -1
- package/dist/{delete-design-token-D-wGR5qS.cjs → delete-design-token-zzNmNYLR.cjs} +1 -1
- package/dist/{delete-page-D5mzl-ET.cjs → delete-page-6lInxYM_.cjs} +1 -1
- package/dist/{delete-page-Dlv8srng.js → delete-page-CQTjB7ZZ.js} +2 -2
- package/dist/{design-token-usage-hl29qR_q.js → design-token-usage-BQY6eqzE.js} +1 -1
- package/dist/{design-token-usage-DIszlgJK.cjs → design-token-usage-blwlGuEE.cjs} +1 -1
- package/dist/{digital-asset-manager-v2LfDXwR.cjs → digital-asset-manager-cGUpTcu3.cjs} +1 -1
- package/dist/{digital-asset-manager-o_bNl9qj.js → digital-asset-manager-lPKoJ4FH.js} +3 -3
- package/dist/{duplicate-page-BjqgghN0.js → duplicate-page-Dmgqp93w.js} +3 -3
- package/dist/{duplicate-page-CEuF8dll.cjs → duplicate-page-rYeBMwHR.cjs} +1 -1
- package/dist/{dynamic-page-selector-BWC7kHJ1.js → dynamic-page-selector-CVyA9Zp0.js} +2 -2
- package/dist/{dynamic-page-selector-D4EWs4Qd.cjs → dynamic-page-selector-zqGqpcww.cjs} +1 -1
- package/dist/{get-chai-builder-theme-DDVRJQ6Z.js → get-chai-builder-theme-CfJkQYZc.js} +1 -1
- package/dist/{get-chai-builder-theme-BApShjRz.cjs → get-chai-builder-theme-Dm1z70lQ.cjs} +1 -1
- package/dist/{image-editor-2h5axNuk.cjs → image-editor-Cn1DgrNp.cjs} +1 -1
- package/dist/{image-editor-B1-bjvPd.js → image-editor-mVBb0VD_.js} +1 -1
- package/dist/{index-BJVYKKJq.cjs → index-B5qvHqN5.cjs} +2 -2
- package/dist/{index-DWGTiEak.cjs → index-EFWvSWoi.cjs} +11 -11
- package/dist/{index-BvluH-oT.js → index-GfOB5KV1.js} +20 -20
- package/dist/{index-BN6yEl-H.js → index-lm46VtIP.js} +889 -887
- package/dist/{json-diff-viewer-BjCIlzd7.cjs → json-diff-viewer-BeSMdSd5.cjs} +1 -1
- package/dist/{json-diff-viewer-WX0GIjq-.js → json-diff-viewer-D5yJoFh1.js} +2 -2
- package/dist/{lang-panel-C4x7bcyb.js → lang-panel-7qTejsLm.js} +3 -3
- package/dist/{lang-panel--yfjRDE2.cjs → lang-panel-B-QUotOn.cjs} +1 -1
- package/dist/{manage-design-tokens-CRwsErkx.js → manage-design-tokens-DeH-yNJN.js} +2 -2
- package/dist/{manage-design-tokens-DhdwhzQu.cjs → manage-design-tokens-TeWNZekH.cjs} +1 -1
- package/dist/{mark-as-template-BH0W9p2G.cjs → mark-as-template-Co00KkhA.cjs} +1 -1
- package/dist/{mark-as-template-DpZSFrLK.js → mark-as-template-RkfNETRW.js} +2 -2
- package/dist/{nested-path-selector-content-BDQmZzlf.js → nested-path-selector-content-Dimjyy8J.js} +1 -1
- package/dist/{nested-path-selector-content-CHYz7cdB.cjs → nested-path-selector-content-hBvmT_2A.cjs} +1 -1
- package/dist/{no-language-page-content-D0lcCseQ.js → no-language-page-content-Bk3sTsdM.js} +2 -2
- package/dist/{no-language-page-content-D7btm8zX.cjs → no-language-page-content-CLovr1bL.cjs} +1 -1
- package/dist/{no-language-page-dialog-sYOmLnpY.cjs → no-language-page-dialog-C21Fq-UD.cjs} +1 -1
- package/dist/{no-language-page-dialog-BdW7oXvt.js → no-language-page-dialog-Cx-YOrAd.js} +2 -2
- package/dist/{page-creator-O_QpbMlB.js → page-creator-BBuYY84G.js} +3 -3
- package/dist/{page-creator-B-jBAGZl.cjs → page-creator-BDmospqO.cjs} +1 -1
- package/dist/{page-lock-CmQKpw1U.js → page-lock-BrGWj326.js} +2 -2
- package/dist/{page-lock-BrVqfmVm.cjs → page-lock-DG5IvZaG.cjs} +1 -1
- package/dist/{page-locked-dialog-ChHVSk7X.cjs → page-locked-dialog-DKnQpIMB.cjs} +1 -1
- package/dist/{page-locked-dialog-BjeJOXuN.js → page-locked-dialog-DUktYJzU.js} +2 -2
- package/dist/{page-manager-new-wcsdorbd.js → page-manager-new-BfKYDWs7.js} +3 -3
- package/dist/{page-manager-new-B90zLpRY.cjs → page-manager-new-iYsDkUzG.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-Bb_Zfpsj.cjs → page-manager-search-and-filter-CIspvIW2.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-DY_NsetM.js → page-manager-search-and-filter-DVAGxnlw.js} +2 -2
- package/dist/{page-revisions-content-CVpi-467.cjs → page-revisions-content-B84UtAxm.cjs} +1 -1
- package/dist/{page-revisions-content-5h39VYXj.js → page-revisions-content-DB4mj_Cw.js} +3 -3
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +1 -0
- package/dist/pages.js +1 -1
- package/dist/{plugin-BGlQf0iy.cjs → plugin-BfC_qpW2.cjs} +10 -10
- package/dist/{plugin-C-ht41UZ.js → plugin-DVNaUexn.js} +86 -80
- package/dist/{publish-pages-content-rrfvXks4.js → publish-pages-content-BRKsIr9W.js} +3 -3
- package/dist/{publish-pages-content-BG1GIuIz.cjs → publish-pages-content-ysv37LxZ.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +4 -1
- package/dist/render.js +2 -2
- package/dist/{rte-widget-modal-JRoPPuju.cjs → rte-widget-modal-BS040t_9.cjs} +1 -1
- package/dist/{rte-widget-modal-29WtCMJs.js → rte-widget-modal-Dj5BvA-1.js} +1 -1
- package/dist/{save-to-lib-YvzDV5ee.cjs → save-to-lib-ClCCNy6W.cjs} +1 -1
- package/dist/{save-to-lib-Bm7R2K7j.js → save-to-lib-D3kp0ovZ.js} +2 -2
- package/dist/{selected-block-display-BAulh0Nz.js → selected-block-display-BtlTAkei.js} +2 -2
- package/dist/{selected-block-display-bdClAekS.cjs → selected-block-display-BvRoOMt9.cjs} +1 -1
- package/dist/{seo-panel-D9wnaLG-.cjs → seo-panel-CHGdB8_7.cjs} +1 -1
- package/dist/{seo-panel-CT0D3I44.js → seo-panel-C_Cnwj1-.js} +2 -2
- package/dist/{shared-json-ld-ON6LaybZ.cjs → shared-json-ld-DA0wz-k3.cjs} +1 -1
- package/dist/{shared-json-ld-CuhqVL8H.js → shared-json-ld-DPr0Douk.js} +2 -2
- package/dist/{slug-input-DNeh6LBv.js → slug-input-CqhlfgAe.js} +1 -1
- package/dist/{slug-input-CxmcQbTR.cjs → slug-input-DltqfQ3y.cjs} +1 -1
- package/dist/{take-over-request-CrILj_3q.cjs → take-over-request-Bq7OF5Gp.cjs} +1 -1
- package/dist/{take-over-request-BmeR6t3b.js → take-over-request-ByUlm_HK.js} +2 -2
- package/dist/{theme-panel-footer-D4oCAY2G.js → theme-panel-footer-DG7Z5YjD.js} +2 -2
- package/dist/{theme-panel-footer-BMx5lGB4.cjs → theme-panel-footer-XYoM6sn5.cjs} +1 -1
- package/dist/{translation-warning-modal-ChL7oDO1.cjs → translation-warning-modal-DTxxfo0H.cjs} +1 -1
- package/dist/{translation-warning-modal-BNG9m-FC.js → translation-warning-modal-DaBUipEY.js} +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/{unmark-as-template-CEEMIY1A.js → unmark-as-template-BOFHOO0_.js} +2 -2
- package/dist/{unmark-as-template-BYiyJloZ.cjs → unmark-as-template-C9EXTj0X.cjs} +1 -1
- package/dist/{unpublish-page-B0aY1JnO.cjs → unpublish-page-B5rev9W3.cjs} +1 -1
- package/dist/{unpublish-page-Bm20P3TB.js → unpublish-page-KDM7kEEV.js} +2 -2
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{web-preview-BtEn4Vc-.js → web-preview-BDgUTTr8.js} +1 -1
- package/dist/{web-preview-iQgiotU6.cjs → web-preview-CvpevNzM.cjs} +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var Su = (t, e, n) => e in t ? Nu(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Zt = (t, e, n) => Su(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { jsx as a, jsxs as g, Fragment as Z } from "react/jsx-runtime";
|
|
5
5
|
import { E as j, z as br, B as te, n as Eu, u as Wo, o as _u, l as Ga, d as Au, G as Ua, s as Ka, v as _s, y as Tu, w as zi, g as Bu, i as Iu, h as Ru } from "./register-chai-top-bar-CX_JkRJn.js";
|
|
6
|
-
import { noop as kt, get as
|
|
6
|
+
import { noop as kt, get as N, has as pe, find as ne, filter as ee, flatten as Ot, map as C, includes as Be, without as Lu, compact as go, forEach as yr, keys as Ct, isEmpty as $, set as We, unset as Pu, omit as xr, isString as Vn, chunk as Ou, values as Tt, pick as bo, startsWith as Re, isFunction as tn, isObject as Du, memoize as Mu, each as It, first as Ce, findIndex as sr, throttle as $u, some as Fu, uniq as As, cloneDeep as qr, isArray as Ts, isNull as Bs, split as zu, reject as jr, take as Hu, debounce as Is, startCase as Jt, isNumber as Vu, parseInt as ju, isNaN as Wu, range as Ye, flattenDeep as Rt, toLower as Ja, nth as Hi, findLast as Gu, intersection as Uu, toUpper as Go, kebabCase as Ya, capitalize as Dn, groupBy as Xa, sortBy as Ku, round as Ju, reverse as Yu, camelCase as Xu } from "lodash-es";
|
|
7
7
|
import * as Ae from "@radix-ui/react-dropdown-menu";
|
|
8
8
|
import { ChevronRightIcon as jn, CheckIcon as vr, CircleIcon as qa, PinTopIcon as qu, PinBottomIcon as Zu, PinLeftIcon as Qu, PinRightIcon as ep, GearIcon as tp, DragHandleDots2Icon as Za, ArrowUpIcon as en, PlusIcon as Xe, CopyIcon as Rs, TrashIcon as Qa, CaretDownIcon as ls, Cross1Icon as qe, FontBoldIcon as np, FontItalicIcon as el, UnderlineIcon as tl, StrikethroughIcon as rp, ListBulletIcon as cs, ValueIcon as op, TextAlignLeftIcon as Vi, TextAlignCenterIcon as ji, TextAlignRightIcon as Wi, Link2Icon as sp, LinkBreak2Icon as nl, EnterFullScreenIcon as ip, Pencil2Icon as yo, MagnifyingGlassIcon as Ls, ChevronLeftIcon as rl, LoopIcon as ol, IdCardIcon as sl, ChevronDownIcon as xn, InfoCircledIcon as Mn, FileIcon as ap, PlusCircledIcon as il, DotsVerticalIcon as xo, TriangleDownIcon as lp, RowSpacingIcon as cp, Cross2Icon as vo, LetterCaseUppercaseIcon as dp, OverlineIcon as up, StretchHorizontallyIcon as pp, AlignRightIcon as fp, AlignCenterHorizontallyIcon as hp, AlignLeftIcon as mp, ArrowLeftIcon as qn, ArrowDownIcon as Tn, ArrowRightIcon as Zn, HeightIcon as rt, WidthIcon as ot, BorderAllIcon as _t, ArrowBottomLeftIcon as gp, ArrowBottomRightIcon as bp, ArrowTopRightIcon as al, ArrowTopLeftIcon as yp, EyeClosedIcon as Zr, EyeOpenIcon as ll, BoxIcon as Ps, MinusIcon as xp, CrossCircledIcon as vp, MobileIcon as Gi, LaptopIcon as wp, DesktopIcon as kp, TokensIcon as Cp, ChevronUpIcon as Np, ReloadIcon as Os, CaretRightIcon as Sp, FrameIcon as Ep, SquareIcon as _p, EraserIcon as cl, DownloadIcon as Ap, CardStackPlusIcon as Tp, CardStackIcon as Ds, ScissorsIcon as Bp, ExclamationTriangleIcon as dl, StackIcon as ul, DoubleArrowDownIcon as Ip, DoubleArrowUpIcon as Rp, ResetIcon as Qr, UploadIcon as Lp, TextIcon as Pp, CornerTopRightIcon as Op, MixerHorizontalIcon as eo, SunIcon as pl, MoonIcon as fl, FaceIcon as Dp, ShuffleIcon as Mp, ChatBubbleIcon as $p, StopIcon as Fp, ZoomInIcon as zp, DotsHorizontalIcon as Hp, LightningBoltIcon as hl } from "@radix-ui/react-icons";
|
|
9
9
|
import * as V from "react";
|
|
@@ -15,7 +15,7 @@ import { isObject as Ki } from "@rjsf/utils";
|
|
|
15
15
|
import { g as hn, a as bl, c as ht } from "./common-functions-D2lMFR6K.js";
|
|
16
16
|
import { splitAtom as yl, atomWithStorage as Qe, useAtomCallback as Up } from "jotai/utils";
|
|
17
17
|
import { useDebouncedCallback as Ut, useThrottledCallback as mn, useResizeObserver as ds, useDebouncedState as Ji } from "@react-hookz/web";
|
|
18
|
-
import { d as xl, e as zs, a as Kp, p as Jp, g as Yp, f as Xp, h as qp } from "./plugin-
|
|
18
|
+
import { d as xl, e as zs, a as Kp, p as Jp, g as Yp, f as Xp, h as qp } from "./plugin-DVNaUexn.js";
|
|
19
19
|
import Zp from "tree-model";
|
|
20
20
|
import Qp from "undo-manager";
|
|
21
21
|
import { useTranslation as U, initReactI18next as ef } from "react-i18next";
|
|
@@ -212,7 +212,7 @@ const oe = {
|
|
|
212
212
|
const e = Oe(t);
|
|
213
213
|
return e && e.canDelete ? e.canDelete() : !0;
|
|
214
214
|
}, Qi = (t, { dragSource: e, dropTarget: n }) => {
|
|
215
|
-
const r =
|
|
215
|
+
const r = N(e, "data._type", ""), o = N(n, "data._type", "");
|
|
216
216
|
return gt(o, r);
|
|
217
217
|
};
|
|
218
218
|
import.meta.vitest && describe("canDropBlock Function", () => {
|
|
@@ -315,7 +315,7 @@ const Ol = P((t) => {
|
|
|
315
315
|
Ol.debugLabel = "structureErrorsByBlockAtom";
|
|
316
316
|
const ft = Wp(), jf = () => ft.get($e), G = (t, e) => {
|
|
317
317
|
const n = Ge(Zs);
|
|
318
|
-
return M(() =>
|
|
318
|
+
return M(() => N(n, t, e), [n, t, e]);
|
|
319
319
|
}, Dl = P("");
|
|
320
320
|
Dl.debugLabel = "selectedLanguageAtom";
|
|
321
321
|
const Ke = () => {
|
|
@@ -332,7 +332,7 @@ const Ke = () => {
|
|
|
332
332
|
Co.debugLabel = "selectedBlockIdsAtom";
|
|
333
333
|
const Ys = P((t) => {
|
|
334
334
|
const e = t($e), n = t(Co);
|
|
335
|
-
return
|
|
335
|
+
return C(
|
|
336
336
|
ee(e, ({ _id: r }) => Be(n, r)),
|
|
337
337
|
(r) => ({ ...r })
|
|
338
338
|
);
|
|
@@ -344,8 +344,8 @@ const No = P((t) => {
|
|
|
344
344
|
return e[0];
|
|
345
345
|
});
|
|
346
346
|
No.debugLabel = "selectedBlockAtom";
|
|
347
|
-
const de = () => Ge(No), Wf = (t) =>
|
|
348
|
-
const e = t(Ys), n =
|
|
347
|
+
const de = () => Ge(No), Wf = (t) => N(t, "_parent", null), Gf = P((t) => {
|
|
348
|
+
const e = t(Ys), n = C(e, Wf);
|
|
349
349
|
return ee(t($e), (r) => Be(n, r._id));
|
|
350
350
|
});
|
|
351
351
|
Gf.debugLabel = "selectedBlocksParentsAtom";
|
|
@@ -378,11 +378,11 @@ const Uf = () => ({
|
|
|
378
378
|
);
|
|
379
379
|
return [t, e, n];
|
|
380
380
|
}, zl = (t, e, n) => {
|
|
381
|
-
const r = Oe(
|
|
381
|
+
const r = Oe(N(n, "_type", ""));
|
|
382
382
|
if (!r) return t;
|
|
383
383
|
const o = { ...t };
|
|
384
384
|
return yr(Ct(t), (s) => {
|
|
385
|
-
if (Be(
|
|
385
|
+
if (Be(N(r, "i18nProps", []), s) && !$(e)) {
|
|
386
386
|
const i = `${s}-${e}`;
|
|
387
387
|
We(o, i, t[s]), Pu(o, s);
|
|
388
388
|
}
|
|
@@ -465,10 +465,10 @@ const Vl = () => O(qs), Zf = (t, e, n, r) => {
|
|
|
465
465
|
...m,
|
|
466
466
|
[t._id]: {
|
|
467
467
|
status: "loaded",
|
|
468
|
-
props:
|
|
468
|
+
props: N(f, "items", []),
|
|
469
469
|
repeaterItems: t.repeaterItems
|
|
470
470
|
}
|
|
471
|
-
})), s((m) => ({ ...m, status: "loaded", props: { totalItems:
|
|
471
|
+
})), s((m) => ({ ...m, status: "loaded", props: { totalItems: N(f, "totalItems") } })), i([t._id], { totalItems: N(f, "totalItems") })) : s((m) => ({ ...m, status: "loaded", props: Ki(f) ? f : {} }));
|
|
472
472
|
}).catch((f) => {
|
|
473
473
|
u ? (c((m) => ({
|
|
474
474
|
...m,
|
|
@@ -476,8 +476,8 @@ const Vl = () => O(qs), Zf = (t, e, n, r) => {
|
|
|
476
476
|
})), s((m) => ({ ...m, status: "error", error: f, props: {} }))) : s((m) => ({ ...m, status: "error", error: f, props: {} }));
|
|
477
477
|
})));
|
|
478
478
|
}, [t == null ? void 0 : t._id, d, u, p, r, e]), {
|
|
479
|
-
$loading:
|
|
480
|
-
...t ?
|
|
479
|
+
$loading: N(o, "status") === "loading",
|
|
480
|
+
...t ? N(o, "props", {}) : {}
|
|
481
481
|
};
|
|
482
482
|
}, Zs = P(null);
|
|
483
483
|
Zs.debugLabel = "chaiBuilderPropsAtom";
|
|
@@ -848,14 +848,14 @@ const lh = () => {
|
|
|
848
848
|
e
|
|
849
849
|
];
|
|
850
850
|
}, ch = P(null), dh = () => ({ currentPage: Ge(ch) }), uh = Mu((t) => {
|
|
851
|
-
const e = Oe(t), n =
|
|
851
|
+
const e = Oe(t), n = N(e, "schema.properties", {});
|
|
852
852
|
return go(
|
|
853
|
-
Object.keys(n).map((r) =>
|
|
853
|
+
Object.keys(n).map((r) => N(n[r], "builderProp", !1) || N(n[r], "runtime", !1) ? r : null)
|
|
854
854
|
);
|
|
855
855
|
}), ph = () => {
|
|
856
856
|
const [t] = lh(), { currentPage: e } = dh(), [n] = fe();
|
|
857
857
|
return R(() => {
|
|
858
|
-
const r =
|
|
858
|
+
const r = C(n, (o) => xr(o, uh(o._type)));
|
|
859
859
|
return {
|
|
860
860
|
currentPage: e,
|
|
861
861
|
blocks: r
|
|
@@ -914,10 +914,10 @@ const yh = (t, e) => e ? t.some((n) => {
|
|
|
914
914
|
async (x = !1, v = !1) => {
|
|
915
915
|
if (m(v))
|
|
916
916
|
return;
|
|
917
|
-
const
|
|
918
|
-
return
|
|
917
|
+
const S = o();
|
|
918
|
+
return S != null && S.blocks && p(S.blocks), e("SAVING"), r("SAVING"), h(0), await n({
|
|
919
919
|
autoSave: x,
|
|
920
|
-
blocks:
|
|
920
|
+
blocks: S.blocks,
|
|
921
921
|
theme: s,
|
|
922
922
|
needTranslations: f(),
|
|
923
923
|
designTokens: u
|
|
@@ -1254,50 +1254,50 @@ const Ih = P({
|
|
|
1254
1254
|
} = Yl();
|
|
1255
1255
|
return {
|
|
1256
1256
|
moveBlocks: (f, m, b) => {
|
|
1257
|
-
const y = ft.get($e), x =
|
|
1258
|
-
const A = y.find((
|
|
1259
|
-
return { _id:
|
|
1260
|
-
}), v = x.find(({ _id:
|
|
1257
|
+
const y = ft.get($e), x = C(f, (S) => {
|
|
1258
|
+
const A = y.find((_) => _._id === S)._parent || null, k = y.filter((_) => A ? _._parent === A : !_._parent).map((_) => _._id).indexOf(S);
|
|
1259
|
+
return { _id: S, oldParent: A, oldPosition: k };
|
|
1260
|
+
}), v = x.find(({ _id: S }) => S === f[0]);
|
|
1261
1261
|
v && v.oldParent === m && v.oldPosition === b || (o(f, m ?? null, b), t({
|
|
1262
|
-
undo: () => It(x, ({ _id:
|
|
1263
|
-
o([
|
|
1262
|
+
undo: () => It(x, ({ _id: S, oldParent: E, oldPosition: A }) => {
|
|
1263
|
+
o([S], E ?? null, A);
|
|
1264
1264
|
}),
|
|
1265
1265
|
redo: () => o(f, m ?? null, b)
|
|
1266
1266
|
}));
|
|
1267
1267
|
},
|
|
1268
1268
|
addBlocks: (f, m, b) => {
|
|
1269
1269
|
n(f, m, b), t({
|
|
1270
|
-
undo: () => r(
|
|
1270
|
+
undo: () => r(C(f, "_id")),
|
|
1271
1271
|
redo: () => n(f, m, b)
|
|
1272
1272
|
});
|
|
1273
1273
|
},
|
|
1274
1274
|
removeBlocks: (f) => {
|
|
1275
1275
|
var v;
|
|
1276
|
-
const m = ft.get($e), b = (v = Ce(f)) == null ? void 0 : v._parent, x = m.filter((
|
|
1277
|
-
r(
|
|
1276
|
+
const m = ft.get($e), b = (v = Ce(f)) == null ? void 0 : v._parent, x = m.filter((S) => b ? S._parent === b : !S._parent).indexOf(Ce(f));
|
|
1277
|
+
r(C(f, "_id")), t({
|
|
1278
1278
|
undo: () => n(f, b ?? void 0, x),
|
|
1279
|
-
redo: () => r(
|
|
1279
|
+
redo: () => r(C(f, "_id"))
|
|
1280
1280
|
});
|
|
1281
1281
|
},
|
|
1282
1282
|
updateBlocks: (f, m, b) => {
|
|
1283
1283
|
const y = ft.get($e);
|
|
1284
1284
|
let x = [];
|
|
1285
1285
|
if (b)
|
|
1286
|
-
x =
|
|
1286
|
+
x = C(f, (v) => ({ _id: v, ...b }));
|
|
1287
1287
|
else {
|
|
1288
1288
|
const v = Ct(m);
|
|
1289
|
-
x =
|
|
1290
|
-
const
|
|
1291
|
-
return It(v, (
|
|
1289
|
+
x = C(f, (S) => {
|
|
1290
|
+
const E = y.find((B) => B._id === S), A = { _id: S };
|
|
1291
|
+
return It(v, (B) => A[B] = E[B]), A;
|
|
1292
1292
|
});
|
|
1293
1293
|
}
|
|
1294
|
-
s(
|
|
1294
|
+
s(C(f, (v) => ({ _id: v, ...m }))), t({
|
|
1295
1295
|
undo: () => s(x),
|
|
1296
|
-
redo: () => s(
|
|
1296
|
+
redo: () => s(C(f, (v) => ({ _id: v, ...m })))
|
|
1297
1297
|
});
|
|
1298
1298
|
},
|
|
1299
1299
|
updateBlocksRuntime: (f, m) => {
|
|
1300
|
-
s(
|
|
1300
|
+
s(C(f, (b) => ({ _id: b, ...m })));
|
|
1301
1301
|
},
|
|
1302
1302
|
setNewBlocks: (f) => {
|
|
1303
1303
|
const m = ft.get($e);
|
|
@@ -1309,9 +1309,9 @@ const Ih = P({
|
|
|
1309
1309
|
updateMultipleBlocksProps: (f) => {
|
|
1310
1310
|
const m = ft.get($e);
|
|
1311
1311
|
let b = [];
|
|
1312
|
-
b =
|
|
1313
|
-
const x = Ct(y), v = m.find((
|
|
1314
|
-
return It(x, (
|
|
1312
|
+
b = C(f, (y) => {
|
|
1313
|
+
const x = Ct(y), v = m.find((E) => E._id === y._id), S = {};
|
|
1314
|
+
return It(x, (E) => S[E] = v == null ? void 0 : v[E]), S;
|
|
1315
1315
|
}), s(f), t({
|
|
1316
1316
|
undo: () => s(b),
|
|
1317
1317
|
redo: () => s(f)
|
|
@@ -1319,7 +1319,7 @@ const Ih = P({
|
|
|
1319
1319
|
}
|
|
1320
1320
|
};
|
|
1321
1321
|
}, Rh = ({ block: t, children: e }) => {
|
|
1322
|
-
const { t: n } = U(), [r] = fe(), { hasPermission: o } = bt(), s =
|
|
1322
|
+
const { t: n } = U(), [r] = fe(), { hasPermission: o } = bt(), s = N(t, "_id"), i = N(t, "_parent"), l = ee(r, (p) => i ? N(p, "_parent") === i : !N(p, "_parent")), c = no(N(t, "_type", "")), d = sr(l, { _id: s }), u = (p) => {
|
|
1323
1323
|
if (p === "CHILD")
|
|
1324
1324
|
ge.publish(oe.OPEN_ADD_BLOCK, t);
|
|
1325
1325
|
else {
|
|
@@ -1625,18 +1625,18 @@ function qh(t, e, n, r, o) {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
1627
|
function Zh(t, e, n, r, o) {
|
|
1628
|
-
var
|
|
1628
|
+
var S, E, A, B;
|
|
1629
1629
|
const s = t.getAttribute("data-block-id"), i = t.getAttribute("data-block-type") || "Box";
|
|
1630
1630
|
if (!s)
|
|
1631
1631
|
return null;
|
|
1632
1632
|
let l = t.parentElement;
|
|
1633
1633
|
for (; l && !l.hasAttribute("data-block-id"); )
|
|
1634
1634
|
l = l.parentElement;
|
|
1635
|
-
const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? bn(l) : "vertical", u = bn(t), p = Jh(i), h = !p && gt(i, r), f = ((
|
|
1635
|
+
const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? bn(l) : "vertical", u = bn(t), p = Jh(i), h = !p && gt(i, r), f = ((S = o.defaultView) == null ? void 0 : S.scrollY) || 0, m = ((E = o.defaultView) == null ? void 0 : E.scrollX) || 0;
|
|
1636
1636
|
if (s === "canvas" && Gr(t)) {
|
|
1637
|
-
const
|
|
1638
|
-
if (
|
|
1639
|
-
const w =
|
|
1637
|
+
const k = Gt(t), _ = k[k.length - 1];
|
|
1638
|
+
if (_) {
|
|
1639
|
+
const w = _.getBoundingClientRect(), T = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = T.width - I - W, q = T.left + m + I;
|
|
1640
1640
|
return {
|
|
1641
1641
|
position: "after",
|
|
1642
1642
|
placeholderOrientation: "horizontal",
|
|
@@ -1646,8 +1646,8 @@ function Zh(t, e, n, r, o) {
|
|
|
1646
1646
|
width: K,
|
|
1647
1647
|
height: 4
|
|
1648
1648
|
},
|
|
1649
|
-
targetElement:
|
|
1650
|
-
targetBlockId:
|
|
1649
|
+
targetElement: _,
|
|
1650
|
+
targetBlockId: _.getAttribute("data-block-id"),
|
|
1651
1651
|
targetParentId: "canvas",
|
|
1652
1652
|
isEmpty: !1,
|
|
1653
1653
|
confidence: 1
|
|
@@ -1655,44 +1655,44 @@ function Zh(t, e, n, r, o) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
if (h && !p && Gr(t)) {
|
|
1658
|
-
const
|
|
1659
|
-
if (
|
|
1660
|
-
const
|
|
1658
|
+
const k = Yh(t, e, n, u);
|
|
1659
|
+
if (k) {
|
|
1660
|
+
const _ = k.before.getBoundingClientRect(), w = k.after.getBoundingClientRect(), T = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = Gt(t), q = ci(K, k.before, u);
|
|
1661
1661
|
let xe = 0;
|
|
1662
1662
|
if (q.forEach((ve) => {
|
|
1663
1663
|
const ue = ve.getBoundingClientRect();
|
|
1664
1664
|
ue.height > xe && (xe = ue.height);
|
|
1665
1665
|
}), u === "vertical") {
|
|
1666
|
-
const ve =
|
|
1666
|
+
const ve = T.width - I - W, ue = T.left + m + I;
|
|
1667
1667
|
return {
|
|
1668
1668
|
position: "after",
|
|
1669
1669
|
placeholderOrientation: "horizontal",
|
|
1670
1670
|
rect: {
|
|
1671
|
-
top:
|
|
1671
|
+
top: _.bottom + f,
|
|
1672
1672
|
left: ue,
|
|
1673
1673
|
width: ve,
|
|
1674
1674
|
height: 4
|
|
1675
1675
|
},
|
|
1676
|
-
targetElement:
|
|
1677
|
-
targetBlockId:
|
|
1676
|
+
targetElement: k.before,
|
|
1677
|
+
targetBlockId: k.before.getAttribute("data-block-id"),
|
|
1678
1678
|
targetParentId: s,
|
|
1679
1679
|
isGapZone: !0,
|
|
1680
1680
|
confidence: 1
|
|
1681
1681
|
// High confidence for gap zones
|
|
1682
1682
|
};
|
|
1683
1683
|
} else {
|
|
1684
|
-
const ve =
|
|
1684
|
+
const ve = _.top + f, ue = xe > 0 ? xe : Math.max(_.height, w.height);
|
|
1685
1685
|
return {
|
|
1686
1686
|
position: "after",
|
|
1687
1687
|
placeholderOrientation: "vertical",
|
|
1688
1688
|
rect: {
|
|
1689
1689
|
top: ve,
|
|
1690
|
-
left:
|
|
1690
|
+
left: _.right + m,
|
|
1691
1691
|
width: 4,
|
|
1692
1692
|
height: ue
|
|
1693
1693
|
},
|
|
1694
|
-
targetElement:
|
|
1695
|
-
targetBlockId:
|
|
1694
|
+
targetElement: k.before,
|
|
1695
|
+
targetBlockId: k.before.getAttribute("data-block-id"),
|
|
1696
1696
|
targetParentId: s,
|
|
1697
1697
|
isGapZone: !0,
|
|
1698
1698
|
confidence: 1
|
|
@@ -1701,15 +1701,15 @@ function Zh(t, e, n, r, o) {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
if (l && c) {
|
|
1704
|
-
const
|
|
1705
|
-
if (
|
|
1706
|
-
const
|
|
1707
|
-
if (
|
|
1704
|
+
const k = Xh(l, e, n, d);
|
|
1705
|
+
if (k) {
|
|
1706
|
+
const _ = l.getBoundingClientRect(), w = window.getComputedStyle(l), T = parseFloat(w.paddingLeft) || 0, L = parseFloat(w.paddingRight) || 0, I = parseFloat(w.paddingTop) || 0, W = parseFloat(w.paddingBottom) || 0, K = ((A = o.defaultView) == null ? void 0 : A.scrollY) || 0, q = ((B = o.defaultView) == null ? void 0 : B.scrollX) || 0, xe = d === "vertical" ? "horizontal" : "vertical", ve = Zl(l);
|
|
1707
|
+
if (k === "start") {
|
|
1708
1708
|
const ue = Gt(l)[0];
|
|
1709
1709
|
if (ue) {
|
|
1710
1710
|
const Me = ue.getBoundingClientRect();
|
|
1711
1711
|
if (d === "vertical") {
|
|
1712
|
-
const tt =
|
|
1712
|
+
const tt = _.width - T - L, X = _.left + q + T;
|
|
1713
1713
|
return {
|
|
1714
1714
|
position: "before",
|
|
1715
1715
|
placeholderOrientation: xe,
|
|
@@ -1725,7 +1725,7 @@ function Zh(t, e, n, r, o) {
|
|
|
1725
1725
|
confidence: 0.9
|
|
1726
1726
|
};
|
|
1727
1727
|
} else {
|
|
1728
|
-
const tt =
|
|
1728
|
+
const tt = _.top + K + I, X = ve.maxHeight > 0 ? ve.maxHeight : _.height - I - W;
|
|
1729
1729
|
return {
|
|
1730
1730
|
position: "before",
|
|
1731
1731
|
placeholderOrientation: xe,
|
|
@@ -1747,7 +1747,7 @@ function Zh(t, e, n, r, o) {
|
|
|
1747
1747
|
if (Me) {
|
|
1748
1748
|
const tt = Me.getBoundingClientRect();
|
|
1749
1749
|
if (d === "vertical") {
|
|
1750
|
-
const X =
|
|
1750
|
+
const X = _.width - T - L, nt = _.left + q + T;
|
|
1751
1751
|
return {
|
|
1752
1752
|
position: "after",
|
|
1753
1753
|
placeholderOrientation: xe,
|
|
@@ -1763,7 +1763,7 @@ function Zh(t, e, n, r, o) {
|
|
|
1763
1763
|
confidence: 0.9
|
|
1764
1764
|
};
|
|
1765
1765
|
} else {
|
|
1766
|
-
const X =
|
|
1766
|
+
const X = _.top + K + I, nt = ve.maxHeight > 0 ? ve.maxHeight : _.height - I - W;
|
|
1767
1767
|
return {
|
|
1768
1768
|
position: "after",
|
|
1769
1769
|
placeholderOrientation: xe,
|
|
@@ -1785,12 +1785,12 @@ function Zh(t, e, n, r, o) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
let b = qh(t, e, n, h, d);
|
|
1787
1787
|
if (p && b.position === "inside") {
|
|
1788
|
-
const
|
|
1788
|
+
const k = t.getBoundingClientRect();
|
|
1789
1789
|
d === "vertical" ? b = {
|
|
1790
|
-
position: (n -
|
|
1790
|
+
position: (n - k.top) / k.height < 0.5 ? "before" : "after",
|
|
1791
1791
|
confidence: b.confidence
|
|
1792
1792
|
} : b = {
|
|
1793
|
-
position: (e -
|
|
1793
|
+
position: (e - k.left) / k.width < 0.5 ? "before" : "after",
|
|
1794
1794
|
confidence: b.confidence
|
|
1795
1795
|
};
|
|
1796
1796
|
}
|
|
@@ -1858,14 +1858,14 @@ function ci(t, e, n) {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
function em(t, e, n, r, o) {
|
|
1860
1860
|
var I, W;
|
|
1861
|
-
const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((W = o.defaultView) == null ? void 0 : W.scrollX) || 0, d = parseFloat(i.marginTop) || 0, u = parseFloat(i.marginBottom) || 0, p = parseFloat(i.marginLeft) || 0, h = parseFloat(i.marginRight) || 0, f = parseFloat(i.paddingTop) || 0, m = parseFloat(i.paddingBottom) || 0, b = parseFloat(i.paddingLeft) || 0, y = parseFloat(i.paddingRight) || 0, x = e == null ? void 0 : e.getBoundingClientRect(), v = e && parseFloat(window.getComputedStyle(e).paddingLeft) || 0,
|
|
1862
|
-
let
|
|
1861
|
+
const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((W = o.defaultView) == null ? void 0 : W.scrollX) || 0, d = parseFloat(i.marginTop) || 0, u = parseFloat(i.marginBottom) || 0, p = parseFloat(i.marginLeft) || 0, h = parseFloat(i.marginRight) || 0, f = parseFloat(i.paddingTop) || 0, m = parseFloat(i.paddingBottom) || 0, b = parseFloat(i.paddingLeft) || 0, y = parseFloat(i.paddingRight) || 0, x = e == null ? void 0 : e.getBoundingClientRect(), v = e && parseFloat(window.getComputedStyle(e).paddingLeft) || 0, S = e && parseFloat(window.getComputedStyle(e).paddingRight) || 0, E = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, A = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, B = e ? Zl(e) : { maxHeight: 0 }, k = e ? bn(e) : "vertical", _ = e ? Gt(e) : [], w = ci(_, t, k);
|
|
1862
|
+
let T = 0, L = 0;
|
|
1863
1863
|
if (w.forEach((K) => {
|
|
1864
1864
|
const q = K.getBoundingClientRect();
|
|
1865
|
-
q.height >
|
|
1865
|
+
q.height > T && (T = q.height), q.width > L && (L = q.width);
|
|
1866
1866
|
}), n === "before")
|
|
1867
1867
|
if (r === "horizontal") {
|
|
1868
|
-
const K = x ? x.width - v -
|
|
1868
|
+
const K = x ? x.width - v - S : s.width, q = x ? x.left + c + v : s.left + c;
|
|
1869
1869
|
return {
|
|
1870
1870
|
top: s.top + l - d - 2,
|
|
1871
1871
|
left: q,
|
|
@@ -1873,7 +1873,7 @@ function em(t, e, n, r, o) {
|
|
|
1873
1873
|
height: 4
|
|
1874
1874
|
};
|
|
1875
1875
|
} else {
|
|
1876
|
-
const K = s.top + l, q =
|
|
1876
|
+
const K = s.top + l, q = k === "horizontal" && T > 0 ? T : B.maxHeight > 0 ? B.maxHeight : x ? x.height - E - A : s.height;
|
|
1877
1877
|
return {
|
|
1878
1878
|
top: K,
|
|
1879
1879
|
left: s.left + c - p - 2,
|
|
@@ -1883,7 +1883,7 @@ function em(t, e, n, r, o) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
else if (n === "after")
|
|
1885
1885
|
if (r === "horizontal") {
|
|
1886
|
-
const K = x ? x.width - v -
|
|
1886
|
+
const K = x ? x.width - v - S : s.width, q = x ? x.left + c + v : s.left + c;
|
|
1887
1887
|
return {
|
|
1888
1888
|
top: s.bottom + l + u - 2,
|
|
1889
1889
|
left: q,
|
|
@@ -1891,7 +1891,7 @@ function em(t, e, n, r, o) {
|
|
|
1891
1891
|
height: 4
|
|
1892
1892
|
};
|
|
1893
1893
|
} else {
|
|
1894
|
-
const K = s.top + l, q =
|
|
1894
|
+
const K = s.top + l, q = k === "horizontal" && T > 0 ? T : B.maxHeight > 0 ? B.maxHeight : x ? x.height - E - A : s.height;
|
|
1895
1895
|
return {
|
|
1896
1896
|
top: K,
|
|
1897
1897
|
left: s.right + c + h - 2,
|
|
@@ -2013,29 +2013,29 @@ const De = () => O(Ar), nm = () => {
|
|
|
2013
2013
|
const x = n.targetBlockId, v = n.targetParentId;
|
|
2014
2014
|
if (!x)
|
|
2015
2015
|
return;
|
|
2016
|
-
const { parentId:
|
|
2016
|
+
const { parentId: S, index: E, replaceImageUrl: A } = rm(
|
|
2017
2017
|
o,
|
|
2018
2018
|
x,
|
|
2019
2019
|
v,
|
|
2020
2020
|
n.position,
|
|
2021
2021
|
t
|
|
2022
|
-
),
|
|
2022
|
+
), B = t._id !== void 0;
|
|
2023
2023
|
if (A && Ql(t)) {
|
|
2024
|
-
m([x], { image:
|
|
2024
|
+
m([x], { image: N(t, "blocks.0.image") }), setTimeout(() => {
|
|
2025
2025
|
f(h + 1);
|
|
2026
2026
|
}, 50);
|
|
2027
2027
|
return;
|
|
2028
2028
|
}
|
|
2029
|
-
if (
|
|
2030
|
-
l([t._id],
|
|
2029
|
+
if (B)
|
|
2030
|
+
l([t._id], S === null ? void 0 : S, E), u(), d([]), c([t._id]);
|
|
2031
2031
|
else {
|
|
2032
|
-
const
|
|
2032
|
+
const k = t._type || t.type, _ = t != null && t.blocks ? tn(t == null ? void 0 : t.blocks) ? wo(t == null ? void 0 : t.blocks()) : t == null ? void 0 : t.blocks : null;
|
|
2033
2033
|
i(
|
|
2034
|
-
|
|
2035
|
-
blocks: [{ _type:
|
|
2036
|
-
} : (
|
|
2037
|
-
|
|
2038
|
-
|
|
2034
|
+
k === "PartialBlock" ? {
|
|
2035
|
+
blocks: [{ _type: k, _id: "partial-block", partialBlockId: t.partialBlockId }]
|
|
2036
|
+
} : (_ == null ? void 0 : _.length) > 0 ? { blocks: [..._] } : { type: k },
|
|
2037
|
+
S,
|
|
2038
|
+
E
|
|
2039
2039
|
);
|
|
2040
2040
|
}
|
|
2041
2041
|
setTimeout(() => {
|
|
@@ -2068,7 +2068,7 @@ const De = () => O(Ar), nm = () => {
|
|
|
2068
2068
|
function rm(t, e, n, r, o) {
|
|
2069
2069
|
var s, i;
|
|
2070
2070
|
try {
|
|
2071
|
-
if (e === n && ((s = o == null ? void 0 : o.blocks) == null ? void 0 : s.length) === 1 &&
|
|
2071
|
+
if (e === n && ((s = o == null ? void 0 : o.blocks) == null ? void 0 : s.length) === 1 && N(o, "blocks.0._type") === "Image" && ((i = ne(t, { _id: e })) == null ? void 0 : i._type) === "Image")
|
|
2072
2072
|
return { parentId: "", index: -1, replaceImageUrl: !0 };
|
|
2073
2073
|
if (e === "canvas" || r === "inside" && e === "canvas")
|
|
2074
2074
|
return {
|
|
@@ -2165,23 +2165,23 @@ const im = [
|
|
|
2165
2165
|
const h = i.defaultView, f = h.innerHeight, m = h.scrollY, b = i.documentElement.scrollHeight;
|
|
2166
2166
|
c.current = p;
|
|
2167
2167
|
const y = p, x = f - p;
|
|
2168
|
-
let v = !1,
|
|
2169
|
-
if (y < Vt.EDGE_ZONE && m > 0 ? (v = !0,
|
|
2168
|
+
let v = !1, S = null, E = 0;
|
|
2169
|
+
if (y < Vt.EDGE_ZONE && m > 0 ? (v = !0, S = "up", E = y) : x < Vt.EDGE_ZONE && m + f < b && (v = !0, S = "down", E = x), !v && l.current !== null) {
|
|
2170
2170
|
cancelAnimationFrame(l.current), l.current = null;
|
|
2171
2171
|
return;
|
|
2172
2172
|
}
|
|
2173
|
-
if (v &&
|
|
2174
|
-
const A = 1 -
|
|
2173
|
+
if (v && S) {
|
|
2174
|
+
const A = 1 - E / Vt.EDGE_ZONE, B = Vt.MIN_SCROLL_SPEED + (Vt.MAX_SCROLL_SPEED - Vt.MIN_SCROLL_SPEED) * A, k = () => {
|
|
2175
2175
|
if (!In || !h) {
|
|
2176
2176
|
l.current = null;
|
|
2177
2177
|
return;
|
|
2178
2178
|
}
|
|
2179
|
-
const
|
|
2180
|
-
h.scrollBy(0,
|
|
2181
|
-
const w = h.scrollY,
|
|
2182
|
-
|
|
2179
|
+
const _ = S === "up" ? -B : B;
|
|
2180
|
+
h.scrollBy(0, _);
|
|
2181
|
+
const w = h.scrollY, T = w > 0, L = w + f < b, I = c.current, W = f - c.current;
|
|
2182
|
+
S === "up" && T && I < Vt.EDGE_ZONE || S === "down" && L && W < Vt.EDGE_ZONE ? l.current = requestAnimationFrame(k) : l.current = null;
|
|
2183
2183
|
};
|
|
2184
|
-
l.current === null && (l.current = requestAnimationFrame(
|
|
2184
|
+
l.current === null && (l.current = requestAnimationFrame(k));
|
|
2185
2185
|
}
|
|
2186
2186
|
},
|
|
2187
2187
|
[i]
|
|
@@ -2205,59 +2205,59 @@ const im = [
|
|
|
2205
2205
|
const x = t._type || t.type;
|
|
2206
2206
|
if (!x)
|
|
2207
2207
|
return;
|
|
2208
|
-
const v = p.clientX,
|
|
2209
|
-
if (d(
|
|
2210
|
-
const
|
|
2211
|
-
if (!
|
|
2208
|
+
const v = p.clientX, S = p.clientY;
|
|
2209
|
+
if (d(S), !i) return;
|
|
2210
|
+
const E = Zh(f, v, S, x, i);
|
|
2211
|
+
if (!E)
|
|
2212
2212
|
return;
|
|
2213
2213
|
const A = f.getAttribute("data-block-type") || "Box";
|
|
2214
|
-
let
|
|
2215
|
-
const
|
|
2214
|
+
let B = !1;
|
|
2215
|
+
const k = im.includes(A);
|
|
2216
2216
|
if (A === "Image" && x === "Image" && Ql(t)) {
|
|
2217
2217
|
o(m), n({
|
|
2218
2218
|
isVisible: !0,
|
|
2219
2219
|
isValid: !0,
|
|
2220
|
-
position:
|
|
2221
|
-
placeholderOrientation:
|
|
2220
|
+
position: E.position,
|
|
2221
|
+
placeholderOrientation: E.placeholderOrientation,
|
|
2222
2222
|
isEmpty: !0,
|
|
2223
2223
|
top: f.offsetTop,
|
|
2224
|
-
left:
|
|
2224
|
+
left: E.rect.left,
|
|
2225
2225
|
width: f.clientWidth,
|
|
2226
2226
|
height: f.clientHeight,
|
|
2227
|
-
targetBlockId:
|
|
2228
|
-
targetParentId:
|
|
2227
|
+
targetBlockId: E.targetBlockId,
|
|
2228
|
+
targetParentId: E.targetBlockId
|
|
2229
2229
|
});
|
|
2230
2230
|
return;
|
|
2231
2231
|
}
|
|
2232
|
-
if (
|
|
2233
|
-
if (
|
|
2232
|
+
if (E.position === "inside") {
|
|
2233
|
+
if (k || y && !tc(y, m, s))
|
|
2234
2234
|
return;
|
|
2235
|
-
|
|
2235
|
+
B = gt(A, x);
|
|
2236
2236
|
} else {
|
|
2237
|
-
let w = f.parentElement,
|
|
2237
|
+
let w = f.parentElement, T = "Box";
|
|
2238
2238
|
for (; w && !w.hasAttribute("data-block-id"); )
|
|
2239
2239
|
w = w.parentElement;
|
|
2240
|
-
if (w && (
|
|
2240
|
+
if (w && (T = w.getAttribute("data-block-type") || "Box"), y && !sm(y, m, s))
|
|
2241
2241
|
return;
|
|
2242
|
-
|
|
2242
|
+
B = gt(T, x);
|
|
2243
2243
|
}
|
|
2244
|
-
if (!
|
|
2244
|
+
if (!B)
|
|
2245
2245
|
return;
|
|
2246
|
-
o(
|
|
2247
|
-
const
|
|
2246
|
+
o(E.targetParentId);
|
|
2247
|
+
const _ = E.targetParentId || b || void 0;
|
|
2248
2248
|
n({
|
|
2249
2249
|
isVisible: !0,
|
|
2250
2250
|
isValid: !0,
|
|
2251
|
-
position:
|
|
2252
|
-
placeholderOrientation:
|
|
2253
|
-
isEmpty:
|
|
2254
|
-
top:
|
|
2255
|
-
left:
|
|
2256
|
-
width:
|
|
2257
|
-
height:
|
|
2258
|
-
targetBlockId:
|
|
2259
|
-
targetParentId:
|
|
2260
|
-
}), cm(i),
|
|
2251
|
+
position: E.position,
|
|
2252
|
+
placeholderOrientation: E.placeholderOrientation,
|
|
2253
|
+
isEmpty: E.isEmpty ?? !1,
|
|
2254
|
+
top: E.rect.top,
|
|
2255
|
+
left: E.rect.left,
|
|
2256
|
+
width: E.rect.width,
|
|
2257
|
+
height: E.rect.height,
|
|
2258
|
+
targetBlockId: E.targetBlockId,
|
|
2259
|
+
targetParentId: _
|
|
2260
|
+
}), cm(i), E.targetElement.setAttribute("data-drop-target", "true");
|
|
2261
2261
|
}, 300),
|
|
2262
2262
|
[i, t, n, r, o, s, d]
|
|
2263
2263
|
);
|
|
@@ -2394,7 +2394,7 @@ const oc = Q.createContext({ document: nc, window: rc }), St = () => Q.useContex
|
|
|
2394
2394
|
return "VERTICAL";
|
|
2395
2395
|
}
|
|
2396
2396
|
}, sc = (t, e, n) => !!(t && (n === "UP" || n === "LEFT") || e && (n === "DOWN" || n === "RIGHT")), gm = (t, e) => {
|
|
2397
|
-
const [n] = fe(), { document: r } = St(), { moveBlocks: o } = ze(), s =
|
|
2397
|
+
const [n] = fe(), { document: r } = St(), { moveBlocks: o } = ze(), s = N(t, "_id"), i = N(t, "_parent"), l = ee(n, (m) => i ? N(m, "_parent") === i : !N(m, "_parent")), c = (l == null ? void 0 : l.length) <= 1, d = sr(l, { _id: s }), u = d <= 0, p = d + 1 === (l == null ? void 0 : l.length), h = mm(i, s, r), f = R(
|
|
2398
2398
|
(m) => {
|
|
2399
2399
|
sc(u, p, m) || c || (m === "UP" || m === "LEFT" ? o([s], i || void 0, d - 1) : (m === "DOWN" || m === "RIGHT") && o([s], i || void 0, d + 2), e());
|
|
2400
2400
|
},
|
|
@@ -2434,7 +2434,7 @@ const oc = Q.createContext({ document: nc, window: rc }), St = () => Q.useContex
|
|
|
2434
2434
|
t,
|
|
2435
2435
|
(h) => Vn(o) ? h._parent === o : !h._parent
|
|
2436
2436
|
).indexOf(l) + 1, p = fs(t, i, o);
|
|
2437
|
-
n(p, o ?? void 0, u), s.push(
|
|
2437
|
+
n(p, o ?? void 0, u), s.push(N(p, "0._id", ""));
|
|
2438
2438
|
}), e(s);
|
|
2439
2439
|
},
|
|
2440
2440
|
[t, e]
|
|
@@ -2604,9 +2604,9 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
|
|
|
2604
2604
|
}),
|
|
2605
2605
|
Bf({
|
|
2606
2606
|
boundary: u == null ? void 0 : u.body,
|
|
2607
|
-
apply({ availableWidth:
|
|
2608
|
-
Object.assign(
|
|
2609
|
-
maxWidth: `${Math.max(200,
|
|
2607
|
+
apply({ availableWidth: E, availableHeight: A, elements: B }) {
|
|
2608
|
+
Object.assign(B.floating.style, {
|
|
2609
|
+
maxWidth: `${Math.max(200, E)}px`,
|
|
2610
2610
|
maxHeight: `${Math.max(100, A)}px`
|
|
2611
2611
|
});
|
|
2612
2612
|
}
|
|
@@ -2615,16 +2615,16 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
|
|
|
2615
2615
|
elements: { reference: n }
|
|
2616
2616
|
});
|
|
2617
2617
|
ds(n, () => y(), n !== null), ds(u == null ? void 0 : u.body, () => y(), (u == null ? void 0 : u.body) !== null);
|
|
2618
|
-
const x =
|
|
2618
|
+
const x = N(t, "_parent", null), v = $(N(t, "_name", "")) ? N(t, "_type", "") : N(t, "_name", "");
|
|
2619
2619
|
H(() => {
|
|
2620
|
-
let
|
|
2621
|
-
return n ? (
|
|
2622
|
-
|
|
2620
|
+
let E = null;
|
|
2621
|
+
return n ? (E = setTimeout(() => y(), 500), () => {
|
|
2622
|
+
E && clearTimeout(E);
|
|
2623
2623
|
}) : (y(), () => {
|
|
2624
|
-
|
|
2624
|
+
E && clearTimeout(E);
|
|
2625
2625
|
});
|
|
2626
2626
|
}, [n, t == null ? void 0 : t._id]);
|
|
2627
|
-
const [,
|
|
2627
|
+
const [, S] = ui();
|
|
2628
2628
|
return !e && (!n || !t || d) ? null : /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a(
|
|
2629
2629
|
"div",
|
|
2630
2630
|
{
|
|
@@ -2632,13 +2632,13 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
|
|
|
2632
2632
|
tabIndex: 0,
|
|
2633
2633
|
ref: b.setFloating,
|
|
2634
2634
|
style: m,
|
|
2635
|
-
onClick: (
|
|
2636
|
-
|
|
2635
|
+
onClick: (E) => {
|
|
2636
|
+
E.stopPropagation(), E.preventDefault();
|
|
2637
2637
|
},
|
|
2638
|
-
onMouseEnter: (
|
|
2639
|
-
|
|
2638
|
+
onMouseEnter: (E) => {
|
|
2639
|
+
E.stopPropagation(), i(null);
|
|
2640
2640
|
},
|
|
2641
|
-
onKeyDown: (
|
|
2641
|
+
onKeyDown: (E) => E.stopPropagation(),
|
|
2642
2642
|
className: `isolate z-[999] flex h-6 items-center justify-between bg-blue-500 py-2 text-xs text-white ${e ? "opacity-0" : ""}`,
|
|
2643
2643
|
children: /* @__PURE__ */ g(Z, { children: [
|
|
2644
2644
|
/* @__PURE__ */ g("div", { className: "flex items-center", children: [
|
|
@@ -2660,7 +2660,7 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
|
|
|
2660
2660
|
{
|
|
2661
2661
|
className: "h-4 w-4 rounded hover:bg-white hover:text-blue-500",
|
|
2662
2662
|
onClick: () => {
|
|
2663
|
-
|
|
2663
|
+
S("chai-chat-panel"), ge.publish(oe.OPEN_AI_PANEL);
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
2666
2666
|
),
|
|
@@ -2672,14 +2672,14 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
|
|
|
2672
2672
|
}
|
|
2673
2673
|
),
|
|
2674
2674
|
!p && /* @__PURE__ */ a(Rh, { block: t, children: /* @__PURE__ */ a(Xe, { className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500" }) }),
|
|
2675
|
-
js(
|
|
2675
|
+
js(N(t, "_type", "")) && c(me.ADD_BLOCK) ? /* @__PURE__ */ a(
|
|
2676
2676
|
Rs,
|
|
2677
2677
|
{
|
|
2678
2678
|
className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
|
|
2679
2679
|
onClick: () => o([t == null ? void 0 : t._id])
|
|
2680
2680
|
}
|
|
2681
2681
|
) : null,
|
|
2682
|
-
Ws(
|
|
2682
|
+
Ws(N(t, "_type", "")) && c(me.DELETE_BLOCK) ? /* @__PURE__ */ a(
|
|
2683
2683
|
Qa,
|
|
2684
2684
|
{
|
|
2685
2685
|
className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
|
|
@@ -2897,13 +2897,13 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
2897
2897
|
);
|
|
2898
2898
|
return [t, r];
|
|
2899
2899
|
}, mc = P({}), Om = P({}), fi = () => {
|
|
2900
|
-
const [t, e] = O(mc), n = R((o) =>
|
|
2900
|
+
const [t, e] = O(mc), n = R((o) => N(t, o, []), [t]), r = R(() => e({}), [e]);
|
|
2901
2901
|
return { getPartailBlocks: n, reset: r };
|
|
2902
2902
|
}, Dm = () => {
|
|
2903
|
-
const [t] = fe(), [e, n] = O(mc), [r, o] = O(Om), s = G("getPartialBlockBlocks", async (l) => []), i = M(() => t.filter((l) => l._type === "PartialBlock" || l._type === "GlobalBlock").map((l) =>
|
|
2903
|
+
const [t] = fe(), [e, n] = O(mc), [r, o] = O(Om), s = G("getPartialBlockBlocks", async (l) => []), i = M(() => t.filter((l) => l._type === "PartialBlock" || l._type === "GlobalBlock").map((l) => N(l, "partialBlockId", N(l, "globalBlock", ""))), [t]);
|
|
2904
2904
|
H(() => {
|
|
2905
2905
|
yr(i, (l) => {
|
|
2906
|
-
pe(e, l) ||
|
|
2906
|
+
pe(e, l) || N(r, `${l}.loading`, !1) || (o((c) => ({ ...c, [l]: { loading: !0, error: null } })), s(l).then((c) => {
|
|
2907
2907
|
n((d) => ({ ...d, [l]: c })), o((d) => ({
|
|
2908
2908
|
...d,
|
|
2909
2909
|
[l]: { loading: !1, error: null }
|
|
@@ -3112,7 +3112,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
3112
3112
|
), xt(
|
|
3113
3113
|
"del, backspace",
|
|
3114
3114
|
(f) => {
|
|
3115
|
-
f.preventDefault(), Ws(
|
|
3115
|
+
f.preventDefault(), Ws(N(r, "_type", "")) && o(e);
|
|
3116
3116
|
},
|
|
3117
3117
|
h,
|
|
3118
3118
|
[e, o]
|
|
@@ -3143,8 +3143,8 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
3143
3143
|
/* @__PURE__ */ a("br", {})
|
|
3144
3144
|
] }) : null;
|
|
3145
3145
|
}, vc = ({ theme: t }) => {
|
|
3146
|
-
const e = M(() => Kp(t), [t]);
|
|
3147
|
-
return /* @__PURE__ */ a("style", { id: "chai-theme",
|
|
3146
|
+
const e = M(() => Kp({ theme: t, fontVariables: !0 }), [t]);
|
|
3147
|
+
return /* @__PURE__ */ a("style", { id: "chai-theme", dangerouslySetInnerHTML: { __html: e } });
|
|
3148
3148
|
}, wc = Qe("darkMode", !1), Tr = () => {
|
|
3149
3149
|
const [t, e] = O(wc);
|
|
3150
3150
|
return [t, e];
|
|
@@ -3193,20 +3193,20 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
3193
3193
|
/* @__PURE__ */ a(jm, {})
|
|
3194
3194
|
] });
|
|
3195
3195
|
}, jm = () => {
|
|
3196
|
-
const [t] = De(), [e] = re(), n = M(() => `${
|
|
3196
|
+
const [t] = De(), [e] = re(), n = M(() => `${C(t, ({ id: r }) => `[data-style-id="${r}"]`).join(",")}{
|
|
3197
3197
|
outline: 1px solid ${e.length > 0 ? "#42a1fc" : "#de8f09"} !important; outline-offset: -1px;
|
|
3198
3198
|
}`, [t, e]);
|
|
3199
3199
|
return /* @__PURE__ */ a("style", { id: "selected-styling-blocks", dangerouslySetInnerHTML: { __html: n } });
|
|
3200
3200
|
}, Wm = () => {
|
|
3201
|
-
const [t] = re(), e = M(() => `${
|
|
3201
|
+
const [t] = re(), e = M(() => `${C(t, (n) => `[data-block-id="${n}"]`).join(",")}{
|
|
3202
3202
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
3203
3203
|
}`, [t]);
|
|
3204
3204
|
return /* @__PURE__ */ a("style", { id: "selected-blocks", dangerouslySetInnerHTML: { __html: e } });
|
|
3205
3205
|
}, Gm = () => {
|
|
3206
3206
|
const [t] = Eo(), e = El(), n = M(() => {
|
|
3207
3207
|
const { heading: s, body: i } = {
|
|
3208
|
-
heading:
|
|
3209
|
-
body:
|
|
3208
|
+
heading: N(t, "fontFamily.heading"),
|
|
3209
|
+
body: N(t, "fontFamily.body")
|
|
3210
3210
|
};
|
|
3211
3211
|
return e.filter((l) => l.family === s || l.family === i);
|
|
3212
3212
|
}, [t == null ? void 0 : t.fontFamily, e]), r = M(
|
|
@@ -3286,7 +3286,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
3286
3286
|
for (; l; )
|
|
3287
3287
|
i.push(l), l = ne(t, { _id: l._parent });
|
|
3288
3288
|
const c = ne(i, { _type: s.block });
|
|
3289
|
-
return c && (r[o] =
|
|
3289
|
+
return c && (r[o] = N(c, N(s, "prop"), null)), r;
|
|
3290
3290
|
},
|
|
3291
3291
|
{}
|
|
3292
3292
|
),
|
|
@@ -3296,7 +3296,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
|
|
|
3296
3296
|
const [t, e] = O(Ym);
|
|
3297
3297
|
return { mode: t, setMode: e };
|
|
3298
3298
|
}, Xm = ({ children: t, block: e }) => {
|
|
3299
|
-
const n = M(() => Oe(e._type), [e._type]), r =
|
|
3299
|
+
const n = M(() => Oe(e._type), [e._type]), r = N(n, "dataProviderDependencies"), o = N(n, "dataProvider"), s = N(n, "dataProviderMode", "mock"), i = Zf(e, s, r, o);
|
|
3300
3300
|
return t(i);
|
|
3301
3301
|
}, qm = () => /* @__PURE__ */ a("div", { className: "flex min-h-[100px] items-center justify-center bg-red-50 p-2 text-center text-red-500", children: "Something went wrong." });
|
|
3302
3302
|
function Te(...t) {
|
|
@@ -3428,7 +3428,7 @@ const ms = ({
|
|
|
3428
3428
|
onRemoveHighlightColor: s,
|
|
3429
3429
|
onClose: i
|
|
3430
3430
|
}) => {
|
|
3431
|
-
const [l] = Tr(), [c] = O(Zm), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) =>
|
|
3431
|
+
const [l] = Tr(), [c] = O(Zm), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) => N(f, l ? "1" : "0")), [p, h] = F("TEXT");
|
|
3432
3432
|
return /* @__PURE__ */ g("div", { id: "rte-widget-color-picker", className: "px-1", children: [
|
|
3433
3433
|
/* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-between rounded-md border bg-muted", children: [
|
|
3434
3434
|
/* @__PURE__ */ a(
|
|
@@ -3469,11 +3469,11 @@ const ms = ({
|
|
|
3469
3469
|
)
|
|
3470
3470
|
] });
|
|
3471
3471
|
}, tg = ({ editor: t, from: e, menuRef: n }) => {
|
|
3472
|
-
var v,
|
|
3473
|
-
const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (
|
|
3474
|
-
A ? (i(
|
|
3475
|
-
}, m = (
|
|
3476
|
-
A ? (c(
|
|
3472
|
+
var v, S;
|
|
3473
|
+
const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (S = t == null ? void 0 : t.getAttributes("highlight")) == null ? void 0 : S.color, [s, i] = F(r || "#000000F2"), [l, c] = F(o || "#00000057"), [d, u] = Ji(s, 150), [p, h] = Ji(l, 150), f = (E, A) => {
|
|
3474
|
+
A ? (i(E), u(E)) : (t == null || t.chain().setColor(E).run(), i(E));
|
|
3475
|
+
}, m = (E, A) => {
|
|
3476
|
+
A ? (c(E), h(E)) : (t == null || t.chain().setHighlight({ color: E }).run(), c(E));
|
|
3477
3477
|
}, b = () => {
|
|
3478
3478
|
t == null || t.chain().unsetColor().run(), i("#000000F2");
|
|
3479
3479
|
}, y = () => {
|
|
@@ -3503,7 +3503,7 @@ const ms = ({
|
|
|
3503
3503
|
),
|
|
3504
3504
|
/* @__PURE__ */ a(ls, { className: "h-3 w-3 opacity-50" })
|
|
3505
3505
|
] }),
|
|
3506
|
-
content: (
|
|
3506
|
+
content: (E) => /* @__PURE__ */ a(
|
|
3507
3507
|
eg,
|
|
3508
3508
|
{
|
|
3509
3509
|
textColor: s,
|
|
@@ -3512,7 +3512,7 @@ const ms = ({
|
|
|
3512
3512
|
onChangeHighlightColor: m,
|
|
3513
3513
|
onRemoveTextColor: b,
|
|
3514
3514
|
onRemoveHighlightColor: y,
|
|
3515
|
-
onClose:
|
|
3515
|
+
onClose: E
|
|
3516
3516
|
}
|
|
3517
3517
|
)
|
|
3518
3518
|
}
|
|
@@ -8024,8 +8024,8 @@ function id(t, e, n, r) {
|
|
|
8024
8024
|
if (f.canReplace(f.childCount, f.childCount, b.content)) {
|
|
8025
8025
|
if (n) {
|
|
8026
8026
|
let x = z.empty;
|
|
8027
|
-
for (let
|
|
8028
|
-
x = z.from(m[
|
|
8027
|
+
for (let S = m.length - 1; S >= 0; S--)
|
|
8028
|
+
x = z.from(m[S].copy(x));
|
|
8029
8029
|
let v = t.tr.step(new Ze(e.pos - m.length, e.pos + s.nodeSize, e.pos + y, e.pos + s.nodeSize - y, new Y(x, m.length, 0), 0, !0));
|
|
8030
8030
|
n(v.scrollIntoView());
|
|
8031
8031
|
}
|
|
@@ -8849,9 +8849,9 @@ function ry(t, e, n = {}) {
|
|
|
8849
8849
|
t.doc.nodesBetween(f, m, (b, y) => {
|
|
8850
8850
|
if (!b.isText && !b.marks.length)
|
|
8851
8851
|
return;
|
|
8852
|
-
const x = Math.max(f, y), v = Math.min(m, y + b.nodeSize),
|
|
8853
|
-
i +=
|
|
8854
|
-
mark:
|
|
8852
|
+
const x = Math.max(f, y), v = Math.min(m, y + b.nodeSize), S = v - x;
|
|
8853
|
+
i += S, l.push(...b.marks.map((E) => ({
|
|
8854
|
+
mark: E,
|
|
8855
8855
|
from: x,
|
|
8856
8856
|
to: v
|
|
8857
8857
|
})));
|
|
@@ -9007,21 +9007,21 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
9007
9007
|
if (o) {
|
|
9008
9008
|
let x = z.empty;
|
|
9009
9009
|
const v = c.index(-1) ? 1 : c.index(-2) ? 2 : 3;
|
|
9010
|
-
for (let
|
|
9011
|
-
x = z.from(c.node(
|
|
9012
|
-
const
|
|
9010
|
+
for (let _ = c.depth - v; _ >= c.depth - 3; _ -= 1)
|
|
9011
|
+
x = z.from(c.node(_).copy(x));
|
|
9012
|
+
const S = c.indexAfter(-1) < c.node(-2).childCount ? 1 : c.indexAfter(-2) < c.node(-3).childCount ? 2 : 3, E = {
|
|
9013
9013
|
...Kr(h, c.node().type.name, c.node().attrs),
|
|
9014
9014
|
...e
|
|
9015
|
-
}, A = ((i = l.contentMatch.defaultType) === null || i === void 0 ? void 0 : i.createAndFill(
|
|
9015
|
+
}, A = ((i = l.contentMatch.defaultType) === null || i === void 0 ? void 0 : i.createAndFill(E)) || void 0;
|
|
9016
9016
|
x = x.append(z.from(l.createAndFill(null, A) || void 0));
|
|
9017
|
-
const
|
|
9018
|
-
n.replace(
|
|
9019
|
-
let
|
|
9020
|
-
n.doc.nodesBetween(
|
|
9021
|
-
if (
|
|
9017
|
+
const B = c.before(c.depth - (v - 1));
|
|
9018
|
+
n.replace(B, c.after(-S), new Y(x, 4 - v, 0));
|
|
9019
|
+
let k = -1;
|
|
9020
|
+
n.doc.nodesBetween(B, n.doc.content.size, (_, w) => {
|
|
9021
|
+
if (k > -1)
|
|
9022
9022
|
return !1;
|
|
9023
|
-
|
|
9024
|
-
}),
|
|
9023
|
+
_.isTextblock && _.content.size === 0 && (k = w + 1);
|
|
9024
|
+
}), k > -1 && n.setSelection(be.near(n.doc.resolve(k))), n.scrollIntoView();
|
|
9025
9025
|
}
|
|
9026
9026
|
return !0;
|
|
9027
9027
|
}
|
|
@@ -9040,10 +9040,10 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
9040
9040
|
if (!Pt(n.doc, c.pos, 2))
|
|
9041
9041
|
return !1;
|
|
9042
9042
|
if (o) {
|
|
9043
|
-
const { selection: x, storedMarks: v } = r, { splittableMarks:
|
|
9044
|
-
if (n.split(c.pos, 2, y).scrollIntoView(), !
|
|
9043
|
+
const { selection: x, storedMarks: v } = r, { splittableMarks: S } = s.extensionManager, E = v || x.$to.parentOffset && x.$from.marks();
|
|
9044
|
+
if (n.split(c.pos, 2, y).scrollIntoView(), !E || !o)
|
|
9045
9045
|
return !0;
|
|
9046
|
-
const A =
|
|
9046
|
+
const A = E.filter((B) => S.includes(B.type.name));
|
|
9047
9047
|
n.ensureMarks(A);
|
|
9048
9048
|
}
|
|
9049
9049
|
return !0;
|
|
@@ -9066,19 +9066,19 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
9066
9066
|
const o = t.doc.nodeAt(r);
|
|
9067
9067
|
return n.node.type === (o == null ? void 0 : o.type) && Nn(t.doc, r) && t.join(r), !0;
|
|
9068
9068
|
}, fy = (t, e, n, r = {}) => ({ editor: o, tr: s, state: i, dispatch: l, chain: c, commands: d, can: u }) => {
|
|
9069
|
-
const { extensions: p, splittableMarks: h } = o.extensionManager, f = Fe(t, i.schema), m = Fe(e, i.schema), { selection: b, storedMarks: y } = i, { $from: x, $to: v } = b,
|
|
9070
|
-
if (!
|
|
9069
|
+
const { extensions: p, splittableMarks: h } = o.extensionManager, f = Fe(t, i.schema), m = Fe(e, i.schema), { selection: b, storedMarks: y } = i, { $from: x, $to: v } = b, S = x.blockRange(v), E = y || b.$to.parentOffset && b.$from.marks();
|
|
9070
|
+
if (!S)
|
|
9071
9071
|
return !1;
|
|
9072
|
-
const A = Ei((
|
|
9073
|
-
if (
|
|
9072
|
+
const A = Ei((B) => Ca(B.type.name, p))(b);
|
|
9073
|
+
if (S.depth >= 1 && A && S.depth - A.depth <= 1) {
|
|
9074
9074
|
if (A.node.type === f)
|
|
9075
9075
|
return d.liftListItem(m);
|
|
9076
9076
|
if (Ca(A.node.type.name, p) && f.validContent(A.node.content) && l)
|
|
9077
9077
|
return c().command(() => (s.setNodeMarkup(A.pos, f), !0)).command(() => ts(s, f)).command(() => ns(s, f)).run();
|
|
9078
9078
|
}
|
|
9079
|
-
return !n || !
|
|
9080
|
-
const
|
|
9081
|
-
return s.ensureMarks(
|
|
9079
|
+
return !n || !E || !l ? c().command(() => u().wrapInList(f, r) ? !0 : d.clearNodes()).wrapInList(f, r).command(() => ts(s, f)).command(() => ns(s, f)).run() : c().command(() => {
|
|
9080
|
+
const B = u().wrapInList(f, r), k = E.filter((_) => h.includes(_.type.name));
|
|
9081
|
+
return s.ensureMarks(k), B ? !0 : d.clearNodes();
|
|
9082
9082
|
}).wrapInList(f, r).command(() => ts(s, f)).command(() => ns(s, f)).run();
|
|
9083
9083
|
}, hy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
9084
9084
|
const { extendEmptyMarkRange: s = !1 } = n, i = Yt(t, r.schema);
|
|
@@ -9143,8 +9143,8 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
9143
9143
|
...e
|
|
9144
9144
|
}), i && b.marks.length && b.marks.forEach((x) => {
|
|
9145
9145
|
if (i === x.type) {
|
|
9146
|
-
const v = Math.max(y, d),
|
|
9147
|
-
n.addMark(v,
|
|
9146
|
+
const v = Math.max(y, d), S = Math.min(y + b.nodeSize, u);
|
|
9147
|
+
n.addMark(v, S, i.create({
|
|
9148
9148
|
...x.attrs,
|
|
9149
9149
|
...e
|
|
9150
9150
|
}));
|
|
@@ -9517,8 +9517,8 @@ const _y = vn(
|
|
|
9517
9517
|
if (!s) return;
|
|
9518
9518
|
const p = u == null ? void 0 : u.relatedTarget, h = s.querySelector(".ProseMirror"), f = s.querySelector(".tippy-box"), m = s.querySelector("#chai-rich-text-menu-bar"), b = h == null ? void 0 : h.contains(p), y = f == null ? void 0 : f.contains(p), x = m == null ? void 0 : m.contains(p), v = window.document.getElementById("rte-widget-color-picker");
|
|
9519
9519
|
if (!b && !y && !x && !v) {
|
|
9520
|
-
const
|
|
9521
|
-
n(
|
|
9520
|
+
const S = (d == null ? void 0 : d.getHTML()) || "";
|
|
9521
|
+
n(S);
|
|
9522
9522
|
}
|
|
9523
9523
|
},
|
|
9524
9524
|
from: "canvas"
|
|
@@ -9621,45 +9621,45 @@ const _y = vn(
|
|
|
9621
9621
|
({ block: t, children: e }) => {
|
|
9622
9622
|
const n = "content", { document: r } = St(), { editingBlockId: o, editingItemIndex: s, setEditingBlockId: i, setEditingItemIndex: l } = Cn(), [c, d] = F(null), u = ie(null), { clearHighlight: p } = Nt(), h = Ft(), { selectedLang: f } = Ke(), [, m] = re(), b = ie(null), y = o, { blockContent: x, blockType: v } = M(() => {
|
|
9623
9623
|
var L;
|
|
9624
|
-
const
|
|
9625
|
-
let
|
|
9624
|
+
const k = t._type;
|
|
9625
|
+
let _ = t[n];
|
|
9626
9626
|
const w = Oe(t._type);
|
|
9627
|
-
return f && ((L = w == null ? void 0 : w.i18nProps) == null ? void 0 : L.includes(n)) && pe(t, `${n}-${f}`) && (
|
|
9628
|
-
}, [t, f]),
|
|
9629
|
-
(
|
|
9627
|
+
return f && ((L = w == null ? void 0 : w.i18nProps) == null ? void 0 : L.includes(n)) && pe(t, `${n}-${f}`) && (_ = N(t, `${n}-${f}`)), { blockContent: _, blockType: k };
|
|
9628
|
+
}, [t, f]), S = R(
|
|
9629
|
+
(k) => {
|
|
9630
9630
|
var w;
|
|
9631
|
-
const
|
|
9632
|
-
h([y], { [n]:
|
|
9631
|
+
const _ = k || ((w = u.current) == null ? void 0 : w.innerText);
|
|
9632
|
+
h([y], { [n]: _ }), d(null), i(""), l(-1), m([]), y && setTimeout(() => m([y]), 100);
|
|
9633
9633
|
},
|
|
9634
9634
|
[h, y, i, l, m]
|
|
9635
|
-
),
|
|
9636
|
-
(
|
|
9637
|
-
h([y], { [n]:
|
|
9635
|
+
), E = Ut(
|
|
9636
|
+
(k) => {
|
|
9637
|
+
h([y], { [n]: k });
|
|
9638
9638
|
},
|
|
9639
9639
|
[y, t, h, f],
|
|
9640
9640
|
1e3
|
|
9641
9641
|
), A = R(
|
|
9642
|
-
(
|
|
9643
|
-
|
|
9644
|
-
const
|
|
9645
|
-
b.current = null,
|
|
9642
|
+
(k) => {
|
|
9643
|
+
k.preventDefault(), y && (b.current = y), S(), setTimeout(() => {
|
|
9644
|
+
const _ = b.current;
|
|
9645
|
+
b.current = null, _ && m([_]);
|
|
9646
9646
|
}, 100);
|
|
9647
9647
|
},
|
|
9648
|
-
[y,
|
|
9648
|
+
[y, S, m]
|
|
9649
9649
|
);
|
|
9650
9650
|
H(() => {
|
|
9651
|
-
var
|
|
9651
|
+
var T;
|
|
9652
9652
|
if (!y || !r) return;
|
|
9653
|
-
const
|
|
9654
|
-
w && ((
|
|
9653
|
+
const k = `[data-block-id="${y}"]`, _ = s >= 0 ? `[data-block-index="${s}"]` : "", w = r.querySelector(`${k}${_}`);
|
|
9654
|
+
w && ((T = w == null ? void 0 : w.classList) == null || T.add("sr-only"), jp(() => d(w)));
|
|
9655
9655
|
}, [y, v, r, s]);
|
|
9656
|
-
const
|
|
9656
|
+
const B = M(() => c ? (p(), ["RichText", "Paragraph"].includes(v) ? /* @__PURE__ */ a(
|
|
9657
9657
|
_y,
|
|
9658
9658
|
{
|
|
9659
9659
|
blockContent: x,
|
|
9660
9660
|
editingElement: c,
|
|
9661
|
-
onChange:
|
|
9662
|
-
onClose:
|
|
9661
|
+
onChange: E,
|
|
9662
|
+
onClose: S,
|
|
9663
9663
|
onEscape: A
|
|
9664
9664
|
}
|
|
9665
9665
|
) : /* @__PURE__ */ a(
|
|
@@ -9668,13 +9668,13 @@ const _y = vn(
|
|
|
9668
9668
|
editorRef: u,
|
|
9669
9669
|
blockContent: x,
|
|
9670
9670
|
editingElement: c,
|
|
9671
|
-
onClose:
|
|
9672
|
-
onChange:
|
|
9671
|
+
onClose: S,
|
|
9672
|
+
onChange: E,
|
|
9673
9673
|
onEscape: A
|
|
9674
9674
|
}
|
|
9675
|
-
)) : null, [c, p, v, x,
|
|
9675
|
+
)) : null, [c, p, v, x, S, E, A]);
|
|
9676
9676
|
return /* @__PURE__ */ g(Z, { children: [
|
|
9677
|
-
|
|
9677
|
+
B,
|
|
9678
9678
|
e
|
|
9679
9679
|
] });
|
|
9680
9680
|
},
|
|
@@ -9707,7 +9707,7 @@ const _y = vn(
|
|
|
9707
9707
|
blockAtom: e,
|
|
9708
9708
|
children: n
|
|
9709
9709
|
}) => {
|
|
9710
|
-
const { editingBlockId: r, editingItemIndex: o } = Cn(), [s] = O(e), i = M(() => Oe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = Jm(), u = Cr(), [p] = O(ai), h =
|
|
9710
|
+
const { editingBlockId: r, editingItemIndex: o } = Cn(), [s] = O(e), i = M(() => Oe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = Jm(), u = Cr(), [p] = O(ai), h = N(i, "component", null), { index: f, key: m } = Wn(yd), { mode: b } = kc(), y = Ge(kr), x = yt(), v = b === "edit", S = Km(), E = M(
|
|
9711
9711
|
() => p ? vl(Yi(s, l, i), u, {
|
|
9712
9712
|
index: f,
|
|
9713
9713
|
key: m
|
|
@@ -9716,10 +9716,10 @@ const _y = vn(
|
|
|
9716
9716
|
), A = M(
|
|
9717
9717
|
() => Xi(s, !0, y),
|
|
9718
9718
|
[s, Xi, y]
|
|
9719
|
-
),
|
|
9719
|
+
), B = M(
|
|
9720
9720
|
() => d(s._id, qi(s._type)),
|
|
9721
9721
|
[s._id, s._type, d, qi]
|
|
9722
|
-
),
|
|
9722
|
+
), k = M(() => {
|
|
9723
9723
|
const W = {
|
|
9724
9724
|
"data-block-id": s._id,
|
|
9725
9725
|
"data-block-type": s._type,
|
|
@@ -9728,32 +9728,32 @@ const _y = vn(
|
|
|
9728
9728
|
return v && x ? {
|
|
9729
9729
|
...W,
|
|
9730
9730
|
draggable: !r,
|
|
9731
|
-
onMouseDown:
|
|
9732
|
-
onDragStart:
|
|
9733
|
-
onDragEnd:
|
|
9731
|
+
onMouseDown: S.onMouseDown,
|
|
9732
|
+
onDragStart: S.onDragStart,
|
|
9733
|
+
onDragEnd: S.onDragEnd
|
|
9734
9734
|
} : W;
|
|
9735
|
-
}, [s._id, s._type, f, v, x,
|
|
9735
|
+
}, [s._id, s._type, f, v, x, S, r]), _ = M(
|
|
9736
9736
|
() => ({
|
|
9737
|
-
blockProps:
|
|
9737
|
+
blockProps: k,
|
|
9738
9738
|
inBuilder: b === "edit",
|
|
9739
9739
|
lang: l || c,
|
|
9740
9740
|
pageData: u,
|
|
9741
|
-
...
|
|
9741
|
+
...E,
|
|
9742
9742
|
...A,
|
|
9743
|
-
...
|
|
9743
|
+
...B,
|
|
9744
9744
|
...t
|
|
9745
9745
|
}),
|
|
9746
|
-
[b,
|
|
9747
|
-
), w = M(() => !By.includes(s._type), [s._type]),
|
|
9748
|
-
if (Bs(h) || !
|
|
9746
|
+
[b, k, l, c, E, A, B, t]
|
|
9747
|
+
), w = M(() => !By.includes(s._type), [s._type]), T = M(() => N(s, "_show", !0), [s]);
|
|
9748
|
+
if (Bs(h) || !T) return null;
|
|
9749
9749
|
let L = /* @__PURE__ */ a(je, { children: fn(h, {
|
|
9750
|
-
...
|
|
9750
|
+
..._,
|
|
9751
9751
|
children: n({
|
|
9752
9752
|
_id: s._id,
|
|
9753
9753
|
_type: s._type,
|
|
9754
|
-
...Ts(
|
|
9755
|
-
repeaterItems: nf(
|
|
9756
|
-
$repeaterItemsKey:
|
|
9754
|
+
...Ts(E.repeaterItems) ? {
|
|
9755
|
+
repeaterItems: nf(E.repeaterItems, s),
|
|
9756
|
+
$repeaterItemsKey: E.$repeaterItemsKey
|
|
9757
9757
|
} : {},
|
|
9758
9758
|
...s.partialBlockId ? { partialBlockId: s.partialBlockId } : "",
|
|
9759
9759
|
...s.globalBlock ? { partialBlockId: s.globalBlock } : ""
|
|
@@ -9801,7 +9801,7 @@ const _y = vn(
|
|
|
9801
9801
|
(l) => ee(t, (c) => c._parent === l).length > 0,
|
|
9802
9802
|
[t]
|
|
9803
9803
|
);
|
|
9804
|
-
return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = tf(s)),
|
|
9804
|
+
return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = tf(s)), C(s, (l) => {
|
|
9805
9805
|
const c = o(l._id);
|
|
9806
9806
|
return c ? /* @__PURE__ */ a(Xm, { block: l, children: (d) => /* @__PURE__ */ a(Iy, { blockAtom: c, asyncProps: d, children: ({ _id: u, _type: p, partialBlockId: h, repeaterItems: f, $repeaterItemsKey: m }) => p === "Repeater" ? Ts(f) && f.map((b, y) => /* @__PURE__ */ a(yd.Provider, { value: { index: y, key: m }, children: /* @__PURE__ */ a(po, { splitAtoms: n, blocks: t, parent: l._id, type: p }) }, `${u}-${y}`)) : p === "GlobalBlock" || p === "PartialBlock" ? /* @__PURE__ */ a(Gp, { store: ft, children: /* @__PURE__ */ a(Ly, { partialBlockId: h }) }) : i(u) ? /* @__PURE__ */ a(po, { splitAtoms: n, blocks: t, parent: l._id, type: p }) : null }) }, l._id) : null;
|
|
9807
9807
|
});
|
|
@@ -9951,7 +9951,7 @@ const zy = () => {
|
|
|
9951
9951
|
/* @__PURE__ */ a("p", { className: "font-semibold", children: t("Oops! Something went wrong.") }),
|
|
9952
9952
|
/* @__PURE__ */ a("p", { children: t("Please try again.") })
|
|
9953
9953
|
] }) });
|
|
9954
|
-
}, Vy = P(null), kd = () => O(Vy), jy = Q.lazy(() => import("./code-editor-
|
|
9954
|
+
}, Vy = P(null), kd = () => O(Vy), jy = Q.lazy(() => import("./code-editor-wQWmwFKW.js")), Wy = () => {
|
|
9955
9955
|
const [t] = kd(), e = G("onError", kt);
|
|
9956
9956
|
return /* @__PURE__ */ a("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ g("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40", children: [
|
|
9957
9957
|
/* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a(Fn, { className: "h-full" }), children: /* @__PURE__ */ a(cn, { fallback: /* @__PURE__ */ a(dr, {}), onError: e, children: /* @__PURE__ */ a(Hy, {}) }) }),
|
|
@@ -10146,7 +10146,7 @@ const zy = () => {
|
|
|
10146
10146
|
za: "Zhuang, Chuang",
|
|
10147
10147
|
zu: "Zulu"
|
|
10148
10148
|
}, Gy = ({ id: t, placeholder: e }) => {
|
|
10149
|
-
const { t: n } = U(), [, r] = kd(), { selectedLang: o } = Ke(), s = de(), i = t.replace("root.", ""), l = Oe(s == null ? void 0 : s._type), d = Be(
|
|
10149
|
+
const { t: n } = U(), [, r] = kd(), { selectedLang: o } = Ke(), s = de(), i = t.replace("root.", ""), l = Oe(s == null ? void 0 : s._type), d = Be(N(l, "i18nProps", []), i) && o ? `${i}-${o}` : i, u = N(s, d, ""), p = M(() => N(Hn, o, o), [o]), h = () => {
|
|
10150
10150
|
const f = s == null ? void 0 : s._id;
|
|
10151
10151
|
r({ blockId: f, blockProp: d, placeholder: e, initialCode: u });
|
|
10152
10152
|
};
|
|
@@ -10169,12 +10169,12 @@ const zy = () => {
|
|
|
10169
10169
|
/* @__PURE__ */ a(te, { onClick: h, size: "sm", variant: "outline", className: "w-fit", children: n("Open code editor") })
|
|
10170
10170
|
] });
|
|
10171
10171
|
}, Uy = ({ id: t, value: e, onChange: n, onBlur: r }) => {
|
|
10172
|
-
const o = G("collections", []), s = de(), i =
|
|
10172
|
+
const o = G("collections", []), s = de(), i = N(s, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1").replace(Lt, ""), l = ne(o, { id: i }), d = N(l, t === "root.filter" ? "filters" : "sorts", []);
|
|
10173
10173
|
return /* @__PURE__ */ a("div", { children: /* @__PURE__ */ g("select", { value: e, onChange: (u) => n(u.target.value), onBlur: (u) => r(t, u.target.value), children: [
|
|
10174
10174
|
/* @__PURE__ */ a("option", { value: "", children: "Select" }),
|
|
10175
10175
|
d.map((u) => /* @__PURE__ */ a("option", { value: u.id, children: u.name }, u.id))
|
|
10176
10176
|
] }) });
|
|
10177
|
-
}, Ky = $s(() => import("./IconPicker-
|
|
10177
|
+
}, Ky = $s(() => import("./IconPicker-CcBoA1K0.js").then((t) => ({ default: t.IconPicker }))), Jy = (t) => {
|
|
10178
10178
|
try {
|
|
10179
10179
|
let e = t.replace(/<svg([^>]*)\sheight="[^"]*"([^>]*)>/gi, "<svg$1$2>").replace(/<svg([^>]*)\swidth="[^"]*"([^>]*)>/gi, "<svg$1$2>");
|
|
10180
10180
|
return e = e.replace(/>\s+</g, "><"), e = e.replace(/\n/g, "").replace(/\s{2,}/g, " "), e = e.replace(/\s+=/g, "=").replace(/=\s+/g, "="), e = e.replace(/<!--[\s\S]*?-->/g, ""), e.trim();
|
|
@@ -10287,19 +10287,19 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
10287
10287
|
const e = ((o = t.split("/").pop()) == null ? void 0 : o.split("?")[0]) || "";
|
|
10288
10288
|
return [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".bmp", ".ico", ".avif"].some((s) => e.toLowerCase().endsWith(s)) ? e : "";
|
|
10289
10289
|
}, tx = ({ value: t, onChange: e, id: n, onBlur: r, uiSchema: o }) => {
|
|
10290
|
-
const { t: s } = U(), { selectedLang: i } = Ke(), l = de(), c = Ft(), d = Cr(), u = (o == null ? void 0 : o["ui:allowEmpty"]) === !0, p = n.split(".").pop() || "", h = i ? `_${p}Id-${i}` : `_${p}Id`, f = $(i) && (l == null ? void 0 : l._type) === "Image" && pe(l, "assetId"), m =
|
|
10290
|
+
const { t: s } = U(), { selectedLang: i } = Ke(), l = de(), c = Ft(), d = Cr(), u = (o == null ? void 0 : o["ui:allowEmpty"]) === !0, p = n.split(".").pop() || "", h = i ? `_${p}Id-${i}` : `_${p}Id`, f = $(i) && (l == null ? void 0 : l._type) === "Image" && pe(l, "assetId"), m = N(l, h, f ? l == null ? void 0 : l.assetId : ""), b = M(() => {
|
|
10291
10291
|
if (!t || !l || !/\{\{.*?\}\}/.test(t)) return t;
|
|
10292
|
-
const A = { ...l, [p]: t },
|
|
10293
|
-
return
|
|
10294
|
-
}, [t, l, d, p]), y = !!m || b !== Vr && b !== "", x = (
|
|
10295
|
-
const A = Ts(
|
|
10292
|
+
const A = { ...l, [p]: t }, B = vl(A, d, { index: -1, key: "" });
|
|
10293
|
+
return N(B, p, t);
|
|
10294
|
+
}, [t, l, d, p]), y = !!m || b !== Vr && b !== "", x = (E) => {
|
|
10295
|
+
const A = Ts(E) ? Ce(E) : E;
|
|
10296
10296
|
if (A) {
|
|
10297
10297
|
e(A == null ? void 0 : A.url);
|
|
10298
|
-
const
|
|
10298
|
+
const B = A == null ? void 0 : A.width, k = A == null ? void 0 : A.height, _ = h.includes("mobile");
|
|
10299
10299
|
if (l != null && l._id) {
|
|
10300
10300
|
const w = {
|
|
10301
|
-
...
|
|
10302
|
-
...
|
|
10301
|
+
...B && { [_ ? "mobileWidth" : "width"]: B },
|
|
10302
|
+
...k && { [_ ? "mobileHeight" : "height"]: k },
|
|
10303
10303
|
...A.description && { alt: A.description }
|
|
10304
10304
|
};
|
|
10305
10305
|
if (We(w, h, A.id), $(w)) return;
|
|
@@ -10308,10 +10308,10 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
10308
10308
|
}
|
|
10309
10309
|
}, v = R(() => {
|
|
10310
10310
|
if (e(u ? "" : Vr), l != null && l._id) {
|
|
10311
|
-
const A = {},
|
|
10312
|
-
We(A, h, ""), We(A,
|
|
10311
|
+
const A = {}, B = h.includes("mobile");
|
|
10312
|
+
We(A, h, ""), We(A, B ? "mobileWidth" : "width", ""), We(A, B ? "mobileHeight" : "height", ""), c([l._id], A);
|
|
10313
10313
|
}
|
|
10314
|
-
}, [l, e, c, h, u]),
|
|
10314
|
+
}, [l, e, c, h, u]), S = ex(b);
|
|
10315
10315
|
return /* @__PURE__ */ g("div", { className: "mt-1.5 flex items-start gap-x-3", children: [
|
|
10316
10316
|
b ? /* @__PURE__ */ g("div", { className: "group relative", children: [
|
|
10317
10317
|
/* @__PURE__ */ a(
|
|
@@ -10342,7 +10342,7 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
10342
10342
|
] }) : /* @__PURE__ */ a(Jr, { onSelect: x, mode: "image", assetId: m, children: /* @__PURE__ */ a("div", { className: "h-14 w-14 cursor-pointer rounded-md border border-border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px]" }) }),
|
|
10343
10343
|
/* @__PURE__ */ g("div", { className: "flex w-3/5 flex-col", children: [
|
|
10344
10344
|
/* @__PURE__ */ g(Z, { children: [
|
|
10345
|
-
/* @__PURE__ */ a("p", { className: "max-w-[250px] truncate pr-2 text-xs text-gray-400", children:
|
|
10345
|
+
/* @__PURE__ */ a("p", { className: "max-w-[250px] truncate pr-2 text-xs text-gray-400", children: S }),
|
|
10346
10346
|
/* @__PURE__ */ a(Jr, { onSelect: x, assetId: "", children: /* @__PURE__ */ a("small", { className: "mb-1 h-6 w-full cursor-pointer rounded-md bg-secondary px-1 py-1 text-center text-xs text-secondary-foreground hover:bg-secondary/80", children: !$(b) && b !== Vr ? s("Replace image") : s("Choose image") }) }),
|
|
10347
10347
|
/* @__PURE__ */ a("div", { className: "text-center text-xs text-gray-400", children: "OR" })
|
|
10348
10348
|
] }),
|
|
@@ -10357,8 +10357,8 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
10357
10357
|
className: "h-6 text-xs",
|
|
10358
10358
|
placeholder: s("Enter image URL"),
|
|
10359
10359
|
value: t === Vr ? "" : t,
|
|
10360
|
-
onBlur: ({ target: { value:
|
|
10361
|
-
onChange: (
|
|
10360
|
+
onBlur: ({ target: { value: E } }) => r(n, E),
|
|
10361
|
+
onChange: (E) => e(E.target.value)
|
|
10362
10362
|
}
|
|
10363
10363
|
)
|
|
10364
10364
|
] })
|
|
@@ -10576,20 +10576,20 @@ const Rd = ({
|
|
|
10576
10576
|
}) => {
|
|
10577
10577
|
const o = Cr(), s = G("flags.dataBinding", !0), i = Jf(), l = de(), c = M(() => {
|
|
10578
10578
|
if (i.length === 1) return "";
|
|
10579
|
-
const p = i.find((m) => m._type === "Repeater"), f =
|
|
10579
|
+
const p = i.find((m) => m._type === "Repeater"), f = N(p, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1");
|
|
10580
10580
|
return `${ir}${Re(f, Lt) ? `${f}/${p == null ? void 0 : p._id}` : f}`;
|
|
10581
|
-
}, [i]), d = M(() => Ce(
|
|
10581
|
+
}, [i]), d = M(() => Ce(N(o, c.replace(ir, ""), [])), [c, o]), u = R(
|
|
10582
10582
|
(p, h) => {
|
|
10583
10583
|
if (p = $(c) ? p : p.replace(`${c}`, "$index"), h === "array" || h === "object") {
|
|
10584
10584
|
e(`{{${p}}}`, {}, n);
|
|
10585
10585
|
return;
|
|
10586
10586
|
}
|
|
10587
|
-
const f = (x) => /[.,!?;:]/.test(x), m = (x, v,
|
|
10588
|
-
let
|
|
10589
|
-
const
|
|
10590
|
-
return v > 0 && (
|
|
10591
|
-
text:
|
|
10592
|
-
prefixLength:
|
|
10587
|
+
const f = (x) => /[.,!?;:]/.test(x), m = (x, v, S) => {
|
|
10588
|
+
let E = "", A = "";
|
|
10589
|
+
const B = v > 0 ? x[v - 1] : "", k = v < x.length ? x[v] : "";
|
|
10590
|
+
return v > 0 && (B === "." || !f(B) && B !== " ") && (E = " "), v < x.length && !f(k) && k !== " " && (A = " "), {
|
|
10591
|
+
text: E + S + A,
|
|
10592
|
+
prefixLength: E.length,
|
|
10593
10593
|
suffixLength: A.length
|
|
10594
10594
|
};
|
|
10595
10595
|
}, b = document.getElementById(n);
|
|
@@ -10600,28 +10600,28 @@ const Rd = ({
|
|
|
10600
10600
|
if (x) {
|
|
10601
10601
|
const v = `{{${p}}}`;
|
|
10602
10602
|
x.commands.focus();
|
|
10603
|
-
const { from:
|
|
10604
|
-
if (
|
|
10603
|
+
const { from: S, to: E } = x.state.selection;
|
|
10604
|
+
if (S !== E)
|
|
10605
10605
|
x.chain().deleteSelection().insertContent(v).run();
|
|
10606
10606
|
else {
|
|
10607
|
-
const { state:
|
|
10608
|
-
let
|
|
10609
|
-
|
|
10607
|
+
const { state: B } = x, k = B.selection.from, _ = B.doc.textBetween(Math.max(0, k - 1), k), w = B.doc.textBetween(k, Math.min(k + 1, B.doc.content.size));
|
|
10608
|
+
let T = "";
|
|
10609
|
+
k > 0 && _ !== " " && !f(_) && (T = " ");
|
|
10610
10610
|
let L = "";
|
|
10611
|
-
w && w !== " " && !f(w) && (L = " "), x.chain().insertContent(
|
|
10611
|
+
w && w !== " " && !f(w) && (L = " "), x.chain().insertContent(T + v + L).run();
|
|
10612
10612
|
}
|
|
10613
10613
|
setTimeout(() => e(x.getHTML(), {}, n), 100);
|
|
10614
10614
|
return;
|
|
10615
10615
|
}
|
|
10616
10616
|
} else {
|
|
10617
|
-
const x = b, v = x.selectionStart || 0,
|
|
10618
|
-
if (
|
|
10619
|
-
const w = `{{${p}}}`, { text:
|
|
10617
|
+
const x = b, v = x.selectionStart || 0, S = x.value || "", E = x.selectionEnd || v;
|
|
10618
|
+
if (E > v) {
|
|
10619
|
+
const w = `{{${p}}}`, { text: T } = m(S, v, w), L = S.slice(0, v) + T + S.slice(E);
|
|
10620
10620
|
e(L, {}, n);
|
|
10621
10621
|
return;
|
|
10622
10622
|
}
|
|
10623
|
-
const
|
|
10624
|
-
e(
|
|
10623
|
+
const B = `{{${p}}}`, { text: k } = m(S, v, B), _ = S.slice(0, v) + k + S.slice(v);
|
|
10624
|
+
e(_, {}, n);
|
|
10625
10625
|
}
|
|
10626
10626
|
},
|
|
10627
10627
|
[n, e, r, l == null ? void 0 : l._id, c]
|
|
@@ -10641,14 +10641,14 @@ const Rd = ({
|
|
|
10641
10641
|
const { id: e, classNames: n, label: r, children: o, errors: s, help: i, hidden: l, required: c, schema: d, formData: u, onChange: p } = t, { selectedLang: h, fallbackLang: f, languages: m } = Ke(), b = M(
|
|
10642
10642
|
() => $(m) ? "" : $(h) ? f : h,
|
|
10643
10643
|
[m, h, f]
|
|
10644
|
-
), y = M(() =>
|
|
10645
|
-
() => S
|
|
10646
|
-
[
|
|
10647
|
-
), [A,
|
|
10644
|
+
), y = M(() => N(Hn, b, b), [b]), x = Cr(), v = de(), S = Fs(), E = M(
|
|
10645
|
+
() => N(S, [v == null ? void 0 : v._type, "i18nProps"], []),
|
|
10646
|
+
[S, v == null ? void 0 : v._type]
|
|
10647
|
+
), [A, B] = F(null);
|
|
10648
10648
|
if (l)
|
|
10649
10649
|
return null;
|
|
10650
10650
|
if (d.type === "boolean") return /* @__PURE__ */ a("div", { className: n, children: o });
|
|
10651
|
-
const
|
|
10651
|
+
const _ = E == null ? void 0 : E.includes(e.replace("root.", ""));
|
|
10652
10652
|
if (d.type === "array") {
|
|
10653
10653
|
const L = A === e;
|
|
10654
10654
|
return /* @__PURE__ */ g("div", { className: `${n} relative`, children: [
|
|
@@ -10656,7 +10656,7 @@ const Rd = ({
|
|
|
10656
10656
|
"label",
|
|
10657
10657
|
{
|
|
10658
10658
|
htmlFor: e,
|
|
10659
|
-
onClick: () =>
|
|
10659
|
+
onClick: () => B(L ? null : e),
|
|
10660
10660
|
className: "flex cursor-pointer items-center gap-x-1 py-1 leading-tight duration-200 hover:bg-slate-100",
|
|
10661
10661
|
children: [
|
|
10662
10662
|
L ? /* @__PURE__ */ a(xn, { className: "h-3 w-3" }) : /* @__PURE__ */ a(jn, { className: "h-3 w-3" }),
|
|
@@ -10685,14 +10685,14 @@ const Rd = ({
|
|
|
10685
10685
|
] })
|
|
10686
10686
|
] });
|
|
10687
10687
|
}
|
|
10688
|
-
const w = e.replace("root.", ""),
|
|
10688
|
+
const w = e.replace("root.", ""), T = E.includes(w) && !$(h) && $(u);
|
|
10689
10689
|
return /* @__PURE__ */ g("div", { className: n, children: [
|
|
10690
10690
|
d.title && /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
10691
10691
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
10692
10692
|
/* @__PURE__ */ g("label", { htmlFor: e, className: d.type === "object" ? "pb-2" : "", children: [
|
|
10693
10693
|
r,
|
|
10694
10694
|
" ",
|
|
10695
|
-
|
|
10695
|
+
_ && /* @__PURE__ */ g("small", { className: "text-[9px] text-zinc-400", children: [
|
|
10696
10696
|
" ",
|
|
10697
10697
|
y
|
|
10698
10698
|
] }),
|
|
@@ -10704,7 +10704,7 @@ const Rd = ({
|
|
|
10704
10704
|
] }) })
|
|
10705
10705
|
] }),
|
|
10706
10706
|
!d.enum && !d.oneOf && x && /* @__PURE__ */ g("span", { className: "flex items-center space-x-1", children: [
|
|
10707
|
-
|
|
10707
|
+
T ? /* @__PURE__ */ g(Ee, { children: [
|
|
10708
10708
|
/* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ g(
|
|
10709
10709
|
"svg",
|
|
10710
10710
|
{
|
|
@@ -10753,45 +10753,45 @@ const Rd = ({
|
|
|
10753
10753
|
pageTypes: e,
|
|
10754
10754
|
onChange: n
|
|
10755
10755
|
}) => {
|
|
10756
|
-
var
|
|
10757
|
-
const { t: r } = U(), o = G("searchPageTypeItems", (w,
|
|
10756
|
+
var _;
|
|
10757
|
+
const { t: r } = U(), o = G("searchPageTypeItems", (w, T) => []), [s, i] = F(!1), [l, c] = F(!1), [d, u] = F("page"), [p, h] = F(""), [f, m] = F([]), [b, y] = F(-1), x = ie(null), v = (_ = e == null ? void 0 : e.find((w) => w.key === d)) == null ? void 0 : _.name;
|
|
10758
10758
|
H(() => {
|
|
10759
10759
|
if (h(""), m([]), y(-1), c(!1), !t || s || !Re(t, "pageType:")) return;
|
|
10760
|
-
const w = zu(t, ":"),
|
|
10761
|
-
u(
|
|
10762
|
-
const L = await o(
|
|
10763
|
-
L && Array.isArray(L) && h(
|
|
10760
|
+
const w = zu(t, ":"), T = N(w, 1, "page") || "page";
|
|
10761
|
+
u(T), (async () => {
|
|
10762
|
+
const L = await o(T, [N(w, 2, "page")]);
|
|
10763
|
+
L && Array.isArray(L) && h(N(L, [0, "name"], ""));
|
|
10764
10764
|
})();
|
|
10765
10765
|
}, [t]);
|
|
10766
|
-
const
|
|
10766
|
+
const S = Ut(
|
|
10767
10767
|
async (w) => {
|
|
10768
10768
|
if ($(w))
|
|
10769
10769
|
m([]);
|
|
10770
10770
|
else {
|
|
10771
|
-
const
|
|
10772
|
-
m(
|
|
10771
|
+
const T = await o(d, w);
|
|
10772
|
+
m(T);
|
|
10773
10773
|
}
|
|
10774
10774
|
i(!1), y(-1);
|
|
10775
10775
|
},
|
|
10776
10776
|
[d],
|
|
10777
10777
|
300
|
|
10778
|
-
),
|
|
10779
|
-
const
|
|
10780
|
-
|
|
10778
|
+
), E = (w) => {
|
|
10779
|
+
const T = ["pageType", d, w.primaryPage ?? w.id];
|
|
10780
|
+
T[1] && (n(T.join(":")), h(w.name), c(!1), m([]), y(-1));
|
|
10781
10781
|
}, A = (w) => {
|
|
10782
10782
|
switch (w.key) {
|
|
10783
10783
|
case "ArrowDown":
|
|
10784
|
-
w.preventDefault(), y((
|
|
10784
|
+
w.preventDefault(), y((T) => T < f.length - 1 ? T + 1 : T);
|
|
10785
10785
|
break;
|
|
10786
10786
|
case "ArrowUp":
|
|
10787
|
-
w.preventDefault(), y((
|
|
10787
|
+
w.preventDefault(), y((T) => T > 0 ? T - 1 : T);
|
|
10788
10788
|
break;
|
|
10789
10789
|
case "Enter":
|
|
10790
10790
|
if (w.preventDefault(), f.length === 0) return;
|
|
10791
|
-
b >= 0 &&
|
|
10791
|
+
b >= 0 && E(f[b]);
|
|
10792
10792
|
break;
|
|
10793
10793
|
case "Escape":
|
|
10794
|
-
w.preventDefault(),
|
|
10794
|
+
w.preventDefault(), B();
|
|
10795
10795
|
break;
|
|
10796
10796
|
}
|
|
10797
10797
|
};
|
|
@@ -10801,26 +10801,26 @@ const Rd = ({
|
|
|
10801
10801
|
w == null || w.scrollIntoView({ block: "nearest" });
|
|
10802
10802
|
}
|
|
10803
10803
|
}, [b]);
|
|
10804
|
-
const
|
|
10804
|
+
const B = () => {
|
|
10805
10805
|
h(""), m([]), y(-1), c(!1), n("");
|
|
10806
|
-
},
|
|
10807
|
-
h(w), c(!$(w)), i(!0),
|
|
10806
|
+
}, k = (w) => {
|
|
10807
|
+
h(w), c(!$(w)), i(!0), S(w);
|
|
10808
10808
|
};
|
|
10809
10809
|
return /* @__PURE__ */ g("div", { children: [
|
|
10810
|
-
/* @__PURE__ */ a("select", { name: "pageType", value: d, onChange: (w) => u(w.target.value), children:
|
|
10810
|
+
/* @__PURE__ */ a("select", { name: "pageType", value: d, onChange: (w) => u(w.target.value), children: C(e, (w) => /* @__PURE__ */ a("option", { value: w.key, children: w.name }, w.key)) }),
|
|
10811
10811
|
d && /* @__PURE__ */ g("div", { className: "group relative mt-2 flex items-center", children: [
|
|
10812
10812
|
/* @__PURE__ */ a(
|
|
10813
10813
|
"input",
|
|
10814
10814
|
{
|
|
10815
10815
|
type: "text",
|
|
10816
10816
|
value: p,
|
|
10817
|
-
onChange: (w) =>
|
|
10817
|
+
onChange: (w) => k(w.target.value),
|
|
10818
10818
|
onKeyDown: A,
|
|
10819
10819
|
placeholder: r(`Search ${v ?? ""}`),
|
|
10820
10820
|
className: "w-full rounded-md border border-gray-300 p-2 pr-16"
|
|
10821
10821
|
}
|
|
10822
10822
|
),
|
|
10823
|
-
/* @__PURE__ */ a("div", { className: "absolute bottom-2 right-2 top-3 flex items-center gap-1.5", children: p && /* @__PURE__ */ a("button", { onClick:
|
|
10823
|
+
/* @__PURE__ */ a("div", { className: "absolute bottom-2 right-2 top-3 flex items-center gap-1.5", children: p && /* @__PURE__ */ a("button", { onClick: B, className: "text-gray-400 hover:text-gray-600", title: r("Clear search"), children: /* @__PURE__ */ a(qe, { className: "h-4 w-4" }) }) })
|
|
10824
10824
|
] }),
|
|
10825
10825
|
(s || !$(f) || l && $(f)) && /* @__PURE__ */ a("div", { className: "absolute z-40 mt-2 max-h-40 w-full max-w-[250px] overflow-y-auto rounded-md border border-border bg-background shadow-lg", children: s ? /* @__PURE__ */ g("div", { className: "space-y-1 p-2", children: [
|
|
10826
10826
|
/* @__PURE__ */ a("div", { className: "h-6 w-full animate-pulse rounded bg-gray-200" }),
|
|
@@ -10830,11 +10830,11 @@ const Rd = ({
|
|
|
10830
10830
|
' "',
|
|
10831
10831
|
p,
|
|
10832
10832
|
'"'
|
|
10833
|
-
] }) : /* @__PURE__ */ a("ul", { ref: x, children:
|
|
10833
|
+
] }) : /* @__PURE__ */ a("ul", { ref: x, children: C(f == null ? void 0 : f.slice(0, 20), (w, T) => /* @__PURE__ */ g(
|
|
10834
10834
|
"li",
|
|
10835
10835
|
{
|
|
10836
|
-
onClick: () =>
|
|
10837
|
-
className: `cursor-pointer p-2 text-xs ${t != null && t.includes(w.id) ? "bg-blue-200" :
|
|
10836
|
+
onClick: () => E(w),
|
|
10837
|
+
className: `cursor-pointer p-2 text-xs ${t != null && t.includes(w.id) ? "bg-blue-200" : T === b ? "bg-gray-100" : "hover:bg-gray-100"}`,
|
|
10838
10838
|
children: [
|
|
10839
10839
|
w.name,
|
|
10840
10840
|
" ",
|
|
@@ -10853,7 +10853,7 @@ const Rd = ({
|
|
|
10853
10853
|
const { t: o } = U(), { type: s = "pageType", href: i = "", target: l = "self" } = e ?? {}, c = G("pageTypes", []), { selectedLang: d, fallbackLang: u, languages: p } = Ke(), h = M(
|
|
10854
10854
|
() => $(p) ? "" : $(d) ? u : d,
|
|
10855
10855
|
[p, d, u]
|
|
10856
|
-
), f = M(() =>
|
|
10856
|
+
), f = M(() => N(Hn, h, h), [h]), m = s === "pageType" && $(c) ? "url" : s;
|
|
10857
10857
|
return /* @__PURE__ */ g("div", { children: [
|
|
10858
10858
|
/* @__PURE__ */ g("span", { className: "flex items-center justify-between gap-x-2 text-xs font-medium", children: [
|
|
10859
10859
|
/* @__PURE__ */ g("span", { children: [
|
|
@@ -10873,7 +10873,7 @@ const Rd = ({
|
|
|
10873
10873
|
)
|
|
10874
10874
|
] }),
|
|
10875
10875
|
/* @__PURE__ */ g("div", { className: "flex flex-col gap-y-1.5", children: [
|
|
10876
|
-
/* @__PURE__ */ a("select", { name: "type", value: s, onChange: (b) => n({ ...e, type: b.target.value }), children:
|
|
10876
|
+
/* @__PURE__ */ a("select", { name: "type", value: s, onChange: (b) => n({ ...e, type: b.target.value }), children: C(
|
|
10877
10877
|
[
|
|
10878
10878
|
...$(c) ? [] : [{ const: "pageType", title: o("Goto Page") }],
|
|
10879
10879
|
{ const: "url", title: o("Open URL") },
|
|
@@ -10989,7 +10989,7 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
10989
10989
|
]
|
|
10990
10990
|
}
|
|
10991
10991
|
) });
|
|
10992
|
-
}, dx = Q.lazy(() => import("./rte-widget-modal-
|
|
10992
|
+
}, dx = Q.lazy(() => import("./rte-widget-modal-Dj5BvA-1.js")), ux = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
|
|
10993
10993
|
const i = ie(null), [l, c] = F(!1), d = bd({
|
|
10994
10994
|
blockId: t,
|
|
10995
10995
|
value: r,
|
|
@@ -11031,23 +11031,23 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11031
11031
|
r(s);
|
|
11032
11032
|
}, [s]), n && n !== e ? /* @__PURE__ */ a(ux, { ...t, blockId: n }, n) : null;
|
|
11033
11033
|
}, fx = ({ formData: t, onChange: e }) => {
|
|
11034
|
-
const [n] = fe(), r = de(), o = Bi(), { addCoreBlock: s } = kn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) ||
|
|
11034
|
+
const [n] = fe(), r = de(), o = Bi(), { addCoreBlock: s } = kn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) || N(d, "0._id");
|
|
11035
11035
|
if (H(() => {
|
|
11036
11036
|
(r == null ? void 0 : r._type) === "Slide" && (t == null ? void 0 : t.currentSlide) !== (r == null ? void 0 : r._id) && e({ ...t, currentSlide: r == null ? void 0 : r._id });
|
|
11037
11037
|
}, [r]), H(() => {
|
|
11038
|
-
d != null && d.length && !ne(d, { _id: t == null ? void 0 : t.currentSlide }) && e({ ...t, currentSlide:
|
|
11038
|
+
d != null && d.length && !ne(d, { _id: t == null ? void 0 : t.currentSlide }) && e({ ...t, currentSlide: N(d, "0._id") });
|
|
11039
11039
|
}, [t, d]), !r && !o || !c) return null;
|
|
11040
11040
|
const p = () => {
|
|
11041
11041
|
const m = sr(d, { _id: u });
|
|
11042
11042
|
if (m > -1) {
|
|
11043
|
-
const b = (m + 1) % d.length, y =
|
|
11043
|
+
const b = (m + 1) % d.length, y = N(d, [b, "_id"]);
|
|
11044
11044
|
if (!y) return;
|
|
11045
11045
|
e({ ...t, currentSlide: y }), i([y]);
|
|
11046
11046
|
}
|
|
11047
11047
|
}, h = () => {
|
|
11048
11048
|
const m = sr(d, { _id: u });
|
|
11049
11049
|
if (m > -1) {
|
|
11050
|
-
const b = (m - 1 + d.length) % d.length, y =
|
|
11050
|
+
const b = (m - 1 + d.length) % d.length, y = N(d, [b, "_id"]);
|
|
11051
11051
|
if (!y) return;
|
|
11052
11052
|
e({ ...t, currentSlide: y }), i([y]);
|
|
11053
11053
|
}
|
|
@@ -11144,10 +11144,10 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11144
11144
|
] }) })
|
|
11145
11145
|
] });
|
|
11146
11146
|
}, hx = ({ formData: t, onChange: e }) => {
|
|
11147
|
-
const n =
|
|
11147
|
+
const n = N(t, "srcsets", []) || [], r = (i, l) => {
|
|
11148
11148
|
const c = i.target.name, d = i.target.value;
|
|
11149
11149
|
e({
|
|
11150
|
-
srcsets:
|
|
11150
|
+
srcsets: C(n, (u, p) => p === l ? { ...u, [c]: d } : u)
|
|
11151
11151
|
});
|
|
11152
11152
|
}, o = () => {
|
|
11153
11153
|
e({ srcsets: [...n, {}] });
|
|
@@ -11167,7 +11167,7 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11167
11167
|
}
|
|
11168
11168
|
)
|
|
11169
11169
|
] }),
|
|
11170
|
-
/* @__PURE__ */ a("div", { className: "space-y-2", children: n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded border border-dashed border-gray-200 p-2 text-xs italic text-gray-500", children: "Add additional sources to create responsive videos" }) :
|
|
11170
|
+
/* @__PURE__ */ a("div", { className: "space-y-2", children: n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded border border-dashed border-gray-200 p-2 text-xs italic text-gray-500", children: "Add additional sources to create responsive videos" }) : C(n, (i, l) => /* @__PURE__ */ g("div", { className: "group relative space-y-1.5 rounded border border-gray-200 px-2 pb-1.5", children: [
|
|
11171
11171
|
/* @__PURE__ */ a(
|
|
11172
11172
|
"button",
|
|
11173
11173
|
{
|
|
@@ -11185,7 +11185,7 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11185
11185
|
name: "width",
|
|
11186
11186
|
placeholder: "Enter width (in px)",
|
|
11187
11187
|
type: "number",
|
|
11188
|
-
value:
|
|
11188
|
+
value: N(i, "width"),
|
|
11189
11189
|
onChange: (c) => r(c, l),
|
|
11190
11190
|
className: "!placeholder:text-gray-100 !mt-0 !rounded-none !border-0 !p-0 !text-xs"
|
|
11191
11191
|
}
|
|
@@ -11199,7 +11199,7 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11199
11199
|
name: "url",
|
|
11200
11200
|
placeholder: "Enter url",
|
|
11201
11201
|
className: "!mt-0 !rounded-none !border-0 !p-0 !text-xs !shadow-none",
|
|
11202
|
-
value:
|
|
11202
|
+
value: N(i, "url", ""),
|
|
11203
11203
|
onChange: (c) => r(c, l)
|
|
11204
11204
|
}
|
|
11205
11205
|
)
|
|
@@ -11213,7 +11213,7 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11213
11213
|
] }) }), Sa = vn(({ blockId: t, schema: e, uiSchema: n, formData: r, onChange: o }) => {
|
|
11214
11214
|
const { selectedLang: s } = Ke(), i = Wo("widget"), l = Wo("field"), c = Wo("template"), d = mn(
|
|
11215
11215
|
async ({ formData: u }, p) => {
|
|
11216
|
-
|
|
11216
|
+
N(u, p) === void 0 && We(u, p, ""), o({ formData: u }, p);
|
|
11217
11217
|
},
|
|
11218
11218
|
[o, s],
|
|
11219
11219
|
400
|
|
@@ -11265,40 +11265,40 @@ const Bi = () => Ge(Ld), cx = () => {
|
|
|
11265
11265
|
}), Ea = (t, e, n) => {
|
|
11266
11266
|
const r = qr(t);
|
|
11267
11267
|
return yr(Ct(t), (o) => {
|
|
11268
|
-
Be(
|
|
11268
|
+
Be(N(n, "i18nProps", []), o) && !$(e) && (r[o] = N(t, `${o}-${e}`));
|
|
11269
11269
|
}), r;
|
|
11270
11270
|
};
|
|
11271
11271
|
function _a() {
|
|
11272
|
-
const { selectedLang: t } = Ke(), e = de(), n = Hl(), r = Ft(), o = Oe(e == null ? void 0 : e._type), s = Ea(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Bi(), p = Oe(u == null ? void 0 : u._type), h = Ea(u, t, p), f = ({ formData: A },
|
|
11273
|
-
|
|
11272
|
+
const { selectedLang: t } = Ke(), e = de(), n = Hl(), r = Ft(), o = Oe(e == null ? void 0 : e._type), s = Ea(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Bi(), p = Oe(u == null ? void 0 : u._type), h = Ea(u, t, p), f = ({ formData: A }, B, k) => {
|
|
11273
|
+
B && (i == null ? void 0 : i._id) === e._id && r([e._id], { [B]: N(A, B) }, k);
|
|
11274
11274
|
}, m = R(
|
|
11275
|
-
Is(({ formData: A },
|
|
11276
|
-
f({ formData: A },
|
|
11275
|
+
Is(({ formData: A }, B, k) => {
|
|
11276
|
+
f({ formData: A }, B, k), l(A);
|
|
11277
11277
|
}, 1500),
|
|
11278
11278
|
[e == null ? void 0 : e._id, t]
|
|
11279
|
-
), b = ({ formData: A },
|
|
11280
|
-
|
|
11281
|
-
}, y = ({ formData: A },
|
|
11282
|
-
|
|
11279
|
+
), b = ({ formData: A }, B) => {
|
|
11280
|
+
B && (n([e._id], { [B]: N(A, B) }), m({ formData: A }, B, { [B]: N(i, B) }));
|
|
11281
|
+
}, y = ({ formData: A }, B) => {
|
|
11282
|
+
B && (n([u._id], { [B]: N(A, B) }), m({ formData: A }, B, { [B]: N(i, B) }));
|
|
11283
11283
|
}, { schema: x, uiSchema: v } = M(() => {
|
|
11284
11284
|
const A = e == null ? void 0 : e._type;
|
|
11285
11285
|
if (!A)
|
|
11286
11286
|
return { schema: {}, uiSchema: {} };
|
|
11287
11287
|
try {
|
|
11288
|
-
const { schema:
|
|
11288
|
+
const { schema: B, uiSchema: k } = Ui(A);
|
|
11289
11289
|
if (A === "Repeater") {
|
|
11290
|
-
const
|
|
11291
|
-
Re(
|
|
11290
|
+
const _ = N(e, "repeaterItems", "");
|
|
11291
|
+
Re(_, `{{${Lt}`) ? (We(k, "filter", { "ui:widget": "collectionSelect" }), We(k, "sort", { "ui:widget": "collectionSelect" })) : (We(k, "filter", { "ui:widget": "hidden" }), We(k, "sort", { "ui:widget": "hidden" }));
|
|
11292
11292
|
}
|
|
11293
|
-
return { schema:
|
|
11293
|
+
return { schema: B, uiSchema: k };
|
|
11294
11294
|
} catch {
|
|
11295
11295
|
return { schema: {}, uiSchema: {} };
|
|
11296
11296
|
}
|
|
11297
|
-
}, [e]), { wrapperSchema:
|
|
11297
|
+
}, [e]), { wrapperSchema: S, wrapperUiSchema: E } = M(() => {
|
|
11298
11298
|
if (!u || !(u != null && u._type))
|
|
11299
11299
|
return { wrapperSchema: {}, wrapperUiSchema: {} };
|
|
11300
|
-
const A = u == null ? void 0 : u._type, { schema:
|
|
11301
|
-
return { wrapperSchema:
|
|
11300
|
+
const A = u == null ? void 0 : u._type, { schema: B = {}, uiSchema: k = {} } = Ui(A);
|
|
11301
|
+
return { wrapperSchema: B, wrapperUiSchema: k };
|
|
11302
11302
|
}, [u]);
|
|
11303
11303
|
return /* @__PURE__ */ g("div", { className: "no-scrollbar overflow-x-hidden px-px", children: [
|
|
11304
11304
|
!$(u) && /* @__PURE__ */ g("div", { className: "mb-4 rounded border bg-zinc-100 px-1", children: [
|
|
@@ -11326,8 +11326,8 @@ function _a() {
|
|
|
11326
11326
|
blockId: u == null ? void 0 : u._id,
|
|
11327
11327
|
onChange: y,
|
|
11328
11328
|
formData: h,
|
|
11329
|
-
schema:
|
|
11330
|
-
uiSchema:
|
|
11329
|
+
schema: S,
|
|
11330
|
+
uiSchema: E
|
|
11331
11331
|
}
|
|
11332
11332
|
) })
|
|
11333
11333
|
] }),
|
|
@@ -11386,9 +11386,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11386
11386
|
n.includes(t(i)._id)
|
|
11387
11387
|
)
|
|
11388
11388
|
);
|
|
11389
|
-
return
|
|
11389
|
+
return C(s, (i) => {
|
|
11390
11390
|
const l = t(i), c = r;
|
|
11391
|
-
let { classes: d, baseClasses: u } = Gn(
|
|
11391
|
+
let { classes: d, baseClasses: u } = Gn(N(l, o.prop, `${Dt},`));
|
|
11392
11392
|
return It(c, (p) => {
|
|
11393
11393
|
const h = p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), f = new RegExp(`(^|\\s)${h}(?=\\s|$)`, "g");
|
|
11394
11394
|
d = d.replace(f, " ").replace(/\s+/g, " ").trim();
|
|
@@ -11456,13 +11456,13 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11456
11456
|
if (!t) return null;
|
|
11457
11457
|
const l = Object.keys(t).filter(
|
|
11458
11458
|
(m) => typeof t[m] == "string" && t[m].startsWith("#styles:")
|
|
11459
|
-
), c = !$(l) && l.length > 1, d =
|
|
11459
|
+
), c = !$(l) && l.length > 1, d = N(t, (f = e[0]) == null ? void 0 : f.prop, ""), { classes: u = "" } = Gn(d) || {}, p = u ? u.split(" ").filter((m) => !$(m)) : [], h = (m) => ne(e, (b) => b.prop === m);
|
|
11460
11460
|
return /* @__PURE__ */ a(Z, { children: c && /* @__PURE__ */ g("div", { className: "flex flex-wrap gap-1", children: [
|
|
11461
11461
|
/* @__PURE__ */ g("label", { htmlFor: "block-styling-props", className: "py-1 text-xs", children: [
|
|
11462
11462
|
s("Style element"),
|
|
11463
11463
|
":"
|
|
11464
11464
|
] }),
|
|
11465
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children:
|
|
11465
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: C(l, (m) => /* @__PURE__ */ g(
|
|
11466
11466
|
Ai,
|
|
11467
11467
|
{
|
|
11468
11468
|
className: "flex cursor-pointer items-center gap-1 pr-1",
|
|
@@ -11599,7 +11599,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11599
11599
|
}
|
|
11600
11600
|
if (["max", "min", "fit"].includes(n)) return { value: t, unit: "class" };
|
|
11601
11601
|
if (n.includes("/")) {
|
|
11602
|
-
const [r, o] =
|
|
11602
|
+
const [r, o] = C(n.split("/"), (s) => parseInt(s, 10));
|
|
11603
11603
|
return { value: e + (r / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
11604
11604
|
}
|
|
11605
11605
|
return Vu(parseFloat(n)) ? { value: `${e + parseFloat(n) * 4}`, unit: "px" } : { value: n, unit: "class" };
|
|
@@ -11609,7 +11609,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11609
11609
|
const e = t.match(/\[.*\]/g);
|
|
11610
11610
|
if (e === null)
|
|
11611
11611
|
return Cx(t);
|
|
11612
|
-
const n =
|
|
11612
|
+
const n = N(e, "0", "").replace(/\[|\]/g, ""), r = t.startsWith("-") ? "-" : "", o = Ce(n.match(/\d+.\d+|\d+/g));
|
|
11613
11613
|
return { value: `${r}${o}`, unit: n.replace(o, "") };
|
|
11614
11614
|
}, Cx = (t) => $(t) ? { value: "", unit: "" } : wx(t), Nx = ({
|
|
11615
11615
|
unit: t,
|
|
@@ -11656,37 +11656,37 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11656
11656
|
},
|
|
11657
11657
|
r
|
|
11658
11658
|
)) }), Ta = 50, Ex = (t) => {
|
|
11659
|
-
const [e, n] = F(!1), [r, o] = F(""), { currentClass: s, onChange: i, classPrefix: l, cssProperty: c, units: d, negative: u } = t, [p, h] = F(c != null && c.toLowerCase().includes("width") ? "%" : d[0]), [f, m] = F(!1), [b, y] = F(""), [x, v] = F(!1), [
|
|
11659
|
+
const [e, n] = F(!1), [r, o] = F(""), { currentClass: s, onChange: i, classPrefix: l, cssProperty: c, units: d, negative: u } = t, [p, h] = F(c != null && c.toLowerCase().includes("width") ? "%" : d[0]), [f, m] = F(!1), [b, y] = F(""), [x, v] = F(!1), [S, E] = F(!1);
|
|
11660
11660
|
H(() => {
|
|
11661
|
-
const { value: w, unit:
|
|
11662
|
-
if (
|
|
11661
|
+
const { value: w, unit: T } = kx(s);
|
|
11662
|
+
if (T === "") {
|
|
11663
11663
|
o(w), h(c != null && c.toLowerCase().includes("width") ? "%" : Ce(d));
|
|
11664
11664
|
return;
|
|
11665
11665
|
}
|
|
11666
|
-
h(
|
|
11666
|
+
h(T), o(T === "class" || $(w) ? "" : w);
|
|
11667
11667
|
}, [s, c, d]);
|
|
11668
|
-
const A = mn((w) => i(w), [i], Ta),
|
|
11668
|
+
const A = mn((w) => i(w), [i], Ta), B = mn((w) => i(w, !1), [i], Ta), k = R(
|
|
11669
11669
|
(w = !1) => {
|
|
11670
|
-
const
|
|
11671
|
-
if (
|
|
11670
|
+
const T = Aa(`${r}`, d);
|
|
11671
|
+
if (N(T, "error", !1)) {
|
|
11672
11672
|
m(!0);
|
|
11673
11673
|
return;
|
|
11674
11674
|
}
|
|
11675
|
-
const L =
|
|
11675
|
+
const L = N(T, "unit") !== "" ? N(T, "unit") : p;
|
|
11676
11676
|
if (L === "auto" || L === "none") {
|
|
11677
11677
|
A(`${l}${L}`);
|
|
11678
11678
|
return;
|
|
11679
11679
|
}
|
|
11680
|
-
if (
|
|
11680
|
+
if (N(T, "value") === "")
|
|
11681
11681
|
return;
|
|
11682
|
-
const W = `${
|
|
11683
|
-
w ?
|
|
11682
|
+
const W = `${N(T, "value", "").startsWith("-") ? "-" : ""}${l}[${N(T, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
|
|
11683
|
+
w ? B(W) : A(W);
|
|
11684
11684
|
},
|
|
11685
|
-
[A,
|
|
11686
|
-
),
|
|
11685
|
+
[A, B, r, p, l, d]
|
|
11686
|
+
), _ = R(
|
|
11687
11687
|
(w) => {
|
|
11688
|
-
const
|
|
11689
|
-
if (
|
|
11688
|
+
const T = Aa(`${r}`, d);
|
|
11689
|
+
if (N(T, "error", !1)) {
|
|
11690
11690
|
m(!0);
|
|
11691
11691
|
return;
|
|
11692
11692
|
}
|
|
@@ -11694,9 +11694,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11694
11694
|
A(`${l}${w}`);
|
|
11695
11695
|
return;
|
|
11696
11696
|
}
|
|
11697
|
-
if (
|
|
11697
|
+
if (N(T, "value") === "")
|
|
11698
11698
|
return;
|
|
11699
|
-
const L =
|
|
11699
|
+
const L = N(T, "unit") !== "" ? N(T, "unit") : w, W = `${N(T, "value", "").startsWith("-") ? "-" : ""}${l}[${N(T, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
|
|
11700
11700
|
A(W);
|
|
11701
11701
|
},
|
|
11702
11702
|
[A, r, l, d]
|
|
@@ -11721,28 +11721,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11721
11721
|
{
|
|
11722
11722
|
readOnly: p === "class",
|
|
11723
11723
|
onKeyPress: (w) => {
|
|
11724
|
-
w.key === "Enter" &&
|
|
11724
|
+
w.key === "Enter" && k();
|
|
11725
11725
|
},
|
|
11726
11726
|
onKeyDown: (w) => {
|
|
11727
11727
|
if (w.keyCode !== 38 && w.keyCode !== 40)
|
|
11728
11728
|
return;
|
|
11729
|
-
w.preventDefault(),
|
|
11730
|
-
const
|
|
11731
|
-
let L = Wu(
|
|
11729
|
+
w.preventDefault(), E(!0);
|
|
11730
|
+
const T = ju(w.target.value);
|
|
11731
|
+
let L = Wu(T) ? 0 : T;
|
|
11732
11732
|
w.keyCode === 38 && (L += 1), w.keyCode === 40 && (L -= 1);
|
|
11733
11733
|
const I = `${L}`, K = `${I.startsWith("-") ? "-" : ""}${l}[${I.replace("-", "")}${p === "-" ? "" : p}]`;
|
|
11734
|
-
|
|
11734
|
+
B(K);
|
|
11735
11735
|
},
|
|
11736
11736
|
onKeyUp: (w) => {
|
|
11737
|
-
|
|
11737
|
+
S && (w.preventDefault(), E(!1));
|
|
11738
11738
|
},
|
|
11739
|
-
onBlur: () =>
|
|
11739
|
+
onBlur: () => k(),
|
|
11740
11740
|
onChange: (w) => {
|
|
11741
11741
|
m(!1), o(w.target.value);
|
|
11742
11742
|
},
|
|
11743
11743
|
onClick: (w) => {
|
|
11744
|
-
var
|
|
11745
|
-
(
|
|
11744
|
+
var T;
|
|
11745
|
+
(T = w == null ? void 0 : w.target) == null || T.select(), n(!1);
|
|
11746
11746
|
},
|
|
11747
11747
|
value: x ? b : r,
|
|
11748
11748
|
className: "h-6 w-14 rounded rounded-r-none border border-transparent bg-background pl-2 text-sm focus-visible:outline-0".concat(
|
|
@@ -11770,7 +11770,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11770
11770
|
units: d,
|
|
11771
11771
|
current: p,
|
|
11772
11772
|
onSelect: (w) => {
|
|
11773
|
-
n(!1), h(w),
|
|
11773
|
+
n(!1), h(w), _(w);
|
|
11774
11774
|
}
|
|
11775
11775
|
}
|
|
11776
11776
|
) })
|
|
@@ -11783,15 +11783,15 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11783
11783
|
onDragEnd: (w) => {
|
|
11784
11784
|
if (y(() => ""), v(!1), $(w))
|
|
11785
11785
|
return;
|
|
11786
|
-
const
|
|
11786
|
+
const T = `${w}`, I = `${T.startsWith("-") ? "-" : ""}${l}[${T.replace("-", "")}${p === "-" ? "" : p}]`;
|
|
11787
11787
|
A(I);
|
|
11788
11788
|
},
|
|
11789
11789
|
onDrag: (w) => {
|
|
11790
11790
|
if ($(w))
|
|
11791
11791
|
return;
|
|
11792
11792
|
y(w);
|
|
11793
|
-
const
|
|
11794
|
-
|
|
11793
|
+
const T = `${w}`, I = `${T.startsWith("-") ? "-" : ""}${l}[${T.replace("-", "")}${p === "-" ? "" : p}]`;
|
|
11794
|
+
B(I);
|
|
11795
11795
|
},
|
|
11796
11796
|
currentValue: r,
|
|
11797
11797
|
unit: p,
|
|
@@ -11835,7 +11835,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11835
11835
|
80,
|
|
11836
11836
|
96
|
|
11837
11837
|
], D = {
|
|
11838
|
-
columns: [...Ye(1, 13), "auto", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", ...
|
|
11838
|
+
columns: [...Ye(1, 13), "auto", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", ...C(Ye(2, 8), (t) => `${t}xl`)],
|
|
11839
11839
|
breakAfter: ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"],
|
|
11840
11840
|
breakInside: ["auto", "avoid", "avoid-page", "avoid-column"],
|
|
11841
11841
|
display: ["block", "flex", "grid", "inline-block", "inline", "hidden"],
|
|
@@ -11873,19 +11873,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11873
11873
|
regExp: "container"
|
|
11874
11874
|
},
|
|
11875
11875
|
columns: {
|
|
11876
|
-
classes:
|
|
11876
|
+
classes: C(D.columns, (t) => `columns-${t}`),
|
|
11877
11877
|
regExp: "columns-(auto|[0-9]xl|[0-9]xs|xs|sm|md|lg|xl|\\d+)"
|
|
11878
11878
|
},
|
|
11879
11879
|
breakAfter: {
|
|
11880
|
-
classes:
|
|
11880
|
+
classes: C(D.breakAfter, (t) => `break-after-${t}`),
|
|
11881
11881
|
regExp: "break-after-\\S+"
|
|
11882
11882
|
},
|
|
11883
11883
|
breakBefore: {
|
|
11884
|
-
classes:
|
|
11884
|
+
classes: C(D.breakAfter, (t) => `break-before-${t}`),
|
|
11885
11885
|
regExp: "break-before-\\S+"
|
|
11886
11886
|
},
|
|
11887
11887
|
breakInside: {
|
|
11888
|
-
classes:
|
|
11888
|
+
classes: C(D.breakInside, (t) => `break-inside-${t}`),
|
|
11889
11889
|
regExp: "break-inside-\\S+"
|
|
11890
11890
|
},
|
|
11891
11891
|
boxDecoration: {
|
|
@@ -11909,7 +11909,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11909
11909
|
regExp: "flex-1|flex-auto|flex-initial|flex-none"
|
|
11910
11910
|
},
|
|
11911
11911
|
gridColumns: {
|
|
11912
|
-
classes:
|
|
11912
|
+
classes: C([...Ye(0, 13), "none"], (t) => `grid-cols-${t}`),
|
|
11913
11913
|
regExp: "grid-cols-(\\d+|none)"
|
|
11914
11914
|
},
|
|
11915
11915
|
gridFlow: {
|
|
@@ -11917,28 +11917,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11917
11917
|
regExp: "grid-flow-(row|col|row-dense|col-dense)"
|
|
11918
11918
|
},
|
|
11919
11919
|
outlineStyle: {
|
|
11920
|
-
classes:
|
|
11920
|
+
classes: C(["none", "dashed", "dotted", "double", "hidden"], (t) => `outline-${t}`),
|
|
11921
11921
|
regExp: "outline-(none|dashed|dotted|double|hidden)"
|
|
11922
11922
|
},
|
|
11923
11923
|
borderStyle: {
|
|
11924
|
-
classes:
|
|
11924
|
+
classes: C(["solid", "dashed", "dotted", "double", "hidden", "none"], (t) => `border-${t}`),
|
|
11925
11925
|
regExp: "border-(solid|dashed|dotted|double|hidden|none)"
|
|
11926
11926
|
},
|
|
11927
11927
|
overflow: {
|
|
11928
|
-
classes:
|
|
11928
|
+
classes: C(D.overflow, (t) => `overflow-${t}`),
|
|
11929
11929
|
regExp: `overflow-(${D.overflow.join("|")})`
|
|
11930
11930
|
},
|
|
11931
11931
|
overflowX: {
|
|
11932
|
-
classes:
|
|
11932
|
+
classes: C(D.overflow, (t) => `overflow-x-${t}`),
|
|
11933
11933
|
regExp: `overflow-x-(${D.overflow.join("|")})`
|
|
11934
11934
|
},
|
|
11935
11935
|
overflowY: {
|
|
11936
|
-
classes:
|
|
11936
|
+
classes: C(D.overflow, (t) => `overflow-y-${t}`),
|
|
11937
11937
|
regExp: `overflow-y-(${D.overflow.join("|")})`
|
|
11938
11938
|
},
|
|
11939
|
-
gridRows: { classes:
|
|
11939
|
+
gridRows: { classes: C([1, 2, 3, 4, 5, 6, "none"], (t) => `grid-rows-${t}`), regExp: "grid-rows-(\\d|none)" },
|
|
11940
11940
|
display: {
|
|
11941
|
-
classes:
|
|
11941
|
+
classes: C(D.display, (t) => t.toString()),
|
|
11942
11942
|
regExp: `(${D.display.join("|")})`
|
|
11943
11943
|
},
|
|
11944
11944
|
float: {
|
|
@@ -11954,83 +11954,83 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
11954
11954
|
regExp: "isolate|isolation-auto"
|
|
11955
11955
|
},
|
|
11956
11956
|
objectFit: {
|
|
11957
|
-
classes:
|
|
11957
|
+
classes: C(D.objectFit, (t) => `object-${t}`),
|
|
11958
11958
|
regExp: "object-(contain|cover|fill|none|scale-down)"
|
|
11959
11959
|
},
|
|
11960
11960
|
objectPosition: {
|
|
11961
|
-
classes:
|
|
11961
|
+
classes: C(D.objectPosition, (t) => `object-${t}`),
|
|
11962
11962
|
regExp: `object-(${D.objectPosition.join("|")})`
|
|
11963
11963
|
},
|
|
11964
11964
|
overscroll: {
|
|
11965
|
-
classes:
|
|
11965
|
+
classes: C(D.overscroll, (t) => `overscroll-${t}`),
|
|
11966
11966
|
regExp: `overscroll-(${D.overscroll.join("|")})`
|
|
11967
11967
|
},
|
|
11968
11968
|
overscrollX: {
|
|
11969
|
-
classes:
|
|
11969
|
+
classes: C(D.overscroll, (t) => `overscroll-x-${t}`),
|
|
11970
11970
|
regExp: `overscroll-x-(${D.overscroll.join("|")})`
|
|
11971
11971
|
},
|
|
11972
11972
|
overscrollY: {
|
|
11973
|
-
classes:
|
|
11973
|
+
classes: C(D.overscroll, (t) => `overscroll-y-${t}`),
|
|
11974
11974
|
regExp: `overscroll-y-(${D.overscroll.join("|")})`
|
|
11975
11975
|
},
|
|
11976
11976
|
inset: {
|
|
11977
|
-
classes:
|
|
11977
|
+
classes: C(D.trbl, (t) => `inset-${t}`),
|
|
11978
11978
|
regExp: "-?inset-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11979
11979
|
},
|
|
11980
11980
|
insetX: {
|
|
11981
|
-
classes:
|
|
11981
|
+
classes: C(D.trbl, (t) => `inset-x-${t}`),
|
|
11982
11982
|
regExp: "-?inset-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11983
11983
|
},
|
|
11984
11984
|
insetY: {
|
|
11985
|
-
classes:
|
|
11985
|
+
classes: C(D.trbl, (t) => `inset-y-${t}`),
|
|
11986
11986
|
regExp: "-?inset-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11987
11987
|
},
|
|
11988
11988
|
top: {
|
|
11989
|
-
classes:
|
|
11989
|
+
classes: C(D.trbl, (t) => `top-${t}`),
|
|
11990
11990
|
regExp: "-?top-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11991
11991
|
},
|
|
11992
11992
|
topX: {
|
|
11993
|
-
classes:
|
|
11993
|
+
classes: C(D.trbl, (t) => `top-x-${t}`),
|
|
11994
11994
|
regExp: "-?top-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11995
11995
|
},
|
|
11996
11996
|
topY: {
|
|
11997
|
-
classes:
|
|
11997
|
+
classes: C(D.trbl, (t) => `top-y-${t}`),
|
|
11998
11998
|
regExp: "-?top-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
11999
11999
|
},
|
|
12000
12000
|
right: {
|
|
12001
|
-
classes:
|
|
12001
|
+
classes: C(D.trbl, (t) => `right-${t}`),
|
|
12002
12002
|
regExp: "-?right-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12003
12003
|
},
|
|
12004
12004
|
rightX: {
|
|
12005
|
-
classes:
|
|
12005
|
+
classes: C(D.trbl, (t) => `right-x-${t}`),
|
|
12006
12006
|
regExp: "-?right-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12007
12007
|
},
|
|
12008
12008
|
rightY: {
|
|
12009
|
-
classes:
|
|
12009
|
+
classes: C(D.trbl, (t) => `right-y-${t}`),
|
|
12010
12010
|
regExp: "-?right-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12011
12011
|
},
|
|
12012
12012
|
bottom: {
|
|
12013
|
-
classes:
|
|
12013
|
+
classes: C(D.trbl, (t) => `bottom-${t}`),
|
|
12014
12014
|
regExp: "-?bottom-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12015
12015
|
},
|
|
12016
12016
|
bottomX: {
|
|
12017
|
-
classes:
|
|
12017
|
+
classes: C(D.trbl, (t) => `bottom-x-${t}`),
|
|
12018
12018
|
regExp: "-?bottom-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12019
12019
|
},
|
|
12020
12020
|
bottomY: {
|
|
12021
|
-
classes:
|
|
12021
|
+
classes: C(D.trbl, (t) => `bottom-y-${t}`),
|
|
12022
12022
|
regExp: "-?bottom-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12023
12023
|
},
|
|
12024
12024
|
left: {
|
|
12025
|
-
classes:
|
|
12025
|
+
classes: C(D.trbl, (t) => `left-${t}`),
|
|
12026
12026
|
regExp: "-?left-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12027
12027
|
},
|
|
12028
12028
|
leftX: {
|
|
12029
|
-
classes:
|
|
12029
|
+
classes: C(D.trbl, (t) => `left-x-${t}`),
|
|
12030
12030
|
regExp: "-?left-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12031
12031
|
},
|
|
12032
12032
|
leftY: {
|
|
12033
|
-
classes:
|
|
12033
|
+
classes: C(D.trbl, (t) => `left-y-${t}`),
|
|
12034
12034
|
regExp: "-?left-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
|
|
12035
12035
|
},
|
|
12036
12036
|
visibility: {
|
|
@@ -12038,39 +12038,39 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12038
12038
|
regExp: "invisible|visible"
|
|
12039
12039
|
},
|
|
12040
12040
|
zIndex: {
|
|
12041
|
-
classes:
|
|
12041
|
+
classes: C(["0", 10, 20, 30, 40, 50, "auto"], (t) => `z-${t}`),
|
|
12042
12042
|
regExp: "-?z-(\\d+|auto|\\[.*\\])"
|
|
12043
12043
|
},
|
|
12044
12044
|
// Flex box and grids
|
|
12045
12045
|
flexBasis: {
|
|
12046
|
-
classes:
|
|
12046
|
+
classes: C(D.flexBasis, (t) => `basis-${t}`),
|
|
12047
12047
|
regExp: "basis-(\\d+|\\S+)"
|
|
12048
12048
|
},
|
|
12049
12049
|
flexGrow: { classes: ["grow", "grow-0"], regExp: "grow(-0)?" },
|
|
12050
12050
|
flexShrink: { classes: ["shrink", "shrink-0"], regExp: "shrink(-0)?" },
|
|
12051
12051
|
// grid
|
|
12052
12052
|
gridColSpan: {
|
|
12053
|
-
classes: ["col-auto", ...
|
|
12053
|
+
classes: ["col-auto", ...C(Ye(1, 13), (t) => `col-span-${t}`), "col-span-full"],
|
|
12054
12054
|
regExp: "col-(auto|span-(\\d+|full))"
|
|
12055
12055
|
},
|
|
12056
12056
|
gridColStart: {
|
|
12057
|
-
classes: [...
|
|
12057
|
+
classes: [...C(Ye(1, 14), (t) => `col-start-${t}`), "col-start-auto"],
|
|
12058
12058
|
regExp: "col-start-(\\d+|auto)"
|
|
12059
12059
|
},
|
|
12060
12060
|
gridColEnd: {
|
|
12061
|
-
classes: [...
|
|
12061
|
+
classes: [...C(Ye(1, 14), (t) => `col-end-${t}`), "col-end-auto"],
|
|
12062
12062
|
regExp: "col-end-(\\d+|auto)"
|
|
12063
12063
|
},
|
|
12064
12064
|
gridRowSpan: {
|
|
12065
|
-
classes: ["row-auto", ...
|
|
12065
|
+
classes: ["row-auto", ...C(Ye(1, 7), (t) => `row-span-${t}`), "row-span-full"],
|
|
12066
12066
|
regExp: "row-(auto|span-(\\d+|full))"
|
|
12067
12067
|
},
|
|
12068
12068
|
gridRowStart: {
|
|
12069
|
-
classes: [...
|
|
12069
|
+
classes: [...C(Ye(1, 8), (t) => `row-start-${t}`), "row-start-auto"],
|
|
12070
12070
|
regExp: "row-start-(\\d+|auto)"
|
|
12071
12071
|
},
|
|
12072
12072
|
gridRowEnd: {
|
|
12073
|
-
classes: [...
|
|
12073
|
+
classes: [...C(Ye(1, 8), (t) => `row-end-${t}`), "row-end-auto"],
|
|
12074
12074
|
regExp: "row-end-(\\d+|auto)"
|
|
12075
12075
|
},
|
|
12076
12076
|
gridAutoColumns: {
|
|
@@ -12081,9 +12081,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12081
12081
|
classes: ["auto-rows-auto", "auto-rows-min", "auto-rows-max", "auto-rows-fr"],
|
|
12082
12082
|
regExp: "auto-rows-(auto|min|max|fr)"
|
|
12083
12083
|
},
|
|
12084
|
-
gap: { classes:
|
|
12085
|
-
gapX: { classes:
|
|
12086
|
-
gapY: { classes:
|
|
12084
|
+
gap: { classes: C(D.indent, (t) => `gap-${t}`), regExp: "gap-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
12085
|
+
gapX: { classes: C(D.indent, (t) => `gap-x-${t}`), regExp: "gap-x-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
12086
|
+
gapY: { classes: C(D.indent, (t) => `gap-y-${t}`), regExp: "gap-y-(px|\\d.\\d|\\d|\\[.*\\])" },
|
|
12087
12087
|
justifyContent: {
|
|
12088
12088
|
classes: ["justify-start", "justify-end", "justify-center", "justify-between", "justify-around", "justify-evenly"],
|
|
12089
12089
|
regExp: "justify-(start|end|center|between|around|evenly)"
|
|
@@ -12140,19 +12140,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12140
12140
|
},
|
|
12141
12141
|
// FIXME: Add drop-shadow class
|
|
12142
12142
|
dropShadow: {
|
|
12143
|
-
classes:
|
|
12143
|
+
classes: C(["sm", "md", "lg", "xl", "2xl", "none"], (t) => `drop-shadow-${t}`),
|
|
12144
12144
|
regExp: "drop-shadow-(sm|md|lg|xl|2xl|none)"
|
|
12145
12145
|
},
|
|
12146
12146
|
backdropBlur: {
|
|
12147
|
-
classes:
|
|
12147
|
+
classes: C(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `backdrop-blur-${t}`),
|
|
12148
12148
|
regExp: "backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)"
|
|
12149
12149
|
},
|
|
12150
12150
|
backdropBrightness: {
|
|
12151
|
-
classes:
|
|
12151
|
+
classes: C([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `backdrop-brightness-${t}`),
|
|
12152
12152
|
regExp: "backdrop-brightness-(\\d+)"
|
|
12153
12153
|
},
|
|
12154
12154
|
backdropContrast: {
|
|
12155
|
-
classes:
|
|
12155
|
+
classes: C([0, 50, 75, 100, 125, 150, 200], (t) => `backdrop-contrast-${t}`),
|
|
12156
12156
|
regExp: "backdrop-contrast-(\\d+)"
|
|
12157
12157
|
},
|
|
12158
12158
|
backdropGrayScale: {
|
|
@@ -12160,7 +12160,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12160
12160
|
regExp: "backdrop-grayscale(-0)?"
|
|
12161
12161
|
},
|
|
12162
12162
|
backdropHueRotate: {
|
|
12163
|
-
classes:
|
|
12163
|
+
classes: C([0, 15, 30, 60, 90, 180], (t) => `backdrop-hue-rotate-${t}`),
|
|
12164
12164
|
regExp: "-?backdrop-hue-rotate-(\\d+)"
|
|
12165
12165
|
},
|
|
12166
12166
|
backdropInvert: {
|
|
@@ -12168,11 +12168,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12168
12168
|
regExp: "backdrop-invert(-0)?"
|
|
12169
12169
|
},
|
|
12170
12170
|
backdropOpacity: {
|
|
12171
|
-
classes:
|
|
12171
|
+
classes: C([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `backdrop-opacity-${t}`),
|
|
12172
12172
|
regExp: "backdrop-opacity-(\\d+)"
|
|
12173
12173
|
},
|
|
12174
12174
|
backdropSaturate: {
|
|
12175
|
-
classes:
|
|
12175
|
+
classes: C([0, 50, 100, 150, 200], (t) => `backdrop-saturate-${t}`),
|
|
12176
12176
|
regExp: "backdrop-saturate-(\\d+)"
|
|
12177
12177
|
},
|
|
12178
12178
|
backdropSepia: {
|
|
@@ -12184,36 +12184,36 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12184
12184
|
regExp: "bg-origin-(border|padding|content)"
|
|
12185
12185
|
},
|
|
12186
12186
|
transformOrigin: {
|
|
12187
|
-
classes:
|
|
12187
|
+
classes: C(D.origin, (t) => `origin-${t}`),
|
|
12188
12188
|
regExp: "origin-(\\d+|\\S+)"
|
|
12189
12189
|
},
|
|
12190
12190
|
// spacing
|
|
12191
12191
|
padding: {
|
|
12192
|
-
classes:
|
|
12192
|
+
classes: C(D.padding, (t) => `p-${t}`),
|
|
12193
12193
|
regExp: "p-(\\d+|\\S+|\\[.*\\])"
|
|
12194
12194
|
},
|
|
12195
12195
|
paddingX: {
|
|
12196
|
-
classes:
|
|
12196
|
+
classes: C(D.padding, (t) => `px-${t}`),
|
|
12197
12197
|
regExp: "px-(\\d+|\\S+|\\[.*\\])"
|
|
12198
12198
|
},
|
|
12199
12199
|
paddingY: {
|
|
12200
|
-
classes:
|
|
12200
|
+
classes: C(D.padding, (t) => `py-${t}`),
|
|
12201
12201
|
regExp: "py-(\\d+|\\S+|\\[.*\\])"
|
|
12202
12202
|
},
|
|
12203
12203
|
paddingTop: {
|
|
12204
|
-
classes:
|
|
12204
|
+
classes: C(D.padding, (t) => `pt-${t}`),
|
|
12205
12205
|
regExp: "pt-(\\d+|\\S+|\\[.*\\])"
|
|
12206
12206
|
},
|
|
12207
12207
|
paddingRight: {
|
|
12208
|
-
classes:
|
|
12208
|
+
classes: C(D.padding, (t) => `pr-${t}`),
|
|
12209
12209
|
regExp: "pr-(\\d+|\\S+|\\[.*\\])"
|
|
12210
12210
|
},
|
|
12211
12211
|
paddingBottom: {
|
|
12212
|
-
classes:
|
|
12212
|
+
classes: C(D.padding, (t) => `pb-${t}`),
|
|
12213
12213
|
regExp: "pb-(\\d+|\\S+|\\[.*\\])"
|
|
12214
12214
|
},
|
|
12215
12215
|
paddingLeft: {
|
|
12216
|
-
classes:
|
|
12216
|
+
classes: C(D.padding, (t) => `pl-${t}`),
|
|
12217
12217
|
regExp: "pl-(\\d+|\\S+|\\[.*\\])"
|
|
12218
12218
|
},
|
|
12219
12219
|
textDecorationStyle: {
|
|
@@ -12221,7 +12221,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12221
12221
|
regExp: "decoration-(solid|double|dotted|dashed|wavy)"
|
|
12222
12222
|
},
|
|
12223
12223
|
textDecorationThickness: {
|
|
12224
|
-
classes:
|
|
12224
|
+
classes: C(["auto", "from-font", "0", 1, 2, 4, 8], (t) => `decoration-${t}`),
|
|
12225
12225
|
regExp: "decoration-(auto|from-font|\\d+|\\S+)"
|
|
12226
12226
|
},
|
|
12227
12227
|
fromColor: {
|
|
@@ -12229,43 +12229,43 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12229
12229
|
regExp: "from-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
|
|
12230
12230
|
},
|
|
12231
12231
|
margin: {
|
|
12232
|
-
classes:
|
|
12232
|
+
classes: C(D.margin, (t) => `m-${t}`),
|
|
12233
12233
|
regExp: "-?m-(\\d+|\\S+|\\[.*\\])"
|
|
12234
12234
|
},
|
|
12235
12235
|
marginX: {
|
|
12236
|
-
classes:
|
|
12236
|
+
classes: C(D.margin, (t) => `mx-${t}`),
|
|
12237
12237
|
regExp: "-?mx-(\\d+|\\S+|\\[.*\\])"
|
|
12238
12238
|
},
|
|
12239
12239
|
marginY: {
|
|
12240
|
-
classes:
|
|
12240
|
+
classes: C(D.margin, (t) => `my-${t}`),
|
|
12241
12241
|
regExp: "-?my-(\\d+|\\S+|\\[.*\\])"
|
|
12242
12242
|
},
|
|
12243
12243
|
marginTop: {
|
|
12244
|
-
classes:
|
|
12244
|
+
classes: C(D.margin, (t) => `mt-${t}`),
|
|
12245
12245
|
regExp: "-?mt-(\\d+|\\S+|\\[.*\\])"
|
|
12246
12246
|
},
|
|
12247
12247
|
marginRight: {
|
|
12248
|
-
classes:
|
|
12248
|
+
classes: C(D.margin, (t) => `mr-${t}`),
|
|
12249
12249
|
regExp: "-?mr-(\\d+|\\S+|\\[.*\\])"
|
|
12250
12250
|
},
|
|
12251
12251
|
marginBottom: {
|
|
12252
|
-
classes:
|
|
12252
|
+
classes: C(D.margin, (t) => `mb-${t}`),
|
|
12253
12253
|
regExp: "-?mb-(\\d+|\\S+|\\[.*\\])"
|
|
12254
12254
|
},
|
|
12255
12255
|
marginLeft: {
|
|
12256
|
-
classes:
|
|
12256
|
+
classes: C(D.margin, (t) => `ml-${t}`),
|
|
12257
12257
|
regExp: "-?ml-(\\d+|\\S+|\\[.*\\])"
|
|
12258
12258
|
},
|
|
12259
12259
|
spaceX: {
|
|
12260
|
-
classes:
|
|
12260
|
+
classes: C(D.space, (t) => `space-x-${t}`),
|
|
12261
12261
|
regExp: "-?space-x-(\\d+|\\S+|\\[.*\\])"
|
|
12262
12262
|
},
|
|
12263
12263
|
spaceY: {
|
|
12264
|
-
classes:
|
|
12264
|
+
classes: C(D.space, (t) => `space-y-${t}`),
|
|
12265
12265
|
regExp: "-?space-y-(\\d+|\\S+|\\[.*\\])"
|
|
12266
12266
|
},
|
|
12267
12267
|
boxShadow: {
|
|
12268
|
-
classes:
|
|
12268
|
+
classes: C(["sm", "md", "lg", "xl", "2xl", "inner", "none"], (t) => `shadow-${t}`),
|
|
12269
12269
|
regExp: "shadow-(sm|md|lg|xl|2xl|inner|none)"
|
|
12270
12270
|
},
|
|
12271
12271
|
// sizing
|
|
@@ -12274,11 +12274,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12274
12274
|
regExp: "min-w-(\\d+|\\S+|\\[.*\\])"
|
|
12275
12275
|
},
|
|
12276
12276
|
maxWidth: {
|
|
12277
|
-
classes:
|
|
12277
|
+
classes: C(D.maxWidth, (t) => `max-w-${t}`),
|
|
12278
12278
|
regExp: "max-w-(\\d+|\\S+|\\[.*\\])"
|
|
12279
12279
|
},
|
|
12280
12280
|
width: {
|
|
12281
|
-
classes:
|
|
12281
|
+
classes: C([...D.width, "full", "screen", "min", "max", "fit"], (t) => `w-${t}`),
|
|
12282
12282
|
regExp: "w-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])$"
|
|
12283
12283
|
},
|
|
12284
12284
|
minHeight: {
|
|
@@ -12286,11 +12286,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12286
12286
|
regExp: "min-h-(\\d+|\\S+|\\[.*\\])"
|
|
12287
12287
|
},
|
|
12288
12288
|
maxHeight: {
|
|
12289
|
-
classes:
|
|
12289
|
+
classes: C(D.maxHeight, (t) => `max-h-${t}`),
|
|
12290
12290
|
regExp: "max-h-(\\d+|\\S+|\\[.*\\])"
|
|
12291
12291
|
},
|
|
12292
12292
|
height: {
|
|
12293
|
-
classes:
|
|
12293
|
+
classes: C(D.height, (t) => `h-${t}`),
|
|
12294
12294
|
regExp: "h-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"
|
|
12295
12295
|
},
|
|
12296
12296
|
// typography
|
|
@@ -12432,7 +12432,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12432
12432
|
regExp: "uppercase|lowercase|capitalize|normal-case"
|
|
12433
12433
|
},
|
|
12434
12434
|
textIndent: {
|
|
12435
|
-
classes:
|
|
12435
|
+
classes: C(D.indent, (t) => `indent-${t}`),
|
|
12436
12436
|
regExp: "-?indent-(\\d+|\\S+)"
|
|
12437
12437
|
},
|
|
12438
12438
|
whitespace: {
|
|
@@ -12445,7 +12445,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12445
12445
|
},
|
|
12446
12446
|
content: { classes: ["content-none"], regExp: "content-none" },
|
|
12447
12447
|
backgroundAttachment: {
|
|
12448
|
-
classes:
|
|
12448
|
+
classes: C(["fixed", "local", "scroll"], (t) => `bg-${t}`),
|
|
12449
12449
|
regExp: "bg-(fixed|local|scroll)"
|
|
12450
12450
|
},
|
|
12451
12451
|
backgroundColor: {
|
|
@@ -12502,63 +12502,63 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12502
12502
|
},
|
|
12503
12503
|
// border
|
|
12504
12504
|
borderRadiusTopLeft: {
|
|
12505
|
-
classes: ["rounded-tl", ...
|
|
12505
|
+
classes: ["rounded-tl", ...C(D.borderRadius, (t) => `rounded-tl-${t}`)],
|
|
12506
12506
|
regExp: "rounded-tl-?(\\d+|\\S+)?"
|
|
12507
12507
|
},
|
|
12508
12508
|
borderRadiusTopRight: {
|
|
12509
|
-
classes: ["rounded-tr", ...
|
|
12509
|
+
classes: ["rounded-tr", ...C(D.borderRadius, (t) => `rounded-tr-${t}`)],
|
|
12510
12510
|
regExp: "rounded-tr-?(\\d+|\\S+)?"
|
|
12511
12511
|
},
|
|
12512
12512
|
borderRadiusBottomRight: {
|
|
12513
|
-
classes: ["rounded-br", ...
|
|
12513
|
+
classes: ["rounded-br", ...C(D.borderRadius, (t) => `rounded-br-${t}`)],
|
|
12514
12514
|
regExp: "rounded-br-?(\\d+|\\S+)?"
|
|
12515
12515
|
},
|
|
12516
12516
|
borderRadiusBottomLeft: {
|
|
12517
|
-
classes: ["rounded-bl", ...
|
|
12517
|
+
classes: ["rounded-bl", ...C(D.borderRadius, (t) => `rounded-bl-${t}`)],
|
|
12518
12518
|
regExp: "rounded-bl-?(\\d+|\\S+)?"
|
|
12519
12519
|
},
|
|
12520
12520
|
borderRadiusTop: {
|
|
12521
|
-
classes: ["rounded-t", ...
|
|
12521
|
+
classes: ["rounded-t", ...C(D.borderRadius, (t) => `rounded-t-${t}`)],
|
|
12522
12522
|
regExp: "rounded-t-?(\\d+|\\S+)?"
|
|
12523
12523
|
},
|
|
12524
12524
|
borderRadiusRight: {
|
|
12525
|
-
classes: ["rounded-r", ...
|
|
12525
|
+
classes: ["rounded-r", ...C(D.borderRadius, (t) => `rounded-r-${t}`)],
|
|
12526
12526
|
regExp: "rounded-r-?(\\d+|\\S+)?"
|
|
12527
12527
|
},
|
|
12528
12528
|
borderRadiusBottom: {
|
|
12529
|
-
classes: ["rounded-b", ...
|
|
12529
|
+
classes: ["rounded-b", ...C(D.borderRadius, (t) => `rounded-b-${t}`)],
|
|
12530
12530
|
regExp: "rounded-b-?(\\d+|\\S+)?"
|
|
12531
12531
|
},
|
|
12532
12532
|
borderRadiusLeft: {
|
|
12533
|
-
classes: ["rounded-l", ...
|
|
12533
|
+
classes: ["rounded-l", ...C(D.borderRadius, (t) => `rounded-l-${t}`)],
|
|
12534
12534
|
regExp: `(rounded-l-(${D.borderRadius.join("|")})|rounded-l$)`
|
|
12535
12535
|
},
|
|
12536
12536
|
borderRadius: {
|
|
12537
|
-
classes: ["rounded", ...
|
|
12537
|
+
classes: ["rounded", ...C(D.borderRadius, (t) => `rounded-${t}`)],
|
|
12538
12538
|
regExp: `(rounded-(${D.borderRadius.join("|")}$)|rounded)`
|
|
12539
12539
|
},
|
|
12540
12540
|
borderX: {
|
|
12541
|
-
classes: ["border-x", ...
|
|
12541
|
+
classes: ["border-x", ...C(D.borderWidth, (t) => `border-x-${t}`)],
|
|
12542
12542
|
regExp: "border-x-?(\\d+|\\S+|\\[.*\\])?"
|
|
12543
12543
|
},
|
|
12544
12544
|
borderY: {
|
|
12545
|
-
classes: ["border-y", ...
|
|
12545
|
+
classes: ["border-y", ...C(D.borderWidth, (t) => `border-y-${t}`)],
|
|
12546
12546
|
regExp: "border-y-?(\\d+|\\S+|\\[.*\\])?"
|
|
12547
12547
|
},
|
|
12548
12548
|
borderTop: {
|
|
12549
|
-
classes: ["border-t", ...
|
|
12549
|
+
classes: ["border-t", ...C(D.borderWidth, (t) => `border-t-${t}`)],
|
|
12550
12550
|
regExp: "border-t-?(\\d+|\\S+|\\[.*\\])?"
|
|
12551
12551
|
},
|
|
12552
12552
|
borderRight: {
|
|
12553
|
-
classes: ["border-r", ...
|
|
12553
|
+
classes: ["border-r", ...C(D.borderWidth, (t) => `border-r-${t}`)],
|
|
12554
12554
|
regExp: "border-r-?(\\d+|\\S+|\\[.*\\])?"
|
|
12555
12555
|
},
|
|
12556
12556
|
borderBottom: {
|
|
12557
|
-
classes: ["border-b", ...
|
|
12557
|
+
classes: ["border-b", ...C(D.borderWidth, (t) => `border-b-${t}`)],
|
|
12558
12558
|
regExp: "border-b-?(\\d+|\\S+|\\[.*\\])?"
|
|
12559
12559
|
},
|
|
12560
12560
|
borderLeft: {
|
|
12561
|
-
classes: ["border-l", ...
|
|
12561
|
+
classes: ["border-l", ...C(D.borderWidth, (t) => `border-l-${t}`)],
|
|
12562
12562
|
regExp: "border-l-?(\\d+|\\S+|\\[.*\\])?"
|
|
12563
12563
|
},
|
|
12564
12564
|
borderColor: {
|
|
@@ -12566,19 +12566,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12566
12566
|
regExp: "^border-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\w+-\\d+|\\[#[0-9a-fA-F]+\\])$"
|
|
12567
12567
|
},
|
|
12568
12568
|
border: {
|
|
12569
|
-
classes: ["border", ...
|
|
12569
|
+
classes: ["border", ...C(D.borderWidth, (t) => `border-${t}`)],
|
|
12570
12570
|
regExp: "^border(-\\d+|\\[\\d+px\\])?$"
|
|
12571
12571
|
},
|
|
12572
12572
|
order: {
|
|
12573
|
-
classes:
|
|
12573
|
+
classes: C([...Ye(0, 13), "first", "last", "none"], (t) => `order-${t}`),
|
|
12574
12574
|
regExp: "-?order-(\\d+|first|last|none)"
|
|
12575
12575
|
},
|
|
12576
12576
|
divideXWidth: {
|
|
12577
|
-
classes:
|
|
12577
|
+
classes: C(["0", 2, 4, 8], (t) => `divide-x-${t}`),
|
|
12578
12578
|
regExp: "divide-x-(\\d+|\\[.*\\])"
|
|
12579
12579
|
},
|
|
12580
12580
|
divideYWidth: {
|
|
12581
|
-
classes:
|
|
12581
|
+
classes: C(["0", 2, 4, 8], (t) => `divide-y-${t}`),
|
|
12582
12582
|
regExp: "divide-y-(\\d+|\\[.*\\])"
|
|
12583
12583
|
},
|
|
12584
12584
|
divideColor: {
|
|
@@ -12586,15 +12586,15 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12586
12586
|
regExp: "divide-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
|
|
12587
12587
|
},
|
|
12588
12588
|
divideStyle: {
|
|
12589
|
-
classes:
|
|
12589
|
+
classes: C(["solid", "dashed", "dotted", "double", "none"], (t) => `divide-${t}`),
|
|
12590
12590
|
regExp: "divide-(solid|dashed|dotted|double|none)"
|
|
12591
12591
|
},
|
|
12592
12592
|
outlineWidth: {
|
|
12593
|
-
classes:
|
|
12593
|
+
classes: C([0, 1, 2, 4, 8], (t) => `outline-${t}`),
|
|
12594
12594
|
regExp: "outline-(\\d+)"
|
|
12595
12595
|
},
|
|
12596
12596
|
outlineOffset: {
|
|
12597
|
-
classes:
|
|
12597
|
+
classes: C([0, 1, 2, 4, 8], (t) => `outline-offset-${t}`),
|
|
12598
12598
|
regExp: "outline-offset-(\\d+)"
|
|
12599
12599
|
},
|
|
12600
12600
|
outlineColor: {
|
|
@@ -12602,11 +12602,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12602
12602
|
regExp: "outline-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
|
|
12603
12603
|
},
|
|
12604
12604
|
ringWidth: {
|
|
12605
|
-
classes:
|
|
12605
|
+
classes: C([0, 1, 2, 4, 8, "inset"], (t) => `ring-${t}`),
|
|
12606
12606
|
regExp: "ring-(\\d+|inset)"
|
|
12607
12607
|
},
|
|
12608
12608
|
ringOffsetWidth: {
|
|
12609
|
-
classes:
|
|
12609
|
+
classes: C([0, 1, 2, 4, 8], (t) => `ring-offset-${t}`),
|
|
12610
12610
|
regExp: "ring-offset-(\\d+)"
|
|
12611
12611
|
},
|
|
12612
12612
|
ringOffsetColor: {
|
|
@@ -12624,28 +12624,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12624
12624
|
regExp: "shadow-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
|
|
12625
12625
|
},
|
|
12626
12626
|
opacity: {
|
|
12627
|
-
classes:
|
|
12627
|
+
classes: C([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `opacity-${t}`),
|
|
12628
12628
|
regExp: "opacity-(\\d+|\\[.*\\])"
|
|
12629
12629
|
},
|
|
12630
12630
|
mixBlendMode: {
|
|
12631
|
-
classes:
|
|
12631
|
+
classes: C(D.blendEffect, (t) => `mix-blend-${t}`),
|
|
12632
12632
|
regExp: "mix-blend-(\\d+|\\S+)"
|
|
12633
12633
|
},
|
|
12634
12634
|
bgBlendMode: {
|
|
12635
|
-
classes:
|
|
12635
|
+
classes: C(D.blendEffect, (t) => `bg-blend-${t}`),
|
|
12636
12636
|
regExp: "bg-blend-(\\d+|\\S+)"
|
|
12637
12637
|
},
|
|
12638
12638
|
// filters
|
|
12639
12639
|
blur: {
|
|
12640
|
-
classes:
|
|
12640
|
+
classes: C(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `blur-${t}`),
|
|
12641
12641
|
regExp: "blur-(none|sm|md|lg|xl|2xl|3xl)"
|
|
12642
12642
|
},
|
|
12643
12643
|
brightness: {
|
|
12644
|
-
classes:
|
|
12644
|
+
classes: C([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `brightness-${t}`),
|
|
12645
12645
|
regExp: "brightness-(\\d+)"
|
|
12646
12646
|
},
|
|
12647
12647
|
contrast: {
|
|
12648
|
-
classes:
|
|
12648
|
+
classes: C([0, 50, 75, 100, 125, 150, 200], (t) => `contrast-${t}`),
|
|
12649
12649
|
regExp: "contrast-(\\d+)"
|
|
12650
12650
|
},
|
|
12651
12651
|
grayScale: {
|
|
@@ -12653,12 +12653,12 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12653
12653
|
regExp: "grayscale(-0)?"
|
|
12654
12654
|
},
|
|
12655
12655
|
hueRotate: {
|
|
12656
|
-
classes:
|
|
12656
|
+
classes: C([0, 15, 30, 60, 90, 180], (t) => `hue-rotate-${t}`),
|
|
12657
12657
|
regExp: "-?hue-rotate-(\\d+)"
|
|
12658
12658
|
},
|
|
12659
12659
|
invert: { classes: ["invert-0", "invert"], regExp: "invert(-0)?" },
|
|
12660
12660
|
saturate: {
|
|
12661
|
-
classes:
|
|
12661
|
+
classes: C([0, 50, 100, 150, 200], (t) => `saturate-${t}`),
|
|
12662
12662
|
regExp: "saturate-(\\d+)"
|
|
12663
12663
|
},
|
|
12664
12664
|
sepia: { classes: ["sepia-0", "sepia"], regExp: "sepia(-0)?" },
|
|
@@ -12676,7 +12676,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12676
12676
|
regExp: "transition-(none|all|colors|opacity|shadow|transform)"
|
|
12677
12677
|
},
|
|
12678
12678
|
duration: {
|
|
12679
|
-
classes:
|
|
12679
|
+
classes: C([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `duration-${t}`),
|
|
12680
12680
|
regExp: "duration-(\\d+|\\[.*\\])"
|
|
12681
12681
|
},
|
|
12682
12682
|
transitionEase: {
|
|
@@ -12684,7 +12684,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12684
12684
|
regExp: "eas(e-linear|e-in|e-out|e-in-out)"
|
|
12685
12685
|
},
|
|
12686
12686
|
transitionDelay: {
|
|
12687
|
-
classes:
|
|
12687
|
+
classes: C([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `delay-${t}`),
|
|
12688
12688
|
regExp: "delay-(\\d+|\\[.*\\])"
|
|
12689
12689
|
},
|
|
12690
12690
|
animation: {
|
|
@@ -12692,35 +12692,35 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12692
12692
|
regExp: "animate-(none|spin|ping)"
|
|
12693
12693
|
},
|
|
12694
12694
|
scaleX: {
|
|
12695
|
-
classes:
|
|
12695
|
+
classes: C(D.scale, (t) => `scale-x-${t}`),
|
|
12696
12696
|
regExp: "-?scale-x-(\\d+|\\S+|\\[.*\\])"
|
|
12697
12697
|
},
|
|
12698
12698
|
scaleY: {
|
|
12699
|
-
classes:
|
|
12699
|
+
classes: C(D.scale, (t) => `scale-y-${t}`),
|
|
12700
12700
|
regExp: "-?scale-y-(\\d+|\\S+|\\[.*\\])"
|
|
12701
12701
|
},
|
|
12702
12702
|
scale: {
|
|
12703
|
-
classes:
|
|
12703
|
+
classes: C(D.scale, (t) => `scale-${t}`),
|
|
12704
12704
|
regExp: "-?scale-(\\d+|\\S+|\\[.*\\])"
|
|
12705
12705
|
},
|
|
12706
12706
|
rotate: {
|
|
12707
|
-
classes:
|
|
12707
|
+
classes: C([0, 1, 2, 3, 6, 12, 45, 90, 180], (t) => `rotate-${t}`),
|
|
12708
12708
|
regExp: "-?rotate-(\\d+|\\S+|\\[.*\\])"
|
|
12709
12709
|
},
|
|
12710
12710
|
translateX: {
|
|
12711
|
-
classes:
|
|
12711
|
+
classes: C([0, "px", "0.5", 1], (t) => `translate-x-${t}`),
|
|
12712
12712
|
regExp: "-?translate-x-(\\d+|\\S+|\\[.*\\])"
|
|
12713
12713
|
},
|
|
12714
12714
|
translateY: {
|
|
12715
|
-
classes:
|
|
12715
|
+
classes: C([0, "px", "0.5", 1], (t) => `translate-y-${t}`),
|
|
12716
12716
|
regExp: "-?translate-y-(\\d+|\\S+|\\[.*\\])"
|
|
12717
12717
|
},
|
|
12718
12718
|
skewX: {
|
|
12719
|
-
classes:
|
|
12719
|
+
classes: C([0, 1, 2, 3, 6, 12], (t) => `skew-x-${t}`),
|
|
12720
12720
|
regExp: "-?skew-x-(\\d+|\\S+|\\[.*\\])"
|
|
12721
12721
|
},
|
|
12722
12722
|
skewY: {
|
|
12723
|
-
classes:
|
|
12723
|
+
classes: C([0, 1, 2, 3, 6, 12], (t) => `skew-y-${t}`),
|
|
12724
12724
|
regExp: "-?skew-y-(\\d+|\\S+|\\[.*\\])"
|
|
12725
12725
|
},
|
|
12726
12726
|
// interactivity
|
|
@@ -12799,13 +12799,13 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12799
12799
|
"fuchsia",
|
|
12800
12800
|
"pink",
|
|
12801
12801
|
"rose"
|
|
12802
|
-
], Ix = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], ks =
|
|
12803
|
-
...
|
|
12804
|
-
...
|
|
12802
|
+
], Ix = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], ks = C(Tt(Ax), (t) => t), Rx = Rt([
|
|
12803
|
+
...C(Tx, (t) => Ot(C(ks, (e) => `${e}-${t}`))),
|
|
12804
|
+
...C(
|
|
12805
12805
|
Bx,
|
|
12806
|
-
(t) => Rt(
|
|
12806
|
+
(t) => Rt(C(ks, (e) => Rt(C(Ix, (n) => `${e}-${t}-${n}`))))
|
|
12807
12807
|
)
|
|
12808
|
-
]), Lx =
|
|
12808
|
+
]), Lx = C(
|
|
12809
12809
|
Rt(
|
|
12810
12810
|
Tt(Pn).map((t) => t.classes).concat(Rx)
|
|
12811
12811
|
),
|
|
@@ -12816,10 +12816,10 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12816
12816
|
const t = Nr(), e = M(() => {
|
|
12817
12817
|
let n = [];
|
|
12818
12818
|
if (t.colors) {
|
|
12819
|
-
const r = Rt(
|
|
12820
|
-
n = Rt(
|
|
12819
|
+
const r = Rt(C(t.colors, ({ items: o }) => Ct(o)));
|
|
12820
|
+
n = Rt(C(r, (o) => Ot(C(ks, (s) => `${s}-${o}`))));
|
|
12821
12821
|
}
|
|
12822
|
-
return t.fontFamily && (n = [...n, ...
|
|
12822
|
+
return t.fontFamily && (n = [...n, ...C(Ct(t.fontFamily), (r) => `${r}`)]), C(n, (r) => ({ name: r }));
|
|
12823
12823
|
}, [t]);
|
|
12824
12824
|
return M(
|
|
12825
12825
|
() => new Cl([...Lx, ...e], {
|
|
@@ -12833,7 +12833,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12833
12833
|
}, Oo = () => {
|
|
12834
12834
|
const t = Nr(), e = M(() => {
|
|
12835
12835
|
if (t.colors) {
|
|
12836
|
-
const o = Rt(
|
|
12836
|
+
const o = Rt(C(t.colors, ({ items: s }) => Ct(s)));
|
|
12837
12837
|
It(Pn, (s, i) => {
|
|
12838
12838
|
We(Pn, `${i}.regExp`, s.regExp.replace("__THEME_COLORS_REGEXP__", o.join("|")));
|
|
12839
12839
|
});
|
|
@@ -12841,17 +12841,17 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
|
|
|
12841
12841
|
return Pn;
|
|
12842
12842
|
}, [t]), n = R(
|
|
12843
12843
|
(o, s) => {
|
|
12844
|
-
const i =
|
|
12844
|
+
const i = N(e, `${o}.regExp`, "");
|
|
12845
12845
|
return s.match(new RegExp(i));
|
|
12846
12846
|
},
|
|
12847
12847
|
[e]
|
|
12848
12848
|
), r = R(
|
|
12849
|
-
(o, s = []) =>
|
|
12849
|
+
(o, s = []) => N(e, `${o}.classes`, s),
|
|
12850
12850
|
[e]
|
|
12851
12851
|
);
|
|
12852
12852
|
return { match: n, getClasses: r };
|
|
12853
12853
|
}, Fd = ({ label: t, property: e, onChange: n }) => {
|
|
12854
|
-
const { getClasses: r } = Oo(), o = r(e), s = Lr(e), i = M(() =>
|
|
12854
|
+
const { getClasses: r } = Oo(), o = r(e), s = Lr(e), i = M(() => N(s, "cls", ""), [s]), { canChange: l } = Wn(Rr), c = /\[.*\]/g.test(i);
|
|
12855
12855
|
return /* @__PURE__ */ a("div", { className: t ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ g("div", { className: "flex items-center", children: [
|
|
12856
12856
|
/* @__PURE__ */ a(br, { className: "w-[70%] rounded py-1", readOnly: !0, value: i }),
|
|
12857
12857
|
/* @__PURE__ */ g(Ee, { delayDuration: 100, children: [
|
|
@@ -12901,7 +12901,7 @@ const Ox = {
|
|
|
12901
12901
|
ringColor: "ring",
|
|
12902
12902
|
ringOffsetColor: "ring-offset"
|
|
12903
12903
|
}, Dx = ({ property: t, onChange: e }) => {
|
|
12904
|
-
const n = Lr(t), r = M(() =>
|
|
12904
|
+
const n = Lr(t), r = M(() => N(n, "cls", ""), [n]), { canChange: o } = Wn(Rr), [s, i] = F([]), [l, c] = F({ color: "", shade: "" }), d = r.split("-"), u = N(d, "1", ""), p = N(d, "2", ""), h = R(
|
|
12905
12905
|
(b) => {
|
|
12906
12906
|
["current", "inherit", "transparent", "black", "white"].includes(b) ? (i([]), c({ color: b })) : (i(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), c((y) => ({ ...y, color: b, shade: y.shade ? y.shade : "500" })));
|
|
12907
12907
|
},
|
|
@@ -12923,7 +12923,7 @@ const Ox = {
|
|
|
12923
12923
|
}, [n]);
|
|
12924
12924
|
const { match: m } = Oo();
|
|
12925
12925
|
return H(() => {
|
|
12926
|
-
const y = `${
|
|
12926
|
+
const y = `${N(Ox, t, "")}-${l.color}${l.shade ? `-${l.shade}` : ""}`;
|
|
12927
12927
|
m(t, y) && e(y, t);
|
|
12928
12928
|
}, [m, l, e, t]), /* @__PURE__ */ g("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-transparent text-xs", children: [
|
|
12929
12929
|
/* @__PURE__ */ a("div", { className: "grow text-center", children: /* @__PURE__ */ a(
|
|
@@ -13162,8 +13162,8 @@ const Ox = {
|
|
|
13162
13162
|
] }),
|
|
13163
13163
|
static: qe
|
|
13164
13164
|
}, Mx = ({ property: t, onChange: e }) => {
|
|
13165
|
-
const { getClasses: n } = Oo(), r = n(t), { canChange: o } = Wn(Rr), s = Lr(t), i = M(() =>
|
|
13166
|
-
return /* @__PURE__ */ a("div", { className: "flex grow flex-wrap gap-1", children:
|
|
13165
|
+
const { getClasses: n } = Oo(), r = n(t), { canChange: o } = Wn(Rr), s = Lr(t), i = M(() => N(s, "cls", ""), [s]);
|
|
13166
|
+
return /* @__PURE__ */ a("div", { className: "flex grow flex-wrap gap-1", children: C(r, (l) => /* @__PURE__ */ g(Ee, { children: [
|
|
13167
13167
|
/* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(
|
|
13168
13168
|
"button",
|
|
13169
13169
|
{
|
|
@@ -13171,13 +13171,13 @@ const Ox = {
|
|
|
13171
13171
|
disabled: !o,
|
|
13172
13172
|
onClick: () => e(l, t),
|
|
13173
13173
|
className: `cursor-pointer rounded border border-border p-1 disabled:cursor-not-allowed ${i === l ? "bg-primary text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
13174
|
-
children: Q.createElement(
|
|
13174
|
+
children: Q.createElement(N(zd, l, Ps))
|
|
13175
13175
|
}
|
|
13176
13176
|
) }),
|
|
13177
13177
|
/* @__PURE__ */ a(ke, { children: Jt(Ja(l)) })
|
|
13178
13178
|
] })) });
|
|
13179
13179
|
}, $x = ({ property: t, onChange: e }) => {
|
|
13180
|
-
const { canReset: n, canChange: r } = Wn(Rr), o = Lr(t), s = M(() =>
|
|
13180
|
+
const { canReset: n, canChange: r } = Wn(Rr), o = Lr(t), s = M(() => N(o, "cls", ""), [o]), { getClasses: i } = Oo(), l = i(t, [""]), c = l.indexOf(s) > -1 ? l.indexOf(s) : 0, d = /\[.*\]/g.test(s);
|
|
13181
13181
|
return /* @__PURE__ */ a("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: d ? /* @__PURE__ */ a("div", { className: "px-2 py-[5px]", children: s }) : /* @__PURE__ */ g(Z, { children: [
|
|
13182
13182
|
/* @__PURE__ */ a(
|
|
13183
13183
|
"button",
|
|
@@ -13215,11 +13215,11 @@ const Ox = {
|
|
|
13215
13215
|
function Fx(t) {
|
|
13216
13216
|
if ($(t.trim())) return "";
|
|
13217
13217
|
const e = t.match(/sm:|md:|lg:|xl:|2xl:/g);
|
|
13218
|
-
return
|
|
13218
|
+
return N(e, 0, "xs").replace(":", "");
|
|
13219
13219
|
}
|
|
13220
13220
|
function zx(t) {
|
|
13221
|
-
const e =
|
|
13222
|
-
return
|
|
13221
|
+
const e = C(ih, (r) => `${r}:`).join("|"), n = new RegExp(e, "g");
|
|
13222
|
+
return N(n.exec(t.trim()), 0, "").replace(":", "");
|
|
13223
13223
|
}
|
|
13224
13224
|
function Hx(t) {
|
|
13225
13225
|
return t.trim().split(":").pop() || "";
|
|
@@ -13231,7 +13231,7 @@ function Vx(t) {
|
|
|
13231
13231
|
return ss[t];
|
|
13232
13232
|
let e = "";
|
|
13233
13233
|
for (const n in Pn) {
|
|
13234
|
-
const r =
|
|
13234
|
+
const r = N(Pn, `${n}.regExp`, "");
|
|
13235
13235
|
if (new RegExp(r, "g").test(t)) {
|
|
13236
13236
|
e = n, ss[t] = e;
|
|
13237
13237
|
break;
|
|
@@ -13291,8 +13291,8 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13291
13291
|
n.includes(t(i)._id)
|
|
13292
13292
|
)
|
|
13293
13293
|
), s = Ce(t(Ar));
|
|
13294
|
-
return
|
|
13295
|
-
const l = t(i), c =
|
|
13294
|
+
return C(o, (i) => {
|
|
13295
|
+
const l = t(i), c = N(l, s.prop, `${Dt},`), { classes: d } = Gn(c);
|
|
13296
13296
|
return {
|
|
13297
13297
|
ids: [l._id],
|
|
13298
13298
|
props: {
|
|
@@ -13320,9 +13320,9 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13320
13320
|
return n === -1 ? ["xs"] : e.slice(0, n + 1);
|
|
13321
13321
|
}, Ux = P((t) => {
|
|
13322
13322
|
const e = Ce(t(Ar)), n = t(No);
|
|
13323
|
-
if (!e || e.blockId !==
|
|
13324
|
-
const r =
|
|
13325
|
-
return ee(
|
|
13323
|
+
if (!e || e.blockId !== N(n, "_id", null)) return [];
|
|
13324
|
+
const r = N(n, e.prop, `${Dt},`), { classes: o } = Gn(r);
|
|
13325
|
+
return ee(C(o.trim().split(" "), Ri), (s) => !Bs(s));
|
|
13326
13326
|
}), Ba = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Kx = P((t) => {
|
|
13327
13327
|
const e = t(wd), n = t(Xs), r = t(wc), o = Gx(e);
|
|
13328
13328
|
let s = ee(t(Ux), { mod: n });
|
|
@@ -13339,7 +13339,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13339
13339
|
xl: 4,
|
|
13340
13340
|
"2xl": 5
|
|
13341
13341
|
};
|
|
13342
|
-
return n[
|
|
13342
|
+
return n[N(t, "mq", "xs")] <= n[e];
|
|
13343
13343
|
}, Xx = {
|
|
13344
13344
|
width: "w-",
|
|
13345
13345
|
height: "h-",
|
|
@@ -13415,12 +13415,12 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13415
13415
|
"2xl": "1536px"
|
|
13416
13416
|
}, qx = (t) => `${t.toUpperCase()} ${Ia[t] ? `(${Ia[t]} & up)` : ""}`, ho = (t) => {
|
|
13417
13417
|
const { t: e } = U(), { type: n = "icons", label: r, property: o, onEmitChange: s = () => {
|
|
13418
|
-
}, units: i, negative: l = !1 } = t, [c] = Tr(), [d] = Jx(), [, u] = fo(), p = Lr(o), h = Hd(), f = Ii(), [m] = re(), b = M(() =>
|
|
13419
|
-
(
|
|
13420
|
-
const
|
|
13421
|
-
(c || d !== "") && (
|
|
13422
|
-
const w = jx(
|
|
13423
|
-
h(m, [w],
|
|
13418
|
+
}, units: i, negative: l = !1 } = t, [c] = Tr(), [d] = Jx(), [, u] = fo(), p = Lr(o), h = Hd(), f = Ii(), [m] = re(), b = M(() => N(p, "fullCls", ""), [p]), y = R(
|
|
13419
|
+
(B, k = !0) => {
|
|
13420
|
+
const _ = { dark: c, mq: u, mod: d, cls: B };
|
|
13421
|
+
(c || d !== "") && (_.mq = "xs");
|
|
13422
|
+
const w = jx(_);
|
|
13423
|
+
h(m, [w], k);
|
|
13424
13424
|
},
|
|
13425
13425
|
[m, c, u, d, o, h]
|
|
13426
13426
|
), x = R(() => {
|
|
@@ -13429,19 +13429,19 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13429
13429
|
H(() => {
|
|
13430
13430
|
s(v, p);
|
|
13431
13431
|
}, [v, s, p]);
|
|
13432
|
-
const [, ,
|
|
13433
|
-
(
|
|
13434
|
-
|
|
13432
|
+
const [, , S] = fo(), E = R(
|
|
13433
|
+
(B) => {
|
|
13434
|
+
S({
|
|
13435
13435
|
xs: 400,
|
|
13436
13436
|
sm: 640,
|
|
13437
13437
|
md: 800,
|
|
13438
13438
|
lg: 1024,
|
|
13439
13439
|
xl: 1420,
|
|
13440
13440
|
"2xl": 1920
|
|
13441
|
-
}[
|
|
13441
|
+
}[B]);
|
|
13442
13442
|
},
|
|
13443
|
-
[
|
|
13444
|
-
), A =
|
|
13443
|
+
[S]
|
|
13444
|
+
), A = N(p, "dark", null) === c && N(p, "mod", null) === d && N(p, "mq", null) === u;
|
|
13445
13445
|
return /* @__PURE__ */ a(_x, { canChange: v, canReset: p && A, children: /* @__PURE__ */ g("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
13446
13446
|
/* @__PURE__ */ a("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ a("span", { className: `text-[11px] ${p && !A ? "text-foreground" : ""}`, children: e(r) }) }),
|
|
13447
13447
|
/* @__PURE__ */ g("div", { className: "flex flex-row items-center", children: [
|
|
@@ -13449,8 +13449,8 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13449
13449
|
n === "arbitrary" ? /* @__PURE__ */ a(
|
|
13450
13450
|
Ex,
|
|
13451
13451
|
{
|
|
13452
|
-
currentClass:
|
|
13453
|
-
classPrefix:
|
|
13452
|
+
currentClass: N(p, "cls", ""),
|
|
13453
|
+
classPrefix: N(Xx, o, ""),
|
|
13454
13454
|
units: i || [],
|
|
13455
13455
|
onChange: y,
|
|
13456
13456
|
negative: l,
|
|
@@ -13474,7 +13474,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13474
13474
|
/* @__PURE__ */ a(ke, { children: /* @__PURE__ */ a("div", { className: "text-right", children: /* @__PURE__ */ g("div", { children: [
|
|
13475
13475
|
"Current style is set at ",
|
|
13476
13476
|
/* @__PURE__ */ g("span", { className: "font-bold", children: [
|
|
13477
|
-
qx(
|
|
13477
|
+
qx(N(p, "mq")),
|
|
13478
13478
|
c && !p.dark ? "(Light mode)" : ""
|
|
13479
13479
|
] }),
|
|
13480
13480
|
/* @__PURE__ */ a("br", {}),
|
|
@@ -13482,11 +13482,11 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13482
13482
|
"button",
|
|
13483
13483
|
{
|
|
13484
13484
|
type: "button",
|
|
13485
|
-
onClick: () =>
|
|
13485
|
+
onClick: () => E(N(p, "mq")),
|
|
13486
13486
|
className: "block w-full cursor-default text-right font-semibold text-blue-500",
|
|
13487
13487
|
children: [
|
|
13488
13488
|
"Switch to ",
|
|
13489
|
-
|
|
13489
|
+
N(p, "mq").toUpperCase()
|
|
13490
13490
|
]
|
|
13491
13491
|
}
|
|
13492
13492
|
)
|
|
@@ -13503,7 +13503,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13503
13503
|
units: s = Zx,
|
|
13504
13504
|
negative: i = !1
|
|
13505
13505
|
}) => {
|
|
13506
|
-
const { t: l } = U(), [c, d] = F(e[0].key), u = Do(), p = R((h) =>
|
|
13506
|
+
const { t: l } = U(), [c, d] = F(e[0].key), u = Do(), p = R((h) => C(u, "property").includes(h), [u]);
|
|
13507
13507
|
return /* @__PURE__ */ g(
|
|
13508
13508
|
"div",
|
|
13509
13509
|
{
|
|
@@ -13522,7 +13522,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13522
13522
|
Q.createElement("div", {
|
|
13523
13523
|
className: p(f) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
13524
13524
|
}),
|
|
13525
|
-
Q.createElement(
|
|
13525
|
+
Q.createElement(N(zd, f, Ps), { className: "text-inherit w-3 h-3" })
|
|
13526
13526
|
]
|
|
13527
13527
|
}
|
|
13528
13528
|
) }),
|
|
@@ -13545,10 +13545,10 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
|
|
|
13545
13545
|
}, Ra = ({ heading: t, items: e }) => {
|
|
13546
13546
|
const { t: n } = U(), r = Do(), o = M(() => {
|
|
13547
13547
|
const s = (c) => Ot(
|
|
13548
|
-
c.map((d) => d.styleType === "multiple" ?
|
|
13548
|
+
c.map((d) => d.styleType === "multiple" ? C(d.options, "key") : d.property)
|
|
13549
13549
|
), i = Ot(
|
|
13550
|
-
e.map((c) => c.styleType === "accordion" ? s(c.items) : c.styleType === "multiple" ?
|
|
13551
|
-
), l =
|
|
13550
|
+
e.map((c) => c.styleType === "accordion" ? s(c.items) : c.styleType === "multiple" ? C(c.options, "key") : c.property)
|
|
13551
|
+
), l = C(r, "property");
|
|
13552
13552
|
return Uu(i, l).length > 0;
|
|
13553
13553
|
}, [r, e]);
|
|
13554
13554
|
return /* @__PURE__ */ g("details", { children: [
|
|
@@ -13702,11 +13702,11 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
|
|
|
13702
13702
|
activeButtonClass: o = ""
|
|
13703
13703
|
}) => {
|
|
13704
13704
|
const [s, , i] = fo(), [l, c] = _i(), [d, u] = r0(), p = d, h = u, { t: f } = U(), m = G("breakpoints", Ss), b = (v) => {
|
|
13705
|
-
p.includes(v) ? p.length > 2 && h(p.filter((
|
|
13705
|
+
p.includes(v) ? p.length > 2 && h(p.filter((S) => S !== v)) : h((S) => [...S, v]);
|
|
13706
13706
|
}, y = (v) => {
|
|
13707
13707
|
e || i(v), c(v);
|
|
13708
13708
|
}, x = bl(e ? l : s).toLowerCase();
|
|
13709
|
-
return m.length < 4 ? /* @__PURE__ */ a("div", { className: "flex items-center rounded-md", children:
|
|
13709
|
+
return m.length < 4 ? /* @__PURE__ */ a("div", { className: "flex items-center rounded-md", children: C(m, (v) => /* @__PURE__ */ fn(
|
|
13710
13710
|
Pa,
|
|
13711
13711
|
{
|
|
13712
13712
|
canvas: e,
|
|
@@ -13716,7 +13716,7 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
|
|
|
13716
13716
|
currentBreakpoint: x
|
|
13717
13717
|
}
|
|
13718
13718
|
)) }) : /* @__PURE__ */ g("div", { className: "flex w-full items-center justify-between rounded-md", children: [
|
|
13719
|
-
/* @__PURE__ */ a("div", { className: "flex items-center", children:
|
|
13719
|
+
/* @__PURE__ */ a("div", { className: "flex items-center", children: C(
|
|
13720
13720
|
m.filter((v) => Be(p, Go(v.breakpoint))),
|
|
13721
13721
|
(v) => /* @__PURE__ */ fn(
|
|
13722
13722
|
Pa,
|
|
@@ -13738,13 +13738,13 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
|
|
|
13738
13738
|
/* @__PURE__ */ g(mt, { className: "w-56 border-border text-xs", children: [
|
|
13739
13739
|
/* @__PURE__ */ a(Al, { children: f("Screen sizes") }),
|
|
13740
13740
|
/* @__PURE__ */ a(Tl, {}),
|
|
13741
|
-
|
|
13741
|
+
C(m, (v) => /* @__PURE__ */ a(
|
|
13742
13742
|
_l,
|
|
13743
13743
|
{
|
|
13744
13744
|
disabled: v.breakpoint === "xs",
|
|
13745
13745
|
onCheckedChange: () => b(Go(v.breakpoint)),
|
|
13746
13746
|
checked: Be(p, Go(v.breakpoint)),
|
|
13747
|
-
onSelect: (
|
|
13747
|
+
onSelect: (S) => S.preventDefault(),
|
|
13748
13748
|
children: f(v.title)
|
|
13749
13749
|
},
|
|
13750
13750
|
v.breakpoint
|
|
@@ -13792,29 +13792,29 @@ function Wd({
|
|
|
13792
13792
|
onRemove: r
|
|
13793
13793
|
}) {
|
|
13794
13794
|
var zt;
|
|
13795
|
-
const o = ie(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), p = ie(!1), [, h] = Gl(), f = Px(), { t: m } = U(), [b] = De(), y = de(), x = Hd(), v = Ii(), [
|
|
13795
|
+
const o = ie(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), p = ie(!1), [, h] = Gl(), f = Px(), { t: m } = U(), [b] = De(), y = de(), x = Hd(), v = Ii(), [S] = re(), [E, A] = F(""), B = Ge(kr), k = (zt = Ce(b)) == null ? void 0 : zt.prop, { classes: _ } = Gn(N(y, k, "")), T = (t === "default" ? _ : e ?? "").split(" ").filter((J) => !$(J)), L = M(() => [...T].sort((J, ae) => {
|
|
13796
13796
|
const Ve = J.startsWith(Or), Et = ae.startsWith(Or);
|
|
13797
13797
|
return Ve && !Et ? -1 : !Ve && Et ? 1 : 0;
|
|
13798
|
-
}), [
|
|
13798
|
+
}), [T]), I = G("flags.copyPaste", !0), W = (J) => {
|
|
13799
13799
|
if (J.startsWith(Or)) {
|
|
13800
|
-
const ae =
|
|
13800
|
+
const ae = B[J];
|
|
13801
13801
|
return ae ? ae.name : J;
|
|
13802
13802
|
}
|
|
13803
13803
|
return J;
|
|
13804
13804
|
}, K = (J) => {
|
|
13805
|
-
const ae = Object.entries(
|
|
13805
|
+
const ae = Object.entries(B).find(([, Ve]) => Ve.name === J);
|
|
13806
13806
|
return ae ? `${ae[0]}` : J;
|
|
13807
13807
|
}, q = () => {
|
|
13808
|
-
const J =
|
|
13809
|
-
t === "designToken" ? tn(n) && n(J) : x(
|
|
13808
|
+
const J = E.trim().replace(/ +(?= )/g, "").split(" ").map(K);
|
|
13809
|
+
t === "designToken" ? tn(n) && n(J) : x(S, J, !0), A("");
|
|
13810
13810
|
}, [xe, ve] = F([]), ue = G("flags.designTokens", !0), Me = ({ value: J }) => {
|
|
13811
13811
|
const ae = J.trim().toLowerCase(), Ve = ae.match(/.+:/g);
|
|
13812
13812
|
let Et = [], Vo = [];
|
|
13813
|
-
if (ue && (ae === "" ? Vo = Object.entries(
|
|
13813
|
+
if (ue && (ae === "" ? Vo = Object.entries(B).map(([Ht, Xn]) => ({
|
|
13814
13814
|
name: Xn.name,
|
|
13815
13815
|
id: `${Ht}`,
|
|
13816
13816
|
isDesignToken: !0
|
|
13817
|
-
})) : Vo = Object.entries(
|
|
13817
|
+
})) : Vo = Object.entries(B).filter(([, Ht]) => Ht.name.toLowerCase().includes(ae)).map(([Ht, Xn]) => ({
|
|
13818
13818
|
name: Xn.name,
|
|
13819
13819
|
id: `${Ht}`,
|
|
13820
13820
|
isDesignToken: !0
|
|
@@ -13826,7 +13826,7 @@ function Wd({
|
|
|
13826
13826
|
}));
|
|
13827
13827
|
} else
|
|
13828
13828
|
Et = f.search(ae);
|
|
13829
|
-
const Cu = [...Vo, ...
|
|
13829
|
+
const Cu = [...Vo, ...C(Et, "item")];
|
|
13830
13830
|
return ve(Cu);
|
|
13831
13831
|
}, tt = () => {
|
|
13832
13832
|
ve([]);
|
|
@@ -13841,14 +13841,14 @@ function Wd({
|
|
|
13841
13841
|
autoCapitalize: "off",
|
|
13842
13842
|
spellCheck: !1,
|
|
13843
13843
|
placeholder: m("Enter classes separated by space"),
|
|
13844
|
-
value:
|
|
13844
|
+
value: E,
|
|
13845
13845
|
onFocus: (J) => {
|
|
13846
13846
|
setTimeout(() => {
|
|
13847
13847
|
J.target && J.target.select();
|
|
13848
13848
|
}, 0);
|
|
13849
13849
|
},
|
|
13850
13850
|
onKeyDown: (J) => {
|
|
13851
|
-
if (J.key === "Enter" &&
|
|
13851
|
+
if (J.key === "Enter" && E.trim() !== "") {
|
|
13852
13852
|
if (p.current) {
|
|
13853
13853
|
p.current = !1;
|
|
13854
13854
|
return;
|
|
@@ -13869,16 +13869,16 @@ function Wd({
|
|
|
13869
13869
|
onChange: (J, { newValue: ae }) => A(ae),
|
|
13870
13870
|
className: `w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border ${t === "default" ? "py-1" : "py-1.5"}`
|
|
13871
13871
|
}),
|
|
13872
|
-
[
|
|
13872
|
+
[E, m, o, xe.length]
|
|
13873
13873
|
), qt = (J) => {
|
|
13874
13874
|
const ae = s.trim().replace(/ +(?= )/g, "").split(" ").map(K);
|
|
13875
|
-
v(
|
|
13875
|
+
v(S, [J], !0), x(S, ae, !0), i(""), u(-1);
|
|
13876
13876
|
}, _n = () => {
|
|
13877
13877
|
if (navigator.clipboard === void 0) {
|
|
13878
13878
|
Ne.error(m("Clipboard not supported"));
|
|
13879
13879
|
return;
|
|
13880
13880
|
}
|
|
13881
|
-
navigator.clipboard.writeText(
|
|
13881
|
+
navigator.clipboard.writeText(T.join(" ")), Ne.success(m("Classes copied to clipboard")), c(!0), setTimeout(() => c(!1), 2e3);
|
|
13882
13882
|
};
|
|
13883
13883
|
return /* @__PURE__ */ g(
|
|
13884
13884
|
"div",
|
|
@@ -13908,7 +13908,7 @@ function Wd({
|
|
|
13908
13908
|
onSuggestionSelected: (J, { suggestionValue: ae }) => {
|
|
13909
13909
|
p.current = !0;
|
|
13910
13910
|
const Et = [K(ae)];
|
|
13911
|
-
t === "designToken" ? tn(n) && n(Et) : x(
|
|
13911
|
+
t === "designToken" ? tn(n) && n(Et) : x(S, Et, !0), A("");
|
|
13912
13912
|
},
|
|
13913
13913
|
containerProps: {
|
|
13914
13914
|
className: "relative h-8 w-full gap-y-1 py-1 border-border text-xs"
|
|
@@ -13926,7 +13926,7 @@ function Wd({
|
|
|
13926
13926
|
variant: "outline",
|
|
13927
13927
|
className: `border-border ${t === "default" ? "h-6" : "mt-1 h-7"}`,
|
|
13928
13928
|
onClick: q,
|
|
13929
|
-
disabled:
|
|
13929
|
+
disabled: E.trim() === "",
|
|
13930
13930
|
size: "sm",
|
|
13931
13931
|
children: /* @__PURE__ */ a(Xe, {})
|
|
13932
13932
|
}
|
|
@@ -13957,7 +13957,7 @@ function Wd({
|
|
|
13957
13957
|
"button",
|
|
13958
13958
|
{
|
|
13959
13959
|
onDoubleClick: () => {
|
|
13960
|
-
A(W(J)), t === "default" ? v(
|
|
13960
|
+
A(W(J)), t === "default" ? v(S, [J], !0) : (tn(r) && r(J), A(J)), setTimeout(() => {
|
|
13961
13961
|
o.current && o.current.focus();
|
|
13962
13962
|
}, 10);
|
|
13963
13963
|
},
|
|
@@ -13968,7 +13968,7 @@ function Wd({
|
|
|
13968
13968
|
vo,
|
|
13969
13969
|
{
|
|
13970
13970
|
onClick: () => {
|
|
13971
|
-
t === "default" ? v(
|
|
13971
|
+
t === "default" ? v(S, [J], !0) : tn(r) && r(J);
|
|
13972
13972
|
},
|
|
13973
13973
|
className: "hidden h-max w-3.5 cursor-pointer rounded bg-gray-100 p-0.5 text-red-500 hover:bg-gray-50 group-hover:block"
|
|
13974
13974
|
}
|
|
@@ -14114,7 +14114,7 @@ function Oa() {
|
|
|
14114
14114
|
cssProperty: ""
|
|
14115
14115
|
}), l = mn(
|
|
14116
14116
|
(d) => {
|
|
14117
|
-
const u = !
|
|
14117
|
+
const u = !N(s, "negative", !1), p = N(s, "cssProperty", "");
|
|
14118
14118
|
let h = parseFloat(s.dragStartValue);
|
|
14119
14119
|
h = isNaN(h) ? 0 : h;
|
|
14120
14120
|
let f = c0[s.dragUnit];
|
|
@@ -14252,7 +14252,7 @@ const d0 = ({
|
|
|
14252
14252
|
gridCols: n = "grid-cols-2",
|
|
14253
14253
|
disableBlockGroupsSidebar: r = !1
|
|
14254
14254
|
}) => {
|
|
14255
|
-
const o = Fs(), s = Xa(o, "category"), i = As(
|
|
14255
|
+
const o = Fs(), s = Xa(o, "category"), i = As(C(s.core, "group"));
|
|
14256
14256
|
return /* @__PURE__ */ a(
|
|
14257
14257
|
eu,
|
|
14258
14258
|
{
|
|
@@ -14464,7 +14464,7 @@ function b0({
|
|
|
14464
14464
|
] }) : null;
|
|
14465
14465
|
}
|
|
14466
14466
|
const y0 = P({}), x0 = (t) => {
|
|
14467
|
-
const [e, n] = O(y0), r = M(() => (t == null ? void 0 : t.getBlocksList) || (() => []), [t]), o =
|
|
14467
|
+
const [e, n] = O(y0), r = M(() => (t == null ? void 0 : t.getBlocksList) || (() => []), [t]), o = N(e, `${t == null ? void 0 : t.id}.blocks`, null), s = N(e, `${t == null ? void 0 : t.id}.loading`, "idle"), i = N(e, `${t == null ? void 0 : t.id}.error`, !1), l = ie("idle");
|
|
14468
14468
|
H(() => {
|
|
14469
14469
|
(async () => {
|
|
14470
14470
|
if (t && !(s === "complete" || l.current === "loading")) {
|
|
@@ -14526,24 +14526,24 @@ const y0 = P({}), x0 = (t) => {
|
|
|
14526
14526
|
]
|
|
14527
14527
|
};
|
|
14528
14528
|
} else if (e) {
|
|
14529
|
-
const
|
|
14530
|
-
if ($(
|
|
14529
|
+
const S = typeof e == "function" ? await e() : e, E = to(S);
|
|
14530
|
+
if ($(E)) return;
|
|
14531
14531
|
v = {
|
|
14532
14532
|
type: "Box",
|
|
14533
|
-
blocks:
|
|
14534
|
-
name:
|
|
14533
|
+
blocks: E,
|
|
14534
|
+
name: N(E, "0._type", "Block")
|
|
14535
14535
|
};
|
|
14536
14536
|
} else if (n) {
|
|
14537
|
-
const
|
|
14538
|
-
if ($(
|
|
14537
|
+
const S = typeof n == "function" ? await n() : n;
|
|
14538
|
+
if ($(S)) return;
|
|
14539
14539
|
v = {
|
|
14540
14540
|
type: "Box",
|
|
14541
|
-
blocks:
|
|
14542
|
-
name: S
|
|
14541
|
+
blocks: S,
|
|
14542
|
+
name: N(S, "0._type", "Block")
|
|
14543
14543
|
};
|
|
14544
14544
|
} else if (t) {
|
|
14545
|
-
const
|
|
14546
|
-
v = typeof
|
|
14545
|
+
const S = typeof t == "function" ? await t() : t;
|
|
14546
|
+
v = typeof S == "object" ? xr(S, ["component", "icon"]) : S;
|
|
14547
14547
|
}
|
|
14548
14548
|
if (!v) return;
|
|
14549
14549
|
d(x, v, !0), setTimeout(() => {
|
|
@@ -14592,7 +14592,7 @@ const Da = ({
|
|
|
14592
14592
|
parentId: n = void 0,
|
|
14593
14593
|
position: r = -1
|
|
14594
14594
|
}) => {
|
|
14595
|
-
const [o, s] = F(!1), i = M(() => (e == null ? void 0 : e.getBlock) || (() => []), [e]), { addCoreBlock: l, addPredefinedBlock: c } = kn(), d =
|
|
14595
|
+
const [o, s] = F(!1), i = M(() => (e == null ? void 0 : e.getBlock) || (() => []), [e]), { addCoreBlock: l, addPredefinedBlock: c } = kn(), d = N(t, "name", N(t, "label")), u = N(t, "description", ""), { onDragStart: p, onDragEnd: h } = Jn(), f = yt(), m = R(
|
|
14596
14596
|
async (y) => {
|
|
14597
14597
|
if (y.stopPropagation(), pe(t, "component")) {
|
|
14598
14598
|
l(t, n, r), ge.publish(oe.CLOSE_ADD_BLOCK);
|
|
@@ -14652,26 +14652,26 @@ const Da = ({
|
|
|
14652
14652
|
const I = b.current.search(p).map((W) => W.item);
|
|
14653
14653
|
m(I);
|
|
14654
14654
|
}, [p]);
|
|
14655
|
-
const y = p.trim() && !$(f) ? f : l || [], x = Xa(y, "group"), [v,
|
|
14655
|
+
const y = p.trim() && !$(f) ? f : l || [], x = Xa(y, "group"), [v, S] = F(null);
|
|
14656
14656
|
H(() => {
|
|
14657
14657
|
if ($(Ct(x))) {
|
|
14658
|
-
|
|
14658
|
+
S(null);
|
|
14659
14659
|
return;
|
|
14660
14660
|
}
|
|
14661
14661
|
if (!v || !x[v]) {
|
|
14662
|
-
|
|
14662
|
+
S(Ce(Ct(x)) || null);
|
|
14663
14663
|
return;
|
|
14664
14664
|
}
|
|
14665
14665
|
}, [x, v]);
|
|
14666
|
-
const
|
|
14666
|
+
const E = N(x, v || "", []), A = ie(null), { t: B } = U(), k = ie(null);
|
|
14667
14667
|
H(() => {
|
|
14668
14668
|
var W;
|
|
14669
|
-
const I = (W =
|
|
14669
|
+
const I = (W = k.current) == null ? void 0 : W.querySelector("[data-radix-scroll-area-viewport]");
|
|
14670
14670
|
I && I.scrollTo({ top: 0, behavior: "smooth" });
|
|
14671
14671
|
}, [i, v]);
|
|
14672
|
-
const
|
|
14672
|
+
const _ = (I) => {
|
|
14673
14673
|
A.current && (clearTimeout(A.current), A.current = null), A.current = setTimeout(() => {
|
|
14674
|
-
A.current &&
|
|
14674
|
+
A.current && S(I);
|
|
14675
14675
|
}, 400);
|
|
14676
14676
|
}, w = () => {
|
|
14677
14677
|
i != null && i.id && u(i.id);
|
|
@@ -14681,7 +14681,7 @@ const Da = ({
|
|
|
14681
14681
|
/* @__PURE__ */ a(Fn, { className: "col-span-3 h-full" }),
|
|
14682
14682
|
/* @__PURE__ */ a(Fn, { className: "col-span-9 h-full" })
|
|
14683
14683
|
] });
|
|
14684
|
-
const
|
|
14684
|
+
const T = ee(E, (I, W) => W % 2 === 0), L = ee(E, (I, W) => W % 2 === 1);
|
|
14685
14685
|
return /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ g("div", { className: "flex h-full max-h-full flex-col", children: [
|
|
14686
14686
|
/* @__PURE__ */ a(Qd, { value: p, setValue: h }),
|
|
14687
14687
|
/* @__PURE__ */ a("div", { className: "relative flex h-full max-h-full flex-1 overflow-hidden bg-background", children: /* @__PURE__ */ g("div", { className: `flex h-full flex-1 pt-2 ${n ? "flex-col" : ""}`, children: [
|
|
@@ -14692,34 +14692,34 @@ const Da = ({
|
|
|
14692
14692
|
children: [
|
|
14693
14693
|
/* @__PURE__ */ a(b0, { library: i == null ? void 0 : i.id, setLibrary: o, uiLibraries: s }),
|
|
14694
14694
|
/* @__PURE__ */ g("div", { className: "mt-2 flex h-full max-h-full w-full flex-1 flex-col", children: [
|
|
14695
|
-
/* @__PURE__ */ a("span", { className: "text-xs font-bold text-gray-500", children:
|
|
14695
|
+
/* @__PURE__ */ a("span", { className: "text-xs font-bold text-gray-500", children: B("Groups") }),
|
|
14696
14696
|
!n && /* @__PURE__ */ a("hr", { className: "mt-1 border-border" }),
|
|
14697
14697
|
/* @__PURE__ */ a(
|
|
14698
14698
|
"div",
|
|
14699
14699
|
{
|
|
14700
14700
|
className: `no-scrollbar mt-2 h-full max-h-full flex-1 overflow-y-auto ${n ? "" : "pb-20"}`,
|
|
14701
|
-
children: $(x) ? /* @__PURE__ */ a("div", { className: "mt-4 flex flex-col items-center justify-center gap-3 p-4 text-center", children: p ? /* @__PURE__ */ a("p", { className: "text-sm", children:
|
|
14702
|
-
/* @__PURE__ */ a("p", { className: "text-sm", children:
|
|
14701
|
+
children: $(x) ? /* @__PURE__ */ a("div", { className: "mt-4 flex flex-col items-center justify-center gap-3 p-4 text-center", children: p ? /* @__PURE__ */ a("p", { className: "text-sm", children: B("No matching blocks found") }) : d ? /* @__PURE__ */ g(Z, { children: [
|
|
14702
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: B("Failed to load the UI library. Try again") }),
|
|
14703
14703
|
/* @__PURE__ */ g(te, { onClick: w, variant: "outline", size: "sm", className: "gap-2", children: [
|
|
14704
14704
|
/* @__PURE__ */ a(Os, { className: "h-4 w-4" }),
|
|
14705
|
-
|
|
14705
|
+
B("Retry")
|
|
14706
14706
|
] })
|
|
14707
|
-
] }) : /* @__PURE__ */ a("p", { className: "text-sm", children:
|
|
14708
|
-
/* @__PURE__ */ a(Fo, { className: "w-full", children: /* @__PURE__ */ a(Oi, { placeholder:
|
|
14709
|
-
/* @__PURE__ */ a(zo, { children:
|
|
14710
|
-
] }) :
|
|
14707
|
+
] }) : /* @__PURE__ */ a("p", { className: "text-sm", children: B("This library is empty") }) }) : n ? /* @__PURE__ */ g(Pi, { value: v ?? "", onValueChange: S, children: [
|
|
14708
|
+
/* @__PURE__ */ a(Fo, { className: "w-full", children: /* @__PURE__ */ a(Oi, { placeholder: B("Select a group") }) }),
|
|
14709
|
+
/* @__PURE__ */ a(zo, { children: C(x, (I, W) => /* @__PURE__ */ a(Ho, { value: W, children: Dn(B(W.toLowerCase())) }, W)) })
|
|
14710
|
+
] }) : C(x, (I, W) => /* @__PURE__ */ g(
|
|
14711
14711
|
"div",
|
|
14712
14712
|
{
|
|
14713
|
-
onMouseEnter: () =>
|
|
14713
|
+
onMouseEnter: () => _(W),
|
|
14714
14714
|
onMouseLeave: () => A.current && clearTimeout(A.current),
|
|
14715
14715
|
role: "button",
|
|
14716
|
-
onClick: () =>
|
|
14716
|
+
onClick: () => S(W),
|
|
14717
14717
|
className: j(
|
|
14718
14718
|
"flex w-full cursor-pointer items-center justify-between rounded-md p-2 text-sm text-foreground transition-all ease-in-out hover:bg-gray-200 dark:hover:bg-gray-800",
|
|
14719
14719
|
W === v ? "bg-primary text-primary-foreground hover:bg-primary/80" : ""
|
|
14720
14720
|
),
|
|
14721
14721
|
children: [
|
|
14722
|
-
/* @__PURE__ */ a("span", { children: Dn(
|
|
14722
|
+
/* @__PURE__ */ a("span", { children: Dn(B(W.toLowerCase())) }),
|
|
14723
14723
|
/* @__PURE__ */ a(Sp, { className: "ml-2 h-5 w-5" })
|
|
14724
14724
|
]
|
|
14725
14725
|
},
|
|
@@ -14734,12 +14734,12 @@ const Da = ({
|
|
|
14734
14734
|
/* @__PURE__ */ a("div", { className: `flex h-full max-h-full w-full flex-col border-border ${n ? "" : "border-l"}`, children: /* @__PURE__ */ g(
|
|
14735
14735
|
mo,
|
|
14736
14736
|
{
|
|
14737
|
-
ref:
|
|
14737
|
+
ref: k,
|
|
14738
14738
|
onMouseEnter: () => A.current && clearTimeout(A.current),
|
|
14739
14739
|
className: "z-10 flex h-full max-h-full w-full flex-col gap-2 transition-all ease-linear",
|
|
14740
14740
|
children: [
|
|
14741
|
-
$(
|
|
14742
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children:
|
|
14741
|
+
$(E) && !$(x) ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col items-center justify-center p-6 text-center", children: /* @__PURE__ */ a("p", { className: "text-sm", children: B("No blocks found in this group") }) }) : /* @__PURE__ */ g("div", { className: `grid w-full gap-2 ${n ? "grid-cols-1 pb-20" : "grid-cols-2 px-2"}`, children: [
|
|
14742
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: T.map((I, W) => /* @__PURE__ */ a(
|
|
14743
14743
|
Da,
|
|
14744
14744
|
{
|
|
14745
14745
|
parentId: t,
|
|
@@ -14799,21 +14799,21 @@ const Da = ({
|
|
|
14799
14799
|
}), p(!0);
|
|
14800
14800
|
else if (!s && Object.keys(o || {}).length > 0) {
|
|
14801
14801
|
const f = Object.entries(o).map(([b, y]) => {
|
|
14802
|
-
const x = y, v = x.type || "partial",
|
|
14802
|
+
const x = y, v = x.type || "partial", S = Ma(v);
|
|
14803
14803
|
return {
|
|
14804
14804
|
type: "PartialBlock",
|
|
14805
14805
|
// Set the type to PartialBlock
|
|
14806
14806
|
label: Ma(x.name || b),
|
|
14807
14807
|
description: x.description || "",
|
|
14808
14808
|
icon: Ep,
|
|
14809
|
-
group:
|
|
14809
|
+
group: S,
|
|
14810
14810
|
// Use formatted type as group
|
|
14811
14811
|
category: "partial",
|
|
14812
14812
|
partialBlockId: b,
|
|
14813
14813
|
// Store the original ID as partialBlockId
|
|
14814
14814
|
_name: x.name
|
|
14815
14815
|
};
|
|
14816
|
-
}), m = As(
|
|
14816
|
+
}), m = As(C(f, "group"));
|
|
14817
14817
|
d({
|
|
14818
14818
|
blocks: f,
|
|
14819
14819
|
groups: m,
|
|
@@ -14882,13 +14882,13 @@ const Da = ({
|
|
|
14882
14882
|
}, 500), () => {
|
|
14883
14883
|
x.current && x.current.cancel();
|
|
14884
14884
|
}), []);
|
|
14885
|
-
const
|
|
14885
|
+
const S = R((I) => {
|
|
14886
14886
|
y(I), x.current && x.current(I);
|
|
14887
|
-
}, []),
|
|
14887
|
+
}, []), E = R(() => {
|
|
14888
14888
|
y(null), x.current && x.current.cancel();
|
|
14889
14889
|
}, []), A = R((I) => {
|
|
14890
14890
|
x.current && x.current.cancel(), m(I), y(null);
|
|
14891
|
-
}, []),
|
|
14891
|
+
}, []), B = M(
|
|
14892
14892
|
() => c ? Tt(e).filter(
|
|
14893
14893
|
(I) => {
|
|
14894
14894
|
var W, K;
|
|
@@ -14896,36 +14896,36 @@ const Da = ({
|
|
|
14896
14896
|
}
|
|
14897
14897
|
) : e,
|
|
14898
14898
|
[e, c]
|
|
14899
|
-
),
|
|
14899
|
+
), k = M(
|
|
14900
14900
|
() => c ? t.filter(
|
|
14901
|
-
(I) => jr(ee(Tt(
|
|
14901
|
+
(I) => jr(ee(Tt(B), { group: I }), { hidden: !0 }).length > 0
|
|
14902
14902
|
) : t.filter((I) => jr(ee(Tt(e), { group: I }), { hidden: !0 }).length > 0),
|
|
14903
|
-
[e,
|
|
14904
|
-
),
|
|
14905
|
-
() => Ku(
|
|
14906
|
-
[
|
|
14907
|
-
), w = M(() => f === "all" ?
|
|
14903
|
+
[e, B, t, c]
|
|
14904
|
+
), _ = M(
|
|
14905
|
+
() => Ku(k, (I) => $a.indexOf(I) === -1 ? 99 : $a.indexOf(I)),
|
|
14906
|
+
[k]
|
|
14907
|
+
), w = M(() => f === "all" ? B : ee(Tt(B), { group: f }), [B, f]), T = M(() => f === "all" ? _ : [f], [_, f]);
|
|
14908
14908
|
return /* @__PURE__ */ g("div", { className: "mx-auto flex h-full w-full flex-col", children: [
|
|
14909
14909
|
/* @__PURE__ */ a(Qd, { value: c, setValue: d }),
|
|
14910
14910
|
/* @__PURE__ */ g("div", { className: "sticky top-10 flex h-[calc(100%-48px)] overflow-hidden pt-2", children: [
|
|
14911
|
-
!s &&
|
|
14911
|
+
!s && _.length > 0 && /* @__PURE__ */ a("div", { className: "w-1/4 min-w-[120px] border-r border-border", children: /* @__PURE__ */ a(mo, { className: "h-full", children: /* @__PURE__ */ g("div", { className: "space-y-1", children: [
|
|
14912
14912
|
/* @__PURE__ */ a(
|
|
14913
14913
|
"button",
|
|
14914
14914
|
{
|
|
14915
14915
|
onClick: () => A("all"),
|
|
14916
|
-
onMouseEnter: () =>
|
|
14917
|
-
onMouseLeave:
|
|
14916
|
+
onMouseEnter: () => S("all"),
|
|
14917
|
+
onMouseLeave: E,
|
|
14918
14918
|
className: `w-full rounded-md px-2 py-1.5 text-left text-sm font-medium ${f === "all" || b === "all" ? "bg-primary text-primary-foreground" : "hover:bg-primary/50 hover:text-primary-foreground"}`,
|
|
14919
14919
|
children: i("All")
|
|
14920
14920
|
},
|
|
14921
14921
|
"sidebar-all"
|
|
14922
14922
|
),
|
|
14923
|
-
|
|
14923
|
+
_.map((I) => /* @__PURE__ */ a(
|
|
14924
14924
|
"button",
|
|
14925
14925
|
{
|
|
14926
14926
|
onClick: () => A(I),
|
|
14927
|
-
onMouseEnter: () =>
|
|
14928
|
-
onMouseLeave:
|
|
14927
|
+
onMouseEnter: () => S(I),
|
|
14928
|
+
onMouseLeave: E,
|
|
14929
14929
|
className: `w-full rounded-md px-2 py-1.5 text-left text-sm ${f === I || b === I ? "bg-primary text-primary-foreground" : "hover:bg-primary/50 hover:text-primary-foreground"}`,
|
|
14930
14930
|
children: Dn(i(I.toLowerCase()))
|
|
14931
14931
|
},
|
|
@@ -14935,13 +14935,13 @@ const Da = ({
|
|
|
14935
14935
|
/* @__PURE__ */ a(
|
|
14936
14936
|
"div",
|
|
14937
14937
|
{
|
|
14938
|
-
className: `h-full flex-1 overflow-hidden ${!s &&
|
|
14939
|
-
children: /* @__PURE__ */ a(mo, { id: "add-blocks-scroll-area", className: "no-scrollbar h-full", children:
|
|
14938
|
+
className: `h-full flex-1 overflow-hidden ${!s && _.length > 0 ? "w-3/4" : "w-full"}`,
|
|
14939
|
+
children: /* @__PURE__ */ a(mo, { id: "add-blocks-scroll-area", className: "no-scrollbar h-full", children: k.length === 0 && c ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center p-8 text-center text-muted-foreground", children: /* @__PURE__ */ g("p", { children: [
|
|
14940
14940
|
i("No blocks found matching"),
|
|
14941
14941
|
' "',
|
|
14942
14942
|
c,
|
|
14943
14943
|
'"'
|
|
14944
|
-
] }) }) : /* @__PURE__ */ a("div", { className: `${s ? "p-0" : "p-4"} space-y-6`, children:
|
|
14944
|
+
] }) }) : /* @__PURE__ */ a("div", { className: `${s ? "p-0" : "p-4"} space-y-6`, children: T.map((I, W) => /* @__PURE__ */ g("div", { className: "space-y-3", children: [
|
|
14945
14945
|
/* @__PURE__ */ a("h3", { className: "px-1 text-sm font-medium", children: Dn(i(I.toLowerCase())) }),
|
|
14946
14946
|
/* @__PURE__ */ a("div", { className: "grid gap-2 " + o, children: jr(
|
|
14947
14947
|
f === "all" ? ee(Tt(w), { group: I }) : Tt(w),
|
|
@@ -14996,7 +14996,7 @@ const Da = ({
|
|
|
14996
14996
|
/* @__PURE__ */ a(lt, { value: "core", className: o ? "h-5 px-2 text-xs" : "", children: s("Blocks") }),
|
|
14997
14997
|
p && /* @__PURE__ */ a(lt, { value: "partials", className: o ? "h-5 px-2 text-xs" : "", children: s("Partials") }),
|
|
14998
14998
|
b ? /* @__PURE__ */ a(lt, { value: "html", className: o ? "h-5 px-2 text-xs" : "", children: s("Import") }) : null,
|
|
14999
|
-
|
|
14999
|
+
C(m, (v) => /* @__PURE__ */ a(
|
|
15000
15000
|
lt,
|
|
15001
15001
|
{
|
|
15002
15002
|
value: v.id,
|
|
@@ -15026,7 +15026,7 @@ const Da = ({
|
|
|
15026
15026
|
}
|
|
15027
15027
|
) }) }) }),
|
|
15028
15028
|
b ? /* @__PURE__ */ a(jt, { value: "html", className: "h-full max-h-full flex-1 pb-20 ", children: /* @__PURE__ */ a(f0, { parentId: n, position: r, fromSidebar: o }) }) : null,
|
|
15029
|
-
|
|
15029
|
+
C(m, (v) => /* @__PURE__ */ a(jt, { value: v.id, children: Q.createElement(v.tabContent, { close: f, parentId: n, position: r }) }, `panel-add-block-${v.id}`))
|
|
15030
15030
|
]
|
|
15031
15031
|
}
|
|
15032
15032
|
)
|
|
@@ -15045,7 +15045,7 @@ const Da = ({
|
|
|
15045
15045
|
};
|
|
15046
15046
|
return /* @__PURE__ */ a("div", { style: { ..._0, ...r }, children: /* @__PURE__ */ a("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
|
|
15047
15047
|
}), Fa = "h-3 w-3 flex-shrink-0", Di = (t) => {
|
|
15048
|
-
const e = Fs(), n =
|
|
15048
|
+
const e = Fs(), n = N(e, [t.type, "icon"]);
|
|
15049
15049
|
return n ? Q.createElement(n, { className: Fa }) : /* @__PURE__ */ a(_p, { className: Fa });
|
|
15050
15050
|
}, T0 = vn(function({ children: e, isDragging: n }) {
|
|
15051
15051
|
return n ? /* @__PURE__ */ a("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: e }) : null;
|
|
@@ -15452,17 +15452,17 @@ const uu = () => {
|
|
|
15452
15452
|
var Me, tt;
|
|
15453
15453
|
const { t: r } = U(), o = Ft(), [s] = O(To), { hasPermission: i } = bt();
|
|
15454
15454
|
let l = null;
|
|
15455
|
-
const c = t.children && t.children.length > 0, { highlightBlock: d, clearHighlight: u } = Nt(), p = yt(), { id: h, data: f, isSelected: m, willReceiveDrop: b, isDragging: y, isEditing: x, handleClick: v } = t,
|
|
15455
|
+
const c = t.children && t.children.length > 0, { highlightBlock: d, clearHighlight: u } = Nt(), p = yt(), { id: h, data: f, isSelected: m, willReceiveDrop: b, isDragging: y, isEditing: x, handleClick: v } = t, S = uu(), E = M(() => S.getBlockErrors(h), [S, h]), A = N(f, "_show", !0), B = (X) => {
|
|
15456
15456
|
X.stopPropagation(), A && t.toggle();
|
|
15457
|
-
}, C = (X) => {
|
|
15458
|
-
X.isInternal && (l = X.isOpen, X.isOpen && X.close());
|
|
15459
15457
|
}, k = (X) => {
|
|
15458
|
+
X.isInternal && (l = X.isOpen, X.isOpen && X.close());
|
|
15459
|
+
}, _ = (X) => {
|
|
15460
15460
|
X.isInternal && l !== null && (l ? X.open() : X.close(), l = null);
|
|
15461
|
-
}, [w,
|
|
15461
|
+
}, [w, T] = O(J0), L = () => {
|
|
15462
15462
|
var X, nt;
|
|
15463
|
-
I(), (X = t.parent) != null && X.isSelected ||
|
|
15463
|
+
I(), (X = t.parent) != null && X.isSelected || T((nt = t == null ? void 0 : t.parent) == null ? void 0 : nt.id);
|
|
15464
15464
|
}, I = () => {
|
|
15465
|
-
|
|
15465
|
+
T(null);
|
|
15466
15466
|
}, W = (X) => {
|
|
15467
15467
|
I(), X.stopPropagation(), !t.isOpen && A && t.toggle(), v(X);
|
|
15468
15468
|
};
|
|
@@ -15480,7 +15480,7 @@ const uu = () => {
|
|
|
15480
15480
|
!(_n.top >= zt.top && _n.left >= zt.left && _n.bottom <= zt.bottom && _n.right <= zt.right) && Xt && (Xt.documentElement.scrollTop = qt.offsetTop - zt.top);
|
|
15481
15481
|
}, q = (X) => {
|
|
15482
15482
|
I();
|
|
15483
|
-
const nt =
|
|
15483
|
+
const nt = N(t, "parent.id");
|
|
15484
15484
|
nt !== "__REACT_ARBORIST_INTERNAL_ROOT__" ? ge.publish(oe.OPEN_ADD_BLOCK, { _id: nt, position: X }) : ge.publish(oe.OPEN_ADD_BLOCK, { position: X });
|
|
15485
15485
|
};
|
|
15486
15486
|
if (h === Wr)
|
|
@@ -15511,8 +15511,8 @@ const uu = () => {
|
|
|
15511
15511
|
style: e,
|
|
15512
15512
|
"data-node-id": h,
|
|
15513
15513
|
ref: n,
|
|
15514
|
-
onDragStart: () =>
|
|
15515
|
-
onDragEnd: () =>
|
|
15514
|
+
onDragStart: () => k(t),
|
|
15515
|
+
onDragEnd: () => _(t),
|
|
15516
15516
|
onDragOver: (X) => {
|
|
15517
15517
|
X.preventDefault(), K(h, "yes");
|
|
15518
15518
|
},
|
|
@@ -15523,7 +15523,7 @@ const uu = () => {
|
|
|
15523
15523
|
X.preventDefault(), K(h, "no");
|
|
15524
15524
|
},
|
|
15525
15525
|
children: [
|
|
15526
|
-
i(me.ADD_BLOCK) && !p && (t == null ? void 0 : t.rowIndex) !== null && (t == null ? void 0 : t.rowIndex) !== void 0 && (t == null ? void 0 : t.rowIndex) > 0 && (((Me = t.parent) == null ? void 0 : Me.isOpen) && no(
|
|
15526
|
+
i(me.ADD_BLOCK) && !p && (t == null ? void 0 : t.rowIndex) !== null && (t == null ? void 0 : t.rowIndex) !== void 0 && (t == null ? void 0 : t.rowIndex) > 0 && (((Me = t.parent) == null ? void 0 : Me.isOpen) && no(N(t, "parent.data._type")) || ((tt = t == null ? void 0 : t.parent) == null ? void 0 : tt.id) === "__REACT_ARBORIST_INTERNAL_ROOT__") && /* @__PURE__ */ a("div", { className: "group relative ml-5 h-full w-full cursor-pointer", children: /* @__PURE__ */ a(
|
|
15527
15527
|
"div",
|
|
15528
15528
|
{
|
|
15529
15529
|
onClick: (X) => {
|
|
@@ -15553,7 +15553,7 @@ const uu = () => {
|
|
|
15553
15553
|
"div",
|
|
15554
15554
|
{
|
|
15555
15555
|
className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
|
|
15556
|
-
children: c && /* @__PURE__ */ a("button", { onClick:
|
|
15556
|
+
children: c && /* @__PURE__ */ a("button", { onClick: B, type: "button", children: /* @__PURE__ */ a(jn, { className: "h-3 w-3" }) })
|
|
15557
15557
|
}
|
|
15558
15558
|
),
|
|
15559
15559
|
/* @__PURE__ */ g(
|
|
@@ -15567,7 +15567,7 @@ const uu = () => {
|
|
|
15567
15567
|
ue && m && "text-purple-800"
|
|
15568
15568
|
),
|
|
15569
15569
|
children: [
|
|
15570
|
-
|
|
15570
|
+
E.length > 0 ? /* @__PURE__ */ a("div", { className: "text-red-500", children: /* @__PURE__ */ a(dl, { className: "h-3 w-3" }) }) : /* @__PURE__ */ a(Di, { type: f == null ? void 0 : f._type }),
|
|
15571
15571
|
x ? /* @__PURE__ */ a(K0, { node: t }) : /* @__PURE__ */ a(
|
|
15572
15572
|
"div",
|
|
15573
15573
|
{
|
|
@@ -15680,96 +15680,96 @@ const uu = () => {
|
|
|
15680
15680
|
const [t] = O(Il), [e, n] = re(), [r] = Bo(), o = Ft(), [, s] = De(), { moveBlocks: i } = ze(), l = Q0(), c = ie(null), [, d] = O(si), { t: u } = U(), [p, h] = F(null), f = () => {
|
|
15681
15681
|
n([]), s([]);
|
|
15682
15682
|
}, m = M(() => {
|
|
15683
|
-
const
|
|
15683
|
+
const k = (w, T) => w.filter((L) => !T.includes(L._id)).map((L) => ({
|
|
15684
15684
|
...L,
|
|
15685
|
-
children: L.children ?
|
|
15685
|
+
children: L.children ? k(L.children, T) : []
|
|
15686
15686
|
}));
|
|
15687
|
-
return [...
|
|
15688
|
-
}, [t, r]), b = ({ id:
|
|
15689
|
-
o([
|
|
15690
|
-
}, y = ({ dragIds:
|
|
15691
|
-
l(
|
|
15692
|
-
}, x = (
|
|
15693
|
-
if (
|
|
15694
|
-
const
|
|
15695
|
-
s([]), n([
|
|
15696
|
-
}, v = (
|
|
15697
|
-
var
|
|
15698
|
-
|
|
15699
|
-
const
|
|
15700
|
-
w ? (s([]), n([w])) : (s([]), n([]), h({ x:
|
|
15701
|
-
},
|
|
15702
|
-
({ parentNode:
|
|
15687
|
+
return [...k(t, r), { _type: Wr, _id: Wr, children: [] }];
|
|
15688
|
+
}, [t, r]), b = ({ id: k, name: _, node: w }) => {
|
|
15689
|
+
o([k], { _name: _ }, w.data._name);
|
|
15690
|
+
}, y = ({ dragIds: k, parentId: _, index: w }) => {
|
|
15691
|
+
l(k, _) && i(k, _, w);
|
|
15692
|
+
}, x = (k) => {
|
|
15693
|
+
if (k.length === 0) return;
|
|
15694
|
+
const _ = k[0] ? k[0].id : "";
|
|
15695
|
+
s([]), n([_]);
|
|
15696
|
+
}, v = (k) => {
|
|
15697
|
+
var T;
|
|
15698
|
+
k.preventDefault(), p && h(null);
|
|
15699
|
+
const _ = k.target, w = _.getAttribute("data-node-id") || ((T = _.closest("[data-node-id]")) == null ? void 0 : T.getAttribute("data-node-id"));
|
|
15700
|
+
w ? (s([]), n([w])) : (s([]), n([]), h({ x: k.clientX, y: k.clientY }));
|
|
15701
|
+
}, S = Ut(
|
|
15702
|
+
({ parentNode: k, dragNodes: _ }) => {
|
|
15703
15703
|
var w;
|
|
15704
|
-
return (
|
|
15704
|
+
return (k == null ? void 0 : k.data._type) === Wr || !gt(k == null ? void 0 : k.data._type, (w = _[0]) == null ? void 0 : w.data._type);
|
|
15705
15705
|
},
|
|
15706
15706
|
[],
|
|
15707
15707
|
300
|
|
15708
|
-
),
|
|
15709
|
-
if (!
|
|
15708
|
+
), E = (k, _) => {
|
|
15709
|
+
if (!k) return !0;
|
|
15710
15710
|
const w = {
|
|
15711
|
-
isLeaf: !
|
|
15712
|
-
isClosed: !
|
|
15713
|
-
isOpen:
|
|
15711
|
+
isLeaf: !_.isInternal,
|
|
15712
|
+
isClosed: !_.isOpen,
|
|
15713
|
+
isOpen: _.isOpen
|
|
15714
15714
|
};
|
|
15715
15715
|
try {
|
|
15716
|
-
let
|
|
15716
|
+
let T = k;
|
|
15717
15717
|
return Object.keys(w).forEach((L) => {
|
|
15718
15718
|
const I = new RegExp(`\\b${L}\\b`, "g");
|
|
15719
|
-
|
|
15720
|
-
}), new Function(`return ${
|
|
15719
|
+
T = T.replace(I, String(w[L]));
|
|
15720
|
+
}), new Function(`return ${T}`)();
|
|
15721
15721
|
} catch {
|
|
15722
|
-
return console.warn("Invalid condition expression:",
|
|
15722
|
+
return console.warn("Invalid condition expression:", k), !1;
|
|
15723
15723
|
}
|
|
15724
|
-
}, A = (
|
|
15724
|
+
}, A = (k) => {
|
|
15725
15725
|
if (!c.current) return;
|
|
15726
|
-
const
|
|
15726
|
+
const _ = c.current, w = _.selectedNodes[0];
|
|
15727
15727
|
if (!w) return;
|
|
15728
15728
|
n([w.id]), s([]);
|
|
15729
|
-
const
|
|
15730
|
-
(K) => K.key ===
|
|
15729
|
+
const T = !w.isInternal, L = !w.isOpen, I = w.isOpen, W = I0.find(
|
|
15730
|
+
(K) => K.key === k.key && (!K.when || E(K.when, w))
|
|
15731
15731
|
);
|
|
15732
15732
|
if (W)
|
|
15733
|
-
switch (
|
|
15733
|
+
switch (k.preventDefault(), W.command) {
|
|
15734
15734
|
case "selectNext":
|
|
15735
|
-
P0(
|
|
15735
|
+
P0(_);
|
|
15736
15736
|
break;
|
|
15737
15737
|
case "selectPrev":
|
|
15738
|
-
O0(
|
|
15738
|
+
O0(_);
|
|
15739
15739
|
break;
|
|
15740
15740
|
case "selectParent":
|
|
15741
|
-
D0(
|
|
15741
|
+
D0(_, T || L);
|
|
15742
15742
|
break;
|
|
15743
15743
|
case "close":
|
|
15744
|
-
$0(
|
|
15744
|
+
$0(_, I);
|
|
15745
15745
|
break;
|
|
15746
15746
|
case "open":
|
|
15747
|
-
M0(
|
|
15747
|
+
M0(_, L);
|
|
15748
15748
|
break;
|
|
15749
15749
|
case "selectFirst":
|
|
15750
|
-
R0(
|
|
15750
|
+
R0(_);
|
|
15751
15751
|
break;
|
|
15752
15752
|
case "selectLast":
|
|
15753
|
-
L0(
|
|
15753
|
+
L0(_);
|
|
15754
15754
|
break;
|
|
15755
15755
|
}
|
|
15756
15756
|
};
|
|
15757
15757
|
H(() => {
|
|
15758
|
-
const
|
|
15758
|
+
const k = () => {
|
|
15759
15759
|
c.current && d(c.current);
|
|
15760
15760
|
};
|
|
15761
|
-
|
|
15762
|
-
const
|
|
15763
|
-
return
|
|
15761
|
+
k();
|
|
15762
|
+
const _ = new MutationObserver(k);
|
|
15763
|
+
return _.observe(document.body, { childList: !0, subtree: !0 }), () => _.disconnect();
|
|
15764
15764
|
}, [d]);
|
|
15765
|
-
const { hasPermission:
|
|
15765
|
+
const { hasPermission: B } = bt();
|
|
15766
15766
|
return $(t) ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("div", { className: "mt-10 flex h-full w-full items-center justify-center p-8", children: /* @__PURE__ */ g("div", { className: "flex flex-col items-center space-y-6 text-center", children: [
|
|
15767
15767
|
/* @__PURE__ */ a("div", { className: "rounded-full bg-muted p-6", children: /* @__PURE__ */ a(ul, { className: "h-12 w-12 text-muted-foreground" }) }),
|
|
15768
15768
|
/* @__PURE__ */ g("div", { className: "space-y-2", children: [
|
|
15769
15769
|
/* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-foreground", children: u("This page is empty") }),
|
|
15770
15770
|
/* @__PURE__ */ a("p", { className: "max-w-sm text-sm text-muted-foreground", children: u("Get started by adding your first block to begin building your page") })
|
|
15771
15771
|
] }),
|
|
15772
|
-
|
|
15772
|
+
B(me.ADD_BLOCK) && /* @__PURE__ */ g(
|
|
15773
15773
|
te,
|
|
15774
15774
|
{
|
|
15775
15775
|
onClick: () => ge.publish(oe.OPEN_ADD_BLOCK),
|
|
@@ -15787,22 +15787,22 @@ const uu = () => {
|
|
|
15787
15787
|
{
|
|
15788
15788
|
id: "outline-view ",
|
|
15789
15789
|
className: "no-scrollbar h-full overflow-y-auto text-sm",
|
|
15790
|
-
onKeyDown: (
|
|
15791
|
-
c.current && !c.current.isEditing && A(
|
|
15790
|
+
onKeyDown: (k) => {
|
|
15791
|
+
c.current && !c.current.isEditing && A(k);
|
|
15792
15792
|
},
|
|
15793
15793
|
children: [
|
|
15794
15794
|
/* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-end gap-x-1 pb-2 text-sm text-muted-foreground", children: [
|
|
15795
15795
|
/* @__PURE__ */ g(Ee, { children: [
|
|
15796
15796
|
/* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(te, { className: "h-fit p-1", onClick: () => {
|
|
15797
|
-
var
|
|
15798
|
-
return (
|
|
15797
|
+
var k;
|
|
15798
|
+
return (k = c == null ? void 0 : c.current) == null ? void 0 : k.openAll();
|
|
15799
15799
|
}, variant: "ghost", size: "sm", children: /* @__PURE__ */ a(Ip, { className: "h-2 w-2" }) }) }),
|
|
15800
15800
|
/* @__PURE__ */ a(ke, { className: "isolate z-[9999]", children: u("Expand all") })
|
|
15801
15801
|
] }),
|
|
15802
15802
|
/* @__PURE__ */ g(Ee, { children: [
|
|
15803
15803
|
/* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(te, { className: "h-fit p-1", onClick: () => {
|
|
15804
|
-
var
|
|
15805
|
-
return (
|
|
15804
|
+
var k;
|
|
15805
|
+
return (k = c == null ? void 0 : c.current) == null ? void 0 : k.closeAll();
|
|
15806
15806
|
}, variant: "ghost", size: "sm", children: /* @__PURE__ */ a(Rp, { className: "h-2 w-2" }) }) }),
|
|
15807
15807
|
/* @__PURE__ */ a(ke, { className: "isolate z-[9999]", children: u("Collapse all") })
|
|
15808
15808
|
] })
|
|
@@ -15856,13 +15856,13 @@ const uu = () => {
|
|
|
15856
15856
|
data: [...m],
|
|
15857
15857
|
renderCursor: A0,
|
|
15858
15858
|
onSelect: x,
|
|
15859
|
-
childrenAccessor: (
|
|
15859
|
+
childrenAccessor: (k) => k.children,
|
|
15860
15860
|
width: "100%",
|
|
15861
15861
|
rowHeight: 25,
|
|
15862
15862
|
renderDragPreview: B0,
|
|
15863
15863
|
indent: 10,
|
|
15864
15864
|
onContextMenu: v,
|
|
15865
|
-
disableDrop:
|
|
15865
|
+
disableDrop: S,
|
|
15866
15866
|
idAccessor: "_id",
|
|
15867
15867
|
children: X0
|
|
15868
15868
|
}
|
|
@@ -16113,7 +16113,7 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
|
|
|
16113
16113
|
"popover-foreground": ["#3d3436", "#f2e9e4"]
|
|
16114
16114
|
}
|
|
16115
16115
|
}, cv = $s(
|
|
16116
|
-
() => import("./css-import-modal-
|
|
16116
|
+
() => import("./css-import-modal-Co_YLkLB.js").then((t) => ({ default: t.CssImportModal }))
|
|
16117
16117
|
), hu = "chai-builder-previous-theme", dv = [
|
|
16118
16118
|
{ shadcn_default: ov },
|
|
16119
16119
|
{ twitter_theme: sv },
|
|
@@ -16135,138 +16135,140 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
|
|
|
16135
16135
|
console.warn("Failed to clear previous theme from localStorage:", t);
|
|
16136
16136
|
}
|
|
16137
16137
|
}, fv = V.memo(({ className: t = "" }) => {
|
|
16138
|
-
const [e, n] = Tr(), [r, o] = V.useState(""), [s, i] = V.useState(!1), l = G("themePresets", {}), c = G("themePanelComponent", null), { hasPermission: d } = bt(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !0), h = Kl();
|
|
16139
|
-
(!l || l.length === 0) && dv.map((
|
|
16140
|
-
l.push(
|
|
16138
|
+
const [e, n] = Tr(), [r, o] = V.useState(""), [s, i] = V.useState(!1), l = G("themePresets", {}), c = G("themePanelComponent", null), { hasPermission: d } = bt(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !0), h = G("flags.fontsInTheme", !1), f = Kl();
|
|
16139
|
+
(!l || l.length === 0) && dv.map((w) => {
|
|
16140
|
+
l.push(w);
|
|
16141
16141
|
});
|
|
16142
|
-
const [
|
|
16143
|
-
(
|
|
16144
|
-
const
|
|
16145
|
-
uv(
|
|
16142
|
+
const [m, b] = Eo(), y = Nr(), { t: x } = U(), v = V.useCallback(
|
|
16143
|
+
(w) => {
|
|
16144
|
+
const T = { ...m };
|
|
16145
|
+
uv(T), b(w), f(), Ne.success("Theme updated", {
|
|
16146
16146
|
action: {
|
|
16147
16147
|
label: /* @__PURE__ */ g("span", { className: "flex items-center gap-2", children: [
|
|
16148
16148
|
/* @__PURE__ */ a(Qr, { className: "h-4 w-4" }),
|
|
16149
16149
|
" Undo"
|
|
16150
16150
|
] }),
|
|
16151
16151
|
onClick: () => {
|
|
16152
|
-
|
|
16152
|
+
b(T), pv(), Ne.dismiss();
|
|
16153
16153
|
}
|
|
16154
16154
|
},
|
|
16155
16155
|
closeButton: !0,
|
|
16156
16156
|
duration: 15e3
|
|
16157
16157
|
});
|
|
16158
16158
|
},
|
|
16159
|
-
[
|
|
16160
|
-
),
|
|
16161
|
-
const
|
|
16162
|
-
if (
|
|
16163
|
-
const
|
|
16164
|
-
|
|
16159
|
+
[m, b, f]
|
|
16160
|
+
), S = () => {
|
|
16161
|
+
const w = l.find((T) => Object.keys(T)[0] === r);
|
|
16162
|
+
if (w) {
|
|
16163
|
+
const T = Object.values(w)[0];
|
|
16164
|
+
T && typeof T == "object" && "fontFamily" in T && "borderRadius" in T && "colors" in T ? (v(T), o(""), f()) : console.error("Invalid preset structure:", T);
|
|
16165
16165
|
} else
|
|
16166
16166
|
console.error("Preset not found:", r);
|
|
16167
|
-
}, E = (
|
|
16168
|
-
|
|
16169
|
-
},
|
|
16170
|
-
(
|
|
16171
|
-
|
|
16172
|
-
...
|
|
16167
|
+
}, E = (w) => {
|
|
16168
|
+
v(w), o(""), f();
|
|
16169
|
+
}, A = Ut(
|
|
16170
|
+
(w, T) => {
|
|
16171
|
+
b(() => ({
|
|
16172
|
+
...m,
|
|
16173
16173
|
fontFamily: {
|
|
16174
|
-
...
|
|
16175
|
-
[
|
|
16174
|
+
...m.fontFamily,
|
|
16175
|
+
[w.replace(/font-/g, "")]: T
|
|
16176
16176
|
}
|
|
16177
|
-
})),
|
|
16177
|
+
})), f();
|
|
16178
16178
|
},
|
|
16179
|
-
[
|
|
16179
|
+
[m, f],
|
|
16180
16180
|
200
|
|
16181
|
-
),
|
|
16182
|
-
(
|
|
16183
|
-
|
|
16184
|
-
...
|
|
16185
|
-
borderRadius: `${
|
|
16186
|
-
})),
|
|
16181
|
+
), B = V.useCallback(
|
|
16182
|
+
(w) => {
|
|
16183
|
+
b(() => ({
|
|
16184
|
+
...m,
|
|
16185
|
+
borderRadius: `${w}px`
|
|
16186
|
+
})), f();
|
|
16187
16187
|
},
|
|
16188
|
-
[
|
|
16189
|
-
),
|
|
16190
|
-
(
|
|
16191
|
-
|
|
16192
|
-
const
|
|
16193
|
-
return e ? We(
|
|
16194
|
-
...
|
|
16188
|
+
[m, f]
|
|
16189
|
+
), k = Ut(
|
|
16190
|
+
(w, T) => {
|
|
16191
|
+
b(() => {
|
|
16192
|
+
const L = N(m, `colors.${w}`);
|
|
16193
|
+
return e ? We(L, 1, T) : We(L, 0, T), f(), {
|
|
16194
|
+
...m,
|
|
16195
16195
|
colors: {
|
|
16196
|
-
...
|
|
16197
|
-
[
|
|
16196
|
+
...m.colors,
|
|
16197
|
+
[w]: L
|
|
16198
16198
|
}
|
|
16199
16199
|
};
|
|
16200
16200
|
});
|
|
16201
16201
|
},
|
|
16202
|
-
[
|
|
16202
|
+
[m, f],
|
|
16203
16203
|
200
|
|
16204
|
-
),
|
|
16205
|
-
const
|
|
16206
|
-
return
|
|
16204
|
+
), _ = (w) => /* @__PURE__ */ a("div", { className: "grid grid-cols-1", children: Object.entries(w.items).map(([T]) => {
|
|
16205
|
+
const L = N(m, `colors.${T}.${e ? 1 : 0}`);
|
|
16206
|
+
return L ? /* @__PURE__ */ g("div", { id: `theme-${T}`, className: "mt-1 flex items-center gap-x-2", children: [
|
|
16207
16207
|
/* @__PURE__ */ a(
|
|
16208
16208
|
nv,
|
|
16209
16209
|
{
|
|
16210
|
-
value:
|
|
16211
|
-
onChange: (
|
|
16210
|
+
value: L,
|
|
16211
|
+
onChange: (I) => k(T, I)
|
|
16212
16212
|
}
|
|
16213
16213
|
),
|
|
16214
|
-
/* @__PURE__ */ a(Kt, { className: "text-xs font-normal leading-tight", children:
|
|
16215
|
-
] },
|
|
16214
|
+
/* @__PURE__ */ a(Kt, { className: "text-xs font-normal leading-tight", children: T.split(/(?=[A-Z])/).join(" ").replace(/-/g, " ").split(" ").map((I) => I.charAt(0).toUpperCase() + I.slice(1)).join(" ") + (!T.toLowerCase().includes("foreground") && !T.toLowerCase().includes("border") && !T.toLowerCase().includes("input") && !T.toLowerCase().includes("ring") && !T.toLowerCase().includes("background") ? " Background" : "") })
|
|
16215
|
+
] }, T) : null;
|
|
16216
16216
|
}) });
|
|
16217
16217
|
return d("edit_theme") ? /* @__PURE__ */ g("div", { className: "relative w-full", children: [
|
|
16218
16218
|
/* @__PURE__ */ g("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto", t), children: [
|
|
16219
16219
|
l.length > 0 && /* @__PURE__ */ g("div", { className: "mx-0 my-2 flex flex-col gap-1 py-2", children: [
|
|
16220
16220
|
/* @__PURE__ */ g("div", { className: "flex w-full items-center justify-between", children: [
|
|
16221
|
-
/* @__PURE__ */ a(Kt, { className: "text-sm", children:
|
|
16221
|
+
/* @__PURE__ */ a(Kt, { className: "text-sm", children: x("Presets") }),
|
|
16222
16222
|
/* @__PURE__ */ a("div", { className: "flex gap-2", children: u && /* @__PURE__ */ g(te, { className: "px-1", variant: "link", size: "sm", onClick: () => i(!0), children: [
|
|
16223
16223
|
/* @__PURE__ */ a(Lp, { className: "h-4 w-4" }),
|
|
16224
|
-
|
|
16224
|
+
x("Import theme")
|
|
16225
16225
|
] }) })
|
|
16226
16226
|
] }),
|
|
16227
16227
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-2 px-0", children: [
|
|
16228
16228
|
/* @__PURE__ */ a("div", { className: "w-[70%]", children: /* @__PURE__ */ g(Pi, { value: r, onValueChange: o, children: [
|
|
16229
|
-
/* @__PURE__ */ a(Fo, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Oi, { placeholder:
|
|
16230
|
-
/* @__PURE__ */ a(zo, { children: Array.isArray(l) && l.map((
|
|
16231
|
-
const
|
|
16232
|
-
return /* @__PURE__ */ a(Ho, { value:
|
|
16229
|
+
/* @__PURE__ */ a(Fo, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Oi, { placeholder: x("Select preset") }) }),
|
|
16230
|
+
/* @__PURE__ */ a(zo, { children: Array.isArray(l) && l.map((w) => {
|
|
16231
|
+
const T = Object.keys(w)[0], L = T.replaceAll("_", " ");
|
|
16232
|
+
return /* @__PURE__ */ a(Ho, { value: T, children: Dn(L) }, T);
|
|
16233
16233
|
}) })
|
|
16234
16234
|
] }) }),
|
|
16235
|
-
/* @__PURE__ */ a("div", { className: "w-[25%]", children: /* @__PURE__ */ a(te, { className: "w-full text-sm", disabled: !r, onClick:
|
|
16235
|
+
/* @__PURE__ */ a("div", { className: "w-[25%]", children: /* @__PURE__ */ a(te, { className: "w-full text-sm", disabled: !r, onClick: S, children: x("Apply") }) })
|
|
16236
16236
|
] })
|
|
16237
16237
|
] }),
|
|
16238
16238
|
/* @__PURE__ */ a(On, {}),
|
|
16239
16239
|
/* @__PURE__ */ g("div", { className: ht("my-2 space-y-3", t), children: [
|
|
16240
|
-
/* @__PURE__ */ g(
|
|
16241
|
-
/* @__PURE__ */
|
|
16242
|
-
|
|
16240
|
+
h && /* @__PURE__ */ g(Z, { children: [
|
|
16241
|
+
/* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
16242
|
+
/* @__PURE__ */ a(Pp, { className: "h-3 w-3 text-gray-600" }),
|
|
16243
|
+
/* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Typography") })
|
|
16244
|
+
] }),
|
|
16245
|
+
(y == null ? void 0 : y.fontFamily) && /* @__PURE__ */ a("div", { className: "space-y-2", children: Object.entries(y.fontFamily).map(([w, T]) => /* @__PURE__ */ a(
|
|
16246
|
+
rv,
|
|
16247
|
+
{
|
|
16248
|
+
label: w,
|
|
16249
|
+
value: m.fontFamily[w.replace(/font-/g, "")] || T[Object.keys(T)[0]],
|
|
16250
|
+
onChange: (L) => A(w, L)
|
|
16251
|
+
},
|
|
16252
|
+
w
|
|
16253
|
+
)) }),
|
|
16254
|
+
/* @__PURE__ */ a(On, {})
|
|
16243
16255
|
] }),
|
|
16244
|
-
(
|
|
16245
|
-
rv,
|
|
16246
|
-
{
|
|
16247
|
-
label: k,
|
|
16248
|
-
value: f.fontFamily[k.replace(/font-/g, "")] || w[Object.keys(w)[0]],
|
|
16249
|
-
onChange: (B) => _(k, B)
|
|
16250
|
-
},
|
|
16251
|
-
k
|
|
16252
|
-
)) }),
|
|
16253
|
-
/* @__PURE__ */ a(On, {}),
|
|
16254
|
-
(b == null ? void 0 : b.borderRadius) && /* @__PURE__ */ g("div", { className: "space-y-0.5", children: [
|
|
16256
|
+
(y == null ? void 0 : y.borderRadius) && /* @__PURE__ */ g("div", { className: "space-y-0.5", children: [
|
|
16255
16257
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
16256
16258
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
16257
16259
|
/* @__PURE__ */ a(Op, { className: "h-3 w-3 text-gray-600" }),
|
|
16258
|
-
/* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children:
|
|
16260
|
+
/* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Border Radius") })
|
|
16259
16261
|
] }),
|
|
16260
|
-
/* @__PURE__ */ a(Ai, { variant: "secondary", className: "text-xs", children:
|
|
16262
|
+
/* @__PURE__ */ a(Ai, { variant: "secondary", className: "text-xs", children: m.borderRadius })
|
|
16261
16263
|
] }),
|
|
16262
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-4 py-2", children: /* @__PURE__ */ a(tv, { value:
|
|
16264
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-4 py-2", children: /* @__PURE__ */ a(tv, { value: m.borderRadius, onChange: B }) })
|
|
16263
16265
|
] }),
|
|
16264
16266
|
/* @__PURE__ */ a(On, {}),
|
|
16265
|
-
(
|
|
16267
|
+
(y == null ? void 0 : y.colors) && /* @__PURE__ */ g("div", { className: "space-y-3", children: [
|
|
16266
16268
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
16267
16269
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
16268
16270
|
/* @__PURE__ */ a(eo, { className: "h-3 w-3 text-gray-600" }),
|
|
16269
|
-
/* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children:
|
|
16271
|
+
/* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Colors") })
|
|
16270
16272
|
] }),
|
|
16271
16273
|
p && /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
16272
16274
|
/* @__PURE__ */ a(pl, { className: "h-4 w-4" }),
|
|
@@ -16274,17 +16276,17 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
|
|
|
16274
16276
|
Pr,
|
|
16275
16277
|
{
|
|
16276
16278
|
checked: e,
|
|
16277
|
-
onCheckedChange: (
|
|
16278
|
-
"aria-label":
|
|
16279
|
+
onCheckedChange: (w) => n(w),
|
|
16280
|
+
"aria-label": x("Toggle dark mode"),
|
|
16279
16281
|
className: "mx-1"
|
|
16280
16282
|
}
|
|
16281
16283
|
),
|
|
16282
16284
|
/* @__PURE__ */ a(fl, { className: "h-4 w-4" })
|
|
16283
16285
|
] })
|
|
16284
16286
|
] }),
|
|
16285
|
-
/* @__PURE__ */ a("div", { className: "space-y-2", children:
|
|
16287
|
+
/* @__PURE__ */ a("div", { className: "space-y-2", children: y.colors.map((w) => _(w)) })
|
|
16286
16288
|
] }),
|
|
16287
|
-
/* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children:
|
|
16289
|
+
/* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: x("Loading...") }), children: s && u && /* @__PURE__ */ a(
|
|
16288
16290
|
cv,
|
|
16289
16291
|
{
|
|
16290
16292
|
open: s,
|
|
@@ -16299,7 +16301,7 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
|
|
|
16299
16301
|
/* @__PURE__ */ a("br", {})
|
|
16300
16302
|
] }),
|
|
16301
16303
|
c && /* @__PURE__ */ a("div", { className: "absolute bottom-4 w-full", children: V.createElement(c) })
|
|
16302
|
-
] }) : /* @__PURE__ */ a("div", { className: "relative w-full", children: /* @__PURE__ */ a("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto text-center", t), children: /* @__PURE__ */ a("div", { className: "mt-10 h-full items-center justify-center gap-2 text-muted-foreground", children: /* @__PURE__ */ a("p", { className: "text-sm", children:
|
|
16304
|
+
] }) : /* @__PURE__ */ a("div", { className: "relative w-full", children: /* @__PURE__ */ a("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto text-center", t), children: /* @__PURE__ */ a("div", { className: "mt-10 h-full items-center justify-center gap-2 text-muted-foreground", children: /* @__PURE__ */ a("p", { className: "text-sm", children: x("You don't have permission to edit the theme. Please contact your administrator to get access.") }) }) }) });
|
|
16303
16305
|
}), hv = "Core", mv = "Import", gv = "Breakpoints", bv = "Clear", yv = "Cancel", xv = "Yes", vv = "Preview", wv = "Settings", kv = "Style", Cv = "Enter SVG code here", Nv = "Remove", Sv = "Choose", Ev = "Cut", _v = "Copy", Av = "Paste", Tv = "Delete", Bv = "classes", Iv = "Theme", Rv = "Outline", Lv = "Copied", Pv = "Stop", Ov = "Edit", Dv = "Tag", Mv = "Value", $v = "URL", Fv = "Images", zv = "Library", Hv = "Blocks", Vv = "Basic", jv = "Media", Wv = "Advanced", Gv = "Form", Uv = "Groups", Kv = "Accordions", Jv = "Buttons", Yv = "Layouts", Xv = "FAQ", qv = "Hero", Zv = "Features", Qv = "Footer", ew = "Navbar", tw = "Icons", nw = "Testimonials", rw = "Blog", ow = "Saved", sw = "Unsaved", iw = "Randomize", aw = "Classes", lw = "All", cw = "Undo", dw = "Redo", uw = "Duplicate", pw = "Close", fw = "Selected", hw = "Select", mw = "Attributes", gw = "apply", bw = "presets", yw = "Orientation", xw = "Color", vw = "Upload", ww = "Apply", kw = "Back", Cw = "Insert", Nw = "Rename", Sw = "Partials", Ew = "Happy", _w = "Sad", Aw = "Retry", Tw = "Canvas is empty", Bw = "Presets", Iw = "No", Rw = "Saving", Lw = { heading_font: "Heading Font", body_font: "Body Font", rounded_corner: "Rounded Corners", primary: "Primary", secondary: "Secondary", background: "Background", text_color: "Text Color", background_dark_mode: "Background (Dark Mode)", text_color_dark_mode: "Text Color (Dark Mode)" }, Pw = { box: "box", tag: "Tag", div: "div", level: "Level", header: "header", footer: "footer", section: "section", article: "article", aside: "aside", main: "main", nav: "navigation", figure: "figure", details: "details", summary: "summary", dialog: "dialog", strike: "strike", caption: "caption", legend: "legend", figcaption: "figure caption", mark: "mark", background_image: "Background Image", label: "Label", default: "default", icon_size: "Icon Size", icon_position: "Icon Position", start: "Start", end: "End", button: "Button", custom_html: "Custom HTML", html_code: "HTML Code", default_snippet: "The HTML snippet goes here...", placeholder: "Enter custom HTML code here", custom_script: "Custom Script", dark_mode: "Dark Mode", divider: "Divider", empty_box: "Empty Box", heading: "Heading", image: "Image", alt: "Alt", width: "Width", height: "Height", video: "Video", span: "Span", content: "Content", icon: "Icon", richtext: "Rich Text", list: "List", list_type: "List Type", listitem: "List Item", link: "Link", list_item: "List Item", none: "None", disc: "Disc", number: "Number", paragraph: "Paragraph", lightbox_link: "Lightbox Link", href: "Link", type: "Type", iframe: "iframe", inline: "inline", ajax: "ajax", autoplay: "Video autoplay", max_width: "Max Width", backdrop_color: "Background Color", gallery_name: "Gallery Name", slot: "Slot", empty_slot: "Empty Slot", text: "Text", video_url: "Video URL", controls: "Show Controls", loop: "Loop", muted: "Muted", checkbox: "Checkbox", required: "Required", checked: "Checked", submit_button: "Submit Button", form: "Form", submit_url: "Submit URL", error_message: "Error Message", success_message: "Success Message", input: "Input", value: "Value", show_label: "Show Label", field_name: "Field Name", radio: "Radio", multiple: "Multiple", options: "Options", select: "Select", multiple_choice: "Multiple Choice", textarea: "Textarea", rows: "Rows" }, Ow = "Add", Dw = "Save", Mw = "Screen", $w = {
|
|
16304
16306
|
"Add block": "Add Block",
|
|
16305
16307
|
"Add Block": "Add Block",
|
|
@@ -16774,15 +16776,15 @@ const mu = (t, e) => {
|
|
|
16774
16776
|
return n = Rt([...n, ...Fw(e, t, n)]), n;
|
|
16775
16777
|
}, zw = (t, e, n) => go(
|
|
16776
16778
|
t.map((r) => {
|
|
16777
|
-
const o = ["_id", "_type", "_parent"], s = bo(r, o), i = Oe(r._type), l = {}, c =
|
|
16779
|
+
const o = ["_id", "_type", "_parent"], s = bo(r, o), i = Oe(r._type), l = {}, c = N(i, "aiProps", []);
|
|
16778
16780
|
for (const d in r)
|
|
16779
16781
|
if (!o.includes(d) && c.includes(d)) {
|
|
16780
|
-
const u =
|
|
16782
|
+
const u = N(r, `${d}-${e}`, ""), p = N(r, d, "");
|
|
16781
16783
|
l[d] = Vn(u) && u.trim() || p, n && (l[d] = p);
|
|
16782
16784
|
}
|
|
16783
16785
|
return $(l) ? !1 : (pe(s, "_parent") && $(s._parent) && delete s._parent, { ...s, ...l });
|
|
16784
16786
|
})
|
|
16785
|
-
), Hw = (t, e, n) => !e || n !== "content" ? t : `${t}. Generate content in ${
|
|
16787
|
+
), Hw = (t, e, n) => !e || n !== "content" ? t : `${t}. Generate content in ${N(Hn, e, e)} language.`, Vw = P(!1), gu = () => {
|
|
16786
16788
|
const [t, e] = O(Vw), [n, r] = F(null), o = G("askAiCallBack", kt), s = qf(), i = Yf(), [l] = fe(), { selectedLang: c, fallbackLang: d } = Ke(), u = c.length ? c : d, p = (h, f) => {
|
|
16787
16789
|
const m = qr(f.find((b) => b._id === h));
|
|
16788
16790
|
for (const b in m) {
|
|
@@ -16801,23 +16803,23 @@ const mu = (t, e) => {
|
|
|
16801
16803
|
if (o) {
|
|
16802
16804
|
e(!0), r(null);
|
|
16803
16805
|
try {
|
|
16804
|
-
const y = c === d ? "" : c, x = m.toLowerCase().includes("translate the content"), v = h === "content" ? zw(qr(mu(f, l)), c, x) : [p(f, l)],
|
|
16805
|
-
if (
|
|
16806
|
-
const { blocks:
|
|
16806
|
+
const y = c === d ? "" : c, x = m.toLowerCase().includes("translate the content"), v = h === "content" ? zw(qr(mu(f, l)), c, x) : [p(f, l)], S = await o(h, Hw(m, u, h), v, y);
|
|
16807
|
+
if (S === void 0) return;
|
|
16808
|
+
const { blocks: E, error: A } = S;
|
|
16807
16809
|
if (A) {
|
|
16808
16810
|
r(A);
|
|
16809
16811
|
return;
|
|
16810
16812
|
}
|
|
16811
16813
|
if (h === "styles") {
|
|
16812
|
-
const
|
|
16813
|
-
for (const
|
|
16814
|
-
|
|
16815
|
-
return
|
|
16814
|
+
const B = E.map((k) => {
|
|
16815
|
+
for (const _ in k)
|
|
16816
|
+
_ !== "_id" && (k[_] = `${Dt},${k[_]}`);
|
|
16817
|
+
return k;
|
|
16816
16818
|
});
|
|
16817
|
-
i(
|
|
16819
|
+
i(B);
|
|
16818
16820
|
} else
|
|
16819
|
-
s(
|
|
16820
|
-
b && b(
|
|
16821
|
+
s(E);
|
|
16822
|
+
b && b(S);
|
|
16821
16823
|
} catch (y) {
|
|
16822
16824
|
r(y);
|
|
16823
16825
|
} finally {
|
|
@@ -16881,10 +16883,10 @@ function jw({ onClick: t }) {
|
|
|
16881
16883
|
}
|
|
16882
16884
|
]];
|
|
16883
16885
|
return r && r !== o && i.splice(0, 0, {
|
|
16884
|
-
name: n("Translate to {{lang}}", { lang:
|
|
16886
|
+
name: n("Translate to {{lang}}", { lang: N(Hn, r, r) }),
|
|
16885
16887
|
icon: $p,
|
|
16886
16888
|
prompt: n("Translate the content to {{lang}}. Maintain same tone, style and length.", {
|
|
16887
|
-
lang:
|
|
16889
|
+
lang: N(Hn, r, r)
|
|
16888
16890
|
})
|
|
16889
16891
|
}), /* @__PURE__ */ a("div", { className: e ? "pointer-events-none opacity-50" : "", children: /* @__PURE__ */ a("ul", { className: "space-y-1", children: i.map(
|
|
16890
16892
|
({ name: l, icon: c, subMenus: d, prompt: u }) => d ? /* @__PURE__ */ g(Td, { children: [
|
|
@@ -17093,43 +17095,43 @@ const qw = () => {
|
|
|
17093
17095
|
return;
|
|
17094
17096
|
}
|
|
17095
17097
|
if (s) {
|
|
17096
|
-
const
|
|
17097
|
-
n == null || n(
|
|
17098
|
+
const k = [...r, { key: s, value: l }];
|
|
17099
|
+
n == null || n(k), o(r), i(""), c(""), h("");
|
|
17098
17100
|
}
|
|
17099
|
-
}, v = (
|
|
17100
|
-
const
|
|
17101
|
-
n == null || n(
|
|
17102
|
-
},
|
|
17103
|
-
u(
|
|
17104
|
-
},
|
|
17101
|
+
}, v = (k) => {
|
|
17102
|
+
const _ = r.filter((w, T) => T !== k);
|
|
17103
|
+
n == null || n(_), o(_);
|
|
17104
|
+
}, S = (k) => {
|
|
17105
|
+
u(k), i(r[k].key), c(r[k].value);
|
|
17106
|
+
}, E = () => {
|
|
17105
17107
|
if (s.startsWith("@")) {
|
|
17106
17108
|
h(y("Attribute keys cannot start with @"));
|
|
17107
17109
|
return;
|
|
17108
17110
|
}
|
|
17109
17111
|
if (d !== null && s) {
|
|
17110
|
-
const
|
|
17111
|
-
|
|
17112
|
+
const k = [...r];
|
|
17113
|
+
k[d] = { key: s, value: l }, n == null || n(k), o(k), u(null), i(""), c(""), h("");
|
|
17112
17114
|
}
|
|
17113
|
-
}, A = (
|
|
17114
|
-
|
|
17115
|
-
},
|
|
17116
|
-
const
|
|
17115
|
+
}, A = (k) => {
|
|
17116
|
+
k.key === "Enter" && !k.shiftKey && (k.preventDefault(), d !== null ? E() : x());
|
|
17117
|
+
}, B = R((k) => {
|
|
17118
|
+
const _ = (L) => /[.,!?;:]/.test(L), w = (L, I, W) => {
|
|
17117
17119
|
let K = "", q = "";
|
|
17118
17120
|
const xe = I > 0 ? L[I - 1] : "", ve = I < L.length ? L[I] : "";
|
|
17119
|
-
return I > 0 && (xe === "." || !
|
|
17121
|
+
return I > 0 && (xe === "." || !_(xe) && xe !== " ") && (K = " "), I < L.length && !_(ve) && ve !== " " && (q = " "), {
|
|
17120
17122
|
text: K + W + q,
|
|
17121
17123
|
prefixLength: K.length,
|
|
17122
17124
|
suffixLength: q.length
|
|
17123
17125
|
};
|
|
17124
|
-
},
|
|
17125
|
-
if (
|
|
17126
|
-
const L =
|
|
17126
|
+
}, T = m.current;
|
|
17127
|
+
if (T) {
|
|
17128
|
+
const L = T.selectionStart || 0, I = T.value || "", W = T.selectionEnd || L;
|
|
17127
17129
|
if (W > L) {
|
|
17128
|
-
const ue = `{{${
|
|
17130
|
+
const ue = `{{${k}}}`, { text: Me } = w(I, L, ue), tt = I.slice(0, L) + Me + I.slice(W);
|
|
17129
17131
|
c(tt);
|
|
17130
17132
|
return;
|
|
17131
17133
|
}
|
|
17132
|
-
const q = `{{${
|
|
17134
|
+
const q = `{{${k}}}`, { text: xe } = w(I, L, q), ve = I.slice(0, L) + xe + I.slice(L);
|
|
17133
17135
|
c(ve);
|
|
17134
17136
|
}
|
|
17135
17137
|
}, []);
|
|
@@ -17137,8 +17139,8 @@ const qw = () => {
|
|
|
17137
17139
|
/* @__PURE__ */ g(
|
|
17138
17140
|
"form",
|
|
17139
17141
|
{
|
|
17140
|
-
onSubmit: (
|
|
17141
|
-
|
|
17142
|
+
onSubmit: (k) => {
|
|
17143
|
+
k.preventDefault(), d !== null ? E() : x();
|
|
17142
17144
|
},
|
|
17143
17145
|
className: "space-y-3",
|
|
17144
17146
|
children: [
|
|
@@ -17154,7 +17156,7 @@ const qw = () => {
|
|
|
17154
17156
|
id: "attrKey",
|
|
17155
17157
|
ref: f,
|
|
17156
17158
|
value: s,
|
|
17157
|
-
onChange: (
|
|
17159
|
+
onChange: (k) => i(k.target.value),
|
|
17158
17160
|
placeholder: y("Enter key"),
|
|
17159
17161
|
className: "py-0 text-xs font-normal leading-tight placeholder:text-slate-400"
|
|
17160
17162
|
}
|
|
@@ -17163,7 +17165,7 @@ const qw = () => {
|
|
|
17163
17165
|
/* @__PURE__ */ g("div", { className: "w-full", children: [
|
|
17164
17166
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
17165
17167
|
/* @__PURE__ */ a(Kt, { htmlFor: "attrValue", className: "text-[11px] font-normal text-slate-600", children: y("Value") }),
|
|
17166
|
-
!$(b) && /* @__PURE__ */ a(Id, { data: b, onSelect:
|
|
17168
|
+
!$(b) && /* @__PURE__ */ a(Id, { data: b, onSelect: B })
|
|
17167
17169
|
] }),
|
|
17168
17170
|
/* @__PURE__ */ a(
|
|
17169
17171
|
$o,
|
|
@@ -17174,7 +17176,7 @@ const qw = () => {
|
|
|
17174
17176
|
id: "attrValue",
|
|
17175
17177
|
ref: m,
|
|
17176
17178
|
value: l,
|
|
17177
|
-
onChange: (
|
|
17179
|
+
onChange: (k) => c(k.target.value),
|
|
17178
17180
|
onKeyDown: A,
|
|
17179
17181
|
placeholder: y("Enter value"),
|
|
17180
17182
|
className: "text-xs font-normal leading-tight placeholder:text-slate-400"
|
|
@@ -17187,30 +17189,30 @@ const qw = () => {
|
|
|
17187
17189
|
]
|
|
17188
17190
|
}
|
|
17189
17191
|
),
|
|
17190
|
-
/* @__PURE__ */ a("div", { className: "space-y-1 py-4", children: r.map((
|
|
17192
|
+
/* @__PURE__ */ a("div", { className: "space-y-1 py-4", children: r.map((k, _) => /* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded border p-2 text-sm", children: [
|
|
17191
17193
|
/* @__PURE__ */ g("div", { className: "flex flex-col text-xs leading-tight", children: [
|
|
17192
|
-
/* @__PURE__ */ a("span", { className: "truncate text-[12px] font-light text-muted-foreground", children:
|
|
17193
|
-
/* @__PURE__ */ a("span", { className: "max-w-[200px] text-wrap font-normal", children:
|
|
17194
|
+
/* @__PURE__ */ a("span", { className: "truncate text-[12px] font-light text-muted-foreground", children: k.key }),
|
|
17195
|
+
/* @__PURE__ */ a("span", { className: "max-w-[200px] text-wrap font-normal", children: k.value.toString() })
|
|
17194
17196
|
] }),
|
|
17195
17197
|
/* @__PURE__ */ g("div", { className: "flex-shrink-0 text-slate-400", children: [
|
|
17196
|
-
/* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () =>
|
|
17197
|
-
/* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => v(
|
|
17198
|
+
/* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => S(_), children: /* @__PURE__ */ a(yo, { className: "h-3 w-3" }) }),
|
|
17199
|
+
/* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => v(_), children: /* @__PURE__ */ a(qe, { className: "h-3 w-3" }) })
|
|
17198
17200
|
] })
|
|
17199
|
-
] },
|
|
17201
|
+
] }, _)) })
|
|
17200
17202
|
] });
|
|
17201
17203
|
}), Qw = V.memo(() => {
|
|
17202
|
-
const t = de(), [e, n] = F([]), [r] = De(), o = Ft(), s = `${
|
|
17204
|
+
const t = de(), [e, n] = F([]), [r] = De(), o = Ft(), s = `${N(r, "0.prop")}_attrs`;
|
|
17203
17205
|
V.useEffect(() => {
|
|
17204
|
-
const l = N(
|
|
17206
|
+
const l = C(N(t, s), (c, d) => ({ key: d, value: c }));
|
|
17205
17207
|
$(l) ? n([]) : n(l);
|
|
17206
|
-
}, [
|
|
17208
|
+
}, [N(t, s)]);
|
|
17207
17209
|
const i = V.useCallback(
|
|
17208
17210
|
(l = []) => {
|
|
17209
17211
|
if (!t) return;
|
|
17210
17212
|
const c = {};
|
|
17211
17213
|
yr(l, (d) => {
|
|
17212
17214
|
$(d.key) || We(c, d.key, d.value);
|
|
17213
|
-
}), o([
|
|
17215
|
+
}), o([N(t, "_id")], { [s]: c });
|
|
17214
17216
|
},
|
|
17215
17217
|
[t, o, s]
|
|
17216
17218
|
);
|
|
@@ -17399,7 +17401,7 @@ const rk = ({ partialBlockId: t }) => {
|
|
|
17399
17401
|
}
|
|
17400
17402
|
)
|
|
17401
17403
|
] }) });
|
|
17402
|
-
}, sk = Q.lazy(() => import("./manage-design-tokens-
|
|
17404
|
+
}, sk = Q.lazy(() => import("./manage-design-tokens-DeH-yNJN.js")), Wt = 280, ik = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(ul, { className: "h-5 w-5" }) }), ak = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(il, { className: "h-5 w-5" }) }), lk = ({ isActive: t, show: e }) => G("flags.ai", !1) ? /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Vs, {}) }) : null;
|
|
17403
17405
|
_s("add-block", {
|
|
17404
17406
|
button: ak,
|
|
17405
17407
|
label: "Add Blocks",
|
|
@@ -17425,35 +17427,35 @@ _s("outline", {
|
|
|
17425
17427
|
panel: () => /* @__PURE__ */ a("div", { className: "-mt-8", children: /* @__PURE__ */ a(ev, {}) })
|
|
17426
17428
|
});
|
|
17427
17429
|
const ck = () => {
|
|
17428
|
-
const t = Tu(), [e, n] = ui(), r = ie("outline"), [o, s] = F(Wt), [i, l] = Gl(), [, c] = Ul(), d = zi("top"), u = zi("bottom"), p = Yu([...u ?? []]), h = R((
|
|
17429
|
-
|
|
17430
|
+
const t = Tu(), [e, n] = ui(), r = ie("outline"), [o, s] = F(Wt), [i, l] = Gl(), [, c] = Ul(), d = zi("top"), u = zi("bottom"), p = Yu([...u ?? []]), h = R((_) => {
|
|
17431
|
+
_.preventDefault();
|
|
17430
17432
|
}, []), f = M(() => [d].flat(), [d]), m = R(
|
|
17431
|
-
(
|
|
17432
|
-
console.log("handleMenuItemClick",
|
|
17433
|
+
(_) => {
|
|
17434
|
+
console.log("handleMenuItemClick", _, e), n(e === _ ? null : _);
|
|
17433
17435
|
},
|
|
17434
17436
|
[e, n]
|
|
17435
|
-
), { t: b } = U(), y = M(() => [...d, ...u], [d, u]), x = G("htmlDir", "ltr"), v = ne(y, { id: e }) ?? Ce(y),
|
|
17437
|
+
), { t: b } = U(), y = M(() => [...d, ...u], [d, u]), x = G("htmlDir", "ltr"), v = ne(y, { id: e }) ?? Ce(y), S = N(v, "width", Wt);
|
|
17436
17438
|
H(() => {
|
|
17437
17439
|
if (e !== null) {
|
|
17438
|
-
const
|
|
17439
|
-
|
|
17440
|
+
const _ = ne(y, { id: e });
|
|
17441
|
+
_ && N(_, "view", "standard") === "standard" && (r.current = e, s(N(_, "width", Wt)));
|
|
17440
17442
|
}
|
|
17441
17443
|
}, [e, y]);
|
|
17442
|
-
const
|
|
17444
|
+
const E = M(() => {
|
|
17443
17445
|
if (e === null) return 0;
|
|
17444
|
-
const
|
|
17445
|
-
return
|
|
17446
|
-
}, [e,
|
|
17446
|
+
const _ = ne(y, { id: e });
|
|
17447
|
+
return N(_, "view", "standard") === "standard" ? S : o;
|
|
17448
|
+
}, [e, S, o, y]), A = R(() => {
|
|
17447
17449
|
n(r.current);
|
|
17448
|
-
}, [n, e]),
|
|
17450
|
+
}, [n, e]), B = R(() => {
|
|
17449
17451
|
n("outline");
|
|
17450
17452
|
}, [n]);
|
|
17451
17453
|
H(() => {
|
|
17452
17454
|
e !== null && !ne(y, { id: e }) && n("outline");
|
|
17453
17455
|
}, [e, y]);
|
|
17454
|
-
const
|
|
17455
|
-
(
|
|
17456
|
-
m(
|
|
17456
|
+
const k = R(
|
|
17457
|
+
(_) => {
|
|
17458
|
+
m(_);
|
|
17457
17459
|
},
|
|
17458
17460
|
[m]
|
|
17459
17461
|
);
|
|
@@ -17467,24 +17469,24 @@ const ck = () => {
|
|
|
17467
17469
|
/* @__PURE__ */ a("div", { className: "flex h-[50px] w-screen items-center border-b border-border", children: /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(t, {}) }) }),
|
|
17468
17470
|
/* @__PURE__ */ g("main", { className: "relative flex h-[calc(100vh-56px)] max-w-full flex-1 flex-row", children: [
|
|
17469
17471
|
/* @__PURE__ */ g("div", { id: "sidebar", className: "flex w-12 flex-col items-center justify-between border-r border-border py-2", children: [
|
|
17470
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-y-1", children: f.map((
|
|
17471
|
-
/* @__PURE__ */ a(_e, { asChild: !0, children: fn(
|
|
17472
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-y-1", children: f.map((_, w) => /* @__PURE__ */ g(Ee, { children: [
|
|
17473
|
+
/* @__PURE__ */ a(_e, { asChild: !0, children: fn(N(_, "button", An), {
|
|
17472
17474
|
position: "top",
|
|
17473
|
-
panelId:
|
|
17474
|
-
isActive: e ===
|
|
17475
|
-
show: () =>
|
|
17475
|
+
panelId: _.id,
|
|
17476
|
+
isActive: e === _.id,
|
|
17477
|
+
show: () => k(_.id)
|
|
17476
17478
|
}) }),
|
|
17477
|
-
/* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(
|
|
17479
|
+
/* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(_.label) }) })
|
|
17478
17480
|
] }, "button-top-" + w)) }),
|
|
17479
17481
|
/* @__PURE__ */ a("div", { className: "flex flex-col space-y-1" }),
|
|
17480
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col", children: p == null ? void 0 : p.map((
|
|
17481
|
-
/* @__PURE__ */ a(_e, { asChild: !0, children: fn(
|
|
17482
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col", children: p == null ? void 0 : p.map((_, w) => /* @__PURE__ */ g(Ee, { children: [
|
|
17483
|
+
/* @__PURE__ */ a(_e, { asChild: !0, children: fn(N(_, "button", An), {
|
|
17482
17484
|
position: "bottom",
|
|
17483
|
-
panelId:
|
|
17484
|
-
isActive: e ===
|
|
17485
|
-
show: () =>
|
|
17485
|
+
panelId: _.id,
|
|
17486
|
+
isActive: e === _.id,
|
|
17487
|
+
show: () => k(_.id)
|
|
17486
17488
|
}) }),
|
|
17487
|
-
/* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(
|
|
17489
|
+
/* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(_.label) }) })
|
|
17488
17490
|
] }, "button-bottom-" + w)) })
|
|
17489
17491
|
] }),
|
|
17490
17492
|
/* @__PURE__ */ a(
|
|
@@ -17492,18 +17494,18 @@ const ck = () => {
|
|
|
17492
17494
|
{
|
|
17493
17495
|
id: "left-panel",
|
|
17494
17496
|
className: "h-full max-h-full border-r border-border",
|
|
17495
|
-
initial: { width:
|
|
17496
|
-
animate: { width:
|
|
17497
|
+
initial: { width: E },
|
|
17498
|
+
animate: { width: E },
|
|
17497
17499
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
17498
|
-
children: e !== null &&
|
|
17500
|
+
children: e !== null && N(v, "view", "standard") === "standard" && /* @__PURE__ */ g("div", { className: "no-scrollbar flex h-full flex-col overflow-hidden px-3 py-2", children: [
|
|
17499
17501
|
/* @__PURE__ */ a(
|
|
17500
17502
|
"div",
|
|
17501
17503
|
{
|
|
17502
|
-
className: `absolute top-2 flex h-10 items-center space-x-1 py-2 text-base font-bold ${
|
|
17503
|
-
children: /* @__PURE__ */ a("span", { children: b(
|
|
17504
|
+
className: `absolute top-2 flex h-10 items-center space-x-1 py-2 text-base font-bold ${N(v, "isInternal", !1) ? "" : "w-64"}`,
|
|
17505
|
+
children: /* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
|
|
17504
17506
|
}
|
|
17505
17507
|
),
|
|
17506
|
-
/* @__PURE__ */ a("div", { className: "no-scrollbar h-full max-h-full overflow-y-auto pt-10", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(
|
|
17508
|
+
/* @__PURE__ */ a("div", { className: "no-scrollbar h-full max-h-full overflow-y-auto pt-10", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {}) }) })
|
|
17507
17509
|
] })
|
|
17508
17510
|
}
|
|
17509
17511
|
),
|
|
@@ -17566,34 +17568,34 @@ const ck = () => {
|
|
|
17566
17568
|
}
|
|
17567
17569
|
),
|
|
17568
17570
|
/* @__PURE__ */ a(qw, {}),
|
|
17569
|
-
e !== null &&
|
|
17571
|
+
e !== null && N(v, "view") === "drawer" && /* @__PURE__ */ a(Kw, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(
|
|
17570
17572
|
xu,
|
|
17571
17573
|
{
|
|
17572
17574
|
side: "left",
|
|
17573
17575
|
className: "flex flex-col gap-0 p-0 sm:max-w-full",
|
|
17574
|
-
style: { width: `${
|
|
17576
|
+
style: { width: `${S}px` },
|
|
17575
17577
|
children: [
|
|
17576
17578
|
/* @__PURE__ */ a(vu, { className: "border-b border-border px-2 py-2.5", children: /* @__PURE__ */ g(wu, { className: "flex items-center gap-2", children: [
|
|
17577
|
-
/* @__PURE__ */ a("span", { className: "inline-block", children:
|
|
17578
|
-
/* @__PURE__ */ a("span", { children: b(
|
|
17579
|
+
/* @__PURE__ */ a("span", { className: "inline-block", children: N(v, "icon", null) }),
|
|
17580
|
+
/* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
|
|
17579
17581
|
] }) }),
|
|
17580
|
-
/* @__PURE__ */ a("div", { className: "h-full max-h-full overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(
|
|
17581
|
-
close:
|
|
17582
|
+
/* @__PURE__ */ a("div", { className: "h-full max-h-full overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
|
|
17583
|
+
close: B
|
|
17582
17584
|
}) }) })
|
|
17583
17585
|
]
|
|
17584
17586
|
}
|
|
17585
17587
|
) }),
|
|
17586
17588
|
" ",
|
|
17587
|
-
e !== null &&
|
|
17589
|
+
e !== null && N(v, "view") === "modal" && /* @__PURE__ */ a(Lo, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(Br, { className: "gap-0 p-0", style: { maxWidth: `${S}px` }, children: [
|
|
17588
17590
|
/* @__PURE__ */ a(Po, { className: "border-b border-border px-2 py-3.5", children: /* @__PURE__ */ g(Ir, { className: "flex items-center gap-2", children: [
|
|
17589
|
-
/* @__PURE__ */ a("span", { className: "inline-block", children:
|
|
17590
|
-
/* @__PURE__ */ a("span", { children: b(
|
|
17591
|
+
/* @__PURE__ */ a("span", { className: "inline-block", children: N(v, "icon", null) }),
|
|
17592
|
+
/* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
|
|
17591
17593
|
] }) }),
|
|
17592
|
-
/* @__PURE__ */ a("div", { className: "max-h-[70vh] overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(
|
|
17593
|
-
close:
|
|
17594
|
+
/* @__PURE__ */ a("div", { className: "max-h-[70vh] overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
|
|
17595
|
+
close: B
|
|
17594
17596
|
}) }) })
|
|
17595
17597
|
] }) }),
|
|
17596
|
-
e !== null &&
|
|
17598
|
+
e !== null && N(v, "view") === "overlay" && /* @__PURE__ */ a(
|
|
17597
17599
|
Dr.div,
|
|
17598
17600
|
{
|
|
17599
17601
|
className: "absolute bottom-0 left-12 right-0 top-0 z-50",
|
|
@@ -17612,13 +17614,13 @@ const ck = () => {
|
|
|
17612
17614
|
children: [
|
|
17613
17615
|
/* @__PURE__ */ g("div", { className: "flex h-[50px] items-center justify-between border-b border-border p-4", children: [
|
|
17614
17616
|
/* @__PURE__ */ g("div", { className: "-ml-2 flex items-center gap-2 text-lg font-bold", children: [
|
|
17615
|
-
/* @__PURE__ */ a("span", { className: "rtl:ml-2 rtl:inline-block", children:
|
|
17616
|
-
/* @__PURE__ */ a("span", { children: b(
|
|
17617
|
+
/* @__PURE__ */ a("span", { className: "rtl:ml-2 rtl:inline-block", children: N(v, "icon", null) }),
|
|
17618
|
+
/* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
|
|
17617
17619
|
] }),
|
|
17618
17620
|
/* @__PURE__ */ a(te, { onClick: () => A(), variant: "ghost", size: "icon", className: "", children: /* @__PURE__ */ a(qe, { className: "h-5 w-5" }) })
|
|
17619
17621
|
] }),
|
|
17620
|
-
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(
|
|
17621
|
-
close:
|
|
17622
|
+
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
|
|
17623
|
+
close: B
|
|
17622
17624
|
}) }) })
|
|
17623
17625
|
]
|
|
17624
17626
|
}
|
|
@@ -17674,8 +17676,8 @@ const ck = () => {
|
|
|
17674
17676
|
});
|
|
17675
17677
|
}, h = (m) => {
|
|
17676
17678
|
if (!i) return;
|
|
17677
|
-
const b = m.clientX - c.x, y = m.clientY - c.y, x = m.currentTarget, v = x.offsetWidth,
|
|
17678
|
-
n(
|
|
17679
|
+
const b = m.clientX - c.x, y = m.clientY - c.y, x = m.currentTarget, v = x.offsetWidth, S = x.offsetHeight, E = window.innerWidth - v, A = window.innerHeight - S, B = Math.max(0, Math.min(b, E)), k = Math.max(0, Math.min(y, A));
|
|
17680
|
+
n(B, k);
|
|
17679
17681
|
}, f = () => {
|
|
17680
17682
|
l(!1);
|
|
17681
17683
|
};
|
|
@@ -18007,7 +18009,7 @@ function Xr(t, e = 0) {
|
|
|
18007
18009
|
(m, b) => {
|
|
18008
18010
|
const [y, x] = b.split(":").map((v) => v.trim());
|
|
18009
18011
|
if (y && x) {
|
|
18010
|
-
const v = y.replace(/-([a-z])/g, (
|
|
18012
|
+
const v = y.replace(/-([a-z])/g, (S) => S[1].toUpperCase());
|
|
18011
18013
|
m[v] = x.replace(/['"]/g, "");
|
|
18012
18014
|
}
|
|
18013
18015
|
return m;
|
|
@@ -18135,16 +18137,16 @@ ${o})
|
|
|
18135
18137
|
d(!1);
|
|
18136
18138
|
let v = s({ blockId: o == null ? void 0 : o._id, additionalCoreBlocks: ["Icon"] });
|
|
18137
18139
|
v = v.replace(/\s*bid=["'][^"']*["']/g, "");
|
|
18138
|
-
const
|
|
18139
|
-
jsx:
|
|
18140
|
+
const S = t === "ts", {
|
|
18141
|
+
jsx: E,
|
|
18140
18142
|
html: A,
|
|
18141
|
-
componentName:
|
|
18143
|
+
componentName: B
|
|
18142
18144
|
} = await Nk({
|
|
18143
18145
|
selectedBlock: o,
|
|
18144
18146
|
html: v,
|
|
18145
|
-
isTypeScript:
|
|
18147
|
+
isTypeScript: S
|
|
18146
18148
|
});
|
|
18147
|
-
r({ html: A || "", jsx:
|
|
18149
|
+
r({ html: A || "", jsx: E }), l(B), d(!0);
|
|
18148
18150
|
} catch {
|
|
18149
18151
|
const v = "<div>Export failed. Close the modal and try again.</div>";
|
|
18150
18152
|
r({ html: v, jsx: v }), Ne.error(e("Failed to generate export HTML"));
|
|
@@ -18163,17 +18165,17 @@ ${o})
|
|
|
18163
18165
|
},
|
|
18164
18166
|
[e]
|
|
18165
18167
|
), m = (v) => {
|
|
18166
|
-
const
|
|
18167
|
-
A.href =
|
|
18168
|
+
const S = new Blob([v], { type: "text/jsx" }), E = URL.createObjectURL(S), A = document.createElement("a");
|
|
18169
|
+
A.href = E, A.download = u() ?? "", document.body.appendChild(A), A.click(), URL.revokeObjectURL(E), document.body.removeChild(A), Ne.success(e("Export code downloaded successfully!"));
|
|
18168
18170
|
}, b = /* @__PURE__ */ g("span", { children: [
|
|
18169
18171
|
"Download ",
|
|
18170
18172
|
/* @__PURE__ */ a("span", { className: "font-mono text-xs font-light text-gray-300", children: u() })
|
|
18171
18173
|
] }), y = M(() => {
|
|
18172
|
-
const v = { extend: Af() },
|
|
18174
|
+
const v = { extend: Af() }, S = JSON.stringify(v, null, 2);
|
|
18173
18175
|
return `{
|
|
18174
18176
|
// Your tailwind config ...
|
|
18175
18177
|
|
|
18176
|
-
"theme": ${
|
|
18178
|
+
"theme": ${S == null ? void 0 : S.split(`
|
|
18177
18179
|
`).join(`
|
|
18178
18180
|
`)},
|
|
18179
18181
|
}`;
|
|
@@ -18253,7 +18255,7 @@ ${o})
|
|
|
18253
18255
|
};
|
|
18254
18256
|
}, Tk = (t, e) => {
|
|
18255
18257
|
const n = [];
|
|
18256
|
-
let r = ne(t, { _id: e }), o =
|
|
18258
|
+
let r = ne(t, { _id: e }), o = N(r, "_parent", "");
|
|
18257
18259
|
for (; Vn(o) && !$(o); )
|
|
18258
18260
|
n.push(r == null ? void 0 : r._parent), r = ne(t, { _id: o }), o = r == null ? void 0 : r._parent;
|
|
18259
18261
|
return Ot(n);
|