@drincs/pixi-vn 0.4.1 → 0.4.2

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.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as pixi_js from 'pixi.js';
2
- import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
2
+ import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, ContainerChild, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
3
3
  export { Assets } from 'pixi.js';
4
4
  import deepDiff from 'deep-diff';
5
5
 
@@ -531,13 +531,13 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
531
531
  * @param fn
532
532
  * @param context
533
533
  */
534
- on<T extends keyof ContainerEvents | keyof {
534
+ on<T extends keyof ContainerEvents<ContainerChild> | keyof {
535
535
  [K: symbol]: any;
536
536
  [K: {} & string]: any;
537
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents & {
537
+ }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
538
538
  [K: symbol]: any;
539
539
  [K: {} & string]: any;
540
- }>[Extract<T, keyof ContainerEvents | keyof {
540
+ }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
541
541
  [K: symbol]: any;
542
542
  [K: {} & string]: any;
543
543
  }>]) => void, context?: any): this;
@@ -574,7 +574,7 @@ interface CanvasImageOptions extends SpriteOptions {
574
574
  * ```
575
575
  */
576
576
  declare class CanvasImage extends CanvasSprite<ICanvasImageMemory> {
577
- constructor(options?: CanvasImageOptions | Texture | undefined);
577
+ constructor(options?: CanvasImageOptions | Texture);
578
578
  get memory(): ICanvasImageMemory;
579
579
  set memory(memory: ICanvasImageMemory);
580
580
  imageLink: string;
@@ -642,13 +642,13 @@ declare class CanvasText extends Text implements CanvasBase<ICanvasTextMemory> {
642
642
  * @param fn
643
643
  * @param context
644
644
  */
645
- on<T extends keyof ContainerEvents | keyof {
645
+ on<T extends keyof ContainerEvents<ContainerChild> | keyof {
646
646
  [K: symbol]: any;
647
647
  [K: {} & string]: any;
648
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents & {
648
+ }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
649
649
  [K: symbol]: any;
650
650
  [K: {} & string]: any;
651
- }>[Extract<T, keyof ContainerEvents | keyof {
651
+ }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
652
652
  [K: symbol]: any;
653
653
  [K: {} & string]: any;
654
654
  }>]) => void, context?: any): this;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as pixi_js from 'pixi.js';
2
- import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
2
+ import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, ContainerChild, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
3
3
  export { Assets } from 'pixi.js';
4
4
  import deepDiff from 'deep-diff';
5
5
 
@@ -531,13 +531,13 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
531
531
  * @param fn
532
532
  * @param context
533
533
  */
534
- on<T extends keyof ContainerEvents | keyof {
534
+ on<T extends keyof ContainerEvents<ContainerChild> | keyof {
535
535
  [K: symbol]: any;
536
536
  [K: {} & string]: any;
537
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents & {
537
+ }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
538
538
  [K: symbol]: any;
539
539
  [K: {} & string]: any;
540
- }>[Extract<T, keyof ContainerEvents | keyof {
540
+ }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
541
541
  [K: symbol]: any;
542
542
  [K: {} & string]: any;
543
543
  }>]) => void, context?: any): this;
@@ -574,7 +574,7 @@ interface CanvasImageOptions extends SpriteOptions {
574
574
  * ```
575
575
  */
576
576
  declare class CanvasImage extends CanvasSprite<ICanvasImageMemory> {
577
- constructor(options?: CanvasImageOptions | Texture | undefined);
577
+ constructor(options?: CanvasImageOptions | Texture);
578
578
  get memory(): ICanvasImageMemory;
579
579
  set memory(memory: ICanvasImageMemory);
580
580
  imageLink: string;
@@ -642,13 +642,13 @@ declare class CanvasText extends Text implements CanvasBase<ICanvasTextMemory> {
642
642
  * @param fn
643
643
  * @param context
644
644
  */
645
- on<T extends keyof ContainerEvents | keyof {
645
+ on<T extends keyof ContainerEvents<ContainerChild> | keyof {
646
646
  [K: symbol]: any;
647
647
  [K: {} & string]: any;
648
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents & {
648
+ }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
649
649
  [K: symbol]: any;
650
650
  [K: {} & string]: any;
651
- }>[Extract<T, keyof ContainerEvents | keyof {
651
+ }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
652
652
  [K: symbol]: any;
653
653
  [K: {} & string]: any;
654
654
  }>]) => void, context?: any): this;
package/dist/index.js CHANGED
@@ -665,7 +665,7 @@ function setMemorySprite(element, memory) {
665
665
 
666
666
  // src/classes/canvas/CanvasImage.ts
667
667
  var CanvasImage = class _CanvasImage extends CanvasSprite {
668
- constructor(options) {
668
+ constructor(options = import_pixi5.Texture.EMPTY) {
669
669
  super(options);
670
670
  this.imageLink = "";
671
671
  if (options && typeof options === "object" && "textureImage" in options && options.textureImage) {
@@ -1118,7 +1118,7 @@ function showImageWithDissolveTransition(tag, imageUrl, speed, priority) {
1118
1118
  }
1119
1119
 
1120
1120
  // src/constants.ts
1121
- var PIXIVN_VERSION = "0.4.1";
1121
+ var PIXIVN_VERSION = "0.4.2";
1122
1122
 
1123
1123
  // src/functions/SavesUtility.ts
1124
1124
  function getSaveData() {