@chaibuilder/sdk 1.2.19 → 1.2.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-157fSrJX.cjs +1 -0
- package/dist/{AddBlocks-gcTaEIKO.js → AddBlocks-WgpssWmQ.js} +25 -27
- package/dist/{BrandingOptions-bfiFY0VR.js → BrandingOptions-4961TxX2.js} +13 -15
- package/dist/BrandingOptions-nwXR9TMl.cjs +1 -0
- package/dist/CanvasArea-_BFTu_8b.js +908 -0
- package/dist/CanvasArea-eOKWgAXR.cjs +55 -0
- package/dist/{CurrentPage-0Ap2N0uc.js → CurrentPage-VAuh7F6E.js} +13 -16
- package/dist/CurrentPage-iB6nD9Rr.cjs +1 -0
- package/dist/ListTree-dvxHTXs4.js +167 -0
- package/dist/ListTree-gTmusfso.cjs +1 -0
- package/dist/Outline-g8XFGm2t.cjs +1 -0
- package/dist/Outline-jTFv40r5.js +294 -0
- package/dist/PagesPanel-Wx9JG5qR.cjs +1 -0
- package/dist/{PagesPanel-Pk-C1956.js → PagesPanel-oky0X1Ww.js} +5 -8
- package/dist/ProjectPanel-64Xg3Y_p.cjs +1 -0
- package/dist/{ProjectPanel-_KQBhuPO.js → ProjectPanel-WjVBiB-e.js} +15 -18
- package/dist/Settings-Tlqq4mqN.cjs +1 -0
- package/dist/{Settings-XtAatoiu.js → Settings-mNRbprbx.js} +761 -709
- package/dist/SidePanels-ZF4Q2R29.cjs +1 -0
- package/dist/{SidePanels-O52zKXbH.js → SidePanels-pQImwDI6.js} +7 -10
- package/dist/Topbar-NMvzqQHW.cjs +1 -0
- package/dist/{Topbar-oTx7a12r.js → Topbar-Ny9T-7Zb.js} +3 -5
- package/dist/TypeIcon-ElNNPazl.cjs +1 -0
- package/dist/TypeIcon-qO96rNbV.js +69 -0
- package/dist/UnsplashImages-6tZv1q2_.cjs +1 -0
- package/dist/{UnsplashImages-5A21uzMK.js → UnsplashImages-Y8RGFVSh.js} +13 -15
- package/dist/UploadImages-VLlVg9Ur.cjs +1 -0
- package/dist/{UploadImages-V_54lCAO.js → UploadImages-dd8LfyFr.js} +8 -10
- package/dist/{add-page-modal-dKQLw7RQ.js → add-page-modal-1mGGtAB_.js} +16 -19
- package/dist/add-page-modal-xCUKJiZv.cjs +1 -0
- package/dist/confirm-alert-f26zJ7Js.cjs +1 -0
- package/dist/{confirm-alert-8GP3bKH_.js → confirm-alert-sc8RaWvD.js} +3 -5
- package/dist/{controls-Dy1qa8Dc.cjs → controls-KK2oLIa8.cjs} +1 -1
- package/dist/{controls-XPXGHKht.js → controls-OfJWSEqC.js} +29 -28
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +45 -48
- package/dist/delete-page-modal-Qa0YqBRl.cjs +1 -0
- package/dist/{delete-page-modal-Zb5ld6O-.js → delete-page-modal-yAJNstCa.js} +8 -11
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +5 -5
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +1 -0
- package/dist/email.js +4 -7
- package/dist/{form-yyU2x7So.js → form-Nj6Kdn3g.js} +1 -1
- package/dist/{form-o6_55v8F.cjs → form-n1Q6u16z.cjs} +1 -1
- package/dist/index-9PHdn80L.cjs +1 -0
- package/dist/{index-JdnF6lYP.cjs → index-9YNkdni8.cjs} +51 -51
- package/dist/{index-WP7IRkij.js → index-IPJAbzzO.js} +1178 -1133
- package/dist/{index-BMZLAJUV.cjs → index-PlZjGTTr.cjs} +1 -1
- package/dist/{index-lFcrvDFC.js → index-iQEapw2W.js} +3 -3
- package/dist/{index-yILWlilS.js → index-kAjyc_KA.js} +8306 -8170
- package/dist/{page-viewer-3QXwPGpg.js → page-viewer-SU_BqZDK.js} +9 -12
- package/dist/page-viewer-ZA-sJD82.cjs +1 -0
- package/dist/project-general-setting-GuQyvAHS.cjs +1 -0
- package/dist/{project-general-setting-UalRmyHm.js → project-general-setting-eEmhoFvb.js} +7 -10
- package/dist/project-seo-setting-3-vBkx2v.cjs +1 -0
- package/dist/{project-seo-setting-8FsvPSPl.js → project-seo-setting-NNvAGt4T.js} +5 -7
- package/dist/single-page-detail-Z677SWqt.cjs +1 -0
- package/dist/{single-page-detail-GaB85dNv.js → single-page-detail-nxWIy6e7.js} +36 -39
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +1 -0
- package/dist/studio.js +4 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +138 -140
- package/dist/{useAddBlockByDrop-BIK2fdgj.js → useAddBlockByDrop-V8xo-PNQ.js} +1 -1
- package/dist/{useAddBlockByDrop-6EbioQV4.cjs → useAddBlockByDrop-qRHgy8_0.cjs} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1 -1
- package/package.json +26 -38
- package/dist/AddBlocks-KeHVFaIr.cjs +0 -1
- package/dist/BrandingOptions-I2I8w6E9.cjs +0 -1
- package/dist/CanvasArea-JfHkTnQD.cjs +0 -60
- package/dist/CanvasArea-xvMCbQDL.js +0 -1404
- package/dist/CurrentPage-vj52UxMA.cjs +0 -1
- package/dist/ListTree-Vq0_s1wC.cjs +0 -1
- package/dist/ListTree-k-QMO740.js +0 -96
- package/dist/Outline-HI6-c9nf.js +0 -359
- package/dist/Outline-fAflJ_lN.cjs +0 -1
- package/dist/PagesPanel-ug8Tmva6.cjs +0 -1
- package/dist/ProjectPanel-o8-6cPX-.cjs +0 -1
- package/dist/Settings-Cc9eV4VG.cjs +0 -1
- package/dist/SidePanels-ugRobm34.cjs +0 -1
- package/dist/Topbar-e5MGWX9n.cjs +0 -1
- package/dist/UnsplashImages-KSbKGs91.cjs +0 -1
- package/dist/UploadImages-V42YSRVO.cjs +0 -1
- package/dist/add-page-modal-xMedOdsp.cjs +0 -1
- package/dist/confirm-alert-KtW-4OjG.cjs +0 -1
- package/dist/delete-page-modal-lebJCBBe.cjs +0 -1
- package/dist/index-thKfFhmr.cjs +0 -1
- package/dist/page-viewer-DTIblLiz.cjs +0 -1
- package/dist/project-general-setting-g7WhM3hc.cjs +0 -1
- package/dist/project-seo-setting-xoeLQVj3.cjs +0 -1
- package/dist/single-page-detail-XdBysrE_.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { get as
|
|
1
|
+
import { get as e, omit as t } from "lodash-es";
|
|
2
2
|
const a = "#styles:";
|
|
3
3
|
const r = (i) => ({
|
|
4
4
|
type: "singular",
|
|
5
5
|
default: i.default || "",
|
|
6
|
-
binding:
|
|
6
|
+
binding: e(i, "binding", !0),
|
|
7
7
|
i18n: i.i18n || !1,
|
|
8
8
|
dataType: "string",
|
|
9
9
|
required: i.required || !1,
|
|
10
10
|
schema: {
|
|
11
11
|
type: "string",
|
|
12
|
-
...
|
|
12
|
+
...t(i, ["i18n", "required"])
|
|
13
13
|
},
|
|
14
14
|
uiSchema: {
|
|
15
15
|
"ui:placeholder": i.placeholder || "Enter here"
|
|
@@ -17,13 +17,13 @@ const r = (i) => ({
|
|
|
17
17
|
}), u = (i) => ({
|
|
18
18
|
type: "singular",
|
|
19
19
|
default: i.default || "",
|
|
20
|
-
binding:
|
|
20
|
+
binding: e(i, "binding", !0),
|
|
21
21
|
dataType: "string",
|
|
22
22
|
i18n: i.i18n || !1,
|
|
23
23
|
required: i.required || !1,
|
|
24
24
|
schema: {
|
|
25
25
|
type: "string",
|
|
26
|
-
...
|
|
26
|
+
...t(i, ["i18n", "required", "rows"])
|
|
27
27
|
},
|
|
28
28
|
uiSchema: {
|
|
29
29
|
"ui:widget": "textarea",
|
|
@@ -37,37 +37,37 @@ const r = (i) => ({
|
|
|
37
37
|
i18n: i.i18n || !1,
|
|
38
38
|
default: i.default || !1,
|
|
39
39
|
dataType: "boolean",
|
|
40
|
-
binding:
|
|
40
|
+
binding: e(i, "binding", !0),
|
|
41
41
|
schema: {
|
|
42
42
|
type: "boolean",
|
|
43
|
-
...
|
|
43
|
+
...t(i, ["i18n", "required"])
|
|
44
44
|
},
|
|
45
45
|
uiSchema: {
|
|
46
46
|
"ui:title": i.title || "Select Item",
|
|
47
47
|
"ui:description": ""
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), s = (i) => ({
|
|
50
50
|
type: "singular",
|
|
51
51
|
default: i.default || "",
|
|
52
|
-
binding:
|
|
52
|
+
binding: e(i, "binding", !0),
|
|
53
53
|
dataType: "number",
|
|
54
54
|
i18n: i.i18n || !1,
|
|
55
55
|
required: i.required || !1,
|
|
56
56
|
schema: {
|
|
57
57
|
type: "number",
|
|
58
|
-
...
|
|
58
|
+
...t(i, ["i18n", "required"])
|
|
59
59
|
},
|
|
60
60
|
uiSchema: {}
|
|
61
|
-
}),
|
|
61
|
+
}), g = (i) => ({
|
|
62
62
|
type: "singular",
|
|
63
63
|
default: i.default || "",
|
|
64
|
-
binding:
|
|
64
|
+
binding: e(i, "binding", !0),
|
|
65
65
|
i18n: i.i18n || !1,
|
|
66
66
|
required: i.required || !1,
|
|
67
67
|
dataType: "string",
|
|
68
68
|
schema: {
|
|
69
69
|
type: "string",
|
|
70
|
-
...
|
|
70
|
+
...t(i, ["i18n", "required", "options", "binding"]),
|
|
71
71
|
oneOf: i.options.map((n) => ({ const: n.value, title: n.title }))
|
|
72
72
|
},
|
|
73
73
|
uiSchema: {
|
|
@@ -77,11 +77,11 @@ const r = (i) => ({
|
|
|
77
77
|
type: "singular",
|
|
78
78
|
i18n: i.i18n || !1,
|
|
79
79
|
default: i.default || "",
|
|
80
|
-
binding:
|
|
80
|
+
binding: e(i, "binding", !0),
|
|
81
81
|
dataType: "string",
|
|
82
82
|
schema: {
|
|
83
83
|
type: "string",
|
|
84
|
-
...
|
|
84
|
+
...t(i, ["i18n", "required"])
|
|
85
85
|
},
|
|
86
86
|
uiSchema: {
|
|
87
87
|
"ui:widget": "color"
|
|
@@ -91,11 +91,11 @@ const y = (i) => ({
|
|
|
91
91
|
type: "singular",
|
|
92
92
|
default: i.default || "",
|
|
93
93
|
i18n: i.i18n || !1,
|
|
94
|
-
binding:
|
|
94
|
+
binding: e(i, "binding", !0),
|
|
95
95
|
dataType: "string",
|
|
96
96
|
schema: {
|
|
97
97
|
type: "string",
|
|
98
|
-
...
|
|
98
|
+
...t(i, ["i18n", "required"])
|
|
99
99
|
},
|
|
100
100
|
uiSchema: {
|
|
101
101
|
"ui:widget": "richtext"
|
|
@@ -105,12 +105,12 @@ const y = (i) => ({
|
|
|
105
105
|
title: i.title,
|
|
106
106
|
dataType: "object",
|
|
107
107
|
default: i.default || {},
|
|
108
|
-
binding:
|
|
108
|
+
binding: e(i, "binding", !0),
|
|
109
109
|
properties: i.properties
|
|
110
110
|
}), o = (i) => ({
|
|
111
111
|
type: "list",
|
|
112
112
|
itemProperties: i.itemProperties,
|
|
113
|
-
binding:
|
|
113
|
+
binding: e(i, "binding", !0),
|
|
114
114
|
title: i.title,
|
|
115
115
|
dataType: "array",
|
|
116
116
|
default: i.default || [],
|
|
@@ -118,10 +118,11 @@ const y = (i) => ({
|
|
|
118
118
|
}), c = (i) => ({
|
|
119
119
|
type: "styles",
|
|
120
120
|
binding: !1,
|
|
121
|
-
default: `${a},${i.default || ""}
|
|
121
|
+
default: `${a},${i.default || ""}`,
|
|
122
|
+
presets: i.presets || {}
|
|
122
123
|
}), b = (i) => ({
|
|
123
124
|
default: i.default || "",
|
|
124
|
-
binding:
|
|
125
|
+
binding: e(i, "binding", !0),
|
|
125
126
|
type: "singular",
|
|
126
127
|
i18n: i.i18n || !1,
|
|
127
128
|
dataType: "string",
|
|
@@ -136,7 +137,7 @@ const y = (i) => ({
|
|
|
136
137
|
}), f = (i) => ({
|
|
137
138
|
default: i.default,
|
|
138
139
|
type: "singular",
|
|
139
|
-
binding:
|
|
140
|
+
binding: e(i, "binding", !0),
|
|
140
141
|
dataType: "object",
|
|
141
142
|
i18n: i.i18n || !1,
|
|
142
143
|
schema: {
|
|
@@ -154,12 +155,12 @@ const y = (i) => ({
|
|
|
154
155
|
}), h = (i) => ({
|
|
155
156
|
type: "singular",
|
|
156
157
|
default: i.default || "",
|
|
157
|
-
binding:
|
|
158
|
+
binding: e(i, "binding", !0),
|
|
158
159
|
dataType: "string",
|
|
159
160
|
i18n: i.i18n || !1,
|
|
160
161
|
schema: {
|
|
161
162
|
type: "string",
|
|
162
|
-
...
|
|
163
|
+
...t(i, ["i18n", "required"])
|
|
163
164
|
},
|
|
164
165
|
uiSchema: {
|
|
165
166
|
"ui:widget": "image"
|
|
@@ -169,14 +170,14 @@ export {
|
|
|
169
170
|
c as S,
|
|
170
171
|
b as T,
|
|
171
172
|
m as b,
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
s as c,
|
|
174
|
+
p as f,
|
|
174
175
|
u as g,
|
|
175
176
|
o as h,
|
|
176
177
|
y as m,
|
|
177
178
|
h as o,
|
|
178
179
|
f as q,
|
|
179
180
|
l as r,
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
g as s,
|
|
182
|
+
r as u
|
|
182
183
|
};
|
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-9YNkdni8.cjs"),e=require("./index-9PHdn80L.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("jotai");require("flagged");require("react-dnd");require("lodash-es");require("@minoru/react-dnd-treeview");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@radix-ui/react-icons");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-9EwxLM8V.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.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");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.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;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.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>r.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
93
93
|
outlineMenuItems?: OutlineMenuItems;
|
|
94
94
|
getPages?: () => Promise<ChaiPage[]>;
|
|
95
95
|
unsplashAccessKey?: string;
|
|
96
|
+
_flags?: Record<string, boolean>;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
declare type ChaiPage = {
|
|
@@ -226,7 +227,6 @@ export declare const useDuplicateBlocks: () => Function;
|
|
|
226
227
|
export declare const useGetPageData: () => () => {
|
|
227
228
|
currentPage: unknown;
|
|
228
229
|
blocks: any;
|
|
229
|
-
globalBlocks: any;
|
|
230
230
|
};
|
|
231
231
|
|
|
232
232
|
export declare const useHiddenBlockIds: () => (string[] | ((args_0: string[] | ((prev: string[]) => string[])) => void) | ((blockId: string) => void))[];
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { K as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { C as J } from "./index-kAjyc_KA.js";
|
|
2
|
+
import { K as N, a9 as Q, L as V, aa as X, M as Y, a8 as _, E as $, F as j, h as ss, u as es, N as os, O as as, P as ts, Q as rs, R as is, U as ps, V as ls, t as ms, W as us, X as ds, Y as cs, Z as Bs, q as ks, J as ns, s as Cs, _ as Ss, z as Ps, a1 as gs, a0 as vs, $ as ys, r as As, a7 as hs, ab as Is, ac as Ms, a2 as Rs, a4 as Us, a3 as Ds, v as bs, a5 as fs, a6 as xs } from "./index-IPJAbzzO.js";
|
|
3
|
+
import { useTranslation as Ts } from "react-i18next";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -9,7 +9,6 @@ import "clsx";
|
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "@radix-ui/react-scroll-area";
|
|
11
11
|
import "@floating-ui/react-dom";
|
|
12
|
-
import "react-textarea-autosize";
|
|
13
12
|
import "jotai";
|
|
14
13
|
import "flagged";
|
|
15
14
|
import "react-dnd";
|
|
@@ -22,7 +21,6 @@ import "react-hotkeys-hook";
|
|
|
22
21
|
import "@chaibuilder/runtime";
|
|
23
22
|
import "@react-hookz/web";
|
|
24
23
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
25
|
-
import "flat-to-nested";
|
|
26
24
|
import "@radix-ui/react-toggle";
|
|
27
25
|
import "class-variance-authority";
|
|
28
26
|
import "./Class-3k8xjeiM.js";
|
|
@@ -45,48 +43,47 @@ import "cmdk";
|
|
|
45
43
|
import "@radix-ui/react-context-menu";
|
|
46
44
|
import "react-icons-picker";
|
|
47
45
|
import "react-quill";
|
|
48
|
-
import "lodash";
|
|
49
46
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
47
|
+
J as ChaiBuilderEditor,
|
|
48
|
+
N as useActiveModal,
|
|
49
|
+
Q as useActivePanel,
|
|
50
|
+
V as useAddBlock,
|
|
51
|
+
X as useAddBlockParent,
|
|
52
|
+
Y as useAddClassesToBlocks,
|
|
53
|
+
_ as useAllBlocks,
|
|
54
|
+
$ as useBlocksStore,
|
|
55
|
+
j as useBrandingOptions,
|
|
56
|
+
ss as useBuilderProp,
|
|
57
|
+
es as useBuilderReset,
|
|
58
|
+
os as useCanvasWidth,
|
|
59
|
+
as as useCanvasZoom,
|
|
60
|
+
ts as useCopyBlockIds,
|
|
61
|
+
rs as useCopyToClipboard,
|
|
62
|
+
is as useCurrentPage,
|
|
63
|
+
ps as useCutBlockIds,
|
|
64
|
+
ls as useDarkMode,
|
|
65
|
+
ms as useDuplicateBlocks,
|
|
66
|
+
us as useGetPageData,
|
|
67
|
+
ds as useHiddenBlockIds,
|
|
68
|
+
cs as useHighlightBlockId,
|
|
69
|
+
Bs as usePasteBlocks,
|
|
70
|
+
ks as usePreviewMode,
|
|
71
|
+
ns as useReadOnlyMode,
|
|
72
|
+
Cs as useRemoveBlocks,
|
|
73
|
+
Ss as useRemoveClassesFromBlocks,
|
|
74
|
+
Ps as useSavePage,
|
|
75
|
+
gs as useSelectedBlock,
|
|
76
|
+
vs as useSelectedBlockAllClasses,
|
|
77
|
+
ys as useSelectedBlockCurrentClasses,
|
|
78
|
+
As as useSelectedBlockIds,
|
|
79
|
+
hs as useSelectedBlocksDisplayChild,
|
|
80
|
+
Is as useSelectedBreakpoints,
|
|
81
|
+
Ms as useSelectedStylingBlocks,
|
|
82
|
+
Rs as useStylingBreakpoint,
|
|
83
|
+
Us as useStylingState,
|
|
84
|
+
Ts as useTranslation,
|
|
85
|
+
Ds as useUILibraryBlocks,
|
|
86
|
+
bs as useUndoManager,
|
|
87
|
+
fs as useUpdateBlocksProps,
|
|
88
|
+
xs as useUpdateBlocksPropsRealtime
|
|
92
89
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-9PHdn80L.cjs"),l=require("./index-PlZjGTTr.cjs"),q=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.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-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-i18next");require("./index-9YNkdni8.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-FGufPv9R.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=({pageData:i,projectData:t})=>{const n={},u=l.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(q.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { h } from "./index-
|
|
2
|
+
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-IPJAbzzO.js";
|
|
3
|
+
import { h } from "./index-iQEapw2W.js";
|
|
4
4
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "react";
|
|
@@ -12,7 +12,6 @@ import "@chaibuilder/runtime";
|
|
|
12
12
|
import "jotai";
|
|
13
13
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
14
14
|
import "@react-hookz/web";
|
|
15
|
-
import "flat-to-nested";
|
|
16
15
|
import "@radix-ui/react-toggle";
|
|
17
16
|
import "class-variance-authority";
|
|
18
17
|
import "./Class-3k8xjeiM.js";
|
|
@@ -37,12 +36,10 @@ import "@radix-ui/react-context-menu";
|
|
|
37
36
|
import "react-icons-picker";
|
|
38
37
|
import "react-dom";
|
|
39
38
|
import "react-quill";
|
|
40
|
-
import "lodash";
|
|
41
39
|
import "react-i18next";
|
|
42
|
-
import "./index-
|
|
40
|
+
import "./index-kAjyc_KA.js";
|
|
43
41
|
import "i18next";
|
|
44
42
|
import "@floating-ui/react-dom";
|
|
45
|
-
import "react-textarea-autosize";
|
|
46
43
|
import "flagged";
|
|
47
44
|
import "react-dnd";
|
|
48
45
|
import "@minoru/react-dnd-treeview";
|
|
@@ -52,15 +49,15 @@ import "./html-to-json-C5sExaSD.js";
|
|
|
52
49
|
import "himalaya";
|
|
53
50
|
import "lucide-react";
|
|
54
51
|
import "./index-YpnaudSM.js";
|
|
55
|
-
const
|
|
56
|
-
const m = {}, t = h(), o = r.uuid === i.homepage,
|
|
52
|
+
const ue = ({ pageData: r, projectData: i }) => {
|
|
53
|
+
const m = {}, t = h(), o = r.uuid === i.homepage, s = () => {
|
|
57
54
|
t.mutate(r, {
|
|
58
55
|
onSuccess: () => {
|
|
59
56
|
m({ uuid: i.homepage, slug: "/home" });
|
|
60
57
|
}
|
|
61
58
|
});
|
|
62
59
|
};
|
|
63
|
-
return /* @__PURE__ */ e.jsxs(
|
|
60
|
+
return /* @__PURE__ */ e.jsxs(p, { children: [
|
|
64
61
|
/* @__PURE__ */ e.jsx(l, { disabled: o, children: /* @__PURE__ */ e.jsx(
|
|
65
62
|
"div",
|
|
66
63
|
{
|
|
@@ -77,11 +74,11 @@ const ge = ({ pageData: r, projectData: i }) => {
|
|
|
77
74
|
/* @__PURE__ */ e.jsx(a, { children: "This action cannot be undone. This will permanently delete your page." }),
|
|
78
75
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
|
|
79
76
|
/* @__PURE__ */ e.jsx(c, { disabled: t.isPending, children: "Cancel" }),
|
|
80
|
-
/* @__PURE__ */ e.jsx(u, { variant: "destructive", onClick:
|
|
77
|
+
/* @__PURE__ */ e.jsx(u, { variant: "destructive", onClick: s, disabled: t.isPending, children: "Yes, Delete" })
|
|
81
78
|
] })
|
|
82
79
|
] })
|
|
83
80
|
] });
|
|
84
81
|
};
|
|
85
82
|
export {
|
|
86
|
-
|
|
83
|
+
ue as default
|
|
87
84
|
};
|
package/dist/email-blocks.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-es"),i=require("./jsx-runtime-Z_BpKhVy.cjs"),c=require("@react-email/components"),s=require("@chaibuilder/runtime"),d=require("./empty-slot-nzYOgZuS.cjs"),l=require("./controls-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-es"),i=require("./jsx-runtime-Z_BpKhVy.cjs"),c=require("@react-email/components"),s=require("@chaibuilder/runtime"),d=require("./empty-slot-nzYOgZuS.cjs"),l=require("./controls-KK2oLIa8.cjs"),a=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");const m=({blockProps:e,styles:t,children:o,inBuilder:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{},inBuilder:r})),i.jsxRuntimeExports.jsx(c.Container,{...e,...t,children:n})};s.registerChaiBlock(m,{type:"Email/Container",label:"Container",group:"basic",category:"core",canAcceptBlock:()=>!0,canMove:()=>!0,canDelete:()=>!1,canDuplicate:()=>!1,canBeNested:e=>!e});const x=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(c.Section,{...e,...t,children:o});s.registerChaiBlock(x,{type:"Email/Section",label:"Section",group:"basic",category:"core",icon:a.ImageIcon,props:{align:l.s({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})=>i.jsxRuntimeExports.jsx(c.Row,{...e,...t,children:o});s.registerChaiBlock(g,{type:"Email/Row",label:"Row",group:"basic",category:"core",icon:a.ImageIcon,blocks:[{_type:"Email/Row",_id:"a"},{_type:"Email/Column",_id:"b",_parent:"a"}],props:{styles:l.S({default:""})},canAcceptBlock:e=>e==="Email/Column"});const h=({blockProps:e,styles:t,children:o,align:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{}})),i.jsxRuntimeExports.jsx(c.Column,{...e,...t,align:r,children:n})};s.registerChaiBlock(h,{type:"Email/Column",label:"Column",group:"basic",category:"core",icon:a.ImageIcon,props:{styles:l.S({default:""}),align:l.s({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0,canBeNested:e=>e==="Email/Row"});const k=({level:e,blockProps:t,styles:o,content:r})=>i.jsxRuntimeExports.jsx(c.Heading,{as:e,...t,...o,children:r}),b=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("h1",{...e,...t,children:o});s.registerChaiBlock(k,{type:"Email/Heading",label:"Heading",group:"basic",category:"core",icon:a.HeadingIcon,builderComponent:b,props:{content:l.u({title:"Content",default:"Enter your heading here..."}),styles:l.S({default:"text-xl"}),level:l.s({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=>["Email/Link","Email/RawText"].includes(e)});const B=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx(c.Text,{...e,...t,children:o}),C=({content:e,blockProps:t,styles:o})=>i.jsxRuntimeExports.jsx("p",{...t,...o,children:e});s.registerChaiBlock(B,{type:"Email/Text",label:"Text",group:"basic",category:"core",icon:a.TextIcon,builderComponent:C,props:{content:l.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:l.S({default:""})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const j=({content:e})=>e,y=({content:e,blockProps:t})=>i.jsxRuntimeExports.jsx("span",{...t,children:e});s.registerChaiBlock(j,{type:"Email/RawText",label:"Raw Text",group:"basic",category:"core",icon:a.TextIcon,hidden:!0,builderComponent:y,props:{content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "})}});const E=({blockProps:e,styles:t,link:o,content:r})=>i.jsxRuntimeExports.jsx(c.Button,{...e,...t,href:o.href,children:r}),f=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("button",{type:"button",...e,...t,children:o});s.registerChaiBlock(E,{type:"Email/Button",label:"Button",group:"basic",category:"core",builderComponent:f,props:{content:l.u({title:"Content",default:"Click me"}),link:l.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"bg-primary text-white px-4 py-2 rounded-md"})}});const R=({blockProps:e,styles:t,href:o,content:r,target:n,children:u})=>i.jsxRuntimeExports.jsx(c.Link,{...e,...t,href:o,target:n,children:u||r}),v=({blockProps:e,styles:t,content:o,children:r})=>{let n=r;return r||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{}})),i.jsxRuntimeExports.jsx("span",{...e,...t,children:n||o})};s.registerChaiBlock(R,{type:"Link",label:"Link",group:"basic",category:"core",icon:a.Link1Icon,blocks:[{_id:"a",_type:"Link"},{_id:"b",_parent:"a",_type:"RawText",content:"I am a link."}],builderComponent:v,props:{content:l.u({title:"Content",default:"I am a link."}),link:l.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"font-bold text-blue-500"})},canAcceptBlock:()=>!0});const w=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(c.Preview,{...e,...t,children:o}),I=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:o});s.registerChaiBlock(w,{type:"Email/Preview",label:"Preview",group:"basic",category:"core",builderComponent:I,canAcceptBlock:()=>!0,canDuplicate:()=>!1,props:{content:l.g({default:"Preview content",title:"Content"})}});const S=({blockProps:e,content:t})=>i.jsxRuntimeExports.jsx(c.Markdown,{children:t,...e});s.registerChaiBlock(S,{type:"Email/Markdown",label:"Markdown",group:"basic",category:"core",props:{content:l.g({default:"# This is a ~~strikethrough~~",title:"Markdown"})}});const L=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx(c.Img,{...e,...t,src:r,alt:o,width:n,height:u}),T=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx("img",{...e,...t,src:r,alt:o,width:n,height:u});s.registerChaiBlock(L,{type:"Email/Image",label:"Image",group:"basic",category:"core",icon:a.ImageIcon,builderComponent:T,props:{styles:l.S({default:"w-full"}),image:l.o({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.u({title:"Alt",default:""}),width:l.u({title:"Width",default:""}),height:l.u({title:"Height",default:""})}});const q=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx(c.Hr,{...e,...t}),H=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx("hr",{...e,...t});s.registerChaiBlock(q,{type:"Email/Divider",label:"Divider",group:"basic",category:"core",icon:a.DividerHorizontalIcon,builderComponent:H,props:{styles:l.S({default:"w-full h-2"})}});const _=({blockProps:e,styles:t,code:o,lineNumbers:r,theme:n,language:u})=>i.jsxRuntimeExports.jsx(c.CodeBlock,{...e,...t,code:o,linenumbers:r,theme:n,language:u}),A=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:i.jsxRuntimeExports.jsx("code",{children:o})});s.registerChaiBlock(_,{type:"Email/CodeBlock",label:"Code Block",group:"basic",category:"core",hidden:!0,icon:a.CodeSandboxLogoIcon,builderComponent:A,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"}),theme:l.u({title:"Theme",default:"dracula"}),lineNumbers:l.r({title:"Line number",default:!1}),language:l.s({title:"Language",default:"javascript",binding:!1,options:[{value:"javascript",title:"JavaScript"},{value:"html",title:"HTML"},{value:"css",title:"CSS"}]})}});const P=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx(c.CodeInline,{...e,...t,children:o}),D=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("code",{...e,...t,children:o});s.registerChaiBlock(P,{type:"Email/CodeInline",label:"Code Inline",group:"basic",category:"core",icon:a.CodeSandboxLogoIcon,builderComponent:D,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"})}});const M=p.noop;exports.loadEmailBlocks=M;
|
package/dist/email-blocks.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { noop as
|
|
1
|
+
import { noop as k } from "lodash-es";
|
|
2
2
|
import { j as o } from "./jsx-runtime-WbnYoNE9.js";
|
|
3
|
-
import { Container as
|
|
3
|
+
import { Container as f, Section as y, Row as x, Column as B, Heading as C, Text as v, Button as j, Link as w, Preview as E, Markdown as I, Img as L, Hr as T, CodeBlock as H, CodeInline as R } from "@react-email/components";
|
|
4
4
|
import { registerChaiBlock as r } from "@chaibuilder/runtime";
|
|
5
5
|
import { E as m } from "./empty-slot-ZBlsQi6m.js";
|
|
6
|
-
import {
|
|
6
|
+
import { s as d, S as a, u as s, g as u, q as g, o as _, r as A } from "./controls-OfJWSEqC.js";
|
|
7
7
|
import { ImageIcon as p, HeadingIcon as S, TextIcon as h, Link1Icon as P, DividerHorizontalIcon as D, CodeSandboxLogoIcon as b } from "@radix-ui/react-icons";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "react";
|
|
@@ -12,7 +12,7 @@ import "clsx";
|
|
|
12
12
|
import "tailwind-merge";
|
|
13
13
|
const M = ({ blockProps: e, styles: t, children: l, inBuilder: i }) => {
|
|
14
14
|
let n = l;
|
|
15
|
-
return l || (n = /* @__PURE__ */ o.jsx(m, { blockProps: {}, styles: {}, inBuilder: i })), /* @__PURE__ */ o.jsx(
|
|
15
|
+
return l || (n = /* @__PURE__ */ o.jsx(m, { blockProps: {}, styles: {}, inBuilder: i })), /* @__PURE__ */ o.jsx(f, { ...e, ...t, children: n });
|
|
16
16
|
};
|
|
17
17
|
r(M, {
|
|
18
18
|
type: "Email/Container",
|
|
@@ -288,7 +288,7 @@ r(re, {
|
|
|
288
288
|
code: u({ title: "Code", default: "console.log('Hello, world!');" })
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
|
-
const xe =
|
|
291
|
+
const xe = k;
|
|
292
292
|
export {
|
|
293
293
|
xe as loadEmailBlocks
|
|
294
294
|
};
|
package/dist/email.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),t=require("./index-9YNkdni8.cjs"),r=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("i18next");require("react-i18next");require("./index-9PHdn80L.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.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-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("@floating-ui/react-dom");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");const q=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],n=i=>{const u={...i,importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:q};return e.jsxRuntimeExports.jsx(t.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=n;
|
package/dist/email.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ declare interface ChaiBuilderEditorProps {
|
|
|
78
78
|
outlineMenuItems?: OutlineMenuItems;
|
|
79
79
|
getPages?: () => Promise<ChaiPage[]>;
|
|
80
80
|
unsplashAccessKey?: string;
|
|
81
|
+
_flags?: Record<string, boolean>;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
export declare const ChaiBuilderEmail: (props: ChaiBuilderEditorProps) => JSX_2.Element;
|
package/dist/email.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as m } from "./index-
|
|
2
|
+
import { C as m } from "./index-kAjyc_KA.js";
|
|
3
3
|
import { MobileIcon as i } from "@radix-ui/react-icons";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
8
|
+
import "./index-IPJAbzzO.js";
|
|
9
9
|
import "lodash-es";
|
|
10
10
|
import "./Functions-7jnEwJyw.js";
|
|
11
11
|
import "clsx";
|
|
@@ -14,7 +14,6 @@ import "@chaibuilder/runtime";
|
|
|
14
14
|
import "jotai";
|
|
15
15
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
16
16
|
import "@react-hookz/web";
|
|
17
|
-
import "flat-to-nested";
|
|
18
17
|
import "@radix-ui/react-toggle";
|
|
19
18
|
import "class-variance-authority";
|
|
20
19
|
import "./Class-3k8xjeiM.js";
|
|
@@ -39,9 +38,7 @@ import "@radix-ui/react-context-menu";
|
|
|
39
38
|
import "react-icons-picker";
|
|
40
39
|
import "react-dom";
|
|
41
40
|
import "react-quill";
|
|
42
|
-
import "lodash";
|
|
43
41
|
import "@floating-ui/react-dom";
|
|
44
|
-
import "react-textarea-autosize";
|
|
45
42
|
import "flagged";
|
|
46
43
|
import "react-dnd";
|
|
47
44
|
import "@minoru/react-dnd-treeview";
|
|
@@ -61,7 +58,7 @@ const p = [
|
|
|
61
58
|
icon: /* @__PURE__ */ t.jsx(i, { className: "rotate-90" }),
|
|
62
59
|
width: 700
|
|
63
60
|
}
|
|
64
|
-
],
|
|
61
|
+
], Z = (o) => {
|
|
65
62
|
const r = {
|
|
66
63
|
...o,
|
|
67
64
|
importHTMLSupport: !1,
|
|
@@ -71,5 +68,5 @@ const p = [
|
|
|
71
68
|
return /* @__PURE__ */ t.jsx(m, { ...r });
|
|
72
69
|
};
|
|
73
70
|
export {
|
|
74
|
-
|
|
71
|
+
Z as ChaiBuilderEmail
|
|
75
72
|
};
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import b from "@rjsf/core";
|
|
3
3
|
import x from "@rjsf/validator-ajv8";
|
|
4
4
|
import { includes as h, get as a, set as $, first as F } from "lodash-es";
|
|
5
|
-
import { b5 as P, b6 as E, b7 as O, b8 as S } from "./index-
|
|
5
|
+
import { b5 as P, b6 as E, b7 as O, b8 as S } from "./index-IPJAbzzO.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./index-
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./index-9PHdn80L.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|