@league-of-foundry-developers/foundry-vtt-types 9.242.0 → 9.245.0

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.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/src/foundry/common/utils/primitives.mjs.d.ts +7 -0
  3. package/src/foundry/foundry.js/application.d.ts +138 -110
  4. package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
  5. package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
  6. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
  7. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
  8. package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
  9. package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
  10. package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
  11. package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
  12. package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
  13. package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
  14. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
  15. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
  16. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
  17. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
  18. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
  19. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
  20. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +3 -3
  21. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
  22. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
  23. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
  24. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
  25. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
  26. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
  27. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
  28. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
  29. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
  30. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
  31. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
  32. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +2 -2
  33. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
  34. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
  35. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
  36. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
  37. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
  38. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
  39. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
  40. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +2 -2
  41. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
  42. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
  43. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
  44. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +3 -3
  45. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
  46. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
  47. package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
  48. package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
  49. package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
  50. package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
  51. package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
  52. package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
  53. package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
  54. package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
  55. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
  56. package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
  57. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
  58. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +1 -1
  59. package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
  60. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  61. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
  62. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +1 -1
  63. package/src/foundry/foundry.js/canvas.d.ts +5 -0
  64. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -1
  65. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +8 -4
  66. package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
  67. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +1 -6
  68. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
  69. package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
  70. package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
  71. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
  72. package/src/foundry/foundry.js/config.d.ts +5 -2
  73. package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
  74. package/src/foundry/foundry.js/pixi/index.d.ts +2 -0
  75. package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
  76. package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
  77. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +8 -0
  78. package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
  79. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +1 -1
  80. package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
  81. package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
  82. package/src/foundry/foundry.js/quadtree.d.ts +2 -2
  83. package/src/foundry/foundry.js/roll.d.ts +13 -11
  84. package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
  85. package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
  86. package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
  87. package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  declare class ModuleManagement<
10
- Options extends FormApplication.Options = FormApplication.Options,
10
+ Options extends FormApplicationOptions = FormApplicationOptions,
11
11
  Data extends object = ModuleManagement.Data
12
12
  > extends FormApplication<Options, Data, undefined> {
13
13
  /**
@@ -50,7 +50,7 @@ declare class ModuleManagement<
50
50
  * });
51
51
  * ```
52
52
  */
53
- static get defaultOptions(): FormApplication.Options;
53
+ static get defaultOptions(): FormApplicationOptions;
54
54
 
55
55
  /** @override */
56
56
  get isEditable(): boolean;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * An application for configuring the permissions which are available to each User role.
3
3
  */
4
- declare class PermissionConfig extends FormApplication<FormApplication.Options, PermissionConfig.Data> {
4
+ declare class PermissionConfig extends FormApplication<FormApplicationOptions, PermissionConfig.Data> {
5
5
  /**
6
6
  * @override
7
7
  * @defaultValue
@@ -23,7 +23,7 @@ declare class PermissionConfig extends FormApplication<FormApplication.Options,
23
23
  * @param options - (unused)
24
24
  * @override
25
25
  */
26
- getData(options?: Partial<FormApplication.Options>): PermissionConfig.Data;
26
+ getData(options?: Partial<FormApplicationOptions>): PermissionConfig.Data;
27
27
 
28
28
  /**
29
29
  * Prepare the permissions object used to render the configuration template
@@ -8,7 +8,7 @@ declare global {
8
8
  * @typeParam Data - The data structure used to render the handlebars template.
9
9
  */
10
10
  class SettingsConfig<
11
- Options extends FormApplication.Options = FormApplication.Options,
11
+ Options extends FormApplicationOptions = FormApplicationOptions,
12
12
  Data extends object = SettingsConfig.Data
13
13
  > extends FormApplication<Options, Data> {
14
14
  /**
@@ -8,7 +8,7 @@ declare global {
8
8
  * @typeParam Data - The data structure used to render the handlebars template.
9
9
  */
10
10
  class TokenConfig<
11
- Options extends FormApplication.Options = FormApplication.Options,
11
+ Options extends FormApplicationOptions = FormApplicationOptions,
12
12
  Data extends object = TokenConfig.Data<Options>
13
13
  > extends FormApplication<
14
14
  Options,
@@ -37,7 +37,7 @@ declare global {
37
37
  * })
38
38
  * ```
39
39
  */
40
- static get defaultOptions(): FormApplication.Options;
40
+ static get defaultOptions(): FormApplicationOptions;
41
41
 
42
42
  /** @override */
43
43
  get id(): string;
@@ -103,7 +103,7 @@ declare global {
103
103
  value: string[][];
104
104
  }
105
105
 
106
- interface Data<Options extends FormApplication.Options = FormApplication.Options> {
106
+ interface Data<Options extends FormApplicationOptions = FormApplicationOptions> {
107
107
  cssClasses: string;
108
108
  isPrototype: boolean;
109
109
  hasAlternates: boolean;
@@ -7,7 +7,7 @@ declare global {
7
7
  * @typeParam Data - The data structure used to render the handlebars template.
8
8
  */
9
9
  class WallConfig<
10
- Options extends FormApplication.Options = FormApplication.Options,
10
+ Options extends FormApplicationOptions = FormApplicationOptions,
11
11
  Data extends object = WallConfig.Data<Options>
12
12
  > extends FormApplication<Options, Data, InstanceType<ConfiguredDocumentClassForName<'Wall'>>> {
13
13
  /**
@@ -20,7 +20,7 @@ declare global {
20
20
  * options.width = 400;
21
21
  * ```
22
22
  */
23
- static get defaultOptions(): FormApplication.Options;
23
+ static get defaultOptions(): FormApplicationOptions;
24
24
 
25
25
  /** @override */
26
26
  get title(): string;
@@ -39,7 +39,7 @@ declare global {
39
39
  }
40
40
 
41
41
  namespace WallConfig {
42
- interface Data<Options extends FormApplication.Options = FormApplication.Options> {
42
+ interface Data<Options extends FormApplicationOptions = FormApplicationOptions> {
43
43
  object: foundry.data.WallData['_source'];
44
44
  options: Options;
45
45
  moveTypes: {
@@ -57,7 +57,7 @@ declare namespace WorldConfig {
57
57
  systems?: Game.SystemData<foundry.packages.SystemData>[];
58
58
  }
59
59
 
60
- interface Options extends FormApplication.Options {
60
+ interface Options extends FormApplicationOptions {
61
61
  /**
62
62
  * @defaultValue `false`
63
63
  */
@@ -21,7 +21,7 @@ declare class FrameViewer extends Application {
21
21
  static get defaultOptions(): typeof Application['defaultOptions'];
22
22
 
23
23
  /** @override */
24
- getData(options?: Partial<Application.Options>): Promise<{ src: string }>;
24
+ getData(options?: Partial<ApplicationOptions>): Promise<{ src: string }>;
25
25
 
26
26
  /** @override */
27
27
  close(options?: Application.CloseOptions): ReturnType<Application['close']>;
@@ -2,7 +2,7 @@
2
2
  * Render the HUD container
3
3
  * @typeParam Options - the type of the options object
4
4
  */
5
- declare class HeadsUpDisplay<Options extends Application.Options = Application.Options> extends Application<Options> {
5
+ declare class HeadsUpDisplay<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
6
6
  /**
7
7
  * Token HUD
8
8
  */
@@ -34,7 +34,7 @@ declare class HeadsUpDisplay<Options extends Application.Options = Application.O
34
34
  * })
35
35
  * ```
36
36
  */
37
- static get defaultOptions(): Application.Options;
37
+ static get defaultOptions(): ApplicationOptions;
38
38
 
39
39
  /** @override */
40
40
  getData(options?: Partial<Options>): {} | { width: number; height: number };
@@ -16,7 +16,7 @@ declare global {
16
16
  *
17
17
  * @typeParam Options - the type of the options object
18
18
  */
19
- class Hotbar<Options extends Application.Options = Application.Options> extends Application<Options> {
19
+ class Hotbar<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
20
20
  constructor(options?: Partial<Options>);
21
21
 
22
22
  /**
@@ -55,7 +55,7 @@ declare global {
55
55
  * })
56
56
  * ```
57
57
  */
58
- static get defaultOptions(): Application.Options;
58
+ static get defaultOptions(): ApplicationOptions;
59
59
 
60
60
  /** @override */
61
61
  getData(options?: Partial<Options>): Hotbar.Data | Promise<Hotbar.Data>;
@@ -14,7 +14,7 @@ declare class MainMenu extends Application {
14
14
  * }
15
15
  * ```
16
16
  * */
17
- static get defaultOptions(): Application.Options;
17
+ static get defaultOptions(): ApplicationOptions;
18
18
 
19
19
  /**
20
20
  * The structure of menu items
@@ -54,7 +54,7 @@ declare class MainMenu extends Application {
54
54
  * @override
55
55
  * @param options - (unused)
56
56
  */
57
- getData(options?: Partial<Application.Options>): { items: MainMenu.MenuStructure };
57
+ getData(options?: Partial<ApplicationOptions>): { items: MainMenu.MenuStructure };
58
58
 
59
59
  /** @override */
60
60
  activateListeners(html: JQuery): void;
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @typeParam Options - the type of the options object
15
15
  */
16
- declare class Notifications<Options extends Application.Options = Application.Options> extends Application<Options> {
16
+ declare class Notifications<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
17
17
  constructor(options?: Partial<Options>);
18
18
 
19
19
  /**
@@ -39,15 +39,18 @@ declare class Notifications<Options extends Application.Options = Application.Op
39
39
  * });
40
40
  * ```
41
41
  */
42
- static get defaultOptions(): Application.Options;
42
+ static get defaultOptions(): ApplicationOptions;
43
43
 
44
44
  /**
45
45
  * Initialize the Notifications system by displaying any system-generated messages which were passed from the server.
46
46
  */
47
47
  initialize(): void;
48
48
 
49
- /** @override */
50
- protected _renderInner(data: object): JQuery;
49
+ /**
50
+ * @override
51
+ * @remarks This return a `JQuery`, which is incompatible with the expected `Promise<JQuery>` (see https://gitlab.com/foundrynet/foundryvtt/-/issues/6554).
52
+ */
53
+ protected _renderInner(data: object): any;
51
54
 
52
55
  /** @override */
53
56
  protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
@@ -5,10 +5,10 @@
5
5
  * @typeParam Data - The data structure used to render the handlebars template.
6
6
  */
7
7
  declare class Pause<
8
- Options extends Application.Options = Application.Options,
8
+ Options extends ApplicationOptions = ApplicationOptions,
9
9
  Data extends object = Pause.Data
10
10
  > extends Application<Options> {
11
- static get defaultOptions(): Application.Options;
11
+ static get defaultOptions(): ApplicationOptions;
12
12
 
13
13
  /** @override */
14
14
  getData(options?: Partial<Options>): Data | Promise<Data>;
@@ -6,7 +6,7 @@ declare global {
6
6
  *
7
7
  * @typeParam Options - the type of the options object
8
8
  */
9
- class PlayerList<Options extends Application.Options = Application.Options> extends Application<Options> {
9
+ class PlayerList<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
10
10
  constructor(options?: Partial<Options>);
11
11
 
12
12
  /**
@@ -25,7 +25,7 @@ declare global {
25
25
  * })
26
26
  * ```
27
27
  */
28
- static get defaultOptions(): Application.Options;
28
+ static get defaultOptions(): ApplicationOptions;
29
29
 
30
30
  /** @override */
31
31
  render(force?: boolean, options?: Application.RenderOptions<Options>): this;
@@ -33,7 +33,7 @@ interface SceneControl {
33
33
  * Scene controls navigation menu
34
34
  * @typeParam Options - the type of the options object
35
35
  */
36
- declare class SceneControls<Options extends Application.Options = Application.Options> extends Application<Options> {
36
+ declare class SceneControls<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
37
37
  constructor(options?: Partial<Options>);
38
38
 
39
39
  /**
@@ -118,7 +118,7 @@ declare class SceneControls<Options extends Application.Options = Application.Op
118
118
  }
119
119
 
120
120
  declare namespace SceneControls {
121
- export interface Options extends Application.Options {
121
+ export interface Options extends ApplicationOptions {
122
122
  /**
123
123
  * @defaultValue `100`
124
124
  */
@@ -8,7 +8,7 @@ declare global {
8
8
  * @typeParam Data - The data structure used to render the handlebars template.
9
9
  */
10
10
  class SceneNavigation<
11
- Options extends Application.Options = Application.Options,
11
+ Options extends ApplicationOptions = ApplicationOptions,
12
12
  Data extends object = SceneNavigation.Data
13
13
  > extends Application<Options> {
14
14
  constructor(options?: Partial<Options>);
@@ -31,7 +31,7 @@ declare global {
31
31
  * })
32
32
  * ```
33
33
  */
34
- static get defaultOptions(): Application.Options;
34
+ static get defaultOptions(): ApplicationOptions;
35
35
 
36
36
  /**
37
37
  * Return an Array of Scenes which are displayed in the Navigation bar
@@ -45,7 +45,7 @@ declare global {
45
45
  protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
46
46
 
47
47
  /** @override */
48
- getData(options?: Partial<Application.Options>): Data | Promise<Data>;
48
+ getData(options?: Partial<ApplicationOptions>): Data | Promise<Data>;
49
49
 
50
50
  /**
51
51
  * Expand the SceneNavigation menu, sliding it down if it is currently collapsed
@@ -2,7 +2,7 @@
2
2
  * Render the Sidebar container, and after rendering insert Sidebar tabs.
3
3
  * @typeParam Options - the type of the options object
4
4
  */
5
- declare class Sidebar<Options extends Application.Options = Application.Options> extends Application<Options> {
5
+ declare class Sidebar<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
6
6
  /**
7
7
  * Singleton application instances for each sidebar tab
8
8
  * @defaultValue `{}`
@@ -29,7 +29,7 @@ declare class Sidebar<Options extends Application.Options = Application.Options>
29
29
  * }
30
30
  * ```
31
31
  */
32
- static get defaultOptions(): Application.Options;
32
+ static get defaultOptions(): ApplicationOptions;
33
33
 
34
34
  /**
35
35
  * Return the name of the active Sidebar tab
@@ -3,7 +3,7 @@
3
3
  * @typeParam Options - The type of the options object
4
4
  */
5
5
  declare abstract class SidebarTab<
6
- Options extends Application.Options = Application.Options
6
+ Options extends ApplicationOptions = ApplicationOptions
7
7
  > extends Application<Options> {
8
8
  constructor(...args: ConstructorParameters<typeof Application>);
9
9
  /**
@@ -36,16 +36,13 @@ declare abstract class SidebarTab<
36
36
  * });
37
37
  * ```
38
38
  */
39
- static get defaultOptions(): Application.Options;
40
-
41
- /** @override */
42
- protected _renderInner(data: object): Promise<JQuery>;
39
+ static get defaultOptions(): ApplicationOptions;
43
40
 
44
41
  /** @override */
45
42
  protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
46
43
 
47
- /** @override */
48
- render(force?: boolean, options?: Application.RenderOptions<Options>): unknown;
44
+ /** @override */
45
+ protected _renderInner(data: object): Promise<JQuery>;
49
46
 
50
47
  /**
51
48
  * Activate this SidebarTab, switching focus to it
@@ -302,7 +302,7 @@ declare global {
302
302
  isStream: boolean;
303
303
  }
304
304
 
305
- interface Options extends Application.Options {
305
+ interface Options extends ApplicationOptions {
306
306
  /**
307
307
  * @defaultValue `'chat'`
308
308
  */
@@ -4,7 +4,7 @@ declare global {
4
4
  /**
5
5
  * The sidebar directory which organizes and displays world-level Combat documents.
6
6
  */
7
- class CombatTracker<Options extends Application.Options = CombatTracker.Options> extends SidebarTab<Options> {
7
+ class CombatTracker<Options extends ApplicationOptions = ApplicationOptions> extends SidebarTab<Options> {
8
8
  constructor(options?: Partial<Options>);
9
9
 
10
10
  /**
@@ -20,13 +20,23 @@ declare global {
20
20
  */
21
21
  viewed: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof Combat>>> | null;
22
22
 
23
- /** @override */
24
- static get defaultOptions(): CombatTracker.Options;
23
+ /**
24
+ * @defaultValue
25
+ * ```typescript
26
+ * foundry.utils.mergeObject(super.defaultOptions, {
27
+ * id: "combat",
28
+ * template: "templates/sidebar/combat-tracker.html",
29
+ * title: "COMBAT.SidebarTitle",
30
+ * scrollY: [".directory-list"]
31
+ * })
32
+ * ```
33
+ */
34
+ static get defaultOptions(): ApplicationOptions;
25
35
 
26
36
  /**
27
37
  * Return an array of Combat encounters which occur within the current Scene.
28
38
  */
29
- get combats(): ReturnType<CombatEncounters['filter']>;
39
+ get combats(): StoredDocument<InstanceType<ConfiguredDocumentClass<typeof Combat>>>[];
30
40
 
31
41
  /** @override */
32
42
  createPopout(): this;
@@ -115,6 +125,12 @@ declare global {
115
125
  */
116
126
  protected _onCombatantHoverOut(event: JQuery.MouseLeaveEvent): void;
117
127
 
128
+ /**
129
+ * Highlight a hovered combatant in the tracker.
130
+ * @param combatant - The Combatant
131
+ * @param hover - Whether they are being hovered in or out.
132
+ */
133
+ hoverCombatant(combatant: InstanceType<ConfiguredDocumentClass<typeof Combatant>>, hover: boolean): void;
118
134
  /**
119
135
  * Attach context menu options to elements in the tracker
120
136
  * @param html - The HTML element to which context options are attached
@@ -123,8 +139,8 @@ declare global {
123
139
  protected _contextMenu(html: JQuery): void;
124
140
 
125
141
  /**
126
- * Get the sidebar directory entry context options
127
- * @returns The sidebar entry context options
142
+ * Get the Combatant entry context options
143
+ * @returns The Combatant entry context options
128
144
  * @internal
129
145
  */
130
146
  protected _getEntryContextOptions(): ContextMenuEntry[];
@@ -144,6 +160,8 @@ declare global {
144
160
  combatCount: number;
145
161
  started: boolean;
146
162
  settings: ClientSettings.Values[`core.${typeof Combat.CONFIG_SETTING}`];
163
+ linked: boolean;
164
+ labels: { scoped: string };
147
165
  currentIndex: -1;
148
166
  hasCombat: false;
149
167
  combat: null;
@@ -158,6 +176,8 @@ declare global {
158
176
  combatCount: number;
159
177
  started: boolean;
160
178
  settings: ClientSettings.Values[`core.${typeof Combat.CONFIG_SETTING}`];
179
+ linked: boolean;
180
+ labels: { scoped: string };
161
181
  currentIndex: number;
162
182
  hasCombat: true;
163
183
  combat: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof Combat>>>;
@@ -184,27 +204,5 @@ declare global {
184
204
  css: string;
185
205
  effects: Set<string>;
186
206
  };
187
-
188
- interface Options extends Application.Options {
189
- /**
190
- * @defaultValue `'combat'`
191
- */
192
- id: string;
193
-
194
- /**
195
- * @defaultValue `'templates/sidebar/combat-tracker.html'`
196
- */
197
- template: string;
198
-
199
- /**
200
- * @defaultValue `'Combat Tracker'`
201
- */
202
- title: string;
203
-
204
- /**
205
- * @defaultValue `['.directory-list']`
206
- */
207
- scrollY: string[];
208
- }
209
207
  }
210
208
  }
@@ -5,7 +5,7 @@ declare global {
5
5
  * A compendium of knowledge arcane and mystical!
6
6
  * @typeParam Options - The type of the options object
7
7
  */
8
- class CompendiumDirectory<Options extends Application.Options = Application.Options> extends SidebarTab<Options> {
8
+ class CompendiumDirectory<Options extends ApplicationOptions = ApplicationOptions> extends SidebarTab<Options> {
9
9
  /**
10
10
  * @override
11
11
  * @defaultValue
@@ -17,7 +17,7 @@ declare global {
17
17
  * });
18
18
  * ```
19
19
  */
20
- static get defaultOptions(): Application.Options;
20
+ static get defaultOptions(): ApplicationOptions;
21
21
 
22
22
  /**
23
23
  * @param options - (unused)
@@ -6,7 +6,7 @@ declare global {
6
6
  * The Settings sidebar is the furthest-to-right using a triple-cogs icon.
7
7
  * @typeParam Options - The type of the options object
8
8
  */
9
- class Settings<Options extends Application.Options = Application.Options> extends SidebarTab<Options> {
9
+ class Settings<Options extends ApplicationOptions = ApplicationOptions> extends SidebarTab<Options> {
10
10
  /**
11
11
  * @override
12
12
  * @defaultValue
@@ -18,7 +18,7 @@ declare global {
18
18
  * })
19
19
  * ```
20
20
  */
21
- static get defaultOptions(): Application.Options;
21
+ static get defaultOptions(): ApplicationOptions;
22
22
 
23
23
  /**
24
24
  * @param options - (unused)
@@ -224,7 +224,7 @@ declare global {
224
224
  sidebarIcon: string;
225
225
  }
226
226
 
227
- interface Options extends Application.Options {
227
+ interface Options extends ApplicationOptions {
228
228
  renderUpdateKeys: string[];
229
229
  contextMenuSelector: string;
230
230
  }
@@ -72,6 +72,11 @@ declare global {
72
72
  */
73
73
  initialized: boolean;
74
74
 
75
+ /**
76
+ * A promise that resolves when the canvas is first initialized and ready.
77
+ */
78
+ initializing: Promise<void> | null;
79
+
75
80
  /**
76
81
  * Track the timestamp of the last stage zoom operation
77
82
  * @defaultValue `0`
@@ -275,7 +275,8 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
275
275
  * (default: `{}`)
276
276
  * @param context - Additional context options or dialog positioning options
277
277
  * (default: `{}`)
278
- * @returns A Promise which resolves to the created Document
278
+ * @returns A Promise which resolves to the created Document, or null if the dialog was
279
+ * closed.
279
280
  */
280
281
  static createDialog<T extends DocumentConstructor>(
281
282
  this: T,
@@ -2,6 +2,7 @@ import { ConfiguredDocumentClass, ConfiguredObjectClassForName, DocumentConstruc
2
2
  import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
3
  import EmbeddedCollection from '../../common/abstract/embedded-collection.mjs';
4
4
  import type { ActorDataConstructorData } from '../../common/data/data.mjs/actorData.js';
5
+ import type { ItemDataSource } from '../../common/data/data.mjs/itemData';
5
6
 
6
7
  declare global {
7
8
  /**
@@ -64,10 +65,13 @@ declare global {
64
65
  /**
65
66
  * Provide an object which organizes all embedded Item instances by their type
66
67
  */
67
- get itemTypes(): Record<
68
- foundry.documents.BaseItem['data']['type'],
69
- Array<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseItem>>>
70
- >;
68
+ get itemTypes(): {
69
+ [Key in foundry.documents.BaseItem['data']['type']]: Array<
70
+ InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseItem>> & {
71
+ data: foundry.data.ItemData & { type: Key; _source: ItemDataSource & { type: Key } };
72
+ }
73
+ >;
74
+ };
71
75
  /**
72
76
  * Test whether an Actor entity is a synthetic representation of a Token (if true) or a full Entity (if false)
73
77
  */
@@ -47,7 +47,8 @@ declare global {
47
47
  get source(): InstanceType<ConfiguredDocumentClassForName<'Cards'>> | undefined | null;
48
48
 
49
49
  /**
50
- * A convenience property for whether or not the Card is within its source Cards stack.
50
+ * A convenience property for whether or not the Card is within its source Cards stack. Cards in decks are always
51
+ * considered home.
51
52
  */
52
53
  get isHome(): boolean;
53
54
 
@@ -211,15 +211,10 @@ declare global {
211
211
  * Display a dialog which prompts the user to play a specific Card to some other Cards document
212
212
  * @see {@link Cards#pass}
213
213
  * @param card - The specific card being played as part of this dialog
214
- * @remarks returns documentation is incorrect (see https://gitlab.com/foundrynet/foundryvtt/-/issues/6367)
215
214
  */
216
215
  playDialog(
217
216
  card: InstanceType<ConfiguredDocumentClassForName<'Card'>>
218
- ): Promise<
219
- | InstanceType<ConfiguredDocumentClassForName<'Card'>>[]
220
- | InstanceType<ConfiguredDocumentClassForName<'Cards'>>
221
- | null
222
- >;
217
+ ): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>>[] | void | null>;
223
218
 
224
219
  /**
225
220
  * Display a confirmation dialog for whether or not the user wishes to reset a Cards stack
@@ -1,6 +1,5 @@
1
- import { ConfiguredDocumentClass } from '../../../types/helperTypes';
1
+ import { ConfiguredDocumentClass, ConstructorDataType, DocumentConstructor } from '../../../types/helperTypes';
2
2
  import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { FolderDataConstructorData } from '../../common/data/data.mjs/folderData.js';
4
3
 
5
4
  declare global {
6
5
  /**
@@ -65,14 +64,21 @@ declare global {
65
64
  * @returns An active FolderConfig instance for creating the new Folder entity
66
65
  *
67
66
  * @remarks
68
- * This actually returns a FolderConfig but that is incorrectly overriding
69
- * ClientDocumentMixin.createDialog, for which a Promise of the created
70
- * Document is returned.
67
+ * The documented return type is incorrect. It now returns a promise that resolves to the
68
+ * created folder as intended. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6619
69
+ *
70
+ * For weird reasons, we need to make this generic.
71
71
  */
72
- static createDialog(
73
- data?: DeepPartial<FolderDataConstructorData | (FolderDataConstructorData & Record<string, unknown>)> | undefined,
74
- options?: Dialog.Options | undefined
75
- ): any;
72
+ static createDialog<T extends DocumentConstructor>(
73
+ this: T,
74
+ data?:
75
+ | DeepPartial<
76
+ | ConstructorDataType<InstanceType<T>['data']>
77
+ | (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
78
+ >
79
+ | undefined,
80
+ options?: Partial<DocumentSheetOptions> | undefined
81
+ ): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
76
82
 
77
83
  /**
78
84
  * Export all Documents contained in this Folder to a given Compendium pack.
@@ -211,7 +211,7 @@ declare namespace ClientSettings {
211
211
  label?: string;
212
212
  name?: string;
213
213
  restricted: boolean;
214
- type: ConstructorOf<FormApplication<FormApplication.Options, object>>;
214
+ type: ConstructorOf<FormApplication<FormApplicationOptions, object>>;
215
215
  }
216
216
 
217
217
  interface RegisteredMenuSettings {
@@ -39,7 +39,7 @@ declare global {
39
39
  /**
40
40
  * Render any Applications associated with this DocumentCollection.
41
41
  */
42
- render(force?: boolean, options?: Application.Options): void;
42
+ render(force?: boolean, options?: ApplicationOptions): void;
43
43
 
44
44
  /**
45
45
  * Update all objects in this DocumentCollection with a provided transformation.
@@ -19,7 +19,7 @@ declare global {
19
19
  static documentName: 'Folder';
20
20
 
21
21
  /** @override */
22
- render(force?: boolean, context?: Application.Options): void;
22
+ render(force?: boolean, context?: ApplicationOptions): void;
23
23
 
24
24
  /**
25
25
  * Refresh the display of any active JournalSheet instances where the folder list will change.