react-bricks 4.0.0-alpha.0 → 4.0.0-alpha.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/frontend/index.js +1 -1
- package/frontend/package.json +3 -2
- package/frontend/react-bricks-frontend.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +18 -15
- package/react-bricks-6aa04d5f.js +2 -0
- package/react-bricks-c773bdb6.esm.js +2 -0
- package/react-bricks.d.ts +111 -6
- package/react-bricks.esm.js +1 -1
- package/react-bricks-042cdb94.esm.js +0 -2
- package/react-bricks-d19bc3e6.js +0 -2
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
|
|
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
|
|
@@ -580,6 +624,7 @@ declare namespace types {
|
|
|
580
624
|
navigate: (path: string) => void;
|
|
581
625
|
loginPath?: string;
|
|
582
626
|
editorPath?: string;
|
|
627
|
+
mediaLibraryPath?: string;
|
|
583
628
|
playgroundPath?: string;
|
|
584
629
|
appSettingsPath?: string;
|
|
585
630
|
previewPath?: string;
|
|
@@ -623,6 +668,7 @@ declare namespace types {
|
|
|
623
668
|
navigate: (path: string) => void;
|
|
624
669
|
loginPath: string;
|
|
625
670
|
editorPath: string;
|
|
671
|
+
mediaLibraryPath: string;
|
|
626
672
|
playgroundPath: string;
|
|
627
673
|
appSettingsPath: string;
|
|
628
674
|
previewPath: string;
|
|
@@ -660,14 +706,58 @@ declare namespace types {
|
|
|
660
706
|
currentPage: ICurrentPage;
|
|
661
707
|
}
|
|
662
708
|
/**
|
|
663
|
-
*
|
|
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
|
|
664
741
|
*/
|
|
665
|
-
export
|
|
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 = {
|
|
666
747
|
title?: string;
|
|
667
748
|
description?: string;
|
|
749
|
+
keywords?: string;
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Meta fields on Page
|
|
753
|
+
*/
|
|
754
|
+
export interface IMeta extends MetaData {
|
|
668
755
|
language?: string;
|
|
669
756
|
featuredImage?: string;
|
|
670
757
|
image?: IImageSource;
|
|
758
|
+
openGraph?: OpenGraphData;
|
|
759
|
+
twitterCard?: TwitterCardData;
|
|
760
|
+
schemaOrg?: SchemaOrgData;
|
|
671
761
|
}
|
|
672
762
|
/**
|
|
673
763
|
* Category on categories (pageTypes)
|
|
@@ -921,6 +1011,18 @@ declare const PageViewer: React.FC<PageViewerProps>;
|
|
|
921
1011
|
*/
|
|
922
1012
|
declare const Preview: React.FC;
|
|
923
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
|
+
|
|
924
1026
|
declare const usePage$1: (pageId: string, language?: string) => react_query.UseQueryResult<types.Page, unknown>;
|
|
925
1027
|
|
|
926
1028
|
declare const usePage: (slug: string, language?: string) => react_query.UseQueryResult<types.Page, unknown>;
|
|
@@ -1119,8 +1221,11 @@ declare const Playground: () => React.JSX.Element;
|
|
|
1119
1221
|
|
|
1120
1222
|
declare const AppSettings: React.FC;
|
|
1121
1223
|
|
|
1122
|
-
|
|
1123
|
-
|
|
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>;
|
|
1124
1229
|
|
|
1125
1230
|
declare const Admin: React.FC<AdminProps>;
|
|
1126
1231
|
|
|
@@ -1181,4 +1286,4 @@ declare const useAuth: () => {
|
|
|
1181
1286
|
logoutUser: () => void;
|
|
1182
1287
|
};
|
|
1183
1288
|
|
|
1184
|
-
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 };
|