@league-of-foundry-developers/foundry-vtt-types 9.280.0 → 12.331.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -18
- package/index-lenient.d.mts +7 -0
- package/index.d.mts +5 -0
- package/package.json +67 -39
- package/src/foundry/client/apps/app.d.mts +595 -0
- package/src/foundry/client/apps/av/av-config.d.mts +93 -0
- package/src/foundry/client/apps/av/cameras.d.mts +189 -0
- package/src/foundry/client/apps/av/index.d.mts +3 -0
- package/src/foundry/client/apps/dialogs/folder-export.d.mts +16 -0
- package/src/foundry/client/apps/dialogs/index.d.mts +1 -0
- package/src/foundry/client/apps/form.d.mts +469 -0
- package/src/foundry/client/apps/forms/actor.d.mts +176 -0
- package/src/foundry/client/apps/forms/adventure-exporter.d.mts +132 -0
- package/src/foundry/client/apps/forms/adventure-importer.d.mts +85 -0
- package/src/foundry/client/apps/forms/base-sheet.d.mts +45 -0
- package/src/foundry/client/apps/forms/card-config.d.mts +48 -0
- package/src/foundry/client/apps/forms/cards-config.d.mts +141 -0
- package/src/foundry/client/apps/forms/combat-config.d.mts +51 -0
- package/src/foundry/client/apps/forms/combatant-config.d.mts +45 -0
- package/src/foundry/client/apps/forms/default-sheets-config.d.mts +46 -0
- package/src/foundry/client/apps/forms/effect-config.d.mts +77 -0
- package/src/foundry/client/apps/forms/folder-config.d.mts +60 -0
- package/src/foundry/client/apps/forms/fonts.d.mts +168 -0
- package/src/foundry/client/apps/forms/grid-config.d.mts +144 -0
- package/src/foundry/client/apps/forms/image-popout.d.mts +179 -0
- package/src/foundry/client/apps/forms/index.d.mts +26 -0
- package/src/foundry/client/apps/forms/item.d.mts +58 -0
- package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +313 -0
- package/src/foundry/client/apps/forms/journal-sheet.d.mts +312 -0
- package/src/foundry/client/apps/forms/macro-config.d.mts +59 -0
- package/src/foundry/client/apps/forms/measure-template.d.mts +59 -0
- package/src/foundry/client/apps/forms/ownership.d.mts +66 -0
- package/src/foundry/client/apps/forms/playlist-config.d.mts +46 -0
- package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +63 -0
- package/src/foundry/client/apps/forms/roll-table-config.d.mts +160 -0
- package/src/foundry/client/apps/forms/scene-config.d.mts +157 -0
- package/src/foundry/client/apps/forms/sheet-config.d.mts +202 -0
- package/src/foundry/client/apps/forms/user-config.d.mts +71 -0
- package/src/foundry/client/apps/hud/chatbubble.d.mts +113 -0
- package/src/foundry/client/apps/hud/container.d.mts +54 -0
- package/src/foundry/client/apps/hud/controls.d.mts +166 -0
- package/src/foundry/client/apps/hud/hotbar.d.mts +169 -0
- package/src/foundry/client/apps/hud/hud.d.mts +87 -0
- package/src/foundry/client/apps/hud/index.d.mts +9 -0
- package/src/foundry/client/apps/hud/menu.d.mts +77 -0
- package/src/foundry/client/apps/hud/navigation.d.mts +116 -0
- package/src/foundry/client/apps/hud/pause.d.mts +32 -0
- package/src/foundry/client/apps/hud/players.d.mts +82 -0
- package/src/foundry/client/apps/i18n.d.mts +162 -0
- package/src/foundry/client/apps/index.d.mts +10 -0
- package/src/foundry/client/apps/placeables/drawing-config.d.mts +80 -0
- package/src/foundry/client/apps/placeables/drawing-hud.d.mts +31 -0
- package/src/foundry/client/apps/placeables/index.d.mts +10 -0
- package/src/foundry/client/apps/placeables/light-config.d.mts +100 -0
- package/src/foundry/client/apps/placeables/note-config.d.mts +65 -0
- package/src/foundry/client/apps/placeables/sound-config.d.mts +43 -0
- package/src/foundry/client/apps/placeables/tile-config.d.mts +54 -0
- package/src/foundry/client/apps/placeables/tile-hud.d.mts +37 -0
- package/src/foundry/client/apps/placeables/token-config.d.mts +244 -0
- package/src/foundry/client/apps/placeables/token-hud.d.mts +134 -0
- package/src/foundry/client/apps/placeables/wall-config.d.mts +63 -0
- package/src/foundry/client/apps/sidebar/apps/chat-popout.d.mts +39 -0
- package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +98 -0
- package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +93 -0
- package/src/foundry/client/apps/sidebar/apps/index.d.mts +10 -0
- package/src/foundry/client/apps/sidebar/apps/invitation-links.d.mts +32 -0
- package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +180 -0
- package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +135 -0
- package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +72 -0
- package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +121 -0
- package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +54 -0
- package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +57 -0
- package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +276 -0
- package/src/foundry/client/apps/sidebar/document-directory.d.mts +164 -0
- package/src/foundry/client/apps/sidebar/index.d.mts +7 -0
- package/src/foundry/client/apps/sidebar/package-configuration.d.mts +86 -0
- package/src/foundry/client/apps/sidebar/sidebar-tab.d.mts +80 -0
- package/src/foundry/client/apps/sidebar/sidebar.d.mts +95 -0
- package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +20 -0
- package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +12 -0
- package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +364 -0
- package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +156 -0
- package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +105 -0
- package/src/foundry/client/apps/sidebar/tabs/index.d.mts +12 -0
- package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +14 -0
- package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +13 -0
- package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +16 -0
- package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +275 -0
- package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +13 -0
- package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +34 -0
- package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +72 -0
- package/src/foundry/client/apps/templates.d.mts +546 -0
- package/src/foundry/client/audio/audio.d.mts +390 -0
- package/src/foundry/client/audio/container.d.mts +176 -0
- package/src/foundry/client/audio/index.d.mts +3 -0
- package/src/foundry/client/audio/sound.d.mts +307 -0
- package/src/foundry/client/av/client.d.mts +162 -0
- package/src/foundry/client/av/clients/index.d.mts +1 -0
- package/src/foundry/client/av/clients/simplepeer.d.mts +155 -0
- package/src/foundry/client/av/index.d.mts +4 -0
- package/src/foundry/client/av/master.d.mts +191 -0
- package/src/foundry/client/av/settings.d.mts +315 -0
- package/src/foundry/client/config.d.mts +2856 -0
- package/src/foundry/client/core/clipboard.d.mts +20 -0
- package/src/foundry/client/core/document-index.d.mts +118 -0
- package/src/foundry/client/core/gamepad.d.mts +62 -0
- package/src/foundry/client/core/hooks.d.mts +132 -0
- package/src/foundry/client/core/image.d.mts +190 -0
- package/src/foundry/client/core/index.d.mts +20 -0
- package/src/foundry/client/core/issues.d.mts +102 -0
- package/src/foundry/client/core/keybindings.d.mts +312 -0
- package/src/foundry/client/core/keyboard.d.mts +224 -0
- package/src/foundry/client/core/mouse.d.mts +28 -0
- package/src/foundry/client/core/nue.d.mts +38 -0
- package/src/foundry/client/core/packages.d.mts +185 -0
- package/src/foundry/client/core/settings.d.mts +260 -0
- package/src/foundry/client/core/socket.d.mts +16 -0
- package/src/foundry/client/core/sorting.d.mts +76 -0
- package/src/foundry/client/core/time.d.mts +73 -0
- package/src/foundry/client/core/tooltip.d.mts +198 -0
- package/src/foundry/client/core/tour.d.mts +279 -0
- package/src/foundry/client/core/tours.d.mts +22 -0
- package/src/foundry/client/core/utils.d.mts +71 -0
- package/src/foundry/client/core/video.d.mts +161 -0
- package/src/foundry/client/core/workers.d.mts +128 -0
- package/src/foundry/client/data/abstract/canvas-document.d.mts +63 -0
- package/src/foundry/client/data/abstract/client-document.d.mts +717 -0
- package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +135 -0
- package/src/foundry/client/data/abstract/document-collection.d.mts +204 -0
- package/src/foundry/client/data/abstract/index.d.mts +5 -0
- package/src/foundry/client/data/abstract/world-collection.d.mts +171 -0
- package/src/foundry/client/data/collections/actors.d.mts +41 -0
- package/src/foundry/client/data/collections/cards.d.mts +12 -0
- package/src/foundry/client/data/collections/combats.d.mts +43 -0
- package/src/foundry/client/data/collections/compendium-collection.d.mts +504 -0
- package/src/foundry/client/data/collections/compendium-folders.d.mts +13 -0
- package/src/foundry/client/data/collections/compendium-packs.d.mts +27 -0
- package/src/foundry/client/data/collections/fog.d.mts +17 -0
- package/src/foundry/client/data/collections/folder.d.mts +27 -0
- package/src/foundry/client/data/collections/index.d.mts +17 -0
- package/src/foundry/client/data/collections/items.d.mts +14 -0
- package/src/foundry/client/data/collections/journal.d.mts +62 -0
- package/src/foundry/client/data/collections/macros.d.mts +32 -0
- package/src/foundry/client/data/collections/messages.d.mts +35 -0
- package/src/foundry/client/data/collections/playlists.d.mts +34 -0
- package/src/foundry/client/data/collections/scenes.d.mts +68 -0
- package/src/foundry/client/data/collections/settings.d.mts +29 -0
- package/src/foundry/client/data/collections/tables.d.mts +21 -0
- package/src/foundry/client/data/collections/users.d.mts +50 -0
- package/src/foundry/client/data/documents/active-effect.d.mts +348 -0
- package/src/foundry/client/data/documents/actor-delta.d.mts +88 -0
- package/src/foundry/client/data/documents/actor.d.mts +301 -0
- package/src/foundry/client/data/documents/adventure.d.mts +94 -0
- package/src/foundry/client/data/documents/ambient-light.d.mts +32 -0
- package/src/foundry/client/data/documents/ambient-sound.d.mts +19 -0
- package/src/foundry/client/data/documents/card.d.mts +115 -0
- package/src/foundry/client/data/documents/cards.d.mts +342 -0
- package/src/foundry/client/data/documents/chat-message.d.mts +218 -0
- package/src/foundry/client/data/documents/combat.d.mts +315 -0
- package/src/foundry/client/data/documents/combatant.d.mts +90 -0
- package/src/foundry/client/data/documents/drawing.d.mts +24 -0
- package/src/foundry/client/data/documents/fog-exploration.d.mts +51 -0
- package/src/foundry/client/data/documents/folder.d.mts +123 -0
- package/src/foundry/client/data/documents/index.d.mts +30 -0
- package/src/foundry/client/data/documents/item.d.mts +55 -0
- package/src/foundry/client/data/documents/journal-entry-page.d.mts +219 -0
- package/src/foundry/client/data/documents/journal-entry.d.mts +71 -0
- package/src/foundry/client/data/documents/macro.d.mts +73 -0
- package/src/foundry/client/data/documents/measured-template.d.mts +29 -0
- package/src/foundry/client/data/documents/note.d.mts +35 -0
- package/src/foundry/client/data/documents/playlist-sound.d.mts +114 -0
- package/src/foundry/client/data/documents/playlist.d.mts +196 -0
- package/src/foundry/client/data/documents/scene.d.mts +228 -0
- package/src/foundry/client/data/documents/setting.d.mts +43 -0
- package/src/foundry/client/data/documents/table-result.d.mts +29 -0
- package/src/foundry/client/data/documents/table.d.mts +310 -0
- package/src/foundry/client/data/documents/tile.d.mts +21 -0
- package/src/foundry/client/data/documents/token.d.mts +342 -0
- package/src/foundry/client/data/documents/user.d.mts +153 -0
- package/src/foundry/client/data/documents/wall.d.mts +19 -0
- package/src/foundry/client/data/index.d.mts +3 -0
- package/src/foundry/client/game.d.mts +702 -0
- package/src/foundry/client/head.d.mts +87 -0
- package/src/foundry/client/hooks.d.mts +1184 -0
- package/src/foundry/client/index.d.mts +13 -0
- package/src/foundry/client/pixi/board.d.mts +927 -0
- package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +83 -0
- package/src/foundry/client/pixi/core/containers/cached-container.d.mts +116 -0
- package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +35 -0
- package/src/foundry/client/pixi/core/containers/index.d.mts +8 -0
- package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +62 -0
- package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +43 -0
- package/src/foundry/client/pixi/core/containers/quadtree.d.mts +199 -0
- package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +326 -0
- package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +21 -0
- package/src/foundry/client/pixi/core/index.d.mts +4 -0
- package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +160 -0
- package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +80 -0
- package/src/foundry/client/pixi/core/interaction/index.d.mts +8 -0
- package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +264 -0
- package/src/foundry/client/pixi/core/interaction/ping.d.mts +58 -0
- package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +73 -0
- package/src/foundry/client/pixi/core/interaction/pings/index.d.mts +2 -0
- package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +115 -0
- package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +103 -0
- package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +52 -0
- package/src/foundry/client/pixi/core/interaction/targets.d.mts +45 -0
- package/src/foundry/client/pixi/core/loader.d.mts +206 -0
- package/src/foundry/client/pixi/core/shapes/index.d.mts +6 -0
- package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +119 -0
- package/src/foundry/client/pixi/core/shapes/polygon-helpers.d.mts +31 -0
- package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +110 -0
- package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +27 -0
- package/src/foundry/client/pixi/core/shapes/ray.d.mts +165 -0
- package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +251 -0
- package/src/foundry/client/pixi/extensions/circle.d.mts +130 -0
- package/src/foundry/client/pixi/extensions/index.d.mts +3 -0
- package/src/foundry/client/pixi/extensions/polygon.d.mts +152 -0
- package/src/foundry/client/pixi/extensions/rectangle.d.mts +226 -0
- package/src/foundry/client/pixi/groups/effects.d.mts +189 -0
- package/src/foundry/client/pixi/groups/environment.d.mts +80 -0
- package/src/foundry/client/pixi/groups/hidden.d.mts +40 -0
- package/src/foundry/client/pixi/groups/index.d.mts +7 -0
- package/src/foundry/client/pixi/groups/interface.d.mts +74 -0
- package/src/foundry/client/pixi/groups/overlay.d.mts +18 -0
- package/src/foundry/client/pixi/groups/primary.d.mts +207 -0
- package/src/foundry/client/pixi/groups/rendered.d.mts +18 -0
- package/src/foundry/client/pixi/index.d.mts +10 -0
- package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +79 -0
- package/src/foundry/client/pixi/layers/base/index.d.mts +3 -0
- package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +139 -0
- package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +598 -0
- package/src/foundry/client/pixi/layers/controls/cursor.d.mts +27 -0
- package/src/foundry/client/pixi/layers/controls/door.d.mts +70 -0
- package/src/foundry/client/pixi/layers/controls/hud.d.mts +114 -0
- package/src/foundry/client/pixi/layers/controls/index.d.mts +5 -0
- package/src/foundry/client/pixi/layers/controls/layer.d.mts +229 -0
- package/src/foundry/client/pixi/layers/controls/ruler.d.mts +316 -0
- package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +34 -0
- package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +27 -0
- package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +74 -0
- package/src/foundry/client/pixi/layers/effects/index.d.mts +6 -0
- package/src/foundry/client/pixi/layers/effects/visibility.d.mts +194 -0
- package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +47 -0
- package/src/foundry/client/pixi/layers/effects/weather/particles/index.d.mts +2 -0
- package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +20 -0
- package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +172 -0
- package/src/foundry/client/pixi/layers/grid/highlight.d.mts +32 -0
- package/src/foundry/client/pixi/layers/grid/index.d.mts +2 -0
- package/src/foundry/client/pixi/layers/grid/layer.d.mts +225 -0
- package/src/foundry/client/pixi/layers/index.d.mts +6 -0
- package/src/foundry/client/pixi/layers/masks/depth.d.mts +37 -0
- package/src/foundry/client/pixi/layers/masks/index.d.mts +3 -0
- package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +55 -0
- package/src/foundry/client/pixi/layers/masks/vision.d.mts +85 -0
- package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +92 -0
- package/src/foundry/client/pixi/layers/placeables/index.d.mts +8 -0
- package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +137 -0
- package/src/foundry/client/pixi/layers/placeables/notes.d.mts +99 -0
- package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +129 -0
- package/src/foundry/client/pixi/layers/placeables/templates.d.mts +60 -0
- package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +114 -0
- package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +180 -0
- package/src/foundry/client/pixi/layers/placeables/walls.d.mts +210 -0
- package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +169 -0
- package/src/foundry/client/pixi/perception/color-manager.d.mts +86 -0
- package/src/foundry/client/pixi/perception/detection-mode.d.mts +196 -0
- package/src/foundry/client/pixi/perception/fog.d.mts +102 -0
- package/src/foundry/client/pixi/perception/index.d.mts +7 -0
- package/src/foundry/client/pixi/perception/perception-manager.d.mts +166 -0
- package/src/foundry/client/pixi/perception/vision-mode.d.mts +197 -0
- package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +152 -0
- package/src/foundry/client/pixi/placeable.d.mts +586 -0
- package/src/foundry/client/pixi/placeables/drawing.d.mts +292 -0
- package/src/foundry/client/pixi/placeables/index.d.mts +9 -0
- package/src/foundry/client/pixi/placeables/light.d.mts +140 -0
- package/src/foundry/client/pixi/placeables/note.d.mts +114 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/drawing-shape.d.mts +143 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/index.d.mts +5 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/occludable-object.d.mts +175 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +159 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/tile-mesh.d.mts +52 -0
- package/src/foundry/client/pixi/placeables/primary-canvas-objects/token-mesh.d.mts +62 -0
- package/src/foundry/client/pixi/placeables/sound.d.mts +133 -0
- package/src/foundry/client/pixi/placeables/template.d.mts +211 -0
- package/src/foundry/client/pixi/placeables/tile.d.mts +284 -0
- package/src/foundry/client/pixi/placeables/token.d.mts +825 -0
- package/src/foundry/client/pixi/placeables/wall.d.mts +275 -0
- package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +60 -0
- package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +21 -0
- package/src/foundry/client/pixi/webgl/extensions/blend-modes.d.mts +53 -0
- package/src/foundry/client/pixi/webgl/extensions/index.d.mts +3 -0
- package/src/foundry/client/pixi/webgl/helpers/framebugger-snapshot.d.mts +22 -0
- package/src/foundry/client/pixi/webgl/helpers/index.d.mts +3 -0
- package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +61 -0
- package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +80 -0
- package/src/foundry/client/pixi/webgl/index.d.mts +3 -0
- package/src/foundry/client/pixi/webgl/shaders/base.d.mts +691 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/index.d.mts +3 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/lighting.d.mts +642 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/vision.d.mts +216 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/base.d.mts +102 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/effect.d.mts +38 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/fog.d.mts +34 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/index.d.mts +5 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/rain.d.mts +24 -0
- package/src/foundry/client/pixi/webgl/shaders/effects/weather/snow.d.mts +20 -0
- package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +163 -0
- package/src/foundry/client/pixi/webgl/shaders/filters/filters.d.mts +462 -0
- package/src/foundry/client/pixi/webgl/shaders/filters/fxaa.d.mts +74 -0
- package/src/foundry/client/pixi/webgl/shaders/filters/index.d.mts +3 -0
- package/src/foundry/client/pixi/webgl/shaders/index.d.mts +4 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +101 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +16 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/index.d.mts +6 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/inverse-occlusion.d.mts +47 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/invisibility.d.mts +28 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/monochromatic.d.mts +30 -0
- package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +69 -0
- package/src/foundry/client/pixi/workers/index.d.mts +1 -0
- package/src/foundry/client/pixi/workers/texture-worker.d.mts +125 -0
- package/src/foundry/client/tours/canvas-tour.d.mts +9 -0
- package/src/foundry/client/tours/index.d.mts +3 -0
- package/src/foundry/client/tours/setup-tour.d.mts +26 -0
- package/src/foundry/client/tours/sidebar-tour.d.mts +9 -0
- package/src/foundry/client/ui/context.d.mts +213 -0
- package/src/foundry/client/ui/dialog.d.mts +326 -0
- package/src/foundry/client/ui/drag.d.mts +128 -0
- package/src/foundry/client/ui/dragdrop.d.mts +124 -0
- package/src/foundry/client/ui/editor.d.mts +546 -0
- package/src/foundry/client/ui/filepicker.d.mts +477 -0
- package/src/foundry/client/ui/filter.d.mts +148 -0
- package/src/foundry/client/ui/forms.d.mts +85 -0
- package/src/foundry/client/ui/index.d.mts +12 -0
- package/src/foundry/client/ui/notifications.d.mts +136 -0
- package/src/foundry/client/ui/prosemirror.d.mts +171 -0
- package/src/foundry/client/ui/secrets.d.mts +75 -0
- package/src/foundry/client/ui/tabs.d.mts +117 -0
- package/src/foundry/client-esm/applications/_module.d.mts +25 -0
- package/src/foundry/client-esm/applications/_types.d.mts +38 -0
- package/src/foundry/client-esm/applications/api/_module.d.mts +9 -0
- package/src/foundry/client-esm/applications/api/application.d.mts +705 -0
- package/src/foundry/client-esm/applications/api/dialog.d.mts +268 -0
- package/src/foundry/client-esm/applications/api/document-sheet.d.mts +119 -0
- package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +180 -0
- package/src/foundry/client-esm/applications/apps/_module.d.mts +7 -0
- package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +53 -0
- package/src/foundry/client-esm/applications/apps/permission-config.d.mts +60 -0
- package/src/foundry/client-esm/applications/dice/_module.d.mts +6 -0
- package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +98 -0
- package/src/foundry/client-esm/applications/elements/_module.d.mts +16 -0
- package/src/foundry/client-esm/applications/elements/color-picker.d.mts +26 -0
- package/src/foundry/client-esm/applications/elements/document-tags.d.mts +90 -0
- package/src/foundry/client-esm/applications/elements/file-picker.d.mts +62 -0
- package/src/foundry/client-esm/applications/elements/form-element.d.mts +106 -0
- package/src/foundry/client-esm/applications/elements/hue-slider.d.mts +20 -0
- package/src/foundry/client-esm/applications/elements/multi-select.d.mts +95 -0
- package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +53 -0
- package/src/foundry/client-esm/applications/elements/range-picker.d.mts +41 -0
- package/src/foundry/client-esm/applications/elements/string-tags.d.mts +73 -0
- package/src/foundry/client-esm/applications/forms/fields.d.mts +219 -0
- package/src/foundry/client-esm/applications/sheets/_module.d.mts +12 -0
- package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +31 -0
- package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +18 -0
- package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +22 -0
- package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +13 -0
- package/src/foundry/client-esm/applications/sheets/region-config.d.mts +13 -0
- package/src/foundry/client-esm/applications/sheets/user-config.d.mts +18 -0
- package/src/foundry/client-esm/applications/ui/_module.d.mts +6 -0
- package/src/foundry/client-esm/applications/ui/region-legend.d.mts +12 -0
- package/src/foundry/client-esm/audio/_module.d.mts +13 -0
- package/src/foundry/client-esm/audio/_types.d.mts +1 -0
- package/src/foundry/client-esm/canvas/_module.d.mts +11 -0
- package/src/foundry/client-esm/canvas/edges/_module.d.mts +9 -0
- package/src/foundry/client-esm/canvas/edges/collision.d.mts +93 -0
- package/src/foundry/client-esm/canvas/edges/edge.d.mts +184 -0
- package/src/foundry/client-esm/canvas/edges/edges.d.mts +23 -0
- package/src/foundry/client-esm/canvas/edges/vertex.d.mts +134 -0
- package/src/foundry/client-esm/canvas/regions/_module.d.mts +10 -0
- package/src/foundry/client-esm/canvas/scene-manager.d.mts +1 -0
- package/src/foundry/client-esm/canvas/smaa/blend.d.mts +6 -0
- package/src/foundry/client-esm/canvas/smaa/edges.d.mts +6 -0
- package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +56 -0
- package/src/foundry/client-esm/canvas/smaa/weights.d.mts +6 -0
- package/src/foundry/client-esm/canvas/sources/_module.d.mts +15 -0
- package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +243 -0
- package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +162 -0
- package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +47 -0
- package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +77 -0
- package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +91 -0
- package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +43 -0
- package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +15 -0
- package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +29 -0
- package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +206 -0
- package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +328 -0
- package/src/foundry/client-esm/canvas/tokens/_module.d.mts +7 -0
- package/src/foundry/client-esm/client.d.mts +291 -0
- package/src/foundry/client-esm/data/_module.d.mts +8 -0
- package/src/foundry/client-esm/data/client-backend.d.mts +52 -0
- package/src/foundry/client-esm/data/region-behaviors/_module.d.mts +14 -0
- package/src/foundry/client-esm/dice/_module.d.mts +13 -0
- package/src/foundry/client-esm/dice/_types.d.mts +61 -0
- package/src/foundry/client-esm/dice/parser.d.mts +205 -0
- package/src/foundry/client-esm/dice/roll.d.mts +645 -0
- package/src/foundry/client-esm/dice/terms/_module.d.mts +17 -0
- package/src/foundry/client-esm/dice/terms/coin.d.mts +68 -0
- package/src/foundry/client-esm/dice/terms/dice.d.mts +381 -0
- package/src/foundry/client-esm/dice/terms/die.d.mts +241 -0
- package/src/foundry/client-esm/dice/terms/fate.d.mts +50 -0
- package/src/foundry/client-esm/dice/terms/function.d.mts +104 -0
- package/src/foundry/client-esm/dice/terms/numeric.d.mts +56 -0
- package/src/foundry/client-esm/dice/terms/operator.d.mts +55 -0
- package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +105 -0
- package/src/foundry/client-esm/dice/terms/pool.d.mts +278 -0
- package/src/foundry/client-esm/dice/terms/string.d.mts +34 -0
- package/src/foundry/client-esm/dice/terms/term.d.mts +160 -0
- package/src/foundry/client-esm/dice/twister.d.mts +134 -0
- package/src/foundry/client-esm/helpers/_module.d.mts +8 -0
- package/src/foundry/client-esm/helpers/_types.d.mts +51 -0
- package/src/foundry/client-esm/helpers/compendium-art.d.mts +47 -0
- package/src/foundry/clipper/clipper.d.mts +927 -0
- package/src/foundry/clipper/index.d.mts +1 -0
- package/src/foundry/common/abstract/_types.d.mts +274 -0
- package/src/foundry/common/abstract/backend.d.mts +190 -0
- package/src/foundry/common/abstract/data.d.mts +457 -0
- package/src/foundry/common/abstract/document.d.mts +1372 -0
- package/src/foundry/common/abstract/embedded-collection-delta.d.mts +96 -0
- package/src/foundry/common/abstract/embedded-collection.d.mts +252 -0
- package/src/foundry/common/abstract/module.d.mts +13 -0
- package/src/foundry/common/abstract/singleton-collection.d.mts +19 -0
- package/src/foundry/common/abstract/socket.d.mts +36 -0
- package/src/foundry/common/abstract/type-data.d.mts +337 -0
- package/src/foundry/common/config.d.mts +302 -0
- package/src/foundry/common/constants.d.mts +2054 -0
- package/src/foundry/common/data/data.d.mts +667 -0
- package/src/foundry/common/data/fields.d.mts +3388 -0
- package/src/foundry/common/data/module.d.mts +9 -0
- package/src/foundry/common/data/validation-failure.d.mts +174 -0
- package/src/foundry/common/data/validators.d.mts +30 -0
- package/src/foundry/common/documents/_module.d.mts +35 -0
- package/src/foundry/common/documents/_types.d.mts +143 -0
- package/src/foundry/common/documents/active-effect.d.mts +229 -0
- package/src/foundry/common/documents/actor-delta.d.mts +132 -0
- package/src/foundry/common/documents/actor.d.mts +209 -0
- package/src/foundry/common/documents/adventure.d.mts +212 -0
- package/src/foundry/common/documents/ambient-light.d.mts +107 -0
- package/src/foundry/common/documents/ambient-sound.d.mts +142 -0
- package/src/foundry/common/documents/card.d.mts +254 -0
- package/src/foundry/common/documents/cards.d.mts +191 -0
- package/src/foundry/common/documents/chat-message.d.mts +208 -0
- package/src/foundry/common/documents/combat.d.mts +124 -0
- package/src/foundry/common/documents/combatant.d.mts +127 -0
- package/src/foundry/common/documents/drawing.d.mts +255 -0
- package/src/foundry/common/documents/fog-exploration.d.mts +110 -0
- package/src/foundry/common/documents/folder.d.mts +130 -0
- package/src/foundry/common/documents/item.d.mts +181 -0
- package/src/foundry/common/documents/journal-entry-page.d.mts +229 -0
- package/src/foundry/common/documents/journal-entry.d.mts +133 -0
- package/src/foundry/common/documents/macro.d.mts +190 -0
- package/src/foundry/common/documents/measured-template.d.mts +183 -0
- package/src/foundry/common/documents/module.d.mts +35 -0
- package/src/foundry/common/documents/note.d.mts +195 -0
- package/src/foundry/common/documents/playlist-sound.d.mts +131 -0
- package/src/foundry/common/documents/playlist.d.mts +160 -0
- package/src/foundry/common/documents/roll-table.d.mts +153 -0
- package/src/foundry/common/documents/scene.d.mts +395 -0
- package/src/foundry/common/documents/setting.d.mts +88 -0
- package/src/foundry/common/documents/table-result.d.mts +157 -0
- package/src/foundry/common/documents/tile.d.mts +204 -0
- package/src/foundry/common/documents/token.d.mts +515 -0
- package/src/foundry/common/documents/user.d.mts +247 -0
- package/src/foundry/common/documents/wall.d.mts +196 -0
- package/src/foundry/common/grid/_module.d.mts +10 -0
- package/src/foundry/common/grid/base.d.mts +640 -0
- package/src/foundry/common/grid/grid-hex.d.mts +55 -0
- package/src/foundry/common/grid/gridless.d.mts +71 -0
- package/src/foundry/common/grid/hexagonal.d.mts +391 -0
- package/src/foundry/common/grid/square.d.mts +100 -0
- package/src/foundry/common/packages/base-module.d.mts +46 -0
- package/src/foundry/common/packages/base-package.d.mts +677 -0
- package/src/foundry/common/packages/base-system.d.mts +90 -0
- package/src/foundry/common/packages/base-world.d.mts +116 -0
- package/src/foundry/common/packages/module.d.mts +28 -0
- package/src/foundry/common/packages/sub-types.d.mts +42 -0
- package/src/foundry/common/primitives/array.d.mts +56 -0
- package/src/foundry/common/primitives/date.d.mts +24 -0
- package/src/foundry/common/primitives/math.d.mts +103 -0
- package/src/foundry/common/primitives/module.d.mts +8 -0
- package/src/foundry/common/primitives/number.d.mts +91 -0
- package/src/foundry/common/primitives/regex.d.mts +12 -0
- package/src/foundry/common/primitives/regexp.d.mts +12 -0
- package/src/foundry/common/primitives/set.d.mts +105 -0
- package/src/foundry/common/primitives/string.d.mts +58 -0
- package/src/foundry/common/primitives/url.d.mts +18 -0
- package/src/foundry/common/prosemirror/_module.d.mts +82 -0
- package/src/foundry/common/prosemirror/click-handler.d.mts +34 -0
- package/src/foundry/common/prosemirror/content-link-plugin.d.mts +47 -0
- package/src/foundry/common/prosemirror/dirty-plugin.d.mts +13 -0
- package/src/foundry/common/prosemirror/dom-parser.d.mts +9 -0
- package/src/foundry/common/prosemirror/dropdown.d.mts +65 -0
- package/src/foundry/common/prosemirror/extensions.d.mts +12 -0
- package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +82 -0
- package/src/foundry/common/prosemirror/image-plugin.d.mts +82 -0
- package/src/foundry/common/prosemirror/index.d.mts +22 -0
- package/src/foundry/common/prosemirror/input-rules.d.mts +34 -0
- package/src/foundry/common/prosemirror/keymaps.d.mts +47 -0
- package/src/foundry/common/prosemirror/menu.d.mts +255 -0
- package/src/foundry/common/prosemirror/paste-transformer.d.mts +22 -0
- package/src/foundry/common/prosemirror/plugin.d.mts +24 -0
- package/src/foundry/common/prosemirror/schema/attribute-capture.d.mts +39 -0
- package/src/foundry/common/prosemirror/schema/core.d.mts +51 -0
- package/src/foundry/common/prosemirror/schema/image-link-node.d.mts +29 -0
- package/src/foundry/common/prosemirror/schema/image-node.d.mts +19 -0
- package/src/foundry/common/prosemirror/schema/index.d.mts +12 -0
- package/src/foundry/common/prosemirror/schema/link-mark.d.mts +30 -0
- package/src/foundry/common/prosemirror/schema/lists.d.mts +55 -0
- package/src/foundry/common/prosemirror/schema/marks.d.mts +44 -0
- package/src/foundry/common/prosemirror/schema/other.d.mts +149 -0
- package/src/foundry/common/prosemirror/schema/schema-definition.d.mts +39 -0
- package/src/foundry/common/prosemirror/schema/secret-node.d.mts +27 -0
- package/src/foundry/common/prosemirror/schema/tables.d.mts +106 -0
- package/src/foundry/common/prosemirror/schema/utils.d.mts +37 -0
- package/src/foundry/common/prosemirror/schema.d.mts +138 -0
- package/src/foundry/common/prosemirror/string-serializer.d.mts +120 -0
- package/src/foundry/common/prosemirror/util.d.mts +43 -0
- package/src/foundry/common/types.d.mts +332 -0
- package/src/foundry/common/utils/bitmask.d.mts +110 -0
- package/src/foundry/common/utils/collection.d.mts +176 -0
- package/src/foundry/common/utils/color.d.mts +291 -0
- package/src/foundry/common/utils/event-emitter.d.mts +62 -0
- package/src/foundry/common/utils/geometry.d.mts +198 -0
- package/src/foundry/common/utils/helpers.d.mts +752 -0
- package/src/foundry/common/utils/http.d.mts +52 -0
- package/src/foundry/common/utils/iterable-weak-map.d.mts +80 -0
- package/src/foundry/common/utils/iterable-weak-set.d.mts +47 -0
- package/src/foundry/common/utils/logging.d.mts +42 -0
- package/src/foundry/common/utils/module.d.mts +18 -0
- package/src/foundry/common/utils/semaphore.d.mts +82 -0
- package/src/foundry/common/utils/string-tree.d.mts +95 -0
- package/src/foundry/common/utils/word-tree.d.mts +66 -0
- package/src/foundry/index.d.mts +5 -0
- package/src/foundry/public/index.d.mts +1 -0
- package/src/foundry/public/scripts/earcut-edges/earcut-edges.d.mts +11 -0
- package/src/foundry/public/scripts/earcut-edges/index.d.mts +1 -0
- package/src/foundry/public/scripts/index.d.mts +1 -0
- package/src/index.d.mts +2 -0
- package/src/types/augments/index.d.mts +4 -0
- package/src/types/augments/pixi.d.mts +38 -0
- package/src/types/augments/simple-peer.d.mts +13 -0
- package/src/types/augments/socket.io-client.d.mts +12 -0
- package/src/types/augments/tinyMCE.d.mts +72 -0
- package/src/types/config.d.mts +331 -0
- package/src/types/configuredDocuments.d.mts +103 -0
- package/src/types/helperTypes.d.mts +261 -0
- package/src/types/index.d.mts +4 -0
- package/src/types/utils.d.mts +406 -0
- package/index-lenient.d.ts +0 -10
- package/index.d.ts +0 -4
- package/src/foundry/client/apps/app.d.ts +0 -560
- package/src/foundry/client/apps/av/av-config.d.ts +0 -85
- package/src/foundry/client/apps/av/cameras.d.ts +0 -174
- package/src/foundry/client/apps/av/index.d.ts +0 -3
- package/src/foundry/client/apps/form.d.ts +0 -384
- package/src/foundry/client/apps/forms/actor.d.ts +0 -192
- package/src/foundry/client/apps/forms/card-config.d.ts +0 -51
- package/src/foundry/client/apps/forms/cards-config.d.ts +0 -128
- package/src/foundry/client/apps/forms/combat-config.d.ts +0 -41
- package/src/foundry/client/apps/forms/combatant-config.d.ts +0 -49
- package/src/foundry/client/apps/forms/effect-config.d.ts +0 -65
- package/src/foundry/client/apps/forms/folder-config.d.ts +0 -63
- package/src/foundry/client/apps/forms/grid-config.d.ts +0 -151
- package/src/foundry/client/apps/forms/image-popout.d.ts +0 -166
- package/src/foundry/client/apps/forms/index.d.ts +0 -20
- package/src/foundry/client/apps/forms/item.d.ts +0 -71
- package/src/foundry/client/apps/forms/journal-sheet.d.ts +0 -107
- package/src/foundry/client/apps/forms/macro-config.d.ts +0 -71
- package/src/foundry/client/apps/forms/measure-template.d.ts +0 -53
- package/src/foundry/client/apps/forms/permission.d.ts +0 -58
- package/src/foundry/client/apps/forms/playlist-config.d.ts +0 -43
- package/src/foundry/client/apps/forms/playlist-sound-config.d.ts +0 -61
- package/src/foundry/client/apps/forms/roll-table-config.d.ts +0 -175
- package/src/foundry/client/apps/forms/scene-config.d.ts +0 -148
- package/src/foundry/client/apps/forms/sheet-config.d.ts +0 -184
- package/src/foundry/client/apps/forms/user-config.d.ts +0 -74
- package/src/foundry/client/apps/hud/chatbubble.d.ts +0 -89
- package/src/foundry/client/apps/hud/container.d.ts +0 -46
- package/src/foundry/client/apps/hud/controls.d.ts +0 -156
- package/src/foundry/client/apps/hud/hotbar.d.ts +0 -143
- package/src/foundry/client/apps/hud/hud.d.ts +0 -84
- package/src/foundry/client/apps/hud/index.d.ts +0 -9
- package/src/foundry/client/apps/hud/menu.d.ts +0 -71
- package/src/foundry/client/apps/hud/navigation.d.ts +0 -110
- package/src/foundry/client/apps/hud/pause.d.ts +0 -20
- package/src/foundry/client/apps/hud/players.d.ts +0 -55
- package/src/foundry/client/apps/i18n.d.ts +0 -136
- package/src/foundry/client/apps/index.d.ts +0 -9
- package/src/foundry/client/apps/placeables/drawing-config.d.ts +0 -99
- package/src/foundry/client/apps/placeables/drawing-hud.d.ts +0 -32
- package/src/foundry/client/apps/placeables/index.d.ts +0 -10
- package/src/foundry/client/apps/placeables/light-config.d.ts +0 -95
- package/src/foundry/client/apps/placeables/note-config.d.ts +0 -57
- package/src/foundry/client/apps/placeables/sound-config.d.ts +0 -47
- package/src/foundry/client/apps/placeables/tile-config.d.ts +0 -55
- package/src/foundry/client/apps/placeables/tile-hud.d.ts +0 -37
- package/src/foundry/client/apps/placeables/token-config.d.ts +0 -226
- package/src/foundry/client/apps/placeables/token-hud.d.ts +0 -140
- package/src/foundry/client/apps/placeables/wall-config.d.ts +0 -75
- package/src/foundry/client/apps/sidebar/apps/chat-popout.d.ts +0 -34
- package/src/foundry/client/apps/sidebar/apps/client-settings.d.ts +0 -116
- package/src/foundry/client/apps/sidebar/apps/compendium.d.ts +0 -86
- package/src/foundry/client/apps/sidebar/apps/controls-reference.d.ts +0 -30
- package/src/foundry/client/apps/sidebar/apps/index.d.ts +0 -10
- package/src/foundry/client/apps/sidebar/apps/invitation-links.d.ts +0 -37
- package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.ts +0 -247
- package/src/foundry/client/apps/sidebar/apps/module-management.d.ts +0 -120
- package/src/foundry/client/apps/sidebar/apps/permission-config.d.ts +0 -64
- package/src/foundry/client/apps/sidebar/apps/support-details.d.ts +0 -76
- package/src/foundry/client/apps/sidebar/apps/world-config.d.ts +0 -77
- package/src/foundry/client/apps/sidebar/index.d.ts +0 -5
- package/src/foundry/client/apps/sidebar/sidebar.d.ts +0 -102
- package/src/foundry/client/apps/sidebar/tab-base.d.ts +0 -68
- package/src/foundry/client/apps/sidebar/tab-directory.d.ts +0 -236
- package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.ts +0 -16
- package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.ts +0 -6
- package/src/foundry/client/apps/sidebar/tabs/chat-log.d.ts +0 -351
- package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.ts +0 -205
- package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.ts +0 -77
- package/src/foundry/client/apps/sidebar/tabs/index.d.ts +0 -12
- package/src/foundry/client/apps/sidebar/tabs/items-directory.d.ts +0 -10
- package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.ts +0 -11
- package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.ts +0 -12
- package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.ts +0 -306
- package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.ts +0 -9
- package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.ts +0 -18
- package/src/foundry/client/apps/sidebar/tabs/settings.d.ts +0 -88
- package/src/foundry/client/apps/templates.d.ts +0 -425
- package/src/foundry/client/audio/audio.d.ts +0 -343
- package/src/foundry/client/audio/container.d.ts +0 -175
- package/src/foundry/client/audio/index.d.ts +0 -3
- package/src/foundry/client/audio/sound.d.ts +0 -303
- package/src/foundry/client/av/client.d.ts +0 -158
- package/src/foundry/client/av/clients/index.d.ts +0 -1
- package/src/foundry/client/av/clients/simplepeer.d.ts +0 -151
- package/src/foundry/client/av/index.d.ts +0 -4
- package/src/foundry/client/av/master.d.ts +0 -187
- package/src/foundry/client/av/settings.d.ts +0 -236
- package/src/foundry/client/config.d.ts +0 -1425
- package/src/foundry/client/core/gamepad.d.ts +0 -53
- package/src/foundry/client/core/hooks.d.ts +0 -967
- package/src/foundry/client/core/image.d.ts +0 -129
- package/src/foundry/client/core/index.d.ts +0 -13
- package/src/foundry/client/core/keybindings.d.ts +0 -298
- package/src/foundry/client/core/keyboard.d.ts +0 -247
- package/src/foundry/client/core/mouse.d.ts +0 -18
- package/src/foundry/client/core/nue.d.ts +0 -34
- package/src/foundry/client/core/settings.d.ts +0 -222
- package/src/foundry/client/core/socket.d.ts +0 -46
- package/src/foundry/client/core/sorting.d.ts +0 -78
- package/src/foundry/client/core/time.d.ts +0 -67
- package/src/foundry/client/core/utils.d.ts +0 -33
- package/src/foundry/client/core/video.d.ts +0 -65
- package/src/foundry/client/data/abstract/canvas-document.d.ts +0 -70
- package/src/foundry/client/data/abstract/client-backend.d.ts +0 -206
- package/src/foundry/client/data/abstract/client-document.d.ts +0 -439
- package/src/foundry/client/data/abstract/document-collection.d.ts +0 -192
- package/src/foundry/client/data/abstract/index.d.ts +0 -5
- package/src/foundry/client/data/abstract/world-collection.d.ts +0 -167
- package/src/foundry/client/data/collections/actors.d.ts +0 -35
- package/src/foundry/client/data/collections/cards.d.ts +0 -8
- package/src/foundry/client/data/collections/combats.d.ts +0 -43
- package/src/foundry/client/data/collections/compendium.d.ts +0 -321
- package/src/foundry/client/data/collections/fog.d.ts +0 -7
- package/src/foundry/client/data/collections/folder.d.ts +0 -27
- package/src/foundry/client/data/collections/index.d.ts +0 -15
- package/src/foundry/client/data/collections/items.d.ts +0 -10
- package/src/foundry/client/data/collections/journal.d.ts +0 -26
- package/src/foundry/client/data/collections/macros.d.ts +0 -26
- package/src/foundry/client/data/collections/messages.d.ts +0 -39
- package/src/foundry/client/data/collections/playlists.d.ts +0 -41
- package/src/foundry/client/data/collections/scenes.d.ts +0 -62
- package/src/foundry/client/data/collections/settings.d.ts +0 -25
- package/src/foundry/client/data/collections/tables.d.ts +0 -17
- package/src/foundry/client/data/collections/users.d.ts +0 -43
- package/src/foundry/client/data/documents/active-effect.d.ts +0 -172
- package/src/foundry/client/data/documents/actor.d.ts +0 -231
- package/src/foundry/client/data/documents/ambient-light.d.ts +0 -18
- package/src/foundry/client/data/documents/ambient-sound.d.ts +0 -9
- package/src/foundry/client/data/documents/card.d.ts +0 -133
- package/src/foundry/client/data/documents/cards.d.ts +0 -376
- package/src/foundry/client/data/documents/chat-message.d.ts +0 -267
- package/src/foundry/client/data/documents/combat.d.ts +0 -227
- package/src/foundry/client/data/documents/combatant.d.ts +0 -104
- package/src/foundry/client/data/documents/drawing.d.ts +0 -19
- package/src/foundry/client/data/documents/fog-exploration.d.ts +0 -64
- package/src/foundry/client/data/documents/folder.d.ts +0 -115
- package/src/foundry/client/data/documents/index.d.ts +0 -27
- package/src/foundry/client/data/documents/item.d.ts +0 -59
- package/src/foundry/client/data/documents/journal-entry.d.ts +0 -71
- package/src/foundry/client/data/documents/macro.d.ts +0 -60
- package/src/foundry/client/data/documents/measured-template.d.ts +0 -21
- package/src/foundry/client/data/documents/note.d.ts +0 -19
- package/src/foundry/client/data/documents/playlist-sound.d.ts +0 -117
- package/src/foundry/client/data/documents/playlist.d.ts +0 -192
- package/src/foundry/client/data/documents/scene.d.ts +0 -465
- package/src/foundry/client/data/documents/setting.d.ts +0 -35
- package/src/foundry/client/data/documents/table-result.d.ts +0 -30
- package/src/foundry/client/data/documents/table.d.ts +0 -220
- package/src/foundry/client/data/documents/tile.d.ts +0 -13
- package/src/foundry/client/data/documents/token.d.ts +0 -281
- package/src/foundry/client/data/documents/user.d.ts +0 -155
- package/src/foundry/client/data/documents/wall.d.ts +0 -9
- package/src/foundry/client/data/index.d.ts +0 -3
- package/src/foundry/client/dice/dice/coin.d.ts +0 -49
- package/src/foundry/client/dice/dice/die.d.ts +0 -230
- package/src/foundry/client/dice/dice/fate.d.ts +0 -37
- package/src/foundry/client/dice/dice/index.d.ts +0 -3
- package/src/foundry/client/dice/index.d.ts +0 -5
- package/src/foundry/client/dice/roll.d.ts +0 -495
- package/src/foundry/client/dice/term.d.ts +0 -123
- package/src/foundry/client/dice/terms/dice.d.ts +0 -277
- package/src/foundry/client/dice/terms/index.d.ts +0 -7
- package/src/foundry/client/dice/terms/math.d.ts +0 -69
- package/src/foundry/client/dice/terms/numeric.d.ts +0 -53
- package/src/foundry/client/dice/terms/operator.d.ts +0 -18
- package/src/foundry/client/dice/terms/parenthetical.d.ts +0 -51
- package/src/foundry/client/dice/terms/pool.d.ts +0 -235
- package/src/foundry/client/dice/terms/string.d.ts +0 -31
- package/src/foundry/client/dice/twister.d.ts +0 -134
- package/src/foundry/client/game.d.ts +0 -682
- package/src/foundry/client/head.d.ts +0 -44
- package/src/foundry/client/index.d.ts +0 -12
- package/src/foundry/client/pixi/board.d.ts +0 -626
- package/src/foundry/client/pixi/core/containers/cached-container.d.ts +0 -64
- package/src/foundry/client/pixi/core/containers/index.d.ts +0 -3
- package/src/foundry/client/pixi/core/containers/quadtree.d.ts +0 -166
- package/src/foundry/client/pixi/core/containers/sampler-mesh.d.ts +0 -22
- package/src/foundry/client/pixi/core/culling.d.ts +0 -37
- package/src/foundry/client/pixi/core/index.d.ts +0 -5
- package/src/foundry/client/pixi/core/interaction/canvas-animation.d.ts +0 -148
- package/src/foundry/client/pixi/core/interaction/control-icon.d.ts +0 -58
- package/src/foundry/client/pixi/core/interaction/index.d.ts +0 -5
- package/src/foundry/client/pixi/core/interaction/mouse-handler.d.ts +0 -323
- package/src/foundry/client/pixi/core/interaction/resize-handle.d.ts +0 -48
- package/src/foundry/client/pixi/core/interaction/targets.d.ts +0 -51
- package/src/foundry/client/pixi/core/loader.d.ts +0 -157
- package/src/foundry/client/pixi/core/shapes/index.d.ts +0 -5
- package/src/foundry/client/pixi/core/shapes/normalized-rectangle.d.ts +0 -31
- package/src/foundry/client/pixi/core/shapes/polygon-helpers.d.ts +0 -263
- package/src/foundry/client/pixi/core/shapes/precise-text.d.ts +0 -18
- package/src/foundry/client/pixi/core/shapes/ray.d.ts +0 -200
- package/src/foundry/client/pixi/core/shapes/source-polygon.d.ts +0 -110
- package/src/foundry/client/pixi/groups/effects.d.ts +0 -29
- package/src/foundry/client/pixi/groups/index.d.ts +0 -3
- package/src/foundry/client/pixi/groups/interface.d.ts +0 -27
- package/src/foundry/client/pixi/groups/primary.d.ts +0 -40
- package/src/foundry/client/pixi/index.d.ts +0 -10
- package/src/foundry/client/pixi/layer.d.ts +0 -105
- package/src/foundry/client/pixi/layers/controls/cursor.d.ts +0 -27
- package/src/foundry/client/pixi/layers/controls/door.d.ts +0 -67
- package/src/foundry/client/pixi/layers/controls/hud.d.ts +0 -117
- package/src/foundry/client/pixi/layers/controls/index.d.ts +0 -4
- package/src/foundry/client/pixi/layers/controls/ruler.d.ts +0 -207
- package/src/foundry/client/pixi/layers/controls.d.ts +0 -144
- package/src/foundry/client/pixi/layers/drawings.d.ts +0 -116
- package/src/foundry/client/pixi/layers/effects/effect.d.ts +0 -133
- package/src/foundry/client/pixi/layers/effects/index.d.ts +0 -4
- package/src/foundry/client/pixi/layers/effects/leaves.d.ts +0 -79
- package/src/foundry/client/pixi/layers/effects/rain.d.ts +0 -107
- package/src/foundry/client/pixi/layers/effects/snow.d.ts +0 -62
- package/src/foundry/client/pixi/layers/effects.d.ts +0 -61
- package/src/foundry/client/pixi/layers/grid/grid.d.ts +0 -171
- package/src/foundry/client/pixi/layers/grid/hex.d.ts +0 -118
- package/src/foundry/client/pixi/layers/grid/highlight.d.ts +0 -28
- package/src/foundry/client/pixi/layers/grid/index.d.ts +0 -4
- package/src/foundry/client/pixi/layers/grid/square.d.ts +0 -48
- package/src/foundry/client/pixi/layers/grid.d.ts +0 -204
- package/src/foundry/client/pixi/layers/index.d.ts +0 -15
- package/src/foundry/client/pixi/layers/lighting.d.ts +0 -229
- package/src/foundry/client/pixi/layers/map.d.ts +0 -263
- package/src/foundry/client/pixi/layers/notes.d.ts +0 -64
- package/src/foundry/client/pixi/layers/sight.d.ts +0 -313
- package/src/foundry/client/pixi/layers/sounds.d.ts +0 -112
- package/src/foundry/client/pixi/layers/templates.d.ts +0 -51
- package/src/foundry/client/pixi/layers/tokens.d.ts +0 -169
- package/src/foundry/client/pixi/layers/walls.d.ts +0 -321
- package/src/foundry/client/pixi/perception/clockwise-sweep.d.ts +0 -406
- package/src/foundry/client/pixi/perception/index.d.ts +0 -2
- package/src/foundry/client/pixi/perception/perception-manager.d.ts +0 -107
- package/src/foundry/client/pixi/placeable.d.ts +0 -414
- package/src/foundry/client/pixi/placeables/drawing.d.ts +0 -289
- package/src/foundry/client/pixi/placeables/index.d.ts +0 -8
- package/src/foundry/client/pixi/placeables/light.d.ts +0 -126
- package/src/foundry/client/pixi/placeables/note.d.ts +0 -67
- package/src/foundry/client/pixi/placeables/sound.d.ts +0 -131
- package/src/foundry/client/pixi/placeables/template.d.ts +0 -153
- package/src/foundry/client/pixi/placeables/tile.d.ts +0 -315
- package/src/foundry/client/pixi/placeables/token.d.ts +0 -722
- package/src/foundry/client/pixi/placeables/wall.d.ts +0 -268
- package/src/foundry/client/pixi/placeables.d.ts +0 -520
- package/src/foundry/client/pixi/sources/base-source.d.ts +0 -145
- package/src/foundry/client/pixi/sources/index.d.ts +0 -4
- package/src/foundry/client/pixi/sources/light-source.d.ts +0 -413
- package/src/foundry/client/pixi/sources/sound-source.d.ts +0 -45
- package/src/foundry/client/pixi/sources/vision-source.d.ts +0 -123
- package/src/foundry/client/pixi/webgl/base.d.ts +0 -69
- package/src/foundry/client/pixi/webgl/blend_modes.d.ts +0 -33
- package/src/foundry/client/pixi/webgl/filters.d.ts +0 -182
- package/src/foundry/client/pixi/webgl/index.d.ts +0 -5
- package/src/foundry/client/pixi/webgl/lighting.d.ts +0 -480
- package/src/foundry/client/pixi/webgl/sampler.d.ts +0 -19
- package/src/foundry/client/ui/context.d.ts +0 -136
- package/src/foundry/client/ui/dialog.d.ts +0 -286
- package/src/foundry/client/ui/drag.d.ts +0 -105
- package/src/foundry/client/ui/dragdrop.d.ts +0 -118
- package/src/foundry/client/ui/editor.d.ts +0 -321
- package/src/foundry/client/ui/filepicker.d.ts +0 -510
- package/src/foundry/client/ui/filter.d.ts +0 -106
- package/src/foundry/client/ui/forms.d.ts +0 -47
- package/src/foundry/client/ui/index.d.ts +0 -10
- package/src/foundry/client/ui/notifications.d.ts +0 -110
- package/src/foundry/client/ui/tabs.d.ts +0 -103
- package/src/foundry/common/abstract/backend.mjs.d.ts +0 -253
- package/src/foundry/common/abstract/data.mjs.d.ts +0 -316
- package/src/foundry/common/abstract/document.mjs.d.ts +0 -838
- package/src/foundry/common/abstract/embedded-collection.mjs.d.ts +0 -79
- package/src/foundry/common/abstract/module.mjs.d.ts +0 -6
- package/src/foundry/common/config.mjs/index.d.ts +0 -1
- package/src/foundry/common/config.mjs/releaseData.d.ts +0 -100
- package/src/foundry/common/constants.mjs.d.ts +0 -940
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +0 -168
- package/src/foundry/common/data/data.mjs/actorData.d.ts +0 -219
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +0 -166
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +0 -154
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +0 -195
- package/src/foundry/common/data/data.mjs/animationData.d.ts +0 -91
- package/src/foundry/common/data/data.mjs/cardData.d.ts +0 -264
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +0 -67
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +0 -237
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +0 -220
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +0 -80
- package/src/foundry/common/data/data.mjs/combatData.d.ts +0 -149
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +0 -136
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +0 -55
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +0 -407
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +0 -80
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +0 -109
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +0 -115
- package/src/foundry/common/data/data.mjs/folderData.d.ts +0 -155
- package/src/foundry/common/data/data.mjs/index.d.ts +0 -31
- package/src/foundry/common/data/data.mjs/itemData.d.ts +0 -184
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +0 -132
- package/src/foundry/common/data/data.mjs/lightData.d.ts +0 -227
- package/src/foundry/common/data/data.mjs/macroData.d.ts +0 -199
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +0 -212
- package/src/foundry/common/data/data.mjs/noteData.d.ts +0 -233
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +0 -201
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +0 -159
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +0 -75
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +0 -189
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +0 -665
- package/src/foundry/common/data/data.mjs/settingData.d.ts +0 -86
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +0 -167
- package/src/foundry/common/data/data.mjs/tileData.d.ts +0 -246
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +0 -62
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +0 -47
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +0 -505
- package/src/foundry/common/data/data.mjs/userData.d.ts +0 -177
- package/src/foundry/common/data/data.mjs/videoData.d.ts +0 -70
- package/src/foundry/common/data/data.mjs/wallData.d.ts +0 -222
- package/src/foundry/common/data/fields.mjs.d.ts +0 -526
- package/src/foundry/common/data/module.mjs.d.ts +0 -3
- package/src/foundry/common/data/validators.mjs.d.ts +0 -56
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +0 -44
- package/src/foundry/common/documents.mjs/baseActor.d.ts +0 -68
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +0 -38
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +0 -31
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +0 -29
- package/src/foundry/common/documents.mjs/baseCard.d.ts +0 -58
- package/src/foundry/common/documents.mjs/baseCards.d.ts +0 -39
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +0 -49
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +0 -40
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +0 -48
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +0 -54
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +0 -41
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +0 -30
- package/src/foundry/common/documents.mjs/baseItem.d.ts +0 -57
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +0 -26
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -42
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +0 -66
- package/src/foundry/common/documents.mjs/baseNote.d.ts +0 -39
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +0 -32
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +0 -37
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +0 -31
- package/src/foundry/common/documents.mjs/baseScene.d.ts +0 -120
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +0 -38
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +0 -52
- package/src/foundry/common/documents.mjs/baseTile.d.ts +0 -29
- package/src/foundry/common/documents.mjs/baseToken.d.ts +0 -44
- package/src/foundry/common/documents.mjs/baseUser.d.ts +0 -102
- package/src/foundry/common/documents.mjs/baseWall.d.ts +0 -43
- package/src/foundry/common/documents.mjs/index.d.ts +0 -28
- package/src/foundry/common/module.mjs.d.ts +0 -114
- package/src/foundry/common/packages.mjs/index.d.ts +0 -8
- package/src/foundry/common/packages.mjs/moduleData.d.ts +0 -55
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +0 -58
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +0 -88
- package/src/foundry/common/packages.mjs/packageData.d.ts +0 -319
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +0 -69
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +0 -75
- package/src/foundry/common/packages.mjs/systemData.d.ts +0 -58
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +0 -9
- package/src/foundry/common/packages.mjs/worldData.d.ts +0 -76
- package/src/foundry/common/types.mjs.d.ts +0 -299
- package/src/foundry/common/utils/collection.mjs.d.ts +0 -151
- package/src/foundry/common/utils/geometry.mjs.d.ts +0 -148
- package/src/foundry/common/utils/helpers.mjs.d.ts +0 -498
- package/src/foundry/common/utils/http.mjs.d.ts +0 -52
- package/src/foundry/common/utils/module.mjs.d.ts +0 -5
- package/src/foundry/common/utils/primitives.mjs.d.ts +0 -287
- package/src/foundry/common/utils/semaphore.mjs.d.ts +0 -83
- package/src/foundry/index.d.ts +0 -3
- package/src/foundry/templates/index.d.ts +0 -1
- package/src/foundry/templates/views/layouts/main.hbs.d.ts +0 -11
- package/src/index.d.ts +0 -2
- package/src/types/augments/index.d.ts +0 -6
- package/src/types/augments/pixiGraphicsSmooth.d.ts +0 -7
- package/src/types/augments/pixiLegacyGraphics.d.ts +0 -7
- package/src/types/augments/pixiParticles.d.ts +0 -7
- package/src/types/augments/simple-peer.d.ts +0 -13
- package/src/types/augments/socket.io-client.d.ts +0 -12
- package/src/types/augments/tinyMCE.d.ts +0 -82
- package/src/types/config.d.ts +0 -183
- package/src/types/helperTypes.d.ts +0 -151
- package/src/types/index.d.ts +0 -3
- package/src/types/utils.d.ts +0 -143
- /package/src/foundry/client/apps/av/{camera-popout.d.ts → camera-popout.d.mts} +0 -0
- /package/src/foundry/client/{tail.d.ts → tail.d.mts} +0 -0
@@ -0,0 +1,752 @@
|
|
1
|
+
import type { AnyConstructor, AnyFunction, DeepPartial, InexactPartial } from "../../../types/utils.d.mts";
|
2
|
+
import type Document from "../abstract/document.d.mts";
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Benchmark the performance of a function, calling it a requested number of iterations.
|
6
|
+
* @param func - The function to benchmark
|
7
|
+
* @param iterations - The number of iterations to test
|
8
|
+
* @param args - Additional arguments passed to the benchmarked function
|
9
|
+
*/
|
10
|
+
export function benchmark<F extends AnyFunction>(func: F, iterations: number, ...args: Parameters<F>): Promise<void>;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* A debugging function to test latency or timeouts by forcibly locking the thread for an amount of time.
|
14
|
+
* @param ms - A number of milliseconds to lock
|
15
|
+
* @param debug - (default: `false`)
|
16
|
+
* @returns
|
17
|
+
*/
|
18
|
+
export function threadLock(ms: number, debug?: boolean): Promise<void>;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Wrap a callback in a debounced timeout.
|
22
|
+
* Delay execution of the callback function until the function has not been called for delay milliseconds
|
23
|
+
* @param callback - A function to execute once the debounced threshold has been passed
|
24
|
+
* @param delay - An amount of time in milliseconds to delay
|
25
|
+
* @returns A wrapped function which can be called to debounce execution
|
26
|
+
*/
|
27
|
+
export function debounce<T extends AnyFunction>(callback: T, delay: number): (...args: Parameters<T>) => void;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Wrap a callback in a throttled timeout.
|
31
|
+
* Delay execution of the callback function when the last time the function was called was delay milliseconds ago
|
32
|
+
* @param callback - A function to execute once the throttled threshold has been passed
|
33
|
+
* @param delay - A maximum amount of time in milliseconds between to execution
|
34
|
+
* @returns - A wrapped function which can be called to throttle execution
|
35
|
+
*/
|
36
|
+
export function throttle<T extends (...args: any[]) => any>(callback: T, delay: number): T;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* A utility function to reload the page with a debounce.
|
40
|
+
*/
|
41
|
+
export const debouncedReload: VoidFunction;
|
42
|
+
|
43
|
+
export interface DeepCloneOptions {
|
44
|
+
/**
|
45
|
+
* Throw an Error if deepClone is unable to clone something instead of returning the original
|
46
|
+
* @defaultValue `false`
|
47
|
+
*/
|
48
|
+
strict?: boolean;
|
49
|
+
/**
|
50
|
+
* An internal depth tracker
|
51
|
+
* @defaultValue 0
|
52
|
+
*/
|
53
|
+
_d?: number;
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Quickly clone a simple piece of data, returning a copy which can be mutated safely.
|
58
|
+
* This method DOES support recursive data structures containing inner objects or arrays.
|
59
|
+
* This method DOES NOT support advanced object types like Set, Map, or other specialized classes.
|
60
|
+
* @param original - Some sort of data
|
61
|
+
* @param options - Options to configure the behaviour of deepClone
|
62
|
+
* @returns - The clone of that data
|
63
|
+
* @throws - An Error if deepClone is unable to clone something and strict mode is enabled
|
64
|
+
*/
|
65
|
+
export function deepClone<T>(original: T, options?: DeepCloneOptions): T;
|
66
|
+
|
67
|
+
export type DiffObjectOptions = InexactPartial<{
|
68
|
+
/**
|
69
|
+
* Only recognize differences in other for keys which also exist in original
|
70
|
+
* @defaultValue `false`
|
71
|
+
*/
|
72
|
+
inner?: boolean;
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Apply special logic to deletion keys. They will only be kept if the original object has a
|
76
|
+
* corresponding key that could be deleted.
|
77
|
+
* @defaultValue `false`
|
78
|
+
*/
|
79
|
+
deletionKeys?: boolean;
|
80
|
+
|
81
|
+
/**
|
82
|
+
* An internal depth tracker
|
83
|
+
* @defaultValue 0
|
84
|
+
*/
|
85
|
+
_d?: number;
|
86
|
+
}>;
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Deeply difference an object against some other, returning the update keys and values.
|
90
|
+
* @param original - An object comparing data against which to compare
|
91
|
+
* @param other - An object containing potentially different data
|
92
|
+
* @param options - Additional options which configure the diff operation
|
93
|
+
* @returns - An object of the data in other which differs from that in original
|
94
|
+
*/
|
95
|
+
export function diffObject(original: object, other: object, options?: DiffObjectOptions): object;
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Test if two objects contain the same enumerable keys and values.
|
99
|
+
* @param a - The first object.
|
100
|
+
* @param b - The second object.
|
101
|
+
*/
|
102
|
+
export function objectsEqual<B extends object>(a: object, b: B): a is B;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* A cheap data duplication trick which is relatively robust.
|
106
|
+
* For a subset of cases the deepClone function will offer better performance.
|
107
|
+
* @param original - Some sort of data
|
108
|
+
* @typeParam T - Type of the original data.
|
109
|
+
*
|
110
|
+
* @remarks This function will actually convert any occurrences of `NaN` and `Infinity` to `null`. For ease of use, this
|
111
|
+
* is _not_ reflected in the type. Be careful if your types might contain `NaN` or `Infinity`!
|
112
|
+
*/
|
113
|
+
export function duplicate<T>(original: T): Duplicated<T>;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* The resulting type when using {@link duplicate} on some data of type `T`.
|
117
|
+
*
|
118
|
+
* @typeParam T - Original type.
|
119
|
+
* @internal
|
120
|
+
*/
|
121
|
+
export type Duplicated<T> = T extends NonStringifiable ? never : InnerDuplicated<T>;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* Test whether some class is a subclass of a parent.
|
125
|
+
* Returns true if the classes are identical.
|
126
|
+
* @param cls - The class to test
|
127
|
+
* @param parent - Some other class which may be a parent
|
128
|
+
* @returns Is the class a subclass of the parent?
|
129
|
+
*/
|
130
|
+
export function isSubclass<Parent extends AnyConstructor>(cls: AnyConstructor, parent: Parent): cls is Parent;
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Search up the prototype chain and return the class that defines the given property.
|
134
|
+
* @param obj - A class instance or class definition which contains a property.
|
135
|
+
* - If a class instance is passed the property is treated as an instance attribute.
|
136
|
+
* - If a class constructor is passed the property is treated as a static attribute.
|
137
|
+
* @param property - The property name
|
138
|
+
* @returns - The class that defines the property
|
139
|
+
*/
|
140
|
+
export function getDefiningClass(cls: AnyConstructor, property: string): AnyConstructor;
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Encode a url-like string by replacing any characters which need encoding
|
144
|
+
* @param path - A fully-qualified URL or url component (like a relative path)
|
145
|
+
* @returns An encoded URL string
|
146
|
+
*/
|
147
|
+
export function encodeURL(path: string): string;
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Expand a flattened object to be a standard multi-dimensional nested Object by converting all dot-notation keys to
|
151
|
+
* inner objects.
|
152
|
+
*
|
153
|
+
* @param obj - The object to expand
|
154
|
+
* @returns An expanded object
|
155
|
+
*
|
156
|
+
*/
|
157
|
+
export function expandObject(obj: object): object;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Filter the contents of some source object using the structure of a template object.
|
161
|
+
* Only keys which exist in the template are preserved in the source object.
|
162
|
+
*
|
163
|
+
* @param source - An object which contains the data you wish to filter
|
164
|
+
* @param template - An object which contains the structure you wish to preserve
|
165
|
+
* @param options - Additional options which customize the filtration
|
166
|
+
* (default: `{}`)
|
167
|
+
*
|
168
|
+
* @example Filter an object
|
169
|
+
* ```typescript
|
170
|
+
* const source = {foo: {number: 1, name: "Tim", topping: "olives"}, bar: "baz"};
|
171
|
+
* const template = {foo: {number: 0, name: "Mit", style: "bold"}, other: 72};
|
172
|
+
* filterObject(source, template); // {foo: {number: 1, name: "Tim"}};
|
173
|
+
* filterObject(source, template, {templateValues: true}); // {foo: {number: 0, name: "Mit"}};
|
174
|
+
* ```
|
175
|
+
*/
|
176
|
+
export function filterObject(source: object, template: object, options?: FilterObjectOptions): object;
|
177
|
+
|
178
|
+
export interface FilterObjectOptions {
|
179
|
+
/**
|
180
|
+
* Whether to keep deletion keys
|
181
|
+
* @defaultValue `false`
|
182
|
+
*/
|
183
|
+
deletionKeys?: boolean | undefined;
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Instead of keeping values from the source, instead draw values from the template
|
187
|
+
* @defaultValue `false`
|
188
|
+
*/
|
189
|
+
templateValues?: boolean | undefined;
|
190
|
+
}
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Flatten a possibly multi-dimensional object to a one-dimensional one by converting all nested keys to dot notation
|
194
|
+
* @param obj - The object to flatten
|
195
|
+
* @param _d - Track the recursion depth to prevent overflow. (default: `0`)
|
196
|
+
* @returns A flattened object
|
197
|
+
*/
|
198
|
+
export function flattenObject(obj: object, _d?: number): object;
|
199
|
+
|
200
|
+
/**
|
201
|
+
* Obtain references to the parent classes of a certain class.
|
202
|
+
* @param cls - An ES6 Class definition
|
203
|
+
* @returns An array of parent Classes which the provided class extends
|
204
|
+
*/
|
205
|
+
export function getParentClasses(cls: AnyConstructor): Array<AnyConstructor>;
|
206
|
+
|
207
|
+
export interface GetRouteOptions {
|
208
|
+
/**
|
209
|
+
* A path prefix to apply
|
210
|
+
* (default: `null`)
|
211
|
+
*/
|
212
|
+
prefix?: string | null | undefined;
|
213
|
+
}
|
214
|
+
|
215
|
+
/**
|
216
|
+
* Get the URL route for a certain path which includes a path prefix, if one is set
|
217
|
+
* @param path - The Foundry URL path
|
218
|
+
* @returns The absolute URL path
|
219
|
+
*/
|
220
|
+
export function getRoute(path: string, { prefix }?: GetRouteOptions): string;
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Learn the underlying data type of some variable. Supported identifiable types include:
|
224
|
+
* undefined, null, number, string, boolean, function, Array, Set, Map, Promise, Error,
|
225
|
+
* HTMLElement (client side only), Object (catchall for other object types)
|
226
|
+
* @param variable - A provided variable
|
227
|
+
* @returns The named type of the token
|
228
|
+
*/
|
229
|
+
export function getType(
|
230
|
+
variable: unknown,
|
231
|
+
):
|
232
|
+
| "Array"
|
233
|
+
| "Error"
|
234
|
+
| "HTMLElement"
|
235
|
+
| "Map"
|
236
|
+
| "Object"
|
237
|
+
| "Promise"
|
238
|
+
| "Set"
|
239
|
+
| "bigint"
|
240
|
+
| "boolean"
|
241
|
+
| "function"
|
242
|
+
| "null"
|
243
|
+
| "number"
|
244
|
+
| "string"
|
245
|
+
| "symbol"
|
246
|
+
| "undefined";
|
247
|
+
|
248
|
+
/**
|
249
|
+
* A helper function which tests whether an object has a property or nested property given a string key.
|
250
|
+
* The string key supports the notation a.b.c which would return true if object[a][b][c] exists
|
251
|
+
* @param object - The object to traverse
|
252
|
+
* @param key - An object property with notation a.b.c
|
253
|
+
* @returns An indicator for whether the property exists
|
254
|
+
*/
|
255
|
+
export function hasProperty(object: object, key: string): boolean;
|
256
|
+
|
257
|
+
/**
|
258
|
+
* A helper function which searches through an object to retrieve a value by a string key.
|
259
|
+
* The string key supports the notation a.b.c which would return object[a][b][c]
|
260
|
+
* @param object - The object to traverse
|
261
|
+
* @param key - An object property with notation a.b.c
|
262
|
+
* @returns The value of the found property
|
263
|
+
*/
|
264
|
+
export function getProperty(object: object, key: string): any;
|
265
|
+
|
266
|
+
/**
|
267
|
+
* A helper function which searches through an object to assign a value using a string key
|
268
|
+
* This string key supports the notation a.b.c which would target object[a][b][c]
|
269
|
+
* @param object - The object to update
|
270
|
+
* @param key - The string key
|
271
|
+
* @param value - The value to be assigned
|
272
|
+
* @returns Whether the value was changed from its previous value
|
273
|
+
*/
|
274
|
+
export function setProperty(object: object, key: string, value: any): boolean;
|
275
|
+
|
276
|
+
export type InvertableObject = Record<string | number | symbol, string | number | symbol>;
|
277
|
+
export type InvertObject<in out T extends InvertableObject> = { [Key in keyof T as T[Key]]: Key };
|
278
|
+
|
279
|
+
/**
|
280
|
+
* Invert an object by assigning its values as keys and its keys as values.
|
281
|
+
* @param obj - The original object to invert
|
282
|
+
* @returns The inverted object with keys and values swapped
|
283
|
+
*/
|
284
|
+
export function invertObject<T extends InvertableObject>(obj: T): InvertObject<T>;
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Return whether a target version (v1) is more advanced than some other reference version (v0).
|
288
|
+
* Supports either numeric or string version comparison with version parts separated by periods.
|
289
|
+
* @param v1 - The target version
|
290
|
+
* @param v0 - The reference version
|
291
|
+
* @returns Is v1 a more advanced version than v0?
|
292
|
+
*/
|
293
|
+
export function isNewerVersion(v1: number | string, v0: number | string): boolean;
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Test whether a value is empty-like; either undefined or a content-less object.
|
297
|
+
* @param value - The value to test
|
298
|
+
* @returns Is the value empty-like?
|
299
|
+
*/
|
300
|
+
export function isEmpty(value: undefined | null | unknown[] | object | Set<unknown> | Map<unknown, unknown>): boolean;
|
301
|
+
|
302
|
+
export type MergeObject<T, U, M extends MergeObjectOptions> = UpdateInsert<
|
303
|
+
DeleteByObjectKeys<T, U, M>,
|
304
|
+
RemoveDeletingObjectKeys<U, M>,
|
305
|
+
M
|
306
|
+
>;
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Update a source object by replacing its keys and values with those from a target object.
|
310
|
+
*
|
311
|
+
* @param original - The initial object which should be updated with values from the target
|
312
|
+
* @param other - A new object whose values should replace those in the source
|
313
|
+
* (default: `{}`)
|
314
|
+
* @param options - Additional options which configure the merge
|
315
|
+
* (default: `{}`)
|
316
|
+
* @param _d - A privately used parameter to track recursion depth.
|
317
|
+
* (default: `0`)
|
318
|
+
* @returns The original source object including updated, inserted, or overwritten records.
|
319
|
+
*
|
320
|
+
* @example Control how new keys and values are added
|
321
|
+
* ```typescript
|
322
|
+
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: false}); // {k1: "v1"}
|
323
|
+
* mergeObject({k1: "v1"}, {k2: "v2"}, {insertKeys: true}); // {k1: "v1", k2: "v2"}
|
324
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: false}); // {k1: {i1: "v1"}}
|
325
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {insertValues: true}); // {k1: {i1: "v1", i2: "v2"}}
|
326
|
+
* ```
|
327
|
+
*
|
328
|
+
* @example Control how existing data is overwritten
|
329
|
+
* ```typescript
|
330
|
+
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: true}); // {k1: "v2"}
|
331
|
+
* mergeObject({k1: "v1"}, {k1: "v2"}, {overwrite: false}); // {k1: "v1"}
|
332
|
+
* ```
|
333
|
+
*
|
334
|
+
* @example Control whether merges are performed recursively
|
335
|
+
* ```typescript
|
336
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: false}); // {k1: {i2: "v2"}}
|
337
|
+
* mergeObject({k1: {i1: "v1"}}, {k1: {i2: "v2"}}, {recursive: true}); // {k1: {i1: "v1", i2: "v2"}}
|
338
|
+
* ```
|
339
|
+
*
|
340
|
+
* @example Deleting an existing object key
|
341
|
+
* ```typescript
|
342
|
+
* mergeObject({k1: "v1", k2: "v2"}, {"-=k1": null}, {performDeletions: true}); // {k2: "v2"}
|
343
|
+
* ```
|
344
|
+
*/
|
345
|
+
export function mergeObject<
|
346
|
+
T extends object,
|
347
|
+
U extends DeepPartial<WithWidenedArrayTypes<T>>,
|
348
|
+
M extends MergeObjectOptions & { enforceTypes: true },
|
349
|
+
>(original: T, other?: U, options?: M, _d?: number): MergeObject<T, U, M>;
|
350
|
+
export function mergeObject<
|
351
|
+
T extends object,
|
352
|
+
U extends DeepPartial<Record<keyof T, never>> & object,
|
353
|
+
M extends MergeObjectOptions & { enforceTypes: true },
|
354
|
+
>(original: T, other?: U, options?: M, _d?: number): MergeObject<T, U, M>;
|
355
|
+
export function mergeObject<T extends object, U extends object, M extends MergeObjectOptions & { enforceTypes: true }>(
|
356
|
+
original: T,
|
357
|
+
other?: U,
|
358
|
+
options?: M,
|
359
|
+
_d?: number,
|
360
|
+
): never;
|
361
|
+
export function mergeObject<T extends object, U extends object, M extends MergeObjectOptions>(
|
362
|
+
original: T,
|
363
|
+
other?: U,
|
364
|
+
options?: M,
|
365
|
+
_d?: number,
|
366
|
+
): MergeObject<T, U, M>;
|
367
|
+
|
368
|
+
export interface MergeObjectOptions {
|
369
|
+
/**
|
370
|
+
* Control whether to insert new top-level objects into the resulting structure which do not previously exist in the original object.
|
371
|
+
* @defaultValue `true`
|
372
|
+
*/
|
373
|
+
insertKeys?: boolean | undefined;
|
374
|
+
|
375
|
+
/**
|
376
|
+
* Control whether to insert new nested values into child objects in the resulting structure which did not previously exist in the original object.
|
377
|
+
* @defaultValue `true`
|
378
|
+
*/
|
379
|
+
insertValues?: boolean | undefined;
|
380
|
+
|
381
|
+
/**
|
382
|
+
* Control whether to replace existing values in the source, or only merge values which do not already exist in the original object.
|
383
|
+
* @defaultValue `true`
|
384
|
+
*/
|
385
|
+
overwrite?: boolean | undefined;
|
386
|
+
|
387
|
+
/**
|
388
|
+
* Control whether to merge inner-objects recursively (if true), or whether to simply replace inner objects with a provided new value.
|
389
|
+
* @defaultValue `true`
|
390
|
+
*/
|
391
|
+
recursive?: boolean | undefined;
|
392
|
+
|
393
|
+
/**
|
394
|
+
* Control whether to apply updates to the original object in-place (if true), otherwise the original object is duplicated and the copy is merged.
|
395
|
+
* @defaultValue `true`
|
396
|
+
*/
|
397
|
+
inplace?: boolean | undefined;
|
398
|
+
|
399
|
+
/**
|
400
|
+
* Control whether strict type checking requires that the value of a key in the other object must match the data type in the original data to be merged.
|
401
|
+
* @defaultValue `false`
|
402
|
+
*/
|
403
|
+
enforceTypes?: boolean | undefined;
|
404
|
+
|
405
|
+
/**
|
406
|
+
* Control whether to perform deletions on the original object if deletion keys are present in the other object.
|
407
|
+
* @defaultValue `false`
|
408
|
+
*/
|
409
|
+
performDeletions?: boolean | undefined; //TODO: implement this in the mergeObject return type
|
410
|
+
}
|
411
|
+
|
412
|
+
/**
|
413
|
+
* A helper function for merging objects when the target key does not exist in the original
|
414
|
+
* @internal
|
415
|
+
*/
|
416
|
+
declare function _mergeInsert(
|
417
|
+
original: object,
|
418
|
+
k: string | number | symbol,
|
419
|
+
v: any,
|
420
|
+
options?: Pick<MergeObjectOptions, "insertKeys" | "insertValues" | "performDeletions">,
|
421
|
+
_d?: number,
|
422
|
+
): void;
|
423
|
+
|
424
|
+
/**
|
425
|
+
* A helper function for merging objects when the target key exists in the original
|
426
|
+
* @internal
|
427
|
+
*/
|
428
|
+
declare function _mergeUpdate<T extends object, K extends keyof T>(
|
429
|
+
original: T,
|
430
|
+
k: K,
|
431
|
+
v: any,
|
432
|
+
options?: Pick<
|
433
|
+
MergeObjectOptions,
|
434
|
+
"insertKeys" | "insertValues" | "enforceTypes" | "overwrite" | "recursive" | "performDeletions"
|
435
|
+
>,
|
436
|
+
_d?: number,
|
437
|
+
): void;
|
438
|
+
|
439
|
+
/**
|
440
|
+
* Parse an S3 key to learn the bucket and the key prefix used for the request.
|
441
|
+
* @param key - A fully qualified key name or prefix path.
|
442
|
+
*/
|
443
|
+
export function parseS3URL(key: string): { bucket: string | null; keyPrefix: string };
|
444
|
+
|
445
|
+
/**
|
446
|
+
* Generate a random alphanumeric string ID of a given requested length using `crypto.getRandomValues()`.
|
447
|
+
* @param length - The length of the random string to generate, which must be at most 16384.
|
448
|
+
* (default: `16`)
|
449
|
+
* @returns - A string containing random letters (A-Z, a-z) and numbers (0-9).
|
450
|
+
*/
|
451
|
+
export function randomID(length?: number): string;
|
452
|
+
|
453
|
+
/**
|
454
|
+
* Express a timestamp as a relative string
|
455
|
+
* @param timeStamp - A timestamp string or Date object to be formatted as a relative time
|
456
|
+
* @returns A string expression for the relative time
|
457
|
+
*/
|
458
|
+
export function timeSince(timeStamp: Date | string): string;
|
459
|
+
|
460
|
+
/**
|
461
|
+
* Format a file size to an appropriate order of magnitude.
|
462
|
+
* @param size - The size in bytes.
|
463
|
+
* @param options - Additional options. (default: `{}`)
|
464
|
+
* @returns
|
465
|
+
*/
|
466
|
+
export function formatFileSize(size: number, options: FormatFileSizeOptions): string;
|
467
|
+
|
468
|
+
interface FormatFileSizeOptions {
|
469
|
+
/**
|
470
|
+
* The number of decimal places to round to.
|
471
|
+
* @defaultValue `2`
|
472
|
+
*/
|
473
|
+
decimalPlaces?: number | undefined;
|
474
|
+
|
475
|
+
/**
|
476
|
+
* The base to use. In base 10 a kilobyte is 1000 bytes. In base 2 it is 1024 bytes.
|
477
|
+
* @defaultValue `10`
|
478
|
+
*/
|
479
|
+
base?: 2 | 10 | undefined;
|
480
|
+
}
|
481
|
+
|
482
|
+
interface ResolvedUUID {
|
483
|
+
/**
|
484
|
+
* The original UUID.
|
485
|
+
*/
|
486
|
+
uuid: string;
|
487
|
+
|
488
|
+
/**
|
489
|
+
* The type of Document referenced. Legacy compendium UUIDs will not populate this field if the compendium is not active in the World.
|
490
|
+
*/
|
491
|
+
type?: DocumentType;
|
492
|
+
|
493
|
+
/**
|
494
|
+
* The ID of the Document referenced.
|
495
|
+
*/
|
496
|
+
id: string;
|
497
|
+
|
498
|
+
/**
|
499
|
+
* The primary Document type of this UUID. Only present if the Document is embedded.
|
500
|
+
*/
|
501
|
+
primaryType?: foundry.CONST.PRIMARY_DOCUMENT_TYPES;
|
502
|
+
|
503
|
+
/**
|
504
|
+
* The primary Document ID of this UUID. Only present if the Document is embedded.
|
505
|
+
*/
|
506
|
+
primaryId?: string;
|
507
|
+
|
508
|
+
/**
|
509
|
+
* The collection that the primary Document belongs to.
|
510
|
+
*/
|
511
|
+
collection?: DocumentCollection.Any;
|
512
|
+
|
513
|
+
/**
|
514
|
+
* Additional Embedded Document parts.
|
515
|
+
*/
|
516
|
+
embedded: string[];
|
517
|
+
|
518
|
+
/**
|
519
|
+
* An already-resolved parent Document.
|
520
|
+
*/
|
521
|
+
doc?: Document.Any;
|
522
|
+
|
523
|
+
/**
|
524
|
+
* Either the document type or the parent type. Retained for backwards compatibility.
|
525
|
+
*/
|
526
|
+
documentType?: DocumentType;
|
527
|
+
|
528
|
+
/**
|
529
|
+
* Either the document id or the parent id. Retained for backwards compatibility.
|
530
|
+
*/
|
531
|
+
documentId?: string;
|
532
|
+
}
|
533
|
+
|
534
|
+
interface ParseUUIDOptions {
|
535
|
+
/**
|
536
|
+
* A document to resolve relative UUIDs against.
|
537
|
+
*/
|
538
|
+
relative?: Document.Any;
|
539
|
+
}
|
540
|
+
|
541
|
+
/**
|
542
|
+
* Parse a UUID into its constituent parts, identifying the type and ID of the referenced document.
|
543
|
+
* The ResolvedUUID result also identifies a "primary" document which is a root-level document either in the game
|
544
|
+
* World or in a Compendium pack which is a parent of the referenced document.
|
545
|
+
* @param uuid - The UUID to parse.
|
546
|
+
* @param options - Options to configure parsing behavior.
|
547
|
+
* @returns - Returns the Collection, Document Type, and Document ID to resolve the parent
|
548
|
+
* document, as well as the remaining Embedded Document parts, if any.
|
549
|
+
* @throws - An error if the provided uuid string is incorrectly structured
|
550
|
+
*/
|
551
|
+
export function parseUuid(uuid: string, options?: ParseUUIDOptions): ResolvedUUID;
|
552
|
+
|
553
|
+
/**
|
554
|
+
* Resolve a UUID relative to another document.
|
555
|
+
* The general-purpose algorithm for resolving relative UUIDs is as follows:
|
556
|
+
* 1. If the number of parts is odd, remove the first part and resolve it against the current document and update the
|
557
|
+
* current document.
|
558
|
+
* 2. If the number of parts is even, resolve embedded documents against the current document.
|
559
|
+
* @param uuid - The UUID to resolve.
|
560
|
+
* @param relative - The document to resolve against.
|
561
|
+
* @returns
|
562
|
+
* @internal
|
563
|
+
*/
|
564
|
+
declare function _resolveRelativeUuid(uuid: string, relative: Document.Any): ResolvedUUID;
|
565
|
+
|
566
|
+
/**
|
567
|
+
* Converts an RGB color value to HSV. Conversion formula adapted from http://en.wikipedia.org/wiki/HSV_color_space.
|
568
|
+
* Assumes r, g, and b are contained in the set [0, 1] and returns h, s, and v in the set [0, 1].
|
569
|
+
* @param r - The red color value
|
570
|
+
* @param g - The green color value
|
571
|
+
* @param b - The blue color value
|
572
|
+
* @returns The HSV representation
|
573
|
+
* @deprecated since v10 until v12, rgbToHsv is deprecated in favor of {@link foundry.utils.Color#hsv}
|
574
|
+
*/
|
575
|
+
export function rgbToHsv(r: number, g: number, b: number): [h: number, s: number, v: number];
|
576
|
+
|
577
|
+
/**
|
578
|
+
* Converts an HSV color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSV_color_space.
|
579
|
+
* Assumes h, s, and v are contained in the set [0, 1] and returns r, g, and b in the set [0, 1].
|
580
|
+
* @param h - The hue
|
581
|
+
* @param s - The saturation
|
582
|
+
* @param v - The value
|
583
|
+
* @returns The RGB representation
|
584
|
+
* @deprecated since v10 until v12, hsvToRgb is deprecated in favor of {@link foundry.utils.Color.fromHSV}
|
585
|
+
*/
|
586
|
+
export function hsvToRgb(h: number, s: number, v: number): [r: number, g: number, b: number];
|
587
|
+
|
588
|
+
/**
|
589
|
+
* Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number.
|
590
|
+
* @param rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0.
|
591
|
+
* @returns The numeric color as hexadecimal
|
592
|
+
* @deprecated since v10 until v12, rgbToHex is deprecated in favor of {@link foundry.utils.Color.fromRGB}
|
593
|
+
*/
|
594
|
+
export function rgbToHex(rgb: [r: number, g: number, b: number]): number;
|
595
|
+
|
596
|
+
/**
|
597
|
+
* Convert a hex color code to an RGB array
|
598
|
+
* @param hex - A hex color number
|
599
|
+
* @returns An array of [r,g,b] colors normalized on the range of [0,1]
|
600
|
+
* @deprecated since v10 until v12, hexToRGB is deprecated in favor of {@link foundry.utils.Color#rgb}
|
601
|
+
*/
|
602
|
+
export function hexToRGB(hex: number): [r: number, g: number, b: number];
|
603
|
+
|
604
|
+
/**
|
605
|
+
* Convert a hex color code to an RGBA color string which can be used for CSS styling
|
606
|
+
* @param hex - A hex color number
|
607
|
+
* @param alpha - An optional level of transparency
|
608
|
+
* (default: `1.0`)
|
609
|
+
* @returns An rgba style string
|
610
|
+
* @deprecated since v10 until v12, hexToRGBAString is deprecated in favor of {@link foundry.utils.Color#toRGBA}
|
611
|
+
*/
|
612
|
+
export function hexToRGBAString(hex: number, alpha?: number): `rgba(${number}, ${number}, ${number})`;
|
613
|
+
|
614
|
+
/**
|
615
|
+
* Convert a string color to a hex integer
|
616
|
+
* @param color - The string color
|
617
|
+
* @returns The hexadecimal color code
|
618
|
+
* @deprecated since v10 until v12, colorStringToHex is deprecated in favor of {@link foundry.utils.Color.from}
|
619
|
+
*/
|
620
|
+
export function colorStringToHex(color: string): number | null;
|
621
|
+
|
622
|
+
/**
|
623
|
+
* Internal Helper for {@link Duplicated}. A union type of all types that do not have a JSON representation.
|
624
|
+
*
|
625
|
+
* @internal
|
626
|
+
*/
|
627
|
+
type NonStringifiable = undefined | AnyFunction | AnyConstructor | symbol;
|
628
|
+
|
629
|
+
/**
|
630
|
+
* Internal helper for {@link InnerDuplicated}. Maps the properties of `T` to their duplicated types.
|
631
|
+
*
|
632
|
+
* @typeParam T - The object type that should have its properties mapped.
|
633
|
+
* @internal
|
634
|
+
*/
|
635
|
+
type MapToInnerDuplicated<T extends object> = { [k in keyof T]: InnerDuplicated<T[k]> };
|
636
|
+
|
637
|
+
/**
|
638
|
+
* Omit properties of `T` which are of type `U`.
|
639
|
+
*
|
640
|
+
* @typeParam T - Object type from which properties will be omitted.
|
641
|
+
* @typeParam U - Properties of this type will be omitted.
|
642
|
+
* @internal
|
643
|
+
*/
|
644
|
+
type OmitOfType<T extends object, U> = { [k in keyof T as T[k] extends U ? never : k]: T[k] };
|
645
|
+
|
646
|
+
/**
|
647
|
+
* Internal helper type for {@link Duplicated}. It is the main part of the implementation, which does the recursion.
|
648
|
+
*
|
649
|
+
* @typeParam T - Type currently being converted.
|
650
|
+
* @internal
|
651
|
+
*/
|
652
|
+
// prettier-ignore
|
653
|
+
type InnerDuplicated<T> = T extends { toJSON(): infer U }
|
654
|
+
? U extends Array<unknown>
|
655
|
+
? InnerDuplicated<U>
|
656
|
+
: U extends object
|
657
|
+
? InnerDuplicated<Omit<U, "toJSON">>
|
658
|
+
: InnerDuplicated<U>
|
659
|
+
: T extends NonStringifiable
|
660
|
+
? undefined
|
661
|
+
: T extends Array<unknown>
|
662
|
+
? MapToInnerDuplicated<MapTypeToType<T, NonStringifiable, null>>
|
663
|
+
: T extends object
|
664
|
+
? MapToInnerDuplicated<
|
665
|
+
OmitAssignableFromType<MapTypeToType<T, NonStringifiable, undefined>, undefined> &
|
666
|
+
Partial<OmitOfType<OmitNotAssignableFromType<MapTypeToType<T, NonStringifiable, undefined>, undefined>, undefined>>
|
667
|
+
>
|
668
|
+
: T;
|
669
|
+
|
670
|
+
/**
|
671
|
+
* If T extends `U`, the resulting type is `R`, otherwise it is `T`.
|
672
|
+
*
|
673
|
+
* @typeParam T - Original type.
|
674
|
+
* @typeParam U - Only convert types of this type.
|
675
|
+
* @typeParam R - Adjust to this type.
|
676
|
+
* @internal
|
677
|
+
*/
|
678
|
+
type TypeToType<T, U, R> = T extends U ? R : T;
|
679
|
+
|
680
|
+
/**
|
681
|
+
* Map the types of properties of `T` to `R` if they are of type `U`.
|
682
|
+
*
|
683
|
+
* @typeParam T - Object type that will have its properties' types adjusted.
|
684
|
+
* @typeParam U - Adjust the types of properties of this type.
|
685
|
+
* @typeParam R - Type that properties' types will be adjusted to.
|
686
|
+
* @internal
|
687
|
+
*/
|
688
|
+
type MapTypeToType<T, U, R> = { [k in keyof T]: TypeToType<T[k], U, R> };
|
689
|
+
|
690
|
+
/**
|
691
|
+
* Omit properties of `T` which are assignable from `U`.
|
692
|
+
*
|
693
|
+
* @typeParam T - Object type that will have its properties omitted.
|
694
|
+
* @typeParam U - Properties with types that are assignable from this type will be omitted.
|
695
|
+
* @internal
|
696
|
+
*/
|
697
|
+
type OmitAssignableFromType<T extends object, U> = { [k in keyof T as U extends T[k] ? never : k]: T[k] };
|
698
|
+
|
699
|
+
/**
|
700
|
+
* Omit properties of `T` which are not assignable from `U`.
|
701
|
+
*
|
702
|
+
* @typeParam T - Object type that will have its properties omitted.
|
703
|
+
* @typeParam U - Properties with types that are not assignable from this type will be omitted.
|
704
|
+
* @internal
|
705
|
+
*/
|
706
|
+
type OmitNotAssignableFromType<T extends object, U> = { [k in keyof T as U extends T[k] ? k : never]: T[k] };
|
707
|
+
|
708
|
+
type OmitByValue<T, ValueType> = { [Key in keyof T as T[Key] extends ValueType ? never : Key]: T[Key] };
|
709
|
+
type RemoveNever<T> = OmitByValue<T, never>;
|
710
|
+
type PropWithMinus<K> = K extends string ? `-=${K}` : never;
|
711
|
+
type DeleteByObjectKeys<T, U, M extends MergeObjectOptions> = M["performDeletions"] extends true
|
712
|
+
? RemoveNever<{
|
713
|
+
[K in keyof T]: PropWithMinus<K> extends keyof U ? (U[PropWithMinus<K>] extends null ? never : T[K]) : T[K];
|
714
|
+
}>
|
715
|
+
: T;
|
716
|
+
type RemoveDeletingObjectKeys<T, M extends MergeObjectOptions> = M["performDeletions"] extends true
|
717
|
+
? RemoveNever<{
|
718
|
+
[K in keyof T]: K extends string ? (Capitalize<K> extends K ? (T[K] extends null ? never : T[K]) : T[K]) : T[K];
|
719
|
+
}>
|
720
|
+
: T;
|
721
|
+
|
722
|
+
type MergeObjectProperty<T, U, M extends MergeObjectOptions> =
|
723
|
+
T extends Array<any>
|
724
|
+
? U
|
725
|
+
: T extends Record<string, any>
|
726
|
+
? U extends Record<string, any>
|
727
|
+
? M extends { recursive: false }
|
728
|
+
? U
|
729
|
+
: MergeObject<
|
730
|
+
T,
|
731
|
+
U,
|
732
|
+
Omit<M, "insertKeys" | "performDeletions"> & {
|
733
|
+
insertKeys: M["insertValues"];
|
734
|
+
performDeletions: M["performDeletions"] extends true ? true : false;
|
735
|
+
}
|
736
|
+
>
|
737
|
+
: U
|
738
|
+
: U;
|
739
|
+
type UpdateKeys<T, U, M extends MergeObjectOptions> = M extends { overwrite: false }
|
740
|
+
? T
|
741
|
+
: { [K in keyof T]: K extends keyof U ? MergeObjectProperty<T[K], U[K], M> : T[K] };
|
742
|
+
type InsertKeys<T, U> = T & Omit<U, keyof T>;
|
743
|
+
type UpdateInsert<T, U, M extends MergeObjectOptions> = M extends { insertKeys: false }
|
744
|
+
? UpdateKeys<T, U, M>
|
745
|
+
: InsertKeys<UpdateKeys<T, U, M>, U>;
|
746
|
+
|
747
|
+
type WithWidenedArrayTypes<T> =
|
748
|
+
T extends Array<any>
|
749
|
+
? Array<any>
|
750
|
+
: T extends Record<string, any>
|
751
|
+
? { [K in keyof T]: WithWidenedArrayTypes<T[K]> }
|
752
|
+
: T;
|