@prosekit/basic 0.0.12 → 0.0.13
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 -1
- package/dist/internal/preflight.css +7 -22
- package/dist/prosekit-basic.js +2 -0
- package/package.json +3 -3
- package/src/index.ts +2 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Attrs } from 'prosemirror-model';
|
2
2
|
import { Extension } from '@prosekit/core';
|
3
|
+
import { HeadingAttrs } from '@prosekit/extensions/heading';
|
3
4
|
import { Node as Node_2 } from 'prosemirror-model';
|
4
5
|
import { NodeType } from 'prosemirror-model';
|
5
6
|
import { Options } from 'tsup';
|
@@ -8,9 +9,11 @@ import { UserProjectConfigExport } from 'vitest/dist/config.js';
|
|
8
9
|
/** @public */
|
9
10
|
export declare function addBasicExtension(): Extension< {
|
10
11
|
NODES: "text" | "doc" | "paragraph" | "heading" | "list";
|
11
|
-
MARKS: "italic";
|
12
|
+
MARKS: "bold" | "italic";
|
12
13
|
COMMAND_ARGS: {
|
14
|
+
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
13
15
|
toggleItalic: [];
|
16
|
+
toggleBold: [];
|
14
17
|
insertText: [{
|
15
18
|
text: string;
|
16
19
|
from?: number | undefined;
|
@@ -1,4 +1,10 @@
|
|
1
1
|
/* src/internal/preflight.css */
|
2
|
+
*,
|
3
|
+
::before,
|
4
|
+
::after {
|
5
|
+
border-width: 0;
|
6
|
+
border-style: solid;
|
7
|
+
}
|
2
8
|
*:has(> div.ProseMirror) {
|
3
9
|
display: flex;
|
4
10
|
flex-direction: column;
|
@@ -83,11 +89,7 @@
|
|
83
89
|
word-spacing: normal;
|
84
90
|
word-break: normal;
|
85
91
|
word-wrap: normal;
|
86
|
-
-moz-tab-size: 4;
|
87
|
-
-o-tab-size: 4;
|
88
92
|
tab-size: 4;
|
89
|
-
-webkit-hyphens: none;
|
90
|
-
-moz-hyphens: none;
|
91
93
|
hyphens: none;
|
92
94
|
}
|
93
95
|
.ProseMirror pre code {
|
@@ -98,32 +100,15 @@
|
|
98
100
|
}
|
99
101
|
.ProseMirror span[data-mention=user] {
|
100
102
|
border-radius: 0.5rem;
|
101
|
-
padding: 0.125rem;
|
102
103
|
color: rgb(59 130 246);
|
103
104
|
}
|
104
|
-
.ProseMirror span[data-mention=user]::before {
|
105
|
-
content: "@";
|
106
|
-
}
|
107
105
|
.ProseMirror span[data-mention=tag] {
|
108
106
|
border-radius: 0.5rem;
|
107
|
+
padding: 0.125rem 0.25rem;
|
109
108
|
background-color: rgb(229 231 235);
|
110
|
-
padding-left: 0.25rem;
|
111
|
-
padding-right: 0.25rem;
|
112
|
-
padding-top: 0.125rem;
|
113
|
-
padding-bottom: 0.125rem;
|
114
109
|
}
|
115
110
|
@media (prefers-color-scheme: dark) {
|
116
111
|
.ProseMirror span[data-mention=tag] {
|
117
112
|
background-color: rgb(75 85 99);
|
118
113
|
}
|
119
114
|
}
|
120
|
-
.ProseMirror span[data-mention=tag]::before {
|
121
|
-
content: "#";
|
122
|
-
padding-right: 0.125rem;
|
123
|
-
opacity: 0.4;
|
124
|
-
}
|
125
|
-
@media (prefers-color-scheme: dark) {
|
126
|
-
.ProseMirror span[data-mention=tag]::before {
|
127
|
-
opacity: 0.5;
|
128
|
-
}
|
129
|
-
}
|
package/dist/prosekit-basic.js
CHANGED
@@ -9,6 +9,7 @@ import {
|
|
9
9
|
Priority,
|
10
10
|
withPriority
|
11
11
|
} from "@prosekit/core";
|
12
|
+
import { addBold } from "@prosekit/extensions/bold";
|
12
13
|
import { addHeading } from "@prosekit/extensions/heading";
|
13
14
|
import { addItalic } from "@prosekit/extensions/italic";
|
14
15
|
import { addList } from "@prosekit/extensions/list";
|
@@ -21,6 +22,7 @@ function addBasicExtension() {
|
|
21
22
|
addBaseKeymap(),
|
22
23
|
addBaseCommands(),
|
23
24
|
addItalic(),
|
25
|
+
addBold(),
|
24
26
|
withPriority(addParagraph(), Priority.high)
|
25
27
|
]);
|
26
28
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/basic",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.13",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -41,8 +41,8 @@
|
|
41
41
|
"dist"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@prosekit/core": "^0.0.
|
45
|
-
"@prosekit/extensions": "^0.0.
|
44
|
+
"@prosekit/core": "^0.0.10",
|
45
|
+
"@prosekit/extensions": "^0.0.11"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@prosekit/dev": "*",
|
package/src/index.ts
CHANGED
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
Priority,
|
9
9
|
withPriority,
|
10
10
|
} from '@prosekit/core'
|
11
|
+
import { addBold } from '@prosekit/extensions/bold'
|
11
12
|
import { addHeading } from '@prosekit/extensions/heading'
|
12
13
|
import { addItalic } from '@prosekit/extensions/italic'
|
13
14
|
import { addList } from '@prosekit/extensions/list'
|
@@ -22,6 +23,7 @@ export function addBasicExtension() {
|
|
22
23
|
addBaseKeymap(),
|
23
24
|
addBaseCommands(),
|
24
25
|
addItalic(),
|
26
|
+
addBold(),
|
25
27
|
withPriority(addParagraph(), Priority.high),
|
26
28
|
])
|
27
29
|
}
|