@chaibuilder/sdk 1.0.10 → 1.0.12

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 (86) hide show
  1. package/dist/AddBlocks-7ACJv8LW.cjs +3 -0
  2. package/dist/{AddBlocks-xR2s2BVa.js → AddBlocks-H7BZYHUC.js} +30 -30
  3. package/dist/BrandingOptions-5j-XszLM.cjs +1 -0
  4. package/dist/{BrandingOptions-cHK2bVZy.js → BrandingOptions-PAgY-kvj.js} +13 -12
  5. package/dist/{CanvasArea-Br8bBSeT.cjs → CanvasArea-Dnm-yeus.cjs} +2 -2
  6. package/dist/{CanvasArea-2zqT1lSE.js → CanvasArea-zn2ox-5h.js} +6 -6
  7. package/dist/{ChaiBuilderEditor-SacH75l4.cjs → ChaiBuilderEditor-BoE-sArB.cjs} +2 -2
  8. package/dist/{ChaiBuilderEditor-h9bXC4l-.js → ChaiBuilderEditor-hEuUONQ3.js} +2 -2
  9. package/dist/{CurrentPage-4lTETR2f.js → CurrentPage-6Jp4xAWK.js} +3 -3
  10. package/dist/CurrentPage-YMpqOqx7.cjs +1 -0
  11. package/dist/Layers-EzOZdWvd.cjs +1 -0
  12. package/dist/{Layers-wOfijZnb.js → Layers-WkZ48AUm.js} +5 -5
  13. package/dist/{MarkAsGlobalBlock-xRyn29gC.js → MarkAsGlobalBlock-0HubcRkY.js} +3 -3
  14. package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +1 -0
  15. package/dist/{PagesPanel-82gCVzHS.js → PagesPanel-6JuwBLFQ.js} +4 -4
  16. package/dist/PagesPanel-zJq8p1ja.cjs +1 -0
  17. package/dist/ProjectPanel-Zml2F8b9.cjs +1 -0
  18. package/dist/{ProjectPanel-vz5WOyqZ.js → ProjectPanel-cu2QSDW9.js} +4 -4
  19. package/dist/{Settings-IuAF359L.js → Settings-fH8fZKpm.js} +70 -69
  20. package/dist/Settings-lc9PfnmG.cjs +1 -0
  21. package/dist/SidePanels-VH72zFE2.cjs +1 -0
  22. package/dist/{SidePanels-xssTWt4M.js → SidePanels-w8ZHKJaR.js} +3 -3
  23. package/dist/{Topbar-H0f0EL6-.js → Topbar-hm1D_5sb.js} +2 -2
  24. package/dist/Topbar-vQPo9xSY.cjs +1 -0
  25. package/dist/add-page-modal--qZSwJuB.cjs +1 -0
  26. package/dist/{add-page-modal-J1E7rh1U.js → add-page-modal-bj7qbZuK.js} +6 -5
  27. package/dist/controls-W97-POR_.cjs +1 -0
  28. package/dist/controls-enQY7NI8.js +118 -0
  29. package/dist/core.cjs +1 -1
  30. package/dist/core.js +9 -9
  31. package/dist/delete-page-modal-2LuDLEiP.cjs +1 -0
  32. package/dist/{delete-page-modal-ysj4O0bM.js → delete-page-modal-cnrR8tWH.js} +3 -3
  33. package/dist/index-HAue58ea.cjs +1 -0
  34. package/dist/{index-cZ4uo6aT.js → index-T4_wfKl5.js} +2 -2
  35. package/dist/{index-8L3zCc6V.cjs → index-X9ZgD09V.cjs} +1 -1
  36. package/dist/index-ehKdBRUK.js +18 -0
  37. package/dist/lib.cjs +1 -1
  38. package/dist/lib.d.ts +65 -0
  39. package/dist/lib.js +117 -57
  40. package/dist/page-viewer-IARz6OSp.cjs +1 -0
  41. package/dist/{page-viewer-84Giu0Rs.js → page-viewer-Y4YiaZ_m.js} +4 -4
  42. package/dist/{project-general-setting-8OEVVxzn.js → project-general-setting-U4S_KlhU.js} +13 -12
  43. package/dist/project-general-setting-eSl3t-VH.cjs +1 -0
  44. package/dist/{project-seo-setting-9kD_stdI.js → project-seo-setting-Ga9v_ECU.js} +7 -7
  45. package/dist/project-seo-setting-rankm1z3.cjs +1 -0
  46. package/dist/render.cjs +1 -1
  47. package/dist/render.js +34 -34
  48. package/dist/server.cjs +1 -1
  49. package/dist/server.js +1 -1
  50. package/dist/{single-page-detail-iXpavDy8.js → single-page-detail-pAxCy_Pe.js} +43 -42
  51. package/dist/single-page-detail-yPgnu2AI.cjs +1 -0
  52. package/dist/studio.cjs +1 -1
  53. package/dist/studio.js +3 -3
  54. package/dist/ui.cjs +1 -1
  55. package/dist/ui.d.ts +4 -69
  56. package/dist/ui.js +208 -267
  57. package/dist/{useAddBlock-BOjrGBEO.js → useAddBlock-WJc3OgG8.js} +2 -2
  58. package/dist/{useAddBlock-1cMXaOVk.cjs → useAddBlock-dCKRFPRU.cjs} +1 -1
  59. package/dist/{useAllBlocks-RU_Xw8j9.cjs → useAllBlocks-6hvuNuyw.cjs} +1 -1
  60. package/dist/{useAllBlocks-lX6uVO39.js → useAllBlocks-PQKYvs-e.js} +1 -1
  61. package/dist/{useDarkMode-JWkrNFpH.js → useDarkMode-ZKCO_gkt.js} +1 -1
  62. package/dist/{useDarkMode-zeTW_UUR.cjs → useDarkMode-dV6FM6l-.cjs} +1 -1
  63. package/dist/{useFeatureSupport-jWSuY7wk.js → useFeatureSupport-OLwNgEZb.js} +1 -1
  64. package/dist/{useFeatureSupport-tZ0QfBxp.cjs → useFeatureSupport-c9IgPW2t.cjs} +1 -1
  65. package/dist/{useLanguage-Y3qgAbgG.cjs → useLanguage-NKKKaxVM.cjs} +1 -1
  66. package/dist/{useLanguage-O1uu2Bzu.js → useLanguage-gVC5rxO5.js} +2 -2
  67. package/dist/{useMarkAsGlobalBlock-DB5B1UP6.js → useMarkAsGlobalBlock-X73Vny8u.js} +2 -2
  68. package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +1 -0
  69. package/package.json +2 -2
  70. package/dist/AddBlocks-tdvDe7xL.cjs +0 -3
  71. package/dist/BrandingOptions-DpJ-oNnf.cjs +0 -1
  72. package/dist/CurrentPage-nlUWJiUA.cjs +0 -1
  73. package/dist/Layers-Vw4XE6YB.cjs +0 -1
  74. package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +0 -1
  75. package/dist/PagesPanel-ZKRdK-mI.cjs +0 -1
  76. package/dist/ProjectPanel-kYg4KkJu.cjs +0 -1
  77. package/dist/Settings-1E3Y_5r6.cjs +0 -1
  78. package/dist/SidePanels-WL1UioF2.cjs +0 -1
  79. package/dist/Topbar-3ozdWfSy.cjs +0 -1
  80. package/dist/add-page-modal-eiiUZCJX.cjs +0 -1
  81. package/dist/delete-page-modal-TGTmRjyn.cjs +0 -1
  82. package/dist/page-viewer-OdVEG83P.cjs +0 -1
  83. package/dist/project-general-setting-laHNQPW5.cjs +0 -1
  84. package/dist/project-seo-setting-F3Opt9Uj.cjs +0 -1
  85. package/dist/single-page-detail-X0TGlsT4.cjs +0 -1
  86. package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +0 -1
package/dist/ui.js CHANGED
@@ -1,26 +1,26 @@
1
- import { T as we, t as Te } from "./toggle-ASJRAaGP.js";
2
- import { D as De, f as je, d as Ie, k as Re, e as Ae, h as ke, l as Le, p as Pe, g as Fe, i as Ee, j as Ge, m as He, n as ze, o as Ue, c as Ve, H as Be, b as Oe, a as qe, S as Je } from "./dropdown-menu-S03K_fNs.js";
3
- import { B as Qe, S as We, g as Xe, T as Ye, c as Ze, e as _e, d as $e, a as ea, b as aa, r as ta, t as oa, f as ra } from "./skeleton-CU_FIbg3.js";
4
- import { A as na, c as da, a as ia, b as la } from "./accordion-oPUeqPCZ.js";
5
- import { A as ma, b as pa, a as ua, C as fa, g as ga, f as xa, d as ba, c as ha, e as va, T as ya } from "./textarea-b2QvVhrK.js";
6
- import { j as t } from "./jsx-runtime-Sp0orL4X.js";
7
- import { cva as c } from "class-variance-authority";
8
- import { c as s } from "./utils-dze1SGvB.js";
9
- import { A as Na, g as Sa, h as wa, b as Ta, f as Ma, d as Da, c as ja, e as Ia, a as Ra } from "./alert-dialog-GNfnpqFB.js";
10
- import { D as ka, b as La, f as Pa, d as Fa, c as Ea, e as Ga, a as Ha } from "./dialog-jrw9DF1f.js";
11
- import { C as Ua, a as Va, d as Ba, e as Oa, b as qa, f as Ja, c as Ka, h as Qa, g as Wa, I as Xa } from "./command-VHca6CcN.js";
12
- import { L as Za } from "./label-KaP7MRrs.js";
13
- import { S as $a, a as et } from "./scroll-area-ewXbxc3n.js";
14
- import { T as tt, c as ot, a as rt, b as st } from "./tabs-Gb9v5dVb.js";
15
- import { P as dt, b as it, a as lt } from "./popover-a84pbVhQ.js";
16
- import * as d from "react";
1
+ import { T as we, t as Me } from "./toggle-ASJRAaGP.js";
2
+ import { D as ve, f as De, d as je, k as Ie, e as Re, h as Ae, l as ke, p as Pe, g as Le, i as Fe, j as Ge, m as He, n as ze, o as Ve, c as Be, H as Ee, b as Oe, a as qe, S as Je } from "./dropdown-menu-S03K_fNs.js";
3
+ import { B as Qe, S as Ue, g as We, T as Xe, c as Ye, e as Ze, d as _e, a as $e, b as et, r as tt, t as at, f as ot } from "./skeleton-CU_FIbg3.js";
4
+ import { A as rt, c as nt, a as it, b as dt } from "./accordion-oPUeqPCZ.js";
5
+ import { A as mt, b as ct, a as pt, C as ut, g as ft, f as gt, d as xt, c as bt, e as ht, T as Ct } from "./textarea-b2QvVhrK.js";
6
+ import { j as a } from "./jsx-runtime-Sp0orL4X.js";
7
+ import { cva as m } from "class-variance-authority";
8
+ import { c as r } from "./utils-dze1SGvB.js";
9
+ import { A as Nt, g as St, h as wt, b as Mt, f as Tt, d as vt, c as Dt, e as jt, a as It } from "./alert-dialog-GNfnpqFB.js";
10
+ import { D as At, b as kt, f as Pt, d as Lt, c as Ft, e as Gt, a as Ht } from "./dialog-jrw9DF1f.js";
11
+ import { C as Vt, a as Bt, d as Et, e as Ot, b as qt, f as Jt, c as Kt, h as Qt, g as Ut, I as Wt } from "./command-VHca6CcN.js";
12
+ import { L as Yt } from "./label-KaP7MRrs.js";
13
+ import { S as _t, a as $t } from "./scroll-area-ewXbxc3n.js";
14
+ import { T as ta, c as aa, a as oa, b as sa } from "./tabs-Gb9v5dVb.js";
15
+ import { P as na, b as ia, a as da } from "./popover-a84pbVhQ.js";
16
+ import * as i from "react";
17
17
  import { ChevronRightIcon as f, CheckIcon as g, DotFilledIcon as x, Cross2Icon as b } from "@radix-ui/react-icons";
18
- import * as r from "@radix-ui/react-menubar";
19
- import { S as mt, d as pt, a as ut, f as ft, e as gt, g as xt, c as bt, b as ht } from "./select-POGdEDHT.js";
18
+ import * as s from "@radix-ui/react-menubar";
19
+ import { S as ma, d as ca, a as pa, f as ua, e as fa, g as ga, c as xa, b as ba } from "./select-POGdEDHT.js";
20
20
  import * as n from "@radix-ui/react-dialog";
21
- import { S as yt } from "./separator-SctTn0Qi.js";
22
- import { C as Nt, d as St, b as wt, i as Tt, c as Mt, f as Dt, j as jt, n as It, e as Rt, g as At, h as kt, k as Lt, l as Pt, m as Ft, a as Et } from "./context-menu-8dC9uGXj.js";
23
- import { I as Ht, a as zt, L as Ut, R as Vt } from "./link-6o6n2Tnd.js";
21
+ import { S as Ca } from "./separator-SctTn0Qi.js";
22
+ import { C as Na, d as Sa, b as wa, i as Ma, c as Ta, f as va, j as Da, n as ja, e as Ia, g as Ra, h as Aa, k as ka, l as Pa, m as La, a as Fa } from "./context-menu-8dC9uGXj.js";
23
+ import { I as Ha, a as za, L as Va, R as Ba } from "./link-6o6n2Tnd.js";
24
24
  import "@radix-ui/react-toggle";
25
25
  import "@radix-ui/react-switch";
26
26
  import "@radix-ui/react-hover-card";
@@ -47,7 +47,7 @@ import "react-dom";
47
47
  import "./ImagesPanel-oaHOD-Ex.js";
48
48
  import "react-quill";
49
49
  import "react-i18next";
50
- const h = c(
50
+ const h = m(
51
51
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
52
52
  {
53
53
  variants: {
@@ -62,145 +62,145 @@ const h = c(
62
62
  variant: "default"
63
63
  }
64
64
  }
65
- ), pe = ({ className: e, variant: a, ...o }) => /* @__PURE__ */ t.jsx("div", { className: s(h({ variant: a }), e), ...o }), ue = r.Menu, fe = r.Group, ge = r.Portal, xe = r.Sub, be = r.RadioGroup, v = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
66
- r.Root,
65
+ ), pe = ({ className: e, variant: t, ...o }) => /* @__PURE__ */ a.jsx("div", { className: r(h({ variant: t }), e), ...o }), ue = s.Menu, fe = s.Group, ge = s.Portal, xe = s.Sub, be = s.RadioGroup, C = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
66
+ s.Root,
67
67
  {
68
68
  ref: o,
69
- className: s("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
70
- ...a
69
+ className: r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
70
+ ...t
71
71
  }
72
72
  ));
73
- v.displayName = r.Root.displayName;
74
- const y = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
75
- r.Trigger,
73
+ C.displayName = s.Root.displayName;
74
+ const y = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
75
+ s.Trigger,
76
76
  {
77
77
  ref: o,
78
- className: s(
78
+ className: r(
79
79
  "flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
80
80
  e
81
81
  ),
82
- ...a
82
+ ...t
83
83
  }
84
84
  ));
85
- y.displayName = r.Trigger.displayName;
86
- const C = d.forwardRef(({ className: e, inset: a, children: o, ...i }, l) => /* @__PURE__ */ t.jsxs(
87
- r.SubTrigger,
85
+ y.displayName = s.Trigger.displayName;
86
+ const N = i.forwardRef(({ className: e, inset: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
87
+ s.SubTrigger,
88
88
  {
89
89
  ref: l,
90
- className: s(
90
+ className: r(
91
91
  "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
92
- a && "pl-8",
92
+ t && "pl-8",
93
93
  e
94
94
  ),
95
- ...i,
95
+ ...d,
96
96
  children: [
97
97
  o,
98
- /* @__PURE__ */ t.jsx(f, { className: "ml-auto h-4 w-4" })
98
+ /* @__PURE__ */ a.jsx(f, { className: "ml-auto h-4 w-4" })
99
99
  ]
100
100
  }
101
101
  ));
102
- C.displayName = r.SubTrigger.displayName;
103
- const N = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
104
- r.SubContent,
102
+ N.displayName = s.SubTrigger.displayName;
103
+ const S = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
104
+ s.SubContent,
105
105
  {
106
106
  ref: o,
107
- className: s(
107
+ className: r(
108
108
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
109
109
  e
110
110
  ),
111
- ...a
111
+ ...t
112
112
  }
113
113
  ));
114
- N.displayName = r.SubContent.displayName;
115
- const S = d.forwardRef(({ className: e, align: a = "start", alignOffset: o = -4, sideOffset: i = 8, ...l }, u) => /* @__PURE__ */ t.jsx(r.Portal, { children: /* @__PURE__ */ t.jsx(
116
- r.Content,
114
+ S.displayName = s.SubContent.displayName;
115
+ const w = i.forwardRef(({ className: e, align: t = "start", alignOffset: o = -4, sideOffset: d = 8, ...l }, u) => /* @__PURE__ */ a.jsx(s.Portal, { children: /* @__PURE__ */ a.jsx(
116
+ s.Content,
117
117
  {
118
118
  ref: u,
119
- align: a,
119
+ align: t,
120
120
  alignOffset: o,
121
- sideOffset: i,
122
- className: s(
121
+ sideOffset: d,
122
+ className: r(
123
123
  "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
124
124
  e
125
125
  ),
126
126
  ...l
127
127
  }
128
128
  ) }));
129
- S.displayName = r.Content.displayName;
130
- const w = d.forwardRef(({ className: e, inset: a, ...o }, i) => /* @__PURE__ */ t.jsx(
131
- r.Item,
129
+ w.displayName = s.Content.displayName;
130
+ const M = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
131
+ s.Item,
132
132
  {
133
- ref: i,
134
- className: s(
133
+ ref: d,
134
+ className: r(
135
135
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
136
- a && "pl-8",
136
+ t && "pl-8",
137
137
  e
138
138
  ),
139
139
  ...o
140
140
  }
141
141
  ));
142
- w.displayName = r.Item.displayName;
143
- const T = d.forwardRef(({ className: e, children: a, checked: o, ...i }, l) => /* @__PURE__ */ t.jsxs(
144
- r.CheckboxItem,
142
+ M.displayName = s.Item.displayName;
143
+ const T = i.forwardRef(({ className: e, children: t, checked: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
144
+ s.CheckboxItem,
145
145
  {
146
146
  ref: l,
147
- className: s(
147
+ className: r(
148
148
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
149
149
  e
150
150
  ),
151
151
  checked: o,
152
- ...i,
152
+ ...d,
153
153
  children: [
154
- /* @__PURE__ */ t.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(r.ItemIndicator, { children: /* @__PURE__ */ t.jsx(g, { className: "h-4 w-4" }) }) }),
155
- a
154
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(g, { className: "h-4 w-4" }) }) }),
155
+ t
156
156
  ]
157
157
  }
158
158
  ));
159
- T.displayName = r.CheckboxItem.displayName;
160
- const M = d.forwardRef(({ className: e, children: a, ...o }, i) => /* @__PURE__ */ t.jsxs(
161
- r.RadioItem,
159
+ T.displayName = s.CheckboxItem.displayName;
160
+ const v = i.forwardRef(({ className: e, children: t, ...o }, d) => /* @__PURE__ */ a.jsxs(
161
+ s.RadioItem,
162
162
  {
163
- ref: i,
164
- className: s(
163
+ ref: d,
164
+ className: r(
165
165
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
166
166
  e
167
167
  ),
168
168
  ...o,
169
169
  children: [
170
- /* @__PURE__ */ t.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(r.ItemIndicator, { children: /* @__PURE__ */ t.jsx(x, { className: "h-4 w-4 fill-current" }) }) }),
171
- a
170
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(x, { className: "h-4 w-4 fill-current" }) }) }),
171
+ t
172
172
  ]
173
173
  }
174
174
  ));
175
- M.displayName = r.RadioItem.displayName;
176
- const D = d.forwardRef(({ className: e, inset: a, ...o }, i) => /* @__PURE__ */ t.jsx(
177
- r.Label,
175
+ v.displayName = s.RadioItem.displayName;
176
+ const D = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
177
+ s.Label,
178
178
  {
179
- ref: i,
180
- className: s("px-2 py-1.5 text-sm font-semibold", a && "pl-8", e),
179
+ ref: d,
180
+ className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
181
181
  ...o
182
182
  }
183
183
  ));
184
- D.displayName = r.Label.displayName;
185
- const j = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(r.Separator, { ref: o, className: s("-mx-1 my-1 h-px bg-muted", e), ...a }));
186
- j.displayName = r.Separator.displayName;
187
- const I = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("span", { className: s("ml-auto text-xs tracking-widest text-muted-foreground", e), ...a });
184
+ D.displayName = s.Label.displayName;
185
+ const j = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(s.Separator, { ref: o, className: r("-mx-1 my-1 h-px bg-muted", e), ...t }));
186
+ j.displayName = s.Separator.displayName;
187
+ const I = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
188
188
  I.displayname = "MenubarShortcut";
189
- const he = n.Root, ve = n.Trigger, ye = n.Close, m = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx(n.Portal, { className: s(e), ...a });
190
- m.displayName = n.Portal.displayName;
191
- const p = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
189
+ const he = n.Root, Ce = n.Trigger, ye = n.Close, c = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(n.Portal, { className: r(e), ...t });
190
+ c.displayName = n.Portal.displayName;
191
+ const p = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
192
192
  n.Overlay,
193
193
  {
194
- className: s(
194
+ className: r(
195
195
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
196
196
  e
197
197
  ),
198
- ...a,
198
+ ...t,
199
199
  ref: o
200
200
  }
201
201
  ));
202
202
  p.displayName = n.Overlay.displayName;
203
- const R = c(
203
+ const R = m(
204
204
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
205
205
  {
206
206
  variants: {
@@ -215,222 +215,163 @@ const R = c(
215
215
  side: "right"
216
216
  }
217
217
  }
218
- ), A = d.forwardRef(
219
- ({ side: e = "right", className: a, children: o, ...i }, l) => /* @__PURE__ */ t.jsxs(m, { children: [
220
- /* @__PURE__ */ t.jsx(p, {}),
221
- /* @__PURE__ */ t.jsxs(n.Content, { ref: l, className: s(R({ side: e }), a), ...i, children: [
218
+ ), A = i.forwardRef(
219
+ ({ side: e = "right", className: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(c, { children: [
220
+ /* @__PURE__ */ a.jsx(p, {}),
221
+ /* @__PURE__ */ a.jsxs(n.Content, { ref: l, className: r(R({ side: e }), t), ...d, children: [
222
222
  o,
223
- /* @__PURE__ */ t.jsxs(n.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
224
- /* @__PURE__ */ t.jsx(b, { className: "h-4 w-4" }),
225
- /* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Close" })
223
+ /* @__PURE__ */ a.jsxs(n.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
224
+ /* @__PURE__ */ a.jsx(b, { className: "h-4 w-4" }),
225
+ /* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
226
226
  ] })
227
227
  ] })
228
228
  ] })
229
229
  );
230
230
  A.displayName = n.Content.displayName;
231
- const k = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("div", { className: s("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
231
+ const k = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
232
232
  k.displayName = "SheetHeader";
233
- const L = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("div", { className: s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
234
- L.displayName = "SheetFooter";
235
- const P = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(n.Title, { ref: o, className: s("text-lg font-semibold text-foreground", e), ...a }));
236
- P.displayName = n.Title.displayName;
237
- const F = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(n.Description, { ref: o, className: s("text-sm text-muted-foreground", e), ...a }));
233
+ const P = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
234
+ P.displayName = "SheetFooter";
235
+ const L = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Title, { ref: o, className: r("text-lg font-semibold text-foreground", e), ...t }));
236
+ L.displayName = n.Title.displayName;
237
+ const F = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Description, { ref: o, className: r("text-sm text-muted-foreground", e), ...t }));
238
238
  F.displayName = n.Description.displayName;
239
- function Ce() {
240
- return {
241
- colors: {
242
- border: "hsl(var(--border))",
243
- input: "hsl(var(--input))",
244
- ring: "hsl(var(--ring))",
245
- background: "hsl(var(--background))",
246
- foreground: "hsl(var(--foreground))",
247
- primary: {
248
- DEFAULT: "hsl(var(--primary))",
249
- foreground: "hsl(var(--primary-foreground))"
250
- },
251
- secondary: {
252
- DEFAULT: "hsl(var(--secondary))",
253
- foreground: "hsl(var(--secondary-foreground))"
254
- },
255
- destructive: {
256
- DEFAULT: "hsl(var(--destructive))",
257
- foreground: "hsl(var(--destructive-foreground))"
258
- },
259
- muted: {
260
- DEFAULT: "hsl(var(--muted))",
261
- foreground: "hsl(var(--muted-foreground))"
262
- },
263
- accent: {
264
- DEFAULT: "hsl(var(--accent))",
265
- foreground: "hsl(var(--accent-foreground))"
266
- },
267
- popover: {
268
- DEFAULT: "hsl(var(--popover))",
269
- foreground: "hsl(var(--popover-foreground))"
270
- },
271
- card: {
272
- DEFAULT: "hsl(var(--card))",
273
- foreground: "hsl(var(--card-foreground))"
274
- }
275
- },
276
- borderRadius: {
277
- lg: "var(--radius)",
278
- md: "calc(var(--radius) - 2px)",
279
- sm: "calc(var(--radius) - 4px)"
280
- },
281
- keyframes: {
282
- "accordion-down": {
283
- from: { height: "0" },
284
- to: { height: "var(--radix-accordion-content-height)" }
285
- },
286
- "accordion-up": {
287
- from: { height: "var(--radix-accordion-content-height)" },
288
- to: { height: "0" }
289
- }
290
- },
291
- animation: {
292
- "accordion-down": "accordion-down 0.2s ease-out",
293
- "accordion-up": "accordion-up 0.2s ease-out"
294
- }
295
- };
296
- }
297
239
  export {
298
- na as Accordion,
299
- da as AccordionContent,
300
- ia as AccordionItem,
301
- la as AccordionTrigger,
302
- ma as Alert,
303
- pa as AlertDescription,
304
- Na as AlertDialog,
305
- Sa as AlertDialogAction,
306
- wa as AlertDialogCancel,
307
- Ta as AlertDialogContent,
308
- Ma as AlertDialogDescription,
309
- Da as AlertDialogFooter,
310
- ja as AlertDialogHeader,
311
- Ia as AlertDialogTitle,
312
- Ra as AlertDialogTrigger,
313
- ua as AlertTitle,
240
+ rt as Accordion,
241
+ nt as AccordionContent,
242
+ it as AccordionItem,
243
+ dt as AccordionTrigger,
244
+ mt as Alert,
245
+ ct as AlertDescription,
246
+ Nt as AlertDialog,
247
+ St as AlertDialogAction,
248
+ wt as AlertDialogCancel,
249
+ Mt as AlertDialogContent,
250
+ Tt as AlertDialogDescription,
251
+ vt as AlertDialogFooter,
252
+ Dt as AlertDialogHeader,
253
+ jt as AlertDialogTitle,
254
+ It as AlertDialogTrigger,
255
+ pt as AlertTitle,
314
256
  pe as Badge,
315
257
  Qe as Button,
316
- fa as Card,
317
- ga as CardContent,
318
- xa as CardDescription,
319
- ba as CardFooter,
320
- ha as CardHeader,
321
- va as CardTitle,
322
- Ua as Command,
323
- Va as CommandDialog,
324
- Ba as CommandEmpty,
325
- Oa as CommandGroup,
326
- qa as CommandInput,
327
- Ja as CommandItem,
328
- Ka as CommandList,
329
- Qa as CommandSeparator,
330
- Wa as CommandShortcut,
331
- Nt as ContextMenu,
332
- St as ContextMenuCheckboxItem,
333
- wt as ContextMenuContent,
334
- Tt as ContextMenuGroup,
335
- Mt as ContextMenuItem,
336
- Dt as ContextMenuLabel,
337
- jt as ContextMenuPortal,
338
- It as ContextMenuRadioGroup,
339
- Rt as ContextMenuRadioItem,
340
- At as ContextMenuSeparator,
341
- kt as ContextMenuShortcut,
342
- Lt as ContextMenuSub,
343
- Pt as ContextMenuSubContent,
344
- Ft as ContextMenuSubTrigger,
345
- Et as ContextMenuTrigger,
346
- ka as Dialog,
347
- La as DialogContent,
348
- Pa as DialogDescription,
349
- Fa as DialogFooter,
350
- Ea as DialogHeader,
351
- Ga as DialogTitle,
352
- Ha as DialogTrigger,
353
- De as DropdownMenu,
354
- je as DropdownMenuCheckboxItem,
355
- Ie as DropdownMenuContent,
356
- Re as DropdownMenuGroup,
357
- Ae as DropdownMenuItem,
358
- ke as DropdownMenuLabel,
359
- Le as DropdownMenuPortal,
258
+ ut as Card,
259
+ ft as CardContent,
260
+ gt as CardDescription,
261
+ xt as CardFooter,
262
+ bt as CardHeader,
263
+ ht as CardTitle,
264
+ Vt as Command,
265
+ Bt as CommandDialog,
266
+ Et as CommandEmpty,
267
+ Ot as CommandGroup,
268
+ qt as CommandInput,
269
+ Jt as CommandItem,
270
+ Kt as CommandList,
271
+ Qt as CommandSeparator,
272
+ Ut as CommandShortcut,
273
+ Na as ContextMenu,
274
+ Sa as ContextMenuCheckboxItem,
275
+ wa as ContextMenuContent,
276
+ Ma as ContextMenuGroup,
277
+ Ta as ContextMenuItem,
278
+ va as ContextMenuLabel,
279
+ Da as ContextMenuPortal,
280
+ ja as ContextMenuRadioGroup,
281
+ Ia as ContextMenuRadioItem,
282
+ Ra as ContextMenuSeparator,
283
+ Aa as ContextMenuShortcut,
284
+ ka as ContextMenuSub,
285
+ Pa as ContextMenuSubContent,
286
+ La as ContextMenuSubTrigger,
287
+ Fa as ContextMenuTrigger,
288
+ At as Dialog,
289
+ kt as DialogContent,
290
+ Pt as DialogDescription,
291
+ Lt as DialogFooter,
292
+ Ft as DialogHeader,
293
+ Gt as DialogTitle,
294
+ Ht as DialogTrigger,
295
+ ve as DropdownMenu,
296
+ De as DropdownMenuCheckboxItem,
297
+ je as DropdownMenuContent,
298
+ Ie as DropdownMenuGroup,
299
+ Re as DropdownMenuItem,
300
+ Ae as DropdownMenuLabel,
301
+ ke as DropdownMenuPortal,
360
302
  Pe as DropdownMenuRadioGroup,
361
- Fe as DropdownMenuRadioItem,
362
- Ee as DropdownMenuSeparator,
303
+ Le as DropdownMenuRadioItem,
304
+ Fe as DropdownMenuSeparator,
363
305
  Ge as DropdownMenuShortcut,
364
306
  He as DropdownMenuSub,
365
307
  ze as DropdownMenuSubContent,
366
- Ue as DropdownMenuSubTrigger,
367
- Ve as DropdownMenuTrigger,
368
- Be as HoverCard,
308
+ Ve as DropdownMenuSubTrigger,
309
+ Be as DropdownMenuTrigger,
310
+ Ee as HoverCard,
369
311
  Oe as HoverCardContent,
370
312
  qe as HoverCardTrigger,
371
- Ht as IconPickerField,
372
- zt as ImagePickerField,
373
- Xa as Input,
374
- Za as Label,
375
- Ut as LinkField,
376
- v as Menubar,
313
+ Ha as IconPickerField,
314
+ za as ImagePickerField,
315
+ Wt as Input,
316
+ Yt as Label,
317
+ Va as LinkField,
318
+ C as Menubar,
377
319
  T as MenubarCheckboxItem,
378
- S as MenubarContent,
320
+ w as MenubarContent,
379
321
  fe as MenubarGroup,
380
- w as MenubarItem,
322
+ M as MenubarItem,
381
323
  D as MenubarLabel,
382
324
  ue as MenubarMenu,
383
325
  ge as MenubarPortal,
384
326
  be as MenubarRadioGroup,
385
- M as MenubarRadioItem,
327
+ v as MenubarRadioItem,
386
328
  j as MenubarSeparator,
387
329
  I as MenubarShortcut,
388
330
  xe as MenubarSub,
389
- N as MenubarSubContent,
390
- C as MenubarSubTrigger,
331
+ S as MenubarSubContent,
332
+ N as MenubarSubTrigger,
391
333
  y as MenubarTrigger,
392
- dt as Popover,
393
- it as PopoverContent,
394
- lt as PopoverTrigger,
395
- Vt as RTEField,
396
- $a as ScrollArea,
397
- et as ScrollBar,
398
- mt as Select,
399
- pt as SelectContent,
400
- ut as SelectGroup,
401
- ft as SelectItem,
402
- gt as SelectLabel,
403
- xt as SelectSeparator,
404
- bt as SelectTrigger,
405
- ht as SelectValue,
406
- yt as Separator,
334
+ na as Popover,
335
+ ia as PopoverContent,
336
+ da as PopoverTrigger,
337
+ Ba as RTEField,
338
+ _t as ScrollArea,
339
+ $t as ScrollBar,
340
+ ma as Select,
341
+ ca as SelectContent,
342
+ pa as SelectGroup,
343
+ ua as SelectItem,
344
+ fa as SelectLabel,
345
+ ga as SelectSeparator,
346
+ xa as SelectTrigger,
347
+ ba as SelectValue,
348
+ Ca as Separator,
407
349
  he as Sheet,
408
350
  ye as SheetClose,
409
351
  A as SheetContent,
410
352
  F as SheetDescription,
411
- L as SheetFooter,
353
+ P as SheetFooter,
412
354
  k as SheetHeader,
413
- P as SheetTitle,
414
- ve as SheetTrigger,
415
- We as Skeleton,
355
+ L as SheetTitle,
356
+ Ce as SheetTrigger,
357
+ Ue as Skeleton,
416
358
  Je as Switch,
417
- tt as Tabs,
418
- ot as TabsContent,
419
- rt as TabsList,
420
- st as TabsTrigger,
421
- ya as Textarea,
422
- Xe as Toaster,
359
+ ta as Tabs,
360
+ aa as TabsContent,
361
+ oa as TabsList,
362
+ sa as TabsTrigger,
363
+ Ct as Textarea,
364
+ We as Toaster,
423
365
  we as Toggle,
424
- Ye as Tooltip,
425
- Ze as TooltipContent,
426
- _e as TooltipPortal,
427
- $e as TooltipProvider,
428
- ea as TooltipTrigger,
366
+ Xe as Tooltip,
367
+ Ye as TooltipContent,
368
+ Ze as TooltipPortal,
369
+ _e as TooltipProvider,
370
+ $e as TooltipTrigger,
429
371
  h as badgeVariants,
430
- aa as buttonVariants,
431
- Ce as chaiBuilderTheme,
432
- ta as reducer,
433
- oa as toast,
434
- Te as toggleVariants,
435
- ra as useToast
372
+ et as buttonVariants,
373
+ tt as reducer,
374
+ at as toast,
375
+ Me as toggleVariants,
376
+ ot as useToast
436
377
  };
@@ -1,8 +1,8 @@
1
1
  import { useCallback as x } from "react";
2
2
  import { findIndex as l, filter as P, isEmpty as j, last as J, find as A, first as S, has as K, forIn as L, startsWith as O } from "lodash";
3
- import { J as T, l as W } from "./ChaiBuilderEditor-h9bXC4l-.js";
3
+ import { J as T, l as W } from "./ChaiBuilderEditor-hEuUONQ3.js";
4
4
  import { g } from "./functions-pcUZhFJM.js";
5
- import { u as Y, d as C } from "./useAllBlocks-lX6uVO39.js";
5
+ import { u as Y, d as C } from "./useAllBlocks-PQKYvs-e.js";
6
6
  import { b as q } from "./controls-Ni5kEzLz.js";
7
7
  import { a as D } from "./MODIFIERS-DsEzQ3aH.js";
8
8
  function E(e, s, d, o, h) {
@@ -1 +1 @@
1
- "use strict";const S=require("react"),n=require("lodash"),q=require("./ChaiBuilderEditor-SacH75l4.cjs"),C=require("./functions-uw7QP2kT.cjs"),x=require("./useAllBlocks-RU_Xw8j9.cjs"),D=require("./controls-xUKa23ic.cjs"),I=require("./MODIFIERS-Fx6WAZcw.cjs");function g(e,i,u,o,A){if(i===null)return[...e,...o];if(u!==null){const r=n.findIndex(e,{_parent:i}),c=(r===-1?0:r)+u;return e.splice(c,0,...o),e}if(!A){const c=n.findIndex(e,{_id:i})+1;return e.splice(c,0,...o),e}let t=n.findIndex(e,{_id:i});const s=n.filter(e,{_parent:i});n.isEmpty(s)||(t=n.findIndex(e,{_id:n.last(s)._id}));const p=t+1;return e.splice(p,0,...o),e}const E=()=>{const e=q.useDispatch(),i=x.useAllBlocks(),[,u]=q.useSelectedBlockIds(),o=S.useCallback((t,s,p)=>{var l;for(let d=0;d<t.length;d++){const{_id:_}=t[d];t[d]._id=C.generateUUID();const f=n.filter(t,{_parent:_});for(let a=0;a<f.length;a++)f[a]._parent=t[d]._id}let r;s&&(r=n.find(i,{_id:s}),t[0]._parent=s);const c=r?x.canAddChildBlock(r._type):!0;return!c&&r&&(t[0]._parent=r._parent),e({type:"set_blocks",payload:g(i,s||null,p||null,t,c)}),u([(l=n.first(t))==null?void 0:l._id]),n.first(t)},[i,e,u]);return{addCoreBlock:S.useCallback((t,s,p)=>{if(n.has(t,"blocks")){const y=t.blocks;return o(y,s,p)}const r=C.generateUUID(),c=D.getBlockDefaultProps(t.props),l=[];n.forIn(c,(y,h)=>{if(n.startsWith(y,I.SLOT_KEY)){const m=y.replace(I.SLOT_KEY,"");l.push({_id:m,_type:"Slot",_parent:r,_name:t.props[h].name,_styles:t.props[h].styles,_emptyStyles:t.props[h].emptyStyles})}});const d={_type:t.type,_id:r,...c};let _;s&&(_=n.find(i,{_id:s}),d._parent=s);const f=_?x.canAddChildBlock(_._type):!0;!f&&_&&(d._parent=_._parent);const a=[d,...l];return e({type:"set_blocks",payload:g(i,s||null,p||null,a,f)}),u([d._id]),d},[o,i,e,u]),addPredefinedBlock:o}};exports.useAddBlock=E;
1
+ "use strict";const S=require("react"),n=require("lodash"),q=require("./ChaiBuilderEditor-BoE-sArB.cjs"),C=require("./functions-uw7QP2kT.cjs"),x=require("./useAllBlocks-6hvuNuyw.cjs"),D=require("./controls-xUKa23ic.cjs"),I=require("./MODIFIERS-Fx6WAZcw.cjs");function g(e,i,u,o,A){if(i===null)return[...e,...o];if(u!==null){const r=n.findIndex(e,{_parent:i}),c=(r===-1?0:r)+u;return e.splice(c,0,...o),e}if(!A){const c=n.findIndex(e,{_id:i})+1;return e.splice(c,0,...o),e}let t=n.findIndex(e,{_id:i});const s=n.filter(e,{_parent:i});n.isEmpty(s)||(t=n.findIndex(e,{_id:n.last(s)._id}));const p=t+1;return e.splice(p,0,...o),e}const E=()=>{const e=q.useDispatch(),i=x.useAllBlocks(),[,u]=q.useSelectedBlockIds(),o=S.useCallback((t,s,p)=>{var l;for(let d=0;d<t.length;d++){const{_id:_}=t[d];t[d]._id=C.generateUUID();const f=n.filter(t,{_parent:_});for(let a=0;a<f.length;a++)f[a]._parent=t[d]._id}let r;s&&(r=n.find(i,{_id:s}),t[0]._parent=s);const c=r?x.canAddChildBlock(r._type):!0;return!c&&r&&(t[0]._parent=r._parent),e({type:"set_blocks",payload:g(i,s||null,p||null,t,c)}),u([(l=n.first(t))==null?void 0:l._id]),n.first(t)},[i,e,u]);return{addCoreBlock:S.useCallback((t,s,p)=>{if(n.has(t,"blocks")){const y=t.blocks;return o(y,s,p)}const r=C.generateUUID(),c=D.getBlockDefaultProps(t.props),l=[];n.forIn(c,(y,h)=>{if(n.startsWith(y,I.SLOT_KEY)){const m=y.replace(I.SLOT_KEY,"");l.push({_id:m,_type:"Slot",_parent:r,_name:t.props[h].name,_styles:t.props[h].styles,_emptyStyles:t.props[h].emptyStyles})}});const d={_type:t.type,_id:r,...c};let _;s&&(_=n.find(i,{_id:s}),d._parent=s);const f=_?x.canAddChildBlock(_._type):!0;!f&&_&&(d._parent=_._parent);const a=[d,...l];return e({type:"set_blocks",payload:g(i,s||null,p||null,a,f)}),u([d._id]),d},[o,i,e,u]),addPredefinedBlock:o}};exports.useAddBlock=E;
@@ -1 +1 @@
1
- "use strict";const l=require("lodash"),i=require("jotai"),r=require("./ChaiBuilderEditor-SacH75l4.cjs"),s=t=>["Box","Slot","Form","DataProvider","Link","List","ListItem","Row","Column","Table","TableCell"].includes(t),u=t=>!["Slot"].includes(t),a=t=>!["Slot"].includes(t);function d(t,e){return t==="Slot"||e==="List"&&t!=="ListItem"||e==="Row"&&t!=="Column"?!1:s(e)}const B=(t,{dragSource:e,dropTarget:n})=>{const o=l.get(e,"data._type",""),c=l.get(n,"data._type","");return o==="Slot"||l.get(e,"id")&&l.get(e,"id")===l.get(n,"id")?!1:l.isEmpty(c)?!0:d(o,c)},k=()=>i.useAtomValue(r.presentBlocksAtom);exports.canAddChildBlock=s;exports.canDeleteBlock=a;exports.canDropBlock=B;exports.canDuplicateBlock=u;exports.useAllBlocks=k;
1
+ "use strict";const l=require("lodash"),i=require("jotai"),r=require("./ChaiBuilderEditor-BoE-sArB.cjs"),s=t=>["Box","Slot","Form","DataProvider","Link","List","ListItem","Row","Column","Table","TableCell"].includes(t),u=t=>!["Slot"].includes(t),a=t=>!["Slot"].includes(t);function d(t,e){return t==="Slot"||e==="List"&&t!=="ListItem"||e==="Row"&&t!=="Column"?!1:s(e)}const B=(t,{dragSource:e,dropTarget:n})=>{const o=l.get(e,"data._type",""),c=l.get(n,"data._type","");return o==="Slot"||l.get(e,"id")&&l.get(e,"id")===l.get(n,"id")?!1:l.isEmpty(c)?!0:d(o,c)},k=()=>i.useAtomValue(r.presentBlocksAtom);exports.canAddChildBlock=s;exports.canDeleteBlock=a;exports.canDropBlock=B;exports.canDuplicateBlock=u;exports.useAllBlocks=k;