@league-of-foundry-developers/foundry-vtt-types 0.8.9-7 → 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/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/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/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 +12 -4
- 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/canvasLayers/placeablesLayer.d.ts +5 -17
- 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/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,154 +1,170 @@
|
|
1
|
-
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Entity Sheet Configuration Application
|
7
|
-
* @typeParam P - the type of the options object
|
8
|
-
* @typeParam E - the type of the Entity, this sheet is used to configure
|
9
|
-
*/
|
10
|
-
declare class EntitySheetConfig<
|
11
|
-
P extends FormApplication.Options = FormApplication.Options,
|
12
|
-
E extends Entity = Entity
|
13
|
-
> extends FormApplication<P, EntitySheetConfig.Data, E> {
|
14
|
-
/**
|
15
|
-
* @param entity - The Entity object for which the sheet is being configured
|
16
|
-
* @param options - Additional Application options
|
17
|
-
*/
|
18
|
-
constructor(entity: E, options?: Partial<P>);
|
19
|
-
|
20
|
-
/**
|
21
|
-
* @defaultValue
|
22
|
-
* ```typescript
|
23
|
-
* const options = super.defaultOptions;
|
24
|
-
* options.id = "sheet-config";
|
25
|
-
* options.template = "templates/sheets/sheet-config.html";
|
26
|
-
* options.width = 400;
|
27
|
-
* ```
|
28
|
-
*/
|
29
|
-
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
30
|
-
|
31
|
-
/**
|
32
|
-
* Add the Entity name into the window title
|
33
|
-
*/
|
34
|
-
get title(): string;
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Construct and return the data object used to render the HTML template for this form application.
|
38
|
-
* @param options - (unused)
|
39
|
-
*/
|
40
|
-
getData(options?: Partial<P>): EntitySheetConfig.Data<E>;
|
41
|
-
|
42
|
-
/**
|
43
|
-
* This method is called upon form submission after form data is validated
|
44
|
-
* @param event - The initial triggering submission event
|
45
|
-
* @param formData - The object of validated form data with which to update the object
|
46
|
-
*/
|
47
|
-
protected _updateObject(event: Event, formData: EntitySheetConfig.FormData): Promise<void>;
|
1
|
+
import type { DocumentConstructor } from '../../../../types/helperTypes';
|
48
2
|
|
3
|
+
declare global {
|
49
4
|
/**
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
5
|
+
* Entity Sheet Configuration Application
|
6
|
+
* @typeParam Options - The type of the options object
|
7
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
8
|
+
* @typeParam ConcreteDocument - The type of the Document which is being managed
|
54
9
|
*/
|
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
|
-
|
140
|
-
|
141
|
-
|
10
|
+
class EntitySheetConfig<
|
11
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
12
|
+
Data extends object = EntitySheetConfig.Data<foundry.abstract.Document<any, any>, Options>,
|
13
|
+
ConcreteDocument extends foundry.abstract.Document<any, any> = Data extends EntitySheetConfig.Data<infer T>
|
14
|
+
? T
|
15
|
+
: foundry.abstract.Document<any, any>
|
16
|
+
> extends FormApplication<Options, Data, ConcreteDocument> {
|
17
|
+
/**
|
18
|
+
* @defaultValue
|
19
|
+
* ```typescript
|
20
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
21
|
+
* id: "sheet-config",
|
22
|
+
* template: "templates/sheets/sheet-config.html",
|
23
|
+
* width: 400,
|
24
|
+
* })
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
static get defaultOptions(): FormApplication.Options;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* An array of pending sheet assignments which are submitted before other elements of the framework are ready.
|
31
|
+
* @internal
|
32
|
+
*/
|
33
|
+
static _pending: Array<EntitySheetConfig.SheetAssignment>;
|
34
|
+
|
35
|
+
/** @override */
|
36
|
+
get title(): string;
|
37
|
+
|
38
|
+
/** @override */
|
39
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
40
|
+
|
41
|
+
/** @override */
|
42
|
+
protected _updateObject(event: Event, formData: EntitySheetConfig.FormData): Promise<void>;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Initialize the configured Sheet preferences for Entities which support dynamic Sheet assignment
|
46
|
+
* Create the configuration structure for supported entities
|
47
|
+
* Process any pending sheet registrations
|
48
|
+
* Update the default values from settings data
|
49
|
+
*/
|
50
|
+
static initializeSheets(): void;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* @internal
|
54
|
+
*/
|
55
|
+
protected static _getDocumentTypes(cls: DocumentConstructor, types?: string[]): string[];
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Register a sheet class as a candidate which can be used to display entities of a given type
|
59
|
+
* @param documentClass - The Document class for which to register a new Sheet option
|
60
|
+
* @param scope - Provide a unique namespace scope for this sheet
|
61
|
+
* @param sheetClass - A defined Application class used to render the sheet
|
62
|
+
* @param options - Additional options used for sheet registration
|
63
|
+
*/
|
64
|
+
static registerSheet(
|
65
|
+
documentClass: DocumentConstructor,
|
66
|
+
scope: string,
|
67
|
+
sheetClass: ConstructorOf<Application>,
|
68
|
+
{ label, types, makeDefault }?: EntitySheetConfig.RegisterSheetOptions
|
69
|
+
): void;
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Perform the sheet registration
|
73
|
+
* @internal
|
74
|
+
*/
|
75
|
+
protected static _registerSheet({
|
76
|
+
documentClass,
|
77
|
+
id,
|
78
|
+
label,
|
79
|
+
sheetClass,
|
80
|
+
types,
|
81
|
+
makeDefault
|
82
|
+
}: Omit<EntitySheetConfig.SheetRegistration, 'action'>): void;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Unregister a sheet class, removing it from the list of available Applications to use for a Document type
|
86
|
+
* @param documentClass - The Document class for which to register a new Sheet option
|
87
|
+
* @param scope - Provide a unique namespace scope for this sheet
|
88
|
+
* @param sheetClass - A defined Application class used to render the sheet
|
89
|
+
* @param types - An Array of types for which this sheet should be removed
|
90
|
+
*/
|
91
|
+
static unregisterSheet(
|
92
|
+
documentClass: DocumentConstructor,
|
93
|
+
scope: string,
|
94
|
+
sheetClass: ConstructorOf<Application>,
|
95
|
+
{ types }?: { types?: string[] }
|
96
|
+
): void;
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Perform the sheet de-registration
|
100
|
+
* @internal
|
101
|
+
*/
|
102
|
+
protected static _unregisterSheet({
|
103
|
+
documentClass,
|
104
|
+
id,
|
105
|
+
types
|
106
|
+
}: Omit<EntitySheetConfig.SheetUnregistration, 'action'>): void;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Update the currently default Sheets using a new core world setting
|
110
|
+
*/
|
111
|
+
static updateDefaultSheets(setting?: Record<'Actor' | 'Item', Record<string, string>>): void;
|
142
112
|
}
|
143
113
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
114
|
+
namespace EntitySheetConfig {
|
115
|
+
type SheetRegistration = {
|
116
|
+
action: 'register';
|
117
|
+
documentClass: DocumentConstructor;
|
118
|
+
id: string;
|
119
|
+
label: string;
|
120
|
+
sheetClass: ConstructorOf<Application>;
|
121
|
+
types: string[];
|
122
|
+
makeDefault: boolean;
|
123
|
+
};
|
124
|
+
|
125
|
+
type SheetUnregistration = {
|
126
|
+
action: 'unregister';
|
127
|
+
documentClass: DocumentConstructor;
|
128
|
+
id: string;
|
129
|
+
types: string[];
|
130
|
+
};
|
131
|
+
|
132
|
+
type SheetAssignment = SheetRegistration | SheetUnregistration;
|
133
|
+
|
134
|
+
/**
|
135
|
+
* @typeParam ConcreteDocument - The type of the Document which is being managed
|
136
|
+
* @typeParam Options - The type of the options object
|
137
|
+
*/
|
138
|
+
interface Data<
|
139
|
+
ConcreteDocument extends foundry.abstract.Document<any, any>,
|
140
|
+
Options extends FormApplication.Options = FormApplication.Options
|
141
|
+
> {
|
142
|
+
isGM: boolean;
|
143
|
+
object: foundry.utils.Duplicated<ConcreteDocument['data']>;
|
144
|
+
options: Options;
|
145
|
+
sheetClass: string;
|
146
|
+
sheetClasses: Record<string, string>;
|
147
|
+
defaultClass: string;
|
148
|
+
blankLabel: string;
|
149
|
+
}
|
150
|
+
|
151
|
+
interface FormData {
|
152
|
+
defaultClass: string;
|
153
|
+
sheetClass: string;
|
154
|
+
}
|
155
|
+
|
156
|
+
interface RegisterSheetOptions {
|
157
|
+
/** A human readable label for the sheet name, which will be localized */
|
158
|
+
label?: string;
|
159
|
+
|
160
|
+
/** An array of entity types for which this sheet should be used */
|
161
|
+
types?: string[];
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Whether to make this sheet the default for provided types
|
165
|
+
* @defaultValue `false`
|
166
|
+
*/
|
167
|
+
makeDefault?: boolean;
|
168
|
+
}
|
151
169
|
}
|
152
|
-
|
153
|
-
type SheetClasses = Record<string, Record<string, SheetClass>>;
|
154
170
|
}
|
@@ -1,15 +1,13 @@
|
|
1
1
|
import './avConfig';
|
2
2
|
import './combatTrackerConfig';
|
3
|
+
import './defaultTokenConfig';
|
3
4
|
import './documentSheet';
|
4
5
|
import './documentSheets';
|
5
6
|
import './drawingConfig';
|
6
7
|
import './entitySheetConfig';
|
7
|
-
import './folderConfig';
|
8
8
|
import './gridConfig';
|
9
9
|
import './imagePopout';
|
10
|
-
import './measuredTemplateConfig';
|
11
10
|
import './moduleManagement';
|
12
|
-
import './noteConfig';
|
13
11
|
import './permissionConfig';
|
14
12
|
import './settingsConfig';
|
15
13
|
import './tokenConfig';
|
@@ -1,27 +1,37 @@
|
|
1
|
-
// TODO: Remove when updating this class!!!
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
1
|
/**
|
6
2
|
* The Module Management Application.
|
7
3
|
* This application provides a view of which modules are available to be used and allows for configuration of the
|
8
4
|
* set of modules which are active within the World.
|
5
|
+
* @typeParam Options - The type of the options object
|
6
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
9
7
|
*/
|
10
|
-
|
8
|
+
|
9
|
+
declare class ModuleManagement<
|
10
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
11
|
+
Data extends object = ModuleManagement.Data
|
12
|
+
> extends FormApplication<Options, Data, undefined> {
|
11
13
|
/**
|
12
14
|
* @defaultValue `'all'`
|
15
|
+
* @internal
|
13
16
|
*/
|
14
17
|
protected _filter: ModuleManagement.FilterName;
|
15
18
|
|
16
19
|
/**
|
17
20
|
* @defaultValue `false`
|
21
|
+
* @internal
|
18
22
|
*/
|
19
23
|
protected _expanded: boolean;
|
20
24
|
|
21
25
|
/**
|
22
26
|
* @defaultValue `{}`
|
27
|
+
* @internal
|
23
28
|
*/
|
24
|
-
protected _checked:
|
29
|
+
protected _checked: Record<string, boolean>;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* The named game setting which persists module configuration.
|
33
|
+
*/
|
34
|
+
static CONFIG_SETTING: 'moduleConfiguration';
|
25
35
|
|
26
36
|
/**
|
27
37
|
* @override
|
@@ -40,57 +50,63 @@ declare class ModuleManagement extends FormApplication<FormApplication.Options,
|
|
40
50
|
* });
|
41
51
|
* ```
|
42
52
|
*/
|
43
|
-
static get defaultOptions():
|
53
|
+
static get defaultOptions(): FormApplication.Options;
|
44
54
|
|
45
55
|
/** @override */
|
46
56
|
get isEditable(): boolean;
|
47
57
|
|
48
58
|
/** @override */
|
49
|
-
getData(options?: Partial<
|
59
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
50
60
|
|
51
61
|
/** @override */
|
52
62
|
activateListeners(html: JQuery): void;
|
53
63
|
|
54
64
|
/**
|
55
|
-
* @param event - (unused)
|
56
65
|
* @override
|
66
|
+
* @param event - (unused)
|
57
67
|
*/
|
58
|
-
|
59
|
-
|
68
|
+
protected _updateObject(event: Event, formData: ModuleManagement.FormData): Promise<Record<string, boolean>>;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Restores the Form UI to the internal checked state
|
72
|
+
* @internal
|
73
|
+
*/
|
74
|
+
protected _restoreCheckboxState(): void;
|
60
75
|
|
61
76
|
/**
|
62
77
|
* Handle changes to a module checkbox to prompt for whether or not to enable dependencies
|
78
|
+
* @internal
|
63
79
|
*/
|
64
|
-
protected _onChangeCheckbox(event: JQuery.ChangeEvent):
|
80
|
+
protected _onChangeCheckbox(event: JQuery.ChangeEvent): unknown;
|
65
81
|
|
66
82
|
/**
|
67
83
|
* Handle a button-click to deactivate all modules
|
84
|
+
* @internal
|
68
85
|
*/
|
69
86
|
protected _onDeactivateAll(event: JQuery.ClickEvent): void;
|
70
87
|
|
71
88
|
/**
|
72
89
|
* Handle expanding or collapsing the display of descriptive elements
|
90
|
+
* @internal
|
73
91
|
*/
|
74
92
|
protected _onExpandCollapse(event: JQuery.ClickEvent): void;
|
75
93
|
|
76
94
|
/**
|
77
95
|
* Handle a button-click to deactivate all modules
|
96
|
+
* @internal
|
78
97
|
*/
|
79
98
|
protected _onFilterList(event: JQuery.ClickEvent): void;
|
80
99
|
|
81
100
|
/** @override */
|
82
101
|
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
83
|
-
|
84
|
-
static readonly CONFIG_SETTING: 'moduleConfiguration';
|
85
102
|
}
|
86
103
|
|
87
104
|
declare namespace ModuleManagement {
|
88
105
|
interface Data {
|
89
|
-
editable:
|
106
|
+
editable: boolean;
|
90
107
|
filters: [Data.Filter<'all'>, Data.Filter<'active'>, Data.Filter<'inactive'>];
|
91
108
|
modules: Data.Module[];
|
92
|
-
|
93
|
-
expanded: ModuleManagement['_expanded'];
|
109
|
+
expanded: boolean;
|
94
110
|
}
|
95
111
|
|
96
112
|
namespace Data {
|
@@ -101,23 +117,25 @@ declare namespace ModuleManagement {
|
|
101
117
|
count: number;
|
102
118
|
}
|
103
119
|
|
104
|
-
|
120
|
+
type Module = foundry.packages.ModuleData['_source'] & {
|
105
121
|
active: boolean;
|
122
|
+
availability: number;
|
123
|
+
data: foundry.packages.ModuleData;
|
106
124
|
css: ' active' | '';
|
107
125
|
hasPacks: boolean;
|
108
126
|
hasScripts: boolean;
|
109
127
|
hasStyles: boolean;
|
110
128
|
systemOnly: boolean;
|
111
129
|
systemTag: Game['system']['id'];
|
112
|
-
incompatible: any; // TODO
|
113
|
-
unavailable: any; // TODO
|
114
130
|
dependencies: string[] | null;
|
115
|
-
|
131
|
+
unavailable?: string;
|
132
|
+
incompatible?: string;
|
133
|
+
};
|
116
134
|
}
|
117
135
|
|
118
136
|
type FilterName = 'all' | 'active' | 'inactive';
|
119
137
|
|
120
|
-
|
138
|
+
type FormData = Record<string, boolean> & {
|
121
139
|
search: string;
|
122
|
-
}
|
140
|
+
};
|
123
141
|
}
|