@contember/react-richtext-renderer 1.3.0-alpha.15 → 1.3.0-alpha.17
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/development/components/RichText.cjs +12 -4
- package/dist/development/components/RichText.cjs.map +1 -1
- package/dist/development/components/RichText.js +12 -4
- package/dist/development/components/RichText.js.map +1 -1
- package/dist/development/components/RichTextBlocksRenderer.cjs +16 -4
- package/dist/development/components/RichTextBlocksRenderer.cjs.map +1 -1
- package/dist/development/components/RichTextBlocksRenderer.js +16 -4
- package/dist/development/components/RichTextBlocksRenderer.js.map +1 -1
- package/dist/development/components/RichTextFieldRenderer.cjs +11 -3
- package/dist/development/components/RichTextFieldRenderer.cjs.map +1 -1
- package/dist/development/components/RichTextFieldRenderer.js +11 -3
- package/dist/development/components/RichTextFieldRenderer.js.map +1 -1
- package/dist/development/components/RichTextRenderer.cjs +11 -3
- package/dist/development/components/RichTextRenderer.cjs.map +1 -1
- package/dist/development/components/RichTextRenderer.js +11 -3
- package/dist/development/components/RichTextRenderer.js.map +1 -1
- package/dist/development/internal/components/ElementRenderer.cjs +6 -2
- package/dist/development/internal/components/ElementRenderer.cjs.map +1 -1
- package/dist/development/internal/components/ElementRenderer.js +6 -2
- package/dist/development/internal/components/ElementRenderer.js.map +1 -1
- package/dist/development/internal/components/LeafRenderer.cjs +6 -2
- package/dist/development/internal/components/LeafRenderer.cjs.map +1 -1
- package/dist/development/internal/components/LeafRenderer.js +6 -2
- package/dist/development/internal/components/LeafRenderer.js.map +1 -1
- package/dist/development/internal/components/RenderElementFallback.cjs +100 -21
- package/dist/development/internal/components/RenderElementFallback.cjs.map +1 -1
- package/dist/development/internal/components/RenderElementFallback.js +100 -21
- package/dist/development/internal/components/RenderElementFallback.js.map +1 -1
- package/dist/development/internal/components/RenderLeafFallback.cjs +47 -11
- package/dist/development/internal/components/RenderLeafFallback.cjs.map +1 -1
- package/dist/development/internal/components/RenderLeafFallback.js +47 -11
- package/dist/development/internal/components/RenderLeafFallback.js.map +1 -1
- package/dist/development/internal/renderChildren.cjs +17 -5
- package/dist/development/internal/renderChildren.cjs.map +1 -1
- package/dist/development/internal/renderChildren.js +17 -5
- package/dist/development/internal/renderChildren.js.map +1 -1
- package/dist/development/internal/useReferenceMetadata.cjs +5 -0
- package/dist/development/internal/useReferenceMetadata.cjs.map +1 -1
- package/dist/development/internal/useReferenceMetadata.js +5 -0
- package/dist/development/internal/useReferenceMetadata.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const renderChildren = require("../internal/renderChildren.cjs");
|
|
6
6
|
const RichText = ({
|
|
7
7
|
blocks,
|
|
8
8
|
renderElement,
|
|
9
9
|
renderLeaf,
|
|
10
|
-
renderBlock = ({ children }) => /* @__PURE__ */
|
|
10
|
+
renderBlock = ({ children }) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children }, void 0, false, {
|
|
11
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichText.tsx",
|
|
12
|
+
lineNumber: 28,
|
|
13
|
+
columnNumber: 34
|
|
14
|
+
}, void 0),
|
|
11
15
|
attributeNamePrefix,
|
|
12
16
|
referenceRenderers,
|
|
13
17
|
undefinedReferenceHandler
|
|
14
18
|
}) => {
|
|
15
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: blocks.map((block, i) => react.createElement(
|
|
16
20
|
renderBlock,
|
|
17
21
|
{
|
|
18
22
|
block,
|
|
@@ -26,7 +30,11 @@ const RichText = ({
|
|
|
26
30
|
attributeNamePrefix,
|
|
27
31
|
undefinedReferenceHandler
|
|
28
32
|
}, block)
|
|
29
|
-
)) }
|
|
33
|
+
)) }, void 0, false, {
|
|
34
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichText.tsx",
|
|
35
|
+
lineNumber: 34,
|
|
36
|
+
columnNumber: 3
|
|
37
|
+
}, void 0);
|
|
30
38
|
};
|
|
31
39
|
exports.RichText = RichText;
|
|
32
40
|
//# sourceMappingURL=RichText.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.cjs","sources":["../../../src/components/RichText.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport { renderChildren } from '../internal/renderChildren'\nimport type { RichTextBlock } from '../types'\nimport { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\n\nexport type RichTextProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& {\n\t\tblocks: RichTextBlock<CustomElements, CustomLeaves>[]\n\t}\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts normalized decoded RichText blocks and renders them using the provided renderers.\n * To use decoders, use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead.\n *\n * @group Content rendering\n */\nexport const RichText = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tblocks,\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n}: RichTextProps<CustomElements, CustomLeaves>) => {\n\treturn (\n\t\t<>\n\t\t\t{blocks.map((block, i) => (\n\t\t\t\tcreateElement(\n\t\t\t\t\trenderBlock, {\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tkey: block.id ?? i,\n\t\t\t\t\t}, renderChildren(block.content.children, {\n\t\t\t\t\t\treferenceRenderers,\n\t\t\t\t\t\trenderBlock,\n\t\t\t\t\t\trenderLeaf,\n\t\t\t\t\t\trenderElement,\n\t\t\t\t\t\tattributeNamePrefix,\n\t\t\t\t\t\tundefinedReferenceHandler,\n\t\t\t\t\t}, block),\n\t\t\t\t)\n\t\t\t))}\n\t\t</>\n\t)\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"RichText.cjs","sources":["../../../src/components/RichText.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport { renderChildren } from '../internal/renderChildren'\nimport type { RichTextBlock } from '../types'\nimport { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\n\nexport type RichTextProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& {\n\t\tblocks: RichTextBlock<CustomElements, CustomLeaves>[]\n\t}\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts normalized decoded RichText blocks and renders them using the provided renderers.\n * To use decoders, use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead.\n *\n * @group Content rendering\n */\nexport const RichText = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tblocks,\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n}: RichTextProps<CustomElements, CustomLeaves>) => {\n\treturn (\n\t\t<>\n\t\t\t{blocks.map((block, i) => (\n\t\t\t\tcreateElement(\n\t\t\t\t\trenderBlock, {\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tkey: block.id ?? i,\n\t\t\t\t\t}, renderChildren(block.content.children, {\n\t\t\t\t\t\treferenceRenderers,\n\t\t\t\t\t\trenderBlock,\n\t\t\t\t\t\trenderLeaf,\n\t\t\t\t\t\trenderElement,\n\t\t\t\t\t\tattributeNamePrefix,\n\t\t\t\t\t\tundefinedReferenceHandler,\n\t\t\t\t\t}, block),\n\t\t\t\t)\n\t\t\t))}\n\t\t</>\n\t)\n}\n"],"names":["this","jsxDEV","Fragment","createElement","renderChildren"],"mappings":";;;;;AAoBO,MAAM,WAAW,CAGtB;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,qEAAS,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAY,GAAAA,MAAA;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AACD,MAAmD;AAClD,SAEGC,8BAAA,OAAAC,cAAA,UAAA,EAAA,UAAA,OAAO,IAAI,CAAC,OAAO,MACnBC,MAAA;AAAA,IACC;AAAA,IAAa;AAAA,MACZ;AAAA,MACA,KAAK,MAAM,MAAM;AAAA,IAClB;AAAA,IAAGC,8BAAe,MAAM,QAAQ,UAAU;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,OACE,KAAK;AAAA,EAAA,CAET,EAfF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAgBA,GAAAJ,MAAA;AAEF;;"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { renderChildren } from "../internal/renderChildren.js";
|
|
4
4
|
const RichText = ({
|
|
5
5
|
blocks,
|
|
6
6
|
renderElement,
|
|
7
7
|
renderLeaf,
|
|
8
|
-
renderBlock = ({ children }) => /* @__PURE__ */
|
|
8
|
+
renderBlock = ({ children }) => /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
|
|
9
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichText.tsx",
|
|
10
|
+
lineNumber: 28,
|
|
11
|
+
columnNumber: 34
|
|
12
|
+
}, void 0),
|
|
9
13
|
attributeNamePrefix,
|
|
10
14
|
referenceRenderers,
|
|
11
15
|
undefinedReferenceHandler
|
|
12
16
|
}) => {
|
|
13
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsxDEV(Fragment, { children: blocks.map((block, i) => createElement(
|
|
14
18
|
renderBlock,
|
|
15
19
|
{
|
|
16
20
|
block,
|
|
@@ -24,7 +28,11 @@ const RichText = ({
|
|
|
24
28
|
attributeNamePrefix,
|
|
25
29
|
undefinedReferenceHandler
|
|
26
30
|
}, block)
|
|
27
|
-
)) }
|
|
31
|
+
)) }, void 0, false, {
|
|
32
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichText.tsx",
|
|
33
|
+
lineNumber: 34,
|
|
34
|
+
columnNumber: 3
|
|
35
|
+
}, void 0);
|
|
28
36
|
};
|
|
29
37
|
export {
|
|
30
38
|
RichText
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sources":["../../../src/components/RichText.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport { renderChildren } from '../internal/renderChildren'\nimport type { RichTextBlock } from '../types'\nimport { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\n\nexport type RichTextProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& {\n\t\tblocks: RichTextBlock<CustomElements, CustomLeaves>[]\n\t}\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts normalized decoded RichText blocks and renders them using the provided renderers.\n * To use decoders, use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead.\n *\n * @group Content rendering\n */\nexport const RichText = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tblocks,\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n}: RichTextProps<CustomElements, CustomLeaves>) => {\n\treturn (\n\t\t<>\n\t\t\t{blocks.map((block, i) => (\n\t\t\t\tcreateElement(\n\t\t\t\t\trenderBlock, {\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tkey: block.id ?? i,\n\t\t\t\t\t}, renderChildren(block.content.children, {\n\t\t\t\t\t\treferenceRenderers,\n\t\t\t\t\t\trenderBlock,\n\t\t\t\t\t\trenderLeaf,\n\t\t\t\t\t\trenderElement,\n\t\t\t\t\t\tattributeNamePrefix,\n\t\t\t\t\t\tundefinedReferenceHandler,\n\t\t\t\t\t}, block),\n\t\t\t\t)\n\t\t\t))}\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;AAoBO,MAAM,WAAW,CAGtB;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"RichText.js","sources":["../../../src/components/RichText.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport { renderChildren } from '../internal/renderChildren'\nimport type { RichTextBlock } from '../types'\nimport { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\n\nexport type RichTextProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& {\n\t\tblocks: RichTextBlock<CustomElements, CustomLeaves>[]\n\t}\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts normalized decoded RichText blocks and renders them using the provided renderers.\n * To use decoders, use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead.\n *\n * @group Content rendering\n */\nexport const RichText = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tblocks,\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n}: RichTextProps<CustomElements, CustomLeaves>) => {\n\treturn (\n\t\t<>\n\t\t\t{blocks.map((block, i) => (\n\t\t\t\tcreateElement(\n\t\t\t\t\trenderBlock, {\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\tkey: block.id ?? i,\n\t\t\t\t\t}, renderChildren(block.content.children, {\n\t\t\t\t\t\treferenceRenderers,\n\t\t\t\t\t\trenderBlock,\n\t\t\t\t\t\trenderLeaf,\n\t\t\t\t\t\trenderElement,\n\t\t\t\t\t\tattributeNamePrefix,\n\t\t\t\t\t\tundefinedReferenceHandler,\n\t\t\t\t\t}, block),\n\t\t\t\t)\n\t\t\t))}\n\t\t</>\n\t)\n}\n"],"names":["this"],"mappings":";;;AAoBO,MAAM,WAAW,CAGtB;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,yCAAS,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAY,GAAAA,MAAA;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AACD,MAAmD;AAClD,SAEG,uBAAA,UAAA,EAAA,UAAA,OAAO,IAAI,CAAC,OAAO,MACnB;AAAA,IACC;AAAA,IAAa;AAAA,MACZ;AAAA,MACA,KAAK,MAAM,MAAM;AAAA,IAClB;AAAA,IAAG,eAAe,MAAM,QAAQ,UAAU;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,OACE,KAAK;AAAA,EAAA,CAET,EAfF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAgBA,GAAAA,MAAA;AAEF;"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const RichText = require("./RichText.cjs");
|
|
5
5
|
const useRichTextBlocksSource = require("../hooks/useRichTextBlocksSource.cjs");
|
|
6
6
|
const RichTextBlocksRenderer = ({
|
|
7
7
|
renderElement,
|
|
8
8
|
renderLeaf,
|
|
9
|
-
renderBlock = ({ children }) => /* @__PURE__ */
|
|
9
|
+
renderBlock = ({ children }) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children }, void 0, false, {
|
|
10
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextBlocksRenderer.tsx",
|
|
11
|
+
lineNumber: 22,
|
|
12
|
+
columnNumber: 34
|
|
13
|
+
}, void 0),
|
|
10
14
|
attributeNamePrefix,
|
|
11
15
|
referenceRenderers,
|
|
12
16
|
undefinedReferenceHandler,
|
|
13
17
|
...props
|
|
14
18
|
}) => {
|
|
15
19
|
const blocks = useRichTextBlocksSource.useRichTextBlocksSource(props);
|
|
16
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
17
21
|
RichText.RichText,
|
|
18
22
|
{
|
|
19
23
|
blocks,
|
|
@@ -23,7 +27,15 @@ const RichTextBlocksRenderer = ({
|
|
|
23
27
|
referenceRenderers,
|
|
24
28
|
undefinedReferenceHandler,
|
|
25
29
|
attributeNamePrefix
|
|
26
|
-
}
|
|
30
|
+
},
|
|
31
|
+
void 0,
|
|
32
|
+
false,
|
|
33
|
+
{
|
|
34
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextBlocksRenderer.tsx",
|
|
35
|
+
lineNumber: 30,
|
|
36
|
+
columnNumber: 3
|
|
37
|
+
},
|
|
38
|
+
void 0
|
|
27
39
|
);
|
|
28
40
|
};
|
|
29
41
|
exports.RichTextBlocksRenderer = RichTextBlocksRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextBlocksRenderer.cjs","sources":["../../../src/components/RichTextBlocksRenderer.tsx"],"sourcesContent":["import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { RichText } from './RichText'\nimport { useRichTextBlocksSource } from '../hooks'\n\nexport type { RichTextBlockSource }\n\nexport type RichTextBlocksRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> =\n\t& RichTextBlockSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText blocks and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextBlocksRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n\t...props\n}: RichTextBlocksRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextBlocksSource<CustomElements, CustomLeaves>(props)\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\treferenceRenderers={referenceRenderers}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t/>\n\t)\n}\n"],"names":["useRichTextBlocksSource","
|
|
1
|
+
{"version":3,"file":"RichTextBlocksRenderer.cjs","sources":["../../../src/components/RichTextBlocksRenderer.tsx"],"sourcesContent":["import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { RichText } from './RichText'\nimport { useRichTextBlocksSource } from '../hooks'\n\nexport type { RichTextBlockSource }\n\nexport type RichTextBlocksRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> =\n\t& RichTextBlockSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText blocks and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextBlocksRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n\t...props\n}: RichTextBlocksRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextBlocksSource<CustomElements, CustomLeaves>(props)\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\treferenceRenderers={referenceRenderers}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t/>\n\t)\n}\n"],"names":["this","useRichTextBlocksSource","jsxDEV","RichText"],"mappings":";;;;;AAeO,MAAM,yBAAyB,CAGpC;AAAA,EACD;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,qEAAS,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAY,GAAAA,MAAA;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAiE;AAC1D,QAAA,SAASC,gDAAsD,KAAK;AAEzE,SAAAC,8BAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAPD;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAH;AAAAA,EAAA;AAUF;;"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
2
2
|
import { RichText } from "./RichText.js";
|
|
3
3
|
import { useRichTextBlocksSource } from "../hooks/useRichTextBlocksSource.js";
|
|
4
4
|
const RichTextBlocksRenderer = ({
|
|
5
5
|
renderElement,
|
|
6
6
|
renderLeaf,
|
|
7
|
-
renderBlock = ({ children }) => /* @__PURE__ */
|
|
7
|
+
renderBlock = ({ children }) => /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
|
|
8
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextBlocksRenderer.tsx",
|
|
9
|
+
lineNumber: 22,
|
|
10
|
+
columnNumber: 34
|
|
11
|
+
}, void 0),
|
|
8
12
|
attributeNamePrefix,
|
|
9
13
|
referenceRenderers,
|
|
10
14
|
undefinedReferenceHandler,
|
|
11
15
|
...props
|
|
12
16
|
}) => {
|
|
13
17
|
const blocks = useRichTextBlocksSource(props);
|
|
14
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsxDEV(
|
|
15
19
|
RichText,
|
|
16
20
|
{
|
|
17
21
|
blocks,
|
|
@@ -21,7 +25,15 @@ const RichTextBlocksRenderer = ({
|
|
|
21
25
|
referenceRenderers,
|
|
22
26
|
undefinedReferenceHandler,
|
|
23
27
|
attributeNamePrefix
|
|
24
|
-
}
|
|
28
|
+
},
|
|
29
|
+
void 0,
|
|
30
|
+
false,
|
|
31
|
+
{
|
|
32
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextBlocksRenderer.tsx",
|
|
33
|
+
lineNumber: 30,
|
|
34
|
+
columnNumber: 3
|
|
35
|
+
},
|
|
36
|
+
void 0
|
|
25
37
|
);
|
|
26
38
|
};
|
|
27
39
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextBlocksRenderer.js","sources":["../../../src/components/RichTextBlocksRenderer.tsx"],"sourcesContent":["import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { RichText } from './RichText'\nimport { useRichTextBlocksSource } from '../hooks'\n\nexport type { RichTextBlockSource }\n\nexport type RichTextBlocksRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> =\n\t& RichTextBlockSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText blocks and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextBlocksRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n\t...props\n}: RichTextBlocksRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextBlocksSource<CustomElements, CustomLeaves>(props)\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\treferenceRenderers={referenceRenderers}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t/>\n\t)\n}\n"],"names":[],"mappings":";;;AAeO,MAAM,yBAAyB,CAGpC;AAAA,EACD;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"RichTextBlocksRenderer.js","sources":["../../../src/components/RichTextBlocksRenderer.tsx"],"sourcesContent":["import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { RichText } from './RichText'\nimport { useRichTextBlocksSource } from '../hooks'\n\nexport type { RichTextBlockSource }\n\nexport type RichTextBlocksRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> =\n\t& RichTextBlockSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText blocks and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextBlocksRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderElement,\n\trenderLeaf,\n\trenderBlock = ({ children }) => <>{children}</>,\n\tattributeNamePrefix,\n\treferenceRenderers,\n\tundefinedReferenceHandler,\n\t...props\n}: RichTextBlocksRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextBlocksSource<CustomElements, CustomLeaves>(props)\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\treferenceRenderers={referenceRenderers}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t/>\n\t)\n}\n"],"names":["this"],"mappings":";;;AAeO,MAAM,yBAAyB,CAGpC;AAAA,EACD;AAAA,EACA;AAAA,EACA,cAAc,CAAC,EAAE,SAAS,yCAAS,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAY,GAAAA,MAAA;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAiE;AAC1D,QAAA,SAAS,wBAAsD,KAAK;AAEzE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAPD;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA;AAUF;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const RichText = require("./RichText.cjs");
|
|
5
5
|
const useRichTextFieldSource = require("../hooks/useRichTextFieldSource.cjs");
|
|
6
6
|
const RichTextFieldRenderer = ({
|
|
@@ -12,7 +12,7 @@ const RichTextFieldRenderer = ({
|
|
|
12
12
|
...source
|
|
13
13
|
}) => {
|
|
14
14
|
const blocks = useRichTextFieldSource.useRichTextFieldSource(source);
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
16
16
|
RichText.RichText,
|
|
17
17
|
{
|
|
18
18
|
blocks,
|
|
@@ -21,7 +21,15 @@ const RichTextFieldRenderer = ({
|
|
|
21
21
|
renderBlock,
|
|
22
22
|
attributeNamePrefix,
|
|
23
23
|
undefinedReferenceHandler
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
void 0,
|
|
26
|
+
false,
|
|
27
|
+
{
|
|
28
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextFieldRenderer.tsx",
|
|
29
|
+
lineNumber: 33,
|
|
30
|
+
columnNumber: 3
|
|
31
|
+
},
|
|
32
|
+
void 0
|
|
25
33
|
);
|
|
26
34
|
};
|
|
27
35
|
exports.RichTextFieldRenderer = RichTextFieldRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextFieldRenderer.cjs","sources":["../../../src/components/RichTextFieldRenderer.tsx"],"sourcesContent":["import { RichText } from './RichText'\nimport { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { useRichTextFieldSource } from '../hooks'\n\nexport type { RichTextFieldSource }\n\nexport type RichTextFieldRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& RichTextFieldSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText field source and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextFieldRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderLeaf,\n\trenderBlock,\n\trenderElement,\n\tattributeNamePrefix,\n\tundefinedReferenceHandler,\n\t...source\n}: RichTextFieldRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextFieldSource(source)\n\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t/>\n\t)\n}\n"],"names":["useRichTextFieldSource","
|
|
1
|
+
{"version":3,"file":"RichTextFieldRenderer.cjs","sources":["../../../src/components/RichTextFieldRenderer.tsx"],"sourcesContent":["import { RichText } from './RichText'\nimport { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { useRichTextFieldSource } from '../hooks'\n\nexport type { RichTextFieldSource }\n\nexport type RichTextFieldRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& RichTextFieldSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText field source and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextFieldRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderLeaf,\n\trenderBlock,\n\trenderElement,\n\tattributeNamePrefix,\n\tundefinedReferenceHandler,\n\t...source\n}: RichTextFieldRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextFieldSource(source)\n\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t/>\n\t)\n}\n"],"names":["useRichTextFieldSource","jsxDEV","RichText","this"],"mappings":";;;;;AAkBO,MAAM,wBAAwB,CAGnC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAgE;AACzD,QAAA,SAASA,8CAAuB,MAAM;AAG3C,SAAAC,8BAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAND;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA;AASF;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { RichText } from "./RichText.js";
|
|
3
3
|
import { useRichTextFieldSource } from "../hooks/useRichTextFieldSource.js";
|
|
4
4
|
const RichTextFieldRenderer = ({
|
|
@@ -10,7 +10,7 @@ const RichTextFieldRenderer = ({
|
|
|
10
10
|
...source
|
|
11
11
|
}) => {
|
|
12
12
|
const blocks = useRichTextFieldSource(source);
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsxDEV(
|
|
14
14
|
RichText,
|
|
15
15
|
{
|
|
16
16
|
blocks,
|
|
@@ -19,7 +19,15 @@ const RichTextFieldRenderer = ({
|
|
|
19
19
|
renderBlock,
|
|
20
20
|
attributeNamePrefix,
|
|
21
21
|
undefinedReferenceHandler
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
void 0,
|
|
24
|
+
false,
|
|
25
|
+
{
|
|
26
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextFieldRenderer.tsx",
|
|
27
|
+
lineNumber: 33,
|
|
28
|
+
columnNumber: 3
|
|
29
|
+
},
|
|
30
|
+
void 0
|
|
23
31
|
);
|
|
24
32
|
};
|
|
25
33
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextFieldRenderer.js","sources":["../../../src/components/RichTextFieldRenderer.tsx"],"sourcesContent":["import { RichText } from './RichText'\nimport { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { useRichTextFieldSource } from '../hooks'\n\nexport type { RichTextFieldSource }\n\nexport type RichTextFieldRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& RichTextFieldSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText field source and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextFieldRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderLeaf,\n\trenderBlock,\n\trenderElement,\n\tattributeNamePrefix,\n\tundefinedReferenceHandler,\n\t...source\n}: RichTextFieldRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextFieldSource(source)\n\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t/>\n\t)\n}\n"],"names":[],"mappings":";;;AAkBO,MAAM,wBAAwB,CAGnC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAgE;AACzD,QAAA,SAAS,uBAAuB,MAAM;AAG3C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"RichTextFieldRenderer.js","sources":["../../../src/components/RichTextFieldRenderer.tsx"],"sourcesContent":["import { RichText } from './RichText'\nimport { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types'\nimport { useRichTextFieldSource } from '../hooks'\n\nexport type { RichTextFieldSource }\n\nexport type RichTextFieldRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t& RichTextFieldSource<CustomElements, CustomLeaves>\n\t& RichTextRenderingOptions<CustomElements, CustomLeaves>\n\n/**\n * Accepts raw RichText field source and renders them using the provided renderers.\n *\n * @group Content rendering\n */\nexport const RichTextFieldRenderer = <\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\trenderLeaf,\n\trenderBlock,\n\trenderElement,\n\tattributeNamePrefix,\n\tundefinedReferenceHandler,\n\t...source\n}: RichTextFieldRendererProps<CustomElements, CustomLeaves>) => {\n\tconst blocks = useRichTextFieldSource(source)\n\n\treturn (\n\t\t<RichText<CustomElements, CustomLeaves>\n\t\t\tblocks={blocks}\n\t\t\trenderElement={renderElement}\n\t\t\trenderLeaf={renderLeaf}\n\t\t\trenderBlock={renderBlock}\n\t\t\tattributeNamePrefix={attributeNamePrefix}\n\t\t\tundefinedReferenceHandler={undefinedReferenceHandler}\n\t\t/>\n\t)\n}\n"],"names":["this"],"mappings":";;;AAkBO,MAAM,wBAAwB,CAGnC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAgE;AACzD,QAAA,SAAS,uBAAuB,MAAM;AAG3C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAND;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA;AASF;"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const RichTextFieldRenderer = require("./RichTextFieldRenderer.cjs");
|
|
6
6
|
const RichTextBlocksRenderer = require("./RichTextBlocksRenderer.cjs");
|
|
7
7
|
const RichTextRenderer = react.memo(function RichTextRenderer2(props) {
|
|
8
8
|
if ("source" in props) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(RichTextFieldRenderer.RichTextFieldRenderer, { ...props }, void 0, false, {
|
|
10
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextRenderer.tsx",
|
|
11
|
+
lineNumber: 25,
|
|
12
|
+
columnNumber: 10
|
|
13
|
+
}, this);
|
|
10
14
|
}
|
|
11
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(RichTextBlocksRenderer.RichTextBlocksRenderer, { ...props }, void 0, false, {
|
|
16
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextRenderer.tsx",
|
|
17
|
+
lineNumber: 28,
|
|
18
|
+
columnNumber: 9
|
|
19
|
+
}, this);
|
|
12
20
|
});
|
|
13
21
|
exports.RichTextRenderer = RichTextRenderer;
|
|
14
22
|
//# sourceMappingURL=RichTextRenderer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextRenderer.cjs","sources":["../../../src/components/RichTextRenderer.tsx"],"sourcesContent":["import { memo, ReactElement } from 'react'\nimport type { RichTextElement } from '../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../types/structure/RichTextLeaf'\nimport { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer'\nimport { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer'\n\n\nexport type RichTextRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t| RichTextFieldRendererProps<CustomElements, CustomLeaves>\n\t| RichTextBlocksRendererProps<CustomElements, CustomLeaves>\n\n/**\n * @deprecated Use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead, or directly use `RichText`.\n * @group Content rendering\n */\nexport const RichTextRenderer = memo(function RichTextRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>(props: RichTextRendererProps<CustomElements, CustomLeaves>) {\n\n\tif ('source' in props) {\n\t\treturn <RichTextFieldRenderer<CustomElements, CustomLeaves> {...props} />\n\t}\n\n\treturn <RichTextBlocksRenderer<CustomElements, CustomLeaves> {...props} />\n}) as <CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf>(\n\tprops: RichTextRendererProps<CustomElements, CustomLeaves>,\n) => ReactElement\n"],"names":["memo","RichTextRenderer","
|
|
1
|
+
{"version":3,"file":"RichTextRenderer.cjs","sources":["../../../src/components/RichTextRenderer.tsx"],"sourcesContent":["import { memo, ReactElement } from 'react'\nimport type { RichTextElement } from '../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../types/structure/RichTextLeaf'\nimport { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer'\nimport { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer'\n\n\nexport type RichTextRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t| RichTextFieldRendererProps<CustomElements, CustomLeaves>\n\t| RichTextBlocksRendererProps<CustomElements, CustomLeaves>\n\n/**\n * @deprecated Use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead, or directly use `RichText`.\n * @group Content rendering\n */\nexport const RichTextRenderer = memo(function RichTextRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>(props: RichTextRendererProps<CustomElements, CustomLeaves>) {\n\n\tif ('source' in props) {\n\t\treturn <RichTextFieldRenderer<CustomElements, CustomLeaves> {...props} />\n\t}\n\n\treturn <RichTextBlocksRenderer<CustomElements, CustomLeaves> {...props} />\n}) as <CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf>(\n\tprops: RichTextRendererProps<CustomElements, CustomLeaves>,\n) => ReactElement\n"],"names":["memo","RichTextRenderer","jsxDEV","RichTextFieldRenderer","RichTextBlocksRenderer"],"mappings":";;;;;;AAkBO,MAAM,mBAAmBA,MAAA,KAAK,SAASC,kBAG5C,OAA4D;AAE7D,MAAI,YAAY,OAAO;AACf,WAAAC,8BAAAA,OAACC,sBAAAA,uBAAqD,EAAA,GAAG,MAAzD,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAgE,GAAA,IAAA;AAAA,EACxE;AAEO,SAAAD,8BAAAA,OAACE,uBAAAA,wBAAsD,EAAA,GAAG,MAA1D,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAiE,GAAA,IAAA;AACzE,CAAC;;"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { memo } from "react";
|
|
3
3
|
import { RichTextFieldRenderer } from "./RichTextFieldRenderer.js";
|
|
4
4
|
import { RichTextBlocksRenderer } from "./RichTextBlocksRenderer.js";
|
|
5
5
|
const RichTextRenderer = memo(function RichTextRenderer2(props) {
|
|
6
6
|
if ("source" in props) {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsxDEV(RichTextFieldRenderer, { ...props }, void 0, false, {
|
|
8
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextRenderer.tsx",
|
|
9
|
+
lineNumber: 25,
|
|
10
|
+
columnNumber: 10
|
|
11
|
+
}, this);
|
|
8
12
|
}
|
|
9
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsxDEV(RichTextBlocksRenderer, { ...props }, void 0, false, {
|
|
14
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/components/RichTextRenderer.tsx",
|
|
15
|
+
lineNumber: 28,
|
|
16
|
+
columnNumber: 9
|
|
17
|
+
}, this);
|
|
10
18
|
});
|
|
11
19
|
export {
|
|
12
20
|
RichTextRenderer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextRenderer.js","sources":["../../../src/components/RichTextRenderer.tsx"],"sourcesContent":["import { memo, ReactElement } from 'react'\nimport type { RichTextElement } from '../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../types/structure/RichTextLeaf'\nimport { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer'\nimport { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer'\n\n\nexport type RichTextRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t| RichTextFieldRendererProps<CustomElements, CustomLeaves>\n\t| RichTextBlocksRendererProps<CustomElements, CustomLeaves>\n\n/**\n * @deprecated Use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead, or directly use `RichText`.\n * @group Content rendering\n */\nexport const RichTextRenderer = memo(function RichTextRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>(props: RichTextRendererProps<CustomElements, CustomLeaves>) {\n\n\tif ('source' in props) {\n\t\treturn <RichTextFieldRenderer<CustomElements, CustomLeaves> {...props} />\n\t}\n\n\treturn <RichTextBlocksRenderer<CustomElements, CustomLeaves> {...props} />\n}) as <CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf>(\n\tprops: RichTextRendererProps<CustomElements, CustomLeaves>,\n) => ReactElement\n"],"names":["RichTextRenderer"],"mappings":";;;;AAkBO,MAAM,mBAAmB,KAAK,SAASA,kBAG5C,OAA4D;AAE7D,MAAI,YAAY,OAAO;AACf,WAAA,
|
|
1
|
+
{"version":3,"file":"RichTextRenderer.js","sources":["../../../src/components/RichTextRenderer.tsx"],"sourcesContent":["import { memo, ReactElement } from 'react'\nimport type { RichTextElement } from '../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../types/structure/RichTextLeaf'\nimport { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer'\nimport { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer'\n\n\nexport type RichTextRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> =\n\t| RichTextFieldRendererProps<CustomElements, CustomLeaves>\n\t| RichTextBlocksRendererProps<CustomElements, CustomLeaves>\n\n/**\n * @deprecated Use `RichTextBlocksRenderer` or `RichTextFieldRenderer` instead, or directly use `RichText`.\n * @group Content rendering\n */\nexport const RichTextRenderer = memo(function RichTextRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>(props: RichTextRendererProps<CustomElements, CustomLeaves>) {\n\n\tif ('source' in props) {\n\t\treturn <RichTextFieldRenderer<CustomElements, CustomLeaves> {...props} />\n\t}\n\n\treturn <RichTextBlocksRenderer<CustomElements, CustomLeaves> {...props} />\n}) as <CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf>(\n\tprops: RichTextRendererProps<CustomElements, CustomLeaves>,\n) => ReactElement\n"],"names":["RichTextRenderer"],"mappings":";;;;AAkBO,MAAM,mBAAmB,KAAK,SAASA,kBAG5C,OAA4D;AAE7D,MAAI,YAAY,OAAO;AACf,WAAA,uBAAC,uBAAqD,EAAA,GAAG,MAAzD,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAgE,GAAA,IAAA;AAAA,EACxE;AAEO,SAAA,uBAAC,wBAAsD,EAAA,GAAG,MAA1D,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAiE,GAAA,IAAA;AACzE,CAAC;"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const renderChildren = require("../renderChildren.cjs");
|
|
6
6
|
const RenderElementFallback = require("./RenderElementFallback.cjs");
|
|
7
7
|
const useReferenceMetadata = require("../useReferenceMetadata.cjs");
|
|
8
8
|
function ElementRenderer({ element, children, options, block }) {
|
|
9
9
|
const referenceMetadata = useReferenceMetadata.useReferenceMetadata(element, options, block);
|
|
10
|
-
const fallback = /* @__PURE__ */
|
|
10
|
+
const fallback = /* @__PURE__ */ jsxDevRuntime.jsxDEV(RenderElementFallback.RenderElementFallback, { element, options, block, children }, void 0, false, {
|
|
11
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/internal/components/ElementRenderer.tsx",
|
|
12
|
+
lineNumber: 30,
|
|
13
|
+
columnNumber: 3
|
|
14
|
+
}, this);
|
|
11
15
|
return options.renderElement ? react.createElement(options.renderElement, {
|
|
12
16
|
...referenceMetadata,
|
|
13
17
|
formatVersion: block.content.formatVersion,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementRenderer.cjs","sources":["../../../../src/internal/components/ElementRenderer.tsx"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { createElement } from 'react'\nimport type { BuiltinElements } from '../../types/builtin/BuiltinElements'\nimport { renderChildren } from '../renderChildren'\nimport { RenderElementFallback } from './RenderElementFallback'\nimport { useReferenceMetadata } from '../useReferenceMetadata'\nimport type { RichTextElement } from '../../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextBlock } from '../../types/RichTextBlock'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\n\n\nexport interface ElementRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> {\n\telement: CustomElements | BuiltinElements<CustomElements, CustomLeaves>\n\tchildren: ReactElement\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n}\n\nexport function ElementRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({ element, children, options, block }: ElementRendererProps<CustomElements, CustomLeaves>) {\n\tconst referenceMetadata = useReferenceMetadata<CustomElements, CustomLeaves>(element, options, block)\n\n\tconst fallback = (\n\t\t<RenderElementFallback<CustomElements, CustomLeaves> element={element as BuiltinElements<CustomElements, CustomLeaves>} options={options} block={block}>\n\t\t\t{children}\n\t\t</RenderElementFallback>\n\t)\n\n\treturn options.renderElement\n\t\t? createElement(options.renderElement, {\n\t\t\t...referenceMetadata,\n\t\t\tformatVersion: block.content.formatVersion,\n\t\t\tblock,\n\t\t\toptions,\n\t\t\telement,\n\t\t\tfallback,\n\t\t\tchildren,\n\t\t\trenderChildren: (children, opts = options) => renderChildren(children, opts, block),\n\t\t\trenderChildrenOptions: options,\n\t\t})\n\t\t: fallback\n}\n"],"names":["useReferenceMetadata","
|
|
1
|
+
{"version":3,"file":"ElementRenderer.cjs","sources":["../../../../src/internal/components/ElementRenderer.tsx"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { createElement } from 'react'\nimport type { BuiltinElements } from '../../types/builtin/BuiltinElements'\nimport { renderChildren } from '../renderChildren'\nimport { RenderElementFallback } from './RenderElementFallback'\nimport { useReferenceMetadata } from '../useReferenceMetadata'\nimport type { RichTextElement } from '../../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextBlock } from '../../types/RichTextBlock'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\n\n\nexport interface ElementRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> {\n\telement: CustomElements | BuiltinElements<CustomElements, CustomLeaves>\n\tchildren: ReactElement\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n}\n\nexport function ElementRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({ element, children, options, block }: ElementRendererProps<CustomElements, CustomLeaves>) {\n\tconst referenceMetadata = useReferenceMetadata<CustomElements, CustomLeaves>(element, options, block)\n\n\tconst fallback = (\n\t\t<RenderElementFallback<CustomElements, CustomLeaves> element={element as BuiltinElements<CustomElements, CustomLeaves>} options={options} block={block}>\n\t\t\t{children}\n\t\t</RenderElementFallback>\n\t)\n\n\treturn options.renderElement\n\t\t? createElement(options.renderElement, {\n\t\t\t...referenceMetadata,\n\t\t\tformatVersion: block.content.formatVersion,\n\t\t\tblock,\n\t\t\toptions,\n\t\t\telement,\n\t\t\tfallback,\n\t\t\tchildren,\n\t\t\trenderChildren: (children, opts = options) => renderChildren(children, opts, block),\n\t\t\trenderChildrenOptions: options,\n\t\t})\n\t\t: fallback\n}\n"],"names":["useReferenceMetadata","jsxDEV","RenderElementFallback","createElement","children","renderChildren"],"mappings":";;;;;;;AAsBO,SAAS,gBAGd,EAAE,SAAS,UAAU,SAAS,SAA6D;AAC5F,QAAM,oBAAoBA,qBAAA,qBAAmD,SAAS,SAAS,KAAK;AAEpG,QAAM,WACJC,8BAAAA,OAAAC,sBAAA,uBAAA,EAAoD,SAAmE,SAAkB,OACxI,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAA,IAAA;AAGD,SAAO,QAAQ,gBACZC,oBAAc,QAAQ,eAAe;AAAA,IACtC,GAAG;AAAA,IACH,eAAe,MAAM,QAAQ;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,CAACC,WAAU,OAAO,YAAYC,eAAAA,eAAeD,WAAU,MAAM,KAAK;AAAA,IAClF,uBAAuB;AAAA,EACvB,CAAA,IACC;AACJ;;"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { renderChildren } from "../renderChildren.js";
|
|
4
4
|
import { RenderElementFallback } from "./RenderElementFallback.js";
|
|
5
5
|
import { useReferenceMetadata } from "../useReferenceMetadata.js";
|
|
6
6
|
function ElementRenderer({ element, children, options, block }) {
|
|
7
7
|
const referenceMetadata = useReferenceMetadata(element, options, block);
|
|
8
|
-
const fallback = /* @__PURE__ */
|
|
8
|
+
const fallback = /* @__PURE__ */ jsxDEV(RenderElementFallback, { element, options, block, children }, void 0, false, {
|
|
9
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/internal/components/ElementRenderer.tsx",
|
|
10
|
+
lineNumber: 30,
|
|
11
|
+
columnNumber: 3
|
|
12
|
+
}, this);
|
|
9
13
|
return options.renderElement ? createElement(options.renderElement, {
|
|
10
14
|
...referenceMetadata,
|
|
11
15
|
formatVersion: block.content.formatVersion,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementRenderer.js","sources":["../../../../src/internal/components/ElementRenderer.tsx"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { createElement } from 'react'\nimport type { BuiltinElements } from '../../types/builtin/BuiltinElements'\nimport { renderChildren } from '../renderChildren'\nimport { RenderElementFallback } from './RenderElementFallback'\nimport { useReferenceMetadata } from '../useReferenceMetadata'\nimport type { RichTextElement } from '../../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextBlock } from '../../types/RichTextBlock'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\n\n\nexport interface ElementRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> {\n\telement: CustomElements | BuiltinElements<CustomElements, CustomLeaves>\n\tchildren: ReactElement\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n}\n\nexport function ElementRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({ element, children, options, block }: ElementRendererProps<CustomElements, CustomLeaves>) {\n\tconst referenceMetadata = useReferenceMetadata<CustomElements, CustomLeaves>(element, options, block)\n\n\tconst fallback = (\n\t\t<RenderElementFallback<CustomElements, CustomLeaves> element={element as BuiltinElements<CustomElements, CustomLeaves>} options={options} block={block}>\n\t\t\t{children}\n\t\t</RenderElementFallback>\n\t)\n\n\treturn options.renderElement\n\t\t? createElement(options.renderElement, {\n\t\t\t...referenceMetadata,\n\t\t\tformatVersion: block.content.formatVersion,\n\t\t\tblock,\n\t\t\toptions,\n\t\t\telement,\n\t\t\tfallback,\n\t\t\tchildren,\n\t\t\trenderChildren: (children, opts = options) => renderChildren(children, opts, block),\n\t\t\trenderChildrenOptions: options,\n\t\t})\n\t\t: fallback\n}\n"],"names":["children"],"mappings":";;;;;AAsBO,SAAS,gBAGd,EAAE,SAAS,UAAU,SAAS,SAA6D;AAC5F,QAAM,oBAAoB,qBAAmD,SAAS,SAAS,KAAK;AAEpG,QAAM,WACJ,
|
|
1
|
+
{"version":3,"file":"ElementRenderer.js","sources":["../../../../src/internal/components/ElementRenderer.tsx"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { createElement } from 'react'\nimport type { BuiltinElements } from '../../types/builtin/BuiltinElements'\nimport { renderChildren } from '../renderChildren'\nimport { RenderElementFallback } from './RenderElementFallback'\nimport { useReferenceMetadata } from '../useReferenceMetadata'\nimport type { RichTextElement } from '../../types/structure/RichTextElement'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextBlock } from '../../types/RichTextBlock'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\n\n\nexport interface ElementRendererProps<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n> {\n\telement: CustomElements | BuiltinElements<CustomElements, CustomLeaves>\n\tchildren: ReactElement\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n}\n\nexport function ElementRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({ element, children, options, block }: ElementRendererProps<CustomElements, CustomLeaves>) {\n\tconst referenceMetadata = useReferenceMetadata<CustomElements, CustomLeaves>(element, options, block)\n\n\tconst fallback = (\n\t\t<RenderElementFallback<CustomElements, CustomLeaves> element={element as BuiltinElements<CustomElements, CustomLeaves>} options={options} block={block}>\n\t\t\t{children}\n\t\t</RenderElementFallback>\n\t)\n\n\treturn options.renderElement\n\t\t? createElement(options.renderElement, {\n\t\t\t...referenceMetadata,\n\t\t\tformatVersion: block.content.formatVersion,\n\t\t\tblock,\n\t\t\toptions,\n\t\t\telement,\n\t\t\tfallback,\n\t\t\tchildren,\n\t\t\trenderChildren: (children, opts = options) => renderChildren(children, opts, block),\n\t\t\trenderChildrenOptions: options,\n\t\t})\n\t\t: fallback\n}\n"],"names":["children"],"mappings":";;;;;AAsBO,SAAS,gBAGd,EAAE,SAAS,UAAU,SAAS,SAA6D;AAC5F,QAAM,oBAAoB,qBAAmD,SAAS,SAAS,KAAK;AAEpG,QAAM,WACJ,uBAAA,uBAAA,EAAoD,SAAmE,SAAkB,OACxI,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAA,IAAA;AAGD,SAAO,QAAQ,gBACZ,cAAc,QAAQ,eAAe;AAAA,IACtC,GAAG;AAAA,IACH,eAAe,MAAM,QAAQ;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,CAACA,WAAU,OAAO,YAAY,eAAeA,WAAU,MAAM,KAAK;AAAA,IAClF,uBAAuB;AAAA,EACvB,CAAA,IACC;AACJ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const RenderLeafFallback = require("./RenderLeafFallback.cjs");
|
|
6
6
|
function LeafRenderer({
|
|
@@ -8,7 +8,11 @@ function LeafRenderer({
|
|
|
8
8
|
options: { renderLeaf },
|
|
9
9
|
block: { content: { formatVersion } }
|
|
10
10
|
}) {
|
|
11
|
-
const fallback = /* @__PURE__ */
|
|
11
|
+
const fallback = /* @__PURE__ */ jsxDevRuntime.jsxDEV(RenderLeafFallback.RenderLeafFallback, { leaf }, void 0, false, {
|
|
12
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/internal/components/LeafRenderer.tsx",
|
|
13
|
+
lineNumber: 23,
|
|
14
|
+
columnNumber: 19
|
|
15
|
+
}, this);
|
|
12
16
|
return renderLeaf ? react.createElement(
|
|
13
17
|
renderLeaf,
|
|
14
18
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafRenderer.cjs","sources":["../../../../src/internal/components/LeafRenderer.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves'\nimport { RenderLeafFallback } from './RenderLeafFallback'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextElement } from '../../types/structure/RichTextElement'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\nimport { RichTextBlock } from '../../types/RichTextBlock'\n\nexport interface LeafRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n\tleaf: CustomLeaves & BuiltinLeaves\n}\n\nexport function LeafRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tleaf,\n\toptions: { renderLeaf },\n\tblock: { content: { formatVersion } },\n}: LeafRendererProps<CustomElements, CustomLeaves>) {\n\tconst fallback = <RenderLeafFallback leaf={leaf} />\n\n\treturn renderLeaf\n\t\t? createElement(\n\t\t\t\trenderLeaf,\n\t\t\t\t{\n\t\t\t\t\tformatVersion,\n\t\t\t\t\tleaf,\n\t\t\t\t\tfallback,\n\t\t\t\t\tchildren: leaf.text,\n\t\t\t\t},\n\t\t )\n\t\t: fallback\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"LeafRenderer.cjs","sources":["../../../../src/internal/components/LeafRenderer.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves'\nimport { RenderLeafFallback } from './RenderLeafFallback'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextElement } from '../../types/structure/RichTextElement'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\nimport { RichTextBlock } from '../../types/RichTextBlock'\n\nexport interface LeafRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n\tleaf: CustomLeaves & BuiltinLeaves\n}\n\nexport function LeafRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tleaf,\n\toptions: { renderLeaf },\n\tblock: { content: { formatVersion } },\n}: LeafRendererProps<CustomElements, CustomLeaves>) {\n\tconst fallback = <RenderLeafFallback leaf={leaf} />\n\n\treturn renderLeaf\n\t\t? createElement(\n\t\t\t\trenderLeaf,\n\t\t\t\t{\n\t\t\t\t\tformatVersion,\n\t\t\t\t\tleaf,\n\t\t\t\t\tfallback,\n\t\t\t\t\tchildren: leaf.text,\n\t\t\t\t},\n\t\t )\n\t\t: fallback\n}\n"],"names":["jsxDEV","RenderLeafFallback","createElement"],"mappings":";;;;;AAcO,SAAS,aAGd;AAAA,EACD;AAAA,EACA,SAAS,EAAE,WAAW;AAAA,EACtB,OAAO,EAAE,SAAS,EAAE,gBAAgB;AACrC,GAAoD;AAC7C,QAAA,WAAYA,8BAAAA,OAAAC,mBAAA,oBAAA,EAAmB,QAApB,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAgC,GAAA,IAAA;AAEjD,SAAO,aACJC,MAAA;AAAA,IACA;AAAA,IACA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,IAChB;AAAA,EAEA,IAAA;AACJ;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { RenderLeafFallback } from "./RenderLeafFallback.js";
|
|
4
4
|
function LeafRenderer({
|
|
@@ -6,7 +6,11 @@ function LeafRenderer({
|
|
|
6
6
|
options: { renderLeaf },
|
|
7
7
|
block: { content: { formatVersion } }
|
|
8
8
|
}) {
|
|
9
|
-
const fallback = /* @__PURE__ */
|
|
9
|
+
const fallback = /* @__PURE__ */ jsxDEV(RenderLeafFallback, { leaf }, void 0, false, {
|
|
10
|
+
fileName: "/__w/interface/interface/packages/react-richtext-renderer/src/internal/components/LeafRenderer.tsx",
|
|
11
|
+
lineNumber: 23,
|
|
12
|
+
columnNumber: 19
|
|
13
|
+
}, this);
|
|
10
14
|
return renderLeaf ? createElement(
|
|
11
15
|
renderLeaf,
|
|
12
16
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafRenderer.js","sources":["../../../../src/internal/components/LeafRenderer.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves'\nimport { RenderLeafFallback } from './RenderLeafFallback'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextElement } from '../../types/structure/RichTextElement'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\nimport { RichTextBlock } from '../../types/RichTextBlock'\n\nexport interface LeafRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n\tleaf: CustomLeaves & BuiltinLeaves\n}\n\nexport function LeafRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tleaf,\n\toptions: { renderLeaf },\n\tblock: { content: { formatVersion } },\n}: LeafRendererProps<CustomElements, CustomLeaves>) {\n\tconst fallback = <RenderLeafFallback leaf={leaf} />\n\n\treturn renderLeaf\n\t\t? createElement(\n\t\t\t\trenderLeaf,\n\t\t\t\t{\n\t\t\t\t\tformatVersion,\n\t\t\t\t\tleaf,\n\t\t\t\t\tfallback,\n\t\t\t\t\tchildren: leaf.text,\n\t\t\t\t},\n\t\t )\n\t\t: fallback\n}\n"],"names":[],"mappings":";;;AAcO,SAAS,aAGd;AAAA,EACD;AAAA,EACA,SAAS,EAAE,WAAW;AAAA,EACtB,OAAO,EAAE,SAAS,EAAE,gBAAgB;AACrC,GAAoD;AAC7C,QAAA,WAAY,
|
|
1
|
+
{"version":3,"file":"LeafRenderer.js","sources":["../../../../src/internal/components/LeafRenderer.tsx"],"sourcesContent":["import { createElement } from 'react'\nimport type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves'\nimport { RenderLeafFallback } from './RenderLeafFallback'\nimport type { RichTextLeaf } from '../../types/structure/RichTextLeaf'\nimport { RichTextElement } from '../../types/structure/RichTextElement'\nimport { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'\nimport { RichTextBlock } from '../../types/RichTextBlock'\n\nexport interface LeafRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {\n\toptions: RichTextRenderingOptions<CustomElements, CustomLeaves>\n\tblock: RichTextBlock<CustomElements, CustomLeaves>\n\tleaf: CustomLeaves & BuiltinLeaves\n}\n\nexport function LeafRenderer<\n\tCustomElements extends RichTextElement = never,\n\tCustomLeaves extends RichTextLeaf = RichTextLeaf,\n>({\n\tleaf,\n\toptions: { renderLeaf },\n\tblock: { content: { formatVersion } },\n}: LeafRendererProps<CustomElements, CustomLeaves>) {\n\tconst fallback = <RenderLeafFallback leaf={leaf} />\n\n\treturn renderLeaf\n\t\t? createElement(\n\t\t\t\trenderLeaf,\n\t\t\t\t{\n\t\t\t\t\tformatVersion,\n\t\t\t\t\tleaf,\n\t\t\t\t\tfallback,\n\t\t\t\t\tchildren: leaf.text,\n\t\t\t\t},\n\t\t )\n\t\t: fallback\n}\n"],"names":[],"mappings":";;;AAcO,SAAS,aAGd;AAAA,EACD;AAAA,EACA,SAAS,EAAE,WAAW;AAAA,EACtB,OAAO,EAAE,SAAS,EAAE,gBAAgB;AACrC,GAAoD;AAC7C,QAAA,WAAY,uBAAA,oBAAA,EAAmB,QAApB,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAgC,GAAA,IAAA;AAEjD,SAAO,aACJ;AAAA,IACA;AAAA,IACA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,IAChB;AAAA,EAEA,IAAA;AACJ;"}
|