@league-of-foundry-developers/foundry-vtt-types 0.8.9-9 → 9.245.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 +44 -27
- package/index.d.ts +2 -2
- package/package.json +34 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +403 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +118 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +9 -2
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +95 -0
- package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +64 -39
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +106 -16
- 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 +2 -2
- package/src/foundry/foundry.js/applications/formApplication.d.ts +46 -15
- 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 +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
- 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/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +7 -10
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- 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 +11 -12
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +9 -9
- 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 +5 -8
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +8 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +4 -4
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -3
- package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/canvas.d.ts +153 -46
- package/src/foundry/foundry.js/canvasAnimation.d.ts +31 -8
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +47 -92
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +11 -11
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +134 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +370 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -48
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +15 -18
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -11
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +309 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +12 -10
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
- package/src/foundry/foundry.js/config.d.ts +487 -907
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/game.d.ts +171 -50
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +210 -84
- package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -3
- 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 +51 -65
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- 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/textEditor.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 +29 -26
- package/src/types/utils.d.ts +11 -3
- 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
@@ -1,16 +1,17 @@
|
|
1
|
-
import
|
1
|
+
import { DOCUMENT_PERMISSION_LEVELS } from '../constants.mjs';
|
2
2
|
import { hasImageExtension, isColorString, isJSON } from './validators.mjs';
|
3
3
|
import { Document } from '../abstract/module.mjs';
|
4
4
|
import { FieldReturnType } from '../../../types/helperTypes';
|
5
5
|
|
6
6
|
/**
|
7
7
|
* A required boolean field which may be used in a Document.
|
8
|
-
|
8
|
+
*/
|
9
|
+
export const BOOLEAN_FIELD: BooleanField;
|
10
|
+
/**
|
9
11
|
* Property type: `boolean`
|
10
|
-
* Constructor type: `boolean |
|
12
|
+
* Constructor type: `boolean | null | undefined`
|
11
13
|
* Default: `false`
|
12
14
|
*/
|
13
|
-
export declare const BOOLEAN_FIELD: BooleanField;
|
14
15
|
interface BooleanField extends DocumentField<boolean> {
|
15
16
|
type: typeof Boolean;
|
16
17
|
required: true;
|
@@ -19,11 +20,12 @@ interface BooleanField extends DocumentField<boolean> {
|
|
19
20
|
|
20
21
|
/**
|
21
22
|
* A standard string color field which may be used in a Document.
|
22
|
-
* @remarks
|
23
|
-
* Property type: `string | undefined | null`
|
24
|
-
* Constructor type: `string | undefined | null`
|
25
23
|
*/
|
26
|
-
export
|
24
|
+
export const COLOR_FIELD: ColorField;
|
25
|
+
/**
|
26
|
+
* Property type: `string | null | undefined`
|
27
|
+
* Constructor type: `string | null | undefined`
|
28
|
+
*/
|
27
29
|
interface ColorField extends DocumentField<string> {
|
28
30
|
type: typeof String;
|
29
31
|
required: false;
|
@@ -34,11 +36,12 @@ interface ColorField extends DocumentField<string> {
|
|
34
36
|
|
35
37
|
/**
|
36
38
|
* A standard string field for an image file path which may be used in a Document.
|
37
|
-
* @remarks
|
38
|
-
* Property type: `string | undefined | null`
|
39
|
-
* Constructor type: `string | undefined | null`
|
40
39
|
*/
|
41
|
-
export
|
40
|
+
export const IMAGE_FIELD: ImageField;
|
41
|
+
/**
|
42
|
+
* Property type: `string | null | undefined`
|
43
|
+
* Constructor type: `string | null | undefined`
|
44
|
+
*/
|
42
45
|
interface ImageField extends DocumentField<string> {
|
43
46
|
type: typeof String;
|
44
47
|
required: false;
|
@@ -49,11 +52,12 @@ interface ImageField extends DocumentField<string> {
|
|
49
52
|
|
50
53
|
/**
|
51
54
|
* A standard string field for a video or image file path may be used in a Document.
|
52
|
-
* @remarks
|
53
|
-
* Property type: `string | undefined | null`
|
54
|
-
* Constructor type: `string | undefined | null`
|
55
55
|
*/
|
56
|
-
export
|
56
|
+
export const VIDEO_FIELD: VideoField;
|
57
|
+
/**
|
58
|
+
* Property type: `string | null | undefined`
|
59
|
+
* Constructor type: `string | null | undefined`
|
60
|
+
*/
|
57
61
|
interface VideoField extends DocumentField<string> {
|
58
62
|
type: typeof String;
|
59
63
|
required: false;
|
@@ -64,11 +68,12 @@ interface VideoField extends DocumentField<string> {
|
|
64
68
|
|
65
69
|
/**
|
66
70
|
* A standard string field for an audio file path which may be used in a Document.
|
67
|
-
* @remarks
|
68
|
-
* Property type: `string | undefined | null`
|
69
|
-
* Constructor type: `string | undefined | null`
|
70
71
|
*/
|
71
|
-
export
|
72
|
+
export const AUDIO_FIELD: AudioField;
|
73
|
+
/**
|
74
|
+
* Property type: `string | null | undefined`
|
75
|
+
* Constructor type: `string | null | undefined`
|
76
|
+
*/
|
72
77
|
interface AudioField extends DocumentField<string> {
|
73
78
|
type: typeof String;
|
74
79
|
required: false;
|
@@ -79,11 +84,12 @@ interface AudioField extends DocumentField<string> {
|
|
79
84
|
|
80
85
|
/**
|
81
86
|
* A standard integer field which may be used in a Document.
|
82
|
-
|
87
|
+
*/
|
88
|
+
export const INTEGER_FIELD: IntegerField;
|
89
|
+
/**
|
83
90
|
* Property type: `number | undefined`
|
84
|
-
* Constructor type: `number |
|
91
|
+
* Constructor type: `number | null | undefined`
|
85
92
|
*/
|
86
|
-
export declare const INTEGER_FIELD: IntegerField;
|
87
93
|
interface IntegerField extends DocumentField<number> {
|
88
94
|
type: typeof Number;
|
89
95
|
required: false;
|
@@ -93,12 +99,13 @@ interface IntegerField extends DocumentField<number> {
|
|
93
99
|
|
94
100
|
/**
|
95
101
|
* A string field which contains serialized JSON data that may be used in a Document.
|
96
|
-
|
102
|
+
*/
|
103
|
+
export const JSON_FIELD: JsonField;
|
104
|
+
/**
|
97
105
|
* Property type: `string | undefined`
|
98
|
-
* Constructor type: `string | object |
|
106
|
+
* Constructor type: `string | object | null | undefined`
|
99
107
|
*/
|
100
|
-
|
101
|
-
interface JSONField extends DocumentField<string> {
|
108
|
+
interface JsonField extends DocumentField<string> {
|
102
109
|
type: typeof String;
|
103
110
|
required: false;
|
104
111
|
clean: (s: unknown) => string;
|
@@ -108,11 +115,12 @@ interface JSONField extends DocumentField<string> {
|
|
108
115
|
|
109
116
|
/**
|
110
117
|
* A non-negative integer field which may be used in a Document.
|
111
|
-
|
118
|
+
*/
|
119
|
+
export const NONNEGATIVE_INTEGER_FIELD: NonnegativeIntegerField;
|
120
|
+
/**
|
112
121
|
* Property type: `number | undefined`
|
113
|
-
* Constructor type: `number |
|
122
|
+
* Constructor type: `number | null | undefined`
|
114
123
|
*/
|
115
|
-
export declare const NONNEGATIVE_INTEGER_FIELD: NonnegativeIntegerField;
|
116
124
|
interface NonnegativeIntegerField extends DocumentField<number> {
|
117
125
|
type: typeof Number;
|
118
126
|
required: false;
|
@@ -124,11 +132,12 @@ interface NonnegativeIntegerField extends DocumentField<number> {
|
|
124
132
|
* A non-negative integer field which may be used in a Document.
|
125
133
|
*
|
126
134
|
* @remarks The validation actually checks for `> 0`, the JSDoc is incorrect in foundry.
|
127
|
-
|
135
|
+
*/
|
136
|
+
export const POSITIVE_INTEGER_FIELD: PositiveIntegerField;
|
137
|
+
/**
|
128
138
|
* Property type: `number | undefined`
|
129
|
-
* Constructor type: `number |
|
139
|
+
* Constructor type: `number | null | undefined`
|
130
140
|
*/
|
131
|
-
export declare const POSITIVE_INTEGER_FIELD: PositiveIntegerField;
|
132
141
|
interface PositiveIntegerField extends DocumentField<number> {
|
133
142
|
type: typeof Number;
|
134
143
|
required: false;
|
@@ -138,25 +147,27 @@ interface PositiveIntegerField extends DocumentField<number> {
|
|
138
147
|
|
139
148
|
/**
|
140
149
|
* A template for a required inner-object field which may be used in a Document.
|
141
|
-
|
150
|
+
*/
|
151
|
+
export const OBJECT_FIELD: ObjectField;
|
152
|
+
/**
|
142
153
|
* Property type: `object`
|
143
|
-
* Constructor type: `object |
|
154
|
+
* Constructor type: `object | null | undefined`
|
144
155
|
* Default `{}`
|
145
156
|
*/
|
146
|
-
export declare const OBJECT_FIELD: ObjectField;
|
147
157
|
interface ObjectField extends DocumentField<object> {
|
148
158
|
type: typeof Object;
|
149
|
-
default:
|
159
|
+
default: Record<string, never>;
|
150
160
|
required: true;
|
151
161
|
}
|
152
162
|
|
153
163
|
/**
|
154
164
|
* An optional string field which may be included by a Document.
|
155
|
-
|
165
|
+
*/
|
166
|
+
export const STRING_FIELD: StringField;
|
167
|
+
/**
|
156
168
|
* Property type: `string | undefined`
|
157
|
-
* Constructor type: `string |
|
169
|
+
* Constructor type: `string | null | undefined`
|
158
170
|
*/
|
159
|
-
export declare const STRING_FIELD: StringField;
|
160
171
|
interface StringField extends DocumentField<string> {
|
161
172
|
type: typeof String;
|
162
173
|
required: false;
|
@@ -165,11 +176,12 @@ interface StringField extends DocumentField<string> {
|
|
165
176
|
|
166
177
|
/**
|
167
178
|
* An optional numeric field which may be included in a Document.
|
168
|
-
* @remarks
|
169
|
-
* Property type: `number | undefined | null`
|
170
|
-
* Constructor type: `number | undefined | null`
|
171
179
|
*/
|
172
|
-
export
|
180
|
+
export const NUMERIC_FIELD: NumericField;
|
181
|
+
/**
|
182
|
+
* Property type: `number | null | undefined`
|
183
|
+
* Constructor type: `number | null | undefined`
|
184
|
+
*/
|
173
185
|
interface NumericField extends DocumentField<number> {
|
174
186
|
type: typeof Number;
|
175
187
|
required: false;
|
@@ -178,12 +190,13 @@ interface NumericField extends DocumentField<number> {
|
|
178
190
|
|
179
191
|
/**
|
180
192
|
* A required numeric field which may be included in a Document and may not be null.
|
181
|
-
|
193
|
+
*/
|
194
|
+
export const REQUIRED_NUMBER: RequiredNumber;
|
195
|
+
/**
|
182
196
|
* Property type: `number`
|
183
|
-
* Constructor type: `number |
|
197
|
+
* Constructor type: `number | null | undefined`
|
184
198
|
* Default: `0`
|
185
199
|
*/
|
186
|
-
export declare const REQUIRED_NUMBER: RequiredNumber;
|
187
200
|
interface RequiredNumber extends DocumentField<number> {
|
188
201
|
type: typeof Number;
|
189
202
|
required: true;
|
@@ -191,13 +204,32 @@ interface RequiredNumber extends DocumentField<number> {
|
|
191
204
|
default: 0;
|
192
205
|
}
|
193
206
|
|
207
|
+
/**
|
208
|
+
* A field used to designate a non-negative number
|
209
|
+
*/
|
210
|
+
export const NONNEGATIVE_NUMBER_FIELD: NonnegativeNumberField;
|
211
|
+
/**
|
212
|
+
* Property type: `number`
|
213
|
+
* Constructor type: `number | null | undefined`
|
214
|
+
* Default: `0`
|
215
|
+
*/
|
216
|
+
interface NonnegativeNumberField extends DocumentField<number> {
|
217
|
+
type: typeof Number;
|
218
|
+
required: true;
|
219
|
+
nullable: false;
|
220
|
+
default: 0;
|
221
|
+
validate: (n: unknown) => boolean;
|
222
|
+
validationError: '{name} {field} "{value}" must be a non-negative number';
|
223
|
+
}
|
224
|
+
|
194
225
|
/**
|
195
226
|
* A required numeric field which must be a positive finite value that may be included in a Document.
|
196
|
-
|
227
|
+
*/
|
228
|
+
export const REQUIRED_POSITIVE_NUMBER: RequiredPositiveNumber;
|
229
|
+
/**
|
197
230
|
* Property type: `number`
|
198
231
|
* Constructor type: `number`
|
199
232
|
*/
|
200
|
-
export declare const REQUIRED_POSITIVE_NUMBER: RequiredPositiveNumber;
|
201
233
|
interface RequiredPositiveNumber extends DocumentField<number> {
|
202
234
|
type: typeof Number;
|
203
235
|
required: true;
|
@@ -208,12 +240,13 @@ interface RequiredPositiveNumber extends DocumentField<number> {
|
|
208
240
|
|
209
241
|
/**
|
210
242
|
* A required numeric field which represents an angle of rotation in degrees between 0 and 360.
|
211
|
-
|
243
|
+
*/
|
244
|
+
export const ANGLE_FIELD: AngleField;
|
245
|
+
/**
|
212
246
|
* Property type: `number`
|
213
|
-
* Constructor type: `number |
|
247
|
+
* Constructor type: `number | null | undefined`
|
214
248
|
* Default: `360`
|
215
249
|
*/
|
216
|
-
export declare const ANGLE_FIELD: AngleField;
|
217
250
|
interface AngleField extends DocumentField<number> {
|
218
251
|
type: typeof Number;
|
219
252
|
required: true;
|
@@ -226,12 +259,13 @@ interface AngleField extends DocumentField<number> {
|
|
226
259
|
|
227
260
|
/**
|
228
261
|
* A required numeric field which represents a uniform number between 0 and 1.
|
229
|
-
|
262
|
+
*/
|
263
|
+
export const ALPHA_FIELD: AlphaField;
|
264
|
+
/**
|
230
265
|
* Property type: `number`
|
231
|
-
* Constructor type: `number |
|
266
|
+
* Constructor type: `number | null | undefined`
|
232
267
|
* Default: `1`
|
233
268
|
*/
|
234
|
-
export declare const ALPHA_FIELD: AlphaField;
|
235
269
|
interface AlphaField extends DocumentField<number> {
|
236
270
|
type: typeof Number;
|
237
271
|
required: true;
|
@@ -243,11 +277,12 @@ interface AlphaField extends DocumentField<number> {
|
|
243
277
|
|
244
278
|
/**
|
245
279
|
* A string field which requires a non-blank value and may not be null.
|
246
|
-
|
280
|
+
*/
|
281
|
+
export const REQUIRED_STRING: RequiredString;
|
282
|
+
/**
|
247
283
|
* Property type: `string`
|
248
284
|
* Constructor type: `string`
|
249
285
|
*/
|
250
|
-
export declare const REQUIRED_STRING: RequiredString;
|
251
286
|
interface RequiredString extends DocumentField<string> {
|
252
287
|
type: typeof String;
|
253
288
|
required: true;
|
@@ -257,12 +292,13 @@ interface RequiredString extends DocumentField<string> {
|
|
257
292
|
|
258
293
|
/**
|
259
294
|
* A string field which is required, but may be left blank as an empty string.
|
260
|
-
|
295
|
+
*/
|
296
|
+
export const BLANK_STRING: BlankString;
|
297
|
+
/**
|
261
298
|
* Property type: `string`
|
262
|
-
* Constructor type: `string |
|
263
|
-
* Default: `
|
299
|
+
* Constructor type: `string | null | undefined`
|
300
|
+
* Default: `""`
|
264
301
|
*/
|
265
|
-
export declare const BLANK_STRING: BlankString;
|
266
302
|
interface BlankString extends DocumentField<string> {
|
267
303
|
type: typeof String;
|
268
304
|
required: true;
|
@@ -273,12 +309,13 @@ interface BlankString extends DocumentField<string> {
|
|
273
309
|
|
274
310
|
/**
|
275
311
|
* A field used for integer sorting of a Document relative to its siblings
|
276
|
-
|
312
|
+
*/
|
313
|
+
export const INTEGER_SORT_FIELD: IntegerSortField;
|
314
|
+
/**
|
277
315
|
* Property type: `number`
|
278
|
-
* Constructor type: `number |
|
316
|
+
* Constructor type: `number | null | undefined`
|
279
317
|
* Default: `0`
|
280
318
|
*/
|
281
|
-
export declare const INTEGER_SORT_FIELD: IntegerSortField;
|
282
319
|
interface IntegerSortField extends DocumentField<number> {
|
283
320
|
type: typeof Number;
|
284
321
|
required: true;
|
@@ -289,12 +326,13 @@ interface IntegerSortField extends DocumentField<number> {
|
|
289
326
|
|
290
327
|
/**
|
291
328
|
* A numeric timestamp field which may be used in a Document.
|
292
|
-
|
329
|
+
*/
|
330
|
+
export const TIMESTAMP_FIELD: TimestampField;
|
331
|
+
/**
|
293
332
|
* Property type: `number | undefined`
|
294
|
-
* Constructor type: `number |
|
295
|
-
* Default: `Date.now`
|
333
|
+
* Constructor type: `number | null | undefined`
|
334
|
+
* Default: `Date.now()`
|
296
335
|
*/
|
297
|
-
export declare const TIMESTAMP_FIELD: TimestampField;
|
298
336
|
interface TimestampField extends DocumentField<number> {
|
299
337
|
type: typeof Number;
|
300
338
|
required: false;
|
@@ -311,12 +349,13 @@ declare function _validateId(id: string | null): boolean;
|
|
311
349
|
|
312
350
|
/**
|
313
351
|
* The standard identifier for a Document.
|
314
|
-
|
352
|
+
*/
|
353
|
+
export const DOCUMENT_ID: DocumentId;
|
354
|
+
/**
|
315
355
|
* Property type: `string | null`
|
316
|
-
* Constructor type: `string |
|
356
|
+
* Constructor type: `string | null | undefined`
|
317
357
|
* Default: `null`
|
318
358
|
*/
|
319
|
-
export declare const DOCUMENT_ID: DocumentId;
|
320
359
|
interface DocumentId extends DocumentField<string | null> {
|
321
360
|
type: typeof String;
|
322
361
|
required: true;
|
@@ -328,17 +367,18 @@ interface DocumentId extends DocumentField<string | null> {
|
|
328
367
|
|
329
368
|
/**
|
330
369
|
* The standard permissions object which may be included by a Document.
|
331
|
-
* @remarks
|
332
|
-
* Property type: `Partial<Record<string, foundry.CONST.EntityPermission>>`
|
333
|
-
* Constructor type: `Partial<Record<string, foundry.CONST.EntityPermission>> | undefined | null`
|
334
|
-
* Default: `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
|
335
370
|
*/
|
336
|
-
export
|
337
|
-
|
371
|
+
export const DOCUMENT_PERMISSIONS: DocumentPermissions;
|
372
|
+
/**
|
373
|
+
* Property type: `Partial<Record<string, DOCUMENT_PERMISSION_LEVELS>>`
|
374
|
+
* Constructor type: `Partial<Record<string, DOCUMENT_PERMISSION_LEVELS>> | null | undefined`
|
375
|
+
* Default: `{ default: DOCUMENT_PERMISSION_LEVELS.NONE }`
|
376
|
+
*/
|
377
|
+
interface DocumentPermissions extends DocumentField<Partial<Record<string, DOCUMENT_PERMISSION_LEVELS>>> {
|
338
378
|
type: typeof Object;
|
339
379
|
required: true;
|
340
380
|
nullable: false;
|
341
|
-
default: { default: typeof
|
381
|
+
default: { default: typeof DOCUMENT_PERMISSION_LEVELS.NONE };
|
342
382
|
validate: typeof _validatePermissions;
|
343
383
|
validationError: '{name} {field} "{value}" is not a mapping of user IDs and document permission levels';
|
344
384
|
}
|
@@ -362,9 +402,22 @@ interface ForeignDocumentFieldOptions {
|
|
362
402
|
/**
|
363
403
|
* Create a foreign key field which references a primary Document id
|
364
404
|
*/
|
365
|
-
export
|
366
|
-
|
367
|
-
|
405
|
+
export function foreignDocumentField<T extends ForeignDocumentFieldOptions>(options: T): ForeignDocumentField<T>;
|
406
|
+
/**
|
407
|
+
* Default config:
|
408
|
+
* ```
|
409
|
+
* {
|
410
|
+
* type: String,
|
411
|
+
* required: false,
|
412
|
+
* nullable: true,
|
413
|
+
* default: null
|
414
|
+
* }
|
415
|
+
* ```
|
416
|
+
* With default config:
|
417
|
+
* Property type: `string | null`
|
418
|
+
* Constructor type: `ForeignDocument | string | null | undefined`
|
419
|
+
* Default: `null`
|
420
|
+
*/
|
368
421
|
interface ForeignDocumentField<T extends ForeignDocumentFieldOptions> extends DocumentField<string | null> {
|
369
422
|
type: typeof String;
|
370
423
|
required: T extends {
|
@@ -402,13 +455,30 @@ interface EmbeddedCollectionFieldOptions {
|
|
402
455
|
* @param options - Additional field options
|
403
456
|
* (default: `{}`)
|
404
457
|
*/
|
405
|
-
export
|
458
|
+
export function embeddedCollectionField<
|
406
459
|
ConcreteDocumentConstructor extends { readonly documentName: string } & ConstructorOf<Document<any, any>>,
|
407
460
|
Options extends EmbeddedCollectionFieldOptions
|
408
461
|
>(
|
409
462
|
document: ConcreteDocumentConstructor,
|
410
463
|
options?: Options
|
411
464
|
): EmbeddedCollectionField<ConcreteDocumentConstructor, Options>;
|
465
|
+
/**
|
466
|
+
* Default config:
|
467
|
+
* ```
|
468
|
+
* {
|
469
|
+
* type: {
|
470
|
+
* [documentName]: DocumentConstructor
|
471
|
+
* },
|
472
|
+
* required: true,
|
473
|
+
* default: [],
|
474
|
+
* isCollection: true
|
475
|
+
* }
|
476
|
+
* ```
|
477
|
+
* With default config:
|
478
|
+
* Property type: `EmbeddedCollection<DocumentConstructor, ParentDocumentData>`
|
479
|
+
* Constructor type: `DocumentConstructorData[] | null | undefined`
|
480
|
+
* Default: `new EmbeddedCollection(DocumentData, [], DocumentConstructor)`
|
481
|
+
*/
|
412
482
|
// TODO: Improve
|
413
483
|
interface EmbeddedCollectionField<
|
414
484
|
ConcreteDocumentConstructor extends ConstructorOf<Document<any, any>>,
|
@@ -420,10 +490,37 @@ interface EmbeddedCollectionField<
|
|
420
490
|
isCollection: true;
|
421
491
|
}
|
422
492
|
|
493
|
+
/**
|
494
|
+
* A special field which contains a data object defined from the game System model.
|
495
|
+
* @param document - The Document class definition
|
496
|
+
*/
|
497
|
+
export function systemDataField<
|
498
|
+
DocumentSpecifier extends { readonly documentName: keyof Game.SystemData<any>['model'] }
|
499
|
+
>(document: DocumentSpecifier): SystemDataField;
|
500
|
+
/**
|
501
|
+
* Default config:
|
502
|
+
* ```
|
503
|
+
* {
|
504
|
+
* type: Object,
|
505
|
+
* required: true,
|
506
|
+
* default: object // template object of object type from template.json
|
507
|
+
* }
|
508
|
+
* ```
|
509
|
+
* Property type: `object`
|
510
|
+
* Constructor type: `object | null | undefined`
|
511
|
+
* Default: `{}`
|
512
|
+
*/
|
513
|
+
// TODO: Improve
|
514
|
+
interface SystemDataField extends DocumentField<any> {
|
515
|
+
type: typeof Object;
|
516
|
+
default: (data: { type?: string }) => Record<string, Record<string, unknown>>;
|
517
|
+
required: true;
|
518
|
+
}
|
519
|
+
|
423
520
|
/**
|
424
521
|
* Return a document field which is a modification of a static field type
|
425
522
|
*/
|
426
|
-
export
|
523
|
+
export function field<T extends DocumentField<any>, U extends Partial<DocumentField<any>>>(
|
427
524
|
field: T,
|
428
525
|
options?: U
|
429
526
|
): FieldReturnType<T, U>;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
2
|
import { DocumentMetadata, DocumentModificationOptions } from '../abstract/document.mjs';
|
2
|
-
import { ConfiguredDocumentClass, ConstructorDataType } from '../../../types/helperTypes';
|
3
3
|
import { Document } from '../abstract/module.mjs';
|
4
4
|
import * as data from '../data/data.mjs';
|
5
|
+
import type { ActiveEffectDataConstructorData } from '../data/data.mjs/activeEffectData.js';
|
5
6
|
import { BaseActor } from './baseActor';
|
6
7
|
import { BaseItem } from './baseItem';
|
7
8
|
import { BaseUser } from './baseUser';
|
@@ -13,27 +14,32 @@ export declare class BaseActiveEffect extends Document<
|
|
13
14
|
data.ActiveEffectData,
|
14
15
|
InstanceType<ConfiguredDocumentClass<typeof BaseActor>> | InstanceType<ConfiguredDocumentClass<typeof BaseItem>>
|
15
16
|
> {
|
17
|
+
/** @override */
|
16
18
|
static get schema(): ConstructorOf<data.ActiveEffectData>;
|
17
19
|
|
20
|
+
/** @override */
|
18
21
|
static get metadata(): Merge<
|
19
22
|
DocumentMetadata,
|
20
23
|
{
|
21
24
|
name: 'ActiveEffect';
|
22
25
|
collection: 'effects';
|
23
26
|
label: 'DOCUMENT.ActiveEffect';
|
27
|
+
labelPlural: 'DOCUMENT.ActiveEffects';
|
24
28
|
isEmbedded: true;
|
25
29
|
}
|
26
30
|
>;
|
27
31
|
|
32
|
+
/** @override */
|
28
33
|
protected _preCreate(
|
29
|
-
data:
|
34
|
+
data: ActiveEffectDataConstructorData,
|
30
35
|
options: DocumentModificationOptions,
|
31
36
|
user: BaseUser
|
32
37
|
): Promise<void>;
|
33
38
|
|
39
|
+
/** @override */
|
34
40
|
testUserPermission(
|
35
41
|
user: BaseUser,
|
36
|
-
permission: keyof typeof foundry.CONST.ENTITY_PERMISSIONS | foundry.CONST.
|
42
|
+
permission: keyof typeof foundry.CONST.ENTITY_PERMISSIONS | foundry.CONST.DOCUMENT_PERMISSION_LEVELS,
|
37
43
|
{ exact }: { exact?: boolean }
|
38
44
|
): boolean;
|
39
45
|
}
|
@@ -1,24 +1,31 @@
|
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
2
|
import { DocumentMetadata, DocumentModificationOptions } from '../abstract/document.mjs';
|
2
3
|
import { Document } from '../abstract/module.mjs';
|
4
|
+
import * as data from '../data/data.mjs';
|
5
|
+
import type { ActorDataConstructorData } from '../data/data.mjs/actorData.js';
|
3
6
|
import { BaseActiveEffect } from './baseActiveEffect';
|
4
7
|
import { BaseItem } from './baseItem';
|
5
|
-
import
|
8
|
+
import { BaseToken } from './baseToken';
|
6
9
|
import { BaseUser } from './baseUser';
|
7
|
-
import { ConstructorDataType } from '../../../types/helperTypes';
|
8
10
|
|
9
|
-
//TODO Add Token as parent class once it is available
|
10
11
|
/**
|
11
12
|
* The base Actor model definition which defines common behavior of an Actor document between both client and server.
|
12
13
|
*/
|
13
|
-
export declare class BaseActor extends Document<
|
14
|
+
export declare class BaseActor extends Document<
|
15
|
+
data.ActorData,
|
16
|
+
InstanceType<ConfiguredDocumentClass<typeof BaseToken>>
|
17
|
+
> {
|
18
|
+
/** @override */
|
14
19
|
static get schema(): typeof data.ActorData;
|
15
20
|
|
21
|
+
/** @override */
|
16
22
|
static get metadata(): Merge<
|
17
23
|
DocumentMetadata,
|
18
24
|
{
|
19
25
|
name: 'Actor';
|
20
26
|
collection: 'actors';
|
21
27
|
label: 'DOCUMENT.Actor';
|
28
|
+
labelPlural: 'DOCUMENT.Actors';
|
22
29
|
embedded: {
|
23
30
|
ActiveEffect: typeof BaseActiveEffect;
|
24
31
|
Item: typeof BaseItem;
|
@@ -42,56 +49,21 @@ export declare class BaseActor extends Document<data.ActorData, Document<any, an
|
|
42
49
|
get items(): this['data']['items'];
|
43
50
|
|
44
51
|
/**
|
45
|
-
*
|
46
|
-
* @see mergeObject
|
47
|
-
* @param options - Options which customize how the system data is migrated.
|
48
|
-
* @returns The migrated system data object, not yet saved to the database
|
52
|
+
* The sub-type of Actor.
|
49
53
|
*/
|
50
|
-
|
54
|
+
get type(): data.ActorData['type'];
|
51
55
|
|
52
|
-
/**
|
53
|
-
* Perform preliminary operations before a Document of this type is created.
|
54
|
-
* Pre-creation operations only occur for the client which requested the operation.
|
55
|
-
* @param data - The initial data used to create the document
|
56
|
-
* @param options - Additional options which modify the creation request
|
57
|
-
* @param user - The User requesting the document creation
|
58
|
-
*/
|
56
|
+
/** @override */
|
59
57
|
protected _preCreate(
|
60
|
-
data:
|
58
|
+
data: ActorDataConstructorData,
|
61
59
|
options: DocumentModificationOptions,
|
62
60
|
user: BaseUser
|
63
61
|
): Promise<void>;
|
64
62
|
|
65
|
-
/**
|
66
|
-
* Perform preliminary operations before a Document of this type is updated.
|
67
|
-
* Pre-update operations only occur for the client which requested the operation.
|
68
|
-
* @param changed - The differential data that is changed relative to the documents prior values
|
69
|
-
* @param options - Additional options which modify the update request
|
70
|
-
* @param user - The User requesting the document update
|
71
|
-
*/
|
63
|
+
/** @override */
|
72
64
|
protected _preUpdate(
|
73
|
-
changed: DeepPartial<
|
65
|
+
changed: DeepPartial<ActorDataConstructorData>,
|
74
66
|
options: DocumentModificationOptions,
|
75
67
|
user: BaseUser
|
76
68
|
): Promise<void>;
|
77
69
|
}
|
78
|
-
|
79
|
-
interface MigrateSystemDataOptions {
|
80
|
-
/**
|
81
|
-
* Retain keys which exist in the current data, but not the model
|
82
|
-
* @defaultValue `false`
|
83
|
-
*/
|
84
|
-
insertKeys?: boolean;
|
85
|
-
|
86
|
-
/**
|
87
|
-
* Retain inner-object values which exist in the current data, but not the model
|
88
|
-
* @defaultValue `true`
|
89
|
-
*/
|
90
|
-
insertValues?: boolean;
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Require that data types match the model exactly to be retained
|
94
|
-
* @defaultValue `false`
|
95
|
-
*/
|
96
|
-
enforceTypes?: boolean;
|
97
|
-
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { DocumentMetadata } from '../abstract/document.mjs';
|
2
|
+
import { Document } from '../abstract/module.mjs';
|
3
|
+
import * as data from '../data/data.mjs';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The base Adventure model definition which defines common behavior of an Adventure document between both client and server.
|
7
|
+
*
|
8
|
+
* WARNING: This document is an early prototype which will be fully implemented in V10.
|
9
|
+
* Until then it is for internal use only. Use this at your own risk.
|
10
|
+
* @internal
|
11
|
+
*/
|
12
|
+
export class BaseAdventure extends Document<data.AdventureData> {
|
13
|
+
/** @override */
|
14
|
+
static get schema(): typeof data.AdventureData;
|
15
|
+
|
16
|
+
/** @override */
|
17
|
+
static get metadata(): Merge<
|
18
|
+
DocumentMetadata,
|
19
|
+
{
|
20
|
+
name: 'Adventure';
|
21
|
+
collection: 'adventures';
|
22
|
+
label: 'DOCUMENT.Adventure';
|
23
|
+
labelPlural: 'DOCUMENT.Adventures';
|
24
|
+
isPrimary: false;
|
25
|
+
isEmbedded: false;
|
26
|
+
}
|
27
|
+
>;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* A convenient reference to the file path of the Adventure's profile image.
|
31
|
+
*/
|
32
|
+
get img(): string | null | undefined;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Provide a thumbnail image path used to represent the Adventure document.
|
36
|
+
*/
|
37
|
+
get thumbnail(): string | null | undefined;
|
38
|
+
}
|
@@ -11,14 +11,17 @@ export declare class BaseAmbientLight extends Document<
|
|
11
11
|
data.AmbientLightData,
|
12
12
|
InstanceType<ConfiguredDocumentClass<typeof BaseScene>>
|
13
13
|
> {
|
14
|
+
/** @override */
|
14
15
|
static get schema(): typeof data.AmbientLightData;
|
15
16
|
|
17
|
+
/** @override */
|
16
18
|
static get metadata(): Merge<
|
17
19
|
DocumentMetadata,
|
18
20
|
{
|
19
21
|
name: 'AmbientLight';
|
20
22
|
collection: 'lights';
|
21
23
|
label: 'DOCUMENT.AmbientLight';
|
24
|
+
labelPlural: 'DOCUMENT.AmbientLights';
|
22
25
|
isEmbedded: true;
|
23
26
|
}
|
24
27
|
>;
|