@markweave/vue2 0.9.0 → 0.9.2
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 +40 -38
- package/dist/index.js +18 -4
- package/dist/legacy/index.js +5915 -5514
- package/dist/types/MarkweaveEditor.d.ts +4 -1
- package/dist/types/MarkweaveEditor.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/vue2-compat.d.ts +11 -8
- package/dist/types/vue2-compat.d.ts.map +1 -1
- package/dist/types/vue2-icons.d.ts +75 -75
- package/dist/types/vue2-icons.d.ts.map +1 -1
- package/package.json +2 -2
- package/webpack4/index.cjs +58 -21
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,35 +1,35 @@
|
|
|
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.
|
|
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. Keep `vue-template-compiler` on exactly the same version as `vue`. Markweave verifies Vue 2.6.12 / Vue CLI 4.4.6 as the minimum Webpack 4 baseline and Vue 2.7.16 / Vue CLI 4.5.19 as the recommended final Vue 2 matrix; Vue 2 itself is end-of-life, so security and compliance ownership stays with the host.
|
|
29
29
|
|
|
30
30
|
## Vue CLI 4 / Webpack 4 Legacy Entry
|
|
31
31
|
|
|
32
|
-
The dedicated ES2019 entry prebundles heavy editor features while preserving Vue, the Tiptap Vue 2 adapter, Tiptap core/PM, and ProseMirror as host-owned singleton runtimes. Keep normal component imports and apply
|
|
32
|
+
The dedicated ES2019 entry prebundles heavy editor features while preserving Vue, the Tiptap Vue 2 adapter, Tiptap core/PM, and ProseMirror as host-owned singleton runtimes. The helper resolves strict package-manager layouts, aliases the shared stylesheet to its physical file, and fails closed when a required runtime target is missing. Keep normal component imports and apply it in `vue.config.js`:
|
|
33
33
|
|
|
34
34
|
```js
|
|
35
35
|
const applyMarkweaveVue2Webpack4Legacy = require("@markweave/vue2/webpack4");
|
|
@@ -42,19 +42,21 @@ module.exports = {
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Hosts that own their aliases can import `@markweave/vue2/legacy` explicitly and pass `aliasPackageImport: false`. Do not add Markweave, Mermaid, Cytoscape, D3, or Lowlight to a broad Babel rule when using this entry. The helper keeps its cache outside `node_modules` so repeated `npm ci` builds can reuse it.
|
|
45
|
-
|
|
46
|
-
The
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
|
|
46
|
+
The repository release gate installs the packed package into isolated strict-pnpm consumers for both supported matrices, rejects duplicate Vue/Tiptap/ProseMirror roots from Webpack stats, and browser-checks mount, Mermaid rendering, input, update payloads, and Live/View transitions.
|
|
47
|
+
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
## Host-Driven AI Edit Review
|
|
53
|
+
|
|
52
54
|
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.
|
|
53
|
-
|
|
54
|
-
```vue
|
|
55
|
-
<MarkweaveEditor :on-ai-edit-controller-change="setAiEditController" />
|
|
56
|
-
```
|
|
57
|
-
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<MarkweaveEditor :on-ai-edit-controller-change="setAiEditController" />
|
|
58
|
+
```
|
|
59
|
+
|
|
58
60
|
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.
|
|
59
61
|
|
|
60
62
|
## Command Registry And Host Extensions
|
package/dist/index.js
CHANGED
|
@@ -135,8 +135,21 @@ function G(e) {
|
|
|
135
135
|
} };
|
|
136
136
|
}
|
|
137
137
|
function K(e, t, n) {
|
|
138
|
-
let r = typeof e == "function" ? e : () => e.value;
|
|
139
|
-
|
|
138
|
+
let r = typeof e == "function" ? e : () => e.value, i = ur;
|
|
139
|
+
if (!i?.$watch) return () => void 0;
|
|
140
|
+
let a = n ? {
|
|
141
|
+
deep: n.deep,
|
|
142
|
+
immediate: n.immediate
|
|
143
|
+
} : void 0;
|
|
144
|
+
if (n?.flush !== "post") return i.$watch(r, t, a);
|
|
145
|
+
let o = !1, s = !1, c, l, u = i.$watch(r, (e, n) => {
|
|
146
|
+
c = e, !s && (s = !0, l = n, Promise.resolve(lr.nextTick()).then(() => {
|
|
147
|
+
o || (s = !1, t(c, l));
|
|
148
|
+
}));
|
|
149
|
+
}, a), d = () => {
|
|
150
|
+
o || (o = !0, u());
|
|
151
|
+
};
|
|
152
|
+
return dr?.beforeUnmount.push(d), d;
|
|
140
153
|
}
|
|
141
154
|
function Sr(e) {
|
|
142
155
|
dr?.mounted.push(e);
|
|
@@ -145,7 +158,7 @@ function Cr(e) {
|
|
|
145
158
|
dr?.beforeUnmount.push(e);
|
|
146
159
|
}
|
|
147
160
|
function q(e) {
|
|
148
|
-
return lr.nextTick(e);
|
|
161
|
+
return e ? lr.nextTick(e) : lr.nextTick();
|
|
149
162
|
}
|
|
150
163
|
function J(e) {
|
|
151
164
|
return lr.extend({
|
|
@@ -2664,7 +2677,7 @@ function da(n = {}) {
|
|
|
2664
2677
|
});
|
|
2665
2678
|
}
|
|
2666
2679
|
//#endregion
|
|
2667
|
-
//#region ../../node_modules/.pnpm/@tiptap+vue-2@3.29.2_@
|
|
2680
|
+
//#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
|
|
2668
2681
|
var fa = [
|
|
2669
2682
|
"top",
|
|
2670
2683
|
"right",
|
|
@@ -3901,6 +3914,7 @@ var ps = {
|
|
|
3901
3914
|
"task-list": _i,
|
|
3902
3915
|
blockquote: Ti,
|
|
3903
3916
|
"code-block": Gr,
|
|
3917
|
+
details: Xr,
|
|
3904
3918
|
info: fi,
|
|
3905
3919
|
tip: mi,
|
|
3906
3920
|
warning: Nr,
|