@league-of-foundry-developers/foundry-vtt-types 9.255.3 → 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 (93) 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/utils/helpers.mjs.d.ts +1 -0
  5. package/src/foundry/foundry.js/application.d.ts +0 -1
  6. package/src/foundry/foundry.js/applications/chatPopout.d.ts +1 -1
  7. package/src/foundry/foundry.js/applications/compendium.d.ts +20 -11
  8. package/src/foundry/foundry.js/applications/controlsReference.d.ts +17 -2
  9. package/src/foundry/foundry.js/applications/filePicker.d.ts +67 -75
  10. package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
  11. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
  12. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -4
  13. package/src/foundry/foundry.js/applications/formApplications/{entitySheetConfig.d.ts → documentSheetConfig.d.ts} +36 -19
  14. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -4
  15. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +2 -4
  16. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardConfig.d.ts +51 -0
  17. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfig.d.ts +88 -0
  18. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsHand.d.ts +20 -0
  19. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsPile.d.ts +20 -0
  20. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/index.d.ts +2 -0
  21. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +2 -4
  22. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +17 -11
  23. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
  24. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +3 -9
  25. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +10 -12
  26. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +4 -5
  27. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +2 -6
  28. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +1 -4
  29. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +8 -12
  30. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +2 -1
  31. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +1 -4
  32. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +10 -11
  33. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +28 -15
  34. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -6
  35. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +1 -4
  36. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +17 -21
  37. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +3 -3
  38. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +40 -7
  39. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -2
  40. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +10 -24
  41. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +1 -1
  42. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +15 -3
  43. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +23 -16
  44. package/src/foundry/foundry.js/applications/formApplications/{defaultTokenConfig.d.ts → tokenConfigs/defaultTokenConfig.d.ts} +29 -16
  45. package/src/foundry/foundry.js/applications/formApplications/tokenConfigs/index.d.ts +1 -0
  46. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +22 -15
  47. package/src/foundry/foundry.js/applications/index.d.ts +1 -0
  48. package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
  49. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +65 -38
  50. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +17 -3
  51. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +19 -16
  52. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +0 -3
  53. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +4 -18
  54. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +2 -8
  55. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +38 -5
  56. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -0
  57. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -1
  58. package/src/foundry/foundry.js/applications/supportDetails.d.ts +78 -0
  59. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +8 -0
  60. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
  61. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +2 -6
  62. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
  63. package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +2 -2
  64. package/src/foundry/foundry.js/config.d.ts +21 -21
  65. package/src/foundry/foundry.js/contextMenu.d.ts +37 -28
  66. package/src/foundry/foundry.js/game.d.ts +2 -2
  67. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  68. package/src/foundry/foundry.js/pixi/containers/canvasLayers/controlsLayer.d.ts +49 -48
  69. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +51 -40
  70. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts +63 -20
  71. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayer.d.ts +0 -3
  72. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +4 -4
  73. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +21 -0
  74. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts +1 -1
  75. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts +10 -2
  76. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts +41 -20
  77. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +50 -121
  78. package/src/foundry/foundry.js/pixi/containers/canvasLayers/sightLayer.d.ts +125 -107
  79. package/src/foundry/foundry.js/pixi/containers/controlIcon.d.ts +3 -0
  80. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +11 -0
  81. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +34 -27
  82. package/src/foundry/foundry.js/pixi/filters/abstractFilter.d.ts +42 -0
  83. package/src/foundry/foundry.js/pixi/filters/abstractFilters/fogColorFilter.d.ts +16 -0
  84. package/src/foundry/foundry.js/pixi/filters/abstractFilters/forceColorFilter.d.ts +17 -0
  85. package/src/foundry/foundry.js/pixi/filters/abstractFilters/glowFilter.d.ts +31 -0
  86. package/src/foundry/foundry.js/pixi/filters/abstractFilters/index.d.ts +4 -0
  87. package/src/foundry/foundry.js/pixi/filters/abstractFilters/roofMaskFilter.d.ts +20 -0
  88. package/src/foundry/foundry.js/pixi/filters/index.d.ts +2 -0
  89. package/src/foundry/foundry.js/roll.d.ts +2 -2
  90. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +5 -0
  91. package/src/types/augments/index.d.ts +2 -0
  92. package/src/types/augments/pixiGraphicsSmooth.d.ts +7 -0
  93. package/src/types/augments/pixiLegacyGraphics.d.ts +7 -0
@@ -258,6 +258,12 @@ declare global {
258
258
  */
259
259
  refresh(): this;
260
260
 
261
+ /**
262
+ * Size and display the Token Icon
263
+ * @internal
264
+ */
265
+ protected _refreshIcon(): void;
266
+
261
267
  /**
262
268
  * Draw the Token border, taking into consideration the grid type and border color
263
269
  * @internal
@@ -444,27 +450,12 @@ declare global {
444
450
 
445
451
  /**
446
452
  * Set this Token as an active target for the current game User
447
- * @param targeted - Is the Token now targeted?
448
- * (default: `true`)
449
- * @param user - Assign the token as a target for a specific User
450
- * (default: `null` which will use the current user)
451
- * @param releaseOthers - Release other active targets for the same player?
452
- * (default: `true`)
453
- * @param groupSelection - Is this target being set as part of a group selection workflow?
454
- * (default: `false`)
455
- */
456
- setTarget(
457
- targeted?: boolean,
458
- {
459
- user,
460
- releaseOthers,
461
- groupSelection
462
- }?: {
463
- user?: InstanceType<ConfiguredDocumentClass<typeof User>> | null;
464
- releaseOthers?: boolean;
465
- groupSelection?: boolean;
466
- }
467
- ): void;
453
+ * @param targeted - Is the Token now targeted?
454
+ * (default: `true`)
455
+ * @param context - Additional context options
456
+ * (default `{}`)
457
+ */
458
+ setTarget(targeted?: boolean, context?: Token.SetTargetContext | undefined): void;
468
459
 
469
460
  /**
470
461
  * Add or remove the currently controlled Tokens from the active combat encounter
@@ -519,12 +510,8 @@ declare global {
519
510
  /** @override */
520
511
  protected _getShiftedPosition(dx: number, dy: number): { x: number; y: number };
521
512
 
522
- /**
523
- * Extend the PlaceableObject.rotate method to prevent rotation if the Token is in the midst of a movement animation
524
- * @returns Actually a Promise<void>
525
- * @remarks The return type is `Promise<this> | undefined` but this breaks the interface of PlaceableObject, see https://gitlab.com/foundrynet/foundryvtt/-/issues/6876
526
- */
527
- rotate(...args: Parameters<PlaceableObject['rotate']>): any;
513
+ /** @override */
514
+ rotate(...args: Parameters<PlaceableObject['rotate']>): Promise<this>;
528
515
 
529
516
  /** @override */
530
517
  protected _onCreate(
@@ -718,5 +705,25 @@ declare global {
718
705
  */
719
706
  overlay?: boolean | undefined;
720
707
  }
708
+
709
+ interface SetTargetContext {
710
+ /**
711
+ * Assign the token as a target for a specific User
712
+ * @defaultValue `null`
713
+ */
714
+ user?: InstanceType<ConfiguredDocumentClass<typeof User>> | null | undefined;
715
+
716
+ /**
717
+ * Release other active targets for the same player?
718
+ * @defaultValue `true`
719
+ */
720
+ releaseOthers?: boolean | undefined;
721
+
722
+ /**
723
+ * Is this target being set as part of a group selection workflow?
724
+ * @defaultValue `Is this target being set as part of a group selection workflow?`
725
+ */
726
+ groupSelection?: boolean | undefined;
727
+ }
721
728
  }
722
729
  }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * An abstract filter which provides a framework for reusable definition
3
+ */
4
+ declare abstract class AbstractFilter extends PIXI.Filter {
5
+ /**
6
+ * The default uniforms used by the filter
7
+ * @defaultValue `{}`
8
+ */
9
+ static defaultUniforms: AbstractBaseShader.Uniforms;
10
+
11
+ /**
12
+ * The fragment shader which renders this filter.
13
+ * @defaultValue `undefined`
14
+ * @remarks This is a function in {@link GlowFilter}. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6937
15
+ */
16
+ static fragmentShader: string | ((quality: number, distance: number) => string) | undefined;
17
+
18
+ /**
19
+ * The vertex shader which renders this filter.
20
+ * @defaultValue `undefined`
21
+ */
22
+ static vertexShader: string | undefined;
23
+
24
+ /**
25
+ * A factory method for creating the filter using its defined default values
26
+ * @param uniforms - (default: `{}`)
27
+ */
28
+ static create(uniforms: AbstractBaseShader.Uniforms): AbstractFilter;
29
+
30
+ /**
31
+ * Always target the resolution of the render texture or renderer
32
+ */
33
+ // @ts-expect-error this is a property on PIXI.Filter
34
+ get resolution(): number;
35
+ set resolution(value: number);
36
+
37
+ /**
38
+ * Always target the MSAA level of the render texture or renderer
39
+ */
40
+ get multisample(): PIXI.MSAA_QUALITY;
41
+ set multisample(value: PIXI.MSAA_QUALITY);
42
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A filter which is rendering explored color according to FoW intensity.
3
+ */
4
+ declare class FogColorFilter extends AbstractFilter {
5
+ /**
6
+ * @defaultValue
7
+ * ```typescript
8
+ * {
9
+ * exploredColor: [1, 1, 1]
10
+ * }
11
+ * ```
12
+ */
13
+ static defaultUniforms: AbstractBaseShader.Uniforms;
14
+
15
+ static fragmentShader: string;
16
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A filter which forces all non-transparent pixels to a specific color and transparency.
3
+ */
4
+ declare class ForceColorFilter extends AbstractFilter {
5
+ /**
6
+ * @defaultValue
7
+ * ```typescript
8
+ * {
9
+ * color: [1, 1, 1],
10
+ * alpha: 1.0
11
+ * }
12
+ * ```
13
+ */
14
+ static defaultUniforms: AbstractBaseShader.Uniforms;
15
+
16
+ static fragmentShader: string;
17
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A filter which implements an inner or outer glow around the source texture.
3
+ * Incorporated from https://github.com/pixijs/filters/tree/main/filters/glow
4
+ */
5
+ declare class GlowFilter extends AbstractFilter {
6
+ /**
7
+ * @override
8
+ * @defaultValue
9
+ * ```typescript
10
+ * {
11
+ * distance: 10,
12
+ * innerStrength: 0,
13
+ * glowColor: [1, 1, 1, 1],
14
+ * quality: 0.1,
15
+ * }
16
+ * ```
17
+ */
18
+ static defaultUniforms: AbstractBaseShader.Uniforms & { distance: number; quality: number };
19
+
20
+ /**
21
+ * @override
22
+ * @remarks This could change, see https://gitlab.com/foundrynet/foundryvtt/-/issues/6937
23
+ */
24
+ static fragmentShader(quality: number, distance: number): string;
25
+
26
+ /** @override */
27
+ static vertexShader: string;
28
+
29
+ /** @override */
30
+ static create(uniforms: AbstractBaseShader.Uniforms): GlowFilter;
31
+ }
@@ -0,0 +1,4 @@
1
+ import './fogColorFilter';
2
+ import './forceColorFilter';
3
+ import './glowFilter';
4
+ import './roofMaskFilter';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This filter turns pixels with an alpha channel &lt; alphaThreshold in transparent pixels
3
+ * Then, optionally, it can turn the result in the chosen color (default: pure white).
4
+ * The alpha [threshold,1] is re-mapped to [0,1] with an hermite interpolation slope to prevent pixelation.
5
+ */
6
+ declare class RoofMaskFilter extends AbstractFilter {
7
+ /**
8
+ * @defaultValue
9
+ * ```typescript
10
+ * {
11
+ * alphaThreshold: 0.75,
12
+ * turnToColor: false,
13
+ * color: [1, 1, 1]
14
+ * }
15
+ * ```
16
+ */
17
+ static defaultUniforms: AbstractBaseShader.Uniforms;
18
+
19
+ static fragmentShader: string;
20
+ }
@@ -1,2 +1,4 @@
1
1
  import './abstractBaseMaskFilter';
2
2
  import './abstractBaseMaskFilters';
3
+ import './abstractFilter';
4
+ import './abstractFilters';
@@ -16,7 +16,7 @@ declare global {
16
16
  * console.log(r.terms); // [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
17
17
  *
18
18
  * // Execute the roll
19
- * r.evaluate();
19
+ * await r.evaluate();
20
20
  *
21
21
  * // The resulting equation after it was rolled
22
22
  * console.log(r.result); // 16 + 2 + 4
@@ -142,7 +142,7 @@ declare global {
142
142
  * @example
143
143
  * ```typescript
144
144
  * let r = new Roll("2d6 + 4 + 1d4");
145
- * r.evaluate();
145
+ * await r.evaluate();
146
146
  * console.log(r.result); // 5 + 4 + 2
147
147
  * console.log(r.total); // 11
148
148
  * ```
@@ -59,6 +59,11 @@ declare global {
59
59
  */
60
60
  static CLOSE_REGEXP: RegExp;
61
61
 
62
+ /**
63
+ * A regular expression pattern used to match the entirety of a DicePool expression.
64
+ */
65
+ static REGEXP: RegExp;
66
+
62
67
  /**
63
68
  * @defaultValue `["terms", "modifiers", "rolls", "results"]`
64
69
  */
@@ -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 {};