@prosekit/basic 0.3.6 → 0.3.8
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 +4 -90
- package/dist/style.css +9 -16
- package/dist/typography.css +23 -23
- package/package.json +8 -8
@@ -1,18 +1,5 @@
|
|
1
|
-
import { Attrs } from 'prosemirror-model';
|
2
|
-
import { DedentListOptions } from 'prosemirror-flat-list';
|
3
1
|
import { Extension } from '@prosekit/core';
|
4
|
-
import { HeadingAttrs } from '@prosekit/extensions/heading';
|
5
|
-
import { ImageAttrs } from '@prosekit/extensions/image';
|
6
|
-
import { IndentListOptions } from 'prosemirror-flat-list';
|
7
|
-
import { LinkAttrs } from '@prosekit/extensions/link';
|
8
|
-
import { ListAttributes } from 'prosemirror-flat-list';
|
9
|
-
import { MarkType } from 'prosemirror-model';
|
10
|
-
import { Node as Node_2 } from 'prosemirror-model';
|
11
|
-
import { NodeRange } from 'prosemirror-model';
|
12
|
-
import { NodeType } from 'prosemirror-model';
|
13
2
|
import { Options } from 'tsup';
|
14
|
-
import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
|
15
|
-
import { UnwrapListOptions } from 'prosemirror-flat-list';
|
16
3
|
|
17
4
|
/**
|
18
5
|
* @public
|
@@ -39,83 +26,10 @@ export declare const default_alias_2: {
|
|
39
26
|
* @public
|
40
27
|
*/
|
41
28
|
export declare function defineBasicExtension(): Extension< {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
insertHeading: [attrs?: HeadingAttrs | undefined];
|
47
|
-
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
48
|
-
undo: [];
|
49
|
-
redo: [];
|
50
|
-
dedentList: [options?: DedentListOptions | undefined];
|
51
|
-
indentList: [options?: IndentListOptions | undefined];
|
52
|
-
moveList: [direction: "up" | "down"];
|
53
|
-
splitList: [];
|
54
|
-
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
55
|
-
toggleList: [attrs: ListAttributes];
|
56
|
-
unwrapList: [options?: UnwrapListOptions | undefined];
|
57
|
-
wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)];
|
58
|
-
insertList: [attrs?: ListAttributes | undefined];
|
59
|
-
toggleItalic: [];
|
60
|
-
toggleBold: [];
|
61
|
-
toggleUnderline: [];
|
62
|
-
toggleStrike: [];
|
63
|
-
toggleCode: [];
|
64
|
-
addLink: [attrs: LinkAttrs];
|
65
|
-
removeLink: [];
|
66
|
-
toggleLink: [attrs: LinkAttrs];
|
67
|
-
expandLink: [];
|
68
|
-
insertImage: [attrs?: ImageAttrs | undefined];
|
69
|
-
insertTable: [{
|
70
|
-
row: number;
|
71
|
-
col: number;
|
72
|
-
header: boolean;
|
73
|
-
}];
|
74
|
-
exitTable: [];
|
75
|
-
insertText: [{
|
76
|
-
text: string;
|
77
|
-
from?: number | undefined;
|
78
|
-
to?: number | undefined;
|
79
|
-
}];
|
80
|
-
insertNode: [options: {
|
81
|
-
node: Node_2;
|
82
|
-
pos?: number | undefined;
|
83
|
-
type?: undefined;
|
84
|
-
attrs?: undefined;
|
85
|
-
} | {
|
86
|
-
node?: undefined;
|
87
|
-
pos?: number | undefined;
|
88
|
-
type: string;
|
89
|
-
attrs?: Attrs | undefined;
|
90
|
-
}];
|
91
|
-
wrap: [{
|
92
|
-
nodeType: NodeType;
|
93
|
-
attrs?: Attrs | null | undefined;
|
94
|
-
}];
|
95
|
-
setBlockType: [options: {
|
96
|
-
type: string | NodeType;
|
97
|
-
attrs?: Attrs | null | undefined;
|
98
|
-
from?: number | undefined;
|
99
|
-
to?: number | undefined;
|
100
|
-
}];
|
101
|
-
setNodeAttrs: [options: {
|
102
|
-
type: string | NodeType | string[] | NodeType[];
|
103
|
-
attrs: Attrs;
|
104
|
-
pos?: number | undefined;
|
105
|
-
}];
|
106
|
-
selectAll: [];
|
107
|
-
addMark: [options: {
|
108
|
-
type: string | MarkType;
|
109
|
-
attrs?: Attrs | null | undefined;
|
110
|
-
from?: number | undefined;
|
111
|
-
to?: number | undefined;
|
112
|
-
}];
|
113
|
-
removeMark: [options: {
|
114
|
-
type: string | MarkType;
|
115
|
-
attrs?: Attrs | null | undefined;
|
116
|
-
from?: number | undefined;
|
117
|
-
to?: number | undefined;
|
118
|
-
}];
|
29
|
+
Nodes: any;
|
30
|
+
Marks: any;
|
31
|
+
Commands: {
|
32
|
+
[x: string]: any;
|
119
33
|
};
|
120
34
|
}>;
|
121
35
|
|
package/dist/style.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* ../../node_modules/.pnpm/prosemirror-view@1.33.
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-view@1.33.7/node_modules/prosemirror-view/style/prosemirror.css */
|
2
2
|
.ProseMirror {
|
3
3
|
position: relative;
|
4
4
|
}
|
@@ -37,10 +37,7 @@ li.ProseMirror-selectednode {
|
|
37
37
|
li.ProseMirror-selectednode:after {
|
38
38
|
content: "";
|
39
39
|
position: absolute;
|
40
|
-
|
41
|
-
right: -2px;
|
42
|
-
top: -2px;
|
43
|
-
bottom: -2px;
|
40
|
+
inset: -2px -2px -2px -32px;
|
44
41
|
border: 2px solid #8cf;
|
45
42
|
pointer-events: none;
|
46
43
|
}
|
@@ -56,7 +53,6 @@ img.ProseMirror-separator {
|
|
56
53
|
.prosemirror-flat-list {
|
57
54
|
padding: 0;
|
58
55
|
margin-top: 0;
|
59
|
-
margin-bottom: 0;
|
60
56
|
margin-left: 32px;
|
61
57
|
margin-bottom: 0;
|
62
58
|
position: relative;
|
@@ -69,10 +65,7 @@ img.ProseMirror-separator {
|
|
69
65
|
.prosemirror-flat-list.ProseMirror-selectednode:after {
|
70
66
|
content: "";
|
71
67
|
position: absolute;
|
72
|
-
|
73
|
-
right: -2px;
|
74
|
-
top: -2px;
|
75
|
-
bottom: -2px;
|
68
|
+
inset: -2px -2px -2px -32px;
|
76
69
|
border: 2px solid #8cf;
|
77
70
|
pointer-events: none;
|
78
71
|
}
|
@@ -85,7 +78,7 @@ img.ProseMirror-separator {
|
|
85
78
|
.prosemirror-flat-list[data-list-kind=ordered] > * {
|
86
79
|
contain: style;
|
87
80
|
}
|
88
|
-
.prosemirror-flat-list[data-list-kind=ordered]
|
81
|
+
.prosemirror-flat-list[data-list-kind=ordered]:before {
|
89
82
|
position: absolute;
|
90
83
|
right: 100%;
|
91
84
|
font-variant-numeric: tabular-nums;
|
@@ -123,10 +116,10 @@ img.ProseMirror-separator {
|
|
123
116
|
width: 1.5em;
|
124
117
|
width: 1lh;
|
125
118
|
}
|
126
|
-
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker
|
119
|
+
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker:before {
|
127
120
|
content: "\23f7";
|
128
121
|
}
|
129
|
-
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker
|
122
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker:before {
|
130
123
|
content: "\23f5";
|
131
124
|
}
|
132
125
|
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
|
@@ -178,7 +171,7 @@ img.ProseMirror-separator {
|
|
178
171
|
}
|
179
172
|
|
180
173
|
/* ../extensions/src/placeholder/style.css */
|
181
|
-
.prosekit-placeholder
|
174
|
+
.prosekit-placeholder:before {
|
182
175
|
position: absolute;
|
183
176
|
opacity: 30%;
|
184
177
|
pointer-events: none;
|
@@ -188,8 +181,8 @@ img.ProseMirror-separator {
|
|
188
181
|
|
189
182
|
/* ../extensions/src/virtual-selection/style.css */
|
190
183
|
.prosekit-virtual-selection {
|
191
|
-
background-color:
|
192
|
-
box-shadow: 0 0 0
|
184
|
+
background-color: #8888884d;
|
185
|
+
box-shadow: 0 0 0 2px #8888884d;
|
193
186
|
border-radius: 2px;
|
194
187
|
}
|
195
188
|
|
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:
|
45
|
+
padding: .5rem 0;
|
46
46
|
line-height: 1.5;
|
47
47
|
}
|
48
48
|
div.ProseMirror blockquote {
|
49
49
|
padding-left: 1em;
|
50
|
-
border-left:
|
50
|
+
border-left: .25em solid hsla(0, 0%, 60%, .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
|
57
|
+
margin: 1.75em 0 .5em;
|
58
58
|
font-size: 1.75em;
|
59
59
|
}
|
60
60
|
div.ProseMirror h3 {
|
61
|
-
margin: 1.5em 0
|
61
|
+
margin: 1.5em 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:
|
69
|
+
margin: .5em 0;
|
70
70
|
}
|
71
71
|
div.ProseMirror h6 {
|
72
|
-
opacity:
|
72
|
+
opacity: .8;
|
73
73
|
}
|
74
74
|
div.ProseMirror img,
|
75
75
|
div.ProseMirror video {
|
76
|
-
margin:
|
76
|
+
margin: .4em 0;
|
77
77
|
width: min-content;
|
78
78
|
max-width: 100%;
|
79
79
|
}
|
80
80
|
div.ProseMirror code {
|
81
|
-
font-size:
|
81
|
+
font-size: .875em;
|
82
82
|
font-weight: 600;
|
83
83
|
}
|
84
84
|
div.ProseMirror pre {
|
85
|
-
margin:
|
86
|
-
padding: 2rem
|
85
|
+
margin: .5rem 0;
|
86
|
+
padding: 2rem;
|
87
87
|
overflow-x: auto;
|
88
|
-
border-radius:
|
88
|
+
border-radius: .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:
|
110
|
+
top: .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:
|
118
|
+
top: .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:
|
122
|
+
top: .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: -.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: -.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.8",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -41,17 +41,17 @@
|
|
41
41
|
"dist"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@prosekit/core": "^0.5.
|
45
|
-
"@prosekit/
|
46
|
-
"@prosekit/
|
44
|
+
"@prosekit/core": "^0.5.5",
|
45
|
+
"@prosekit/pm": "^0.1.5",
|
46
|
+
"@prosekit/extensions": "^0.5.3"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
|
-
"@prosekit/dev": "*",
|
50
49
|
"postcss": "^8.4.38",
|
51
|
-
"postcss-nesting": "^12.1.
|
52
|
-
"tsup": "^8.0
|
50
|
+
"postcss-nesting": "^12.1.5",
|
51
|
+
"tsup": "^8.1.0",
|
53
52
|
"typescript": "^5.4.5",
|
54
|
-
"vitest": "^1.6.0"
|
53
|
+
"vitest": "^1.6.0",
|
54
|
+
"@prosekit/dev": "0.0.0"
|
55
55
|
},
|
56
56
|
"scripts": {
|
57
57
|
"build:tsup": "tsup",
|