@chaibuilder/sdk 1.2.65 → 1.2.67
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-TVOOPK2w.cjs +1 -0
- package/dist/AddBlocks-mbuhydG3.js +123 -0
- package/dist/CanvasArea-KJMcis97.cjs +1 -0
- package/dist/CanvasArea-kg3Rgg9t.js +136 -0
- package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
- package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
- package/dist/SettingsPanel-pomLrOxB.js +81 -0
- package/dist/SidePanels-9sbERNEv.cjs +1 -0
- package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
- package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
- package/dist/Topbar-veJ2_blW.cjs +1 -0
- package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
- package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
- package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
- package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
- package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
- package/dist/UploadImages-xhxeYKkl.cjs +1 -0
- package/dist/badge-7BVT3zxN.cjs +1 -0
- package/dist/badge-pJqQSA13.js +23 -0
- package/dist/context-menu-_8TFbFEJ.cjs +1 -0
- package/dist/context-menu-sks9vdzC.js +906 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +45 -20
- package/dist/core.js +85 -87
- package/dist/iconBase-vJD0OXxU.cjs +1 -0
- package/dist/iconBase-zweRWSz0.js +323 -0
- package/dist/index-5hfuDpYs.cjs +223 -0
- package/dist/index-Zu-K_BX7.js +33933 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/plugin-P0tpo_XZ.cjs +1 -0
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/plugin-f5uJtdXY.js +43 -0
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +3 -1
- package/dist/render.d.ts +19 -52
- package/dist/render.js +136 -183
- package/dist/select-JW3OMYm-.js +75 -0
- package/dist/select-fXj5tdMX.cjs +1 -0
- package/dist/separator-hT24N-xp.cjs +1 -0
- package/dist/separator-sgwOa1FE.js +18 -0
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +41 -1
- package/dist/tailwind.js +16 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +0 -10
- package/dist/ui.js +345 -163
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +1 -1
- package/dist/web-blocks.js +489 -724
- package/package.json +15 -45
- package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
- package/dist/CanvasArea-ut5yknzX.js +0 -168
- package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
- package/dist/CurrentPage-jHSVy3hq.js +0 -120
- package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/MODIFIERS-fd5XOmum.js +0 -60
- package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
- package/dist/PagesPanel-U3InJ9Db.js +0 -78
- package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
- package/dist/ProjectPanel-XODJTO4J.js +0 -99
- package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
- package/dist/SidePanels-lrMQqc0h.cjs +0 -1
- package/dist/Topbar-RrCDxd0i.cjs +0 -1
- package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
- package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
- package/dist/UploadImages-3h0cRsvr.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
- package/dist/add-page-modal-TOfMfmPA.js +0 -115
- package/dist/confirm-alert-eIp2cAkc.js +0 -60
- package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
- package/dist/controls-rRZhz0vu.cjs +0 -1
- package/dist/controls-yjgoZzB6.js +0 -199
- package/dist/delete-page-modal-4bxjpVBD.js +0 -97
- package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
- package/dist/email-blocks.cjs +0 -1
- package/dist/email-blocks.d.ts +0 -3
- package/dist/email-blocks.js +0 -294
- package/dist/email.cjs +0 -1
- package/dist/email.d.ts +0 -171
- package/dist/email.js +0 -90
- package/dist/empty-slot-Lsxjts7Q.js +0 -6
- package/dist/empty-slot-Sy930lX6.cjs +0 -1
- package/dist/form-4jTocVbZ.cjs +0 -1
- package/dist/form-NAzFjGs0.js +0 -125
- package/dist/functions--tdNWQDW.js +0 -30
- package/dist/functions-EVUeSwX1.cjs +0 -1
- package/dist/html-to-json-NqRjgFqp.cjs +0 -1
- package/dist/html-to-json-l_mw5y-e.js +0 -243
- package/dist/index--k2M8kzI.cjs +0 -1
- package/dist/index--mLLy7QQ.cjs +0 -1
- package/dist/index-5XyNUAjc.cjs +0 -290
- package/dist/index-C7mB4XFm.js +0 -3141
- package/dist/index-VBXQixVm.js +0 -117
- package/dist/index-YZhtVcj_.js +0 -2201
- package/dist/index-aeDphKpP.cjs +0 -1
- package/dist/index-lFgDm1oa.js +0 -83780
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/lib.cjs +0 -3
- package/dist/lib.d.ts +0 -80
- package/dist/lib.js +0 -1350
- package/dist/page-viewer-4wrnWnK0.js +0 -124
- package/dist/page-viewer-ra0GLx1p.cjs +0 -1
- package/dist/project-general-setting-IwZUkYF3.js +0 -90
- package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
- package/dist/project-seo-setting-e1fTqVsd.js +0 -83
- package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
- package/dist/server.cjs +0 -1
- package/dist/server.d.ts +0 -299
- package/dist/server.js +0 -216
- package/dist/single-page-detail-ZNWFKqLW.js +0 -229
- package/dist/single-page-detail-g55Anu7R.cjs +0 -1
- package/dist/studio.cjs +0 -1
- package/dist/studio.d.ts +0 -176
- package/dist/studio.js +0 -67
- package/dist/utils-D_vtk3zK.cjs +0 -1
- package/dist/utils-VpVqnC9m.js +0 -1075
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { get as t, omit as e } from "lodash-es";
|
|
2
|
-
const n = "#styles:", r = (i) => ({
|
|
3
|
-
type: "singular",
|
|
4
|
-
default: i.default || "",
|
|
5
|
-
binding: t(i, "binding", !0),
|
|
6
|
-
dataType: "string",
|
|
7
|
-
schema: {
|
|
8
|
-
type: "string",
|
|
9
|
-
...e(i, ["i18n", "required"])
|
|
10
|
-
},
|
|
11
|
-
uiSchema: {
|
|
12
|
-
"ui:widget": "code"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
const u = (i) => ({
|
|
16
|
-
type: "singular",
|
|
17
|
-
default: i.default || "",
|
|
18
|
-
binding: t(i, "binding", !0),
|
|
19
|
-
dataType: "string",
|
|
20
|
-
required: i.required || !1,
|
|
21
|
-
ai: i.ai || void 0,
|
|
22
|
-
schema: {
|
|
23
|
-
type: "string",
|
|
24
|
-
...e(i, ["ai", "required"])
|
|
25
|
-
},
|
|
26
|
-
uiSchema: {
|
|
27
|
-
"ui:placeholder": i.placeholder || "Enter here"
|
|
28
|
-
}
|
|
29
|
-
}), l = (i) => ({
|
|
30
|
-
type: "singular",
|
|
31
|
-
default: i.default || "",
|
|
32
|
-
binding: t(i, "binding", !0),
|
|
33
|
-
dataType: "string",
|
|
34
|
-
required: i.required || !1,
|
|
35
|
-
ai: i.ai || void 0,
|
|
36
|
-
schema: {
|
|
37
|
-
type: "string",
|
|
38
|
-
...e(i, ["i18n", "required", "rows"])
|
|
39
|
-
},
|
|
40
|
-
uiSchema: {
|
|
41
|
-
"ui:widget": "textarea",
|
|
42
|
-
"ui:placeholder": i.placeholder || "Enter here",
|
|
43
|
-
"ui:options": {
|
|
44
|
-
rows: i.rows || 4
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}), g = (i) => ({
|
|
48
|
-
type: "singular",
|
|
49
|
-
i18n: i.i18n || !1,
|
|
50
|
-
default: i.default || !1,
|
|
51
|
-
dataType: "boolean",
|
|
52
|
-
binding: t(i, "binding", !0),
|
|
53
|
-
ai: i.ai || void 0,
|
|
54
|
-
schema: {
|
|
55
|
-
type: "boolean",
|
|
56
|
-
...e(i, ["i18n", "required"])
|
|
57
|
-
},
|
|
58
|
-
uiSchema: {
|
|
59
|
-
"ui:title": i.title || "Select Item",
|
|
60
|
-
"ui:description": ""
|
|
61
|
-
}
|
|
62
|
-
}), s = (i) => ({
|
|
63
|
-
type: "singular",
|
|
64
|
-
default: i.default || "",
|
|
65
|
-
binding: t(i, "binding", !0),
|
|
66
|
-
dataType: "number",
|
|
67
|
-
required: i.required || !1,
|
|
68
|
-
ai: i.ai || void 0,
|
|
69
|
-
schema: {
|
|
70
|
-
type: "number",
|
|
71
|
-
...e(i, ["i18n", "required"])
|
|
72
|
-
},
|
|
73
|
-
uiSchema: {}
|
|
74
|
-
}), p = (i) => ({
|
|
75
|
-
type: "singular",
|
|
76
|
-
default: i.default || "",
|
|
77
|
-
binding: t(i, "binding", !0),
|
|
78
|
-
required: i.required || !1,
|
|
79
|
-
dataType: "string",
|
|
80
|
-
ai: i.ai || void 0,
|
|
81
|
-
schema: {
|
|
82
|
-
type: "string",
|
|
83
|
-
...e(i, ["i18n", "required", "options", "binding"]),
|
|
84
|
-
oneOf: i.options.map((a) => ({ const: a.value, title: a.title }))
|
|
85
|
-
},
|
|
86
|
-
uiSchema: {
|
|
87
|
-
"ui:widget": "select"
|
|
88
|
-
}
|
|
89
|
-
}), y = (i) => ({
|
|
90
|
-
type: "singular",
|
|
91
|
-
i18n: i.i18n || !1,
|
|
92
|
-
default: i.default || "",
|
|
93
|
-
binding: t(i, "binding", !0),
|
|
94
|
-
dataType: "string",
|
|
95
|
-
ai: i.ai || void 0,
|
|
96
|
-
schema: {
|
|
97
|
-
type: "string",
|
|
98
|
-
...e(i, ["i18n", "required"])
|
|
99
|
-
},
|
|
100
|
-
uiSchema: {
|
|
101
|
-
"ui:widget": "color"
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const o = (i) => ({
|
|
105
|
-
type: "singular",
|
|
106
|
-
default: i.default || "",
|
|
107
|
-
binding: t(i, "binding", !0),
|
|
108
|
-
dataType: "string",
|
|
109
|
-
ai: i.ai || void 0,
|
|
110
|
-
schema: {
|
|
111
|
-
type: "string",
|
|
112
|
-
...e(i, ["i18n", "required"])
|
|
113
|
-
},
|
|
114
|
-
uiSchema: {
|
|
115
|
-
"ui:widget": "richtext"
|
|
116
|
-
}
|
|
117
|
-
}), c = (i) => ({
|
|
118
|
-
type: "model",
|
|
119
|
-
title: i.title,
|
|
120
|
-
dataType: "object",
|
|
121
|
-
default: i.default || {},
|
|
122
|
-
binding: t(i, "binding", !0),
|
|
123
|
-
properties: i.properties
|
|
124
|
-
}), m = (i) => ({
|
|
125
|
-
type: "list",
|
|
126
|
-
itemProperties: i.itemProperties,
|
|
127
|
-
binding: t(i, "binding", !0),
|
|
128
|
-
title: i.title,
|
|
129
|
-
ai: i.ai || void 0,
|
|
130
|
-
dataType: "array",
|
|
131
|
-
default: i.default || [],
|
|
132
|
-
itemTitle: i.getItemLabel ? i.getItemLabel({}) : () => ""
|
|
133
|
-
}), b = (i) => ({
|
|
134
|
-
type: "styles",
|
|
135
|
-
binding: !1,
|
|
136
|
-
default: `${n},${i.default || ""}`,
|
|
137
|
-
presets: i.presets || {}
|
|
138
|
-
}), f = (i) => ({
|
|
139
|
-
default: i.default || "",
|
|
140
|
-
binding: t(i, "binding", !0),
|
|
141
|
-
type: "singular",
|
|
142
|
-
dataType: "string",
|
|
143
|
-
ai: i.ai || void 0,
|
|
144
|
-
schema: {
|
|
145
|
-
type: "string",
|
|
146
|
-
title: "Icon",
|
|
147
|
-
default: i.default || ""
|
|
148
|
-
},
|
|
149
|
-
uiSchema: {
|
|
150
|
-
"ui:widget": "icon"
|
|
151
|
-
}
|
|
152
|
-
}), h = (i) => ({
|
|
153
|
-
default: i.default,
|
|
154
|
-
type: "singular",
|
|
155
|
-
binding: t(i, "binding", !0),
|
|
156
|
-
dataType: "object",
|
|
157
|
-
ai: i.ai || void 0,
|
|
158
|
-
schema: {
|
|
159
|
-
type: "object",
|
|
160
|
-
...i || {},
|
|
161
|
-
properties: {
|
|
162
|
-
type: { type: "string" },
|
|
163
|
-
href: { type: "string" },
|
|
164
|
-
target: { type: "string" }
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
uiSchema: {
|
|
168
|
-
"ui:field": "link"
|
|
169
|
-
}
|
|
170
|
-
}), q = (i) => ({
|
|
171
|
-
type: "singular",
|
|
172
|
-
default: i.default || "",
|
|
173
|
-
binding: t(i, "binding", !0),
|
|
174
|
-
dataType: "string",
|
|
175
|
-
ai: i.ai || void 0,
|
|
176
|
-
schema: {
|
|
177
|
-
type: "string",
|
|
178
|
-
...e(i, ["i18n", "required"])
|
|
179
|
-
},
|
|
180
|
-
uiSchema: {
|
|
181
|
-
"ui:widget": "image"
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
export {
|
|
185
|
-
m as S,
|
|
186
|
-
f as T,
|
|
187
|
-
o as b,
|
|
188
|
-
g as c,
|
|
189
|
-
p as f,
|
|
190
|
-
u as g,
|
|
191
|
-
c as h,
|
|
192
|
-
b as o,
|
|
193
|
-
h as q,
|
|
194
|
-
l as r,
|
|
195
|
-
y as s,
|
|
196
|
-
r as u,
|
|
197
|
-
q as v,
|
|
198
|
-
s as y
|
|
199
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as s, a as l, b as n, d, e as a, g as c, B as u } from "./index-C7mB4XFm.js";
|
|
3
|
-
import { h } from "./index-YZhtVcj_.js";
|
|
4
|
-
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "@radix-ui/react-toggle";
|
|
8
|
-
import "class-variance-authority";
|
|
9
|
-
import "./utils-VpVqnC9m.js";
|
|
10
|
-
import "lodash-es";
|
|
11
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
12
|
-
import "clsx";
|
|
13
|
-
import "tailwind-merge";
|
|
14
|
-
import "@radix-ui/react-switch";
|
|
15
|
-
import "@radix-ui/react-slot";
|
|
16
|
-
import "@radix-ui/react-accordion";
|
|
17
|
-
import "@radix-ui/react-alert-dialog";
|
|
18
|
-
import "@radix-ui/react-dialog";
|
|
19
|
-
import "@radix-ui/react-label";
|
|
20
|
-
import "@radix-ui/react-scroll-area";
|
|
21
|
-
import "@radix-ui/react-tabs";
|
|
22
|
-
import "@radix-ui/react-tooltip";
|
|
23
|
-
import "@radix-ui/react-popover";
|
|
24
|
-
import "@radix-ui/react-menubar";
|
|
25
|
-
import "@radix-ui/react-hover-card";
|
|
26
|
-
import "@radix-ui/react-select";
|
|
27
|
-
import "@radix-ui/react-dropdown-menu";
|
|
28
|
-
import "@radix-ui/react-separator";
|
|
29
|
-
import "@radix-ui/react-toast";
|
|
30
|
-
import "cmdk";
|
|
31
|
-
import "@radix-ui/react-context-menu";
|
|
32
|
-
import "react-icons-picker";
|
|
33
|
-
import "react-dom";
|
|
34
|
-
import "react-quill";
|
|
35
|
-
import "./Functions-7jnEwJyw.js";
|
|
36
|
-
import "@chaibuilder/runtime";
|
|
37
|
-
import "jotai";
|
|
38
|
-
import "@react-hookz/web";
|
|
39
|
-
import "tree-model";
|
|
40
|
-
import "react-i18next";
|
|
41
|
-
import "./index-lFgDm1oa.js";
|
|
42
|
-
import "i18next";
|
|
43
|
-
import "react-arborist";
|
|
44
|
-
import "lucide-react";
|
|
45
|
-
import "./index-VBXQixVm.js";
|
|
46
|
-
import "prop-types";
|
|
47
|
-
import "react-hotkeys-hook";
|
|
48
|
-
import "@floating-ui/dom";
|
|
49
|
-
import "@floating-ui/react-dom";
|
|
50
|
-
import "flagged";
|
|
51
|
-
import "@tailwindcss/typography";
|
|
52
|
-
import "@tailwindcss/forms";
|
|
53
|
-
import "@tailwindcss/aspect-ratio";
|
|
54
|
-
import "tailwindcss-palette-generator";
|
|
55
|
-
import "./html-to-json-l_mw5y-e.js";
|
|
56
|
-
import "himalaya";
|
|
57
|
-
import "lodash";
|
|
58
|
-
import "react-wrap-balancer";
|
|
59
|
-
import "@rjsf/core";
|
|
60
|
-
import "@rjsf/validator-ajv8";
|
|
61
|
-
import "react-autosuggest";
|
|
62
|
-
import "fuse.js";
|
|
63
|
-
import "./controls-yjgoZzB6.js";
|
|
64
|
-
import "sonner";
|
|
65
|
-
const Tr = ({ pageData: t, projectData: i }) => {
|
|
66
|
-
const m = {}, e = h(), o = t.uuid === i.homepage, p = () => {
|
|
67
|
-
e.mutate(t, {
|
|
68
|
-
onSuccess: () => {
|
|
69
|
-
m({ uuid: i.homepage, slug: "/home" });
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
return /* @__PURE__ */ r.jsxs(s, { children: [
|
|
74
|
-
/* @__PURE__ */ r.jsx(l, { disabled: o, children: /* @__PURE__ */ r.jsx(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
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"}`,
|
|
78
|
-
children: /* @__PURE__ */ r.jsx(x, {})
|
|
79
|
-
}
|
|
80
|
-
) }),
|
|
81
|
-
/* @__PURE__ */ r.jsxs(n, { children: [
|
|
82
|
-
/* @__PURE__ */ r.jsxs(d, { children: [
|
|
83
|
-
"Are you sure you want to delete ",
|
|
84
|
-
/* @__PURE__ */ r.jsx("i", { className: "text-red-500", children: t.name }),
|
|
85
|
-
" page?"
|
|
86
|
-
] }),
|
|
87
|
-
/* @__PURE__ */ r.jsx(a, { children: "This action cannot be undone. This will permanently delete your page." }),
|
|
88
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
|
|
89
|
-
/* @__PURE__ */ r.jsx(c, { disabled: e.isPending, children: "Cancel" }),
|
|
90
|
-
/* @__PURE__ */ r.jsx(u, { variant: "destructive", onClick: p, disabled: e.isPending, children: "Yes, Delete" })
|
|
91
|
-
] })
|
|
92
|
-
] })
|
|
93
|
-
] });
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
Tr as default
|
|
97
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-aeDphKpP.cjs"),o=require("./index--k2M8kzI.cjs"),l=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("./index-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");require("sonner");const d=({pageData:i,projectData:t})=>{const n={},u=o.useDeletePage(),s=i.uuid===t.homepage,q=()=>{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:q,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
package/dist/email-blocks.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-es"),i=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("@react-email/components"),c=require("@chaibuilder/runtime"),d=require("./empty-slot-Sy930lX6.cjs"),l=require("./controls-rRZhz0vu.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,{inBuilder:r})),i.jsxRuntimeExports.jsx(s.Container,{...e,...t,children:n})};c.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(s.Section,{...e,...t,children:o});c.registerChaiBlock(x,{type:"Email/Section",label:"Section",group:"basic",category:"core",icon:a.ImageIcon,props:{align:l.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})=>i.jsxRuntimeExports.jsx(s.Row,{...e,...t,children:o});c.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.o({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,{})),i.jsxRuntimeExports.jsx(s.Column,{...e,...t,align:r,children:n})};c.registerChaiBlock(h,{type:"Email/Column",label:"Column",group:"basic",category:"core",icon:a.ImageIcon,props:{styles:l.o({default:""}),align:l.f({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(s.Heading,{as:e,...t,...o,children:r}),b=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("h1",{...e,...t,children:o});c.registerChaiBlock(k,{type:"Email/Heading",label:"Heading",group:"basic",category:"core",icon:a.HeadingIcon,builderComponent:b,props:{content:l.g({title:"Content",default:"Enter your heading here..."}),styles:l.o({default:"text-xl"}),level:l.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=>["Email/Link","Email/RawText"].includes(e)});const B=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx(s.Text,{...e,...t,children:o}),C=({content:e,blockProps:t,styles:o})=>i.jsxRuntimeExports.jsx("p",{...t,...o,children:e});c.registerChaiBlock(B,{type:"Email/Text",label:"Text",group:"basic",category:"core",icon:a.TextIcon,builderComponent:C,props:{content:l.r({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.o({default:""})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const j=({content:e})=>e,f=({content:e,blockProps:t})=>i.jsxRuntimeExports.jsx("span",{...t,children:e});c.registerChaiBlock(j,{type:"Email/RawText",label:"Raw Text",group:"basic",category:"core",icon:a.TextIcon,hidden:!0,builderComponent:f,props:{content:l.r({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(s.Button,{...e,...t,href:o.href,children:r}),y=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("button",{type:"button",...e,...t,children:o});c.registerChaiBlock(E,{type:"Email/Button",label:"Button",group:"basic",category:"core",builderComponent:y,props:{content:l.g({title:"Content",default:"Click me"}),link:l.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.o({default:"bg-primary text-white px-4 py-2 rounded-md"})}});const v=({blockProps:e,styles:t,href:o,content:r,target:n,children:u})=>i.jsxRuntimeExports.jsx(s.Link,{...e,...t,href:o,target:n,children:u||r}),R=({blockProps:e,styles:t,content:o,children:r})=>{let n=r;return r||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{})),i.jsxRuntimeExports.jsx("span",{...e,...t,children:n||o})};c.registerChaiBlock(v,{type:"Email/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:R,props:{content:l.g({title:"Content",default:"I am a link."}),link:l.q({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.o({default:"font-bold text-blue-500"})},canAcceptBlock:()=>!0});const w=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(s.Preview,{...e,...t,children:o}),I=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:o});c.registerChaiBlock(w,{type:"Email/Preview",label:"Preview",group:"basic",category:"core",builderComponent:I,canAcceptBlock:()=>!0,canDuplicate:()=>!1,props:{content:l.r({default:"Preview content",title:"Content"})}});const L=({blockProps:e,content:t})=>i.jsxRuntimeExports.jsx(s.Markdown,{children:t,...e});c.registerChaiBlock(L,{type:"Email/Markdown",label:"Markdown",group:"basic",category:"core",props:{content:l.r({default:"# This is a ~~strikethrough~~",title:"Markdown"})}});const T=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx(s.Img,{...e,...t,src:r,alt:o,width:n,height:u}),S=({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});c.registerChaiBlock(T,{type:"Email/Image",label:"Image",group:"basic",category:"core",icon:a.ImageIcon,builderComponent:S,props:{styles:l.o({default:"w-full"}),image:l.v({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.g({title:"Alt",default:""}),width:l.g({title:"Width",default:""}),height:l.g({title:"Height",default:""})}});const q=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx(s.Hr,{...e,...t}),H=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx("hr",{...e,...t});c.registerChaiBlock(q,{type:"Email/Divider",label:"Divider",group:"basic",category:"core",icon:a.DividerHorizontalIcon,builderComponent:H,props:{styles:l.o({default:"w-full h-2"})}});const _=({blockProps:e,styles:t,code:o,lineNumbers:r,theme:n,language:u})=>i.jsxRuntimeExports.jsx(s.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})});c.registerChaiBlock(_,{type:"Email/CodeBlock",label:"Code Block",group:"basic",category:"core",hidden:!0,icon:a.CodeSandboxLogoIcon,builderComponent:A,props:{styles:l.o({default:""}),code:l.r({title:"Code",default:"console.log('Hello, world!');"}),theme:l.g({title:"Theme",default:"dracula"}),lineNumbers:l.c({title:"Line number",default:!1}),language:l.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})=>i.jsxRuntimeExports.jsx(s.CodeInline,{...e,...t,children:o}),M=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("code",{...e,...t,children:o});c.registerChaiBlock(D,{type:"Email/CodeInline",label:"Code Inline",group:"basic",category:"core",icon:a.CodeSandboxLogoIcon,builderComponent:M,props:{styles:l.o({default:""}),code:l.r({title:"Code",default:"console.log('Hello, world!');"})}});const N=p.noop;exports.loadEmailBlocks=N;
|
package/dist/email-blocks.d.ts
DELETED
package/dist/email-blocks.js
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { noop as f } from "lodash-es";
|
|
2
|
-
import { j as o } from "./jsx-runtime-WbnYoNE9.js";
|
|
3
|
-
import { Container as k, Section as x, Row as y, 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
|
-
import { registerChaiBlock as r } from "@chaibuilder/runtime";
|
|
5
|
-
import { E as m } from "./empty-slot-Lsxjts7Q.js";
|
|
6
|
-
import { f as d, o as a, g as u, r as s, q as g, v as _, c as A } from "./controls-yjgoZzB6.js";
|
|
7
|
-
import { ImageIcon as p, HeadingIcon as S, TextIcon as h, Link1Icon as D, DividerHorizontalIcon as M, CodeSandboxLogoIcon as b } from "@radix-ui/react-icons";
|
|
8
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
-
import "react";
|
|
10
|
-
import "./Functions-7jnEwJyw.js";
|
|
11
|
-
import "clsx";
|
|
12
|
-
import "tailwind-merge";
|
|
13
|
-
const N = ({ blockProps: e, styles: t, children: l, inBuilder: i }) => {
|
|
14
|
-
let n = l;
|
|
15
|
-
return l || (n = /* @__PURE__ */ o.jsx(m, { inBuilder: i })), /* @__PURE__ */ o.jsx(k, { ...e, ...t, children: n });
|
|
16
|
-
};
|
|
17
|
-
r(N, {
|
|
18
|
-
type: "Email/Container",
|
|
19
|
-
label: "Container",
|
|
20
|
-
group: "basic",
|
|
21
|
-
category: "core",
|
|
22
|
-
canAcceptBlock: () => !0,
|
|
23
|
-
canMove: () => !0,
|
|
24
|
-
canDelete: () => !1,
|
|
25
|
-
canDuplicate: () => !1,
|
|
26
|
-
canBeNested: (e) => !e
|
|
27
|
-
});
|
|
28
|
-
const P = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(x, { ...e, ...t, children: l });
|
|
29
|
-
r(P, {
|
|
30
|
-
type: "Email/Section",
|
|
31
|
-
label: "Section",
|
|
32
|
-
group: "basic",
|
|
33
|
-
category: "core",
|
|
34
|
-
icon: p,
|
|
35
|
-
props: {
|
|
36
|
-
align: d({
|
|
37
|
-
title: "Align",
|
|
38
|
-
default: "",
|
|
39
|
-
options: [
|
|
40
|
-
{ value: "", title: "None" },
|
|
41
|
-
{ value: "left", title: "left" },
|
|
42
|
-
{ value: "center", title: "center" },
|
|
43
|
-
{ value: "right", title: "right" }
|
|
44
|
-
]
|
|
45
|
-
})
|
|
46
|
-
},
|
|
47
|
-
canAcceptBlock: () => !0
|
|
48
|
-
});
|
|
49
|
-
const $ = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(y, { ...e, ...t, children: l });
|
|
50
|
-
r($, {
|
|
51
|
-
type: "Email/Row",
|
|
52
|
-
label: "Row",
|
|
53
|
-
group: "basic",
|
|
54
|
-
category: "core",
|
|
55
|
-
icon: p,
|
|
56
|
-
blocks: [
|
|
57
|
-
{ _type: "Email/Row", _id: "a" },
|
|
58
|
-
{ _type: "Email/Column", _id: "b", _parent: "a" }
|
|
59
|
-
],
|
|
60
|
-
props: {
|
|
61
|
-
styles: a({ default: "" })
|
|
62
|
-
},
|
|
63
|
-
canAcceptBlock: (e) => e === "Email/Column"
|
|
64
|
-
});
|
|
65
|
-
const q = ({ blockProps: e, styles: t, children: l, align: i }) => {
|
|
66
|
-
let n = l;
|
|
67
|
-
return l || (n = /* @__PURE__ */ o.jsx(m, {})), /* @__PURE__ */ o.jsx(B, { ...e, ...t, align: i, children: n });
|
|
68
|
-
};
|
|
69
|
-
r(q, {
|
|
70
|
-
type: "Email/Column",
|
|
71
|
-
label: "Column",
|
|
72
|
-
group: "basic",
|
|
73
|
-
category: "core",
|
|
74
|
-
icon: p,
|
|
75
|
-
props: {
|
|
76
|
-
styles: a({ default: "" }),
|
|
77
|
-
align: d({
|
|
78
|
-
title: "Align",
|
|
79
|
-
default: "",
|
|
80
|
-
options: [
|
|
81
|
-
{ value: "", title: "None" },
|
|
82
|
-
{ value: "left", title: "left" },
|
|
83
|
-
{ value: "center", title: "center" },
|
|
84
|
-
{ value: "right", title: "right" }
|
|
85
|
-
]
|
|
86
|
-
})
|
|
87
|
-
},
|
|
88
|
-
canAcceptBlock: () => !0,
|
|
89
|
-
canBeNested: (e) => e === "Email/Row"
|
|
90
|
-
});
|
|
91
|
-
const z = ({ level: e, blockProps: t, styles: l, content: i }) => /* @__PURE__ */ o.jsx(C, { as: e, ...t, ...l, children: i }), J = ({ blockProps: e, styles: t, content: l }) => /* @__PURE__ */ o.jsx("h1", { ...e, ...t, children: l });
|
|
92
|
-
r(z, {
|
|
93
|
-
type: "Email/Heading",
|
|
94
|
-
label: "Heading",
|
|
95
|
-
group: "basic",
|
|
96
|
-
category: "core",
|
|
97
|
-
icon: S,
|
|
98
|
-
builderComponent: J,
|
|
99
|
-
props: {
|
|
100
|
-
content: u({ title: "Content", default: "Enter your heading here..." }),
|
|
101
|
-
styles: a({ default: "text-xl" }),
|
|
102
|
-
level: d({
|
|
103
|
-
title: "Level",
|
|
104
|
-
default: "h1",
|
|
105
|
-
binding: !1,
|
|
106
|
-
options: [
|
|
107
|
-
{ value: "h1", title: "h1" },
|
|
108
|
-
{ value: "h2", title: "h2" },
|
|
109
|
-
{ value: "h3", title: "h3" },
|
|
110
|
-
{ value: "h4", title: "h4" },
|
|
111
|
-
{ value: "h5", title: "h5" },
|
|
112
|
-
{ value: "h6", title: "h6" }
|
|
113
|
-
]
|
|
114
|
-
})
|
|
115
|
-
},
|
|
116
|
-
canAcceptBlock: (e) => ["Email/Link", "Email/RawText"].includes(e)
|
|
117
|
-
});
|
|
118
|
-
const U = ({ blockProps: e, styles: t, content: l }) => /* @__PURE__ */ o.jsx(v, { ...e, ...t, children: l }), V = ({ content: e, blockProps: t, styles: l }) => /* @__PURE__ */ o.jsx("p", { ...t, ...l, children: e });
|
|
119
|
-
r(U, {
|
|
120
|
-
type: "Email/Text",
|
|
121
|
-
label: "Text",
|
|
122
|
-
group: "basic",
|
|
123
|
-
category: "core",
|
|
124
|
-
icon: h,
|
|
125
|
-
builderComponent: V,
|
|
126
|
-
props: {
|
|
127
|
-
content: s({
|
|
128
|
-
title: "Content",
|
|
129
|
-
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."
|
|
130
|
-
}),
|
|
131
|
-
styles: a({ default: "" })
|
|
132
|
-
},
|
|
133
|
-
canAcceptBlock: (e) => ["Email/Link", "Email/RawText"].includes(e)
|
|
134
|
-
});
|
|
135
|
-
const W = ({ content: e }) => e, F = ({ content: e, blockProps: t }) => /* @__PURE__ */ o.jsx("span", { ...t, children: e });
|
|
136
|
-
r(W, {
|
|
137
|
-
type: "Email/RawText",
|
|
138
|
-
label: "Raw Text",
|
|
139
|
-
group: "basic",
|
|
140
|
-
category: "core",
|
|
141
|
-
icon: h,
|
|
142
|
-
hidden: !0,
|
|
143
|
-
builderComponent: F,
|
|
144
|
-
props: {
|
|
145
|
-
content: s({
|
|
146
|
-
title: "Content",
|
|
147
|
-
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "
|
|
148
|
-
})
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
const G = ({ blockProps: e, styles: t, link: l, content: i }) => /* @__PURE__ */ o.jsx(j, { ...e, ...t, href: l.href, children: i }), K = ({ blockProps: e, styles: t, content: l }) => /* @__PURE__ */ o.jsx("button", { type: "button", ...e, ...t, children: l });
|
|
152
|
-
r(G, {
|
|
153
|
-
type: "Email/Button",
|
|
154
|
-
label: "Button",
|
|
155
|
-
group: "basic",
|
|
156
|
-
category: "core",
|
|
157
|
-
builderComponent: K,
|
|
158
|
-
props: {
|
|
159
|
-
content: u({ title: "Content", default: "Click me" }),
|
|
160
|
-
link: g({ title: "Link", default: { href: "https://chaibuilder.com", target: "_blank", type: "url" } }),
|
|
161
|
-
styles: a({ default: "bg-primary text-white px-4 py-2 rounded-md" })
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
const O = ({ blockProps: e, styles: t, href: l, content: i, target: n, children: c }) => /* @__PURE__ */ o.jsx(w, { ...e, ...t, href: l, target: n, children: c || i }), Q = ({ blockProps: e, styles: t, content: l, children: i }) => {
|
|
165
|
-
let n = i;
|
|
166
|
-
return i || (n = /* @__PURE__ */ o.jsx(m, {})), /* @__PURE__ */ o.jsx("span", { ...e, ...t, children: n || l });
|
|
167
|
-
};
|
|
168
|
-
r(O, {
|
|
169
|
-
type: "Email/Link",
|
|
170
|
-
label: "Link",
|
|
171
|
-
group: "basic",
|
|
172
|
-
category: "core",
|
|
173
|
-
icon: D,
|
|
174
|
-
blocks: [
|
|
175
|
-
{
|
|
176
|
-
_id: "a",
|
|
177
|
-
_type: "Link"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
_id: "b",
|
|
181
|
-
_parent: "a",
|
|
182
|
-
_type: "RawText",
|
|
183
|
-
content: "I am a link."
|
|
184
|
-
}
|
|
185
|
-
],
|
|
186
|
-
builderComponent: Q,
|
|
187
|
-
props: {
|
|
188
|
-
content: u({ title: "Content", default: "I am a link." }),
|
|
189
|
-
link: g({ title: "Link", default: { href: "https://chaibuilder.com", target: "_blank", type: "url" } }),
|
|
190
|
-
styles: a({ default: "font-bold text-blue-500" })
|
|
191
|
-
},
|
|
192
|
-
canAcceptBlock: () => !0
|
|
193
|
-
});
|
|
194
|
-
const X = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(E, { ...e, ...t, children: l }), Y = ({ blockProps: e, styles: t, content: l }) => /* @__PURE__ */ o.jsx("div", { ...e, ...t, children: l });
|
|
195
|
-
r(X, {
|
|
196
|
-
type: "Email/Preview",
|
|
197
|
-
label: "Preview",
|
|
198
|
-
group: "basic",
|
|
199
|
-
category: "core",
|
|
200
|
-
builderComponent: Y,
|
|
201
|
-
canAcceptBlock: () => !0,
|
|
202
|
-
canDuplicate: () => !1,
|
|
203
|
-
props: {
|
|
204
|
-
content: s({ default: "Preview content", title: "Content" })
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
const Z = ({ blockProps: e, content: t }) => /* @__PURE__ */ o.jsx(I, { children: t, ...e });
|
|
208
|
-
r(Z, {
|
|
209
|
-
type: "Email/Markdown",
|
|
210
|
-
label: "Markdown",
|
|
211
|
-
group: "basic",
|
|
212
|
-
category: "core",
|
|
213
|
-
props: {
|
|
214
|
-
content: s({ default: "# This is a ~~strikethrough~~", title: "Markdown" })
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
const ee = ({ blockProps: e, styles: t, alt: l, image: i, width: n, height: c }) => /* @__PURE__ */ o.jsx(L, { ...e, ...t, src: i, alt: l, width: n, height: c }), te = ({ blockProps: e, styles: t, alt: l, image: i, width: n, height: c }) => /* @__PURE__ */ o.jsx("img", { ...e, ...t, src: i, alt: l, width: n, height: c });
|
|
218
|
-
r(ee, {
|
|
219
|
-
type: "Email/Image",
|
|
220
|
-
label: "Image",
|
|
221
|
-
group: "basic",
|
|
222
|
-
category: "core",
|
|
223
|
-
icon: p,
|
|
224
|
-
builderComponent: te,
|
|
225
|
-
props: {
|
|
226
|
-
styles: a({ default: "w-full" }),
|
|
227
|
-
image: _({
|
|
228
|
-
title: "Image",
|
|
229
|
-
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
230
|
-
}),
|
|
231
|
-
alt: u({ title: "Alt", default: "" }),
|
|
232
|
-
width: u({ title: "Width", default: "" }),
|
|
233
|
-
height: u({ title: "Height", default: "" })
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
const le = ({ blockProps: e, styles: t }) => /* @__PURE__ */ o.jsx(T, { ...e, ...t }), oe = ({ blockProps: e, styles: t }) => /* @__PURE__ */ o.jsx("hr", { ...e, ...t });
|
|
237
|
-
r(le, {
|
|
238
|
-
type: "Email/Divider",
|
|
239
|
-
label: "Divider",
|
|
240
|
-
group: "basic",
|
|
241
|
-
category: "core",
|
|
242
|
-
icon: M,
|
|
243
|
-
builderComponent: oe,
|
|
244
|
-
props: {
|
|
245
|
-
styles: a({ default: "w-full h-2" })
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
const ie = ({ blockProps: e, styles: t, code: l, lineNumbers: i, theme: n, language: c }) => /* @__PURE__ */ o.jsx(H, { ...e, ...t, code: l, linenumbers: i, theme: n, language: c }), ne = ({ blockProps: e, styles: t, code: l }) => /* @__PURE__ */ o.jsx("div", { ...e, ...t, children: /* @__PURE__ */ o.jsx("code", { children: l }) });
|
|
249
|
-
r(ie, {
|
|
250
|
-
type: "Email/CodeBlock",
|
|
251
|
-
label: "Code Block",
|
|
252
|
-
group: "basic",
|
|
253
|
-
category: "core",
|
|
254
|
-
hidden: !0,
|
|
255
|
-
icon: b,
|
|
256
|
-
builderComponent: ne,
|
|
257
|
-
props: {
|
|
258
|
-
styles: a({ default: "" }),
|
|
259
|
-
code: s({ title: "Code", default: "console.log('Hello, world!');" }),
|
|
260
|
-
theme: u({ title: "Theme", default: "dracula" }),
|
|
261
|
-
lineNumbers: A({
|
|
262
|
-
title: "Line number",
|
|
263
|
-
default: !1
|
|
264
|
-
}),
|
|
265
|
-
language: d({
|
|
266
|
-
title: "Language",
|
|
267
|
-
default: "javascript",
|
|
268
|
-
binding: !1,
|
|
269
|
-
options: [
|
|
270
|
-
{ value: "javascript", title: "JavaScript" },
|
|
271
|
-
{ value: "html", title: "HTML" },
|
|
272
|
-
{ value: "css", title: "CSS" }
|
|
273
|
-
//add more options
|
|
274
|
-
]
|
|
275
|
-
})
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
const re = ({ blockProps: e, styles: t, code: l }) => /* @__PURE__ */ o.jsx(R, { ...e, ...t, children: l }), ae = ({ blockProps: e, styles: t, code: l }) => /* @__PURE__ */ o.jsx("code", { ...e, ...t, children: l });
|
|
279
|
-
r(re, {
|
|
280
|
-
type: "Email/CodeInline",
|
|
281
|
-
label: "Code Inline",
|
|
282
|
-
group: "basic",
|
|
283
|
-
category: "core",
|
|
284
|
-
icon: b,
|
|
285
|
-
builderComponent: ae,
|
|
286
|
-
props: {
|
|
287
|
-
styles: a({ default: "" }),
|
|
288
|
-
code: s({ title: "Code", default: "console.log('Hello, world!');" })
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
const ye = f;
|
|
292
|
-
export {
|
|
293
|
-
ye as loadEmailBlocks
|
|
294
|
-
};
|
package/dist/email.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),t=require("./index-5XyNUAjc.cjs"),r=require("@radix-ui/react-icons"),o=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("i18next");require("react-i18next");require("jotai");require("@react-hookz/web");require("react-arborist");require("./index-aeDphKpP.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("tree-model");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");const n=[{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}],s=i=>{const u={...i,filterChaiBlock:q=>o.includes(q.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:n};return e.jsxRuntimeExports.jsx(t.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
|