commandkit 1.0.0-next-beta.20240203223402 → 1.2.0-dev.20250818125640
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 +5 -0
- package/README.md +22 -80
- package/ai.cjs +21 -0
- package/ai.d.ts +1 -0
- package/analytics.cjs +21 -0
- package/analytics.d.ts +9 -0
- package/async-queue.cjs +9 -0
- package/async-queue.d.ts +1 -0
- package/bin/index.mjs +5 -0
- package/cache.cjs +23 -0
- package/cache.d.ts +13 -0
- package/components.cjs +1 -0
- package/components.d.ts +1 -0
- package/config.cjs +5 -0
- package/config.d.ts +1 -0
- package/dist/ActionRow-CmTHbo2t.js +25 -0
- package/dist/ActionRow-CmTHbo2t.js.map +1 -0
- package/dist/ActionRow-DKnFVDME.d.ts +20 -0
- package/dist/Button-4ZUXdA56.d.ts +39 -0
- package/dist/ButtonKit-C7r7RPNf.d.ts +87 -0
- package/dist/ChannelSelectMenuKit-BrXvBYNH.d.ts +67 -0
- package/dist/CommandKitEventsChannel-Bgw0XCOl.js +87 -0
- package/dist/CommandKitEventsChannel-Bgw0XCOl.js.map +1 -0
- package/dist/CommandsRouter-Ci1Pe8Vd.js +214 -0
- package/dist/CommandsRouter-Ci1Pe8Vd.js.map +1 -0
- package/dist/CommandsRouter-CoOA7hkf.d.ts +146 -0
- package/dist/CompilerPlugin-CjoZAAR8.js +43 -0
- package/dist/CompilerPlugin-CjoZAAR8.js.map +1 -0
- package/dist/DefaultLogger-Cy55-uPl.d.ts +60 -0
- package/dist/EventInterceptor-CQ4PBpBJ.js +144 -0
- package/dist/EventInterceptor-CQ4PBpBJ.js.map +1 -0
- package/dist/EventInterceptor-x-R2qshQ.d.ts +91 -0
- package/dist/EventWorkerContext-CSlD9rbx.js +68 -0
- package/dist/EventWorkerContext-CSlD9rbx.js.map +1 -0
- package/dist/EventWorkerContext-DJUi1W3T.d.ts +43 -0
- package/dist/EventsRouter-BacqK6z3.d.ts +90 -0
- package/dist/EventsRouter-C_J0M3uO.js +133 -0
- package/dist/EventsRouter-C_J0M3uO.js.map +1 -0
- package/dist/ILogger-DBGON5wx.d.ts +34 -0
- package/dist/ILogger-dQ7Y9X1f.js +0 -0
- package/dist/Logger-iSjA-DWN.d.ts +37 -0
- package/dist/MentionableSelectMenuKit-CPTKqx-O.d.ts +62 -0
- package/dist/MessageCommandParser-B_BEQ3p8.js +268 -0
- package/dist/MessageCommandParser-B_BEQ3p8.js.map +1 -0
- package/dist/MessageCommandParser-ROLibZPX.d.ts +195 -0
- package/dist/Modal-C6UTRdYQ.d.ts +62 -0
- package/dist/ModalKit-Btz58KYn.d.ts +87 -0
- package/dist/PluginCommon-Di1xIa8d.js +70 -0
- package/dist/PluginCommon-Di1xIa8d.js.map +1 -0
- package/dist/RoleSelectMenuKit-C26lU3sN.d.ts +67 -0
- package/dist/RuntimePlugin-CBgBLXTG.js +133 -0
- package/dist/RuntimePlugin-CBgBLXTG.js.map +1 -0
- package/dist/SelectMenu-Diy87_ba.d.ts +137 -0
- package/dist/StringSelectMenuKit-Bhs8U6WI.d.ts +67 -0
- package/dist/UserSelectMenuKit-CfqFJdxz.d.ts +67 -0
- package/dist/analytics/analytics-engine.d.ts +32 -0
- package/dist/analytics/analytics-engine.js +37 -0
- package/dist/analytics/analytics-provider.d.ts +32 -0
- package/dist/analytics/analytics-provider.js +0 -0
- package/dist/analytics/constants.d.ts +27 -0
- package/dist/analytics/constants.js +4 -0
- package/dist/analytics/utils.d.ts +19 -0
- package/dist/analytics/utils.js +38 -0
- package/dist/analytics-engine-vA4MaJYx.d.ts +2183 -0
- package/dist/app/commands/AppCommandRunner.d.ts +32 -0
- package/dist/app/commands/AppCommandRunner.js +37 -0
- package/dist/app/commands/Context.d.ts +32 -0
- package/dist/app/commands/Context.js +39 -0
- package/dist/app/commands/MessageCommandParser.d.ts +2 -0
- package/dist/app/commands/MessageCommandParser.js +5 -0
- package/dist/app/commands/helpers.d.ts +2 -0
- package/dist/app/commands/helpers.js +4 -0
- package/dist/app/events/EventWorkerContext.d.ts +33 -0
- package/dist/app/events/EventWorkerContext.js +6 -0
- package/dist/app/handlers/AppCommandHandler.d.ts +32 -0
- package/dist/app/handlers/AppCommandHandler.js +37 -0
- package/dist/app/handlers/AppEventsHandler.d.ts +32 -0
- package/dist/app/handlers/AppEventsHandler.js +37 -0
- package/dist/app/index.d.ts +32 -0
- package/dist/app/index.js +51 -0
- package/dist/app/interrupt/signals.d.ts +2 -0
- package/dist/app/interrupt/signals.js +8 -0
- package/dist/app/register/CommandRegistrar.d.ts +32 -0
- package/dist/app/register/CommandRegistrar.js +37 -0
- package/dist/app/router/CommandsRouter.d.ts +2 -0
- package/dist/app/router/CommandsRouter.js +3 -0
- package/dist/app/router/EventsRouter.d.ts +2 -0
- package/dist/app/router/EventsRouter.js +3 -0
- package/dist/app/router/index.d.ts +4 -0
- package/dist/app/router/index.js +6 -0
- package/dist/app-HN1cVg8J.js +0 -0
- package/dist/app-process-CjMovpoZ.js +65 -0
- package/dist/app-process-CjMovpoZ.js.map +1 -0
- package/dist/build-DXl8uEv4.js +170 -0
- package/dist/build-DXl8uEv4.js.map +1 -0
- package/dist/chunk-nOFOJqeH.js +30 -0
- package/dist/cli/app-process.d.ts +12 -0
- package/dist/cli/app-process.js +8 -0
- package/dist/cli/build.d.ts +56 -0
- package/dist/cli/build.js +40 -0
- package/dist/cli/common.d.ts +73 -0
- package/dist/cli/common.js +12 -0
- package/dist/cli/development.d.ts +9 -0
- package/dist/cli/development.js +207 -0
- package/dist/cli/development.js.map +1 -0
- package/dist/cli/env.d.ts +50 -0
- package/dist/cli/env.js +10 -0
- package/dist/cli/generators.d.ts +14 -0
- package/dist/cli/generators.js +115 -0
- package/dist/cli/generators.js.map +1 -0
- package/dist/cli/information.d.ts +9 -0
- package/dist/cli/information.js +132 -0
- package/dist/cli/information.js.map +1 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.js +38 -0
- package/dist/cli/production.d.ts +17 -0
- package/dist/cli/production.js +79 -0
- package/dist/cli/production.js.map +1 -0
- package/dist/cli/type-checker.d.ts +11 -0
- package/dist/cli/type-checker.js +7 -0
- package/dist/cli/utils.d.ts +12 -0
- package/dist/cli/utils.js +3 -0
- package/dist/colors-Cd4Oz-r-.js +14 -0
- package/dist/colors-Cd4Oz-r-.js.map +1 -0
- package/dist/commandkit-DMEW0kJg.js +4315 -0
- package/dist/commandkit-DMEW0kJg.js.map +1 -0
- package/dist/commandkit.d.ts +32 -0
- package/dist/commandkit.js +40 -0
- package/dist/common-CcfjYnPG.js +0 -0
- package/dist/common-DNADUU3_.js +211 -0
- package/dist/common-DNADUU3_.js.map +1 -0
- package/dist/common-DOCvOVC4.d.ts +30 -0
- package/dist/common-vnMIelAE.js +17 -0
- package/dist/common-vnMIelAE.js.map +1 -0
- package/dist/components/common/EventInterceptor.d.ts +2 -0
- package/dist/components/common/EventInterceptor.js +3 -0
- package/dist/components/common/element.d.ts +5 -0
- package/dist/components/common/element.js +9 -0
- package/dist/components/common/types.d.ts +2 -0
- package/dist/components/common/types.js +1 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.js +71 -0
- package/dist/components/v1/action-row/ActionRow.d.ts +6 -0
- package/dist/components/v1/action-row/ActionRow.js +3 -0
- package/dist/components/v1/button/Button.d.ts +7 -0
- package/dist/components/v1/button/Button.js +37 -0
- package/dist/components/v1/button/ButtonKit.d.ts +3 -0
- package/dist/components/v1/button/ButtonKit.js +37 -0
- package/dist/components/v1/modal/Modal.d.ts +7 -0
- package/dist/components/v1/modal/Modal.js +40 -0
- package/dist/components/v1/modal/ModalKit.d.ts +3 -0
- package/dist/components/v1/modal/ModalKit.js +37 -0
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +4 -0
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +37 -0
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +4 -0
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +37 -0
- package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +4 -0
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +37 -0
- package/dist/components/v1/select-menu/SelectMenu.d.ts +10 -0
- package/dist/components/v1/select-menu/SelectMenu.js +42 -0
- package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +4 -0
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +37 -0
- package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +4 -0
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +37 -0
- package/dist/components/v1/select-menu/common.d.ts +3 -0
- package/dist/components/v1/select-menu/common.js +1 -0
- package/dist/components/v2/common.d.ts +13 -0
- package/dist/components/v2/common.js +3 -0
- package/dist/components/v2/container.d.ts +2 -0
- package/dist/components/v2/container.js +4 -0
- package/dist/components/v2/file.d.ts +2 -0
- package/dist/components/v2/file.js +3 -0
- package/dist/components/v2/index.d.ts +8 -0
- package/dist/components/v2/index.js +17 -0
- package/dist/components/v2/media-gallery.d.ts +2 -0
- package/dist/components/v2/media-gallery.js +5 -0
- package/dist/components/v2/section.d.ts +2 -0
- package/dist/components/v2/section.js +5 -0
- package/dist/components/v2/separator.d.ts +2 -0
- package/dist/components/v2/separator.js +3 -0
- package/dist/components/v2/text-display.d.ts +2 -0
- package/dist/components/v2/text-display.js +3 -0
- package/dist/config/config.d.ts +33 -0
- package/dist/config/config.js +38 -0
- package/dist/config/default.d.ts +40 -0
- package/dist/config/default.js +37 -0
- package/dist/config/loader.d.ts +48 -0
- package/dist/config/loader.js +38 -0
- package/dist/config/types.d.ts +32 -0
- package/dist/config/types.js +0 -0
- package/dist/config/utils.d.ts +32 -0
- package/dist/config/utils.js +3 -0
- package/dist/config-CcWJ-vz5.d.ts +16 -0
- package/dist/constants-4oxxvaJA.js +27 -0
- package/dist/constants-4oxxvaJA.js.map +1 -0
- package/dist/constants-B5_Ta7PR.js +70 -0
- package/dist/constants-B5_Ta7PR.js.map +1 -0
- package/dist/constants-CUND8XkG.js +36 -0
- package/dist/constants-CUND8XkG.js.map +1 -0
- package/dist/constants-DrjIvQd6.d.ts +19 -0
- package/dist/constants-MKu-Q1jh.d.ts +46 -0
- package/dist/container-DHBELeJ3.d.ts +25 -0
- package/dist/container-z621KfH5.js +43 -0
- package/dist/container-z621KfH5.js.map +1 -0
- package/dist/context/async-context.d.ts +32 -0
- package/dist/context/async-context.js +43 -0
- package/dist/context/environment.d.ts +32 -0
- package/dist/context/environment.js +40 -0
- package/dist/dotprops-C_4L7RPD.js +36 -0
- package/dist/dotprops-C_4L7RPD.js.map +1 -0
- package/dist/element-Bak9llw_.js +84 -0
- package/dist/element-Bak9llw_.js.map +1 -0
- package/dist/element-CAXu1XtK.d.ts +72 -0
- package/dist/env-_68PRRoA.js +109 -0
- package/dist/env-_68PRRoA.js.map +1 -0
- package/dist/error-codes-C-ViHyu-.js +73 -0
- package/dist/error-codes-C-ViHyu-.js.map +1 -0
- package/dist/events/CommandKitEventsChannel.d.ts +32 -0
- package/dist/events/CommandKitEventsChannel.js +3 -0
- package/dist/feature-flags-Cxl9JtVG.js +165 -0
- package/dist/feature-flags-Cxl9JtVG.js.map +1 -0
- package/dist/file-DTrr-p09.d.ts +24 -0
- package/dist/file-DVZC0QXI.js +28 -0
- package/dist/file-DVZC0QXI.js.map +1 -0
- package/dist/flags/FlagProvider.d.ts +32 -0
- package/dist/flags/FlagProvider.js +27 -0
- package/dist/flags/FlagProvider.js.map +1 -0
- package/dist/flags/feature-flags.d.ts +32 -0
- package/dist/flags/feature-flags.js +40 -0
- package/dist/flags/store.d.ts +32 -0
- package/dist/flags/store.js +3 -0
- package/dist/helpers-BUlN3lIz.js +35 -0
- package/dist/helpers-BUlN3lIz.js.map +1 -0
- package/dist/helpers-Wg6P5fRQ.d.ts +23 -0
- package/dist/index-DKcmsWXw.d.ts +1 -0
- package/dist/index-DSBMRX9A.d.ts +1 -0
- package/dist/index-DdqikUQD.d.ts +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +150 -0
- package/dist/init-DOr-Y3GQ.d.ts +13 -0
- package/dist/init-DTBFphOg.js +92 -0
- package/dist/init-DTBFphOg.js.map +1 -0
- package/dist/kv/constants.d.ts +2 -0
- package/dist/kv/constants.js +3 -0
- package/dist/kv/dotprops.d.ts +6 -0
- package/dist/kv/dotprops.js +4 -0
- package/dist/kv/kv.d.ts +397 -0
- package/dist/kv/kv.js +575 -0
- package/dist/kv/kv.js.map +1 -0
- package/dist/kv/serde.d.ts +3 -0
- package/dist/kv/serde.js +5 -0
- package/dist/logger/DefaultLogger.d.ts +3 -0
- package/dist/logger/DefaultLogger.js +37 -0
- package/dist/logger/ILogger.d.ts +2 -0
- package/dist/logger/ILogger.js +1 -0
- package/dist/logger/Logger.d.ts +3 -0
- package/dist/logger/Logger.js +38 -0
- package/dist/logger/NoopLogger.d.ts +37 -0
- package/dist/logger/NoopLogger.js +36 -0
- package/dist/logger/NoopLogger.js.map +1 -0
- package/dist/media-gallery-BMsXSot3.d.ts +49 -0
- package/dist/media-gallery-CIKypjbJ.js +61 -0
- package/dist/media-gallery-CIKypjbJ.js.map +1 -0
- package/dist/plugins/CompilerPlugin.d.ts +32 -0
- package/dist/plugins/CompilerPlugin.js +5 -0
- package/dist/plugins/PluginCommon.d.ts +32 -0
- package/dist/plugins/PluginCommon.js +5 -0
- package/dist/plugins/RuntimePlugin.d.ts +32 -0
- package/dist/plugins/RuntimePlugin.js +5 -0
- package/dist/plugins/index.d.ts +32 -0
- package/dist/plugins/index.js +43 -0
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +32 -0
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +37 -0
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +32 -0
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +37 -0
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +32 -0
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +37 -0
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +55 -0
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +37 -0
- package/dist/plugins/plugin-runtime/runtime.d.ts +32 -0
- package/dist/plugins/plugin-runtime/runtime.js +1 -0
- package/dist/plugins/types.d.ts +32 -0
- package/dist/plugins/types.js +1 -0
- package/dist/resolve-file-url-DHTQj2mU.js +23 -0
- package/dist/resolve-file-url-DHTQj2mU.js.map +1 -0
- package/dist/resolve-file-url-yO8bUxok.d.ts +11 -0
- package/dist/router-DHnFRADH.js +0 -0
- package/dist/runtime-5fxB4uhe.js +0 -0
- package/dist/section-CuYr0Inu.js +60 -0
- package/dist/section-CuYr0Inu.js.map +1 -0
- package/dist/section-Dh_FhPeC.d.ts +45 -0
- package/dist/separator-CMf6Cyy5.d.ts +22 -0
- package/dist/separator-DLdWBjSN.js +27 -0
- package/dist/separator-DLdWBjSN.js.map +1 -0
- package/dist/serde-BUDI03pX.d.ts +12 -0
- package/dist/serde-CHySNpFr.js +97 -0
- package/dist/serde-CHySNpFr.js.map +1 -0
- package/dist/signals-BQbEfy3X.d.ts +41 -0
- package/dist/signals-DHdYrd-n.js +77 -0
- package/dist/signals-DHdYrd-n.js.map +1 -0
- package/dist/store-CiqLHedg.js +18 -0
- package/dist/store-CiqLHedg.js.map +1 -0
- package/dist/text-display--p2-BoUa.js +31 -0
- package/dist/text-display--p2-BoUa.js.map +1 -0
- package/dist/text-display-DRw3r_lK.d.ts +33 -0
- package/dist/type-checker-1Iu1jJcy.js +88 -0
- package/dist/type-checker-1Iu1jJcy.js.map +1 -0
- package/dist/types-CJ-XvOFN.d.ts +5 -0
- package/dist/types-CUZOquUl.js +0 -0
- package/dist/types-package-DrnIdWLg.js +72 -0
- package/dist/types-package-DrnIdWLg.js.map +1 -0
- package/dist/types-q0Nm882H.js +0 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.js +0 -0
- package/dist/utilities-DtdPlr4c.d.ts +87 -0
- package/dist/utils/colors.d.ts +6 -0
- package/dist/utils/colors.js +4 -0
- package/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/dev-hooks.d.ts +32 -0
- package/dist/utils/dev-hooks.js +37 -0
- package/dist/utils/error-codes.d.ts +54 -0
- package/dist/utils/error-codes.js +6 -0
- package/dist/utils/resolve-file-url.d.ts +2 -0
- package/dist/utils/resolve-file-url.js +3 -0
- package/dist/utils/types-package.d.ts +12 -0
- package/dist/utils/types-package.js +5 -0
- package/dist/utils/useful-stuff/async-queue.d.ts +84 -0
- package/dist/utils/useful-stuff/async-queue.js +136 -0
- package/dist/utils/useful-stuff/async-queue.js.map +1 -0
- package/dist/utils/useful-stuff/mutex.d.ts +188 -0
- package/dist/utils/useful-stuff/mutex.js +214 -0
- package/dist/utils/useful-stuff/mutex.js.map +1 -0
- package/dist/utils/useful-stuff/ratelimiter.d.ts +193 -0
- package/dist/utils/useful-stuff/ratelimiter.js +223 -0
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -0
- package/dist/utils/useful-stuff/semaphore.d.ts +227 -0
- package/dist/utils/useful-stuff/semaphore.js +267 -0
- package/dist/utils/useful-stuff/semaphore.js.map +1 -0
- package/dist/utils/utilities.d.ts +2 -0
- package/dist/utils/utilities.js +44 -0
- package/dist/utils/warn-unstable.d.ts +16 -0
- package/dist/utils/warn-unstable.js +26 -0
- package/dist/utils/warn-unstable.js.map +1 -0
- package/dist/utils-BnXM4eKk.js +34 -0
- package/dist/utils-BnXM4eKk.js.map +1 -0
- package/dist/utils-DCSnVAZ6.js +23 -0
- package/dist/utils-DCSnVAZ6.js.map +1 -0
- package/dist/v2-DofkPKHs.js +0 -0
- package/dist/version-C1IgTOgS.js +18 -0
- package/dist/version-C1IgTOgS.js.map +1 -0
- package/dist/version-CtJtBJXI.d.ts +8 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/env.cjs +15 -0
- package/env.d.ts +7 -0
- package/events.cjs +6 -0
- package/events.d.ts +7 -0
- package/flag.cjs +6 -0
- package/flag.d.ts +1 -0
- package/hooks.cjs +58 -0
- package/hooks.d.ts +18 -0
- package/i18n.cjs +6 -0
- package/i18n.d.ts +1 -0
- package/jsx-runtime.cjs +7 -0
- package/jsx-runtime.d.ts +1 -0
- package/kv.cjs +6 -0
- package/kv.d.ts +1 -0
- package/logger.cjs +13 -0
- package/logger.d.ts +11 -0
- package/mutex.cjs +21 -0
- package/mutex.d.ts +1 -0
- package/package.json +160 -38
- package/plugin.cjs +17 -0
- package/plugin.d.ts +9 -0
- package/ratelimit.cjs +26 -0
- package/ratelimit.d.ts +1 -0
- package/semaphore.cjs +23 -0
- package/semaphore.d.ts +1 -0
- package/bin/index.cjs +0 -4
- package/dist/CommandKit-zTvOEN7S.d.mts +0 -452
- package/dist/CommandKit.d.mts +0 -5
- package/dist/CommandKit.mjs +0 -22
- package/dist/CommandKit.mjs.map +0 -1
- package/dist/bootstrap/client.d.mts +0 -30
- package/dist/bootstrap/client.mjs +0 -48
- package/dist/bootstrap/client.mjs.map +0 -1
- package/dist/bootstrap/loadEnv.d.mts +0 -3
- package/dist/bootstrap/loadEnv.mjs +0 -9
- package/dist/bootstrap/loadEnv.mjs.map +0 -1
- package/dist/chunk-36PQ6EPA.mjs +0 -19
- package/dist/chunk-36PQ6EPA.mjs.map +0 -1
- package/dist/chunk-4QUBNPUD.mjs +0 -43
- package/dist/chunk-4QUBNPUD.mjs.map +0 -1
- package/dist/chunk-7ORB4BQP.mjs +0 -172
- package/dist/chunk-7ORB4BQP.mjs.map +0 -1
- package/dist/chunk-A76ALGBU.mjs +0 -32
- package/dist/chunk-A76ALGBU.mjs.map +0 -1
- package/dist/chunk-AHIKHJPW.mjs +0 -100
- package/dist/chunk-AHIKHJPW.mjs.map +0 -1
- package/dist/chunk-BH4GZ445.mjs +0 -15
- package/dist/chunk-BH4GZ445.mjs.map +0 -1
- package/dist/chunk-BZNDFBJV.mjs +0 -28
- package/dist/chunk-BZNDFBJV.mjs.map +0 -1
- package/dist/chunk-DP5YVP6F.mjs +0 -8
- package/dist/chunk-DP5YVP6F.mjs.map +0 -1
- package/dist/chunk-E77IVDYN.mjs +0 -259
- package/dist/chunk-E77IVDYN.mjs.map +0 -1
- package/dist/chunk-EFIIKXVE.mjs +0 -215
- package/dist/chunk-EFIIKXVE.mjs.map +0 -1
- package/dist/chunk-FFJ53DFW.mjs +0 -376
- package/dist/chunk-FFJ53DFW.mjs.map +0 -1
- package/dist/chunk-GFYW3WH2.mjs +0 -16
- package/dist/chunk-GFYW3WH2.mjs.map +0 -1
- package/dist/chunk-H74LIKJ4.mjs +0 -60
- package/dist/chunk-H74LIKJ4.mjs.map +0 -1
- package/dist/chunk-I2HXJCCV.mjs +0 -85
- package/dist/chunk-I2HXJCCV.mjs.map +0 -1
- package/dist/chunk-IKDBPQHH.mjs +0 -127
- package/dist/chunk-IKDBPQHH.mjs.map +0 -1
- package/dist/chunk-J5R7OCMN.mjs +0 -85
- package/dist/chunk-J5R7OCMN.mjs.map +0 -1
- package/dist/chunk-LII2L2MR.mjs +0 -55
- package/dist/chunk-LII2L2MR.mjs.map +0 -1
- package/dist/chunk-M5FMJETI.mjs +0 -1
- package/dist/chunk-M5FMJETI.mjs.map +0 -1
- package/dist/chunk-NF6DMD5M.mjs +0 -108
- package/dist/chunk-NF6DMD5M.mjs.map +0 -1
- package/dist/chunk-NKZVASPJ.mjs +0 -55
- package/dist/chunk-NKZVASPJ.mjs.map +0 -1
- package/dist/chunk-O2GIY7JB.mjs +0 -14
- package/dist/chunk-O2GIY7JB.mjs.map +0 -1
- package/dist/chunk-PFU3PH6M.mjs +0 -1
- package/dist/chunk-PFU3PH6M.mjs.map +0 -1
- package/dist/chunk-PIBEHEXO.mjs +0 -28
- package/dist/chunk-PIBEHEXO.mjs.map +0 -1
- package/dist/chunk-QCV3VHXF.mjs +0 -24
- package/dist/chunk-QCV3VHXF.mjs.map +0 -1
- package/dist/chunk-RS7RJSRW.mjs +0 -50
- package/dist/chunk-RS7RJSRW.mjs.map +0 -1
- package/dist/chunk-WDQQRJGG.mjs +0 -21
- package/dist/chunk-WDQQRJGG.mjs.map +0 -1
- package/dist/chunk-WQEPYQ4F.mjs +0 -33
- package/dist/chunk-WQEPYQ4F.mjs.map +0 -1
- package/dist/chunk-ZCQVH7JT.mjs +0 -46
- package/dist/chunk-ZCQVH7JT.mjs.map +0 -1
- package/dist/components/ButtonKit.d.mts +0 -55
- package/dist/components/ButtonKit.mjs +0 -8
- package/dist/components/ButtonKit.mjs.map +0 -1
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -9
- package/dist/components/index.mjs.map +0 -1
- package/dist/config.d.mts +0 -63
- package/dist/config.mjs +0 -10
- package/dist/config.mjs.map +0 -1
- package/dist/environment/actions/common.d.mts +0 -12
- package/dist/environment/actions/common.mjs +0 -10
- package/dist/environment/actions/common.mjs.map +0 -1
- package/dist/environment/actions/development.d.mts +0 -10
- package/dist/environment/actions/development.mjs +0 -36
- package/dist/environment/actions/development.mjs.map +0 -1
- package/dist/environment/bundler/bundle.d.mts +0 -3
- package/dist/environment/bundler/bundle.mjs +0 -11
- package/dist/environment/bundler/bundle.mjs.map +0 -1
- package/dist/environment/bundler/codegen.d.mts +0 -3
- package/dist/environment/bundler/codegen.mjs +0 -48
- package/dist/environment/bundler/codegen.mjs.map +0 -1
- package/dist/environment/bundler/shims.d.mts +0 -3
- package/dist/environment/bundler/shims.mjs +0 -8
- package/dist/environment/bundler/shims.mjs.map +0 -1
- package/dist/environment/cli.d.mts +0 -2
- package/dist/environment/cli.mjs +0 -55
- package/dist/environment/cli.mjs.map +0 -1
- package/dist/environment/common/config.d.mts +0 -11
- package/dist/environment/common/config.mjs +0 -10
- package/dist/environment/common/config.mjs.map +0 -1
- package/dist/environment/common/logger.d.mts +0 -9
- package/dist/environment/common/logger.mjs +0 -9
- package/dist/environment/common/logger.mjs.map +0 -1
- package/dist/environment/env.d.mts +0 -11
- package/dist/environment/env.mjs +0 -10
- package/dist/environment/env.mjs.map +0 -1
- package/dist/handlers/command-handler/CommandHandler.d.mts +0 -5
- package/dist/handlers/command-handler/CommandHandler.mjs +0 -18
- package/dist/handlers/command-handler/CommandHandler.mjs.map +0 -1
- package/dist/handlers/command-handler/functions/loadCommandsWithRest.d.mts +0 -35
- package/dist/handlers/command-handler/functions/loadCommandsWithRest.mjs +0 -9
- package/dist/handlers/command-handler/functions/loadCommandsWithRest.mjs.map +0 -1
- package/dist/handlers/command-handler/functions/registerCommands.d.mts +0 -20
- package/dist/handlers/command-handler/functions/registerCommands.mjs +0 -10
- package/dist/handlers/command-handler/functions/registerCommands.mjs.map +0 -1
- package/dist/handlers/command-handler/typings.d.mts +0 -5
- package/dist/handlers/command-handler/typings.mjs +0 -1
- package/dist/handlers/command-handler/typings.mjs.map +0 -1
- package/dist/handlers/command-handler/utils/areSlashCommandsDifferent.d.mts +0 -9
- package/dist/handlers/command-handler/utils/areSlashCommandsDifferent.mjs +0 -8
- package/dist/handlers/command-handler/utils/areSlashCommandsDifferent.mjs.map +0 -1
- package/dist/handlers/command-handler/validations/devOnly.d.mts +0 -9
- package/dist/handlers/command-handler/validations/devOnly.mjs +0 -8
- package/dist/handlers/command-handler/validations/devOnly.mjs.map +0 -1
- package/dist/handlers/command-handler/validations/index.d.mts +0 -10
- package/dist/handlers/command-handler/validations/index.mjs +0 -10
- package/dist/handlers/command-handler/validations/index.mjs.map +0 -1
- package/dist/handlers/command-handler/validations/permissions.d.mts +0 -9
- package/dist/handlers/command-handler/validations/permissions.mjs +0 -8
- package/dist/handlers/command-handler/validations/permissions.mjs.map +0 -1
- package/dist/handlers/event-handler/EventHandler.d.mts +0 -5
- package/dist/handlers/event-handler/EventHandler.mjs +0 -12
- package/dist/handlers/event-handler/EventHandler.mjs.map +0 -1
- package/dist/handlers/event-handler/typings.d.mts +0 -5
- package/dist/handlers/event-handler/typings.mjs +0 -1
- package/dist/handlers/event-handler/typings.mjs.map +0 -1
- package/dist/handlers/index.d.mts +0 -5
- package/dist/handlers/index.mjs +0 -27
- package/dist/handlers/index.mjs.map +0 -1
- package/dist/handlers/validation-handler/ValidationHandler.d.mts +0 -14
- package/dist/handlers/validation-handler/ValidationHandler.mjs +0 -12
- package/dist/handlers/validation-handler/ValidationHandler.mjs.map +0 -1
- package/dist/handlers/validation-handler/typings.d.mts +0 -14
- package/dist/handlers/validation-handler/typings.mjs +0 -1
- package/dist/handlers/validation-handler/typings.mjs.map +0 -1
- package/dist/hooks/common.d.mts +0 -12
- package/dist/hooks/common.mjs +0 -40
- package/dist/hooks/common.mjs.map +0 -1
- package/dist/hooks/index.d.mts +0 -14
- package/dist/hooks/index.mjs +0 -50
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/hooks/response.d.mts +0 -7
- package/dist/hooks/response.mjs +0 -34
- package/dist/hooks/response.mjs.map +0 -1
- package/dist/hooks/useChannel.d.mts +0 -5
- package/dist/hooks/useChannel.mjs +0 -34
- package/dist/hooks/useChannel.mjs.map +0 -1
- package/dist/hooks/useClient.d.mts +0 -5
- package/dist/hooks/useClient.mjs +0 -34
- package/dist/hooks/useClient.mjs.map +0 -1
- package/dist/hooks/useCommandData.d.mts +0 -5
- package/dist/hooks/useCommandData.mjs +0 -34
- package/dist/hooks/useCommandData.mjs.map +0 -1
- package/dist/hooks/useCommandKit.d.mts +0 -9
- package/dist/hooks/useCommandKit.mjs +0 -34
- package/dist/hooks/useCommandKit.mjs.map +0 -1
- package/dist/hooks/useGuild.d.mts +0 -5
- package/dist/hooks/useGuild.mjs +0 -34
- package/dist/hooks/useGuild.mjs.map +0 -1
- package/dist/hooks/useInteraction.d.mts +0 -9
- package/dist/hooks/useInteraction.mjs +0 -34
- package/dist/hooks/useInteraction.mjs.map +0 -1
- package/dist/hooks/useMember.d.mts +0 -5
- package/dist/hooks/useMember.mjs +0 -34
- package/dist/hooks/useMember.mjs.map +0 -1
- package/dist/hooks/useUser.d.mts +0 -5
- package/dist/hooks/useUser.mjs +0 -34
- package/dist/hooks/useUser.mjs.map +0 -1
- package/dist/index.d.mts +0 -26
- package/dist/index.mjs +0 -77
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.d.mts +0 -5
- package/dist/types/index.mjs +0 -12
- package/dist/types/index.mjs.map +0 -1
- package/dist/typings.d.mts +0 -5
- package/dist/typings.mjs +0 -1
- package/dist/typings.mjs.map +0 -1
- package/dist/utils/clone.d.mts +0 -3
- package/dist/utils/clone.mjs +0 -8
- package/dist/utils/clone.mjs.map +0 -1
- package/dist/utils/colors.d.mts +0 -27
- package/dist/utils/colors.mjs +0 -8
- package/dist/utils/colors.mjs.map +0 -1
- package/dist/utils/get-paths.d.mts +0 -4
- package/dist/utils/get-paths.mjs +0 -10
- package/dist/utils/get-paths.mjs.map +0 -1
- package/dist/utils/resolve-file-url.d.mts +0 -8
- package/dist/utils/resolve-file-url.mjs +0 -8
- package/dist/utils/resolve-file-url.mjs.map +0 -1
- package/dist/utils/signal.d.mts +0 -21
- package/dist/utils/signal.mjs +0 -10
- package/dist/utils/signal.mjs.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Copyright 2025 Avraj Sahota
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
|
|
4
|
+
|
|
5
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/underctrl-io/commandkit/
|
|
2
|
+
<img src="https://raw.githubusercontent.com/underctrl-io/commandkit/main/apps/website/static/img/ckit_logo.svg" width="60%" />
|
|
3
3
|
<br />
|
|
4
4
|
<a href="https://ctrl.lol/discord"><img src="https://img.shields.io/discord/1055188344188973066?color=5865F2&logo=discord&logoColor=white" alt="support server" /></a>
|
|
5
5
|
<a href="https://www.npmjs.com/package/commandkit"><img src="https://img.shields.io/npm/v/commandkit?maxAge=3600" alt="npm version" /></a>
|
|
@@ -15,100 +15,42 @@ CommandKit is a library that makes it easy to handle commands and events in your
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
17
|
- Beginner friendly 🚀
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- Automatic command updates 🤖
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
18
|
+
- Suitable for both beginners and advanced users 👶👨💻
|
|
19
|
+
- Slash + context menu commands + prefix commands support ✅
|
|
20
|
+
- Automatic command registration and updates 🤖
|
|
21
|
+
- Command middlewares for easy command management 🛠️
|
|
22
|
+
- Localization support through `@commandkit/i18n` plugin 🌍
|
|
23
|
+
- Plugin system to extend functionality 🔌
|
|
24
|
+
- Built-in command line interface for easy development 🖥️
|
|
25
|
+
- Out-of-the-box support for TypeScript and JavaScript 📜
|
|
26
|
+
- Built-in customizable cache system for speedy data storage and retrieval 🗄️
|
|
27
|
+
- User installable/guild scoped commands 🔧
|
|
28
|
+
- Custom events support 🔔
|
|
29
|
+
- JSX support for declaring Discord interaction components and modals 🎨
|
|
30
|
+
- Easy to use interaction components and modals system (forget about collectors) 🧩
|
|
31
|
+
- Less boilerplate code, more productivity 💪
|
|
32
|
+
- and much more...
|
|
24
33
|
|
|
25
34
|
## Documentation
|
|
26
35
|
|
|
27
|
-
You can find the full documentation [here](https://commandkit.
|
|
36
|
+
You can find the full documentation [here](https://commandkit.dev).
|
|
28
37
|
|
|
29
38
|
## Installation
|
|
30
39
|
|
|
31
40
|
[](https://nodei.co/npm/commandkit/)
|
|
32
41
|
|
|
33
|
-
To
|
|
42
|
+
To create a new CommandKit project, you can use the following command:
|
|
34
43
|
|
|
35
|
-
For npm:
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
|
-
npm
|
|
46
|
+
npm create commandkit
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
This will prompt you to enter few details about your project. Once you have entered the details, you can simply run `commandkit dev` to start the bot application.
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
yarn add commandkit
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
pnpm:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pnpm add commandkit
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Install development version
|
|
54
|
-
|
|
55
|
-
To install the development version of CommandKit, run the following command:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install commandkit@dev
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
> ⚠️ The development version is likely to have bugs.
|
|
62
|
-
|
|
63
|
-
## Usage
|
|
51
|
+
## Getting Started
|
|
64
52
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
// index.js
|
|
69
|
-
const { Client, GatewayIntentBits } = require('discord.js');
|
|
70
|
-
const { CommandKit } = require('commandkit');
|
|
71
|
-
const path = require('path');
|
|
72
|
-
|
|
73
|
-
const client = new Client({
|
|
74
|
-
intents: [
|
|
75
|
-
GatewayIntentBits.Guilds,
|
|
76
|
-
GatewayIntentBits.GuildMessages,
|
|
77
|
-
GatewayIntentBits.MessageContent,
|
|
78
|
-
],
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
new CommandKit({
|
|
82
|
-
// Your discord.js client object
|
|
83
|
-
client,
|
|
84
|
-
|
|
85
|
-
// Path to the commands folder
|
|
86
|
-
commandsPath: path.join(__dirname, 'commands'),
|
|
87
|
-
|
|
88
|
-
// Path to the events folder
|
|
89
|
-
eventsPath: path.join(__dirname, 'events'),
|
|
90
|
-
|
|
91
|
-
// Path to the validations folder (only valid if "commandsPath" was provided)
|
|
92
|
-
validationsPath: path.join(__dirname, 'validations'),
|
|
93
|
-
|
|
94
|
-
// Array of development server IDs (used to register and run devOnly commands)
|
|
95
|
-
devGuildIds: ['1234567890', '0987654321'],
|
|
96
|
-
|
|
97
|
-
// Array of developer user IDs (used for devOnly commands)
|
|
98
|
-
devUserIds: ['1234567890', '0987654321'],
|
|
99
|
-
|
|
100
|
-
// Array of developer role IDs (used for devOnly commands)
|
|
101
|
-
devRoleIds: ['1234567890', '0987654321'],
|
|
102
|
-
|
|
103
|
-
// Disable CommandKit's built-in validations
|
|
104
|
-
skipBuiltInValidations: true,
|
|
105
|
-
|
|
106
|
-
// Update command registration/reload behaviour to register all commands at once
|
|
107
|
-
bulkRegister: true,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
client.login('YOUR_TOKEN_HERE');
|
|
111
|
-
```
|
|
53
|
+
To get started with CommandKit, you can check out the [quick start guide](https://commandkit.dev/docs/next/guide/installation).
|
|
112
54
|
|
|
113
55
|
## Support and Suggestions
|
|
114
56
|
|
package/ai.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const {
|
|
2
|
+
AiContext,
|
|
3
|
+
AiPlugin,
|
|
4
|
+
configureAI,
|
|
5
|
+
createSystemPrompt,
|
|
6
|
+
createTool,
|
|
7
|
+
getAIConfig,
|
|
8
|
+
useAIContext,
|
|
9
|
+
ai,
|
|
10
|
+
} = require('@commandkit/ai');
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
AiContext,
|
|
14
|
+
AiPlugin,
|
|
15
|
+
configureAI,
|
|
16
|
+
createSystemPrompt,
|
|
17
|
+
createTool,
|
|
18
|
+
getAIConfig,
|
|
19
|
+
useAIContext,
|
|
20
|
+
ai,
|
|
21
|
+
};
|
package/ai.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@commandkit/ai';
|
package/analytics.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { getCommandKit } = require('./dist/context/async-context.js');
|
|
2
|
+
const { AnalyticsEngine } = require('./dist/analytics/analytics-engine.js');
|
|
3
|
+
const { noAnalytics } = require('./dist/analytics/utils.js');
|
|
4
|
+
const { AnalyticsEvents } = require('./dist/analytics/constants.js');
|
|
5
|
+
|
|
6
|
+
function useAnalytics() {
|
|
7
|
+
const commandkit = getCommandKit(true);
|
|
8
|
+
return commandkit.analytics;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function track(event) {
|
|
12
|
+
return useAnalytics().track(event);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
AnalyticsEvents,
|
|
17
|
+
AnalyticsEngine,
|
|
18
|
+
useAnalytics,
|
|
19
|
+
noAnalytics,
|
|
20
|
+
track,
|
|
21
|
+
};
|
package/analytics.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AnalyticsEngine } from './dist/analytics/analytics-engine';
|
|
2
|
+
|
|
3
|
+
export * from './dist/analytics/analytics-engine';
|
|
4
|
+
export * from './dist/analytics/analytics-provider';
|
|
5
|
+
export { noAnalytics } from './dist/analytics/utils';
|
|
6
|
+
export { AnalyticsEvents } from './dist/analytics/constants';
|
|
7
|
+
|
|
8
|
+
export function useAnalytics(): AnalyticsEngine;
|
|
9
|
+
export function track(event: AnalyticsEvent): Promise<void>;
|
package/async-queue.cjs
ADDED
package/async-queue.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/utils/useful-stuff/async-queue.js';
|
package/bin/index.mjs
ADDED
package/cache.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const {
|
|
2
|
+
cacheTag,
|
|
3
|
+
cacheLife,
|
|
4
|
+
revalidateTag,
|
|
5
|
+
cleanup,
|
|
6
|
+
MemoryCache,
|
|
7
|
+
CacheProvider,
|
|
8
|
+
isCachedFunction,
|
|
9
|
+
setCacheProvider,
|
|
10
|
+
getCacheProvider,
|
|
11
|
+
} = require('@commandkit/cache');
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
cacheTag,
|
|
15
|
+
cacheLife,
|
|
16
|
+
revalidateTag,
|
|
17
|
+
cleanup,
|
|
18
|
+
MemoryCache,
|
|
19
|
+
CacheProvider,
|
|
20
|
+
isCachedFunction,
|
|
21
|
+
setCacheProvider,
|
|
22
|
+
getCacheProvider,
|
|
23
|
+
};
|
package/cache.d.ts
ADDED
package/components.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/components/index.js');
|
package/components.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/components/index';
|
package/config.cjs
ADDED
package/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineConfig, CommandKitConfiguration as Config } from './dist/index';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
+
const discord_js = require_chunk.__toESM(require("discord.js"));
|
|
3
|
+
|
|
4
|
+
//#region src/components/v1/action-row/ActionRow.ts
|
|
5
|
+
/**
|
|
6
|
+
* The action row component.
|
|
7
|
+
* @param props The action row properties.
|
|
8
|
+
* @returns The commandkit element.
|
|
9
|
+
* @example <ActionRow><Button label="Click me" style={ButtonStyle.Primary} customId="click_me" /></ActionRow>
|
|
10
|
+
*/
|
|
11
|
+
function ActionRow(props) {
|
|
12
|
+
const row = new discord_js.ActionRowBuilder();
|
|
13
|
+
if (Array.isArray(props.children)) row.setComponents(...props.children);
|
|
14
|
+
else if (props.children) row.setComponents(props.children);
|
|
15
|
+
return row;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
Object.defineProperty(exports, 'ActionRow', {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return ActionRow;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=ActionRow-CmTHbo2t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionRow-CmTHbo2t.js","names":[],"sources":["../src/components/v1/action-row/ActionRow.ts"],"sourcesContent":["import { ActionRowBuilder } from 'discord.js';\nimport { AnyCommandKitElement, CommandKitElement } from '../../common/element';\n\n/**\n * The properties for the action row component.\n */\nexport interface ActionRowProps {\n children?: AnyCommandKitElement[] | AnyCommandKitElement;\n}\n\n/**\n * The action row component.\n * @param props The action row properties.\n * @returns The commandkit element.\n * @example <ActionRow><Button label=\"Click me\" style={ButtonStyle.Primary} customId=\"click_me\" /></ActionRow>\n */\nexport function ActionRow(\n props: ActionRowProps,\n): CommandKitElement<'action-row'> {\n const row = new ActionRowBuilder();\n\n if (Array.isArray(props.children)) {\n // @ts-ignore\n row.setComponents(...props.children);\n } else if (props.children) {\n // @ts-ignore\n row.setComponents(props.children);\n }\n\n return row;\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,UAChB,OACkC;CAChC,MAAM,MAAM,IAAI;AAEhB,KAAI,MAAM,QAAQ,MAAM,UAEtB,KAAI,cAAc,GAAG,MAAM;UAClB,MAAM,SAEf,KAAI,cAAc,MAAM;AAG1B,QAAO;AACT"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnyCommandKitElement, CommandKitElement } from "./element-CAXu1XtK.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/v1/action-row/ActionRow.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The properties for the action row component.
|
|
7
|
+
*/
|
|
8
|
+
interface ActionRowProps {
|
|
9
|
+
children?: AnyCommandKitElement[] | AnyCommandKitElement;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The action row component.
|
|
13
|
+
* @param props The action row properties.
|
|
14
|
+
* @returns The commandkit element.
|
|
15
|
+
* @example <ActionRow><Button label="Click me" style={ButtonStyle.Primary} customId="click_me" /></ActionRow>
|
|
16
|
+
*/
|
|
17
|
+
declare function ActionRow(props: ActionRowProps): CommandKitElement<'action-row'>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ActionRow, ActionRowProps };
|
|
20
|
+
//# sourceMappingURL=ActionRow-DKnFVDME.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
+
import { CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd } from "./ButtonKit-C7r7RPNf.js";
|
|
3
|
+
import { CommandKitElement } from "./element-CAXu1XtK.js";
|
|
4
|
+
import { MaybeArray } from "./types-CJ-XvOFN.js";
|
|
5
|
+
import { ButtonStyle, ComponentEmojiResolvable } from "discord.js";
|
|
6
|
+
|
|
7
|
+
//#region src/components/v1/button/Button.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The button children type.
|
|
11
|
+
*/
|
|
12
|
+
type ButtonChildrenLike = string | number | boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The button props
|
|
15
|
+
*/
|
|
16
|
+
interface ButtonProps {
|
|
17
|
+
label?: string;
|
|
18
|
+
style?: ButtonStyle;
|
|
19
|
+
emoji?: ComponentEmojiResolvable;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
customId?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
skuId?: string;
|
|
24
|
+
onClick?: CommandKitButtonBuilderInteractionCollectorDispatch;
|
|
25
|
+
onError?: EventInterceptorErrorHandler;
|
|
26
|
+
options?: CommandKitButtonBuilderInteractionCollectorDispatchContextData;
|
|
27
|
+
onEnd?: CommandKitButtonBuilderOnEnd;
|
|
28
|
+
children?: MaybeArray<ButtonChildrenLike>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The button component.
|
|
32
|
+
* @param props The button properties.
|
|
33
|
+
* @returns The commandkit element.
|
|
34
|
+
* @example <Button style={ButtonStyle.Primary} customId="click_me">Click Me</Button>
|
|
35
|
+
*/
|
|
36
|
+
declare function Button(props: ButtonProps): CommandKitElement<'button-kit'>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Button, ButtonChildrenLike, ButtonProps };
|
|
39
|
+
//# sourceMappingURL=Button-4ZUXdA56.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EventInterceptorContextData, EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
+
import { Awaitable, ButtonBuilder, ButtonInteraction, Events } from "discord.js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/v1/button/ButtonKit.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The predicate function that filters button interactions.
|
|
8
|
+
* It receives a ButtonInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
9
|
+
*/
|
|
10
|
+
type ButtonKitPredicate = (interaction: ButtonInteraction) => Awaitable<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* The handler to run when a button is clicked. This handler is called with the interaction as the first argument.
|
|
13
|
+
* If the first argument is null, it means that the interaction collector has been destroyed.
|
|
14
|
+
*/
|
|
15
|
+
type OnButtonKitClick = CommandKitButtonBuilderInteractionCollectorDispatch;
|
|
16
|
+
/**
|
|
17
|
+
* The handler to run when the interaction collector ends. This handler is called with the reason as the first argument.
|
|
18
|
+
* If the first argument is null, it means that the interaction collector has been destroyed.
|
|
19
|
+
*/
|
|
20
|
+
type OnButtonKitEnd = CommandKitButtonBuilderOnEnd;
|
|
21
|
+
/**
|
|
22
|
+
* The handler to run when a button is clicked. This handler is called with the interaction as the first argument.
|
|
23
|
+
* If the first argument is null, it means that the interaction collector has been destroyed.
|
|
24
|
+
*/
|
|
25
|
+
type CommandKitButtonBuilderInteractionCollectorDispatch = (interaction: ButtonInteraction, context: ButtonKit) => Awaitable<void>;
|
|
26
|
+
/**
|
|
27
|
+
* The handler to run when the interaction collector ends. This handler is called with the reason as the first argument.
|
|
28
|
+
* If the first argument is null, it means that the interaction collector has been destroyed.
|
|
29
|
+
*/
|
|
30
|
+
type CommandKitButtonBuilderOnEnd = (reason: string) => Awaitable<void>;
|
|
31
|
+
/**
|
|
32
|
+
* The context data for the interaction collector.
|
|
33
|
+
* This includes the autoReset, time, filter, onEnd, and onError properties.
|
|
34
|
+
*/
|
|
35
|
+
type CommandKitButtonBuilderInteractionCollectorDispatchContextData = EventInterceptorContextData<Events.InteractionCreate>;
|
|
36
|
+
/**
|
|
37
|
+
* A builder for creating buttons with additional features like interaction collectors and event handling.
|
|
38
|
+
*/
|
|
39
|
+
declare class ButtonKit extends ButtonBuilder {
|
|
40
|
+
#private;
|
|
41
|
+
/**
|
|
42
|
+
* Sets up an inline interaction collector for this button. This collector by default allows as many interactions as possible if it is actively used.
|
|
43
|
+
* If unused, this expires after 24 hours or custom time if specified.
|
|
44
|
+
* @param handler The handler to run when the button is clicked
|
|
45
|
+
* @param data The context data to use for the interaction collector
|
|
46
|
+
* @returns This button
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const button = new ButtonKit()
|
|
50
|
+
* .setLabel('Click me')
|
|
51
|
+
* .setStyle(ButtonStyle.Primary)
|
|
52
|
+
* .setCustomId('click_me')
|
|
53
|
+
* .filter((interaction) => interaction.user.id === '1234567890')
|
|
54
|
+
* .onClick(async (interaction) => {
|
|
55
|
+
* await interaction.reply('You clicked me!');
|
|
56
|
+
* });
|
|
57
|
+
*
|
|
58
|
+
* const row = new ActionRowBuilder().addComponents(button);
|
|
59
|
+
*
|
|
60
|
+
* const message = await channel.send({ content: 'Click the button', components: [row] });
|
|
61
|
+
*
|
|
62
|
+
* // Remove onClick handler and destroy the interaction collector
|
|
63
|
+
* button.onClick(null);
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
onClick(handler: CommandKitButtonBuilderInteractionCollectorDispatch, data?: CommandKitButtonBuilderInteractionCollectorDispatchContextData): this;
|
|
67
|
+
onEnd(handler: CommandKitButtonBuilderOnEnd): this;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the handler to run when the interaction collector ends.
|
|
70
|
+
* @param handler - The handler to run when the interaction collector ends.
|
|
71
|
+
* @returns This instance of the modal builder.
|
|
72
|
+
*/
|
|
73
|
+
onError(handler: EventInterceptorErrorHandler): this;
|
|
74
|
+
/**
|
|
75
|
+
* Sets a filter for the interaction collector.
|
|
76
|
+
* @param predicate The filter to use for the interaction collector
|
|
77
|
+
*/
|
|
78
|
+
filter(predicate: ButtonKitPredicate): this;
|
|
79
|
+
private get customId();
|
|
80
|
+
/**
|
|
81
|
+
* Disposes of the button collector and cleans up resources.
|
|
82
|
+
*/
|
|
83
|
+
dispose(): this;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { ButtonKit, ButtonKitPredicate, CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd, OnButtonKitClick, OnButtonKitEnd };
|
|
87
|
+
//# sourceMappingURL=ButtonKit-C7r7RPNf.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { EventInterceptorErrorHandler } from "./EventInterceptor-x-R2qshQ.js";
|
|
2
|
+
import { CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, OnSelectMenuKitSubmit, SelectMenuKitPredicate } from "./common-DOCvOVC4.js";
|
|
3
|
+
import { ChannelSelectMenuBuilder, ChannelSelectMenuInteraction } from "discord.js";
|
|
4
|
+
|
|
5
|
+
//#region src/components/v1/select-menu/ChannelSelectMenuKit.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Type for the handler function that is called when the channel select menu is submitted.
|
|
9
|
+
*/
|
|
10
|
+
type OnChannelSelectMenuKitSubmit = OnSelectMenuKitSubmit<ChannelSelectMenuInteraction, ChannelSelectMenuKit>;
|
|
11
|
+
/**
|
|
12
|
+
* Type for the predicate function that filters channel select menu interactions.
|
|
13
|
+
* It receives a ChannelSelectMenuInteraction and returns a boolean or a Promise that resolves to a boolean.
|
|
14
|
+
*/
|
|
15
|
+
type ChannelSelectMenuKitPredicate = SelectMenuKitPredicate<ChannelSelectMenuInteraction>;
|
|
16
|
+
/**
|
|
17
|
+
* A builder for creating channel select menus with additional features like interaction collectors and event handling.
|
|
18
|
+
* This class extends the ChannelSelectMenuBuilder from discord.js and adds methods for handling interactions.
|
|
19
|
+
* It allows you to set a handler for when the channel select menu is submitted, filter interactions, and handle the end of the interaction collector.
|
|
20
|
+
*/
|
|
21
|
+
declare class ChannelSelectMenuKit extends ChannelSelectMenuBuilder {
|
|
22
|
+
#private;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the handler to run when the modal is submitted.
|
|
25
|
+
* @param handler - The handler to run when the modal is submitted.
|
|
26
|
+
* @param data - The context data for the interaction collector.
|
|
27
|
+
* @returns This instance of the modal builder.
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const modal = new ChannelSelectMenuKit()
|
|
31
|
+
* .setTitle('My Modal')
|
|
32
|
+
* .setCustomId('my-modal')
|
|
33
|
+
* .filter((interaction) => interaction.Channel.id === '1234567890')
|
|
34
|
+
* .onSelect(async (interaction) => {
|
|
35
|
+
* await interaction.reply('You submitted the modal!');
|
|
36
|
+
* })
|
|
37
|
+
* .addComponents(actionRow1, actionRow2);
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<ChannelSelectMenuInteraction, ChannelSelectMenuKit>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData): this;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the handler to run when the interaction collector ends.
|
|
43
|
+
* @param handler - The handler to run when the interaction collector ends.
|
|
44
|
+
* @returns This instance of the modal builder.
|
|
45
|
+
*/
|
|
46
|
+
onEnd(handler: CommandKitSelectMenuBuilderOnEnd): this;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the handler to run when the interaction collector ends.
|
|
49
|
+
* @param handler - The handler to run when the interaction collector ends.
|
|
50
|
+
* @returns This instance of the modal builder.
|
|
51
|
+
*/
|
|
52
|
+
onError(handler: EventInterceptorErrorHandler): this;
|
|
53
|
+
/**
|
|
54
|
+
* Sets a filter for the interaction collector.
|
|
55
|
+
* @param predicate - The filter to use for the interaction collector.
|
|
56
|
+
* @returns This instance of the modal builder.
|
|
57
|
+
*/
|
|
58
|
+
filter(predicate: SelectMenuKitPredicate<ChannelSelectMenuInteraction>): this;
|
|
59
|
+
private get customId();
|
|
60
|
+
/**
|
|
61
|
+
* Cleans up the interaction collector and removes the handler.
|
|
62
|
+
*/
|
|
63
|
+
dispose(): this;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { ChannelSelectMenuKit, ChannelSelectMenuKitPredicate, OnChannelSelectMenuKitSubmit };
|
|
67
|
+
//# sourceMappingURL=ChannelSelectMenuKit-BrXvBYNH.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
+
const node_events = require_chunk.__toESM(require("node:events"));
|
|
3
|
+
|
|
4
|
+
//#region src/events/CommandKitEventsChannel.ts
|
|
5
|
+
/**
|
|
6
|
+
* Represents a channel for emitting and listening to events in CommandKit.
|
|
7
|
+
* This class provides methods to manage event listeners and emit events
|
|
8
|
+
* within a specific namespace.
|
|
9
|
+
*/
|
|
10
|
+
var CommandKitEventsChannel = class {
|
|
11
|
+
emitter = new node_events.default();
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new instance of CommandKitEventsChannel.
|
|
14
|
+
* @param commandkit The CommandKit instance that this channel belongs to.
|
|
15
|
+
*/
|
|
16
|
+
constructor(commandkit) {
|
|
17
|
+
this.commandkit = commandkit;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a namespaced event channel. This allows you to manage events
|
|
21
|
+
* within a specific namespace, preventing conflicts with other event channels.
|
|
22
|
+
* This is useful for organizing events related to different parts of your application.
|
|
23
|
+
* @param namespace The namespace for the event channel.
|
|
24
|
+
* @returns An object containing methods for managing events within the namespace.
|
|
25
|
+
* @example commandkit.events.to('customNamespace').emit('eventName', data);
|
|
26
|
+
*/
|
|
27
|
+
to(namespace) {
|
|
28
|
+
return {
|
|
29
|
+
on: this.on.bind(this, namespace),
|
|
30
|
+
off: this.off.bind(this, namespace),
|
|
31
|
+
once: this.once.bind(this, namespace),
|
|
32
|
+
emit: this.emit.bind(this, namespace),
|
|
33
|
+
removeAllListeners: this.removeAllListeners.bind(this, namespace)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Register an event listener for a specific event within the namespace.
|
|
38
|
+
* @param namespace The namespace for the event channel.
|
|
39
|
+
* @param event The name of the event to listen for.
|
|
40
|
+
* @param listener The function to call when the event is emitted.
|
|
41
|
+
*/
|
|
42
|
+
on(namespace, event, listener) {
|
|
43
|
+
this.emitter.on(`${namespace}:${event}`, listener);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Unregister an event listener for a specific event within the namespace.
|
|
47
|
+
* @param namespace The namespace for the event channel.
|
|
48
|
+
* @param event The name of the event to stop listening for.
|
|
49
|
+
* @param listener The function that was registered as the listener.
|
|
50
|
+
*/
|
|
51
|
+
off(namespace, event, listener) {
|
|
52
|
+
this.emitter.off(`${namespace}:${event}`, listener);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Register an event listener that will be called only once for a specific event
|
|
56
|
+
* within the namespace.
|
|
57
|
+
* @param namespace The namespace for the event channel.
|
|
58
|
+
* @param event The name of the event to listen for.
|
|
59
|
+
* @param listener The function to call when the event is emitted.
|
|
60
|
+
*/
|
|
61
|
+
once(namespace, event, listener) {
|
|
62
|
+
this.emitter.once(`${namespace}:${event}`, listener);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Emit an event within the specified namespace, calling all registered listeners.
|
|
66
|
+
* @param namespace The namespace for the event channel.
|
|
67
|
+
* @param event The name of the event to emit.
|
|
68
|
+
* @param args The arguments to pass to the listeners.
|
|
69
|
+
* @returns A boolean indicating whether any listeners were called.
|
|
70
|
+
*/
|
|
71
|
+
emit(namespace, event, ...args) {
|
|
72
|
+
return this.emitter.emit(`${namespace}:${event}`, ...args);
|
|
73
|
+
}
|
|
74
|
+
removeAllListeners(namespace, event) {
|
|
75
|
+
if (event) this.emitter.removeAllListeners(`${namespace}:${event}`);
|
|
76
|
+
else this.emitter.removeAllListeners(namespace);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
Object.defineProperty(exports, 'CommandKitEventsChannel', {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () {
|
|
84
|
+
return CommandKitEventsChannel;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=CommandKitEventsChannel-Bgw0XCOl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandKitEventsChannel-Bgw0XCOl.js","names":[],"sources":["../src/events/CommandKitEventsChannel.ts"],"sourcesContent":["import EventEmitter from 'node:events';\nimport type { CommandKit } from '../commandkit';\nimport type { AsyncFunction, GenericFunction } from '../context/async-context';\n\n/**\n * The function type for event listeners.\n */\nexport type ListenerFunction = GenericFunction | AsyncFunction;\n\n/**\n * Represents a channel for emitting and listening to events in CommandKit.\n * This class provides methods to manage event listeners and emit events\n * within a specific namespace.\n */\nexport class CommandKitEventsChannel {\n private emitter = new EventEmitter();\n\n /**\n * Creates a new instance of CommandKitEventsChannel.\n * @param commandkit The CommandKit instance that this channel belongs to.\n */\n public constructor(public readonly commandkit: CommandKit) {}\n\n /**\n * Creates a namespaced event channel. This allows you to manage events\n * within a specific namespace, preventing conflicts with other event channels.\n * This is useful for organizing events related to different parts of your application.\n * @param namespace The namespace for the event channel.\n * @returns An object containing methods for managing events within the namespace.\n * @example commandkit.events.to('customNamespace').emit('eventName', data);\n */\n public to(namespace: string) {\n return {\n on: this.on.bind(this, namespace),\n off: this.off.bind(this, namespace),\n once: this.once.bind(this, namespace),\n emit: this.emit.bind(this, namespace),\n removeAllListeners: this.removeAllListeners.bind(this, namespace),\n };\n }\n\n /**\n * Register an event listener for a specific event within the namespace.\n * @param namespace The namespace for the event channel.\n * @param event The name of the event to listen for.\n * @param listener The function to call when the event is emitted.\n */\n public on(namespace: string, event: string, listener: ListenerFunction) {\n this.emitter.on(`${namespace}:${event}`, listener);\n }\n\n /**\n * Unregister an event listener for a specific event within the namespace.\n * @param namespace The namespace for the event channel.\n * @param event The name of the event to stop listening for.\n * @param listener The function that was registered as the listener.\n */\n public off(namespace: string, event: string, listener: ListenerFunction) {\n this.emitter.off(`${namespace}:${event}`, listener);\n }\n\n /**\n * Register an event listener that will be called only once for a specific event\n * within the namespace.\n * @param namespace The namespace for the event channel.\n * @param event The name of the event to listen for.\n * @param listener The function to call when the event is emitted.\n */\n public once(namespace: string, event: string, listener: ListenerFunction) {\n this.emitter.once(`${namespace}:${event}`, listener);\n }\n\n /**\n * Emit an event within the specified namespace, calling all registered listeners.\n * @param namespace The namespace for the event channel.\n * @param event The name of the event to emit.\n * @param args The arguments to pass to the listeners.\n * @returns A boolean indicating whether any listeners were called.\n */\n public emit(namespace: string, event: string, ...args: any[]) {\n return this.emitter.emit(`${namespace}:${event}`, ...args);\n }\n\n /**\n * Remove all listeners for a specific event or all events within the namespace.\n * @param namespace The namespace for the event channel.\n * @param event The name of the event to remove listeners for. If not provided, all listeners for all events in the namespace will be removed.\n */\n public removeAllListeners(namespace: string): void;\n public removeAllListeners(namespace: string, event: string): void;\n public removeAllListeners(namespace: string, event?: string): void {\n if (event) {\n this.emitter.removeAllListeners(`${namespace}:${event}`);\n } else {\n this.emitter.removeAllListeners(namespace);\n }\n }\n}\n"],"mappings":";;;;;;;;;AAcA,IAAa,0BAAb,MAAqC;CACnC,AAAQ,UAAU,IAAI;;;;;CAMtB,AAAO,YAAY,AAAgB,YAAwB;EAAxB;CAAyB;;;;;;;;;CAU5D,AAAO,GAAG,WAAmB;AAC3B,SAAO;GACL,IAAI,KAAK,GAAG,KAAK,MAAM;GACvB,KAAK,KAAK,IAAI,KAAK,MAAM;GACzB,MAAM,KAAK,KAAK,KAAK,MAAM;GAC3B,MAAM,KAAK,KAAK,KAAK,MAAM;GAC3B,oBAAoB,KAAK,mBAAmB,KAAK,MAAM;GACxD;CACH;;;;;;;CAQA,AAAO,GAAG,WAAmB,OAAe,UAA4B;AACtE,OAAK,QAAQ,GAAG,GAAG,UAAU,GAAG,SAAS;CAC3C;;;;;;;CAQA,AAAO,IAAI,WAAmB,OAAe,UAA4B;AACvE,OAAK,QAAQ,IAAI,GAAG,UAAU,GAAG,SAAS;CAC5C;;;;;;;;CASA,AAAO,KAAK,WAAmB,OAAe,UAA4B;AACxE,OAAK,QAAQ,KAAK,GAAG,UAAU,GAAG,SAAS;CAC7C;;;;;;;;CASA,AAAO,KAAK,WAAmB,OAAe,GAAG,MAAa;AAC5D,SAAO,KAAK,QAAQ,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG;CACvD;CASA,AAAO,mBAAmB,WAAmB,OAAsB;AACjE,MAAI,MACF,MAAK,QAAQ,mBAAmB,GAAG,UAAU,GAAG;MAEhD,MAAK,QAAQ,mBAAmB;CAEpC;AACF"}
|