@league-of-foundry-developers/foundry-vtt-types 9.242.0 → 9.249.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/package.json +1 -1
- package/src/foundry/common/abstract/document.mjs.d.ts +13 -6
- package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +14 -12
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
- package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
- package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
- package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
- package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
- package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +25 -18
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
- package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
- package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
- package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
- package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
- package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
- package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
- package/src/foundry/common/utils/primitives.mjs.d.ts +8 -1
- package/src/foundry/foundry.js/application.d.ts +139 -111
- 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 +5 -5
- 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 +3 -3
- 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 +5 -5
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- package/src/foundry/foundry.js/avSettings.d.ts +11 -0
- package/src/foundry/foundry.js/canvas.d.ts +5 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +38 -35
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
- 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/chatMessage.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +5 -5
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
- package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +66 -12
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +2 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
- 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/hooks.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
- 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/points/wallEndpoint.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +9 -1
- 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/pointSources/lightSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +1 -1
- package/src/foundry/foundry.js/polygonEdge.d.ts +1 -1
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/ray.d.ts +1 -1
- 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
- package/src/types/helperTypes.d.ts +31 -13
@@ -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
|
}
|
@@ -63,9 +63,35 @@ export type ConfiguredDocumentClass<T extends DocumentConstructor> = ConfiguredD
|
|
63
63
|
T['metadata']['name']
|
64
64
|
>;
|
65
65
|
|
66
|
-
export type DocumentType =
|
67
|
-
|
68
|
-
|
66
|
+
export type DocumentType =
|
67
|
+
| 'Actor'
|
68
|
+
| 'Adventure'
|
69
|
+
| 'Cards'
|
70
|
+
| 'ChatMessage'
|
71
|
+
| 'Combat'
|
72
|
+
| 'FogExploration'
|
73
|
+
| 'Folder'
|
74
|
+
| 'Item'
|
75
|
+
| 'JournalEntry'
|
76
|
+
| 'Macro'
|
77
|
+
| 'Playlist'
|
78
|
+
| 'RollTable'
|
79
|
+
| 'Scene'
|
80
|
+
| 'Setting'
|
81
|
+
| 'User'
|
82
|
+
| 'ActiveEffect'
|
83
|
+
| 'Card'
|
84
|
+
| 'TableResult'
|
85
|
+
| 'PlaylistSound'
|
86
|
+
| 'AmbientLight'
|
87
|
+
| 'AmbientSound'
|
88
|
+
| 'Combatant'
|
89
|
+
| 'Drawing'
|
90
|
+
| 'MeasuredTemplate'
|
91
|
+
| 'Note'
|
92
|
+
| 'Tile'
|
93
|
+
| 'Token'
|
94
|
+
| 'Wall';
|
69
95
|
|
70
96
|
export type PlaceableDocumentType =
|
71
97
|
| 'AmbientLight'
|
@@ -77,17 +103,9 @@ export type PlaceableDocumentType =
|
|
77
103
|
| 'Token'
|
78
104
|
| 'Wall';
|
79
105
|
|
80
|
-
export type ConfiguredDocumentClassForName<Name extends DocumentType> =
|
81
|
-
? CONFIG[Name]['documentClass']
|
82
|
-
: never;
|
83
|
-
|
84
|
-
export type ObjectType = keyof {
|
85
|
-
[Key in keyof CONFIG as 'objectClass' extends keyof CONFIG[Key] ? Key : never]: unknown;
|
86
|
-
};
|
106
|
+
export type ConfiguredDocumentClassForName<Name extends DocumentType> = CONFIG[Name]['documentClass'];
|
87
107
|
|
88
|
-
export type ConfiguredObjectClassForName<Name extends
|
89
|
-
? CONFIG[Name]['objectClass']
|
90
|
-
: never;
|
108
|
+
export type ConfiguredObjectClassForName<Name extends PlaceableDocumentType> = CONFIG[Name]['objectClass'];
|
91
109
|
|
92
110
|
export type ConfiguredData<Name extends string> = Name extends keyof DataConfig ? DataConfig[Name] : {};
|
93
111
|
|