@milkdown/preset-gfm 5.5.0 → 6.0.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/README.md +4 -4
- package/lib/{src/auto-link.d.ts → auto-link.d.ts} +0 -0
- package/lib/auto-link.d.ts.map +1 -0
- package/lib/footnote/definition.d.ts +7 -0
- package/lib/footnote/definition.d.ts.map +1 -0
- package/lib/footnote/index.d.ts +3 -0
- package/lib/footnote/index.d.ts.map +1 -0
- package/lib/footnote/reference.d.ts +7 -0
- package/lib/footnote/reference.d.ts.map +1 -0
- package/lib/footnote/utils.d.ts +3 -0
- package/lib/footnote/utils.d.ts.map +1 -0
- package/lib/index.d.ts +37 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/index.es.js +569 -426
- package/lib/index.es.js.map +1 -1
- package/lib/{src/strike-through.d.ts → strike-through.d.ts} +1 -1
- package/lib/strike-through.d.ts.map +1 -0
- package/lib/{src/supported-keys.d.ts → supported-keys.d.ts} +0 -0
- package/lib/supported-keys.d.ts.map +1 -0
- package/lib/{src/table → table}/command.d.ts +0 -0
- package/lib/table/command.d.ts.map +1 -0
- package/lib/{src/table → table}/index.d.ts +0 -0
- package/lib/table/index.d.ts.map +1 -0
- package/lib/{src/table → table}/nodes/index.d.ts +3 -3
- package/lib/table/nodes/index.d.ts.map +1 -0
- package/lib/{src/table → table}/nodes/schema.d.ts +0 -0
- package/lib/table/nodes/schema.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/actions.d.ts +0 -0
- package/lib/table/operator-plugin/actions.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/calc-pos.d.ts +0 -0
- package/lib/table/operator-plugin/calc-pos.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/constant.d.ts +0 -0
- package/lib/table/operator-plugin/constant.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/helper.d.ts +0 -0
- package/lib/table/operator-plugin/helper.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/index.d.ts +0 -0
- package/lib/table/operator-plugin/index.d.ts.map +1 -0
- package/lib/table/operator-plugin/style.d.ts +3 -0
- package/lib/table/operator-plugin/style.d.ts.map +1 -0
- package/lib/{src/table → table}/operator-plugin/widget.d.ts +0 -0
- package/lib/table/operator-plugin/widget.d.ts.map +1 -0
- package/lib/{src/table → table}/utils.d.ts +1 -0
- package/lib/table/utils.d.ts.map +1 -0
- package/lib/{src/task-list-item.d.ts → task-list-item.d.ts} +1 -1
- package/lib/task-list-item.d.ts.map +1 -0
- package/package.json +36 -12
- package/src/footnote/definition.ts +184 -0
- package/src/footnote/index.ts +3 -0
- package/src/footnote/reference.ts +171 -0
- package/src/footnote/utils.ts +4 -0
- package/src/index.ts +5 -0
- package/src/strike-through.ts +2 -9
- package/src/table/nodes/index.ts +0 -2
- package/src/table/operator-plugin/actions.ts +9 -9
- package/src/table/operator-plugin/index.ts +9 -8
- package/src/table/operator-plugin/style.ts +109 -37
- package/src/table/operator-plugin/widget.ts +3 -4
- package/src/task-list-item.ts +62 -127
- package/lib/src/auto-link.d.ts.map +0 -1
- package/lib/src/index.d.ts +0 -36
- package/lib/src/index.d.ts.map +0 -1
- package/lib/src/strike-through.d.ts.map +0 -1
- package/lib/src/supported-keys.d.ts.map +0 -1
- package/lib/src/table/command.d.ts.map +0 -1
- package/lib/src/table/index.d.ts.map +0 -1
- package/lib/src/table/nodes/index.d.ts.map +0 -1
- package/lib/src/table/nodes/schema.d.ts.map +0 -1
- package/lib/src/table/nodes/style.d.ts +0 -3
- package/lib/src/table/nodes/style.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/actions.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/calc-pos.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/constant.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/helper.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/index.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/style.d.ts +0 -3
- package/lib/src/table/operator-plugin/style.d.ts.map +0 -1
- package/lib/src/table/operator-plugin/widget.d.ts.map +0 -1
- package/lib/src/table/utils.d.ts.map +0 -1
- package/lib/src/task-list-item.d.ts.map +0 -1
- package/src/table/nodes/style.ts +0 -170
|
@@ -1,50 +1,122 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { Emotion,
|
|
2
|
+
import { Emotion, getPalette, ThemeBorder, ThemeManager, ThemeShadow, ThemeSize } from '@milkdown/core';
|
|
3
3
|
|
|
4
|
-
export const injectStyle = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export const injectStyle = (themeManager: ThemeManager, { css, injectGlobal }: Emotion) => {
|
|
5
|
+
const palette = getPalette(themeManager);
|
|
6
|
+
const radius = themeManager.get(ThemeSize, 'radius');
|
|
7
|
+
const lineWidth = themeManager.get(ThemeSize, 'lineWidth');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
injectGlobal`
|
|
10
|
+
.milkdown {
|
|
11
|
+
.tableWrapper {
|
|
12
|
+
table {
|
|
13
|
+
width: calc(100% - 2em) !important;
|
|
14
|
+
margin: 1em 0 1em 1em !important;
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
.milkdown-cell-left,
|
|
17
|
+
.milkdown-cell-point,
|
|
18
|
+
.milkdown-cell-top {
|
|
19
|
+
position: absolute;
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
&::after {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
height: 100%;
|
|
27
|
+
width: 100%;
|
|
28
|
+
display: block;
|
|
29
|
+
transition: all 0.2s ease-in-out;
|
|
30
|
+
background: ${palette('secondary', 0.12)};
|
|
31
|
+
content: '';
|
|
32
|
+
}
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
&:hover::after {
|
|
35
|
+
background: ${palette('secondary', 0.38)};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
16
38
|
|
|
17
|
-
|
|
39
|
+
.milkdown-cell-left {
|
|
40
|
+
left: calc(-6px - 0.5em);
|
|
41
|
+
top: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
width: 0.5em;
|
|
44
|
+
}
|
|
18
45
|
|
|
19
|
-
|
|
20
|
-
|
|
46
|
+
.milkdown-cell-top {
|
|
47
|
+
left: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
top: calc(-6px - 0.5em);
|
|
50
|
+
height: 0.5em;
|
|
51
|
+
}
|
|
21
52
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
53
|
+
.milkdown-cell-point {
|
|
54
|
+
left: calc(-2px - 1em);
|
|
55
|
+
top: calc(-2px - 1em);
|
|
56
|
+
width: 1em;
|
|
57
|
+
height: 1em;
|
|
25
58
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
59
|
+
.icon {
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
32
69
|
}
|
|
33
|
-
|
|
34
|
-
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
return css`
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
z-index: 2;
|
|
76
|
+
|
|
77
|
+
justify-content: space-evenly;
|
|
78
|
+
|
|
79
|
+
position: absolute;
|
|
80
|
+
|
|
81
|
+
border-radius: ${radius};
|
|
82
|
+
|
|
83
|
+
${themeManager.get(ThemeBorder, undefined)};
|
|
84
|
+
${themeManager.get(ThemeShadow, undefined)};
|
|
85
|
+
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
background: ${palette('surface')};
|
|
88
|
+
|
|
89
|
+
.icon {
|
|
90
|
+
position: relative;
|
|
91
|
+
color: ${palette('solid', 0.87)};
|
|
92
|
+
|
|
93
|
+
width: 2em;
|
|
94
|
+
line-height: 2em;
|
|
95
|
+
text-align: center;
|
|
96
|
+
transition: all 0.4s ease-in-out;
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
background-color: ${palette('secondary', 0.12)};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.active {
|
|
103
|
+
color: ${palette('primary')};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:not(:last-child)::after {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
right: 0;
|
|
110
|
+
top: 0;
|
|
111
|
+
width: ${lineWidth};
|
|
112
|
+
bottom: 0;
|
|
113
|
+
background: ${palette('line')};
|
|
114
|
+
}
|
|
35
115
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
top: 0;
|
|
41
|
-
width: ${size.lineWidth};
|
|
42
|
-
bottom: 0;
|
|
43
|
-
background: ${palette('line')};
|
|
116
|
+
|
|
117
|
+
&.hide,
|
|
118
|
+
.hide {
|
|
119
|
+
display: none;
|
|
44
120
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.hide {
|
|
48
|
-
display: none;
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
121
|
+
`;
|
|
122
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
2
|
|
|
3
|
-
import { Ctx,
|
|
3
|
+
import { Ctx, ThemeIcon, themeManagerCtx } from '@milkdown/core';
|
|
4
4
|
import { Decoration, WidgetDecorationSpec } from '@milkdown/prose';
|
|
5
5
|
|
|
6
6
|
import { CellPos, selectLine, selectTable } from '../utils';
|
|
@@ -35,11 +35,11 @@ export function createWidget(
|
|
|
35
35
|
index: number,
|
|
36
36
|
): Decoration<WidgetDecorationSpec>;
|
|
37
37
|
export function createWidget(ctx: Ctx, cell: CellPos, pos: ToolTipPos, index = 0) {
|
|
38
|
-
|
|
38
|
+
return Decoration.widget(cell.pos + 1, (view) => {
|
|
39
39
|
const div = document.createElement('div');
|
|
40
40
|
div.classList.add(calculateClassName(pos));
|
|
41
41
|
if (pos === ToolTipPos.Point) {
|
|
42
|
-
div.appendChild(ctx.get(
|
|
42
|
+
div.appendChild(ctx.get(themeManagerCtx).get(ThemeIcon, 'select')?.dom as HTMLElement);
|
|
43
43
|
}
|
|
44
44
|
div.addEventListener('mousedown', (e) => {
|
|
45
45
|
if (!view) return;
|
|
@@ -62,5 +62,4 @@ export function createWidget(ctx: Ctx, cell: CellPos, pos: ToolTipPos, index = 0
|
|
|
62
62
|
});
|
|
63
63
|
return div;
|
|
64
64
|
});
|
|
65
|
-
return widget;
|
|
66
65
|
}
|
package/src/task-list-item.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* Copyright 2021, Milkdown by Mirone. */
|
|
2
|
-
import { createCmd, createCmdKey,
|
|
3
|
-
import type { Icon } from '@milkdown/design-system';
|
|
2
|
+
import { createCmd, createCmdKey, editorViewCtx, ThemeTaskListItemType } from '@milkdown/core';
|
|
4
3
|
import { liftListItem, sinkListItem, splitListItem, wrapIn, wrappingInputRule } from '@milkdown/prose';
|
|
5
4
|
import { createNode, createShortcut } from '@milkdown/utils';
|
|
6
5
|
|
|
@@ -15,59 +14,10 @@ export const TurnIntoTaskList = createCmdKey('TurnIntoTaskList');
|
|
|
15
14
|
|
|
16
15
|
export const taskListItem = createNode<Keys>((utils) => {
|
|
17
16
|
const id = 'task_list_item';
|
|
18
|
-
const style = utils.getStyle(
|
|
19
|
-
({ palette, size }, { css }) =>
|
|
20
|
-
css`
|
|
21
|
-
list-style-type: none;
|
|
22
|
-
position: relative;
|
|
23
|
-
|
|
24
|
-
& > div {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
padding: 0 2px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
label {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 0;
|
|
32
|
-
left: -2rem;
|
|
33
|
-
display: inline-block;
|
|
34
|
-
width: 1.5rem;
|
|
35
|
-
height: 1.5rem;
|
|
36
|
-
margin: 0.5rem 0;
|
|
37
|
-
input {
|
|
38
|
-
visibility: hidden;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
label:before {
|
|
42
|
-
position: absolute;
|
|
43
|
-
top: 0;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
left: 0;
|
|
47
|
-
border-radius: ${size.radius};
|
|
48
|
-
}
|
|
49
|
-
label:hover:before {
|
|
50
|
-
background: ${palette('background')};
|
|
51
|
-
}
|
|
52
|
-
&[data-checked='true'] {
|
|
53
|
-
label {
|
|
54
|
-
color: ${palette('primary')};
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
&[data-checked='false'] {
|
|
58
|
-
label {
|
|
59
|
-
color: ${palette('solid', 0.87)};
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
.paragraph {
|
|
63
|
-
margin: 0.5rem 0;
|
|
64
|
-
}
|
|
65
|
-
`,
|
|
66
|
-
);
|
|
67
17
|
|
|
68
18
|
return {
|
|
69
19
|
id,
|
|
70
|
-
schema: () => ({
|
|
20
|
+
schema: (ctx) => ({
|
|
71
21
|
group: 'listItem',
|
|
72
22
|
content: 'paragraph block*',
|
|
73
23
|
defining: true,
|
|
@@ -88,15 +38,45 @@ export const taskListItem = createNode<Keys>((utils) => {
|
|
|
88
38
|
},
|
|
89
39
|
},
|
|
90
40
|
],
|
|
91
|
-
toDOM: (node) =>
|
|
92
|
-
'
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
41
|
+
toDOM: (node) => {
|
|
42
|
+
const checkbox = document.createElement('input');
|
|
43
|
+
checkbox.type = 'checkbox';
|
|
44
|
+
checkbox.checked = node.attrs['checked'];
|
|
45
|
+
checkbox.className = utils.getClassName(node.attrs, 'task-list-item_checkbox');
|
|
46
|
+
checkbox.onchange = (event) => {
|
|
47
|
+
const target = event.target;
|
|
48
|
+
if (!(target instanceof HTMLInputElement)) return;
|
|
49
|
+
const view = ctx.get(editorViewCtx);
|
|
50
|
+
|
|
51
|
+
if (!view.editable) {
|
|
52
|
+
checkbox.checked = !checkbox.checked;
|
|
53
|
+
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const { top, left } = target.getBoundingClientRect();
|
|
58
|
+
const result = view.posAtCoords({ top, left });
|
|
59
|
+
if (!result) return;
|
|
60
|
+
|
|
61
|
+
const { tr } = view.state;
|
|
62
|
+
|
|
63
|
+
view.dispatch(
|
|
64
|
+
tr.setNodeMarkup(result.inside, undefined, {
|
|
65
|
+
checked: target.checked,
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
return [
|
|
70
|
+
'li',
|
|
71
|
+
{
|
|
72
|
+
'data-type': 'task-item',
|
|
73
|
+
'data-checked': node.attrs['checked'] ? 'true' : 'false',
|
|
74
|
+
class: utils.getClassName(node.attrs, 'task-list-item'),
|
|
75
|
+
},
|
|
76
|
+
checkbox,
|
|
77
|
+
['span', { class: utils.getClassName(node.attrs, 'task-list-item_body') }, 0],
|
|
78
|
+
];
|
|
79
|
+
},
|
|
100
80
|
parseMarkdown: {
|
|
101
81
|
match: ({ type, checked }) => {
|
|
102
82
|
return type === 'listItem' && checked !== null;
|
|
@@ -133,82 +113,37 @@ export const taskListItem = createNode<Keys>((utils) => {
|
|
|
133
113
|
[SupportedKeys.LiftListItem]: createShortcut(LiftTaskListItem, 'Mod-['),
|
|
134
114
|
[SupportedKeys.TaskList]: createShortcut(TurnIntoTaskList, 'Mod-Alt-9'),
|
|
135
115
|
},
|
|
136
|
-
view: (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
icon = nextIcon;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
checkboxWrapper.contentEditable = 'false';
|
|
154
|
-
checkbox.type = 'checkbox';
|
|
155
|
-
const onChange = (event: Event) => {
|
|
156
|
-
const target = event.target;
|
|
157
|
-
if (!(target instanceof HTMLInputElement)) return;
|
|
158
|
-
|
|
159
|
-
if (!view.editable) {
|
|
160
|
-
checkbox.checked = !checkbox.checked;
|
|
161
|
-
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const { tr } = view.state;
|
|
166
|
-
|
|
167
|
-
view.dispatch(
|
|
168
|
-
tr.setNodeMarkup(getPos(), undefined, {
|
|
169
|
-
checked: target.checked,
|
|
170
|
-
}),
|
|
171
|
-
);
|
|
172
|
-
};
|
|
173
|
-
checkbox.addEventListener('change', onChange);
|
|
174
|
-
|
|
175
|
-
listItem.dataset['checked'] = node.attrs['checked'];
|
|
176
|
-
if (node.attrs['checked']) {
|
|
177
|
-
checkbox.setAttribute('checked', 'checked');
|
|
178
|
-
}
|
|
116
|
+
view: () => (node, view, getPos) => {
|
|
117
|
+
let currNode = node;
|
|
118
|
+
|
|
119
|
+
const renderer = utils.themeManager.get<ThemeTaskListItemType>('task-list-item', {
|
|
120
|
+
editable: () => view.editable,
|
|
121
|
+
onChange: (selected) => {
|
|
122
|
+
const { tr } = view.state;
|
|
123
|
+
view.dispatch(
|
|
124
|
+
tr.setNodeMarkup(getPos(), undefined, {
|
|
125
|
+
checked: selected,
|
|
126
|
+
}),
|
|
127
|
+
);
|
|
128
|
+
},
|
|
129
|
+
});
|
|
179
130
|
|
|
180
|
-
|
|
181
|
-
listItem.append(checkboxWrapper, content);
|
|
131
|
+
if (!renderer) return {};
|
|
182
132
|
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
'data-checked': node.attrs['checked'] ? 'true' : 'false',
|
|
186
|
-
class: utils.getClassName(node.attrs, 'task-list-item', style),
|
|
187
|
-
};
|
|
188
|
-
Object.entries(attributes).forEach(([key, value]) => {
|
|
189
|
-
listItem.setAttribute(key, value);
|
|
190
|
-
});
|
|
191
|
-
setIcon(node.attrs['checked'] ? 'checked' : 'unchecked');
|
|
133
|
+
const { dom, contentDOM, onUpdate } = renderer;
|
|
134
|
+
onUpdate(currNode);
|
|
192
135
|
|
|
193
136
|
return {
|
|
194
|
-
dom
|
|
195
|
-
contentDOM
|
|
137
|
+
dom,
|
|
138
|
+
contentDOM,
|
|
196
139
|
update: (updatedNode) => {
|
|
197
140
|
if (updatedNode.type.name !== id) return false;
|
|
198
141
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
checkbox.setAttribute('checked', 'checked');
|
|
202
|
-
} else {
|
|
203
|
-
checkbox.removeAttribute('checked');
|
|
204
|
-
}
|
|
205
|
-
setIcon(updatedNode.attrs['checked'] ? 'checked' : 'unchecked');
|
|
142
|
+
currNode = updatedNode;
|
|
143
|
+
onUpdate(currNode);
|
|
206
144
|
|
|
207
145
|
return true;
|
|
208
146
|
},
|
|
209
|
-
destroy: () => {
|
|
210
|
-
checkbox.removeEventListener('change', onChange);
|
|
211
|
-
},
|
|
212
147
|
};
|
|
213
148
|
},
|
|
214
149
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auto-link.d.ts","sourceRoot":"","sources":["auto-link.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS,kCAAiC,CAAC"}
|
package/lib/src/index.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AtomList } from '@milkdown/utils';
|
|
2
|
-
export * from './strike-through';
|
|
3
|
-
export { SupportedKeys } from './supported-keys';
|
|
4
|
-
export { BreakTable, createTable, InsertTable, NextCell, PrevCell, table, } from './table';
|
|
5
|
-
export * from './task-list-item';
|
|
6
|
-
export { blockquote, bulletList, codeFence, codeInline, commonmark, commonmarkNodes, commonmarkPlugins, doc, em, hardbreak, heading, hr, image, InsertHardbreak, InsertHr, InsertImage, LiftListItem, link, listItem, ModifyImage, ModifyLink, orderedList, paragraph, SinkListItem, SplitListItem, strong, text, ToggleBold, ToggleInlineCode, ToggleItalic, ToggleLink, TurnIntoCodeFence, TurnIntoHeading, TurnIntoText, WrapInBlockquote, WrapInBulletList, WrapInOrderedList, } from '@milkdown/preset-commonmark';
|
|
7
|
-
export declare const gfm: AtomList<import("@milkdown/utils").$Prose | (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<"CodeFence", {
|
|
8
|
-
languageList?: string[] | undefined;
|
|
9
|
-
}>> & import("@milkdown/core").MilkdownPlugin) | (import("@milkdown/utils/lib/src/types").Metadata<import("@milkdown/utils/lib/src/types").GetPlugin<string, import("@milkdown/preset-commonmark").ImageOptions>> & import("@milkdown/core").MilkdownPlugin) | import("@milkdown/utils").$Remark>;
|
|
10
|
-
export declare const commands: {
|
|
11
|
-
readonly ToggleStrikeThrough: import("@milkdown/core").CmdKey<undefined>;
|
|
12
|
-
readonly TurnIntoTaskList: import("@milkdown/core").CmdKey<undefined>;
|
|
13
|
-
readonly SinkTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
14
|
-
readonly LiftTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
15
|
-
readonly SplitTaskListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
16
|
-
readonly ToggleInlineCode: import("@milkdown/core").CmdKey<undefined>;
|
|
17
|
-
readonly ToggleItalic: import("@milkdown/core").CmdKey<undefined>;
|
|
18
|
-
readonly ToggleLink: import("@milkdown/core").CmdKey<string>;
|
|
19
|
-
readonly ToggleBold: import("@milkdown/core").CmdKey<undefined>;
|
|
20
|
-
readonly ModifyLink: import("@milkdown/core").CmdKey<string>;
|
|
21
|
-
readonly ModifyImage: import("@milkdown/core").CmdKey<string>;
|
|
22
|
-
readonly WrapInBlockquote: import("@milkdown/core").CmdKey<undefined>;
|
|
23
|
-
readonly WrapInBulletList: import("@milkdown/core").CmdKey<undefined>;
|
|
24
|
-
readonly WrapInOrderedList: import("@milkdown/core").CmdKey<undefined>;
|
|
25
|
-
readonly TurnIntoCodeFence: import("@milkdown/core").CmdKey<undefined>;
|
|
26
|
-
readonly TurnIntoHeading: import("@milkdown/core").CmdKey<number>;
|
|
27
|
-
readonly TurnIntoText: import("@milkdown/core").CmdKey<undefined>;
|
|
28
|
-
readonly InsertHardbreak: import("@milkdown/core").CmdKey<undefined>;
|
|
29
|
-
readonly InsertHr: import("@milkdown/core").CmdKey<string>;
|
|
30
|
-
readonly InsertImage: import("@milkdown/core").CmdKey<string>;
|
|
31
|
-
readonly SplitListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
32
|
-
readonly SinkListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
33
|
-
readonly LiftListItem: import("@milkdown/core").CmdKey<undefined>;
|
|
34
|
-
};
|
|
35
|
-
export declare type Commands = typeof commands;
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAcpD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACH,UAAU,EAEV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EAER,KAAK,GACR,MAAM,SAAS,CAAC;AACjB,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACH,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EAEV,eAAe,EACf,iBAAiB,EAEjB,GAAG,EACH,EAAE,EACF,SAAS,EACT,OAAO,EACP,EAAE,EACF,KAAK,EAEL,eAAe,EACf,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,aAAa,EACb,MAAM,EACN,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,GAAG;;iSAOd,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;CAOX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strike-through.d.ts","sourceRoot":"","sources":["strike-through.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB,4CAAsC,CAAC;AAEvE,eAAO,MAAM,aAAa;;;;EAyCxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supported-keys.d.ts","sourceRoot":"","sources":["supported-keys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;CAKhB,CAAC;AACX,oBAAY,aAAa,GAAG,OAAO,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAmB,QAAQ,EAAa,MAAM,iBAAiB,CAAC;AAEhF,eAAO,MAAM,SAAS,SACX,QAAQ,KAAG,OAWjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ;;;;;CAKX,CAAC;AACX,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,QAAQ,EAIX,MAAM,iBAAiB,CAAC;AASzB,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AACX,oBAAY,aAAa,GAAG,OAAO,aAAa,CAAC;AAIjD,eAAO,MAAM,QAAQ,4CAA2B,CAAC;AACjD,eAAO,MAAM,QAAQ,4CAA2B,CAAC;AACjD,eAAO,MAAM,UAAU,4CAA6B,CAAC;AACrD,eAAO,MAAM,WAAW,4CAA8B,CAAC;AAEvD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;EA+IhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,sCAYjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AA+CxC,eAAO,MAAM,WAAW,UAAW,KAAK,uBAwHvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAgB,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAGH,OAAO,EAIP,UAAU,EAIb,MAAM,iBAAiB,CAAC;AAKzB,oBAAY,IAAI,GAAG;IACf,CAAC,EAAE,WAAW,CAAC;IACf,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;CAC3C,CAAC;AAEF,oBAAY,MAAM;IACd,UAAU,IAAA;IACV,WAAW,IAAA;IACX,SAAS,IAAA;IACT,YAAY,IAAA;IACZ,SAAS,IAAA;IACT,WAAW,IAAA;IACX,UAAU,IAAA;IACV,MAAM,IAAA;CACT;AAED,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CA+E3D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calc-pos.d.ts","sourceRoot":"","sources":["calc-pos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwC,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEnF,eAAO,MAAM,iBAAiB,SAAU,UAAU,OAAO,WAAW,SAoBnE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["constant.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,eAAO,MAAM,gBAAgB,SAAU,UAAU,KAAG,aAAiE,CAAC;AAEtH,eAAO,MAAM,kBAAkB,cAAe,aAAa,YAmB1D,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,OAAO,MAAM,EAAE,IAAI,CAAC,QAAQ,UAAU,SAS5E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAA4C,MAAM,EAAa,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAUxC,eAAO,MAAM,GAAG,0BAA0B,CAAC;AAE3C,eAAO,MAAM,cAAc,QAAS,GAAG,SAAS,KAAK,qBAiFpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEpD,eAAO,MAAM,WAAW,6BAA8B,SAAS,WAAW,OAAO,WA8ChF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["widget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAgB,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,OAAO,EAA2B,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAiBxC,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC/G,wBAAgB,YAAY,CACxB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,UAAU,CAAC,IAAI,EACpB,KAAK,EAAE,MAAM,GACd,UAAU,CAAC,oBAAoB,CAAC,CAAC;AACpC,wBAAgB,YAAY,CACxB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,UAAU,CAAC,GAAG,EACnB,KAAK,EAAE,MAAM,GACd,UAAU,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,IAAI,IAAI,eAAe,EACvB,MAAM,EACN,SAAS,EAGT,SAAS,EACT,WAAW,EACd,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,OAAO,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS,cAAe,SAAS,6DACkC,CAAC;AAEjF,eAAO,MAAM,gBAAgB,gBACX,MAAM,iBACR,SAAS,KAAG,OAAO,EAAE,GAAG,SAkBnC,CAAC;AAEN,eAAO,MAAM,aAAa,aACX,MAAM,iBACL,SAAS,KAAG,OAAO,EAAE,GAAG,SAkBnC,CAAC;AAEN,eAAO,MAAM,WAAW,WAAY,MAAM,iEAgBzC,CAAC;AAEF,eAAO,MAAM,UAAU,SAAU,KAAK,GAAG,KAAK,aAAa,MAAM,UAAU,WAAW,QAuBrF,CAAC;AAEF,eAAO,MAAM,eAAe,cAAe,SAAS;;;;eAiBnD,CAAC;AAEF,eAAO,MAAM,WAAW,OAAQ,WAAW,QAW1C,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,oBAkBtG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-list-item.d.ts","sourceRoot":"","sources":["task-list-item.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,aAAK,IAAI,GAAG,OAAO,CAAC,MAAM,aAAa,EAAE,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,UAAU,CAAC,CAAC;AAExG,eAAO,MAAM,iBAAiB,4CAAoC,CAAC;AACnE,eAAO,MAAM,gBAAgB,4CAAmC,CAAC;AACjE,eAAO,MAAM,gBAAgB,4CAAmC,CAAC;AACjE,eAAO,MAAM,gBAAgB,4CAAmC,CAAC;AAEjE,eAAO,MAAM,YAAY;;;;EAuMvB,CAAC"}
|