@chaibuilder/sdk 1.2.91 → 1.2.93-beta.1
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-_Pim7pDO.js → CodeEditor-_pniWL9A.js} +20 -18
- package/dist/CodeEditor-hbpcHA6a.cjs +1 -0
- package/dist/GlobalBlockSettings-1Ix883dP.cjs +1 -0
- package/dist/GlobalBlockSettings-eytCBAHr.js +44 -0
- package/dist/Topbar-0dGbwmC_.cjs +1 -0
- package/dist/{Topbar-4ejjKoRn.js → Topbar-AzDg5F6n.js} +14 -12
- package/dist/{UnsplashImages-fpbR9Jbs.js → UnsplashImages-Gdm78EC5.js} +11 -9
- package/dist/UnsplashImages-etSQzJ6J.cjs +1 -0
- package/dist/{UploadImages-9hzL5Hu1.js → UploadImages-2XWy9JHd.js} +31 -56
- package/dist/UploadImages-lyC-Th50.cjs +1 -0
- package/dist/_commonjsHelpers-f3sTPFkQ.js +8 -0
- package/dist/_commonjsHelpers-f52AuuUj.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +34 -11
- package/dist/core.js +71 -67
- package/dist/{iconBase-zweRWSz0.js → iconBase-HBZkvN04.js} +29 -22
- package/dist/iconBase-kuD_VwQx.cjs +1 -0
- package/dist/index-lynOzeB3.cjs +223 -0
- package/dist/{index-ry3B_D93.js → index-zgy8mVKm.js} +9626 -10802
- package/dist/plugin-02QsHeBE.cjs +1 -0
- package/dist/{plugin-P0tpo_XZ.cjs → plugin-BXpjdQxx.cjs} +1 -1
- package/dist/{plugin-f5uJtdXY.js → plugin-DdKuAR7p.js} +1 -1
- package/dist/plugin-VDzc8jUO.js +52 -0
- package/dist/render.cjs +2 -2
- package/dist/render.js +7 -6
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +7 -6
- package/dist/useGlobalBlocksStore-1wJUEOl4.cjs +1 -0
- package/dist/useGlobalBlocksStore-HlGhDxuV.js +1258 -0
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +257 -229
- package/package.json +2 -2
- package/dist/CodeEditor-Imjgt7mh.cjs +0 -1
- package/dist/Topbar-irIirqy7.cjs +0 -1
- package/dist/UnsplashImages-NfwOtGHo.cjs +0 -1
- package/dist/UploadImages-OVHnYeiL.cjs +0 -1
- package/dist/iconBase-vJD0OXxU.cjs +0 -1
- package/dist/index-VBJLJ6fO.cjs +0 -223
- package/dist/plugin-_F-KZp1i.cjs +0 -1
- package/dist/plugin-sJ3Hzvpv.js +0 -57
package/dist/core.d.ts
CHANGED
|
@@ -156,13 +156,24 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
156
156
|
uiLibraries?: Omit<UILibrary, "blocks">[];
|
|
157
157
|
getUILibraryBlocks?: (library: UILibrary) => Promise<UiLibraryBlock[]>;
|
|
158
158
|
getUILibraryBlock?: (library: UILibrary, uiLibBlock: UiLibraryBlock) => Promise<ChaiBlock[]>;
|
|
159
|
+
/**
|
|
160
|
+
* Get Global blocks
|
|
161
|
+
*/
|
|
162
|
+
getGlobalBlocks?: () => Promise<Record<string, {
|
|
163
|
+
name?: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
}>>;
|
|
166
|
+
/**
|
|
167
|
+
* Get all blocks of a global block
|
|
168
|
+
*/
|
|
169
|
+
getGlobalBlockBlocks?: (globalBlockKey: string) => Promise<ChaiBlock[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Blocks for the page
|
|
172
|
+
*/
|
|
159
173
|
blocks?: ChaiBlock[];
|
|
160
174
|
onSave?: ({ blocks, providers }: SavePageData) => Promise<boolean | Error>;
|
|
161
175
|
brandingOptions?: Record<string, string>;
|
|
162
|
-
|
|
163
|
-
* Theme configuration
|
|
164
|
-
*/
|
|
165
|
-
themeConfiguration?: Record<string, string>;
|
|
176
|
+
theme?: Record<string, string>;
|
|
166
177
|
/**
|
|
167
178
|
* onSaveStateChange callback function
|
|
168
179
|
* @param syncStatus
|
|
@@ -211,13 +222,9 @@ declare type ChaiBuilderInstance = {
|
|
|
211
222
|
};
|
|
212
223
|
|
|
213
224
|
declare type ChaiPage = {
|
|
214
|
-
uuid?: string;
|
|
215
|
-
page_name?: string;
|
|
216
|
-
blocks: ChaiBlock[];
|
|
217
|
-
custom_code: string;
|
|
218
|
-
seo_data: Record<string, string>;
|
|
219
225
|
slug: string;
|
|
220
|
-
|
|
226
|
+
uuid?: string;
|
|
227
|
+
name?: string;
|
|
221
228
|
};
|
|
222
229
|
|
|
223
230
|
declare type ClassDerivedObject = {
|
|
@@ -280,6 +287,11 @@ export declare const getClassValueAndUnit: (className: string) => {
|
|
|
280
287
|
value: string;
|
|
281
288
|
};
|
|
282
289
|
|
|
290
|
+
declare type GlobalBlockList = Record<string, {
|
|
291
|
+
name?: string;
|
|
292
|
+
description?: string;
|
|
293
|
+
}>;
|
|
294
|
+
|
|
283
295
|
export { i18n }
|
|
284
296
|
|
|
285
297
|
export declare const ImportHTML: ({ parentId }: {
|
|
@@ -356,7 +368,7 @@ export declare const useAddBlock: () => AddBlocks;
|
|
|
356
368
|
|
|
357
369
|
export declare const useAddClassesToBlocks: () => Function;
|
|
358
370
|
|
|
359
|
-
export declare const useBlocksStore: () => [
|
|
371
|
+
export declare const useBlocksStore: () => [any[], (args_0: any[] | ((prev: any[]) => any[])) => void];
|
|
360
372
|
|
|
361
373
|
export declare const useBlocksStoreUndoableActions: () => {
|
|
362
374
|
moveBlocks: (blockIds: string[], parent: string | undefined, position: number) => void;
|
|
@@ -421,6 +433,17 @@ export declare const useDarkMode: () => [boolean, Function];
|
|
|
421
433
|
*/
|
|
422
434
|
export declare const useDuplicateBlocks: () => Function;
|
|
423
435
|
|
|
436
|
+
export declare const useGlobalBlocksList: () => {
|
|
437
|
+
data: GlobalBlockList;
|
|
438
|
+
isLoading: boolean;
|
|
439
|
+
refetch: () => Promise<void>;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export declare const useGlobalBlocksStore: () => {
|
|
443
|
+
getGlobalBlocks: (block: ChaiBlock) => any;
|
|
444
|
+
reset: () => void;
|
|
445
|
+
};
|
|
446
|
+
|
|
424
447
|
export declare const useHiddenBlockIds: () => readonly [string[], (args_0: string[] | ((prev: string[]) => string[])) => void, (blockId: string) => void];
|
|
425
448
|
|
|
426
449
|
/**
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { h as as, i as rs, d as is, A as ps, j as ls, B as ms, c as us, g as ds, b as cs, k as Bs, l as ks, D as ns, I as Cs, O as Ss, m as gs, T as Is, U as hs, n as As, e as Ps, p as Us, o as ys, r as Ls, s as bs, q as Es, t as Ms, v as fs, f as vs, u as xs, w as Ds, x as Ts, y as Rs, z as Hs, E as Os, G as Vs, H as ws, V as Gs, J as Ns, a as js, K as zs, M as Fs, L as _s, R as qs, S as Js, N as Ks, Q as Qs, P as Ws } from "./index-zgy8mVKm.js";
|
|
2
|
+
import { g as Xs, c as Ys } from "./iconBase-HBZkvN04.js";
|
|
3
|
+
import { u as so, b as oo, n as eo, k as to, O as ao, N as ro, j as io, m as po, L as lo, r as mo, a as uo, A as co, h as Bo, l as ko, x as no } from "./useGlobalBlocksStore-HlGhDxuV.js";
|
|
4
|
+
import { useTranslation as So } from "react-i18next";
|
|
5
|
+
import { default as Io } from "i18next";
|
|
5
6
|
import "./jsx-runtime-Sp0orL4X.js";
|
|
6
7
|
import "react";
|
|
7
8
|
import "./context-menu-9cWJcKdh.js";
|
|
@@ -28,21 +29,21 @@ import "clsx";
|
|
|
28
29
|
import "tailwind-merge";
|
|
29
30
|
import "lodash-es";
|
|
30
31
|
import "jotai";
|
|
31
|
-
import "@chaibuilder/runtime";
|
|
32
|
-
import "./plugin-sJ3Hzvpv.js";
|
|
33
|
-
import "@react-hookz/web";
|
|
34
|
-
import "tree-model";
|
|
35
32
|
import "react-quill";
|
|
33
|
+
import "@chaibuilder/runtime";
|
|
36
34
|
import "./STRINGS-TDN5UhWi.js";
|
|
37
35
|
import "flagged";
|
|
38
36
|
import "react-hotkeys-hook";
|
|
39
37
|
import "@floating-ui/dom";
|
|
40
38
|
import "@floating-ui/react-dom";
|
|
39
|
+
import "@react-hookz/web";
|
|
41
40
|
import "react-event-hook";
|
|
42
41
|
import "@tailwindcss/typography";
|
|
43
42
|
import "@tailwindcss/forms";
|
|
44
43
|
import "@tailwindcss/aspect-ratio";
|
|
45
44
|
import "tailwindcss-palette-generator";
|
|
45
|
+
import "./plugin-VDzc8jUO.js";
|
|
46
|
+
import "./_commonjsHelpers-f3sTPFkQ.js";
|
|
46
47
|
import "react-wrap-balancer";
|
|
47
48
|
import "react-dom";
|
|
48
49
|
import "prop-types";
|
|
@@ -57,68 +58,71 @@ import "react-icons-picker";
|
|
|
57
58
|
import "react-autosuggest";
|
|
58
59
|
import "fuse.js";
|
|
59
60
|
import "framer-motion";
|
|
61
|
+
import "tree-model";
|
|
60
62
|
export {
|
|
61
63
|
as as AISetContext,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
rs as AIUserPrompt,
|
|
65
|
+
is as AddBlocksDialog,
|
|
66
|
+
ps as AddBlocksPanel,
|
|
67
|
+
ls as BlockAttributesEditor,
|
|
66
68
|
ms as BlockPropsEditor,
|
|
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
|
-
|
|
69
|
+
us as BlockStyleEditor,
|
|
70
|
+
ds as CHAI_BUILDER_EVENTS,
|
|
71
|
+
cs as ChaiBuilderCanvas,
|
|
72
|
+
Bs as ChaiBuilderEditor,
|
|
73
|
+
ks as DarkModeSwitcher,
|
|
74
|
+
ns as DefaultChaiBlocks,
|
|
75
|
+
Cs as ImportHTML,
|
|
76
|
+
Ss as Outline,
|
|
77
|
+
gs as ScreenSizes,
|
|
78
|
+
Is as ThemeOptions,
|
|
79
|
+
hs as UILibraries,
|
|
80
|
+
As as UndoRedo,
|
|
81
|
+
Ps as emitChaiBuilderMsg,
|
|
82
|
+
Xs as generateBlockId,
|
|
83
|
+
Us as getBlocksFromHTML,
|
|
84
|
+
ys as getClassValueAndUnit,
|
|
85
|
+
Io as i18n,
|
|
86
|
+
Ys as mergeClasses,
|
|
87
|
+
Ls as useAddBlock,
|
|
88
|
+
bs as useAddClassesToBlocks,
|
|
89
|
+
so as useBlocksStore,
|
|
90
|
+
oo as useBlocksStoreUndoableActions,
|
|
91
|
+
eo as useBrandingOptions,
|
|
92
|
+
to as useBuilderProp,
|
|
93
|
+
Es as useBuilderReset,
|
|
94
|
+
Ms as useCanvasWidth,
|
|
95
|
+
fs as useCanvasZoom,
|
|
96
|
+
vs as useChaiBuilderMsgListener,
|
|
95
97
|
xs as useCodeEditor,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
Ds as useCopyBlockIds,
|
|
99
|
+
Ts as useCopyToClipboard,
|
|
100
|
+
ao as useCurrentPage,
|
|
101
|
+
Rs as useCutBlockIds,
|
|
102
|
+
Hs as useDarkMode,
|
|
103
|
+
Os as useDuplicateBlocks,
|
|
104
|
+
ro as useGlobalBlocksList,
|
|
105
|
+
io as useGlobalBlocksStore,
|
|
106
|
+
Vs as useHiddenBlockIds,
|
|
107
|
+
ws as useHighlightBlockId,
|
|
108
|
+
Gs as useLayoutVariant,
|
|
109
|
+
Ns as usePasteBlocks,
|
|
106
110
|
js as usePreviewMode,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
po as useRemoveBlocks,
|
|
112
|
+
zs as useRemoveClassesFromBlocks,
|
|
113
|
+
lo as useSavePage,
|
|
114
|
+
mo as useSelectedBlock,
|
|
115
|
+
Fs as useSelectedBlockAllClasses,
|
|
116
|
+
_s as useSelectedBlockCurrentClasses,
|
|
117
|
+
uo as useSelectedBlockIds,
|
|
118
|
+
co as useSelectedBlocksDisplayChild,
|
|
119
|
+
qs as useSelectedBreakpoints,
|
|
120
|
+
Js as useSelectedStylingBlocks,
|
|
121
|
+
Ks as useStylingBreakpoint,
|
|
122
|
+
Qs as useStylingState,
|
|
123
|
+
So as useTranslation,
|
|
124
|
+
Ws as useUILibraryBlocks,
|
|
125
|
+
Bo as useUndoManager,
|
|
126
|
+
ko as useUpdateBlocksProps,
|
|
127
|
+
no as useUpdateBlocksPropsRealtime
|
|
124
128
|
};
|
|
@@ -23,6 +23,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
23
23
|
}), M = (e) => ({
|
|
24
24
|
type: "singular",
|
|
25
25
|
default: e.default || "",
|
|
26
|
+
hidden: n(e, "hidden", !1),
|
|
26
27
|
binding: n(e, "binding", !0),
|
|
27
28
|
dataType: "string",
|
|
28
29
|
required: e.required || !1,
|
|
@@ -37,6 +38,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
37
38
|
}), B = (e) => ({
|
|
38
39
|
type: "singular",
|
|
39
40
|
default: e.default || "",
|
|
41
|
+
hidden: n(e, "hidden", !1),
|
|
40
42
|
binding: n(e, "binding", !0),
|
|
41
43
|
dataType: "string",
|
|
42
44
|
required: e.required || !1,
|
|
@@ -57,6 +59,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
57
59
|
i18n: e.i18n || !1,
|
|
58
60
|
default: e.default || !1,
|
|
59
61
|
dataType: "boolean",
|
|
62
|
+
hidden: n(e, "hidden", !1),
|
|
60
63
|
binding: n(e, "binding", !0),
|
|
61
64
|
ai: e.ai || void 0,
|
|
62
65
|
schema: {
|
|
@@ -70,6 +73,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
70
73
|
}), W = (e) => ({
|
|
71
74
|
type: "singular",
|
|
72
75
|
default: e.default || "",
|
|
76
|
+
hidden: n(e, "hidden", !1),
|
|
73
77
|
binding: n(e, "binding", !0),
|
|
74
78
|
dataType: "number",
|
|
75
79
|
required: e.required || !1,
|
|
@@ -82,6 +86,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
82
86
|
}), X = (e) => ({
|
|
83
87
|
type: "singular",
|
|
84
88
|
default: e.default || "",
|
|
89
|
+
hidden: n(e, "hidden", !1),
|
|
85
90
|
binding: n(e, "binding", !0),
|
|
86
91
|
required: e.required || !1,
|
|
87
92
|
dataType: "string",
|
|
@@ -98,6 +103,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
98
103
|
type: "singular",
|
|
99
104
|
i18n: e.i18n || !1,
|
|
100
105
|
default: e.default || "",
|
|
106
|
+
hidden: n(e, "hidden", !1),
|
|
101
107
|
binding: n(e, "binding", !0),
|
|
102
108
|
dataType: "string",
|
|
103
109
|
ai: e.ai || void 0,
|
|
@@ -177,6 +183,7 @@ const N = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
177
183
|
}), H = (e) => ({
|
|
178
184
|
type: "singular",
|
|
179
185
|
default: e.default || "",
|
|
186
|
+
hidden: n(e, "hidden", !1),
|
|
180
187
|
binding: n(e, "binding", !0),
|
|
181
188
|
dataType: "string",
|
|
182
189
|
ai: e.ai || void 0,
|
|
@@ -198,11 +205,11 @@ var m = {
|
|
|
198
205
|
function j(e, t) {
|
|
199
206
|
if (e == null)
|
|
200
207
|
return {};
|
|
201
|
-
var i = P(e, t), r,
|
|
208
|
+
var i = P(e, t), r, d;
|
|
202
209
|
if (Object.getOwnPropertySymbols) {
|
|
203
|
-
var
|
|
204
|
-
for (
|
|
205
|
-
r =
|
|
210
|
+
var u = Object.getOwnPropertySymbols(e);
|
|
211
|
+
for (d = 0; d < u.length; d++)
|
|
212
|
+
r = u[d], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
|
|
206
213
|
}
|
|
207
214
|
return i;
|
|
208
215
|
}
|
|
@@ -232,8 +239,8 @@ function f(e, t) {
|
|
|
232
239
|
var i = Object.keys(e);
|
|
233
240
|
if (Object.getOwnPropertySymbols) {
|
|
234
241
|
var r = Object.getOwnPropertySymbols(e);
|
|
235
|
-
t && (r = r.filter(function(
|
|
236
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
242
|
+
t && (r = r.filter(function(d) {
|
|
243
|
+
return Object.getOwnPropertyDescriptor(e, d).enumerable;
|
|
237
244
|
})), i.push.apply(i, r);
|
|
238
245
|
}
|
|
239
246
|
return i;
|
|
@@ -282,42 +289,42 @@ function x(e) {
|
|
|
282
289
|
var t = (i) => {
|
|
283
290
|
var {
|
|
284
291
|
attr: r,
|
|
285
|
-
size:
|
|
286
|
-
title:
|
|
287
|
-
} = e, b = j(e, w), g =
|
|
288
|
-
return i.className && (
|
|
292
|
+
size: d,
|
|
293
|
+
title: u
|
|
294
|
+
} = e, b = j(e, w), g = d || i.size || "1em", o;
|
|
295
|
+
return i.className && (o = i.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ l.createElement("svg", s({
|
|
289
296
|
stroke: "currentColor",
|
|
290
297
|
fill: "currentColor",
|
|
291
298
|
strokeWidth: "0"
|
|
292
299
|
}, i.attr, r, b, {
|
|
293
|
-
className:
|
|
300
|
+
className: o,
|
|
294
301
|
style: c(c({
|
|
295
302
|
color: e.color || i.color
|
|
296
303
|
}, i.style), e.style),
|
|
297
304
|
height: g,
|
|
298
305
|
width: g,
|
|
299
306
|
xmlns: "http://www.w3.org/2000/svg"
|
|
300
|
-
}),
|
|
307
|
+
}), u && /* @__PURE__ */ l.createElement("title", null, u), e.children);
|
|
301
308
|
};
|
|
302
309
|
return p !== void 0 ? /* @__PURE__ */ l.createElement(p.Consumer, null, (i) => t(i)) : t(m);
|
|
303
310
|
}
|
|
304
311
|
export {
|
|
305
312
|
J as G,
|
|
306
313
|
K as S,
|
|
307
|
-
|
|
314
|
+
R as T,
|
|
308
315
|
N as a,
|
|
309
316
|
M as b,
|
|
310
317
|
z as c,
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
B as d,
|
|
319
|
+
A as e,
|
|
313
320
|
X as f,
|
|
314
321
|
D as g,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
+
U as h,
|
|
323
|
+
L as l,
|
|
324
|
+
$ as m,
|
|
325
|
+
H as o,
|
|
326
|
+
V as q,
|
|
327
|
+
G as r,
|
|
328
|
+
F as v,
|
|
322
329
|
W as y
|
|
323
330
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("lodash-es"),b=require("clsx"),h=require("tailwind-merge"),d=require("react");function v(e=6,t="abcdefghijklmnopqrstuvwxyzABCD"){let i="";for(let n=e;n>0;--n)i+=t[Math.floor(Math.random()*t.length)];return i}const O=e=>e>=1536?"2XL":e>=1280?"XL":e>=1024?"LG":e>=768?"MD":e>=640?"SM":"XS",w=(...e)=>h.twMerge(b.clsx(e)),j="#styles:",q=e=>({type:"singular",default:e.default||"",binding:r.get(e,"binding",!0),dataType:"string",schema:{type:"string",...r.omit(e,["i18n","required"])},uiSchema:{"ui:widget":"code"}}),P=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",required:e.required||!1,ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["ai","required"])},uiSchema:{"ui:placeholder":e.placeholder||"Enter here"}}),S=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",required:e.required||!1,ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":e.placeholder||"Enter here","ui:options":{rows:e.rows||4}}}),T=e=>({type:"singular",i18n:e.i18n||!1,default:e.default||!1,dataType:"boolean",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),ai:e.ai||void 0,schema:{type:"boolean",...r.omit(e,["i18n","required"])},uiSchema:{"ui:title":e.title||"Select Item","ui:description":""}}),x=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"number",required:e.required||!1,ai:e.ai||void 0,schema:{type:"number",...r.omit(e,["i18n","required"])},uiSchema:{}}),E=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),required:e.required||!1,dataType:"string",ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["i18n","required","options","binding"]),oneOf:e.options.map(t=>({const:t.value,title:t.title}))},uiSchema:{"ui:widget":"select"}}),I=e=>({type:"singular",i18n:e.i18n||!1,default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["i18n","required"])},uiSchema:{"ui:widget":"color"}}),D=e=>({type:"singular",default:e.default||"",binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["i18n","required"])},uiSchema:{"ui:widget":"richtext"}}),C=e=>({type:"model",title:e.title,dataType:"object",default:e.default||{},binding:r.get(e,"binding",!0),properties:e.properties}),N=e=>({type:"list",itemProperties:e.itemProperties,binding:r.get(e,"binding",!0),title:e.title,ai:e.ai||void 0,dataType:"array",default:e.default||[],itemTitle:e.getItemLabel?e.getItemLabel({}):()=>""}),_=e=>({type:"styles",binding:!1,default:`${j},${e.default||""}`,presets:e.presets||{}}),z=e=>({default:e.default||"",binding:r.get(e,"binding",!0),type:"singular",dataType:"string",ai:e.ai||void 0,schema:{type:"string",title:"Icon",default:e.default||""},uiSchema:{"ui:widget":"icon"}}),L=e=>({default:e.default,type:"singular",binding:r.get(e,"binding",!0),dataType:"object",ai:e.ai||void 0,schema:{type:"object",...e||{},properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}}},uiSchema:{"ui:field":"link"}}),M=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||void 0,schema:{type:"string",...r.omit(e,["i18n","required"])},uiSchema:{"ui:widget":"image"}});var f={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=d.createContext&&d.createContext(f),B=["attr","size","title"];function U(e,t){if(e==null)return{};var i=G(e,t),n,a;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(a=0;a<u.length;a++)n=u[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function G(e,t){if(e==null)return{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;i[n]=e[n]}return i}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,n)}return i}function g(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?p(Object(i),!0).forEach(function(n){W(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function W(e,t,i){return t=X(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function X(e){var t=V(e,"string");return typeof t=="symbol"?t:t+""}function V(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.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 m(e){return e&&e.map((t,i)=>d.createElement(t.tag,g({key:i},t.attr),m(t.child)))}function $(e){return t=>d.createElement(A,o({attr:g({},e.attr)},t),m(e.child))}function A(e){var t=i=>{var{attr:n,size:a,title:u}=e,y=U(e,B),s=a||i.size||"1em",l;return i.className&&(l=i.className),e.className&&(l=(l?l+" ":"")+e.className),d.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,y,{className:l,style:g(g({color:e.color||i.color},i.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),u&&d.createElement("title",null,u),e.children)};return c!==void 0?d.createElement(c.Consumer,null,i=>t(i)):t(f)}exports.GenIcon=$;exports.S=N;exports.T=_;exports.b=C;exports.c=S;exports.cn=w;exports.f=E;exports.g=P;exports.generateUUID=v;exports.getBreakpointValue=O;exports.h=I;exports.l=q;exports.m=D;exports.o=M;exports.q=z;exports.r=T;exports.v=L;exports.y=x;
|