modern-canvas 0.4.52 → 0.4.54

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.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1811,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1811
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1812
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1813
1804
  protected _process(delta: number): void;
1814
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1815
1806
  protected _render(renderer: WebGLRenderer): void;
1816
1807
  }
1817
1808
 
@@ -1897,6 +1888,7 @@ interface BaseElement2DFill extends NormalizedFill {
1897
1888
  }
1898
1889
  declare class BaseElement2DFill extends CoreObject {
1899
1890
  parent: BaseElement2D;
1891
+ enabled: boolean;
1900
1892
  color?: NormalizedFill['color'];
1901
1893
  image?: NormalizedFill['image'];
1902
1894
  linearGradient?: NormalizedFill['linearGradient'];
@@ -1937,6 +1929,7 @@ declare class BaseElement2DForeground extends BaseElement2DFill {
1937
1929
  }
1938
1930
 
1939
1931
  declare class BaseElement2DOutline extends BaseElement2DFill {
1932
+ enabled: boolean;
1940
1933
  color: NormalizedOutline['color'];
1941
1934
  width: NormalizedOutline['width'];
1942
1935
  style: NormalizedOutline['style'];
@@ -1948,6 +1941,7 @@ declare class BaseElement2DOutline extends BaseElement2DFill {
1948
1941
 
1949
1942
  declare class BaseElement2DShadow extends CoreObject {
1950
1943
  parent: BaseElement2D;
1944
+ enabled: boolean;
1951
1945
  color: NormalizedShadow['color'];
1952
1946
  blur: NormalizedShadow['blur'];
1953
1947
  offsetY: NormalizedShadow['offsetX'];
@@ -1960,6 +1954,7 @@ declare class BaseElement2DShadow extends CoreObject {
1960
1954
 
1961
1955
  declare class BaseElement2DShape extends CoreObject {
1962
1956
  parent: BaseElement2D;
1957
+ enabled: boolean;
1963
1958
  preset?: Required<NormalizedShape>['preset'];
1964
1959
  svg?: Required<NormalizedShape>['svg'];
1965
1960
  viewBox?: Required<NormalizedShape>['viewBox'];
@@ -1987,13 +1982,14 @@ declare class BaseElement2DStyle extends Resource {
1987
1982
 
1988
1983
  declare class BaseElement2DText extends CoreObject {
1989
1984
  parent: BaseElement2D;
1990
- content: TextOptions['content'];
1991
- effects?: TextOptions['effects'];
1992
- measureDom?: TextOptions['measureDom'];
1993
- fonts?: TextOptions['fonts'];
1985
+ enabled: boolean;
1986
+ content: Text['content'];
1987
+ effects?: Text['effects'];
1988
+ measureDOM?: Text['measureDOM'];
1989
+ fonts?: Text['fonts'];
1994
1990
  constructor(parent: BaseElement2D);
1991
+ base: Text;
1995
1992
  texture: CanvasTexture;
1996
- baseText: Text;
1997
1993
  measureResult?: MeasureResult;
1998
1994
  setProperties(properties?: Text$1): this;
1999
1995
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2265,10 +2261,10 @@ interface Text2D {
2265
2261
  */
2266
2262
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2267
2263
  split: boolean;
2268
- content: TextOptions['content'];
2269
- effects?: TextOptions['effects'];
2270
- measureDom?: TextOptions['measureDom'];
2271
- fonts?: TextOptions['fonts'];
2264
+ content: Text['content'];
2265
+ effects?: Text['effects'];
2266
+ measureDOM?: Text['measureDOM'];
2267
+ fonts?: Text['fonts'];
2272
2268
  texture: CanvasTexture;
2273
2269
  base: Text;
2274
2270
  measureResult?: MeasureResult;
@@ -2350,7 +2346,7 @@ declare class Animation extends TimelineNode {
2350
2346
  easing?: Easing;
2351
2347
  protected _keyframes: NormalizedKeyframe[];
2352
2348
  protected _isFirstUpdatePosition: boolean;
2353
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2349
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2354
2350
  protected _stoped: boolean;
2355
2351
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2356
2352
  protected _parented(parent: Node): void;
@@ -3271,5 +3267,5 @@ interface RenderOptions {
3271
3267
  }
3272
3268
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3273
3269
 
3274
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3275
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3270
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3271
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1811,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1811
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1812
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1813
1804
  protected _process(delta: number): void;
1814
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1815
1806
  protected _render(renderer: WebGLRenderer): void;
1816
1807
  }
1817
1808
 
@@ -1897,6 +1888,7 @@ interface BaseElement2DFill extends NormalizedFill {
1897
1888
  }
1898
1889
  declare class BaseElement2DFill extends CoreObject {
1899
1890
  parent: BaseElement2D;
1891
+ enabled: boolean;
1900
1892
  color?: NormalizedFill['color'];
1901
1893
  image?: NormalizedFill['image'];
1902
1894
  linearGradient?: NormalizedFill['linearGradient'];
@@ -1937,6 +1929,7 @@ declare class BaseElement2DForeground extends BaseElement2DFill {
1937
1929
  }
1938
1930
 
1939
1931
  declare class BaseElement2DOutline extends BaseElement2DFill {
1932
+ enabled: boolean;
1940
1933
  color: NormalizedOutline['color'];
1941
1934
  width: NormalizedOutline['width'];
1942
1935
  style: NormalizedOutline['style'];
@@ -1948,6 +1941,7 @@ declare class BaseElement2DOutline extends BaseElement2DFill {
1948
1941
 
1949
1942
  declare class BaseElement2DShadow extends CoreObject {
1950
1943
  parent: BaseElement2D;
1944
+ enabled: boolean;
1951
1945
  color: NormalizedShadow['color'];
1952
1946
  blur: NormalizedShadow['blur'];
1953
1947
  offsetY: NormalizedShadow['offsetX'];
@@ -1960,6 +1954,7 @@ declare class BaseElement2DShadow extends CoreObject {
1960
1954
 
1961
1955
  declare class BaseElement2DShape extends CoreObject {
1962
1956
  parent: BaseElement2D;
1957
+ enabled: boolean;
1963
1958
  preset?: Required<NormalizedShape>['preset'];
1964
1959
  svg?: Required<NormalizedShape>['svg'];
1965
1960
  viewBox?: Required<NormalizedShape>['viewBox'];
@@ -1987,13 +1982,14 @@ declare class BaseElement2DStyle extends Resource {
1987
1982
 
1988
1983
  declare class BaseElement2DText extends CoreObject {
1989
1984
  parent: BaseElement2D;
1990
- content: TextOptions['content'];
1991
- effects?: TextOptions['effects'];
1992
- measureDom?: TextOptions['measureDom'];
1993
- fonts?: TextOptions['fonts'];
1985
+ enabled: boolean;
1986
+ content: Text['content'];
1987
+ effects?: Text['effects'];
1988
+ measureDOM?: Text['measureDOM'];
1989
+ fonts?: Text['fonts'];
1994
1990
  constructor(parent: BaseElement2D);
1991
+ base: Text;
1995
1992
  texture: CanvasTexture;
1996
- baseText: Text;
1997
1993
  measureResult?: MeasureResult;
1998
1994
  setProperties(properties?: Text$1): this;
1999
1995
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2265,10 +2261,10 @@ interface Text2D {
2265
2261
  */
2266
2262
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2267
2263
  split: boolean;
2268
- content: TextOptions['content'];
2269
- effects?: TextOptions['effects'];
2270
- measureDom?: TextOptions['measureDom'];
2271
- fonts?: TextOptions['fonts'];
2264
+ content: Text['content'];
2265
+ effects?: Text['effects'];
2266
+ measureDOM?: Text['measureDOM'];
2267
+ fonts?: Text['fonts'];
2272
2268
  texture: CanvasTexture;
2273
2269
  base: Text;
2274
2270
  measureResult?: MeasureResult;
@@ -2350,7 +2346,7 @@ declare class Animation extends TimelineNode {
2350
2346
  easing?: Easing;
2351
2347
  protected _keyframes: NormalizedKeyframe[];
2352
2348
  protected _isFirstUpdatePosition: boolean;
2353
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2349
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2354
2350
  protected _stoped: boolean;
2355
2351
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2356
2352
  protected _parented(parent: Node): void;
@@ -3271,5 +3267,5 @@ interface RenderOptions {
3271
3267
  }
3272
3268
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3273
3269
 
3274
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3275
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3270
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3271
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Font } from 'modern-font';
2
+ import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
3
+ export { Color as ColorValue } from 'modern-idoc';
2
4
  import { AnimationItem } from 'lottie-web';
3
5
  import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
4
- import { Color as Color$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
5
- export { Color as ColorValue } from 'modern-idoc';
6
6
  import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
7
- import { TextOptions, Text, MeasureResult } from 'modern-text';
7
+ import { Text, MeasureResult, TextOptions } from 'modern-text';
8
8
  import { Node as Node$1, Direction } from 'yoga-layout/load';
9
9
 
10
10
  declare abstract class Loader {
@@ -19,15 +19,6 @@ declare class FontLoader extends Loader {
19
19
  declare const customNodes: Map<string, any>;
20
20
  declare function customNode<T = Record<string, any>>(tag: string, defaultProperties?: Partial<T>): ClassDecorator;
21
21
 
22
- interface PropertyDeclaration {
23
- readonly default?: any | (() => any);
24
- readonly protected?: boolean;
25
- readonly alias?: string;
26
- }
27
- declare function getDeclarations(constructor: any): Map<PropertyKey, PropertyDeclaration>;
28
- declare function defineProperty(constructor: any, name: PropertyKey, declaration?: PropertyDeclaration): void;
29
- declare function property(options?: PropertyDeclaration): PropertyDecorator;
30
-
31
22
  declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
32
23
 
33
24
  declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
@@ -106,7 +97,7 @@ declare class CoreObject extends EventEmitter {
106
97
  getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
107
98
  setProperties(properties?: any): this;
108
99
  resetProperties(): this;
109
- requestUpdate(key?: PropertyKey, oldValue?: unknown, declaration?: PropertyDeclaration): void;
100
+ requestUpdate(key?: PropertyKey, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
110
101
  toJSON(): Record<string, any>;
111
102
  clone(): this;
112
103
  free(): void;
@@ -753,7 +744,7 @@ interface WebGLProgramMeta {
753
744
  name: string;
754
745
  location: WebGLUniformLocation | null;
755
746
  }>;
756
- boundUniforms: RawWeakMap<object, any>;
747
+ boundUniforms: RawWeakMap$1<object, any>;
757
748
  }
758
749
  interface WebGLProgramOptions {
759
750
  vert: string;
@@ -1811,7 +1802,7 @@ declare class CanvasItem extends TimelineNode {
1811
1802
  protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
1812
1803
  protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
1813
1804
  protected _process(delta: number): void;
1814
- protected _update(): void;
1805
+ protected _update(changed: Map<PropertyKey, any>): void;
1815
1806
  protected _render(renderer: WebGLRenderer): void;
1816
1807
  }
1817
1808
 
@@ -1897,6 +1888,7 @@ interface BaseElement2DFill extends NormalizedFill {
1897
1888
  }
1898
1889
  declare class BaseElement2DFill extends CoreObject {
1899
1890
  parent: BaseElement2D;
1891
+ enabled: boolean;
1900
1892
  color?: NormalizedFill['color'];
1901
1893
  image?: NormalizedFill['image'];
1902
1894
  linearGradient?: NormalizedFill['linearGradient'];
@@ -1937,6 +1929,7 @@ declare class BaseElement2DForeground extends BaseElement2DFill {
1937
1929
  }
1938
1930
 
1939
1931
  declare class BaseElement2DOutline extends BaseElement2DFill {
1932
+ enabled: boolean;
1940
1933
  color: NormalizedOutline['color'];
1941
1934
  width: NormalizedOutline['width'];
1942
1935
  style: NormalizedOutline['style'];
@@ -1948,6 +1941,7 @@ declare class BaseElement2DOutline extends BaseElement2DFill {
1948
1941
 
1949
1942
  declare class BaseElement2DShadow extends CoreObject {
1950
1943
  parent: BaseElement2D;
1944
+ enabled: boolean;
1951
1945
  color: NormalizedShadow['color'];
1952
1946
  blur: NormalizedShadow['blur'];
1953
1947
  offsetY: NormalizedShadow['offsetX'];
@@ -1960,6 +1954,7 @@ declare class BaseElement2DShadow extends CoreObject {
1960
1954
 
1961
1955
  declare class BaseElement2DShape extends CoreObject {
1962
1956
  parent: BaseElement2D;
1957
+ enabled: boolean;
1963
1958
  preset?: Required<NormalizedShape>['preset'];
1964
1959
  svg?: Required<NormalizedShape>['svg'];
1965
1960
  viewBox?: Required<NormalizedShape>['viewBox'];
@@ -1987,13 +1982,14 @@ declare class BaseElement2DStyle extends Resource {
1987
1982
 
1988
1983
  declare class BaseElement2DText extends CoreObject {
1989
1984
  parent: BaseElement2D;
1990
- content: TextOptions['content'];
1991
- effects?: TextOptions['effects'];
1992
- measureDom?: TextOptions['measureDom'];
1993
- fonts?: TextOptions['fonts'];
1985
+ enabled: boolean;
1986
+ content: Text['content'];
1987
+ effects?: Text['effects'];
1988
+ measureDOM?: Text['measureDOM'];
1989
+ fonts?: Text['fonts'];
1994
1990
  constructor(parent: BaseElement2D);
1991
+ base: Text;
1995
1992
  texture: CanvasTexture;
1996
- baseText: Text;
1997
1993
  measureResult?: MeasureResult;
1998
1994
  setProperties(properties?: Text$1): this;
1999
1995
  protected _updateProperty(key: PropertyKey, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
@@ -2265,10 +2261,10 @@ interface Text2D {
2265
2261
  */
2266
2262
  declare class Text2D extends TextureRect2D<CanvasTexture> {
2267
2263
  split: boolean;
2268
- content: TextOptions['content'];
2269
- effects?: TextOptions['effects'];
2270
- measureDom?: TextOptions['measureDom'];
2271
- fonts?: TextOptions['fonts'];
2264
+ content: Text['content'];
2265
+ effects?: Text['effects'];
2266
+ measureDOM?: Text['measureDOM'];
2267
+ fonts?: Text['fonts'];
2272
2268
  texture: CanvasTexture;
2273
2269
  base: Text;
2274
2270
  measureResult?: MeasureResult;
@@ -2350,7 +2346,7 @@ declare class Animation extends TimelineNode {
2350
2346
  easing?: Easing;
2351
2347
  protected _keyframes: NormalizedKeyframe[];
2352
2348
  protected _isFirstUpdatePosition: boolean;
2353
- protected _cachedProps: RawWeakMap<any, Map<string, any>>;
2349
+ protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
2354
2350
  protected _stoped: boolean;
2355
2351
  constructor(properties?: Partial<AnimationProperties>, children?: Node[]);
2356
2352
  protected _parented(parent: Node): void;
@@ -3271,5 +3267,5 @@ interface RenderOptions {
3271
3267
  }
3272
3268
  declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
3273
3269
 
3274
- export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
3275
- export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, PropertyDeclaration, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
3270
+ export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, 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, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, 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, Text2D, 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, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, protectedProperty, render, timingFunctions, uid };
3271
+ export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };