@prosekit/core 0.1.9 → 0.2.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 +0 -8
- package/dist/prosekit-core.js +3 -13
- package/package.json +2 -5
- package/dist/style.css +0 -55
@@ -407,14 +407,6 @@ declare class Editor<E extends Extension = any> {
|
|
407
407
|
mount(place: HTMLElement | null | undefined | void): void;
|
408
408
|
unmount(): void;
|
409
409
|
use(extension: Extension): VoidFunction;
|
410
|
-
/**
|
411
|
-
* @deprecated
|
412
|
-
*/
|
413
|
-
isNodeActive(nodeType: string | NodeType, attrs?: Attrs): boolean;
|
414
|
-
/**
|
415
|
-
* @deprecated
|
416
|
-
*/
|
417
|
-
isMarkActive(markType: string | MarkType, attrs?: Attrs): boolean;
|
418
410
|
get nodes(): Record<ExtractNodes<E>, NodeBuilder>;
|
419
411
|
get marks(): Record<ExtractMarks<E>, MarkBuilder>;
|
420
412
|
}
|
package/dist/prosekit-core.js
CHANGED
@@ -663,6 +663,9 @@ function updateExtension(prevInputs, prevConverters, extension, mode) {
|
|
663
663
|
return { schemaInput, stateInput, viewInput, commandInput };
|
664
664
|
}
|
665
665
|
|
666
|
+
// src/editor/builder.ts
|
667
|
+
import "@prosekit/pm/model";
|
668
|
+
|
666
669
|
// src/utils/type-assertion.ts
|
667
670
|
import { Mark, ProseMirrorNode } from "@prosekit/pm/model";
|
668
671
|
import {
|
@@ -709,7 +712,6 @@ function hasMark(marks, mark) {
|
|
709
712
|
}
|
710
713
|
|
711
714
|
// src/editor/builder.ts
|
712
|
-
import "@prosekit/pm/model";
|
713
715
|
function createNodeBuilder(getState, type) {
|
714
716
|
const builder = (...args) => buildNode(type, args);
|
715
717
|
builder.isActive = (attrs) => {
|
@@ -1022,18 +1024,6 @@ var Editor = class _Editor {
|
|
1022
1024
|
this.instance.updateExtension(extension, "add");
|
1023
1025
|
return () => this.instance.updateExtension(extension, "remove");
|
1024
1026
|
}
|
1025
|
-
/**
|
1026
|
-
* @deprecated
|
1027
|
-
*/
|
1028
|
-
isNodeActive(nodeType, attrs) {
|
1029
|
-
return isNodeActive(this.view.state, nodeType, attrs);
|
1030
|
-
}
|
1031
|
-
/**
|
1032
|
-
* @deprecated
|
1033
|
-
*/
|
1034
|
-
isMarkActive(markType, attrs) {
|
1035
|
-
return isMarkActive(this.view.state, markType, attrs);
|
1036
|
-
}
|
1037
1027
|
get nodes() {
|
1038
1028
|
return this.instance.nodeBuilders;
|
1039
1029
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.2.0",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -29,9 +29,6 @@
|
|
29
29
|
"types": "./dist/prosekit-core.d.ts",
|
30
30
|
"import": "./dist/prosekit-core.js",
|
31
31
|
"default": "./dist/prosekit-core.js"
|
32
|
-
},
|
33
|
-
"./style.css": {
|
34
|
-
"default": "./dist/style.css"
|
35
32
|
}
|
36
33
|
},
|
37
34
|
"files": [
|
@@ -46,7 +43,7 @@
|
|
46
43
|
"@prosekit/dev": "*",
|
47
44
|
"tsup": "^8.0.1",
|
48
45
|
"typescript": "^5.3.3",
|
49
|
-
"vitest": "^1.0
|
46
|
+
"vitest": "^1.1.0"
|
50
47
|
},
|
51
48
|
"scripts": {
|
52
49
|
"build:tsup": "tsup",
|
package/dist/style.css
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
/* ../../node_modules/.pnpm/prosemirror-view@1.32.6/node_modules/prosemirror-view/style/prosemirror.css */
|
2
|
-
.ProseMirror {
|
3
|
-
position: relative;
|
4
|
-
}
|
5
|
-
.ProseMirror {
|
6
|
-
word-wrap: break-word;
|
7
|
-
white-space: pre-wrap;
|
8
|
-
white-space: break-spaces;
|
9
|
-
-webkit-font-variant-ligatures: none;
|
10
|
-
font-variant-ligatures: none;
|
11
|
-
font-feature-settings: "liga" 0;
|
12
|
-
}
|
13
|
-
.ProseMirror pre {
|
14
|
-
white-space: pre-wrap;
|
15
|
-
}
|
16
|
-
.ProseMirror li {
|
17
|
-
position: relative;
|
18
|
-
}
|
19
|
-
.ProseMirror-hideselection *::selection {
|
20
|
-
background: transparent;
|
21
|
-
}
|
22
|
-
.ProseMirror-hideselection *::-moz-selection {
|
23
|
-
background: transparent;
|
24
|
-
}
|
25
|
-
.ProseMirror-hideselection {
|
26
|
-
caret-color: transparent;
|
27
|
-
}
|
28
|
-
.ProseMirror [draggable][contenteditable=false] {
|
29
|
-
user-select: text;
|
30
|
-
}
|
31
|
-
.ProseMirror-selectednode {
|
32
|
-
outline: 2px solid #8cf;
|
33
|
-
}
|
34
|
-
li.ProseMirror-selectednode {
|
35
|
-
outline: none;
|
36
|
-
}
|
37
|
-
li.ProseMirror-selectednode:after {
|
38
|
-
content: "";
|
39
|
-
position: absolute;
|
40
|
-
left: -32px;
|
41
|
-
right: -2px;
|
42
|
-
top: -2px;
|
43
|
-
bottom: -2px;
|
44
|
-
border: 2px solid #8cf;
|
45
|
-
pointer-events: none;
|
46
|
-
}
|
47
|
-
img.ProseMirror-separator {
|
48
|
-
display: inline !important;
|
49
|
-
border: none !important;
|
50
|
-
margin: 0 !important;
|
51
|
-
}
|
52
|
-
|
53
|
-
/* ../pm/src/view/style/prosemirror.css */
|
54
|
-
|
55
|
-
/* src/style.css */
|