@league-of-foundry-developers/foundry-vtt-types 12.331.3-beta → 13.340.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 +13 -17
- package/package.json +85 -41
- package/src/configuration/configuration.d.mts +315 -0
- package/src/configuration/globals.d.mts +349 -0
- package/src/configuration/index.d.mts +4 -0
- package/src/foundry/client/apps/app.d.mts +10 -5
- package/src/foundry/client/apps/av/av-config.d.mts +2 -2
- package/src/foundry/client/apps/av/cameras.d.mts +7 -2
- package/src/foundry/client/apps/dice/dice-config.d.mts +45 -0
- package/src/foundry/client/apps/dice/index.d.mts +1 -0
- package/src/foundry/client/apps/form.d.mts +13 -4
- package/src/foundry/client/apps/forms/actor.d.mts +4 -4
- package/src/foundry/client/apps/forms/adventure-exporter.d.mts +1 -1
- package/src/foundry/client/apps/forms/adventure-importer.d.mts +1 -1
- package/src/foundry/client/apps/forms/base-sheet.d.mts +7 -6
- package/src/foundry/client/apps/forms/card-config.d.mts +8 -8
- package/src/foundry/client/apps/forms/cards-config.d.mts +5 -4
- package/src/foundry/client/apps/forms/combat-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/combatant-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/effect-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/folder-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/fonts.d.mts +1 -1
- package/src/foundry/client/apps/forms/grid-config.d.mts +2 -3
- package/src/foundry/client/apps/forms/image-popout.d.mts +1 -1
- package/src/foundry/client/apps/forms/item.d.mts +8 -8
- package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +1 -1
- package/src/foundry/client/apps/forms/journal-sheet.d.mts +4 -3
- package/src/foundry/client/apps/forms/macro-config.d.mts +2 -2
- package/src/foundry/client/apps/forms/measure-template.d.mts +8 -10
- package/src/foundry/client/apps/forms/ownership.d.mts +1 -1
- package/src/foundry/client/apps/forms/playlist-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/roll-table-config.d.mts +5 -3
- package/src/foundry/client/apps/forms/scene-config.d.mts +5 -6
- package/src/foundry/client/apps/forms/sheet-config.d.mts +6 -18
- package/src/foundry/client/apps/forms/user-config.d.mts +6 -5
- package/src/foundry/client/apps/hud/chatbubble.d.mts +7 -0
- package/src/foundry/client/apps/hud/container.d.mts +1 -1
- package/src/foundry/client/apps/hud/controls.d.mts +6 -1
- package/src/foundry/client/apps/hud/hotbar.d.mts +9 -4
- package/src/foundry/client/apps/hud/hud.d.mts +1 -1
- package/src/foundry/client/apps/hud/menu.d.mts +8 -1
- package/src/foundry/client/apps/hud/navigation.d.mts +8 -3
- package/src/foundry/client/apps/hud/pause.d.mts +7 -2
- package/src/foundry/client/apps/hud/players.d.mts +8 -3
- package/src/foundry/client/apps/i18n.d.mts +2 -2
- package/src/foundry/client/apps/index.d.mts +1 -0
- package/src/foundry/client/apps/placeables/drawing-config.d.mts +1 -1
- package/src/foundry/client/apps/placeables/drawing-hud.d.mts +1 -1
- package/src/foundry/client/apps/placeables/light-config.d.mts +4 -4
- package/src/foundry/client/apps/placeables/note-config.d.mts +3 -3
- package/src/foundry/client/apps/placeables/sound-config.d.mts +4 -3
- package/src/foundry/client/apps/placeables/tile-config.d.mts +2 -2
- package/src/foundry/client/apps/placeables/tile-hud.d.mts +7 -2
- package/src/foundry/client/apps/placeables/token-config.d.mts +16 -4
- package/src/foundry/client/apps/placeables/token-hud.d.mts +7 -2
- package/src/foundry/client/apps/placeables/wall-config.d.mts +4 -3
- package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +6 -7
- package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +2 -1
- package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +12 -5
- package/src/foundry/client/apps/sidebar/document-directory.d.mts +12 -5
- package/src/foundry/client/apps/sidebar/package-configuration.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/sidebar.d.mts +7 -2
- package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +8 -1
- package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +15 -9
- package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +9 -0
- package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +16 -8
- package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +10 -1
- package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +11 -2
- package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +19 -1
- package/src/foundry/client/av/client.d.mts +1 -1
- package/src/foundry/client/av/clients/simplepeer.d.mts +11 -1
- package/src/foundry/client/av/master.d.mts +2 -2
- package/src/foundry/client/av/settings.d.mts +1 -2
- package/src/foundry/client/config.d.mts +201 -196
- package/src/foundry/client/core/hooks.d.mts +2 -2
- package/src/foundry/client/core/image.d.mts +1 -2
- package/src/foundry/client/core/keybindings.d.mts +2 -2
- package/src/foundry/client/core/packages.d.mts +9 -2
- package/src/foundry/client/core/settings.d.mts +34 -31
- package/src/foundry/client/core/socket.d.mts +1 -1
- package/src/foundry/client/core/sorting.d.mts +1 -1
- package/src/foundry/client/core/tooltip.d.mts +1 -1
- package/src/foundry/client/core/tour.d.mts +1 -1
- package/src/foundry/client/core/utils.d.mts +33 -10
- package/src/foundry/client/core/video.d.mts +1 -1
- package/src/foundry/client/core/workers.d.mts +1 -1
- package/src/foundry/client/data/abstract/canvas-document.d.mts +25 -14
- package/src/foundry/client/data/abstract/client-document.d.mts +47 -38
- package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +18 -12
- package/src/foundry/client/data/abstract/document-collection.d.mts +8 -8
- package/src/foundry/client/data/abstract/world-collection.d.mts +2 -4
- package/src/foundry/client/data/collections/actors.d.mts +10 -1
- package/src/foundry/client/data/collections/cards.d.mts +9 -0
- package/src/foundry/client/data/collections/combats.d.mts +10 -1
- package/src/foundry/client/data/collections/compendium-collection.d.mts +3 -34
- package/src/foundry/client/data/collections/compendium-packs.d.mts +1 -1
- package/src/foundry/client/data/collections/fog.d.mts +9 -0
- package/src/foundry/client/data/collections/folder.d.mts +9 -0
- package/src/foundry/client/data/collections/items.d.mts +9 -0
- package/src/foundry/client/data/collections/journal.d.mts +10 -1
- package/src/foundry/client/data/collections/macros.d.mts +10 -1
- package/src/foundry/client/data/collections/messages.d.mts +9 -0
- package/src/foundry/client/data/collections/playlists.d.mts +10 -1
- package/src/foundry/client/data/collections/scenes.d.mts +10 -1
- package/src/foundry/client/data/collections/settings.d.mts +9 -0
- package/src/foundry/client/data/collections/tables.d.mts +10 -1
- package/src/foundry/client/data/collections/users.d.mts +10 -1
- package/src/foundry/client/data/documents/active-effect.d.mts +43 -14
- package/src/foundry/client/data/documents/actor-delta.d.mts +4 -4
- package/src/foundry/client/data/documents/actor.d.mts +4 -10
- package/src/foundry/client/data/documents/adventure.d.mts +9 -8
- package/src/foundry/client/data/documents/ambient-light.d.mts +3 -2
- package/src/foundry/client/data/documents/ambient-sound.d.mts +3 -2
- package/src/foundry/client/data/documents/card.d.mts +4 -3
- package/src/foundry/client/data/documents/cards.d.mts +12 -19
- package/src/foundry/client/data/documents/chat-message.d.mts +4 -3
- package/src/foundry/client/data/documents/combat.d.mts +5 -4
- package/src/foundry/client/data/documents/combatant.d.mts +5 -4
- package/src/foundry/client/data/documents/drawing.d.mts +3 -2
- package/src/foundry/client/data/documents/fog-exploration.d.mts +13 -3
- package/src/foundry/client/data/documents/folder.d.mts +21 -8
- package/src/foundry/client/data/documents/index.d.mts +2 -0
- package/src/foundry/client/data/documents/item.d.mts +6 -2
- package/src/foundry/client/data/documents/journal-entry-page.d.mts +5 -4
- package/src/foundry/client/data/documents/journal-entry.d.mts +5 -4
- package/src/foundry/client/data/documents/macro.d.mts +5 -6
- package/src/foundry/client/data/documents/measured-template.d.mts +3 -2
- package/src/foundry/client/data/documents/note.d.mts +3 -2
- package/src/foundry/client/data/documents/playlist-sound.d.mts +4 -3
- package/src/foundry/client/data/documents/playlist.d.mts +13 -13
- package/src/foundry/client/data/documents/region-behavior.d.mts +78 -0
- package/src/foundry/client/data/documents/region.d.mts +160 -0
- package/src/foundry/client/data/documents/scene.d.mts +4 -3
- package/src/foundry/client/data/documents/setting.d.mts +3 -2
- package/src/foundry/client/data/documents/table-result.d.mts +3 -2
- package/src/foundry/client/data/documents/table.d.mts +5 -4
- package/src/foundry/client/data/documents/tile.d.mts +3 -2
- package/src/foundry/client/data/documents/token.d.mts +6 -11
- package/src/foundry/client/data/documents/user.d.mts +4 -3
- package/src/foundry/client/data/documents/wall.d.mts +3 -2
- package/src/foundry/client/game.d.mts +24 -22
- package/src/foundry/client/head.d.mts +12 -7
- package/src/foundry/client/hooks.d.mts +59 -40
- package/src/foundry/client/pixi/board.d.mts +12 -6
- package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +95 -24
- package/src/foundry/client/pixi/core/containers/cached-container.d.mts +36 -18
- package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +7 -10
- package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +24 -14
- package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +15 -5
- package/src/foundry/client/pixi/core/containers/quadtree.d.mts +107 -50
- package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +66 -23
- package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +20 -2
- package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +158 -99
- package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +61 -22
- package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +119 -52
- package/src/foundry/client/pixi/core/interaction/ping.d.mts +51 -28
- package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +16 -8
- package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +84 -33
- package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +16 -6
- package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +35 -5
- package/src/foundry/client/pixi/core/interaction/targets.d.mts +19 -16
- package/src/foundry/client/pixi/core/loader.d.mts +85 -75
- package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +36 -16
- package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +92 -64
- package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +28 -10
- package/src/foundry/client/pixi/core/shapes/ray.d.mts +27 -9
- package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +162 -72
- package/src/foundry/client/pixi/extensions/circle.d.mts +128 -125
- package/src/foundry/client/pixi/extensions/graphics.d.mts +3 -1
- package/src/foundry/client/pixi/extensions/observable-transform.d.mts +3 -2
- package/src/foundry/client/pixi/extensions/polygon.d.mts +154 -134
- package/src/foundry/client/pixi/extensions/rectangle.d.mts +242 -259
- package/src/foundry/client/pixi/groups/effects.d.mts +75 -24
- package/src/foundry/client/pixi/groups/environment.d.mts +68 -19
- package/src/foundry/client/pixi/groups/hidden.d.mts +27 -11
- package/src/foundry/client/pixi/groups/interface.d.mts +62 -38
- package/src/foundry/client/pixi/groups/overlay.d.mts +18 -6
- package/src/foundry/client/pixi/groups/primary.d.mts +64 -42
- package/src/foundry/client/pixi/groups/rendered.d.mts +18 -6
- package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +9 -13
- package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +18 -17
- package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +86 -98
- package/src/foundry/client/pixi/layers/controls/cursor.d.mts +1 -1
- package/src/foundry/client/pixi/layers/controls/door.d.mts +9 -0
- package/src/foundry/client/pixi/layers/controls/layer.d.mts +10 -8
- package/src/foundry/client/pixi/layers/controls/ruler.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +6 -8
- package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +4 -7
- package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +3 -6
- package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +4 -7
- package/src/foundry/client/pixi/layers/effects/visibility.d.mts +11 -8
- package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +5 -8
- package/src/foundry/client/pixi/layers/grid/highlight.d.mts +1 -1
- package/src/foundry/client/pixi/layers/grid/layer.d.mts +6 -8
- package/src/foundry/client/pixi/layers/grid/mesh.d.mts +1 -1
- package/src/foundry/client/pixi/layers/masks/depth.d.mts +11 -6
- package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +18 -11
- package/src/foundry/client/pixi/layers/masks/vision.d.mts +100 -14
- package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +3 -6
- package/src/foundry/client/pixi/layers/placeables/index.d.mts +1 -0
- package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +4 -7
- package/src/foundry/client/pixi/layers/placeables/notes.d.mts +4 -6
- package/src/foundry/client/pixi/layers/placeables/regions.d.mts +100 -0
- package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +4 -8
- package/src/foundry/client/pixi/layers/placeables/templates.d.mts +3 -6
- package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +3 -5
- package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +6 -10
- package/src/foundry/client/pixi/layers/placeables/walls.d.mts +9 -11
- package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +53 -24
- package/src/foundry/client/pixi/perception/detection-mode.d.mts +4 -2
- package/src/foundry/client/pixi/perception/fog.d.mts +9 -0
- package/src/foundry/client/pixi/perception/vision-mode.d.mts +7 -4
- package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +42 -14
- package/src/foundry/client/pixi/placeable.d.mts +15 -7
- package/src/foundry/client/pixi/placeables/drawing.d.mts +10 -9
- package/src/foundry/client/pixi/placeables/index.d.mts +1 -0
- package/src/foundry/client/pixi/placeables/light.d.mts +8 -6
- package/src/foundry/client/pixi/placeables/note.d.mts +8 -7
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +29 -8
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +41 -11
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +59 -18
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +120 -37
- package/src/foundry/client/pixi/placeables/region.d.mts +177 -0
- package/src/foundry/client/pixi/placeables/sound.d.mts +7 -6
- package/src/foundry/client/pixi/placeables/template.d.mts +10 -10
- package/src/foundry/client/pixi/placeables/tile.d.mts +12 -10
- package/src/foundry/client/pixi/placeables/token.d.mts +147 -18
- package/src/foundry/client/pixi/placeables/wall.d.mts +11 -9
- package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +50 -33
- package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/helpers/{framebugger-snapshot.d.mts → framebuffer-snapshot.d.mts} +9 -8
- package/src/foundry/client/pixi/webgl/helpers/index.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +30 -23
- package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +82 -53
- package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +10 -10
- package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +45 -28
- package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +11 -10
- package/src/foundry/client/pixi/webgl/shaders/filters/base-mask-filter.d.mts +11 -9
- package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +21 -19
- package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +33 -32
- package/src/foundry/client/pixi/webgl/shaders/filters/environment.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +11 -10
- package/src/foundry/client/pixi/webgl/shaders/filters/invisibility.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +11 -10
- package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +65 -58
- package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +20 -16
- package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +13 -10
- package/src/foundry/client/pixi/webgl/shaders/filters/void.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/filters/weather-occlusion-masks.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +20 -14
- package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +11 -10
- package/src/foundry/client/pixi/webgl/shaders/lighting/background-lighting.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/base-lighting.d.mts +32 -32
- package/src/foundry/client/pixi/webgl/shaders/lighting/coloration-lighting.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/darkness-lighting.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/bewitching-wave.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/black-hole.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/chroma.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/emanation.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/energy-field.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/flame.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fog.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/force-grid.d.mts +9 -7
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/ghost-light.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/hexa-dome.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/light-dome.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/magical-gloom.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/pulse.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/radial-rainbow.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/revolving-light.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/roiling-mass.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/siren-light.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/smoke-patch.d.mts +19 -17
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/star-light.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/sunburst.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/swirling-rainbow.d.mts +9 -9
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/torch.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/vortex.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/wave.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/lighting/illumination-lighting.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/region/adjust-darkness-level.d.mts +70 -28
- package/src/foundry/client/pixi/webgl/shaders/region/base.d.mts +52 -8
- package/src/foundry/client/pixi/webgl/shaders/region/highlight.d.mts +68 -8
- package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +23 -24
- package/src/foundry/client/pixi/webgl/shaders/samplers/baseline-illumination.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +37 -28
- package/src/foundry/client/pixi/webgl/shaders/samplers/depth.d.mts +20 -16
- package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +19 -17
- package/src/foundry/client/pixi/webgl/shaders/samplers/primary.d.mts +9 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +29 -1
- package/src/foundry/client/pixi/webgl/shaders/vision/background-vision.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/vision/base-vision.d.mts +10 -8
- package/src/foundry/client/pixi/webgl/shaders/vision/coloration-vision.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/vision/effects/amplification.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/vision/effects/wave.d.mts +18 -16
- package/src/foundry/client/pixi/webgl/shaders/vision/illumination-vision.d.mts +9 -8
- package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +37 -32
- package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +15 -14
- package/src/foundry/client/pixi/webgl/shaders/weather/fog.d.mts +16 -15
- package/src/foundry/client/pixi/webgl/shaders/weather/rain.d.mts +18 -17
- package/src/foundry/client/pixi/webgl/shaders/weather/snow.d.mts +14 -13
- package/src/foundry/client/pixi/workers/texture-worker.d.mts +33 -53
- package/src/foundry/client/ui/dialog.d.mts +136 -125
- package/src/foundry/client/ui/drag.d.mts +1 -1
- package/src/foundry/client/ui/dragdrop.d.mts +1 -1
- package/src/foundry/client/ui/editor.d.mts +3 -3
- package/src/foundry/client/ui/filepicker.d.mts +1 -1
- package/src/foundry/client/ui/filter.d.mts +2 -2
- package/src/foundry/client/ui/index.d.mts +0 -2
- package/src/foundry/client-esm/_module.d.mts +112 -0
- package/src/foundry/client-esm/_types.d.mts +8 -0
- package/src/foundry/client-esm/applications/_module.d.mts +10 -5
- package/src/foundry/client-esm/applications/_types.d.mts +2 -2
- package/src/foundry/client-esm/applications/api/_module.d.mts +6 -5
- package/src/foundry/client-esm/applications/api/application.d.mts +207 -36
- package/src/foundry/client-esm/applications/api/category-browser.d.mts +40 -0
- package/src/foundry/client-esm/applications/api/dialog.d.mts +152 -74
- package/src/foundry/client-esm/applications/api/document-sheet.d.mts +21 -8
- package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +161 -131
- package/src/foundry/client-esm/applications/apps/_module.d.mts +9 -2
- package/src/foundry/client-esm/applications/apps/av/_module.d.mts +7 -0
- package/src/foundry/client-esm/applications/apps/av/camera-popout.d.mts +23 -0
- package/src/foundry/client-esm/applications/apps/av/cameras.d.mts +95 -0
- package/src/foundry/client-esm/applications/apps/combat-tracker-config.d.mts +21 -0
- package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +6 -5
- package/src/foundry/client-esm/applications/apps/document-ownership.d.mts +21 -0
- package/src/foundry/client-esm/applications/apps/document-sheet-config.d.mts +24 -0
- package/src/foundry/client-esm/applications/apps/file-picker.d.mts +410 -0
- package/src/foundry/client-esm/applications/apps/grid-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/apps/image-popout.d.mts +56 -0
- package/src/foundry/client-esm/applications/apps/permission-config.d.mts +4 -4
- package/src/foundry/client-esm/applications/dice/_module.d.mts +2 -2
- package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +14 -2
- package/src/foundry/client-esm/applications/elements/_module.d.mts +5 -2
- package/src/foundry/client-esm/applications/elements/codemirror/element.d.mts +16 -0
- package/src/foundry/client-esm/applications/elements/codemirror/extensions.d.mts +20 -0
- package/src/foundry/client-esm/applications/elements/codemirror/view.d.mts +8 -0
- package/src/foundry/client-esm/applications/elements/document-embed.d.mts +14 -0
- package/src/foundry/client-esm/applications/elements/document-tags.d.mts +2 -0
- package/src/foundry/client-esm/applications/elements/enriched-content.d.mts +29 -0
- package/src/foundry/client-esm/applications/elements/multi-select.d.mts +15 -5
- package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +1 -1
- package/src/foundry/client-esm/applications/elements/secret-block.d.mts +7 -0
- package/src/foundry/client-esm/applications/elements/string-tags.d.mts +1 -1
- package/src/foundry/client-esm/applications/forms/fields.d.mts +1 -1
- package/src/foundry/client-esm/applications/handlebars.d.mts +3 -0
- package/src/foundry/client-esm/applications/hud/_module.d.mts +10 -0
- package/src/foundry/client-esm/applications/hud/container.d.mts +15 -0
- package/src/foundry/client-esm/applications/hud/drawing-hud.d.mts +19 -0
- package/src/foundry/client-esm/applications/hud/placeable-hud.d.mts +41 -0
- package/src/foundry/client-esm/applications/hud/tile-hud.d.mts +19 -0
- package/src/foundry/client-esm/applications/hud/token-hud.d.mts +20 -0
- package/src/foundry/client-esm/applications/quickstart.d.mts +20 -0
- package/src/foundry/client-esm/applications/settings/_module.d.mts +7 -0
- package/src/foundry/client-esm/applications/settings/config.d.mts +21 -0
- package/src/foundry/client-esm/applications/settings/dependency-resolution.d.mts +19 -0
- package/src/foundry/client-esm/applications/settings/menus/_module.d.mts +11 -0
- package/src/foundry/client-esm/applications/settings/menus/av-config.d.mts +27 -0
- package/src/foundry/client-esm/applications/settings/menus/default-sheets-config.d.mts +19 -0
- package/src/foundry/client-esm/applications/settings/menus/dice-config.d.mts +18 -0
- package/src/foundry/client-esm/applications/settings/menus/font-config.d.mts +43 -0
- package/src/foundry/client-esm/applications/settings/menus/prototype-overrides.d.mts +21 -0
- package/src/foundry/client-esm/applications/settings/menus/ui-config.d.mts +26 -0
- package/src/foundry/client-esm/applications/sheets/_module.d.mts +30 -5
- package/src/foundry/client-esm/applications/sheets/active-effect-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/adventure-exporter.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/adventure-importer.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +3 -3
- package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +3 -3
- package/src/foundry/client-esm/applications/sheets/base-sheet.d.mts +23 -0
- package/src/foundry/client-esm/applications/sheets/card-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/cards-config.d.mts +49 -0
- package/src/foundry/client-esm/applications/sheets/combatant-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/drawing-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/folder-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/journal/_module.d.mts +16 -0
- package/src/foundry/client-esm/applications/sheets/journal/dialog-show.d.mts +19 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-category-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-hbs-sheet.d.mts +19 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-image-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-markdown-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-pdf-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-prose-mirror-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-sheet.d.mts +28 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-text-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-video-sheet.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/journal/journal-entry-sheet.d.mts +35 -0
- package/src/foundry/client-esm/applications/sheets/macro-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/note-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/playlist-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/playlist-sound-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +29 -5
- package/src/foundry/client-esm/applications/sheets/region-config.d.mts +35 -5
- package/src/foundry/client-esm/applications/sheets/roll-table-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/roll-table-sheet.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/scene-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/table-result-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/template-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/tile-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/token/_module.d.mts +7 -0
- package/src/foundry/client-esm/applications/sheets/token/mixin.d.mts +27 -0
- package/src/foundry/client-esm/applications/sheets/token/prototype-config.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/token/token-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sheets/user-config.d.mts +3 -3
- package/src/foundry/client-esm/applications/sheets/wall-config.d.mts +25 -0
- package/src/foundry/client-esm/applications/sidebar/_module.d.mts +10 -0
- package/src/foundry/client-esm/applications/sidebar/apps/_module.d.mts +15 -0
- package/src/foundry/client-esm/applications/sidebar/apps/chat-popout.d.mts +22 -0
- package/src/foundry/client-esm/applications/sidebar/apps/compendium.d.mts +21 -0
- package/src/foundry/client-esm/applications/sidebar/apps/controls-config.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/apps/folder-export.d.mts +18 -0
- package/src/foundry/client-esm/applications/sidebar/apps/frame-viewer.d.mts +22 -0
- package/src/foundry/client-esm/applications/sidebar/apps/invitation-links.d.mts +17 -0
- package/src/foundry/client-esm/applications/sidebar/apps/module-management.d.mts +21 -0
- package/src/foundry/client-esm/applications/sidebar/apps/support-details.d.mts +17 -0
- package/src/foundry/client-esm/applications/sidebar/apps/tours-management.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/apps/world-config.d.mts +19 -0
- package/src/foundry/client-esm/applications/sidebar/document-directory.d.mts +30 -0
- package/src/foundry/client-esm/applications/sidebar/sidebar-tab.d.mts +86 -0
- package/src/foundry/client-esm/applications/sidebar/sidebar.d.mts +18 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/_module.d.mts +17 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/actor-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/cards-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/chat.d.mts +19 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/combat-tracker.d.mts +19 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/compendium-directory.d.mts +19 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/item-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/journal-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/macro-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/playlist-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/roll-table-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/scene-directory.d.mts +20 -0
- package/src/foundry/client-esm/applications/sidebar/tabs/settings.d.mts +18 -0
- package/src/foundry/client-esm/applications/ui/_module.d.mts +9 -2
- package/src/foundry/client-esm/applications/ui/game-pause.d.mts +22 -0
- package/src/foundry/client-esm/applications/ui/hotbar.d.mts +29 -0
- package/src/foundry/client-esm/applications/ui/main-menu.d.mts +27 -0
- package/src/foundry/client-esm/applications/ui/notifications.d.mts +208 -0
- package/src/foundry/client-esm/applications/ui/players.d.mts +26 -0
- package/src/foundry/client-esm/applications/ui/region-legend.d.mts +48 -3
- package/src/foundry/client-esm/applications/ui/scene-controls.d.mts +20 -0
- package/src/foundry/client-esm/applications/ui/scene-navigation.d.mts +28 -0
- package/src/foundry/client-esm/applications/ux/_module.d.mts +14 -0
- package/src/foundry/client-esm/applications/ux/context-menu.d.mts +359 -0
- package/src/foundry/client-esm/applications/ux/drag-drop.d.mts +21 -0
- package/src/foundry/client-esm/applications/ux/draggable.d.mts +9 -0
- package/src/foundry/client-esm/applications/ux/form-data-extended.d.mts +17 -0
- package/src/foundry/client-esm/applications/ux/html-secret.d.mts +21 -0
- package/src/foundry/client-esm/applications/ux/prosemirror-editor.d.mts +9 -0
- package/src/foundry/client-esm/applications/ux/search-filter.d.mts +9 -0
- package/src/foundry/client-esm/applications/ux/tabs.d.mts +29 -0
- package/src/foundry/client-esm/applications/ux/text-editor.d.mts +9 -0
- package/src/foundry/client-esm/appv1/_module.d.mts +7 -0
- package/src/foundry/client-esm/appv1/api/_module.d.mts +9 -0
- package/src/foundry/client-esm/appv1/api/application-v1.d.mts +5 -0
- package/src/foundry/client-esm/appv1/api/dialog-v1.d.mts +5 -0
- package/src/foundry/client-esm/appv1/api/document-sheet-v1.d.mts +5 -0
- package/src/foundry/client-esm/appv1/api/form-application-v1.d.mts +5 -0
- package/src/foundry/client-esm/appv1/sheets/_module.d.mts +10 -0
- package/src/foundry/client-esm/appv1/sheets/actor-sheet.d.mts +5 -0
- package/src/foundry/client-esm/appv1/sheets/adventure-importer.d.mts +5 -0
- package/src/foundry/client-esm/appv1/sheets/item-sheet.d.mts +5 -0
- package/src/foundry/client-esm/appv1/sheets/journal-page-sheet.d.mts +7 -0
- package/src/foundry/client-esm/appv1/sheets/journal-sheet.d.mts +5 -0
- package/src/foundry/client-esm/audio/_module.d.mts +2 -3
- package/src/foundry/client-esm/audio/biquad.d.mts +1 -1
- package/src/foundry/client-esm/audio/convolver.d.mts +1 -1
- package/src/foundry/client-esm/audio/helper.d.mts +1 -1
- package/src/foundry/client-esm/audio/sound.d.mts +2 -2
- package/src/foundry/client-esm/av/_module.d.mts +10 -0
- package/src/foundry/client-esm/av/client.d.mts +18 -0
- package/src/foundry/client-esm/av/clients/_module.d.mts +6 -0
- package/src/foundry/client-esm/av/clients/simplepeer.d.mts +11 -0
- package/src/foundry/client-esm/av/master.d.mts +12 -0
- package/src/foundry/client-esm/av/settings.d.mts +30 -0
- package/src/foundry/client-esm/canvas/_module.d.mts +2 -2
- package/src/foundry/client-esm/canvas/edges/_module.d.mts +2 -2
- package/src/foundry/client-esm/canvas/edges/collision.d.mts +61 -18
- package/src/foundry/client-esm/canvas/edges/edge.d.mts +106 -42
- package/src/foundry/client-esm/canvas/edges/edges.d.mts +9 -0
- package/src/foundry/client-esm/canvas/edges/vertex.d.mts +51 -23
- package/src/foundry/client-esm/canvas/regions/_module.d.mts +6 -11
- package/src/foundry/client-esm/canvas/regions/geometry.d.mts +31 -0
- package/src/foundry/client-esm/canvas/regions/mesh.d.mts +61 -0
- package/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts +101 -0
- package/src/foundry/client-esm/canvas/regions/shape.d.mts +118 -0
- package/src/foundry/client-esm/canvas/scene-manager.d.mts +9 -0
- package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +2 -3
- package/src/foundry/client-esm/canvas/sources/_module.d.mts +2 -2
- package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +32 -18
- package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +53 -15
- package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +18 -3
- package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +47 -20
- package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +17 -7
- package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +26 -14
- package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +20 -4
- package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +26 -8
- package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +26 -25
- package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +89 -52
- package/src/foundry/client-esm/canvas/tokens/_module.d.mts +2 -3
- package/src/foundry/client-esm/canvas/tokens/ring-config.d.mts +113 -2
- package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +170 -3
- package/src/foundry/client-esm/canvas/tokens/ring.d.mts +189 -2
- package/src/foundry/client-esm/client.d.mts +56 -63
- package/src/foundry/client-esm/config.d.mts +1 -0
- package/src/foundry/client-esm/data/_module.d.mts +8 -3
- package/src/foundry/client-esm/data/_types.d.mts +10 -0
- package/src/foundry/client-esm/data/calendar.d.mts +213 -0
- package/src/foundry/client-esm/data/client-backend.d.mts +17 -18
- package/src/foundry/client-esm/data/combat-config.d.mts +53 -0
- package/src/foundry/client-esm/data/region-behaviors/_module.d.mts +11 -14
- package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +57 -0
- package/src/foundry/client-esm/data/region-behaviors/base.d.mts +59 -0
- package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +64 -0
- package/src/foundry/client-esm/data/region-behaviors/execute-macro.d.mts +27 -0
- package/src/foundry/client-esm/data/region-behaviors/execute-script.d.mts +23 -0
- package/src/foundry/client-esm/data/region-behaviors/pause-game.d.mts +23 -0
- package/src/foundry/client-esm/data/region-behaviors/suppress-weather.d.mts +17 -0
- package/src/foundry/client-esm/data/region-behaviors/teleport-token.d.mts +32 -0
- package/src/foundry/client-esm/data/region-behaviors/toggle-behavior.d.mts +31 -0
- package/src/foundry/client-esm/data/terrain-data.d.mts +22 -0
- package/src/foundry/client-esm/dice/_module.d.mts +2 -3
- package/src/foundry/client-esm/dice/parser.d.mts +8 -0
- package/src/foundry/client-esm/dice/roll.d.mts +64 -30
- package/src/foundry/client-esm/dice/terms/_module.d.mts +2 -3
- package/src/foundry/client-esm/dice/terms/coin.d.mts +8 -1
- package/src/foundry/client-esm/dice/terms/dice.d.mts +11 -2
- package/src/foundry/client-esm/dice/terms/die.d.mts +9 -2
- package/src/foundry/client-esm/dice/terms/fate.d.mts +9 -2
- package/src/foundry/client-esm/dice/terms/function.d.mts +5 -2
- package/src/foundry/client-esm/dice/terms/numeric.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/operator.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/pool.d.mts +15 -6
- package/src/foundry/client-esm/dice/terms/string.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/term.d.mts +12 -3
- package/src/foundry/client-esm/documents/_module.d.mts +11 -0
- package/src/foundry/client-esm/documents/_types.d.mts +8 -0
- package/src/foundry/client-esm/documents/abstract/_module.d.mts +6 -0
- package/src/foundry/client-esm/documents/collections/_module.d.mts +6 -0
- package/src/foundry/client-esm/game.d.mts +7 -0
- package/src/foundry/client-esm/helpers/_module.d.mts +2 -2
- package/src/foundry/client-esm/helpers/_types.d.mts +1 -1
- package/src/foundry/client-esm/hooks.d.mts +1 -0
- package/src/foundry/client-esm/nue/_module.d.mts +9 -0
- package/src/foundry/client-esm/nue/nue-manager.d.mts +18 -0
- package/src/foundry/client-esm/nue/tour.d.mts +9 -0
- package/src/foundry/client-esm/nue/tours/_module.d.mts +8 -0
- package/src/foundry/client-esm/nue/tours/canvas-tour.d.mts +12 -0
- package/src/foundry/client-esm/nue/tours/setup-tour.d.mts +11 -0
- package/src/foundry/client-esm/nue/tours/sidebar-tour.d.mts +11 -0
- package/src/foundry/client-esm/nue/tours-collection.d.mts +25 -0
- package/src/foundry/client-esm/packages/_module.d.mts +22 -0
- package/src/foundry/client-esm/packages/_types.d.mts +11 -0
- package/src/foundry/client-esm/packages/client-package.d.mts +11 -0
- package/src/foundry/client-esm/packages/module.d.mts +8 -0
- package/src/foundry/client-esm/packages/system.d.mts +8 -0
- package/src/foundry/client-esm/packages/world.d.mts +8 -0
- package/src/foundry/client-esm/ui.d.mts +1 -0
- package/src/foundry/client-esm/utils/_module.d.mts +7 -0
- package/src/foundry/client-esm/utils/_types.d.mts +2 -0
- package/src/foundry/client-esm/utils/helpers.d.mts +6 -0
- package/src/foundry/common/{types.d.mts → _types.d.mts} +3 -3
- package/src/foundry/common/abstract/{module.d.mts → _module.d.mts} +2 -2
- package/src/foundry/common/abstract/backend.d.mts +38 -44
- package/src/foundry/common/abstract/data.d.mts +9 -46
- package/src/foundry/common/abstract/document.d.mts +214 -139
- package/src/foundry/common/abstract/embedded-collection-delta.d.mts +1 -1
- package/src/foundry/common/abstract/embedded-collection.d.mts +37 -7
- package/src/foundry/common/abstract/socket.d.mts +1 -1
- package/src/foundry/common/abstract/type-data.d.mts +36 -25
- package/src/foundry/common/config.d.mts +3 -1
- package/src/foundry/common/constants.d.mts +234 -205
- package/src/foundry/common/data/{module.d.mts → _module.d.mts} +2 -2
- package/src/foundry/common/data/_types.d.mts +47 -0
- package/src/foundry/common/data/data.d.mts +25 -19
- package/src/foundry/common/data/fields.d.mts +366 -425
- package/src/foundry/common/data/validation-failure.d.mts +4 -6
- package/src/foundry/common/documents/_module.d.mts +4 -2
- package/src/foundry/common/documents/_types.d.mts +10 -45
- package/src/foundry/common/documents/active-effect.d.mts +5 -4
- package/src/foundry/common/documents/actor-delta.d.mts +7 -5
- package/src/foundry/common/documents/actor.d.mts +6 -19
- package/src/foundry/common/documents/adventure.d.mts +13 -2
- package/src/foundry/common/documents/ambient-light.d.mts +3 -1
- package/src/foundry/common/documents/ambient-sound.d.mts +3 -1
- package/src/foundry/common/documents/card.d.mts +6 -4
- package/src/foundry/common/documents/cards.d.mts +3 -1
- package/src/foundry/common/documents/chat-message.d.mts +10 -8
- package/src/foundry/common/documents/combat.d.mts +3 -1
- package/src/foundry/common/documents/combatant.d.mts +4 -12
- package/src/foundry/common/documents/drawing.d.mts +6 -4
- package/src/foundry/common/documents/fog-exploration.d.mts +3 -1
- package/src/foundry/common/documents/folder.d.mts +9 -1
- package/src/foundry/common/documents/item.d.mts +5 -3
- package/src/foundry/common/documents/journal-entry-page.d.mts +3 -2
- package/src/foundry/common/documents/journal-entry.d.mts +3 -1
- package/src/foundry/common/documents/macro.d.mts +5 -3
- package/src/foundry/common/documents/measured-template.d.mts +6 -8
- package/src/foundry/common/documents/module.d.mts +2 -2
- package/src/foundry/common/documents/note.d.mts +4 -2
- package/src/foundry/common/documents/playlist-sound.d.mts +4 -2
- package/src/foundry/common/documents/playlist.d.mts +3 -1
- package/src/foundry/common/documents/region-behavior.d.mts +88 -0
- package/src/foundry/common/documents/region.d.mts +108 -0
- package/src/foundry/common/documents/roll-table.d.mts +3 -1
- package/src/foundry/common/documents/scene.d.mts +9 -1
- package/src/foundry/common/documents/setting.d.mts +3 -2
- package/src/foundry/common/documents/table-result.d.mts +4 -2
- package/src/foundry/common/documents/tile.d.mts +3 -1
- package/src/foundry/common/documents/token.d.mts +15 -7
- package/src/foundry/common/documents/user.d.mts +7 -5
- package/src/foundry/common/documents/wall.d.mts +3 -1
- package/src/foundry/common/grid/_module.d.mts +3 -3
- package/src/foundry/common/grid/_types.d.mts +47 -0
- package/src/foundry/common/grid/base.d.mts +10 -14
- package/src/foundry/common/grid/gridless.d.mts +2 -2
- package/src/foundry/common/grid/hexagonal.d.mts +16 -9
- package/src/foundry/common/grid/square.d.mts +2 -2
- package/src/foundry/common/packages/{module.d.mts → _module.d.mts} +2 -2
- package/src/foundry/common/packages/_types.d.mts +25 -0
- package/src/foundry/common/packages/base-package.d.mts +6 -6
- package/src/foundry/common/packages/base-system.d.mts +19 -4
- package/src/foundry/common/packages/base-world.d.mts +2 -2
- package/src/foundry/common/packages/sub-types.d.mts +1 -1
- package/src/foundry/common/primitives/array.d.mts +1 -1
- package/src/foundry/common/primitives/number.d.mts +1 -1
- package/src/foundry/common/primitives/string.d.mts +1 -1
- package/src/foundry/common/prosemirror/_module.d.mts +15 -15
- package/src/foundry/common/prosemirror/_types.d.mts +29 -0
- package/src/foundry/common/prosemirror/dirty-plugin.d.mts +1 -1
- package/src/foundry/common/prosemirror/dom-parser.d.mts +2 -1
- package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +1 -1
- package/src/foundry/common/prosemirror/image-plugin.d.mts +1 -1
- package/src/foundry/common/prosemirror/paste-transformer.d.mts +1 -1
- package/src/foundry/common/prosemirror/plugin.d.mts +1 -1
- package/src/foundry/common/prosemirror/schema/index.d.mts +1 -1
- package/src/foundry/common/prosemirror/schema/lists.d.mts +2 -0
- package/src/foundry/common/utils/{module.d.mts → _module.d.mts} +2 -2
- package/src/foundry/common/utils/_types.d.mts +1 -0
- package/src/foundry/common/utils/bitmask.d.mts +20 -11
- package/src/foundry/common/utils/collection.d.mts +7 -19
- package/src/foundry/common/utils/color.d.mts +20 -2
- package/src/foundry/common/utils/event-emitter.d.mts +1 -1
- package/src/foundry/common/utils/helpers.d.mts +23 -13
- package/src/foundry/common/utils/string-tree.d.mts +1 -1
- package/src/foundry/common/utils/word-tree.d.mts +1 -1
- package/src/foundry/index.d.mts +0 -1
- package/src/foundry/{clipper → public/scripts/clipper}/clipper.d.mts +58 -16
- package/src/foundry/public/scripts/index.d.mts +1 -0
- package/src/foundry/public/scripts/workers/image-compressor.d.mts +23 -0
- package/src/foundry/public/scripts/workers/index.d.mts +1 -0
- package/{index-lenient.d.mts → src/index-lenient.d.mts} +2 -0
- package/src/index.d.mts +6 -0
- package/src/tsconfig.json +19 -0
- package/src/types/augments/particles.d.mts +29 -0
- package/src/types/augments/pixi.d.mts +1013 -10
- package/src/types/augments/smooth.d.mts +31 -0
- package/src/types/augments/tinyMCE.d.mts +1 -1
- package/src/types/config.d.mts +20 -312
- package/src/types/documentConfiguration.d.mts +91 -32
- package/src/types/index.d.mts +1 -1
- package/src/types/lib.d.mts +12 -0
- package/src/types/workers/image-compressor.d.mts +176 -0
- package/src/utils/index.d.mts +1091 -0
- package/index.d.mts +0 -5
- package/src/foundry/client/ui/context.d.mts +0 -213
- package/src/foundry/client/ui/notifications.d.mts +0 -136
- package/src/foundry/common/primitives/regex.d.mts +0 -12
- package/src/types/helperTypes.d.mts +0 -583
- package/src/types/utils.d.mts +0 -539
- /package/src/foundry/common/primitives/{module.d.mts → _module.d.mts} +0 -0
- /package/src/foundry/{clipper → public/scripts/clipper}/index.d.mts +0 -0
@@ -5,43 +5,49 @@ import type {
|
|
5
5
|
ConstructorData,
|
6
6
|
} from "../../../types/documentConfiguration.d.mts";
|
7
7
|
import type {
|
8
|
-
DatabaseOperationsFor,
|
9
8
|
GetKey,
|
10
9
|
InterfaceToObject,
|
11
10
|
MakeConform,
|
12
11
|
MustConform,
|
13
12
|
ToMethod,
|
14
|
-
} from "../../../types/helperTypes.mts";
|
15
|
-
import type {
|
16
13
|
AnyObject,
|
17
14
|
DeepPartial,
|
18
15
|
EmptyObject,
|
19
16
|
InexactPartial,
|
20
17
|
RemoveIndexSignatures,
|
21
|
-
|
22
|
-
|
18
|
+
FixedInstanceType,
|
19
|
+
} from "../../../utils/index.d.mts";
|
23
20
|
import type * as CONST from "../constants.mts";
|
24
21
|
import type { DataField, EmbeddedCollectionField, EmbeddedDocumentField } from "../data/fields.d.mts";
|
25
|
-
import type { fields } from "../data/
|
22
|
+
import type { fields } from "../data/_module.d.mts";
|
26
23
|
import type { LogCompatibilityWarningOptions } from "../utils/logging.mts";
|
27
24
|
import type {
|
25
|
+
DatabaseAction,
|
28
26
|
DatabaseCreateOperation,
|
29
27
|
DatabaseDeleteOperation,
|
30
28
|
DatabaseGetOperation,
|
31
29
|
DatabaseUpdateOperation,
|
30
|
+
DocumentSocketRequest,
|
32
31
|
} from "./_types.d.mts";
|
33
32
|
import type DataModel from "./data.mts";
|
33
|
+
import type DocumentSocketResponse from "./socket.d.mts";
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
declare const __DocumentBrand: unique symbol;
|
35
|
+
type DataSchema = foundry.data.fields.DataSchema;
|
38
36
|
|
39
|
-
|
40
|
-
declare const __Parent: unique symbol;
|
37
|
+
export default Document;
|
41
38
|
|
42
39
|
type _ClassMustBeAssignableToInternal = MustConform<typeof Document, Document.Internal.Constructor>;
|
43
40
|
type _InstanceMustBeAssignableToInternal = MustConform<Document.Any, Document.Internal.Instance.Any>;
|
44
41
|
|
42
|
+
type _ConfigurationFailureClassMustBeAssignableToInternal = MustConform<
|
43
|
+
Document.ConfigurationFailureClass,
|
44
|
+
Document.Internal.Constructor
|
45
|
+
>;
|
46
|
+
type _ConfigurationFailureInstanceMustBeAssignableToInternal = MustConform<
|
47
|
+
Document.ConfigurationFailureInstance,
|
48
|
+
Document.Internal.Instance.Any
|
49
|
+
>;
|
50
|
+
|
45
51
|
/**
|
46
52
|
* An extension of the base DataModel which defines a Document.
|
47
53
|
* Documents are special in that they are persisted to the database and referenced by _id.
|
@@ -51,10 +57,11 @@ declare abstract class Document<
|
|
51
57
|
Schema extends DataSchema,
|
52
58
|
Parent extends Document.Any | null = null,
|
53
59
|
> extends DataModel<Schema, Parent, InterfaceToObject<Document.ConstructionContext<Parent>>> {
|
54
|
-
static [
|
60
|
+
static [Document.Internal.DocumentBrand]: true;
|
55
61
|
|
56
|
-
[
|
57
|
-
[
|
62
|
+
[Document.Internal.DocumentName]: DocumentName;
|
63
|
+
[Document.Internal.Schema]: Schema;
|
64
|
+
[Document.Internal.Parent]: Parent;
|
58
65
|
|
59
66
|
/**
|
60
67
|
* @param data - Initial data provided to construct the Document
|
@@ -130,8 +137,6 @@ declare abstract class Document<
|
|
130
137
|
/**
|
131
138
|
* Return a reference to the implemented subclass of this base document type.
|
132
139
|
*/
|
133
|
-
// Referencing the concrete class the config is not possible because accessors cannot be generic and there is not
|
134
|
-
// static polymorphic this type
|
135
140
|
static get implementation(): Document.AnyConstructor;
|
136
141
|
|
137
142
|
/**
|
@@ -201,7 +206,7 @@ declare abstract class Document<
|
|
201
206
|
* @param user - The User being tested
|
202
207
|
* @returns Does the User have a sufficient role to create?
|
203
208
|
*/
|
204
|
-
static canUserCreate(user:
|
209
|
+
static canUserCreate(user: User): boolean;
|
205
210
|
|
206
211
|
/**
|
207
212
|
* Get the explicit permission level that a specific User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS.
|
@@ -211,7 +216,7 @@ declare abstract class Document<
|
|
211
216
|
* (default: `game.user`)
|
212
217
|
* @returns A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS or null
|
213
218
|
*/
|
214
|
-
getUserLevel(user?:
|
219
|
+
getUserLevel(user?: User): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
|
215
220
|
|
216
221
|
/**
|
217
222
|
* Test whether a certain User has a requested permission level (or greater) over the Document
|
@@ -221,7 +226,7 @@ declare abstract class Document<
|
|
221
226
|
* @returns Does the user have this permission level over the Document?
|
222
227
|
*/
|
223
228
|
testUserPermission(
|
224
|
-
user:
|
229
|
+
user: User,
|
225
230
|
permission: keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS | CONST.DOCUMENT_OWNERSHIP_LEVELS,
|
226
231
|
options?: InexactPartial<{
|
227
232
|
/**
|
@@ -240,7 +245,7 @@ declare abstract class Document<
|
|
240
245
|
* (default: `{}`)
|
241
246
|
* @returns Does the User have permission?
|
242
247
|
*/
|
243
|
-
canUserModify(user:
|
248
|
+
canUserModify(user: User, action: "create" | "update" | "delete", data?: object): boolean;
|
244
249
|
|
245
250
|
/**
|
246
251
|
* Clone a document, creating a new document by combining current data with provided overrides.
|
@@ -321,8 +326,10 @@ declare abstract class Document<
|
|
321
326
|
*/
|
322
327
|
static createDocuments<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
|
323
328
|
this: T,
|
324
|
-
data: Array<Document.ConstructorDataFor<T
|
325
|
-
operation?: InexactPartial<
|
329
|
+
data: Array<Document.ConstructorDataFor<NoInfer<T>>>,
|
330
|
+
operation?: InexactPartial<
|
331
|
+
Omit<Document.Database.OperationOf<NoInfer<T>["metadata"]["name"], "create">, "data">
|
332
|
+
> & {
|
326
333
|
temporary?: Temporary;
|
327
334
|
},
|
328
335
|
): Promise<Document.ToStoredIf<T, Temporary>[] | undefined>;
|
@@ -364,8 +371,10 @@ declare abstract class Document<
|
|
364
371
|
*/
|
365
372
|
static updateDocuments<T extends Document.AnyConstructor>(
|
366
373
|
this: T,
|
367
|
-
updates?: Array<DeepPartial<Document.UpdateDataFor<T
|
368
|
-
operation?: InexactPartial<
|
374
|
+
updates?: Array<DeepPartial<Document.UpdateDataFor<NoInfer<T>>>>,
|
375
|
+
operation?: InexactPartial<
|
376
|
+
Omit<Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "update">, "updates">
|
377
|
+
>,
|
369
378
|
): Promise<Document.ToConfiguredInstance<T>[]>;
|
370
379
|
|
371
380
|
/**
|
@@ -408,7 +417,9 @@ declare abstract class Document<
|
|
408
417
|
static deleteDocuments<T extends Document.AnyConstructor>(
|
409
418
|
this: T,
|
410
419
|
ids?: string[],
|
411
|
-
operation?: InexactPartial<
|
420
|
+
operation?: InexactPartial<
|
421
|
+
Omit<Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "delete">, "ids">
|
422
|
+
>,
|
412
423
|
): Promise<Document.ToConfiguredInstance<T>[]>;
|
413
424
|
|
414
425
|
/**
|
@@ -442,8 +453,10 @@ declare abstract class Document<
|
|
442
453
|
*/
|
443
454
|
static create<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
|
444
455
|
this: T,
|
445
|
-
data: Document.ConstructorDataFor<T
|
446
|
-
operation?: InexactPartial<
|
456
|
+
data: Document.ConstructorDataFor<NoInfer<T>> | Document.ConstructorDataFor<NoInfer<T>>[],
|
457
|
+
operation?: InexactPartial<
|
458
|
+
Omit<Document.Database.OperationOf<NoInfer<T>["metadata"]["name"], "create">, "data">
|
459
|
+
> & {
|
447
460
|
temporary?: Temporary;
|
448
461
|
},
|
449
462
|
): Promise<Document.ToStoredIf<T, Temporary> | undefined>;
|
@@ -462,7 +475,7 @@ declare abstract class Document<
|
|
462
475
|
update(
|
463
476
|
// TODO: Determine if this is Partial, DeepPartial, or InexactPartial.
|
464
477
|
data?: Partial<Document.ConstructorDataForSchema<Schema>>,
|
465
|
-
operation?: InexactPartial<Omit<
|
478
|
+
operation?: InexactPartial<Omit<Document.Database.OperationOf<DocumentName, "update">, "updates">>,
|
466
479
|
): Promise<this | undefined>;
|
467
480
|
|
468
481
|
/**
|
@@ -475,7 +488,7 @@ declare abstract class Document<
|
|
475
488
|
* @remarks If no document has actually been deleted, the returned {@link Promise} resolves to `undefined`.
|
476
489
|
*/
|
477
490
|
delete(
|
478
|
-
operation?: InexactPartial<Omit<
|
491
|
+
operation?: InexactPartial<Omit<Document.Database.OperationOf<DocumentName, "delete">, "ids">>,
|
479
492
|
): Promise<this | undefined>;
|
480
493
|
|
481
494
|
/**
|
@@ -511,10 +524,9 @@ declare abstract class Document<
|
|
511
524
|
* @returns The Collection instance of embedded Documents of the requested type
|
512
525
|
* @remarks Usually returns some form of DocumentCollection, but not always (e.g. Token["actors"])
|
513
526
|
*/
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
>(embeddedName: EmbeddedName): Collection<Document.ConfiguredInstanceForName<EmbeddedName>>;
|
527
|
+
getEmbeddedCollection<EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES>(
|
528
|
+
embeddedName: EmbeddedName,
|
529
|
+
): Collection<Document.ConfiguredInstanceForName<EmbeddedName>>;
|
518
530
|
|
519
531
|
/**
|
520
532
|
* Get an embedded document by its id from a named collection in the parent document.
|
@@ -551,7 +563,6 @@ declare abstract class Document<
|
|
551
563
|
* (default: `{}`)
|
552
564
|
* @returns An array of created Document instances
|
553
565
|
*/
|
554
|
-
// TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
|
555
566
|
// TODO: I think we could do a better job on all the embedded methods of limiting the types here based on the
|
556
567
|
// allowed embedded types of the parent (vs. allowing any document to create embedded
|
557
568
|
// documents of any type)
|
@@ -561,7 +572,7 @@ declare abstract class Document<
|
|
561
572
|
>(
|
562
573
|
embeddedName: EmbeddedName,
|
563
574
|
data?: Array<Document.ConstructorDataForName<Extract<EmbeddedName, Document.Type>>>,
|
564
|
-
operation?: InexactPartial<
|
575
|
+
operation?: InexactPartial<Document.Database.OperationOf<Extract<EmbeddedName, Document.Type>, "create">> & {
|
565
576
|
temporary?: Temporary;
|
566
577
|
},
|
567
578
|
): Promise<Array<Document.ConfiguredInstanceForName<Extract<EmbeddedName, Document.Type>>> | undefined>;
|
@@ -576,7 +587,6 @@ declare abstract class Document<
|
|
576
587
|
* (default: `{}`)
|
577
588
|
* @returns An array of updated Document instances
|
578
589
|
*/
|
579
|
-
// TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
|
580
590
|
updateEmbeddedDocuments<EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES>(
|
581
591
|
embeddedName: EmbeddedName,
|
582
592
|
updates?: Array<AnyObject>,
|
@@ -592,13 +602,10 @@ declare abstract class Document<
|
|
592
602
|
* (default: `{}`)
|
593
603
|
* @returns An array of deleted Document instances
|
594
604
|
*/
|
595
|
-
|
596
|
-
deleteEmbeddedDocuments<
|
597
|
-
EmbeddedName extends Exclude<foundry.CONST.EMBEDDED_DOCUMENT_TYPES, "Region" | "RegionBehavior">,
|
598
|
-
>(
|
605
|
+
deleteEmbeddedDocuments<EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES>(
|
599
606
|
embeddedName: EmbeddedName,
|
600
607
|
ids: Array<string>,
|
601
|
-
operation?:
|
608
|
+
operation?: Document.Database.OperationOf<DocumentName, "delete">,
|
602
609
|
): Promise<Array<Document.Stored<Document.ConfiguredInstanceForName<EmbeddedName>>>>;
|
603
610
|
|
604
611
|
/**
|
@@ -665,7 +672,7 @@ declare abstract class Document<
|
|
665
672
|
protected _preCreate(
|
666
673
|
data: fields.SchemaField.AssignmentType<Schema>,
|
667
674
|
options: Document.PreCreateOptions<DocumentName>,
|
668
|
-
user:
|
675
|
+
user: User,
|
669
676
|
): Promise<boolean | void>;
|
670
677
|
|
671
678
|
/**
|
@@ -697,9 +704,9 @@ declare abstract class Document<
|
|
697
704
|
*/
|
698
705
|
protected static _preCreateOperation<T extends Document.AnyConstructor>(
|
699
706
|
this: T,
|
700
|
-
documents: Document.ToConfiguredInstance<T
|
701
|
-
operation:
|
702
|
-
user:
|
707
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
708
|
+
operation: Document.Database.OperationOf<NoInfer<T>["metadata"]["name"], "create">,
|
709
|
+
user: User,
|
703
710
|
): Promise<boolean | void>;
|
704
711
|
|
705
712
|
/**
|
@@ -714,9 +721,9 @@ declare abstract class Document<
|
|
714
721
|
*/
|
715
722
|
protected static _onCreateOperation<T extends Document.AnyConstructor>(
|
716
723
|
this: T,
|
717
|
-
documents:
|
718
|
-
operation:
|
719
|
-
user:
|
724
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
725
|
+
operation: Document.Database.OperationOf<NoInfer<T>["metadata"]["name"], "create">,
|
726
|
+
user: User,
|
720
727
|
): Promise<void>;
|
721
728
|
|
722
729
|
/**
|
@@ -730,7 +737,7 @@ declare abstract class Document<
|
|
730
737
|
protected _preUpdate(
|
731
738
|
changed: fields.SchemaField.AssignmentType<Schema>,
|
732
739
|
options: Document.PreUpdateOptions<DocumentName>,
|
733
|
-
user:
|
740
|
+
user: User,
|
734
741
|
): Promise<boolean | void>;
|
735
742
|
|
736
743
|
/**
|
@@ -741,7 +748,7 @@ declare abstract class Document<
|
|
741
748
|
* @param userId - The id of the User requesting the document update
|
742
749
|
*/
|
743
750
|
protected _onUpdate(
|
744
|
-
changed: fields.SchemaField.
|
751
|
+
changed: fields.SchemaField.InnerUpdateData<Schema>,
|
745
752
|
options: Document.OnUpdateOptions<DocumentName>,
|
746
753
|
userId: string,
|
747
754
|
): void;
|
@@ -763,9 +770,9 @@ declare abstract class Document<
|
|
763
770
|
*/
|
764
771
|
protected static _preUpdateOperation<T extends Document.AnyConstructor>(
|
765
772
|
this: T,
|
766
|
-
documents:
|
767
|
-
operation:
|
768
|
-
user:
|
773
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
774
|
+
operation: Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "update">,
|
775
|
+
user: User,
|
769
776
|
): Promise<boolean | void>;
|
770
777
|
|
771
778
|
/**
|
@@ -780,9 +787,9 @@ declare abstract class Document<
|
|
780
787
|
*/
|
781
788
|
protected static _onUpdateOperation<T extends Document.AnyConstructor>(
|
782
789
|
this: T,
|
783
|
-
documents:
|
784
|
-
operation:
|
785
|
-
user:
|
790
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
791
|
+
operation: Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "update">,
|
792
|
+
user: User,
|
786
793
|
): Promise<void>;
|
787
794
|
|
788
795
|
/**
|
@@ -792,10 +799,7 @@ declare abstract class Document<
|
|
792
799
|
* @param user - The User requesting the document deletion
|
793
800
|
* @returns A return value of false indicates the delete operation should be cancelled
|
794
801
|
*/
|
795
|
-
protected _preDelete(
|
796
|
-
options: Document.PreDeleteOptions<DocumentName>,
|
797
|
-
user: foundry.documents.BaseUser,
|
798
|
-
): Promise<boolean | void>;
|
802
|
+
protected _preDelete(options: Document.PreDeleteOptions<DocumentName>, user: User): Promise<boolean | void>;
|
799
803
|
|
800
804
|
/**
|
801
805
|
* Perform follow-up operations after a Document of this type is deleted.
|
@@ -823,9 +827,9 @@ declare abstract class Document<
|
|
823
827
|
*/
|
824
828
|
protected static _preDeleteOperation<T extends Document.AnyConstructor>(
|
825
829
|
this: T,
|
826
|
-
documents:
|
827
|
-
operation:
|
828
|
-
user:
|
830
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
831
|
+
operation: Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "delete">,
|
832
|
+
user: User,
|
829
833
|
): Promise<unknown>;
|
830
834
|
|
831
835
|
/**
|
@@ -840,9 +844,9 @@ declare abstract class Document<
|
|
840
844
|
*/
|
841
845
|
protected static _onDeleteOperation<T extends Document.AnyConstructor>(
|
842
846
|
this: T,
|
843
|
-
documents:
|
844
|
-
operation:
|
845
|
-
user:
|
847
|
+
documents: Document.ToConfiguredInstance<NoInfer<T>>[],
|
848
|
+
operation: Document.Database.OperationOf<FixedInstanceType<NoInfer<T>>["documentName"], "delete">,
|
849
|
+
user: User,
|
846
850
|
): Promise<unknown>;
|
847
851
|
|
848
852
|
/**
|
@@ -894,7 +898,7 @@ declare abstract class Document<
|
|
894
898
|
*/
|
895
899
|
protected static _onCreateDocuments<T extends Document.AnyConstructor>(
|
896
900
|
this: T,
|
897
|
-
documents: Array<Document.ToConfiguredInstance<T
|
901
|
+
documents: Array<Document.ToConfiguredInstance<NoInfer<T>>>,
|
898
902
|
context: Document.ModificationContext<Document.Any | null>,
|
899
903
|
): Promise<void>;
|
900
904
|
|
@@ -904,7 +908,7 @@ declare abstract class Document<
|
|
904
908
|
*/
|
905
909
|
protected static _onUpdateDocuments<T extends Document.AnyConstructor>(
|
906
910
|
this: T,
|
907
|
-
documents: Array<Document.ToConfiguredInstance<T
|
911
|
+
documents: Array<Document.ToConfiguredInstance<NoInfer<T>>>,
|
908
912
|
context: Document.ModificationContext<Document.Any | null>,
|
909
913
|
): Promise<unknown>;
|
910
914
|
|
@@ -914,7 +918,7 @@ declare abstract class Document<
|
|
914
918
|
*/
|
915
919
|
protected static _onDeleteDocuments<T extends Document.AnyConstructor>(
|
916
920
|
this: T,
|
917
|
-
documents: Array<Document.ToConfiguredInstance<T
|
921
|
+
documents: Array<Document.ToConfiguredInstance<NoInfer<T>>>,
|
918
922
|
context: Document.ModificationContext<Document.Any | null>,
|
919
923
|
): Promise<unknown>;
|
920
924
|
}
|
@@ -922,9 +926,9 @@ declare abstract class Document<
|
|
922
926
|
declare abstract class AnyDocument extends Document<any, any, any> {
|
923
927
|
constructor(arg0: never, ...args: never[]);
|
924
928
|
|
925
|
-
// Note(LukeAbby): Specifically adding the `
|
929
|
+
// Note(LukeAbby): Specifically adding the `DocumentBrand` should be redundant but in practice it seems to help tsc more efficiently deduce that it's actually inheriting from `Document`.
|
926
930
|
// This is odd but probably is because it bails from looking up the parent class properties at times or something.
|
927
|
-
static [
|
931
|
+
static [Document.Internal.DocumentBrand]: true;
|
928
932
|
|
929
933
|
flags?: unknown;
|
930
934
|
|
@@ -934,11 +938,17 @@ declare abstract class AnyDocument extends Document<any, any, any> {
|
|
934
938
|
// Note(LukeAbby): The point of this class is to show up in intellisense.
|
935
939
|
// When something fails to be configured it should be replaced with `typeof ConfigurationFailure & typeof Item` or whatever the relevant class is.
|
936
940
|
// This helps to minimize the number of errors that appears in a repo with broken configuration as they can be very misleading and confusing.
|
937
|
-
declare abstract class ConfigurationFailure extends AnyDocument {
|
941
|
+
declare abstract class ConfigurationFailure extends AnyDocument {
|
942
|
+
static [Document.Internal.DocumentBrand]: true;
|
943
|
+
}
|
938
944
|
|
939
945
|
declare namespace Document {
|
940
946
|
/** Any Document, except for Settings */
|
941
947
|
type Any = AnyDocument;
|
948
|
+
type AnyConstructor = typeof AnyDocument;
|
949
|
+
|
950
|
+
type ConfigurationFailureClass = typeof ConfigurationFailure;
|
951
|
+
type ConfigurationFailureInstance = ConfigurationFailure;
|
942
952
|
|
943
953
|
type Type =
|
944
954
|
| "ActiveEffect"
|
@@ -958,6 +968,8 @@ declare namespace Document {
|
|
958
968
|
| "Macro"
|
959
969
|
| "PlaylistSound"
|
960
970
|
| "Playlist"
|
971
|
+
| "RegionBehavior"
|
972
|
+
| "Region"
|
961
973
|
| "RollTable"
|
962
974
|
| "Scene"
|
963
975
|
| "Setting"
|
@@ -972,6 +984,7 @@ declare namespace Document {
|
|
972
984
|
| "Drawing"
|
973
985
|
| "MeasuredTemplate"
|
974
986
|
| "Note"
|
987
|
+
| "Region"
|
975
988
|
| "Tile"
|
976
989
|
| "Token"
|
977
990
|
| "Wall";
|
@@ -989,10 +1002,14 @@ declare namespace Document {
|
|
989
1002
|
| "Combat"
|
990
1003
|
| "Combatant"
|
991
1004
|
| "Item"
|
992
|
-
| "JournalEntryPage"
|
1005
|
+
| "JournalEntryPage"
|
1006
|
+
| "RegionBehavior";
|
993
1007
|
|
994
1008
|
type EmbeddableNamesFor<ConcreteDocument extends Document.Internal.Instance.Any> = {
|
995
|
-
[K in keyof ConfiguredDocuments]: IsParentOf<
|
1009
|
+
[K in keyof ConfiguredDocuments]: IsParentOf<
|
1010
|
+
ConcreteDocument,
|
1011
|
+
FixedInstanceType<ConfiguredDocuments[K]>
|
1012
|
+
> extends true
|
996
1013
|
? K
|
997
1014
|
: never;
|
998
1015
|
};
|
@@ -1002,25 +1019,44 @@ declare namespace Document {
|
|
1002
1019
|
ChildDocument extends Document.Internal.Instance.Any,
|
1003
1020
|
> = ParentDocument extends Internal.ParentFor<ChildDocument> ? true : false;
|
1004
1021
|
|
1022
|
+
type SocketRequest<Action extends DatabaseAction> = DocumentSocketRequest<Action>;
|
1023
|
+
type SocketResponse<Action extends DatabaseAction> = DocumentSocketResponse<Action>;
|
1024
|
+
|
1005
1025
|
// Documented at https://gist.github.com/LukeAbby/c7420b053d881db4a4d4496b95995c98
|
1006
1026
|
namespace Internal {
|
1027
|
+
const DocumentBrand: unique symbol;
|
1028
|
+
|
1029
|
+
const DocumentName: unique symbol;
|
1030
|
+
const Schema: unique symbol;
|
1031
|
+
const Parent: unique symbol;
|
1032
|
+
|
1033
|
+
// This metadata is called "simple" because where there should be proper references to the
|
1034
|
+
// current document there is instead `Document.Any`. This helps simplify loops.
|
1035
|
+
// Use cases should be limited to when these references aren't needed.
|
1007
1036
|
type SimpleMetadata<Name extends Document.Type> = ConfiguredMetadata<Document.Any>[Name];
|
1008
1037
|
|
1009
1038
|
type Constructor = (abstract new (arg0: never, ...args: never[]) => Instance.Any) & {
|
1010
|
-
[
|
1039
|
+
[DocumentBrand]: true;
|
1011
1040
|
};
|
1012
1041
|
|
1013
|
-
interface Instance<
|
1014
|
-
|
1015
|
-
|
1042
|
+
interface Instance<
|
1043
|
+
DocumentName extends Document.Type,
|
1044
|
+
Schema extends DataSchema,
|
1045
|
+
Parent extends Document.Internal.Instance.Any | null,
|
1046
|
+
> {
|
1047
|
+
[DocumentName]: DocumentName;
|
1048
|
+
[Schema]: Schema;
|
1049
|
+
[Parent]: Parent;
|
1016
1050
|
}
|
1017
1051
|
|
1018
|
-
type
|
1052
|
+
type DocumentNameFor<ConcreteInstance extends Instance.Any> = ConcreteInstance[typeof DocumentName];
|
1019
1053
|
|
1020
|
-
type
|
1054
|
+
type SchemaFor<ConcreteInstance extends Instance.Any> = ConcreteInstance[typeof Schema];
|
1055
|
+
|
1056
|
+
type ParentFor<ConcreteInstance extends Instance.Any> = ConcreteInstance[typeof Parent];
|
1021
1057
|
|
1022
1058
|
namespace Instance {
|
1023
|
-
type Any = Instance<any, any>;
|
1059
|
+
type Any = Instance<any, any, any>;
|
1024
1060
|
|
1025
1061
|
type Complete<T extends Any> = T extends Document.Any ? T : never;
|
1026
1062
|
}
|
@@ -1029,8 +1065,6 @@ declare namespace Document {
|
|
1029
1065
|
/** Any Document, that is a child of the given parent Document. */
|
1030
1066
|
type AnyChild<Parent extends Any | null> = Document<any, any, Parent>;
|
1031
1067
|
|
1032
|
-
type AnyConstructor = typeof AnyDocument;
|
1033
|
-
|
1034
1068
|
/**
|
1035
1069
|
* Returns the type of the constructor data for the given {@link foundry.abstract.Document}.
|
1036
1070
|
*/
|
@@ -1054,11 +1088,9 @@ declare namespace Document {
|
|
1054
1088
|
metadata: { name: SystemType };
|
1055
1089
|
};
|
1056
1090
|
|
1057
|
-
// TODO(LukeAbby): Look into this. Inconsistent name, deprecate?
|
1058
|
-
type ConfiguredClass<T extends { metadata: Metadata.Any }> = ConfiguredClassForName<T["metadata"]["name"]>;
|
1059
|
-
|
1060
1091
|
type ConfiguredClassForName<Name extends Type> = MakeConform<
|
1061
1092
|
ConfiguredDocuments[Name],
|
1093
|
+
Document.Internal.Constructor,
|
1062
1094
|
typeof ConfigurationFailure & DefaultDocuments[Name]
|
1063
1095
|
>;
|
1064
1096
|
|
@@ -1068,28 +1100,17 @@ declare namespace Document {
|
|
1068
1100
|
// NOTE(LukeAbby): This type is less DRY than it could be to avoid undue complexity in such a critical helpeer.
|
1069
1101
|
// This has _many_ times been seen to cause loops so this type is written in an intentionally more paranoid way.
|
1070
1102
|
// The reason for the verbosity and repetition is to avoid eagerly evaluating any branches that might cause a loop.
|
1071
|
-
type ToConfiguredClass<ConcreteDocument extends Document.Internal.Constructor> =
|
1072
|
-
NameFor<ConcreteDocument>
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
>
|
1077
|
-
: DefaultDocuments[NameFor<ConcreteDocument>];
|
1078
|
-
|
1079
|
-
type ToConfiguredInstance<ConcreteDocument extends Document.Internal.Constructor> =
|
1080
|
-
ConfiguredDocuments[NameFor<ConcreteDocument>] extends Document.AnyConstructor
|
1081
|
-
? _CheckConfiguredInstance<
|
1082
|
-
NameFor<ConcreteDocument>,
|
1083
|
-
InstanceType<ConfiguredDocuments[NameFor<ConcreteDocument>]>
|
1084
|
-
>
|
1085
|
-
: InstanceType<DefaultDocuments[NameFor<ConcreteDocument>]>;
|
1103
|
+
type ToConfiguredClass<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
|
1104
|
+
ConfiguredDocuments[NameFor<ConcreteDocument>],
|
1105
|
+
Document.AnyConstructor,
|
1106
|
+
typeof ConfigurationFailure & DefaultDocuments[NameFor<ConcreteDocument>]
|
1107
|
+
>;
|
1086
1108
|
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
: ConfigurationFailure & DefaultDocuments[Name];
|
1109
|
+
type ToConfiguredInstance<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
|
1110
|
+
FixedInstanceType<ConfiguredDocuments[NameFor<ConcreteDocument>]>,
|
1111
|
+
Document.Any,
|
1112
|
+
ConfigurationFailure & FixedInstanceType<DefaultDocuments[NameFor<ConcreteDocument>]>
|
1113
|
+
>;
|
1093
1114
|
|
1094
1115
|
type ToConfiguredStored<D extends Document.Internal.Constructor> = Stored<ToConfiguredInstance<D>>;
|
1095
1116
|
|
@@ -1113,12 +1134,12 @@ declare namespace Document {
|
|
1113
1134
|
: never;
|
1114
1135
|
|
1115
1136
|
type ConfiguredInstanceForName<Name extends Type> = MakeConform<
|
1116
|
-
|
1137
|
+
FixedInstanceType<ConfiguredDocuments[Name]>,
|
1117
1138
|
Document.Any
|
1118
1139
|
>;
|
1119
1140
|
|
1120
1141
|
type ConfiguredObjectClassForName<Name extends PlaceableType> = CONFIG[Name]["objectClass"];
|
1121
|
-
type ConfiguredObjectInstanceForName<Name extends PlaceableType> =
|
1142
|
+
type ConfiguredObjectInstanceForName<Name extends PlaceableType> = FixedInstanceType<CONFIG[Name]["objectClass"]>;
|
1122
1143
|
|
1123
1144
|
type ConfiguredDataForName<Name extends Type> = GetKey<DataConfig, Name, EmptyObject>;
|
1124
1145
|
|
@@ -1133,7 +1154,7 @@ declare namespace Document {
|
|
1133
1154
|
: T;
|
1134
1155
|
|
1135
1156
|
type SchemaFor<ConcreteDocument extends Internal.Instance.Any> =
|
1136
|
-
ConcreteDocument extends Internal.Instance<infer Schema,
|
1157
|
+
ConcreteDocument extends Internal.Instance<infer _1, infer Schema, infer _2> ? Schema : never;
|
1137
1158
|
|
1138
1159
|
type MetadataFor<ConcreteDocument extends Document.Internal.Instance.Any> =
|
1139
1160
|
ConfiguredMetadata<ConcreteDocument>[ConcreteDocument extends {
|
@@ -1148,11 +1169,12 @@ declare namespace Document {
|
|
1148
1169
|
|
1149
1170
|
type Flags<ConcreteDocument extends Internal.Instance.Any> = OptionsForSchema<SchemaFor<ConcreteDocument>>;
|
1150
1171
|
|
1151
|
-
|
1172
|
+
/** @internal */
|
1173
|
+
interface OptionsInFlags<Options extends DataField.Options.Any> {
|
1152
1174
|
readonly flags?: DataField<Options, any>;
|
1153
1175
|
}
|
1154
1176
|
|
1155
|
-
// These
|
1177
|
+
// These types only exists to simplify solving the `Document` type. Using `Document.Flags<this>` means the constraint `this extends Document.Any` has to be proved.
|
1156
1178
|
// This is much more complex than proving the constraint for `Document.FlagsInternal<Schema>` that `Schema extends DataSchema`.
|
1157
1179
|
|
1158
1180
|
// TODO: This needs to use the derived flags not just how they're initialized.
|
@@ -1295,29 +1317,29 @@ declare namespace Document {
|
|
1295
1317
|
type ModificationOptions = Omit<Document.ModificationContext<Document.Any | null>, "parent" | "pack">;
|
1296
1318
|
|
1297
1319
|
type PreCreateOptions<Name extends Type> = Omit<
|
1298
|
-
|
1320
|
+
Document.Database.OperationOf<Name, "create">,
|
1299
1321
|
"data" | "noHook" | "pack" | "parent"
|
1300
1322
|
>;
|
1301
1323
|
type OnCreateOptions<Name extends Type> = Omit<
|
1302
|
-
|
1324
|
+
Document.Database.OperationOf<Name, "create">,
|
1303
1325
|
"pack" | "parentUuid" | "syntheticActorUpdate"
|
1304
1326
|
>;
|
1305
1327
|
|
1306
1328
|
type PreUpdateOptions<Name extends Type> = Omit<
|
1307
|
-
|
1329
|
+
Document.Database.OperationOf<Name, "update">,
|
1308
1330
|
"updates" | "restoreDelta" | "noHook" | "parent" | "pack"
|
1309
1331
|
>;
|
1310
1332
|
type OnUpdateOptions<Name extends Type> = Omit<
|
1311
|
-
|
1333
|
+
Document.Database.OperationOf<Name, "update">,
|
1312
1334
|
"pack" | "parentUuid" | "syntheticActorUpdate"
|
1313
1335
|
>;
|
1314
1336
|
|
1315
1337
|
type PreDeleteOptions<Name extends Type> = Omit<
|
1316
|
-
|
1338
|
+
Document.Database.OperationOf<Name, "delete">,
|
1317
1339
|
"ids" | "deleteAll" | "noHook" | "pack" | "parent"
|
1318
1340
|
>;
|
1319
1341
|
type OnDeleteOptions<Name extends Type> = Omit<
|
1320
|
-
|
1342
|
+
Document.Database.OperationOf<Name, "delete">,
|
1321
1343
|
"deleteAll" | "pack" | "parentUuid" | "syntheticActorUpdate"
|
1322
1344
|
>;
|
1323
1345
|
|
@@ -1333,17 +1355,9 @@ declare namespace Document {
|
|
1333
1355
|
readonly coreTypes: readonly string[];
|
1334
1356
|
readonly embedded: Record<string, string>;
|
1335
1357
|
readonly permissions: {
|
1336
|
-
create:
|
1337
|
-
|
1338
|
-
|
1339
|
-
(user: foundry.documents.BaseUser, doc: ThisType, data: Document.ConstructorDataForName<Type>) => boolean
|
1340
|
-
>;
|
1341
|
-
update:
|
1342
|
-
| string
|
1343
|
-
| ToMethod<
|
1344
|
-
(user: foundry.documents.BaseUser, doc: ThisType, data: Document.UpdateDataForName<Type>) => boolean
|
1345
|
-
>;
|
1346
|
-
delete: string | ToMethod<(user: foundry.documents.BaseUser, doc: ThisType, data: EmptyObject) => boolean>;
|
1358
|
+
create: string | ToMethod<(user: User, doc: ThisType, data: Document.ConstructorDataForName<Type>) => boolean>;
|
1359
|
+
update: string | ToMethod<(user: User, doc: ThisType, data: Document.UpdateDataForName<Type>) => boolean>;
|
1360
|
+
delete: string | ToMethod<(user: User, doc: ThisType, data: EmptyObject) => boolean>;
|
1347
1361
|
};
|
1348
1362
|
readonly preserveOnImport?: readonly string[] | undefined;
|
1349
1363
|
readonly schemaVersion: string | undefined;
|
@@ -1371,23 +1385,85 @@ declare namespace Document {
|
|
1371
1385
|
pack: null;
|
1372
1386
|
}
|
1373
1387
|
}
|
1388
|
+
|
1389
|
+
/**
|
1390
|
+
* @deprecated {@link Document.Database.OperationOf | `Document.Database.OperationOf`}
|
1391
|
+
*/
|
1392
|
+
type DatabaseOperationsFor<
|
1393
|
+
Name extends Document.Type,
|
1394
|
+
ConcreteOperation extends Document.Database.Operation,
|
1395
|
+
> = Document.Database.OperationOf<Name, ConcreteOperation>;
|
1396
|
+
|
1397
|
+
type ConfiguredSheetClassFor<Name extends Document.Type> = MakeConform<
|
1398
|
+
GetKey<GetKey<CONFIG, Name>, "sheetClass">,
|
1399
|
+
AnyConstructor
|
1400
|
+
>;
|
1401
|
+
|
1402
|
+
type ConfiguredObjectClassFor<Name extends Document.Type> = GetKey<GetKey<CONFIG, Name>, "objectClass">;
|
1403
|
+
|
1404
|
+
type ConfiguredLayerClassFor<Name extends Document.Type> = GetKey<GetKey<CONFIG, Name>, "layerClass">;
|
1405
|
+
|
1406
|
+
type DropData<T extends Document.Any> = T extends { id: string | undefined }
|
1407
|
+
? DropData.Data<T> & DropData.UUID
|
1408
|
+
: DropData.Data<T>;
|
1409
|
+
|
1410
|
+
namespace DropData {
|
1411
|
+
type Any = DropData<any>;
|
1412
|
+
|
1413
|
+
interface Data<T extends Document.Any> {
|
1414
|
+
type: T["documentName"];
|
1415
|
+
data: T["_source"];
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
interface UUID {
|
1419
|
+
uuid: string;
|
1420
|
+
}
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
namespace Database {
|
1424
|
+
type Operation = "create" | "update" | "delete";
|
1425
|
+
|
1426
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
1427
|
+
interface Operations<
|
1428
|
+
T extends Document.Internal.Instance.Any = Document.Internal.Instance.Any,
|
1429
|
+
ExtraCreateOptions extends AnyObject = {},
|
1430
|
+
ExtraUpdateOptions extends AnyObject = {},
|
1431
|
+
ExtraDeleteOptions extends AnyObject = {},
|
1432
|
+
> {
|
1433
|
+
create: DatabaseCreateOperation<T> & InexactPartial<ExtraCreateOptions>;
|
1434
|
+
update: DatabaseUpdateOperation<T> & InexactPartial<ExtraUpdateOptions>;
|
1435
|
+
delete: DatabaseDeleteOperation & InexactPartial<ExtraDeleteOptions>;
|
1436
|
+
}
|
1437
|
+
/* eslint-enable @typescript-eslint/no-empty-object-type */
|
1438
|
+
|
1439
|
+
/**
|
1440
|
+
* This is a helper type that gets the right DatabaseOperation (including the
|
1441
|
+
* proper options) for a particular Document type.
|
1442
|
+
*/
|
1443
|
+
type OperationOf<
|
1444
|
+
T extends Document.Type,
|
1445
|
+
Operation extends Database.Operation,
|
1446
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
1447
|
+
> = DatabaseOperationMap[T][Operation];
|
1448
|
+
}
|
1374
1449
|
}
|
1375
1450
|
|
1376
|
-
|
1451
|
+
/** @deprecated {@link Document.Database.Operation | `Document.Database.Operation`} */
|
1452
|
+
export type Operation = Document.Database.Operation;
|
1377
1453
|
|
1378
1454
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
1379
|
-
|
1455
|
+
/** @deprecated {@link Document.Database.Operations | `Document.Database.Operations`} */
|
1456
|
+
export type DocumentDatabaseOperations<
|
1380
1457
|
T extends Document.Internal.Instance.Any = Document.Internal.Instance.Any,
|
1381
1458
|
ExtraCreateOptions extends AnyObject = {},
|
1382
1459
|
ExtraUpdateOptions extends AnyObject = {},
|
1383
1460
|
ExtraDeleteOptions extends AnyObject = {},
|
1384
|
-
>
|
1385
|
-
create: DatabaseCreateOperation<T> & InexactPartial<ExtraCreateOptions>;
|
1386
|
-
update: DatabaseUpdateOperation<T> & InexactPartial<ExtraUpdateOptions>;
|
1387
|
-
delete: DatabaseDeleteOperation & InexactPartial<ExtraDeleteOptions>;
|
1388
|
-
}
|
1461
|
+
> = Document.Database.Operations<T, ExtraCreateOptions, ExtraUpdateOptions, ExtraDeleteOptions>;
|
1389
1462
|
/* eslint-enable @typescript-eslint/no-empty-object-type */
|
1390
1463
|
|
1464
|
+
/**
|
1465
|
+
* @deprecated if you want to get individual operations see {@link Document.Database.OperationOf | `Document.Database.OperationOf`}
|
1466
|
+
*/
|
1391
1467
|
export interface DatabaseOperationMap {
|
1392
1468
|
ActiveEffect: ActiveEffect.DatabaseOperations;
|
1393
1469
|
Actor: Actor.DatabaseOperations;
|
@@ -1411,9 +1487,8 @@ export interface DatabaseOperationMap {
|
|
1411
1487
|
Note: NoteDocument.DatabaseOperations;
|
1412
1488
|
Playlist: Playlist.DatabaseOperations;
|
1413
1489
|
PlaylistSound: PlaylistSound.DatabaseOperations;
|
1414
|
-
|
1415
|
-
|
1416
|
-
// RegionBehavior: ActiveEffect.DatabaseOperations;
|
1490
|
+
Region: ActiveEffect.DatabaseOperations;
|
1491
|
+
RegionBehavior: ActiveEffect.DatabaseOperations;
|
1417
1492
|
RollTable: RollTable.DatabaseOperations;
|
1418
1493
|
Scene: Scene.DatabaseOperations;
|
1419
1494
|
Setting: Setting.DatabaseOperations;
|