@prosekit/svelte 0.9.1 → 0.9.3
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/build/components/prosekit/index.d.ts +0 -2
- package/dist/build/components/prosekit/index.d.ts.map +1 -1
- package/dist/build/components/prosekit/index.js +0 -2
- package/dist/build/extensions/svelte-mark-view.d.ts +0 -10
- package/dist/build/extensions/svelte-mark-view.d.ts.map +1 -1
- package/dist/build/extensions/svelte-mark-view.js +0 -2
- package/dist/build/extensions/svelte-node-view.d.ts +0 -10
- package/dist/build/extensions/svelte-node-view.d.ts.map +1 -1
- package/dist/build/extensions/svelte-node-view.js +0 -2
- package/dist/build/hooks/use-doc-change.d.ts +0 -2
- package/dist/build/hooks/use-doc-change.d.ts.map +1 -1
- package/dist/build/hooks/use-doc-change.js +0 -2
- package/dist/build/hooks/use-editor-derived-value.d.ts +0 -2
- package/dist/build/hooks/use-editor-derived-value.d.ts.map +1 -1
- package/dist/build/hooks/use-editor-derived-value.js +0 -2
- package/dist/build/hooks/use-editor.d.ts +0 -2
- package/dist/build/hooks/use-editor.d.ts.map +1 -1
- package/dist/build/hooks/use-editor.js +0 -2
- package/dist/build/hooks/use-state-update.d.ts +0 -2
- package/dist/build/hooks/use-state-update.d.ts.map +1 -1
- package/dist/build/hooks/use-state-update.js +0 -2
- package/package.json +7 -7
- package/src/components/prosekit/index.ts +0 -2
- package/src/extensions/svelte-mark-view.ts +0 -10
- package/src/extensions/svelte-node-view.ts +0 -10
- package/src/hooks/use-doc-change.ts +0 -2
- package/src/hooks/use-editor-derived-value.ts +0 -2
- package/src/hooks/use-editor.ts +0 -2
- package/src/hooks/use-state-update.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/prosekit/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAIhD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/prosekit/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAIhD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAW,SAAS,CAAC,aAAa,CAAC,CAAA"}
|
|
@@ -2,19 +2,11 @@ import { type Extension } from '@prosekit/core';
|
|
|
2
2
|
import type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core';
|
|
3
3
|
import { type MarkViewContext, type SvelteRendererResult } from '@prosemirror-adapter/svelte';
|
|
4
4
|
import { type Component } from 'svelte';
|
|
5
|
-
/**
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
5
|
export interface SvelteMarkViewProps extends MarkViewContext {
|
|
9
6
|
}
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
7
|
export type SvelteMarkViewComponent = Component<SvelteMarkViewProps>;
|
|
14
8
|
/**
|
|
15
9
|
* Options for {@link defineSvelteMarkView}.
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
10
|
*/
|
|
19
11
|
export interface SvelteMarkViewOptions extends CoreMarkViewUserOptions<SvelteMarkViewComponent> {
|
|
20
12
|
/**
|
|
@@ -28,8 +20,6 @@ export interface SvelteMarkViewOptions extends CoreMarkViewUserOptions<SvelteMar
|
|
|
28
20
|
export declare function defineSvelteMarkViewFactory(renderSvelteRenderer: SvelteRendererResult['renderSvelteRenderer'], removeSvelteRenderer: SvelteRendererResult['removeSvelteRenderer'], context: Map<any, any>): Extension;
|
|
29
21
|
/**
|
|
30
22
|
* Defines a mark view using a Svelte component.
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
23
|
*/
|
|
34
24
|
export declare function defineSvelteMarkView(options: SvelteMarkViewOptions): Extension;
|
|
35
25
|
//# sourceMappingURL=svelte-mark-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte-mark-view.d.ts","sourceRoot":"","sources":["../../../src/extensions/svelte-mark-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"svelte-mark-view.d.ts","sourceRoot":"","sources":["../../../src/extensions/svelte-mark-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElE,MAAM,WAAW,mBAAoB,SAAQ,eAAe;CAAG;AAE/D,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB,CAAC,uBAAuB,CAAC;IAC7F;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAkBD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,EAClE,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,EAClE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GACrB,SAAS,CAMX;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,CAWX"}
|
|
@@ -30,8 +30,6 @@ export function defineSvelteMarkViewFactory(renderSvelteRenderer, removeSvelteRe
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Defines a mark view using a Svelte component.
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
33
|
*/
|
|
36
34
|
export function defineSvelteMarkView(options) {
|
|
37
35
|
// Don't register mark views on the server
|
|
@@ -2,19 +2,11 @@ import { type Extension } from '@prosekit/core';
|
|
|
2
2
|
import type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core';
|
|
3
3
|
import { type NodeViewContext, type SvelteRendererResult } from '@prosemirror-adapter/svelte';
|
|
4
4
|
import { type Component } from 'svelte';
|
|
5
|
-
/**
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
5
|
export interface SvelteNodeViewProps extends NodeViewContext {
|
|
9
6
|
}
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
7
|
export type SvelteNodeViewComponent = Component<SvelteNodeViewProps>;
|
|
14
8
|
/**
|
|
15
9
|
* Options for {@link defineSvelteNodeView}.
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
10
|
*/
|
|
19
11
|
export interface SvelteNodeViewOptions extends CoreNodeViewUserOptions<SvelteNodeViewComponent> {
|
|
20
12
|
/**
|
|
@@ -28,8 +20,6 @@ export interface SvelteNodeViewOptions extends CoreNodeViewUserOptions<SvelteNod
|
|
|
28
20
|
export declare function defineSvelteNodeViewFactory(renderSvelteRenderer: SvelteRendererResult['renderSvelteRenderer'], removeSvelteRenderer: SvelteRendererResult['removeSvelteRenderer'], context: Map<any, any>): Extension;
|
|
29
21
|
/**
|
|
30
22
|
* Defines a node view using a Svelte component.
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
23
|
*/
|
|
34
24
|
export declare function defineSvelteNodeView(options: SvelteNodeViewOptions): Extension;
|
|
35
25
|
//# sourceMappingURL=svelte-node-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte-node-view.d.ts","sourceRoot":"","sources":["../../../src/extensions/svelte-node-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"svelte-node-view.d.ts","sourceRoot":"","sources":["../../../src/extensions/svelte-node-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElE,MAAM,WAAW,mBAAoB,SAAQ,eAAe;CAAG;AAE/D,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB,CAAC,uBAAuB,CAAC;IAC7F;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAkBD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,EAClE,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,EAClE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GACrB,SAAS,CAMX;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,SAAS,CAWX"}
|
|
@@ -30,8 +30,6 @@ export function defineSvelteNodeViewFactory(renderSvelteRenderer, removeSvelteRe
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Defines a node view using a Svelte component.
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
33
|
*/
|
|
36
34
|
export function defineSvelteNodeView(options) {
|
|
37
35
|
// Don't register node views on the server
|
|
@@ -2,8 +2,6 @@ import type { ProseMirrorNode } from '@prosekit/pm/model';
|
|
|
2
2
|
import { type UseExtensionOptions } from './use-extension.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Calls the given handler whenever the editor document changes.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
5
|
*/
|
|
8
6
|
export declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
|
|
9
7
|
//# sourceMappingURL=use-doc-change.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-doc-change.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-doc-change.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGzD,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE3E
|
|
1
|
+
{"version":3,"file":"use-doc-change.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-doc-change.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGzD,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE3E;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,EACvC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,IAAI,CAGN"}
|
|
@@ -3,8 +3,6 @@ import { readable } from 'svelte/store';
|
|
|
3
3
|
import { useExtension } from "./use-extension.js";
|
|
4
4
|
/**
|
|
5
5
|
* Calls the given handler whenever the editor document changes.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
6
|
*/
|
|
9
7
|
export function useDocChange(handler, options) {
|
|
10
8
|
const extension = defineDocChangeHandler((view) => handler(view.state.doc));
|
|
@@ -16,8 +16,6 @@ export interface UseEditorDerivedOptions<E extends Extension = any> {
|
|
|
16
16
|
*
|
|
17
17
|
* It returns a Svelte store that stores the derived value and updates whenever
|
|
18
18
|
* the editor state changes.
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
19
|
*/
|
|
22
20
|
export declare function useEditorDerivedValue<E extends Extension, Derived>(
|
|
23
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-editor-derived-value.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-editor-derived-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAI/D,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG;IAChE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"use-editor-derived-value.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-editor-derived-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAI/D,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG;IAChE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO;AAChE;;;;;GAKG;AACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,EACtC,OAAO,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACnC,QAAQ,CAAC,OAAO,CAAC,CAOnB"}
|
|
@@ -2,8 +2,6 @@ import { type Editor, type Extension } from '@prosekit/core';
|
|
|
2
2
|
import { type Readable } from 'svelte/store';
|
|
3
3
|
/**
|
|
4
4
|
* Retrieves the editor instance from the nearest ProseKit component.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
5
|
*/
|
|
8
6
|
export declare function useEditor<E extends Extension = any>(options?: {
|
|
9
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-editor.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE3H,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIhE
|
|
1
|
+
{"version":3,"file":"use-editor.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE3H,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIhE;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE;IAC7D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CA8BtB"}
|
|
@@ -4,8 +4,6 @@ import { readonly, writable } from 'svelte/store';
|
|
|
4
4
|
import { useEditorContext } from "../contexts/editor-context.js";
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves the editor instance from the nearest ProseKit component.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
7
|
*/
|
|
10
8
|
export function useEditor(options) {
|
|
11
9
|
const update = options?.update ?? false;
|
|
@@ -2,8 +2,6 @@ import type { EditorState } from '@prosekit/pm/state';
|
|
|
2
2
|
import { type UseExtensionOptions } from './use-extension.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Calls the given handler whenever the editor state changes.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
5
|
*/
|
|
8
6
|
export declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
|
|
9
7
|
//# sourceMappingURL=use-state-update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-state-update.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-state-update.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE3E
|
|
1
|
+
{"version":3,"file":"use-state-update.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-state-update.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE3E;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EACrC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,IAAI,CAGN"}
|
|
@@ -3,8 +3,6 @@ import { readable } from 'svelte/store';
|
|
|
3
3
|
import { useExtension } from "./use-extension.js";
|
|
4
4
|
/**
|
|
5
5
|
* Calls the given handler whenever the editor state changes.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
6
|
*/
|
|
9
7
|
export function useStateUpdate(handler, options) {
|
|
10
8
|
const extension = defineUpdateHandler((view) => handler(view.state));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/svelte",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Svelte components and utilities for ProseKit",
|
|
7
7
|
"author": {
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@prosemirror-adapter/core": "^0.5.3",
|
|
85
85
|
"@prosemirror-adapter/svelte": "^0.5.3",
|
|
86
|
-
"@prosekit/core": "^0.12.
|
|
87
|
-
"@prosekit/
|
|
88
|
-
"@prosekit/
|
|
86
|
+
"@prosekit/core": "^0.12.2",
|
|
87
|
+
"@prosekit/web": "^0.8.3",
|
|
88
|
+
"@prosekit/pm": "^0.1.17"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"svelte": ">= 5.0.0"
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
"svelte-check": "^4.4.8",
|
|
104
104
|
"tsx": "^4.21.0",
|
|
105
105
|
"typescript": "~6.0.3",
|
|
106
|
-
"vitest": "^4.1.
|
|
106
|
+
"vitest": "^4.1.6",
|
|
107
107
|
"vitest-browser-svelte": "^2.1.1",
|
|
108
108
|
"@prosekit/config-ts": "0.0.0",
|
|
109
|
-
"@prosekit/
|
|
110
|
-
"@prosekit/
|
|
109
|
+
"@prosekit/testing": "0.0.0",
|
|
110
|
+
"@prosekit/config-vitest": "0.0.0"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
113
|
"build": "pnpm run build:tsc && pnpm run build:svelte && pnpm run build:export",
|
|
@@ -8,20 +8,12 @@ import {
|
|
|
8
8
|
} from '@prosemirror-adapter/svelte'
|
|
9
9
|
import { flushSync, mount, unmount, type Component } from 'svelte'
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
11
|
export interface SvelteMarkViewProps extends MarkViewContext {}
|
|
15
12
|
|
|
16
|
-
/**
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
13
|
export type SvelteMarkViewComponent = Component<SvelteMarkViewProps>
|
|
20
14
|
|
|
21
15
|
/**
|
|
22
16
|
* Options for {@link defineSvelteMarkView}.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
17
|
*/
|
|
26
18
|
export interface SvelteMarkViewOptions extends CoreMarkViewUserOptions<SvelteMarkViewComponent> {
|
|
27
19
|
/**
|
|
@@ -63,8 +55,6 @@ export function defineSvelteMarkViewFactory(
|
|
|
63
55
|
|
|
64
56
|
/**
|
|
65
57
|
* Defines a mark view using a Svelte component.
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
58
|
*/
|
|
69
59
|
export function defineSvelteMarkView(
|
|
70
60
|
options: SvelteMarkViewOptions,
|
|
@@ -8,20 +8,12 @@ import {
|
|
|
8
8
|
} from '@prosemirror-adapter/svelte'
|
|
9
9
|
import { flushSync, mount, unmount, type Component } from 'svelte'
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
11
|
export interface SvelteNodeViewProps extends NodeViewContext {}
|
|
15
12
|
|
|
16
|
-
/**
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
13
|
export type SvelteNodeViewComponent = Component<SvelteNodeViewProps>
|
|
20
14
|
|
|
21
15
|
/**
|
|
22
16
|
* Options for {@link defineSvelteNodeView}.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
17
|
*/
|
|
26
18
|
export interface SvelteNodeViewOptions extends CoreNodeViewUserOptions<SvelteNodeViewComponent> {
|
|
27
19
|
/**
|
|
@@ -63,8 +55,6 @@ export function defineSvelteNodeViewFactory(
|
|
|
63
55
|
|
|
64
56
|
/**
|
|
65
57
|
* Defines a node view using a Svelte component.
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
58
|
*/
|
|
69
59
|
export function defineSvelteNodeView(
|
|
70
60
|
options: SvelteNodeViewOptions,
|
|
@@ -20,8 +20,6 @@ export interface UseEditorDerivedOptions<E extends Extension = any> {
|
|
|
20
20
|
*
|
|
21
21
|
* It returns a Svelte store that stores the derived value and updates whenever
|
|
22
22
|
* the editor state changes.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
23
|
*/
|
|
26
24
|
export function useEditorDerivedValue<E extends Extension, Derived>(
|
|
27
25
|
/**
|
package/src/hooks/use-editor.ts
CHANGED