@usememos/editor 0.0.0-stage → 26.10.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.
- package/LICENSE +21 -0
- package/README.md +246 -2
- package/dist/base.css +218 -0
- package/dist/entities.dom.js +14 -0
- package/dist/entities.dom.js.map +7 -0
- package/dist/entities.js +17 -0
- package/dist/entities.js.map +7 -0
- package/dist/index.js +7304 -0
- package/dist/index.js.map +7 -0
- package/dist/react.js +143 -0
- package/dist/react.js.map +7 -0
- package/dist/style.css +592 -0
- package/dist/theme.css +214 -0
- package/dist/types/clipboard/fromHtml.d.ts +2 -0
- package/dist/types/clipboard/toHtml.d.ts +4 -0
- package/dist/types/commands.d.ts +168 -0
- package/dist/types/decorations.d.ts +40 -0
- package/dist/types/editor.d.ts +408 -0
- package/dist/types/extension.d.ts +70 -0
- package/dist/types/extensions/fileHandler.d.ts +28 -0
- package/dist/types/extensions/footnotes.d.ts +2 -0
- package/dist/types/extensions/keymap.d.ts +2 -0
- package/dist/types/extensions/math.d.ts +15 -0
- package/dist/types/extensions/suggestion.d.ts +51 -0
- package/dist/types/extensions/tags.d.ts +34 -0
- package/dist/types/extensions/textDecorator.d.ts +17 -0
- package/dist/types/history.d.ts +17 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/keymap.d.ts +12 -0
- package/dist/types/labels.d.ts +41 -0
- package/dist/types/markdown/ast.d.ts +129 -0
- package/dist/types/markdown/autolink.d.ts +21 -0
- package/dist/types/markdown/blocks.d.ts +4 -0
- package/dist/types/markdown/entities.d.ts +2 -0
- package/dist/types/markdown/entities.dom.d.ts +2 -0
- package/dist/types/markdown/html.d.ts +2 -0
- package/dist/types/markdown/inline.d.ts +35 -0
- package/dist/types/markdown/lower.d.ts +9 -0
- package/dist/types/markdown/options.d.ts +75 -0
- package/dist/types/markdown/parse.d.ts +4 -0
- package/dist/types/markdown/serialize.d.ts +24 -0
- package/dist/types/markdown/source.d.ts +30 -0
- package/dist/types/model.d.ts +205 -0
- package/dist/types/react/index.d.ts +47 -0
- package/dist/types/theme.d.ts +87 -0
- package/dist/types/ui/handle.d.ts +16 -0
- package/dist/types/ui/popup.d.ts +58 -0
- package/dist/types/ui/toolbar.d.ts +28 -0
- package/dist/types/view/dom.d.ts +85 -0
- package/dist/types/view/reveal.d.ts +12 -0
- package/dist/types/widgets.d.ts +26 -0
- package/package.json +58 -4
package/dist/react.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/react/index.tsx
|
|
2
|
+
import { Editor } from "@usememos/editor";
|
|
3
|
+
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var LIVE = ["placeholder", "editable", "attributes", "resolveImageSrc", "theme"];
|
|
6
|
+
var extensionKey = (extensions) => (extensions ?? []).map((e) => e.name).join("\n");
|
|
7
|
+
var MarkdownEditor = forwardRef(function MarkdownEditor2(props, ref) {
|
|
8
|
+
const container = useRef(null);
|
|
9
|
+
const editorRef = useRef(null);
|
|
10
|
+
const pending = useRef([]);
|
|
11
|
+
const deferred = useRef(null);
|
|
12
|
+
const latest = useRef(props);
|
|
13
|
+
latest.current = props;
|
|
14
|
+
const extensions = extensionKey(props.extensions);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const { value, defaultValue, onChange, onSubmit, onFocus, onBlur, className, style, ...options } = latest.current;
|
|
17
|
+
const previous = editorRef.current;
|
|
18
|
+
const editor = new Editor({
|
|
19
|
+
...options,
|
|
20
|
+
element: container.current,
|
|
21
|
+
content: previous?.getMarkdown() ?? value ?? defaultValue ?? "",
|
|
22
|
+
onChange: (markdown) => {
|
|
23
|
+
pending.current.push(markdown);
|
|
24
|
+
if (pending.current.length > 100) pending.current.shift();
|
|
25
|
+
latest.current.onChange?.(markdown);
|
|
26
|
+
},
|
|
27
|
+
onSubmit: (markdown) => latest.current.onSubmit?.(markdown),
|
|
28
|
+
onFocus: () => latest.current.onFocus?.(),
|
|
29
|
+
onBlur: () => latest.current.onBlur?.()
|
|
30
|
+
});
|
|
31
|
+
editorRef.current = editor;
|
|
32
|
+
pending.current = [];
|
|
33
|
+
assignRef(ref, editor);
|
|
34
|
+
const root = container.current;
|
|
35
|
+
const onCompositionEnd = () => {
|
|
36
|
+
const value2 = deferred.current;
|
|
37
|
+
deferred.current = null;
|
|
38
|
+
if (value2 !== null && value2 !== editor.getMarkdown()) {
|
|
39
|
+
pending.current = [];
|
|
40
|
+
editor.setMarkdown(value2);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
root.addEventListener("compositionend", onCompositionEnd);
|
|
44
|
+
return () => {
|
|
45
|
+
root.removeEventListener("compositionend", onCompositionEnd);
|
|
46
|
+
editor.destroy();
|
|
47
|
+
if (editorRef.current === editor) editorRef.current = null;
|
|
48
|
+
assignRef(ref, null);
|
|
49
|
+
};
|
|
50
|
+
}, [extensions]);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const editor = editorRef.current;
|
|
53
|
+
if (!editor || props.value === void 0) return;
|
|
54
|
+
const echo = pending.current.indexOf(props.value);
|
|
55
|
+
if (echo >= 0) {
|
|
56
|
+
pending.current.splice(0, echo + 1);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (props.value === editor.getMarkdown()) return;
|
|
60
|
+
if (editor.isComposing) {
|
|
61
|
+
deferred.current = props.value;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
pending.current = [];
|
|
65
|
+
editor.setMarkdown(props.value);
|
|
66
|
+
}, [props.value]);
|
|
67
|
+
useLiveOptions(editorRef, props);
|
|
68
|
+
return /* @__PURE__ */ jsx("div", { ref: container, className: props.className, style: props.style });
|
|
69
|
+
});
|
|
70
|
+
function useLiveOptions(editorRef, props) {
|
|
71
|
+
const applied = useRef({ editor: null, props: {} });
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
const editor = editorRef.current;
|
|
74
|
+
if (!editor) return;
|
|
75
|
+
if (applied.current.editor !== editor) {
|
|
76
|
+
applied.current = { editor, props: { ...props } };
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const changed = {};
|
|
80
|
+
let any = false;
|
|
81
|
+
for (const key of LIVE) {
|
|
82
|
+
if (props[key] === applied.current.props[key]) continue;
|
|
83
|
+
changed[key] = key === "editable" ? props.editable ?? true : props[key];
|
|
84
|
+
any = true;
|
|
85
|
+
}
|
|
86
|
+
applied.current = { editor, props: { ...props } };
|
|
87
|
+
if (any) editor.setOptions(changed);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function useEditor(options, deps = []) {
|
|
91
|
+
const [editor, setEditor] = useState(null);
|
|
92
|
+
const latest = useRef(options);
|
|
93
|
+
latest.current = options;
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
const o = latest.current;
|
|
96
|
+
const element = document.createElement("div");
|
|
97
|
+
const instance = new Editor({
|
|
98
|
+
...o,
|
|
99
|
+
element,
|
|
100
|
+
// A detached element cannot take focus; EditorContent focuses once mounted.
|
|
101
|
+
autofocus: false,
|
|
102
|
+
onChange: (markdown, e) => latest.current.onChange?.(markdown, e),
|
|
103
|
+
onSubmit: (markdown, e) => latest.current.onSubmit?.(markdown, e),
|
|
104
|
+
onFocus: (e) => latest.current.onFocus?.(e),
|
|
105
|
+
onBlur: (e) => latest.current.onBlur?.(e)
|
|
106
|
+
});
|
|
107
|
+
if (o.autofocus) pendingAutofocus.set(instance, o.autofocus === "end" ? "end" : "start");
|
|
108
|
+
setEditor(instance);
|
|
109
|
+
return () => {
|
|
110
|
+
instance.destroy();
|
|
111
|
+
setEditor(null);
|
|
112
|
+
};
|
|
113
|
+
}, deps);
|
|
114
|
+
return editor;
|
|
115
|
+
}
|
|
116
|
+
function EditorContent({ editor, className, style }) {
|
|
117
|
+
const container = useRef(null);
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
const host = container.current;
|
|
120
|
+
if (!editor || !host) return;
|
|
121
|
+
host.appendChild(editor.root);
|
|
122
|
+
const autofocus = pendingAutofocus.get(editor);
|
|
123
|
+
if (autofocus) {
|
|
124
|
+
pendingAutofocus.delete(editor);
|
|
125
|
+
editor.commands.focus(autofocus);
|
|
126
|
+
}
|
|
127
|
+
return () => {
|
|
128
|
+
if (editor.root.parentNode === host) host.removeChild(editor.root);
|
|
129
|
+
};
|
|
130
|
+
}, [editor]);
|
|
131
|
+
return /* @__PURE__ */ jsx("div", { ref: container, className, style });
|
|
132
|
+
}
|
|
133
|
+
var pendingAutofocus = /* @__PURE__ */ new WeakMap();
|
|
134
|
+
function assignRef(ref, value) {
|
|
135
|
+
if (typeof ref === "function") ref(value);
|
|
136
|
+
else if (ref) ref.current = value;
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
EditorContent,
|
|
140
|
+
MarkdownEditor,
|
|
141
|
+
useEditor
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/react/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Editor, type EditorOptions } from '@usememos/editor';\nimport { type CSSProperties, type ForwardedRef, forwardRef, useEffect, useRef, useState } from 'react';\n\nexport type { Editor } from '@usememos/editor';\n\n/** Constructor options that the React components take as props. */\ntype EditorProps = Pick<\n EditorOptions,\n | 'markdown'\n | 'extensions'\n | 'placeholder'\n | 'editable'\n | 'autofocus'\n | 'attributes'\n | 'resolveImageSrc'\n | 'theme'\n | 'toolbar'\n | 'slashMenu'\n | 'labels'\n>;\n\nexport interface MarkdownEditorProps extends EditorProps {\n /** Markdown. The editor updates only when this is not a value it emitted itself. */\n value?: string;\n /** Initial Markdown for uncontrolled use. */\n defaultValue?: string;\n /** Called after document changes, at most once per animation frame. */\n onChange?: (markdown: string) => void;\n /** Called on Mod+Enter or Ctrl+Enter with the current Markdown. */\n onSubmit?: (markdown: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Options that `setOptions` applies without recreating the editor. */\nconst LIVE = ['placeholder', 'editable', 'attributes', 'resolveImageSrc', 'theme'] as const;\n\n/** The extension list's identity for recreating the editor: names, so an inline array does not recreate it on every render. */\nconst extensionKey = (extensions: EditorOptions['extensions']) => (extensions ?? []).map((e) => e.name).join('\\n');\n\n/**\n * The editor as a controlled React component. A `ref` gives the core `Editor`.\n *\n * `placeholder`, `editable`, `attributes`, `resolveImageSrc` and `theme` update live.\n * A change to the names in `extensions` recreates the editor, keeping its\n * Markdown. Other props are read when the editor is created; change the\n * component's `key` to apply new values.\n *\n * A `value` that arrives while an input method is composing text is applied\n * when the composition ends, so it does not break the composition.\n */\nexport const MarkdownEditor = forwardRef(function MarkdownEditor(props: MarkdownEditorProps, ref: ForwardedRef<Editor | null>) {\n const container = useRef<HTMLDivElement>(null);\n const editorRef = useRef<Editor | null>(null);\n // Values the editor emitted that the parent has not passed back yet, oldest\n // first. While the user keeps typing, React may hand back an older one;\n // those echoes must not reset the document.\n const pending = useRef<string[]>([]);\n // An outside value that arrived during IME composition.\n const deferred = useRef<string | null>(null);\n // Callbacks are read through a ref so changing them does not recreate the editor.\n const latest = useRef(props);\n latest.current = props;\n const extensions = extensionKey(props.extensions);\n\n useEffect(() => {\n const { value, defaultValue, onChange, onSubmit, onFocus, onBlur, className, style, ...options } = latest.current;\n const previous = editorRef.current;\n const editor = new Editor({\n ...options,\n element: container.current!,\n content: previous?.getMarkdown() ?? value ?? defaultValue ?? '',\n onChange: (markdown) => {\n pending.current.push(markdown);\n if (pending.current.length > 100) pending.current.shift();\n latest.current.onChange?.(markdown);\n },\n onSubmit: (markdown) => latest.current.onSubmit?.(markdown),\n onFocus: () => latest.current.onFocus?.(),\n onBlur: () => latest.current.onBlur?.(),\n });\n editorRef.current = editor;\n pending.current = [];\n assignRef(ref, editor);\n const root = container.current!;\n const onCompositionEnd = () => {\n // Runs after the editor's own compositionend handler, which was added first.\n const value = deferred.current;\n deferred.current = null;\n if (value !== null && value !== editor.getMarkdown()) {\n pending.current = [];\n editor.setMarkdown(value);\n }\n };\n root.addEventListener('compositionend', onCompositionEnd);\n return () => {\n root.removeEventListener('compositionend', onCompositionEnd);\n editor.destroy();\n if (editorRef.current === editor) editorRef.current = null;\n assignRef(ref, null);\n };\n // Recreate only when the extension names change; see the note on the component.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [extensions]);\n\n useEffect(() => {\n const editor = editorRef.current;\n if (!editor || props.value === undefined) return;\n const echo = pending.current.indexOf(props.value);\n if (echo >= 0) {\n // The parent caught up to a value the editor emitted.\n pending.current.splice(0, echo + 1);\n return;\n }\n if (props.value === editor.getMarkdown()) return;\n if (editor.isComposing) {\n deferred.current = props.value;\n return;\n }\n pending.current = [];\n editor.setMarkdown(props.value);\n }, [props.value]);\n\n useLiveOptions(editorRef, props);\n\n return <div ref={container} className={props.className} style={props.style} />;\n});\n\n/** Applies the live options when they change. */\nfunction useLiveOptions(editorRef: { current: Editor | null }, props: EditorProps): void {\n const applied = useRef<{ editor: Editor | null; props: Partial<EditorProps> }>({ editor: null, props: {} });\n useEffect(() => {\n const editor = editorRef.current;\n if (!editor) return;\n if (applied.current.editor !== editor) {\n // A new editor was created with these props.\n applied.current = { editor, props: { ...props } };\n return;\n }\n const changed: Partial<Pick<EditorOptions, (typeof LIVE)[number]>> = {};\n let any = false;\n for (const key of LIVE) {\n if (props[key] === applied.current.props[key]) continue;\n (changed as Record<string, unknown>)[key] = key === 'editable' ? (props.editable ?? true) : props[key];\n any = true;\n }\n applied.current = { editor, props: { ...props } };\n if (any) editor.setOptions(changed);\n });\n}\n\n/**\n * Creates an editor for the lifetime of the component, or until a value in\n * `deps` changes. Returns null until the editor exists. Pair it with\n * `<EditorContent editor={editor} />`, which shows it.\n *\n * Callbacks in `options` are read when called, so they may change between\n * renders without recreating the editor.\n */\nexport function useEditor(options: Omit<EditorOptions, 'element'>, deps: readonly unknown[] = []): Editor | null {\n const [editor, setEditor] = useState<Editor | null>(null);\n const latest = useRef(options);\n latest.current = options;\n\n useEffect(() => {\n const o = latest.current;\n const element = document.createElement('div');\n const instance = new Editor({\n ...o,\n element,\n // A detached element cannot take focus; EditorContent focuses once mounted.\n autofocus: false,\n onChange: (markdown, e) => latest.current.onChange?.(markdown, e),\n onSubmit: (markdown, e) => latest.current.onSubmit?.(markdown, e),\n onFocus: (e) => latest.current.onFocus?.(e),\n onBlur: (e) => latest.current.onBlur?.(e),\n });\n if (o.autofocus) pendingAutofocus.set(instance, o.autofocus === 'end' ? 'end' : 'start');\n setEditor(instance);\n return () => {\n instance.destroy();\n setEditor(null);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n\n return editor;\n}\n\nexport interface EditorContentProps {\n editor: Editor | null;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Shows an editor created with `useEditor`. */\nexport function EditorContent({ editor, className, style }: EditorContentProps) {\n const container = useRef<HTMLDivElement>(null);\n useEffect(() => {\n const host = container.current;\n if (!editor || !host) return;\n host.appendChild(editor.root);\n const autofocus = pendingAutofocus.get(editor);\n if (autofocus) {\n pendingAutofocus.delete(editor);\n editor.commands.focus(autofocus);\n }\n return () => {\n if (editor.root.parentNode === host) host.removeChild(editor.root);\n };\n }, [editor]);\n return <div ref={container} className={className} style={style} />;\n}\n\n/** Where to focus an editor from `useEditor` once `EditorContent` mounts it. */\nconst pendingAutofocus = new WeakMap<Editor, 'start' | 'end'>();\n\nfunction assignRef<T>(ref: ForwardedRef<T>, value: T): void {\n if (typeof ref === 'function') ref(value);\n else if (ref) ref.current = value;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,cAAkC;AAC3C,SAAgD,YAAY,WAAW,QAAQ,gBAAgB;AA8HtF;AA1FT,IAAM,OAAO,CAAC,eAAe,YAAY,cAAc,mBAAmB,OAAO;AAGjF,IAAM,eAAe,CAAC,gBAA6C,cAAc,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAA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