@caperjs/core 0.1.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 +22 -0
- package/README.md +62 -0
- package/cli/add.mjs +197 -0
- package/cli/audio/cc.mjs +128 -0
- package/cli/audio/index.mjs +42 -0
- package/cli/audio/utils.mjs +56 -0
- package/cli/create-caper.mjs +8 -0
- package/cli/create.mjs +351 -0
- package/cli/install-peerdeps.mjs +57 -0
- package/cli/update.mjs +9 -0
- package/cli/utils.mjs +81 -0
- package/cli/vite.mjs +55 -0
- package/cli/voiceover/generateVoiceoverCSV.mjs +158 -0
- package/cli/voiceover/index.mjs +1 -0
- package/cli.mjs +157 -0
- package/client.d.ts +7 -0
- package/config/assetpack.mjs +212 -0
- package/config/tsconfig.base.json +28 -0
- package/config/vite.mjs +2464 -0
- package/extras/css/accessibility.css +9 -0
- package/extras/css/fullscreen.css +28 -0
- package/extras/css/loader.css +67 -0
- package/extras/llms.txt +1602 -0
- package/lib/CaptionsPlugin-Dc8fIrjy.js +277 -0
- package/lib/CaptionsPlugin-Dc8fIrjy.js.map +1 -0
- package/lib/DataAdapter-BY2114sp.js +84 -0
- package/lib/DataAdapter-BY2114sp.js.map +1 -0
- package/lib/DebugRenderer-BJMLILqI.js +1385 -0
- package/lib/DebugRenderer-BJMLILqI.js.map +1 -0
- package/lib/DevToolsPlugin-wQ5rOkn0.js +31 -0
- package/lib/DevToolsPlugin-wQ5rOkn0.js.map +1 -0
- package/lib/GSAPPlugin-DHhSZKv8.js +350 -0
- package/lib/GSAPPlugin-DHhSZKv8.js.map +1 -0
- package/lib/LayoutPlugin-B-DF9SYM.js +1271 -0
- package/lib/LayoutPlugin-B-DF9SYM.js.map +1 -0
- package/lib/SpinePlugin-Dz_3dljz.js +6077 -0
- package/lib/SpinePlugin-Dz_3dljz.js.map +1 -0
- package/lib/StatsPlugin-Cg82JMBD.js +70 -0
- package/lib/StatsPlugin-Cg82JMBD.js.map +1 -0
- package/lib/VoiceOverPlugin-BR3ImT8C.js +114 -0
- package/lib/VoiceOverPlugin-BR3ImT8C.js.map +1 -0
- package/lib/caper.mjs +1233 -0
- package/lib/caper.mjs.map +1 -0
- package/lib/core/Application.d.ts +268 -0
- package/lib/core/Application.d.ts.map +1 -0
- package/lib/core/config.d.ts +39 -0
- package/lib/core/config.d.ts.map +1 -0
- package/lib/core/create.d.ts +41 -0
- package/lib/core/create.d.ts.map +1 -0
- package/lib/core/globals.d.ts +51 -0
- package/lib/core/globals.d.ts.map +1 -0
- package/lib/core/index.d.ts +7 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/interfaces/IApplication.d.ts +566 -0
- package/lib/core/interfaces/IApplication.d.ts.map +1 -0
- package/lib/core/interfaces/IApplicationOptions.d.ts +65 -0
- package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -0
- package/lib/core/interfaces/ICoreFunctions.d.ts +49 -0
- package/lib/core/interfaces/ICoreFunctions.d.ts.map +1 -0
- package/lib/core/interfaces/ICoreSignals.d.ts +57 -0
- package/lib/core/interfaces/ICoreSignals.d.ts.map +1 -0
- package/lib/core/interfaces/IStorageCapability.d.ts +20 -0
- package/lib/core/interfaces/IStorageCapability.d.ts.map +1 -0
- package/lib/core/interfaces/IStorageCapability.test.d.ts +2 -0
- package/lib/core/interfaces/IStorageCapability.test.d.ts.map +1 -0
- package/lib/core/interfaces/index.d.ts +7 -0
- package/lib/core/interfaces/index.d.ts.map +1 -0
- package/lib/core/registries.d.ts +8 -0
- package/lib/core/registries.d.ts.map +1 -0
- package/lib/core/types.d.ts +12 -0
- package/lib/core/types.d.ts.map +1 -0
- package/lib/display/AnimatedSprite.d.ts +40 -0
- package/lib/display/AnimatedSprite.d.ts.map +1 -0
- package/lib/display/Camera.d.ts +102 -0
- package/lib/display/Camera.d.ts.map +1 -0
- package/lib/display/Container.d.ts +115 -0
- package/lib/display/Container.d.ts.map +1 -0
- package/lib/display/Entity.d.ts +46 -0
- package/lib/display/Entity.d.ts.map +1 -0
- package/lib/display/ParticleContainer.d.ts +58 -0
- package/lib/display/ParticleContainer.d.ts.map +1 -0
- package/lib/display/Scene.d.ts +250 -0
- package/lib/display/Scene.d.ts.map +1 -0
- package/lib/display/SceneTransition.d.ts +41 -0
- package/lib/display/SceneTransition.d.ts.map +1 -0
- package/lib/display/SpineAnimation.d.ts +76 -0
- package/lib/display/SpineAnimation.d.ts.map +1 -0
- package/lib/display/Svg.d.ts +5 -0
- package/lib/display/Svg.d.ts.map +1 -0
- package/lib/display/index.d.ts +10 -0
- package/lib/display/index.d.ts.map +1 -0
- package/lib/env.d.ts +6 -0
- package/lib/hello.d.ts +2 -0
- package/lib/hello.d.ts.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/mixins/animated.d.ts +53 -0
- package/lib/mixins/animated.d.ts.map +1 -0
- package/lib/mixins/factory/Factory.d.ts +8 -0
- package/lib/mixins/factory/Factory.d.ts.map +1 -0
- package/lib/mixins/factory/const.d.ts +67 -0
- package/lib/mixins/factory/const.d.ts.map +1 -0
- package/lib/mixins/factory/index.d.ts +8 -0
- package/lib/mixins/factory/index.d.ts.map +1 -0
- package/lib/mixins/factory/methods.d.ts +3 -0
- package/lib/mixins/factory/methods.d.ts.map +1 -0
- package/lib/mixins/factory/props.d.ts +160 -0
- package/lib/mixins/factory/props.d.ts.map +1 -0
- package/lib/mixins/factory/registry.d.ts +27 -0
- package/lib/mixins/factory/registry.d.ts.map +1 -0
- package/lib/mixins/factory/registry.test.d.ts +2 -0
- package/lib/mixins/factory/registry.test.d.ts.map +1 -0
- package/lib/mixins/factory/schema.d.ts +71 -0
- package/lib/mixins/factory/schema.d.ts.map +1 -0
- package/lib/mixins/factory/ui-registry.d.ts +20 -0
- package/lib/mixins/factory/ui-registry.d.ts.map +1 -0
- package/lib/mixins/factory/utils.d.ts +11 -0
- package/lib/mixins/factory/utils.d.ts.map +1 -0
- package/lib/mixins/focus.d.ts +15 -0
- package/lib/mixins/focus.d.ts.map +1 -0
- package/lib/mixins/index.d.ts +6 -0
- package/lib/mixins/index.d.ts.map +1 -0
- package/lib/mixins/interaction.d.ts +20 -0
- package/lib/mixins/interaction.d.ts.map +1 -0
- package/lib/mixins/signals.d.ts +15 -0
- package/lib/mixins/signals.d.ts.map +1 -0
- package/lib/plugins/AssetsPlugin.d.ts +79 -0
- package/lib/plugins/AssetsPlugin.d.ts.map +1 -0
- package/lib/plugins/DataAdapter.d.ts +95 -0
- package/lib/plugins/DataAdapter.d.ts.map +1 -0
- package/lib/plugins/DevToolsPlugin.d.ts +97 -0
- package/lib/plugins/DevToolsPlugin.d.ts.map +1 -0
- package/lib/plugins/FullScreenPlugin.d.ts +240 -0
- package/lib/plugins/FullScreenPlugin.d.ts.map +1 -0
- package/lib/plugins/GSAPPlugin.d.ts +634 -0
- package/lib/plugins/GSAPPlugin.d.ts.map +1 -0
- package/lib/plugins/KeyboardPlugin.d.ts +53 -0
- package/lib/plugins/KeyboardPlugin.d.ts.map +1 -0
- package/lib/plugins/LayoutPlugin.d.ts +100 -0
- package/lib/plugins/LayoutPlugin.d.ts.map +1 -0
- package/lib/plugins/LookupPlugin.d.ts +223 -0
- package/lib/plugins/LookupPlugin.d.ts.map +1 -0
- package/lib/plugins/Plugin.d.ts +132 -0
- package/lib/plugins/Plugin.d.ts.map +1 -0
- package/lib/plugins/Plugin.test.d.ts +2 -0
- package/lib/plugins/Plugin.test.d.ts.map +1 -0
- package/lib/plugins/PopupManagerPlugin.d.ts +108 -0
- package/lib/plugins/PopupManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/ResizerPlugin.d.ts +62 -0
- package/lib/plugins/ResizerPlugin.d.ts.map +1 -0
- package/lib/plugins/SceneManagerPlugin.d.ts +122 -0
- package/lib/plugins/SceneManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/StatsPlugin.d.ts +8 -0
- package/lib/plugins/StatsPlugin.d.ts.map +1 -0
- package/lib/plugins/TimerPlugin.d.ts +401 -0
- package/lib/plugins/TimerPlugin.d.ts.map +1 -0
- package/lib/plugins/WebEventsPlugin.d.ts +60 -0
- package/lib/plugins/WebEventsPlugin.d.ts.map +1 -0
- package/lib/plugins/actions/ActionsPlugin.d.ts +39 -0
- package/lib/plugins/actions/ActionsPlugin.d.ts.map +1 -0
- package/lib/plugins/actions/constants.d.ts +52 -0
- package/lib/plugins/actions/constants.d.ts.map +1 -0
- package/lib/plugins/actions/index.d.ts +5 -0
- package/lib/plugins/actions/index.d.ts.map +1 -0
- package/lib/plugins/actions/methods.d.ts +11 -0
- package/lib/plugins/actions/methods.d.ts.map +1 -0
- package/lib/plugins/actions/types.d.ts +25 -0
- package/lib/plugins/actions/types.d.ts.map +1 -0
- package/lib/plugins/audio/AudioChannel.d.ts +46 -0
- package/lib/plugins/audio/AudioChannel.d.ts.map +1 -0
- package/lib/plugins/audio/AudioChannel.test.d.ts +2 -0
- package/lib/plugins/audio/AudioChannel.test.d.ts.map +1 -0
- package/lib/plugins/audio/AudioInstance.d.ts +79 -0
- package/lib/plugins/audio/AudioInstance.d.ts.map +1 -0
- package/lib/plugins/audio/AudioManagerPlugin.d.ts +323 -0
- package/lib/plugins/audio/AudioManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/audio/VoiceOverPlugin.d.ts +69 -0
- package/lib/plugins/audio/VoiceOverPlugin.d.ts.map +1 -0
- package/lib/plugins/audio/index.d.ts +4 -0
- package/lib/plugins/audio/index.d.ts.map +1 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.d.ts +109 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.d.ts.map +1 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.test.d.ts +2 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.test.d.ts.map +1 -0
- package/lib/plugins/breakpoints/evaluate.d.ts +53 -0
- package/lib/plugins/breakpoints/evaluate.d.ts.map +1 -0
- package/lib/plugins/breakpoints/evaluate.test.d.ts +2 -0
- package/lib/plugins/breakpoints/evaluate.test.d.ts.map +1 -0
- package/lib/plugins/breakpoints/index.d.ts +4 -0
- package/lib/plugins/breakpoints/index.d.ts.map +1 -0
- package/lib/plugins/breakpoints/methods.d.ts +23 -0
- package/lib/plugins/breakpoints/methods.d.ts.map +1 -0
- package/lib/plugins/breakpoints/types.d.ts +70 -0
- package/lib/plugins/breakpoints/types.d.ts.map +1 -0
- package/lib/plugins/captions/CaptionsPlugin.d.ts +150 -0
- package/lib/plugins/captions/CaptionsPlugin.d.ts.map +1 -0
- package/lib/plugins/captions/CaptionsRenderer.d.ts +37 -0
- package/lib/plugins/captions/CaptionsRenderer.d.ts.map +1 -0
- package/lib/plugins/captions/index.d.ts +3 -0
- package/lib/plugins/captions/index.d.ts.map +1 -0
- package/lib/plugins/defaults.d.ts +4 -0
- package/lib/plugins/defaults.d.ts.map +1 -0
- package/lib/plugins/focus/FocusManagerPlugin.d.ts +148 -0
- package/lib/plugins/focus/FocusManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/focus/FocusOutliner.d.ts +32 -0
- package/lib/plugins/focus/FocusOutliner.d.ts.map +1 -0
- package/lib/plugins/focus/index.d.ts +3 -0
- package/lib/plugins/focus/index.d.ts.map +1 -0
- package/lib/plugins/i18nPlugin.d.ts +128 -0
- package/lib/plugins/i18nPlugin.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +18 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/input/AbstractControls.d.ts +8 -0
- package/lib/plugins/input/AbstractControls.d.ts.map +1 -0
- package/lib/plugins/input/Controls.d.ts +16 -0
- package/lib/plugins/input/Controls.d.ts.map +1 -0
- package/lib/plugins/input/InputPlugin.d.ts +52 -0
- package/lib/plugins/input/InputPlugin.d.ts.map +1 -0
- package/lib/plugins/input/constants.d.ts +8 -0
- package/lib/plugins/input/constants.d.ts.map +1 -0
- package/lib/plugins/input/index.d.ts +10 -0
- package/lib/plugins/input/index.d.ts.map +1 -0
- package/lib/plugins/input/interfaces.d.ts +30 -0
- package/lib/plugins/input/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts +28 -0
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/index.d.ts +3 -0
- package/lib/plugins/input/keyboard/index.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/interfaces.d.ts +18 -0
- package/lib/plugins/input/keyboard/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/methods.d.ts +4 -0
- package/lib/plugins/input/methods.d.ts.map +1 -0
- package/lib/plugins/input/touch/TouchControls.d.ts +35 -0
- package/lib/plugins/input/touch/TouchControls.d.ts.map +1 -0
- package/lib/plugins/input/touch/constants.d.ts +14 -0
- package/lib/plugins/input/touch/constants.d.ts.map +1 -0
- package/lib/plugins/input/touch/index.d.ts +4 -0
- package/lib/plugins/input/touch/index.d.ts.map +1 -0
- package/lib/plugins/input/touch/interfaces.d.ts +15 -0
- package/lib/plugins/input/touch/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/types.d.ts +32 -0
- package/lib/plugins/input/types.d.ts.map +1 -0
- package/lib/plugins/input/utils.d.ts +23 -0
- package/lib/plugins/input/utils.d.ts.map +1 -0
- package/lib/plugins/spine/SpinePlugin.d.ts +6 -0
- package/lib/plugins/spine/SpinePlugin.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/BatchableSpineSlot.d.ts +31 -0
- package/lib/plugins/spine/pixi-spine/BatchableSpineSlot.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/Spine.d.ts +211 -0
- package/lib/plugins/spine/pixi-spine/Spine.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpineDebugRenderer.d.ts +81 -0
- package/lib/plugins/spine/pixi-spine/SpineDebugRenderer.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpinePipe.d.ts +21 -0
- package/lib/plugins/spine/pixi-spine/SpinePipe.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpineTexture.d.ts +16 -0
- package/lib/plugins/spine/pixi-spine/SpineTexture.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/assets/atlasLoader.d.ts +10 -0
- package/lib/plugins/spine/pixi-spine/assets/atlasLoader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/assets/skeletonLoader.d.ts +6 -0
- package/lib/plugins/spine/pixi-spine/assets/skeletonLoader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.d.ts +5 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatcher.d.ts +22 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatcher.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintShader.d.ts +5 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintShader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/darkTintBit.d.ts +51 -0
- package/lib/plugins/spine/pixi-spine/darktint/darkTintBit.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/index.d.ts +9 -0
- package/lib/plugins/spine/pixi-spine/index.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/require-shim.d.ts +34 -0
- package/lib/plugins/spine/pixi-spine/require-shim.d.ts.map +1 -0
- package/lib/registries-CYCaYKZI.js +6885 -0
- package/lib/registries-CYCaYKZI.js.map +1 -0
- package/lib/signals/Signal.d.ts +16 -0
- package/lib/signals/Signal.d.ts.map +1 -0
- package/lib/signals/Signal.test.d.ts +2 -0
- package/lib/signals/Signal.test.d.ts.map +1 -0
- package/lib/signals/index.d.ts +3 -0
- package/lib/signals/index.d.ts.map +1 -0
- package/lib/store/Store.d.ts +56 -0
- package/lib/store/Store.d.ts.map +1 -0
- package/lib/store/Store.test.d.ts +2 -0
- package/lib/store/Store.test.d.ts.map +1 -0
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/types/framework.d.ts +46 -0
- package/lib/types/gsap.d.ts +23 -0
- package/lib/ui/Button.d.ts +162 -0
- package/lib/ui/Button.d.ts.map +1 -0
- package/lib/ui/FlexContainer.d.ts +109 -0
- package/lib/ui/FlexContainer.d.ts.map +1 -0
- package/lib/ui/Input.d.ts +384 -0
- package/lib/ui/Input.d.ts.map +1 -0
- package/lib/ui/Joystick.d.ts +61 -0
- package/lib/ui/Joystick.d.ts.map +1 -0
- package/lib/ui/Popup.d.ts +109 -0
- package/lib/ui/Popup.d.ts.map +1 -0
- package/lib/ui/Toast.d.ts +131 -0
- package/lib/ui/Toast.d.ts.map +1 -0
- package/lib/ui/Toaster.d.ts +188 -0
- package/lib/ui/Toaster.d.ts.map +1 -0
- package/lib/ui/UICanvas.d.ts +155 -0
- package/lib/ui/UICanvas.d.ts.map +1 -0
- package/lib/ui/index.d.ts +9 -0
- package/lib/ui/index.d.ts.map +1 -0
- package/lib/utils/array.d.ts +11 -0
- package/lib/utils/array.d.ts.map +1 -0
- package/lib/utils/bind.d.ts +21 -0
- package/lib/utils/bind.d.ts.map +1 -0
- package/lib/utils/canvas.d.ts +2 -0
- package/lib/utils/canvas.d.ts.map +1 -0
- package/lib/utils/color.d.ts +66 -0
- package/lib/utils/color.d.ts.map +1 -0
- package/lib/utils/console/Logger.d.ts +15 -0
- package/lib/utils/console/Logger.d.ts.map +1 -0
- package/lib/utils/console/index.d.ts +2 -0
- package/lib/utils/console/index.d.ts.map +1 -0
- package/lib/utils/debug.d.ts +34 -0
- package/lib/utils/debug.d.ts.map +1 -0
- package/lib/utils/define.d.ts +100 -0
- package/lib/utils/define.d.ts.map +1 -0
- package/lib/utils/env.d.ts +4 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/events.d.ts +12 -0
- package/lib/utils/events.d.ts.map +1 -0
- package/lib/utils/framework.d.ts +12 -0
- package/lib/utils/framework.d.ts.map +1 -0
- package/lib/utils/index.d.ts +28 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/map.d.ts +31 -0
- package/lib/utils/map.d.ts.map +1 -0
- package/lib/utils/math.d.ts +15 -0
- package/lib/utils/math.d.ts.map +1 -0
- package/lib/utils/misc.d.ts +13 -0
- package/lib/utils/misc.d.ts.map +1 -0
- package/lib/utils/number.d.ts +2 -0
- package/lib/utils/number.d.ts.map +1 -0
- package/lib/utils/object.d.ts +21 -0
- package/lib/utils/object.d.ts.map +1 -0
- package/lib/utils/padding.d.ts +4 -0
- package/lib/utils/padding.d.ts.map +1 -0
- package/lib/utils/pixi.d.ts +42 -0
- package/lib/utils/pixi.d.ts.map +1 -0
- package/lib/utils/platform.d.ts +20 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/point.d.ts +66 -0
- package/lib/utils/point.d.ts.map +1 -0
- package/lib/utils/promise/Queue.d.ts +60 -0
- package/lib/utils/promise/Queue.d.ts.map +1 -0
- package/lib/utils/promise/functions.d.ts +14 -0
- package/lib/utils/promise/functions.d.ts.map +1 -0
- package/lib/utils/promise/index.d.ts +3 -0
- package/lib/utils/promise/index.d.ts.map +1 -0
- package/lib/utils/random.d.ts +42 -0
- package/lib/utils/random.d.ts.map +1 -0
- package/lib/utils/rect.d.ts +26 -0
- package/lib/utils/rect.d.ts.map +1 -0
- package/lib/utils/set.d.ts +15 -0
- package/lib/utils/set.d.ts.map +1 -0
- package/lib/utils/string.d.ts +3 -0
- package/lib/utils/string.d.ts.map +1 -0
- package/lib/utils/text.d.ts +3 -0
- package/lib/utils/text.d.ts.map +1 -0
- package/lib/utils/typefilters.d.ts +4 -0
- package/lib/utils/typefilters.d.ts.map +1 -0
- package/lib/utils/types.d.ts +209 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/vite.d.ts +25 -0
- package/lib/utils/vite.d.ts.map +1 -0
- package/lib/utils/web.d.ts +3 -0
- package/lib/utils/web.d.ts.map +1 -0
- package/lib/version.d.ts +3 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/webgl-check.d.ts +2 -0
- package/lib/webgl-check.d.ts.map +1 -0
- package/package.json +138 -0
- package/src/core/Application.ts +1091 -0
- package/src/core/config.ts +168 -0
- package/src/core/create.ts +186 -0
- package/src/core/globals.ts +299 -0
- package/src/core/index.ts +6 -0
- package/src/core/interfaces/IApplication.ts +628 -0
- package/src/core/interfaces/IApplicationOptions.ts +81 -0
- package/src/core/interfaces/ICoreFunctions.ts +86 -0
- package/src/core/interfaces/ICoreSignals.ts +77 -0
- package/src/core/interfaces/IStorageCapability.test.ts +27 -0
- package/src/core/interfaces/IStorageCapability.ts +26 -0
- package/src/core/interfaces/index.ts +6 -0
- package/src/core/registries.ts +7 -0
- package/src/core/types.ts +13 -0
- package/src/display/AnimatedSprite.ts +227 -0
- package/src/display/Camera.ts +371 -0
- package/src/display/Container.ts +240 -0
- package/src/display/Entity.ts +50 -0
- package/src/display/ParticleContainer.ts +107 -0
- package/src/display/Scene.ts +305 -0
- package/src/display/SceneTransition.ts +108 -0
- package/src/display/SpineAnimation.ts +170 -0
- package/src/display/Svg.ts +9 -0
- package/src/display/index.ts +11 -0
- package/src/env.d.ts +6 -0
- package/src/hello.ts +20 -0
- package/src/index.ts +17 -0
- package/src/mixins/animated.ts +340 -0
- package/src/mixins/factory/Factory.ts +24 -0
- package/src/mixins/factory/const.ts +363 -0
- package/src/mixins/factory/index.ts +7 -0
- package/src/mixins/factory/methods.ts +21 -0
- package/src/mixins/factory/props.ts +207 -0
- package/src/mixins/factory/registry.test.ts +83 -0
- package/src/mixins/factory/registry.ts +61 -0
- package/src/mixins/factory/schema.ts +153 -0
- package/src/mixins/factory/ui-registry.ts +54 -0
- package/src/mixins/factory/utils.ts +130 -0
- package/src/mixins/focus.ts +124 -0
- package/src/mixins/index.ts +5 -0
- package/src/mixins/interaction.ts +74 -0
- package/src/mixins/signals.ts +49 -0
- package/src/plugins/AssetsPlugin.ts +407 -0
- package/src/plugins/DataAdapter.ts +259 -0
- package/src/plugins/DevToolsPlugin.ts +103 -0
- package/src/plugins/FullScreenPlugin.ts +359 -0
- package/src/plugins/GSAPPlugin.ts +811 -0
- package/src/plugins/KeyboardPlugin.ts +160 -0
- package/src/plugins/LayoutPlugin.ts +127 -0
- package/src/plugins/LookupPlugin.ts +308 -0
- package/src/plugins/Plugin.test.ts +73 -0
- package/src/plugins/Plugin.ts +200 -0
- package/src/plugins/PopupManagerPlugin.ts +263 -0
- package/src/plugins/ResizerPlugin.ts +220 -0
- package/src/plugins/SceneManagerPlugin.ts +669 -0
- package/src/plugins/StatsPlugin.ts +24 -0
- package/src/plugins/TimerPlugin.ts +841 -0
- package/src/plugins/WebEventsPlugin.ts +132 -0
- package/src/plugins/actions/ActionsPlugin.ts +113 -0
- package/src/plugins/actions/constants.ts +45 -0
- package/src/plugins/actions/index.ts +4 -0
- package/src/plugins/actions/methods.ts +28 -0
- package/src/plugins/actions/types.ts +47 -0
- package/src/plugins/audio/AudioChannel.test.ts +101 -0
- package/src/plugins/audio/AudioChannel.ts +164 -0
- package/src/plugins/audio/AudioInstance.ts +228 -0
- package/src/plugins/audio/AudioManagerPlugin.ts +903 -0
- package/src/plugins/audio/VoiceOverPlugin.ts +354 -0
- package/src/plugins/audio/index.ts +3 -0
- package/src/plugins/breakpoints/BreakpointPlugin.test.ts +228 -0
- package/src/plugins/breakpoints/BreakpointPlugin.ts +293 -0
- package/src/plugins/breakpoints/evaluate.test.ts +239 -0
- package/src/plugins/breakpoints/evaluate.ts +201 -0
- package/src/plugins/breakpoints/index.ts +3 -0
- package/src/plugins/breakpoints/methods.ts +22 -0
- package/src/plugins/breakpoints/types.ts +86 -0
- package/src/plugins/captions/CaptionsPlugin.ts +468 -0
- package/src/plugins/captions/CaptionsRenderer.ts +184 -0
- package/src/plugins/captions/font/Sans.fnt +116 -0
- package/src/plugins/captions/font/Sans.png +0 -0
- package/src/plugins/captions/index.ts +2 -0
- package/src/plugins/defaults.ts +95 -0
- package/src/plugins/focus/FocusManagerPlugin.ts +773 -0
- package/src/plugins/focus/FocusOutliner.ts +111 -0
- package/src/plugins/focus/index.ts +2 -0
- package/src/plugins/i18nPlugin.ts +284 -0
- package/src/plugins/index.ts +17 -0
- package/src/plugins/input/AbstractControls.ts +15 -0
- package/src/plugins/input/Controls.ts +55 -0
- package/src/plugins/input/InputPlugin.ts +168 -0
- package/src/plugins/input/constants.ts +12 -0
- package/src/plugins/input/index.ts +9 -0
- package/src/plugins/input/interfaces.ts +37 -0
- package/src/plugins/input/keyboard/KeyboardContols.ts +182 -0
- package/src/plugins/input/keyboard/index.ts +2 -0
- package/src/plugins/input/keyboard/interfaces.ts +21 -0
- package/src/plugins/input/methods.ts +9 -0
- package/src/plugins/input/touch/TouchControls.ts +237 -0
- package/src/plugins/input/touch/constants.ts +34 -0
- package/src/plugins/input/touch/index.ts +3 -0
- package/src/plugins/input/touch/interfaces.ts +15 -0
- package/src/plugins/input/types.ts +41 -0
- package/src/plugins/input/utils.ts +10 -0
- package/src/plugins/spine/SpinePlugin.ts +14 -0
- package/src/plugins/spine/pixi-spine/BatchableSpineSlot.ts +138 -0
- package/src/plugins/spine/pixi-spine/Spine.ts +897 -0
- package/src/plugins/spine/pixi-spine/SpineDebugRenderer.ts +615 -0
- package/src/plugins/spine/pixi-spine/SpinePipe.ts +197 -0
- package/src/plugins/spine/pixi-spine/SpineTexture.ts +143 -0
- package/src/plugins/spine/pixi-spine/assets/atlasLoader.ts +156 -0
- package/src/plugins/spine/pixi-spine/assets/skeletonLoader.ts +80 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.ts +92 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintBatcher.ts +186 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintShader.ts +74 -0
- package/src/plugins/spine/pixi-spine/darktint/darkTintBit.ts +77 -0
- package/src/plugins/spine/pixi-spine/index.ts +43 -0
- package/src/plugins/spine/pixi-spine/require-shim.ts +43 -0
- package/src/signals/Signal.test.ts +54 -0
- package/src/signals/Signal.ts +68 -0
- package/src/signals/index.ts +10 -0
- package/src/store/Store.test.ts +146 -0
- package/src/store/Store.ts +192 -0
- package/src/store/index.ts +1 -0
- package/src/types/framework.d.ts +47 -0
- package/src/types/gsap.d.ts +26 -0
- package/src/ui/Button.ts +454 -0
- package/src/ui/FlexContainer.ts +526 -0
- package/src/ui/Input.ts +1274 -0
- package/src/ui/Joystick.ts +288 -0
- package/src/ui/Popup.ts +242 -0
- package/src/ui/Toast.ts +399 -0
- package/src/ui/Toaster.ts +409 -0
- package/src/ui/UICanvas.ts +812 -0
- package/src/ui/index.ts +8 -0
- package/src/utils/array.ts +24 -0
- package/src/utils/bind.ts +79 -0
- package/src/utils/canvas.ts +26 -0
- package/src/utils/color.ts +126 -0
- package/src/utils/console/Logger.ts +86 -0
- package/src/utils/console/index.ts +1 -0
- package/src/utils/debug.ts +69 -0
- package/src/utils/define.ts +120 -0
- package/src/utils/env.ts +3 -0
- package/src/utils/events.ts +10 -0
- package/src/utils/framework.ts +45 -0
- package/src/utils/index.ts +27 -0
- package/src/utils/map.ts +59 -0
- package/src/utils/math.ts +19 -0
- package/src/utils/misc.ts +45 -0
- package/src/utils/number.ts +3 -0
- package/src/utils/object.ts +43 -0
- package/src/utils/padding.ts +43 -0
- package/src/utils/pixi.ts +116 -0
- package/src/utils/platform.ts +33 -0
- package/src/utils/point.ts +123 -0
- package/src/utils/promise/Queue.ts +125 -0
- package/src/utils/promise/functions.ts +16 -0
- package/src/utils/promise/index.ts +2 -0
- package/src/utils/random.ts +69 -0
- package/src/utils/rect.ts +50 -0
- package/src/utils/set.ts +32 -0
- package/src/utils/string.ts +9 -0
- package/src/utils/text.ts +30 -0
- package/src/utils/typefilters.ts +29 -0
- package/src/utils/types.ts +426 -0
- package/src/utils/vite.ts +41 -0
- package/src/utils/web.ts +7 -0
- package/src/version.ts +3 -0
- package/src/webgl-check.ts +12 -0
- package/templates/app/default/.eslintrc.json +21 -0
- package/templates/app/default/.meta.json +4 -0
- package/templates/app/default/.nvmrc +1 -0
- package/templates/app/default/.prettierrc.json +7 -0
- package/templates/app/default/README.md +8 -0
- package/templates/app/default/assets/audio{m}/music/Cheerful Annoyance.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Drumming Sticks.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Game Over.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Mishief Stroll.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Night at the Beach.ogg +0 -0
- package/templates/app/default/assets/audio{m}/sfx/click.ogg +0 -0
- package/templates/app/default/assets/audio{m}/sfx/hover.ogg +0 -0
- package/templates/app/default/assets/required{m}/caper.png +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Bold{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Medium{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Regular{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/Syncopate-Bold{family=Syncopate}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/blue.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/green.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/grey.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/orange.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/purple.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/red.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/yellow.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/down.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/over.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/up.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/down.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/over.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/up.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/joystick/base.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/joystick/handle.png +0 -0
- package/templates/app/default/assets/required{m}/wordmark.svg +1 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro.png +0 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro.skel +0 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro{fix}.atlas +94 -0
- package/templates/app/default/caper.config.ts +60 -0
- package/templates/app/default/index.html +23 -0
- package/templates/app/default/package.template.json +17 -0
- package/templates/app/default/public/favicon.ico +0 -0
- package/templates/app/default/src/__APPLICATION_NAME__.ts +3 -0
- package/templates/app/default/src/main.ts +9 -0
- package/templates/app/default/src/scenes/Base.ts +39 -0
- package/templates/app/default/src/scenes/Game.ts +34 -0
- package/templates/app/default/src/scenes/Splash.ts +70 -0
- package/templates/app/default/src/scenes/Start.ts +90 -0
- package/templates/app/default/src/utils/Constants.ts +3 -0
- package/templates/app/default/tsconfig.json +1 -0
- package/templates/plugin/package.template.json +33 -0
- package/templates/plugin/src/Plugin.template.ts +24 -0
- package/templates/plugin/src/index.template.ts +3 -0
- package/templates/plugin/tsconfig.template.json +43 -0
- package/templates/plugin/vite-env.template.d.ts +16 -0
- package/templates/plugin/vite.config.template.ts +19 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Collector, CollectorArray, CollectorLast, CollectorUntil0, CollectorWhile0, SignalConnection, SignalConnections, Signal as TsSignal } from 'typed-signals';
|
|
2
|
+
export type SignalOrder = 'highest' | 'high' | 'normal' | 'low' | 'lower' | 'lowest' | number;
|
|
3
|
+
declare class Signal<THandler extends (...args: any[]) => any> extends TsSignal<THandler> {
|
|
4
|
+
connectOnce(callback: THandler, order?: SignalOrder): SignalConnection;
|
|
5
|
+
connectNTimes(callback: THandler, times: number, order?: SignalOrder): SignalConnection;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to this signal.
|
|
8
|
+
*
|
|
9
|
+
* @param callback This callback will be run when emit() is called.
|
|
10
|
+
* @param order Handlers with a higher order value will be called later.
|
|
11
|
+
*/
|
|
12
|
+
connect(callback: THandler, order?: SignalOrder): SignalConnection;
|
|
13
|
+
}
|
|
14
|
+
export { Collector, CollectorArray, CollectorLast, CollectorUntil0, CollectorWhile0, Signal, SignalConnections };
|
|
15
|
+
export type { SignalConnection };
|
|
16
|
+
//# sourceMappingURL=Signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Signal.d.ts","sourceRoot":"","sources":["../../src/signals/Signal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,MAAM,IAAI,QAAQ,EACnB,MAAM,eAAe,CAAC;AAYvB,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9F,cAAM,MAAM,CAAC,QAAQ,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAE,SAAQ,QAAQ,CAAC,QAAQ,CAAC;IAExE,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,gBAAgB;IAatE,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,gBAAgB;IAe9F;;;;;OAKG;IACI,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAE,WAAsB,GAAG,gBAAgB;CAIpF;AAGD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;AACjH,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Signal.test.d.ts","sourceRoot":"","sources":["../../src/signals/Signal.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IApplication } from '../core';
|
|
2
|
+
import { IStorageCapability } from '../core/interfaces/IStorageCapability';
|
|
3
|
+
import { Signal } from '../signals';
|
|
4
|
+
import { AppTypeOverrides } from '../utils';
|
|
5
|
+
export type StoreErrorDetail = {
|
|
6
|
+
adapterId: string;
|
|
7
|
+
operation: 'save' | 'load';
|
|
8
|
+
key: string;
|
|
9
|
+
error: Error;
|
|
10
|
+
};
|
|
11
|
+
type AppPlugins = AppTypeOverrides['Plugins'];
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for a single save call.
|
|
14
|
+
*/
|
|
15
|
+
type AdapterSaveConfig = {
|
|
16
|
+
adapterId: string;
|
|
17
|
+
awaitSave: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Thin façade over the Application's plugin registry.
|
|
21
|
+
*
|
|
22
|
+
* A "storage adapter" is nothing more than a `Plugin` whose instance implements
|
|
23
|
+
* {@link IStorageCapability}. The `Store` doesn't own a second registry — it
|
|
24
|
+
* just filters `app._plugins` for storage-capable entries and routes save/load
|
|
25
|
+
* calls through them.
|
|
26
|
+
*/
|
|
27
|
+
export interface IStore {
|
|
28
|
+
initialize(app: IApplication): IStore;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
getAdapter<T extends IStorageCapability = IStorageCapability>(adapterId: AppPlugins): T;
|
|
31
|
+
hasAdapter(adapterId: AppPlugins): boolean;
|
|
32
|
+
save(adapterId: AppPlugins | AppPlugins[] | Partial<AdapterSaveConfig> | Partial<AdapterSaveConfig>[], key: string, data: any, awaitSave?: boolean): Promise<any>;
|
|
33
|
+
load(adapterId: AppPlugins, key: string): Promise<any>;
|
|
34
|
+
onError: Signal<(detail: StoreErrorDetail) => void>;
|
|
35
|
+
}
|
|
36
|
+
export declare class Store implements IStore {
|
|
37
|
+
readonly onError: Signal<(detail: StoreErrorDetail) => void>;
|
|
38
|
+
private _app;
|
|
39
|
+
initialize(app: IApplication): IStore;
|
|
40
|
+
destroy(): void;
|
|
41
|
+
private _emitError;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a storage-capable plugin by id. Throws if the plugin is missing or
|
|
44
|
+
* does not implement {@link IStorageCapability}.
|
|
45
|
+
*/
|
|
46
|
+
getAdapter<T extends IStorageCapability = IStorageCapability>(adapterId: AppPlugins): T;
|
|
47
|
+
hasAdapter(adapterId: AppPlugins): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Iterates every storage-capable plugin currently registered with the app.
|
|
50
|
+
*/
|
|
51
|
+
private allAdapterIds;
|
|
52
|
+
save(adapterId: AppPlugins | AppPlugins[] | Partial<AdapterSaveConfig> | Partial<AdapterSaveConfig>[], key: string, data: any, awaitSave?: boolean): Promise<any>;
|
|
53
|
+
load(adapterId: AppPlugins, key: string): Promise<any>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=Store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/store/Store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,u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KAAK,IAAI,EAAI;IAC3E,OAAO,CAAC,IAAI,CAAgB;IAErB,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM;IAKrC,OAAO,IAAI,IAAI;IAKtB,OAAO,CAAC,UAAU;IAOlB;;;OAGG;IACI,UAAU,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,EAAE,SAAS,EAAE,UAAU,GAAG,CAAC;IAWvF,UAAU,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO;IAKjD;;OAEG;IACH,OAAO,CAAC,aAAa;IAaR,IAAI,CACf,SAAS,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,EAAE,EAChG,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,EACT,SAAS,UAAO,GACf,OAAO,CAAC,GAAG,CAAC;IAgEF,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAapE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.test.d.ts","sourceRoot":"","sources":["../../src/store/Store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Application } from '../core/Application';
|
|
2
|
+
import { Action, ActionContext } from '../plugins';
|
|
3
|
+
import { DataSchema } from '../plugins/DataAdapter';
|
|
4
|
+
declare module '../utils/types' {
|
|
5
|
+
export interface AppTypeOverrides {
|
|
6
|
+
App: Application;
|
|
7
|
+
Data: DataSchema;
|
|
8
|
+
Contexts: ActionContext;
|
|
9
|
+
Actions: Action;
|
|
10
|
+
ActionMap: Record<string, Action>;
|
|
11
|
+
Scenes: string;
|
|
12
|
+
Plugins: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AssetTypeOverrides {
|
|
15
|
+
Texture: string;
|
|
16
|
+
TPSFrames: string;
|
|
17
|
+
SpriteSheet: string;
|
|
18
|
+
SpineData: string;
|
|
19
|
+
Audio: string;
|
|
20
|
+
FontFamily: string;
|
|
21
|
+
BitmapFontFamily: string;
|
|
22
|
+
Bundles: string;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare module '@caperjs/core' {
|
|
27
|
+
export interface AppTypeOverrides {
|
|
28
|
+
App: Application;
|
|
29
|
+
Data: DataSchema;
|
|
30
|
+
Contexts: ActionContext;
|
|
31
|
+
Actions: Action;
|
|
32
|
+
ActionMap: Record<string, Action>;
|
|
33
|
+
Scenes: string;
|
|
34
|
+
Plugins: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AssetTypeOverrides {
|
|
37
|
+
Texture: string;
|
|
38
|
+
TPSFrames: string;
|
|
39
|
+
SpriteSheet: string;
|
|
40
|
+
SpineData: string;
|
|
41
|
+
Audio: string;
|
|
42
|
+
FontFamily: string;
|
|
43
|
+
BitmapFontFamily: string;
|
|
44
|
+
Bundles: string;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AppTypeOverrides } from '../utils';
|
|
2
|
+
/**
|
|
3
|
+
* An interface for custom GSAP eases.
|
|
4
|
+
* This interface can be augmented in your application to provide strong typing for your custom eases.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* // src/types/custom-eases.d.ts
|
|
9
|
+
* declare module '@caperjs/core/types/gsap' {
|
|
10
|
+
* interface CustomEase {
|
|
11
|
+
* 'my-custom-ease': any;
|
|
12
|
+
* 'another-ease': any;
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
declare module 'gsap/gsap-core' {
|
|
19
|
+
// We can't directly augment the EaseString type alias, so we'll augment TweenVars instead.
|
|
20
|
+
interface TweenVars {
|
|
21
|
+
ease?: EaseString | AppTypeOverrides['CustomEases'];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { BitmapText, Cursor, DestroyOptions, FederatedEvent, FederatedPointerEvent, HTMLText, Sprite, Text } from 'pixi.js';
|
|
2
|
+
import { LayoutOptions } from '@pixi/layout';
|
|
3
|
+
import { IApplication } from '../core';
|
|
4
|
+
import { HTMLTextProps, TextProps } from '../mixins';
|
|
5
|
+
import { Signal } from '../signals';
|
|
6
|
+
import { AudioAsset, SpritesheetAsset, TextureAsset } from '../utils';
|
|
7
|
+
export type ButtonCallback = (() => void) | (() => Promise<void>);
|
|
8
|
+
export type ButtonAction = {
|
|
9
|
+
id: string | number;
|
|
10
|
+
data?: any;
|
|
11
|
+
};
|
|
12
|
+
export type ButtonActionOrCallback = ButtonAction | ButtonCallback;
|
|
13
|
+
type ButtonTextureId = 'default' | 'hover' | 'active' | 'disabled';
|
|
14
|
+
export interface IButton {
|
|
15
|
+
onDown: Signal<() => void>;
|
|
16
|
+
onUp: Signal<() => void>;
|
|
17
|
+
onUpOutside: Signal<() => void>;
|
|
18
|
+
onOut: Signal<() => void>;
|
|
19
|
+
onOver: Signal<() => void>;
|
|
20
|
+
onClick: Signal<() => void>;
|
|
21
|
+
onEnabled: Signal<() => void>;
|
|
22
|
+
onDisabled: Signal<() => void>;
|
|
23
|
+
onDestroy: Signal<() => void>;
|
|
24
|
+
onKeyboardEvent: Signal<(key: string) => void>;
|
|
25
|
+
view: Sprite;
|
|
26
|
+
isDown: boolean;
|
|
27
|
+
isOver: boolean;
|
|
28
|
+
id: string;
|
|
29
|
+
}
|
|
30
|
+
export type ButtonConfig = {
|
|
31
|
+
id: string;
|
|
32
|
+
textures: {
|
|
33
|
+
default: TextureAsset;
|
|
34
|
+
hover?: TextureAsset;
|
|
35
|
+
active?: TextureAsset;
|
|
36
|
+
disabled?: TextureAsset;
|
|
37
|
+
};
|
|
38
|
+
sounds?: {
|
|
39
|
+
hover?: AudioAsset;
|
|
40
|
+
out?: AudioAsset;
|
|
41
|
+
down?: AudioAsset;
|
|
42
|
+
click?: AudioAsset;
|
|
43
|
+
};
|
|
44
|
+
actions?: {
|
|
45
|
+
hover?: ButtonActionOrCallback;
|
|
46
|
+
out?: ButtonActionOrCallback;
|
|
47
|
+
down?: ButtonActionOrCallback;
|
|
48
|
+
click?: ButtonActionOrCallback;
|
|
49
|
+
};
|
|
50
|
+
textLabel?: Partial<TextProps | HTMLTextProps> & {
|
|
51
|
+
type?: 'text' | 'html' | 'bitmap';
|
|
52
|
+
};
|
|
53
|
+
cursor: Cursor;
|
|
54
|
+
disabledCursor: Cursor;
|
|
55
|
+
sheet: SpritesheetAsset;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
layout?: Omit<LayoutOptions, 'target'> | null | boolean;
|
|
58
|
+
};
|
|
59
|
+
export declare const ButtonConfigKeys: (keyof ButtonConfig)[];
|
|
60
|
+
declare const _Button: (new () => import('..').IFactory<{
|
|
61
|
+
existing: <TEntity>(entity: TEntity, props?: Partial<import('..').ExistingProps>) => TEntity;
|
|
62
|
+
container: (props?: Partial<import('..').ContainerProps> | undefined) => import('..').Container;
|
|
63
|
+
particleContainer: (props?: Partial<import('..').ParticleContainerProps> | undefined) => import('..').ParticleContainer;
|
|
64
|
+
texture: typeof import('..').resolveTexture;
|
|
65
|
+
sprite: (props?: Partial<import('..').SpriteProps> | undefined) => Sprite;
|
|
66
|
+
tilingSprite: (props?: Partial<import('..').TilingSpriteProps> | undefined) => import('pixi.js').TilingSprite;
|
|
67
|
+
animatedSprite: (props?: Partial<import('..').AnimatedSpriteProps> | undefined) => import('..').AnimatedSprite;
|
|
68
|
+
graphics: (props?: Partial<import('..').GraphicsProps> | undefined) => import('pixi.js').Graphics;
|
|
69
|
+
svg(props: import('..').WithRequiredProps<import('..').SvgProps, "ctx">): import('..').Svg;
|
|
70
|
+
text: (props?: Partial<TextProps> | undefined) => Text;
|
|
71
|
+
htmlText: (props?: Partial<HTMLTextProps> | undefined) => HTMLText;
|
|
72
|
+
bitmapText: (props?: Partial<import('..').BitmapTextProps> | undefined) => BitmapText;
|
|
73
|
+
button: (props?: Partial<import('..').ButtonProps> | undefined) => Button;
|
|
74
|
+
flexContainer: (props?: Partial<import('..').FlexContainerProps> | undefined) => import('./FlexContainer').FlexContainer;
|
|
75
|
+
uiCanvas: (props?: Partial<import('..').UICanvasFactoryProps> | undefined) => import('./UICanvas').UICanvas;
|
|
76
|
+
spine: (props?: Partial<import('..').SpineProps> | undefined) => import('..').Spine;
|
|
77
|
+
spineAnimation: <ANames extends string = string>(props?: Partial<import('..').SpineProps>) => import('..').SpineAnimation<ANames>;
|
|
78
|
+
toaster: (toasterConfig?: Partial<import('./Toaster').ToasterConfig>, defaultToastConfig?: Partial<import('./Toast').ToastConfig>) => import('./Toaster').Toaster;
|
|
79
|
+
entity: <K extends import('..').EntityId>(id: K, props?: import('..').EntityProps<K> & import('..').EntityFactoryProps) => import('..').EntityInstance<K>;
|
|
80
|
+
ui: <K extends import('..').UIId>(id: K, props?: import('..').UIProps<K> & import('..').EntityFactoryProps) => import('..').UIInstance<K>;
|
|
81
|
+
}>) & import('..').Constructor<import('..').ISignalContainer> & import('..').Constructor<import('..').IInteractive> & import('..').Constructor<import('..').IFocusable>;
|
|
82
|
+
/**
|
|
83
|
+
* @class
|
|
84
|
+
* @extends {Container}
|
|
85
|
+
* A class representing a button.
|
|
86
|
+
*/
|
|
87
|
+
export declare class Button extends _Button implements IButton {
|
|
88
|
+
onDown: Signal<() => void>;
|
|
89
|
+
onUp: Signal<() => void>;
|
|
90
|
+
onUpOutside: Signal<() => void>;
|
|
91
|
+
onOut: Signal<() => void>;
|
|
92
|
+
onOver: Signal<() => void>;
|
|
93
|
+
onClick: Signal<() => void>;
|
|
94
|
+
onEnabled: Signal<() => void>;
|
|
95
|
+
onDisabled: Signal<() => void>;
|
|
96
|
+
onKeyboardEvent: Signal<(key: string) => void>;
|
|
97
|
+
onDestroy: Signal<() => void>;
|
|
98
|
+
id: string;
|
|
99
|
+
view: Sprite;
|
|
100
|
+
isDown: boolean;
|
|
101
|
+
isOver: boolean;
|
|
102
|
+
protected config: ButtonConfig;
|
|
103
|
+
protected _isDownCallbacks: Map<string, () => void>;
|
|
104
|
+
private _isDownListenerAdded;
|
|
105
|
+
private _pointerId?;
|
|
106
|
+
private _textLabel?;
|
|
107
|
+
/**
|
|
108
|
+
* The text label of the button.
|
|
109
|
+
* @returns {Text | HTMLText | BitmapText | undefined} The text label instance.
|
|
110
|
+
*/
|
|
111
|
+
get textLabel(): Text | HTMLText | BitmapText | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* @constructor
|
|
114
|
+
* @param {Partial<ButtonConfig>} config - The configuration for the button.
|
|
115
|
+
*/
|
|
116
|
+
constructor(config: Partial<ButtonConfig>);
|
|
117
|
+
protected _enabled: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Sets the enabled state of the button.
|
|
120
|
+
* @param {boolean} enabled - Whether the button is enabled.
|
|
121
|
+
*/
|
|
122
|
+
set enabled(enabled: boolean);
|
|
123
|
+
addLabel<T extends Text | HTMLText | BitmapText>(config: (Partial<TextProps | HTMLTextProps> & {
|
|
124
|
+
type?: 'text' | 'html' | 'bitmap';
|
|
125
|
+
}) | T): T;
|
|
126
|
+
positionLabel(): void;
|
|
127
|
+
get enabled(): boolean;
|
|
128
|
+
get app(): IApplication;
|
|
129
|
+
destroy(options?: DestroyOptions): void;
|
|
130
|
+
focusOut(): void;
|
|
131
|
+
blur(): void;
|
|
132
|
+
getFocusArea(): import('pixi.js').Bounds;
|
|
133
|
+
addIsDownCallback(callbackId: string, callback: () => void): void;
|
|
134
|
+
removeIsDownCallback(callbackId: string): void;
|
|
135
|
+
setTexture(textureId: ButtonTextureId, texture: TextureAsset): void;
|
|
136
|
+
/**
|
|
137
|
+
* Sets the texture of the button to the hover texture and emits the onOver event.
|
|
138
|
+
*/
|
|
139
|
+
protected handlePointerOver(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Sets the texture of the button to the default texture and emits the onOut event.
|
|
142
|
+
*/
|
|
143
|
+
protected handlePointerOut(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Sets the isDown property to true and changes the texture of the button.
|
|
146
|
+
*/
|
|
147
|
+
protected handlePointerDown(e: FederatedEvent): void;
|
|
148
|
+
/**
|
|
149
|
+
* Removes the keyup event listener and emits the onPress and onUp events.
|
|
150
|
+
*/
|
|
151
|
+
protected handlePointerUp(e: FederatedEvent): void;
|
|
152
|
+
protected handleClick(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Handles the pointer up event.
|
|
155
|
+
*/
|
|
156
|
+
protected handlePointerUpOutside(e: PointerEvent | FederatedPointerEvent): void;
|
|
157
|
+
private _doAction;
|
|
158
|
+
private _checkIsDownCallbacks;
|
|
159
|
+
private _handleIsDownCallbacks;
|
|
160
|
+
}
|
|
161
|
+
export {};
|
|
162
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/ui/Button.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,MAAM,EACN,IAAI,EACL,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAsB,aAAa,EAAe,KAAK,SAAS,EAAe,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAkB,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,M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G;IACH,SAAS,CAAC,iBAAiB;IAuB3B;;OAEG;IACH,SAAS,CAAC,gBAAgB;IAgB1B;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,CAAC,EAAE,cAAc;IA4B7C;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,CAAC,EAAE,cAAc;IAY3C,SAAS,CAAC,WAAW;IAcrB;;OAEG;IACH,SAAS,CAAC,sBAAsB,CAAC,CAAC,EAAE,YAAY,GAAG,qBAAqB;IAcxE,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,sBAAsB;CAO/B"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { LayoutOptions, NumberValue } from '@pixi/layout';
|
|
2
|
+
import { BitmapText, Graphics, Container as PIXIContainer, Text } from 'pixi.js';
|
|
3
|
+
import { Container } from '../display';
|
|
4
|
+
import { Signal } from '../signals';
|
|
5
|
+
import { AppTypeOverrides, ContainerLike } from '../utils';
|
|
6
|
+
declare const _FlexContainer: (new () => import('..').IFactory<{
|
|
7
|
+
existing: <TEntity>(entity: TEntity, props?: Partial<import('..').ExistingProps>) => TEntity;
|
|
8
|
+
container: (props?: Partial<import('..').ContainerProps> | undefined) => Container;
|
|
9
|
+
particleContainer: (props?: Partial<import('..').ParticleContainerProps> | undefined) => import('..').ParticleContainer;
|
|
10
|
+
texture: typeof import('..').resolveTexture;
|
|
11
|
+
sprite: (props?: Partial<import('..').SpriteProps> | undefined) => import('pixi.js').Sprite;
|
|
12
|
+
tilingSprite: (props?: Partial<import('..').TilingSpriteProps> | undefined) => import('pixi.js').TilingSprite;
|
|
13
|
+
animatedSprite: (props?: Partial<import('..').AnimatedSpriteProps> | undefined) => import('..').AnimatedSprite;
|
|
14
|
+
graphics: (props?: Partial<import('..').GraphicsProps> | undefined) => Graphics;
|
|
15
|
+
svg(props: import('..').WithRequiredProps<import('..').SvgProps, "ctx">): import('..').Svg;
|
|
16
|
+
text: (props?: Partial<import('..').TextProps> | undefined) => Text;
|
|
17
|
+
htmlText: (props?: Partial<import('..').HTMLTextProps> | undefined) => import('pixi.js').HTMLText;
|
|
18
|
+
bitmapText: (props?: Partial<import('..').BitmapTextProps> | undefined) => BitmapText;
|
|
19
|
+
button: (props?: Partial<import('..').ButtonProps> | undefined) => import('./Button').Button;
|
|
20
|
+
flexContainer: (props?: Partial<import('..').FlexContainerProps> | undefined) => FlexContainer;
|
|
21
|
+
uiCanvas: (props?: Partial<import('..').UICanvasFactoryProps> | undefined) => import('./UICanvas').UICanvas;
|
|
22
|
+
spine: (props?: Partial<import('..').SpineProps> | undefined) => import('..').Spine;
|
|
23
|
+
spineAnimation: <ANames extends string = string>(props?: Partial<import('..').SpineProps>) => import('..').SpineAnimation<ANames>;
|
|
24
|
+
toaster: (toasterConfig?: Partial<import('./Toaster').ToasterConfig>, defaultToastConfig?: Partial<import('./Toast').ToastConfig>) => import('./Toaster').Toaster;
|
|
25
|
+
entity: <K extends import('..').EntityId>(id: K, props?: import('..').EntityProps<K> & import('..').EntityFactoryProps) => import('..').EntityInstance<K>;
|
|
26
|
+
ui: <K extends import('..').UIId>(id: K, props?: import('..').UIProps<K> & import('..').EntityFactoryProps) => import('..').UIInstance<K>;
|
|
27
|
+
}>) & import('..').Constructor<import('..').ISignalContainer>;
|
|
28
|
+
export declare function isText(child: PIXIContainer): child is Text | BitmapText;
|
|
29
|
+
export interface FlexContainerConfig {
|
|
30
|
+
bindTo?: ContainerLike;
|
|
31
|
+
bindToAppSize?: boolean;
|
|
32
|
+
autoLayoutChildren?: boolean;
|
|
33
|
+
layout?: Omit<LayoutOptions, 'target'> | null | boolean;
|
|
34
|
+
debug?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare const FlexContainerConfigKeys: (keyof FlexContainerConfig)[];
|
|
37
|
+
export type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse' | undefined;
|
|
38
|
+
export type FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse' | undefined;
|
|
39
|
+
export type AlignItems = 'center' | 'flex-start' | 'flex-end' | 'stretch' | 'baseline' | undefined;
|
|
40
|
+
export type JustifyContent = 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'flex-start' | 'flex-end' | undefined;
|
|
41
|
+
export type SizeNumber = NumberValue | 'auto' | 'intrinsic';
|
|
42
|
+
export declare class FlexContainer extends _FlexContainer {
|
|
43
|
+
onLayoutComplete: Signal<() => void>;
|
|
44
|
+
config: Partial<FlexContainerConfig>;
|
|
45
|
+
private _debugGraphics;
|
|
46
|
+
private _debugLabel;
|
|
47
|
+
constructor(config?: Partial<FlexContainerConfig>);
|
|
48
|
+
private createLayout;
|
|
49
|
+
private handleAdded;
|
|
50
|
+
private _updateLayout;
|
|
51
|
+
private handleChildAdded;
|
|
52
|
+
private handleChildRemoved;
|
|
53
|
+
private handleResize;
|
|
54
|
+
private handleBindToResize;
|
|
55
|
+
updateLayout(): void;
|
|
56
|
+
get app(): AppTypeOverrides['App'];
|
|
57
|
+
/**
|
|
58
|
+
* Set multiple layout properties at once, triggering a single deferred layout update.
|
|
59
|
+
*/
|
|
60
|
+
configure(styles: Partial<Omit<LayoutOptions, 'target'>>): void;
|
|
61
|
+
get gap(): number;
|
|
62
|
+
set gap(value: number);
|
|
63
|
+
get flexWrap(): FlexWrap;
|
|
64
|
+
set flexWrap(value: FlexWrap);
|
|
65
|
+
get flexDirection(): FlexDirection;
|
|
66
|
+
set flexDirection(value: FlexDirection);
|
|
67
|
+
get alignItems(): AlignItems;
|
|
68
|
+
set alignItems(value: AlignItems);
|
|
69
|
+
get justifyContent(): JustifyContent;
|
|
70
|
+
set justifyContent(value: JustifyContent);
|
|
71
|
+
get size(): {
|
|
72
|
+
width: SizeNumber;
|
|
73
|
+
height: SizeNumber;
|
|
74
|
+
};
|
|
75
|
+
set size(size: {
|
|
76
|
+
width: SizeNumber;
|
|
77
|
+
height: SizeNumber;
|
|
78
|
+
} | [SizeNumber, SizeNumber] | SizeNumber);
|
|
79
|
+
get layoutWidth(): SizeNumber;
|
|
80
|
+
set layoutWidth(width: SizeNumber);
|
|
81
|
+
get layoutHeight(): SizeNumber;
|
|
82
|
+
set layoutHeight(height: SizeNumber);
|
|
83
|
+
get padding(): NumberValue | undefined;
|
|
84
|
+
set padding(value: NumberValue);
|
|
85
|
+
get paddingTop(): NumberValue | undefined;
|
|
86
|
+
set paddingTop(value: NumberValue);
|
|
87
|
+
get paddingRight(): NumberValue | undefined;
|
|
88
|
+
set paddingRight(value: NumberValue);
|
|
89
|
+
get paddingBottom(): NumberValue | undefined;
|
|
90
|
+
set paddingBottom(value: NumberValue);
|
|
91
|
+
get paddingLeft(): NumberValue | undefined;
|
|
92
|
+
set paddingLeft(value: NumberValue);
|
|
93
|
+
get margin(): NumberValue | undefined;
|
|
94
|
+
set margin(value: NumberValue);
|
|
95
|
+
get marginTop(): NumberValue | undefined;
|
|
96
|
+
set marginTop(value: NumberValue);
|
|
97
|
+
get marginRight(): NumberValue | undefined;
|
|
98
|
+
set marginRight(value: NumberValue);
|
|
99
|
+
get marginBottom(): NumberValue | undefined;
|
|
100
|
+
set marginBottom(value: NumberValue);
|
|
101
|
+
get marginLeft(): NumberValue | undefined;
|
|
102
|
+
set marginLeft(value: NumberValue);
|
|
103
|
+
get debug(): boolean;
|
|
104
|
+
set debug(value: boolean);
|
|
105
|
+
private drawDebug;
|
|
106
|
+
destroy(): void;
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
109
|
+
//# sourceMappingURL=FlexContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlexContainer.d.ts","sourceRoot":"","sources":["../../src/ui/FlexContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,IAAI,aAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,EAAE,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