markloom 0.3.0 → 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/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +3 -3
- package/dist/ai/theme.css +63 -63
- package/dist/{chunk-7Q6AXLF2.cjs → chunk-LNSKDJMF.cjs} +3 -3
- package/dist/{chunk-GUPMZI6Q.js → chunk-QXJHFQLJ.js} +3 -3
- package/dist/{chunk-UCNEQGMY.js → chunk-VMUJM52A.js} +327 -327
- package/dist/{chunk-2X6AF7XH.cjs → chunk-VSTOMEU2.cjs} +363 -363
- package/dist/{controller-Dm4uLD3I.d.ts → controller-B_wG2Wh-.d.ts} +7 -7
- package/dist/{controller-cE9iEYp3.d.cts → controller-Cd1Dprrk.d.cts} +7 -7
- package/dist/react/index.cjs +7 -7
- package/dist/react/index.d.cts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +7 -7
- package/dist/view/index.cjs +6 -6
- package/dist/view/index.d.cts +4 -4
- package/dist/view/index.d.ts +4 -4
- package/dist/view/index.js +4 -4
- package/dist/view/theme.css +507 -507
- package/package.json +1 -1
|
@@ -78,7 +78,7 @@ declare function renderHr(spec: ElementNode, key: number | string, ctx: BlockRen
|
|
|
78
78
|
declare const defaultBlockRenderers: Record<string, BlockRenderer>;
|
|
79
79
|
declare function renderDoc(doc: ElementNode, opts?: RenderOpts): preact.VNode<preact.ClassAttributes<HTMLElement> & {
|
|
80
80
|
class: string;
|
|
81
|
-
'data-
|
|
81
|
+
'data-markloom': boolean;
|
|
82
82
|
}>;
|
|
83
83
|
declare function renderToHtml(doc: ElementNode, opts?: RenderOpts): string;
|
|
84
84
|
|
|
@@ -357,7 +357,7 @@ declare class Editor {
|
|
|
357
357
|
constructor(root: HTMLElement, doc: ElementNode, opts?: EditorOptions);
|
|
358
358
|
destroy(): void;
|
|
359
359
|
/** AI 控制器(opts.ai 启用时);应用工具栏可 ed.ai?.openAtFocus / stop */
|
|
360
|
-
get ai():
|
|
360
|
+
get ai(): MarkloomAi | null;
|
|
361
361
|
openAi(mode: 'continue' | 'rewrite'): void;
|
|
362
362
|
stopAi(): void;
|
|
363
363
|
get doc(): ElementNode;
|
|
@@ -438,7 +438,7 @@ type AiStreamInput = {
|
|
|
438
438
|
signal?: AbortSignal;
|
|
439
439
|
};
|
|
440
440
|
type AiStreamFn = (input: AiStreamInput, onToken: (text: string) => void) => Promise<void>;
|
|
441
|
-
type
|
|
441
|
+
type MarkloomAiOpts = {
|
|
442
442
|
stream: AiStreamFn;
|
|
443
443
|
onError?: (message: string) => void;
|
|
444
444
|
onBusy?: (busy: boolean) => void;
|
|
@@ -446,7 +446,7 @@ type LoomAiOpts = {
|
|
|
446
446
|
type AiPromptMode = 'continue' | 'rewrite';
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
|
-
*
|
|
449
|
+
* markloom/ai — 一笔完整事务:
|
|
450
450
|
*
|
|
451
451
|
* begin (dispatch) 插入真·顶层段落(aiDraft) + loading
|
|
452
452
|
* stream (amend) token 追加到真段落,随时可见
|
|
@@ -455,7 +455,7 @@ type AiPromptMode = 'continue' | 'rewrite';
|
|
|
455
455
|
*
|
|
456
456
|
* 段落从第一 pen 起就在 doc 里,不是影子预览;淡化只是事务未提交的视觉态。
|
|
457
457
|
*/
|
|
458
|
-
declare class
|
|
458
|
+
declare class MarkloomAi {
|
|
459
459
|
private getEditor;
|
|
460
460
|
private opts;
|
|
461
461
|
private abort;
|
|
@@ -466,7 +466,7 @@ declare class LoomAi {
|
|
|
466
466
|
private raf;
|
|
467
467
|
/** 流式累积的 Markdown 源(每帧物化成真·富文本块做预览) */
|
|
468
468
|
private pendingMd;
|
|
469
|
-
constructor(getEditor: () => Editor | null, opts:
|
|
469
|
+
constructor(getEditor: () => Editor | null, opts: MarkloomAiOpts);
|
|
470
470
|
destroy(): void;
|
|
471
471
|
/**
|
|
472
472
|
* 停止生成:
|
|
@@ -504,4 +504,4 @@ declare class LoomAi {
|
|
|
504
504
|
private paintMd;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
export { diffSpan as $, type AiConfig as A, type BlockInputRule as B, CALLOUT_VARIANTS as C, type DecorationFactory as D, type EditorOptions as E,
|
|
507
|
+
export { diffSpan as $, type AiConfig as A, type BlockInputRule as B, CALLOUT_VARIANTS as C, type DecorationFactory as D, type EditorOptions as E, MentionPopovers as F, type MentionPopoversHost as G, type MentionProfile as H, type InputResult as I, type NodeViewCtx as J, type KeymapCommand as K, type Resolved as L, MarkloomAi as M, type NodeView as N, atomIsSelected as O, type PasteRule as P, blockTransform as Q, type RenderOpts as R, type SlashCommand as S, type TextStylePatch as T, calloutVariantFromQuery as U, caret as V, chord as W, cycleCalloutVariant as X, defaultBlockRenderers as Y, defaultBlockTag as Z, defaultMarkTag as _, type AiPromptMode as a, indentItem as a0, isAtom as a1, isOpaque as a2, leafText as a3, lineBoundaryBack as a4, lineBoundaryFwd as a5, mapInput as a6, mapPaste as a7, mapPasteBlocks as a8, marksAtCaret as a9, mergeTextStyleAttrs as aa, outdentItem as ab, renderCode as ac, renderDoc as ad, renderEmbed as ae, renderHr as af, renderImage as ag, renderTable as ah, renderToHtml as ai, resolve as aj, safeCssValue as ak, serializeSelection as al, setAlign as am, setCalloutVariant as an, setTextStyle as ao, textStyleCss as ap, toggleMark as aq, toggleMarkList as ar, twitchChannel as as, wordBoundaryBack as at, wordBoundaryFwd as au, wrapList as av, youtubeId as aw, type AiProvider as b, type AiStreamFn as c, type AiStreamInput as d, type AiWriteMode as e, type AiWriteSession as f, type MarkloomAiOpts as g, blockPlainText as h, createAiStream as i, focusBlockId as j, Editor as k, type Extension as l, type AtomSelectCtx as m, type BlockKind as n, type BlockRenderCtx as o, type BlockRenderer as p, type CalloutVariant as q, type DecorationHost as r, startAiWrite as s, type InputRuleCtx as t, type Intent as u, type KeymapCtx as v, type KeymapResult as w, type MentionCandidate as x, type MentionHost as y, MentionMenu as z };
|
|
@@ -78,7 +78,7 @@ declare function renderHr(spec: ElementNode, key: number | string, ctx: BlockRen
|
|
|
78
78
|
declare const defaultBlockRenderers: Record<string, BlockRenderer>;
|
|
79
79
|
declare function renderDoc(doc: ElementNode, opts?: RenderOpts): preact.VNode<preact.ClassAttributes<HTMLElement> & {
|
|
80
80
|
class: string;
|
|
81
|
-
'data-
|
|
81
|
+
'data-markloom': boolean;
|
|
82
82
|
}>;
|
|
83
83
|
declare function renderToHtml(doc: ElementNode, opts?: RenderOpts): string;
|
|
84
84
|
|
|
@@ -357,7 +357,7 @@ declare class Editor {
|
|
|
357
357
|
constructor(root: HTMLElement, doc: ElementNode, opts?: EditorOptions);
|
|
358
358
|
destroy(): void;
|
|
359
359
|
/** AI 控制器(opts.ai 启用时);应用工具栏可 ed.ai?.openAtFocus / stop */
|
|
360
|
-
get ai():
|
|
360
|
+
get ai(): MarkloomAi | null;
|
|
361
361
|
openAi(mode: 'continue' | 'rewrite'): void;
|
|
362
362
|
stopAi(): void;
|
|
363
363
|
get doc(): ElementNode;
|
|
@@ -438,7 +438,7 @@ type AiStreamInput = {
|
|
|
438
438
|
signal?: AbortSignal;
|
|
439
439
|
};
|
|
440
440
|
type AiStreamFn = (input: AiStreamInput, onToken: (text: string) => void) => Promise<void>;
|
|
441
|
-
type
|
|
441
|
+
type MarkloomAiOpts = {
|
|
442
442
|
stream: AiStreamFn;
|
|
443
443
|
onError?: (message: string) => void;
|
|
444
444
|
onBusy?: (busy: boolean) => void;
|
|
@@ -446,7 +446,7 @@ type LoomAiOpts = {
|
|
|
446
446
|
type AiPromptMode = 'continue' | 'rewrite';
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
|
-
*
|
|
449
|
+
* markloom/ai — 一笔完整事务:
|
|
450
450
|
*
|
|
451
451
|
* begin (dispatch) 插入真·顶层段落(aiDraft) + loading
|
|
452
452
|
* stream (amend) token 追加到真段落,随时可见
|
|
@@ -455,7 +455,7 @@ type AiPromptMode = 'continue' | 'rewrite';
|
|
|
455
455
|
*
|
|
456
456
|
* 段落从第一 pen 起就在 doc 里,不是影子预览;淡化只是事务未提交的视觉态。
|
|
457
457
|
*/
|
|
458
|
-
declare class
|
|
458
|
+
declare class MarkloomAi {
|
|
459
459
|
private getEditor;
|
|
460
460
|
private opts;
|
|
461
461
|
private abort;
|
|
@@ -466,7 +466,7 @@ declare class LoomAi {
|
|
|
466
466
|
private raf;
|
|
467
467
|
/** 流式累积的 Markdown 源(每帧物化成真·富文本块做预览) */
|
|
468
468
|
private pendingMd;
|
|
469
|
-
constructor(getEditor: () => Editor | null, opts:
|
|
469
|
+
constructor(getEditor: () => Editor | null, opts: MarkloomAiOpts);
|
|
470
470
|
destroy(): void;
|
|
471
471
|
/**
|
|
472
472
|
* 停止生成:
|
|
@@ -504,4 +504,4 @@ declare class LoomAi {
|
|
|
504
504
|
private paintMd;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
export { diffSpan as $, type AiConfig as A, type BlockInputRule as B, CALLOUT_VARIANTS as C, type DecorationFactory as D, type EditorOptions as E,
|
|
507
|
+
export { diffSpan as $, type AiConfig as A, type BlockInputRule as B, CALLOUT_VARIANTS as C, type DecorationFactory as D, type EditorOptions as E, MentionPopovers as F, type MentionPopoversHost as G, type MentionProfile as H, type InputResult as I, type NodeViewCtx as J, type KeymapCommand as K, type Resolved as L, MarkloomAi as M, type NodeView as N, atomIsSelected as O, type PasteRule as P, blockTransform as Q, type RenderOpts as R, type SlashCommand as S, type TextStylePatch as T, calloutVariantFromQuery as U, caret as V, chord as W, cycleCalloutVariant as X, defaultBlockRenderers as Y, defaultBlockTag as Z, defaultMarkTag as _, type AiPromptMode as a, indentItem as a0, isAtom as a1, isOpaque as a2, leafText as a3, lineBoundaryBack as a4, lineBoundaryFwd as a5, mapInput as a6, mapPaste as a7, mapPasteBlocks as a8, marksAtCaret as a9, mergeTextStyleAttrs as aa, outdentItem as ab, renderCode as ac, renderDoc as ad, renderEmbed as ae, renderHr as af, renderImage as ag, renderTable as ah, renderToHtml as ai, resolve as aj, safeCssValue as ak, serializeSelection as al, setAlign as am, setCalloutVariant as an, setTextStyle as ao, textStyleCss as ap, toggleMark as aq, toggleMarkList as ar, twitchChannel as as, wordBoundaryBack as at, wordBoundaryFwd as au, wrapList as av, youtubeId as aw, type AiProvider as b, type AiStreamFn as c, type AiStreamInput as d, type AiWriteMode as e, type AiWriteSession as f, type MarkloomAiOpts as g, blockPlainText as h, createAiStream as i, focusBlockId as j, Editor as k, type Extension as l, type AtomSelectCtx as m, type BlockKind as n, type BlockRenderCtx as o, type BlockRenderer as p, type CalloutVariant as q, type DecorationHost as r, startAiWrite as s, type InputRuleCtx as t, type Intent as u, type KeymapCtx as v, type KeymapResult as w, type MentionCandidate as x, type MentionHost as y, MentionMenu as z };
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVSTOMEU2cjs = require('../chunk-VSTOMEU2.cjs');
|
|
4
4
|
require('../chunk-HA6XHJUD.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-LNSKDJMF.cjs');
|
|
6
6
|
require('../chunk-VVFIQLVR.cjs');
|
|
7
7
|
|
|
8
8
|
// src/react/index.ts
|
|
9
9
|
var _react = require('react');
|
|
10
|
-
function
|
|
10
|
+
function useMarkloom(initialDoc, opts = {}) {
|
|
11
11
|
const ref = _react.useRef.call(void 0, null);
|
|
12
12
|
const editorRef = _react.useRef.call(void 0, null);
|
|
13
13
|
const [doc, setDoc] = _react.useState.call(void 0, initialDoc);
|
|
@@ -17,7 +17,7 @@ function useLoom(initialDoc, opts = {}) {
|
|
|
17
17
|
const host = ref.current;
|
|
18
18
|
if (!host)
|
|
19
19
|
return;
|
|
20
|
-
const ed = new (0,
|
|
20
|
+
const ed = new (0, _chunkVSTOMEU2cjs.Editor)(host, initialDoc, {
|
|
21
21
|
...optsRef.current,
|
|
22
22
|
onChange: (d) => {
|
|
23
23
|
setDoc(d);
|
|
@@ -35,11 +35,11 @@ function useLoom(initialDoc, opts = {}) {
|
|
|
35
35
|
}, [opts.editable]);
|
|
36
36
|
return { ref, editor: editorRef, doc };
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const { ref } =
|
|
38
|
+
function Markloom({ doc, className, style, ...opts }) {
|
|
39
|
+
const { ref } = useMarkloom(doc, opts);
|
|
40
40
|
return _react.createElement.call(void 0, "div", { ref, className, style });
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
exports.
|
|
45
|
+
exports.Markloom = Markloom; exports.useMarkloom = useMarkloom;
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { MutableRefObject } from 'react';
|
|
3
3
|
import { E as ElementNode } from '../comments-USjT1wYN.cjs';
|
|
4
|
-
import { E as EditorOptions, k as Editor } from '../controller-
|
|
4
|
+
import { E as EditorOptions, k as Editor } from '../controller-Cd1Dprrk.cjs';
|
|
5
5
|
import 'preact';
|
|
6
6
|
|
|
7
|
-
declare function
|
|
7
|
+
declare function useMarkloom(initialDoc: ElementNode, opts?: EditorOptions): {
|
|
8
8
|
ref: react.RefObject<HTMLDivElement | null>;
|
|
9
9
|
editor: MutableRefObject<Editor | null>;
|
|
10
10
|
doc: ElementNode;
|
|
11
11
|
};
|
|
12
|
-
declare function
|
|
12
|
+
declare function Markloom({ doc, className, style, ...opts }: EditorOptions & {
|
|
13
13
|
doc: ElementNode;
|
|
14
14
|
className?: string;
|
|
15
15
|
style?: React.CSSProperties;
|
|
@@ -19,4 +19,4 @@ declare function Loom({ doc, className, style, ...opts }: EditorOptions & {
|
|
|
19
19
|
style: react.CSSProperties | undefined;
|
|
20
20
|
}, HTMLDivElement>;
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { Markloom, useMarkloom };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { MutableRefObject } from 'react';
|
|
3
3
|
import { E as ElementNode } from '../comments-USjT1wYN.js';
|
|
4
|
-
import { E as EditorOptions, k as Editor } from '../controller-
|
|
4
|
+
import { E as EditorOptions, k as Editor } from '../controller-B_wG2Wh-.js';
|
|
5
5
|
import 'preact';
|
|
6
6
|
|
|
7
|
-
declare function
|
|
7
|
+
declare function useMarkloom(initialDoc: ElementNode, opts?: EditorOptions): {
|
|
8
8
|
ref: react.RefObject<HTMLDivElement | null>;
|
|
9
9
|
editor: MutableRefObject<Editor | null>;
|
|
10
10
|
doc: ElementNode;
|
|
11
11
|
};
|
|
12
|
-
declare function
|
|
12
|
+
declare function Markloom({ doc, className, style, ...opts }: EditorOptions & {
|
|
13
13
|
doc: ElementNode;
|
|
14
14
|
className?: string;
|
|
15
15
|
style?: React.CSSProperties;
|
|
@@ -19,4 +19,4 @@ declare function Loom({ doc, className, style, ...opts }: EditorOptions & {
|
|
|
19
19
|
style: react.CSSProperties | undefined;
|
|
20
20
|
}, HTMLDivElement>;
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { Markloom, useMarkloom };
|
package/dist/react/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Editor
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VMUJM52A.js";
|
|
4
4
|
import "../chunk-ITVAR2UM.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-QXJHFQLJ.js";
|
|
6
6
|
import "../chunk-J3QWW6CN.js";
|
|
7
7
|
|
|
8
8
|
// src/react/index.ts
|
|
9
9
|
import { createElement, useEffect, useRef, useState } from "react";
|
|
10
|
-
function
|
|
10
|
+
function useMarkloom(initialDoc, opts = {}) {
|
|
11
11
|
const ref = useRef(null);
|
|
12
12
|
const editorRef = useRef(null);
|
|
13
13
|
const [doc, setDoc] = useState(initialDoc);
|
|
@@ -35,11 +35,11 @@ function useLoom(initialDoc, opts = {}) {
|
|
|
35
35
|
}, [opts.editable]);
|
|
36
36
|
return { ref, editor: editorRef, doc };
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const { ref } =
|
|
38
|
+
function Markloom({ doc, className, style, ...opts }) {
|
|
39
|
+
const { ref } = useMarkloom(doc, opts);
|
|
40
40
|
return createElement("div", { ref, className, style });
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
Markloom,
|
|
44
|
+
useMarkloom
|
|
45
45
|
};
|
package/dist/view/index.cjs
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkVSTOMEU2cjs = require('../chunk-VSTOMEU2.cjs');
|
|
83
83
|
require('../chunk-HA6XHJUD.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
@@ -91,7 +91,7 @@ require('../chunk-HA6XHJUD.cjs');
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
var
|
|
94
|
+
var _chunkLNSKDJMFcjs = require('../chunk-LNSKDJMF.cjs');
|
|
95
95
|
require('../chunk-VVFIQLVR.cjs');
|
|
96
96
|
|
|
97
97
|
// src/view/shiki-code-view.ts
|
|
@@ -163,7 +163,7 @@ function subRule() {
|
|
|
163
163
|
{ kind: "deleteText", path: ctx.leafPath, offset: at, length: eaten },
|
|
164
164
|
{ kind: "insertText", path: ctx.leafPath, offset: at, text: s.to }
|
|
165
165
|
];
|
|
166
|
-
return { steps, selection:
|
|
166
|
+
return { steps, selection: _chunkVSTOMEU2cjs.caret.call(void 0, ctx.leafPath.concat(at + s.to.length)) };
|
|
167
167
|
}
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
@@ -177,7 +177,7 @@ function quoteRule(quote, open, close) {
|
|
|
177
177
|
const prev = ctx.marker.slice(-1);
|
|
178
178
|
const to = prev === "" || prev === " " || prev === "\n" || prev === " " || prev === "(" || prev === "[" || prev === "{" ? open : close;
|
|
179
179
|
const steps = [{ kind: "insertText", path: ctx.leafPath, offset: ctx.offset, text: to }];
|
|
180
|
-
return { steps, selection:
|
|
180
|
+
return { steps, selection: _chunkVSTOMEU2cjs.caret.call(void 0, ctx.leafPath.concat(ctx.offset + to.length)) };
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
}
|
|
@@ -253,7 +253,7 @@ function emojiRule() {
|
|
|
253
253
|
{ kind: "deleteText", path: ctx.leafPath, offset: at, length: eaten },
|
|
254
254
|
{ kind: "insertText", path: ctx.leafPath, offset: at, text: glyph }
|
|
255
255
|
];
|
|
256
|
-
return { steps, selection:
|
|
256
|
+
return { steps, selection: _chunkVSTOMEU2cjs.caret.call(void 0, ctx.leafPath.concat(at + glyph.length)) };
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
}
|
|
@@ -365,4 +365,4 @@ var comments = {
|
|
|
365
365
|
|
|
366
366
|
|
|
367
367
|
|
|
368
|
-
exports.CALLOUT_VARIANTS =
|
|
368
|
+
exports.CALLOUT_VARIANTS = _chunkVSTOMEU2cjs.CALLOUT_VARIANTS; exports.CommentPanel = _chunkVSTOMEU2cjs.CommentPanel; exports.Editor = _chunkVSTOMEU2cjs.Editor; exports.MentionMenu = _chunkVSTOMEU2cjs.MentionMenu; exports.MentionPopovers = _chunkVSTOMEU2cjs.MentionPopovers; exports.TocPanel = _chunkVSTOMEU2cjs.TocPanel; exports.askInput = _chunkVSTOMEU2cjs.askInput; exports.askLinkPopover = _chunkVSTOMEU2cjs.askLinkPopover; exports.atomIsSelected = _chunkVSTOMEU2cjs.atomIsSelected; exports.blockExtensions = _chunkVSTOMEU2cjs.blockExtensions; exports.blockPlainText = _chunkLNSKDJMFcjs.blockPlainText; exports.blockTransform = _chunkVSTOMEU2cjs.blockTransform; exports.boldMark = _chunkVSTOMEU2cjs.boldMark; exports.bubbleMenu = _chunkVSTOMEU2cjs.bubbleMenu; exports.calloutVariantFromQuery = _chunkVSTOMEU2cjs.calloutVariantFromQuery; exports.caret = _chunkVSTOMEU2cjs.caret; exports.chord = _chunkVSTOMEU2cjs.chord; exports.closeAskInput = _chunkVSTOMEU2cjs.closeAskInput; exports.codeBlock = _chunkVSTOMEU2cjs.codeBlock; exports.codeControls = _chunkVSTOMEU2cjs.codeControls; exports.codeMark = _chunkVSTOMEU2cjs.codeMark; exports.comments = comments; exports.cycleCalloutVariant = _chunkVSTOMEU2cjs.cycleCalloutVariant; exports.decorationExtensions = _chunkVSTOMEU2cjs.decorationExtensions; exports.defaultBlockRenderers = _chunkVSTOMEU2cjs.defaultBlockRenderers; exports.defaultBlockTag = _chunkVSTOMEU2cjs.defaultBlockTag; exports.defaultMarkTag = _chunkVSTOMEU2cjs.defaultMarkTag; exports.diffSpan = _chunkVSTOMEU2cjs.diffSpan; exports.domToPoint = _chunkLNSKDJMFcjs.domToPoint; exports.dragHandle = _chunkVSTOMEU2cjs.dragHandle; exports.elementChildren = _chunkLNSKDJMFcjs.elementChildren; exports.embedBlock = _chunkVSTOMEU2cjs.embedBlock; exports.emoji = emoji; exports.focusBlockId = _chunkLNSKDJMFcjs.focusBlockId; exports.highlightMark = _chunkVSTOMEU2cjs.highlightMark; exports.history = _chunkVSTOMEU2cjs.history; exports.hrBlock = _chunkVSTOMEU2cjs.hrBlock; exports.imageBlock = _chunkVSTOMEU2cjs.imageBlock; exports.indentItem = _chunkVSTOMEU2cjs.indentItem; exports.inputRules = _chunkVSTOMEU2cjs.inputRules; exports.invisibleCharacters = invisibleCharacters; exports.isAtom = _chunkVSTOMEU2cjs.isAtom; exports.isOpaque = _chunkVSTOMEU2cjs.isOpaque; exports.italicMark = _chunkVSTOMEU2cjs.italicMark; exports.leafText = _chunkVSTOMEU2cjs.leafText; exports.lineBoundaryBack = _chunkVSTOMEU2cjs.lineBoundaryBack; exports.lineBoundaryFwd = _chunkVSTOMEU2cjs.lineBoundaryFwd; exports.linkMark = _chunkVSTOMEU2cjs.linkMark; exports.mapInput = _chunkVSTOMEU2cjs.mapInput; exports.mapPaste = _chunkVSTOMEU2cjs.mapPaste; exports.mapPasteBlocks = _chunkVSTOMEU2cjs.mapPasteBlocks; exports.markExtensions = _chunkVSTOMEU2cjs.markExtensions; exports.markloomKit = _chunkVSTOMEU2cjs.markloomKit; exports.marksAtCaret = _chunkVSTOMEU2cjs.marksAtCaret; exports.mentionMenu = _chunkVSTOMEU2cjs.mentionMenu; exports.mergeTextStyleAttrs = _chunkVSTOMEU2cjs.mergeTextStyleAttrs; exports.normalizeLinkUrl = _chunkVSTOMEU2cjs.normalizeLinkUrl; exports.outdentItem = _chunkVSTOMEU2cjs.outdentItem; exports.pointToDom = _chunkLNSKDJMFcjs.pointToDom; exports.readSelection = _chunkLNSKDJMFcjs.readSelection; exports.renderCode = _chunkVSTOMEU2cjs.renderCode; exports.renderDoc = _chunkVSTOMEU2cjs.renderDoc; exports.renderEmbed = _chunkVSTOMEU2cjs.renderEmbed; exports.renderHr = _chunkVSTOMEU2cjs.renderHr; exports.renderImage = _chunkVSTOMEU2cjs.renderImage; exports.renderTable = _chunkVSTOMEU2cjs.renderTable; exports.renderToHtml = _chunkVSTOMEU2cjs.renderToHtml; exports.resolve = _chunkVSTOMEU2cjs.resolve; exports.rootEl = _chunkLNSKDJMFcjs.rootEl; exports.safeCssValue = _chunkVSTOMEU2cjs.safeCssValue; exports.serializeSelection = _chunkVSTOMEU2cjs.serializeSelection; exports.setAlign = _chunkVSTOMEU2cjs.setAlign; exports.setCalloutVariant = _chunkVSTOMEU2cjs.setCalloutVariant; exports.setTextStyle = _chunkVSTOMEU2cjs.setTextStyle; exports.shikiCodeView = shikiCodeView; exports.slashMenu = _chunkVSTOMEU2cjs.slashMenu; exports.startAiWrite = _chunkLNSKDJMFcjs.startAiWrite; exports.strikeMark = _chunkVSTOMEU2cjs.strikeMark; exports.subscriptMark = _chunkVSTOMEU2cjs.subscriptMark; exports.superscriptMark = _chunkVSTOMEU2cjs.superscriptMark; exports.tableBlock = _chunkVSTOMEU2cjs.tableBlock; exports.textAlign = _chunkVSTOMEU2cjs.textAlign; exports.textStyleCss = _chunkVSTOMEU2cjs.textStyleCss; exports.textStyleMark = _chunkVSTOMEU2cjs.textStyleMark; exports.toggleMark = _chunkVSTOMEU2cjs.toggleMark; exports.toggleMarkList = _chunkVSTOMEU2cjs.toggleMarkList; exports.twitchChannel = _chunkVSTOMEU2cjs.twitchChannel; exports.typography = typography; exports.underlineMark = _chunkVSTOMEU2cjs.underlineMark; exports.wordBoundaryBack = _chunkVSTOMEU2cjs.wordBoundaryBack; exports.wordBoundaryFwd = _chunkVSTOMEU2cjs.wordBoundaryFwd; exports.wrapList = _chunkVSTOMEU2cjs.wrapList; exports.writeSelection = _chunkLNSKDJMFcjs.writeSelection; exports.youtubeId = _chunkVSTOMEU2cjs.youtubeId;
|
package/dist/view/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NodeView, l as Extension } from '../controller-
|
|
2
|
-
export { e as AiWriteMode, f as AiWriteSession, m as AtomSelectCtx, B as BlockInputRule, n as BlockKind, o as BlockRenderCtx, p as BlockRenderer, C as CALLOUT_VARIANTS, q as CalloutVariant, D as DecorationFactory, r as DecorationHost, k as Editor, E as EditorOptions, I as InputResult, t as InputRuleCtx, u as Intent, K as KeymapCommand, v as KeymapCtx, w as KeymapResult,
|
|
1
|
+
import { N as NodeView, l as Extension } from '../controller-Cd1Dprrk.cjs';
|
|
2
|
+
export { e as AiWriteMode, f as AiWriteSession, m as AtomSelectCtx, B as BlockInputRule, n as BlockKind, o as BlockRenderCtx, p as BlockRenderer, C as CALLOUT_VARIANTS, q as CalloutVariant, D as DecorationFactory, r as DecorationHost, k as Editor, E as EditorOptions, I as InputResult, t as InputRuleCtx, u as Intent, K as KeymapCommand, v as KeymapCtx, w as KeymapResult, x as MentionCandidate, y as MentionHost, z as MentionMenu, F as MentionPopovers, G as MentionPopoversHost, H as MentionProfile, J as NodeViewCtx, P as PasteRule, R as RenderOpts, L as Resolved, S as SlashCommand, T as TextStylePatch, O as atomIsSelected, h as blockPlainText, Q as blockTransform, U as calloutVariantFromQuery, V as caret, W as chord, X as cycleCalloutVariant, Y as defaultBlockRenderers, Z as defaultBlockTag, _ as defaultMarkTag, $ as diffSpan, j as focusBlockId, a0 as indentItem, a1 as isAtom, a2 as isOpaque, a3 as leafText, a4 as lineBoundaryBack, a5 as lineBoundaryFwd, a6 as mapInput, a7 as mapPaste, a8 as mapPasteBlocks, a9 as marksAtCaret, aa as mergeTextStyleAttrs, ab as outdentItem, ac as renderCode, ad as renderDoc, ae as renderEmbed, af as renderHr, ag as renderImage, ah as renderTable, ai as renderToHtml, aj as resolve, ak as safeCssValue, al as serializeSelection, am as setAlign, an as setCalloutVariant, ao as setTextStyle, s as startAiWrite, ap as textStyleCss, aq as toggleMark, ar as toggleMarkList, as as twitchChannel, at as wordBoundaryBack, au as wordBoundaryFwd, av as wrapList, aw as youtubeId } from '../controller-Cd1Dprrk.cjs';
|
|
3
3
|
import { E as ElementNode, a as Position, N as Node, g as Selection, S as Step, C as CommentAuthor, d as CommentThread, c as CommentRenderState } from '../comments-USjT1wYN.cjs';
|
|
4
4
|
import 'preact';
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ declare function readSelection(root: HTMLElement, doc: ElementNode): Selection |
|
|
|
15
15
|
declare function writeSelection(root: HTMLElement, doc: ElementNode, selection: Selection): void;
|
|
16
16
|
declare function elementChildren(el: HTMLElement): HTMLElement[];
|
|
17
17
|
|
|
18
|
-
declare function
|
|
18
|
+
declare function markloomKit(): Extension[];
|
|
19
19
|
|
|
20
20
|
declare const boldMark: Extension;
|
|
21
21
|
declare const italicMark: Extension;
|
|
@@ -152,4 +152,4 @@ declare class TocPanel {
|
|
|
152
152
|
private paint;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
export { type AskInputOpts, type AskLinkPopoverOpts, CommentPanel, type CommentPanelHost, Extension, NodeView, TocPanel, type TocPanelHost, askInput, askLinkPopover, blockExtensions, boldMark, bubbleMenu, closeAskInput, codeBlock, codeControls, codeMark, comments, decorationExtensions, domToPoint, dragHandle, elementChildren, embedBlock, emoji, highlightMark, history, hrBlock, imageBlock, inputRules, invisibleCharacters, italicMark, linkMark,
|
|
155
|
+
export { type AskInputOpts, type AskLinkPopoverOpts, CommentPanel, type CommentPanelHost, Extension, NodeView, TocPanel, type TocPanelHost, askInput, askLinkPopover, blockExtensions, boldMark, bubbleMenu, closeAskInput, codeBlock, codeControls, codeMark, comments, decorationExtensions, domToPoint, dragHandle, elementChildren, embedBlock, emoji, highlightMark, history, hrBlock, imageBlock, inputRules, invisibleCharacters, italicMark, linkMark, markExtensions, markloomKit, mentionMenu, normalizeLinkUrl, pointToDom, readSelection, rootEl, shikiCodeView, slashMenu, strikeMark, subscriptMark, superscriptMark, tableBlock, textAlign, textStyleMark, typography, underlineMark, writeSelection };
|
package/dist/view/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NodeView, l as Extension } from '../controller-
|
|
2
|
-
export { e as AiWriteMode, f as AiWriteSession, m as AtomSelectCtx, B as BlockInputRule, n as BlockKind, o as BlockRenderCtx, p as BlockRenderer, C as CALLOUT_VARIANTS, q as CalloutVariant, D as DecorationFactory, r as DecorationHost, k as Editor, E as EditorOptions, I as InputResult, t as InputRuleCtx, u as Intent, K as KeymapCommand, v as KeymapCtx, w as KeymapResult,
|
|
1
|
+
import { N as NodeView, l as Extension } from '../controller-B_wG2Wh-.js';
|
|
2
|
+
export { e as AiWriteMode, f as AiWriteSession, m as AtomSelectCtx, B as BlockInputRule, n as BlockKind, o as BlockRenderCtx, p as BlockRenderer, C as CALLOUT_VARIANTS, q as CalloutVariant, D as DecorationFactory, r as DecorationHost, k as Editor, E as EditorOptions, I as InputResult, t as InputRuleCtx, u as Intent, K as KeymapCommand, v as KeymapCtx, w as KeymapResult, x as MentionCandidate, y as MentionHost, z as MentionMenu, F as MentionPopovers, G as MentionPopoversHost, H as MentionProfile, J as NodeViewCtx, P as PasteRule, R as RenderOpts, L as Resolved, S as SlashCommand, T as TextStylePatch, O as atomIsSelected, h as blockPlainText, Q as blockTransform, U as calloutVariantFromQuery, V as caret, W as chord, X as cycleCalloutVariant, Y as defaultBlockRenderers, Z as defaultBlockTag, _ as defaultMarkTag, $ as diffSpan, j as focusBlockId, a0 as indentItem, a1 as isAtom, a2 as isOpaque, a3 as leafText, a4 as lineBoundaryBack, a5 as lineBoundaryFwd, a6 as mapInput, a7 as mapPaste, a8 as mapPasteBlocks, a9 as marksAtCaret, aa as mergeTextStyleAttrs, ab as outdentItem, ac as renderCode, ad as renderDoc, ae as renderEmbed, af as renderHr, ag as renderImage, ah as renderTable, ai as renderToHtml, aj as resolve, ak as safeCssValue, al as serializeSelection, am as setAlign, an as setCalloutVariant, ao as setTextStyle, s as startAiWrite, ap as textStyleCss, aq as toggleMark, ar as toggleMarkList, as as twitchChannel, at as wordBoundaryBack, au as wordBoundaryFwd, av as wrapList, aw as youtubeId } from '../controller-B_wG2Wh-.js';
|
|
3
3
|
import { E as ElementNode, a as Position, N as Node, g as Selection, S as Step, C as CommentAuthor, d as CommentThread, c as CommentRenderState } from '../comments-USjT1wYN.js';
|
|
4
4
|
import 'preact';
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ declare function readSelection(root: HTMLElement, doc: ElementNode): Selection |
|
|
|
15
15
|
declare function writeSelection(root: HTMLElement, doc: ElementNode, selection: Selection): void;
|
|
16
16
|
declare function elementChildren(el: HTMLElement): HTMLElement[];
|
|
17
17
|
|
|
18
|
-
declare function
|
|
18
|
+
declare function markloomKit(): Extension[];
|
|
19
19
|
|
|
20
20
|
declare const boldMark: Extension;
|
|
21
21
|
declare const italicMark: Extension;
|
|
@@ -152,4 +152,4 @@ declare class TocPanel {
|
|
|
152
152
|
private paint;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
export { type AskInputOpts, type AskLinkPopoverOpts, CommentPanel, type CommentPanelHost, Extension, NodeView, TocPanel, type TocPanelHost, askInput, askLinkPopover, blockExtensions, boldMark, bubbleMenu, closeAskInput, codeBlock, codeControls, codeMark, comments, decorationExtensions, domToPoint, dragHandle, elementChildren, embedBlock, emoji, highlightMark, history, hrBlock, imageBlock, inputRules, invisibleCharacters, italicMark, linkMark,
|
|
155
|
+
export { type AskInputOpts, type AskLinkPopoverOpts, CommentPanel, type CommentPanelHost, Extension, NodeView, TocPanel, type TocPanelHost, askInput, askLinkPopover, blockExtensions, boldMark, bubbleMenu, closeAskInput, codeBlock, codeControls, codeMark, comments, decorationExtensions, domToPoint, dragHandle, elementChildren, embedBlock, emoji, highlightMark, history, hrBlock, imageBlock, inputRules, invisibleCharacters, italicMark, linkMark, markExtensions, markloomKit, mentionMenu, normalizeLinkUrl, pointToDom, readSelection, rootEl, shikiCodeView, slashMenu, strikeMark, subscriptMark, superscriptMark, tableBlock, textAlign, textStyleMark, typography, underlineMark, writeSelection };
|
package/dist/view/index.js
CHANGED
|
@@ -40,11 +40,11 @@ import {
|
|
|
40
40
|
lineBoundaryBack,
|
|
41
41
|
lineBoundaryFwd,
|
|
42
42
|
linkMark,
|
|
43
|
-
loomKit,
|
|
44
43
|
mapInput,
|
|
45
44
|
mapPaste,
|
|
46
45
|
mapPasteBlocks,
|
|
47
46
|
markExtensions,
|
|
47
|
+
markloomKit,
|
|
48
48
|
marksAtCaret,
|
|
49
49
|
mentionMenu,
|
|
50
50
|
mergeTextStyleAttrs,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
wordBoundaryFwd,
|
|
80
80
|
wrapList,
|
|
81
81
|
youtubeId
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-VMUJM52A.js";
|
|
83
83
|
import "../chunk-ITVAR2UM.js";
|
|
84
84
|
import {
|
|
85
85
|
blockPlainText,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
rootEl,
|
|
92
92
|
startAiWrite,
|
|
93
93
|
writeSelection
|
|
94
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-QXJHFQLJ.js";
|
|
95
95
|
import "../chunk-J3QWW6CN.js";
|
|
96
96
|
|
|
97
97
|
// src/view/shiki-code-view.ts
|
|
@@ -319,11 +319,11 @@ export {
|
|
|
319
319
|
lineBoundaryBack,
|
|
320
320
|
lineBoundaryFwd,
|
|
321
321
|
linkMark,
|
|
322
|
-
loomKit,
|
|
323
322
|
mapInput,
|
|
324
323
|
mapPaste,
|
|
325
324
|
mapPasteBlocks,
|
|
326
325
|
markExtensions,
|
|
326
|
+
markloomKit,
|
|
327
327
|
marksAtCaret,
|
|
328
328
|
mentionMenu,
|
|
329
329
|
mergeTextStyleAttrs,
|