react-bricks 3.12.4 → 4.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/react-bricks.d.ts CHANGED
@@ -3,7 +3,23 @@ import React__default from 'react';
3
3
  import { BaseEditor, Descendant, Editor as Editor$1, Node } from 'slate';
4
4
  import { HistoryEditor } from 'slate-history';
5
5
  import { ReactEditor, RenderElementProps, RenderLeafProps } from 'slate-react';
6
- import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
6
+ import { ArticleSchemaOrgType, ArticleSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/ArticleForm';
7
+ import { BreadCrumbSchemaOrgType, BreadCrumbSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/BreadcrumbForm';
8
+ import { EventSchemaOrgType, EventSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/EventForm';
9
+ import { FaqSchemaOrgType, FaqSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/FaqForm';
10
+ import { HowToSchemaOrgType, HowToSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/HowToForm';
11
+ import { JobPostingSchemaOrgType, JobPostingSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/JobPostingForm';
12
+ import { LocalBusinessSchemaOrgType, LocalBusinessSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/LocalBusinessForm';
13
+ import { OrganizationSchemaOrgType, OrganizationSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/OrganizationForm';
14
+ import { PersonSchemaOrgType, PersonSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/PersonForm';
15
+ import { ProductSchemaOrgType, ProductSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/ProductForm';
16
+ import { RecipeSchemaOrgType, RecipeSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/RecipeForm';
17
+ import { ThingSchemaOrgType, ThingSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/ThingForm';
18
+ import { VideoSchemaOrgType, VideoSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/VideoForm';
19
+ import { WebsiteSchemaOrgType, WebsiteSchema } from 'admin/Editor/ContentEditor/Sidebar/EditDocument/AdvancedSeo/components/SchemaOrgForms/WebsiteForm';
20
+ import { types as types$1 } from 'frontend';
21
+ import { File as File$1 } from 'admin/Editor/ContentEditor/wysiwyg/File/types';
22
+ import { Image as Image$1 } from 'admin/Editor/ContentEditor/wysiwyg/Image/types';
7
23
  import * as react_query from 'react-query';
8
24
  import { UseQueryResult } from 'react-query';
9
25
  export { v4 as uuid } from 'uuid';
@@ -472,6 +488,25 @@ declare namespace types {
472
488
  show?: (props: Props) => boolean;
473
489
  props: ISideEditProp[] | ISideEditPropPage[];
474
490
  }
491
+ /**
492
+ * Image Crop interface
493
+ */
494
+ export interface ICrop {
495
+ x: number;
496
+ y: number;
497
+ width: number;
498
+ height: number;
499
+ }
500
+ /**
501
+ * Image Transform interface
502
+ */
503
+ export interface ITransform {
504
+ rotate?: number;
505
+ flip?: {
506
+ horizontal: boolean;
507
+ vertical: boolean;
508
+ };
509
+ }
475
510
  /**
476
511
  * Image value interface
477
512
  */
@@ -488,6 +523,9 @@ declare namespace types {
488
523
  width?: number;
489
524
  height?: number;
490
525
  highPriority?: boolean;
526
+ hashId?: string;
527
+ crop?: ICrop;
528
+ transform?: ITransform;
491
529
  }
492
530
  /**
493
531
  * File value interface
@@ -496,6 +534,12 @@ declare namespace types {
496
534
  name: string;
497
535
  url: string;
498
536
  size: number;
537
+ extension: string;
538
+ pagesNum: number;
539
+ title?: string | undefined;
540
+ alt?: string | undefined;
541
+ copyright?: string | undefined;
542
+ source?: string | undefined;
499
543
  }
500
544
  /**
501
545
  * A Color for a Select sidebar prop
@@ -569,6 +613,7 @@ declare namespace types {
569
613
  export interface ReactBricksConfig {
570
614
  appId: string;
571
615
  apiKey: string;
616
+ environment?: string;
572
617
  bricks?: types.Brick<any>[] | types.Theme[];
573
618
  pageTypes?: types.IPageType[];
574
619
  logo?: string;
@@ -579,6 +624,7 @@ declare namespace types {
579
624
  navigate: (path: string) => void;
580
625
  loginPath?: string;
581
626
  editorPath?: string;
627
+ mediaLibraryPath?: string;
582
628
  playgroundPath?: string;
583
629
  appSettingsPath?: string;
584
630
  previewPath?: string;
@@ -610,6 +656,7 @@ declare namespace types {
610
656
  version: string;
611
657
  appId: string;
612
658
  apiKey: string;
659
+ environment?: string;
613
660
  bricks: Bricks;
614
661
  themes: types.Theme[];
615
662
  pageTypes: IPageType[];
@@ -621,6 +668,7 @@ declare namespace types {
621
668
  navigate: (path: string) => void;
622
669
  loginPath: string;
623
670
  editorPath: string;
671
+ mediaLibraryPath: string;
624
672
  playgroundPath: string;
625
673
  appSettingsPath: string;
626
674
  previewPath: string;
@@ -658,14 +706,58 @@ declare namespace types {
658
706
  currentPage: ICurrentPage;
659
707
  }
660
708
  /**
661
- * Meta fields on Page
709
+ * Opengraph type
710
+ */
711
+ export type OpenGraphType = 'article' | 'website' | 'profile' | 'book' | 'video' | 'music';
712
+ /**
713
+ * OpenGraph data
714
+ */
715
+ export type OpenGraphData = {
716
+ url: string;
717
+ type: OpenGraphType;
718
+ title: string;
719
+ description: string;
720
+ image: types.IImageSource;
721
+ };
722
+ /**
723
+ * Twitter card type
724
+ */
725
+ export type TwitterCardType = 'summary' | 'summary_large_image' | 'app' | 'player';
726
+ /**
727
+ * Data for Twitter card
728
+ */
729
+ export type TwitterCardData = {
730
+ card: TwitterCardType;
731
+ site: string;
732
+ creator: string;
733
+ title: string;
734
+ description: string;
735
+ image: types.IImageSource;
736
+ };
737
+ /** Schema.org type */
738
+ export type SchemaOrgType = ArticleSchemaOrgType | BreadCrumbSchemaOrgType | EventSchemaOrgType | FaqSchemaOrgType | HowToSchemaOrgType | JobPostingSchemaOrgType | LocalBusinessSchemaOrgType | OrganizationSchemaOrgType | PersonSchemaOrgType | ProductSchemaOrgType | RecipeSchemaOrgType | ThingSchemaOrgType | VideoSchemaOrgType | WebsiteSchemaOrgType;
739
+ /**
740
+ * Schema.org data
662
741
  */
663
- export interface IMeta {
742
+ export type SchemaOrgData = ArticleSchema | BreadCrumbSchema | EventSchema | FaqSchema | HowToSchema | JobPostingSchema | LocalBusinessSchema | OrganizationSchema | PersonSchema | ProductSchema | RecipeSchema | ThingSchema | VideoSchema | WebsiteSchema;
743
+ /**
744
+ * Meta Fields type
745
+ * */
746
+ export type MetaData = {
664
747
  title?: string;
665
748
  description?: string;
749
+ keywords?: string;
750
+ };
751
+ /**
752
+ * Meta fields on Page
753
+ */
754
+ export interface IMeta extends MetaData {
666
755
  language?: string;
667
756
  featuredImage?: string;
668
757
  image?: IImageSource;
758
+ openGraph?: OpenGraphData;
759
+ twitterCard?: TwitterCardData;
760
+ schemaOrg?: SchemaOrgData;
669
761
  }
670
762
  /**
671
763
  * Category on categories (pageTypes)
@@ -919,6 +1011,18 @@ declare const PageViewer: React.FC<PageViewerProps>;
919
1011
  */
920
1012
  declare const Preview: React.FC;
921
1013
 
1014
+ declare const Meta: React.FC<types$1.IMeta>;
1015
+
1016
+ declare const renderMeta: React.FC<types$1.IMeta>;
1017
+
1018
+ interface JsonLdProps {
1019
+ type: types$1.SchemaOrgType;
1020
+ values: types$1.SchemaOrgData;
1021
+ }
1022
+ declare const JsonLd: React__default.FC<JsonLdProps>;
1023
+
1024
+ declare const renderJsonLd: React__default.FC<types$1.IMeta>;
1025
+
922
1026
  declare const usePage$1: (pageId: string, language?: string) => react_query.UseQueryResult<types.Page, unknown>;
923
1027
 
924
1028
  declare const usePage: (slug: string, language?: string) => react_query.UseQueryResult<types.Page, unknown>;
@@ -1117,8 +1221,11 @@ declare const Playground: () => React.JSX.Element;
1117
1221
 
1118
1222
  declare const AppSettings: React.FC;
1119
1223
 
1120
- var css_248z = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:\"\";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}";
1121
- styleInject(css_248z);
1224
+ interface MediaLibraryProps {
1225
+ onSelect?: (media: Image$1 | File$1, crop?: types$1.ICrop, transform?: types$1.ITransform) => void;
1226
+ popup?: 'image' | 'file';
1227
+ }
1228
+ declare const MediaLibrary: React__default.FC<MediaLibraryProps>;
1122
1229
 
1123
1230
  declare const Admin: React.FC<AdminProps>;
1124
1231
 
@@ -1179,4 +1286,4 @@ declare const useAuth: () => {
1179
1286
  logoutUser: () => void;
1180
1287
  };
1181
1288
 
1182
- export { Admin, AdminContext, AppSettings, Editor, File, Header, Image, Link, Login, PageViewer, _default as Plain, Playground, Preview, ReactBricks, ReactBricksContext, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Text, blockPluginConstructor, cleanPage, fetchPage, fetchPages, fetchTags, getPagePlainText, markPluginConstructor, index as plugins, types, useAdminContext, useAuth, usePage$1 as usePage, usePage as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useTagsPublic, useVisualEdit };
1289
+ export { Admin, AdminContext, AppSettings, Editor, File, Header, Image, JsonLd, Link, Login, MediaLibrary, Meta, PageViewer, _default as Plain, Playground, Preview, ReactBricks, ReactBricksContext, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Text, blockPluginConstructor, cleanPage, fetchPage, fetchPages, fetchTags, getPagePlainText, markPluginConstructor, index as plugins, renderJsonLd, renderMeta, types, useAdminContext, useAuth, usePage$1 as usePage, usePage as usePagePublic, usePageValues, usePages, usePagesPublic, useReactBricksContext, useTagsPublic, useVisualEdit };