@chaibuilder/sdk 1.0.7 → 1.0.8
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-68cb0501.js → AddBlocks-9128ba6f.js} +1 -1
- package/dist/{AddBlocks-1817c9b1.cjs → AddBlocks-d240ce44.cjs} +1 -1
- package/dist/{BrandingOptions-95e43d75.cjs → BrandingOptions-3bb00e4c.cjs} +1 -1
- package/dist/{BrandingOptions-1bae6a41.js → BrandingOptions-ea5c3818.js} +1 -1
- package/dist/{CanvasArea-77538900.js → CanvasArea-61ab734b.js} +2 -2
- package/dist/{CanvasArea-b8d24020.cjs → CanvasArea-723e90e7.cjs} +2 -2
- package/dist/{CurrentPage-261238dc.js → CurrentPage-0b3bbd2f.js} +1 -1
- package/dist/{CurrentPage-549f3ad2.cjs → CurrentPage-552ca7d3.cjs} +1 -1
- package/dist/{Layers-56ef1ce3.cjs → Layers-20a6cb66.cjs} +1 -1
- package/dist/{Layers-bababd5c.js → Layers-f3e1f9dc.js} +2 -2
- package/dist/{MarkAsGlobalBlock-3b8ee862.cjs → MarkAsGlobalBlock-75c82d33.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-9b51f2f8.js → MarkAsGlobalBlock-a3314fee.js} +1 -1
- package/dist/{PagesPanel-f30b6a9d.cjs → PagesPanel-01ce4305.cjs} +1 -1
- package/dist/{PagesPanel-ad2584f8.js → PagesPanel-13c05436.js} +2 -2
- package/dist/{ProjectPanel-36191f74.cjs → ProjectPanel-658f62f5.cjs} +1 -1
- package/dist/{ProjectPanel-25f0fc2d.js → ProjectPanel-dbec2f4b.js} +2 -2
- package/dist/{Settings-2f1519e3.js → Settings-dd4fa69c.js} +1 -1
- package/dist/{Settings-7f0f9554.cjs → Settings-f0a220d8.cjs} +1 -1
- package/dist/{SidePanels-49e333f1.js → SidePanels-857bc7bc.js} +2 -2
- package/dist/{SidePanels-2199ef26.cjs → SidePanels-fb3bc195.cjs} +1 -1
- package/dist/{Topbar-dd38642b.js → Topbar-3166b6aa.js} +1 -1
- package/dist/{Topbar-9498d593.cjs → Topbar-4f94475f.cjs} +1 -1
- package/dist/{add-page-modal-230cb2e8.cjs → add-page-modal-25c623bf.cjs} +1 -1
- package/dist/{add-page-modal-1ec648a0.js → add-page-modal-74269b8b.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-39cae8b1.cjs → delete-page-modal-2cdd4b0c.cjs} +1 -1
- package/dist/{delete-page-modal-f399eb65.js → delete-page-modal-e4aa62c3.js} +1 -1
- package/dist/{index-c2ae4f82.js → index-56a8abbc.js} +7 -9
- package/dist/{index-e84165af.cjs → index-76f43d04.cjs} +2 -2
- package/dist/{page-viewer-a349c4ed.js → page-viewer-40cfdbfc.js} +2 -2
- package/dist/{page-viewer-91d7f97f.cjs → page-viewer-d73b7828.cjs} +1 -1
- package/dist/{project-general-setting-ef6ba4fa.cjs → project-general-setting-5714e3e8.cjs} +1 -1
- package/dist/{project-general-setting-89522e53.js → project-general-setting-d6f00a25.js} +1 -1
- package/dist/{single-page-detail-c9490758.cjs → single-page-detail-a3115735.cjs} +1 -1
- package/dist/{single-page-detail-b679bf65.js → single-page-detail-fddaf0ec.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),r=require("./useBuilderProp-adacf42f.cjs"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),r=require("./useBuilderProp-adacf42f.cjs"),l=require("./index-76f43d04.cjs"),d=require("@radix-ui/react-icons");require("react");require("@radix-ui/react-alert-dialog");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("./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("sonner");require("lucide-react");const x=({pageData:i,projectData:s})=>{const n={},t=l.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(d.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(r.Button,{variant:"destructive",onClick:o,disabled:t.isPending,children:"Yes, Delete"})]})]})]})};exports.default=x;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
2
2
|
import { A as l, b as n, d, f as a, g as p, i as c, B as u } from "./useBuilderProp-21feb2da.js";
|
|
3
|
-
import { a4 as x } from "./index-
|
|
3
|
+
import { a4 as x } from "./index-56a8abbc.js";
|
|
4
4
|
import { TrashIcon as g } from "@radix-ui/react-icons";
|
|
5
5
|
import "react";
|
|
6
6
|
import "@radix-ui/react-alert-dialog";
|
|
@@ -27491,7 +27491,7 @@ const VZ = () => {
|
|
|
27491
27491
|
const a = gr(e);
|
|
27492
27492
|
Pd(a) && (n = [a, ...NL(t, a)]), r(n);
|
|
27493
27493
|
}, [e, t, r]);
|
|
27494
|
-
}, fU = () => Ge(gA), TL = Vn(() => import("./SidePanels-
|
|
27494
|
+
}, fU = () => Ge(gA), TL = Vn(() => import("./SidePanels-857bc7bc.js")), jL = Vn(() => import("./Topbar-3166b6aa.js")), zL = Vn(() => import("./CanvasArea-61ab734b.js")), FL = Vn(() => import("./Settings-dd4fa69c.js")), qL = () => {
|
|
27495
27495
|
const [e] = Ne(Pc), t = (a) => {
|
|
27496
27496
|
a.preventDefault();
|
|
27497
27497
|
};
|
|
@@ -28749,7 +28749,7 @@ function MK() {
|
|
|
28749
28749
|
};
|
|
28750
28750
|
return SK(cm(cm({}, t), e));
|
|
28751
28751
|
}
|
|
28752
|
-
const TK = "@chaibuilder/sdk", jK = "1.0.
|
|
28752
|
+
const TK = "@chaibuilder/sdk", jK = "1.0.8", zK = "module", FK = [
|
|
28753
28753
|
"dist"
|
|
28754
28754
|
], qK = "dist/core.js", DK = !1, BK = {
|
|
28755
28755
|
".": {
|
|
@@ -30798,9 +30798,8 @@ const Dt = {
|
|
|
30798
30798
|
return or({
|
|
30799
30799
|
mutationFn: async (n) => Dt.put(`${e}/page`, n).then((a) => a.json()),
|
|
30800
30800
|
onSuccess: async (n) => {
|
|
30801
|
-
var
|
|
30802
|
-
|
|
30803
|
-
if (a.result === "error" && ((o = a.error) == null ? void 0 : o.code) == "PAGE_LOCKED") {
|
|
30801
|
+
var a;
|
|
30802
|
+
if (n.result === "error" && ((a = n.error) == null ? void 0 : a.code) == "PAGE_LOCKED") {
|
|
30804
30803
|
r.invalidateQueries({ queryKey: ["page_data", t] });
|
|
30805
30804
|
return;
|
|
30806
30805
|
}
|
|
@@ -30819,9 +30818,8 @@ const Dt = {
|
|
|
30819
30818
|
}).then((s) => s.json());
|
|
30820
30819
|
},
|
|
30821
30820
|
onSuccess: async (o) => {
|
|
30822
|
-
var
|
|
30823
|
-
|
|
30824
|
-
if (s.result === "error" && ((i = s.error) == null ? void 0 : i.code) == "PAGE_LOCKED") {
|
|
30821
|
+
var s;
|
|
30822
|
+
if (o.result === "error" && ((s = o.error) == null ? void 0 : s.code) == "PAGE_LOCKED") {
|
|
30825
30823
|
a.invalidateQueries({ queryKey: ["page_data", r] });
|
|
30826
30824
|
return;
|
|
30827
30825
|
}
|
|
@@ -30972,7 +30970,7 @@ const Dt = {
|
|
|
30972
30970
|
] })
|
|
30973
30971
|
] })
|
|
30974
30972
|
] });
|
|
30975
|
-
}, UW = () => /* @__PURE__ */ _.jsx(ZW, { children: /* @__PURE__ */ _.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ _.jsx(JE, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), JW = UW, GW = Vn(() => import("./PagesPanel-
|
|
30973
|
+
}, UW = () => /* @__PURE__ */ _.jsx(ZW, { children: /* @__PURE__ */ _.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ _.jsx(JE, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), JW = UW, GW = Vn(() => import("./PagesPanel-13c05436.js")), YW = Vn(() => import("./ProjectPanel-dbec2f4b.js")), HW = Vn(() => import("./CurrentPage-0b3bbd2f.js")), QW = () => /* @__PURE__ */ _.jsx("h2", { children: "Your Logo" }), XW = () => {
|
|
30976
30974
|
const { mutate: e } = zW();
|
|
30977
30975
|
return Ir("editable", !0) ? /* @__PURE__ */ _.jsx(kd, { onClick: e, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
30978
30976
|
}, _W = (e) => {
|