@prosekit/basic 0.3.37 → 0.4.0
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 +40 -11
- package/dist/prosekit-basic.js +24 -11
- package/dist/style.css +1 -1
- package/dist/typography.css +5 -1
- package/package.json +8 -8
@@ -2,8 +2,9 @@ import { BaseCommandsExtension } from '@prosekit/core';
|
|
2
2
|
import { BaseKeymapExtension } from '@prosekit/core';
|
3
3
|
import { BlockquoteExtension } from '@prosekit/extensions/blockquote';
|
4
4
|
import { BoldExtension } from '@prosekit/extensions/bold';
|
5
|
+
import { CodeBlockExtension } from '@prosekit/extensions/code-block';
|
5
6
|
import { CodeExtension } from '@prosekit/extensions/code';
|
6
|
-
import { DocExtension } from '@prosekit/
|
7
|
+
import { DocExtension } from '@prosekit/extensions/doc';
|
7
8
|
import { DropCursorExtension } from '@prosekit/extensions/drop-cursor';
|
8
9
|
import { GapCursorExtension } from '@prosekit/extensions/gap-cursor';
|
9
10
|
import { HeadingExtension } from '@prosekit/extensions/heading';
|
@@ -14,10 +15,10 @@ import { ItalicExtension } from '@prosekit/extensions/italic';
|
|
14
15
|
import { LinkExtension } from '@prosekit/extensions/link';
|
15
16
|
import { ListExtension } from '@prosekit/extensions/list';
|
16
17
|
import { ModClickPreventionExtension } from '@prosekit/extensions/mod-click-prevention';
|
17
|
-
import { ParagraphExtension } from '@prosekit/
|
18
|
+
import { ParagraphExtension } from '@prosekit/extensions/paragraph';
|
18
19
|
import { StrikeExtension } from '@prosekit/extensions/strike';
|
19
20
|
import { TableExtension } from '@prosekit/extensions/table';
|
20
|
-
import { TextExtension } from '@prosekit/
|
21
|
+
import { TextExtension } from '@prosekit/extensions/text';
|
21
22
|
import { UnderlineExtension } from '@prosekit/extensions/underline';
|
22
23
|
import { Union } from '@prosekit/core';
|
23
24
|
import { VirtualSelectionExtension } from '@prosekit/extensions/virtual-selection';
|
@@ -28,31 +29,59 @@ import { VirtualSelectionExtension } from '@prosekit/extensions/virtual-selectio
|
|
28
29
|
export declare type BasicExtension = Union<[
|
29
30
|
DocExtension,
|
30
31
|
TextExtension,
|
32
|
+
ParagraphExtension,
|
31
33
|
HeadingExtension,
|
32
|
-
HistoryExtension,
|
33
34
|
ListExtension,
|
34
35
|
BlockquoteExtension,
|
35
|
-
|
36
|
-
|
36
|
+
ImageExtension,
|
37
|
+
HorizontalRuleExtension,
|
38
|
+
TableExtension,
|
39
|
+
CodeBlockExtension,
|
37
40
|
ItalicExtension,
|
38
41
|
BoldExtension,
|
39
42
|
UnderlineExtension,
|
40
43
|
StrikeExtension,
|
41
44
|
CodeExtension,
|
42
45
|
LinkExtension,
|
43
|
-
|
44
|
-
|
46
|
+
BaseKeymapExtension,
|
47
|
+
BaseCommandsExtension,
|
48
|
+
HistoryExtension,
|
45
49
|
DropCursorExtension,
|
46
50
|
GapCursorExtension,
|
47
|
-
HorizontalRuleExtension,
|
48
51
|
VirtualSelectionExtension,
|
49
|
-
ModClickPreventionExtension
|
50
|
-
TableExtension
|
52
|
+
ModClickPreventionExtension
|
51
53
|
]>;
|
52
54
|
|
53
55
|
/**
|
54
56
|
* Define a basic extension that includes some common functionality. You can
|
55
57
|
* copy this function and customize it to your needs.
|
58
|
+
*
|
59
|
+
* It's a combination of the following extension functions:
|
60
|
+
*
|
61
|
+
* - {@link defineDoc}
|
62
|
+
* - {@link defineText}
|
63
|
+
* - {@link defineParagraph}
|
64
|
+
* - {@link defineHeading}
|
65
|
+
* - {@link defineList}
|
66
|
+
* - {@link defineBlockquote}
|
67
|
+
* - {@link defineImage}
|
68
|
+
* - {@link defineHorizontalRule}
|
69
|
+
* - {@link defineTable}
|
70
|
+
* - {@link defineCodeBlock}
|
71
|
+
* - {@link defineItalic}
|
72
|
+
* - {@link defineBold}
|
73
|
+
* - {@link defineUnderline}
|
74
|
+
* - {@link defineStrike}
|
75
|
+
* - {@link defineCode}
|
76
|
+
* - {@link defineLink}
|
77
|
+
* - {@link defineBaseKeymap}
|
78
|
+
* - {@link defineBaseCommands}
|
79
|
+
* - {@link defineHistory}
|
80
|
+
* - {@link defineDropCursor}
|
81
|
+
* - {@link defineGapCursor}
|
82
|
+
* - {@link defineVirtualSelection}
|
83
|
+
* - {@link defineModClickPrevention}
|
84
|
+
*
|
56
85
|
* @public
|
57
86
|
*/
|
58
87
|
export declare function defineBasicExtension(): BasicExtension;
|
package/dist/prosekit-basic.js
CHANGED
@@ -2,10 +2,7 @@
|
|
2
2
|
import {
|
3
3
|
defineBaseCommands,
|
4
4
|
defineBaseKeymap,
|
5
|
-
defineDoc,
|
6
5
|
defineHistory,
|
7
|
-
defineParagraph,
|
8
|
-
defineText,
|
9
6
|
union
|
10
7
|
} from "@prosekit/core";
|
11
8
|
import {
|
@@ -17,6 +14,12 @@ import {
|
|
17
14
|
import {
|
18
15
|
defineCode
|
19
16
|
} from "@prosekit/extensions/code";
|
17
|
+
import {
|
18
|
+
defineCodeBlock
|
19
|
+
} from "@prosekit/extensions/code-block";
|
20
|
+
import {
|
21
|
+
defineDoc
|
22
|
+
} from "@prosekit/extensions/doc";
|
20
23
|
import {
|
21
24
|
defineDropCursor
|
22
25
|
} from "@prosekit/extensions/drop-cursor";
|
@@ -44,12 +47,18 @@ import {
|
|
44
47
|
import {
|
45
48
|
defineModClickPrevention
|
46
49
|
} from "@prosekit/extensions/mod-click-prevention";
|
50
|
+
import {
|
51
|
+
defineParagraph
|
52
|
+
} from "@prosekit/extensions/paragraph";
|
47
53
|
import {
|
48
54
|
defineStrike
|
49
55
|
} from "@prosekit/extensions/strike";
|
50
56
|
import {
|
51
57
|
defineTable
|
52
58
|
} from "@prosekit/extensions/table";
|
59
|
+
import {
|
60
|
+
defineText
|
61
|
+
} from "@prosekit/extensions/text";
|
53
62
|
import {
|
54
63
|
defineUnderline
|
55
64
|
} from "@prosekit/extensions/underline";
|
@@ -58,28 +67,32 @@ import {
|
|
58
67
|
} from "@prosekit/extensions/virtual-selection";
|
59
68
|
function defineBasicExtension() {
|
60
69
|
return union(
|
70
|
+
// Nodes
|
61
71
|
defineDoc(),
|
62
72
|
defineText(),
|
73
|
+
defineParagraph(),
|
63
74
|
defineHeading(),
|
64
|
-
defineHistory(),
|
65
75
|
defineList(),
|
66
76
|
defineBlockquote(),
|
67
|
-
|
68
|
-
|
77
|
+
defineImage(),
|
78
|
+
defineHorizontalRule(),
|
79
|
+
defineTable(),
|
80
|
+
defineCodeBlock(),
|
81
|
+
// Marks
|
69
82
|
defineItalic(),
|
70
83
|
defineBold(),
|
71
84
|
defineUnderline(),
|
72
85
|
defineStrike(),
|
73
86
|
defineCode(),
|
74
87
|
defineLink(),
|
75
|
-
|
76
|
-
|
88
|
+
// Others
|
89
|
+
defineBaseKeymap(),
|
90
|
+
defineBaseCommands(),
|
91
|
+
defineHistory(),
|
77
92
|
defineDropCursor(),
|
78
93
|
defineGapCursor(),
|
79
|
-
defineHorizontalRule(),
|
80
94
|
defineVirtualSelection(),
|
81
|
-
defineModClickPrevention()
|
82
|
-
defineTable()
|
95
|
+
defineModClickPrevention()
|
83
96
|
);
|
84
97
|
}
|
85
98
|
export {
|
package/dist/style.css
CHANGED
package/dist/typography.css
CHANGED
@@ -50,7 +50,7 @@ div.ProseMirror pre {
|
|
50
50
|
}
|
51
51
|
div.ProseMirror blockquote {
|
52
52
|
padding-left: 1em;
|
53
|
-
border-left: 0.25em solid
|
53
|
+
border-left: 0.25em solid hsl(0 0% 60% / 0.4);
|
54
54
|
}
|
55
55
|
div.ProseMirror h1 {
|
56
56
|
margin: 1rem 0;
|
@@ -89,6 +89,9 @@ div.ProseMirror pre {
|
|
89
89
|
padding: 2rem 2rem;
|
90
90
|
overflow-x: auto;
|
91
91
|
border-radius: 0.375rem;
|
92
|
+
border: 1px solid hsl(0 0% 50% / 0.2);
|
93
|
+
color: var(--prosemirror-highlight, inherit);
|
94
|
+
background-color: var(--prosemirror-highlight-bg, inherit);
|
92
95
|
}
|
93
96
|
div.ProseMirror pre,
|
94
97
|
div.ProseMirror code {
|
@@ -104,6 +107,7 @@ div.ProseMirror pre code {
|
|
104
107
|
}
|
105
108
|
div.ProseMirror hr {
|
106
109
|
margin: 2em 0;
|
110
|
+
border-width: 1px;
|
107
111
|
}
|
108
112
|
div.ProseMirror .prosekit-horizontal-rule {
|
109
113
|
padding: 1em 0;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/basic",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.4.0",
|
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/core": "^0.
|
45
|
-
"@prosekit/
|
46
|
-
"@prosekit/
|
44
|
+
"@prosekit/core": "^0.8.0",
|
45
|
+
"@prosekit/pm": "^0.1.9",
|
46
|
+
"@prosekit/extensions": "^0.8.0"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
|
-
"postcss": "^8.5.
|
49
|
+
"postcss": "^8.5.3",
|
50
50
|
"postcss-nesting": "^13.0.1",
|
51
|
-
"tsup": "^8.
|
52
|
-
"typescript": "~5.7.
|
53
|
-
"vitest": "^3.0.
|
51
|
+
"tsup": "^8.4.0",
|
52
|
+
"typescript": "~5.7.3",
|
53
|
+
"vitest": "^3.0.9",
|
54
54
|
"@prosekit/dev": "0.0.0"
|
55
55
|
},
|
56
56
|
"scripts": {
|