prosekit 0.5.0 → 0.5.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.
- package/dist/_tsup-dts-rollup.d.ts +36 -0
- package/dist/basic/style.css +36 -1
- package/dist/extensions/table/style.css +36 -0
- package/dist/pm/view/style/prosemirror.css +1 -1
- package/dist/prosekit-extensions-enter-rule.d.ts +5 -0
- package/dist/prosekit-extensions-enter-rule.js +2 -0
- package/dist/prosekit-extensions-table.d.ts +7 -0
- package/dist/prosekit-extensions-table.js +2 -0
- package/package.json +30 -11
|
@@ -172,6 +172,7 @@ import { defineDoubleClickHandler } from '@prosekit/core';
|
|
|
172
172
|
import { defineDoubleClickOnHandler } from '@prosekit/core';
|
|
173
173
|
import { defineDropCursor } from '@prosekit/extensions/drop-cursor';
|
|
174
174
|
import { defineDropHandler } from '@prosekit/core';
|
|
175
|
+
import { defineEnterRule } from '@prosekit/extensions/enter-rule';
|
|
175
176
|
import { defineFocusChangeHandler } from '@prosekit/core';
|
|
176
177
|
import { defineHeading } from '@prosekit/extensions/heading';
|
|
177
178
|
import { defineHeadingCommands } from '@prosekit/extensions/heading';
|
|
@@ -223,7 +224,15 @@ import { defineStrike } from '@prosekit/extensions/strike';
|
|
|
223
224
|
import { defineStrikeCommands } from '@prosekit/extensions/strike';
|
|
224
225
|
import { defineStrikeKeymap } from '@prosekit/extensions/strike';
|
|
225
226
|
import { defineStrikeSpec } from '@prosekit/extensions/strike';
|
|
227
|
+
import { defineTable } from '@prosekit/extensions/table';
|
|
228
|
+
import { defineTableCellSpec } from '@prosekit/extensions/table';
|
|
229
|
+
import { defineTableCommands } from '@prosekit/extensions/table';
|
|
230
|
+
import { defineTableHeaderCellSpec } from '@prosekit/extensions/table';
|
|
231
|
+
import { defineTablePlugins } from '@prosekit/extensions/table';
|
|
232
|
+
import { defineTableRowSpec } from '@prosekit/extensions/table';
|
|
233
|
+
import { defineTableSpec } from '@prosekit/extensions/table';
|
|
226
234
|
import { defineText } from '@prosekit/core';
|
|
235
|
+
import { defineTextBlockEnterRule } from '@prosekit/extensions/enter-rule';
|
|
227
236
|
import { defineTextBlockInputRule } from '@prosekit/extensions/input-rule';
|
|
228
237
|
import { defineTextInputHandler } from '@prosekit/core';
|
|
229
238
|
import { defineTripleClickHandler } from '@prosekit/core';
|
|
@@ -277,6 +286,8 @@ import { elementFromJSON } from '@prosekit/core';
|
|
|
277
286
|
import { elementFromNode } from '@prosekit/core';
|
|
278
287
|
import { ellipsis } from '@prosekit/pm/inputrules';
|
|
279
288
|
import { emDash } from '@prosekit/pm/inputrules';
|
|
289
|
+
import { EnterRuleHandler } from '@prosekit/extensions/enter-rule';
|
|
290
|
+
import { EnterRuleOptions } from '@prosekit/extensions/enter-rule';
|
|
280
291
|
import { exitCode } from '@prosekit/pm/commands';
|
|
281
292
|
import { expandMark } from '@prosekit/core';
|
|
282
293
|
import { Extension } from '@prosekit/core';
|
|
@@ -516,6 +527,7 @@ import { StateJSON } from '@prosekit/core';
|
|
|
516
527
|
import { Step } from '@prosekit/pm/transform';
|
|
517
528
|
import { StepMap } from '@prosekit/pm/transform';
|
|
518
529
|
import { StepResult } from '@prosekit/pm/transform';
|
|
530
|
+
import { TextBlockEnterRuleOptions } from '@prosekit/extensions/enter-rule';
|
|
519
531
|
import { textblockTypeInputRule } from '@prosekit/pm/inputrules';
|
|
520
532
|
import { TextInputHandler } from '@prosekit/core';
|
|
521
533
|
import { TextSelection } from '@prosekit/pm/state';
|
|
@@ -926,6 +938,8 @@ export { defineDropCursor }
|
|
|
926
938
|
|
|
927
939
|
export { defineDropHandler }
|
|
928
940
|
|
|
941
|
+
export { defineEnterRule }
|
|
942
|
+
|
|
929
943
|
export { defineFocusChangeHandler }
|
|
930
944
|
|
|
931
945
|
export { defineHeading }
|
|
@@ -1028,8 +1042,24 @@ export { defineStrikeKeymap }
|
|
|
1028
1042
|
|
|
1029
1043
|
export { defineStrikeSpec }
|
|
1030
1044
|
|
|
1045
|
+
export { defineTable }
|
|
1046
|
+
|
|
1047
|
+
export { defineTableCellSpec }
|
|
1048
|
+
|
|
1049
|
+
export { defineTableCommands }
|
|
1050
|
+
|
|
1051
|
+
export { defineTableHeaderCellSpec }
|
|
1052
|
+
|
|
1053
|
+
export { defineTablePlugins }
|
|
1054
|
+
|
|
1055
|
+
export { defineTableRowSpec }
|
|
1056
|
+
|
|
1057
|
+
export { defineTableSpec }
|
|
1058
|
+
|
|
1031
1059
|
export { defineText }
|
|
1032
1060
|
|
|
1061
|
+
export { defineTextBlockEnterRule }
|
|
1062
|
+
|
|
1033
1063
|
export { defineTextBlockInputRule }
|
|
1034
1064
|
|
|
1035
1065
|
export { defineTextInputHandler }
|
|
@@ -1136,6 +1166,10 @@ export { ellipsis }
|
|
|
1136
1166
|
|
|
1137
1167
|
export { emDash }
|
|
1138
1168
|
|
|
1169
|
+
export { EnterRuleHandler }
|
|
1170
|
+
|
|
1171
|
+
export { EnterRuleOptions }
|
|
1172
|
+
|
|
1139
1173
|
export { exitCode }
|
|
1140
1174
|
|
|
1141
1175
|
export { expandMark }
|
|
@@ -1612,6 +1646,8 @@ export { StepMap }
|
|
|
1612
1646
|
|
|
1613
1647
|
export { StepResult }
|
|
1614
1648
|
|
|
1649
|
+
export { TextBlockEnterRuleOptions }
|
|
1650
|
+
|
|
1615
1651
|
export { textblockTypeInputRule }
|
|
1616
1652
|
|
|
1617
1653
|
export { TextInputHandler }
|
package/dist/basic/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ../../node_modules/.pnpm/prosemirror-view@1.
|
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-view@1.33.1/node_modules/prosemirror-view/style/prosemirror.css */
|
|
2
2
|
.ProseMirror {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
@@ -142,6 +142,41 @@ img.ProseMirror-separator {
|
|
|
142
142
|
|
|
143
143
|
/* ../extensions/src/list/style.css */
|
|
144
144
|
|
|
145
|
+
/* ../extensions/src/table/style.css */
|
|
146
|
+
.ProseMirror .tableWrapper {
|
|
147
|
+
overflow-x: auto;
|
|
148
|
+
}
|
|
149
|
+
.ProseMirror table {
|
|
150
|
+
border-collapse: collapse;
|
|
151
|
+
table-layout: fixed;
|
|
152
|
+
width: 100%;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
}
|
|
155
|
+
.ProseMirror td,
|
|
156
|
+
.ProseMirror th {
|
|
157
|
+
vertical-align: top;
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
position: relative;
|
|
160
|
+
border-width: 1px;
|
|
161
|
+
}
|
|
162
|
+
.ProseMirror .column-resize-handle {
|
|
163
|
+
position: absolute;
|
|
164
|
+
right: -2px;
|
|
165
|
+
top: 0;
|
|
166
|
+
bottom: 0;
|
|
167
|
+
width: 4px;
|
|
168
|
+
z-index: 20;
|
|
169
|
+
background-color: HighlightText;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
}
|
|
172
|
+
.ProseMirror.resize-cursor {
|
|
173
|
+
cursor: ew-resize;
|
|
174
|
+
cursor: col-resize;
|
|
175
|
+
}
|
|
176
|
+
.ProseMirror .selectedCell {
|
|
177
|
+
background-color: Highlight;
|
|
178
|
+
}
|
|
179
|
+
|
|
145
180
|
/* ../extensions/src/placeholder/style.css */
|
|
146
181
|
.prosekit-placeholder::before {
|
|
147
182
|
position: absolute;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* ../extensions/src/table/style.css */
|
|
2
|
+
.ProseMirror .tableWrapper {
|
|
3
|
+
overflow-x: auto;
|
|
4
|
+
}
|
|
5
|
+
.ProseMirror table {
|
|
6
|
+
border-collapse: collapse;
|
|
7
|
+
table-layout: fixed;
|
|
8
|
+
width: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
.ProseMirror td,
|
|
12
|
+
.ProseMirror th {
|
|
13
|
+
vertical-align: top;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
position: relative;
|
|
16
|
+
border-width: 1px;
|
|
17
|
+
}
|
|
18
|
+
.ProseMirror .column-resize-handle {
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: -2px;
|
|
21
|
+
top: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
width: 4px;
|
|
24
|
+
z-index: 20;
|
|
25
|
+
background-color: HighlightText;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
}
|
|
28
|
+
.ProseMirror.resize-cursor {
|
|
29
|
+
cursor: ew-resize;
|
|
30
|
+
cursor: col-resize;
|
|
31
|
+
}
|
|
32
|
+
.ProseMirror .selectedCell {
|
|
33
|
+
background-color: Highlight;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* src/extensions/table/style.css */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { defineEnterRule } from './_tsup-dts-rollup';
|
|
2
|
+
export { defineTextBlockEnterRule } from './_tsup-dts-rollup';
|
|
3
|
+
export { EnterRuleHandler } from './_tsup-dts-rollup';
|
|
4
|
+
export { EnterRuleOptions } from './_tsup-dts-rollup';
|
|
5
|
+
export { TextBlockEnterRuleOptions } from './_tsup-dts-rollup';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defineTable } from './_tsup-dts-rollup';
|
|
2
|
+
export { defineTableCellSpec } from './_tsup-dts-rollup';
|
|
3
|
+
export { defineTableCommands } from './_tsup-dts-rollup';
|
|
4
|
+
export { defineTableHeaderCellSpec } from './_tsup-dts-rollup';
|
|
5
|
+
export { defineTablePlugins } from './_tsup-dts-rollup';
|
|
6
|
+
export { defineTableRowSpec } from './_tsup-dts-rollup';
|
|
7
|
+
export { defineTableSpec } from './_tsup-dts-rollup';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prosekit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
"import": "./dist/prosekit-extensions-drop-cursor.js",
|
|
82
82
|
"default": "./dist/prosekit-extensions-drop-cursor.js"
|
|
83
83
|
},
|
|
84
|
+
"./extensions/enter-rule": {
|
|
85
|
+
"types": "./dist/prosekit-extensions-enter-rule.d.ts",
|
|
86
|
+
"import": "./dist/prosekit-extensions-enter-rule.js",
|
|
87
|
+
"default": "./dist/prosekit-extensions-enter-rule.js"
|
|
88
|
+
},
|
|
84
89
|
"./extensions/heading": {
|
|
85
90
|
"types": "./dist/prosekit-extensions-heading.d.ts",
|
|
86
91
|
"import": "./dist/prosekit-extensions-heading.js",
|
|
@@ -137,6 +142,14 @@
|
|
|
137
142
|
"import": "./dist/prosekit-extensions-strike.js",
|
|
138
143
|
"default": "./dist/prosekit-extensions-strike.js"
|
|
139
144
|
},
|
|
145
|
+
"./extensions/table": {
|
|
146
|
+
"types": "./dist/prosekit-extensions-table.d.ts",
|
|
147
|
+
"import": "./dist/prosekit-extensions-table.js",
|
|
148
|
+
"default": "./dist/prosekit-extensions-table.js"
|
|
149
|
+
},
|
|
150
|
+
"./extensions/table/style.css": {
|
|
151
|
+
"default": "./dist/extensions/table/style.css"
|
|
152
|
+
},
|
|
140
153
|
"./extensions/underline": {
|
|
141
154
|
"types": "./dist/prosekit-extensions-underline.d.ts",
|
|
142
155
|
"import": "./dist/prosekit-extensions-underline.js",
|
|
@@ -653,11 +666,11 @@
|
|
|
653
666
|
"dist"
|
|
654
667
|
],
|
|
655
668
|
"dependencies": {
|
|
656
|
-
"@prosekit/basic": "0.3.
|
|
669
|
+
"@prosekit/basic": "0.3.4",
|
|
657
670
|
"@prosekit/core": "0.4.0",
|
|
658
|
-
"@prosekit/extensions": "0.4.
|
|
671
|
+
"@prosekit/extensions": "0.4.2",
|
|
659
672
|
"@prosekit/lit": "0.2.7",
|
|
660
|
-
"@prosekit/pm": "0.1.
|
|
673
|
+
"@prosekit/pm": "0.1.2",
|
|
661
674
|
"@prosekit/preact": "0.2.6",
|
|
662
675
|
"@prosekit/react": "0.2.6",
|
|
663
676
|
"@prosekit/solid": "0.2.6",
|
|
@@ -694,18 +707,18 @@
|
|
|
694
707
|
},
|
|
695
708
|
"devDependencies": {
|
|
696
709
|
"@prosekit/dev": "*",
|
|
697
|
-
"@types/react": "^18.2.
|
|
698
|
-
"@types/react-dom": "^18.2.
|
|
710
|
+
"@types/react": "^18.2.64",
|
|
711
|
+
"@types/react-dom": "^18.2.20",
|
|
699
712
|
"postcss": "^8.4.35",
|
|
700
|
-
"postcss-nesting": "^12.0
|
|
701
|
-
"preact": "^10.19.
|
|
713
|
+
"postcss-nesting": "^12.1.0",
|
|
714
|
+
"preact": "^10.19.6",
|
|
702
715
|
"react": "^18.2.0",
|
|
703
716
|
"react-dom": "^18.2.0",
|
|
704
|
-
"solid-js": "^1.8.
|
|
705
|
-
"svelte": "^4.2.
|
|
717
|
+
"solid-js": "^1.8.15",
|
|
718
|
+
"svelte": "^4.2.12",
|
|
706
719
|
"tsup": "^8.0.2",
|
|
707
720
|
"typescript": "^5.3.3",
|
|
708
|
-
"vue": "^3.4.
|
|
721
|
+
"vue": "^3.4.21"
|
|
709
722
|
},
|
|
710
723
|
"scripts": {
|
|
711
724
|
"build:tsup": "tsup",
|
|
@@ -744,6 +757,9 @@
|
|
|
744
757
|
"extensions/drop-cursor": [
|
|
745
758
|
"./dist/prosekit-extensions-drop-cursor.d.ts"
|
|
746
759
|
],
|
|
760
|
+
"extensions/enter-rule": [
|
|
761
|
+
"./dist/prosekit-extensions-enter-rule.d.ts"
|
|
762
|
+
],
|
|
747
763
|
"extensions/heading": [
|
|
748
764
|
"./dist/prosekit-extensions-heading.d.ts"
|
|
749
765
|
],
|
|
@@ -774,6 +790,9 @@
|
|
|
774
790
|
"extensions/strike": [
|
|
775
791
|
"./dist/prosekit-extensions-strike.d.ts"
|
|
776
792
|
],
|
|
793
|
+
"extensions/table": [
|
|
794
|
+
"./dist/prosekit-extensions-table.d.ts"
|
|
795
|
+
],
|
|
777
796
|
"extensions/underline": [
|
|
778
797
|
"./dist/prosekit-extensions-underline.d.ts"
|
|
779
798
|
],
|