@gravity-ui/page-constructor 2.18.0 → 3.0.0-alpha.0
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/CHANGELOG.md +0 -19
- package/build/cjs/blocks/index.d.ts +0 -4
- package/build/cjs/blocks/index.js +1 -9
- package/build/cjs/blocks/validators.d.ts +0 -4
- package/build/cjs/blocks/validators.js +0 -4
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
- package/build/cjs/components/Anchor/Anchor.js +1 -1
- package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/cjs/components/Anchor/__tests__/Anchor.test.js +21 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +36 -0
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.js +63 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +44 -0
- package/build/cjs/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/cjs/components/Button/__tests__/Button.test.js +91 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +58 -0
- package/build/cjs/components/index.d.ts +0 -1
- package/build/cjs/components/index.js +1 -3
- package/build/cjs/constructor-items.d.ts +0 -16
- package/build/cjs/constructor-items.js +0 -16
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/hooks/index.d.ts +1 -1
- package/build/cjs/hooks/index.js +3 -3
- package/build/cjs/internal-typings/global.d.ts +16 -18
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -50
- package/build/cjs/models/constructor-items/blocks.js +0 -4
- package/build/cjs/models/constructor-items/common.d.ts +0 -14
- package/build/cjs/models/constructor-items/common.js +1 -6
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/cjs/models/constructor-items/sub-blocks.js +2 -11
- package/build/cjs/schema/index.js +2 -8
- package/build/cjs/schema/validators/blocks.d.ts +0 -4
- package/build/cjs/schema/validators/blocks.js +0 -4
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -3
- package/build/cjs/schema/validators/sub-blocks.js +0 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +2 -5
- package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +5 -6
- package/build/cjs/sub-blocks/index.d.ts +0 -3
- package/build/cjs/sub-blocks/index.js +1 -7
- package/build/cjs/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/cjs/text-transform/common.js +31 -0
- package/build/cjs/text-transform/config.d.ts +28 -0
- package/build/cjs/text-transform/config.js +291 -0
- package/build/cjs/text-transform/index.d.ts +3 -1
- package/build/cjs/text-transform/index.js +3 -1
- package/build/cjs/text-transform/transformers.d.ts +16 -0
- package/build/cjs/text-transform/transformers.js +61 -0
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +0 -1
- package/build/esm/blocks/index.d.ts +0 -4
- package/build/esm/blocks/index.js +0 -4
- package/build/esm/blocks/validators.d.ts +0 -4
- package/build/esm/blocks/validators.js +0 -4
- package/build/esm/components/Anchor/Anchor.d.ts +2 -2
- package/build/esm/components/Anchor/Anchor.js +1 -1
- package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/esm/components/Anchor/__tests__/Anchor.test.js +18 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +33 -0
- package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/esm/components/Author/__tests__/Author.test.js +46 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.js +60 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +41 -0
- package/build/esm/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/esm/components/Button/__tests__/Button.test.js +88 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +55 -0
- package/build/esm/components/index.d.ts +0 -1
- package/build/esm/components/index.js +0 -1
- package/build/esm/constructor-items.d.ts +0 -16
- package/build/esm/constructor-items.js +2 -18
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/hooks/index.d.ts +1 -1
- package/build/esm/hooks/index.js +1 -1
- package/build/esm/internal-typings/global.d.ts +16 -18
- package/build/esm/models/constructor-items/blocks.d.ts +2 -50
- package/build/esm/models/constructor-items/blocks.js +0 -4
- package/build/esm/models/constructor-items/common.d.ts +0 -14
- package/build/esm/models/constructor-items/common.js +0 -5
- package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/esm/models/constructor-items/sub-blocks.js +2 -11
- package/build/esm/schema/index.js +4 -10
- package/build/esm/schema/validators/blocks.d.ts +0 -4
- package/build/esm/schema/validators/blocks.js +0 -4
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -3
- package/build/esm/schema/validators/sub-blocks.js +0 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +3 -6
- package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +6 -7
- package/build/esm/sub-blocks/index.d.ts +0 -3
- package/build/esm/sub-blocks/index.js +0 -3
- package/build/esm/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/esm/text-transform/common.js +25 -0
- package/build/esm/text-transform/config.d.ts +28 -0
- package/build/esm/text-transform/{blocks.js → config.js} +15 -123
- package/build/esm/text-transform/index.d.ts +3 -1
- package/build/esm/text-transform/index.js +3 -1
- package/build/esm/text-transform/transformers.d.ts +16 -0
- package/build/esm/text-transform/transformers.js +56 -0
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/package.json +4 -1
- package/server/models/constructor-items/blocks.d.ts +2 -50
- package/server/models/constructor-items/blocks.js +0 -4
- package/server/models/constructor-items/common.d.ts +0 -14
- package/server/models/constructor-items/common.js +1 -6
- package/server/models/constructor-items/sub-blocks.d.ts +5 -46
- package/server/models/constructor-items/sub-blocks.js +2 -11
- package/server/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/server/text-transform/common.js +31 -0
- package/server/text-transform/config.d.ts +28 -0
- package/server/text-transform/config.js +301 -0
- package/server/text-transform/index.d.ts +3 -1
- package/server/text-transform/index.js +3 -1
- package/server/text-transform/transformers.d.ts +16 -0
- package/server/text-transform/transformers.js +63 -0
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- package/build/cjs/blocks/LinkTable/LinkTable.css +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.d.ts +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.js +0 -22
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -77
- package/build/cjs/blocks/LinkTable/schema.js +0 -15
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +0 -13
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +0 -49
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -11
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +0 -17
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -9
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +0 -13
- package/build/cjs/blocks/Preview/Preview.css +0 -50
- package/build/cjs/blocks/Preview/Preview.d.ts +0 -3
- package/build/cjs/blocks/Preview/Preview.js +0 -130
- package/build/cjs/blocks/Preview/schema.d.ts +0 -40
- package/build/cjs/blocks/Preview/schema.js +0 -53
- package/build/cjs/blocks/Security/Security.css +0 -142
- package/build/cjs/blocks/Security/Security.d.ts +0 -3
- package/build/cjs/blocks/Security/Security.js +0 -29
- package/build/cjs/blocks/Security/schema.d.ts +0 -170
- package/build/cjs/blocks/Security/schema.js +0 -32
- package/build/cjs/blocks/Simple/Simple.css +0 -22
- package/build/cjs/blocks/Simple/Simple.d.ts +0 -3
- package/build/cjs/blocks/Simple/Simple.js +0 -22
- package/build/cjs/blocks/Simple/schema.d.ts +0 -68
- package/build/cjs/blocks/Simple/schema.js +0 -14
- package/build/cjs/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +0 -10
- package/build/cjs/components/HeightCalculator/HeightCalculator.js +0 -44
- package/build/cjs/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/cjs/context/breakpointContext/breakpointContext.js +0 -7
- package/build/cjs/context/breakpointContext/index.d.ts +0 -1
- package/build/cjs/context/breakpointContext/index.js +0 -4
- package/build/cjs/hooks/useIntersection.d.ts +0 -1
- package/build/cjs/hooks/useIntersection.js +0 -21
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -3
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +0 -16
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/cjs/sub-blocks/CardWithImage/schema.js +0 -46
- package/build/cjs/sub-blocks/Partner/Partner.css +0 -8
- package/build/cjs/sub-blocks/Partner/Partner.d.ts +0 -3
- package/build/cjs/sub-blocks/Partner/Partner.js +0 -15
- package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/cjs/sub-blocks/Partner/schema.js +0 -17
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -3
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +0 -23
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -20
- package/build/cjs/text-transform/blocks.js +0 -404
- package/build/cjs/utils/scroll.d.ts +0 -15
- package/build/cjs/utils/scroll.js +0 -35
- package/build/esm/blocks/LinkTable/LinkTable.css +0 -3
- package/build/esm/blocks/LinkTable/LinkTable.d.ts +0 -4
- package/build/esm/blocks/LinkTable/LinkTable.js +0 -21
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -77
- package/build/esm/blocks/LinkTable/schema.js +0 -12
- package/build/esm/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +0 -14
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +0 -47
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -12
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +0 -15
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -10
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +0 -11
- package/build/esm/blocks/Preview/Preview.css +0 -50
- package/build/esm/blocks/Preview/Preview.d.ts +0 -4
- package/build/esm/blocks/Preview/Preview.js +0 -126
- package/build/esm/blocks/Preview/schema.d.ts +0 -40
- package/build/esm/blocks/Preview/schema.js +0 -50
- package/build/esm/blocks/Security/Security.css +0 -142
- package/build/esm/blocks/Security/Security.d.ts +0 -4
- package/build/esm/blocks/Security/Security.js +0 -25
- package/build/esm/blocks/Security/schema.d.ts +0 -170
- package/build/esm/blocks/Security/schema.js +0 -28
- package/build/esm/blocks/Simple/Simple.css +0 -22
- package/build/esm/blocks/Simple/Simple.d.ts +0 -4
- package/build/esm/blocks/Simple/Simple.js +0 -18
- package/build/esm/blocks/Simple/schema.d.ts +0 -68
- package/build/esm/blocks/Simple/schema.js +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.js +0 -42
- package/build/esm/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/esm/context/breakpointContext/breakpointContext.js +0 -3
- package/build/esm/context/breakpointContext/index.d.ts +0 -1
- package/build/esm/context/breakpointContext/index.js +0 -1
- package/build/esm/hooks/useIntersection.d.ts +0 -1
- package/build/esm/hooks/useIntersection.js +0 -17
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -4
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +0 -14
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/esm/sub-blocks/CardWithImage/schema.js +0 -43
- package/build/esm/sub-blocks/Partner/Partner.css +0 -8
- package/build/esm/sub-blocks/Partner/Partner.d.ts +0 -4
- package/build/esm/sub-blocks/Partner/Partner.js +0 -13
- package/build/esm/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/esm/sub-blocks/Partner/schema.js +0 -14
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -4
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +0 -21
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/esm/sub-blocks/TutorialCard/schema.js +0 -17
- package/build/esm/utils/scroll.d.ts +0 -15
- package/build/esm/utils/scroll.js +0 -31
- package/server/text-transform/blocks.js +0 -417
- package/server/utils/scroll.d.ts +0 -15
- package/server/utils/scroll.js +0 -35
|
@@ -17,10 +17,6 @@ export declare enum PriceLabelColor {
|
|
|
17
17
|
PURPLE = "purple",
|
|
18
18
|
RED = "red"
|
|
19
19
|
}
|
|
20
|
-
export declare enum PreviewItemType {
|
|
21
|
-
Video = "video",
|
|
22
|
-
Image = "image"
|
|
23
|
-
}
|
|
24
20
|
export declare enum PlayButtonType {
|
|
25
21
|
Default = "default",
|
|
26
22
|
Text = "text"
|
|
@@ -49,7 +45,6 @@ export type LegendTableMarkerType = 'disk';
|
|
|
49
45
|
export type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';
|
|
50
46
|
export type MediaDirection = 'media-content' | 'content-media';
|
|
51
47
|
export type PriceDescriptionColor = 'cornflower' | 'black';
|
|
52
|
-
export type PreviewRatioMediaContent = '2-1' | '1-1';
|
|
53
48
|
export type ContentSize = 's' | 'l';
|
|
54
49
|
export type ContentTextSize = 's' | 'm' | 'l';
|
|
55
50
|
export type ContentTheme = 'default' | 'dark' | 'light';
|
|
@@ -254,15 +249,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
254
249
|
metrikaGoals?: MetrikaGoal;
|
|
255
250
|
pixelEvents?: ButtonPixel;
|
|
256
251
|
}
|
|
257
|
-
export interface PreviewContentItemProps {
|
|
258
|
-
title: string;
|
|
259
|
-
description?: string;
|
|
260
|
-
}
|
|
261
|
-
export interface PreviewItemProps {
|
|
262
|
-
type: PreviewItemType;
|
|
263
|
-
media: ThemedMediaProps;
|
|
264
|
-
content: PreviewContentItemProps;
|
|
265
|
-
}
|
|
266
252
|
export interface TitleProps extends Justifyable, TitleBaseProps {
|
|
267
253
|
navTitle?: string;
|
|
268
254
|
anchor?: string;
|
|
@@ -17,11 +17,6 @@ export var PriceLabelColor;
|
|
|
17
17
|
PriceLabelColor["PURPLE"] = "purple";
|
|
18
18
|
PriceLabelColor["RED"] = "red";
|
|
19
19
|
})(PriceLabelColor || (PriceLabelColor = {}));
|
|
20
|
-
export var PreviewItemType;
|
|
21
|
-
(function (PreviewItemType) {
|
|
22
|
-
PreviewItemType["Video"] = "video";
|
|
23
|
-
PreviewItemType["Image"] = "image";
|
|
24
|
-
})(PreviewItemType || (PreviewItemType = {}));
|
|
25
20
|
export var PlayButtonType;
|
|
26
21
|
(function (PlayButtonType) {
|
|
27
22
|
PlayButtonType["Default"] = "default";
|
|
@@ -3,33 +3,24 @@ import { ThemeSupporting } from '../../utils';
|
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
4
|
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
|
-
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps,
|
|
6
|
+
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
10
10
|
NewsCard = "news-card",
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Will be
|
|
12
|
+
* @deprecated Will be removed
|
|
13
13
|
*/
|
|
14
|
-
Partner = "partner",
|
|
15
14
|
PriceDetailed = "price-detailed",
|
|
16
15
|
MediaCard = "media-card",
|
|
17
16
|
BannerCard = "banner-card",
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Will be moved to params use BasicCard instead
|
|
20
|
-
*/
|
|
21
|
-
TutorialCard = "tutoral-card",
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use LayoutItem
|
|
24
|
-
*/
|
|
25
|
-
CardWithImage = "card-with-image",
|
|
26
17
|
LayoutItem = "layout-item",
|
|
27
18
|
BackgroundCard = "background-card",
|
|
28
19
|
BasicCard = "basic-card",
|
|
29
20
|
Content = "content",
|
|
30
21
|
HubspotForm = "hubspot-form",
|
|
31
22
|
/**
|
|
32
|
-
* @deprecated Will be
|
|
23
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
33
24
|
*/
|
|
34
25
|
Card = "card"
|
|
35
26
|
}
|
|
@@ -67,11 +58,6 @@ export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsB
|
|
|
67
58
|
hubspotEvents?: string[];
|
|
68
59
|
createDOMElement?: boolean;
|
|
69
60
|
}
|
|
70
|
-
export interface PartnerProps extends CardBaseProps {
|
|
71
|
-
text: string;
|
|
72
|
-
logo: ImageProps;
|
|
73
|
-
url: string;
|
|
74
|
-
}
|
|
75
61
|
export interface QuoteProps extends Themable, CardBaseProps {
|
|
76
62
|
text: string;
|
|
77
63
|
image: ThemedImage;
|
|
@@ -91,12 +77,6 @@ export interface NewsCardData {
|
|
|
91
77
|
isoDate?: string;
|
|
92
78
|
}
|
|
93
79
|
export type NewsCardProps = Pick<NewsCardData, 'title' | 'url' | 'date' | 'isoDate'> & CardBaseProps;
|
|
94
|
-
export interface TutorialCardProps extends CardBaseProps {
|
|
95
|
-
url: string;
|
|
96
|
-
title: string;
|
|
97
|
-
text: string;
|
|
98
|
-
icon?: ImageProps;
|
|
99
|
-
}
|
|
100
80
|
export interface BackgroundCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
101
81
|
url?: string;
|
|
102
82
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
@@ -119,18 +99,6 @@ export interface BannerCardProps {
|
|
|
119
99
|
}
|
|
120
100
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
121
101
|
}
|
|
122
|
-
export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'> {
|
|
123
|
-
title: string;
|
|
124
|
-
link: string;
|
|
125
|
-
}
|
|
126
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
127
|
-
image: string;
|
|
128
|
-
description?: string;
|
|
129
|
-
disableCompress?: boolean;
|
|
130
|
-
border?: boolean;
|
|
131
|
-
fullScreen?: boolean;
|
|
132
|
-
links?: CardWithImageLinkProps[];
|
|
133
|
-
}
|
|
134
102
|
export interface LayoutItemProps extends ClassNameProps {
|
|
135
103
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
136
104
|
media: MediaProps;
|
|
@@ -147,21 +115,12 @@ export type QuoteModel = {
|
|
|
147
115
|
export type NewsCardModel = {
|
|
148
116
|
type: SubBlockType.NewsCard;
|
|
149
117
|
} & NewsCardProps;
|
|
150
|
-
export type CardWithImageModel = {
|
|
151
|
-
type: SubBlockType.CardWithImage;
|
|
152
|
-
} & CardWithImageProps;
|
|
153
118
|
export type LayoutItemModel = {
|
|
154
|
-
type: SubBlockType.
|
|
119
|
+
type: SubBlockType.LayoutItem;
|
|
155
120
|
} & LayoutItemProps;
|
|
156
|
-
export type TutorialCardModel = {
|
|
157
|
-
type: SubBlockType.TutorialCard;
|
|
158
|
-
} & TutorialCardProps;
|
|
159
121
|
export type BackgroundCardModel = {
|
|
160
122
|
type: SubBlockType.BackgroundCard;
|
|
161
123
|
} & BackgroundCardProps;
|
|
162
|
-
export type PartnerModel = {
|
|
163
|
-
type: SubBlockType.Partner;
|
|
164
|
-
} & PartnerProps;
|
|
165
124
|
export type PriceDetailedModel = {
|
|
166
125
|
type: SubBlockType.PriceDetailed;
|
|
167
126
|
} & PriceDetailedProps;
|
|
@@ -177,5 +136,5 @@ export type BannerCardModel = {
|
|
|
177
136
|
export type BasicCardModel = {
|
|
178
137
|
type: SubBlockType.BasicCard;
|
|
179
138
|
} & BasicCardProps;
|
|
180
|
-
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel |
|
|
139
|
+
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | LayoutItemModel;
|
|
181
140
|
export type SubBlock = SubBlockModels;
|
|
@@ -4,27 +4,18 @@ export var SubBlockType;
|
|
|
4
4
|
SubBlockType["Quote"] = "quote";
|
|
5
5
|
SubBlockType["NewsCard"] = "news-card";
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated Will be
|
|
7
|
+
* @deprecated Will be removed
|
|
8
8
|
*/
|
|
9
|
-
SubBlockType["Partner"] = "partner";
|
|
10
9
|
SubBlockType["PriceDetailed"] = "price-detailed";
|
|
11
10
|
SubBlockType["MediaCard"] = "media-card";
|
|
12
11
|
SubBlockType["BannerCard"] = "banner-card";
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Will be moved to params use BasicCard instead
|
|
15
|
-
*/
|
|
16
|
-
SubBlockType["TutorialCard"] = "tutoral-card";
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Use LayoutItem
|
|
19
|
-
*/
|
|
20
|
-
SubBlockType["CardWithImage"] = "card-with-image";
|
|
21
12
|
SubBlockType["LayoutItem"] = "layout-item";
|
|
22
13
|
SubBlockType["BackgroundCard"] = "background-card";
|
|
23
14
|
SubBlockType["BasicCard"] = "basic-card";
|
|
24
15
|
SubBlockType["Content"] = "content";
|
|
25
16
|
SubBlockType["HubspotForm"] = "hubspot-form";
|
|
26
17
|
/**
|
|
27
|
-
* @deprecated Will be
|
|
18
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
28
19
|
*/
|
|
29
20
|
SubBlockType["Card"] = "card";
|
|
30
21
|
})(SubBlockType || (SubBlockType = {}));
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { validators } from './validators';
|
|
2
|
-
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock,
|
|
2
|
+
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, TableBlock, TabsBlock, } from './validators/blocks';
|
|
3
3
|
import { AnimatableProps, BackgroundProps, MenuProps, withTheme } from './validators/common';
|
|
4
4
|
import { LogoProps, NavigationHeaderProps } from './validators/navigation';
|
|
5
|
-
import { BackgroundCard, BasicCard,
|
|
5
|
+
import { BackgroundCard, BasicCard, Divider, MediaCardBlock, NewsCard, PriceDetailedBlock, Quote, } from './validators/sub-blocks';
|
|
6
6
|
import { filteredItem } from './validators/utils';
|
|
7
7
|
export const getBlocksCases = (blocks) => {
|
|
8
8
|
return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)));
|
|
9
9
|
};
|
|
10
10
|
export function generateDefaultSchema(config) {
|
|
11
11
|
const { cards = {}, blocks = {}, extensions = {} } = config !== null && config !== void 0 ? config : {};
|
|
12
|
-
const blockValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
13
|
-
const cardValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
12
|
+
const blockValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), TabsBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock);
|
|
13
|
+
const cardValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, MediaCardBlock), BannerCard), PriceDetailedBlock), BackgroundCard), NewsCard), Quote), BasicCard);
|
|
14
14
|
const constructorBlockSchemaNames = [
|
|
15
15
|
'divider',
|
|
16
16
|
'quote',
|
|
@@ -26,11 +26,8 @@ export function generateDefaultSchema(config) {
|
|
|
26
26
|
'media-block',
|
|
27
27
|
'map-block',
|
|
28
28
|
'info-block',
|
|
29
|
-
'security-block',
|
|
30
29
|
'table-block',
|
|
31
30
|
'tabs-block',
|
|
32
|
-
'simple-block',
|
|
33
|
-
'link-table-block',
|
|
34
31
|
'preview-block',
|
|
35
32
|
'price-detailed',
|
|
36
33
|
'header-slider-block',
|
|
@@ -42,14 +39,11 @@ export function generateDefaultSchema(config) {
|
|
|
42
39
|
'filter-block',
|
|
43
40
|
];
|
|
44
41
|
const constructorCardSchemaNames = [
|
|
45
|
-
'partner',
|
|
46
42
|
'media-card',
|
|
47
43
|
'banner-card',
|
|
48
44
|
'price-detailed',
|
|
49
|
-
'tutoral-card',
|
|
50
45
|
'background-card',
|
|
51
46
|
'news-card',
|
|
52
|
-
'card-with-image',
|
|
53
47
|
'quote',
|
|
54
48
|
'basic-card',
|
|
55
49
|
'layout-item',
|
|
@@ -2,18 +2,14 @@ export * from '../../blocks/Banner/schema';
|
|
|
2
2
|
export * from '../../blocks/Companies/schema';
|
|
3
3
|
export * from '../../blocks/ExtendedFeatures/schema';
|
|
4
4
|
export * from '../../blocks/PromoFeaturesBlock/schema';
|
|
5
|
-
export * from '../../blocks/Simple/schema';
|
|
6
5
|
export * from '../../blocks/Header/schema';
|
|
7
6
|
export * from '../../blocks/Info/schema';
|
|
8
7
|
export * from '../../blocks/Media/schema';
|
|
9
8
|
export * from '../../blocks/Map/schema';
|
|
10
9
|
export * from '../../blocks/Questions/schema';
|
|
11
|
-
export * from '../../blocks/Security/schema';
|
|
12
10
|
export * from '../../blocks/Slider/schema';
|
|
13
11
|
export * from '../../blocks/Table/schema';
|
|
14
|
-
export * from '../../blocks/LinkTable/schema';
|
|
15
12
|
export * from '../../blocks/Tabs/schema';
|
|
16
|
-
export * from '../../blocks/Preview/schema';
|
|
17
13
|
export * from '../../blocks/HeaderSlider/schema';
|
|
18
14
|
export * from '../../blocks/Icons/schema';
|
|
19
15
|
export * from '../../blocks/CardLayout/schema';
|
|
@@ -2,18 +2,14 @@ export * from '../../blocks/Banner/schema';
|
|
|
2
2
|
export * from '../../blocks/Companies/schema';
|
|
3
3
|
export * from '../../blocks/ExtendedFeatures/schema';
|
|
4
4
|
export * from '../../blocks/PromoFeaturesBlock/schema';
|
|
5
|
-
export * from '../../blocks/Simple/schema';
|
|
6
5
|
export * from '../../blocks/Header/schema';
|
|
7
6
|
export * from '../../blocks/Info/schema';
|
|
8
7
|
export * from '../../blocks/Media/schema';
|
|
9
8
|
export * from '../../blocks/Map/schema';
|
|
10
9
|
export * from '../../blocks/Questions/schema';
|
|
11
|
-
export * from '../../blocks/Security/schema';
|
|
12
10
|
export * from '../../blocks/Slider/schema';
|
|
13
11
|
export * from '../../blocks/Table/schema';
|
|
14
|
-
export * from '../../blocks/LinkTable/schema';
|
|
15
12
|
export * from '../../blocks/Tabs/schema';
|
|
16
|
-
export * from '../../blocks/Preview/schema';
|
|
17
13
|
export * from '../../blocks/HeaderSlider/schema';
|
|
18
14
|
export * from '../../blocks/Icons/schema';
|
|
19
15
|
export * from '../../blocks/CardLayout/schema';
|
|
@@ -3,9 +3,6 @@ export * from '../../sub-blocks/BackgroundCard/schema';
|
|
|
3
3
|
export * from '../../sub-blocks/Content/schema';
|
|
4
4
|
export * from '../../sub-blocks/MediaCard/schema';
|
|
5
5
|
export * from '../../sub-blocks/NewsCard/schema';
|
|
6
|
-
export * from '../../sub-blocks/Partner/schema';
|
|
7
|
-
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
|
-
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
6
|
export * from '../../sub-blocks/LayoutItem/schema';
|
|
10
7
|
export * from '../../sub-blocks/Quote/schema';
|
|
11
8
|
export * from '../../sub-blocks/Divider/schema';
|
|
@@ -3,9 +3,6 @@ export * from '../../sub-blocks/BackgroundCard/schema';
|
|
|
3
3
|
export * from '../../sub-blocks/Content/schema';
|
|
4
4
|
export * from '../../sub-blocks/MediaCard/schema';
|
|
5
5
|
export * from '../../sub-blocks/NewsCard/schema';
|
|
6
|
-
export * from '../../sub-blocks/Partner/schema';
|
|
7
|
-
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
|
-
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
6
|
export * from '../../sub-blocks/LayoutItem/schema';
|
|
10
7
|
export * from '../../sub-blocks/Quote/schema';
|
|
11
8
|
export * from '../../sub-blocks/Divider/schema';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { HubspotFormProps } from '../../models';
|
|
3
2
|
type HubspotFormContainerPropsKeys = 'className' | 'formId' | 'formInstanceId' | 'portalId' | 'region' | 'formClassName' | 'createDOMElement';
|
|
4
3
|
type HubspotFormContainerProps = Pick<HubspotFormProps, HubspotFormContainerPropsKeys>;
|
|
5
|
-
declare const HubspotFormContainer:
|
|
4
|
+
declare const HubspotFormContainer: (props: HubspotFormContainerProps) => JSX.Element;
|
|
6
5
|
export default HubspotFormContainer;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { useMount } from '../../hooks';
|
|
3
3
|
import loadHubspotScript from './loadHubspotScript';
|
|
4
|
-
const HubspotFormContainer =
|
|
4
|
+
const HubspotFormContainer = (props) => {
|
|
5
5
|
const { className, formId, formInstanceId, portalId, region, formClassName, createDOMElement, } = props;
|
|
6
6
|
const containerRef = useRef(null);
|
|
7
7
|
const hsContainerRef = useRef();
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9
|
-
useImperativeHandle(ref, () => containerRef.current);
|
|
10
8
|
const containerId = formInstanceId
|
|
11
9
|
? `hubspot-form-${formId}-${formInstanceId}`
|
|
12
10
|
: `hubspot-form-${formId}`;
|
|
@@ -44,6 +42,5 @@ const HubspotFormContainer = forwardRef((props, ref) => {
|
|
|
44
42
|
};
|
|
45
43
|
});
|
|
46
44
|
return React.createElement("div", { className: className, id: containerId, ref: containerRef });
|
|
47
|
-
}
|
|
48
|
-
HubspotFormContainer.displayName = 'HubspotFormContainer';
|
|
45
|
+
};
|
|
49
46
|
export default HubspotFormContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HubspotFormProps } from '../../models';
|
|
3
3
|
import './HubspotForm.css';
|
|
4
|
-
declare const HubspotForm: React.
|
|
4
|
+
declare const HubspotForm: React.FunctionComponent<HubspotFormProps>;
|
|
5
5
|
export default HubspotForm;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useContext, useMemo } from 'react';
|
|
2
2
|
import { MobileContext } from '../../context/mobileContext';
|
|
3
3
|
import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
|
|
4
4
|
import { useAnalytics, useHandleHubspotEvents } from '../../hooks';
|
|
@@ -8,7 +8,7 @@ import { block } from '../../utils';
|
|
|
8
8
|
import HubspotFormContainer from './HubspotFormContainer';
|
|
9
9
|
import './HubspotForm.css';
|
|
10
10
|
const b = block('hubspot-form');
|
|
11
|
-
const HubspotForm =
|
|
11
|
+
const HubspotForm = (props) => {
|
|
12
12
|
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
|
|
13
13
|
// hubspotEvents, // TODO: decide how to handle them
|
|
14
14
|
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
|
|
@@ -23,10 +23,10 @@ const HubspotForm = forwardRef((props, ref) => {
|
|
|
23
23
|
onBeforeSubmit,
|
|
24
24
|
onLoad,
|
|
25
25
|
onSubmitError,
|
|
26
|
-
onSubmit: (
|
|
26
|
+
onSubmit: (e) => {
|
|
27
27
|
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
28
28
|
handleAnalytics(analyticsEvents);
|
|
29
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(
|
|
29
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
|
|
30
30
|
},
|
|
31
31
|
}), [
|
|
32
32
|
onBeforeLoad,
|
|
@@ -40,7 +40,6 @@ const HubspotForm = forwardRef((props, ref) => {
|
|
|
40
40
|
onSubmitError,
|
|
41
41
|
]);
|
|
42
42
|
useHandleHubspotEvents(handlers, formId);
|
|
43
|
-
return (React.createElement(HubspotFormContainer, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region
|
|
44
|
-
}
|
|
45
|
-
HubspotForm.displayName = 'HubspotForm';
|
|
43
|
+
return (React.createElement(HubspotFormContainer, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
|
|
44
|
+
};
|
|
46
45
|
export default HubspotForm;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export { default as Divider } from './Divider/Divider';
|
|
2
2
|
export { default as Quote } from './Quote/Quote';
|
|
3
3
|
export { default as NewsCard } from './NewsCard/NewsCard';
|
|
4
|
-
export { default as Partner } from './Partner/Partner';
|
|
5
4
|
export { default as PriceDetailed } from './PriceDetailed/PriceDetailed';
|
|
6
5
|
export { default as MediaCard } from './MediaCard/MediaCard';
|
|
7
6
|
export { default as BannerCard } from './BannerCard/BannerCard';
|
|
8
|
-
export { default as TutorialCard } from './TutorialCard/TutorialCard';
|
|
9
|
-
export { default as CardWithImage } from './CardWithImage/CardWithImage';
|
|
10
7
|
export { default as LayoutItem } from './LayoutItem/LayoutItem';
|
|
11
8
|
export { default as BackgroundCard } from './BackgroundCard/BackgroundCard';
|
|
12
9
|
export { default as BasicCard } from './BasicCard/BasicCard';
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export { default as Divider } from './Divider/Divider';
|
|
2
2
|
export { default as Quote } from './Quote/Quote';
|
|
3
3
|
export { default as NewsCard } from './NewsCard/NewsCard';
|
|
4
|
-
export { default as Partner } from './Partner/Partner';
|
|
5
4
|
export { default as PriceDetailed } from './PriceDetailed/PriceDetailed';
|
|
6
5
|
export { default as MediaCard } from './MediaCard/MediaCard';
|
|
7
6
|
export { default as BannerCard } from './BannerCard/BannerCard';
|
|
8
|
-
export { default as TutorialCard } from './TutorialCard/TutorialCard';
|
|
9
|
-
export { default as CardWithImage } from './CardWithImage/CardWithImage';
|
|
10
7
|
export { default as LayoutItem } from './LayoutItem/LayoutItem';
|
|
11
8
|
export { default as BackgroundCard } from './BackgroundCard/BackgroundCard';
|
|
12
9
|
export { default as BasicCard } from './BasicCard/BasicCard';
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { ConstructorBlock } from '../models/constructor';
|
|
2
1
|
import { Lang } from '../utils/configure';
|
|
3
2
|
export type ComplexItem = {
|
|
4
3
|
[key: string]: string;
|
|
5
4
|
};
|
|
6
5
|
export type Item = string | null | ComplexItem;
|
|
7
|
-
export type TransformerRaw = (lang: Lang, content: string) => string;
|
|
8
6
|
export type Transformer = (text: string) => string;
|
|
7
|
+
export type TransformerRaw = (lang: Lang, content: string) => string;
|
|
9
8
|
export type Parser<T = any> = (transformer: Transformer, block: T) => T;
|
|
10
9
|
export declare const createItemsParser: (fields: string[]) => (transformer: Transformer, items: Item[]) => (string | {
|
|
11
10
|
[x: string]: string;
|
|
12
11
|
} | null)[];
|
|
13
12
|
export declare function yfmTransformer(lang: Lang, content: string): string;
|
|
14
13
|
export declare function typografTransformer(lang: Lang, content: string): string;
|
|
15
|
-
export declare function transformBlocks(blocks: ConstructorBlock[], lang: Lang, customConfig?: {}): void;
|
|
16
|
-
export declare function transformFootnotes(footnotes: string[], lang: Lang): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { fullTransform, typografToHTML } from './utils';
|
|
2
|
+
export const createItemsParser = (fields) => (transformer, items) => items.map((item) => {
|
|
3
|
+
if (!item) {
|
|
4
|
+
return item;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof item === 'string') {
|
|
7
|
+
return transformer(item);
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return Object.assign(Object.assign({}, item), fields.reduce((acc, fieldName) => {
|
|
11
|
+
if (item[fieldName]) {
|
|
12
|
+
// eslint-disable-next-line no-param-reassign
|
|
13
|
+
acc[fieldName] = transformer(item[fieldName]);
|
|
14
|
+
}
|
|
15
|
+
return acc;
|
|
16
|
+
}, {}));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export function yfmTransformer(lang, content) {
|
|
20
|
+
const { html } = fullTransform(content, { lang });
|
|
21
|
+
return html;
|
|
22
|
+
}
|
|
23
|
+
export function typografTransformer(lang, content) {
|
|
24
|
+
return typografToHTML(content, lang);
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TitleProps } from '../models';
|
|
2
|
+
import { Parser, Transformer, TransformerRaw, typografTransformer, yfmTransformer } from './common';
|
|
3
|
+
export declare const blockHeaderTransformer: ({
|
|
4
|
+
fields: string[];
|
|
5
|
+
transformer: typeof typografTransformer;
|
|
6
|
+
parser: (transformer: Transformer, title: TitleProps | string) => string | {
|
|
7
|
+
text: string;
|
|
8
|
+
navTitle?: string | undefined;
|
|
9
|
+
anchor?: string | undefined;
|
|
10
|
+
justify?: import("../models").Justify | undefined;
|
|
11
|
+
textSize?: import("../models").TextSize | undefined;
|
|
12
|
+
url?: string | undefined;
|
|
13
|
+
custom?: import("react").ReactNode;
|
|
14
|
+
onClick?: (() => void) | undefined;
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
17
|
+
fields: string[];
|
|
18
|
+
transformer: typeof yfmTransformer;
|
|
19
|
+
parser?: undefined;
|
|
20
|
+
})[];
|
|
21
|
+
interface BlockConfig {
|
|
22
|
+
transformer: TransformerRaw;
|
|
23
|
+
fields?: string[];
|
|
24
|
+
parser?: Parser;
|
|
25
|
+
}
|
|
26
|
+
export type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;
|
|
27
|
+
export declare const config: BlocksConfig;
|
|
28
|
+
export {};
|