@markweave/vue2 0.8.0 → 0.9.1
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/README.md +19 -1
- package/dist/index.js +16 -3
- package/dist/legacy/chunks/_markweave-legacy-mermaid-BYwPcYYT.js +150887 -0
- package/dist/legacy/index.js +87592 -0
- 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/legacy.d.ts +1 -0
- package/legacy.js +1 -0
- package/package.json +19 -3
- package/webpack4/index.cjs +223 -0
- package/webpack4/index.d.cts +12 -0
- package/webpack4/package.json +5 -0
package/README.md
CHANGED
|
@@ -25,7 +25,25 @@ export default {
|
|
|
25
25
|
</script>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Vue remains a peer dependency and should come from the host app.
|
|
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
|
+
|
|
30
|
+
## Vue CLI 4 / Webpack 4 Legacy Entry
|
|
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. 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
|
+
|
|
34
|
+
```js
|
|
35
|
+
const applyMarkweaveVue2Webpack4Legacy = require("@markweave/vue2/webpack4");
|
|
36
|
+
|
|
37
|
+
module.exports = {
|
|
38
|
+
chainWebpack(config) {
|
|
39
|
+
applyMarkweaveVue2Webpack4Legacy(config, { projectRoot: __dirname });
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
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 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.
|
|
29
47
|
|
|
30
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.
|
|
31
49
|
|
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({
|