@haklex/rich-editor 0.0.13 → 0.0.15
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/{RichEditor-DeAuc6CQ.js → RichEditor-CfssqZyj.js} +45 -37
- package/dist/{RichRenderer-CtBjK31O.js → RichRenderer-CCmxHoGP.js} +29 -21
- package/dist/components/RichEditor.d.ts.map +1 -1
- package/dist/components/RichRenderer.d.ts.map +1 -1
- package/dist/components/renderers/CodeBlockRenderer.d.ts +1 -1
- package/dist/components/renderers/CodeBlockRenderer.d.ts.map +1 -1
- package/dist/context/RendererConfigContext.d.ts +4 -1
- package/dist/context/RendererConfigContext.d.ts.map +1 -1
- package/dist/editor.mjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/nodes/DetailsNode.d.ts.map +1 -1
- package/dist/renderer.mjs +1 -1
- package/dist/rich-editor.css +111 -98
- package/dist/{utils-DvP2uSr7.js → utils-C0yvhBcx.js} +48 -32
- package/package.json +4 -4
|
@@ -9,7 +9,7 @@ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
|
9
9
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
10
10
|
import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
11
11
|
import { TablePlugin } from "@lexical/react/LexicalTablePlugin";
|
|
12
|
-
import {
|
|
12
|
+
import { W as $isAlertQuoteNode, X as RendererWrapper, Y as AlertRenderer, Z as AlertQuoteNode, _ as $isBannerNode, a0 as BannerRenderer, a1 as BannerNode, a2 as normalizeBannerType, a3 as $isCodeBlockNode, a4 as CodeBlockRenderer, a5 as CodeBlockNode, Q as useFootnoteDefinitions, s as FootnoteSectionNode, k as $isGridContainerNode, G as GridContainerNode, e as editorTheme, N as NESTED_EDITOR_NODES, b as builtinNodes, a6 as SpoilerNode, a7 as MentionNode, t as KaTeXInlineNode, K as KaTeXBlockNode, a8 as ImageNode, a9 as FootnoteNode, aa as VideoNode, L as LinkCardNode, ab as DetailsNode, M as MermaidNode, ac as $createAlertQuoteNode, ad as $createImageNode, ae as $createKaTeXInlineNode, af as $createKaTeXBlockNode, ag as $createBannerNode, ah as $createDetailsNode, ai as $createFootnoteNode, j as $isFootnoteSectionNode, $ as $createFootnoteSectionNode, aj as $createMentionNode, ak as $createSpoilerNode, i as $createMermaidNode, d as clsx, C as ColorSchemeProvider, R as RendererConfigProvider, F as FootnotePlugin, g as getVariantClass } from "./utils-C0yvhBcx.js";
|
|
13
13
|
import { useCallback, createElement, useState, useEffect, useRef } from "react";
|
|
14
14
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
15
15
|
import { ContentEditable as ContentEditable$1 } from "@lexical/react/LexicalContentEditable";
|
|
@@ -1037,47 +1037,55 @@ function RichEditor({
|
|
|
1037
1037
|
...initialValue ? { editorState: JSON.stringify(initialValue) } : {}
|
|
1038
1038
|
};
|
|
1039
1039
|
const variantClass = getVariantClass(variant, theme);
|
|
1040
|
-
return /* @__PURE__ */ jsx(PortalThemeProvider, { className: variantClass, children: /* @__PURE__ */ jsx(ColorSchemeProvider, { colorScheme: theme, children: /* @__PURE__ */ jsx(
|
|
1041
|
-
|
|
1040
|
+
return /* @__PURE__ */ jsx(PortalThemeProvider, { className: variantClass, children: /* @__PURE__ */ jsx(ColorSchemeProvider, { colorScheme: theme, children: /* @__PURE__ */ jsx(
|
|
1041
|
+
RendererConfigProvider,
|
|
1042
1042
|
{
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1043
|
+
config: rendererConfig,
|
|
1044
|
+
mode: "editor",
|
|
1045
|
+
variant,
|
|
1046
|
+
children: /* @__PURE__ */ jsx(LexicalComposer, { initialConfig, children: /* @__PURE__ */ jsx(FootnotePlugin, { children: /* @__PURE__ */ jsxs(
|
|
1047
|
+
"div",
|
|
1048
|
+
{
|
|
1049
|
+
className: clsx("rich-editor", variantClass, className),
|
|
1050
|
+
style,
|
|
1051
|
+
children: [
|
|
1052
|
+
/* @__PURE__ */ jsx(
|
|
1053
|
+
RichTextPlugin,
|
|
1051
1054
|
{
|
|
1052
|
-
|
|
1053
|
-
|
|
1055
|
+
contentEditable: /* @__PURE__ */ jsx(
|
|
1056
|
+
ContentEditable,
|
|
1057
|
+
{
|
|
1058
|
+
className: contentClassName,
|
|
1059
|
+
placeholder
|
|
1060
|
+
}
|
|
1061
|
+
),
|
|
1062
|
+
ErrorBoundary: LexicalErrorBoundary
|
|
1054
1063
|
}
|
|
1055
1064
|
),
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
]
|
|
1065
|
+
/* @__PURE__ */ jsx(HistoryPlugin, {}),
|
|
1066
|
+
/* @__PURE__ */ jsx(ListPlugin, {}),
|
|
1067
|
+
/* @__PURE__ */ jsx(LinkPlugin, {}),
|
|
1068
|
+
/* @__PURE__ */ jsx(TabIndentationPlugin, {}),
|
|
1069
|
+
/* @__PURE__ */ jsx(TablePlugin, {}),
|
|
1070
|
+
/* @__PURE__ */ jsx(MarkdownShortcutsPlugin, {}),
|
|
1071
|
+
/* @__PURE__ */ jsx(OnChangePlugin, { onChange, debounceMs }),
|
|
1072
|
+
/* @__PURE__ */ jsx(SubmitShortcutPlugin, { onSubmit }),
|
|
1073
|
+
/* @__PURE__ */ jsx(ImagePlugin, {}),
|
|
1074
|
+
/* @__PURE__ */ jsx(KaTeXPlugin, {}),
|
|
1075
|
+
/* @__PURE__ */ jsx(AlertPlugin, {}),
|
|
1076
|
+
/* @__PURE__ */ jsx(MermaidPlugin, {}),
|
|
1077
|
+
/* @__PURE__ */ jsx(HorizontalRulePlugin, {}),
|
|
1078
|
+
/* @__PURE__ */ jsx(CheckListPlugin, {}),
|
|
1079
|
+
/* @__PURE__ */ jsx(AutoLinkPlugin, {}),
|
|
1080
|
+
/* @__PURE__ */ jsx(EditorRefPlugin, { onEditorReady }),
|
|
1081
|
+
autoFocus && /* @__PURE__ */ jsx(AutoFocusPlugin, {}),
|
|
1082
|
+
children,
|
|
1083
|
+
actions && /* @__PURE__ */ jsx("div", { className: "rich-editor__actions", children: actions })
|
|
1084
|
+
]
|
|
1085
|
+
}
|
|
1086
|
+
) }) })
|
|
1079
1087
|
}
|
|
1080
|
-
) }) })
|
|
1088
|
+
) }) });
|
|
1081
1089
|
}
|
|
1082
1090
|
export {
|
|
1083
1091
|
ALL_TRANSFORMERS as A,
|
|
@@ -4,7 +4,7 @@ import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
|
4
4
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
5
5
|
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
6
6
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
7
|
-
import { a as allNodes, C as ColorSchemeProvider, R as RendererConfigProvider, e as editorTheme, F as FootnotePlugin, d as clsx, g as getVariantClass } from "./utils-
|
|
7
|
+
import { a as allNodes, C as ColorSchemeProvider, R as RendererConfigProvider, e as editorTheme, F as FootnotePlugin, d as clsx, g as getVariantClass } from "./utils-C0yvhBcx.js";
|
|
8
8
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
9
9
|
import { HeadingNode } from "@lexical/rich-text";
|
|
10
10
|
import { useEffect } from "react";
|
|
@@ -73,31 +73,39 @@ function RichRenderer({
|
|
|
73
73
|
console.error("[RichRenderer]", error);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
return /* @__PURE__ */ jsx(PortalThemeProvider, { className: variantClass, children: /* @__PURE__ */ jsx(ColorSchemeProvider, { colorScheme: theme, children: /* @__PURE__ */ jsx(
|
|
77
|
-
|
|
76
|
+
return /* @__PURE__ */ jsx(PortalThemeProvider, { className: variantClass, children: /* @__PURE__ */ jsx(ColorSchemeProvider, { colorScheme: theme, children: /* @__PURE__ */ jsx(
|
|
77
|
+
RendererConfigProvider,
|
|
78
78
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
config: rendererConfig,
|
|
80
|
+
mode: "renderer",
|
|
81
|
+
variant,
|
|
82
|
+
children: /* @__PURE__ */ jsx(
|
|
83
|
+
Component,
|
|
84
|
+
{
|
|
85
|
+
className: clsx("rich-content", variantClass, className),
|
|
86
|
+
style,
|
|
87
|
+
children: /* @__PURE__ */ jsx(LexicalComposer, { initialConfig, children: /* @__PURE__ */ jsxs(FootnotePlugin, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
RichTextPlugin,
|
|
87
90
|
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
contentEditable: /* @__PURE__ */ jsx(
|
|
92
|
+
ContentEditable,
|
|
93
|
+
{
|
|
94
|
+
className: "rich-content__body",
|
|
95
|
+
style: { outline: "none" },
|
|
96
|
+
"aria-placeholder": "",
|
|
97
|
+
placeholder: /* @__PURE__ */ jsx("span", { style: { display: "none" } })
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
ErrorBoundary: LexicalErrorBoundary
|
|
92
101
|
}
|
|
93
102
|
),
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
] }) })
|
|
103
|
+
/* @__PURE__ */ jsx(HeadingAnchorPlugin, {})
|
|
104
|
+
] }) })
|
|
105
|
+
}
|
|
106
|
+
)
|
|
99
107
|
}
|
|
100
|
-
) }) })
|
|
108
|
+
) }) });
|
|
101
109
|
}
|
|
102
110
|
export {
|
|
103
111
|
RichRenderer as R
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichEditor.d.ts","sourceRoot":"","sources":["../../src/components/RichEditor.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI/C,wBAAgB,UAAU,CAAC,EACzB,YAAY,EACZ,QAAQ,EACR,OAAmB,EACnB,KAAe,EACf,WAAkC,EAClC,QAAQ,EACR,SAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,OAAO,EACP,aAAa,EACb,UAAU,EACV,cAAc,EACd,UAAU,EACV,QAAQ,GACT,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"RichEditor.d.ts","sourceRoot":"","sources":["../../src/components/RichEditor.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI/C,wBAAgB,UAAU,CAAC,EACzB,YAAY,EACZ,QAAQ,EACR,OAAmB,EACnB,KAAe,EACf,WAAkC,EAClC,QAAQ,EACR,SAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,KAAK,EACL,OAAO,EACP,aAAa,EACb,UAAU,EACV,cAAc,EACd,UAAU,EACV,QAAQ,GACT,EAAE,eAAe,+BAmEjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichRenderer.d.ts","sourceRoot":"","sources":["../../src/components/RichRenderer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAGjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAmB,EACnB,KAAe,EACf,SAAS,EACT,KAAK,EACL,EAAE,EAAE,SAAiB,EACrB,cAAc,EACd,UAAU,GACX,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"RichRenderer.d.ts","sourceRoot":"","sources":["../../src/components/RichRenderer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAGjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAmB,EACnB,KAAe,EACf,SAAS,EACT,KAAK,EACL,EAAE,EAAE,SAAiB,EACrB,cAAc,EACd,UAAU,GACX,EAAE,iBAAiB,+BAiDnB"}
|
|
@@ -5,5 +5,5 @@ export interface CodeBlockRendererProps {
|
|
|
5
5
|
editable?: boolean;
|
|
6
6
|
onCodeChange?: (code: string) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function CodeBlockRenderer({ code, language, showLineNumbers, }: CodeBlockRendererProps): import("react").JSX.Element;
|
|
8
|
+
export declare function CodeBlockRenderer({ code, language, showLineNumbers: showLineNumbersProp, }: CodeBlockRendererProps): import("react").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=CodeBlockRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/CodeBlockRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeBlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/CodeBlockRenderer.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAQ,EACR,eAAe,EAAE,mBAAmB,GACrC,EAAE,sBAAsB,+BA8FxB"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { RichEditorVariant } from '../types';
|
|
2
3
|
import { RendererConfig } from '../types/renderer-config';
|
|
3
4
|
export type RendererMode = 'editor' | 'renderer';
|
|
4
5
|
export interface RendererConfigProviderProps {
|
|
5
6
|
config?: RendererConfig;
|
|
6
7
|
mode: RendererMode;
|
|
8
|
+
variant: RichEditorVariant;
|
|
7
9
|
children: ReactNode;
|
|
8
10
|
}
|
|
9
|
-
export declare function RendererConfigProvider({ config, mode, children, }: RendererConfigProviderProps): import("react").JSX.Element;
|
|
11
|
+
export declare function RendererConfigProvider({ config, mode, variant, children, }: RendererConfigProviderProps): import("react").JSX.Element;
|
|
10
12
|
export declare function useRendererConfig(): RendererConfig | undefined;
|
|
11
13
|
export declare function useRendererMode(): RendererMode;
|
|
14
|
+
export declare function useVariant(): RichEditorVariant;
|
|
12
15
|
//# sourceMappingURL=RendererConfigContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RendererConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/RendererConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"RendererConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/RendererConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAA;AAchD,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,iBAAiB,CAAA;IAC1B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE,2BAA2B,+BAU7B;AAED,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CAE9D;AAED,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED,wBAAgB,UAAU,IAAI,iBAAiB,CAE9C"}
|
package/dist/editor.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R, a, c, g, s } from "./RichEditor-
|
|
2
|
-
import { a as a2, b, c as c2 } from "./utils-
|
|
1
|
+
import { R, a, c, g, s } from "./RichEditor-CfssqZyj.js";
|
|
2
|
+
import { a as a2, b, c as c2 } from "./utils-C0yvhBcx.js";
|
|
3
3
|
export {
|
|
4
4
|
R as RichEditor,
|
|
5
5
|
a as allEditNodes,
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { ColorSchemeProvider, useColorScheme, } from './context/ColorSchemeConte
|
|
|
7
7
|
export type { FootnoteDefinitionsContextValue } from './context/FootnoteDefinitionsContext';
|
|
8
8
|
export { FootnoteDefinitionsProvider, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, } from './context/FootnoteDefinitionsContext';
|
|
9
9
|
export type { RendererMode } from './context/RendererConfigContext';
|
|
10
|
-
export { useRendererMode } from './context/RendererConfigContext';
|
|
10
|
+
export { useRendererMode, useVariant } from './context/RendererConfigContext';
|
|
11
11
|
export * from './styles';
|
|
12
12
|
export { ALL_TRANSFORMERS } from './transformers';
|
|
13
13
|
export type { RichEditorProps, RichEditorVariant, RichRendererProps, } from './types';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EACL,mBAAmB,EACnB,cAAc,GACf,MAAM,8BAA8B,CAAA;AACrC,YAAY,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAA;AAC3F,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,sCAAsC,CAAA;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A, F, I, b, d, e, f, R, a, c, g, s } from "./RichEditor-
|
|
2
|
-
import { R as R2 } from "./RichRenderer-
|
|
3
|
-
import { $, f as f2, h, i, j, k, l, m, n, o, A as A2, p, B, q, C, r, F as F2, s as s2, G, K, t, u, L, v, M, N, a as a2, w, b as b2, x, y, z, c as c2, D, E, H, I as I2, e as e2, g as g2, J, O, P, Q, S, T, U } from "./utils-
|
|
1
|
+
import { A, F, I, b, d, e, f, R, a, c, g, s } from "./RichEditor-CfssqZyj.js";
|
|
2
|
+
import { R as R2 } from "./RichRenderer-CCmxHoGP.js";
|
|
3
|
+
import { $, f as f2, h, i, j, k, l, m, n, o, A as A2, p, B, q, C, r, F as F2, s as s2, G, K, t, u, L, v, M, N, a as a2, w, b as b2, x, y, z, c as c2, D, E, H, I as I2, e as e2, g as g2, J, O, P, Q, S, T, U, V } from "./utils-C0yvhBcx.js";
|
|
4
4
|
var richContent = "r8uj4t0";
|
|
5
5
|
var articleTheme = "_17pm0gw0";
|
|
6
6
|
var commentTheme = "_17pm0gw1";
|
|
@@ -8,7 +8,7 @@ var darkArticleTheme = "_17pm0gw2";
|
|
|
8
8
|
var darkCommentTheme = "_17pm0gw3";
|
|
9
9
|
var noteTheme = "_17pm0gw4";
|
|
10
10
|
var darkNoteTheme = "_17pm0gw5";
|
|
11
|
-
var vars = { color: { text: "var(--rc-text)", textSecondary: "var(--rc-text-secondary)", bg: "var(--rc-bg)", bgSecondary: "var(--rc-bg-secondary)", border: "var(--rc-border)", accent: "var(--rc-accent)", accentLight: "var(--rc-accent-light)", link: "var(--rc-link)", codeText: "var(--rc-code-text)", codeBg: "var(--rc-code-bg)", quoteBorder: "var(--rc-quote-border)", quoteBg: "var(--rc-quote-bg)", alertInfo: "var(--rc-alert-info)", alertWarning: "var(--rc-alert-warning)", alertTip: "var(--rc-alert-tip)", alertCaution: "var(--rc-alert-caution)", alertImportant: "var(--rc-alert-important)" }, spacing: { xs: "var(--rc-space-xs)", sm: "var(--rc-space-sm)", md: "var(--rc-space-md)", lg: "var(--rc-space-lg)", xl: "var(--rc-space-xl)" }, typography: { fontFamily: "var(--rc-font-family)", fontMono: "var(--rc-font-mono)", fontSizeBase: "var(--rc-font-size-base)", fontSizeSmall: "var(--rc-font-size-small)",
|
|
11
|
+
var vars = { color: { text: "var(--rc-text)", textSecondary: "var(--rc-text-secondary)", bg: "var(--rc-bg)", bgSecondary: "var(--rc-bg-secondary)", border: "var(--rc-border)", accent: "var(--rc-accent)", accentLight: "var(--rc-accent-light)", link: "var(--rc-link)", codeText: "var(--rc-code-text)", codeBg: "var(--rc-code-bg)", quoteBorder: "var(--rc-quote-border)", quoteBg: "var(--rc-quote-bg)", alertInfo: "var(--rc-alert-info)", alertWarning: "var(--rc-alert-warning)", alertTip: "var(--rc-alert-tip)", alertCaution: "var(--rc-alert-caution)", alertImportant: "var(--rc-alert-important)" }, spacing: { xs: "var(--rc-space-xs)", sm: "var(--rc-space-sm)", md: "var(--rc-space-md)", lg: "var(--rc-space-lg)", xl: "var(--rc-space-xl)" }, typography: { fontFamily: "var(--rc-font-family)", fontMono: "var(--rc-font-mono)", fontSizeBase: "var(--rc-font-size-base)", fontSizeSmall: "var(--rc-font-size-small)", lineHeight: "var(--rc-line-height)", lineHeightTight: "var(--rc-line-height-tight)" }, borderRadius: { sm: "var(--rc-radius-sm)", md: "var(--rc-radius-md)", lg: "var(--rc-radius-lg)" }, layout: { maxWidth: "var(--rc-max-width)" } };
|
|
12
12
|
export {
|
|
13
13
|
$ as $createFootnoteSectionNode,
|
|
14
14
|
f2 as $createGridContainerNode,
|
|
@@ -76,5 +76,6 @@ export {
|
|
|
76
76
|
S as useFootnoteDisplayNumber,
|
|
77
77
|
T as useRendererConfig,
|
|
78
78
|
U as useRendererMode,
|
|
79
|
+
V as useVariant,
|
|
79
80
|
vars
|
|
80
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsNode.d.ts","sourceRoot":"","sources":["../../src/nodes/DetailsNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAA;AAChB,OAAO,EAAgB,WAAW,EAAE,MAAM,SAAS,CAAA;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"DetailsNode.d.ts","sourceRoot":"","sources":["../../src/nodes/DetailsNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAA;AAChB,OAAO,EAAgB,WAAW,EAAE,MAAM,SAAS,CAAA;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAO9D,MAAM,MAAM,qBAAqB,GAAG,MAAM,CACxC;IACE,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;CACd,EACD,qBAAqB,CACtB,CAAA;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,cAAc,EAAE,mBAAmB,EAAE,CAa3C;IAED,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW;gBAIhC,OAAO,EAAE,MAAM,EAAE,IAAI,UAAQ,EAAE,GAAG,CAAC,EAAE,OAAO;IAMxD,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW;IAkC7C,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO;IAc3D,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,qBAAqB,GAAG,WAAW;IAIrE,UAAU,IAAI,qBAAqB;IAUnC,UAAU,IAAI,MAAM;IAIpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,OAAO,IAAI,OAAO;IAIlB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAK5B,UAAU,IAAI,IAAI;IAIlB,UAAU,CAAC,OAAO,EAAE,WAAW;IAO/B,QAAQ,IAAI,OAAO;CAGpB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,WAAW,CAE7E;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,WAAW,CAErB"}
|
package/dist/renderer.mjs
CHANGED
package/dist/rich-editor.css
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--rc-alert-tip: #22c55e;
|
|
17
17
|
--rc-alert-caution: #ef4444;
|
|
18
18
|
--rc-alert-important: #a855f7;
|
|
19
|
+
--rc-max-width: 700px;
|
|
19
20
|
--rc-space-xs: 4px;
|
|
20
21
|
--rc-space-sm: 8px;
|
|
21
22
|
--rc-space-md: 16px;
|
|
@@ -25,7 +26,6 @@
|
|
|
25
26
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
26
27
|
--rc-font-size-base: 16px;
|
|
27
28
|
--rc-font-size-small: 14px;
|
|
28
|
-
--rc-font-size-large: 18px;
|
|
29
29
|
--rc-line-height: 1.7;
|
|
30
30
|
--rc-line-height-tight: 1.4;
|
|
31
31
|
--rc-radius-sm: 4px;
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
--rc-alert-tip: #22c55e;
|
|
51
51
|
--rc-alert-caution: #ef4444;
|
|
52
52
|
--rc-alert-important: #a855f7;
|
|
53
|
+
--rc-max-width: 700px;
|
|
53
54
|
--rc-space-xs: 4px;
|
|
54
55
|
--rc-space-sm: 8px;
|
|
55
56
|
--rc-space-md: 16px;
|
|
@@ -59,7 +60,6 @@
|
|
|
59
60
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
60
61
|
--rc-font-size-base: 16px;
|
|
61
62
|
--rc-font-size-small: 14px;
|
|
62
|
-
--rc-font-size-large: 18px;
|
|
63
63
|
--rc-line-height: 1.7;
|
|
64
64
|
--rc-line-height-tight: 1.4;
|
|
65
65
|
--rc-radius-sm: 4px;
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
--rc-alert-tip: #22c55e;
|
|
85
85
|
--rc-alert-caution: #ef4444;
|
|
86
86
|
--rc-alert-important: #a855f7;
|
|
87
|
+
--rc-max-width: none;
|
|
87
88
|
--rc-space-xs: 2px;
|
|
88
89
|
--rc-space-sm: 4px;
|
|
89
90
|
--rc-space-md: 10px;
|
|
@@ -93,7 +94,6 @@
|
|
|
93
94
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
94
95
|
--rc-font-size-base: 14px;
|
|
95
96
|
--rc-font-size-small: 12px;
|
|
96
|
-
--rc-font-size-large: 15px;
|
|
97
97
|
--rc-line-height: 1.5;
|
|
98
98
|
--rc-line-height-tight: 1.3;
|
|
99
99
|
--rc-radius-sm: 3px;
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
--rc-alert-tip: #4ade80;
|
|
119
119
|
--rc-alert-caution: #f87171;
|
|
120
120
|
--rc-alert-important: #c084fc;
|
|
121
|
+
--rc-max-width: 700px;
|
|
121
122
|
--rc-space-xs: 4px;
|
|
122
123
|
--rc-space-sm: 8px;
|
|
123
124
|
--rc-space-md: 16px;
|
|
@@ -127,7 +128,6 @@
|
|
|
127
128
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
128
129
|
--rc-font-size-base: 16px;
|
|
129
130
|
--rc-font-size-small: 14px;
|
|
130
|
-
--rc-font-size-large: 18px;
|
|
131
131
|
--rc-line-height: 1.7;
|
|
132
132
|
--rc-line-height-tight: 1.4;
|
|
133
133
|
--rc-radius-sm: 4px;
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
--rc-alert-tip: #4ade80;
|
|
153
153
|
--rc-alert-caution: #f87171;
|
|
154
154
|
--rc-alert-important: #c084fc;
|
|
155
|
+
--rc-max-width: none;
|
|
155
156
|
--rc-space-xs: 2px;
|
|
156
157
|
--rc-space-sm: 4px;
|
|
157
158
|
--rc-space-md: 10px;
|
|
@@ -161,7 +162,6 @@
|
|
|
161
162
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
162
163
|
--rc-font-size-base: 14px;
|
|
163
164
|
--rc-font-size-small: 12px;
|
|
164
|
-
--rc-font-size-large: 15px;
|
|
165
165
|
--rc-line-height: 1.5;
|
|
166
166
|
--rc-line-height-tight: 1.3;
|
|
167
167
|
--rc-radius-sm: 3px;
|
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
--rc-alert-tip: #22c55e;
|
|
187
187
|
--rc-alert-caution: #ef4444;
|
|
188
188
|
--rc-alert-important: #a855f7;
|
|
189
|
+
--rc-max-width: 700px;
|
|
189
190
|
--rc-space-xs: 4px;
|
|
190
191
|
--rc-space-sm: 8px;
|
|
191
192
|
--rc-space-md: 16px;
|
|
@@ -195,7 +196,6 @@
|
|
|
195
196
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
196
197
|
--rc-font-size-base: 16px;
|
|
197
198
|
--rc-font-size-small: 14px;
|
|
198
|
-
--rc-font-size-large: 18px;
|
|
199
199
|
--rc-line-height: 1.8;
|
|
200
200
|
--rc-line-height-tight: 1.4;
|
|
201
201
|
--rc-radius-sm: 4px;
|
|
@@ -220,6 +220,7 @@
|
|
|
220
220
|
--rc-alert-tip: #4ade80;
|
|
221
221
|
--rc-alert-caution: #f87171;
|
|
222
222
|
--rc-alert-important: #c084fc;
|
|
223
|
+
--rc-max-width: 700px;
|
|
223
224
|
--rc-space-xs: 4px;
|
|
224
225
|
--rc-space-sm: 8px;
|
|
225
226
|
--rc-space-md: 16px;
|
|
@@ -229,7 +230,6 @@
|
|
|
229
230
|
--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
|
230
231
|
--rc-font-size-base: 16px;
|
|
231
232
|
--rc-font-size-small: 14px;
|
|
232
|
-
--rc-font-size-large: 18px;
|
|
233
233
|
--rc-line-height: 1.8;
|
|
234
234
|
--rc-line-height-tight: 1.4;
|
|
235
235
|
--rc-radius-sm: 4px;
|
|
@@ -678,25 +678,32 @@
|
|
|
678
678
|
pointer-events: none;
|
|
679
679
|
z-index: 10;
|
|
680
680
|
}
|
|
681
|
+
.r8uj4t0 .rich-alert {
|
|
682
|
+
margin: 2em 0;
|
|
683
|
+
padding: 0 1em;
|
|
684
|
+
background-color: transparent;
|
|
685
|
+
border: none;
|
|
686
|
+
border-radius: 0;
|
|
687
|
+
}
|
|
681
688
|
.r8uj4t0 > *:first-child, .r8uj4t0 .rich-editor__content > *:first-child {
|
|
682
689
|
margin-top: 0;
|
|
683
690
|
}
|
|
684
691
|
.r8uj4t0 > *:last-child, .r8uj4t0 .rich-editor__content > *:last-child {
|
|
685
692
|
margin-bottom: 0;
|
|
686
693
|
}.v10dui0 {
|
|
687
|
-
max-width:
|
|
688
|
-
font-size: var(--rc-font-size-
|
|
689
|
-
line-height: 1.
|
|
694
|
+
max-width: 700px;
|
|
695
|
+
font-size: var(--rc-font-size-base);
|
|
696
|
+
line-height: 1.75;
|
|
690
697
|
color: var(--rc-text);
|
|
691
698
|
}
|
|
692
699
|
.v10dui0 .rich-paragraph {
|
|
693
|
-
margin-top: 1.
|
|
694
|
-
margin-bottom: 1.
|
|
700
|
+
margin-top: 1.5em;
|
|
701
|
+
margin-bottom: 1.5em;
|
|
695
702
|
}
|
|
696
703
|
.v10dui0 .rich-heading-h1 {
|
|
697
704
|
color: var(--rc-text);
|
|
698
705
|
font-weight: 800;
|
|
699
|
-
font-size:
|
|
706
|
+
font-size: 3em;
|
|
700
707
|
margin-top: 0;
|
|
701
708
|
margin-bottom: 0.8333333333333334em;
|
|
702
709
|
line-height: 1;
|
|
@@ -704,7 +711,7 @@
|
|
|
704
711
|
.v10dui0 .rich-heading-h2 {
|
|
705
712
|
color: var(--rc-text);
|
|
706
713
|
font-weight: 700;
|
|
707
|
-
font-size: 1.
|
|
714
|
+
font-size: 1.875em;
|
|
708
715
|
margin-top: 1.8666666666666667em;
|
|
709
716
|
margin-bottom: 1.0666666666666667em;
|
|
710
717
|
line-height: 1.3333333;
|
|
@@ -712,7 +719,7 @@
|
|
|
712
719
|
.v10dui0 .rich-heading-h3 {
|
|
713
720
|
color: var(--rc-text);
|
|
714
721
|
font-weight: 600;
|
|
715
|
-
font-size: 1.
|
|
722
|
+
font-size: 1.5em;
|
|
716
723
|
margin-top: 1.6666666666666667em;
|
|
717
724
|
margin-bottom: 0.6666666666666666em;
|
|
718
725
|
line-height: 1.5;
|
|
@@ -720,9 +727,9 @@
|
|
|
720
727
|
.v10dui0 .rich-heading-h4 {
|
|
721
728
|
color: var(--rc-text);
|
|
722
729
|
font-weight: 600;
|
|
723
|
-
margin-top:
|
|
724
|
-
margin-bottom: 0.
|
|
725
|
-
line-height: 1.
|
|
730
|
+
margin-top: 2em;
|
|
731
|
+
margin-bottom: 0.5em;
|
|
732
|
+
line-height: 1.5625;
|
|
726
733
|
}
|
|
727
734
|
.v10dui0 .rich-heading-h2 + *, .v10dui0 .rich-heading-h3 + *, .v10dui0 .rich-heading-h4 + * {
|
|
728
735
|
margin-top: 0;
|
|
@@ -734,9 +741,9 @@
|
|
|
734
741
|
border-left-width: 0.25rem;
|
|
735
742
|
border-left-style: solid;
|
|
736
743
|
border-left-color: var(--rc-quote-border);
|
|
737
|
-
margin-top: 2.
|
|
738
|
-
margin-bottom: 2.
|
|
739
|
-
padding-left: 1.
|
|
744
|
+
margin-top: 2.5em;
|
|
745
|
+
margin-bottom: 2.5em;
|
|
746
|
+
padding-left: 1.5em;
|
|
740
747
|
background-color: transparent;
|
|
741
748
|
border-radius: 0;
|
|
742
749
|
quotes: "\201C""\201D""\2018""\2019";
|
|
@@ -756,7 +763,7 @@
|
|
|
756
763
|
.v10dui0 .rich-text-code {
|
|
757
764
|
color: var(--rc-text);
|
|
758
765
|
font-weight: 600;
|
|
759
|
-
font-size: 0.
|
|
766
|
+
font-size: 0.875em;
|
|
760
767
|
background-color: var(--rc-code-bg);
|
|
761
768
|
padding: 0.2em 0.4em;
|
|
762
769
|
border-radius: var(--rc-radius-sm);
|
|
@@ -773,7 +780,7 @@
|
|
|
773
780
|
border-radius: 0.375rem;
|
|
774
781
|
margin-top: 2em;
|
|
775
782
|
margin-bottom: 2em;
|
|
776
|
-
font-size: 0.
|
|
783
|
+
font-size: 0.875em;
|
|
777
784
|
line-height: 1.75;
|
|
778
785
|
}
|
|
779
786
|
.v10dui0 .rich-code-block pre {
|
|
@@ -784,33 +791,33 @@
|
|
|
784
791
|
margin: 0;
|
|
785
792
|
}
|
|
786
793
|
.v10dui0 .rich-list-ul, .v10dui0 .rich-list-ol {
|
|
787
|
-
margin-top: 1.
|
|
788
|
-
margin-bottom: 1.
|
|
789
|
-
padding-left: 1.
|
|
794
|
+
margin-top: 1.5em;
|
|
795
|
+
margin-bottom: 1.5em;
|
|
796
|
+
padding-left: 1.75em;
|
|
790
797
|
}
|
|
791
798
|
.v10dui0 .rich-list-item {
|
|
792
|
-
margin-top: 0.
|
|
793
|
-
margin-bottom: 0.
|
|
794
|
-
padding-left: 0.
|
|
799
|
+
margin-top: 0.75em;
|
|
800
|
+
margin-bottom: 0.75em;
|
|
801
|
+
padding-left: 0.5em;
|
|
795
802
|
}
|
|
796
803
|
.v10dui0 .rich-list-item .rich-paragraph {
|
|
797
|
-
margin-top:
|
|
798
|
-
margin-bottom:
|
|
804
|
+
margin-top: 1em;
|
|
805
|
+
margin-bottom: 1em;
|
|
799
806
|
}
|
|
800
807
|
.v10dui0 .rich-list-item > .rich-paragraph:first-child {
|
|
801
|
-
margin-top: 1.
|
|
808
|
+
margin-top: 1.5em;
|
|
802
809
|
}
|
|
803
810
|
.v10dui0 .rich-list-item > .rich-paragraph:last-child {
|
|
804
|
-
margin-bottom: 1.
|
|
811
|
+
margin-bottom: 1.5em;
|
|
805
812
|
}
|
|
806
813
|
.v10dui0 .rich-list-ul .rich-list-ul, .v10dui0 .rich-list-ul .rich-list-ol, .v10dui0 .rich-list-ol .rich-list-ul, .v10dui0 .rich-list-ol .rich-list-ol {
|
|
807
|
-
margin-top:
|
|
808
|
-
margin-bottom:
|
|
814
|
+
margin-top: 1em;
|
|
815
|
+
margin-bottom: 1em;
|
|
809
816
|
}
|
|
810
817
|
.v10dui0 .rich-table {
|
|
811
|
-
margin-top:
|
|
812
|
-
margin-bottom:
|
|
813
|
-
font-size: 0.
|
|
818
|
+
margin-top: 2em;
|
|
819
|
+
margin-bottom: 2em;
|
|
820
|
+
font-size: 0.875em;
|
|
814
821
|
line-height: 1.5;
|
|
815
822
|
}
|
|
816
823
|
.v10dui0 .rich-table .rich-paragraph {
|
|
@@ -819,8 +826,8 @@
|
|
|
819
826
|
line-height: inherit;
|
|
820
827
|
}
|
|
821
828
|
.v10dui0 .rich-image {
|
|
822
|
-
margin-top:
|
|
823
|
-
margin-bottom:
|
|
829
|
+
margin-top: 2em;
|
|
830
|
+
margin-bottom: 2em;
|
|
824
831
|
}
|
|
825
832
|
.v10dui0 .rich-image > * {
|
|
826
833
|
margin-top: 0;
|
|
@@ -828,15 +835,15 @@
|
|
|
828
835
|
}
|
|
829
836
|
.v10dui0 .rich-image figcaption {
|
|
830
837
|
color: var(--rc-text-secondary);
|
|
831
|
-
font-size: 0.
|
|
838
|
+
font-size: 0.875em;
|
|
832
839
|
line-height: 1.5;
|
|
833
840
|
margin-top: 1em;
|
|
834
841
|
}
|
|
835
842
|
.v10dui0 .rich-hr {
|
|
836
843
|
border-color: var(--rc-border);
|
|
837
844
|
border-top-width: 1px;
|
|
838
|
-
margin-top: 3.
|
|
839
|
-
margin-bottom: 3.
|
|
845
|
+
margin-top: 3.5em;
|
|
846
|
+
margin-bottom: 3.5em;
|
|
840
847
|
width: 60px;
|
|
841
848
|
margin-left: auto;
|
|
842
849
|
margin-right: auto;
|
|
@@ -849,20 +856,13 @@
|
|
|
849
856
|
text-decoration: underline;
|
|
850
857
|
}
|
|
851
858
|
.v10dui0 .rich-banner {
|
|
852
|
-
margin:
|
|
853
|
-
}
|
|
854
|
-
.v10dui0 .rich-alert {
|
|
855
|
-
margin: 1.7777777777777777em 0;
|
|
856
|
-
padding: 0 0.8888888888888888em;
|
|
857
|
-
background-color: transparent;
|
|
858
|
-
border-left-width: 0.25rem;
|
|
859
|
-
border-radius: 0;
|
|
859
|
+
margin: 2em 0;
|
|
860
860
|
}
|
|
861
861
|
.v10dui0 .rich-code-snippet {
|
|
862
|
-
margin:
|
|
862
|
+
margin: 2em 0;
|
|
863
863
|
}
|
|
864
864
|
.v10dui0 .rich-details {
|
|
865
|
-
margin:
|
|
865
|
+
margin: 2em 0;
|
|
866
866
|
}
|
|
867
867
|
.v10dui0 > *:first-child {
|
|
868
868
|
margin-top: 0;
|
|
@@ -933,6 +933,9 @@
|
|
|
933
933
|
._14ko36c0 .rich-code-block pre {
|
|
934
934
|
padding: var(--rc-space-sm);
|
|
935
935
|
}
|
|
936
|
+
._14ko36c0 .line::before {
|
|
937
|
+
display: none !important;
|
|
938
|
+
}
|
|
936
939
|
._14ko36c0 .rich-table {
|
|
937
940
|
margin: var(--rc-space-sm) 0;
|
|
938
941
|
font-size: var(--rc-font-size-small);
|
|
@@ -954,37 +957,42 @@
|
|
|
954
957
|
}
|
|
955
958
|
._14ko36c0 .rich-alert {
|
|
956
959
|
padding: var(--rc-space-sm) var(--rc-space-md);
|
|
960
|
+
padding-left: var(--rc-space-lg);
|
|
957
961
|
margin: var(--rc-space-sm) 0;
|
|
958
|
-
border-left-width: 3px;
|
|
959
962
|
}
|
|
960
963
|
._14ko36c0 .rich-katex-block {
|
|
961
964
|
padding: var(--rc-space-sm) 0;
|
|
962
965
|
margin: var(--rc-space-sm) 0;
|
|
963
966
|
}.ys4fw90 {
|
|
964
|
-
max-width:
|
|
965
|
-
font-size: var(--rc-font-size-
|
|
967
|
+
max-width: var(--rc-max-width);
|
|
968
|
+
font-size: var(--rc-font-size-base);
|
|
966
969
|
line-height: 1.8;
|
|
967
970
|
color: var(--rc-text);
|
|
968
971
|
}
|
|
969
|
-
.ys4fw90 .rich-paragraph {
|
|
972
|
+
.ys4fw90 > .rich-paragraph, .ys4fw90 .rich-editor__content > .rich-paragraph, .ys4fw90 .rich-content__body > .rich-paragraph {
|
|
970
973
|
margin-top: 1.25em;
|
|
971
974
|
margin-bottom: 1.25em;
|
|
972
975
|
line-height: 1.8;
|
|
973
976
|
}
|
|
974
|
-
.ys4fw90 .rich-paragraph:first-
|
|
977
|
+
.ys4fw90 > .rich-paragraph:first-of-type, .ys4fw90 .rich-editor__content > .rich-paragraph:first-of-type, .ys4fw90 .rich-content__body > .rich-paragraph:first-of-type {
|
|
975
978
|
margin-top: 0;
|
|
976
979
|
margin-bottom: 2rem;
|
|
977
980
|
}
|
|
978
|
-
.ys4fw90 .rich-paragraph:not(:first-child) {
|
|
979
|
-
|
|
981
|
+
.ys4fw90 > .rich-paragraph:not(:first-of-type) > [data-lexical-text]:first-child, .ys4fw90 .rich-editor__content > .rich-paragraph:not(:first-of-type) > [data-lexical-text]:first-child, .ys4fw90 .rich-content__body > .rich-paragraph:not(:first-of-type) > [data-lexical-text]:first-child {
|
|
982
|
+
margin-inline-start: 2rem;
|
|
980
983
|
}
|
|
981
|
-
.ys4fw90 .rich-paragraph:first-
|
|
984
|
+
.ys4fw90 > .rich-paragraph:first-of-type::first-letter, .ys4fw90 .rich-content__body > .rich-paragraph:first-of-type::first-letter {
|
|
982
985
|
float: left;
|
|
983
986
|
font-size: 2.4em;
|
|
984
987
|
margin-right: 0.2em;
|
|
985
988
|
line-height: 1;
|
|
986
989
|
}
|
|
987
|
-
.ys4fw90 .rich-paragraph:
|
|
990
|
+
.ys4fw90 .rich-editor__content > .rich-paragraph:first-of-type::first-letter {
|
|
991
|
+
font-size: 1.5em;
|
|
992
|
+
font-weight: 700;
|
|
993
|
+
color: var(--rc-accent);
|
|
994
|
+
}
|
|
995
|
+
.ys4fw90 > .rich-paragraph:last-child, .ys4fw90 .rich-editor__content > .rich-paragraph:last-child, .ys4fw90 .rich-content__body > .rich-paragraph:last-child {
|
|
988
996
|
margin-bottom: 0;
|
|
989
997
|
}
|
|
990
998
|
.ys4fw90 .rich-text-bold {
|
|
@@ -1075,12 +1083,6 @@
|
|
|
1075
1083
|
padding-right: 2em;
|
|
1076
1084
|
border-radius: 0;
|
|
1077
1085
|
}
|
|
1078
|
-
.ys4fw90 .rich-quote p:first-of-type {
|
|
1079
|
-
text-indent: 0;
|
|
1080
|
-
}
|
|
1081
|
-
.ys4fw90 .rich-quote .rich-paragraph {
|
|
1082
|
-
text-indent: 0;
|
|
1083
|
-
}
|
|
1084
1086
|
.ys4fw90 .rich-quote .rich-paragraph:first-child::first-letter {
|
|
1085
1087
|
float: none;
|
|
1086
1088
|
font-size: inherit;
|
|
@@ -1146,6 +1148,11 @@
|
|
|
1146
1148
|
padding: 0;
|
|
1147
1149
|
line-height: inherit;
|
|
1148
1150
|
}
|
|
1151
|
+
.ys4fw90 .rich-table .rich-paragraph:first-child::first-letter {
|
|
1152
|
+
float: none;
|
|
1153
|
+
font-size: inherit;
|
|
1154
|
+
margin-right: 0;
|
|
1155
|
+
}
|
|
1149
1156
|
.ys4fw90 .rich-image {
|
|
1150
1157
|
margin-top: 2em;
|
|
1151
1158
|
margin-bottom: 2em;
|
|
@@ -1170,24 +1177,6 @@
|
|
|
1170
1177
|
margin-left: auto;
|
|
1171
1178
|
margin-right: auto;
|
|
1172
1179
|
}
|
|
1173
|
-
.ys4fw90 .rich-alert {
|
|
1174
|
-
padding: 1em 1.5em;
|
|
1175
|
-
margin-top: 1.6em;
|
|
1176
|
-
margin-bottom: 1.6em;
|
|
1177
|
-
border-left-width: 0.25rem;
|
|
1178
|
-
border-left-style: solid;
|
|
1179
|
-
border-radius: 0 var(--rc-radius-sm) var(--rc-radius-sm) 0;
|
|
1180
|
-
background-color: var(--rc-bg-secondary);
|
|
1181
|
-
}
|
|
1182
|
-
.ys4fw90 .rich-alert .rich-paragraph:first-child::first-letter {
|
|
1183
|
-
float: none;
|
|
1184
|
-
font-size: inherit;
|
|
1185
|
-
margin-right: 0;
|
|
1186
|
-
}
|
|
1187
|
-
.ys4fw90 .rich-alert-header {
|
|
1188
|
-
margin-bottom: 0.75em;
|
|
1189
|
-
font-size: 0.875em;
|
|
1190
|
-
}
|
|
1191
1180
|
.ys4fw90 .rich-katex-block {
|
|
1192
1181
|
margin-top: 1.6em;
|
|
1193
1182
|
margin-bottom: 1.6em;
|
|
@@ -1225,17 +1214,25 @@
|
|
|
1225
1214
|
}.r8uj4t0 .rich-details {
|
|
1226
1215
|
margin: var(--rc-space-md) 0;
|
|
1227
1216
|
border: none;
|
|
1217
|
+
interpolate-size: allow-keywords;
|
|
1228
1218
|
}
|
|
1229
1219
|
.r8uj4t0 .rich-details-summary {
|
|
1230
1220
|
display: flex;
|
|
1231
|
-
width: 100%;
|
|
1232
|
-
cursor: pointer;
|
|
1233
1221
|
align-items: center;
|
|
1234
1222
|
justify-content: space-between;
|
|
1235
|
-
|
|
1223
|
+
gap: 1rem;
|
|
1224
|
+
cursor: pointer;
|
|
1236
1225
|
user-select: none;
|
|
1237
|
-
font-weight:
|
|
1238
|
-
|
|
1226
|
+
font-weight: 500;
|
|
1227
|
+
font-size: 0.9375rem;
|
|
1228
|
+
line-height: 1.5;
|
|
1229
|
+
padding: 0.75rem 0;
|
|
1230
|
+
color: var(--rc-text);
|
|
1231
|
+
list-style: none;
|
|
1232
|
+
transition: color 0.2s ease;
|
|
1233
|
+
}
|
|
1234
|
+
.r8uj4t0 .rich-details-summary:hover {
|
|
1235
|
+
opacity: 0.8;
|
|
1239
1236
|
}
|
|
1240
1237
|
.r8uj4t0 .rich-details-summary::-webkit-details-marker {
|
|
1241
1238
|
display: none;
|
|
@@ -1245,23 +1242,39 @@
|
|
|
1245
1242
|
display: none;
|
|
1246
1243
|
}
|
|
1247
1244
|
.r8uj4t0 .rich-details-summary-text {
|
|
1248
|
-
flex: 1
|
|
1249
|
-
min-width: 0;
|
|
1250
|
-
overflow: hidden;
|
|
1251
|
-
text-overflow: ellipsis;
|
|
1252
|
-
white-space: nowrap;
|
|
1245
|
+
flex: 1;
|
|
1253
1246
|
}
|
|
1254
1247
|
.r8uj4t0 .rich-details-chevron {
|
|
1255
1248
|
display: inline-flex;
|
|
1256
1249
|
flex-shrink: 0;
|
|
1257
1250
|
color: var(--rc-text-secondary);
|
|
1258
|
-
transition: transform 0.
|
|
1251
|
+
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1259
1252
|
}
|
|
1260
1253
|
.r8uj4t0 .rich-details[open] .rich-details-chevron {
|
|
1261
1254
|
transform: rotate(180deg);
|
|
1262
1255
|
}
|
|
1256
|
+
.r8uj4t0 .rich-details::details-content {
|
|
1257
|
+
display: block;
|
|
1258
|
+
height: 0;
|
|
1259
|
+
overflow: hidden;
|
|
1260
|
+
opacity: 0;
|
|
1261
|
+
content-visibility: hidden;
|
|
1262
|
+
transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), content-visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1) allow-discrete;
|
|
1263
|
+
}
|
|
1264
|
+
.r8uj4t0 .rich-details[open]::details-content {
|
|
1265
|
+
height: auto;
|
|
1266
|
+
opacity: 1;
|
|
1267
|
+
content-visibility: visible;
|
|
1268
|
+
}
|
|
1263
1269
|
.r8uj4t0 .rich-details-content {
|
|
1264
|
-
padding:
|
|
1270
|
+
padding: 0 0 0.75rem;
|
|
1271
|
+
color: var(--rc-text-secondary);
|
|
1272
|
+
}
|
|
1273
|
+
[contenteditable="true"] .rich-details-content {
|
|
1274
|
+
background-color: var(--rc-bg-secondary);
|
|
1275
|
+
border-radius: var(--rc-radius-sm);
|
|
1276
|
+
padding: var(--rc-space-sm) var(--rc-space-md);
|
|
1277
|
+
margin-top: var(--rc-space-xs);
|
|
1265
1278
|
}
|
|
1266
1279
|
.r8uj4t0 .rich-details-content > .rich-paragraph:first-child {
|
|
1267
1280
|
margin-top: 0;
|
|
@@ -8,7 +8,7 @@ import { ListNode, ListItemNode } from "@lexical/list";
|
|
|
8
8
|
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
9
9
|
import { TableNode, TableCellNode, TableRowNode } from "@lexical/table";
|
|
10
10
|
import { DecoratorNode, ElementNode, $insertNodes, $getRoot, createEditor, $getNodeByKey, $nodesOfType } from "lexical";
|
|
11
|
-
import { OctagonAlert, TriangleAlert, MessageSquareWarning, Lightbulb, Info, Flag, Code,
|
|
11
|
+
import { OctagonAlert, TriangleAlert, MessageSquareWarning, Lightbulb, Info, Flag, Code, ChevronRight, LayoutGrid, ImageIcon, Sigma, Link, Workflow, Video } from "lucide-react";
|
|
12
12
|
import { createContext, use, useMemo, createElement, useCallback, useState, useEffect, useRef } from "react";
|
|
13
13
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
14
14
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
@@ -21,14 +21,19 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
|
|
|
21
21
|
import { TooltipRoot, TooltipTrigger, TooltipContent } from "@haklex/rich-editor-ui";
|
|
22
22
|
const RendererConfigContext = createContext({
|
|
23
23
|
config: void 0,
|
|
24
|
-
mode: "renderer"
|
|
24
|
+
mode: "renderer",
|
|
25
|
+
variant: "article"
|
|
25
26
|
});
|
|
26
27
|
function RendererConfigProvider({
|
|
27
28
|
config,
|
|
28
29
|
mode,
|
|
30
|
+
variant,
|
|
29
31
|
children
|
|
30
32
|
}) {
|
|
31
|
-
const value = useMemo(
|
|
33
|
+
const value = useMemo(
|
|
34
|
+
() => ({ config, mode, variant }),
|
|
35
|
+
[config, mode, variant]
|
|
36
|
+
);
|
|
32
37
|
return /* @__PURE__ */ jsx(RendererConfigContext.Provider, { value, children });
|
|
33
38
|
}
|
|
34
39
|
function useRendererConfig() {
|
|
@@ -37,6 +42,9 @@ function useRendererConfig() {
|
|
|
37
42
|
function useRendererMode() {
|
|
38
43
|
return use(RendererConfigContext).mode;
|
|
39
44
|
}
|
|
45
|
+
function useVariant() {
|
|
46
|
+
return use(RendererConfigContext).variant;
|
|
47
|
+
}
|
|
40
48
|
function RendererWrapper({
|
|
41
49
|
rendererKey,
|
|
42
50
|
defaultRenderer: DefaultRenderer,
|
|
@@ -855,8 +863,10 @@ function loadCodeToHtml() {
|
|
|
855
863
|
function CodeBlockRenderer({
|
|
856
864
|
code,
|
|
857
865
|
language,
|
|
858
|
-
showLineNumbers
|
|
866
|
+
showLineNumbers: showLineNumbersProp
|
|
859
867
|
}) {
|
|
868
|
+
const variant = useVariant();
|
|
869
|
+
const showLineNumbers = showLineNumbersProp ?? variant !== "comment";
|
|
860
870
|
const colorScheme = useColorScheme();
|
|
861
871
|
const shikiTheme = colorScheme === "dark" ? "github-dark" : "github-light";
|
|
862
872
|
const [highlightedHtml, setHighlightedHtml] = useState(null);
|
|
@@ -1030,7 +1040,7 @@ function createLucideSvg(iconNode, attrs = {}) {
|
|
|
1030
1040
|
}
|
|
1031
1041
|
return svg;
|
|
1032
1042
|
}
|
|
1033
|
-
const ChevronDownIconNode =
|
|
1043
|
+
const ChevronDownIconNode = [["path", { d: "M6 8L10 12L14 8" }]];
|
|
1034
1044
|
const _DetailsNode = class _DetailsNode extends ElementNode {
|
|
1035
1045
|
constructor(summary, open = false, key) {
|
|
1036
1046
|
super(key);
|
|
@@ -1060,7 +1070,12 @@ const _DetailsNode = class _DetailsNode extends ElementNode {
|
|
|
1060
1070
|
const chevron = document.createElement("span");
|
|
1061
1071
|
chevron.className = "rich-details-chevron";
|
|
1062
1072
|
chevron.append(
|
|
1063
|
-
createLucideSvg(ChevronDownIconNode, {
|
|
1073
|
+
createLucideSvg(ChevronDownIconNode, {
|
|
1074
|
+
width: "20",
|
|
1075
|
+
height: "20",
|
|
1076
|
+
viewBox: "0 0 20 20",
|
|
1077
|
+
"stroke-width": "1.5"
|
|
1078
|
+
})
|
|
1064
1079
|
);
|
|
1065
1080
|
summary.append(chevron);
|
|
1066
1081
|
const content = document.createElement("div");
|
|
@@ -2281,33 +2296,34 @@ export {
|
|
|
2281
2296
|
useFootnoteDisplayNumber as S,
|
|
2282
2297
|
useRendererConfig as T,
|
|
2283
2298
|
useRendererMode as U,
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2299
|
+
useVariant as V,
|
|
2300
|
+
$isAlertQuoteNode as W,
|
|
2301
|
+
RendererWrapper as X,
|
|
2302
|
+
AlertRenderer as Y,
|
|
2303
|
+
AlertQuoteNode as Z,
|
|
2304
|
+
$isBannerNode as _,
|
|
2290
2305
|
allNodes as a,
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
$
|
|
2304
|
-
$
|
|
2305
|
-
$
|
|
2306
|
-
$
|
|
2307
|
-
$
|
|
2308
|
-
$
|
|
2309
|
-
$
|
|
2310
|
-
$
|
|
2306
|
+
BannerRenderer as a0,
|
|
2307
|
+
BannerNode as a1,
|
|
2308
|
+
normalizeBannerType as a2,
|
|
2309
|
+
$isCodeBlockNode as a3,
|
|
2310
|
+
CodeBlockRenderer as a4,
|
|
2311
|
+
CodeBlockNode as a5,
|
|
2312
|
+
SpoilerNode as a6,
|
|
2313
|
+
MentionNode as a7,
|
|
2314
|
+
ImageNode as a8,
|
|
2315
|
+
FootnoteNode as a9,
|
|
2316
|
+
VideoNode as aa,
|
|
2317
|
+
DetailsNode as ab,
|
|
2318
|
+
$createAlertQuoteNode as ac,
|
|
2319
|
+
$createImageNode as ad,
|
|
2320
|
+
$createKaTeXInlineNode as ae,
|
|
2321
|
+
$createKaTeXBlockNode as af,
|
|
2322
|
+
$createBannerNode as ag,
|
|
2323
|
+
$createDetailsNode as ah,
|
|
2324
|
+
$createFootnoteNode as ai,
|
|
2325
|
+
$createMentionNode as aj,
|
|
2326
|
+
$createSpoilerNode as ak,
|
|
2311
2327
|
builtinNodes as b,
|
|
2312
2328
|
customNodes as c,
|
|
2313
2329
|
clsx as d,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"thumbhash": "^0.1.1",
|
|
28
|
-
"@haklex/rich-editor-ui": "0.0.
|
|
29
|
-
"@haklex/rich-headless": "0.0.
|
|
30
|
-
"@haklex/rich-style-token": "0.0.
|
|
28
|
+
"@haklex/rich-editor-ui": "0.0.15",
|
|
29
|
+
"@haklex/rich-headless": "0.0.15",
|
|
30
|
+
"@haklex/rich-style-token": "0.0.15"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@base-ui/react": "^1.1.0",
|