@7h3laughingman/foundry-types 13.351.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +3 -0
- package/package.json +76 -0
- package/src/client/_module.d.mts +103 -0
- package/src/client/_types.d.mts +900 -0
- package/src/client/applications/_module.d.mts +27 -0
- package/src/client/applications/_types.d.mts +192 -0
- package/src/client/applications/api/_module.d.mts +8 -0
- package/src/client/applications/api/application.d.mts +456 -0
- package/src/client/applications/api/category-browser.d.mts +78 -0
- package/src/client/applications/api/dialog.d.mts +213 -0
- package/src/client/applications/api/document-sheet.d.mts +148 -0
- package/src/client/applications/api/handlebars-application.d.mts +120 -0
- package/src/client/applications/apps/_module.d.mts +10 -0
- package/src/client/applications/apps/av/_module.d.mts +2 -0
- package/src/client/applications/apps/av/camera-popout.d.mts +53 -0
- package/src/client/applications/apps/av/cameras.d.mts +235 -0
- package/src/client/applications/apps/combat-tracker-config.d.mts +27 -0
- package/src/client/applications/apps/compendium-art-config.d.mts +17 -0
- package/src/client/applications/apps/document-ownership.d.mts +17 -0
- package/src/client/applications/apps/document-sheet-config.d.mts +144 -0
- package/src/client/applications/apps/file-picker.d.mts +321 -0
- package/src/client/applications/apps/grid-config.d.mts +33 -0
- package/src/client/applications/apps/image-popout.d.mts +92 -0
- package/src/client/applications/apps/permission-config.d.mts +24 -0
- package/src/client/applications/dice/_module.d.mts +1 -0
- package/src/client/applications/dice/roll-resolver.d.mts +92 -0
- package/src/client/applications/elements/_module.d.mts +19 -0
- package/src/client/applications/elements/codemirror/element.d.mts +73 -0
- package/src/client/applications/elements/color-picker.d.mts +14 -0
- package/src/client/applications/elements/document-embed.d.mts +14 -0
- package/src/client/applications/elements/document-tags.d.mts +50 -0
- package/src/client/applications/elements/enriched-content.d.mts +31 -0
- package/src/client/applications/elements/file-picker.d.mts +59 -0
- package/src/client/applications/elements/form-element.d.mts +105 -0
- package/src/client/applications/elements/hue-slider.d.mts +35 -0
- package/src/client/applications/elements/multi-select.d.mts +89 -0
- package/src/client/applications/elements/prosemirror-editor.d.mts +32 -0
- package/src/client/applications/elements/range-picker.d.mts +23 -0
- package/src/client/applications/elements/secret-block.d.mts +28 -0
- package/src/client/applications/elements/string-tags.d.mts +50 -0
- package/src/client/applications/forms/fields.d.mts +132 -0
- package/src/client/applications/handlebars.d.mts +303 -0
- package/src/client/applications/hud/_module.d.mts +5 -0
- package/src/client/applications/hud/container.d.mts +38 -0
- package/src/client/applications/hud/drawing-hud.d.mts +14 -0
- package/src/client/applications/hud/placeable-hud.d.mts +72 -0
- package/src/client/applications/hud/tile-hud.d.mts +21 -0
- package/src/client/applications/hud/token-hud.d.mts +69 -0
- package/src/client/applications/settings/_module.d.mts +2 -0
- package/src/client/applications/settings/config.d.mts +38 -0
- package/src/client/applications/settings/menus/_module.d.mts +6 -0
- package/src/client/applications/settings/menus/av-config.d.mts +37 -0
- package/src/client/applications/settings/menus/default-sheets-config.d.mts +23 -0
- package/src/client/applications/settings/menus/dice-config.d.mts +23 -0
- package/src/client/applications/settings/menus/font-config.d.mts +145 -0
- package/src/client/applications/settings/menus/prototype-overrides.d.mts +20 -0
- package/src/client/applications/settings/menus/ui-config.d.mts +40 -0
- package/src/client/applications/sheets/_module.d.mts +9 -0
- package/src/client/applications/sheets/combatant-config.d.mts +21 -0
- package/src/client/applications/sheets/item-sheet.d.mts +13 -0
- package/src/client/applications/sheets/scene-config.d.mts +50 -0
- package/src/client/applications/sheets/template-config.d.mts +19 -0
- package/src/client/applications/sheets/token/mixin.mts +182 -0
- package/src/client/applications/sheets/token/prototype-config.d.mts +75 -0
- package/src/client/applications/sheets/token/token-config.d.mts +62 -0
- package/src/client/applications/sheets/user-config.d.mts +27 -0
- package/src/client/applications/sidebar/_module.d.mts +5 -0
- package/src/client/applications/sidebar/apps/_module.d.mts +9 -0
- package/src/client/applications/sidebar/apps/chat-popout.d.mts +45 -0
- package/src/client/applications/sidebar/apps/compendium.d.mts +65 -0
- package/src/client/applications/sidebar/apps/controls-config.d.mts +29 -0
- package/src/client/applications/sidebar/apps/folder-export.d.mts +11 -0
- package/src/client/applications/sidebar/apps/invitation-links.d.mts +10 -0
- package/src/client/applications/sidebar/apps/module-management.d.mts +65 -0
- package/src/client/applications/sidebar/apps/support-details.d.mts +72 -0
- package/src/client/applications/sidebar/apps/tours-management.d.mts +16 -0
- package/src/client/applications/sidebar/apps/world-config.d.mts +38 -0
- package/src/client/applications/sidebar/document-directory.d.mts +327 -0
- package/src/client/applications/sidebar/sidebar-tab.d.mts +89 -0
- package/src/client/applications/sidebar/sidebar.d.mts +93 -0
- package/src/client/applications/sidebar/tabs/_module.d.mts +14 -0
- package/src/client/applications/sidebar/tabs/actor-directory.d.mts +26 -0
- package/src/client/applications/sidebar/tabs/cards-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/chat.d.mts +271 -0
- package/src/client/applications/sidebar/tabs/combat-tracker.d.mts +198 -0
- package/src/client/applications/sidebar/tabs/compendium-directory.d.mts +289 -0
- package/src/client/applications/sidebar/tabs/item-directory.d.mts +24 -0
- package/src/client/applications/sidebar/tabs/journal-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/macro-directory.d.mts +12 -0
- package/src/client/applications/sidebar/tabs/playlist-directory.d.mts +267 -0
- package/src/client/applications/sidebar/tabs/roll-table-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/scene-directory.d.mts +26 -0
- package/src/client/applications/sidebar/tabs/settings.d.mts +16 -0
- package/src/client/applications/ui/_module.d.mts +9 -0
- package/src/client/applications/ui/game-pause.d.mts +15 -0
- package/src/client/applications/ui/hotbar.d.mts +86 -0
- package/src/client/applications/ui/main-menu.d.mts +48 -0
- package/src/client/applications/ui/notifications.d.mts +168 -0
- package/src/client/applications/ui/players.d.mts +92 -0
- package/src/client/applications/ui/region-legend.d.mts +47 -0
- package/src/client/applications/ui/scene-controls.d.mts +138 -0
- package/src/client/applications/ui/scene-navigation.d.mts +61 -0
- package/src/client/applications/ux/_module.d.mts +11 -0
- package/src/client/applications/ux/context-menu.d.mts +202 -0
- package/src/client/applications/ux/drag-drop.d.mts +131 -0
- package/src/client/applications/ux/draggable.d.mts +108 -0
- package/src/client/applications/ux/form-data-extended.d.mts +76 -0
- package/src/client/applications/ux/html-secret.d.mts +61 -0
- package/src/client/applications/ux/prosemirror-editor.d.mts +173 -0
- package/src/client/applications/ux/search-filter.d.mts +119 -0
- package/src/client/applications/ux/tabs.d.mts +94 -0
- package/src/client/applications/ux/text-editor.d.mts +329 -0
- package/src/client/appv1/_module.d.mts +2 -0
- package/src/client/appv1/api/_module.d.mts +8 -0
- package/src/client/appv1/api/application-v1.d.mts +388 -0
- package/src/client/appv1/api/dialog-v1.d.mts +191 -0
- package/src/client/appv1/api/document-sheet-v1.d.mts +96 -0
- package/src/client/appv1/api/form-application-v1.d.mts +203 -0
- package/src/client/appv1/sheets/_module.d.mts +9 -0
- package/src/client/appv1/sheets/actor-sheet.d.mts +129 -0
- package/src/client/appv1/sheets/adventure-importer.d.mts +43 -0
- package/src/client/appv1/sheets/item-sheet.d.mts +42 -0
- package/src/client/appv1/sheets/journal-page-sheet.d.mts +100 -0
- package/src/client/appv1/sheets/journal-sheet.d.mts +262 -0
- package/src/client/audio/_module.d.mts +9 -0
- package/src/client/audio/_types.d.mts +121 -0
- package/src/client/audio/biquad.d.mts +29 -0
- package/src/client/audio/cache.d.mts +58 -0
- package/src/client/audio/convolver.d.mts +50 -0
- package/src/client/audio/helper.d.mts +306 -0
- package/src/client/audio/sound.d.mts +289 -0
- package/src/client/audio/timeout.d.mts +71 -0
- package/src/client/av/_module.d.mts +7 -0
- package/src/client/av/client.d.mts +167 -0
- package/src/client/av/clients/_module.d.mts +1 -0
- package/src/client/av/clients/simplepeer.d.mts +123 -0
- package/src/client/av/master.d.mts +128 -0
- package/src/client/av/settings.d.mts +100 -0
- package/src/client/canvas/_module.d.mts +20 -0
- package/src/client/canvas/animation/_module.d.mts +5 -0
- package/src/client/canvas/animation/_types.d.mts +73 -0
- package/src/client/canvas/animation/canvas-animation.d.mts +114 -0
- package/src/client/canvas/animation/chat-bubbles.d.mts +58 -0
- package/src/client/canvas/animation/smooth-noise.d.mts +34 -0
- package/src/client/canvas/board.d.mts +413 -0
- package/src/client/canvas/containers/_module.d.mts +20 -0
- package/src/client/canvas/containers/_types.d.mts +21 -0
- package/src/client/canvas/containers/advanced/cached-container.d.mts +108 -0
- package/src/client/canvas/containers/advanced/full-canvas-mixin.d.mts +12 -0
- package/src/client/canvas/containers/advanced/full-container-mixin.d.mts +12 -0
- package/src/client/canvas/containers/advanced/unbound-container.d.mts +12 -0
- package/src/client/canvas/containers/elements/control-icon.d.mts +40 -0
- package/src/client/canvas/containers/elements/cursor.d.mts +37 -0
- package/src/client/canvas/containers/elements/door-control.d.mts +66 -0
- package/src/client/canvas/containers/elements/door-mesh.d.mts +127 -0
- package/src/client/canvas/containers/elements/grid-highlight.d.mts +25 -0
- package/src/client/canvas/containers/elements/grid-mesh.d.mts +34 -0
- package/src/client/canvas/containers/elements/particles/leaves.d.mts +15 -0
- package/src/client/canvas/containers/elements/particles/particle-effect.d.mts +45 -0
- package/src/client/canvas/containers/elements/point-source-mesh.d.mts +29 -0
- package/src/client/canvas/containers/elements/precise-text.d.mts +18 -0
- package/src/client/canvas/containers/elements/quad-mesh.d.mts +41 -0
- package/src/client/canvas/containers/elements/resize-handle.d.mts +61 -0
- package/src/client/canvas/containers/elements/sprite-mesh.d.mts +319 -0
- package/src/client/canvas/extensions/_module.d.mts +4 -0
- package/src/client/canvas/extensions/circle-extension.d.mts +4 -0
- package/src/client/canvas/extensions/graphics-extension.d.mts +5 -0
- package/src/client/canvas/extensions/polygon-extension.d.mts +4 -0
- package/src/client/canvas/extensions/rectangle-extension.d.mts +4 -0
- package/src/client/canvas/framebuffer-snapshot.d.mts +20 -0
- package/src/client/canvas/geometry/_module.d.mts +12 -0
- package/src/client/canvas/geometry/_types.d.mts +90 -0
- package/src/client/canvas/geometry/clockwise-sweep.d.mts +129 -0
- package/src/client/canvas/geometry/edges/_module.d.mts +5 -0
- package/src/client/canvas/geometry/edges/collision.d.mts +58 -0
- package/src/client/canvas/geometry/edges/edge.d.mts +144 -0
- package/src/client/canvas/geometry/edges/edges.d.mts +14 -0
- package/src/client/canvas/geometry/edges/vertex.d.mts +85 -0
- package/src/client/canvas/geometry/observable-transform.d.mts +28 -0
- package/src/client/canvas/geometry/quad-tree.d.mts +150 -0
- package/src/client/canvas/geometry/shapes/limited-angle-polygon.d.mts +69 -0
- package/src/client/canvas/geometry/shapes/polygon-mesher.d.mts +50 -0
- package/src/client/canvas/geometry/shapes/ray.d.mts +126 -0
- package/src/client/canvas/geometry/shapes/source-polygon.d.mts +161 -0
- package/src/client/canvas/geometry/unbound-transform.d.mts +9 -0
- package/src/client/canvas/geometry/weiler-atherton-clipping.d.mts +120 -0
- package/src/client/canvas/groups/_module.d.mts +10 -0
- package/src/client/canvas/groups/canvas-group-mixin.mts +95 -0
- package/src/client/canvas/groups/effects.d.mts +118 -0
- package/src/client/canvas/groups/environment.d.mts +79 -0
- package/src/client/canvas/groups/hidden.d.mts +42 -0
- package/src/client/canvas/groups/interface.d.mts +31 -0
- package/src/client/canvas/groups/overlay.d.mts +11 -0
- package/src/client/canvas/groups/primary.d.mts +223 -0
- package/src/client/canvas/groups/rendered.d.mts +7 -0
- package/src/client/canvas/groups/visibility.d.mts +154 -0
- package/src/client/canvas/interaction/_module.d.mts +15 -0
- package/src/client/canvas/interaction/_types.d.mts +67 -0
- package/src/client/canvas/interaction/mouse-handler.d.mts +231 -0
- package/src/client/canvas/interaction/ping/alert.d.mts +16 -0
- package/src/client/canvas/interaction/ping/arrow.d.mts +16 -0
- package/src/client/canvas/interaction/ping/chevron.d.mts +25 -0
- package/src/client/canvas/interaction/ping/ping.d.mts +35 -0
- package/src/client/canvas/interaction/ping/pulse.d.mts +28 -0
- package/src/client/canvas/interaction/render-flags.d.mts +69 -0
- package/src/client/canvas/interaction/ruler/base-ruler.d.mts +179 -0
- package/src/client/canvas/interaction/ruler/ruler.d.mts +56 -0
- package/src/client/canvas/layers/_module.d.mts +31 -0
- package/src/client/canvas/layers/_types.d.mts +89 -0
- package/src/client/canvas/layers/base/canvas-layer.d.mts +71 -0
- package/src/client/canvas/layers/base/interaction-layer.d.mts +176 -0
- package/src/client/canvas/layers/base/placeables-layer.d.mts +410 -0
- package/src/client/canvas/layers/controls.d.mts +181 -0
- package/src/client/canvas/layers/drawings.d.mts +75 -0
- package/src/client/canvas/layers/effects/background-effects.d.mts +32 -0
- package/src/client/canvas/layers/effects/coloration-effects.d.mts +23 -0
- package/src/client/canvas/layers/effects/darkness-effects.d.mts +14 -0
- package/src/client/canvas/layers/effects/illumination-effects.d.mts +72 -0
- package/src/client/canvas/layers/effects/weather-effects.d.mts +137 -0
- package/src/client/canvas/layers/grid.d.mts +112 -0
- package/src/client/canvas/layers/lighting.d.mts +59 -0
- package/src/client/canvas/layers/masks/depth.d.mts +53 -0
- package/src/client/canvas/layers/masks/occlusion.d.mts +84 -0
- package/src/client/canvas/layers/masks/vision.d.mts +44 -0
- package/src/client/canvas/layers/notes.d.mts +59 -0
- package/src/client/canvas/layers/regions.d.mts +70 -0
- package/src/client/canvas/layers/sounds.d.mts +190 -0
- package/src/client/canvas/layers/templates.d.mts +41 -0
- package/src/client/canvas/layers/tiles.d.mts +66 -0
- package/src/client/canvas/layers/tokens.d.mts +171 -0
- package/src/client/canvas/layers/walls.d.mts +99 -0
- package/src/client/canvas/loader.d.mts +135 -0
- package/src/client/canvas/perception/_module.d.mts +13 -0
- package/src/client/canvas/perception/_types.d.mts +61 -0
- package/src/client/canvas/perception/detection-mode.d.mts +122 -0
- package/src/client/canvas/perception/detection-modes/darkvision.d.mts +11 -0
- package/src/client/canvas/perception/detection-modes/invisibility-perception.d.mts +15 -0
- package/src/client/canvas/perception/detection-modes/light-perception.d.mts +18 -0
- package/src/client/canvas/perception/detection-modes/super-perception.d.mts +13 -0
- package/src/client/canvas/perception/detection-modes/tremor-perception.d.mts +13 -0
- package/src/client/canvas/perception/fog.d.mts +65 -0
- package/src/client/canvas/perception/perception-manager.d.mts +72 -0
- package/src/client/canvas/perception/vision-mode.d.mts +133 -0
- package/src/client/canvas/placeables/_module.d.mts +15 -0
- package/src/client/canvas/placeables/_types.d.mts +29 -0
- package/src/client/canvas/placeables/drawing.d.mts +106 -0
- package/src/client/canvas/placeables/light.d.mts +155 -0
- package/src/client/canvas/placeables/note.d.mts +61 -0
- package/src/client/canvas/placeables/placeable-object.d.mts +415 -0
- package/src/client/canvas/placeables/region.d.mts +129 -0
- package/src/client/canvas/placeables/regions/_module.d.mts +2 -0
- package/src/client/canvas/placeables/regions/geometry.d.mts +19 -0
- package/src/client/canvas/placeables/regions/mesh.d.mts +72 -0
- package/src/client/canvas/placeables/sound.d.mts +93 -0
- package/src/client/canvas/placeables/template.d.mts +164 -0
- package/src/client/canvas/placeables/tile.d.mts +189 -0
- package/src/client/canvas/placeables/token.d.mts +675 -0
- package/src/client/canvas/placeables/tokens/_module.d.mts +8 -0
- package/src/client/canvas/placeables/tokens/base-ruler.d.mts +68 -0
- package/src/client/canvas/placeables/tokens/ring-config.d.mts +201 -0
- package/src/client/canvas/placeables/tokens/ring-data.d.mts +56 -0
- package/src/client/canvas/placeables/tokens/ring.d.mts +194 -0
- package/src/client/canvas/placeables/tokens/ruler.d.mts +96 -0
- package/src/client/canvas/placeables/tokens/targets.d.mts +22 -0
- package/src/client/canvas/placeables/tokens/turn-marker-data.d.mts +52 -0
- package/src/client/canvas/placeables/tokens/turn-marker.d.mts +45 -0
- package/src/client/canvas/placeables/wall.d.mts +155 -0
- package/src/client/canvas/primary/_module.d.mts +7 -0
- package/src/client/canvas/primary/primary-canvas-container.d.mts +40 -0
- package/src/client/canvas/primary/primary-canvas-object.mts +215 -0
- package/src/client/canvas/primary/primary-graphics.d.mts +22 -0
- package/src/client/canvas/primary/primary-occludable-object.mts +139 -0
- package/src/client/canvas/primary/primary-particle-effect.d.mts +50 -0
- package/src/client/canvas/primary/primary-sprite-mesh.d.mts +127 -0
- package/src/client/canvas/rendering/_module.d.mts +5 -0
- package/src/client/canvas/rendering/batching/_module.d.mts +2 -0
- package/src/client/canvas/rendering/batching/batch-renderer.d.mts +71 -0
- package/src/client/canvas/rendering/batching/batch-shader-generator.d.mts +13 -0
- package/src/client/canvas/rendering/blend-modes.d.mts +37 -0
- package/src/client/canvas/rendering/filters/_module.d.mts +13 -0
- package/src/client/canvas/rendering/filters/base-filter.d.mts +28 -0
- package/src/client/canvas/rendering/filters/base-mask-filter.d.mts +14 -0
- package/src/client/canvas/rendering/filters/blur.d.mts +152 -0
- package/src/client/canvas/rendering/filters/effects-masking.d.mts +84 -0
- package/src/client/canvas/rendering/filters/environment.d.mts +22 -0
- package/src/client/canvas/rendering/filters/glow-overlay.d.mts +41 -0
- package/src/client/canvas/rendering/filters/invisibility.d.mts +11 -0
- package/src/client/canvas/rendering/filters/outline-overlay.d.mts +43 -0
- package/src/client/canvas/rendering/filters/smaa/_module.d.mts +4 -0
- package/src/client/canvas/rendering/filters/smaa/blend.d.mts +6 -0
- package/src/client/canvas/rendering/filters/smaa/edges.d.mts +11 -0
- package/src/client/canvas/rendering/filters/smaa/smaa.d.mts +102 -0
- package/src/client/canvas/rendering/filters/smaa/weights.d.mts +11 -0
- package/src/client/canvas/rendering/filters/transition.d.mts +97 -0
- package/src/client/canvas/rendering/filters/visibility.d.mts +46 -0
- package/src/client/canvas/rendering/filters/vision-mask-filter.d.mts +15 -0
- package/src/client/canvas/rendering/filters/void.d.mts +6 -0
- package/src/client/canvas/rendering/filters/weather-occlusion-mask.d.mts +30 -0
- package/src/client/canvas/rendering/mixins/_module.d.mts +2 -0
- package/src/client/canvas/rendering/mixins/base-shader-mixin.d.mts +118 -0
- package/src/client/canvas/rendering/mixins/fragment-channel-mixin.d.mts +21 -0
- package/src/client/canvas/rendering/shaders/_module.d.mts +80 -0
- package/src/client/canvas/rendering/shaders/_types.d.mts +98 -0
- package/src/client/canvas/rendering/shaders/base-shader.d.mts +58 -0
- package/src/client/canvas/rendering/shaders/graphics/dash-line.d.mts +13 -0
- package/src/client/canvas/rendering/shaders/grid/grid.d.mts +99 -0
- package/src/client/canvas/rendering/shaders/lighting/background-lighting.d.mts +50 -0
- package/src/client/canvas/rendering/shaders/lighting/base-lighting.d.mts +164 -0
- package/src/client/canvas/rendering/shaders/lighting/coloration-lighting.d.mts +48 -0
- package/src/client/canvas/rendering/shaders/lighting/darkness-lighting.d.mts +45 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/bewitching-wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/black-hole.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/chroma.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/emanation.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/energy-field.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/fairy-light.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/flame.d.mts +75 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/fog.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/force-grid.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/ghost-light.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/hexa-dome.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/light-dome.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/magical-gloom.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/pulse.d.mts +41 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/radial-rainbow.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/revolving-light.d.mts +38 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/roiling-mass.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/siren-light.d.mts +80 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/smoke-patch.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/star-light.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/sunburst.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/swirling-rainbow.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/torch.d.mts +41 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/vortex.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/illumination-lighting.d.mts +51 -0
- package/src/client/canvas/rendering/shaders/region/adjust-darkness-level.d.mts +58 -0
- package/src/client/canvas/rendering/shaders/region/base.d.mts +20 -0
- package/src/client/canvas/rendering/shaders/region/highlight.d.mts +18 -0
- package/src/client/canvas/rendering/shaders/samplers/amplification.d.mts +30 -0
- package/src/client/canvas/rendering/shaders/samplers/base-sampler.d.mts +141 -0
- package/src/client/canvas/rendering/shaders/samplers/baseline-illumination.d.mts +15 -0
- package/src/client/canvas/rendering/shaders/samplers/color-adjustments.d.mts +36 -0
- package/src/client/canvas/rendering/shaders/samplers/colorize-brightness.d.mts +17 -0
- package/src/client/canvas/rendering/shaders/samplers/fog-of-war.d.mts +9 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/depth.d.mts +66 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/occlusion.d.mts +77 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/primary.d.mts +28 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/token-ring.d.mts +33 -0
- package/src/client/canvas/rendering/shaders/vision/background-vision.d.mts +47 -0
- package/src/client/canvas/rendering/shaders/vision/base-vision.d.mts +11 -0
- package/src/client/canvas/rendering/shaders/vision/coloration-vision.d.mts +43 -0
- package/src/client/canvas/rendering/shaders/vision/effects/amplification.d.mts +35 -0
- package/src/client/canvas/rendering/shaders/vision/effects/wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/vision/illumination-vision.d.mts +45 -0
- package/src/client/canvas/rendering/shaders/weather/base-weather.d.mts +87 -0
- package/src/client/canvas/rendering/shaders/weather/effect.d.mts +27 -0
- package/src/client/canvas/rendering/shaders/weather/fog.d.mts +26 -0
- package/src/client/canvas/rendering/shaders/weather/rain.d.mts +16 -0
- package/src/client/canvas/rendering/shaders/weather/snow.d.mts +12 -0
- package/src/client/canvas/scene-manager.d.mts +101 -0
- package/src/client/canvas/sources/_module.d.mts +10 -0
- package/src/client/canvas/sources/base-effect-source.d.mts +179 -0
- package/src/client/canvas/sources/base-light-source.d.mts +141 -0
- package/src/client/canvas/sources/global-light-source.d.mts +36 -0
- package/src/client/canvas/sources/point-darkness-source.d.mts +87 -0
- package/src/client/canvas/sources/point-effect-source.d.mts +105 -0
- package/src/client/canvas/sources/point-light-source.d.mts +54 -0
- package/src/client/canvas/sources/point-movement-source.d.mts +10 -0
- package/src/client/canvas/sources/point-sound-source.d.mts +29 -0
- package/src/client/canvas/sources/point-vision-source.d.mts +151 -0
- package/src/client/canvas/sources/rendered-effect-source.d.mts +214 -0
- package/src/client/canvas/texture-extractor.d.mts +98 -0
- package/src/client/canvas/workers/_module.d.mts +1 -0
- package/src/client/canvas/workers/texture-worker.d.mts +73 -0
- package/src/client/client.d.mts +15 -0
- package/src/client/config.d.mts +868 -0
- package/src/client/data/_module.d.mts +11 -0
- package/src/client/data/_types.d.mts +97 -0
- package/src/client/data/calendar.d.mts +175 -0
- package/src/client/data/client-backend.d.mts +82 -0
- package/src/client/data/combat-config.d.mts +84 -0
- package/src/client/data/region-behaviors/_module.d.mts +9 -0
- package/src/client/data/region-behaviors/adjust-darkness-level.d.mts +29 -0
- package/src/client/data/region-behaviors/base.d.mts +70 -0
- package/src/client/data/region-behaviors/execute-macro.d.mts +17 -0
- package/src/client/data/region-behaviors/execute-script.d.mts +15 -0
- package/src/client/data/region-behaviors/increase-movement-cost.d.mts +36 -0
- package/src/client/data/region-behaviors/pause-game.d.mts +15 -0
- package/src/client/data/region-behaviors/suppress-weather.d.mts +13 -0
- package/src/client/data/region-behaviors/teleport-token.d.mts +27 -0
- package/src/client/data/region-behaviors/toggle-behavior.d.mts +19 -0
- package/src/client/data/region-shapes/_module.d.mts +2 -0
- package/src/client/data/region-shapes/polygon-tree.d.mts +101 -0
- package/src/client/data/region-shapes/shape.d.mts +97 -0
- package/src/client/data/terrain-data.d.mts +70 -0
- package/src/client/dice/_module.d.mts +14 -0
- package/src/client/dice/_types.d.mts +89 -0
- package/src/client/dice/parser.d.mts +83 -0
- package/src/client/dice/roll.d.mts +542 -0
- package/src/client/dice/terms/_module.d.mts +16 -0
- package/src/client/dice/terms/_types.d.mts +10 -0
- package/src/client/dice/terms/coin.d.mts +35 -0
- package/src/client/dice/terms/dice.d.mts +263 -0
- package/src/client/dice/terms/die.d.mts +199 -0
- package/src/client/dice/terms/fate.d.mts +22 -0
- package/src/client/dice/terms/function.d.mts +60 -0
- package/src/client/dice/terms/numeric.d.mts +39 -0
- package/src/client/dice/terms/operator.d.mts +28 -0
- package/src/client/dice/terms/parenthetical.d.mts +70 -0
- package/src/client/dice/terms/pool.d.mts +170 -0
- package/src/client/dice/terms/string.d.mts +23 -0
- package/src/client/dice/terms/term.d.mts +135 -0
- package/src/client/dice/twister.d.mts +87 -0
- package/src/client/documents/_module.d.mts +70 -0
- package/src/client/documents/_types.d.mts +736 -0
- package/src/client/documents/abstract/_module.d.mts +6 -0
- package/src/client/documents/abstract/canvas-document.d.mts +65 -0
- package/src/client/documents/abstract/client-document.d.mts +545 -0
- package/src/client/documents/abstract/directory-collection-mixin.d.mts +79 -0
- package/src/client/documents/abstract/document-collection.d.mts +124 -0
- package/src/client/documents/abstract/world-collection.d.mts +157 -0
- package/src/client/documents/active-effect.d.mts +203 -0
- package/src/client/documents/actor-delta.d.mts +76 -0
- package/src/client/documents/actor.d.mts +269 -0
- package/src/client/documents/adventure.d.mts +38 -0
- package/src/client/documents/ambient-light.d.mts +34 -0
- package/src/client/documents/ambient-sound.d.mts +16 -0
- package/src/client/documents/card.d.mts +102 -0
- package/src/client/documents/cards.d.mts +38 -0
- package/src/client/documents/chat-message.d.mts +190 -0
- package/src/client/documents/collections/_module.d.mts +19 -0
- package/src/client/documents/collections/actors.d.mts +28 -0
- package/src/client/documents/collections/card-stacks.d.mts +14 -0
- package/src/client/documents/collections/chat-messages.d.mts +29 -0
- package/src/client/documents/collections/combat-encounters.d.mts +32 -0
- package/src/client/documents/collections/compendium-collection.d.mts +170 -0
- package/src/client/documents/collections/compendium-folders.d.mts +30 -0
- package/src/client/documents/collections/compendium-packs.d.mts +23 -0
- package/src/client/documents/collections/fog-explorations.d.mts +19 -0
- package/src/client/documents/collections/folders.d.mts +20 -0
- package/src/client/documents/collections/items.d.mts +13 -0
- package/src/client/documents/collections/journal.d.mts +24 -0
- package/src/client/documents/collections/macros.d.mts +15 -0
- package/src/client/documents/collections/playlists.d.mts +28 -0
- package/src/client/documents/collections/roll-tables.d.mts +20 -0
- package/src/client/documents/collections/scenes.d.mts +60 -0
- package/src/client/documents/collections/users.d.mts +57 -0
- package/src/client/documents/collections/world-settings.d.mts +34 -0
- package/src/client/documents/combat.d.mts +371 -0
- package/src/client/documents/combatant-group.d.mts +42 -0
- package/src/client/documents/combatant.d.mts +125 -0
- package/src/client/documents/drawing.d.mts +27 -0
- package/src/client/documents/fog-exploration.d.mts +30 -0
- package/src/client/documents/folder.d.mts +124 -0
- package/src/client/documents/item.d.mts +73 -0
- package/src/client/documents/journal-entry-category.d.mts +15 -0
- package/src/client/documents/journal-entry-page.d.mts +77 -0
- package/src/client/documents/journal-entry.d.mts +78 -0
- package/src/client/documents/macro.d.mts +56 -0
- package/src/client/documents/measured-template.d.mts +41 -0
- package/src/client/documents/note.d.mts +28 -0
- package/src/client/documents/playlist-sound.d.mts +107 -0
- package/src/client/documents/playlist.d.mts +163 -0
- package/src/client/documents/region-behavior.d.mts +55 -0
- package/src/client/documents/region.d.mts +98 -0
- package/src/client/documents/roll-table.d.mts +172 -0
- package/src/client/documents/scene.d.mts +282 -0
- package/src/client/documents/setting.d.mts +35 -0
- package/src/client/documents/table-result.d.mts +35 -0
- package/src/client/documents/tile.d.mts +22 -0
- package/src/client/documents/token.d.mts +621 -0
- package/src/client/documents/user.d.mts +148 -0
- package/src/client/documents/wall.d.mts +20 -0
- package/src/client/game.d.mts +231 -0
- package/src/client/global.d.mts +28 -0
- package/src/client/helpers/_module.d.mts +13 -0
- package/src/client/helpers/_types.d.mts +26 -0
- package/src/client/helpers/client-issues.d.mts +90 -0
- package/src/client/helpers/client-settings.d.mts +191 -0
- package/src/client/helpers/document-index.d.mts +81 -0
- package/src/client/helpers/hooks.d.mts +210 -0
- package/src/client/helpers/interaction/_module.d.mts +6 -0
- package/src/client/helpers/interaction/client-keybindings.d.mts +143 -0
- package/src/client/helpers/interaction/clipboard-helper.d.mts +14 -0
- package/src/client/helpers/interaction/gamepad-manager.d.mts +15 -0
- package/src/client/helpers/interaction/keyboard-manager.d.mts +189 -0
- package/src/client/helpers/interaction/mouse-manager.d.mts +20 -0
- package/src/client/helpers/interaction/tooltip-manager.d.mts +227 -0
- package/src/client/helpers/localization.d.mts +143 -0
- package/src/client/helpers/media/_module.d.mts +3 -0
- package/src/client/helpers/media/compendium-art.d.mts +29 -0
- package/src/client/helpers/media/image-helper.d.mts +116 -0
- package/src/client/helpers/media/video-helper.d.mts +113 -0
- package/src/client/helpers/socket-interface.d.mts +14 -0
- package/src/client/helpers/time.d.mts +92 -0
- package/src/client/helpers/workers.d.mts +92 -0
- package/src/client/nue/_module.d.mts +13 -0
- package/src/client/nue/nue-manager.d.mts +13 -0
- package/src/client/nue/tour.d.mts +283 -0
- package/src/client/nue/tours/_module.d.mts +1 -0
- package/src/client/nue/tours-collection.d.mts +23 -0
- package/src/client/packages/_module.d.mts +19 -0
- package/src/client/packages/_types.d.mts +12 -0
- package/src/client/packages/client-package.mts +145 -0
- package/src/client/packages/module.d.mts +12 -0
- package/src/client/packages/system.d.mts +9 -0
- package/src/client/packages/world.d.mts +28 -0
- package/src/client/ui.d.mts +86 -0
- package/src/client/utils/_module.d.mts +4 -0
- package/src/client/utils/helpers.d.mts +148 -0
- package/src/common/_types.d.mts +151 -0
- package/src/common/abstract/_module.d.mts +8 -0
- package/src/common/abstract/_types.d.mts +187 -0
- package/src/common/abstract/backend.d.mts +159 -0
- package/src/common/abstract/data.d.mts +213 -0
- package/src/common/abstract/document.d.mts +700 -0
- package/src/common/abstract/embedded-collection.d.mts +141 -0
- package/src/common/abstract/socket.d.mts +35 -0
- package/src/common/abstract/type-data.d.mts +163 -0
- package/src/common/config.d.mts +147 -0
- package/src/common/constants.d.mts +2184 -0
- package/src/common/data/_module.d.mts +6 -0
- package/src/common/data/_types.d.mts +329 -0
- package/src/common/data/data.d.mts +390 -0
- package/src/common/data/fields.d.mts +1377 -0
- package/src/common/data/validation-failure.d.mts +127 -0
- package/src/common/data/validators.d.mts +35 -0
- package/src/common/documents/_module.d.mts +64 -0
- package/src/common/documents/_types.d.mts +1 -0
- package/src/common/documents/active-effect.d.mts +87 -0
- package/src/common/documents/actor-delta.d.mts +81 -0
- package/src/common/documents/actor.d.mts +105 -0
- package/src/common/documents/adventure.d.mts +105 -0
- package/src/common/documents/ambient-light.d.mts +49 -0
- package/src/common/documents/ambient-sound.d.mts +72 -0
- package/src/common/documents/card.d.mts +98 -0
- package/src/common/documents/cards.d.mts +89 -0
- package/src/common/documents/chat-message.d.mts +107 -0
- package/src/common/documents/combat.d.mts +55 -0
- package/src/common/documents/combatant-group.d.mts +45 -0
- package/src/common/documents/combatant.d.mts +48 -0
- package/src/common/documents/drawing.d.mts +101 -0
- package/src/common/documents/fog-exploration.d.mts +50 -0
- package/src/common/documents/folder.d.mts +65 -0
- package/src/common/documents/item.d.mts +86 -0
- package/src/common/documents/journal-entry-category.d.mts +32 -0
- package/src/common/documents/journal-entry-page.d.mts +76 -0
- package/src/common/documents/journal-entry.d.mts +50 -0
- package/src/common/documents/macro.d.mts +87 -0
- package/src/common/documents/measured-template.d.mts +72 -0
- package/src/common/documents/note.d.mts +82 -0
- package/src/common/documents/playlist-sound.d.mts +53 -0
- package/src/common/documents/playlist.d.mts +48 -0
- package/src/common/documents/region-behavior.d.mts +49 -0
- package/src/common/documents/region.d.mts +61 -0
- package/src/common/documents/roll-table.d.mts +70 -0
- package/src/common/documents/scene.d.mts +237 -0
- package/src/common/documents/setting.d.mts +49 -0
- package/src/common/documents/table-result.d.mts +61 -0
- package/src/common/documents/tile.d.mts +88 -0
- package/src/common/documents/token.d.mts +213 -0
- package/src/common/documents/user.d.mts +82 -0
- package/src/common/documents/wall.d.mts +72 -0
- package/src/common/grid/_module.d.mts +6 -0
- package/src/common/grid/_types.d.mts +250 -0
- package/src/common/grid/base.d.mts +266 -0
- package/src/common/grid/grid-hex.d.mts +53 -0
- package/src/common/grid/gridless.d.mts +85 -0
- package/src/common/grid/hexagonal.d.mts +191 -0
- package/src/common/grid/square.d.mts +90 -0
- package/src/common/packages/_module.d.mts +6 -0
- package/src/common/packages/_types.d.mts +7 -0
- package/src/common/packages/base-module.d.mts +32 -0
- package/src/common/packages/base-package.d.mts +297 -0
- package/src/common/packages/base-system.d.mts +42 -0
- package/src/common/packages/base-world.d.mts +51 -0
- package/src/common/packages/sub-types.d.mts +12 -0
- package/src/common/primitives/_module.d.mts +10 -0
- package/src/common/primitives/array.d.mts +58 -0
- package/src/common/primitives/date.d.mts +24 -0
- package/src/common/primitives/math.d.mts +70 -0
- package/src/common/primitives/number.d.mts +79 -0
- package/src/common/primitives/regexp.d.mts +12 -0
- package/src/common/primitives/set.d.mts +129 -0
- package/src/common/primitives/string.d.mts +24 -0
- package/src/common/primitives/url.d.mts +12 -0
- package/src/common/prosemirror/_module.d.mts +77 -0
- package/src/common/prosemirror/_types.d.mts +75 -0
- package/src/common/prosemirror/click-handler.d.mts +24 -0
- package/src/common/prosemirror/content-link-plugin.d.mts +34 -0
- package/src/common/prosemirror/dirty-plugin.d.mts +10 -0
- package/src/common/prosemirror/dom-parser.d.mts +7 -0
- package/src/common/prosemirror/dropdown.d.mts +50 -0
- package/src/common/prosemirror/highlight-matches-plugin.d.mts +38 -0
- package/src/common/prosemirror/image-plugin.d.mts +70 -0
- package/src/common/prosemirror/input-rules.d.mts +24 -0
- package/src/common/prosemirror/keymaps.d.mts +27 -0
- package/src/common/prosemirror/menu.d.mts +206 -0
- package/src/common/prosemirror/paste-transformer.d.mts +10 -0
- package/src/common/prosemirror/plugin.d.mts +21 -0
- package/src/common/prosemirror/schema/_types.d.mts +15 -0
- package/src/common/prosemirror/schema/attribute-capture.d.mts +13 -0
- package/src/common/prosemirror/schema/core.d.mts +58 -0
- package/src/common/prosemirror/schema/image-link-node.d.mts +27 -0
- package/src/common/prosemirror/schema/image-node.d.mts +17 -0
- package/src/common/prosemirror/schema/link-mark.d.mts +29 -0
- package/src/common/prosemirror/schema/lists.d.mts +71 -0
- package/src/common/prosemirror/schema/marks.d.mts +49 -0
- package/src/common/prosemirror/schema/other.d.mts +161 -0
- package/src/common/prosemirror/schema/schema-definition.d.mts +43 -0
- package/src/common/prosemirror/schema/secret-node.d.mts +25 -0
- package/src/common/prosemirror/schema/tables.d.mts +161 -0
- package/src/common/prosemirror/schema/utils.d.mts +37 -0
- package/src/common/prosemirror/schema.d.mts +7 -0
- package/src/common/prosemirror/string-serializer.d.mts +84 -0
- package/src/common/prosemirror/util.d.mts +32 -0
- package/src/common/utils/_module.d.mts +19 -0
- package/src/common/utils/_types.d.mts +83 -0
- package/src/common/utils/bitmask.d.mts +122 -0
- package/src/common/utils/collection.d.mts +148 -0
- package/src/common/utils/color.d.mts +308 -0
- package/src/common/utils/event-emitter.d.mts +36 -0
- package/src/common/utils/geometry.d.mts +94 -0
- package/src/common/utils/helpers.d.mts +396 -0
- package/src/common/utils/http.d.mts +40 -0
- package/src/common/utils/iterable-weak-map.d.mts +26 -0
- package/src/common/utils/iterable-weak-set.d.mts +1 -0
- package/src/common/utils/logging.d.mts +25 -0
- package/src/common/utils/semaphore.d.mts +59 -0
- package/src/common/utils/string-tree.d.mts +60 -0
- package/src/common/utils/word-tree.d.mts +34 -0
- package/src/global-external.d.mts +48 -0
- package/src/index.d.ts +87 -0
- package/src/public/scripts/clipper.d.mts +920 -0
- package/src/tinymce-stub.d.mts +123 -0
- package/src/util.d.mts +67 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import Token, { TokenResourceData } from "../canvas/placeables/token.mjs";
|
|
2
|
+
import { DocumentConstructionContext, ElevatedPoint, TokenDimensions, TokenPosition } from "./../../common/_types.mjs";
|
|
3
|
+
import {
|
|
4
|
+
DatabaseCreateCallbackOptions,
|
|
5
|
+
DatabaseCreateOperation,
|
|
6
|
+
DatabaseDeleteCallbackOptions,
|
|
7
|
+
DatabaseDeleteOperation,
|
|
8
|
+
DatabaseOperation,
|
|
9
|
+
DatabaseUpdateCallbackOptions,
|
|
10
|
+
DatabaseUpdateOperation,
|
|
11
|
+
DataModelConstructionContext,
|
|
12
|
+
} from "./../../common/abstract/_types.mjs";
|
|
13
|
+
import Document from "./../../common/abstract/document.mjs";
|
|
14
|
+
import { ImageFilePath } from "./../../common/constants.mjs";
|
|
15
|
+
import { SchemaField } from "./../../common/data/fields.mjs";
|
|
16
|
+
import { GridMeasurePathResult } from "./../../common/grid/_types.mjs";
|
|
17
|
+
import Collection from "./../../common/utils/collection.mjs";
|
|
18
|
+
import { TokenAnimationOptions, TokenConstrainMovementPathOptions } from "./../_module.mjs";
|
|
19
|
+
import TokenConfig from "./../applications/sheets/token/token-config.mjs";
|
|
20
|
+
import {
|
|
21
|
+
Actor,
|
|
22
|
+
BaseToken,
|
|
23
|
+
BaseUser,
|
|
24
|
+
Combat,
|
|
25
|
+
Combatant,
|
|
26
|
+
RegionDocument,
|
|
27
|
+
Scene,
|
|
28
|
+
TokenCompleteMovementWaypoint,
|
|
29
|
+
TokenDocumentUUID,
|
|
30
|
+
TokenGetCompleteMovementPathWaypoint,
|
|
31
|
+
TokenMeasuredMovementWaypoint,
|
|
32
|
+
TokenMeasureMovementPathWaypoint,
|
|
33
|
+
TokenMovementContinuationData,
|
|
34
|
+
TokenMovementCostFunction,
|
|
35
|
+
TokenMovementData,
|
|
36
|
+
TokenMovementMethod,
|
|
37
|
+
TokenMovementOperation,
|
|
38
|
+
TokenMovementWaypoint,
|
|
39
|
+
TokenRegionMovementSegment,
|
|
40
|
+
TokenResumeMovementCallback,
|
|
41
|
+
TokenSegmentizeMovementWaypoint,
|
|
42
|
+
TrackedAttributesDescription,
|
|
43
|
+
User,
|
|
44
|
+
} from "./_module.mjs";
|
|
45
|
+
import { CanvasDocument, CanvasDocumentStatic } from "./abstract/canvas-document.mjs";
|
|
46
|
+
|
|
47
|
+
interface CanvasBaseTokenStatic extends Omit<typeof BaseToken, "new">, CanvasDocumentStatic {}
|
|
48
|
+
|
|
49
|
+
declare const CanvasBaseToken: {
|
|
50
|
+
new <TParent extends Scene | null>(...args: any): BaseToken<TParent> & CanvasDocument<TParent>;
|
|
51
|
+
} & CanvasBaseTokenStatic;
|
|
52
|
+
|
|
53
|
+
interface CanvasBaseToken<TParent extends Scene | null> extends InstanceType<typeof CanvasBaseToken<TParent>> {}
|
|
54
|
+
|
|
55
|
+
export default class TokenDocument<TParent extends Scene | null = Scene | null> extends CanvasBaseToken<TParent> {
|
|
56
|
+
/**
|
|
57
|
+
* The current movement data of this Token document.
|
|
58
|
+
*/
|
|
59
|
+
get movement(): DeepReadonly<TokenMovementData>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The movement continuation state of this Token document.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
_movementContinuation: TokenMovementContinuationData;
|
|
66
|
+
|
|
67
|
+
/* -------------------------------------------- */
|
|
68
|
+
/* Properties */
|
|
69
|
+
/* -------------------------------------------- */
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A singleton collection which holds a reference to the synthetic token actor by its base actor's ID.
|
|
73
|
+
*/
|
|
74
|
+
actors: Collection<string, Actor>;
|
|
75
|
+
|
|
76
|
+
/** The Regions this Token is currently in. */
|
|
77
|
+
regions: Set<RegionDocument<NonNullable<TParent>>>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A reference to the Actor this Token modifies.
|
|
81
|
+
* If actorLink is true, then the document is the primary Actor document.
|
|
82
|
+
* Otherwise, the Actor document is a synthetic (ephemeral) document constructed using the Token's ActorDelta.
|
|
83
|
+
*/
|
|
84
|
+
get actor(): Actor<this | null> | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A reference to the base, World-level Actor this token represents.
|
|
88
|
+
*/
|
|
89
|
+
get baseActor(): Actor<null> | null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* An indicator for whether the current User has full control over this Token document.
|
|
93
|
+
*/
|
|
94
|
+
get isOwner(): boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* A convenient reference for whether this TokenDocument is linked to the Actor it represents, or is a synthetic copy
|
|
98
|
+
*/
|
|
99
|
+
get isLinked(): boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Does this TokenDocument have the SECRET disposition and is the current user lacking the necessary permissions
|
|
103
|
+
* that would reveal this secret?
|
|
104
|
+
*/
|
|
105
|
+
get isSecret(): boolean;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Return a reference to a Combatant that represents this Token, if one is present in the current encounter.
|
|
109
|
+
*/
|
|
110
|
+
get combatant(): Combatant<Combat> | null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* An indicator for whether this Token is currently involved in the active combat encounter.
|
|
114
|
+
*/
|
|
115
|
+
get inCombat(): boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The movement history.
|
|
119
|
+
*/
|
|
120
|
+
get movementHistory(): TokenMeasuredMovementWaypoint[];
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Check if the document has a distinct subject texture (inferred or explicit).
|
|
124
|
+
*/
|
|
125
|
+
get hasDistinctSubjectTexture(): boolean;
|
|
126
|
+
|
|
127
|
+
/* -------------------------------------------- */
|
|
128
|
+
/* Methods */
|
|
129
|
+
/* -------------------------------------------- */
|
|
130
|
+
|
|
131
|
+
protected override _initializeSource(data: object, options?: DataModelConstructionContext<TParent>): this["_source"];
|
|
132
|
+
|
|
133
|
+
protected override _initialize(options?: Record<string, unknown>): void;
|
|
134
|
+
|
|
135
|
+
override prepareBaseData(): void;
|
|
136
|
+
|
|
137
|
+
override prepareEmbeddedDocuments(): void;
|
|
138
|
+
|
|
139
|
+
override prepareDerivedData(): void;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Infer the subject texture path to use for a token ring.
|
|
143
|
+
*/
|
|
144
|
+
protected _inferRingSubjectTexture(): ImageFilePath;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Infer the movement action.
|
|
148
|
+
* The default implementation returns `CONFIG.Token.movement.defaultAction`.
|
|
149
|
+
*/
|
|
150
|
+
protected _inferMovementAction(): string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Prepare detection modes which are available to the Token.
|
|
154
|
+
* Ensure that every Token has the basic sight detection mode configured.
|
|
155
|
+
*/
|
|
156
|
+
protected _prepareDetectionModes(): void;
|
|
157
|
+
|
|
158
|
+
override clone(data?: Record<string, unknown>, context?: DocumentCloneContext): this;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Create a synthetic Actor using a provided Token instance
|
|
162
|
+
* If the Token data is linked, return the true Actor document
|
|
163
|
+
* If the Token data is not linked, create a synthetic Actor using the Token's actorData override
|
|
164
|
+
*/
|
|
165
|
+
getActor(): Actor<this | null> | null;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A helper method to retrieve the underlying data behind one of the Token's attribute bars
|
|
169
|
+
* @param barName The named bar to retrieve the attribute for
|
|
170
|
+
* @param options.alternative An alternative attribute path to get instead of the default one
|
|
171
|
+
* @returns The attribute displayed on the Token bar, if any
|
|
172
|
+
*/
|
|
173
|
+
getBarAttribute(barName: string, options?: { alternative?: string }): TokenResourceData | null;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Test whether a Token has a specific status effect.
|
|
177
|
+
* @param statusId The status effect ID as defined in CONFIG.statusEffects
|
|
178
|
+
* @returns Does the Actor of the Token have this status effect?
|
|
179
|
+
*/
|
|
180
|
+
hasStatusEffect(statusId: string): boolean;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Move the Token through the given waypoint(s).
|
|
184
|
+
* @param waypoints The waypoint(s) to move the Token through
|
|
185
|
+
* @param options Parameters of the update operation
|
|
186
|
+
* @returns A Promise that resolves to true if the Token was moved, otherwise resolves to false
|
|
187
|
+
*/
|
|
188
|
+
move(
|
|
189
|
+
waypoints: Partial<TokenMovementWaypoint> | Partial<TokenMovementWaypoint>[],
|
|
190
|
+
options?: Partial<
|
|
191
|
+
Omit<DatabaseUpdateOperation<TParent>, "updates"> & {
|
|
192
|
+
method: TokenMovementMethod;
|
|
193
|
+
autoRotate: boolean;
|
|
194
|
+
showRuler: boolean;
|
|
195
|
+
constrainOptions: Omit<TokenConstrainMovementPathOptions, "preview" | "history">;
|
|
196
|
+
}
|
|
197
|
+
>,
|
|
198
|
+
): Promise<boolean>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Undo all recorded movement or the recorded movement corresponding to given movement ID up to the last movement.
|
|
202
|
+
* The token is displaced to the prior recorded position and the movement history it rolled back accordingly.
|
|
203
|
+
* @param movementId The ID of the recorded movement to undo
|
|
204
|
+
* @returns True if the movement was undone, otherwise false
|
|
205
|
+
*/
|
|
206
|
+
revertRecordedMovement(movementId?: string): Promise<boolean>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Resize the token Token such that its center point remains (almost) unchanged. The center point might change
|
|
210
|
+
* slightly because the new (x, y) position is rounded.
|
|
211
|
+
* @param dimensions The new dimensions
|
|
212
|
+
* @param options Parameters of the update operation
|
|
213
|
+
* @returns A Promise that resolves to true if the Token was resized, otherwise resolves to false
|
|
214
|
+
*/
|
|
215
|
+
resize(dimensions?: Partial<TokenDimensions>, options?: Partial<Omit<DatabaseUpdateOperation<TParent>, "updates">>): Promise<boolean>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Stop the movement of this Token document. The movement cannot be continued after being stopped.
|
|
219
|
+
* Only the User that initiated the movement can stop it.
|
|
220
|
+
* @returns True if the movement was or is stopped, otherwise false
|
|
221
|
+
*/
|
|
222
|
+
stopMovement(): boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Pause the movement of this Token document. The movement can be resumed after being paused.
|
|
226
|
+
* Only the User that initiated the movement can pause it.
|
|
227
|
+
* Returns a callback that can be used to resume the movement later.
|
|
228
|
+
* Only after all callbacks and keys have been called the movement of the Token is resumed.
|
|
229
|
+
* If the callback is called within the update operation workflow, the movement is resumed after the workflow.
|
|
230
|
+
* @returns The callback to resume movement if the movement was or is paused, otherwise null
|
|
231
|
+
* @overload
|
|
232
|
+
* @example
|
|
233
|
+
* ```js
|
|
234
|
+
* // This is an Execute Script Region Behavior that makes the token invisible
|
|
235
|
+
* // On TOKEN_MOVE_IN...
|
|
236
|
+
* if ( !event.user.isSelf ) return;
|
|
237
|
+
* const resumeMovement = event.data.token.pauseMovement();
|
|
238
|
+
* event.data.token.toggleStatusEffect("invisible", {active: true});
|
|
239
|
+
* const resumed = await resumeMovement();
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
pauseMovement(): TokenResumeMovementCallback | null;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Pause the movement of this Token document. The movement can be resumed after being paused.
|
|
246
|
+
* Only the User that initiated the movement can pause it.
|
|
247
|
+
* Returns a promise that resolves to true if the movement was resumed by
|
|
248
|
+
* {@link TokenDocument#resumeMovement} with the same key that was passed to this function.
|
|
249
|
+
* Only after all callbacks and keys have been called the movement of the Token is resumed.
|
|
250
|
+
* If the callback is called within the update operation workflow, the movement is resumed after the workflow.
|
|
251
|
+
* @param key The key to resume movement with {@link TokenDocument#resumeMovement}
|
|
252
|
+
* @returns The continuation promise if the movement was paused, otherwise null
|
|
253
|
+
* @overload
|
|
254
|
+
* @example
|
|
255
|
+
* ```js
|
|
256
|
+
* // This is an Execute Script Region Behavior of a pressure plate that activates a trap
|
|
257
|
+
* // On TOKEN_MOVE_IN...
|
|
258
|
+
* if ( event.user.isSelf ) {
|
|
259
|
+
* event.data.token.pauseMovement(this.parent.uuid);
|
|
260
|
+
* }
|
|
261
|
+
* if ( game.user.isActiveGM ) {
|
|
262
|
+
* const trapUuid; // The Region Behavior UUID of the trap
|
|
263
|
+
* const trapBehavior = await fromUuid(trapUuid);
|
|
264
|
+
* await trapBehavior.update({disabled: false});
|
|
265
|
+
* event.data.token.resumeMovement(event.data.movement.id, this.parent.uuid);
|
|
266
|
+
* }
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
pauseMovement(key: string): Promise<boolean> | null;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Resume the movement given its ID and the key that was passed to {@link TokenDocument#pauseMovement}.
|
|
273
|
+
* @param movementId The movement ID
|
|
274
|
+
* @param key The key that was passed to {@link TokenDocument#pauseMovement}
|
|
275
|
+
*/
|
|
276
|
+
resumeMovement(movementId: string, key: string): void;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Measure the movement path for this Token.
|
|
280
|
+
* @param waypoints The waypoints of movement
|
|
281
|
+
* @param options Additional measurement options
|
|
282
|
+
* @param options.cost The function that returns the cost
|
|
283
|
+
* for a given move between grid spaces (default is the distance travelled along the direct path)
|
|
284
|
+
*/
|
|
285
|
+
measureMovementPath(waypoints: TokenMeasureMovementPathWaypoint[], options?: { cost?: TokenMovementCostFunction }): GridMeasurePathResult;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Get the path of movement with the intermediate steps of the direct path between waypoints.
|
|
289
|
+
* @param waypoints The waypoints of movement
|
|
290
|
+
* @returns The path of movement with all intermediate steps
|
|
291
|
+
*/
|
|
292
|
+
getCompleteMovementPath(waypoints: TokenGetCompleteMovementPathWaypoint[]): TokenCompleteMovementWaypoint[];
|
|
293
|
+
|
|
294
|
+
/* -------------------------------------------- */
|
|
295
|
+
/* Combat Operations */
|
|
296
|
+
/* -------------------------------------------- */
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Add or remove this Token from a Combat encounter.
|
|
300
|
+
* @param options Additional options passed to TokenDocument.createCombatants or TokenDocument.deleteCombatants
|
|
301
|
+
* @param options.active Require this token to be an active Combatant or to be removed. Otherwise, the current
|
|
302
|
+
* combat state of the Token is toggled.
|
|
303
|
+
* @returns Is this Token now an active Combatant?
|
|
304
|
+
*/
|
|
305
|
+
toggleCombatant(options?: Partial<DatabaseOperation<TParent>> & { active?: boolean }): Promise<boolean>;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Create or remove Combatants for an array of provided Token objects.
|
|
309
|
+
* @param tokens The tokens which should be added to the Combat
|
|
310
|
+
* @param options Options which modify the toggle operation
|
|
311
|
+
* @param options.combat A specific Combat instance which should be modified. If undefined, the current active
|
|
312
|
+
* combat will be modified if one exists. Otherwise, a new Combat encounter will be created if
|
|
313
|
+
* the requesting user is a Gamemaster.
|
|
314
|
+
* @returns An array of created Combatant documents
|
|
315
|
+
*/
|
|
316
|
+
static createCombatants(tokens: TokenDocument[], options?: { combat?: Combat }): Promise<Combatant[]>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Remove Combatants for the array of provided Tokens.
|
|
320
|
+
* @param tokens The tokens which should removed from the Combat
|
|
321
|
+
* @param options Options which modify the operation
|
|
322
|
+
* @param options.combat A specific Combat instance from which Combatants should be deleted
|
|
323
|
+
* @returns An array of deleted Combatant documents
|
|
324
|
+
*/
|
|
325
|
+
static deleteCombatants(tokens: TokenDocument[], options?: { combat?: Combat }): Promise<Combatant[]>;
|
|
326
|
+
|
|
327
|
+
/* -------------------------------------------- */
|
|
328
|
+
/* Actor Data Operations */
|
|
329
|
+
/* -------------------------------------------- */
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Convenience method to change a token vision mode.
|
|
333
|
+
* @param visionMode The vision mode to apply to this token.
|
|
334
|
+
* @param defaults If the vision mode should be updated with its defaults.
|
|
335
|
+
* @returns The updated Document instance, or undefined not updated.
|
|
336
|
+
*/
|
|
337
|
+
updateVisionMode(visionMode: string, defaults?: boolean): Promise<TokenDocument | undefined>;
|
|
338
|
+
|
|
339
|
+
override getEmbeddedCollection(embeddedName: string): foundry.abstract.EmbeddedCollection<Document<Document>>;
|
|
340
|
+
|
|
341
|
+
/* -------------------------------------------- */
|
|
342
|
+
/* Event Handlers */
|
|
343
|
+
/* -------------------------------------------- */
|
|
344
|
+
|
|
345
|
+
protected override _onCreate(data: this["_source"], options: DatabaseCreateCallbackOptions, userId: string): void;
|
|
346
|
+
|
|
347
|
+
protected override _preUpdate(data: Record<string, unknown>, options: TokenUpdateCallbackOptions, user: BaseUser): Promise<boolean | void>;
|
|
348
|
+
|
|
349
|
+
protected override _onUpdate(changed: DeepPartial<this["_source"]>, options: TokenUpdateCallbackOptions, userId: string): void;
|
|
350
|
+
|
|
351
|
+
protected override _onDelete(options: DatabaseDeleteCallbackOptions, userId: string): void;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Identify the Regions the Token currently is or is going to be in after the changes are applied.
|
|
355
|
+
* @param changes The changes that will be applied to this Token
|
|
356
|
+
* @returns The Region IDs this Token is in after the changes are applied (sorted)
|
|
357
|
+
* @internal
|
|
358
|
+
*/
|
|
359
|
+
_identifyRegions(changes?: DeepPartial<this["_source"]>): string[];
|
|
360
|
+
|
|
361
|
+
static override _preCreateOperation(documents: Document[], operation: DatabaseCreateOperation<Document | null>, user: BaseUser): Promise<boolean | void>;
|
|
362
|
+
|
|
363
|
+
static override _preUpdateOperation(documents: Document[], operation: DatabaseUpdateOperation<Document | null>, user: BaseUser): Promise<boolean | void>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Reject the movement or modify the update operation as needed based on the movement.
|
|
367
|
+
* Called after the movement for this document update has been determined.
|
|
368
|
+
* The waypoints of movement are final and cannot be changed. The movement can only be rejected entirely.
|
|
369
|
+
* @param movement The pending movement of this Token
|
|
370
|
+
* @param operation The update operation
|
|
371
|
+
* @returns If false, the movement is prevented
|
|
372
|
+
*/
|
|
373
|
+
protected _preUpdateMovement(
|
|
374
|
+
movement: DeepReadonly<Omit<TokenMovementOperation, "autoRotate" | "showRuler">> & Pick<TokenMovementOperation, "autoRotate" | "showRuler">,
|
|
375
|
+
operation: Partial<DatabaseUpdateOperation<TParent>>,
|
|
376
|
+
): Promise<boolean | void>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Post-process an update operation of a movement.
|
|
380
|
+
* @param movement The movement of this Token
|
|
381
|
+
* @param operation The update operation
|
|
382
|
+
* @param user The User that requested the update operation
|
|
383
|
+
*/
|
|
384
|
+
protected _onUpdateMovement(movement: DeepReadonly<TokenMovementOperation>, operation: Partial<DatabaseUpdateOperation<TParent>>, user: User): void;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Called when the current movement is stopped.
|
|
388
|
+
*/
|
|
389
|
+
protected _onMovementStopped(): void;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Called when the current movement is paused.
|
|
393
|
+
*/
|
|
394
|
+
protected _onMovementPaused(): void;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Called when the movement is recorded or cleared.
|
|
398
|
+
*/
|
|
399
|
+
protected _onMovementRecorded(): void;
|
|
400
|
+
|
|
401
|
+
static override _onCreateOperation<TDocument extends Document>(
|
|
402
|
+
this: ConstructorOf<TDocument>,
|
|
403
|
+
items: TDocument[],
|
|
404
|
+
context: DatabaseCreateOperation<TDocument["parent"]>,
|
|
405
|
+
): Promise<void>;
|
|
406
|
+
|
|
407
|
+
static override _onUpdateOperation(documents: Document[], operation: DatabaseUpdateOperation<Document | null>, user: BaseUser): Promise<void>;
|
|
408
|
+
|
|
409
|
+
static override _onDeleteOperation(documents: Document[], operation: DatabaseDeleteOperation<Document | null>, user: BaseUser): Promise<void>;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Are these changes moving the Token from the given origin?
|
|
413
|
+
* @param changes The (candidate) changes
|
|
414
|
+
* @param origin The origin
|
|
415
|
+
* @returns Is movement?
|
|
416
|
+
* @internal
|
|
417
|
+
*/
|
|
418
|
+
static _isMovementUpdate(changes: object, origin: TokenPosition): boolean;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Should the movement of this Token update be recorded in the movement history?
|
|
422
|
+
* Called as part of the preUpdate workflow if the Token is moved.
|
|
423
|
+
* @returns Should the movement of this Token update be recorded in the movement history?
|
|
424
|
+
*/
|
|
425
|
+
protected _shouldRecordMovementHistory(): boolean;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Clear the movement history of this Token.
|
|
429
|
+
*/
|
|
430
|
+
clearMovementHistory(): Promise<void>;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Is the Token document updated such that the Regions the Token is contained in may change?
|
|
434
|
+
* Called as part of the preUpdate workflow.
|
|
435
|
+
* @param changes The changes.
|
|
436
|
+
* @returns Could this Token update change Region containment?
|
|
437
|
+
*/
|
|
438
|
+
protected _couldRegionsChange(changes: object): boolean;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Test whether the Token is inside the Region.
|
|
442
|
+
* This function determines the state of {@link TokenDocument#regions} and
|
|
443
|
+
* {@link foundry.documents.RegionDocument#tokens}.
|
|
444
|
+
* The Token and the Region must be in the same Scene.
|
|
445
|
+
*
|
|
446
|
+
* Implementations of this function are restricted in the following ways:
|
|
447
|
+
* - If the bounds (given by {@link TokenDocument#getSize}) of the Token do not intersect the
|
|
448
|
+
* Region, then the Token is not contained within the Region.
|
|
449
|
+
* - If the Token is inside the Region a particular elevation, then the Token is inside the Region at any elevation
|
|
450
|
+
* within the elevation range of the Region.
|
|
451
|
+
* - This function must not use prepared field values that are animated. In particular, it must use the source
|
|
452
|
+
* instead of prepared values of the following fields: `x`, `y`, `elevation`, `width`, `height`, and `shape`.
|
|
453
|
+
*
|
|
454
|
+
* If this function is overridden, then {@link TokenDocument#segmentizeRegionMovementPath} must be
|
|
455
|
+
* overridden too.
|
|
456
|
+
*
|
|
457
|
+
* If an override of this function uses Token document fields other than `x`, `y`, `elevation`, `width`, `height`, and
|
|
458
|
+
* `shape`, {@link TokenDocument#_couldRegionsChange} must be overridden to return true for changes
|
|
459
|
+
* of these fields. If an override of this function uses non-Token properties other than `Scene#grid.type` and
|
|
460
|
+
* `Scene#grid.size`,
|
|
461
|
+
* {@link foundry.documents.Scene#updateTokenRegions} must be called when any of those properties change.
|
|
462
|
+
* @param region The region.
|
|
463
|
+
* @param data The position and dimensions. Defaults to the values of the document source.
|
|
464
|
+
* @returns Is inside the Region?
|
|
465
|
+
*/
|
|
466
|
+
testInsideRegion(region: RegionDocument, data?: Partial<ElevatedPoint & TokenDimensions>): boolean;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Split the Token movement path through the Region into its segments.
|
|
470
|
+
* The Token and the Region must be in the same Scene.
|
|
471
|
+
*
|
|
472
|
+
* Implementations of this function are restricted in the following ways:
|
|
473
|
+
* - The segments must go through the waypoints.
|
|
474
|
+
* - The *from* position matches the *to* position of the succeeding segment.
|
|
475
|
+
* - The Token must be contained (w.r.t. {@link TokenDocument#testInsideRegion}) within the Region
|
|
476
|
+
* at the *from* and *to* of MOVE segments.
|
|
477
|
+
* - The Token must be contained (w.r.t. {@link TokenDocument#testInsideRegion}) within the Region
|
|
478
|
+
* at the *to* position of ENTER segments.
|
|
479
|
+
* - The Token must be contained (w.r.t. {@link TokenDocument#testInsideRegion}) within the Region
|
|
480
|
+
* at the *from* position of EXIT segments.
|
|
481
|
+
* - The Token must not be contained (w.r.t. {@link TokenDocument#testInsideRegion}) within the
|
|
482
|
+
* Region at the *from* position of ENTER segments.
|
|
483
|
+
* - The Token must not be contained (w.r.t. {@link TokenDocument#testInsideRegion}) within the
|
|
484
|
+
* Region at the *to* position of EXIT segments.
|
|
485
|
+
* - This function must not use prepared field values that are animated. In particular, it must use the source
|
|
486
|
+
* instead of prepared values of the following fields: `x`, `y`, `elevation`, `width`, `height`, and `shape`.
|
|
487
|
+
* @param region The region
|
|
488
|
+
* @param waypoints The waypoints of movement
|
|
489
|
+
* @returns The movement split into its segments
|
|
490
|
+
*/
|
|
491
|
+
segmentizeRegionMovementPath(region: RegionDocument, waypoints: TokenSegmentizeMovementWaypoint[]): TokenRegionMovementSegment[];
|
|
492
|
+
|
|
493
|
+
/* -------------------------------------------- */
|
|
494
|
+
/* Actor Delta Operations */
|
|
495
|
+
/* -------------------------------------------- */
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Support the special case descendant document changes within an ActorDelta.
|
|
499
|
+
* The descendant documents themselves are configured to have a synthetic Actor as their parent.
|
|
500
|
+
* We need this to ensure that the ActorDelta receives these events which do not bubble up.
|
|
501
|
+
*/
|
|
502
|
+
protected override _preCreateDescendantDocuments<P extends Document>(
|
|
503
|
+
parent: P,
|
|
504
|
+
collection: string,
|
|
505
|
+
data: object[],
|
|
506
|
+
options: DatabaseCreateOperation<P>,
|
|
507
|
+
userId: string,
|
|
508
|
+
): void;
|
|
509
|
+
|
|
510
|
+
protected override _preUpdateDescendantDocuments<P extends Document>(
|
|
511
|
+
parent: P,
|
|
512
|
+
collection: string,
|
|
513
|
+
changes: Record<string, unknown>[],
|
|
514
|
+
options: DatabaseUpdateOperation<P>,
|
|
515
|
+
userId: string,
|
|
516
|
+
): void;
|
|
517
|
+
|
|
518
|
+
protected override _preDeleteDescendantDocuments<P extends Document>(
|
|
519
|
+
parent: P,
|
|
520
|
+
collection: string,
|
|
521
|
+
ids: string[],
|
|
522
|
+
options: DatabaseDeleteOperation<P>,
|
|
523
|
+
userId: string,
|
|
524
|
+
): void;
|
|
525
|
+
|
|
526
|
+
protected override _onCreateDescendantDocuments<P extends Document>(
|
|
527
|
+
parent: P,
|
|
528
|
+
collection: string,
|
|
529
|
+
documents: Document<P>[],
|
|
530
|
+
data: object[],
|
|
531
|
+
options: DatabaseCreateOperation<P>,
|
|
532
|
+
userId: string,
|
|
533
|
+
): void;
|
|
534
|
+
|
|
535
|
+
protected override _onUpdateDescendantDocuments<P extends Document>(
|
|
536
|
+
parent: P,
|
|
537
|
+
collection: string,
|
|
538
|
+
documents: Document<P>[],
|
|
539
|
+
changes: Record<string, unknown>[],
|
|
540
|
+
options: DatabaseUpdateOperation<P>,
|
|
541
|
+
userId: string,
|
|
542
|
+
): void;
|
|
543
|
+
|
|
544
|
+
protected _onDeleteDescendantDocuments<P extends Document>(
|
|
545
|
+
parent: P,
|
|
546
|
+
collection: string,
|
|
547
|
+
documents: Document<P>[],
|
|
548
|
+
ids: string[],
|
|
549
|
+
options: DatabaseDeleteOperation<P>,
|
|
550
|
+
userId: string,
|
|
551
|
+
): void;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* When the base Actor for a TokenDocument changes, we may need to update its Actor instance
|
|
555
|
+
* @param update The update delta
|
|
556
|
+
* @param options The database operation that was performed
|
|
557
|
+
* @internal
|
|
558
|
+
*/
|
|
559
|
+
_onUpdateBaseActor(update?: Record<string, unknown>, options?: DatabaseUpdateCallbackOptions): void;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Whenever the token's actor delta changes, or the base actor changes, perform associated refreshes.
|
|
563
|
+
* @param update The update delta.
|
|
564
|
+
* @param options The options provided to the update.
|
|
565
|
+
*/
|
|
566
|
+
protected _onRelatedUpdate(
|
|
567
|
+
update?: { _id?: string; [key: string]: unknown } | { _id?: string; [key: string]: unknown }[],
|
|
568
|
+
options?: Partial<DatabaseOperation<Document | null>>,
|
|
569
|
+
): void;
|
|
570
|
+
|
|
571
|
+
/** Get an Array of attribute choices which could be tracked for Actors in the Combat Tracker */
|
|
572
|
+
static getTrackedAttributes(data?: object, _path?: string[]): TrackedAttributesDescription;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Retrieve an Array of attribute choices from a plain object.
|
|
576
|
+
* @param data The object to explore for attributes.
|
|
577
|
+
*/
|
|
578
|
+
protected static _getTrackedAttributesFromObject(data: object, _path?: string[]): TrackedAttributesDescription;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Retrieve an Array of attribute choices from a SchemaField.
|
|
582
|
+
* @param schema The schema to explore for attributes.
|
|
583
|
+
*/
|
|
584
|
+
protected static _getTrackedAttributesFromSchema(schema: SchemaField, _path?: string[]): TrackedAttributesDescription;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Retrieve any configured attributes for a given Actor type.
|
|
588
|
+
* @param type The Actor type.
|
|
589
|
+
*/
|
|
590
|
+
protected static _getConfiguredTrackedAttributes(type: string): TrackedAttributesDescription | void;
|
|
591
|
+
|
|
592
|
+
/** Inspect the Actor data model and identify the set of attributes which could be used for a Token Bar */
|
|
593
|
+
static getTrackedAttributeChoices(attributes?: TrackedAttributesDescription): TrackedAttributesDescription;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export default interface TokenDocument<TParent extends Scene | null = Scene | null> extends CanvasBaseToken<TParent> {
|
|
597
|
+
get object(): Token<this> | null;
|
|
598
|
+
get sheet(): TokenConfig;
|
|
599
|
+
get uuid(): TokenDocumentUUID;
|
|
600
|
+
|
|
601
|
+
update(data: Record<string, unknown>, operation?: Partial<TokenUpdateOperation<TParent>>): Promise<this | undefined>;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface TokenDocumentConstructionContext<
|
|
605
|
+
TParent extends Scene | null,
|
|
606
|
+
TActor extends Actor<TokenDocument> | null,
|
|
607
|
+
> extends DocumentConstructionContext<TParent> {
|
|
608
|
+
actor?: TActor;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface TokenUpdateOperation<TParent extends Scene | null> extends DatabaseUpdateOperation<TParent> {
|
|
612
|
+
embedded?: { embeddedName: string; hookData: { _id?: string }[] };
|
|
613
|
+
animate?: boolean;
|
|
614
|
+
pan?: boolean;
|
|
615
|
+
teleport?: boolean;
|
|
616
|
+
animation?: TokenAnimationOptions;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export interface TokenUpdateCallbackOptions extends Omit<TokenUpdateOperation<null>, "action" | "pack" | "parent" | "restoreDelta" | "noHook" | "updates"> {}
|
|
620
|
+
|
|
621
|
+
export {};
|