@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250804084032 → 13.346.0-beta.20250805163236

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 (53) hide show
  1. package/package.json +1 -1
  2. package/src/configuration/configuration.d.mts +3 -3
  3. package/src/configuration/hooks.d.mts +6 -4
  4. package/src/foundry/client/canvas/board.d.mts +1 -1
  5. package/src/foundry/client/canvas/containers/elements/door-control.d.mts +12 -4
  6. package/src/foundry/client/canvas/groups/canvas-group-mixin.d.mts +45 -23
  7. package/src/foundry/client/canvas/groups/effects.d.mts +136 -41
  8. package/src/foundry/client/canvas/groups/environment.d.mts +191 -48
  9. package/src/foundry/client/canvas/groups/hidden.d.mts +43 -15
  10. package/src/foundry/client/canvas/groups/interface.d.mts +38 -27
  11. package/src/foundry/client/canvas/groups/overlay.d.mts +17 -4
  12. package/src/foundry/client/canvas/groups/primary.d.mts +57 -30
  13. package/src/foundry/client/canvas/groups/rendered.d.mts +17 -4
  14. package/src/foundry/client/canvas/groups/visibility.d.mts +17 -6
  15. package/src/foundry/client/canvas/interaction/ruler/ruler.d.mts +10 -2
  16. package/src/foundry/client/canvas/layers/controls.d.mts +13 -5
  17. package/src/foundry/client/canvas/layers/sounds.d.mts +1 -1
  18. package/src/foundry/client/canvas/perception/detection-mode.d.mts +9 -6
  19. package/src/foundry/client/canvas/perception/detection-modes/darkvision.d.mts +1 -1
  20. package/src/foundry/client/canvas/perception/detection-modes/invisibility-perception.d.mts +1 -1
  21. package/src/foundry/client/canvas/perception/detection-modes/light-perception.d.mts +2 -2
  22. package/src/foundry/client/canvas/perception/detection-modes/super-perception.d.mts +1 -1
  23. package/src/foundry/client/canvas/perception/detection-modes/tremor-perception.d.mts +1 -1
  24. package/src/foundry/client/canvas/perception/fog.d.mts +13 -5
  25. package/src/foundry/client/canvas/perception/vision-mode.d.mts +4 -4
  26. package/src/foundry/client/canvas/placeables/tokens/ring.d.mts +10 -2
  27. package/src/foundry/client/canvas/primary/primary-canvas-object.d.mts +1 -1
  28. package/src/foundry/client/canvas/rendering/filters/effects-masking.d.mts +11 -4
  29. package/src/foundry/client/canvas/rendering/filters/visibility.d.mts +11 -4
  30. package/src/foundry/client/canvas/sources/base-effect-source.d.mts +2 -3
  31. package/src/foundry/client/canvas/sources/point-darkness-source.d.mts +10 -2
  32. package/src/foundry/client/canvas/sources/point-light-source.d.mts +10 -2
  33. package/src/foundry/client/canvas/sources/point-sound-source.d.mts +10 -2
  34. package/src/foundry/client/canvas/sources/point-vision-source.d.mts +10 -2
  35. package/src/foundry/client/config.d.mts +142 -86
  36. package/src/foundry/client/dice/roll.d.mts +18 -7
  37. package/src/foundry/client/documents/chat-message.d.mts +2 -2
  38. package/src/foundry/client/documents/collections/actors.d.mts +10 -2
  39. package/src/foundry/client/documents/collections/card-stacks.d.mts +10 -2
  40. package/src/foundry/client/documents/collections/chat-messages.d.mts +11 -3
  41. package/src/foundry/client/documents/collections/combat-encounters.d.mts +10 -2
  42. package/src/foundry/client/documents/collections/fog-explorations.d.mts +10 -2
  43. package/src/foundry/client/documents/collections/folders.d.mts +10 -2
  44. package/src/foundry/client/documents/collections/items.d.mts +10 -2
  45. package/src/foundry/client/documents/collections/journal.d.mts +10 -2
  46. package/src/foundry/client/documents/collections/macros.d.mts +10 -2
  47. package/src/foundry/client/documents/collections/playlists.d.mts +10 -2
  48. package/src/foundry/client/documents/collections/roll-tables.d.mts +10 -2
  49. package/src/foundry/client/documents/collections/scenes.d.mts +10 -2
  50. package/src/foundry/client/documents/collections/users.d.mts +10 -2
  51. package/src/foundry/client/documents/collections/world-settings.d.mts +10 -2
  52. package/src/foundry/client/documents/scene.d.mts +45 -37
  53. package/src/foundry/client/hooks.d.mts +41 -19
@@ -1,4 +1,4 @@
1
- import type { Brand, HandleEmptyObject, Identity } from "#utils";
1
+ import type { Brand, FixedInstanceType, HandleEmptyObject, Identity } from "#utils";
2
2
  import type { PrimaryCanvasGroupAmbienceFilter } from "#client/canvas/rendering/filters/_module.d.mts";
3
3
  import type { CachedContainer, SpriteMesh } from "#client/canvas/containers/_module.d.mts";
4
4
  import type { CanvasGroupMixin } from "#client/canvas/groups/_module.d.mts";
@@ -13,7 +13,7 @@ import type {
13
13
  declare module "#configuration" {
14
14
  namespace Hooks {
15
15
  interface CanvasGroupConfig {
16
- PrimaryCanvasGroup: PrimaryCanvasGroup.Any;
16
+ PrimaryCanvasGroup: PrimaryCanvasGroup.Implementation;
17
17
  }
18
18
  }
19
19
  }
@@ -21,17 +21,26 @@ declare module "#configuration" {
21
21
  /**
22
22
  * The primary Canvas group which generally contains tangible physical objects which exist within the Scene.
23
23
  * This group is a {@linkcode CachedContainer} which is rendered to the Scene as a {@linkcode SpriteMesh}.
24
- * This allows the rendered result of the Primary Canvas Group to be affected by a {@linkcode BaseSamplerShader}.
24
+ * This allows the rendered result of the Primary Canvas Group to be affected by a
25
+ * {@linkcode foundry.canvas.rendering.shaders.BaseSamplerShader | BaseSamplerShader}.
25
26
  */
26
27
  declare class PrimaryCanvasGroup<
27
28
  DrawOptions extends PrimaryCanvasGroup.DrawOptions = PrimaryCanvasGroup.DrawOptions,
28
29
  TearDownOptions extends PrimaryCanvasGroup.TearDownOptions = PrimaryCanvasGroup.TearDownOptions,
29
30
  > extends CanvasGroupMixin<typeof CachedContainer, "primary">(CachedContainer)<DrawOptions, TearDownOptions> {
31
+ // static override groupName is handled by the CanvasGroupMixin type
32
+
30
33
  /**
31
34
  * @param sprite - (default: `new SpriteMesh(undefined, BaseSamplerShader)`)
35
+ * @remarks Because `Canvas##createGroups` passes no arguments, this will always just use the default
32
36
  */
33
37
  constructor(sprite?: SpriteMesh);
34
38
 
39
+ /**
40
+ * @defaultValue `"none"`
41
+ */
42
+ override eventMode: PIXI.EventMode;
43
+
35
44
  /**
36
45
  * Sort order to break ties on the group/layer level.
37
46
  */
@@ -49,11 +58,6 @@ declare class PrimaryCanvasGroup<
49
58
  */
50
59
  static override textureConfiguration: CachedContainer.TextureConfiguration;
51
60
 
52
- /**
53
- * @defaultValue `"none"`
54
- */
55
- override eventMode: PIXI.EventMode;
56
-
57
61
  /**
58
62
  * @defaultValue `[0, 0, 0, 0]`
59
63
  */
@@ -61,13 +65,14 @@ declare class PrimaryCanvasGroup<
61
65
 
62
66
  /**
63
67
  * The background color in RGB.
68
+ * @internal
64
69
  */
65
- _backgroundColor: Color.RGBColorVector | undefined;
70
+ protected _backgroundColor: Color.RGBColorVector | undefined;
66
71
 
67
72
  /**
68
73
  * Track the set of HTMLVideoElements which are currently playing as part of this group.
69
74
  */
70
- videoMeshes: Set<SpriteMesh>;
75
+ videoMeshes: Set<PrimarySpriteMesh.Any>;
71
76
 
72
77
  /**
73
78
  * Occludable objects above this elevation are faded on hover.
@@ -78,18 +83,21 @@ declare class PrimaryCanvasGroup<
78
83
  /**
79
84
  * Allow API users to override the default elevation of the background layer.
80
85
  * This is a temporary solution until more formal support for scene levels is added in a future release.
86
+ * @defaultValue `0`
81
87
  */
82
88
  static BACKGROUND_ELEVATION: number;
83
89
 
84
90
  /**
85
91
  * The primary background image configured for the Scene, rendered as a SpriteMesh.
92
+ * @remarks Only `undefined` prior to first draw
86
93
  */
87
- background: SpriteMesh | undefined;
94
+ background: PrimarySpriteMesh | undefined;
88
95
 
89
96
  /**
90
97
  * The primary foreground image configured for the Scene, rendered as a SpriteMesh.
98
+ * @remarks Only `undefined` prior to first draw
91
99
  */
92
- foreground: SpriteMesh | undefined;
100
+ foreground: PrimarySpriteMesh | undefined;
93
101
 
94
102
  /**
95
103
  * A Quadtree which partitions and organizes primary canvas objects.
@@ -98,7 +106,6 @@ declare class PrimaryCanvasGroup<
98
106
 
99
107
  /**
100
108
  * The collection of PrimaryDrawingContainer objects which are rendered in the Scene.
101
- * @privateRemarks Foundry types this as `Collection<PrimaryDrawingContainer>`, which doesn't exist. It's `PrimaryGraphics` in practice.
102
109
  */
103
110
  drawings: Collection<PrimaryGraphics>;
104
111
 
@@ -116,18 +123,17 @@ declare class PrimaryCanvasGroup<
116
123
 
117
124
  /**
118
125
  * The ambience filter which is applying post-processing effects.
126
+ * @internal
119
127
  */
120
- _ambienceFilter: PrimaryCanvasGroupAmbienceFilter | undefined;
128
+ protected _ambienceFilter: PrimaryCanvasGroupAmbienceFilter | undefined;
121
129
 
122
130
  /**
123
131
  * Return the base HTML image or video element which provides the background texture.
124
- * @privateRemarks Foundry does not indicate the possibility of a null return
125
132
  */
126
133
  get backgroundSource(): HTMLImageElement | HTMLVideoElement | null;
127
134
 
128
135
  /**
129
136
  * Return the base HTML image or video element which provides the foreground texture.
130
- * @privateRemarks Foundry does not indicate the possibility of a null return
131
137
  */
132
138
  get foregroundSource(): HTMLImageElement | HTMLVideoElement | null;
133
139
 
@@ -143,7 +149,7 @@ declare class PrimaryCanvasGroup<
143
149
 
144
150
  protected override _draw(options: HandleEmptyObject<DrawOptions>): Promise<void>;
145
151
 
146
- protected override _render(_renderer: PIXI.Renderer): void;
152
+ protected override _render(renderer: PIXI.Renderer): void;
147
153
 
148
154
  protected override _tearDown(options: HandleEmptyObject<TearDownOptions>): Promise<void>;
149
155
 
@@ -188,32 +194,53 @@ declare class PrimaryCanvasGroup<
188
194
 
189
195
  /**
190
196
  * Override the default PIXI.Container behavior for how objects in this container are sorted.
191
- * @remarks Actually an override of `PIXI.Container#sortChildren`
192
197
  */
193
- sortChildren(): void;
198
+ override sortChildren(): void;
194
199
 
195
200
  /**
196
- * Handle mousemove events on the primary group to update the hovered state of its children.
197
- * @remarks Foundry marked `@internal`
201
+ * The sorting function used to order objects inside the Primary Canvas Group.
202
+ * Overrides the default sorting function defined for the PIXI.Container.
203
+ * Sort Tokens PCO above other objects except WeatherEffects, then Drawings PCO, all else held equal.
204
+ * @param a - An object to display
205
+ * @param b - Some other object to display
206
+ * @internal
198
207
  */
199
- _onMouseMove(): void;
208
+ protected static _compareObjects(
209
+ a: PrimaryCanvasObjectMixin.AnyMixed | PIXI.DisplayObject,
210
+ b: PrimaryCanvasObjectMixin.AnyMixed | PIXI.DisplayObject,
211
+ ): number;
200
212
 
201
213
  /**
202
- * @deprecated since v12, will be removed in v14
203
- * @remarks `"PrimaryCanvasGroup#mapElevationAlpha is deprecated. Use canvas.masks.depth.mapElevation(elevation) instead."`
214
+ * Handle mousemove events on the primary group to update the hovered state of its children.
215
+ * @param currentPos - Current mouse position
216
+ * @param hasMouseMoved - Has the mouse been moved (or it is a simulated mouse move event)?
217
+ * @internal
204
218
  */
205
- mapElevationToDepth(elevation: number): number;
219
+ protected _onMouseMove(currentPos: PIXI.Point, hasMouseMoved: boolean): void;
206
220
 
207
221
  /**
208
- * @deprecated since v11, will be removed in v13
209
- * @remarks "PrimaryCanvasGroup#mapElevationAlpha is deprecated in favor of PrimaryCanvasGroup#mapElevationToDepth"
222
+ * @deprecated "`PrimaryCanvasGroup#mapElevationAlpha` is deprecated. Use {@linkcode foundry.canvas.layers.CanvasDepthMask.mapElevation | canvas.masks.depth.mapElevation(elevation)}
223
+ * instead." (since v12, until v14)
210
224
  */
211
- mapElevationAlpha(elevation: number): number;
225
+ mapElevationToDepth(elevation: number): number;
226
+
227
+ #PrimaryCanvasGroup: true;
212
228
  }
213
229
 
214
230
  declare namespace PrimaryCanvasGroup {
215
- interface Any extends AnyPrimaryCanvasGroup {}
216
- interface AnyConstructor extends Identity<typeof AnyPrimaryCanvasGroup> {}
231
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
232
+ type Any = Internal.Any;
233
+
234
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
235
+ type AnyConstructor = Internal.AnyConstructor;
236
+
237
+ namespace Internal {
238
+ interface Any extends AnyPrimaryCanvasGroup {}
239
+ interface AnyConstructor extends Identity<typeof AnyPrimaryCanvasGroup> {}
240
+ }
241
+
242
+ interface ImplementationClass extends Identity<typeof CONFIG.Canvas.groups.primary.groupClass> {}
243
+ interface Implementation extends FixedInstanceType<ImplementationClass> {}
217
244
 
218
245
  interface DrawOptions extends CanvasGroupMixin.DrawOptions {}
219
246
 
@@ -1,10 +1,10 @@
1
- import type { Identity } from "#utils";
1
+ import type { FixedInstanceType, Identity } from "#utils";
2
2
  import type { CanvasGroupMixin } from "#client/canvas/groups/_module.d.mts";
3
3
 
4
4
  declare module "#configuration" {
5
5
  namespace Hooks {
6
6
  interface CanvasGroupConfig {
7
- RenderedCanvasGroup: RenderedCanvasGroup.Any;
7
+ RenderedCanvasGroup: RenderedCanvasGroup.Implementation;
8
8
  }
9
9
  }
10
10
  }
@@ -16,6 +16,8 @@ declare class RenderedCanvasGroup<
16
16
  DrawOptions extends RenderedCanvasGroup.DrawOptions = RenderedCanvasGroup.DrawOptions,
17
17
  TearDownOptions extends RenderedCanvasGroup.TearDownOptions = RenderedCanvasGroup.TearDownOptions,
18
18
  > extends CanvasGroupMixin<typeof PIXI.Container, "rendered">(PIXI.Container)<DrawOptions, TearDownOptions> {
19
+ // static override groupName is handled by the CanvasGroupMixin type
20
+
19
21
  /**
20
22
  * Should this group tear down its non-layer children?
21
23
  * @defaultValue `false`
@@ -24,8 +26,19 @@ declare class RenderedCanvasGroup<
24
26
  }
25
27
 
26
28
  declare namespace RenderedCanvasGroup {
27
- interface Any extends AnyRenderedCanvasGroup {}
28
- interface AnyConstructor extends Identity<typeof AnyRenderedCanvasGroup> {}
29
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
30
+ type Any = Internal.Any;
31
+
32
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
33
+ type AnyConstructor = Internal.AnyConstructor;
34
+
35
+ namespace Internal {
36
+ interface Any extends AnyRenderedCanvasGroup {}
37
+ interface AnyConstructor extends Identity<typeof AnyRenderedCanvasGroup> {}
38
+ }
39
+
40
+ interface ImplementationClass extends Identity<typeof CONFIG.Canvas.groups.rendered.groupClass> {}
41
+ interface Implementation extends FixedInstanceType<ImplementationClass> {}
29
42
 
30
43
  interface DrawOptions extends CanvasGroupMixin.DrawOptions {}
31
44
 
@@ -1,4 +1,4 @@
1
- import type { EmptyObject, HandleEmptyObject, Identity, InexactPartial } from "#utils";
1
+ import type { EmptyObject, FixedInstanceType, HandleEmptyObject, Identity, InexactPartial } from "#utils";
2
2
  import type { Canvas } from "#client/canvas/_module.mjs";
3
3
  import type { VisibilityFilter } from "#client/canvas/rendering/filters/_module.mjs";
4
4
  import type { CanvasGroupMixin } from "#client/canvas/groups/_module.d.mts";
@@ -15,7 +15,7 @@ import type { AllHooks as hookEvents } from "#client/hooks.mjs";
15
15
  declare module "#configuration" {
16
16
  namespace Hooks {
17
17
  interface CanvasGroupConfig {
18
- CanvasVisibility: CanvasVisibility.Any;
18
+ CanvasVisibility: CanvasVisibility.Implementation;
19
19
  }
20
20
  }
21
21
  }
@@ -178,8 +178,19 @@ declare class CanvasVisibility<
178
178
  }
179
179
 
180
180
  declare namespace CanvasVisibility {
181
- interface Any extends AnyCanvasVisibility {}
182
- interface AnyConstructor extends Identity<typeof AnyCanvasVisibility> {}
181
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
182
+ type Any = Internal.Any;
183
+
184
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
185
+ type AnyConstructor = Internal.AnyConstructor;
186
+
187
+ namespace Internal {
188
+ interface Any extends AnyCanvasVisibility {}
189
+ interface AnyConstructor extends Identity<typeof AnyCanvasVisibility> {}
190
+ }
191
+
192
+ interface ImplementationClass extends Identity<typeof CONFIG.Canvas.groups.visibility.groupClass> {}
193
+ interface Implementation extends FixedInstanceType<ImplementationClass> {}
183
194
 
184
195
  interface DrawOptions extends CanvasGroupMixin.DrawOptions {}
185
196
 
@@ -192,7 +203,7 @@ declare namespace CanvasVisibility {
192
203
  * @remarks Only `undefined` immediately following construction. Gets set to a Source or `null` when {@linkcode Canvas.perception | canvas.perception} receives the
193
204
  * {@linkcode PerceptionManager.RENDER_FLAGS.initializeVisionModes | initializeVisionModes} render flag
194
205
  */
195
- source: PointVisionSource.Any | null | undefined;
206
+ source: PointVisionSource.Internal.Any | null | undefined;
196
207
 
197
208
  /**
198
209
  * @remarks Defaults to `{}` at construction. Gets set to {@linkcode VisionMode.lighting | this.visionModeData.source?.visionMode.lighting}`|| {}` when
@@ -287,7 +298,7 @@ declare namespace CanvasVisibility {
287
298
  */
288
299
  elevation?: number;
289
300
 
290
- los: Map<PointVisionSource.Any, boolean>;
301
+ los: Map<PointVisionSource.Internal.Any, boolean>;
291
302
  }
292
303
 
293
304
  /**
@@ -69,8 +69,16 @@ declare class Ruler extends BaseRuler {
69
69
  }
70
70
 
71
71
  declare namespace Ruler {
72
- interface Any extends AnyRuler {}
73
- interface AnyConstructor extends Identity<typeof AnyRuler> {}
72
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
73
+ type Any = Internal.Any;
74
+
75
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
76
+ type AnyConstructor = Internal.AnyConstructor;
77
+
78
+ namespace Internal {
79
+ interface Any extends AnyRuler {}
80
+ interface AnyConstructor extends Identity<typeof AnyRuler> {}
81
+ }
74
82
 
75
83
  interface ImplementationClass extends Identity<CONFIG["Canvas"]["rulerClass"]> {}
76
84
  interface Implementation extends FixedInstanceType<ImplementationClass> {}
@@ -9,7 +9,7 @@ import type { Ping, Ruler } from "#client/canvas/interaction/_module.d.mts";
9
9
  declare module "#configuration" {
10
10
  namespace Hooks {
11
11
  interface InteractionLayerConfig {
12
- ControlsLayer: ControlsLayer.Any;
12
+ ControlsLayer: ControlsLayer.Implementation;
13
13
  }
14
14
  }
15
15
  }
@@ -235,11 +235,19 @@ declare class ControlsLayer extends InteractionLayer {
235
235
  }
236
236
 
237
237
  declare namespace ControlsLayer {
238
- interface Any extends AnyControlsLayer {}
239
- interface AnyConstructor extends Identity<typeof AnyControlsLayer> {}
238
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
239
+ type Any = Internal.Any;
240
240
 
241
- type ImplementationClass = CONFIG["Canvas"]["layers"]["controls"]["layerClass"];
242
- type Implementation = FixedInstanceType<ImplementationClass>;
241
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
242
+ type AnyConstructor = Internal.AnyConstructor;
243
+
244
+ namespace Internal {
245
+ interface Any extends AnyControlsLayer {}
246
+ interface AnyConstructor extends Identity<typeof AnyControlsLayer> {}
247
+ }
248
+
249
+ interface ImplementationClass extends Identity<CONFIG["Canvas"]["layers"]["controls"]["layerClass"]> {}
250
+ interface Implementation extends FixedInstanceType<ImplementationClass> {}
243
251
 
244
252
  interface DrawOptions extends InteractionLayer.DrawOptions {}
245
253
 
@@ -30,7 +30,7 @@ declare class SoundsLayer extends PlaceablesLayer<"AmbientSound"> {
30
30
  * A mapping of ambient audio sources which are active within the rendered Scene
31
31
  * @defaultValue `new foundry.utils.Collection()`
32
32
  */
33
- sources: foundry.utils.Collection<foundry.canvas.sources.PointSoundSource.Any>;
33
+ sources: Collection<foundry.canvas.sources.PointSoundSource.Internal.Any>;
34
34
 
35
35
  /**
36
36
  * @privateRemarks This is not overridden in foundry but reflects the real behavior.
@@ -48,7 +48,7 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
48
48
  * @returns Is the test target visible?
49
49
  */
50
50
  testVisibility(
51
- visionSource: PointVisionSource.Any,
51
+ visionSource: PointVisionSource.Internal.Any,
52
52
  mode: TokenDocument.DetectionModeData,
53
53
  config: CanvasVisibility.TestConfig,
54
54
  ): boolean;
@@ -62,7 +62,10 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
62
62
  * @remarks Will always be passed a `target` when called by {@linkcode testVisibility | DetectionMode#testVisibility}, it just might possibly be `undefined`.
63
63
  * All use is gated behind an `instanceof Token` check, so that's fine.
64
64
  */
65
- protected _canDetect(visionSource: PointVisionSource.Any, target: CanvasVisibility.TestObject | undefined): boolean;
65
+ protected _canDetect(
66
+ visionSource: PointVisionSource.Internal.Any,
67
+ target: CanvasVisibility.TestObject | undefined,
68
+ ): boolean;
66
69
 
67
70
  /**
68
71
  * Evaluate a single test point to confirm whether it is visible.
@@ -77,7 +80,7 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
77
80
  * See {@linkcode _canDetect} remarks.
78
81
  */
79
82
  protected _testPoint(
80
- visionSource: PointVisionSource.Any,
83
+ visionSource: PointVisionSource.Internal.Any,
81
84
  mode: TokenDocument.DetectionModeData,
82
85
  target: CanvasVisibility.TestObject | undefined,
83
86
  test: CanvasVisibility.Test,
@@ -97,7 +100,7 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
97
100
  * See {@linkcode _canDetect} remarks.
98
101
  */
99
102
  protected _testLOS(
100
- visionSource: PointVisionSource.Any,
103
+ visionSource: PointVisionSource.Internal.Any,
101
104
  mode: TokenDocument.DetectionModeData,
102
105
  target: CanvasVisibility.TestObject | undefined,
103
106
  test: CanvasVisibility.Test,
@@ -115,7 +118,7 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
115
118
  * See {@linkcode _canDetect} remarks.
116
119
  */
117
120
  protected _testAngle(
118
- visionSource: PointVisionSource.Any,
121
+ visionSource: PointVisionSource.Internal.Any,
119
122
  mode: TokenDocument.DetectionModeData,
120
123
  target: CanvasVisibility.TestObject | undefined,
121
124
  test: CanvasVisibility.Test,
@@ -133,7 +136,7 @@ declare class DetectionMode extends DataModel<DetectionMode.Schema> {
133
136
  * See {@linkcode _canDetect} remarks.
134
137
  */
135
138
  protected _testRange(
136
- visionSource: PointVisionSource.Any,
139
+ visionSource: PointVisionSource.Internal.Any,
137
140
  mode: TokenDocument.DetectionModeData,
138
141
  target: CanvasVisibility.TestObject | undefined,
139
142
  test: CanvasVisibility.Test,
@@ -10,7 +10,7 @@ import type { PointVisionSource } from "#client/canvas/sources/_module.d.mts";
10
10
  */
11
11
  declare class DetectionModeDarkvision extends DetectionMode {
12
12
  protected override _canDetect(
13
- visionSource: PointVisionSource.Any,
13
+ visionSource: PointVisionSource.Internal.Any,
14
14
  target: CanvasVisibility.TestObject | undefined,
15
15
  ): boolean;
16
16
  }
@@ -17,7 +17,7 @@ declare class DetectionModeInvisibility extends DetectionMode {
17
17
  protected static override _detectionFilter: GlowOverlayFilter | undefined;
18
18
 
19
19
  protected override _canDetect(
20
- visionSource: PointVisionSource.Any,
20
+ visionSource: PointVisionSource.Internal.Any,
21
21
  target: CanvasVisibility.TestObject | undefined,
22
22
  ): boolean;
23
23
  }
@@ -10,12 +10,12 @@ import type { PointVisionSource } from "#client/canvas/sources/_module.d.mts";
10
10
  */
11
11
  declare class DetectionModeLightPerception extends DetectionMode {
12
12
  protected override _canDetect(
13
- visionSource: PointVisionSource.Any,
13
+ visionSource: PointVisionSource.Internal.Any,
14
14
  target: CanvasVisibility.TestObject | undefined,
15
15
  ): boolean;
16
16
 
17
17
  protected override _testPoint(
18
- visionSource: PointVisionSource.Any,
18
+ visionSource: PointVisionSource.Internal.Any,
19
19
  mode: TokenDocument.DetectionModeData,
20
20
  target: CanvasVisibility.TestObject | undefined,
21
21
  test: CanvasVisibility.Test,
@@ -15,7 +15,7 @@ declare class DetectionModeAll extends DetectionMode {
15
15
  protected static override _detectionFilter: OutlineOverlayFilter | undefined;
16
16
 
17
17
  protected override _canDetect(
18
- visionSource: PointVisionSource.Any,
18
+ visionSource: PointVisionSource.Internal.Any,
19
19
  target: CanvasVisibility.TestObject | undefined,
20
20
  ): boolean;
21
21
  }
@@ -14,7 +14,7 @@ declare class DetectionModeTremor extends DetectionMode {
14
14
  protected static override _detectionFilter: OutlineOverlayFilter | undefined;
15
15
 
16
16
  protected override _canDetect(
17
- visionSource: PointVisionSource.Any,
17
+ visionSource: PointVisionSource.Internal.Any,
18
18
  target: CanvasVisibility.TestObject | undefined,
19
19
  ): boolean;
20
20
  }
@@ -48,7 +48,7 @@ declare class FogManager extends EventEmitterMixin() {
48
48
  * The configured options used for the saved fog-of-war texture.
49
49
  * @remarks Only `undefined` prior to the first time the canvas visibility layer is `#draw()`n
50
50
  */
51
- get textureConfiguration(): CanvasVisibility["textureConfiguration"];
51
+ get textureConfiguration(): CanvasVisibility.Implementation["textureConfiguration"];
52
52
 
53
53
  /**
54
54
  * Does the currently viewed Scene support Token field of vision?
@@ -144,11 +144,19 @@ declare class FogManager extends EventEmitterMixin() {
144
144
  }
145
145
 
146
146
  declare namespace FogManager {
147
- interface Any extends AnyFogManager {}
148
- interface AnyConstructor extends Identity<typeof AnyFogManager> {}
147
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
148
+ type Any = Internal.Any;
149
149
 
150
- type ImplementationClass = CONFIG["Canvas"]["fogManager"];
151
- type Implementation = FixedInstanceType<ImplementationClass>;
150
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
151
+ type AnyConstructor = Internal.AnyConstructor;
152
+
153
+ namespace Internal {
154
+ interface Any extends AnyFogManager {}
155
+ interface AnyConstructor extends Identity<typeof AnyFogManager> {}
156
+ }
157
+
158
+ interface ImplementationClass extends Identity<CONFIG["Canvas"]["fogManager"]> {}
159
+ interface Implementation extends FixedInstanceType<ImplementationClass> {}
152
160
 
153
161
  /**
154
162
  * @deprecated Replaced by {@linkcode FogManager.ImplementationClass}.
@@ -105,25 +105,25 @@ declare class VisionMode extends DataModel<
105
105
  * Special activation handling that could be implemented by `VisionMode` subclasses
106
106
  * @param source - Activate this `VisionMode` for a specific source
107
107
  */
108
- protected _activate(source: PointVisionSource.Any): void;
108
+ protected _activate(source: PointVisionSource.Internal.Any): void;
109
109
 
110
110
  /**
111
111
  * Special deactivation handling that could be implemented by `VisionMode` subclasses
112
112
  * @param source - Deactivate this `VisionMode` for a specific source
113
113
  */
114
- protected _deactivate(source: PointVisionSource.Any): void;
114
+ protected _deactivate(source: PointVisionSource.Internal.Any): void;
115
115
 
116
116
  /**
117
117
  * Special handling which is needed when this Vision Mode is activated for a VisionSource.
118
118
  * @param source - Activate this `VisionMode` for a specific source
119
119
  */
120
- activate(source: PointVisionSource.Any): void;
120
+ activate(source: PointVisionSource.Internal.Any): void;
121
121
 
122
122
  /**
123
123
  * Special handling which is needed when this Vision Mode is deactivated for a VisionSource.
124
124
  * @param source - Deactivate this `VisionMode` for a specific source
125
125
  */
126
- deactivate(source: PointVisionSource.Any): void;
126
+ deactivate(source: PointVisionSource.Internal.Any): void;
127
127
 
128
128
  /**
129
129
  * An animation function which runs every frame while this Vision Mode is active.
@@ -198,8 +198,16 @@ declare class TokenRing {
198
198
  }
199
199
 
200
200
  declare namespace TokenRing {
201
- interface Any extends AnyTokenRing {}
202
- interface AnyConstructor extends Identity<typeof AnyTokenRing> {}
201
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
202
+ type Any = Internal.Any;
203
+
204
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
205
+ type AnyConstructor = Internal.AnyConstructor;
206
+
207
+ namespace Internal {
208
+ interface Any extends AnyTokenRing {}
209
+ interface AnyConstructor extends Identity<typeof AnyTokenRing> {}
210
+ }
203
211
 
204
212
  interface ImplementationClass extends Identity<CONFIG["Token"]["ring"]["ringClass"]> {}
205
213
  interface Implementation extends FixedInstanceType<ImplementationClass> {}
@@ -178,7 +178,7 @@ declare namespace PrimaryCanvasObjectMixin {
178
178
  * @remarks {@linkcode PrimaryCanvasObject._onAdded | PrimaryCanvasObject#_onAdded} throws if not passed a either {@linkcode PrimaryCanvasContainer}
179
179
  * or whatever {@linkcode canvas.primary} currently is, which presumably will be a {@linkcode PrimaryCanvasGroup}
180
180
  */
181
- type Parent = PrimaryCanvasGroup.Any | primary.PrimaryCanvasContainer.Any;
181
+ type Parent = PrimaryCanvasGroup.Implementation | primary.PrimaryCanvasContainer.Any;
182
182
 
183
183
  /** @remarks See {@linkcode PrimaryCanvasObject.object | PrimaryCanvasObject#object} remarks */
184
184
  type OwningObject = placeables.PlaceableObject.Any | CanvasGroupMixin.AnyMixed;
@@ -94,11 +94,18 @@ declare class VisualEffectsMaskingFilter extends AbstractBaseMaskFilter {
94
94
  }
95
95
 
96
96
  declare namespace VisualEffectsMaskingFilter {
97
- interface Any extends AnyVisualEffectsMaskingFilter {}
98
- interface AnyConstructor extends Identity<typeof AnyVisualEffectsMaskingFilter> {}
97
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
98
+ type Any = Internal.Any;
99
99
 
100
- // TODO: This can't be an interface yet because of 'An interface can only extend an object type or intersection of object types with statically known members' errors
101
- type ImplementationClass = CONFIG["Canvas"]["visualEffectsMaskingFilter"];
100
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
101
+ type AnyConstructor = Internal.AnyConstructor;
102
+
103
+ namespace Internal {
104
+ interface Any extends AnyVisualEffectsMaskingFilter {}
105
+ interface AnyConstructor extends Identity<typeof AnyVisualEffectsMaskingFilter> {}
106
+ }
107
+
108
+ interface ImplementationClass extends Identity<CONFIG["Canvas"]["visualEffectsMaskingFilter"]> {}
102
109
  interface Implementation extends FixedInstanceType<ImplementationClass> {}
103
110
 
104
111
  type PostProcessModes = Array<keyof typeof VisualEffectsMaskingFilter.POST_PROCESS_TECHNIQUES>;
@@ -60,11 +60,18 @@ declare class VisibilityFilter extends AbstractBaseMaskFilter {
60
60
  }
61
61
 
62
62
  declare namespace VisibilityFilter {
63
- interface Any extends AnyVisibilityFilter {}
64
- interface AnyConstructor extends Identity<typeof AnyVisibilityFilter> {}
63
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
64
+ type Any = Internal.Any;
65
65
 
66
- // TODO: This can't be an interface yet because of 'An interface can only extend an object type or intersection of object types with statically known members' errors
67
- type ImplementationClass = CONFIG["Canvas"]["visibilityFilter"];
66
+ /** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
67
+ type AnyConstructor = Internal.AnyConstructor;
68
+
69
+ namespace Internal {
70
+ interface Any extends AnyVisibilityFilter {}
71
+ interface AnyConstructor extends Identity<typeof AnyVisibilityFilter> {}
72
+ }
73
+
74
+ interface ImplementationClass extends Identity<CONFIG["Canvas"]["visibilityFilter"]> {}
68
75
  interface Implementation extends FixedInstanceType<ImplementationClass> {}
69
76
 
70
77
  /** @internal */
@@ -59,8 +59,7 @@ declare abstract class BaseEffectSource<
59
59
  * Some other object which is responsible for this source.
60
60
  * @privateRemarks see {@linkcode BaseEffectSource.ConstructorOptions.object}
61
61
  */
62
- // TODO: 4th type param for this?
63
- object: placeables.PlaceableObject.Any | EnvironmentCanvasGroup.Any | null;
62
+ object: placeables.PlaceableObject.Any | EnvironmentCanvasGroup.Implementation | null;
64
63
 
65
64
  /**
66
65
  * The source id linked to this effect source.
@@ -230,7 +229,7 @@ declare namespace BaseEffectSource {
230
229
  * as an exception to Foundry's typing of just {@linkcode PlaceableObject}. Otherwise, is only ever {@linkcode placeables.AmbientLight | AmbientLight},
231
230
  * {@linkcode placeables.AmbientSound | AmbientSound}, or {@linkcode placeables.Token | Token} in Foundry usage
232
231
  */
233
- object: placeables.PlaceableObject.Any | EnvironmentCanvasGroup.Any;
232
+ object: placeables.PlaceableObject.Any | EnvironmentCanvasGroup.Implementation;
234
233
 
235
234
  /**
236
235
  * A unique ID for this source. This will be set automatically if an object is provided, otherwise is required.