@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,5 +1,5 @@
|
|
1
1
|
import type { ConfiguredJournalEntryPage } from "../../../../configuration/index.d.mts";
|
2
|
-
import type {
|
2
|
+
import type { AnyObject, Merge, NullishProps } from "#utils";
|
3
3
|
import type Document from "../../../common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
5
5
|
import type { fields } from "../../../common/data/module.d.mts";
|
@@ -157,7 +157,7 @@ declare global {
|
|
157
157
|
type Collection = never;
|
158
158
|
|
159
159
|
/**
|
160
|
-
* An instance of `JournalEntryPage` that comes from the database but failed validation
|
160
|
+
* An instance of `JournalEntryPage` that comes from the database but failed validation meaning that
|
161
161
|
* its `system` and `_source` could theoretically be anything.
|
162
162
|
*/
|
163
163
|
interface Invalid<out SubType extends JournalEntryPage.SubType = JournalEntryPage.SubType>
|
@@ -230,18 +230,17 @@ declare global {
|
|
230
230
|
/**
|
231
231
|
* The text name of this page.
|
232
232
|
*/
|
233
|
-
|
233
|
+
// FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
|
234
|
+
name: fields.StringField<
|
235
|
+
{ required: true; blank: false; label: "JOURNALENTRYPAGE.PageTitle"; textSearch: true },
|
236
|
+
string
|
237
|
+
>;
|
234
238
|
|
235
239
|
/**
|
236
240
|
* The type of this page, in {@link BaseJournalEntryPage.TYPES | `BaseJournalEntryPage.TYPES`}.
|
237
241
|
* @defaultValue `"text"`
|
238
242
|
*/
|
239
|
-
type: fields.DocumentTypeField<
|
240
|
-
typeof BaseJournalEntryPage,
|
241
|
-
{
|
242
|
-
initial: "text";
|
243
|
-
}
|
244
|
-
>;
|
243
|
+
type: fields.DocumentTypeField<typeof BaseJournalEntryPage, { initial: "text" }>;
|
245
244
|
|
246
245
|
/**
|
247
246
|
* System-specific data.
|
@@ -297,17 +296,26 @@ declare global {
|
|
297
296
|
* The format of the page's content, in {@link CONST.JOURNAL_ENTRY_PAGE_FORMATS | `CONST.JOURNAL_ENTRY_PAGE_FORMATS`}.
|
298
297
|
* @defaultValue `CONST.JOURNAL_ENTRY_PAGE_FORMATS.HTML`
|
299
298
|
*/
|
300
|
-
format: fields.NumberField<
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
299
|
+
format: fields.NumberField<
|
300
|
+
{
|
301
|
+
label: "JOURNALENTRYPAGE.Format";
|
302
|
+
initial: typeof CONST.JOURNAL_ENTRY_PAGE_FORMATS.HTML;
|
303
|
+
choices: CONST.JOURNAL_ENTRY_PAGE_FORMATS[];
|
304
|
+
},
|
305
|
+
// FIXME: overrides required to enforce branded type
|
306
|
+
CONST.JOURNAL_ENTRY_PAGE_FORMATS | null | undefined,
|
307
|
+
CONST.JOURNAL_ENTRY_PAGE_FORMATS,
|
308
|
+
CONST.JOURNAL_ENTRY_PAGE_FORMATS
|
309
|
+
>;
|
305
310
|
}>;
|
306
311
|
|
307
312
|
/**
|
308
313
|
* Data particular to video journal entry pages.
|
309
314
|
*/
|
310
315
|
video: fields.SchemaField<{
|
316
|
+
/**
|
317
|
+
* @defaultValue `true`
|
318
|
+
*/
|
311
319
|
controls: fields.BooleanField<{ initial: true }>;
|
312
320
|
|
313
321
|
/**
|
@@ -539,6 +547,44 @@ declare global {
|
|
539
547
|
order: number;
|
540
548
|
}
|
541
549
|
|
550
|
+
interface CreateDocumentLinkOptions extends ClientDocument.CreateDocumentLinkOptions {
|
551
|
+
/**
|
552
|
+
* @remarks If the `eventData` passed with these options has an `anchor.slug`, the default is `eventData.anchor.name`,
|
553
|
+
* otherwise uses `super`'s default of `this.name`
|
554
|
+
*/
|
555
|
+
label?: string | null | undefined;
|
556
|
+
}
|
557
|
+
|
558
|
+
/**
|
559
|
+
* @internal
|
560
|
+
* Slightly editorializing the description with the addition of parentheses to make this scan
|
561
|
+
* for both {@linkcode JournalEntryPage.buildTOC} and {@linkcode JournalEntryPage._makeHeadingNode}
|
562
|
+
*/
|
563
|
+
type _IncludeElement = NullishProps<{
|
564
|
+
/**
|
565
|
+
* Include reference(s) to the heading DOM element(s) in the returned ToC.
|
566
|
+
* @defaultValue `true`
|
567
|
+
*/
|
568
|
+
includeElement: boolean;
|
569
|
+
}>;
|
570
|
+
|
571
|
+
interface BuildTOCOptions extends _IncludeElement {}
|
572
|
+
|
573
|
+
interface MakeHeadingNodeOptions extends _IncludeElement {}
|
574
|
+
|
575
|
+
interface EmbedTextPageConfig extends TextEditor.EnrichmentOptions, TextEditor.DocumentHTMLEmbedConfig {}
|
576
|
+
|
577
|
+
/** @internal */
|
578
|
+
type _EmbedImagePageConfig = NullishProps<{
|
579
|
+
/**
|
580
|
+
* Alt text for the image, otherwise the caption will be used.
|
581
|
+
* @remarks If both `alt` and `label` are omitted, the returned Element's `alt` will fall back to using `this.image.caption || this.name`
|
582
|
+
*/
|
583
|
+
alt: string;
|
584
|
+
}>;
|
585
|
+
|
586
|
+
interface EmbedImagePageConfig extends _EmbedImagePageConfig, TextEditor.DocumentHTMLEmbedConfig {}
|
587
|
+
|
542
588
|
/**
|
543
589
|
* @deprecated {@link JournalEntryPage.Database | `JournalEntryPage.DatabaseOperation`}
|
544
590
|
*/
|
@@ -590,7 +636,7 @@ declare global {
|
|
590
636
|
*/
|
591
637
|
get toc(): Record<string, JournalEntryPage.JournalEntryPageHeading>;
|
592
638
|
|
593
|
-
override get permission():
|
639
|
+
override get permission(): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
|
594
640
|
|
595
641
|
/**
|
596
642
|
* Return a reference to the Note instance for this Journal Entry Page in the current Scene, if any.
|
@@ -609,15 +655,10 @@ declare global {
|
|
609
655
|
* @param html - The HTML content to generate a ToC outline for.
|
610
656
|
* @param options - Additional options to configure ToC generation.
|
611
657
|
*/
|
658
|
+
// options: not null (destructured)
|
612
659
|
static buildTOC(
|
613
660
|
html: HTMLElement[],
|
614
|
-
options
|
615
|
-
/**
|
616
|
-
* Include references to the heading DOM elements in the returned ToC.
|
617
|
-
* @defaultValue `true`
|
618
|
-
*/
|
619
|
-
includeElement: boolean;
|
620
|
-
}>,
|
661
|
+
options?: JournalEntryPage.BuildTOCOptions,
|
621
662
|
): Record<string, JournalEntryPage.JournalEntryPageHeading>;
|
622
663
|
|
623
664
|
/**
|
@@ -633,36 +674,25 @@ declare global {
|
|
633
674
|
* @param heading - The heading element.
|
634
675
|
* @param options - Additional options to configure the returned node.
|
635
676
|
*/
|
677
|
+
// options: not null (destructured)
|
636
678
|
protected static _makeHeadingNode(
|
637
679
|
heading: HTMLHeadingElement,
|
638
|
-
options
|
639
|
-
/**
|
640
|
-
* Whether to include the DOM element in the returned ToC node.
|
641
|
-
* @defaultValue `true`
|
642
|
-
*/
|
643
|
-
includeElement: boolean;
|
644
|
-
}>,
|
680
|
+
options?: JournalEntryPage.MakeHeadingNodeOptions,
|
645
681
|
): JournalEntryPage.JournalEntryPageHeading;
|
646
682
|
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
/**
|
651
|
-
* A document to generate a link relative to.
|
652
|
-
*/
|
653
|
-
relativeTo: ClientDocument;
|
654
|
-
/**
|
655
|
-
* A custom label to use instead of the document's name.
|
656
|
-
*/
|
657
|
-
label: string;
|
658
|
-
}>,
|
659
|
-
): string;
|
660
|
-
|
661
|
-
override _onClickDocumentLink(event: MouseEvent): this;
|
683
|
+
/** @remarks Uses `eventData`, unlike {@link ClientDocument._createDocumentLink | `ClientDocument#_createDocumentLink`} */
|
684
|
+
// options: not null (destructured)
|
685
|
+
override _createDocumentLink(eventData: AnyObject, options?: JournalEntryPage.CreateDocumentLinkOptions): string;
|
662
686
|
|
663
687
|
/**
|
664
|
-
* @
|
688
|
+
* @remarks
|
689
|
+
* As `super`, but return the parent's sheet's `#render`:
|
690
|
+
* - AppV1: returns that sheet
|
691
|
+
* - AppV2: returns a Promise of that sheet
|
665
692
|
*/
|
693
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
694
|
+
|
695
|
+
// _onUpdate is overridden but with no signature changes from the template in BaseJournalEntryPage
|
666
696
|
|
667
697
|
protected override _buildEmbedHTML(
|
668
698
|
config: TextEditor.DocumentHTMLEmbedConfig,
|
@@ -717,8 +747,9 @@ declare global {
|
|
717
747
|
* </section>
|
718
748
|
* ```
|
719
749
|
*/
|
750
|
+
// options: not null (parameter default only)
|
720
751
|
protected _embedTextPage(
|
721
|
-
config:
|
752
|
+
config: JournalEntryPage.EmbedTextPageConfig,
|
722
753
|
options?: TextEditor.EnrichmentOptions,
|
723
754
|
): Promise<HTMLCollection>;
|
724
755
|
|
@@ -727,7 +758,6 @@ declare global {
|
|
727
758
|
* @param config - Configuration for embedding behavior.
|
728
759
|
* @param options - The original enrichment options for cases where the Document embed content
|
729
760
|
* also contains text that must be enriched.
|
730
|
-
* @returns
|
731
761
|
*
|
732
762
|
* @example Create an embedded image from a sibling journal entry page.
|
733
763
|
* ```
|
@@ -750,13 +780,13 @@ declare global {
|
|
750
780
|
* </figcaption>
|
751
781
|
* </figure>
|
752
782
|
* ```
|
783
|
+
*
|
784
|
+
* @remarks Core's implementation always returns a {@linkcode HTMLImageElement}, and does not use `options`
|
753
785
|
*/
|
786
|
+
// config: not null (destructured), options: not null (parameter default only)
|
754
787
|
protected _embedImagePage(
|
755
|
-
config
|
756
|
-
|
757
|
-
alt?: string | LazyUnknown;
|
758
|
-
},
|
759
|
-
options?: InexactPartial<TextEditor.EnrichmentOptions>,
|
788
|
+
config?: JournalEntryPage.EmbedImagePageConfig,
|
789
|
+
options?: TextEditor.EnrichmentOptions,
|
760
790
|
): Promise<HTMLElement | HTMLCollection | null>;
|
761
791
|
|
762
792
|
/*
|
@@ -773,23 +803,26 @@ declare global {
|
|
773
803
|
|
774
804
|
// Descendant Document operations have been left out because JournalEntryPage does not have any descendant documents.
|
775
805
|
|
806
|
+
// context: not null (destructured)
|
776
807
|
static override defaultName(
|
777
|
-
context
|
808
|
+
context?: Document.DefaultNameContext<"JournalEntryPage", NonNullable<JournalEntryPage.Parent>>,
|
778
809
|
): string;
|
779
810
|
|
811
|
+
/** @remarks `context.parent` is required as creation requires one */
|
780
812
|
static override createDialog(
|
781
|
-
data: Document.CreateDialogData<JournalEntryPage.CreateData
|
782
|
-
context: Document.CreateDialogContext<JournalEntryPage
|
813
|
+
data: Document.CreateDialogData<JournalEntryPage.CreateData> | undefined,
|
814
|
+
context: Document.CreateDialogContext<"JournalEntryPage", NonNullable<JournalEntryPage.Parent>>,
|
783
815
|
): Promise<JournalEntryPage.Stored | null | undefined>;
|
784
816
|
|
817
|
+
// options: not null (parameter default only)
|
785
818
|
static override fromDropData(
|
786
819
|
data: Document.DropData<JournalEntryPage.Implementation>,
|
787
|
-
options?:
|
820
|
+
options?: AnyObject,
|
788
821
|
): Promise<JournalEntryPage.Implementation | undefined>;
|
789
822
|
|
790
823
|
static override fromImport(
|
791
824
|
source: JournalEntryPage.Source,
|
792
|
-
context?: Document.FromImportContext<JournalEntryPage.Parent
|
825
|
+
context?: Document.FromImportContext<JournalEntryPage.Parent> | null,
|
793
826
|
): Promise<JournalEntryPage.Implementation>;
|
794
827
|
|
795
828
|
// Embedded document operations have been left out because JournalEntryPage does not have any embedded documents.
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import type { AnyObject, InterfaceToObject, Merge, ValueOf } from "#utils";
|
1
2
|
import type Document from "../../../common/abstract/document.d.mts";
|
2
3
|
import type { fields } from "../../../common/data/module.d.mts";
|
3
4
|
import type { documents } from "../../../client-esm/client.d.mts";
|
4
5
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
5
|
-
import type { InterfaceToObject, Merge, ValueOf } from "../../../../utils/index.d.mts";
|
6
6
|
|
7
7
|
declare global {
|
8
8
|
namespace JournalEntry {
|
@@ -175,7 +175,7 @@ declare global {
|
|
175
175
|
type Collection = Journal.Configured;
|
176
176
|
|
177
177
|
/**
|
178
|
-
* An instance of `JournalEntry` that comes from the database but failed validation
|
178
|
+
* An instance of `JournalEntry` that comes from the database but failed validation meaning that
|
179
179
|
* its `system` and `_source` could theoretically be anything.
|
180
180
|
*/
|
181
181
|
interface Invalid extends Document.Invalid<JournalEntry.Implementation> {}
|
@@ -246,7 +246,8 @@ declare global {
|
|
246
246
|
/**
|
247
247
|
* The name of this JournalEntry
|
248
248
|
*/
|
249
|
-
|
249
|
+
// FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
|
250
|
+
name: fields.StringField<{ required: true; blank: false; textSearch: true }, string>;
|
250
251
|
|
251
252
|
/**
|
252
253
|
* The pages contained within this JournalEntry document
|
@@ -497,6 +498,11 @@ declare global {
|
|
497
498
|
*/
|
498
499
|
get visible(): boolean;
|
499
500
|
|
501
|
+
/**
|
502
|
+
* @remarks "Upgrade to OBSERVER ownership if the journal entry is in a LIMITED compendium,
|
503
|
+
* as LIMITED has no special meaning for journal entries in this context."
|
504
|
+
*/
|
505
|
+
// user: not null (parameter default only where forwarded)
|
500
506
|
override getUserLevel(user?: User.Implementation): foundry.CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
|
501
507
|
|
502
508
|
/**
|
@@ -510,11 +516,10 @@ declare global {
|
|
510
516
|
* By default the entry will only be shown to players who have permission to observe it.
|
511
517
|
* If the parameter force is passed, the entry will be shown to all players regardless of normal permission.
|
512
518
|
*
|
513
|
-
* @param force - Display the entry to all players regardless of normal permissions
|
514
|
-
* (default: `false`)
|
519
|
+
* @param force - Display the entry to all players regardless of normal permissions (default: `false`)
|
515
520
|
* @returns A Promise that resolves back to the shown entry once the request is processed
|
516
521
|
*/
|
517
|
-
show(force?: boolean): Promise<this>;
|
522
|
+
show(force?: boolean | null): Promise<this>;
|
518
523
|
|
519
524
|
/**
|
520
525
|
* If the JournalEntry has a pinned note on the canvas, this method will animate to that note
|
@@ -522,11 +527,10 @@ declare global {
|
|
522
527
|
* @param options - Options which modify the pan operation
|
523
528
|
* @returns A Promise which resolves once the pan animation has concluded
|
524
529
|
*/
|
525
|
-
|
530
|
+
// options: not null (parameter default only, destructured where forwarded)
|
531
|
+
panToNote(options?: NotesLayer.PanToNoteOptions): Promise<void>;
|
526
532
|
|
527
|
-
|
528
|
-
* @privateRemarks _onUpdate and _onDelete are all overridden but with no signature changes from their definition in BaseJournalEntry.
|
529
|
-
*/
|
533
|
+
// _onUpdate and _onDelete are overridden but with no signature changes from their definition in BaseJournalEntry.
|
530
534
|
|
531
535
|
/*
|
532
536
|
* After this point these are not really overridden methods.
|
@@ -542,7 +546,7 @@ declare global {
|
|
542
546
|
|
543
547
|
/**
|
544
548
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
545
|
-
* this method must be
|
549
|
+
* this method must be overridden like so:
|
546
550
|
* ```typescript
|
547
551
|
* class SwadeCards extends Cards {
|
548
552
|
* protected override _preCreateDescendantDocuments(...args: Cards.PreCreateDescendantDocumentsArgs) {
|
@@ -560,7 +564,7 @@ declare global {
|
|
560
564
|
|
561
565
|
/**
|
562
566
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
563
|
-
* this method must be
|
567
|
+
* this method must be overridden like so:
|
564
568
|
* ```typescript
|
565
569
|
* class GurpsCards extends Cards {
|
566
570
|
* protected override _onCreateDescendantDocuments(...args: Cards.OnCreateDescendantDocumentsArgs) {
|
@@ -578,7 +582,7 @@ declare global {
|
|
578
582
|
|
579
583
|
/**
|
580
584
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
581
|
-
* this method must be
|
585
|
+
* this method must be overridden like so:
|
582
586
|
* ```typescript
|
583
587
|
* class LancerCards extends Cards {
|
584
588
|
* protected override _preUpdateDescendantDocuments(...args: Cards.OnUpdateDescendantDocuments) {
|
@@ -596,7 +600,7 @@ declare global {
|
|
596
600
|
|
597
601
|
/**
|
598
602
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
599
|
-
* this method must be
|
603
|
+
* this method must be overridden like so:
|
600
604
|
* ```typescript
|
601
605
|
* class Ptr2eCards extends Cards {
|
602
606
|
* protected override _onUpdateDescendantDocuments(...args: Cards.OnUpdateDescendantDocumentsArgs) {
|
@@ -614,7 +618,7 @@ declare global {
|
|
614
618
|
|
615
619
|
/**
|
616
620
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
617
|
-
* this method must be
|
621
|
+
* this method must be overridden like so:
|
618
622
|
* ```typescript
|
619
623
|
* class KultCards extends Cards {
|
620
624
|
* protected override _preDeleteDescendantDocuments(...args: Cards.PreDeleteDescendantDocumentsArgs) {
|
@@ -632,7 +636,7 @@ declare global {
|
|
632
636
|
|
633
637
|
/**
|
634
638
|
* @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
|
635
|
-
* this method must be
|
639
|
+
* this method must be overridden like so:
|
636
640
|
* ```typescript
|
637
641
|
* class BladesCards extends Cards {
|
638
642
|
* protected override _onDeleteDescendantDocuments(...args: Cards.OnUpdateDescendantDocuments) {
|
@@ -648,35 +652,26 @@ declare global {
|
|
648
652
|
*/
|
649
653
|
protected override _onDeleteDescendantDocuments(...args: Cards.OnDeleteDescendantDocumentsArgs): void;
|
650
654
|
|
651
|
-
|
655
|
+
// context: not null (destructured)
|
656
|
+
static override defaultName(context?: Document.DefaultNameContext<"JournalEntry", JournalEntry.Parent>): string;
|
652
657
|
|
658
|
+
// data: not null (parameter default only), context: not null (destructured)
|
653
659
|
static override createDialog(
|
654
660
|
data?: Document.CreateDialogData<JournalEntry.CreateData>,
|
655
|
-
context?: Document.CreateDialogContext<
|
661
|
+
context?: Document.CreateDialogContext<"JournalEntry", JournalEntry.Parent>,
|
656
662
|
): Promise<JournalEntry.Stored | null | undefined>;
|
657
663
|
|
664
|
+
// options: not null (parameter default only)
|
658
665
|
static override fromDropData(
|
659
666
|
data: Document.DropData<JournalEntry.Implementation>,
|
660
|
-
options?:
|
667
|
+
options?: AnyObject,
|
661
668
|
): Promise<JournalEntry.Implementation | undefined>;
|
662
669
|
|
663
670
|
static override fromImport(
|
664
671
|
source: JournalEntry.Source,
|
665
|
-
context?: Document.FromImportContext<JournalEntry.Parent
|
672
|
+
context?: Document.FromImportContext<JournalEntry.Parent> | null,
|
666
673
|
): Promise<JournalEntry.Implementation>;
|
667
|
-
}
|
668
|
-
}
|
669
674
|
|
670
|
-
|
671
|
-
|
672
|
-
* The speed of the pan animation in milliseconds
|
673
|
-
* @defaultValue `250`
|
674
|
-
*/
|
675
|
-
duration?: number;
|
676
|
-
|
677
|
-
/**
|
678
|
-
* The resulting zoom level
|
679
|
-
* @defaultValue `1.5`
|
680
|
-
*/
|
681
|
-
scale?: number;
|
675
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
676
|
+
}
|
682
677
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ConfiguredMacro } from "../../../../configuration/index.d.mts";
|
2
|
-
import type {
|
2
|
+
import type { AnyObject, Merge, NullishProps } 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";
|
@@ -153,7 +153,7 @@ declare global {
|
|
153
153
|
type Collection = Macros.Configured;
|
154
154
|
|
155
155
|
/**
|
156
|
-
* An instance of `Macro` that comes from the database but failed validation
|
156
|
+
* An instance of `Macro` that comes from the database but failed validation meaning that
|
157
157
|
* its `system` and `_source` could theoretically be anything.
|
158
158
|
*/
|
159
159
|
interface Invalid<out SubType extends Macro.SubType = Macro.SubType> extends Document.Invalid<OfType<SubType>> {}
|
@@ -225,24 +225,14 @@ declare global {
|
|
225
225
|
* The name of this Macro
|
226
226
|
* @defaultValue `""`
|
227
227
|
*/
|
228
|
-
|
229
|
-
|
230
|
-
blank: false;
|
231
|
-
label: "Name";
|
232
|
-
textSearch: true;
|
233
|
-
}>;
|
228
|
+
// FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
|
229
|
+
name: fields.StringField<{ required: true; blank: false; label: "Name"; textSearch: true }, string>;
|
234
230
|
|
235
231
|
/**
|
236
232
|
* A Macro subtype from CONST.MACRO_TYPES
|
237
233
|
* @defaultValue `CONST.MACRO_TYPES.CHAT`
|
238
234
|
*/
|
239
|
-
type: fields.DocumentTypeField<
|
240
|
-
typeof BaseMacro,
|
241
|
-
{
|
242
|
-
initial: typeof CONST.MACRO_TYPES.CHAT;
|
243
|
-
label: "Type";
|
244
|
-
}
|
245
|
-
>;
|
235
|
+
type: fields.DocumentTypeField<typeof BaseMacro, { initial: typeof CONST.MACRO_TYPES.CHAT; label: "Type" }>;
|
246
236
|
|
247
237
|
/**
|
248
238
|
* The _id of a User document which created this Macro *
|
@@ -263,6 +253,8 @@ declare global {
|
|
263
253
|
/**
|
264
254
|
* The scope of this Macro application from CONST.MACRO_SCOPES
|
265
255
|
* @defaultValue `"global"`
|
256
|
+
* @privateRemarks This field (and `CONST.MACRO_SCOPES`) is entirely vestigial, it's never checked anywhere,
|
257
|
+
* and its `<select>` in MacroConfig has been unconditionally disabled since at least 11.315
|
266
258
|
*/
|
267
259
|
scope: fields.StringField<{
|
268
260
|
required: true;
|
@@ -437,33 +429,61 @@ declare global {
|
|
437
429
|
|
438
430
|
/**
|
439
431
|
* @deprecated This type always required properties for both a `"script"` and a `"chat"` message
|
440
|
-
* even when necessary. It has been
|
432
|
+
* even when necessary. It has been superseded by {@link ScriptScope | `ScriptScope`},
|
441
433
|
* {@link ChatScope | `ChatScope`}, and {@link UnknownScope | `UnknownScope`}
|
442
434
|
*/
|
443
435
|
type Scope = ScriptScope;
|
444
436
|
|
445
437
|
/** @internal */
|
446
|
-
|
438
|
+
type _ScriptScope = NullishProps<{
|
447
439
|
/** An Actor who is the protagonist of the executed action. */
|
448
440
|
actor: Actor.Implementation;
|
449
441
|
|
450
442
|
/** A Token which is the protagonist of the executed action. */
|
451
443
|
token: Token.Object;
|
452
444
|
|
453
|
-
/**
|
454
|
-
|
445
|
+
/** The speaker data */
|
446
|
+
speaker: ChatMessage.SpeakerData;
|
455
447
|
|
456
448
|
/**
|
457
|
-
* @remarks
|
449
|
+
* @remarks Sometimes provided by core:
|
450
|
+
* - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
|
451
|
+
* will be a {@linkcode Scene.Implementation} (possibly `null` if somehow called on a `RegionBehavior` whose `RegionDocument` doesn't have a parent `Scene`)
|
458
452
|
*/
|
459
|
-
|
460
|
-
}
|
453
|
+
scene?: unknown;
|
461
454
|
|
462
|
-
|
455
|
+
/**
|
456
|
+
* @remarks Sometimes provided by core:
|
457
|
+
* - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
|
458
|
+
* will be a {@linkcode RegionDocument.Implementation} (possibly `null` if somehow called on a `RegionBehavior` without a parent `RegionDocument`)
|
459
|
+
*/
|
460
|
+
region?: unknown;
|
463
461
|
|
464
|
-
|
465
|
-
|
466
|
-
|
462
|
+
/**
|
463
|
+
* @remarks Sometimes provided by core:
|
464
|
+
* - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
|
465
|
+
* will be a {@linkcode RegionBehavior.Implementation} (possibly `null` if somehow called on a `RegionBehaviorType` without a parent `RegionBehavior`)
|
466
|
+
*/
|
467
|
+
behavior?: unknown;
|
468
|
+
|
469
|
+
/**
|
470
|
+
* @remarks Sometimes provided by core:
|
471
|
+
* - When called in {@link Macro._onClickDocumentLink | `Macro#_onClickDocumentLink`},
|
472
|
+
* will be a {@linkcode MouseEvent}
|
473
|
+
* - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
|
474
|
+
* will be a {@linkcode RegionDocument.RegionEvent}
|
475
|
+
*/
|
476
|
+
event?: unknown;
|
477
|
+
|
478
|
+
/**
|
479
|
+
* @remarks Additional arguments passed as part of the scope. Numeric keys are disallowed (`##executeScript` throws).
|
480
|
+
*/
|
481
|
+
[arg: string | symbol]: unknown;
|
482
|
+
}>;
|
483
|
+
|
484
|
+
interface ScriptScope extends _ScriptScope {}
|
485
|
+
|
486
|
+
interface ChatScope extends Pick<ScriptScope, "speaker"> {}
|
467
487
|
|
468
488
|
interface UnknownScope extends ScriptScope, ChatScope {}
|
469
489
|
|
@@ -474,7 +494,7 @@ declare global {
|
|
474
494
|
// Note: If extra types ever get added this will need to be updated to account for them, even if
|
475
495
|
// just to return `undefined`.
|
476
496
|
type ExecuteReturn<SubType extends Macro.SubType> =
|
477
|
-
| (SubType extends "chat" ? Promise<ChatMessage.Implementation | void> : never)
|
497
|
+
| (SubType extends "chat" ? Promise<ChatMessage.Implementation | undefined | void> : never)
|
478
498
|
| (SubType extends "script" ? Promise<unknown> | void : never);
|
479
499
|
|
480
500
|
/**
|
@@ -549,12 +569,13 @@ declare global {
|
|
549
569
|
* @returns A promising containing a created {@link ChatMessage | `ChatMessage`} (or `undefined`) if a chat
|
550
570
|
* macro or the return value if a script macro. A void return is possible if the user
|
551
571
|
* is not permitted to execute macros or a script macro execution fails.
|
572
|
+
* @remarks Forwards to either `#executeChat` or `#executeScript`
|
552
573
|
*/
|
574
|
+
// scope: not null (parameter default only, destructured where forwarded)
|
553
575
|
execute(scope?: Macro.ExecuteScope<SubType>): Macro.ExecuteReturn<SubType>;
|
554
576
|
|
555
|
-
|
556
|
-
|
557
|
-
_onClickDocumentLink(event: MouseEvent): ReturnType<this["execute"]>;
|
577
|
+
/** @remarks Returns `this.execute({event})` */
|
578
|
+
override _onClickDocumentLink(event: MouseEvent): Macro.ExecuteReturn<SubType>;
|
558
579
|
|
559
580
|
/*
|
560
581
|
* After this point these are not really overridden methods.
|
@@ -570,21 +591,26 @@ declare global {
|
|
570
591
|
|
571
592
|
// Descendant Document operations have been left out because Macro does not have any descendant documents.
|
572
593
|
|
573
|
-
|
594
|
+
// context: not null (destructured)
|
595
|
+
static override defaultName(context?: Document.DefaultNameContext<"Macro", Macro.Parent>): string;
|
574
596
|
|
597
|
+
// data: not null (parameter default only), context: not null (destructured)
|
575
598
|
static override createDialog(
|
576
599
|
data?: Macro.CreateData,
|
577
|
-
context?: Document.CreateDialogContext<Macro
|
600
|
+
context?: Document.CreateDialogContext<"Macro", Macro.Parent>,
|
578
601
|
): Promise<Macro.Stored | null | undefined>;
|
579
602
|
|
603
|
+
// options: not null (parameter default only)
|
580
604
|
static override fromDropData(
|
581
605
|
data: Document.DropData<Macro.Implementation>,
|
582
|
-
options?:
|
606
|
+
options?: AnyObject,
|
583
607
|
): Promise<Macro.Implementation | undefined>;
|
584
608
|
|
585
609
|
static override fromImport(
|
586
610
|
source: Macro.Source,
|
587
|
-
context?: Document.FromImportContext<Macro.Parent
|
611
|
+
context?: Document.FromImportContext<Macro.Parent> | null,
|
588
612
|
): Promise<Macro.Implementation>;
|
613
|
+
|
614
|
+
#Macro: true;
|
589
615
|
}
|
590
616
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Merge } from "
|
1
|
+
import type { AnyObject, Merge } from "#utils";
|
2
2
|
import type { documents } from "../../../client-esm/client.d.mts";
|
3
3
|
import type Document from "../../../common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "../../../common/data/fields.d.mts";
|
@@ -113,7 +113,7 @@ declare global {
|
|
113
113
|
type Collection = never;
|
114
114
|
|
115
115
|
/**
|
116
|
-
* An instance of `MeasuredTemplateDocument` that comes from the database but failed validation
|
116
|
+
* An instance of `MeasuredTemplateDocument` that comes from the database but failed validation meaning that
|
117
117
|
* its `system` and `_source` could theoretically be anything.
|
118
118
|
*/
|
119
119
|
interface Invalid extends Document.Invalid<MeasuredTemplateDocument.Implementation> {}
|
@@ -461,7 +461,7 @@ declare global {
|
|
461
461
|
/**
|
462
462
|
* Rotation is an alias for direction
|
463
463
|
*/
|
464
|
-
get rotation():
|
464
|
+
get rotation(): number;
|
465
465
|
|
466
466
|
/**
|
467
467
|
* Is the current User the author of this template?
|
@@ -482,23 +482,28 @@ declare global {
|
|
482
482
|
|
483
483
|
// Descendant Document operations have been left out because MeasuredTemplate does not have any descendant documents.
|
484
484
|
|
485
|
+
// context: not null (destructured)
|
485
486
|
static override defaultName(
|
486
|
-
context
|
487
|
+
context?: Document.DefaultNameContext<"MeasuredTemplate", NonNullable<MeasuredTemplateDocument.Parent>>,
|
487
488
|
): string;
|
488
489
|
|
490
|
+
/** @remarks `context.parent` is required as creation requires one */
|
489
491
|
static override createDialog(
|
490
|
-
data: Document.CreateDialogData<MeasuredTemplateDocument.CreateData
|
491
|
-
context: Document.CreateDialogContext<
|
492
|
+
data: Document.CreateDialogData<MeasuredTemplateDocument.CreateData> | undefined,
|
493
|
+
context: Document.CreateDialogContext<"MeasuredTemplate", NonNullable<MeasuredTemplateDocument.Parent>>,
|
492
494
|
): Promise<MeasuredTemplateDocument.Stored | null | undefined>;
|
493
495
|
|
496
|
+
// options: not null (parameter default only)
|
494
497
|
static override fromDropData(
|
495
498
|
data: Document.DropData<MeasuredTemplateDocument.Implementation>,
|
496
|
-
options?:
|
499
|
+
options?: AnyObject,
|
497
500
|
): Promise<MeasuredTemplateDocument.Implementation | undefined>;
|
498
501
|
|
499
502
|
static override fromImport(
|
500
503
|
source: MeasuredTemplateDocument.Source,
|
501
|
-
context?: Document.FromImportContext<MeasuredTemplateDocument.Parent
|
504
|
+
context?: Document.FromImportContext<MeasuredTemplateDocument.Parent> | null,
|
502
505
|
): Promise<MeasuredTemplateDocument.Implementation>;
|
506
|
+
|
507
|
+
override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
|
503
508
|
}
|
504
509
|
}
|