@chaibuilder/sdk 0.1.11 → 0.1.13
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-9d1873e7.js → AddBlocks-598b655e.js} +46 -46
- package/dist/{AddBlocks-12a3610b.cjs → AddBlocks-5df8b221.cjs} +2 -2
- package/dist/{BrandingOptions-69d302c5.js → BrandingOptions-0acb0974.js} +1 -1
- package/dist/{BrandingOptions-7439ff1e.cjs → BrandingOptions-2795be29.cjs} +1 -1
- package/dist/{CanvasArea-7424817c.js → CanvasArea-73b0ec3b.js} +2 -2
- package/dist/{CanvasArea-6f24eabe.cjs → CanvasArea-a637ef3a.cjs} +2 -2
- package/dist/{CurrentPage-1e98746d.js → CurrentPage-3a189b02.js} +1 -1
- package/dist/{CurrentPage-526d5497.cjs → CurrentPage-77baf305.cjs} +1 -1
- package/dist/ImagesPanel-68a11293.cjs +1 -0
- package/dist/ImagesPanel-996761b1.js +27 -0
- package/dist/{Layers-8233c000.js → Layers-42ba6c2e.js} +2 -2
- package/dist/{Layers-1fa4a7ad.cjs → Layers-7f3a2335.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-46fcc533.js → MarkAsGlobalBlock-3e708ff4.js} +1 -1
- package/dist/{MarkAsGlobalBlock-9b4b1f4f.cjs → MarkAsGlobalBlock-c18910cc.cjs} +1 -1
- package/dist/{PagesPanel-51d88965.js → PagesPanel-86323919.js} +2 -2
- package/dist/{PagesPanel-4aafb70f.cjs → PagesPanel-dfbcc68b.cjs} +1 -1
- package/dist/{ProjectPanel-0748603f.cjs → ProjectPanel-4be28a35.cjs} +1 -1
- package/dist/{ProjectPanel-af75d218.js → ProjectPanel-9f645945.js} +2 -2
- package/dist/{Settings-29f58509.js → Settings-57f2a7c2.js} +3 -3
- package/dist/{Settings-c184ce31.cjs → Settings-99916fc1.cjs} +1 -1
- package/dist/{SidePanels-279903d7.cjs → SidePanels-0e4ab159.cjs} +1 -1
- package/dist/{SidePanels-54124742.js → SidePanels-b0347e28.js} +2 -2
- package/dist/{Topbar-c7ce8963.cjs → Topbar-44c010e3.cjs} +1 -1
- package/dist/{Topbar-c52e0d3e.js → Topbar-87c1c5b2.js} +1 -1
- package/dist/UnsplashImages-47374e0c.js +181 -0
- package/dist/UnsplashImages-f761ad96.cjs +1 -0
- package/dist/{add-page-modal-fda0926e.js → add-page-modal-71c100f9.js} +4 -4
- package/dist/{add-page-modal-6be96646.cjs → add-page-modal-b4e12262.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -0
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-0aa98758.js → delete-page-modal-9dbe3038.js} +1 -1
- package/dist/{delete-page-modal-d7a7059c.cjs → delete-page-modal-fe71e66d.cjs} +1 -1
- package/dist/{form-d82a2694.cjs → form-5d04c9b3.cjs} +1 -1
- package/dist/{form-1ead8a4a.js → form-bf09d392.js} +1 -1
- package/dist/{index-d0cc5c76.js → index-0d399aef.js} +278 -276
- package/dist/{index-2524cb40.cjs → index-d4a18b5d.cjs} +2 -2
- package/dist/{link-fcfa7b45.cjs → link-4585b2d6.cjs} +1 -1
- package/dist/{link-82714c4b.js → link-6467eda6.js} +6 -6
- package/dist/{page-viewer-b65e1389.js → page-viewer-8a0cd017.js} +2 -2
- package/dist/{page-viewer-a53f2a9b.cjs → page-viewer-eec3bdfb.cjs} +1 -1
- package/dist/{project-general-setting-c4907c79.cjs → project-general-setting-12172508.cjs} +1 -1
- package/dist/{project-general-setting-40d772a0.js → project-general-setting-155bc3fc.js} +4 -4
- package/dist/{project-seo-setting-5a54c6a6.cjs → project-seo-setting-3f645a02.cjs} +1 -1
- package/dist/{project-seo-setting-245555ef.js → project-seo-setting-e9587467.js} +3 -3
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +17 -17
- package/dist/server.js +33 -33
- package/dist/{single-page-detail-5e2a7ffe.cjs → single-page-detail-1b3195d1.cjs} +1 -1
- package/dist/{single-page-detail-15c218dc.js → single-page-detail-fb0fe01b.js} +5 -5
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/package.json +1 -1
- package/dist/ImagesPanel-36a2f276.js +0 -27
- package/dist/ImagesPanel-731cda7a.cjs +0 -1
- package/dist/UnsplashImages-68492dc9.cjs +0 -1
- package/dist/UnsplashImages-afaa7706.js +0 -151
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),o=require("@radix-ui/react-icons"),u=require("react"),i=require("./useBuilderProp-5e57d0c8.cjs"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),o=require("@radix-ui/react-icons"),u=require("react"),i=require("./useBuilderProp-5e57d0c8.cjs"),c=require("./index-d4a18b5d.cjs");require("react-i18next");const x=require("lodash");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const m=({id:t=null,closeModal:s})=>{const l=c.useMarkAsGlobalBlock(),[r,a]=u.useState("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("h1",{className:"text-lg font-bold",children:"Mark as Global"}),e.jsxRuntimeExports.jsxs("div",{className:"py-2 text-sm",children:["Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("ul",{className:"mt-4 list-inside list-disc space-y-1",children:[e.jsxRuntimeExports.jsxs("li",{children:["Global blocks are indicated with ",e.jsxRuntimeExports.jsx(o.GlobeIcon,{className:"inline"})," icon in left sidebar"]}),e.jsxRuntimeExports.jsx("li",{children:'Global blocks are available under "Global" category'})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"my-4",children:[e.jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-400",children:"Enter global block name"}),e.jsxRuntimeExports.jsx("input",{placeholder:"Eg: Header, Footer ",className:"mt-2 w-full",value:r,onChange:n=>a(n.target.value)})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-4",children:[e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>{l(t,x.capitalize(r)),s()},disabled:r.length<=2,variant:"default",children:"Mark as Global"}),e.jsxRuntimeExports.jsx(i.Button,{variant:"outline",onClick:s,children:"Cancel"})]})]})};exports.default=m;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-944c88e2.js";
|
|
2
2
|
import e, { Suspense as p } from "react";
|
|
3
3
|
import { sortBy as a, filter as d, get as n } from "lodash";
|
|
4
|
-
import { N as l, O as c } from "./index-
|
|
4
|
+
import { N as l, O as c } from "./index-0d399aef.js";
|
|
5
5
|
import "i18next";
|
|
6
6
|
import "react-i18next";
|
|
7
7
|
import "flagged";
|
|
@@ -27,7 +27,7 @@ import "@react-hookz/web";
|
|
|
27
27
|
import "@chaibuilder/blocks";
|
|
28
28
|
import "lucide-react";
|
|
29
29
|
import "sonner";
|
|
30
|
-
const x = e.lazy(() => import("./add-page-modal-
|
|
30
|
+
const x = e.lazy(() => import("./add-page-modal-71c100f9.js")), g = e.lazy(() => import("./page-viewer-8a0cd017.js")), H = () => {
|
|
31
31
|
const { data: i = [], isLoading: o } = l(), { data: r } = c(), m = a(d(i, { type: "STATIC" }), (s) => n(s, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
|
|
32
32
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),s=require("lodash"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),s=require("lodash"),t=require("./index-d4a18b5d.cjs");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./useBuilderProp-5e57d0c8.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("jotai");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const x=i.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-b4e12262.cjs"))),q=i.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-eec3bdfb.cjs"))),c=()=>{const{data:u=[],isLoading:n}=t.usePages(),{data:r}=t.useProject(),o=s.sortBy(s.filter(u,{type:"STATIC"}),a=>s.get(a,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(x,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(q,{isLoading:n,pages:o})})]})};exports.default=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),r=require("react"),x=require("lodash"),s=require("./accordion-0afd8143.cjs"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),r=require("react"),x=require("lodash"),s=require("./accordion-0afd8143.cjs"),a=require("./index-d4a18b5d.cjs");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./useBuilderProp-5e57d0c8.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-12172508.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-3f645a02.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function j(){const t=a.useUpdateProject(),{data:o}=a.useProject(),[i,u]=r.useState(l(o||{})),n=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(o,n.current)||t.mutate(n.current,{onSuccess:()=>u(n.current)})},[n]),r.useEffect(()=>{n.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:u})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:u})})})]})]})})]})}exports.default=j;
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
|
2
2
|
import i, { useRef as x, useEffect as m, Suspense as n } from "react";
|
|
3
3
|
import { isEqual as j, isEmpty as b } from "lodash";
|
|
4
4
|
import { A as f, a as l, b as c, c as d } from "./accordion-c0176dc5.js";
|
|
5
|
-
import { P as h, O as g } from "./index-
|
|
5
|
+
import { P as h, O as g } from "./index-0d399aef.js";
|
|
6
6
|
import "@radix-ui/react-accordion";
|
|
7
7
|
import "@radix-ui/react-icons";
|
|
8
8
|
import "./utils-ac68b2c8.js";
|
|
@@ -29,7 +29,7 @@ import "@react-hookz/web";
|
|
|
29
29
|
import "@chaibuilder/blocks";
|
|
30
30
|
import "lucide-react";
|
|
31
31
|
import "sonner";
|
|
32
|
-
const N = i.lazy(() => import("./project-general-setting-
|
|
32
|
+
const N = i.lazy(() => import("./project-general-setting-155bc3fc.js")), S = i.lazy(() => import("./project-seo-setting-e9587467.js")), p = /* @__PURE__ */ e.jsx("div", { className: "px-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (t) => t && b(t.seoData) ? {
|
|
33
33
|
...t,
|
|
34
34
|
seoData: { title: "", description: "", image: "" }
|
|
35
35
|
} : t;
|
|
@@ -8,9 +8,9 @@ import { PlusIcon as pe, Cross2Icon as Ae, EyeOpenIcon as st, EyeClosedIcon as b
|
|
|
8
8
|
import { T as Ct, a as jt, b as fe, c as ve } from "./tabs-85caa1e8.js";
|
|
9
9
|
import kt from "@rjsf/core";
|
|
10
10
|
import Nt from "@rjsf/validator-ajv8";
|
|
11
|
-
import { A as oe, c as De, C as Me, D as St, F as Rt, G as Tt, i as ge, H as Oe, I as Ee, h as Pe, d as Vt, J as Fe, e as we, K as se, u as Ht, L as Bt, M as At } from "./index-
|
|
11
|
+
import { A as oe, c as De, C as Me, D as St, F as Rt, G as Tt, i as ge, H as Oe, I as Ee, h as Pe, d as Vt, J as Fe, e as we, K as se, u as Ht, L as Bt, M as At } from "./index-0d399aef.js";
|
|
12
12
|
import { getBlockComponent as $t } from "@chaibuilder/blocks";
|
|
13
|
-
import { R as Lt, I as It, a as Dt, L as Mt } from "./link-
|
|
13
|
+
import { R as Lt, I as It, a as Dt, L as Mt } from "./link-6467eda6.js";
|
|
14
14
|
import { useAtom as Ot } from "jotai";
|
|
15
15
|
import Et from "react-autosuggest";
|
|
16
16
|
import Pt from "fuse.js";
|
|
@@ -39,7 +39,7 @@ import "react-icons-picker";
|
|
|
39
39
|
import "react-dom";
|
|
40
40
|
import "./dialog-3d4e82ed.js";
|
|
41
41
|
import "@radix-ui/react-dialog";
|
|
42
|
-
import "./ImagesPanel-
|
|
42
|
+
import "./ImagesPanel-996761b1.js";
|
|
43
43
|
import "react-quill";
|
|
44
44
|
import "himalaya";
|
|
45
45
|
import "@radix-ui/react-slot";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),d=require("react"),_=require("@react-hookz/web"),r=require("lodash"),Q=require("react-i18next"),o=require("@radix-ui/react-icons"),M=require("./tabs-860e37aa.cjs"),ne=require("@rjsf/core"),le=require("@rjsf/validator-ajv8"),f=require("./index-2524cb40.cjs"),ie=require("@chaibuilder/blocks"),F=require("./link-fcfa7b45.cjs"),ae=require("jotai"),ue=require("react-autosuggest"),pe=require("fuse.js"),D=require("./html-to-json-78bfa1f3.cjs"),w=require("./useBuilderProp-5e57d0c8.cjs"),U=require("./label-167415e5.cjs"),de=require("./MODIFIERS-70fef873.cjs"),ce=require("./input-42acea7e.cjs"),$=require("./accordion-0afd8143.cjs"),xe=require("./scroll-area-088530b9.cjs"),E=require("./select-0e32300c.cjs");require("@radix-ui/react-tabs");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("redux-undo");require("lucide-react");require("sonner");require("react-icons-picker");require("react-dom");require("./dialog-170eaad9.cjs");require("@radix-ui/react-dialog");require("./ImagesPanel-731cda7a.cjs");require("react-quill");require("himalaya");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("@radix-ui/react-label");require("@radix-ui/react-accordion");require("@radix-ui/react-scroll-area");require("@radix-ui/react-select");function me(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(l,t,n.get?n:{enumerable:!0,get:()=>s[t]})}}return l.default=s,Object.freeze(l)}const X=me(d);function ge(){const s=f.useSelectedBlock(),{createSnapshot:l}=f.useCanvasHistory(),t=f.useUpdateBlocksPropsRealtime(),[n]=f.useActiveLanguage(),i=ie.getBlockComponent(s._type),u=r.get(i,"props",{}),c={type:"object",properties:{_name:{title:"Name",type:"string",default:r.get(s,"_name",s._type)}}},p={};Object.keys(u).forEach(m=>{const j=u[m];if(r.includes(["slot","styles"],j.type))return;const b=r.get(j,"i18n",!1)?`${m}-${n}`:m;c.properties[b]=f.getBlockJSONFromSchemas(j,n),p[b]=f.getBlockJSONFromUISchemas(j,n)});const a={...s},h=({formData:m},j)=>{if(j){const b=j.replace("root.","");t([s._id],{[b]:r.get(m,b)})}},g=()=>{l()};return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(ne,{widgets:{richtext:F.RichTextEditorField,icon:F.IconPickerField,image:F.ImagePickerField},fields:{link:F.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!1,liveOmit:!1,liveValidate:!0,uiSchema:p,onBlur:g,schema:c,formData:a,validator:le,onChange:h}),e.jsxRuntimeExports.jsx("div",{className:"pb-60"})]})}const G=new pe(D.ALL_TW_CLASSES,{isCaseSensitive:!1,threshold:.2,minMatchCharLength:2,keys:["name"]});function he(){var N;const[s]=f.useSelectedStylingBlocks(),l=f.useSelectedBlock(),t=f.useAddClassesToBlocks(),n=f.useRemoveClassesFromBlocks(),[i]=f.useSelectedBlockIds(),[u,c]=d.useState(""),p=(N=r.first(s))==null?void 0:N.prop,a=r.reject((r.get(l,p,"").replace(de.STYLES_KEY,"").split(",").pop()||"").split(" "),r.isEmpty),h=()=>{const C=u.trim().toLowerCase().replace(/ +(?= )/g,"").split(" ");t(i,C,!0),c("")},[g,m]=d.useState([]),j=({value:C})=>{const B=C.trim().toLowerCase(),I=B.match(/.+:/g);let k=[];if(I&&I.length>0){const[H]=I,L=B.replace(H,"");k=G.search(L).map(x=>({...x,item:{...x.item,name:H+x.item.name}}))}else k=G.search(B);m(r.map(k,"item"))},b=()=>{m([])},y=C=>C.name,R=C=>e.jsxRuntimeExports.jsx("div",{className:"rounded-md p-1",children:C.name}),V={autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"Enter class name",value:u,onKeyDown:C=>{C.key==="Enter"&&u.trim()!==""&&h()},onChange:(C,{newValue:B})=>c(B),className:"w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"};return e.jsxRuntimeExports.jsxs("div",{className:`no-scrollbar flex ${g.length>0?"min-h-[300px]":"min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,children:[e.jsxRuntimeExports.jsx(U.Label,{className:"mt-2",children:"Add Tailwind classes"}),e.jsxRuntimeExports.jsxs("div",{className:"relative -mt-4 flex items-center gap-x-3",children:[e.jsxRuntimeExports.jsx("div",{className:"relative flex w-full items-center gap-x-3",children:e.jsxRuntimeExports.jsx(ue,{suggestions:g,onSuggestionsFetchRequested:j,onSuggestionsClearRequested:b,getSuggestionValue:y,renderSuggestion:R,inputProps:V,containerProps:{className:"relative h-8 w-full gap-y-1 py-1 border-gray-600"},theme:{suggestion:"bg-transparent",suggestionHighlighted:"bg-gray-700 ",suggestionsContainerOpen:"absolute bg-gray-100 z-50 max-h-[230px] overflow-y-auto w-full border border-gray-600 rounded-md"}})}),e.jsxRuntimeExports.jsx(w.Button,{variant:"outline",className:"h-6 border-gray-700",onClick:h,disabled:u.trim()==="",size:"sm",children:e.jsxRuntimeExports.jsx(o.PlusIcon,{})})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-wrap gap-2",children:[r.isEmpty(a)&&e.jsxRuntimeExports.jsx("div",{className:"flex h-10 w-full items-center justify-center text-center text-sm text-gray-400",children:"No class added"}),X.Children.toArray(a.map(C=>e.jsxRuntimeExports.jsxs("div",{className:"group relative flex cursor-default items-center gap-x-1 rounded-full border border-blue-600 bg-blue-500 p-px px-1.5 text-[11px] text-white hover:border-blue-900",children:[C,e.jsxRuntimeExports.jsx(o.Cross2Icon,{onClick:()=>n(i,[C]),className:"invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"})]},C)))]})]})}const T=["px","%","em","rem","ch","vh","vw"],ye={heading:"Flex Child",items:[{type:"arbitrary",label:"Basis",units:T,property:"flexBasis"},{type:"range",label:"Order",property:"order"},{type:"dropdown",label:"Flex",property:"flexGrowShrink"},{type:"dropdown",label:"Grow",property:"flexGrow"},{type:"dropdown",label:"Shrink",property:"flexShrink"}]},be={heading:"Grid Child",items:[{type:"range",label:"Col Span",property:"gridColSpan"},{type:"range",label:"Col Start",property:"gridColStart"},{type:"range",label:"Col End",property:"gridColEnd"},{type:"range",label:"Row Span",property:"gridRowSpan"},{type:"range",label:"Row Start",property:"gridRowStart"},{type:"range",label:"Row End",property:"gridRowEnd"},{type:"range",label:"Order",property:"order"}]},fe=[{heading:"Display",items:[{type:"dropdown",label:"Display",property:"display",units:T},{styleType:"accordion",heading:"Flex options",items:[{type:"dropdown",label:"Direction",property:"flexDirection"},{type:"dropdown",label:"Wrap",property:"flexWrap"},{type:"dropdown",label:"Justify",property:"justifyContent"},{type:"dropdown",label:"Content",property:"alignContent"},{type:"dropdown",label:"Items",property:"alignItems"},{styleType:"multiple",label:"Gap",options:[{key:"gap",label:"All"},{key:"gapX",label:"Left-Right"},{key:"gapY",label:"Top-Bottom"}]}],conditions:{display:"flex"}},{styleType:"accordion",heading:"Grid options",items:[{type:"range",label:"Columns",property:"gridColumns"},{type:"range",label:"Rows",property:"gridRows"},{type:"dropdown",label:"Auto Flow",property:"gridAutoFlow"},{type:"dropdown",label:"Auto Cols",property:"gridAutoColumns"},{type:"dropdown",label:"Auto Rows",property:"gridAutoRows"},{type:"dropdown",label:"Justify",property:"justifyContent"},{type:"dropdown",label:"Content",property:"alignContent"},{type:"dropdown",label:"Items",property:"alignItems"},{styleType:"multiple",label:"Gap",units:["px","rem"],options:[{key:"gap",label:"All"},{key:"gapX",label:"Left-Right"},{key:"gapY",label:"Top-Bottom"}]}],conditions:{display:"grid"}},{styleType:"accordion",heading:"Visibility & Opacity",items:[{type:"dropdown",label:"Visibility",property:"visibility",units:T},{type:"arbitrary",label:"Opacity",property:"opacity",units:["-"]}]}]},{heading:"Spacing",items:[{styleType:"multiple",label:"Margin",negative:!0,units:[...T,"auto"],options:[{key:"margin",label:"All"},{key:"marginX",label:"Left-Right"},{key:"marginY",label:"Top-Bottom"},{key:"marginTop",label:"Top"},{key:"marginRight",label:"Right"},{key:"marginBottom",label:"Bottom"},{key:"marginLeft",label:"Left"}]},{styleType:"multiple",label:"Padding",options:[{key:"padding",label:"All"},{key:"paddingX",label:"Left-Right"},{key:"paddingY",label:"Top-Bottom"},{key:"paddingTop",label:"Top"},{key:"paddingRight",label:"Right"},{key:"paddingBottom",label:"Bottom"},{key:"paddingLeft",label:"Left"}]},{styleType:"multiple",label:"Space Between",options:[{key:"spaceX",label:"Left-Right"},{key:"spaceY",label:"Top-Bottom"}]}]},{heading:"Size",items:[{type:"arbitrary",label:"Width",units:T.concat("auto"),property:"width"},{type:"arbitrary",label:"Height",units:T.concat("auto"),property:"height"},{styleType:"accordion",heading:"Min width & height",items:[{type:"arbitrary",label:"Min Width",units:T.concat("auto"),property:"minWidth"},{type:"arbitrary",label:"Min Height",units:T.concat("auto"),property:"minHeight"}]},{styleType:"accordion",heading:"Max width & height",items:[{type:"arbitrary",label:"Max Width",units:T.concat("auto"),property:"maxWidth"},{type:"arbitrary",label:"Max Height",units:T.concat("auto"),property:"maxHeight"}]},{styleType:"accordion",heading:"Object options & aspect ratio",items:[{type:"dropdown",label:"Aspect",property:"aspectRatio"},{type:"dropdown",label:"Fit",property:"objectFit"},{type:"dropdown",label:"Position",property:"objectPosition"}]}]},{heading:"Position",items:[{type:"icons",label:"Position",property:"position"},{styleType:"accordion",heading:"Position options",items:[{styleType:"multiple",label:"Direction",options:[{key:"top",label:"Top"},{key:"right",label:"Right"},{key:"bottom",label:"Bottom"},{key:"left",label:"Left"}]},{styleType:"multiple",label:"Inset",options:[{key:"inset",label:"All"},{key:"insetX",label:"Left Right"},{key:"insetY",label:"Top Bottom"}]},{type:"arbitrary",label:"Z-Chai",units:["-","auto"],property:"zIndex"}]},{styleType:"accordion",heading:"Float & Clear",items:[{type:"icons",label:"Float",property:"float"},{type:"dropdown",label:"Clear",property:"clear"}]},{styleType:"accordion",heading:"Overflow & Overscroll",items:[{styleType:"multiple",type:"dropdown",label:"Overflow",options:[{key:"overflow",label:"All"},{key:"overflowX",label:"Left-Right"},{key:"overflowY",label:"Top-Bottom"}]},{styleType:"multiple",type:"dropdown",label:"Overscroll",options:[{key:"overscroll",label:"All"},{key:"overscrollX",label:"Left-Right"},{key:"overscrollY",label:"Top-Bottom"}]}]}]},{heading:"Typography",items:[{type:"dropdown",property:"fontFamily",label:"Font"},{type:"arbitrary",property:"fontSize",label:"Size",units:T},{type:"arbitrary",property:"lineHeight",label:"Height",units:T.concat("-")},{type:"range",property:"fontWeight",label:"Weight"},{type:"color",property:"textColor",label:"Color"},{styleType:"accordion",heading:"Alignments",items:[{type:"dropdown",property:"textAlign",label:"Align"},{type:"dropdown",property:"verticalAlign",label:"V. Align"}]},{styleType:"accordion",heading:"Spacing, decoration & more",items:[{type:"dropdown",property:"letterSpacing",label:"Spacing"},{type:"dropdown",property:"textDecoration",label:"Decoration"},{type:"range",property:"textDecorationThickness",label:"Thickness"},{type:"dropdown",property:"textTransform",label:"Transform"}]},{styleType:"accordion",heading:"White space & breaks",items:[{type:"dropdown",property:"whitespace",label:"Whitespace"},{type:"dropdown",property:"wordBreak",label:"Wordbreak"}]}]},{heading:"Background",items:[{type:"color",label:"Bg. Color",property:"backgroundColor"},{styleType:"accordion",heading:"Position, Size & more",items:[{type:"dropdown",label:"Attachment",property:"backgroundAttachment"},{type:"dropdown",label:"Clipping",property:"backgroundClip"},{type:"dropdown",label:"Origin",property:"backgroundOrigin"},{type:"dropdown",label:"Position",property:"backgroundPosition"},{type:"dropdown",label:"Repeat",property:"backgroundRepeat"},{type:"dropdown",label:"Size",property:"backgroundSize"}]},{type:"dropdown",label:"Gradient",property:"backgroundGradient"},{styleType:"accordion",heading:"Gradient colors",items:[{type:"color",label:"From",property:"fromColor"},{type:"color",label:"Via",property:"viaColor"},{type:"color",label:"To",property:"toColor"}]}]},{heading:"Border & Outline",items:[{styleType:"multiple",type:"dropdown",label:"Width",options:[{key:"border",label:"All"},{key:"borderX",label:"Left Right"},{key:"borderY",label:"Top bottom"},{key:"borderTop",label:"Top"},{key:"borderRight",label:"Right"},{key:"borderBottom",label:"Bottom"},{key:"borderLeft",label:"Left"}]},{styleType:"multiple",type:"dropdown",label:"Corners",options:[{key:"borderRadius",label:"All"},{key:"borderRadiusTop",label:"Top"},{key:"borderRadiusRight",label:"Right"},{key:"borderRadiusBottom",label:"Bottom"},{key:"borderRadiusLeft",label:"Left"},{key:"borderRadiusTopLeft",label:"Top Left"},{key:"borderRadiusTopRight",label:"Top right"},{key:"borderRadiusBottomRight",label:"Bottom right"},{key:"borderRadiusBottomLeft",label:"Bottom left"}]},{type:"color",label:"Color",property:"borderColor"},{type:"dropdown",label:"Style",property:"borderStyle"},{styleType:"accordion",heading:"Divide options",items:[{styleType:"multiple",type:"range",label:"Width",options:[{key:"divideXWidth",label:"Left Right"},{key:"divideYWidth",label:"Top Bottom"}]},{type:"color",label:"Color",property:"divideColor"},{type:"dropdown",label:"Style",property:"divideStyle"}]},{styleType:"accordion",heading:"Outline styling",items:[{type:"range",label:"Width",property:"outlineWidth"},{type:"range",label:"Offset",property:"outlineOffset"},{type:"dropdown",label:"Style",property:"outlineStyle"}]},{styleType:"accordion",heading:"Ring options",items:[{type:"range",label:"Width",property:"ringWidth"},{type:"color",label:"Color",property:"ringColor"},{type:"range",label:"Offset",property:"ringOffsetWidth"},{type:"color",label:"Off. color",property:"ringOffsetColor"}]}]},{heading:"Effect & Animation",items:[{type:"range",label:"Shadow",property:"boxShadow"},{type:"color",label:"Color",property:"boxShadowColor"},{type:"dropdown",label:"Cursor",property:"cursor"},{styleType:"accordion",heading:"Blend & Cursor",items:[{type:"dropdown",label:"Mix Blend",property:"mixBlendMode"},{type:"dropdown",label:"Bg. Blend",property:"bgBlendMode"}]},{styleType:"accordion",heading:"Transform",items:[{type:"dropdown",label:"Origin",property:"transformOrigin"},{styleType:"multiple",label:"Scale",units:["-"],options:[{key:"scale",label:"All"},{key:"scaleX",label:"Left-Right"},{key:"scaleY",label:"Top-Bottom"}]},{styleType:"multiple",label:"Skew",units:["deg"],options:[{key:"skewX",label:"Left-Right"},{key:"skewY",label:"Top-Bottom"}]},{styleType:"multiple",label:"Translate",negative:!0,options:[{key:"translateX",label:"Left-Right"},{key:"translateY",label:"Top-Bottom"}]},{type:"arbitrary",units:["deg"],negative:!0,label:"Rotate",property:"rotate"}]},{styleType:"accordion",heading:"Animation",items:[{type:"dropdown",label:"Animation",property:"animation"},{type:"dropdown",label:"Transition",property:"transition"},{type:"dropdown",label:"Easing",property:"transitionEase"},{type:"arbitrary",units:["ms"],label:"Duration",property:"duration"},{type:"arbitrary",units:["ms"],label:"Delay",property:"delay"}]}]},{heading:"Classes",items:[{component:he}]}],ee={"not-italic":()=>e.jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z",fill:"white"})}),visible:o.EyeOpenIcon,invisible:o.EyeClosedIcon,hidden:o.EyeClosedIcon,gap:o.BorderAllIcon,gapX:o.WidthIcon,gapY:o.HeightIcon,spaceX:o.WidthIcon,spaceY:o.HeightIcon,overscroll:o.BorderAllIcon,overscrollX:o.WidthIcon,overscrollY:o.HeightIcon,overflow:o.BorderAllIcon,overflowX:o.WidthIcon,overflowY:o.HeightIcon,top:o.ArrowUpIcon,right:o.ArrowRightIcon,bottom:o.ArrowDownIcon,left:o.ArrowLeftIcon,inset:o.BorderAllIcon,insetX:o.WidthIcon,insetY:o.HeightIcon,border:o.BorderAllIcon,borderX:o.WidthIcon,borderY:o.HeightIcon,borderTop:o.ArrowUpIcon,borderRight:o.ArrowRightIcon,borderBottom:o.ArrowDownIcon,borderLeft:o.ArrowLeftIcon,borderRadius:o.BorderAllIcon,borderRadiusX:o.WidthIcon,borderRadiusY:o.HeightIcon,borderRadiusTop:o.ArrowUpIcon,borderRadiusRight:o.ArrowRightIcon,borderRadiusBottom:o.ArrowDownIcon,borderRadiusLeft:o.ArrowLeftIcon,borderRadiusTopLeft:o.ArrowTopLeftIcon,borderRadiusTopRight:o.ArrowTopRightIcon,borderRadiusBottomRight:o.ArrowBottomRightIcon,borderRadiusBottomLeft:o.ArrowBottomLeftIcon,divideXWidth:o.WidthIcon,divideYWidth:o.HeightIcon,scale:o.BorderAllIcon,scaleX:o.WidthIcon,scaleY:o.HeightIcon,skewX:o.WidthIcon,skewY:o.HeightIcon,translateX:o.WidthIcon,translateY:o.HeightIcon,padding:o.BorderAllIcon,paddingX:o.WidthIcon,paddingY:o.HeightIcon,paddingTop:o.ArrowUpIcon,paddingRight:o.ArrowRightIcon,paddingBottom:o.ArrowDownIcon,paddingLeft:o.ArrowLeftIcon,margin:o.BorderAllIcon,marginX:o.WidthIcon,marginY:o.HeightIcon,marginTop:o.ArrowUpIcon,marginRight:o.ArrowRightIcon,marginBottom:o.ArrowDownIcon,marginLeft:o.ArrowLeftIcon,textLeft:o.AlignLeftIcon,textCenter:o.AlignCenterHorizontallyIcon,textRight:o.AlignRightIcon,textJustify:o.StretchHorizontallyIcon,italic:o.FontItalicIcon,underline:o.UnderlineIcon,overline:o.OverlineIcon,uppercase:o.LetterCaseUppercaseIcon,block:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M2 2H14V14H2V2ZM1 1H15V15H1V1Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 4H4V12H7V4ZM9 4H12V12H9V4Z",fill:"currentColor"})]}),"float-right":()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M8 4H16V12H8V4Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M0 4H6V6H0V4ZM0 7H6V9H0V7ZM4 10H0V12H4V10Z",fill:"currentColor"})]}),"float-left":()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M0 4H8V12H0V4Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M10 4H16V6H10V4ZM10 7H16V9H10V7ZM14 10H10V12H14V10Z",fill:"currentColor"})]}),"float-none":o.Cross2Icon,fixed:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M15 2H14V4H13V5H14V6H15V2ZM10 5V4H9V2H1V8H2V5H10ZM7 4V3H5V4H7ZM4 4V3H2V4H4ZM1 13H7V14H1V13Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H10V3H11V6H12V3H13V2H11ZM2 9H1V12H2V11H7V10H2V9ZM15 7H8V14H15V7Z",fill:"currentColor"})]}),absolute:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H15V6H14V2ZM9 3V2H1V8H2V3H9ZM7 13H1V14H7V13Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H10V3H11V6H12V3H13V2H11ZM2 9H1V12H2V11H7V10H2V9ZM15 7H8V14H15V7Z",fill:"currentColor"})]}),relative:()=>e.jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H9V3H11V6H12V3H14V2H11ZM2 8H1V13H2V11H7V10H2V8ZM15 7H8V14H15V7Z",fill:"currentColor"})}),sticky:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M12.9998 7C13.6558 7 14.2937 6.78498 14.8158 6.38787C15.338 5.99076 15.7156 5.43345 15.8908 4.80128C16.066 4.16912 16.0292 3.49694 15.7859 2.8877C15.5427 2.27846 15.1065 1.76573 14.5441 1.42804C13.9817 1.09034 13.3241 0.946293 12.672 1.01795C12.02 1.08961 11.4094 1.37303 10.9337 1.8248C10.4581 2.27658 10.1436 2.8718 10.0385 3.51932C9.93341 4.16685 10.0434 4.83097 10.3518 5.41L6.88176 8.88C6.80034 8.96122 6.73572 9.05769 6.69158 9.16388C6.64744 9.27008 6.62465 9.38393 6.62451 9.49894C6.62437 9.61395 6.64689 9.72785 6.69077 9.83416C6.73465 9.94046 6.79904 10.0371 6.88026 10.1185C6.96149 10.1999 7.05795 10.2645 7.16415 10.3087C7.27035 10.3528 7.3842 10.3756 7.4992 10.3758C7.61421 10.3759 7.72812 10.3534 7.83442 10.3095C7.94072 10.2656 8.03734 10.2012 8.11876 10.12L11.5888 6.648C12.0088 6.873 12.4888 7 12.9988 7H12.9998Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M9.535 2H1V14H15V7.465C14.69 7.645 14.355 7.783 14 7.875V13H2V5H9.126C8.86504 3.98486 9.01223 2.90789 9.536 2H9.535ZM7 3V4H5V3H7ZM4 3V4H2V3H4Z",fill:"currentColor"})]}),static:o.Cross1Icon},O=d.createContext({canReset:!1,canChange:!0}),je=({children:s,canReset:l=!1,canChange:t=!0})=>e.jsxRuntimeExports.jsx(O.Provider,{value:{canReset:l,canChange:t},children:s}),te=({label:s,property:l,onChange:t})=>{const n=d.useMemo(()=>r.get(D.CLASSES_LIST,`${l}.classes`,[""]),[l]),i=W(l),u=d.useMemo(()=>r.get(i,"cls",""),[i]),{canChange:c}=d.useContext(O),p=/\[.*\]/g.test(u);return e.jsxRuntimeExports.jsx("div",{className:s?"w-full rounded ":"grow",children:p?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(ce.Input,{className:"w-[70%] rounded py-1",readOnly:!0,value:u}),e.jsxRuntimeExports.jsxs(w.Tooltip,{delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 text-blue-600 group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:"Current value is using a Tailwind arbitrary value."})]})]}):e.jsxRuntimeExports.jsx(Z,{rounded:s,onChange:a=>t(a,l),selected:u,options:n,disabled:!c})})};function Z({selected:s,onChange:l,rounded:t=!1,options:n,disabled:i=!1}){const u=s.replace(/.*:/g,"").trim(),{undo:c,redo:p}=f.useCanvasHistory();return e.jsxRuntimeExports.jsxs("select",{disabled:!n.length||i,className:`${t?"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`,onChange:a=>l(a.target.value),onKeyDown:a=>{a.ctrlKey&&(a.key==="z"&&c(),a.key==="y"&&p())},value:u,children:[e.jsxRuntimeExports.jsx("option",{className:"bg-transparent",value:""}),d.Children.toArray(n.map(a=>e.jsxRuntimeExports.jsx("option",{className:"bg-transparent",value:a,children:a})))]})}const ve=({property:s,onChange:l})=>{const{canReset:t,canChange:n}=d.useContext(O),i=W(s),u=d.useMemo(()=>r.get(i,"cls",""),[i]),c=d.useMemo(()=>r.get(D.CLASSES_LIST,`${s}.classes`,[""]),[s]),p=c.indexOf(u)>-1?c.indexOf(u):0,a=/\[.*\]/g.test(u);return e.jsxRuntimeExports.jsx("div",{className:"flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs",children:a?e.jsxRuntimeExports.jsx("div",{className:"py-[5px] px-2",children:u}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("button",{type:"button",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",disabled:!n&&(!t||p-1<0),onClick:()=>l(r.nth(c,p-1),s),children:e.jsxRuntimeExports.jsx("span",{className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(o.MinusIcon,{className:!n&&(!t||p-1<0)?"text-gray-500":"text-white/60"})})}),e.jsxRuntimeExports.jsx("div",{className:"w-8/12 text-center",children:e.jsxRuntimeExports.jsx(te,{label:!1,property:s,onChange:l})}),e.jsxRuntimeExports.jsx("button",{type:"button",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",disabled:!n&&(!t||p+1>=c.length),onClick:()=>l(r.nth(c,p+1),s),children:e.jsxRuntimeExports.jsx("span",{className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(o.PlusIcon,{className:!n&&(!t||p+1>=c.length)?"text-gray-500":"text-white/60"})})})]})})},Re=({property:s,onChange:l})=>{const t=d.useMemo(()=>r.get(D.CLASSES_LIST,`${s}.classes`,[""]),[s]),{canChange:n}=d.useContext(O),i=W(s),u=d.useMemo(()=>r.get(i,"cls",""),[i]);return e.jsxRuntimeExports.jsx("div",{className:"flex grow flex-wrap gap-1",children:r.map(t,c=>e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",disabled:!n,onClick:()=>l(c,s),className:`cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${u===c?" bg-blue-500 text-white":"disabled:bg-gray-600 disabled:text-gray-400"}`,children:d.createElement(r.get(ee,c,o.BoxIcon))})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:r.startCase(r.toLower(c))})]}))})},we={backgroundColor:"bg",textColor:"text",borderColor:"border",boxShadowColor:"shadow",outlineColor:"outline",divideColor:"divide",fromColor:"from",viaColor:"via",toColor:"to",ringColor:"ring",ringOffsetColor:"ring-offset"},Ce=({property:s,onChange:l})=>{const t=W(s),n=d.useMemo(()=>r.get(t,"cls",""),[t]),{canChange:i}=d.useContext(O),[u,c]=d.useState([]),[p,a]=d.useState({color:"",shade:""}),h=n.split("-"),g=r.get(h,"1",""),m=r.get(h,"2",""),j=d.useCallback(y=>{["current","inherit","transparent","black","white"].includes(y)?(c([]),a({color:y})):(c(["50","100","200","300","400","500","600","700","800","900"]),a(R=>({...R,color:y,shade:R.shade?R.shade:"500"})))},[c,a]);d.useEffect(()=>{if(["current","inherit","transparent","black","white"].includes(g))return c([]);c(["50","100","200","300","400","500","600","700","800","900"])},[g]);const b=d.useCallback(y=>{a({color:g,shade:y})},[g]);return d.useEffect(()=>{a({color:"",shade:""})},[t]),d.useEffect(()=>{const R=`${r.get(we,s,"")}-${p.color}${p.shade?`-${p.shade}`:""}`;R.match(new RegExp(r.get(D.CLASSES_LIST,`${s}.regExp`,"")))&&l(R,s)},[p,l,s]),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs",children:[e.jsxRuntimeExports.jsx("div",{className:"grow text-center",children:e.jsxRuntimeExports.jsx(Z,{disabled:!i,rounded:!0,selected:g,onChange:j,options:["current","transparent","primary","secondary","black","white","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]})}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"grow text-center",children:e.jsxRuntimeExports.jsx(Z,{rounded:!0,selected:m,disabled:!g||!i,onChange:b,options:u})})]})},K=(s,l)=>{s=s.toLowerCase();let t=s.trim().replace(/ |\+/g,"");if((t==="auto"||t==="none")&&l.includes(t))return{value:"",unit:t};const n=l.length?new RegExp(l.join("|"),"g"):/XXXXXX/g;t=t.replace(n,"");const i=s.match(n),u=i&&i.length>1,c=!r.isEmpty(t)&&Number.isNaN(Number(t));return u||c?{error:"Invalid value"}:i&&(i[0]==="auto"||i[0]==="none")?{value:i[0],unit:""}:{value:t,unit:i?i[0]:""}},Ee=s=>{const l=s.startsWith("-")?"-":"",t=s.split("-").pop();if(["auto","none"].includes(t))return{value:"",unit:t};if(t==="px")return{value:"1",unit:"px"};if(t==="screen")return{value:"100",unit:s.indexOf("w-")!==-1?"vw":"vh"};if(t==="full")return{value:"100",unit:"%"};if(r.includes(s,"skew-"))return{value:`${l}${t}`,unit:"deg"};if(r.includes(s,"rotate-"))return{value:`${l}${t}`,unit:"deg"};if(r.includes(s,"opacity-"))return{value:`${t/100}`,unit:"-"};if(r.includes(s,"duration-")||r.includes(s,"delay-"))return{value:`${t}`,unit:"ms"};if(r.includes(s,"translate-")&&!t.includes("/"))return{value:`${l}${`${t/4}`}`,unit:"rem"};if(r.includes(s,"scale-"))return{value:`${l}${`${t/100}`}`,unit:"-"};if(r.startsWith(s,"border")){const n=s.match(/border-?(x|y|t|r|b|l)?\d+/g);if(n)return{value:n[0].split("-").pop(),unit:"px"};if(s.match(/border-?(x|y|t|r|b|l)?/g))return{value:"1",unit:"px"}}if(r.startsWith(s,"max-w-")){if(s==="max-w-screen-sm")return{value:"640",unit:"px"};if(s==="max-w-screen-md")return{value:"768",unit:"px"};if(s==="max-w-screen-lg")return{value:"1024",unit:"px"};if(s==="max-w-screen-xl")return{value:"1280",unit:"px"};if(s==="max-w-screen-2xl")return{value:"1536",unit:"px"};if(t==="xs")return{value:"320",unit:"px"};if(t==="sm")return{value:"384",unit:"px"};if(t==="md")return{value:"448",unit:"px"};if(t==="lg")return{value:"512",unit:"px"};if(t==="xl")return{value:"576",unit:"px"};if(t==="2xl")return{value:"672",unit:"px"};if(t==="3xl")return{value:"768",unit:"px"};if(t==="4xl")return{value:"896",unit:"px"};if(t==="5xl")return{value:"1024",unit:"px"};if(t==="6xl")return{value:"1152",unit:"px"};if(t==="7xl")return{value:"1280",unit:"px"};if(t==="prose")return{value:"65",unit:"ch"}}if(r.startsWith(s,"text-")){if(t==="xs")return{value:"12",unit:"px"};if(t==="sm")return{value:"14",unit:"px"};if(t==="base")return{value:"16",unit:"px"};if(t==="lg")return{value:"18",unit:"px"};if(t==="xl")return{value:"20",unit:"px"};if(t==="2xl")return{value:"24",unit:"px"};if(t==="3xl")return{value:"30",unit:"px"};if(t==="4xl")return{value:"36",unit:"px"};if(t==="5xl")return{value:"48",unit:"px"};if(t==="6xl")return{value:"60",unit:"px"};if(t==="7xl")return{value:"72",unit:"px"};if(t==="8xl")return{value:"96",unit:"px"};if(t==="9xl")return{value:"128",unit:"px"}}if(r.startsWith(s,"leading-")){if(t==="none")return{value:"1",unit:"-"};if(t==="tight")return{value:"1.25",unit:"-"};if(t==="snug")return{value:"1.375",unit:"-"};if(t==="normal")return{value:"1.5",unit:"-"};if(t==="relaxed")return{value:"1.625",unit:"-"};if(t==="loose")return{value:"2",unit:"-"}}if(r.startsWith(s,"tracking-")){if(t==="tighter")return{value:"-0.05",unit:"em"};if(t==="tight")return{value:"-0.025",unit:"em"};if(t==="normal")return{value:"0",unit:"em"};if(t==="wide")return{value:"0.025",unit:"em"};if(t==="wider")return{value:"0.05",unit:"em"};if(t==="widest")return{value:"0.1",unit:"em"}}if(["max","min","fit"].includes(t))return{value:s,unit:"class"};if(t.includes("/")){const[n,i]=r.map(t.split("/"),u=>parseInt(u,10));return{value:l+(n/i*100).toFixed(2).replace(".00",""),unit:"%"}}return r.isNumber(parseFloat(t))?{value:`${l+parseFloat(t)*4}`,unit:"px"}:{value:t,unit:"class"}},ke=s=>{if(r.isEmpty(s))return{value:"",unit:""};const l=s.match(/\[.*\]/g);if(l===null)return Se(s);const t=r.get(l,"0","").replace(/\[|\]/g,""),n=s.startsWith("-")?"-":"",i=r.first(t.match(/\d+.\d+|\d+/g));return{value:`${n}${i}`,unit:t.replace(i,"")}},Se=s=>r.isEmpty(s)?{value:"",unit:""}:Ee(s),re=d.createContext({setDragData:()=>{}}),Te=({unit:s,currentValue:l,onDrag:t,onDragEnd:n,onDragStart:i,negative:u,cssProperty:c})=>{const{setDragData:p}=d.useContext(re);return e.jsxRuntimeExports.jsx("button",{type:"button",onMouseDown:a=>{const h={onDrag:t,onDragEnd:n,dragging:!0,dragStartY:a.pageY,dragStartValue:`${l}`,dragUnit:s,negative:u,cssProperty:c};i(h),p(h)},color:void 0,className:"relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",children:e.jsxRuntimeExports.jsx(o.RowSpacingIcon,{})})},Ne=({onSelect:s,current:l,units:t})=>e.jsxRuntimeExports.jsx("div",{"data-theme":"light",className:"-m-[7px] -mx-[13px] flex w-9 flex-col",children:t.map(n=>e.jsxRuntimeExports.jsx(w.Button,{className:"h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",color:l===n?"primary":void 0,size:"sm",onClick:i=>{i.stopPropagation(),s(n)},children:n},n))}),Ie=s=>{const[l,t]=d.useState(!1),[n,i]=d.useState(""),{currentClass:u,onChange:c,classPrefix:p,cssProperty:a,units:h,negative:g}=s,[m,j]=d.useState(a!=null&&a.toLowerCase().includes("width")?"%":h[0]),[b,y]=d.useState(!1),[R,V]=d.useState(""),[N,C]=d.useState(!1),[B,I]=d.useState(!1);d.useEffect(()=>{const{value:x,unit:v}=ke(u);if(v===""){i(x),j(a!=null&&a.toLowerCase().includes("width")?"%":h[0]);return}j(v),i(v==="class"||r.isEmpty(x)?"":x)},[u,a,h]);const k=_.useThrottledCallback(x=>{c(x)},[c],200),H=_.useThrottledCallback(x=>{c(x,!1)},[c],200),L=d.useCallback((x=!1)=>{const v=K(`${n}`,h);if(r.get(v,"error",!1)){y(!0);return}const S=r.get(v,"unit")!==""?r.get(v,"unit"):m;if(S==="auto"||S==="none"){k(`${p}${S}`);return}if(r.get(v,"value")==="")return;const q=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;x?H(q):k(q)},[k,H,n,m,p,h]),P=d.useCallback(x=>{const v=K(`${n}`,h);if(r.get(v,"error",!1)){y(!0);return}if(x==="auto"||x==="none"){k(`${p}${x}`);return}if(r.get(v,"value")==="")return;const S=r.get(v,"unit")!==""?r.get(v,"unit"):x,q=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;k(q)},[k,n,p,h]);return e.jsxRuntimeExports.jsx("div",{className:"flex w-full flex-col",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start",children:m==="class"?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("input",{className:"w-20 rounded py-1",readOnly:!0,value:u}),e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 text-blue-600 group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:"Current value is using a Tailwind preset class."})]})]}):e.jsxRuntimeExports.jsxs("div",{className:`group relative flex items-center ${N?"z-auto":""}`,children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md border border-border",children:[["none","auto"].indexOf(m)!==-1?null:e.jsxRuntimeExports.jsx("input",{readOnly:m==="class",onKeyPress:x=>{x.key==="Enter"&&L()},onKeyDown:x=>{if(x.keyCode!==38&&x.keyCode!==40)return;x.preventDefault(),I(!0);const v=r.parseInt(x.target.value);let S=r.isNaN(v)?0:v;x.keyCode===38&&(S+=1),x.keyCode===40&&(S-=1);const A=`${S}`,oe=`${A.startsWith("-")?"-":""}${p}[${A.replace("-","")}${m==="-"?"":m}]`;H(oe)},onKeyUp:x=>{B&&(x.preventDefault(),I(!1))},onBlur:()=>L(),onChange:x=>{y(!1),i(x.target.value)},onClick:x=>{var v;(v=x==null?void 0:x.target)==null||v.select(),t(!1)},value:N?R:n,className:"h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(" ",b?"border-red-500 text-red-500":"border-foreground/20")}),e.jsxRuntimeExports.jsxs(w.Tooltip,{open:l,delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>t(!l),className:"flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",children:[e.jsxRuntimeExports.jsx("span",{className:`inline-block ${h.length===1?"px-2 font-semibold":""}`,children:m}),h.length>1?e.jsxRuntimeExports.jsx(o.TriangleDownIcon,{}):null]})}),e.jsxRuntimeExports.jsx(w.TooltipPortal,{children:e.jsxRuntimeExports.jsx(w.TooltipContent,{className:"bg-background",children:e.jsxRuntimeExports.jsx(Ne,{units:h,current:m,onSelect:x=>{t(!1),j(x),P(x)}})})})]})]}),["none","auto"].indexOf(m)!==-1||N?null:e.jsxRuntimeExports.jsx(Te,{onDragStart:()=>C(!0),onDragEnd:x=>{if(V(()=>""),C(!1),r.isEmpty(x))return;const v=`${x}`,A=`${v.startsWith("-")?"-":""}${p}[${v.replace("-","")}${m==="-"?"":m}]`;k(A)},onDrag:x=>{if(r.isEmpty(x))return;V(x);const v=`${x}`,A=`${v.startsWith("-")?"-":""}${p}[${v.replace("-","")}${m==="-"?"":m}]`;H(A)},currentValue:n,unit:m,negative:g,cssProperty:a})]})})})},W=s=>{const l=f.useSelectedBlockCurrentClasses();return r.findLast(l,{property:s})},He=(s,l)=>{const t={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5};return t[r.get(s,"mq","xs")]<=t[l]},Be={width:"w-",height:"h-",minWidth:"min-w-",minHeight:"min-h-",maxWidth:"max-w-",maxHeight:"max-h-",zIndex:"z-",gap:"gap-",gapX:"gap-x-",gapY:"gap-y-",margin:"m-",marginX:"mx-",marginY:"my-",marginTop:"mt-",marginBottom:"mb-",marginLeft:"ml-",marginRight:"mr-",padding:"p-",paddingX:"px-",paddingY:"py-",paddingTop:"pt-",paddingBottom:"pb-",paddingLeft:"pl-",paddingRight:"pr-",spaceX:"space-x-",spaceY:"space-y-",border:"border-",borderTop:"border-t-",borderBottom:"border-b-",borderLeft:"border-l-",borderRight:"border-r-",borderX:"border-x-",borderY:"border-y-",borderRadius:"rounded-",borderRadiusTop:"rounded-t-",borderRadiusRight:"rounded-r-",borderRadiusBottom:"rounded-b-",borderRadiusLeft:"rounded-l-",borderRadiusTopLeft:"rounded-tl-",borderRadiusTopRight:"rounded-tr-",borderRadiusBottomRight:"rounded-br-",borderRadiusBottomLeft:"rounded-bl-",fontSize:"text-",lineHeight:"leading-",letterSpacing:"tracking-",textIndent:"indent-",rotate:"rotate-",duration:"duration-",transitionDelay:"delay-",scale:"scale-",scaleX:"scale-x-",scaleY:"scale-y-",translateX:"translate-x-",translateY:"translate-y-",skewX:"skew-x-",skewY:"skew-y-",top:"top-",bottom:"bottom-",left:"left-",right:"right-",inset:"inset-",insetX:"inset-x-",insetY:"inset-y-",opacity:"opacity-",flexBasis:"basis-"},J={xs:"",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Ve=s=>`${s.toUpperCase()} ${J[s]?`(${J[s]} & up)`:""}`,z=s=>{const{type:l="icons",label:t,property:n,onEmitChange:i=()=>{},units:u,negative:c=!1}=s,[p]=f.useDarkMode(),[a]=f.useStylingState(),[,h]=f.useCanvasWidth(),g=W(n),m=f.useAddClassesToBlocks(),j=f.useRemoveClassesFromBlocks(),[b]=f.useSelectedBlockIds(),y=d.useMemo(()=>r.get(g,"fullCls",""),[g]),R=d.useCallback((k,H=!0)=>{const L={dark:p,mq:h,mod:a,cls:k,property:n,fullCls:""};(p||a!=="")&&(L.mq="xs");const P=D.generateFullClsName(L);m(b,[P],H)},[b,p,h,a,n,m]),V=d.useCallback(()=>{j(b,[y])},[b,y,j]),N=d.useMemo(()=>He(g,h),[g,h]);d.useEffect(()=>{i(N,g)},[N,i,g]);const[,,C]=f.useCanvasWidth(),B=d.useCallback(k=>{C({xs:400,sm:640,md:800,lg:1024,xl:1420,"2xl":1920}[k])},[C]),I=r.get(g,"dark",null)===p&&r.get(g,"mod",null)===a&&r.get(g,"mq",null)===h;return e.jsxRuntimeExports.jsx(je,{canChange:N,canReset:g&&I,children:e.jsxRuntimeExports.jsxs("div",{className:"group flex flex-row items-center py-2 first:pt-0 last:pb-0",children:[e.jsxRuntimeExports.jsx("div",{className:"relative w-[70px] truncate text-xs text-foreground",children:e.jsxRuntimeExports.jsx("span",{className:`text-[11px] ${g&&!I?"text-foreground":""}`,children:t})}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center",children:[e.jsxRuntimeExports.jsxs("div",{className:"w-[150px]",children:[l==="arbitrary"?e.jsxRuntimeExports.jsx(Ie,{currentClass:r.get(g,"cls",""),classPrefix:r.get(Be,n,""),units:u||[],onChange:R,negative:c,cssProperty:n}):null,l==="icons"&&e.jsxRuntimeExports.jsx(Re,{property:n,onChange:R}),l==="range"&&e.jsxRuntimeExports.jsx(ve,{property:n,onChange:R}),l==="color"&&e.jsxRuntimeExports.jsx(Ce,{property:n,onChange:R}),l==="dropdown"&&e.jsxRuntimeExports.jsx(te,{label:t,property:n,onChange:R})]}),e.jsxRuntimeExports.jsx("div",{className:`w-[30px] cursor-pointer ${y?"visible":"invisible"}`,children:I?e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>V(),title:"Reset",className:"flex px-1.5 text-xs",children:e.jsxRuntimeExports.jsx(o.TrashIcon,{className:"h-5 w-5 text-blue-500 hover:opacity-80"})}):N&&g?e.jsxRuntimeExports.jsxs(w.Tooltip,{delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:e.jsxRuntimeExports.jsx("div",{className:"text-right",children:e.jsxRuntimeExports.jsxs("div",{children:["Current style is set at ",e.jsxRuntimeExports.jsxs("span",{className:"font-bold ",children:[Ve(r.get(g,"mq")),p&&!g.dark?"(Light mode)":""]}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>B(r.get(g,"mq")),className:"block w-full cursor-default text-right font-semibold text-blue-500",children:["Switch to ",r.get(g,"mq").toUpperCase()]})]})})})]}):null})]})]})})},Ae=["px","%","em","rem","ch","vh","vw"],se=({label:s,options:l,borderB:t=!1,borderT:n=!1,type:i="arbitrary",units:u=Ae,negative:c=!1})=>{const[p,a]=d.useState(l[0].key),h=f.useSelectedBlockCurrentClasses(),g=d.useCallback(m=>r.map(h,"property").includes(m),[h]);return e.jsxRuntimeExports.jsxs("div",{className:`mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t?"border-b":""} ${n?"border-t":""}`,children:[e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row text-xs",children:[s&&e.jsxRuntimeExports.jsx("span",{className:"relative w-[70px] flex-none text-xs text-foreground",children:s}),e.jsxRuntimeExports.jsx("div",{className:"mb-3 flex grow flex-row flex-wrap gap-x-px",children:d.Children.toArray(l.map(({label:m,key:j})=>e.jsxRuntimeExports.jsx("div",{className:"first:rounded-l last:rounded-r",children:e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>a(j),className:`relative cursor-pointer rounded-full p-1 text-[8px] ${j===p?" bg-[#3E57F0] text-white":"text-gray-600 dark:text-gray-300"}`,children:[d.createElement("div",{className:g(j)?"-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full":""}),d.createElement(r.get(ee,j,o.BoxIcon),{className:"text-inherit w-3 h-3"})]})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:r.startCase(r.toLower(m))})]})})))})]}),e.jsxRuntimeExports.jsx("div",{className:"mt-0 flex items-center",children:e.jsxRuntimeExports.jsx(z,{type:i,units:[...u],label:"",property:p,negative:c})})]})},Le=({heading:s,items:l})=>{const t=f.useSelectedBlockCurrentClasses(),n=d.useMemo(()=>{const i=p=>r.flatten(p.map(a=>a.styleType==="multiple"?r.map(a.options,"key"):a.property)),u=r.flatten(l.map(p=>p.styleType==="accordion"?i(p.items):p.styleType==="multiple"?r.map(p.options,"key"):p.property)),c=r.map(t,"property");return r.intersection(u,c).length>0},[t,l]);return e.jsxRuntimeExports.jsxs("details",{children:[e.jsxRuntimeExports.jsx("summary",{className:"my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground",children:e.jsxRuntimeExports.jsxs("div",{className:"inline",children:[s,n?e.jsxRuntimeExports.jsx("span",{className:`ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${n?"bg-blue-500":"bg-gray-300"}`}):null]})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",children:l.map(i=>i.styleType==="multiple"?e.jsxRuntimeExports.jsx(se,{...i},i.label):e.jsxRuntimeExports.jsx(z,{...i},i.label))})]})},$e=d.createContext({}),Y=({section:s})=>{const l=f.useSelectedBlockCurrentClasses(),t=d.useCallback((u=[])=>{const c={};for(let a=0;a<l.length;a++)c[l[a].property]=l[a].cls;let p=!0;for(const a in u)if(!r.has(c,a)||c[a]!==u[a]){p=!1;break}return p},[l]),n=d.useMemo(()=>{if(l.length>0&&s.heading==="Classes")return!0;const u=a=>r.flatten(a.map(h=>h.styleType==="multiple"?r.flatten(r.map(h.options,"key")):h.property)),c=r.flatten(s.items.map(a=>a.styleType==="accordion"?u(a.items):a.styleType==="multiple"?r.flatten(r.map(a.options,"key")):a.property)),p=r.map(l,"property");return r.intersection(c,p).length>0},[l,s.heading,s.items]),i=d.useMemo(()=>({}),[]);return e.jsxRuntimeExports.jsx($e.Provider,{value:i,children:e.jsxRuntimeExports.jsxs($.AccordionItem,{value:s.heading,children:[e.jsxRuntimeExports.jsx($.AccordionTrigger,{className:"px-3 py-2 text-xs hover:no-underline",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("div",{className:`h-[8px] w-[8px] rounded-full ${n?"bg-blue-500":"bg-gray-300"}`}),s.heading]})}),e.jsxRuntimeExports.jsx($.AccordionContent,{className:"bg-gray-100 px-3.5 py-2",children:d.Children.toArray(s.items.map(u=>r.has(u,"component")?d.createElement(u.component,{key:u.label}):r.has(u,"styleType")?u.styleType==="multiple"?e.jsxRuntimeExports.jsx(se,{...u},u.label):u.styleType==="accordion"&&t(u==null?void 0:u.conditions)?e.jsxRuntimeExports.jsx(Le,{...u},u.label):null:e.jsxRuntimeExports.jsx(z,{...u},u.label)))})]})})},Me=({item:s,index:l,canDelete:t,onChange:n,onRemove:i})=>e.jsxRuntimeExports.jsxs("div",{className:`flex flex-col gap-1 border-gray-400 py-2 ${t?"border-b":""}`,children:[e.jsxRuntimeExports.jsx("input",{name:"key",onChange:u=>n(u,l),value:s.key,placeholder:"Key",className:"w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",autoComplete:"off",autoCapitalize:"off"}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1.5",children:[e.jsxRuntimeExports.jsx("input",{name:"value",onChange:u=>r.isEmpty(s.key)?{}:n(u,l),value:s.value,placeholder:"Value",className:"w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",autoComplete:"off",autoCapitalize:"off"}),e.jsxRuntimeExports.jsx(o.TrashIcon,{onClick:i,className:"h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"})]})]}),De=({section:s})=>{var j;const{setSyncState:l}=f.useSavePage(),t=f.useSelectedBlock(),[n,i]=d.useState([]),[u]=f.useSelectedStylingBlocks(),c=f.useUpdateBlocksPropsRealtime(),p=`${r.get(u,"0.prop")}_attrs`;X.useEffect(()=>{const b=r.map(r.get(t,p),(y,R)=>({key:R,value:y}));r.isEmpty(b)?i([]):i(b)},[r.get(t,p)]);const a=()=>i([...n,{key:"",value:""}]),h=b=>{const y=r.filter(n,(R,V)=>b!==V);m(y)},g=(b,y)=>{const R=[...n];R[y][b.target.name]=b.target.value,m(R)},m=X.useCallback((b=[])=>{const y={};r.forEach(b,R=>{r.isEmpty(R.key)||r.set(y,R.key,R.value)}),c([r.get(t,"_id")],{[p]:y}),l("UNSAVED")},[t,l,c,p]);return e.jsxRuntimeExports.jsxs($.AccordionItem,{value:s.heading,children:[e.jsxRuntimeExports.jsx($.AccordionTrigger,{className:"px-3 py-2 text-xs hover:no-underline",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("div",{className:`h-[8px] w-[8px] rounded-full ${r.isEmpty(r.get(t,p))?"bg-gray-300":"bg-blue-500"}`}),"Attributes"]})}),e.jsxRuntimeExports.jsx($.AccordionContent,{className:"bg-gray-100 px-3.5 py-2",children:e.jsxRuntimeExports.jsxs("div",{className:"no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px",children:[e.jsxRuntimeExports.jsxs(U.Label,{className:"mt-2 flex w-full items-center justify-between",children:["Add Custom attributes",e.jsxRuntimeExports.jsxs("div",{className:`flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!r.isEmpty(n)&&r.isEmpty((j=r.last(n))==null?void 0:j.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"}`,onClick:()=>{var b;!r.isEmpty(n)&&r.isEmpty((b=r.last(n))==null?void 0:b.key)||a()},children:[e.jsxRuntimeExports.jsx(o.PlusIcon,{width:12,height:12})," Add"]})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[r.isEmpty(n)&&e.jsxRuntimeExports.jsx("div",{className:"flex h-12 items-center justify-center text-sm text-gray-400",children:"Click + Add to add attributes"}),X.Children.toArray(r.map(n,(b,y)=>{const R=n.length>0&&y<n.length-1;return e.jsxRuntimeExports.jsx(Me,{item:b,index:y,canDelete:R,onChange:g,onRemove:()=>h(y)})}))]})]})})]})};function qe(){const[s,l]=f.useStylingState(),{flexChild:t,gridChild:n}=f.useSelectedBlocksDisplayChild(),[,i]=ae.useAtom(f.advanceStylingOpenAtom),{t:u}=Q.useTranslation(),[c]=f.useSelectedStylingBlocks();return r.isEmpty(c)?e.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[e.jsxRuntimeExports.jsx(o.MixerHorizontalIcon,{className:"mx-auto text-3xl"}),e.jsxRuntimeExports.jsx("h1",{children:u("no_styling_block_selected")}),e.jsxRuntimeExports.jsxs("p",{className:"text-xs ",children:["Hint: Styling allowed blocks are highlighted with"," ",e.jsxRuntimeExports.jsx("span",{className:"border border-orange-500 p-px",children:"orange"})," border"]})]})}):e.jsxRuntimeExports.jsxs("div",{onClick:()=>i(!1),className:"flex h-full flex-col",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-1.5",children:[e.jsxRuntimeExports.jsx(U.Label,{htmlFor:"",className:"flex gap-x-1.5 text-xs italic",children:"State"}),e.jsxRuntimeExports.jsxs(E.Select,{defaultValue:s,onValueChange:p=>l(p),children:[e.jsxRuntimeExports.jsx(E.SelectTrigger,{className:"h-auto w-fit p-1 px-3",children:e.jsxRuntimeExports.jsx(E.SelectValue,{placeholder:"State"})}),e.jsxRuntimeExports.jsxs(E.SelectContent,{children:[e.jsxRuntimeExports.jsx(E.SelectItem,{value:"",children:"Normal"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"hover",children:"Hover"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"active",children:"Active"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"focus",children:"Focus"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"before",children:"Before"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"after",children:"After"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"only",children:"Only"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first",children:"First"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"last",children:"Last"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first-letter",children:"First Letter"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first-line",children:"First Line"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"disabled",children:"Disabled"})]})]})]})}),e.jsxRuntimeExports.jsxs(xe.ScrollArea,{className:"no-scrollbar -mx-1 h-full overflow-x-hidden",children:[e.jsxRuntimeExports.jsxs($.Accordion,{type:"multiple",className:"h-full w-full",children:[t&&e.jsxRuntimeExports.jsx(Y,{section:ye}),n?e.jsxRuntimeExports.jsx(Y,{section:be}):null,fe.map(p=>e.jsxRuntimeExports.jsx(Y,{section:p},p.heading)),e.jsxRuntimeExports.jsx(De,{section:{heading:"Attributes"}})]}),e.jsxRuntimeExports.jsx("div",{className:"h-60"})]})]})}const Oe={px:1,"%":1,em:100,rem:100,ch:1,vw:1,vh:1,"-":1,deg:1,ms:.1},We=()=>{const s=f.useSelectedBlock(),{t:l}=Q.useTranslation(),[t,n]=d.useState(""),[i,u]=d.useState({onDrag:a=>a,onDragEnd:a=>a,dragStartY:0,dragging:!1,dragStartValue:0,dragUnit:"",negative:!1,cssProperty:""}),c=_.useThrottledCallback(a=>{const h=!r.get(i,"negative",!1),g=r.get(i,"cssProperty","");let m=parseFloat(i.dragStartValue);m=r.isNaN(m)?0:m;let j=Oe[i.dragUnit];(r.startsWith(g,"scale")||g==="opacity")&&(j=10);let y=(i.dragStartY-a.pageY)/j+m;h&&y<0&&(y=0),g==="opacity"&&y>1&&(y=1),i.onDrag(`${y}`),n(`${y}`)},[i],50),p=d.useCallback(()=>{setTimeout(()=>i.onDragEnd(`${t}`),100),u({onDrag:a=>a,onDragEnd:a=>a,dragStartY:0,dragging:!1,dragStartValue:0,dragUnit:"",negative:!1,cssProperty:""})},[i,t,u]);return r.isNull(s)?e.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[e.jsxRuntimeExports.jsx(o.MixerHorizontalIcon,{className:"mx-auto text-3xl"}),e.jsxRuntimeExports.jsx("h1",{children:l("no_block_selected_for_styling")})]})}):e.jsxRuntimeExports.jsxs(re.Provider,{value:{setDragData:u},children:[i.dragging?e.jsxRuntimeExports.jsx("div",{onMouseMove:c,onMouseUp:()=>{p()},className:"absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "}):null,e.jsxRuntimeExports.jsxs(M.Tabs,{defaultValue:"settings",className:"flex h-full w-full flex-col py-1",children:[e.jsxRuntimeExports.jsxs(M.TabsList,{className:"mx-1 grid grid-cols-2",children:[e.jsxRuntimeExports.jsx(M.TabsTrigger,{value:"settings",children:"Settings"}),e.jsxRuntimeExports.jsx(M.TabsTrigger,{value:"styling",children:"Styling"})]}),e.jsxRuntimeExports.jsx(M.TabsContent,{value:"settings",className:"no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(ge,{})}),e.jsxRuntimeExports.jsx(M.TabsContent,{value:"styling",className:"flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(qe,{})})]})]})};exports.default=We;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),d=require("react"),_=require("@react-hookz/web"),r=require("lodash"),Q=require("react-i18next"),o=require("@radix-ui/react-icons"),M=require("./tabs-860e37aa.cjs"),ne=require("@rjsf/core"),le=require("@rjsf/validator-ajv8"),f=require("./index-d4a18b5d.cjs"),ie=require("@chaibuilder/blocks"),F=require("./link-4585b2d6.cjs"),ae=require("jotai"),ue=require("react-autosuggest"),pe=require("fuse.js"),D=require("./html-to-json-78bfa1f3.cjs"),w=require("./useBuilderProp-5e57d0c8.cjs"),U=require("./label-167415e5.cjs"),de=require("./MODIFIERS-70fef873.cjs"),ce=require("./input-42acea7e.cjs"),$=require("./accordion-0afd8143.cjs"),xe=require("./scroll-area-088530b9.cjs"),E=require("./select-0e32300c.cjs");require("@radix-ui/react-tabs");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("redux-undo");require("lucide-react");require("sonner");require("react-icons-picker");require("react-dom");require("./dialog-170eaad9.cjs");require("@radix-ui/react-dialog");require("./ImagesPanel-68a11293.cjs");require("react-quill");require("himalaya");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("@radix-ui/react-label");require("@radix-ui/react-accordion");require("@radix-ui/react-scroll-area");require("@radix-ui/react-select");function me(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(l,t,n.get?n:{enumerable:!0,get:()=>s[t]})}}return l.default=s,Object.freeze(l)}const X=me(d);function ge(){const s=f.useSelectedBlock(),{createSnapshot:l}=f.useCanvasHistory(),t=f.useUpdateBlocksPropsRealtime(),[n]=f.useActiveLanguage(),i=ie.getBlockComponent(s._type),u=r.get(i,"props",{}),c={type:"object",properties:{_name:{title:"Name",type:"string",default:r.get(s,"_name",s._type)}}},p={};Object.keys(u).forEach(m=>{const j=u[m];if(r.includes(["slot","styles"],j.type))return;const b=r.get(j,"i18n",!1)?`${m}-${n}`:m;c.properties[b]=f.getBlockJSONFromSchemas(j,n),p[b]=f.getBlockJSONFromUISchemas(j,n)});const a={...s},h=({formData:m},j)=>{if(j){const b=j.replace("root.","");t([s._id],{[b]:r.get(m,b)})}},g=()=>{l()};return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(ne,{widgets:{richtext:F.RichTextEditorField,icon:F.IconPickerField,image:F.ImagePickerField},fields:{link:F.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!1,liveOmit:!1,liveValidate:!0,uiSchema:p,onBlur:g,schema:c,formData:a,validator:le,onChange:h}),e.jsxRuntimeExports.jsx("div",{className:"pb-60"})]})}const G=new pe(D.ALL_TW_CLASSES,{isCaseSensitive:!1,threshold:.2,minMatchCharLength:2,keys:["name"]});function he(){var N;const[s]=f.useSelectedStylingBlocks(),l=f.useSelectedBlock(),t=f.useAddClassesToBlocks(),n=f.useRemoveClassesFromBlocks(),[i]=f.useSelectedBlockIds(),[u,c]=d.useState(""),p=(N=r.first(s))==null?void 0:N.prop,a=r.reject((r.get(l,p,"").replace(de.STYLES_KEY,"").split(",").pop()||"").split(" "),r.isEmpty),h=()=>{const C=u.trim().toLowerCase().replace(/ +(?= )/g,"").split(" ");t(i,C,!0),c("")},[g,m]=d.useState([]),j=({value:C})=>{const B=C.trim().toLowerCase(),I=B.match(/.+:/g);let k=[];if(I&&I.length>0){const[H]=I,L=B.replace(H,"");k=G.search(L).map(x=>({...x,item:{...x.item,name:H+x.item.name}}))}else k=G.search(B);m(r.map(k,"item"))},b=()=>{m([])},y=C=>C.name,R=C=>e.jsxRuntimeExports.jsx("div",{className:"rounded-md p-1",children:C.name}),V={autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"Enter class name",value:u,onKeyDown:C=>{C.key==="Enter"&&u.trim()!==""&&h()},onChange:(C,{newValue:B})=>c(B),className:"w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"};return e.jsxRuntimeExports.jsxs("div",{className:`no-scrollbar flex ${g.length>0?"min-h-[300px]":"min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,children:[e.jsxRuntimeExports.jsx(U.Label,{className:"mt-2",children:"Add Tailwind classes"}),e.jsxRuntimeExports.jsxs("div",{className:"relative -mt-4 flex items-center gap-x-3",children:[e.jsxRuntimeExports.jsx("div",{className:"relative flex w-full items-center gap-x-3",children:e.jsxRuntimeExports.jsx(ue,{suggestions:g,onSuggestionsFetchRequested:j,onSuggestionsClearRequested:b,getSuggestionValue:y,renderSuggestion:R,inputProps:V,containerProps:{className:"relative h-8 w-full gap-y-1 py-1 border-gray-600"},theme:{suggestion:"bg-transparent",suggestionHighlighted:"bg-gray-700 ",suggestionsContainerOpen:"absolute bg-gray-100 z-50 max-h-[230px] overflow-y-auto w-full border border-gray-600 rounded-md"}})}),e.jsxRuntimeExports.jsx(w.Button,{variant:"outline",className:"h-6 border-gray-700",onClick:h,disabled:u.trim()==="",size:"sm",children:e.jsxRuntimeExports.jsx(o.PlusIcon,{})})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-wrap gap-2",children:[r.isEmpty(a)&&e.jsxRuntimeExports.jsx("div",{className:"flex h-10 w-full items-center justify-center text-center text-sm text-gray-400",children:"No class added"}),X.Children.toArray(a.map(C=>e.jsxRuntimeExports.jsxs("div",{className:"group relative flex cursor-default items-center gap-x-1 rounded-full border border-blue-600 bg-blue-500 p-px px-1.5 text-[11px] text-white hover:border-blue-900",children:[C,e.jsxRuntimeExports.jsx(o.Cross2Icon,{onClick:()=>n(i,[C]),className:"invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"})]},C)))]})]})}const T=["px","%","em","rem","ch","vh","vw"],ye={heading:"Flex Child",items:[{type:"arbitrary",label:"Basis",units:T,property:"flexBasis"},{type:"range",label:"Order",property:"order"},{type:"dropdown",label:"Flex",property:"flexGrowShrink"},{type:"dropdown",label:"Grow",property:"flexGrow"},{type:"dropdown",label:"Shrink",property:"flexShrink"}]},be={heading:"Grid Child",items:[{type:"range",label:"Col Span",property:"gridColSpan"},{type:"range",label:"Col Start",property:"gridColStart"},{type:"range",label:"Col End",property:"gridColEnd"},{type:"range",label:"Row Span",property:"gridRowSpan"},{type:"range",label:"Row Start",property:"gridRowStart"},{type:"range",label:"Row End",property:"gridRowEnd"},{type:"range",label:"Order",property:"order"}]},fe=[{heading:"Display",items:[{type:"dropdown",label:"Display",property:"display",units:T},{styleType:"accordion",heading:"Flex options",items:[{type:"dropdown",label:"Direction",property:"flexDirection"},{type:"dropdown",label:"Wrap",property:"flexWrap"},{type:"dropdown",label:"Justify",property:"justifyContent"},{type:"dropdown",label:"Content",property:"alignContent"},{type:"dropdown",label:"Items",property:"alignItems"},{styleType:"multiple",label:"Gap",options:[{key:"gap",label:"All"},{key:"gapX",label:"Left-Right"},{key:"gapY",label:"Top-Bottom"}]}],conditions:{display:"flex"}},{styleType:"accordion",heading:"Grid options",items:[{type:"range",label:"Columns",property:"gridColumns"},{type:"range",label:"Rows",property:"gridRows"},{type:"dropdown",label:"Auto Flow",property:"gridAutoFlow"},{type:"dropdown",label:"Auto Cols",property:"gridAutoColumns"},{type:"dropdown",label:"Auto Rows",property:"gridAutoRows"},{type:"dropdown",label:"Justify",property:"justifyContent"},{type:"dropdown",label:"Content",property:"alignContent"},{type:"dropdown",label:"Items",property:"alignItems"},{styleType:"multiple",label:"Gap",units:["px","rem"],options:[{key:"gap",label:"All"},{key:"gapX",label:"Left-Right"},{key:"gapY",label:"Top-Bottom"}]}],conditions:{display:"grid"}},{styleType:"accordion",heading:"Visibility & Opacity",items:[{type:"dropdown",label:"Visibility",property:"visibility",units:T},{type:"arbitrary",label:"Opacity",property:"opacity",units:["-"]}]}]},{heading:"Spacing",items:[{styleType:"multiple",label:"Margin",negative:!0,units:[...T,"auto"],options:[{key:"margin",label:"All"},{key:"marginX",label:"Left-Right"},{key:"marginY",label:"Top-Bottom"},{key:"marginTop",label:"Top"},{key:"marginRight",label:"Right"},{key:"marginBottom",label:"Bottom"},{key:"marginLeft",label:"Left"}]},{styleType:"multiple",label:"Padding",options:[{key:"padding",label:"All"},{key:"paddingX",label:"Left-Right"},{key:"paddingY",label:"Top-Bottom"},{key:"paddingTop",label:"Top"},{key:"paddingRight",label:"Right"},{key:"paddingBottom",label:"Bottom"},{key:"paddingLeft",label:"Left"}]},{styleType:"multiple",label:"Space Between",options:[{key:"spaceX",label:"Left-Right"},{key:"spaceY",label:"Top-Bottom"}]}]},{heading:"Size",items:[{type:"arbitrary",label:"Width",units:T.concat("auto"),property:"width"},{type:"arbitrary",label:"Height",units:T.concat("auto"),property:"height"},{styleType:"accordion",heading:"Min width & height",items:[{type:"arbitrary",label:"Min Width",units:T.concat("auto"),property:"minWidth"},{type:"arbitrary",label:"Min Height",units:T.concat("auto"),property:"minHeight"}]},{styleType:"accordion",heading:"Max width & height",items:[{type:"arbitrary",label:"Max Width",units:T.concat("auto"),property:"maxWidth"},{type:"arbitrary",label:"Max Height",units:T.concat("auto"),property:"maxHeight"}]},{styleType:"accordion",heading:"Object options & aspect ratio",items:[{type:"dropdown",label:"Aspect",property:"aspectRatio"},{type:"dropdown",label:"Fit",property:"objectFit"},{type:"dropdown",label:"Position",property:"objectPosition"}]}]},{heading:"Position",items:[{type:"icons",label:"Position",property:"position"},{styleType:"accordion",heading:"Position options",items:[{styleType:"multiple",label:"Direction",options:[{key:"top",label:"Top"},{key:"right",label:"Right"},{key:"bottom",label:"Bottom"},{key:"left",label:"Left"}]},{styleType:"multiple",label:"Inset",options:[{key:"inset",label:"All"},{key:"insetX",label:"Left Right"},{key:"insetY",label:"Top Bottom"}]},{type:"arbitrary",label:"Z-Chai",units:["-","auto"],property:"zIndex"}]},{styleType:"accordion",heading:"Float & Clear",items:[{type:"icons",label:"Float",property:"float"},{type:"dropdown",label:"Clear",property:"clear"}]},{styleType:"accordion",heading:"Overflow & Overscroll",items:[{styleType:"multiple",type:"dropdown",label:"Overflow",options:[{key:"overflow",label:"All"},{key:"overflowX",label:"Left-Right"},{key:"overflowY",label:"Top-Bottom"}]},{styleType:"multiple",type:"dropdown",label:"Overscroll",options:[{key:"overscroll",label:"All"},{key:"overscrollX",label:"Left-Right"},{key:"overscrollY",label:"Top-Bottom"}]}]}]},{heading:"Typography",items:[{type:"dropdown",property:"fontFamily",label:"Font"},{type:"arbitrary",property:"fontSize",label:"Size",units:T},{type:"arbitrary",property:"lineHeight",label:"Height",units:T.concat("-")},{type:"range",property:"fontWeight",label:"Weight"},{type:"color",property:"textColor",label:"Color"},{styleType:"accordion",heading:"Alignments",items:[{type:"dropdown",property:"textAlign",label:"Align"},{type:"dropdown",property:"verticalAlign",label:"V. Align"}]},{styleType:"accordion",heading:"Spacing, decoration & more",items:[{type:"dropdown",property:"letterSpacing",label:"Spacing"},{type:"dropdown",property:"textDecoration",label:"Decoration"},{type:"range",property:"textDecorationThickness",label:"Thickness"},{type:"dropdown",property:"textTransform",label:"Transform"}]},{styleType:"accordion",heading:"White space & breaks",items:[{type:"dropdown",property:"whitespace",label:"Whitespace"},{type:"dropdown",property:"wordBreak",label:"Wordbreak"}]}]},{heading:"Background",items:[{type:"color",label:"Bg. Color",property:"backgroundColor"},{styleType:"accordion",heading:"Position, Size & more",items:[{type:"dropdown",label:"Attachment",property:"backgroundAttachment"},{type:"dropdown",label:"Clipping",property:"backgroundClip"},{type:"dropdown",label:"Origin",property:"backgroundOrigin"},{type:"dropdown",label:"Position",property:"backgroundPosition"},{type:"dropdown",label:"Repeat",property:"backgroundRepeat"},{type:"dropdown",label:"Size",property:"backgroundSize"}]},{type:"dropdown",label:"Gradient",property:"backgroundGradient"},{styleType:"accordion",heading:"Gradient colors",items:[{type:"color",label:"From",property:"fromColor"},{type:"color",label:"Via",property:"viaColor"},{type:"color",label:"To",property:"toColor"}]}]},{heading:"Border & Outline",items:[{styleType:"multiple",type:"dropdown",label:"Width",options:[{key:"border",label:"All"},{key:"borderX",label:"Left Right"},{key:"borderY",label:"Top bottom"},{key:"borderTop",label:"Top"},{key:"borderRight",label:"Right"},{key:"borderBottom",label:"Bottom"},{key:"borderLeft",label:"Left"}]},{styleType:"multiple",type:"dropdown",label:"Corners",options:[{key:"borderRadius",label:"All"},{key:"borderRadiusTop",label:"Top"},{key:"borderRadiusRight",label:"Right"},{key:"borderRadiusBottom",label:"Bottom"},{key:"borderRadiusLeft",label:"Left"},{key:"borderRadiusTopLeft",label:"Top Left"},{key:"borderRadiusTopRight",label:"Top right"},{key:"borderRadiusBottomRight",label:"Bottom right"},{key:"borderRadiusBottomLeft",label:"Bottom left"}]},{type:"color",label:"Color",property:"borderColor"},{type:"dropdown",label:"Style",property:"borderStyle"},{styleType:"accordion",heading:"Divide options",items:[{styleType:"multiple",type:"range",label:"Width",options:[{key:"divideXWidth",label:"Left Right"},{key:"divideYWidth",label:"Top Bottom"}]},{type:"color",label:"Color",property:"divideColor"},{type:"dropdown",label:"Style",property:"divideStyle"}]},{styleType:"accordion",heading:"Outline styling",items:[{type:"range",label:"Width",property:"outlineWidth"},{type:"range",label:"Offset",property:"outlineOffset"},{type:"dropdown",label:"Style",property:"outlineStyle"}]},{styleType:"accordion",heading:"Ring options",items:[{type:"range",label:"Width",property:"ringWidth"},{type:"color",label:"Color",property:"ringColor"},{type:"range",label:"Offset",property:"ringOffsetWidth"},{type:"color",label:"Off. color",property:"ringOffsetColor"}]}]},{heading:"Effect & Animation",items:[{type:"range",label:"Shadow",property:"boxShadow"},{type:"color",label:"Color",property:"boxShadowColor"},{type:"dropdown",label:"Cursor",property:"cursor"},{styleType:"accordion",heading:"Blend & Cursor",items:[{type:"dropdown",label:"Mix Blend",property:"mixBlendMode"},{type:"dropdown",label:"Bg. Blend",property:"bgBlendMode"}]},{styleType:"accordion",heading:"Transform",items:[{type:"dropdown",label:"Origin",property:"transformOrigin"},{styleType:"multiple",label:"Scale",units:["-"],options:[{key:"scale",label:"All"},{key:"scaleX",label:"Left-Right"},{key:"scaleY",label:"Top-Bottom"}]},{styleType:"multiple",label:"Skew",units:["deg"],options:[{key:"skewX",label:"Left-Right"},{key:"skewY",label:"Top-Bottom"}]},{styleType:"multiple",label:"Translate",negative:!0,options:[{key:"translateX",label:"Left-Right"},{key:"translateY",label:"Top-Bottom"}]},{type:"arbitrary",units:["deg"],negative:!0,label:"Rotate",property:"rotate"}]},{styleType:"accordion",heading:"Animation",items:[{type:"dropdown",label:"Animation",property:"animation"},{type:"dropdown",label:"Transition",property:"transition"},{type:"dropdown",label:"Easing",property:"transitionEase"},{type:"arbitrary",units:["ms"],label:"Duration",property:"duration"},{type:"arbitrary",units:["ms"],label:"Delay",property:"delay"}]}]},{heading:"Classes",items:[{component:he}]}],ee={"not-italic":()=>e.jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z",fill:"white"})}),visible:o.EyeOpenIcon,invisible:o.EyeClosedIcon,hidden:o.EyeClosedIcon,gap:o.BorderAllIcon,gapX:o.WidthIcon,gapY:o.HeightIcon,spaceX:o.WidthIcon,spaceY:o.HeightIcon,overscroll:o.BorderAllIcon,overscrollX:o.WidthIcon,overscrollY:o.HeightIcon,overflow:o.BorderAllIcon,overflowX:o.WidthIcon,overflowY:o.HeightIcon,top:o.ArrowUpIcon,right:o.ArrowRightIcon,bottom:o.ArrowDownIcon,left:o.ArrowLeftIcon,inset:o.BorderAllIcon,insetX:o.WidthIcon,insetY:o.HeightIcon,border:o.BorderAllIcon,borderX:o.WidthIcon,borderY:o.HeightIcon,borderTop:o.ArrowUpIcon,borderRight:o.ArrowRightIcon,borderBottom:o.ArrowDownIcon,borderLeft:o.ArrowLeftIcon,borderRadius:o.BorderAllIcon,borderRadiusX:o.WidthIcon,borderRadiusY:o.HeightIcon,borderRadiusTop:o.ArrowUpIcon,borderRadiusRight:o.ArrowRightIcon,borderRadiusBottom:o.ArrowDownIcon,borderRadiusLeft:o.ArrowLeftIcon,borderRadiusTopLeft:o.ArrowTopLeftIcon,borderRadiusTopRight:o.ArrowTopRightIcon,borderRadiusBottomRight:o.ArrowBottomRightIcon,borderRadiusBottomLeft:o.ArrowBottomLeftIcon,divideXWidth:o.WidthIcon,divideYWidth:o.HeightIcon,scale:o.BorderAllIcon,scaleX:o.WidthIcon,scaleY:o.HeightIcon,skewX:o.WidthIcon,skewY:o.HeightIcon,translateX:o.WidthIcon,translateY:o.HeightIcon,padding:o.BorderAllIcon,paddingX:o.WidthIcon,paddingY:o.HeightIcon,paddingTop:o.ArrowUpIcon,paddingRight:o.ArrowRightIcon,paddingBottom:o.ArrowDownIcon,paddingLeft:o.ArrowLeftIcon,margin:o.BorderAllIcon,marginX:o.WidthIcon,marginY:o.HeightIcon,marginTop:o.ArrowUpIcon,marginRight:o.ArrowRightIcon,marginBottom:o.ArrowDownIcon,marginLeft:o.ArrowLeftIcon,textLeft:o.AlignLeftIcon,textCenter:o.AlignCenterHorizontallyIcon,textRight:o.AlignRightIcon,textJustify:o.StretchHorizontallyIcon,italic:o.FontItalicIcon,underline:o.UnderlineIcon,overline:o.OverlineIcon,uppercase:o.LetterCaseUppercaseIcon,block:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M2 2H14V14H2V2ZM1 1H15V15H1V1Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 4H4V12H7V4ZM9 4H12V12H9V4Z",fill:"currentColor"})]}),"float-right":()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M8 4H16V12H8V4Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M0 4H6V6H0V4ZM0 7H6V9H0V7ZM4 10H0V12H4V10Z",fill:"currentColor"})]}),"float-left":()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M0 4H8V12H0V4Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M10 4H16V6H10V4ZM10 7H16V9H10V7ZM14 10H10V12H14V10Z",fill:"currentColor"})]}),"float-none":o.Cross2Icon,fixed:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M15 2H14V4H13V5H14V6H15V2ZM10 5V4H9V2H1V8H2V5H10ZM7 4V3H5V4H7ZM4 4V3H2V4H4ZM1 13H7V14H1V13Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H10V3H11V6H12V3H13V2H11ZM2 9H1V12H2V11H7V10H2V9ZM15 7H8V14H15V7Z",fill:"currentColor"})]}),absolute:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H15V6H14V2ZM9 3V2H1V8H2V3H9ZM7 13H1V14H7V13Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H10V3H11V6H12V3H13V2H11ZM2 9H1V12H2V11H7V10H2V9ZM15 7H8V14H15V7Z",fill:"currentColor"})]}),relative:()=>e.jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H9V3H11V6H12V3H14V2H11ZM2 8H1V13H2V11H7V10H2V8ZM15 7H8V14H15V7Z",fill:"currentColor"})}),sticky:()=>e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M12.9998 7C13.6558 7 14.2937 6.78498 14.8158 6.38787C15.338 5.99076 15.7156 5.43345 15.8908 4.80128C16.066 4.16912 16.0292 3.49694 15.7859 2.8877C15.5427 2.27846 15.1065 1.76573 14.5441 1.42804C13.9817 1.09034 13.3241 0.946293 12.672 1.01795C12.02 1.08961 11.4094 1.37303 10.9337 1.8248C10.4581 2.27658 10.1436 2.8718 10.0385 3.51932C9.93341 4.16685 10.0434 4.83097 10.3518 5.41L6.88176 8.88C6.80034 8.96122 6.73572 9.05769 6.69158 9.16388C6.64744 9.27008 6.62465 9.38393 6.62451 9.49894C6.62437 9.61395 6.64689 9.72785 6.69077 9.83416C6.73465 9.94046 6.79904 10.0371 6.88026 10.1185C6.96149 10.1999 7.05795 10.2645 7.16415 10.3087C7.27035 10.3528 7.3842 10.3756 7.4992 10.3758C7.61421 10.3759 7.72812 10.3534 7.83442 10.3095C7.94072 10.2656 8.03734 10.2012 8.11876 10.12L11.5888 6.648C12.0088 6.873 12.4888 7 12.9988 7H12.9998Z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M9.535 2H1V14H15V7.465C14.69 7.645 14.355 7.783 14 7.875V13H2V5H9.126C8.86504 3.98486 9.01223 2.90789 9.536 2H9.535ZM7 3V4H5V3H7ZM4 3V4H2V3H4Z",fill:"currentColor"})]}),static:o.Cross1Icon},O=d.createContext({canReset:!1,canChange:!0}),je=({children:s,canReset:l=!1,canChange:t=!0})=>e.jsxRuntimeExports.jsx(O.Provider,{value:{canReset:l,canChange:t},children:s}),te=({label:s,property:l,onChange:t})=>{const n=d.useMemo(()=>r.get(D.CLASSES_LIST,`${l}.classes`,[""]),[l]),i=W(l),u=d.useMemo(()=>r.get(i,"cls",""),[i]),{canChange:c}=d.useContext(O),p=/\[.*\]/g.test(u);return e.jsxRuntimeExports.jsx("div",{className:s?"w-full rounded ":"grow",children:p?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(ce.Input,{className:"w-[70%] rounded py-1",readOnly:!0,value:u}),e.jsxRuntimeExports.jsxs(w.Tooltip,{delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 text-blue-600 group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:"Current value is using a Tailwind arbitrary value."})]})]}):e.jsxRuntimeExports.jsx(Z,{rounded:s,onChange:a=>t(a,l),selected:u,options:n,disabled:!c})})};function Z({selected:s,onChange:l,rounded:t=!1,options:n,disabled:i=!1}){const u=s.replace(/.*:/g,"").trim(),{undo:c,redo:p}=f.useCanvasHistory();return e.jsxRuntimeExports.jsxs("select",{disabled:!n.length||i,className:`${t?"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`,onChange:a=>l(a.target.value),onKeyDown:a=>{a.ctrlKey&&(a.key==="z"&&c(),a.key==="y"&&p())},value:u,children:[e.jsxRuntimeExports.jsx("option",{className:"bg-transparent",value:""}),d.Children.toArray(n.map(a=>e.jsxRuntimeExports.jsx("option",{className:"bg-transparent",value:a,children:a})))]})}const ve=({property:s,onChange:l})=>{const{canReset:t,canChange:n}=d.useContext(O),i=W(s),u=d.useMemo(()=>r.get(i,"cls",""),[i]),c=d.useMemo(()=>r.get(D.CLASSES_LIST,`${s}.classes`,[""]),[s]),p=c.indexOf(u)>-1?c.indexOf(u):0,a=/\[.*\]/g.test(u);return e.jsxRuntimeExports.jsx("div",{className:"flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs",children:a?e.jsxRuntimeExports.jsx("div",{className:"py-[5px] px-2",children:u}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("button",{type:"button",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",disabled:!n&&(!t||p-1<0),onClick:()=>l(r.nth(c,p-1),s),children:e.jsxRuntimeExports.jsx("span",{className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(o.MinusIcon,{className:!n&&(!t||p-1<0)?"text-gray-500":"text-white/60"})})}),e.jsxRuntimeExports.jsx("div",{className:"w-8/12 text-center",children:e.jsxRuntimeExports.jsx(te,{label:!1,property:s,onChange:l})}),e.jsxRuntimeExports.jsx("button",{type:"button",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",disabled:!n&&(!t||p+1>=c.length),onClick:()=>l(r.nth(c,p+1),s),children:e.jsxRuntimeExports.jsx("span",{className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(o.PlusIcon,{className:!n&&(!t||p+1>=c.length)?"text-gray-500":"text-white/60"})})})]})})},Re=({property:s,onChange:l})=>{const t=d.useMemo(()=>r.get(D.CLASSES_LIST,`${s}.classes`,[""]),[s]),{canChange:n}=d.useContext(O),i=W(s),u=d.useMemo(()=>r.get(i,"cls",""),[i]);return e.jsxRuntimeExports.jsx("div",{className:"flex grow flex-wrap gap-1",children:r.map(t,c=>e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",disabled:!n,onClick:()=>l(c,s),className:`cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${u===c?" bg-blue-500 text-white":"disabled:bg-gray-600 disabled:text-gray-400"}`,children:d.createElement(r.get(ee,c,o.BoxIcon))})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:r.startCase(r.toLower(c))})]}))})},we={backgroundColor:"bg",textColor:"text",borderColor:"border",boxShadowColor:"shadow",outlineColor:"outline",divideColor:"divide",fromColor:"from",viaColor:"via",toColor:"to",ringColor:"ring",ringOffsetColor:"ring-offset"},Ce=({property:s,onChange:l})=>{const t=W(s),n=d.useMemo(()=>r.get(t,"cls",""),[t]),{canChange:i}=d.useContext(O),[u,c]=d.useState([]),[p,a]=d.useState({color:"",shade:""}),h=n.split("-"),g=r.get(h,"1",""),m=r.get(h,"2",""),j=d.useCallback(y=>{["current","inherit","transparent","black","white"].includes(y)?(c([]),a({color:y})):(c(["50","100","200","300","400","500","600","700","800","900"]),a(R=>({...R,color:y,shade:R.shade?R.shade:"500"})))},[c,a]);d.useEffect(()=>{if(["current","inherit","transparent","black","white"].includes(g))return c([]);c(["50","100","200","300","400","500","600","700","800","900"])},[g]);const b=d.useCallback(y=>{a({color:g,shade:y})},[g]);return d.useEffect(()=>{a({color:"",shade:""})},[t]),d.useEffect(()=>{const R=`${r.get(we,s,"")}-${p.color}${p.shade?`-${p.shade}`:""}`;R.match(new RegExp(r.get(D.CLASSES_LIST,`${s}.regExp`,"")))&&l(R,s)},[p,l,s]),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs",children:[e.jsxRuntimeExports.jsx("div",{className:"grow text-center",children:e.jsxRuntimeExports.jsx(Z,{disabled:!i,rounded:!0,selected:g,onChange:j,options:["current","transparent","primary","secondary","black","white","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]})}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"grow text-center",children:e.jsxRuntimeExports.jsx(Z,{rounded:!0,selected:m,disabled:!g||!i,onChange:b,options:u})})]})},K=(s,l)=>{s=s.toLowerCase();let t=s.trim().replace(/ |\+/g,"");if((t==="auto"||t==="none")&&l.includes(t))return{value:"",unit:t};const n=l.length?new RegExp(l.join("|"),"g"):/XXXXXX/g;t=t.replace(n,"");const i=s.match(n),u=i&&i.length>1,c=!r.isEmpty(t)&&Number.isNaN(Number(t));return u||c?{error:"Invalid value"}:i&&(i[0]==="auto"||i[0]==="none")?{value:i[0],unit:""}:{value:t,unit:i?i[0]:""}},Ee=s=>{const l=s.startsWith("-")?"-":"",t=s.split("-").pop();if(["auto","none"].includes(t))return{value:"",unit:t};if(t==="px")return{value:"1",unit:"px"};if(t==="screen")return{value:"100",unit:s.indexOf("w-")!==-1?"vw":"vh"};if(t==="full")return{value:"100",unit:"%"};if(r.includes(s,"skew-"))return{value:`${l}${t}`,unit:"deg"};if(r.includes(s,"rotate-"))return{value:`${l}${t}`,unit:"deg"};if(r.includes(s,"opacity-"))return{value:`${t/100}`,unit:"-"};if(r.includes(s,"duration-")||r.includes(s,"delay-"))return{value:`${t}`,unit:"ms"};if(r.includes(s,"translate-")&&!t.includes("/"))return{value:`${l}${`${t/4}`}`,unit:"rem"};if(r.includes(s,"scale-"))return{value:`${l}${`${t/100}`}`,unit:"-"};if(r.startsWith(s,"border")){const n=s.match(/border-?(x|y|t|r|b|l)?\d+/g);if(n)return{value:n[0].split("-").pop(),unit:"px"};if(s.match(/border-?(x|y|t|r|b|l)?/g))return{value:"1",unit:"px"}}if(r.startsWith(s,"max-w-")){if(s==="max-w-screen-sm")return{value:"640",unit:"px"};if(s==="max-w-screen-md")return{value:"768",unit:"px"};if(s==="max-w-screen-lg")return{value:"1024",unit:"px"};if(s==="max-w-screen-xl")return{value:"1280",unit:"px"};if(s==="max-w-screen-2xl")return{value:"1536",unit:"px"};if(t==="xs")return{value:"320",unit:"px"};if(t==="sm")return{value:"384",unit:"px"};if(t==="md")return{value:"448",unit:"px"};if(t==="lg")return{value:"512",unit:"px"};if(t==="xl")return{value:"576",unit:"px"};if(t==="2xl")return{value:"672",unit:"px"};if(t==="3xl")return{value:"768",unit:"px"};if(t==="4xl")return{value:"896",unit:"px"};if(t==="5xl")return{value:"1024",unit:"px"};if(t==="6xl")return{value:"1152",unit:"px"};if(t==="7xl")return{value:"1280",unit:"px"};if(t==="prose")return{value:"65",unit:"ch"}}if(r.startsWith(s,"text-")){if(t==="xs")return{value:"12",unit:"px"};if(t==="sm")return{value:"14",unit:"px"};if(t==="base")return{value:"16",unit:"px"};if(t==="lg")return{value:"18",unit:"px"};if(t==="xl")return{value:"20",unit:"px"};if(t==="2xl")return{value:"24",unit:"px"};if(t==="3xl")return{value:"30",unit:"px"};if(t==="4xl")return{value:"36",unit:"px"};if(t==="5xl")return{value:"48",unit:"px"};if(t==="6xl")return{value:"60",unit:"px"};if(t==="7xl")return{value:"72",unit:"px"};if(t==="8xl")return{value:"96",unit:"px"};if(t==="9xl")return{value:"128",unit:"px"}}if(r.startsWith(s,"leading-")){if(t==="none")return{value:"1",unit:"-"};if(t==="tight")return{value:"1.25",unit:"-"};if(t==="snug")return{value:"1.375",unit:"-"};if(t==="normal")return{value:"1.5",unit:"-"};if(t==="relaxed")return{value:"1.625",unit:"-"};if(t==="loose")return{value:"2",unit:"-"}}if(r.startsWith(s,"tracking-")){if(t==="tighter")return{value:"-0.05",unit:"em"};if(t==="tight")return{value:"-0.025",unit:"em"};if(t==="normal")return{value:"0",unit:"em"};if(t==="wide")return{value:"0.025",unit:"em"};if(t==="wider")return{value:"0.05",unit:"em"};if(t==="widest")return{value:"0.1",unit:"em"}}if(["max","min","fit"].includes(t))return{value:s,unit:"class"};if(t.includes("/")){const[n,i]=r.map(t.split("/"),u=>parseInt(u,10));return{value:l+(n/i*100).toFixed(2).replace(".00",""),unit:"%"}}return r.isNumber(parseFloat(t))?{value:`${l+parseFloat(t)*4}`,unit:"px"}:{value:t,unit:"class"}},ke=s=>{if(r.isEmpty(s))return{value:"",unit:""};const l=s.match(/\[.*\]/g);if(l===null)return Se(s);const t=r.get(l,"0","").replace(/\[|\]/g,""),n=s.startsWith("-")?"-":"",i=r.first(t.match(/\d+.\d+|\d+/g));return{value:`${n}${i}`,unit:t.replace(i,"")}},Se=s=>r.isEmpty(s)?{value:"",unit:""}:Ee(s),re=d.createContext({setDragData:()=>{}}),Te=({unit:s,currentValue:l,onDrag:t,onDragEnd:n,onDragStart:i,negative:u,cssProperty:c})=>{const{setDragData:p}=d.useContext(re);return e.jsxRuntimeExports.jsx("button",{type:"button",onMouseDown:a=>{const h={onDrag:t,onDragEnd:n,dragging:!0,dragStartY:a.pageY,dragStartValue:`${l}`,dragUnit:s,negative:u,cssProperty:c};i(h),p(h)},color:void 0,className:"relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",children:e.jsxRuntimeExports.jsx(o.RowSpacingIcon,{})})},Ne=({onSelect:s,current:l,units:t})=>e.jsxRuntimeExports.jsx("div",{"data-theme":"light",className:"-m-[7px] -mx-[13px] flex w-9 flex-col",children:t.map(n=>e.jsxRuntimeExports.jsx(w.Button,{className:"h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",color:l===n?"primary":void 0,size:"sm",onClick:i=>{i.stopPropagation(),s(n)},children:n},n))}),Ie=s=>{const[l,t]=d.useState(!1),[n,i]=d.useState(""),{currentClass:u,onChange:c,classPrefix:p,cssProperty:a,units:h,negative:g}=s,[m,j]=d.useState(a!=null&&a.toLowerCase().includes("width")?"%":h[0]),[b,y]=d.useState(!1),[R,V]=d.useState(""),[N,C]=d.useState(!1),[B,I]=d.useState(!1);d.useEffect(()=>{const{value:x,unit:v}=ke(u);if(v===""){i(x),j(a!=null&&a.toLowerCase().includes("width")?"%":h[0]);return}j(v),i(v==="class"||r.isEmpty(x)?"":x)},[u,a,h]);const k=_.useThrottledCallback(x=>{c(x)},[c],200),H=_.useThrottledCallback(x=>{c(x,!1)},[c],200),L=d.useCallback((x=!1)=>{const v=K(`${n}`,h);if(r.get(v,"error",!1)){y(!0);return}const S=r.get(v,"unit")!==""?r.get(v,"unit"):m;if(S==="auto"||S==="none"){k(`${p}${S}`);return}if(r.get(v,"value")==="")return;const q=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;x?H(q):k(q)},[k,H,n,m,p,h]),P=d.useCallback(x=>{const v=K(`${n}`,h);if(r.get(v,"error",!1)){y(!0);return}if(x==="auto"||x==="none"){k(`${p}${x}`);return}if(r.get(v,"value")==="")return;const S=r.get(v,"unit")!==""?r.get(v,"unit"):x,q=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;k(q)},[k,n,p,h]);return e.jsxRuntimeExports.jsx("div",{className:"flex w-full flex-col",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-start",children:m==="class"?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("input",{className:"w-20 rounded py-1",readOnly:!0,value:u}),e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 text-blue-600 group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:"Current value is using a Tailwind preset class."})]})]}):e.jsxRuntimeExports.jsxs("div",{className:`group relative flex items-center ${N?"z-auto":""}`,children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md border border-border",children:[["none","auto"].indexOf(m)!==-1?null:e.jsxRuntimeExports.jsx("input",{readOnly:m==="class",onKeyPress:x=>{x.key==="Enter"&&L()},onKeyDown:x=>{if(x.keyCode!==38&&x.keyCode!==40)return;x.preventDefault(),I(!0);const v=r.parseInt(x.target.value);let S=r.isNaN(v)?0:v;x.keyCode===38&&(S+=1),x.keyCode===40&&(S-=1);const A=`${S}`,oe=`${A.startsWith("-")?"-":""}${p}[${A.replace("-","")}${m==="-"?"":m}]`;H(oe)},onKeyUp:x=>{B&&(x.preventDefault(),I(!1))},onBlur:()=>L(),onChange:x=>{y(!1),i(x.target.value)},onClick:x=>{var v;(v=x==null?void 0:x.target)==null||v.select(),t(!1)},value:N?R:n,className:"h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(" ",b?"border-red-500 text-red-500":"border-foreground/20")}),e.jsxRuntimeExports.jsxs(w.Tooltip,{open:l,delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>t(!l),className:"flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",children:[e.jsxRuntimeExports.jsx("span",{className:`inline-block ${h.length===1?"px-2 font-semibold":""}`,children:m}),h.length>1?e.jsxRuntimeExports.jsx(o.TriangleDownIcon,{}):null]})}),e.jsxRuntimeExports.jsx(w.TooltipPortal,{children:e.jsxRuntimeExports.jsx(w.TooltipContent,{className:"bg-background",children:e.jsxRuntimeExports.jsx(Ne,{units:h,current:m,onSelect:x=>{t(!1),j(x),P(x)}})})})]})]}),["none","auto"].indexOf(m)!==-1||N?null:e.jsxRuntimeExports.jsx(Te,{onDragStart:()=>C(!0),onDragEnd:x=>{if(V(()=>""),C(!1),r.isEmpty(x))return;const v=`${x}`,A=`${v.startsWith("-")?"-":""}${p}[${v.replace("-","")}${m==="-"?"":m}]`;k(A)},onDrag:x=>{if(r.isEmpty(x))return;V(x);const v=`${x}`,A=`${v.startsWith("-")?"-":""}${p}[${v.replace("-","")}${m==="-"?"":m}]`;H(A)},currentValue:n,unit:m,negative:g,cssProperty:a})]})})})},W=s=>{const l=f.useSelectedBlockCurrentClasses();return r.findLast(l,{property:s})},He=(s,l)=>{const t={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5};return t[r.get(s,"mq","xs")]<=t[l]},Be={width:"w-",height:"h-",minWidth:"min-w-",minHeight:"min-h-",maxWidth:"max-w-",maxHeight:"max-h-",zIndex:"z-",gap:"gap-",gapX:"gap-x-",gapY:"gap-y-",margin:"m-",marginX:"mx-",marginY:"my-",marginTop:"mt-",marginBottom:"mb-",marginLeft:"ml-",marginRight:"mr-",padding:"p-",paddingX:"px-",paddingY:"py-",paddingTop:"pt-",paddingBottom:"pb-",paddingLeft:"pl-",paddingRight:"pr-",spaceX:"space-x-",spaceY:"space-y-",border:"border-",borderTop:"border-t-",borderBottom:"border-b-",borderLeft:"border-l-",borderRight:"border-r-",borderX:"border-x-",borderY:"border-y-",borderRadius:"rounded-",borderRadiusTop:"rounded-t-",borderRadiusRight:"rounded-r-",borderRadiusBottom:"rounded-b-",borderRadiusLeft:"rounded-l-",borderRadiusTopLeft:"rounded-tl-",borderRadiusTopRight:"rounded-tr-",borderRadiusBottomRight:"rounded-br-",borderRadiusBottomLeft:"rounded-bl-",fontSize:"text-",lineHeight:"leading-",letterSpacing:"tracking-",textIndent:"indent-",rotate:"rotate-",duration:"duration-",transitionDelay:"delay-",scale:"scale-",scaleX:"scale-x-",scaleY:"scale-y-",translateX:"translate-x-",translateY:"translate-y-",skewX:"skew-x-",skewY:"skew-y-",top:"top-",bottom:"bottom-",left:"left-",right:"right-",inset:"inset-",insetX:"inset-x-",insetY:"inset-y-",opacity:"opacity-",flexBasis:"basis-"},J={xs:"",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Ve=s=>`${s.toUpperCase()} ${J[s]?`(${J[s]} & up)`:""}`,z=s=>{const{type:l="icons",label:t,property:n,onEmitChange:i=()=>{},units:u,negative:c=!1}=s,[p]=f.useDarkMode(),[a]=f.useStylingState(),[,h]=f.useCanvasWidth(),g=W(n),m=f.useAddClassesToBlocks(),j=f.useRemoveClassesFromBlocks(),[b]=f.useSelectedBlockIds(),y=d.useMemo(()=>r.get(g,"fullCls",""),[g]),R=d.useCallback((k,H=!0)=>{const L={dark:p,mq:h,mod:a,cls:k,property:n,fullCls:""};(p||a!=="")&&(L.mq="xs");const P=D.generateFullClsName(L);m(b,[P],H)},[b,p,h,a,n,m]),V=d.useCallback(()=>{j(b,[y])},[b,y,j]),N=d.useMemo(()=>He(g,h),[g,h]);d.useEffect(()=>{i(N,g)},[N,i,g]);const[,,C]=f.useCanvasWidth(),B=d.useCallback(k=>{C({xs:400,sm:640,md:800,lg:1024,xl:1420,"2xl":1920}[k])},[C]),I=r.get(g,"dark",null)===p&&r.get(g,"mod",null)===a&&r.get(g,"mq",null)===h;return e.jsxRuntimeExports.jsx(je,{canChange:N,canReset:g&&I,children:e.jsxRuntimeExports.jsxs("div",{className:"group flex flex-row items-center py-2 first:pt-0 last:pb-0",children:[e.jsxRuntimeExports.jsx("div",{className:"relative w-[70px] truncate text-xs text-foreground",children:e.jsxRuntimeExports.jsx("span",{className:`text-[11px] ${g&&!I?"text-foreground":""}`,children:t})}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center",children:[e.jsxRuntimeExports.jsxs("div",{className:"w-[150px]",children:[l==="arbitrary"?e.jsxRuntimeExports.jsx(Ie,{currentClass:r.get(g,"cls",""),classPrefix:r.get(Be,n,""),units:u||[],onChange:R,negative:c,cssProperty:n}):null,l==="icons"&&e.jsxRuntimeExports.jsx(Re,{property:n,onChange:R}),l==="range"&&e.jsxRuntimeExports.jsx(ve,{property:n,onChange:R}),l==="color"&&e.jsxRuntimeExports.jsx(Ce,{property:n,onChange:R}),l==="dropdown"&&e.jsxRuntimeExports.jsx(te,{label:t,property:n,onChange:R})]}),e.jsxRuntimeExports.jsx("div",{className:`w-[30px] cursor-pointer ${y?"visible":"invisible"}`,children:I?e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>V(),title:"Reset",className:"flex px-1.5 text-xs",children:e.jsxRuntimeExports.jsx(o.TrashIcon,{className:"h-5 w-5 text-blue-500 hover:opacity-80"})}):N&&g?e.jsxRuntimeExports.jsxs(w.Tooltip,{delayDuration:100,children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",children:e.jsxRuntimeExports.jsx(o.InfoCircledIcon,{})})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:e.jsxRuntimeExports.jsx("div",{className:"text-right",children:e.jsxRuntimeExports.jsxs("div",{children:["Current style is set at ",e.jsxRuntimeExports.jsxs("span",{className:"font-bold ",children:[Ve(r.get(g,"mq")),p&&!g.dark?"(Light mode)":""]}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>B(r.get(g,"mq")),className:"block w-full cursor-default text-right font-semibold text-blue-500",children:["Switch to ",r.get(g,"mq").toUpperCase()]})]})})})]}):null})]})]})})},Ae=["px","%","em","rem","ch","vh","vw"],se=({label:s,options:l,borderB:t=!1,borderT:n=!1,type:i="arbitrary",units:u=Ae,negative:c=!1})=>{const[p,a]=d.useState(l[0].key),h=f.useSelectedBlockCurrentClasses(),g=d.useCallback(m=>r.map(h,"property").includes(m),[h]);return e.jsxRuntimeExports.jsxs("div",{className:`mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t?"border-b":""} ${n?"border-t":""}`,children:[e.jsxRuntimeExports.jsxs("div",{className:"flex flex-row text-xs",children:[s&&e.jsxRuntimeExports.jsx("span",{className:"relative w-[70px] flex-none text-xs text-foreground",children:s}),e.jsxRuntimeExports.jsx("div",{className:"mb-3 flex grow flex-row flex-wrap gap-x-px",children:d.Children.toArray(l.map(({label:m,key:j})=>e.jsxRuntimeExports.jsx("div",{className:"first:rounded-l last:rounded-r",children:e.jsxRuntimeExports.jsxs(w.Tooltip,{children:[e.jsxRuntimeExports.jsx(w.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>a(j),className:`relative cursor-pointer rounded-full p-1 text-[8px] ${j===p?" bg-[#3E57F0] text-white":"text-gray-600 dark:text-gray-300"}`,children:[d.createElement("div",{className:g(j)?"-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full":""}),d.createElement(r.get(ee,j,o.BoxIcon),{className:"text-inherit w-3 h-3"})]})}),e.jsxRuntimeExports.jsx(w.TooltipContent,{children:r.startCase(r.toLower(m))})]})})))})]}),e.jsxRuntimeExports.jsx("div",{className:"mt-0 flex items-center",children:e.jsxRuntimeExports.jsx(z,{type:i,units:[...u],label:"",property:p,negative:c})})]})},Le=({heading:s,items:l})=>{const t=f.useSelectedBlockCurrentClasses(),n=d.useMemo(()=>{const i=p=>r.flatten(p.map(a=>a.styleType==="multiple"?r.map(a.options,"key"):a.property)),u=r.flatten(l.map(p=>p.styleType==="accordion"?i(p.items):p.styleType==="multiple"?r.map(p.options,"key"):p.property)),c=r.map(t,"property");return r.intersection(u,c).length>0},[t,l]);return e.jsxRuntimeExports.jsxs("details",{children:[e.jsxRuntimeExports.jsx("summary",{className:"my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground",children:e.jsxRuntimeExports.jsxs("div",{className:"inline",children:[s,n?e.jsxRuntimeExports.jsx("span",{className:`ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${n?"bg-blue-500":"bg-gray-300"}`}):null]})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",children:l.map(i=>i.styleType==="multiple"?e.jsxRuntimeExports.jsx(se,{...i},i.label):e.jsxRuntimeExports.jsx(z,{...i},i.label))})]})},$e=d.createContext({}),Y=({section:s})=>{const l=f.useSelectedBlockCurrentClasses(),t=d.useCallback((u=[])=>{const c={};for(let a=0;a<l.length;a++)c[l[a].property]=l[a].cls;let p=!0;for(const a in u)if(!r.has(c,a)||c[a]!==u[a]){p=!1;break}return p},[l]),n=d.useMemo(()=>{if(l.length>0&&s.heading==="Classes")return!0;const u=a=>r.flatten(a.map(h=>h.styleType==="multiple"?r.flatten(r.map(h.options,"key")):h.property)),c=r.flatten(s.items.map(a=>a.styleType==="accordion"?u(a.items):a.styleType==="multiple"?r.flatten(r.map(a.options,"key")):a.property)),p=r.map(l,"property");return r.intersection(c,p).length>0},[l,s.heading,s.items]),i=d.useMemo(()=>({}),[]);return e.jsxRuntimeExports.jsx($e.Provider,{value:i,children:e.jsxRuntimeExports.jsxs($.AccordionItem,{value:s.heading,children:[e.jsxRuntimeExports.jsx($.AccordionTrigger,{className:"px-3 py-2 text-xs hover:no-underline",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("div",{className:`h-[8px] w-[8px] rounded-full ${n?"bg-blue-500":"bg-gray-300"}`}),s.heading]})}),e.jsxRuntimeExports.jsx($.AccordionContent,{className:"bg-gray-100 px-3.5 py-2",children:d.Children.toArray(s.items.map(u=>r.has(u,"component")?d.createElement(u.component,{key:u.label}):r.has(u,"styleType")?u.styleType==="multiple"?e.jsxRuntimeExports.jsx(se,{...u},u.label):u.styleType==="accordion"&&t(u==null?void 0:u.conditions)?e.jsxRuntimeExports.jsx(Le,{...u},u.label):null:e.jsxRuntimeExports.jsx(z,{...u},u.label)))})]})})},Me=({item:s,index:l,canDelete:t,onChange:n,onRemove:i})=>e.jsxRuntimeExports.jsxs("div",{className:`flex flex-col gap-1 border-gray-400 py-2 ${t?"border-b":""}`,children:[e.jsxRuntimeExports.jsx("input",{name:"key",onChange:u=>n(u,l),value:s.key,placeholder:"Key",className:"w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",autoComplete:"off",autoCapitalize:"off"}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1.5",children:[e.jsxRuntimeExports.jsx("input",{name:"value",onChange:u=>r.isEmpty(s.key)?{}:n(u,l),value:s.value,placeholder:"Value",className:"w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",autoComplete:"off",autoCapitalize:"off"}),e.jsxRuntimeExports.jsx(o.TrashIcon,{onClick:i,className:"h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"})]})]}),De=({section:s})=>{var j;const{setSyncState:l}=f.useSavePage(),t=f.useSelectedBlock(),[n,i]=d.useState([]),[u]=f.useSelectedStylingBlocks(),c=f.useUpdateBlocksPropsRealtime(),p=`${r.get(u,"0.prop")}_attrs`;X.useEffect(()=>{const b=r.map(r.get(t,p),(y,R)=>({key:R,value:y}));r.isEmpty(b)?i([]):i(b)},[r.get(t,p)]);const a=()=>i([...n,{key:"",value:""}]),h=b=>{const y=r.filter(n,(R,V)=>b!==V);m(y)},g=(b,y)=>{const R=[...n];R[y][b.target.name]=b.target.value,m(R)},m=X.useCallback((b=[])=>{const y={};r.forEach(b,R=>{r.isEmpty(R.key)||r.set(y,R.key,R.value)}),c([r.get(t,"_id")],{[p]:y}),l("UNSAVED")},[t,l,c,p]);return e.jsxRuntimeExports.jsxs($.AccordionItem,{value:s.heading,children:[e.jsxRuntimeExports.jsx($.AccordionTrigger,{className:"px-3 py-2 text-xs hover:no-underline",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("div",{className:`h-[8px] w-[8px] rounded-full ${r.isEmpty(r.get(t,p))?"bg-gray-300":"bg-blue-500"}`}),"Attributes"]})}),e.jsxRuntimeExports.jsx($.AccordionContent,{className:"bg-gray-100 px-3.5 py-2",children:e.jsxRuntimeExports.jsxs("div",{className:"no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px",children:[e.jsxRuntimeExports.jsxs(U.Label,{className:"mt-2 flex w-full items-center justify-between",children:["Add Custom attributes",e.jsxRuntimeExports.jsxs("div",{className:`flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!r.isEmpty(n)&&r.isEmpty((j=r.last(n))==null?void 0:j.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"}`,onClick:()=>{var b;!r.isEmpty(n)&&r.isEmpty((b=r.last(n))==null?void 0:b.key)||a()},children:[e.jsxRuntimeExports.jsx(o.PlusIcon,{width:12,height:12})," Add"]})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[r.isEmpty(n)&&e.jsxRuntimeExports.jsx("div",{className:"flex h-12 items-center justify-center text-sm text-gray-400",children:"Click + Add to add attributes"}),X.Children.toArray(r.map(n,(b,y)=>{const R=n.length>0&&y<n.length-1;return e.jsxRuntimeExports.jsx(Me,{item:b,index:y,canDelete:R,onChange:g,onRemove:()=>h(y)})}))]})]})})]})};function qe(){const[s,l]=f.useStylingState(),{flexChild:t,gridChild:n}=f.useSelectedBlocksDisplayChild(),[,i]=ae.useAtom(f.advanceStylingOpenAtom),{t:u}=Q.useTranslation(),[c]=f.useSelectedStylingBlocks();return r.isEmpty(c)?e.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[e.jsxRuntimeExports.jsx(o.MixerHorizontalIcon,{className:"mx-auto text-3xl"}),e.jsxRuntimeExports.jsx("h1",{children:u("no_styling_block_selected")}),e.jsxRuntimeExports.jsxs("p",{className:"text-xs ",children:["Hint: Styling allowed blocks are highlighted with"," ",e.jsxRuntimeExports.jsx("span",{className:"border border-orange-500 p-px",children:"orange"})," border"]})]})}):e.jsxRuntimeExports.jsxs("div",{onClick:()=>i(!1),className:"flex h-full flex-col",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-1.5",children:[e.jsxRuntimeExports.jsx(U.Label,{htmlFor:"",className:"flex gap-x-1.5 text-xs italic",children:"State"}),e.jsxRuntimeExports.jsxs(E.Select,{defaultValue:s,onValueChange:p=>l(p),children:[e.jsxRuntimeExports.jsx(E.SelectTrigger,{className:"h-auto w-fit p-1 px-3",children:e.jsxRuntimeExports.jsx(E.SelectValue,{placeholder:"State"})}),e.jsxRuntimeExports.jsxs(E.SelectContent,{children:[e.jsxRuntimeExports.jsx(E.SelectItem,{value:"",children:"Normal"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"hover",children:"Hover"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"active",children:"Active"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"focus",children:"Focus"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"before",children:"Before"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"after",children:"After"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"only",children:"Only"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first",children:"First"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"last",children:"Last"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first-letter",children:"First Letter"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"first-line",children:"First Line"}),e.jsxRuntimeExports.jsx(E.SelectItem,{value:"disabled",children:"Disabled"})]})]})]})}),e.jsxRuntimeExports.jsxs(xe.ScrollArea,{className:"no-scrollbar -mx-1 h-full overflow-x-hidden",children:[e.jsxRuntimeExports.jsxs($.Accordion,{type:"multiple",className:"h-full w-full",children:[t&&e.jsxRuntimeExports.jsx(Y,{section:ye}),n?e.jsxRuntimeExports.jsx(Y,{section:be}):null,fe.map(p=>e.jsxRuntimeExports.jsx(Y,{section:p},p.heading)),e.jsxRuntimeExports.jsx(De,{section:{heading:"Attributes"}})]}),e.jsxRuntimeExports.jsx("div",{className:"h-60"})]})]})}const Oe={px:1,"%":1,em:100,rem:100,ch:1,vw:1,vh:1,"-":1,deg:1,ms:.1},We=()=>{const s=f.useSelectedBlock(),{t:l}=Q.useTranslation(),[t,n]=d.useState(""),[i,u]=d.useState({onDrag:a=>a,onDragEnd:a=>a,dragStartY:0,dragging:!1,dragStartValue:0,dragUnit:"",negative:!1,cssProperty:""}),c=_.useThrottledCallback(a=>{const h=!r.get(i,"negative",!1),g=r.get(i,"cssProperty","");let m=parseFloat(i.dragStartValue);m=r.isNaN(m)?0:m;let j=Oe[i.dragUnit];(r.startsWith(g,"scale")||g==="opacity")&&(j=10);let y=(i.dragStartY-a.pageY)/j+m;h&&y<0&&(y=0),g==="opacity"&&y>1&&(y=1),i.onDrag(`${y}`),n(`${y}`)},[i],50),p=d.useCallback(()=>{setTimeout(()=>i.onDragEnd(`${t}`),100),u({onDrag:a=>a,onDragEnd:a=>a,dragStartY:0,dragging:!1,dragStartValue:0,dragUnit:"",negative:!1,cssProperty:""})},[i,t,u]);return r.isNull(s)?e.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[e.jsxRuntimeExports.jsx(o.MixerHorizontalIcon,{className:"mx-auto text-3xl"}),e.jsxRuntimeExports.jsx("h1",{children:l("no_block_selected_for_styling")})]})}):e.jsxRuntimeExports.jsxs(re.Provider,{value:{setDragData:u},children:[i.dragging?e.jsxRuntimeExports.jsx("div",{onMouseMove:c,onMouseUp:()=>{p()},className:"absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "}):null,e.jsxRuntimeExports.jsxs(M.Tabs,{defaultValue:"settings",className:"flex h-full w-full flex-col py-1",children:[e.jsxRuntimeExports.jsxs(M.TabsList,{className:"mx-1 grid grid-cols-2",children:[e.jsxRuntimeExports.jsx(M.TabsTrigger,{value:"settings",children:"Settings"}),e.jsxRuntimeExports.jsx(M.TabsTrigger,{value:"styling",children:"Styling"})]}),e.jsxRuntimeExports.jsx(M.TabsContent,{value:"settings",className:"no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(ge,{})}),e.jsxRuntimeExports.jsx(M.TabsContent,{value:"styling",className:"flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(qe,{})})]})]})};exports.default=We;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),o=require("@radix-ui/react-icons"),s=require("react"),j=require("jotai"),p=require("lodash"),i=require("./useBuilderProp-5e57d0c8.cjs"),h=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),o=require("@radix-ui/react-icons"),s=require("react"),j=require("jotai"),p=require("lodash"),i=require("./useBuilderProp-5e57d0c8.cjs"),h=require("./index-d4a18b5d.cjs");require("react-i18next");const g=require("./utils-3c452dd0.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");require("clsx");require("tailwind-merge");const f=s.lazy(()=>Promise.resolve().then(()=>require("./Layers-7f3a2335.cjs"))),q=s.lazy(()=>Promise.resolve().then(()=>require("./BrandingOptions-2795be29.cjs"))),y=s.lazy(()=>Promise.resolve().then(()=>require("./ImagesPanel-68a11293.cjs")));let b=null;const N=()=>{const u=i.useBuilderProp("sideBarComponents.top",[]),E=i.useBuilderProp("sideBarComponents.bottom",[]),[r,x]=j.useAtom(h.activePanelAtom),[v,c]=s.useState(r),[n,R]=s.useState(null),m={layers:f,"branding-options":q,images:y};p.each(u,({name:t,panel:a})=>{m[t]=a});const l=t=>{clearTimeout(b),d(!1),r!=="layers"&&t==="layers"?b=setTimeout(()=>c("layers"),500):c(t),x(t)},[,d]=j.useAtom(h.addBlocksModalAtom);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex",children:[e.jsxRuntimeExports.jsxs("div",{className:"z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100] flex w-14 flex-col items-center space-y-2",children:[e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>{d(!0),x("layers")},size:"sm",variant:r==="add-blocks"?"default":"outline",children:e.jsxRuntimeExports.jsx(o.PlusIcon,{className:"text-xl"})}),e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>l("layers"),size:"sm",variant:r==="layers"?"default":"outline",children:e.jsxRuntimeExports.jsx(o.StackIcon,{className:"text-xl"})}),e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>l("branding-options"),size:"sm",variant:r==="branding-options"?"default":"outline",children:e.jsxRuntimeExports.jsx(o.Half2Icon,{className:"w-4 max-w-[40px] text-xs"})}),s.Children.toArray(u.map(({name:t,icon:a})=>e.jsxRuntimeExports.jsx(s.Suspense,{fallback:e.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>l(t),size:"sm",className:"w-10",variant:r===t?"default":"outline",children:e.jsxRuntimeExports.jsx(a,{})})})))]}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center space-y-2",children:s.Children.toArray(E.map(t=>e.jsxRuntimeExports.jsx(s.Suspense,{fallback:e.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})]}),e.jsxRuntimeExports.jsx("div",{onClick:()=>{l("layers")},className:"absolute inset-0 right-0 z-50 w-screen bg-black/20"+(r==="layers"?" hidden":"")}),e.jsxRuntimeExports.jsx("div",{className:`fixed left-14 z-[50] h-full w-96 border-r bg-background duration-500 ease-in-out ${r!=="layers"?"translate-x-0":"-translate-x-full"}`,children:e.jsxRuntimeExports.jsx(s.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 bg-white p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:e.jsxRuntimeExports.jsx("div",{className:g.cn("relative h-full max-h-[93%] bg-background p-1",r==="layers"?"":"z-[100]"),onMouseEnter:()=>{n&&clearTimeout(n)},onMouseLeave:()=>{const t=setTimeout(()=>{n&&(l("layers"),clearTimeout(n))},1e3);R(t)},children:s.createElement(p.get(m,v,()=>e.jsxRuntimeExports.jsx("div",{})))})})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-60 border-r p-1",children:e.jsxRuntimeExports.jsx(s.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:s.createElement(f)})})]})};exports.default=N;
|
|
@@ -4,7 +4,7 @@ import i, { lazy as c, useState as f, Suspense as r } from "react";
|
|
|
4
4
|
import { useAtom as h } from "jotai";
|
|
5
5
|
import { each as P, get as A } from "lodash";
|
|
6
6
|
import { u as b, B as o, S as j } from "./useBuilderProp-81a14920.js";
|
|
7
|
-
import { a as B, b as T } from "./index-
|
|
7
|
+
import { a as B, b as T } from "./index-0d399aef.js";
|
|
8
8
|
import "react-i18next";
|
|
9
9
|
import { c as S } from "./utils-ac68b2c8.js";
|
|
10
10
|
import "@radix-ui/react-slot";
|
|
@@ -27,7 +27,7 @@ import "lucide-react";
|
|
|
27
27
|
import "sonner";
|
|
28
28
|
import "clsx";
|
|
29
29
|
import "tailwind-merge";
|
|
30
|
-
const g = c(() => import("./Layers-
|
|
30
|
+
const g = c(() => import("./Layers-42ba6c2e.js")), E = c(() => import("./BrandingOptions-0acb0974.js")), I = c(() => import("./ImagesPanel-996761b1.js"));
|
|
31
31
|
let v = null;
|
|
32
32
|
const ce = () => {
|
|
33
33
|
const m = b("sideBarComponents.top", []), y = b("sideBarComponents.bottom", []), [a, d] = h(B), [N, p] = f(a), [t, k] = f(null), x = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),u=require("@radix-ui/react-icons"),s=require("./select-0e32300c.cjs"),r=require("./useBuilderProp-5e57d0c8.cjs"),o=require("./separator-a597dba7.cjs"),a=require("./toggle-b90fed97.cjs"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),u=require("@radix-ui/react-icons"),s=require("./select-0e32300c.cjs"),r=require("./useBuilderProp-5e57d0c8.cjs"),o=require("./separator-a597dba7.cjs"),a=require("./toggle-b90fed97.cjs"),c=require("./index-d4a18b5d.cjs"),p=require("react-i18next");require("@radix-ui/react-select");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("lodash");require("@radix-ui/react-separator");require("@radix-ui/react-toggle");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-78bfa1f3.cjs");require("./MODIFIERS-70fef873.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const m=()=>r.useBuilderProp("languages",["en"]),j=()=>m().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(s.Select,{children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(u.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(s.SelectContent,{children:e.jsxRuntimeExports.jsxs(s.SelectGroup,{children:[e.jsxRuntimeExports.jsx(s.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(s.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(s.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(s.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(s.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(s.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),d=()=>{const{savePage:x,syncState:t}=c.useSavePage(),{t:l}=p.useTranslation(),n=i.useMemo(()=>{switch(t){case"SAVING":return"animate-pulse bg-gray-500 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Tooltip,{children:[e.jsxRuntimeExports.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(a.Toggle,{onClick:()=>x(),className:`flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${n}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx("svg",{fill:"currentColor",width:"16",height:"16",viewBox:"0 0 0.32 0.32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"})}),t==="SAVING"?"Saving...":t==="SAVED"?l("Saved"):"Save"]})}),e.jsxRuntimeExports.jsx(r.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:t==="SAVING"?"Saving...":t==="SAVED"?"Saved":"Save changes"})})]})})},h=()=>{const x=r.useBuilderProp("topBarComponents.left",[]),t=r.useBuilderProp("topBarComponents.center",[]),l=r.useBuilderProp("topBarComponents.right",[]);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:i.Children.toArray(x.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:i.Children.toArray(t.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(j,{}),e.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(d,{}),i.Children.toArray(l.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))]})]})};exports.default=h;
|
|
@@ -5,7 +5,7 @@ import { S as x, c as d, b as h, d as u, a as g, e as j, f as t } from "./select
|
|
|
5
5
|
import { u as l, d as f, e as v, f as S, S as c } from "./useBuilderProp-81a14920.js";
|
|
6
6
|
import { S as b } from "./separator-a80d065b.js";
|
|
7
7
|
import { T as N } from "./toggle-00c9d11e.js";
|
|
8
|
-
import { u as C } from "./index-
|
|
8
|
+
import { u as C } from "./index-0d399aef.js";
|
|
9
9
|
import { useTranslation as w } from "react-i18next";
|
|
10
10
|
import "@radix-ui/react-select";
|
|
11
11
|
import "./utils-ac68b2c8.js";
|