@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250804084032 → 13.346.0-beta.20250804213559
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/package.json +1 -1
- package/src/configuration/configuration.d.mts +3 -3
- package/src/configuration/hooks.d.mts +6 -4
- package/src/foundry/client/canvas/board.d.mts +1 -1
- package/src/foundry/client/canvas/containers/elements/door-control.d.mts +12 -4
- package/src/foundry/client/canvas/groups/canvas-group-mixin.d.mts +45 -23
- package/src/foundry/client/canvas/groups/effects.d.mts +136 -41
- package/src/foundry/client/canvas/groups/environment.d.mts +191 -48
- package/src/foundry/client/canvas/groups/hidden.d.mts +43 -15
- package/src/foundry/client/canvas/groups/interface.d.mts +38 -27
- package/src/foundry/client/canvas/groups/overlay.d.mts +17 -4
- package/src/foundry/client/canvas/groups/primary.d.mts +57 -30
- package/src/foundry/client/canvas/groups/rendered.d.mts +17 -4
- package/src/foundry/client/canvas/groups/visibility.d.mts +17 -6
- package/src/foundry/client/canvas/interaction/ruler/ruler.d.mts +10 -2
- package/src/foundry/client/canvas/layers/controls.d.mts +13 -5
- package/src/foundry/client/canvas/layers/sounds.d.mts +1 -1
- package/src/foundry/client/canvas/perception/detection-mode.d.mts +9 -6
- package/src/foundry/client/canvas/perception/detection-modes/darkvision.d.mts +1 -1
- package/src/foundry/client/canvas/perception/detection-modes/invisibility-perception.d.mts +1 -1
- package/src/foundry/client/canvas/perception/detection-modes/light-perception.d.mts +2 -2
- package/src/foundry/client/canvas/perception/detection-modes/super-perception.d.mts +1 -1
- package/src/foundry/client/canvas/perception/detection-modes/tremor-perception.d.mts +1 -1
- package/src/foundry/client/canvas/perception/fog.d.mts +13 -5
- package/src/foundry/client/canvas/perception/vision-mode.d.mts +4 -4
- package/src/foundry/client/canvas/placeables/tokens/ring.d.mts +10 -2
- package/src/foundry/client/canvas/primary/primary-canvas-object.d.mts +1 -1
- package/src/foundry/client/canvas/rendering/filters/effects-masking.d.mts +11 -4
- package/src/foundry/client/canvas/rendering/filters/visibility.d.mts +11 -4
- package/src/foundry/client/canvas/sources/base-effect-source.d.mts +2 -3
- package/src/foundry/client/canvas/sources/point-darkness-source.d.mts +10 -2
- package/src/foundry/client/canvas/sources/point-light-source.d.mts +10 -2
- package/src/foundry/client/canvas/sources/point-sound-source.d.mts +10 -2
- package/src/foundry/client/canvas/sources/point-vision-source.d.mts +10 -2
- package/src/foundry/client/config.d.mts +142 -86
- package/src/foundry/client/dice/roll.d.mts +18 -7
- package/src/foundry/client/documents/chat-message.d.mts +2 -2
- package/src/foundry/client/documents/collections/actors.d.mts +10 -2
- package/src/foundry/client/documents/collections/card-stacks.d.mts +10 -2
- package/src/foundry/client/documents/collections/chat-messages.d.mts +11 -3
- package/src/foundry/client/documents/collections/combat-encounters.d.mts +10 -2
- package/src/foundry/client/documents/collections/fog-explorations.d.mts +10 -2
- package/src/foundry/client/documents/collections/folders.d.mts +10 -2
- package/src/foundry/client/documents/collections/items.d.mts +10 -2
- package/src/foundry/client/documents/collections/journal.d.mts +10 -2
- package/src/foundry/client/documents/collections/macros.d.mts +10 -2
- package/src/foundry/client/documents/collections/playlists.d.mts +10 -2
- package/src/foundry/client/documents/collections/roll-tables.d.mts +10 -2
- package/src/foundry/client/documents/collections/scenes.d.mts +10 -2
- package/src/foundry/client/documents/collections/users.d.mts +10 -2
- package/src/foundry/client/documents/collections/world-settings.d.mts +10 -2
- package/src/foundry/client/documents/scene.d.mts +45 -37
- package/src/foundry/client/hooks.d.mts +41 -19
@@ -110,8 +110,16 @@ declare class PointDarknessSource<
|
|
110
110
|
}
|
111
111
|
|
112
112
|
declare namespace PointDarknessSource {
|
113
|
-
|
114
|
-
|
113
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
|
114
|
+
type Any = Internal.Any;
|
115
|
+
|
116
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
|
117
|
+
type AnyConstructor = Internal.AnyConstructor;
|
118
|
+
|
119
|
+
namespace Internal {
|
120
|
+
interface Any extends AnyPointDarknessSource {}
|
121
|
+
interface AnyConstructor extends Identity<typeof AnyPointDarknessSource> {}
|
122
|
+
}
|
115
123
|
|
116
124
|
type Initialized<
|
117
125
|
SourceData extends PointDarknessSource.SourceData = PointDarknessSource.SourceData,
|
@@ -91,8 +91,16 @@ declare class PointLightSource<
|
|
91
91
|
}
|
92
92
|
|
93
93
|
declare namespace PointLightSource {
|
94
|
-
|
95
|
-
|
94
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
|
95
|
+
type Any = Internal.Any;
|
96
|
+
|
97
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
|
98
|
+
type AnyConstructor = Internal.AnyConstructor;
|
99
|
+
|
100
|
+
namespace Internal {
|
101
|
+
interface Any extends AnyPointLightSource {}
|
102
|
+
interface AnyConstructor extends Identity<typeof AnyPointLightSource> {}
|
103
|
+
}
|
96
104
|
|
97
105
|
type Initialized<
|
98
106
|
SourceData extends PointLightSource.SourceData = PointLightSource.SourceData,
|
@@ -46,8 +46,16 @@ declare class PointSoundSource<
|
|
46
46
|
}
|
47
47
|
|
48
48
|
declare namespace PointSoundSource {
|
49
|
-
|
50
|
-
|
49
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
|
50
|
+
type Any = Internal.Any;
|
51
|
+
|
52
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
|
53
|
+
type AnyConstructor = Internal.AnyConstructor;
|
54
|
+
|
55
|
+
namespace Internal {
|
56
|
+
interface Any extends AnyPointSoundSource {}
|
57
|
+
interface AnyConstructor extends Identity<typeof AnyPointSoundSource> {}
|
58
|
+
}
|
51
59
|
|
52
60
|
type Initialized<
|
53
61
|
SourceData extends PointSoundSource.SourceData = PointSoundSource.SourceData,
|
@@ -224,8 +224,16 @@ declare class PointVisionSource<
|
|
224
224
|
}
|
225
225
|
|
226
226
|
declare namespace PointVisionSource {
|
227
|
-
|
228
|
-
|
227
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
|
228
|
+
type Any = Internal.Any;
|
229
|
+
|
230
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
|
231
|
+
type AnyConstructor = Internal.AnyConstructor;
|
232
|
+
|
233
|
+
namespace Internal {
|
234
|
+
interface Any extends AnyPointVisionSource {}
|
235
|
+
interface AnyConstructor extends Identity<typeof AnyPointVisionSource> {}
|
236
|
+
}
|
229
237
|
|
230
238
|
/** @remarks See {@linkcode PointVisionSource._layers} */
|
231
239
|
// Interface would require `RenderingLayers extends ... = InterfaceToObject<Layers>` in every subclass signature
|
@@ -111,9 +111,9 @@ declare global {
|
|
111
111
|
|
112
112
|
/**
|
113
113
|
* Configured Roll class definitions
|
114
|
-
* @defaultValue `[Roll]`
|
114
|
+
* @defaultValue `[`{@linkcode foundry.dice.Roll}`]`
|
115
115
|
*/
|
116
|
-
rolls: Array<foundry.dice.Roll.AnyConstructor>;
|
116
|
+
rolls: Array<foundry.dice.Roll.Internal.AnyConstructor>;
|
117
117
|
|
118
118
|
/**
|
119
119
|
* Configured DiceTerm class definitions
|
@@ -326,8 +326,11 @@ declare global {
|
|
326
326
|
/** @defaultValue `Actor` */
|
327
327
|
documentClass: Document.ImplementationClassFor<"Actor">;
|
328
328
|
|
329
|
-
/**
|
330
|
-
|
329
|
+
/**
|
330
|
+
* @defaultValue {@linkcode foundry.documents.collections.Actors}
|
331
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
332
|
+
*/
|
333
|
+
collection: typeof foundry.documents.collections.Actors;
|
331
334
|
|
332
335
|
/** @defaultValue `[]` */
|
333
336
|
compendiumIndexFields: string[];
|
@@ -395,8 +398,11 @@ declare global {
|
|
395
398
|
* Configuration for the Cards primary Document type
|
396
399
|
*/
|
397
400
|
Cards: {
|
398
|
-
/**
|
399
|
-
|
401
|
+
/**
|
402
|
+
* @defaultValue {@linkcode foundry.documents.collections.CardStacks}
|
403
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
404
|
+
*/
|
405
|
+
collection: typeof foundry.documents.collections.CardStacks;
|
400
406
|
|
401
407
|
/** @defaultValue `[]` */
|
402
408
|
compendiumIndexFields: string[];
|
@@ -453,7 +459,7 @@ declare global {
|
|
453
459
|
/** @defaultValue `"fa-duotone fa-layer-group"` */
|
454
460
|
pile: string;
|
455
461
|
|
456
|
-
[
|
462
|
+
[type: Brand<string, "CONFIG.Cards.typeIcons">]: string;
|
457
463
|
};
|
458
464
|
};
|
459
465
|
|
@@ -464,8 +470,11 @@ declare global {
|
|
464
470
|
/** @defaultValue `ChatMessage` */
|
465
471
|
documentClass: Document.ImplementationClassFor<"ChatMessage">;
|
466
472
|
|
467
|
-
/**
|
468
|
-
|
473
|
+
/**
|
474
|
+
* @defaultValue {@linkcode foundry.documents.collections.ChatMessages}
|
475
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
476
|
+
*/
|
477
|
+
collection: typeof foundry.documents.collections.ChatMessages;
|
469
478
|
|
470
479
|
/** @defaultValue `"templates/sidebar/chat-message.html"` */
|
471
480
|
template: string;
|
@@ -504,8 +513,11 @@ declare global {
|
|
504
513
|
/** @defaultValue `Combat` */
|
505
514
|
documentClass: Document.ImplementationClassFor<"Combat">;
|
506
515
|
|
507
|
-
/**
|
508
|
-
|
516
|
+
/**
|
517
|
+
* @defaultValue {@linkcode foundry.documents.collections.CombatEncounters}
|
518
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
519
|
+
*/
|
520
|
+
collection: typeof foundry.documents.collections.CombatEncounters;
|
509
521
|
|
510
522
|
/** @defaultValue `"fas fa-swords"` */
|
511
523
|
sidebarIcon: string;
|
@@ -585,8 +597,11 @@ declare global {
|
|
585
597
|
*/
|
586
598
|
typeLabels?: Record<"base", string>;
|
587
599
|
|
588
|
-
/**
|
589
|
-
|
600
|
+
/**
|
601
|
+
* @defaultValue {@linkcode foundry.documents.collections.FogExplorations}
|
602
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
603
|
+
*/
|
604
|
+
collection: typeof foundry.documents.collections.FogExplorations;
|
590
605
|
};
|
591
606
|
|
592
607
|
/**
|
@@ -596,8 +611,11 @@ declare global {
|
|
596
611
|
/** @defaultValue `Folder` */
|
597
612
|
documentClass: Document.ImplementationClassFor<"Folder">;
|
598
613
|
|
599
|
-
/**
|
600
|
-
|
614
|
+
/**
|
615
|
+
* @defaultValue {@linkcode foundry.documents.collections.Folders}
|
616
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
617
|
+
*/
|
618
|
+
collection: typeof foundry.documents.collections.Folders;
|
601
619
|
|
602
620
|
/** @defaultValue `"fas fa-folder"` */
|
603
621
|
sidebarIcon: string;
|
@@ -620,8 +638,11 @@ declare global {
|
|
620
638
|
/** @defaultValue `Item` */
|
621
639
|
documentClass: Document.ImplementationClassFor<"Item">;
|
622
640
|
|
623
|
-
/**
|
624
|
-
|
641
|
+
/**
|
642
|
+
* @defaultValue {@linkcode foundry.documents.collections.Items}
|
643
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
644
|
+
*/
|
645
|
+
collection: typeof foundry.documents.collections.Items;
|
625
646
|
|
626
647
|
/** @defaultValue `[]` */
|
627
648
|
compendiumIndexFields: string[];
|
@@ -667,8 +688,11 @@ declare global {
|
|
667
688
|
*/
|
668
689
|
typeLabels?: Record<"base", string>;
|
669
690
|
|
670
|
-
/**
|
671
|
-
|
691
|
+
/**
|
692
|
+
* @defaultValue {@linkcode foundry.documents.collections.Journal}
|
693
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
694
|
+
*/
|
695
|
+
collection: typeof foundry.documents.collections.Journal;
|
672
696
|
|
673
697
|
/** @defaultValue `[]` */
|
674
698
|
compendiumIndexFields: string[];
|
@@ -780,8 +804,11 @@ declare global {
|
|
780
804
|
*/
|
781
805
|
typeLabels?: Record<foundry.documents.BaseMacro.SubType, string>;
|
782
806
|
|
783
|
-
/**
|
784
|
-
|
807
|
+
/**
|
808
|
+
* @defaultValue {@linkcode foundry.documents.collections.Macros}
|
809
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
810
|
+
*/
|
811
|
+
collection: typeof foundry.documents.collections.Macros;
|
785
812
|
|
786
813
|
/** @defaultValue `[]` */
|
787
814
|
compendiumIndexFields: string[];
|
@@ -810,8 +837,11 @@ declare global {
|
|
810
837
|
*/
|
811
838
|
typeLabels?: Record<"base", string>;
|
812
839
|
|
813
|
-
/**
|
814
|
-
|
840
|
+
/**
|
841
|
+
* @defaultValue {@linkcode foundry.documents.collections.Playlists}
|
842
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
843
|
+
*/
|
844
|
+
collection: typeof foundry.documents.collections.Playlists;
|
815
845
|
|
816
846
|
/** @defaultValue `[]` */
|
817
847
|
compendiumIndexFields: string[];
|
@@ -843,8 +873,11 @@ declare global {
|
|
843
873
|
*/
|
844
874
|
typeLabels?: Record<"base", string>;
|
845
875
|
|
846
|
-
/**
|
847
|
-
|
876
|
+
/**
|
877
|
+
* @defaultValue {@linkcode foundry.documents.collections.RollTables}
|
878
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
879
|
+
*/
|
880
|
+
collection: typeof foundry.documents.collections.RollTables;
|
848
881
|
|
849
882
|
/** @defaultValue `["formula"]` */
|
850
883
|
compendiumIndexFields: string[];
|
@@ -879,8 +912,11 @@ declare global {
|
|
879
912
|
*/
|
880
913
|
typeLabels?: Record<"base", string>;
|
881
914
|
|
882
|
-
/**
|
883
|
-
|
915
|
+
/**
|
916
|
+
* @defaultValue {@linkcode foundry.documents.collections.Scenes}
|
917
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
918
|
+
*/
|
919
|
+
collection: typeof foundry.documents.collections.Scenes;
|
884
920
|
|
885
921
|
/** @defaultValue `[]` */
|
886
922
|
compendiumIndexFields: string[];
|
@@ -906,8 +942,13 @@ declare global {
|
|
906
942
|
*/
|
907
943
|
typeLabels?: Record<"base", string>;
|
908
944
|
|
909
|
-
/**
|
910
|
-
|
945
|
+
/**
|
946
|
+
* @defaultValue {@linkcode foundry.documents.collections.WorldSettings}
|
947
|
+
* @remarks {@linkcode foundry.helpers.ClientSettings | ClientSettings#constructor} instantiates `WorldSettings` by name, without referring to this property.
|
948
|
+
* It's only purpose seems to be allowing a {@linkcode WorldCollection.instance | CONFIG[primaryType]?.collection?.instance} reference in
|
949
|
+
* {@linkcode foundry.utils.parseUuid} to work.
|
950
|
+
*/
|
951
|
+
collection: foundry.documents.collections.WorldSettings.Internal.AnyConstructor;
|
911
952
|
};
|
912
953
|
|
913
954
|
/**
|
@@ -927,8 +968,11 @@ declare global {
|
|
927
968
|
*/
|
928
969
|
typeLabels?: Record<"base", string>;
|
929
970
|
|
930
|
-
/**
|
931
|
-
|
971
|
+
/**
|
972
|
+
* @defaultValue {@linkcode foundry.documents.collections.Users}
|
973
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in {@linkcode Game.initializeDocuments | Game#initializeDocuments}
|
974
|
+
*/
|
975
|
+
collection: typeof foundry.documents.collections.Users;
|
932
976
|
};
|
933
977
|
|
934
978
|
/**
|
@@ -963,7 +1007,7 @@ declare global {
|
|
963
1007
|
* Available Weather Effects implementations
|
964
1008
|
*/
|
965
1009
|
weatherEffects: {
|
966
|
-
[
|
1010
|
+
[weatherEffectID: Brand<string, "CONFIG.weatherEffects">]: canvasLayers.WeatherEffects.AmbienceConfiguration;
|
967
1011
|
|
968
1012
|
/**
|
969
1013
|
* @defaultValue
|
@@ -1581,18 +1625,18 @@ declare global {
|
|
1581
1625
|
dataModels: Record<string, typeof DataModel<any, JournalEntryPage.Implementation>>;
|
1582
1626
|
|
1583
1627
|
/**
|
1584
|
-
* @remarks Added by
|
1628
|
+
* @remarks Added by {@linkcode foundry.applications.sheets._registerDefaultSheets} in {@linkcode Game | Game#constructor}
|
1585
1629
|
*/
|
1586
1630
|
sheetClasses: Record<foundry.documents.BaseJournalEntryPage.SubType, Record<string, SheetClassConfig>>;
|
1587
1631
|
|
1588
1632
|
/**
|
1589
1633
|
* @defaultValue `{}`
|
1590
|
-
* @remarks Initialized by
|
1634
|
+
* @remarks Initialized by {@linkcode foundry.helpers.Localization | Localization#initialize}, is an empty object until `i18nInit`
|
1591
1635
|
*/
|
1592
1636
|
typeLabels: Record<foundry.documents.BaseJournalEntryPage.SubType, string>;
|
1593
1637
|
|
1594
1638
|
typeIcons: {
|
1595
|
-
[type: string]: string;
|
1639
|
+
[type: Brand<string, "CONFIG.JournalEntryPage">]: string;
|
1596
1640
|
|
1597
1641
|
/** @defaultValue `"fas fa-file-image"` */
|
1598
1642
|
image: string;
|
@@ -2304,9 +2348,8 @@ declare global {
|
|
2304
2348
|
|
2305
2349
|
/**
|
2306
2350
|
* @defaultValue `FogManager`
|
2307
|
-
* @remarks
|
2351
|
+
* @remarks `typeof` instead of `AnyConstructor` because it's instantiated via `new` in `Canvas##initializeFogManager`
|
2308
2352
|
*/
|
2309
|
-
// TODO: Widen to `.AnyConstructor`? Takes no arguments
|
2310
2353
|
fogManager: typeof perception.FogManager;
|
2311
2354
|
|
2312
2355
|
polygonBackends: Canvas.PolygonBackends;
|
@@ -2314,9 +2357,9 @@ declare global {
|
|
2314
2357
|
/** @defaultValue `number` */
|
2315
2358
|
darknessSourcePaddingMultiplier: number;
|
2316
2359
|
|
2317
|
-
visibilityFilter: foundry.canvas.rendering.filters.VisibilityFilter.AnyConstructor;
|
2360
|
+
visibilityFilter: foundry.canvas.rendering.filters.VisibilityFilter.Internal.AnyConstructor;
|
2318
2361
|
|
2319
|
-
visualEffectsMaskingFilter: foundry.canvas.rendering.filters.VisualEffectsMaskingFilter.AnyConstructor;
|
2362
|
+
visualEffectsMaskingFilter: foundry.canvas.rendering.filters.VisualEffectsMaskingFilter.Internal.AnyConstructor;
|
2320
2363
|
|
2321
2364
|
/**
|
2322
2365
|
* @defaultValue `Ruler`
|
@@ -2342,7 +2385,7 @@ declare global {
|
|
2342
2385
|
/**
|
2343
2386
|
* A registry of Scenes which are managed by a specific SceneManager class.
|
2344
2387
|
* @remarks Keys are Scene IDs
|
2345
|
-
* @privateRemarks
|
2388
|
+
* @privateRemarks `typeof` over `AnyConstructor` because it's instantiated via `new` in {@linkcode Canvas.getSceneManager}
|
2346
2389
|
*/
|
2347
2390
|
managedScenes: Record<string, typeof foundry.canvas.SceneManager>;
|
2348
2391
|
|
@@ -2355,12 +2398,6 @@ declare global {
|
|
2355
2398
|
*/
|
2356
2399
|
hoverFade: Canvas.HoverFade;
|
2357
2400
|
|
2358
|
-
/**
|
2359
|
-
* Allow specific transcoders for assets
|
2360
|
-
* @defaultValue `{ basis: false }`
|
2361
|
-
*/
|
2362
|
-
transCoders: Canvas.TransCoders;
|
2363
|
-
|
2364
2401
|
/**
|
2365
2402
|
* The set of VisionMode definitions which are available to be used for Token vision.
|
2366
2403
|
*/
|
@@ -2370,10 +2407,17 @@ declare global {
|
|
2370
2407
|
* The set of DetectionMode definitions which are available to be used for visibility detection.
|
2371
2408
|
*/
|
2372
2409
|
detectionModes: Canvas.DetectionModes;
|
2410
|
+
|
2411
|
+
/**
|
2412
|
+
* @deprecated "`CONFIG.Canvas.transcoders` has been deprecated without replacement. KTX2/Basis support is always enabled and this property has no effect anymore." (since v13, until v15)
|
2413
|
+
*/
|
2414
|
+
get transcoders(): { basis: true };
|
2373
2415
|
}
|
2374
2416
|
|
2375
2417
|
namespace Canvas {
|
2376
2418
|
interface Groups {
|
2419
|
+
// TODO: Index signature?
|
2420
|
+
|
2377
2421
|
/** @defaultValue `{ groupClass: HiddenCanvasGroup, parent: "stage" }` */
|
2378
2422
|
hidden: CONFIG.Canvas.GroupDefinition<typeof canvasGroups.HiddenCanvasGroup>;
|
2379
2423
|
|
@@ -2399,11 +2443,33 @@ declare global {
|
|
2399
2443
|
overlay: CONFIG.Canvas.GroupDefinition<typeof canvasGroups.OverlayCanvasGroup>;
|
2400
2444
|
}
|
2401
2445
|
|
2402
|
-
|
2403
|
-
|
2446
|
+
/**
|
2447
|
+
* @remarks `typeof MixedCanvasGroup` is used instead of {@linkcode CanvasGroupMixin.AnyMixedConstructor} because groups are
|
2448
|
+
* instantiated via `new` in `Canvas##createGroups`
|
2449
|
+
*/
|
2450
|
+
interface GroupDefinition<GroupClass extends typeof MixedCanvasGroup = typeof MixedCanvasGroup> {
|
2451
|
+
/**
|
2452
|
+
* @remarks The class that gets instantiated for this group. Must not take any arguments as Foundry doesn't pass any.
|
2453
|
+
*/
|
2404
2454
|
groupClass: GroupClass;
|
2405
|
-
|
2455
|
+
|
2456
|
+
/**
|
2457
|
+
* @remarks Valid parents are {@linkcode foundry.canvas.Canvas.stage | "stage"} or any other defined Group
|
2458
|
+
*/
|
2459
|
+
parent: "stage" | keyof typeof CONFIG.Canvas.groups;
|
2460
|
+
|
2461
|
+
/**
|
2462
|
+
* @remarks Only used in `InterfaceCanvasGroup##createInterfaceDrawingsContainer`.
|
2463
|
+
*
|
2464
|
+
* Can't be `undefined` as it is directly assigned to {@linkcode PIXI.Container.zIndex | PIXI.Container#zIndex}
|
2465
|
+
*/
|
2406
2466
|
zIndexDrawings?: number;
|
2467
|
+
|
2468
|
+
/**
|
2469
|
+
* @remarks Only used in `InterfaceCanvasGroup##drawScrollingText`.
|
2470
|
+
*
|
2471
|
+
* Can't be `undefined` as it is directly assigned to {@linkcode PIXI.Container.zIndex | PIXI.Container#zIndex}
|
2472
|
+
*/
|
2407
2473
|
zIndexScrollingText?: number;
|
2408
2474
|
}
|
2409
2475
|
|
@@ -2415,7 +2481,7 @@ declare global {
|
|
2415
2481
|
grid: LayerDefinition<typeof canvasLayers.GridLayer, "interface">;
|
2416
2482
|
|
2417
2483
|
/** @defaultValue `{ layerClass: RegionLayer, group: "interface" }` */
|
2418
|
-
|
2484
|
+
regions: LayerDefinition<typeof canvasLayers.RegionLayer, "interface">;
|
2419
2485
|
|
2420
2486
|
/** @defaultValue `{ layerClass: DrawingsLayer, group: "interface" }` */
|
2421
2487
|
drawings: LayerDefinition<typeof canvasLayers.DrawingsLayer, "interface">;
|
@@ -2469,23 +2535,26 @@ declare global {
|
|
2469
2535
|
}
|
2470
2536
|
|
2471
2537
|
/**
|
2472
|
-
* @privateRemarks Foundry types this as {@linkcode geometry.PointSourcePolygon | @enum PointSourcePolygon},
|
2473
|
-
*
|
2474
|
-
*
|
2475
|
-
*
|
2476
|
-
* come up in real world code.
|
2538
|
+
* @privateRemarks Foundry types this as {@linkcode geometry.PointSourcePolygon | @enum PointSourcePolygon}, but all the runtime defaults are
|
2539
|
+
* {@linkcode geometry.ClockwiseSweepPolygon | ClockwiseSweepPolygon}, and CSP types and methods are assumed in other canvas classes, so entries
|
2540
|
+
* have been constrained to it instead of `PointSourcePolygon`.
|
2541
|
+
*
|
2542
|
+
* It is not impossible to add a new type of source, so the index signature is included, but this is unlikely to come up in real world code.
|
2543
|
+
*
|
2544
|
+
* `AnyConstructor` is used here because the expectation is that polygons are instantiated via {@linkcode geometry.ClockwiseSweepPolygon.create | .create},
|
2545
|
+
* and the constructor has been made protected to enforce this.
|
2477
2546
|
*/
|
2478
2547
|
interface PolygonBackends {
|
2548
|
+
[polygonType: Brand<string, "CONFIG.Canvas.polygonBackends">]: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2479
2549
|
sight: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2480
2550
|
light: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2481
2551
|
darkness: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2482
2552
|
sound: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2483
2553
|
move: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2484
|
-
[K: string]: geometry.ClockwiseSweepPolygon.AnyConstructor;
|
2485
2554
|
}
|
2486
2555
|
|
2487
2556
|
interface GridStyles {
|
2488
|
-
[
|
2557
|
+
[gridStyle: Brand<string, "CONFIG.Canvas.gridStyles">]: canvasLayers.GridLayer.GridStyle;
|
2489
2558
|
|
2490
2559
|
/**
|
2491
2560
|
* @defaultValue
|
@@ -2579,7 +2648,7 @@ declare global {
|
|
2579
2648
|
RenderedEffectSource._Seed {}
|
2580
2649
|
|
2581
2650
|
interface LightAnimations {
|
2582
|
-
[animationID: string]: LightSourceAnimationConfig;
|
2651
|
+
[animationID: Brand<string, "CONFIG.Canvas.lightAnimations">]: LightSourceAnimationConfig;
|
2583
2652
|
flame: LightAnimations.Flame;
|
2584
2653
|
torch: LightAnimations.Torch;
|
2585
2654
|
revolving: LightAnimations.Revolving;
|
@@ -2847,7 +2916,7 @@ declare global {
|
|
2847
2916
|
RenderedEffectSource._Seed {}
|
2848
2917
|
|
2849
2918
|
interface DarknessAnimations {
|
2850
|
-
[animationID: string]: DarknessSourceAnimationConfig;
|
2919
|
+
[animationID: Brand<string, "CONFIG.Canvas.darknessAnimations">]: DarknessSourceAnimationConfig;
|
2851
2920
|
magicalGloom: DarknessAnimations.MagicalGloom;
|
2852
2921
|
roiling: DarknessAnimations.Roiling;
|
2853
2922
|
hole: DarknessAnimations.Hole;
|
@@ -2913,6 +2982,8 @@ declare global {
|
|
2913
2982
|
}
|
2914
2983
|
|
2915
2984
|
interface Styles {
|
2985
|
+
[pingStyle: Brand<string, "CONFIG.Canvas.pings.styles">]: CONFIG.Canvas.Pings.Style;
|
2986
|
+
|
2916
2987
|
/** @defaultValue `{ class: AlertPing, color: "#ff0000", size: 1.5, duration: 900 }` */
|
2917
2988
|
alert: CONFIG.Canvas.Pings.Style;
|
2918
2989
|
|
@@ -2924,8 +2995,6 @@ declare global {
|
|
2924
2995
|
|
2925
2996
|
/** @defaultValue `{ class: PulsePing, size: 1.5, duration: 900 }` */
|
2926
2997
|
pulse: CONFIG.Canvas.Pings.Style;
|
2927
|
-
|
2928
|
-
[key: string]: CONFIG.Canvas.Pings.Style;
|
2929
2998
|
}
|
2930
2999
|
|
2931
3000
|
interface Style {
|
@@ -2978,12 +3047,8 @@ declare global {
|
|
2978
3047
|
duration: number;
|
2979
3048
|
}
|
2980
3049
|
|
2981
|
-
interface TransCoders {
|
2982
|
-
[K: string]: boolean;
|
2983
|
-
}
|
2984
|
-
|
2985
3050
|
interface VisionModes {
|
2986
|
-
[
|
3051
|
+
[visionMode: Brand<string, "CONFIG.Canvas.visionModes">]: perception.VisionMode;
|
2987
3052
|
|
2988
3053
|
/**
|
2989
3054
|
* Default (Basic) Vision
|
@@ -3157,7 +3222,7 @@ declare global {
|
|
3157
3222
|
}
|
3158
3223
|
|
3159
3224
|
interface DetectionModes {
|
3160
|
-
[
|
3225
|
+
[detectionMode: Brand<string, "CONFIG.Canvas.detectionModes">]: perception.DetectionMode;
|
3161
3226
|
|
3162
3227
|
lightPerception: perception.DetectionModeLightPerception;
|
3163
3228
|
|
@@ -3216,7 +3281,8 @@ declare global {
|
|
3216
3281
|
}
|
3217
3282
|
|
3218
3283
|
namespace Dice {
|
3219
|
-
|
3284
|
+
/** @deprecated Use {@linkcode foundry.dice.Roll.Mode} instead */
|
3285
|
+
type RollMode = foundry.dice.Roll.Mode;
|
3220
3286
|
|
3221
3287
|
interface RollModes {
|
3222
3288
|
[rollMode: Brand<string, "CONFIG.Dice.RollMode">]: RollModeConfig;
|
@@ -3470,10 +3536,8 @@ declare global {
|
|
3470
3536
|
label: string;
|
3471
3537
|
}
|
3472
3538
|
|
3473
|
-
type DoorSound = Brand<string, "CONFIG.Wall.doorSounds">;
|
3474
|
-
|
3475
3539
|
interface DoorSounds {
|
3476
|
-
[sound:
|
3540
|
+
[sound: Brand<string, "CONFIG.Wall.doorSounds">]: DoorSoundConfig;
|
3477
3541
|
|
3478
3542
|
/**
|
3479
3543
|
* @defaultValue
|
@@ -3796,10 +3860,8 @@ declare global {
|
|
3796
3860
|
duration: number;
|
3797
3861
|
}
|
3798
3862
|
|
3799
|
-
type DoorAnimation = Brand<string, "CONFIG.Wall.animationTypes">;
|
3800
|
-
|
3801
3863
|
interface DoorAnimations {
|
3802
|
-
[animationName:
|
3864
|
+
[animationName: Brand<string, "CONFIG.Wall.animationTypes">]: DoorAnimationConfig;
|
3803
3865
|
|
3804
3866
|
/**
|
3805
3867
|
* @defaultValue
|
@@ -3893,17 +3955,11 @@ interface SheetClassConfig {
|
|
3893
3955
|
label: string;
|
3894
3956
|
}
|
3895
3957
|
|
3896
|
-
|
3897
|
-
interface CanvasGroup extends PIXI.Container {
|
3898
|
-
sortableChildren: boolean;
|
3899
|
-
}
|
3958
|
+
declare const Mixed: canvasGroups.CanvasGroupMixin.AnyMixedConstructor;
|
3900
3959
|
|
3901
|
-
|
3902
|
-
|
3903
|
-
|
3904
|
-
|
3905
|
-
|
3906
|
-
* @remarks Can be undefined in some cases (e.g `EffectsCanvasGroup`) to prevent other groups using it as a parent
|
3907
|
-
*/
|
3908
|
-
groupName?: string | undefined;
|
3960
|
+
/**
|
3961
|
+
* @privateRemarks Used to enforce user-provided group classes taking no constructor arguments
|
3962
|
+
*/
|
3963
|
+
declare class MixedCanvasGroup extends Mixed {
|
3964
|
+
constructor();
|
3909
3965
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { AnyObject, InexactPartial, FixedInstanceType, EmptyObject, Identity
|
1
|
+
import type { AnyObject, InexactPartial, FixedInstanceType, EmptyObject, Identity } from "#utils";
|
2
2
|
import type { RollParseNode } from "./_types.d.mts";
|
3
3
|
import type DiceTerm from "./terms/dice.d.mts";
|
4
4
|
import type PoolTerm from "./terms/pool.d.mts";
|
@@ -500,14 +500,14 @@ declare class Roll<D extends AnyObject = EmptyObject> {
|
|
500
500
|
* @param data - Unpacked data representing the Roll
|
501
501
|
* @returns A reconstructed Roll instance
|
502
502
|
*/
|
503
|
-
static fromData<T extends Roll.AnyConstructor>(this: T, data: Roll.Data): FixedInstanceType<T>;
|
503
|
+
static fromData<T extends Roll.Internal.AnyConstructor>(this: T, data: Roll.Data): FixedInstanceType<T>;
|
504
504
|
|
505
505
|
/**
|
506
506
|
* Recreate a Roll instance using a provided JSON string
|
507
507
|
* @param json - Serialized JSON data representing the Roll
|
508
508
|
* @returns A reconstructed Roll instance
|
509
509
|
*/
|
510
|
-
static fromJSON<T extends Roll.AnyConstructor>(this: T, json: string): FixedInstanceType<T>;
|
510
|
+
static fromJSON<T extends Roll.Internal.AnyConstructor>(this: T, json: string): FixedInstanceType<T>;
|
511
511
|
|
512
512
|
/**
|
513
513
|
* Manually construct a Roll object by providing an explicit set of input terms
|
@@ -524,7 +524,7 @@ declare class Roll<D extends AnyObject = EmptyObject> {
|
|
524
524
|
* roll.formula; // 4d8 + 8
|
525
525
|
* ```
|
526
526
|
*/
|
527
|
-
static fromTerms<T extends Roll.AnyConstructor>(
|
527
|
+
static fromTerms<T extends Roll.Internal.AnyConstructor>(
|
528
528
|
this: T,
|
529
529
|
terms: RollTerm[],
|
530
530
|
options?: Roll.Options,
|
@@ -532,10 +532,21 @@ declare class Roll<D extends AnyObject = EmptyObject> {
|
|
532
532
|
}
|
533
533
|
|
534
534
|
declare namespace Roll {
|
535
|
-
|
536
|
-
|
535
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode Implementation} instead */
|
536
|
+
type Any = Internal.Any;
|
537
537
|
|
538
|
-
|
538
|
+
/** @deprecated There should only be a single implementation of this class in use at one time, use {@linkcode ImplementationClass} instead */
|
539
|
+
type AnyConstructor = Internal.AnyConstructor;
|
540
|
+
|
541
|
+
namespace Internal {
|
542
|
+
interface Any extends AnyRoll {}
|
543
|
+
interface AnyConstructor extends Identity<typeof AnyRoll> {}
|
544
|
+
}
|
545
|
+
|
546
|
+
/** @deprecated Use {@linkcode foundry.dice.Roll.Mode} instead */
|
547
|
+
type ConfiguredRollModes = Mode;
|
548
|
+
|
549
|
+
type Mode = keyof CONFIG.Dice.RollModes;
|
539
550
|
|
540
551
|
// TODO: Make this actually configurable
|
541
552
|
interface ImplementationClass extends Identity<CONFIG["Dice"]["rolls"][0]> {}
|
@@ -378,7 +378,7 @@ declare namespace ChatMessage {
|
|
378
378
|
/** Options passed along in Create operations for ChatMessages */
|
379
379
|
interface Create<Temporary extends boolean | undefined = boolean | undefined>
|
380
380
|
extends foundry.abstract.types.DatabaseCreateOperation<ChatMessage.CreateData, ChatMessage.Parent, Temporary> {
|
381
|
-
rollMode?: foundry.dice.Roll.
|
381
|
+
rollMode?: foundry.dice.Roll.Mode;
|
382
382
|
chatBubble?: boolean;
|
383
383
|
}
|
384
384
|
|
@@ -621,7 +621,7 @@ declare namespace ChatMessage {
|
|
621
621
|
}
|
622
622
|
|
623
623
|
/** @remarks `"roll"` means "use the current rollMode" */
|
624
|
-
type PassableRollMode = foundry.dice.Roll.
|
624
|
+
type PassableRollMode = foundry.dice.Roll.Mode | "roll";
|
625
625
|
|
626
626
|
/**
|
627
627
|
* These keys are overridden in `ChatMessage#renderHTML`
|