manim-web 0.3.20 → 0.3.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 (192) hide show
  1. package/README.md +20 -0
  2. package/dist/AmsConfiguration-OUoC_kJ0.js +847 -0
  3. package/dist/AmsConfiguration-tdje_HlF.js +847 -0
  4. package/dist/ConfigMacrosConfiguration-4OaQYvlr.js +46 -0
  5. package/dist/ConfigMacrosConfiguration-DM3-S5M8.js +46 -0
  6. package/dist/Entities-Dw6381dl.js +429 -0
  7. package/dist/Entities-bJKKDYjE.js +429 -0
  8. package/dist/Factory-Ba6Nqb3M.js +107 -0
  9. package/dist/HtmlNode-1mFtYQ9G.js +981 -0
  10. package/dist/HtmlNode-CQqo5we-.js +981 -0
  11. package/dist/InputJax-D5R2pqUk.js +41 -0
  12. package/dist/InputJax-jNvwWU5P.js +41 -0
  13. package/dist/NewcommandConfiguration-BN_OlLcO.js +32 -0
  14. package/dist/NewcommandConfiguration-DZ3mSCpD.js +32 -0
  15. package/dist/NewcommandMethods-D5bueYYE.js +187 -0
  16. package/dist/NewcommandMethods-DTf_dan5.js +187 -0
  17. package/dist/Options-DMK2wYar.js +63 -0
  18. package/dist/ParseMethods-Deqa7kJ6.js +2636 -0
  19. package/dist/ParseMethods-Dt5bYDSZ.js +2636 -0
  20. package/dist/Styles-BILrGVps.js +293 -0
  21. package/dist/Styles-DQSruwWe.js +293 -0
  22. package/dist/animation/Animation.d.ts +15 -0
  23. package/dist/animation/Animation.d.ts.map +1 -1
  24. package/dist/animation/MasterTimeline.d.ts +88 -1
  25. package/dist/animation/MasterTimeline.d.ts.map +1 -1
  26. package/dist/animation/movement/Rotate.d.ts +2 -7
  27. package/dist/animation/movement/Rotate.d.ts.map +1 -1
  28. package/dist/animation/transform/FadeMorphStrategy.d.ts +18 -0
  29. package/dist/animation/transform/FadeMorphStrategy.d.ts.map +1 -0
  30. package/dist/animation/transform/FadeTransforms.d.ts +2 -0
  31. package/dist/animation/transform/FadeTransforms.d.ts.map +1 -1
  32. package/dist/animation/transform/MorphStrategy.d.ts +8 -0
  33. package/dist/animation/transform/MorphStrategy.d.ts.map +1 -0
  34. package/dist/animation/transform/MovementTransforms.d.ts.map +1 -1
  35. package/dist/animation/transform/PointMorphStrategy.d.ts +36 -0
  36. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -0
  37. package/dist/animation/transform/ShapeMorphStrategy.d.ts +39 -0
  38. package/dist/animation/transform/ShapeMorphStrategy.d.ts.map +1 -0
  39. package/dist/animation/transform/Transform.d.ts +9 -91
  40. package/dist/animation/transform/Transform.d.ts.map +1 -1
  41. package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
  42. package/dist/animation/transform/TransformMatchingBase.d.ts +1 -0
  43. package/dist/animation/transform/TransformMatchingBase.d.ts.map +1 -1
  44. package/dist/animation/transform/TransformMatchingShared.d.ts +37 -0
  45. package/dist/animation/transform/TransformMatchingShared.d.ts.map +1 -0
  46. package/dist/animation/transform/TransformPairing.d.ts +19 -0
  47. package/dist/animation/transform/TransformPairing.d.ts.map +1 -0
  48. package/dist/core/AnimateProxy.d.ts +4 -5
  49. package/dist/core/AnimateProxy.d.ts.map +1 -1
  50. package/dist/core/Camera.d.ts +37 -0
  51. package/dist/core/Camera.d.ts.map +1 -1
  52. package/dist/core/CameraExtensions.d.ts +33 -1
  53. package/dist/core/CameraExtensions.d.ts.map +1 -1
  54. package/dist/core/Group.d.ts +5 -11
  55. package/dist/core/Group.d.ts.map +1 -1
  56. package/dist/core/Mobject.d.ts +39 -7
  57. package/dist/core/Mobject.d.ts.map +1 -1
  58. package/dist/core/MobjectPositioning.d.ts +2 -5
  59. package/dist/core/MobjectPositioning.d.ts.map +1 -1
  60. package/dist/core/MobjectTypes.d.ts +21 -4
  61. package/dist/core/MobjectTypes.d.ts.map +1 -1
  62. package/dist/core/Renderer.d.ts +3 -0
  63. package/dist/core/Renderer.d.ts.map +1 -1
  64. package/dist/core/Scene.d.ts +50 -0
  65. package/dist/core/Scene.d.ts.map +1 -1
  66. package/dist/core/TexturedMobject.d.ts +38 -0
  67. package/dist/core/TexturedMobject.d.ts.map +1 -0
  68. package/dist/core/ThreeDScene.d.ts +18 -3
  69. package/dist/core/ThreeDScene.d.ts.map +1 -1
  70. package/dist/core/VGroup.d.ts +11 -19
  71. package/dist/core/VGroup.d.ts.map +1 -1
  72. package/dist/core/VMobject.d.ts +48 -110
  73. package/dist/core/VMobject.d.ts.map +1 -1
  74. package/dist/core/VMobjectCurveUtils.d.ts +106 -0
  75. package/dist/core/VMobjectCurveUtils.d.ts.map +1 -0
  76. package/dist/core/VMobjectGeometry.d.ts +22 -25
  77. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  78. package/dist/core/VMobjectRendering.d.ts +5 -0
  79. package/dist/core/VMobjectRendering.d.ts.map +1 -1
  80. package/dist/core/VMobjectStrokeGeometry.d.ts +20 -0
  81. package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -0
  82. package/dist/core/VMobjectTransformAlignment.d.ts +20 -0
  83. package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -0
  84. package/dist/html-Bza5WY1y.js +829 -0
  85. package/dist/html-bhzMuE8p.js +829 -0
  86. package/dist/index.d.ts +4 -3
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +2 -4
  89. package/dist/integrations/react.js +16 -18
  90. package/dist/integrations/vue.js +15 -17
  91. package/dist/interaction/Draggable.d.ts +2 -0
  92. package/dist/interaction/Draggable.d.ts.map +1 -1
  93. package/dist/interaction/OrbitControls.d.ts +1 -1
  94. package/dist/interaction/OrbitControls.d.ts.map +1 -1
  95. package/dist/lengths-D2zTYMUu.js +54 -0
  96. package/dist/liteAdaptor-BkxB5CGC.js +616 -0
  97. package/dist/liteAdaptor-LMKuWwg1.js +616 -0
  98. package/dist/manim-web.browser.js +35821 -30916
  99. package/dist/mathjax-CPQWkQEv.js +121 -0
  100. package/dist/mathjax-b-GTdZgw.js +121 -0
  101. package/dist/mo-D4wFHS6V.js +2675 -0
  102. package/dist/mo-hAX79Dzl.js +2675 -0
  103. package/dist/mobjects/geometry/AngleShapes.d.ts +0 -4
  104. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  105. package/dist/mobjects/geometry/BooleanOperations.d.ts +1 -1
  106. package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
  107. package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
  108. package/dist/mobjects/geometry/PolygonExtensions.d.ts +1 -1
  109. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
  110. package/dist/mobjects/graphing/ComplexPlane.d.ts +59 -1
  111. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  112. package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
  113. package/dist/mobjects/image/index.d.ts +9 -2
  114. package/dist/mobjects/image/index.d.ts.map +1 -1
  115. package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
  116. package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
  117. package/dist/mobjects/point/PMobject.d.ts +8 -2
  118. package/dist/mobjects/point/PMobject.d.ts.map +1 -1
  119. package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
  120. package/dist/mobjects/text/Code.d.ts.map +1 -1
  121. package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
  122. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  123. package/dist/mobjects/text/MathTex.d.ts +9 -0
  124. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  125. package/dist/mobjects/text/MathTexImage.d.ts +9 -3
  126. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  127. package/dist/mobjects/text/Text.d.ts +8 -3
  128. package/dist/mobjects/text/Text.d.ts.map +1 -1
  129. package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -1
  130. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
  131. package/dist/mobjects/three-d/Line3D.d.ts +10 -56
  132. package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
  133. package/dist/mobjects/three-d/ThreeDAxes.d.ts +8 -0
  134. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  135. package/dist/player/Player.d.ts +36 -29
  136. package/dist/player/Player.d.ts.map +1 -1
  137. package/dist/player/PlayerUI.d.ts.map +1 -1
  138. package/dist/player/RecordingScene.d.ts +37 -0
  139. package/dist/player/RecordingScene.d.ts.map +1 -0
  140. package/dist/{src-Db7QTr4S.js → src-BlTk3Bta.js} +34386 -29482
  141. package/dist/svg-DNS5Hwhk.js +28713 -0
  142. package/dist/svg-DVUoAdmC.js +28713 -0
  143. package/dist/test-setup/vitest-setup.d.ts +20 -0
  144. package/dist/test-setup/vitest-setup.d.ts.map +1 -0
  145. package/dist/tex-BQCLd0dF.js +1427 -0
  146. package/dist/tex-Cd_bTYKG.js +1427 -0
  147. package/dist/utils/axis.d.ts +4 -0
  148. package/dist/utils/axis.d.ts.map +1 -0
  149. package/dist/utils/logger.d.ts +37 -0
  150. package/dist/utils/logger.d.ts.map +1 -1
  151. package/dist/utils/math.d.ts +11 -0
  152. package/dist/utils/math.d.ts.map +1 -1
  153. package/dist/utils/vectors.d.ts +54 -1
  154. package/dist/utils/vectors.d.ts.map +1 -1
  155. package/package.json +10 -8
  156. package/dist/AllPackages-B0GtkYjD.js +0 -7912
  157. package/dist/AllPackages-BIAELuhU.js +0 -7912
  158. package/dist/BaseConfiguration-CDf44lxS.js +0 -4402
  159. package/dist/BaseConfiguration-Chcqjv9L.js +0 -4402
  160. package/dist/Entities-B_gwJfrn.js +0 -458
  161. package/dist/Entities-CmJkmuw_.js +0 -458
  162. package/dist/GifExporter-C9lP34Iu.js +0 -338
  163. package/dist/GifExporter-DBak5Vk7.js +0 -338
  164. package/dist/InputJax-C5sGfjJ8.js +0 -43
  165. package/dist/InputJax-Jb4hSThK.js +0 -43
  166. package/dist/MathItem-BmK41eqe.js +0 -77
  167. package/dist/MathItem-C_mZyaeT.js +0 -77
  168. package/dist/Options-Ch1vGsgd.js +0 -188
  169. package/dist/Options-V6ag48Dv.js +0 -188
  170. package/dist/PrioritizedList-DkoCmqPk.js +0 -36
  171. package/dist/PrioritizedList-eKTii0tW.js +0 -36
  172. package/dist/Styles-De4BjKiV.js +0 -411
  173. package/dist/Styles-DgoiBrzf.js +0 -411
  174. package/dist/TeXAtom-DT2wCvcU.js +0 -2025
  175. package/dist/TeXAtom-JogI0lus.js +0 -2025
  176. package/dist/VideoExporter-Bdtz_pWv.js +0 -102
  177. package/dist/VideoExporter-Vjfsnv1h.js +0 -102
  178. package/dist/chunk-3e0lkp8x.js +0 -23
  179. package/dist/html-53__O8r2.js +0 -1587
  180. package/dist/html-DfHFh5II.js +0 -1587
  181. package/dist/lengths-3epoqRj7.js +0 -65
  182. package/dist/lengths-B-bX9Tfk.js +0 -65
  183. package/dist/liteAdaptor-BxFvlO-q.js +0 -828
  184. package/dist/liteAdaptor-CsOIKw2g.js +0 -828
  185. package/dist/mathjax-Bkrmftxh.js +0 -102
  186. package/dist/mathjax-DBrTNl9C.js +0 -102
  187. package/dist/mo-AzagC5AD.js +0 -3271
  188. package/dist/mo-I_6dyJsk.js +0 -3271
  189. package/dist/svg-CoGQ_sAt.js +0 -23880
  190. package/dist/svg-DiIG93Lr.js +0 -23880
  191. package/dist/tex-ChPKMfdv.js +0 -401
  192. package/dist/tex-hYZcjadW.js +0 -401
@@ -0,0 +1,293 @@
1
+ import { t as e } from "./mathjax-CPQWkQEv.js";
2
+ //#region node_modules/@mathjax/src/mjs/util/AsyncLoad.js
3
+ function t(t) {
4
+ return e.asyncLoad ? new Promise((n, r) => {
5
+ let i = e.asyncLoad(t);
6
+ i instanceof Promise ? i.then((e) => n(e)).catch((e) => r(e)) : n(i);
7
+ }) : Promise.reject(`Can't load '${t}': No mathjax.asyncLoad method specified`);
8
+ }
9
+ //#endregion
10
+ //#region node_modules/@mathjax/src/mjs/util/Styles.js
11
+ var n = [
12
+ "top",
13
+ "right",
14
+ "bottom",
15
+ "left"
16
+ ], r = [
17
+ "width",
18
+ "style",
19
+ "color"
20
+ ];
21
+ function i(e) {
22
+ let t = e.split(/((?:'[^'\n]*'|"[^"\n]*"|,[\s\n]|[^\s\n])*)/g), n = [];
23
+ for (; t.length > 1;) t.shift(), n.push(t.shift());
24
+ return n;
25
+ }
26
+ function a(e) {
27
+ let t = i(this.styles[e]);
28
+ t.length === 0 && t.push(""), t.length === 1 && t.push(t[0]), t.length === 2 && t.push(t[0]), t.length === 3 && t.push(t[1]);
29
+ for (let n of _.connect[e].children) this.setStyle(this.childName(e, n), t.shift());
30
+ }
31
+ function o(e) {
32
+ let t = _.connect[e].children, n = [];
33
+ for (let r of t) {
34
+ let t = this.styles[this.childName(e, r)];
35
+ if (!t) {
36
+ delete this.styles[e];
37
+ return;
38
+ }
39
+ n.push(t);
40
+ }
41
+ n[3] === n[1] && (n.pop(), n[2] === n[0] && (n.pop(), n[1] === n[0] && n.pop())), this.styles[e] = n.join(" ");
42
+ }
43
+ function s(e) {
44
+ o.call(this, e), this.combineChildren(e), l.call(this, e), this.combineParent(e);
45
+ }
46
+ function c(e) {
47
+ for (let t of _.connect[e].children) this.setStyle(this.childName(e, t), this.styles[e]);
48
+ }
49
+ function l(e) {
50
+ if (!_.connect[e]) return;
51
+ let t = [..._.connect[e].children], n = this.styles[this.childName(e, t.shift())];
52
+ for (let r of t) if (this.styles[this.childName(e, r)] !== n) {
53
+ delete this.styles[e];
54
+ return;
55
+ }
56
+ n && (this.styles[e] = n);
57
+ }
58
+ var u = {
59
+ width: /^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,
60
+ style: /^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/
61
+ };
62
+ function d(e) {
63
+ let t = {
64
+ width: "",
65
+ style: "",
66
+ color: ""
67
+ };
68
+ for (let n of i(this.styles[e])) n.match(u.width) && t.width === "" ? t.width = n : n.match(u.style) && t.style === "" ? t.style = n : t.color = n;
69
+ for (let n of _.connect[e].children) this.setStyle(this.childName(e, n), t[n]);
70
+ }
71
+ function f(e) {
72
+ let t = [];
73
+ for (let n of _.connect[e].children) {
74
+ let r = this.styles[this.childName(e, n)];
75
+ r && t.push(r);
76
+ }
77
+ t.length > 1 ? this.styles[e] = t.join(" ") : delete this.styles[e];
78
+ }
79
+ var p = {
80
+ style: /^(?:normal|italic|oblique|inherit|initial|unset)$/,
81
+ variant: RegExp("^(?:" + [
82
+ "normal|none",
83
+ "inherit|initial|unset",
84
+ "common-ligatures|no-common-ligatures",
85
+ "discretionary-ligatures|no-discretionary-ligatures",
86
+ "historical-ligatures|no-historical-ligatures",
87
+ "contextual|no-contextual",
88
+ "(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)",
89
+ "small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps",
90
+ "lining-nums|oldstyle-nums|proportional-nums|tabular-nums",
91
+ "diagonal-fractions|stacked-fractions",
92
+ "ordinal|slashed-zero",
93
+ "jis78|jis83|jis90|jis04|simplified|traditional",
94
+ "full-width|proportional-width",
95
+ "ruby"
96
+ ].join("|") + ")$"),
97
+ weight: /^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,
98
+ stretch: RegExp("^(?:" + [
99
+ "normal",
100
+ "(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)",
101
+ "inherit|initial|unset"
102
+ ].join("|") + ")$"),
103
+ size: RegExp("^(?:" + [
104
+ "xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller",
105
+ "[\\d.]+%|[\\d.]+[a-z]+",
106
+ "inherit|initial|unset"
107
+ ].join("|") + ")(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$")
108
+ };
109
+ function m(e) {
110
+ let t = i(this.styles[e]), n = {
111
+ style: "",
112
+ variant: [],
113
+ weight: "",
114
+ stretch: "",
115
+ size: "",
116
+ family: "",
117
+ "line-height": ""
118
+ };
119
+ for (let e of t) {
120
+ n.family ||= e;
121
+ for (let t of Object.keys(p)) if ((Array.isArray(n[t]) || n[t] === "") && e.match(p[t])) if (n.family === e && (n.family = ""), t === "size") {
122
+ let [r, i] = e.split(/\//);
123
+ n[t] = r, i && (n["line-height"] = i);
124
+ } else n.size === "" && (Array.isArray(n[t]) ? n[t].push(e) : n[t] === "" && (n[t] = e));
125
+ }
126
+ h.call(this, e, n), delete this.styles[e];
127
+ }
128
+ function h(e, t) {
129
+ for (let n of _.connect[e].children) {
130
+ let r = this.childName(e, n);
131
+ if (Array.isArray(t[n])) {
132
+ let e = t[n];
133
+ e.length && (this.styles[r] = e.join(" "));
134
+ } else t[n] !== "" && (this.styles[r] = t[n]);
135
+ }
136
+ }
137
+ function g(e) {}
138
+ var _ = class e {
139
+ constructor(e = "") {
140
+ this.parse(e);
141
+ }
142
+ sanitizeValue(e) {
143
+ let t = this.constructor.pattern;
144
+ if (!e.match(t.sanitize)) return e;
145
+ e = e.replace(t.value, "$1");
146
+ let n = e.replace(/\\./g, "").replace(/(['"]).*?\1/g, "").replace(/[^'"]/g, "");
147
+ return n.length && (e += n.charAt(0)), e;
148
+ }
149
+ get cssText() {
150
+ let t = [];
151
+ for (let n of Object.keys(this.styles)) {
152
+ let r = this.parentName(n), i = n.replace(/.*-/, ""), a = this.childName(this.parentName(r), i);
153
+ this.styles[n] && !this.styles[a] && (!this.styles[r] || !(e.connect[r]?.children)?.includes(i)) && t.push(`${n}: ${this.styles[n]};`);
154
+ }
155
+ return t.join(" ");
156
+ }
157
+ get styleList() {
158
+ return Object.assign({}, this.styles);
159
+ }
160
+ set(t, n) {
161
+ t = this.normalizeName(t), this.setStyle(t, String(n));
162
+ let r = e.connect[t];
163
+ if (r?.subPart) {
164
+ r.combine.call(this, t);
165
+ return;
166
+ }
167
+ if (this.combineParent(t), t.match(/-.*-/)) {
168
+ let e = t.replace(/-.*-/, "-");
169
+ l.call(this, e);
170
+ }
171
+ }
172
+ combineParent(t) {
173
+ for (; t.match(/-/);) {
174
+ let n = t;
175
+ t = this.parentName(t);
176
+ let r = e.connect[t];
177
+ if (!e.connect[n] && !(r?.children)?.includes(n.substring(t.length + 1))) break;
178
+ r.combine.call(this, t);
179
+ }
180
+ if (!this.styles[t]) return;
181
+ let n = e.connect[t];
182
+ for (let e of n?.parts || []) delete this.styles[this.childName(t, e)];
183
+ }
184
+ get(e) {
185
+ return e = this.normalizeName(e), Object.hasOwn(this.styles, e) ? this.styles[e] : "";
186
+ }
187
+ setStyle(t, n) {
188
+ this.styles[t] = this.sanitizeValue(n), e.connect[t]?.children && e.connect[t].split.call(this, t), n === "" && delete this.styles[t];
189
+ }
190
+ combineChildren(t) {
191
+ let n = this.parentName(t);
192
+ for (let r of e.connect[t].children) {
193
+ let t = this.childName(n, r);
194
+ e.connect[t].combine.call(this, t);
195
+ }
196
+ }
197
+ parentName(e) {
198
+ let t = e.replace(/-[^-]*$/, "");
199
+ return e === t ? "" : t;
200
+ }
201
+ childName(t, n) {
202
+ return n.match(/-/) ? n : (e.connect[t]?.subPart && (n += t.replace(/.*-/, "-"), t = this.parentName(t)), t + "-" + n);
203
+ }
204
+ normalizeName(e) {
205
+ return e.replace(/[A-Z]/g, (e) => "-" + e.toLowerCase());
206
+ }
207
+ parse(e = "") {
208
+ let t = this.constructor.pattern;
209
+ this.styles = {};
210
+ let n = e.replace(/\n/g, " ").replace(t.comment, "").split(t.style);
211
+ for (; n.length > 1;) {
212
+ let [e, t, r] = n.splice(0, 3);
213
+ if (e.match(/[^\s\n;]/)) return;
214
+ this.set(t, r);
215
+ }
216
+ }
217
+ };
218
+ _.pattern = {
219
+ sanitize: /['";]/,
220
+ value: /^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,
221
+ style: /([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,
222
+ comment: /\/\*[^]*?\*\//g
223
+ }, _.connect = {
224
+ padding: {
225
+ children: n,
226
+ split: a,
227
+ combine: o
228
+ },
229
+ margin: {
230
+ children: n,
231
+ split: a,
232
+ combine: o
233
+ },
234
+ border: {
235
+ children: n,
236
+ parts: r,
237
+ split: c,
238
+ combine: l
239
+ },
240
+ "border-top": {
241
+ children: r,
242
+ split: d,
243
+ combine: f
244
+ },
245
+ "border-right": {
246
+ children: r,
247
+ split: d,
248
+ combine: f
249
+ },
250
+ "border-bottom": {
251
+ children: r,
252
+ split: d,
253
+ combine: f
254
+ },
255
+ "border-left": {
256
+ children: r,
257
+ split: d,
258
+ combine: f
259
+ },
260
+ "border-width": {
261
+ children: n,
262
+ split: a,
263
+ combine: s,
264
+ subPart: !0
265
+ },
266
+ "border-style": {
267
+ children: n,
268
+ split: a,
269
+ combine: s,
270
+ subPart: !0
271
+ },
272
+ "border-color": {
273
+ children: n,
274
+ split: a,
275
+ combine: s,
276
+ subPart: !0
277
+ },
278
+ font: {
279
+ children: [
280
+ "style",
281
+ "variant",
282
+ "weight",
283
+ "stretch",
284
+ "line-height",
285
+ "size",
286
+ "family"
287
+ ],
288
+ split: m,
289
+ combine: g
290
+ }
291
+ };
292
+ //#endregion
293
+ export { n, t as r, _ as t };
@@ -0,0 +1,293 @@
1
+ import { t as e } from "./mathjax-b-GTdZgw.js";
2
+ //#region node_modules/@mathjax/src/mjs/util/AsyncLoad.js
3
+ function t(t) {
4
+ return e.asyncLoad ? new Promise((n, r) => {
5
+ let i = e.asyncLoad(t);
6
+ i instanceof Promise ? i.then((e) => n(e)).catch((e) => r(e)) : n(i);
7
+ }) : Promise.reject(`Can't load '${t}': No mathjax.asyncLoad method specified`);
8
+ }
9
+ //#endregion
10
+ //#region node_modules/@mathjax/src/mjs/util/Styles.js
11
+ var n = [
12
+ "top",
13
+ "right",
14
+ "bottom",
15
+ "left"
16
+ ], r = [
17
+ "width",
18
+ "style",
19
+ "color"
20
+ ];
21
+ function i(e) {
22
+ let t = e.split(/((?:'[^'\n]*'|"[^"\n]*"|,[\s\n]|[^\s\n])*)/g), n = [];
23
+ for (; t.length > 1;) t.shift(), n.push(t.shift());
24
+ return n;
25
+ }
26
+ function a(e) {
27
+ let t = i(this.styles[e]);
28
+ t.length === 0 && t.push(""), t.length === 1 && t.push(t[0]), t.length === 2 && t.push(t[0]), t.length === 3 && t.push(t[1]);
29
+ for (let n of _.connect[e].children) this.setStyle(this.childName(e, n), t.shift());
30
+ }
31
+ function o(e) {
32
+ let t = _.connect[e].children, n = [];
33
+ for (let r of t) {
34
+ let t = this.styles[this.childName(e, r)];
35
+ if (!t) {
36
+ delete this.styles[e];
37
+ return;
38
+ }
39
+ n.push(t);
40
+ }
41
+ n[3] === n[1] && (n.pop(), n[2] === n[0] && (n.pop(), n[1] === n[0] && n.pop())), this.styles[e] = n.join(" ");
42
+ }
43
+ function s(e) {
44
+ o.call(this, e), this.combineChildren(e), l.call(this, e), this.combineParent(e);
45
+ }
46
+ function c(e) {
47
+ for (let t of _.connect[e].children) this.setStyle(this.childName(e, t), this.styles[e]);
48
+ }
49
+ function l(e) {
50
+ if (!_.connect[e]) return;
51
+ let t = [..._.connect[e].children], n = this.styles[this.childName(e, t.shift())];
52
+ for (let r of t) if (this.styles[this.childName(e, r)] !== n) {
53
+ delete this.styles[e];
54
+ return;
55
+ }
56
+ n && (this.styles[e] = n);
57
+ }
58
+ var u = {
59
+ width: /^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,
60
+ style: /^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/
61
+ };
62
+ function d(e) {
63
+ let t = {
64
+ width: "",
65
+ style: "",
66
+ color: ""
67
+ };
68
+ for (let n of i(this.styles[e])) n.match(u.width) && t.width === "" ? t.width = n : n.match(u.style) && t.style === "" ? t.style = n : t.color = n;
69
+ for (let n of _.connect[e].children) this.setStyle(this.childName(e, n), t[n]);
70
+ }
71
+ function f(e) {
72
+ let t = [];
73
+ for (let n of _.connect[e].children) {
74
+ let r = this.styles[this.childName(e, n)];
75
+ r && t.push(r);
76
+ }
77
+ t.length > 1 ? this.styles[e] = t.join(" ") : delete this.styles[e];
78
+ }
79
+ var p = {
80
+ style: /^(?:normal|italic|oblique|inherit|initial|unset)$/,
81
+ variant: RegExp("^(?:" + [
82
+ "normal|none",
83
+ "inherit|initial|unset",
84
+ "common-ligatures|no-common-ligatures",
85
+ "discretionary-ligatures|no-discretionary-ligatures",
86
+ "historical-ligatures|no-historical-ligatures",
87
+ "contextual|no-contextual",
88
+ "(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)",
89
+ "small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps",
90
+ "lining-nums|oldstyle-nums|proportional-nums|tabular-nums",
91
+ "diagonal-fractions|stacked-fractions",
92
+ "ordinal|slashed-zero",
93
+ "jis78|jis83|jis90|jis04|simplified|traditional",
94
+ "full-width|proportional-width",
95
+ "ruby"
96
+ ].join("|") + ")$"),
97
+ weight: /^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,
98
+ stretch: RegExp("^(?:" + [
99
+ "normal",
100
+ "(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)",
101
+ "inherit|initial|unset"
102
+ ].join("|") + ")$"),
103
+ size: RegExp("^(?:" + [
104
+ "xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller",
105
+ "[\\d.]+%|[\\d.]+[a-z]+",
106
+ "inherit|initial|unset"
107
+ ].join("|") + ")(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$")
108
+ };
109
+ function m(e) {
110
+ let t = i(this.styles[e]), n = {
111
+ style: "",
112
+ variant: [],
113
+ weight: "",
114
+ stretch: "",
115
+ size: "",
116
+ family: "",
117
+ "line-height": ""
118
+ };
119
+ for (let e of t) {
120
+ n.family ||= e;
121
+ for (let t of Object.keys(p)) if ((Array.isArray(n[t]) || n[t] === "") && e.match(p[t])) if (n.family === e && (n.family = ""), t === "size") {
122
+ let [r, i] = e.split(/\//);
123
+ n[t] = r, i && (n["line-height"] = i);
124
+ } else n.size === "" && (Array.isArray(n[t]) ? n[t].push(e) : n[t] === "" && (n[t] = e));
125
+ }
126
+ h.call(this, e, n), delete this.styles[e];
127
+ }
128
+ function h(e, t) {
129
+ for (let n of _.connect[e].children) {
130
+ let r = this.childName(e, n);
131
+ if (Array.isArray(t[n])) {
132
+ let e = t[n];
133
+ e.length && (this.styles[r] = e.join(" "));
134
+ } else t[n] !== "" && (this.styles[r] = t[n]);
135
+ }
136
+ }
137
+ function g(e) {}
138
+ var _ = class e {
139
+ constructor(e = "") {
140
+ this.parse(e);
141
+ }
142
+ sanitizeValue(e) {
143
+ let t = this.constructor.pattern;
144
+ if (!e.match(t.sanitize)) return e;
145
+ e = e.replace(t.value, "$1");
146
+ let n = e.replace(/\\./g, "").replace(/(['"]).*?\1/g, "").replace(/[^'"]/g, "");
147
+ return n.length && (e += n.charAt(0)), e;
148
+ }
149
+ get cssText() {
150
+ let t = [];
151
+ for (let n of Object.keys(this.styles)) {
152
+ let r = this.parentName(n), i = n.replace(/.*-/, ""), a = this.childName(this.parentName(r), i);
153
+ this.styles[n] && !this.styles[a] && (!this.styles[r] || !(e.connect[r]?.children)?.includes(i)) && t.push(`${n}: ${this.styles[n]};`);
154
+ }
155
+ return t.join(" ");
156
+ }
157
+ get styleList() {
158
+ return Object.assign({}, this.styles);
159
+ }
160
+ set(t, n) {
161
+ t = this.normalizeName(t), this.setStyle(t, String(n));
162
+ let r = e.connect[t];
163
+ if (r?.subPart) {
164
+ r.combine.call(this, t);
165
+ return;
166
+ }
167
+ if (this.combineParent(t), t.match(/-.*-/)) {
168
+ let e = t.replace(/-.*-/, "-");
169
+ l.call(this, e);
170
+ }
171
+ }
172
+ combineParent(t) {
173
+ for (; t.match(/-/);) {
174
+ let n = t;
175
+ t = this.parentName(t);
176
+ let r = e.connect[t];
177
+ if (!e.connect[n] && !(r?.children)?.includes(n.substring(t.length + 1))) break;
178
+ r.combine.call(this, t);
179
+ }
180
+ if (!this.styles[t]) return;
181
+ let n = e.connect[t];
182
+ for (let e of n?.parts || []) delete this.styles[this.childName(t, e)];
183
+ }
184
+ get(e) {
185
+ return e = this.normalizeName(e), Object.hasOwn(this.styles, e) ? this.styles[e] : "";
186
+ }
187
+ setStyle(t, n) {
188
+ this.styles[t] = this.sanitizeValue(n), e.connect[t]?.children && e.connect[t].split.call(this, t), n === "" && delete this.styles[t];
189
+ }
190
+ combineChildren(t) {
191
+ let n = this.parentName(t);
192
+ for (let r of e.connect[t].children) {
193
+ let t = this.childName(n, r);
194
+ e.connect[t].combine.call(this, t);
195
+ }
196
+ }
197
+ parentName(e) {
198
+ let t = e.replace(/-[^-]*$/, "");
199
+ return e === t ? "" : t;
200
+ }
201
+ childName(t, n) {
202
+ return n.match(/-/) ? n : (e.connect[t]?.subPart && (n += t.replace(/.*-/, "-"), t = this.parentName(t)), t + "-" + n);
203
+ }
204
+ normalizeName(e) {
205
+ return e.replace(/[A-Z]/g, (e) => "-" + e.toLowerCase());
206
+ }
207
+ parse(e = "") {
208
+ let t = this.constructor.pattern;
209
+ this.styles = {};
210
+ let n = e.replace(/\n/g, " ").replace(t.comment, "").split(t.style);
211
+ for (; n.length > 1;) {
212
+ let [e, t, r] = n.splice(0, 3);
213
+ if (e.match(/[^\s\n;]/)) return;
214
+ this.set(t, r);
215
+ }
216
+ }
217
+ };
218
+ _.pattern = {
219
+ sanitize: /['";]/,
220
+ value: /^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,
221
+ style: /([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,
222
+ comment: /\/\*[^]*?\*\//g
223
+ }, _.connect = {
224
+ padding: {
225
+ children: n,
226
+ split: a,
227
+ combine: o
228
+ },
229
+ margin: {
230
+ children: n,
231
+ split: a,
232
+ combine: o
233
+ },
234
+ border: {
235
+ children: n,
236
+ parts: r,
237
+ split: c,
238
+ combine: l
239
+ },
240
+ "border-top": {
241
+ children: r,
242
+ split: d,
243
+ combine: f
244
+ },
245
+ "border-right": {
246
+ children: r,
247
+ split: d,
248
+ combine: f
249
+ },
250
+ "border-bottom": {
251
+ children: r,
252
+ split: d,
253
+ combine: f
254
+ },
255
+ "border-left": {
256
+ children: r,
257
+ split: d,
258
+ combine: f
259
+ },
260
+ "border-width": {
261
+ children: n,
262
+ split: a,
263
+ combine: s,
264
+ subPart: !0
265
+ },
266
+ "border-style": {
267
+ children: n,
268
+ split: a,
269
+ combine: s,
270
+ subPart: !0
271
+ },
272
+ "border-color": {
273
+ children: n,
274
+ split: a,
275
+ combine: s,
276
+ subPart: !0
277
+ },
278
+ font: {
279
+ children: [
280
+ "style",
281
+ "variant",
282
+ "weight",
283
+ "stretch",
284
+ "line-height",
285
+ "size",
286
+ "family"
287
+ ],
288
+ split: m,
289
+ combine: g
290
+ }
291
+ };
292
+ //#endregion
293
+ export { n, t as r, _ as t };
@@ -9,6 +9,14 @@ export interface AnimationOptions {
9
9
  /** Shift direction for fade animations */
10
10
  shift?: [number, number, number];
11
11
  }
12
+ /**
13
+ * Minimal scene surface needed by Animation.cleanUpFromScene().
14
+ * Declared here (not imported from core/Scene) to avoid a core→animation cycle.
15
+ */
16
+ export interface AnimationScene {
17
+ add(...mobjects: Mobject[]): void;
18
+ remove(...mobjects: Mobject[]): void;
19
+ }
12
20
  export declare abstract class Animation {
13
21
  /** The mobject being animated */
14
22
  readonly mobject: Mobject;
@@ -51,6 +59,13 @@ export declare abstract class Animation {
51
59
  * Subclasses can override to clean up or finalize state.
52
60
  */
53
61
  finish(): void;
62
+ /**
63
+ * Hook called by Scene after the animation finishes, before the next play().
64
+ * Default: removes `mobject` if `remover` is set (FadeOut, Write({remover:true})).
65
+ * Override for animations that need to mutate scene membership — e.g.
66
+ * ReplacementTransform swaps source for target.
67
+ */
68
+ cleanUpFromScene(scene: AnimationScene): void;
54
69
  /**
55
70
  * Apply the animation at a given progress value.
56
71
  * @param alpha Progress from 0 (start) to 1 (end)
@@ -1 +1 @@
1
- {"version":3,"file":"Animation.d.ts","sourceRoot":"","sources":["../../src/animation/Animation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAU,MAAM,mBAAmB,CAAC;AAEzD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,8BAAsB,SAAS;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEhC,wDAAwD;IACxD,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE3C,yCAAyC;IACzC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAS;IAEvC,uCAAuC;IACvC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAS;IAErC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAS;IAEzB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB,CAAwB;gBAEtC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,gBAAqB;IAM5D;;;;;OAKG;IACH,KAAK,IAAI,IAAI;IAmBb;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;;OAGG;IACH,MAAM,IAAI,IAAI;IAId;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAEzC;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAoB9C;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,KAAK,IAAI,IAAI;IA2Bb;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAEhC;CACF"}
1
+ {"version":3,"file":"Animation.d.ts","sourceRoot":"","sources":["../../src/animation/Animation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAU,MAAM,mBAAmB,CAAC;AAGzD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACtC;AAED,8BAAsB,SAAS;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEhC,wDAAwD;IACxD,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE3C,yCAAyC;IACzC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAS;IAEvC,uCAAuC;IACvC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAS;IAErC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAS;IAEzB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB,CAAwB;gBAEtC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,gBAAqB;IAQ5D;;;;;OAKG;IACH,KAAK,IAAI,IAAI;IA+Bb;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;;OAGG;IACH,MAAM,IAAI,IAAI;IAId;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAM7C;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAEzC;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAoB9C;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,KAAK,IAAI,IAAI;IA2Bb;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAEhC;CACF"}