@league-of-foundry-developers/foundry-vtt-types 9.242.0 → 9.245.0
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/package.json +1 -1
- package/src/foundry/common/utils/primitives.mjs.d.ts +7 -0
- package/src/foundry/foundry.js/application.d.ts +138 -110
- package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
- package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
- package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
- package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
- package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
- package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +1 -1
- package/src/foundry/foundry.js/canvas.d.ts +5 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +8 -4
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
- package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/config.d.ts +5 -2
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/pixi/index.d.ts +2 -0
- package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/roll.d.ts +13 -11
- package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
- package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
- package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
- package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
@@ -249,6 +249,9 @@ declare global {
|
|
249
249
|
/** @defaultValue `Cards` */
|
250
250
|
documentClass: ConfiguredDocumentClassOrDefault<typeof Cards>;
|
251
251
|
|
252
|
+
/** @defaultValue `"fas fa-id-badge"` */
|
253
|
+
sidebarIcon: string;
|
254
|
+
|
252
255
|
presets: {
|
253
256
|
/**
|
254
257
|
* @defaultValue
|
@@ -505,7 +508,7 @@ declare global {
|
|
505
508
|
/** @defaultValue `Macros` */
|
506
509
|
collection: ConstructorOf<Macros>;
|
507
510
|
|
508
|
-
/** @defaultValue `'fas fa-
|
511
|
+
/** @defaultValue `'fas fa-code'` */
|
509
512
|
sidebarIcon: string;
|
510
513
|
};
|
511
514
|
|
@@ -973,7 +976,7 @@ declare global {
|
|
973
976
|
|
974
977
|
/**
|
975
978
|
* Suggested font families that are displayed wherever a choice is presented
|
976
|
-
* @defaultValue `[
|
979
|
+
* @defaultValue `["Arial", "Courier", "Courier New", "Helvetica", "Signika", "Times", "Times New Roman", "Modesto Condensed"]`
|
977
980
|
*/
|
978
981
|
fontFamilies: string[];
|
979
982
|
|
@@ -1,3 +1,27 @@
|
|
1
|
+
interface DragDropConfiguration {
|
2
|
+
/**
|
3
|
+
* The CSS selector used to target draggable elements.
|
4
|
+
*/
|
5
|
+
dragSelector?: DragDrop['dragSelector'];
|
6
|
+
|
7
|
+
/**
|
8
|
+
* The CSS selector used to target viable drop targets.
|
9
|
+
*/
|
10
|
+
dropSelector?: DragDrop['dropSelector'];
|
11
|
+
|
12
|
+
/**
|
13
|
+
* An object of permission test functions for each action
|
14
|
+
* @defaultValue `{}`
|
15
|
+
*/
|
16
|
+
permissions?: DragDrop['permissions'];
|
17
|
+
|
18
|
+
/**
|
19
|
+
* An object of callback functions for each action
|
20
|
+
* @defaultValue `{}`
|
21
|
+
*/
|
22
|
+
callbacks?: DragDrop['callbacks'];
|
23
|
+
}
|
24
|
+
|
1
25
|
/**
|
2
26
|
* A controller class for managing drag and drop workflows within an Application instance.
|
3
27
|
* The controller manages the following actions: dragstart, dragover, drop
|
@@ -16,16 +40,9 @@
|
|
16
40
|
*/
|
17
41
|
declare class DragDrop {
|
18
42
|
/**
|
19
|
-
* @param
|
20
|
-
* (default: `undefined`)
|
21
|
-
* @param dropSelector - The CSS selector used to target viable drop targets.
|
22
|
-
* (default: `undefined`)
|
23
|
-
* @param permissions - An object of permission test functions for each action
|
24
|
-
* (default: `{}`)
|
25
|
-
* @param callbacks - An object of callback functions for each action
|
26
|
-
* (default: `{}`)
|
43
|
+
* @param options - (default: `{}`)
|
27
44
|
*/
|
28
|
-
constructor({ dragSelector, dropSelector, permissions, callbacks }?:
|
45
|
+
constructor({ dragSelector, dropSelector, permissions, callbacks }?: DragDropConfiguration);
|
29
46
|
|
30
47
|
/**
|
31
48
|
* The HTML selector which identifies draggable elements
|
@@ -65,7 +82,7 @@ declare class DragDrop {
|
|
65
82
|
callback(event: DragEvent, action: DragDrop.Action): void;
|
66
83
|
|
67
84
|
/**
|
68
|
-
*
|
85
|
+
* Execute a callback function associated with a certain action in the workflow
|
69
86
|
* @param action - The action being attempted
|
70
87
|
* @param selector - The selector being targeted
|
71
88
|
* @returns Can the action be performed?
|
@@ -97,29 +114,5 @@ declare class DragDrop {
|
|
97
114
|
}
|
98
115
|
|
99
116
|
declare namespace DragDrop {
|
100
|
-
interface Options {
|
101
|
-
/**
|
102
|
-
* The CSS selector used to target draggable elements.
|
103
|
-
*/
|
104
|
-
dragSelector?: DragDrop['dragSelector'];
|
105
|
-
|
106
|
-
/**
|
107
|
-
* The CSS selector used to target viable drop targets.
|
108
|
-
*/
|
109
|
-
dropSelector?: DragDrop['dropSelector'];
|
110
|
-
|
111
|
-
/**
|
112
|
-
* An object of permission test functions for each action
|
113
|
-
* @defaultValue `{}`
|
114
|
-
*/
|
115
|
-
permissions?: DragDrop['permissions'];
|
116
|
-
|
117
|
-
/**
|
118
|
-
* An object of callback functions for each action
|
119
|
-
* @defaultValue `{}`
|
120
|
-
*/
|
121
|
-
callbacks?: DragDrop['callbacks'];
|
122
|
-
}
|
123
|
-
|
124
117
|
type Action = 'dragstart' | 'dragover' | 'drop';
|
125
118
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
import './samplerMesh';
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* A Mesh subclass used to render a texture with faster performance than a PIXI.Sprite.
|
3
|
+
*/
|
4
|
+
declare class SamplerMesh extends PIXI.Mesh {
|
5
|
+
/**
|
6
|
+
* The basic quad geometry used for the Mesh
|
7
|
+
* @defaultValue
|
8
|
+
* ```javascript
|
9
|
+
* new PIXI.Geometry()
|
10
|
+
* .addAttribute('aVertexPosition', [0, 0, 1, 0, 1, 1, 0, 1], 2)
|
11
|
+
* .addAttribute('aUvs', [0, 0, 1, 0, 1, 1, 0, 1], 2)
|
12
|
+
* .addIndex([0, 1, 2, 0, 2, 3])
|
13
|
+
* ```
|
14
|
+
*/
|
15
|
+
static QUAD: PIXI.Geometry;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Create a SamplerMesh using a provided RenderTexture
|
19
|
+
* @param texture - The texture to render using a Mesh
|
20
|
+
*/
|
21
|
+
static create(texture: PIXI.RenderTexture): SamplerMesh;
|
22
|
+
}
|
@@ -119,6 +119,14 @@ declare global {
|
|
119
119
|
/** @override */
|
120
120
|
protected _compute(): void;
|
121
121
|
|
122
|
+
/**
|
123
|
+
* Round vertices of a ray segment
|
124
|
+
* @param ray - The provided ray
|
125
|
+
* @returns The ray with rounded vertices
|
126
|
+
* @internal
|
127
|
+
*/
|
128
|
+
protected _roundRayVertices(ray: Ray): Ray;
|
129
|
+
|
122
130
|
/**
|
123
131
|
* Translate walls and other obstacles into edges which limit visibility
|
124
132
|
* @internal
|
@@ -4,6 +4,13 @@
|
|
4
4
|
declare class NormalizedRectangle extends PIXI.Rectangle {
|
5
5
|
constructor(x: number, y: number, width: number, height: number);
|
6
6
|
|
7
|
+
/**
|
8
|
+
* Determine whether some other Rectangle intersects with this one.
|
9
|
+
* @param other - Some other rectangle against which to compare
|
10
|
+
* @returns Do the rectangles intersect?
|
11
|
+
*/
|
12
|
+
intersects(other: PIXI.Rectangle): boolean;
|
13
|
+
|
7
14
|
/**
|
8
15
|
* Generate a new rectangle by rotating this one clockwise about its center by a certain number of radians
|
9
16
|
* @param radians - The angle of rotation
|
@@ -14,7 +14,7 @@ declare abstract class AbstractBaseShader extends PIXI.Shader {
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* The raw vertex shader used by this class.
|
17
|
-
* A subclass of AbstractBaseShader must implement the
|
17
|
+
* A subclass of AbstractBaseShader must implement the vertexShader static field.
|
18
18
|
* @defaultValue `""`
|
19
19
|
*
|
20
20
|
* @remarks This is abstract, subclasses must implement it.
|
@@ -0,0 +1 @@
|
|
1
|
+
import './synchronizedTransform';
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/**
|
2
|
+
* An extension of PIXI.Transform.
|
3
|
+
* This uses a different DisplayObject than the current parent as the reference for the worldTransform.
|
4
|
+
*/
|
5
|
+
declare class SynchronizedTransform extends PIXI.Transform {
|
6
|
+
constructor(transform: PIXI.Transform);
|
7
|
+
|
8
|
+
/**
|
9
|
+
* A list of attributes from the transform reference which should be synchronized
|
10
|
+
* @defaultValue
|
11
|
+
* ```javascript
|
12
|
+
* [
|
13
|
+
* "localTransform", "position", "scale", "pivot", "skew", "_rotation",
|
14
|
+
* "_cx", "_sx", "_cy", "_sy", "_localID", "_currentLocalID"
|
15
|
+
* ];
|
16
|
+
* ```
|
17
|
+
*/
|
18
|
+
static synchronizedAttributes: string[];
|
19
|
+
|
20
|
+
/**
|
21
|
+
* A Transform instance which defines the reference point for the worldTransform
|
22
|
+
*/
|
23
|
+
get reference(): PIXI.Transform;
|
24
|
+
|
25
|
+
set reference(value: PIXI.Transform);
|
26
|
+
|
27
|
+
/** @internal */
|
28
|
+
protected _reference: PIXI.Transform;
|
29
|
+
|
30
|
+
/** @internal */
|
31
|
+
protected _syncLocalID: number;
|
32
|
+
|
33
|
+
/** @override */
|
34
|
+
updateTransform(parentTransform: PIXI.Transform): void;
|
35
|
+
|
36
|
+
/** @override */
|
37
|
+
updateLocalTransform(): void;
|
38
|
+
}
|
@@ -97,12 +97,12 @@ declare class Quadtree<T> {
|
|
97
97
|
|
98
98
|
/**
|
99
99
|
* Get all the objects which could collide with the provided rectangle
|
100
|
-
* @param rect - The target rectangle
|
100
|
+
* @param rect - The normalized target rectangle
|
101
101
|
* @param _s - The existing result set, for internal use.
|
102
102
|
* (default: `new Set<T>()`)
|
103
103
|
* @returns The objects in the Quadtree which represent potential collisions
|
104
104
|
*/
|
105
|
-
getObjects(rect:
|
105
|
+
getObjects(rect: NormalizedRectangle, _s?: Set<T>): Set<T>;
|
106
106
|
|
107
107
|
/**
|
108
108
|
* Obtain the leaf nodes to which a target rectangle belongs.
|
@@ -147,21 +147,21 @@ declare global {
|
|
147
147
|
* console.log(r.total); // 11
|
148
148
|
* ```
|
149
149
|
*/
|
150
|
-
evaluate(options?: InexactPartial<Options & { async: false }>): this
|
151
|
-
evaluate(options: InexactPartial<Options> & { async: true }): Promise<this
|
152
|
-
evaluate(options?: InexactPartial<Options>): this | Promise<this
|
150
|
+
evaluate(options?: InexactPartial<Options & { async: false }>): Evaluated<this>;
|
151
|
+
evaluate(options: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
|
152
|
+
evaluate(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
|
153
153
|
|
154
154
|
/**
|
155
155
|
* Evaluate the roll asynchronously.
|
156
156
|
* A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default).
|
157
157
|
*/
|
158
|
-
protected _evaluate(options?: InexactPartial<Omit<Options, 'async'>>): Promise<this
|
158
|
+
protected _evaluate(options?: InexactPartial<Omit<Options, 'async'>>): Promise<Evaluated<this>>;
|
159
159
|
|
160
160
|
/**
|
161
161
|
* Evaluate the roll synchronously.
|
162
162
|
* A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default).
|
163
163
|
*/
|
164
|
-
protected _evaluateSync(options?: InexactPartial<Omit<Options, 'async'>>): this
|
164
|
+
protected _evaluateSync(options?: InexactPartial<Omit<Options, 'async'>>): Evaluated<this>;
|
165
165
|
|
166
166
|
/**
|
167
167
|
* Safely evaluate the final total result for the Roll using its component terms.
|
@@ -173,9 +173,9 @@ declare global {
|
|
173
173
|
* Alias for evaluate.
|
174
174
|
* @see Roll#evaluate
|
175
175
|
*/
|
176
|
-
roll(options?: InexactPartial<Options & { async: false }>): this
|
177
|
-
roll(options: InexactPartial<Options> & { async: true }): Promise<this
|
178
|
-
roll(options?: InexactPartial<Options>): this | Promise<this
|
176
|
+
roll(options?: InexactPartial<Options & { async: false }>): Evaluated<this>;
|
177
|
+
roll(options: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
|
178
|
+
roll(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
|
179
179
|
|
180
180
|
/**
|
181
181
|
* Create a new Roll object using the original provided formula and data.
|
@@ -183,9 +183,9 @@ declare global {
|
|
183
183
|
* @param options - Evaluation options passed to Roll#evaluate
|
184
184
|
* @returns A new Roll object, rolled using the same formula and data
|
185
185
|
*/
|
186
|
-
reroll(options?: InexactPartial<Options & { async: false }>): this
|
187
|
-
reroll(options: InexactPartial<Options> & { async: true }): Promise<this
|
188
|
-
reroll(options?: InexactPartial<Options>): this | Promise<this
|
186
|
+
reroll(options?: InexactPartial<Options & { async: false }>): Evaluated<this>;
|
187
|
+
reroll(options: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
|
188
|
+
reroll(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
|
189
189
|
|
190
190
|
/**
|
191
191
|
* A factory method which constructs a Roll instance using the default configured Roll class.
|
@@ -491,3 +491,5 @@ type MessageData<T extends DeepPartial<ConstructorParameters<typeof ChatMessage>
|
|
491
491
|
content: number;
|
492
492
|
sound: typeof CONFIG.sounds.dice;
|
493
493
|
} & T;
|
494
|
+
|
495
|
+
type Evaluated<T extends Roll> = T & { _evaluated: true; _total: number; get total(): number };
|
@@ -1,3 +1,33 @@
|
|
1
|
+
/** Options which customize the behavior of the filter */
|
2
|
+
interface SearchFilterConfiguration {
|
3
|
+
/**
|
4
|
+
* The CSS selector used to target the text input element.
|
5
|
+
*/
|
6
|
+
inputSelector: string;
|
7
|
+
|
8
|
+
/**
|
9
|
+
* The CSS selector used to target the content container for these tabs.
|
10
|
+
*/
|
11
|
+
contentSelector: string;
|
12
|
+
|
13
|
+
/**
|
14
|
+
* A callback function which executes when the filter changes.
|
15
|
+
*/
|
16
|
+
callback?: SearchFilter['callback'];
|
17
|
+
|
18
|
+
/**
|
19
|
+
* The initial value of the search query.
|
20
|
+
* @defaultValue `""`
|
21
|
+
*/
|
22
|
+
initial?: SearchFilter['query'] | undefined;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The number of milliseconds to wait for text input before processing.
|
26
|
+
* @defaultValue `100`
|
27
|
+
*/
|
28
|
+
delay?: number;
|
29
|
+
}
|
30
|
+
|
1
31
|
/**
|
2
32
|
* A controller class for managing a text input widget that filters the contents of some other UI element
|
3
33
|
* @see {@link Application}
|
@@ -6,7 +36,7 @@ declare class SearchFilter {
|
|
6
36
|
/**
|
7
37
|
* @param options - Options which customize the behavior of the filter
|
8
38
|
*/
|
9
|
-
constructor(options:
|
39
|
+
constructor(options: SearchFilterConfiguration);
|
10
40
|
|
11
41
|
/**
|
12
42
|
* The value of the current query string
|
@@ -26,28 +56,33 @@ declare class SearchFilter {
|
|
26
56
|
|
27
57
|
/**
|
28
58
|
* The CSS selector used to target the tab navigation element
|
59
|
+
* @internal
|
29
60
|
*/
|
30
61
|
protected _inputSelector: string;
|
31
62
|
|
32
63
|
/**
|
33
64
|
* A reference to the HTML navigation element the tab controller is bound to
|
65
|
+
* @internal
|
34
66
|
*/
|
35
67
|
protected _input: HTMLElement | null;
|
36
68
|
|
37
69
|
/**
|
38
70
|
* The CSS selector used to target the tab content element
|
71
|
+
* @internal
|
39
72
|
*/
|
40
73
|
protected _contentSelector: string;
|
41
74
|
|
42
75
|
/**
|
43
76
|
* A reference to the HTML container element of the tab content
|
77
|
+
* @internal
|
44
78
|
*/
|
45
79
|
protected _content: HTMLElement | null;
|
46
80
|
|
47
81
|
/**
|
48
82
|
* A debounced function which applies the search filtering
|
83
|
+
* @internal
|
49
84
|
*/
|
50
|
-
protected _filter: this['callback'];
|
85
|
+
protected _filter: (...args: Parameters<this['callback']>) => void;
|
51
86
|
|
52
87
|
/**
|
53
88
|
* Bind the SearchFilter controller to an HTML application
|
@@ -69,34 +104,3 @@ declare class SearchFilter {
|
|
69
104
|
*/
|
70
105
|
static cleanQuery(query: string): string;
|
71
106
|
}
|
72
|
-
|
73
|
-
declare namespace SearchFilter {
|
74
|
-
interface Options {
|
75
|
-
/**
|
76
|
-
* The CSS selector used to target the text input element.
|
77
|
-
*/
|
78
|
-
inputSelector: string;
|
79
|
-
|
80
|
-
/**
|
81
|
-
* The CSS selector used to target the content container for these tabs.
|
82
|
-
*/
|
83
|
-
contentSelector: string;
|
84
|
-
|
85
|
-
/**
|
86
|
-
* The initial value of the search query.
|
87
|
-
* @defaultValue `""`
|
88
|
-
*/
|
89
|
-
initial?: SearchFilter['query'];
|
90
|
-
|
91
|
-
/**
|
92
|
-
* A callback function which executes when the filter changes.
|
93
|
-
*/
|
94
|
-
callback: SearchFilter['callback'];
|
95
|
-
|
96
|
-
/**
|
97
|
-
* The number of milliseconds to wait for text input before processing.
|
98
|
-
* @defaultValue `100`
|
99
|
-
*/
|
100
|
-
delay?: number;
|
101
|
-
}
|
102
|
-
}
|
@@ -8,11 +8,11 @@ declare global {
|
|
8
8
|
/**
|
9
9
|
* The cached mapping of textures
|
10
10
|
*/
|
11
|
-
cache: Map<string, { tex: PIXI.
|
11
|
+
cache: Map<string, { tex: PIXI.BaseTexture; time: number }>;
|
12
12
|
|
13
13
|
/**
|
14
14
|
* The duration in milliseconds for which a texture will remain cached
|
15
|
-
* @defaultValue `1000`
|
15
|
+
* @defaultValue `1000 * 60 * 15`
|
16
16
|
*/
|
17
17
|
static CACHE_TTL: number;
|
18
18
|
|
@@ -33,14 +33,14 @@ declare global {
|
|
33
33
|
* @param options - Additional options which modify loading
|
34
34
|
* @returns A Promise which resolves once all textures are loaded
|
35
35
|
*/
|
36
|
-
load(sources: string[], options?: Partial<TextureLoader.LoadOptions>): Promise<void[]>;
|
36
|
+
load(sources: string[], options?: Partial<TextureLoader.LoadOptions>): Promise<PIXI.BaseTexture | void[]>;
|
37
37
|
|
38
38
|
/**
|
39
39
|
* Load a single texture on-demand from a given source URL path
|
40
40
|
* @param src - The source texture path to load
|
41
41
|
* @returns The loaded texture object
|
42
42
|
*/
|
43
|
-
loadTexture(src: string): Promise<PIXI.
|
43
|
+
loadTexture(src: string): Promise<PIXI.BaseTexture>;
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Log texture loading progress in the console and in the Scene loading bar
|
@@ -57,40 +57,50 @@ declare global {
|
|
57
57
|
/**
|
58
58
|
* Load an image texture from a provided source url
|
59
59
|
*/
|
60
|
-
loadImageTexture(src: string): Promise<PIXI.
|
60
|
+
loadImageTexture(src: string): Promise<PIXI.BaseTexture>;
|
61
61
|
|
62
62
|
/**
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
66
|
-
* @param resolve - Resolve the promise
|
67
|
-
* @param reject - Reject the promise
|
63
|
+
* Use the Fetch API to retrieve a resource and return a Blob instance for it.
|
64
|
+
* @param options - Options to configure the loading behaviour.
|
65
|
+
* (default: `{}`)
|
68
66
|
* @internal
|
69
67
|
*/
|
70
|
-
protected
|
68
|
+
protected _fetchResource(
|
71
69
|
src: string,
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
options?: {
|
71
|
+
/**
|
72
|
+
* Append a cache-busting query parameter to the request.
|
73
|
+
* @defaultValue `false`
|
74
|
+
*/
|
75
|
+
bustCache?: boolean | undefined;
|
76
|
+
}
|
77
|
+
): Promise<Blob>;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Return a URL with a cache-busting query parameter appended.
|
81
|
+
* @param src - The source URL being attempted
|
82
|
+
* @returns The new URL, or false on a failure.
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
protected _getCacheBustURL(src: string): string | false;
|
75
86
|
|
76
87
|
/**
|
77
88
|
* Load a video texture from a provided source url
|
78
|
-
* @param src -
|
79
89
|
*/
|
80
|
-
loadVideoTexture(src: string): Promise<PIXI.
|
90
|
+
loadVideoTexture(src: string): Promise<PIXI.BaseTexture>;
|
81
91
|
|
82
92
|
/**
|
83
93
|
* Add an image url to the texture cache
|
84
94
|
* @param src - The source URL
|
85
95
|
* @param tex - The readied texture
|
86
96
|
*/
|
87
|
-
setCache(src: string, tex: PIXI.
|
97
|
+
setCache(src: string, tex: PIXI.BaseTexture): void;
|
88
98
|
|
89
99
|
/**
|
90
100
|
* Retrieve a texture from the texture cache
|
91
101
|
* @param src - The source URL
|
92
102
|
*/
|
93
|
-
getCache(src: string): PIXI.
|
103
|
+
getCache(src: string): PIXI.BaseTexture | undefined;
|
94
104
|
|
95
105
|
/**
|
96
106
|
* Expire (and destroy) textures from the cache which have not been used for more than CACHE_TTL milliseconds.
|
@@ -13,16 +13,13 @@ declare function getTexture(src: string): PIXI.Texture | null;
|
|
13
13
|
/**
|
14
14
|
* Load a single texture and return a Promise which resolves once the texture is ready to use
|
15
15
|
* @param src - The requested texture source
|
16
|
+
* @param options - Additional options which modify texture loading
|
16
17
|
* @param fallback - A fallback texture to use if the requested source is unavailable or invalid
|
17
18
|
*/
|
18
19
|
declare function loadTexture(
|
19
20
|
src: string,
|
20
|
-
{
|
21
|
-
fallback
|
22
|
-
|
23
|
-
/**
|
24
|
-
* A fallback texture to use if the requested source is unavailable or invalid
|
25
|
-
*/
|
26
|
-
fallback?: string;
|
21
|
+
options?: {
|
22
|
+
/** A fallback texture to use if the requested source is unavailable or invalid */
|
23
|
+
fallback?: string | undefined;
|
27
24
|
}
|
28
|
-
): Promise<PIXI.Texture>;
|
25
|
+
): Promise<PIXI.Texture | null>;
|
@@ -65,7 +65,8 @@ declare class VideoHelper {
|
|
65
65
|
* The thumbnail is cached using the video file path or URL.
|
66
66
|
* @param src - The source video URL
|
67
67
|
* @param options - Thumbnail creation options, including width and height
|
68
|
-
* @returns The created and cached base64 thumbnail image
|
68
|
+
* @returns The created and cached base64 thumbnail image, or a placeholder image if the canvas is
|
69
|
+
* disabled and no thumbnail can be generated.
|
69
70
|
*/
|
70
71
|
createThumbnail(src: string, options: ImageHelper.CompositeOptions): Promise<string>;
|
71
72
|
}
|