@league-of-foundry-developers/foundry-vtt-types 9.238.0 → 9.249.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.
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +21 -21
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +2 -4
- package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +37 -37
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +7 -0
- package/src/foundry/foundry.js/application.d.ts +138 -110
- package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
- package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
- package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
- package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
- package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
- package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +1 -1
- package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
- package/src/foundry/foundry.js/canvas.d.ts +5 -0
- package/src/foundry/foundry.js/canvasAnimation.d.ts +30 -7
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -18
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -44
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +14 -17
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
- package/src/foundry/foundry.js/clientKeybindings.d.ts +12 -2
- package/src/foundry/foundry.js/clientSettings.d.ts +2 -2
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
- package/src/foundry/foundry.js/config.d.ts +38 -36
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/game.d.ts +89 -43
- package/src/foundry/foundry.js/hooks.d.ts +154 -85
- package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
- package/src/foundry/foundry.js/keyboardManager.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
- package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +396 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
- package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
- package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
- package/src/foundry/foundry.js/pointSource.d.ts +59 -328
- package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
- package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
- package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
- package/src/foundry/foundry.js/ray.d.ts +156 -162
- package/src/foundry/foundry.js/rays/index.d.ts +1 -0
- package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
- package/src/foundry/foundry.js/roll.d.ts +40 -43
- package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
- package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
- package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
- package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
- package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
- package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
- package/src/foundry/index.d.ts +26 -27
- package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardIlluminationShader.d.ts +0 -22
package/README.md
CHANGED
@@ -17,7 +17,7 @@ TypeScript type definitions for [Foundry Virtual Tabletop](https://foundryvtt.co
|
|
17
17
|
|
18
18
|
We aim to support the latest release of each Foundry VTT version (0.7, 0.8, 9, etc.), starting with 0.7.
|
19
19
|
|
20
|
-
At the moment, both version 0.7 and 0.8 are supported.
|
20
|
+
At the moment, both version 0.7 and 0.8 are fully supported. Version 9 is already partially supported, but there is still a lot to be done. See https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues?q=is%3Aopen+is%3Aissue+label%3A%22foundry+V9%22 to keep track of the progress.
|
21
21
|
|
22
22
|
|
23
23
|
## Installation
|
@@ -36,10 +36,10 @@ In order to install a specific version run
|
|
36
36
|
npm install --save-dev @league-of-foundry-developers/foundry-vtt-types@<version>
|
37
37
|
```
|
38
38
|
|
39
|
-
For example, to install version `
|
39
|
+
For example, to install version `9.238.0`, run
|
40
40
|
|
41
41
|
```sh
|
42
|
-
npm install --save-dev @league-of-foundry-developers/foundry-vtt-types@
|
42
|
+
npm install --save-dev @league-of-foundry-developers/foundry-vtt-types@9.238.0
|
43
43
|
```
|
44
44
|
|
45
45
|
You can then update foundry-vtt-types using the regular update mechanism for npm
|
package/package.json
CHANGED
@@ -721,6 +721,7 @@ export type WALL_DOOR_STATES = ValueOf<typeof WALL_DOOR_STATES>;
|
|
721
721
|
* The wall properties which restrict the way interaction occurs with a specific wall
|
722
722
|
*/
|
723
723
|
export const WALL_RESTRICTION_TYPES: readonly ['light', 'sight', 'sound', 'move'];
|
724
|
+
export type WALL_RESTRICTION_TYPES = ValueOf<typeof WALL_RESTRICTION_TYPES>;
|
724
725
|
|
725
726
|
/**
|
726
727
|
* The types of sensory collision which a Wall may impose
|
@@ -2,16 +2,16 @@ import type { PropertiesToSource } from '../../../../types/helperTypes.js';
|
|
2
2
|
import type DocumentData from '../../abstract/data.mjs';
|
3
3
|
import { AnyDocumentData } from '../../abstract/data.mjs';
|
4
4
|
import * as fields from '../fields.mjs';
|
5
|
-
import type { ActorData } from './actorData.js';
|
6
|
-
import type { CardsData } from './cardsData.js';
|
7
|
-
import type { CombatData } from './combatData.js';
|
8
|
-
import type { FolderData } from './folderData.js';
|
9
|
-
import type { ItemData } from './itemData.js';
|
10
|
-
import type { JournalEntryData } from './journalEntryData.js';
|
11
|
-
import type { MacroData } from './macroData.js';
|
12
|
-
import type { PlaylistData } from './playlistData.js';
|
13
|
-
import type { RollTableData } from './rollTableData.js';
|
14
|
-
import type { SceneData } from './sceneData.js';
|
5
|
+
import type { ActorData, ActorDataConstructorData } from './actorData.js';
|
6
|
+
import type { CardsData, CardsDataConstructorData } from './cardsData.js';
|
7
|
+
import type { CombatData, CombatDataConstructorData } from './combatData.js';
|
8
|
+
import type { FolderData, FolderDataConstructorData } from './folderData.js';
|
9
|
+
import type { ItemData, ItemDataConstructorData } from './itemData.js';
|
10
|
+
import type { JournalEntryData, JournalEntryDataConstructorData } from './journalEntryData.js';
|
11
|
+
import type { MacroData, MacroDataConstructorData } from './macroData.js';
|
12
|
+
import type { PlaylistData, PlaylistDataConstructorData } from './playlistData.js';
|
13
|
+
import type { RollTableData, RollTableDataConstructorData } from './rollTableData.js';
|
14
|
+
import type { SceneData, SceneDataConstructorData } from './sceneData.js';
|
15
15
|
|
16
16
|
interface AdventureDataSchema extends DocumentSchema {
|
17
17
|
_id: fields.DocumentId;
|
@@ -92,34 +92,34 @@ interface AdventureDataConstructorData {
|
|
92
92
|
description?: string | null | undefined;
|
93
93
|
|
94
94
|
/** @defaultValue `[]` */
|
95
|
-
actors?:
|
95
|
+
actors?: ActorDataConstructorData[] | null | undefined;
|
96
96
|
|
97
97
|
/** @defaultValue `[]` */
|
98
|
-
combats?:
|
98
|
+
combats?: CombatDataConstructorData[] | null | undefined;
|
99
99
|
|
100
100
|
/** @defaultValue `[]` */
|
101
|
-
items?:
|
101
|
+
items?: ItemDataConstructorData[] | null | undefined;
|
102
102
|
|
103
103
|
/** @defaultValue `[]` */
|
104
|
-
scenes?:
|
104
|
+
scenes?: SceneDataConstructorData[] | null | undefined;
|
105
105
|
|
106
106
|
/** @defaultValue `[]` */
|
107
|
-
journal?:
|
107
|
+
journal?: JournalEntryDataConstructorData[] | null | undefined;
|
108
108
|
|
109
109
|
/** @defaultValue `[]` */
|
110
|
-
tables?:
|
110
|
+
tables?: RollTableDataConstructorData[] | null | undefined;
|
111
111
|
|
112
112
|
/** @defaultValue `[]` */
|
113
|
-
macros?:
|
113
|
+
macros?: MacroDataConstructorData[] | null | undefined;
|
114
114
|
|
115
115
|
/** @defaultValue `[]` */
|
116
|
-
cards?:
|
116
|
+
cards?: CardsDataConstructorData[] | null | undefined;
|
117
117
|
|
118
118
|
/** @defaultValue `[]` */
|
119
|
-
playlists?:
|
119
|
+
playlists?: PlaylistDataConstructorData[] | null | undefined;
|
120
120
|
|
121
121
|
/** @defaultValue `[]` */
|
122
|
-
folders?:
|
122
|
+
folders?: FolderDataConstructorData[] | null | undefined;
|
123
123
|
|
124
124
|
/** @defaultValue `0` */
|
125
125
|
sort?: number | null | undefined;
|
@@ -155,7 +155,7 @@ export class AdventureData extends DocumentData<
|
|
155
155
|
|
156
156
|
/**
|
157
157
|
* Property type: `D[]`
|
158
|
-
* Constructor type: `D[] | null | undefined`
|
158
|
+
* Constructor type: `ConstructorDataType<D>[] | null | undefined`
|
159
159
|
* Default: `[]`
|
160
160
|
*/
|
161
161
|
type AdventureDocumentsField<D extends ConstructorOf<AnyDocumentData>> = DocumentField<D> & {
|
@@ -62,7 +62,7 @@ interface JournalEntryDataProperties {
|
|
62
62
|
flags: ConfiguredFlags<'JournalEntry'>;
|
63
63
|
}
|
64
64
|
|
65
|
-
interface
|
65
|
+
interface JournalEntryDataConstructorData {
|
66
66
|
/**
|
67
67
|
* The _id which uniquely identifies this JournalEntry document
|
68
68
|
* @defaultValue `null`
|
@@ -118,10 +118,10 @@ export class JournalEntryData extends DocumentData<
|
|
118
118
|
JournalEntryDataSchema,
|
119
119
|
JournalEntryDataProperties,
|
120
120
|
PropertiesToSource<JournalEntryDataProperties>,
|
121
|
-
|
121
|
+
JournalEntryDataConstructorData,
|
122
122
|
documents.BaseJournalEntry
|
123
123
|
> {
|
124
|
-
constructor(data:
|
124
|
+
constructor(data: JournalEntryDataConstructorData, document?: documents.BaseJournalEntry | null);
|
125
125
|
|
126
126
|
/** @override */
|
127
127
|
static defineSchema(): JournalEntryDataSchema;
|
@@ -63,9 +63,13 @@ interface UserDataProperties {
|
|
63
63
|
/** The user's name. */
|
64
64
|
name: string;
|
65
65
|
|
66
|
-
/**
|
66
|
+
/**
|
67
|
+
* The user's password. Available only on the Server side for security.
|
68
|
+
* @defaultValue `""`
|
69
|
+
*/
|
67
70
|
password: string;
|
68
71
|
|
72
|
+
/** The user's password salt. Available only on the Server side for security. */
|
69
73
|
passwordSalt: string | undefined;
|
70
74
|
|
71
75
|
/**
|
@@ -113,9 +117,12 @@ interface UserDataConstructorData {
|
|
113
117
|
/** The user's name. */
|
114
118
|
name: string;
|
115
119
|
|
116
|
-
/**
|
117
|
-
|
120
|
+
/**
|
121
|
+
* The user's password. Available only on the Server side for security.
|
122
|
+
* @defaultValue `""`
|
123
|
+
*/ password?: string | null | undefined;
|
118
124
|
|
125
|
+
/** The user's password salt. Available only on the Server side for security. */
|
119
126
|
passwordSalt?: string | null | undefined;
|
120
127
|
|
121
128
|
/**
|
@@ -26,7 +26,7 @@ export declare class BaseCombatant extends Document<
|
|
26
26
|
isEmbedded: true;
|
27
27
|
labelPlural: 'DOCUMENT.Combatants';
|
28
28
|
permissions: {
|
29
|
-
create:
|
29
|
+
create: typeof BaseCombatant._canCreate;
|
30
30
|
update: typeof BaseCombatant._canUpdate;
|
31
31
|
};
|
32
32
|
}
|
@@ -38,8 +38,6 @@ export declare class BaseCombatant extends Document<
|
|
38
38
|
*/
|
39
39
|
protected static _canUpdate(user: BaseUser, doc: BaseCombatant, data?: CombatantDataConstructorData): boolean;
|
40
40
|
|
41
|
-
/**
|
42
|
-
* Is a user able to create this Combatant?
|
43
|
-
*/
|
41
|
+
/** Is a user able to create this Combatant? */
|
44
42
|
protected static _canCreate(user: BaseUser, doc: BaseCombatant, data?: CombatantDataConstructorData): boolean;
|
45
43
|
}
|
@@ -0,0 +1,148 @@
|
|
1
|
+
/**
|
2
|
+
* Determine the relative orientation of three points in two-dimensional space.
|
3
|
+
* The result is also an approximation of twice the signed area of the triangle defined by the three points.
|
4
|
+
* This method is fast - but not robust against issues of floating point precision. Best used with integer coordinates.
|
5
|
+
* Adapted from https://github.com/mourner/robust-predicates
|
6
|
+
*
|
7
|
+
* @param a - An endpoint of segment AB, relative to which point C is tested
|
8
|
+
* @param b - An endpoint of segment AB, relative to which point C is tested
|
9
|
+
* @param c - A point that is tested relative to segment AB
|
10
|
+
*
|
11
|
+
* @returns The relative orientation of points A, B, and C
|
12
|
+
* A positive value if the points are in counter-clockwise order (C lies to the left of AB)
|
13
|
+
* A negative value if the points are in clockwise order (C lies to the right of AB)
|
14
|
+
* Zero if the points A, B, and C are collinear.
|
15
|
+
*/
|
16
|
+
export function orient2dFast(a: Point, b: Point, c: Point): number;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Quickly test whether the line segment AB intersects with the line segment CD.
|
20
|
+
* This method does not determine the point of intersection, for that use lineLineIntersection
|
21
|
+
*
|
22
|
+
* @param a - The first endpoint of segment AB
|
23
|
+
* @param b - The second endpoint of segment AB
|
24
|
+
* @param c - The first endpoint of segment CD
|
25
|
+
* @param d - The second endpoint of segment CD
|
26
|
+
*
|
27
|
+
* @returns Do the line segments intersect?
|
28
|
+
*/
|
29
|
+
export function lineSegmentIntersects(a: Point, b: Point, c: Point, d: Point): boolean;
|
30
|
+
|
31
|
+
interface LineIntersection {
|
32
|
+
/** The x-coordinate of intersection */
|
33
|
+
x: number;
|
34
|
+
|
35
|
+
/** The y-coordinate of intersection */
|
36
|
+
y: number;
|
37
|
+
|
38
|
+
/** The vector distance from A to B on segment AB */
|
39
|
+
t0: number;
|
40
|
+
|
41
|
+
/** The vector distance from C to D on segment CD */
|
42
|
+
t1?: number;
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* An internal helper method for computing the intersection between two infinite-length lines.
|
47
|
+
* Adapted from http://paulbourke.net/geometry/pointlineplane/
|
48
|
+
*
|
49
|
+
* @param a - The first endpoint of segment AB
|
50
|
+
* @param b - The second endpoint of segment AB
|
51
|
+
* @param c - The first endpoint of segment CD
|
52
|
+
* @param d - The second endpoint of segment CD
|
53
|
+
*
|
54
|
+
* @returns An intersection point, or null if no intersection occurred
|
55
|
+
*/
|
56
|
+
export function lineLineIntersection(a: Point, b: Point, c: Point, d: Point): LineIntersection | null;
|
57
|
+
|
58
|
+
/**
|
59
|
+
* An internal helper method for computing the intersection between two finite line segments.
|
60
|
+
* Adapted from http://paulbourke.net/geometry/pointlineplane/
|
61
|
+
*
|
62
|
+
* @param a - The first endpoint of segment AB
|
63
|
+
* @param b - The second endpoint of segment AB
|
64
|
+
* @param c - The first endpoint of segment CD
|
65
|
+
* @param d - The second endpoint of segment CD
|
66
|
+
* @param epsilon - A small epsilon which defines a tolerance for near-equality
|
67
|
+
* (default: `1e-8`)
|
68
|
+
*
|
69
|
+
* @returns An intersection point, or null if no intersection occurred
|
70
|
+
*/
|
71
|
+
export function lineSegmentIntersection(
|
72
|
+
a: Point,
|
73
|
+
b: Point,
|
74
|
+
c: Point,
|
75
|
+
d: Point,
|
76
|
+
epsilon?: number
|
77
|
+
): LineIntersection | null;
|
78
|
+
|
79
|
+
interface LineCircleIntersection {
|
80
|
+
/** Is point A inside the circle? */
|
81
|
+
aInside: boolean;
|
82
|
+
|
83
|
+
/** Is point B inside the circle? */
|
84
|
+
bInside: boolean;
|
85
|
+
|
86
|
+
/** Is the segment AB contained within the circle? */
|
87
|
+
contained: boolean;
|
88
|
+
|
89
|
+
/** Is the segment AB fully outside the circle? */
|
90
|
+
outside: boolean;
|
91
|
+
|
92
|
+
/** Is the segment AB tangent to the circle? */
|
93
|
+
tangent: boolean;
|
94
|
+
|
95
|
+
/** Intersection points: zero, one, or two */
|
96
|
+
intersections: [number] | [number, number] | [number, number, number];
|
97
|
+
}
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Determine the intersection between a candidate wall and the circular radius of the polygon.
|
101
|
+
*
|
102
|
+
* @param a - The initial vertex of the candidate edge
|
103
|
+
* @param b - The second vertex of the candidate edge
|
104
|
+
* @param center - The center of the bounding circle
|
105
|
+
* @param radius - The radius of the bounding circle
|
106
|
+
* @param epsilon - A small tolerance for floating point precision
|
107
|
+
* (default: `1e-8`)
|
108
|
+
*
|
109
|
+
* @returns The intersection of the segment AB with the circle
|
110
|
+
*/
|
111
|
+
export function lineCircleIntersection(
|
112
|
+
a: Point,
|
113
|
+
b: Point,
|
114
|
+
center: Point,
|
115
|
+
radius: number,
|
116
|
+
epsilon?: number
|
117
|
+
): LineCircleIntersection;
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Identify the point closest to C on segment AB
|
121
|
+
*
|
122
|
+
* @param c - The reference point C
|
123
|
+
* @param a - Point A on segment AB
|
124
|
+
* @param b - Point B on segment AB
|
125
|
+
*
|
126
|
+
* @returns The closest point to C on segment AB
|
127
|
+
*/
|
128
|
+
export function closestPointToSegment(c: Point, a: Point, b: Point): Point;
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Determine the points of intersection between a line segment (p0,p1) and a circle.
|
132
|
+
* There will be zero, one, or two intersections
|
133
|
+
* See https://math.stackexchange.com/a/311956
|
134
|
+
*
|
135
|
+
* @param p0 - The initial point of the line segment
|
136
|
+
* @param p1 - The terminal point of the line segment
|
137
|
+
* @param center - The center of the circle
|
138
|
+
* @param radius - The radius of the circle
|
139
|
+
* @param epsilon - A small tolerance for floating point precision
|
140
|
+
* (default: `0`)
|
141
|
+
*/
|
142
|
+
export function quadraticIntersection(
|
143
|
+
p0: Point,
|
144
|
+
p1: Point,
|
145
|
+
center: Point,
|
146
|
+
radius: number,
|
147
|
+
epsilon?: number
|
148
|
+
): { x: number; y: number }[];
|
@@ -258,43 +258,6 @@ export declare function isNewerVersion(v1: number | string, v0: number | string)
|
|
258
258
|
*/
|
259
259
|
export declare function isObjectEmpty(obj: object): boolean;
|
260
260
|
|
261
|
-
/**
|
262
|
-
* Update a source object by replacing its keys and values with those from a target object.
|
263
|
-
*
|
264
|
-
* @param original - The initial object which should be updated with values from the target
|
265
|
-
* @param other - A new object whose values should replace those in the source
|
266
|
-
* (default: `{}`)
|
267
|
-
* @param options - Additional options which configure the merge
|
268
|
-
* (default: `{}`)
|
269
|
-
* @param _d - A privately used parameter to track recursion depth.
|
270
|
-
* (default: `0`)
|
271
|
-
* @returns The original source object including updated, inserted, or overwritten records.
|
272
|
-
*
|
273
|
-
* @example <caption>Control how new keys and values are added</caption>
|
274
|
-
* ```typescript
|
275
|
-
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: false}); // {k1: "v1"}
|
276
|
-
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: true}); // {k1: "v1", k2: "v2"}
|
277
|
-
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: false}); // {k1: {i1: "v1"}}
|
278
|
-
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: true}); // {k1: {i1: "v1", i2: "v2"}}
|
279
|
-
* ```
|
280
|
-
*
|
281
|
-
* @example <caption>Control how existing data is overwritten</caption>
|
282
|
-
* ```typescript
|
283
|
-
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: true}); // {k1: "v2"}
|
284
|
-
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: false}); // {k1: "v1"}
|
285
|
-
* ```
|
286
|
-
*
|
287
|
-
* @example <caption>Control whether merges are performed recursively</caption>
|
288
|
-
* ```typescript
|
289
|
-
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: false}); // {k1: {i1: "v2"}}
|
290
|
-
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: true}); // {k1: {i1: "v1", i2: "v2"}}
|
291
|
-
* ```
|
292
|
-
*
|
293
|
-
* @example <caption>Deleting an existing object key</caption>
|
294
|
-
* ```typescript
|
295
|
-
* mergeObject({k1: "v1", k2: "v2"}, {"-=k1": null}); // {k2: "v2"}
|
296
|
-
* ```
|
297
|
-
*/
|
298
261
|
type OmitByValue<T, ValueType> = { [Key in keyof T as T[Key] extends ValueType ? never : Key]: T[Key] };
|
299
262
|
type RemoveNever<T> = OmitByValue<T, never>;
|
300
263
|
type PropWithMinus<K> = K extends string ? `-=${K}` : never;
|
@@ -333,6 +296,43 @@ type WithWidenedArrayTypes<T> = T extends Array<any>
|
|
333
296
|
? { [K in keyof T]: WithWidenedArrayTypes<T[K]> }
|
334
297
|
: T;
|
335
298
|
|
299
|
+
/**
|
300
|
+
* Update a source object by replacing its keys and values with those from a target object.
|
301
|
+
*
|
302
|
+
* @param original - The initial object which should be updated with values from the target
|
303
|
+
* @param other - A new object whose values should replace those in the source
|
304
|
+
* (default: `{}`)
|
305
|
+
* @param options - Additional options which configure the merge
|
306
|
+
* (default: `{}`)
|
307
|
+
* @param _d - A privately used parameter to track recursion depth.
|
308
|
+
* (default: `0`)
|
309
|
+
* @returns The original source object including updated, inserted, or overwritten records.
|
310
|
+
*
|
311
|
+
* @example <caption>Control how new keys and values are added</caption>
|
312
|
+
* ```typescript
|
313
|
+
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: false}); // {k1: "v1"}
|
314
|
+
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: true}); // {k1: "v1", k2: "v2"}
|
315
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: false}); // {k1: {i1: "v1"}}
|
316
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: true}); // {k1: {i1: "v1", i2: "v2"}}
|
317
|
+
* ```
|
318
|
+
*
|
319
|
+
* @example <caption>Control how existing data is overwritten</caption>
|
320
|
+
* ```typescript
|
321
|
+
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: true}); // {k1: "v2"}
|
322
|
+
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: false}); // {k1: "v1"}
|
323
|
+
* ```
|
324
|
+
*
|
325
|
+
* @example <caption>Control whether merges are performed recursively</caption>
|
326
|
+
* ```typescript
|
327
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: false}); // {k1: {i1: "v2"}}
|
328
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: true}); // {k1: {i1: "v1", i2: "v2"}}
|
329
|
+
* ```
|
330
|
+
*
|
331
|
+
* @example <caption>Deleting an existing object key</caption>
|
332
|
+
* ```typescript
|
333
|
+
* mergeObject({k1: "v1", k2: "v2"}, {"-=k1": null}); // {k2: "v2"}
|
334
|
+
* ```
|
335
|
+
*/
|
336
336
|
export declare function mergeObject<
|
337
337
|
T extends object,
|
338
338
|
U extends DeepPartial<WithWidenedArrayTypes<T>>,
|
@@ -198,6 +198,13 @@ interface NumberConstructor {
|
|
198
198
|
* @returns Is it a number?
|
199
199
|
*/
|
200
200
|
isNumeric(n: unknown): n is number;
|
201
|
+
|
202
|
+
/**
|
203
|
+
* Attempt to create a number from a user-provided string.
|
204
|
+
* @param str - The string.
|
205
|
+
* @returns The number that the string represents, or NaN if no number could be determined.
|
206
|
+
*/
|
207
|
+
fromString(str: string): number;
|
201
208
|
}
|
202
209
|
|
203
210
|
interface ArrayConstructor {
|