@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,900 @@
|
|
|
1
|
+
import { DeepReadonly, ElevatedPoint, Point, SocketRequest, SocketResponse, TokenPosition } from "./../common/_types.mjs";
|
|
2
|
+
import { DataModel } from "./../common/abstract/_module.mjs";
|
|
3
|
+
import { DataField } from "./../common/data/fields.mjs";
|
|
4
|
+
import { GridMeasurePathResultWaypoint, GridOffset3D } from "./../common/grid/_types.mjs";
|
|
5
|
+
import { DocumentHTMLEmbedConfig } from "./applications/ux/text-editor.mjs";
|
|
6
|
+
import { AVSettingsData } from "./av/settings.mjs";
|
|
7
|
+
import { CanvasAnimationData, CanvasAnimationEasingFunction } from "./canvas/animation/_types.mjs";
|
|
8
|
+
import { Ray } from "./canvas/geometry/_module.mjs";
|
|
9
|
+
import { PingData } from "./canvas/interaction/_types.mjs";
|
|
10
|
+
import AmbientLight from "./canvas/placeables/light.mjs";
|
|
11
|
+
import Token, { TokenShape } from "./canvas/placeables/token.mjs";
|
|
12
|
+
import PointVisionSource from "./canvas/sources/point-vision-source.mjs";
|
|
13
|
+
import {
|
|
14
|
+
SceneDimensions,
|
|
15
|
+
TokenDocument,
|
|
16
|
+
TokenGetCompleteMovementPathWaypoint,
|
|
17
|
+
TokenMeasuredMovementWaypoint,
|
|
18
|
+
TokenMeasureMovementPathOptions,
|
|
19
|
+
TokenMovementSegmentData,
|
|
20
|
+
TokenMovementWaypoint,
|
|
21
|
+
} from "./documents/_module.mjs";
|
|
22
|
+
import { Color } from "./utils/_module.mjs";
|
|
23
|
+
|
|
24
|
+
export interface HotReloadData {
|
|
25
|
+
/** The type of package which was modified */
|
|
26
|
+
packageType: string;
|
|
27
|
+
|
|
28
|
+
/** The id of the package which was modified */
|
|
29
|
+
packageId: string;
|
|
30
|
+
|
|
31
|
+
/** The updated stringified file content */
|
|
32
|
+
content: string;
|
|
33
|
+
|
|
34
|
+
/** The relative file path which was modified */
|
|
35
|
+
path: string;
|
|
36
|
+
|
|
37
|
+
/** The file extension which was modified, e.g. "js", "css", "html" */
|
|
38
|
+
extension: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface RulerWaypoint {
|
|
42
|
+
/** The x-coordinate in pixels. */
|
|
43
|
+
x: number;
|
|
44
|
+
|
|
45
|
+
/** The y-coordinate in pixels. */
|
|
46
|
+
y: number;
|
|
47
|
+
|
|
48
|
+
/** The elevation in grid units. */
|
|
49
|
+
elevation: number;
|
|
50
|
+
|
|
51
|
+
/** The index of the waypoint. */
|
|
52
|
+
index: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The ray from the center point of previous to the
|
|
56
|
+
* center point of this waypoint, or null if there is
|
|
57
|
+
* no previous waypoint.
|
|
58
|
+
*/
|
|
59
|
+
ray: Ray | null;
|
|
60
|
+
|
|
61
|
+
/** The measurements at this waypoint. */
|
|
62
|
+
measurement: GridMeasurePathResultWaypoint;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The previous waypoint, if any.
|
|
66
|
+
*/
|
|
67
|
+
previous: RulerWaypoint | null;
|
|
68
|
+
/**
|
|
69
|
+
* The next waypoint, if any.
|
|
70
|
+
*/
|
|
71
|
+
next: RulerWaypoint | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface TokenFindMovementPathWaypoint {
|
|
75
|
+
/**
|
|
76
|
+
* The top-left x-coordinate in pixels (integer).
|
|
77
|
+
* Default: the previous or source x-coordinate.
|
|
78
|
+
*/
|
|
79
|
+
x?: number;
|
|
80
|
+
/**
|
|
81
|
+
* The top-left y-coordinate in pixels (integer).
|
|
82
|
+
* Default: the previous or source y-coordinate.
|
|
83
|
+
*/
|
|
84
|
+
y?: number;
|
|
85
|
+
/**
|
|
86
|
+
* The elevation in grid units.
|
|
87
|
+
* Default: the previous or source elevation.
|
|
88
|
+
*/
|
|
89
|
+
elevation?: number;
|
|
90
|
+
/**
|
|
91
|
+
* The width in grid spaces (positive).
|
|
92
|
+
* Default: the previous or source width.
|
|
93
|
+
*/
|
|
94
|
+
width?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The height in grid spaces (positive).
|
|
97
|
+
* Default: the previous or source height.
|
|
98
|
+
*/
|
|
99
|
+
height?: number;
|
|
100
|
+
/**
|
|
101
|
+
* The shape type (see {@link CONST.TOKEN_SHAPES}).
|
|
102
|
+
* Default: the previous or source shape.
|
|
103
|
+
*/
|
|
104
|
+
shape?: TokenShape;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The movement action from the previous to this waypoint.
|
|
108
|
+
*/
|
|
109
|
+
action?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Teleport from the previous to this waypoint?
|
|
112
|
+
*/
|
|
113
|
+
teleport?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Is the movement from the previous to this waypoint forced?
|
|
116
|
+
*/
|
|
117
|
+
forced?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Was this waypoint snapped to the grid? Default: `false`.
|
|
120
|
+
*/
|
|
121
|
+
snapped?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Was this waypoint explicitly placed by the user? Default: `false`.
|
|
124
|
+
*/
|
|
125
|
+
explicit?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Is this waypoint a checkpoint? Default: `false`.
|
|
128
|
+
*/
|
|
129
|
+
checkpoint?: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface TokenConstrainMovementPathWaypoint {
|
|
133
|
+
/**
|
|
134
|
+
* The top-left x-coordinate in pixels (integer).
|
|
135
|
+
* Default: the previous or source x-coordinate.
|
|
136
|
+
*/
|
|
137
|
+
x?: number;
|
|
138
|
+
/**
|
|
139
|
+
* The top-left y-coordinate in pixels (integer).
|
|
140
|
+
* Default: the previous or source y-coordinate.
|
|
141
|
+
*/
|
|
142
|
+
y?: number;
|
|
143
|
+
/**
|
|
144
|
+
* The elevation in grid units.
|
|
145
|
+
* Default: the previous or source elevation.
|
|
146
|
+
*/
|
|
147
|
+
elevation?: number;
|
|
148
|
+
/**
|
|
149
|
+
* The width in grid spaces (positive).
|
|
150
|
+
* Default: the previous or source width.
|
|
151
|
+
*/
|
|
152
|
+
width?: number;
|
|
153
|
+
/**
|
|
154
|
+
* The height in grid spaces (positive).
|
|
155
|
+
* Default: the previous or source height.
|
|
156
|
+
*/
|
|
157
|
+
height?: number;
|
|
158
|
+
/**
|
|
159
|
+
* The shape type (see {@link CONST.TOKEN_SHAPES}).
|
|
160
|
+
* Default: the previous or source shape.
|
|
161
|
+
*/
|
|
162
|
+
shape?: TokenShape;
|
|
163
|
+
/**
|
|
164
|
+
* The movement action from the previous to this waypoint.
|
|
165
|
+
* Default: `CONFIG.Token.movement.defaultAction`.
|
|
166
|
+
*/
|
|
167
|
+
action?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Teleport from the previous to this waypoint? Default: `false`.
|
|
170
|
+
*/
|
|
171
|
+
teleport?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Is the movement from the previous to this waypoint forced?
|
|
174
|
+
* Default: `false`.
|
|
175
|
+
*/
|
|
176
|
+
forced?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The terrain data of this segment. Default: `null`.
|
|
179
|
+
*/
|
|
180
|
+
terrain?: DataModel | null;
|
|
181
|
+
/**
|
|
182
|
+
* Was this waypoint snapped to the grid? Default: `false`.
|
|
183
|
+
*/
|
|
184
|
+
snapped?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Was this waypoint explicitly placed by the user? Default: `false`.
|
|
187
|
+
*/
|
|
188
|
+
explicit?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Is this waypoint a checkpoint? Default: `false`.
|
|
191
|
+
*/
|
|
192
|
+
checkpoint?: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface TokenConstrainMovementPathOptions {
|
|
196
|
+
/**
|
|
197
|
+
* Constrain a preview path? Default: `false`.
|
|
198
|
+
*/
|
|
199
|
+
preview?: boolean;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Ignore walls? Default: `false`.
|
|
203
|
+
*/
|
|
204
|
+
ignoreWalls?: boolean;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Ignore cost? Default: `false`.
|
|
208
|
+
*/
|
|
209
|
+
ignoreCost?: boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Consider movement history? If true, uses the current movement history.
|
|
213
|
+
* If waypoints are passed, use those as the history. Default: `false`.
|
|
214
|
+
*/
|
|
215
|
+
history?: boolean | DeepReadonly<TokenMeasuredMovementWaypoint[]>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
interface TokenConstrainedMovementWaypoint extends Omit<TokenMeasuredMovementWaypoint, "userId" | "movementId" | "cost"> {}
|
|
219
|
+
|
|
220
|
+
export interface TokenFindMovementPathOptions {
|
|
221
|
+
/**
|
|
222
|
+
* Find a preview path? Default: `false`.
|
|
223
|
+
*/
|
|
224
|
+
preview?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Ignore walls? Default: `false`.
|
|
227
|
+
*/
|
|
228
|
+
ignoreWalls?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Ignore cost? Default: `false`.
|
|
231
|
+
*/
|
|
232
|
+
ignoreCost?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Consider movement history? If true, uses the current movement history.
|
|
235
|
+
* If waypoints are passed, use those as the history. Default: `false`.
|
|
236
|
+
*/
|
|
237
|
+
history?: boolean | DeepReadonly<TokenMeasuredMovementWaypoint[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Unless the path can be found instantly, delay the start of the pathfinding
|
|
240
|
+
* computation by this number of milliseconds. Default: `0`.
|
|
241
|
+
*/
|
|
242
|
+
delay?: number;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface TokenFindMovementPathJob {
|
|
246
|
+
/**
|
|
247
|
+
* The result of the pathfinding job. Undefined while the
|
|
248
|
+
* search is in progress, null if the job was cancelled,
|
|
249
|
+
* and the (partial) path if the job completed.
|
|
250
|
+
*/
|
|
251
|
+
result: TokenMovementWaypoint[] | null | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* The promise returning the (partial) path that as found
|
|
254
|
+
* or null if cancelled.
|
|
255
|
+
*/
|
|
256
|
+
promise: Promise<TokenMovementWaypoint[] | null>;
|
|
257
|
+
/**
|
|
258
|
+
* If this function is called and the job hasn't completed
|
|
259
|
+
* yet, the job is cancelled.
|
|
260
|
+
*/
|
|
261
|
+
cancel: () => void;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface TokenGetTerrainMovementPathWaypoint extends Omit<TokenGetCompleteMovementPathWaypoint, "terrain"> {}
|
|
265
|
+
|
|
266
|
+
export interface TokenTerrainMovementWaypoint extends Omit<TokenMeasuredMovementWaypoint, "userId" | "cost"> {}
|
|
267
|
+
|
|
268
|
+
export interface TokenRulerData {
|
|
269
|
+
/** The waypoints that were already passed by the Token */
|
|
270
|
+
passedWaypoints: TokenMeasuredMovementWaypoint[];
|
|
271
|
+
|
|
272
|
+
/** The waypoints that the Token will try move to next */
|
|
273
|
+
pendingWaypoints: TokenMeasuredMovementWaypoint[];
|
|
274
|
+
|
|
275
|
+
/** Movement planned by Users */
|
|
276
|
+
plannedMovement: Record<string, TokenPlannedMovement>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface TokenPlannedMovement {
|
|
280
|
+
/** The found path, which goes through all but the unreachable waypoints */
|
|
281
|
+
foundPath: TokenMeasuredMovementWaypoint[];
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The unreachable waypoints, which are those that
|
|
285
|
+
* are not reached by the found path
|
|
286
|
+
*/
|
|
287
|
+
unreachableWaypoints: TokenMeasuredMovementWaypoint[];
|
|
288
|
+
/**
|
|
289
|
+
* The movement history
|
|
290
|
+
*/
|
|
291
|
+
history: TokenMeasuredMovementWaypoint[];
|
|
292
|
+
/**
|
|
293
|
+
* Is the path hidden?
|
|
294
|
+
*/
|
|
295
|
+
hidden: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Is the pathfinding still in progress?
|
|
298
|
+
*/
|
|
299
|
+
searching: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface TokenRulerWaypointData {
|
|
303
|
+
/**
|
|
304
|
+
* The config of the movement action
|
|
305
|
+
*/
|
|
306
|
+
actionConfig: TokenMovementActionConfig;
|
|
307
|
+
/**
|
|
308
|
+
* The ID of movement, or null if planned movement.
|
|
309
|
+
*/
|
|
310
|
+
movementId: string | null;
|
|
311
|
+
/**
|
|
312
|
+
* The index of the waypoint, which is equal to the number of
|
|
313
|
+
* explicit waypoints from the first to this waypoint.
|
|
314
|
+
*/
|
|
315
|
+
index: number;
|
|
316
|
+
/**
|
|
317
|
+
* The stage this waypoint belongs to.
|
|
318
|
+
*/
|
|
319
|
+
stage: "passed" | "pending" | "planned";
|
|
320
|
+
/**
|
|
321
|
+
* Is this waypoint hidden?
|
|
322
|
+
*/
|
|
323
|
+
hidden: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Is this waypoint unreachable?
|
|
326
|
+
*/
|
|
327
|
+
unreachable: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* The center point of the Token at this waypoint.
|
|
330
|
+
*/
|
|
331
|
+
center: Point;
|
|
332
|
+
/**
|
|
333
|
+
* The size of the Token in pixels at this waypoint.
|
|
334
|
+
*/
|
|
335
|
+
size: { width: number; height: number };
|
|
336
|
+
/**
|
|
337
|
+
* The ray from the center point of previous to the center
|
|
338
|
+
* point of this waypoint, or null if there is no previous
|
|
339
|
+
* waypoint.
|
|
340
|
+
*/
|
|
341
|
+
ray: Ray | null;
|
|
342
|
+
/**
|
|
343
|
+
* The measurements at this waypoint.
|
|
344
|
+
*/
|
|
345
|
+
measurement: GridMeasurePathResultWaypoint;
|
|
346
|
+
/**
|
|
347
|
+
* The previous waypoint, if any.
|
|
348
|
+
*/
|
|
349
|
+
previous: TokenRulerWaypoint | null;
|
|
350
|
+
/**
|
|
351
|
+
* The next waypoint, if any.
|
|
352
|
+
*/
|
|
353
|
+
next: TokenRulerWaypoint | null;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface TokenRulerWaypoint extends Omit<TokenMeasuredMovementWaypoint, "movementId">, TokenRulerWaypointData {}
|
|
357
|
+
|
|
358
|
+
export interface TokenDragContext {
|
|
359
|
+
token: Token;
|
|
360
|
+
clonedToken: Token;
|
|
361
|
+
origin: TokenPosition;
|
|
362
|
+
destination: Omit<TokenMovementWaypoint, "width" | "height" | "shape" | "action"> &
|
|
363
|
+
Partial<Pick<TokenMovementWaypoint, "width" | "height" | "shape" | "action">>;
|
|
364
|
+
waypoints: (Omit<TokenMovementWaypoint, "width" | "height" | "shape" | "action"> &
|
|
365
|
+
Partial<Pick<TokenMovementWaypoint, "width" | "height" | "shape" | "action">>)[];
|
|
366
|
+
foundPath: TokenMovementWaypoint[];
|
|
367
|
+
unreachableWaypoints: TokenMovementWaypoint[];
|
|
368
|
+
hidden: boolean;
|
|
369
|
+
updating: boolean;
|
|
370
|
+
search: TokenFindMovementPathJob;
|
|
371
|
+
searching: boolean;
|
|
372
|
+
searchId: number;
|
|
373
|
+
searchOptions: TokenFindMovementPathOptions;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface TokenAnimationData {
|
|
377
|
+
/** The x position in pixels */
|
|
378
|
+
x: number;
|
|
379
|
+
|
|
380
|
+
/** The y position in pixels */
|
|
381
|
+
y: number;
|
|
382
|
+
|
|
383
|
+
/** The elevation in grid units */
|
|
384
|
+
elevation: number;
|
|
385
|
+
|
|
386
|
+
/** The width in grid spaces */
|
|
387
|
+
width: number;
|
|
388
|
+
|
|
389
|
+
/** The height in grid spaces */
|
|
390
|
+
height: number;
|
|
391
|
+
|
|
392
|
+
/** The alpha value */
|
|
393
|
+
alpha: number;
|
|
394
|
+
|
|
395
|
+
/** The rotation in degrees */
|
|
396
|
+
rotation: number;
|
|
397
|
+
|
|
398
|
+
/** The texture data */
|
|
399
|
+
texture: {
|
|
400
|
+
src: string;
|
|
401
|
+
anchorX: number;
|
|
402
|
+
anchorY: number;
|
|
403
|
+
scaleX: number;
|
|
404
|
+
scaleY: number;
|
|
405
|
+
tint: Color;
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
/** The ring data */
|
|
409
|
+
ring: {
|
|
410
|
+
subject: {
|
|
411
|
+
texture: string;
|
|
412
|
+
scale: number;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface TokenAnimationContext {
|
|
418
|
+
/** The name of the animation. */
|
|
419
|
+
name: string | symbol;
|
|
420
|
+
|
|
421
|
+
/** The animation chain. */
|
|
422
|
+
chain: {
|
|
423
|
+
to: Partial<TokenAnimationData>;
|
|
424
|
+
options: Omit<TokenAnimationOptions, "duration"> & { duration: number };
|
|
425
|
+
promise: Promise<void>;
|
|
426
|
+
resolve: () => void;
|
|
427
|
+
reject: (error: Error) => void;
|
|
428
|
+
}[];
|
|
429
|
+
|
|
430
|
+
/** The final animation state. */
|
|
431
|
+
to: Partial<TokenAnimationData>;
|
|
432
|
+
|
|
433
|
+
/** The duration of the animation. */
|
|
434
|
+
duration: number;
|
|
435
|
+
|
|
436
|
+
/** The current time of the animation. */
|
|
437
|
+
time: number;
|
|
438
|
+
|
|
439
|
+
/** Asynchronous functions that are executed before the animation starts */
|
|
440
|
+
preAnimate: ((context: TokenAnimationContext) => Promise<void>)[];
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Synchronous functions that are executed after the animation ended. They may be executed before the `preAnimate`
|
|
444
|
+
* functions have finished if the animation is terminated.
|
|
445
|
+
*/
|
|
446
|
+
postAnimate: ((context: TokenAnimationContext) => void)[];
|
|
447
|
+
|
|
448
|
+
/** Synchronous functions executed each frame after `ontick` and before {@link Token#_onAnimationUpdate}. */
|
|
449
|
+
onAnimate: ((context: TokenAnimationContext) => void)[];
|
|
450
|
+
|
|
451
|
+
/** The promise of the animation that resolves once it completes or is terminated. */
|
|
452
|
+
promise: Promise<void>;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export type TokenAnimationTransition =
|
|
456
|
+
| "crosshatch"
|
|
457
|
+
| "dots"
|
|
458
|
+
| "fade"
|
|
459
|
+
| "glitch"
|
|
460
|
+
| "hole"
|
|
461
|
+
| "holeSwirl"
|
|
462
|
+
| "hologram"
|
|
463
|
+
| "morph"
|
|
464
|
+
| "swirl"
|
|
465
|
+
| "waterDrop"
|
|
466
|
+
| "waves"
|
|
467
|
+
| "wind"
|
|
468
|
+
| "whiteNoise";
|
|
469
|
+
|
|
470
|
+
export interface TokenAnimationOptions {
|
|
471
|
+
/** The name of the animation, or null if nameless. Default: {@link Token#animationName}. */
|
|
472
|
+
name?: string | symbol | null;
|
|
473
|
+
|
|
474
|
+
/** Chain the animation to the existing one of the same name? Default: `false`. */
|
|
475
|
+
chain?: boolean;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* The duration of the animation in milliseconds (nonnegative). Default: automatic (determined by
|
|
479
|
+
* {@link Token#_getAnimationDuration}, which returns 1000 by default unless it's a movement animation).
|
|
480
|
+
*/
|
|
481
|
+
duration?: number;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* A desired base movement speed in grid size per second (positive), which determines the `duration` if the given
|
|
485
|
+
* `duration` is undefined and either `x`, `y`, `width`, `height`, or `rotation` is animated.
|
|
486
|
+
* Default: automatically determined by {@link Token#_getAnimationMovementSpeed}, which returns
|
|
487
|
+
* `CONFIG.Token.movement.defaultSpeed` by default.
|
|
488
|
+
*/
|
|
489
|
+
movementSpeed?: number;
|
|
490
|
+
|
|
491
|
+
/** The movement action. Default: `CONFIG.Token.movement.defaultAction`. */
|
|
492
|
+
action?: string;
|
|
493
|
+
|
|
494
|
+
/** Teleportation instead of animating the movement? Default: `false`. */
|
|
495
|
+
teleport?: boolean;
|
|
496
|
+
|
|
497
|
+
/** Forced movement? Default: `false`. */
|
|
498
|
+
forced?: boolean;
|
|
499
|
+
|
|
500
|
+
/** The terrain data. Default: `null`. */
|
|
501
|
+
terrain?: DataModel | null;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* The desired texture transition type. Default: automatic (determined by {@link Token#_getAnimationTransition},
|
|
505
|
+
* which returns `"fade"` by default).
|
|
506
|
+
*/
|
|
507
|
+
transition?: TokenAnimationTransition;
|
|
508
|
+
|
|
509
|
+
/** The easing function of the animation. Default: `undefined` (linear). */
|
|
510
|
+
easing?: CanvasAnimationEasingFunction;
|
|
511
|
+
|
|
512
|
+
/** An on-tick callback. */
|
|
513
|
+
ontick?: (elapsedMS: number, animation: CanvasAnimationData, data: TokenAnimationData) => void;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export type TokenMovementActionCostFunction = (
|
|
517
|
+
baseCost: number,
|
|
518
|
+
from: Readonly<GridOffset3D>,
|
|
519
|
+
to: Readonly<GridOffset3D>,
|
|
520
|
+
distance: number,
|
|
521
|
+
segment: DeepReadonly<TokenMovementSegmentData>,
|
|
522
|
+
) => number;
|
|
523
|
+
|
|
524
|
+
export interface TokenMovementActionConfig {
|
|
525
|
+
/** The label of the movement action. */
|
|
526
|
+
label: string;
|
|
527
|
+
|
|
528
|
+
/** The icon of the movement action. */
|
|
529
|
+
icon: string;
|
|
530
|
+
|
|
531
|
+
/** An image filename. Takes precedence over the icon if both are supplied. */
|
|
532
|
+
img: string | null;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* The number that is used to sort the movement actions / movement action configs.
|
|
536
|
+
* Determines the order of cycling. Default: `0`.
|
|
537
|
+
*/
|
|
538
|
+
order: number;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Is teleportation? If true, the movement does not go through all grid spaces
|
|
542
|
+
* between the origin and destination: it goes from the origin immediately to the
|
|
543
|
+
* destination grid space. Default: `false`.
|
|
544
|
+
*/
|
|
545
|
+
teleport: boolean;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Is the movement measured? The distance, cost, spaces, and diagonals
|
|
549
|
+
* of a segment that is not measured are always 0. Default: `true`.
|
|
550
|
+
*/
|
|
551
|
+
measure: boolean;
|
|
552
|
+
|
|
553
|
+
/** The type of walls that block this movement, if any. Default: `"move"`. */
|
|
554
|
+
walls: string | null;
|
|
555
|
+
|
|
556
|
+
/** Is segment of the movement visualized by the ruler? Default: `true`. */
|
|
557
|
+
visualize: boolean;
|
|
558
|
+
|
|
559
|
+
/** Get the default animation options for this movement action. Default: `() => ({})`. */
|
|
560
|
+
getAnimationOptions: (token: Token) => Partial<TokenAnimationOptions>;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Can the current User select this movement action for the given Token? If selectable, the movement action of the
|
|
564
|
+
* Token can set to this movement action by the User via the UI and when cycling. Default: `() => true`.
|
|
565
|
+
*/
|
|
566
|
+
canSelect: (token: TokenDocument) => boolean;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* If set, this function is used to derive the terrain difficulty from from nonderived difficulties,
|
|
570
|
+
* which are those that do not have `deriveTerrainDifficulty` set.
|
|
571
|
+
* Used by {@link foundry.data.regionBehaviors.ModifyMovementCostRegionBehaviorType}.
|
|
572
|
+
* Derived terrain difficulties are not configurable via the behavior UI.
|
|
573
|
+
*/
|
|
574
|
+
deriveTerrainDifficulty: ((nonDerivedDifficulties: { [action: string]: number }) => number) | null;
|
|
575
|
+
|
|
576
|
+
/** The cost modification function. Default: `() => cost => cost`. */
|
|
577
|
+
getCostFunction: (token: TokenDocument, options: TokenMeasureMovementPathOptions) => TokenMovementActionCostFunction;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface CanvasViewPosition {
|
|
581
|
+
/** The x-coordinate which becomes `stage.pivot.x` */
|
|
582
|
+
x: number;
|
|
583
|
+
/** The y-coordinate which becomes `stage.pivot.y` */
|
|
584
|
+
y: number;
|
|
585
|
+
/** The zoom level up to `CONFIG.Canvas.maxZoom` which becomes `stage.scale.x` and `y` */
|
|
586
|
+
scale: number;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export interface CanvasVisibilityTest {
|
|
590
|
+
point: ElevatedPoint;
|
|
591
|
+
los: Map<PointVisionSource<Token | AmbientLight>, boolean>;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export interface CanvasVisibilityTestConfiguration {
|
|
595
|
+
/** The target object */
|
|
596
|
+
object: object | null;
|
|
597
|
+
/** An array of visibility tests */
|
|
598
|
+
tests: CanvasVisibilityTest[];
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface CanvasVisibilityTextureConfiguration {
|
|
602
|
+
resolution: number;
|
|
603
|
+
width: number;
|
|
604
|
+
height: number;
|
|
605
|
+
mipmap: number;
|
|
606
|
+
scaleMode: number;
|
|
607
|
+
alphaMode: number;
|
|
608
|
+
multisample: number;
|
|
609
|
+
format: number;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export interface ReticuleOptions {
|
|
613
|
+
/**
|
|
614
|
+
* The amount of margin between the targeting arrows and the token's bounding box, expressed as a fraction of an
|
|
615
|
+
* arrow's size.
|
|
616
|
+
*/
|
|
617
|
+
margin?: number;
|
|
618
|
+
|
|
619
|
+
/** The alpha value of the arrows. */
|
|
620
|
+
alpha?: number;
|
|
621
|
+
|
|
622
|
+
/** The size of the arrows as a proportion of grid size. Default: `CONFIG.Canvas.targeting.size`. */
|
|
623
|
+
size?: number;
|
|
624
|
+
|
|
625
|
+
/** The color of the arrows. */
|
|
626
|
+
color?: number;
|
|
627
|
+
|
|
628
|
+
/** The arrows' border style configuration. */
|
|
629
|
+
border?: { color?: number; width?: number };
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export interface ActivityData {
|
|
633
|
+
/** The ID of the scene that the user is viewing. */
|
|
634
|
+
sceneId?: string | null;
|
|
635
|
+
|
|
636
|
+
/** The position of the user's cursor. */
|
|
637
|
+
cursor?: Point;
|
|
638
|
+
|
|
639
|
+
/** The state of the user's ruler, if they are currently using one. */
|
|
640
|
+
ruler?: ElevatedPoint[];
|
|
641
|
+
|
|
642
|
+
/** The IDs of the tokens the user has targeted in the currently viewed scene. */
|
|
643
|
+
targets?: string[];
|
|
644
|
+
|
|
645
|
+
/** Whether the user has an open WS connection to the server or not. */
|
|
646
|
+
active?: boolean;
|
|
647
|
+
|
|
648
|
+
/** Is the user emitting a ping at the cursor coordinates? */
|
|
649
|
+
ping?: PingData;
|
|
650
|
+
|
|
651
|
+
/** The state of the user's AV settings. */
|
|
652
|
+
av?: AVSettingsData;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
export interface CanvasPerformanceSettings {
|
|
656
|
+
/** The performance mode in CONST.CANVAS_PERFORMANCE_MODES */
|
|
657
|
+
mode: number;
|
|
658
|
+
|
|
659
|
+
/** Whether to use mipmaps, "ON" or "OFF" */
|
|
660
|
+
mipmap: string;
|
|
661
|
+
|
|
662
|
+
/** Whether to apply MSAA at the overall canvas level */
|
|
663
|
+
msaa: boolean;
|
|
664
|
+
|
|
665
|
+
/** Whether to apply SMAA at the overall canvas level */
|
|
666
|
+
smaa: boolean;
|
|
667
|
+
|
|
668
|
+
/** Maximum framerate which should be the render target */
|
|
669
|
+
fps: number;
|
|
670
|
+
|
|
671
|
+
/** Whether to display token movement animation */
|
|
672
|
+
tokenAnimation: boolean;
|
|
673
|
+
|
|
674
|
+
/** Whether to display light source animation */
|
|
675
|
+
lightAnimation: boolean;
|
|
676
|
+
|
|
677
|
+
/** Whether to render soft edges for light sources */
|
|
678
|
+
lightSoftEdges: boolean;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export interface CanvasSupportedComponents {
|
|
682
|
+
/** Is WebGL2 supported? */
|
|
683
|
+
webGL2: boolean;
|
|
684
|
+
|
|
685
|
+
/** Is reading pixels in RED format supported? */
|
|
686
|
+
readPixelsRED: boolean;
|
|
687
|
+
|
|
688
|
+
/** Is the OffscreenCanvas supported? */
|
|
689
|
+
offscreenCanvas: boolean;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CanvasDimensions extends SceneDimensions {
|
|
693
|
+
/** The minimum, maximum, and default canvas scale. */
|
|
694
|
+
scale: { min: number; max: number; default: number };
|
|
695
|
+
|
|
696
|
+
/** The scaling factor for canvas UI elements. Based on the normalized grid size (100px). */
|
|
697
|
+
uiScale: number;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export interface JournalEntryPageHeading {
|
|
701
|
+
/** The heading level, 1-6. */
|
|
702
|
+
level: number;
|
|
703
|
+
|
|
704
|
+
/** The raw heading text with any internal tags omitted. */
|
|
705
|
+
text: string;
|
|
706
|
+
|
|
707
|
+
/** The generated slug for this heading. */
|
|
708
|
+
slug: string;
|
|
709
|
+
|
|
710
|
+
/** The currently rendered element for this heading, if it exists. */
|
|
711
|
+
element?: HTMLHeadingElement;
|
|
712
|
+
|
|
713
|
+
/** Any child headings of this one. */
|
|
714
|
+
children: string[];
|
|
715
|
+
|
|
716
|
+
/** The linear ordering of the heading in the table of contents. */
|
|
717
|
+
order: number;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export type SearchableField = DataField | { [K in string]: SearchableField };
|
|
721
|
+
|
|
722
|
+
export interface FromCompendiumOptions {
|
|
723
|
+
/** Clear the currently assigned folder. */
|
|
724
|
+
clearFolder?: boolean;
|
|
725
|
+
/** Clear fields which store Document state. */
|
|
726
|
+
clearState?: boolean;
|
|
727
|
+
/** Clear the current sort order. */
|
|
728
|
+
clearSort?: boolean;
|
|
729
|
+
/** Clear Document ownership. */
|
|
730
|
+
clearOwnership?: boolean;
|
|
731
|
+
/** Retain the Document ID from the source Compendium. */
|
|
732
|
+
keepId?: boolean;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
export interface RollTableHTMLEmbedConfig extends DocumentHTMLEmbedConfig {
|
|
736
|
+
rollable?: boolean;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export type ManageCompendiumRequest = SocketRequest;
|
|
740
|
+
export type ManageCompendiumResponse = SocketResponse;
|
|
741
|
+
|
|
742
|
+
export interface WorldCompendiumPackConfiguration {
|
|
743
|
+
folder?: string;
|
|
744
|
+
sort?: number;
|
|
745
|
+
locked?: boolean;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export type WorldCompendiumConfiguration = Record<string, WorldCompendiumPackConfiguration>;
|
|
749
|
+
|
|
750
|
+
/* ----------------------------------------- */
|
|
751
|
+
/* Settings Type Definitions */
|
|
752
|
+
/* ----------------------------------------- */
|
|
753
|
+
|
|
754
|
+
/** A Client Setting */
|
|
755
|
+
export interface SettingConfig<TChoices extends Record<string, unknown> | undefined = Record<string, unknown> | undefined> {
|
|
756
|
+
/** A unique machine-readable id for the setting */
|
|
757
|
+
key: string;
|
|
758
|
+
/** The namespace the setting belongs to */
|
|
759
|
+
namespace: string;
|
|
760
|
+
/** The human readable name */
|
|
761
|
+
name: string;
|
|
762
|
+
/** An additional human readable hint */
|
|
763
|
+
hint?: string;
|
|
764
|
+
/** The scope the Setting is stored in, either World or Client */
|
|
765
|
+
scope: "world" | "client" | "user";
|
|
766
|
+
/** Indicates if this Setting should render in the Config application */
|
|
767
|
+
config: boolean;
|
|
768
|
+
/** This will prompt the user to reload the application for the setting to take effect. */
|
|
769
|
+
requiresReload?: boolean;
|
|
770
|
+
/** The JS Type that the Setting is storing */
|
|
771
|
+
type: NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | ConstructorOf<DataModel> | DataField;
|
|
772
|
+
/** For string Types, defines the allowable values */
|
|
773
|
+
choices?: TChoices;
|
|
774
|
+
/** For numeric Types, defines the allowable range */
|
|
775
|
+
range?: this["type"] extends NumberConstructor ? { min: number; max: number; step: number } : never;
|
|
776
|
+
/** The default value */
|
|
777
|
+
default?: number | string | boolean | object | (() => number | string | boolean | object);
|
|
778
|
+
/** Executes when the value of this Setting changes */
|
|
779
|
+
onChange?: (choice: TChoices extends object ? keyof TChoices : unknown) => void | Promise<void>;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export interface SettingSubmenuConfig {
|
|
783
|
+
/** A unique machine-readable id for the setting */
|
|
784
|
+
key: string;
|
|
785
|
+
/** The namespace the setting belongs to */
|
|
786
|
+
namespace: string;
|
|
787
|
+
/** The human readable name */
|
|
788
|
+
name: string;
|
|
789
|
+
/** The human readable label */
|
|
790
|
+
label: string;
|
|
791
|
+
/** An additional human readable hint */
|
|
792
|
+
hint?: string;
|
|
793
|
+
/** The classname of an Icon to render */
|
|
794
|
+
icon?: string;
|
|
795
|
+
/** The FormApplication to render */
|
|
796
|
+
type: ConstructorOf<foundry.appv1.api.Application> | ConstructorOf<foundry.applications.api.ApplicationV2>;
|
|
797
|
+
/** If true, only a GM can edit this Setting */
|
|
798
|
+
restricted?: boolean;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/** A Client Keybinding Action Configuration */
|
|
802
|
+
export interface KeybindingActionConfig {
|
|
803
|
+
/** The namespace within which the action was registered */
|
|
804
|
+
namespace?: string;
|
|
805
|
+
/** The human readable name */
|
|
806
|
+
name: string;
|
|
807
|
+
/** An additional human readable hint */
|
|
808
|
+
hint?: string;
|
|
809
|
+
/** The default bindings that can never be changed nor removed. */
|
|
810
|
+
uneditable?: KeybindingActionBinding[];
|
|
811
|
+
/** The default bindings that can be changed by the user. */
|
|
812
|
+
editable?: KeybindingActionBinding[];
|
|
813
|
+
/** A function to execute when a key down event occurs. If True is returned, the event is consumed and no further keybinds execute. */
|
|
814
|
+
onDown?: (context: KeyboardEventContext) => unknown;
|
|
815
|
+
/** A function to execute when a key up event occurs. If True is returned, the event is consumed and no further keybinds execute. */
|
|
816
|
+
onUp?: (context: KeyboardEventContext) => unknown;
|
|
817
|
+
/** If True, allows Repeat events to execute the Action's onDown. Defaults to false. */
|
|
818
|
+
repeat?: boolean;
|
|
819
|
+
/** If true, only a GM can edit and execute this Action */
|
|
820
|
+
restricted?: boolean;
|
|
821
|
+
/** Modifiers such as [ "CONTROL" ] that can be also pressed when executing this Action. Prevents using one of these modifiers as a Binding. */
|
|
822
|
+
reservedModifiers?: ModifierKey[];
|
|
823
|
+
/** The preferred precedence of running this Keybinding Action */
|
|
824
|
+
precedence?: number;
|
|
825
|
+
/** The recorded registration order of the action */
|
|
826
|
+
order?: number;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export interface KeybindingActionBinding {
|
|
830
|
+
/** A numeric index which tracks this bindings position during form rendering */
|
|
831
|
+
index?: number;
|
|
832
|
+
/** The KeyboardEvent#code value from https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values */
|
|
833
|
+
key: string | null;
|
|
834
|
+
/** An array of modifiers keys from KeyboardManager.MODIFIER_KEYS which are required for this binding to be activated */
|
|
835
|
+
modifiers: ModifierKey[];
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/** An action that can occur when a key is pressed */
|
|
839
|
+
export interface KeybindingAction {
|
|
840
|
+
/** The namespaced machine identifier of the Action */
|
|
841
|
+
action: string;
|
|
842
|
+
/** The Keyboard key */
|
|
843
|
+
key: string;
|
|
844
|
+
/** The human readable name */
|
|
845
|
+
name: string;
|
|
846
|
+
/** Required modifiers */
|
|
847
|
+
requiredModifiers?: ModifierKey[];
|
|
848
|
+
/** Optional (reserved) modifiers */
|
|
849
|
+
optionalModifiers?: ModifierKey[];
|
|
850
|
+
/** The handler that executes onDown */
|
|
851
|
+
onDown?: (...args: unknown[]) => boolean;
|
|
852
|
+
/** The handler that executes onUp */
|
|
853
|
+
onUp?: (...args: unknown[]) => boolean;
|
|
854
|
+
/** If True, allows Repeat events to execute this Action's onDown */
|
|
855
|
+
repeat?: boolean;
|
|
856
|
+
/** If true, only a GM can execute this Action */
|
|
857
|
+
restricted?: boolean;
|
|
858
|
+
/** The registration precedence */
|
|
859
|
+
precedence?: number;
|
|
860
|
+
/** The registration order */
|
|
861
|
+
order?: number;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export type ModifierKey = "Control" | "Shift" | "Alt";
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Keyboard event context
|
|
868
|
+
*/
|
|
869
|
+
export interface KeyboardEventContext {
|
|
870
|
+
/** The normalized string key, such as "A" */
|
|
871
|
+
key: string;
|
|
872
|
+
/** The originating keypress event */
|
|
873
|
+
event: KeyboardEvent;
|
|
874
|
+
/** Is the Shift modifier being pressed */
|
|
875
|
+
isShift: boolean;
|
|
876
|
+
/** Is the Control or Meta modifier being processed */
|
|
877
|
+
isControl: boolean;
|
|
878
|
+
/** Is the Alt modifier being pressed */
|
|
879
|
+
isAlt: boolean;
|
|
880
|
+
/** Are any of the modifiers being pressed */
|
|
881
|
+
hasModifiers: boolean;
|
|
882
|
+
/** A list of string modifiers applied to this context, such as [ "CONTROL" ] */
|
|
883
|
+
modifiers: ModifierKey[];
|
|
884
|
+
/** True if the Key is Up, else False if down */
|
|
885
|
+
up: boolean;
|
|
886
|
+
/** True if the given key is being held down such that it is automatically repeating. */
|
|
887
|
+
repeat: boolean;
|
|
888
|
+
/** The executing Keybinding Action. May be undefined until the action is known. */
|
|
889
|
+
action?: string;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Connected Gamepad info
|
|
894
|
+
*/
|
|
895
|
+
export interface ConnectedGamepad {
|
|
896
|
+
/** A map of axes values */
|
|
897
|
+
axes: Map<string, number>;
|
|
898
|
+
/** The Set of pressed Buttons */
|
|
899
|
+
activeButtons: Set<string>;
|
|
900
|
+
}
|