@league-of-foundry-developers/foundry-vtt-types 0.8.9-4 → 0.8.9-8
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/data/data.mjs/index.d.ts +2 -0
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +171 -0
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +143 -0
- package/src/foundry/common/data/fields.mjs.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +11 -1
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +21 -2
- 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 +114 -114
- package/src/foundry/foundry.js/applications/formApplication.d.ts +3 -11
- 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/documentSheet.d.ts +1 -1
- 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/documentSheets/ambientSoundConfig.d.ts +57 -0
- 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 +7 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +84 -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/permissionControl.d.ts +54 -60
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +41 -28
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +75 -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/documentSheets/tileConfig.d.ts +66 -0
- 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 -7
- 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/headsUpDisplay.d.ts +11 -5
- 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/playlistDirectory.d.ts +249 -139
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -5
- 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/clientDocumentMixin.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/index.d.ts +8 -0
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +19 -0
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +195 -6
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +113 -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 -8
- package/src/foundry/foundry.js/config.d.ts +85 -71
- 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/doorControl.d.ts +53 -35
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +38 -40
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +56 -56
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -50
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +166 -47
- 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/pixi/graphics/gridHighlight.d.ts +4 -9
- 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 +2 -25
- package/src/foundry/foundry.js/applications/formApplications/ambientSoundConfig.d.ts +0 -68
- package/src/foundry/foundry.js/applications/formApplications/lightConfig.d.ts +0 -98
- 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/src/foundry/foundry.js/applications/formApplications/playlistSoundConfig.d.ts +0 -70
- package/src/foundry/foundry.js/applications/formApplications/tileConfig.d.ts +0 -73
package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts
CHANGED
@@ -1,152 +1,194 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
1
|
+
import type {
|
2
|
+
ConfiguredDocumentClassForName,
|
3
|
+
ConstructorDataType,
|
4
|
+
ToObjectFalseType
|
5
|
+
} from '../../../../../types/helperTypes';
|
6
|
+
|
7
|
+
declare global {
|
8
|
+
/**
|
9
|
+
* The Application responsible for displaying and editing a single RollTable document.
|
10
|
+
* @typeParam Options - the type of the options object
|
11
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
12
|
+
*/
|
13
|
+
class RollTableConfig<
|
14
|
+
Options extends DocumentSheet.Options = DocumentSheet.Options,
|
15
|
+
Data extends object = ActorSheet.Data<Options>
|
16
|
+
> extends DocumentSheet<Options, Data, InstanceType<ConfiguredDocumentClassForName<'RollTable'>>> {
|
17
|
+
/**
|
18
|
+
* @defaultValue
|
19
|
+
* ```typescript
|
20
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
21
|
+
* classes: ["sheet", "roll-table-config"],
|
22
|
+
* template: "templates/sheets/roll-table-config.html",
|
23
|
+
* width: 720,
|
24
|
+
* height: "auto",
|
25
|
+
* closeOnSubmit: false,
|
26
|
+
* viewPermission: CONST.ENTITY_PERMISSIONS.OBSERVER,
|
27
|
+
* scrollY: ["ol.table-results"],
|
28
|
+
* dragDrop: [{ dragSelector: null, dropSelector: null }],
|
29
|
+
* })
|
30
|
+
* ```
|
31
|
+
*/
|
32
|
+
static get defaultOptions(): DocumentSheet.Options;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* @override
|
36
|
+
*/
|
37
|
+
get title(): string;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* @param options - (unused)
|
41
|
+
* @override
|
42
|
+
*/
|
43
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* @override
|
47
|
+
*/
|
48
|
+
activateListeners(html: JQuery): void;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Handle creating a TableResult in the RollTable entity
|
52
|
+
* @param event - The originating mouse event
|
53
|
+
* @param resultData - An optional object of result data to use
|
54
|
+
* @internal
|
55
|
+
*/
|
56
|
+
protected _onCreateResult(
|
57
|
+
event: JQuery.ClickEvent | DragEvent,
|
58
|
+
resultData?: ConstructorDataType<foundry.data.TableResultData>
|
59
|
+
): Promise<ConfiguredDocumentClassForName<'TableResult'>[]>;
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Submit the entire form when a table result type is changed, in case there are other active changes
|
63
|
+
* @internal
|
64
|
+
*/
|
65
|
+
protected _onChangeResultType(event: JQuery.ChangeEvent): void;
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Handle deleting a TableResult from the RollTable entity
|
69
|
+
* @param event - The originating click event
|
70
|
+
* @returns The deleted TableResult document
|
71
|
+
* @internal
|
72
|
+
*/
|
73
|
+
protected _onDeleteResult(
|
74
|
+
event: JQuery.ClickEvent
|
75
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'TableResult'>> | undefined>;
|
76
|
+
|
77
|
+
/**
|
78
|
+
* @override
|
79
|
+
* @internal
|
80
|
+
*/
|
81
|
+
protected _onDrop(event: DragEvent): void;
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Handle changing the actor profile image by opening a FilePicker
|
85
|
+
* @internal
|
86
|
+
*/
|
87
|
+
protected _onEditImage(event: JQuery.ClickEvent): void;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Handle a button click to re-normalize dice result ranges across all RollTable results
|
91
|
+
* @internal
|
92
|
+
*/
|
93
|
+
protected _onNormalizeResults(event: JQuery.ClickEvent): void;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Handle toggling the drawn status of the result in the table
|
97
|
+
* @internal
|
98
|
+
*/
|
99
|
+
protected _onLockResult(event: JQuery.ClickEvent): void;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Reset the Table to it's original composition with all options unlocked
|
103
|
+
* @internal
|
104
|
+
*/
|
105
|
+
protected _onResetTable(event: JQuery.ClickEvent): void;
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Handle drawing a result from the RollTable
|
109
|
+
* @internal
|
110
|
+
*/
|
111
|
+
protected _onRollTable(event: JQuery.ClickEvent): void;
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Configure the update object workflow for the Roll Table configuration sheet
|
115
|
+
* Additional logic is needed here to reconstruct the results array from the editable fields on the sheet
|
116
|
+
* @param event - The form submission event
|
117
|
+
* @param formData - The validated FormData translated into an Object for submission
|
118
|
+
* @internal
|
119
|
+
*/
|
120
|
+
protected _updateObject(
|
121
|
+
event: Event,
|
122
|
+
formData: RollTableConfig.FormData
|
123
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'RollTable'>> | undefined>;
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Display a roulette style animation when a Roll Table result is drawn from the sheet
|
127
|
+
* @param results - An Array of drawn table results to highlight
|
128
|
+
* @returns A Promise which resolves once the animation is complete
|
129
|
+
*/
|
130
|
+
protected _animateRoll(results: InstanceType<ConfiguredDocumentClassForName<'TableResult'>>[]): Promise<void[]>;
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Animate a "roulette" through the table until arriving at the final loop and a drawn result
|
134
|
+
*/
|
135
|
+
protected _animateRoulette(
|
136
|
+
ol: HTMLOListElement,
|
137
|
+
drawnIds: Set<string>,
|
138
|
+
nLoops: number,
|
139
|
+
animTime: number,
|
140
|
+
animOffset: number
|
141
|
+
): Promise<void>;
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Display a flashing animation on the selected result to emphasize the draw
|
145
|
+
* @param item - The HTML \<li\> item of the winning result
|
146
|
+
* @returns A Promise that resolves once the animation is complete
|
147
|
+
*/
|
148
|
+
protected _flashResult(item: HTMLElement): Promise<void>;
|
140
149
|
}
|
141
150
|
|
142
|
-
|
143
|
-
extends
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
+
namespace RollTableConfig {
|
152
|
+
interface Data extends DocumentSheet.Data<RollTable> {
|
153
|
+
results: ToObjectFalseType<foundry.data.TableResultData> & {
|
154
|
+
isText: boolean;
|
155
|
+
isEntity: boolean;
|
156
|
+
isCompendium: boolean;
|
157
|
+
img: string;
|
158
|
+
text: string;
|
159
|
+
};
|
160
|
+
resultTypes: {
|
161
|
+
[Key in keyof typeof foundry.CONST.TABLE_RESULT_TYPES as typeof foundry.CONST.TABLE_RESULT_TYPES[Key]]: Titlecase<Key>;
|
162
|
+
};
|
163
|
+
entityTypes: typeof foundry.CONST.COMPENDIUM_ENTITY_TYPES;
|
164
|
+
compendiumPacks: string[];
|
165
|
+
}
|
166
|
+
|
167
|
+
type FormData = {
|
168
|
+
description: string;
|
169
|
+
displayRoll: boolean;
|
170
|
+
formula: string;
|
171
|
+
img: string;
|
172
|
+
name: string;
|
173
|
+
replacement: boolean;
|
174
|
+
} & FormDataResults;
|
175
|
+
|
176
|
+
type FormDataResults = {
|
177
|
+
[Key in number as `results.${number}._id`]: string;
|
178
|
+
} & {
|
179
|
+
[Key in number as `results.${number}.drawn`]: boolean;
|
180
|
+
} & {
|
181
|
+
[Key in number as `results.${number}.img`]: string;
|
182
|
+
} & {
|
183
|
+
[Key in number as `results.${number}.rangeH`]: number;
|
184
|
+
} & {
|
185
|
+
[Key in number as `results.${number}.rangeL`]: number;
|
186
|
+
} & {
|
187
|
+
[Key in number as `results.${number}.text`]: string;
|
188
|
+
} & {
|
189
|
+
[Key in number as `results.${number}.type`]: foundry.CONST.TableResultType;
|
190
|
+
} & {
|
191
|
+
[Key in number as `results.${number}.weight`]: string;
|
192
|
+
};
|
151
193
|
}
|
152
194
|
}
|
package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts
CHANGED
@@ -1,129 +1,152 @@
|
|
1
|
-
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
1
|
+
import type { ConfiguredDocumentClassForName, DocumentConstructor } from '../../../../../types/helperTypes';
|
4
2
|
|
5
|
-
|
6
|
-
* A Scene configuration sheet
|
7
|
-
* @see {@link Scene} The Scene Entity which is being configured
|
8
|
-
*/
|
9
|
-
declare class SceneConfig extends DocumentSheet<DocumentSheet.Options, SceneConfig.Data, Scene> {
|
3
|
+
declare global {
|
10
4
|
/**
|
11
|
-
*
|
12
|
-
* @
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
* template: "templates/scene/config.html",
|
17
|
-
* width: 680,
|
18
|
-
* height: "auto"
|
19
|
-
* });
|
20
|
-
* ```
|
5
|
+
* The Application responsible for configuring a single Scene document.
|
6
|
+
* @see {@link Scene} The Scene Document which is being configured
|
7
|
+
*
|
8
|
+
* @typeParam Options - the type of the options object
|
9
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
21
10
|
*/
|
22
|
-
|
11
|
+
class SceneConfig<
|
12
|
+
Options extends DocumentSheet.Options = DocumentSheet.Options,
|
13
|
+
Data extends object = SceneConfig.Data<Options>
|
14
|
+
> extends DocumentSheet<Options, Data, InstanceType<ConfiguredDocumentClassForName<'Scene'>>> {
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* @defaultValue
|
18
|
+
* ```typescript
|
19
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
20
|
+
* id: "scene-config",
|
21
|
+
* classes: ["sheet", "scene-sheet"],
|
22
|
+
* template: "templates/scene/config.html",
|
23
|
+
* width: 680,
|
24
|
+
* height: "auto",
|
25
|
+
* });
|
26
|
+
* ```
|
27
|
+
*/
|
28
|
+
static get defaultOptions(): DocumentSheet.Options;
|
23
29
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
30
|
+
/**
|
31
|
+
* @override
|
32
|
+
*/
|
33
|
+
get title(): string;
|
28
34
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
35
|
+
/**
|
36
|
+
* @override
|
37
|
+
* @remarks This incorrectly overrides `Application#render` by potentially returning `void`, see https://gitlab.com/foundrynet/foundryvtt/-/issues/6026.
|
38
|
+
*/
|
39
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
40
|
+
// @ts-expect-error
|
41
|
+
render(force?: boolean, options?: Application.RenderOptions<Options>): this | void;
|
33
42
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
43
|
+
/**
|
44
|
+
* @param options - (unused)
|
45
|
+
* @override
|
46
|
+
*/
|
47
|
+
getData(options?: Partial<DocumentSheet.Options>): Data | Promise<Data>;
|
39
48
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
49
|
+
/**
|
50
|
+
* Get an enumeration of the available grid types which can be applied to this Scene
|
51
|
+
* @internal
|
52
|
+
*/
|
53
|
+
protected static _getGridTypes(): Record<foundry.CONST.GridType, string>;
|
44
54
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
55
|
+
/**
|
56
|
+
* Get the available weather effect types which can be applied to this Scene
|
57
|
+
* @internal
|
58
|
+
*/
|
59
|
+
protected _getWeatherTypes(): Record<string, string>;
|
49
60
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
61
|
+
/**
|
62
|
+
* Get the alphabetized Documents which can be chosen as a configuration for the Scene
|
63
|
+
* @internal
|
64
|
+
*/
|
65
|
+
protected _getDocuments(collection: WorldCollection<DocumentConstructor, string>): { _id: string; name: string }[];
|
54
66
|
|
55
|
-
|
56
|
-
|
57
|
-
*/
|
58
|
-
activateListeners(html: JQuery): void;
|
67
|
+
/** @override */
|
68
|
+
activateListeners(html: JQuery): void;
|
59
69
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
70
|
+
/**
|
71
|
+
* Capture the current Scene position and zoom level as the initial view in the Scene config
|
72
|
+
* @param event - The originating click event
|
73
|
+
* @internal
|
74
|
+
*/
|
75
|
+
protected _onCapturePosition(event: JQuery.ClickEvent): void;
|
65
76
|
|
66
|
-
|
67
|
-
|
68
|
-
*/
|
69
|
-
protected _onChangeRange(event: JQuery.ChangeEvent): void;
|
77
|
+
/** @override */
|
78
|
+
protected _onChangeRange(event: JQuery.ChangeEvent): void;
|
70
79
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
80
|
+
/**
|
81
|
+
* Handle updating the select menu of PlaylistSound options when the Playlist is changed
|
82
|
+
* @param event - The initiating select change event
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
_onChangePlaylist(event: JQuery.ChangeEvent): void;
|
76
86
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
87
|
+
/**
|
88
|
+
* Handle click events to open the grid configuration application
|
89
|
+
* @param event - The originating click event
|
90
|
+
*/
|
91
|
+
protected _onGridConfig(event: JQuery.ClickEvent): void;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* @override
|
95
|
+
*/
|
96
|
+
protected _updateObject(
|
97
|
+
event: Event,
|
98
|
+
formData: SceneConfig.FormData
|
99
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Scene'>> | undefined>;
|
100
|
+
}
|
101
|
+
|
102
|
+
namespace SceneConfig {
|
103
|
+
interface Data<Options extends DocumentSheet.Options = DocumentSheet.Options>
|
104
|
+
extends DocumentSheet.Data<InstanceType<ConfiguredDocumentClassForName<'Scene'>>, Options> {
|
105
|
+
gridTypes: ReturnType<typeof SceneConfig['_getGridTypes']>;
|
106
|
+
weatherTypes: ReturnType<SceneConfig['_getWeatherTypes']>;
|
107
|
+
playlists: ReturnType<SceneConfig['_getDocuments']>;
|
108
|
+
sounds: ReturnType<SceneConfig['_getDocuments']>;
|
109
|
+
journals: ReturnType<SceneConfig['_getDocuments']>;
|
110
|
+
hasGlobalThreshold: boolean;
|
111
|
+
data: DocumentSheet.Data<InstanceType<ConfiguredDocumentClassForName<'Scene'>>, Options>['data'] & {
|
112
|
+
/**
|
113
|
+
* @defaultValue `0`
|
114
|
+
*/
|
115
|
+
globalLightThreshold: number;
|
116
|
+
};
|
117
|
+
}
|
82
118
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
hasGlobalThreshold: boolean;
|
90
|
-
document: DocumentSheet.Data['document'] & {
|
91
|
-
/**
|
92
|
-
* @defaultValue `0`
|
93
|
-
*/
|
119
|
+
type FormData = {
|
120
|
+
backgroundColor: string;
|
121
|
+
darkness: number;
|
122
|
+
fogExploration: boolean;
|
123
|
+
foreground: string;
|
124
|
+
globalLight: boolean;
|
94
125
|
globalLightThreshold: number;
|
126
|
+
grid: number | null;
|
127
|
+
gridAlpha: number;
|
128
|
+
gridColor: string;
|
129
|
+
gridDistance: number | null;
|
130
|
+
gridType: foundry.CONST.GridType;
|
131
|
+
gridUnits: string;
|
132
|
+
hasGlobalThreshold: boolean;
|
133
|
+
height: number | null;
|
134
|
+
img: string;
|
135
|
+
'initial.scale': number | null;
|
136
|
+
'initial.x': number | null;
|
137
|
+
'initial.y': number | null;
|
138
|
+
journal: string;
|
139
|
+
name: string;
|
140
|
+
navName: string;
|
141
|
+
navigation: boolean;
|
142
|
+
padding: number;
|
143
|
+
'permission.default': foundry.CONST.EntityPermission;
|
144
|
+
playlist: string;
|
145
|
+
shiftX: number | null;
|
146
|
+
shiftY: number | null;
|
147
|
+
tokenVision: boolean;
|
148
|
+
weather: string;
|
149
|
+
width: number | null;
|
95
150
|
};
|
96
151
|
}
|
97
|
-
|
98
|
-
type FormData = {
|
99
|
-
backgroundColor: Scene.Data['backgroundColor'];
|
100
|
-
darkness: Scene.Data['darkness'];
|
101
|
-
fogExploration: Scene.Data['fogExploration'];
|
102
|
-
globalLight: Scene.Data['globalLight'];
|
103
|
-
globalLightThreshold: Scene.Data['globalLightThreshold'];
|
104
|
-
grid: GridConfig.FormData['grid'];
|
105
|
-
gridAlpha: Scene.Data['gridAlpha'];
|
106
|
-
gridColor: Scene.Data['gridColor'];
|
107
|
-
gridDistance: Scene.Data['gridDistance'] | null;
|
108
|
-
gridType: foundry.CONST.GridType;
|
109
|
-
gridUnits: Scene.Data['gridUnits'];
|
110
|
-
hasGlobalThreshold: boolean;
|
111
|
-
height: Scene.Data['height'] | null;
|
112
|
-
img: Scene.Data['img'];
|
113
|
-
'initial.scale': number | null;
|
114
|
-
'initial.x': number | null;
|
115
|
-
'initial.y': number | null;
|
116
|
-
journal: Scene.Data['journal'];
|
117
|
-
name: string;
|
118
|
-
navName: Scene.Data['navName'];
|
119
|
-
navigation: Scene.Data['navigation'];
|
120
|
-
padding: Scene.Data['padding'];
|
121
|
-
'permission.default': Scene.Data['permission'];
|
122
|
-
playlist: Scene.Data['playlist'];
|
123
|
-
shiftX: GridConfig.FormData['shiftX'];
|
124
|
-
shiftY: GridConfig.FormData['shiftY'];
|
125
|
-
tokenVision: Scene.Data['tokenVision'];
|
126
|
-
weather: Scene.Data['weather'];
|
127
|
-
width: Scene.Data['width'] | null;
|
128
|
-
};
|
129
152
|
}
|