react-bricks 3.0.0-alpha.1 → 3.0.0-alpha.13
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/react-bricks.d.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import React, { FC, ReactElement, Context } from 'react';
|
|
2
|
-
import { BaseEditor,
|
|
2
|
+
import { BaseEditor, Editor as Editor$1, Node, Descendant } from 'slate';
|
|
3
3
|
import { ReactEditor, RenderElementProps, RenderLeafProps } from 'slate-react';
|
|
4
4
|
import { HistoryEditor } from 'slate-history';
|
|
5
|
-
import { UseQueryResult } from 'react-query';
|
|
6
5
|
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
6
|
+
import { UseQueryResult } from 'react-query';
|
|
7
7
|
export { v4 as uuid } from 'uuid';
|
|
8
8
|
|
|
9
|
-
declare type CustomElement = {
|
|
10
|
-
type: string;
|
|
11
|
-
element?: Element;
|
|
12
|
-
children: CustomText[];
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
};
|
|
15
|
-
declare type CustomText = {
|
|
16
|
-
text?: string;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
9
|
declare module 'slate' {
|
|
20
10
|
interface CustomTypes {
|
|
21
11
|
Editor: BaseEditor & ReactEditor & HistoryEditor;
|
|
@@ -23,17 +13,22 @@ declare module 'slate' {
|
|
|
23
13
|
Text: CustomText;
|
|
24
14
|
}
|
|
25
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for Text
|
|
18
|
+
*/
|
|
26
19
|
interface TextProps {
|
|
27
20
|
renderBlock: (props: {
|
|
28
21
|
children: any;
|
|
29
22
|
}) => ReactElement;
|
|
30
23
|
placeholder: string;
|
|
31
24
|
propName: string;
|
|
32
|
-
isDynamic?: boolean;
|
|
33
25
|
}
|
|
34
26
|
declare const Text: FC<TextProps>;
|
|
35
27
|
|
|
36
28
|
declare namespace types {
|
|
29
|
+
/**
|
|
30
|
+
* Type of Sidebar control
|
|
31
|
+
*/
|
|
37
32
|
enum SideEditPropType {
|
|
38
33
|
Text = "TEXT",
|
|
39
34
|
Textarea = "TEXTAREA",
|
|
@@ -45,6 +40,17 @@ declare namespace types {
|
|
|
45
40
|
Image = "IMAGE",
|
|
46
41
|
Custom = "CUSTOM"
|
|
47
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* How to display the options
|
|
45
|
+
*/
|
|
46
|
+
enum OptionsDisplay {
|
|
47
|
+
Select = "SELECT",
|
|
48
|
+
Radio = "RADIO",
|
|
49
|
+
Color = "COLOR"
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Features for RichText: see also the new RichTextExt
|
|
53
|
+
*/
|
|
48
54
|
enum RichTextFeatures {
|
|
49
55
|
Bold = "BOLD",
|
|
50
56
|
Italic = "ITALIC",
|
|
@@ -52,49 +58,54 @@ declare namespace types {
|
|
|
52
58
|
Highlight = "HIGHLIGHT",
|
|
53
59
|
Link = "LINK",
|
|
54
60
|
UnorderedList = "UL",
|
|
55
|
-
OrderedList = "OL"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
OrderedList = "OL",
|
|
62
|
+
Heading1 = "H1",
|
|
63
|
+
Heading2 = "H2",
|
|
64
|
+
Heading3 = "H3",
|
|
65
|
+
Heading4 = "H4",
|
|
66
|
+
Heading5 = "H5",
|
|
67
|
+
Heading6 = "H6",
|
|
68
|
+
Quote = "QUOTE"
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Page status
|
|
72
|
+
*/
|
|
66
73
|
enum PageStatus {
|
|
67
74
|
Draft = "DRAFT",
|
|
68
75
|
Published = "PUBLISHED"
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
77
|
+
/**
|
|
78
|
+
* Device type for responsive preview (for the icon)
|
|
79
|
+
*/
|
|
74
80
|
enum DeviceType {
|
|
75
81
|
Desktop = "DESKTOP",
|
|
76
82
|
Tablet = "TABLET",
|
|
77
83
|
Phone = "PHONE"
|
|
78
84
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
PageSettings = "PAGE-SETTINGS",
|
|
83
|
-
Document = "DOCUMENT",
|
|
84
|
-
Stories = "STORIES"
|
|
85
|
-
}
|
|
85
|
+
/**
|
|
86
|
+
* Corner for the click-to-edit button
|
|
87
|
+
*/
|
|
86
88
|
enum ClickToEditSide {
|
|
87
89
|
BottomRight = "BOTTOM-RIGHT",
|
|
88
90
|
BottomLeft = "BOTTOM-LEFT",
|
|
89
91
|
TopRight = "TOP-RIGHT",
|
|
90
92
|
TopLeft = "TOP-LEFT"
|
|
91
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* A Brick is a type of content block
|
|
96
|
+
*/
|
|
92
97
|
type Brick<T = {}> = React.FC<T> & {
|
|
93
98
|
schema: IBlockType;
|
|
94
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Bricks are types of content block
|
|
102
|
+
*/
|
|
95
103
|
type Bricks = {
|
|
96
104
|
[key: string]: Brick<any>;
|
|
97
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* The logged-in User
|
|
108
|
+
*/
|
|
98
109
|
type User = {
|
|
99
110
|
id: string;
|
|
100
111
|
email: string;
|
|
@@ -106,15 +117,32 @@ declare namespace types {
|
|
|
106
117
|
token: string;
|
|
107
118
|
appName: string;
|
|
108
119
|
deployHookUrl?: string;
|
|
109
|
-
deployHookMethod
|
|
120
|
+
deployHookMethod?: string;
|
|
121
|
+
deployHookTriggerOnScheduledPublishing: boolean;
|
|
122
|
+
deployHookStagingUrl?: string;
|
|
123
|
+
deployHookStagingMethod?: string;
|
|
124
|
+
deployHookStagingTriggerOnScheduledPublishing: boolean;
|
|
125
|
+
eventsHookUrl?: string;
|
|
126
|
+
eventsHookAuthToken?: string;
|
|
110
127
|
canCreatePage: boolean;
|
|
111
128
|
canDeletePage: boolean;
|
|
112
129
|
canDeploy: boolean;
|
|
130
|
+
canDeployStaging: boolean;
|
|
113
131
|
role: string;
|
|
114
132
|
plan: string;
|
|
115
133
|
languages: Language[];
|
|
116
134
|
defaultLanguage: string;
|
|
117
135
|
} | null;
|
|
136
|
+
/**
|
|
137
|
+
* Translation for a Page
|
|
138
|
+
*/
|
|
139
|
+
type Translation = {
|
|
140
|
+
language: string;
|
|
141
|
+
slug: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* A React Bricks Page
|
|
145
|
+
*/
|
|
118
146
|
type Page = {
|
|
119
147
|
id: string;
|
|
120
148
|
type: string;
|
|
@@ -131,10 +159,17 @@ declare namespace types {
|
|
|
131
159
|
tags: string[];
|
|
132
160
|
createdAt: string;
|
|
133
161
|
publishedAt?: string;
|
|
162
|
+
scheduledForPublishingOn?: string;
|
|
134
163
|
language: string;
|
|
135
|
-
translations:
|
|
164
|
+
translations: Translation[];
|
|
136
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* Page fields (without content)
|
|
168
|
+
*/
|
|
137
169
|
type PageValues = Omit<Page, 'content'>;
|
|
170
|
+
/**
|
|
171
|
+
* A Page with all optional fields, used for the patch
|
|
172
|
+
*/
|
|
138
173
|
type PartialPage = {
|
|
139
174
|
id?: string;
|
|
140
175
|
type?: string;
|
|
@@ -151,8 +186,27 @@ declare namespace types {
|
|
|
151
186
|
createdAt?: string;
|
|
152
187
|
publishedAt?: string;
|
|
153
188
|
language?: string;
|
|
154
|
-
translations?:
|
|
189
|
+
translations?: Translation[];
|
|
155
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Page from a list (no content)
|
|
193
|
+
*/
|
|
194
|
+
type PageFromList = Omit<Page, 'content'>;
|
|
195
|
+
/**
|
|
196
|
+
* Page from a list with pagination
|
|
197
|
+
*/
|
|
198
|
+
type PagesFromListWithPagination = {
|
|
199
|
+
items: PageFromList[];
|
|
200
|
+
pagination: {
|
|
201
|
+
page: number;
|
|
202
|
+
pageSize: number;
|
|
203
|
+
totalItems: number;
|
|
204
|
+
totalPages: number;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* The Author of a Page
|
|
209
|
+
*/
|
|
156
210
|
type Author = {
|
|
157
211
|
id: string;
|
|
158
212
|
email: string;
|
|
@@ -161,28 +215,16 @@ declare namespace types {
|
|
|
161
215
|
avatarUrl?: string;
|
|
162
216
|
company?: string;
|
|
163
217
|
};
|
|
218
|
+
/**
|
|
219
|
+
* A Language for i18n
|
|
220
|
+
*/
|
|
164
221
|
type Language = {
|
|
165
222
|
code: string;
|
|
166
223
|
name: string;
|
|
167
224
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
blockType: string;
|
|
172
|
-
appId: string;
|
|
173
|
-
imageUrl?: string;
|
|
174
|
-
props: Props;
|
|
175
|
-
};
|
|
176
|
-
type PageFromList = Omit<Page, 'content'>;
|
|
177
|
-
type PagesFromListWithPagination = {
|
|
178
|
-
items: PageFromList[];
|
|
179
|
-
pagination: {
|
|
180
|
-
page: number;
|
|
181
|
-
pageSize: number;
|
|
182
|
-
totalItems: number;
|
|
183
|
-
totalPages: number;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
225
|
+
/**
|
|
226
|
+
* Render function for local links (should use the app's Router)
|
|
227
|
+
*/
|
|
186
228
|
type RenderLocalLink = ({ href, target, className, activeClassName, isAdmin, children, }: {
|
|
187
229
|
href: string;
|
|
188
230
|
target?: string;
|
|
@@ -191,24 +233,15 @@ declare namespace types {
|
|
|
191
233
|
isAdmin?: boolean;
|
|
192
234
|
children: React.ReactNode;
|
|
193
235
|
}) => React.ReactElement;
|
|
236
|
+
/**
|
|
237
|
+
* Props of a content block
|
|
238
|
+
*/
|
|
194
239
|
type Props = {
|
|
195
240
|
[key: string]: any;
|
|
196
241
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
plan: string;
|
|
201
|
-
limit: number;
|
|
202
|
-
currentValue: number;
|
|
203
|
-
};
|
|
204
|
-
type ApiError = {
|
|
205
|
-
status: number;
|
|
206
|
-
data: {
|
|
207
|
-
error: string;
|
|
208
|
-
message: string;
|
|
209
|
-
statusCode: number;
|
|
210
|
-
};
|
|
211
|
-
};
|
|
242
|
+
/**
|
|
243
|
+
* Interface for the Schema of a Brick
|
|
244
|
+
*/
|
|
212
245
|
interface IBlockType {
|
|
213
246
|
name: string;
|
|
214
247
|
label: string;
|
|
@@ -221,6 +254,9 @@ declare namespace types {
|
|
|
221
254
|
category?: string;
|
|
222
255
|
tags?: string[];
|
|
223
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Item of a Repeater
|
|
259
|
+
*/
|
|
224
260
|
interface IRepeaterItem {
|
|
225
261
|
name: string;
|
|
226
262
|
itemType: string;
|
|
@@ -228,15 +264,24 @@ declare namespace types {
|
|
|
228
264
|
min?: number;
|
|
229
265
|
max?: number;
|
|
230
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* The content of a block (instance of a Brick)
|
|
269
|
+
*/
|
|
231
270
|
interface IContentBlock {
|
|
232
271
|
id: string;
|
|
233
272
|
type: string;
|
|
234
273
|
props: Props;
|
|
235
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Option of a select sidebar prop
|
|
277
|
+
*/
|
|
236
278
|
interface IOption {
|
|
237
279
|
value: any;
|
|
238
280
|
label: string;
|
|
239
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Interface for Props of a Custom sidebar component
|
|
284
|
+
*/
|
|
240
285
|
interface ICustomKnobProps {
|
|
241
286
|
id: string;
|
|
242
287
|
value: any;
|
|
@@ -244,6 +289,9 @@ declare namespace types {
|
|
|
244
289
|
isValid: boolean;
|
|
245
290
|
errorMessage?: string;
|
|
246
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Sidebar edit Props for a Page
|
|
294
|
+
*/
|
|
247
295
|
interface ISideEditPropPage {
|
|
248
296
|
name: string;
|
|
249
297
|
label: string;
|
|
@@ -268,31 +316,43 @@ declare namespace types {
|
|
|
268
316
|
display: OptionsDisplay;
|
|
269
317
|
};
|
|
270
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* Sidebar Edit Props
|
|
321
|
+
*/
|
|
271
322
|
interface ISideEditProp extends ISideEditPropPage {
|
|
272
323
|
shouldRefreshText?: boolean;
|
|
273
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* A collapsible Group of sidebar Props
|
|
327
|
+
*/
|
|
274
328
|
interface ISideGroup {
|
|
275
329
|
groupName: string;
|
|
276
330
|
defaultOpen?: boolean;
|
|
277
331
|
show?: (props: Props) => boolean;
|
|
278
332
|
props: ISideEditProp[] | ISideEditPropPage[];
|
|
279
333
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
repeaterPropName: string;
|
|
284
|
-
}
|
|
334
|
+
/**
|
|
335
|
+
* Image value interface
|
|
336
|
+
*/
|
|
285
337
|
interface IImageSource {
|
|
286
338
|
src: string;
|
|
287
339
|
placeholderSrc?: string;
|
|
288
340
|
srcSet?: string;
|
|
289
341
|
alt?: string;
|
|
290
342
|
seoName?: string;
|
|
343
|
+
width: number;
|
|
344
|
+
height: number;
|
|
291
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* A Color for a Select sidebar prop
|
|
348
|
+
*/
|
|
292
349
|
interface IColor {
|
|
293
350
|
color: string;
|
|
294
351
|
[propName: string]: any;
|
|
295
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Page type
|
|
355
|
+
*/
|
|
296
356
|
interface IPageType {
|
|
297
357
|
name: string;
|
|
298
358
|
pluralName: string;
|
|
@@ -305,20 +365,24 @@ declare namespace types {
|
|
|
305
365
|
getDefaultContent?: () => string[];
|
|
306
366
|
customFields?: Array<ISideEditPropPage | ISideGroup>;
|
|
307
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Structure returned by the cleanBlocks function
|
|
370
|
+
*/
|
|
308
371
|
interface ICleanBlocks {
|
|
309
372
|
blocks: IContentBlock[];
|
|
310
373
|
invalidBlocksTypes: string[];
|
|
311
374
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
appId: string;
|
|
316
|
-
}
|
|
375
|
+
/**
|
|
376
|
+
* Responsive breakpoint for preview
|
|
377
|
+
*/
|
|
317
378
|
interface ResponsiveBreakpoint {
|
|
318
379
|
type: DeviceType;
|
|
319
380
|
width: number | string;
|
|
320
381
|
label: string;
|
|
321
382
|
}
|
|
383
|
+
/**
|
|
384
|
+
* The ReactBricks configuration
|
|
385
|
+
*/
|
|
322
386
|
interface ReactBricksConfig {
|
|
323
387
|
appId: string;
|
|
324
388
|
apiKey: string;
|
|
@@ -342,6 +406,9 @@ declare namespace types {
|
|
|
342
406
|
enableAutoSave?: boolean;
|
|
343
407
|
disableSaveIfInvalidProps?: boolean;
|
|
344
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* The ReactBricks context
|
|
411
|
+
*/
|
|
345
412
|
interface IReactBricksContext {
|
|
346
413
|
appId: string;
|
|
347
414
|
apiKey: string;
|
|
@@ -364,98 +431,26 @@ declare namespace types {
|
|
|
364
431
|
enableAutoSave: boolean;
|
|
365
432
|
disableSaveIfInvalidProps: boolean;
|
|
366
433
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
interface IAdminContext {
|
|
372
|
-
isAdmin: boolean;
|
|
373
|
-
currentPage: ICurrentPage;
|
|
374
|
-
setCurrentPage: (currentPage: ICurrentPage) => void;
|
|
375
|
-
previewMode: boolean;
|
|
376
|
-
setPreviewMode: (previewMode: boolean) => void;
|
|
377
|
-
sidebarCollapsed: boolean;
|
|
378
|
-
setSidebarCollapsed: (sidebarCollapsed: boolean) => void;
|
|
379
|
-
getStyles: () => NodeListOf<HTMLStyleElement> | [];
|
|
380
|
-
getStylesheets: () => NodeListOf<HTMLLinkElement> | [];
|
|
381
|
-
}
|
|
434
|
+
/**
|
|
435
|
+
* The Admin context returned from useAdminContext
|
|
436
|
+
*/
|
|
382
437
|
interface IReadAdminContext {
|
|
383
438
|
isAdmin: boolean;
|
|
384
439
|
previewMode: boolean;
|
|
385
440
|
currentPage: ICurrentPage;
|
|
386
441
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
blockId: string;
|
|
391
|
-
parentId: string;
|
|
392
|
-
parentType: string;
|
|
393
|
-
contentRef?: any;
|
|
394
|
-
handleChange: (blockId: string, parentBlockId?: string, repeaterPropName?: string) => (field: string, value: any) => void;
|
|
395
|
-
handleAddItem?: (blockId: string, itemBlockPropName: string, itemBlockTypeName: string) => () => void;
|
|
396
|
-
}
|
|
397
|
-
interface IContentEditorContext {
|
|
398
|
-
focused: IFocused;
|
|
399
|
-
setFocused: (focused: IFocused) => void;
|
|
400
|
-
triggerTextRefreshBlockId: string;
|
|
401
|
-
setTriggerTextRefreshBlockId: (value: string) => void;
|
|
402
|
-
setAddAfterBlockId: (addAfterBlockId: string) => void;
|
|
403
|
-
pageValues: PageValues;
|
|
404
|
-
handleChangePageValue: (pageData: PartialPage) => void;
|
|
405
|
-
}
|
|
406
|
-
interface IPageViewerContext {
|
|
407
|
-
pageValues: PageValues;
|
|
408
|
-
}
|
|
409
|
-
interface INewPage {
|
|
410
|
-
id?: string;
|
|
411
|
-
type: string;
|
|
412
|
-
name: string;
|
|
413
|
-
slug?: string;
|
|
414
|
-
meta?: IMeta;
|
|
415
|
-
content?: IContentBlock[];
|
|
416
|
-
status?: PageStatus;
|
|
417
|
-
isLocked?: boolean;
|
|
418
|
-
language?: string;
|
|
419
|
-
}
|
|
420
|
-
interface IPlaygroundSelectedItem {
|
|
421
|
-
type: PlaygroundSelectedItemType;
|
|
422
|
-
name: string;
|
|
423
|
-
label: string;
|
|
424
|
-
}
|
|
425
|
-
interface IPlaygroundContext {
|
|
426
|
-
selectedItem: IPlaygroundSelectedItem | null;
|
|
427
|
-
setSelectedItem: (selectedItem: any) => void;
|
|
428
|
-
}
|
|
442
|
+
/**
|
|
443
|
+
* Meta fields on Page
|
|
444
|
+
*/
|
|
429
445
|
interface IMeta {
|
|
430
446
|
title?: string;
|
|
431
447
|
description?: string;
|
|
432
448
|
language?: string;
|
|
433
449
|
featuredImage?: string;
|
|
434
450
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
data: TResult | undefined | null;
|
|
439
|
-
error: TError | null;
|
|
440
|
-
failureCount: number;
|
|
441
|
-
fetchMore: (fetchMoreVariable?: unknown, options?: any) => Promise<TResult | undefined>;
|
|
442
|
-
isError: boolean;
|
|
443
|
-
isFetched: boolean;
|
|
444
|
-
isFetchedAfterMount: boolean;
|
|
445
|
-
isFetching: boolean;
|
|
446
|
-
isFetchingMore?: any;
|
|
447
|
-
isIdle: boolean;
|
|
448
|
-
isInitialData: boolean;
|
|
449
|
-
isLoading: boolean;
|
|
450
|
-
isPreviousData: boolean;
|
|
451
|
-
isPlaceholderData: boolean;
|
|
452
|
-
isStale: boolean;
|
|
453
|
-
isSuccess: boolean;
|
|
454
|
-
refetch: (options?: any) => Promise<TResult | undefined>;
|
|
455
|
-
remove: () => void;
|
|
456
|
-
status: any;
|
|
457
|
-
updatedAt: number;
|
|
458
|
-
}
|
|
451
|
+
/**
|
|
452
|
+
* A RichTextExt Plugin
|
|
453
|
+
*/
|
|
459
454
|
interface RichTextPlugin {
|
|
460
455
|
type: 'Mark' | 'Block' | 'List';
|
|
461
456
|
name: string;
|
|
@@ -473,6 +468,9 @@ declare namespace types {
|
|
|
473
468
|
};
|
|
474
469
|
enhanceEditor?: (editor: Editor$1) => Editor$1;
|
|
475
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Definition for a Mark plugin
|
|
473
|
+
*/
|
|
476
474
|
interface MarkPlugin {
|
|
477
475
|
name: string;
|
|
478
476
|
label?: string;
|
|
@@ -480,7 +478,13 @@ declare namespace types {
|
|
|
480
478
|
render: (props: RenderLeafProps) => JSX.Element;
|
|
481
479
|
icon: React.ReactElement;
|
|
482
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Constructor for a Mark plugin
|
|
483
|
+
*/
|
|
483
484
|
type MarkPluginConstructor = (markPlugin: MarkPlugin) => RichTextPlugin;
|
|
485
|
+
/**
|
|
486
|
+
* Definition for a Block plugin
|
|
487
|
+
*/
|
|
484
488
|
interface BlockPlugin {
|
|
485
489
|
name: string;
|
|
486
490
|
isInline?: boolean;
|
|
@@ -491,28 +495,64 @@ declare namespace types {
|
|
|
491
495
|
renderItem?: (props: RenderElementProps) => JSX.Element;
|
|
492
496
|
icon: React.ReactElement;
|
|
493
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Constructor for a Block plugin
|
|
500
|
+
*/
|
|
494
501
|
type BlockPluginConstructor = (blockPlugin: BlockPlugin) => RichTextPlugin;
|
|
495
|
-
interface RichTextSymbol {
|
|
496
|
-
name: string;
|
|
497
|
-
label: string;
|
|
498
|
-
hotKey: string;
|
|
499
|
-
renderElement: React.FC;
|
|
500
|
-
}
|
|
501
502
|
}
|
|
502
503
|
|
|
504
|
+
/**
|
|
505
|
+
* Props for RichTextExt (v3)
|
|
506
|
+
*/
|
|
503
507
|
interface RichTextProps {
|
|
504
508
|
renderBlock: (props: RenderElementProps) => JSX.Element;
|
|
505
|
-
placeholder: string;
|
|
506
509
|
propName: string;
|
|
510
|
+
placeholder: string;
|
|
507
511
|
plugins?: types.RichTextPlugin[];
|
|
508
512
|
}
|
|
509
513
|
declare const RichText: FC<RichTextProps>;
|
|
510
514
|
|
|
515
|
+
/**
|
|
516
|
+
* Props for renderLink render function
|
|
517
|
+
*/
|
|
518
|
+
interface RenderLinkElementProps extends RenderElementProps {
|
|
519
|
+
href: string;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Props for the v2-compatible RichText
|
|
523
|
+
*/
|
|
524
|
+
interface CompatibleRichTextProps {
|
|
525
|
+
renderBlock: (props: RenderElementProps) => JSX.Element;
|
|
526
|
+
placeholder: string;
|
|
527
|
+
propName: string;
|
|
528
|
+
allowedFeatures?: types.RichTextFeatures[];
|
|
529
|
+
renderBold?: (props: RenderLeafProps) => JSX.Element;
|
|
530
|
+
renderItalic?: (props: RenderLeafProps) => JSX.Element;
|
|
531
|
+
renderHighlight?: (props: RenderLeafProps) => JSX.Element;
|
|
532
|
+
renderCode?: (props: RenderLeafProps) => JSX.Element;
|
|
533
|
+
renderLink?: (props: RenderLinkElementProps) => JSX.Element;
|
|
534
|
+
renderUL?: (props: RenderElementProps) => JSX.Element;
|
|
535
|
+
renderOL?: (props: RenderElementProps) => JSX.Element;
|
|
536
|
+
renderLI?: (props: RenderElementProps) => JSX.Element;
|
|
537
|
+
renderH1?: (props: RenderElementProps) => JSX.Element;
|
|
538
|
+
renderH2?: (props: RenderElementProps) => JSX.Element;
|
|
539
|
+
renderH3?: (props: RenderElementProps) => JSX.Element;
|
|
540
|
+
renderH4?: (props: RenderElementProps) => JSX.Element;
|
|
541
|
+
renderH5?: (props: RenderElementProps) => JSX.Element;
|
|
542
|
+
renderH6?: (props: RenderElementProps) => JSX.Element;
|
|
543
|
+
renderQuote?: (props: RenderElementProps) => JSX.Element;
|
|
544
|
+
}
|
|
545
|
+
declare const CompatibleRichText: React.FC<CompatibleRichTextProps>;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Props for Image
|
|
549
|
+
*/
|
|
511
550
|
interface ImageProps {
|
|
551
|
+
propName: string;
|
|
512
552
|
alt: string;
|
|
513
553
|
maxWidth?: number;
|
|
514
554
|
noLazyLoad?: boolean;
|
|
515
|
-
|
|
555
|
+
aspectRatio?: number;
|
|
516
556
|
containerClassName?: string;
|
|
517
557
|
containerStyle?: object;
|
|
518
558
|
imageClassName?: string;
|
|
@@ -520,6 +560,9 @@ interface ImageProps {
|
|
|
520
560
|
}
|
|
521
561
|
declare const Image: FC<ImageProps>;
|
|
522
562
|
|
|
563
|
+
/**
|
|
564
|
+
* Props for Repeater
|
|
565
|
+
*/
|
|
523
566
|
interface RepeaterProps {
|
|
524
567
|
propName: string;
|
|
525
568
|
itemProps?: types.Props;
|
|
@@ -528,11 +571,6 @@ interface RepeaterProps {
|
|
|
528
571
|
}
|
|
529
572
|
declare const Repeater: FC<RepeaterProps>;
|
|
530
573
|
|
|
531
|
-
interface LinkProps {
|
|
532
|
-
href: string;
|
|
533
|
-
target?: string;
|
|
534
|
-
className?: string;
|
|
535
|
-
}
|
|
536
574
|
declare const Link: FC<LinkProps>;
|
|
537
575
|
|
|
538
576
|
declare const ReactBricks: FC<types.ReactBricksConfig>;
|
|
@@ -542,29 +580,19 @@ declare const ReactBricksContext: Context<types.IReactBricksContext>;
|
|
|
542
580
|
var css_248z = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}";
|
|
543
581
|
styleInject(css_248z);
|
|
544
582
|
|
|
545
|
-
var css_248z$1 = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\");\n\n/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com*/\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border:0 solid}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{color:#9ca3af}input:-ms-input-placeholder, textarea:-ms-input-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}[type=date],[type=email],[type=number],[type=password],[type=text],[type=time],[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}[type=date]:focus,[type=email]:focus,[type=number]:focus,[type=password]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent);border-color:#2563eb}input::-moz-placeholder, textarea::-moz-placeholder{color:#6b7280;opacity:1}input:-ms-input-placeholder, textarea:-ms-input-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}select{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E\")}[type=radio]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E\")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-20{margin-top:5rem}.-mt-px{margin-top:-1px}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.hidden{display:none}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-10{height:2.5rem}.h-24{height:6rem}.h-40{height:10rem}.h-full{height:100%}.h-screen{height:100vh}.w-0{width:0}.w-4{width:1rem}.w-8{width:2rem}.w-24{width:6rem}.w-40{width:10rem}.w-48{width:12rem}.w-56{width:14rem}.w-3\\/4{width:75%}.w-full{width:100%}.min-w-0{min-width:0}.max-w-xl{max-width:36rem}.max-w-3xl{max-width:48rem}.flex-1{flex:1 1 0%}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-125:hover{--tw-scale-x:1.25;--tw-scale-y:1.25}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.cursor-pointer{cursor:pointer}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.list-disc{list-style-type:disc}.list-decimal{list-style-type:decimal}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.75rem*var(--tw-space-x-reverse));margin-left:calc(0.75rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-sm{border-radius:.125rem}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.border-2{border-width:2px}.border{border-width:1px}.border-t{border-top-width:1px}.border-b-4{border-bottom-width:4px}.border-b{border-bottom-width:1px}.border-transparent{border-color:transparent}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgba(107,114,128,var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgba(248,113,113,var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgba(239,68,68,var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity:1;border-color:rgba(251,131,163,var(--tw-border-opacity))}.border-pink-500{--tw-border-opacity:1;border-color:rgba(246,90,142,var(--tw-border-opacity))}.hover\\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.hover\\:border-pink-400:hover{--tw-border-opacity:1;border-color:rgba(251,131,163,var(--tw-border-opacity))}.hover\\:border-pink-600:hover{--tw-border-opacity:1;border-color:rgba(217,54,127,var(--tw-border-opacity))}.focus\\:border-blue-300:focus{--tw-border-opacity:1;border-color:rgba(147,197,253,var(--tw-border-opacity))}.focus\\:border-pink-400:focus{--tw-border-opacity:1;border-color:rgba(251,131,163,var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgba(107,114,128,var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgba(255,245,247,var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgba(255,214,224,var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgba(246,90,142,var(--tw-bg-opacity))}.hover\\:bg-white:hover{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.hover\\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgba(37,99,235,var(--tw-bg-opacity))}.hover\\:bg-pink-100:hover{--tw-bg-opacity:1;background-color:rgba(255,245,247,var(--tw-bg-opacity))}.hover\\:bg-pink-600:hover{--tw-bg-opacity:1;background-color:rgba(217,54,127,var(--tw-bg-opacity))}.hover\\:bg-pink-700:hover{--tw-bg-opacity:1;background-color:rgba(180,49,121,var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity:0.75}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-20{padding-left:5rem;padding-right:5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-px{padding-top:1px;padding-bottom:1px}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-10{padding-top:2.5rem}.pt-12{padding-top:3rem}.pr-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-12{padding-bottom:3rem}.pb-24{padding-bottom:6rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-admin{font-family:Inter,sans-serif}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-thin{font-weight:100}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgba(6,95,70,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.text-pink-300{--tw-text-opacity:1;color:rgba(253,180,198,var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity:1;color:rgba(251,131,163,var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity:1;color:rgba(246,90,142,var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity:1;color:rgba(180,49,121,var(--tw-text-opacity))}.hover\\:text-black:hover{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.hover\\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.hover\\:text-red-800:hover{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.hover\\:text-green-600:hover{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.hover\\:text-blue-600:hover{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.hover\\:text-blue-700:hover{--tw-text-opacity:1;color:rgba(29,78,216,var(--tw-text-opacity))}.hover\\:text-pink-600:hover{--tw-text-opacity:1;color:rgba(217,54,127,var(--tw-text-opacity))}.focus\\:text-gray-800:focus{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.no-underline{text-decoration:none}.hover\\:underline:hover{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-75{opacity:.75}.hover\\:opacity-100:hover{opacity:1}.disabled\\:opacity-75:disabled{opacity:.75}*,:after,:before{--tw-shadow:0 0 transparent}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.shadow-inner,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06)}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}.focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus\\:ring-blue-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(191,219,254,var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur:blur(8px)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-1000{transition-duration:1s}body{background-color:#f7fafc}@media (min-width:640px){.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-3\\/4{width:75%}.sm\\:px-0{padding-left:0;padding-right:0}}@media (min-width:768px){.md\\:block{display:block}.md\\:w-1\\/2{width:50%}}@media (min-width:1024px){.lg\\:w-1\\/2{width:50%}}";
|
|
546
|
-
styleInject(css_248z$1);
|
|
547
|
-
|
|
548
|
-
interface AdminProps {
|
|
549
|
-
isLogin?: boolean;
|
|
550
|
-
isPublicDesignSystem?: boolean;
|
|
551
|
-
designSystemTitle?: string;
|
|
552
|
-
}
|
|
553
583
|
declare const Admin: FC<AdminProps>;
|
|
554
584
|
|
|
555
585
|
declare const AdminContext: Context<types.IAdminContext>;
|
|
556
586
|
|
|
557
|
-
interface HeaderProps {
|
|
558
|
-
logo?: string;
|
|
559
|
-
renderMenu?: () => ReactElement;
|
|
560
|
-
designSystemTitle?: string;
|
|
561
|
-
}
|
|
562
587
|
declare const Header: FC<HeaderProps>;
|
|
563
588
|
|
|
564
589
|
declare const Login: FC;
|
|
565
590
|
|
|
566
591
|
declare const Editor: FC;
|
|
567
592
|
|
|
593
|
+
/**
|
|
594
|
+
* Props for PageViewer
|
|
595
|
+
*/
|
|
568
596
|
interface PageViewerProps {
|
|
569
597
|
page: types.Page | null | undefined;
|
|
570
598
|
}
|
|
@@ -583,7 +611,10 @@ declare const usePage: (pageId: string, language?: string | undefined) => UseQue
|
|
|
583
611
|
|
|
584
612
|
declare const usePage$1: (slug: string, language?: string | undefined) => UseQueryResult<types.Page, unknown>;
|
|
585
613
|
|
|
586
|
-
|
|
614
|
+
/**
|
|
615
|
+
* Values returned from usePages
|
|
616
|
+
*/
|
|
617
|
+
interface UsePagesType {
|
|
587
618
|
<T extends boolean>({ type, types, tag, language, page, pageSize, sort, usePagination, }: {
|
|
588
619
|
type?: string;
|
|
589
620
|
types?: string[];
|
|
@@ -605,9 +636,12 @@ interface UsePageType {
|
|
|
605
636
|
}): UseQueryResult<types.PageFromList[], unknown>;
|
|
606
637
|
(): UseQueryResult<types.PageFromList[], unknown>;
|
|
607
638
|
}
|
|
608
|
-
declare const usePages:
|
|
639
|
+
declare const usePages: UsePagesType;
|
|
609
640
|
|
|
610
|
-
|
|
641
|
+
/**
|
|
642
|
+
* Values returned from the public usePage
|
|
643
|
+
*/
|
|
644
|
+
interface UsePagesPublicType {
|
|
611
645
|
<T extends boolean>({ type, types, tag, language, page, pageSize, sort, usePagination, }: {
|
|
612
646
|
type?: string;
|
|
613
647
|
types?: string[];
|
|
@@ -629,7 +663,7 @@ interface UsePagePublicType {
|
|
|
629
663
|
}): UseQueryResult<types.PageFromList[], unknown>;
|
|
630
664
|
(): UseQueryResult<types.PageFromList[], unknown>;
|
|
631
665
|
}
|
|
632
|
-
declare const usePagesPublic:
|
|
666
|
+
declare const usePagesPublic: UsePagesPublicType;
|
|
633
667
|
|
|
634
668
|
declare const useVisualEdit: (propName: string) => [any, (value: any) => void, boolean];
|
|
635
669
|
|
|
@@ -641,6 +675,9 @@ declare const useAdminContext: () => types.IReadAdminContext;
|
|
|
641
675
|
|
|
642
676
|
declare const fetchPage: (slug: string, apiKey: string, language?: string | undefined) => Promise<types.Page>;
|
|
643
677
|
|
|
678
|
+
/**
|
|
679
|
+
* Values returned from fetchPages
|
|
680
|
+
*/
|
|
644
681
|
interface FetchPagesType {
|
|
645
682
|
<T extends boolean>(apiKey: string, { type, types, tag, language, page, pageSize, sort, usePagination, }: {
|
|
646
683
|
type?: string;
|
|
@@ -677,6 +714,10 @@ declare const _default: {
|
|
|
677
714
|
link: types.RichTextPlugin;
|
|
678
715
|
heading1: types.RichTextPlugin;
|
|
679
716
|
heading2: types.RichTextPlugin;
|
|
717
|
+
heading3: types.RichTextPlugin;
|
|
718
|
+
heading4: types.RichTextPlugin;
|
|
719
|
+
heading5: types.RichTextPlugin;
|
|
720
|
+
heading6: types.RichTextPlugin;
|
|
680
721
|
quote: types.RichTextPlugin;
|
|
681
722
|
orderedList: types.RichTextPlugin;
|
|
682
723
|
unorderedList: types.RichTextPlugin;
|
|
@@ -687,4 +728,4 @@ declare const _default$1: {
|
|
|
687
728
|
deserialize: (input: string) => Descendant[];
|
|
688
729
|
};
|
|
689
730
|
|
|
690
|
-
export { Admin, AdminContext, AppSettings, Editor, Header, Image, Link, Login, PageViewer, _default$1 as Plain, Playground, ReactBricks, ReactBricksContext, Repeater, RichText, Text, cleanPage, fetchPage, fetchPages, getPagePlainText, _default as plugins, types, useAdminContext, useAuth, usePage, usePage$1 as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useVisualEdit };
|
|
731
|
+
export { Admin, AdminContext, AppSettings, Editor, Header, Image, Link, Login, PageViewer, _default$1 as Plain, Playground, ReactBricks, ReactBricksContext, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Text, cleanPage, fetchPage, fetchPages, getPagePlainText, _default as plugins, types, useAdminContext, useAuth, usePage, usePage$1 as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useVisualEdit };
|