@chaibuilder/sdk 1.2.64 → 1.2.65
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/CanvasArea-fSdH_RiN.cjs +1 -0
- package/dist/{CanvasArea-kB6ky_uL.js → CanvasArea-ut5yknzX.js} +58 -54
- package/dist/{CodeEditor-37od44Ou.js → CodeEditor-Qff4q7sx.js} +1 -1
- package/dist/{CurrentPage-bHq9Uusr.js → CurrentPage-jHSVy3hq.js} +38 -26
- package/dist/CurrentPage-p_AM4lrF.cjs +1 -0
- package/dist/{PagesPanel-wIPAyjJK.js → PagesPanel-U3InJ9Db.js} +20 -8
- package/dist/PagesPanel-wqDb4D-x.cjs +1 -0
- package/dist/{ProjectPanel-L-SlDizV.js → ProjectPanel-XODJTO4J.js} +36 -24
- package/dist/ProjectPanel-fWESzHr6.cjs +1 -0
- package/dist/{SidePanels-UQj0XTnb.js → SidePanels-ijaUKSek.js} +96 -82
- package/dist/SidePanels-lrMQqc0h.cjs +1 -0
- package/dist/Topbar-RrCDxd0i.cjs +1 -0
- package/dist/{Topbar-1O05wogM.js → Topbar-vHlnfxPs.js} +45 -30
- package/dist/UILibrariesPanel-7btHgBD0.cjs +1 -0
- package/dist/{UILibrariesPanel-vshiYI6G.js → UILibrariesPanel-NVUMUPUj.js} +85 -65
- package/dist/{UnsplashImages-Eq7hprBO.js → UnsplashImages-UkHihhA5.js} +18 -18
- package/dist/{UploadImages-lco2Tea3.js → UploadImages-HtuJZJlo.js} +1 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +1 -0
- package/dist/{add-page-modal-qr7rvJzN.js → add-page-modal-TOfMfmPA.js} +33 -24
- package/dist/{confirm-alert-P6TAevaP.js → confirm-alert-eIp2cAkc.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +7 -8
- package/dist/core.js +74 -59
- package/dist/{delete-page-modal-55oioI9i.js → delete-page-modal-4bxjpVBD.js} +33 -21
- package/dist/delete-page-modal-qYDZmpgT.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.js +20 -5
- package/dist/{form-5ke_lZv8.js → form-NAzFjGs0.js} +9 -9
- package/dist/html-to-json-NqRjgFqp.cjs +1 -0
- package/dist/html-to-json-l_mw5y-e.js +243 -0
- package/dist/{index-6w-6HYBd.cjs → index--k2M8kzI.cjs} +1 -1
- package/dist/{index-audsIPBC.cjs → index-5XyNUAjc.cjs} +81 -22
- package/dist/{index-b33n_-zO.js → index-C7mB4XFm.js} +117 -117
- package/dist/{index-fnkMn4Pk.js → index-YZhtVcj_.js} +4 -4
- package/dist/{index-wRAIA8zZ.js → index-lFgDm1oa.js} +48587 -45055
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +22 -22
- package/dist/page-viewer-4wrnWnK0.js +124 -0
- package/dist/page-viewer-ra0GLx1p.cjs +1 -0
- package/dist/{project-general-setting-NEkNjf7V.js → project-general-setting-IwZUkYF3.js} +18 -9
- package/dist/project-general-setting-lFjTUhHD.cjs +1 -0
- package/dist/{project-seo-setting-YmspOYsF.js → project-seo-setting-e1fTqVsd.js} +2 -2
- package/dist/{single-page-detail-jHzoDP7B.js → single-page-detail-ZNWFKqLW.js} +64 -55
- package/dist/single-page-detail-g55Anu7R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +18 -6
- package/dist/style.css +2 -2
- package/dist/ui.js +67 -67
- package/package.json +1 -1
- package/dist/AddBlocks-6dJmFSgk.js +0 -142
- package/dist/AddBlocks-doCNVVbk.cjs +0 -1
- package/dist/CanvasArea-kdnkFfKR.cjs +0 -1
- package/dist/CurrentPage-Ekl5Cwbv.cjs +0 -1
- package/dist/PagesPanel-SMHrEmCb.cjs +0 -1
- package/dist/ProjectPanel-YruLal65.cjs +0 -1
- package/dist/Settings-WXkCyhAv.js +0 -2380
- package/dist/Settings-_5VHcgFC.cjs +0 -1
- package/dist/SidePanels-UeIZB3e1.cjs +0 -1
- package/dist/StaticCanvas-7C52tXAv.js +0 -749
- package/dist/StaticCanvas-ll9VTXI5.cjs +0 -60
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +0 -1
- package/dist/ThemeConfigPanel-gw8B2zvx.js +0 -194
- package/dist/Topbar-gb17oHdJ.cjs +0 -1
- package/dist/UILibrariesPanel-03Y3F3A_.cjs +0 -1
- package/dist/add-page-modal-rOKavDFX.cjs +0 -1
- package/dist/atoms-KQpaDRnF.cjs +0 -1
- package/dist/atoms-Oomqut88.js +0 -6
- package/dist/delete-page-modal-wdAiMVnL.cjs +0 -1
- package/dist/html-to-json-_01DXd-a.js +0 -192
- package/dist/html-to-json-ndxaXRT8.cjs +0 -1
- package/dist/index-e0c8PmRQ.js +0 -205
- package/dist/index-gi1LIOCw.cjs +0 -1
- package/dist/page-viewer-t44DP65U.js +0 -112
- package/dist/page-viewer-wU7T0f48.cjs +0 -1
- package/dist/plugin-2hf9pCRy.cjs +0 -1
- package/dist/plugin-wDnsBVPp.js +0 -54
- package/dist/project-general-setting-87cX9vvO.cjs +0 -1
- package/dist/single-page-detail-27UjWK8L.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { av as Q, ay as j, aw as J, ax as K, aU as N, bJ as O, A as U, b8 as X, g as Y, b as Z, e as z, f as W, c as _, d as $, a as aa, aV as ea, bB as oa, B as ta, aP as ra, aS as sa, aR as na, aT as ia, aQ as pa, bL as ba, a7 as ua, ci as ca, aa as ma, ab as la, a8 as da, ac as ga, a9 as Ca, ck as Ma, cj as Sa, q as Da, cl as Ta, o as xa, cq as Aa, C as wa, cn as ha, cr as Ia, cv as Pa, cm as Ga, co as La, cp as va, cs as Fa, ct as Ha, cu as Ra, r as ka, ah as Ba, aj as Va, af as fa, ag as Ea, ad as qa, ae as ya, ai as Qa, L as ja, Q as Ja, N as Ka, aK as Na, aL as Oa, O as Ua, cb as Xa, cf as Ya, ca as Za, P as za, aM as Wa, cc as _a, cd as $a, ce as ae, M as ee, H as oe, I as te, G as re, ao as se, ap as ne, aF as ie, as as pe, aq as be, bN as ue, bU as ce, bQ as me, b_ as le, bR as de, bT as ge, bO as Ce, bX as Me, bV as Se, bW as De, bS as Te, c0 as xe, b$ as Ae, bY as we, bZ as he, bP as Ie, a4 as Pe, a6 as Ge, a5 as Le, an as ve, aJ as Fe, bM as He, bw as Re, bz as ke, bD as Be, bA as Ve, bE as fe, c1 as Ee, bx as qe, by as ye, bF as Qe, c2 as je, c4 as Je, c5 as Ke, c9 as Ne, c7 as Oe, c6 as Ue, c8 as Xe, c3 as Ye, a3 as Ze, ar as ze, aX as We, bC as _e, aY as $e, aZ as ao, aB as eo, bg as oo, bG as to, T as ro, w as so, aG as no, bd as io, v as po, bK as bo, bI as uo, cg as co, ch as mo, bH as lo, aE as go } from "./index-C7mB4XFm.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
@@ -39,19 +39,19 @@ import "tree-model";
|
|
|
39
39
|
import "react-i18next";
|
|
40
40
|
export {
|
|
41
41
|
Q as Accordion,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
j as AccordionContent,
|
|
43
|
+
J as AccordionItem,
|
|
44
|
+
K as AccordionTrigger,
|
|
45
|
+
N as Alert,
|
|
46
|
+
O as AlertDescription,
|
|
47
|
+
U as AlertDialog,
|
|
48
48
|
X as AlertDialogAction,
|
|
49
49
|
Y as AlertDialogCancel,
|
|
50
50
|
Z as AlertDialogContent,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
z as AlertDialogDescription,
|
|
52
|
+
W as AlertDialogFooter,
|
|
53
|
+
_ as AlertDialogHeader,
|
|
54
|
+
$ as AlertDialogTitle,
|
|
55
55
|
aa as AlertDialogTrigger,
|
|
56
56
|
ea as AlertTitle,
|
|
57
57
|
oa as Badge,
|
|
@@ -60,11 +60,11 @@ export {
|
|
|
60
60
|
sa as CardContent,
|
|
61
61
|
na as CardDescription,
|
|
62
62
|
ia as CardFooter,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
pa as CardHeader,
|
|
64
|
+
ba as CardTitle,
|
|
65
65
|
ua as Command,
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
ca as CommandDialog,
|
|
67
|
+
ma as CommandEmpty,
|
|
68
68
|
la as CommandGroup,
|
|
69
69
|
da as CommandInput,
|
|
70
70
|
ga as CommandItem,
|
|
@@ -75,37 +75,37 @@ export {
|
|
|
75
75
|
Ta as ContextMenuCheckboxItem,
|
|
76
76
|
xa as ContextMenuContent,
|
|
77
77
|
Aa as ContextMenuGroup,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
wa as ContextMenuItem,
|
|
79
|
+
ha as ContextMenuLabel,
|
|
80
80
|
Ia as ContextMenuPortal,
|
|
81
81
|
Pa as ContextMenuRadioGroup,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
Ga as ContextMenuRadioItem,
|
|
83
|
+
La as ContextMenuSeparator,
|
|
84
|
+
va as ContextMenuShortcut,
|
|
85
|
+
Fa as ContextMenuSub,
|
|
86
86
|
Ha as ContextMenuSubContent,
|
|
87
87
|
Ra as ContextMenuSubTrigger,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
ka as ContextMenuTrigger,
|
|
89
|
+
Ba as Dialog,
|
|
90
|
+
Va as DialogContent,
|
|
91
91
|
fa as DialogDescription,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
Ea as DialogFooter,
|
|
93
|
+
qa as DialogHeader,
|
|
94
|
+
ya as DialogTitle,
|
|
95
95
|
Qa as DialogTrigger,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
ja as DropdownMenu,
|
|
97
|
+
Ja as DropdownMenuCheckboxItem,
|
|
98
|
+
Ka as DropdownMenuContent,
|
|
99
|
+
Na as DropdownMenuGroup,
|
|
100
|
+
Oa as DropdownMenuItem,
|
|
101
|
+
Ua as DropdownMenuLabel,
|
|
102
102
|
Xa as DropdownMenuPortal,
|
|
103
103
|
Ya as DropdownMenuRadioGroup,
|
|
104
104
|
Za as DropdownMenuRadioItem,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
za as DropdownMenuSeparator,
|
|
106
|
+
Wa as DropdownMenuShortcut,
|
|
107
|
+
_a as DropdownMenuSub,
|
|
108
|
+
$a as DropdownMenuSubContent,
|
|
109
109
|
ae as DropdownMenuSubTrigger,
|
|
110
110
|
ee as DropdownMenuTrigger,
|
|
111
111
|
oe as HoverCard,
|
|
@@ -114,11 +114,11 @@ export {
|
|
|
114
114
|
se as IconPickerField,
|
|
115
115
|
ne as ImagePickerField,
|
|
116
116
|
ie as Input,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
pe as Label,
|
|
118
|
+
be as LinkField,
|
|
119
119
|
ue as Menubar,
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
ce as MenubarCheckboxItem,
|
|
121
|
+
me as MenubarContent,
|
|
122
122
|
le as MenubarGroup,
|
|
123
123
|
de as MenubarItem,
|
|
124
124
|
ge as MenubarLabel,
|
|
@@ -129,37 +129,37 @@ export {
|
|
|
129
129
|
Te as MenubarSeparator,
|
|
130
130
|
xe as MenubarShortcut,
|
|
131
131
|
Ae as MenubarSub,
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
we as MenubarSubContent,
|
|
133
|
+
he as MenubarSubTrigger,
|
|
134
134
|
Ie as MenubarTrigger,
|
|
135
135
|
Pe as Popover,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
Ge as PopoverContent,
|
|
137
|
+
Le as PopoverTrigger,
|
|
138
|
+
ve as RTEField,
|
|
139
|
+
Fe as ScrollArea,
|
|
140
140
|
He as ScrollBar,
|
|
141
141
|
Re as Select,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
ke as SelectContent,
|
|
143
|
+
Be as SelectGroup,
|
|
144
|
+
Ve as SelectItem,
|
|
145
145
|
fe as SelectLabel,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
Ee as SelectSeparator,
|
|
147
|
+
qe as SelectTrigger,
|
|
148
|
+
ye as SelectValue,
|
|
149
149
|
Qe as Separator,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
je as Sheet,
|
|
151
|
+
Je as SheetClose,
|
|
152
|
+
Ke as SheetContent,
|
|
153
|
+
Ne as SheetDescription,
|
|
154
|
+
Oe as SheetFooter,
|
|
155
|
+
Ue as SheetHeader,
|
|
156
156
|
Xe as SheetTitle,
|
|
157
157
|
Ye as SheetTrigger,
|
|
158
158
|
Ze as Skeleton,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
ze as Switch,
|
|
160
|
+
We as Tabs,
|
|
161
|
+
_e as TabsContent,
|
|
162
|
+
$e as TabsList,
|
|
163
163
|
ao as TabsTrigger,
|
|
164
164
|
eo as Textarea,
|
|
165
165
|
oo as Toaster,
|
|
@@ -168,11 +168,11 @@ export {
|
|
|
168
168
|
so as TooltipContent,
|
|
169
169
|
no as TooltipPortal,
|
|
170
170
|
io as TooltipProvider,
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
po as TooltipTrigger,
|
|
172
|
+
bo as badgeVariants,
|
|
173
173
|
uo as buttonVariants,
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
co as reducer,
|
|
175
|
+
mo as toast,
|
|
176
176
|
lo as toggleVariants,
|
|
177
177
|
go as useToast
|
|
178
178
|
};
|
package/package.json
CHANGED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import N, { createElement as L, useState as j, useEffect as D } from "react";
|
|
3
|
-
import { has as E, isFunction as q, first as u, omit as B, filter as b, groupBy as M, uniq as z, map as y, includes as O, isEmpty as C, reject as v, values as T } from "lodash-es";
|
|
4
|
-
import { useAtom as x } from "jotai";
|
|
5
|
-
import { useTranslation as I } from "react-i18next";
|
|
6
|
-
import { aq as P, j as S, aA as R, bf as F, T as G, v as J, w as K, bg as U, bh as V, bi as W, bj as Y, b9 as Q, a6 as X, bk as Z, B as $, bl as ee, bm as te, bn as se, h as A, bo as oe, bp as re, bq as _, ai as ae, a8 as le, a9 as ie, aa as ce, ab as ne } from "./index-b33n_-zO.js";
|
|
7
|
-
import { BoxIcon as de } from "@radix-ui/react-icons";
|
|
8
|
-
import { syncBlocksWithDefaults as me, useChaiBlocks as pe } from "@chaibuilder/runtime";
|
|
9
|
-
import { O as k } from "./MODIFIERS-fd5XOmum.js";
|
|
10
|
-
import { d as he } from "./atoms-Oomqut88.js";
|
|
11
|
-
import { useFeature as ue } from "flagged";
|
|
12
|
-
import { g as xe } from "./html-to-json-_01DXd-a.js";
|
|
13
|
-
import { c as w } from "./Functions-7jnEwJyw.js";
|
|
14
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
15
|
-
import "@radix-ui/react-toggle";
|
|
16
|
-
import "class-variance-authority";
|
|
17
|
-
import "./utils-VpVqnC9m.js";
|
|
18
|
-
import "clsx";
|
|
19
|
-
import "tailwind-merge";
|
|
20
|
-
import "@radix-ui/react-switch";
|
|
21
|
-
import "@radix-ui/react-slot";
|
|
22
|
-
import "@radix-ui/react-accordion";
|
|
23
|
-
import "@radix-ui/react-alert-dialog";
|
|
24
|
-
import "@radix-ui/react-dialog";
|
|
25
|
-
import "@radix-ui/react-label";
|
|
26
|
-
import "@radix-ui/react-scroll-area";
|
|
27
|
-
import "@radix-ui/react-tabs";
|
|
28
|
-
import "@radix-ui/react-tooltip";
|
|
29
|
-
import "@radix-ui/react-popover";
|
|
30
|
-
import "@radix-ui/react-menubar";
|
|
31
|
-
import "@radix-ui/react-hover-card";
|
|
32
|
-
import "@radix-ui/react-select";
|
|
33
|
-
import "@radix-ui/react-dropdown-menu";
|
|
34
|
-
import "@radix-ui/react-separator";
|
|
35
|
-
import "@radix-ui/react-toast";
|
|
36
|
-
import "cmdk";
|
|
37
|
-
import "@radix-ui/react-context-menu";
|
|
38
|
-
import "react-icons-picker";
|
|
39
|
-
import "react-dom";
|
|
40
|
-
import "react-quill";
|
|
41
|
-
import "@react-hookz/web";
|
|
42
|
-
import "tree-model";
|
|
43
|
-
import "himalaya";
|
|
44
|
-
import "lodash";
|
|
45
|
-
const fe = ({ block: t }) => {
|
|
46
|
-
const [, l] = x(he), { type: s, icon: a, label: n } = t, { addCoreBlock: i, addPredefinedBlock: m } = P(), [o, f] = S(), [, d] = R(), [, h] = x(F), g = () => {
|
|
47
|
-
if (E(t, "blocks")) {
|
|
48
|
-
const r = q(t.blocks) ? t.blocks() : t.blocks;
|
|
49
|
-
m(me(r), u(o));
|
|
50
|
-
} else
|
|
51
|
-
i(t, u(o));
|
|
52
|
-
h(k);
|
|
53
|
-
}, p = ue("dnd");
|
|
54
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(G, { children: [
|
|
55
|
-
/* @__PURE__ */ e.jsx(J, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
onClick: g,
|
|
59
|
-
type: "button",
|
|
60
|
-
onDragStart: (r) => {
|
|
61
|
-
r.dataTransfer.setData("text/plain", JSON.stringify(B(t, ["component", "icon"]))), r.dataTransfer.setDragImage(new Image(), 0, 0), l(B(t, ["component", "icon"])), setTimeout(() => {
|
|
62
|
-
f([]), d(null), h(k);
|
|
63
|
-
}, 200);
|
|
64
|
-
},
|
|
65
|
-
draggable: p ? "true" : "false",
|
|
66
|
-
className: "cursor-pointer space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",
|
|
67
|
-
children: [
|
|
68
|
-
L(a || de, { className: "w-4 h-4 mx-auto" }),
|
|
69
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: n || s })
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
) }),
|
|
73
|
-
/* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx("p", { children: n || s }) })
|
|
74
|
-
] }) });
|
|
75
|
-
}, ge = () => {
|
|
76
|
-
const { t } = I(), [l, s] = j(""), { addPredefinedBlock: a } = P(), [n] = S(), [, i] = x(F), m = () => {
|
|
77
|
-
const o = xe(l);
|
|
78
|
-
a([...o], u(n) || null), s(""), i(k);
|
|
79
|
-
};
|
|
80
|
-
return /* @__PURE__ */ e.jsxs(U, { className: "border-border/0 p-0 shadow-none", children: [
|
|
81
|
-
/* @__PURE__ */ e.jsx(V, { className: "p-3", children: /* @__PURE__ */ e.jsx(W, { children: t("html_snippet_description") }) }),
|
|
82
|
-
/* @__PURE__ */ e.jsx(Y, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
83
|
-
/* @__PURE__ */ e.jsx(Q, { htmlFor: "current", className: "text-sm", children: t("tailwind_html_snippet") }),
|
|
84
|
-
/* @__PURE__ */ e.jsx(
|
|
85
|
-
X,
|
|
86
|
-
{
|
|
87
|
-
autoFocus: !0,
|
|
88
|
-
tabIndex: 1,
|
|
89
|
-
ref: (o) => o && o.focus(),
|
|
90
|
-
onChange: (o) => s(o.target.value),
|
|
91
|
-
rows: 12,
|
|
92
|
-
value: l,
|
|
93
|
-
placeholder: t("enter_code_snippet"),
|
|
94
|
-
className: "resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] }) }),
|
|
98
|
-
/* @__PURE__ */ e.jsxs(Z, { className: "flex flex-col justify-end p-3", children: [
|
|
99
|
-
/* @__PURE__ */ e.jsx($, { disabled: l.trim() === "", onClick: () => m(), size: "sm", className: "w-full", children: t("import_html") }),
|
|
100
|
-
/* @__PURE__ */ e.jsx(ee, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(te, { className: "text-xs font-normal leading-4", children: t("note_imported_html") }) })
|
|
101
|
-
] })
|
|
102
|
-
] });
|
|
103
|
-
}, ct = ({ className: t, showHeading: l = !0 }) => {
|
|
104
|
-
const { t: s } = I(), [a, n] = j("core"), [i, m] = j("basic"), o = pe(), [, f] = x(se), d = A("importHTMLSupport", !0), h = A("filterChaiBlock", () => !0), g = b(o, h), p = M(g, "category"), r = z(y(p.core, "group"));
|
|
105
|
-
return D(() => {
|
|
106
|
-
!O(r, i) && !C(r) && !C(i) && m(u(r));
|
|
107
|
-
}, [r, i]), /* @__PURE__ */ e.jsxs("div", { className: w("flex h-full w-full flex-col overflow-hidden", t), children: [
|
|
108
|
-
l ? /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
|
|
109
|
-
/* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: s("add_block") }),
|
|
110
|
-
/* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s(a === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
|
|
111
|
-
] }) : null,
|
|
112
|
-
/* @__PURE__ */ e.jsx(
|
|
113
|
-
oe,
|
|
114
|
-
{
|
|
115
|
-
onValueChange: (c) => {
|
|
116
|
-
f(""), n(c);
|
|
117
|
-
},
|
|
118
|
-
value: a,
|
|
119
|
-
className: w("h-max", d ? "" : "hidden"),
|
|
120
|
-
children: /* @__PURE__ */ e.jsxs(re, { className: "grid w-full " + (d ? "grid-cols-2" : "grid-cols-1"), children: [
|
|
121
|
-
/* @__PURE__ */ e.jsx(_, { value: "core", children: s("Blocks") }),
|
|
122
|
-
d ? /* @__PURE__ */ e.jsx(_, { value: "html", children: s("import") }) : null
|
|
123
|
-
] })
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
a === "core" && /* @__PURE__ */ e.jsx(ae, { className: "-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: N.Children.toArray(
|
|
127
|
-
y(
|
|
128
|
-
r,
|
|
129
|
-
(c) => v(b(T(p.core), { group: c }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(le, { type: "single", value: c, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(ie, { value: c, children: [
|
|
130
|
-
/* @__PURE__ */ e.jsx(ce, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: c }),
|
|
131
|
-
/* @__PURE__ */ e.jsx(ne, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: N.Children.toArray(
|
|
132
|
-
v(b(T(p.core), { group: c }), { hidden: !0 }).map((H) => /* @__PURE__ */ e.jsx(fe, { block: H }))
|
|
133
|
-
) }) })
|
|
134
|
-
] }) }) : null
|
|
135
|
-
)
|
|
136
|
-
) }) }),
|
|
137
|
-
a === "html" && d ? /* @__PURE__ */ e.jsx(ge, {}) : null
|
|
138
|
-
] });
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
ct as default
|
|
142
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),d=require("react"),t=require("lodash-es"),g=require("jotai"),b=require("react-i18next"),s=require("./index-aeDphKpP.cjs"),k=require("@radix-ui/react-icons"),T=require("@chaibuilder/runtime"),q=require("./MODIFIERS-mVmfEGgo.cjs"),y=require("./atoms-KQpaDRnF.cjs"),B=require("flagged"),v=require("./html-to-json-ndxaXRT8.cjs"),R=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.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-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("@react-hookz/web");require("tree-model");require("himalaya");require("lodash");const C=({block:r})=>{const[,c]=g.useAtom(y.draggedBlockAtom),{type:o,icon:l,label:x}=r,{addCoreBlock:a,addPredefinedBlock:p}=s.useAddBlock(),[i,f]=s.useSelectedBlockIds(),[,m]=s.useHighlightBlockId(),[,h]=g.useAtom(s.activePanelAtom),E=()=>{if(t.has(r,"blocks")){const n=t.isFunction(r.blocks)?r.blocks():r.blocks;p(T.syncBlocksWithDefaults(n),t.first(i))}else a(r,t.first(i));h(q.OUTLINE_KEY)},j=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:E,type:"button",onDragStart:n=>{n.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),n.dataTransfer.setDragImage(new Image,0,0),c(t.omit(r,["component","icon"])),setTimeout(()=>{f([]),m(null),h(q.OUTLINE_KEY)},200)},draggable:j?"true":"false",className:"cursor-pointer space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",children:[d.createElement(l||k.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:x||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:x||o})})]})})},A=()=>{const{t:r}=b.useTranslation(),[c,o]=d.useState(""),{addPredefinedBlock:l}=s.useAddBlock(),[x]=s.useSelectedBlockIds(),[,a]=g.useAtom(s.activePanelAtom),p=()=>{const i=v.getBlocksFromHTML(c);l([...i],t.first(x)||null),o(""),a(q.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:i=>i&&i.focus(),onChange:i=>o(i.target.value),rows:12,value:c,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:c.trim()==="",onClick:()=>p(),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")})})]})]})},_=({className:r,showHeading:c=!0})=>{const{t:o}=b.useTranslation(),[l,x]=d.useState("core"),[a,p]=d.useState("basic"),i=T.useChaiBlocks(),[,f]=g.useAtom(s.showPredefinedBlockCategoryAtom),m=s.useBuilderProp("importHTMLSupport",!0),h=s.useBuilderProp("filterChaiBlock",()=>!0),E=t.filter(i,h),j=t.groupBy(E,"category"),n=t.uniq(t.map(j.core,"group"));return d.useEffect(()=>{!t.includes(n,a)&&!t.isEmpty(n)&&!t.isEmpty(a)&&p(t.first(n))},[n,a]),e.jsxRuntimeExports.jsxs("div",{className:R.cn("flex h-full w-full flex-col overflow-hidden",r),children:[c?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:o("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:o(l==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}):null,e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:u=>{f(""),x(u)},value:l,className:R.cn("h-max",m?"":"hidden"),children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(m?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:o("Blocks")}),m?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:o("import")}):null]})}),l==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:d.Children.toArray(t.map(n,u=>t.reject(t.filter(t.values(j.core),{group:u}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:u,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:u,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:u}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:d.Children.toArray(t.reject(t.filter(t.values(j.core),{group:u}),{hidden:!0}).map(N=>e.jsxRuntimeExports.jsx(C,{block:N})))})})]})}):null))})}),l==="html"&&m?e.jsxRuntimeExports.jsx(A,{}):null]})};exports.default=_;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("react"),u=require("lodash-es"),a=require("@radix-ui/react-icons"),n=require("./index-audsIPBC.cjs"),s=require("./index-aeDphKpP.cjs"),c=require("react-i18next"),j=require("jotai"),m=require("lucide-react"),d=require("./StaticCanvas-ll9VTXI5.cjs"),p=require("re-resizable");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("./index--mLLy7QQ.cjs");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("tree-model");require("prop-types");require("./atoms-KQpaDRnF.cjs");require("@floating-ui/dom");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./plugin-2hf9pCRy.cjs");require("lodash");require("react-wrap-balancer");function h(){const[r,t]=s.useDarkMode();return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(a.SunIcon,{className:"size-4 shrink-0"}),e.jsxRuntimeExports.jsx(s.Switch,{id:"dark-mode-switch",checked:r,onCheckedChange:()=>{t(!r)},className:`${r?"bg-violet-600":"bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${r?"translate-x-5":"translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})}),e.jsxRuntimeExports.jsx(n.FaMoon,{className:"size-4 ml-3 shrink-0"})]})}const q=()=>{const{t:r}=c.useTranslation(),{setNewBlocks:t}=s.useBlocksStoreUndoableActions(),[,l]=s.useSelectedBlockIds(),[,o]=s.useSelectedStylingBlocks(),x=i.useCallback(()=>{t([]),l([]),o([])},[t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(s.AlertDialog,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(s.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[e.jsxRuntimeExports.jsx(a.EraserIcon,{})," ",r("clear")]})}),e.jsxRuntimeExports.jsxs(s.AlertDialogContent,{className:"border-border",children:[e.jsxRuntimeExports.jsxs(s.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTitle,{children:r("clear_canvas_title")}),e.jsxRuntimeExports.jsx(s.AlertDialogDescription,{children:r("clear_canvas_description")})]}),e.jsxRuntimeExports.jsxs(s.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogCancel,{children:r("cancel")}),e.jsxRuntimeExports.jsx(s.AlertDialogAction,{onClick:x,children:r("yes")})]})]})]})})},E=()=>{const[r,t]=j.useAtom(s.aiAssistantActiveAtom);return s.useBuilderProp("askAiCallBack",null)?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsxs(s.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[e.jsxRuntimeExports.jsx(m.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),e.jsxRuntimeExports.jsx(s.Switch,{className:"scale-90",checked:r,onCheckedChange:o=>{t(o)},id:"ai-assitantt"})]}):null},R=()=>{const r=s.useBuilderProp("darkMode",!0),[t]=s.useCanvasZoom();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[e.jsxRuntimeExports.jsx(n.Breakpoints,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(h,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"})]}):null,e.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[e.jsxRuntimeExports.jsx(a.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",e.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[u.round(t,0),"%"]})]}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(n.UndoRedo,{})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[e.jsxRuntimeExports.jsx(q,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(E,{})]})]})},f=i.lazy(()=>Promise.resolve().then(()=>require("./CodeEditor-ypUx3RAV.cjs"))),v=()=>{const[r]=s.useCodeEditor();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxRuntimeExports.jsx(R,{}),e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-gray-100/40 px-2",children:[e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(n.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(d.default,{})})}),r?e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(p.Resizable,{enable:{top:!0,bottom:!1},className:"max-h-[400px] min-h-[200px]",children:e.jsxRuntimeExports.jsx(f,{})})}):null]})]})};exports.default=v;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./index-aeDphKpP.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-6w-6HYBd.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");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("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),q=o.useChangePage(),{t:m}=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(m("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});q(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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index-6w-6HYBd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-audsIPBC.cjs");require("i18next");require("react-i18next");require("jotai");require("@react-hookz/web");require("react-arborist");require("./index-aeDphKpP.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");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("tree-model");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-rOKavDFX.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-wU7T0f48.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:q,pages:n})})]})};exports.default=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("react"),x=require("lodash-es"),s=require("./index-aeDphKpP.cjs"),a=require("./index-6w-6HYBd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");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");require("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-87cX9vvO.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-o0V9acCV.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;
|