@prosekit/core
Advanced tools
Comparing version 0.0.0-next-20230627094841 to 0.0.0-next-20230709084129
@@ -283,4 +283,4 @@ // src/commands/toggle-mark.ts | ||
this.commandDispatchers = {}; | ||
this.mount.bind(this); | ||
this.unmount.bind(this); | ||
this.mount = this.mount.bind(this); | ||
this.unmount = this.unmount.bind(this); | ||
this.schema = directEditorProps.state.schema; | ||
@@ -295,3 +295,3 @@ } | ||
} | ||
this.view = new EditorView(place, this.directEditorProps); | ||
this.view = new EditorView({ mount: place }, this.directEditorProps); | ||
} | ||
@@ -342,2 +342,5 @@ unmount() { | ||
this.instance = instance; | ||
this.mount = this.mount.bind(this); | ||
this.unmount = this.unmount.bind(this); | ||
this.use = this.use.bind(this); | ||
} | ||
@@ -364,2 +367,5 @@ /** @internal */ | ||
mount(place) { | ||
if (!place) { | ||
return this.unmount(); | ||
} | ||
this.instance.mount(place); | ||
@@ -369,3 +375,5 @@ this.afterMounted.forEach((callback) => callback()); | ||
unmount() { | ||
this.instance.unmount(); | ||
if (this.mounted) { | ||
this.instance.unmount(); | ||
} | ||
} | ||
@@ -671,3 +679,3 @@ use(extension) { | ||
if (!nodeType) { | ||
throw new ProseKitError(`Cannot find node type "${type}"`); | ||
throw new ProseKitError(`Cannot find ProseMirror node type "${type}"`); | ||
} | ||
@@ -674,0 +682,0 @@ return nodeType; |
{ | ||
"name": "@prosekit/core", | ||
"type": "module", | ||
"version": "0.0.0-next-20230627094841", | ||
"version": "0.0.0-next-20230709084129", | ||
"private": false, | ||
@@ -41,3 +41,3 @@ "author": { | ||
"dependencies": { | ||
"@prosekit/pm": "0.0.0-next-20230627094841", | ||
"@prosekit/pm": "0.0.0-next-20230709084129", | ||
"orderedmap": "^2.1.1", | ||
@@ -47,6 +47,6 @@ "type-fest": "^3.12.0" | ||
"devDependencies": { | ||
"@prosekit/dev": "*", | ||
"tsup": "^7.1.0", | ||
"typescript": "^5.1.3", | ||
"vitest": "^0.32.2", | ||
"@prosekit/dev": "0.0.0" | ||
"typescript": "^5.1.6", | ||
"vitest": "^0.33.0" | ||
}, | ||
@@ -53,0 +53,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31592
7
1018
2
+ Added@prosekit/pm@0.0.0-next-20230709084129(transitive)
- Removed@prosekit/pm@0.0.0-next-20230627094841(transitive)