prosekit 0.13.1 → 0.13.2

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.
Files changed (39) hide show
  1. package/dist/basic/style.css +236 -0
  2. package/dist/basic/typography.css +68 -67
  3. package/dist/extensions/commit/style.css +9 -0
  4. package/dist/extensions/gap-cursor/style.css +24 -0
  5. package/dist/extensions/list/style.css +90 -0
  6. package/dist/extensions/loro/style.css +18 -21
  7. package/dist/extensions/placeholder/style.css +9 -0
  8. package/dist/extensions/search/style.css +7 -6
  9. package/dist/extensions/table/style.css +42 -0
  10. package/dist/extensions/virtual-selection/style.css +7 -0
  11. package/dist/extensions/yjs/style.css +19 -16
  12. package/dist/pm/view/style/prosemirror.css +54 -0
  13. package/package.json +9 -6
  14. package/dist/basic/style.js +0 -7
  15. package/dist/basic/typography.js +0 -0
  16. package/dist/extensions/commit/style.js +0 -1
  17. package/dist/extensions/gap-cursor/style.js +0 -1
  18. package/dist/extensions/list/style.js +0 -1
  19. package/dist/extensions/loro/style.js +0 -0
  20. package/dist/extensions/placeholder/style.js +0 -1
  21. package/dist/extensions/search/style.js +0 -0
  22. package/dist/extensions/table/style.js +0 -1
  23. package/dist/extensions/virtual-selection/style.js +0 -1
  24. package/dist/extensions/yjs/style.js +0 -0
  25. package/dist/pm/view/style/prosemirror.js +0 -1
  26. package/dist/prosemirror-BTVeEuU-.js +0 -0
  27. package/dist/prosemirror-LOeply1a.css +0 -56
  28. package/dist/style-9ovoKN43.js +0 -0
  29. package/dist/style-BJGCqptS.css +0 -26
  30. package/dist/style-Ba8jQ-eV.css +0 -9
  31. package/dist/style-CJ2Z9pBi.js +0 -0
  32. package/dist/style-Cems7OCU.js +0 -0
  33. package/dist/style-CuUAZmf5.css +0 -89
  34. package/dist/style-DIAXb3P_.css +0 -6
  35. package/dist/style-DTIGmBAY.css +0 -42
  36. package/dist/style-DWHVXHYy.js +0 -0
  37. package/dist/style-DbDXkp9x.js +0 -0
  38. package/dist/style-DpVbw0Sh.css +0 -8
  39. package/dist/style-IvXUdQbi.js +0 -0
@@ -1,2 +1,238 @@
1
+ /* ../../node_modules/.pnpm/prosemirror-view@1.39.2/node_modules/prosemirror-view/style/prosemirror.css */
2
+ .ProseMirror {
3
+ position: relative;
4
+ }
5
+ .ProseMirror {
6
+ word-wrap: break-word;
7
+ white-space: pre-wrap;
8
+ white-space: break-spaces;
9
+ -webkit-font-variant-ligatures: none;
10
+ font-variant-ligatures: none;
11
+ font-feature-settings: "liga" 0;
12
+ }
13
+ .ProseMirror pre {
14
+ white-space: pre-wrap;
15
+ }
16
+ .ProseMirror li {
17
+ position: relative;
18
+ }
19
+ .ProseMirror-hideselection *::selection {
20
+ background: transparent;
21
+ }
22
+ .ProseMirror-hideselection *::-moz-selection {
23
+ background: transparent;
24
+ }
25
+ .ProseMirror-hideselection {
26
+ caret-color: transparent;
27
+ }
28
+ .ProseMirror [draggable][contenteditable=false] {
29
+ user-select: text;
30
+ }
31
+ .ProseMirror-selectednode {
32
+ outline: 2px solid #8cf;
33
+ }
34
+ li.ProseMirror-selectednode {
35
+ outline: none;
36
+ }
37
+ li.ProseMirror-selectednode:after {
38
+ content: "";
39
+ position: absolute;
40
+ left: -32px;
41
+ right: -2px;
42
+ top: -2px;
43
+ bottom: -2px;
44
+ border: 2px solid #8cf;
45
+ pointer-events: none;
46
+ }
47
+ img.ProseMirror-separator {
48
+ display: inline !important;
49
+ border: none !important;
50
+ margin: 0 !important;
51
+ }
1
52
 
53
+ /* ../pm/src/view/style/prosemirror.css */
2
54
 
55
+ /* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.5/node_modules/prosemirror-flat-list/dist/style.css */
56
+ .prosemirror-flat-list {
57
+ padding: 0;
58
+ margin-top: 0;
59
+ margin-bottom: 0;
60
+ margin-left: 32px;
61
+ margin-bottom: 0;
62
+ position: relative;
63
+ display: list-item;
64
+ list-style: none;
65
+ }
66
+ .prosemirror-flat-list.ProseMirror-selectednode {
67
+ outline: none;
68
+ }
69
+ .prosemirror-flat-list.ProseMirror-selectednode:after {
70
+ content: "";
71
+ position: absolute;
72
+ left: -32px;
73
+ right: -2px;
74
+ top: -2px;
75
+ bottom: -2px;
76
+ border: 2px solid #8cf;
77
+ pointer-events: none;
78
+ }
79
+ .prosemirror-flat-list[data-list-kind=bullet] {
80
+ list-style: disc;
81
+ }
82
+ .prosemirror-flat-list[data-list-kind=ordered] > * {
83
+ contain: style;
84
+ }
85
+ .prosemirror-flat-list[data-list-kind=ordered]::before {
86
+ position: absolute;
87
+ right: 100%;
88
+ font-variant-numeric: tabular-nums;
89
+ content: counter(prosemirror-flat-list-counter, decimal) ". ";
90
+ }
91
+ .prosemirror-flat-list[data-list-kind=ordered] {
92
+ counter-increment: prosemirror-flat-list-counter;
93
+ }
94
+ .prosemirror-flat-list[data-list-kind=ordered]:first-child,
95
+ :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered] {
96
+ counter-reset: prosemirror-flat-list-counter;
97
+ }
98
+ @supports (counter-set: prosemirror-flat-list-counter 1) {
99
+ [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
100
+ counter-set: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
101
+ }
102
+ }
103
+ @supports not (counter-set: prosemirror-flat-list-counter 1) {
104
+ [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
105
+ counter-increment: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
106
+ }
107
+ }
108
+ .prosemirror-flat-list[data-list-kind=task] > .list-marker {
109
+ position: absolute;
110
+ right: 100%;
111
+ text-align: center;
112
+ width: 1.5em;
113
+ width: 1lh;
114
+ }
115
+ :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker),
116
+ :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker) * {
117
+ cursor: pointer;
118
+ }
119
+ .prosemirror-flat-list[data-list-kind=toggle] > .list-marker {
120
+ position: absolute;
121
+ right: 100%;
122
+ text-align: center;
123
+ width: 1.5em;
124
+ width: 1lh;
125
+ }
126
+ .prosemirror-flat-list[data-list-kind=toggle] > .list-marker::before {
127
+ content: "\23f7";
128
+ }
129
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker::before {
130
+ content: "\23f5";
131
+ }
132
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
133
+ cursor: pointer;
134
+ }
135
+ .prosemirror-flat-list[data-list-kind=toggle]:not([data-list-collapsable]) > .list-marker {
136
+ opacity: 40%;
137
+ pointer-events: none;
138
+ }
139
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n+2) {
140
+ display: none;
141
+ }
142
+
143
+ /* ../extensions/src/list/style.css */
144
+
145
+ /* ../extensions/src/table/style.css */
146
+ .ProseMirror .tableWrapper {
147
+ overflow-x: auto;
148
+ }
149
+ .ProseMirror table {
150
+ width: 100%;
151
+ overflow: hidden;
152
+ border-collapse: collapse;
153
+ table-layout: fixed;
154
+ }
155
+ .ProseMirror td,
156
+ .ProseMirror th {
157
+ box-sizing: border-box;
158
+ position: relative;
159
+ padding-right: 0.75rem;
160
+ padding-left: 0.75rem;
161
+ border-width: 1px;
162
+ vertical-align: top;
163
+ }
164
+ .ProseMirror .column-resize-handle {
165
+ z-index: 20;
166
+ position: absolute;
167
+ top: 0;
168
+ right: -2px;
169
+ bottom: 0;
170
+ width: 4px;
171
+ background-color: HighlightText;
172
+ pointer-events: none;
173
+ }
174
+ .ProseMirror.resize-cursor {
175
+ cursor: ew-resize;
176
+ cursor: col-resize;
177
+ }
178
+ .ProseMirror .selectedCell {
179
+ --color:
180
+ 210,
181
+ 100%,
182
+ 56%;
183
+ border: 1px double hsl(var(--color));
184
+ background-color: hsla(var(--color), 20%);
185
+ }
186
+
187
+ /* ../extensions/src/placeholder/style.css */
188
+ .prosekit-placeholder::before {
189
+ position: absolute;
190
+ height: 0;
191
+ content: attr(data-placeholder);
192
+ opacity: 30%;
193
+ pointer-events: none;
194
+ }
195
+
196
+ /* ../extensions/src/virtual-selection/style.css */
197
+ .prosekit-virtual-selection {
198
+ border-radius: 2px;
199
+ background-color: #8888884d;
200
+ box-shadow: 0 0 0 2px #8888884d;
201
+ }
202
+
203
+ /* ../extensions/src/commit/style.css */
204
+ .prosekit-commit-deletion {
205
+ background-color: #e5534b80;
206
+ text-decoration: line-through;
207
+ }
208
+ .prosekit-commit-addition {
209
+ background-color: #53e54b80;
210
+ }
211
+
212
+ /* ../extensions/src/gap-cursor/style.css */
213
+ .ProseMirror-gapcursor {
214
+ display: none;
215
+ position: relative;
216
+ pointer-events: none;
217
+ }
218
+ .ProseMirror-gapcursor:after {
219
+ display: block;
220
+ position: absolute;
221
+ top: -2px;
222
+ width: 20px;
223
+ border-top: 1px solid currentColor;
224
+ content: "";
225
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
226
+ }
227
+ @keyframes ProseMirror-cursor-blink {
228
+ to {
229
+ visibility: hidden;
230
+ }
231
+ }
232
+ .ProseMirror-focused .ProseMirror-gapcursor {
233
+ display: block;
234
+ }
235
+
236
+ /* ../basic/src/style.css */
237
+
238
+ /* src/basic/style.css */
@@ -1,91 +1,100 @@
1
+ /* ../basic/src/typography.css */
1
2
  div.ProseMirror {
3
+ display: flex;
2
4
  flex-direction: column;
5
+ }
6
+ div.ProseMirror {
3
7
  line-height: 1.5;
4
- display: flex;
5
8
  }
6
-
7
- div.ProseMirror p:first-child, div.ProseMirror h1:first-child, div.ProseMirror h2:first-child, div.ProseMirror h3:first-child, div.ProseMirror h4:first-child, div.ProseMirror h5:first-child, div.ProseMirror h6:first-child {
9
+ div.ProseMirror p:first-child,
10
+ div.ProseMirror h1:first-child,
11
+ div.ProseMirror h2:first-child,
12
+ div.ProseMirror h3:first-child,
13
+ div.ProseMirror h4:first-child,
14
+ div.ProseMirror h5:first-child,
15
+ div.ProseMirror h6:first-child {
8
16
  margin-top: 0;
9
17
  }
10
-
11
- div.ProseMirror p:last-child, div.ProseMirror h1:last-child, div.ProseMirror h2:last-child, div.ProseMirror h3:last-child, div.ProseMirror h4:last-child, div.ProseMirror h5:last-child, div.ProseMirror h6:last-child {
18
+ div.ProseMirror p:last-child,
19
+ div.ProseMirror h1:last-child,
20
+ div.ProseMirror h2:last-child,
21
+ div.ProseMirror h3:last-child,
22
+ div.ProseMirror h4:last-child,
23
+ div.ProseMirror h5:last-child,
24
+ div.ProseMirror h6:last-child {
12
25
  margin-bottom: 0;
13
26
  }
14
-
15
- div.ProseMirror h1, div.ProseMirror h2, div.ProseMirror h3, div.ProseMirror h4, div.ProseMirror h5, div.ProseMirror h6 {
16
- border-style: none;
27
+ div.ProseMirror h1,
28
+ div.ProseMirror h2,
29
+ div.ProseMirror h3,
30
+ div.ProseMirror h4,
31
+ div.ProseMirror h5,
32
+ div.ProseMirror h6 {
17
33
  padding-top: 0;
18
34
  padding-bottom: 0;
35
+ border-style: none;
19
36
  font-weight: 600;
20
37
  line-height: 1.25;
21
38
  }
22
-
23
39
  div.ProseMirror a {
24
40
  font-weight: 500;
25
41
  text-decoration: underline;
26
42
  }
27
-
28
- div.ProseMirror p, div.ProseMirror ul, div.ProseMirror ol, div.ProseMirror pre {
43
+ div.ProseMirror p,
44
+ div.ProseMirror ul,
45
+ div.ProseMirror ol,
46
+ div.ProseMirror pre {
29
47
  margin: 0;
30
- padding: .5rem 0;
48
+ padding: 0.5rem 0;
31
49
  line-height: 1.5;
32
50
  }
33
-
34
51
  div.ProseMirror blockquote {
35
- border-left: .25em solid #9996;
36
52
  padding-left: 1em;
53
+ border-left: 0.25em solid hsl(0 0% 60% / 0.4);
37
54
  }
38
-
39
55
  div.ProseMirror h1 {
40
56
  margin: 1rem 0;
41
57
  font-size: 2.25em;
42
58
  }
43
-
44
59
  div.ProseMirror h2 {
45
- margin: 1.75em 0 .5em;
60
+ margin: 1.75em 0 0.5em;
46
61
  font-size: 1.75em;
47
62
  }
48
-
49
63
  div.ProseMirror h3 {
50
- margin: 1.5em 0 .5em;
64
+ margin: 1.5em 0 0.5em;
51
65
  font-size: 1.375em;
52
66
  }
53
-
54
67
  div.ProseMirror h4 {
55
68
  margin: 1em 0;
56
69
  font-size: 1.125em;
57
70
  }
58
-
59
71
  div.ProseMirror h5 {
60
- margin: .5em 0;
72
+ margin: 0.5em 0;
61
73
  }
62
-
63
74
  div.ProseMirror h6 {
64
- opacity: .8;
75
+ opacity: 0.8;
65
76
  }
66
-
67
- div.ProseMirror img, div.ProseMirror video {
77
+ div.ProseMirror img,
78
+ div.ProseMirror video {
68
79
  width: min-content;
69
80
  max-width: 100%;
70
81
  margin: 0;
71
82
  }
72
-
73
83
  div.ProseMirror code {
74
- font-size: .875em;
75
84
  font-weight: 600;
85
+ font-size: 0.875em;
76
86
  }
77
-
78
87
  div.ProseMirror pre {
88
+ margin: 0.5rem 0;
89
+ padding: 2rem 2rem;
90
+ overflow-x: auto;
91
+ border: 1px solid hsl(0 0% 50% / 0.2);
92
+ border-radius: 0.375rem;
79
93
  background-color: var(--prosemirror-highlight-bg, inherit);
80
94
  color: var(--prosemirror-highlight, inherit);
81
- border: 1px solid #80808033;
82
- border-radius: .375rem;
83
- margin: .5rem 0;
84
- padding: 2rem;
85
- overflow-x: auto;
86
95
  }
87
-
88
- div.ProseMirror pre, div.ProseMirror code {
96
+ div.ProseMirror pre,
97
+ div.ProseMirror code {
89
98
  white-space: pre;
90
99
  word-break: normal;
91
100
  word-spacing: normal;
@@ -93,69 +102,61 @@ div.ProseMirror pre, div.ProseMirror code {
93
102
  hyphens: none;
94
103
  tab-size: 4;
95
104
  }
96
-
97
105
  div.ProseMirror pre code {
98
106
  font-weight: inherit;
99
107
  }
100
-
101
108
  div.ProseMirror hr {
102
- border-width: 1px;
103
109
  margin: 2em 0;
110
+ border-width: 1px;
104
111
  }
105
-
106
112
  div.ProseMirror .prosekit-horizontal-rule {
107
113
  margin: 1em 0;
108
114
  padding: 1em 0;
109
115
  line-height: 1px;
110
116
  }
111
-
112
117
  div.ProseMirror .prosekit-horizontal-rule hr {
113
118
  margin: 0;
114
119
  }
115
-
116
120
  div.ProseMirror .tableWrapper {
117
- margin-top: .5em;
121
+ margin-top: 0.5em;
118
122
  margin-bottom: 1em;
119
123
  }
120
-
121
124
  div.ProseMirror .prosemirror-flat-list {
122
125
  line-height: 1.5;
123
126
  }
124
-
125
- div.ProseMirror .prosemirror-flat-list:before, div.ProseMirror .prosemirror-flat-list > .list-marker {
126
- top: .5rem;
127
+ div.ProseMirror .prosemirror-flat-list::before,
128
+ div.ProseMirror .prosemirror-flat-list > .list-marker {
129
+ top: 0.5rem;
127
130
  }
128
-
129
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h1):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h1) > .list-marker {
131
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)::before,
132
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1) > .list-marker {
130
133
  top: 1em;
131
134
  }
132
-
133
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h2):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h2) > .list-marker {
134
- top: .6em;
135
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)::before,
136
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2) > .list-marker {
137
+ top: 0.6em;
135
138
  }
136
-
137
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h3):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h3) > .list-marker {
138
- top: .25em;
139
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)::before,
140
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3) > .list-marker {
141
+ top: 0.25em;
139
142
  }
140
-
141
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h4):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h4) > .list-marker {
143
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)::before,
144
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4) > .list-marker {
142
145
  top: 0;
143
146
  }
144
-
145
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h5):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h5) > .list-marker {
146
- top: -.1em;
147
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)::before,
148
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5) > .list-marker {
149
+ top: -0.1em;
147
150
  }
148
-
149
- div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h6):before, div.ProseMirror .prosemirror-flat-list:has( > div.list-content > h6) > .list-marker {
150
- top: -.1em;
151
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)::before,
152
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6) > .list-marker {
153
+ top: -0.1em;
151
154
  }
152
-
153
155
  div.ProseMirror .ProseMirror-selectednode {
154
156
  z-index: calc(infinity);
155
157
  }
156
-
157
- div.ProseMirror div[data-node-view-root="true"] {
158
+ div.ProseMirror div[data-node-view-root=true] {
158
159
  display: contents;
159
160
  }
160
161
 
161
-
162
+ /* src/basic/typography.css */
@@ -1 +1,10 @@
1
+ /* ../extensions/src/commit/style.css */
2
+ .prosekit-commit-deletion {
3
+ background-color: #e5534b80;
4
+ text-decoration: line-through;
5
+ }
6
+ .prosekit-commit-addition {
7
+ background-color: #53e54b80;
8
+ }
1
9
 
10
+ /* src/extensions/commit/style.css */
@@ -1 +1,25 @@
1
+ /* ../extensions/src/gap-cursor/style.css */
2
+ .ProseMirror-gapcursor {
3
+ display: none;
4
+ position: relative;
5
+ pointer-events: none;
6
+ }
7
+ .ProseMirror-gapcursor:after {
8
+ display: block;
9
+ position: absolute;
10
+ top: -2px;
11
+ width: 20px;
12
+ border-top: 1px solid currentColor;
13
+ content: "";
14
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
15
+ }
16
+ @keyframes ProseMirror-cursor-blink {
17
+ to {
18
+ visibility: hidden;
19
+ }
20
+ }
21
+ .ProseMirror-focused .ProseMirror-gapcursor {
22
+ display: block;
23
+ }
1
24
 
25
+ /* src/extensions/gap-cursor/style.css */
@@ -1 +1,91 @@
1
+ /* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.5/node_modules/prosemirror-flat-list/dist/style.css */
2
+ .prosemirror-flat-list {
3
+ padding: 0;
4
+ margin-top: 0;
5
+ margin-bottom: 0;
6
+ margin-left: 32px;
7
+ margin-bottom: 0;
8
+ position: relative;
9
+ display: list-item;
10
+ list-style: none;
11
+ }
12
+ .prosemirror-flat-list.ProseMirror-selectednode {
13
+ outline: none;
14
+ }
15
+ .prosemirror-flat-list.ProseMirror-selectednode:after {
16
+ content: "";
17
+ position: absolute;
18
+ left: -32px;
19
+ right: -2px;
20
+ top: -2px;
21
+ bottom: -2px;
22
+ border: 2px solid #8cf;
23
+ pointer-events: none;
24
+ }
25
+ .prosemirror-flat-list[data-list-kind=bullet] {
26
+ list-style: disc;
27
+ }
28
+ .prosemirror-flat-list[data-list-kind=ordered] > * {
29
+ contain: style;
30
+ }
31
+ .prosemirror-flat-list[data-list-kind=ordered]::before {
32
+ position: absolute;
33
+ right: 100%;
34
+ font-variant-numeric: tabular-nums;
35
+ content: counter(prosemirror-flat-list-counter, decimal) ". ";
36
+ }
37
+ .prosemirror-flat-list[data-list-kind=ordered] {
38
+ counter-increment: prosemirror-flat-list-counter;
39
+ }
40
+ .prosemirror-flat-list[data-list-kind=ordered]:first-child,
41
+ :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered] {
42
+ counter-reset: prosemirror-flat-list-counter;
43
+ }
44
+ @supports (counter-set: prosemirror-flat-list-counter 1) {
45
+ [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
46
+ counter-set: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
47
+ }
48
+ }
49
+ @supports not (counter-set: prosemirror-flat-list-counter 1) {
50
+ [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
51
+ counter-increment: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
52
+ }
53
+ }
54
+ .prosemirror-flat-list[data-list-kind=task] > .list-marker {
55
+ position: absolute;
56
+ right: 100%;
57
+ text-align: center;
58
+ width: 1.5em;
59
+ width: 1lh;
60
+ }
61
+ :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker),
62
+ :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker) * {
63
+ cursor: pointer;
64
+ }
65
+ .prosemirror-flat-list[data-list-kind=toggle] > .list-marker {
66
+ position: absolute;
67
+ right: 100%;
68
+ text-align: center;
69
+ width: 1.5em;
70
+ width: 1lh;
71
+ }
72
+ .prosemirror-flat-list[data-list-kind=toggle] > .list-marker::before {
73
+ content: "\23f7";
74
+ }
75
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker::before {
76
+ content: "\23f5";
77
+ }
78
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
79
+ cursor: pointer;
80
+ }
81
+ .prosemirror-flat-list[data-list-kind=toggle]:not([data-list-collapsable]) > .list-marker {
82
+ opacity: 40%;
83
+ pointer-events: none;
84
+ }
85
+ .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n+2) {
86
+ display: none;
87
+ }
1
88
 
89
+ /* ../extensions/src/list/style.css */
90
+
91
+ /* src/extensions/list/style.css */
@@ -1,35 +1,32 @@
1
+ /* ../extensions/src/loro/style.css */
1
2
  .ProseMirror-loro-cursor:first-child {
2
3
  margin-top: 16px;
3
4
  }
4
-
5
5
  .ProseMirror-loro-cursor {
6
+ position: relative;
7
+ margin-right: -1px;
8
+ margin-left: -1px;
9
+ border-right: 1px solid black;
10
+ border-left: 1px solid black;
11
+ border-color: orange;
6
12
  word-break: normal;
7
13
  pointer-events: none;
8
- border-color: orange;
9
- border-left-style: solid;
10
- border-left-width: 1px;
11
- border-right-style: solid;
12
- border-right-width: 1px;
13
- margin-left: -1px;
14
- margin-right: -1px;
15
- position: relative;
16
14
  }
17
-
18
15
  .ProseMirror-loro-cursor > div {
19
- color: #fff;
20
- white-space: nowrap;
21
- user-select: none;
22
- background-color: #fa8100;
23
- padding-left: 2px;
16
+ position: absolute;
17
+ top: -1.05em;
18
+ left: -1px;
24
19
  padding-right: 2px;
25
- font-family: serif;
26
- font-size: 13px;
20
+ padding-left: 2px;
21
+ background-color: rgb(250, 129, 0);
22
+ color: white;
27
23
  font-style: normal;
28
24
  font-weight: normal;
25
+ font-size: 13px;
29
26
  line-height: normal;
30
- position: absolute;
31
- top: -1.05em;
32
- left: -1px;
27
+ font-family: serif;
28
+ white-space: nowrap;
29
+ user-select: none;
33
30
  }
34
31
 
35
-
32
+ /* src/extensions/loro/style.css */
@@ -1 +1,10 @@
1
+ /* ../extensions/src/placeholder/style.css */
2
+ .prosekit-placeholder::before {
3
+ position: absolute;
4
+ height: 0;
5
+ content: attr(data-placeholder);
6
+ opacity: 30%;
7
+ pointer-events: none;
8
+ }
1
9
 
10
+ /* src/extensions/placeholder/style.css */
@@ -1,14 +1,15 @@
1
+ /* ../extensions/src/search/style.css */
1
2
  .ProseMirror-search-match {
2
- background-color: #ffff0054;
3
3
  border-radius: 2px;
4
+ background-color: #ffff0054;
4
5
  box-shadow: 0 0 0 2px #ffff0054;
5
6
  }
6
-
7
- .ProseMirror.ProseMirror-focused .ProseMirror-active-search-match::selection, .ProseMirror:not(.ProseMirror-focused) .ProseMirror-active-search-match {
8
- background-color: #ff6a0054;
7
+ .ProseMirror.ProseMirror-focused .ProseMirror-active-search-match::selection,
8
+ .ProseMirror:not(.ProseMirror-focused) .ProseMirror-active-search-match {
9
9
  border-radius: 2px;
10
- scroll-margin: 8px;
10
+ background-color: #ff6a0054;
11
11
  box-shadow: 0 0 0 2px #ff6a0054;
12
+ scroll-margin: 8px;
12
13
  }
13
14
 
14
-
15
+ /* src/extensions/search/style.css */
@@ -1 +1,43 @@
1
+ /* ../extensions/src/table/style.css */
2
+ .ProseMirror .tableWrapper {
3
+ overflow-x: auto;
4
+ }
5
+ .ProseMirror table {
6
+ width: 100%;
7
+ overflow: hidden;
8
+ border-collapse: collapse;
9
+ table-layout: fixed;
10
+ }
11
+ .ProseMirror td,
12
+ .ProseMirror th {
13
+ box-sizing: border-box;
14
+ position: relative;
15
+ padding-right: 0.75rem;
16
+ padding-left: 0.75rem;
17
+ border-width: 1px;
18
+ vertical-align: top;
19
+ }
20
+ .ProseMirror .column-resize-handle {
21
+ z-index: 20;
22
+ position: absolute;
23
+ top: 0;
24
+ right: -2px;
25
+ bottom: 0;
26
+ width: 4px;
27
+ background-color: HighlightText;
28
+ pointer-events: none;
29
+ }
30
+ .ProseMirror.resize-cursor {
31
+ cursor: ew-resize;
32
+ cursor: col-resize;
33
+ }
34
+ .ProseMirror .selectedCell {
35
+ --color:
36
+ 210,
37
+ 100%,
38
+ 56%;
39
+ border: 1px double hsl(var(--color));
40
+ background-color: hsla(var(--color), 20%);
41
+ }
1
42
 
43
+ /* src/extensions/table/style.css */
@@ -1 +1,8 @@
1
+ /* ../extensions/src/virtual-selection/style.css */
2
+ .prosekit-virtual-selection {
3
+ border-radius: 2px;
4
+ background-color: #8888884d;
5
+ box-shadow: 0 0 0 2px #8888884d;
6
+ }
1
7
 
8
+ /* src/extensions/virtual-selection/style.css */
@@ -1,30 +1,33 @@
1
+ /* ../extensions/src/yjs/style.css */
1
2
  .ProseMirror .ProseMirror-yjs-cursor {
3
+ position: absolute;
4
+ height: 1em;
5
+ border-left: black;
6
+ border-left-width: 2px;
7
+ border-left-style: solid;
8
+ border-color: orange;
2
9
  word-break: normal;
3
10
  pointer-events: none;
4
- border-color: orange;
5
- border-left-style: solid;
6
- border-left-width: 2px;
7
- height: 1em;
8
- position: absolute;
9
11
  }
10
-
11
12
  .ProseMirror .ProseMirror-yjs-cursor > div {
12
- color: #fff;
13
- user-select: none;
14
- background-color: #fa8100;
15
- padding-left: 2px;
13
+ position: relative;
14
+ top: -1.05em;
16
15
  padding-right: 2px;
17
- font-family: serif;
18
- font-size: 13px;
16
+ padding-left: 2px;
17
+ background-color: rgb(250, 129, 0);
18
+ color: white;
19
19
  font-style: normal;
20
20
  font-weight: normal;
21
+ font-size: 13px;
21
22
  line-height: normal;
22
- position: relative;
23
- top: -1.05em;
23
+ font-family: serif;
24
+ -webkit-user-select: none;
25
+ -moz-user-select: none;
26
+ -ms-user-select: none;
27
+ user-select: none;
24
28
  }
25
-
26
29
  .ProseMirror > .ProseMirror-yjs-cursor:first-child {
27
30
  margin-top: 16px;
28
31
  }
29
32
 
30
-
33
+ /* src/extensions/yjs/style.css */
@@ -1 +1,55 @@
1
+ /* ../../node_modules/.pnpm/prosemirror-view@1.39.2/node_modules/prosemirror-view/style/prosemirror.css */
2
+ .ProseMirror {
3
+ position: relative;
4
+ }
5
+ .ProseMirror {
6
+ word-wrap: break-word;
7
+ white-space: pre-wrap;
8
+ white-space: break-spaces;
9
+ -webkit-font-variant-ligatures: none;
10
+ font-variant-ligatures: none;
11
+ font-feature-settings: "liga" 0;
12
+ }
13
+ .ProseMirror pre {
14
+ white-space: pre-wrap;
15
+ }
16
+ .ProseMirror li {
17
+ position: relative;
18
+ }
19
+ .ProseMirror-hideselection *::selection {
20
+ background: transparent;
21
+ }
22
+ .ProseMirror-hideselection *::-moz-selection {
23
+ background: transparent;
24
+ }
25
+ .ProseMirror-hideselection {
26
+ caret-color: transparent;
27
+ }
28
+ .ProseMirror [draggable][contenteditable=false] {
29
+ user-select: text;
30
+ }
31
+ .ProseMirror-selectednode {
32
+ outline: 2px solid #8cf;
33
+ }
34
+ li.ProseMirror-selectednode {
35
+ outline: none;
36
+ }
37
+ li.ProseMirror-selectednode:after {
38
+ content: "";
39
+ position: absolute;
40
+ left: -32px;
41
+ right: -2px;
42
+ top: -2px;
43
+ bottom: -2px;
44
+ border: 2px solid #8cf;
45
+ pointer-events: none;
46
+ }
47
+ img.ProseMirror-separator {
48
+ display: inline !important;
49
+ border: none !important;
50
+ margin: 0 !important;
51
+ }
1
52
 
53
+ /* ../pm/src/view/style/prosemirror.css */
54
+
55
+ /* src/pm/view/style/prosemirror.css */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prosekit",
3
3
  "type": "module",
4
- "version": "0.13.1",
4
+ "version": "0.13.2",
5
5
  "private": false,
6
6
  "description": "ProseKit: A toolkit for building rich text editors.",
7
7
  "author": {
@@ -484,14 +484,14 @@
484
484
  ],
485
485
  "dependencies": {
486
486
  "@prosekit/basic": "0.5.0",
487
+ "@prosekit/core": "0.8.1",
487
488
  "@prosekit/extensions": "0.9.0",
488
489
  "@prosekit/lit": "0.4.12",
489
- "@prosekit/core": "0.8.1",
490
- "@prosekit/preact": "0.4.13",
491
490
  "@prosekit/pm": "0.1.10",
492
491
  "@prosekit/react": "0.4.13",
493
- "@prosekit/svelte": "0.6.8",
492
+ "@prosekit/preact": "0.4.13",
494
493
  "@prosekit/solid": "0.4.13",
494
+ "@prosekit/svelte": "0.6.8",
495
495
  "@prosekit/vue": "0.4.13",
496
496
  "@prosekit/web": "0.5.8"
497
497
  },
@@ -544,12 +544,15 @@
544
544
  "@types/react-dom": "^19.1.3",
545
545
  "loro-crdt": "^1.5.4",
546
546
  "loro-prosemirror": "^0.2.1",
547
+ "postcss": "^8.5.3",
548
+ "postcss-import": "^16.1.0",
547
549
  "preact": "^10.26.6",
548
550
  "react": "^19.1.0",
549
551
  "react-dom": "^19.1.0",
550
552
  "solid-js": "^1.9.6",
551
553
  "svelte": "^5.28.2",
552
- "tsdown": "^0.11.1",
554
+ "tsdown": "^0.11.2",
555
+ "tsup": "^8.4.0",
553
556
  "typedoc": "^0.27.9",
554
557
  "typedoc-plugin-external-package-links": "^0.1.0",
555
558
  "typedoc-plugin-md": "^0.6.0",
@@ -686,7 +689,7 @@
686
689
  },
687
690
  "scripts": {
688
691
  "build:tsc": "tsc -b tsconfig.json",
689
- "build:tsdown": "tsdown",
692
+ "build:tsdown": "tsdown && tsup",
690
693
  "build:typedoc": "typedoc"
691
694
  },
692
695
  "types": "./dist/prosekit.d.ts",
@@ -1,7 +0,0 @@
1
- import "../prosemirror-BTVeEuU-.js";
2
- import "../style-CJ2Z9pBi.js";
3
- import "../style-9ovoKN43.js";
4
- import "../style-DbDXkp9x.js";
5
- import "../style-Cems7OCU.js";
6
- import "../style-DWHVXHYy.js";
7
- import "../style-IvXUdQbi.js";
File without changes
@@ -1 +0,0 @@
1
- import "../../style-DWHVXHYy.js";
@@ -1 +0,0 @@
1
- import "../../style-IvXUdQbi.js";
@@ -1 +0,0 @@
1
- import "../../style-CJ2Z9pBi.js";
File without changes
@@ -1 +0,0 @@
1
- import "../../style-DbDXkp9x.js";
File without changes
@@ -1 +0,0 @@
1
- import "../../style-9ovoKN43.js";
@@ -1 +0,0 @@
1
- import "../../style-Cems7OCU.js";
File without changes
@@ -1 +0,0 @@
1
- import "../../../prosemirror-BTVeEuU-.js";
File without changes
@@ -1,56 +0,0 @@
1
- .ProseMirror {
2
- position: relative;
3
- }
4
-
5
- .ProseMirror {
6
- word-wrap: break-word;
7
- white-space: pre-wrap;
8
- white-space: break-spaces;
9
- -webkit-font-variant-ligatures: none;
10
- font-variant-ligatures: none;
11
- font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
12
- }
13
-
14
- .ProseMirror pre {
15
- white-space: pre-wrap;
16
- }
17
-
18
- .ProseMirror li {
19
- position: relative;
20
- }
21
-
22
- .ProseMirror-hideselection *::selection { background: transparent; }
23
- .ProseMirror-hideselection *::-moz-selection { background: transparent; }
24
- .ProseMirror-hideselection { caret-color: transparent; }
25
-
26
- /* See https://github.com/ProseMirror/prosemirror/issues/1421#issuecomment-1759320191 */
27
- .ProseMirror [draggable][contenteditable=false] { user-select: text }
28
-
29
- .ProseMirror-selectednode {
30
- outline: 2px solid #8cf;
31
- }
32
-
33
- /* Make sure li selections wrap around markers */
34
-
35
- li.ProseMirror-selectednode {
36
- outline: none;
37
- }
38
-
39
- li.ProseMirror-selectednode:after {
40
- content: "";
41
- position: absolute;
42
- left: -32px;
43
- right: -2px; top: -2px; bottom: -2px;
44
- border: 2px solid #8cf;
45
- pointer-events: none;
46
- }
47
-
48
- /* Protect against generic img rules */
49
-
50
- img.ProseMirror-separator {
51
- display: inline !important;
52
- border: none !important;
53
- margin: 0 !important;
54
- }
55
-
56
-
File without changes
@@ -1,26 +0,0 @@
1
- .ProseMirror-gapcursor {
2
- pointer-events: none;
3
- display: none;
4
- position: relative;
5
- }
6
-
7
- .ProseMirror-gapcursor:after {
8
- content: "";
9
- border-top: 1px solid;
10
- width: 20px;
11
- animation: 1.1s steps(2, start) infinite ProseMirror-cursor-blink;
12
- display: block;
13
- position: absolute;
14
- top: -2px;
15
- }
16
-
17
- @keyframes ProseMirror-cursor-blink {
18
- to {
19
- visibility: hidden;
20
- }
21
- }
22
-
23
- .ProseMirror-focused .ProseMirror-gapcursor {
24
- display: block;
25
- }
26
-
@@ -1,9 +0,0 @@
1
- .prosekit-commit-deletion {
2
- background-color: #e5534b80;
3
- text-decoration: line-through;
4
- }
5
-
6
- .prosekit-commit-addition {
7
- background-color: #53e54b80;
8
- }
9
-
File without changes
File without changes
@@ -1,89 +0,0 @@
1
- /* src/style.css */
2
- .prosemirror-flat-list {
3
- padding: 0;
4
- margin-top: 0;
5
- margin-bottom: 0;
6
- margin-left: 32px;
7
- margin-bottom: 0;
8
- position: relative;
9
- display: list-item;
10
- list-style: none;
11
- }
12
- .prosemirror-flat-list.ProseMirror-selectednode {
13
- outline: none;
14
- }
15
- .prosemirror-flat-list.ProseMirror-selectednode:after {
16
- content: "";
17
- position: absolute;
18
- left: -32px;
19
- right: -2px;
20
- top: -2px;
21
- bottom: -2px;
22
- border: 2px solid #8cf;
23
- pointer-events: none;
24
- }
25
- .prosemirror-flat-list[data-list-kind=bullet] {
26
- list-style: disc;
27
- }
28
- .prosemirror-flat-list[data-list-kind=ordered] > * {
29
- contain: style;
30
- }
31
- .prosemirror-flat-list[data-list-kind=ordered]::before {
32
- position: absolute;
33
- right: 100%;
34
- font-variant-numeric: tabular-nums;
35
- content: counter(prosemirror-flat-list-counter, decimal) ". ";
36
- }
37
- .prosemirror-flat-list[data-list-kind=ordered] {
38
- counter-increment: prosemirror-flat-list-counter;
39
- }
40
- .prosemirror-flat-list[data-list-kind=ordered]:first-child,
41
- :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered] {
42
- counter-reset: prosemirror-flat-list-counter;
43
- }
44
- @supports (counter-set: prosemirror-flat-list-counter 1) {
45
- [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
46
- counter-set: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
47
- }
48
- }
49
- @supports not (counter-set: prosemirror-flat-list-counter 1) {
50
- [data-list-order]:is(.prosemirror-flat-list[data-list-kind=ordered]:first-child, :not(.prosemirror-flat-list[data-list-kind=ordered]) + .prosemirror-flat-list[data-list-kind=ordered]) {
51
- counter-increment: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
52
- }
53
- }
54
- .prosemirror-flat-list[data-list-kind=task] > .list-marker {
55
- position: absolute;
56
- right: 100%;
57
- text-align: center;
58
- width: 1.5em;
59
- width: 1lh;
60
- }
61
- :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker),
62
- :is(.prosemirror-flat-list[data-list-kind=task] > .list-marker) * {
63
- cursor: pointer;
64
- }
65
- .prosemirror-flat-list[data-list-kind=toggle] > .list-marker {
66
- position: absolute;
67
- right: 100%;
68
- text-align: center;
69
- width: 1.5em;
70
- width: 1lh;
71
- }
72
- .prosemirror-flat-list[data-list-kind=toggle] > .list-marker::before {
73
- content: "\23f7";
74
- }
75
- .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-marker::before {
76
- content: "\23f5";
77
- }
78
- .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable] > .list-marker {
79
- cursor: pointer;
80
- }
81
- .prosemirror-flat-list[data-list-kind=toggle]:not([data-list-collapsable]) > .list-marker {
82
- opacity: 40%;
83
- pointer-events: none;
84
- }
85
- .prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n+2) {
86
- display: none;
87
- }
88
-
89
-
@@ -1,6 +0,0 @@
1
- .prosekit-virtual-selection {
2
- background-color: #8888884d;
3
- border-radius: 2px;
4
- box-shadow: 0 0 0 2px #8888884d;
5
- }
6
-
@@ -1,42 +0,0 @@
1
- .ProseMirror .tableWrapper {
2
- overflow-x: auto;
3
- }
4
-
5
- .ProseMirror table {
6
- border-collapse: collapse;
7
- table-layout: fixed;
8
- width: 100%;
9
- overflow: hidden;
10
- }
11
-
12
- .ProseMirror td, .ProseMirror th {
13
- box-sizing: border-box;
14
- vertical-align: top;
15
- border-width: 1px;
16
- padding-left: .75rem;
17
- padding-right: .75rem;
18
- position: relative;
19
- }
20
-
21
- .ProseMirror .column-resize-handle {
22
- z-index: 20;
23
- pointer-events: none;
24
- background-color: highlighttext;
25
- width: 4px;
26
- position: absolute;
27
- top: 0;
28
- bottom: 0;
29
- right: -2px;
30
- }
31
-
32
- .ProseMirror.resize-cursor {
33
- cursor: ew-resize;
34
- cursor: col-resize;
35
- }
36
-
37
- .ProseMirror .selectedCell {
38
- --color: 210, 100%, 56%;
39
- border: 1px double hsl(var(--color));
40
- background-color: hsla(var(--color), 20%);
41
- }
42
-
File without changes
File without changes
@@ -1,8 +0,0 @@
1
- .prosekit-placeholder:before {
2
- content: attr(data-placeholder);
3
- opacity: .3;
4
- pointer-events: none;
5
- height: 0;
6
- position: absolute;
7
- }
8
-
File without changes