@chaibuilder/sdk 1.2.99 → 1.2.100
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/{CodeEditor-v7zBTMpR.js → CodeEditor-4u3Q97EK.js} +7 -6
- package/dist/CodeEditor-arptm_-Q.cjs +1 -0
- package/dist/{STRINGS-TDN5UhWi.js → STRINGS-Xxstm-7I.js} +2 -2
- package/dist/{Topbar-ULSrUjT1.js → Topbar-i55trLGw.js} +17 -16
- package/dist/Topbar-ziTrNsmI.cjs +1 -0
- package/dist/UnsplashImages-9-OD1Sje.cjs +1 -0
- package/dist/{UnsplashImages-LYK9w6rM.js → UnsplashImages-y0LQATX2.js} +16 -15
- package/dist/UploadImages--tvMDTKi.cjs +1 -0
- package/dist/{UploadImages-D5RhqXgu.js → UploadImages-Nbpt6WL2.js} +12 -11
- package/dist/{context-menu-9cWJcKdh.js → context-menu-YGd09SE1.js} +91 -91
- package/dist/controls-lEwMTdPQ.js +234 -0
- package/dist/controls-p9IwFnPx.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -73
- package/dist/iconBase-Ief2hJUZ.js +130 -0
- package/dist/iconBase-aZzpqff_.cjs +1 -0
- package/dist/{index-zg1mFs4g.cjs → index-EyRQyWtP.cjs} +2 -2
- package/dist/{index-ypVXAZEr.js → index-jfezM1fH.js} +9 -8
- package/dist/render.js +1 -1
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +21 -0
- package/dist/ui.js +2 -2
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +16 -15
- package/package.json +6 -1
- package/dist/CodeEditor-Q8Qp8-DO.cjs +0 -1
- package/dist/Topbar-Mh3drPuW.cjs +0 -1
- package/dist/UnsplashImages-pwoxxEVG.cjs +0 -1
- package/dist/UploadImages-YTGwaLiS.cjs +0 -1
- package/dist/iconBase-5hdsfZ0z.cjs +0 -1
- package/dist/iconBase-RFUjwZUN.js +0 -339
|
@@ -0,0 +1,234 @@
|
|
|
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", "ai", "required"])
|
|
10
|
+
},
|
|
11
|
+
uiSchema: {
|
|
12
|
+
"ui:widget": "code"
|
|
13
|
+
}
|
|
14
|
+
}), u = (i) => ({
|
|
15
|
+
type: "singular",
|
|
16
|
+
default: "",
|
|
17
|
+
uiSchema: {},
|
|
18
|
+
hidden: t(i, "hidden", !1),
|
|
19
|
+
binding: t(i, "binding", !0),
|
|
20
|
+
dataType: "string",
|
|
21
|
+
schema: {
|
|
22
|
+
type: "null",
|
|
23
|
+
default: "null",
|
|
24
|
+
...e(i, ["i18n", "ai", "required"])
|
|
25
|
+
}
|
|
26
|
+
}), l = (i) => ({
|
|
27
|
+
type: "singular",
|
|
28
|
+
default: i.default || "",
|
|
29
|
+
hidden: t(i, "hidden", !1),
|
|
30
|
+
binding: t(i, "binding", !0),
|
|
31
|
+
dataType: "string",
|
|
32
|
+
required: i.required || !1,
|
|
33
|
+
ai: i.ai || !1,
|
|
34
|
+
i18n: i.i18n || !1,
|
|
35
|
+
schema: {
|
|
36
|
+
type: "string",
|
|
37
|
+
...e(i, ["ai", "required"])
|
|
38
|
+
},
|
|
39
|
+
uiSchema: {
|
|
40
|
+
"ui:placeholder": i.placeholder || "Enter here"
|
|
41
|
+
}
|
|
42
|
+
}), g = (i) => ({
|
|
43
|
+
type: "singular",
|
|
44
|
+
default: i.default || "",
|
|
45
|
+
hidden: t(i, "hidden", !1),
|
|
46
|
+
binding: t(i, "binding", !0),
|
|
47
|
+
dataType: "string",
|
|
48
|
+
required: i.required || !1,
|
|
49
|
+
ai: i.ai || !1,
|
|
50
|
+
i18n: i.i18n || !1,
|
|
51
|
+
schema: {
|
|
52
|
+
type: "string",
|
|
53
|
+
...e(i, ["i18n", "ai", "required", "rows"])
|
|
54
|
+
},
|
|
55
|
+
uiSchema: {
|
|
56
|
+
"ui:widget": "textarea",
|
|
57
|
+
"ui:placeholder": i.placeholder || "Enter here",
|
|
58
|
+
"ui:options": {
|
|
59
|
+
rows: i.rows || 4
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}), s = (i) => ({
|
|
63
|
+
type: "singular",
|
|
64
|
+
i18n: i.i18n || !1,
|
|
65
|
+
default: i.default || !1,
|
|
66
|
+
dataType: "boolean",
|
|
67
|
+
hidden: t(i, "hidden", !1),
|
|
68
|
+
binding: t(i, "binding", !0),
|
|
69
|
+
ai: i.ai || !1,
|
|
70
|
+
schema: {
|
|
71
|
+
type: "boolean",
|
|
72
|
+
...e(i, ["i18n", "ai", "required"])
|
|
73
|
+
},
|
|
74
|
+
uiSchema: {
|
|
75
|
+
"ui:title": i.title || "Select Item",
|
|
76
|
+
"ui:description": ""
|
|
77
|
+
}
|
|
78
|
+
}), p = (i) => ({
|
|
79
|
+
type: "singular",
|
|
80
|
+
default: i.default || "",
|
|
81
|
+
hidden: t(i, "hidden", !1),
|
|
82
|
+
binding: t(i, "binding", !0),
|
|
83
|
+
dataType: "number",
|
|
84
|
+
required: i.required || !1,
|
|
85
|
+
ai: i.ai || !1,
|
|
86
|
+
i18n: i.i18n || !1,
|
|
87
|
+
schema: {
|
|
88
|
+
type: "number",
|
|
89
|
+
...e(i, ["i18n", "ai", "required"])
|
|
90
|
+
},
|
|
91
|
+
uiSchema: {}
|
|
92
|
+
}), y = (i) => ({
|
|
93
|
+
type: "singular",
|
|
94
|
+
default: i.default || "",
|
|
95
|
+
hidden: t(i, "hidden", !1),
|
|
96
|
+
binding: t(i, "binding", !0),
|
|
97
|
+
required: i.required || !1,
|
|
98
|
+
dataType: "string",
|
|
99
|
+
ai: i.ai || !1,
|
|
100
|
+
i18n: i.i18n || !1,
|
|
101
|
+
schema: {
|
|
102
|
+
type: "string",
|
|
103
|
+
...e(i, ["i18n", "ai", "required", "options", "binding"]),
|
|
104
|
+
oneOf: i.options.map((a) => ({ const: a.value, title: a.title }))
|
|
105
|
+
},
|
|
106
|
+
uiSchema: {
|
|
107
|
+
"ui:widget": "select"
|
|
108
|
+
}
|
|
109
|
+
}), h = (i) => ({
|
|
110
|
+
type: "singular",
|
|
111
|
+
default: i.default || "",
|
|
112
|
+
hidden: t(i, "hidden", !1),
|
|
113
|
+
binding: t(i, "binding", !0),
|
|
114
|
+
dataType: "string",
|
|
115
|
+
ai: i.ai || !1,
|
|
116
|
+
i18n: i.i18n || !1,
|
|
117
|
+
schema: {
|
|
118
|
+
type: "string",
|
|
119
|
+
...e(i, ["i18n", "ai", "required"])
|
|
120
|
+
},
|
|
121
|
+
uiSchema: {
|
|
122
|
+
"ui:widget": "color"
|
|
123
|
+
}
|
|
124
|
+
}), c = (i) => ({
|
|
125
|
+
type: "slot",
|
|
126
|
+
count: 1,
|
|
127
|
+
binding: !1,
|
|
128
|
+
name: i.name,
|
|
129
|
+
styles: `${n},${i.styles || ""}`,
|
|
130
|
+
emptyStyles: `${n},${i.emptyStyles || ""}`
|
|
131
|
+
}), m = (i) => ({
|
|
132
|
+
type: "singular",
|
|
133
|
+
default: i.default || "",
|
|
134
|
+
binding: t(i, "binding", !0),
|
|
135
|
+
dataType: "string",
|
|
136
|
+
ai: i.ai || !1,
|
|
137
|
+
i18n: i.i18n || !1,
|
|
138
|
+
schema: {
|
|
139
|
+
type: "string",
|
|
140
|
+
...e(i, ["i18n", "ai", "required"])
|
|
141
|
+
},
|
|
142
|
+
uiSchema: {
|
|
143
|
+
"ui:widget": "richtext"
|
|
144
|
+
}
|
|
145
|
+
}), b = (i) => ({
|
|
146
|
+
type: "model",
|
|
147
|
+
title: i.title,
|
|
148
|
+
dataType: "object",
|
|
149
|
+
default: i.default || {},
|
|
150
|
+
binding: t(i, "binding", !0),
|
|
151
|
+
properties: i.properties
|
|
152
|
+
}), o = (i) => ({
|
|
153
|
+
type: "list",
|
|
154
|
+
itemProperties: i.itemProperties,
|
|
155
|
+
binding: t(i, "binding", !0),
|
|
156
|
+
title: i.title,
|
|
157
|
+
ai: i.ai || !1,
|
|
158
|
+
i18n: i.i18n || !1,
|
|
159
|
+
dataType: "array",
|
|
160
|
+
default: i.default || [],
|
|
161
|
+
itemTitle: i.getItemLabel ? i.getItemLabel({}) : () => ""
|
|
162
|
+
}), f = (i) => ({
|
|
163
|
+
type: "styles",
|
|
164
|
+
binding: !1,
|
|
165
|
+
default: `${n},${i.default || ""}`,
|
|
166
|
+
presets: i.presets || {}
|
|
167
|
+
}), q = (i) => ({
|
|
168
|
+
default: i.default || "",
|
|
169
|
+
binding: t(i, "binding", !0),
|
|
170
|
+
type: "singular",
|
|
171
|
+
dataType: "string",
|
|
172
|
+
ai: i.ai || !1,
|
|
173
|
+
i18n: i.i18n || !1,
|
|
174
|
+
schema: {
|
|
175
|
+
type: "string",
|
|
176
|
+
title: "Icon",
|
|
177
|
+
default: i.default || ""
|
|
178
|
+
},
|
|
179
|
+
uiSchema: {
|
|
180
|
+
"ui:widget": "icon"
|
|
181
|
+
}
|
|
182
|
+
}), S = (i) => ({
|
|
183
|
+
default: i.default,
|
|
184
|
+
type: "singular",
|
|
185
|
+
binding: t(i, "binding", !0),
|
|
186
|
+
dataType: "object",
|
|
187
|
+
ai: i.ai || !1,
|
|
188
|
+
i18n: i.i18n || !1,
|
|
189
|
+
schema: {
|
|
190
|
+
type: "object",
|
|
191
|
+
...i || {},
|
|
192
|
+
properties: {
|
|
193
|
+
type: { type: "string" },
|
|
194
|
+
href: { type: "string" },
|
|
195
|
+
target: { type: "string" }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
uiSchema: {
|
|
199
|
+
"ui:field": "link"
|
|
200
|
+
}
|
|
201
|
+
}), T = (i) => ({
|
|
202
|
+
type: "singular",
|
|
203
|
+
default: i.default || "",
|
|
204
|
+
hidden: t(i, "hidden", !1),
|
|
205
|
+
binding: t(i, "binding", !0),
|
|
206
|
+
dataType: "string",
|
|
207
|
+
ai: i.ai || !1,
|
|
208
|
+
i18n: i.i18n || !1,
|
|
209
|
+
schema: {
|
|
210
|
+
type: "string",
|
|
211
|
+
...e(i, ["i18n", "ai", "required"])
|
|
212
|
+
},
|
|
213
|
+
uiSchema: {
|
|
214
|
+
"ui:widget": "image"
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
export {
|
|
218
|
+
o as S,
|
|
219
|
+
f as T,
|
|
220
|
+
b,
|
|
221
|
+
s as c,
|
|
222
|
+
g as f,
|
|
223
|
+
l as g,
|
|
224
|
+
h,
|
|
225
|
+
r as l,
|
|
226
|
+
m,
|
|
227
|
+
q,
|
|
228
|
+
c as r,
|
|
229
|
+
p as s,
|
|
230
|
+
u,
|
|
231
|
+
S as w,
|
|
232
|
+
T as x,
|
|
233
|
+
y
|
|
234
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("lodash-es"),e="#styles:",a=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"string",...t.omit(i,["i18n","ai","required"])},uiSchema:{"ui:widget":"code"}}),d=i=>({type:"singular",default:"",uiSchema:{},hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"null",default:"null",...t.omit(i,["i18n","ai","required"])}}),r=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"string",required:i.required||!1,ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["ai","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),g=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"string",required:i.required||!1,ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","ai","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),u=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),ai:i.ai||!1,schema:{type:"boolean",...t.omit(i,["i18n","ai","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),l=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"number",required:i.required||!1,ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"number",...t.omit(i,["i18n","ai","required"])},uiSchema:{}}),s=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),required:i.required||!1,dataType:"string",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","ai","required","options","binding"]),oneOf:i.options.map(n=>({const:n.value,title:n.title}))},uiSchema:{"ui:widget":"select"}}),p=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","ai","required"])},uiSchema:{"ui:widget":"color"}}),y=i=>({type:"slot",count:1,binding:!1,name:i.name,styles:`${e},${i.styles||""}`,emptyStyles:`${e},${i.emptyStyles||""}`}),h=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","ai","required"])},uiSchema:{"ui:widget":"richtext"}}),m=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:t.get(i,"binding",!0),properties:i.properties}),o=i=>({type:"list",itemProperties:i.itemProperties,binding:t.get(i,"binding",!0),title:i.title,ai:i.ai||!1,i18n:i.i18n||!1,dataType:"array",default:i.default||[],itemTitle:i.getItemLabel?i.getItemLabel({}):()=>""}),c=i=>({type:"styles",binding:!1,default:`${e},${i.default||""}`,presets:i.presets||{}}),b=i=>({default:i.default||"",binding:t.get(i,"binding",!0),type:"singular",dataType:"string",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",title:"Icon",default:i.default||""},uiSchema:{"ui:widget":"icon"}}),f=i=>({default:i.default,type:"singular",binding:t.get(i,"binding",!0),dataType:"object",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"object",...i||{},properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}}},uiSchema:{"ui:field":"link"}}),q=i=>({type:"singular",default:i.default||"",hidden:t.get(i,"hidden",!1),binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||!1,i18n:i.i18n||!1,schema:{type:"string",...t.omit(i,["i18n","ai","required"])},uiSchema:{"ui:widget":"image"}});exports.S=o;exports.T=c;exports.b=m;exports.c=u;exports.f=g;exports.g=r;exports.h=p;exports.l=a;exports.m=h;exports.q=b;exports.r=y;exports.s=l;exports.u=d;exports.w=f;exports.x=q;exports.y=s;
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-EyRQyWtP.cjs"),r=require("./iconBase-aZzpqff_.cjs"),s=require("@chaibuilder/runtime"),u=require("react-i18next"),i=require("i18next");require("./jsx-runtime-JYMCiFoE.cjs");require("react");require("./context-menu-sQn7ryJ6.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");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-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-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./plugin-KIpT3NWi.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("./controls-p9IwFnPx.cjs");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("framer-motion");exports.AISetContext=e.AISetContext;exports.AIUserPrompt=e.AIUserPrompt;exports.AddBlocksDialog=e.AddBlocksDialog;exports.AddBlocksPanel=e.AddBlocksPanel;exports.BlockAttributesEditor=e.BlockAttributesEditor;exports.BlockPropsEditor=e.BlockSettings;exports.BlockStyleEditor=e.BlockStyling;exports.CHAI_BUILDER_EVENTS=e.CHAI_BUILDER_EVENTS;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.DarkModeSwitcher=e.DarkMode;exports.DefaultChaiBlocks=e.DefaultChaiBlocks;exports.ImportHTML=e.ImportHTML;exports.Outline=e.Outline;exports.ScreenSizes=e.Breakpoints;exports.ThemeOptions=e.ThemeOptions;exports.UILibraries=e.UILibraries;exports.UndoRedo=e.UndoRedo;exports.emitChaiBuilderMsg=e.emitChaiBuilderMsg;exports.getBlocksFromHTML=e.getBlocksFromHTML;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.useAddBlock=e.useAddBlock;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBlocksStoreUndoableActions=e.useBlocksStoreUndoableActions;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useChaiBuilderMsgListener=e.useChaiBuilderMsgListener;exports.useCodeEditor=e.useCodeEditor;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.useGlobalBlocksList=e.useGlobalBlocksList;exports.useGlobalBlocksStore=e.useGlobalBlocksStore;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLayoutVariant=e.useLayoutVariant;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;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;exports.generateBlockId=r.generateUUID;exports.mergeClasses=r.cn;Object.defineProperty(exports,"registerChaiBlock",{enumerable:!0,get:()=>s.registerChaiBlock});Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>u.useTranslation});exports.i18n=i;
|
package/dist/core.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { g as
|
|
3
|
-
import { registerChaiBlock as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { default as
|
|
1
|
+
import { m as as, n as ts, i as rs, A as is, o as ps, B as ls, h as ms, l as us, g as ds, p as cs, q as Bs, D as ks, I as ns, O as Cs, r as Ss, T as gs, U as Is, s as hs, j as As, v as Ps, t as Us, G as ys, H as Es, y as Ls, a8 as Ms, X as bs, d as fs, E as vs, J as Ds, K as Ts, k as xs, u as Rs, L as Hs, M as Os, N as Vs, P as ws, Q as Gs, R as _s, w as zs, x as Fs, S as Ns, V as Ws, a7 as Zs, W as js, f as qs, Y as Js, Z as Ks, e as Qs, a0 as Xs, $ as Ys, _ as $s, a as so, a4 as oo, a5 as eo, a6 as ao, a1 as to, a3 as ro, a2 as io, z as po, b as lo, c as mo } from "./index-jfezM1fH.js";
|
|
2
|
+
import { g as co, c as Bo } from "./iconBase-Ief2hJUZ.js";
|
|
3
|
+
import { registerChaiBlock as no } from "@chaibuilder/runtime";
|
|
4
|
+
import { useTranslation as So } from "react-i18next";
|
|
5
|
+
import { default as Io } from "i18next";
|
|
6
6
|
import "./jsx-runtime-Sp0orL4X.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "./context-menu-
|
|
8
|
+
import "./context-menu-YGd09SE1.js";
|
|
9
9
|
import "@radix-ui/react-switch";
|
|
10
10
|
import "@radix-ui/react-accordion";
|
|
11
11
|
import "@radix-ui/react-icons";
|
|
@@ -33,7 +33,7 @@ import "./plugin-ooqqxWRQ.js";
|
|
|
33
33
|
import "@react-hookz/web";
|
|
34
34
|
import "tree-model";
|
|
35
35
|
import "react-quill";
|
|
36
|
-
import "./STRINGS-
|
|
36
|
+
import "./STRINGS-Xxstm-7I.js";
|
|
37
37
|
import "flagged";
|
|
38
38
|
import "react-hotkeys-hook";
|
|
39
39
|
import "@floating-ui/dom";
|
|
@@ -51,6 +51,7 @@ import "re-resizable";
|
|
|
51
51
|
import "lucide-react";
|
|
52
52
|
import "@rjsf/validator-ajv8";
|
|
53
53
|
import "@rjsf/core";
|
|
54
|
+
import "./controls-lEwMTdPQ.js";
|
|
54
55
|
import "react-arborist";
|
|
55
56
|
import "himalaya";
|
|
56
57
|
import "react-icons-picker";
|
|
@@ -58,70 +59,70 @@ import "react-autosuggest";
|
|
|
58
59
|
import "fuse.js";
|
|
59
60
|
import "framer-motion";
|
|
60
61
|
export {
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
62
|
+
as as AISetContext,
|
|
63
|
+
ts as AIUserPrompt,
|
|
64
|
+
rs as AddBlocksDialog,
|
|
65
|
+
is as AddBlocksPanel,
|
|
66
|
+
ps as BlockAttributesEditor,
|
|
67
|
+
ls as BlockPropsEditor,
|
|
68
|
+
ms as BlockStyleEditor,
|
|
69
|
+
us as CHAI_BUILDER_EVENTS,
|
|
70
|
+
ds as ChaiBuilderCanvas,
|
|
71
|
+
cs as ChaiBuilderEditor,
|
|
72
|
+
Bs as DarkModeSwitcher,
|
|
73
|
+
ks as DefaultChaiBlocks,
|
|
74
|
+
ns as ImportHTML,
|
|
75
|
+
Cs as Outline,
|
|
76
|
+
Ss as ScreenSizes,
|
|
77
|
+
gs as ThemeOptions,
|
|
78
|
+
Is as UILibraries,
|
|
79
|
+
hs as UndoRedo,
|
|
80
|
+
As as emitChaiBuilderMsg,
|
|
81
|
+
co as generateBlockId,
|
|
82
|
+
Ps as getBlocksFromHTML,
|
|
83
|
+
Us as getClassValueAndUnit,
|
|
84
|
+
Io as i18n,
|
|
85
|
+
Bo as mergeClasses,
|
|
86
|
+
no as registerChaiBlock,
|
|
87
|
+
ys as useAddBlock,
|
|
88
|
+
Es as useAddClassesToBlocks,
|
|
89
|
+
Ls as useBlocksStore,
|
|
90
|
+
Ms as useBlocksStoreUndoableActions,
|
|
91
|
+
bs as useBrandingOptions,
|
|
92
|
+
fs as useBuilderProp,
|
|
93
|
+
vs as useBuilderReset,
|
|
94
|
+
Ds as useCanvasWidth,
|
|
95
|
+
Ts as useCanvasZoom,
|
|
96
|
+
xs as useChaiBuilderMsgListener,
|
|
97
|
+
Rs as useCodeEditor,
|
|
98
|
+
Hs as useCopyBlockIds,
|
|
99
|
+
Os as useCopyToClipboard,
|
|
100
|
+
Vs as useCurrentPage,
|
|
101
|
+
ws as useCutBlockIds,
|
|
102
|
+
Gs as useDarkMode,
|
|
103
|
+
_s as useDuplicateBlocks,
|
|
104
|
+
zs as useGlobalBlocksList,
|
|
105
|
+
Fs as useGlobalBlocksStore,
|
|
106
|
+
Ns as useHiddenBlockIds,
|
|
107
|
+
Ws as useHighlightBlockId,
|
|
108
|
+
Zs as useLayoutVariant,
|
|
109
|
+
js as usePasteBlocks,
|
|
110
|
+
qs as usePreviewMode,
|
|
111
|
+
Js as useRemoveBlocks,
|
|
112
|
+
Ks as useRemoveClassesFromBlocks,
|
|
113
|
+
Qs as useSavePage,
|
|
114
|
+
Xs as useSelectedBlock,
|
|
115
|
+
Ys as useSelectedBlockAllClasses,
|
|
116
|
+
$s as useSelectedBlockCurrentClasses,
|
|
117
|
+
so as useSelectedBlockIds,
|
|
118
|
+
oo as useSelectedBlocksDisplayChild,
|
|
119
|
+
eo as useSelectedBreakpoints,
|
|
120
|
+
ao as useSelectedStylingBlocks,
|
|
121
|
+
to as useStylingBreakpoint,
|
|
122
|
+
ro as useStylingState,
|
|
123
|
+
So as useTranslation,
|
|
124
|
+
io as useUILibraryBlocks,
|
|
125
|
+
po as useUndoManager,
|
|
126
|
+
lo as useUpdateBlocksProps,
|
|
127
|
+
mo as useUpdateBlocksPropsRealtime
|
|
127
128
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import "lodash-es";
|
|
2
|
+
import { clsx as v } from "clsx";
|
|
3
|
+
import { twMerge as O } from "tailwind-merge";
|
|
4
|
+
import a from "react";
|
|
5
|
+
function D(e = 6, t = "abcdefghijklmnopqrstuvwxyzABCD") {
|
|
6
|
+
let r = "";
|
|
7
|
+
for (let n = e; n > 0; --n)
|
|
8
|
+
r += t[Math.floor(Math.random() * t.length)];
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >= 768 ? "MD" : e >= 640 ? "SM" : "XS", z = (...e) => O(v(e));
|
|
12
|
+
var p = {
|
|
13
|
+
color: void 0,
|
|
14
|
+
size: void 0,
|
|
15
|
+
className: void 0,
|
|
16
|
+
style: void 0,
|
|
17
|
+
attr: void 0
|
|
18
|
+
}, s = a.createContext && /* @__PURE__ */ a.createContext(p), y = ["attr", "size", "title"];
|
|
19
|
+
function d(e, t) {
|
|
20
|
+
if (e == null)
|
|
21
|
+
return {};
|
|
22
|
+
var r = j(e, t), n, i;
|
|
23
|
+
if (Object.getOwnPropertySymbols) {
|
|
24
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
25
|
+
for (i = 0; i < o.length; i++)
|
|
26
|
+
n = o[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
function j(e, t) {
|
|
31
|
+
if (e == null)
|
|
32
|
+
return {};
|
|
33
|
+
var r = {};
|
|
34
|
+
for (var n in e)
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
|
36
|
+
if (t.indexOf(n) >= 0)
|
|
37
|
+
continue;
|
|
38
|
+
r[n] = e[n];
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}
|
|
42
|
+
function c() {
|
|
43
|
+
return c = Object.assign ? Object.assign.bind() : function(e) {
|
|
44
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
45
|
+
var r = arguments[t];
|
|
46
|
+
for (var n in r)
|
|
47
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
48
|
+
}
|
|
49
|
+
return e;
|
|
50
|
+
}, c.apply(this, arguments);
|
|
51
|
+
}
|
|
52
|
+
function m(e, t) {
|
|
53
|
+
var r = Object.keys(e);
|
|
54
|
+
if (Object.getOwnPropertySymbols) {
|
|
55
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
56
|
+
t && (n = n.filter(function(i) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
58
|
+
})), r.push.apply(r, n);
|
|
59
|
+
}
|
|
60
|
+
return r;
|
|
61
|
+
}
|
|
62
|
+
function u(e) {
|
|
63
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
64
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
65
|
+
t % 2 ? m(Object(r), !0).forEach(function(n) {
|
|
66
|
+
P(e, n, r[n]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : m(Object(r)).forEach(function(n) {
|
|
68
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return e;
|
|
72
|
+
}
|
|
73
|
+
function P(e, t, r) {
|
|
74
|
+
return t = h(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
75
|
+
}
|
|
76
|
+
function h(e) {
|
|
77
|
+
var t = w(e, "string");
|
|
78
|
+
return typeof t == "symbol" ? t : t + "";
|
|
79
|
+
}
|
|
80
|
+
function w(e, t) {
|
|
81
|
+
if (typeof e != "object" || !e)
|
|
82
|
+
return e;
|
|
83
|
+
var r = e[Symbol.toPrimitive];
|
|
84
|
+
if (r !== void 0) {
|
|
85
|
+
var n = r.call(e, t || "default");
|
|
86
|
+
if (typeof n != "object")
|
|
87
|
+
return n;
|
|
88
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
89
|
+
}
|
|
90
|
+
return (t === "string" ? String : Number)(e);
|
|
91
|
+
}
|
|
92
|
+
function g(e) {
|
|
93
|
+
return e && e.map((t, r) => /* @__PURE__ */ a.createElement(t.tag, u({
|
|
94
|
+
key: r
|
|
95
|
+
}, t.attr), g(t.child)));
|
|
96
|
+
}
|
|
97
|
+
function I(e) {
|
|
98
|
+
return (t) => /* @__PURE__ */ a.createElement(x, c({
|
|
99
|
+
attr: u({}, e.attr)
|
|
100
|
+
}, t), g(e.child));
|
|
101
|
+
}
|
|
102
|
+
function x(e) {
|
|
103
|
+
var t = (r) => {
|
|
104
|
+
var {
|
|
105
|
+
attr: n,
|
|
106
|
+
size: i,
|
|
107
|
+
title: o
|
|
108
|
+
} = e, b = d(e, y), f = i || r.size || "1em", l;
|
|
109
|
+
return r.className && (l = r.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ a.createElement("svg", c({
|
|
110
|
+
stroke: "currentColor",
|
|
111
|
+
fill: "currentColor",
|
|
112
|
+
strokeWidth: "0"
|
|
113
|
+
}, r.attr, n, b, {
|
|
114
|
+
className: l,
|
|
115
|
+
style: u(u({
|
|
116
|
+
color: e.color || r.color
|
|
117
|
+
}, r.style), e.style),
|
|
118
|
+
height: f,
|
|
119
|
+
width: f,
|
|
120
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
121
|
+
}), o && /* @__PURE__ */ a.createElement("title", null, o), e.children);
|
|
122
|
+
};
|
|
123
|
+
return s !== void 0 ? /* @__PURE__ */ a.createElement(s.Consumer, null, (r) => t(r)) : t(p);
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
I as G,
|
|
127
|
+
N as a,
|
|
128
|
+
z as c,
|
|
129
|
+
D as g
|
|
130
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("lodash-es");const v=require("clsx"),O=require("tailwind-merge"),a=require("react");function y(e=6,t="abcdefghijklmnopqrstuvwxyzABCD"){let r="";for(let n=e;n>0;--n)r+=t[Math.floor(Math.random()*t.length)];return r}const d=e=>e>=1536?"2XL":e>=1280?"XL":e>=1024?"LG":e>=768?"MD":e>=640?"SM":"XS",j=(...e)=>O.twMerge(v.clsx(e));var g={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f=a.createContext&&a.createContext(g),P=["attr","size","title"];function h(e,t){if(e==null)return{};var r=w(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(n){x(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x(e,t,r){return t=E(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=D(e,"string");return typeof t=="symbol"?t:t+""}function D(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p(e){return e&&e.map((t,r)=>a.createElement(t.tag,u({key:r},t.attr),p(t.child)))}function S(e){return t=>a.createElement(C,c({attr:u({},e.attr)},t),p(e.child))}function C(e){var t=r=>{var{attr:n,size:i,title:o}=e,b=h(e,P),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),a.createElement("svg",c({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,b,{className:l,style:u(u({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&a.createElement("title",null,o),e.children)};return f!==void 0?a.createElement(f.Consumer,null,r=>t(r)):t(g)}exports.GenIcon=S;exports.cn=j;exports.generateUUID=y;exports.getBreakpointValue=d;
|