@milkdown/crepe 7.15.4 → 7.16.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/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/cursor/index.js +1 -1
- package/lib/cjs/feature/cursor/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/cursor/index.js +2 -2
- package/lib/esm/feature/cursor/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/block-edit/handle/component.d.ts +2 -1
- package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -1
- package/lib/types/feature/block-edit/handle/index.d.ts +0 -8
- package/lib/types/feature/block-edit/handle/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/index.d.ts +2 -1
- package/lib/types/feature/block-edit/menu/index.d.ts.map +1 -1
- package/lib/types/feature/toolbar/config.d.ts +5 -1
- package/lib/types/feature/toolbar/config.d.ts.map +1 -1
- package/lib/types/utils/group-builder.d.ts +1 -1
- package/lib/types/utils/group-builder.d.ts.map +1 -1
- package/package.json +3 -6
- package/src/feature/block-edit/handle/component.tsx +1 -1
- package/src/feature/block-edit/handle/index.ts +1 -1
- package/src/feature/block-edit/menu/index.ts +1 -1
- package/src/feature/cursor/index.ts +2 -2
- package/src/utils/group-builder.ts +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface BlockHandleProps {
|
|
2
2
|
onAdd: () => void;
|
|
3
3
|
addIcon: string;
|
|
4
4
|
handleIcon: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const BlockHandle: import("vue").DefineComponent<BlockHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export {};
|
|
7
8
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/component.tsx"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/component.tsx"],"names":[],"mappings":"AAMA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,4SA6CtB,CAAA"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
-
import type { PluginView } from '@milkdown/kit/prose/state';
|
|
3
2
|
import type { BlockEditFeatureConfig } from '../index';
|
|
4
|
-
export declare class BlockHandleView implements PluginView {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(ctx: Ctx, config?: BlockEditFeatureConfig);
|
|
7
|
-
update: () => void;
|
|
8
|
-
destroy: () => void;
|
|
9
|
-
onAdd: () => void;
|
|
10
|
-
}
|
|
11
3
|
export declare function configureBlockHandle(ctx: Ctx, config?: BlockEditFeatureConfig): void;
|
|
12
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAe5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAmFtD,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,MAAM,CAAC,EAAE,sBAAsB,QAehC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
2
|
import type { BlockEditFeatureConfig } from '../index';
|
|
3
3
|
export declare const menu: import("@milkdown/plugin-slash").SlashPlugin<"CREPE_MENU", any>;
|
|
4
|
-
|
|
4
|
+
interface MenuAPI {
|
|
5
5
|
show: (pos: number) => void;
|
|
6
6
|
hide: () => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const menuAPI: import("@milkdown/utils").$Ctx<MenuAPI, "menuAPICtx">;
|
|
9
9
|
export declare function configureMenu(ctx: Ctx, config?: BlockEditFeatureConfig): void;
|
|
10
|
+
export {};
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAY5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAKtD,eAAO,MAAM,IAAI,iEAA6B,CAAA;AAE9C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAY5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAKtD,eAAO,MAAM,IAAI,iEAA6B,CAAA;AAE9C,UAAU,OAAO;IACf,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3B,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED,eAAO,MAAM,OAAO,uDAMnB,CAAA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,sBAAsB,QAItE"}
|
|
@@ -7,6 +7,10 @@ export type ToolbarItem = {
|
|
|
7
7
|
export declare function getGroups(config?: ToolbarFeatureConfig, ctx?: Ctx): {
|
|
8
8
|
key: string;
|
|
9
9
|
label: string;
|
|
10
|
-
items: Omit<
|
|
10
|
+
items: Omit<{
|
|
11
|
+
index: number;
|
|
12
|
+
key: string;
|
|
13
|
+
onRun: (ctx: Ctx) => void;
|
|
14
|
+
} & ToolbarItem, "index">[];
|
|
11
15
|
}[];
|
|
12
16
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAoB5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AAgB7C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,CAAC,EAAE,GAAG
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAoB5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AAgB7C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,CAAC,EAAE,GAAG;;;;;;;;IA8FjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/group-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,
|
|
1
|
+
{"version":3,"file":"group-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/group-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;CAC1B,GAAG,CAAC,CAAA;AAEL,KAAK,SAAS,CAAC,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,IAAI,QAAQ,SAAS,IAAI,GAC3E,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;CAAE,GAC3C,CAAC,CAAA;AAEL,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,IAAI,SAAS,CAC5E;IACE,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAA;CAC5E,EACD,QAAQ,CACT,CAAA;AAED,qBAAa,YAAY,CAAC,CAAC;;IAGzB,KAAK,aAGJ;IAkBD,QAAQ,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM;;iBA/B/B,MAAM;mBACJ,MAAM;;;uBAiBI,MAAM,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;;MAuBlE;IAED,QAAQ,GAAI,KAAK,MAAM;;iBA3ChB,MAAM;mBACJ,MAAM;;;uBAiBI,MAAM,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;;MA8BlE;IAED,KAAK;aAlDE,MAAM;eACJ,MAAM;;QAmDd;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/crepe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.16.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
"src"
|
|
91
91
|
],
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@floating-ui/dom": "^1.5.1",
|
|
94
93
|
"@codemirror/commands": "^6.2.4",
|
|
95
94
|
"@codemirror/language": "^6.10.1",
|
|
96
95
|
"@codemirror/language-data": "^6.3.1",
|
|
@@ -102,13 +101,11 @@
|
|
|
102
101
|
"codemirror": "^6.0.1",
|
|
103
102
|
"katex": "^0.16.0",
|
|
104
103
|
"lodash-es": "^4.17.21",
|
|
105
|
-
"nanoid": "^5.0.9",
|
|
106
104
|
"prosemirror-virtual-cursor": "^0.4.2",
|
|
107
105
|
"remark-math": "^6.0.0",
|
|
108
|
-
"tslib": "^2.8.1",
|
|
109
106
|
"unist-util-visit": "^5.0.0",
|
|
110
|
-
"vue": "^3.5.
|
|
111
|
-
"@milkdown/kit": "7.
|
|
107
|
+
"vue": "^3.5.20",
|
|
108
|
+
"@milkdown/kit": "7.16.0"
|
|
112
109
|
},
|
|
113
110
|
"scripts": {
|
|
114
111
|
"build": "pnpm run build:es && pnpm run build:theme && echo",
|
|
@@ -19,7 +19,7 @@ import { menuIcon, plusIcon } from '../../../icons'
|
|
|
19
19
|
import { menuAPI } from '../menu'
|
|
20
20
|
import { BlockHandle } from './component'
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
class BlockHandleView implements PluginView {
|
|
23
23
|
#content: HTMLElement
|
|
24
24
|
#provider: BlockProvider
|
|
25
25
|
#app: App
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursor as cursorPlugin,
|
|
3
|
-
|
|
3
|
+
dropIndicatorConfig,
|
|
4
4
|
} from '@milkdown/kit/plugin/cursor'
|
|
5
5
|
import { $prose } from '@milkdown/kit/utils'
|
|
6
6
|
import { createVirtualCursor } from 'prosemirror-virtual-cursor'
|
|
@@ -21,7 +21,7 @@ export const cursor: DefineFeature<CursorFeatureConfig> = (editor, config) => {
|
|
|
21
21
|
editor
|
|
22
22
|
.config(crepeFeatureConfig(CrepeFeature.Cursor))
|
|
23
23
|
.config((ctx) => {
|
|
24
|
-
ctx.update(
|
|
24
|
+
ctx.update(dropIndicatorConfig.key, () => ({
|
|
25
25
|
class: 'crepe-drop-cursor',
|
|
26
26
|
width: config?.width ?? 4,
|
|
27
27
|
color: config?.color ?? false,
|