@chaibuilder/sdk 1.2.55 → 1.2.57
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-HeYXoex4.js → AddBlocks-05ZH2Suu.js} +46 -50
- package/dist/AddBlocks-MH_fqSRf.cjs +1 -0
- package/dist/{CanvasArea-CqILE5PR.js → CanvasArea-8f_Ki3B7.js} +361 -361
- package/dist/CanvasArea-UisRL54b.cjs +56 -0
- package/dist/CodeEditor-vECReGwz.cjs +1 -0
- package/dist/{CodeEditor-kxV5RCpd.js → CodeEditor-zYBqhBv3.js} +33 -39
- package/dist/CurrentPage-7aEIhzQ0.cjs +1 -0
- package/dist/{CurrentPage-IrFGAb7n.js → CurrentPage-nzo4lszx.js} +26 -25
- package/dist/ListTree-A-097CZ-.cjs +1 -0
- package/dist/{ListTree-0n_G8NJx.js → ListTree-KUGhFsb_.js} +9 -13
- package/dist/PagesPanel-L1mI3y_6.cjs +1 -0
- package/dist/{PagesPanel-RYBf0Yct.js → PagesPanel-hleqqZBo.js} +20 -19
- package/dist/ProjectPanel-HTxa1kHv.cjs +1 -0
- package/dist/{ProjectPanel-Zagx6l3Q.js → ProjectPanel-RXEhYr0a.js} +25 -24
- package/dist/Settings-7EMwx6zL.cjs +1 -0
- package/dist/{Settings-RLDTFFf8.js → Settings-b1ZuIn4y.js} +404 -395
- package/dist/{SidePanels-ao969pMV.js → SidePanels-6hZeCR5Z.js} +89 -88
- package/dist/SidePanels-_6WlMWq_.cjs +1 -0
- package/dist/ThemeConfiguration-PvMN3j6h.cjs +1 -0
- package/dist/{ThemeConfiguration-S7yArRMp.js → ThemeConfiguration-ab7lbA2y.js} +18 -24
- package/dist/Topbar-WdGZIIZp.cjs +1 -0
- package/dist/{Topbar-B8u0whpc.js → Topbar-YfsC1DZ2.js} +39 -38
- package/dist/{UILibrariesPanel-tcfz2ELp.js → UILibrariesPanel-5QxxXYg2.js} +56 -61
- package/dist/UILibrariesPanel-r8nQzXQ-.cjs +1 -0
- package/dist/{UnsplashImages-wWRifkCp.js → UnsplashImages-alt_doTy.js} +42 -47
- package/dist/UnsplashImages-cah1BRL_.cjs +1 -0
- package/dist/UploadImages-5dRETWCo.cjs +1 -0
- package/dist/{UploadImages-lUvZhW_j.js → UploadImages-JqVL_aQd.js} +32 -38
- package/dist/{add-page-modal-04b4l2zu.js → add-page-modal-CtMwNEsW.js} +29 -28
- package/dist/add-page-modal-DA5P4pVu.cjs +1 -0
- package/dist/{confirm-alert-FX5030eR.js → confirm-alert-m85JJlQi.js} +15 -21
- package/dist/confirm-alert-rYsxlfR4.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +44 -43
- package/dist/delete-page-modal-AvUZI9Tk.cjs +1 -0
- package/dist/{delete-page-modal-1u9CyAIP.js → delete-page-modal-TMpN1Dvm.js} +22 -21
- package/dist/email.cjs +1 -1
- package/dist/email.js +19 -19
- package/dist/form-G3PqS2Gc.cjs +1 -0
- package/dist/{form-HRdEJjVq.js → form-MSL4CDff.js} +3 -3
- package/dist/{html-to-json-OnIZDDXw.js → html-to-json-_01DXd-a.js} +37 -36
- package/dist/html-to-json-ndxaXRT8.cjs +1 -0
- package/dist/{index-vfmO3y2d.js → index--hN9ZQsP.js} +19 -19
- package/dist/index-0FIxW0gR.cjs +1 -0
- package/dist/{ChaiBuilderEditor-tkzS851D.js → index-IgLSTkN6.js} +14660 -17763
- package/dist/index-sspgZwTk.cjs +206 -0
- package/dist/index-uLn8W3eR.js +3145 -0
- package/dist/index-zaKhyTQ6.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +17 -16
- package/dist/page-viewer-2BMSxxfd.cjs +1 -0
- package/dist/{page-viewer-dcb3u4OV.js → page-viewer-D8nsi13f.js} +27 -26
- package/dist/project-general-setting--0hX9Otn.cjs +1 -0
- package/dist/{project-general-setting--sS34seu.js → project-general-setting-HGjTNFRx.js} +23 -22
- package/dist/{project-seo-setting-8tc3I-0M.js → project-seo-setting-3kFJ77jY.js} +20 -26
- package/dist/project-seo-setting-C3ilIIeM.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +104 -102
- package/dist/single-page-detail-7BpYAyMO.cjs +1 -0
- package/dist/{single-page-detail-tP2pfgBp.js → single-page-detail-eMnjt_Ih.js} +26 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +19 -18
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +144 -150
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +168 -111
- package/package.json +1 -1
- package/dist/AddBlocks-VHoZezjj.cjs +0 -1
- package/dist/CanvasArea-137WY3Wx.cjs +0 -56
- package/dist/ChaiBuilderEditor-aY8flOgX.cjs +0 -206
- package/dist/CodeEditor-R2jKe97T.cjs +0 -1
- package/dist/CurrentPage-PjrVzHXR.cjs +0 -1
- package/dist/ListTree-C6oCXZDV.cjs +0 -1
- package/dist/PagesPanel-lIC3kYmS.cjs +0 -1
- package/dist/ProjectPanel-0Siyi5YS.cjs +0 -1
- package/dist/Settings-6QRVcl16.cjs +0 -1
- package/dist/SidePanels-j1EFsBlK.cjs +0 -1
- package/dist/ThemeConfiguration-q1471P7b.cjs +0 -1
- package/dist/Topbar-ogFKKDbx.cjs +0 -1
- package/dist/UILibrariesPanel-cm9CFWxc.cjs +0 -1
- package/dist/UnsplashImages-E2L3YDJI.cjs +0 -1
- package/dist/UploadImages-s-eeaGiS.cjs +0 -1
- package/dist/add-page-modal-eroF20lO.cjs +0 -1
- package/dist/confirm-alert-XuxEzG-V.cjs +0 -1
- package/dist/delete-page-modal-pgh7sdfg.cjs +0 -1
- package/dist/form-Z4IRWj0o.cjs +0 -1
- package/dist/html-to-json-rauxDBi6.cjs +0 -1
- package/dist/index-bt7EhwLh.cjs +0 -1
- package/dist/page-viewer-O960kM2x.cjs +0 -1
- package/dist/project-general-setting-lIvNs-Vq.cjs +0 -1
- package/dist/project-seo-setting-MIlAuqcc.cjs +0 -1
- package/dist/single-page-detail-0Z_hvd_j.cjs +0 -1
- package/dist/useCanvasSettings-R0h03UfD.cjs +0 -1
- package/dist/useCanvasSettings-rEZHbw3s.js +0 -6
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-0FIxW0gR.cjs");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.IconPickerField=e.IconPickerField;exports.ImagePickerField=e.ImagePickerField;exports.Input=e.Input;exports.Label=e.Label;exports.LinkField=e.LinkField;exports.Menubar=e.Menubar;exports.MenubarCheckboxItem=e.MenubarCheckboxItem;exports.MenubarContent=e.MenubarContent;exports.MenubarGroup=e.MenubarGroup;exports.MenubarItem=e.MenubarItem;exports.MenubarLabel=e.MenubarLabel;exports.MenubarMenu=e.MenubarMenu;exports.MenubarPortal=e.MenubarPortal;exports.MenubarRadioGroup=e.MenubarRadioGroup;exports.MenubarRadioItem=e.MenubarRadioItem;exports.MenubarSeparator=e.MenubarSeparator;exports.MenubarShortcut=e.MenubarShortcut;exports.MenubarSub=e.MenubarSub;exports.MenubarSubContent=e.MenubarSubContent;exports.MenubarSubTrigger=e.MenubarSubTrigger;exports.MenubarTrigger=e.MenubarTrigger;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.RTEField=e.RichTextEditorField;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Separator=e.Separator;exports.Sheet=e.Sheet;exports.SheetClose=e.SheetClose;exports.SheetContent=e.SheetContent;exports.SheetDescription=e.SheetDescription;exports.SheetFooter=e.SheetFooter;exports.SheetHeader=e.SheetHeader;exports.SheetTitle=e.SheetTitle;exports.SheetTrigger=e.SheetTrigger;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Toggle=e.Toggle;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.toggleVariants=e.toggleVariants;exports.useToast=e.useToast;
|
package/dist/ui.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as N, O, M as q, N as z, bz as J, bL as Q, A as U, P as W, g as X, b as _, e as j, f as Y, c as Z, d as $, a as aa, bA as ea, aI as oa, B as ta, bu as ra, bx as sa, bw as na, by as ia, bv as ba, bN as pa, bb as ua, ck as ca, be as ma, bf as la, bc as da, bg as ga, bd as Ca, cm as Ma, cl as Sa, bE as Da, cn as Ta, bD as xa, cs as Aa, bC as wa, cp as Ia, ct as ha, cx as Pa, co as Fa, cq as La, cr as va, cu as Ga, cv as ka, cw as Ha, bF as Ra, au as Va, av as Ba, ay as Ea, bh as fa, aw as ya, ax as Ka, aE as Na, E as Oa, aV as qa, G as za, bs as Ja, J as Qa, H as Ua, cd as Wa, ch as Xa, cc as _a, I as ja, bt as Ya, ce as Za, cf as $a, cg as ae, F as ee, aS as oe, aU as te, aT as re, bl as se, bm as ne, bp as ie, aX as be, bn as pe, bP as ue, bW as ce, bS as me, c0 as le, bT as de, bV as ge, bQ as Ce, bZ as Me, bX as Se, bY as De, bU as Te, c2 as xe, c1 as Ae, b_ as we, b$ as Ie, bR as he, b8 as Pe, ba as Fe, b9 as Le, bk as ve, br as Ge, bO as ke, az as He, aC as Re, aO as Ve, aD as Be, aP as Ee, c3 as fe, aA as ye, aB as Ke, aQ as Ne, c4 as Oe, c6 as qe, c7 as ze, cb as Je, c9 as Qe, c8 as Ue, ca as We, c5 as Xe, S as _e, aR as je, aK as Ye, aN as Ze, aL as $e, aM as ao, T as eo, _ as oo, bI as to, aF as ro, aH as so, bq as no, W as io, aG as bo, bM as po, bK as uo, ci as co, cj as mo, bJ as lo, K as go } from "./index-uLn8W3eR.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "@floating-ui/react-dom";
|
|
9
|
-
import "jotai";
|
|
10
|
-
import "i18next";
|
|
11
|
-
import "react-i18next";
|
|
12
|
-
import "flagged";
|
|
5
|
+
import "@radix-ui/react-toggle";
|
|
6
|
+
import "class-variance-authority";
|
|
7
|
+
import "./utils-VpVqnC9m.js";
|
|
13
8
|
import "lodash-es";
|
|
14
9
|
import "./MODIFIERS-fd5XOmum.js";
|
|
15
|
-
import "
|
|
10
|
+
import "clsx";
|
|
16
11
|
import "tailwind-merge";
|
|
17
|
-
import "@chaibuilder/runtime";
|
|
18
|
-
import "@react-hookz/web";
|
|
19
|
-
import "tree-model";
|
|
20
|
-
import "./utils-VpVqnC9m.js";
|
|
21
|
-
import "@radix-ui/react-toggle";
|
|
22
|
-
import "class-variance-authority";
|
|
23
12
|
import "@radix-ui/react-switch";
|
|
24
13
|
import "@radix-ui/react-slot";
|
|
25
14
|
import "@radix-ui/react-accordion";
|
|
@@ -27,6 +16,7 @@ import "@radix-ui/react-icons";
|
|
|
27
16
|
import "@radix-ui/react-alert-dialog";
|
|
28
17
|
import "@radix-ui/react-dialog";
|
|
29
18
|
import "@radix-ui/react-label";
|
|
19
|
+
import "@radix-ui/react-scroll-area";
|
|
30
20
|
import "@radix-ui/react-tabs";
|
|
31
21
|
import "@radix-ui/react-tooltip";
|
|
32
22
|
import "@radix-ui/react-popover";
|
|
@@ -39,146 +29,150 @@ import "@radix-ui/react-toast";
|
|
|
39
29
|
import "cmdk";
|
|
40
30
|
import "@radix-ui/react-context-menu";
|
|
41
31
|
import "react-icons-picker";
|
|
32
|
+
import "react-dom";
|
|
42
33
|
import "react-quill";
|
|
43
|
-
import "
|
|
44
|
-
import "
|
|
45
|
-
import "
|
|
34
|
+
import "./Functions-7jnEwJyw.js";
|
|
35
|
+
import "@chaibuilder/runtime";
|
|
36
|
+
import "jotai";
|
|
37
|
+
import "@react-hookz/web";
|
|
38
|
+
import "tree-model";
|
|
39
|
+
import "react-i18next";
|
|
46
40
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
N as Accordion,
|
|
42
|
+
O as AccordionContent,
|
|
43
|
+
q as AccordionItem,
|
|
50
44
|
z as AccordionTrigger,
|
|
51
45
|
J as Alert,
|
|
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
|
-
|
|
46
|
+
Q as AlertDescription,
|
|
47
|
+
U as AlertDialog,
|
|
48
|
+
W as AlertDialogAction,
|
|
49
|
+
X as AlertDialogCancel,
|
|
50
|
+
_ as AlertDialogContent,
|
|
51
|
+
j as AlertDialogDescription,
|
|
52
|
+
Y as AlertDialogFooter,
|
|
53
|
+
Z as AlertDialogHeader,
|
|
54
|
+
$ as AlertDialogTitle,
|
|
55
|
+
aa as AlertDialogTrigger,
|
|
56
|
+
ea as AlertTitle,
|
|
57
|
+
oa as Badge,
|
|
58
|
+
ta as Button,
|
|
59
|
+
ra as Card,
|
|
60
|
+
sa as CardContent,
|
|
61
|
+
na as CardDescription,
|
|
62
|
+
ia as CardFooter,
|
|
63
|
+
ba as CardHeader,
|
|
64
|
+
pa as CardTitle,
|
|
65
|
+
ua as Command,
|
|
66
|
+
ca as CommandDialog,
|
|
67
|
+
ma as CommandEmpty,
|
|
68
|
+
la as CommandGroup,
|
|
69
|
+
da as CommandInput,
|
|
70
|
+
ga as CommandItem,
|
|
71
|
+
Ca as CommandList,
|
|
72
|
+
Ma as CommandSeparator,
|
|
73
|
+
Sa as CommandShortcut,
|
|
74
|
+
Da as ContextMenu,
|
|
75
|
+
Ta as ContextMenuCheckboxItem,
|
|
76
|
+
xa as ContextMenuContent,
|
|
77
|
+
Aa as ContextMenuGroup,
|
|
78
|
+
wa as ContextMenuItem,
|
|
79
|
+
Ia as ContextMenuLabel,
|
|
80
|
+
ha as ContextMenuPortal,
|
|
81
|
+
Pa as ContextMenuRadioGroup,
|
|
82
|
+
Fa as ContextMenuRadioItem,
|
|
83
|
+
La as ContextMenuSeparator,
|
|
84
|
+
va as ContextMenuShortcut,
|
|
85
|
+
Ga as ContextMenuSub,
|
|
86
|
+
ka as ContextMenuSubContent,
|
|
87
|
+
Ha as ContextMenuSubTrigger,
|
|
88
|
+
Ra as ContextMenuTrigger,
|
|
89
|
+
Va as Dialog,
|
|
90
|
+
Ba as DialogContent,
|
|
91
|
+
Ea as DialogDescription,
|
|
92
|
+
fa as DialogFooter,
|
|
93
|
+
ya as DialogHeader,
|
|
94
|
+
Ka as DialogTitle,
|
|
95
|
+
Na as DialogTrigger,
|
|
96
|
+
Oa as DropdownMenu,
|
|
97
|
+
qa as DropdownMenuCheckboxItem,
|
|
104
98
|
za as DropdownMenuContent,
|
|
105
99
|
Ja as DropdownMenuGroup,
|
|
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
|
-
|
|
100
|
+
Qa as DropdownMenuItem,
|
|
101
|
+
Ua as DropdownMenuLabel,
|
|
102
|
+
Wa as DropdownMenuPortal,
|
|
103
|
+
Xa as DropdownMenuRadioGroup,
|
|
104
|
+
_a as DropdownMenuRadioItem,
|
|
105
|
+
ja as DropdownMenuSeparator,
|
|
106
|
+
Ya as DropdownMenuShortcut,
|
|
107
|
+
Za as DropdownMenuSub,
|
|
108
|
+
$a as DropdownMenuSubContent,
|
|
109
|
+
ae as DropdownMenuSubTrigger,
|
|
110
|
+
ee as DropdownMenuTrigger,
|
|
111
|
+
oe as HoverCard,
|
|
112
|
+
te as HoverCardContent,
|
|
113
|
+
re as HoverCardTrigger,
|
|
114
|
+
se as IconPickerField,
|
|
115
|
+
ne as ImagePickerField,
|
|
116
|
+
ie as Input,
|
|
117
|
+
be as Label,
|
|
118
|
+
pe as LinkField,
|
|
119
|
+
ue as Menubar,
|
|
120
|
+
ce as MenubarCheckboxItem,
|
|
121
|
+
me as MenubarContent,
|
|
122
|
+
le as MenubarGroup,
|
|
123
|
+
de as MenubarItem,
|
|
124
|
+
ge as MenubarLabel,
|
|
125
|
+
Ce as MenubarMenu,
|
|
126
|
+
Me as MenubarPortal,
|
|
127
|
+
Se as MenubarRadioGroup,
|
|
128
|
+
De as MenubarRadioItem,
|
|
129
|
+
Te as MenubarSeparator,
|
|
130
|
+
xe as MenubarShortcut,
|
|
131
|
+
Ae as MenubarSub,
|
|
132
|
+
we as MenubarSubContent,
|
|
133
|
+
Ie as MenubarSubTrigger,
|
|
134
|
+
he as MenubarTrigger,
|
|
135
|
+
Pe as Popover,
|
|
136
|
+
Fe as PopoverContent,
|
|
137
|
+
Le as PopoverTrigger,
|
|
138
|
+
ve as RTEField,
|
|
139
|
+
Ge as ScrollArea,
|
|
140
|
+
ke as ScrollBar,
|
|
141
|
+
He as Select,
|
|
142
|
+
Re as SelectContent,
|
|
143
|
+
Ve as SelectGroup,
|
|
144
|
+
Be as SelectItem,
|
|
145
|
+
Ee as SelectLabel,
|
|
146
|
+
fe as SelectSeparator,
|
|
147
|
+
ye as SelectTrigger,
|
|
148
|
+
Ke as SelectValue,
|
|
149
|
+
Ne as Separator,
|
|
150
|
+
Oe as Sheet,
|
|
151
|
+
qe as SheetClose,
|
|
158
152
|
ze as SheetContent,
|
|
159
153
|
Je as SheetDescription,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
154
|
+
Qe as SheetFooter,
|
|
155
|
+
Ue as SheetHeader,
|
|
156
|
+
We as SheetTitle,
|
|
157
|
+
Xe as SheetTrigger,
|
|
158
|
+
_e as Skeleton,
|
|
159
|
+
je as Switch,
|
|
160
|
+
Ye as Tabs,
|
|
161
|
+
Ze as TabsContent,
|
|
162
|
+
$e as TabsList,
|
|
163
|
+
ao as TabsTrigger,
|
|
164
|
+
eo as Textarea,
|
|
165
|
+
oo as Toaster,
|
|
166
|
+
to as Toggle,
|
|
167
|
+
ro as Tooltip,
|
|
168
|
+
so as TooltipContent,
|
|
169
|
+
no as TooltipPortal,
|
|
170
|
+
io as TooltipProvider,
|
|
171
|
+
bo as TooltipTrigger,
|
|
172
|
+
po as badgeVariants,
|
|
173
|
+
uo as buttonVariants,
|
|
174
|
+
co as reducer,
|
|
175
|
+
mo as toast,
|
|
176
|
+
lo as toggleVariants,
|
|
177
|
+
go as useToast
|
|
184
178
|
};
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lodash-es"),r=require("./jsx-runtime-Z_BpKhVy.cjs"),G=require("react"),l=require("./controls-rRZhz0vu.cjs"),d=require("@chaibuilder/runtime"),x=require("./empty-slot-Sy930lX6.cjs"),z=require("@radix-ui/react-icons"),f=require("./Functions-N3yhPYKY.cjs"),k=require("./index--mLLy7QQ.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");function j(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>c[t]})}}return e.default=c,Object.freeze(e)}const h=j(G),E=h.memo(c=>{const{blockProps:e,inBuilder:t,backgroundImage:s,children:a,tag:i="div",styles:n}=c;let o=a;a||(o=r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:t}));let v={};return s&&(v={backgroundImage:`url(${s})`}),h.createElement(i,{...e,...n,style:v},o)});d.registerChaiBlock(E,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:l.o({default:""}),tag:l.f({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:l.v({title:"Background Image"})},canAcceptBlock:()=>!0});const S=h.memo(c=>{const{blockProps:e,styles:t}=c;return h.createElement("div",{...e,...t})});d.registerChaiBlock(S,{type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",props:{styles:l.o({default:""})},canAcceptBlock:()=>!1});const R=c=>{const{blockProps:e,styles:t,content:s,level:a="h1",children:i=null}=c;return i?h.createElement(a,{...t,...e},i):h.createElement(a,{...t,...e,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(R,{type:"Heading",label:"Heading",category:"core",icon:z.HeadingIcon,group:"typography",props:{level:l.f({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:l.o({default:"text-3xl"}),content:l.r({title:"Content",default:"Heading goes here"})},canAcceptBlock:c=>c==="Span"||c==="Text"});const C=c=>{const{blockProps:e,styles:t,content:s}=c;return u.isNull(c.children)?h.createElement("p",{...t,...e,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}}):h.createElement("p",{...t,...e},c.children)};d.registerChaiBlock(C,{type:"Paragraph",label:"Paragraph",category:"core",icon:z.TextIcon,group:"typography",props:{styles:l.o({default:""}),content:l.r({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:c=>c==="Span"||c==="Link"});const L=c=>{const{blockProps:e,styles:t,content:s,children:a=null,tag:i}=c;return a?h.createElement("span",{...t,...e},a):h.createElement(i||"span",{...t,...e,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(L,{type:"Span",label:"Span",category:"core",group:"typography",props:{styles:l.o({default:""}),content:l.r({title:"Content",default:""})},canAcceptBlock:()=>!0});const T=c=>{const{blockProps:e,content:t,styles:s}=c;return r.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:r.jsxRuntimeExports.jsx("div",{"data-ai-key":"content","data-ai-type":"richtext",...e,...s,dangerouslySetInnerHTML:{__html:t}})})};d.registerChaiBlock(T,{type:"RichText",label:"Rich Text",category:"core",icon:z.CursorTextIcon,group:"typography",props:{styles:l.o({default:""}),content:l.b({title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}});const _=c=>{const{blockProps:e,iconSize:t,icon:s,content:a,iconPos:i,styles:n,children:o}=c,v=s,M=o||r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:a}),v&&r.jsxRuntimeExports.jsx("div",{style:{width:t+"px"},className:i+" "+(i==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:v}})]});return h.createElement("button",{...e,...n,type:"button"},M)};d.registerChaiBlock(_,{type:"Button",label:"Button",category:"core",icon:z.ButtonIcon,group:"basic",props:{content:l.g({title:"Label",default:"Button"}),styles:l.o({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:l.T({title:"Icon",default:""}),iconSize:l.y({title:"Icon Size",default:24}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const P=c=>{const{blockProps:e,link:t,children:s,styles:a,inBuilder:i,content:n}=c;return!s&&u.isEmpty(a==null?void 0:a.className)&&u.isEmpty(n)?r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:i}):i?s?r.jsxRuntimeExports.jsx("span",{...e,...a,children:s}):h.createElement("span",{...e,...a,dangerouslySetInnerHTML:{__html:n}}):s?r.jsxRuntimeExports.jsx("a",{href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...e,...a,children:s}):h.createElement("a",{...e,...a,"data-ai-key":"content",href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self",dangerouslySetInnerHTML:{__html:n}})};d.registerChaiBlock(P,{type:"Link",label:"Link",category:"core",icon:z.Link1Icon,group:"basic",props:{styles:l.o({default:""}),content:l.g({title:"Content",default:""}),link:l.q({title:"Link",default:{type:"page",target:"_self",href:"#"}})},canAcceptBlock:c=>c!=="Link"});const D=(c,...e)=>({...c,className:f.cn(c.className,...e)}),N=c=>{const{blockProps:e,children:t,styles:s,inBuilder:a,content:i,href:n}=c,{hrefType:o,autoplay:v,maxWidth:M,backdropColor:p,galleryName:g}=c,m=D(s,"cb-lightbox");if(!t&&u.isEmpty(s==null?void 0:s.className)&&u.isEmpty(i))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:a});if(a)return t?r.jsxRuntimeExports.jsx("span",{...e,...m,children:t}):h.createElement("span",{...e,...m,dangerouslySetInnerHTML:{__html:i}});const B={};return B["data-vbtype"]=o,v&&(B["data-autoplay"]="true"),M&&(B["data-maxwidth"]=M+"px"),p&&(B["data-overlay"]=p),g&&(B["data-gall"]=g),t?r.jsxRuntimeExports.jsx("a",{...B,href:n||"#/",...e,...m,children:t}):h.createElement("a",{...e,...m,...B,href:n||"#",dangerouslySetInnerHTML:{__html:i}})};d.registerChaiBlock(N,{type:"LightBoxLink",label:"LightBox Link",category:"core",icon:z.ImageIcon,group:"basic",props:{styles:l.o({default:""}),content:l.g({title:"Content",default:"Link text or drop blocks inside"}),href:l.g({title:"Href",default:""}),hrefType:l.f({title:"Type",default:"video",options:[{value:"video",title:"video "},{value:"iframe",title:"iframe"},{value:"inline",title:"inline"},{value:"ajax",title:"ajax"}]}),autoplay:l.c({title:"Autoplay video",default:!1}),maxWidth:l.y({title:"Max Width",default:800}),backdropColor:l.g({title:"Backdrop Color",default:"rgba(95,164,255,0.8)"}),galleryName:l.y({title:"Max Width",default:800})},canAcceptBlock:c=>c!=="Link"});const H=c=>{const{blockProps:e,children:t,listType:s,styles:a,tag:i,inBuilder:n}=c,o=f.cn(u.get(a,"className",""),s);return!t&&u.isEmpty(a==null?void 0:a.className)?r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:n}):h.createElement(i||(s==="list-decimal"?"ol":"ul"),{...e,...a,className:o},t)};d.registerChaiBlock(H,{type:"List",label:"List",icon:z.RowsIcon,category:"core",group:"basic",props:{styles:l.o({default:""}),listType:l.f({title:"List type",default:"list-none",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},canAcceptBlock:c=>c==="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 A=c=>{const{blockProps:e,content:t,styles:s,children:a,tag:i}=c;return a?h.createElement(i||"li",{...s,...e},a):h.createElement(i||"li",{...s,...e,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(A,{type:"ListItem",label:"List Item",icon:z.ColumnsIcon,category:"core",group:"basic",props:{styles:l.o({default:""}),content:l.r({title:"Content",default:"List item"})},canAcceptBlock:c=>c!=="ListItem",canBeNested:c=>c==="List"});const q=c=>{const{blockProps:e,icon:t,styles:s,width:a,inBuilder:i,height:n}=c,o=D(s,f.cn(a?`w-[${a}px]`:"",n?`h-[${n}px]`:""));if(u.isEmpty(t))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:i,className:"h-8 w-14"});const v=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return h.createElement("span",{...e,...o,dangerouslySetInnerHTML:{__html:v}})};d.registerChaiBlock(q,{type:"Icon",label:"Icon",category:"core",icon:z.SketchLogoIcon,group:"media",props:{styles:l.o({default:"text-black"}),icon:l.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:l.y({title:"Width",default:""}),height:l.y({title:"Height",default:""})}});const U=c=>{const{blockProps:e,image:t,styles:s,alt:a,height:i,width:n}=c;return u.isEmpty(t)?r.jsxRuntimeExports.jsx(x.EmptySlot,{className:"h-36"}):h.createElement("img",{...e,...s,src:t,alt:a,loading:"lazy",height:i,width:n})};d.registerChaiBlock(U,{type:"Image",label:"Image",category:"core",icon:z.ImageIcon,group:"media",props:{styles:l.o({default:""}),image:l.v({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.g({title:"Alt",default:""}),width:l.g({title:"Width",default:""}),height:l.g({title:"Height",default:""})}});const F=c=>{var n;const{blockProps:e,inBuilder:t,styles:s,children:a}=c;let i=null;return!a&&t&&(i=r.jsxRuntimeExports.jsx("div",{className:f.cn("flex flex-col items-center justify-center",(n=c.emptyStyles)==null?void 0:n.className),children:r.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:r.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",c.name]})})})),h.createElement("div",{...s,...e,droppable:"yes"},a||i)};d.registerChaiBlock(F,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:l.o({default:""}),emptyStyles:l.o({default:""})},canAcceptBlock:()=>!0});const I=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,b=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,w=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,O=c=>{if(I.test(c)){const e=c.match(I);return e?`https://www.youtube.com/embed/${e[4]}`:c}if(b.test(c)){const e=c.match(b);return e?`https://player.vimeo.com/video/${e[3]}`:c}if(w.test(c)){const e=c.match(w);return e?`https://www.dailymotion.com/embed/video/${e[4]}`:c}return null},$=h.memo(c=>{const{blockProps:e,inBuilder:t,styles:s,url:a,controls:i}=c,n=u.get(i,"autoPlay",!1),o=u.get(i,"controls",!1),v=n||u.get(i,"muted",!0),M=u.get(i,"loop",!1);if(u.isEmpty(a))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:t,className:"h-36"});let p=O(a),g=null;if(p){if(!u.isEmpty(p)){const m=[];m.push(`autoplay=${n?1:0}`),m.push(`controls=${i?1:0}`),m.push(`mute=${v?1:0}&muted=${v?1:0}`),m.push(`loop=${M?1:0}`),p=`${p}?${m.join("&")}`}g=h.createElement("iframe",{...e,className:"absolute inset-0 w-full h-full",src:p,allow:t?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else g=h.createElement("video",{...e,className:"absolute inset-0 w-full h-full",src:a,controls:o,muted:v,autoPlay:t?!1:n,loop:M});return r.jsxRuntimeExports.jsx("div",{...u.pick(s,["className"]),children:r.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[t?r.jsxRuntimeExports.jsx("div",{...e,...u.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,g]})})});d.registerChaiBlock($,{type:"Video",label:"Video",category:"core",icon:z.VideoIcon,group:"media",props:{styles:l.o({default:""}),url:l.g({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:l.h({title:"Controls",properties:{autoPlay:l.c({title:"Autoplay",default:!0}),controls:l.c({title:"Show controls",default:!1}),loop:l.c({title:"Loop",default:!1}),muted:l.c({title:"Muted",default:!0})}})}});const V=c=>{const{blockProps:e,styles:t,htmlCode:s,inBuilder:a}=c;return a?r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[a?r.jsxRuntimeExports.jsx("div",{...e,...t,className:"absolute z-20 h-full w-full"}):null,h.createElement("div",{...t,dangerouslySetInnerHTML:{__html:s.replace(/<script.*?>.*?<\/script>/g,"")}})]}):h.createElement("div",{...e,...t,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(V,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:z.CodeIcon,group:"advanced",props:{styles:l.o({default:""}),htmlCode:l.u({title:"HTML Code",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})},canAcceptBlock:()=>!1});function W(c){return k.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(c)}const J=c=>{const{scripts:e,inBuilder:t,blockProps:s}=c;return t?r.jsxRuntimeExports.jsx("div",{...s}):r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e}})};d.registerChaiBlock(J,{type:"CustomScript",label:"Custom Script",category:"core",icon:W,group:"advanced",props:{scripts:l.u({title:"Script",default:"",placeholder:"<script>console.log('Hello, world!');<\/script>"})},canAcceptBlock:()=>!1});const Y=c=>{const{blockProps:e,styles:t}=c;return h.createElement("hr",{...t,...e})};d.registerChaiBlock(Y,{type:"Divider",label:"Divider",category:"core",icon:z.DividerHorizontalIcon,group:"basic",props:{styles:l.o({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const K=c=>c.inBuilder||c.forceWrapper?r.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",...c.blockProps,children:c.content}):`${c.content}`;d.registerChaiBlock(K,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:z.SpaceBetweenVerticallyIcon,props:{content:l.r({title:"Content",defaultValue:""})}});const X=c=>{const{blockProps:e,backgroundImage:t,children:s,styles:a}=c;let i={};return t&&(i={backgroundImage:`url(${t})`}),h.createElement("div",{...e,...a,style:i},s)};d.registerChaiBlock(X,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:l.o({default:"font-body antialiased"}),backgroundImage:l.v({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const Z=c=>{const{blockProps:e,styles:t}=c;return h.createElement("br",{...e,...t})};d.registerChaiBlock(Z,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:z.SpaceBetweenVerticallyIcon,props:{styles:l.o({default:""})}});const y=c=>{const e=(i,n)=>({_id:f.generateUUID(),_parent:i,_type:"TableCell",styles:"#styles:,",content:`${c==="TableHead"?"Table Head":"Table Cell "+n}`}),t=i=>{const n=f.generateUUID(),o={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return i&&(o._parent=i),[o,e(n,"1"),e(n,"2"),e(n,"3")]},s=i=>{const n=f.generateUUID(),o={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return i&&(o._parent=i),[o,...t(n)]},a=i=>{const n=f.generateUUID(),o={_id:n,_type:"TableBody",styles:"#styles:,"};return i&&(o._parent=i),[o,...t(n),...t(n)]};if(c==="Table"){const i=f.generateUUID();return[{_id:i,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...s(i),...a(i)]}return c==="TableRow"?t():c==="TableHead"?s():c==="TableBody"?a():[]},Q=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("table",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(Q,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:z.TableIcon,props:{styles:l.o({default:""})},blocks:y("Table")});const c0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("thead",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(c0,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:z.BorderTopIcon,props:{styles:l.o({default:""})},blocks:y("TableHead")});const t0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("tbody",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(t0,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:z.BorderAllIcon,props:{styles:l.o({default:""})},blocks:y("TableBody")});const l0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("tr",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(l0,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:z.ViewHorizontalIcon,props:{styles:l.o({default:"w-full"})},blocks:y("TableRow")});const e0=c=>{const{blockProps:e,children:t,content:s,styles:a}=c;return!t&&u.isEmpty(s)?r.jsxRuntimeExports.jsx(x.EmptySlot,{}):t?h.createElement("td",{...e,...a},t):h.createElement("td",{...e,...a,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(e0,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:z.DragHandleHorizontalIcon,props:{styles:l.o({default:""}),content:l.b({title:"Content",default:"Table cell item",ai:{html:!0}})}});const s0=c=>{const{blockProps:e,errorMessage:t,name:s,_type:a,successMessage:i,action:n,styles:o,children:v}=c;let M=v;v||(M=r.jsxRuntimeExports.jsx(x.EmptySlot,{}));const p={"x-data":"useForm","x-on:submit.prevent":"post"},g={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return r.jsxRuntimeExports.jsxs("form",{...p,"data-error":t,"data-success":i,method:"post",action:n,...e,...o,children:[r.jsxRuntimeExports.jsx("div",{...g}),r.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||a}),M]})};d.registerChaiBlock(s0,{type:"Form",label:"Form",category:"core",icon:z.GroupIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),action:l.g({title:"Submit URL",default:"/api/form/submit"}),errorMessage:l.b({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:l.b({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0});const a0=c=>{const{blockProps:e,content:t,styles:s,children:a}=c,i={...s,...e};return a?h.createElement("label",i,a):h.createElement("label",{...i,dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(a0,{type:"Label",label:"Label",category:"core",icon:z.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),content:l.g({title:"Content",default:"Label",ai:{html:!1}})}});const i0=c=>{const{blockProps:e,inBuilder:t,label:s,styles:a,inputStyles:i,icon:n,iconPos:o}=c,v=f.generateUUID(),M={"x-bind:disabled":"formLoading"};return r.jsxRuntimeExports.jsxs("button",{id:v,...M,...i,...a,...e||{},type:t?"button":"submit",children:[s,n&&r.jsxRuntimeExports.jsx("span",{className:o,dangerouslySetInnerHTML:{__html:n}})]})};d.registerChaiBlock(i0,{type:"FormButton",label:"Submit Button",category:"core",icon:z.ButtonIcon,group:"form",hidden:!0,props:{label:l.g({title:"Label",default:"Submit"}),styles:l.o({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:l.T({title:"Icon",default:""}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const r0=c=>{const{blockProps:e,fieldName:t,label:s,styles:a,inputStyles:i,required:n,checked:o,showLabel:v=!0}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[r.jsxRuntimeExports.jsx("input",{...i,name:t,id:M,type:"checkbox",required:n,defaultChecked:o}),s&&s!=="Label"&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s})]}):r.jsxRuntimeExports.jsx("input",{id:M,...e,...i,...a,type:"checkbox",required:n,name:t})};d.registerChaiBlock(r0,{type:"Checkbox",label:"Checkbox",category:"core",icon:z.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:l.g({title:"Field Name",default:"checkbox"}),styles:l.o({default:"flex items-center gap-x-2"}),label:l.g({title:"Label",default:"Label"}),checked:l.c({title:"Checked",default:!1}),required:l.c({title:"Required",default:!1})}});const n0=c=>{const{blockProps:e,label:t,placeholder:s,styles:a,inputStyles:i,showLabel:n,required:o,inputType:v="text",inBuilder:M,fieldName:p}=c,g=f.generateUUID();return!n||v==="submit"?(v==="submit"&&(e.value=t),r.jsxRuntimeExports.jsx("input",{id:g,name:p,readOnly:M,...e,...i,...a,type:v,placeholder:s,required:o})):r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[n&&r.jsxRuntimeExports.jsx("label",{htmlFor:g,children:t}),r.jsxRuntimeExports.jsx("input",{name:p,readOnly:M,...i,id:g,type:v,placeholder:s,required:o})]})};d.registerChaiBlock(n0,{type:"Input",label:"Input",category:"core",icon:z.InputIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),fieldName:l.g({title:"Field Name",default:"input"}),inputType:l.f({title:"Type",options:u.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],c=>({value:c,title:c})),default:"text"}),value:l.g({title:"Value",default:""}),showLabel:l.c({title:"Show label",default:!0}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),required:l.c({title:"Required",default:!1})}});const o0=c=>{const{blockProps:e,fieldName:t,label:s,styles:a,inputStyles:i,checked:n,required:o,showLabel:v=!0}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[r.jsxRuntimeExports.jsx("input",{...i,name:t,id:M,type:"radio",required:o,defaultChecked:n}),s&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s})]}):r.jsxRuntimeExports.jsx("input",{id:M,...e,...i,...a,type:"radio",required:o,checked:n,name:t})};d.registerChaiBlock(o0,{type:"Radio",label:"Radio",category:"core",icon:z.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:l.o({default:"flex items-center w-max gap-x-2"}),fieldName:l.g({title:"Field Name",default:"radio"}),label:l.g({title:"Label",default:"Label"}),checked:l.c({title:"Checked",default:!1}),required:l.c({title:"Required",default:!1})}});const h0=c=>{const{blockProps:e,fieldName:t,label:s,placeholder:a,styles:i,inputStyles:n,required:o,showLabel:v,_multiple:M=!1}=c,p=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...i,children:[v&&r.jsxRuntimeExports.jsx("label",{htmlFor:p,children:s}),r.jsxRuntimeExports.jsxs("select",{...n,id:p,required:o,multiple:M,name:t,children:[r.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:a}),u.map(c.options,g=>r.jsxRuntimeExports.jsx("option",{selected:u.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})]}):r.jsxRuntimeExports.jsxs("select",{id:p,...i,...e,required:o,multiple:M,name:t,children:[r.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:a}),u.map(c.options,g=>r.jsxRuntimeExports.jsx("option",{selected:u.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})};d.registerChaiBlock(h0,{type:"Select",label:"Select",category:"core",icon:z.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),fieldName:l.g({title:"Field Name",default:"select"}),showLabel:l.c({title:"Show label",default:!0}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),required:l.c({title:"Required",default:!1}),_multiple:l.c({title:"Multiple Choice",default:!1}),options:l.S({title:"Options",itemProperties:{label:l.g({title:"Label",default:""}),value:l.g({title:"Value",default:""})}})}});const d0=c=>{const{blockProps:e,fieldName:t,label:s,placeholder:a,styles:i,inputStyles:n,_rows:o,showLabel:v}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...i,...e,children:[v&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s}),r.jsxRuntimeExports.jsx("textarea",{name:t,...n,id:M,placeholder:a,rows:o})]}):r.jsxRuntimeExports.jsx("textarea",{id:M,name:t,...e,...n,...i,placeholder:a,rows:o})};d.registerChaiBlock(d0,{type:"TextArea",label:"TextArea",category:"core",icon:z.InputIcon,group:"form",hidden:!0,props:{fieldName:l.g({title:"Field Name",default:"textarea"}),showLabel:l.c({title:"Show label",default:!0}),styles:l.o({default:""}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),_rows:l.y({title:"Rows",default:3})}});const v0=u.noop;exports.loadWebBlocks=v0;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lodash-es"),r=require("./jsx-runtime-Z_BpKhVy.cjs"),k=require("react"),l=require("./controls-rRZhz0vu.cjs"),d=require("@chaibuilder/runtime"),x=require("./empty-slot-Sy930lX6.cjs"),z=require("@radix-ui/react-icons"),f=require("./Functions-N3yhPYKY.cjs"),G=require("./index--mLLy7QQ.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");function j(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>c[t]})}}return e.default=c,Object.freeze(e)}const h=j(k),E=h.memo(c=>{const{blockProps:e,inBuilder:t,backgroundImage:s,children:a,tag:i="div",styles:n}=c;let o=a;a||(o=r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:t}));let v={};return s&&(v={backgroundImage:`url(${s})`}),h.createElement(i,{...e,...n,style:v},o)});d.registerChaiBlock(E,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:l.o({default:""}),tag:l.f({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:l.v({title:"Background Image"})},canAcceptBlock:()=>!0});const S=h.memo(c=>{const{blockProps:e,styles:t}=c;return h.createElement("div",{...e,...t})});d.registerChaiBlock(S,{type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",props:{styles:l.o({default:""})},canAcceptBlock:()=>!1});const C=c=>{const{blockProps:e,styles:t,content:s,level:a="h1",children:i=null}=c;return i?h.createElement(a,{...t,...e},i):h.createElement(a,{...t,...e,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(C,{type:"Heading",label:"Heading",category:"core",icon:z.HeadingIcon,group:"typography",props:{level:l.f({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:l.o({default:"text-3xl"}),content:l.r({title:"Content",default:"Heading goes here"})},canAcceptBlock:c=>c==="Span"||c==="Text"});const R=c=>{const{blockProps:e,styles:t,content:s}=c;return u.isNull(c.children)?h.createElement("p",{...t,...e,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}}):h.createElement("p",{...t,...e},c.children)};d.registerChaiBlock(R,{type:"Paragraph",label:"Paragraph",category:"core",icon:z.TextIcon,group:"typography",props:{styles:l.o({default:""}),content:l.r({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:c=>c==="Span"||c==="Link"});const _=c=>{const{blockProps:e,styles:t,content:s,children:a=null,tag:i}=c;return a?h.createElement("span",{...t,...e},a):h.createElement(i||"span",{...t,...e,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(_,{type:"Span",label:"Span",category:"core",group:"typography",props:{styles:l.o({default:""}),content:l.r({title:"Content",default:""})},canAcceptBlock:()=>!0});const L=c=>{const{blockProps:e,content:t,styles:s}=c;return r.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:r.jsxRuntimeExports.jsx("div",{"data-ai-key":"content","data-ai-type":"richtext",...e,...s,dangerouslySetInnerHTML:{__html:t}})})};d.registerChaiBlock(L,{type:"RichText",label:"Rich Text",category:"core",icon:z.CursorTextIcon,group:"typography",props:{styles:l.o({default:""}),content:l.b({title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}});const T=c=>{const{blockProps:e,iconSize:t,icon:s,content:a,iconPos:i,styles:n,children:o}=c,v=s,M=o||r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:a}),v&&r.jsxRuntimeExports.jsx("div",{style:{width:t+"px"},className:i+" "+(i==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:v}})]});return h.createElement("button",{...e,...n,type:"button"},M)};d.registerChaiBlock(T,{type:"Button",label:"Button",category:"core",icon:z.ButtonIcon,group:"basic",props:{content:l.g({title:"Label",default:"Button"}),styles:l.o({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:l.T({title:"Icon",default:""}),iconSize:l.y({title:"Icon Size",default:24}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const P=c=>{const{blockProps:e,link:t,children:s,styles:a,inBuilder:i,content:n}=c;return!s&&u.isEmpty(a==null?void 0:a.className)&&u.isEmpty(n)?r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:i}):i?s?r.jsxRuntimeExports.jsx("span",{...e,...a,children:s}):h.createElement("span",{...e,...a,dangerouslySetInnerHTML:{__html:n}}):s?r.jsxRuntimeExports.jsx("a",{href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...e,...a,children:s}):h.createElement("a",{...e,...a,"data-ai-key":"content",href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self",dangerouslySetInnerHTML:{__html:n}})};d.registerChaiBlock(P,{type:"Link",label:"Link",category:"core",icon:z.Link1Icon,group:"basic",props:{styles:l.o({default:""}),content:l.g({title:"Content",default:""}),link:l.q({title:"Link",default:{type:"page",target:"_self",href:"#"}})},canAcceptBlock:c=>c!=="Link"});const D=(c,...e)=>({...c,className:f.cn(c.className,...e)}),N=c=>{const{blockProps:e,children:t,styles:s,inBuilder:a,content:i,href:n}=c,{hrefType:o,autoplay:v,maxWidth:M,backdropColor:p,galleryName:g}=c,m=D(s,"cb-lightbox");if(!t&&u.isEmpty(s==null?void 0:s.className)&&u.isEmpty(i))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:a});if(a)return t?r.jsxRuntimeExports.jsx("span",{...e,...m,children:t}):h.createElement("span",{...e,...m,dangerouslySetInnerHTML:{__html:i}});const y={};return y["data-vbtype"]=o,v&&(y["data-autoplay"]="true"),M&&(y["data-maxwidth"]=M+"px"),p&&(y["data-overlay"]=p),g&&(y["data-gall"]=g),t?r.jsxRuntimeExports.jsx("a",{...y,href:n||"#/",...e,...m,children:t}):h.createElement("a",{...e,...m,...y,href:n||"#",dangerouslySetInnerHTML:{__html:i}})};d.registerChaiBlock(N,{type:"LightBoxLink",label:"LightBox Link",category:"core",icon:z.ImageIcon,group:"basic",props:{styles:l.o({default:""}),content:l.g({title:"Content",default:"Link text or drop blocks inside"}),href:l.g({title:"Href",default:""}),hrefType:l.f({title:"Type",default:"video",options:[{value:"video",title:"video "},{value:"iframe",title:"iframe"},{value:"inline",title:"inline"},{value:"ajax",title:"ajax"}]}),autoplay:l.c({title:"Autoplay video",default:!1}),maxWidth:l.y({title:"Max Width",default:""}),backdropColor:l.g({title:"Backdrop Color",default:""}),galleryName:l.g({title:"Gallery name",default:""})},canAcceptBlock:c=>c!=="Link"&&c!=="LightBoxLink"});const H=c=>{const{blockProps:e,children:t,listType:s,styles:a,tag:i,inBuilder:n}=c,o=f.cn(u.get(a,"className",""),s);return!t&&u.isEmpty(a==null?void 0:a.className)?r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:n}):h.createElement(i||(s==="list-decimal"?"ol":"ul"),{...e,...a,className:o},t)};d.registerChaiBlock(H,{type:"List",label:"List",icon:z.RowsIcon,category:"core",group:"basic",props:{styles:l.o({default:""}),listType:l.f({title:"List type",default:"list-none",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},canAcceptBlock:c=>c==="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 A=c=>{const{blockProps:e,content:t,styles:s,children:a,tag:i}=c;return a?h.createElement(i||"li",{...s,...e},a):h.createElement(i||"li",{...s,...e,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(A,{type:"ListItem",label:"List Item",icon:z.ColumnsIcon,category:"core",group:"basic",props:{styles:l.o({default:""}),content:l.r({title:"Content",default:"List item"})},canAcceptBlock:c=>c!=="ListItem",canBeNested:c=>c==="List"});const q=c=>{const{blockProps:e,icon:t,styles:s,width:a,inBuilder:i,height:n}=c,o=D(s,f.cn(a?`w-[${a}px]`:"",n?`h-[${n}px]`:""));if(u.isEmpty(t))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:i,className:"h-8 w-14"});const v=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return h.createElement("span",{...e,...o,dangerouslySetInnerHTML:{__html:v}})};d.registerChaiBlock(q,{type:"Icon",label:"Icon",category:"core",icon:z.SketchLogoIcon,group:"media",props:{styles:l.o({default:"text-black"}),icon:l.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:l.y({title:"Width",default:""}),height:l.y({title:"Height",default:""})}});const U=c=>{const{blockProps:e,image:t,styles:s,alt:a,height:i,width:n}=c;return u.isEmpty(t)?r.jsxRuntimeExports.jsx(x.EmptySlot,{className:"h-36"}):h.createElement("img",{...e,...s,src:t,alt:a,loading:"lazy",height:i,width:n})};d.registerChaiBlock(U,{type:"Image",label:"Image",category:"core",icon:z.ImageIcon,group:"media",props:{styles:l.o({default:""}),image:l.v({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.g({title:"Alt",default:""}),width:l.g({title:"Width",default:""}),height:l.g({title:"Height",default:""})}});const F=c=>{var n;const{blockProps:e,inBuilder:t,styles:s,children:a}=c;let i=null;return!a&&t&&(i=r.jsxRuntimeExports.jsx("div",{className:f.cn("flex flex-col items-center justify-center",(n=c.emptyStyles)==null?void 0:n.className),children:r.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:r.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",c.name]})})})),h.createElement("div",{...s,...e,droppable:"yes"},a||i)};d.registerChaiBlock(F,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:l.o({default:""}),emptyStyles:l.o({default:""})},canAcceptBlock:()=>!0});const I=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,b=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,w=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,O=c=>{if(I.test(c)){const e=c.match(I);return e?`https://www.youtube.com/embed/${e[4]}`:c}if(b.test(c)){const e=c.match(b);return e?`https://player.vimeo.com/video/${e[3]}`:c}if(w.test(c)){const e=c.match(w);return e?`https://www.dailymotion.com/embed/video/${e[4]}`:c}return null},$=h.memo(c=>{const{blockProps:e,inBuilder:t,styles:s,url:a,controls:i}=c,n=u.get(i,"autoPlay",!1),o=u.get(i,"controls",!1),v=n||u.get(i,"muted",!0),M=u.get(i,"loop",!1);if(u.isEmpty(a))return r.jsxRuntimeExports.jsx(x.EmptySlot,{inBuilder:t,className:"h-36"});let p=O(a),g=null;if(p){if(!u.isEmpty(p)){const m=[];m.push(`autoplay=${n?1:0}`),m.push(`controls=${i?1:0}`),m.push(`mute=${v?1:0}&muted=${v?1:0}`),m.push(`loop=${M?1:0}`),p=`${p}?${m.join("&")}`}g=h.createElement("iframe",{...e,className:"absolute inset-0 w-full h-full",src:p,allow:t?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else g=h.createElement("video",{...e,className:"absolute inset-0 w-full h-full",src:a,controls:o,muted:v,autoPlay:t?!1:n,loop:M});return r.jsxRuntimeExports.jsx("div",{...u.pick(s,["className"]),children:r.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[t?r.jsxRuntimeExports.jsx("div",{...e,...u.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,g]})})});d.registerChaiBlock($,{type:"Video",label:"Video",category:"core",icon:z.VideoIcon,group:"media",props:{styles:l.o({default:""}),url:l.g({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:l.h({title:"Controls",properties:{autoPlay:l.c({title:"Autoplay",default:!0}),controls:l.c({title:"Show controls",default:!1}),loop:l.c({title:"Loop",default:!1}),muted:l.c({title:"Muted",default:!0})}})}});const V=c=>{const{blockProps:e,styles:t,htmlCode:s,inBuilder:a}=c;return a?r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[a?r.jsxRuntimeExports.jsx("div",{...e,...t,className:"absolute z-20 h-full w-full"}):null,h.createElement("div",{...t,dangerouslySetInnerHTML:{__html:s.replace(/<script.*?>.*?<\/script>/g,"")}})]}):h.createElement("div",{...e,...t,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(V,{type:"CustomHTML",label:"Custom HTML",category:"core",icon:z.CodeIcon,group:"advanced",props:{styles:l.o({default:""}),htmlCode:l.u({title:"HTML Code",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})},canAcceptBlock:()=>!1});function W(c){return G.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(c)}const J=c=>{const{scripts:e,inBuilder:t,blockProps:s}=c;return t?r.jsxRuntimeExports.jsx("div",{...s}):r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e}})};d.registerChaiBlock(J,{type:"CustomScript",label:"Custom Script",category:"core",icon:W,group:"advanced",props:{scripts:l.u({title:"Script",default:"",placeholder:"<script>console.log('Hello, world!');<\/script>"})},canAcceptBlock:()=>!1});const Y=c=>{const{blockProps:e,styles:t}=c;return h.createElement("hr",{...t,...e})};d.registerChaiBlock(Y,{type:"Divider",label:"Divider",category:"core",icon:z.DividerHorizontalIcon,group:"basic",props:{styles:l.o({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const Z=c=>c.inBuilder||c.forceWrapper?r.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",...c.blockProps,children:c.content}):`${c.content}`;d.registerChaiBlock(Z,{type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:z.SpaceBetweenVerticallyIcon,props:{content:l.r({title:"Content",defaultValue:""})}});const K=()=>null;d.registerChaiBlock(K,{type:"Dark Mode",label:"Dark Mode",category:"core",icon:z.MoonIcon,group:"advanced",blocks:[{_id:"ultqCh",_type:"Span",tag:"span",styles:"#styles:,",_name:"Dark Mode Switcher"},{_id:"vroabi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'dark'","x-show":"darkMode === 'light'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Dark Mode Btn"},{_id:"eweibk",_parent:"vroabi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"nltBrv",_parent:"eweibk",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"},{_id:"gesydi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'light'","x-show":"darkMode === 'dark'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Light Mode Btn"},{_id:"sgbhDo",_parent:"gesydi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"AdDwBC",_parent:"sgbhDo",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"}]});const X=c=>{const{blockProps:e,backgroundImage:t,children:s,styles:a}=c;let i={};return t&&(i={backgroundImage:`url(${t})`}),h.createElement("div",{...e,...a,style:i},s)};d.registerChaiBlock(X,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:l.o({default:"font-body antialiased"}),backgroundImage:l.v({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1});const Q=c=>{const{blockProps:e,styles:t}=c;return h.createElement("br",{...e,...t})};d.registerChaiBlock(Q,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:z.SpaceBetweenVerticallyIcon,props:{styles:l.o({default:""})}});const B=c=>{const e=(i,n)=>({_id:f.generateUUID(),_parent:i,_type:"TableCell",styles:"#styles:,",content:`${c==="TableHead"?"Table Head":"Table Cell "+n}`}),t=i=>{const n=f.generateUUID(),o={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return i&&(o._parent=i),[o,e(n,"1"),e(n,"2"),e(n,"3")]},s=i=>{const n=f.generateUUID(),o={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return i&&(o._parent=i),[o,...t(n)]},a=i=>{const n=f.generateUUID(),o={_id:n,_type:"TableBody",styles:"#styles:,"};return i&&(o._parent=i),[o,...t(n),...t(n)]};if(c==="Table"){const i=f.generateUUID();return[{_id:i,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...s(i),...a(i)]}return c==="TableRow"?t():c==="TableHead"?s():c==="TableBody"?a():[]},c0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("table",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(c0,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:z.TableIcon,props:{styles:l.o({default:""})},blocks:B("Table")});const t0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("thead",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(t0,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:z.BorderTopIcon,props:{styles:l.o({default:""})},blocks:B("TableHead")});const l0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("tbody",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(l0,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:z.BorderAllIcon,props:{styles:l.o({default:""})},blocks:B("TableBody")});const e0=c=>{const{blockProps:e,children:t,styles:s}=c;return t?h.createElement("tr",{...e,...s},t):r.jsxRuntimeExports.jsx(x.EmptySlot,{})};d.registerChaiBlock(e0,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:z.ViewHorizontalIcon,props:{styles:l.o({default:"w-full"})},blocks:B("TableRow")});const s0=c=>{const{blockProps:e,children:t,content:s,styles:a}=c;return!t&&u.isEmpty(s)?r.jsxRuntimeExports.jsx(x.EmptySlot,{}):t?h.createElement("td",{...e,...a},t):h.createElement("td",{...e,...a,dangerouslySetInnerHTML:{__html:s}})};d.registerChaiBlock(s0,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:z.DragHandleHorizontalIcon,props:{styles:l.o({default:""}),content:l.b({title:"Content",default:"Table cell item",ai:{html:!0}})}});const a0=c=>{const{blockProps:e,errorMessage:t,name:s,_type:a,successMessage:i,action:n,styles:o,children:v}=c;let M=v;v||(M=r.jsxRuntimeExports.jsx(x.EmptySlot,{}));const p={"x-data":"useForm","x-on:submit.prevent":"post"},g={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return r.jsxRuntimeExports.jsxs("form",{...p,"data-error":t,"data-success":i,method:"post",action:n,...e,...o,children:[r.jsxRuntimeExports.jsx("div",{...g}),r.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||a}),M]})};d.registerChaiBlock(a0,{type:"Form",label:"Form",category:"core",icon:z.GroupIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),action:l.g({title:"Submit URL",default:"/api/form/submit"}),errorMessage:l.b({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:l.b({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0});const i0=c=>{const{blockProps:e,content:t,styles:s,children:a}=c,i={...s,...e};return a?h.createElement("label",i,a):h.createElement("label",{...i,dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(i0,{type:"Label",label:"Label",category:"core",icon:z.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),content:l.g({title:"Content",default:"Label",ai:{html:!1}})}});const r0=c=>{const{blockProps:e,inBuilder:t,label:s,styles:a,inputStyles:i,icon:n,iconPos:o}=c,v=f.generateUUID(),M={"x-bind:disabled":"formLoading"};return r.jsxRuntimeExports.jsxs("button",{id:v,...M,...i,...a,...e||{},type:t?"button":"submit",children:[s,n&&r.jsxRuntimeExports.jsx("span",{className:o,dangerouslySetInnerHTML:{__html:n}})]})};d.registerChaiBlock(r0,{type:"FormButton",label:"Submit Button",category:"core",icon:z.ButtonIcon,group:"form",hidden:!0,props:{label:l.g({title:"Label",default:"Submit"}),styles:l.o({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:l.T({title:"Icon",default:""}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const n0=c=>{const{blockProps:e,fieldName:t,label:s,styles:a,inputStyles:i,required:n,checked:o,showLabel:v=!0}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[r.jsxRuntimeExports.jsx("input",{...i,name:t,id:M,type:"checkbox",required:n,defaultChecked:o}),s&&s!=="Label"&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s})]}):r.jsxRuntimeExports.jsx("input",{id:M,...e,...i,...a,type:"checkbox",required:n,name:t})};d.registerChaiBlock(n0,{type:"Checkbox",label:"Checkbox",category:"core",icon:z.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:l.g({title:"Field Name",default:"checkbox"}),styles:l.o({default:"flex items-center gap-x-2"}),label:l.g({title:"Label",default:"Label"}),checked:l.c({title:"Checked",default:!1}),required:l.c({title:"Required",default:!1})}});const o0=c=>{const{blockProps:e,label:t,placeholder:s,styles:a,inputStyles:i,showLabel:n,required:o,inputType:v="text",inBuilder:M,fieldName:p}=c,g=f.generateUUID();return!n||v==="submit"?(v==="submit"&&(e.value=t),r.jsxRuntimeExports.jsx("input",{id:g,name:p,readOnly:M,...e,...i,...a,type:v,placeholder:s,required:o})):r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[n&&r.jsxRuntimeExports.jsx("label",{htmlFor:g,children:t}),r.jsxRuntimeExports.jsx("input",{name:p,readOnly:M,...i,id:g,type:v,placeholder:s,required:o})]})};d.registerChaiBlock(o0,{type:"Input",label:"Input",category:"core",icon:z.InputIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),fieldName:l.g({title:"Field Name",default:"input"}),inputType:l.f({title:"Type",options:u.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],c=>({value:c,title:c})),default:"text"}),value:l.g({title:"Value",default:""}),showLabel:l.c({title:"Show label",default:!0}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),required:l.c({title:"Required",default:!1})}});const h0=c=>{const{blockProps:e,fieldName:t,label:s,styles:a,inputStyles:i,checked:n,required:o,showLabel:v=!0}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...a,...e,children:[r.jsxRuntimeExports.jsx("input",{...i,name:t,id:M,type:"radio",required:o,defaultChecked:n}),s&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s})]}):r.jsxRuntimeExports.jsx("input",{id:M,...e,...i,...a,type:"radio",required:o,checked:n,name:t})};d.registerChaiBlock(h0,{type:"Radio",label:"Radio",category:"core",icon:z.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:l.o({default:"flex items-center w-max gap-x-2"}),fieldName:l.g({title:"Field Name",default:"radio"}),label:l.g({title:"Label",default:"Label"}),checked:l.c({title:"Checked",default:!1}),required:l.c({title:"Required",default:!1})}});const d0=c=>{const{blockProps:e,fieldName:t,label:s,placeholder:a,styles:i,inputStyles:n,required:o,showLabel:v,_multiple:M=!1}=c,p=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...i,children:[v&&r.jsxRuntimeExports.jsx("label",{htmlFor:p,children:s}),r.jsxRuntimeExports.jsxs("select",{...n,id:p,required:o,multiple:M,name:t,children:[r.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:a}),u.map(c.options,g=>r.jsxRuntimeExports.jsx("option",{selected:u.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})]}):r.jsxRuntimeExports.jsxs("select",{id:p,...i,...e,required:o,multiple:M,name:t,children:[r.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:a}),u.map(c.options,g=>r.jsxRuntimeExports.jsx("option",{selected:u.get(g,"selected",!1),value:g.value,dangerouslySetInnerHTML:{__html:g.label}},g.value))]})};d.registerChaiBlock(d0,{type:"Select",label:"Select",category:"core",icon:z.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:l.o({default:""}),fieldName:l.g({title:"Field Name",default:"select"}),showLabel:l.c({title:"Show label",default:!0}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),required:l.c({title:"Required",default:!1}),_multiple:l.c({title:"Multiple Choice",default:!1}),options:l.S({title:"Options",itemProperties:{label:l.g({title:"Label",default:""}),value:l.g({title:"Value",default:""})}})}});const v0=c=>{const{blockProps:e,fieldName:t,label:s,placeholder:a,styles:i,inputStyles:n,_rows:o,showLabel:v}=c,M=f.generateUUID();return v?r.jsxRuntimeExports.jsxs("div",{...i,...e,children:[v&&r.jsxRuntimeExports.jsx("label",{htmlFor:M,children:s}),r.jsxRuntimeExports.jsx("textarea",{name:t,...n,id:M,placeholder:a,rows:o})]}):r.jsxRuntimeExports.jsx("textarea",{id:M,name:t,...e,...n,...i,placeholder:a,rows:o})};d.registerChaiBlock(v0,{type:"TextArea",label:"TextArea",category:"core",icon:z.InputIcon,group:"form",hidden:!0,props:{fieldName:l.g({title:"Field Name",default:"textarea"}),showLabel:l.c({title:"Show label",default:!0}),styles:l.o({default:""}),inputStyles:l.o({default:"w-full p-1"}),label:l.g({title:"Label",default:"Label"}),placeholder:l.g({title:"Placeholder",default:"Placeholder"}),_rows:l.y({title:"Rows",default:3})}});const M0=u.noop;exports.loadWebBlocks=M0;
|