@markweave/vue2 0.7.3 → 0.7.4
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/LICENSE +21 -21
- package/README.md +37 -37
- package/dist/index.js +3 -1
- package/dist/types/create-editor-extensions.d.ts +4 -0
- package/dist/types/create-editor-extensions.d.ts.map +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Refinex-Space
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Refinex-Space
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# @markweave/vue2
|
|
2
|
-
|
|
3
|
-
Vue 2 adapter for Markweave.
|
|
4
|
-
|
|
1
|
+
# @markweave/vue2
|
|
2
|
+
|
|
3
|
+
Vue 2 adapter for Markweave.
|
|
4
|
+
|
|
5
5
|
Full guide: [Vue 2 Integration](https://github.com/Refinex-Space/markweave/blob/main/docs/guides/vue2-integration.md) | [Vue 2 接入手册](https://github.com/Refinex-Space/markweave/blob/main/docs/guides/vue2-integration-zh-cn.md)
|
|
6
6
|
|
|
7
7
|
Version 0.7.0 adds the `table-capabilities` callback prop, a synchronous per-table resolver for Markweave-owned structure, formatting, copy, and table-AI operations. It receives readonly table and ancestor descriptors and fails closed on resolver errors.
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
pnpm add @markweave/vue2
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```vue
|
|
14
|
-
<template>
|
|
15
|
-
<MarkweaveEditor default-content="# Hello Markweave" />
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import { MarkweaveEditor } from "@markweave/vue2";
|
|
20
|
-
import "@markweave/vue2/styles.css";
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
components: { MarkweaveEditor },
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Vue remains a peer dependency and should come from the host app. Vue CLI 4 / Webpack 4 projects should keep `vue-template-compiler` on the same Vue 2.6.x version as `vue`.
|
|
29
|
-
|
|
30
|
-
The built-in outline uses `inner-toc-placement="container"` by default, keeping it vertically centered in the visual viewport while symmetric TOC gutters keep the writing column centered. It hides automatically in a narrow editor container to preserve readable content width.
|
|
31
|
-
|
|
32
|
-
Version 0.3.5 keeps this fixed positioning and resolver-backed first-screen image loading compatible with Vue CLI 4 applications hosted in Electron 21 / Chromium 106.
|
|
33
|
-
|
|
34
|
-
## Host-Driven AI Edit Review
|
|
35
|
-
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @markweave/vue2
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<template>
|
|
15
|
+
<MarkweaveEditor default-content="# Hello Markweave" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import { MarkweaveEditor } from "@markweave/vue2";
|
|
20
|
+
import "@markweave/vue2/styles.css";
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
components: { MarkweaveEditor },
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Vue remains a peer dependency and should come from the host app. Vue CLI 4 / Webpack 4 projects should keep `vue-template-compiler` on the same Vue 2.6.x version as `vue`.
|
|
29
|
+
|
|
30
|
+
The built-in outline uses `inner-toc-placement="container"` by default, keeping it vertically centered in the visual viewport while symmetric TOC gutters keep the writing column centered. It hides automatically in a narrow editor container to preserve readable content width.
|
|
31
|
+
|
|
32
|
+
Version 0.3.5 keeps this fixed positioning and resolver-backed first-screen image loading compatible with Vue CLI 4 applications hosted in Electron 21 / Chromium 106.
|
|
33
|
+
|
|
34
|
+
## Host-Driven AI Edit Review
|
|
35
|
+
|
|
36
36
|
Version 0.5.0 exposes lazy selection snapshots plus explicit selection, block, and document AI edit scopes through `MarkweaveAiEditController`. Keyed Vue 2 replacements preserve the successor controller, while multi-scope proposals provide count/navigation, global decisions, and staged per-hunk decisions before one atomic settlement.
|
|
37
|
-
|
|
38
|
-
```vue
|
|
39
|
-
<MarkweaveEditor :on-ai-edit-controller-change="setAiEditController" />
|
|
40
|
-
```
|
|
41
|
-
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<MarkweaveEditor :on-ai-edit-controller-change="setAiEditController" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
42
|
The callback receives a controller after editor creation and `null` before teardown or recreation. See the full integration guide for `captureSelection`, cumulative streaming, default/headless controls, conflicts, acceptance, and error handling.
|
|
43
43
|
|
|
44
44
|
## Command Registry And Host Extensions
|
package/dist/index.js
CHANGED
|
@@ -2641,6 +2641,8 @@ function fa(n = {}) {
|
|
|
2641
2641
|
lang: n.lang,
|
|
2642
2642
|
onImageUpload: n.onImageUpload,
|
|
2643
2643
|
tableCapabilities: n.tableCapabilities,
|
|
2644
|
+
referenceSuggestion: n.referenceSuggestion,
|
|
2645
|
+
internalLinkCard: n.internalLinkCard,
|
|
2644
2646
|
linkCardExtension: da.configure({
|
|
2645
2647
|
lang: n.lang,
|
|
2646
2648
|
messages: t(n.lang),
|
|
@@ -2661,7 +2663,7 @@ function fa(n = {}) {
|
|
|
2661
2663
|
});
|
|
2662
2664
|
}
|
|
2663
2665
|
//#endregion
|
|
2664
|
-
//#region ../../node_modules/.pnpm/@tiptap+vue-2@3.29.2_@
|
|
2666
|
+
//#region ../../node_modules/.pnpm/@tiptap+vue-2@3.29.2_@floating-ui+dom@1.7.6_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2_vue@2.6.12/node_modules/@tiptap/vue-2/dist/menus/index.js
|
|
2665
2667
|
var pa = [
|
|
2666
2668
|
"top",
|
|
2667
2669
|
"right",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { AnyExtension } from "@tiptap/core";
|
|
2
2
|
import { type MarkweaveLang } from "markweave/internal/i18n";
|
|
3
3
|
import type { MarkweaveAttachmentDownloadHandler } from "markweave/internal/plugins/media/attachment-download";
|
|
4
|
+
import type { MarkweaveInternalLinkCardConfig } from "markweave/internal/plugins/internal-link-card/internal-link-card";
|
|
4
5
|
import type { MarkweaveLinkCardResolver } from "markweave/internal/plugins/link-card/link-card";
|
|
6
|
+
import type { MarkweaveReferenceSuggestionConfig } from "markweave/internal/plugins/reference/reference-suggestion";
|
|
5
7
|
import type { MarkweaveSlashCommandUploadHandler } from "markweave/internal/plugins/slash-command/upload";
|
|
6
8
|
import type { MarkweaveMediaSourceResolver } from "markweave/internal/plugins/media/media-source";
|
|
7
9
|
import type { MarkweaveTableCapabilityResolver } from "markweave/internal/plugins/table/table-capabilities";
|
|
@@ -14,6 +16,8 @@ export interface CreateMarkweaveVue2EditorExtensionsOptions {
|
|
|
14
16
|
readonly linkCardResolver?: MarkweaveLinkCardResolver;
|
|
15
17
|
readonly resolveMediaSource?: MarkweaveMediaSourceResolver;
|
|
16
18
|
readonly tableCapabilities?: MarkweaveTableCapabilityResolver;
|
|
19
|
+
readonly referenceSuggestion?: MarkweaveReferenceSuggestionConfig | null;
|
|
20
|
+
readonly internalLinkCard?: MarkweaveInternalLinkCardConfig | null;
|
|
17
21
|
readonly editorExtensions?: readonly AnyExtension[];
|
|
18
22
|
}
|
|
19
23
|
export declare function createMarkweaveVue2EditorExtensions(options?: CreateMarkweaveVue2EditorExtensionsOptions): import("@tiptap/core").Extensions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-editor-extensions.d.ts","sourceRoot":"","sources":["../../src/create-editor-extensions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,sDAAsD,CAAC;AAC/G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AAC1G,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAI5G,MAAM,WAAW,0CAA0C;IACzD,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,kCAAkC,CAAC;IAC5D,QAAQ,CAAC,aAAa,CAAC,EAAE,kCAAkC,CAAC;IAC5D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kCAAkC,CAAC;IACjE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,kCAAkC,CAAC;IACnE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,gCAAgC,CAAC;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;CACrD;AAED,wBAAgB,mCAAmC,CAAC,OAAO,GAAE,0CAA+C,
|
|
1
|
+
{"version":3,"file":"create-editor-ext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CAAC;CACrD;AAED,wBAAgB,mCAAmC,CAAC,OAAO,GAAE,0CAA+C,qCAqB3G;AAED,OAAO,EAAE,mCAAmC,IAAI,+BAA+B,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markweave/vue2",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue 2 adapter for the Markweave Markdown-first WYSIWYG editor.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@tiptap/extension-image": "3.29.2",
|
|
54
54
|
"@tiptap/pm": "3.29.2",
|
|
55
55
|
"@tiptap/vue-2": "3.29.2",
|
|
56
|
-
"markweave": "^0.7.
|
|
56
|
+
"markweave": "^0.7.4"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"vue": "^2.6.12"
|