prosekit 0.7.6 → 0.7.7
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 +9 -0
- package/dist/basic/style.css +7 -14
- package/dist/basic/typography.css +23 -23
- package/dist/extensions/list/style.css +4 -8
- package/dist/extensions/placeholder/style.css +1 -1
- package/dist/extensions/search/style.css +15 -0
- package/dist/pm/view/style/prosemirror.css +2 -5
- package/dist/prosekit-extensions-search.d.ts +3 -0
- package/dist/prosekit-extensions-search.js +2 -0
- package/package.json +24 -13
|
@@ -186,6 +186,8 @@ import { definePlugin } from '@prosekit/core';
|
|
|
186
186
|
import { defineReactNodeView } from '@prosekit/react';
|
|
187
187
|
import { defineReadonly } from '@prosekit/extensions/readonly';
|
|
188
188
|
import { defineScrollToSelectionHandler } from '@prosekit/core';
|
|
189
|
+
import { defineSearchCommands } from '@prosekit/extensions/search';
|
|
190
|
+
import { defineSearchQuery } from '@prosekit/extensions/search';
|
|
189
191
|
import { defineStrike } from '@prosekit/extensions/strike';
|
|
190
192
|
import { defineStrikeCommands } from '@prosekit/extensions/strike';
|
|
191
193
|
import { defineStrikeInputRule } from '@prosekit/extensions/strike';
|
|
@@ -437,6 +439,7 @@ import { ResolvedPos } from '@prosekit/pm/model';
|
|
|
437
439
|
import { Schema } from '@prosekit/pm/model';
|
|
438
440
|
import { SchemaSpec } from '@prosekit/pm/model';
|
|
439
441
|
import { ScrollToSelectionHandler } from '@prosekit/core';
|
|
442
|
+
import { SearchQueryOptions } from '@prosekit/extensions/search';
|
|
440
443
|
import { selectAll } from '@prosekit/pm/commands';
|
|
441
444
|
import { Selection as Selection_2 } from '@prosekit/pm/state';
|
|
442
445
|
import { SelectionBookmark } from '@prosekit/pm/state';
|
|
@@ -937,6 +940,10 @@ export { defineReadonly }
|
|
|
937
940
|
|
|
938
941
|
export { defineScrollToSelectionHandler }
|
|
939
942
|
|
|
943
|
+
export { defineSearchCommands }
|
|
944
|
+
|
|
945
|
+
export { defineSearchQuery }
|
|
946
|
+
|
|
940
947
|
export { defineStrike }
|
|
941
948
|
|
|
942
949
|
export { defineStrikeCommands }
|
|
@@ -1437,6 +1444,8 @@ export { SchemaSpec }
|
|
|
1437
1444
|
|
|
1438
1445
|
export { ScrollToSelectionHandler }
|
|
1439
1446
|
|
|
1447
|
+
export { SearchQueryOptions }
|
|
1448
|
+
|
|
1440
1449
|
export { selectAll }
|
|
1441
1450
|
|
|
1442
1451
|
export { Selection_2 as Selection }
|
package/dist/basic/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;
|
|
@@ -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);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
.prosemirror-flat-list {
|
|
3
3
|
padding: 0;
|
|
4
4
|
margin-top: 0;
|
|
5
|
-
margin-bottom: 0;
|
|
6
5
|
margin-left: 32px;
|
|
7
6
|
margin-bottom: 0;
|
|
8
7
|
position: relative;
|
|
@@ -15,10 +14,7 @@
|
|
|
15
14
|
.prosemirror-flat-list.ProseMirror-selectednode:after {
|
|
16
15
|
content: "";
|
|
17
16
|
position: absolute;
|
|
18
|
-
|
|
19
|
-
right: -2px;
|
|
20
|
-
top: -2px;
|
|
21
|
-
bottom: -2px;
|
|
17
|
+
inset: -2px -2px -2px -32px;
|
|
22
18
|
border: 2px solid #8cf;
|
|
23
19
|
pointer-events: none;
|
|
24
20
|
}
|
|
@@ -31,7 +27,7 @@
|
|
|
31
27
|
.prosemirror-flat-list[data-list-kind=ordered] > * {
|
|
32
28
|
contain: style;
|
|
33
29
|
}
|
|
34
|
-
.prosemirror-flat-list[data-list-kind=ordered]
|
|
30
|
+
.prosemirror-flat-list[data-list-kind=ordered]:before {
|
|
35
31
|
position: absolute;
|
|
36
32
|
right: 100%;
|
|
37
33
|
font-variant-numeric: tabular-nums;
|
|
@@ -69,10 +65,10 @@
|
|
|
69
65
|
width: 1.5em;
|
|
70
66
|
width: 1lh;
|
|
71
67
|
}
|
|
72
|
-
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker
|
|
68
|
+
.prosemirror-flat-list[data-list-kind=toggle] > .list-marker:before {
|
|
73
69
|
content: "\23f7";
|
|
74
70
|
}
|
|
75
|
-
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker
|
|
71
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker:before {
|
|
76
72
|
content: "\23f5";
|
|
77
73
|
}
|
|
78
74
|
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* ../extensions/src/search/style.css */
|
|
2
|
+
.ProseMirror-search-match {
|
|
3
|
+
background-color: #ffff0054;
|
|
4
|
+
box-shadow: 0 0 0 2px #ffff0054;
|
|
5
|
+
border-radius: 2px;
|
|
6
|
+
}
|
|
7
|
+
.ProseMirror.ProseMirror-focused .ProseMirror-active-search-match::selection,
|
|
8
|
+
.ProseMirror:not(.ProseMirror-focused) .ProseMirror-active-search-match {
|
|
9
|
+
background-color: #ff6a0054;
|
|
10
|
+
box-shadow: 0 0 0 2px #ff6a0054;
|
|
11
|
+
border-radius: 2px;
|
|
12
|
+
scroll-margin: 8px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* src/extensions/search/style.css */
|
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prosekit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -147,6 +147,14 @@
|
|
|
147
147
|
"import": "./dist/prosekit-extensions-readonly.js",
|
|
148
148
|
"default": "./dist/prosekit-extensions-readonly.js"
|
|
149
149
|
},
|
|
150
|
+
"./extensions/search": {
|
|
151
|
+
"types": "./dist/prosekit-extensions-search.d.ts",
|
|
152
|
+
"import": "./dist/prosekit-extensions-search.js",
|
|
153
|
+
"default": "./dist/prosekit-extensions-search.js"
|
|
154
|
+
},
|
|
155
|
+
"./extensions/search/style.css": {
|
|
156
|
+
"default": "./dist/extensions/search/style.css"
|
|
157
|
+
},
|
|
150
158
|
"./extensions/strike": {
|
|
151
159
|
"types": "./dist/prosekit-extensions-strike.d.ts",
|
|
152
160
|
"import": "./dist/prosekit-extensions-strike.js",
|
|
@@ -476,17 +484,17 @@
|
|
|
476
484
|
"dist"
|
|
477
485
|
],
|
|
478
486
|
"dependencies": {
|
|
479
|
-
"@prosekit/
|
|
480
|
-
"@prosekit/
|
|
481
|
-
"@prosekit/extensions": "0.5.
|
|
482
|
-
"@prosekit/
|
|
483
|
-
"@prosekit/
|
|
484
|
-
"@prosekit/
|
|
485
|
-
"@prosekit/
|
|
486
|
-
"@prosekit/
|
|
487
|
-
"@prosekit/svelte": "0.3.
|
|
488
|
-
"@prosekit/
|
|
489
|
-
"@prosekit/
|
|
487
|
+
"@prosekit/core": "0.5.5",
|
|
488
|
+
"@prosekit/basic": "0.3.8",
|
|
489
|
+
"@prosekit/extensions": "0.5.3",
|
|
490
|
+
"@prosekit/pm": "0.1.5",
|
|
491
|
+
"@prosekit/preact": "0.3.6",
|
|
492
|
+
"@prosekit/lit": "0.3.3",
|
|
493
|
+
"@prosekit/solid": "0.3.5",
|
|
494
|
+
"@prosekit/react": "0.3.7",
|
|
495
|
+
"@prosekit/svelte": "0.3.5",
|
|
496
|
+
"@prosekit/web": "0.1.10",
|
|
497
|
+
"@prosekit/vue": "0.3.5"
|
|
490
498
|
},
|
|
491
499
|
"peerDependencies": {
|
|
492
500
|
"preact": ">= 10.11.0",
|
|
@@ -526,7 +534,7 @@
|
|
|
526
534
|
"react-dom": "^18.3.1",
|
|
527
535
|
"solid-js": "^1.8.17",
|
|
528
536
|
"svelte": "^4.2.17",
|
|
529
|
-
"tsup": "^8.0
|
|
537
|
+
"tsup": "^8.1.0",
|
|
530
538
|
"typescript": "^5.4.5",
|
|
531
539
|
"vue": "^3.4.27",
|
|
532
540
|
"@prosekit/dev": "0.0.0"
|
|
@@ -604,6 +612,9 @@
|
|
|
604
612
|
"extensions/readonly": [
|
|
605
613
|
"./dist/prosekit-extensions-readonly.d.ts"
|
|
606
614
|
],
|
|
615
|
+
"extensions/search": [
|
|
616
|
+
"./dist/prosekit-extensions-search.d.ts"
|
|
617
|
+
],
|
|
607
618
|
"extensions/strike": [
|
|
608
619
|
"./dist/prosekit-extensions-strike.d.ts"
|
|
609
620
|
],
|