@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
@@ -1,103 +1,112 @@
|
|
1
|
-
|
2
|
-
* A game settings configuration application
|
3
|
-
* This form renders the settings defined via the game.settings.register API which have config = true
|
4
|
-
*/
|
5
|
-
declare class SettingsConfig extends FormApplication<FormApplication.Options, SettingsConfig.Data> {
|
6
|
-
/**
|
7
|
-
* @override
|
8
|
-
* @defaultValue
|
9
|
-
* ```typescript
|
10
|
-
* mergeObject(super.defaultOptions, {
|
11
|
-
* title: game.i18n.localize("SETTINGS.Title"),
|
12
|
-
* id: "client-settings",
|
13
|
-
* template: "templates/sidebar/apps/settings-config.html",
|
14
|
-
* width: 600,
|
15
|
-
* height: "auto",
|
16
|
-
* tabs: [
|
17
|
-
* {navSelector: ".tabs", contentSelector: ".content", initial: "core"}
|
18
|
-
* ]
|
19
|
-
* })
|
20
|
-
* ```
|
21
|
-
*/
|
22
|
-
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
1
|
+
import type { ConfiguredDocumentClass } from '../../../../types/helperTypes';
|
23
2
|
|
3
|
+
declare global {
|
24
4
|
/**
|
25
|
-
*
|
26
|
-
*
|
5
|
+
* The Application responsible for displaying and editing a single Setting document.
|
6
|
+
* This form renders the settings defined via the game.settings.register API which have config = true
|
7
|
+
* @typeParam Options - The type of the options object
|
8
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
27
9
|
*/
|
28
|
-
|
10
|
+
class SettingsConfig<
|
11
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
12
|
+
Data extends object = SettingsConfig.Data
|
13
|
+
> extends FormApplication<Options, Data> {
|
14
|
+
/**
|
15
|
+
* @override
|
16
|
+
* @defaultValue
|
17
|
+
* ```typescript
|
18
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
19
|
+
* title: game.i18n.localize("SETTINGS.Title"),
|
20
|
+
* id: "client-settings",
|
21
|
+
* template: "templates/sidebar/apps/settings-config.html",
|
22
|
+
* width: 600,
|
23
|
+
* height: "auto",
|
24
|
+
* tabs: [{ navSelector: ".tabs", contentSelector: ".content", initial: "core" }],
|
25
|
+
* })
|
26
|
+
* ```
|
27
|
+
*/
|
28
|
+
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
/**
|
31
|
+
* @param options - (unused)
|
32
|
+
* @override
|
33
|
+
*/
|
34
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
* @param event - The initial button click event
|
36
|
-
*/
|
37
|
-
protected _onClickSubmenu(event: JQuery.ClickEvent): void;
|
36
|
+
/** @override */
|
37
|
+
activateListeners(html: JQuery): void;
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
/**
|
40
|
+
* Handle activating the button to configure User Role permissions
|
41
|
+
* @param event - The initial button click event
|
42
|
+
* @internal
|
43
|
+
*/
|
44
|
+
protected _onClickSubmenu(event: JQuery.ClickEvent): void;
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
/**
|
47
|
+
* Handle button click to reset default settings
|
48
|
+
* @param event - The initial button click event
|
49
|
+
* @internal
|
50
|
+
*/
|
51
|
+
protected _onResetDefaults(event: JQuery.ClickEvent): void;
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
user: User;
|
55
|
-
canConfigure: boolean;
|
56
|
-
systemTitle: Game['system']['data']['title'];
|
57
|
-
data: Data.Data;
|
53
|
+
/** @override */
|
54
|
+
protected _updateObject(event: Event, formData: SettingsConfig.FormData): Promise<void>;
|
58
55
|
}
|
59
56
|
|
60
|
-
namespace
|
57
|
+
namespace SettingsConfig {
|
61
58
|
interface Data {
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
none: boolean;
|
67
|
-
};
|
68
|
-
system: {
|
69
|
-
title: Game['system']['data']['title'];
|
70
|
-
menus: ClientSettings.CompleteMenuSetting[];
|
71
|
-
settings: Setting[];
|
72
|
-
none: boolean;
|
73
|
-
};
|
74
|
-
modules: Record<string, { title: string; menus: ClientSettings.CompleteMenuSetting[]; settings: Setting[] }>;
|
59
|
+
user: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof User>>>;
|
60
|
+
canConfigure: boolean;
|
61
|
+
systemTitle: Game['system']['data']['title'];
|
62
|
+
data: Data.Data;
|
75
63
|
}
|
76
64
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
65
|
+
namespace Data {
|
66
|
+
interface Data {
|
67
|
+
core: {
|
68
|
+
version: string;
|
69
|
+
menus: ClientSettings.CompleteMenuSetting[];
|
70
|
+
settings: Setting[];
|
71
|
+
none: boolean;
|
72
|
+
};
|
73
|
+
system: {
|
74
|
+
title: Game['system']['data']['title'];
|
75
|
+
menus: ClientSettings.CompleteMenuSetting[];
|
76
|
+
settings: Setting[];
|
77
|
+
none: boolean;
|
78
|
+
};
|
79
|
+
modules: { title: string; menus: ClientSettings.CompleteMenuSetting[]; settings: Setting[] }[];
|
80
|
+
}
|
81
|
+
|
82
|
+
interface Setting extends Omit<ClientSettings.CompleteSetting, 'type'> {
|
83
|
+
id: string;
|
84
|
+
name: string;
|
85
|
+
hint: string;
|
86
|
+
value: unknown;
|
87
|
+
type: string;
|
88
|
+
isCheckbox: boolean;
|
89
|
+
isSelect: boolean;
|
90
|
+
isRange: boolean;
|
91
|
+
filePickerType: FilePicker.Type | undefined;
|
92
|
+
}
|
85
93
|
}
|
86
|
-
}
|
87
94
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
interface FormData {
|
96
|
+
'core.animateRollTable': boolean;
|
97
|
+
'core.chatBubbles': boolean;
|
98
|
+
'core.chatBubblesPan': boolean;
|
99
|
+
'core.coneTemplateType': 'round' | 'flat';
|
100
|
+
'core.language': string;
|
101
|
+
'core.leftClickRelease': boolean;
|
102
|
+
'core.lightAnimation': boolean;
|
103
|
+
'core.maxFPS': number;
|
104
|
+
'core.mipmap': boolean;
|
105
|
+
'core.noCanvas': boolean;
|
106
|
+
'core.softShadows': boolean;
|
107
|
+
'core.tokenDragPreview': boolean;
|
108
|
+
'core.visionAnimation': boolean;
|
109
|
+
[key: string]: unknown;
|
110
|
+
}
|
102
111
|
}
|
103
112
|
}
|
@@ -1,175 +1,163 @@
|
|
1
|
-
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
|
-
/**
|
6
|
-
* A Token Configuration Application
|
7
|
-
* @typeParam P - the type of the options object
|
8
|
-
*/
|
9
|
-
declare class TokenConfig<P extends TokenConfig.Options = TokenConfig.Options> extends FormApplication<
|
10
|
-
P,
|
11
|
-
TokenConfig.Data,
|
12
|
-
Token
|
13
|
-
> {
|
14
|
-
/**
|
15
|
-
* @param token - The Token object for which settings are being configured
|
16
|
-
* @param options - TokenConfig ui options (see Application)
|
17
|
-
*/
|
18
|
-
constructor(token: Token, options?: Partial<P>);
|
19
|
-
|
20
|
-
/**
|
21
|
-
* @override
|
22
|
-
* @defaultValue
|
23
|
-
* ```typescript
|
24
|
-
* mergeObject(super.defaultOptions, {
|
25
|
-
* classes: ["sheet", "token-sheet"],
|
26
|
-
* template: "templates/scene/token-config.html",
|
27
|
-
* width: 480,
|
28
|
-
* height: "auto",
|
29
|
-
* tabs: [{navSelector: ".tabs", contentSelector: "form", initial: "character"}]
|
30
|
-
* });
|
31
|
-
* ```
|
32
|
-
*/
|
33
|
-
static get defaultOptions(): TokenConfig.Options;
|
34
|
-
|
35
|
-
/** @override */
|
36
|
-
get id(): string;
|
37
|
-
|
38
|
-
/**
|
39
|
-
* Convenience access for the Token object
|
40
|
-
*/
|
41
|
-
get token(): this['object'];
|
42
|
-
|
43
|
-
/**
|
44
|
-
* Convenience access for the Token's linked Actor, if any
|
45
|
-
*/
|
46
|
-
get actor(): this['token']['actor'];
|
47
|
-
|
48
|
-
/** @override */
|
49
|
-
get title(): string;
|
50
|
-
|
51
|
-
/**
|
52
|
-
* @param options - (unused)
|
53
|
-
* @override
|
54
|
-
*/
|
55
|
-
getData(options?: Partial<P>): Promise<TokenConfig.Data>;
|
56
|
-
|
57
|
-
/** @override */
|
58
|
-
render(force?: boolean, options?: Application.RenderOptions<P>): Promise<void>;
|
59
|
-
|
60
|
-
/**
|
61
|
-
* Inspect the Actor data model and identify the set of attributes which could be used for a Token Bar
|
62
|
-
*/
|
63
|
-
static getTrackedAttributeChoices(attributes: TokenConfig.Attributes): Partial<Record<string, string[]>>;
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Test whether an individual data object is a valid attribute - containing both a "value" and "max" field
|
67
|
-
* @param data - The data object to search
|
68
|
-
* @param _path - The attribute path being recursed
|
69
|
-
* (default: `[]`)
|
70
|
-
* @returns An object containing both bar and value attribute paths
|
71
|
-
*/
|
72
|
-
protected static getTrackedAttributes(data: object, _path: string[]): TokenConfig.Attributes;
|
1
|
+
import type { ConfiguredDocumentClassForName, ConstructorDataType } from '../../../../types/helperTypes';
|
73
2
|
|
3
|
+
declare global {
|
74
4
|
/**
|
75
|
-
*
|
5
|
+
* The Application responsible for configuring a single Token document within a parent Scene.
|
6
|
+
* @typeParam Options - The type of the options object
|
7
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
76
8
|
*/
|
77
|
-
|
9
|
+
class TokenConfig<
|
10
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
11
|
+
Data extends object = TokenConfig.Data<Options>
|
12
|
+
> extends FormApplication<
|
13
|
+
Options,
|
14
|
+
Data,
|
15
|
+
InstanceType<ConfiguredDocumentClassForName<'Token'>> | InstanceType<ConfiguredDocumentClassForName<'Actor'>>
|
16
|
+
> {
|
17
|
+
constructor(
|
18
|
+
object:
|
19
|
+
| InstanceType<ConfiguredDocumentClassForName<'Token'>>
|
20
|
+
| InstanceType<ConfiguredDocumentClassForName<'Actor'>>,
|
21
|
+
options?: Partial<Options>
|
22
|
+
);
|
23
|
+
|
24
|
+
token: InstanceType<ConfiguredDocumentClassForName<'Token'>> | PrototypeTokenDocument;
|
78
25
|
|
79
|
-
|
80
|
-
|
26
|
+
/**
|
27
|
+
* @override
|
28
|
+
* @defaultValue
|
29
|
+
* ```typescript
|
30
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
31
|
+
* classes: ["sheet", "token-sheet"],
|
32
|
+
* template: "templates/scene/token-config.html",
|
33
|
+
* width: 480,
|
34
|
+
* height: "auto",
|
35
|
+
* tabs: [{ navSelector: ".tabs", contentSelector: "form", initial: "character" }],
|
36
|
+
* })
|
37
|
+
* ```
|
38
|
+
*/
|
39
|
+
static get defaultOptions(): FormApplication.Options;
|
81
40
|
|
82
|
-
|
83
|
-
|
84
|
-
updateData?: TokenConfig.FormData
|
85
|
-
): ReturnType<FormApplication['_getSubmitData']> & { lightAlpha: number };
|
41
|
+
/** @override */
|
42
|
+
get id(): string;
|
86
43
|
|
87
|
-
|
88
|
-
|
44
|
+
/**
|
45
|
+
* A convenience accessor to test whether we are configuring the prototype Token for an Actor.
|
46
|
+
*/
|
47
|
+
get isPrototype(): boolean;
|
89
48
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
protected _updateActorData(tokenData: TokenConfig.FormData): ReturnType<Actor['update']> | void;
|
49
|
+
/**
|
50
|
+
* Convenience access to the Actor document that this Token represents
|
51
|
+
*/
|
52
|
+
get actor(): InstanceType<ConfiguredDocumentClassForName<'Actor'>>;
|
95
53
|
|
96
|
-
|
97
|
-
|
98
|
-
* @param event - The left-click event on the assign token button
|
99
|
-
*/
|
100
|
-
protected _onAssignToken(event: JQuery.ClickEvent): Promise<void>;
|
54
|
+
/** @override */
|
55
|
+
get title(): string;
|
101
56
|
|
102
|
-
|
103
|
-
|
104
|
-
*/
|
105
|
-
protected _onBarChange(ev: JQuery.ChangeEvent): Promise<void>;
|
106
|
-
}
|
57
|
+
/** @override */
|
58
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
107
59
|
|
108
|
-
|
109
|
-
|
110
|
-
bar: string[][];
|
111
|
-
value: string[][];
|
112
|
-
}
|
60
|
+
/** @override */
|
61
|
+
render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<this>;
|
113
62
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
63
|
+
/**
|
64
|
+
* Get an Object of image paths and filenames to display in the Token sheet
|
65
|
+
* @internal
|
66
|
+
*/
|
67
|
+
protected _getAlternateTokenImages(): Promise<Record<string, string>>;
|
68
|
+
|
69
|
+
/** @override */
|
70
|
+
activateListeners(html: JQuery): void;
|
71
|
+
|
72
|
+
/** @override */
|
73
|
+
protected _getSubmitData(
|
74
|
+
updateData?: ConstructorDataType<foundry.data.TokenData>
|
75
|
+
): Record<string, unknown> & { lightAlpha: number };
|
76
|
+
|
77
|
+
/** @override */
|
78
|
+
protected _updateObject(
|
79
|
+
event: Event,
|
80
|
+
formData: TokenConfig.FormData
|
81
|
+
): Promise<
|
82
|
+
| InstanceType<ConfiguredDocumentClassForName<'Token'>>
|
83
|
+
| InstanceType<ConfiguredDocumentClassForName<'Actor'>>
|
84
|
+
| undefined
|
85
|
+
>;
|
132
86
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
brightLight: Token.Data['brightLight'] | null;
|
140
|
-
brightSight: Token.Data['brightSight'] | null;
|
141
|
-
dimLight: Token.Data['dimLight'] | null;
|
142
|
-
dimSight: Token.Data['dimSight'] | null;
|
143
|
-
displayBars: Token.Data['displayBars'];
|
144
|
-
displayName: Token.Data['displayName'];
|
145
|
-
disposition: Token.Data['disposition'];
|
146
|
-
elevation: Token.Data['elevation'] | null;
|
147
|
-
height: Token.Data['height'] | null;
|
148
|
-
img: Token.Data['img'];
|
149
|
-
lightAlpha: Token.Data['lightAlpha'];
|
150
|
-
lightAngle: Token.Data['lightAngle'] | null;
|
151
|
-
'lightAnimation.intensity': Token.Data['lightAnimation']['intensity'];
|
152
|
-
'lightAnimation.speed': Token.Data['lightAnimation']['speed'];
|
153
|
-
'lightAnimation.type': Token.Data['lightAnimation']['type'];
|
154
|
-
lightColor: Token.Data['lightColor'];
|
155
|
-
lockRotation: Token.Data['lockRotation'];
|
156
|
-
mirrorX: Token.Data['mirrorX'];
|
157
|
-
mirrorY: Token.Data['mirrorY'];
|
158
|
-
name: Token.Data['name'];
|
159
|
-
rotation: Token.Data['rotation'] | null;
|
160
|
-
scale: Token.Data['scale'];
|
161
|
-
sightAngle: Token.Data['sightAngle'] | null;
|
162
|
-
tint: Token.Data['tint'];
|
163
|
-
vision: Token.Data['vision'];
|
164
|
-
width: Token.Data['width'] | null;
|
165
|
-
x: Token.Data['x'] | null;
|
166
|
-
y: Token.Data['y'] | null;
|
167
|
-
}
|
87
|
+
/**
|
88
|
+
* Handle Token assignment requests to update the default prototype Token
|
89
|
+
* @param event - The left-click event on the assign token button
|
90
|
+
* @internal
|
91
|
+
*/
|
92
|
+
protected _onAssignToken(event: JQuery.ClickEvent): void;
|
168
93
|
|
169
|
-
interface Options extends FormApplication.Options {
|
170
94
|
/**
|
171
|
-
*
|
95
|
+
* Handle changing the attribute bar in the drop-down selector to update the default current and max value
|
96
|
+
* @internal
|
172
97
|
*/
|
173
|
-
|
98
|
+
protected _onBarChange(ev: JQuery.ChangeEvent): void;
|
99
|
+
}
|
100
|
+
|
101
|
+
namespace TokenConfig {
|
102
|
+
interface Attributes {
|
103
|
+
bar: string[][];
|
104
|
+
value: string[][];
|
105
|
+
}
|
106
|
+
|
107
|
+
interface Data<Options extends FormApplication.Options = FormApplication.Options> {
|
108
|
+
cssClasses: string;
|
109
|
+
isPrototype: boolean;
|
110
|
+
hasAlternates: boolean;
|
111
|
+
alternateImages: Record<string, string> | [];
|
112
|
+
object: foundry.data.PrototypeTokenData | foundry.data.TokenData;
|
113
|
+
options: Options;
|
114
|
+
gridUnits: string | undefined;
|
115
|
+
barAttributes: Record<string, string[]>;
|
116
|
+
bar1: ReturnType<TokenDocument['getBarAttribute']>;
|
117
|
+
bar2: ReturnType<TokenDocument['getBarAttribute']>;
|
118
|
+
displayModes: Record<foundry.CONST.TokenDisplayMode, string>;
|
119
|
+
actors: { _id: string; name: string }[];
|
120
|
+
dispositions: Record<foundry.CONST.TokenDisposition, string>;
|
121
|
+
lightAnimations: { [Key in keyof typeof CONFIG.Canvas.lightAnimations]: string } & { '': string };
|
122
|
+
lightAlpha: number;
|
123
|
+
isGM: boolean;
|
124
|
+
}
|
125
|
+
|
126
|
+
interface FormData {
|
127
|
+
actorId: string;
|
128
|
+
actorLink: boolean;
|
129
|
+
alternateImages?: string;
|
130
|
+
alpha: number;
|
131
|
+
'bar1.attribute': string;
|
132
|
+
'bar2.attribute': string;
|
133
|
+
brightLight: number | null;
|
134
|
+
brightSight: number | null;
|
135
|
+
dimLight: number | null;
|
136
|
+
dimSight: number | null;
|
137
|
+
displayBars: foundry.CONST.TokenDisplayMode;
|
138
|
+
displayName: foundry.CONST.TokenDisplayMode;
|
139
|
+
disposition: foundry.CONST.TokenDisposition;
|
140
|
+
elevation: number | null;
|
141
|
+
height: number | null;
|
142
|
+
img: string;
|
143
|
+
lightAlpha: number;
|
144
|
+
lightAngle: number | null;
|
145
|
+
'lightAnimation.intensity': number;
|
146
|
+
'lightAnimation.speed': number;
|
147
|
+
'lightAnimation.type': string;
|
148
|
+
lightColor: string;
|
149
|
+
lockRotation: boolean;
|
150
|
+
mirrorX: boolean;
|
151
|
+
mirrorY: boolean;
|
152
|
+
name: StringTerm;
|
153
|
+
rotation: number | null;
|
154
|
+
scale: number;
|
155
|
+
sightAngle: number | null;
|
156
|
+
tint: string;
|
157
|
+
vision: boolean;
|
158
|
+
width: number | null;
|
159
|
+
x: number | null;
|
160
|
+
y: number | null;
|
161
|
+
}
|
174
162
|
}
|
175
163
|
}
|
@@ -1,82 +1,72 @@
|
|
1
|
-
|
2
|
-
* Wall Configuration Sheet
|
3
|
-
*/
|
4
|
-
declare class WallConfig<P extends WallConfig.Options = WallConfig.Options> extends FormApplication<
|
5
|
-
P,
|
6
|
-
WallConfig.Data,
|
7
|
-
Wall
|
8
|
-
> {
|
9
|
-
/**
|
10
|
-
* @param object - The Wall object for which settings are being configured
|
11
|
-
* @param options - Additional options which configure the rendering of the configuration sheet.
|
12
|
-
*/
|
13
|
-
constructor(object: Wall, options?: Partial<P>);
|
1
|
+
import type { ConfiguredDocumentClassForName } from '../../../../types/helperTypes';
|
14
2
|
|
3
|
+
declare global {
|
15
4
|
/**
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
* options.id = "wall-config";
|
20
|
-
* options.title = "Wall Configuration";
|
21
|
-
* options.template = "templates/scene/wall-config.html";
|
22
|
-
* options.width = 400;
|
23
|
-
* options.editTargets = [];
|
24
|
-
* ```
|
5
|
+
* The Application responsible for configuring a single Wall document within a parent Scene.
|
6
|
+
* @typeParam Options - The type of the options object
|
7
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
25
8
|
*/
|
26
|
-
|
9
|
+
class WallConfig<
|
10
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
11
|
+
Data extends object = WallConfig.Data<Options>
|
12
|
+
> extends FormApplication<Options, Data, InstanceType<ConfiguredDocumentClassForName<'Wall'>>> {
|
13
|
+
/**
|
14
|
+
* @defaultValue
|
15
|
+
* ```typescript
|
16
|
+
* const options = super.defaultOptions;
|
17
|
+
* options.id = "wall-config";
|
18
|
+
* options.title = "Wall Configuration";
|
19
|
+
* options.template = "templates/scene/wall-config.html";
|
20
|
+
* options.width = 400;
|
21
|
+
* ```
|
22
|
+
*/
|
23
|
+
static get defaultOptions(): FormApplication.Options;
|
27
24
|
|
28
|
-
|
29
|
-
|
30
|
-
*/
|
31
|
-
get title(): string;
|
25
|
+
/** @override */
|
26
|
+
get title(): string;
|
32
27
|
|
33
|
-
|
34
|
-
|
35
|
-
*/
|
36
|
-
getData(): WallConfig.Data;
|
28
|
+
/** @override */
|
29
|
+
render(force?: boolean, options?: Application.RenderOptions<Options>): this;
|
37
30
|
|
38
|
-
|
39
|
-
|
40
|
-
* @param event - The initial triggering submission event
|
41
|
-
* @param formData - The object of validated form data with which to update the object
|
42
|
-
*/
|
43
|
-
protected _updateObject(event: Event, formData: WallConfig.FormData): Promise<Wall>;
|
44
|
-
}
|
31
|
+
/** @override */
|
32
|
+
getData(): Data | Promise<Data>;
|
45
33
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
[Key in keyof typeof foundry.CONST['WALL_MOVEMENT_TYPES'] as typeof foundry.CONST['WALL_MOVEMENT_TYPES'][Key]]: Titlecase<Key>;
|
52
|
-
};
|
53
|
-
senseTypes: {
|
54
|
-
[Key in keyof typeof foundry.CONST['WALL_SENSE_TYPES'] as typeof foundry.CONST['WALL_SENSE_TYPES'][Key]]: Titlecase<Key>;
|
55
|
-
};
|
56
|
-
dirTypes: {
|
57
|
-
[Key in keyof typeof foundry.CONST['WALL_DIRECTIONS'] as typeof foundry.CONST['WALL_DIRECTIONS'][Key]]: Titlecase<Key>;
|
58
|
-
};
|
59
|
-
doorTypes: {
|
60
|
-
[Key in keyof typeof foundry.CONST['WALL_DOOR_TYPES'] as typeof foundry.CONST['WALL_DOOR_TYPES'][Key]]: Titlecase<Key>;
|
61
|
-
};
|
62
|
-
doorStates: {
|
63
|
-
[Key in keyof typeof foundry.CONST['WALL_DOOR_STATES'] as typeof foundry.CONST['WALL_DOOR_STATES'][Key]]: Titlecase<Key>;
|
64
|
-
};
|
65
|
-
isDoor: boolean;
|
34
|
+
/** @override */
|
35
|
+
protected _updateObject(
|
36
|
+
event: Event,
|
37
|
+
formData: WallConfig.FormData
|
38
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Wall'>> | undefined>;
|
66
39
|
}
|
67
40
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
41
|
+
namespace WallConfig {
|
42
|
+
interface Data<Options extends FormApplication.Options = FormApplication.Options> {
|
43
|
+
object: foundry.data.WallData['_source'];
|
44
|
+
options: Options;
|
45
|
+
moveTypes: {
|
46
|
+
[Key in keyof typeof foundry.CONST.WALL_MOVEMENT_TYPES as typeof foundry.CONST.WALL_MOVEMENT_TYPES[Key]]: Titlecase<Key>;
|
47
|
+
};
|
48
|
+
senseTypes: {
|
49
|
+
[Key in keyof typeof foundry.CONST.WALL_SENSE_TYPES as typeof foundry.CONST.WALL_SENSE_TYPES[Key]]: Titlecase<Key>;
|
50
|
+
};
|
51
|
+
dirTypes: {
|
52
|
+
[Key in keyof typeof foundry.CONST.WALL_DIRECTIONS as typeof foundry.CONST.WALL_DIRECTIONS[Key]]: Titlecase<Key>;
|
53
|
+
};
|
54
|
+
doorTypes: {
|
55
|
+
[Key in keyof typeof foundry.CONST.WALL_DOOR_TYPES as typeof foundry.CONST.WALL_DOOR_TYPES[Key]]: Titlecase<Key>;
|
56
|
+
};
|
57
|
+
doorStates: {
|
58
|
+
[Key in keyof typeof foundry.CONST.WALL_DOOR_STATES as typeof foundry.CONST.WALL_DOOR_STATES[Key]]: Titlecase<Key>;
|
59
|
+
};
|
60
|
+
isDoor: boolean;
|
61
|
+
}
|
75
62
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
63
|
+
interface FormData {
|
64
|
+
dir: foundry.CONST.WallDirection;
|
65
|
+
door: foundry.CONST.WallDoorType;
|
66
|
+
ds?: foundry.CONST.WallDoorState;
|
67
|
+
move: foundry.CONST.WallMovementType;
|
68
|
+
sense: foundry.CONST.WallSenseType;
|
69
|
+
sound: foundry.CONST.WallSenseType;
|
70
|
+
}
|
81
71
|
}
|
82
72
|
}
|