@contember/react-richtext-renderer 2.1.0-beta.2 → 2.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/components/RichText.cjs.map +1 -1
- package/dist/development/src/components/RichText.js.map +1 -1
- package/dist/development/src/components/RichTextBlocksRenderer.cjs.map +1 -1
- package/dist/development/src/components/RichTextBlocksRenderer.js.map +1 -1
- package/dist/development/src/components/RichTextFieldRenderer.cjs.map +1 -1
- package/dist/development/src/components/RichTextFieldRenderer.js.map +1 -1
- package/dist/development/src/components/RichTextRenderer.cjs.map +1 -1
- package/dist/development/src/components/RichTextRenderer.js.map +1 -1
- package/dist/development/src/hooks/useRichTextBlocksSource.cjs.map +1 -1
- package/dist/development/src/hooks/useRichTextBlocksSource.js.map +1 -1
- package/dist/development/src/hooks/useRichTextFieldSource.cjs.map +1 -1
- package/dist/development/src/hooks/useRichTextFieldSource.js.map +1 -1
- package/dist/development/src/internal/components/ElementRenderer.cjs.map +1 -1
- package/dist/development/src/internal/components/ElementRenderer.js.map +1 -1
- package/dist/development/src/internal/components/LeafRenderer.cjs.map +1 -1
- package/dist/development/src/internal/components/LeafRenderer.js.map +1 -1
- package/dist/development/src/internal/components/RenderElementFallback.cjs.map +1 -1
- package/dist/development/src/internal/components/RenderElementFallback.js.map +1 -1
- package/dist/development/src/internal/components/RenderLeafFallback.cjs.map +1 -1
- package/dist/development/src/internal/components/RenderLeafFallback.js.map +1 -1
- package/dist/development/src/internal/defaultDeserialize.cjs.map +1 -1
- package/dist/development/src/internal/defaultDeserialize.js.map +1 -1
- package/dist/development/src/internal/renderChildren.cjs.map +1 -1
- package/dist/development/src/internal/renderChildren.js.map +1 -1
- package/dist/development/src/internal/useReferenceMetadata.cjs.map +1 -1
- package/dist/development/src/internal/useReferenceMetadata.js.map +1 -1
- package/dist/production/src/components/RichText.cjs.map +1 -1
- package/dist/production/src/components/RichText.js.map +1 -1
- package/dist/production/src/components/RichTextBlocksRenderer.cjs.map +1 -1
- package/dist/production/src/components/RichTextBlocksRenderer.js.map +1 -1
- package/dist/production/src/components/RichTextFieldRenderer.cjs.map +1 -1
- package/dist/production/src/components/RichTextFieldRenderer.js.map +1 -1
- package/dist/production/src/components/RichTextRenderer.cjs.map +1 -1
- package/dist/production/src/components/RichTextRenderer.js.map +1 -1
- package/dist/production/src/hooks/useRichTextBlocksSource.cjs.map +1 -1
- package/dist/production/src/hooks/useRichTextBlocksSource.js.map +1 -1
- package/dist/production/src/hooks/useRichTextFieldSource.cjs.map +1 -1
- package/dist/production/src/hooks/useRichTextFieldSource.js.map +1 -1
- package/dist/production/src/internal/components/ElementRenderer.cjs.map +1 -1
- package/dist/production/src/internal/components/ElementRenderer.js.map +1 -1
- package/dist/production/src/internal/components/LeafRenderer.cjs.map +1 -1
- package/dist/production/src/internal/components/LeafRenderer.js.map +1 -1
- package/dist/production/src/internal/components/RenderElementFallback.cjs.map +1 -1
- package/dist/production/src/internal/components/RenderElementFallback.js.map +1 -1
- package/dist/production/src/internal/components/RenderLeafFallback.cjs.map +1 -1
- package/dist/production/src/internal/components/RenderLeafFallback.js.map +1 -1
- package/dist/production/src/internal/defaultDeserialize.cjs.map +1 -1
- package/dist/production/src/internal/defaultDeserialize.js.map +1 -1
- package/dist/production/src/internal/renderChildren.cjs.map +1 -1
- package/dist/production/src/internal/renderChildren.js.map +1 -1
- package/dist/production/src/internal/useReferenceMetadata.cjs.map +1 -1
- package/dist/production/src/internal/useReferenceMetadata.js.map +1 -1
- package/dist/types/components/RichText.d.ts +2 -2
- package/dist/types/components/RichText.d.ts.map +1 -1
- package/dist/types/components/RichTextBlocksRenderer.d.ts +1 -1
- package/dist/types/components/RichTextBlocksRenderer.d.ts.map +1 -1
- package/dist/types/components/RichTextFieldRenderer.d.ts +1 -1
- package/dist/types/components/RichTextFieldRenderer.d.ts.map +1 -1
- package/dist/types/components/RichTextRenderer.d.ts +4 -4
- package/dist/types/components/RichTextRenderer.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +4 -4
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +2 -2
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useRichTextBlocksSource.d.ts +1 -1
- package/dist/types/hooks/useRichTextBlocksSource.d.ts.map +1 -1
- package/dist/types/hooks/useRichTextFieldSource.d.ts +1 -1
- package/dist/types/hooks/useRichTextFieldSource.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/internal/components/ElementRenderer.d.ts +5 -5
- package/dist/types/internal/components/ElementRenderer.d.ts.map +1 -1
- package/dist/types/internal/components/LeafRenderer.d.ts +5 -5
- package/dist/types/internal/components/LeafRenderer.d.ts.map +1 -1
- package/dist/types/internal/components/RenderElementFallback.d.ts +5 -5
- package/dist/types/internal/components/RenderElementFallback.d.ts.map +1 -1
- package/dist/types/internal/components/RenderLeafFallback.d.ts +1 -1
- package/dist/types/internal/components/RenderLeafFallback.d.ts.map +1 -1
- package/dist/types/internal/defaultDeserialize.d.ts +3 -3
- package/dist/types/internal/defaultDeserialize.d.ts.map +1 -1
- package/dist/types/internal/renderChildren.d.ts +5 -5
- package/dist/types/internal/renderChildren.d.ts.map +1 -1
- package/dist/types/internal/useReferenceMetadata.d.ts +7 -7
- package/dist/types/internal/useReferenceMetadata.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/RenderChildren.d.ts +2 -2
- package/dist/types/types/RenderChildren.d.ts.map +1 -1
- package/dist/types/types/RichTextBlock.d.ts +2 -2
- package/dist/types/types/RichTextBlock.d.ts.map +1 -1
- package/dist/types/types/RichTextBlockSource.d.ts +1 -1
- package/dist/types/types/RichTextBlockSource.d.ts.map +1 -1
- package/dist/types/types/RichTextFieldSource.d.ts +1 -1
- package/dist/types/types/RichTextFieldSource.d.ts.map +1 -1
- package/dist/types/types/RichTextReferenceMetadata.d.ts +3 -3
- package/dist/types/types/RichTextReferenceMetadata.d.ts.map +1 -1
- package/dist/types/types/RichTextRenderingOptions.d.ts +4 -4
- package/dist/types/types/RichTextRenderingOptions.d.ts.map +1 -1
- package/dist/types/types/builtin/BuiltinElements.d.ts +1 -1
- package/dist/types/types/builtin/BuiltinElements.d.ts.map +1 -1
- package/dist/types/types/builtin/BuiltinLeaves.d.ts +1 -1
- package/dist/types/types/builtin/BuiltinLeaves.d.ts.map +1 -1
- package/dist/types/types/builtin/index.d.ts +2 -2
- package/dist/types/types/builtin/index.d.ts.map +1 -1
- package/dist/types/types/custom/ReferenceRenderer.d.ts +6 -6
- package/dist/types/types/custom/ReferenceRenderer.d.ts.map +1 -1
- package/dist/types/types/custom/RenderElement.d.ts +8 -8
- package/dist/types/types/custom/RenderElement.d.ts.map +1 -1
- package/dist/types/types/custom/RenderLeaf.d.ts +2 -2
- package/dist/types/types/custom/RenderLeaf.d.ts.map +1 -1
- package/dist/types/types/custom/index.d.ts +4 -4
- package/dist/types/types/custom/index.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +10 -10
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/structure/RichTextChild.d.ts +3 -3
- package/dist/types/types/structure/RichTextChild.d.ts.map +1 -1
- package/dist/types/types/structure/RichTextElement.d.ts +2 -2
- package/dist/types/types/structure/RichTextElement.d.ts.map +1 -1
- package/dist/types/types/structure/RootEditorNode.d.ts +3 -3
- package/dist/types/types/structure/RootEditorNode.d.ts.map +1 -1
- package/dist/types/types/structure/index.d.ts +4 -4
- package/dist/types/types/structure/index.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/components/RichText.tsx +3 -3
- package/src/components/RichTextBlocksRenderer.tsx +3 -3
- package/src/components/RichTextFieldRenderer.tsx +3 -3
- package/src/components/RichTextRenderer.tsx +4 -4
- package/src/components/index.ts +4 -4
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useRichTextBlocksSource.ts +3 -3
- package/src/hooks/useRichTextFieldSource.ts +2 -2
- package/src/index.ts +4 -4
- package/src/internal/components/ElementRenderer.tsx +8 -8
- package/src/internal/components/LeafRenderer.tsx +6 -6
- package/src/internal/components/RenderElementFallback.tsx +8 -8
- package/src/internal/components/RenderLeafFallback.tsx +1 -1
- package/src/internal/defaultDeserialize.ts +3 -3
- package/src/internal/renderChildren.tsx +7 -7
- package/src/internal/useReferenceMetadata.ts +9 -9
- package/src/types/RenderChildren.ts +2 -2
- package/src/types/RichTextBlock.ts +2 -2
- package/src/types/RichTextBlockSource.ts +1 -1
- package/src/types/RichTextFieldSource.ts +1 -1
- package/src/types/RichTextReferenceMetadata.ts +3 -3
- package/src/types/RichTextRenderingOptions.ts +4 -4
- package/src/types/builtin/BuiltinElements.ts +1 -1
- package/src/types/builtin/BuiltinLeaves.ts +1 -1
- package/src/types/builtin/index.ts +2 -2
- package/src/types/custom/ReferenceRenderer.ts +6 -6
- package/src/types/custom/RenderElement.ts +8 -8
- package/src/types/custom/RenderLeaf.ts +2 -2
- package/src/types/custom/index.ts +4 -4
- package/src/types/index.ts +10 -10
- package/src/types/structure/RichTextChild.ts +3 -3
- package/src/types/structure/RichTextElement.ts +2 -2
- package/src/types/structure/RootEditorNode.ts +3 -3
- package/src/types/structure/index.ts +4 -4
- package/tests/decodeBlockSource.test.tsx +2 -2
- package/tests/renderElement.test.tsx +1 -1
- package/tests/renderLeaf.test.tsx +1 -1
- package/tests/renderReferences.test.tsx +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './builtin';
|
|
2
|
-
export * from './custom';
|
|
3
|
-
export * from './structure';
|
|
4
|
-
export * from './RenderChildren';
|
|
5
|
-
export * from './RichTextBlock';
|
|
6
|
-
export * from './RichTextBlockSource';
|
|
7
|
-
export * from './RichTextFieldSource';
|
|
8
|
-
export * from './RichTextReference';
|
|
9
|
-
export * from './RichTextReferenceMetadata';
|
|
10
|
-
export * from './RichTextRenderingOptions';
|
|
1
|
+
export * from './builtin/index.js';
|
|
2
|
+
export * from './custom/index.js';
|
|
3
|
+
export * from './structure/index.js';
|
|
4
|
+
export * from './RenderChildren.js';
|
|
5
|
+
export * from './RichTextBlock.js';
|
|
6
|
+
export * from './RichTextBlockSource.js';
|
|
7
|
+
export * from './RichTextFieldSource.js';
|
|
8
|
+
export * from './RichTextReference.js';
|
|
9
|
+
export * from './RichTextReferenceMetadata.js';
|
|
10
|
+
export * from './RichTextRenderingOptions.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AAEpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RichTextLeaf } from './RichTextLeaf';
|
|
2
|
-
import { RichTextElement } from './RichTextElement';
|
|
3
|
-
import { BuiltinElements, BuiltinLeaves } from '../builtin';
|
|
1
|
+
import { RichTextLeaf } from './RichTextLeaf.js';
|
|
2
|
+
import { RichTextElement } from './RichTextElement.js';
|
|
3
|
+
import { BuiltinElements, BuiltinLeaves } from '../builtin/index.js';
|
|
4
4
|
export type RichTextChild<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> = BuiltinElements<CustomElements, CustomLeaves> | CustomElements | (BuiltinLeaves & CustomLeaves);
|
|
5
5
|
//# sourceMappingURL=RichTextChild.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextChild.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RichTextChild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RichTextChild.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RichTextChild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEpE,MAAM,MAAM,aAAa,CACxB,cAAc,SAAS,eAAe,GAAG,KAAK,EAC9C,YAAY,SAAS,YAAY,GAAG,YAAY,IAE9C,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,GAC7C,cAAc,GACd,CAAC,aAAa,GAAG,YAAY,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RichTextLeaf } from './RichTextLeaf';
|
|
2
|
-
import { RichTextChild } from './RichTextChild';
|
|
1
|
+
import type { RichTextLeaf } from './RichTextLeaf.js';
|
|
2
|
+
import { RichTextChild } from './RichTextChild.js';
|
|
3
3
|
export interface RichTextElement<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {
|
|
4
4
|
type: string;
|
|
5
5
|
children: readonly RichTextChild<CustomElements, CustomLeaves>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextElement.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RichTextElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RichTextElement.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RichTextElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,WAAW,eAAe,CAC/B,cAAc,SAAS,eAAe,GAAG,KAAK,EAC9C,YAAY,SAAS,YAAY,GAAG,YAAY;IAEhD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,aAAa,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,CAAA;IAChE,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RichTextElement } from './RichTextElement';
|
|
2
|
-
import type { RichTextLeaf } from './RichTextLeaf';
|
|
3
|
-
import { RichTextChild } from './RichTextChild';
|
|
1
|
+
import type { RichTextElement } from './RichTextElement.js';
|
|
2
|
+
import type { RichTextLeaf } from './RichTextLeaf.js';
|
|
3
|
+
import { RichTextChild } from './RichTextChild.js';
|
|
4
4
|
export interface RootEditorNode<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {
|
|
5
5
|
formatVersion: number;
|
|
6
6
|
children: readonly RichTextChild<CustomElements, CustomLeaves>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootEditorNode.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RootEditorNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RootEditorNode.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/RootEditorNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,WAAW,cAAc,CAC9B,cAAc,SAAS,eAAe,GAAG,KAAK,EAC9C,YAAY,SAAS,YAAY,GAAG,YAAY;IAEhD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,SAAS,aAAa,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,CAAA;CAChE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './RichTextChild';
|
|
2
|
-
export * from './RichTextElement';
|
|
3
|
-
export * from './RichTextLeaf';
|
|
4
|
-
export * from './RootEditorNode';
|
|
1
|
+
export * from './RichTextChild.js';
|
|
2
|
+
export * from './RichTextElement.js';
|
|
3
|
+
export * from './RichTextLeaf.js';
|
|
4
|
+
export * from './RootEditorNode.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/structure/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/react-richtext-renderer",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0-alpha.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/production/index.js",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"directory": "packages/react-richtext-renderer"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@testing-library/dom": "^10.4.1",
|
|
38
37
|
"@testing-library/react": "^16.3.2"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElement } from 'react'
|
|
2
|
-
import { renderChildren } from '../internal/renderChildren'
|
|
3
|
-
import type { RichTextBlock } from '../types'
|
|
4
|
-
import { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'
|
|
2
|
+
import { renderChildren } from '../internal/renderChildren.js'
|
|
3
|
+
import type { RichTextBlock } from '../types/index.js'
|
|
4
|
+
import { RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types/index.js'
|
|
5
5
|
|
|
6
6
|
export type RichTextProps<
|
|
7
7
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types'
|
|
2
|
-
import { RichText } from './RichText'
|
|
3
|
-
import { useRichTextBlocksSource } from '../hooks'
|
|
1
|
+
import { RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextRenderingOptions } from '../types/index.js'
|
|
2
|
+
import { RichText } from './RichText.js'
|
|
3
|
+
import { useRichTextBlocksSource } from '../hooks/index.js'
|
|
4
4
|
|
|
5
5
|
export type { RichTextBlockSource }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichText } from './RichText'
|
|
2
|
-
import { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types'
|
|
3
|
-
import { useRichTextFieldSource } from '../hooks'
|
|
1
|
+
import { RichText } from './RichText.js'
|
|
2
|
+
import { RichTextElement, RichTextFieldSource, RichTextLeaf, RichTextRenderingOptions } from '../types/index.js'
|
|
3
|
+
import { useRichTextFieldSource } from '../hooks/index.js'
|
|
4
4
|
|
|
5
5
|
export type { RichTextFieldSource }
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { memo, ReactElement } from 'react'
|
|
2
|
-
import type { RichTextElement } from '../types/structure/RichTextElement'
|
|
3
|
-
import type { RichTextLeaf } from '../types/structure/RichTextLeaf'
|
|
4
|
-
import { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer'
|
|
5
|
-
import { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer'
|
|
2
|
+
import type { RichTextElement } from '../types/structure/RichTextElement.js'
|
|
3
|
+
import type { RichTextLeaf } from '../types/structure/RichTextLeaf.js'
|
|
4
|
+
import { RichTextFieldRenderer, RichTextFieldRendererProps } from './RichTextFieldRenderer.js'
|
|
5
|
+
import { RichTextBlocksRenderer, RichTextBlocksRendererProps } from './RichTextBlocksRenderer.js'
|
|
6
6
|
|
|
7
7
|
export type RichTextRendererProps<
|
|
8
8
|
CustomElements extends RichTextElement = never,
|
package/src/components/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './RichText'
|
|
2
|
-
export * from './RichTextFieldRenderer'
|
|
3
|
-
export * from './RichTextBlocksRenderer'
|
|
4
|
-
export * from './RichTextRenderer'
|
|
1
|
+
export * from './RichText.js'
|
|
2
|
+
export * from './RichTextFieldRenderer.js'
|
|
3
|
+
export * from './RichTextBlocksRenderer.js'
|
|
4
|
+
export * from './RichTextRenderer.js'
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './useRichTextFieldSource'
|
|
2
|
-
export * from './useRichTextBlocksSource'
|
|
1
|
+
export * from './useRichTextFieldSource.js'
|
|
2
|
+
export * from './useRichTextBlocksSource.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RichTextBlock, RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextReference, RootEditorNode } from '../types'
|
|
2
|
-
import { defaultDeserialize } from '../internal/defaultDeserialize'
|
|
1
|
+
import { RichTextBlock, RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextReference, RootEditorNode } from '../types/index.js'
|
|
2
|
+
import { defaultDeserialize } from '../internal/defaultDeserialize.js'
|
|
3
3
|
import { useMemo } from 'react'
|
|
4
|
-
import { RichTextRendererError } from '../RichTextRendererError'
|
|
4
|
+
import { RichTextRendererError } from '../RichTextRendererError.js'
|
|
5
5
|
|
|
6
6
|
export const useRichTextBlocksSource = <CustomElements extends RichTextElement, CustomLeaves extends RichTextLeaf>({
|
|
7
7
|
deserialize = defaultDeserialize,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextBlock, RichTextElement, RichTextFieldSource, RichTextLeaf } from '../types'
|
|
1
|
+
import { RichTextBlock, RichTextElement, RichTextFieldSource, RichTextLeaf } from '../types/index.js'
|
|
2
2
|
import { useMemo } from 'react'
|
|
3
|
-
import { defaultDeserialize } from '../internal/defaultDeserialize'
|
|
3
|
+
import { defaultDeserialize } from '../internal/defaultDeserialize.js'
|
|
4
4
|
|
|
5
5
|
export const useRichTextFieldSource = <CustomElements extends RichTextElement, CustomLeaves extends RichTextLeaf>({
|
|
6
6
|
source,
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './components'
|
|
2
|
-
export * from './hooks'
|
|
3
|
-
export * from './types'
|
|
1
|
+
export * from './components/index.js'
|
|
2
|
+
export * from './hooks/index.js'
|
|
3
|
+
export * from './types/index.js'
|
|
4
4
|
|
|
5
|
-
export * from './RichTextRendererError'
|
|
5
|
+
export * from './RichTextRendererError.js'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ReactElement } from 'react'
|
|
2
2
|
import { createElement } from 'react'
|
|
3
|
-
import type { BuiltinElements } from '../../types/builtin/BuiltinElements'
|
|
4
|
-
import { renderChildren } from '../renderChildren'
|
|
5
|
-
import { RenderElementFallback } from './RenderElementFallback'
|
|
6
|
-
import { useReferenceMetadata } from '../useReferenceMetadata'
|
|
7
|
-
import type { RichTextElement } from '../../types/structure/RichTextElement'
|
|
8
|
-
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf'
|
|
9
|
-
import { RichTextBlock } from '../../types/RichTextBlock'
|
|
10
|
-
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'
|
|
3
|
+
import type { BuiltinElements } from '../../types/builtin/BuiltinElements.js'
|
|
4
|
+
import { renderChildren } from '../renderChildren.js'
|
|
5
|
+
import { RenderElementFallback } from './RenderElementFallback.js'
|
|
6
|
+
import { useReferenceMetadata } from '../useReferenceMetadata.js'
|
|
7
|
+
import type { RichTextElement } from '../../types/structure/RichTextElement.js'
|
|
8
|
+
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf.js'
|
|
9
|
+
import { RichTextBlock } from '../../types/RichTextBlock.js'
|
|
10
|
+
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions.js'
|
|
11
11
|
|
|
12
12
|
export interface ElementRendererProps<
|
|
13
13
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createElement } from 'react'
|
|
2
|
-
import type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves'
|
|
3
|
-
import { RenderLeafFallback } from './RenderLeafFallback'
|
|
4
|
-
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf'
|
|
5
|
-
import { RichTextElement } from '../../types/structure/RichTextElement'
|
|
6
|
-
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'
|
|
7
|
-
import { RichTextBlock } from '../../types/RichTextBlock'
|
|
2
|
+
import type { BuiltinLeaves } from '../../types/builtin/BuiltinLeaves.js'
|
|
3
|
+
import { RenderLeafFallback } from './RenderLeafFallback.js'
|
|
4
|
+
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf.js'
|
|
5
|
+
import { RichTextElement } from '../../types/structure/RichTextElement.js'
|
|
6
|
+
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions.js'
|
|
7
|
+
import { RichTextBlock } from '../../types/RichTextBlock.js'
|
|
8
8
|
|
|
9
9
|
export interface LeafRendererProps<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> {
|
|
10
10
|
options: RichTextRenderingOptions<CustomElements, CustomLeaves>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createElement, ReactElement } from 'react'
|
|
2
|
-
import type { BuiltinElements, RichTextReferenceElement, RichTextTableRowElement } from '../../types/builtin/BuiltinElements'
|
|
3
|
-
import { renderChildren } from '../renderChildren'
|
|
4
|
-
import { useReferenceMetadata } from '../useReferenceMetadata'
|
|
5
|
-
import type { RichTextElement } from '../../types/structure/RichTextElement'
|
|
6
|
-
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf'
|
|
7
|
-
import { RichTextRendererError } from '../../RichTextRendererError'
|
|
8
|
-
import { RichTextBlock } from '../../types/RichTextBlock'
|
|
9
|
-
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions'
|
|
2
|
+
import type { BuiltinElements, RichTextReferenceElement, RichTextTableRowElement } from '../../types/builtin/BuiltinElements.js'
|
|
3
|
+
import { renderChildren } from '../renderChildren.js'
|
|
4
|
+
import { useReferenceMetadata } from '../useReferenceMetadata.js'
|
|
5
|
+
import type { RichTextElement } from '../../types/structure/RichTextElement.js'
|
|
6
|
+
import type { RichTextLeaf } from '../../types/structure/RichTextLeaf.js'
|
|
7
|
+
import { RichTextRendererError } from '../../RichTextRendererError.js'
|
|
8
|
+
import { RichTextBlock } from '../../types/RichTextBlock.js'
|
|
9
|
+
import { RichTextRenderingOptions } from '../../types/RichTextRenderingOptions.js'
|
|
10
10
|
|
|
11
11
|
export interface RenderElementFallbackProps<
|
|
12
12
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RichTextElement } from '../types/structure/RichTextElement'
|
|
2
|
-
import type { RichTextLeaf } from '../types/structure/RichTextLeaf'
|
|
3
|
-
import type { RootEditorNode } from '../types/structure/RootEditorNode'
|
|
1
|
+
import type { RichTextElement } from '../types/structure/RichTextElement.js'
|
|
2
|
+
import type { RichTextLeaf } from '../types/structure/RichTextLeaf.js'
|
|
3
|
+
import type { RootEditorNode } from '../types/structure/RootEditorNode.js'
|
|
4
4
|
|
|
5
5
|
export const defaultDeserialize = <
|
|
6
6
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ReactElement } from 'react'
|
|
2
|
-
import { ElementRenderer } from './components/ElementRenderer'
|
|
3
|
-
import { LeafRenderer } from './components/LeafRenderer'
|
|
4
|
-
import type { RichTextElement } from '../types/structure/RichTextElement'
|
|
5
|
-
import type { RichTextLeaf } from '../types/structure/RichTextLeaf'
|
|
6
|
-
import { RichTextRenderingOptions } from '../types/RichTextRenderingOptions'
|
|
7
|
-
import { RichTextBlock } from '../types/RichTextBlock'
|
|
8
|
-
import { RichTextChild } from '../types/structure/RichTextChild'
|
|
2
|
+
import { ElementRenderer } from './components/ElementRenderer.js'
|
|
3
|
+
import { LeafRenderer } from './components/LeafRenderer.js'
|
|
4
|
+
import type { RichTextElement } from '../types/structure/RichTextElement.js'
|
|
5
|
+
import type { RichTextLeaf } from '../types/structure/RichTextLeaf.js'
|
|
6
|
+
import { RichTextRenderingOptions } from '../types/RichTextRenderingOptions.js'
|
|
7
|
+
import { RichTextBlock } from '../types/RichTextBlock.js'
|
|
8
|
+
import { RichTextChild } from '../types/structure/RichTextChild.js'
|
|
9
9
|
|
|
10
10
|
export const renderChildren = <
|
|
11
11
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { BuiltinElements } from '../types/builtin/BuiltinElements'
|
|
2
|
-
import type { RichTextElement } from '../types/structure/RichTextElement'
|
|
3
|
-
import type { RichTextReferenceMetadata } from '../types/RichTextReferenceMetadata'
|
|
4
|
-
import { RichTextReferenceEmptyMetadata } from '../types/RichTextReferenceMetadata'
|
|
5
|
-
import type { RichTextLeaf } from '../types/structure/RichTextLeaf'
|
|
6
|
-
import type { RichTextReference } from '../types/RichTextReference'
|
|
7
|
-
import { RichTextRendererError } from '../RichTextRendererError'
|
|
8
|
-
import { RichTextBlock } from '../types/RichTextBlock'
|
|
9
|
-
import { RichTextRenderingOptions } from '../types/RichTextRenderingOptions'
|
|
1
|
+
import type { BuiltinElements } from '../types/builtin/BuiltinElements.js'
|
|
2
|
+
import type { RichTextElement } from '../types/structure/RichTextElement.js'
|
|
3
|
+
import type { RichTextReferenceMetadata } from '../types/RichTextReferenceMetadata.js'
|
|
4
|
+
import { RichTextReferenceEmptyMetadata } from '../types/RichTextReferenceMetadata.js'
|
|
5
|
+
import type { RichTextLeaf } from '../types/structure/RichTextLeaf.js'
|
|
6
|
+
import type { RichTextReference } from '../types/RichTextReference.js'
|
|
7
|
+
import { RichTextRendererError } from '../RichTextRendererError.js'
|
|
8
|
+
import { RichTextBlock } from '../types/RichTextBlock.js'
|
|
9
|
+
import { RichTextRenderingOptions } from '../types/RichTextRenderingOptions.js'
|
|
10
10
|
import { useMemo } from 'react'
|
|
11
11
|
|
|
12
12
|
const emptyReference: RichTextReferenceEmptyMetadata = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RichTextChild, RichTextElement, RichTextLeaf } from './structure'
|
|
2
|
-
import { RichTextRenderingOptions } from './RichTextRenderingOptions'
|
|
1
|
+
import { RichTextChild, RichTextElement, RichTextLeaf } from './structure/index.js'
|
|
2
|
+
import { RichTextRenderingOptions } from './RichTextRenderingOptions.js'
|
|
3
3
|
import { ReactElement } from 'react'
|
|
4
4
|
|
|
5
5
|
export type RenderChildren<
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RichTextElement, RichTextLeaf, RootEditorNode } from './structure'
|
|
2
|
-
import type { RichTextReference } from './RichTextReference'
|
|
1
|
+
import type { RichTextElement, RichTextLeaf, RootEditorNode } from './structure/index.js'
|
|
2
|
+
import type { RichTextReference } from './RichTextReference.js'
|
|
3
3
|
|
|
4
4
|
export interface RichTextBlock<
|
|
5
5
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextElement, RichTextLeaf, RootEditorNode } from './structure'
|
|
1
|
+
import { RichTextElement, RichTextLeaf, RootEditorNode } from './structure/index.js'
|
|
2
2
|
|
|
3
3
|
export type RichTextBlockSource<CustomElements extends RichTextElement = never, CustomLeaves extends RichTextLeaf = RichTextLeaf> = {
|
|
4
4
|
blocks: readonly Readonly<Record<string, unknown>>[]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextElement, RichTextLeaf, RootEditorNode } from './structure'
|
|
1
|
+
import { RichTextElement, RichTextLeaf, RootEditorNode } from './structure/index.js'
|
|
2
2
|
|
|
3
3
|
export interface RichTextFieldSource<CustomElements extends RichTextElement, CustomLeaves extends RichTextLeaf> {
|
|
4
4
|
source: RootEditorNode<CustomElements, CustomLeaves> | string | null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RichTextElement, RichTextLeaf } from './structure'
|
|
2
|
-
import type { RichTextReference } from './RichTextReference'
|
|
3
|
-
import { ReferenceRenderer } from './custom'
|
|
1
|
+
import type { RichTextElement, RichTextLeaf } from './structure/index.js'
|
|
2
|
+
import type { RichTextReference } from './RichTextReference.js'
|
|
3
|
+
import { ReferenceRenderer } from './custom/index.js'
|
|
4
4
|
|
|
5
5
|
export type RichTextReferenceMetadata<
|
|
6
6
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RichTextElement, RichTextLeaf } from './structure'
|
|
2
|
-
import { ReferenceRendererMap, RenderBlock, RenderElement, RenderLeaf } from './custom'
|
|
3
|
-
import { RichTextReference } from './RichTextReference'
|
|
4
|
-
import { RichTextReferenceMetadata } from './RichTextReferenceMetadata'
|
|
1
|
+
import { RichTextElement, RichTextLeaf } from './structure/index.js'
|
|
2
|
+
import { ReferenceRendererMap, RenderBlock, RenderElement, RenderLeaf } from './custom/index.js'
|
|
3
|
+
import { RichTextReference } from './RichTextReference.js'
|
|
4
|
+
import { RichTextReferenceMetadata } from './RichTextReferenceMetadata.js'
|
|
5
5
|
|
|
6
6
|
export type UndefinedReferenceHandler<
|
|
7
7
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './BuiltinLeaves'
|
|
2
|
-
export * from './BuiltinElements'
|
|
1
|
+
export * from './BuiltinLeaves.js'
|
|
2
|
+
export * from './BuiltinElements.js'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ComponentType, ReactElement } from 'react'
|
|
2
|
-
import type { BuiltinElements } from '../builtin'
|
|
3
|
-
import type { RichTextElement, RichTextLeaf } from '../structure'
|
|
4
|
-
import { RichTextReferenceFilledMetadata } from '../RichTextReferenceMetadata'
|
|
5
|
-
import type { RichTextReference } from '../RichTextReference'
|
|
6
|
-
import { RichTextBlock } from '../RichTextBlock'
|
|
7
|
-
import { RichTextRenderingOptions } from '../RichTextRenderingOptions'
|
|
2
|
+
import type { BuiltinElements } from '../builtin/index.js'
|
|
3
|
+
import type { RichTextElement, RichTextLeaf } from '../structure/index.js'
|
|
4
|
+
import { RichTextReferenceFilledMetadata } from '../RichTextReferenceMetadata.js'
|
|
5
|
+
import type { RichTextReference } from '../RichTextReference.js'
|
|
6
|
+
import { RichTextBlock } from '../RichTextBlock.js'
|
|
7
|
+
import { RichTextRenderingOptions } from '../RichTextRenderingOptions.js'
|
|
8
8
|
|
|
9
9
|
export type ReferenceRendererProps<
|
|
10
10
|
Reference extends RichTextReference = RichTextReference,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { RichTextElement } from '../structure/RichTextElement'
|
|
2
|
-
import { RichTextLeaf } from '../structure/RichTextLeaf'
|
|
3
|
-
import { RichTextReference } from '../RichTextReference'
|
|
4
|
-
import { BuiltinElements } from '../builtin/BuiltinElements'
|
|
1
|
+
import { RichTextElement } from '../structure/RichTextElement.js'
|
|
2
|
+
import { RichTextLeaf } from '../structure/RichTextLeaf.js'
|
|
3
|
+
import { RichTextReference } from '../RichTextReference.js'
|
|
4
|
+
import { BuiltinElements } from '../builtin/BuiltinElements.js'
|
|
5
5
|
import { ComponentType, ReactElement } from 'react'
|
|
6
|
-
import { RichTextReferenceMetadata } from '../RichTextReferenceMetadata'
|
|
7
|
-
import { RichTextRenderingOptions } from '../RichTextRenderingOptions'
|
|
8
|
-
import { RichTextBlock } from '../RichTextBlock'
|
|
9
|
-
import { RenderChildren } from '../RenderChildren'
|
|
6
|
+
import { RichTextReferenceMetadata } from '../RichTextReferenceMetadata.js'
|
|
7
|
+
import { RichTextRenderingOptions } from '../RichTextRenderingOptions.js'
|
|
8
|
+
import { RichTextBlock } from '../RichTextBlock.js'
|
|
9
|
+
import { RenderChildren } from '../RenderChildren.js'
|
|
10
10
|
|
|
11
11
|
export type RenderElementProps<
|
|
12
12
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextLeaf } from '../structure'
|
|
1
|
+
import { RichTextLeaf } from '../structure/index.js'
|
|
2
2
|
import { ComponentType, ReactElement } from 'react'
|
|
3
|
-
import { BuiltinLeaves } from '../builtin'
|
|
3
|
+
import { BuiltinLeaves } from '../builtin/index.js'
|
|
4
4
|
|
|
5
5
|
export type RenderLeafProps<CustomLeaves extends RichTextLeaf = RichTextLeaf> = {
|
|
6
6
|
formatVersion: number
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './ReferenceRenderer'
|
|
2
|
-
export * from './RenderBlock'
|
|
3
|
-
export * from './RenderElement'
|
|
4
|
-
export * from './RenderLeaf'
|
|
1
|
+
export * from './ReferenceRenderer.js'
|
|
2
|
+
export * from './RenderBlock.js'
|
|
3
|
+
export * from './RenderElement.js'
|
|
4
|
+
export * from './RenderLeaf.js'
|
package/src/types/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './builtin'
|
|
2
|
-
export * from './custom'
|
|
3
|
-
export * from './structure'
|
|
1
|
+
export * from './builtin/index.js'
|
|
2
|
+
export * from './custom/index.js'
|
|
3
|
+
export * from './structure/index.js'
|
|
4
4
|
|
|
5
|
-
export * from './RenderChildren'
|
|
6
|
-
export * from './RichTextBlock'
|
|
7
|
-
export * from './RichTextBlockSource'
|
|
8
|
-
export * from './RichTextFieldSource'
|
|
9
|
-
export * from './RichTextReference'
|
|
10
|
-
export * from './RichTextReferenceMetadata'
|
|
11
|
-
export * from './RichTextRenderingOptions'
|
|
5
|
+
export * from './RenderChildren.js'
|
|
6
|
+
export * from './RichTextBlock.js'
|
|
7
|
+
export * from './RichTextBlockSource.js'
|
|
8
|
+
export * from './RichTextFieldSource.js'
|
|
9
|
+
export * from './RichTextReference.js'
|
|
10
|
+
export * from './RichTextReferenceMetadata.js'
|
|
11
|
+
export * from './RichTextRenderingOptions.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextLeaf } from './RichTextLeaf'
|
|
2
|
-
import { RichTextElement } from './RichTextElement'
|
|
3
|
-
import { BuiltinElements, BuiltinLeaves } from '../builtin'
|
|
1
|
+
import { RichTextLeaf } from './RichTextLeaf.js'
|
|
2
|
+
import { RichTextElement } from './RichTextElement.js'
|
|
3
|
+
import { BuiltinElements, BuiltinLeaves } from '../builtin/index.js'
|
|
4
4
|
|
|
5
5
|
export type RichTextChild<
|
|
6
6
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RichTextLeaf } from './RichTextLeaf'
|
|
2
|
-
import { RichTextChild } from './RichTextChild'
|
|
1
|
+
import type { RichTextLeaf } from './RichTextLeaf.js'
|
|
2
|
+
import { RichTextChild } from './RichTextChild.js'
|
|
3
3
|
|
|
4
4
|
export interface RichTextElement<
|
|
5
5
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RichTextElement } from './RichTextElement'
|
|
2
|
-
import type { RichTextLeaf } from './RichTextLeaf'
|
|
3
|
-
import { RichTextChild } from './RichTextChild'
|
|
1
|
+
import type { RichTextElement } from './RichTextElement.js'
|
|
2
|
+
import type { RichTextLeaf } from './RichTextLeaf.js'
|
|
3
|
+
import { RichTextChild } from './RichTextChild.js'
|
|
4
4
|
|
|
5
5
|
export interface RootEditorNode<
|
|
6
6
|
CustomElements extends RichTextElement = never,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './RichTextChild'
|
|
2
|
-
export * from './RichTextElement'
|
|
3
|
-
export * from './RichTextLeaf'
|
|
4
|
-
export * from './RootEditorNode'
|
|
1
|
+
export * from './RichTextChild.js'
|
|
2
|
+
export * from './RichTextElement.js'
|
|
3
|
+
export * from './RichTextLeaf.js'
|
|
4
|
+
export * from './RootEditorNode.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test'
|
|
2
|
-
import { BuiltinElements } from '../src'
|
|
2
|
+
import { BuiltinElements } from '../src/index.js'
|
|
3
3
|
import { renderHook } from '@testing-library/react'
|
|
4
|
-
import { useRichTextBlocksSource } from '../src/hooks/useRichTextBlocksSource'
|
|
4
|
+
import { useRichTextBlocksSource } from '../src/hooks/useRichTextBlocksSource.js'
|
|
5
5
|
|
|
6
6
|
describe('useRichTextBlocksSource', () => {
|
|
7
7
|
const createBlock = (el: BuiltinElements) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { BuiltinElements, RichText } from '../src'
|
|
3
|
+
import { BuiltinElements, RichText } from '../src/index.js'
|
|
4
4
|
|
|
5
5
|
describe('paragraph rendering', () => {
|
|
6
6
|
const createBlock = (el: BuiltinElements) => ({
|