@chaibuilder/sdk 1.2.7 → 1.2.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-pjLrzkvz.js → AddBlocks-tMxKPoen.js} +7 -6
- package/dist/AddBlocks-x2LkOHSj.cjs +1 -0
- package/dist/BrandingOptions-EzT9UYd6.cjs +1 -0
- package/dist/{BrandingOptions-PXCI0z-H.js → BrandingOptions-QJJ1y5ez.js} +7 -6
- package/dist/{CanvasArea-Fhg-6_nZ.js → CanvasArea-EfZgx-gN.js} +11 -9
- package/dist/{CanvasArea-C2ak1ui1.cjs → CanvasArea-rIDwPHl5.cjs} +1 -1
- package/dist/CurrentPage-QNFPD078.cjs +1 -0
- package/dist/{CurrentPage-Zz9LEdez.js → CurrentPage-ulHTz4MD.js} +14 -12
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{Layers-cgmxKAP9.js → Layers-rehZkz78.js} +12 -10
- package/dist/Layers-v-7k3W2I.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-htrpRVJM.js → MarkAsGlobalBlock-BjP-Rqlf.js} +6 -5
- package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +1 -0
- package/dist/{PagesPanel-TYBKN2Am.js → PagesPanel-acGVGJf-.js} +9 -7
- package/dist/PagesPanel-x5ms_LOD.cjs +1 -0
- package/dist/ProjectPanel-5BHQ5ANP.cjs +1 -0
- package/dist/{ProjectPanel-PJ1iPaLY.js → ProjectPanel-aLFJq49M.js} +16 -14
- package/dist/Settings-iOjfw5NQ.cjs +1 -0
- package/dist/{Settings-Na0NVS-E.js → Settings-v-txwlII.js} +10 -9
- package/dist/{SidePanels-bHll6xCt.js → SidePanels-Vdc-J5wK.js} +12 -10
- package/dist/SidePanels-t0g9ZQFT.cjs +1 -0
- package/dist/Topbar-V8xCetWF.cjs +1 -0
- package/dist/{Topbar-JKdXHH8P.js → Topbar-j4t4AgCq.js} +6 -5
- package/dist/{UnsplashImages-jiOES16m.js → UnsplashImages-41Y3q5_Q.js} +6 -5
- package/dist/UnsplashImages-DbHky6cj.cjs +1 -0
- package/dist/UploadImages-DnQ95_NW.cjs +1 -0
- package/dist/{UploadImages-imersU7l.js → UploadImages-xBg-kbKv.js} +15 -14
- package/dist/add-page-modal-0YAI9dXr.cjs +1 -0
- package/dist/{add-page-modal-EQWWxbry.js → add-page-modal-6DlGzdA4.js} +10 -9
- package/dist/confirm-alert-U7-NcG7G.cjs +1 -0
- package/dist/{confirm-alert-HOs52FKE.js → confirm-alert-i4pM3mOt.js} +6 -5
- package/dist/{controls-hpe3HxsR.cjs → controls-Dy1qa8Dc.cjs} +1 -1
- package/dist/{controls-QGClapUl.js → controls-XPXGHKht.js} +45 -9
- package/dist/core.cjs +1 -1
- package/dist/core.js +57 -55
- package/dist/{delete-page-modal-DU388lPm.js → delete-page-modal-T_rlQfNd.js} +22 -20
- package/dist/delete-page-modal-qXpi_2xR.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/{form-7E1GY3U7.js → form-OVmsLOrc.js} +1 -1
- package/dist/{form-lF5eSfMe.cjs → form-VbouZlAW.cjs} +1 -1
- package/dist/html-to-json-2PeOCVey.cjs +1 -0
- package/dist/{html-to-json-lNLC8Y7D.js → html-to-json-57841sEK.js} +1 -1
- package/dist/{index-7vwIQQ-T.js → index-EGUphg4R.js} +5 -5
- package/dist/index-H6vIwGfD.cjs +1 -0
- package/dist/{index-Hf23Fq9m.cjs → index-jw8RxsTv.cjs} +2 -2
- package/dist/{index-WKIG_VPl.js → index-niHREMmR.js} +173 -172
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +7 -6
- package/dist/{page-viewer-fohh_Dwv.js → page-viewer-EoYYnA56.js} +10 -8
- package/dist/page-viewer-Ou8vDXGV.cjs +1 -0
- package/dist/project-general-setting-92q4oEYv.cjs +1 -0
- package/dist/{project-general-setting-Ryf5OhPd.js → project-general-setting-DC_nADG-.js} +10 -9
- package/dist/project-seo-setting-Snn2nZgS.cjs +1 -0
- package/dist/{project-seo-setting-KKOCl416.js → project-seo-setting-wxAGEkd_.js} +11 -10
- package/dist/single-page-detail-QmmhR_h2.cjs +1 -0
- package/dist/{single-page-detail-mJBo7VRe.js → single-page-detail-xtNZ9YxX.js} +11 -10
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +8 -6
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +141 -140
- package/dist/{useAddBlockByDrop-CmSt8dRr.js → useAddBlockByDrop-_nwI4W3q.js} +1 -1
- package/dist/{useAddBlockByDrop-pVcDjcgp.cjs → useAddBlockByDrop-inkD7Lck.cjs} +1 -1
- package/dist/{utils-Jw11nj1S.js → utils-AvyFzbPC.js} +26 -35
- package/dist/utils-PTxFk6qT.cjs +1 -0
- package/dist/web-blocks.cjs +9 -1
- package/dist/web-blocks.js +1048 -3
- package/package.json +1 -1
- package/dist/AddBlocks-MKhgtI8x.cjs +0 -1
- package/dist/BrandingOptions-tZaUILYP.cjs +0 -1
- package/dist/CurrentPage-4O-iqW3w.cjs +0 -1
- package/dist/Layers-uo4KpGCs.cjs +0 -1
- package/dist/MarkAsGlobalBlock-1kOwPbPm.cjs +0 -1
- package/dist/PagesPanel-z5qHpU24.cjs +0 -1
- package/dist/ProjectPanel-mEVh8sLb.cjs +0 -1
- package/dist/Settings-YNxmjfAl.cjs +0 -1
- package/dist/SidePanels-jsHvSEtM.cjs +0 -1
- package/dist/Topbar-jWRuTvxv.cjs +0 -1
- package/dist/UnsplashImages-dBdqJNux.cjs +0 -1
- package/dist/UploadImages-OD3RPS7j.cjs +0 -1
- package/dist/add-page-modal-nFQ8TUBM.cjs +0 -1
- package/dist/confirm-alert-j6hcFSlG.cjs +0 -1
- package/dist/delete-page-modal-bkSWhTxz.cjs +0 -1
- package/dist/html-to-json-JS8zQjYB.cjs +0 -1
- package/dist/index-98CxilGX.cjs +0 -1
- package/dist/page-viewer-6a4GFMUg.cjs +0 -1
- package/dist/project-general-setting-j4lKlLUE.cjs +0 -1
- package/dist/project-seo-setting-CATo4bEL.cjs +0 -1
- package/dist/single-page-detail-zms-5Fa_.cjs +0 -1
- package/dist/utils-j7Kg63NR.cjs +0 -1
|
@@ -3,14 +3,14 @@ import { useState as i, useEffect as w } from "react";
|
|
|
3
3
|
import { isEmpty as g, map as b } from "lodash-es";
|
|
4
4
|
import { GearIcon as C, UploadIcon as U, Cross1Icon as k } from "@radix-ui/react-icons";
|
|
5
5
|
import { atom as F, useAtom as E } from "jotai";
|
|
6
|
-
import { i as j, bn as A } from "./index-
|
|
6
|
+
import { i as j, bn as A } from "./index-niHREMmR.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "@radix-ui/react-toggle";
|
|
9
9
|
import "class-variance-authority";
|
|
10
|
-
import "./utils-
|
|
10
|
+
import "./utils-AvyFzbPC.js";
|
|
11
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
11
12
|
import "clsx";
|
|
12
13
|
import "tailwind-merge";
|
|
13
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
14
14
|
import "@radix-ui/react-switch";
|
|
15
15
|
import "@radix-ui/react-slot";
|
|
16
16
|
import "@radix-ui/react-accordion";
|
|
@@ -33,13 +33,14 @@ import "react-icons-picker";
|
|
|
33
33
|
import "react-dom";
|
|
34
34
|
import "react-quill";
|
|
35
35
|
import "flat-to-nested";
|
|
36
|
+
import "./Functions-7jnEwJyw.js";
|
|
36
37
|
import "redux-undo";
|
|
37
38
|
import "@chaibuilder/runtime";
|
|
38
39
|
import "lodash";
|
|
39
40
|
import "@react-hookz/web";
|
|
40
41
|
import "react-i18next";
|
|
41
|
-
const R = F([]),
|
|
42
|
-
const v = j("uploadMediaCallback", () => ""), c = j("fetchMediaCallback", () => []), [
|
|
42
|
+
const R = F([]), je = ({ isModalView: r, onSelect: a }) => {
|
|
43
|
+
const v = j("uploadMediaCallback", () => ""), c = j("fetchMediaCallback", () => []), [o, m] = E(R), [s, p] = i(!1), [u, x] = i(!1), [n, d] = i(), [f, y] = i("");
|
|
43
44
|
w(() => {
|
|
44
45
|
(async () => {
|
|
45
46
|
x(!0);
|
|
@@ -79,16 +80,16 @@ const R = F([]), be = ({ isModalView: r, onSelect: a }) => {
|
|
|
79
80
|
{
|
|
80
81
|
type: "button",
|
|
81
82
|
onClick: I,
|
|
82
|
-
disabled:
|
|
83
|
+
disabled: s,
|
|
83
84
|
className: "flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",
|
|
84
85
|
children: [
|
|
85
|
-
|
|
86
|
+
s ? /* @__PURE__ */ e.jsx(C, { className: "animate-spin" }) : /* @__PURE__ */ e.jsx(U, { className: "animate-bounce" }),
|
|
86
87
|
" ",
|
|
87
|
-
|
|
88
|
+
s ? "Uploading..." : "Upload"
|
|
88
89
|
]
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
!
|
|
92
|
+
!s && /* @__PURE__ */ e.jsxs(
|
|
92
93
|
"button",
|
|
93
94
|
{
|
|
94
95
|
type: "button",
|
|
@@ -109,16 +110,16 @@ const R = F([]), be = ({ isModalView: r, onSelect: a }) => {
|
|
|
109
110
|
/* @__PURE__ */ e.jsx("input", { type: "file", id: r ? "upload-in-modal" : "upload-in-panel", hidden: !0, onChange: N })
|
|
110
111
|
] }),
|
|
111
112
|
/* @__PURE__ */ e.jsxs(A, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${r ? "px-2" : ""} pt-2`, children: [
|
|
112
|
-
g(
|
|
113
|
-
g(
|
|
114
|
-
r ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: b(
|
|
113
|
+
g(o) && u && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "animate-pulse font-medium", children: "Fetching..." }) }),
|
|
114
|
+
g(o) && !u && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: "No Images" }) }),
|
|
115
|
+
r ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: b(o, (t) => /* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "my-1 flex", onClick: () => a(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
115
116
|
"img",
|
|
116
117
|
{
|
|
117
118
|
className: "h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",
|
|
118
119
|
alt: t.name,
|
|
119
120
|
src: t.thumbUrl
|
|
120
121
|
}
|
|
121
|
-
) }) }, t.id)) }) : b(
|
|
122
|
+
) }) }, t.id)) }) : b(o, (t) => (
|
|
122
123
|
// TODO: Drag and Drop Image to Canvas from Here use `pic.url` for image quality
|
|
123
124
|
/* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "px-2 py-1", onClick: () => a(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
124
125
|
"img",
|
|
@@ -133,5 +134,5 @@ const R = F([]), be = ({ isModalView: r, onSelect: a }) => {
|
|
|
133
134
|
] });
|
|
134
135
|
};
|
|
135
136
|
export {
|
|
136
|
-
|
|
137
|
+
je as default
|
|
137
138
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),P=require("lodash-es"),t=require("./index-H6vIwGfD.cjs"),g=require("./controls-Dy1qa8Dc.cjs"),R=require("./form-VbouZlAW.cjs"),f=require("./index-jw8RxsTv.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("lodash");require("@react-hookz/web");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");const b=({closeModal:i})=>{var l,q;const u=f.useAddPage(),[r,m]=x.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{},template:""}),p=()=>{u.mutate(r,{onSuccess:()=>i()})},j=({formData:n},s)=>{m(o=>{var d,c;const a={[s]:n[s]};return s==="name"?a.slug=P.kebabCase((d=n[s])==null?void 0:d.replace(/\d/g,"")):s==="slug"&&(a.slug=(c=n[s])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...o,...a}})},h={name:g.u({title:"Page Name",default:r.name}),slug:g.u({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(t.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(R.Form,{formData:r,properties:h,onChange:j,disabled:u.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(t.Button,{type:"submit",disabled:!r.name||!r.slug||((l=r.name)==null?void 0:l.length)<2||((q=r.slug)==null?void 0:q.length)<2||u.isPending,onClick:p,children:"Add Page"})})]})},E=()=>{const[i,u]=x.useState(!1);return e.jsxRuntimeExports.jsxs(t.Dialog,{open:i,onOpenChange:()=>u(!i),children:[e.jsxRuntimeExports.jsx(t.DialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>u(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(b,{closeModal:()=>u(!i)})]})};exports.default=E;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { kebabCase as j } from "lodash-es";
|
|
4
|
-
import { am as b, B as u, al as C, b9 as A } from "./index-
|
|
5
|
-
import { u as g } from "./controls-
|
|
6
|
-
import { F as D } from "./form-
|
|
7
|
-
import { g as N } from "./index-
|
|
4
|
+
import { am as b, B as u, al as C, b9 as A } from "./index-niHREMmR.js";
|
|
5
|
+
import { u as g } from "./controls-XPXGHKht.js";
|
|
6
|
+
import { F as D } from "./form-OVmsLOrc.js";
|
|
7
|
+
import { g as N } from "./index-EGUphg4R.js";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
11
|
-
import "./utils-
|
|
11
|
+
import "./utils-AvyFzbPC.js";
|
|
12
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
12
13
|
import "clsx";
|
|
13
14
|
import "tailwind-merge";
|
|
14
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
15
15
|
import "@radix-ui/react-switch";
|
|
16
16
|
import "@radix-ui/react-slot";
|
|
17
17
|
import "@radix-ui/react-accordion";
|
|
@@ -36,6 +36,7 @@ import "react-dom";
|
|
|
36
36
|
import "react-quill";
|
|
37
37
|
import "jotai";
|
|
38
38
|
import "flat-to-nested";
|
|
39
|
+
import "./Functions-7jnEwJyw.js";
|
|
39
40
|
import "redux-undo";
|
|
40
41
|
import "@chaibuilder/runtime";
|
|
41
42
|
import "lodash";
|
|
@@ -51,7 +52,7 @@ import "react-dnd";
|
|
|
51
52
|
import "@minoru/react-dnd-treeview";
|
|
52
53
|
import "react-hotkeys-hook";
|
|
53
54
|
import "sonner";
|
|
54
|
-
import "./html-to-json-
|
|
55
|
+
import "./html-to-json-57841sEK.js";
|
|
55
56
|
import "himalaya";
|
|
56
57
|
import "lucide-react";
|
|
57
58
|
import "./web-blocks.js";
|
|
@@ -95,7 +96,7 @@ const S = ({ closeModal: i }) => {
|
|
|
95
96
|
}
|
|
96
97
|
) })
|
|
97
98
|
] });
|
|
98
|
-
},
|
|
99
|
+
}, wt = () => {
|
|
99
100
|
const [i, e] = c(!1);
|
|
100
101
|
return /* @__PURE__ */ t.jsxs(C, { open: i, onOpenChange: () => e(!i), children: [
|
|
101
102
|
/* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => e(!i), children: "+ New Page" }) }),
|
|
@@ -103,5 +104,5 @@ const S = ({ closeModal: i }) => {
|
|
|
103
104
|
] });
|
|
104
105
|
};
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
wt as default
|
|
107
108
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-H6vIwGfD.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("lodash");require("@react-hookz/web");require("react-i18next");const x=({open:q,onCancel:t=()=>{},onConfirm:s,title:n,description:i,disabled:u,cancelText:l="Discard",confirmText:o="Save"})=>e.jsxRuntimeExports.jsx(r.AlertDialog,{open:q,children:e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTitle,{children:n}),i&&e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:i}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u,onClick:t,children:l}),e.jsxRuntimeExports.jsx(r.Button,{variant:"default",onClick:s,disabled:u,children:o})]})]})});exports.default=x;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { E as a, G as n, I as c, J as x, L as j, B as d } from "./index-
|
|
2
|
+
import { E as a, G as n, I as c, J as x, L as j, B as d } from "./index-niHREMmR.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@radix-ui/react-toggle";
|
|
6
6
|
import "class-variance-authority";
|
|
7
|
-
import "./utils-
|
|
7
|
+
import "./utils-AvyFzbPC.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
9
10
|
import "clsx";
|
|
10
11
|
import "tailwind-merge";
|
|
11
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
12
12
|
import "@radix-ui/react-switch";
|
|
13
13
|
import "@radix-ui/react-slot";
|
|
14
14
|
import "@radix-ui/react-accordion";
|
|
@@ -33,12 +33,13 @@ import "react-dom";
|
|
|
33
33
|
import "react-quill";
|
|
34
34
|
import "jotai";
|
|
35
35
|
import "flat-to-nested";
|
|
36
|
+
import "./Functions-7jnEwJyw.js";
|
|
36
37
|
import "redux-undo";
|
|
37
38
|
import "@chaibuilder/runtime";
|
|
38
39
|
import "lodash";
|
|
39
40
|
import "@react-hookz/web";
|
|
40
41
|
import "react-i18next";
|
|
41
|
-
const
|
|
42
|
+
const ti = ({
|
|
42
43
|
open: o,
|
|
43
44
|
onCancel: m = () => {
|
|
44
45
|
},
|
|
@@ -57,5 +58,5 @@ const ri = ({
|
|
|
57
58
|
] })
|
|
58
59
|
] }) });
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
ti as default
|
|
61
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("lodash-es"),n="#styles:";const a=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),i18n:i.i18n||!1,dataType:"string",required:i.required||!1,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),d=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"string",...t.omit(i,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),r=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",binding:t.get(i,"binding",!0),schema:{type:"boolean",...t.omit(i,["i18n","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),u=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"number",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"number",...t.omit(i,["i18n","required"])},uiSchema:{}}),g=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),i18n:i.i18n||!1,required:i.required||!1,dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required","options","binding"]),oneOf:i.options.map(e=>({const:e.value,title:e.title}))},uiSchema:{"ui:widget":"select"}}),l=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"color"}});const s=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:t.get(i,"binding",!0),properties:i.properties})
|
|
1
|
+
"use strict";const t=require("lodash-es"),n="#styles:";const a=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),i18n:i.i18n||!1,dataType:"string",required:i.required||!1,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),d=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"string",...t.omit(i,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),r=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",binding:t.get(i,"binding",!0),schema:{type:"boolean",...t.omit(i,["i18n","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),u=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"number",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"number",...t.omit(i,["i18n","required"])},uiSchema:{}}),g=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),i18n:i.i18n||!1,required:i.required||!1,dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required","options","binding"]),oneOf:i.options.map(e=>({const:e.value,title:e.title}))},uiSchema:{"ui:widget":"select"}}),l=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"color"}});const s=i=>({type:"singular",default:i.default||"",i18n:i.i18n||!1,binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"richtext"}}),p=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:t.get(i,"binding",!0),properties:i.properties}),y=i=>({type:"list",itemProperties:i.itemProperties,binding:t.get(i,"binding",!0),title:i.title,dataType:"array",default:i.default||[],itemTitle:i.getItemLabel?i.getItemLabel({}):()=>""}),o=i=>({type:"styles",binding:!1,default:`${n},${i.default||""}`}),m=i=>({default:i.default||"",binding:t.get(i,"binding",!0),type:"singular",i18n:i.i18n||!1,dataType:"string",schema:{type:"string",title:"Icon",default:i.default||""},uiSchema:{"ui:widget":"icon"}}),c=i=>({default:i.default,type:"singular",binding:t.get(i,"binding",!0),dataType:"object",i18n:i.i18n||!1,schema:{type:"object",...i||{},properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}}},uiSchema:{"ui:field":"link"}}),b=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"image"}});exports.S=o;exports.T=m;exports.b=p;exports.c=u;exports.f=g;exports.g=d;exports.h=y;exports.m=s;exports.o=b;exports.q=c;exports.r=r;exports.u=a;exports.y=l;
|
|
@@ -88,19 +88,52 @@ const r = (i) => ({
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
const y = (i) => ({
|
|
91
|
+
type: "singular",
|
|
92
|
+
default: i.default || "",
|
|
93
|
+
i18n: i.i18n || !1,
|
|
94
|
+
binding: t(i, "binding", !0),
|
|
95
|
+
dataType: "string",
|
|
96
|
+
schema: {
|
|
97
|
+
type: "string",
|
|
98
|
+
...e(i, ["i18n", "required"])
|
|
99
|
+
},
|
|
100
|
+
uiSchema: {
|
|
101
|
+
"ui:widget": "richtext"
|
|
102
|
+
}
|
|
103
|
+
}), m = (i) => ({
|
|
91
104
|
type: "model",
|
|
92
105
|
title: i.title,
|
|
93
106
|
dataType: "object",
|
|
94
107
|
default: i.default || {},
|
|
95
108
|
binding: t(i, "binding", !0),
|
|
96
109
|
properties: i.properties
|
|
97
|
-
})
|
|
98
|
-
|
|
110
|
+
}), o = (i) => ({
|
|
111
|
+
type: "list",
|
|
112
|
+
itemProperties: i.itemProperties,
|
|
113
|
+
binding: t(i, "binding", !0),
|
|
114
|
+
title: i.title,
|
|
115
|
+
dataType: "array",
|
|
116
|
+
default: i.default || [],
|
|
117
|
+
itemTitle: i.getItemLabel ? i.getItemLabel({}) : () => ""
|
|
118
|
+
}), c = (i) => ({
|
|
99
119
|
type: "styles",
|
|
100
120
|
binding: !1,
|
|
101
121
|
default: `${a},${i.default || ""}`
|
|
102
|
-
})
|
|
103
|
-
|
|
122
|
+
}), b = (i) => ({
|
|
123
|
+
default: i.default || "",
|
|
124
|
+
binding: t(i, "binding", !0),
|
|
125
|
+
type: "singular",
|
|
126
|
+
i18n: i.i18n || !1,
|
|
127
|
+
dataType: "string",
|
|
128
|
+
schema: {
|
|
129
|
+
type: "string",
|
|
130
|
+
title: "Icon",
|
|
131
|
+
default: i.default || ""
|
|
132
|
+
},
|
|
133
|
+
uiSchema: {
|
|
134
|
+
"ui:widget": "icon"
|
|
135
|
+
}
|
|
136
|
+
}), f = (i) => ({
|
|
104
137
|
default: i.default,
|
|
105
138
|
type: "singular",
|
|
106
139
|
binding: t(i, "binding", !0),
|
|
@@ -118,7 +151,7 @@ const o = (i) => ({
|
|
|
118
151
|
uiSchema: {
|
|
119
152
|
"ui:field": "link"
|
|
120
153
|
}
|
|
121
|
-
}),
|
|
154
|
+
}), h = (i) => ({
|
|
122
155
|
type: "singular",
|
|
123
156
|
default: i.default || "",
|
|
124
157
|
binding: t(i, "binding", !0),
|
|
@@ -133,13 +166,16 @@ const o = (i) => ({
|
|
|
133
166
|
}
|
|
134
167
|
});
|
|
135
168
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
169
|
+
c as S,
|
|
170
|
+
b as T,
|
|
171
|
+
m as b,
|
|
138
172
|
g as c,
|
|
139
173
|
s as f,
|
|
140
174
|
u as g,
|
|
141
|
-
|
|
142
|
-
|
|
175
|
+
o as h,
|
|
176
|
+
y as m,
|
|
177
|
+
h as o,
|
|
178
|
+
f as q,
|
|
143
179
|
l as r,
|
|
144
180
|
r as u,
|
|
145
181
|
p as y
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-jw8RxsTv.cjs"),e=require("./index-H6vIwGfD.cjs"),r=require("react-i18next");require("i18next");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("react-textarea-autosize");require("jotai");require("flagged");require("react-dnd");require("lodash-es");require("@minoru/react-dnd-treeview");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-icons");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("./MODIFIERS-2FeVfZQ9.cjs");require("lucide-react");require("./web-blocks.cjs");require("./controls-Dy1qa8Dc.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.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("flat-to-nested");require("redux-undo");require("lodash");require("@react-hookz/web");exports.ChaiBuilderEditor=s.ChaiBuilderEditor;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.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;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;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.useMarkAsGlobalBlock=e.useMarkAsGlobalBlock;exports.useMoveBlocks=e.useMoveBlocks;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useProject=e.useProject;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;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>r.useTranslation});
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as
|
|
2
|
-
import { O as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { k as ss } from "./index-EGUphg4R.js";
|
|
2
|
+
import { O as as, ag as os, P as ts, ai as rs, Q as is, af as ps, x as ls, i as ms, z as us, R as cs, p as ds, U as ks, V as Bs, k as ns, W as Ss, n as Cs, X as Ps, Y as vs, m as gs, M as As, Z as ys, _ as Ms, $ as hs, a0 as Ds, a1 as Is, o as Rs, h as fs, a2 as xs, N as Ts, l as Us, a4 as bs, ah as js, a7 as ws, a6 as Hs, a5 as Os, j as Fs, ae as Gs, aj as Ws, ak as Zs, w as zs, a8 as Es, aa as Ls, a3 as Ns, ab as Qs, a9 as Vs, ac as Xs, ad as Ys } from "./index-niHREMmR.js";
|
|
3
|
+
import { useTranslation as $s } from "react-i18next";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -15,19 +15,21 @@ import "flagged";
|
|
|
15
15
|
import "react-dnd";
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@minoru/react-dnd-treeview";
|
|
18
|
-
import "./
|
|
18
|
+
import "./Functions-7jnEwJyw.js";
|
|
19
19
|
import "tailwind-merge";
|
|
20
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
21
20
|
import "react-hotkeys-hook";
|
|
22
21
|
import "@chaibuilder/runtime";
|
|
23
22
|
import "@radix-ui/react-icons";
|
|
24
23
|
import "sonner";
|
|
25
|
-
import "./html-to-json-
|
|
24
|
+
import "./html-to-json-57841sEK.js";
|
|
26
25
|
import "himalaya";
|
|
26
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
27
27
|
import "lucide-react";
|
|
28
28
|
import "./web-blocks.js";
|
|
29
|
+
import "./controls-XPXGHKht.js";
|
|
29
30
|
import "@radix-ui/react-toggle";
|
|
30
31
|
import "class-variance-authority";
|
|
32
|
+
import "./utils-AvyFzbPC.js";
|
|
31
33
|
import "@radix-ui/react-switch";
|
|
32
34
|
import "@radix-ui/react-slot";
|
|
33
35
|
import "@radix-ui/react-accordion";
|
|
@@ -52,53 +54,53 @@ import "redux-undo";
|
|
|
52
54
|
import "lodash";
|
|
53
55
|
import "@react-hookz/web";
|
|
54
56
|
export {
|
|
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
|
-
|
|
57
|
+
ss as ChaiBuilderEditor,
|
|
58
|
+
as as useActiveModal,
|
|
59
|
+
os as useActivePanel,
|
|
60
|
+
ts as useAddBlock,
|
|
61
|
+
rs as useAddBlockParent,
|
|
62
|
+
is as useAddClassesToBlocks,
|
|
63
|
+
ps as useAllBlocks,
|
|
64
|
+
ls as useBrandingOptions,
|
|
65
|
+
ms as useBuilderProp,
|
|
66
|
+
us as useBuilderReset,
|
|
67
|
+
cs as useBuildingBlocks,
|
|
68
|
+
ds as useCanvasHistory,
|
|
69
|
+
ks as useCanvasWidth,
|
|
70
|
+
Bs as useCanvasZoom,
|
|
71
|
+
ns as useCopyBlockIds,
|
|
72
|
+
Ss as useCurrentPage,
|
|
73
|
+
Cs as useCutBlockIds,
|
|
74
|
+
Ps as useDarkMode,
|
|
75
|
+
vs as useDeveloperPreviewMode,
|
|
76
|
+
gs as useDuplicateBlocks,
|
|
77
|
+
As as useFeatureSupport,
|
|
78
|
+
ys as useGetPageData,
|
|
79
|
+
Ms as useHiddenBlockIds,
|
|
80
|
+
hs as useHighlightBlockId,
|
|
81
|
+
Ds as useMarkAsGlobalBlock,
|
|
82
|
+
Is as useMoveBlocks,
|
|
83
|
+
Rs as usePasteBlocks,
|
|
84
|
+
fs as usePreviewMode,
|
|
85
|
+
xs as useProject,
|
|
86
|
+
Ts as useReadOnlyMode,
|
|
87
|
+
Us as useRemoveBlocks,
|
|
88
|
+
bs as useRemoveClassesFromBlocks,
|
|
89
|
+
js as useSavePage,
|
|
90
|
+
ws as useSelectedBlock,
|
|
91
|
+
Hs as useSelectedBlockAllClasses,
|
|
92
|
+
Os as useSelectedBlockCurrentClasses,
|
|
93
|
+
Fs as useSelectedBlockIds,
|
|
94
|
+
Gs as useSelectedBlocksDisplayChild,
|
|
95
|
+
Ws as useSelectedBreakpoints,
|
|
96
|
+
Zs as useSelectedStylingBlocks,
|
|
97
|
+
zs as useSetAllBlocks,
|
|
98
|
+
Es as useStylingBreakpoint,
|
|
99
|
+
Ls as useStylingState,
|
|
100
|
+
$s as useTranslation,
|
|
101
|
+
Ns as useTranslations,
|
|
102
|
+
Qs as useTreeData,
|
|
103
|
+
Vs as useUILibraryBlocks,
|
|
104
|
+
Xs as useUpdateBlocksProps,
|
|
105
|
+
Ys as useUpdateBlocksPropsRealtime
|
|
104
106
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { E as s, F as l, G as n, I as d, J as a, L as c, B as u } from "./index-
|
|
3
|
-
import { j as x } from "./index-
|
|
1
|
+
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import { E as s, F as l, G as n, I as d, J as a, L as c, B as u } from "./index-niHREMmR.js";
|
|
3
|
+
import { j as x } from "./index-EGUphg4R.js";
|
|
4
4
|
import { TrashIcon as h } from "@radix-ui/react-icons";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
9
|
-
import "./utils-
|
|
9
|
+
import "./utils-AvyFzbPC.js";
|
|
10
10
|
import "lodash-es";
|
|
11
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
11
12
|
import "clsx";
|
|
12
13
|
import "tailwind-merge";
|
|
13
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
14
14
|
import "@radix-ui/react-switch";
|
|
15
15
|
import "@radix-ui/react-slot";
|
|
16
16
|
import "@radix-ui/react-accordion";
|
|
@@ -34,6 +34,7 @@ import "react-dom";
|
|
|
34
34
|
import "react-quill";
|
|
35
35
|
import "jotai";
|
|
36
36
|
import "flat-to-nested";
|
|
37
|
+
import "./Functions-7jnEwJyw.js";
|
|
37
38
|
import "redux-undo";
|
|
38
39
|
import "@chaibuilder/runtime";
|
|
39
40
|
import "lodash";
|
|
@@ -47,40 +48,41 @@ import "react-dnd";
|
|
|
47
48
|
import "@minoru/react-dnd-treeview";
|
|
48
49
|
import "react-hotkeys-hook";
|
|
49
50
|
import "sonner";
|
|
50
|
-
import "./html-to-json-
|
|
51
|
+
import "./html-to-json-57841sEK.js";
|
|
51
52
|
import "himalaya";
|
|
52
53
|
import "lucide-react";
|
|
53
54
|
import "./web-blocks.js";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
import "./controls-XPXGHKht.js";
|
|
56
|
+
const jr = ({ pageData: e, projectData: i }) => {
|
|
57
|
+
const m = {}, t = x(), o = e.uuid === i.homepage, p = () => {
|
|
58
|
+
t.mutate(e, {
|
|
57
59
|
onSuccess: () => {
|
|
58
60
|
m({ uuid: i.homepage, slug: "/home" });
|
|
59
61
|
}
|
|
60
62
|
});
|
|
61
63
|
};
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ r.jsxs(s, { children: [
|
|
65
|
+
/* @__PURE__ */ r.jsx(l, { disabled: o, children: /* @__PURE__ */ r.jsx(
|
|
64
66
|
"div",
|
|
65
67
|
{
|
|
66
68
|
className: `flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${o ? "cursor-not-allowed border-red-200 text-red-200" : "cursor-pointer border-red-400 text-red-400"}`,
|
|
67
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ r.jsx(h, {})
|
|
68
70
|
}
|
|
69
71
|
) }),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ r.jsxs(n, { children: [
|
|
73
|
+
/* @__PURE__ */ r.jsxs(d, { children: [
|
|
72
74
|
"Are you sure you want to delete ",
|
|
73
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ r.jsx("i", { className: "text-red-500", children: e.name }),
|
|
74
76
|
" page?"
|
|
75
77
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ r.jsx(a, { children: "This action cannot be undone. This will permanently delete your page." }),
|
|
79
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
|
|
80
|
+
/* @__PURE__ */ r.jsx(c, { disabled: t.isPending, children: "Cancel" }),
|
|
81
|
+
/* @__PURE__ */ r.jsx(u, { variant: "destructive", onClick: p, disabled: t.isPending, children: "Yes, Delete" })
|
|
80
82
|
] })
|
|
81
83
|
] })
|
|
82
84
|
] });
|
|
83
85
|
};
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
jr as default
|
|
86
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-H6vIwGfD.cjs"),q=require("./index-jw8RxsTv.cjs"),l=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("lodash");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./controls-Dy1qa8Dc.cjs");const d=({pageData:i,projectData:t})=>{const n={},u=q.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,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 ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(l.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:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
package/dist/email-blocks.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash-es"),l=require("./jsx-runtime-Z_BpKhVy.cjs"),c=require("@react-email/components"),i=require("@chaibuilder/runtime"),r=require("./controls-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash-es"),l=require("./jsx-runtime-Z_BpKhVy.cjs"),c=require("@react-email/components"),i=require("@chaibuilder/runtime"),r=require("./controls-Dy1qa8Dc.cjs"),s=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");const p=({blockProps:e,styles:t,children:o})=>l.jsxRuntimeExports.jsx(c.Container,{...e,...t,children:o});i.registerChaiBlock(p,{type:"Container",label:"Container",group:"basic",category:"core",props:{styles:r.S({default:""})},canAcceptBlock:()=>!0,canMove:()=>!0,canDelete:()=>!1,canDuplicate:()=>!1});const x=({blockProps:e,styles:t,children:o})=>l.jsxRuntimeExports.jsx(c.Section,{...e,...t,children:o});i.registerChaiBlock(x,{type:"Section",label:"Section",group:"basic",category:"core",icon:s.ImageIcon,props:{styles:r.S({default:"w-full"}),align:r.f({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0});const g=({blockProps:e,styles:t,children:o})=>l.jsxRuntimeExports.jsx(c.Row,{...e,...t,children:o});i.registerChaiBlock(g,{type:"Row",label:"Row",group:"basic",category:"core",icon:s.ImageIcon,props:{styles:r.S({default:""})},canAcceptBlock:e=>e==="Column"});const m=({blockProps:e,styles:t,children:o,align:n})=>l.jsxRuntimeExports.jsx(c.Column,{...e,...t,align:n,children:o});i.registerChaiBlock(m,{type:"Column",label:"Column",group:"basic",category:"core",icon:s.ImageIcon,props:{styles:r.S({default:""}),align:r.f({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0});const h=({level:e,blockProps:t,styles:o,content:n})=>l.jsxRuntimeExports.jsx(c.Heading,{as:e,...t,...o,children:n}),k=({blockProps:e,styles:t,content:o})=>l.jsxRuntimeExports.jsx("h1",{...e,...t,children:o});i.registerChaiBlock(h,{type:"Heading",label:"Heading",group:"basic",category:"core",icon:s.HeadingIcon,builderComponent:k,props:{content:r.u({title:"Content",default:"Enter your heading here..."}),styles:r.S({default:"text-xl"}),level:r.f({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]})},canAcceptBlock:e=>["Link","RawText"].includes(e)});const b=({blockProps:e,styles:t,content:o})=>l.jsxRuntimeExports.jsx(c.Text,{...e,...t,children:o}),B=({content:e,blockProps:t,styles:o})=>l.jsxRuntimeExports.jsx("p",{...t,...o,children:e});i.registerChaiBlock(b,{type:"Text",label:"Text",group:"basic",category:"core",icon:s.TextIcon,builderComponent:B,props:{content:r.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim."}),styles:r.S({default:""})},canAcceptBlock:e=>["Link","RawText"].includes(e)});const f=({content:e})=>e,C=({content:e,blockProps:t})=>l.jsxRuntimeExports.jsx("span",{...t,children:e});i.registerChaiBlock(f,{type:"RawText",label:"Raw Text",group:"basic",category:"core",icon:s.TextIcon,hidden:!0,builderComponent:C,props:{content:r.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "})}});const j=({blockProps:e,styles:t,link:o,content:n})=>l.jsxRuntimeExports.jsx(c.Button,{...e,...t,href:o.href,children:n}),y=({blockProps:e,styles:t,content:o})=>l.jsxRuntimeExports.jsx("button",{type:"button",...e,...t,children:o});i.registerChaiBlock(j,{type:"Button",label:"Button",group:"basic",category:"core",builderComponent:y,props:{content:r.u({title:"Content",default:"Click me"}),link:r.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:r.S({default:"bg-primary text-white px-4 py-2 rounded-md"})}});const v=({blockProps:e,styles:t,href:o,content:n,target:a})=>l.jsxRuntimeExports.jsx(c.Link,{...e,...t,href:o,target:a,children:n}),R=({blockProps:e,styles:t,content:o,children:n})=>l.jsxRuntimeExports.jsx("span",{...e,...t,children:n||o});i.registerChaiBlock(v,{type:"Link",label:"Link",group:"basic",category:"core",icon:s.Link1Icon,blocks:[{_id:"a",_type:"Link"},{_id:"b",_parent:"a",_type:"RawText",content:"I am a link."}],builderComponent:R,props:{content:r.u({title:"Content",default:"I am a link."}),link:r.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:r.S({default:"font-bold text-blue-500"})},canAcceptBlock:()=>!0});const E=({blockProps:e,styles:t,children:o})=>l.jsxRuntimeExports.jsx(c.Preview,{...e,...t,children:o}),I=({blockProps:e,styles:t,content:o})=>l.jsxRuntimeExports.jsx("div",{...e,...t,children:o});i.registerChaiBlock(E,{type:"Preview",label:"Preview",group:"basic",category:"core",builderComponent:I,canAcceptBlock:()=>!0,canDuplicate:()=>!1});const w=({blockProps:e,content:t})=>l.jsxRuntimeExports.jsx(c.Markdown,{children:t,...e});i.registerChaiBlock(w,{type:"Markdown",label:"Markdown",group:"basic",category:"core",props:{content:r.g({default:"# This is a ~~strikethrough~~",title:"Markdown"})}});const S=({blockProps:e,styles:t,alt:o,image:n,width:a,height:u})=>l.jsxRuntimeExports.jsx(c.Img,{...e,...t,src:n,alt:o,width:a,height:u}),L=({blockProps:e,styles:t,alt:o,image:n,width:a,height:u})=>l.jsxRuntimeExports.jsx("img",{...e,...t,src:n,alt:o,width:a,height:u});i.registerChaiBlock(S,{type:"Image",label:"Image",group:"basic",category:"core",icon:s.ImageIcon,builderComponent:L,props:{styles:r.S({default:"w-full"}),image:r.o({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:r.u({title:"Alt",default:""}),width:r.u({title:"Width",default:""}),height:r.u({title:"Height",default:""})}});const T=({blockProps:e,styles:t})=>l.jsxRuntimeExports.jsx(c.Hr,{...e,...t}),H=({blockProps:e,styles:t})=>l.jsxRuntimeExports.jsx("hr",{...e,...t});i.registerChaiBlock(T,{type:"Divider",label:"Divider",group:"basic",category:"core",icon:s.DividerHorizontalIcon,builderComponent:H,props:{styles:r.S({default:"w-full h-2"})}});const q=({blockProps:e,styles:t,code:o,lineNumbers:n,theme:a,language:u})=>l.jsxRuntimeExports.jsx(c.CodeBlock,{...e,...t,code:o,linenumbers:n,theme:a,language:u}),A=({blockProps:e,styles:t,code:o})=>l.jsxRuntimeExports.jsx("div",{...e,...t,children:l.jsxRuntimeExports.jsx("code",{children:o})});i.registerChaiBlock(q,{type:"CodeBlock",label:"Code Block",group:"basic",category:"core",hidden:!0,icon:s.CodeSandboxLogoIcon,builderComponent:A,props:{styles:r.S({default:""}),code:r.g({title:"Code",default:"console.log('Hello, world!');"}),theme:r.u({title:"Theme",default:"dracula"}),lineNumbers:r.r({title:"Line number",default:!1}),language:r.f({title:"Language",default:"javascript",binding:!1,options:[{value:"javascript",title:"JavaScript"},{value:"html",title:"HTML"},{value:"css",title:"CSS"}]})}});const D=({blockProps:e,styles:t,code:o})=>l.jsxRuntimeExports.jsx(c.CodeInline,{...e,...t,children:o}),M=({blockProps:e,styles:t,code:o})=>l.jsxRuntimeExports.jsx("code",{...e,...t,children:o});i.registerChaiBlock(D,{type:"CodeInline",label:"Code Inline",group:"basic",category:"core",icon:s.CodeSandboxLogoIcon,builderComponent:M,props:{styles:r.S({default:""}),code:r.g({title:"Code",default:"console.log('Hello, world!');"})}});const _=d.noop;exports.loadEmailBlocks=_;
|
package/dist/email-blocks.js
CHANGED
|
@@ -2,7 +2,7 @@ import { noop as b } from "lodash-es";
|
|
|
2
2
|
import { j as l } from "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import { Container as f, Section as k, Row as y, Column as x, Heading as B, Text as C, Button as v, Link as j, Preview as w, Markdown as I, Img as L, Hr as T, CodeBlock as H, CodeInline as A } from "@react-email/components";
|
|
4
4
|
import { registerChaiBlock as r } from "@chaibuilder/runtime";
|
|
5
|
-
import { S as i, f as d, u as a, g as s, q as g, o as R, r as S } from "./controls-
|
|
5
|
+
import { S as i, f as d, u as a, g as s, q as g, o as R, r as S } from "./controls-XPXGHKht.js";
|
|
6
6
|
import { ImageIcon as p, HeadingIcon as D, TextIcon as m, Link1Icon as M, DividerHorizontalIcon as _, CodeSandboxLogoIcon as h } from "@radix-ui/react-icons";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "react";
|