@chaibuilder/sdk 1.2.32 → 1.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-0eVRNr1d.js → AddBlocks-RmEkZXdE.js} +37 -33
- package/dist/AddBlocks-XYCWUol8.cjs +1 -0
- package/dist/{BrandingOptions-yYAznnw2.js → BrandingOptions-TnzCIC7A.js} +37 -31
- package/dist/BrandingOptions-qnaKl27s.cjs +1 -0
- package/dist/CanvasArea-SeSRWHy0.js +1200 -0
- package/dist/CanvasArea-iIwERFUC.cjs +55 -0
- package/dist/ChaiBuilderEditor-YqEKonJ_.cjs +206 -0
- package/dist/{index-AJalHhkO.js → ChaiBuilderEditor-y1NxvXJ7.js} +24114 -20836
- package/dist/{CurrentPage-1v40uk8K.js → CurrentPage-9KDre_9q.js} +19 -19
- package/dist/CurrentPage-TNff16tH.cjs +1 -0
- package/dist/ListTree-GxCAsv2Y.cjs +1 -0
- package/dist/{ListTree-0ZrRreCs.js → ListTree-H2WaKwOs.js} +81 -76
- package/dist/PagesPanel-5DRsqV-G.cjs +1 -0
- package/dist/{PagesPanel-AxQX-BX2.js → PagesPanel-jHMmJEtv.js} +14 -14
- package/dist/ProjectPanel-CDnnGpVo.cjs +1 -0
- package/dist/{ProjectPanel-GYdge5v9.js → ProjectPanel-uxhq_D3j.js} +16 -16
- package/dist/Settings-nGnVavh4.cjs +1 -0
- package/dist/{Settings-9JAzGHau.js → Settings-yqZksAbO.js} +53 -53
- package/dist/{SidePanels-bLwsW29O.js → SidePanels-1gwirESt.js} +70 -70
- package/dist/SidePanels-33KNaSS3.cjs +1 -0
- package/dist/{Topbar-0Ql8pHVc.js → Topbar-NHF8D1di.js} +19 -14
- package/dist/Topbar-Wwdd9Flx.cjs +1 -0
- package/dist/{UnsplashImages-NYwOOgYa.js → UnsplashImages-LLu2wFeN.js} +26 -21
- package/dist/UnsplashImages-lnz6NfSD.cjs +1 -0
- package/dist/UploadImages-3nl_4mDf.cjs +1 -0
- package/dist/{UploadImages-vpZeW-YW.js → UploadImages-FtvaDyk9.js} +33 -27
- package/dist/{add-page-modal-hDyzsEU7.js → add-page-modal-V9DTBMmY.js} +22 -22
- package/dist/add-page-modal-sIZk552b.cjs +1 -0
- package/dist/confirm-alert-Uzq5XNGt.cjs +1 -0
- package/dist/{confirm-alert-FGQKKQJU.js → confirm-alert-sI4pItIN.js} +16 -10
- package/dist/{controls-OfJWSEqC.js → controls-VTdJhdSz.js} +44 -41
- package/dist/controls-jWJDao88.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +9 -0
- package/dist/core.js +46 -45
- package/dist/delete-page-modal-UminFzYh.cjs +1 -0
- package/dist/{delete-page-modal-KxeyBri2.js → delete-page-modal-XrIpujav.js} +15 -15
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +9 -0
- package/dist/email.js +18 -16
- package/dist/{form-77dY98bF.js → form-dQQ2tTRZ.js} +7 -7
- package/dist/form-q7lxaK3j.cjs +1 -0
- package/dist/functions-ge87TVcc.js +30 -0
- package/dist/functions-sBiIevFh.cjs +1 -0
- package/dist/{index-5zkCTSAM.js → index-OsS2_gM8.js} +28 -29
- package/dist/index-eYwpNzUl.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.ts +2 -0
- package/dist/lib.js +12 -10
- package/dist/{page-viewer-umQaut1j.js → page-viewer-AoJ5HU6j.js} +21 -21
- package/dist/page-viewer-FzhqSyNO.cjs +1 -0
- package/dist/project-general-setting-WzJ8U1OW.cjs +1 -0
- package/dist/{project-general-setting-uuCemMCU.js → project-general-setting-g3YJYszB.js} +24 -24
- package/dist/{project-seo-setting-asvbPQiI.js → project-seo-setting-1sLmV-wv.js} +26 -20
- package/dist/project-seo-setting-GuObNafp.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +2 -0
- package/dist/render.js +55 -53
- package/dist/single-page-detail-WGars7Tl.cjs +1 -0
- package/dist/{single-page-detail-F6pKWyq1.js → single-page-detail-sQ3BH6Rc.js} +25 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +9 -0
- package/dist/studio.js +13 -13
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +153 -147
- package/dist/useCanvasSettings-QcsmJd9b.cjs +1 -0
- package/dist/{useCanvasSettings-ikt217kv.js → useCanvasSettings-XwFRrknO.js} +1 -1
- package/dist/web-blocks.cjs +4 -4
- package/dist/web-blocks.js +137 -113
- package/package.json +9 -3
- package/dist/AddBlocks-t0hKDSud.cjs +0 -1
- package/dist/BrandingOptions-NVmCxZfD.cjs +0 -1
- package/dist/CanvasArea-2b4oSjRx.js +0 -1177
- package/dist/CanvasArea-OzyCq6UU.cjs +0 -55
- package/dist/CurrentPage-YBMhEBZG.cjs +0 -1
- package/dist/ListTree-jPwxgI6R.cjs +0 -1
- package/dist/PagesPanel-ivEL9tIQ.cjs +0 -1
- package/dist/ProjectPanel-shgvg_yT.cjs +0 -1
- package/dist/Settings-MMwEBADN.cjs +0 -1
- package/dist/SidePanels-iaaRCUeQ.cjs +0 -1
- package/dist/Topbar-CkUhCnSW.cjs +0 -1
- package/dist/UnsplashImages-juwtWvXe.cjs +0 -1
- package/dist/UploadImages-4_jmnoVi.cjs +0 -1
- package/dist/add-page-modal-2ZPjc54F.cjs +0 -1
- package/dist/confirm-alert-QRxOc76t.cjs +0 -1
- package/dist/controls-KK2oLIa8.cjs +0 -1
- package/dist/delete-page-modal--N1nPPIL.cjs +0 -1
- package/dist/form-hT5dGoJH.cjs +0 -1
- package/dist/functions-I6BoMqqb.js +0 -21
- package/dist/functions-r3ExvGGf.cjs +0 -1
- package/dist/index-FPBudsRF.cjs +0 -1
- package/dist/index-JIcsKKoG.cjs +0 -1
- package/dist/index-YpnaudSM.js +0 -63
- package/dist/index-ecnGWzh9.cjs +0 -1
- package/dist/index-hH5SIZ29.js +0 -3116
- package/dist/index-sJ9Uc9UY.cjs +0 -206
- package/dist/page-viewer-k-g15j8B.cjs +0 -1
- package/dist/project-general-setting-1leAiCJQ.cjs +0 -1
- package/dist/project-seo-setting-kDBSOzgX.cjs +0 -1
- package/dist/single-page-detail-IFtVxwl5.cjs +0 -1
- package/dist/useCanvasSettings-Am2o80hW.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b2 as O, b5 as Q, b3 as U, b4 as W, bl as J, by as K, A as X, a3 as Y, g as aa, b as oa, e as ea, f as ta, c as ra, d as sa, a as na, bm as ia, af as ba, B as pa, bf as ma, bi as ua, bh as la, bk as ca, bg as da, bA as ga, aQ as Ca, c9 as Ma, aT as Sa, aU as Da, aR as Ta, aV as xa, aS as Aa, cb as ha, ca as wa, bq as Ia, cc as Pa, bp as ka, ch as va, bo as Fa, ce as Ga, ci as La, cm as Ra, cd as Ha, cf as Va, cg as fa, cj as Ba, ck as ja, cl as ya, br as Ea, Z as Za, _ as _a, a1 as $a, aW as qa, $ as za, a0 as Na, ab as Oa, au as Qa, az as Ua, aw as Wa, ba as Ja, bb as Ka, ax as Xa, c1 as Ya, c5 as ao, c0 as oo, ay as eo, bc as to, c2 as ro, c3 as so, c4 as no, av as io, ar as bo, at as po, as as mo, a_ as uo, a$ as lo, b7 as co, ap as go, b0 as Co, bD as Mo, bK as So, bG as Do, bQ as To, bH as xo, bJ as Ao, bE as ho, bN as wo, bL as Io, bM as Po, bI as ko, bS as vo, bR as Fo, bO as Go, bP as Lo, bF as Ro, aN as Ho, aP as Vo, aO as fo, aZ as Bo, b9 as jo, bB as yo, a6 as Eo, a9 as Zo, am as _o, aa as $o, an as qo, bT as zo, a7 as No, a8 as Oo, ao as Qo, bU as Uo, bW as Wo, bX as Jo, b$ as Ko, bZ as Xo, bY as Yo, b_ as ae, bV as oe, ah as ee, aq as te, ai as re, al as se, aj as ne, ak as ie, bj as be, c8 as pe, bv as me, ac as ue, ae as le, b8 as ce, bC as de, ad as ge, bz as Ce, bx as Me, c6 as Se, c7 as De, bw as Te, b6 as xe } from "./ChaiBuilderEditor-y1NxvXJ7.js";
|
|
2
|
+
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
2
4
|
import "react";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
import "@radix-ui/react-scroll-area";
|
|
8
|
+
import "@floating-ui/react-dom";
|
|
9
|
+
import "jotai";
|
|
10
|
+
import "i18next";
|
|
11
|
+
import "react-i18next";
|
|
12
|
+
import "flagged";
|
|
3
13
|
import "lodash-es";
|
|
14
|
+
import "./STRINGS--j49GZJP.js";
|
|
4
15
|
import "./Functions-7jnEwJyw.js";
|
|
5
|
-
import "clsx";
|
|
6
16
|
import "tailwind-merge";
|
|
7
17
|
import "@chaibuilder/runtime";
|
|
8
|
-
import "jotai";
|
|
9
|
-
import "./STRINGS--j49GZJP.js";
|
|
10
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
18
|
import "@react-hookz/web";
|
|
12
19
|
import "./MODIFIERS-cBT31iqE.js";
|
|
13
|
-
import "./Class-6Hz2KzYb.js";
|
|
14
|
-
import "react-i18next";
|
|
15
|
-
import "./jsx-runtime-WbnYoNE9.js";
|
|
16
20
|
import "@radix-ui/react-toggle";
|
|
17
21
|
import "class-variance-authority";
|
|
22
|
+
import "./Class-6Hz2KzYb.js";
|
|
18
23
|
import "@radix-ui/react-switch";
|
|
19
24
|
import "@radix-ui/react-slot";
|
|
20
25
|
import "@radix-ui/react-accordion";
|
|
@@ -22,7 +27,6 @@ import "@radix-ui/react-icons";
|
|
|
22
27
|
import "@radix-ui/react-alert-dialog";
|
|
23
28
|
import "@radix-ui/react-dialog";
|
|
24
29
|
import "@radix-ui/react-label";
|
|
25
|
-
import "@radix-ui/react-scroll-area";
|
|
26
30
|
import "@radix-ui/react-tabs";
|
|
27
31
|
import "@radix-ui/react-tooltip";
|
|
28
32
|
import "@radix-ui/react-popover";
|
|
@@ -35,144 +39,146 @@ import "@radix-ui/react-toast";
|
|
|
35
39
|
import "cmdk";
|
|
36
40
|
import "@radix-ui/react-context-menu";
|
|
37
41
|
import "react-icons-picker";
|
|
38
|
-
import "react-dom";
|
|
39
42
|
import "react-quill";
|
|
43
|
+
import "react-hotkeys-hook";
|
|
44
|
+
import "lodash";
|
|
45
|
+
import "lucide-react";
|
|
40
46
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
47
|
+
O as Accordion,
|
|
48
|
+
Q as AccordionContent,
|
|
49
|
+
U as AccordionItem,
|
|
50
|
+
W as AccordionTrigger,
|
|
51
|
+
J as Alert,
|
|
52
|
+
K as AlertDescription,
|
|
53
|
+
X as AlertDialog,
|
|
54
|
+
Y as AlertDialogAction,
|
|
55
|
+
aa as AlertDialogCancel,
|
|
56
|
+
oa as AlertDialogContent,
|
|
57
|
+
ea as AlertDialogDescription,
|
|
58
|
+
ta as AlertDialogFooter,
|
|
59
|
+
ra as AlertDialogHeader,
|
|
60
|
+
sa as AlertDialogTitle,
|
|
61
|
+
na as AlertDialogTrigger,
|
|
62
|
+
ia as AlertTitle,
|
|
63
|
+
ba as Badge,
|
|
64
|
+
pa as Button,
|
|
65
|
+
ma as Card,
|
|
66
|
+
ua as CardContent,
|
|
67
|
+
la as CardDescription,
|
|
68
|
+
ca as CardFooter,
|
|
69
|
+
da as CardHeader,
|
|
70
|
+
ga as CardTitle,
|
|
71
|
+
Ca as Command,
|
|
72
|
+
Ma as CommandDialog,
|
|
73
|
+
Sa as CommandEmpty,
|
|
74
|
+
Da as CommandGroup,
|
|
75
|
+
Ta as CommandInput,
|
|
76
|
+
xa as CommandItem,
|
|
77
|
+
Aa as CommandList,
|
|
78
|
+
ha as CommandSeparator,
|
|
79
|
+
wa as CommandShortcut,
|
|
80
|
+
Ia as ContextMenu,
|
|
81
|
+
Pa as ContextMenuCheckboxItem,
|
|
82
|
+
ka as ContextMenuContent,
|
|
83
|
+
va as ContextMenuGroup,
|
|
84
|
+
Fa as ContextMenuItem,
|
|
85
|
+
Ga as ContextMenuLabel,
|
|
86
|
+
La as ContextMenuPortal,
|
|
87
|
+
Ra as ContextMenuRadioGroup,
|
|
88
|
+
Ha as ContextMenuRadioItem,
|
|
89
|
+
Va as ContextMenuSeparator,
|
|
90
|
+
fa as ContextMenuShortcut,
|
|
91
|
+
Ba as ContextMenuSub,
|
|
92
|
+
ja as ContextMenuSubContent,
|
|
93
|
+
ya as ContextMenuSubTrigger,
|
|
94
|
+
Ea as ContextMenuTrigger,
|
|
95
|
+
Za as Dialog,
|
|
96
|
+
_a as DialogContent,
|
|
97
|
+
$a as DialogDescription,
|
|
98
|
+
qa as DialogFooter,
|
|
99
|
+
za as DialogHeader,
|
|
100
|
+
Na as DialogTitle,
|
|
101
|
+
Oa as DialogTrigger,
|
|
102
|
+
Qa as DropdownMenu,
|
|
103
|
+
Ua as DropdownMenuCheckboxItem,
|
|
104
|
+
Wa as DropdownMenuContent,
|
|
105
|
+
Ja as DropdownMenuGroup,
|
|
106
|
+
Ka as DropdownMenuItem,
|
|
107
|
+
Xa as DropdownMenuLabel,
|
|
108
|
+
Ya as DropdownMenuPortal,
|
|
109
|
+
ao as DropdownMenuRadioGroup,
|
|
110
|
+
oo as DropdownMenuRadioItem,
|
|
111
|
+
eo as DropdownMenuSeparator,
|
|
112
|
+
to as DropdownMenuShortcut,
|
|
113
|
+
ro as DropdownMenuSub,
|
|
114
|
+
so as DropdownMenuSubContent,
|
|
115
|
+
no as DropdownMenuSubTrigger,
|
|
116
|
+
io as DropdownMenuTrigger,
|
|
117
|
+
bo as HoverCard,
|
|
118
|
+
po as HoverCardContent,
|
|
119
|
+
mo as HoverCardTrigger,
|
|
120
|
+
uo as IconPickerField,
|
|
121
|
+
lo as ImagePickerField,
|
|
122
|
+
co as Input,
|
|
123
|
+
go as Label,
|
|
124
|
+
Co as LinkField,
|
|
125
|
+
Mo as Menubar,
|
|
126
|
+
So as MenubarCheckboxItem,
|
|
127
|
+
Do as MenubarContent,
|
|
128
|
+
To as MenubarGroup,
|
|
129
|
+
xo as MenubarItem,
|
|
130
|
+
Ao as MenubarLabel,
|
|
131
|
+
ho as MenubarMenu,
|
|
132
|
+
wo as MenubarPortal,
|
|
133
|
+
Io as MenubarRadioGroup,
|
|
134
|
+
Po as MenubarRadioItem,
|
|
135
|
+
ko as MenubarSeparator,
|
|
136
|
+
vo as MenubarShortcut,
|
|
137
|
+
Fo as MenubarSub,
|
|
138
|
+
Go as MenubarSubContent,
|
|
139
|
+
Lo as MenubarSubTrigger,
|
|
140
|
+
Ro as MenubarTrigger,
|
|
141
|
+
Ho as Popover,
|
|
142
|
+
Vo as PopoverContent,
|
|
143
|
+
fo as PopoverTrigger,
|
|
144
|
+
Bo as RTEField,
|
|
145
|
+
jo as ScrollArea,
|
|
146
|
+
yo as ScrollBar,
|
|
147
|
+
Eo as Select,
|
|
148
|
+
Zo as SelectContent,
|
|
149
|
+
_o as SelectGroup,
|
|
150
|
+
$o as SelectItem,
|
|
151
|
+
qo as SelectLabel,
|
|
152
|
+
zo as SelectSeparator,
|
|
153
|
+
No as SelectTrigger,
|
|
154
|
+
Oo as SelectValue,
|
|
155
|
+
Qo as Separator,
|
|
156
|
+
Uo as Sheet,
|
|
157
|
+
Wo as SheetClose,
|
|
158
|
+
Jo as SheetContent,
|
|
159
|
+
Ko as SheetDescription,
|
|
160
|
+
Xo as SheetFooter,
|
|
161
|
+
Yo as SheetHeader,
|
|
162
|
+
ae as SheetTitle,
|
|
163
|
+
oe as SheetTrigger,
|
|
164
|
+
ee as Skeleton,
|
|
165
|
+
te as Switch,
|
|
166
|
+
re as Tabs,
|
|
167
|
+
se as TabsContent,
|
|
168
|
+
ne as TabsList,
|
|
169
|
+
ie as TabsTrigger,
|
|
170
|
+
be as Textarea,
|
|
171
|
+
pe as Toaster,
|
|
172
|
+
me as Toggle,
|
|
173
|
+
ue as Tooltip,
|
|
174
|
+
le as TooltipContent,
|
|
175
|
+
ce as TooltipPortal,
|
|
176
|
+
de as TooltipProvider,
|
|
177
|
+
ge as TooltipTrigger,
|
|
178
|
+
Ce as badgeVariants,
|
|
179
|
+
Me as buttonVariants,
|
|
180
|
+
Se as reducer,
|
|
181
|
+
De as toast,
|
|
182
|
+
Te as toggleVariants,
|
|
183
|
+
xe as useToast
|
|
178
184
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("jotai"),s=require("./ChaiBuilderEditor-YqEKonJ_.cjs"),e=()=>t.useAtom(s.canvasSettingsAtom);exports.useCanvasSettings=e;
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("lodash-es"),a=require("./jsx-runtime-Z_BpKhVy.cjs"),w=require("react"),o=require("./controls-KK2oLIa8.cjs"),d=require("@chaibuilder/runtime"),b=require("./empty-slot-nzYOgZuS.cjs"),h=require("@radix-ui/react-icons"),f=require("./Functions-N3yhPYKY.cjs"),E=require("./html-to-json-Xhu27KFD.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");function R(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const s=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,s.get?s:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const u=R(w),T=u.memo(e=>{const{blockProps:t,inBuilder:l,backgroundImage:s,children:r,tag:n="div",styles:i}=e;let c=r;r||(c=a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},styles:{},inBuilder:l}));let p={};return s&&(p={backgroundImage:`url(${s})`}),u.createElement(n,{...t,...i,style:p},c)});d.registerChaiBlock(T,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:o.S({default:""}),tag:o.s({title:"Tag",default:"div",options:[{value:"div",title:"div"},{value:"header",title:"header"},{value:"footer",title:"footer"},{value:"section",title:"section"},{value:"article",title:"article"},{value:"aside",title:"aside"},{value:"main",title:"main"},{value:"nav",title:"nav"},{value:"figure",title:"figure"},{value:"details",title:"details"},{value:"summary",title:"summary"},{value:"dialog",title:"dialog"},{value:"strike",title:"strike"},{value:"caption",title:"caption"},{value:"legend",title:"legend"},{value:"figcaption",title:"figcaption"},{value:"mark",title:"mark"}]}),backgroundImage:o.o({title:"Background Image"})},canAcceptBlock:()=>!0});const C=u.memo(e=>{const{blockProps:t,styles:l}=e;return u.createElement("div",{...t,...l})});d.registerChaiBlock(C,{type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",props:{styles:o.S({default:""})},canAcceptBlock:()=>!1});const L=e=>{const{blockProps:t,styles:l,content:s,level:r="h1",children:n=null}=e;return n?u.createElement(r,{...l,...t},n):u.createElement(r,{...l,...t,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(L,{type:"Heading",label:"Heading",category:"core",icon:h.HeadingIcon,group:"typography",props:{level:o.s({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]}),styles:o.S({default:"text-3xl"}),content:o.g({title:"Content",default:"Heading goes here"})},canAcceptBlock:e=>e==="Span"||e==="Text"});const _=e=>{const{blockProps:t,styles:l,content:s}=e;return y.isNull(e.children)?u.createElement("p",{...l,...t,dangerouslySetInnerHTML:{__html:s}}):u.createElement("p",{...l,...t},e.children)};d.registerChaiBlock(_,{type:"Paragraph",label:"Paragraph",category:"core",icon:h.TextIcon,group:"typography",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."})},canAcceptBlock:e=>e==="Span"||e==="Link"});const P=e=>{const{blockProps:t,styles:l,content:s,children:r=null,tag:n}=e;return r?u.createElement("span",{...l,...t},r):u.createElement(n||"span",{...l,...t,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(P,{type:"Span",label:"Span",category:"core",group:"typography",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"Enter your content"})},canAcceptBlock:()=>!0});const A=e=>{const{blockProps:t,content:l,styles:s}=e;return a.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:a.jsxRuntimeExports.jsx("div",{...t,...s,dangerouslySetInnerHTML:{__html:l}})})};d.registerChaiBlock(A,{type:"RichText",label:"Rich Text",category:"core",icon:h.CursorTextIcon,group:"typography",props:{styles:o.S({default:""}),content:o.m({title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}});const M=e=>{const{blockProps:t,iconSize:l,icon:s,content:r,iconPos:n,styles:i,children:c}=e,p=s,m=c||a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx("span",{children:r}),p&&a.jsxRuntimeExports.jsx("div",{style:{width:l+"px"},className:n+" "+(n==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:p}})]});return u.createElement("button",{...t,...i,type:"button"},m)};d.registerChaiBlock(M,{type:"Button",label:"Button",category:"core",icon:h.ButtonIcon,group:"basic",props:{content:o.u({title:"Label",default:"Button",multiLingual:!0}),styles:o.S({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:o.T({title:"Icon",default:""}),iconSize:o.c({title:"Icon Size",default:24}),iconPos:o.s({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const N=e=>{const{blockProps:t,link:l,children:s,styles:r,inBuilder:n,content:i}=e;return!s&&y.isEmpty(r==null?void 0:r.className)&&y.isEmpty(i)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,inBuilder:n}):n?s?a.jsxRuntimeExports.jsx("span",{"data-simulate":"a",...t,...r,children:s}):u.createElement("span",{...t,...r,dangerouslySetInnerHTML:{__html:i},"data-simulate":"a"}):s?a.jsxRuntimeExports.jsx("a",{href:l.href||"#/",target:l.target,...t,...r,children:s}):u.createElement("a",{...t,...r,href:l.href||"#",target:l.target||"_self",dangerouslySetInnerHTML:{__html:i}})};d.registerChaiBlock(N,{type:"Link",label:"Link",category:"core",icon:h.Link1Icon,group:"basic",props:{styles:o.S({default:""}),content:o.u({title:"Content",default:""}),link:o.q({title:"Link",default:{type:"page",target:"_self",href:""}})},canAcceptBlock:()=>!0});const H=e=>{const{blockProps:t,children:l,listType:s,styles:r,tag:n,inBuilder:i}=e,c=f.cn(y.get(r,"className",""),s);return!l&&y.isEmpty(r==null?void 0:r.className)?a.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:i,blockProps:t,text:"LIST ITEM"}):u.createElement(n||(s==="list-decimal"?"ol":"ul"),{...t,...r,className:c},l)};d.registerChaiBlock(H,{type:"List",label:"List",icon:h.RowsIcon,category:"core",group:"basic",props:{styles:o.S({default:""}),listType:o.s({title:"List type",default:"list-disc",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]});const D=e=>{const{blockProps:t,content:l,styles:s,children:r,tag:n}=e;return r?u.createElement(n||"li",{...s,...t},r):u.createElement(n||"li",{...s,...t,dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(D,{type:"ListItem",label:"List Item",icon:h.ColumnsIcon,category:"core",group:"basic",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"List item"})},canAcceptBlock:()=>!0,canBeNested:e=>e==="List"});const k=(e,...t)=>({...e,className:f.cn(e.className,...t)}),U=e=>{const{blockProps:t,icon:l,styles:s,width:r,inBuilder:n,height:i}=e,c=k(s,f.cn(r?`w-[${r}px]`:"",i?`h-[${i}px]`:""));if(y.isEmpty(l))return a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"",inBuilder:n,className:"h-8 w-14"});const p=l.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return u.createElement("span",{...t,...c,dangerouslySetInnerHTML:{__html:p}})};d.registerChaiBlock(U,{type:"Icon",label:"Icon",category:"core",icon:h.SketchLogoIcon,group:"media",props:{styles:o.S({default:"text-black"}),icon:o.T({title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'}),width:o.c({title:"Width",default:""}),height:o.c({title:"Height",default:""})}});const q=e=>{const{blockProps:t,image:l,styles:s,alt:r,height:n,width:i}=e;return y.isEmpty(l)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"IMAGE URL",className:"h-36"}):u.createElement("img",{...t,...s,src:l,alt:r,height:n,width:i})};d.registerChaiBlock(q,{type:"Image",label:"Image",category:"core",icon:h.ImageIcon,group:"media",props:{styles:o.S({default:""}),image:o.o({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:o.u({title:"Alt",default:""}),width:o.u({title:"Width",default:""}),height:o.u({title:"Height",default:""})}});const F=e=>{var i;const{blockProps:t,inBuilder:l,styles:s,children:r}=e;let n=null;return!r&&l&&(n=a.jsxRuntimeExports.jsx("div",{className:f.cn("flex flex-col items-center justify-center",(i=e.emptyStyles)==null?void 0:i.className),children:a.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:a.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",e.name]})})})),u.createElement("div",{...s,...t,droppable:"yes"},r||n)};d.registerChaiBlock(F,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:o.S({default:""}),emptyStyles:o.S({default:""})},canAcceptBlock:()=>!0});const j=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,S=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,I=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,O=e=>{if(j.test(e)){const t=e.match(j);return t?`https://www.youtube.com/embed/${t[4]}`:e}if(S.test(e)){const t=e.match(S);return t?`https://player.vimeo.com/video/${t[3]}`:e}if(I.test(e)){const t=e.match(I);return t?`https://www.dailymotion.com/embed/video/${t[4]}`:e}return null},z=u.memo(e=>{const{blockProps:t,inBuilder:l,styles:s,url:r,controls:n}=e,i=y.get(n,"autoPlay",!1),c=y.get(n,"controls",!1),p=i||y.get(n,"muted",!0),m=y.get(n,"loop",!1);if(y.isEmpty(r))return a.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:l,blockProps:t,text:"VIDEO URL",className:"h-36"});let x=O(r),g=null;if(x){if(!y.isEmpty(x)){const v=[];v.push(`autoplay=${i?1:0}`),v.push(`controls=${n?1:0}`),v.push(`mute=${p?1:0}&muted=${p?1:0}`),v.push(`loop=${m?1:0}`),x=`${x}?${v.join("&")}`}g=u.createElement("iframe",{...t,className:"absolute inset-0 w-full h-full",src:x,allow:l?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else g=u.createElement("video",{...t,className:"absolute inset-0 w-full h-full",src:r,controls:c,muted:p,autoPlay:l?!1:i,loop:m});return a.jsxRuntimeExports.jsx("div",{...y.pick(s,["className"]),children:a.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[l?a.jsxRuntimeExports.jsx("div",{...t,...y.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,g]})})});d.registerChaiBlock(z,{type:"Video",label:"Video",category:"core",icon:h.VideoIcon,group:"media",props:{styles:o.S({default:""}),url:o.u({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:o.b({title:"Controls",properties:{autoPlay:o.r({title:"Autoplay",default:!0}),controls:o.r({title:"Show controls",default:!1}),loop:o.r({title:"Loop",default:!1}),muted:o.r({title:"Muted",default:!0})}})}});const $=u.memo(e=>{const{blockProps:t,styles:l,content:s,inBuilder:r}=e;return a.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r?a.jsxRuntimeExports.jsx("div",{...t,...l,className:"absolute z-20 h-full w-full"}):null,u.createElement("div",{...l,dangerouslySetInnerHTML:{__html:s}})]})});d.registerChaiBlock($,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:h.CodeIcon,group:"advanced",props:{styles:o.S({default:""}),content:o.g({title:"HTML Content",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})}});const V=e=>{const{blockProps:t,styles:l}=e;return u.createElement("hr",{...l,...t})};d.registerChaiBlock(V,{type:"Divider",label:"Divider",category:"core",icon:h.DividerHorizontalIcon,group:"basic",props:{styles:o.S({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const G=e=>e.inBuilder?a.jsxRuntimeExports.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`;d.registerChaiBlock(G,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:h.SpaceBetweenVerticallyIcon,props:{content:o.g({title:"Content",defaultValue:""})}});const W=({children:e,blockProps:t,styles:l})=>{const s=k(l,"hs-accordion-group");return a.jsxRuntimeExports.jsx("div",{...t,...s,children:e})};d.registerChaiBlock(W,{type:"AccordionGroup",label:"Accordion Group",category:"core",group:"advanced",props:{styles:o.S({default:""})},blocks:()=>{const e="dnd-accordion-"+f.generateUUID();return E.getBlocksFromHTML(`<div class="hs-accordion-group">
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("lodash-es"),n=require("./jsx-runtime-Z_BpKhVy.cjs"),w=require("react"),o=require("./controls-jWJDao88.cjs"),d=require("@chaibuilder/runtime"),b=require("./empty-slot-nzYOgZuS.cjs"),h=require("@radix-ui/react-icons"),f=require("./Functions-N3yhPYKY.cjs"),E=require("./html-to-json-Xhu27KFD.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");function R(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const s=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,s.get?s:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const u=R(w),T=u.memo(e=>{const{blockProps:t,inBuilder:l,backgroundImage:s,children:r,tag:a="div",styles:i}=e;let c=r;r||(c=n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},styles:{},inBuilder:l}));let p={};return s&&(p={backgroundImage:`url(${s})`}),u.createElement(a,{...t,...i,style:p},c)});d.registerChaiBlock(T,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:o.S({default:""}),tag:o.y({title:"Tag",default:"div",options:[{value:"div",title:"div"},{value:"header",title:"header"},{value:"footer",title:"footer"},{value:"section",title:"section"},{value:"article",title:"article"},{value:"aside",title:"aside"},{value:"main",title:"main"},{value:"nav",title:"nav"},{value:"figure",title:"figure"},{value:"details",title:"details"},{value:"summary",title:"summary"},{value:"dialog",title:"dialog"},{value:"strike",title:"strike"},{value:"caption",title:"caption"},{value:"legend",title:"legend"},{value:"figcaption",title:"figcaption"},{value:"mark",title:"mark"}]}),backgroundImage:o.q({title:"Background Image"})},canAcceptBlock:()=>!0});const C=u.memo(e=>{const{blockProps:t,styles:l}=e;return u.createElement("div",{...t,...l})});d.registerChaiBlock(C,{type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",props:{styles:o.S({default:""})},canAcceptBlock:()=>!1});const L=e=>{const{blockProps:t,styles:l,content:s,level:r="h1",children:a=null}=e;return a?u.createElement(r,{...l,...t},a):u.createElement(r,{...l,...t,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(L,{type:"Heading",label:"Heading",category:"core",icon:h.HeadingIcon,group:"typography",props:{level:o.y({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]}),styles:o.S({default:"text-3xl"}),content:o.g({title:"Content",default:"Heading goes here"})},canAcceptBlock:e=>e==="Span"||e==="Text"});const _=e=>{const{blockProps:t,styles:l,content:s}=e;return y.isNull(e.children)?u.createElement("p",{...l,...t,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}}):u.createElement("p",{...l,...t},e.children)};d.registerChaiBlock(_,{type:"Paragraph",label:"Paragraph",category:"core",icon:h.TextIcon,group:"typography",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."})},canAcceptBlock:e=>e==="Span"||e==="Link"});const P=e=>{const{blockProps:t,styles:l,content:s,children:r=null,tag:a}=e;return r?u.createElement("span",{...l,...t},r):u.createElement(a||"span",{...l,...t,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(P,{type:"Span",label:"Span",category:"core",group:"typography",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"Enter your content"})},canAcceptBlock:()=>!0});const A=e=>{const{blockProps:t,content:l,styles:s}=e;return n.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:n.jsxRuntimeExports.jsx("div",{"data-ai-key":"content","data-ai-type":"richtext",...t,...s,dangerouslySetInnerHTML:{__html:l}})})};d.registerChaiBlock(A,{type:"RichText",label:"Rich Text",category:"core",icon:h.CursorTextIcon,group:"typography",props:{styles:o.S({default:""}),content:o.m({title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}});const M=e=>{const{blockProps:t,iconSize:l,icon:s,content:r,iconPos:a,styles:i,children:c}=e,p=s,m=c||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:r}),p&&n.jsxRuntimeExports.jsx("div",{style:{width:l+"px"},className:a+" "+(a==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:p}})]});return u.createElement("button",{...t,...i,type:"button"},m)};d.registerChaiBlock(M,{type:"Button",label:"Button",category:"core",icon:h.ButtonIcon,group:"basic",props:{content:o.l({title:"Label",default:"Button"}),styles:o.S({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:o.o({title:"Icon",default:""}),iconSize:o.c({title:"Icon Size",default:24}),iconPos:o.y({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const N=e=>{const{blockProps:t,link:l,children:s,styles:r,inBuilder:a,content:i}=e;return!s&&y.isEmpty(r==null?void 0:r.className)&&y.isEmpty(i)?n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,inBuilder:a}):a?s?n.jsxRuntimeExports.jsx("span",{"data-simulate":"a",...t,...r,children:s}):u.createElement("span",{...t,...r,dangerouslySetInnerHTML:{__html:i},"data-simulate":"a"}):s?n.jsxRuntimeExports.jsx("a",{href:l.href||"#/",target:l.target,...t,...r,children:s}):u.createElement("a",{...t,...r,"data-ai-key":"content",href:l.href||"#",target:l.target||"_self",dangerouslySetInnerHTML:{__html:i}})};d.registerChaiBlock(N,{type:"Link",label:"Link",category:"core",icon:h.Link1Icon,group:"basic",props:{styles:o.S({default:""}),content:o.l({title:"Content",default:""}),link:o.T({title:"Link",default:{type:"page",target:"_self",href:""}})},canAcceptBlock:()=>!0});const H=e=>{const{blockProps:t,children:l,listType:s,styles:r,tag:a,inBuilder:i}=e,c=f.cn(y.get(r,"className",""),s);return!l&&y.isEmpty(r==null?void 0:r.className)?n.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:i,blockProps:t,text:"LIST ITEM"}):u.createElement(a||(s==="list-decimal"?"ol":"ul"),{...t,...r,className:c},l)};d.registerChaiBlock(H,{type:"List",label:"List",icon:h.RowsIcon,category:"core",group:"basic",props:{styles:o.S({default:""}),listType:o.y({title:"List type",default:"list-disc",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]});const D=e=>{const{blockProps:t,content:l,styles:s,children:r,tag:a}=e;return r?u.createElement(a||"li",{...s,...t},r):u.createElement(a||"li",{...s,...t,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(D,{type:"ListItem",label:"List Item",icon:h.ColumnsIcon,category:"core",group:"basic",props:{styles:o.S({default:""}),content:o.g({title:"Content",default:"List item"})},canAcceptBlock:()=>!0,canBeNested:e=>e==="List"});const k=(e,...t)=>({...e,className:f.cn(e.className,...t)}),U=e=>{const{blockProps:t,icon:l,styles:s,width:r,inBuilder:a,height:i}=e,c=k(s,f.cn(r?`w-[${r}px]`:"",i?`h-[${i}px]`:""));if(y.isEmpty(l))return n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"",inBuilder:a,className:"h-8 w-14"});const p=l.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return u.createElement("span",{...t,...c,dangerouslySetInnerHTML:{__html:p}})};d.registerChaiBlock(U,{type:"Icon",label:"Icon",category:"core",icon:h.SketchLogoIcon,group:"media",props:{styles:o.S({default:"text-black"}),icon:o.o({title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'}),width:o.c({title:"Width",default:""}),height:o.c({title:"Height",default:""})}});const q=e=>{const{blockProps:t,image:l,styles:s,alt:r,height:a,width:i}=e;return y.isEmpty(l)?n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"IMAGE URL",className:"h-36"}):u.createElement("img",{...t,...s,src:l,alt:r,height:a,width:i})};d.registerChaiBlock(q,{type:"Image",label:"Image",category:"core",icon:h.ImageIcon,group:"media",props:{styles:o.S({default:""}),image:o.q({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:o.l({title:"Alt",default:""}),width:o.l({title:"Width",default:""}),height:o.l({title:"Height",default:""})}});const F=e=>{var i;const{blockProps:t,inBuilder:l,styles:s,children:r}=e;let a=null;return!r&&l&&(a=n.jsxRuntimeExports.jsx("div",{className:f.cn("flex flex-col items-center justify-center",(i=e.emptyStyles)==null?void 0:i.className),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:n.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",e.name]})})})),u.createElement("div",{...s,...t,droppable:"yes"},r||a)};d.registerChaiBlock(F,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:o.S({default:""}),emptyStyles:o.S({default:""})},canAcceptBlock:()=>!0});const j=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,S=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,I=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,O=e=>{if(j.test(e)){const t=e.match(j);return t?`https://www.youtube.com/embed/${t[4]}`:e}if(S.test(e)){const t=e.match(S);return t?`https://player.vimeo.com/video/${t[3]}`:e}if(I.test(e)){const t=e.match(I);return t?`https://www.dailymotion.com/embed/video/${t[4]}`:e}return null},z=u.memo(e=>{const{blockProps:t,inBuilder:l,styles:s,url:r,controls:a}=e,i=y.get(a,"autoPlay",!1),c=y.get(a,"controls",!1),p=i||y.get(a,"muted",!0),m=y.get(a,"loop",!1);if(y.isEmpty(r))return n.jsxRuntimeExports.jsx(b.EmptySlot,{inBuilder:l,blockProps:t,text:"VIDEO URL",className:"h-36"});let x=O(r),g=null;if(x){if(!y.isEmpty(x)){const v=[];v.push(`autoplay=${i?1:0}`),v.push(`controls=${a?1:0}`),v.push(`mute=${p?1:0}&muted=${p?1:0}`),v.push(`loop=${m?1:0}`),x=`${x}?${v.join("&")}`}g=u.createElement("iframe",{...t,className:"absolute inset-0 w-full h-full",src:x,allow:l?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else g=u.createElement("video",{...t,className:"absolute inset-0 w-full h-full",src:r,controls:c,muted:p,autoPlay:l?!1:i,loop:m});return n.jsxRuntimeExports.jsx("div",{...y.pick(s,["className"]),children:n.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[l?n.jsxRuntimeExports.jsx("div",{...t,...y.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,g]})})});d.registerChaiBlock(z,{type:"Video",label:"Video",category:"core",icon:h.VideoIcon,group:"media",props:{styles:o.S({default:""}),url:o.l({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:o.b({title:"Controls",properties:{autoPlay:o.r({title:"Autoplay",default:!0}),controls:o.r({title:"Show controls",default:!1}),loop:o.r({title:"Loop",default:!1}),muted:o.r({title:"Muted",default:!0})}})}});const $=u.memo(e=>{const{blockProps:t,styles:l,content:s,inBuilder:r}=e;return n.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r?n.jsxRuntimeExports.jsx("div",{...t,...l,className:"absolute z-20 h-full w-full"}):null,u.createElement("div",{...l,dangerouslySetInnerHTML:{__html:s}})]})});d.registerChaiBlock($,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:h.CodeIcon,group:"advanced",props:{styles:o.S({default:""}),content:o.g({title:"HTML Content",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})}});const V=e=>{const{blockProps:t,styles:l}=e;return u.createElement("hr",{...l,...t})};d.registerChaiBlock(V,{type:"Divider",label:"Divider",category:"core",icon:h.DividerHorizontalIcon,group:"basic",props:{styles:o.S({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const G=e=>e.inBuilder||e.forceWrapper?n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",...e.blockProps,children:e.content}):`${e.content}`;d.registerChaiBlock(G,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:h.SpaceBetweenVerticallyIcon,props:{content:o.g({title:"Content",defaultValue:""})}});const W=({children:e,blockProps:t,styles:l})=>{const s=k(l,"hs-accordion-group");return n.jsxRuntimeExports.jsx("div",{...t,...s,children:e})};d.registerChaiBlock(W,{type:"AccordionGroup",label:"Accordion Group",category:"core",group:"advanced",props:{styles:o.S({default:""})},blocks:()=>{const e="dnd-accordion-"+f.generateUUID();return E.getBlocksFromHTML(`<div class="hs-accordion-group">
|
|
2
2
|
<div class="hs-accordion active" id="hs-unstyled-heading-one">
|
|
3
3
|
<button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
|
|
4
4
|
Accordion #1
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
|
-
</div>`.replace(/hs-unstyled-heading/g,e).replace(/hs-unstyled-collapse/g,e))},canAcceptBlock:e=>e==="Accordion"});const Y=({children:e,blockProps:t,styles:l,blockState:s})=>{const r=k(l,"hs-accordion "+(s&&s!=null&&s.active?"active":""));return
|
|
19
|
+
</div>`.replace(/hs-unstyled-heading/g,e).replace(/hs-unstyled-collapse/g,e))},canAcceptBlock:e=>e==="Accordion"});const Y=({children:e,blockProps:t,styles:l,blockState:s})=>{const r=k(l,"hs-accordion "+(s&&s!=null&&s.active?"active":""));return n.jsxRuntimeExports.jsx("div",{...t,...r,children:e})};d.registerChaiBlock(Y,{type:"Accordion",label:"Accordion",category:"core",group:"advanced",props:{styles:o.S({default:""})},customStylingStates:{"hs-accordion-active":"Accordion Active"},blockState:{active:o.r({default:!1,title:"Show content in canvas"})},getBlockStateFrom:e=>[e._id],blocks:()=>{const e="dnd-accordion-"+f.generateUUID();return E.getBlocksFromHTML(`
|
|
20
20
|
<div class="hs-accordion active" id="hs-unstyled-heading-one">
|
|
21
21
|
<button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
|
|
22
22
|
Accordion #1
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
`.replace(/hs-unstyled-heading/g,e).replace(/hs-unstyled-collapse/g,e))}});const X=({children:e,blockProps:t,styles:l})=>{const s=k(l,"hs-accordion-toggle");return
|
|
28
|
+
`.replace(/hs-unstyled-heading/g,e).replace(/hs-unstyled-collapse/g,e))}});const X=({children:e,blockProps:t,styles:l})=>{const s=k(l,"hs-accordion-toggle");return n.jsxRuntimeExports.jsx("button",{...s,...t,children:e})};d.registerChaiBlock(X,{type:"AccordionToggle",label:"Accordion Toggle",category:"core",group:"advanced",hidden:!0,props:{styles:o.S({default:"hs-accordion-active:text-blue-600 dark:hs-accordion-active:text-blue-500 inline-flex w-full items-center gap-x-3 rounded-lg px-6 py-3 text-start text-sm font-semibold text-gray-800 hover:text-gray-500 disabled:pointer-events-none disabled:opacity-50 dark:text-neutral-200 dark:hover:text-neutral-400"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const Z=({children:e,blockProps:t,styles:l,blockState:s,inBuilder:r})=>{const a=k(l,"hs-accordion-content",r&&s?s!=null&&s.active?"!block !opacity-100":"!hidden !opacity-0":"");return n.jsxRuntimeExports.jsx("div",{...a,...t,children:e})};d.registerChaiBlock(Z,{type:"AccordionContent",label:"Accordion Content",category:"core",group:"advanced",hidden:!0,props:{styles:o.S({default:"w-full overflow-hidden transition-height hidden duration-300"})},getBlockStateFrom:e=>[e._parent],canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const J=({children:e,blockProps:t,styles:l,blockState:s,inBuilder:r})=>{const a=r&&(s!=null&&s.active)?" open":"",i=k(l,"hs-collapse-toggle",a);return n.jsxRuntimeExports.jsx("button",{type:"button",...i,...t,children:e})};d.registerChaiBlock(J,{type:"CollapseToggle",label:"Collapse Toggle",category:"core",group:"advanced",hidden:!0,props:{styles:o.S({default:""})},canAcceptBlock:()=>!0,customStylingStates:{"hs-collapse-open":"Collapse Open"},getBlockStateFrom:(e,t)=>{const l=y.get(e,"styles_attrs.data-hs-collapse","").replace("#","");if(!l)return[];const s=y.find(t,r=>y.get(r,"styles_attrs.id")===l);return s?[s==null?void 0:s._id]:[]}});const K=({children:e,blockProps:t,styles:l,blockState:s,inBuilder:r})=>{const a=r?{"!block !opacity-100 open":s==null?void 0:s.active,"":!(s!=null&&s.active)}:{},i=Object.keys(a).filter(p=>a[p]).join(" "),c=k(l,"hs-collapse",i);return n.jsxRuntimeExports.jsx("div",{...c,...t,children:e})};d.registerChaiBlock(K,{type:"Collapse",label:"Collapse",category:"core",group:"advanced",props:{styles:o.S({default:"transition-opacity transition-margin duration hs-collapse-open:opacity-100 opacity-0 w-56 hidden z-10 mt-2 min-w-60 bg-white"})},canAcceptBlock:()=>!0,blockState:{active:o.r({default:!1,title:"Show collapse in canvas"})},getBlockStateFrom:e=>[e._id],blocks:()=>E.getBlocksFromHTML(`<button type="button" class="hs-collapse-toggle" id="hs-unstyled-collapse" data-hs-collapse="#hs-unstyled-collapse-content">
|
|
29
29
|
Collapse
|
|
30
30
|
</button>
|
|
31
31
|
<div id="hs-unstyled-collapse-content" class="hs-collapse hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-collapse">
|
|
32
32
|
This is a collapse body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.
|
|
33
|
-
</div>`.replace(/hs-unstyled-collapse/g,`dnd-collapse-${f.generateUUID()}`))});const Q=e=>{const{blockProps:t,backgroundImage:l,children:s,styles:r}=e;let n={};return l&&(n={backgroundImage:`url(${l})`}),u.createElement("div",{...t,...r,style:n},s)};d.registerChaiBlock(Q,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:o.S({default:"font-body antialiased"}),backgroundImage:o.o({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const ee=e=>{const{blockProps:t,styles:l}=e;return u.createElement("br",{...t,...l})};d.registerChaiBlock(ee,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:h.SpaceBetweenVerticallyIcon,props:{styles:o.S({default:""})}});const B=e=>{const t=(n,i)=>({_id:f.generateUUID(),_parent:n,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+i}`}),l=n=>{const i=f.generateUUID(),c={_type:"TableRow",_id:i,styles:"#styles:,border-b"};return n&&(c._parent=n),[c,t(i,"1"),t(i,"2"),t(i,"3")]},s=n=>{const i=f.generateUUID(),c={_id:i,_type:"TableHead",styles:"#styles:,font-medium"};return n&&(c._parent=n),[c,...l(i)]},r=n=>{const i=f.generateUUID(),c={_id:i,_type:"TableBody",styles:"#styles:,"};return n&&(c._parent=n),[c,...l(i),...l(i)]};if(e==="Table"){const n=f.generateUUID();return[{_id:n,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...s(n),...r(n)]}return e==="TableRow"?l():e==="TableHead"?s():e==="TableBody"?r():[]},te=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("table",{...t,...s},l):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE HEAD / BODY"})};d.registerChaiBlock(te,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:h.TableIcon,props:{styles:o.S({default:""})},blocks:B("Table")});const le=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("thead",{...t,...s},l):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};d.registerChaiBlock(le,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:h.BorderTopIcon,props:{styles:o.S({default:""})},blocks:B("TableHead")});const oe=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("tbody",{...t,...s},l):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};d.registerChaiBlock(oe,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:h.BorderAllIcon,props:{styles:o.S({default:""})},blocks:B("TableBody")});const se=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("tr",{...t,...s},l):a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE CELL"})};d.registerChaiBlock(se,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:h.ViewHorizontalIcon,props:{styles:o.S({default:"w-full"})},blocks:B("TableRow")});const re=e=>{const{blockProps:t,children:l,content:s,styles:r}=e;return!l&&y.isEmpty(s)?a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t}):l?u.createElement("td",{...t,...r},l):u.createElement("td",{...t,...r,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(re,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:h.DragHandleHorizontalIcon,props:{styles:o.S({default:""}),content:o.m({title:"Content",default:"Table cell item"})}});const ne=e=>{const{blockProps:t,errorMessage:l,name:s,_type:r,successMessage:n,action:i,styles:c,children:p}=e;let m=p;p||(m=a.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},text:"FORM FIELDS"}));const x={"x-data":"useForm","x-on:submit.prevent":"post"},g={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return a.jsxRuntimeExports.jsxs("form",{...x,"data-error":l,"data-success":n,method:"post",action:i,...t,...c,children:[a.jsxRuntimeExports.jsx("div",{...g}),a.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||r}),m]})};d.registerChaiBlock(ne,{type:"Form",label:"Form",category:"core",icon:h.GroupIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),action:o.u({title:"Submit URL",default:"/api/form/submit"}),errorMessage:o.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:o.m({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0});const ae=e=>{const{blockProps:t,content:l,styles:s,children:r}=e,n={...s,...t};return r?u.createElement("label",n,r):u.createElement("label",{...n,dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(ae,{type:"Label",label:"Label",category:"core",icon:h.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),content:o.u({title:"Content",default:"Label"})}});const ie=e=>{const{blockProps:t,inBuilder:l,label:s,placeholder:r,styles:n,inputStyles:i,icon:c,iconPos:p}=e,m=f.generateUUID(),x={"x-bind:disabled":"formLoading"};return a.jsxRuntimeExports.jsxs("button",{id:m,...x,...i,...n,...t||{},type:l?"button":"submit",placeholder:r,children:[s,c&&a.jsxRuntimeExports.jsx("span",{className:p,dangerouslySetInnerHTML:{__html:c}})]})};d.registerChaiBlock(ie,{type:"FormButton",label:"Submit Button",category:"core",icon:h.ButtonIcon,group:"form",hidden:!0,props:{label:o.u({title:"Label",default:"Submit"}),styles:o.S({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:o.T({title:"Icon",default:""}),iconPos:o.s({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const ce=e=>{const{blockProps:t,fieldName:l,label:s,styles:r,inputStyles:n,required:i,checked:c,showLabel:p=!0}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...r,...t,children:[a.jsxRuntimeExports.jsx("input",{...n,name:l,id:m,type:"checkbox",required:i,defaultChecked:c}),s&&s!=="Label"&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):a.jsxRuntimeExports.jsx("input",{id:m,...t,...n,...r,type:"checkbox",required:i,name:l})};d.registerChaiBlock(ce,{type:"Checkbox",label:"Checkbox",category:"core",icon:h.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:o.u({title:"Field Name",default:"checkbox"}),styles:o.S({default:"flex items-center gap-x-2"}),label:o.u({title:"Label",default:"Label"}),checked:o.r({title:"Checked",default:!1}),required:o.r({title:"Required",default:!1})}});const de=e=>{const{blockProps:t,label:l,placeholder:s,styles:r,inputStyles:n,showLabel:i,required:c,inputType:p="text",inBuilder:m,fieldName:x}=e,g=f.generateUUID();return!i||p==="submit"?(p==="submit"&&(t.value=l),a.jsxRuntimeExports.jsx("input",{id:g,name:x,readOnly:m,...t,...n,...r,type:p,placeholder:s,required:c})):a.jsxRuntimeExports.jsxs("div",{...r,...t,children:[i&&a.jsxRuntimeExports.jsx("label",{htmlFor:g,children:l}),a.jsxRuntimeExports.jsx("input",{name:x,readOnly:m,...n,id:g,type:p,placeholder:s,required:c})]})};d.registerChaiBlock(de,{type:"Input",label:"Input",category:"core",icon:h.InputIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),fieldName:o.u({title:"Field Name",default:"input"}),inputType:o.s({title:"Type",options:y.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],e=>({value:e,title:e})),default:"text"}),value:o.u({title:"Value",default:""}),showLabel:o.r({title:"Show label",default:!0}),inputStyles:o.S({default:"w-full p-1"}),label:o.u({title:"Label",default:"Label"}),placeholder:o.u({title:"Placeholder",default:"Placeholder"}),required:o.r({title:"Required",default:!1})}});const ue=e=>{const{blockProps:t,fieldName:l,label:s,styles:r,inputStyles:n,checked:i,required:c,showLabel:p=!0}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...r,...t,children:[a.jsxRuntimeExports.jsx("input",{...n,name:l,id:m,type:"radio",required:c,defaultChecked:i}),s&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):a.jsxRuntimeExports.jsx("input",{id:m,...t,...n,...r,type:"radio",required:c,checked:i,name:l})};d.registerChaiBlock(ue,{type:"Radio",label:"Radio",category:"core",icon:h.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:o.S({default:"flex items-center w-max gap-x-2"}),fieldName:o.u({title:"Field Name",default:"radio"}),label:o.u({title:"Label",default:"Label"}),checked:o.r({title:"Checked",default:!1}),required:o.r({title:"Required",default:!1})}});const pe=e=>{const{blockProps:t,fieldName:l,label:s,placeholder:r,styles:n,inputStyles:i,required:c,showLabel:p,_multiple:m=!1}=e,x=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...n,children:[p&&a.jsxRuntimeExports.jsx("label",{htmlFor:x,children:s}),a.jsxRuntimeExports.jsxs("select",{...i,id:x,placeholder:r,required:c,multiple:m,name:l,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),y.map(e.options,g=>a.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})]}):a.jsxRuntimeExports.jsxs("select",{id:x,...n,...t,placeholder:r,required:c,multiple:m,name:l,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),y.map(e.options,g=>a.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})};d.registerChaiBlock(pe,{type:"Select",label:"Select",category:"core",icon:h.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),fieldName:o.u({title:"Field Name",default:"select"}),showLabel:o.r({title:"Show label",default:!0}),inputStyles:o.S({default:"w-full p-1"}),label:o.u({title:"Label",default:"Label"}),placeholder:o.u({title:"Placeholder",default:"Placeholder"}),required:o.r({title:"Required",default:!1}),_multiple:o.r({title:"Multiple Choice",default:!1}),options:o.h({title:"Options",itemProperties:{label:o.u({title:"Label",default:""}),value:o.u({title:"Value",default:""})}})}});const me=e=>{const{blockProps:t,fieldName:l,label:s,placeholder:r,styles:n,inputStyles:i,_rows:c,showLabel:p}=e,m=f.generateUUID();return p?a.jsxRuntimeExports.jsxs("div",{...n,...t,children:[p&&a.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s}),a.jsxRuntimeExports.jsx("textarea",{name:l,...i,id:m,placeholder:r,rows:c})]}):a.jsxRuntimeExports.jsx("textarea",{id:m,name:l,...t,...i,...n,placeholder:r,rows:c})};d.registerChaiBlock(me,{type:"TextArea",label:"TextArea",category:"core",icon:h.InputIcon,group:"form",hidden:!0,props:{fieldName:o.u({title:"Field Name",default:"textarea"}),showLabel:o.r({title:"Show label",default:!0}),styles:o.S({default:""}),inputStyles:o.S({default:"w-full p-1"}),label:o.u({title:"Label",default:"Label"}),placeholder:o.u({title:"Placeholder",default:"Placeholder"}),_rows:o.c({title:"Rows",default:3})}});const he=y.noop;exports.loadWebBlocks=he;
|
|
33
|
+
</div>`.replace(/hs-unstyled-collapse/g,`dnd-collapse-${f.generateUUID()}`))});const Q=e=>{const{blockProps:t,backgroundImage:l,children:s,styles:r}=e;let a={};return l&&(a={backgroundImage:`url(${l})`}),u.createElement("div",{...t,...r,style:a},s)};d.registerChaiBlock(Q,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:o.S({default:"font-body antialiased"}),backgroundImage:o.q({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const ee=e=>{const{blockProps:t,styles:l}=e;return u.createElement("br",{...t,...l})};d.registerChaiBlock(ee,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:h.SpaceBetweenVerticallyIcon,props:{styles:o.S({default:""})}});const B=e=>{const t=(a,i)=>({_id:f.generateUUID(),_parent:a,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+i}`}),l=a=>{const i=f.generateUUID(),c={_type:"TableRow",_id:i,styles:"#styles:,border-b"};return a&&(c._parent=a),[c,t(i,"1"),t(i,"2"),t(i,"3")]},s=a=>{const i=f.generateUUID(),c={_id:i,_type:"TableHead",styles:"#styles:,font-medium"};return a&&(c._parent=a),[c,...l(i)]},r=a=>{const i=f.generateUUID(),c={_id:i,_type:"TableBody",styles:"#styles:,"};return a&&(c._parent=a),[c,...l(i),...l(i)]};if(e==="Table"){const a=f.generateUUID();return[{_id:a,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...s(a),...r(a)]}return e==="TableRow"?l():e==="TableHead"?s():e==="TableBody"?r():[]},te=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("table",{...t,...s},l):n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE HEAD / BODY"})};d.registerChaiBlock(te,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:h.TableIcon,props:{styles:o.S({default:""})},blocks:B("Table")});const le=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("thead",{...t,...s},l):n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};d.registerChaiBlock(le,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:h.BorderTopIcon,props:{styles:o.S({default:""})},blocks:B("TableHead")});const oe=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("tbody",{...t,...s},l):n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE ROW"})};d.registerChaiBlock(oe,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:h.BorderAllIcon,props:{styles:o.S({default:""})},blocks:B("TableBody")});const se=e=>{const{blockProps:t,children:l,styles:s}=e;return l?u.createElement("tr",{...t,...s},l):n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t,text:"TABLE CELL"})};d.registerChaiBlock(se,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:h.ViewHorizontalIcon,props:{styles:o.S({default:"w-full"})},blocks:B("TableRow")});const re=e=>{const{blockProps:t,children:l,content:s,styles:r}=e;return!l&&y.isEmpty(s)?n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:t}):l?u.createElement("td",{...t,...r},l):u.createElement("td",{...t,...r,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(re,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:h.DragHandleHorizontalIcon,props:{styles:o.S({default:""}),content:o.m({title:"Content",default:"Table cell item",ai:{html:!0}})}});const ae=e=>{const{blockProps:t,errorMessage:l,name:s,_type:r,successMessage:a,action:i,styles:c,children:p}=e;let m=p;p||(m=n.jsxRuntimeExports.jsx(b.EmptySlot,{blockProps:{},text:"FORM FIELDS"}));const x={"x-data":"useForm","x-on:submit.prevent":"post"},g={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return n.jsxRuntimeExports.jsxs("form",{...x,"data-error":l,"data-success":a,method:"post",action:i,...t,...c,children:[n.jsxRuntimeExports.jsx("div",{...g}),n.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||r}),m]})};d.registerChaiBlock(ae,{type:"Form",label:"Form",category:"core",icon:h.GroupIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),action:o.l({title:"Submit URL",default:"/api/form/submit"}),errorMessage:o.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:o.m({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0});const ne=e=>{const{blockProps:t,content:l,styles:s,children:r}=e,a={...s,...t};return r?u.createElement("label",a,r):u.createElement("label",{...a,dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(ne,{type:"Label",label:"Label",category:"core",icon:h.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),content:o.l({title:"Content",default:"Label",ai:{html:!1}})}});const ie=e=>{const{blockProps:t,inBuilder:l,label:s,placeholder:r,styles:a,inputStyles:i,icon:c,iconPos:p}=e,m=f.generateUUID(),x={"x-bind:disabled":"formLoading"};return n.jsxRuntimeExports.jsxs("button",{id:m,...x,...i,...a,...t||{},type:l?"button":"submit",placeholder:r,children:[s,c&&n.jsxRuntimeExports.jsx("span",{className:p,dangerouslySetInnerHTML:{__html:c}})]})};d.registerChaiBlock(ie,{type:"FormButton",label:"Submit Button",category:"core",icon:h.ButtonIcon,group:"form",hidden:!0,props:{label:o.l({title:"Label",default:"Submit"}),styles:o.S({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:o.o({title:"Icon",default:""}),iconPos:o.y({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const ce=e=>{const{blockProps:t,fieldName:l,label:s,styles:r,inputStyles:a,required:i,checked:c,showLabel:p=!0}=e,m=f.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[n.jsxRuntimeExports.jsx("input",{...a,name:l,id:m,type:"checkbox",required:i,defaultChecked:c}),s&&s!=="Label"&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:m,...t,...a,...r,type:"checkbox",required:i,name:l})};d.registerChaiBlock(ce,{type:"Checkbox",label:"Checkbox",category:"core",icon:h.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:o.l({title:"Field Name",default:"checkbox"}),styles:o.S({default:"flex items-center gap-x-2"}),label:o.l({title:"Label",default:"Label"}),checked:o.r({title:"Checked",default:!1}),required:o.r({title:"Required",default:!1})}});const de=e=>{const{blockProps:t,label:l,placeholder:s,styles:r,inputStyles:a,showLabel:i,required:c,inputType:p="text",inBuilder:m,fieldName:x}=e,g=f.generateUUID();return!i||p==="submit"?(p==="submit"&&(t.value=l),n.jsxRuntimeExports.jsx("input",{id:g,name:x,readOnly:m,...t,...a,...r,type:p,placeholder:s,required:c})):n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[i&&n.jsxRuntimeExports.jsx("label",{htmlFor:g,children:l}),n.jsxRuntimeExports.jsx("input",{name:x,readOnly:m,...a,id:g,type:p,placeholder:s,required:c})]})};d.registerChaiBlock(de,{type:"Input",label:"Input",category:"core",icon:h.InputIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),fieldName:o.l({title:"Field Name",default:"input"}),inputType:o.y({title:"Type",options:y.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],e=>({value:e,title:e})),default:"text"}),value:o.l({title:"Value",default:""}),showLabel:o.r({title:"Show label",default:!0}),inputStyles:o.S({default:"w-full p-1"}),label:o.l({title:"Label",default:"Label"}),placeholder:o.l({title:"Placeholder",default:"Placeholder"}),required:o.r({title:"Required",default:!1})}});const ue=e=>{const{blockProps:t,fieldName:l,label:s,styles:r,inputStyles:a,checked:i,required:c,showLabel:p=!0}=e,m=f.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...r,...t,children:[n.jsxRuntimeExports.jsx("input",{...a,name:l,id:m,type:"radio",required:c,defaultChecked:i}),s&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:m,...t,...a,...r,type:"radio",required:c,checked:i,name:l})};d.registerChaiBlock(ue,{type:"Radio",label:"Radio",category:"core",icon:h.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:o.S({default:"flex items-center w-max gap-x-2"}),fieldName:o.l({title:"Field Name",default:"radio"}),label:o.l({title:"Label",default:"Label"}),checked:o.r({title:"Checked",default:!1}),required:o.r({title:"Required",default:!1})}});const pe=e=>{const{blockProps:t,fieldName:l,label:s,placeholder:r,styles:a,inputStyles:i,required:c,showLabel:p,_multiple:m=!1}=e,x=f.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...a,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:x,children:s}),n.jsxRuntimeExports.jsxs("select",{...i,id:x,placeholder:r,required:c,multiple:m,name:l,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),y.map(e.options,g=>n.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})]}):n.jsxRuntimeExports.jsxs("select",{id:x,...a,...t,placeholder:r,required:c,multiple:m,name:l,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),y.map(e.options,g=>n.jsxRuntimeExports.jsx("option",{selected:y.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})};d.registerChaiBlock(pe,{type:"Select",label:"Select",category:"core",icon:h.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:o.S({default:""}),fieldName:o.l({title:"Field Name",default:"select"}),showLabel:o.r({title:"Show label",default:!0}),inputStyles:o.S({default:"w-full p-1"}),label:o.l({title:"Label",default:"Label"}),placeholder:o.l({title:"Placeholder",default:"Placeholder"}),required:o.r({title:"Required",default:!1}),_multiple:o.r({title:"Multiple Choice",default:!1}),options:o.h({title:"Options",itemProperties:{label:o.l({title:"Label",default:""}),value:o.l({title:"Value",default:""})}})}});const me=e=>{const{blockProps:t,fieldName:l,label:s,placeholder:r,styles:a,inputStyles:i,_rows:c,showLabel:p}=e,m=f.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...a,...t,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:m,children:s}),n.jsxRuntimeExports.jsx("textarea",{name:l,...i,id:m,placeholder:r,rows:c})]}):n.jsxRuntimeExports.jsx("textarea",{id:m,name:l,...t,...i,...a,placeholder:r,rows:c})};d.registerChaiBlock(me,{type:"TextArea",label:"TextArea",category:"core",icon:h.InputIcon,group:"form",hidden:!0,props:{fieldName:o.l({title:"Field Name",default:"textarea"}),showLabel:o.r({title:"Show label",default:!0}),styles:o.S({default:""}),inputStyles:o.S({default:"w-full p-1"}),label:o.l({title:"Label",default:"Label"}),placeholder:o.l({title:"Placeholder",default:"Placeholder"}),_rows:o.c({title:"Rows",default:3})}});const he=y.noop;exports.loadWebBlocks=he;
|