modern-canvas 0.7.15 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import { extend } from 'colord';
3
3
  import namesPlugin from 'colord/plugins/names';
4
4
  import { Path2D, Path2DSet, svgToDom, svgToPath2DSet, Matrix3 as Matrix3$1 } from 'modern-path2d';
5
5
  import { Text } from 'modern-text';
6
- import { loadYoga, BoxSizing, PositionType, Edge, Overflow, Gutter, Justify, Wrap, FlexDirection, Display, Direction, Align } from 'yoga-layout/load';
7
6
 
8
7
  const customNodes = /* @__PURE__ */ new Map();
9
8
  function customNode(name, defaultProperties) {
@@ -2576,6 +2575,8 @@ attribute vec4 aDisableWrapMode;
2576
2575
  uniform mat3 projectionMatrix;
2577
2576
  uniform mat3 viewMatrix;
2578
2577
  uniform vec4 modulate;
2578
+ uniform float canvasWidth;
2579
+ uniform float canvasHeight;
2579
2580
 
2580
2581
  varying float vTextureId;
2581
2582
  varying vec2 vUv;
@@ -2583,6 +2584,10 @@ varying vec4 vModulate;
2583
2584
  varying vec4 vBackgroundColor;
2584
2585
  varying vec4 vDisableWrapMode;
2585
2586
 
2587
+ vec2 roundPixels(vec2 position, vec2 targetSize) {
2588
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
2589
+ }
2590
+
2586
2591
  void main(void) {
2587
2592
  mat3 modelMatrix = mat3(
2588
2593
  1.0, 0.0, 0.0,
@@ -2590,8 +2595,9 @@ void main(void) {
2590
2595
  0.0, 0.0, 1.0
2591
2596
  );
2592
2597
  vTextureId = aTextureId;
2593
- mat3 modelViewProjectionMatrix = projectionMatrix * viewMatrix * modelMatrix;
2594
- gl_Position = vec4((modelViewProjectionMatrix * vec3(aPosition, 1.0)).xy, 0.0, 1.0);
2598
+ vec3 pos = projectionMatrix * viewMatrix * modelMatrix * vec3(aPosition, 1.0);
2599
+ gl_Position = vec4(roundPixels(pos.xy, vec2(canvasWidth, canvasHeight)), 0.0, 1.0);
2600
+
2595
2601
  vUv = aUv;
2596
2602
  vModulate = aModulate * modulate;
2597
2603
  vBackgroundColor = aBackgroundColor;
@@ -2676,6 +2682,8 @@ void main(void) {
2676
2682
  renderer2.program.updateUniforms(program, {
2677
2683
  samplers,
2678
2684
  modulate: [1, 1, 1, 1],
2685
+ canvasWidth: renderer2.gl.drawingBufferWidth,
2686
+ canvasHeight: renderer2.gl.drawingBufferHeight,
2679
2687
  ...renderer2.program.uniforms
2680
2688
  });
2681
2689
  renderer2.vertexArray.bind(vao ?? vertexArray);
@@ -10344,59 +10352,123 @@ Element2D = __decorateClass$k([
10344
10352
  customNode("Element2D")
10345
10353
  ], Element2D);
10346
10354
 
10355
+ const edgeMap = {
10356
+ left: 0,
10357
+ // Edge.Left
10358
+ top: 1,
10359
+ // Edge.Top
10360
+ right: 2,
10361
+ // Edge.Right
10362
+ bottom: 3,
10363
+ // Edge.Bottom
10364
+ start: 4,
10365
+ // Edge.Start
10366
+ end: 5,
10367
+ // Edge.End
10368
+ horizontal: 6,
10369
+ // Edge.Horizontal
10370
+ vertical: 7,
10371
+ // Edge.Vertical
10372
+ all: 8
10373
+ // Edge.All
10374
+ };
10375
+ const gutterMap = {
10376
+ column: 0,
10377
+ // Gutter.Column
10378
+ row: 1,
10379
+ // Gutter.Row
10380
+ all: 2
10381
+ // Gutter.All
10382
+ };
10347
10383
  const alignMap = {
10348
- "auto": Align.Auto,
10349
- "flex-start": Align.FlexStart,
10350
- "center": Align.Center,
10351
- "flex-end": Align.FlexEnd,
10352
- "stretch": Align.Stretch,
10353
- "baseline": Align.Baseline,
10354
- "space-between": Align.SpaceBetween,
10355
- "space-around": Align.SpaceAround,
10356
- "space-evenly": Align.SpaceEvenly
10384
+ "auto": 0,
10385
+ // Align.Auto
10386
+ "flex-start": 1,
10387
+ // Align.FlexStart
10388
+ "center": 2,
10389
+ // Align.Center
10390
+ "flex-end": 3,
10391
+ // Align.FlexEnd
10392
+ "stretch": 4,
10393
+ // Align.Stretch
10394
+ "baseline": 5,
10395
+ // Align.Baseline
10396
+ "space-between": 6,
10397
+ // Align.SpaceBetween
10398
+ "space-around": 7,
10399
+ // Align.SpaceAround
10400
+ "space-evenly": 8
10401
+ // Align.SpaceEvenly
10357
10402
  };
10358
10403
  const displayMap = {
10359
- none: Display.None,
10360
- flex: Display.Flex,
10361
- contents: Display.Contents
10404
+ flex: 0,
10405
+ // Display.Flex
10406
+ none: 1,
10407
+ // Display.None
10408
+ contents: 2
10409
+ // Display.Contents
10362
10410
  };
10363
10411
  const directionMap = {
10364
- inherit: Direction.Inherit,
10365
- ltr: Direction.LTR,
10366
- rtl: Direction.RTL
10412
+ inherit: 0,
10413
+ // Direction.Inherit
10414
+ ltr: 1,
10415
+ // Direction.LTR
10416
+ rtl: 2
10417
+ // Direction.RTL
10367
10418
  };
10368
10419
  const flexDirectionMap = {
10369
- "column": FlexDirection.Column,
10370
- "column-reverse": FlexDirection.ColumnReverse,
10371
- "row": FlexDirection.Row,
10372
- "row-reverse": FlexDirection.RowReverse
10420
+ "column": 0,
10421
+ // FlexDirection.Column
10422
+ "column-reverse": 1,
10423
+ // FlexDirection.ColumnReverse
10424
+ "row": 2,
10425
+ // FlexDirection.Row
10426
+ "row-reverse": 3
10427
+ // FlexDirection.RowReverse
10373
10428
  };
10374
10429
  const flexWrapMap = {
10375
- "no-wrap": Wrap.NoWrap,
10376
- "wrap": Wrap.Wrap,
10377
- "Wrap-reverse": Wrap.WrapReverse
10430
+ "no-wrap": 0,
10431
+ // Wrap.NoWrap
10432
+ "wrap": 1,
10433
+ // Wrap.Wrap
10434
+ "Wrap-reverse": 2
10435
+ // Wrap.WrapReverse
10378
10436
  };
10379
10437
  const justifyMap = {
10380
- "flex-start": Justify.FlexStart,
10381
- "center": Justify.Center,
10382
- "flex-end": Justify.FlexEnd,
10383
- "space-between": Justify.SpaceBetween,
10384
- "space-around": Justify.SpaceAround,
10385
- "space-evenly": Justify.SpaceEvenly
10438
+ "flex-start": 0,
10439
+ // Justify.FlexStart
10440
+ "center": 1,
10441
+ // Justify.Center
10442
+ "flex-end": 2,
10443
+ // Justify.FlexEnd
10444
+ "space-between": 3,
10445
+ // Justify.SpaceBetween
10446
+ "space-around": 4,
10447
+ // Justify.SpaceAround
10448
+ "space-evenly": 5
10449
+ // Justify.SpaceEvenly
10386
10450
  };
10387
10451
  const overflowMap = {
10388
- visible: Overflow.Visible,
10389
- hidden: Overflow.Hidden,
10390
- scroll: Overflow.Scroll
10452
+ visible: 0,
10453
+ // Overflow.Visible
10454
+ hidden: 1,
10455
+ // Overflow.Hidden
10456
+ scroll: 2
10457
+ // Overflow.Scroll
10391
10458
  };
10392
10459
  const positionTypeMap = {
10393
- static: PositionType.Static,
10394
- relative: PositionType.Relative,
10395
- absolute: PositionType.Absolute
10460
+ static: 0,
10461
+ // PositionType.Static
10462
+ relative: 1,
10463
+ // PositionType.Relative
10464
+ absolute: 2
10465
+ // PositionType.Absolute
10396
10466
  };
10397
10467
  const boxSizingMap = {
10398
- "border-box": BoxSizing.BorderBox,
10399
- "content-box": BoxSizing.ContentBox
10468
+ "border-box": 0,
10469
+ // BoxSizing.BorderBox
10470
+ "content-box": 1
10471
+ // BoxSizing.ContentBox
10400
10472
  };
10401
10473
  class FlexLayout {
10402
10474
  constructor(_element) {
@@ -10404,6 +10476,7 @@ class FlexLayout {
10404
10476
  }
10405
10477
  static _yoga;
10406
10478
  static async load() {
10479
+ const { loadYoga } = await import('yoga-layout/load');
10407
10480
  this._yoga = await loadYoga();
10408
10481
  }
10409
10482
  _node = FlexLayout._yoga.Node.create();
@@ -10450,19 +10523,19 @@ class FlexLayout {
10450
10523
  this._node.setAspectRatio(value);
10451
10524
  break;
10452
10525
  case "borderTop":
10453
- this._node.setBorder(Edge.Top, this._style.borderWidth);
10526
+ this._node.setBorder(edgeMap.top, this._style.borderWidth);
10454
10527
  break;
10455
10528
  case "borderBottom":
10456
- this._node.setBorder(Edge.Bottom, this._style.borderWidth);
10529
+ this._node.setBorder(edgeMap.bottom, this._style.borderWidth);
10457
10530
  break;
10458
10531
  case "borderLeft":
10459
- this._node.setBorder(Edge.Left, this._style.borderWidth);
10532
+ this._node.setBorder(edgeMap.left, this._style.borderWidth);
10460
10533
  break;
10461
10534
  case "borderRight":
10462
- this._node.setBorder(Edge.Right, this._style.borderWidth);
10535
+ this._node.setBorder(edgeMap.right, this._style.borderWidth);
10463
10536
  break;
10464
10537
  case "border":
10465
- this._node.setBorder(Edge.All, this._style.borderWidth);
10538
+ this._node.setBorder(edgeMap.all, this._style.borderWidth);
10466
10539
  break;
10467
10540
  case "direction":
10468
10541
  this._node.setDirection(
@@ -10505,22 +10578,22 @@ class FlexLayout {
10505
10578
  );
10506
10579
  break;
10507
10580
  case "gap":
10508
- value !== void 0 && this._node.setGap(Gutter.All, value);
10581
+ value !== void 0 && this._node.setGap(gutterMap.all, value);
10509
10582
  break;
10510
10583
  case "marginTop":
10511
- this._node.setMargin(Edge.Top, value);
10584
+ this._node.setMargin(edgeMap.top, value);
10512
10585
  break;
10513
10586
  case "marginBottom":
10514
- this._node.setMargin(Edge.Top, value);
10587
+ this._node.setMargin(edgeMap.bottom, value);
10515
10588
  break;
10516
10589
  case "marginLeft":
10517
- this._node.setMargin(Edge.Left, value);
10590
+ this._node.setMargin(edgeMap.left, value);
10518
10591
  break;
10519
10592
  case "marginRight":
10520
- this._node.setMargin(Edge.Top, value);
10593
+ this._node.setMargin(edgeMap.right, value);
10521
10594
  break;
10522
10595
  case "margin":
10523
- this._node.setMargin(Edge.All, value);
10596
+ this._node.setMargin(edgeMap.all, value);
10524
10597
  break;
10525
10598
  case "maxHeight":
10526
10599
  this._node.setMaxHeight(value);
@@ -10542,31 +10615,31 @@ class FlexLayout {
10542
10615
  );
10543
10616
  break;
10544
10617
  case "paddingTop":
10545
- this._node.setPadding(Edge.Top, this._style.paddingTop);
10618
+ this._node.setPadding(edgeMap.top, this._style.paddingTop);
10546
10619
  break;
10547
10620
  case "paddingBottom":
10548
- this._node.setPadding(Edge.Bottom, this._style.paddingBottom);
10621
+ this._node.setPadding(edgeMap.bottom, this._style.paddingBottom);
10549
10622
  break;
10550
10623
  case "paddingLeft":
10551
- this._node.setPadding(Edge.Left, this._style.paddingLeft);
10624
+ this._node.setPadding(edgeMap.left, this._style.paddingLeft);
10552
10625
  break;
10553
10626
  case "paddingRight":
10554
- this._node.setPadding(Edge.Right, this._style.paddingRight);
10627
+ this._node.setPadding(edgeMap.right, this._style.paddingRight);
10555
10628
  break;
10556
10629
  case "padding":
10557
- this._node.setPadding(Edge.All, this._style.padding);
10630
+ this._node.setPadding(edgeMap.all, this._style.padding);
10558
10631
  break;
10559
10632
  case "top":
10560
- this._node.setPosition(Edge.Top, this._style.top);
10633
+ this._node.setPosition(edgeMap.top, this._style.top);
10561
10634
  break;
10562
10635
  case "bottom":
10563
- this._node.setPosition(Edge.Bottom, this._style.bottom);
10636
+ this._node.setPosition(edgeMap.bottom, this._style.bottom);
10564
10637
  break;
10565
10638
  case "left":
10566
- this._node.setPosition(Edge.Left, this._style.left);
10639
+ this._node.setPosition(edgeMap.left, this._style.left);
10567
10640
  break;
10568
10641
  case "right":
10569
- this._node.setPosition(Edge.Right, this._style.right);
10642
+ this._node.setPosition(edgeMap.right, this._style.right);
10570
10643
  break;
10571
10644
  case "position":
10572
10645
  this._node.setPositionType(
@@ -10647,7 +10720,7 @@ let FlexElement2D = class extends BaseElement2D {
10647
10720
  }
10648
10721
  }
10649
10722
  updateTransform() {
10650
- this.calculateLayout(void 0, void 0, Direction.LTR);
10723
+ this.calculateLayout(void 0, void 0, directionMap.ltr);
10651
10724
  const { left, top, width, height } = this._layout.getComputedLayout();
10652
10725
  this.position.x = left;
10653
10726
  this.position.y = top;
@@ -13430,7 +13503,7 @@ TwistTransition = __decorateClass$1([
13430
13503
  customNode("TwistTransition")
13431
13504
  ], TwistTransition);
13432
13505
 
13433
- class GIFLoader extends Loader {
13506
+ class GifLoader extends Loader {
13434
13507
  install(assets) {
13435
13508
  const handler = async (url) => {
13436
13509
  const { decodeFrames } = await import('modern-gif');
@@ -13456,7 +13529,7 @@ class GIFLoader extends Loader {
13456
13529
  }
13457
13530
  }
13458
13531
 
13459
- class JSONLoader extends Loader {
13532
+ class JsonLoader extends Loader {
13460
13533
  install(assets) {
13461
13534
  const handler = (url) => {
13462
13535
  return assets.fetch(url).then((rep) => rep.json());
@@ -13788,7 +13861,7 @@ class Assets {
13788
13861
  this._handled.clear();
13789
13862
  }
13790
13863
  }
13791
- const assets = new Assets().use(new FontLoader()).use(new GIFLoader()).use(new JSONLoader()).use(new LottieLoader()).use(new TextLoader()).use(new TextureLoader()).use(new VideoLoader());
13864
+ const assets = new Assets().use(new FontLoader()).use(new GifLoader()).use(new JsonLoader()).use(new LottieLoader()).use(new TextLoader()).use(new TextureLoader()).use(new VideoLoader());
13792
13865
 
13793
13866
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13794
13867
  var __decorateClass = (decorators, target, key, kind) => {
@@ -14233,4 +14306,4 @@ async function render(options) {
14233
14306
  });
14234
14307
  }
14235
14308
 
14236
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, Window, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag$1 as frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, render, timingFunctions, uid };
14309
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, Window, XScrollBar, YScrollBar, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag$1 as frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.7.15",
4
+ "version": "0.8.1",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "A JavaScript WebGL rendering engine.",
7
7
  "author": "wxm",
@@ -56,7 +56,8 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "lottie-web": "^5",
59
- "modern-gif": "^2"
59
+ "modern-gif": "^2",
60
+ "yoga-layout": "^3"
60
61
  },
61
62
  "peerDependenciesMeta": {
62
63
  "lottie-web": {
@@ -64,32 +65,35 @@
64
65
  },
65
66
  "modern-gif": {
66
67
  "optional": true
68
+ },
69
+ "yoga-layout": {
70
+ "optional": true
67
71
  }
68
72
  },
69
73
  "dependencies": {
70
74
  "colord": "^2.9.3",
71
75
  "earcut": "^3.0.2",
72
76
  "modern-font": "^0.4.1",
73
- "modern-idoc": "^0.8.7",
77
+ "modern-idoc": "^0.8.9",
74
78
  "modern-path2d": "^1.4.8",
75
- "modern-text": "^1.7.4",
76
- "yoga-layout": "^3.2.1"
79
+ "modern-text": "^1.7.4"
77
80
  },
78
81
  "devDependencies": {
79
- "@antfu/eslint-config": "^5.0.0",
82
+ "@antfu/eslint-config": "^5.2.1",
80
83
  "@types/earcut": "^3.0.0",
81
- "@types/node": "^24.1.0",
82
- "bumpp": "^10.2.1",
84
+ "@types/node": "^24.3.0",
85
+ "bumpp": "^10.2.3",
83
86
  "conventional-changelog-cli": "^5.0.0",
84
- "eslint": "^9.32.0",
85
- "lint-staged": "^16.1.2",
87
+ "eslint": "^9.33.0",
88
+ "lint-staged": "^16.1.5",
86
89
  "lottie-web": "^5.13.0",
87
90
  "modern-gif": "^2.0.4",
88
- "simple-git-hooks": "^2.13.0",
89
- "typescript": "^5.8.3",
90
- "unbuild": "^3.6.0",
91
- "vite": "^7.0.6",
92
- "vitest": "^3.2.4"
91
+ "simple-git-hooks": "^2.13.1",
92
+ "typescript": "^5.9.2",
93
+ "unbuild": "^3.6.1",
94
+ "vite": "^7.1.3",
95
+ "vitest": "^3.2.4",
96
+ "yoga-layout": "^3.2.1"
93
97
  },
94
98
  "simple-git-hooks": {
95
99
  "pre-commit": "pnpm lint-staged"