@prosekit/basic 0.0.8 → 0.0.10
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 +43 -0
- package/dist/internal/example.css +29 -80
- package/dist/prosekit-basic.d.ts +2 -34
- package/dist/style.css +1 -1
- package/package.json +6 -6
@@ -0,0 +1,43 @@
|
|
1
|
+
import { Attrs } from 'prosemirror-model';
|
2
|
+
import { Extension } from '@prosekit/core';
|
3
|
+
import { Node as Node_2 } from 'prosemirror-model';
|
4
|
+
import { NodeType } from 'prosemirror-model';
|
5
|
+
import { Options } from 'tsup';
|
6
|
+
import { UserProjectConfigExport } from 'vitest/dist/config.js';
|
7
|
+
|
8
|
+
/** @public */
|
9
|
+
export declare function addBasicExtension(): Extension< {
|
10
|
+
NODES: "text" | "doc" | "paragraph" | "heading" | "list";
|
11
|
+
MARKS: "italic";
|
12
|
+
COMMAND_ARGS: {
|
13
|
+
toggleItalic: [];
|
14
|
+
insertText: [{
|
15
|
+
text: string;
|
16
|
+
from?: number | undefined;
|
17
|
+
to?: number | undefined;
|
18
|
+
}];
|
19
|
+
insertNode: [{
|
20
|
+
node: Node_2;
|
21
|
+
pos?: number | undefined;
|
22
|
+
}];
|
23
|
+
wrap: [{
|
24
|
+
nodeType: NodeType;
|
25
|
+
attrs?: Attrs | null | undefined;
|
26
|
+
}];
|
27
|
+
setBlockType: [{
|
28
|
+
nodeType: NodeType;
|
29
|
+
attrs?: Attrs | null | undefined;
|
30
|
+
from?: number | undefined;
|
31
|
+
to?: number | undefined;
|
32
|
+
}];
|
33
|
+
selectAll: [];
|
34
|
+
};
|
35
|
+
}>;
|
36
|
+
|
37
|
+
export declare type BasicExtension = ReturnType<typeof addBasicExtension>;
|
38
|
+
|
39
|
+
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
40
|
+
|
41
|
+
export declare const default_alias_1: UserProjectConfigExport;
|
42
|
+
|
43
|
+
export { }
|
@@ -1,4 +1,21 @@
|
|
1
|
-
/* src/internal/
|
1
|
+
/* 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
|
+
}
|
2
19
|
.example-editor p:first-of-type {
|
3
20
|
margin-top: 0;
|
4
21
|
}
|
@@ -55,7 +72,7 @@
|
|
55
72
|
font-weight: 600;
|
56
73
|
}
|
57
74
|
.example-editor pre {
|
58
|
-
padding:
|
75
|
+
padding: 2rem 2rem;
|
59
76
|
overflow-x: auto;
|
60
77
|
border-radius: 0.375rem;
|
61
78
|
}
|
@@ -71,7 +88,6 @@
|
|
71
88
|
-webkit-hyphens: none;
|
72
89
|
-moz-hyphens: none;
|
73
90
|
hyphens: none;
|
74
|
-
background: transparent;
|
75
91
|
}
|
76
92
|
.example-editor pre code {
|
77
93
|
font-weight: inherit;
|
@@ -79,101 +95,34 @@
|
|
79
95
|
.example-editor hr {
|
80
96
|
margin: 2em 0;
|
81
97
|
}
|
82
|
-
|
83
|
-
/* src/internal/component.css */
|
84
|
-
.example-slash-menu {
|
85
|
-
position: relative;
|
86
|
-
max-height: 400px;
|
87
|
-
min-width: 120px;
|
88
|
-
user-select: none;
|
89
|
-
overflow: auto;
|
90
|
-
white-space: nowrap;
|
91
|
-
border-radius: 0.25rem;
|
92
|
-
--tw-bg-opacity: 1;
|
93
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
94
|
-
}
|
95
|
-
:is(.dark .example-slash-menu) {
|
96
|
-
--tw-bg-opacity: 1;
|
97
|
-
background-color: rgb(39 39 42 / var(--tw-bg-opacity));
|
98
|
-
}
|
99
|
-
.example-slash-menu {
|
100
|
-
border-width: 1px;
|
101
|
-
border-style: solid;
|
102
|
-
--tw-border-opacity: 1;
|
103
|
-
border-color: rgb(107 114 128 / var(--tw-border-opacity));
|
104
|
-
}
|
105
|
-
.example-slash-menu-item {
|
106
|
-
position: relative;
|
107
|
-
min-width: 64px;
|
108
|
-
cursor: pointer;
|
109
|
-
user-select: none;
|
110
|
-
white-space: nowrap;
|
111
|
-
padding: 0.5rem;
|
112
|
-
}
|
113
|
-
.example-slash-menu-item[data-selected] {
|
114
|
-
--tw-bg-opacity: 1;
|
115
|
-
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
116
|
-
}
|
117
|
-
:is(.dark .example-slash-menu-item[data-selected]) {
|
118
|
-
--tw-bg-opacity: 1;
|
119
|
-
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
120
|
-
}
|
121
|
-
|
122
|
-
/* src/internal/example.css */
|
123
|
-
.example-editor {
|
124
|
-
margin-top: 0.5rem;
|
125
|
-
margin-bottom: 0.5rem;
|
126
|
-
box-sizing: border-box;
|
127
|
-
height: 250px;
|
128
|
-
width: 100%;
|
129
|
-
overflow: auto;
|
130
|
-
border-radius: 0.375rem;
|
131
|
-
padding: 1rem;
|
132
|
-
outline-style: solid;
|
133
|
-
outline-width: 2px;
|
134
|
-
font-family:
|
135
|
-
ui-sans-serif,
|
136
|
-
system-ui,
|
137
|
-
-apple-system,
|
138
|
-
BlinkMacSystemFont,
|
139
|
-
"Segoe UI",
|
140
|
-
Roboto,
|
141
|
-
"Helvetica Neue",
|
142
|
-
Arial,
|
143
|
-
"Noto Sans",
|
144
|
-
sans-serif,
|
145
|
-
"Apple Color Emoji",
|
146
|
-
"Segoe UI Emoji",
|
147
|
-
"Segoe UI Symbol",
|
148
|
-
"Noto Color Emoji";
|
149
|
-
}
|
150
98
|
.example-editor span[data-mention=user] {
|
151
99
|
border-radius: 0.5rem;
|
152
100
|
padding: 0.125rem;
|
153
|
-
|
154
|
-
color: rgb(59 130 246 / var(--tw-text-opacity));
|
101
|
+
color: rgb(59 130 246);
|
155
102
|
}
|
156
103
|
.example-editor span[data-mention=user]::before {
|
157
104
|
content: "@";
|
158
105
|
}
|
159
106
|
.example-editor span[data-mention=tag] {
|
160
107
|
border-radius: 0.5rem;
|
161
|
-
|
162
|
-
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
108
|
+
background-color: rgb(229 231 235);
|
163
109
|
padding-left: 0.25rem;
|
164
110
|
padding-right: 0.25rem;
|
165
111
|
padding-top: 0.125rem;
|
166
112
|
padding-bottom: 0.125rem;
|
167
113
|
}
|
168
|
-
|
169
|
-
|
170
|
-
|
114
|
+
@media (prefers-color-scheme: dark) {
|
115
|
+
.example-editor span[data-mention=tag] {
|
116
|
+
background-color: rgb(75 85 99);
|
117
|
+
}
|
171
118
|
}
|
172
119
|
.example-editor span[data-mention=tag]::before {
|
173
120
|
content: "#";
|
174
121
|
padding-right: 0.125rem;
|
175
122
|
opacity: 0.4;
|
176
123
|
}
|
177
|
-
|
178
|
-
|
124
|
+
@media (prefers-color-scheme: dark) {
|
125
|
+
.example-editor span[data-mention=tag]::before {
|
126
|
+
opacity: 0.5;
|
127
|
+
}
|
179
128
|
}
|
package/dist/prosekit-basic.d.ts
CHANGED
@@ -1,34 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
/** @public */
|
5
|
-
declare function addBasicExtension(): _prosekit_core.Extension<{
|
6
|
-
NODES: "doc" | "text" | "heading" | "list" | "paragraph";
|
7
|
-
MARKS: "italic";
|
8
|
-
COMMAND_ARGS: {
|
9
|
-
toggleItalic: [];
|
10
|
-
insertText: [{
|
11
|
-
text: string;
|
12
|
-
from?: number | undefined;
|
13
|
-
to?: number | undefined;
|
14
|
-
}];
|
15
|
-
insertNode: [{
|
16
|
-
node: prosemirror_model.Node;
|
17
|
-
pos?: number | undefined;
|
18
|
-
}];
|
19
|
-
wrap: [{
|
20
|
-
nodeType: prosemirror_model.NodeType;
|
21
|
-
attrs?: prosemirror_model.Attrs | null | undefined;
|
22
|
-
}];
|
23
|
-
setBlockType: [{
|
24
|
-
nodeType: prosemirror_model.NodeType;
|
25
|
-
attrs?: prosemirror_model.Attrs | null | undefined;
|
26
|
-
from?: number | undefined;
|
27
|
-
to?: number | undefined;
|
28
|
-
}];
|
29
|
-
selectAll: [];
|
30
|
-
};
|
31
|
-
}>;
|
32
|
-
type BasicExtension = ReturnType<typeof addBasicExtension>;
|
33
|
-
|
34
|
-
export { BasicExtension, addBasicExtension };
|
1
|
+
export { addBasicExtension } from './_tsup-dts-rollup';
|
2
|
+
export { BasicExtension } from './_tsup-dts-rollup';
|
package/dist/style.css
CHANGED
@@ -127,7 +127,7 @@ img.ProseMirror-separator {
|
|
127
127
|
opacity: 40%;
|
128
128
|
pointer-events: none;
|
129
129
|
}
|
130
|
-
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n
|
130
|
+
.prosemirror-flat-list[data-list-kind=toggle][data-list-collapsable][data-list-collapsed] > .list-content > *:nth-child(n+2) {
|
131
131
|
display: none;
|
132
132
|
}
|
133
133
|
|
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.10",
|
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.0.
|
45
|
-
"@prosekit/extensions": "^0.0.
|
44
|
+
"@prosekit/core": "^0.0.8",
|
45
|
+
"@prosekit/extensions": "^0.0.9"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@prosekit/dev": "*",
|
49
|
-
"postcss": "^8.4.
|
49
|
+
"postcss": "^8.4.29",
|
50
50
|
"tailwindcss": "^3.3.3",
|
51
51
|
"tsup": "^7.2.0",
|
52
|
-
"typescript": "^5.
|
53
|
-
"vitest": "^0.34.
|
52
|
+
"typescript": "^5.2.2",
|
53
|
+
"vitest": "^0.34.3"
|
54
54
|
},
|
55
55
|
"scripts": {
|
56
56
|
"build:tsup": "tsup",
|