@league-of-foundry-developers/foundry-vtt-types 0.8.9-4 → 0.8.9-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -13
- package/index-lenient.d.ts +10 -0
- package/package.json +10 -1
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +6 -2
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +8 -3
- package/src/foundry/common/data/data.mjs/index.d.ts +2 -0
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +171 -0
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +143 -0
- package/src/foundry/common/data/fields.mjs.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +11 -1
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +21 -2
- package/src/foundry/common/types.mjs.d.ts +5 -0
- package/src/foundry/foundry.js/application.d.ts +2 -5
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
- package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +114 -114
- package/src/foundry/foundry.js/applications/formApplication.d.ts +3 -11
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +5 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +57 -0
- package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +7 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +84 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +54 -60
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +41 -28
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +75 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +190 -148
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -7
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +146 -158
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +11 -5
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +249 -139
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -5
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +2 -1
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/index.d.ts +8 -0
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +19 -0
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +195 -6
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +113 -0
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +14 -1
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +44 -8
- package/src/foundry/foundry.js/config.d.ts +85 -71
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/doorControl.d.ts +53 -35
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +38 -40
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +56 -56
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -50
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +166 -47
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +11 -7
- package/src/foundry/foundry.js/pixi/graphics/gridHighlight.d.ts +4 -9
- package/src/foundry/foundry.js/pointSource.d.ts +173 -85
- package/src/foundry/foundry.js/textEditor.d.ts +39 -8
- package/src/foundry/index.d.ts +2 -25
- package/src/foundry/foundry.js/applications/formApplications/ambientSoundConfig.d.ts +0 -68
- package/src/foundry/foundry.js/applications/formApplications/lightConfig.d.ts +0 -98
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
- package/src/foundry/foundry.js/applications/formApplications/playlistSoundConfig.d.ts +0 -70
- package/src/foundry/foundry.js/applications/formApplications/tileConfig.d.ts +0 -73
package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts
CHANGED
@@ -1,47 +1,27 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* The sidebar directory which organizes and displays world-level JournalEntry documents.
|
3
3
|
*/
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
declare class JournalDirectory extends SidebarDirectory<JournalDirectory.Options> {
|
8
|
-
/**
|
9
|
-
* @override
|
10
|
-
*/
|
11
|
-
static get defaultOptions(): JournalDirectory.Options;
|
12
|
-
|
13
|
-
/**
|
14
|
-
* @override
|
15
|
-
*/
|
16
|
-
get title(): string;
|
4
|
+
declare class JournalDirectory extends SidebarDirectory<'JournalEntry'> {
|
5
|
+
/** @override */
|
6
|
+
static documentName: 'JournalEntry';
|
17
7
|
|
18
8
|
/**
|
19
9
|
* @override
|
10
|
+
* @defaultValue
|
11
|
+
* ```typescript
|
12
|
+
* const options = super.defaultOptions;
|
13
|
+
* options.id = "journal";
|
14
|
+
* options.template = "templates/sidebar/journal-directory.html";
|
15
|
+
* return options;
|
16
|
+
* ```
|
20
17
|
*/
|
21
|
-
static get
|
18
|
+
static get defaultOptions(): SidebarDirectory.Options;
|
22
19
|
|
23
20
|
/**
|
24
21
|
* @override
|
25
|
-
* @see {@link Game.journal}
|
26
22
|
*/
|
27
|
-
|
23
|
+
get title(): string;
|
28
24
|
|
29
|
-
/**
|
30
|
-
* @override
|
31
|
-
*/
|
25
|
+
/** @override */
|
32
26
|
protected _getEntryContextOptions(): ContextMenuEntry[];
|
33
27
|
}
|
34
|
-
|
35
|
-
declare namespace JournalDirectory {
|
36
|
-
interface Options extends SidebarDirectory.Options {
|
37
|
-
/**
|
38
|
-
* @defaultValue `'journal'`
|
39
|
-
*/
|
40
|
-
id: string;
|
41
|
-
|
42
|
-
/**
|
43
|
-
* @defaultValue `'templates/sidebar/journal-directory.html'`
|
44
|
-
*/
|
45
|
-
template: string;
|
46
|
-
}
|
47
|
-
}
|
package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts
CHANGED
@@ -1,65 +1,19 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* The directory, not displayed in the sidebar, which organizes and displays world-level Macro documents.
|
3
3
|
*
|
4
|
-
* @see {@link Macros} The
|
4
|
+
* @see {@link Macros} The WorldCollection of Macro Entities
|
5
5
|
* @see {@link Macro} The Macro Entity
|
6
6
|
* @see {@link MacroConfig} The Macro Configuration Sheet
|
7
7
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
// @ts-ignore
|
11
|
-
declare class MacroDirectory extends SidebarDirectory<MacroDirectory.Options> {
|
12
|
-
static get defaultOptions(): MacroDirectory.Options;
|
8
|
+
declare class MacroDirectory extends SidebarDirectory<'Macro'> {
|
9
|
+
constructor(options?: Partial<SidebarDirectory.Options>);
|
13
10
|
|
14
|
-
/**
|
15
|
-
|
16
|
-
*/
|
17
|
-
static get entity(): 'Macro';
|
18
|
-
|
19
|
-
/**
|
20
|
-
* @override
|
21
|
-
* @see {@link Game.macros}
|
22
|
-
*/
|
23
|
-
static get collection(): Game['macros'];
|
24
|
-
|
25
|
-
/**
|
26
|
-
* @override
|
27
|
-
*/
|
28
|
-
protected _render(force?: boolean, options?: SidebarDirectory.RenderContext<MacroDirectory.Options>): Promise<void>;
|
11
|
+
/** @override */
|
12
|
+
static documentName: 'Macro';
|
29
13
|
|
30
14
|
/**
|
31
15
|
* @override
|
32
16
|
* @remarks This is never called.
|
33
17
|
*/
|
34
18
|
protected _onCreate(event: Event): Promise<void>;
|
35
|
-
|
36
|
-
/**
|
37
|
-
* @param selector - (unused)
|
38
|
-
* @override
|
39
|
-
*/
|
40
|
-
protected _canDragStart(selector: string | null): true;
|
41
|
-
}
|
42
|
-
|
43
|
-
declare namespace MacroDirectory {
|
44
|
-
interface Options extends SidebarDirectory.Options {
|
45
|
-
/**
|
46
|
-
* @defaultValue `'macros'`
|
47
|
-
*/
|
48
|
-
id: string;
|
49
|
-
|
50
|
-
/**
|
51
|
-
* @defaultValue `'templates/sidebar/macro-directory.html'`
|
52
|
-
*/
|
53
|
-
template: string;
|
54
|
-
|
55
|
-
/**
|
56
|
-
* @defaultValue `true`
|
57
|
-
*/
|
58
|
-
canDrag: boolean;
|
59
|
-
|
60
|
-
/**
|
61
|
-
* @defaultValue `680`
|
62
|
-
*/
|
63
|
-
height: number;
|
64
|
-
}
|
65
19
|
}
|
package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts
CHANGED
@@ -1,175 +1,285 @@
|
|
1
|
-
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
|
-
/**
|
6
|
-
* A directory listing of audio playlists
|
7
|
-
*/
|
8
|
-
declare class PlaylistDirectory extends SidebarDirectory<PlaylistDirectory.Options> {
|
9
|
-
/**
|
10
|
-
* Track the playlist IDs which are currently expanded in their display
|
11
|
-
*/
|
12
|
-
protected _expanded: Set<string>;
|
1
|
+
import type { ConfiguredDocumentClass, ToObjectFalseType } from '../../../../../types/helperTypes';
|
13
2
|
|
3
|
+
declare global {
|
14
4
|
/**
|
15
|
-
*
|
5
|
+
* The sidebar directory which organizes and displays world-level Playlist documents.
|
6
|
+
* @typeParam Options - The type of the options object
|
16
7
|
*/
|
17
|
-
|
8
|
+
class PlaylistDirectory<Options extends SidebarDirectory.Options = SidebarDirectory.Options> extends SidebarDirectory<
|
9
|
+
'Playlist',
|
10
|
+
Options
|
11
|
+
> {
|
12
|
+
constructor(options?: Partial<Options>);
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
/**
|
15
|
+
* Track the playlist IDs which are currently expanded in their display
|
16
|
+
* @internal
|
17
|
+
*/
|
18
|
+
protected _expanded: Set<string>;
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
/**
|
21
|
+
* Are the global volume controls currently expanded?
|
22
|
+
* @defaultValue `false`
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
protected _volumeExpanded: boolean;
|
29
26
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
/**
|
28
|
+
* Cache the set of Playlist documents that are displayed as playing when the directory is rendered
|
29
|
+
* @defaultValue `[]`
|
30
|
+
* @internal
|
31
|
+
*/
|
32
|
+
protected _playingPlaylists: InstanceType<ConfiguredDocumentClass<typeof Playlist>>[];
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
/**
|
35
|
+
* Cache the set of PlaylistSound documents that are displayed as playing when the directory is rendered
|
36
|
+
* @defaultValue `[]`
|
37
|
+
* @internal
|
38
|
+
*/
|
39
|
+
protected _playingSounds: InstanceType<ConfiguredDocumentClass<typeof PlaylistSound>>[];
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
/**
|
42
|
+
* @internal
|
43
|
+
* @defaultValue `undefined`
|
44
|
+
* @remarks This is only initialized and set in `getData`.
|
45
|
+
*/
|
46
|
+
protected _playingSoundsData?: PlaylistDirectory.Data.Sound[] | undefined;
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
-
*/
|
49
|
-
protected _getModeTooltip(mode: foundry.CONST.PlaylistMode): string;
|
48
|
+
/** @override */
|
49
|
+
static documentName: 'Playlist';
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
/**
|
52
|
+
* @override
|
53
|
+
* @defaultValue
|
54
|
+
* ```typescript
|
55
|
+
* const options = super.defaultOptions;
|
56
|
+
* options.dragDrop[0].dragSelector = ".playlist-name";
|
57
|
+
* options.renderUpdateKeys = ["name", "playing", "mode", "sounds", "sort", "sorting", "folder"];
|
58
|
+
* options.contextMenuSelector = ".entity .playlist-header";
|
59
|
+
* return options;
|
60
|
+
* ```
|
61
|
+
*/
|
62
|
+
static get defaultOptions(): SidebarDirectory.Options;
|
55
63
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
64
|
+
/**
|
65
|
+
* Initialize the set of Playlists which should be displayed in an expanded form
|
66
|
+
* @internal
|
67
|
+
*/
|
68
|
+
protected _createExpandedSet(): Set<string>;
|
60
69
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
70
|
+
/**
|
71
|
+
* Return an Array of the Playlist entities which are currently playing
|
72
|
+
*/
|
73
|
+
get playing(): InstanceType<ConfiguredDocumentClass<typeof Playlist>>[];
|
65
74
|
|
66
|
-
|
67
|
-
|
68
|
-
* @param speed - (default: `250`)
|
69
|
-
*/
|
70
|
-
protected _collapse(li: JQuery, collapse: boolean, speed: number): void;
|
75
|
+
/** @override */
|
76
|
+
getData(options?: Partial<Options>): PlaylistDirectory.Data;
|
71
77
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
78
|
+
/**
|
79
|
+
* Augment the tree directory structure with playlist-level data objects for rendering
|
80
|
+
* @param leaf - The tree leaf node being prepared
|
81
|
+
* @internal
|
82
|
+
*/
|
83
|
+
protected _prepareTreeData(
|
84
|
+
leaf: SidebarDirectory.Tree<InstanceType<ConfiguredDocumentClass<typeof Playlist>>>
|
85
|
+
): void;
|
76
86
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
87
|
+
/**
|
88
|
+
* Create an object of rendering data for each Playlist document being displayed
|
89
|
+
* @param playlist - The playlist to display
|
90
|
+
* @returns The data for rendering
|
91
|
+
* @internal
|
92
|
+
*/
|
93
|
+
protected _preparePlaylistData(
|
94
|
+
playlist: InstanceType<ConfiguredDocumentClass<typeof Playlist>>
|
95
|
+
): PlaylistDirectory.Data.Playlist;
|
82
96
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
97
|
+
/**
|
98
|
+
* Get the icon used to represent the "play/stop" icon for the PlaylistSound
|
99
|
+
* @param sound - The sound being rendered
|
100
|
+
* @returns The icon that should be used
|
101
|
+
* @internal
|
102
|
+
*/
|
103
|
+
protected _getPlayIcon(sound: InstanceType<ConfiguredDocumentClass<typeof PlaylistSound>>): string;
|
87
104
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
105
|
+
/**
|
106
|
+
* Get the icon used to represent the pause/loading icon for the PlaylistSound
|
107
|
+
* @param sound - The sound being rendered
|
108
|
+
* @returns The icon that should be used
|
109
|
+
* @internal
|
110
|
+
*/
|
111
|
+
protected _getPauseIcon(sound: InstanceType<ConfiguredDocumentClass<typeof PlaylistSound>>): string;
|
92
112
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
113
|
+
/**
|
114
|
+
* Given a constant playback mode, provide the FontAwesome icon used to display it
|
115
|
+
* @internal
|
116
|
+
*/
|
117
|
+
protected _getModeIcon(mode: foundry.CONST.PlaylistMode): string;
|
98
118
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
119
|
+
/**
|
120
|
+
* Given a constant playback mode, provide the string tooltip used to describe it
|
121
|
+
* @internal
|
122
|
+
*/
|
123
|
+
protected _getModeTooltip(mode: foundry.CONST.PlaylistMode): string;
|
104
124
|
|
105
|
-
|
106
|
-
|
107
|
-
* @param event - The initial click event
|
108
|
-
*/
|
109
|
-
protected _onSoundPlay(event: JQuery.ClickEvent, playing: boolean): void;
|
125
|
+
/** @override */
|
126
|
+
activateListeners(html: JQuery): void;
|
110
127
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
128
|
+
/**
|
129
|
+
* Handle global volume change for the playlist sidebar
|
130
|
+
* @param event - The initial change event
|
131
|
+
* @internal
|
132
|
+
*/
|
133
|
+
protected _onGlobalVolume(event: JQuery.ChangeEvent): unknown;
|
116
134
|
|
117
|
-
|
118
|
-
|
119
|
-
* @param event - The initial click event
|
120
|
-
*/
|
121
|
-
protected _onSoundToggleMode(event: JQuery.ClickEvent): void;
|
135
|
+
/** @override */
|
136
|
+
collapseAll(): void;
|
122
137
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
138
|
+
/**
|
139
|
+
* Handle Playlist collapse toggle
|
140
|
+
* @param event - The initial click event
|
141
|
+
* @internal
|
142
|
+
*/
|
143
|
+
protected _onPlaylistCollapse(event: JQuery.ClickEvent): void;
|
127
144
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
145
|
+
/**
|
146
|
+
* Handle global volume control collapse toggle
|
147
|
+
* @param event - The initial click event
|
148
|
+
* @internal
|
149
|
+
*/
|
150
|
+
protected _onVolumeCollapse(event: JQuery.ClickEvent): void;
|
132
151
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
152
|
+
/**
|
153
|
+
* Helper method to render the expansion or collapse of playlists
|
154
|
+
* @param speed - (default: `250`)
|
155
|
+
* @internal
|
156
|
+
*/
|
157
|
+
protected _collapse(el: HTMLElement, collapse: boolean, speed?: number): void;
|
139
158
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
interfaceModifier: ReturnType<typeof AudioHelper['volumeToInput']>;
|
148
|
-
}
|
159
|
+
/**
|
160
|
+
* Handle Playlist playback state changes
|
161
|
+
* @param event - The initial click event
|
162
|
+
* @param playing - Is the playlist now playing?
|
163
|
+
* @internal
|
164
|
+
*/
|
165
|
+
protected _onPlaylistPlay(event: JQuery.ClickEvent, playing: boolean): unknown;
|
149
166
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}
|
167
|
+
/**
|
168
|
+
* Handle advancing the playlist to the next (or previous) sound
|
169
|
+
* @param event - The initial click event
|
170
|
+
* @param action - The control action requested
|
171
|
+
* @internal
|
172
|
+
*/
|
173
|
+
protected _onPlaylistSkip(event: JQuery.ClickEvent, action: string): unknown;
|
158
174
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
175
|
+
/**
|
176
|
+
* Handle cycling the playback mode for a Playlist
|
177
|
+
* @param event - The initial click event
|
178
|
+
* @internal
|
179
|
+
*/
|
180
|
+
protected _onPlaylistToggleMode(event: JQuery.ClickEvent): unknown;
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Handle Playlist track addition request
|
184
|
+
* @param event - The initial click event
|
185
|
+
* @internal
|
186
|
+
*/
|
187
|
+
protected _onSoundCreate(event: JQuery.ClickEvent): void;
|
163
188
|
|
164
|
-
interface Options extends SidebarDirectory.Options {
|
165
189
|
/**
|
166
|
-
*
|
190
|
+
* Modify the playback state of a Sound within a Playlist
|
191
|
+
* @param event - The initial click event
|
192
|
+
* @param action - The sound control action performed
|
193
|
+
* @internal
|
167
194
|
*/
|
168
|
-
|
195
|
+
protected _onSoundPlay(event: JQuery.ClickEvent, action: string): unknown;
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Handle volume adjustments to sounds within a Playlist
|
199
|
+
* @param event - The initial change event
|
200
|
+
* @internal
|
201
|
+
*/
|
202
|
+
protected _onSoundVolume(event: JQuery.ChangeEvent): void;
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Handle changes to the sound playback mode
|
206
|
+
* @param event - The initial click event
|
207
|
+
* @internal
|
208
|
+
*/
|
209
|
+
protected _onSoundToggleMode(event: JQuery.ClickEvent): unknown;
|
210
|
+
|
211
|
+
/** @override */
|
212
|
+
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
169
213
|
|
170
214
|
/**
|
171
|
-
*
|
215
|
+
* Update the displayed timestamps for all currently playing audio sources.
|
216
|
+
* Runs on an interval every 1000ms.
|
217
|
+
* @internal
|
172
218
|
*/
|
173
|
-
|
219
|
+
protected _updateTimestamps(): void;
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Format the displayed timestamp given a number of seconds as input
|
223
|
+
* @param seconds - The current playback time in seconds
|
224
|
+
* @returns The formatted timestamp
|
225
|
+
* @internal
|
226
|
+
*/
|
227
|
+
protected _formatTimestamp(seconds: number): string;
|
228
|
+
|
229
|
+
/** @override */
|
230
|
+
protected _contextMenu(html: JQuery): void;
|
231
|
+
|
232
|
+
/** @override */
|
233
|
+
protected _getFolderContextOptions(): ContextMenuEntry[];
|
234
|
+
|
235
|
+
/** @override */
|
236
|
+
protected _getEntryContextOptions(): ContextMenuEntry[];
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Get context menu options for individual sound effects
|
240
|
+
* @returns The context options for each sound
|
241
|
+
* @internal
|
242
|
+
*/
|
243
|
+
protected _getSoundContextOptions(): ContextMenuEntry[];
|
244
|
+
}
|
245
|
+
|
246
|
+
namespace PlaylistDirectory {
|
247
|
+
interface Data extends SidebarDirectory.Data<PlaylistDirectory.Data.Tree> {
|
248
|
+
playingSounds: PlaylistDirectory.Data.Sound[];
|
249
|
+
showPlaying: boolean;
|
250
|
+
playlistModifier: number;
|
251
|
+
ambientModifier: number;
|
252
|
+
interfaceModifier: number;
|
253
|
+
volumeExpanded: boolean;
|
254
|
+
}
|
255
|
+
|
256
|
+
namespace Data {
|
257
|
+
interface Tree extends SidebarDirectory.Tree<InstanceType<ConfiguredDocumentClass<typeof Playlist>>> {
|
258
|
+
playlists: PlaylistDirectory.Data.Playlist[];
|
259
|
+
}
|
260
|
+
|
261
|
+
type Playlist = ToObjectFalseType<foundry.data.PlaylistData> & {
|
262
|
+
modeTooltip: string;
|
263
|
+
modeIcon: string;
|
264
|
+
disabled: boolean;
|
265
|
+
expanded: boolean;
|
266
|
+
css: string;
|
267
|
+
controlCSS: string;
|
268
|
+
sounds: PlaylistDirectory.Data.Sound[];
|
269
|
+
};
|
270
|
+
|
271
|
+
type Sound = ToObjectFalseType<foundry.data.PlaylistSoundData> & {
|
272
|
+
playlistId: string | null;
|
273
|
+
css: string;
|
274
|
+
controlCSS: string;
|
275
|
+
playIcon: string;
|
276
|
+
playTitle: string;
|
277
|
+
isPaused?: boolean;
|
278
|
+
pauseIcon?: string;
|
279
|
+
lvolume?: number;
|
280
|
+
currentTime?: string;
|
281
|
+
durationTime?: string;
|
282
|
+
};
|
283
|
+
}
|
174
284
|
}
|
175
285
|
}
|
package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts
CHANGED
@@ -1,30 +1,13 @@
|
|
1
|
-
// TODO: Remove when updating this class!!!
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
1
|
/**
|
6
2
|
* A directory listing of active game scenes
|
7
3
|
*/
|
8
|
-
declare class SceneDirectory extends SidebarDirectory {
|
9
|
-
/**
|
10
|
-
|
11
|
-
*/
|
12
|
-
static get entity(): 'Scene';
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @override
|
16
|
-
* @see {@link Game.scenes}
|
17
|
-
*/
|
18
|
-
static get collection(): Game['scenes'];
|
4
|
+
declare class SceneDirectory extends SidebarDirectory<'Scene'> {
|
5
|
+
/** @override */
|
6
|
+
static documentName: 'Scene';
|
19
7
|
|
20
|
-
/**
|
21
|
-
|
22
|
-
* @remarks This is never called.
|
23
|
-
*/
|
24
|
-
protected _onCreate(event: Event): Promise<Scene>;
|
8
|
+
/** @override */
|
9
|
+
protected _render(force?: boolean, options?: Application.RenderOptions<SidebarDirectory.Options>): Promise<void>;
|
25
10
|
|
26
|
-
/**
|
27
|
-
* @override
|
28
|
-
*/
|
11
|
+
/** @override */
|
29
12
|
protected _getEntryContextOptions(): ContextMenuEntry[];
|
30
13
|
}
|
@@ -106,7 +106,7 @@ declare global {
|
|
106
106
|
* This implementation doesn't actually return `PlaylistDirectory.Data`, it's only to allow {@link PlaylistDirectory}
|
107
107
|
* to override accordingly.
|
108
108
|
*/
|
109
|
-
getData(options?: Partial<Options>): SidebarDirectory.Data<this['tree']
|
109
|
+
getData(options?: Partial<Options>): SidebarDirectory.Data<this['tree']>;
|
110
110
|
|
111
111
|
/**
|
112
112
|
* @param event - (unused)
|
@@ -168,11 +168,9 @@ declare global {
|
|
168
168
|
|
169
169
|
/**
|
170
170
|
* @override
|
171
|
-
* @
|
172
|
-
* The return type could be specified in more detail but it is not supposed to be used and this allows more
|
173
|
-
* flexibility for deriving classes.
|
171
|
+
* @internal
|
174
172
|
*/
|
175
|
-
protected _onDrop(event: DragEvent):
|
173
|
+
protected _onDrop(event: DragEvent): void;
|
176
174
|
|
177
175
|
/**
|
178
176
|
* Handle Document data being dropped into the directory.
|
@@ -4,9 +4,9 @@
|
|
4
4
|
*/
|
5
5
|
declare class CameraPopoutAppWrapper {
|
6
6
|
/**
|
7
|
-
* @param view- The CameraViews application that this popout belongs to
|
8
|
-
* @param userId- ID of the user this popout belongs to
|
9
|
-
* @param element- The div element of this specific popout window
|
7
|
+
* @param view - The CameraViews application that this popout belongs to
|
8
|
+
* @param userId - ID of the user this popout belongs to
|
9
|
+
* @param element - The div element of this specific popout window
|
10
10
|
*/
|
11
11
|
constructor(view: CameraViews, userId: string, element: JQuery);
|
12
12
|
|
@@ -25,16 +25,21 @@ declare class CameraPopoutAppWrapper {
|
|
25
25
|
*/
|
26
26
|
userId: string;
|
27
27
|
|
28
|
+
/** @defaultValue `true` */
|
29
|
+
popOut: boolean;
|
30
|
+
|
31
|
+
/** @defaultValue `{}` */
|
32
|
+
options: Record<string, unknown>;
|
33
|
+
|
28
34
|
/**
|
29
35
|
* Get the current position of this popout window
|
30
36
|
*/
|
31
37
|
get position(): Application.Position;
|
32
38
|
|
33
|
-
|
34
|
-
setPosition({ left, top, width, height, scale }?: Partial<Application.Position>): void;
|
39
|
+
setPosition(options?: Partial<Application.Position>): (Application.Position & { height: number }) | void;
|
35
40
|
|
36
|
-
|
41
|
+
/** @internal */
|
42
|
+
protected _onResize(event: Event): void;
|
37
43
|
|
38
|
-
/** @override */
|
39
44
|
bringToTop(): void;
|
40
45
|
}
|
@@ -399,8 +399,9 @@ declare global {
|
|
399
399
|
|
400
400
|
/**
|
401
401
|
* Event handler for the drop portion of a drag-and-drop event.
|
402
|
+
* @internal
|
402
403
|
*/
|
403
|
-
protected _onDrop(event: DragEvent):
|
404
|
+
protected _onDrop(event: DragEvent): void;
|
404
405
|
|
405
406
|
/**
|
406
407
|
* Add a pending canvas operation that should fire once the socket handling workflow concludes.
|