@contensis/canvas-react 1.2.0 → 1.3.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/dist/canvas-react.d.mts +46 -6
- package/dist/canvas-react.d.ts +46 -6
- package/dist/canvas-react.js +55 -1
- package/dist/canvas-react.js.map +1 -1
- package/dist/canvas-react.mjs +52 -1
- package/dist/canvas-react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/canvas-react.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import React, { FunctionComponent, ClassType, Component as Component$1, Componen
|
|
|
3
3
|
type InlineBlock = FragmentBlock | AnchorBlock | LinkBlock | InlineEntryBlock;
|
|
4
4
|
type InlineChildren = string | InlineBlock[];
|
|
5
5
|
type DecoratorTypeMap<T> = {
|
|
6
|
+
abbreviation: T;
|
|
6
7
|
code: T;
|
|
7
8
|
delete: T;
|
|
8
9
|
emphasis: T;
|
|
@@ -40,9 +41,9 @@ type EntrySys = {
|
|
|
40
41
|
projectId?: string;
|
|
41
42
|
dataFormat?: 'entry';
|
|
42
43
|
};
|
|
43
|
-
type Entry = BaseEntry<EntrySys>;
|
|
44
|
+
type Entry$1 = BaseEntry<EntrySys>;
|
|
44
45
|
type Image$1 = {
|
|
45
|
-
asset?: Asset;
|
|
46
|
+
asset?: Asset$1;
|
|
46
47
|
caption?: string;
|
|
47
48
|
transformations?: Transformations;
|
|
48
49
|
altText?: string;
|
|
@@ -59,7 +60,7 @@ type AssetSys = {
|
|
|
59
60
|
height?: number;
|
|
60
61
|
};
|
|
61
62
|
};
|
|
62
|
-
type Asset = BaseEntry<AssetSys> & {
|
|
63
|
+
type Asset$1 = BaseEntry<AssetSys> & {
|
|
63
64
|
altText?: string;
|
|
64
65
|
};
|
|
65
66
|
type Transformations = {
|
|
@@ -98,7 +99,7 @@ type LinkSys = EntrySys & {
|
|
|
98
99
|
node?: Node;
|
|
99
100
|
};
|
|
100
101
|
type Link$1 = BaseEntry<LinkSys>;
|
|
101
|
-
type Block = AnchorBlock | CodeBlock | ComponentBlock | DividerBlock | FormContentTypeBlock | FragmentBlock | HeadingBlock | ImageBlock | InlineEntryBlock | LinkBlock | LiquidBlock | ListBlock | ListItemBlock | PanelBlock | ParagraphBlock | QuoteBlock | TableBlock | TableBodyBlock | TableCaptionBlock | TableCellBlock | TableFooterBlock | TableHeaderBlock | TableHeaderCellBlock | TableRowBlock;
|
|
102
|
+
type Block = AnchorBlock | AssetBlock | CodeBlock | ComponentBlock | DividerBlock | EntryBlock | FormContentTypeBlock | FragmentBlock | HeadingBlock | ImageBlock | InlineEntryBlock | LinkBlock | LiquidBlock | ListBlock | ListItemBlock | PanelBlock | ParagraphBlock | QuoteBlock | TableBlock | TableBodyBlock | TableCaptionBlock | TableCellBlock | TableFooterBlock | TableHeaderBlock | TableHeaderCellBlock | TableRowBlock;
|
|
102
103
|
type AnchorBlock = {
|
|
103
104
|
type: '_anchor';
|
|
104
105
|
id: string;
|
|
@@ -107,6 +108,14 @@ type AnchorBlock = {
|
|
|
107
108
|
id?: string;
|
|
108
109
|
};
|
|
109
110
|
};
|
|
111
|
+
type AssetBlock = {
|
|
112
|
+
type: '_asset';
|
|
113
|
+
id: string;
|
|
114
|
+
value?: Asset$1;
|
|
115
|
+
properties?: {
|
|
116
|
+
id?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
110
119
|
type CodeBlock = {
|
|
111
120
|
type: '_code';
|
|
112
121
|
id: string;
|
|
@@ -136,6 +145,14 @@ type DividerBlock = {
|
|
|
136
145
|
id?: string;
|
|
137
146
|
};
|
|
138
147
|
};
|
|
148
|
+
type EntryBlock = {
|
|
149
|
+
type: '_entry';
|
|
150
|
+
id: string;
|
|
151
|
+
value?: Entry$1;
|
|
152
|
+
properties?: {
|
|
153
|
+
id?: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
139
156
|
type FormContentType$1 = {
|
|
140
157
|
id: string;
|
|
141
158
|
};
|
|
@@ -156,6 +173,9 @@ type FragmentBlock = {
|
|
|
156
173
|
properties?: {
|
|
157
174
|
id?: string;
|
|
158
175
|
decorators?: DecoratorType[];
|
|
176
|
+
abbreviation?: {
|
|
177
|
+
title?: string;
|
|
178
|
+
};
|
|
159
179
|
};
|
|
160
180
|
};
|
|
161
181
|
type HeadingBlock = {
|
|
@@ -178,7 +198,7 @@ type ImageBlock = {
|
|
|
178
198
|
type InlineEntryBlock = {
|
|
179
199
|
type: '_inlineEntry';
|
|
180
200
|
id: string;
|
|
181
|
-
value?: Entry;
|
|
201
|
+
value?: Entry$1;
|
|
182
202
|
properties?: {
|
|
183
203
|
id?: string;
|
|
184
204
|
};
|
|
@@ -346,15 +366,23 @@ type DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;
|
|
|
346
366
|
type DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;
|
|
347
367
|
type ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;
|
|
348
368
|
type ComponentRenderers = Record<string, ComponentRenderer>;
|
|
369
|
+
type EntryRenderer = Renderer<RenderBlockPropsWithChildren<EntryBlock>>;
|
|
370
|
+
type EntryRenderers = Record<string, EntryRenderer>;
|
|
371
|
+
type AssetRenderer = Renderer<RenderBlockPropsWithChildren<AssetBlock>>;
|
|
372
|
+
type AssetRenderers = Record<string, AssetRenderer>;
|
|
349
373
|
type RendererContextValue = {
|
|
350
374
|
blocks?: BlockRenderers;
|
|
351
375
|
decorators?: DecoratorRenderers;
|
|
352
376
|
components?: ComponentRenderers;
|
|
377
|
+
entries?: EntryRenderers;
|
|
378
|
+
assets?: AssetRenderers;
|
|
353
379
|
};
|
|
354
380
|
type RendererOverridesContextValue = {
|
|
355
381
|
blocks?: Partial<BlockRenderers>;
|
|
356
382
|
decorators?: Partial<DecoratorRenderers>;
|
|
357
383
|
components?: ComponentRenderers;
|
|
384
|
+
entries?: EntryRenderers;
|
|
385
|
+
assets?: AssetRenderers;
|
|
358
386
|
};
|
|
359
387
|
type RendererContextProviderProps = WithChildren & RendererOverridesContextValue;
|
|
360
388
|
|
|
@@ -390,6 +418,10 @@ declare function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>): React
|
|
|
390
418
|
declare namespace Anchor {
|
|
391
419
|
var Children: (props: RenderBlockProps<AnchorBlock>) => React.JSX.Element;
|
|
392
420
|
}
|
|
421
|
+
declare function Asset(props: RenderBlockPropsWithChildren<AssetBlock>): React.JSX.Element;
|
|
422
|
+
declare namespace Asset {
|
|
423
|
+
var Children: (props: RenderBlockProps<AssetBlock>) => React.JSX.Element;
|
|
424
|
+
}
|
|
393
425
|
declare function Code(props: RenderBlockPropsWithChildren<CodeBlock>): React.JSX.Element;
|
|
394
426
|
declare namespace Code {
|
|
395
427
|
var Children: (props: RenderBlockProps<CodeBlock>) => React.JSX.Element;
|
|
@@ -402,6 +434,10 @@ declare function Divider(props: RenderBlockPropsWithChildren<DividerBlock>): Rea
|
|
|
402
434
|
declare namespace Divider {
|
|
403
435
|
var Children: (props: RenderBlockProps<DividerBlock>) => React.JSX.Element;
|
|
404
436
|
}
|
|
437
|
+
declare function Entry(props: RenderBlockPropsWithChildren<EntryBlock>): React.JSX.Element;
|
|
438
|
+
declare namespace Entry {
|
|
439
|
+
var Children: (props: RenderBlockProps<EntryBlock>) => React.JSX.Element;
|
|
440
|
+
}
|
|
405
441
|
declare function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>): null;
|
|
406
442
|
declare namespace FormContentType {
|
|
407
443
|
var Children: (_props: RenderBlockProps<FormContentTypeBlock>) => null;
|
|
@@ -483,6 +519,10 @@ declare namespace TableRow {
|
|
|
483
519
|
var Children: (props: RenderBlockProps<TableRowBlock>) => React.JSX.Element;
|
|
484
520
|
}
|
|
485
521
|
declare function DecoratorChildren(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
522
|
+
declare function Abbreviation(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
523
|
+
declare namespace Abbreviation {
|
|
524
|
+
var Children: typeof DecoratorChildren;
|
|
525
|
+
}
|
|
486
526
|
declare function InlineCode(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
487
527
|
declare namespace InlineCode {
|
|
488
528
|
var Children: typeof DecoratorChildren;
|
|
@@ -536,4 +576,4 @@ declare namespace Variable {
|
|
|
536
576
|
var Children: typeof DecoratorChildren;
|
|
537
577
|
}
|
|
538
578
|
|
|
539
|
-
export { Anchor, type AnchorBlock, type Block, type BlockRenderer, Code, type CodeBlock, Component, type ComponentBlock, type DecoratorType, Delete, Divider, type DividerBlock, Emphasis, FormContentType, type FormContentTypeBlock, Fragment, type FragmentBlock, Heading, type HeadingBlock, Image, type ImageBlock, InlineCode, InlineEntry, type InlineEntryBlock, Insert, Keyboard, LineBreak, Link, type LinkBlock, Liquid, type LiquidBlock, List, type ListBlock, ListItem, type ListItemBlock, Mark, Panel, type PanelBlock, Paragraph, type ParagraphBlock, Quote, type QuoteBlock, type RenderBlockProps, type RenderBlockPropsWithChildren, RenderChildren, RenderContextProvider, type RenderDecoratorProps, type RenderDecoratorPropsWithChildren, Renderer, RendererContext, Strikethrough, Strong, Subscript, Superscript, Table, type TableBlock, TableBody, type TableBodyBlock, TableCaption, type TableCaptionBlock, TableCell, type TableCellBlock, TableFooter, type TableFooterBlock, TableHeader, type TableHeaderBlock, TableHeaderCell, type TableHeaderCellBlock, TableRow, type TableRowBlock, Underline, Variable };
|
|
579
|
+
export { Abbreviation, Anchor, type AnchorBlock, Asset, type AssetBlock, type Block, type BlockRenderer, Code, type CodeBlock, Component, type ComponentBlock, type DecoratorType, Delete, Divider, type DividerBlock, Emphasis, Entry, type EntryBlock, FormContentType, type FormContentTypeBlock, Fragment, type FragmentBlock, Heading, type HeadingBlock, Image, type ImageBlock, InlineCode, InlineEntry, type InlineEntryBlock, Insert, Keyboard, LineBreak, Link, type LinkBlock, Liquid, type LiquidBlock, List, type ListBlock, ListItem, type ListItemBlock, Mark, Panel, type PanelBlock, Paragraph, type ParagraphBlock, Quote, type QuoteBlock, type RenderBlockProps, type RenderBlockPropsWithChildren, RenderChildren, RenderContextProvider, type RenderDecoratorProps, type RenderDecoratorPropsWithChildren, Renderer, RendererContext, Strikethrough, Strong, Subscript, Superscript, Table, type TableBlock, TableBody, type TableBodyBlock, TableCaption, type TableCaptionBlock, TableCell, type TableCellBlock, TableFooter, type TableFooterBlock, TableHeader, type TableHeaderBlock, TableHeaderCell, type TableHeaderCellBlock, TableRow, type TableRowBlock, Underline, Variable };
|
package/dist/canvas-react.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import React, { FunctionComponent, ClassType, Component as Component$1, Componen
|
|
|
3
3
|
type InlineBlock = FragmentBlock | AnchorBlock | LinkBlock | InlineEntryBlock;
|
|
4
4
|
type InlineChildren = string | InlineBlock[];
|
|
5
5
|
type DecoratorTypeMap<T> = {
|
|
6
|
+
abbreviation: T;
|
|
6
7
|
code: T;
|
|
7
8
|
delete: T;
|
|
8
9
|
emphasis: T;
|
|
@@ -40,9 +41,9 @@ type EntrySys = {
|
|
|
40
41
|
projectId?: string;
|
|
41
42
|
dataFormat?: 'entry';
|
|
42
43
|
};
|
|
43
|
-
type Entry = BaseEntry<EntrySys>;
|
|
44
|
+
type Entry$1 = BaseEntry<EntrySys>;
|
|
44
45
|
type Image$1 = {
|
|
45
|
-
asset?: Asset;
|
|
46
|
+
asset?: Asset$1;
|
|
46
47
|
caption?: string;
|
|
47
48
|
transformations?: Transformations;
|
|
48
49
|
altText?: string;
|
|
@@ -59,7 +60,7 @@ type AssetSys = {
|
|
|
59
60
|
height?: number;
|
|
60
61
|
};
|
|
61
62
|
};
|
|
62
|
-
type Asset = BaseEntry<AssetSys> & {
|
|
63
|
+
type Asset$1 = BaseEntry<AssetSys> & {
|
|
63
64
|
altText?: string;
|
|
64
65
|
};
|
|
65
66
|
type Transformations = {
|
|
@@ -98,7 +99,7 @@ type LinkSys = EntrySys & {
|
|
|
98
99
|
node?: Node;
|
|
99
100
|
};
|
|
100
101
|
type Link$1 = BaseEntry<LinkSys>;
|
|
101
|
-
type Block = AnchorBlock | CodeBlock | ComponentBlock | DividerBlock | FormContentTypeBlock | FragmentBlock | HeadingBlock | ImageBlock | InlineEntryBlock | LinkBlock | LiquidBlock | ListBlock | ListItemBlock | PanelBlock | ParagraphBlock | QuoteBlock | TableBlock | TableBodyBlock | TableCaptionBlock | TableCellBlock | TableFooterBlock | TableHeaderBlock | TableHeaderCellBlock | TableRowBlock;
|
|
102
|
+
type Block = AnchorBlock | AssetBlock | CodeBlock | ComponentBlock | DividerBlock | EntryBlock | FormContentTypeBlock | FragmentBlock | HeadingBlock | ImageBlock | InlineEntryBlock | LinkBlock | LiquidBlock | ListBlock | ListItemBlock | PanelBlock | ParagraphBlock | QuoteBlock | TableBlock | TableBodyBlock | TableCaptionBlock | TableCellBlock | TableFooterBlock | TableHeaderBlock | TableHeaderCellBlock | TableRowBlock;
|
|
102
103
|
type AnchorBlock = {
|
|
103
104
|
type: '_anchor';
|
|
104
105
|
id: string;
|
|
@@ -107,6 +108,14 @@ type AnchorBlock = {
|
|
|
107
108
|
id?: string;
|
|
108
109
|
};
|
|
109
110
|
};
|
|
111
|
+
type AssetBlock = {
|
|
112
|
+
type: '_asset';
|
|
113
|
+
id: string;
|
|
114
|
+
value?: Asset$1;
|
|
115
|
+
properties?: {
|
|
116
|
+
id?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
110
119
|
type CodeBlock = {
|
|
111
120
|
type: '_code';
|
|
112
121
|
id: string;
|
|
@@ -136,6 +145,14 @@ type DividerBlock = {
|
|
|
136
145
|
id?: string;
|
|
137
146
|
};
|
|
138
147
|
};
|
|
148
|
+
type EntryBlock = {
|
|
149
|
+
type: '_entry';
|
|
150
|
+
id: string;
|
|
151
|
+
value?: Entry$1;
|
|
152
|
+
properties?: {
|
|
153
|
+
id?: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
139
156
|
type FormContentType$1 = {
|
|
140
157
|
id: string;
|
|
141
158
|
};
|
|
@@ -156,6 +173,9 @@ type FragmentBlock = {
|
|
|
156
173
|
properties?: {
|
|
157
174
|
id?: string;
|
|
158
175
|
decorators?: DecoratorType[];
|
|
176
|
+
abbreviation?: {
|
|
177
|
+
title?: string;
|
|
178
|
+
};
|
|
159
179
|
};
|
|
160
180
|
};
|
|
161
181
|
type HeadingBlock = {
|
|
@@ -178,7 +198,7 @@ type ImageBlock = {
|
|
|
178
198
|
type InlineEntryBlock = {
|
|
179
199
|
type: '_inlineEntry';
|
|
180
200
|
id: string;
|
|
181
|
-
value?: Entry;
|
|
201
|
+
value?: Entry$1;
|
|
182
202
|
properties?: {
|
|
183
203
|
id?: string;
|
|
184
204
|
};
|
|
@@ -346,15 +366,23 @@ type DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;
|
|
|
346
366
|
type DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;
|
|
347
367
|
type ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;
|
|
348
368
|
type ComponentRenderers = Record<string, ComponentRenderer>;
|
|
369
|
+
type EntryRenderer = Renderer<RenderBlockPropsWithChildren<EntryBlock>>;
|
|
370
|
+
type EntryRenderers = Record<string, EntryRenderer>;
|
|
371
|
+
type AssetRenderer = Renderer<RenderBlockPropsWithChildren<AssetBlock>>;
|
|
372
|
+
type AssetRenderers = Record<string, AssetRenderer>;
|
|
349
373
|
type RendererContextValue = {
|
|
350
374
|
blocks?: BlockRenderers;
|
|
351
375
|
decorators?: DecoratorRenderers;
|
|
352
376
|
components?: ComponentRenderers;
|
|
377
|
+
entries?: EntryRenderers;
|
|
378
|
+
assets?: AssetRenderers;
|
|
353
379
|
};
|
|
354
380
|
type RendererOverridesContextValue = {
|
|
355
381
|
blocks?: Partial<BlockRenderers>;
|
|
356
382
|
decorators?: Partial<DecoratorRenderers>;
|
|
357
383
|
components?: ComponentRenderers;
|
|
384
|
+
entries?: EntryRenderers;
|
|
385
|
+
assets?: AssetRenderers;
|
|
358
386
|
};
|
|
359
387
|
type RendererContextProviderProps = WithChildren & RendererOverridesContextValue;
|
|
360
388
|
|
|
@@ -390,6 +418,10 @@ declare function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>): React
|
|
|
390
418
|
declare namespace Anchor {
|
|
391
419
|
var Children: (props: RenderBlockProps<AnchorBlock>) => React.JSX.Element;
|
|
392
420
|
}
|
|
421
|
+
declare function Asset(props: RenderBlockPropsWithChildren<AssetBlock>): React.JSX.Element;
|
|
422
|
+
declare namespace Asset {
|
|
423
|
+
var Children: (props: RenderBlockProps<AssetBlock>) => React.JSX.Element;
|
|
424
|
+
}
|
|
393
425
|
declare function Code(props: RenderBlockPropsWithChildren<CodeBlock>): React.JSX.Element;
|
|
394
426
|
declare namespace Code {
|
|
395
427
|
var Children: (props: RenderBlockProps<CodeBlock>) => React.JSX.Element;
|
|
@@ -402,6 +434,10 @@ declare function Divider(props: RenderBlockPropsWithChildren<DividerBlock>): Rea
|
|
|
402
434
|
declare namespace Divider {
|
|
403
435
|
var Children: (props: RenderBlockProps<DividerBlock>) => React.JSX.Element;
|
|
404
436
|
}
|
|
437
|
+
declare function Entry(props: RenderBlockPropsWithChildren<EntryBlock>): React.JSX.Element;
|
|
438
|
+
declare namespace Entry {
|
|
439
|
+
var Children: (props: RenderBlockProps<EntryBlock>) => React.JSX.Element;
|
|
440
|
+
}
|
|
405
441
|
declare function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>): null;
|
|
406
442
|
declare namespace FormContentType {
|
|
407
443
|
var Children: (_props: RenderBlockProps<FormContentTypeBlock>) => null;
|
|
@@ -483,6 +519,10 @@ declare namespace TableRow {
|
|
|
483
519
|
var Children: (props: RenderBlockProps<TableRowBlock>) => React.JSX.Element;
|
|
484
520
|
}
|
|
485
521
|
declare function DecoratorChildren(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
522
|
+
declare function Abbreviation(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
523
|
+
declare namespace Abbreviation {
|
|
524
|
+
var Children: typeof DecoratorChildren;
|
|
525
|
+
}
|
|
486
526
|
declare function InlineCode(props: RenderDecoratorPropsWithChildren): React.JSX.Element;
|
|
487
527
|
declare namespace InlineCode {
|
|
488
528
|
var Children: typeof DecoratorChildren;
|
|
@@ -536,4 +576,4 @@ declare namespace Variable {
|
|
|
536
576
|
var Children: typeof DecoratorChildren;
|
|
537
577
|
}
|
|
538
578
|
|
|
539
|
-
export { Anchor, type AnchorBlock, type Block, type BlockRenderer, Code, type CodeBlock, Component, type ComponentBlock, type DecoratorType, Delete, Divider, type DividerBlock, Emphasis, FormContentType, type FormContentTypeBlock, Fragment, type FragmentBlock, Heading, type HeadingBlock, Image, type ImageBlock, InlineCode, InlineEntry, type InlineEntryBlock, Insert, Keyboard, LineBreak, Link, type LinkBlock, Liquid, type LiquidBlock, List, type ListBlock, ListItem, type ListItemBlock, Mark, Panel, type PanelBlock, Paragraph, type ParagraphBlock, Quote, type QuoteBlock, type RenderBlockProps, type RenderBlockPropsWithChildren, RenderChildren, RenderContextProvider, type RenderDecoratorProps, type RenderDecoratorPropsWithChildren, Renderer, RendererContext, Strikethrough, Strong, Subscript, Superscript, Table, type TableBlock, TableBody, type TableBodyBlock, TableCaption, type TableCaptionBlock, TableCell, type TableCellBlock, TableFooter, type TableFooterBlock, TableHeader, type TableHeaderBlock, TableHeaderCell, type TableHeaderCellBlock, TableRow, type TableRowBlock, Underline, Variable };
|
|
579
|
+
export { Abbreviation, Anchor, type AnchorBlock, Asset, type AssetBlock, type Block, type BlockRenderer, Code, type CodeBlock, Component, type ComponentBlock, type DecoratorType, Delete, Divider, type DividerBlock, Emphasis, Entry, type EntryBlock, FormContentType, type FormContentTypeBlock, Fragment, type FragmentBlock, Heading, type HeadingBlock, Image, type ImageBlock, InlineCode, InlineEntry, type InlineEntryBlock, Insert, Keyboard, LineBreak, Link, type LinkBlock, Liquid, type LiquidBlock, List, type ListBlock, ListItem, type ListItemBlock, Mark, Panel, type PanelBlock, Paragraph, type ParagraphBlock, Quote, type QuoteBlock, type RenderBlockProps, type RenderBlockPropsWithChildren, RenderChildren, RenderContextProvider, type RenderDecoratorProps, type RenderDecoratorPropsWithChildren, Renderer, RendererContext, Strikethrough, Strong, Subscript, Superscript, Table, type TableBlock, TableBody, type TableBodyBlock, TableCaption, type TableCaptionBlock, TableCell, type TableCellBlock, TableFooter, type TableFooterBlock, TableHeader, type TableHeaderBlock, TableHeaderCell, type TableHeaderCellBlock, TableRow, type TableRowBlock, Underline, Variable };
|
package/dist/canvas-react.js
CHANGED
|
@@ -56,12 +56,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
56
56
|
// src/index.ts
|
|
57
57
|
var src_exports = {};
|
|
58
58
|
__export(src_exports, {
|
|
59
|
+
Abbreviation: () => Abbreviation,
|
|
59
60
|
Anchor: () => Anchor,
|
|
61
|
+
Asset: () => Asset,
|
|
60
62
|
Code: () => Code,
|
|
61
63
|
Component: () => Component,
|
|
62
64
|
Delete: () => Delete,
|
|
63
65
|
Divider: () => Divider,
|
|
64
66
|
Emphasis: () => Emphasis,
|
|
67
|
+
Entry: () => Entry,
|
|
65
68
|
FormContentType: () => FormContentType,
|
|
66
69
|
Fragment: () => Fragment,
|
|
67
70
|
Heading: () => Heading,
|
|
@@ -117,7 +120,7 @@ function RenderContextProvider(props) {
|
|
|
117
120
|
prev[decoratorType] = (overrideDecorators == null ? void 0 : overrideDecorators[decoratorType]) || DECORATOR_RENDERERS[decoratorType];
|
|
118
121
|
return prev;
|
|
119
122
|
}, {});
|
|
120
|
-
const value = { blocks, decorators, components: props.components };
|
|
123
|
+
const value = { blocks, decorators, components: props.components, entries: props.entries, assets: props == null ? void 0 : props.assets };
|
|
121
124
|
return /* @__PURE__ */ import_react.default.createElement(RendererContext.Provider, { value }, props.children);
|
|
122
125
|
}
|
|
123
126
|
function useBlocks() {
|
|
@@ -132,6 +135,14 @@ function useComponents() {
|
|
|
132
135
|
const value = (0, import_react.useContext)(RendererContext);
|
|
133
136
|
return value.components || {};
|
|
134
137
|
}
|
|
138
|
+
function useEntries() {
|
|
139
|
+
const value = (0, import_react.useContext)(RendererContext);
|
|
140
|
+
return value.entries || {};
|
|
141
|
+
}
|
|
142
|
+
function useAssets() {
|
|
143
|
+
const value = (0, import_react.useContext)(RendererContext);
|
|
144
|
+
return value.assets || {};
|
|
145
|
+
}
|
|
135
146
|
function RenderBlock(props) {
|
|
136
147
|
const blocks = useBlocks();
|
|
137
148
|
const Component2 = blocks[props.block.type];
|
|
@@ -191,6 +202,21 @@ function Anchor(props) {
|
|
|
191
202
|
return /* @__PURE__ */ import_react.default.createElement("a", __spreadValues({}, attributes), /* @__PURE__ */ import_react.default.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ import_react.default.createElement(Anchor.Children, { block: props.block }) }));
|
|
192
203
|
}
|
|
193
204
|
Anchor.Children = RenderBlockChildrenFactory();
|
|
205
|
+
function Asset(props) {
|
|
206
|
+
var _a, _b, _c;
|
|
207
|
+
const contentTypeId = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.contentTypeId;
|
|
208
|
+
const components = useAssets();
|
|
209
|
+
const AssetElement = !!contentTypeId ? components == null ? void 0 : components[contentTypeId] : void 0;
|
|
210
|
+
const attributes = getAttributes(props);
|
|
211
|
+
return !!AssetElement ? /* @__PURE__ */ import_react.default.createElement(AssetElement, __spreadValues({}, props)) : /* @__PURE__ */ import_react.default.createElement("div", __spreadValues({}, attributes), /* @__PURE__ */ import_react.default.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ import_react.default.createElement(Asset.Children, { block: props.block }) }));
|
|
212
|
+
}
|
|
213
|
+
Asset.Children = function(props) {
|
|
214
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
215
|
+
const href = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.uri;
|
|
216
|
+
const entryTitle = ((_e = (_d = props == null ? void 0 : props.block) == null ? void 0 : _d.value) == null ? void 0 : _e.entryTitle) || "";
|
|
217
|
+
const entryDescription = ((_g = (_f = props == null ? void 0 : props.block) == null ? void 0 : _f.value) == null ? void 0 : _g.entryDescription) || "";
|
|
218
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", null, !!href ? /* @__PURE__ */ import_react.default.createElement("a", { href }, entryTitle) : entryTitle), !!entryDescription ? /* @__PURE__ */ import_react.default.createElement("div", null, entryDescription) : null);
|
|
219
|
+
};
|
|
194
220
|
function Code(props) {
|
|
195
221
|
var _a, _b, _c, _d;
|
|
196
222
|
const attributes = getAttributes(props, {
|
|
@@ -231,6 +257,21 @@ function Divider(props) {
|
|
|
231
257
|
return /* @__PURE__ */ import_react.default.createElement("hr", __spreadValues({}, attributes));
|
|
232
258
|
}
|
|
233
259
|
Divider.Children = EmptyChildrenFactory();
|
|
260
|
+
function Entry(props) {
|
|
261
|
+
var _a, _b, _c;
|
|
262
|
+
const contentTypeId = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.contentTypeId;
|
|
263
|
+
const components = useEntries();
|
|
264
|
+
const EntryElement = !!contentTypeId ? components == null ? void 0 : components[contentTypeId] : void 0;
|
|
265
|
+
const attributes = getAttributes(props);
|
|
266
|
+
return !!EntryElement ? /* @__PURE__ */ import_react.default.createElement(EntryElement, __spreadValues({}, props)) : /* @__PURE__ */ import_react.default.createElement("div", __spreadValues({}, attributes), /* @__PURE__ */ import_react.default.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ import_react.default.createElement(Entry.Children, { block: props.block }) }));
|
|
267
|
+
}
|
|
268
|
+
Entry.Children = function(props) {
|
|
269
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
270
|
+
const href = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.uri;
|
|
271
|
+
const entryTitle = ((_e = (_d = props == null ? void 0 : props.block) == null ? void 0 : _d.value) == null ? void 0 : _e.entryTitle) || "";
|
|
272
|
+
const entryDescription = ((_g = (_f = props == null ? void 0 : props.block) == null ? void 0 : _f.value) == null ? void 0 : _g.entryDescription) || "";
|
|
273
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", null, !!href ? /* @__PURE__ */ import_react.default.createElement("a", { href }, entryTitle) : entryTitle), !!entryDescription ? /* @__PURE__ */ import_react.default.createElement("div", null, entryDescription) : null);
|
|
274
|
+
};
|
|
234
275
|
function FormContentType(_props) {
|
|
235
276
|
return null;
|
|
236
277
|
}
|
|
@@ -421,6 +462,13 @@ function Decorators(props) {
|
|
|
421
462
|
function DecoratorChildren(props) {
|
|
422
463
|
return /* @__PURE__ */ import_react.default.createElement(Decorators, { block: props.block, decorators: props.otherDecorators });
|
|
423
464
|
}
|
|
465
|
+
function Abbreviation(props) {
|
|
466
|
+
var _a, _b, _c;
|
|
467
|
+
const title = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.properties) == null ? void 0 : _b.abbreviation) == null ? void 0 : _c.title;
|
|
468
|
+
const attributes = getAttributes(props, { title });
|
|
469
|
+
return /* @__PURE__ */ import_react.default.createElement("abbr", __spreadValues({}, attributes), /* @__PURE__ */ import_react.default.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ import_react.default.createElement(InlineCode.Children, { block: props.block, decorator: props.decorator, otherDecorators: props.otherDecorators }) }));
|
|
470
|
+
}
|
|
471
|
+
Abbreviation.Children = DecoratorChildren;
|
|
424
472
|
function InlineCode(props) {
|
|
425
473
|
const attributes = getAttributes(props);
|
|
426
474
|
return /* @__PURE__ */ import_react.default.createElement("code", __spreadValues({}, attributes), /* @__PURE__ */ import_react.default.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ import_react.default.createElement(InlineCode.Children, { block: props.block, decorator: props.decorator, otherDecorators: props.otherDecorators }) }));
|
|
@@ -490,9 +538,11 @@ function Variable(props) {
|
|
|
490
538
|
Variable.Children = DecoratorChildren;
|
|
491
539
|
var BLOCK_RENDERERS = {
|
|
492
540
|
"_anchor": Anchor,
|
|
541
|
+
"_asset": Asset,
|
|
493
542
|
"_code": CodeWithCaption,
|
|
494
543
|
"_component": Component,
|
|
495
544
|
"_divider": Divider,
|
|
545
|
+
"_entry": Entry,
|
|
496
546
|
"_formContentType": FormContentType,
|
|
497
547
|
"_fragment": Fragment,
|
|
498
548
|
"_heading": Heading,
|
|
@@ -515,6 +565,7 @@ var BLOCK_RENDERERS = {
|
|
|
515
565
|
"_tableRow": TableRow
|
|
516
566
|
};
|
|
517
567
|
var DECORATOR_RENDERERS = {
|
|
568
|
+
"abbreviation": Abbreviation,
|
|
518
569
|
"code": InlineCode,
|
|
519
570
|
"delete": Delete,
|
|
520
571
|
"emphasis": Emphasis,
|
|
@@ -531,12 +582,15 @@ var DECORATOR_RENDERERS = {
|
|
|
531
582
|
};
|
|
532
583
|
// Annotate the CommonJS export names for ESM import in node:
|
|
533
584
|
0 && (module.exports = {
|
|
585
|
+
Abbreviation,
|
|
534
586
|
Anchor,
|
|
587
|
+
Asset,
|
|
535
588
|
Code,
|
|
536
589
|
Component,
|
|
537
590
|
Delete,
|
|
538
591
|
Divider,
|
|
539
592
|
Emphasis,
|
|
593
|
+
Entry,
|
|
540
594
|
FormContentType,
|
|
541
595
|
Fragment,
|
|
542
596
|
Heading,
|
package/dist/canvas-react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/renderer.tsx"],"sourcesContent":["export * from '@contensis/canvas-types';\nexport * from './renderer';\n","import React, { ClassType, ComponentClass, FunctionComponent, Component as ReactComponent, createContext, useContext } from 'react';\nimport {\n AnchorBlock,\n Block,\n CodeBlock,\n ComponentBlock,\n DecoratorType,\n DividerBlock,\n FormContentTypeBlock,\n FragmentBlock,\n HeadingBlock,\n ImageBlock,\n InlineEntryBlock,\n LinkBlock,\n LiquidBlock,\n ListBlock,\n ListItemBlock,\n PanelBlock,\n ParagraphBlock,\n QuoteBlock,\n TableBlock,\n TableBodyBlock,\n TableCaptionBlock, TableCellBlock,\n TableFooterBlock,\n TableHeaderBlock,\n TableHeaderCellBlock,\n TableRowBlock\n} from '@contensis/canvas-types';\n\ntype Attributes = Record<string, any>;\ntype WithChildren = { children?: JSX.Element | undefined };\n\ntype RendererProps = { data: Block[] };\ntype RenderBlocksProps = { blocks: Block[] };\ntype RenderBlockProps<T extends Block> = { block: T };\ntype RenderBlockPropsWithChildren<T extends Block>\n = RenderBlockProps<T> & WithChildren & Attributes;\n\ntype RenderContentsProps = { contents: undefined | JSX.Element, fallback: JSX.Element };\ntype RenderTextProps = { text: string };\n\ntype DecoratorProps = { block: FragmentBlock, decorators: undefined | DecoratorType[] };\n\ntype TypedBlock<TType extends Block['type']> = Extract<Block, { type: TType }>;\n\ntype Renderer<TProps> = FunctionComponent<TProps> | ClassType<TProps, ReactComponent<TProps>, ComponentClass<TProps>>;\n\ntype BlockRenderer<T extends Block> = Renderer<RenderBlockPropsWithChildren<T>>;\ntype BlockRenderers = {\n [TType in Block['type']]: BlockRenderer<TypedBlock<TType>>\n};\n\n\ntype RenderDecoratorProps = { block: FragmentBlock, decorator: undefined | DecoratorType, otherDecorators: undefined | DecoratorType[] };\ntype RenderDecoratorPropsWithChildren = RenderDecoratorProps & WithChildren & Attributes;\n\ntype DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;\ntype DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;\n\ntype ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;\ntype ComponentRenderers = Record<string, ComponentRenderer>;\n\ntype RendererContextValue = {\n blocks?: BlockRenderers,\n decorators?: DecoratorRenderers,\n components?: ComponentRenderers\n};\n\ntype RendererOverridesContextValue = {\n blocks?: Partial<BlockRenderers>,\n decorators?: Partial<DecoratorRenderers>,\n components?: ComponentRenderers\n};\n\ntype RendererContextProviderProps = WithChildren & RendererOverridesContextValue;\n\nexport type { BlockRenderer, RenderBlockProps, RenderBlockPropsWithChildren, RenderDecoratorProps, RenderDecoratorPropsWithChildren };\n\nexport const RendererContext = createContext<RendererContextValue>({});\n\n/** \n * Provides context to the <Renderer> component to return Canvas data as React components\n *\n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n *\n * @param blocks - Override the default rendering of Canvas content blocks\n * @param components - Render method for Contensis Components within the Canvas field\n * @param decorators - Override the rendering of HTML elements within a text field\n * \n * @example \n * <RenderContextProvider blocks={{ _table: Table }} components={{ banner: Banner }} decorators={{ strong: Strong }}>\n * <Renderer data={data} />\n * </RenderContextProvider>\n * \n */\nexport function RenderContextProvider(props: RendererContextProviderProps) {\n\n const overrideBlocks = props.blocks;\n const blocks = Object.keys(BLOCK_RENDERERS)\n .reduce((prev, type) => {\n const blockType = type as Block['type'];\n const renderer: any = overrideBlocks?.[blockType] || BLOCK_RENDERERS[blockType];\n (prev as any)[blockType] = renderer;\n return prev;\n }, {} as BlockRenderers);\n\n const overrideDecorators = props.decorators;\n const decorators = Object.keys(DECORATOR_RENDERERS)\n .reduce((prev, type) => {\n const decoratorType = type as DecoratorType;\n prev[decoratorType] = overrideDecorators?.[decoratorType] || DECORATOR_RENDERERS[decoratorType];\n return prev;\n }, {} as DecoratorRenderers);\n\n const value = { blocks, decorators, components: props.components };\n\n return (\n <RendererContext.Provider value={value}>\n {props.children}\n </RendererContext.Provider>\n );\n}\n\nfunction useBlocks() {\n const value = useContext(RendererContext);\n return value.blocks || BLOCK_RENDERERS;\n}\n\nfunction useDecorators() {\n const value = useContext(RendererContext);\n return value.decorators || DECORATOR_RENDERERS;\n}\n\nfunction useComponents() {\n const value = useContext(RendererContext);\n return value.components || {};\n}\n\nfunction RenderBlock<TBlock extends Block>(props: RenderBlockProps<TBlock>) {\n const blocks = useBlocks();\n const Component = blocks[props.block.type] as BlockRenderer<TBlock>;\n return !!Component ? (<Component block={props.block} />) : null;\n}\n\nfunction RenderBlocks(props: RenderBlocksProps) {\n return (<>{props.blocks.map(block => <RenderBlock block={block} key={block.id} />)}</>);\n}\n\nfunction RenderContents(props: RenderContentsProps) {\n return (props.contents ? props.contents : props.fallback);\n}\n\nexport function RenderChildren(props: RenderBlockProps<Block>) {\n const isArray = Array.isArray(props.block?.value);\n const isString = typeof props.block?.value === 'string';\n\n const render = () => {\n if (isArray) {\n return (<RenderBlocks blocks={props.block.value as any} />);\n } else if (isString) {\n return (<RenderText text={props.block.value as any} />);\n } else {\n return (<RenderText text={''} />);\n }\n };\n\n return render();\n};\n\nfunction RenderText(props: RenderTextProps) {\n return (<>{props.text}</>);\n};\n\n/** \n * The default render method for processing Canvas data \n * \n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n * \n * @param data - Accepts Canvas data\n * \n * */\nexport function Renderer(props: RendererProps) {\n return (<RenderBlocks blocks={props.data} />);\n}\n\ntype AttributeProps = RenderBlockProps<Block>\n | RenderBlockPropsWithChildren<Block>\n | RenderDecoratorProps\n | RenderDecoratorPropsWithChildren;\n\nfunction getAttributes(props: AttributeProps, extra: Record<string, any> = {}) {\n const { block, ...rest } = props;\n let { children, decorator, otherDecorators, ...attributes } = rest as Record<string, any>;\n attributes = {\n id: block?.properties?.id,\n ...extra,\n ...attributes\n };\n return attributes;\n}\n\nfunction WithCaption(props: WithChildren & { caption: undefined | string }) {\n return (\n !!props.caption\n ? (\n <figure>\n {props.children}\n <figcaption>{props.caption}</figcaption>\n </figure>\n )\n : (props.children || null)\n );\n};\n\nfunction RenderBlockChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<RenderChildren block={props.block} />);\n };\n}\n\nfunction EmptyChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<></>);\n };\n}\n\nexport function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>) {\n const attributes = getAttributes(props);\n return (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Anchor.Children block={props.block} />} />\n </a>\n );\n}\n\nAnchor.Children = RenderBlockChildrenFactory<AnchorBlock>();\n\nexport function Code(props: RenderBlockPropsWithChildren<CodeBlock>) {\n const attributes = getAttributes(props, {\n 'data-language': props.block?.value?.language\n });\n const codeAttributes = getAttributes(props, {\n className: `language-${props.block?.value?.language}`\n });\n return (\n <pre {...attributes}>\n <code {...codeAttributes}>\n <RenderContents contents={props.children} fallback={<Code.Children block={props.block} />} />\n </code>\n </pre>\n );\n}\n\nCode.Children = function (props: RenderBlockProps<CodeBlock>) {\n return (<>{props.block?.value?.code}</>);\n};\n\nfunction CodeWithCaption(props: RenderBlockPropsWithChildren<CodeBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Code {...props} />\n </WithCaption>\n );\n}\n\nexport function Component(props: RenderBlockPropsWithChildren<ComponentBlock>) {\n const component = props?.block.properties?.component;\n const components = useComponents();\n const ComponentElement = !!component ? components?.[component] : undefined;\n\n const value = props.block.value ? JSON.stringify(props.block.value) : '';\n const attributes = getAttributes(props, {\n className: 'component',\n 'data-component': props.block.properties?.component,\n 'data-component-value': value,\n });\n\n return (!!ComponentElement)\n ? (<ComponentElement {...props} />)\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Component.Children block={props.block} />} />\n </div>\n );\n}\n\nComponent.Children = function (props: RenderBlockProps<ComponentBlock>) {\n return (<>Component: {props.block?.properties?.component}</>);\n};\n\nexport function Divider(props: RenderBlockPropsWithChildren<DividerBlock>) {\n const attributes = getAttributes(props);\n return (<hr {...attributes} />);\n}\n\nDivider.Children = EmptyChildrenFactory<DividerBlock>();\n\nexport function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>) {\n return null;\n}\n\nFormContentType.Children = function (_props: RenderBlockProps<FormContentTypeBlock>) {\n return null;\n};\n\nexport function Fragment(props: RenderBlockPropsWithChildren<FragmentBlock>) {\n const hasDecorators = !!props.block?.properties?.decorators?.length;\n const decorators = props.block?.properties?.decorators;\n return (\n hasDecorators\n ? (<Decorators block={props.block} decorators={decorators}></Decorators>)\n : (<RenderContents contents={props.children} fallback={<Fragment.Children block={props.block} />} />)\n );\n}\n\nFragment.Children = RenderBlockChildrenFactory<FragmentBlock>();\n\nexport function Heading(props: RenderBlockPropsWithChildren<HeadingBlock>) {\n const attributes = getAttributes(props);\n const render = () => {\n switch (props?.block?.properties?.level) {\n case 2: {\n return (\n <h2 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h2>\n );\n }\n case 3: {\n return (\n <h3 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h3>\n );\n }\n case 4: {\n return (\n <h4 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h4>\n );\n }\n case 5: {\n return (\n <h5 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h5>\n );\n }\n case 6: {\n return (\n <h6 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h6>\n );\n }\n default: {\n return (\n <h1 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h1>\n );\n }\n }\n };\n return render();\n}\n\nHeading.Children = RenderBlockChildrenFactory<HeadingBlock>();\n\nexport function Image(props: RenderBlockPropsWithChildren<ImageBlock>) {\n const src = props.block?.value?.asset?.sys?.uri;\n const attributes = getAttributes(props, {\n src,\n alt: props.block?.value?.altText,\n title: props?.block?.value?.caption,\n });\n return (<img {...attributes} />);\n}\n\nImage.Children = EmptyChildrenFactory<ImageBlock>();\n\nfunction ImageWithCaption(props: RenderBlockPropsWithChildren<ImageBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Image {...props} />\n </WithCaption>\n );\n}\n\nexport function InlineEntry(props: RenderBlockPropsWithChildren<InlineEntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const attributes = getAttributes(props, {\n href\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />)\n );\n}\n\nInlineEntry.Children = function (props: RenderBlockProps<InlineEntryBlock>) {\n const entryTitle = props?.block?.value?.entryTitle || '';\n return (<>{entryTitle}</>);\n};\n\nexport function Link(props: RenderBlockPropsWithChildren<LinkBlock>) {\n const linkValue = props?.block?.properties?.link;\n const attributes = getAttributes(props, {\n href: linkValue?.sys?.uri,\n target: props?.block?.properties?.newTab ? '_blank' : null,\n rel: props?.block?.properties?.newTab ? 'noopener noreferrer' : null\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />)\n );\n}\n\nLink.Children = RenderBlockChildrenFactory<LinkBlock>();\n\nexport function Liquid(props: RenderBlockPropsWithChildren<LiquidBlock>) { \n return (\n <RenderContents contents={props.children} fallback={<Liquid.Children block={props.block} />} /> \n );\n}\n\nLiquid.Children = function (props: RenderBlockProps<LiquidBlock>) {\n return (<>{props.block?.value}</>);\n};\n\nexport function List(props: RenderBlockPropsWithChildren<ListBlock>) {\n const isOrdered = (props.block?.properties?.listType === 'ordered');\n const attributes = getAttributes(props, {\n start: isOrdered ? props.block?.properties?.start : null,\n });\n return (isOrdered\n ? (\n <ol {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ol>\n )\n : (\n <ul {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ul>\n )\n );\n}\n\nList.Children = RenderBlockChildrenFactory<ListBlock>();\n\nexport function ListItem(props: RenderBlockPropsWithChildren<ListItemBlock>) {\n const attributes = getAttributes(props);\n return (\n <li {...attributes}>\n <RenderContents contents={props.children} fallback={<ListItem.Children block={props.block} />} />\n </li>\n );\n}\n\nListItem.Children = RenderBlockChildrenFactory<ListItemBlock>();\n\nexport function Panel(props: RenderBlockPropsWithChildren<PanelBlock>) {\n const attributes = getAttributes(props, {\n className: ['panel', props.block?.properties?.panelType || 'info'].join(' ')\n });\n return (\n <aside {...attributes}>\n <RenderContents contents={props.children} fallback={<Panel.Children block={props.block} />} />\n </aside>\n );\n}\n\nPanel.Children = RenderBlockChildrenFactory<PanelBlock>();\n\nexport function Paragraph(props: RenderBlockPropsWithChildren<ParagraphBlock>) {\n const attributes = getAttributes(props, {\n className: props.block?.properties?.paragraphType\n });\n return (\n <p {...attributes}>\n <RenderContents contents={props.children} fallback={<Paragraph.Children block={props.block} />} />\n </p>\n );\n}\n\nParagraph.Children = RenderBlockChildrenFactory<ParagraphBlock>();\n\n\nexport function Quote(props: RenderBlockPropsWithChildren<QuoteBlock>) {\n const attributes = getAttributes(props, {\n 'cite': props.block?.properties?.url\n });\n return (\n <blockquote {...attributes}>\n <RenderContents contents={props.children} fallback={<Quote.Children block={props.block} />} />\n </blockquote>\n );\n}\n\nQuote.Children = function (props: RenderBlockProps<QuoteBlock>) {\n const source = props.block?.properties?.source;\n const citation = props.block?.properties?.citation;\n const hasChildren = !!source || !!citation;\n return (\n hasChildren\n ? (\n <>\n <p>\n <RenderChildren block={props.block} />\n </p>\n <footer>{source} {!!citation ? (<cite>{citation}</cite>) : (<></>)}</footer>\n </>\n )\n : (<RenderChildren block={props.block} />)\n );\n};\n\n\nexport function Table(props: RenderBlockPropsWithChildren<TableBlock>) {\n const attributes = getAttributes(props);\n return (\n <table {...attributes}>\n <RenderContents contents={props.children} fallback={<Table.Children block={props.block} />} />\n </table>\n );\n}\n\nTable.Children = RenderBlockChildrenFactory<TableBlock>();\n\nexport function TableBody(props: RenderBlockPropsWithChildren<TableBodyBlock>) {\n const attributes = getAttributes(props);\n return (\n <tbody {...attributes}>\n <RenderContents contents={props.children} fallback={<TableBody.Children block={props.block} />} />\n </tbody>\n );\n}\n\nTableBody.Children = RenderBlockChildrenFactory<TableBodyBlock>();\n\nexport function TableCaption(props: RenderBlockPropsWithChildren<TableCaptionBlock>) {\n const attributes = getAttributes(props);\n return (\n <caption {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCaption.Children block={props.block} />} />\n </caption>\n );\n}\n\nTableCaption.Children = RenderBlockChildrenFactory<TableCaptionBlock>();\n\nexport function TableCell(props: RenderBlockPropsWithChildren<TableCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <td {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCell.Children block={props.block} />} />\n </td>\n );\n}\n\nTableCell.Children = RenderBlockChildrenFactory<TableCellBlock>();\n\nexport function TableFooter(props: RenderBlockPropsWithChildren<TableFooterBlock>) {\n const attributes = getAttributes(props);\n return (\n <tfoot {...attributes}>\n <RenderContents contents={props.children} fallback={<TableFooter.Children block={props.block} />} />\n </tfoot>\n );\n}\n\nTableFooter.Children = RenderBlockChildrenFactory<TableFooterBlock>();\n\nexport function TableHeader(props: RenderBlockPropsWithChildren<TableHeaderBlock>) {\n const attributes = getAttributes(props);\n return (\n <thead {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeader.Children block={props.block} />} />\n </thead>\n );\n}\n\nTableHeader.Children = RenderBlockChildrenFactory<TableHeaderBlock>();\n\nexport function TableHeaderCell(props: RenderBlockPropsWithChildren<TableHeaderCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <th {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeaderCell.Children block={props.block} />} />\n </th>\n );\n}\n\nTableHeaderCell.Children = RenderBlockChildrenFactory<TableHeaderCellBlock>();\n\nexport function TableRow(props: RenderBlockPropsWithChildren<TableRowBlock>) {\n const attributes = getAttributes(props);\n return (\n <tr {...attributes}>\n <RenderContents contents={props.children} fallback={<TableRow.Children block={props.block} />} />\n </tr>\n );\n}\n\nTableRow.Children = RenderBlockChildrenFactory<TableRowBlock>();\n\n\nfunction Decorators(props: DecoratorProps) {\n const decorators = useDecorators();\n const remainingDecorators = !!props.decorators ? [...props.decorators] : undefined;\n const firstDecorator = !!remainingDecorators ? remainingDecorators.shift() : undefined;\n const DecoratorComponent = !!firstDecorator ? decorators[firstDecorator] : undefined;\n\n const render = () => {\n if (!!DecoratorComponent) {\n return (<DecoratorComponent block={props.block} decorator={firstDecorator} otherDecorators={remainingDecorators} />);\n } else if (firstDecorator) {\n return (<Decorators block={props.block} decorators={remainingDecorators} />);\n } else {\n return (<Fragment.Children block={props.block} />);\n }\n };\n\n return render();\n}\n\nfunction DecoratorChildren(props: RenderDecoratorPropsWithChildren) {\n return (<Decorators block={props.block} decorators={props.otherDecorators} />)\n}\n\nexport function InlineCode(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <code {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </code>\n );\n}\n\nInlineCode.Children = DecoratorChildren;\n\nexport function Delete(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <del {...attributes}>\n <RenderContents contents={props.children} fallback={<Delete.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </del>\n );\n}\n\nDelete.Children = DecoratorChildren;\n\nexport function Emphasis(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <em {...attributes}>\n <RenderContents contents={props.children} fallback={<Emphasis.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </em>\n );\n}\n\nEmphasis.Children = DecoratorChildren;\n\nexport function Insert(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <ins {...attributes}>\n <RenderContents contents={props.children} fallback={<Insert.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </ins>\n );\n}\n\nInsert.Children = DecoratorChildren;\n\nexport function Keyboard(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <kbd {...attributes}>\n <RenderContents contents={props.children} fallback={<Keyboard.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </kbd>\n );\n}\n\nKeyboard.Children = DecoratorChildren;\n\nexport function LineBreak(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (<br {...attributes} />);\n}\n\nLineBreak.Children = function (props: RenderDecoratorPropsWithChildren) {\n return (<></>)\n}\n\nexport function Mark(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <mark {...attributes}>\n <RenderContents contents={props.children} fallback={<Mark.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </mark>\n );\n}\n\nMark.Children = DecoratorChildren;\n\nexport function Strong(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <strong {...attributes}>\n <RenderContents contents={props.children} fallback={<Strong.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </strong>\n );\n}\n\nStrong.Children = DecoratorChildren;\n\nexport function Strikethrough(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <s {...attributes}>\n <RenderContents contents={props.children} fallback={<Strikethrough.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </s>\n );\n}\n\nStrikethrough.Children = DecoratorChildren;\n\nexport function Subscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sub {...attributes}>\n <RenderContents contents={props.children} fallback={<Subscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sub>\n );\n}\n\nSubscript.Children = DecoratorChildren;\n\nexport function Superscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sup {...attributes}>\n <RenderContents contents={props.children} fallback={<Superscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sup>\n );\n}\n\nSuperscript.Children = DecoratorChildren;\n\nexport function Underline(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <u {...attributes}>\n <RenderContents contents={props.children} fallback={<Underline.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </u>\n );\n}\n\nUnderline.Children = DecoratorChildren;\n\nexport function Variable(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <var {...attributes}>\n <RenderContents contents={props.children} fallback={<Variable.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </var>\n );\n}\n\nVariable.Children = DecoratorChildren;\n\nconst BLOCK_RENDERERS: BlockRenderers = {\n '_anchor': Anchor,\n '_code': CodeWithCaption,\n '_component': Component,\n '_divider': Divider,\n '_formContentType': FormContentType,\n '_fragment': Fragment,\n '_heading': Heading,\n '_image': ImageWithCaption,\n '_inlineEntry': InlineEntry,\n '_link': Link,\n '_liquid': Liquid,\n '_list': List,\n '_listItem': ListItem,\n '_panel': Panel,\n '_paragraph': Paragraph,\n '_quote': Quote,\n '_table': Table,\n '_tableBody': TableBody,\n '_tableCaption': TableCaption,\n '_tableCell': TableCell,\n '_tableFooter': TableFooter,\n '_tableHeader': TableHeader,\n '_tableHeaderCell': TableHeaderCell,\n '_tableRow': TableRow,\n};\n\nconst DECORATOR_RENDERERS: DecoratorRenderers = {\n 'code': InlineCode,\n 'delete': Delete,\n 'emphasis': Emphasis,\n 'insert': Insert,\n 'keyboard': Keyboard,\n 'linebreak': LineBreak,\n 'mark': Mark,\n 'strikethrough': Strikethrough,\n 'strong': Strong,\n 'subscript': Subscript,\n 'superscript': Superscript,\n 'underline': Underline,\n 'variable': Variable\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AiB,GAAI,CACxK;AAER;AAEA,UAAU,WAAW;AAEd,SAAS,SAAS,OAAyC;AAC9D,QAAM,aAAa,cAAc,KAAK;AACtC,SACI,6BAAAA,QAAA,cAAC,0BAAQ,aACL,6BAAAA,QAAA,cAAC,kBAAe,UAAU,MAAM,UAAU,UAAU,6BAAAA,QAAA,cAAC,SAAS,UAAT,EAAkB,OAAO,MAAM,OAAO,WAAW,MAAM,WAAW,iBAAiB,MAAM,iBAAiB,GAAI,CACvK;AAER;AAEA,SAAS,WAAW;AAEpB,IAAM,kBAAkC;AAAA,EACpC,WAAW;AAAA,EACX,SAAS;AAAA,EACT,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,aAAa;AACjB;AAEA,IAAM,sBAA0C;AAAA,EAC5C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,YAAY;AAChB;","names":["React","Component","React","React","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/renderer.tsx"],"sourcesContent":["export * from '@contensis/canvas-types';\nexport * from './renderer';\n","import React, { ClassType, ComponentClass, FunctionComponent, Component as ReactComponent, createContext, useContext } from 'react';\nimport {\n AnchorBlock,\n AssetBlock,\n Block,\n CodeBlock,\n ComponentBlock,\n DecoratorType,\n DividerBlock,\n EntryBlock,\n FormContentTypeBlock,\n FragmentBlock,\n HeadingBlock,\n ImageBlock,\n InlineEntryBlock,\n LinkBlock,\n LiquidBlock,\n ListBlock,\n ListItemBlock,\n PanelBlock,\n ParagraphBlock,\n QuoteBlock,\n TableBlock,\n TableBodyBlock,\n TableCaptionBlock, TableCellBlock,\n TableFooterBlock,\n TableHeaderBlock,\n TableHeaderCellBlock,\n TableRowBlock\n} from '@contensis/canvas-types';\n\ntype Attributes = Record<string, any>;\ntype WithChildren = { children?: JSX.Element | undefined };\n\ntype RendererProps = { data: Block[] };\ntype RenderBlocksProps = { blocks: Block[] };\ntype RenderBlockProps<T extends Block> = { block: T };\ntype RenderBlockPropsWithChildren<T extends Block>\n = RenderBlockProps<T> & WithChildren & Attributes;\n\ntype RenderContentsProps = { contents: undefined | JSX.Element, fallback: JSX.Element };\ntype RenderTextProps = { text: string };\n\ntype DecoratorProps = { block: FragmentBlock, decorators: undefined | DecoratorType[] };\n\ntype TypedBlock<TType extends Block['type']> = Extract<Block, { type: TType }>;\n\ntype Renderer<TProps> = FunctionComponent<TProps> | ClassType<TProps, ReactComponent<TProps>, ComponentClass<TProps>>;\n\ntype BlockRenderer<T extends Block> = Renderer<RenderBlockPropsWithChildren<T>>;\ntype BlockRenderers = {\n [TType in Block['type']]: BlockRenderer<TypedBlock<TType>>\n};\n\n\ntype RenderDecoratorProps = { block: FragmentBlock, decorator: undefined | DecoratorType, otherDecorators: undefined | DecoratorType[] };\ntype RenderDecoratorPropsWithChildren = RenderDecoratorProps & WithChildren & Attributes;\n\ntype DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;\ntype DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;\n\ntype ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;\ntype ComponentRenderers = Record<string, ComponentRenderer>;\ntype EntryRenderer = Renderer<RenderBlockPropsWithChildren<EntryBlock>>;\ntype EntryRenderers = Record<string, EntryRenderer>;\ntype AssetRenderer = Renderer<RenderBlockPropsWithChildren<AssetBlock>>;\ntype AssetRenderers = Record<string, AssetRenderer>;\n\ntype RendererContextValue = {\n blocks?: BlockRenderers,\n decorators?: DecoratorRenderers,\n components?: ComponentRenderers,\n entries?: EntryRenderers,\n assets?: AssetRenderers,\n};\n\ntype RendererOverridesContextValue = {\n blocks?: Partial<BlockRenderers>,\n decorators?: Partial<DecoratorRenderers>,\n components?: ComponentRenderers,\n entries?: EntryRenderers,\n assets?: AssetRenderers,\n};\n\ntype RendererContextProviderProps = WithChildren & RendererOverridesContextValue;\n\nexport type { BlockRenderer, RenderBlockProps, RenderBlockPropsWithChildren, RenderDecoratorProps, RenderDecoratorPropsWithChildren };\n\nexport const RendererContext = createContext<RendererContextValue>({});\n\n/** \n * Provides context to the <Renderer> component to return Canvas data as React components\n *\n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n *\n * @param blocks - Override the default rendering of Canvas content blocks\n * @param components - Render method for Contensis Components within the Canvas field\n * @param decorators - Override the rendering of HTML elements within a text field\n * \n * @example \n * <RenderContextProvider blocks={{ _table: Table }} components={{ banner: Banner }} decorators={{ strong: Strong }}>\n * <Renderer data={data} />\n * </RenderContextProvider>\n * \n */\nexport function RenderContextProvider(props: RendererContextProviderProps) {\n\n const overrideBlocks = props.blocks;\n const blocks = Object.keys(BLOCK_RENDERERS)\n .reduce((prev, type) => {\n const blockType = type as Block['type'];\n const renderer: any = overrideBlocks?.[blockType] || BLOCK_RENDERERS[blockType];\n (prev as any)[blockType] = renderer;\n return prev;\n }, {} as BlockRenderers);\n\n const overrideDecorators = props.decorators;\n const decorators = Object.keys(DECORATOR_RENDERERS)\n .reduce((prev, type) => {\n const decoratorType = type as DecoratorType;\n prev[decoratorType] = overrideDecorators?.[decoratorType] || DECORATOR_RENDERERS[decoratorType];\n return prev;\n }, {} as DecoratorRenderers);\n\n const value = { blocks, decorators, components: props.components, entries: props.entries, assets: props?.assets };\n\n return (\n <RendererContext.Provider value={value}>\n {props.children}\n </RendererContext.Provider>\n );\n}\n\nfunction useBlocks() {\n const value = useContext(RendererContext);\n return value.blocks || BLOCK_RENDERERS;\n}\n\nfunction useDecorators() {\n const value = useContext(RendererContext);\n return value.decorators || DECORATOR_RENDERERS;\n}\n\nfunction useComponents() {\n const value = useContext(RendererContext);\n return value.components || {};\n}\n\nfunction useEntries() {\n const value = useContext(RendererContext);\n return value.entries || {};\n}\n\nfunction useAssets() {\n const value = useContext(RendererContext);\n return value.assets || {};\n}\n\nfunction RenderBlock<TBlock extends Block>(props: RenderBlockProps<TBlock>) {\n const blocks = useBlocks();\n const Component = blocks[props.block.type] as BlockRenderer<TBlock>;\n return !!Component ? (<Component block={props.block} />) : null;\n}\n\nfunction RenderBlocks(props: RenderBlocksProps) {\n return (<>{props.blocks.map(block => <RenderBlock block={block} key={block.id} />)}</>);\n}\n\nfunction RenderContents(props: RenderContentsProps) {\n return (props.contents ? props.contents : props.fallback);\n}\n\nexport function RenderChildren(props: RenderBlockProps<Block>) {\n const isArray = Array.isArray(props.block?.value);\n const isString = typeof props.block?.value === 'string';\n\n const render = () => {\n if (isArray) {\n return (<RenderBlocks blocks={props.block.value as any} />);\n } else if (isString) {\n return (<RenderText text={props.block.value as any} />);\n } else {\n return (<RenderText text={''} />);\n }\n };\n\n return render();\n};\n\nfunction RenderText(props: RenderTextProps) {\n return (<>{props.text}</>);\n};\n\n/** \n * The default render method for processing Canvas data \n * \n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n * \n * @param data - Accepts Canvas data\n * \n * */\nexport function Renderer(props: RendererProps) {\n return (<RenderBlocks blocks={props.data} />);\n}\n\ntype AttributeProps = RenderBlockProps<Block>\n | RenderBlockPropsWithChildren<Block>\n | RenderDecoratorProps\n | RenderDecoratorPropsWithChildren;\n\nfunction getAttributes(props: AttributeProps, extra: Record<string, any> = {}) {\n const { block, ...rest } = props;\n let { children, decorator, otherDecorators, ...attributes } = rest as Record<string, any>;\n attributes = {\n id: block?.properties?.id,\n ...extra,\n ...attributes\n };\n return attributes;\n}\n\nfunction WithCaption(props: WithChildren & { caption: undefined | string }) {\n return (\n !!props.caption\n ? (\n <figure>\n {props.children}\n <figcaption>{props.caption}</figcaption>\n </figure>\n )\n : (props.children || null)\n );\n};\n\nfunction RenderBlockChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<RenderChildren block={props.block} />);\n };\n}\n\nfunction EmptyChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<></>);\n };\n}\n\nexport function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>) {\n const attributes = getAttributes(props);\n return (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Anchor.Children block={props.block} />} />\n </a>\n );\n}\n\nAnchor.Children = RenderBlockChildrenFactory<AnchorBlock>();\n\nexport function Asset(props: RenderBlockPropsWithChildren<AssetBlock>) {\n const contentTypeId = props?.block?.value?.sys?.contentTypeId;\n const components = useAssets();\n const AssetElement = !!contentTypeId ? components?.[contentTypeId] : undefined;\n const attributes = getAttributes(props);\n return (!!AssetElement)\n ? <AssetElement {...props} />\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Asset.Children block={props.block} />} />\n </div>\n );\n}\n\nAsset.Children = function (props: RenderBlockProps<AssetBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const entryTitle = props?.block?.value?.entryTitle || '';\n const entryDescription = props?.block?.value?.entryDescription || '';\n return (<>\n <div>\n {!!href ? <a href={href}>{entryTitle}</a> : entryTitle}\n </div>\n {!!entryDescription ? <div>{entryDescription}</div> : null}\n </>);\n};\n\nexport function Code(props: RenderBlockPropsWithChildren<CodeBlock>) {\n const attributes = getAttributes(props, {\n 'data-language': props.block?.value?.language\n });\n const codeAttributes = getAttributes(props, {\n className: `language-${props.block?.value?.language}`\n });\n return (\n <pre {...attributes}>\n <code {...codeAttributes}>\n <RenderContents contents={props.children} fallback={<Code.Children block={props.block} />} />\n </code>\n </pre>\n );\n}\n\nCode.Children = function (props: RenderBlockProps<CodeBlock>) {\n return (<>{props.block?.value?.code}</>);\n};\n\nfunction CodeWithCaption(props: RenderBlockPropsWithChildren<CodeBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Code {...props} />\n </WithCaption>\n );\n}\n\nexport function Component(props: RenderBlockPropsWithChildren<ComponentBlock>) {\n const component = props?.block.properties?.component;\n const components = useComponents();\n const ComponentElement = !!component ? components?.[component] : undefined;\n\n const value = props.block.value ? JSON.stringify(props.block.value) : '';\n const attributes = getAttributes(props, {\n className: 'component',\n 'data-component': props.block.properties?.component,\n 'data-component-value': value,\n });\n\n return (!!ComponentElement)\n ? (<ComponentElement {...props} />)\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Component.Children block={props.block} />} />\n </div>\n );\n}\n\nComponent.Children = function (props: RenderBlockProps<ComponentBlock>) {\n return (<>Component: {props.block?.properties?.component}</>);\n};\n\nexport function Divider(props: RenderBlockPropsWithChildren<DividerBlock>) {\n const attributes = getAttributes(props);\n return (<hr {...attributes} />);\n}\n\nDivider.Children = EmptyChildrenFactory<DividerBlock>();\n\nexport function Entry(props: RenderBlockPropsWithChildren<EntryBlock>) {\n const contentTypeId = props?.block?.value?.sys?.contentTypeId;\n const components = useEntries();\n const EntryElement = !!contentTypeId ? components?.[contentTypeId] : undefined;\n const attributes = getAttributes(props);\n return (!!EntryElement)\n ? <EntryElement {...props} />\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Entry.Children block={props.block} />} />\n </div>\n );\n}\n\nEntry.Children = function (props: RenderBlockProps<EntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const entryTitle = props?.block?.value?.entryTitle || '';\n const entryDescription = props?.block?.value?.entryDescription || '';\n return (<>\n <div>\n {!!href ? <a href={href}>{entryTitle}</a> : entryTitle}\n </div>\n {!!entryDescription ? <div>{entryDescription}</div> : null}\n </>);\n};\n\nexport function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>) {\n return null;\n}\n\nFormContentType.Children = function (_props: RenderBlockProps<FormContentTypeBlock>) {\n return null;\n};\n\nexport function Fragment(props: RenderBlockPropsWithChildren<FragmentBlock>) {\n const hasDecorators = !!props.block?.properties?.decorators?.length;\n const decorators = props.block?.properties?.decorators;\n return (\n hasDecorators\n ? (<Decorators block={props.block} decorators={decorators}></Decorators>)\n : (<RenderContents contents={props.children} fallback={<Fragment.Children block={props.block} />} />)\n );\n}\n\nFragment.Children = RenderBlockChildrenFactory<FragmentBlock>();\n\nexport function Heading(props: RenderBlockPropsWithChildren<HeadingBlock>) {\n const attributes = getAttributes(props);\n const render = () => {\n switch (props?.block?.properties?.level) {\n case 2: {\n return (\n <h2 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h2>\n );\n }\n case 3: {\n return (\n <h3 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h3>\n );\n }\n case 4: {\n return (\n <h4 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h4>\n );\n }\n case 5: {\n return (\n <h5 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h5>\n );\n }\n case 6: {\n return (\n <h6 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h6>\n );\n }\n default: {\n return (\n <h1 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h1>\n );\n }\n }\n };\n return render();\n}\n\nHeading.Children = RenderBlockChildrenFactory<HeadingBlock>();\n\nexport function Image(props: RenderBlockPropsWithChildren<ImageBlock>) {\n const src = props.block?.value?.asset?.sys?.uri;\n const attributes = getAttributes(props, {\n src,\n alt: props.block?.value?.altText,\n title: props?.block?.value?.caption,\n });\n return (<img {...attributes} />);\n}\n\nImage.Children = EmptyChildrenFactory<ImageBlock>();\n\nfunction ImageWithCaption(props: RenderBlockPropsWithChildren<ImageBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Image {...props} />\n </WithCaption>\n );\n}\n\nexport function InlineEntry(props: RenderBlockPropsWithChildren<InlineEntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const attributes = getAttributes(props, {\n href\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />)\n );\n}\n\nInlineEntry.Children = function (props: RenderBlockProps<InlineEntryBlock>) {\n const entryTitle = props?.block?.value?.entryTitle || '';\n return (<>{entryTitle}</>);\n};\n\nexport function Link(props: RenderBlockPropsWithChildren<LinkBlock>) {\n const linkValue = props?.block?.properties?.link;\n const attributes = getAttributes(props, {\n href: linkValue?.sys?.uri,\n target: props?.block?.properties?.newTab ? '_blank' : null,\n rel: props?.block?.properties?.newTab ? 'noopener noreferrer' : null\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />)\n );\n}\n\nLink.Children = RenderBlockChildrenFactory<LinkBlock>();\n\nexport function Liquid(props: RenderBlockPropsWithChildren<LiquidBlock>) {\n return (\n <RenderContents contents={props.children} fallback={<Liquid.Children block={props.block} />} />\n );\n}\n\nLiquid.Children = function (props: RenderBlockProps<LiquidBlock>) {\n return (<>{props.block?.value}</>);\n};\n\nexport function List(props: RenderBlockPropsWithChildren<ListBlock>) {\n const isOrdered = (props.block?.properties?.listType === 'ordered');\n const attributes = getAttributes(props, {\n start: isOrdered ? props.block?.properties?.start : null,\n });\n return (isOrdered\n ? (\n <ol {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ol>\n )\n : (\n <ul {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ul>\n )\n );\n}\n\nList.Children = RenderBlockChildrenFactory<ListBlock>();\n\nexport function ListItem(props: RenderBlockPropsWithChildren<ListItemBlock>) {\n const attributes = getAttributes(props);\n return (\n <li {...attributes}>\n <RenderContents contents={props.children} fallback={<ListItem.Children block={props.block} />} />\n </li>\n );\n}\n\nListItem.Children = RenderBlockChildrenFactory<ListItemBlock>();\n\nexport function Panel(props: RenderBlockPropsWithChildren<PanelBlock>) {\n const attributes = getAttributes(props, {\n className: ['panel', props.block?.properties?.panelType || 'info'].join(' ')\n });\n return (\n <aside {...attributes}>\n <RenderContents contents={props.children} fallback={<Panel.Children block={props.block} />} />\n </aside>\n );\n}\n\nPanel.Children = RenderBlockChildrenFactory<PanelBlock>();\n\nexport function Paragraph(props: RenderBlockPropsWithChildren<ParagraphBlock>) {\n const attributes = getAttributes(props, {\n className: props.block?.properties?.paragraphType\n });\n return (\n <p {...attributes}>\n <RenderContents contents={props.children} fallback={<Paragraph.Children block={props.block} />} />\n </p>\n );\n}\n\nParagraph.Children = RenderBlockChildrenFactory<ParagraphBlock>();\n\n\nexport function Quote(props: RenderBlockPropsWithChildren<QuoteBlock>) {\n const attributes = getAttributes(props, {\n 'cite': props.block?.properties?.url\n });\n return (\n <blockquote {...attributes}>\n <RenderContents contents={props.children} fallback={<Quote.Children block={props.block} />} />\n </blockquote>\n );\n}\n\nQuote.Children = function (props: RenderBlockProps<QuoteBlock>) {\n const source = props.block?.properties?.source;\n const citation = props.block?.properties?.citation;\n const hasChildren = !!source || !!citation;\n return (\n hasChildren\n ? (\n <>\n <p>\n <RenderChildren block={props.block} />\n </p>\n <footer>{source} {!!citation ? (<cite>{citation}</cite>) : (<></>)}</footer>\n </>\n )\n : (<RenderChildren block={props.block} />)\n );\n};\n\n\nexport function Table(props: RenderBlockPropsWithChildren<TableBlock>) {\n const attributes = getAttributes(props);\n return (\n <table {...attributes}>\n <RenderContents contents={props.children} fallback={<Table.Children block={props.block} />} />\n </table>\n );\n}\n\nTable.Children = RenderBlockChildrenFactory<TableBlock>();\n\nexport function TableBody(props: RenderBlockPropsWithChildren<TableBodyBlock>) {\n const attributes = getAttributes(props);\n return (\n <tbody {...attributes}>\n <RenderContents contents={props.children} fallback={<TableBody.Children block={props.block} />} />\n </tbody>\n );\n}\n\nTableBody.Children = RenderBlockChildrenFactory<TableBodyBlock>();\n\nexport function TableCaption(props: RenderBlockPropsWithChildren<TableCaptionBlock>) {\n const attributes = getAttributes(props);\n return (\n <caption {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCaption.Children block={props.block} />} />\n </caption>\n );\n}\n\nTableCaption.Children = RenderBlockChildrenFactory<TableCaptionBlock>();\n\nexport function TableCell(props: RenderBlockPropsWithChildren<TableCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <td {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCell.Children block={props.block} />} />\n </td>\n );\n}\n\nTableCell.Children = RenderBlockChildrenFactory<TableCellBlock>();\n\nexport function TableFooter(props: RenderBlockPropsWithChildren<TableFooterBlock>) {\n const attributes = getAttributes(props);\n return (\n <tfoot {...attributes}>\n <RenderContents contents={props.children} fallback={<TableFooter.Children block={props.block} />} />\n </tfoot>\n );\n}\n\nTableFooter.Children = RenderBlockChildrenFactory<TableFooterBlock>();\n\nexport function TableHeader(props: RenderBlockPropsWithChildren<TableHeaderBlock>) {\n const attributes = getAttributes(props);\n return (\n <thead {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeader.Children block={props.block} />} />\n </thead>\n );\n}\n\nTableHeader.Children = RenderBlockChildrenFactory<TableHeaderBlock>();\n\nexport function TableHeaderCell(props: RenderBlockPropsWithChildren<TableHeaderCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <th {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeaderCell.Children block={props.block} />} />\n </th>\n );\n}\n\nTableHeaderCell.Children = RenderBlockChildrenFactory<TableHeaderCellBlock>();\n\nexport function TableRow(props: RenderBlockPropsWithChildren<TableRowBlock>) {\n const attributes = getAttributes(props);\n return (\n <tr {...attributes}>\n <RenderContents contents={props.children} fallback={<TableRow.Children block={props.block} />} />\n </tr>\n );\n}\n\nTableRow.Children = RenderBlockChildrenFactory<TableRowBlock>();\n\n\nfunction Decorators(props: DecoratorProps) {\n const decorators = useDecorators();\n const remainingDecorators = !!props.decorators ? [...props.decorators] : undefined;\n const firstDecorator = !!remainingDecorators ? remainingDecorators.shift() : undefined;\n const DecoratorComponent = !!firstDecorator ? decorators[firstDecorator] : undefined;\n\n const render = () => {\n if (!!DecoratorComponent) {\n return (<DecoratorComponent block={props.block} decorator={firstDecorator} otherDecorators={remainingDecorators} />);\n } else if (firstDecorator) {\n return (<Decorators block={props.block} decorators={remainingDecorators} />);\n } else {\n return (<Fragment.Children block={props.block} />);\n }\n };\n\n return render();\n}\n\nfunction DecoratorChildren(props: RenderDecoratorPropsWithChildren) {\n return (<Decorators block={props.block} decorators={props.otherDecorators} />)\n}\n\nexport function Abbreviation(props: RenderDecoratorPropsWithChildren) { \n const title = props?.block?.properties?.abbreviation?.title;\n const attributes = getAttributes(props, { title });\n return (\n <abbr {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </abbr>\n );\n}\n\nAbbreviation.Children = DecoratorChildren;\n\nexport function InlineCode(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <code {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </code>\n );\n}\n\nInlineCode.Children = DecoratorChildren;\n\nexport function Delete(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <del {...attributes}>\n <RenderContents contents={props.children} fallback={<Delete.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </del>\n );\n}\n\nDelete.Children = DecoratorChildren;\n\nexport function Emphasis(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <em {...attributes}>\n <RenderContents contents={props.children} fallback={<Emphasis.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </em>\n );\n}\n\nEmphasis.Children = DecoratorChildren;\n\nexport function Insert(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <ins {...attributes}>\n <RenderContents contents={props.children} fallback={<Insert.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </ins>\n );\n}\n\nInsert.Children = DecoratorChildren;\n\nexport function Keyboard(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <kbd {...attributes}>\n <RenderContents contents={props.children} fallback={<Keyboard.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </kbd>\n );\n}\n\nKeyboard.Children = DecoratorChildren;\n\nexport function LineBreak(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (<br {...attributes} />);\n}\n\nLineBreak.Children = function (props: RenderDecoratorPropsWithChildren) {\n return (<></>)\n}\n\nexport function Mark(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <mark {...attributes}>\n <RenderContents contents={props.children} fallback={<Mark.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </mark>\n );\n}\n\nMark.Children = DecoratorChildren;\n\nexport function Strong(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <strong {...attributes}>\n <RenderContents contents={props.children} fallback={<Strong.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </strong>\n );\n}\n\nStrong.Children = DecoratorChildren;\n\nexport function Strikethrough(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <s {...attributes}>\n <RenderContents contents={props.children} fallback={<Strikethrough.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </s>\n );\n}\n\nStrikethrough.Children = DecoratorChildren;\n\nexport function Subscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sub {...attributes}>\n <RenderContents contents={props.children} fallback={<Subscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sub>\n );\n}\n\nSubscript.Children = DecoratorChildren;\n\nexport function Superscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sup {...attributes}>\n <RenderContents contents={props.children} fallback={<Superscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sup>\n );\n}\n\nSuperscript.Children = DecoratorChildren;\n\nexport function Underline(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <u {...attributes}>\n <RenderContents contents={props.children} fallback={<Underline.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </u>\n );\n}\n\nUnderline.Children = DecoratorChildren;\n\nexport function Variable(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <var {...attributes}>\n <RenderContents contents={props.children} fallback={<Variable.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </var>\n );\n}\n\nVariable.Children = DecoratorChildren;\n\nconst BLOCK_RENDERERS: BlockRenderers = {\n '_anchor': Anchor,\n '_asset': Asset,\n '_code': CodeWithCaption,\n '_component': Component,\n '_divider': Divider,\n '_entry': Entry,\n '_formContentType': FormContentType,\n '_fragment': Fragment,\n '_heading': Heading,\n '_image': ImageWithCaption,\n '_inlineEntry': InlineEntry,\n '_link': Link,\n '_liquid': Liquid,\n '_list': List,\n '_listItem': ListItem,\n '_panel': Panel,\n '_paragraph': Paragraph,\n '_quote': Quote,\n '_table': Table,\n '_tableBody': TableBody,\n '_tableCaption': TableCaption,\n '_tableCell': TableCell,\n '_tableFooter': TableFooter,\n '_tableHeader': TableHeader,\n '_tableHeaderCell': TableHeaderCell,\n '_tableRow': TableRow,\n};\n\nconst DECORATOR_RENDERERS: DecoratorRenderers = {\n 'abbreviation': Abbreviation,\n 'code': InlineCode,\n 'delete': Delete,\n 'emphasis': Emphasis,\n 'insert': Insert,\n 'keyboard': Keyboard,\n 'linebreak': LineBreak,\n 'mark': Mark,\n 'strikethrough': Strikethrough,\n 'strong': Strong,\n 'subscript': Subscript,\n 'superscript': Superscript,\n 'underline': Underline,\n 'variable': Variable\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA4H;AAwFrH,IAAM,sBAAkB,4BAAoC,CAAC,CAAC;AAiB9D,SAAS,sBAAsB,OAAqC;AAEvE,QAAM,iBAAiB,MAAM;AAC7B,QAAM,SAAS,OAAO,KAAK,eAAe,EACrC,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,YAAY;AAClB,UAAM,YAAgB,iDAAiB,eAAc,gBAAgB,SAAS;AAC9E,IAAC,KAAa,SAAS,IAAI;AAC3B,WAAO;AAAA,EACX,GAAG,CAAC,CAAmB;AAE3B,QAAM,qBAAqB,MAAM;AACjC,QAAM,aAAa,OAAO,KAAK,mBAAmB,EAC7C,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,gBAAgB;AACtB,SAAK,aAAa,KAAI,yDAAqB,mBAAkB,oBAAoB,aAAa;AAC9F,WAAO;AAAA,EACX,GAAG,CAAC,CAAuB;AAE/B,QAAM,QAAQ,EAAE,QAAQ,YAAY,YAAY,MAAM,YAAY,SAAS,MAAM,SAAS,QAAQ,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gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,YAAY;AAChB;","names":["React","Component","React","React","React"]}
|
package/dist/canvas-react.mjs
CHANGED
|
@@ -44,7 +44,7 @@ function RenderContextProvider(props) {
|
|
|
44
44
|
prev[decoratorType] = (overrideDecorators == null ? void 0 : overrideDecorators[decoratorType]) || DECORATOR_RENDERERS[decoratorType];
|
|
45
45
|
return prev;
|
|
46
46
|
}, {});
|
|
47
|
-
const value = { blocks, decorators, components: props.components };
|
|
47
|
+
const value = { blocks, decorators, components: props.components, entries: props.entries, assets: props == null ? void 0 : props.assets };
|
|
48
48
|
return /* @__PURE__ */ React.createElement(RendererContext.Provider, { value }, props.children);
|
|
49
49
|
}
|
|
50
50
|
function useBlocks() {
|
|
@@ -59,6 +59,14 @@ function useComponents() {
|
|
|
59
59
|
const value = useContext(RendererContext);
|
|
60
60
|
return value.components || {};
|
|
61
61
|
}
|
|
62
|
+
function useEntries() {
|
|
63
|
+
const value = useContext(RendererContext);
|
|
64
|
+
return value.entries || {};
|
|
65
|
+
}
|
|
66
|
+
function useAssets() {
|
|
67
|
+
const value = useContext(RendererContext);
|
|
68
|
+
return value.assets || {};
|
|
69
|
+
}
|
|
62
70
|
function RenderBlock(props) {
|
|
63
71
|
const blocks = useBlocks();
|
|
64
72
|
const Component2 = blocks[props.block.type];
|
|
@@ -118,6 +126,21 @@ function Anchor(props) {
|
|
|
118
126
|
return /* @__PURE__ */ React.createElement("a", __spreadValues({}, attributes), /* @__PURE__ */ React.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ React.createElement(Anchor.Children, { block: props.block }) }));
|
|
119
127
|
}
|
|
120
128
|
Anchor.Children = RenderBlockChildrenFactory();
|
|
129
|
+
function Asset(props) {
|
|
130
|
+
var _a, _b, _c;
|
|
131
|
+
const contentTypeId = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.contentTypeId;
|
|
132
|
+
const components = useAssets();
|
|
133
|
+
const AssetElement = !!contentTypeId ? components == null ? void 0 : components[contentTypeId] : void 0;
|
|
134
|
+
const attributes = getAttributes(props);
|
|
135
|
+
return !!AssetElement ? /* @__PURE__ */ React.createElement(AssetElement, __spreadValues({}, props)) : /* @__PURE__ */ React.createElement("div", __spreadValues({}, attributes), /* @__PURE__ */ React.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ React.createElement(Asset.Children, { block: props.block }) }));
|
|
136
|
+
}
|
|
137
|
+
Asset.Children = function(props) {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
139
|
+
const href = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.uri;
|
|
140
|
+
const entryTitle = ((_e = (_d = props == null ? void 0 : props.block) == null ? void 0 : _d.value) == null ? void 0 : _e.entryTitle) || "";
|
|
141
|
+
const entryDescription = ((_g = (_f = props == null ? void 0 : props.block) == null ? void 0 : _f.value) == null ? void 0 : _g.entryDescription) || "";
|
|
142
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, !!href ? /* @__PURE__ */ React.createElement("a", { href }, entryTitle) : entryTitle), !!entryDescription ? /* @__PURE__ */ React.createElement("div", null, entryDescription) : null);
|
|
143
|
+
};
|
|
121
144
|
function Code(props) {
|
|
122
145
|
var _a, _b, _c, _d;
|
|
123
146
|
const attributes = getAttributes(props, {
|
|
@@ -158,6 +181,21 @@ function Divider(props) {
|
|
|
158
181
|
return /* @__PURE__ */ React.createElement("hr", __spreadValues({}, attributes));
|
|
159
182
|
}
|
|
160
183
|
Divider.Children = EmptyChildrenFactory();
|
|
184
|
+
function Entry(props) {
|
|
185
|
+
var _a, _b, _c;
|
|
186
|
+
const contentTypeId = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.contentTypeId;
|
|
187
|
+
const components = useEntries();
|
|
188
|
+
const EntryElement = !!contentTypeId ? components == null ? void 0 : components[contentTypeId] : void 0;
|
|
189
|
+
const attributes = getAttributes(props);
|
|
190
|
+
return !!EntryElement ? /* @__PURE__ */ React.createElement(EntryElement, __spreadValues({}, props)) : /* @__PURE__ */ React.createElement("div", __spreadValues({}, attributes), /* @__PURE__ */ React.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ React.createElement(Entry.Children, { block: props.block }) }));
|
|
191
|
+
}
|
|
192
|
+
Entry.Children = function(props) {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
194
|
+
const href = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.value) == null ? void 0 : _b.sys) == null ? void 0 : _c.uri;
|
|
195
|
+
const entryTitle = ((_e = (_d = props == null ? void 0 : props.block) == null ? void 0 : _d.value) == null ? void 0 : _e.entryTitle) || "";
|
|
196
|
+
const entryDescription = ((_g = (_f = props == null ? void 0 : props.block) == null ? void 0 : _f.value) == null ? void 0 : _g.entryDescription) || "";
|
|
197
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, !!href ? /* @__PURE__ */ React.createElement("a", { href }, entryTitle) : entryTitle), !!entryDescription ? /* @__PURE__ */ React.createElement("div", null, entryDescription) : null);
|
|
198
|
+
};
|
|
161
199
|
function FormContentType(_props) {
|
|
162
200
|
return null;
|
|
163
201
|
}
|
|
@@ -348,6 +386,13 @@ function Decorators(props) {
|
|
|
348
386
|
function DecoratorChildren(props) {
|
|
349
387
|
return /* @__PURE__ */ React.createElement(Decorators, { block: props.block, decorators: props.otherDecorators });
|
|
350
388
|
}
|
|
389
|
+
function Abbreviation(props) {
|
|
390
|
+
var _a, _b, _c;
|
|
391
|
+
const title = (_c = (_b = (_a = props == null ? void 0 : props.block) == null ? void 0 : _a.properties) == null ? void 0 : _b.abbreviation) == null ? void 0 : _c.title;
|
|
392
|
+
const attributes = getAttributes(props, { title });
|
|
393
|
+
return /* @__PURE__ */ React.createElement("abbr", __spreadValues({}, attributes), /* @__PURE__ */ React.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ React.createElement(InlineCode.Children, { block: props.block, decorator: props.decorator, otherDecorators: props.otherDecorators }) }));
|
|
394
|
+
}
|
|
395
|
+
Abbreviation.Children = DecoratorChildren;
|
|
351
396
|
function InlineCode(props) {
|
|
352
397
|
const attributes = getAttributes(props);
|
|
353
398
|
return /* @__PURE__ */ React.createElement("code", __spreadValues({}, attributes), /* @__PURE__ */ React.createElement(RenderContents, { contents: props.children, fallback: /* @__PURE__ */ React.createElement(InlineCode.Children, { block: props.block, decorator: props.decorator, otherDecorators: props.otherDecorators }) }));
|
|
@@ -417,9 +462,11 @@ function Variable(props) {
|
|
|
417
462
|
Variable.Children = DecoratorChildren;
|
|
418
463
|
var BLOCK_RENDERERS = {
|
|
419
464
|
"_anchor": Anchor,
|
|
465
|
+
"_asset": Asset,
|
|
420
466
|
"_code": CodeWithCaption,
|
|
421
467
|
"_component": Component,
|
|
422
468
|
"_divider": Divider,
|
|
469
|
+
"_entry": Entry,
|
|
423
470
|
"_formContentType": FormContentType,
|
|
424
471
|
"_fragment": Fragment,
|
|
425
472
|
"_heading": Heading,
|
|
@@ -442,6 +489,7 @@ var BLOCK_RENDERERS = {
|
|
|
442
489
|
"_tableRow": TableRow
|
|
443
490
|
};
|
|
444
491
|
var DECORATOR_RENDERERS = {
|
|
492
|
+
"abbreviation": Abbreviation,
|
|
445
493
|
"code": InlineCode,
|
|
446
494
|
"delete": Delete,
|
|
447
495
|
"emphasis": Emphasis,
|
|
@@ -457,12 +505,15 @@ var DECORATOR_RENDERERS = {
|
|
|
457
505
|
"variable": Variable
|
|
458
506
|
};
|
|
459
507
|
export {
|
|
508
|
+
Abbreviation,
|
|
460
509
|
Anchor,
|
|
510
|
+
Asset,
|
|
461
511
|
Code,
|
|
462
512
|
Component,
|
|
463
513
|
Delete,
|
|
464
514
|
Divider,
|
|
465
515
|
Emphasis,
|
|
516
|
+
Entry,
|
|
466
517
|
FormContentType,
|
|
467
518
|
Fragment,
|
|
468
519
|
Heading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/renderer.tsx"],"sourcesContent":["import React, { ClassType, ComponentClass, FunctionComponent, Component as ReactComponent, createContext, useContext } from 'react';\nimport {\n AnchorBlock,\n Block,\n CodeBlock,\n ComponentBlock,\n DecoratorType,\n DividerBlock,\n FormContentTypeBlock,\n FragmentBlock,\n HeadingBlock,\n ImageBlock,\n InlineEntryBlock,\n LinkBlock,\n LiquidBlock,\n ListBlock,\n ListItemBlock,\n PanelBlock,\n ParagraphBlock,\n QuoteBlock,\n TableBlock,\n TableBodyBlock,\n TableCaptionBlock, TableCellBlock,\n TableFooterBlock,\n TableHeaderBlock,\n TableHeaderCellBlock,\n TableRowBlock\n} from '@contensis/canvas-types';\n\ntype Attributes = Record<string, any>;\ntype WithChildren = { children?: JSX.Element | undefined };\n\ntype RendererProps = { data: Block[] };\ntype RenderBlocksProps = { blocks: Block[] };\ntype RenderBlockProps<T extends Block> = { block: T };\ntype RenderBlockPropsWithChildren<T extends Block>\n = RenderBlockProps<T> & WithChildren & Attributes;\n\ntype RenderContentsProps = { contents: undefined | JSX.Element, fallback: JSX.Element };\ntype RenderTextProps = { text: string };\n\ntype DecoratorProps = { block: FragmentBlock, decorators: undefined | DecoratorType[] };\n\ntype TypedBlock<TType extends Block['type']> = Extract<Block, { type: TType }>;\n\ntype Renderer<TProps> = FunctionComponent<TProps> | ClassType<TProps, ReactComponent<TProps>, ComponentClass<TProps>>;\n\ntype BlockRenderer<T extends Block> = Renderer<RenderBlockPropsWithChildren<T>>;\ntype BlockRenderers = {\n [TType in Block['type']]: BlockRenderer<TypedBlock<TType>>\n};\n\n\ntype RenderDecoratorProps = { block: FragmentBlock, decorator: undefined | DecoratorType, otherDecorators: undefined | DecoratorType[] };\ntype RenderDecoratorPropsWithChildren = RenderDecoratorProps & WithChildren & Attributes;\n\ntype DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;\ntype DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;\n\ntype ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;\ntype ComponentRenderers = Record<string, ComponentRenderer>;\n\ntype RendererContextValue = {\n blocks?: BlockRenderers,\n decorators?: DecoratorRenderers,\n components?: ComponentRenderers\n};\n\ntype RendererOverridesContextValue = {\n blocks?: Partial<BlockRenderers>,\n decorators?: Partial<DecoratorRenderers>,\n components?: ComponentRenderers\n};\n\ntype RendererContextProviderProps = WithChildren & RendererOverridesContextValue;\n\nexport type { BlockRenderer, RenderBlockProps, RenderBlockPropsWithChildren, RenderDecoratorProps, RenderDecoratorPropsWithChildren };\n\nexport const RendererContext = createContext<RendererContextValue>({});\n\n/** \n * Provides context to the <Renderer> component to return Canvas data as React components\n *\n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n *\n * @param blocks - Override the default rendering of Canvas content blocks\n * @param components - Render method for Contensis Components within the Canvas field\n * @param decorators - Override the rendering of HTML elements within a text field\n * \n * @example \n * <RenderContextProvider blocks={{ _table: Table }} components={{ banner: Banner }} decorators={{ strong: Strong }}>\n * <Renderer data={data} />\n * </RenderContextProvider>\n * \n */\nexport function RenderContextProvider(props: RendererContextProviderProps) {\n\n const overrideBlocks = props.blocks;\n const blocks = Object.keys(BLOCK_RENDERERS)\n .reduce((prev, type) => {\n const blockType = type as Block['type'];\n const renderer: any = overrideBlocks?.[blockType] || BLOCK_RENDERERS[blockType];\n (prev as any)[blockType] = renderer;\n return prev;\n }, {} as BlockRenderers);\n\n const overrideDecorators = props.decorators;\n const decorators = Object.keys(DECORATOR_RENDERERS)\n .reduce((prev, type) => {\n const decoratorType = type as DecoratorType;\n prev[decoratorType] = overrideDecorators?.[decoratorType] || DECORATOR_RENDERERS[decoratorType];\n return prev;\n }, {} as DecoratorRenderers);\n\n const value = { blocks, decorators, components: props.components };\n\n return (\n <RendererContext.Provider value={value}>\n {props.children}\n </RendererContext.Provider>\n );\n}\n\nfunction useBlocks() {\n const value = useContext(RendererContext);\n return value.blocks || BLOCK_RENDERERS;\n}\n\nfunction useDecorators() {\n const value = useContext(RendererContext);\n return value.decorators || DECORATOR_RENDERERS;\n}\n\nfunction useComponents() {\n const value = useContext(RendererContext);\n return value.components || {};\n}\n\nfunction RenderBlock<TBlock extends Block>(props: RenderBlockProps<TBlock>) {\n const blocks = useBlocks();\n const Component = blocks[props.block.type] as BlockRenderer<TBlock>;\n return !!Component ? (<Component block={props.block} />) : null;\n}\n\nfunction RenderBlocks(props: RenderBlocksProps) {\n return (<>{props.blocks.map(block => <RenderBlock block={block} key={block.id} />)}</>);\n}\n\nfunction RenderContents(props: RenderContentsProps) {\n return (props.contents ? props.contents : props.fallback);\n}\n\nexport function RenderChildren(props: RenderBlockProps<Block>) {\n const isArray = Array.isArray(props.block?.value);\n const isString = typeof props.block?.value === 'string';\n\n const render = () => {\n if (isArray) {\n return (<RenderBlocks blocks={props.block.value as any} />);\n } else if (isString) {\n return (<RenderText text={props.block.value as any} />);\n } else {\n return (<RenderText text={''} />);\n }\n };\n\n return render();\n};\n\nfunction RenderText(props: RenderTextProps) {\n return (<>{props.text}</>);\n};\n\n/** \n * The default render method for processing Canvas data \n * \n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n * \n * @param data - Accepts Canvas data\n * \n * */\nexport function Renderer(props: RendererProps) {\n return (<RenderBlocks blocks={props.data} />);\n}\n\ntype AttributeProps = RenderBlockProps<Block>\n | RenderBlockPropsWithChildren<Block>\n | RenderDecoratorProps\n | RenderDecoratorPropsWithChildren;\n\nfunction getAttributes(props: AttributeProps, extra: Record<string, any> = {}) {\n const { block, ...rest } = props;\n let { children, decorator, otherDecorators, ...attributes } = rest as Record<string, any>;\n attributes = {\n id: block?.properties?.id,\n ...extra,\n ...attributes\n };\n return attributes;\n}\n\nfunction WithCaption(props: WithChildren & { caption: undefined | string }) {\n return (\n !!props.caption\n ? (\n <figure>\n {props.children}\n <figcaption>{props.caption}</figcaption>\n </figure>\n )\n : (props.children || null)\n );\n};\n\nfunction RenderBlockChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<RenderChildren block={props.block} />);\n };\n}\n\nfunction EmptyChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<></>);\n };\n}\n\nexport function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>) {\n const attributes = getAttributes(props);\n return (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Anchor.Children block={props.block} />} />\n </a>\n );\n}\n\nAnchor.Children = RenderBlockChildrenFactory<AnchorBlock>();\n\nexport function Code(props: RenderBlockPropsWithChildren<CodeBlock>) {\n const attributes = getAttributes(props, {\n 'data-language': props.block?.value?.language\n });\n const codeAttributes = getAttributes(props, {\n className: `language-${props.block?.value?.language}`\n });\n return (\n <pre {...attributes}>\n <code {...codeAttributes}>\n <RenderContents contents={props.children} fallback={<Code.Children block={props.block} />} />\n </code>\n </pre>\n );\n}\n\nCode.Children = function (props: RenderBlockProps<CodeBlock>) {\n return (<>{props.block?.value?.code}</>);\n};\n\nfunction CodeWithCaption(props: RenderBlockPropsWithChildren<CodeBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Code {...props} />\n </WithCaption>\n );\n}\n\nexport function Component(props: RenderBlockPropsWithChildren<ComponentBlock>) {\n const component = props?.block.properties?.component;\n const components = useComponents();\n const ComponentElement = !!component ? components?.[component] : undefined;\n\n const value = props.block.value ? JSON.stringify(props.block.value) : '';\n const attributes = getAttributes(props, {\n className: 'component',\n 'data-component': props.block.properties?.component,\n 'data-component-value': value,\n });\n\n return (!!ComponentElement)\n ? (<ComponentElement {...props} />)\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Component.Children block={props.block} />} />\n </div>\n );\n}\n\nComponent.Children = function (props: RenderBlockProps<ComponentBlock>) {\n return (<>Component: {props.block?.properties?.component}</>);\n};\n\nexport function Divider(props: RenderBlockPropsWithChildren<DividerBlock>) {\n const attributes = getAttributes(props);\n return (<hr {...attributes} />);\n}\n\nDivider.Children = EmptyChildrenFactory<DividerBlock>();\n\nexport function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>) {\n return null;\n}\n\nFormContentType.Children = function (_props: RenderBlockProps<FormContentTypeBlock>) {\n return null;\n};\n\nexport function Fragment(props: RenderBlockPropsWithChildren<FragmentBlock>) {\n const hasDecorators = !!props.block?.properties?.decorators?.length;\n const decorators = props.block?.properties?.decorators;\n return (\n hasDecorators\n ? (<Decorators block={props.block} decorators={decorators}></Decorators>)\n : (<RenderContents contents={props.children} fallback={<Fragment.Children block={props.block} />} />)\n );\n}\n\nFragment.Children = RenderBlockChildrenFactory<FragmentBlock>();\n\nexport function Heading(props: RenderBlockPropsWithChildren<HeadingBlock>) {\n const attributes = getAttributes(props);\n const render = () => {\n switch (props?.block?.properties?.level) {\n case 2: {\n return (\n <h2 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h2>\n );\n }\n case 3: {\n return (\n <h3 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h3>\n );\n }\n case 4: {\n return (\n <h4 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h4>\n );\n }\n case 5: {\n return (\n <h5 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h5>\n );\n }\n case 6: {\n return (\n <h6 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h6>\n );\n }\n default: {\n return (\n <h1 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h1>\n );\n }\n }\n };\n return render();\n}\n\nHeading.Children = RenderBlockChildrenFactory<HeadingBlock>();\n\nexport function Image(props: RenderBlockPropsWithChildren<ImageBlock>) {\n const src = props.block?.value?.asset?.sys?.uri;\n const attributes = getAttributes(props, {\n src,\n alt: props.block?.value?.altText,\n title: props?.block?.value?.caption,\n });\n return (<img {...attributes} />);\n}\n\nImage.Children = EmptyChildrenFactory<ImageBlock>();\n\nfunction ImageWithCaption(props: RenderBlockPropsWithChildren<ImageBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Image {...props} />\n </WithCaption>\n );\n}\n\nexport function InlineEntry(props: RenderBlockPropsWithChildren<InlineEntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const attributes = getAttributes(props, {\n href\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />)\n );\n}\n\nInlineEntry.Children = function (props: RenderBlockProps<InlineEntryBlock>) {\n const entryTitle = props?.block?.value?.entryTitle || '';\n return (<>{entryTitle}</>);\n};\n\nexport function Link(props: RenderBlockPropsWithChildren<LinkBlock>) {\n const linkValue = props?.block?.properties?.link;\n const attributes = getAttributes(props, {\n href: linkValue?.sys?.uri,\n target: props?.block?.properties?.newTab ? '_blank' : null,\n rel: props?.block?.properties?.newTab ? 'noopener noreferrer' : null\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />)\n );\n}\n\nLink.Children = RenderBlockChildrenFactory<LinkBlock>();\n\nexport function Liquid(props: RenderBlockPropsWithChildren<LiquidBlock>) { \n return (\n <RenderContents contents={props.children} fallback={<Liquid.Children block={props.block} />} /> \n );\n}\n\nLiquid.Children = function (props: RenderBlockProps<LiquidBlock>) {\n return (<>{props.block?.value}</>);\n};\n\nexport function List(props: RenderBlockPropsWithChildren<ListBlock>) {\n const isOrdered = (props.block?.properties?.listType === 'ordered');\n const attributes = getAttributes(props, {\n start: isOrdered ? props.block?.properties?.start : null,\n });\n return (isOrdered\n ? (\n <ol {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ol>\n )\n : (\n <ul {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ul>\n )\n );\n}\n\nList.Children = RenderBlockChildrenFactory<ListBlock>();\n\nexport function ListItem(props: RenderBlockPropsWithChildren<ListItemBlock>) {\n const attributes = getAttributes(props);\n return (\n <li {...attributes}>\n <RenderContents contents={props.children} fallback={<ListItem.Children block={props.block} />} />\n </li>\n );\n}\n\nListItem.Children = RenderBlockChildrenFactory<ListItemBlock>();\n\nexport function Panel(props: RenderBlockPropsWithChildren<PanelBlock>) {\n const attributes = getAttributes(props, {\n className: ['panel', props.block?.properties?.panelType || 'info'].join(' ')\n });\n return (\n <aside {...attributes}>\n <RenderContents contents={props.children} fallback={<Panel.Children block={props.block} />} />\n </aside>\n );\n}\n\nPanel.Children = RenderBlockChildrenFactory<PanelBlock>();\n\nexport function Paragraph(props: RenderBlockPropsWithChildren<ParagraphBlock>) {\n const attributes = getAttributes(props, {\n className: props.block?.properties?.paragraphType\n });\n return (\n <p {...attributes}>\n <RenderContents contents={props.children} fallback={<Paragraph.Children block={props.block} />} />\n </p>\n );\n}\n\nParagraph.Children = RenderBlockChildrenFactory<ParagraphBlock>();\n\n\nexport function Quote(props: RenderBlockPropsWithChildren<QuoteBlock>) {\n const attributes = getAttributes(props, {\n 'cite': props.block?.properties?.url\n });\n return (\n <blockquote {...attributes}>\n <RenderContents contents={props.children} fallback={<Quote.Children block={props.block} />} />\n </blockquote>\n );\n}\n\nQuote.Children = function (props: RenderBlockProps<QuoteBlock>) {\n const source = props.block?.properties?.source;\n const citation = props.block?.properties?.citation;\n const hasChildren = !!source || !!citation;\n return (\n hasChildren\n ? (\n <>\n <p>\n <RenderChildren block={props.block} />\n </p>\n <footer>{source} {!!citation ? (<cite>{citation}</cite>) : (<></>)}</footer>\n </>\n )\n : (<RenderChildren block={props.block} />)\n );\n};\n\n\nexport function Table(props: RenderBlockPropsWithChildren<TableBlock>) {\n const attributes = getAttributes(props);\n return (\n <table {...attributes}>\n <RenderContents contents={props.children} fallback={<Table.Children block={props.block} />} />\n </table>\n );\n}\n\nTable.Children = RenderBlockChildrenFactory<TableBlock>();\n\nexport function TableBody(props: RenderBlockPropsWithChildren<TableBodyBlock>) {\n const attributes = getAttributes(props);\n return (\n <tbody {...attributes}>\n <RenderContents contents={props.children} fallback={<TableBody.Children block={props.block} />} />\n </tbody>\n );\n}\n\nTableBody.Children = RenderBlockChildrenFactory<TableBodyBlock>();\n\nexport function TableCaption(props: RenderBlockPropsWithChildren<TableCaptionBlock>) {\n const attributes = getAttributes(props);\n return (\n <caption {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCaption.Children block={props.block} />} />\n </caption>\n );\n}\n\nTableCaption.Children = RenderBlockChildrenFactory<TableCaptionBlock>();\n\nexport function TableCell(props: RenderBlockPropsWithChildren<TableCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <td {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCell.Children block={props.block} />} />\n </td>\n );\n}\n\nTableCell.Children = RenderBlockChildrenFactory<TableCellBlock>();\n\nexport function TableFooter(props: RenderBlockPropsWithChildren<TableFooterBlock>) {\n const attributes = getAttributes(props);\n return (\n <tfoot {...attributes}>\n <RenderContents contents={props.children} fallback={<TableFooter.Children block={props.block} />} />\n </tfoot>\n );\n}\n\nTableFooter.Children = RenderBlockChildrenFactory<TableFooterBlock>();\n\nexport function TableHeader(props: RenderBlockPropsWithChildren<TableHeaderBlock>) {\n const attributes = getAttributes(props);\n return (\n <thead {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeader.Children block={props.block} />} />\n </thead>\n );\n}\n\nTableHeader.Children = RenderBlockChildrenFactory<TableHeaderBlock>();\n\nexport function TableHeaderCell(props: RenderBlockPropsWithChildren<TableHeaderCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <th {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeaderCell.Children block={props.block} />} />\n </th>\n );\n}\n\nTableHeaderCell.Children = RenderBlockChildrenFactory<TableHeaderCellBlock>();\n\nexport function TableRow(props: RenderBlockPropsWithChildren<TableRowBlock>) {\n const attributes = getAttributes(props);\n return (\n <tr {...attributes}>\n <RenderContents contents={props.children} fallback={<TableRow.Children block={props.block} />} />\n </tr>\n );\n}\n\nTableRow.Children = RenderBlockChildrenFactory<TableRowBlock>();\n\n\nfunction Decorators(props: DecoratorProps) {\n const decorators = useDecorators();\n const remainingDecorators = !!props.decorators ? [...props.decorators] : undefined;\n const firstDecorator = !!remainingDecorators ? remainingDecorators.shift() : undefined;\n const DecoratorComponent = !!firstDecorator ? decorators[firstDecorator] : undefined;\n\n const render = () => {\n if (!!DecoratorComponent) {\n return (<DecoratorComponent block={props.block} decorator={firstDecorator} otherDecorators={remainingDecorators} />);\n } else if (firstDecorator) {\n return (<Decorators block={props.block} decorators={remainingDecorators} />);\n } else {\n return (<Fragment.Children block={props.block} />);\n }\n };\n\n return render();\n}\n\nfunction DecoratorChildren(props: RenderDecoratorPropsWithChildren) {\n return (<Decorators block={props.block} decorators={props.otherDecorators} />)\n}\n\nexport function InlineCode(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <code {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </code>\n );\n}\n\nInlineCode.Children = DecoratorChildren;\n\nexport function Delete(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <del {...attributes}>\n <RenderContents contents={props.children} fallback={<Delete.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </del>\n );\n}\n\nDelete.Children = DecoratorChildren;\n\nexport function Emphasis(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <em {...attributes}>\n <RenderContents contents={props.children} fallback={<Emphasis.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </em>\n );\n}\n\nEmphasis.Children = DecoratorChildren;\n\nexport function Insert(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <ins {...attributes}>\n <RenderContents contents={props.children} fallback={<Insert.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </ins>\n );\n}\n\nInsert.Children = DecoratorChildren;\n\nexport function Keyboard(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <kbd {...attributes}>\n <RenderContents contents={props.children} fallback={<Keyboard.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </kbd>\n );\n}\n\nKeyboard.Children = DecoratorChildren;\n\nexport function LineBreak(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (<br {...attributes} />);\n}\n\nLineBreak.Children = function (props: RenderDecoratorPropsWithChildren) {\n return (<></>)\n}\n\nexport function Mark(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <mark {...attributes}>\n <RenderContents contents={props.children} fallback={<Mark.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </mark>\n );\n}\n\nMark.Children = DecoratorChildren;\n\nexport function Strong(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <strong {...attributes}>\n <RenderContents contents={props.children} fallback={<Strong.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </strong>\n );\n}\n\nStrong.Children = DecoratorChildren;\n\nexport function Strikethrough(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <s {...attributes}>\n <RenderContents contents={props.children} fallback={<Strikethrough.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </s>\n );\n}\n\nStrikethrough.Children = DecoratorChildren;\n\nexport function Subscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sub {...attributes}>\n <RenderContents contents={props.children} fallback={<Subscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sub>\n );\n}\n\nSubscript.Children = DecoratorChildren;\n\nexport function Superscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sup {...attributes}>\n <RenderContents contents={props.children} fallback={<Superscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sup>\n );\n}\n\nSuperscript.Children = DecoratorChildren;\n\nexport function Underline(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <u {...attributes}>\n <RenderContents contents={props.children} fallback={<Underline.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </u>\n );\n}\n\nUnderline.Children = DecoratorChildren;\n\nexport function Variable(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <var {...attributes}>\n <RenderContents contents={props.children} fallback={<Variable.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </var>\n );\n}\n\nVariable.Children = DecoratorChildren;\n\nconst BLOCK_RENDERERS: BlockRenderers = {\n '_anchor': Anchor,\n '_code': CodeWithCaption,\n '_component': Component,\n '_divider': Divider,\n '_formContentType': FormContentType,\n '_fragment': Fragment,\n '_heading': Heading,\n '_image': ImageWithCaption,\n '_inlineEntry': InlineEntry,\n '_link': Link,\n '_liquid': Liquid,\n '_list': List,\n '_listItem': ListItem,\n '_panel': Panel,\n '_paragraph': Paragraph,\n '_quote': Quote,\n '_table': Table,\n '_tableBody': TableBody,\n '_tableCaption': TableCaption,\n '_tableCell': TableCell,\n '_tableFooter': TableFooter,\n '_tableHeader': TableHeader,\n '_tableHeaderCell': TableHeaderCell,\n '_tableRow': TableRow,\n};\n\nconst DECORATOR_RENDERERS: DecoratorRenderers = {\n 'code': InlineCode,\n 'delete': Delete,\n 'emphasis': Emphasis,\n 'insert': Insert,\n 'keyboard': Keyboard,\n 'linebreak': LineBreak,\n 'mark': Mark,\n 'strikethrough': Strikethrough,\n 'strong': Strong,\n 'subscript': Subscript,\n 'superscript': Superscript,\n 'underline': Underline,\n 'variable': Variable\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAoF,eAAe,kBAAkB;AA8ErH,IAAM,kBAAkB,cAAoC,CAAC,CAAC;AAiB9D,SAAS,sBAAsB,OAAqC;AAEvE,QAAM,iBAAiB,MAAM;AAC7B,QAAM,SAAS,OAAO,KAAK,eAAe,EACrC,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,YAAY;AAClB,UAAM,YAAgB,iDAAiB,eAAc,gBAAgB,SAAS;AAC9E,IAAC,KAAa,SAAS,IAAI;AAC3B,WAAO;AAAA,EACX,GAAG,CAAC,CAAmB;AAE3B,QAAM,qBAAqB,MAAM;AACjC,QAAM,aAAa,OAAO,KAAK,mBAAmB,EAC7C,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,gBAAgB;AACtB,SAAK,aAAa,KAAI,yDAAqB,mBAAkB,oBAAoB,aAAa;AAC9F,WAAO;AAAA,EACX,GAAG,CAAC,CAAuB;AAE/B,QAAM,QAAQ,EAAE,QAAQ,YAAY,YAAY,MAAM,WAAW;AAEjE,SACI,oCAAC,gBAAgB,UAAhB,EAAyB,SACrB,MAAM,QACX;AAER;AAEA,SAAS,YAAY;AACjB,QAAM,QAAQ,WAAW,eAAe;AACxC,SAAO,MAAM,UAAU;AAC3B;AAEA,SAAS,gBAAgB;AACrB,QAAM,QAAQ,WAAW,eAAe;AACxC,SAAO,MAAM,cAAc;AAC/B;AAEA,SAAS,gBAAgB;AACrB,QAAM,QAAQ,WAAW,eAAe;AACxC,SAAO,M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;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,YAAY;AAChB;","names":["Component"]}
|
|
1
|
+
{"version":3,"sources":["../src/renderer.tsx"],"sourcesContent":["import React, { ClassType, ComponentClass, FunctionComponent, Component as ReactComponent, createContext, useContext } from 'react';\nimport {\n AnchorBlock,\n AssetBlock,\n Block,\n CodeBlock,\n ComponentBlock,\n DecoratorType,\n DividerBlock,\n EntryBlock,\n FormContentTypeBlock,\n FragmentBlock,\n HeadingBlock,\n ImageBlock,\n InlineEntryBlock,\n LinkBlock,\n LiquidBlock,\n ListBlock,\n ListItemBlock,\n PanelBlock,\n ParagraphBlock,\n QuoteBlock,\n TableBlock,\n TableBodyBlock,\n TableCaptionBlock, TableCellBlock,\n TableFooterBlock,\n TableHeaderBlock,\n TableHeaderCellBlock,\n TableRowBlock\n} from '@contensis/canvas-types';\n\ntype Attributes = Record<string, any>;\ntype WithChildren = { children?: JSX.Element | undefined };\n\ntype RendererProps = { data: Block[] };\ntype RenderBlocksProps = { blocks: Block[] };\ntype RenderBlockProps<T extends Block> = { block: T };\ntype RenderBlockPropsWithChildren<T extends Block>\n = RenderBlockProps<T> & WithChildren & Attributes;\n\ntype RenderContentsProps = { contents: undefined | JSX.Element, fallback: JSX.Element };\ntype RenderTextProps = { text: string };\n\ntype DecoratorProps = { block: FragmentBlock, decorators: undefined | DecoratorType[] };\n\ntype TypedBlock<TType extends Block['type']> = Extract<Block, { type: TType }>;\n\ntype Renderer<TProps> = FunctionComponent<TProps> | ClassType<TProps, ReactComponent<TProps>, ComponentClass<TProps>>;\n\ntype BlockRenderer<T extends Block> = Renderer<RenderBlockPropsWithChildren<T>>;\ntype BlockRenderers = {\n [TType in Block['type']]: BlockRenderer<TypedBlock<TType>>\n};\n\n\ntype RenderDecoratorProps = { block: FragmentBlock, decorator: undefined | DecoratorType, otherDecorators: undefined | DecoratorType[] };\ntype RenderDecoratorPropsWithChildren = RenderDecoratorProps & WithChildren & Attributes;\n\ntype DecoratorRenderer = Renderer<RenderDecoratorPropsWithChildren>;\ntype DecoratorRenderers = Record<DecoratorType, DecoratorRenderer>;\n\ntype ComponentRenderer = Renderer<RenderBlockPropsWithChildren<ComponentBlock>>;\ntype ComponentRenderers = Record<string, ComponentRenderer>;\ntype EntryRenderer = Renderer<RenderBlockPropsWithChildren<EntryBlock>>;\ntype EntryRenderers = Record<string, EntryRenderer>;\ntype AssetRenderer = Renderer<RenderBlockPropsWithChildren<AssetBlock>>;\ntype AssetRenderers = Record<string, AssetRenderer>;\n\ntype RendererContextValue = {\n blocks?: BlockRenderers,\n decorators?: DecoratorRenderers,\n components?: ComponentRenderers,\n entries?: EntryRenderers,\n assets?: AssetRenderers,\n};\n\ntype RendererOverridesContextValue = {\n blocks?: Partial<BlockRenderers>,\n decorators?: Partial<DecoratorRenderers>,\n components?: ComponentRenderers,\n entries?: EntryRenderers,\n assets?: AssetRenderers,\n};\n\ntype RendererContextProviderProps = WithChildren & RendererOverridesContextValue;\n\nexport type { BlockRenderer, RenderBlockProps, RenderBlockPropsWithChildren, RenderDecoratorProps, RenderDecoratorPropsWithChildren };\n\nexport const RendererContext = createContext<RendererContextValue>({});\n\n/** \n * Provides context to the <Renderer> component to return Canvas data as React components\n *\n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n *\n * @param blocks - Override the default rendering of Canvas content blocks\n * @param components - Render method for Contensis Components within the Canvas field\n * @param decorators - Override the rendering of HTML elements within a text field\n * \n * @example \n * <RenderContextProvider blocks={{ _table: Table }} components={{ banner: Banner }} decorators={{ strong: Strong }}>\n * <Renderer data={data} />\n * </RenderContextProvider>\n * \n */\nexport function RenderContextProvider(props: RendererContextProviderProps) {\n\n const overrideBlocks = props.blocks;\n const blocks = Object.keys(BLOCK_RENDERERS)\n .reduce((prev, type) => {\n const blockType = type as Block['type'];\n const renderer: any = overrideBlocks?.[blockType] || BLOCK_RENDERERS[blockType];\n (prev as any)[blockType] = renderer;\n return prev;\n }, {} as BlockRenderers);\n\n const overrideDecorators = props.decorators;\n const decorators = Object.keys(DECORATOR_RENDERERS)\n .reduce((prev, type) => {\n const decoratorType = type as DecoratorType;\n prev[decoratorType] = overrideDecorators?.[decoratorType] || DECORATOR_RENDERERS[decoratorType];\n return prev;\n }, {} as DecoratorRenderers);\n\n const value = { blocks, decorators, components: props.components, entries: props.entries, assets: props?.assets };\n\n return (\n <RendererContext.Provider value={value}>\n {props.children}\n </RendererContext.Provider>\n );\n}\n\nfunction useBlocks() {\n const value = useContext(RendererContext);\n return value.blocks || BLOCK_RENDERERS;\n}\n\nfunction useDecorators() {\n const value = useContext(RendererContext);\n return value.decorators || DECORATOR_RENDERERS;\n}\n\nfunction useComponents() {\n const value = useContext(RendererContext);\n return value.components || {};\n}\n\nfunction useEntries() {\n const value = useContext(RendererContext);\n return value.entries || {};\n}\n\nfunction useAssets() {\n const value = useContext(RendererContext);\n return value.assets || {};\n}\n\nfunction RenderBlock<TBlock extends Block>(props: RenderBlockProps<TBlock>) {\n const blocks = useBlocks();\n const Component = blocks[props.block.type] as BlockRenderer<TBlock>;\n return !!Component ? (<Component block={props.block} />) : null;\n}\n\nfunction RenderBlocks(props: RenderBlocksProps) {\n return (<>{props.blocks.map(block => <RenderBlock block={block} key={block.id} />)}</>);\n}\n\nfunction RenderContents(props: RenderContentsProps) {\n return (props.contents ? props.contents : props.fallback);\n}\n\nexport function RenderChildren(props: RenderBlockProps<Block>) {\n const isArray = Array.isArray(props.block?.value);\n const isString = typeof props.block?.value === 'string';\n\n const render = () => {\n if (isArray) {\n return (<RenderBlocks blocks={props.block.value as any} />);\n } else if (isString) {\n return (<RenderText text={props.block.value as any} />);\n } else {\n return (<RenderText text={''} />);\n }\n };\n\n return render();\n};\n\nfunction RenderText(props: RenderTextProps) {\n return (<>{props.text}</>);\n};\n\n/** \n * The default render method for processing Canvas data \n * \n * @link https://www.npmjs.com/package/@contensis/canvas-react#usage\n * \n * @param data - Accepts Canvas data\n * \n * */\nexport function Renderer(props: RendererProps) {\n return (<RenderBlocks blocks={props.data} />);\n}\n\ntype AttributeProps = RenderBlockProps<Block>\n | RenderBlockPropsWithChildren<Block>\n | RenderDecoratorProps\n | RenderDecoratorPropsWithChildren;\n\nfunction getAttributes(props: AttributeProps, extra: Record<string, any> = {}) {\n const { block, ...rest } = props;\n let { children, decorator, otherDecorators, ...attributes } = rest as Record<string, any>;\n attributes = {\n id: block?.properties?.id,\n ...extra,\n ...attributes\n };\n return attributes;\n}\n\nfunction WithCaption(props: WithChildren & { caption: undefined | string }) {\n return (\n !!props.caption\n ? (\n <figure>\n {props.children}\n <figcaption>{props.caption}</figcaption>\n </figure>\n )\n : (props.children || null)\n );\n};\n\nfunction RenderBlockChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<RenderChildren block={props.block} />);\n };\n}\n\nfunction EmptyChildrenFactory<T extends Block>() {\n return function (props: RenderBlockProps<T>) {\n return (<></>);\n };\n}\n\nexport function Anchor(props: RenderBlockPropsWithChildren<AnchorBlock>) {\n const attributes = getAttributes(props);\n return (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Anchor.Children block={props.block} />} />\n </a>\n );\n}\n\nAnchor.Children = RenderBlockChildrenFactory<AnchorBlock>();\n\nexport function Asset(props: RenderBlockPropsWithChildren<AssetBlock>) {\n const contentTypeId = props?.block?.value?.sys?.contentTypeId;\n const components = useAssets();\n const AssetElement = !!contentTypeId ? components?.[contentTypeId] : undefined;\n const attributes = getAttributes(props);\n return (!!AssetElement)\n ? <AssetElement {...props} />\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Asset.Children block={props.block} />} />\n </div>\n );\n}\n\nAsset.Children = function (props: RenderBlockProps<AssetBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const entryTitle = props?.block?.value?.entryTitle || '';\n const entryDescription = props?.block?.value?.entryDescription || '';\n return (<>\n <div>\n {!!href ? <a href={href}>{entryTitle}</a> : entryTitle}\n </div>\n {!!entryDescription ? <div>{entryDescription}</div> : null}\n </>);\n};\n\nexport function Code(props: RenderBlockPropsWithChildren<CodeBlock>) {\n const attributes = getAttributes(props, {\n 'data-language': props.block?.value?.language\n });\n const codeAttributes = getAttributes(props, {\n className: `language-${props.block?.value?.language}`\n });\n return (\n <pre {...attributes}>\n <code {...codeAttributes}>\n <RenderContents contents={props.children} fallback={<Code.Children block={props.block} />} />\n </code>\n </pre>\n );\n}\n\nCode.Children = function (props: RenderBlockProps<CodeBlock>) {\n return (<>{props.block?.value?.code}</>);\n};\n\nfunction CodeWithCaption(props: RenderBlockPropsWithChildren<CodeBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Code {...props} />\n </WithCaption>\n );\n}\n\nexport function Component(props: RenderBlockPropsWithChildren<ComponentBlock>) {\n const component = props?.block.properties?.component;\n const components = useComponents();\n const ComponentElement = !!component ? components?.[component] : undefined;\n\n const value = props.block.value ? JSON.stringify(props.block.value) : '';\n const attributes = getAttributes(props, {\n className: 'component',\n 'data-component': props.block.properties?.component,\n 'data-component-value': value,\n });\n\n return (!!ComponentElement)\n ? (<ComponentElement {...props} />)\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Component.Children block={props.block} />} />\n </div>\n );\n}\n\nComponent.Children = function (props: RenderBlockProps<ComponentBlock>) {\n return (<>Component: {props.block?.properties?.component}</>);\n};\n\nexport function Divider(props: RenderBlockPropsWithChildren<DividerBlock>) {\n const attributes = getAttributes(props);\n return (<hr {...attributes} />);\n}\n\nDivider.Children = EmptyChildrenFactory<DividerBlock>();\n\nexport function Entry(props: RenderBlockPropsWithChildren<EntryBlock>) {\n const contentTypeId = props?.block?.value?.sys?.contentTypeId;\n const components = useEntries();\n const EntryElement = !!contentTypeId ? components?.[contentTypeId] : undefined;\n const attributes = getAttributes(props);\n return (!!EntryElement)\n ? <EntryElement {...props} />\n : (\n <div {...attributes}>\n <RenderContents contents={props.children} fallback={<Entry.Children block={props.block} />} />\n </div>\n );\n}\n\nEntry.Children = function (props: RenderBlockProps<EntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const entryTitle = props?.block?.value?.entryTitle || '';\n const entryDescription = props?.block?.value?.entryDescription || '';\n return (<>\n <div>\n {!!href ? <a href={href}>{entryTitle}</a> : entryTitle}\n </div>\n {!!entryDescription ? <div>{entryDescription}</div> : null}\n </>);\n};\n\nexport function FormContentType(_props: RenderBlockPropsWithChildren<FormContentTypeBlock>) {\n return null;\n}\n\nFormContentType.Children = function (_props: RenderBlockProps<FormContentTypeBlock>) {\n return null;\n};\n\nexport function Fragment(props: RenderBlockPropsWithChildren<FragmentBlock>) {\n const hasDecorators = !!props.block?.properties?.decorators?.length;\n const decorators = props.block?.properties?.decorators;\n return (\n hasDecorators\n ? (<Decorators block={props.block} decorators={decorators}></Decorators>)\n : (<RenderContents contents={props.children} fallback={<Fragment.Children block={props.block} />} />)\n );\n}\n\nFragment.Children = RenderBlockChildrenFactory<FragmentBlock>();\n\nexport function Heading(props: RenderBlockPropsWithChildren<HeadingBlock>) {\n const attributes = getAttributes(props);\n const render = () => {\n switch (props?.block?.properties?.level) {\n case 2: {\n return (\n <h2 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h2>\n );\n }\n case 3: {\n return (\n <h3 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h3>\n );\n }\n case 4: {\n return (\n <h4 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h4>\n );\n }\n case 5: {\n return (\n <h5 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h5>\n );\n }\n case 6: {\n return (\n <h6 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h6>\n );\n }\n default: {\n return (\n <h1 {...attributes}>\n <RenderContents contents={props.children} fallback={<Heading.Children block={props.block} />} />\n </h1>\n );\n }\n }\n };\n return render();\n}\n\nHeading.Children = RenderBlockChildrenFactory<HeadingBlock>();\n\nexport function Image(props: RenderBlockPropsWithChildren<ImageBlock>) {\n const src = props.block?.value?.asset?.sys?.uri;\n const attributes = getAttributes(props, {\n src,\n alt: props.block?.value?.altText,\n title: props?.block?.value?.caption,\n });\n return (<img {...attributes} />);\n}\n\nImage.Children = EmptyChildrenFactory<ImageBlock>();\n\nfunction ImageWithCaption(props: RenderBlockPropsWithChildren<ImageBlock>) {\n return (\n <WithCaption caption={props.block?.value?.caption}>\n <Image {...props} />\n </WithCaption>\n );\n}\n\nexport function InlineEntry(props: RenderBlockPropsWithChildren<InlineEntryBlock>) {\n const href = props?.block?.value?.sys?.uri;\n const attributes = getAttributes(props, {\n href\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<InlineEntry.Children block={props.block} />} />)\n );\n}\n\nInlineEntry.Children = function (props: RenderBlockProps<InlineEntryBlock>) {\n const entryTitle = props?.block?.value?.entryTitle || '';\n return (<>{entryTitle}</>);\n};\n\nexport function Link(props: RenderBlockPropsWithChildren<LinkBlock>) {\n const linkValue = props?.block?.properties?.link;\n const attributes = getAttributes(props, {\n href: linkValue?.sys?.uri,\n target: props?.block?.properties?.newTab ? '_blank' : null,\n rel: props?.block?.properties?.newTab ? 'noopener noreferrer' : null\n });\n return (!!attributes.href\n ? (\n <a {...attributes}>\n <RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />\n </a>\n )\n : (<RenderContents contents={props.children} fallback={<Link.Children block={props.block} />} />)\n );\n}\n\nLink.Children = RenderBlockChildrenFactory<LinkBlock>();\n\nexport function Liquid(props: RenderBlockPropsWithChildren<LiquidBlock>) {\n return (\n <RenderContents contents={props.children} fallback={<Liquid.Children block={props.block} />} />\n );\n}\n\nLiquid.Children = function (props: RenderBlockProps<LiquidBlock>) {\n return (<>{props.block?.value}</>);\n};\n\nexport function List(props: RenderBlockPropsWithChildren<ListBlock>) {\n const isOrdered = (props.block?.properties?.listType === 'ordered');\n const attributes = getAttributes(props, {\n start: isOrdered ? props.block?.properties?.start : null,\n });\n return (isOrdered\n ? (\n <ol {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ol>\n )\n : (\n <ul {...attributes}>\n <RenderContents contents={props.children} fallback={<List.Children block={props.block} />} />\n </ul>\n )\n );\n}\n\nList.Children = RenderBlockChildrenFactory<ListBlock>();\n\nexport function ListItem(props: RenderBlockPropsWithChildren<ListItemBlock>) {\n const attributes = getAttributes(props);\n return (\n <li {...attributes}>\n <RenderContents contents={props.children} fallback={<ListItem.Children block={props.block} />} />\n </li>\n );\n}\n\nListItem.Children = RenderBlockChildrenFactory<ListItemBlock>();\n\nexport function Panel(props: RenderBlockPropsWithChildren<PanelBlock>) {\n const attributes = getAttributes(props, {\n className: ['panel', props.block?.properties?.panelType || 'info'].join(' ')\n });\n return (\n <aside {...attributes}>\n <RenderContents contents={props.children} fallback={<Panel.Children block={props.block} />} />\n </aside>\n );\n}\n\nPanel.Children = RenderBlockChildrenFactory<PanelBlock>();\n\nexport function Paragraph(props: RenderBlockPropsWithChildren<ParagraphBlock>) {\n const attributes = getAttributes(props, {\n className: props.block?.properties?.paragraphType\n });\n return (\n <p {...attributes}>\n <RenderContents contents={props.children} fallback={<Paragraph.Children block={props.block} />} />\n </p>\n );\n}\n\nParagraph.Children = RenderBlockChildrenFactory<ParagraphBlock>();\n\n\nexport function Quote(props: RenderBlockPropsWithChildren<QuoteBlock>) {\n const attributes = getAttributes(props, {\n 'cite': props.block?.properties?.url\n });\n return (\n <blockquote {...attributes}>\n <RenderContents contents={props.children} fallback={<Quote.Children block={props.block} />} />\n </blockquote>\n );\n}\n\nQuote.Children = function (props: RenderBlockProps<QuoteBlock>) {\n const source = props.block?.properties?.source;\n const citation = props.block?.properties?.citation;\n const hasChildren = !!source || !!citation;\n return (\n hasChildren\n ? (\n <>\n <p>\n <RenderChildren block={props.block} />\n </p>\n <footer>{source} {!!citation ? (<cite>{citation}</cite>) : (<></>)}</footer>\n </>\n )\n : (<RenderChildren block={props.block} />)\n );\n};\n\n\nexport function Table(props: RenderBlockPropsWithChildren<TableBlock>) {\n const attributes = getAttributes(props);\n return (\n <table {...attributes}>\n <RenderContents contents={props.children} fallback={<Table.Children block={props.block} />} />\n </table>\n );\n}\n\nTable.Children = RenderBlockChildrenFactory<TableBlock>();\n\nexport function TableBody(props: RenderBlockPropsWithChildren<TableBodyBlock>) {\n const attributes = getAttributes(props);\n return (\n <tbody {...attributes}>\n <RenderContents contents={props.children} fallback={<TableBody.Children block={props.block} />} />\n </tbody>\n );\n}\n\nTableBody.Children = RenderBlockChildrenFactory<TableBodyBlock>();\n\nexport function TableCaption(props: RenderBlockPropsWithChildren<TableCaptionBlock>) {\n const attributes = getAttributes(props);\n return (\n <caption {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCaption.Children block={props.block} />} />\n </caption>\n );\n}\n\nTableCaption.Children = RenderBlockChildrenFactory<TableCaptionBlock>();\n\nexport function TableCell(props: RenderBlockPropsWithChildren<TableCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <td {...attributes}>\n <RenderContents contents={props.children} fallback={<TableCell.Children block={props.block} />} />\n </td>\n );\n}\n\nTableCell.Children = RenderBlockChildrenFactory<TableCellBlock>();\n\nexport function TableFooter(props: RenderBlockPropsWithChildren<TableFooterBlock>) {\n const attributes = getAttributes(props);\n return (\n <tfoot {...attributes}>\n <RenderContents contents={props.children} fallback={<TableFooter.Children block={props.block} />} />\n </tfoot>\n );\n}\n\nTableFooter.Children = RenderBlockChildrenFactory<TableFooterBlock>();\n\nexport function TableHeader(props: RenderBlockPropsWithChildren<TableHeaderBlock>) {\n const attributes = getAttributes(props);\n return (\n <thead {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeader.Children block={props.block} />} />\n </thead>\n );\n}\n\nTableHeader.Children = RenderBlockChildrenFactory<TableHeaderBlock>();\n\nexport function TableHeaderCell(props: RenderBlockPropsWithChildren<TableHeaderCellBlock>) {\n const attributes = getAttributes(props);\n return (\n <th {...attributes}>\n <RenderContents contents={props.children} fallback={<TableHeaderCell.Children block={props.block} />} />\n </th>\n );\n}\n\nTableHeaderCell.Children = RenderBlockChildrenFactory<TableHeaderCellBlock>();\n\nexport function TableRow(props: RenderBlockPropsWithChildren<TableRowBlock>) {\n const attributes = getAttributes(props);\n return (\n <tr {...attributes}>\n <RenderContents contents={props.children} fallback={<TableRow.Children block={props.block} />} />\n </tr>\n );\n}\n\nTableRow.Children = RenderBlockChildrenFactory<TableRowBlock>();\n\n\nfunction Decorators(props: DecoratorProps) {\n const decorators = useDecorators();\n const remainingDecorators = !!props.decorators ? [...props.decorators] : undefined;\n const firstDecorator = !!remainingDecorators ? remainingDecorators.shift() : undefined;\n const DecoratorComponent = !!firstDecorator ? decorators[firstDecorator] : undefined;\n\n const render = () => {\n if (!!DecoratorComponent) {\n return (<DecoratorComponent block={props.block} decorator={firstDecorator} otherDecorators={remainingDecorators} />);\n } else if (firstDecorator) {\n return (<Decorators block={props.block} decorators={remainingDecorators} />);\n } else {\n return (<Fragment.Children block={props.block} />);\n }\n };\n\n return render();\n}\n\nfunction DecoratorChildren(props: RenderDecoratorPropsWithChildren) {\n return (<Decorators block={props.block} decorators={props.otherDecorators} />)\n}\n\nexport function Abbreviation(props: RenderDecoratorPropsWithChildren) { \n const title = props?.block?.properties?.abbreviation?.title;\n const attributes = getAttributes(props, { title });\n return (\n <abbr {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </abbr>\n );\n}\n\nAbbreviation.Children = DecoratorChildren;\n\nexport function InlineCode(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <code {...attributes}>\n <RenderContents contents={props.children} fallback={<InlineCode.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </code>\n );\n}\n\nInlineCode.Children = DecoratorChildren;\n\nexport function Delete(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <del {...attributes}>\n <RenderContents contents={props.children} fallback={<Delete.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </del>\n );\n}\n\nDelete.Children = DecoratorChildren;\n\nexport function Emphasis(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <em {...attributes}>\n <RenderContents contents={props.children} fallback={<Emphasis.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </em>\n );\n}\n\nEmphasis.Children = DecoratorChildren;\n\nexport function Insert(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <ins {...attributes}>\n <RenderContents contents={props.children} fallback={<Insert.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </ins>\n );\n}\n\nInsert.Children = DecoratorChildren;\n\nexport function Keyboard(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <kbd {...attributes}>\n <RenderContents contents={props.children} fallback={<Keyboard.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </kbd>\n );\n}\n\nKeyboard.Children = DecoratorChildren;\n\nexport function LineBreak(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (<br {...attributes} />);\n}\n\nLineBreak.Children = function (props: RenderDecoratorPropsWithChildren) {\n return (<></>)\n}\n\nexport function Mark(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <mark {...attributes}>\n <RenderContents contents={props.children} fallback={<Mark.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </mark>\n );\n}\n\nMark.Children = DecoratorChildren;\n\nexport function Strong(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <strong {...attributes}>\n <RenderContents contents={props.children} fallback={<Strong.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </strong>\n );\n}\n\nStrong.Children = DecoratorChildren;\n\nexport function Strikethrough(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <s {...attributes}>\n <RenderContents contents={props.children} fallback={<Strikethrough.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </s>\n );\n}\n\nStrikethrough.Children = DecoratorChildren;\n\nexport function Subscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sub {...attributes}>\n <RenderContents contents={props.children} fallback={<Subscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sub>\n );\n}\n\nSubscript.Children = DecoratorChildren;\n\nexport function Superscript(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <sup {...attributes}>\n <RenderContents contents={props.children} fallback={<Superscript.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </sup>\n );\n}\n\nSuperscript.Children = DecoratorChildren;\n\nexport function Underline(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <u {...attributes}>\n <RenderContents contents={props.children} fallback={<Underline.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </u>\n );\n}\n\nUnderline.Children = DecoratorChildren;\n\nexport function Variable(props: RenderDecoratorPropsWithChildren) {\n const attributes = getAttributes(props);\n return (\n <var {...attributes}>\n <RenderContents contents={props.children} fallback={<Variable.Children block={props.block} decorator={props.decorator} otherDecorators={props.otherDecorators} />} />\n </var>\n );\n}\n\nVariable.Children = DecoratorChildren;\n\nconst BLOCK_RENDERERS: BlockRenderers = {\n '_anchor': Anchor,\n '_asset': Asset,\n '_code': CodeWithCaption,\n '_component': Component,\n '_divider': Divider,\n '_entry': Entry,\n '_formContentType': FormContentType,\n '_fragment': Fragment,\n '_heading': Heading,\n '_image': ImageWithCaption,\n '_inlineEntry': InlineEntry,\n '_link': Link,\n '_liquid': Liquid,\n '_list': List,\n '_listItem': ListItem,\n '_panel': Panel,\n '_paragraph': Paragraph,\n '_quote': Quote,\n '_table': Table,\n '_tableBody': TableBody,\n '_tableCaption': TableCaption,\n '_tableCell': TableCell,\n '_tableFooter': TableFooter,\n '_tableHeader': TableHeader,\n '_tableHeaderCell': TableHeaderCell,\n '_tableRow': TableRow,\n};\n\nconst DECORATOR_RENDERERS: DecoratorRenderers = {\n 'abbreviation': Abbreviation,\n 'code': InlineCode,\n 'delete': Delete,\n 'emphasis': Emphasis,\n 'insert': Insert,\n 'keyboard': Keyboard,\n 'linebreak': LineBreak,\n 'mark': Mark,\n 'strikethrough': Strikethrough,\n 'strong': Strong,\n 'subscript': Subscript,\n 'superscript': Superscript,\n 'underline': Underline,\n 'variable': Variable\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAoF,eAAe,kBAAkB;AAwFrH,IAAM,kBAAkB,cAAoC,CAAC,CAAC;AAiB9D,SAAS,sBAAsB,OAAqC;AAEvE,QAAM,iBAAiB,MAAM;AAC7B,QAAM,SAAS,OAAO,KAAK,eAAe,EACrC,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,YAAY;AAClB,UAAM,YAAgB,iDAAiB,eAAc,gBAAgB,SAAS;AAC9E,IAAC,KAAa,SAAS,IAAI;AAC3B,WAAO;AAAA,EACX,GAAG,CAAC,CAAmB;AAE3B,QAAM,qBAAqB,MAAM;AACjC,QAAM,aAAa,OAAO,KAAK,mBAAmB,EAC7C,OAAO,CAAC,MAAM,SAAS;AACpB,UAAM,gBAAgB;AACtB,SAAK,aAAa,KAAI,yDAAqB,mBAAkB,oBAAoB,aAAa;AAC9F,WAAO;AAAA,EACX,GAAG,CAAC,CAAuB;AAE/B,QAAM,QAAQ,EAAE,QAAQ,YAAY,YAAY,MAA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