prosekit 0.0.15 → 0.0.17
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 +12 -0
- package/dist/basic/internal/preflight.css +116 -0
- package/dist/prosekit-core.d.ts +1 -0
- package/dist/prosekit-extensions-heading.d.ts +1 -0
- package/dist/prosekit-pm-model.d.ts +1 -0
- package/dist/prosekit-react.d.ts +1 -0
- package/package.json +13 -13
- package/dist/basic/internal/example.css +0 -130
|
@@ -17,7 +17,9 @@ import { addCodeSpec } from '@prosekit/extensions/code';
|
|
|
17
17
|
import { addCommands } from '@prosekit/core';
|
|
18
18
|
import { addDefaultState } from '@prosekit/core';
|
|
19
19
|
import { addDoc } from '@prosekit/core';
|
|
20
|
+
import { addEventHandler } from '@prosekit/core';
|
|
20
21
|
import { addHeading } from '@prosekit/extensions/heading';
|
|
22
|
+
import { addHeadingCommands } from '@prosekit/extensions/heading';
|
|
21
23
|
import { addHeadingInputRule } from '@prosekit/extensions/heading';
|
|
22
24
|
import { addHeadingKeymap } from '@prosekit/extensions/heading';
|
|
23
25
|
import { addHeadingSpec } from '@prosekit/extensions/heading';
|
|
@@ -292,6 +294,7 @@ import { ProseKitProps as ProseKitProps_alias_1 } from '@prosekit/react';
|
|
|
292
294
|
import { ProseKitProps as ProseKitProps_alias_2 } from '@prosekit/solid';
|
|
293
295
|
import { ProseKitProps as ProseKitProps_alias_3 } from '@prosekit/vue';
|
|
294
296
|
import { ProseKitProps as ProseKitProps_alias_4 } from '@prosekit/svelte/components/prosekit';
|
|
297
|
+
import { ProseMirrorFragment } from '@prosekit/pm/model';
|
|
295
298
|
import { ProseMirrorNode } from '@prosekit/pm/model';
|
|
296
299
|
import { ProseMirrorPlugin } from '@prosekit/pm/state';
|
|
297
300
|
import { RemoveMarkStep } from '@prosekit/pm/transform';
|
|
@@ -343,6 +346,7 @@ import { useEditor } from '@prosekit/preact';
|
|
|
343
346
|
import { useEditor as useEditor_alias_1 } from '@prosekit/react';
|
|
344
347
|
import { useEditor as useEditor_alias_2 } from '@prosekit/solid';
|
|
345
348
|
import { useEditor as useEditor_alias_3 } from '@prosekit/vue';
|
|
349
|
+
import { UseEditorOptions } from '@prosekit/react';
|
|
346
350
|
import { useExtension } from '@prosekit/preact';
|
|
347
351
|
import { useExtension as useExtension_alias_1 } from '@prosekit/react';
|
|
348
352
|
import { useExtension as useExtension_alias_2 } from '@prosekit/solid';
|
|
@@ -393,8 +397,12 @@ export { addDefaultState }
|
|
|
393
397
|
|
|
394
398
|
export { addDoc }
|
|
395
399
|
|
|
400
|
+
export { addEventHandler }
|
|
401
|
+
|
|
396
402
|
export { addHeading }
|
|
397
403
|
|
|
404
|
+
export { addHeadingCommands }
|
|
405
|
+
|
|
398
406
|
export { addHeadingInputRule }
|
|
399
407
|
|
|
400
408
|
export { addHeadingKeymap }
|
|
@@ -943,6 +951,8 @@ export { ProseKitProps_alias_3 }
|
|
|
943
951
|
|
|
944
952
|
export { ProseKitProps_alias_4 }
|
|
945
953
|
|
|
954
|
+
export { ProseMirrorFragment }
|
|
955
|
+
|
|
946
956
|
export { ProseMirrorNode }
|
|
947
957
|
|
|
948
958
|
export { ProseMirrorPlugin }
|
|
@@ -1045,6 +1055,8 @@ export { useEditor_alias_2 }
|
|
|
1045
1055
|
|
|
1046
1056
|
export { useEditor_alias_3 }
|
|
1047
1057
|
|
|
1058
|
+
export { UseEditorOptions }
|
|
1059
|
+
|
|
1048
1060
|
export { useExtension }
|
|
1049
1061
|
|
|
1050
1062
|
export { useExtension_alias_1 }
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* ../basic/src/internal/preflight.css */
|
|
2
|
+
*,
|
|
3
|
+
::before,
|
|
4
|
+
::after {
|
|
5
|
+
border-width: 0;
|
|
6
|
+
border-style: solid;
|
|
7
|
+
}
|
|
8
|
+
*:has(> div.ProseMirror) {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
padding: 8px;
|
|
14
|
+
font-family:
|
|
15
|
+
ui-sans-serif,
|
|
16
|
+
sans-serif,
|
|
17
|
+
"Apple Color Emoji",
|
|
18
|
+
"Segoe UI Emoji",
|
|
19
|
+
"Segoe UI Symbol",
|
|
20
|
+
"Noto Color Emoji",
|
|
21
|
+
system-ui;
|
|
22
|
+
}
|
|
23
|
+
*:has(> div.ProseMirror) * {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
.ProseMirror p:first-of-type {
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
}
|
|
29
|
+
.ProseMirror p:last-of-type {
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
}
|
|
32
|
+
.ProseMirror h1,
|
|
33
|
+
.ProseMirror h2,
|
|
34
|
+
.ProseMirror h3,
|
|
35
|
+
.ProseMirror h4,
|
|
36
|
+
.ProseMirror h5,
|
|
37
|
+
.ProseMirror h6 {
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
line-height: 1.25;
|
|
40
|
+
}
|
|
41
|
+
.ProseMirror a {
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
}
|
|
45
|
+
.ProseMirror p,
|
|
46
|
+
.ProseMirror ul,
|
|
47
|
+
.ProseMirror ol,
|
|
48
|
+
.ProseMirror pre {
|
|
49
|
+
margin: 1em 0;
|
|
50
|
+
line-height: 1.5;
|
|
51
|
+
}
|
|
52
|
+
.ProseMirror blockquote {
|
|
53
|
+
margin: 1em 0;
|
|
54
|
+
padding-left: 1em;
|
|
55
|
+
font-style: italic;
|
|
56
|
+
}
|
|
57
|
+
.ProseMirror h1 {
|
|
58
|
+
margin: 1rem 0;
|
|
59
|
+
font-size: 2.25em;
|
|
60
|
+
}
|
|
61
|
+
.ProseMirror h2 {
|
|
62
|
+
margin: 1.75em 0 0.5em;
|
|
63
|
+
font-size: 1.75em;
|
|
64
|
+
}
|
|
65
|
+
.ProseMirror h3 {
|
|
66
|
+
margin: 1.5em 0 0.5em;
|
|
67
|
+
font-size: 1.375em;
|
|
68
|
+
}
|
|
69
|
+
.ProseMirror h4 {
|
|
70
|
+
margin: 1em 0;
|
|
71
|
+
font-size: 1.125em;
|
|
72
|
+
}
|
|
73
|
+
.ProseMirror img,
|
|
74
|
+
.ProseMirror video {
|
|
75
|
+
max-width: 100%;
|
|
76
|
+
}
|
|
77
|
+
.ProseMirror code {
|
|
78
|
+
font-size: 0.875em;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
}
|
|
81
|
+
.ProseMirror pre {
|
|
82
|
+
padding: 2rem 2rem;
|
|
83
|
+
overflow-x: auto;
|
|
84
|
+
border-radius: 0.375rem;
|
|
85
|
+
}
|
|
86
|
+
.ProseMirror pre,
|
|
87
|
+
.ProseMirror code {
|
|
88
|
+
white-space: pre;
|
|
89
|
+
word-spacing: normal;
|
|
90
|
+
word-break: normal;
|
|
91
|
+
word-wrap: normal;
|
|
92
|
+
tab-size: 4;
|
|
93
|
+
hyphens: none;
|
|
94
|
+
}
|
|
95
|
+
.ProseMirror pre code {
|
|
96
|
+
font-weight: inherit;
|
|
97
|
+
}
|
|
98
|
+
.ProseMirror hr {
|
|
99
|
+
margin: 2em 0;
|
|
100
|
+
}
|
|
101
|
+
.ProseMirror span[data-mention=user] {
|
|
102
|
+
border-radius: 0.5rem;
|
|
103
|
+
color: rgb(59 130 246);
|
|
104
|
+
}
|
|
105
|
+
.ProseMirror span[data-mention=tag] {
|
|
106
|
+
border-radius: 0.5rem;
|
|
107
|
+
padding: 0.125rem 0.25rem;
|
|
108
|
+
background-color: rgb(229 231 235);
|
|
109
|
+
}
|
|
110
|
+
@media (prefers-color-scheme: dark) {
|
|
111
|
+
.ProseMirror span[data-mention=tag] {
|
|
112
|
+
background-color: rgb(75 85 99);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* src/basic/internal/preflight.css */
|
package/dist/prosekit-core.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { addCommands } from './_tsup-dts-rollup';
|
|
|
18
18
|
export { addDefaultState } from './_tsup-dts-rollup';
|
|
19
19
|
export { DefaultStateOptions } from './_tsup-dts-rollup';
|
|
20
20
|
export { addDoc } from './_tsup-dts-rollup';
|
|
21
|
+
export { addEventHandler } from './_tsup-dts-rollup';
|
|
21
22
|
export { addInputRule } from './_tsup-dts-rollup';
|
|
22
23
|
export { addBaseKeymap } from './_tsup-dts-rollup';
|
|
23
24
|
export { addKeymap } from './_tsup-dts-rollup';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { addHeadingSpec } from './_tsup-dts-rollup';
|
|
2
2
|
export { addHeadingKeymap } from './_tsup-dts-rollup';
|
|
3
3
|
export { addHeadingInputRule } from './_tsup-dts-rollup';
|
|
4
|
+
export { addHeadingCommands } from './_tsup-dts-rollup';
|
|
4
5
|
export { addHeading } from './_tsup-dts-rollup';
|
|
5
6
|
export { HeadingAttrs } from './_tsup-dts-rollup';
|
package/dist/prosekit-react.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ProseKit_alias_1 as ProseKit } from './_tsup-dts-rollup';
|
|
2
2
|
export { ProseKitProps_alias_1 as ProseKitProps } from './_tsup-dts-rollup';
|
|
3
3
|
export { useEditor_alias_1 as useEditor } from './_tsup-dts-rollup';
|
|
4
|
+
export { UseEditorOptions } from './_tsup-dts-rollup';
|
|
4
5
|
export { useExtension_alias_1 as useExtension } from './_tsup-dts-rollup';
|
|
5
6
|
export { useKeymap_alias_1 as useKeymap } 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.0.
|
|
4
|
+
"version": "0.0.17",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"import": "./dist/prosekit-basic.js",
|
|
36
36
|
"default": "./dist/prosekit-basic.js"
|
|
37
37
|
},
|
|
38
|
-
"./basic/internal/
|
|
39
|
-
"default": "./dist/basic/internal/
|
|
38
|
+
"./basic/internal/preflight.css": {
|
|
39
|
+
"default": "./dist/basic/internal/preflight.css"
|
|
40
40
|
},
|
|
41
41
|
"./basic/style.css": {
|
|
42
42
|
"default": "./dist/basic/style.css"
|
|
@@ -473,16 +473,16 @@
|
|
|
473
473
|
"dist"
|
|
474
474
|
],
|
|
475
475
|
"dependencies": {
|
|
476
|
-
"@prosekit/basic": "0.0.
|
|
477
|
-
"@prosekit/core": "0.0.
|
|
478
|
-
"@prosekit/extensions": "0.0.
|
|
479
|
-
"@prosekit/lit": "0.0.
|
|
480
|
-
"@prosekit/pm": "0.0.
|
|
481
|
-
"@prosekit/preact": "0.0.
|
|
482
|
-
"@prosekit/react": "0.0.
|
|
483
|
-
"@prosekit/solid": "0.0.
|
|
484
|
-
"@prosekit/svelte": "0.0.
|
|
485
|
-
"@prosekit/vue": "0.0.
|
|
476
|
+
"@prosekit/basic": "0.0.13",
|
|
477
|
+
"@prosekit/core": "0.0.10",
|
|
478
|
+
"@prosekit/extensions": "0.0.11",
|
|
479
|
+
"@prosekit/lit": "0.0.13",
|
|
480
|
+
"@prosekit/pm": "0.0.5",
|
|
481
|
+
"@prosekit/preact": "0.0.10",
|
|
482
|
+
"@prosekit/react": "0.0.13",
|
|
483
|
+
"@prosekit/solid": "0.0.11",
|
|
484
|
+
"@prosekit/svelte": "0.0.11",
|
|
485
|
+
"@prosekit/vue": "0.0.13"
|
|
486
486
|
},
|
|
487
487
|
"peerDependencies": {
|
|
488
488
|
"preact": ">= 9.0.0",
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/* ../basic/src/internal/example.css */
|
|
2
|
-
.example-editor {
|
|
3
|
-
font-family:
|
|
4
|
-
ui-sans-serif,
|
|
5
|
-
system-ui,
|
|
6
|
-
-apple-system,
|
|
7
|
-
BlinkMacSystemFont,
|
|
8
|
-
"Segoe UI",
|
|
9
|
-
Roboto,
|
|
10
|
-
"Helvetica Neue",
|
|
11
|
-
Arial,
|
|
12
|
-
"Noto Sans",
|
|
13
|
-
sans-serif,
|
|
14
|
-
"Apple Color Emoji",
|
|
15
|
-
"Segoe UI Emoji",
|
|
16
|
-
"Segoe UI Symbol",
|
|
17
|
-
"Noto Color Emoji";
|
|
18
|
-
}
|
|
19
|
-
.example-editor p:first-of-type {
|
|
20
|
-
margin-top: 0;
|
|
21
|
-
}
|
|
22
|
-
.example-editor p:last-of-type {
|
|
23
|
-
margin-bottom: 0;
|
|
24
|
-
}
|
|
25
|
-
.example-editor h1,
|
|
26
|
-
.example-editor h2,
|
|
27
|
-
.example-editor h3,
|
|
28
|
-
.example-editor h4,
|
|
29
|
-
.example-editor h5,
|
|
30
|
-
.example-editor h6 {
|
|
31
|
-
font-weight: 600;
|
|
32
|
-
line-height: 1.25;
|
|
33
|
-
}
|
|
34
|
-
.example-editor a {
|
|
35
|
-
text-decoration: underline;
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
}
|
|
38
|
-
.example-editor p,
|
|
39
|
-
.example-editor ul,
|
|
40
|
-
.example-editor ol,
|
|
41
|
-
.example-editor pre {
|
|
42
|
-
margin: 1em 0;
|
|
43
|
-
line-height: 1.5;
|
|
44
|
-
}
|
|
45
|
-
.example-editor blockquote {
|
|
46
|
-
margin: 1em 0;
|
|
47
|
-
padding-left: 1em;
|
|
48
|
-
font-style: italic;
|
|
49
|
-
}
|
|
50
|
-
.example-editor h1 {
|
|
51
|
-
margin: 1rem 0;
|
|
52
|
-
font-size: 2.25em;
|
|
53
|
-
}
|
|
54
|
-
.example-editor h2 {
|
|
55
|
-
margin: 1.75em 0 0.5em;
|
|
56
|
-
font-size: 1.75em;
|
|
57
|
-
}
|
|
58
|
-
.example-editor h3 {
|
|
59
|
-
margin: 1.5em 0 0.5em;
|
|
60
|
-
font-size: 1.375em;
|
|
61
|
-
}
|
|
62
|
-
.example-editor h4 {
|
|
63
|
-
margin: 1em 0;
|
|
64
|
-
font-size: 1.125em;
|
|
65
|
-
}
|
|
66
|
-
.example-editor img,
|
|
67
|
-
.example-editor video {
|
|
68
|
-
max-width: 100%;
|
|
69
|
-
}
|
|
70
|
-
.example-editor code {
|
|
71
|
-
font-size: 0.875em;
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
}
|
|
74
|
-
.example-editor pre {
|
|
75
|
-
padding: 2rem 2rem;
|
|
76
|
-
overflow-x: auto;
|
|
77
|
-
border-radius: 0.375rem;
|
|
78
|
-
}
|
|
79
|
-
.example-editor pre,
|
|
80
|
-
.example-editor code {
|
|
81
|
-
white-space: pre;
|
|
82
|
-
word-spacing: normal;
|
|
83
|
-
word-break: normal;
|
|
84
|
-
word-wrap: normal;
|
|
85
|
-
-moz-tab-size: 4;
|
|
86
|
-
-o-tab-size: 4;
|
|
87
|
-
tab-size: 4;
|
|
88
|
-
-webkit-hyphens: none;
|
|
89
|
-
-moz-hyphens: none;
|
|
90
|
-
hyphens: none;
|
|
91
|
-
}
|
|
92
|
-
.example-editor pre code {
|
|
93
|
-
font-weight: inherit;
|
|
94
|
-
}
|
|
95
|
-
.example-editor hr {
|
|
96
|
-
margin: 2em 0;
|
|
97
|
-
}
|
|
98
|
-
.example-editor span[data-mention=user] {
|
|
99
|
-
border-radius: 0.5rem;
|
|
100
|
-
padding: 0.125rem;
|
|
101
|
-
color: rgb(59 130 246);
|
|
102
|
-
}
|
|
103
|
-
.example-editor span[data-mention=user]::before {
|
|
104
|
-
content: "@";
|
|
105
|
-
}
|
|
106
|
-
.example-editor span[data-mention=tag] {
|
|
107
|
-
border-radius: 0.5rem;
|
|
108
|
-
background-color: rgb(229 231 235);
|
|
109
|
-
padding-left: 0.25rem;
|
|
110
|
-
padding-right: 0.25rem;
|
|
111
|
-
padding-top: 0.125rem;
|
|
112
|
-
padding-bottom: 0.125rem;
|
|
113
|
-
}
|
|
114
|
-
@media (prefers-color-scheme: dark) {
|
|
115
|
-
.example-editor span[data-mention=tag] {
|
|
116
|
-
background-color: rgb(75 85 99);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
.example-editor span[data-mention=tag]::before {
|
|
120
|
-
content: "#";
|
|
121
|
-
padding-right: 0.125rem;
|
|
122
|
-
opacity: 0.4;
|
|
123
|
-
}
|
|
124
|
-
@media (prefers-color-scheme: dark) {
|
|
125
|
-
.example-editor span[data-mention=tag]::before {
|
|
126
|
-
opacity: 0.5;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* src/basic/internal/example.css */
|