@7h3laughingman/foundry-types 13.351.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +3 -0
- package/package.json +76 -0
- package/src/client/_module.d.mts +103 -0
- package/src/client/_types.d.mts +900 -0
- package/src/client/applications/_module.d.mts +27 -0
- package/src/client/applications/_types.d.mts +192 -0
- package/src/client/applications/api/_module.d.mts +8 -0
- package/src/client/applications/api/application.d.mts +456 -0
- package/src/client/applications/api/category-browser.d.mts +78 -0
- package/src/client/applications/api/dialog.d.mts +213 -0
- package/src/client/applications/api/document-sheet.d.mts +148 -0
- package/src/client/applications/api/handlebars-application.d.mts +120 -0
- package/src/client/applications/apps/_module.d.mts +10 -0
- package/src/client/applications/apps/av/_module.d.mts +2 -0
- package/src/client/applications/apps/av/camera-popout.d.mts +53 -0
- package/src/client/applications/apps/av/cameras.d.mts +235 -0
- package/src/client/applications/apps/combat-tracker-config.d.mts +27 -0
- package/src/client/applications/apps/compendium-art-config.d.mts +17 -0
- package/src/client/applications/apps/document-ownership.d.mts +17 -0
- package/src/client/applications/apps/document-sheet-config.d.mts +144 -0
- package/src/client/applications/apps/file-picker.d.mts +321 -0
- package/src/client/applications/apps/grid-config.d.mts +33 -0
- package/src/client/applications/apps/image-popout.d.mts +92 -0
- package/src/client/applications/apps/permission-config.d.mts +24 -0
- package/src/client/applications/dice/_module.d.mts +1 -0
- package/src/client/applications/dice/roll-resolver.d.mts +92 -0
- package/src/client/applications/elements/_module.d.mts +19 -0
- package/src/client/applications/elements/codemirror/element.d.mts +73 -0
- package/src/client/applications/elements/color-picker.d.mts +14 -0
- package/src/client/applications/elements/document-embed.d.mts +14 -0
- package/src/client/applications/elements/document-tags.d.mts +50 -0
- package/src/client/applications/elements/enriched-content.d.mts +31 -0
- package/src/client/applications/elements/file-picker.d.mts +59 -0
- package/src/client/applications/elements/form-element.d.mts +105 -0
- package/src/client/applications/elements/hue-slider.d.mts +35 -0
- package/src/client/applications/elements/multi-select.d.mts +89 -0
- package/src/client/applications/elements/prosemirror-editor.d.mts +32 -0
- package/src/client/applications/elements/range-picker.d.mts +23 -0
- package/src/client/applications/elements/secret-block.d.mts +28 -0
- package/src/client/applications/elements/string-tags.d.mts +50 -0
- package/src/client/applications/forms/fields.d.mts +132 -0
- package/src/client/applications/handlebars.d.mts +303 -0
- package/src/client/applications/hud/_module.d.mts +5 -0
- package/src/client/applications/hud/container.d.mts +38 -0
- package/src/client/applications/hud/drawing-hud.d.mts +14 -0
- package/src/client/applications/hud/placeable-hud.d.mts +72 -0
- package/src/client/applications/hud/tile-hud.d.mts +21 -0
- package/src/client/applications/hud/token-hud.d.mts +69 -0
- package/src/client/applications/settings/_module.d.mts +2 -0
- package/src/client/applications/settings/config.d.mts +38 -0
- package/src/client/applications/settings/menus/_module.d.mts +6 -0
- package/src/client/applications/settings/menus/av-config.d.mts +37 -0
- package/src/client/applications/settings/menus/default-sheets-config.d.mts +23 -0
- package/src/client/applications/settings/menus/dice-config.d.mts +23 -0
- package/src/client/applications/settings/menus/font-config.d.mts +145 -0
- package/src/client/applications/settings/menus/prototype-overrides.d.mts +20 -0
- package/src/client/applications/settings/menus/ui-config.d.mts +40 -0
- package/src/client/applications/sheets/_module.d.mts +9 -0
- package/src/client/applications/sheets/combatant-config.d.mts +21 -0
- package/src/client/applications/sheets/item-sheet.d.mts +13 -0
- package/src/client/applications/sheets/scene-config.d.mts +50 -0
- package/src/client/applications/sheets/template-config.d.mts +19 -0
- package/src/client/applications/sheets/token/mixin.mts +182 -0
- package/src/client/applications/sheets/token/prototype-config.d.mts +75 -0
- package/src/client/applications/sheets/token/token-config.d.mts +62 -0
- package/src/client/applications/sheets/user-config.d.mts +27 -0
- package/src/client/applications/sidebar/_module.d.mts +5 -0
- package/src/client/applications/sidebar/apps/_module.d.mts +9 -0
- package/src/client/applications/sidebar/apps/chat-popout.d.mts +45 -0
- package/src/client/applications/sidebar/apps/compendium.d.mts +65 -0
- package/src/client/applications/sidebar/apps/controls-config.d.mts +29 -0
- package/src/client/applications/sidebar/apps/folder-export.d.mts +11 -0
- package/src/client/applications/sidebar/apps/invitation-links.d.mts +10 -0
- package/src/client/applications/sidebar/apps/module-management.d.mts +65 -0
- package/src/client/applications/sidebar/apps/support-details.d.mts +72 -0
- package/src/client/applications/sidebar/apps/tours-management.d.mts +16 -0
- package/src/client/applications/sidebar/apps/world-config.d.mts +38 -0
- package/src/client/applications/sidebar/document-directory.d.mts +327 -0
- package/src/client/applications/sidebar/sidebar-tab.d.mts +89 -0
- package/src/client/applications/sidebar/sidebar.d.mts +93 -0
- package/src/client/applications/sidebar/tabs/_module.d.mts +14 -0
- package/src/client/applications/sidebar/tabs/actor-directory.d.mts +26 -0
- package/src/client/applications/sidebar/tabs/cards-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/chat.d.mts +271 -0
- package/src/client/applications/sidebar/tabs/combat-tracker.d.mts +198 -0
- package/src/client/applications/sidebar/tabs/compendium-directory.d.mts +289 -0
- package/src/client/applications/sidebar/tabs/item-directory.d.mts +24 -0
- package/src/client/applications/sidebar/tabs/journal-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/macro-directory.d.mts +12 -0
- package/src/client/applications/sidebar/tabs/playlist-directory.d.mts +267 -0
- package/src/client/applications/sidebar/tabs/roll-table-directory.d.mts +19 -0
- package/src/client/applications/sidebar/tabs/scene-directory.d.mts +26 -0
- package/src/client/applications/sidebar/tabs/settings.d.mts +16 -0
- package/src/client/applications/ui/_module.d.mts +9 -0
- package/src/client/applications/ui/game-pause.d.mts +15 -0
- package/src/client/applications/ui/hotbar.d.mts +86 -0
- package/src/client/applications/ui/main-menu.d.mts +48 -0
- package/src/client/applications/ui/notifications.d.mts +168 -0
- package/src/client/applications/ui/players.d.mts +92 -0
- package/src/client/applications/ui/region-legend.d.mts +47 -0
- package/src/client/applications/ui/scene-controls.d.mts +138 -0
- package/src/client/applications/ui/scene-navigation.d.mts +61 -0
- package/src/client/applications/ux/_module.d.mts +11 -0
- package/src/client/applications/ux/context-menu.d.mts +202 -0
- package/src/client/applications/ux/drag-drop.d.mts +131 -0
- package/src/client/applications/ux/draggable.d.mts +108 -0
- package/src/client/applications/ux/form-data-extended.d.mts +76 -0
- package/src/client/applications/ux/html-secret.d.mts +61 -0
- package/src/client/applications/ux/prosemirror-editor.d.mts +173 -0
- package/src/client/applications/ux/search-filter.d.mts +119 -0
- package/src/client/applications/ux/tabs.d.mts +94 -0
- package/src/client/applications/ux/text-editor.d.mts +329 -0
- package/src/client/appv1/_module.d.mts +2 -0
- package/src/client/appv1/api/_module.d.mts +8 -0
- package/src/client/appv1/api/application-v1.d.mts +388 -0
- package/src/client/appv1/api/dialog-v1.d.mts +191 -0
- package/src/client/appv1/api/document-sheet-v1.d.mts +96 -0
- package/src/client/appv1/api/form-application-v1.d.mts +203 -0
- package/src/client/appv1/sheets/_module.d.mts +9 -0
- package/src/client/appv1/sheets/actor-sheet.d.mts +129 -0
- package/src/client/appv1/sheets/adventure-importer.d.mts +43 -0
- package/src/client/appv1/sheets/item-sheet.d.mts +42 -0
- package/src/client/appv1/sheets/journal-page-sheet.d.mts +100 -0
- package/src/client/appv1/sheets/journal-sheet.d.mts +262 -0
- package/src/client/audio/_module.d.mts +9 -0
- package/src/client/audio/_types.d.mts +121 -0
- package/src/client/audio/biquad.d.mts +29 -0
- package/src/client/audio/cache.d.mts +58 -0
- package/src/client/audio/convolver.d.mts +50 -0
- package/src/client/audio/helper.d.mts +306 -0
- package/src/client/audio/sound.d.mts +289 -0
- package/src/client/audio/timeout.d.mts +71 -0
- package/src/client/av/_module.d.mts +7 -0
- package/src/client/av/client.d.mts +167 -0
- package/src/client/av/clients/_module.d.mts +1 -0
- package/src/client/av/clients/simplepeer.d.mts +123 -0
- package/src/client/av/master.d.mts +128 -0
- package/src/client/av/settings.d.mts +100 -0
- package/src/client/canvas/_module.d.mts +20 -0
- package/src/client/canvas/animation/_module.d.mts +5 -0
- package/src/client/canvas/animation/_types.d.mts +73 -0
- package/src/client/canvas/animation/canvas-animation.d.mts +114 -0
- package/src/client/canvas/animation/chat-bubbles.d.mts +58 -0
- package/src/client/canvas/animation/smooth-noise.d.mts +34 -0
- package/src/client/canvas/board.d.mts +413 -0
- package/src/client/canvas/containers/_module.d.mts +20 -0
- package/src/client/canvas/containers/_types.d.mts +21 -0
- package/src/client/canvas/containers/advanced/cached-container.d.mts +108 -0
- package/src/client/canvas/containers/advanced/full-canvas-mixin.d.mts +12 -0
- package/src/client/canvas/containers/advanced/full-container-mixin.d.mts +12 -0
- package/src/client/canvas/containers/advanced/unbound-container.d.mts +12 -0
- package/src/client/canvas/containers/elements/control-icon.d.mts +40 -0
- package/src/client/canvas/containers/elements/cursor.d.mts +37 -0
- package/src/client/canvas/containers/elements/door-control.d.mts +66 -0
- package/src/client/canvas/containers/elements/door-mesh.d.mts +127 -0
- package/src/client/canvas/containers/elements/grid-highlight.d.mts +25 -0
- package/src/client/canvas/containers/elements/grid-mesh.d.mts +34 -0
- package/src/client/canvas/containers/elements/particles/leaves.d.mts +15 -0
- package/src/client/canvas/containers/elements/particles/particle-effect.d.mts +45 -0
- package/src/client/canvas/containers/elements/point-source-mesh.d.mts +29 -0
- package/src/client/canvas/containers/elements/precise-text.d.mts +18 -0
- package/src/client/canvas/containers/elements/quad-mesh.d.mts +41 -0
- package/src/client/canvas/containers/elements/resize-handle.d.mts +61 -0
- package/src/client/canvas/containers/elements/sprite-mesh.d.mts +319 -0
- package/src/client/canvas/extensions/_module.d.mts +4 -0
- package/src/client/canvas/extensions/circle-extension.d.mts +4 -0
- package/src/client/canvas/extensions/graphics-extension.d.mts +5 -0
- package/src/client/canvas/extensions/polygon-extension.d.mts +4 -0
- package/src/client/canvas/extensions/rectangle-extension.d.mts +4 -0
- package/src/client/canvas/framebuffer-snapshot.d.mts +20 -0
- package/src/client/canvas/geometry/_module.d.mts +12 -0
- package/src/client/canvas/geometry/_types.d.mts +90 -0
- package/src/client/canvas/geometry/clockwise-sweep.d.mts +129 -0
- package/src/client/canvas/geometry/edges/_module.d.mts +5 -0
- package/src/client/canvas/geometry/edges/collision.d.mts +58 -0
- package/src/client/canvas/geometry/edges/edge.d.mts +144 -0
- package/src/client/canvas/geometry/edges/edges.d.mts +14 -0
- package/src/client/canvas/geometry/edges/vertex.d.mts +85 -0
- package/src/client/canvas/geometry/observable-transform.d.mts +28 -0
- package/src/client/canvas/geometry/quad-tree.d.mts +150 -0
- package/src/client/canvas/geometry/shapes/limited-angle-polygon.d.mts +69 -0
- package/src/client/canvas/geometry/shapes/polygon-mesher.d.mts +50 -0
- package/src/client/canvas/geometry/shapes/ray.d.mts +126 -0
- package/src/client/canvas/geometry/shapes/source-polygon.d.mts +161 -0
- package/src/client/canvas/geometry/unbound-transform.d.mts +9 -0
- package/src/client/canvas/geometry/weiler-atherton-clipping.d.mts +120 -0
- package/src/client/canvas/groups/_module.d.mts +10 -0
- package/src/client/canvas/groups/canvas-group-mixin.mts +95 -0
- package/src/client/canvas/groups/effects.d.mts +118 -0
- package/src/client/canvas/groups/environment.d.mts +79 -0
- package/src/client/canvas/groups/hidden.d.mts +42 -0
- package/src/client/canvas/groups/interface.d.mts +31 -0
- package/src/client/canvas/groups/overlay.d.mts +11 -0
- package/src/client/canvas/groups/primary.d.mts +223 -0
- package/src/client/canvas/groups/rendered.d.mts +7 -0
- package/src/client/canvas/groups/visibility.d.mts +154 -0
- package/src/client/canvas/interaction/_module.d.mts +15 -0
- package/src/client/canvas/interaction/_types.d.mts +67 -0
- package/src/client/canvas/interaction/mouse-handler.d.mts +231 -0
- package/src/client/canvas/interaction/ping/alert.d.mts +16 -0
- package/src/client/canvas/interaction/ping/arrow.d.mts +16 -0
- package/src/client/canvas/interaction/ping/chevron.d.mts +25 -0
- package/src/client/canvas/interaction/ping/ping.d.mts +35 -0
- package/src/client/canvas/interaction/ping/pulse.d.mts +28 -0
- package/src/client/canvas/interaction/render-flags.d.mts +69 -0
- package/src/client/canvas/interaction/ruler/base-ruler.d.mts +179 -0
- package/src/client/canvas/interaction/ruler/ruler.d.mts +56 -0
- package/src/client/canvas/layers/_module.d.mts +31 -0
- package/src/client/canvas/layers/_types.d.mts +89 -0
- package/src/client/canvas/layers/base/canvas-layer.d.mts +71 -0
- package/src/client/canvas/layers/base/interaction-layer.d.mts +176 -0
- package/src/client/canvas/layers/base/placeables-layer.d.mts +410 -0
- package/src/client/canvas/layers/controls.d.mts +181 -0
- package/src/client/canvas/layers/drawings.d.mts +75 -0
- package/src/client/canvas/layers/effects/background-effects.d.mts +32 -0
- package/src/client/canvas/layers/effects/coloration-effects.d.mts +23 -0
- package/src/client/canvas/layers/effects/darkness-effects.d.mts +14 -0
- package/src/client/canvas/layers/effects/illumination-effects.d.mts +72 -0
- package/src/client/canvas/layers/effects/weather-effects.d.mts +137 -0
- package/src/client/canvas/layers/grid.d.mts +112 -0
- package/src/client/canvas/layers/lighting.d.mts +59 -0
- package/src/client/canvas/layers/masks/depth.d.mts +53 -0
- package/src/client/canvas/layers/masks/occlusion.d.mts +84 -0
- package/src/client/canvas/layers/masks/vision.d.mts +44 -0
- package/src/client/canvas/layers/notes.d.mts +59 -0
- package/src/client/canvas/layers/regions.d.mts +70 -0
- package/src/client/canvas/layers/sounds.d.mts +190 -0
- package/src/client/canvas/layers/templates.d.mts +41 -0
- package/src/client/canvas/layers/tiles.d.mts +66 -0
- package/src/client/canvas/layers/tokens.d.mts +171 -0
- package/src/client/canvas/layers/walls.d.mts +99 -0
- package/src/client/canvas/loader.d.mts +135 -0
- package/src/client/canvas/perception/_module.d.mts +13 -0
- package/src/client/canvas/perception/_types.d.mts +61 -0
- package/src/client/canvas/perception/detection-mode.d.mts +122 -0
- package/src/client/canvas/perception/detection-modes/darkvision.d.mts +11 -0
- package/src/client/canvas/perception/detection-modes/invisibility-perception.d.mts +15 -0
- package/src/client/canvas/perception/detection-modes/light-perception.d.mts +18 -0
- package/src/client/canvas/perception/detection-modes/super-perception.d.mts +13 -0
- package/src/client/canvas/perception/detection-modes/tremor-perception.d.mts +13 -0
- package/src/client/canvas/perception/fog.d.mts +65 -0
- package/src/client/canvas/perception/perception-manager.d.mts +72 -0
- package/src/client/canvas/perception/vision-mode.d.mts +133 -0
- package/src/client/canvas/placeables/_module.d.mts +15 -0
- package/src/client/canvas/placeables/_types.d.mts +29 -0
- package/src/client/canvas/placeables/drawing.d.mts +106 -0
- package/src/client/canvas/placeables/light.d.mts +155 -0
- package/src/client/canvas/placeables/note.d.mts +61 -0
- package/src/client/canvas/placeables/placeable-object.d.mts +415 -0
- package/src/client/canvas/placeables/region.d.mts +129 -0
- package/src/client/canvas/placeables/regions/_module.d.mts +2 -0
- package/src/client/canvas/placeables/regions/geometry.d.mts +19 -0
- package/src/client/canvas/placeables/regions/mesh.d.mts +72 -0
- package/src/client/canvas/placeables/sound.d.mts +93 -0
- package/src/client/canvas/placeables/template.d.mts +164 -0
- package/src/client/canvas/placeables/tile.d.mts +189 -0
- package/src/client/canvas/placeables/token.d.mts +675 -0
- package/src/client/canvas/placeables/tokens/_module.d.mts +8 -0
- package/src/client/canvas/placeables/tokens/base-ruler.d.mts +68 -0
- package/src/client/canvas/placeables/tokens/ring-config.d.mts +201 -0
- package/src/client/canvas/placeables/tokens/ring-data.d.mts +56 -0
- package/src/client/canvas/placeables/tokens/ring.d.mts +194 -0
- package/src/client/canvas/placeables/tokens/ruler.d.mts +96 -0
- package/src/client/canvas/placeables/tokens/targets.d.mts +22 -0
- package/src/client/canvas/placeables/tokens/turn-marker-data.d.mts +52 -0
- package/src/client/canvas/placeables/tokens/turn-marker.d.mts +45 -0
- package/src/client/canvas/placeables/wall.d.mts +155 -0
- package/src/client/canvas/primary/_module.d.mts +7 -0
- package/src/client/canvas/primary/primary-canvas-container.d.mts +40 -0
- package/src/client/canvas/primary/primary-canvas-object.mts +215 -0
- package/src/client/canvas/primary/primary-graphics.d.mts +22 -0
- package/src/client/canvas/primary/primary-occludable-object.mts +139 -0
- package/src/client/canvas/primary/primary-particle-effect.d.mts +50 -0
- package/src/client/canvas/primary/primary-sprite-mesh.d.mts +127 -0
- package/src/client/canvas/rendering/_module.d.mts +5 -0
- package/src/client/canvas/rendering/batching/_module.d.mts +2 -0
- package/src/client/canvas/rendering/batching/batch-renderer.d.mts +71 -0
- package/src/client/canvas/rendering/batching/batch-shader-generator.d.mts +13 -0
- package/src/client/canvas/rendering/blend-modes.d.mts +37 -0
- package/src/client/canvas/rendering/filters/_module.d.mts +13 -0
- package/src/client/canvas/rendering/filters/base-filter.d.mts +28 -0
- package/src/client/canvas/rendering/filters/base-mask-filter.d.mts +14 -0
- package/src/client/canvas/rendering/filters/blur.d.mts +152 -0
- package/src/client/canvas/rendering/filters/effects-masking.d.mts +84 -0
- package/src/client/canvas/rendering/filters/environment.d.mts +22 -0
- package/src/client/canvas/rendering/filters/glow-overlay.d.mts +41 -0
- package/src/client/canvas/rendering/filters/invisibility.d.mts +11 -0
- package/src/client/canvas/rendering/filters/outline-overlay.d.mts +43 -0
- package/src/client/canvas/rendering/filters/smaa/_module.d.mts +4 -0
- package/src/client/canvas/rendering/filters/smaa/blend.d.mts +6 -0
- package/src/client/canvas/rendering/filters/smaa/edges.d.mts +11 -0
- package/src/client/canvas/rendering/filters/smaa/smaa.d.mts +102 -0
- package/src/client/canvas/rendering/filters/smaa/weights.d.mts +11 -0
- package/src/client/canvas/rendering/filters/transition.d.mts +97 -0
- package/src/client/canvas/rendering/filters/visibility.d.mts +46 -0
- package/src/client/canvas/rendering/filters/vision-mask-filter.d.mts +15 -0
- package/src/client/canvas/rendering/filters/void.d.mts +6 -0
- package/src/client/canvas/rendering/filters/weather-occlusion-mask.d.mts +30 -0
- package/src/client/canvas/rendering/mixins/_module.d.mts +2 -0
- package/src/client/canvas/rendering/mixins/base-shader-mixin.d.mts +118 -0
- package/src/client/canvas/rendering/mixins/fragment-channel-mixin.d.mts +21 -0
- package/src/client/canvas/rendering/shaders/_module.d.mts +80 -0
- package/src/client/canvas/rendering/shaders/_types.d.mts +98 -0
- package/src/client/canvas/rendering/shaders/base-shader.d.mts +58 -0
- package/src/client/canvas/rendering/shaders/graphics/dash-line.d.mts +13 -0
- package/src/client/canvas/rendering/shaders/grid/grid.d.mts +99 -0
- package/src/client/canvas/rendering/shaders/lighting/background-lighting.d.mts +50 -0
- package/src/client/canvas/rendering/shaders/lighting/base-lighting.d.mts +164 -0
- package/src/client/canvas/rendering/shaders/lighting/coloration-lighting.d.mts +48 -0
- package/src/client/canvas/rendering/shaders/lighting/darkness-lighting.d.mts +45 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/bewitching-wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/black-hole.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/chroma.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/emanation.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/energy-field.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/fairy-light.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/flame.d.mts +75 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/fog.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/force-grid.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/ghost-light.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/hexa-dome.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/light-dome.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/magical-gloom.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/pulse.d.mts +41 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/radial-rainbow.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/revolving-light.d.mts +38 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/roiling-mass.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/siren-light.d.mts +80 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/smoke-patch.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/star-light.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/sunburst.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/swirling-rainbow.d.mts +5 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/torch.d.mts +41 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/vortex.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/effects/wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/lighting/illumination-lighting.d.mts +51 -0
- package/src/client/canvas/rendering/shaders/region/adjust-darkness-level.d.mts +58 -0
- package/src/client/canvas/rendering/shaders/region/base.d.mts +20 -0
- package/src/client/canvas/rendering/shaders/region/highlight.d.mts +18 -0
- package/src/client/canvas/rendering/shaders/samplers/amplification.d.mts +30 -0
- package/src/client/canvas/rendering/shaders/samplers/base-sampler.d.mts +141 -0
- package/src/client/canvas/rendering/shaders/samplers/baseline-illumination.d.mts +15 -0
- package/src/client/canvas/rendering/shaders/samplers/color-adjustments.d.mts +36 -0
- package/src/client/canvas/rendering/shaders/samplers/colorize-brightness.d.mts +17 -0
- package/src/client/canvas/rendering/shaders/samplers/fog-of-war.d.mts +9 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/depth.d.mts +66 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/occlusion.d.mts +77 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/primary.d.mts +28 -0
- package/src/client/canvas/rendering/shaders/samplers/primary/token-ring.d.mts +33 -0
- package/src/client/canvas/rendering/shaders/vision/background-vision.d.mts +47 -0
- package/src/client/canvas/rendering/shaders/vision/base-vision.d.mts +11 -0
- package/src/client/canvas/rendering/shaders/vision/coloration-vision.d.mts +43 -0
- package/src/client/canvas/rendering/shaders/vision/effects/amplification.d.mts +35 -0
- package/src/client/canvas/rendering/shaders/vision/effects/wave.d.mts +10 -0
- package/src/client/canvas/rendering/shaders/vision/illumination-vision.d.mts +45 -0
- package/src/client/canvas/rendering/shaders/weather/base-weather.d.mts +87 -0
- package/src/client/canvas/rendering/shaders/weather/effect.d.mts +27 -0
- package/src/client/canvas/rendering/shaders/weather/fog.d.mts +26 -0
- package/src/client/canvas/rendering/shaders/weather/rain.d.mts +16 -0
- package/src/client/canvas/rendering/shaders/weather/snow.d.mts +12 -0
- package/src/client/canvas/scene-manager.d.mts +101 -0
- package/src/client/canvas/sources/_module.d.mts +10 -0
- package/src/client/canvas/sources/base-effect-source.d.mts +179 -0
- package/src/client/canvas/sources/base-light-source.d.mts +141 -0
- package/src/client/canvas/sources/global-light-source.d.mts +36 -0
- package/src/client/canvas/sources/point-darkness-source.d.mts +87 -0
- package/src/client/canvas/sources/point-effect-source.d.mts +105 -0
- package/src/client/canvas/sources/point-light-source.d.mts +54 -0
- package/src/client/canvas/sources/point-movement-source.d.mts +10 -0
- package/src/client/canvas/sources/point-sound-source.d.mts +29 -0
- package/src/client/canvas/sources/point-vision-source.d.mts +151 -0
- package/src/client/canvas/sources/rendered-effect-source.d.mts +214 -0
- package/src/client/canvas/texture-extractor.d.mts +98 -0
- package/src/client/canvas/workers/_module.d.mts +1 -0
- package/src/client/canvas/workers/texture-worker.d.mts +73 -0
- package/src/client/client.d.mts +15 -0
- package/src/client/config.d.mts +868 -0
- package/src/client/data/_module.d.mts +11 -0
- package/src/client/data/_types.d.mts +97 -0
- package/src/client/data/calendar.d.mts +175 -0
- package/src/client/data/client-backend.d.mts +82 -0
- package/src/client/data/combat-config.d.mts +84 -0
- package/src/client/data/region-behaviors/_module.d.mts +9 -0
- package/src/client/data/region-behaviors/adjust-darkness-level.d.mts +29 -0
- package/src/client/data/region-behaviors/base.d.mts +70 -0
- package/src/client/data/region-behaviors/execute-macro.d.mts +17 -0
- package/src/client/data/region-behaviors/execute-script.d.mts +15 -0
- package/src/client/data/region-behaviors/increase-movement-cost.d.mts +36 -0
- package/src/client/data/region-behaviors/pause-game.d.mts +15 -0
- package/src/client/data/region-behaviors/suppress-weather.d.mts +13 -0
- package/src/client/data/region-behaviors/teleport-token.d.mts +27 -0
- package/src/client/data/region-behaviors/toggle-behavior.d.mts +19 -0
- package/src/client/data/region-shapes/_module.d.mts +2 -0
- package/src/client/data/region-shapes/polygon-tree.d.mts +101 -0
- package/src/client/data/region-shapes/shape.d.mts +97 -0
- package/src/client/data/terrain-data.d.mts +70 -0
- package/src/client/dice/_module.d.mts +14 -0
- package/src/client/dice/_types.d.mts +89 -0
- package/src/client/dice/parser.d.mts +83 -0
- package/src/client/dice/roll.d.mts +542 -0
- package/src/client/dice/terms/_module.d.mts +16 -0
- package/src/client/dice/terms/_types.d.mts +10 -0
- package/src/client/dice/terms/coin.d.mts +35 -0
- package/src/client/dice/terms/dice.d.mts +263 -0
- package/src/client/dice/terms/die.d.mts +199 -0
- package/src/client/dice/terms/fate.d.mts +22 -0
- package/src/client/dice/terms/function.d.mts +60 -0
- package/src/client/dice/terms/numeric.d.mts +39 -0
- package/src/client/dice/terms/operator.d.mts +28 -0
- package/src/client/dice/terms/parenthetical.d.mts +70 -0
- package/src/client/dice/terms/pool.d.mts +170 -0
- package/src/client/dice/terms/string.d.mts +23 -0
- package/src/client/dice/terms/term.d.mts +135 -0
- package/src/client/dice/twister.d.mts +87 -0
- package/src/client/documents/_module.d.mts +70 -0
- package/src/client/documents/_types.d.mts +736 -0
- package/src/client/documents/abstract/_module.d.mts +6 -0
- package/src/client/documents/abstract/canvas-document.d.mts +65 -0
- package/src/client/documents/abstract/client-document.d.mts +545 -0
- package/src/client/documents/abstract/directory-collection-mixin.d.mts +79 -0
- package/src/client/documents/abstract/document-collection.d.mts +124 -0
- package/src/client/documents/abstract/world-collection.d.mts +157 -0
- package/src/client/documents/active-effect.d.mts +203 -0
- package/src/client/documents/actor-delta.d.mts +76 -0
- package/src/client/documents/actor.d.mts +269 -0
- package/src/client/documents/adventure.d.mts +38 -0
- package/src/client/documents/ambient-light.d.mts +34 -0
- package/src/client/documents/ambient-sound.d.mts +16 -0
- package/src/client/documents/card.d.mts +102 -0
- package/src/client/documents/cards.d.mts +38 -0
- package/src/client/documents/chat-message.d.mts +190 -0
- package/src/client/documents/collections/_module.d.mts +19 -0
- package/src/client/documents/collections/actors.d.mts +28 -0
- package/src/client/documents/collections/card-stacks.d.mts +14 -0
- package/src/client/documents/collections/chat-messages.d.mts +29 -0
- package/src/client/documents/collections/combat-encounters.d.mts +32 -0
- package/src/client/documents/collections/compendium-collection.d.mts +170 -0
- package/src/client/documents/collections/compendium-folders.d.mts +30 -0
- package/src/client/documents/collections/compendium-packs.d.mts +23 -0
- package/src/client/documents/collections/fog-explorations.d.mts +19 -0
- package/src/client/documents/collections/folders.d.mts +20 -0
- package/src/client/documents/collections/items.d.mts +13 -0
- package/src/client/documents/collections/journal.d.mts +24 -0
- package/src/client/documents/collections/macros.d.mts +15 -0
- package/src/client/documents/collections/playlists.d.mts +28 -0
- package/src/client/documents/collections/roll-tables.d.mts +20 -0
- package/src/client/documents/collections/scenes.d.mts +60 -0
- package/src/client/documents/collections/users.d.mts +57 -0
- package/src/client/documents/collections/world-settings.d.mts +34 -0
- package/src/client/documents/combat.d.mts +371 -0
- package/src/client/documents/combatant-group.d.mts +42 -0
- package/src/client/documents/combatant.d.mts +125 -0
- package/src/client/documents/drawing.d.mts +27 -0
- package/src/client/documents/fog-exploration.d.mts +30 -0
- package/src/client/documents/folder.d.mts +124 -0
- package/src/client/documents/item.d.mts +73 -0
- package/src/client/documents/journal-entry-category.d.mts +15 -0
- package/src/client/documents/journal-entry-page.d.mts +77 -0
- package/src/client/documents/journal-entry.d.mts +78 -0
- package/src/client/documents/macro.d.mts +56 -0
- package/src/client/documents/measured-template.d.mts +41 -0
- package/src/client/documents/note.d.mts +28 -0
- package/src/client/documents/playlist-sound.d.mts +107 -0
- package/src/client/documents/playlist.d.mts +163 -0
- package/src/client/documents/region-behavior.d.mts +55 -0
- package/src/client/documents/region.d.mts +98 -0
- package/src/client/documents/roll-table.d.mts +172 -0
- package/src/client/documents/scene.d.mts +282 -0
- package/src/client/documents/setting.d.mts +35 -0
- package/src/client/documents/table-result.d.mts +35 -0
- package/src/client/documents/tile.d.mts +22 -0
- package/src/client/documents/token.d.mts +621 -0
- package/src/client/documents/user.d.mts +148 -0
- package/src/client/documents/wall.d.mts +20 -0
- package/src/client/game.d.mts +231 -0
- package/src/client/global.d.mts +28 -0
- package/src/client/helpers/_module.d.mts +13 -0
- package/src/client/helpers/_types.d.mts +26 -0
- package/src/client/helpers/client-issues.d.mts +90 -0
- package/src/client/helpers/client-settings.d.mts +191 -0
- package/src/client/helpers/document-index.d.mts +81 -0
- package/src/client/helpers/hooks.d.mts +210 -0
- package/src/client/helpers/interaction/_module.d.mts +6 -0
- package/src/client/helpers/interaction/client-keybindings.d.mts +143 -0
- package/src/client/helpers/interaction/clipboard-helper.d.mts +14 -0
- package/src/client/helpers/interaction/gamepad-manager.d.mts +15 -0
- package/src/client/helpers/interaction/keyboard-manager.d.mts +189 -0
- package/src/client/helpers/interaction/mouse-manager.d.mts +20 -0
- package/src/client/helpers/interaction/tooltip-manager.d.mts +227 -0
- package/src/client/helpers/localization.d.mts +143 -0
- package/src/client/helpers/media/_module.d.mts +3 -0
- package/src/client/helpers/media/compendium-art.d.mts +29 -0
- package/src/client/helpers/media/image-helper.d.mts +116 -0
- package/src/client/helpers/media/video-helper.d.mts +113 -0
- package/src/client/helpers/socket-interface.d.mts +14 -0
- package/src/client/helpers/time.d.mts +92 -0
- package/src/client/helpers/workers.d.mts +92 -0
- package/src/client/nue/_module.d.mts +13 -0
- package/src/client/nue/nue-manager.d.mts +13 -0
- package/src/client/nue/tour.d.mts +283 -0
- package/src/client/nue/tours/_module.d.mts +1 -0
- package/src/client/nue/tours-collection.d.mts +23 -0
- package/src/client/packages/_module.d.mts +19 -0
- package/src/client/packages/_types.d.mts +12 -0
- package/src/client/packages/client-package.mts +145 -0
- package/src/client/packages/module.d.mts +12 -0
- package/src/client/packages/system.d.mts +9 -0
- package/src/client/packages/world.d.mts +28 -0
- package/src/client/ui.d.mts +86 -0
- package/src/client/utils/_module.d.mts +4 -0
- package/src/client/utils/helpers.d.mts +148 -0
- package/src/common/_types.d.mts +151 -0
- package/src/common/abstract/_module.d.mts +8 -0
- package/src/common/abstract/_types.d.mts +187 -0
- package/src/common/abstract/backend.d.mts +159 -0
- package/src/common/abstract/data.d.mts +213 -0
- package/src/common/abstract/document.d.mts +700 -0
- package/src/common/abstract/embedded-collection.d.mts +141 -0
- package/src/common/abstract/socket.d.mts +35 -0
- package/src/common/abstract/type-data.d.mts +163 -0
- package/src/common/config.d.mts +147 -0
- package/src/common/constants.d.mts +2184 -0
- package/src/common/data/_module.d.mts +6 -0
- package/src/common/data/_types.d.mts +329 -0
- package/src/common/data/data.d.mts +390 -0
- package/src/common/data/fields.d.mts +1377 -0
- package/src/common/data/validation-failure.d.mts +127 -0
- package/src/common/data/validators.d.mts +35 -0
- package/src/common/documents/_module.d.mts +64 -0
- package/src/common/documents/_types.d.mts +1 -0
- package/src/common/documents/active-effect.d.mts +87 -0
- package/src/common/documents/actor-delta.d.mts +81 -0
- package/src/common/documents/actor.d.mts +105 -0
- package/src/common/documents/adventure.d.mts +105 -0
- package/src/common/documents/ambient-light.d.mts +49 -0
- package/src/common/documents/ambient-sound.d.mts +72 -0
- package/src/common/documents/card.d.mts +98 -0
- package/src/common/documents/cards.d.mts +89 -0
- package/src/common/documents/chat-message.d.mts +107 -0
- package/src/common/documents/combat.d.mts +55 -0
- package/src/common/documents/combatant-group.d.mts +45 -0
- package/src/common/documents/combatant.d.mts +48 -0
- package/src/common/documents/drawing.d.mts +101 -0
- package/src/common/documents/fog-exploration.d.mts +50 -0
- package/src/common/documents/folder.d.mts +65 -0
- package/src/common/documents/item.d.mts +86 -0
- package/src/common/documents/journal-entry-category.d.mts +32 -0
- package/src/common/documents/journal-entry-page.d.mts +76 -0
- package/src/common/documents/journal-entry.d.mts +50 -0
- package/src/common/documents/macro.d.mts +87 -0
- package/src/common/documents/measured-template.d.mts +72 -0
- package/src/common/documents/note.d.mts +82 -0
- package/src/common/documents/playlist-sound.d.mts +53 -0
- package/src/common/documents/playlist.d.mts +48 -0
- package/src/common/documents/region-behavior.d.mts +49 -0
- package/src/common/documents/region.d.mts +61 -0
- package/src/common/documents/roll-table.d.mts +70 -0
- package/src/common/documents/scene.d.mts +237 -0
- package/src/common/documents/setting.d.mts +49 -0
- package/src/common/documents/table-result.d.mts +61 -0
- package/src/common/documents/tile.d.mts +88 -0
- package/src/common/documents/token.d.mts +213 -0
- package/src/common/documents/user.d.mts +82 -0
- package/src/common/documents/wall.d.mts +72 -0
- package/src/common/grid/_module.d.mts +6 -0
- package/src/common/grid/_types.d.mts +250 -0
- package/src/common/grid/base.d.mts +266 -0
- package/src/common/grid/grid-hex.d.mts +53 -0
- package/src/common/grid/gridless.d.mts +85 -0
- package/src/common/grid/hexagonal.d.mts +191 -0
- package/src/common/grid/square.d.mts +90 -0
- package/src/common/packages/_module.d.mts +6 -0
- package/src/common/packages/_types.d.mts +7 -0
- package/src/common/packages/base-module.d.mts +32 -0
- package/src/common/packages/base-package.d.mts +297 -0
- package/src/common/packages/base-system.d.mts +42 -0
- package/src/common/packages/base-world.d.mts +51 -0
- package/src/common/packages/sub-types.d.mts +12 -0
- package/src/common/primitives/_module.d.mts +10 -0
- package/src/common/primitives/array.d.mts +58 -0
- package/src/common/primitives/date.d.mts +24 -0
- package/src/common/primitives/math.d.mts +70 -0
- package/src/common/primitives/number.d.mts +79 -0
- package/src/common/primitives/regexp.d.mts +12 -0
- package/src/common/primitives/set.d.mts +129 -0
- package/src/common/primitives/string.d.mts +24 -0
- package/src/common/primitives/url.d.mts +12 -0
- package/src/common/prosemirror/_module.d.mts +77 -0
- package/src/common/prosemirror/_types.d.mts +75 -0
- package/src/common/prosemirror/click-handler.d.mts +24 -0
- package/src/common/prosemirror/content-link-plugin.d.mts +34 -0
- package/src/common/prosemirror/dirty-plugin.d.mts +10 -0
- package/src/common/prosemirror/dom-parser.d.mts +7 -0
- package/src/common/prosemirror/dropdown.d.mts +50 -0
- package/src/common/prosemirror/highlight-matches-plugin.d.mts +38 -0
- package/src/common/prosemirror/image-plugin.d.mts +70 -0
- package/src/common/prosemirror/input-rules.d.mts +24 -0
- package/src/common/prosemirror/keymaps.d.mts +27 -0
- package/src/common/prosemirror/menu.d.mts +206 -0
- package/src/common/prosemirror/paste-transformer.d.mts +10 -0
- package/src/common/prosemirror/plugin.d.mts +21 -0
- package/src/common/prosemirror/schema/_types.d.mts +15 -0
- package/src/common/prosemirror/schema/attribute-capture.d.mts +13 -0
- package/src/common/prosemirror/schema/core.d.mts +58 -0
- package/src/common/prosemirror/schema/image-link-node.d.mts +27 -0
- package/src/common/prosemirror/schema/image-node.d.mts +17 -0
- package/src/common/prosemirror/schema/link-mark.d.mts +29 -0
- package/src/common/prosemirror/schema/lists.d.mts +71 -0
- package/src/common/prosemirror/schema/marks.d.mts +49 -0
- package/src/common/prosemirror/schema/other.d.mts +161 -0
- package/src/common/prosemirror/schema/schema-definition.d.mts +43 -0
- package/src/common/prosemirror/schema/secret-node.d.mts +25 -0
- package/src/common/prosemirror/schema/tables.d.mts +161 -0
- package/src/common/prosemirror/schema/utils.d.mts +37 -0
- package/src/common/prosemirror/schema.d.mts +7 -0
- package/src/common/prosemirror/string-serializer.d.mts +84 -0
- package/src/common/prosemirror/util.d.mts +32 -0
- package/src/common/utils/_module.d.mts +19 -0
- package/src/common/utils/_types.d.mts +83 -0
- package/src/common/utils/bitmask.d.mts +122 -0
- package/src/common/utils/collection.d.mts +148 -0
- package/src/common/utils/color.d.mts +308 -0
- package/src/common/utils/event-emitter.d.mts +36 -0
- package/src/common/utils/geometry.d.mts +94 -0
- package/src/common/utils/helpers.d.mts +396 -0
- package/src/common/utils/http.d.mts +40 -0
- package/src/common/utils/iterable-weak-map.d.mts +26 -0
- package/src/common/utils/iterable-weak-set.d.mts +1 -0
- package/src/common/utils/logging.d.mts +25 -0
- package/src/common/utils/semaphore.d.mts +59 -0
- package/src/common/utils/string-tree.d.mts +60 -0
- package/src/common/utils/word-tree.d.mts +34 -0
- package/src/global-external.d.mts +48 -0
- package/src/index.d.ts +87 -0
- package/src/public/scripts/clipper.d.mts +920 -0
- package/src/tinymce-stub.d.mts +123 -0
- package/src/util.d.mts +67 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApplicationClosingOptions,
|
|
3
|
+
ApplicationConfiguration,
|
|
4
|
+
ApplicationRenderContext,
|
|
5
|
+
ApplicationTab,
|
|
6
|
+
ApplicationTabsConfiguration,
|
|
7
|
+
FormFooterButton,
|
|
8
|
+
} from "../_types.mjs";
|
|
9
|
+
import { HandlebarsApplicationMixin, HandlebarsRenderOptions, HandlebarsTemplatePart } from "../api/_module.mjs";
|
|
10
|
+
import ApplicationV2 from "../api/application.mjs";
|
|
11
|
+
import User from "./../../documents/user.mjs";
|
|
12
|
+
|
|
13
|
+
export type FilePickerSource = "data" | "public" | "s3";
|
|
14
|
+
|
|
15
|
+
export type FilePickerFileType = (typeof FilePicker.FILE_TYPES)[number];
|
|
16
|
+
|
|
17
|
+
type FilerPickerDisplayMode = (typeof FilePicker.DISPLAY_MODES)[number];
|
|
18
|
+
|
|
19
|
+
export interface FilePickerConfiguration extends ApplicationConfiguration {
|
|
20
|
+
/** A type of file to target. Default: `"any"` */
|
|
21
|
+
type?: FilePickerFileType;
|
|
22
|
+
/** A current file source in "data", "public", or "s3". */
|
|
23
|
+
activeSource?: FilePickerSource;
|
|
24
|
+
/** A callback function to trigger once a file has been selected */
|
|
25
|
+
callback?: (path: string, filePicker: FilePicker) => void;
|
|
26
|
+
/** The current file path being modified, if any */
|
|
27
|
+
current?: string;
|
|
28
|
+
/** A flag which permits explicitly disallowing upload, `true` by default */
|
|
29
|
+
allowUpload?: boolean;
|
|
30
|
+
/** An HTML form field that the result of this selection is applied to */
|
|
31
|
+
field?: HTMLElement;
|
|
32
|
+
/** An HTML button element which triggers the display of this picker */
|
|
33
|
+
button?: HTMLButtonElement;
|
|
34
|
+
/** */
|
|
35
|
+
favorites?: Record<string, FavoriteFolder>;
|
|
36
|
+
/** The picker display mode in FilePicker.DISPLAY_MODES */
|
|
37
|
+
displayMode?: string;
|
|
38
|
+
/** Display the tile size configuration. */
|
|
39
|
+
tileSize?: boolean;
|
|
40
|
+
/** Redirect to the root directory rather than starting in the source directory of one of these files. */
|
|
41
|
+
redirectToRoot?: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface FavoriteFolder {
|
|
45
|
+
/** The source of the folder (e.g. "data", "public") */
|
|
46
|
+
source: FilePickerSource;
|
|
47
|
+
/** The full path to the folder */
|
|
48
|
+
path: string;
|
|
49
|
+
/** The label for the path */
|
|
50
|
+
label: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface FilePickerManageFilesResult {
|
|
54
|
+
dirs: string[];
|
|
55
|
+
extensions: string[];
|
|
56
|
+
files: string[];
|
|
57
|
+
gridSize: number | null;
|
|
58
|
+
private: boolean;
|
|
59
|
+
privateDirs: string[];
|
|
60
|
+
target: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface FilePickerUploadResponse {
|
|
64
|
+
message: string;
|
|
65
|
+
path: string;
|
|
66
|
+
status: "success" | "error";
|
|
67
|
+
error?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface FilePickerContext extends ApplicationRenderContext {
|
|
71
|
+
rootId: string;
|
|
72
|
+
bucket?: string | null;
|
|
73
|
+
buckets: string[] | null;
|
|
74
|
+
canGoBack: boolean;
|
|
75
|
+
canCreateFolder: boolean;
|
|
76
|
+
canUpload: boolean;
|
|
77
|
+
canSelect: boolean;
|
|
78
|
+
dirs: string[];
|
|
79
|
+
displayMode: FilerPickerDisplayMode;
|
|
80
|
+
extensions: string[];
|
|
81
|
+
files: string[];
|
|
82
|
+
isS3: boolean;
|
|
83
|
+
noResults: boolean;
|
|
84
|
+
selected: string;
|
|
85
|
+
source: { target: string; bucket?: string; buckets?: string[] };
|
|
86
|
+
sources: FilePicker["sources"];
|
|
87
|
+
target: string;
|
|
88
|
+
tileSize: number | null;
|
|
89
|
+
user: User;
|
|
90
|
+
favorites: Record<string, FavoriteFolder>;
|
|
91
|
+
buttons: FormFooterButton[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The FilePicker application renders contents of the server-side public directory.
|
|
96
|
+
* This app allows for navigating and uploading files to the public path.
|
|
97
|
+
*/
|
|
98
|
+
export default class FilePicker extends HandlebarsApplicationMixin(ApplicationV2<FilePickerConfiguration, HandlebarsRenderOptions, FilePickerContext>) {
|
|
99
|
+
static override DEFAULT_OPTIONS: DeepPartial<ApplicationConfiguration>;
|
|
100
|
+
|
|
101
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
102
|
+
|
|
103
|
+
static override TABS: Record<string, ApplicationTabsConfiguration>;
|
|
104
|
+
|
|
105
|
+
/** The allowed values for the type of this FilePicker instance. */
|
|
106
|
+
static FILE_TYPES: ["any", "audio", "folder", "font", "graphics", "image", "imagevideo", "text", "video"];
|
|
107
|
+
|
|
108
|
+
/** Record the last-browsed directory path so that re-opening a different FilePicker instance uses the same target */
|
|
109
|
+
static LAST_BROWSED_DIRECTORY: string;
|
|
110
|
+
|
|
111
|
+
/** Record the last-configured tile size which can automatically be applied to new FilePicker instances */
|
|
112
|
+
static LAST_TILE_SIZE: number | null;
|
|
113
|
+
|
|
114
|
+
/** Record the last-configured display mode so that re-opening a different FilePicker instance uses the same mode. */
|
|
115
|
+
static LAST_DISPLAY_MODE: FilerPickerDisplayMode;
|
|
116
|
+
|
|
117
|
+
/** Enumerate the allowed FilePicker display modes */
|
|
118
|
+
static DISPLAY_MODES: ["list", "thumbs", "tiles", "images"];
|
|
119
|
+
|
|
120
|
+
/** Cache the names of S3 buckets which can be used */
|
|
121
|
+
static S3_BUCKETS: string[] | null;
|
|
122
|
+
|
|
123
|
+
/** Return the upload URL to which the FilePicker should post uploaded files */
|
|
124
|
+
static get uploadURL(): string;
|
|
125
|
+
|
|
126
|
+
/** Retrieve the configured FilePicker implementation. */
|
|
127
|
+
static get implementation(): typeof FilePicker;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @param [options={}] Options that configure the behavior of the FilePicker
|
|
131
|
+
*/
|
|
132
|
+
constructor(options: DeepPartial<FilePickerConfiguration>);
|
|
133
|
+
|
|
134
|
+
/** The full requested path given by the user */
|
|
135
|
+
request: string;
|
|
136
|
+
|
|
137
|
+
/** A callback function to trigger once a file has been selected */
|
|
138
|
+
callback: Function | null;
|
|
139
|
+
|
|
140
|
+
/** The general file type which controls the set of extensions which will be accepted */
|
|
141
|
+
type: FilePickerFileType;
|
|
142
|
+
|
|
143
|
+
/** The target HTML element this file picker is bound to */
|
|
144
|
+
field: HTMLElement | null;
|
|
145
|
+
|
|
146
|
+
/** A button controlling the display of the picker UI */
|
|
147
|
+
button: HTMLButtonElement | null;
|
|
148
|
+
|
|
149
|
+
/** The display mode of the FilePicker UI */
|
|
150
|
+
displayMode: FilerPickerDisplayMode;
|
|
151
|
+
|
|
152
|
+
/** The file sources available for browsing */
|
|
153
|
+
sources: Partial<Record<FilePickerSource, { target: string; bucket?: string; buckets?: string[] }>>;
|
|
154
|
+
|
|
155
|
+
activeSource: FilePickerSource;
|
|
156
|
+
|
|
157
|
+
/** The latest set of results browsed from the server */
|
|
158
|
+
results: Record<string, unknown>;
|
|
159
|
+
|
|
160
|
+
/** The current set of file extensions which are being filtered upon */
|
|
161
|
+
extensions: string[];
|
|
162
|
+
|
|
163
|
+
/** Get favorite folders for quick access */
|
|
164
|
+
get favorites(): Record<string, FavoriteFolder>;
|
|
165
|
+
|
|
166
|
+
override get title(): string;
|
|
167
|
+
|
|
168
|
+
/** Return the source object for the currently active source */
|
|
169
|
+
get source(): { target: string; bucket?: string; buckets?: string[] };
|
|
170
|
+
|
|
171
|
+
/** Return the target directory for the currently active source */
|
|
172
|
+
get target(): string;
|
|
173
|
+
|
|
174
|
+
/** Whether the current user is able to create folders. */
|
|
175
|
+
get canCreateFolder(): boolean;
|
|
176
|
+
|
|
177
|
+
/** Whether the current use is able to upload file content. */
|
|
178
|
+
get canUpload(): boolean;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Test a URL to see if it matches a well known s3 key pattern
|
|
182
|
+
* @param url An input URL to test
|
|
183
|
+
* @returns A regular expression match
|
|
184
|
+
*/
|
|
185
|
+
static matchS3URL(url: string): RegExpMatchArray | null;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Browse files for a certain directory location
|
|
189
|
+
* @param source The source location in which to browse: see FilePicker#sources for details.
|
|
190
|
+
* @param target The target within the source location
|
|
191
|
+
* @param options Optional arguments
|
|
192
|
+
* @param [options.bucket] A bucket within which to search if using the S3 source
|
|
193
|
+
* @param [options.extensions] An Array of file extensions to filter on
|
|
194
|
+
* @param [options.wildcard] The requested dir represents a wildcard path
|
|
195
|
+
*
|
|
196
|
+
* @returns A Promise that resolves to the directories and files contained in the location
|
|
197
|
+
*/
|
|
198
|
+
static browse(
|
|
199
|
+
source: FilePickerSource,
|
|
200
|
+
target: string,
|
|
201
|
+
options?: { bucket?: string; extensions?: string[]; wildcard?: boolean },
|
|
202
|
+
): Promise<FilePickerManageFilesResult>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Configure metadata settings regarding a certain file system path
|
|
206
|
+
* @param source The source location in which to browse: see FilePicker#sources for details.
|
|
207
|
+
* @param target The target within the source location
|
|
208
|
+
* @param options Optional arguments modifying the request
|
|
209
|
+
*/
|
|
210
|
+
static configurePath(source: FilePickerSource, target: string, options?: object): Promise<FilePickerManageFilesResult>;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Create a subdirectory within a given source. The requested subdirectory path must not already exist.
|
|
214
|
+
* @param source The source location in which to browse. See FilePicker#sources for details
|
|
215
|
+
* @param target The target within the source location
|
|
216
|
+
* @param options Optional arguments which modify the request
|
|
217
|
+
*/
|
|
218
|
+
static createDirectory(source: FilePickerSource, target: string, options?: object): Promise<FilePickerManageFilesResult>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Dispatch a POST request to the server containing a directory path and a file to upload
|
|
222
|
+
* @param source The data source to which the file should be uploaded
|
|
223
|
+
* @param path The destination path
|
|
224
|
+
* @param file The File object to upload
|
|
225
|
+
* @param [body] Additional file upload options sent in the POST body
|
|
226
|
+
* @param [options] Additional options to configure how the method behaves
|
|
227
|
+
* @param [options.notify=true] Display a UI notification when the upload is processed
|
|
228
|
+
* @returns The response object
|
|
229
|
+
*/
|
|
230
|
+
static upload(
|
|
231
|
+
source: FilePickerSource,
|
|
232
|
+
path: string,
|
|
233
|
+
file: File,
|
|
234
|
+
body?: Record<string, unknown>,
|
|
235
|
+
options?: { notify?: boolean },
|
|
236
|
+
): Promise<FilePickerUploadResponse | false | void>;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* A convenience function that uploads a file to a given package's persistent /storage/ directory
|
|
240
|
+
* @param packageId The id of the package to which the file should be uploaded. Only supports Systems and Modules.
|
|
241
|
+
* @param path The relative destination path in the package's storage directory
|
|
242
|
+
* @param file The File object to upload
|
|
243
|
+
* @param [body={}] Additional file upload options sent in the POST body
|
|
244
|
+
* @param [options] Additional options to configure how the method behaves
|
|
245
|
+
* @param [options.notify=true] Display a UI notification when the upload is processed
|
|
246
|
+
* @returns The response object
|
|
247
|
+
*/
|
|
248
|
+
static uploadPersistent(
|
|
249
|
+
packageId: string,
|
|
250
|
+
path: string,
|
|
251
|
+
file: File,
|
|
252
|
+
body?: Record<string, unknown>,
|
|
253
|
+
options?: { notify?: boolean },
|
|
254
|
+
): Promise<FilePickerUploadResponse | false | void>;
|
|
255
|
+
|
|
256
|
+
/* -------------------------------------------- */
|
|
257
|
+
/* Rendering */
|
|
258
|
+
/* -------------------------------------------- */
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Browse to a specific location for this FilePicker instance
|
|
262
|
+
* @param [target] The target within the currently active source location.
|
|
263
|
+
* @param [options] Browsing options
|
|
264
|
+
*/
|
|
265
|
+
browse(
|
|
266
|
+
target?: string,
|
|
267
|
+
options?: {
|
|
268
|
+
type?: FilePickerFileType;
|
|
269
|
+
extensions?: string[];
|
|
270
|
+
wildcard?: boolean;
|
|
271
|
+
render?: boolean;
|
|
272
|
+
},
|
|
273
|
+
): Promise<this>;
|
|
274
|
+
|
|
275
|
+
override render(options?: Partial<HandlebarsRenderOptions>): Promise<this>;
|
|
276
|
+
|
|
277
|
+
override _prepareContext(options: HandlebarsRenderOptions): Promise<FilePickerContext>;
|
|
278
|
+
|
|
279
|
+
protected override _prepareTabs(group: string): Record<string, ApplicationTab>;
|
|
280
|
+
|
|
281
|
+
override changeTab(tab: string, group: string, options?: { event?: Event; navElement?: HTMLElement; force?: boolean; updatePosition?: boolean }): void;
|
|
282
|
+
|
|
283
|
+
protected override _tearDown(options: ApplicationClosingOptions): void;
|
|
284
|
+
|
|
285
|
+
protected override _onRender(context: FilePickerContext, options: HandlebarsRenderOptions): Promise<void>;
|
|
286
|
+
|
|
287
|
+
/* -------------------------------------------- */
|
|
288
|
+
/* Event Listeners and Handlers */
|
|
289
|
+
/* -------------------------------------------- */
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Handle changes to the tile size.
|
|
293
|
+
* @param event The triggering event.
|
|
294
|
+
*/
|
|
295
|
+
protected _onChangeTileSize(event: Event): void;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Search among shown directories and files.
|
|
299
|
+
* @param event The triggering event
|
|
300
|
+
* @param query The search input value
|
|
301
|
+
* @param rgx
|
|
302
|
+
* @param html
|
|
303
|
+
*/
|
|
304
|
+
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
|
305
|
+
|
|
306
|
+
/* -------------------------------------------- */
|
|
307
|
+
/* Factory Methods */
|
|
308
|
+
/* -------------------------------------------- */
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Bind the file picker to a new target field.
|
|
312
|
+
* Assumes the user will provide a HTMLButtonElement which has the data-target and data-type attributes
|
|
313
|
+
* The data-target attribute should provide the name of the input field which should receive the selected file
|
|
314
|
+
* The data-type attribute is a string in ["image", "audio"] which sets the file extensions which will be accepted
|
|
315
|
+
*
|
|
316
|
+
* @param button The button element
|
|
317
|
+
*/
|
|
318
|
+
static fromButton(button: HTMLButtonElement): FilePicker;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FormFooterButton } from "../_types.mjs";
|
|
2
|
+
import {
|
|
3
|
+
DocumentSheetConfiguration,
|
|
4
|
+
DocumentSheetRenderContext,
|
|
5
|
+
DocumentSheetV2,
|
|
6
|
+
HandlebarsApplicationMixin,
|
|
7
|
+
HandlebarsRenderOptions,
|
|
8
|
+
HandlebarsTemplatePart,
|
|
9
|
+
} from "../api/_module.mjs";
|
|
10
|
+
import SceneConfig from "../sheets/scene-config.mjs";
|
|
11
|
+
import Scene from "./../../documents/scene.mjs";
|
|
12
|
+
|
|
13
|
+
interface GridConfigContext<TScene extends Scene = Scene> extends DocumentSheetRenderContext {
|
|
14
|
+
scene: TScene;
|
|
15
|
+
gridTypes: Record<string, string>;
|
|
16
|
+
scale: number;
|
|
17
|
+
pixelsLabel: string;
|
|
18
|
+
buttons: FormFooterButton[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** A tool for fine-tuning the grid in a Scene */
|
|
22
|
+
export default class GridConfig<TScene extends Scene = Scene> extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
|
23
|
+
constructor(options: DocumentSheetConfiguration);
|
|
24
|
+
|
|
25
|
+
static override DEFAULT_OPTIONS: DeepPartial<DocumentSheetConfiguration>;
|
|
26
|
+
|
|
27
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
28
|
+
|
|
29
|
+
/** Track the Scene Configuration sheet reference. */
|
|
30
|
+
sheet: SceneConfig<TScene>;
|
|
31
|
+
|
|
32
|
+
override _prepareContext(options: HandlebarsRenderOptions): Promise<GridConfigContext<TScene>>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ApplicationConfiguration, ApplicationRenderContext } from "../_types.mjs";
|
|
2
|
+
import { ApplicationV2, HandlebarsApplicationMixin, HandlebarsRenderOptions, HandlebarsTemplatePart } from "../api/_module.mjs";
|
|
3
|
+
|
|
4
|
+
interface ImagePopoutConfiguration extends ApplicationConfiguration {
|
|
5
|
+
/** The URL to the image or video file */
|
|
6
|
+
src: string;
|
|
7
|
+
|
|
8
|
+
/** Caption text to display below the image. */
|
|
9
|
+
caption: string;
|
|
10
|
+
|
|
11
|
+
/** The UUID of some related {@link Document}. */
|
|
12
|
+
uuid: string | null;
|
|
13
|
+
|
|
14
|
+
/** Force showing or hiding the title. */
|
|
15
|
+
showTitle: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ShareImageConfig {
|
|
19
|
+
/** The image URL to share. */
|
|
20
|
+
image: string;
|
|
21
|
+
|
|
22
|
+
/** The image title. */
|
|
23
|
+
title: string;
|
|
24
|
+
|
|
25
|
+
/** The UUID of a {@link Document} related to the image, used to determine permission to see the image title. */
|
|
26
|
+
uuid?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* If this is provided, the permissions of the related Document will be ignored and the title will be shown based on this parameter.
|
|
30
|
+
*/
|
|
31
|
+
showTitle?: boolean;
|
|
32
|
+
|
|
33
|
+
/** A list of user IDs to show the image to. */
|
|
34
|
+
users?: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* An Image Popout Application which features a single image in a lightbox style frame.
|
|
39
|
+
* Furthermore, this application allows for sharing the display of an image with other connected players.
|
|
40
|
+
*
|
|
41
|
+
* @example Creating an Image Popout
|
|
42
|
+
* ```js
|
|
43
|
+
* // Construct the Application instance
|
|
44
|
+
* const ip = new ImagePopout({
|
|
45
|
+
* src: "path/to/image.jpg",
|
|
46
|
+
* uuid: game.actors.getName("My Hero").uuid
|
|
47
|
+
* window: {title: "My Featured Image"}
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* // Display the image popout
|
|
51
|
+
* ip.render(true);
|
|
52
|
+
*
|
|
53
|
+
* // Share the image with other connected players
|
|
54
|
+
* ip.shareImage();
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export default class ImagePopout extends HandlebarsApplicationMixin(ApplicationV2) {
|
|
58
|
+
constructor(options: DeepPartial<ImagePopoutConfiguration>);
|
|
59
|
+
|
|
60
|
+
static override DEFAULT_OPTIONS: DeepPartial<ImagePopoutConfiguration>;
|
|
61
|
+
|
|
62
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
63
|
+
|
|
64
|
+
override get title(): string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether the application should display video content.
|
|
68
|
+
*/
|
|
69
|
+
get isVideo(): boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Share the displayed image with other connected Users
|
|
73
|
+
*/
|
|
74
|
+
shareImage(options?: ShareImageConfig): void;
|
|
75
|
+
|
|
76
|
+
protected override _initializeApplicationOptions(options: DeepPartial<ImagePopoutConfiguration>): ImagePopoutConfiguration;
|
|
77
|
+
|
|
78
|
+
protected override _prepareContext(options: HandlebarsRenderOptions): Promise<ApplicationRenderContext>;
|
|
79
|
+
|
|
80
|
+
protected override _preFirstRender(context: ApplicationRenderContext, options: HandlebarsRenderOptions): Promise<void>;
|
|
81
|
+
|
|
82
|
+
/* -------------------------------------------- */
|
|
83
|
+
/* Helper Methods */
|
|
84
|
+
/* -------------------------------------------- */
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Handle a received request to display an image.
|
|
88
|
+
* @param config The image configuration data.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
static _handleShareImage(config: ShareImageConfig): ImagePopout;
|
|
92
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApplicationConfiguration, ApplicationRenderContext, FormFooterButton } from "../_types.mjs";
|
|
2
|
+
import { HandlebarsApplicationMixin, HandlebarsRenderOptions, HandlebarsTemplatePart } from "../api/_module.mjs";
|
|
3
|
+
import ApplicationV2 from "../api/application.mjs";
|
|
4
|
+
|
|
5
|
+
export interface PermissionConfigContext extends ApplicationRenderContext {
|
|
6
|
+
roles: Record<keyof typeof CONST.USER_ROLES, string>;
|
|
7
|
+
permissions: typeof CONST.USER_PERMISSIONS;
|
|
8
|
+
buttons: FormFooterButton[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** An application for configuring the permissions which are available to each User role. */
|
|
12
|
+
export default class PermissionConfig extends HandlebarsApplicationMixin(
|
|
13
|
+
ApplicationV2<ApplicationConfiguration, HandlebarsRenderOptions, PermissionConfigContext>,
|
|
14
|
+
) {
|
|
15
|
+
static override DEFAULT_OPTIONS: DeepPartial<ApplicationConfiguration>;
|
|
16
|
+
|
|
17
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
18
|
+
|
|
19
|
+
/* -------------------------------------------- */
|
|
20
|
+
/* Rendering */
|
|
21
|
+
/* -------------------------------------------- */
|
|
22
|
+
|
|
23
|
+
override _prepareContext(options: HandlebarsRenderOptions): Promise<PermissionConfigContext>;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RollResolver } from "./roll-resolver.mjs";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import Roll from "../../dice/roll.mjs";
|
|
2
|
+
import { ApplicationClosingOptions, ApplicationConfiguration, ApplicationFormConfiguration, ApplicationRenderContext } from "../_types.mjs";
|
|
3
|
+
import ApplicationV2 from "../api/application.mjs";
|
|
4
|
+
import HandlebarsApplicationMixin, { HandlebarsTemplatePart } from "../api/handlebars-application.mjs";
|
|
5
|
+
import FormDataExtended from "../ux/form-data-extended.mjs";
|
|
6
|
+
import DiceTerm from "./../../dice/terms/dice.mjs";
|
|
7
|
+
|
|
8
|
+
export interface DiceTermFulfillmentDescriptor {
|
|
9
|
+
/** A unique identifier for the term. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The term. */
|
|
12
|
+
term: DiceTerm;
|
|
13
|
+
/** The fulfillment method. */
|
|
14
|
+
method: string;
|
|
15
|
+
/** Was the term newly-added to this resolver? */
|
|
16
|
+
isNew?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* An application responsible for handling unfulfilled dice terms in a roll.
|
|
21
|
+
*/
|
|
22
|
+
export default class RollResolver extends HandlebarsApplicationMixin(ApplicationV2) {
|
|
23
|
+
constructor(roll: Roll, options?: DeepPartial<ApplicationConfiguration>);
|
|
24
|
+
|
|
25
|
+
static override DEFAULT_OPTIONS: DeepPartial<ApplicationConfiguration>;
|
|
26
|
+
|
|
27
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A collection of fulfillable dice terms.
|
|
31
|
+
*/
|
|
32
|
+
get fulfillable(): Map<string, DiceTermFulfillmentDescriptor>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The roll being resolved.
|
|
36
|
+
*/
|
|
37
|
+
get roll(): Roll;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Identify any terms in this Roll that should be fulfilled externally, and prompt the user to do so.
|
|
41
|
+
* @returns Returns a Promise that resolves when the first pass of fulfillment is complete.
|
|
42
|
+
*/
|
|
43
|
+
awaitFulfillment(): Promise<void>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Register a fulfilled die roll.
|
|
47
|
+
* @param method The method used for fulfillment.
|
|
48
|
+
* @param denomination The denomination of the fulfilled die.
|
|
49
|
+
* @param result The rolled number.
|
|
50
|
+
* @returns Whether the result was consumed.
|
|
51
|
+
*/
|
|
52
|
+
registerResult(method: string, denomination: string, result: number): boolean;
|
|
53
|
+
|
|
54
|
+
override close(options?: ApplicationClosingOptions): Promise<this>;
|
|
55
|
+
|
|
56
|
+
protected override _prepareContext(): Promise<ApplicationRenderContext>;
|
|
57
|
+
|
|
58
|
+
protected override _onSubmitForm(formConfig: ApplicationFormConfiguration, event: SubmitEvent): Promise<void>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Handle prompting for a single extra result from a term.
|
|
62
|
+
* @param term The term.
|
|
63
|
+
* @param method The method used to obtain the result.
|
|
64
|
+
*/
|
|
65
|
+
resolveResult(term: DiceTerm, method: string, options?: { reroll?: boolean; explode?: boolean }): Promise<number | void>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Update the Roll instance with the fulfilled results.
|
|
69
|
+
* @param event The originating form submission event.
|
|
70
|
+
* @param form The form element that was submitted.
|
|
71
|
+
* @param formData Processed data for the submitted form.
|
|
72
|
+
*/
|
|
73
|
+
protected static _fulfillRoll(this: RollResolver, event: SubmitEvent, form: HTMLFormElement, formData: FormDataExtended): Promise<void>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Add a new term to the resolver.
|
|
77
|
+
* @param term The term.
|
|
78
|
+
* @returns Returns a Promise that resolves when the term's results have been externally fulfilled.
|
|
79
|
+
*/
|
|
80
|
+
addTerm(term: DiceTerm): Promise<void>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check if all rolls have been fulfilled.
|
|
84
|
+
*/
|
|
85
|
+
protected _checkDone(): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Toggle the state of the submit button.
|
|
89
|
+
* @param enabled Whether the button is enabled.
|
|
90
|
+
*/
|
|
91
|
+
protected _toggleSubmission(enabled: boolean): void;
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom HTMLElement implementations for use in template rendering.
|
|
3
|
+
* @module elements
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { default as HTMLCodeMirrorElement } from "./codemirror/element.mjs";
|
|
7
|
+
export { default as HTMLColorPickerElement } from "./color-picker.mjs";
|
|
8
|
+
export { default as HTMLDocumentEmbedElement } from "./document-embed.mjs";
|
|
9
|
+
export { default as HTMLDocumentTagsElement } from "./document-tags.mjs";
|
|
10
|
+
export { default as HTMLEnrichedContentElement } from "./enriched-content.mjs";
|
|
11
|
+
export { default as HTMLFilePickerElement } from "./file-picker.mjs";
|
|
12
|
+
export { default as HTMLHueSelectorSlider } from "./hue-slider.mjs";
|
|
13
|
+
export { AbstractMultiSelectElement, HTMLMultiCheckboxElement, HTMLMultiSelectElement } from "./multi-select.mjs";
|
|
14
|
+
export { default as HTMLProseMirrorElement } from "./prosemirror-editor.mjs";
|
|
15
|
+
export { default as HTMLRangePickerElement } from "./range-picker.mjs";
|
|
16
|
+
export { default as HTMLSecretBlockElement } from "./secret-block.mjs";
|
|
17
|
+
export { default as HTMLStringTagsElement } from "./string-tags.mjs";
|
|
18
|
+
|
|
19
|
+
export { default as AbstractFormInputElement } from "./form-element.mjs";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import AbstractFormInputElement from "../form-element.mjs";
|
|
2
|
+
import { Point } from "./../../../../common/_types.mjs";
|
|
3
|
+
import { CodeMirrorInputConfig, CodeMirrorLanguage } from "./../../../../common/data/_types.mjs";
|
|
4
|
+
|
|
5
|
+
interface HTMLCodeMirrorOptions {
|
|
6
|
+
/** The initial editor contents. */
|
|
7
|
+
value?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A custom HTML element responsible for displaying a CodeMirror rich text editor.
|
|
12
|
+
*/
|
|
13
|
+
export default class HTMLCodeMirrorElement extends AbstractFormInputElement<string> {
|
|
14
|
+
constructor(options?: HTMLCodeMirrorOptions);
|
|
15
|
+
|
|
16
|
+
static override tagName: "code-mirror";
|
|
17
|
+
|
|
18
|
+
static override observedAttributes: string[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This element's language attribute or its default if no value is set
|
|
22
|
+
*/
|
|
23
|
+
get language(): CodeMirrorLanguage;
|
|
24
|
+
|
|
25
|
+
set language(value: CodeMirrorLanguage);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This element's indent attribute, which determines the number of spaces added upon pressing the TAB key. A value
|
|
29
|
+
* of 0 disables this feature entirely.
|
|
30
|
+
*/
|
|
31
|
+
get indent(): number;
|
|
32
|
+
|
|
33
|
+
set indent(value: number);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The element's nowrap attribute, which if present disables line-wrapping
|
|
37
|
+
*/
|
|
38
|
+
get nowrap(): boolean;
|
|
39
|
+
|
|
40
|
+
set nowrap(value: boolean);
|
|
41
|
+
|
|
42
|
+
protected override _toggleDisabled(disabled: boolean): void;
|
|
43
|
+
|
|
44
|
+
protected override _getValue(): string;
|
|
45
|
+
|
|
46
|
+
protected override _setValue(value: string): void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Given screen co-ordinates, returns the position in the editor's text content at those co-ordinates.
|
|
50
|
+
* @param coords The screen co-ordinates.
|
|
51
|
+
*/
|
|
52
|
+
posAtCoords(coords: Point): number;
|
|
53
|
+
|
|
54
|
+
/* -------------------------------------------- */
|
|
55
|
+
/* Element Lifecycle */
|
|
56
|
+
/* -------------------------------------------- */
|
|
57
|
+
|
|
58
|
+
override connectedCallback(): void;
|
|
59
|
+
|
|
60
|
+
protected override _buildElements(): [HTMLElement];
|
|
61
|
+
|
|
62
|
+
override attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Call for garbage collection upon this element being removed from the DOM.
|
|
66
|
+
*/
|
|
67
|
+
disconnectedCallback(): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create an HTMLCodeMirrorElement element for a StringField (typically a JSONField or JavascriptField).
|
|
71
|
+
*/
|
|
72
|
+
static create(config: CodeMirrorInputConfig): HTMLCodeMirrorElement;
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormInputConfig } from "./../../../common/data/_types.mjs";
|
|
2
|
+
import AbstractFormInputElement from "./form-element.mjs";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A custom HTMLElement used to select a color using a linked pair of input fields.
|
|
6
|
+
*/
|
|
7
|
+
export default class HTMLColorPickerElement extends AbstractFormInputElement<string> {
|
|
8
|
+
static override tagName: "color-picker";
|
|
9
|
+
|
|
10
|
+
protected override _buildElements(): HTMLInputElement[];
|
|
11
|
+
|
|
12
|
+
/** Create a HTMLColorPickerElement using provided configuration data. */
|
|
13
|
+
static create(config: FormInputConfig<string>): HTMLColorPickerElement;
|
|
14
|
+
}
|