@chaibuilder/sdk 1.0.13 → 1.0.15
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/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
- package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
- package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
- package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
- package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
- package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
- package/dist/Class-RZuPYbUS.cjs +1 -0
- package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
- package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
- package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
- package/dist/Layers-gEA0qWYP.cjs +1 -0
- package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
- package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
- package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
- package/dist/PagesPanel-tH6c9Mnv.js +70 -0
- package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
- package/dist/ProjectPanel-Q2-15-In.js +91 -0
- package/dist/Settings-DBiwm1hY.cjs +1 -0
- package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
- package/dist/SidePanels-8JWYXGqN.cjs +1 -0
- package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
- package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
- package/dist/Topbar-qi5ab8rR.cjs +1 -0
- package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
- package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
- package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
- package/dist/UploadImages-jLQgLujd.cjs +1 -0
- package/dist/add-page-modal-U5ramelz.js +110 -0
- package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
- package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
- package/dist/confirm-alert-z74-fGOT.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +99 -124
- package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
- package/dist/delete-page-modal-_E87bVUZ.js +89 -0
- package/dist/form-Osm1AmO5.cjs +1 -0
- package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
- package/dist/index-2EHcmZqL.js +2947 -0
- package/dist/index-RVm8Txnj.js +1149 -0
- package/dist/index-_jFEo7h5.cjs +206 -0
- package/dist/index-c8zW_D2V.cjs +1 -0
- package/dist/index-cU5eyVRU.js +40872 -0
- package/dist/index-fwo4wa7u.cjs +1 -0
- package/dist/index-gmZcUXyn.js +25 -0
- package/dist/index-m2muA80V.cjs +9 -0
- package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
- package/dist/lib.cjs +2 -1
- package/dist/lib.js +1333 -71
- package/dist/page-viewer-BSc-5M4B.cjs +1 -0
- package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
- package/dist/project-general-setting-14MA_cX5.cjs +1 -0
- package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
- package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
- package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +23 -19
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
- package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +45 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +156 -357
- package/package.json +1 -1
- package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
- package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
- package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
- package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
- package/dist/Class-_uCzl5v1.cjs +0 -1
- package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
- package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
- package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
- package/dist/Layers-EzOZdWvd.cjs +0 -1
- package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
- package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
- package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
- package/dist/PagesPanel-6JuwBLFQ.js +0 -50
- package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
- package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
- package/dist/ProjectPanel-cu2QSDW9.js +0 -73
- package/dist/Settings-lc9PfnmG.cjs +0 -1
- package/dist/SidePanels-VH72zFE2.cjs +0 -1
- package/dist/Topbar-vQPo9xSY.cjs +0 -1
- package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
- package/dist/UploadImages-T6kW0s3G.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal--qZSwJuB.cjs +0 -1
- package/dist/add-page-modal-bj7qbZuK.js +0 -99
- package/dist/alert-dialog-GNfnpqFB.js +0 -64
- package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
- package/dist/command-ThdTuUxt.cjs +0 -1
- package/dist/command-VHca6CcN.js +0 -97
- package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
- package/dist/confirm-alert-b0e_BLhF.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-Ni5kEzLz.js +0 -103
- package/dist/controls-W97-POR_.cjs +0 -1
- package/dist/controls-enQY7NI8.js +0 -118
- package/dist/controls-xUKa23ic.cjs +0 -1
- package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
- package/dist/delete-page-modal-cnrR8tWH.js +0 -69
- package/dist/dialog-S_QbL1iq.cjs +0 -1
- package/dist/dialog-jrw9DF1f.js +0 -65
- package/dist/dropdown-menu-S03K_fNs.js +0 -164
- package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
- package/dist/form-nRAvKPQj.cjs +0 -1
- package/dist/functions-nNTuSTsR.js +0 -1106
- package/dist/functions-pcUZhFJM.js +0 -12
- package/dist/functions-sCuB7nvZ.cjs +0 -2
- package/dist/functions-uw7QP2kT.cjs +0 -1
- package/dist/html-to-json-P6GpbcQX.cjs +0 -1
- package/dist/html-to-json-pdHQfRkN.js +0 -178
- package/dist/index-HAue58ea.cjs +0 -1
- package/dist/index-T4_wfKl5.js +0 -2256
- package/dist/index-X9ZgD09V.cjs +0 -1
- package/dist/index-ehKdBRUK.js +0 -18
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-6o6n2Tnd.js +0 -204
- package/dist/link-ece8dZGH.cjs +0 -1
- package/dist/page-viewer-IARz6OSp.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
- package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
- package/dist/project-seo-setting-rankm1z3.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
- package/dist/skeleton-CU_FIbg3.js +0 -239
- package/dist/skeleton-JHP9zwL2.cjs +0 -1
- package/dist/tabs-Gb9v5dVb.js +0 -46
- package/dist/tabs-iWeaaVrg.cjs +0 -1
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/toggle-ASJRAaGP.js +0 -30
- package/dist/toggle-ehNIPmme.cjs +0 -1
- package/dist/useAddBlock-WJc3OgG8.js +0 -86
- package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
- package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
- package/dist/useAllBlocks-PQKYvs-e.js +0 -20
- package/dist/useChaiExternalData-4K9WxANa.js +0 -6
- package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
- package/dist/useDarkMode-ZKCO_gkt.js +0 -23
- package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
- package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
- package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
- package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
- package/dist/useLanguage-NKKKaxVM.cjs +0 -1
- package/dist/useLanguage-gVC5rxO5.js +0 -216
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
- package/dist/useUiLibraries-4hPOi8DI.js +0 -12
- package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -1,81 +1,82 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-qAwJ85SY.js";
|
|
2
2
|
import * as ne from "react";
|
|
3
|
-
import $, { useState as w,
|
|
3
|
+
import $, { useState as w, useMemo as k, useEffect as _, useCallback as A, createContext as Oe, useContext as re } from "react";
|
|
4
4
|
import { useThrottledCallback as me } from "@react-hookz/web";
|
|
5
|
-
import {
|
|
5
|
+
import { forEach as je, isArray as ae, omit as it, truncate as dt, includes as M, get as p, first as we, split as ct, startCase as Y, toLower as te, isEmpty as b, map as C, find as pt, last as ye, filter as be, set as Me, keys as ut, cloneDeep as xt, each as gt, capitalize as ht, reject as mt, nth as Re, startsWith as z, isNumber as yt, parseInt as bt, isNaN as Ee, findLast as ft, flatten as U, intersection as _e, has as ge, isNull as vt } from "lodash";
|
|
6
6
|
import { useTranslation as Fe } from "react-i18next";
|
|
7
|
-
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as Nt, ArrowBottomLeftIcon as kt, AlignLeftIcon as Tt, AlignCenterHorizontallyIcon as St, AlignRightIcon as Rt, StretchHorizontallyIcon as Vt, FontItalicIcon as Ht, UnderlineIcon as Bt, OverlineIcon as At, LetterCaseUppercaseIcon as Dt, Cross1Icon as $t, InfoCircledIcon as Ne, MinusIcon as
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { L as Te } from "./label-KaP7MRrs.js";
|
|
29
|
-
import { S as Sr } from "./MODIFIERS-DsEzQ3aH.js";
|
|
30
|
-
import { a as Rr, u as Ae } from "./useDarkMode-ZKCO_gkt.js";
|
|
31
|
-
import { S as Vr } from "./scroll-area-ewXbxc3n.js";
|
|
32
|
-
import { S as Hr, c as Br, b as Ar, d as Dr, f as H } from "./select-POGdEDHT.js";
|
|
7
|
+
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as Nt, ArrowBottomLeftIcon as kt, AlignLeftIcon as Tt, AlignCenterHorizontallyIcon as St, AlignRightIcon as Rt, StretchHorizontallyIcon as Vt, FontItalicIcon as Ht, UnderlineIcon as Bt, OverlineIcon as At, LetterCaseUppercaseIcon as Dt, Cross1Icon as $t, InfoCircledIcon as Ne, MinusIcon as It, BoxIcon as We, RowSpacingIcon as Pt, TriangleDownIcon as Lt, TrashIcon as Xe, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { b1 as Ot, b2 as Mt, B as pe, b3 as Et, b4 as _t, b5 as Ft, b6 as Yt, b7 as Wt, b8 as Xt, b9 as Zt, a6 as G, aq as zt, ar as Ut, as as Gt, ba as Kt, ao as qt, bb as Jt, ap as Qt, aH as W, aI as X, aK as Z, ak as er, bc as tr, bd as rr, be as lr, bf as sr, bg as or, bh as nr, p as ze, ac as Ue, bi as Ge, bj as ie, bk as de, bl as ce, aj as ke, P as Ke, a3 as qe, j as Je, aM as Te, bm as ar, bn as ir, a4 as ue, W as dr, a9 as Qe, R as He, ag as cr, ad as pr, bo as ur, au as xr, av as gr, aw as hr, ax as mr, ay as H, bp as yr, aB as br, aC as fr, aD as Be, aE as Ae } from "./index-2EHcmZqL.js";
|
|
9
|
+
import vr from "@rjsf/core";
|
|
10
|
+
import jr from "@rjsf/validator-ajv8";
|
|
11
|
+
import { u as wr } from "./index-RVm8Txnj.js";
|
|
12
|
+
import { Check as Cr, EditIcon as Nr, TrashIcon as kr } from "lucide-react";
|
|
13
|
+
import { h as et, A as Tr } from "./index-gmZcUXyn.js";
|
|
14
|
+
import { E as Sr, u as tt } from "./index-cU5eyVRU.js";
|
|
15
|
+
import { useAtom as Rr } from "jotai";
|
|
16
|
+
import Vr from "react-autosuggest";
|
|
17
|
+
import Hr from "fuse.js";
|
|
18
|
+
import { A as Br, a as Ar, C as xe, h as Dr } from "./Class-nQk08vqd.js";
|
|
19
|
+
import "@radix-ui/react-toggle";
|
|
20
|
+
import "class-variance-authority";
|
|
21
|
+
import "@radix-ui/react-switch";
|
|
22
|
+
import "@radix-ui/react-slot";
|
|
23
|
+
import "@radix-ui/react-accordion";
|
|
24
|
+
import "@radix-ui/react-alert-dialog";
|
|
25
|
+
import "@radix-ui/react-dialog";
|
|
26
|
+
import "@radix-ui/react-label";
|
|
27
|
+
import "@radix-ui/react-scroll-area";
|
|
33
28
|
import "@radix-ui/react-tabs";
|
|
34
|
-
import "
|
|
29
|
+
import "@radix-ui/react-tooltip";
|
|
30
|
+
import "@radix-ui/react-popover";
|
|
31
|
+
import "@radix-ui/react-menubar";
|
|
32
|
+
import "@radix-ui/react-hover-card";
|
|
33
|
+
import "@radix-ui/react-select";
|
|
34
|
+
import "@radix-ui/react-dropdown-menu";
|
|
35
|
+
import "@radix-ui/react-separator";
|
|
36
|
+
import "@radix-ui/react-toast";
|
|
37
|
+
import "cmdk";
|
|
38
|
+
import "@radix-ui/react-context-menu";
|
|
39
|
+
import "react-icons-picker";
|
|
40
|
+
import "react-dom";
|
|
41
|
+
import "react-quill";
|
|
42
|
+
import "flat-to-nested";
|
|
43
|
+
import "redux-undo";
|
|
44
|
+
import "./lib.js";
|
|
45
|
+
import "himalaya";
|
|
46
|
+
import "@mhsdesign/jit-browser-tailwindcss";
|
|
47
|
+
import "@bobthered/tailwindcss-palette-generator";
|
|
48
|
+
import "@tailwindcss/forms";
|
|
49
|
+
import "@tailwindcss/typography";
|
|
50
|
+
import "@tailwindcss/aspect-ratio";
|
|
51
|
+
import "@tailwindcss/line-clamp";
|
|
35
52
|
import "clsx";
|
|
36
53
|
import "tailwind-merge";
|
|
37
|
-
import "@radix-ui/react-scroll-area";
|
|
38
|
-
import "react-dom";
|
|
39
|
-
import "@floating-ui/react-dom";
|
|
40
54
|
import "i18next";
|
|
55
|
+
import "@floating-ui/react-dom";
|
|
56
|
+
import "react-textarea-autosize";
|
|
41
57
|
import "flagged";
|
|
42
58
|
import "react-dnd";
|
|
43
59
|
import "@minoru/react-dnd-treeview";
|
|
44
60
|
import "react-hotkeys-hook";
|
|
45
|
-
import "
|
|
46
|
-
import "./functions-pcUZhFJM.js";
|
|
47
|
-
import "redux-undo";
|
|
48
|
-
import "@radix-ui/react-slot";
|
|
49
|
-
import "class-variance-authority";
|
|
50
|
-
import "@radix-ui/react-tooltip";
|
|
51
|
-
import "@radix-ui/react-toast";
|
|
52
|
-
import "@radix-ui/react-dialog";
|
|
53
|
-
import "@radix-ui/react-popover";
|
|
54
|
-
import "cmdk";
|
|
55
|
-
import "@radix-ui/react-accordion";
|
|
56
|
-
import "react-icons-picker";
|
|
57
|
-
import "./ImagesPanel-oaHOD-Ex.js";
|
|
58
|
-
import "react-quill";
|
|
59
|
-
import "@radix-ui/react-label";
|
|
60
|
-
import "@radix-ui/react-select";
|
|
61
|
+
import "sonner";
|
|
61
62
|
const $r = $.lazy(() => import("react-json-view"));
|
|
62
|
-
function
|
|
63
|
-
const
|
|
64
|
-
function o
|
|
63
|
+
function Ir(t) {
|
|
64
|
+
const l = [], r = {};
|
|
65
|
+
function s(o, a) {
|
|
65
66
|
je(a, (d, i) => {
|
|
66
|
-
const n =
|
|
67
|
-
|
|
67
|
+
const n = o ? `${o}.${i}` : i, u = ae(d) ? "list" : typeof d;
|
|
68
|
+
l.push(n), r[n] = u === "string" ? "text" : u === "object" ? "model" : u, u === "object" && !ae(d) && s(n, d);
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return s("", it(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: l, pathsType: r };
|
|
71
72
|
}
|
|
72
|
-
const fe = ({ data: t, fullView:
|
|
73
|
+
const fe = ({ data: t, fullView: l }) => {
|
|
73
74
|
if (!t)
|
|
74
75
|
return null;
|
|
75
76
|
const r = typeof t;
|
|
76
|
-
return
|
|
77
|
+
return l ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
77
78
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
78
|
-
/* @__PURE__ */ e.jsx(
|
|
79
|
+
/* @__PURE__ */ e.jsx(Sr, { children: /* @__PURE__ */ e.jsx(
|
|
79
80
|
$r,
|
|
80
81
|
{
|
|
81
82
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
@@ -90,35 +91,35 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
90
91
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "text-gray-800/50 text-[12px] leading-4 w-full max-h-36 overflow-x-hidden overflow-y-auto", children: [
|
|
91
92
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
|
|
92
93
|
t
|
|
93
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children:
|
|
94
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: dt(r === "object" ? JSON.stringify(t) : t, { length: 40 }) });
|
|
94
95
|
}, De = ({
|
|
95
96
|
type: t,
|
|
96
|
-
value:
|
|
97
|
+
value: l = "",
|
|
97
98
|
setValue: r,
|
|
98
|
-
data:
|
|
99
|
-
onChange:
|
|
99
|
+
data: s,
|
|
100
|
+
onChange: o,
|
|
100
101
|
dataType: a,
|
|
101
102
|
appliedBindings: d
|
|
102
103
|
}) => {
|
|
103
|
-
const { paths: i, pathsType: n } =
|
|
104
|
-
(g) => !M(d, g) && p(u, `props.${we(
|
|
104
|
+
const { paths: i, pathsType: n } = Ir(s), u = t === "PROP" ? et(s == null ? void 0 : s._type) : {}, x = t === "PROP", [c, m] = w(!1), h = k(() => t === "PROP" ? i.filter(
|
|
105
|
+
(g) => !M(d, g) && p(u, `props.${we(ct(g, "."))}.binding`)
|
|
105
106
|
) : i.filter((g) => a === p(n, g, "")), [t, i, d, a, u]);
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
}, [
|
|
107
|
+
return _(() => {
|
|
108
|
+
l && o(l);
|
|
109
|
+
}, [l, t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
109
110
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
110
111
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(te(t)) }),
|
|
111
|
-
/* @__PURE__ */ e.jsxs(
|
|
112
|
-
/* @__PURE__ */ e.jsx(
|
|
113
|
-
|
|
112
|
+
/* @__PURE__ */ e.jsxs(Ot, { open: c, onOpenChange: m, children: [
|
|
113
|
+
/* @__PURE__ */ e.jsx(Mt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
114
|
+
pe,
|
|
114
115
|
{
|
|
115
116
|
variant: "outline",
|
|
116
117
|
size: "sm",
|
|
117
|
-
className: ` ${b(
|
|
118
|
-
children:
|
|
118
|
+
className: ` ${b(l) ? "bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white w-44 justify-center" : "min-w-[350px] justify-between items-center"}`,
|
|
119
|
+
children: l ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
119
120
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
|
|
120
121
|
x && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 mr-2 rounded-full", children: Y(a) }),
|
|
121
|
-
|
|
122
|
+
l
|
|
122
123
|
] }),
|
|
123
124
|
/* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
|
|
124
125
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -127,24 +128,24 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
127
128
|
] })
|
|
128
129
|
}
|
|
129
130
|
) }),
|
|
130
|
-
/* @__PURE__ */ e.jsx(
|
|
131
|
-
/* @__PURE__ */ e.jsx(
|
|
132
|
-
/* @__PURE__ */ e.jsxs(
|
|
133
|
-
/* @__PURE__ */ e.jsx(
|
|
134
|
-
/* @__PURE__ */ e.jsx(
|
|
135
|
-
|
|
131
|
+
/* @__PURE__ */ e.jsx(Et, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(_t, { children: [
|
|
132
|
+
/* @__PURE__ */ e.jsx(Ft, { placeholder: `Choose ${te(t)}...` }),
|
|
133
|
+
/* @__PURE__ */ e.jsxs(Yt, { children: [
|
|
134
|
+
/* @__PURE__ */ e.jsx(Wt, { children: "No results found." }),
|
|
135
|
+
/* @__PURE__ */ e.jsx(Xt, { children: C(h, (g) => /* @__PURE__ */ e.jsxs(
|
|
136
|
+
Zt,
|
|
136
137
|
{
|
|
137
138
|
value: g,
|
|
138
139
|
className: `cursor-pointer ${x ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
|
|
139
140
|
onSelect: (f) => {
|
|
140
|
-
r(
|
|
141
|
+
r(pt(h, (T) => T === f) || null), m(!1);
|
|
141
142
|
},
|
|
142
143
|
children: [
|
|
143
144
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
144
|
-
/* @__PURE__ */ e.jsx(
|
|
145
|
+
/* @__PURE__ */ e.jsx(Cr, { className: `w-4 h-4 text-green-500 ${l === g ? "" : "opacity-0"}` }),
|
|
145
146
|
g
|
|
146
147
|
] }),
|
|
147
|
-
x ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(p(n, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(fe, { data: p(
|
|
148
|
+
x ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(p(n, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(fe, { data: p(s, g) }) })
|
|
148
149
|
]
|
|
149
150
|
},
|
|
150
151
|
g
|
|
@@ -153,15 +154,15 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
153
154
|
] }) })
|
|
154
155
|
] })
|
|
155
156
|
] }),
|
|
156
|
-
!x && !b(
|
|
157
|
+
!x && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(fe, { data: p(s, l, ""), fullView: !0 }) })
|
|
157
158
|
] });
|
|
158
|
-
},
|
|
159
|
+
}, Pr = ({
|
|
159
160
|
appliedBindings: t = [],
|
|
160
|
-
onAddBinding:
|
|
161
|
+
onAddBinding: l,
|
|
161
162
|
editMode: r,
|
|
162
|
-
item:
|
|
163
|
+
item: s
|
|
163
164
|
}) => {
|
|
164
|
-
const [
|
|
165
|
+
const [o, a] = w(r ? s.key : ""), [d, i] = w(r ? s.value : ""), n = G(), [u] = tt(), x = A(
|
|
165
166
|
(h, g) => {
|
|
166
167
|
if (b(h))
|
|
167
168
|
return "";
|
|
@@ -174,11 +175,11 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
174
175
|
}
|
|
175
176
|
},
|
|
176
177
|
[n, u]
|
|
177
|
-
), [c, m] = w(r ? x(
|
|
178
|
+
), [c, m] = w(r ? x(s.key, "PROP") : "");
|
|
178
179
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
179
|
-
/* @__PURE__ */ e.jsxs(
|
|
180
|
-
/* @__PURE__ */ e.jsx(
|
|
181
|
-
/* @__PURE__ */ e.jsx(
|
|
180
|
+
/* @__PURE__ */ e.jsxs(zt, { children: [
|
|
181
|
+
/* @__PURE__ */ e.jsx(Ut, { children: "Add Data Binding" }),
|
|
182
|
+
/* @__PURE__ */ e.jsx(Gt, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
|
|
182
183
|
] }),
|
|
183
184
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
|
|
184
185
|
/* @__PURE__ */ e.jsx(
|
|
@@ -187,7 +188,7 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
187
188
|
type: "PROP",
|
|
188
189
|
isDisabled: !1,
|
|
189
190
|
placeholder: "Enter prop key",
|
|
190
|
-
value:
|
|
191
|
+
value: o,
|
|
191
192
|
setValue: a,
|
|
192
193
|
onChange: (h) => {
|
|
193
194
|
const g = x(h, "PROP");
|
|
@@ -203,7 +204,7 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
203
204
|
De,
|
|
204
205
|
{
|
|
205
206
|
type: "PATH",
|
|
206
|
-
isDisabled: b(
|
|
207
|
+
isDisabled: b(o),
|
|
207
208
|
placeholder: "Enter data path",
|
|
208
209
|
value: d,
|
|
209
210
|
setValue: i,
|
|
@@ -217,60 +218,60 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
217
218
|
}
|
|
218
219
|
)
|
|
219
220
|
] }),
|
|
220
|
-
/* @__PURE__ */ e.jsx(
|
|
221
|
-
|
|
221
|
+
/* @__PURE__ */ e.jsx(Kt, { children: /* @__PURE__ */ e.jsx(
|
|
222
|
+
pe,
|
|
222
223
|
{
|
|
223
224
|
type: "submit",
|
|
224
225
|
className: "mt-4",
|
|
225
|
-
disabled: b(
|
|
226
|
-
onClick: () =>
|
|
226
|
+
disabled: b(o) && b(d),
|
|
227
|
+
onClick: () => l({ key: o, value: d }),
|
|
227
228
|
children: "Save"
|
|
228
229
|
}
|
|
229
230
|
) })
|
|
230
231
|
] });
|
|
231
|
-
}, rt = ({ children: t, onAddBinding:
|
|
232
|
+
}, rt = ({ children: t, onAddBinding: l, appliedBindings: r, editMode: s = !0, item: o = {} }) => {
|
|
232
233
|
const [a, d] = w(!1);
|
|
233
|
-
return /* @__PURE__ */ e.jsxs(
|
|
234
|
-
/* @__PURE__ */ e.jsx(
|
|
235
|
-
a && /* @__PURE__ */ e.jsx(
|
|
236
|
-
|
|
234
|
+
return /* @__PURE__ */ e.jsxs(qt, { children: [
|
|
235
|
+
/* @__PURE__ */ e.jsx(Jt, { asChild: !0, onClick: () => d(!0), children: t }),
|
|
236
|
+
a && /* @__PURE__ */ e.jsx(Qt, { children: /* @__PURE__ */ e.jsx(
|
|
237
|
+
Pr,
|
|
237
238
|
{
|
|
238
|
-
item:
|
|
239
|
-
editMode:
|
|
239
|
+
item: o,
|
|
240
|
+
editMode: s,
|
|
240
241
|
appliedBindings: r,
|
|
241
242
|
onAddBinding: (i) => {
|
|
242
|
-
|
|
243
|
+
l(i), d(!1);
|
|
243
244
|
}
|
|
244
245
|
}
|
|
245
246
|
) })
|
|
246
247
|
] });
|
|
247
248
|
}, Lr = ({
|
|
248
249
|
item: t,
|
|
249
|
-
onAddBinding:
|
|
250
|
+
onAddBinding: l,
|
|
250
251
|
onRemove: r,
|
|
251
|
-
selectedBlock:
|
|
252
|
-
dataProvider:
|
|
252
|
+
selectedBlock: s,
|
|
253
|
+
dataProvider: o,
|
|
253
254
|
appliedBindings: a
|
|
254
255
|
}) => {
|
|
255
256
|
const [d, i] = w("string"), n = (u, x) => {
|
|
256
257
|
if (b(u))
|
|
257
258
|
return "";
|
|
258
259
|
{
|
|
259
|
-
const c = p(x === "PROP" ?
|
|
260
|
+
const c = p(x === "PROP" ? s : o, u, "");
|
|
260
261
|
if (ae(c))
|
|
261
262
|
return "list";
|
|
262
263
|
const m = typeof c;
|
|
263
264
|
return m === "string" ? "text" : m === "object" ? "model" : m;
|
|
264
265
|
}
|
|
265
266
|
};
|
|
266
|
-
return
|
|
267
|
+
return _(() => i(() => n(t.key, "PROP")), [t.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
|
|
267
268
|
/* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: t.key }),
|
|
268
269
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
|
|
269
|
-
/* @__PURE__ */ e.jsx(fe, { data: p(
|
|
270
|
+
/* @__PURE__ */ e.jsx(fe, { data: p(o, t.value, "") }),
|
|
270
271
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
271
|
-
/* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding:
|
|
272
|
+
/* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(Nr, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
|
|
272
273
|
/* @__PURE__ */ e.jsx(
|
|
273
|
-
|
|
274
|
+
kr,
|
|
274
275
|
{
|
|
275
276
|
onClick: () => r(),
|
|
276
277
|
className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
|
|
@@ -279,21 +280,21 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
279
280
|
] }),
|
|
280
281
|
!b(d) && !b(t.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(d) })
|
|
281
282
|
] });
|
|
282
|
-
}, Or = ({ bindingData: t, onChange:
|
|
283
|
-
const r = G(), [
|
|
283
|
+
}, Or = ({ bindingData: t, onChange: l }) => {
|
|
284
|
+
const r = G(), [s] = tt(), o = Tr(), [a, d] = w(
|
|
284
285
|
C(t, (c, m) => ({ key: m, value: c }))
|
|
285
286
|
);
|
|
286
|
-
|
|
287
|
+
_(() => {
|
|
287
288
|
d(C(t, (c, m) => ({ key: m, value: c })));
|
|
288
289
|
}, [r == null ? void 0 : r._id]);
|
|
289
290
|
const i = k(() => {
|
|
290
|
-
if (b(
|
|
291
|
+
if (b(s))
|
|
291
292
|
return !0;
|
|
292
293
|
if (b(a))
|
|
293
294
|
return !1;
|
|
294
295
|
const c = ye(a);
|
|
295
296
|
return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
|
|
296
|
-
}, [
|
|
297
|
+
}, [s, a]), n = (c) => {
|
|
297
298
|
const m = be(a, (h) => h.key !== c.key);
|
|
298
299
|
d([...m, c]), x([...m, c]);
|
|
299
300
|
}, u = (c) => {
|
|
@@ -302,17 +303,17 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
302
303
|
}, x = A(
|
|
303
304
|
(c = []) => {
|
|
304
305
|
if (d(c), b(c)) {
|
|
305
|
-
|
|
306
|
+
l({});
|
|
306
307
|
return;
|
|
307
308
|
}
|
|
308
309
|
const m = {};
|
|
309
310
|
je(c, (h) => {
|
|
310
311
|
!b(h == null ? void 0 : h.key) && !b(h == null ? void 0 : h.value) && Me(m, h.key, h.value);
|
|
311
|
-
}),
|
|
312
|
+
}), l(m);
|
|
312
313
|
},
|
|
313
|
-
[
|
|
314
|
+
[l]
|
|
314
315
|
);
|
|
315
|
-
return b(
|
|
316
|
+
return b(o) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
|
|
316
317
|
"You have no data providers registered. Please add a data provider to your project. ",
|
|
317
318
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
318
319
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
@@ -324,91 +325,91 @@ const fe = ({ data: t, fullView: s }) => {
|
|
|
324
325
|
onAddBinding: n,
|
|
325
326
|
onRemove: () => u(m),
|
|
326
327
|
selectedBlock: r,
|
|
327
|
-
dataProvider:
|
|
328
|
+
dataProvider: s,
|
|
328
329
|
appliedBindings: C(a, "key")
|
|
329
330
|
},
|
|
330
331
|
c.key
|
|
331
332
|
)),
|
|
332
|
-
/* @__PURE__ */ e.jsxs(
|
|
333
|
-
/* @__PURE__ */ e.jsx(
|
|
333
|
+
/* @__PURE__ */ e.jsxs(W, { delayDuration: 200, children: [
|
|
334
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(rt, { appliedBindings: C(a, "key"), onAddBinding: n, children: /* @__PURE__ */ e.jsx(
|
|
334
335
|
"button",
|
|
335
336
|
{
|
|
336
337
|
disabled: i,
|
|
337
338
|
className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${i ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
|
|
338
|
-
children: b(
|
|
339
|
+
children: b(s) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
|
|
339
340
|
}
|
|
340
341
|
) }) }),
|
|
341
|
-
i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(
|
|
342
|
+
i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
|
|
342
343
|
] })
|
|
343
344
|
] });
|
|
344
|
-
}, Mr =
|
|
345
|
+
}, Mr = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), $e = ({
|
|
345
346
|
createHistorySnapshot: t,
|
|
346
|
-
properties:
|
|
347
|
+
properties: l,
|
|
347
348
|
formData: r,
|
|
348
|
-
onChange:
|
|
349
|
+
onChange: s
|
|
349
350
|
}) => {
|
|
350
|
-
const [
|
|
351
|
-
return Object.keys(
|
|
352
|
-
const n =
|
|
351
|
+
const [o] = er(), a = { type: "object", properties: {} }, d = {};
|
|
352
|
+
return Object.keys(l).forEach((i) => {
|
|
353
|
+
const n = l[i];
|
|
353
354
|
if (M(["slot", "styles"], n.type))
|
|
354
355
|
return;
|
|
355
|
-
const u = p(n, "i18n", !1) ? `${i}-${
|
|
356
|
-
a.properties[u] =
|
|
356
|
+
const u = p(n, "i18n", !1) ? `${i}-${o}` : i;
|
|
357
|
+
a.properties[u] = tr(n, o), d[u] = rr(n, o);
|
|
357
358
|
}), /* @__PURE__ */ e.jsx(
|
|
358
|
-
|
|
359
|
+
vr,
|
|
359
360
|
{
|
|
360
361
|
widgets: {
|
|
361
|
-
binding:
|
|
362
|
-
richtext:
|
|
363
|
-
icon:
|
|
364
|
-
image:
|
|
362
|
+
binding: Mr,
|
|
363
|
+
richtext: lr,
|
|
364
|
+
icon: sr,
|
|
365
|
+
image: or
|
|
365
366
|
},
|
|
366
367
|
fields: {
|
|
367
|
-
link:
|
|
368
|
+
link: nr
|
|
368
369
|
},
|
|
369
370
|
idSeparator: ".",
|
|
370
371
|
autoComplete: "off",
|
|
371
372
|
omitExtraData: !1,
|
|
372
373
|
liveOmit: !1,
|
|
373
374
|
liveValidate: !0,
|
|
374
|
-
validator:
|
|
375
|
+
validator: jr,
|
|
375
376
|
uiSchema: d,
|
|
376
377
|
onBlur: t,
|
|
377
378
|
schema: a,
|
|
378
379
|
formData: r,
|
|
379
|
-
onChange:
|
|
380
|
+
onChange: s
|
|
380
381
|
}
|
|
381
382
|
);
|
|
382
383
|
};
|
|
383
384
|
function Er() {
|
|
384
|
-
const t = G(), { createSnapshot:
|
|
385
|
+
const t = G(), { createSnapshot: l } = ze(), r = Ue(), s = et(t._type), o = { ...t }, a = () => l(), d = ({ formData: x }, c) => {
|
|
385
386
|
if (c) {
|
|
386
387
|
const m = c.replace("root.", "");
|
|
387
388
|
r([t._id], { [m]: p(x, m) });
|
|
388
389
|
}
|
|
389
390
|
}, i = {
|
|
390
|
-
_name:
|
|
391
|
+
_name: wr({
|
|
391
392
|
title: "Name",
|
|
392
393
|
default: p(t, "_name", t._type)
|
|
393
394
|
})
|
|
394
|
-
}, n = ut(p(
|
|
395
|
-
const x = xt(p(
|
|
395
|
+
}, n = ut(p(o, "_bindings", {})), u = k(() => {
|
|
396
|
+
const x = xt(p(s, "props", {}));
|
|
396
397
|
return gt(n, (c) => {
|
|
397
398
|
delete x[c];
|
|
398
399
|
}), x;
|
|
399
|
-
}, [
|
|
400
|
+
}, [s, n]);
|
|
400
401
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
401
402
|
/* @__PURE__ */ e.jsx(
|
|
402
403
|
$e,
|
|
403
404
|
{
|
|
404
405
|
onChange: d,
|
|
405
406
|
createHistorySnapshot: a,
|
|
406
|
-
formData:
|
|
407
|
+
formData: o,
|
|
407
408
|
properties: i
|
|
408
409
|
}
|
|
409
410
|
),
|
|
410
411
|
/* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
|
|
411
|
-
/* @__PURE__ */ e.jsxs(
|
|
412
|
+
/* @__PURE__ */ e.jsxs(Ge, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
|
|
412
413
|
/* @__PURE__ */ e.jsxs(ie, { value: "BINDING", children: [
|
|
413
414
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline bg-gray-100 ml-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
414
415
|
/* @__PURE__ */ e.jsx(
|
|
@@ -420,11 +421,11 @@ function Er() {
|
|
|
420
421
|
"Data Binding"
|
|
421
422
|
] }) }),
|
|
422
423
|
/* @__PURE__ */ e.jsx(ce, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
423
|
-
|
|
424
|
+
Or,
|
|
424
425
|
{
|
|
425
|
-
bindingData: p(
|
|
426
|
+
bindingData: p(o, "_bindings", {}),
|
|
426
427
|
onChange: (x) => {
|
|
427
|
-
d({ formData: { ...
|
|
428
|
+
d({ formData: { ...o, _bindings: x } }, "root._bindings");
|
|
428
429
|
}
|
|
429
430
|
}
|
|
430
431
|
) })
|
|
@@ -447,7 +448,7 @@ function Er() {
|
|
|
447
448
|
{
|
|
448
449
|
onChange: d,
|
|
449
450
|
createHistorySnapshot: a,
|
|
450
|
-
formData:
|
|
451
|
+
formData: o,
|
|
451
452
|
properties: u
|
|
452
453
|
}
|
|
453
454
|
)
|
|
@@ -457,28 +458,28 @@ function Er() {
|
|
|
457
458
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
458
459
|
] });
|
|
459
460
|
}
|
|
460
|
-
const
|
|
461
|
+
const Ie = new Hr(Br, {
|
|
461
462
|
isCaseSensitive: !1,
|
|
462
463
|
threshold: 0.2,
|
|
463
464
|
minMatchCharLength: 2,
|
|
464
465
|
keys: ["name"]
|
|
465
466
|
});
|
|
466
|
-
function
|
|
467
|
+
function _r() {
|
|
467
468
|
var D;
|
|
468
|
-
const [t] = ke(),
|
|
469
|
+
const [t] = ke(), l = G(), r = Ke(), s = qe(), [o] = Je(), [a, d] = w(""), i = (D = we(t)) == null ? void 0 : D.prop, n = mt((p(l, i, "").replace(Ar, "").split(",").pop() || "").split(" "), b), u = () => {
|
|
469
470
|
const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
470
|
-
r(
|
|
471
|
+
r(o, j, !0), d("");
|
|
471
472
|
}, [x, c] = w([]), m = ({ value: j }) => {
|
|
472
|
-
const L = j.trim().toLowerCase(),
|
|
473
|
+
const L = j.trim().toLowerCase(), I = L.match(/.+:/g);
|
|
473
474
|
let N = [];
|
|
474
|
-
if (
|
|
475
|
-
const [
|
|
476
|
-
N =
|
|
475
|
+
if (I && I.length > 0) {
|
|
476
|
+
const [P] = I, F = L.replace(P, "");
|
|
477
|
+
N = Ie.search(F).map((y) => ({
|
|
477
478
|
...y,
|
|
478
|
-
item: { ...y.item, name:
|
|
479
|
+
item: { ...y.item, name: P + y.item.name }
|
|
479
480
|
}));
|
|
480
481
|
} else
|
|
481
|
-
N =
|
|
482
|
+
N = Ie.search(L);
|
|
482
483
|
c(C(N, "item"));
|
|
483
484
|
}, h = () => {
|
|
484
485
|
c([]);
|
|
@@ -503,7 +504,7 @@ function Fr() {
|
|
|
503
504
|
/* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
504
505
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
505
506
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
506
|
-
|
|
507
|
+
Vr,
|
|
507
508
|
{
|
|
508
509
|
suggestions: x,
|
|
509
510
|
onSuggestionsFetchRequested: m,
|
|
@@ -522,7 +523,7 @@ function Fr() {
|
|
|
522
523
|
}
|
|
523
524
|
) }),
|
|
524
525
|
/* @__PURE__ */ e.jsx(
|
|
525
|
-
|
|
526
|
+
pe,
|
|
526
527
|
{
|
|
527
528
|
variant: "outline",
|
|
528
529
|
className: "h-6 border-gray-700",
|
|
@@ -545,7 +546,7 @@ function Fr() {
|
|
|
545
546
|
/* @__PURE__ */ e.jsx(
|
|
546
547
|
Ye,
|
|
547
548
|
{
|
|
548
|
-
onClick: () => o
|
|
549
|
+
onClick: () => s(o, [j]),
|
|
549
550
|
className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
550
551
|
}
|
|
551
552
|
)
|
|
@@ -559,7 +560,7 @@ function Fr() {
|
|
|
559
560
|
}
|
|
560
561
|
);
|
|
561
562
|
}
|
|
562
|
-
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"],
|
|
563
|
+
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
563
564
|
heading: "Flex Child",
|
|
564
565
|
items: [
|
|
565
566
|
{ type: "arbitrary", label: "Basis", units: B, property: "flexBasis" },
|
|
@@ -568,7 +569,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
568
569
|
{ type: "dropdown", label: "Grow", property: "flexGrow" },
|
|
569
570
|
{ type: "dropdown", label: "Shrink", property: "flexShrink" }
|
|
570
571
|
]
|
|
571
|
-
},
|
|
572
|
+
}, Yr = {
|
|
572
573
|
heading: "Grid Child",
|
|
573
574
|
items: [
|
|
574
575
|
{ type: "range", label: "Col Span", property: "gridColSpan" },
|
|
@@ -981,9 +982,9 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
981
982
|
},
|
|
982
983
|
{
|
|
983
984
|
heading: "Classes",
|
|
984
|
-
items: [{ component:
|
|
985
|
+
items: [{ component: _r }]
|
|
985
986
|
}
|
|
986
|
-
],
|
|
987
|
+
], lt = {
|
|
987
988
|
"not-italic": () => /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z", fill: "white" }) }),
|
|
988
989
|
// visibility
|
|
989
990
|
visible: jt,
|
|
@@ -1177,36 +1178,36 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1177
1178
|
)
|
|
1178
1179
|
] }),
|
|
1179
1180
|
static: $t
|
|
1180
|
-
},
|
|
1181
|
+
}, le = Oe({ canReset: !1, canChange: !0 }), Xr = ({ children: t, canReset: l = !1, canChange: r = !0 }) => (
|
|
1181
1182
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1182
|
-
/* @__PURE__ */ e.jsx(
|
|
1183
|
-
),
|
|
1184
|
-
const
|
|
1183
|
+
/* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: l, canChange: r }, children: t })
|
|
1184
|
+
), st = ({ label: t, property: l, onChange: r }) => {
|
|
1185
|
+
const s = k(() => p(xe, `${l}.classes`, [""]), [l]), o = se(l), a = k(() => p(o, "cls", ""), [o]), { canChange: d } = re(le), i = /\[.*\]/g.test(a);
|
|
1185
1186
|
return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1186
|
-
/* @__PURE__ */ e.jsx(
|
|
1187
|
-
/* @__PURE__ */ e.jsxs(
|
|
1188
|
-
/* @__PURE__ */ e.jsx(
|
|
1187
|
+
/* @__PURE__ */ e.jsx(ar, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
|
|
1188
|
+
/* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1189
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Ne, {}) }) }),
|
|
1189
1190
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1190
1191
|
] })
|
|
1191
1192
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1192
1193
|
ve,
|
|
1193
1194
|
{
|
|
1194
1195
|
rounded: t,
|
|
1195
|
-
onChange: (n) => r(n,
|
|
1196
|
+
onChange: (n) => r(n, l),
|
|
1196
1197
|
selected: a,
|
|
1197
|
-
options:
|
|
1198
|
+
options: s,
|
|
1198
1199
|
disabled: !d
|
|
1199
1200
|
}
|
|
1200
1201
|
) });
|
|
1201
1202
|
};
|
|
1202
|
-
function ve({ selected: t, onChange:
|
|
1203
|
+
function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: o = !1 }) {
|
|
1203
1204
|
const a = t.replace(/.*:/g, "").trim(), { undo: d, redo: i } = ze();
|
|
1204
1205
|
return /* @__PURE__ */ e.jsxs(
|
|
1205
1206
|
"select",
|
|
1206
1207
|
{
|
|
1207
|
-
disabled: !
|
|
1208
|
+
disabled: !s.length || o,
|
|
1208
1209
|
className: `${r ? "rounded-md border border-border" : "border-0"} w-full disable:bg-gray-500 h-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
|
|
1209
|
-
onChange: (n) =>
|
|
1210
|
+
onChange: (n) => l(n.target.value),
|
|
1210
1211
|
onKeyDown: (n) => {
|
|
1211
1212
|
n.ctrlKey && (n.key === "z" && d(), n.key === "y" && i());
|
|
1212
1213
|
},
|
|
@@ -1214,58 +1215,58 @@ function ve({ selected: t, onChange: s, rounded: r = !1, options: o, disabled: l
|
|
|
1214
1215
|
children: [
|
|
1215
1216
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1216
1217
|
$.Children.toArray(
|
|
1217
|
-
|
|
1218
|
+
s.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
|
|
1218
1219
|
)
|
|
1219
1220
|
]
|
|
1220
1221
|
}
|
|
1221
1222
|
);
|
|
1222
1223
|
}
|
|
1223
|
-
const
|
|
1224
|
-
const { canReset: r, canChange:
|
|
1224
|
+
const Zr = ({ property: t, onChange: l }) => {
|
|
1225
|
+
const { canReset: r, canChange: s } = re(le), o = se(t), a = k(() => p(o, "cls", ""), [o]), d = k(() => p(xe, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, n = /\[.*\]/g.test(a);
|
|
1225
1226
|
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: n ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1226
1227
|
/* @__PURE__ */ e.jsx(
|
|
1227
1228
|
"button",
|
|
1228
1229
|
{
|
|
1229
1230
|
type: "button",
|
|
1230
1231
|
className: "box-border w-2/12 rounded-tl rounded-bl bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
|
|
1231
|
-
disabled: !
|
|
1232
|
-
onClick: () =>
|
|
1233
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1232
|
+
disabled: !s && (!r || i - 1 < 0),
|
|
1233
|
+
onClick: () => l(Re(d, i - 1), t),
|
|
1234
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(It, { className: !s && (!r || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
|
|
1234
1235
|
}
|
|
1235
1236
|
),
|
|
1236
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(
|
|
1237
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(st, { label: !1, property: t, onChange: l }) }),
|
|
1237
1238
|
/* @__PURE__ */ e.jsx(
|
|
1238
1239
|
"button",
|
|
1239
1240
|
{
|
|
1240
1241
|
type: "button",
|
|
1241
1242
|
className: "w-2/12 rounded-tr rounded-br bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
|
|
1242
|
-
disabled: !
|
|
1243
|
-
onClick: () =>
|
|
1243
|
+
disabled: !s && (!r || i + 1 >= d.length),
|
|
1244
|
+
onClick: () => l(Re(d, i + 1), t),
|
|
1244
1245
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1245
1246
|
Ce,
|
|
1246
1247
|
{
|
|
1247
|
-
className: !
|
|
1248
|
+
className: !s && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
|
|
1248
1249
|
}
|
|
1249
1250
|
) })
|
|
1250
1251
|
}
|
|
1251
1252
|
)
|
|
1252
1253
|
] }) });
|
|
1253
|
-
},
|
|
1254
|
-
const r = k(() => p(xe, `${t}.classes`, [""]), [t]), { canChange:
|
|
1255
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(
|
|
1256
|
-
/* @__PURE__ */ e.jsx(
|
|
1254
|
+
}, zr = ({ property: t, onChange: l }) => {
|
|
1255
|
+
const r = k(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: s } = re(le), o = se(t), a = k(() => p(o, "cls", ""), [o]);
|
|
1256
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1257
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1257
1258
|
"button",
|
|
1258
1259
|
{
|
|
1259
1260
|
type: "button",
|
|
1260
|
-
disabled: !
|
|
1261
|
-
onClick: () =>
|
|
1261
|
+
disabled: !s,
|
|
1262
|
+
onClick: () => l(d, t),
|
|
1262
1263
|
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${a === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1263
|
-
children: $.createElement(p(
|
|
1264
|
+
children: $.createElement(p(lt, d, We))
|
|
1264
1265
|
}
|
|
1265
1266
|
) }),
|
|
1266
1267
|
/* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
|
|
1267
1268
|
] })) });
|
|
1268
|
-
},
|
|
1269
|
+
}, Ur = {
|
|
1269
1270
|
backgroundColor: "bg",
|
|
1270
1271
|
textColor: "text",
|
|
1271
1272
|
borderColor: "border",
|
|
@@ -1277,15 +1278,15 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1277
1278
|
toColor: "to",
|
|
1278
1279
|
ringColor: "ring",
|
|
1279
1280
|
ringOffsetColor: "ring-offset"
|
|
1280
|
-
},
|
|
1281
|
-
const r =
|
|
1281
|
+
}, Gr = ({ property: t, onChange: l }) => {
|
|
1282
|
+
const r = se(t), s = k(() => p(r, "cls", ""), [r]), { canChange: o } = re(le), [a, d] = w([]), [i, n] = w({ color: "", shade: "" }), u = s.split("-"), x = p(u, "1", ""), c = p(u, "2", ""), m = A(
|
|
1282
1283
|
// eslint-disable-next-line no-shadow
|
|
1283
1284
|
(g) => {
|
|
1284
1285
|
["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), n({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((f) => ({ ...f, color: g, shade: f.shade ? f.shade : "500" })));
|
|
1285
1286
|
},
|
|
1286
1287
|
[d, n]
|
|
1287
1288
|
);
|
|
1288
|
-
|
|
1289
|
+
_(() => {
|
|
1289
1290
|
if (["current", "inherit", "transparent", "black", "white"].includes(x))
|
|
1290
1291
|
return d([]);
|
|
1291
1292
|
d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
|
|
@@ -1297,16 +1298,16 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1297
1298
|
},
|
|
1298
1299
|
[x]
|
|
1299
1300
|
);
|
|
1300
|
-
return
|
|
1301
|
+
return _(() => {
|
|
1301
1302
|
n({ color: "", shade: "" });
|
|
1302
|
-
}, [r]),
|
|
1303
|
-
const f = `${p(
|
|
1304
|
-
f.match(new RegExp(p(xe, `${t}.regExp`, ""))) &&
|
|
1305
|
-
}, [i,
|
|
1303
|
+
}, [r]), _(() => {
|
|
1304
|
+
const f = `${p(Ur, t, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
|
|
1305
|
+
f.match(new RegExp(p(xe, `${t}.regExp`, ""))) && l(f, t);
|
|
1306
|
+
}, [i, l, t]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1306
1307
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1307
1308
|
ve,
|
|
1308
1309
|
{
|
|
1309
|
-
disabled: !
|
|
1310
|
+
disabled: !o,
|
|
1310
1311
|
rounded: !0,
|
|
1311
1312
|
selected: x,
|
|
1312
1313
|
onChange: m,
|
|
@@ -1342,19 +1343,20 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1342
1343
|
]
|
|
1343
1344
|
}
|
|
1344
1345
|
) }),
|
|
1345
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !
|
|
1346
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !o, onChange: h, options: a }) })
|
|
1346
1347
|
] });
|
|
1347
|
-
},
|
|
1348
|
+
}, Pe = (t, l) => {
|
|
1348
1349
|
t = t.toLowerCase();
|
|
1349
1350
|
let r = t.trim().replace(/ |\+/g, "");
|
|
1350
|
-
if ((r === "auto" || r === "none") &&
|
|
1351
|
+
if ((r === "auto" || r === "none") && l.includes(r))
|
|
1351
1352
|
return { value: "", unit: r };
|
|
1352
|
-
const
|
|
1353
|
-
r = r.replace(
|
|
1354
|
-
const
|
|
1355
|
-
return a || d ? { error: "Invalid value" } :
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1353
|
+
const s = l.length ? new RegExp(l.join("|"), "g") : /XXXXXX/g;
|
|
1354
|
+
r = r.replace(s, "");
|
|
1355
|
+
const o = t.match(s), a = o && o.length > 1, d = !b(r) && Number.isNaN(Number(r));
|
|
1356
|
+
return a || d ? { error: "Invalid value" } : o && (o[0] === "auto" || o[0] === "none") ? { value: o[0], unit: "" } : { value: r, unit: o ? o[0] : "" };
|
|
1357
|
+
};
|
|
1358
|
+
const Kr = (t) => {
|
|
1359
|
+
const l = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
|
|
1358
1360
|
if (["auto", "none"].includes(r))
|
|
1359
1361
|
return { value: "", unit: r };
|
|
1360
1362
|
if (r === "px")
|
|
@@ -1364,21 +1366,21 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1364
1366
|
if (r === "full")
|
|
1365
1367
|
return { value: "100", unit: "%" };
|
|
1366
1368
|
if (M(t, "skew-"))
|
|
1367
|
-
return { value: `${
|
|
1369
|
+
return { value: `${l}${r}`, unit: "deg" };
|
|
1368
1370
|
if (M(t, "rotate-"))
|
|
1369
|
-
return { value: `${
|
|
1371
|
+
return { value: `${l}${r}`, unit: "deg" };
|
|
1370
1372
|
if (M(t, "opacity-"))
|
|
1371
1373
|
return { value: `${r / 100}`, unit: "-" };
|
|
1372
1374
|
if (M(t, "duration-") || M(t, "delay-"))
|
|
1373
1375
|
return { value: `${r}`, unit: "ms" };
|
|
1374
1376
|
if (M(t, "translate-") && !r.includes("/"))
|
|
1375
|
-
return { value: `${
|
|
1377
|
+
return { value: `${l}${`${r / 4}`}`, unit: "rem" };
|
|
1376
1378
|
if (M(t, "scale-"))
|
|
1377
|
-
return { value: `${
|
|
1379
|
+
return { value: `${l}${`${r / 100}`}`, unit: "-" };
|
|
1378
1380
|
if (z(t, "border")) {
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1381
|
-
return { value:
|
|
1381
|
+
const s = t.match(/border-?(x|y|t|r|b|l)?\d+/g);
|
|
1382
|
+
if (s)
|
|
1383
|
+
return { value: s[0].split("-").pop(), unit: "px" };
|
|
1382
1384
|
if (t.match(/border-?(x|y|t|r|b|l)?/g))
|
|
1383
1385
|
return { value: "1", unit: "px" };
|
|
1384
1386
|
}
|
|
@@ -1477,31 +1479,32 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1477
1479
|
if (["max", "min", "fit"].includes(r))
|
|
1478
1480
|
return { value: t, unit: "class" };
|
|
1479
1481
|
if (r.includes("/")) {
|
|
1480
|
-
const [
|
|
1481
|
-
return { value:
|
|
1482
|
+
const [s, o] = C(r.split("/"), (a) => parseInt(a, 10));
|
|
1483
|
+
return { value: l + (s / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
1482
1484
|
}
|
|
1483
|
-
return yt(parseFloat(r)) ? { value: `${
|
|
1484
|
-
}
|
|
1485
|
+
return yt(parseFloat(r)) ? { value: `${l + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
|
|
1486
|
+
};
|
|
1487
|
+
const qr = (t) => {
|
|
1485
1488
|
if (b(t))
|
|
1486
1489
|
return { value: "", unit: "" };
|
|
1487
|
-
const
|
|
1488
|
-
if (
|
|
1489
|
-
return
|
|
1490
|
-
const r = p(
|
|
1491
|
-
return { value: `${
|
|
1492
|
-
},
|
|
1490
|
+
const l = t.match(/\[.*\]/g);
|
|
1491
|
+
if (l === null)
|
|
1492
|
+
return Jr(t);
|
|
1493
|
+
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", o = we(r.match(/\d+.\d+|\d+/g));
|
|
1494
|
+
return { value: `${s}${o}`, unit: r.replace(o, "") };
|
|
1495
|
+
}, Jr = (t) => b(t) ? { value: "", unit: "" } : Kr(t), ot = $.createContext({
|
|
1493
1496
|
setDragData: () => {
|
|
1494
1497
|
}
|
|
1495
|
-
}),
|
|
1498
|
+
}), Qr = ({
|
|
1496
1499
|
unit: t,
|
|
1497
|
-
currentValue:
|
|
1500
|
+
currentValue: l,
|
|
1498
1501
|
onDrag: r,
|
|
1499
|
-
onDragEnd:
|
|
1500
|
-
onDragStart:
|
|
1502
|
+
onDragEnd: s,
|
|
1503
|
+
onDragStart: o,
|
|
1501
1504
|
negative: a,
|
|
1502
1505
|
cssProperty: d
|
|
1503
1506
|
}) => {
|
|
1504
|
-
const { setDragData: i } = re(
|
|
1507
|
+
const { setDragData: i } = re(ot);
|
|
1505
1508
|
return /* @__PURE__ */ e.jsx(
|
|
1506
1509
|
"button",
|
|
1507
1510
|
{
|
|
@@ -1509,42 +1512,42 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1509
1512
|
onMouseDown: (n) => {
|
|
1510
1513
|
const u = {
|
|
1511
1514
|
onDrag: r,
|
|
1512
|
-
onDragEnd:
|
|
1515
|
+
onDragEnd: s,
|
|
1513
1516
|
dragging: !0,
|
|
1514
1517
|
dragStartY: n.pageY,
|
|
1515
|
-
dragStartValue: `${
|
|
1518
|
+
dragStartValue: `${l}`,
|
|
1516
1519
|
dragUnit: t,
|
|
1517
1520
|
negative: a,
|
|
1518
1521
|
cssProperty: d
|
|
1519
1522
|
};
|
|
1520
|
-
|
|
1523
|
+
o(u), i(u);
|
|
1521
1524
|
},
|
|
1522
1525
|
color: void 0,
|
|
1523
1526
|
className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
|
|
1524
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1527
|
+
children: /* @__PURE__ */ e.jsx(Pt, {})
|
|
1525
1528
|
}
|
|
1526
1529
|
);
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1530
|
+
}, el = ({ onSelect: t, current: l, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((s) => /* @__PURE__ */ e.jsx(
|
|
1531
|
+
pe,
|
|
1529
1532
|
{
|
|
1530
1533
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1531
|
-
color:
|
|
1534
|
+
color: l === s ? "primary" : void 0,
|
|
1532
1535
|
size: "sm",
|
|
1533
|
-
onClick: (
|
|
1534
|
-
|
|
1536
|
+
onClick: (o) => {
|
|
1537
|
+
o.stopPropagation(), t(s);
|
|
1535
1538
|
},
|
|
1536
|
-
children:
|
|
1539
|
+
children: s
|
|
1537
1540
|
},
|
|
1538
|
-
|
|
1539
|
-
)) }),
|
|
1540
|
-
const [
|
|
1541
|
-
|
|
1542
|
-
const { value: y, unit: v } =
|
|
1541
|
+
s
|
|
1542
|
+
)) }), tl = (t) => {
|
|
1543
|
+
const [l, r] = w(!1), [s, o] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: u, negative: x } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L, I] = w(!1);
|
|
1544
|
+
_(() => {
|
|
1545
|
+
const { value: y, unit: v } = qr(a);
|
|
1543
1546
|
if (v === "") {
|
|
1544
|
-
|
|
1547
|
+
o(y), m(n != null && n.toLowerCase().includes("width") ? "%" : u[0]);
|
|
1545
1548
|
return;
|
|
1546
1549
|
}
|
|
1547
|
-
m(v),
|
|
1550
|
+
m(v), o(v === "class" || b(y) ? "" : y);
|
|
1548
1551
|
}, [a, n, u]);
|
|
1549
1552
|
const N = me(
|
|
1550
1553
|
(y) => {
|
|
@@ -1552,7 +1555,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1552
1555
|
},
|
|
1553
1556
|
[d],
|
|
1554
1557
|
200
|
|
1555
|
-
),
|
|
1558
|
+
), P = me(
|
|
1556
1559
|
(y) => {
|
|
1557
1560
|
d(y, !1);
|
|
1558
1561
|
},
|
|
@@ -1560,7 +1563,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1560
1563
|
200
|
|
1561
1564
|
), F = A(
|
|
1562
1565
|
(y = !1) => {
|
|
1563
|
-
const v =
|
|
1566
|
+
const v = Pe(`${s}`, u);
|
|
1564
1567
|
if (p(v, "error", !1)) {
|
|
1565
1568
|
g(!0);
|
|
1566
1569
|
return;
|
|
@@ -1573,12 +1576,12 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1573
1576
|
if (p(v, "value") === "")
|
|
1574
1577
|
return;
|
|
1575
1578
|
const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1576
|
-
y ?
|
|
1579
|
+
y ? P(K) : N(K);
|
|
1577
1580
|
},
|
|
1578
|
-
[N,
|
|
1579
|
-
),
|
|
1581
|
+
[N, P, s, c, i, u]
|
|
1582
|
+
), oe = A(
|
|
1580
1583
|
(y) => {
|
|
1581
|
-
const v =
|
|
1584
|
+
const v = Pe(`${s}`, u);
|
|
1582
1585
|
if (p(v, "error", !1)) {
|
|
1583
1586
|
g(!0);
|
|
1584
1587
|
return;
|
|
@@ -1592,12 +1595,12 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1592
1595
|
const S = p(v, "unit") !== "" ? p(v, "unit") : y, K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1593
1596
|
N(K);
|
|
1594
1597
|
},
|
|
1595
|
-
[N,
|
|
1598
|
+
[N, s, i, u]
|
|
1596
1599
|
);
|
|
1597
1600
|
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1598
1601
|
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: a }),
|
|
1599
|
-
/* @__PURE__ */ e.jsxs(
|
|
1600
|
-
/* @__PURE__ */ e.jsx(
|
|
1602
|
+
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
1603
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Ne, {}) }) }),
|
|
1601
1604
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
|
|
1602
1605
|
] })
|
|
1603
1606
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${D ? "z-auto" : ""}`, children: [
|
|
@@ -1612,84 +1615,84 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1612
1615
|
onKeyDown: (y) => {
|
|
1613
1616
|
if (y.keyCode !== 38 && y.keyCode !== 40)
|
|
1614
1617
|
return;
|
|
1615
|
-
y.preventDefault(),
|
|
1618
|
+
y.preventDefault(), I(!0);
|
|
1616
1619
|
const v = bt(y.target.value);
|
|
1617
|
-
let S =
|
|
1620
|
+
let S = Ee(v) ? 0 : v;
|
|
1618
1621
|
y.keyCode === 38 && (S += 1), y.keyCode === 40 && (S -= 1);
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1622
|
+
const E = `${S}`, at = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1623
|
+
P(at);
|
|
1621
1624
|
},
|
|
1622
1625
|
onKeyUp: (y) => {
|
|
1623
|
-
L && (y.preventDefault(),
|
|
1626
|
+
L && (y.preventDefault(), I(!1));
|
|
1624
1627
|
},
|
|
1625
1628
|
onBlur: () => F(),
|
|
1626
1629
|
onChange: (y) => {
|
|
1627
|
-
g(!1),
|
|
1630
|
+
g(!1), o(y.target.value);
|
|
1628
1631
|
},
|
|
1629
1632
|
onClick: (y) => {
|
|
1630
1633
|
var v;
|
|
1631
1634
|
(v = y == null ? void 0 : y.target) == null || v.select(), r(!1);
|
|
1632
1635
|
},
|
|
1633
|
-
value: D ? f :
|
|
1636
|
+
value: D ? f : s,
|
|
1634
1637
|
className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
|
|
1635
1638
|
" ",
|
|
1636
1639
|
h ? "border-red-500 text-red-500" : "border-foreground/20"
|
|
1637
1640
|
)
|
|
1638
1641
|
}
|
|
1639
1642
|
),
|
|
1640
|
-
/* @__PURE__ */ e.jsxs(
|
|
1641
|
-
/* @__PURE__ */ e.jsx(
|
|
1643
|
+
/* @__PURE__ */ e.jsxs(W, { open: l, delayDuration: 100, children: [
|
|
1644
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1642
1645
|
"button",
|
|
1643
1646
|
{
|
|
1644
1647
|
type: "button",
|
|
1645
|
-
onClick: () => r(!
|
|
1648
|
+
onClick: () => r(!l),
|
|
1646
1649
|
className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
|
|
1647
1650
|
children: [
|
|
1648
1651
|
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${u.length === 1 ? "px-2 font-semibold" : ""}`, children: c }),
|
|
1649
|
-
u.length > 1 ? /* @__PURE__ */ e.jsx(
|
|
1652
|
+
u.length > 1 ? /* @__PURE__ */ e.jsx(Lt, {}) : null
|
|
1650
1653
|
]
|
|
1651
1654
|
}
|
|
1652
1655
|
) }),
|
|
1653
|
-
/* @__PURE__ */ e.jsx(
|
|
1654
|
-
|
|
1656
|
+
/* @__PURE__ */ e.jsx(ir, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1657
|
+
el,
|
|
1655
1658
|
{
|
|
1656
1659
|
units: u,
|
|
1657
1660
|
current: c,
|
|
1658
1661
|
onSelect: (y) => {
|
|
1659
|
-
r(!1), m(y),
|
|
1662
|
+
r(!1), m(y), oe(y);
|
|
1660
1663
|
}
|
|
1661
1664
|
}
|
|
1662
1665
|
) }) })
|
|
1663
1666
|
] })
|
|
1664
1667
|
] }),
|
|
1665
1668
|
["none", "auto"].indexOf(c) !== -1 || D ? null : /* @__PURE__ */ e.jsx(
|
|
1666
|
-
|
|
1669
|
+
Qr,
|
|
1667
1670
|
{
|
|
1668
1671
|
onDragStart: () => j(!0),
|
|
1669
1672
|
onDragEnd: (y) => {
|
|
1670
1673
|
if (T(() => ""), j(!1), b(y))
|
|
1671
1674
|
return;
|
|
1672
|
-
const v = `${y}`,
|
|
1673
|
-
N(
|
|
1675
|
+
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1676
|
+
N(E);
|
|
1674
1677
|
},
|
|
1675
1678
|
onDrag: (y) => {
|
|
1676
1679
|
if (b(y))
|
|
1677
1680
|
return;
|
|
1678
1681
|
T(y);
|
|
1679
|
-
const v = `${y}`,
|
|
1680
|
-
|
|
1682
|
+
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1683
|
+
P(E);
|
|
1681
1684
|
},
|
|
1682
|
-
currentValue:
|
|
1685
|
+
currentValue: s,
|
|
1683
1686
|
unit: c,
|
|
1684
1687
|
negative: x,
|
|
1685
1688
|
cssProperty: n
|
|
1686
1689
|
}
|
|
1687
1690
|
)
|
|
1688
1691
|
] }) }) });
|
|
1689
|
-
},
|
|
1690
|
-
const
|
|
1691
|
-
return ft(
|
|
1692
|
-
},
|
|
1692
|
+
}, se = (t) => {
|
|
1693
|
+
const l = ue();
|
|
1694
|
+
return ft(l, { property: t });
|
|
1695
|
+
}, rl = (t, l) => {
|
|
1693
1696
|
const r = {
|
|
1694
1697
|
xs: 0,
|
|
1695
1698
|
sm: 1,
|
|
@@ -1698,8 +1701,8 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1698
1701
|
xl: 4,
|
|
1699
1702
|
"2xl": 5
|
|
1700
1703
|
};
|
|
1701
|
-
return r[p(t, "mq", "xs")] <= r[
|
|
1702
|
-
},
|
|
1704
|
+
return r[p(t, "mq", "xs")] <= r[l];
|
|
1705
|
+
}, ll = {
|
|
1703
1706
|
width: "w-",
|
|
1704
1707
|
height: "h-",
|
|
1705
1708
|
minWidth: "min-w-",
|
|
@@ -1772,23 +1775,23 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1772
1775
|
lg: "1024px",
|
|
1773
1776
|
xl: "1280px",
|
|
1774
1777
|
"2xl": "1536px"
|
|
1775
|
-
},
|
|
1776
|
-
const { type:
|
|
1777
|
-
}, units: a, negative: d = !1 } = t, [i] =
|
|
1778
|
-
(N,
|
|
1779
|
-
const F = { dark: i, mq: u, mod: n, cls: N, property:
|
|
1778
|
+
}, sl = (t) => `${t.toUpperCase()} ${Le[t] ? `(${Le[t]} & up)` : ""}`, Se = (t) => {
|
|
1779
|
+
const { type: l = "icons", label: r, property: s, onEmitChange: o = () => {
|
|
1780
|
+
}, units: a, negative: d = !1 } = t, [i] = dr(), [n] = Qe(), [, u] = He(), x = se(s), c = Ke(), m = qe(), [h] = Je(), g = k(() => p(x, "fullCls", ""), [x]), f = A(
|
|
1781
|
+
(N, P = !0) => {
|
|
1782
|
+
const F = { dark: i, mq: u, mod: n, cls: N, property: s, fullCls: "" };
|
|
1780
1783
|
(i || n !== "") && (F.mq = "xs");
|
|
1781
|
-
const
|
|
1782
|
-
c(h, [
|
|
1784
|
+
const oe = Dr(F);
|
|
1785
|
+
c(h, [oe], P);
|
|
1783
1786
|
},
|
|
1784
|
-
[h, i, u, n,
|
|
1787
|
+
[h, i, u, n, s, c]
|
|
1785
1788
|
), T = A(() => {
|
|
1786
1789
|
m(h, [g]);
|
|
1787
|
-
}, [h, g, m]), D = k(() =>
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
}, [D,
|
|
1791
|
-
const [, , j] =
|
|
1790
|
+
}, [h, g, m]), D = k(() => rl(x, u), [x, u]);
|
|
1791
|
+
_(() => {
|
|
1792
|
+
o(D, x);
|
|
1793
|
+
}, [D, o, x]);
|
|
1794
|
+
const [, , j] = He(), L = A(
|
|
1792
1795
|
(N) => {
|
|
1793
1796
|
j({
|
|
1794
1797
|
xs: 400,
|
|
@@ -1800,29 +1803,29 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1800
1803
|
}[N]);
|
|
1801
1804
|
},
|
|
1802
1805
|
[j]
|
|
1803
|
-
),
|
|
1804
|
-
return /* @__PURE__ */ e.jsx(
|
|
1805
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !
|
|
1806
|
+
), I = p(x, "dark", null) === i && p(x, "mod", null) === n && p(x, "mq", null) === u;
|
|
1807
|
+
return /* @__PURE__ */ e.jsx(Xr, { canChange: D, canReset: x && I, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1808
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !I ? "text-foreground" : ""}`, children: r }) }),
|
|
1806
1809
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1807
1810
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1808
|
-
|
|
1809
|
-
|
|
1811
|
+
l === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1812
|
+
tl,
|
|
1810
1813
|
{
|
|
1811
1814
|
currentClass: p(x, "cls", ""),
|
|
1812
|
-
classPrefix: p(
|
|
1815
|
+
classPrefix: p(ll, s, ""),
|
|
1813
1816
|
units: a || [],
|
|
1814
1817
|
onChange: f,
|
|
1815
1818
|
negative: d,
|
|
1816
|
-
cssProperty:
|
|
1819
|
+
cssProperty: s
|
|
1817
1820
|
}
|
|
1818
1821
|
) : null,
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1822
|
+
l === "icons" && /* @__PURE__ */ e.jsx(zr, { property: s, onChange: f }),
|
|
1823
|
+
l === "range" && /* @__PURE__ */ e.jsx(Zr, { property: s, onChange: f }),
|
|
1824
|
+
l === "color" && /* @__PURE__ */ e.jsx(Gr, { property: s, onChange: f }),
|
|
1825
|
+
l === "dropdown" && /* @__PURE__ */ e.jsx(st, { label: r, property: s, onChange: f })
|
|
1823
1826
|
] }),
|
|
1824
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children:
|
|
1825
|
-
/* @__PURE__ */ e.jsx(
|
|
1827
|
+
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children: I ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => T(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Xe, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : D && x ? /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1828
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1826
1829
|
"button",
|
|
1827
1830
|
{
|
|
1828
1831
|
type: "button",
|
|
@@ -1833,7 +1836,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1833
1836
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1834
1837
|
"Current style is set at ",
|
|
1835
1838
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1836
|
-
|
|
1839
|
+
sl(p(x, "mq")),
|
|
1837
1840
|
i && !x.dark ? "(Light mode)" : ""
|
|
1838
1841
|
] }),
|
|
1839
1842
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -1853,26 +1856,26 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1853
1856
|
] }) : null })
|
|
1854
1857
|
] })
|
|
1855
1858
|
] }) });
|
|
1856
|
-
},
|
|
1859
|
+
}, ol = ["px", "%", "em", "rem", "ch", "vh", "vw"], nt = ({
|
|
1857
1860
|
label: t,
|
|
1858
|
-
options:
|
|
1861
|
+
options: l,
|
|
1859
1862
|
borderB: r = !1,
|
|
1860
|
-
borderT:
|
|
1861
|
-
type:
|
|
1862
|
-
units: a =
|
|
1863
|
+
borderT: s = !1,
|
|
1864
|
+
type: o = "arbitrary",
|
|
1865
|
+
units: a = ol,
|
|
1863
1866
|
negative: d = !1
|
|
1864
1867
|
}) => {
|
|
1865
|
-
const [i, n] = w(
|
|
1868
|
+
const [i, n] = w(l[0].key), u = ue(), x = A((c) => C(u, "property").includes(c), [u]);
|
|
1866
1869
|
return /* @__PURE__ */ e.jsxs(
|
|
1867
1870
|
"div",
|
|
1868
1871
|
{
|
|
1869
|
-
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${
|
|
1872
|
+
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${s ? "border-t" : ""}`,
|
|
1870
1873
|
children: [
|
|
1871
1874
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1872
1875
|
t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: t }),
|
|
1873
1876
|
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
|
|
1874
|
-
|
|
1875
|
-
/* @__PURE__ */ e.jsx(
|
|
1877
|
+
l.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1878
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1876
1879
|
"button",
|
|
1877
1880
|
{
|
|
1878
1881
|
type: "button",
|
|
@@ -1882,7 +1885,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1882
1885
|
$.createElement("div", {
|
|
1883
1886
|
className: x(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1884
1887
|
}),
|
|
1885
|
-
$.createElement(p(
|
|
1888
|
+
$.createElement(p(lt, m, We), { className: "text-inherit w-3 h-3" })
|
|
1886
1889
|
]
|
|
1887
1890
|
}
|
|
1888
1891
|
) }),
|
|
@@ -1893,7 +1896,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1893
1896
|
/* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1894
1897
|
Se,
|
|
1895
1898
|
{
|
|
1896
|
-
type:
|
|
1899
|
+
type: o,
|
|
1897
1900
|
units: [...a],
|
|
1898
1901
|
label: "",
|
|
1899
1902
|
property: i,
|
|
@@ -1903,33 +1906,33 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1903
1906
|
]
|
|
1904
1907
|
}
|
|
1905
1908
|
);
|
|
1906
|
-
},
|
|
1907
|
-
const r =
|
|
1908
|
-
const
|
|
1909
|
+
}, nl = ({ heading: t, items: l }) => {
|
|
1910
|
+
const r = ue(), s = k(() => {
|
|
1911
|
+
const o = (i) => U(
|
|
1909
1912
|
i.map((n) => n.styleType === "multiple" ? C(n.options, "key") : n.property)
|
|
1910
1913
|
), a = U(
|
|
1911
|
-
|
|
1914
|
+
l.map((i) => i.styleType === "accordion" ? o(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
|
|
1912
1915
|
), d = C(r, "property");
|
|
1913
|
-
return
|
|
1914
|
-
}, [r,
|
|
1916
|
+
return _e(a, d).length > 0;
|
|
1917
|
+
}, [r, l]);
|
|
1915
1918
|
return /* @__PURE__ */ e.jsxs("details", { children: [
|
|
1916
1919
|
/* @__PURE__ */ e.jsx("summary", { className: "my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "inline", children: [
|
|
1917
1920
|
t,
|
|
1918
|
-
|
|
1921
|
+
s ? /* @__PURE__ */ e.jsx(
|
|
1919
1922
|
"span",
|
|
1920
1923
|
{
|
|
1921
|
-
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${
|
|
1924
|
+
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}`
|
|
1922
1925
|
}
|
|
1923
1926
|
) : null
|
|
1924
1927
|
] }) }),
|
|
1925
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2", children:
|
|
1928
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((o) => o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...o }, o.label) : /* @__PURE__ */ e.jsx(Se, { ...o }, o.label)) })
|
|
1926
1929
|
] });
|
|
1927
|
-
},
|
|
1928
|
-
const
|
|
1930
|
+
}, al = Oe({}), he = ({ section: t }) => {
|
|
1931
|
+
const l = ue(), r = A(
|
|
1929
1932
|
(a = []) => {
|
|
1930
1933
|
const d = {};
|
|
1931
|
-
for (let n = 0; n <
|
|
1932
|
-
d[
|
|
1934
|
+
for (let n = 0; n < l.length; n++)
|
|
1935
|
+
d[l[n].property] = l[n].cls;
|
|
1933
1936
|
let i = !0;
|
|
1934
1937
|
for (const n in a)
|
|
1935
1938
|
if (!ge(d, n) || d[n] !== a[n]) {
|
|
@@ -1938,38 +1941,38 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1938
1941
|
}
|
|
1939
1942
|
return i;
|
|
1940
1943
|
},
|
|
1941
|
-
[
|
|
1942
|
-
),
|
|
1943
|
-
if (
|
|
1944
|
+
[l]
|
|
1945
|
+
), s = k(() => {
|
|
1946
|
+
if (l.length > 0 && t.heading === "Classes")
|
|
1944
1947
|
return !0;
|
|
1945
1948
|
const a = (n) => U(
|
|
1946
1949
|
n.map((u) => u.styleType === "multiple" ? U(C(u.options, "key")) : u.property)
|
|
1947
1950
|
), d = U(
|
|
1948
1951
|
t.items.map((n) => n.styleType === "accordion" ? a(n.items) : n.styleType === "multiple" ? U(C(n.options, "key")) : n.property)
|
|
1949
|
-
), i = C(
|
|
1950
|
-
return
|
|
1951
|
-
}, [
|
|
1952
|
-
return /* @__PURE__ */ e.jsx(
|
|
1952
|
+
), i = C(l, "property");
|
|
1953
|
+
return _e(d, i).length > 0;
|
|
1954
|
+
}, [l, t.heading, t.items]), o = k(() => ({}), []);
|
|
1955
|
+
return /* @__PURE__ */ e.jsx(al.Provider, { value: o, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
1953
1956
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1954
|
-
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${
|
|
1957
|
+
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1955
1958
|
t.heading
|
|
1956
1959
|
] }) }),
|
|
1957
1960
|
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
|
|
1958
|
-
t.items.map((a) => ge(a, "component") ? $.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(
|
|
1961
|
+
t.items.map((a) => ge(a, "component") ? $.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(nl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Se, { ...a }, a.label))
|
|
1959
1962
|
) })
|
|
1960
1963
|
] }) });
|
|
1961
|
-
},
|
|
1964
|
+
}, il = ({
|
|
1962
1965
|
item: t,
|
|
1963
|
-
index:
|
|
1966
|
+
index: l,
|
|
1964
1967
|
canDelete: r,
|
|
1965
|
-
onChange:
|
|
1966
|
-
onRemove:
|
|
1968
|
+
onChange: s,
|
|
1969
|
+
onRemove: o
|
|
1967
1970
|
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${r ? "border-b" : ""}`, children: [
|
|
1968
1971
|
/* @__PURE__ */ e.jsx(
|
|
1969
1972
|
"input",
|
|
1970
1973
|
{
|
|
1971
1974
|
name: "key",
|
|
1972
|
-
onChange: (a) =>
|
|
1975
|
+
onChange: (a) => s(a, l),
|
|
1973
1976
|
value: t.key,
|
|
1974
1977
|
placeholder: "Key",
|
|
1975
1978
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -1982,7 +1985,7 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1982
1985
|
"input",
|
|
1983
1986
|
{
|
|
1984
1987
|
name: "value",
|
|
1985
|
-
onChange: (a) => b(t.key) ? {} :
|
|
1988
|
+
onChange: (a) => b(t.key) ? {} : s(a, l),
|
|
1986
1989
|
value: t.value,
|
|
1987
1990
|
placeholder: "Value",
|
|
1988
1991
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -1991,34 +1994,34 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
1991
1994
|
}
|
|
1992
1995
|
),
|
|
1993
1996
|
/* @__PURE__ */ e.jsx(
|
|
1994
|
-
|
|
1997
|
+
Xe,
|
|
1995
1998
|
{
|
|
1996
|
-
onClick:
|
|
1999
|
+
onClick: o,
|
|
1997
2000
|
className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
|
|
1998
2001
|
}
|
|
1999
2002
|
)
|
|
2000
2003
|
] })
|
|
2001
|
-
] }),
|
|
2004
|
+
] }), dl = ({ section: t }) => {
|
|
2002
2005
|
var m;
|
|
2003
|
-
const { setSyncState:
|
|
2006
|
+
const { setSyncState: l } = cr(), r = G(), [s, o] = w([]), [a] = ke(), d = Ue(), i = `${p(a, "0.prop")}_attrs`;
|
|
2004
2007
|
ne.useEffect(() => {
|
|
2005
2008
|
const h = C(p(r, i), (g, f) => ({ key: f, value: g }));
|
|
2006
|
-
b(h) ?
|
|
2009
|
+
b(h) ? o([]) : o(h);
|
|
2007
2010
|
}, [p(r, i)]);
|
|
2008
|
-
const n = () =>
|
|
2009
|
-
const g = be(
|
|
2011
|
+
const n = () => o([...s, { key: "", value: "" }]), u = (h) => {
|
|
2012
|
+
const g = be(s, (f, T) => h !== T);
|
|
2010
2013
|
c(g);
|
|
2011
2014
|
}, x = (h, g) => {
|
|
2012
|
-
const f = [...
|
|
2015
|
+
const f = [...s];
|
|
2013
2016
|
f[g][h.target.name] = h.target.value, c(f);
|
|
2014
2017
|
}, c = ne.useCallback(
|
|
2015
2018
|
(h = []) => {
|
|
2016
2019
|
const g = {};
|
|
2017
2020
|
je(h, (f) => {
|
|
2018
2021
|
b(f.key) || Me(g, f.key, f.value);
|
|
2019
|
-
}), d([p(r, "_id")], { [i]: g }),
|
|
2022
|
+
}), d([p(r, "_id")], { [i]: g }), l("UNSAVED");
|
|
2020
2023
|
},
|
|
2021
|
-
[r,
|
|
2024
|
+
[r, l, d, i]
|
|
2022
2025
|
);
|
|
2023
2026
|
return /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
2024
2027
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
@@ -2036,10 +2039,10 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
2036
2039
|
/* @__PURE__ */ e.jsxs(
|
|
2037
2040
|
"div",
|
|
2038
2041
|
{
|
|
2039
|
-
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(
|
|
2042
|
+
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(s) && b((m = ye(s)) == null ? void 0 : m.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
|
|
2040
2043
|
onClick: () => {
|
|
2041
2044
|
var h;
|
|
2042
|
-
!b(
|
|
2045
|
+
!b(s) && b((h = ye(s)) == null ? void 0 : h.key) || n();
|
|
2043
2046
|
},
|
|
2044
2047
|
children: [
|
|
2045
2048
|
/* @__PURE__ */ e.jsx(Ce, { width: 12, height: 12 }),
|
|
@@ -2049,12 +2052,12 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
2049
2052
|
)
|
|
2050
2053
|
] }),
|
|
2051
2054
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
2052
|
-
b(
|
|
2055
|
+
b(s) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
|
|
2053
2056
|
ne.Children.toArray(
|
|
2054
|
-
C(
|
|
2055
|
-
const f =
|
|
2057
|
+
C(s, (h, g) => {
|
|
2058
|
+
const f = s.length > 0 && g < s.length - 1;
|
|
2056
2059
|
return /* @__PURE__ */ e.jsx(
|
|
2057
|
-
|
|
2060
|
+
il,
|
|
2058
2061
|
{
|
|
2059
2062
|
item: h,
|
|
2060
2063
|
index: g,
|
|
@@ -2069,8 +2072,8 @@ const zr = ({ property: t, onChange: s }) => {
|
|
|
2069
2072
|
] }) })
|
|
2070
2073
|
] });
|
|
2071
2074
|
};
|
|
2072
|
-
function
|
|
2073
|
-
const [t,
|
|
2075
|
+
function cl() {
|
|
2076
|
+
const [t, l] = Qe(), { flexChild: r, gridChild: s } = pr(), [, o] = Rr(ur), { t: a } = Fe(), [d] = ke();
|
|
2074
2077
|
return b(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2075
2078
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2076
2079
|
/* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
|
|
@@ -2082,12 +2085,12 @@ function ps() {
|
|
|
2082
2085
|
] })
|
|
2083
2086
|
] }) }) : (
|
|
2084
2087
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
2085
|
-
/* @__PURE__ */ e.jsxs("div", { onClick: () =>
|
|
2088
|
+
/* @__PURE__ */ e.jsxs("div", { onClick: () => o(!1), className: "flex h-full flex-col", children: [
|
|
2086
2089
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
|
|
2087
2090
|
/* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
|
|
2088
|
-
/* @__PURE__ */ e.jsxs(
|
|
2089
|
-
/* @__PURE__ */ e.jsx(
|
|
2090
|
-
/* @__PURE__ */ e.jsxs(
|
|
2091
|
+
/* @__PURE__ */ e.jsxs(xr, { defaultValue: t, onValueChange: (i) => l(i), children: [
|
|
2092
|
+
/* @__PURE__ */ e.jsx(gr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(hr, { placeholder: "State" }) }),
|
|
2093
|
+
/* @__PURE__ */ e.jsxs(mr, { children: [
|
|
2091
2094
|
/* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
|
|
2092
2095
|
/* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
|
|
2093
2096
|
/* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
|
|
@@ -2103,19 +2106,19 @@ function ps() {
|
|
|
2103
2106
|
] })
|
|
2104
2107
|
] })
|
|
2105
2108
|
] }) }),
|
|
2106
|
-
/* @__PURE__ */ e.jsxs(
|
|
2107
|
-
/* @__PURE__ */ e.jsxs(
|
|
2108
|
-
r && /* @__PURE__ */ e.jsx(he, { section:
|
|
2109
|
-
|
|
2109
|
+
/* @__PURE__ */ e.jsxs(yr, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
|
|
2110
|
+
/* @__PURE__ */ e.jsxs(Ge, { type: "multiple", className: "h-full w-full", children: [
|
|
2111
|
+
r && /* @__PURE__ */ e.jsx(he, { section: Fr }),
|
|
2112
|
+
s ? /* @__PURE__ */ e.jsx(he, { section: Yr }) : null,
|
|
2110
2113
|
Wr.map((i) => /* @__PURE__ */ e.jsx(he, { section: i }, i.heading)),
|
|
2111
|
-
/* @__PURE__ */ e.jsx(
|
|
2114
|
+
/* @__PURE__ */ e.jsx(dl, { section: { heading: "Attributes" } })
|
|
2112
2115
|
] }),
|
|
2113
2116
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
2114
2117
|
] })
|
|
2115
2118
|
] })
|
|
2116
2119
|
);
|
|
2117
2120
|
}
|
|
2118
|
-
const
|
|
2121
|
+
const pl = {
|
|
2119
2122
|
px: 1,
|
|
2120
2123
|
"%": 1,
|
|
2121
2124
|
em: 100,
|
|
@@ -2126,8 +2129,8 @@ const us = {
|
|
|
2126
2129
|
"-": 1,
|
|
2127
2130
|
deg: 1,
|
|
2128
2131
|
ms: 0.1
|
|
2129
|
-
},
|
|
2130
|
-
const t = G(), { t:
|
|
2132
|
+
}, bs = () => {
|
|
2133
|
+
const t = G(), { t: l } = Fe(), [r, s] = $.useState(""), [o, a] = $.useState({
|
|
2131
2134
|
onDrag: (n) => n,
|
|
2132
2135
|
onDragEnd: (n) => n,
|
|
2133
2136
|
dragStartY: 0,
|
|
@@ -2138,18 +2141,18 @@ const us = {
|
|
|
2138
2141
|
cssProperty: ""
|
|
2139
2142
|
}), d = me(
|
|
2140
2143
|
(n) => {
|
|
2141
|
-
const u = !p(
|
|
2142
|
-
let c = parseFloat(
|
|
2143
|
-
c =
|
|
2144
|
-
let m =
|
|
2144
|
+
const u = !p(o, "negative", !1), x = p(o, "cssProperty", "");
|
|
2145
|
+
let c = parseFloat(o.dragStartValue);
|
|
2146
|
+
c = Ee(c) ? 0 : c;
|
|
2147
|
+
let m = pl[o.dragUnit];
|
|
2145
2148
|
(z(x, "scale") || x === "opacity") && (m = 10);
|
|
2146
|
-
let g = (
|
|
2147
|
-
u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1),
|
|
2149
|
+
let g = (o.dragStartY - n.pageY) / m + c;
|
|
2150
|
+
u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1), o.onDrag(`${g}`), s(`${g}`);
|
|
2148
2151
|
},
|
|
2149
|
-
[
|
|
2152
|
+
[o],
|
|
2150
2153
|
50
|
|
2151
2154
|
), i = A(() => {
|
|
2152
|
-
setTimeout(() =>
|
|
2155
|
+
setTimeout(() => o.onDragEnd(`${r}`), 100), a({
|
|
2153
2156
|
onDrag: (n) => n,
|
|
2154
2157
|
onDragEnd: (n) => n,
|
|
2155
2158
|
dragStartY: 0,
|
|
@@ -2159,12 +2162,12 @@ const us = {
|
|
|
2159
2162
|
negative: !1,
|
|
2160
2163
|
cssProperty: ""
|
|
2161
2164
|
});
|
|
2162
|
-
}, [
|
|
2165
|
+
}, [o, r, a]);
|
|
2163
2166
|
return vt(t) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2164
2167
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2165
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2166
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
2167
|
-
|
|
2168
|
+
/* @__PURE__ */ e.jsx("h1", { children: l("no_block_selected_for_styling") })
|
|
2169
|
+
] }) }) : /* @__PURE__ */ e.jsxs(ot.Provider, { value: { setDragData: a }, children: [
|
|
2170
|
+
o.dragging ? /* @__PURE__ */ e.jsx(
|
|
2168
2171
|
"div",
|
|
2169
2172
|
{
|
|
2170
2173
|
onMouseMove: d,
|
|
@@ -2172,23 +2175,23 @@ const us = {
|
|
|
2172
2175
|
className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
|
|
2173
2176
|
}
|
|
2174
2177
|
) : null,
|
|
2175
|
-
/* @__PURE__ */ e.jsxs(
|
|
2176
|
-
/* @__PURE__ */ e.jsxs(
|
|
2177
|
-
/* @__PURE__ */ e.jsx(
|
|
2178
|
-
/* @__PURE__ */ e.jsx(
|
|
2178
|
+
/* @__PURE__ */ e.jsxs(br, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
|
|
2179
|
+
/* @__PURE__ */ e.jsxs(fr, { className: "mx-1 grid grid-cols-2", children: [
|
|
2180
|
+
/* @__PURE__ */ e.jsx(Be, { value: "settings", children: "Settings" }),
|
|
2181
|
+
/* @__PURE__ */ e.jsx(Be, { value: "styling", children: "Styling" })
|
|
2179
2182
|
] }),
|
|
2180
2183
|
/* @__PURE__ */ e.jsx(
|
|
2181
|
-
|
|
2184
|
+
Ae,
|
|
2182
2185
|
{
|
|
2183
2186
|
value: "settings",
|
|
2184
2187
|
className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
2185
2188
|
children: /* @__PURE__ */ e.jsx(Er, {})
|
|
2186
2189
|
}
|
|
2187
2190
|
),
|
|
2188
|
-
/* @__PURE__ */ e.jsx(
|
|
2191
|
+
/* @__PURE__ */ e.jsx(Ae, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(cl, {}) })
|
|
2189
2192
|
] })
|
|
2190
2193
|
] });
|
|
2191
2194
|
};
|
|
2192
2195
|
export {
|
|
2193
|
-
|
|
2196
|
+
bs as default
|
|
2194
2197
|
};
|