markstream-vue 0.0.2-beta.7 → 0.0.2-beta.9
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 +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/exports-CyoL-8XF.js +4827 -0
- package/dist/exports-DADWwNRQ.cjs +246 -0
- package/dist/exports.js +1 -1
- package/dist/index-Br7IvHNe.cjs +1 -0
- package/dist/index-CDRkq20z.js +958 -0
- package/dist/index-CcqRGphH.cjs +22 -0
- package/dist/index-DdtMPiwH.js +113 -0
- package/dist/index-DoRl8S3_.js +122 -0
- package/dist/index-OTPe0l-Z.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +71 -62
- package/dist/index.tailwind.css +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +7 -7
- package/dist/exports-C7d2XCaM.cjs +0 -247
- package/dist/exports-CPUhsjyb.js +0 -4719
- package/dist/index-BLMNAobs.js +0 -117
- package/dist/index-BWCpJDUq.js +0 -108
- package/dist/index-BZTwjxhO.cjs +0 -1
- package/dist/index-CaLfBjAM.js +0 -860
- package/dist/index-DqNfDUws.cjs +0 -1
- package/dist/index-IDe4W9b6.cjs +0 -1
package/dist/index-BLMNAobs.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
var v = (d, o, r) => new Promise((f, l) => {
|
|
2
|
-
var c = (e) => {
|
|
3
|
-
try {
|
|
4
|
-
s(r.next(e));
|
|
5
|
-
} catch (t) {
|
|
6
|
-
l(t);
|
|
7
|
-
}
|
|
8
|
-
}, m = (e) => {
|
|
9
|
-
try {
|
|
10
|
-
s(r.throw(e));
|
|
11
|
-
} catch (t) {
|
|
12
|
-
l(t);
|
|
13
|
-
}
|
|
14
|
-
}, s = (e) => e.done ? f(e.value) : Promise.resolve(e.value).then(c, m);
|
|
15
|
-
s((r = r.apply(d, o)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as k, ref as g, watch as I, onMounted as O, onBeforeUnmount as y, createElementBlock as C, openBlock as R, withDirectives as B, createBlock as M, createCommentVNode as x, createElementVNode as p, vShow as W, Transition as K, withCtx as b, renderSlot as L } from "vue";
|
|
18
|
-
import { a as N, r as V, e as S, f as U, W as A, d as D } from "./exports-CPUhsjyb.js";
|
|
19
|
-
const F = {
|
|
20
|
-
class: "math-inline__loading",
|
|
21
|
-
role: "status",
|
|
22
|
-
"aria-live": "polite"
|
|
23
|
-
}, X = /* @__PURE__ */ k({
|
|
24
|
-
__name: "MathInlineNode",
|
|
25
|
-
props: {
|
|
26
|
-
node: {}
|
|
27
|
-
},
|
|
28
|
-
setup(d) {
|
|
29
|
-
const o = d;
|
|
30
|
-
let r = null;
|
|
31
|
-
const f = g(null), l = g(null);
|
|
32
|
-
let c = !1, m = 0, s = !1, e = null;
|
|
33
|
-
const t = g(!0), T = N();
|
|
34
|
-
let a = null;
|
|
35
|
-
function E() {
|
|
36
|
-
return v(this, null, function* () {
|
|
37
|
-
if (!o.node.content || !l.value || s)
|
|
38
|
-
return;
|
|
39
|
-
e && (e.abort(), e = null);
|
|
40
|
-
const i = ++m, u = new AbortController();
|
|
41
|
-
if (e = u, !c)
|
|
42
|
-
try {
|
|
43
|
-
!a && f.value && (a = T(f.value)), yield a == null ? void 0 : a.whenVisible;
|
|
44
|
-
} catch (n) {
|
|
45
|
-
}
|
|
46
|
-
V(o.node.content, !1, {
|
|
47
|
-
// Inline math should not wait on worker slots; fallback to sync render immediately
|
|
48
|
-
timeout: 1500,
|
|
49
|
-
waitTimeout: 0,
|
|
50
|
-
maxRetries: 0,
|
|
51
|
-
signal: u.signal
|
|
52
|
-
}).then((n) => {
|
|
53
|
-
s || i !== m || l.value && (l.value.innerHTML = n, t.value = !1, c = !0);
|
|
54
|
-
}).catch((n) => v(null, null, function* () {
|
|
55
|
-
if (s || i !== m || !l.value)
|
|
56
|
-
return;
|
|
57
|
-
const h = (n == null ? void 0 : n.code) || (n == null ? void 0 : n.name);
|
|
58
|
-
if ((h === "WORKER_INIT_ERROR" || (n == null ? void 0 : n.fallbackToRenderer) || (h === A || h === "WORKER_TIMEOUT")) && (r || (r = yield S()), r)) {
|
|
59
|
-
try {
|
|
60
|
-
const _ = r.renderToString(o.node.content, { throwOnError: o.node.loading, displayMode: !1 });
|
|
61
|
-
t.value = !1, l.value.innerHTML = _, c = !0, U(o.node.content, !1, _);
|
|
62
|
-
} catch (_) {
|
|
63
|
-
}
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
c || (t.value = !0), o.node.loading || (t.value = !1, l.value.textContent = o.node.raw);
|
|
67
|
-
}));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return I(
|
|
71
|
-
() => o.node.content,
|
|
72
|
-
() => {
|
|
73
|
-
E();
|
|
74
|
-
}
|
|
75
|
-
), O(() => {
|
|
76
|
-
E();
|
|
77
|
-
}), y(() => {
|
|
78
|
-
var i;
|
|
79
|
-
s = !0, e && (e.abort(), e = null), (i = a == null ? void 0 : a.destroy) == null || i.call(a), a = null;
|
|
80
|
-
}), (i, u) => (R(), C("span", {
|
|
81
|
-
ref_key: "containerEl",
|
|
82
|
-
ref: f,
|
|
83
|
-
class: "math-inline-wrapper"
|
|
84
|
-
}, [
|
|
85
|
-
B(p("span", {
|
|
86
|
-
ref_key: "mathElement",
|
|
87
|
-
ref: l,
|
|
88
|
-
class: "math-inline"
|
|
89
|
-
}, null, 512), [
|
|
90
|
-
[W, !t.value]
|
|
91
|
-
]),
|
|
92
|
-
t.value ? (R(), M(K, {
|
|
93
|
-
key: 0,
|
|
94
|
-
name: "table-node-fade"
|
|
95
|
-
}, {
|
|
96
|
-
default: b(() => [
|
|
97
|
-
p("span", F, [
|
|
98
|
-
L(i.$slots, "loading", { isLoading: t.value }, () => [
|
|
99
|
-
u[0] || (u[0] = p("span", {
|
|
100
|
-
class: "math-inline__spinner animate-spin",
|
|
101
|
-
"aria-hidden": "true"
|
|
102
|
-
}, null, -1)),
|
|
103
|
-
u[1] || (u[1] = p("span", { class: "sr-only" }, "Loading", -1))
|
|
104
|
-
], !0)
|
|
105
|
-
])
|
|
106
|
-
]),
|
|
107
|
-
_: 3
|
|
108
|
-
})) : x("", !0)
|
|
109
|
-
], 512));
|
|
110
|
-
}
|
|
111
|
-
}), w = /* @__PURE__ */ D(X, [["__scopeId", "data-v-6b23009e"]]);
|
|
112
|
-
w.install = (d) => {
|
|
113
|
-
d.component(w.__name, w);
|
|
114
|
-
};
|
|
115
|
-
export {
|
|
116
|
-
w as default
|
|
117
|
-
};
|
package/dist/index-BWCpJDUq.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
var v = (i, o, r) => new Promise((d, a) => {
|
|
2
|
-
var s = (e) => {
|
|
3
|
-
try {
|
|
4
|
-
l(r.next(e));
|
|
5
|
-
} catch (m) {
|
|
6
|
-
a(m);
|
|
7
|
-
}
|
|
8
|
-
}, f = (e) => {
|
|
9
|
-
try {
|
|
10
|
-
l(r.throw(e));
|
|
11
|
-
} catch (m) {
|
|
12
|
-
a(m);
|
|
13
|
-
}
|
|
14
|
-
}, l = (e) => e.done ? d(e.value) : Promise.resolve(e.value).then(s, f);
|
|
15
|
-
l((r = r.apply(i, o)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as x, ref as k, watch as B, onMounted as C, onBeforeUnmount as O, createElementBlock as T, openBlock as g, createVNode as y, createElementVNode as w, Transition as I, withCtx as M, createCommentVNode as W, normalizeClass as K } from "vue";
|
|
18
|
-
import { a as N, r as V, e as b, f as U, W as L, d as A } from "./exports-CPUhsjyb.js";
|
|
19
|
-
const F = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "math-loading-overlay"
|
|
22
|
-
}, S = /* @__PURE__ */ x({
|
|
23
|
-
__name: "MathBlockNode",
|
|
24
|
-
props: {
|
|
25
|
-
node: {}
|
|
26
|
-
},
|
|
27
|
-
setup(i) {
|
|
28
|
-
const o = i;
|
|
29
|
-
let r = null;
|
|
30
|
-
const d = k(null), a = k(null);
|
|
31
|
-
let s = !1, f = 0, l = !1, e = null;
|
|
32
|
-
const m = N();
|
|
33
|
-
let n = null;
|
|
34
|
-
const u = k(!0);
|
|
35
|
-
function R() {
|
|
36
|
-
return v(this, null, function* () {
|
|
37
|
-
if (!o.node.content || !a.value || l)
|
|
38
|
-
return;
|
|
39
|
-
if (!s)
|
|
40
|
-
try {
|
|
41
|
-
!n && d.value && (n = m(d.value)), yield n == null ? void 0 : n.whenVisible;
|
|
42
|
-
} catch (t) {
|
|
43
|
-
}
|
|
44
|
-
e && (e.abort(), e = null);
|
|
45
|
-
const c = ++f, h = new AbortController();
|
|
46
|
-
e = h, V(o.node.content, !0, {
|
|
47
|
-
timeout: 3e3,
|
|
48
|
-
waitTimeout: 2e3,
|
|
49
|
-
maxRetries: 1,
|
|
50
|
-
signal: h.signal
|
|
51
|
-
}).then((t) => {
|
|
52
|
-
l || c !== f || a.value && (a.value.innerHTML = t, s = !0, u.value = !1);
|
|
53
|
-
}).catch((t) => v(null, null, function* () {
|
|
54
|
-
if (l || c !== f || !a.value)
|
|
55
|
-
return;
|
|
56
|
-
const _ = (t == null ? void 0 : t.code) || (t == null ? void 0 : t.name);
|
|
57
|
-
if ((_ === "WORKER_INIT_ERROR" || (t == null ? void 0 : t.fallbackToRenderer) || (_ === L || _ === "WORKER_TIMEOUT")) && (r || (r = yield b()), r)) {
|
|
58
|
-
try {
|
|
59
|
-
const p = r.renderToString(o.node.content, {
|
|
60
|
-
throwOnError: o.node.loading,
|
|
61
|
-
displayMode: !0
|
|
62
|
-
});
|
|
63
|
-
a.value.innerHTML = p, s = !0, u.value = !1, U(o.node.content, !0, p);
|
|
64
|
-
} catch (p) {
|
|
65
|
-
}
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
s || (u.value = !0), o.node.loading || (u.value = !1, a.value.textContent = o.node.raw);
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
return B(
|
|
73
|
-
() => o.node.content,
|
|
74
|
-
() => {
|
|
75
|
-
R();
|
|
76
|
-
}
|
|
77
|
-
), C(() => {
|
|
78
|
-
R();
|
|
79
|
-
}), O(() => {
|
|
80
|
-
var c;
|
|
81
|
-
l = !0, e && (e.abort(), e = null), (c = n == null ? void 0 : n.destroy) == null || c.call(n), n = null;
|
|
82
|
-
}), (c, h) => (g(), T("div", {
|
|
83
|
-
ref_key: "containerEl",
|
|
84
|
-
ref: d,
|
|
85
|
-
class: "math-block text-center overflow-x-auto relative min-h-[40px]"
|
|
86
|
-
}, [
|
|
87
|
-
y(I, { name: "math-fade" }, {
|
|
88
|
-
default: M(() => [
|
|
89
|
-
u.value ? (g(), T("div", F, [...h[0] || (h[0] = [
|
|
90
|
-
w("div", { class: "math-loading-spinner" }, null, -1)
|
|
91
|
-
])])) : W("", !0)
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
}),
|
|
95
|
-
w("div", {
|
|
96
|
-
ref_key: "mathBlockElement",
|
|
97
|
-
ref: a,
|
|
98
|
-
class: K({ "math-rendering": u.value })
|
|
99
|
-
}, null, 2)
|
|
100
|
-
], 512));
|
|
101
|
-
}
|
|
102
|
-
}), E = /* @__PURE__ */ A(S, [["__scopeId", "data-v-2e076ab9"]]);
|
|
103
|
-
E.install = (i) => {
|
|
104
|
-
i.component(E.__name, E);
|
|
105
|
-
};
|
|
106
|
-
export {
|
|
107
|
-
E as default
|
|
108
|
-
};
|
package/dist/index-BZTwjxhO.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=(f,a,r)=>new Promise((m,l)=>{var u=t=>{try{c(r.next(t))}catch(_){l(_)}},h=t=>{try{c(r.throw(t))}catch(_){l(_)}},c=t=>t.done?m(t.value):Promise.resolve(t.value).then(u,h);c((r=r.apply(f,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./exports-C7d2XCaM.cjs"),w={key:0,class:"math-loading-overlay"},x=e.defineComponent({__name:"MathBlockNode",props:{node:{}},setup(f){const a=f;let r=null;const m=e.ref(null),l=e.ref(null);let u=!1,h=0,c=!1,t=null;const _=d.useViewportPriority();let o=null;const s=e.ref(!0);function R(){return g(this,null,function*(){if(!a.node.content||!l.value||c)return;if(!u)try{!o&&m.value&&(o=_(m.value)),yield o==null?void 0:o.whenVisible}catch(n){}t&&(t.abort(),t=null);const i=++h,v=new AbortController;t=v,d.renderKaTeXWithBackpressure(a.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:v.signal}).then(n=>{c||i!==h||l.value&&(l.value.innerHTML=n,u=!0,s.value=!1)}).catch(n=>g(null,null,function*(){if(c||i!==h||!l.value)return;const k=(n==null?void 0:n.code)||(n==null?void 0:n.name),T=k==="WORKER_INIT_ERROR"||(n==null?void 0:n.fallbackToRenderer),B=k===d.WORKER_BUSY_CODE||k==="WORKER_TIMEOUT";if((T||B)&&(r||(r=yield d.getKatex()),r)){try{const E=r.renderToString(a.node.content,{throwOnError:a.node.loading,displayMode:!0});l.value.innerHTML=E,u=!0,s.value=!1,d.setKaTeXCache(a.node.content,!0,E)}catch(E){}return}u||(s.value=!0),a.node.loading||(s.value=!1,l.value.textContent=a.node.raw)}))})}return e.watch(()=>a.node.content,()=>{R()}),e.onMounted(()=>{R()}),e.onBeforeUnmount(()=>{var i;c=!0,t&&(t.abort(),t=null),(i=o==null?void 0:o.destroy)==null||i.call(o),o=null}),(i,v)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerEl",ref:m,class:"math-block text-center overflow-x-auto relative min-h-[40px]"},[e.createVNode(e.Transition,{name:"math-fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",w,[...v[0]||(v[0]=[e.createElementVNode("div",{class:"math-loading-spinner"},null,-1)])])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",{ref_key:"mathBlockElement",ref:l,class:e.normalizeClass({"math-rendering":s.value})},null,2)],512))}}),p=d._export_sfc(x,[["__scopeId","data-v-2e076ab9"]]);p.install=f=>{f.component(p.__name,p)};exports.default=p;
|