@chaibuilder/sdk 1.2.38 → 1.2.40
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-Q--k4QYI.js +144 -0
- package/dist/AddBlocks-a20tIXfX.cjs +1 -0
- package/dist/{CanvasArea-MuuWWyW0.cjs → CanvasArea-QQn0aXpj.cjs} +5 -5
- package/dist/{CanvasArea-WJYJtUFt.js → CanvasArea-ahsds4rc.js} +183 -184
- package/dist/{ChaiBuilderEditor-PLQ8Sq34.cjs → ChaiBuilderEditor-hcoLrtq8.cjs} +49 -49
- package/dist/{ChaiBuilderEditor-vzyVasJe.js → ChaiBuilderEditor-wfEkvtJ0.js} +8163 -8050
- package/dist/{CurrentPage-j6xVMVFH.js → CurrentPage-f_5eIFbX.js} +9 -10
- package/dist/CurrentPage-zo2GKFUx.cjs +1 -0
- package/dist/{ListTree-1oWz6vwo.js → ListTree-3riQsfip.js} +1 -2
- package/dist/ListTree-FWHoDfbO.cjs +1 -0
- package/dist/PagesPanel-0Wi0ezNZ.cjs +1 -0
- package/dist/{PagesPanel-PKnqTla9.js → PagesPanel-3KIZEXOS.js} +4 -5
- package/dist/{ProjectPanel-hx21JHK8.js → ProjectPanel-0W6XTu0Y.js} +5 -6
- package/dist/ProjectPanel-fEYrObPB.cjs +1 -0
- package/dist/{Settings-3omes6Yj.js → Settings-ifUbqcam.js} +4 -5
- package/dist/Settings-kDwumlBm.cjs +1 -0
- package/dist/{SidePanels-vNc0pvVt.js → SidePanels-0P4IaIVn.js} +159 -140
- package/dist/SidePanels-JIuL8NLu.cjs +1 -0
- package/dist/{BrandingOptions-z7hXgff2.js → ThemeConfiguration-7Hef-UKR.js} +42 -41
- package/dist/ThemeConfiguration-CcUA1_9A.cjs +1 -0
- package/dist/{Topbar-c3HIPa_q.js → Topbar-0hOp8tE7.js} +3 -4
- package/dist/Topbar-Wte9Jbw7.cjs +1 -0
- package/dist/UILibrariesPanel-qgwFZYvn.js +145 -0
- package/dist/UILibrariesPanel-vXOD3qRz.cjs +1 -0
- package/dist/UnsplashImages-Cfq1lKeC.cjs +1 -0
- package/dist/{UnsplashImages-IQo081nF.js → UnsplashImages-qUDa1vAS.js} +3 -4
- package/dist/{UploadImages-BAy3wsRT.js → UploadImages-Xh-lPuZy.js} +3 -4
- package/dist/UploadImages-Zle03BGi.cjs +1 -0
- package/dist/add-page-modal-0jmyeD0x.cjs +1 -0
- package/dist/{add-page-modal-WWRdRyDM.js → add-page-modal-ued8fkUY.js} +16 -17
- package/dist/{confirm-alert-h4RiwjkJ.js → confirm-alert-4kucBgrO.js} +3 -4
- package/dist/{confirm-alert-LvvLsCWh.cjs → confirm-alert-rucvO9GC.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +22 -3
- package/dist/core.js +44 -45
- package/dist/delete-page-modal-Eym3aZzC.cjs +1 -0
- package/dist/{delete-page-modal-XymJxo7r.js → delete-page-modal-kxeOpfNd.js} +4 -5
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +22 -3
- package/dist/email.js +3 -4
- package/dist/{form-P0nEC3WH.js → form-2Veryr30.js} +1 -1
- package/dist/{form-I4uC5vkq.cjs → form-pdF1XhvW.cjs} +1 -1
- package/dist/{index-SP6aKHPH.js → index-OdzdznTv.js} +2 -2
- package/dist/{index-mVQVs_cP.cjs → index-SQ1sNajH.cjs} +1 -1
- package/dist/{page-viewer-OSlqdbEV.js → page-viewer-6qv40Sm2.js} +5 -6
- package/dist/page-viewer-qr3NscoT.cjs +1 -0
- package/dist/{project-general-setting-LXfl5i5Z.js → project-general-setting-GVzAsfrk.js} +5 -6
- package/dist/{project-general-setting-JR9L7fMQ.cjs → project-general-setting-fm1YfS_2.cjs} +1 -1
- package/dist/{project-seo-setting-cVDCPjBD.cjs → project-seo-setting-06jt9oDD.cjs} +1 -1
- package/dist/{project-seo-setting-lyzUUxe2.js → project-seo-setting-iPqsGKuc.js} +4 -5
- package/dist/{single-page-detail-GeG-SXWn.js → single-page-detail-GVtRl8Pt.js} +6 -7
- package/dist/single-page-detail-KQVwWJ-J.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +22 -3
- package/dist/studio.js +3 -4
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +138 -139
- package/dist/{useCanvasSettings-_EzUaA9P.js → useCanvasSettings-E5uIyvUR.js} +1 -1
- package/dist/{useCanvasSettings-bP_V0UR2.cjs → useCanvasSettings-yYU51FJ3.cjs} +1 -1
- package/package.json +2 -2
- package/dist/AddBlocks-G9pjsIyq.cjs +0 -1
- package/dist/AddBlocks-dljjAE5r.js +0 -210
- package/dist/BrandingOptions-N7iDaMgM.cjs +0 -1
- package/dist/CurrentPage-LaeYQ-Ke.cjs +0 -1
- package/dist/ListTree-_7e5p_e3.cjs +0 -1
- package/dist/PagesPanel-BsELxMie.cjs +0 -1
- package/dist/ProjectPanel-1aAFwguw.cjs +0 -1
- package/dist/Settings-tYjuuUgX.cjs +0 -1
- package/dist/SidePanels-7WG6SXw0.cjs +0 -1
- package/dist/Topbar-1zU6Ljsn.cjs +0 -1
- package/dist/UnsplashImages-zCQkmow-.cjs +0 -1
- package/dist/UploadImages-6K3GdM-b.cjs +0 -1
- package/dist/add-page-modal-8FJnOckX.cjs +0 -1
- package/dist/delete-page-modal-IRX0oKZJ.cjs +0 -1
- package/dist/page-viewer-fonOyiuT.cjs +0 -1
- package/dist/single-page-detail-LL8m0Va7.cjs +0 -1
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ChaiBuilderEditor-hcoLrtq8.cjs");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("lodash-es");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");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-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-quill");require("react-hotkeys-hook");require("lucide-react");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.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
export declare const buttonVariants: (props?: {
|
|
106
|
-
variant?: "
|
|
106
|
+
variant?: "link" | "outline" | "default" | "destructive" | "secondary" | "ghost";
|
|
107
107
|
size?: "sm" | "lg" | "default" | "icon";
|
|
108
108
|
} & ClassProp) => string;
|
|
109
109
|
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b3 as
|
|
1
|
+
import { b3 as Q, b6 as U, b4 as W, b5 as X, bm as Z, bz as J, A as K, a3 as N, g as Y, b as aa, e as ea, f as oa, c as ta, d as ra, a as sa, bn as na, af as ia, B as ba, bg as pa, bj as ma, bi as ua, bl as la, bh as ca, bB as da, aR as ga, ca as Ca, aU as Ma, aV as Sa, aS as Da, aW as Ta, aT as xa, cc as Aa, cb as ha, br as wa, cd as Ia, bq as Pa, ci as ka, bp as Fa, cf as Ga, cj as La, cn as Ra, ce as va, cg as Ha, ch as Va, ck as Ba, cl as fa, cm as ja, bs as ya, Z as Ea, _ as _a, a1 as $a, aX as qa, $ as za, a0 as Oa, ab as Qa, av as Ua, aA as Wa, ax as Xa, bb as Za, bc as Ja, ay as Ka, c2 as Na, c6 as Ya, c1 as ae, az as ee, bd as oe, c3 as te, c4 as re, c5 as se, aw as ne, as as ie, au as be, at as pe, a$ as me, b0 as ue, b8 as le, aq as ce, b1 as de, bE as ge, bL as Ce, bH as Me, bR as Se, bI as De, bK as Te, bF as xe, bO as Ae, bM as he, bN as we, bJ as Ie, bT as Pe, bS as ke, bP as Fe, bQ as Ge, bG as Le, aO as Re, aQ as ve, aP as He, a_ as Ve, ba as Be, bC as fe, a6 as je, a9 as ye, am as Ee, aa as _e, an as $e, bU as qe, a7 as ze, a8 as Oe, ap as Qe, bV as Ue, bX as We, bY as Xe, c0 as Ze, b_ as Je, bZ as Ke, b$ as Ne, bW as Ye, ah as ao, ar as eo, ai as oo, al as to, aj as ro, ak as so, bk as no, c9 as io, bw as bo, ac as po, ae as mo, b9 as uo, bD as lo, ad as co, bA as go, by as Co, c7 as Mo, c8 as So, bx as Do, b7 as To } from "./ChaiBuilderEditor-wfEkvtJ0.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
@@ -41,144 +41,143 @@ import "@radix-ui/react-context-menu";
|
|
|
41
41
|
import "react-icons-picker";
|
|
42
42
|
import "react-quill";
|
|
43
43
|
import "react-hotkeys-hook";
|
|
44
|
-
import "lodash";
|
|
45
44
|
import "lucide-react";
|
|
46
45
|
export {
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
46
|
+
Q as Accordion,
|
|
47
|
+
U as AccordionContent,
|
|
48
|
+
W as AccordionItem,
|
|
49
|
+
X as AccordionTrigger,
|
|
50
|
+
Z as Alert,
|
|
51
|
+
J as AlertDescription,
|
|
52
|
+
K as AlertDialog,
|
|
53
|
+
N as AlertDialogAction,
|
|
54
|
+
Y as AlertDialogCancel,
|
|
55
|
+
aa as AlertDialogContent,
|
|
56
|
+
ea as AlertDialogDescription,
|
|
57
|
+
oa as AlertDialogFooter,
|
|
58
|
+
ta as AlertDialogHeader,
|
|
59
|
+
ra as AlertDialogTitle,
|
|
60
|
+
sa as AlertDialogTrigger,
|
|
61
|
+
na as AlertTitle,
|
|
62
|
+
ia as Badge,
|
|
63
|
+
ba as Button,
|
|
64
|
+
pa as Card,
|
|
65
|
+
ma as CardContent,
|
|
66
|
+
ua as CardDescription,
|
|
67
|
+
la as CardFooter,
|
|
68
|
+
ca as CardHeader,
|
|
69
|
+
da as CardTitle,
|
|
70
|
+
ga as Command,
|
|
71
|
+
Ca as CommandDialog,
|
|
72
|
+
Ma as CommandEmpty,
|
|
73
|
+
Sa as CommandGroup,
|
|
74
|
+
Da as CommandInput,
|
|
75
|
+
Ta as CommandItem,
|
|
76
|
+
xa as CommandList,
|
|
77
|
+
Aa as CommandSeparator,
|
|
78
|
+
ha as CommandShortcut,
|
|
79
|
+
wa as ContextMenu,
|
|
80
|
+
Ia as ContextMenuCheckboxItem,
|
|
81
|
+
Pa as ContextMenuContent,
|
|
82
|
+
ka as ContextMenuGroup,
|
|
83
|
+
Fa as ContextMenuItem,
|
|
84
|
+
Ga as ContextMenuLabel,
|
|
85
|
+
La as ContextMenuPortal,
|
|
86
|
+
Ra as ContextMenuRadioGroup,
|
|
87
|
+
va as ContextMenuRadioItem,
|
|
88
|
+
Ha as ContextMenuSeparator,
|
|
89
|
+
Va as ContextMenuShortcut,
|
|
90
|
+
Ba as ContextMenuSub,
|
|
91
|
+
fa as ContextMenuSubContent,
|
|
92
|
+
ja as ContextMenuSubTrigger,
|
|
93
|
+
ya as ContextMenuTrigger,
|
|
94
|
+
Ea as Dialog,
|
|
95
|
+
_a as DialogContent,
|
|
96
|
+
$a as DialogDescription,
|
|
97
|
+
qa as DialogFooter,
|
|
98
|
+
za as DialogHeader,
|
|
99
|
+
Oa as DialogTitle,
|
|
100
|
+
Qa as DialogTrigger,
|
|
101
|
+
Ua as DropdownMenu,
|
|
102
|
+
Wa as DropdownMenuCheckboxItem,
|
|
103
|
+
Xa as DropdownMenuContent,
|
|
104
|
+
Za as DropdownMenuGroup,
|
|
105
|
+
Ja as DropdownMenuItem,
|
|
106
|
+
Ka as DropdownMenuLabel,
|
|
107
|
+
Na as DropdownMenuPortal,
|
|
108
|
+
Ya as DropdownMenuRadioGroup,
|
|
109
|
+
ae as DropdownMenuRadioItem,
|
|
110
|
+
ee as DropdownMenuSeparator,
|
|
111
|
+
oe as DropdownMenuShortcut,
|
|
112
|
+
te as DropdownMenuSub,
|
|
113
|
+
re as DropdownMenuSubContent,
|
|
114
|
+
se as DropdownMenuSubTrigger,
|
|
115
|
+
ne as DropdownMenuTrigger,
|
|
116
|
+
ie as HoverCard,
|
|
117
|
+
be as HoverCardContent,
|
|
118
|
+
pe as HoverCardTrigger,
|
|
119
|
+
me as IconPickerField,
|
|
120
|
+
ue as ImagePickerField,
|
|
121
|
+
le as Input,
|
|
122
|
+
ce as Label,
|
|
123
|
+
de as LinkField,
|
|
124
|
+
ge as Menubar,
|
|
125
|
+
Ce as MenubarCheckboxItem,
|
|
126
|
+
Me as MenubarContent,
|
|
127
|
+
Se as MenubarGroup,
|
|
128
|
+
De as MenubarItem,
|
|
129
|
+
Te as MenubarLabel,
|
|
130
|
+
xe as MenubarMenu,
|
|
131
|
+
Ae as MenubarPortal,
|
|
132
|
+
he as MenubarRadioGroup,
|
|
133
|
+
we as MenubarRadioItem,
|
|
134
|
+
Ie as MenubarSeparator,
|
|
135
|
+
Pe as MenubarShortcut,
|
|
136
|
+
ke as MenubarSub,
|
|
137
|
+
Fe as MenubarSubContent,
|
|
138
|
+
Ge as MenubarSubTrigger,
|
|
139
|
+
Le as MenubarTrigger,
|
|
140
|
+
Re as Popover,
|
|
141
|
+
ve as PopoverContent,
|
|
142
|
+
He as PopoverTrigger,
|
|
143
|
+
Ve as RTEField,
|
|
144
|
+
Be as ScrollArea,
|
|
145
|
+
fe as ScrollBar,
|
|
146
|
+
je as Select,
|
|
147
|
+
ye as SelectContent,
|
|
148
|
+
Ee as SelectGroup,
|
|
149
|
+
_e as SelectItem,
|
|
150
|
+
$e as SelectLabel,
|
|
151
|
+
qe as SelectSeparator,
|
|
152
|
+
ze as SelectTrigger,
|
|
153
|
+
Oe as SelectValue,
|
|
154
|
+
Qe as Separator,
|
|
155
|
+
Ue as Sheet,
|
|
156
|
+
We as SheetClose,
|
|
157
|
+
Xe as SheetContent,
|
|
158
|
+
Ze as SheetDescription,
|
|
159
|
+
Je as SheetFooter,
|
|
160
|
+
Ke as SheetHeader,
|
|
161
|
+
Ne as SheetTitle,
|
|
162
|
+
Ye as SheetTrigger,
|
|
163
|
+
ao as Skeleton,
|
|
164
|
+
eo as Switch,
|
|
165
|
+
oo as Tabs,
|
|
166
|
+
to as TabsContent,
|
|
167
|
+
ro as TabsList,
|
|
168
|
+
so as TabsTrigger,
|
|
169
|
+
no as Textarea,
|
|
170
|
+
io as Toaster,
|
|
171
|
+
bo as Toggle,
|
|
172
|
+
po as Tooltip,
|
|
173
|
+
mo as TooltipContent,
|
|
174
|
+
uo as TooltipPortal,
|
|
175
|
+
lo as TooltipProvider,
|
|
176
|
+
co as TooltipTrigger,
|
|
177
|
+
go as badgeVariants,
|
|
178
|
+
Co as buttonVariants,
|
|
179
|
+
Mo as reducer,
|
|
180
|
+
So as toast,
|
|
181
|
+
Do as toggleVariants,
|
|
182
|
+
To as useToast
|
|
184
183
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("jotai"),s=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";const t=require("jotai"),s=require("./ChaiBuilderEditor-hcoLrtq8.cjs"),e=()=>t.useAtom(s.canvasSettingsAtom);exports.useCanvasSettings=e;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaibuilder/sdk",
|
|
3
|
-
"description": "Open source
|
|
3
|
+
"description": "AI Enabled Open source visual builder",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "1.2.
|
|
8
|
+
"version": "1.2.40",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),t=require("lodash-es"),y=require("jotai"),v=require("react-i18next"),s=require("./ChaiBuilderEditor-PLQ8Sq34.cjs"),q=require("@radix-ui/react-icons"),b=require("@chaibuilder/runtime"),B=require("flagged"),R=require("./STRINGS-gPz7CUOk.cjs"),N=require("lucide-react"),C=require("./html-to-json-VPWiWWGH.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");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-quill");require("react-hotkeys-hook");require("lodash");require("himalaya");const T=({block:r})=>{const{type:i,icon:u,label:c}=r,{addCoreBlock:m,addPredefinedBlock:d}=s.useAddBlock(),[x,o]=s.useSelectedBlockIds(),[,j]=s.useHighlightBlockId(),[,p]=y.useAtom(s.activePanelAtom),l=()=>{if(t.has(r,"blocks")){const h=t.isFunction(r.blocks)?r.blocks():r.blocks;d(b.syncBlocksWithDefaults(h),t.first(x))}else m(r,t.first(x));p(R.OUTLINE_KEY)},a=B.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:l,type:"button",onDragStart:h=>{h.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{o([]),j(null),p(R.OUTLINE_KEY)},200)},draggable:a?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(a?"cursor-grab":"cursor-pointer"),children:[n.createElement(u||q.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c||i})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:c||i})})]})})},A=({block:r,closePopover:i})=>{const[u,c]=n.useState(!1),m=s.useBuilderProp("getExternalPredefinedBlock",t.noop()),{addCoreBlock:d,addPredefinedBlock:x}=s.useAddBlock(),[o]=s.useSelectedBlockIds(),j=n.useCallback(async p=>{if(p.stopPropagation(),t.has(r,"component")){d(r,t.first(o)),i();return}c(!0);const l=await m(r);t.isEmpty(l)||x(b.syncBlocksWithDefaults(l),t.first(o)),i()},[r]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",{onClick:u?()=>{}:j,className:"relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[u&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70",children:[e.jsxRuntimeExports.jsx(N.Loader,{className:"animate-spin",size:15,color:"white"})," ",e.jsxRuntimeExports.jsx("span",{className:"pl-2 text-sm text-white",children:"Adding..."})]}),r.preview?e.jsxRuntimeExports.jsx("img",{src:r.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:r.label}):e.jsxRuntimeExports.jsx("div",{className:"flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200",children:e.jsxRuntimeExports.jsx("p",{className:"max-w-xs text-center text-sm text-gray-700",children:r.label})})]})})},w=()=>{const{data:r}=s.useUILibraryBlocks(),i=b.useChaiBlocks(),u=t.filter(t.values(i),{category:"custom"}),c=t.groupBy(u,"group"),m=t.groupBy(r,"group"),d=n.useMemo(()=>t.mergeWith(c,m,(l,a)=>{if(t.isArray(l)&&t.isArray(a))return[...l,...a]}),[c,m]),[x,o]=n.useState(t.first(t.keys(d))||""),[,j]=y.useAtom(s.activePanelAtom),p=t.get(d,x,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full flex-col overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("div",{className:"sticky top-0 flex w-full items-center p-3",children:e.jsxRuntimeExports.jsxs(s.Select,{value:x,onValueChange:l=>o(l),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Select a provider"})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:"Choose"}),n.Children.toArray(t.map(d,(l,a)=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:a,children:a},a)))]})]})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-2",children:n.Children.toArray(p.map(l=>e.jsxRuntimeExports.jsx(A,{block:l,closePopover:()=>j(R.OUTLINE_KEY)})))})]})},S=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[m]=s.useSelectedBlockIds(),[,d]=y.useAtom(s.activePanelAtom),x=()=>{const o=C.getBlocksFromHTML(i);c([...o],t.first(m)||null),u(""),d(R.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>u(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>x(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},_=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState("core"),[c,m]=n.useState("basic"),d=b.useChaiBlocks(),[,x]=y.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),j=s.useBuilderProp("filterChaiBlock",()=>!0),{data:p,isLoading:l}=s.useUILibraryBlocks(),a=t.filter(d,j),h=t.groupBy(a,"category"),g=t.uniq(t.map(h.core,"group"));n.useEffect(()=>{!t.includes(g,c)&&!t.isEmpty(g)&&!t.isEmpty(c)&&m(t.first(g))},[g,c]);const E=!l&&!t.isEmpty(p)||t.find(t.values(a),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:f=>{x(""),u(f)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(E&&o?"grid-cols-3":E&&!o||!E&&o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),E?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"ui-blocks",children:r("ui_library")}):null,o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:n.Children.toArray(t.map(g,f=>t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:f,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:f,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:f}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:n.Children.toArray(t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).map(k=>e.jsxRuntimeExports.jsx(T,{block:k})))})})]})}):null))})}),i==="ui-blocks"&&e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(w,{})}),i==="html"&&o?e.jsxRuntimeExports.jsx(S,{}):null]})};exports.default=_;
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import y, { createElement as O, useState as g, useCallback as q, useMemo as U, useEffect as V, Suspense as R } from "react";
|
|
3
|
-
import { has as F, isFunction as W, first as x, omit as J, noop as K, isEmpty as b, filter as k, values as v, groupBy as w, mergeWith as Y, isArray as L, keys as Q, get as X, map as A, uniq as Z, includes as $, find as ee, reject as I } from "lodash-es";
|
|
4
|
-
import { useAtom as N } from "jotai";
|
|
5
|
-
import { useTranslation as H } from "react-i18next";
|
|
6
|
-
import { m as _, L as S, z as se, ag as P, ac as te, ad as re, ae as oe, h as T, O as z, a6 as le, a7 as ae, a8 as ie, a9 as ce, aa as E, bg as ne, bh as de, bi as me, bj as pe, aq as ue, bk as he, bl as xe, B as fe, bm as ge, bn as je, bo as be, ai as ke, aj as ve, ak as C, ba as ye, b3 as Be, b4 as Ne, b5 as Ce, b6 as we, ah as Ae } from "./ChaiBuilderEditor-vzyVasJe.js";
|
|
7
|
-
import { BoxIcon as Te } from "@radix-ui/react-icons";
|
|
8
|
-
import { syncBlocksWithDefaults as G, useChaiBlocks as M } from "@chaibuilder/runtime";
|
|
9
|
-
import { useFeature as _e } from "flagged";
|
|
10
|
-
import { O as B } from "./STRINGS--j49GZJP.js";
|
|
11
|
-
import { Loader as Se } from "lucide-react";
|
|
12
|
-
import { g as Pe } from "./html-to-json-Z6R2o_fA.js";
|
|
13
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
14
|
-
import "clsx";
|
|
15
|
-
import "react-dom";
|
|
16
|
-
import "@radix-ui/react-scroll-area";
|
|
17
|
-
import "@floating-ui/react-dom";
|
|
18
|
-
import "i18next";
|
|
19
|
-
import "./Functions-7jnEwJyw.js";
|
|
20
|
-
import "tailwind-merge";
|
|
21
|
-
import "@react-hookz/web";
|
|
22
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
23
|
-
import "@radix-ui/react-toggle";
|
|
24
|
-
import "class-variance-authority";
|
|
25
|
-
import "./Class-6Hz2KzYb.js";
|
|
26
|
-
import "@radix-ui/react-switch";
|
|
27
|
-
import "@radix-ui/react-slot";
|
|
28
|
-
import "@radix-ui/react-accordion";
|
|
29
|
-
import "@radix-ui/react-alert-dialog";
|
|
30
|
-
import "@radix-ui/react-dialog";
|
|
31
|
-
import "@radix-ui/react-label";
|
|
32
|
-
import "@radix-ui/react-tabs";
|
|
33
|
-
import "@radix-ui/react-tooltip";
|
|
34
|
-
import "@radix-ui/react-popover";
|
|
35
|
-
import "@radix-ui/react-menubar";
|
|
36
|
-
import "@radix-ui/react-hover-card";
|
|
37
|
-
import "@radix-ui/react-select";
|
|
38
|
-
import "@radix-ui/react-dropdown-menu";
|
|
39
|
-
import "@radix-ui/react-separator";
|
|
40
|
-
import "@radix-ui/react-toast";
|
|
41
|
-
import "cmdk";
|
|
42
|
-
import "@radix-ui/react-context-menu";
|
|
43
|
-
import "react-icons-picker";
|
|
44
|
-
import "react-quill";
|
|
45
|
-
import "react-hotkeys-hook";
|
|
46
|
-
import "lodash";
|
|
47
|
-
import "himalaya";
|
|
48
|
-
const Le = ({ block: s }) => {
|
|
49
|
-
const { type: r, icon: i, label: l } = s, { addCoreBlock: d, addPredefinedBlock: c } = _(), [n, t] = S(), [, p] = se(), [, m] = N(P), o = () => {
|
|
50
|
-
if (F(s, "blocks")) {
|
|
51
|
-
const u = W(s.blocks) ? s.blocks() : s.blocks;
|
|
52
|
-
c(G(u), x(n));
|
|
53
|
-
} else
|
|
54
|
-
d(s, x(n));
|
|
55
|
-
m(B);
|
|
56
|
-
}, a = _e("dnd");
|
|
57
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(te, { children: [
|
|
58
|
-
/* @__PURE__ */ e.jsx(re, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
59
|
-
"button",
|
|
60
|
-
{
|
|
61
|
-
onClick: o,
|
|
62
|
-
type: "button",
|
|
63
|
-
onDragStart: (u) => {
|
|
64
|
-
u.dataTransfer.setData("text/plain", JSON.stringify(J(s, ["component", "icon"]))), setTimeout(() => {
|
|
65
|
-
t([]), p(null), m(B);
|
|
66
|
-
}, 200);
|
|
67
|
-
},
|
|
68
|
-
draggable: a ? "true" : "false",
|
|
69
|
-
className: "space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 " + (a ? "cursor-grab" : "cursor-pointer"),
|
|
70
|
-
children: [
|
|
71
|
-
O(i || Te, { className: "w-4 h-4 mx-auto" }),
|
|
72
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: l || r })
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
) }),
|
|
76
|
-
/* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: l || r }) })
|
|
77
|
-
] }) });
|
|
78
|
-
}, Ie = ({ block: s, closePopover: r }) => {
|
|
79
|
-
const [i, l] = g(!1), d = T("getExternalPredefinedBlock", K()), { addCoreBlock: c, addPredefinedBlock: n } = _(), [t] = S(), p = q(
|
|
80
|
-
async (m) => {
|
|
81
|
-
if (m.stopPropagation(), F(s, "component")) {
|
|
82
|
-
c(s, x(t)), r();
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
l(!0);
|
|
86
|
-
const o = await d(s);
|
|
87
|
-
b(o) || n(G(o), x(t)), r();
|
|
88
|
-
},
|
|
89
|
-
[s]
|
|
90
|
-
);
|
|
91
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
onClick: i ? () => {
|
|
95
|
-
} : p,
|
|
96
|
-
className: "relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",
|
|
97
|
-
children: [
|
|
98
|
-
i && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70", children: [
|
|
99
|
-
/* @__PURE__ */ e.jsx(Se, { className: "animate-spin", size: 15, color: "white" }),
|
|
100
|
-
" ",
|
|
101
|
-
/* @__PURE__ */ e.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
|
|
102
|
-
] }),
|
|
103
|
-
s.preview ? /* @__PURE__ */ e.jsx(
|
|
104
|
-
"img",
|
|
105
|
-
{
|
|
106
|
-
src: s.preview,
|
|
107
|
-
className: "min-h-[50px] w-full rounded-md border border-gray-300",
|
|
108
|
-
alt: s.label
|
|
109
|
-
}
|
|
110
|
-
) : /* @__PURE__ */ e.jsx("div", { className: "flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200", children: /* @__PURE__ */ e.jsx("p", { className: "max-w-xs text-center text-sm text-gray-700", children: s.label }) })
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
) });
|
|
114
|
-
}, Ee = () => {
|
|
115
|
-
const { data: s } = z(), r = M(), i = k(v(r), { category: "custom" }), l = w(i, "group"), d = w(s, "group"), c = U(() => Y(l, d, (o, a) => {
|
|
116
|
-
if (L(o) && L(a))
|
|
117
|
-
return [...o, ...a];
|
|
118
|
-
}), [l, d]), [n, t] = g(x(Q(c)) || ""), [, p] = N(P), m = X(c, n, []);
|
|
119
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden py-2", children: [
|
|
120
|
-
/* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex w-full items-center p-3", children: /* @__PURE__ */ e.jsxs(le, { value: n, onValueChange: (o) => t(o), children: [
|
|
121
|
-
/* @__PURE__ */ e.jsx(ae, { className: "w-full", children: /* @__PURE__ */ e.jsx(ie, { placeholder: "Select a provider" }) }),
|
|
122
|
-
/* @__PURE__ */ e.jsxs(ce, { children: [
|
|
123
|
-
/* @__PURE__ */ e.jsx(E, { value: "", children: "Choose" }),
|
|
124
|
-
y.Children.toArray(
|
|
125
|
-
A(c, (o, a) => /* @__PURE__ */ e.jsx(E, { value: a, children: a }, a))
|
|
126
|
-
)
|
|
127
|
-
] })
|
|
128
|
-
] }) }),
|
|
129
|
-
/* @__PURE__ */ e.jsx("div", { className: "h-full w-full space-y-2 overflow-y-auto px-2", children: y.Children.toArray(
|
|
130
|
-
m.map((o) => /* @__PURE__ */ e.jsx(Ie, { block: o, closePopover: () => p(B) }))
|
|
131
|
-
) })
|
|
132
|
-
] });
|
|
133
|
-
}, Fe = () => {
|
|
134
|
-
const { t: s } = H(), [r, i] = g(""), { addPredefinedBlock: l } = _(), [d] = S(), [, c] = N(P), n = () => {
|
|
135
|
-
const t = Pe(r);
|
|
136
|
-
l([...t], x(d) || null), i(""), c(B);
|
|
137
|
-
};
|
|
138
|
-
return /* @__PURE__ */ e.jsxs(ne, { className: "border-border/0 p-0 shadow-none", children: [
|
|
139
|
-
/* @__PURE__ */ e.jsx(de, { className: "p-3", children: /* @__PURE__ */ e.jsx(me, { children: s("html_snippet_description") }) }),
|
|
140
|
-
/* @__PURE__ */ e.jsx(pe, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
141
|
-
/* @__PURE__ */ e.jsx(ue, { htmlFor: "current", className: "text-sm", children: s("tailwind_html_snippet") }),
|
|
142
|
-
/* @__PURE__ */ e.jsx(
|
|
143
|
-
he,
|
|
144
|
-
{
|
|
145
|
-
autoFocus: !0,
|
|
146
|
-
tabIndex: 1,
|
|
147
|
-
ref: (t) => t && t.focus(),
|
|
148
|
-
onChange: (t) => i(t.target.value),
|
|
149
|
-
rows: 12,
|
|
150
|
-
value: r,
|
|
151
|
-
placeholder: s("enter_code_snippet"),
|
|
152
|
-
className: "resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
] }) }),
|
|
156
|
-
/* @__PURE__ */ e.jsxs(xe, { className: "flex flex-col justify-end p-3", children: [
|
|
157
|
-
/* @__PURE__ */ e.jsx(fe, { disabled: r.trim() === "", onClick: () => n(), size: "sm", className: "w-full", children: s("import_html") }),
|
|
158
|
-
/* @__PURE__ */ e.jsx(ge, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(je, { className: "text-xs font-normal leading-4", children: s("note_imported_html") }) })
|
|
159
|
-
] })
|
|
160
|
-
] });
|
|
161
|
-
}, _s = () => {
|
|
162
|
-
const { t: s } = H(), [r, i] = g("core"), [l, d] = g("basic"), c = M(), [, n] = N(be), t = T("importHTMLSupport", !0), p = T("filterChaiBlock", () => !0), { data: m, isLoading: o } = z(), a = k(c, p), u = w(a, "category"), f = Z(A(u.core, "group"));
|
|
163
|
-
V(() => {
|
|
164
|
-
!$(f, l) && !b(f) && !b(l) && d(x(f));
|
|
165
|
-
}, [f, l]);
|
|
166
|
-
const j = !o && !b(m) || ee(v(a), { category: "custom" }) !== void 0;
|
|
167
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-72 flex-col overflow-hidden", children: [
|
|
168
|
-
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
|
|
169
|
-
/* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: s("add_block") }),
|
|
170
|
-
/* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s(r === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
|
|
171
|
-
] }),
|
|
172
|
-
/* @__PURE__ */ e.jsx(
|
|
173
|
-
ke,
|
|
174
|
-
{
|
|
175
|
-
onValueChange: (h) => {
|
|
176
|
-
n(""), i(h);
|
|
177
|
-
},
|
|
178
|
-
value: r,
|
|
179
|
-
className: "h-max",
|
|
180
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
181
|
-
ve,
|
|
182
|
-
{
|
|
183
|
-
className: "grid w-full " + (j && t ? "grid-cols-3" : j && !t || !j && t ? "grid-cols-2" : "grid-cols-1"),
|
|
184
|
-
children: [
|
|
185
|
-
/* @__PURE__ */ e.jsx(C, { value: "core", children: s("Blocks") }),
|
|
186
|
-
j ? /* @__PURE__ */ e.jsx(C, { value: "ui-blocks", children: s("ui_library") }) : null,
|
|
187
|
-
t ? /* @__PURE__ */ e.jsx(C, { value: "html", children: s("import") }) : null
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
)
|
|
191
|
-
}
|
|
192
|
-
),
|
|
193
|
-
r === "core" && /* @__PURE__ */ e.jsx(ye, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: y.Children.toArray(
|
|
194
|
-
A(
|
|
195
|
-
f,
|
|
196
|
-
(h) => I(k(v(u.core), { group: h }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(Be, { type: "single", value: h, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(Ne, { value: h, children: [
|
|
197
|
-
/* @__PURE__ */ e.jsx(Ce, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: h }),
|
|
198
|
-
/* @__PURE__ */ e.jsx(we, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: y.Children.toArray(
|
|
199
|
-
I(k(v(u.core), { group: h }), { hidden: !0 }).map((D) => /* @__PURE__ */ e.jsx(Le, { block: D }))
|
|
200
|
-
) }) })
|
|
201
|
-
] }) }) : null
|
|
202
|
-
)
|
|
203
|
-
) }) }),
|
|
204
|
-
r === "ui-blocks" && /* @__PURE__ */ e.jsx(R, { fallback: /* @__PURE__ */ e.jsx(Ae, { className: "h-32 w-full" }), children: /* @__PURE__ */ e.jsx(Ee, {}) }),
|
|
205
|
-
r === "html" && t ? /* @__PURE__ */ e.jsx(Fe, {}) : null
|
|
206
|
-
] });
|
|
207
|
-
};
|
|
208
|
-
export {
|
|
209
|
-
_s as default
|
|
210
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-Z_BpKhVy.cjs"),B=require("react"),R=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),p=require("./ChaiBuilderEditor-PLQ8Sq34.cjs"),r=require("./controls-jWJDao88.cjs"),f=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");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-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-quill");require("react-hotkeys-hook");require("lodash");require("lucide-react");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const q=N(B),k=({value:t,onChange:e,id:i,onBlur:l})=>{const n=f.debounce(e,200),v=u=>n(u.target.value);return a.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:a.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:a.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:t,onBlur:({target:{value:u}})=>l(i,u),onChange:v})})})},x=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"}],P=()=>{const t=p.useBuilderProp("onSaveBrandingOptions",f.noop),[e,i]=p.useBrandingOptions(),[l]=p.useBlocksContainer(),n=q.useRef(e);q.useEffect(()=>()=>{f.isEqual(e,n.current)||t(n.current)},[]);const v=({formData:o},c)=>{c&&(i(o),n.current=o)},{bodyFont:u,headingFont:m,primaryColor:b,bodyTextDarkColor:y,bodyTextLightColor:h,bodyBgDarkColor:S,secondaryColor:C,bodyBgLightColor:O,roundedCorners:j}=e;let s={headingFont:r.y({title:"Heading font",default:m,options:x}),bodyFont:r.y({title:"Body font",default:u,options:x}),roundedCorners:r.c({title:"Rounded Corner",default:parseInt(j||5,10)}),primaryColor:r.f({title:"Primary",default:b}),secondaryColor:r.f({title:"Secondary",default:C})};l||(s={...s,bodyBgLightColor:r.f({title:"Body Background (Light Mode)",default:O}),bodyTextLightColor:r.f({title:"Body Text (Light Mode)",default:y}),bodyBgDarkColor:r.f({title:"Body Background (Dark mode)",default:S}),bodyTextDarkColor:r.f({title:"Body Text (Dark mode)",default:h})});const d={type:"object",properties:{}},g={};return Object.keys(s).forEach(o=>{const c=s[o];return d.properties||(d.properties={}),d.properties[o]=c.schema,g[o]=c.uiSchema,!0}),a.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-60 select-none flex-col",children:[a.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:a.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),a.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:a.jsxRuntimeExports.jsx(E,{widgets:{color:k},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:g,schema:d,formData:e,validator:R,onChange:v})})]})};exports.default=P;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./ChaiBuilderEditor-PLQ8Sq34.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-mVQVs_cP.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");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-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-quill");require("react-hotkeys-hook");require("lodash");require("./core.cjs");require("./html-to-json-VPWiWWGH.cjs");require("himalaya");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),m=o.useChangePage(),{t:q}=f.useTranslation(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&t.homepage&&!i.find(u,{uuid:n})&&a(t.homepage)},[n,u,t,a]),l.useEffect(()=>()=>a(null),[a]);const g=r=>{if(d!=="SAVED")j.toast.error(q("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});m(h)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(s.Select,{value:n||"",onValueChange:g,children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(s.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=E;
|