@league-of-foundry-developers/foundry-vtt-types 12.331.4-beta → 12.331.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +18 -1
- package/src/configuration/configuration.d.mts +1 -1
- package/src/foundry/client/apps/app.d.mts +1 -1
- package/src/foundry/client/apps/av/av-config.d.mts +1 -1
- package/src/foundry/client/apps/av/cameras.d.mts +1 -1
- package/src/foundry/client/apps/dice/dice-config.d.mts +1 -1
- package/src/foundry/client/apps/form.d.mts +1 -1
- package/src/foundry/client/apps/forms/actor.d.mts +1 -1
- 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 +1 -1
- package/src/foundry/client/apps/forms/card-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/cards-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/combat-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 +7 -2
- package/src/foundry/client/apps/forms/fonts.d.mts +1 -1
- package/src/foundry/client/apps/forms/grid-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/image-popout.d.mts +1 -1
- package/src/foundry/client/apps/forms/item.d.mts +1 -1
- package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +1 -1
- package/src/foundry/client/apps/forms/journal-sheet.d.mts +1 -1
- package/src/foundry/client/apps/forms/macro-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/measure-template.d.mts +1 -1
- 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 +1 -1
- package/src/foundry/client/apps/forms/scene-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/sheet-config.d.mts +1 -1
- package/src/foundry/client/apps/forms/user-config.d.mts +1 -1
- package/src/foundry/client/apps/hud/chatbubble.d.mts +1 -1
- package/src/foundry/client/apps/hud/container.d.mts +1 -1
- package/src/foundry/client/apps/hud/controls.d.mts +1 -1
- package/src/foundry/client/apps/hud/hotbar.d.mts +1 -1
- package/src/foundry/client/apps/hud/hud.d.mts +1 -1
- package/src/foundry/client/apps/hud/menu.d.mts +1 -1
- package/src/foundry/client/apps/hud/navigation.d.mts +1 -1
- package/src/foundry/client/apps/hud/pause.d.mts +1 -1
- package/src/foundry/client/apps/hud/players.d.mts +1 -1
- 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/note-config.d.mts +1 -1
- package/src/foundry/client/apps/placeables/tile-config.d.mts +1 -1
- package/src/foundry/client/apps/placeables/tile-hud.d.mts +1 -1
- package/src/foundry/client/apps/placeables/token-config.d.mts +1 -1
- package/src/foundry/client/apps/placeables/token-hud.d.mts +1 -1
- package/src/foundry/client/apps/placeables/wall-config.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/apps/module-management.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 +1 -1
- package/src/foundry/client/apps/sidebar/package-configuration.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/sidebar.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +1 -1
- package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +1 -1
- package/src/foundry/client/av/client.d.mts +1 -1
- package/src/foundry/client/av/clients/simplepeer.d.mts +1 -1
- package/src/foundry/client/av/master.d.mts +1 -1
- package/src/foundry/client/av/settings.d.mts +1 -1
- package/src/foundry/client/config.d.mts +1 -1
- package/src/foundry/client/core/hooks.d.mts +1 -1
- package/src/foundry/client/core/image.d.mts +1 -1
- package/src/foundry/client/core/keybindings.d.mts +1 -1
- package/src/foundry/client/core/packages.d.mts +4 -2
- package/src/foundry/client/core/settings.d.mts +1 -1
- package/src/foundry/client/core/socket.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 +1 -1
- package/src/foundry/client/core/workers.d.mts +1 -1
- package/src/foundry/client/data/abstract/canvas-document.d.mts +9 -20
- package/src/foundry/client/data/abstract/client-document.d.mts +133 -71
- package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +2 -2
- package/src/foundry/client/data/abstract/document-collection.d.mts +1 -1
- package/src/foundry/client/data/abstract/world-collection.d.mts +8 -1
- package/src/foundry/client/data/collections/actors.d.mts +1 -1
- package/src/foundry/client/data/collections/cards.d.mts +1 -1
- package/src/foundry/client/data/collections/combats.d.mts +1 -1
- package/src/foundry/client/data/collections/compendium-collection.d.mts +5 -4
- package/src/foundry/client/data/collections/fog.d.mts +1 -1
- package/src/foundry/client/data/collections/folder.d.mts +1 -1
- package/src/foundry/client/data/collections/items.d.mts +1 -1
- package/src/foundry/client/data/collections/journal.d.mts +1 -1
- package/src/foundry/client/data/collections/macros.d.mts +1 -1
- package/src/foundry/client/data/collections/messages.d.mts +1 -1
- package/src/foundry/client/data/collections/playlists.d.mts +1 -1
- package/src/foundry/client/data/collections/scenes.d.mts +1 -1
- package/src/foundry/client/data/collections/settings.d.mts +1 -1
- package/src/foundry/client/data/collections/tables.d.mts +1 -1
- package/src/foundry/client/data/collections/users.d.mts +4 -4
- package/src/foundry/client/data/documents/active-effect.d.mts +124 -48
- package/src/foundry/client/data/documents/actor-delta.d.mts +53 -22
- package/src/foundry/client/data/documents/actor.d.mts +147 -93
- package/src/foundry/client/data/documents/adventure.d.mts +74 -45
- package/src/foundry/client/data/documents/ambient-light.d.mts +13 -10
- package/src/foundry/client/data/documents/ambient-sound.d.mts +12 -7
- package/src/foundry/client/data/documents/card.d.mts +57 -34
- package/src/foundry/client/data/documents/cards.d.mts +171 -135
- package/src/foundry/client/data/documents/chat-message.d.mts +131 -72
- package/src/foundry/client/data/documents/combat.d.mts +80 -60
- package/src/foundry/client/data/documents/combatant.d.mts +53 -20
- package/src/foundry/client/data/documents/drawing.d.mts +12 -7
- package/src/foundry/client/data/documents/fog-exploration.d.mts +57 -17
- package/src/foundry/client/data/documents/folder.d.mts +114 -31
- package/src/foundry/client/data/documents/item.d.mts +31 -21
- package/src/foundry/client/data/documents/journal-entry-page.d.mts +90 -57
- package/src/foundry/client/data/documents/journal-entry.d.mts +29 -34
- package/src/foundry/client/data/documents/macro.d.mts +60 -34
- package/src/foundry/client/data/documents/measured-template.d.mts +13 -8
- package/src/foundry/client/data/documents/note.d.mts +14 -7
- package/src/foundry/client/data/documents/playlist-sound.d.mts +29 -33
- package/src/foundry/client/data/documents/playlist.d.mts +74 -54
- package/src/foundry/client/data/documents/region-behavior.d.mts +16 -7
- package/src/foundry/client/data/documents/region.d.mts +53 -48
- package/src/foundry/client/data/documents/scene.d.mts +310 -89
- package/src/foundry/client/data/documents/setting.d.mts +24 -23
- package/src/foundry/client/data/documents/table-result.d.mts +20 -8
- package/src/foundry/client/data/documents/table.d.mts +19 -13
- package/src/foundry/client/data/documents/tile.d.mts +13 -7
- package/src/foundry/client/data/documents/token.d.mts +148 -117
- package/src/foundry/client/data/documents/user.d.mts +141 -53
- package/src/foundry/client/data/documents/wall.d.mts +17 -10
- package/src/foundry/client/game.d.mts +1 -1
- package/src/foundry/client/head.d.mts +1 -1
- package/src/foundry/client/hooks.d.mts +9 -18
- package/src/foundry/client/pixi/board.d.mts +3 -2
- package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/cached-container.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/quadtree.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +1 -1
- package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/ping.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +1 -8
- package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +1 -1
- package/src/foundry/client/pixi/core/interaction/targets.d.mts +1 -1
- package/src/foundry/client/pixi/core/loader.d.mts +1 -1
- package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +1 -1
- package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +1 -1
- package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +1 -1
- package/src/foundry/client/pixi/core/shapes/ray.d.mts +1 -1
- package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +1 -1
- package/src/foundry/client/pixi/extensions/circle.d.mts +1 -1
- package/src/foundry/client/pixi/extensions/observable-transform.d.mts +1 -1
- package/src/foundry/client/pixi/extensions/polygon.d.mts +1 -1
- package/src/foundry/client/pixi/extensions/rectangle.d.mts +1 -1
- package/src/foundry/client/pixi/groups/effects.d.mts +1 -1
- package/src/foundry/client/pixi/groups/environment.d.mts +1 -1
- package/src/foundry/client/pixi/groups/hidden.d.mts +1 -1
- package/src/foundry/client/pixi/groups/interface.d.mts +1 -1
- package/src/foundry/client/pixi/groups/overlay.d.mts +1 -1
- package/src/foundry/client/pixi/groups/primary.d.mts +1 -1
- package/src/foundry/client/pixi/groups/rendered.d.mts +1 -1
- package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +1 -1
- package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +1 -1
- package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +1 -1
- package/src/foundry/client/pixi/layers/controls/cursor.d.mts +1 -1
- package/src/foundry/client/pixi/layers/controls/door.d.mts +1 -1
- package/src/foundry/client/pixi/layers/controls/layer.d.mts +1 -1
- package/src/foundry/client/pixi/layers/controls/ruler.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/visibility.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +1 -1
- package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +1 -1
- package/src/foundry/client/pixi/layers/grid/highlight.d.mts +1 -1
- package/src/foundry/client/pixi/layers/grid/layer.d.mts +1 -1
- package/src/foundry/client/pixi/layers/grid/mesh.d.mts +1 -1
- package/src/foundry/client/pixi/layers/masks/depth.d.mts +1 -1
- package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +1 -1
- package/src/foundry/client/pixi/layers/masks/vision.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/notes.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/regions.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/templates.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +1 -1
- package/src/foundry/client/pixi/layers/placeables/walls.d.mts +1 -1
- package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +1 -1
- package/src/foundry/client/pixi/perception/detection-mode.d.mts +1 -1
- package/src/foundry/client/pixi/perception/fog.d.mts +1 -1
- package/src/foundry/client/pixi/perception/perception-manager.d.mts +1 -1
- package/src/foundry/client/pixi/perception/vision-mode.d.mts +1 -1
- package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +1 -1
- package/src/foundry/client/pixi/placeable.d.mts +2 -1
- package/src/foundry/client/pixi/placeables/drawing.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/light.d.mts +1 -7
- package/src/foundry/client/pixi/placeables/note.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/region.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/sound.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/template.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/tile.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/token.d.mts +1 -1
- package/src/foundry/client/pixi/placeables/wall.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/helpers/framebuffer-snapshot.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +1 -1
- package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +1 -1
- package/src/foundry/client/pixi/workers/texture-worker.d.mts +1 -1
- package/src/foundry/client/ui/context.d.mts +1 -1
- package/src/foundry/client/ui/dialog.d.mts +1 -1
- package/src/foundry/client/ui/dragdrop.d.mts +1 -1
- package/src/foundry/client/ui/editor.d.mts +1 -1
- package/src/foundry/client/ui/filepicker.d.mts +1 -1
- package/src/foundry/client/ui/filter.d.mts +1 -1
- package/src/foundry/client-esm/applications/api/application.d.mts +1 -9
- package/src/foundry/client-esm/applications/api/dialog.d.mts +1 -1
- package/src/foundry/client-esm/applications/api/document-sheet.d.mts +1 -1
- package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +1 -1
- package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/apps/permission-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +1 -1
- package/src/foundry/client-esm/applications/forms/fields.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/region-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/sheets/user-config.d.mts +1 -1
- package/src/foundry/client-esm/applications/ui/region-legend.d.mts +1 -1
- 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/canvas/edges/collision.d.mts +1 -1
- package/src/foundry/client-esm/canvas/edges/edge.d.mts +1 -1
- package/src/foundry/client-esm/canvas/edges/vertex.d.mts +1 -1
- package/src/foundry/client-esm/canvas/scene-manager.d.mts +1 -1
- package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +1 -1
- package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +3 -2
- package/src/foundry/client-esm/canvas/tokens/ring.d.mts +1 -1
- package/src/foundry/client-esm/data/client-backend.d.mts +1 -1
- package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +4 -5
- package/src/foundry/client-esm/data/region-behaviors/base.d.mts +1 -1
- package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +1 -1
- package/src/foundry/client-esm/data/region-behaviors/toggle-behavior.d.mts +4 -4
- package/src/foundry/client-esm/dice/roll.d.mts +5 -8
- package/src/foundry/client-esm/dice/terms/coin.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/dice.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/die.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/fate.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/function.d.mts +1 -1
- 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 +1 -1
- package/src/foundry/client-esm/dice/terms/string.d.mts +1 -1
- package/src/foundry/client-esm/dice/terms/term.d.mts +1 -1
- package/src/foundry/common/abstract/backend.d.mts +1 -1
- package/src/foundry/common/abstract/data.d.mts +197 -146
- package/src/foundry/common/abstract/document.d.mts +198 -81
- package/src/foundry/common/abstract/embedded-collection-delta.d.mts +1 -1
- package/src/foundry/common/abstract/embedded-collection.d.mts +1 -1
- package/src/foundry/common/abstract/socket.d.mts +1 -1
- package/src/foundry/common/abstract/type-data.d.mts +4 -1
- package/src/foundry/common/config.d.mts +7 -1
- package/src/foundry/common/constants.d.mts +1 -1
- package/src/foundry/common/data/data.d.mts +42 -12
- package/src/foundry/common/data/fields.d.mts +656 -252
- package/src/foundry/common/documents/_types.d.mts +0 -6
- package/src/foundry/common/documents/active-effect.d.mts +116 -53
- package/src/foundry/common/documents/actor-delta.d.mts +139 -58
- package/src/foundry/common/documents/actor.d.mts +105 -51
- package/src/foundry/common/documents/adventure.d.mts +84 -39
- package/src/foundry/common/documents/ambient-light.d.mts +66 -38
- package/src/foundry/common/documents/ambient-sound.d.mts +66 -38
- package/src/foundry/common/documents/card.d.mts +100 -59
- package/src/foundry/common/documents/cards.d.mts +97 -42
- package/src/foundry/common/documents/chat-message.d.mts +105 -52
- package/src/foundry/common/documents/combat.d.mts +101 -48
- package/src/foundry/common/documents/combatant.d.mts +94 -50
- package/src/foundry/common/documents/drawing.d.mts +87 -46
- package/src/foundry/common/documents/fog-exploration.d.mts +87 -41
- package/src/foundry/common/documents/folder.d.mts +100 -46
- package/src/foundry/common/documents/item.d.mts +116 -45
- package/src/foundry/common/documents/journal-entry-page.d.mts +90 -40
- package/src/foundry/common/documents/journal-entry.d.mts +90 -39
- package/src/foundry/common/documents/macro.d.mts +116 -52
- package/src/foundry/common/documents/measured-template.d.mts +80 -44
- package/src/foundry/common/documents/note.d.mts +75 -39
- package/src/foundry/common/documents/playlist-sound.d.mts +88 -47
- package/src/foundry/common/documents/playlist.d.mts +101 -50
- package/src/foundry/common/documents/region-behavior.d.mts +71 -40
- package/src/foundry/common/documents/region.d.mts +68 -40
- package/src/foundry/common/documents/roll-table.d.mts +43 -9
- package/src/foundry/common/documents/scene.d.mts +190 -43
- package/src/foundry/common/documents/setting.d.mts +98 -42
- package/src/foundry/common/documents/table-result.d.mts +98 -48
- package/src/foundry/common/documents/tile.d.mts +77 -43
- package/src/foundry/common/documents/token.d.mts +95 -52
- package/src/foundry/common/documents/user.d.mts +100 -89
- package/src/foundry/common/documents/wall.d.mts +47 -17
- package/src/foundry/common/grid/base.d.mts +1 -1
- package/src/foundry/common/grid/gridless.d.mts +1 -1
- package/src/foundry/common/grid/hexagonal.d.mts +1 -1
- package/src/foundry/common/grid/square.d.mts +1 -1
- package/src/foundry/common/packages/base-package.d.mts +37 -14
- package/src/foundry/common/packages/base-system.d.mts +39 -0
- package/src/foundry/common/packages/base-world.d.mts +8 -1
- package/src/foundry/common/packages/sub-types.d.mts +3 -5
- package/src/foundry/common/primitives/array.d.mts +1 -1
- package/src/foundry/common/primitives/string.d.mts +1 -1
- package/src/foundry/common/prosemirror/dirty-plugin.d.mts +1 -1
- package/src/foundry/common/prosemirror/dom-parser.d.mts +1 -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/types.d.mts +1 -1
- package/src/foundry/common/utils/bitmask.d.mts +1 -1
- package/src/foundry/common/utils/collection.d.mts +1 -1
- package/src/foundry/common/utils/event-emitter.d.mts +1 -1
- package/src/foundry/common/utils/helpers.d.mts +1 -1
- package/src/foundry/public/scripts/clipper/clipper.d.mts +1 -1
- package/src/types/augments/particles.d.mts +1 -1
- package/src/types/augments/pixi.d.mts +1 -1
- package/src/types/augments/smooth.d.mts +1 -1
- package/src/types/augments/tinyMCE.d.mts +1 -1
- package/src/types/config.d.mts +2 -5
- package/src/types/documentConfiguration.d.mts +1 -1
- package/src/types/lib.d.mts +1 -1
- package/src/types/workers/image-compressor.d.mts +1 -1
@@ -1,7 +1,8 @@
|
|
1
|
-
import type { FolderDocumentTypes, InexactPartial,
|
1
|
+
import type { AnyObject, FolderDocumentTypes, InexactPartial, Merge, NullishProps } from "#utils";
|
2
2
|
import type { fields } from "../../../common/data/module.d.mts";
|
3
3
|
import type Document from "../../../common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
5
|
+
import type DataModel from "#common/abstract/data.mjs";
|
5
6
|
|
6
7
|
declare global {
|
7
8
|
namespace Adventure {
|
@@ -102,7 +103,7 @@ declare global {
|
|
102
103
|
type Collection = never;
|
103
104
|
|
104
105
|
/**
|
105
|
-
* An instance of `Adventure` that comes from the database but failed validation
|
106
|
+
* An instance of `Adventure` that comes from the database but failed validation meaning that
|
106
107
|
* its `system` and `_source` could theoretically be anything.
|
107
108
|
*/
|
108
109
|
interface Invalid extends Document.Invalid<Adventure.Implementation> {}
|
@@ -173,13 +174,17 @@ declare global {
|
|
173
174
|
/**
|
174
175
|
* The human-readable name of the Adventure
|
175
176
|
*/
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
177
|
+
// FIXME: required with no initial, assignment type override required
|
178
|
+
name: fields.StringField<
|
179
|
+
{
|
180
|
+
required: true;
|
181
|
+
blank: false;
|
182
|
+
label: "ADVENTURE.Name";
|
183
|
+
hint: "ADVENTURE.NameHint";
|
184
|
+
textSearch: true;
|
185
|
+
},
|
186
|
+
string
|
187
|
+
>;
|
183
188
|
|
184
189
|
/**
|
185
190
|
* The file path for the primary image of the adventure
|
@@ -408,21 +413,49 @@ declare global {
|
|
408
413
|
type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
|
409
414
|
}
|
410
415
|
|
411
|
-
|
416
|
+
type DocumentDataRecord = {
|
417
|
+
[K in ContainedDocumentType]?: Document.CreateDataForName<K>[];
|
418
|
+
};
|
419
|
+
|
420
|
+
type DocumentResult = {
|
421
|
+
[K in ContainedDocumentType]?: Document.ImplementationFor<K>[];
|
422
|
+
};
|
423
|
+
|
424
|
+
type ContainedDocumentType = Exclude<FolderDocumentTypes, "Adventure"> | "Folder";
|
425
|
+
|
426
|
+
interface ImportData {
|
427
|
+
toCreate: DocumentDataRecord;
|
428
|
+
toUpdate: DocumentDataRecord;
|
429
|
+
documentCount: number;
|
430
|
+
}
|
431
|
+
|
432
|
+
interface ImportResult {
|
433
|
+
created: DocumentResult;
|
434
|
+
updated: DocumentResult;
|
435
|
+
}
|
436
|
+
|
437
|
+
/** @internal */
|
438
|
+
type _PrepareImportOptions = InexactPartial<{
|
412
439
|
/**
|
413
440
|
* A subset of adventure fields to import.
|
441
|
+
* @defaultValue `[]`
|
442
|
+
* @remarks Can't be `null` as it only has a parameter default
|
414
443
|
*/
|
415
|
-
// TODO: This isn't *quite* right as the keyof is including all the nevers.
|
416
444
|
importFields: Array<keyof typeof foundry.documents.BaseAdventure.contentFields | "all">;
|
417
|
-
}
|
445
|
+
}>;
|
418
446
|
|
419
|
-
interface
|
447
|
+
interface PrepareImportOptions extends _PrepareImportOptions {}
|
448
|
+
|
449
|
+
/** @internal */
|
450
|
+
type _ImportOptions = NullishProps<{
|
420
451
|
/**
|
421
452
|
* Display a warning dialog if existing documents would be overwritten
|
422
453
|
* @defaultValue `true`
|
423
454
|
*/
|
424
455
|
dialog: boolean;
|
425
|
-
}
|
456
|
+
}>;
|
457
|
+
|
458
|
+
interface ImportOptions extends _ImportOptions, PrepareImportOptions {}
|
426
459
|
|
427
460
|
/**
|
428
461
|
* @deprecated {@link Adventure.Database | `Adventure.DatabaseOperation`}
|
@@ -444,17 +477,6 @@ declare global {
|
|
444
477
|
* @deprecated {@link Adventure.Implementation | `Adventure.Implementation`}
|
445
478
|
*/
|
446
479
|
type ConfiguredInstance = Implementation;
|
447
|
-
|
448
|
-
interface ImportData {
|
449
|
-
toCreate?: DocumentDataRecord;
|
450
|
-
toUpdate?: DocumentDataRecord;
|
451
|
-
documentCount: number;
|
452
|
-
}
|
453
|
-
|
454
|
-
interface ImportResult {
|
455
|
-
created: DocumentResult;
|
456
|
-
updated: DocumentResult;
|
457
|
-
}
|
458
480
|
}
|
459
481
|
|
460
482
|
/**
|
@@ -467,25 +489,39 @@ declare global {
|
|
467
489
|
*/
|
468
490
|
constructor(...args: Adventure.ConstructorArgs);
|
469
491
|
|
492
|
+
/**
|
493
|
+
* @remarks If this creation is happening in a provided `pack`, and that pack is **not** system-specific,
|
494
|
+
* strips `Actor`s, `Item`s, and `Actor` and `Item` `Folders` from `source`s
|
495
|
+
*/
|
496
|
+
// options: not null (parameter default only, destructured in super)
|
497
|
+
static override fromSource(
|
498
|
+
source: Adventure.CreateData,
|
499
|
+
context?: DataModel.FromSourceOptions,
|
500
|
+
): Adventure.Implementation;
|
501
|
+
|
470
502
|
/**
|
471
503
|
* Perform a full import workflow of this Adventure.
|
472
504
|
* Create new and update existing documents within the World.
|
473
505
|
* @param options - Options which configure and customize the import process
|
474
506
|
* @returns The import result
|
475
507
|
*/
|
476
|
-
|
508
|
+
// options: not null (destructured)
|
509
|
+
import(options?: Adventure.ImportOptions): Promise<Adventure.ImportResult>;
|
477
510
|
|
478
511
|
/**
|
479
512
|
* Prepare Adventure data for import into the World.
|
480
513
|
* @param options - Options passed in from the import dialog to configure the import behavior
|
481
514
|
* @returns A subset of adventure fields to import.
|
482
515
|
*/
|
483
|
-
|
516
|
+
// options: not null (destructured)
|
517
|
+
prepareImport(options?: Adventure.PrepareImportOptions): Promise<Adventure.ImportData>;
|
484
518
|
|
485
519
|
/**
|
486
520
|
* Execute an Adventure import workflow, creating and updating documents in the World.
|
521
|
+
* @remarks Despite having a parameter default, neither `data` nor any of its keys are optional, as the keys themselves have no defaults,
|
522
|
+
* and `toCreate` and `toUpdate` get passed to `Object.entries` which throws on nullish values, and `documentCount`is used as a divisor
|
487
523
|
*/
|
488
|
-
importContent(data
|
524
|
+
importContent(data: Adventure.ImportData): Promise<Adventure.ImportResult>;
|
489
525
|
|
490
526
|
/*
|
491
527
|
* After this point these are not really overridden methods.
|
@@ -501,22 +537,27 @@ declare global {
|
|
501
537
|
|
502
538
|
// Descendant Document operations have been left out because Adventure does not have any descendant documents.
|
503
539
|
|
504
|
-
|
540
|
+
// context: not null (destructured)
|
541
|
+
static override defaultName(context?: Document.DefaultNameContext<"Adventure", Adventure.Parent>): string;
|
505
542
|
|
543
|
+
/** @remarks `context.parent` is required as creation requires one */
|
506
544
|
static override createDialog(
|
507
|
-
data: Document.CreateDialogData<Adventure.CreateData
|
508
|
-
context: Document.CreateDialogContext<
|
545
|
+
data: Document.CreateDialogData<Adventure.CreateData> | undefined,
|
546
|
+
context: Document.CreateDialogContext<"Adventure", Adventure.Parent>,
|
509
547
|
): Promise<Adventure.Stored | null | undefined>;
|
510
548
|
|
549
|
+
// options: not null (parameter default only)
|
511
550
|
static override fromDropData(
|
512
551
|
data: Document.DropData<Adventure.Implementation>,
|
513
|
-
options?:
|
552
|
+
options?: AnyObject,
|
514
553
|
): Promise<Adventure.Implementation | undefined>;
|
515
554
|
|
516
555
|
static override fromImport(
|
517
556
|
source: Adventure.Source,
|
518
|
-
context?: Document.FromImportContext<Adventure.Parent
|
557
|
+
context?: Document.FromImportContext<Adventure.Parent> | null,
|
519
558
|
): Promise<Adventure.Implementation>;
|
559
|
+
|
560
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
520
561
|
}
|
521
562
|
|
522
563
|
/** @deprecated {@link Adventure.ImportData | `Adventure.ImportData`} */
|
@@ -525,15 +566,3 @@ declare global {
|
|
525
566
|
/** @deprecated {@link Adventure.ImportResult | `Adventure.ImportResult`} */
|
526
567
|
type AdventureImportResult = Adventure.ImportResult;
|
527
568
|
}
|
528
|
-
|
529
|
-
type DocumentDataRecord = {
|
530
|
-
[K in AdventureDocumentTypes]?: foundry.data.fields.SchemaField.AssignmentData<
|
531
|
-
ReturnType<Document.ImplementationClassFor<K>["defineSchema"]>
|
532
|
-
>[];
|
533
|
-
};
|
534
|
-
|
535
|
-
type DocumentResult = {
|
536
|
-
[K in AdventureDocumentTypes]?: FixedInstanceType<Document.ImplementationClassFor<K>>[];
|
537
|
-
};
|
538
|
-
|
539
|
-
type AdventureDocumentTypes = Exclude<FolderDocumentTypes, "Adventure"> | "Folder";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { InterfaceToObject, Merge } from "
|
1
|
+
import type { AnyObject, InterfaceToObject, Merge } from "#utils";
|
2
2
|
import type Document from "../../../common/abstract/document.d.mts";
|
3
3
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
4
4
|
import type { fields, LightData } from "../../../common/data/module.d.mts";
|
@@ -101,7 +101,7 @@ declare global {
|
|
101
101
|
type Collection = never;
|
102
102
|
|
103
103
|
/**
|
104
|
-
* An instance of `AmbientLightDocument` that comes from the database but failed validation
|
104
|
+
* An instance of `AmbientLightDocument` that comes from the database but failed validation meaning that
|
105
105
|
* its `system` and `_source` could theoretically be anything.
|
106
106
|
*/
|
107
107
|
interface Invalid extends Document.Invalid<AmbientLightDocument.Implementation> {}
|
@@ -402,9 +402,7 @@ declare global {
|
|
402
402
|
*/
|
403
403
|
constructor(...args: AmbientLightDocument.ConstructorArgs);
|
404
404
|
|
405
|
-
|
406
|
-
* @privateRemarks _onUpdate is overridden but with no signature changes from its implementation in BaseAmbientLight.
|
407
|
-
*/
|
405
|
+
// _onUpdate is overridden but with no signature changes from its implementation in BaseAmbientLight.
|
408
406
|
|
409
407
|
/**
|
410
408
|
* Is this ambient light source global in nature?
|
@@ -425,23 +423,28 @@ declare global {
|
|
425
423
|
|
426
424
|
// Descendant Document operations have been left out because AmbientLight does not have any descendant documents.
|
427
425
|
|
426
|
+
// context: not null (destructured)
|
428
427
|
static override defaultName(
|
429
|
-
context
|
428
|
+
context?: Document.DefaultNameContext<"AmbientLight", NonNullable<AmbientLightDocument.Parent>>,
|
430
429
|
): string;
|
431
430
|
|
431
|
+
/** @remarks `context.parent` is required as creation requires one */
|
432
432
|
static override createDialog(
|
433
|
-
data: Document.CreateDialogData<AmbientLightDocument.CreateData
|
434
|
-
context: Document.CreateDialogContext<
|
433
|
+
data: Document.CreateDialogData<AmbientLightDocument.CreateData> | undefined,
|
434
|
+
context: Document.CreateDialogContext<"AmbientLight", NonNullable<AmbientLightDocument.Parent>>,
|
435
435
|
): Promise<AmbientLightDocument.Stored | null | undefined>;
|
436
436
|
|
437
|
+
// options: not null (parameter default only)
|
437
438
|
static override fromDropData(
|
438
439
|
data: Document.DropData<AmbientLightDocument.Implementation>,
|
439
|
-
options?:
|
440
|
+
options?: AnyObject,
|
440
441
|
): Promise<AmbientLightDocument.Implementation | undefined>;
|
441
442
|
|
442
443
|
static override fromImport(
|
443
444
|
source: AmbientLightDocument.Source,
|
444
|
-
context?: Document.FromImportContext<AmbientLightDocument.Parent
|
445
|
+
context?: Document.FromImportContext<AmbientLightDocument.Parent> | null,
|
445
446
|
): Promise<AmbientLightDocument.Implementation>;
|
447
|
+
|
448
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
446
449
|
}
|
447
450
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Merge } from "
|
1
|
+
import type { AnyObject, Merge } from "#utils";
|
2
2
|
import type Document from "../../../common/abstract/document.d.mts";
|
3
3
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
4
4
|
import type { fields } from "../../../common/data/module.d.mts";
|
@@ -102,7 +102,7 @@ declare global {
|
|
102
102
|
type Collection = never;
|
103
103
|
|
104
104
|
/**
|
105
|
-
* An instance of `AmbientSoundDocument` that comes from the database but failed validation
|
105
|
+
* An instance of `AmbientSoundDocument` that comes from the database but failed validation meaning that
|
106
106
|
* its `system` and `_source` could theoretically be anything.
|
107
107
|
*/
|
108
108
|
interface Invalid extends Document.Invalid<AmbientSoundDocument.Implementation> {}
|
@@ -467,23 +467,28 @@ declare global {
|
|
467
467
|
|
468
468
|
// Descendant Document operations have been left out because Wall does not have any descendant documents.
|
469
469
|
|
470
|
+
// context: not null (destructured)
|
470
471
|
static override defaultName(
|
471
|
-
context
|
472
|
+
context?: Document.DefaultNameContext<"AmbientSound", NonNullable<AmbientSoundDocument.Parent>>,
|
472
473
|
): string;
|
473
474
|
|
475
|
+
/** @remarks `context.parent` is required as creation requires one */
|
474
476
|
static override createDialog(
|
475
|
-
data: Document.CreateDialogData<AmbientSoundDocument.CreateData
|
476
|
-
context: Document.CreateDialogContext<
|
477
|
+
data: Document.CreateDialogData<AmbientSoundDocument.CreateData> | undefined,
|
478
|
+
context: Document.CreateDialogContext<"AmbientSound", NonNullable<AmbientSoundDocument.Parent>>,
|
477
479
|
): Promise<AmbientSoundDocument.Stored | null | undefined>;
|
478
480
|
|
481
|
+
// options: not null (parameter default only)
|
479
482
|
static override fromDropData(
|
480
483
|
data: Document.DropData<AmbientSoundDocument.Implementation>,
|
481
|
-
options?:
|
484
|
+
options?: AnyObject,
|
482
485
|
): Promise<AmbientSoundDocument.Implementation | undefined>;
|
483
486
|
|
484
487
|
static override fromImport(
|
485
488
|
source: AmbientSoundDocument.Source,
|
486
|
-
context?: Document.FromImportContext<AmbientSoundDocument.Parent
|
489
|
+
context?: Document.FromImportContext<AmbientSoundDocument.Parent> | null,
|
487
490
|
): Promise<AmbientSoundDocument.Implementation>;
|
491
|
+
|
492
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
488
493
|
}
|
489
494
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ConfiguredCard } from "../../../../configuration/index.d.mts";
|
2
|
-
import type { DeepPartial, Merge } from "
|
2
|
+
import type { AnyObject, DeepPartial, Merge } from "#utils";
|
3
3
|
import type { documents } from "../../../client-esm/client.d.mts";
|
4
4
|
import type Document from "../../../common/abstract/document.d.mts";
|
5
5
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
@@ -162,7 +162,7 @@ declare global {
|
|
162
162
|
type Collection = never;
|
163
163
|
|
164
164
|
/**
|
165
|
-
* An instance of `Card` that comes from the database but failed validation
|
165
|
+
* An instance of `Card` that comes from the database but failed validation meaning that
|
166
166
|
* its `system` and `_source` could theoretically be anything.
|
167
167
|
*/
|
168
168
|
interface Invalid<out SubType extends Card.SubType = Card.SubType> extends Document.Invalid<OfType<SubType>> {}
|
@@ -231,7 +231,8 @@ declare global {
|
|
231
231
|
_id: fields.DocumentIdField;
|
232
232
|
|
233
233
|
/** The text name of this card */
|
234
|
-
|
234
|
+
// FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
|
235
|
+
name: fields.StringField<{ required: true; blank: false; label: "CARD.Name" }, string>;
|
235
236
|
|
236
237
|
/**
|
237
238
|
* A text description of this card which applies to all faces
|
@@ -241,14 +242,9 @@ declare global {
|
|
241
242
|
|
242
243
|
/**
|
243
244
|
* A category of card (for example, a suit) to which this card belongs
|
244
|
-
* @defaultValue `
|
245
|
+
* @defaultValue `"base"`
|
245
246
|
*/
|
246
|
-
type: fields.DocumentTypeField<
|
247
|
-
typeof BaseCard,
|
248
|
-
{
|
249
|
-
initial: typeof foundry.CONST.BASE_DOCUMENT_TYPE;
|
250
|
-
}
|
251
|
-
>;
|
247
|
+
type: fields.DocumentTypeField<typeof BaseCard, { initial: typeof CONST.BASE_DOCUMENT_TYPE }>;
|
252
248
|
|
253
249
|
/**
|
254
250
|
* Game system data which is defined by the system template.json model
|
@@ -258,7 +254,7 @@ declare global {
|
|
258
254
|
|
259
255
|
/**
|
260
256
|
* An optional suit designation which is used by default sorting
|
261
|
-
* @defaultValue `
|
257
|
+
* @defaultValue `undefined`
|
262
258
|
*/
|
263
259
|
suit: fields.StringField<{ label: "CARD.Suit" }>;
|
264
260
|
|
@@ -270,12 +266,11 @@ declare global {
|
|
270
266
|
|
271
267
|
/**
|
272
268
|
* An object of face data which describes the back of this card
|
273
|
-
* @defaultValue see properties
|
274
269
|
*/
|
275
270
|
back: fields.SchemaField<{
|
276
271
|
/**
|
277
272
|
* A name for this card face
|
278
|
-
* @defaultValue `
|
273
|
+
* @defaultValue `undefined`
|
279
274
|
*/
|
280
275
|
name: fields.StringField<{ label: "CARD.BackName" }>;
|
281
276
|
|
@@ -292,6 +287,10 @@ declare global {
|
|
292
287
|
img: fields.FilePathField<{ categories: ["IMAGE", "VIDEO"]; label: "CARD.BackImage" }>;
|
293
288
|
}>;
|
294
289
|
|
290
|
+
/**
|
291
|
+
* An array of face data which represent displayable faces of this card
|
292
|
+
* @defaultValue `[]`
|
293
|
+
*/
|
295
294
|
faces: fields.ArrayField<fields.SchemaField<Card.FaceSchema>>;
|
296
295
|
|
297
296
|
/**
|
@@ -348,7 +347,7 @@ declare global {
|
|
348
347
|
interface FaceSchema extends DataSchema {
|
349
348
|
/**
|
350
349
|
* A name for this card face
|
351
|
-
* @defaultValue `
|
350
|
+
* @defaultValue `undefined`
|
352
351
|
*/
|
353
352
|
name: fields.StringField<{ label: "CARD.FaceName" }>;
|
354
353
|
|
@@ -493,6 +492,21 @@ declare global {
|
|
493
492
|
type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
|
494
493
|
}
|
495
494
|
|
495
|
+
/**
|
496
|
+
* @remarks {@link Card.pass | `Card#pass`} calls {@link Cards.pass | `this.parent.pass`} with `action: "pass"` provided
|
497
|
+
*/
|
498
|
+
interface PassOptions extends Omit<Cards.PassOptions, "action"> {}
|
499
|
+
|
500
|
+
/**
|
501
|
+
* @remarks {@link Card.play | `Card#play`} calls {@link Cards.pass | `this.parent.pass`} with `action: "play"` provided
|
502
|
+
*/
|
503
|
+
interface PlayOptions extends PassOptions {}
|
504
|
+
|
505
|
+
/**
|
506
|
+
* @remarks {@link Card.discard | `Card#discard`} calls {@link Cards.pass | `this.parent.pass`} with `action: "discard"` provided
|
507
|
+
*/
|
508
|
+
interface DiscardOptions extends PassOptions {}
|
509
|
+
|
496
510
|
/**
|
497
511
|
* @deprecated {@link Card.Database | `Card.DatabaseOperation`}
|
498
512
|
*/
|
@@ -541,13 +555,14 @@ declare global {
|
|
541
555
|
|
542
556
|
/**
|
543
557
|
* The image of the currently displayed card face or back
|
558
|
+
* @remarks Falls back to {@linkcode Card.DEFAULT_ICON}
|
544
559
|
*/
|
545
560
|
get img(): string;
|
546
561
|
|
547
562
|
/**
|
548
563
|
* A reference to the source Cards document which defines this Card.
|
549
564
|
*/
|
550
|
-
get source(): Cards.Implementation |
|
565
|
+
get source(): Cards.Implementation | null;
|
551
566
|
|
552
567
|
/**
|
553
568
|
* A convenience property for whether or not the Card is within its source Cards stack. Cards in decks are always
|
@@ -570,6 +585,7 @@ declare global {
|
|
570
585
|
*/
|
571
586
|
get hasPreviousFace(): boolean;
|
572
587
|
|
588
|
+
/** @remarks Provides fallback value for `back.img`, and overrides `name` with the face/back's name if appropriate */
|
573
589
|
override prepareDerivedData(): void;
|
574
590
|
|
575
591
|
/**
|
@@ -584,39 +600,41 @@ declare global {
|
|
584
600
|
/**
|
585
601
|
* Pass this Card to some other Cards document.
|
586
602
|
* @param to - A new Cards document this card should be passed to
|
587
|
-
* @param options - (default: `{}`)
|
603
|
+
* @param options - Options which modify the pass operation (default: `{}`)
|
588
604
|
* @returns A reference to this card after the it has been passed to another parent document
|
589
605
|
*/
|
590
|
-
|
606
|
+
// options: not null (destructured)
|
607
|
+
pass(to: Cards.Implementation, options?: Card.PassOptions): Promise<Card.Implementation | undefined>;
|
591
608
|
|
592
609
|
/**
|
593
610
|
* Play a specific card to some other Cards document.
|
594
|
-
* This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
|
595
611
|
* @see {@link Card.pass | `Card#pass`}
|
612
|
+
* @remarks This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
|
596
613
|
*/
|
597
|
-
|
614
|
+
// options: not null (destructured)
|
615
|
+
play(to: Cards.Implementation, options?: Card.PlayOptions): Promise<Card.Implementation | undefined>;
|
598
616
|
|
599
617
|
/**
|
600
618
|
* Discard a specific card to some other Cards document.
|
601
|
-
* This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
|
602
619
|
* @see {@link Card.pass | `Card#pass`}
|
620
|
+
* @remarks This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
|
603
621
|
*/
|
604
|
-
|
622
|
+
// options: not null (destructured)
|
623
|
+
discard(to: Cards.Implementation, options?: Card.DiscardOptions): Promise<Card.Implementation | undefined>;
|
605
624
|
|
606
625
|
/**
|
607
626
|
* Recall this Card to its original Cards parent.
|
608
|
-
* @param options - Options which modify the recall operation
|
609
|
-
*
|
610
|
-
* @
|
627
|
+
* @param options - Options which modify the recall operation (default: `{}`)
|
628
|
+
* @returns A reference to the recalled card belonging to its original parent
|
629
|
+
* @remarks Core's implementation doesn't use `options` at all
|
611
630
|
*/
|
612
|
-
|
631
|
+
// options: not null (parameter default only)
|
632
|
+
recall(options?: AnyObject): Promise<Card.Implementation | undefined>;
|
613
633
|
|
614
634
|
/**
|
615
635
|
* Create a chat message which displays this Card.
|
616
|
-
* @param messageData - Additional data which becomes part of the created ChatMessageData
|
617
|
-
*
|
618
|
-
* @param options - Options which modify the message creation operation
|
619
|
-
* (default: `{}`)
|
636
|
+
* @param messageData - Additional data which becomes part of the created ChatMessageData (default: `{}`)
|
637
|
+
* @param options - Options which modify the message creation operation (default: `{}`)
|
620
638
|
* @returns The created chat message
|
621
639
|
*/
|
622
640
|
toMessage<Temporary extends boolean | undefined = false>(
|
@@ -638,21 +656,26 @@ declare global {
|
|
638
656
|
|
639
657
|
// Descendant Document operations have been left out because Card does not have any descendant documents.
|
640
658
|
|
641
|
-
|
659
|
+
// context: not null (destructured)
|
660
|
+
static override defaultName(context?: Document.DefaultNameContext<"Card", NonNullable<Card.Parent>>): string;
|
642
661
|
|
662
|
+
/** @remarks `context.parent` is required as creation requires one */
|
643
663
|
static override createDialog(
|
644
|
-
data: Document.CreateDialogData<Card.CreateData
|
645
|
-
context: Document.CreateDialogContext<Card
|
664
|
+
data: Document.CreateDialogData<Card.CreateData> | undefined,
|
665
|
+
context: Document.CreateDialogContext<"Card", NonNullable<Card.Parent>>,
|
646
666
|
): Promise<Card.Stored | null | undefined>;
|
647
667
|
|
668
|
+
// options: not null (parameter default only)
|
648
669
|
static override fromDropData(
|
649
670
|
data: Document.DropData<Card.Implementation>,
|
650
|
-
options?:
|
671
|
+
options?: AnyObject,
|
651
672
|
): Promise<Card.Implementation | undefined>;
|
652
673
|
|
653
674
|
static override fromImport(
|
654
675
|
source: Card.Source,
|
655
|
-
context?: Document.FromImportContext<Card.Parent
|
676
|
+
context?: Document.FromImportContext<Card.Parent> | null,
|
656
677
|
): Promise<Card.Implementation>;
|
678
|
+
|
679
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
657
680
|
}
|
658
681
|
}
|