@league-of-foundry-developers/foundry-vtt-types 0.8.9-5 → 0.8.9-9
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/README.md +41 -13
- package/index-lenient.d.ts +10 -0
- package/package.json +10 -1
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +6 -2
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +8 -3
- package/src/foundry/common/types.mjs.d.ts +5 -0
- package/src/foundry/foundry.js/application.d.ts +2 -5
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
- package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +115 -115
- package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +5 -2
- package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +190 -148
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -3
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +146 -158
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -4
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +2 -1
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +1 -0
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +14 -1
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +44 -11
- package/src/foundry/foundry.js/config.d.ts +84 -70
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +11 -7
- package/src/foundry/foundry.js/pointSource.d.ts +173 -85
- package/src/foundry/foundry.js/textEditor.d.ts +39 -8
- package/src/foundry/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
package/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# foundry-vtt-types
|
2
2
|
|
3
|
-
|
4
|
-
|
5
3
|
<div align=center>
|
6
4
|
|
7
5
|
TypeScript type definitions for [Foundry Virtual Tabletop](https://foundryvtt.com/) (unofficial)
|
@@ -19,10 +17,16 @@ TypeScript type definitions for [Foundry Virtual Tabletop](https://foundryvtt.co
|
|
19
17
|
|
20
18
|
We aim to support the latest patch release of minor versions of Foundry VTT, starting with 0.7.
|
21
19
|
|
22
|
-
At the moment, the latest 0.7.x and 0.8.x versions are supported. However, note that work on 0.8.x has not been
|
20
|
+
At the moment, the latest 0.7.x and 0.8.x versions are supported. However, note that work on 0.8.x has not been
|
21
|
+
completed yet, so there are still quite a few things which are either missing or typed incorrectly. Take a look at
|
22
|
+
[0.8.x issues](https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues?q=is%3Aopen+is%3Aissue+label%3A%22foundry+0.8.x%22)
|
23
|
+
to see what still needs to be done.
|
24
|
+
|
23
25
|
## Installation
|
24
26
|
|
25
|
-
You can install foundry-vtt-types from the [npm registry](https://npmjs.org/). We provide distribution tags for the
|
27
|
+
You can install foundry-vtt-types from the [npm registry](https://npmjs.org/). We provide distribution tags for the
|
28
|
+
different supported Foundry VTT versions that have the form `fvtt-<foundry-version>`. For example, the distribution tag
|
29
|
+
for Foundry VTT 0.8.8 is `fvtt-0.8.8`.
|
26
30
|
|
27
31
|
In order to install the desired version, run
|
28
32
|
|
@@ -36,7 +40,8 @@ For example, to install the type definitions for Foundry VTT 0.8.8 run
|
|
36
40
|
npm install --save-dev @league-of-foundry-developers/foundry-vtt-types@fvtt-0.8.8
|
37
41
|
```
|
38
42
|
|
39
|
-
You can then update foundry-vtt-types using the regular update mechanism for npm
|
43
|
+
You can then update foundry-vtt-types using the regular update mechanism for npm
|
44
|
+
(see [npm update](https://docs.npmjs.com/cli/v7/commands/npm-update)).
|
40
45
|
|
41
46
|
## Usage
|
42
47
|
|
@@ -54,29 +59,42 @@ Add foundry-vtt-types to your types section in your `tsconfig.json`:
|
|
54
59
|
|
55
60
|
This will make the type definitions available globally in your project.
|
56
61
|
|
57
|
-
Make sure you are using `"moduleResolution": "node"`, too. It is required for some dependencies to be resolved
|
62
|
+
Make sure you are using `"moduleResolution": "node"`, too. It is required for some dependencies to be resolved
|
63
|
+
correctly.
|
58
64
|
|
59
|
-
Also make sure to set `"strictNullChecks": true` because otherwise, some of the conditional types used in the type
|
65
|
+
Also make sure to set `"strictNullChecks": true` because otherwise, some of the conditional types used in the type
|
66
|
+
definitions resolve incorrectly and you will see a lot of errors.
|
60
67
|
|
61
|
-
You can find some information about how to actually work with the type definitions in the
|
68
|
+
You can find some information about how to actually work with the type definitions in the
|
69
|
+
[Wiki](https://github.com/League-of-Foundry-Developers/foundry-vtt-types/wiki). If you are working with Foundry VTT
|
70
|
+
0.8.x, a good starting point is
|
71
|
+
[[0.8.x] FAQ](https://github.com/League-of-Foundry-Developers/foundry-vtt-types/wiki/%5B0.8.x%5D-FAQ).
|
62
72
|
|
63
73
|
## Acknowledgments
|
64
74
|
|
65
|
-
Originally forked from [Foundry Project Creator Types](https://gitlab.com/foundry-projects/foundry-pc/foundry-pc-types)
|
75
|
+
Originally forked from [Foundry Project Creator Types](https://gitlab.com/foundry-projects/foundry-pc/foundry-pc-types)
|
76
|
+
by [@NickEastNL](https://gitlab.com/NvanOosten)
|
66
77
|
|
67
78
|
## Contributing
|
68
79
|
|
69
|
-
Contributions are very welcome in order to decrease the individual workload. Filing issues for wrong / missing types is
|
80
|
+
Contributions are very welcome in order to decrease the individual workload. Filing issues for wrong / missing types is
|
81
|
+
also a great way to help us improve the type definitions.
|
70
82
|
|
71
|
-
There are individual branches for the different supported Foundry VTT versions that are being worked on. They are named
|
83
|
+
There are individual branches for the different supported Foundry VTT versions that are being worked on. They are named
|
84
|
+
according to the minor version of the Foundry VTT version, e.g. the branch for Foundry VTT 0.8 is called
|
85
|
+
`foundry-0.8.x`. All work to improve the type definitions for a specific version needs to be done through Pull Requests
|
86
|
+
to the corresponding branch.
|
72
87
|
|
73
88
|
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more details on how to contribute.
|
74
89
|
|
75
|
-
If you have any specific questions, feel free to contact us in the
|
90
|
+
If you have any specific questions, feel free to contact us in the
|
91
|
+
[League of Extraordinary Foundry Developers Discord](https://discord.gg/52DNPzqm2Z).
|
76
92
|
|
77
93
|
## Type-Checking, Linting, Testing
|
78
94
|
|
79
|
-
When contributing, make sure sure that the type checks pass, the linter is green and the tests are green. We _do_ have
|
95
|
+
When contributing, make sure sure that the type checks pass, the linter is green and the tests are green. We _do_ have
|
96
|
+
checks in the CI but running this locally also helps you while developing and saves you time as you don't have to wait
|
97
|
+
for the CI.
|
80
98
|
|
81
99
|
You can run type checking and linting with the following command:
|
82
100
|
|
@@ -90,6 +108,16 @@ You can run the tests with
|
|
90
108
|
npm run test
|
91
109
|
```
|
92
110
|
|
111
|
+
## Creating a release
|
112
|
+
|
113
|
+
To create a release, you have to create a new release commit, tag it and create a GitHub release from that. The CI will
|
114
|
+
handle the rest.
|
115
|
+
|
116
|
+
```
|
117
|
+
npm version prerelease
|
118
|
+
git push --follow-tags
|
119
|
+
```
|
120
|
+
|
93
121
|
## License
|
94
122
|
|
95
123
|
This project is licensed under the MIT license. You can find a copy at [LICENSE](LICENSE).
|
package/package.json
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "@league-of-foundry-developers/foundry-vtt-types",
|
3
|
-
"version": "0.8.9-
|
3
|
+
"version": "0.8.9-9",
|
4
4
|
"description": "TypeScript type definitions for Foundry VTT",
|
5
|
+
"exports": {
|
6
|
+
".": {
|
7
|
+
"types": "./index.d.ts"
|
8
|
+
},
|
9
|
+
"./lenient": {
|
10
|
+
"types": "./index-lenient.d.ts"
|
11
|
+
}
|
12
|
+
},
|
5
13
|
"scripts": {
|
6
14
|
"lint": "./node_modules/typescript/bin/tsc && eslint --ext .d.ts,.test-d.ts .",
|
7
15
|
"lint:fix": "eslint --fix --ext .d.ts,.test-d.ts .",
|
@@ -60,6 +68,7 @@
|
|
60
68
|
},
|
61
69
|
"files": [
|
62
70
|
"index.d.ts",
|
71
|
+
"index-lenient.d.ts",
|
63
72
|
"src"
|
64
73
|
],
|
65
74
|
"publishConfig": {
|
@@ -27,22 +27,28 @@ declare abstract class DatabaseBackend {
|
|
27
27
|
|
28
28
|
/**
|
29
29
|
* Get primary Document instances
|
30
|
+
* @remarks
|
31
|
+
* foundry actually declares this function to take parameters `documentClass`, `query`, `options`, and `user` but
|
32
|
+
* that's not how it is called and also not how the subclasses implement it.
|
33
|
+
* See https://gitlab.com/foundrynet/foundryvtt/-/issues/6177
|
30
34
|
*/
|
31
35
|
protected abstract _getDocuments<T extends Document<any, any>>(
|
32
36
|
documentClass: ConstructorOf<T>,
|
33
|
-
|
34
|
-
options: RequestOptions,
|
37
|
+
request: Request,
|
35
38
|
user: BaseUser
|
36
39
|
): Promise<T[]>;
|
37
40
|
|
38
41
|
/**
|
39
42
|
* Get embedded Document instances
|
43
|
+
* @remarks
|
44
|
+
* foundry actually declares this function to take parameters `documentClass`, `parent`, `query`, `options`, and
|
45
|
+
* `user` but that's not how it is called and also not how the subclasses implement it.
|
46
|
+
* See https://gitlab.com/foundrynet/foundryvtt/-/issues/6177
|
40
47
|
*/
|
41
48
|
protected abstract _getEmbeddedDocuments<T extends Document<any, any>>(
|
42
49
|
documentClass: ConstructorOf<T>,
|
43
50
|
parent: T extends Document<any, infer U> ? U : never,
|
44
|
-
|
45
|
-
options: RequestOptions,
|
51
|
+
request: Request,
|
46
52
|
user: BaseUser
|
47
53
|
): Promise<T[]>;
|
48
54
|
|
@@ -198,7 +204,8 @@ declare abstract class DatabaseBackend {
|
|
198
204
|
* @param action - The action performed
|
199
205
|
* @param type - The document type
|
200
206
|
* @param documents - The documents modified
|
201
|
-
* @param
|
207
|
+
* @param level - The logging level
|
208
|
+
* (default: `'info'`)
|
202
209
|
* @param parent - A parent document
|
203
210
|
* @param pack - A compendium pack within which the operation occurred
|
204
211
|
*/
|
@@ -225,24 +232,16 @@ declare abstract class DatabaseBackend {
|
|
225
232
|
protected _logContext({ parent, pack }?: { parent?: Document<any, any>; pack?: string }): string;
|
226
233
|
}
|
227
234
|
|
228
|
-
interface Request {
|
235
|
+
export interface Request {
|
229
236
|
data?: AnyDocumentData[];
|
230
237
|
updates?: AnyDocumentData[];
|
231
238
|
ids?: string[];
|
232
239
|
parent?: Document<any, any>;
|
233
|
-
query?:
|
240
|
+
query?: Record<string, unknown>;
|
234
241
|
options?: RequestOptions;
|
235
242
|
pack?: string;
|
236
243
|
}
|
237
244
|
|
238
|
-
export interface IdQuery {
|
239
|
-
_id: string;
|
240
|
-
}
|
241
|
-
export interface SceneIdUserQuery {
|
242
|
-
sceneId: string;
|
243
|
-
user: string;
|
244
|
-
}
|
245
|
-
|
246
245
|
export interface RequestOptions {
|
247
246
|
index?: boolean;
|
248
247
|
broadcast?: boolean;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { BaseUser } from '../documents.mjs';
|
2
|
-
import DatabaseBackend from './backend.mjs';
|
3
2
|
import { AnyDocumentData } from './data.mjs';
|
4
3
|
import {
|
5
4
|
ConfiguredDocumentClass,
|
@@ -82,7 +81,7 @@ declare abstract class Document<
|
|
82
81
|
/**
|
83
82
|
* The database backend used to execute operations and handle results
|
84
83
|
*/
|
85
|
-
static get database(): DatabaseBackend;
|
84
|
+
static get database(): CONFIG['DatabaseBackend'];
|
86
85
|
|
87
86
|
/**
|
88
87
|
* Return a reference to the implemented subclass of this base document type.
|
@@ -703,6 +702,11 @@ export interface DocumentModificationOptions {
|
|
703
702
|
*/
|
704
703
|
index?: boolean;
|
705
704
|
|
705
|
+
/**
|
706
|
+
* An array of fields to retrieve when indexing the collection
|
707
|
+
*/
|
708
|
+
indexFields?: string[];
|
709
|
+
|
706
710
|
/**
|
707
711
|
* When performing a creation operation, keep the provided _id instead of clearing it.
|
708
712
|
* @defaultValue `false`
|
@@ -3,7 +3,12 @@ import { BaseUser } from '../../documents.mjs';
|
|
3
3
|
import { ForeignDocumentField } from '../fields.mjs';
|
4
4
|
import * as fields from '../fields.mjs';
|
5
5
|
import * as documents from '../../documents.mjs';
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
ConfiguredDocumentClass,
|
8
|
+
ConfiguredFlags,
|
9
|
+
FieldReturnType,
|
10
|
+
PropertiesToSource
|
11
|
+
} from '../../../../types/helperTypes';
|
7
12
|
|
8
13
|
interface DrawingDataSchema extends DocumentSchema {
|
9
14
|
_id: typeof fields.DOCUMENT_ID;
|
@@ -211,7 +216,7 @@ interface DrawingDataProperties {
|
|
211
216
|
* An object of optional key/value flags
|
212
217
|
* @defaultValue `{}`
|
213
218
|
*/
|
214
|
-
flags:
|
219
|
+
flags: ConfiguredFlags<'Drawing'>;
|
215
220
|
}
|
216
221
|
|
217
222
|
interface DrawingDataConstructorData {
|
@@ -365,7 +370,7 @@ interface DrawingDataConstructorData {
|
|
365
370
|
* An object of optional key/value flags
|
366
371
|
* @defaultValue `{}`
|
367
372
|
*/
|
368
|
-
flags?:
|
373
|
+
flags?: ConfiguredFlags<'Drawing'> | null;
|
369
374
|
}
|
370
375
|
|
371
376
|
/**
|
@@ -312,12 +312,9 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
312
312
|
* Callback actions which occur when a dragged element is dropped on a target.
|
313
313
|
* @param event - The originating DragEvent
|
314
314
|
* (unused)
|
315
|
-
* @
|
316
|
-
* The implementation in {@link Application} actually returns `void` but it is
|
317
|
-
* typed as `unknown` to allow deriving methods to return whatever they want.
|
318
|
-
* The returned value is not meant to be used.
|
315
|
+
* @internal
|
319
316
|
*/
|
320
|
-
protected _onDrop(event: DragEvent):
|
317
|
+
protected _onDrop(event: DragEvent): void;
|
321
318
|
|
322
319
|
/**
|
323
320
|
* Bring the application to the top of the rendering stack
|
@@ -1,30 +1,24 @@
|
|
1
|
-
// TODO: Remove when updating this class!!!
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
1
|
/**
|
6
2
|
* The Camera UI View that displays all the camera feeds as individual video elements.
|
7
|
-
* @typeParam
|
3
|
+
* @typeParam Options - the type of the options object
|
4
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
8
5
|
*/
|
9
|
-
declare class CameraViews<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
*/
|
14
|
-
constructor(webrtc?: any, options?: Partial<P>);
|
15
|
-
|
6
|
+
declare class CameraViews<
|
7
|
+
Options extends Application.Options = Application.Options,
|
8
|
+
Data extends object = CameraViews.Data
|
9
|
+
> extends Application<Options> {
|
16
10
|
/**
|
17
11
|
* @override
|
18
12
|
* @defaultValue
|
19
13
|
* ```typescript
|
20
|
-
* mergeObject(super.defaultOptions, {
|
14
|
+
* return foundry.utils.mergeObject(super.defaultOptions, {
|
21
15
|
* id: "camera-views",
|
22
16
|
* template: "templates/hud/camera-views.html",
|
23
|
-
* popOut: false
|
24
|
-
* })
|
17
|
+
* popOut: false,
|
18
|
+
* })
|
25
19
|
* ```
|
26
20
|
*/
|
27
|
-
static get defaultOptions():
|
21
|
+
static get defaultOptions(): Application.Options;
|
28
22
|
|
29
23
|
/**
|
30
24
|
* A reference to the master AV orchestrator instance
|
@@ -56,26 +50,29 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
56
50
|
* Extend the render logic to first check whether a render is necessary based on the context
|
57
51
|
* If a specific context was provided, make sure an update to the navigation is necessary before rendering
|
58
52
|
*/
|
59
|
-
render(force?: boolean, context?: Application.RenderOptions<
|
53
|
+
render(force?: boolean, context?: Application.RenderOptions<Options>): this | void;
|
60
54
|
|
61
55
|
/** @override */
|
62
|
-
protected _render(force?: boolean, options?: Application.RenderOptions<
|
56
|
+
protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
|
63
57
|
|
64
58
|
/**
|
65
59
|
* @param options - (unused)
|
66
60
|
* @override
|
67
61
|
*/
|
68
|
-
getData(options?: Partial<
|
62
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
69
63
|
|
70
|
-
|
64
|
+
/** @defaultValue `undefined` */
|
65
|
+
maxZ?: number;
|
71
66
|
|
72
67
|
/**
|
73
68
|
* Prepare rendering data for a single user
|
69
|
+
* @internal
|
74
70
|
*/
|
75
71
|
protected _getDataForUser(userId: string, settings: AVSettings.UserSettings): CameraViews.Data.User | null;
|
76
72
|
|
77
73
|
/**
|
78
74
|
* A custom sorting function that orders/arranges the user display frames
|
75
|
+
* @internal
|
79
76
|
*/
|
80
77
|
protected static _sortUsers(a: CameraViews.Data.User, b: CameraViews.Data.User): number;
|
81
78
|
|
@@ -85,30 +82,35 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
85
82
|
/**
|
86
83
|
* On hover in a camera container, show/hide the controls.
|
87
84
|
* @param event - The original mouseover or mouseout hover event
|
85
|
+
* @internal
|
88
86
|
*/
|
89
87
|
protected _onCameraViewHover(event: JQuery.MouseEnterEvent | JQuery.MouseLeaveEvent): void;
|
90
88
|
|
91
89
|
/**
|
92
90
|
* On clicking on a toggle, disable/enable the audio or video stream.
|
93
91
|
* @param event - The originating click event
|
92
|
+
* @internal
|
94
93
|
*/
|
95
94
|
protected _onClickControl(event: JQuery.ClickEvent): Promise<void>;
|
96
95
|
|
97
96
|
/**
|
98
97
|
* Change volume control for a stream
|
99
98
|
* @param event - The originating change event from interaction with the range input
|
99
|
+
* @internal
|
100
100
|
*/
|
101
101
|
protected _onVolumeChange(event: JQuery.ChangeEvent): void;
|
102
102
|
|
103
103
|
/**
|
104
104
|
* Dynamically refresh the state of a single camera view
|
105
105
|
* @param view - The view container div
|
106
|
+
* @internal
|
106
107
|
*/
|
107
108
|
protected _refreshView(view: HTMLElement): void;
|
108
109
|
|
109
110
|
/**
|
110
111
|
* Render changes needed to the PlayerList ui.
|
111
112
|
* Show/Hide players depending on option.
|
113
|
+
* @internal
|
112
114
|
*/
|
113
115
|
protected _setPlayerListVisibility(): void;
|
114
116
|
|
@@ -119,8 +121,9 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
119
121
|
* @param action - The named av-control button action
|
120
122
|
* @param state - The CURRENT action state.
|
121
123
|
* @returns The icon that represents the NEXT action state.
|
124
|
+
* @internal
|
122
125
|
*/
|
123
|
-
protected _getToggleIcon(action: string, state
|
126
|
+
protected _getToggleIcon(action: string, state: boolean): string | null;
|
124
127
|
|
125
128
|
/**
|
126
129
|
* Get the text title that should be used for various action buttons with different toggled states.
|
@@ -129,6 +132,7 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
129
132
|
* @param action - The named av-control button action
|
130
133
|
* @param state - The CURRENT action state.
|
131
134
|
* @returns The icon that represents the NEXT action state.
|
135
|
+
* @internal
|
132
136
|
*/
|
133
137
|
protected _getToggleTooltip(action: string, state: boolean): string;
|
134
138
|
|
@@ -142,6 +146,7 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
142
146
|
* @param show - Whether to show or hide the controls
|
143
147
|
* @param selector - Override selector to specify which controls to show or hide
|
144
148
|
* (default: `'.control-bar'`)
|
149
|
+
* @internal
|
145
150
|
*/
|
146
151
|
protected _toggleControlVisibility(container: HTMLElement, show: boolean, selector?: string): void;
|
147
152
|
}
|
@@ -149,24 +154,24 @@ declare class CameraViews<P extends Application.Options = Application.Options> e
|
|
149
154
|
declare namespace CameraViews {
|
150
155
|
interface Data {
|
151
156
|
self: Game['user'];
|
152
|
-
users:
|
157
|
+
users: Data.User[];
|
153
158
|
dockClass: string;
|
154
159
|
muteAll: boolean;
|
155
160
|
}
|
156
161
|
|
157
162
|
namespace Data {
|
158
163
|
interface User {
|
159
|
-
user: globalThis.User
|
160
|
-
id: globalThis.User['id'];
|
161
|
-
local: globalThis.User['isSelf'];
|
162
|
-
name: globalThis.User['name'];
|
163
|
-
color: globalThis.User['data']['color'];
|
164
|
-
colorAlpha:
|
164
|
+
user: StoredDocument<globalThis.User>;
|
165
|
+
id: StoredDocument<globalThis.User>['id'];
|
166
|
+
local: StoredDocument<globalThis.User>['isSelf'];
|
167
|
+
name: StoredDocument<globalThis.User>['name'];
|
168
|
+
color: StoredDocument<globalThis.User>['data']['color'];
|
169
|
+
colorAlpha: `rgba(${number}, ${number}, ${number})`;
|
165
170
|
charname: string;
|
166
|
-
avatar: globalThis.User['avatar'];
|
171
|
+
avatar: StoredDocument<globalThis.User>['avatar'];
|
167
172
|
settings: AVSettings.UserSettings;
|
168
|
-
volume:
|
169
|
-
cameraViewClass:
|
173
|
+
volume: number;
|
174
|
+
cameraViewClass: string;
|
170
175
|
}
|
171
176
|
}
|
172
177
|
}
|
@@ -67,8 +67,11 @@ declare class Compendium<
|
|
67
67
|
/** @override */
|
68
68
|
protected _onDragStart(event: DragEvent): void;
|
69
69
|
|
70
|
-
/**
|
71
|
-
|
70
|
+
/**
|
71
|
+
* @override
|
72
|
+
* @internal
|
73
|
+
*/
|
74
|
+
protected _onDrop(event: DragEvent): void;
|
72
75
|
|
73
76
|
/**
|
74
77
|
* Render the ContextMenu which applies to each compendium Document
|