@chaibuilder/sdk 0.1.19 → 0.1.21
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-d5a8235d.js → AddBlocks-b2d43d6c.js} +5 -6
- package/dist/AddBlocks-b510ac3a.cjs +3 -0
- package/dist/BrandingOptions-6fbe4b26.cjs +1 -0
- package/dist/{BrandingOptions-e77f91bc.js → BrandingOptions-7f66e02c.js} +5 -6
- package/dist/{CanvasArea-50356121.js → CanvasArea-68841a13.js} +10 -11
- package/dist/{CanvasArea-a09ed911.cjs → CanvasArea-a8d28eb3.cjs} +6 -6
- package/dist/{CurrentPage-0dd3a1fe.js → CurrentPage-6655ce50.js} +5 -6
- package/dist/CurrentPage-c10e6c89.cjs +1 -0
- package/dist/Layers-595cc98e.cjs +1 -0
- package/dist/{Layers-e17bbf6a.js → Layers-99bdc689.js} +48 -49
- package/dist/{MODIFIERS-c2e02614.js → MODIFIERS-2f19c314.js} +13 -7
- package/dist/MODIFIERS-4716c669.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-3a58a10b.js → MarkAsGlobalBlock-522e170a.js} +5 -6
- package/dist/MarkAsGlobalBlock-ea769ea4.cjs +1 -0
- package/dist/{PagesPanel-68bb4554.js → PagesPanel-b0debeed.js} +5 -6
- package/dist/PagesPanel-e176d7e8.cjs +1 -0
- package/dist/{ProjectPanel-decfe6bb.js → ProjectPanel-9cec967c.js} +6 -7
- package/dist/ProjectPanel-d0f33df2.cjs +1 -0
- package/dist/Settings-208ab051.cjs +1 -0
- package/dist/{Settings-27bb6012.js → Settings-fd1e3b5d.js} +82 -83
- package/dist/SidePanels-40966390.cjs +1 -0
- package/dist/{SidePanels-839ecfae.js → SidePanels-ca294b35.js} +6 -7
- package/dist/{Topbar-d3dc4a34.js → Topbar-1edef1b2.js} +15 -16
- package/dist/Topbar-75c99c88.cjs +1 -0
- package/dist/add-page-modal-18f134c0.cjs +1 -0
- package/dist/{add-page-modal-da3e0ad5.js → add-page-modal-9985b5ce.js} +5 -6
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +56 -57
- package/dist/delete-page-modal-393697d7.cjs +1 -0
- package/dist/{delete-page-modal-3aa66051.js → delete-page-modal-98272bf5.js} +8 -9
- package/dist/functions-83b1de8d.js +1106 -0
- package/dist/functions-f84d5e2a.cjs +2 -0
- package/dist/{html-to-json-8397fab5.js → html-to-json-45e0e3b5.js} +1 -1
- package/dist/{html-to-json-78bfa1f3.cjs → html-to-json-aadcbf66.cjs} +1 -1
- package/dist/{index-ca7c3430.js → index-436bba3e.js} +110 -111
- package/dist/{index-976ec896.cjs → index-c3a98a78.cjs} +40 -40
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +39 -1
- package/dist/lib.js +56 -45
- package/dist/page-viewer-32261f49.cjs +1 -0
- package/dist/{page-viewer-3e7a6d70.js → page-viewer-a3ac057a.js} +16 -17
- package/dist/{project-general-setting-c8aa9370.js → project-general-setting-21e324a9.js} +5 -6
- package/dist/project-general-setting-75a8e94b.cjs +1 -0
- package/dist/render.cjs +1 -2
- package/dist/render.d.ts +16 -17
- package/dist/render.js +88 -1169
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +21 -1
- package/dist/server.js +47 -35
- package/dist/{single-page-detail-55638cb1.js → single-page-detail-0e881b82.js} +6 -7
- package/dist/single-page-detail-649b1379.cjs +1 -0
- package/package.json +1 -1
- package/dist/AddBlocks-6fc9d7de.cjs +0 -3
- package/dist/BrandingOptions-e44ef105.cjs +0 -1
- package/dist/CurrentPage-19086054.cjs +0 -1
- package/dist/Layers-2dd7336a.cjs +0 -1
- package/dist/MODIFIERS-70fef873.cjs +0 -1
- package/dist/MarkAsGlobalBlock-d4fe0af6.cjs +0 -1
- package/dist/PagesPanel-fa54f8c4.cjs +0 -1
- package/dist/ProjectPanel-750e4a4f.cjs +0 -1
- package/dist/Settings-c18e276b.cjs +0 -1
- package/dist/SidePanels-90ac74bf.cjs +0 -1
- package/dist/Topbar-57cd1611.cjs +0 -1
- package/dist/_commonjsHelpers-10dfc225.js +0 -8
- package/dist/_commonjsHelpers-87b0abe8.cjs +0 -1
- package/dist/add-page-modal-f49ebaf3.cjs +0 -1
- package/dist/delete-page-modal-6667ee2b.cjs +0 -1
- package/dist/page-viewer-5f00c933.cjs +0 -1
- package/dist/project-general-setting-a23cc2c4.cjs +0 -1
- package/dist/single-page-detail-a4b59a16.cjs +0 -1
|
@@ -5,7 +5,7 @@ import { S as x, c as d, b as h, d as u, a as g, e as j, f as t } from "./select
|
|
|
5
5
|
import { u as i, d as f, e as v, f as S, S as c } from "./useBuilderProp-81a14920.js";
|
|
6
6
|
import { S as b } from "./separator-a80d065b.js";
|
|
7
7
|
import { T as N } from "./toggle-00c9d11e.js";
|
|
8
|
-
import { c as C } from "./index-
|
|
8
|
+
import { c as C } from "./index-436bba3e.js";
|
|
9
9
|
import { useTranslation as w } from "react-i18next";
|
|
10
10
|
import "@radix-ui/react-select";
|
|
11
11
|
import "./utils-ac68b2c8.js";
|
|
@@ -19,7 +19,7 @@ import "jotai";
|
|
|
19
19
|
import "lodash";
|
|
20
20
|
import "@radix-ui/react-separator";
|
|
21
21
|
import "@radix-ui/react-toggle";
|
|
22
|
-
import "./
|
|
22
|
+
import "./MODIFIERS-2f19c314.js";
|
|
23
23
|
import "@radix-ui/react-scroll-area";
|
|
24
24
|
import "react-dom";
|
|
25
25
|
import "@floating-ui/react-dom";
|
|
@@ -29,8 +29,7 @@ import "react-dnd";
|
|
|
29
29
|
import "@minoru/react-dnd-treeview";
|
|
30
30
|
import "react-hotkeys-hook";
|
|
31
31
|
import "flat-to-nested";
|
|
32
|
-
import "./html-to-json-
|
|
33
|
-
import "./MODIFIERS-c2e02614.js";
|
|
32
|
+
import "./html-to-json-45e0e3b5.js";
|
|
34
33
|
import "himalaya";
|
|
35
34
|
import "redux-undo";
|
|
36
35
|
import "@react-hookz/web";
|
|
@@ -56,8 +55,8 @@ const y = () => i("languages", ["en"]), A = () => y().length === 1 ? null : /* @
|
|
|
56
55
|
/* @__PURE__ */ e.jsx(t, { value: "pineapple", children: "Pineapple" })
|
|
57
56
|
] }) })
|
|
58
57
|
] }) }), T = () => {
|
|
59
|
-
const { savePage: a, syncState:
|
|
60
|
-
switch (
|
|
58
|
+
const { savePage: a, syncState: s } = C(), { t: l } = w(), r = m(() => {
|
|
59
|
+
switch (s) {
|
|
61
60
|
case "SAVING":
|
|
62
61
|
return "animate-pulse bg-gray-500 text-gray-900";
|
|
63
62
|
case "SAVED":
|
|
@@ -65,13 +64,13 @@ const y = () => i("languages", ["en"]), A = () => y().length === 1 ? null : /* @
|
|
|
65
64
|
default:
|
|
66
65
|
return "bg-gray-200 text-gray-500 hover:bg-gray-100";
|
|
67
66
|
}
|
|
68
|
-
}, [
|
|
67
|
+
}, [s]);
|
|
69
68
|
return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(f, { children: [
|
|
70
69
|
/* @__PURE__ */ e.jsx(v, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
71
70
|
N,
|
|
72
71
|
{
|
|
73
72
|
onClick: () => a(),
|
|
74
|
-
className: `flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${
|
|
73
|
+
className: `flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${r}`,
|
|
75
74
|
size: "sm",
|
|
76
75
|
variant: "outline",
|
|
77
76
|
children: [
|
|
@@ -82,31 +81,31 @@ const y = () => i("languages", ["en"]), A = () => y().length === 1 ? null : /* @
|
|
|
82
81
|
d: "M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"
|
|
83
82
|
}
|
|
84
83
|
) }),
|
|
85
|
-
|
|
84
|
+
s === "SAVING" ? "Saving..." : s === "SAVED" ? l("Saved") : "Save"
|
|
86
85
|
]
|
|
87
86
|
}
|
|
88
87
|
) }),
|
|
89
|
-
/* @__PURE__ */ e.jsx(S, { children: /* @__PURE__ */ e.jsx("p", { children:
|
|
88
|
+
/* @__PURE__ */ e.jsx(S, { children: /* @__PURE__ */ e.jsx("p", { children: s === "SAVING" ? "Saving..." : s === "SAVED" ? "Saved" : "Save changes" }) })
|
|
90
89
|
] }) });
|
|
91
|
-
},
|
|
92
|
-
const a = i("topBarComponents.left", []),
|
|
90
|
+
}, xe = () => {
|
|
91
|
+
const a = i("topBarComponents.left", []), s = i("topBarComponents.center", []), l = i("topBarComponents.right", []);
|
|
93
92
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-14 items-center justify-between px-2", children: [
|
|
94
93
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2 font-bold", children: n.Children.toArray(
|
|
95
|
-
a.map((
|
|
94
|
+
a.map((r) => /* @__PURE__ */ e.jsx(o, { fallback: /* @__PURE__ */ e.jsx(c, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
|
|
96
95
|
) }) }),
|
|
97
96
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2", children: n.Children.toArray(
|
|
98
|
-
|
|
97
|
+
s.map((r) => /* @__PURE__ */ e.jsx(o, { fallback: /* @__PURE__ */ e.jsx(c, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
|
|
99
98
|
) }),
|
|
100
99
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
101
100
|
/* @__PURE__ */ e.jsx(A, {}),
|
|
102
101
|
/* @__PURE__ */ e.jsx(b, { orientation: "vertical" }),
|
|
103
102
|
/* @__PURE__ */ e.jsx(T, {}),
|
|
104
103
|
n.Children.toArray(
|
|
105
|
-
l.map((
|
|
104
|
+
l.map((r) => /* @__PURE__ */ e.jsx(o, { fallback: /* @__PURE__ */ e.jsx(c, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
|
|
106
105
|
)
|
|
107
106
|
] })
|
|
108
107
|
] });
|
|
109
108
|
};
|
|
110
109
|
export {
|
|
111
|
-
|
|
110
|
+
xe as default
|
|
112
111
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),i=require("react"),l=require("@radix-ui/react-icons"),r=require("./select-0e32300c.cjs"),s=require("./useBuilderProp-5e57d0c8.cjs"),o=require("./separator-a597dba7.cjs"),a=require("./toggle-b90fed97.cjs"),c=require("./index-c3a98a78.cjs"),p=require("react-i18next");require("@radix-ui/react-select");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("lodash");require("@radix-ui/react-separator");require("@radix-ui/react-toggle");require("./MODIFIERS-4716c669.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const m=()=>s.useBuilderProp("languages",["en"]),j=()=>m().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(l.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),d=()=>{const{savePage:x,syncState:t}=c.useSavePage(),{t:u}=p.useTranslation(),n=i.useMemo(()=>{switch(t){case"SAVING":return"animate-pulse bg-gray-500 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(a.Toggle,{onClick:()=>x(),className:`flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${n}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx("svg",{fill:"currentColor",width:"16",height:"16",viewBox:"0 0 0.32 0.32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"})}),t==="SAVING"?"Saving...":t==="SAVED"?u("Saved"):"Save"]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:t==="SAVING"?"Saving...":t==="SAVED"?"Saved":"Save changes"})})]})})},h=()=>{const x=s.useBuilderProp("topBarComponents.left",[]),t=s.useBuilderProp("topBarComponents.center",[]),u=s.useBuilderProp("topBarComponents.right",[]);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:i.Children.toArray(x.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:i.Children.toArray(t.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(j,{}),e.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(d,{}),i.Children.toArray(u.map(n=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(n,{})})))]})]})};exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),g=require("react"),R=require("lodash"),x=require("./useBuilderProp-5e57d0c8.cjs"),a=require("./dialog-170eaad9.cjs"),q=require("@chaibuilder/blocks"),b=require("./form-99b51245.cjs"),f=require("./index-c3a98a78.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("jotai");require("@radix-ui/react-dialog");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./link-86ac8848.cjs");require("react-icons-picker");require("react-dom");require("./ImagesPanel-0db5c72f.cjs");require("./tabs-860e37aa.cjs");require("@radix-ui/react-tabs");require("react-quill");require("react-i18next");require("./MODIFIERS-4716c669.cjs");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("lucide-react");require("sonner");const E=({closeModal:i})=>{var l,o;const s=f.useAddPage(),[r,m]=g.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{}}),p=()=>{s.mutate(r,{onSuccess:()=>i()})},j=({formData:u},t)=>{m(h=>{var d,c;const n={[t]:u[t]};return t==="name"?n.slug=R.kebabCase((d=u[t])==null?void 0:d.replace(/\d/g,"")):t==="slug"&&(n.slug=(c=u[t])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...h,...n}})},P={name:q.SingleLineText({title:"Page Name",default:r.name}),slug:q.SingleLineText({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(a.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(b.Form,{formData:r,properties:P,onChange:j,disabled:s.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(x.Button,{type:"submit",disabled:!r.name||!r.slug||((l=r.name)==null?void 0:l.length)<2||((o=r.slug)==null?void 0:o.length)<2||s.isPending,onClick:p,children:"Add Page"})})]})},S=()=>{const[i,s]=g.useState(!1);return e.jsxRuntimeExports.jsxs(a.Dialog,{open:i,onOpenChange:()=>s(!i),children:[e.jsxRuntimeExports.jsx(a.DialogTrigger,{children:e.jsxRuntimeExports.jsx(x.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>s(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(E,{closeModal:()=>s(!i)})]})};exports.default=S;
|
|
@@ -5,7 +5,7 @@ import { B as c } from "./useBuilderProp-81a14920.js";
|
|
|
5
5
|
import { D as b, b as C, a as A } from "./dialog-3d4e82ed.js";
|
|
6
6
|
import { SingleLineText as d } from "@chaibuilder/blocks";
|
|
7
7
|
import { F as D } from "./form-725e3191.js";
|
|
8
|
-
import { a0 as N } from "./index-
|
|
8
|
+
import { a0 as N } from "./index-436bba3e.js";
|
|
9
9
|
import "@radix-ui/react-slot";
|
|
10
10
|
import "class-variance-authority";
|
|
11
11
|
import "./utils-ac68b2c8.js";
|
|
@@ -26,7 +26,7 @@ import "./tabs-85caa1e8.js";
|
|
|
26
26
|
import "@radix-ui/react-tabs";
|
|
27
27
|
import "react-quill";
|
|
28
28
|
import "react-i18next";
|
|
29
|
-
import "./
|
|
29
|
+
import "./MODIFIERS-2f19c314.js";
|
|
30
30
|
import "@radix-ui/react-scroll-area";
|
|
31
31
|
import "@floating-ui/react-dom";
|
|
32
32
|
import "i18next";
|
|
@@ -35,8 +35,7 @@ import "react-dnd";
|
|
|
35
35
|
import "@minoru/react-dnd-treeview";
|
|
36
36
|
import "react-hotkeys-hook";
|
|
37
37
|
import "flat-to-nested";
|
|
38
|
-
import "./html-to-json-
|
|
39
|
-
import "./MODIFIERS-c2e02614.js";
|
|
38
|
+
import "./html-to-json-45e0e3b5.js";
|
|
40
39
|
import "himalaya";
|
|
41
40
|
import "redux-undo";
|
|
42
41
|
import "@react-hookz/web";
|
|
@@ -83,7 +82,7 @@ const S = ({ closeModal: o }) => {
|
|
|
83
82
|
}
|
|
84
83
|
) })
|
|
85
84
|
] });
|
|
86
|
-
},
|
|
85
|
+
}, ft = () => {
|
|
87
86
|
const [o, i] = g(!1);
|
|
88
87
|
return /* @__PURE__ */ t.jsxs(b, { open: o, onOpenChange: () => i(!o), children: [
|
|
89
88
|
/* @__PURE__ */ t.jsx(C, { children: /* @__PURE__ */ t.jsx(c, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!o), children: "+ New Page" }) }),
|
|
@@ -91,5 +90,5 @@ const S = ({ closeModal: o }) => {
|
|
|
91
90
|
] });
|
|
92
91
|
};
|
|
93
92
|
export {
|
|
94
|
-
|
|
93
|
+
ft as default
|
|
95
94
|
};
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-c3a98a78.cjs"),s=require("./useBuilderProp-5e57d0c8.cjs"),u=require("react-i18next");require("./jsx-runtime-5c3ac4f7.cjs");require("react");require("./MODIFIERS-4716c669.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("react-dnd");require("lodash");require("@minoru/react-dnd-treeview");require("./utils-3c452dd0.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("@radix-ui/react-icons");require("lucide-react");require("sonner");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiBuilderStudio=e.ChaiBuilderStudio;exports.useActiveLanguage=e.useActiveLanguage;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlockContentByLanguage=e.useBlockContentByLanguage;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderReset=e.useBuilderReset;exports.useBuildingBlocks=e.useBuildingBlocks;exports.useCanvasHistory=e.useCanvasHistory;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCurrentPage=e.useCurrentPage$1;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDeveloperPreviewMode=e.useDeveloperPreviewMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useFeatureSupport=e.useFeatureSupport;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLanguages=e.useLanguages;exports.useMarkAsGlobalBlock=e.useMarkAsGlobalBlock;exports.useMoveBlocks=e.useMoveBlocks;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.usePrimaryLanguage=e.usePrimaryLanguage;exports.useProject=e.useProject$1;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useSetAllBlocks=e.useSetAllBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useTranslations=e.useTranslations;exports.useTreeData=e.useTreeData;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;exports.useBuilderProp=s.useBuilderProp;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>u.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare type ChaiBlock = {
|
|
|
35
35
|
_parent?: string | null | undefined;
|
|
36
36
|
_bindings?: Record<string, string>;
|
|
37
37
|
readonly _type: string;
|
|
38
|
-
} & Record<string,
|
|
38
|
+
} & Record<string, any>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* ChaiBuilder is the main entry point for the Chai Builder Studio.
|
package/dist/core.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a5 as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { a5 as T, ap as b, H as j, a8 as x, ak as G, W as O, al as U, K as w, B as F, ao as W, z as Z, a6 as q, a9 as z, d as E, f as K, l as N, o as V, aa as J, n as Q, e as X, ab as Y, m as _, k as $, ac as ss, V as es, A as as, an as os, a1 as ts, ad as us, q as rs, s as is, am as ls, ae as ps, a7 as cs, t as ds, L as ms, c as Bs, D as ks, ag as ns, N as gs, i as Cs, O as Ss, g as vs, j as Ps, h as As, ah as ys, M as hs, af as Ms, ai as Ds, Z as Is, aj as Ls, G as fs } from "./index-436bba3e.js";
|
|
2
|
+
import { u as Hs } from "./useBuilderProp-81a14920.js";
|
|
3
|
+
import { useTranslation as bs } from "react-i18next";
|
|
4
4
|
import "./jsx-runtime-944c88e2.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./
|
|
6
|
+
import "./MODIFIERS-2f19c314.js";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "@radix-ui/react-scroll-area";
|
|
9
9
|
import "react-dom";
|
|
@@ -18,8 +18,7 @@ import "./utils-ac68b2c8.js";
|
|
|
18
18
|
import "tailwind-merge";
|
|
19
19
|
import "react-hotkeys-hook";
|
|
20
20
|
import "flat-to-nested";
|
|
21
|
-
import "./html-to-json-
|
|
22
|
-
import "./MODIFIERS-c2e02614.js";
|
|
21
|
+
import "./html-to-json-45e0e3b5.js";
|
|
23
22
|
import "himalaya";
|
|
24
23
|
import "redux-undo";
|
|
25
24
|
import "@react-hookz/web";
|
|
@@ -32,58 +31,58 @@ import "class-variance-authority";
|
|
|
32
31
|
import "@radix-ui/react-tooltip";
|
|
33
32
|
import "@radix-ui/react-toast";
|
|
34
33
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
34
|
+
T as ChaiBuilderEditor,
|
|
35
|
+
b as ChaiBuilderStudio,
|
|
36
|
+
j as useActiveLanguage,
|
|
37
|
+
x as useActiveModal,
|
|
38
|
+
G as useActivePanel,
|
|
39
|
+
O as useAddBlock,
|
|
40
|
+
U as useAddBlockParent,
|
|
41
|
+
w as useAddClassesToBlocks,
|
|
42
|
+
F as useAllBlocks,
|
|
43
|
+
W as useBlockContentByLanguage,
|
|
44
|
+
Z as useBrandingOptions,
|
|
45
|
+
Hs as useBuilderProp,
|
|
46
|
+
q as useBuilderReset,
|
|
47
|
+
z as useBuildingBlocks,
|
|
48
|
+
E as useCanvasHistory,
|
|
49
|
+
K as useCanvasWidth,
|
|
50
|
+
N as useCanvasZoom,
|
|
51
|
+
V as useCopyBlockIds,
|
|
52
|
+
J as useCurrentPage,
|
|
53
|
+
Q as useCutBlockIds,
|
|
54
|
+
X as useDarkMode,
|
|
55
|
+
Y as useDeveloperPreviewMode,
|
|
56
|
+
_ as useDuplicateBlocks,
|
|
57
|
+
$ as useFeatureSupport,
|
|
58
|
+
ss as useGetPageData,
|
|
59
|
+
es as useHiddenBlockIds,
|
|
60
|
+
as as useHighlightBlockId,
|
|
61
|
+
os as useLanguages,
|
|
62
|
+
ts as useMarkAsGlobalBlock,
|
|
64
63
|
us as useMoveBlocks,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
rs as usePasteBlocks,
|
|
65
|
+
is as usePreviewMode,
|
|
66
|
+
ls as usePrimaryLanguage,
|
|
67
|
+
ps as useProject,
|
|
69
68
|
cs as useReadOnlyMode,
|
|
70
69
|
ds as useRemoveBlocks,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
ms as useRemoveClassesFromBlocks,
|
|
71
|
+
Bs as useSavePage,
|
|
72
|
+
ks as useSelectedBlock,
|
|
73
|
+
ns as useSelectedBlockAllClasses,
|
|
74
|
+
gs as useSelectedBlockCurrentClasses,
|
|
75
|
+
Cs as useSelectedBlockIds,
|
|
76
|
+
Ss as useSelectedBlocksDisplayChild,
|
|
77
|
+
vs as useSelectedBreakpoints,
|
|
78
|
+
Ps as useSelectedStylingBlocks,
|
|
79
|
+
As as useSetAllBlocks,
|
|
80
|
+
ys as useStylingBreakpoint,
|
|
81
|
+
hs as useStylingState,
|
|
82
|
+
bs as useTranslation,
|
|
83
|
+
Ms as useTranslations,
|
|
84
|
+
Ds as useTreeData,
|
|
85
|
+
Is as useUILibraryBlocks,
|
|
86
|
+
Ls as useUpdateBlocksProps,
|
|
87
|
+
fs as useUpdateBlocksPropsRealtime
|
|
89
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),l=require("./useBuilderProp-5e57d0c8.cjs"),r=require("./alert-dialog-4ce6ed22.cjs"),d=require("./index-c3a98a78.cjs"),c=require("@radix-ui/react-icons");require("react");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("lodash");require("@radix-ui/react-alert-dialog");require("./MODIFIERS-4716c669.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const x=({pageData:i,projectData:s})=>{const n={},t=d.useDeletePage(),u=i.uuid===s.homepage,o=()=>{t.mutate(i,{onSuccess:()=>{n({uuid:s.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:u,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${u?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(c.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:t.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(l.Button,{variant:"destructive",onClick:o,disabled:t.isPending,children:"Yes, Delete"})]})]})]})};exports.default=x;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
2
2
|
import { B as l } from "./useBuilderProp-81a14920.js";
|
|
3
|
-
import { A as n, a as d, b as
|
|
4
|
-
import { a4 as h } from "./index-
|
|
3
|
+
import { A as n, a as d, b as a, e as p, f as c, h as u } from "./alert-dialog-ee98f47e.js";
|
|
4
|
+
import { a4 as h } from "./index-436bba3e.js";
|
|
5
5
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
6
6
|
import "react";
|
|
7
7
|
import "@radix-ui/react-slot";
|
|
@@ -14,7 +14,7 @@ import "@radix-ui/react-toast";
|
|
|
14
14
|
import "jotai";
|
|
15
15
|
import "lodash";
|
|
16
16
|
import "@radix-ui/react-alert-dialog";
|
|
17
|
-
import "./
|
|
17
|
+
import "./MODIFIERS-2f19c314.js";
|
|
18
18
|
import "@radix-ui/react-scroll-area";
|
|
19
19
|
import "react-dom";
|
|
20
20
|
import "@floating-ui/react-dom";
|
|
@@ -25,15 +25,14 @@ import "react-dnd";
|
|
|
25
25
|
import "@minoru/react-dnd-treeview";
|
|
26
26
|
import "react-hotkeys-hook";
|
|
27
27
|
import "flat-to-nested";
|
|
28
|
-
import "./html-to-json-
|
|
29
|
-
import "./MODIFIERS-c2e02614.js";
|
|
28
|
+
import "./html-to-json-45e0e3b5.js";
|
|
30
29
|
import "himalaya";
|
|
31
30
|
import "redux-undo";
|
|
32
31
|
import "@react-hookz/web";
|
|
33
32
|
import "@chaibuilder/blocks";
|
|
34
33
|
import "lucide-react";
|
|
35
34
|
import "sonner";
|
|
36
|
-
const
|
|
35
|
+
const W = ({ pageData: r, projectData: i }) => {
|
|
37
36
|
const s = {}, t = h(), o = r.uuid === i.homepage, m = () => {
|
|
38
37
|
t.mutate(r, {
|
|
39
38
|
onSuccess: () => {
|
|
@@ -49,8 +48,8 @@ const X = ({ pageData: r, projectData: i }) => {
|
|
|
49
48
|
children: /* @__PURE__ */ e.jsx(x, {})
|
|
50
49
|
}
|
|
51
50
|
) }),
|
|
52
|
-
/* @__PURE__ */ e.jsxs(
|
|
53
|
-
/* @__PURE__ */ e.jsxs(
|
|
51
|
+
/* @__PURE__ */ e.jsxs(a, { children: [
|
|
52
|
+
/* @__PURE__ */ e.jsxs(p, { children: [
|
|
54
53
|
"Are you sure you want to delete ",
|
|
55
54
|
/* @__PURE__ */ e.jsx("i", { className: "text-red-500", children: r.name }),
|
|
56
55
|
" page?"
|
|
@@ -64,5 +63,5 @@ const X = ({ pageData: r, projectData: i }) => {
|
|
|
64
63
|
] });
|
|
65
64
|
};
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
W as default
|
|
68
67
|
};
|