@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,78 @@
|
|
|
1
|
+
import { ApplicationClosingOptions, ApplicationConfiguration, ApplicationRenderContext, ApplicationTabsConfiguration } from "../_types.mjs";
|
|
2
|
+
import ApplicationV2 from "./application.mjs";
|
|
3
|
+
import HandlebarsApplicationMixin, { HandlebarsRenderOptions, HandlebarsTemplatePart } from "./handlebars-application.mjs";
|
|
4
|
+
|
|
5
|
+
export interface CategoryBrowserConfiguration extends ApplicationConfiguration {
|
|
6
|
+
/** Where this application displays is a list of tagged FVTT packages */
|
|
7
|
+
packageList: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The initial category tab: a `null` value will result in an initial active tab that corresponds with the first
|
|
10
|
+
* category by insertion order.
|
|
11
|
+
*/
|
|
12
|
+
initialCategory: string | null;
|
|
13
|
+
/** Additional Template partials for specific use with this class */
|
|
14
|
+
subtemplates: {
|
|
15
|
+
category: string;
|
|
16
|
+
filters: string | null;
|
|
17
|
+
sidebarFooter: string | null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* An abstract class responsible for displaying a 2-pane Application that allows for entries to be grouped and filtered
|
|
23
|
+
* by category.
|
|
24
|
+
*/
|
|
25
|
+
export default abstract class CategoryBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|
26
|
+
static override DEFAULT_OPTIONS: DeepPartial<CategoryBrowserConfiguration>;
|
|
27
|
+
|
|
28
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Is category and/or entry data loaded? Most subclasses will already have their data close at hand.
|
|
32
|
+
*/
|
|
33
|
+
protected get _dataLoaded(): boolean;
|
|
34
|
+
|
|
35
|
+
protected override _initializeApplicationOptions(options: DeepPartial<CategoryBrowserConfiguration>): CategoryBrowserConfiguration;
|
|
36
|
+
|
|
37
|
+
protected override _configureRenderParts(options: HandlebarsRenderOptions): Record<string, HandlebarsTemplatePart>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Perform a text search without a KeyboardEvent.
|
|
41
|
+
*/
|
|
42
|
+
search(query: string): void;
|
|
43
|
+
|
|
44
|
+
override render(options?: boolean | DeepPartial<HandlebarsRenderOptions>): Promise<this>;
|
|
45
|
+
|
|
46
|
+
protected override _prepareContext(options: HandlebarsRenderOptions): Promise<ApplicationRenderContext>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Prepare the structure of category data which is rendered in this configuration form.
|
|
50
|
+
*/
|
|
51
|
+
protected abstract _prepareCategoryData(): Promise<Record<string, { id: string; label: string; entries: object[] }>>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* An optional method to make a potentially long-running request to load category data: a temporary message will be
|
|
55
|
+
* displayed until completion.
|
|
56
|
+
*/
|
|
57
|
+
protected _loadCategoryData(): Promise<void>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Reusable logic for how categories are sorted in relation to each other.
|
|
61
|
+
*/
|
|
62
|
+
protected _sortCategories(a: { label: string; [key: string]: unknown }, b: { label: string; [key: string]: unknown }): number;
|
|
63
|
+
|
|
64
|
+
protected override _getTabsConfig(group: string): ApplicationTabsConfiguration | null;
|
|
65
|
+
|
|
66
|
+
protected override _tearDown(options: ApplicationClosingOptions): void;
|
|
67
|
+
|
|
68
|
+
protected override _onRender(context: ApplicationRenderContext, options: HandlebarsRenderOptions): Promise<void>;
|
|
69
|
+
|
|
70
|
+
/* -------------------------------------------- */
|
|
71
|
+
/* Event Listeners and Handlers */
|
|
72
|
+
/* -------------------------------------------- */
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Handle search inputs.
|
|
76
|
+
*/
|
|
77
|
+
protected _onSearchFilter(_event: KeyboardEvent, query: string, rgx?: RegExp, content?: HTMLElement | null): void;
|
|
78
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { ApplicationConfiguration, ApplicationRenderContext, ApplicationRenderOptions } from "../_types.mjs";
|
|
2
|
+
import User from "./../../documents/user.mjs";
|
|
3
|
+
import ApplicationV2 from "./application.mjs";
|
|
4
|
+
|
|
5
|
+
export default class DialogV2<
|
|
6
|
+
TConfig extends DialogV2Configuration = DialogV2Configuration,
|
|
7
|
+
TRenderOptions extends ApplicationRenderOptions = ApplicationRenderOptions,
|
|
8
|
+
> extends ApplicationV2<TConfig, TRenderOptions> {
|
|
9
|
+
static override DEFAULT_OPTIONS: DeepPartial<DialogV2Configuration>;
|
|
10
|
+
|
|
11
|
+
protected override _initializeApplicationOptions(options: DeepPartial<TConfig>): TConfig;
|
|
12
|
+
|
|
13
|
+
protected override _renderHTML(context: ApplicationRenderContext, options: TRenderOptions): Promise<HTMLFormElement>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Render configured buttons
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
protected _renderButtons(): string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Handle submitting the dialog
|
|
23
|
+
* @param target The button that was clicked or the default button
|
|
24
|
+
* @param event The triggering event
|
|
25
|
+
*/
|
|
26
|
+
protected _onSubmit(target: HTMLButtonElement, event: PointerEvent | SubmitEvent): Promise<DialogV2>;
|
|
27
|
+
|
|
28
|
+
protected override _onFirstRender(context: object, options: TRenderOptions): Promise<void>;
|
|
29
|
+
|
|
30
|
+
protected override _attachFrameListeners(): void;
|
|
31
|
+
|
|
32
|
+
protected override _replaceHTML(result: unknown, content: HTMLFormElement, options: TRenderOptions): void;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Handle keypresses within the dialog
|
|
36
|
+
* @param event The triggering event
|
|
37
|
+
*/
|
|
38
|
+
protected _onKeyDown(event: KeyboardEvent): void;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param event The originating click event.
|
|
42
|
+
* @param target The button element that was clicked
|
|
43
|
+
*/
|
|
44
|
+
protected static _onClickButton(event: PointerEvent, target: HTMLButtonElement): void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A utility helper to generate a dialog with yes and no buttons.
|
|
48
|
+
* @param [yes] Options to overwrite the default yes button configuration.
|
|
49
|
+
* @param [no] Options to overwrite the default no button configuration.
|
|
50
|
+
* @returns Resolves to true if the yes button was pressed, or false if the
|
|
51
|
+
* no button was pressed. If additional buttons were provided, the Promise
|
|
52
|
+
* resolves to the identifier of the one that was pressed, or the value
|
|
53
|
+
* returned by its callback. If the dialog was dismissed, and rejectClose is
|
|
54
|
+
* false, the Promise resolves to null.
|
|
55
|
+
*/
|
|
56
|
+
static confirm({
|
|
57
|
+
yes,
|
|
58
|
+
no,
|
|
59
|
+
...options
|
|
60
|
+
}: {
|
|
61
|
+
yes?: Partial<DialogV2Button>;
|
|
62
|
+
no?: Partial<DialogV2Button>;
|
|
63
|
+
} & DeepPartial<DialogV2Configuration & DialogV2WaitOptions>): Promise<boolean>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A utility helper to generate a dialog with a single confirmation button.
|
|
67
|
+
* @param [ok] Options to overwrite the default confirmation button configuration.
|
|
68
|
+
* @returns Resolves to the identifier of the button used to submit the dialog,
|
|
69
|
+
* or the value returned by that button's callback. If the dialog was
|
|
70
|
+
* dismissed, and rejectClose is false, the Promise resolves to null.
|
|
71
|
+
*/
|
|
72
|
+
static prompt({ ok, ...options }: { ok: Partial<DialogV2Button> } & DeepPartial<DialogV2Configuration & DialogV2WaitOptions>): Promise<unknown>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Spawn a dialog and wait for it to be dismissed or submitted.
|
|
76
|
+
* @param [render] A function to invoke whenever the dialog is rendered.
|
|
77
|
+
* @param [close] A function to invoke when the dialog is closed under any
|
|
78
|
+
* circumstances.
|
|
79
|
+
* @param [rejectClose=true] Throw a Promise rejection if the dialog is dismissed.
|
|
80
|
+
* @returns Resolves to the identifier of the
|
|
81
|
+
* button used to submit the dialog, or the value returned by that button's
|
|
82
|
+
* callback. If the dialog was dismissed, and rejectClose is false, the
|
|
83
|
+
* Promise resolves to null.
|
|
84
|
+
*/
|
|
85
|
+
static wait({
|
|
86
|
+
rejectClose,
|
|
87
|
+
close,
|
|
88
|
+
render,
|
|
89
|
+
...options
|
|
90
|
+
}: {
|
|
91
|
+
rejectClose?: boolean;
|
|
92
|
+
close?: DialogV2CloseCallback;
|
|
93
|
+
render?: DialogV2RenderCallback;
|
|
94
|
+
} & DeepPartial<DialogV2Configuration>): Promise<unknown>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Present an asynchronous Dialog query to a specific User for response.
|
|
98
|
+
* @param user A User instance or a User id
|
|
99
|
+
* @param type The type of Dialog to present
|
|
100
|
+
* @param config Dialog configuration forwarded on to the Dialog.prompt, Dialog.confirm, Dialog.input, or
|
|
101
|
+
* Dialog.wait function depending on the query type. Callback options are not supported.
|
|
102
|
+
* @returns The query response or null if no response was provided
|
|
103
|
+
*
|
|
104
|
+
* @see {@link DialogV2.prompt}
|
|
105
|
+
* @see {@link DialogV2.confirm}
|
|
106
|
+
* @see {@link DialogV2.input}
|
|
107
|
+
* @see {@link DialogV2.wait}
|
|
108
|
+
*/
|
|
109
|
+
static query(user: User | string, type: "prompt" | "confirm" | "input" | "wait", config?: object): Promise<unknown>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The dialog query handler.
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
static _handleQuery: (options: { type: "prompt" | "confirm" | "input" | "wait"; config: object }) => unknown;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface DialogV2Button {
|
|
119
|
+
/** The button action identifier. */
|
|
120
|
+
action: string;
|
|
121
|
+
|
|
122
|
+
/** The button label. Will be localized. */
|
|
123
|
+
label: string;
|
|
124
|
+
|
|
125
|
+
/** FontAwesome icon classes. */
|
|
126
|
+
icon?: string;
|
|
127
|
+
|
|
128
|
+
/** CSS classes to apply to the button. */
|
|
129
|
+
class?: string;
|
|
130
|
+
|
|
131
|
+
/** CSS style to apply to the button. */
|
|
132
|
+
style?: Record<string, string>;
|
|
133
|
+
|
|
134
|
+
/** The button type. */
|
|
135
|
+
type?: string;
|
|
136
|
+
|
|
137
|
+
/** Whether the button is disabled */
|
|
138
|
+
disabled?: boolean;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Whether this button represents the default action to take if the user submits the form without pressing a button,
|
|
142
|
+
* i.e. with an Enter keypress.
|
|
143
|
+
*/
|
|
144
|
+
default?: boolean;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A function to invoke when the button is clicked. The value returned from this function will be used as the
|
|
148
|
+
* dialog's submitted value. Otherwise, the button's identifier is used.
|
|
149
|
+
*/
|
|
150
|
+
callback?: DialogV2ButtonCallback;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface DialogV2Configuration extends ApplicationConfiguration {
|
|
154
|
+
/** Modal dialogs prevent interaction with the rest of the UI until they are dismissed or submitted. */
|
|
155
|
+
modal?: boolean;
|
|
156
|
+
|
|
157
|
+
/** Button configuration. */
|
|
158
|
+
buttons: DialogV2Button[];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The dialog content: a HTML string or a <div> element. If string,
|
|
162
|
+
* the content is cleaned with {@link foundry.utils.cleanHTML}.
|
|
163
|
+
* Otherwise, the content is not cleaned.
|
|
164
|
+
*/
|
|
165
|
+
content?: string | HTMLDivElement;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A function to invoke when the dialog is submitted. This will not be
|
|
169
|
+
* called if the dialog is dismissed.
|
|
170
|
+
*/
|
|
171
|
+
submit?: DialogV2SubmitCallback;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface DialogV2WaitOptions {
|
|
175
|
+
/** A synchronous function to invoke whenever the dialog is rendered. */
|
|
176
|
+
render?: DialogV2RenderCallback;
|
|
177
|
+
|
|
178
|
+
/** A synchronous function to invoke when the dialog is closed under any circumstances. */
|
|
179
|
+
close?: DialogV2CloseCallback;
|
|
180
|
+
|
|
181
|
+
/** Throw a Promise rejection if the dialog is dismissed. */
|
|
182
|
+
rejectClose?: boolean;
|
|
183
|
+
|
|
184
|
+
/** Options forwarded to the dialog's render call. */
|
|
185
|
+
renderOptions?: ApplicationRenderOptions;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* A button click handler method.
|
|
190
|
+
* @param event The button click event, or a form submission event if the dialog was
|
|
191
|
+
* @param button If the form was submitted via keyboard, this will be the default
|
|
192
|
+
* @param dialog The dialog element.
|
|
193
|
+
*/
|
|
194
|
+
export type DialogV2ButtonCallback = (event: PointerEvent | SubmitEvent, button: HTMLButtonElement, dialog: DialogV2) => Promise<unknown> | unknown;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A dialog render handler method.
|
|
198
|
+
* @param event The render event.
|
|
199
|
+
* @param dialog The dialog element.
|
|
200
|
+
*/
|
|
201
|
+
export type DialogV2RenderCallback = (event: Event, dialog: DialogV2) => void;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @param event The close event
|
|
205
|
+
* @param dialog The dialog instance
|
|
206
|
+
*/
|
|
207
|
+
export type DialogV2CloseCallback = (event: Event, dialog: DialogV2) => void;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @param result Either the identifier of the button that was clicked to submit
|
|
211
|
+
* the dialog, or the result returned by that button's callback
|
|
212
|
+
*/
|
|
213
|
+
export type DialogV2SubmitCallback = (result: unknown) => Promise<void>;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApplicationClosingOptions,
|
|
3
|
+
ApplicationConfiguration,
|
|
4
|
+
ApplicationFormConfiguration,
|
|
5
|
+
ApplicationHeaderControlsEntry,
|
|
6
|
+
ApplicationRenderContext,
|
|
7
|
+
ApplicationRenderOptions,
|
|
8
|
+
} from "../_types.mjs";
|
|
9
|
+
import FormDataExtended from "../ux/form-data-extended.mjs";
|
|
10
|
+
import { DatabaseCreateOperation, DatabaseUpdateOperation, DataSchema } from "./../../../common/abstract/_types.mjs";
|
|
11
|
+
import Document from "./../../../common/abstract/document.mjs";
|
|
12
|
+
import User from "./../../documents/user.mjs";
|
|
13
|
+
import ApplicationV2 from "./application.mjs";
|
|
14
|
+
|
|
15
|
+
export interface DocumentSheetRenderContext extends ApplicationRenderContext {
|
|
16
|
+
document: Document;
|
|
17
|
+
source: Record<string, JSONValue | undefined>;
|
|
18
|
+
fields: DataSchema;
|
|
19
|
+
editable: boolean;
|
|
20
|
+
user: User;
|
|
21
|
+
rootId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default abstract class DocumentSheetV2<
|
|
25
|
+
TConfig extends DocumentSheetConfiguration = DocumentSheetConfiguration,
|
|
26
|
+
TRenderOptions extends DocumentSheetRenderOptions = DocumentSheetRenderOptions,
|
|
27
|
+
> extends ApplicationV2<TConfig, TRenderOptions> {
|
|
28
|
+
constructor(options?: DeepPartial<TConfig>);
|
|
29
|
+
|
|
30
|
+
static override DEFAULT_OPTIONS: DeepPartial<DocumentSheetConfiguration>;
|
|
31
|
+
|
|
32
|
+
get document(): TConfig["document"];
|
|
33
|
+
|
|
34
|
+
override get title(): string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Is this Document sheet visible to the current User?
|
|
38
|
+
* This is governed by the viewPermission threshold configured for the class.
|
|
39
|
+
*/
|
|
40
|
+
get isVisible(): boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Is this Document sheet editable by the current User?
|
|
44
|
+
* This is governed by the editPermission threshold configured for the class.
|
|
45
|
+
*/
|
|
46
|
+
get isEditable(): boolean;
|
|
47
|
+
|
|
48
|
+
protected override _initializeApplicationOptions(options: DeepPartial<TConfig>): TConfig;
|
|
49
|
+
|
|
50
|
+
protected override _headerControlButtons(): Generator<ApplicationHeaderControlsEntry>;
|
|
51
|
+
|
|
52
|
+
protected override _configureRenderOptions(options: DeepPartial<TRenderOptions>): TRenderOptions;
|
|
53
|
+
|
|
54
|
+
protected override _prepareContext(options: TRenderOptions): Promise<DocumentSheetRenderContext>;
|
|
55
|
+
|
|
56
|
+
protected override _renderFrame(options: TRenderOptions): Promise<HTMLElement>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Disable or reenable all form fields in this application.
|
|
60
|
+
* @param disabled Should the fields be disabled?
|
|
61
|
+
*/
|
|
62
|
+
protected _toggleDisabled(disabled: boolean): void;
|
|
63
|
+
|
|
64
|
+
/* -------------------------------------------- */
|
|
65
|
+
/* Application Life-Cycle Events */
|
|
66
|
+
/* -------------------------------------------- */
|
|
67
|
+
|
|
68
|
+
protected override _canRender(): void;
|
|
69
|
+
|
|
70
|
+
protected override _onFirstRender(context: object, options: TRenderOptions): Promise<void>;
|
|
71
|
+
|
|
72
|
+
protected override _onRender(context: object, options: TRenderOptions): Promise<void>;
|
|
73
|
+
|
|
74
|
+
protected override _onClose(options: ApplicationClosingOptions): void;
|
|
75
|
+
|
|
76
|
+
/* -------------------------------------------- */
|
|
77
|
+
/* Event Listeners and Handlers */
|
|
78
|
+
/* -------------------------------------------- */
|
|
79
|
+
|
|
80
|
+
/* -------------------------------------------- */
|
|
81
|
+
/* Form Submission */
|
|
82
|
+
/* -------------------------------------------- */
|
|
83
|
+
|
|
84
|
+
protected override _onChangeForm(formConfig: ApplicationFormConfiguration, event: Event): void;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Handle toggling the revealed state of a secret embedded in some content.
|
|
88
|
+
* @param event The triggering event.
|
|
89
|
+
*/
|
|
90
|
+
protected _onRevealSecret(event: Event): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Prepare data used to update the Item upon form submission.
|
|
94
|
+
* This data is cleaned and validated before being returned for further processing.
|
|
95
|
+
* @param event The originating form submission event
|
|
96
|
+
* @param form The form element that was submitted
|
|
97
|
+
* @param formData Processed data for the submitted form
|
|
98
|
+
* @param updateData Additional data passed in if this form is submitted manually which should be merged with
|
|
99
|
+
* prepared formData.
|
|
100
|
+
* @throws {Error} Subclasses may throw validation errors here to prevent form submission
|
|
101
|
+
* @returns Prepared submission data as an object
|
|
102
|
+
*/
|
|
103
|
+
protected _prepareSubmitData(event: SubmitEvent, form: HTMLFormElement, formData: FormDataExtended, updateData?: object): object;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Customize how form data is extracted into an expanded object.
|
|
107
|
+
* @param event The originating form submission event
|
|
108
|
+
* @param form The form element that was submitted
|
|
109
|
+
* @param formData Processed data for the submitted form
|
|
110
|
+
* @returns An expanded object of processed form data
|
|
111
|
+
* @throws {Error} Subclasses may throw validation errors here to prevent form submission
|
|
112
|
+
*/
|
|
113
|
+
protected _processFormData(event: SubmitEvent | null, form: HTMLFormElement, formData: FormDataExtended): Record<string, unknown>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Submit a document update or creation request based on the processed form data.
|
|
117
|
+
* @param event The originating form submission event
|
|
118
|
+
* @param form The form element that was submitted
|
|
119
|
+
* @param submitData Processed and validated form data to be used for a document update
|
|
120
|
+
* @param options Additional options altering the request
|
|
121
|
+
*/
|
|
122
|
+
protected _processSubmitData(
|
|
123
|
+
event: SubmitEvent,
|
|
124
|
+
form: HTMLFormElement,
|
|
125
|
+
submitData: Record<string, unknown>,
|
|
126
|
+
options?: Partial<DatabaseCreateOperation<TConfig["document"]["parent"]>> | Partial<DatabaseUpdateOperation<TConfig["document"]["parent"]>>,
|
|
127
|
+
): Promise<void>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface DocumentSheetConfiguration<TDocument extends Document = Document> extends ApplicationConfiguration {
|
|
131
|
+
/** The Document instance associated with this sheet */
|
|
132
|
+
document: TDocument;
|
|
133
|
+
/** A permission level in CONST.DOCUMENT_OWNERSHIP_LEVELS */
|
|
134
|
+
viewPermission: number;
|
|
135
|
+
/** A permission level in CONST.DOCUMENT_OWNERSHIP_LEVELS */
|
|
136
|
+
editPermission: number;
|
|
137
|
+
/** Can this sheet class be used to create a new Document? */
|
|
138
|
+
canCreate: boolean;
|
|
139
|
+
/** Allow sheet configuration as a header button */
|
|
140
|
+
sheetConfig: boolean;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface DocumentSheetRenderOptions extends ApplicationRenderOptions {
|
|
144
|
+
/** A string with the format "{operation}{documentName}" providing context */
|
|
145
|
+
renderContext?: string;
|
|
146
|
+
/** Data describing the document modification that occurred */
|
|
147
|
+
renderData?: object;
|
|
148
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { ApplicationFormConfiguration, ApplicationRenderContext, ApplicationRenderOptions } from "../_types.mjs";
|
|
2
|
+
import type ApplicationV2 from "./application.mjs";
|
|
3
|
+
|
|
4
|
+
/** Augment an Application class with [Handlebars](https://handlebarsjs.com) template rendering behavior. */
|
|
5
|
+
export default function HandlebarsApplicationMixin<TBase extends AbstractConstructorOf<ApplicationV2<any>>>(
|
|
6
|
+
BaseApplication: TBase,
|
|
7
|
+
): ConstructorOf<HandlebarsApplication> & HandlebarsApplicationStatic & TBase;
|
|
8
|
+
|
|
9
|
+
export class HandlebarsApplication extends ApplicationV2 {
|
|
10
|
+
static PARTS: Record<string, HandlebarsTemplatePart>;
|
|
11
|
+
|
|
12
|
+
/** A record of all rendered template parts. */
|
|
13
|
+
get parts(): Record<string, HTMLElement>;
|
|
14
|
+
|
|
15
|
+
protected override _configureRenderOptions(options: HandlebarsRenderOptions): void;
|
|
16
|
+
|
|
17
|
+
/** Allow subclasses to dynamically configure render parts. */
|
|
18
|
+
protected _configureRenderParts(options: HandlebarsRenderOptions): Record<string, HandlebarsTemplatePart>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Render each configured application part using Handlebars templates.
|
|
22
|
+
* @param context Context data for the render operation
|
|
23
|
+
* @param options Options which configure application rendering behavior
|
|
24
|
+
* @returns A single rendered HTMLElement for each requested part
|
|
25
|
+
*/
|
|
26
|
+
protected override _renderHTML(context: object, options: HandlebarsRenderOptions): Promise<Record<string, HTMLElement>>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Prepare context that is specific to only a single rendered part.
|
|
30
|
+
*
|
|
31
|
+
* It is recommended to augment or mutate the shared context so that downstream methods like _onRender have
|
|
32
|
+
* visibility into the data that was used for rendering. It is acceptable to return a different context object
|
|
33
|
+
* rather than mutating the shared context at the expense of this transparency.
|
|
34
|
+
*
|
|
35
|
+
* @param partId The part being rendered
|
|
36
|
+
* @param context Shared context provided by _prepareContext
|
|
37
|
+
* @returns Context data for a specific part
|
|
38
|
+
*/
|
|
39
|
+
protected _preparePartContext(partId: string, context: ApplicationRenderContext, options: HandlebarsRenderOptions): Promise<ApplicationRenderContext>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Replace the HTML of the application with the result provided by Handlebars rendering.
|
|
43
|
+
* @param result The result from Handlebars template rendering
|
|
44
|
+
* @param content The content element into which the rendered result must be inserted
|
|
45
|
+
* @param options Options which configure application rendering behavior
|
|
46
|
+
*/
|
|
47
|
+
protected override _replaceHTML(result: Record<string, HTMLElement>, content: HTMLElement, options: HandlebarsRenderOptions): void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Prepare data used to synchronize the state of a template part.
|
|
51
|
+
* @param partId The id of the part being rendered
|
|
52
|
+
* @param newElement The new rendered HTML element for the part
|
|
53
|
+
* @param priorElement The prior rendered HTML element for the part
|
|
54
|
+
* @param state A state object which is used to synchronize after replacement
|
|
55
|
+
*/
|
|
56
|
+
protected _preSyncPartState(partId: string, newElement: HTMLElement, priorElement: HTMLElement, state: object): void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Synchronize the state of a template part after it has been rendered and replaced in the DOM.
|
|
60
|
+
* @param partId The id of the part being rendered
|
|
61
|
+
* @param newElement The new rendered HTML element for the part
|
|
62
|
+
* @param priorElement The prior rendered HTML element for the part
|
|
63
|
+
* @param state A state object which is used to synchronize after replacement
|
|
64
|
+
*/
|
|
65
|
+
protected _syncPartState(partId: string, newElement: HTMLElement, priorElement: HTMLElement, state: object): void;
|
|
66
|
+
|
|
67
|
+
/* -------------------------------------------- */
|
|
68
|
+
/* Event Listeners and Handlers */
|
|
69
|
+
/* -------------------------------------------- */
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Attach event listeners to rendered template parts.
|
|
73
|
+
* @param partId The id of the part being rendered
|
|
74
|
+
* @param htmlElement The rendered HTML element for the part
|
|
75
|
+
* @param options Rendering options passed to the render method
|
|
76
|
+
*/
|
|
77
|
+
protected _attachPartListeners(partId: string, htmlElement: HTMLElement, options: HandlebarsRenderOptions): void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare interface HandlebarsApplicationStatic {
|
|
81
|
+
PARTS: Record<string, HandlebarsTemplatePart>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface HandlebarsTemplatePart {
|
|
85
|
+
/** The template entry-point for the part */
|
|
86
|
+
template: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A CSS id to assign to the top-level element of the rendered part.
|
|
90
|
+
* This id string is automatically prefixed by the application id.
|
|
91
|
+
*/
|
|
92
|
+
id?: string;
|
|
93
|
+
|
|
94
|
+
/** Does this rendered contents of this template part replace the children of the root element? */
|
|
95
|
+
root?: boolean;
|
|
96
|
+
|
|
97
|
+
/** An array of CSS classes to apply to the top-level element of the rendered part. */
|
|
98
|
+
classes?: string[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* An array of templates that are required to render the part.
|
|
102
|
+
* If omitted, only the entry-point is inferred as required.
|
|
103
|
+
*/
|
|
104
|
+
templates?: string[];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* An array of selectors within this part whose scroll positions should
|
|
108
|
+
* be persisted during a re-render operation. A blank string is used
|
|
109
|
+
* to denote that the root level of the part is scrollable.
|
|
110
|
+
*/
|
|
111
|
+
scrollable?: string[];
|
|
112
|
+
|
|
113
|
+
/** A registry of forms selectors and submission handlers. */
|
|
114
|
+
forms?: Record<string, ApplicationFormConfiguration>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface HandlebarsRenderOptions extends ApplicationRenderOptions {
|
|
118
|
+
/** An array of named template parts to render */
|
|
119
|
+
parts: string[];
|
|
120
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * as av from "./av/_module.mjs";
|
|
2
|
+
|
|
3
|
+
export { default as CombatTrackerConfig } from "./combat-tracker-config.mjs";
|
|
4
|
+
export { default as CompendiumArtConfig } from "./compendium-art-config.mjs";
|
|
5
|
+
export { default as DocumentOwnershipConfig } from "./document-ownership.mjs";
|
|
6
|
+
export { default as DocumentSheetConfig } from "./document-sheet-config.mjs";
|
|
7
|
+
export { default as FilePicker } from "./file-picker.mjs";
|
|
8
|
+
export { default as GridConfig } from "./grid-config.mjs";
|
|
9
|
+
export { default as ImagePopout } from "./image-popout.mjs";
|
|
10
|
+
export { default as PermissionConfig } from "./permission-config.mjs";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import ApplicationV2 from "../../api/application.mjs";
|
|
2
|
+
import HandlebarsApplicationMixin, { HandlebarsRenderOptions, HandlebarsTemplatePart } from "../../api/handlebars-application.mjs";
|
|
3
|
+
import { ApplicationConfiguration, ApplicationPosition, ApplicationRenderContext } from "./../../../applications/_types.mjs";
|
|
4
|
+
import User from "./../../../documents/user.mjs";
|
|
5
|
+
|
|
6
|
+
interface CameraPopoutConfiguration extends ApplicationConfiguration {
|
|
7
|
+
user: User;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An application for a single popped-out camera.
|
|
12
|
+
* @extends {ApplicationV2<CameraPopoutConfiguration, HandlebarsRenderOptions>}
|
|
13
|
+
* @mixes HandlebarsApplication
|
|
14
|
+
*/
|
|
15
|
+
export default class CameraPopout extends HandlebarsApplicationMixin(ApplicationV2) {
|
|
16
|
+
constructor(options?: DeepPartial<ApplicationConfiguration> & { user: User });
|
|
17
|
+
|
|
18
|
+
static override DEFAULT_OPTIONS: DeepPartial<ApplicationConfiguration>;
|
|
19
|
+
|
|
20
|
+
static override PARTS: Record<string, HandlebarsTemplatePart>;
|
|
21
|
+
|
|
22
|
+
/* -------------------------------------------- */
|
|
23
|
+
/* Properties */
|
|
24
|
+
/* -------------------------------------------- */
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The user this camera view is for.
|
|
28
|
+
*/
|
|
29
|
+
get user(): User;
|
|
30
|
+
|
|
31
|
+
/* -------------------------------------------- */
|
|
32
|
+
/* Rendering */
|
|
33
|
+
/* -------------------------------------------- */
|
|
34
|
+
|
|
35
|
+
/** @inheritDoc */
|
|
36
|
+
_initializeApplicationOptions(options: DeepPartial<ApplicationConfiguration>): ApplicationConfiguration;
|
|
37
|
+
|
|
38
|
+
protected override _onFirstRender(context: ApplicationRenderContext, options: HandlebarsRenderOptions): Promise<void>;
|
|
39
|
+
|
|
40
|
+
protected override _prepareContext(options: HandlebarsRenderOptions): Promise<ApplicationRenderContext>;
|
|
41
|
+
|
|
42
|
+
/* -------------------------------------------- */
|
|
43
|
+
/* Positioning */
|
|
44
|
+
/* -------------------------------------------- */
|
|
45
|
+
|
|
46
|
+
override setPosition(position?: Partial<ApplicationPosition>): ApplicationPosition;
|
|
47
|
+
|
|
48
|
+
/* -------------------------------------------- */
|
|
49
|
+
/* Event Listeners & Handlers */
|
|
50
|
+
/* -------------------------------------------- */
|
|
51
|
+
|
|
52
|
+
protected override _onClickAction(event: PointerEvent, target: HTMLElement): void | Promise<void>;
|
|
53
|
+
}
|