@prosekit/basic 0.3.14 → 0.3.16
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/_tsup-dts-rollup.d.ts +56 -4
- package/dist/style.css +14 -7
- package/dist/typography.css +23 -23
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AddMarkOptions } from '@prosekit/core';
|
|
2
|
+
import { Attrs } from 'prosemirror-model';
|
|
2
3
|
import { DedentListOptions } from 'prosemirror-flat-list';
|
|
3
4
|
import { config as default_alias_2 } from '@prosekit/dev/config-vitest';
|
|
4
5
|
import { Extension } from '@prosekit/core';
|
|
@@ -13,6 +14,7 @@ import { RemoveMarkOptions } from '@prosekit/core';
|
|
|
13
14
|
import { RemoveNodeOptions } from '@prosekit/core';
|
|
14
15
|
import { SetBlockTypeOptions } from '@prosekit/core';
|
|
15
16
|
import { SetNodeAttrsOptions } from '@prosekit/core';
|
|
17
|
+
import { SimplifyDeeper } from '@prosekit/core';
|
|
16
18
|
import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
|
|
17
19
|
import { UnsetBlockTypeOptions } from '@prosekit/core';
|
|
18
20
|
import { UnsetMarkOptions } from '@prosekit/core';
|
|
@@ -41,8 +43,58 @@ export { default_alias_2 }
|
|
|
41
43
|
* @public
|
|
42
44
|
*/
|
|
43
45
|
export declare function defineBasicExtension(): Extension< {
|
|
44
|
-
Nodes:
|
|
45
|
-
|
|
46
|
+
Nodes: SimplifyDeeper< {
|
|
47
|
+
paragraph: Attrs;
|
|
48
|
+
doc: Attrs;
|
|
49
|
+
text: Attrs;
|
|
50
|
+
blockquote: {
|
|
51
|
+
readonly [x: string]: any;
|
|
52
|
+
};
|
|
53
|
+
list: {
|
|
54
|
+
kind?: "bullet" | "ordered" | "task" | "toggle";
|
|
55
|
+
order?: number | null;
|
|
56
|
+
checked?: boolean;
|
|
57
|
+
collapsed?: boolean;
|
|
58
|
+
};
|
|
59
|
+
heading: {
|
|
60
|
+
level: number;
|
|
61
|
+
};
|
|
62
|
+
image: {
|
|
63
|
+
src: null;
|
|
64
|
+
};
|
|
65
|
+
table: {
|
|
66
|
+
readonly [x: string]: any;
|
|
67
|
+
};
|
|
68
|
+
tableRow: {
|
|
69
|
+
readonly [x: string]: any;
|
|
70
|
+
};
|
|
71
|
+
tableCell: {
|
|
72
|
+
[x: string]: any;
|
|
73
|
+
};
|
|
74
|
+
tableHeaderCell: {
|
|
75
|
+
[x: string]: any;
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
78
|
+
Marks: SimplifyDeeper< {
|
|
79
|
+
bold: {
|
|
80
|
+
readonly [x: string]: any;
|
|
81
|
+
};
|
|
82
|
+
code: {
|
|
83
|
+
readonly [x: string]: any;
|
|
84
|
+
};
|
|
85
|
+
italic: {
|
|
86
|
+
readonly [x: string]: any;
|
|
87
|
+
};
|
|
88
|
+
link: {
|
|
89
|
+
href: string;
|
|
90
|
+
};
|
|
91
|
+
strike: {
|
|
92
|
+
readonly [x: string]: any;
|
|
93
|
+
};
|
|
94
|
+
underline: {
|
|
95
|
+
readonly [x: string]: any;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
46
98
|
Commands: {
|
|
47
99
|
insertText: [{
|
|
48
100
|
text: string;
|
|
@@ -59,8 +111,8 @@ addMark: [options: AddMarkOptions];
|
|
|
59
111
|
removeMark: [options: RemoveMarkOptions];
|
|
60
112
|
unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
|
|
61
113
|
unsetMark: [options?: UnsetMarkOptions | undefined];
|
|
62
|
-
undo: [];
|
|
63
|
-
redo: [];
|
|
114
|
+
readonly undo: [];
|
|
115
|
+
readonly redo: [];
|
|
64
116
|
toggleBold: [];
|
|
65
117
|
toggleCode: [];
|
|
66
118
|
setHeading: [attrs?: HeadingAttrs | undefined];
|
package/dist/style.css
CHANGED
|
@@ -37,7 +37,10 @@ li.ProseMirror-selectednode {
|
|
|
37
37
|
li.ProseMirror-selectednode:after {
|
|
38
38
|
content: "";
|
|
39
39
|
position: absolute;
|
|
40
|
-
|
|
40
|
+
left: -32px;
|
|
41
|
+
right: -2px;
|
|
42
|
+
top: -2px;
|
|
43
|
+
bottom: -2px;
|
|
41
44
|
border: 2px solid #8cf;
|
|
42
45
|
pointer-events: none;
|
|
43
46
|
}
|
|
@@ -49,10 +52,11 @@ img.ProseMirror-separator {
|
|
|
49
52
|
|
|
50
53
|
/* ../pm/src/view/style/prosemirror.css */
|
|
51
54
|
|
|
52
|
-
/* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.
|
|
55
|
+
/* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.3/node_modules/prosemirror-flat-list/dist/style.css */
|
|
53
56
|
.prosemirror-flat-list {
|
|
54
57
|
padding: 0;
|
|
55
58
|
margin-top: 0;
|
|
59
|
+
margin-bottom: 0;
|
|
56
60
|
margin-left: 32px;
|
|
57
61
|
margin-bottom: 0;
|
|
58
62
|
position: relative;
|
|
@@ -65,7 +69,10 @@ img.ProseMirror-separator {
|
|
|
65
69
|
.prosemirror-flat-list.ProseMirror-selectednode:after {
|
|
66
70
|
content: "";
|
|
67
71
|
position: absolute;
|
|
68
|
-
|
|
72
|
+
left: -32px;
|
|
73
|
+
right: -2px;
|
|
74
|
+
top: -2px;
|
|
75
|
+
bottom: -2px;
|
|
69
76
|
border: 2px solid #8cf;
|
|
70
77
|
pointer-events: none;
|
|
71
78
|
}
|
|
@@ -78,7 +85,7 @@ img.ProseMirror-separator {
|
|
|
78
85
|
.prosemirror-flat-list[data-list-kind=ordered] > * {
|
|
79
86
|
contain: style;
|
|
80
87
|
}
|
|
81
|
-
.prosemirror-flat-list[data-list-kind=ordered]
|
|
88
|
+
.prosemirror-flat-list[data-list-kind=ordered]::before {
|
|
82
89
|
position: absolute;
|
|
83
90
|
right: 100%;
|
|
84
91
|
font-variant-numeric: tabular-nums;
|
|
@@ -116,10 +123,10 @@ img.ProseMirror-separator {
|
|
|
116
123
|
width: 1.5em;
|
|
117
124
|
width: 1lh;
|
|
118
125
|
}
|
|
119
|
-
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker
|
|
126
|
+
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker::before {
|
|
120
127
|
content: "\23f7";
|
|
121
128
|
}
|
|
122
|
-
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker
|
|
129
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker::before {
|
|
123
130
|
content: "\23f5";
|
|
124
131
|
}
|
|
125
132
|
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
|
|
@@ -171,7 +178,7 @@ img.ProseMirror-separator {
|
|
|
171
178
|
}
|
|
172
179
|
|
|
173
180
|
/* ../extensions/src/placeholder/style.css */
|
|
174
|
-
.prosekit-placeholder
|
|
181
|
+
.prosekit-placeholder::before {
|
|
175
182
|
position: absolute;
|
|
176
183
|
opacity: 30%;
|
|
177
184
|
pointer-events: none;
|
package/dist/typography.css
CHANGED
|
@@ -42,23 +42,23 @@ div.ProseMirror ul,
|
|
|
42
42
|
div.ProseMirror ol,
|
|
43
43
|
div.ProseMirror pre {
|
|
44
44
|
margin: 0;
|
|
45
|
-
padding: .5rem 0;
|
|
45
|
+
padding: 0.5rem 0;
|
|
46
46
|
line-height: 1.5;
|
|
47
47
|
}
|
|
48
48
|
div.ProseMirror blockquote {
|
|
49
49
|
padding-left: 1em;
|
|
50
|
-
border-left: .25em solid hsla(0, 0%, 60%, .4);
|
|
50
|
+
border-left: 0.25em solid hsla(0, 0%, 60%, 0.4);
|
|
51
51
|
}
|
|
52
52
|
div.ProseMirror h1 {
|
|
53
53
|
margin: 1rem 0;
|
|
54
54
|
font-size: 2.25em;
|
|
55
55
|
}
|
|
56
56
|
div.ProseMirror h2 {
|
|
57
|
-
margin: 1.75em 0 .5em;
|
|
57
|
+
margin: 1.75em 0 0.5em;
|
|
58
58
|
font-size: 1.75em;
|
|
59
59
|
}
|
|
60
60
|
div.ProseMirror h3 {
|
|
61
|
-
margin: 1.5em 0 .5em;
|
|
61
|
+
margin: 1.5em 0 0.5em;
|
|
62
62
|
font-size: 1.375em;
|
|
63
63
|
}
|
|
64
64
|
div.ProseMirror h4 {
|
|
@@ -66,26 +66,26 @@ div.ProseMirror h4 {
|
|
|
66
66
|
font-size: 1.125em;
|
|
67
67
|
}
|
|
68
68
|
div.ProseMirror h5 {
|
|
69
|
-
margin: .5em 0;
|
|
69
|
+
margin: 0.5em 0;
|
|
70
70
|
}
|
|
71
71
|
div.ProseMirror h6 {
|
|
72
|
-
opacity: .8;
|
|
72
|
+
opacity: 0.8;
|
|
73
73
|
}
|
|
74
74
|
div.ProseMirror img,
|
|
75
75
|
div.ProseMirror video {
|
|
76
|
-
margin: .4em 0;
|
|
76
|
+
margin: 0.4em 0;
|
|
77
77
|
width: min-content;
|
|
78
78
|
max-width: 100%;
|
|
79
79
|
}
|
|
80
80
|
div.ProseMirror code {
|
|
81
|
-
font-size: .875em;
|
|
81
|
+
font-size: 0.875em;
|
|
82
82
|
font-weight: 600;
|
|
83
83
|
}
|
|
84
84
|
div.ProseMirror pre {
|
|
85
|
-
margin: .5rem 0;
|
|
86
|
-
padding: 2rem;
|
|
85
|
+
margin: 0.5rem 0;
|
|
86
|
+
padding: 2rem 2rem;
|
|
87
87
|
overflow-x: auto;
|
|
88
|
-
border-radius: .375rem;
|
|
88
|
+
border-radius: 0.375rem;
|
|
89
89
|
}
|
|
90
90
|
div.ProseMirror pre,
|
|
91
91
|
div.ProseMirror code {
|
|
@@ -105,33 +105,33 @@ div.ProseMirror hr {
|
|
|
105
105
|
div.ProseMirror .prosemirror-flat-list {
|
|
106
106
|
line-height: 1.5;
|
|
107
107
|
}
|
|
108
|
-
div.ProseMirror .prosemirror-flat-list
|
|
108
|
+
div.ProseMirror .prosemirror-flat-list::before,
|
|
109
109
|
div.ProseMirror .prosemirror-flat-list > .list-marker {
|
|
110
|
-
top: .5rem;
|
|
110
|
+
top: 0.5rem;
|
|
111
111
|
}
|
|
112
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)
|
|
112
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)::before,
|
|
113
113
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1) > .list-marker {
|
|
114
114
|
top: 1em;
|
|
115
115
|
}
|
|
116
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)
|
|
116
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)::before,
|
|
117
117
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2) > .list-marker {
|
|
118
|
-
top: .6em;
|
|
118
|
+
top: 0.6em;
|
|
119
119
|
}
|
|
120
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)
|
|
120
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)::before,
|
|
121
121
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3) > .list-marker {
|
|
122
|
-
top: .25em;
|
|
122
|
+
top: 0.25em;
|
|
123
123
|
}
|
|
124
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)
|
|
124
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)::before,
|
|
125
125
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4) > .list-marker {
|
|
126
126
|
top: 0;
|
|
127
127
|
}
|
|
128
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)
|
|
128
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)::before,
|
|
129
129
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5) > .list-marker {
|
|
130
|
-
top:
|
|
130
|
+
top: -0.1em;
|
|
131
131
|
}
|
|
132
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)
|
|
132
|
+
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)::before,
|
|
133
133
|
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6) > .list-marker {
|
|
134
|
-
top:
|
|
134
|
+
top: -0.1em;
|
|
135
135
|
}
|
|
136
136
|
div.ProseMirror .ProseMirror-selectednode {
|
|
137
137
|
z-index: calc(infinity);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/basic",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.16",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@prosekit/
|
|
45
|
-
"@prosekit/extensions": "^0.7.
|
|
46
|
-
"@prosekit/
|
|
44
|
+
"@prosekit/core": "^0.7.4",
|
|
45
|
+
"@prosekit/extensions": "^0.7.4",
|
|
46
|
+
"@prosekit/pm": "^0.1.6"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"postcss": "^8.4.39",
|
|
50
50
|
"postcss-nesting": "^12.1.5",
|
|
51
|
-
"tsup": "^8.1.
|
|
51
|
+
"tsup": "^8.1.2",
|
|
52
52
|
"typescript": "^5.5.3",
|
|
53
|
-
"vitest": "^2.0.
|
|
53
|
+
"vitest": "^2.0.3",
|
|
54
54
|
"@prosekit/dev": "0.0.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|