@haklex/rich-ext-nested-doc 0.5.0 → 0.6.1
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.
|
@@ -3,5 +3,5 @@ import { SerializedEditorState } from 'lexical';
|
|
|
3
3
|
export declare function NestedDocRenderer({ value, variant, }: {
|
|
4
4
|
value: SerializedEditorState;
|
|
5
5
|
variant?: RichEditorVariant;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
//# sourceMappingURL=NestedDocRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedDocRenderer.d.ts","sourceRoot":"","sources":["../src/NestedDocRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"NestedDocRenderer.d.ts","sourceRoot":"","sources":["../src/NestedDocRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,kDAQA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as rendererContent, S as previewSurface, _ as dialogTitle, a as _defineProperty, b as editorArea, c as truncateEditorState, d as dialogHeader, f as dialogHeaderCloseBtn, g as dialogShell, h as dialogPopup, i as NestedDocNode, l as NestedDocRenderer, m as dialogHeaderRight, n as $createNestedDocNode, o as NestedDocStaticDecorator, p as dialogHeaderLeft, r as $isNestedDocNode, s as hasRenderableEditorState, t as NESTED_DOC_BLOCK_TRANSFORMER, u as dialogFooter, v as editOverlay, x as previewEmpty, y as editOverlayRoot } from "./transformer-
|
|
1
|
+
import { C as rendererContent, S as previewSurface, _ as dialogTitle, a as _defineProperty, b as editorArea, c as truncateEditorState, d as dialogHeader, f as dialogHeaderCloseBtn, g as dialogShell, h as dialogPopup, i as NestedDocNode, l as NestedDocRenderer, m as dialogHeaderRight, n as $createNestedDocNode, o as NestedDocStaticDecorator, p as dialogHeaderLeft, r as $isNestedDocNode, s as hasRenderableEditorState, t as NESTED_DOC_BLOCK_TRANSFORMER, u as dialogFooter, v as editOverlay, x as previewEmpty, y as editOverlayRoot } from "./transformer-BLIhdkPB.js";
|
|
2
2
|
import { editorTheme, useColorScheme } from "@haklex/rich-editor";
|
|
3
3
|
import { getResolvedEditNodes } from "@haklex/rich-editor/nodes";
|
|
4
4
|
import { $getNodeByKey, $insertNodes, COMMAND_PRIORITY_EDITOR, createCommand, createEditor } from "lexical";
|
package/dist/static.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as NestedDocNode, l as NestedDocRenderer, n as $createNestedDocNode, o as NestedDocStaticDecorator, r as $isNestedDocNode, t as NESTED_DOC_BLOCK_TRANSFORMER } from "./transformer-
|
|
1
|
+
import { i as NestedDocNode, l as NestedDocRenderer, n as $createNestedDocNode, o as NestedDocStaticDecorator, r as $isNestedDocNode, t as NESTED_DOC_BLOCK_TRANSFORMER } from "./transformer-BLIhdkPB.js";
|
|
2
2
|
//#region src/static.ts
|
|
3
3
|
var nestedDocNodes = [NestedDocNode];
|
|
4
4
|
//#endregion
|
|
@@ -2,8 +2,7 @@ import { DecoratorNode } from "lexical";
|
|
|
2
2
|
import { Maximize2 } from "lucide-react";
|
|
3
3
|
import { createElement, useCallback, useMemo } from "react";
|
|
4
4
|
import { usePortalTheme } from "@haklex/rich-style-token";
|
|
5
|
-
import { ColorSchemeProvider, NestedContentRendererProvider, extractTextContent, useColorScheme, useOptionalNestedContentRenderer, usePresentDialog,
|
|
6
|
-
import { RichRenderer } from "@haklex/rich-static-renderer";
|
|
5
|
+
import { ColorSchemeProvider, NestedContentRendererProvider, extractTextContent, useColorScheme, useOptionalNestedContentRenderer, usePresentDialog, useVariant } from "@haklex/rich-editor/static";
|
|
7
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { extractTextContent as extractTextContent$1 } from "@haklex/rich-editor/commands";
|
|
9
8
|
//#region src/styles.css.ts
|
|
@@ -29,15 +28,8 @@ var previewEmpty = "_1an6v8dn";
|
|
|
29
28
|
//#region src/NestedDocRenderer.tsx
|
|
30
29
|
function NestedDocRenderer({ value, variant = "comment" }) {
|
|
31
30
|
const renderNestedContent = useOptionalNestedContentRenderer();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (renderNestedContent) return /* @__PURE__ */ jsx(Fragment, { children: renderNestedContent(value, variant) });
|
|
35
|
-
return /* @__PURE__ */ jsx(RichRenderer, {
|
|
36
|
-
rendererConfig,
|
|
37
|
-
theme,
|
|
38
|
-
value,
|
|
39
|
-
variant
|
|
40
|
-
});
|
|
31
|
+
if (!renderNestedContent) return null;
|
|
32
|
+
return /* @__PURE__ */ jsx(Fragment, { children: renderNestedContent(value, variant) });
|
|
41
33
|
}
|
|
42
34
|
//#endregion
|
|
43
35
|
//#region src/utils.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-nested-doc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Nested document extension for haklex rich editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,9 +24,6 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@haklex/rich-static-renderer": "0.5.0"
|
|
29
|
-
},
|
|
30
27
|
"devDependencies": {
|
|
31
28
|
"@lexical/markdown": "^0.44.0",
|
|
32
29
|
"@lexical/react": "^0.44.0",
|
|
@@ -49,9 +46,9 @@
|
|
|
49
46
|
"lucide-react": "^1.0.0",
|
|
50
47
|
"react": ">=19",
|
|
51
48
|
"react-dom": ">=19",
|
|
52
|
-
"@haklex/rich-editor": "0.
|
|
53
|
-
"@haklex/rich-
|
|
54
|
-
"@haklex/rich-
|
|
49
|
+
"@haklex/rich-editor": "0.6.1",
|
|
50
|
+
"@haklex/rich-editor-ui": "0.6.1",
|
|
51
|
+
"@haklex/rich-style-token": "0.6.1"
|
|
55
52
|
},
|
|
56
53
|
"publishConfig": {
|
|
57
54
|
"access": "public"
|