@jvs-milkdown/crepe 1.2.10 → 1.2.12
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 +1 -0
- package/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js +5 -1
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +91 -85
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/block-edit/index.js +1 -0
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +5 -1
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +152 -146
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/block-edit.css +2 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/attachment/view/components/attachment-block.d.ts +1 -1
- package/lib/types/feature/attachment/view/components/attachment-block.d.ts.map +1 -1
- package/lib/types/feature/block-edit/handle/component.d.ts +17 -1
- package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/component.d.ts +13 -1
- package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/component.d.ts +13 -1
- package/lib/types/feature/fixed-toolbar/component.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/document-header.d.ts +21 -1
- package/lib/types/feature/fixed-toolbar/document-header.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/menu-bar.d.ts +21 -1
- package/lib/types/feature/fixed-toolbar/menu-bar.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/outline-panel.d.ts +12 -1
- package/lib/types/feature/fixed-toolbar/outline-panel.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/shortcut-help-modal.d.ts +8 -1
- package/lib/types/feature/fixed-toolbar/shortcut-help-modal.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/view-menu-state.d.ts +20 -2
- package/lib/types/feature/fixed-toolbar/view-menu-state.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/component.d.ts +12 -1
- package/lib/types/feature/latex/inline-tooltip/component.d.ts.map +1 -1
- package/lib/types/feature/toolbar/component.d.ts +14 -1
- package/lib/types/feature/toolbar/component.d.ts.map +1 -1
- package/package.json +12 -5
- package/src/feature/attachment/view/components/attachment-block.tsx +1 -1
- package/src/feature/block-edit/menu/index.ts +1 -0
- package/src/feature/fixed-toolbar/component.tsx +1 -1
- package/src/feature/fixed-toolbar/document-header.tsx +5 -0
- package/src/feature/fixed-toolbar/menu-bar.tsx +1 -1
- package/src/feature/fixed-toolbar/outline-panel.tsx +1 -1
- package/src/feature/toolbar/component.tsx +5 -1
- package/src/theme/common/block-edit.css +2 -1
|
@@ -14,6 +14,6 @@ export type MilkdownAttachmentBlockProps = {
|
|
|
14
14
|
} & {
|
|
15
15
|
[P in keyof Attrs]: Ref<Attrs[P] | undefined>;
|
|
16
16
|
};
|
|
17
|
-
export declare const MilkdownAttachmentBlock: any
|
|
17
|
+
export declare const MilkdownAttachmentBlock: import("@vue/runtime-core").DefineComponent<MilkdownAttachmentBlockProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<MilkdownAttachmentBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=attachment-block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-block.d.ts","sourceRoot":"","sources":["../../../../../../src/feature/attachment/view/components/attachment-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"attachment-block.d.ts","sourceRoot":"","sources":["../../../../../../src/feature/attachment/view/components/attachment-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAAiD,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAQ3D,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,OAAO,EAAE,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IAClE,MAAM,EAAE,uBAAuB,CAAA;CAChC,GAAG;KACD,CAAC,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAC9C,CAAA;AAWD,eAAO,MAAM,uBAAuB,0YAkPhC,CAAA"}
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
interface BlockHandleProps {
|
|
3
|
+
onAdd: (el?: HTMLDivElement) => void;
|
|
4
|
+
onOpenMenu: (el?: HTMLDivElement) => void;
|
|
5
|
+
onHoverAdd: (el?: HTMLDivElement) => void;
|
|
6
|
+
onLeaveAdd: () => void;
|
|
7
|
+
onHoverMenu: (el?: HTMLDivElement) => void;
|
|
8
|
+
onLeaveMenu: () => void;
|
|
9
|
+
addIcon: string;
|
|
10
|
+
handleIcon: string;
|
|
11
|
+
ctx: Ctx;
|
|
12
|
+
state: {
|
|
13
|
+
icon: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare const BlockHandle: import("@vue/runtime-core").DefineComponent<BlockHandleProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<BlockHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export {};
|
|
2
18
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAahD,UAAU,gBAAgB;IACxB,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IACpC,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IACzC,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IACzC,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1C,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,GAAG,CAAA;IACR,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACxB;AAED,eAAO,MAAM,WAAW,kXAuGtB,CAAA"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import { type Ref } from 'vue';
|
|
3
|
+
import type { BlockEditFeatureConfig } from '..';
|
|
4
|
+
type MenuProps = {
|
|
5
|
+
ctx: Ctx;
|
|
6
|
+
show: Ref<boolean>;
|
|
7
|
+
filter: Ref<string>;
|
|
8
|
+
hide: () => void;
|
|
9
|
+
config?: BlockEditFeatureConfig;
|
|
10
|
+
activeKey: Ref<string>;
|
|
11
|
+
};
|
|
12
|
+
export declare const Menu: import("@vue/runtime-core").DefineComponent<MenuProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<MenuProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export {};
|
|
2
14
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAYhD,OAAO,EAOL,KAAK,GAAG,EAGT,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,IAAI,CAAA;AAwBhD,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,sBAAsB,CAAA;IAC/B,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,IAAI,oWA4vCf,CAAA"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import type { Selection } from '@jvs-milkdown/kit/prose/state';
|
|
3
|
+
import { type ShallowRef, type Ref } from 'vue';
|
|
4
|
+
import type { FixedToolbarFeatureConfig } from '.';
|
|
5
|
+
type FixedToolbarProps = {
|
|
6
|
+
ctx: Ctx;
|
|
7
|
+
hide: () => void;
|
|
8
|
+
show: Ref<boolean>;
|
|
9
|
+
selection: ShallowRef<Selection>;
|
|
10
|
+
config?: FixedToolbarFeatureConfig;
|
|
11
|
+
};
|
|
12
|
+
export declare const FixedToolbarComponent: import("@vue/runtime-core").DefineComponent<FixedToolbarProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<FixedToolbarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export {};
|
|
2
14
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,GAAG,EAAU,MAAM,KAAK,CAAA;AAExE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,GAAG,CAAA;AAQlD,KAAK,iBAAiB,GAAG;IACvB,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,yBAAyB,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,qBAAqB,oXAiEhC,CAAA"}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import type { FixedToolbarConfig } from './index';
|
|
3
|
+
export declare const DocumentHeader: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
4
|
+
ctx: {
|
|
5
|
+
type: () => Ctx;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
config: {
|
|
9
|
+
type: () => FixedToolbarConfig;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
13
|
+
ctx: {
|
|
14
|
+
type: () => Ctx;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
config: {
|
|
18
|
+
type: () => FixedToolbarConfig;
|
|
19
|
+
required: false;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
2
22
|
//# sourceMappingURL=document-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-header.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/document-header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document-header.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/document-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAchD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAKjD,eAAO,MAAM,cAAc;;cAEA,MAAM,GAAG;;;;cACN,MAAM,kBAAkB;;;;;cAD3B,MAAM,GAAG;;;;cACN,MAAM,kBAAkB;;;+GAoTpD,CAAA"}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import type { FixedToolbarConfig } from './index';
|
|
3
|
+
export declare const MenuBar: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
4
|
+
ctx: {
|
|
5
|
+
type: () => Ctx;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
config: {
|
|
9
|
+
type: () => FixedToolbarConfig;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
13
|
+
ctx: {
|
|
14
|
+
type: () => Ctx;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
config: {
|
|
18
|
+
type: () => FixedToolbarConfig;
|
|
19
|
+
required: false;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
2
22
|
//# sourceMappingURL=menu-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/menu-bar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu-bar.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/menu-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAMhD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAkDjD,eAAO,MAAM,OAAO;;cAEO,MAAM,GAAG;;;;cACN,MAAM,kBAAkB;;;;;cAD3B,MAAM,GAAG;;;;cACN,MAAM,kBAAkB;;;+GAofpD,CAAA"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
export declare const OutlinePanel: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
3
|
+
ctx: {
|
|
4
|
+
type: () => Ctx;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
8
|
+
ctx: {
|
|
9
|
+
type: () => Ctx;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
2
13
|
//# sourceMappingURL=outline-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline-panel.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/outline-panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outline-panel.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/outline-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAgBhD,eAAO,MAAM,YAAY;;cAEE,MAAM,GAAG;;;;;cAAT,MAAM,GAAG;;;+GA6clC,CAAA"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import { type Ref } from 'vue';
|
|
3
|
+
type ModalProps = {
|
|
4
|
+
ctx: Ctx;
|
|
5
|
+
visible: Ref<boolean>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ShortcutHelpModal: import("@vue/runtime-core").DefineComponent<ModalProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<ModalProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export {};
|
|
2
9
|
//# sourceMappingURL=shortcut-help-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcut-help-modal.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/shortcut-help-modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortcut-help-modal.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/shortcut-help-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAIhD,OAAO,EAAmB,KAAK,GAAG,EAAiC,MAAM,KAAK,CAAA;AAoE9E,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACtB,CAAA;AAmED,eAAO,MAAM,iBAAiB,sWAsG5B,CAAA"}
|
|
@@ -11,6 +11,24 @@ export interface ViewMenuState {
|
|
|
11
11
|
editorWidth: EditorWidth;
|
|
12
12
|
}
|
|
13
13
|
export declare const editorWidthMap: Record<EditorWidth, string>;
|
|
14
|
-
export declare const createViewMenuState: () =>
|
|
15
|
-
|
|
14
|
+
export declare const createViewMenuState: () => {
|
|
15
|
+
outlineVisible: boolean;
|
|
16
|
+
outlinePosition: OutlinePosition;
|
|
17
|
+
outlineWidth: number;
|
|
18
|
+
documentBackground: string | null;
|
|
19
|
+
showTitle: boolean;
|
|
20
|
+
showCover: boolean;
|
|
21
|
+
coverUrl: string;
|
|
22
|
+
editorWidth: EditorWidth;
|
|
23
|
+
};
|
|
24
|
+
export declare const viewMenuStateCtx: import("@jvs-milkdown/utils").$Ctx<{
|
|
25
|
+
outlineVisible: boolean;
|
|
26
|
+
outlinePosition: OutlinePosition;
|
|
27
|
+
outlineWidth: number;
|
|
28
|
+
documentBackground: string | null;
|
|
29
|
+
showTitle: boolean;
|
|
30
|
+
showCover: boolean;
|
|
31
|
+
coverUrl: string;
|
|
32
|
+
editorWidth: EditorWidth;
|
|
33
|
+
}, "viewMenuStateCtx">;
|
|
16
34
|
//# sourceMappingURL=view-menu-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-menu-state.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/view-menu-state.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAC9C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,eAAe,CAAA;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAA;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"view-menu-state.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/view-menu-state.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAC9C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,eAAe,CAAA;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAA;AAED,eAAO,MAAM,mBAAmB;oBAhBd,OAAO;qBACN,eAAe;kBAClB,MAAM;wBACA,MAAM,GAAG,IAAI;eACtB,OAAO;eACP,OAAO;cACR,MAAM;iBACH,WAAW;CAmBtB,CAAA;AAIJ,eAAO,MAAM,gBAAgB;oBA9BX,OAAO;qBACN,eAAe;kBAClB,MAAM;wBACA,MAAM,GAAG,IAAI;eACtB,OAAO;eACP,OAAO;cACR,MAAM;iBACH,WAAW;sBAuBqD,CAAA"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import type { EditorView } from '@jvs-milkdown/kit/prose/view';
|
|
3
|
+
import { type ShallowRef } from 'vue';
|
|
4
|
+
import type { LatexConfig } from '..';
|
|
5
|
+
type LatexTooltipProps = {
|
|
6
|
+
ctx: Ctx;
|
|
7
|
+
config: Partial<LatexConfig>;
|
|
8
|
+
innerView: ShallowRef<EditorView | null>;
|
|
9
|
+
updateValue: ShallowRef<(close?: boolean) => void>;
|
|
10
|
+
};
|
|
11
|
+
export declare const LatexTooltip: import("@vue/runtime-core").DefineComponent<LatexTooltipProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<LatexTooltipProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export {};
|
|
2
13
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/latex/inline-tooltip/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/latex/inline-tooltip/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAI9D,OAAO,EAEL,KAAK,UAAU,EAIhB,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAA;AAQrC,KAAK,iBAAiB,GAAG;IACvB,GAAG,EAAE,GAAG,CAAA;IACR,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5B,SAAS,EAAE,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;IACxC,WAAW,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,YAAY,oXA0DvB,CAAA"}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Ctx } from '@jvs-milkdown/kit/ctx';
|
|
2
|
+
import { type Selection } from '@jvs-milkdown/kit/prose/state';
|
|
3
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
4
|
+
import type { ToolbarFeatureConfig } from '.';
|
|
5
|
+
type ToolbarProps = {
|
|
6
|
+
ctx: Ctx;
|
|
7
|
+
hide: () => void;
|
|
8
|
+
show: Ref<boolean>;
|
|
9
|
+
selection: ShallowRef<Selection>;
|
|
10
|
+
config?: ToolbarFeatureConfig;
|
|
11
|
+
isFixed?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const Toolbar: import("@vue/runtime-core").DefineComponent<ToolbarProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<ToolbarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export {};
|
|
2
15
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAehD,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,+BAA+B,CAAA;AAUtC,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,UAAU,EAQhB,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AA+F7C,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAaD,eAAO,MAAM,OAAO,0WAu4ElB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jvs-milkdown/crepe",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"crepe",
|
|
6
6
|
"editor",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
98
98
|
"@codemirror/view": "^6.26.0",
|
|
99
99
|
"@floating-ui/dom": "^1.7.6",
|
|
100
|
-
"@jvs-milkdown/kit": "^1.2.
|
|
101
|
-
"@jvs-milkdown/prose": "^1.2.
|
|
102
|
-
"@jvs-milkdown/utils": "^1.2.
|
|
100
|
+
"@jvs-milkdown/kit": "^1.2.12",
|
|
101
|
+
"@jvs-milkdown/prose": "^1.2.12",
|
|
102
|
+
"@jvs-milkdown/utils": "^1.2.12",
|
|
103
103
|
"@types/lodash-es": "^4.17.12",
|
|
104
104
|
"clsx": "^2.0.0",
|
|
105
105
|
"codemirror": "^6.0.1",
|
|
@@ -108,7 +108,14 @@
|
|
|
108
108
|
"prosemirror-virtual-cursor": "^0.4.2",
|
|
109
109
|
"remark-math": "^6.0.0",
|
|
110
110
|
"unist-util-visit": "^5.0.0",
|
|
111
|
-
"vue": "^3.5.
|
|
111
|
+
"vue": "^3.5.20"
|
|
112
|
+
},
|
|
113
|
+
"devDependencies": {
|
|
114
|
+
"@vue/compiler-core": "^3.5.34",
|
|
115
|
+
"@vue/compiler-dom": "^3.5.34",
|
|
116
|
+
"@vue/reactivity": "^3.5.34",
|
|
117
|
+
"@vue/runtime-core": "^3.5.34",
|
|
118
|
+
"@vue/runtime-dom": "^3.5.34"
|
|
112
119
|
},
|
|
113
120
|
"scripts": {
|
|
114
121
|
"build": "pnpm run build:es && pnpm run build:theme && echo",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon } from '@jvs-milkdown/kit/component'
|
|
2
2
|
// @ts-ignore
|
|
3
|
-
import { type Ref, defineComponent, shallowRef, computed, ref } from 'vue'
|
|
3
|
+
import { type Ref, defineComponent, shallowRef, computed, ref, h } from 'vue'
|
|
4
4
|
|
|
5
5
|
import type { AttachmentFeatureConfig } from '../../config'
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@ import type { Selection } from '@jvs-milkdown/kit/prose/state'
|
|
|
3
3
|
|
|
4
4
|
import { Icon } from '@jvs-milkdown/kit/component'
|
|
5
5
|
// @ts-ignore
|
|
6
|
-
import { defineComponent, type ShallowRef, type Ref, ref } from 'vue'
|
|
6
|
+
import { defineComponent, type ShallowRef, type Ref, ref, h } from 'vue'
|
|
7
7
|
|
|
8
8
|
import type { FixedToolbarFeatureConfig } from '.'
|
|
9
9
|
|
|
@@ -9,8 +9,13 @@ import {
|
|
|
9
9
|
watch,
|
|
10
10
|
onMounted,
|
|
11
11
|
onUnmounted,
|
|
12
|
+
h,
|
|
12
13
|
} from 'vue'
|
|
13
14
|
|
|
15
|
+
import { keepAlive } from '../../utils/keep-alive'
|
|
16
|
+
|
|
17
|
+
keepAlive(h)
|
|
18
|
+
|
|
14
19
|
import type { FixedToolbarConfig } from './index'
|
|
15
20
|
|
|
16
21
|
import { builtInCoverImages, randomCover } from './cover-defaults'
|
|
@@ -2,7 +2,7 @@ import type { Ctx } from '@jvs-milkdown/kit/ctx'
|
|
|
2
2
|
|
|
3
3
|
import { Icon } from '@jvs-milkdown/kit/component'
|
|
4
4
|
// @ts-ignore
|
|
5
|
-
import { defineComponent, ref, onUnmounted, computed, onMounted } from 'vue'
|
|
5
|
+
import { defineComponent, ref, onUnmounted, computed, onMounted, h } from 'vue'
|
|
6
6
|
|
|
7
7
|
import type { FixedToolbarConfig } from './index'
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import type { Ctx } from '@jvs-milkdown/kit/ctx'
|
|
|
2
2
|
|
|
3
3
|
import { editorViewCtx } from '@jvs-milkdown/kit/core'
|
|
4
4
|
// @ts-ignore
|
|
5
|
-
import { defineComponent, onMounted, onUnmounted, ref, computed } from 'vue'
|
|
5
|
+
import { defineComponent, onMounted, onUnmounted, ref, computed, h } from 'vue'
|
|
6
6
|
|
|
7
7
|
import { i18n } from '../../core/locale'
|
|
8
8
|
import { viewMenuStateCtx } from './view-menu-state'
|
|
@@ -1241,7 +1241,11 @@ export const Toolbar = defineComponent<ToolbarProps>({
|
|
|
1241
1241
|
|
|
1242
1242
|
// Ensure proper formatting tools are visible
|
|
1243
1243
|
const nonHeadingGroups = toolbarGroupInfo.value.filter(
|
|
1244
|
-
(group: any) =>
|
|
1244
|
+
(group: any) => {
|
|
1245
|
+
if ((group as any).key === 'heading') return false
|
|
1246
|
+
if (props.isFixed && (group as any).key === 'function') return false
|
|
1247
|
+
return true
|
|
1248
|
+
}
|
|
1245
1249
|
)
|
|
1246
1250
|
|
|
1247
1251
|
const isSectionOverflowed = (idx: number) =>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.milkdown {
|
|
2
|
-
&:has(.milkdown-slash-menu[data-show='true']) .milkdown-block-handle
|
|
2
|
+
&:has(.milkdown-slash-menu[data-show='true'][data-mode='block']) .milkdown-block-handle,
|
|
3
|
+
&:has(.milkdown-slash-menu[data-show='true'][data-mode='list']) .milkdown-block-handle {
|
|
3
4
|
opacity: 1 !important;
|
|
4
5
|
pointer-events: auto !important;
|
|
5
6
|
}
|