@chaibuilder/sdk 0.1.1 → 0.1.3

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.
Files changed (82) hide show
  1. package/dist/AddBlocks-0916e841.cjs +3 -0
  2. package/dist/AddBlocks-c195f577.js +258 -0
  3. package/dist/{BrandingOptions-77957074.cjs → BrandingOptions-742992b6.cjs} +1 -1
  4. package/dist/{BrandingOptions-86dc389a.js → BrandingOptions-766c19c6.js} +27 -27
  5. package/dist/{CanvasArea-29d479f2.js → CanvasArea-25800a3e.js} +19 -18
  6. package/dist/CanvasArea-e855c4a2.cjs +60 -0
  7. package/dist/Class-7d6aadbc.cjs +1 -0
  8. package/dist/{Class-e6b07b79.js → Class-e34b2337.js} +9 -9
  9. package/dist/{ImagesPanel-6595528d.js → ImagesPanel-8ccab6d9.js} +1 -1
  10. package/dist/{ImagesPanel-5cde797f.cjs → ImagesPanel-addb2bf9.cjs} +1 -1
  11. package/dist/{Layers-3a270af5.cjs → Layers-a2169d0b.cjs} +1 -1
  12. package/dist/{Layers-81832d92.js → Layers-f7e792f6.js} +3 -3
  13. package/dist/{MarkAsGlobalBlock-f2186631.cjs → MarkAsGlobalBlock-6187e6fd.cjs} +1 -1
  14. package/dist/{MarkAsGlobalBlock-a1b5646c.js → MarkAsGlobalBlock-6bac1842.js} +2 -2
  15. package/dist/PagesPanel-0827c264.js +46 -0
  16. package/dist/PagesPanel-5698953d.cjs +1 -0
  17. package/dist/ProjectPanel-a3cb7396.cjs +1 -0
  18. package/dist/ProjectPanel-e577029a.js +66 -0
  19. package/dist/{Settings-a8cea8ee.js → Settings-b214f859.js} +25 -24
  20. package/dist/Settings-bee21026.cjs +1 -0
  21. package/dist/{SidePanels-1dcabe54.js → SidePanels-03fa10e8.js} +20 -18
  22. package/dist/SidePanels-934159a4.cjs +1 -0
  23. package/dist/{Topbar-ce65bdce.js → Topbar-9bc8c9cf.js} +2 -2
  24. package/dist/{Topbar-00cfceeb.cjs → Topbar-c083cc2a.cjs} +1 -1
  25. package/dist/UnsplashImages-68492dc9.cjs +1 -0
  26. package/dist/{UnsplashImages-43ec34a9.js → UnsplashImages-afaa7706.js} +19 -28
  27. package/dist/add-page-modal-63858244.js +92 -0
  28. package/dist/add-page-modal-cb367c9d.cjs +1 -0
  29. package/dist/alert-dialog-4ce6ed22.cjs +1 -0
  30. package/dist/alert-dialog-ee98f47e.js +64 -0
  31. package/dist/confirm-alert-4f50caa7.cjs +1 -0
  32. package/dist/confirm-alert-f2a47cc7.js +36 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.d.ts +20 -12
  35. package/dist/core.js +53 -52
  36. package/dist/delete-page-modal-1e3914e3.cjs +1 -0
  37. package/dist/delete-page-modal-def9012d.js +64 -0
  38. package/dist/dropdown-menu-84b2439e.cjs +1 -0
  39. package/dist/dropdown-menu-ae3ed09b.js +164 -0
  40. package/dist/form-5d5c5c9e.js +125 -0
  41. package/dist/form-6eac0287.cjs +1 -0
  42. package/dist/{html-to-json-fecbbe16.js → html-to-json-9304dbda.js} +47 -47
  43. package/dist/html-to-json-9c9961da.cjs +1 -0
  44. package/dist/index-207f2cbf.cjs +2 -0
  45. package/dist/index-390f7bef.js +4749 -0
  46. package/dist/index-824a7bd0.js +188 -0
  47. package/dist/index-ebd86d7f.cjs +2 -0
  48. package/dist/input-42acea7e.cjs +1 -0
  49. package/dist/input-a0ea2bc7.js +19 -0
  50. package/dist/lib.cjs +1 -1
  51. package/dist/lib.js +3 -3
  52. package/dist/link-86c532b5.cjs +1 -0
  53. package/dist/{link-0bfd8606.js → link-f80a947d.js} +52 -68
  54. package/dist/mockServiceWorker.js +292 -0
  55. package/dist/page-viewer-41cbb548.js +88 -0
  56. package/dist/page-viewer-83ce2c70.cjs +1 -0
  57. package/dist/project-general-setting-0262fe62.js +65 -0
  58. package/dist/project-general-setting-2c8bed74.cjs +1 -0
  59. package/dist/project-seo-setting-01536592.js +67 -0
  60. package/dist/project-seo-setting-e3924578.cjs +1 -0
  61. package/dist/single-page-detail-924d57fc.js +206 -0
  62. package/dist/single-page-detail-cfeae896.cjs +1 -0
  63. package/dist/ui.cjs +1 -1
  64. package/dist/ui.js +124 -122
  65. package/dist/usePageActions-3bed2330.cjs +1 -0
  66. package/dist/usePageActions-f86f6f65.js +36 -0
  67. package/dist/useProjectActions-1de05f63.js +17 -0
  68. package/dist/useProjectActions-5092ed79.cjs +1 -0
  69. package/package.json +14 -1
  70. package/dist/AddBlocks-52d9b4d7.cjs +0 -3
  71. package/dist/AddBlocks-e047b93d.js +0 -260
  72. package/dist/CanvasArea-9ce217a4.cjs +0 -60
  73. package/dist/Class-0801d193.cjs +0 -1
  74. package/dist/Settings-6a3f0f70.cjs +0 -1
  75. package/dist/SidePanels-7fe6bebe.cjs +0 -1
  76. package/dist/UnsplashImages-1b2310ad.cjs +0 -1
  77. package/dist/dropdown-menu-a9b096f9.cjs +0 -1
  78. package/dist/dropdown-menu-d912a52e.js +0 -223
  79. package/dist/html-to-json-d8ac554d.cjs +0 -1
  80. package/dist/index-32d7b6e5.js +0 -2657
  81. package/dist/index-506fb888.cjs +0 -2
  82. package/dist/link-158970ee.cjs +0 -1
@@ -8,16 +8,17 @@ 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-32d7b6e5.js";
12
- import { R as $t, a as Lt, b as It, L as Dt, I as Mt } from "./link-0bfd8606.js";
13
- import { getBlockComponent as Ot } from "@chaibuilder/blocks";
14
- import { useAtom as Et } from "jotai";
15
- import Pt from "react-autosuggest";
16
- import Ft from "fuse.js";
17
- import { A as Xt, C as ae, b as Yt } from "./Class-e6b07b79.js";
18
- import { B as Xe, d as W, e as Z, f as _, g as Wt } from "./useBuilderProp-81a14920.js";
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-390f7bef.js";
12
+ import { getBlockComponent as $t } from "@chaibuilder/blocks";
13
+ import { R as Lt, I as It, a as Dt, L as Mt } from "./link-f80a947d.js";
14
+ import { useAtom as Ot } from "jotai";
15
+ import Et from "react-autosuggest";
16
+ import Pt from "fuse.js";
17
+ import { A as Ft, C as ae, b as Xt } from "./Class-e34b2337.js";
18
+ import { B as Xe, d as W, e as Z, f as _, g as Yt } from "./useBuilderProp-81a14920.js";
19
19
  import { L as xe } from "./label-e770a087.js";
20
- import { S as Zt } from "./CONTROLS-442caee5.js";
20
+ import { S as Wt } from "./CONTROLS-442caee5.js";
21
+ import { I as Zt } from "./input-a0ea2bc7.js";
21
22
  import { a as Ye, b as We, c as Ze, A as _t } from "./accordion-c0176dc5.js";
22
23
  import { S as zt } from "./scroll-area-9f64a082.js";
23
24
  import { S as Ut, c as Gt, b as Kt, d as qt, f as R } from "./select-7fddd7c3.js";
@@ -36,7 +37,7 @@ import "react-icons-picker";
36
37
  import "react-dom";
37
38
  import "./dialog-3d4e82ed.js";
38
39
  import "@radix-ui/react-dialog";
39
- import "./ImagesPanel-6595528d.js";
40
+ import "./ImagesPanel-8ccab6d9.js";
40
41
  import "react-quill";
41
42
  import "@radix-ui/react-slot";
42
43
  import "class-variance-authority";
@@ -47,7 +48,7 @@ import "@radix-ui/react-accordion";
47
48
  import "@radix-ui/react-scroll-area";
48
49
  import "@radix-ui/react-select";
49
50
  function Jt() {
50
- const r = oe(), { createSnapshot: o } = De(), t = Me(), [l] = St(), s = Ot(r._type), n = c(s, "props", {}), d = {
51
+ const r = oe(), { createSnapshot: o } = De(), t = Me(), [l] = St(), s = $t(r._type), n = c(s, "props", {}), d = {
51
52
  type: "object",
52
53
  properties: {
53
54
  _name: {
@@ -77,12 +78,12 @@ function Jt() {
77
78
  kt,
78
79
  {
79
80
  widgets: {
80
- richtext: $t,
81
- icon: Lt,
82
- image: It
81
+ richtext: Lt,
82
+ icon: It,
83
+ image: Dt
83
84
  },
84
85
  fields: {
85
- link: Dt
86
+ link: Mt
86
87
  },
87
88
  idSeparator: ".",
88
89
  autoComplete: "off",
@@ -100,7 +101,7 @@ function Jt() {
100
101
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
101
102
  ] });
102
103
  }
103
- const Ce = new Ft(Xt, {
104
+ const Ce = new Pt(Ft, {
104
105
  isCaseSensitive: !1,
105
106
  threshold: 0.2,
106
107
  minMatchCharLength: 2,
@@ -108,7 +109,7 @@ const Ce = new Ft(Xt, {
108
109
  });
109
110
  function Qt() {
110
111
  var B;
111
- const [r] = ge(), o = oe(), t = Oe(), l = Ee(), [s] = Pe(), [n, d] = S(""), i = (B = Se(r)) == null ? void 0 : B.prop, a = qe((c(o, i, "").replace(Zt, "").split(",").pop() || "").split(" "), w), x = () => {
112
+ const [r] = ge(), o = oe(), t = Oe(), l = Ee(), [s] = Pe(), [n, d] = S(""), i = (B = Se(r)) == null ? void 0 : B.prop, a = qe((c(o, i, "").replace(Wt, "").split(",").pop() || "").split(" "), w), x = () => {
112
113
  const v = n.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
113
114
  t(s, v, !0), d("");
114
115
  }, [g, u] = S([]), m = ({ value: v }) => {
@@ -146,7 +147,7 @@ function Qt() {
146
147
  /* @__PURE__ */ e.jsx(xe, { className: "mt-2", children: "Add Tailwind classes" }),
147
148
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
148
149
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
149
- Pt,
150
+ Et,
150
151
  {
151
152
  suggestions: g,
152
153
  onSuggestionsFetchRequested: m,
@@ -826,7 +827,7 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
826
827
  ), ze = ({ label: r, property: o, onChange: t }) => {
827
828
  const l = H(() => c(ae, `${o}.classes`, [""]), [o]), s = te(o), n = H(() => c(s, "cls", ""), [s]), { canChange: d } = Q(ee), i = /\[.*\]/g.test(n);
828
829
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
829
- /* @__PURE__ */ e.jsx(Mt, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
830
+ /* @__PURE__ */ e.jsx(Zt, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
830
831
  /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
831
832
  /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(ue, {}) }) }),
832
833
  /* @__PURE__ */ e.jsx(_, { children: "Current value is using a Tailwind arbitrary value." })
@@ -1293,7 +1294,7 @@ const or = ({ property: r, onChange: o }) => {
1293
1294
  ]
1294
1295
  }
1295
1296
  ) }),
1296
- /* @__PURE__ */ e.jsx(Wt, { children: /* @__PURE__ */ e.jsx(_, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1297
+ /* @__PURE__ */ e.jsx(Yt, { children: /* @__PURE__ */ e.jsx(_, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1297
1298
  ur,
1298
1299
  {
1299
1300
  units: x,
@@ -1421,7 +1422,7 @@ const or = ({ property: r, onChange: o }) => {
1421
1422
  (C, $ = !0) => {
1422
1423
  const F = { dark: i, mq: x, mod: a, cls: C, property: l, fullCls: "" };
1423
1424
  (i || a !== "") && (F.mq = "xs");
1424
- const re = Yt(F);
1425
+ const re = Xt(F);
1425
1426
  u(h, [re], $);
1426
1427
  },
1427
1428
  [h, i, x, a, l, u]
@@ -1713,7 +1714,7 @@ const or = ({ property: r, onChange: o }) => {
1713
1714
  ] });
1714
1715
  };
1715
1716
  function Cr() {
1716
- const [r, o] = Fe(), { flexChild: t, gridChild: l } = Bt(), [, s] = Et(At), { t: n } = Be(), [d] = ge();
1717
+ const [r, o] = Fe(), { flexChild: t, gridChild: l } = Bt(), [, s] = Ot(At), { t: n } = Be(), [d] = ge();
1717
1718
  return w(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
1718
1719
  /* @__PURE__ */ e.jsx(Ie, { className: "mx-auto text-3xl" }),
1719
1720
  /* @__PURE__ */ e.jsx("h1", { children: n("no_styling_block_selected") }),
@@ -1769,7 +1770,7 @@ const jr = {
1769
1770
  "-": 1,
1770
1771
  deg: 1,
1771
1772
  ms: 0.1
1772
- }, ml = () => {
1773
+ }, bl = () => {
1773
1774
  const r = oe(), { t: o } = Be(), [t, l] = L.useState(""), [s, n] = L.useState({
1774
1775
  onDrag: (a) => a,
1775
1776
  onDragEnd: (a) => a,
@@ -1841,5 +1842,5 @@ const jr = {
1841
1842
  );
1842
1843
  };
1843
1844
  export {
1844
- ml as default
1845
+ bl as default
1845
1846
  };
@@ -0,0 +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-ebd86d7f.cjs"),ie=require("@chaibuilder/blocks"),F=require("./link-86c532b5.cjs"),ae=require("jotai"),ue=require("react-autosuggest"),pe=require("fuse.js"),D=require("./Class-7d6aadbc.cjs"),w=require("./useBuilderProp-5e57d0c8.cjs"),U=require("./label-167415e5.cjs"),de=require("./CONTROLS-031e1de3.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("react-icons-picker");require("react-dom");require("./dialog-170eaad9.cjs");require("@radix-ui/react-dialog");require("./ImagesPanel-addb2bf9.cjs");require("react-quill");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},q=d.createContext({canReset:!1,canChange:!0}),je=({children:s,canReset:l=!1,canChange:t=!0})=>e.jsxRuntimeExports.jsx(q.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(q),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(q),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(q),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(q),[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 O=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;x?H(O):k(O)},[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,O=`${r.get(v,"value","").startsWith("-")?"-":""}${p}[${r.get(v,"value","").replace("-","")}${S==="-"?"":S}]`;k(O)},[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 Oe(){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 qe={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=qe[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(Oe,{})})]})]})};exports.default=We;
@@ -1,10 +1,10 @@
1
1
  import { j as e } from "./jsx-runtime-944c88e2.js";
2
2
  import { PlusIcon as w, StackIcon as C, Half2Icon as z } from "@radix-ui/react-icons";
3
- import i, { lazy as c, useState as x, Suspense as r } from "react";
4
- import { useAtom as u } from "jotai";
3
+ import i, { lazy as c, useState as f, Suspense as r } from "react";
4
+ import { useAtom as h } from "jotai";
5
5
  import { each as P, get as A } from "lodash";
6
- import { u as f, B as o, S as h } from "./useBuilderProp-81a14920.js";
7
- import { a as B, b as T } from "./index-32d7b6e5.js";
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-390f7bef.js";
8
8
  import "react-i18next";
9
9
  import { c as S } from "./utils-ac68b2c8.js";
10
10
  import "@radix-ui/react-slot";
@@ -17,34 +17,36 @@ import "react-dnd";
17
17
  import "@minoru/react-dnd-treeview";
18
18
  import "react-hotkeys-hook";
19
19
  import "flat-to-nested";
20
- import "./Class-e6b07b79.js";
20
+ import "./Class-e34b2337.js";
21
21
  import "redux-undo";
22
22
  import "@react-hookz/web";
23
23
  import "@chaibuilder/blocks";
24
24
  import "./CONTROLS-442caee5.js";
25
25
  import "clsx";
26
26
  import "tailwind-merge";
27
- const b = c(() => import("./Layers-81832d92.js")), E = c(() => import("./BrandingOptions-86dc389a.js")), I = c(() => import("./ImagesPanel-6595528d.js"));
28
- let j = null;
27
+ const g = c(() => import("./Layers-f7e792f6.js")), E = c(() => import("./BrandingOptions-766c19c6.js")), I = c(() => import("./ImagesPanel-8ccab6d9.js"));
28
+ let v = null;
29
29
  const re = () => {
30
- const m = f("sideBarComponents.top", []), g = f("sideBarComponents.bottom", []), [a, v] = u(B), [y, d] = x(a), [t, N] = x(null), p = {
31
- layers: b,
30
+ const m = b("sideBarComponents.top", []), y = b("sideBarComponents.bottom", []), [a, d] = h(B), [N, p] = f(a), [t, k] = f(null), x = {
31
+ layers: g,
32
32
  "branding-options": E,
33
33
  images: I
34
34
  };
35
35
  P(m, ({ name: s, panel: n }) => {
36
- p[s] = n;
36
+ x[s] = n;
37
37
  });
38
38
  const l = (s) => {
39
- clearTimeout(j), a !== "layers" && s === "layers" ? j = setTimeout(() => d("layers"), 500) : d(s), v(s);
40
- }, [, k] = u(T);
39
+ clearTimeout(v), u(!1), a !== "layers" && s === "layers" ? v = setTimeout(() => p("layers"), 500) : p(s), d(s);
40
+ }, [, u] = h(T);
41
41
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex", children: [
42
42
  /* @__PURE__ */ e.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: [
43
43
  /* @__PURE__ */ e.jsxs("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2", children: [
44
44
  /* @__PURE__ */ e.jsx(
45
45
  o,
46
46
  {
47
- onClick: () => k(!0),
47
+ onClick: () => {
48
+ u(!0), d("layers");
49
+ },
48
50
  size: "sm",
49
51
  variant: a === "add-blocks" ? "default" : "outline",
50
52
  children: /* @__PURE__ */ e.jsx(w, { className: "text-xl" })
@@ -69,7 +71,7 @@ const re = () => {
69
71
  }
70
72
  ),
71
73
  i.Children.toArray(
72
- m.map(({ name: s, icon: n }) => /* @__PURE__ */ e.jsx(r, { fallback: /* @__PURE__ */ e.jsx(h, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(
74
+ m.map(({ name: s, icon: n }) => /* @__PURE__ */ e.jsx(r, { fallback: /* @__PURE__ */ e.jsx(j, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(
73
75
  o,
74
76
  {
75
77
  onClick: () => l(s),
@@ -82,7 +84,7 @@ const re = () => {
82
84
  )
83
85
  ] }),
84
86
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center space-y-2", children: i.Children.toArray(
85
- g.map((s) => /* @__PURE__ */ e.jsx(r, { fallback: /* @__PURE__ */ e.jsx(h, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(s, {}) }))
87
+ y.map((s) => /* @__PURE__ */ e.jsx(r, { fallback: /* @__PURE__ */ e.jsx(j, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(s, {}) }))
86
88
  ) })
87
89
  ] }),
88
90
  /* @__PURE__ */ e.jsx(
@@ -117,9 +119,9 @@ const re = () => {
117
119
  const s = setTimeout(() => {
118
120
  t && (l("layers"), clearTimeout(t));
119
121
  }, 1e3);
120
- N(s);
122
+ k(s);
121
123
  },
122
- children: i.createElement(A(p, y, () => /* @__PURE__ */ e.jsx("div", {})))
124
+ children: i.createElement(A(x, N, () => /* @__PURE__ */ e.jsx("div", {})))
123
125
  }
124
126
  )
125
127
  }
@@ -134,7 +136,7 @@ const re = () => {
134
136
  /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" }),
135
137
  /* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" })
136
138
  ] }),
137
- children: i.createElement(b)
139
+ children: i.createElement(g)
138
140
  }
139
141
  ) })
140
142
  ] });
@@ -0,0 +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-ebd86d7f.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("./Class-7d6aadbc.cjs");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("./CONTROLS-031e1de3.cjs");require("clsx");require("tailwind-merge");const f=s.lazy(()=>Promise.resolve().then(()=>require("./Layers-a2169d0b.cjs"))),y=s.lazy(()=>Promise.resolve().then(()=>require("./BrandingOptions-742992b6.cjs"))),q=s.lazy(()=>Promise.resolve().then(()=>require("./ImagesPanel-addb2bf9.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":y,images:q};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;
@@ -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-32d7b6e5.js";
8
+ import { u as C } from "./index-390f7bef.js";
9
9
  import { useTranslation as w } from "react-i18next";
10
10
  import "@radix-ui/react-select";
11
11
  import "./utils-ac68b2c8.js";
@@ -25,7 +25,7 @@ import "react-dnd";
25
25
  import "@minoru/react-dnd-treeview";
26
26
  import "react-hotkeys-hook";
27
27
  import "flat-to-nested";
28
- import "./Class-e6b07b79.js";
28
+ import "./Class-e34b2337.js";
29
29
  import "redux-undo";
30
30
  import "@react-hookz/web";
31
31
  import "@chaibuilder/blocks";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),o=require("@radix-ui/react-icons"),s=require("./select-0e32300c.cjs"),r=require("./useBuilderProp-5e57d0c8.cjs"),u=require("./separator-a597dba7.cjs"),a=require("./toggle-b90fed97.cjs"),c=require("./index-506fb888.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("./Class-0801d193.cjs");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("./CONTROLS-031e1de3.cjs");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(o.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(u.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),o=require("@radix-ui/react-icons"),s=require("./select-0e32300c.cjs"),r=require("./useBuilderProp-5e57d0c8.cjs"),u=require("./separator-a597dba7.cjs"),a=require("./toggle-b90fed97.cjs"),c=require("./index-ebd86d7f.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("./Class-7d6aadbc.cjs");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("./CONTROLS-031e1de3.cjs");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(o.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(u.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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),o=require("react"),p=require("lodash"),I=require("@radix-ui/react-icons"),w=require("unsplash-js"),P=require("./useBuilderProp-5e57d0c8.cjs"),A=require("./input-42acea7e.cjs"),T=require("./scroll-area-088530b9.cjs"),h=require("./popover-7cb9079b.cjs"),t=require("./select-0e32300c.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-toast");require("jotai");require("@radix-ui/react-scroll-area");require("@radix-ui/react-popover");require("@radix-ui/react-select");const _="phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec",k=w.createApi({accessKey:_}),E=async u=>new Promise((d,a)=>{k.search.getPhotos(u).then(m=>{d(m)}).catch(m=>a(m))}),z=({isModalView:u,onSelect:d})=>{const[a,m]=o.useState(""),[i,j]=o.useState([]),[g,f]=o.useState(0),[l,N]=o.useState(),[c,b]=o.useState(),[C,R]=o.useState(0),v=async s=>{let n=g+1;s&&(s.preventDefault(),n=1),f(n);const x={query:a,page:n};l&&(x.orientation=l),c&&(x.color=c),E(x).then(r=>{var S,q,y;j(n===1?((S=r==null?void 0:r.response)==null?void 0:S.results)||[]:[...i,...((q=r==null?void 0:r.response)==null?void 0:q.results)||[]]),R((y=r==null?void 0:r.response)==null?void 0:y.total_pages)}).catch(()=>{})};return o.useEffect(()=>{if(!p.isEmpty(a)){const s={query:a,page:1};l&&(s.orientation=l),c&&(s.color=c),f(1),E(s).then(n=>{var x,r;j(((x=n==null?void 0:n.response)==null?void 0:x.results)||[]),R((r=n==null?void 0:n.response)==null?void 0:r.total_pages)}).catch(()=>{})}},[l,c,a]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("form",{className:"flex items-center rounded-md border bg-gray-100 p-px",onSubmit:v,children:[e.jsxRuntimeExports.jsx(A.Input,{type:"text",name:"query",className:"input",placeholder:'Try "dog" or "apple"',value:a,onChange:s=>m(s.target.value)}),e.jsxRuntimeExports.jsxs(h.Popover,{children:[e.jsxRuntimeExports.jsx(h.PopoverTrigger,{asChild:!0,className:"h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200",children:e.jsxRuntimeExports.jsx(I.MixerHorizontalIcon,{})}),e.jsxRuntimeExports.jsx(h.PopoverContent,{side:u?"bottom":"right",className:"z-[9999] flex w-max items-center justify-center",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("div",{className:"py-1 text-sm font-medium",children:"Orientation"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:l,onValueChange:s=>N(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"landscape",children:"Landscape"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"portrait",children:"Portrait"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"squarish",children:"Square"})]})]}),e.jsxRuntimeExports.jsx("div",{className:"pb-1 pt-2 text-sm font-medium",children:"Color"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:c,onValueChange:s=>b(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),["black_and_white","black","white","yellow","orange","red","purple","magenta","green","teal","blue"].map(s=>e.jsxRuntimeExports.jsx(t.SelectItem,{value:s,children:p.startCase(s)},s))]})]})]})})]})]}),e.jsxRuntimeExports.jsxs(T.ScrollArea,{className:`h-full ${u&&!p.isEmpty(i)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[p.isEmpty(i)&&e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Data"}),e.jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),u?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:i.map(s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>d(s.urls.regular),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id))}):i.map(s=>e.jsxRuntimeExports.jsx("div",{className:"w-full px-2 py-1",children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id)),!p.isEmpty(i)&&g<C&&e.jsxRuntimeExports.jsx(P.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>v(void 0),children:"Load More"})]})]})};exports.default=z;exports.fetchImage=E;
@@ -4,7 +4,7 @@ import { isEmpty as h, startCase as k } from "lodash";
4
4
  import { MixerHorizontalIcon as z } from "@radix-ui/react-icons";
5
5
  import { createApi as D } from "unsplash-js";
6
6
  import { B as F } from "./useBuilderProp-81a14920.js";
7
- import { I as T } from "./link-0bfd8606.js";
7
+ import { I as T } from "./input-a0ea2bc7.js";
8
8
  import { S as V } from "./scroll-area-9f64a082.js";
9
9
  import { P as B, a as H, b as K } from "./popover-f7addcf4.js";
10
10
  import { S as C, c as S, b as w, d as P, f as m } from "./select-7fddd7c3.js";
@@ -16,28 +16,19 @@ import "tailwind-merge";
16
16
  import "@radix-ui/react-tooltip";
17
17
  import "@radix-ui/react-toast";
18
18
  import "jotai";
19
- import "react-icons-picker";
20
- import "react-dom";
21
- import "./dialog-3d4e82ed.js";
22
- import "@radix-ui/react-dialog";
23
- import "./ImagesPanel-6595528d.js";
24
- import "./tabs-85caa1e8.js";
25
- import "@radix-ui/react-tabs";
26
- import "react-quill";
27
- import "react-i18next";
28
19
  import "@radix-ui/react-scroll-area";
29
20
  import "@radix-ui/react-popover";
30
21
  import "@radix-ui/react-select";
31
- const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L }), I = async (p) => new Promise((x, r) => {
32
- O.search.getPhotos(p).then((d) => {
33
- x(d);
34
- }).catch((d) => r(d));
35
- }), ve = ({ isModalView: p, onSelect: x }) => {
36
- const [r, d] = c(""), [o, f] = c([]), [u, g] = c(0), [l, A] = c(), [i, E] = c(), [q, j] = c(0), v = async (s) => {
22
+ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L }), I = async (d) => new Promise((x, r) => {
23
+ O.search.getPhotos(d).then((p) => {
24
+ x(p);
25
+ }).catch((p) => r(p));
26
+ }), me = ({ isModalView: d, onSelect: x }) => {
27
+ const [r, p] = c(""), [o, f] = c([]), [u, g] = c(0), [l, A] = c(), [n, E] = c(), [q, j] = c(0), v = async (s) => {
37
28
  let t = u + 1;
38
29
  s && (s.preventDefault(), t = 1), g(t);
39
- const n = { query: r, page: t };
40
- l && (n.orientation = l), i && (n.color = i), I(n).then((a) => {
30
+ const i = { query: r, page: t };
31
+ l && (i.orientation = l), n && (i.color = n), I(i).then((a) => {
41
32
  var N, y, b;
42
33
  f(t === 1 ? ((N = a == null ? void 0 : a.response) == null ? void 0 : N.results) || [] : [...o, ...((y = a == null ? void 0 : a.response) == null ? void 0 : y.results) || []]), j((b = a == null ? void 0 : a.response) == null ? void 0 : b.total_pages);
43
34
  }).catch(() => {
@@ -46,13 +37,13 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
46
37
  return _(() => {
47
38
  if (!h(r)) {
48
39
  const s = { query: r, page: 1 };
49
- l && (s.orientation = l), i && (s.color = i), g(1), I(s).then((t) => {
50
- var n, a;
51
- f(((n = t == null ? void 0 : t.response) == null ? void 0 : n.results) || []), j((a = t == null ? void 0 : t.response) == null ? void 0 : a.total_pages);
40
+ l && (s.orientation = l), n && (s.color = n), g(1), I(s).then((t) => {
41
+ var i, a;
42
+ f(((i = t == null ? void 0 : t.response) == null ? void 0 : i.results) || []), j((a = t == null ? void 0 : t.response) == null ? void 0 : a.total_pages);
52
43
  }).catch(() => {
53
44
  });
54
45
  }
55
- }, [l, i, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
46
+ }, [l, n, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
56
47
  /* @__PURE__ */ e.jsxs("form", { className: "flex items-center rounded-md border bg-gray-100 p-px", onSubmit: v, children: [
57
48
  /* @__PURE__ */ e.jsx(
58
49
  T,
@@ -62,7 +53,7 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
62
53
  className: "input",
63
54
  placeholder: 'Try "dog" or "apple"',
64
55
  value: r,
65
- onChange: (s) => d(s.target.value)
56
+ onChange: (s) => p(s.target.value)
66
57
  }
67
58
  ),
68
59
  /* @__PURE__ */ e.jsxs(B, { children: [
@@ -70,7 +61,7 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
70
61
  /* @__PURE__ */ e.jsx(
71
62
  K,
72
63
  {
73
- side: p ? "bottom" : "right",
64
+ side: d ? "bottom" : "right",
74
65
  className: "z-[9999] flex w-max items-center justify-center",
75
66
  children: /* @__PURE__ */ e.jsxs("div", { children: [
76
67
  /* @__PURE__ */ e.jsx("div", { className: "py-1 text-sm font-medium", children: "Orientation" }),
@@ -84,7 +75,7 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
84
75
  ] })
85
76
  ] }),
86
77
  /* @__PURE__ */ e.jsx("div", { className: "pb-1 pt-2 text-sm font-medium", children: "Color" }),
87
- /* @__PURE__ */ e.jsxs(C, { defaultValue: i, onValueChange: (s) => E(s), children: [
78
+ /* @__PURE__ */ e.jsxs(C, { defaultValue: n, onValueChange: (s) => E(s), children: [
88
79
  /* @__PURE__ */ e.jsx(S, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(w, { placeholder: "Select" }) }),
89
80
  /* @__PURE__ */ e.jsxs(P, { className: "z-[9999]", children: [
90
81
  /* @__PURE__ */ e.jsx(m, { value: "", children: "All" }),
@@ -111,13 +102,13 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
111
102
  /* @__PURE__ */ e.jsxs(
112
103
  V,
113
104
  {
114
- className: `h-full ${p && !h(o) ? "-mx-2 flex flex-wrap px-2" : "-mx-2 flex flex-col pb-8 pt-2"}`,
105
+ className: `h-full ${d && !h(o) ? "-mx-2 flex flex-wrap px-2" : "-mx-2 flex flex-col pb-8 pt-2"}`,
115
106
  children: [
116
107
  h(o) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-6", children: [
117
108
  /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: "No Data" }),
118
109
  /* @__PURE__ */ e.jsx("div", { className: "text-sm text-gray-500", children: "Enter query and press enter" })
119
110
  ] }),
120
- p ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: o.map((s) => (
111
+ d ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: o.map((s) => (
121
112
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
122
113
  /* @__PURE__ */ e.jsx(
123
114
  "div",
@@ -155,6 +146,6 @@ const L = "phfFCfD_A95ICxvwEYsFxsgHD-1veFwGA4Cu8qxvcec", O = D({ accessKey: L })
155
146
  ] });
156
147
  };
157
148
  export {
158
- ve as default,
149
+ me as default,
159
150
  I as fetchImage
160
151
  };