@league-of-foundry-developers/foundry-vtt-types 9.255.1 → 9.268.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +5 -4
  2. package/package.json +3 -2
  3. package/src/foundry/common/data/data.mjs/index.d.ts +0 -1
  4. package/src/foundry/common/types.mjs.d.ts +4 -4
  5. package/src/foundry/common/utils/helpers.mjs.d.ts +1 -0
  6. package/src/foundry/foundry.js/application.d.ts +0 -1
  7. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +7 -3
  8. package/src/foundry/foundry.js/applications/cameraViews.d.ts +3 -3
  9. package/src/foundry/foundry.js/applications/chatPopout.d.ts +1 -1
  10. package/src/foundry/foundry.js/applications/compendium.d.ts +20 -11
  11. package/src/foundry/foundry.js/applications/controlsReference.d.ts +17 -2
  12. package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
  13. package/src/foundry/foundry.js/applications/filePicker.d.ts +67 -75
  14. package/src/foundry/foundry.js/applications/formApplication.d.ts +7 -2
  15. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +19 -58
  16. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -4
  17. package/src/foundry/foundry.js/applications/formApplications/{entitySheetConfig.d.ts → documentSheetConfig.d.ts} +36 -19
  18. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -4
  19. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +2 -4
  20. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardConfig.d.ts +51 -0
  21. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfig.d.ts +88 -0
  22. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsHand.d.ts +20 -0
  23. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsPile.d.ts +20 -0
  24. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/index.d.ts +2 -0
  25. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +2 -4
  26. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +17 -11
  27. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
  28. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +3 -9
  29. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +10 -12
  30. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +4 -5
  31. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +2 -6
  32. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +1 -4
  33. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +8 -12
  34. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +2 -1
  35. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +1 -4
  36. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +10 -11
  37. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +28 -15
  38. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -6
  39. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +1 -4
  40. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +17 -21
  41. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +3 -3
  42. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +40 -7
  43. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -2
  44. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +10 -24
  45. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +1 -1
  46. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +15 -3
  47. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +23 -16
  48. package/src/foundry/foundry.js/applications/formApplications/{defaultTokenConfig.d.ts → tokenConfigs/defaultTokenConfig.d.ts} +29 -16
  49. package/src/foundry/foundry.js/applications/formApplications/tokenConfigs/index.d.ts +1 -0
  50. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +22 -15
  51. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
  52. package/src/foundry/foundry.js/applications/hotbar.d.ts +7 -3
  53. package/src/foundry/foundry.js/applications/index.d.ts +1 -0
  54. package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
  55. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
  56. package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
  57. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +65 -38
  58. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +17 -3
  59. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +19 -16
  60. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +0 -3
  61. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +4 -18
  62. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +2 -8
  63. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +38 -5
  64. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -0
  65. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -1
  66. package/src/foundry/foundry.js/applications/supportDetails.d.ts +78 -0
  67. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -2
  68. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +10 -2
  69. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
  70. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +3 -7
  71. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
  72. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
  73. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  74. package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +2 -2
  75. package/src/foundry/foundry.js/config.d.ts +21 -21
  76. package/src/foundry/foundry.js/contextMenu.d.ts +37 -28
  77. package/src/foundry/foundry.js/game.d.ts +2 -2
  78. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
  79. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
  80. package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
  81. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  82. package/src/foundry/foundry.js/pixi/containers/canvasLayers/controlsLayer.d.ts +49 -48
  83. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +51 -40
  84. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts +63 -20
  85. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayer.d.ts +0 -3
  86. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +4 -4
  87. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +21 -0
  88. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts +1 -1
  89. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts +10 -2
  90. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts +41 -20
  91. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +50 -121
  92. package/src/foundry/foundry.js/pixi/containers/canvasLayers/sightLayer.d.ts +125 -107
  93. package/src/foundry/foundry.js/pixi/containers/controlIcon.d.ts +3 -0
  94. package/src/foundry/foundry.js/pixi/containers/index.d.ts +1 -0
  95. package/src/foundry/foundry.js/pixi/containers/objectHUD.d.ts +82 -0
  96. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
  97. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +26 -4
  98. package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +34 -20
  99. package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +52 -15
  100. package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -2
  101. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +50 -12
  102. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +248 -87
  103. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +107 -16
  104. package/src/foundry/foundry.js/pixi/filters/abstractFilter.d.ts +42 -0
  105. package/src/foundry/foundry.js/pixi/filters/abstractFilters/fogColorFilter.d.ts +16 -0
  106. package/src/foundry/foundry.js/pixi/filters/abstractFilters/forceColorFilter.d.ts +17 -0
  107. package/src/foundry/foundry.js/pixi/filters/abstractFilters/glowFilter.d.ts +31 -0
  108. package/src/foundry/foundry.js/pixi/filters/abstractFilters/index.d.ts +4 -0
  109. package/src/foundry/foundry.js/pixi/filters/abstractFilters/roofMaskFilter.d.ts +20 -0
  110. package/src/foundry/foundry.js/pixi/filters/index.d.ts +2 -0
  111. package/src/foundry/foundry.js/roll.d.ts +2 -2
  112. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +5 -0
  113. package/src/foundry/foundry.js/textEditor.d.ts +266 -231
  114. package/src/types/augments/index.d.ts +2 -0
  115. package/src/types/augments/pixiGraphicsSmooth.d.ts +7 -0
  116. package/src/types/augments/pixiLegacyGraphics.d.ts +7 -0
  117. package/src/types/utils.d.ts +5 -0
@@ -1,286 +1,321 @@
1
- /**
2
- * A collection of helper functions and utility methods related to the rich text editor
3
- */
4
- declare class TextEditor {
5
- /**
6
- * Create a Rich Text Editor. The current implementation uses TinyMCE
7
- * @param options - Configuration options provided to the Editor init
8
- * @param content - Initial HTML or text content to populate the editor with
9
- * (default: `""`)
10
- * @returns The editor instance.
11
- */
12
- static create(options: TextEditor.Options, content: string): Promise<tinyMCE.Editor>;
13
-
14
- /**
15
- * Safely decode an HTML string, removing invalid tags and converting entities back to unicode characters.
16
- * @param html - The original encoded HTML string
17
- * @returns The decoded unicode string
18
- */
19
- static decodeHTML(html: string): string;
20
-
21
- /**
22
- * Enrich HTML content by replacing or augmenting components of it
23
- * @param content - The original HTML content (as a string)
24
- * @param options - Additional options which configure how HTML is enriched
25
- * (default: `{}`)
26
- * @returns The enriched HTML content
27
- */
28
- static enrichHTML(content: string, options?: Partial<TextEditor.EnrichOptions>): string;
29
-
30
- /**
31
- * Preview an HTML fragment by constructing a substring of a given length from its inner text.
32
- * @param content - The raw HTML to preview
33
- * @param length - The desired length
34
- * (default: `250`)
35
- * @returns The previewed HTML
36
- */
37
- static previewHTML(content: string, length?: number): string;
38
-
39
- /**
40
- * Truncate an HTML fragment to a maximum number of text content characters, removing any unused elements.
41
- * @param html - The root HTML element.
42
- * @param maxLength - The maximum allowed length of the text content.
43
- * (default: `50`)
44
- * @param splitWords - Whether to truncate by splitting on white space (if true) or breaking words.
45
- * (default: `true`)
46
- * @param suffix - A suffix string to append to denote that the text was truncated.
47
- * (default: `'…'`)
48
- */
49
- static truncateHTML(
50
- html: HTMLElement,
51
- { maxLength, splitWords, suffix }: { maxLength?: number; splitWords?: boolean; suffix?: string }
52
- ): HTMLElement;
53
-
54
- /**
55
- * Truncate a fragment of text to a maximum number of characters.
56
- * @param text - The original text fragment that should be truncated to a maximum length
57
- * @param maxLength - The maximum allowed length of the truncated string.
58
- * (default: `50`)
59
- * @param splitWords - Whether to truncate by splitting on white space (if true) or breaking words.
60
- * (default: `true`)
61
- * @param suffix - A suffix string to append to denote that the text was truncated.
62
- * (default: `'…'`)
63
- */
64
- static truncateText(
65
- text: string,
66
- { maxLength, splitWords, suffix }?: { maxLength?: number; splitWords?: boolean; suffix?: string }
67
- ): string;
1
+ import type { ConfiguredDocumentClassForName } from '../../types/helperTypes';
68
2
 
3
+ declare global {
69
4
  /**
70
- * Recursively identify the text nodes within a parent HTML node for potential content replacement.
71
- * @param parent - The parent HTML Element
72
- * @returns An array of contained Text nodes
73
- * @internal
5
+ * A collection of helper functions and utility methods related to the rich text editor
74
6
  */
75
- protected static _getTextNodes(parent: HTMLElement): Text[];
76
-
77
- /**
78
- * Facilitate the replacement of text node content using a matching regex rule and a provided replacement function.
79
- * @internal
80
- */
81
- protected static _replaceTextContent(
82
- text: Text[],
83
- rgx: RegExp,
84
- func: (...match: RegExpMatchArray[]) => Node
85
- ): boolean;
86
-
87
- /**
88
- * Replace a matched portion of a Text node with a replacement Node
89
- * @internal
90
- */
91
- protected static _replaceTextNode(text: Text, match: RegExpMatchArray, replacement: Node): void;
92
-
93
- /**
94
- * Create a dynamic entity link from a regular expression match
95
- * @param match - The full matched string
96
- * @param type - The matched entity type or "Compendium"
97
- * @param target - The requested match target (_id or name)
98
- * @param name - A customized or over-ridden display name for the link
99
- * @returns An HTML element for the entity link
100
- * @internal
101
- */
102
- protected static _createContentLink(match: string, type: string, target: string, name: string): HTMLAnchorElement;
103
-
104
- /**
105
- * Replace a hyperlink-like string with an actual HTML <a> tag
106
- * @param match - The full matched string
107
- * @returns An HTML element for the entity link
108
- * @internal
109
- */
110
- protected static _createHyperlink(match: string): HTMLAnchorElement;
111
-
112
- /**
113
- * Replace an inline roll formula with a rollable <a> element or an eagerly evaluated roll result
114
- * @param match - The matched string
115
- * @param command - An optional command
116
- * @param formula - The matched formula
117
- * @param closing - The closing brackets for the inline roll
118
- * @param label - An optional label which configures the button text
119
- * @returns The replaced match
120
- * @internal
121
- */
122
- protected static _createInlineRoll(
123
- match: string,
124
- command: string,
125
- formula: string,
126
- closing: string,
127
- label?: string,
128
- ...args: object[]
129
- ): HTMLAnchorElement | null;
7
+ class TextEditor {
8
+ /**
9
+ * Create a Rich Text Editor. The current implementation uses TinyMCE
10
+ * @param options - Configuration options provided to the Editor init
11
+ * @param content - Initial HTML or text content to populate the editor with
12
+ * (default: `""`)
13
+ * @returns The editor instance.
14
+ */
15
+ static create(options: TextEditor.Options, content: string): Promise<tinyMCE.Editor>;
130
16
 
131
- static activateListeners(): void;
17
+ /**
18
+ * A list of elements that are retained when truncating HTML.
19
+ * @internal
20
+ */
21
+ protected static _PARAGRAPH_ELEMENTS: Set<string>;
132
22
 
133
- /**
134
- * Handle click events on Entity Links
135
- * @internal
136
- */
137
- protected static _onClickContentLink(event: JQuery.ClickEvent): void;
23
+ /**
24
+ * Safely decode an HTML string, removing invalid tags and converting entities back to unicode characters.
25
+ * @param html - The original encoded HTML string
26
+ * @returns The decoded unicode string
27
+ */
28
+ static decodeHTML(html: string): string;
138
29
 
139
- /**
140
- * Handle left-mouse clicks on an inline roll, dispatching the formula or displaying the tooltip
141
- * @param event - The initiating click event
142
- * @internal
143
- */
144
- protected static _onClickInlineRoll(event: JQuery.ClickEvent): void;
30
+ /**
31
+ * Enrich HTML content by replacing or augmenting components of it
32
+ * @param content - The original HTML content (as a string)
33
+ * @param options - Additional options which configure how HTML is enriched
34
+ * (default: `{}`)
35
+ * @returns The enriched HTML content
36
+ */
37
+ static enrichHTML(content: string, options?: Partial<TextEditor.EnrichOptions>): string;
145
38
 
146
- /**
147
- * Begin a Drag+Drop workflow for a dynamic content link
148
- * @param event - The originating drag event
149
- * @internal
150
- */
151
- protected static _onDragEntityLink(event: JQuery.DragStartEvent): void;
39
+ /**
40
+ * Preview an HTML fragment by constructing a substring of a given length from its inner text.
41
+ * @param content - The raw HTML to preview
42
+ * @param length - The desired length
43
+ * (default: `250`)
44
+ * @returns The previewed HTML
45
+ */
46
+ static previewHTML(content: string, length?: number): string;
152
47
 
153
- /**
154
- * Begin a a data transfer drag event with default handling
155
- * @internal
156
- */
157
- protected _onDragStart(event: DragEvent): void;
48
+ /**
49
+ * Sanitises an HTML fragment and removes any non-paragraph-style text.
50
+ * @param html - The root HTML element.
51
+ */
52
+ static truncateHTML(html: HTMLElement): HTMLElement;
158
53
 
159
- /**
160
- * Handle dropping of transferred data onto the active rich text editor
161
- * @param event - The originating drop event which triggered the data transfer
162
- * @param editor - The TinyMCE editor instance being dropped on
163
- */
164
- protected static _onDropEditorData(event: DragEvent, editor: tinyMCE.Editor): void;
54
+ /**
55
+ * Truncate a fragment of text to a maximum number of characters.
56
+ * @param text - The original text fragment that should be truncated to a maximum length
57
+ * @param maxLength - The maximum allowed length of the truncated string.
58
+ * (default: `50`)
59
+ * @param splitWords - Whether to truncate by splitting on white space (if true) or breaking words.
60
+ * (default: `true`)
61
+ * @param suffix - A suffix string to append to denote that the text was truncated.
62
+ * (default: `'…'`)
63
+ */
64
+ static truncateText(
65
+ text: string,
66
+ { maxLength, splitWords, suffix }?: { maxLength?: number; splitWords?: boolean; suffix?: string }
67
+ ): string;
165
68
 
166
- /**
167
- * Singleton decoder area
168
- * @internal
169
- */
170
- protected static _decoder: HTMLTextAreaElement;
171
- }
69
+ /**
70
+ * Recursively identify the text nodes within a parent HTML node for potential content replacement.
71
+ * @param parent - The parent HTML Element
72
+ * @returns An array of contained Text nodes
73
+ * @internal
74
+ */
75
+ protected static _getTextNodes(parent: HTMLElement): Text[];
172
76
 
173
- declare namespace TextEditor {
174
- interface Options {
175
77
  /**
176
- * @defaultValue `false`
78
+ * Facilitate the replacement of text node content using a matching regex rule and a provided replacement function.
79
+ * @internal
177
80
  */
178
- branding?: boolean;
81
+ protected static _replaceTextContent(
82
+ text: Text[],
83
+ rgx: RegExp,
84
+ func: (...match: RegExpMatchArray) => Node
85
+ ): boolean;
179
86
 
180
87
  /**
181
- * @defaultValue `['/css/mce.css']`
88
+ * Replace a matched portion of a Text node with a replacement Node
89
+ * @internal
182
90
  */
183
- content_css?: string[];
91
+ protected static _replaceTextNode(text: Text, match: RegExpMatchArray, replacement: Node): void;
184
92
 
185
93
  /**
186
- * @defaultValue `false`
94
+ * Create a dynamic document link from a regular expression match
95
+ * @param match - The full matched string
96
+ * @param type - The matched document type or "Compendium"
97
+ * @param target - The requested match target (_id or name)
98
+ * @param name - A customized or over-ridden display name for the link
99
+ * @returns An HTML element for the document link
100
+ * @internal
187
101
  */
188
- menubar?: boolean;
102
+ protected static _createContentLink(match: string, type: string, target: string, name: string): HTMLAnchorElement;
189
103
 
190
104
  /**
191
- * @defaultValue `'lists image table hr code save link'`
105
+ * Replace a hyperlink-like string with an actual HTML &lt;a&gt; tag
106
+ * @param match - The full matched string
107
+ * @returns An HTML element for the document link
108
+ * @internal
192
109
  */
193
- plugins?: string;
110
+ protected static _createHyperlink(match: string): HTMLAnchorElement;
194
111
 
195
112
  /**
196
- * @defaultValue `true`
113
+ * Replace an inline roll formula with a rollable &lt;a&gt; element or an eagerly evaluated roll result
114
+ * @param match - The matched string
115
+ * @param command - An optional command
116
+ * @param formula - The matched formula
117
+ * @param closing - The closing brackets for the inline roll
118
+ * @param label - An optional label which configures the button text
119
+ * @returns The replaced match
120
+ * @internal
197
121
  */
198
- save_enablewhendirty?: boolean;
122
+ protected static _createInlineRoll(
123
+ match: string,
124
+ command: string,
125
+ formula: string,
126
+ closing: string,
127
+ label?: string,
128
+ ...args: object[]
129
+ ): HTMLAnchorElement | null;
130
+
131
+ static activateListeners(): void;
199
132
 
200
133
  /**
201
- * @defaultValue `false`
134
+ * Handle click events on Document Links
135
+ * @internal
202
136
  */
203
- statusbar?: boolean;
204
-
205
- style_formats?: [
206
- {
207
- items?: [
208
- {
209
- /**
210
- * @defaultValue `'section'`
211
- */
212
- block?: string;
213
-
214
- /**
215
- * @defaultValue `'secrect'`
216
- */
217
- classes?: string;
218
-
219
- /**
220
- * @defaultValue `'Secret'`
221
- */
222
- title?: string;
223
-
224
- /**
225
- * @defaultValue `true`
226
- */
227
- wrapper?: boolean;
228
- }
229
- ];
230
-
231
- /**
232
- * @defaultValue `'Custom'`
233
- */
234
- title?: string;
235
- }
236
- ];
137
+ protected static _onClickContentLink(event: MouseEvent): void;
237
138
 
238
139
  /**
239
- * @defaultValue `true`
140
+ * Handle left-mouse clicks on an inline roll, dispatching the formula or displaying the tooltip
141
+ * @param event - The initiating click event
142
+ * @internal
240
143
  */
241
- style_formats_merge?: boolean;
144
+ protected static _onClickInlineRoll(event: MouseEvent): void;
242
145
 
243
146
  /**
244
- * @defaultValue `{}`
147
+ * Toggle playing or stopping an embedded {@link PlaylistSound} link.
148
+ * @param doc - The PlaylistSound document to play/stop.
149
+ * @internal
245
150
  */
246
- table_default_styles?: object;
151
+ protected static _onPlaySound(doc: InstanceType<ConfiguredDocumentClassForName<'PlaylistSound'>>): void;
247
152
 
248
- target: HTMLElement;
153
+ /**
154
+ * Find all content links belonging to a given {@link PlaylistSound}.
155
+ * @param doc - The PlaylistSound.
156
+ * @internal
157
+ */
158
+ protected static _getSoundContentLinks(
159
+ doc: InstanceType<ConfiguredDocumentClassForName<'PlaylistSound'>>
160
+ ): NodeListOf<Element>;
249
161
 
250
162
  /**
251
- * @defaultValue `'styleselect bullist numlist image table hr link removeformat code save'`
163
+ * Begin a Drag+Drop workflow for a dynamic content link
164
+ * @param event - The originating drag event
165
+ * @internal
252
166
  */
253
- toolbar?: string;
254
- }
167
+ protected static _onDragContentLink(event: DragEvent): void;
255
168
 
256
- interface EnrichOptions {
257
169
  /**
258
- * Include secret tags in the final HTML? If false secret blocks will be removed.
259
- * @defaultValue `false`
170
+ * Handle dropping of transferred data onto the active rich text editor
171
+ * @param event - The originating drop event which triggered the data transfer
172
+ * @param editor - The TinyMCE editor instance being dropped on
173
+ * @internal
260
174
  */
261
- secrets: boolean;
175
+ protected static _onDropEditorData(event: DragEvent, editor: tinyMCE.Editor): void;
262
176
 
263
177
  /**
264
- * Replace dynamic entity links?
265
- * @defaultValue `true`
178
+ * Extract JSON data from a drag/drop event.
179
+ * @param event - The drag event which contains JSON data.
180
+ * @returns The extracted JSON data. The object will be empty if the DragEvent did not contain
181
+ * JSON-parseable data.
266
182
  */
267
- entities: boolean;
183
+ protected static getDragEventData(event: DragEvent): object;
268
184
 
269
185
  /**
270
- * Replace hyperlink content?
271
- * @defaultValue `true`
186
+ * Given a Drop event, returns a Content link if possible such as `@Actor[ABC123]`, else null
187
+ * @param eventData - The parsed object of data provided by the transfer event
272
188
  */
273
- links: boolean;
189
+ // TODO: improve as part of https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues/928
190
+ static getContentLink(eventData: object): Promise<string | null>;
274
191
 
275
192
  /**
276
- * Replace inline dice rolls?
277
- * @defaultValue `true`
193
+ * @deprecated since v9 - Use _onDragContentLink instead.
194
+ * @internal
278
195
  */
279
- rolls: boolean;
196
+ protected static _onDragEntityLink(
197
+ ...args: Parameters<typeof TextEditor['_onDragContentLink']>
198
+ ): ReturnType<typeof TextEditor['_onDragContentLink']>;
280
199
 
281
200
  /**
282
- * The data object providing context for inline rolls
201
+ * Singleton decoder area
202
+ * @internal
283
203
  */
284
- rollData: object | (() => object);
204
+ protected static _decoder: HTMLTextAreaElement;
205
+ }
206
+
207
+ namespace TextEditor {
208
+ interface Options {
209
+ /**
210
+ * @defaultValue `false`
211
+ */
212
+ branding?: boolean;
213
+
214
+ /**
215
+ * @defaultValue `['/css/mce.css']`
216
+ */
217
+ content_css?: string[];
218
+
219
+ /**
220
+ * @defaultValue `false`
221
+ */
222
+ menubar?: boolean;
223
+
224
+ /**
225
+ * @defaultValue `'lists image table hr code save link'`
226
+ */
227
+ plugins?: string;
228
+
229
+ /**
230
+ * @defaultValue `true`
231
+ */
232
+ save_enablewhendirty?: boolean;
233
+
234
+ /**
235
+ * @defaultValue `false`
236
+ */
237
+ statusbar?: boolean;
238
+
239
+ style_formats?: [
240
+ {
241
+ items?: [
242
+ {
243
+ /**
244
+ * @defaultValue `'section'`
245
+ */
246
+ block?: string;
247
+
248
+ /**
249
+ * @defaultValue `'secrect'`
250
+ */
251
+ classes?: string;
252
+
253
+ /**
254
+ * @defaultValue `'Secret'`
255
+ */
256
+ title?: string;
257
+
258
+ /**
259
+ * @defaultValue `true`
260
+ */
261
+ wrapper?: boolean;
262
+ }
263
+ ];
264
+
265
+ /**
266
+ * @defaultValue `'Custom'`
267
+ */
268
+ title?: string;
269
+ }
270
+ ];
271
+
272
+ /**
273
+ * @defaultValue `true`
274
+ */
275
+ style_formats_merge?: boolean;
276
+
277
+ /**
278
+ * @defaultValue `{}`
279
+ */
280
+ table_default_styles?: object;
281
+
282
+ target: HTMLElement;
283
+
284
+ /**
285
+ * @defaultValue `'styleselect bullist numlist image table hr link removeformat code save'`
286
+ */
287
+ toolbar?: string;
288
+ }
289
+
290
+ interface EnrichOptions {
291
+ /**
292
+ * Include secret tags in the final HTML? If false secret blocks will be removed.
293
+ * @defaultValue `false`
294
+ */
295
+ secrets: boolean;
296
+
297
+ /**
298
+ * Replace dynamic document links?
299
+ * @defaultValue `true`
300
+ */
301
+ documents: boolean;
302
+
303
+ /**
304
+ * Replace hyperlink content?
305
+ * @defaultValue `true`
306
+ */
307
+ links: boolean;
308
+
309
+ /**
310
+ * Replace inline dice rolls?
311
+ * @defaultValue `true`
312
+ */
313
+ rolls: boolean;
314
+
315
+ /**
316
+ * The data object providing context for inline rolls
317
+ */
318
+ rollData: object | (() => object);
319
+ }
285
320
  }
286
321
  }
@@ -1,3 +1,5 @@
1
+ import './pixiGraphicsSmooth';
2
+ import './pixiLegacyGraphics';
1
3
  import './pixiParticles';
2
4
  import './simple-peer';
3
5
  import './socket.io-client';
@@ -0,0 +1,7 @@
1
+ import * as graphicsSmooth from '@pixi/graphics-smooth';
2
+
3
+ declare global {
4
+ namespace PIXI {
5
+ export import smooth = graphicsSmooth; // eslint-disable-line @typescript-eslint/no-unused-vars
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ declare global {
2
+ namespace PIXI {
3
+ export const LegacyGraphics: typeof PIXI.Graphics;
4
+ }
5
+ }
6
+
7
+ export {};
@@ -136,3 +136,8 @@ type StoredDocument<D extends foundry.abstract.Document<any, any>> = D & {
136
136
  type TemporaryDocument<D> = D extends StoredDocument<infer U> ? U : D;
137
137
 
138
138
  type PropertyTypeOrFallback<T, Key extends string, Fallback> = Key extends keyof T ? T[Key] : Fallback;
139
+
140
+ /**
141
+ * Makes the given keys `K` of the type `T` required
142
+ */
143
+ type RequiredProps<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;