@llui/markdown-editor 0.2.14 → 0.4.0
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/editor.d.ts +22 -2
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +45 -6
- package/dist/editor.js.map +1 -1
- package/dist/effects.d.ts +0 -1
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js +4 -1
- package/dist/effects.js.map +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/plugins/block-drag.d.ts +73 -0
- package/dist/plugins/block-drag.d.ts.map +1 -0
- package/dist/plugins/block-drag.js +760 -0
- package/dist/plugins/block-drag.js.map +1 -0
- package/dist/plugins/code-language.d.ts +60 -0
- package/dist/plugins/code-language.d.ts.map +1 -0
- package/dist/plugins/code-language.js +308 -0
- package/dist/plugins/code-language.js.map +1 -0
- package/dist/plugins/frontmatter.d.ts +45 -0
- package/dist/plugins/frontmatter.d.ts.map +1 -0
- package/dist/plugins/frontmatter.js +281 -0
- package/dist/plugins/frontmatter.js.map +1 -0
- package/dist/plugins/overlay.d.ts +1 -0
- package/dist/plugins/overlay.d.ts.map +1 -1
- package/dist/plugins/overlay.js +7 -0
- package/dist/plugins/overlay.js.map +1 -1
- package/dist/plugins/table.d.ts.map +1 -1
- package/dist/plugins/table.js +77 -15
- package/dist/plugins/table.js.map +1 -1
- package/dist/plugins/wikilink.d.ts +91 -0
- package/dist/plugins/wikilink.d.ts.map +1 -0
- package/dist/plugins/wikilink.js +467 -0
- package/dist/plugins/wikilink.js.map +1 -0
- package/dist/styles/block-drag.css +63 -0
- package/dist/styles/editor.css +64 -6
- package/dist/theme.d.ts +2 -5
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +15 -11
- package/dist/theme.js.map +1 -1
- package/dist/transformers/code.d.ts +24 -0
- package/dist/transformers/code.d.ts.map +1 -0
- package/dist/transformers/code.js +167 -0
- package/dist/transformers/code.js.map +1 -0
- package/dist/transformers/gfm.d.ts +9 -1
- package/dist/transformers/gfm.d.ts.map +1 -1
- package/dist/transformers/gfm.js +16 -4
- package/dist/transformers/gfm.js.map +1 -1
- package/dist/transformers/registry.d.ts +3 -0
- package/dist/transformers/registry.d.ts.map +1 -1
- package/dist/transformers/registry.js +26 -0
- package/dist/transformers/registry.js.map +1 -1
- package/package.json +45 -31
- package/src/editor.ts +77 -9
- package/src/effects.ts +4 -2
- package/src/index.ts +61 -9
- package/src/plugins/block-drag.ts +912 -0
- package/src/plugins/code-language.ts +378 -0
- package/src/plugins/frontmatter.ts +324 -0
- package/src/plugins/overlay.ts +7 -0
- package/src/plugins/table.ts +87 -13
- package/src/plugins/wikilink.ts +553 -0
- package/src/styles/block-drag.css +63 -0
- package/src/styles/editor.css +64 -6
- package/src/theme.ts +15 -11
- package/src/transformers/code.ts +174 -0
- package/src/transformers/gfm.ts +16 -4
- package/src/transformers/registry.ts +27 -0
- package/dist/__llui_deps.json +0 -274
package/dist/editor.d.ts
CHANGED
|
@@ -38,10 +38,23 @@ export interface EditorConfig {
|
|
|
38
38
|
collab?: CollabFactory;
|
|
39
39
|
}
|
|
40
40
|
/** Disposer-returning binding the collab layer installs on the live editor.
|
|
41
|
-
* `@llui/lexical-collab`'s `YjsCollab`
|
|
42
|
-
* `@llui/markdown-editor` needs
|
|
41
|
+
* `@llui/lexical-collab`'s `YjsCollab` and `@llui/lexical-loro`'s `LoroCollab`
|
|
42
|
+
* both satisfy this structurally, so `@llui/markdown-editor` needs neither a Yjs
|
|
43
|
+
* nor a Loro dependency of its own. */
|
|
43
44
|
export interface CollabBinding {
|
|
44
45
|
register: (editor: LexicalEditor) => () => void;
|
|
46
|
+
/**
|
|
47
|
+
* A CRDT-aware undo owner, if the binding provides one SEPARATELY from
|
|
48
|
+
* `register`. When present it is handed to `lexicalForeign({ externalUndo })`,
|
|
49
|
+
* which forces the built-in `@lexical/history` stack off so the two can never
|
|
50
|
+
* both be live — this is what gives collab mode real, peer-scoped undo.
|
|
51
|
+
*
|
|
52
|
+
* Optional because not every binding splits undo out this way: `yjsCollab`
|
|
53
|
+
* installs its own undo commands INSIDE `register`, so it leaves this unset and
|
|
54
|
+
* still owns undo. A binding that sets neither would leave the editor with no
|
|
55
|
+
* undo at all — see `@llui/lexical-loro`, which sets this.
|
|
56
|
+
*/
|
|
57
|
+
externalUndo?: (editor: LexicalEditor) => () => void;
|
|
45
58
|
}
|
|
46
59
|
/** Hooks the editor injects into the {@link CollabFactory}: a markdown `seed`
|
|
47
60
|
* (run once by the bootstrapping peer to fill an empty shared doc from
|
|
@@ -62,6 +75,13 @@ export interface EditorParts {
|
|
|
62
75
|
/** Reactive format signal for `connect`-style toolbars. */
|
|
63
76
|
format: Signal<FormatState>;
|
|
64
77
|
}
|
|
78
|
+
/** Swallow the underline text-format command. `registerRichText` wires Cmd+U to
|
|
79
|
+
* FORMAT_TEXT 'underline', but the GFM markdown dialect this editor serializes
|
|
80
|
+
* has no underline representation, so an applied underline would be silently
|
|
81
|
+
* stripped on save. Intercepting at CRITICAL priority (ahead of rich-text) keeps
|
|
82
|
+
* the WYSIWYG surface and the serialized dialect in lock-step: underline can be
|
|
83
|
+
* neither applied nor lost. Returns a disposer. */
|
|
84
|
+
export declare function blockUnderlineFormat(editor: LexicalEditor): () => void;
|
|
65
85
|
/**
|
|
66
86
|
* Build the markdown editor component. Embed it with `mountApp(el, markdownEditor(...))`
|
|
67
87
|
* or compose it inside a larger component.
|
package/dist/editor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,SAAS,CAAA;A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;;;OAUG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,IAAI,CAAA;CACrD;AAED;;;yEAGyE;AACzE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IACrC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC;AAED,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,aAAa,CAAA;AAEjE,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;IAC7B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;CAC5B;AAOD;;;;;mDAKmD;AACnD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,IAAI,CAMtE;AAeD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,GAAE,YAAiB,GACxB,kBAAkB,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC,CAkP1D"}
|
package/dist/editor.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// surfaces the format state for the chrome, routes command intents back to the
|
|
4
4
|
// live editor through effects, and COMPOSES plugin UI extensions (each plugin's
|
|
5
5
|
// state slice + reducer + view + effects) into the single component.
|
|
6
|
-
import { $getRoot, $setSelection } from 'lexical';
|
|
6
|
+
import { $getRoot, $setSelection, COMMAND_PRIORITY_CRITICAL, FORMAT_TEXT_COMMAND, } from 'lexical';
|
|
7
7
|
import { $convertFromMarkdownString, $convertToMarkdownString, registerMarkdownShortcuts, } from '@lexical/markdown';
|
|
8
8
|
import { component, div } from '@llui/dom';
|
|
9
9
|
import { lexicalForeign, registerDecoratorBridges, PROGRAMMATIC_TAG, } from '@llui/lexical';
|
|
@@ -21,6 +21,15 @@ import { countWords, init, update, } from './state.js';
|
|
|
21
21
|
function defaultPlugins() {
|
|
22
22
|
return [corePlugin(), linkPlugin()];
|
|
23
23
|
}
|
|
24
|
+
/** Swallow the underline text-format command. `registerRichText` wires Cmd+U to
|
|
25
|
+
* FORMAT_TEXT 'underline', but the GFM markdown dialect this editor serializes
|
|
26
|
+
* has no underline representation, so an applied underline would be silently
|
|
27
|
+
* stripped on save. Intercepting at CRITICAL priority (ahead of rich-text) keeps
|
|
28
|
+
* the WYSIWYG surface and the serialized dialect in lock-step: underline can be
|
|
29
|
+
* neither applied nor lost. Returns a disposer. */
|
|
30
|
+
export function blockUnderlineFormat(editor) {
|
|
31
|
+
return editor.registerCommand(FORMAT_TEXT_COMMAND, (payload) => payload === 'underline', COMMAND_PRIORITY_CRITICAL);
|
|
32
|
+
}
|
|
24
33
|
/**
|
|
25
34
|
* Build the markdown editor component. Embed it with `mountApp(el, markdownEditor(...))`
|
|
26
35
|
* or compose it inside a larger component.
|
|
@@ -48,13 +57,16 @@ export function markdownEditor(config = {}) {
|
|
|
48
57
|
const contextFor = (send) => {
|
|
49
58
|
let ctx = mountContexts.get(send);
|
|
50
59
|
if (!ctx) {
|
|
51
|
-
ctx = { editor: null };
|
|
60
|
+
ctx = { editor: null, lastChange: undefined };
|
|
52
61
|
mountContexts.set(send, ctx);
|
|
53
62
|
}
|
|
54
63
|
return ctx;
|
|
55
64
|
};
|
|
56
65
|
const baseOnEffect = makeOnEffect((api) => contextFor(api.send).editor, itemsById, {
|
|
57
|
-
|
|
66
|
+
// NB: consumer `onChange` is delivered DIRECTLY from the foreign onChange
|
|
67
|
+
// wrapper (see `view` below), NOT through this effect path — the dispose-time
|
|
68
|
+
// debounce flush runs after the TEA loop is disposed, and a `send` from a
|
|
69
|
+
// disposed loop is dropped, so effect-routed delivery loses the final edit.
|
|
58
70
|
onFormatChange: config.onFormatChange,
|
|
59
71
|
applyValue: (editor, value) => editor.update(() => {
|
|
60
72
|
$convertFromMarkdownString(value, transformers);
|
|
@@ -137,8 +149,18 @@ export function markdownEditor(config = {}) {
|
|
|
137
149
|
},
|
|
138
150
|
// In collab mode the shared CRDT owns the document: the local undo stack
|
|
139
151
|
// and the boot-time seed are disabled — the binding supplies a scoped undo
|
|
140
|
-
// manager and a sync-gated bootstrap instead.
|
|
141
|
-
|
|
152
|
+
// manager and a sync-gated bootstrap instead. A binding that owns undo via
|
|
153
|
+
// a SEPARATE `externalUndo` (Loro) has it wired here; one that owns undo
|
|
154
|
+
// inside its own `register` (Yjs) leaves the field unset. Either way the
|
|
155
|
+
// built-in history is off, so a binding that forgot both would show as "no
|
|
156
|
+
// undo" rather than fighting a local stack.
|
|
157
|
+
...(collabBinding
|
|
158
|
+
? {
|
|
159
|
+
history: false,
|
|
160
|
+
seedMode: 'deferred',
|
|
161
|
+
...(collabBinding.externalUndo ? { externalUndo: collabBinding.externalUndo } : {}),
|
|
162
|
+
}
|
|
163
|
+
: {}),
|
|
142
164
|
defaultValue: collabBinding || config.value ? undefined : (config.defaultValue ?? ''),
|
|
143
165
|
...(config.value && !collabBinding ? { value: config.value } : {}),
|
|
144
166
|
readonly: state.at('readonly'),
|
|
@@ -147,6 +169,10 @@ export function markdownEditor(config = {}) {
|
|
|
147
169
|
: {}),
|
|
148
170
|
register: (editor) => {
|
|
149
171
|
const disposers = [
|
|
172
|
+
// Keep the WYSIWYG surface and the serialized GFM dialect in lock-step:
|
|
173
|
+
// underline (Cmd+U) has no markdown representation, so it is swallowed
|
|
174
|
+
// rather than applied-then-silently-stripped on save.
|
|
175
|
+
blockUnderlineFormat(editor),
|
|
150
176
|
registerMarkdownShortcuts(editor, transformers),
|
|
151
177
|
// Global scheme allowlist for links: the single backstop covering the
|
|
152
178
|
// link dialog, pasted/imported markdown, and the typed `[x](url)`
|
|
@@ -174,7 +200,20 @@ export function markdownEditor(config = {}) {
|
|
|
174
200
|
}
|
|
175
201
|
config.onReady?.(editor);
|
|
176
202
|
},
|
|
177
|
-
onChange: (value) =>
|
|
203
|
+
onChange: (value) => {
|
|
204
|
+
// Deliver to the consumer DIRECTLY, independent of the TEA loop: the
|
|
205
|
+
// dispose-time debounce flush runs AFTER the component is disposed, and a
|
|
206
|
+
// `send` from a disposed loop is dropped — so routing consumer delivery
|
|
207
|
+
// through `send` would lose the last debounce window of typing on unmount.
|
|
208
|
+
// Deduped per mount so the same value isn't delivered twice.
|
|
209
|
+
if (value !== mount.lastChange) {
|
|
210
|
+
mount.lastChange = value;
|
|
211
|
+
config.onChange?.(value);
|
|
212
|
+
}
|
|
213
|
+
// Mirror into TEA state (value/dirty) while the loop is alive; dropped
|
|
214
|
+
// silently after dispose, which is fine — the consumer was already told.
|
|
215
|
+
send({ type: 'markdownChanged', value });
|
|
216
|
+
},
|
|
178
217
|
onSelectionChange: (ctx) => {
|
|
179
218
|
const format = computeFormatState(ctx.editor, ctx);
|
|
180
219
|
const text = ctx.editor.getEditorState().read(() => $getRoot().getTextContent());
|
package/dist/editor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,qEAAqE;AAErE,OAAO,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,qEAAqE;AAErE,OAAO,EACL,QAAQ,EACR,aAAa,EACb,yBAAyB,EACzB,mBAAmB,GAGpB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,SAAS,EA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AAC,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;aACnE,CAAC;YACF,GAAG,WAAW;SACf,CAAA;IACH,CAAC,CAAA;IAED,OAAO,SAAS,CAAuC;QACrD,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,cAAc;QACtB,IAAI;QACJ,QAAQ,EAAE,gBAAgB;KAC3B,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/effects.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export interface EffectApi {
|
|
|
6
6
|
send: (msg: EditorMsg) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface EffectConfig {
|
|
9
|
-
onChange?: (markdown: string) => void;
|
|
10
9
|
onFormatChange?: (format: FormatState) => void;
|
|
11
10
|
/** Push markdown into the live editor (deserialize), without echoing onChange. */
|
|
12
11
|
applyValue: (editor: LexicalEditor, value: string) => void;
|
package/dist/effects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEtE,iEAAiE;AACjE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEtE,iEAAiE;AACjE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9C,kFAAkF;IAClF,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D;AAED;;;uBAGuB;AACvB,wBAAgB,YAAY,CAC1B,aAAa,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,aAAa,GAAG,IAAI,EACvD,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,EACvC,MAAM,EAAE,YAAY,GACnB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,KAAK,IAAI,CA2BhD"}
|
package/dist/effects.js
CHANGED
|
@@ -22,7 +22,10 @@ export function makeOnEffect(resolveEditor, items, config) {
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
case 'emitChange': {
|
|
25
|
-
|
|
25
|
+
// Consumer `onChange` delivery moved to the foreign onChange wrapper (see
|
|
26
|
+
// editor.ts) so it survives dispose — the loop is torn down before the
|
|
27
|
+
// dispose-time debounce flush runs, and a `send`-routed effect would be
|
|
28
|
+
// dropped. This effect now only signals that state changed; no side effect.
|
|
26
29
|
return;
|
|
27
30
|
}
|
|
28
31
|
case 'emitFormat': {
|
package/dist/effects.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,iFAAiF;AACjF,uEAAuE;
|
|
1
|
+
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,iFAAiF;AACjF,uEAAuE;AAiBvE;;;uBAGuB;AACvB,MAAM,UAAU,YAAY,CAC1B,aAAuD,EACvD,KAAuC,EACvC,MAAoB;IAEpB,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACrB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,aAAa,CAAC,CAAC,CAAC;gBACnB,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;gBACjC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;gBACjC,IAAI,MAAM,IAAI,IAAI;oBAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;gBACxD,OAAM;YACR,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;gBACjC,IAAI,MAAM;oBAAE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;gBACnD,OAAM;YACR,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,0EAA0E;gBAC1E,uEAAuE;gBACvE,wEAAwE;gBACxE,4EAA4E;gBAC5E,OAAM;YACR,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,MAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;gBACtC,OAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type EditorConfig, type EditorParts, type CollabBinding, type CollabHooks, type CollabFactory, markdownEditor, } from './editor.js';
|
|
1
|
+
export { type EditorConfig, type EditorParts, type CollabBinding, type CollabHooks, type CollabFactory, markdownEditor, blockUnderlineFormat, } from './editor.js';
|
|
2
2
|
export { type BlockType, type FormatState, type OverlayKind, type CollabStatus, type EditorState, type EditorMsg, type EditorOutMsg, type EditorEffect, type InitOptions, EMPTY_FORMAT, COLLAB_OFF, init, update, countWords, } from './state.js';
|
|
3
3
|
export { type ItemSurface, type CommandItem, type CommandContext, type MarkdownPlugin, } from './plugins/types.js';
|
|
4
4
|
export { type PluginUI, type PluginUISpec, type PluginViewArgs, type PluginEffectContext, definePluginUI, } from './plugins/ui.js';
|
|
@@ -7,6 +7,7 @@ export { type InlineFormat, type SingleBlockPluginOptions, singleBlockPlugin, }
|
|
|
7
7
|
export { type LinkPluginOptions, linkPlugin } from './plugins/link.js';
|
|
8
8
|
export { type CalloutKind, type CalloutData, type CalloutPluginOptions, calloutPlugin, $insertCallout, } from './plugins/callout.js';
|
|
9
9
|
export { hrPlugin, $insertHorizontalRule } from './plugins/hr.js';
|
|
10
|
+
export { type FrontmatterData, type FrontmatterPluginOptions, FRONTMATTER_BRIDGE_TYPE, FRONTMATTER_TRANSFORMER, frontmatterPlugin, serializeFrontmatter, splitFrontmatter, $getFrontmatter, $setFrontmatter, } from './plugins/frontmatter.js';
|
|
10
11
|
export { slashPlugin } from './plugins/slash.js';
|
|
11
12
|
export { contextMenuPlugin } from './plugins/context-menu.js';
|
|
12
13
|
export { floatingToolbarPlugin } from './plugins/floating-toolbar.js';
|
|
@@ -16,11 +17,15 @@ export { type Mention, type MentionPluginOptions, mentionPlugin } from './plugin
|
|
|
16
17
|
export { type EmojiPluginOptions, DEFAULT_EMOJI, emojiPlugin } from './plugins/emoji.js';
|
|
17
18
|
export { type ImagePluginOptions, imagePlugin } from './plugins/image.js';
|
|
18
19
|
export { tablePlugin } from './plugins/table.js';
|
|
20
|
+
export { type CodeLanguagePluginOptions, type CodeLanguageState, type CodeLanguageMsg, type CodeLanguageEffect, CODE_LANGUAGE_PLUGIN, codeLanguagePlugin, } from './plugins/code-language.js';
|
|
21
|
+
export { type WikiLink, type WikiLinkPluginOptions, type SerializedWikiLinkNode, WikiLinkNode, $createWikiLinkNode, $isWikiLinkNode, parseWikiLinkInner, formatWikiLink, sanitizeWikiLinkTarget, sanitizeWikiLinkAlias, wikilinkPlugin, } from './plugins/wikilink.js';
|
|
22
|
+
export { type BlockDragOptions, type BlockRect, type DropTarget, type IndicatorRect, type Place, BLOCK_DRAG_Z, blockAtPoint, findDropTarget, indicatorRect, blockDragPlugin, } from './plugins/block-drag.js';
|
|
19
23
|
export { $insertMarkdownAtSelection, registerMarkdownPaste } from './paste.js';
|
|
20
|
-
export { GFM_NODES, GFM_TRANSFORMERS } from './transformers/gfm.js';
|
|
21
|
-
export {
|
|
24
|
+
export { GFM_NODES, GFM_TRANSFORMERS, HIGHLIGHT_TRANSFORMER } from './transformers/gfm.js';
|
|
25
|
+
export { CODE_INFO_TRANSFORMER, normalizeCodeInfo } from './transformers/code.js';
|
|
26
|
+
export { buildTransformers, orderTransformers, setTransformerPrecedence, } from './transformers/registry.js';
|
|
22
27
|
export { computeFormatState } from './format.js';
|
|
23
|
-
export { STRIKETHROUGH_CLASS,
|
|
28
|
+
export { STRIKETHROUGH_CLASS, defaultTheme, mergeTheme } from './theme.js';
|
|
24
29
|
export { type ToolbarItemParts, type ToolbarParts, type ToolbarOptions, DEFAULT_GLYPHS, connectToolbar, toolbar, } from './surfaces/toolbar.js';
|
|
25
30
|
export { type LinkDialogOptions, linkDialog } from './surfaces/link-dialog.js';
|
|
26
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRo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AO,EAAE,SAAS,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAG1F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAIjF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE1E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,cAAc,EACd,cAAc,EACd,OAAO,GACR,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `@llui/markdown-editor` — WYSIWYG Markdown editor for LLui, built on Lexical.
|
|
2
|
-
export { markdownEditor, } from './editor.js';
|
|
2
|
+
export { markdownEditor, blockUnderlineFormat, } from './editor.js';
|
|
3
3
|
export { EMPTY_FORMAT, COLLAB_OFF, init, update, countWords, } from './state.js';
|
|
4
4
|
export {} from './plugins/types.js';
|
|
5
5
|
export { definePluginUI, } from './plugins/ui.js';
|
|
@@ -8,6 +8,7 @@ export { singleBlockPlugin, } from './plugins/single-block.js';
|
|
|
8
8
|
export { linkPlugin } from './plugins/link.js';
|
|
9
9
|
export { calloutPlugin, $insertCallout, } from './plugins/callout.js';
|
|
10
10
|
export { hrPlugin, $insertHorizontalRule } from './plugins/hr.js';
|
|
11
|
+
export { FRONTMATTER_BRIDGE_TYPE, FRONTMATTER_TRANSFORMER, frontmatterPlugin, serializeFrontmatter, splitFrontmatter, $getFrontmatter, $setFrontmatter, } from './plugins/frontmatter.js';
|
|
11
12
|
export { slashPlugin } from './plugins/slash.js';
|
|
12
13
|
export { contextMenuPlugin } from './plugins/context-menu.js';
|
|
13
14
|
export { floatingToolbarPlugin } from './plugins/floating-toolbar.js';
|
|
@@ -17,11 +18,24 @@ export { mentionPlugin } from './plugins/mention.js';
|
|
|
17
18
|
export { DEFAULT_EMOJI, emojiPlugin } from './plugins/emoji.js';
|
|
18
19
|
export { imagePlugin } from './plugins/image.js';
|
|
19
20
|
export { tablePlugin } from './plugins/table.js';
|
|
21
|
+
export { CODE_LANGUAGE_PLUGIN, codeLanguagePlugin, } from './plugins/code-language.js';
|
|
22
|
+
export { WikiLinkNode, $createWikiLinkNode, $isWikiLinkNode, parseWikiLinkInner, formatWikiLink,
|
|
23
|
+
// The representability guards that make `formatWikiLink` the true inverse of
|
|
24
|
+
// `parseWikiLinkInner`; exported so a host resolving/creating targets can
|
|
25
|
+
// apply the same normalization before it hands one to `$createWikiLinkNode`.
|
|
26
|
+
sanitizeWikiLinkTarget, sanitizeWikiLinkAlias, wikilinkPlugin, } from './plugins/wikilink.js';
|
|
27
|
+
export { BLOCK_DRAG_Z, blockAtPoint, findDropTarget, indicatorRect, blockDragPlugin, } from './plugins/block-drag.js';
|
|
20
28
|
export { $insertMarkdownAtSelection, registerMarkdownPaste } from './paste.js';
|
|
21
|
-
export { GFM_NODES, GFM_TRANSFORMERS } from './transformers/gfm.js';
|
|
22
|
-
|
|
29
|
+
export { GFM_NODES, GFM_TRANSFORMERS, HIGHLIGHT_TRANSFORMER } from './transformers/gfm.js';
|
|
30
|
+
// The CommonMark-correct fenced-code transformer. Already part of
|
|
31
|
+
// `GFM_TRANSFORMERS`; exported for consumers assembling a transformer set by hand.
|
|
32
|
+
export { CODE_INFO_TRANSFORMER, normalizeCodeInfo } from './transformers/code.js';
|
|
33
|
+
// `setTransformerPrecedence` breaks ties between SAME-rank transformers, so a
|
|
34
|
+
// collision (e.g. wikilink vs upstream LINK, which both match at the same index)
|
|
35
|
+
// is resolved structurally instead of by the order a consumer lists plugins in.
|
|
36
|
+
export { buildTransformers, orderTransformers, setTransformerPrecedence, } from './transformers/registry.js';
|
|
23
37
|
export { computeFormatState } from './format.js';
|
|
24
|
-
export { STRIKETHROUGH_CLASS,
|
|
38
|
+
export { STRIKETHROUGH_CLASS, defaultTheme, mergeTheme } from './theme.js';
|
|
25
39
|
export { DEFAULT_GLYPHS, connectToolbar, toolbar, } from './surfaces/toolbar.js';
|
|
26
40
|
export { linkDialog } from './surfaces/link-dialog.js';
|
|
27
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,EAML,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,EAML,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAUL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,MAAM,EACN,UAAU,GACX,MAAM,YAAY,CAAA;AAEnB,OAAO,EAKN,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAKL,cAAc,GACf,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAA0B,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAGL,iBAAiB,GAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAA0B,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAIL,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAGL,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,WAAW,EAA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,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE1E,OAAO,EAIL,cAAc,EACd,cAAc,EACd,OAAO,GACR,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAA0B,UAAU,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type NodeKey } from 'lexical';
|
|
2
|
+
import type { MarkdownPlugin } from './types.js';
|
|
3
|
+
/** Stacking levels for this plugin's two surfaces — deliberately below the
|
|
4
|
+
* shared `OVERLAY_Z` scale (60+) so document chrome never covers a menu. */
|
|
5
|
+
export declare const BLOCK_DRAG_Z: {
|
|
6
|
+
readonly handle: 58;
|
|
7
|
+
readonly indicator: 59;
|
|
8
|
+
};
|
|
9
|
+
/** The measured viewport geometry of one top-level block. Pure data — the unit
|
|
10
|
+
* of everything below, so all placement logic is testable without a DOM. */
|
|
11
|
+
export interface BlockRect {
|
|
12
|
+
key: NodeKey;
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
left: number;
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
/** Which side of the target block the source lands on. */
|
|
19
|
+
export type Place = 'before' | 'after';
|
|
20
|
+
/** A resolved drop slot: "put the dragged block `place` this `key`". */
|
|
21
|
+
export interface DropTarget {
|
|
22
|
+
key: NodeKey;
|
|
23
|
+
place: Place;
|
|
24
|
+
}
|
|
25
|
+
/** Viewport position of the drop-indicator line. */
|
|
26
|
+
export interface IndicatorRect {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The block whose vertical band contains `clientY`, or `null` when the pointer
|
|
33
|
+
* is in no block's band.
|
|
34
|
+
*
|
|
35
|
+
* TWO passes, and the order matters. A block's OWN rect always wins outright;
|
|
36
|
+
* only a point in no block at all falls through to the widened search, where
|
|
37
|
+
* the NEAREST band within `tolerance` wins (ties biased upward, matching how a
|
|
38
|
+
* reader attributes a gap to the block above it).
|
|
39
|
+
*
|
|
40
|
+
* A single widened pass with first-match-wins — which this was — is wrong
|
|
41
|
+
* wherever two rects touch or nearly touch, and touching rects are the common
|
|
42
|
+
* case, not the exotic one: list items, table rows, consecutive lines, and any
|
|
43
|
+
* margin-collapsed heading. With `tolerance = 6` and adjacent rects [0,20] and
|
|
44
|
+
* [20,40], every y in [20,26] resolved to the FIRST block, so the block below
|
|
45
|
+
* lost the top 6px of its own body — the grip targeted, grabbed and dragged the
|
|
46
|
+
* wrong block. Generally, for an inter-block gap `g < tolerance`, block N stole
|
|
47
|
+
* the first `tolerance - g` px of block N+1.
|
|
48
|
+
*/
|
|
49
|
+
export declare function blockAtPoint(blocks: readonly BlockRect[], clientY: number, tolerance?: number): BlockRect | null;
|
|
50
|
+
/**
|
|
51
|
+
* The slot `clientY` points at, expressed relative to a neighbouring block.
|
|
52
|
+
*
|
|
53
|
+
* The document has `n + 1` slots for `n` blocks; the slot index is the count of
|
|
54
|
+
* blocks whose vertical midpoint is above the pointer. Two of those slots are
|
|
55
|
+
* where `sourceKey` already sits — dropping there is a no-op, so both return
|
|
56
|
+
* `null` and the caller shows no indicator and commits nothing. That check is
|
|
57
|
+
* what stops a 1px twitch from producing a spurious undo entry.
|
|
58
|
+
*/
|
|
59
|
+
export declare function findDropTarget(blocks: readonly BlockRect[], clientY: number, sourceKey: NodeKey): DropTarget | null;
|
|
60
|
+
/** Where to draw the indicator line for a resolved {@link DropTarget}: on the
|
|
61
|
+
* target's top edge for `before`, its bottom edge for `after`. */
|
|
62
|
+
export declare function indicatorRect(blocks: readonly BlockRect[], target: DropTarget): IndicatorRect | null;
|
|
63
|
+
export interface BlockDragOptions {
|
|
64
|
+
/** Gutter grip inset, in px left of the block's left edge. Default 28. */
|
|
65
|
+
gutterOffset?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Reorder top-level blocks by dragging a hover gutter grip, or from the keyboard
|
|
69
|
+
* (focus the grip, Enter/Space to grab, ↑/↓ to move, Enter/Space to drop, Escape
|
|
70
|
+
* to cancel). Every reorder is one Lexical node move, hence one undo step.
|
|
71
|
+
*/
|
|
72
|
+
export declare function blockDragPlugin(options?: BlockDragOptions): MarkdownPlugin;
|
|
73
|
+
//# sourceMappingURL=block-drag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-drag.d.ts","sourceRoot":"","sources":["../../src/plugins/block-drag.ts"],"names":[],"mappings":"AA+BA,OAAO,EAQL,KAAK,OAAO,EACb,MAAM,SAAS,CAAA;AAKhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;4EAC4E;AAC5E,eAAO,MAAM,YAAY;;;CAAyC,CAAA;AAclE;4EAC4E;AAC5E,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,0DAA0D;AAC1D,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEtC,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,OAAO,CAAA;IACZ,KAAK,EAAE,KAAK,CAAA;CACb;AAED,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd;AAID;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAwB,GAClC,SAAS,GAAG,IAAI,CAmBlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS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