@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250901070747 → 13.346.0-beta.20250901211521
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/ui/hotbar.d.mts +7 -0
- package/src/foundry/client/documents/abstract/client-document.d.mts +1 -0
- package/src/foundry/client/documents/collections/compendium-collection.d.mts +16 -17
- package/src/foundry/client/documents/scene.d.mts +18 -18
- package/src/foundry/common/packages/base-package.d.mts +2 -3
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.20250901211521",
|
5
5
|
"description": "TypeScript type definitions for Foundry VTT",
|
6
6
|
"type": "module",
|
7
7
|
"types": "./src/index.d.mts",
|
@@ -57,6 +57,13 @@ declare class Hotbar<
|
|
57
57
|
*/
|
58
58
|
protected _getContextMenuOptions(): foundry.applications.ux.ContextMenu.Entry<HTMLElement>[];
|
59
59
|
|
60
|
+
/**
|
61
|
+
* Update the presented state of toggle buttons.
|
62
|
+
* @internal
|
63
|
+
* @remarks Called externally in {@linkcode foundry.applications.sidebar.tabs.PlaylistDirectory._onGlobalVolume | PlaylistDirectory#_onGlobalVolume}
|
64
|
+
*/
|
65
|
+
_updateToggles(): void;
|
66
|
+
|
60
67
|
/**
|
61
68
|
* Change to a specific numbered page from 1 to 5
|
62
69
|
* @param page - The page number to change to
|
@@ -635,6 +635,7 @@ declare global {
|
|
635
635
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
636
636
|
> = _ToCompendiumReturnType<DocumentName, Coalesce<Options, {}>>;
|
637
637
|
|
638
|
+
// TODO: `ownership` and the `_stats` sources are recursively removed from descendent document sources, not just the top level
|
638
639
|
type _ToCompendiumReturnType<DocumentName extends Document.Type, Options extends ToCompendiumOptions> = _ClearFog<
|
639
640
|
Options["clearState"],
|
640
641
|
_ClearStats<
|
@@ -53,7 +53,7 @@ declare class CompendiumCollection<
|
|
53
53
|
|
54
54
|
/**
|
55
55
|
* A reference to the Application class which provides an interface to interact with this compendium content.
|
56
|
-
* @defaultValue
|
56
|
+
* @defaultValue {@linkcode foundry.applications.sidebar.apps.Compendium}
|
57
57
|
*/
|
58
58
|
applicationClass: Application.AnyConstructor | ApplicationV2.AnyConstructor;
|
59
59
|
|
@@ -97,6 +97,7 @@ declare class CompendiumCollection<
|
|
97
97
|
|
98
98
|
/**
|
99
99
|
* The visibility configuration of this compendium pack.
|
100
|
+
* @remarks Foundry wants this to be {@linkcode CompendiumCollection.OwnershipData} (omitting the `NONE` key), but due to {@link https://github.com/foundryvtt/foundryvtt/issues/13354} it's not
|
100
101
|
*/
|
101
102
|
get ownership(): BasePackage.OwnershipRecord;
|
102
103
|
|
@@ -272,9 +273,6 @@ declare class CompendiumCollection<
|
|
272
273
|
*/
|
273
274
|
configure(configuration?: CompendiumCollection.Configuration): Promise<void>;
|
274
275
|
|
275
|
-
/** @deprecated The `ownership` key is currently non-functional, see {@link https://github.com/foundryvtt/foundryvtt/issues/13283} */
|
276
|
-
configure(configuration: CompendiumCollection.ConfigurationBroken): Promise<void>;
|
277
|
-
|
278
276
|
/**
|
279
277
|
* Delete an existing world-level Compendium Collection.
|
280
278
|
* This action may only be performed for world-level packs by a Gamemaster User.
|
@@ -313,6 +311,16 @@ declare namespace CompendiumCollection {
|
|
313
311
|
|
314
312
|
type DocumentName = CONST.COMPENDIUM_DOCUMENT_TYPES;
|
315
313
|
|
314
|
+
/** @internal */
|
315
|
+
type _OwnershipChoices = (keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS)[];
|
316
|
+
|
317
|
+
interface OwnershipFieldSchema extends fields.DataSchema {
|
318
|
+
GAMEMASTER: fields.StringField<{ required: true; choices: ["OWNER"]; initial: "OWNER" }>;
|
319
|
+
ASSISTANT: fields.StringField<{ required: true; choices: _OwnershipChoices; initial: "OWNER" }>;
|
320
|
+
TRUSTED: fields.StringField<{ required: true; choices: _OwnershipChoices; initial: "INHERIT" }>;
|
321
|
+
PLAYER: fields.StringField<{ required: true; choices: _OwnershipChoices; initial: "INHERIT" }>;
|
322
|
+
}
|
323
|
+
|
316
324
|
interface ConfigSettingElementSchema extends fields.DataSchema {
|
317
325
|
/**
|
318
326
|
* @defaultValue `undefined`
|
@@ -338,7 +346,7 @@ declare namespace CompendiumCollection {
|
|
338
346
|
/** @remarks Is the compendium edit lock engaged? */
|
339
347
|
locked: fields.BooleanField<{ required: false; initial: undefined }>;
|
340
348
|
|
341
|
-
|
349
|
+
ownership: fields.SchemaField<OwnershipFieldSchema, { required: false; initial: undefined }>;
|
342
350
|
}
|
343
351
|
|
344
352
|
interface StoredConfiguration extends fields.SchemaField.InitializedData<ConfigSettingElementSchema> {}
|
@@ -346,18 +354,6 @@ declare namespace CompendiumCollection {
|
|
346
354
|
/** @remarks The partial'd interface for passing to {@linkcode CompendiumCollection.configure}, if you want the stored interface see {@linkcode CompendiumCollection.StoredConfiguration} */
|
347
355
|
interface Configuration extends InexactPartial<StoredConfiguration> {}
|
348
356
|
|
349
|
-
/** @internal */
|
350
|
-
type _Ownership = InexactPartial<{
|
351
|
-
/**
|
352
|
-
* @deprecated As of 13.347, an implementation change has rendered this key (presumably temporarily) non-functional
|
353
|
-
* (see {@link https://github.com/foundryvtt/foundryvtt/issues/13283}).
|
354
|
-
*/
|
355
|
-
ownership: foundry.packages.BasePackage.OwnershipRecord;
|
356
|
-
}>;
|
357
|
-
|
358
|
-
/** @privateRemarks See {@linkcode _Ownership.ownership} */
|
359
|
-
interface ConfigurationBroken extends Configuration, _Ownership {}
|
360
|
-
|
361
357
|
type SettingFieldElement = fields.SchemaField<ConfigSettingElementSchema>;
|
362
358
|
|
363
359
|
type SettingField = fields.TypedObjectField<SettingFieldElement>;
|
@@ -365,6 +361,9 @@ declare namespace CompendiumCollection {
|
|
365
361
|
interface SettingData
|
366
362
|
extends fields.TypedObjectField.InitializedType<SettingFieldElement, fields.TypedObjectField.DefaultOptions> {}
|
367
363
|
|
364
|
+
/** @remarks Currently unused due to {@link https://github.com/foundryvtt/foundryvtt/issues/13354} */
|
365
|
+
type OwnershipData = NonNullable<SettingData["ownership"]>;
|
366
|
+
|
368
367
|
// The type that's passed to `createCompendium`.
|
369
368
|
interface CreateCompendiumMetadata<Type extends DocumentName> {
|
370
369
|
type: Type;
|
@@ -699,7 +699,7 @@ declare namespace Scene {
|
|
699
699
|
|
700
700
|
interface EnvironmentSchema extends DataSchema {
|
701
701
|
/**
|
702
|
-
* The
|
702
|
+
* The ambient darkness level in this Scene, where 0 represents midday (maximum illumination) and 1 represents midnight (maximum darkness)
|
703
703
|
* @defaultValue `0`
|
704
704
|
*/
|
705
705
|
darknessLevel: fields.AlphaField<{ initial: 0 }>;
|
@@ -721,64 +721,64 @@ declare namespace Scene {
|
|
721
721
|
enabled: fields.BooleanField<{ required: true; initial: false }>;
|
722
722
|
|
723
723
|
/**
|
724
|
-
* @see {@linkcode
|
725
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
724
|
+
* @see {@linkcode LightData.Schema.alpha}
|
725
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
726
726
|
*/
|
727
727
|
alpha: LightData.Schema["alpha"];
|
728
728
|
|
729
729
|
/**
|
730
730
|
* Is the global light in bright mode?
|
731
731
|
* @defaultValue `false`
|
732
|
-
* @remarks This is `boolean` here instead {@linkcode
|
732
|
+
* @remarks This is `boolean` here instead {@linkcode LightData} schema's `number`, because the global light has infinite range
|
733
733
|
*/
|
734
734
|
bright: fields.BooleanField<{ required: true; initial: false }>;
|
735
735
|
|
736
736
|
/**
|
737
|
-
* @see {@linkcode
|
738
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
737
|
+
* @see {@linkcode LightData.Schema.color}
|
738
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
739
739
|
*/
|
740
740
|
color: LightData.Schema["color"];
|
741
741
|
|
742
742
|
/**
|
743
|
-
* @see {@linkcode
|
744
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
743
|
+
* @see {@linkcode LightData.Schema.coloration}
|
744
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
745
745
|
*/
|
746
746
|
coloration: LightData.Schema["coloration"];
|
747
747
|
|
748
748
|
/**
|
749
749
|
* The luminosity applied in the shader
|
750
750
|
* @defaultValue `0`
|
751
|
-
* @remarks Doesn't pull from the {@linkcode
|
751
|
+
* @remarks Doesn't pull from the {@linkcode LightData} schema, unlike its siblings, as it has a different `initial`
|
752
752
|
*/
|
753
753
|
luminosity: fields.NumberField<{ required: true; nullable: false; initial: 0; min: 0; max: 1 }>;
|
754
754
|
|
755
755
|
/**
|
756
|
-
* @see {@linkcode
|
757
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
756
|
+
* @see {@linkcode LightData.Schema.saturation}
|
757
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
758
758
|
*/
|
759
759
|
saturation: LightData.Schema["saturation"];
|
760
760
|
|
761
761
|
/**
|
762
|
-
* @see {@linkcode
|
763
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
762
|
+
* @see {@linkcode LightData.Schema.contrast}
|
763
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
764
764
|
*/
|
765
765
|
contrast: LightData.Schema["contrast"];
|
766
766
|
|
767
767
|
/**
|
768
|
-
* @see {@linkcode
|
769
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
768
|
+
* @see {@linkcode LightData.Schema.shadows}
|
769
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
770
770
|
*/
|
771
771
|
shadows: LightData.Schema["shadows"];
|
772
772
|
|
773
773
|
/**
|
774
|
-
* @see {@linkcode
|
775
|
-
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode
|
774
|
+
* @see {@linkcode LightData.Schema.darkness}
|
775
|
+
* @privateRemarks The field is defined in Foundry by pulling from the {@linkcode LightData} schema
|
776
776
|
*/
|
777
777
|
darkness: LightData.Schema["darkness"];
|
778
778
|
}>;
|
779
779
|
|
780
780
|
/**
|
781
|
-
* If cycling between
|
781
|
+
* If cycling between {@linkcode base} and {@linkcode dark} is activated.
|
782
782
|
* @defaultValue `true`
|
783
783
|
*/
|
784
784
|
cycle: fields.BooleanField<{ initial: true }>;
|
@@ -83,9 +83,8 @@ declare namespace BasePackage {
|
|
83
83
|
flags: fields.ObjectField;
|
84
84
|
}
|
85
85
|
|
86
|
-
type OwnershipRecord =
|
87
|
-
keyof typeof CONST.USER_ROLES,
|
88
|
-
keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS | undefined
|
86
|
+
type OwnershipRecord = InexactPartial<
|
87
|
+
Record<keyof typeof CONST.USER_ROLES, keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS>
|
89
88
|
>;
|
90
89
|
|
91
90
|
interface PackageCompendiumSchema extends DataSchema {
|