manim-web 0.3.21 → 0.3.23
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 +20 -0
- package/dist/{svg-swSF_J59.js → MathJaxBundle-xSidSV0E.js} +18571 -7242
- package/dist/animation/Animation.d.ts.map +1 -1
- package/dist/animation/AnimationGroup.d.ts.map +1 -1
- package/dist/animation/MasterTimeline.d.ts +88 -1
- package/dist/animation/MasterTimeline.d.ts.map +1 -1
- package/dist/animation/Timeline.d.ts.map +1 -1
- package/dist/animation/changing/index.d.ts +2 -2
- package/dist/animation/changing/index.d.ts.map +1 -1
- package/dist/animation/creation/Create.d.ts.map +1 -1
- package/dist/animation/growing/index.d.ts +8 -5
- package/dist/animation/growing/index.d.ts.map +1 -1
- package/dist/animation/movement/Homotopy.d.ts +37 -7
- package/dist/animation/movement/Homotopy.d.ts.map +1 -1
- package/dist/animation/movement/MoveAlongPath.d.ts.map +1 -1
- package/dist/animation/movement/Rotate.d.ts +2 -7
- package/dist/animation/movement/Rotate.d.ts.map +1 -1
- package/dist/animation/speed/index.d.ts.map +1 -1
- package/dist/animation/transform/ApplyPointwiseFunction.d.ts.map +1 -1
- package/dist/animation/transform/ApplyPointwiseFunctionToCenter.d.ts.map +1 -1
- package/dist/animation/transform/ApplyTransforms.d.ts.map +1 -1
- package/dist/animation/transform/MorphStrategy.d.ts +23 -0
- package/dist/animation/transform/MorphStrategy.d.ts.map +1 -1
- package/dist/animation/transform/PointCloudMorphStrategy.d.ts +18 -0
- package/dist/animation/transform/PointCloudMorphStrategy.d.ts.map +1 -0
- package/dist/animation/transform/PointMorphStrategy.d.ts +26 -0
- package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -1
- package/dist/animation/transform/Transform.d.ts +2 -0
- package/dist/animation/transform/Transform.d.ts.map +1 -1
- package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
- package/dist/animation/utility/index.d.ts +6 -2
- package/dist/animation/utility/index.d.ts.map +1 -1
- package/dist/core/AnimateProxy.d.ts +3 -5
- package/dist/core/AnimateProxy.d.ts.map +1 -1
- package/dist/core/Camera.d.ts +40 -0
- package/dist/core/Camera.d.ts.map +1 -1
- package/dist/core/Camera2DFrame.d.ts +1 -1
- package/dist/core/Camera2DFrame.d.ts.map +1 -1
- package/dist/core/CameraExtensions.d.ts +33 -1
- package/dist/core/CameraExtensions.d.ts.map +1 -1
- package/dist/core/CameraFrame.d.ts.map +1 -1
- package/dist/core/Group.d.ts +11 -39
- package/dist/core/Group.d.ts.map +1 -1
- package/dist/core/InteractiveScene.d.ts.map +1 -1
- package/dist/core/Lighting.d.ts.map +1 -1
- package/dist/core/Mobject.d.ts +246 -11
- package/dist/core/Mobject.d.ts.map +1 -1
- package/dist/core/MobjectPositioning.d.ts +0 -8
- package/dist/core/MobjectPositioning.d.ts.map +1 -1
- package/dist/core/MobjectState.d.ts.map +1 -1
- package/dist/core/MobjectTraversal.d.ts +3 -0
- package/dist/core/MobjectTraversal.d.ts.map +1 -1
- package/dist/core/MobjectTypes.d.ts +29 -4
- package/dist/core/MobjectTypes.d.ts.map +1 -1
- package/dist/core/PointBounds.d.ts +39 -0
- package/dist/core/PointBounds.d.ts.map +1 -0
- package/dist/core/Renderer.d.ts +3 -0
- package/dist/core/Renderer.d.ts.map +1 -1
- package/dist/core/Scene.d.ts +82 -0
- package/dist/core/Scene.d.ts.map +1 -1
- package/dist/core/TexturedMobject.d.ts +12 -0
- package/dist/core/TexturedMobject.d.ts.map +1 -1
- package/dist/core/ThreeDScene.d.ts +9 -1
- package/dist/core/ThreeDScene.d.ts.map +1 -1
- package/dist/core/VDict.d.ts +1 -9
- package/dist/core/VDict.d.ts.map +1 -1
- package/dist/core/VGroup.d.ts +58 -42
- package/dist/core/VGroup.d.ts.map +1 -1
- package/dist/core/VMobject.d.ts +102 -28
- package/dist/core/VMobject.d.ts.map +1 -1
- package/dist/core/VMobjectCurveUtils.d.ts +1 -1
- package/dist/core/VMobjectCurveUtils.d.ts.map +1 -1
- package/dist/core/VMobjectGeometry.d.ts +20 -10
- package/dist/core/VMobjectGeometry.d.ts.map +1 -1
- package/dist/core/VMobjectRendering.d.ts +5 -0
- package/dist/core/VMobjectRendering.d.ts.map +1 -1
- package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -1
- package/dist/core/VMobjectTransformAlignment.d.ts +9 -0
- package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -1
- package/dist/core/ZoomedScene.d.ts +2 -1
- package/dist/core/ZoomedScene.d.ts.map +1 -1
- package/dist/export/GifExporter.d.ts.map +1 -1
- package/dist/export/VideoExporter.d.ts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/integrations/react.js +16 -18
- package/dist/integrations/vue.js +15 -17
- package/dist/interaction/Draggable.d.ts +12 -0
- package/dist/interaction/Draggable.d.ts.map +1 -1
- package/dist/interaction/OrbitControls.d.ts +1 -1
- package/dist/interaction/OrbitControls.d.ts.map +1 -1
- package/dist/manim-web.browser.js +12510 -10445
- package/dist/mobjects/fractals/MandelbrotSet.d.ts +2 -1
- package/dist/mobjects/fractals/MandelbrotSet.d.ts.map +1 -1
- package/dist/mobjects/fractals/NewtonFractal.d.ts +2 -1
- package/dist/mobjects/fractals/NewtonFractal.d.ts.map +1 -1
- package/dist/mobjects/frame/index.d.ts +3 -12
- package/dist/mobjects/frame/index.d.ts.map +1 -1
- package/dist/mobjects/geometry/AngleShapes.d.ts +4 -8
- package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
- package/dist/mobjects/geometry/AnnularSector.d.ts +4 -74
- package/dist/mobjects/geometry/AnnularSector.d.ts.map +1 -1
- package/dist/mobjects/geometry/Annulus.d.ts +1 -62
- package/dist/mobjects/geometry/Annulus.d.ts.map +1 -1
- package/dist/mobjects/geometry/Arc.d.ts +3 -1
- package/dist/mobjects/geometry/Arc.d.ts.map +1 -1
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts +1 -1
- package/dist/mobjects/geometry/ArcBetweenPoints.d.ts.map +1 -1
- package/dist/mobjects/geometry/ArcPolygon.d.ts +1 -1
- package/dist/mobjects/geometry/ArcPolygon.d.ts.map +1 -1
- package/dist/mobjects/geometry/Arrow.d.ts +130 -23
- package/dist/mobjects/geometry/Arrow.d.ts.map +1 -1
- package/dist/mobjects/geometry/ArrowTips.d.ts +7 -7
- package/dist/mobjects/geometry/ArrowTips.d.ts.map +1 -1
- package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
- package/dist/mobjects/geometry/Circle.d.ts +20 -23
- package/dist/mobjects/geometry/Circle.d.ts.map +1 -1
- package/dist/mobjects/geometry/CubicBezier.d.ts +1 -1
- package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
- package/dist/mobjects/geometry/CurvedArrow.d.ts +1 -1
- package/dist/mobjects/geometry/CurvedArrow.d.ts.map +1 -1
- package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts +1 -1
- package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts.map +1 -1
- package/dist/mobjects/geometry/DashedLine.d.ts +3 -2
- package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -1
- package/dist/mobjects/geometry/DashedVMobject.d.ts +3 -2
- package/dist/mobjects/geometry/DashedVMobject.d.ts.map +1 -1
- package/dist/mobjects/geometry/Dot.d.ts +4 -15
- package/dist/mobjects/geometry/Dot.d.ts.map +1 -1
- package/dist/mobjects/geometry/Ellipse.d.ts +3 -47
- package/dist/mobjects/geometry/Ellipse.d.ts.map +1 -1
- package/dist/mobjects/geometry/LabeledGeometry.d.ts +5 -5
- package/dist/mobjects/geometry/LabeledGeometry.d.ts.map +1 -1
- package/dist/mobjects/geometry/Line.d.ts +15 -9
- package/dist/mobjects/geometry/Line.d.ts.map +1 -1
- package/dist/mobjects/geometry/Polygon.d.ts +1 -1
- package/dist/mobjects/geometry/Polygon.d.ts.map +1 -1
- package/dist/mobjects/geometry/PolygonExtensions.d.ts +11 -67
- package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
- package/dist/mobjects/geometry/Polygram.d.ts +1 -1
- package/dist/mobjects/geometry/Polygram.d.ts.map +1 -1
- package/dist/mobjects/geometry/Rectangle.d.ts +4 -5
- package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -1
- package/dist/mobjects/geometry/Sector.d.ts +5 -69
- package/dist/mobjects/geometry/Sector.d.ts.map +1 -1
- package/dist/mobjects/geometry/ShapeMatchers.d.ts +6 -5
- package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -1
- package/dist/mobjects/geometry/TangentialArc.d.ts +1 -1
- package/dist/mobjects/geometry/TangentialArc.d.ts.map +1 -1
- package/dist/mobjects/geometry/segment.d.ts +24 -0
- package/dist/mobjects/geometry/segment.d.ts.map +1 -0
- package/dist/mobjects/graph/DiGraph.d.ts +1 -4
- package/dist/mobjects/graph/DiGraph.d.ts.map +1 -1
- package/dist/mobjects/graph/GenericGraph.d.ts +2 -1
- package/dist/mobjects/graph/GenericGraph.d.ts.map +1 -1
- package/dist/mobjects/graph/Graph.d.ts +1 -4
- package/dist/mobjects/graph/Graph.d.ts.map +1 -1
- package/dist/mobjects/graph/layoutAlgorithms.d.ts.map +1 -1
- package/dist/mobjects/graphing/Axes.d.ts +1 -4
- package/dist/mobjects/graphing/Axes.d.ts.map +1 -1
- package/dist/mobjects/graphing/BarChart.d.ts +1 -4
- package/dist/mobjects/graphing/BarChart.d.ts.map +1 -1
- package/dist/mobjects/graphing/ComplexPlane.d.ts +43 -9
- package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
- package/dist/mobjects/graphing/FunctionGraph.d.ts +1 -4
- package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -1
- package/dist/mobjects/graphing/ImplicitFunction.d.ts +1 -4
- package/dist/mobjects/graphing/ImplicitFunction.d.ts.map +1 -1
- package/dist/mobjects/graphing/NumberLine.d.ts +2 -8
- package/dist/mobjects/graphing/NumberLine.d.ts.map +1 -1
- package/dist/mobjects/graphing/NumberPlane.d.ts +1 -4
- package/dist/mobjects/graphing/NumberPlane.d.ts.map +1 -1
- package/dist/mobjects/graphing/ParametricFunction.d.ts +1 -4
- package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -1
- package/dist/mobjects/graphing/Vector.d.ts +1 -4
- package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
- package/dist/mobjects/graphing/VectorField.d.ts +3 -12
- package/dist/mobjects/graphing/VectorField.d.ts.map +1 -1
- package/dist/mobjects/image/index.d.ts +6 -4
- package/dist/mobjects/image/index.d.ts.map +1 -1
- package/dist/mobjects/matrix/Matrix.d.ts +4 -16
- package/dist/mobjects/matrix/Matrix.d.ts.map +1 -1
- package/dist/mobjects/point/Mobject1D.d.ts +1 -4
- package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
- package/dist/mobjects/point/Mobject2D.d.ts +1 -1
- package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
- package/dist/mobjects/point/PGroup.d.ts +2 -4
- package/dist/mobjects/point/PGroup.d.ts.map +1 -1
- package/dist/mobjects/point/PMobject.d.ts +49 -13
- package/dist/mobjects/point/PMobject.d.ts.map +1 -1
- package/dist/mobjects/point/PointCloudDot.d.ts +1 -4
- package/dist/mobjects/point/PointCloudDot.d.ts.map +1 -1
- package/dist/mobjects/point/PointMobject.d.ts +13 -17
- package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
- package/dist/mobjects/probability/DiceFace.d.ts +1 -5
- package/dist/mobjects/probability/DiceFace.d.ts.map +1 -1
- package/dist/mobjects/probability/SampleSpace.d.ts +1 -5
- package/dist/mobjects/probability/SampleSpace.d.ts.map +1 -1
- package/dist/mobjects/svg/Brace.d.ts +5 -20
- package/dist/mobjects/svg/Brace.d.ts.map +1 -1
- package/dist/mobjects/svg/SVGMobject.d.ts +2 -2
- package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -1
- package/dist/mobjects/table/Table.d.ts +1 -5
- package/dist/mobjects/table/Table.d.ts.map +1 -1
- package/dist/mobjects/text/Code.d.ts +1 -4
- package/dist/mobjects/text/Code.d.ts.map +1 -1
- package/dist/mobjects/text/CodeHighlighting.d.ts.map +1 -1
- package/dist/mobjects/text/CodeLanguageData.d.ts.map +1 -1
- package/dist/mobjects/text/DecimalNumber.d.ts +2 -8
- package/dist/mobjects/text/DecimalNumber.d.ts.map +1 -1
- package/dist/mobjects/text/GlyphVMobject.d.ts +1 -1
- package/dist/mobjects/text/GlyphVMobject.d.ts.map +1 -1
- package/dist/mobjects/text/MarkupText.d.ts +1 -1
- package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
- package/dist/mobjects/text/MathJaxBundle.d.ts +7 -0
- package/dist/mobjects/text/MathJaxBundle.d.ts.map +1 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts +9 -0
- package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
- package/dist/mobjects/text/MathTex.d.ts +17 -4
- package/dist/mobjects/text/MathTex.d.ts.map +1 -1
- package/dist/mobjects/text/MathTexImage.d.ts +19 -4
- package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
- package/dist/mobjects/text/Paragraph.d.ts +1 -1
- package/dist/mobjects/text/Paragraph.d.ts.map +1 -1
- package/dist/mobjects/text/Tex.d.ts +2 -5
- package/dist/mobjects/text/Tex.d.ts.map +1 -1
- package/dist/mobjects/text/Text.d.ts +17 -1
- package/dist/mobjects/text/Text.d.ts.map +1 -1
- package/dist/mobjects/text/TextExtensions.d.ts +3 -12
- package/dist/mobjects/text/TextExtensions.d.ts.map +1 -1
- package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -1
- package/dist/mobjects/text/Variable.d.ts +2 -4
- package/dist/mobjects/text/Variable.d.ts.map +1 -1
- package/dist/mobjects/text/katexStyles.d.ts.map +1 -1
- package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
- package/dist/mobjects/three-d/Arrow3D.d.ts +4 -3
- package/dist/mobjects/three-d/Arrow3D.d.ts.map +1 -1
- package/dist/mobjects/three-d/ConvexHull3D.d.ts +4 -3
- package/dist/mobjects/three-d/ConvexHull3D.d.ts.map +1 -1
- package/dist/mobjects/three-d/Cube.d.ts +6 -11
- package/dist/mobjects/three-d/Cube.d.ts.map +1 -1
- package/dist/mobjects/three-d/Cylinder.d.ts +5 -10
- package/dist/mobjects/three-d/Cylinder.d.ts.map +1 -1
- package/dist/mobjects/three-d/Line3D.d.ts +14 -59
- package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
- package/dist/mobjects/three-d/Mobject3D.d.ts +19 -0
- package/dist/mobjects/three-d/Mobject3D.d.ts.map +1 -0
- package/dist/mobjects/three-d/ParametricSurface.d.ts +1 -1
- package/dist/mobjects/three-d/ParametricSurface.d.ts.map +1 -1
- package/dist/mobjects/three-d/Polyhedra.d.ts +7 -6
- package/dist/mobjects/three-d/Polyhedra.d.ts.map +1 -1
- package/dist/mobjects/three-d/Sphere.d.ts +4 -6
- package/dist/mobjects/three-d/Sphere.d.ts.map +1 -1
- package/dist/mobjects/three-d/Surface3D.d.ts +41 -4
- package/dist/mobjects/three-d/Surface3D.d.ts.map +1 -1
- package/dist/mobjects/three-d/TexturedSurface.d.ts +4 -3
- package/dist/mobjects/three-d/TexturedSurface.d.ts.map +1 -1
- package/dist/mobjects/three-d/ThreeDAxes.d.ts +1 -1
- package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts +7 -15
- package/dist/mobjects/three-d/ThreeDExtensions.d.ts.map +1 -1
- package/dist/mobjects/three-d/Torus.d.ts +4 -6
- package/dist/mobjects/three-d/Torus.d.ts.map +1 -1
- package/dist/mobjects/three-d/index.d.ts +1 -0
- package/dist/mobjects/three-d/index.d.ts.map +1 -1
- package/dist/mobjects/value-tracker/ValueTracker.d.ts +4 -2
- package/dist/mobjects/value-tracker/ValueTracker.d.ts.map +1 -1
- package/dist/player/Player.d.ts +36 -29
- package/dist/player/Player.d.ts.map +1 -1
- package/dist/player/PlayerUI.d.ts.map +1 -1
- package/dist/player/RecordingScene.d.ts +37 -0
- package/dist/player/RecordingScene.d.ts.map +1 -0
- package/dist/{src-CW4pfZdP.js → src-Bm3ebFjQ.js} +11003 -8942
- package/dist/test-setup/vitest-setup.d.ts +20 -0
- package/dist/test-setup/vitest-setup.d.ts.map +1 -0
- package/dist/utils/axis.d.ts +4 -0
- package/dist/utils/axis.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +37 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/math.d.ts +4 -0
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/vectors.d.ts +54 -1
- package/dist/utils/vectors.d.ts.map +1 -1
- package/package.json +13 -8
- package/dist/AmsConfiguration-BMyoprhk.js +0 -847
- package/dist/AmsConfiguration-BdxxYRby.js +0 -847
- package/dist/ConfigMacrosConfiguration-B8X_JSVI.js +0 -46
- package/dist/ConfigMacrosConfiguration-DUxp6DUV.js +0 -46
- package/dist/Entities-B1o7gN0J.js +0 -429
- package/dist/Entities-C82lnCux.js +0 -429
- package/dist/Factory-BKM7FEO-.js +0 -107
- package/dist/Factory-D-whCqrb.js +0 -107
- package/dist/GifExporter-BrxY_q7e.js +0 -338
- package/dist/GifExporter-S2pbxMc5.js +0 -338
- package/dist/HtmlNode-BLmQ2r7U.js +0 -981
- package/dist/HtmlNode-DXGeKrcW.js +0 -981
- package/dist/InputJax-DL9oUQY4.js +0 -41
- package/dist/InputJax-DnDWM3Y0.js +0 -41
- package/dist/NewcommandConfiguration-BPjclFig.js +0 -32
- package/dist/NewcommandConfiguration-bJ6P1rBY.js +0 -32
- package/dist/NewcommandMethods-C_E3iLoK.js +0 -187
- package/dist/NewcommandMethods-Cb7yFm5P.js +0 -187
- package/dist/Options-DRlTi0G8.js +0 -63
- package/dist/Options-XPptO-6X.js +0 -63
- package/dist/ParseMethods-BMPfzfQC.js +0 -2636
- package/dist/ParseMethods-D3_HeS1K.js +0 -2636
- package/dist/Styles-Dky5jZUe.js +0 -293
- package/dist/Styles-J-6R3Vr8.js +0 -293
- package/dist/VideoExporter-6ikT3u9H.js +0 -102
- package/dist/VideoExporter-D_RxVahH.js +0 -102
- package/dist/html-DU38zqaN.js +0 -829
- package/dist/html-DjkQuIHJ.js +0 -829
- package/dist/lengths-CP7zmbxJ.js +0 -54
- package/dist/lengths-D4tR1gYA.js +0 -54
- package/dist/liteAdaptor-BLgze3o2.js +0 -616
- package/dist/liteAdaptor-zXv-jsO1.js +0 -616
- package/dist/mathjax-7LgaTjtj.js +0 -121
- package/dist/mathjax-CoSFlQ0H.js +0 -121
- package/dist/mo-C5uLT3Z9.js +0 -2675
- package/dist/mo-CNYDGAsg.js +0 -2675
- package/dist/rolldown-runtime-DnwLefa7.js +0 -23
- package/dist/svg-CYweEoZ1.js +0 -28698
- package/dist/tex-C4_queV-.js +0 -1423
- package/dist/tex-CA5MLeEe.js +0 -1423
package/dist/Styles-Dky5jZUe.js
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./mathjax-7LgaTjtj.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 };
|
package/dist/Styles-J-6R3Vr8.js
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./mathjax-CoSFlQ0H.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 };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-DnwLefa7.js";
|
|
2
|
-
//#region src/export/VideoExporter.ts
|
|
3
|
-
var t = /* @__PURE__ */ e({
|
|
4
|
-
VideoExporter: () => n,
|
|
5
|
-
createVideoExporter: () => r
|
|
6
|
-
}), n = class e {
|
|
7
|
-
_scene;
|
|
8
|
-
_options;
|
|
9
|
-
_mediaRecorder = null;
|
|
10
|
-
_recordedChunks = [];
|
|
11
|
-
_isRecording = !1;
|
|
12
|
-
constructor(e, t) {
|
|
13
|
-
this._scene = e, this._options = {
|
|
14
|
-
fps: t?.fps ?? 60,
|
|
15
|
-
quality: t?.quality ?? .9,
|
|
16
|
-
format: t?.format ?? "webm",
|
|
17
|
-
width: t?.width ?? e.getWidth(),
|
|
18
|
-
height: t?.height ?? e.getHeight(),
|
|
19
|
-
duration: t?.duration ?? 0,
|
|
20
|
-
onProgress: t?.onProgress ?? (() => {}),
|
|
21
|
-
includeAudio: t?.includeAudio ?? !0,
|
|
22
|
-
audioManager: t?.audioManager ?? null
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
_getAudioManager() {
|
|
26
|
-
if (this._options.audioManager) return this._options.audioManager;
|
|
27
|
-
try {
|
|
28
|
-
let e = this._scene.audioManager;
|
|
29
|
-
return e.tracks.length > 0 ? e : null;
|
|
30
|
-
} catch (e) {
|
|
31
|
-
return console.warn("AudioManager unavailable; exporting without audio:", e), null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async startRecording() {
|
|
35
|
-
if (this._isRecording) throw Error("Already recording");
|
|
36
|
-
let e = this._scene.getCanvas().captureStream(this._options.fps), t = this._options.includeAudio ? this._getAudioManager() : null, n;
|
|
37
|
-
if (t && t.tracks.length > 0) {
|
|
38
|
-
let r = t.createStreamDestination().stream.getAudioTracks();
|
|
39
|
-
n = new MediaStream([...e.getVideoTracks(), ...r]);
|
|
40
|
-
} else n = e;
|
|
41
|
-
let r;
|
|
42
|
-
if (this._options.format === "webm" ? r = "video/webm;codecs=vp9" : this._options.format === "mov" ? MediaRecorder.isTypeSupported("video/quicktime") ? r = "video/quicktime" : (console.warn("MOV format not supported by this browser, falling back to WebM"), r = "video/webm;codecs=vp9") : r = "video/mp4", !MediaRecorder.isTypeSupported(r)) throw Error(`Format ${r} is not supported by this browser`);
|
|
43
|
-
this._recordedChunks = [], this._mediaRecorder = new MediaRecorder(n, {
|
|
44
|
-
mimeType: r,
|
|
45
|
-
videoBitsPerSecond: Math.floor(this._options.quality * 1e7)
|
|
46
|
-
}), this._mediaRecorder.ondataavailable = (e) => {
|
|
47
|
-
e.data.size > 0 && this._recordedChunks.push(e.data);
|
|
48
|
-
}, this._mediaRecorder.start(), this._isRecording = !0;
|
|
49
|
-
}
|
|
50
|
-
async stopRecording() {
|
|
51
|
-
return new Promise((e, t) => {
|
|
52
|
-
if (!this._mediaRecorder || !this._isRecording) {
|
|
53
|
-
t(/* @__PURE__ */ Error("Not recording"));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
this._mediaRecorder.onstop = () => {
|
|
57
|
-
let t;
|
|
58
|
-
t = this._options.format === "webm" ? "video/webm" : this._options.format === "mov" ? "video/quicktime" : "video/mp4";
|
|
59
|
-
let n = new Blob(this._recordedChunks, { type: t });
|
|
60
|
-
this._isRecording = !1, e(n);
|
|
61
|
-
}, this._mediaRecorder.stop();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
async exportTimeline(e) {
|
|
65
|
-
let t = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5, n = Math.ceil(t * this._options.fps), r = 1 / this._options.fps, i = this._options.includeAudio ? this._getAudioManager() : null;
|
|
66
|
-
i && i.tracks.length > 0 && i.seek(0), await this.startRecording(), i && i.tracks.length > 0 && i.play();
|
|
67
|
-
for (let e = 0; e < n; e++) {
|
|
68
|
-
let t = e * r;
|
|
69
|
-
this._scene.seek(t), await new Promise((e) => requestAnimationFrame(e)), this._options.onProgress(e / n);
|
|
70
|
-
}
|
|
71
|
-
return i && i.isPlaying && i.stop(), this.stopRecording();
|
|
72
|
-
}
|
|
73
|
-
async exportAudio(e) {
|
|
74
|
-
let t = this._getAudioManager();
|
|
75
|
-
if (!t || t.tracks.length === 0) return null;
|
|
76
|
-
let n = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5;
|
|
77
|
-
return t.exportWAV(n);
|
|
78
|
-
}
|
|
79
|
-
static download(e, t = "animation.webm") {
|
|
80
|
-
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
81
|
-
r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
|
|
82
|
-
}
|
|
83
|
-
async exportAndDownload(t, n) {
|
|
84
|
-
let r = await this.exportTimeline(n), i = {
|
|
85
|
-
webm: ".webm",
|
|
86
|
-
mp4: ".mp4",
|
|
87
|
-
mov: ".mov"
|
|
88
|
-
}[this._options.format] ?? ".webm";
|
|
89
|
-
e.download(r, t ?? `animation${i}`);
|
|
90
|
-
}
|
|
91
|
-
isRecording() {
|
|
92
|
-
return this._isRecording;
|
|
93
|
-
}
|
|
94
|
-
getOptions() {
|
|
95
|
-
return { ...this._options };
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
function r(e, t) {
|
|
99
|
-
return new n(e, t);
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { t as n, r, n as t };
|