@chaibuilder/sdk 4.0.0-beta.1 → 4.0.0-beta.2
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/README.md +27 -20
- package/dist/2SSKDMRQ-C4VFVd-q.cjs +1 -0
- package/dist/2SSKDMRQ-DSnzF_1o.js +42 -0
- package/dist/AP7HFJJL-B7YYCY9q.cjs +1228 -0
- package/dist/AP7HFJJL-Cxwj01Aq.js +9214 -0
- package/dist/IconPicker-C9-ieDWm.cjs +1 -0
- package/dist/IconPicker-RqVvq6G2.js +59 -0
- package/dist/WDYDFRGG-C7aSUcjs.js +33 -0
- package/dist/WDYDFRGG-b3T2SQbz.cjs +1 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/actions-registery-CZ1w0NKa.js +15545 -0
- package/dist/actions-registery-YnFmU21O.cjs +418 -0
- package/dist/actions.cjs +1 -0
- package/dist/actions.d.ts +3202 -0
- package/dist/actions.js +216 -0
- package/dist/active-in-another-tab-Clng6zpY.cjs +1 -0
- package/dist/active-in-another-tab-wb8qolB8.js +34 -0
- package/dist/add-new-language-page-C4BuMTaN.cjs +1 -0
- package/dist/add-new-language-page-D7NDABl1.js +401 -0
- package/dist/add-new-page-B4hc0B-g.js +31 -0
- package/dist/add-new-page-BNfwKjRd.cjs +1 -0
- package/dist/ai-panel-content-BnbURb7j.js +61 -0
- package/dist/ai-panel-content-DPy2jgKw.cjs +1 -0
- package/dist/ai-panel-default-lang-3tCHzab5.cjs +3 -0
- package/dist/ai-panel-default-lang-oVk4TDeb.js +341 -0
- package/dist/ai-panel-other-lang-BBHCCSen.cjs +1 -0
- package/dist/ai-panel-other-lang-DmQ3QMDD.js +162 -0
- package/dist/ai-prompt-input-DaTyfib-.js +655 -0
- package/dist/ai-prompt-input-b5ty81RB.cjs +1 -0
- package/dist/ai-translation-prompt-DJPe2O-n.js +28 -0
- package/dist/ai-translation-prompt-c0Q3zkT2.cjs +1 -0
- package/dist/apply-binding-6iwlED02.js +833 -0
- package/dist/apply-binding-KKp5PnpZ.cjs +1 -0
- package/dist/{code-display-337R7Dev.js → code-display-BzBq5xSn.js} +1 -1
- package/dist/code-display-Q3_sK_Ta.cjs +1 -0
- package/dist/code-editor-BQZi6-FB.cjs +1 -0
- package/dist/code-editor-DWWnphW9.js +50 -0
- package/dist/common-functions-B3a4xKt_.cjs +1 -0
- package/dist/common-functions-D2lMFR6K.js +13 -0
- package/dist/continue-editing-in-this-client-BllU94XG.js +24 -0
- package/dist/continue-editing-in-this-client-D9HyD4GP.cjs +1 -0
- package/dist/core-BoRDjj4h.cjs +1 -0
- package/dist/core-yvI6kCyw.js +56 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +51 -383
- package/dist/core.js +39 -106
- package/dist/css-import-modal-BSMGKA2T.cjs +13 -0
- package/dist/{css-import-modal-DA2L6kwP.js → css-import-modal-D72a-16X.js} +39 -38
- package/dist/delete-design-token-Cd1ZDtqT.js +40 -0
- package/dist/delete-design-token-D_TLlO3I.cjs +1 -0
- package/dist/delete-page-ByQwBupJ.cjs +1 -0
- package/dist/delete-page-DC8pzvWW.js +70 -0
- package/dist/design-token-usage-BqZeR1sT.cjs +1 -0
- package/dist/design-token-usage-DE4XCDdn.js +113 -0
- package/dist/digital-asset-manager-BYLKFEYi.cjs +1 -0
- package/dist/digital-asset-manager-C_gL_0YY.js +876 -0
- package/dist/duplicate-page-BoVhko2q.js +133 -0
- package/dist/duplicate-page-vdvwLQLo.cjs +1 -0
- package/dist/dynamic-page-selector-CSndg2-y.js +85 -0
- package/dist/dynamic-page-selector-DdnbCuQZ.cjs +1 -0
- package/dist/fonts-B-Xt29pe.cjs +1 -0
- package/dist/fonts-DRly3Wzd.js +78 -0
- package/dist/{get-chai-builder-tailwind-config-C6MHaUM0.cjs → get-chai-builder-tailwind-config-B9rCyiQo.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-BqaIvg8p.js → get-chai-builder-tailwind-config-DjoVOuAf.js} +13 -10
- package/dist/{get-chai-builder-theme-D0IsUvK4.js → get-chai-builder-theme-BYtp20KD.js} +4 -4
- package/dist/get-chai-builder-theme-Dl72X7cz.cjs +1 -0
- package/dist/get-seo-defaults-9zHebckY.js +65 -0
- package/dist/get-seo-defaults-Cw7vFt-B.cjs +1 -0
- package/dist/image-compression-DZ9WMmyn.cjs +1 -0
- package/dist/image-compression-DsZ1oqpb.js +37 -0
- package/dist/image-editor-DTspjj_c.cjs +1 -0
- package/dist/image-editor-oypq8asR.js +108 -0
- package/dist/index-B-rSiAp_.cjs +1 -0
- package/dist/index-BDnwJqMw.js +4732 -0
- package/dist/index-CbwxUFy_.cjs +5 -0
- package/dist/index-CnSjWE1P.cjs +160 -0
- package/dist/index-Dxfyt4d4.js +39 -0
- package/dist/index-S8ibZk9Q.js +19069 -0
- package/dist/json-diff-viewer-B5dr-Y_L.js +258 -0
- package/dist/json-diff-viewer-XX1pgabt.cjs +8 -0
- package/dist/lang-panel-BPxex-M2.cjs +1 -0
- package/dist/lang-panel-Cn83SRzd.js +215 -0
- package/dist/manage-design-tokens-ConiyuPr.cjs +1 -0
- package/dist/manage-design-tokens-lP4HLS0P.js +240 -0
- package/dist/mark-as-template-DYRxre1f.cjs +1 -0
- package/dist/mark-as-template-jncsjfHm.js +156 -0
- package/dist/models-5gOsRC56.cjs +1 -0
- package/dist/models-D95ZYr_x.js +70 -0
- package/dist/nested-path-selector-content-B-8LqhXI.js +87 -0
- package/dist/nested-path-selector-content-BYtLi7mC.cjs +1 -0
- package/dist/no-language-page-content-DAbLq0gX.cjs +1 -0
- package/dist/no-language-page-content-D_zd9Rb0.js +42 -0
- package/dist/no-language-page-dialog-C5Ps6YYL.js +10 -0
- package/dist/no-language-page-dialog-fXmbQO7L.cjs +1 -0
- package/dist/page-creator-VWIB2VAs.cjs +1 -0
- package/dist/page-creator-wCMtlE6Z.js +795 -0
- package/dist/page-lock-BPCxfv9J.js +30 -0
- package/dist/page-lock-DweiYy1w.cjs +1 -0
- package/dist/page-locked-dialog-BlbgvaG2.cjs +1 -0
- package/dist/page-locked-dialog-ByGl18_m.js +133 -0
- package/dist/page-manager-new-BWFE-S-O.js +394 -0
- package/dist/page-manager-new-D0lGfNnS.cjs +1 -0
- package/dist/page-manager-search-and-filter-DpGMoOII.cjs +1 -0
- package/dist/page-manager-search-and-filter-kNJFWJ86.js +201 -0
- package/dist/page-revisions-content-DYxXZqmh.cjs +1 -0
- package/dist/page-revisions-content-Ulr8slUN.js +445 -0
- package/dist/pages.cjs +1 -0
- package/dist/pages.d.ts +492 -0
- package/dist/pages.js +27 -0
- package/dist/plugin-3ZKK6RXm.js +245 -0
- package/dist/plugin-C6rgJDNQ.cjs +22 -0
- package/dist/publish-pages-content-BTPzt_m4.js +178 -0
- package/dist/publish-pages-content-D6g8GAsd.cjs +1 -0
- package/dist/register-partial-type-BjtdfKHE.js +36 -0
- package/dist/register-partial-type-ig9fUWIJ.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +26 -13
- package/dist/render.js +130 -124
- package/dist/rte-widget-modal-DrMzWWjw.cjs +1 -0
- package/dist/rte-widget-modal-Rk_NW3KU.js +38 -0
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +306 -7
- package/dist/runtime.js +44 -1
- package/dist/save-to-lib-BK3uTFss.js +422 -0
- package/dist/save-to-lib-DHHUO12i.cjs +1 -0
- package/dist/sdk.css +1 -1
- package/dist/selected-block-display-CU3TwIMA.js +319 -0
- package/dist/selected-block-display-DSFhddPj.cjs +16 -0
- package/dist/seo-panel-Dl0IDV09.cjs +2 -0
- package/dist/seo-panel-jbzxFioc.js +798 -0
- package/dist/shared-json-ld-BL_dv3_q.js +565 -0
- package/dist/shared-json-ld-DPNkqDC1.cjs +1 -0
- package/dist/slug-input-1qwKkXhA.js +86 -0
- package/dist/slug-input-YVLjtTI3.cjs +1 -0
- package/dist/supabase-actions.cjs +1 -0
- package/dist/supabase-actions.d.ts +284 -0
- package/dist/supabase-actions.js +524 -0
- package/dist/take-over-request-DKvKi3mM.js +63 -0
- package/dist/take-over-request-DvMIg_cZ.cjs +1 -0
- package/dist/theme-panel-footer-BMOaPLWc.cjs +1 -0
- package/dist/theme-panel-footer-DbMDLYGI.js +25 -0
- package/dist/translation-warning-modal-9wTwIy_9.js +26 -0
- package/dist/translation-warning-modal-DjTwz75c.cjs +1 -0
- package/dist/unmark-as-template-CdqIJJER.cjs +1 -0
- package/dist/unmark-as-template-Dulvf7Zw.js +39 -0
- package/dist/unpublish-page-BwSVBf0_.cjs +1 -0
- package/dist/unpublish-page-Degu5Cy9.js +27 -0
- package/dist/use-page-expand-manager-B6XTvk0E.cjs +1 -0
- package/dist/use-page-expand-manager-Cf4MUEJw.js +85 -0
- package/dist/{tailwind.cjs → utils.cjs} +1 -1
- package/dist/{tailwind.d.ts → utils.d.ts} +12 -11
- package/dist/utils.js +7 -0
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +0 -6
- package/dist/web-blocks.js +258 -251
- package/dist/web-preview-DXE4Jnf5.js +73 -0
- package/dist/web-preview-YzKxyXft.cjs +1 -0
- package/package.json +175 -105
- package/dist/IconPicker-CGWn9C4u.cjs +0 -1
- package/dist/IconPicker-QvxJ-4Ez.js +0 -64
- package/dist/apply-binding-DCno1xQL.js +0 -711
- package/dist/apply-binding-DvHNFLQD.cjs +0 -1
- package/dist/code-display-BZ1x7SqI.cjs +0 -1
- package/dist/code-editor-B28LoECM.cjs +0 -1
- package/dist/code-editor-CfG2FhJ-.js +0 -58
- package/dist/common-functions-BGzDsf1z.js +0 -14
- package/dist/common-functions-BZmyleS1.cjs +0 -1
- package/dist/css-import-modal-CENUYvcl.cjs +0 -13
- package/dist/get-chai-builder-theme-Ck_Z4Q-M.cjs +0 -1
- package/dist/index-CaGNHF7f.js +0 -12209
- package/dist/index-Gn6pJt2v.cjs +0 -166
- package/dist/mockServiceWorker.js +0 -307
- package/dist/plugin-B5627hMN.js +0 -195
- package/dist/plugin-UxTRfDum.cjs +0 -22
- package/dist/rte-widget-modal-DL739qeQ.cjs +0 -1
- package/dist/rte-widget-modal-Dte0od04.js +0 -41
- package/dist/tailwind.js +0 -7
- package/dist/tooltip-A4qGk781.cjs +0 -1
- package/dist/tooltip-tLiIOgjq.js +0 -1067
- package/dist/ui.cjs +0 -1
- package/dist/ui.d.ts +0 -415
- package/dist/ui.js +0 -129
- package/dist/vite.svg +0 -1
package/dist/runtime.d.ts
CHANGED
|
@@ -1,10 +1,309 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
3
|
+
import { UiSchema } from '@rjsf/utils';
|
|
1
4
|
|
|
2
|
-
export
|
|
5
|
+
export declare const builderProp: (options: ChaiBlockPropSchema) => ChaiBlockPropSchema;
|
|
6
|
+
|
|
7
|
+
export declare let CHAI_GLOBAL_DATA_PROVIDER: (args: {
|
|
8
|
+
lang: string;
|
|
9
|
+
draft: boolean;
|
|
10
|
+
inBuilder: boolean;
|
|
11
|
+
}) => Promise<any>;
|
|
12
|
+
|
|
13
|
+
export declare type ChaiAsyncProp<T> = T | undefined;
|
|
14
|
+
|
|
15
|
+
export declare type ChaiBlock<BlockProps = Record<string, any>> = {
|
|
16
|
+
_id: string;
|
|
17
|
+
_type: string;
|
|
18
|
+
_name?: string;
|
|
19
|
+
_parent?: string | null;
|
|
20
|
+
} & BlockProps;
|
|
21
|
+
|
|
22
|
+
export declare type ChaiBlockComponentProps<BlockProps, PageData = Record<string, unknown>> = ChaiBlock<BlockProps> & {
|
|
23
|
+
$loading?: boolean;
|
|
24
|
+
blockProps: Record<string, string>;
|
|
25
|
+
inBuilder: boolean;
|
|
26
|
+
lang: string;
|
|
27
|
+
draft: boolean;
|
|
28
|
+
pageProps?: ChaiPageProps;
|
|
29
|
+
pageData?: PageData;
|
|
30
|
+
children?: default_2.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare interface ChaiBlockDefinition<T = Record<string, any>, K = Record<string, any>> {
|
|
34
|
+
component: default_2.ComponentType<ChaiBlockComponentProps<T>>;
|
|
35
|
+
type: string;
|
|
36
|
+
label: string;
|
|
37
|
+
group: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
wrapper?: boolean;
|
|
40
|
+
blocks?: ChaiBlock[] | (() => ChaiBlock[]);
|
|
41
|
+
category?: string;
|
|
42
|
+
hidden?: boolean | ((parentType?: string) => boolean);
|
|
43
|
+
icon?: default_2.ReactNode | default_2.ComponentType;
|
|
44
|
+
dataProviderMode?: "live" | "mock";
|
|
45
|
+
dataProviderDependencies?: string[];
|
|
46
|
+
dataProvider?: (args: {
|
|
47
|
+
lang: string;
|
|
48
|
+
draft: boolean;
|
|
49
|
+
inBuilder: boolean;
|
|
50
|
+
block: ChaiBlock<T>;
|
|
51
|
+
pageProps: ChaiPageProps;
|
|
52
|
+
}) => K;
|
|
53
|
+
schema?: ChaiBlockSchema;
|
|
54
|
+
uiSchema?: ChaiBlockUiSchema;
|
|
55
|
+
i18nProps?: string[];
|
|
56
|
+
aiProps?: string[];
|
|
57
|
+
inlineEditProps?: string[];
|
|
58
|
+
canAcceptBlock?: (type: string) => boolean;
|
|
59
|
+
canDelete?: () => boolean;
|
|
60
|
+
canMove?: () => boolean;
|
|
61
|
+
canDuplicate?: () => boolean;
|
|
62
|
+
canBeNested?: (type: string) => boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare type ChaiBlockDefinitionOptions<T, K> = Omit<ChaiBlockDefinition<T, K>, "component">;
|
|
66
|
+
|
|
67
|
+
export declare type ChaiBlockPropSchema = RJSFSchema & {
|
|
68
|
+
ui?: ChaiBlockUiSchema;
|
|
69
|
+
default: any;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare type ChaiBlockSchema = {
|
|
73
|
+
properties?: Record<string, ChaiBlockPropSchema>;
|
|
74
|
+
allOf?: any[];
|
|
75
|
+
oneOf?: any[];
|
|
76
|
+
} & Partial<Pick<ChaiBlockPropSchema, "required" | "dependencies" | "ui" | "title" | "description" | "default">>;
|
|
77
|
+
|
|
78
|
+
export declare type ChaiBlockSchemas = {
|
|
79
|
+
schema: object | Omit<ChaiBlockSchema, "ui">;
|
|
80
|
+
uiSchema?: ChaiBlockUiSchema;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export declare type ChaiBlockUiSchema = UiSchema;
|
|
84
|
+
|
|
85
|
+
declare type ChaiBuilderPage = {
|
|
86
|
+
id: string;
|
|
87
|
+
slug: string;
|
|
88
|
+
name: string;
|
|
89
|
+
lang: string;
|
|
90
|
+
online: boolean;
|
|
91
|
+
seo: Record<string, any>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
declare type ChaiBuilderPageType = {
|
|
95
|
+
key: string;
|
|
96
|
+
helpText?: string;
|
|
97
|
+
icon?: string;
|
|
98
|
+
hasSlug?: boolean;
|
|
99
|
+
name: string | (() => Promise<string>);
|
|
100
|
+
dynamicSegments?: string;
|
|
101
|
+
dynamicSlug?: string;
|
|
102
|
+
getDynamicPages?: ({ query, uuid }: {
|
|
103
|
+
query?: string;
|
|
104
|
+
uuid?: string;
|
|
105
|
+
}) => Promise<ChaiDynamicPage[]>;
|
|
106
|
+
search?: (query: string) => Promise<PageTypeSearchResult[] | Error>;
|
|
107
|
+
resolveLink?: (id: string, draft?: boolean, lang?: string) => Promise<string>;
|
|
108
|
+
onCreate?: (data: Omit<ChaiBuilderPage, "seo">) => Promise<void>;
|
|
109
|
+
onUpdate?: (data: ChaiBuilderPage) => Promise<void>;
|
|
110
|
+
onDelete?: (data: Pick<ChaiBuilderPage, "id">) => Promise<void>;
|
|
111
|
+
dataProvider?: (args: {
|
|
112
|
+
lang: string;
|
|
113
|
+
draft: boolean;
|
|
114
|
+
inBuilder: boolean;
|
|
115
|
+
pageProps: ChaiPageProps;
|
|
116
|
+
}) => Promise<Record<string, any>>;
|
|
117
|
+
defaultTrackingInfo?: () => Record<string, any>;
|
|
118
|
+
defaultSeo?: () => Record<string, any>;
|
|
119
|
+
defaultJSONLD?: () => Record<string, any>;
|
|
120
|
+
defaultMetaTags?: () => Record<string, string>;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export declare type ChaiDataProviderArgs<T = Record<string, any>, K = Record<string, any>> = {
|
|
124
|
+
block: ChaiBlock<T>;
|
|
125
|
+
} & K;
|
|
126
|
+
|
|
127
|
+
declare type ChaiDynamicPage = {
|
|
128
|
+
id: string;
|
|
129
|
+
slug: string;
|
|
130
|
+
name: string;
|
|
131
|
+
primaryPage?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export declare type ChaiFont = ChaiFontViaUrl | ChaiFontViaSrc;
|
|
135
|
+
|
|
136
|
+
export declare type ChaiFontViaSrc = {
|
|
137
|
+
family: string;
|
|
138
|
+
src: {
|
|
139
|
+
url: string;
|
|
140
|
+
format: string;
|
|
141
|
+
fontWeight?: string;
|
|
142
|
+
fontStyle?: string;
|
|
143
|
+
fontDisplay?: string;
|
|
144
|
+
fontStretch?: string;
|
|
145
|
+
}[];
|
|
146
|
+
fallback: string;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export declare type ChaiFontViaUrl = {
|
|
150
|
+
family: string;
|
|
151
|
+
url: string;
|
|
152
|
+
fallback: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare interface ChaiPageProps {
|
|
156
|
+
slug: string;
|
|
157
|
+
searchParams?: Record<string, string>;
|
|
158
|
+
[key: string]: any;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export declare type ChaiRuntimeProp<T> = T | undefined;
|
|
162
|
+
|
|
163
|
+
export declare interface ChaiServerBlockDefinition<T = Record<string, any>, K = Record<string, any>> {
|
|
164
|
+
component: default_2.ComponentType<ChaiBlockComponentProps<T>>;
|
|
165
|
+
type: string;
|
|
166
|
+
dataProvider?: (args: {
|
|
167
|
+
draft: boolean;
|
|
168
|
+
inBuilder: boolean;
|
|
169
|
+
lang: string;
|
|
170
|
+
block: ChaiBlock<T>;
|
|
171
|
+
pageProps: ChaiPageProps;
|
|
172
|
+
}) => Promise<K>;
|
|
173
|
+
suspenseFallback?: default_2.ComponentType<any>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export declare type ChaiStyles = {
|
|
177
|
+
[key: string]: string;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export declare const closestBlockProp: (blockType: keyof typeof REGISTERED_CHAI_BLOCKS, prop: string) => ChaiBlockPropSchema;
|
|
181
|
+
|
|
182
|
+
declare interface CollectionConfig<T> {
|
|
183
|
+
id: string;
|
|
184
|
+
name: string;
|
|
185
|
+
icon?: string;
|
|
186
|
+
filters?: {
|
|
187
|
+
id: string;
|
|
188
|
+
name: string;
|
|
189
|
+
}[];
|
|
190
|
+
sort?: {
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
}[];
|
|
194
|
+
fetch: (params: CollectionFetchParams) => Promise<{
|
|
195
|
+
items: T[];
|
|
196
|
+
totalItems?: number;
|
|
197
|
+
}>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export declare type CollectionFetchParams = {
|
|
201
|
+
block: ChaiBlock;
|
|
202
|
+
inBuilder: boolean;
|
|
203
|
+
draft: boolean;
|
|
204
|
+
lang: string;
|
|
205
|
+
pageProps: {
|
|
206
|
+
slug: string;
|
|
207
|
+
params?: Record<string, string>;
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export declare const COLLECTIONS: Record<string, CollectionConfig<any>>;
|
|
213
|
+
|
|
214
|
+
export declare const defaultChaiStyles: (classes: string) => string;
|
|
215
|
+
|
|
216
|
+
export declare const getAIBlockProps: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => any[] | ChaiBlockDefinition<Record<string, any>, Record<string, any>> | ChaiServerBlockDefinition<Record<string, any>, Record<string, any>>;
|
|
217
|
+
|
|
218
|
+
export declare const getAllRegisteredFonts: () => ChaiFont[];
|
|
219
|
+
|
|
220
|
+
export declare const getBlockFormSchemas: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => {
|
|
221
|
+
schema: RJSFSchema;
|
|
222
|
+
uiSchema: UiSchema;
|
|
223
|
+
} | null;
|
|
224
|
+
|
|
225
|
+
export declare const getChaiCollection: (key: string) => CollectionConfig<any>;
|
|
226
|
+
|
|
227
|
+
export declare const getChaiCollections: () => CollectionConfig<any>[];
|
|
228
|
+
|
|
229
|
+
export declare const getChaiGlobalData: (args: {
|
|
230
|
+
lang: string;
|
|
231
|
+
draft: boolean;
|
|
232
|
+
inBuilder: boolean;
|
|
233
|
+
}) => Promise<any>;
|
|
234
|
+
|
|
235
|
+
export declare const getChaiPageType: (key: keyof typeof PAGE_TYPES) => ChaiBuilderPageType;
|
|
236
|
+
|
|
237
|
+
export declare const getChaiPageTypes: () => ChaiBuilderPageType[];
|
|
238
|
+
|
|
239
|
+
export declare const getDefaultBlockProps: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => Record<string, any>;
|
|
240
|
+
|
|
241
|
+
export declare const getI18nBlockProps: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => any[] | ChaiBlockDefinition<Record<string, any>, Record<string, any>> | ChaiServerBlockDefinition<Record<string, any>, Record<string, any>>;
|
|
242
|
+
|
|
243
|
+
export declare const getRegisteredChaiBlock: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => ChaiBlockDefinition | null;
|
|
244
|
+
|
|
245
|
+
export declare const getRegisteredFont: (family: string) => ChaiFont;
|
|
246
|
+
|
|
247
|
+
export declare const PAGE_TYPES: Record<string, ChaiBuilderPageType>;
|
|
248
|
+
|
|
249
|
+
declare type PageTypeSearchResult = {
|
|
250
|
+
id: string;
|
|
251
|
+
name: string;
|
|
252
|
+
slug?: string;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export declare const registerChaiBlock: <T extends Record<string, any> = Record<string, any>, K extends Record<string, any> = Record<string, any>>(component: default_2.ComponentType<ChaiBlockComponentProps<T>>, options: ChaiBlockDefinitionOptions<T, K>) => void;
|
|
256
|
+
|
|
257
|
+
export declare const registerChaiBlockSchema: (blockSchema: ChaiBlockSchema) => ChaiBlockSchemas;
|
|
258
|
+
|
|
259
|
+
export declare function registerChaiCollection<T = Record<any, any>>(id: string, collection: Omit<CollectionConfig<T>, "id">): void;
|
|
260
|
+
|
|
261
|
+
export declare const registerChaiFont: (family: string, font: Omit<ChaiFont, "family">) => void;
|
|
262
|
+
|
|
263
|
+
export declare const registerChaiGlobalDataProvider: <T>(globalDataProvider: (args: {
|
|
264
|
+
lang: string;
|
|
265
|
+
draft: boolean;
|
|
266
|
+
inBuilder: boolean;
|
|
267
|
+
}) => Promise<T>) => void;
|
|
268
|
+
|
|
269
|
+
export declare const registerChaiPageType: (key: string, pageTypeOptions: Omit<ChaiBuilderPageType, "key" | "hasSlug">) => void;
|
|
270
|
+
|
|
271
|
+
export declare const registerChaiPartialType: (key: string, pageTypeOptions: Omit<ChaiBuilderPageType, "key">) => void;
|
|
272
|
+
|
|
273
|
+
export declare const registerChaiServerBlock: <T extends Record<string, any> = Record<string, any>, K extends Record<string, any> = Record<string, any>>(component: default_2.ComponentType<ChaiBlockComponentProps<T>>, options: Pick<ChaiBlockDefinition<T, K>, "type" | "dataProvider" | "i18nProps" | "aiProps">) => void;
|
|
274
|
+
|
|
275
|
+
declare const REGISTERED_CHAI_BLOCKS: Record<string, ChaiBlockDefinition | ChaiServerBlockDefinition>;
|
|
276
|
+
|
|
277
|
+
export declare const runtimeProp: (options: ChaiBlockPropSchema) => ChaiBlockPropSchema;
|
|
278
|
+
|
|
279
|
+
export declare const setChaiBlockComponent: <T extends Record<string, any> = Record<string, any>>(type: keyof typeof REGISTERED_CHAI_BLOCKS, component: default_2.ComponentType<ChaiBlockComponentProps<T>>) => void;
|
|
280
|
+
|
|
281
|
+
export declare const setChaiBlockDataProvider: <K extends Record<string, any> = Record<string, any>>(type: string, dataProvider: (args: {
|
|
282
|
+
lang: string;
|
|
283
|
+
draft: boolean;
|
|
284
|
+
inBuilder: boolean;
|
|
285
|
+
block: ChaiBlock<K>;
|
|
286
|
+
pageProps: ChaiPageProps;
|
|
287
|
+
}) => Promise<K>) => void;
|
|
288
|
+
|
|
289
|
+
export declare const setChaiServerBlockDataProvider: <K extends Record<string, any> = Record<string, any>>(type: keyof typeof REGISTERED_CHAI_BLOCKS, dataProvider: (args: {
|
|
290
|
+
lang: string;
|
|
291
|
+
draft: boolean;
|
|
292
|
+
inBuilder: boolean;
|
|
293
|
+
block: ChaiBlock<K>;
|
|
294
|
+
pageProps: ChaiPageProps;
|
|
295
|
+
}) => Promise<K>) => void;
|
|
296
|
+
|
|
297
|
+
export declare const StylesProp: (defaultClasses?: string) => ChaiBlockPropSchema;
|
|
298
|
+
|
|
299
|
+
export declare const stylesProp: (defaultClasses?: string) => ChaiBlockPropSchema;
|
|
300
|
+
|
|
301
|
+
export declare const syncBlocksWithDefaults: (blocks: ChaiBlock[]) => ChaiBlock[];
|
|
302
|
+
|
|
303
|
+
export declare const useRegisteredChaiBlock: (type: keyof typeof REGISTERED_CHAI_BLOCKS) => any;
|
|
304
|
+
|
|
305
|
+
export declare const useRegisteredChaiBlocks: () => Record<string, ChaiBlockDefinition<Record<string, any>, Record<string, any>> | ChaiServerBlockDefinition<Record<string, any>, Record<string, any>>>;
|
|
306
|
+
|
|
307
|
+
export declare const useRegisteredFonts: () => ChaiFont[];
|
|
3
308
|
|
|
4
309
|
export { }
|
|
5
|
-
|
|
6
|
-
declare global {
|
|
7
|
-
interface Window {
|
|
8
|
-
clarity: any;
|
|
9
|
-
}
|
|
10
|
-
}
|
package/dist/runtime.js
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { S as o, b as i, d as l, r as g, a as C, s as c } from "./index-Dxfyt4d4.js";
|
|
2
|
+
import { b as p, C as P, P as B, a as k, g as d, d as n, f as m, e as f, r as u, c as S, h as y, i as D } from "./register-partial-type-BjtdfKHE.js";
|
|
3
|
+
import { a as A, g as T, r as b, u as v } from "./fonts-DRly3Wzd.js";
|
|
4
|
+
import { s as e } from "./core-yvI6kCyw.js";
|
|
5
|
+
import { c as F, g as I, a as E, b as G, d as L, e as O, r as _, f as j, h as H, i as N, u as V, j as W } from "./core-yvI6kCyw.js";
|
|
6
|
+
const s = e;
|
|
7
|
+
export {
|
|
8
|
+
p as CHAI_GLOBAL_DATA_PROVIDER,
|
|
9
|
+
P as COLLECTIONS,
|
|
10
|
+
B as PAGE_TYPES,
|
|
11
|
+
o as StylesProp,
|
|
12
|
+
i as builderProp,
|
|
13
|
+
F as closestBlockProp,
|
|
14
|
+
l as defaultChaiStyles,
|
|
15
|
+
I as getAIBlockProps,
|
|
16
|
+
A as getAllRegisteredFonts,
|
|
17
|
+
E as getBlockFormSchemas,
|
|
18
|
+
k as getChaiCollection,
|
|
19
|
+
d as getChaiCollections,
|
|
20
|
+
n as getChaiGlobalData,
|
|
21
|
+
m as getChaiPageType,
|
|
22
|
+
f as getChaiPageTypes,
|
|
23
|
+
G as getDefaultBlockProps,
|
|
24
|
+
L as getI18nBlockProps,
|
|
25
|
+
O as getRegisteredChaiBlock,
|
|
26
|
+
T as getRegisteredFont,
|
|
27
|
+
_ as registerChaiBlock,
|
|
28
|
+
g as registerChaiBlockSchema,
|
|
29
|
+
u as registerChaiCollection,
|
|
30
|
+
b as registerChaiFont,
|
|
31
|
+
S as registerChaiGlobalDataProvider,
|
|
32
|
+
y as registerChaiPageType,
|
|
33
|
+
D as registerChaiPartialType,
|
|
34
|
+
j as registerChaiServerBlock,
|
|
35
|
+
C as runtimeProp,
|
|
36
|
+
H as setChaiBlockComponent,
|
|
37
|
+
s as setChaiBlockDataProvider,
|
|
38
|
+
e as setChaiServerBlockDataProvider,
|
|
39
|
+
c as stylesProp,
|
|
40
|
+
N as syncBlocksWithDefaults,
|
|
41
|
+
V as useRegisteredChaiBlock,
|
|
42
|
+
W as useRegisteredChaiBlocks,
|
|
43
|
+
v as useRegisteredFonts
|
|
44
|
+
};
|