@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250704115832 → 13.346.0-beta.20250705014143
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/foundry/client/applications/dice/roll-resolver.d.mts +2 -2
- package/src/foundry/client/canvas/layers/base/placeables-layer.d.mts +2 -13
- package/src/foundry/client/canvas/layers/tokens.d.mts +0 -6
- package/src/foundry/client/canvas/layers/walls.d.mts +0 -7
- package/src/foundry/client/documents/abstract/world-collection.d.mts +12 -9
- package/src/foundry/client/documents/actor.d.mts +1 -1
- package/src/foundry/client/documents/cards.d.mts +7 -1
- package/src/foundry/client/documents/token.d.mts +1 -1
- package/src/foundry/common/abstract/document.d.mts +5 -1
- package/src/foundry/common/data/fields.d.mts +3 -3
- package/src/foundry/common/documents/journal-entry-page.d.mts +2 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
3
3
|
"name": "@league-of-foundry-developers/foundry-vtt-types",
|
4
|
-
"version": "13.346.0-beta.
|
4
|
+
"version": "13.346.0-beta.20250705014143",
|
5
5
|
"description": "TypeScript type definitions for Foundry VTT",
|
6
6
|
"type": "module",
|
7
7
|
"types": "./src/index.d.mts",
|
@@ -308,19 +308,8 @@ declare class PlaceablesLayer<out DocumentName extends PlaceablesLayer.DocumentN
|
|
308
308
|
options?: PlaceablesLayer.PasteOptions, // not:null (destructured)
|
309
309
|
): Promise<Document.ImplementationFor<DocumentName>[]>;
|
310
310
|
|
311
|
-
/**
|
312
|
-
|
313
|
-
* Called by {@link PlaceablesLayer.pasteObjects | `PlaceablesLayer#pasteObjects`} for each copied object.
|
314
|
-
* @param copy - The copied object that is pasted
|
315
|
-
* @param offset - The offset relative from the current position to the destination
|
316
|
-
* @param options - Options of {@link PlaceablesLayer.pasteObjects | `PlaceablesLayer#pasteObjects`}
|
317
|
-
* @returns The update data
|
318
|
-
*/
|
319
|
-
protected _pasteObject(
|
320
|
-
copy: Document.ObjectFor<DocumentName>,
|
321
|
-
offset: Canvas.Point,
|
322
|
-
options?: PlaceablesLayer.PasteOptions, // not:null (destructured)
|
323
|
-
): Omit<Document.ImplementationFor<DocumentName>["_source"], "_id">;
|
311
|
+
/** @deprecated Foundry deleted this method in v13 (this warning will be removed in v14) */
|
312
|
+
protected _pasteObject(copy: never, offset: never, options?: never): never;
|
324
313
|
|
325
314
|
/**
|
326
315
|
* Select all PlaceableObject instances which fall within a coordinate rectangle.
|
@@ -78,12 +78,6 @@ declare class TokenLayer extends PlaceablesLayer<"Token"> {
|
|
78
78
|
|
79
79
|
protected override _deactivate(): void;
|
80
80
|
|
81
|
-
protected override _pasteObject(
|
82
|
-
copy: Token.Implementation,
|
83
|
-
offset: Canvas.Point,
|
84
|
-
options?: PlaceablesLayer.PasteOptions, // not:null (destructured)
|
85
|
-
): Omit<TokenDocument.Source, "_id">;
|
86
|
-
|
87
81
|
/** @remarks Returns `[]` if the ruler is currently measuring */
|
88
82
|
protected override _getMovableObjects(ids?: string[] | null, includeLocked?: boolean | null): Token.Implementation[];
|
89
83
|
|
@@ -90,13 +90,6 @@ declare class WallsLayer extends PlaceablesLayer<"Wall"> {
|
|
90
90
|
|
91
91
|
override releaseAll(options?: PlaceableObject.ReleaseOptions): number;
|
92
92
|
|
93
|
-
/** @remarks `options` is unused */
|
94
|
-
protected override _pasteObject(
|
95
|
-
copy: Wall.Implementation,
|
96
|
-
offset: Canvas.Point,
|
97
|
-
options?: PlaceablesLayer.PasteOptions | null,
|
98
|
-
): Omit<WallDocument.Source, "_id">;
|
99
|
-
|
100
93
|
/**
|
101
94
|
* Pan the canvas view when the cursor position gets close to the edge of the frame
|
102
95
|
* @param event - The originating mouse movement event
|
@@ -32,15 +32,7 @@ declare abstract class WorldCollection<
|
|
32
32
|
* In the case where `Lowercase<Name>` is not a property of {@linkcode ui}, this actually always returns `undefined`,
|
33
33
|
* but {@linkcode RollTables} overrides this, so we need to allow a wider return type.
|
34
34
|
*/
|
35
|
-
get directory():
|
36
|
-
? (typeof ui)[Lowercase<Name>]
|
37
|
-
:
|
38
|
-
| (DocumentName extends foundry.CONST.FOLDER_DOCUMENT_TYPES
|
39
|
-
? DocumentDirectory<Document.ImplementationClassFor<DocumentName>>
|
40
|
-
: never)
|
41
|
-
| AbstractSidebarTab.Any
|
42
|
-
| undefined
|
43
|
-
| null;
|
35
|
+
get directory(): WorldCollection.Directory<DocumentName, Name>;
|
44
36
|
|
45
37
|
/**
|
46
38
|
* Return a reference to the singleton instance of this WorldCollection, or null if it has not yet been created.
|
@@ -139,6 +131,17 @@ declare namespace WorldCollection {
|
|
139
131
|
DocumentName extends Folder.DocumentType ? Folder.Stored<DocumentName> : never
|
140
132
|
>;
|
141
133
|
|
134
|
+
type Directory<DocumentName extends Document.WorldType, Name extends string> =
|
135
|
+
Lowercase<Name> extends keyof typeof ui
|
136
|
+
? (typeof ui)[Lowercase<Name>]
|
137
|
+
:
|
138
|
+
| (DocumentName extends foundry.CONST.FOLDER_DOCUMENT_TYPES
|
139
|
+
? DocumentDirectory<Document.ImplementationClassFor<DocumentName>>
|
140
|
+
: never)
|
141
|
+
| AbstractSidebarTab.Any
|
142
|
+
| undefined
|
143
|
+
| null;
|
144
|
+
|
142
145
|
interface FromCompendiumOptions {
|
143
146
|
/**
|
144
147
|
* Clear the currently assigned folder
|
@@ -708,7 +708,7 @@ declare class Actor<out SubType extends Actor.SubType = Actor.SubType> extends f
|
|
708
708
|
/**
|
709
709
|
* Provide a thumbnail image path used to represent this document.
|
710
710
|
*/
|
711
|
-
get thumbnail(): string;
|
711
|
+
get thumbnail(): string | null;
|
712
712
|
|
713
713
|
/**
|
714
714
|
* A convenience getter to an object that organizes all embedded Item instances by subtype. The object is cached and
|
@@ -686,7 +686,13 @@ declare namespace Cards {
|
|
686
686
|
* which wouldn't make sense to change, then passes that to {@link Cards.pass | `Cards#pass`}
|
687
687
|
* @privateRemarks `action` omitted as it's already provided.
|
688
688
|
*/
|
689
|
-
interface DrawOptions extends _HowOption, Omit<PassOptions, "action"> {
|
689
|
+
interface DrawOptions extends _HowOption, Omit<PassOptions, "action"> {
|
690
|
+
/**
|
691
|
+
* @deprecated While passing `action` is technically valid, it's unclear why this would ever be done.
|
692
|
+
* If you need to do this call `this.parent.pass` directly.
|
693
|
+
*/
|
694
|
+
action?: never;
|
695
|
+
}
|
690
696
|
|
691
697
|
interface ShuffleOptions extends _UpdateDataOption, _ChatNotificationOption {}
|
692
698
|
|
@@ -1562,7 +1562,7 @@ declare class TokenDocument extends BaseToken.Internal.CanvasDocument {
|
|
1562
1562
|
/**
|
1563
1563
|
* The movement history
|
1564
1564
|
*/
|
1565
|
-
get movementHistory(): TokenDocument.MeasuredMovementWaypoint;
|
1565
|
+
get movementHistory(): TokenDocument.MeasuredMovementWaypoint[];
|
1566
1566
|
|
1567
1567
|
/**
|
1568
1568
|
* Check if the document has a distinct subject texture (inferred or explicit).
|
@@ -1158,12 +1158,14 @@ declare namespace Document {
|
|
1158
1158
|
| (SubType extends ModuleSubType | "base" ? UnknownSystem : never);
|
1159
1159
|
|
1160
1160
|
// TODO(LukeAbby): Improve the type display with a helper here.
|
1161
|
+
// TODO(LukeAbby): Add `StoredSource` for a better type display there.
|
1161
1162
|
type Stored<D extends Document.Any> = Override<
|
1162
1163
|
D,
|
1163
1164
|
{
|
1164
1165
|
id: string;
|
1165
1166
|
_id: string;
|
1166
1167
|
_source: Override<D["_source"], { _id: string }>;
|
1168
|
+
toJSON(): Override<D["_source"], { _id: string }>;
|
1167
1169
|
}
|
1168
1170
|
>;
|
1169
1171
|
|
@@ -1419,7 +1421,9 @@ declare namespace Document {
|
|
1419
1421
|
type MetadataFor<Name extends Document.Type> = ConfiguredMetadata[Name];
|
1420
1422
|
|
1421
1423
|
type CollectionRecord<Schema extends DataSchema> = {
|
1422
|
-
[Key in keyof Schema]: Schema[Key] extends EmbeddedCollectionField.Any
|
1424
|
+
[Key in keyof Schema]: Schema[Key] extends EmbeddedCollectionField.Any
|
1425
|
+
? NonNullable<Schema[Key][" __fvtt_types_internal_initialized_data"]>
|
1426
|
+
: never;
|
1423
1427
|
};
|
1424
1428
|
|
1425
1429
|
type Flags<ConcreteDocument extends Internal.Instance.Any> = OptionsForSchema<SchemaFor<ConcreteDocument>>;
|
@@ -1305,10 +1305,10 @@ declare namespace SchemaField {
|
|
1305
1305
|
declare class BooleanField<
|
1306
1306
|
const Options extends BooleanField.Options = BooleanField.DefaultOptions,
|
1307
1307
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
1308
|
-
const AssignmentType = BooleanField.AssignmentType<SimpleMerge<
|
1309
|
-
const InitializedType = BooleanField.InitializedType<SimpleMerge<
|
1308
|
+
const AssignmentType = BooleanField.AssignmentType<SimpleMerge<BooleanField.DefaultOptions, Options>>,
|
1309
|
+
const InitializedType = BooleanField.InitializedType<SimpleMerge<BooleanField.DefaultOptions, Options>>,
|
1310
1310
|
const PersistedType extends boolean | null | undefined = BooleanField.InitializedType<
|
1311
|
-
SimpleMerge<
|
1311
|
+
SimpleMerge<BooleanField.DefaultOptions, Options>
|
1312
1312
|
>,
|
1313
1313
|
> extends DataField<Options, AssignmentType, InitializedType, PersistedType> {
|
1314
1314
|
/** @defaultValue `true` */
|