@league-of-foundry-developers/foundry-vtt-types 0.8.9-7 → 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/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/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 +115 -115
- package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
- 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/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/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -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/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/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 -3
- 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/hotbar.d.ts +5 -4
- 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/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -4
- 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/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +1 -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 -11
- package/src/foundry/foundry.js/config.d.ts +12 -4
- 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/canvasLayers/placeablesLayer.d.ts +5 -17
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- 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 +1 -0
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -2,7 +2,20 @@
|
|
2
2
|
* A helper class used by the Sight Layer to represent a source of vision or illumination.
|
3
3
|
*/
|
4
4
|
declare class PointSource {
|
5
|
-
|
5
|
+
/**
|
6
|
+
* @param object - The object responsible for the PointSource
|
7
|
+
*/
|
8
|
+
constructor(object: PlaceableObject, sourceType: PointSource.SourceType);
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The object responsible for the PointSource
|
12
|
+
*/
|
13
|
+
object: PlaceableObject;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* The type of source
|
17
|
+
*/
|
18
|
+
sourceType: PointSource.SourceType;
|
6
19
|
|
7
20
|
/**
|
8
21
|
* The light or darkness container for this source
|
@@ -20,11 +33,17 @@ declare class PointSource {
|
|
20
33
|
*/
|
21
34
|
active: boolean;
|
22
35
|
|
36
|
+
/**
|
37
|
+
* The range of Scene darkness values for which this Source should be active
|
38
|
+
* @defaultValue `{ min: 0, max: 0 }`
|
39
|
+
*/
|
40
|
+
darkness: { min: number; max: number };
|
41
|
+
|
23
42
|
/**
|
24
43
|
* Internal flag for whether this is a darkness source
|
25
44
|
* @defaultValue `false`
|
26
45
|
*/
|
27
|
-
|
46
|
+
isDarkness: boolean;
|
28
47
|
|
29
48
|
/**
|
30
49
|
* Is the light source limited by an angle of emission?
|
@@ -41,27 +60,66 @@ declare class PointSource {
|
|
41
60
|
/**
|
42
61
|
* Internal flag for animation throttling time
|
43
62
|
* @defaultValue `0`
|
63
|
+
* @internal
|
44
64
|
*/
|
45
65
|
protected _animateTime: number;
|
46
66
|
|
47
67
|
/**
|
48
68
|
* An integer seed which de-synchronizes otherwise similar animations
|
49
69
|
* @defaultValue `null`
|
70
|
+
* @internal
|
50
71
|
*/
|
51
72
|
protected _animateSeed: number | null;
|
52
73
|
|
74
|
+
/**
|
75
|
+
* A flag for the lighting channels version that this source is using.
|
76
|
+
* @defaultValue `0`
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
protected _lightingVersion: number;
|
80
|
+
|
53
81
|
/**
|
54
82
|
* A flag for whether to re-initialize illumination shader uniforms the next time the light is rendered.
|
55
83
|
* @defaultValue `true`
|
84
|
+
* @internal
|
56
85
|
*/
|
57
86
|
protected _resetIlluminationUniforms: boolean;
|
58
87
|
|
59
88
|
/**
|
60
89
|
* A flag for whether to re-initialize coloration shader uniforms the next time the light is rendered.
|
61
90
|
* @defaultValue `true`
|
91
|
+
*@internal
|
62
92
|
*/
|
63
93
|
protected _resetColorationUniforms: boolean;
|
64
94
|
|
95
|
+
/**
|
96
|
+
* An internal flag for whether to render coloration for this source
|
97
|
+
* @defaultValue `false`
|
98
|
+
* @internal
|
99
|
+
*/
|
100
|
+
protected _hasColor: boolean;
|
101
|
+
|
102
|
+
/**
|
103
|
+
* The default Geometry stored in the GPU for all Point Source meshes.
|
104
|
+
*/
|
105
|
+
static GEOMETRY: PIXI.Geometry;
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Create the structure of a source Container which can be rendered to the sight layer shadow-map
|
109
|
+
* @returns The constructed light source container
|
110
|
+
* @internal
|
111
|
+
*/
|
112
|
+
protected _createContainer(shaderCls: ConstructorOf<AbstractBaseShader>): PIXI.Container;
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Initialize the source with provided object data.
|
116
|
+
*
|
117
|
+
* @param data - Input data which configures the source.
|
118
|
+
*
|
119
|
+
* @returns A reference to the initialized source
|
120
|
+
*/
|
121
|
+
initialize(data?: PointSource.Data): PointSource.Initialized<this>;
|
122
|
+
|
65
123
|
/**
|
66
124
|
* The x-coordinate of the source location
|
67
125
|
* @defaultValue `undefined`
|
@@ -117,13 +175,7 @@ declare class PointSource {
|
|
117
175
|
alpha?: number;
|
118
176
|
|
119
177
|
/**
|
120
|
-
*
|
121
|
-
* @defaultValue `undefined`
|
122
|
-
*/
|
123
|
-
darknessThreshold?: number;
|
124
|
-
|
125
|
-
/**
|
126
|
-
* The source type from {@link SOURCE_TYPES}
|
178
|
+
* The source type from CONST.SOURCE_TYPES
|
127
179
|
* @defaultValue `undefined`
|
128
180
|
*/
|
129
181
|
type?: foundry.CONST.SourceType;
|
@@ -143,7 +195,7 @@ declare class PointSource {
|
|
143
195
|
/**
|
144
196
|
* @defaultValue `undefined`
|
145
197
|
*/
|
146
|
-
colorRGB?: [number, number, number];
|
198
|
+
colorRGB?: [r: number, g: number, b: number];
|
147
199
|
|
148
200
|
/**
|
149
201
|
* @defaultValue `undefined`
|
@@ -160,92 +212,25 @@ declare class PointSource {
|
|
160
212
|
*/
|
161
213
|
los?: PIXI.Polygon;
|
162
214
|
|
163
|
-
/**
|
164
|
-
* Create the structure of a source Container which can be rendered to the sight layer shadow-map
|
165
|
-
* @returns The constructed light source container
|
166
|
-
*/
|
167
|
-
protected _createContainer(shaderCls: ConstructorOf<AbstractBaseShader>): PIXI.Container;
|
168
|
-
|
169
|
-
/**
|
170
|
-
* Initialize the source with provided object data.
|
171
|
-
*
|
172
|
-
* @param x - The x-coordinate of the source location
|
173
|
-
* (default: `0`)
|
174
|
-
* @param y - The y-coordinate of the source location
|
175
|
-
* (default: `0`)
|
176
|
-
* @param z - An optional z-index sorting for the source
|
177
|
-
* (default: `null`)
|
178
|
-
* @param dim - The allowed radius of dim vision or illumination
|
179
|
-
* (default: `0`)
|
180
|
-
* @param bright - The allowed radius of bright vision or illumination
|
181
|
-
* (default: `0`)
|
182
|
-
* @param angle - The angle of emission for this point source
|
183
|
-
* (default: `360`)
|
184
|
-
* @param rotation - The angle of rotation for this point source
|
185
|
-
* (default: `0`)
|
186
|
-
* @param color - A tint color for the emitted light, if any
|
187
|
-
* (default: `null`)
|
188
|
-
* @param alpha - An opacity for the emitted light, if any
|
189
|
-
* (default: `0.5`)
|
190
|
-
* @param darknessThreshold - A level of darkness beyond which this light is active
|
191
|
-
* (default: `0`)
|
192
|
-
* @param type - The source type from SOURCE_TYPES
|
193
|
-
* (default: `SOURCE_TYPES.LOCAL`)
|
194
|
-
* @param animation - An animation configuration for the source
|
195
|
-
* (default: `{type: null}`)
|
196
|
-
* @param seed - An integer seed to synchronize (or de-synchronize) animations
|
197
|
-
* (default: `undefined`)
|
198
|
-
*
|
199
|
-
* @returns A reference to the initialized source
|
200
|
-
*/
|
201
|
-
initialize({
|
202
|
-
x,
|
203
|
-
y,
|
204
|
-
z,
|
205
|
-
dim,
|
206
|
-
bright,
|
207
|
-
angle,
|
208
|
-
rotation,
|
209
|
-
color,
|
210
|
-
alpha,
|
211
|
-
darknessThreshold,
|
212
|
-
type,
|
213
|
-
animation,
|
214
|
-
seed
|
215
|
-
}?: {
|
216
|
-
x?: number;
|
217
|
-
y?: number;
|
218
|
-
z?: number | null;
|
219
|
-
dim?: number;
|
220
|
-
bright?: number;
|
221
|
-
angle?: number;
|
222
|
-
rotation?: number;
|
223
|
-
color?: number | string | null;
|
224
|
-
alpha?: number;
|
225
|
-
darknessThreshold?: number;
|
226
|
-
type?: string;
|
227
|
-
animation?: PointSource.Animation;
|
228
|
-
seed?: number;
|
229
|
-
}): this;
|
230
|
-
|
231
215
|
/**
|
232
216
|
* Initialize the shaders used for this animation.
|
233
217
|
* Reset the current shader values back to defaults.
|
234
218
|
* Swap to a different Shader instance if necessary.
|
219
|
+
* @internal
|
235
220
|
*/
|
236
221
|
protected _initializeShaders(): void;
|
237
222
|
|
238
223
|
/**
|
239
224
|
* Initialize the blend mode and vertical sorting of this source relative to others in the container.
|
225
|
+
* @internal
|
240
226
|
*/
|
241
227
|
protected _initializeBlending(): void;
|
242
228
|
|
243
229
|
/**
|
244
230
|
* Draw the display of this source for the darkness/light container of the SightLayer.
|
245
|
-
* @param updateChannels - Is this drawing initiated because lighting channels have changed?
|
246
231
|
* @returns The rendered light container
|
247
232
|
*/
|
248
|
-
drawLight(
|
233
|
+
drawLight(): PIXI.Container;
|
249
234
|
|
250
235
|
/**
|
251
236
|
* Draw and return a container used to depict the visible color tint of the light source on the LightingLayer
|
@@ -256,6 +241,7 @@ declare class PointSource {
|
|
256
241
|
/**
|
257
242
|
* A common helper function for updating the display of a source container.
|
258
243
|
* Assign the container position, dimensions, and polygons.
|
244
|
+
* @internal
|
259
245
|
*/
|
260
246
|
protected _drawContainer(c: PIXI.Container): PIXI.Container;
|
261
247
|
|
@@ -269,25 +255,31 @@ declare class PointSource {
|
|
269
255
|
* A torch animation where the luminosity and coloration decays each frame and is revitalized by flashes
|
270
256
|
* @param dt - Delta time
|
271
257
|
* @param speed - The animation speed, from 1 to 10
|
258
|
+
* (default: `5`)
|
272
259
|
* @param intensity - The animation intensity, from 1 to 10
|
260
|
+
* (default: `5`)
|
273
261
|
*/
|
274
|
-
animateTorch: PointSource.
|
262
|
+
animateTorch(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
|
275
263
|
|
276
264
|
/**
|
277
265
|
* A basic "pulse" animation which expands and contracts.
|
278
266
|
* @param dt - Delta time
|
279
267
|
* @param speed - The animation speed, from 1 to 10
|
268
|
+
* (default: `5`)
|
280
269
|
* @param intensity - The animation intensity, from 1 to 10
|
270
|
+
* (default: `5`)
|
281
271
|
*/
|
282
|
-
animatePulse: PointSource.
|
272
|
+
animatePulse(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
|
283
273
|
|
284
274
|
/**
|
285
275
|
* Emanate waves of light from the source origin point
|
286
276
|
* @param dt - Delta time
|
287
277
|
* @param speed - The animation speed, from 1 to 10
|
278
|
+
* (default: `5`)
|
288
279
|
* @param intensity - The animation intensity, from 1 to 10
|
280
|
+
* (default: `5`)
|
289
281
|
*/
|
290
|
-
animateTime: PointSource.
|
282
|
+
animateTime(dt: number, { speed, intensity }?: PointSource.AnimationProperties): void;
|
291
283
|
|
292
284
|
/**
|
293
285
|
* Evolve a value using a stochastic AR(1) process
|
@@ -298,6 +290,7 @@ declare class PointSource {
|
|
298
290
|
* @param max - The maximum allowed outcome, or null
|
299
291
|
* @param min - The minimum allowed outcome, or null
|
300
292
|
* @returns The new value of the process
|
293
|
+
* @internal
|
301
294
|
*/
|
302
295
|
protected _ar1(
|
303
296
|
y: number,
|
@@ -309,11 +302,106 @@ declare class PointSource {
|
|
309
302
|
min
|
310
303
|
}: { phi?: number; center?: number; sigma?: number; max?: number | null; min?: number | null }
|
311
304
|
): number;
|
312
|
-
|
313
|
-
static GEOMETRY: PIXI.Geometry;
|
314
305
|
}
|
315
306
|
|
316
307
|
declare namespace PointSource {
|
308
|
+
type SourceType = 'light' | 'sight';
|
309
|
+
|
310
|
+
interface Data {
|
311
|
+
/**
|
312
|
+
* The x-coordinate of the source location
|
313
|
+
* @defaultValue `0`
|
314
|
+
*/
|
315
|
+
x?: number;
|
316
|
+
|
317
|
+
/** The y-coordinate of the source location
|
318
|
+
* @defaultValue `0`
|
319
|
+
*/
|
320
|
+
y?: number;
|
321
|
+
|
322
|
+
/** An optional z-index sorting for the source
|
323
|
+
* @defaultValue `null`
|
324
|
+
*/
|
325
|
+
z?: number | null;
|
326
|
+
|
327
|
+
/** The allowed radius of dim vision or illumination
|
328
|
+
* @defaultValue `0`
|
329
|
+
*/
|
330
|
+
dim?: number;
|
331
|
+
|
332
|
+
/** The allowed radius of bright vision or illumination
|
333
|
+
* @defaultValue `0`
|
334
|
+
*/
|
335
|
+
bright?: number;
|
336
|
+
|
337
|
+
/** The angle of emission for this point source
|
338
|
+
* @defaultValue `360`
|
339
|
+
*/
|
340
|
+
angle?: number;
|
341
|
+
|
342
|
+
/**
|
343
|
+
* The angle of rotation for this point source
|
344
|
+
* @defaultValue `0`
|
345
|
+
*/
|
346
|
+
rotation?: number;
|
347
|
+
|
348
|
+
/**
|
349
|
+
* A tint color for the emitted light, if any
|
350
|
+
* @defaultValue `null`
|
351
|
+
*/
|
352
|
+
color?: number | string | null;
|
353
|
+
|
354
|
+
/** An opacity for the emitted light, if any
|
355
|
+
* @defaultValue `0.5`
|
356
|
+
*/
|
357
|
+
alpha: number;
|
358
|
+
|
359
|
+
/**
|
360
|
+
* A darkness range (min and max) for which the source should be active
|
361
|
+
* @defaultValue `{ min: 0, max: 1 }`
|
362
|
+
*/
|
363
|
+
darkness?: { min: number; max: number };
|
364
|
+
|
365
|
+
/**
|
366
|
+
* The source type from CONST.SOURCE_TYPES
|
367
|
+
* @defaultValue `CONST.SOURCE_TYPES.LOCAL`
|
368
|
+
*/
|
369
|
+
type?: foundry.CONST.SourceType;
|
370
|
+
|
371
|
+
/**
|
372
|
+
* An animation configuration for the source
|
373
|
+
* @defaultValue `{ type: null }`
|
374
|
+
*/
|
375
|
+
animation?: PointSource.Animation;
|
376
|
+
|
377
|
+
/**
|
378
|
+
* An integer seed to synchronize (or de-synchronize) animations
|
379
|
+
*/
|
380
|
+
seed?: number;
|
381
|
+
}
|
382
|
+
|
383
|
+
type Initialized<P extends PointSource> = P &
|
384
|
+
Required<
|
385
|
+
Pick<
|
386
|
+
P,
|
387
|
+
| 'animation'
|
388
|
+
| 'angle'
|
389
|
+
| 'alpha'
|
390
|
+
| 'bright'
|
391
|
+
| 'color'
|
392
|
+
| 'dim'
|
393
|
+
| 'rotation'
|
394
|
+
| 'type'
|
395
|
+
| 'x'
|
396
|
+
| 'y'
|
397
|
+
| 'z'
|
398
|
+
| 'colorRGB'
|
399
|
+
| 'ratio'
|
400
|
+
| 'fov'
|
401
|
+
| 'los'
|
402
|
+
>
|
403
|
+
>;
|
404
|
+
|
317
405
|
interface AnimationProperties {
|
318
406
|
speed?: number;
|
319
407
|
intensity?: number;
|
@@ -34,7 +34,22 @@ declare class TextEditor {
|
|
34
34
|
* (default: `250`)
|
35
35
|
* @returns The previewed HTML
|
36
36
|
*/
|
37
|
-
static previewHTML(content: string, length
|
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;
|
38
53
|
|
39
54
|
/**
|
40
55
|
* Truncate a fragment of text to a maximum number of characters.
|
@@ -55,11 +70,13 @@ declare class TextEditor {
|
|
55
70
|
* Recursively identify the text nodes within a parent HTML node for potential content replacement.
|
56
71
|
* @param parent - The parent HTML Element
|
57
72
|
* @returns An array of contained Text nodes
|
73
|
+
* @internal
|
58
74
|
*/
|
59
75
|
protected static _getTextNodes(parent: HTMLElement): Text[];
|
60
76
|
|
61
77
|
/**
|
62
78
|
* Facilitate the replacement of text node content using a matching regex rule and a provided replacement function.
|
79
|
+
* @internal
|
63
80
|
*/
|
64
81
|
protected static _replaceTextContent(
|
65
82
|
text: Text[],
|
@@ -69,6 +86,7 @@ declare class TextEditor {
|
|
69
86
|
|
70
87
|
/**
|
71
88
|
* Replace a matched portion of a Text node with a replacement Node
|
89
|
+
* @internal
|
72
90
|
*/
|
73
91
|
protected static _replaceTextNode(text: Text, match: RegExpMatchArray, replacement: Node): void;
|
74
92
|
|
@@ -79,13 +97,15 @@ declare class TextEditor {
|
|
79
97
|
* @param target - The requested match target (_id or name)
|
80
98
|
* @param name - A customized or over-ridden display name for the link
|
81
99
|
* @returns An HTML element for the entity link
|
100
|
+
* @internal
|
82
101
|
*/
|
83
|
-
protected static
|
102
|
+
protected static _createContentLink(match: string, type: string, target: string, name: string): HTMLAnchorElement;
|
84
103
|
|
85
104
|
/**
|
86
105
|
* Replace a hyperlink-like string with an actual HTML <a> tag
|
87
106
|
* @param match - The full matched string
|
88
107
|
* @returns An HTML element for the entity link
|
108
|
+
* @internal
|
89
109
|
*/
|
90
110
|
protected static _createHyperlink(match: string): HTMLAnchorElement;
|
91
111
|
|
@@ -95,47 +115,58 @@ declare class TextEditor {
|
|
95
115
|
* @param command - An optional command
|
96
116
|
* @param formula - The matched formula
|
97
117
|
* @param closing - The closing brackets for the inline roll
|
118
|
+
* @param label - An optional label which configures the button text
|
98
119
|
* @returns The replaced match
|
120
|
+
* @internal
|
99
121
|
*/
|
100
122
|
protected static _createInlineRoll(
|
101
123
|
match: string,
|
102
124
|
command: string,
|
103
125
|
formula: string,
|
104
126
|
closing: string,
|
127
|
+
label?: string,
|
105
128
|
...args: object[]
|
106
|
-
):
|
129
|
+
): HTMLAnchorElement | null;
|
107
130
|
|
108
131
|
static activateListeners(): void;
|
109
132
|
|
110
133
|
/**
|
111
134
|
* Handle click events on Entity Links
|
135
|
+
* @internal
|
112
136
|
*/
|
113
|
-
protected static
|
137
|
+
protected static _onClickContentLink(event: JQuery.ClickEvent): void;
|
114
138
|
|
115
139
|
/**
|
116
140
|
* Handle left-mouse clicks on an inline roll, dispatching the formula or displaying the tooltip
|
117
141
|
* @param event - The initiating click event
|
142
|
+
* @internal
|
118
143
|
*/
|
119
|
-
protected static _onClickInlineRoll(event:
|
144
|
+
protected static _onClickInlineRoll(event: JQuery.ClickEvent): void;
|
120
145
|
|
121
146
|
/**
|
122
147
|
* Begin a Drag+Drop workflow for a dynamic content link
|
123
148
|
* @param event - The originating drag event
|
149
|
+
* @internal
|
124
150
|
*/
|
125
|
-
protected static _onDragEntityLink(event:
|
151
|
+
protected static _onDragEntityLink(event: JQuery.DragStartEvent): void;
|
126
152
|
|
127
153
|
/**
|
128
154
|
* Begin a a data transfer drag event with default handling
|
155
|
+
* @internal
|
129
156
|
*/
|
130
|
-
protected _onDragStart(event:
|
157
|
+
protected _onDragStart(event: DragEvent): void;
|
131
158
|
|
132
159
|
/**
|
133
160
|
* Handle dropping of transferred data onto the active rich text editor
|
134
161
|
* @param event - The originating drop event which triggered the data transfer
|
135
162
|
* @param editor - The TinyMCE editor instance being dropped on
|
136
163
|
*/
|
137
|
-
protected static _onDropEditorData(event:
|
164
|
+
protected static _onDropEditorData(event: DragEvent, editor: tinyMCE.Editor): void;
|
138
165
|
|
166
|
+
/**
|
167
|
+
* Singleton decoder area
|
168
|
+
* @internal
|
169
|
+
*/
|
139
170
|
protected static _decoder: HTMLTextAreaElement;
|
140
171
|
}
|
141
172
|
|
package/src/foundry/index.d.ts
CHANGED
@@ -11,6 +11,7 @@ import './foundry.js/canvas';
|
|
11
11
|
import './foundry.js/canvasAnimation';
|
12
12
|
import './foundry.js/canvasDocumentMixin';
|
13
13
|
import './foundry.js/chatBubbles';
|
14
|
+
import './foundry.js/clientDatabaseBackend';
|
14
15
|
import './foundry.js/clientDocuments';
|
15
16
|
import './foundry.js/clientDocumentMixin';
|
16
17
|
import './foundry.js/clientSettings';
|
@@ -1,61 +0,0 @@
|
|
1
|
-
// TODO: Remove when updating this class!!!
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
|
-
/**
|
6
|
-
* A configuration Form Application for modifying the properties of a MeasuredTemplate object.
|
7
|
-
* @see {@link MeasuredTemplate}
|
8
|
-
*/
|
9
|
-
declare class MeasuredTemplateConfig extends FormApplication<
|
10
|
-
FormApplication.Options,
|
11
|
-
MeasuredTemplateConfig.Data,
|
12
|
-
MeasuredTemplate
|
13
|
-
> {
|
14
|
-
/**
|
15
|
-
* @override
|
16
|
-
* @defaultValue
|
17
|
-
* ```typescript
|
18
|
-
* mergeObject(super.defaultOptions, {
|
19
|
-
* id: "template-config",
|
20
|
-
* classes: ["sheet", "template-sheet"],
|
21
|
-
* title: "Measurement Template Configuration",
|
22
|
-
* template: "templates/scene/template-config.html",
|
23
|
-
* width: 400
|
24
|
-
* });
|
25
|
-
* ```
|
26
|
-
*/
|
27
|
-
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
28
|
-
|
29
|
-
/**
|
30
|
-
* @override
|
31
|
-
*/
|
32
|
-
getData(): MeasuredTemplateConfig.Data;
|
33
|
-
|
34
|
-
/**
|
35
|
-
* @override
|
36
|
-
*/
|
37
|
-
protected _updateObject(event: Event, formData: MeasuredTemplateConfig.FormData): Promise<MeasuredTemplate | null>;
|
38
|
-
}
|
39
|
-
|
40
|
-
declare namespace MeasuredTemplateConfig {
|
41
|
-
interface Data {
|
42
|
-
object: foundry.utils.Duplicated<MeasuredTemplateConfig['object']['data']>;
|
43
|
-
options: MeasuredTemplateConfig['options'];
|
44
|
-
templateTypes: typeof CONFIG['MeasuredTemplate']['types'];
|
45
|
-
gridUnits: Scene['data']['gridUnits'];
|
46
|
-
submitText: string;
|
47
|
-
}
|
48
|
-
|
49
|
-
type FormData = {
|
50
|
-
angle: MeasuredTemplate.Data['angle'];
|
51
|
-
borderColor: MeasuredTemplate.Data['borderColor'];
|
52
|
-
direction: MeasuredTemplate.Data['direction'] | null;
|
53
|
-
distance: MeasuredTemplate.Data['distance'] | null;
|
54
|
-
fillColor: MeasuredTemplate.Data['fillColor'];
|
55
|
-
t: MeasuredTemplate.Data['t'];
|
56
|
-
texture: MeasuredTemplate.Data['texture'];
|
57
|
-
width: MeasuredTemplate.Data['width'];
|
58
|
-
x: MeasuredTemplate.Data['x'] | null;
|
59
|
-
y: MeasuredTemplate.Data['y'] | null;
|
60
|
-
};
|
61
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
// TODO: Remove when updating this class!!!
|
2
|
-
// eslint-disable-next-line
|
3
|
-
// @ts-nocheck
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Placeable Note configuration sheet
|
7
|
-
* @typeParam P - the type of the options object
|
8
|
-
*/
|
9
|
-
declare class NoteConfig<P extends FormApplication.Options = FormApplication.Options> extends FormApplication<
|
10
|
-
P,
|
11
|
-
NoteConfig.Data,
|
12
|
-
Note
|
13
|
-
> {
|
14
|
-
/**
|
15
|
-
* @param note - The Note object for which settings are being configured
|
16
|
-
* @param options - Additional Application options
|
17
|
-
*/
|
18
|
-
constructor(note: Note, options?: Partial<P>);
|
19
|
-
|
20
|
-
/**
|
21
|
-
* @override
|
22
|
-
* @defaultValue
|
23
|
-
* ```typescript
|
24
|
-
* mergeObject(super.defaultOptions, {
|
25
|
-
* id: "note-config",
|
26
|
-
* title: game.i18n.localize("NOTE.ConfigTitle"),
|
27
|
-
* template: "templates/scene/note-config.html",
|
28
|
-
* width: 400
|
29
|
-
* });
|
30
|
-
* ```
|
31
|
-
*/
|
32
|
-
static get defaultOptions(): typeof FormApplication['defaultOptions'];
|
33
|
-
|
34
|
-
/**
|
35
|
-
* @param options - (unused)
|
36
|
-
* @override
|
37
|
-
*/
|
38
|
-
getData(options?: Partial<P>): NoteConfig.Data;
|
39
|
-
|
40
|
-
/**
|
41
|
-
* @param event - (unused)
|
42
|
-
* @override
|
43
|
-
*/
|
44
|
-
protected _updateObject(event: Event, formData: NoteConfig.FormData): Promise<Note>;
|
45
|
-
|
46
|
-
/**
|
47
|
-
* @override
|
48
|
-
*/
|
49
|
-
close(options?: Application.CloseOptions): Promise<void>;
|
50
|
-
}
|
51
|
-
|
52
|
-
declare namespace NoteConfig {
|
53
|
-
interface Data {
|
54
|
-
entryIcons: typeof CONFIG.JournalEntry['noteIcons'];
|
55
|
-
entryId: JournalEntry['_id'] | undefined;
|
56
|
-
entryName: JournalEntry['name'] | undefined;
|
57
|
-
entries: Journal['entities'];
|
58
|
-
fontFamilies: Partial<Record<string, string>>;
|
59
|
-
object: foundry.utils.Duplicated<NoteConfig['object']['data']>;
|
60
|
-
options: NoteConfig['options'];
|
61
|
-
textAnchors: Record<foundry.CONST.TextAnchorPoint, string>;
|
62
|
-
}
|
63
|
-
|
64
|
-
interface FormData {
|
65
|
-
entryId: Note.Data['entryId'];
|
66
|
-
fontFamily: Note.Data['fontFamily'];
|
67
|
-
fontSize: Note.Data['fontSize'] | null;
|
68
|
-
icon: Note.Data['icon'];
|
69
|
-
iconSize: Note.Data['iconSize'] | null;
|
70
|
-
iconTint: Note.Data['iconTint'];
|
71
|
-
text: Note.Data['text'];
|
72
|
-
textAnchor: Note.Data['textAnchor'];
|
73
|
-
textColor: Note.Data['textColor'];
|
74
|
-
x: Note.Data['x'] | null;
|
75
|
-
y: Note.Data['y'] | null;
|
76
|
-
}
|
77
|
-
}
|