@league-of-foundry-developers/foundry-vtt-types 0.8.9-6 → 9.238.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.
- package/README.md +44 -27
- package/index-lenient.d.ts +10 -0
- package/index.d.ts +2 -2
- package/package.json +43 -15
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +402 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +72 -66
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +100 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
- package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
- package/src/foundry/foundry.js/application.d.ts +4 -7
- 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 +116 -116
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- 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 +6 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- 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 +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +187 -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 +1 -1
- 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/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -3
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- 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 +142 -155
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- 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 +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +150 -47
- package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/config.d.ts +494 -902
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- package/src/foundry/foundry.js/game.d.ts +86 -11
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +57 -0
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -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 +4 -4
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +174 -86
- package/src/foundry/foundry.js/roll.d.ts +25 -36
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +40 -9
- package/src/foundry/index.d.ts +5 -0
- package/src/types/utils.d.ts +11 -3
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -0,0 +1,257 @@
|
|
1
|
+
/**
|
2
|
+
* Allows for viewing and editing of Keybinding Actions
|
3
|
+
*/
|
4
|
+
declare class KeybindingsConfig<
|
5
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
6
|
+
Data extends KeybindingsConfig.Data = KeybindingsConfig.Data
|
7
|
+
> extends FormApplication<Options, Data> {
|
8
|
+
/**
|
9
|
+
* A cached copy of the Categories
|
10
|
+
*/
|
11
|
+
protected _cachedData: KeybindingsConfig.CategoryData | null;
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The category being filtered for
|
15
|
+
*/
|
16
|
+
protected _category: string;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* A Map of pending Edits. The Keys are bindingIds
|
20
|
+
* @internal
|
21
|
+
*/
|
22
|
+
protected _pendingEdits: Map<string, KeybindingsConfig.PendingBinding[]>;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @override
|
26
|
+
* @defaultValue
|
27
|
+
* ```typescript
|
28
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
29
|
+
* title: game.i18n.localize("SETTINGS.Keybindings"),
|
30
|
+
* id: "keybindings",
|
31
|
+
* template: "templates/sidebar/apps/keybindings-config.html",
|
32
|
+
* width: 750,
|
33
|
+
* height: 600,
|
34
|
+
* resizable: true,
|
35
|
+
* scrollY: [".filters", ".category-list"],
|
36
|
+
* filters: [{inputSelector: 'input[name="filter"]', contentSelector: ".category-list"}]
|
37
|
+
* })
|
38
|
+
* ```
|
39
|
+
*/
|
40
|
+
static get defaultOptions(): FormApplication.Options;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* @param options - (unused)
|
44
|
+
* @override
|
45
|
+
*/
|
46
|
+
getData(options?: Partial<Options>): Data;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Builds the set of Bindings into a form usable for display and configuration
|
50
|
+
* @internal
|
51
|
+
*/
|
52
|
+
protected _getCategoryData(): KeybindingsConfig.CategoryData;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Add faux-keybind actions that represent the possible Mouse Controls
|
56
|
+
* @param categories - The current Map of Categories to add to
|
57
|
+
* @returns The number of Actions added
|
58
|
+
* @internal
|
59
|
+
*/
|
60
|
+
protected _addMouseControlsReference(categories: Map<string, KeybindingsConfig.Category>): number;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Given an Binding and its parent Action, detects other Actions that might conflict with that binding
|
64
|
+
* @param actionId - The namespaced Action ID the Binding belongs to
|
65
|
+
* @param action - The Action config
|
66
|
+
* @param binding - The Binding
|
67
|
+
* @internal
|
68
|
+
*/
|
69
|
+
protected _detectConflictingActions(
|
70
|
+
actionId: string,
|
71
|
+
action: KeybindingActionConfig,
|
72
|
+
binding: KeybindingActionBinding
|
73
|
+
): KeybindingAction[];
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Transforms a Binding into a human readable string representation
|
77
|
+
* @param binding - The Binding
|
78
|
+
* @returns A human readable string
|
79
|
+
* @internal
|
80
|
+
*/
|
81
|
+
protected static _humanizeBinding(binding: KeybindingActionBinding): string;
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Compares two Category Filters for rendering
|
85
|
+
* This method ignores cases of equality because we know our categories are unique
|
86
|
+
* @param a - The first Category
|
87
|
+
* @param b - The second Category
|
88
|
+
* @returns A number for usage in the Sort method
|
89
|
+
* @internal
|
90
|
+
*/
|
91
|
+
protected static _sortCategories(a: KeybindingsConfig.Category, b: KeybindingsConfig.Category): number;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Classify what Category an Action belongs to
|
95
|
+
* @param action - The Action to classify
|
96
|
+
* @returns The category the Action belongs to
|
97
|
+
* @internal
|
98
|
+
*/
|
99
|
+
protected _categorizeAction(action: KeybindingsConfig): KeybindingsConfig.BaseCategory;
|
100
|
+
|
101
|
+
/** @override */
|
102
|
+
activateListeners(html: JQuery): void;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Handle left-click events to filter to a certain category
|
106
|
+
* @internal
|
107
|
+
*/
|
108
|
+
protected _onClickCategoryFilter(event: MouseEvent): void;
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Handle left-click events to show / hide a certain category
|
112
|
+
* @internal
|
113
|
+
*/
|
114
|
+
protected _onClickCategoryCollapse(event: MouseEvent): void;
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Handle left-click events to reset all Actions to Default
|
118
|
+
* @internal
|
119
|
+
*/
|
120
|
+
protected _onClickResetActions(event: MouseEvent): Promise<void>;
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Handle Control clicks
|
124
|
+
* @internal
|
125
|
+
*/
|
126
|
+
protected _onClickBindingControl(event: MouseEvent): void;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Handle left-click events to show / hide a certain category
|
130
|
+
* @internal
|
131
|
+
*/
|
132
|
+
protected _onClickAdd(event: MouseEvent): Promise<void>;
|
133
|
+
|
134
|
+
/**
|
135
|
+
* Handle left-click events to show / hide a certain category
|
136
|
+
* @internal
|
137
|
+
*/
|
138
|
+
protected _onClickDelete(event: MouseEvent): Promise<void>;
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Inserts a Binding into the Pending Edits object, creating a new Map entry as needed
|
142
|
+
* @internal
|
143
|
+
*/
|
144
|
+
protected _addPendingEdit(
|
145
|
+
namespace: string,
|
146
|
+
action: string,
|
147
|
+
bindingIndex: number,
|
148
|
+
binding: KeybindingsConfig.PendingBinding
|
149
|
+
): void;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Toggle visibility of the Edit / Save UI
|
153
|
+
* @internal
|
154
|
+
*/
|
155
|
+
protected _onClickEditableBinding(event: MouseEvent): void;
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Toggle visibility of the Edit UI
|
159
|
+
* @internal
|
160
|
+
*/
|
161
|
+
protected _onDoubleClickKey(event: MouseEvent): void;
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Save the new Binding value and update the display of the UI
|
165
|
+
* @internal
|
166
|
+
*/
|
167
|
+
protected _onClickSaveBinding(event: MouseEvent): Promise<void>;
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Given a clicked Action element, finds the parent Action
|
171
|
+
* @internal
|
172
|
+
*/
|
173
|
+
protected _getParentAction(event: KeyboardEvent | MouseEvent): {
|
174
|
+
namespace: string;
|
175
|
+
action: string;
|
176
|
+
actionHtml: HTMLElement;
|
177
|
+
};
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Given a Clicked binding control element, finds the parent Binding
|
181
|
+
* @internal
|
182
|
+
*/
|
183
|
+
protected _getParentBinding(event: KeyboardEvent | MouseEvent): { bindingHtml: HTMLElement; bindingId: string };
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Iterates over all Pending edits, merging them in with unedited Bindings and then saving and resetting the UI
|
187
|
+
* @internal
|
188
|
+
*/
|
189
|
+
protected _savePendingEdits(): Promise<void>;
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Processes input from the keyboard to form a list of pending Binding edits
|
193
|
+
* @param event - The keyboard event
|
194
|
+
* @internal
|
195
|
+
*/
|
196
|
+
protected _onKeydownBindingInput(event: KeyboardEvent): void;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* @param event - (unused)
|
200
|
+
* @override
|
201
|
+
*/
|
202
|
+
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
203
|
+
|
204
|
+
/** @remarks KeybindingsConfig does not implement this method. */
|
205
|
+
protected _updateObject(event?: unknown, formData?: unknown): Promise<never>;
|
206
|
+
}
|
207
|
+
|
208
|
+
declare namespace KeybindingsConfig {
|
209
|
+
interface Data extends CategoryData {
|
210
|
+
categories: DataCategory[];
|
211
|
+
allActive: boolean;
|
212
|
+
}
|
213
|
+
|
214
|
+
interface DataCategory extends Category {
|
215
|
+
active: boolean;
|
216
|
+
hidden: boolean;
|
217
|
+
}
|
218
|
+
|
219
|
+
interface CategoryData {
|
220
|
+
categories: Category[];
|
221
|
+
totalActions: number;
|
222
|
+
}
|
223
|
+
|
224
|
+
interface BaseCategory {
|
225
|
+
id: string;
|
226
|
+
title: string;
|
227
|
+
}
|
228
|
+
|
229
|
+
interface Category extends BaseCategory {
|
230
|
+
actions: ActionData[];
|
231
|
+
count: number;
|
232
|
+
}
|
233
|
+
|
234
|
+
interface ActionData extends KeybindingActionConfig {
|
235
|
+
category: string;
|
236
|
+
bindings: DisplayBinding[];
|
237
|
+
id: string;
|
238
|
+
name: string;
|
239
|
+
hint?: string;
|
240
|
+
cssClass?: string;
|
241
|
+
notes: string;
|
242
|
+
}
|
243
|
+
|
244
|
+
interface DisplayBinding extends Partial<KeybindingActionBinding> {
|
245
|
+
id: string;
|
246
|
+
display: string;
|
247
|
+
cssClasses: string;
|
248
|
+
isEditable: boolean;
|
249
|
+
isFirst: boolean;
|
250
|
+
conflicts: string;
|
251
|
+
hasConflicts: boolean;
|
252
|
+
}
|
253
|
+
|
254
|
+
interface PendingBinding extends KeybindingActionBinding {
|
255
|
+
index: number;
|
256
|
+
}
|
257
|
+
}
|
@@ -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
|
}
|
@@ -1,103 +1,112 @@
|
|
1
|
-
|
2
|
-
* A game settings configuration application
|
3
|
-
* This form renders the settings defined via the game.settings.register API which have config = true
|
4
|
-
*/
|
5
|
-
declare class SettingsConfig extends FormApplication<FormApplication.Options, SettingsConfig.Data> {
|
6
|
-
/**
|
7
|
-
* @override
|
8
|
-
* @defaultValue
|
9
|
-
* ```typescript
|
10
|
-
* mergeObject(super.defaultOptions, {
|
11
|
-
* title: game.i18n.localize("SETTINGS.Title"),
|
12
|
-
* id: "client-settings",
|
13
|
-
* template: "templates/sidebar/apps/settings-config.html",
|
14
|
-
* width: 600,
|
15
|
-
* height: "auto",
|
16
|
-
* tabs: [
|
17
|
-
* {navSelector: ".tabs", contentSelector: ".content", initial: "core"}
|
18
|
-
* ]
|
19
|
-
* })
|
20
|
-
* ```
|
21
|
-
*/
|
22
|
-
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
1
|
+
import type { ConfiguredDocumentClass } from '../../../../types/helperTypes';
|
23
2
|
|
3
|
+
declare global {
|
24
4
|
/**
|
25
|
-
*
|
26
|
-
*
|
5
|
+
* The Application responsible for displaying and editing a single Setting document.
|
6
|
+
* This form renders the settings defined via the game.settings.register API which have config = true
|
7
|
+
* @typeParam Options - The type of the options object
|
8
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
27
9
|
*/
|
28
|
-
|
10
|
+
class SettingsConfig<
|
11
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
12
|
+
Data extends object = SettingsConfig.Data
|
13
|
+
> extends FormApplication<Options, Data> {
|
14
|
+
/**
|
15
|
+
* @override
|
16
|
+
* @defaultValue
|
17
|
+
* ```typescript
|
18
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
19
|
+
* title: game.i18n.localize("SETTINGS.Title"),
|
20
|
+
* id: "client-settings",
|
21
|
+
* template: "templates/sidebar/apps/settings-config.html",
|
22
|
+
* width: 600,
|
23
|
+
* height: "auto",
|
24
|
+
* tabs: [{ navSelector: ".tabs", contentSelector: ".content", initial: "core" }],
|
25
|
+
* })
|
26
|
+
* ```
|
27
|
+
*/
|
28
|
+
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
/**
|
31
|
+
* @param options - (unused)
|
32
|
+
* @override
|
33
|
+
*/
|
34
|
+
getData(options?: Partial<Options>): Data | Promise<Data>;
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
* @param event - The initial button click event
|
36
|
-
*/
|
37
|
-
protected _onClickSubmenu(event: JQuery.ClickEvent): void;
|
36
|
+
/** @override */
|
37
|
+
activateListeners(html: JQuery): void;
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
/**
|
40
|
+
* Handle activating the button to configure User Role permissions
|
41
|
+
* @param event - The initial button click event
|
42
|
+
* @internal
|
43
|
+
*/
|
44
|
+
protected _onClickSubmenu(event: JQuery.ClickEvent): void;
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
/**
|
47
|
+
* Handle button click to reset default settings
|
48
|
+
* @param event - The initial button click event
|
49
|
+
* @internal
|
50
|
+
*/
|
51
|
+
protected _onResetDefaults(event: JQuery.ClickEvent): void;
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
user: User;
|
55
|
-
canConfigure: boolean;
|
56
|
-
systemTitle: Game['system']['data']['title'];
|
57
|
-
data: Data.Data;
|
53
|
+
/** @override */
|
54
|
+
protected _updateObject(event: Event, formData: SettingsConfig.FormData): Promise<void>;
|
58
55
|
}
|
59
56
|
|
60
|
-
namespace
|
57
|
+
namespace SettingsConfig {
|
61
58
|
interface Data {
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
none: boolean;
|
67
|
-
};
|
68
|
-
system: {
|
69
|
-
title: Game['system']['data']['title'];
|
70
|
-
menus: ClientSettings.CompleteMenuSetting[];
|
71
|
-
settings: Setting[];
|
72
|
-
none: boolean;
|
73
|
-
};
|
74
|
-
modules: Record<string, { title: string; menus: ClientSettings.CompleteMenuSetting[]; settings: Setting[] }>;
|
59
|
+
user: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof User>>>;
|
60
|
+
canConfigure: boolean;
|
61
|
+
systemTitle: Game['system']['data']['title'];
|
62
|
+
data: Data.Data;
|
75
63
|
}
|
76
64
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
65
|
+
namespace Data {
|
66
|
+
interface Data {
|
67
|
+
core: {
|
68
|
+
version: string;
|
69
|
+
menus: ClientSettings.CompleteMenuSetting[];
|
70
|
+
settings: Setting[];
|
71
|
+
none: boolean;
|
72
|
+
};
|
73
|
+
system: {
|
74
|
+
title: Game['system']['data']['title'];
|
75
|
+
menus: ClientSettings.CompleteMenuSetting[];
|
76
|
+
settings: Setting[];
|
77
|
+
none: boolean;
|
78
|
+
};
|
79
|
+
modules: { title: string; menus: ClientSettings.CompleteMenuSetting[]; settings: Setting[] }[];
|
80
|
+
}
|
81
|
+
|
82
|
+
interface Setting extends Omit<ClientSettings.CompleteSetting, 'type'> {
|
83
|
+
id: string;
|
84
|
+
name: string;
|
85
|
+
hint: string;
|
86
|
+
value: unknown;
|
87
|
+
type: string;
|
88
|
+
isCheckbox: boolean;
|
89
|
+
isSelect: boolean;
|
90
|
+
isRange: boolean;
|
91
|
+
filePickerType: FilePicker.Type | undefined;
|
92
|
+
}
|
85
93
|
}
|
86
|
-
}
|
87
94
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
interface FormData {
|
96
|
+
'core.animateRollTable': boolean;
|
97
|
+
'core.chatBubbles': boolean;
|
98
|
+
'core.chatBubblesPan': boolean;
|
99
|
+
'core.coneTemplateType': 'round' | 'flat';
|
100
|
+
'core.language': string;
|
101
|
+
'core.leftClickRelease': boolean;
|
102
|
+
'core.lightAnimation': boolean;
|
103
|
+
'core.maxFPS': number;
|
104
|
+
'core.mipmap': boolean;
|
105
|
+
'core.noCanvas': boolean;
|
106
|
+
'core.softShadows': boolean;
|
107
|
+
'core.tokenDragPreview': boolean;
|
108
|
+
'core.visionAnimation': boolean;
|
109
|
+
[key: string]: unknown;
|
110
|
+
}
|
102
111
|
}
|
103
112
|
}
|