react-bricks 4.1.3 → 4.2.0-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.
@@ -0,0 +1,849 @@
1
+ import * as React from 'react';
2
+ import React__default from 'react';
3
+ import { Descendant, Editor } from 'slate';
4
+ import { RenderElementProps, RenderLeafProps } from 'slate-react';
5
+
6
+ declare namespace types {
7
+ export const EmbedProp = "RB_PAGE_EMBED";
8
+ export const EmbedContent = "RB_PAGE_EMBED_CONTENT";
9
+ /**
10
+ * Type of Sidebar control
11
+ */
12
+ export enum SideEditPropType {
13
+ Text = "TEXT",
14
+ Textarea = "TEXTAREA",
15
+ Number = "NUMBER",
16
+ Date = "DATE",
17
+ Range = "RANGE",
18
+ Boolean = "BOOLEAN",
19
+ Select = "SELECT",
20
+ Image = "IMAGE",
21
+ Custom = "CUSTOM",
22
+ Relationship = "RELATIONSHIP"
23
+ }
24
+ /**
25
+ * How to display the options
26
+ */
27
+ export enum OptionsDisplay {
28
+ Select = "SELECT",
29
+ Radio = "RADIO",
30
+ Color = "COLOR"
31
+ }
32
+ /**
33
+ * Features for RichText: see also the new RichTextExt
34
+ */
35
+ export enum RichTextFeatures {
36
+ Bold = "BOLD",
37
+ Italic = "ITALIC",
38
+ Code = "CODE",
39
+ Highlight = "HIGHLIGHT",
40
+ Link = "LINK",
41
+ UnorderedList = "UL",
42
+ OrderedList = "OL",
43
+ Heading1 = "H1",
44
+ Heading2 = "H2",
45
+ Heading3 = "H3",
46
+ Heading4 = "H4",
47
+ Heading5 = "H5",
48
+ Heading6 = "H6",
49
+ Quote = "QUOTE"
50
+ }
51
+ /**
52
+ * Page status
53
+ */
54
+ export enum PageStatus {
55
+ Draft = "DRAFT",
56
+ Published = "PUBLISHED"
57
+ }
58
+ /**
59
+ * Approval status
60
+ */
61
+ export enum EditStatus {
62
+ Merged = "MERGED",
63
+ Working = "WORKING",
64
+ MergeRequested = "MERGE_REQUESTED"
65
+ }
66
+ /**
67
+ * Device type for responsive preview (for the icon)
68
+ */
69
+ export enum DeviceType {
70
+ Desktop = "DESKTOP",
71
+ Tablet = "TABLET",
72
+ Phone = "PHONE"
73
+ }
74
+ /**
75
+ * Corner for the click-to-edit button
76
+ */
77
+ export enum ClickToEditSide {
78
+ BottomRight = "BOTTOM-RIGHT",
79
+ BottomLeft = "BOTTOM-LEFT",
80
+ TopRight = "TOP-RIGHT",
81
+ TopLeft = "TOP-LEFT",
82
+ None = "NONE"
83
+ }
84
+ export enum BlockIconsPosition {
85
+ InsideBlock = "INSIDE-BLOCK",
86
+ OutsideBlock = "OUTSIDE-BLOCK"
87
+ }
88
+ /**
89
+ * A Brick is a type of content block
90
+ */
91
+ export type Brick<T = {}> = React__default.FC<T> & {
92
+ schema: IBlockType<T>;
93
+ };
94
+ /**
95
+ * Bricks are types of content block
96
+ */
97
+ export type Bricks = {
98
+ [key: string]: Brick<any>;
99
+ };
100
+ /**
101
+ * A Category contains bricks
102
+ */
103
+ export type Category = {
104
+ categoryName: string;
105
+ bricks: Brick<any>[];
106
+ };
107
+ /**
108
+ * A Theme contains categories and bricks
109
+ */
110
+ export type Theme = {
111
+ themeName: string;
112
+ categories: Category[];
113
+ };
114
+ /**
115
+ * Custom role type
116
+ */
117
+ export type CustomRole = {
118
+ id: string;
119
+ name: string;
120
+ };
121
+ /**
122
+ * The type of the user passed to permission functions
123
+ */
124
+ export type PermissionUser = {
125
+ firstName: string;
126
+ lastName: string;
127
+ email: string;
128
+ isAdmin: boolean;
129
+ role: string;
130
+ customRole?: CustomRole;
131
+ };
132
+ /**
133
+ * The type of the page passed to permission functions
134
+ */
135
+ export type PermissionPage = {
136
+ slug: string;
137
+ pageType: string;
138
+ language: string;
139
+ };
140
+ /**
141
+ * The type of the brick passed to permission functions
142
+ */
143
+ export type PermissionBrick = {
144
+ name: string;
145
+ category: string;
146
+ theme: string;
147
+ tags: string[];
148
+ };
149
+ /**
150
+ * The permission functions
151
+ */
152
+ export type Permissions = {
153
+ canAddPage?: (user: PermissionUser, pageType: string) => boolean;
154
+ canAddTranslation?: (user: PermissionUser, pageType: string, language: string) => boolean;
155
+ canSeePageType?: (user: PermissionUser, pageType: string) => boolean;
156
+ canSeePage?: (user: PermissionUser, page: Omit<PermissionPage, 'language'>) => boolean;
157
+ canEditPage?: (user: PermissionUser, page: PermissionPage) => boolean;
158
+ canDeletePage?: (user: PermissionUser, page: Omit<PermissionPage, 'language'>) => boolean;
159
+ canDeleteTranslation?: (user: PermissionUser, page: PermissionPage) => boolean;
160
+ canUseBrick?: (user: PermissionUser, brick: PermissionBrick) => boolean;
161
+ };
162
+ /**
163
+ * The logged-in User
164
+ */
165
+ export type User = {
166
+ id: string;
167
+ email: string;
168
+ firstName: string;
169
+ lastName: string;
170
+ company: string;
171
+ avatarUrl?: string;
172
+ isAdmin: boolean;
173
+ token: string;
174
+ appName: string;
175
+ appId: string;
176
+ appEnv: string;
177
+ deployHookUrl?: string;
178
+ deployHookMethod?: string;
179
+ deployHookTriggerOnScheduledPublishing: boolean;
180
+ deployHookStagingUrl?: string;
181
+ deployHookStagingMethod?: string;
182
+ deployHookStagingTriggerOnScheduledPublishing: boolean;
183
+ deployHookDevUrl?: string;
184
+ deployHookDevMethod?: string;
185
+ deployHookDevTriggerOnScheduledPublishing: boolean;
186
+ eventsHookUrl?: string;
187
+ eventsHookAuthToken?: string;
188
+ canCreatePage: boolean;
189
+ canDeletePage: boolean;
190
+ canDeploy: boolean;
191
+ canDeployStaging: boolean;
192
+ canDeployDev: boolean;
193
+ canEditPageAttributes: boolean;
194
+ canEditSeo: boolean;
195
+ canApprove: boolean;
196
+ role: string;
197
+ customRole?: CustomRole;
198
+ plan: string;
199
+ isVerified: boolean;
200
+ languages: Language[];
201
+ defaultLanguage: string;
202
+ hostname: string;
203
+ useWorkingCopy: boolean;
204
+ useApprovalWorkflow: boolean;
205
+ subscription: {
206
+ maxStories: number;
207
+ collaboration: boolean;
208
+ deployHookStaging: boolean;
209
+ deployHookDev: boolean;
210
+ scheduledPublishing: boolean;
211
+ embedPages: boolean;
212
+ lockBlocks: boolean;
213
+ flexibleRoles: boolean;
214
+ advancedSeo: boolean;
215
+ eventsLog: boolean;
216
+ maxFileSize: number;
217
+ maxImageSize: number;
218
+ maxFilesBatch: number;
219
+ maxFilesConcurrency: number;
220
+ diskSpace: number;
221
+ advancedDam: boolean;
222
+ workingCopy: boolean;
223
+ approvalWorkflow: boolean;
224
+ };
225
+ } | null;
226
+ /**
227
+ * Translation for a Page
228
+ */
229
+ export type Translation = {
230
+ language: string;
231
+ slug: string;
232
+ name: string;
233
+ status: PageStatus;
234
+ editStatus: EditStatus;
235
+ isLocked: boolean;
236
+ scheduledForPublishingOn: string;
237
+ };
238
+ /**
239
+ * The page editing User
240
+ */
241
+ export type EditingUser = {
242
+ id: string;
243
+ email: string;
244
+ firstName: string;
245
+ lastName: string;
246
+ company: string;
247
+ avatarUrl?: string;
248
+ };
249
+ /**
250
+ * Date and User of last edit
251
+ */
252
+ export type LastEditedBy = {
253
+ date: string;
254
+ user: EditingUser;
255
+ };
256
+ /**
257
+ * A React Bricks Page
258
+ */
259
+ export type Page = {
260
+ id: string;
261
+ type: string;
262
+ name: string;
263
+ slug: string;
264
+ meta: IMeta;
265
+ customValues?: Props;
266
+ externalData?: Props;
267
+ content: IContentBlock[];
268
+ workingContent?: IContentBlock[];
269
+ committedContent?: IContentBlock[];
270
+ authorId?: string;
271
+ author: Author;
272
+ invalidBlocksTypes?: string[];
273
+ status: PageStatus;
274
+ editStatus: EditStatus;
275
+ isLocked: boolean;
276
+ tags: string[];
277
+ category?: string;
278
+ createdAt: string;
279
+ publishedAt?: string;
280
+ scheduledForPublishingOn?: string;
281
+ language: string;
282
+ translations: Translation[];
283
+ lastEditedBy: LastEditedBy;
284
+ };
285
+ /**
286
+ * Page fields (without content)
287
+ */
288
+ export type PageValues = Omit<Page, 'content'>;
289
+ /**
290
+ * A Page with all optional fields, used for the patch
291
+ */
292
+ export type PartialPage = Partial<Page>;
293
+ /**
294
+ * Page from a list (no content)
295
+ */
296
+ export type PageFromList = Omit<Page, 'content'>;
297
+ /**
298
+ * Page from a list with pagination
299
+ */
300
+ export type PagesFromListWithPagination = {
301
+ items: PageFromList[];
302
+ pagination: {
303
+ page: number;
304
+ pageSize: number;
305
+ totalItems: number;
306
+ totalPages: number;
307
+ };
308
+ };
309
+ /**
310
+ * The Author of a Page
311
+ */
312
+ export type Author = {
313
+ id: string;
314
+ email: string;
315
+ firstName: string;
316
+ lastName: string;
317
+ avatarUrl?: string;
318
+ company?: string;
319
+ };
320
+ export type BrickStory<T = Props> = {
321
+ id: string;
322
+ name: string;
323
+ showAsBrick?: boolean;
324
+ previewImageUrl?: string;
325
+ props: T;
326
+ };
327
+ export type RepeaterItems = IContentBlock[] | Omit<IContentBlock, 'id'>[] | Props[];
328
+ /**
329
+ * A Language for i18n
330
+ */
331
+ export type Language = {
332
+ code: string;
333
+ name: string;
334
+ };
335
+ /**
336
+ * Render function for local links (should use the app's Router)
337
+ */
338
+ interface LocalLinkProps {
339
+ href: string;
340
+ target?: string;
341
+ className?: string;
342
+ activeClassName?: string;
343
+ isAdmin?: boolean;
344
+ }
345
+ type LocalLinkPropsReal = React__default.PropsWithChildren<Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LocalLinkProps> & LocalLinkProps>;
346
+ export type RenderLocalLink = ({ href, target, className, activeClassName, isAdmin, children, }: LocalLinkPropsReal) => React__default.ReactElement;
347
+ /**-
348
+ * The type of Text and RichText value
349
+ */
350
+ export type TextValue = Descendant[] | string;
351
+ /**
352
+ * Props of a content block
353
+ */
354
+ export type Props = {
355
+ [key: string]: any;
356
+ };
357
+ /**
358
+ * Interface for the Schema of a Brick
359
+ */
360
+ export interface IBlockType<T = Props> {
361
+ name: string;
362
+ label: string;
363
+ getDefaultProps?: () => Partial<T>;
364
+ hideFromAddMenu?: boolean;
365
+ sideEditProps?: Array<ISideEditProp<T> | ISideGroup<T>>;
366
+ repeaterItems?: IRepeaterItem[];
367
+ newItemMenuOpen?: boolean;
368
+ groupByRepeater?: boolean;
369
+ mapExternalDataToProps?: (externalData: Props, brickProps?: T) => Partial<T>;
370
+ playgroundLinkUrl?: string;
371
+ playgroundLinkLabel?: string;
372
+ theme?: string;
373
+ category?: string;
374
+ tags?: string[];
375
+ previewImageUrl?: string;
376
+ previewIcon?: React__default.ReactElement;
377
+ stories?: BrickStory<Partial<T>>[];
378
+ }
379
+ /**
380
+ * Item of a Repeater
381
+ */
382
+ export interface IRepeaterItem {
383
+ name: string;
384
+ itemType?: string;
385
+ itemLabel?: string;
386
+ min?: number;
387
+ max?: number;
388
+ positionLabel?: string;
389
+ getDefaultProps?: () => Props;
390
+ items?: {
391
+ type: string;
392
+ label?: string;
393
+ min?: number;
394
+ max?: number;
395
+ getDefaultProps?: () => Props;
396
+ }[];
397
+ }
398
+ /**
399
+ * The content of a block (instance of a Brick)
400
+ */
401
+ export interface IContentBlock {
402
+ id: string;
403
+ type: string;
404
+ props: Props;
405
+ locked?: boolean;
406
+ canAddAfter?: boolean;
407
+ canAddBefore?: boolean;
408
+ canEditContent?: boolean;
409
+ }
410
+ /**
411
+ * Option of a select sidebar prop
412
+ */
413
+ export interface IOption {
414
+ value: any;
415
+ label: string;
416
+ }
417
+ /**
418
+ * Interface for Props of a Custom sidebar component
419
+ */
420
+ export interface ICustomKnobProps {
421
+ id: string;
422
+ value: any;
423
+ onChange: any;
424
+ isValid: boolean;
425
+ errorMessage?: string;
426
+ }
427
+ /**
428
+ * Sidebar edit Props for a Page
429
+ */
430
+ export interface ISideEditPropPage<T = Props> {
431
+ name: string;
432
+ label: string;
433
+ type: SideEditPropType;
434
+ component?: React__default.FC<ICustomKnobProps>;
435
+ validate?: (value: any, props?: T) => boolean | string;
436
+ show?: (props: T, page?: Page, user?: User) => boolean;
437
+ helperText?: string;
438
+ textareaOptions?: {
439
+ height?: number;
440
+ };
441
+ imageOptions?: {
442
+ maxWidth?: number;
443
+ aspectRatio?: number;
444
+ };
445
+ rangeOptions?: {
446
+ min?: number;
447
+ max?: number;
448
+ step?: number;
449
+ };
450
+ selectOptions?: {
451
+ options?: IOption[];
452
+ getOptions?: (props: Props) => IOption[] | Promise<IOption[]>;
453
+ display: OptionsDisplay;
454
+ };
455
+ relationshipOptions?: {
456
+ label?: string;
457
+ references: string;
458
+ multiple: boolean;
459
+ embedValues?: boolean;
460
+ };
461
+ }
462
+ /**
463
+ * Sidebar Edit Props
464
+ */
465
+ export interface ISideEditProp<T = Props> extends ISideEditPropPage<T> {
466
+ shouldRefreshText?: boolean;
467
+ shouldRefreshStyles?: boolean;
468
+ }
469
+ /**
470
+ * A collapsible Group of sidebar Props
471
+ */
472
+ export interface ISideGroup<T = Props> {
473
+ groupName: string;
474
+ defaultOpen?: boolean;
475
+ show?: (props: T, page?: Page, user?: User) => boolean;
476
+ props: ISideEditProp<T>[] | ISideEditPropPage<T>[];
477
+ }
478
+ /**
479
+ * Image Crop interface
480
+ */
481
+ export interface ICrop {
482
+ x: number;
483
+ y: number;
484
+ width: number;
485
+ height: number;
486
+ }
487
+ /**
488
+ * Image Transform interface
489
+ */
490
+ export interface ITransform {
491
+ rotate?: number;
492
+ flip?: {
493
+ horizontal: boolean;
494
+ vertical: boolean;
495
+ };
496
+ }
497
+ /**
498
+ * Image value interface
499
+ */
500
+ export interface IImageSource {
501
+ src: string;
502
+ srcSet?: string;
503
+ type?: string;
504
+ fallbackSrc?: string;
505
+ fallbackSrcSet?: string;
506
+ fallbackType?: string;
507
+ placeholderSrc?: string;
508
+ alt?: string;
509
+ seoName?: string;
510
+ width?: number;
511
+ height?: number;
512
+ highPriority?: boolean;
513
+ hashId?: string;
514
+ crop?: ICrop;
515
+ transform?: ITransform;
516
+ }
517
+ /**
518
+ * File value interface
519
+ */
520
+ export interface IFileSource {
521
+ name: string;
522
+ url: string;
523
+ size: number;
524
+ extension: string;
525
+ pagesNum: number;
526
+ title?: string | undefined;
527
+ alt?: string | undefined;
528
+ copyright?: string | undefined;
529
+ source?: string | undefined;
530
+ }
531
+ /**
532
+ * A Color for a Select sidebar prop
533
+ */
534
+ export interface IColor {
535
+ color: string;
536
+ [propName: string]: any;
537
+ }
538
+ export interface IBrickStory {
539
+ brickName: string;
540
+ storyName: string;
541
+ locked?: boolean;
542
+ canAddAfter?: boolean;
543
+ canAddBefore?: boolean;
544
+ }
545
+ /**
546
+ * Page type
547
+ */
548
+ export interface IPageType {
549
+ name: string;
550
+ pluralName: string;
551
+ isEntity?: boolean;
552
+ allowedBlockTypes?: string[];
553
+ excludedBlockTypes?: string[];
554
+ defaultLocked?: boolean;
555
+ defaultStatus?: PageStatus;
556
+ defaultLanguage?: string;
557
+ defaultFeaturedImage?: string;
558
+ getDefaultContent?: () => (string | IBrickStory | IContentBlock)[];
559
+ customFields?: Array<ISideEditPropPage | ISideGroup>;
560
+ getExternalData?: (page: Page, args?: any) => Promise<Props>;
561
+ metaImageAspectRatio?: number;
562
+ categories?: ICategory[];
563
+ slugPrefix?: ISlugPrefix;
564
+ }
565
+ /**
566
+ * Structure returned by the cleanBlocks function
567
+ */
568
+ export interface ICleanBlocks {
569
+ blocks: IContentBlock[];
570
+ invalidBlocksTypes: string[];
571
+ }
572
+ /**
573
+ * Responsive breakpoint for preview
574
+ */
575
+ export interface ResponsiveBreakpoint {
576
+ type: DeviceType;
577
+ width: number | string;
578
+ label: string;
579
+ }
580
+ /**
581
+ * Login UI customization
582
+ */
583
+ export interface LoginUI {
584
+ sideImage?: string;
585
+ logo?: string;
586
+ logoWidth?: number;
587
+ logoHeight?: number;
588
+ welcomeText?: string;
589
+ welcomeTextStyle?: React__default.CSSProperties;
590
+ }
591
+ /**
592
+ * MenuItem interface
593
+ */
594
+ export interface IMenuItem {
595
+ label: string;
596
+ path?: string;
597
+ }
598
+ /**
599
+ * The ReactBricks configuration
600
+ */
601
+ export interface ReactBricksConfig {
602
+ appId: string;
603
+ apiKey: string;
604
+ environment?: string;
605
+ bricks?: types.Brick<any>[] | types.Theme[];
606
+ pageTypes?: types.IPageType[];
607
+ logo?: string;
608
+ loginUI?: LoginUI;
609
+ contentClassName?: string;
610
+ defaultTheme?: string;
611
+ renderLocalLink: types.RenderLocalLink;
612
+ navigate: (path: string) => void;
613
+ loginPath?: string;
614
+ editorPath?: string;
615
+ mediaLibraryPath?: string;
616
+ playgroundPath?: string;
617
+ appSettingsPath?: string;
618
+ previewPath?: string;
619
+ getAdminMenu?: (args: {
620
+ isAdmin: boolean;
621
+ }) => IMenuItem[];
622
+ isDarkColorMode?: boolean;
623
+ toggleColorMode?: () => void;
624
+ useCssInJs?: boolean;
625
+ appRootElement: string | HTMLElement;
626
+ clickToEditSide?: ClickToEditSide;
627
+ customFields?: Array<ISideEditPropPage | ISideGroup>;
628
+ responsiveBreakpoints?: ResponsiveBreakpoint[];
629
+ enableAutoSave?: boolean;
630
+ disableSaveIfInvalidProps?: boolean;
631
+ enablePreview?: boolean;
632
+ blockIconsPosition?: BlockIconsPosition;
633
+ enablePreviewImage?: boolean;
634
+ enablePreviewIcon?: boolean;
635
+ enableUnsplash?: boolean;
636
+ unsplashApiKey?: string;
637
+ enableDefaultEmbedBrick?: boolean;
638
+ permissions?: Permissions;
639
+ allowAccentsInSlugs?: boolean;
640
+ }
641
+ /**
642
+ * The ReactBricks context
643
+ */
644
+ export interface IReactBricksContext {
645
+ version: string;
646
+ appId: string;
647
+ apiKey: string;
648
+ environment?: string;
649
+ bricks: Bricks;
650
+ themes: types.Theme[];
651
+ pageTypes: IPageType[];
652
+ logo: string;
653
+ loginUI: LoginUI;
654
+ contentClassName: string;
655
+ defaultTheme: string;
656
+ renderLocalLink: RenderLocalLink;
657
+ navigate: (path: string) => void;
658
+ loginPath: string;
659
+ editorPath: string;
660
+ mediaLibraryPath: string;
661
+ playgroundPath: string;
662
+ appSettingsPath: string;
663
+ previewPath: string;
664
+ getAdminMenu?: (args: {
665
+ isAdmin: boolean;
666
+ }) => IMenuItem[];
667
+ isDarkColorMode?: boolean;
668
+ toggleColorMode?: () => void;
669
+ useCssInJs?: boolean;
670
+ appRootElement: string | HTMLElement;
671
+ clickToEditSide?: ClickToEditSide;
672
+ customFields?: Array<ISideEditPropPage | ISideGroup>;
673
+ responsiveBreakpoints: ResponsiveBreakpoint[];
674
+ enableAutoSave: boolean;
675
+ disableSaveIfInvalidProps: boolean;
676
+ enablePreview: boolean;
677
+ browserSupport: {
678
+ webP: boolean;
679
+ lazyLoading: boolean;
680
+ };
681
+ blockIconsPosition: BlockIconsPosition;
682
+ enablePreviewImage: boolean;
683
+ enablePreviewIcon: boolean;
684
+ enableUnsplash: boolean;
685
+ unsplashApiKey?: string;
686
+ enableDefaultEmbedBrick: boolean;
687
+ permissions?: Permissions;
688
+ allowAccentsInSlugs: boolean;
689
+ }
690
+ /**
691
+ * The current page in Admin
692
+ */
693
+ export interface ICurrentPage {
694
+ pageId: string;
695
+ language?: string;
696
+ }
697
+ /**
698
+ * The Admin context returned from useAdminContext
699
+ */
700
+ export interface IReadAdminContext {
701
+ isAdmin: boolean;
702
+ previewMode: boolean;
703
+ currentPage: ICurrentPage;
704
+ }
705
+ /**
706
+ * Opengraph type
707
+ */
708
+ export type OpenGraphType = 'article' | 'website' | 'profile' | 'book' | 'video' | 'music';
709
+ /**
710
+ * OpenGraph data
711
+ */
712
+ export type OpenGraphData = {
713
+ url?: string;
714
+ type?: OpenGraphType;
715
+ title?: string;
716
+ description?: string;
717
+ image?: types.IImageSource;
718
+ };
719
+ /**
720
+ * Twitter card type
721
+ */
722
+ export type TwitterCardType = 'summary' | 'summary_large_image' | 'app' | 'player';
723
+ /**
724
+ * Data for Twitter card
725
+ */
726
+ export type TwitterCardData = {
727
+ card?: TwitterCardType;
728
+ site?: string;
729
+ creator?: string;
730
+ title?: string;
731
+ description?: string;
732
+ image?: types.IImageSource;
733
+ };
734
+ /**
735
+ * Meta Fields type
736
+ * */
737
+ export type MetaData = {
738
+ title?: string;
739
+ description?: string;
740
+ keywords?: string;
741
+ featuredImage?: string;
742
+ image?: IImageSource;
743
+ };
744
+ /**
745
+ * Meta fields on Page
746
+ */
747
+ export interface IMeta extends MetaData {
748
+ language?: string;
749
+ openGraph?: OpenGraphData;
750
+ twitterCard?: TwitterCardData;
751
+ schemaOrg?: SchemaOrgData;
752
+ }
753
+ /**
754
+ * Category on categories (pageTypes)
755
+ */
756
+ export interface ICategory {
757
+ category?: string;
758
+ }
759
+ /**
760
+ * A RichTextExt Plugin
761
+ */
762
+ export interface RichTextPlugin {
763
+ type: 'Mark' | 'Block' | 'List';
764
+ name: string;
765
+ isInline?: boolean;
766
+ itemName?: string;
767
+ label: string;
768
+ hotKey?: string;
769
+ renderElement?: (props: RenderElementProps) => JSX.Element;
770
+ renderItemElement?: (props: RenderElementProps) => JSX.Element;
771
+ renderLeaf?: (props: RenderLeafProps) => JSX.Element;
772
+ toggle: (editor: Editor, plugins: RichTextPlugin[]) => void;
773
+ button?: {
774
+ icon: React__default.ReactElement;
775
+ isActive: (editor: Editor) => boolean;
776
+ };
777
+ enhanceEditor?: (editor: Editor) => Editor;
778
+ }
779
+ /**
780
+ * Definition for a Mark plugin
781
+ */
782
+ export interface MarkPlugin {
783
+ name: string;
784
+ label?: string;
785
+ hotKey?: string;
786
+ render: (props: RenderLeafProps) => JSX.Element;
787
+ icon?: React__default.ReactElement;
788
+ }
789
+ /**
790
+ * Constructor for a Mark plugin
791
+ */
792
+ export type MarkPluginConstructor = (markPlugin: MarkPlugin) => RichTextPlugin;
793
+ /**
794
+ * Definition for a Block plugin
795
+ */
796
+ export interface BlockPlugin {
797
+ name: string;
798
+ isInline?: boolean;
799
+ itemName?: string;
800
+ label?: string;
801
+ hotKey?: string;
802
+ render: (props: RenderElementProps) => JSX.Element;
803
+ renderItem?: (props: RenderElementProps) => JSX.Element;
804
+ icon?: React__default.ReactElement;
805
+ }
806
+ /**
807
+ * Constructor for a Block plugin
808
+ */
809
+ export type BlockPluginConstructor = (blockPlugin: BlockPlugin) => RichTextPlugin;
810
+ export {};
811
+ }
812
+
813
+ interface IReactBricksClientProvider {
814
+ bricks?: any;
815
+ setBricks?: any;
816
+ }
817
+ declare const ReactBricksClientContext: React__default.Context<IReactBricksClientProvider>;
818
+ declare function ReactBricksClientProvider({ children, bricks: bricksArray, pageTypes, enableDefaultEmbedBrick, }: {
819
+ children: any;
820
+ bricks?: types.Brick<any>[] | types.Theme[] | undefined;
821
+ pageTypes?: types.IPageType[] | undefined;
822
+ enableDefaultEmbedBrick?: boolean;
823
+ }): React__default.JSX.Element;
824
+
825
+ /**
826
+ * Props for ClickToEdit
827
+ */
828
+ interface ClickToEditProps {
829
+ pageId: string;
830
+ language?: string;
831
+ editorPath: string;
832
+ clickToEditSide?: types.ClickToEditSide;
833
+ }
834
+ declare const ClickToEdit: React__default.FC<ClickToEditProps>;
835
+
836
+ /**
837
+ * Props for Text component
838
+ */
839
+ declare type RegisterComponentProps = {
840
+ page: types.Page;
841
+ block: types.IContentBlock;
842
+ };
843
+ declare const RegisterComponent: React.FC<RegisterComponentProps>;
844
+
845
+ declare const usePageValues: () => [types.PageValues, (pageData: types.PartialPage) => void];
846
+
847
+ declare const useVisualEdit: (propName: string) => [any, (value: any) => void, boolean];
848
+
849
+ export { ClickToEdit, ReactBricksClientContext, ReactBricksClientProvider, RegisterComponent, types, usePageValues, useVisualEdit };