@prosemark/core 0.0.2 → 0.0.4
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/main.d.ts +52 -12
- package/dist/main.js +314 -3144
- package/package.json +20 -4
package/dist/main.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { DOMEventHandlers, DOMEventMap, Decoration, DecorationSet } from "@codemirror/view";
|
|
1
|
+
import { DOMEventHandlers, DOMEventMap, Decoration, DecorationSet, EditorView, ViewPlugin, ViewUpdate } from "@codemirror/view";
|
|
2
2
|
import * as _codemirror_state0 from "@codemirror/state";
|
|
3
|
-
import { EditorState, Extension, Facet, Range, StateField } from "@codemirror/state";
|
|
3
|
+
import { EditorState, Extension, Facet, Line, Range, RangeSet, StateField } from "@codemirror/state";
|
|
4
4
|
import { Tag } from "@lezer/highlight";
|
|
5
5
|
import * as _lezer_markdown0 from "@lezer/markdown";
|
|
6
6
|
import { MarkdownConfig } from "@lezer/markdown";
|
|
7
7
|
import * as _lezer_common0 from "@lezer/common";
|
|
8
8
|
import { SyntaxNodeRef } from "@lezer/common";
|
|
9
9
|
|
|
10
|
-
//#region lib/hide/index.d.ts
|
|
11
|
-
declare const defaultHideExtensions: _codemirror_state0.Extension[];
|
|
12
|
-
declare const escapeMarkdownSyntaxExtension: MarkdownConfig;
|
|
13
|
-
//#endregion
|
|
14
10
|
//#region lib/utils.d.ts
|
|
15
11
|
interface RangeLike {
|
|
16
12
|
from: number;
|
|
@@ -19,13 +15,21 @@ interface RangeLike {
|
|
|
19
15
|
type ClassBasedEventHandlers<This> = { [event in keyof DOMEventMap]?: Record<string, DOMEventHandlers<This>[event]> };
|
|
20
16
|
declare function eventHandlersWithClass<This>(handlers: ClassBasedEventHandlers<This>): DOMEventHandlers<This>;
|
|
21
17
|
//#endregion
|
|
18
|
+
//#region lib/hide/core.d.ts
|
|
19
|
+
declare const hideExtension: StateField<DecorationSet>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region lib/hide/index.d.ts
|
|
22
|
+
declare const defaultHideExtensions: _codemirror_state0.Extension[];
|
|
23
|
+
declare const escapeMarkdownSyntaxExtension: MarkdownConfig;
|
|
24
|
+
//#endregion
|
|
22
25
|
//#region lib/fold/core.d.ts
|
|
23
|
-
declare const
|
|
26
|
+
declare const foldExtension: StateField<DecorationSet>;
|
|
24
27
|
interface FoldableSyntaxSpec {
|
|
25
28
|
nodePath: string | string[] | ((nodePath: string) => boolean);
|
|
26
|
-
|
|
29
|
+
buildDecorations?: (state: EditorState, node: SyntaxNodeRef, selectionTouchesRange: boolean) => Range<Decoration> | Range<Decoration>[] | undefined;
|
|
27
30
|
unfoldZone?: (state: EditorState, node: SyntaxNodeRef) => RangeLike;
|
|
28
31
|
eventHandlers?: DOMEventHandlers<void>;
|
|
32
|
+
keepDecorationOnUnfold?: boolean;
|
|
29
33
|
}
|
|
30
34
|
declare const foldableSyntaxFacet: Facet<FoldableSyntaxSpec, FoldableSyntaxSpec[]>;
|
|
31
35
|
declare const selectAllDecorationsOnSelectExtension: (widgetClass: string) => Extension;
|
|
@@ -37,6 +41,10 @@ declare const bulletListExtension: _codemirror_state0.Extension;
|
|
|
37
41
|
declare const emojiMarkdownSyntaxExtension: MarkdownConfig;
|
|
38
42
|
declare const emojiExtension: _codemirror_state0.Extension;
|
|
39
43
|
//#endregion
|
|
44
|
+
//#region lib/fold/dashes.d.ts
|
|
45
|
+
declare const dashMarkdownSyntaxExtension: MarkdownConfig;
|
|
46
|
+
declare const dashExtension: _codemirror_state0.Extension;
|
|
47
|
+
//#endregion
|
|
40
48
|
//#region lib/fold/horizontalRule.d.ts
|
|
41
49
|
declare const horizonalRuleExtension: _codemirror_state0.Extension[];
|
|
42
50
|
//#endregion
|
|
@@ -46,8 +54,26 @@ declare const imageExtension: _codemirror_state0.Extension[];
|
|
|
46
54
|
//#region lib/fold/task.d.ts
|
|
47
55
|
declare const taskExtension: _codemirror_state0.Extension[];
|
|
48
56
|
//#endregion
|
|
49
|
-
//#region lib/
|
|
50
|
-
|
|
57
|
+
//#region lib/blockQuote.d.ts
|
|
58
|
+
interface MeasureData {
|
|
59
|
+
lineFroms: number[];
|
|
60
|
+
nestedBorders: {
|
|
61
|
+
pos: number;
|
|
62
|
+
offset: number;
|
|
63
|
+
}[];
|
|
64
|
+
}
|
|
65
|
+
declare const blockQuoteExtension: ViewPlugin<{
|
|
66
|
+
decorations: DecorationSet;
|
|
67
|
+
update(u: ViewUpdate): void;
|
|
68
|
+
requestMeasure(view: EditorView): void;
|
|
69
|
+
applyMeasure(data: MeasureData, view: EditorView): void;
|
|
70
|
+
}, undefined>;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region lib/fold/index.d.ts
|
|
73
|
+
declare const defaultFoldableSyntaxExtensions: _codemirror_state0.Extension[];
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region lib/revealBlockOnArrow.d.ts
|
|
76
|
+
declare const revealBlockOnArrowExtension: _codemirror_state0.Extension[];
|
|
51
77
|
//#endregion
|
|
52
78
|
//#region lib/syntaxHighlighting.d.ts
|
|
53
79
|
declare const additionalMarkdownSyntaxTags: {
|
|
@@ -69,6 +95,7 @@ declare const markdownTags: {
|
|
|
69
95
|
emoji: Tag;
|
|
70
96
|
emojiMark: Tag;
|
|
71
97
|
listMark: Tag;
|
|
98
|
+
dash: Tag;
|
|
72
99
|
};
|
|
73
100
|
//#endregion
|
|
74
101
|
//#region lib/clickLink.d.ts
|
|
@@ -77,6 +104,20 @@ declare const clickLinkHandler: Facet<ClickLinkHandler, readonly ClickLinkHandle
|
|
|
77
104
|
declare const defaultClickLinkHandler: _codemirror_state0.Extension;
|
|
78
105
|
declare const clickLinkExtension: _codemirror_state0.Extension[];
|
|
79
106
|
//#endregion
|
|
107
|
+
//#region lib/softIndentExtension.d.ts
|
|
108
|
+
interface IndentData {
|
|
109
|
+
line: Line;
|
|
110
|
+
indentWidth: number;
|
|
111
|
+
}
|
|
112
|
+
declare const softIndentExtension: ViewPlugin<{
|
|
113
|
+
decorations: DecorationSet;
|
|
114
|
+
update(u: ViewUpdate): void;
|
|
115
|
+
requestMeasure(view: EditorView): void;
|
|
116
|
+
measureIndents(view: EditorView): IndentData[];
|
|
117
|
+
buildDecorations(indents: IndentData[]): RangeSet<Decoration>;
|
|
118
|
+
applyIndents(indents: IndentData[], view: EditorView): void;
|
|
119
|
+
}, undefined>;
|
|
120
|
+
//#endregion
|
|
80
121
|
//#region lib/codeFenceExtension.d.ts
|
|
81
122
|
declare const codeBlockDecorationsExtension: Extension;
|
|
82
123
|
declare const codeFenceTheme: Extension;
|
|
@@ -86,9 +127,8 @@ declare const prosemarkMarkdownSyntaxExtensions: (_lezer_markdown0.MarkdownConfi
|
|
|
86
127
|
defineNodes: never[];
|
|
87
128
|
props: _lezer_common0.NodePropSource[];
|
|
88
129
|
})[];
|
|
89
|
-
declare const defaultFoldableSyntaxExtensions: Extension[];
|
|
90
130
|
declare const prosemarkBasicSetup: () => Extension;
|
|
91
131
|
declare const prosemarkBaseThemeSetup: () => Extension;
|
|
92
132
|
declare const prosemarkLightThemeSetup: () => Extension;
|
|
93
133
|
//#endregion
|
|
94
|
-
export { ClickLinkHandler, additionalMarkdownSyntaxTags, baseSyntaxHighlights, baseTheme, blockQuoteExtension, bulletListExtension, clickLinkExtension, clickLinkHandler, codeBlockDecorationsExtension, codeFenceTheme, defaultClickLinkHandler, defaultFoldableSyntaxExtensions, defaultHideExtensions, emojiExtension, emojiMarkdownSyntaxExtension, escapeMarkdownSyntaxExtension, eventHandlersWithClass,
|
|
134
|
+
export { ClickLinkHandler, additionalMarkdownSyntaxTags, baseSyntaxHighlights, baseTheme, blockQuoteExtension, bulletListExtension, clickLinkExtension, clickLinkHandler, codeBlockDecorationsExtension, codeFenceTheme, dashExtension, dashMarkdownSyntaxExtension, defaultClickLinkHandler, defaultFoldableSyntaxExtensions, defaultHideExtensions, emojiExtension, emojiMarkdownSyntaxExtension, escapeMarkdownSyntaxExtension, eventHandlersWithClass, foldExtension, foldableSyntaxFacet, generalSyntaxHighlights, hideExtension, horizonalRuleExtension, imageExtension, lightTheme, markdownTags, prosemarkBaseThemeSetup, prosemarkBasicSetup, prosemarkLightThemeSetup, prosemarkMarkdownSyntaxExtensions, revealBlockOnArrowExtension, selectAllDecorationsOnSelectExtension, softIndentExtension, taskExtension };
|