bard-legends-framework 1.3.2 → 1.4.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.d.mts +17 -19
- package/dist/index.d.ts +17 -19
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as actions_lib from 'actions-lib';
|
|
2
2
|
import { IDAttachable, Attachable, SingleEvent, Sequence, SingleNotifier, Notifier, Reducer, Variable, Action } from 'actions-lib';
|
|
3
|
-
import { Vector, Radian, Rectangle, Vec2, RGBColor,
|
|
3
|
+
import { Vector, Radian, Rectangle, Vec2, RGBColor, Grid, GridNeighborType, Line } from 'helpers-lib';
|
|
4
4
|
import * as Pixi from 'pixi.js';
|
|
5
5
|
|
|
6
6
|
declare class ControllerLink {
|
|
@@ -49,9 +49,12 @@ type SceneClassType = new (...services: unknown[]) => Scene<unknown, unknown>;
|
|
|
49
49
|
type SceneInput<T> = T extends Scene<infer I, any> ? I : never;
|
|
50
50
|
declare function SceneDecorator(): (SceneClass: SceneClassType) => any;
|
|
51
51
|
declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
52
|
+
static readonly isTransitioning: actions_lib.Notifier<boolean>;
|
|
53
|
+
static getIsTransitioning(this: typeof Scene): boolean;
|
|
52
54
|
static readonly activeScene: actions_lib.Notifier<Scene<unknown, unknown> | undefined>;
|
|
53
55
|
static getActiveScene(this: typeof Scene): Scene<unknown, unknown> | undefined;
|
|
54
56
|
static getActiveSceneOrFail(this: typeof Scene): Scene<unknown, unknown>;
|
|
57
|
+
static cancelActiveScene(): SingleEvent;
|
|
55
58
|
static isActive<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): boolean;
|
|
56
59
|
static getInstance<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T | undefined;
|
|
57
60
|
static getInstanceOrFail<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T;
|
|
@@ -59,6 +62,7 @@ declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
|
59
62
|
readonly onClose: actions_lib.SingleNotifier<OutputType>;
|
|
60
63
|
constructor();
|
|
61
64
|
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]): SingleEvent<OutputType>;
|
|
65
|
+
private animateAndClose;
|
|
62
66
|
protected abstract init(input: InputType): SingleEvent;
|
|
63
67
|
protected abstract update(time: number, delta: number): void;
|
|
64
68
|
protected abstract prepareToClose(): SingleEvent;
|
|
@@ -426,48 +430,42 @@ declare class DisplayObjectArray<T> extends Container {
|
|
|
426
430
|
set(items: readonly T[]): void;
|
|
427
431
|
}
|
|
428
432
|
|
|
429
|
-
type MenuUINewMenuOpenBehavior = 'close' | 'temporarilyDisappear' | 'stayInBackground';
|
|
430
|
-
type MenuCloseReason<OutputType = undefined> = TypeValuePair<{
|
|
431
|
-
backgroundClick: undefined;
|
|
432
|
-
newMenuOpened: undefined;
|
|
433
|
-
withValue: OutputType;
|
|
434
|
-
}>;
|
|
435
433
|
interface MenuOptions {
|
|
436
|
-
readonly onNewMenuOpen: MenuUINewMenuOpenBehavior;
|
|
437
434
|
readonly closeOnBackgroundClick: boolean;
|
|
438
435
|
readonly appearAnimationDuration: number;
|
|
439
436
|
readonly backgroundDarkeningRatio: number;
|
|
440
437
|
}
|
|
441
|
-
declare class MenuUI
|
|
438
|
+
declare class MenuUI extends Container {
|
|
439
|
+
static isAnyMenuTransitioning: actions_lib.Notifier<boolean>;
|
|
440
|
+
static getIsAnyMenuTransitioning(this: typeof MenuUI): boolean;
|
|
442
441
|
readonly onCreate: actions_lib.SingleNotifier<void>;
|
|
443
442
|
readonly onOpen: actions_lib.SingleNotifier<void>;
|
|
444
|
-
readonly onClose: actions_lib.SingleNotifier<
|
|
443
|
+
readonly onClose: actions_lib.SingleNotifier<void>;
|
|
445
444
|
constructor(windowSprite: string, partialOptions: Partial<MenuOptions>);
|
|
446
445
|
getBoundingMask(): Sprite;
|
|
447
|
-
close(
|
|
446
|
+
close(): SingleEvent;
|
|
448
447
|
}
|
|
449
448
|
|
|
450
449
|
interface MenuEntityOptions {
|
|
451
|
-
readonly onNewMenuOpen: MenuUINewMenuOpenBehavior;
|
|
452
450
|
readonly closeOnBackgroundClick: boolean;
|
|
453
451
|
}
|
|
454
|
-
declare class MenuEntity
|
|
452
|
+
declare class MenuEntity extends SingletonEntity {
|
|
455
453
|
constructor(partialOptions: Partial<MenuEntityOptions>);
|
|
456
454
|
onCreate(): SingleEvent;
|
|
457
455
|
onOpen(): SingleEvent;
|
|
458
|
-
onClose(): SingleEvent
|
|
459
|
-
close(
|
|
456
|
+
onClose(): SingleEvent;
|
|
457
|
+
close(): SingleEvent;
|
|
460
458
|
}
|
|
461
459
|
|
|
462
460
|
interface MenuViewOptions {
|
|
463
461
|
readonly appearAnimationDuration: number;
|
|
464
462
|
readonly backgroundDarkeningRatio: number;
|
|
465
463
|
}
|
|
466
|
-
declare class MenuView
|
|
464
|
+
declare class MenuView extends View {
|
|
467
465
|
readonly onCreate: SingleNotifier<Container>;
|
|
468
466
|
readonly onOpen: SingleNotifier;
|
|
469
|
-
readonly onClose: SingleNotifier
|
|
470
|
-
constructor(entity: MenuEntity
|
|
467
|
+
readonly onClose: SingleNotifier;
|
|
468
|
+
constructor(entity: MenuEntity, windowSprite: string, partialOptions: Partial<MenuViewOptions>);
|
|
471
469
|
}
|
|
472
470
|
|
|
473
471
|
interface ScrollAreaUIOptions {
|
|
@@ -997,4 +995,4 @@ declare class PhysicsGateway {
|
|
|
997
995
|
printPathfindingTestGrid(physicsWorldID: number, testLayerID: number, target: Vector | number, physicsBodyGroup: PhysicsBodyGroup, area: Rectangle, gridCellSize?: number): void;
|
|
998
996
|
}
|
|
999
997
|
|
|
1000
|
-
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition,
|
|
998
|
+
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as actions_lib from 'actions-lib';
|
|
2
2
|
import { IDAttachable, Attachable, SingleEvent, Sequence, SingleNotifier, Notifier, Reducer, Variable, Action } from 'actions-lib';
|
|
3
|
-
import { Vector, Radian, Rectangle, Vec2, RGBColor,
|
|
3
|
+
import { Vector, Radian, Rectangle, Vec2, RGBColor, Grid, GridNeighborType, Line } from 'helpers-lib';
|
|
4
4
|
import * as Pixi from 'pixi.js';
|
|
5
5
|
|
|
6
6
|
declare class ControllerLink {
|
|
@@ -49,9 +49,12 @@ type SceneClassType = new (...services: unknown[]) => Scene<unknown, unknown>;
|
|
|
49
49
|
type SceneInput<T> = T extends Scene<infer I, any> ? I : never;
|
|
50
50
|
declare function SceneDecorator(): (SceneClass: SceneClassType) => any;
|
|
51
51
|
declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
52
|
+
static readonly isTransitioning: actions_lib.Notifier<boolean>;
|
|
53
|
+
static getIsTransitioning(this: typeof Scene): boolean;
|
|
52
54
|
static readonly activeScene: actions_lib.Notifier<Scene<unknown, unknown> | undefined>;
|
|
53
55
|
static getActiveScene(this: typeof Scene): Scene<unknown, unknown> | undefined;
|
|
54
56
|
static getActiveSceneOrFail(this: typeof Scene): Scene<unknown, unknown>;
|
|
57
|
+
static cancelActiveScene(): SingleEvent;
|
|
55
58
|
static isActive<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): boolean;
|
|
56
59
|
static getInstance<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T | undefined;
|
|
57
60
|
static getInstanceOrFail<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T;
|
|
@@ -59,6 +62,7 @@ declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
|
59
62
|
readonly onClose: actions_lib.SingleNotifier<OutputType>;
|
|
60
63
|
constructor();
|
|
61
64
|
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]): SingleEvent<OutputType>;
|
|
65
|
+
private animateAndClose;
|
|
62
66
|
protected abstract init(input: InputType): SingleEvent;
|
|
63
67
|
protected abstract update(time: number, delta: number): void;
|
|
64
68
|
protected abstract prepareToClose(): SingleEvent;
|
|
@@ -426,48 +430,42 @@ declare class DisplayObjectArray<T> extends Container {
|
|
|
426
430
|
set(items: readonly T[]): void;
|
|
427
431
|
}
|
|
428
432
|
|
|
429
|
-
type MenuUINewMenuOpenBehavior = 'close' | 'temporarilyDisappear' | 'stayInBackground';
|
|
430
|
-
type MenuCloseReason<OutputType = undefined> = TypeValuePair<{
|
|
431
|
-
backgroundClick: undefined;
|
|
432
|
-
newMenuOpened: undefined;
|
|
433
|
-
withValue: OutputType;
|
|
434
|
-
}>;
|
|
435
433
|
interface MenuOptions {
|
|
436
|
-
readonly onNewMenuOpen: MenuUINewMenuOpenBehavior;
|
|
437
434
|
readonly closeOnBackgroundClick: boolean;
|
|
438
435
|
readonly appearAnimationDuration: number;
|
|
439
436
|
readonly backgroundDarkeningRatio: number;
|
|
440
437
|
}
|
|
441
|
-
declare class MenuUI
|
|
438
|
+
declare class MenuUI extends Container {
|
|
439
|
+
static isAnyMenuTransitioning: actions_lib.Notifier<boolean>;
|
|
440
|
+
static getIsAnyMenuTransitioning(this: typeof MenuUI): boolean;
|
|
442
441
|
readonly onCreate: actions_lib.SingleNotifier<void>;
|
|
443
442
|
readonly onOpen: actions_lib.SingleNotifier<void>;
|
|
444
|
-
readonly onClose: actions_lib.SingleNotifier<
|
|
443
|
+
readonly onClose: actions_lib.SingleNotifier<void>;
|
|
445
444
|
constructor(windowSprite: string, partialOptions: Partial<MenuOptions>);
|
|
446
445
|
getBoundingMask(): Sprite;
|
|
447
|
-
close(
|
|
446
|
+
close(): SingleEvent;
|
|
448
447
|
}
|
|
449
448
|
|
|
450
449
|
interface MenuEntityOptions {
|
|
451
|
-
readonly onNewMenuOpen: MenuUINewMenuOpenBehavior;
|
|
452
450
|
readonly closeOnBackgroundClick: boolean;
|
|
453
451
|
}
|
|
454
|
-
declare class MenuEntity
|
|
452
|
+
declare class MenuEntity extends SingletonEntity {
|
|
455
453
|
constructor(partialOptions: Partial<MenuEntityOptions>);
|
|
456
454
|
onCreate(): SingleEvent;
|
|
457
455
|
onOpen(): SingleEvent;
|
|
458
|
-
onClose(): SingleEvent
|
|
459
|
-
close(
|
|
456
|
+
onClose(): SingleEvent;
|
|
457
|
+
close(): SingleEvent;
|
|
460
458
|
}
|
|
461
459
|
|
|
462
460
|
interface MenuViewOptions {
|
|
463
461
|
readonly appearAnimationDuration: number;
|
|
464
462
|
readonly backgroundDarkeningRatio: number;
|
|
465
463
|
}
|
|
466
|
-
declare class MenuView
|
|
464
|
+
declare class MenuView extends View {
|
|
467
465
|
readonly onCreate: SingleNotifier<Container>;
|
|
468
466
|
readonly onOpen: SingleNotifier;
|
|
469
|
-
readonly onClose: SingleNotifier
|
|
470
|
-
constructor(entity: MenuEntity
|
|
467
|
+
readonly onClose: SingleNotifier;
|
|
468
|
+
constructor(entity: MenuEntity, windowSprite: string, partialOptions: Partial<MenuViewOptions>);
|
|
471
469
|
}
|
|
472
470
|
|
|
473
471
|
interface ScrollAreaUIOptions {
|
|
@@ -997,4 +995,4 @@ declare class PhysicsGateway {
|
|
|
997
995
|
printPathfindingTestGrid(physicsWorldID: number, testLayerID: number, target: Vector | number, physicsBodyGroup: PhysicsBodyGroup, area: Rectangle, gridCellSize?: number): void;
|
|
998
996
|
}
|
|
999
997
|
|
|
1000
|
-
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition,
|
|
998
|
+
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|