@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.
Files changed (93) hide show
  1. package/README.md +41 -13
  2. package/index-lenient.d.ts +10 -0
  3. package/package.json +10 -1
  4. package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
  5. package/src/foundry/common/abstract/document.mjs.d.ts +6 -2
  6. package/src/foundry/common/data/data.mjs/drawingData.d.ts +8 -3
  7. package/src/foundry/common/data/data.mjs/index.d.ts +2 -0
  8. package/src/foundry/common/data/data.mjs/playlistData.d.ts +171 -0
  9. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +143 -0
  10. package/src/foundry/common/data/fields.mjs.d.ts +2 -2
  11. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +11 -1
  12. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +21 -2
  13. package/src/foundry/common/types.mjs.d.ts +5 -0
  14. package/src/foundry/foundry.js/application.d.ts +2 -5
  15. package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
  16. package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
  17. package/src/foundry/foundry.js/applications/filePicker.d.ts +114 -114
  18. package/src/foundry/foundry.js/applications/formApplication.d.ts +3 -11
  19. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
  20. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
  21. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
  22. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
  23. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +5 -2
  24. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +57 -0
  25. package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +2 -2
  26. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +7 -0
  27. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +84 -0
  28. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
  29. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
  30. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +54 -60
  31. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +41 -28
  32. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +75 -0
  33. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +190 -148
  34. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
  35. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +66 -0
  36. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
  37. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
  38. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -7
  39. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
  40. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
  41. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +146 -158
  42. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
  43. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
  44. package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +11 -5
  45. package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
  46. package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
  47. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
  48. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
  49. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
  50. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
  51. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
  52. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +249 -139
  53. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
  54. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -5
  55. package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
  56. package/src/foundry/foundry.js/canvas.d.ts +2 -1
  57. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
  58. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +1 -1
  59. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/index.d.ts +8 -0
  60. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
  61. package/src/foundry/foundry.js/clientDocuments/index.d.ts +19 -0
  62. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +195 -6
  63. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +113 -0
  64. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
  65. package/src/foundry/foundry.js/clientSettings.d.ts +14 -1
  66. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +44 -8
  67. package/src/foundry/foundry.js/config.d.ts +85 -71
  68. package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
  69. package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
  70. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
  71. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  72. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
  73. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
  74. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
  75. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +1 -1
  76. package/src/foundry/foundry.js/pixi/containers/doorControl.d.ts +53 -35
  77. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +6 -2
  78. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +38 -40
  79. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +56 -56
  80. package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -50
  81. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +166 -47
  82. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
  83. package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +11 -7
  84. package/src/foundry/foundry.js/pixi/graphics/gridHighlight.d.ts +4 -9
  85. package/src/foundry/foundry.js/pointSource.d.ts +173 -85
  86. package/src/foundry/foundry.js/textEditor.d.ts +39 -8
  87. package/src/foundry/index.d.ts +2 -25
  88. package/src/foundry/foundry.js/applications/formApplications/ambientSoundConfig.d.ts +0 -68
  89. package/src/foundry/foundry.js/applications/formApplications/lightConfig.d.ts +0 -98
  90. package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
  91. package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
  92. package/src/foundry/foundry.js/applications/formApplications/playlistSoundConfig.d.ts +0 -70
  93. package/src/foundry/foundry.js/applications/formApplications/tileConfig.d.ts +0 -73
@@ -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
- * @defaultValue
17
- * ```typescript
18
- * const options = super.defaultOptions;
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
- static get defaultOptions(): WallConfig.Options;
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
- * Provide a dynamically rendered title for the Wall Configuration sheet
30
- */
31
- get title(): string;
25
+ /** @override */
26
+ get title(): string;
32
27
 
33
- /**
34
- * Construct and return the data object used to render the HTML template for this form application.
35
- */
36
- getData(): WallConfig.Data;
28
+ /** @override */
29
+ render(force?: boolean, options?: Application.RenderOptions<Options>): this;
37
30
 
38
- /**
39
- * This method is called upon form submission after form data is validated
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
- declare namespace WallConfig {
47
- interface Data {
48
- object: foundry.utils.Duplicated<WallConfig['object']['data']>;
49
- options: WallConfig['options'];
50
- moveTypes: {
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
- interface FormData {
69
- dir: foundry.CONST.WallDirection;
70
- door: Wall['data']['door'];
71
- ds?: Wall['data']['ds'];
72
- move: Wall['data']['move'];
73
- sense: Wall['data']['sense'];
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
- interface Options extends FormApplication.Options {
77
- /**
78
- * @defaultValue `[]`
79
- */
80
- editTargets: string[];
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
  }
@@ -1,33 +1,33 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
2
  * The World Management setup application
3
+ * @typeParam Options - The type of the options object
4
+ * @typeParam Data - The data structure used to render the handlebars template.
7
5
  */
8
- declare class WorldConfig extends FormApplication<WorldConfig.Options, WorldConfig.Data, Game.World> {
6
+ declare class WorldConfig<
7
+ Options extends WorldConfig.Options = WorldConfig.Options,
8
+ Data extends object = WorldConfig.Data
9
+ > extends FormApplication<Options, Data, Game.WorldData<foundry.packages.WorldData>> {
9
10
  /**
10
11
  * @defaultValue
11
12
  * ```typescript
12
- * mergeObject(super.defaultOptions, {
13
+ * foundry.utils.mergeObject(super.defaultOptions, {
13
14
  * id: "world-config",
14
- * template: "templates/setup/world-config.html",
15
+ * template: "templates/sidebar/apps/world-config.html",
15
16
  * width: 600,
16
17
  * height: "auto",
17
- * create: false
18
- * });
18
+ * create: false,
19
+ * })
19
20
  * ```
20
21
  */
21
22
  static get defaultOptions(): WorldConfig.Options;
22
23
 
24
+ static WORLD_KB_URL: 'https://foundryvtt.com/article/game-worlds/';
25
+
23
26
  /** @override */
24
27
  get title(): string;
25
28
 
26
- /**
27
- * @param options - (unused)
28
- * @override
29
- */
30
- getData(options?: Partial<WorldConfig.Options>): WorldConfig.Data;
29
+ /** @override */
30
+ getData(options?: Partial<Options>): Data | Promise<Data>;
31
31
 
32
32
  /**
33
33
  * @remarks This method returns `Promise<void>`.
@@ -39,16 +39,22 @@ declare class WorldConfig extends FormApplication<WorldConfig.Options, WorldConf
39
39
  * @remarks This method does not exist on WorldConfig and only exists to make the typescript compile!
40
40
  */
41
41
  protected _updateObject(...args: unknown[]): Promise<unknown>;
42
+
43
+ /** @override **/
44
+ activateEditor(name: string, options?: TextEditor.Options, initialContent?: string): void;
42
45
  }
43
46
 
44
47
  declare namespace WorldConfig {
45
48
  interface Data {
46
- world: WorldConfig['object'];
47
- systems: Game.System[];
48
- isCreate: WorldConfig['options']['create'];
49
+ world: Game.WorldData<foundry.packages.WorldData>;
50
+ isCreate: boolean;
49
51
  submitText: string;
50
52
  nextDate: string;
51
53
  nextTime: string;
54
+ worldKbUrl: typeof WorldConfig['WORLD_KB_URL'];
55
+ inWorld: boolean;
56
+ showEditFields: boolean;
57
+ systems?: Game.SystemData<foundry.packages.SystemData>[];
52
58
  }
53
59
 
54
60
  interface Options extends FormApplication.Options {
@@ -56,5 +62,7 @@ declare namespace WorldConfig {
56
62
  * @defaultValue `false`
57
63
  */
58
64
  create: boolean;
65
+
66
+ inWorld?: boolean;
59
67
  }
60
68
  }
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Render the HUD container
3
+ * @typeParam Options - the type of the options object
3
4
  */
4
- declare class HeadsUpDisplay extends Application {
5
+ declare class HeadsUpDisplay<Options extends Application.Options = Application.Options> extends Application<Options> {
5
6
  /**
6
7
  * Token HUD
7
8
  */
@@ -23,7 +24,7 @@ declare class HeadsUpDisplay extends Application {
23
24
  bubbles: ChatBubbles;
24
25
 
25
26
  /**
26
- * Define default options which configure the HUD
27
+ * @override
27
28
  * @defaultValue
28
29
  * ```
29
30
  * mergeObject(super.defaultOptions, {
@@ -33,11 +34,16 @@ declare class HeadsUpDisplay extends Application {
33
34
  * })
34
35
  * ```
35
36
  */
36
- static get defaultOptions(): typeof Application['defaultOptions'];
37
+ static get defaultOptions(): Application.Options;
37
38
 
38
- getData(): {} | { width: number; height: number };
39
+ /** @override */
40
+ getData(options?: Partial<Options>): {} | { width: number; height: number };
39
41
 
40
- _render(...args: Parameters<Application['_render']>): Promise<void>;
42
+ /** @override */
43
+ protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
41
44
 
45
+ /**
46
+ * Align the position of the HUD layer to the current position of the canvas
47
+ */
42
48
  align(): void;
43
49
  }
@@ -133,10 +133,11 @@ declare global {
133
133
  */
134
134
  protected _canDragDrop(selector: string): boolean;
135
135
 
136
- /** @override */
137
- protected _onDrop(
138
- event: DragEvent
139
- ): void | ReturnType<InstanceType<ConfiguredDocumentClass<typeof User>>['assignHotbarMacro']>;
136
+ /**
137
+ * @override
138
+ * @internal
139
+ */
140
+ protected _onDrop(event: DragEvent): void;
140
141
 
141
142
  /**
142
143
  * Handle click events to toggle display of the macro bar
@@ -1,15 +1,25 @@
1
- declare interface SceneControlTool {
1
+ interface SceneControlToolBase {
2
2
  name: string;
3
3
  title: string;
4
4
  icon: string;
5
5
  visible?: boolean;
6
- toggle?: boolean;
7
6
  active?: boolean;
7
+ }
8
+
9
+ interface SceneControlToolToggle extends SceneControlToolBase {
10
+ toggle: true;
11
+ onClick?: (toggled: boolean) => void;
12
+ }
13
+
14
+ interface SceneControlToolNoToggle extends SceneControlToolBase {
15
+ toggle?: false;
8
16
  button?: boolean;
9
17
  onClick?: () => void;
10
18
  }
11
19
 
12
- declare interface SceneControl {
20
+ type SceneControlTool = SceneControlToolToggle | SceneControlToolNoToggle;
21
+
22
+ interface SceneControl {
13
23
  name: string;
14
24
  title: string;
15
25
  layer: string;
@@ -1,89 +1,108 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
- /**
6
- * Top menu scene navigation
7
- */
8
- declare class SceneNavigation extends Application {
9
- /**
10
- * Assign the default options which are supported by the SceneNavigation UI
11
- * @defaultValue
12
- * ```typescript
13
- * {
14
- * ...super.defaultOptions,
15
- * id: 'navigation',
16
- * template: 'templates/hud/navigation.html',
17
- * popOut: false,
18
- * dragDrop: [{dragSelector: ".scene"}]
19
- * }
20
- * ```
21
- */
22
- static get defaultOptions(): typeof Application['defaultOptions'];
1
+ import type { ConfiguredDocumentClassForName, ToObjectFalseType } from '../../../types/helperTypes';
23
2
 
3
+ declare global {
24
4
  /**
25
- * Return an Array of Scenes which are displayed in the Navigation bar
5
+ * The UI element which displays the Scene documents which are currently enabled for quick navigation.
6
+ *
7
+ * @typeParam Options - the type of the options object
8
+ * @typeParam Data - The data structure used to render the handlebars template.
26
9
  */
27
- get scenes(): Scene[];
10
+ class SceneNavigation<
11
+ Options extends Application.Options = Application.Options,
12
+ Data extends object = SceneNavigation.Data
13
+ > extends Application<Options> {
14
+ constructor(options?: Partial<Options>);
28
15
 
29
- /** @override */
30
- render(force?: boolean, options?: Application.RenderOptions): this | undefined;
16
+ /**
17
+ * Navigation collapsed state
18
+ * @internal
19
+ */
20
+ protected _collapsed: boolean;
31
21
 
32
- /** @override */
33
- protected _render(force?: boolean, options?: Application.RenderOptions): Promise<void>;
22
+ /**
23
+ * @override
24
+ * @defaultValue
25
+ * ```typescript
26
+ * foundry.utils.mergeObject(super.defaultOptions, {
27
+ * id: "navigation",
28
+ * template: "templates/hud/navigation.html",
29
+ * popOut: false,
30
+ * dragDrop: [{ dragSelector: ".scene" }],
31
+ * })
32
+ * ```
33
+ */
34
+ static get defaultOptions(): Application.Options;
34
35
 
35
- /** @override */
36
- getData(options?: Partial<Application.Options>): SceneNavigation.Data | Promise<SceneNavigation.Data>;
36
+ /**
37
+ * Return an Array of Scenes which are displayed in the Navigation bar
38
+ */
39
+ get scenes(): InstanceType<ConfiguredDocumentClassForName<'Scene'>>[];
37
40
 
38
- /**
39
- * Expand the SceneNavigation menu, sliding it down if it is currently collapsed
40
- */
41
- expand(): Promise<boolean>;
41
+ /** @override */
42
+ render(force?: boolean, context?: Application.RenderOptions<Options>): this | void;
42
43
 
43
- /**
44
- * Collapse the SceneNavigation menu, sliding it up if it is currently expanded
45
- */
46
- collapse(): Promise<boolean>;
44
+ /** @override */
45
+ protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
47
46
 
48
- /**
49
- * Activate Scene Navigation event listeners
50
- */
51
- activateListeners(html: JQuery): void;
47
+ /** @override */
48
+ getData(options?: Partial<Application.Options>): Data | Promise<Data>;
52
49
 
53
- /**
54
- * Get the set of ContextMenu options which should be applied for Scenes in the menu
55
- */
56
- private _getContextMenuOptions(): ContextMenuEntry[];
50
+ /**
51
+ * Expand the SceneNavigation menu, sliding it down if it is currently collapsed
52
+ */
53
+ expand(): Promise<boolean>;
57
54
 
58
- /**
59
- * Handle left-click events on the scenes in the navigation menu
60
- */
61
- private _onClickScene(event: JQuery.ClickEvent): void;
55
+ /**
56
+ * Collapse the SceneNavigation menu, sliding it up if it is currently expanded
57
+ */
58
+ collapse(): Promise<boolean>;
62
59
 
63
- /** @override */
64
- protected _onDragStart(event: DragEvent): void;
60
+ /** @override */
61
+ activateListeners(html: JQuery): void;
65
62
 
66
- /** @override */
67
- protected _onDrop(event: DragEvent): Promise<boolean | undefined | void>;
63
+ /**
64
+ * Get the set of ContextMenu options which should be applied for Scenes in the menu
65
+ * @returns The Array of context options passed to the ContextMenu instance
66
+ * @internal
67
+ */
68
+ protected _getContextMenuOptions(): ContextMenuEntry[];
68
69
 
69
- /** @override */
70
- private _onToggleNav(event: JQuery.ClickEvent): void;
70
+ /**
71
+ * Handle left-click events on the scenes in the navigation menu
72
+ * @internal
73
+ */
74
+ protected _onClickScene(event: JQuery.ClickEvent): void;
71
75
 
72
- /**
73
- * Updated the loading progress bar
74
- * @param context - The message to display in the progress back
75
- * @param pct - The percentage the progress bar has completed
76
- */
77
- static _onLoadProgress(context: string, pct: number): void;
78
- }
76
+ /**
77
+ * @override
78
+ * @internal
79
+ */
80
+ protected _onDragStart(event: DragEvent): void;
81
+
82
+ /**
83
+ * @override
84
+ * @internal
85
+ */
86
+ protected _onDrop(event: DragEvent): void;
87
+
88
+ /**
89
+ * Handle navigation menu toggle click events
90
+ * @internal
91
+ */
92
+ protected _onToggleNav(event: JQuery.ClickEvent): void;
93
+
94
+ static _onLoadProgress(context: string, pct: number): void;
95
+ }
79
96
 
80
- declare namespace SceneNavigation {
81
- interface Data {
82
- collapsed: boolean;
83
- scenes: (foundry.utils.Duplicated<Scene['data']> & {
84
- users: { letter: string; color: User['data']['color'] };
85
- visible: boolean;
86
- css: [string | null];
87
- })[];
97
+ namespace SceneNavigation {
98
+ interface Data {
99
+ collapsed: boolean;
100
+ scenes: (ToObjectFalseType<foundry.data.SceneData> & {
101
+ name: string;
102
+ users: { letter: string; color: string };
103
+ visible: boolean;
104
+ css: string;
105
+ })[];
106
+ }
88
107
  }
89
108
  }
@@ -1,67 +1,24 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
- * A directory list of Actor entities in the Sidebar
7
- * @see {@link Actor}
2
+ * The sidebar directory which organizes and displays world-level Actor documents.
8
3
  */
9
- declare class ActorDirectory extends SidebarDirectory {
10
- /**
11
- * @override
12
- */
13
- static get entity(): 'Actor';
14
-
15
- /**
16
- * @override
17
- * @see {@link Game.actors}
18
- */
19
- static get collection(): Game['actors'];
4
+ declare class ActorDirectory extends SidebarDirectory<'Actor'> {
5
+ constructor(...args: ConstructorParameters<typeof SidebarDirectory>);
20
6
 
21
- /**
22
- * @param options - (unused)
23
- * @override
24
- */
25
- getData(options?: Partial<SidebarDirectory.Options>): ActorDirectory.Data;
7
+ /** @override */
8
+ static documentName: 'Actor';
26
9
 
27
- /**
28
- * @param selector - (unused)
29
- * @override
30
- */
31
- protected _canDragStart(selector: string | null): boolean;
10
+ /** @override */
11
+ protected _canDragStart(selector: string): boolean;
32
12
 
33
- /**
34
- * @override
35
- */
36
- protected _onDragStart(event: DragEvent): false | void;
13
+ /** @override */
14
+ protected _onDragStart(event: DragEvent): void;
37
15
 
38
- /**
39
- * @param selector - (unused)
40
- * @override
41
- */
42
- protected _canDragDrop(selector: string | null): boolean;
16
+ /** @override */
17
+ protected _canDragDrop(selector: string): boolean;
43
18
 
44
- /**
45
- * @override
46
- */
19
+ /** @override */
47
20
  protected _onClickEntityName(event: JQuery.ClickEvent): Promise<void>;
48
21
 
49
- /**
50
- * @override
51
- */
22
+ /** @override */
52
23
  protected _getEntryContextOptions(): ContextMenuEntry[];
53
24
  }
54
-
55
- declare namespace ActorDirectory {
56
- interface Data extends SidebarDirectory.Data {
57
- /**
58
- * @defaultValue `'templates/sidebar/folder-partial.html'`
59
- */
60
- folderPartial: string;
61
-
62
- /**
63
- * @defaultValue `'templates/sidebar/actor-partial.html'`
64
- */
65
- entityPartial: string;
66
- }
67
- }
@@ -1,36 +1,13 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
- * A directory of Item entities in the Sidebar
2
+ * The sidebar directory which organizes and displays world-level Item documents.
7
3
  */
8
- declare class ItemDirectory extends SidebarDirectory {
9
- /**
10
- * @override
11
- */
12
- static get entity(): 'Item';
13
-
14
- /**
15
- * @override
16
- * @see {@link Game.items}
17
- */
18
- static get collection(): Game['items'];
19
-
20
- /**
21
- * @param selector - (unused)
22
- * @override
23
- */
24
- protected _canDragStart(selector: string | null): boolean;
4
+ declare class ItemDirectory extends SidebarDirectory<'Item'> {
5
+ /** @override */
6
+ static documentName: 'Item';
25
7
 
26
- /**
27
- * @param selector - (unused)
28
- * @override
29
- */
30
- protected _canDragDrop(selector: string | null): boolean;
8
+ /** @override */
9
+ protected _canDragDrop(selector: string): boolean;
31
10
 
32
- /**
33
- * @override
34
- */
11
+ /** @override */
35
12
  protected _getEntryContextOptions(): ContextMenuEntry[];
36
13
  }