@lofcz/pptist 2.0.20 → 2.0.22

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.
Files changed (62) hide show
  1. package/dist/embed/agentic-manifest.json +7 -5
  2. package/dist/embed/chunks/mathlive.min-Bl0OCKCJ.js +39046 -0
  3. package/dist/embed/chunks/texmath-Ca6UVlA5.js +215 -0
  4. package/dist/embed/fonts/KaTeX_AMS-400-normal-34494743.woff2 +0 -0
  5. package/dist/embed/fonts/KaTeX_Caligraphic-400-normal-9f8077e0.woff2 +0 -0
  6. package/dist/embed/fonts/KaTeX_Caligraphic-700-normal-5bfa49ca.woff2 +0 -0
  7. package/dist/embed/fonts/KaTeX_Fraktur-400-normal-a5764c6e.woff2 +0 -0
  8. package/dist/embed/fonts/KaTeX_Fraktur-700-normal-f98f8927.woff2 +0 -0
  9. package/dist/embed/fonts/KaTeX_Main-400-italic-c9b2b5ff.woff2 +0 -0
  10. package/dist/embed/fonts/KaTeX_Main-400-normal-c884086c.woff2 +0 -0
  11. package/dist/embed/fonts/KaTeX_Main-700-italic-a4a4905b.woff2 +0 -0
  12. package/dist/embed/fonts/KaTeX_Main-700-normal-31050a1b.woff2 +0 -0
  13. package/dist/embed/fonts/KaTeX_Math-400-italic-db4883d0.woff2 +0 -0
  14. package/dist/embed/fonts/KaTeX_Math-700-italic-8fcb9d2d.woff2 +0 -0
  15. package/dist/embed/fonts/KaTeX_SansSerif-400-italic-3d5fa3cb.woff2 +0 -0
  16. package/dist/embed/fonts/KaTeX_SansSerif-400-normal-e45d5f4f.woff2 +0 -0
  17. package/dist/embed/fonts/KaTeX_SansSerif-700-normal-886e6179.woff2 +0 -0
  18. package/dist/embed/fonts/KaTeX_Script-400-normal-63b80959.woff2 +0 -0
  19. package/dist/embed/fonts/KaTeX_Size1-400-normal-57fa5999.woff2 +0 -0
  20. package/dist/embed/fonts/KaTeX_Size2-400-normal-ee187136.woff2 +0 -0
  21. package/dist/embed/fonts/KaTeX_Size3-400-normal-19a7caad.woff2 +0 -0
  22. package/dist/embed/fonts/KaTeX_Size4-400-normal-9bed17fb.woff2 +0 -0
  23. package/dist/embed/fonts/KaTeX_Typewriter-400-normal-7a08883f.woff2 +0 -0
  24. package/dist/embed/pptist-embed.css +1 -1
  25. package/dist/embed/pptist-embed.js +79960 -79527
  26. package/dist/types/embed/mount.d.ts +2 -0
  27. package/dist/types/i18n/i18n-types.d.ts +28 -0
  28. package/dist/types/main.d.ts +2 -0
  29. package/dist/types/utils/emitter.d.ts +21 -1
  30. package/dist/types/utils/katex-stub.d.ts +15 -0
  31. package/dist/types/utils/markdown.d.ts +1 -1
  32. package/dist/types/utils/math.d.ts +57 -0
  33. package/dist/types/utils/prosemirror/schema/index.d.ts +1 -0
  34. package/dist/types/utils/prosemirror/schema/nodes.d.ts +1 -0
  35. package/dist/types/utils/textFit.d.ts +76 -0
  36. package/dist/types/views/Editor/InlineMathEditorDialog.vue.d.ts +3 -0
  37. package/dist/types/views/components/element/TableElement/utils.d.ts +10 -0
  38. package/dist/types/views/components/element/hooks/useTextFit.d.ts +22 -0
  39. package/package.json +2 -2
  40. package/dist/embed/chunks/katex-CYXlUYaK.js +0 -21817
  41. package/dist/embed/chunks/texmath-By1nWhxV.js +0 -22173
  42. /package/dist/embed/fonts/{AlibabaPuHuiTi.woff2 → AlibabaPuHuiTi-6313a86b.woff2} +0 -0
  43. /package/dist/embed/fonts/{DeYiHei.woff2 → DeYiHei-b28e2636.woff2} +0 -0
  44. /package/dist/embed/fonts/{Inter.woff2 → Inter-4074cf0a.woff2} +0 -0
  45. /package/dist/embed/fonts/{JetBrainsMono.woff2 → JetBrainsMono-a4e25a97.woff2} +0 -0
  46. /package/dist/embed/fonts/{LXGWNeoXiHei.woff2 → LXGWNeoXiHei-60b0871c.woff2} +0 -0
  47. /package/dist/embed/fonts/{LXGWNeoZhiSong.woff2 → LXGWNeoZhiSong-9aaae14d.woff2} +0 -0
  48. /package/dist/embed/fonts/{LXGWWenKai.woff2 → LXGWWenKai-f26bb608.woff2} +0 -0
  49. /package/dist/embed/fonts/{Lato.woff2 → Lato-90c2b482.woff2} +0 -0
  50. /package/dist/embed/fonts/{Literata.woff2 → Literata-31359124.woff2} +0 -0
  51. /package/dist/embed/fonts/{Merriweather.woff2 → Merriweather-40d48271.woff2} +0 -0
  52. /package/dist/embed/fonts/{MiSans.woff2 → MiSans-1b1362c0.woff2} +0 -0
  53. /package/dist/embed/fonts/{Montserrat.woff2 → Montserrat-3f6c7436.woff2} +0 -0
  54. /package/dist/embed/fonts/{OpenSans.woff2 → OpenSans-1f8c4a74.woff2} +0 -0
  55. /package/dist/embed/fonts/{Roboto.woff2 → Roboto-8df37b32.woff2} +0 -0
  56. /package/dist/embed/fonts/{SourceHanSans.woff2 → SourceHanSans-639ce484.woff2} +0 -0
  57. /package/dist/embed/fonts/{SourceHanSerif.woff2 → SourceHanSerif-076e69d8.woff2} +0 -0
  58. /package/dist/embed/fonts/{SourceSansPro.woff2 → SourceSansPro-2e5c488e.woff2} +0 -0
  59. /package/dist/embed/fonts/{SourceSerif4.woff2 → SourceSerif4-e250b371.woff2} +0 -0
  60. /package/dist/embed/fonts/{WenDingPLKaiTi.woff2 → WenDingPLKaiTi-8c595bad.woff2} +0 -0
  61. /package/dist/embed/fonts/{WenDingPLSongTi.woff2 → WenDingPLSongTi-99ca3c11.woff2} +0 -0
  62. /package/dist/embed/fonts/{ZhuQueFangSong.woff2 → ZhuQueFangSong-f53fc6b0.woff2} +0 -0
@@ -0,0 +1,215 @@
1
+ import { i as e, n as t, r as n, t as r } from "../pptist-embed.js";
2
+ //#region src/utils/katex-stub.ts
3
+ var i = /* @__PURE__ */ n({
4
+ default: () => o,
5
+ renderToString: () => a
6
+ });
7
+ function a() {
8
+ return "";
9
+ }
10
+ var o, s = t((() => {
11
+ o = { renderToString: a };
12
+ })), c = /* @__PURE__ */ r(((t, n) => {
13
+ function r(e) {
14
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
15
+ }
16
+ function a(t, o) {
17
+ let c = a.mergeDelimiters(o && o.delimiters), l = o && o.outerSpace || !1, u = o && o.katexOptions || {};
18
+ u.throwOnError = u.throwOnError || !1, u.macros = u.macros || o && o.macros, a.katex || (o && typeof o.engine == "object" ? a.katex = o.engine : typeof n == "object" ? a.katex = (s(), e(i)) : a.katex = { renderToString() {
19
+ return "No math renderer found.";
20
+ } });
21
+ for (let e of c.inline) l && "outerSpace" in e && (e.outerSpace = !0), t.inline.ruler.before("escape", e.name, a.inline(e)), t.renderer.rules[e.name] = (t, n) => e.tmpl.replace(/\$1/, a.render(t[n].content, !!e.displayMode, u));
22
+ for (let e of c.block) t.block.ruler.before("fence", e.name, a.block(e)), t.renderer.rules[e.name] = (t, n) => e.tmpl.replace(/\$2/, r(t[n].info)).replace(/\$1/, a.render(t[n].content, !0, u));
23
+ }
24
+ a.mergeDelimiters = function(e) {
25
+ let t = Array.isArray(e) ? e : typeof e == "string" ? [e] : ["dollars"], n = {
26
+ inline: [],
27
+ block: []
28
+ };
29
+ for (let e of t) e in a.rules && (n.inline.push(...a.rules[e].inline), n.block.push(...a.rules[e].block));
30
+ return n;
31
+ }, a.inline = (e) => function(t, n) {
32
+ let r = t.pos, i = t.src, a = i.startsWith(e.tag, e.rex.lastIndex = r) && (!e.pre || e.pre(i, e.outerSpace, r)) && e.rex.exec(i), o = !!a && r < e.rex.lastIndex && (!e.post || e.post(i, e.outerSpace, e.rex.lastIndex - 1));
33
+ if (o) {
34
+ if (!n) {
35
+ let n = t.push(e.name, "math", 0);
36
+ n.content = a[1], n.markup = e.tag;
37
+ }
38
+ t.pos = e.rex.lastIndex;
39
+ }
40
+ return o;
41
+ }, a.block = (e) => function(t, n, r, i) {
42
+ let a = t.bMarks[n] + t.tShift[n], o = t.src, s = o.startsWith(e.tag, e.rex.lastIndex = a) && (!e.pre || e.pre(o, !1, a)) && e.rex.exec(o), c = !!s && a < e.rex.lastIndex && (!e.post || e.post(o, !1, e.rex.lastIndex - 1));
43
+ if (c && !i) {
44
+ let i = e.rex.lastIndex - 1, a;
45
+ for (a = n; a < r && !(i >= t.bMarks[a] + t.tShift[a] && i <= t.eMarks[a]); a++);
46
+ let o = t.lineMax, c = t.parentType;
47
+ t.lineMax = a, t.parentType = "math", c === "blockquote" && (s[1] = s[1].replace(/(\n*?^(?:\s*>)+)/gm, ""));
48
+ let l = t.push(e.name, "math", 0);
49
+ l.block = !0, l.tag = e.tag, l.markup = "", l.content = s[1], l.info = s[s.length - 1], l.map = [n, a + 1], t.parentType = c, t.lineMax = o, t.line = a + 1;
50
+ }
51
+ return c;
52
+ }, a.render = function(e, t, n) {
53
+ n.displayMode = t;
54
+ let i;
55
+ try {
56
+ i = a.katex.renderToString(e, n);
57
+ } catch (t) {
58
+ i = r(`${e}:${t.message}`);
59
+ }
60
+ return i;
61
+ }, a.use = function(e) {
62
+ return a.katex = e, a;
63
+ }, a.inlineRuleNames = ["math_inline", "math_inline_double"], a.blockRuleNames = ["math_block", "math_block_eqno"], a.$_pre = (e, t, n) => {
64
+ let r = n > 0 ? e[n - 1].charCodeAt(0) : !1;
65
+ return t ? !r || r === 32 : !r || r !== 92 && (r < 48 || r > 57);
66
+ }, a.$_post = (e, t, n) => {
67
+ let r = e[n + 1] && e[n + 1].charCodeAt(0);
68
+ return t ? !r || r === 32 || r === 46 || r === 44 || r === 59 : !r || r < 48 || r > 57;
69
+ }, a.rules = {
70
+ brackets: {
71
+ inline: [{
72
+ name: "math_inline",
73
+ rex: /\\\((.+?)\\\)/gy,
74
+ tmpl: "<eq>$1</eq>",
75
+ tag: "\\("
76
+ }],
77
+ block: [{
78
+ name: "math_block_eqno",
79
+ rex: /\\\[(((?!\\\]|\\\[)[\s\S])+?)\\\]\s*?\(([^)$\r\n]+?)\)/gmy,
80
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
81
+ tag: "\\["
82
+ }, {
83
+ name: "math_block",
84
+ rex: /\\\[([\s\S]+?)\\\]/gmy,
85
+ tmpl: "<section><eqn>$1</eqn></section>",
86
+ tag: "\\["
87
+ }]
88
+ },
89
+ doxygen: {
90
+ inline: [{
91
+ name: "math_inline",
92
+ rex: /\\f\$(.+?)\\f\$/gy,
93
+ tmpl: "<eq>$1</eq>",
94
+ tag: "\\f$"
95
+ }],
96
+ block: [{
97
+ name: "math_block_eqno",
98
+ rex: /\\f\[([^]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,
99
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
100
+ tag: "\\f["
101
+ }, {
102
+ name: "math_block",
103
+ rex: /\\f\[([^]+?)\\f\]/gmy,
104
+ tmpl: "<section><eqn>$1</eqn></section>",
105
+ tag: "\\f["
106
+ }]
107
+ },
108
+ gitlab: {
109
+ inline: [{
110
+ name: "math_inline",
111
+ rex: /\$`(.+?)`\$/gy,
112
+ tmpl: "<eq>$1</eq>",
113
+ tag: "$`"
114
+ }],
115
+ block: [{
116
+ name: "math_block_eqno",
117
+ rex: /`{3}math\s*([^`]+?)\s*?`{3}\s*\(([^)\r\n]+?)\)/gm,
118
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
119
+ tag: "```math"
120
+ }, {
121
+ name: "math_block",
122
+ rex: /`{3}math\s*([^`]*?)\s*`{3}/gm,
123
+ tmpl: "<section><eqn>$1</eqn></section>",
124
+ tag: "```math"
125
+ }]
126
+ },
127
+ julia: {
128
+ inline: [{
129
+ name: "math_inline",
130
+ rex: /`{2}([^`]+?)`{2}/gy,
131
+ tmpl: "<eq>$1</eq>",
132
+ tag: "``"
133
+ }, {
134
+ name: "math_inline",
135
+ rex: /\$((?:\S?)|(?:\S.*?\S))\$/gy,
136
+ tmpl: "<eq>$1</eq>",
137
+ tag: "$",
138
+ spaceEnclosed: !1,
139
+ pre: a.$_pre,
140
+ post: a.$_post
141
+ }],
142
+ block: [{
143
+ name: "math_block_eqno",
144
+ rex: /`{3}math\s+?([^`]+?)\s+?`{3}\s*?\(([^)$\r\n]+?)\)/gmy,
145
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
146
+ tag: "```math"
147
+ }, {
148
+ name: "math_block",
149
+ rex: /`{3}math\s+?([^`]+?)\s+?`{3}/gmy,
150
+ tmpl: "<section><eqn>$1</eqn></section>",
151
+ tag: "```math"
152
+ }]
153
+ },
154
+ kramdown: {
155
+ inline: [{
156
+ name: "math_inline",
157
+ rex: /\${2}(.+?)\${2}/gy,
158
+ tmpl: "<eq>$1</eq>",
159
+ tag: "$$"
160
+ }],
161
+ block: [{
162
+ name: "math_block_eqno",
163
+ rex: /\${2}([^$]+?)\${2}\s*?\(([^)\s]+?)\)/gmy,
164
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
165
+ tag: "$$"
166
+ }, {
167
+ name: "math_block",
168
+ rex: /\${2}([^$]+?)\${2}/gmy,
169
+ tmpl: "<section><eqn>$1</eqn></section>",
170
+ tag: "$$"
171
+ }]
172
+ },
173
+ beg_end: {
174
+ inline: [],
175
+ block: [{
176
+ name: "math_block",
177
+ rex: /(\\(?:begin)\{([a-z]+)\}[\s\S]+?\\(?:end)\{\2\})/gmy,
178
+ tmpl: "<section><eqn>$1</eqn></section>",
179
+ tag: "\\"
180
+ }]
181
+ },
182
+ dollars: {
183
+ inline: [{
184
+ name: "math_inline_double",
185
+ rex: /\${2}([^$]*?[^\\])\${2}/gy,
186
+ tmpl: "<section><eqn>$1</eqn></section>",
187
+ tag: "$$",
188
+ displayMode: !0,
189
+ pre: a.$_pre,
190
+ post: a.$_post
191
+ }, {
192
+ name: "math_inline",
193
+ rex: /\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$/gy,
194
+ tmpl: "<eq>$1</eq>",
195
+ tag: "$",
196
+ outerSpace: !1,
197
+ pre: a.$_pre,
198
+ post: a.$_post
199
+ }],
200
+ block: [{
201
+ name: "math_block_eqno",
202
+ rex: /\${2}([^$]*?[^\\])\${2}\s*?\(([^)\s]+?)\)/gmy,
203
+ tmpl: "<section class=\"eqno\"><eqn>$1</eqn><span>($2)</span></section>",
204
+ tag: "$$"
205
+ }, {
206
+ name: "math_block",
207
+ rex: /\${2}([^$]*?[^\\])\${2}/gmy,
208
+ tmpl: "<section><eqn>$1</eqn></section>",
209
+ tag: "$$"
210
+ }]
211
+ }
212
+ }, typeof n == "object" && n.exports && (n.exports = a);
213
+ }));
214
+ //#endregion
215
+ export default c();