commandkit 1.0.0-dev.20250610125321 → 1.0.0-dev.20250611125312

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.
Files changed (322) hide show
  1. package/dist/ActionRow-CmTHbo2t.js.map +1 -1
  2. package/dist/{ActionRow-D0wafJhZ.d.ts → ActionRow-DKnFVDME.d.ts} +6 -2
  3. package/dist/{Button-Bl5nbwTS.d.ts → Button-4ZUXdA56.d.ts} +11 -4
  4. package/dist/{ButtonKit-BSI7lCI0.d.ts → ButtonKit-C7r7RPNf.d.ts} +21 -2
  5. package/dist/{ChannelSelectMenuKit-L15A2jpT.d.ts → ChannelSelectMenuKit-BrXvBYNH.d.ts} +19 -3
  6. package/dist/{CommandKit-B-mjdP5x.d.ts → CommandKit-BkMUDbou.d.ts} +806 -9
  7. package/dist/{CommandKit-CnLBu_7m.js → CommandKit-C0W3U6jh.js} +621 -20
  8. package/dist/CommandKit-C0W3U6jh.js.map +1 -0
  9. package/dist/CommandKit.d.ts +25 -25
  10. package/dist/CommandKit.js +26 -26
  11. package/dist/CommandKitEventsChannel-BL_YN3Rm.js +87 -0
  12. package/dist/CommandKitEventsChannel-BL_YN3Rm.js.map +1 -0
  13. package/dist/CommandsRouter-CoOA7hkf.d.ts +146 -0
  14. package/dist/{CommandsRouter-BHaPno8o.js → CommandsRouter-DFRh47qD.js} +87 -1
  15. package/dist/CommandsRouter-DFRh47qD.js.map +1 -0
  16. package/dist/{CompilerPlugin-DrnhOC1c.js → CompilerPlugin-Bmy4izKz.js} +13 -2
  17. package/dist/CompilerPlugin-Bmy4izKz.js.map +1 -0
  18. package/dist/{CompilerPluginRuntime-C9wmPMQf.js → CompilerPluginRuntime-CgVU_gU0.js} +59 -1
  19. package/dist/CompilerPluginRuntime-CgVU_gU0.js.map +1 -0
  20. package/dist/DefaultLogger-pWzrSxMd.d.ts +60 -0
  21. package/dist/{EventInterceptor-Bvh05z7n.js → EventInterceptor-DWCHCGRh.js} +5 -1
  22. package/dist/EventInterceptor-DWCHCGRh.js.map +1 -0
  23. package/dist/{EventInterceptor-D_oEWSnF.d.ts → EventInterceptor-x-R2qshQ.d.ts} +8 -1
  24. package/dist/{EventWorkerContext-BYXamZ_4.d.ts → EventWorkerContext-DoFZMT8u.d.ts} +25 -2
  25. package/dist/{EventWorkerContext-BAKiTqJz.js → EventWorkerContext-DxfS_0fJ.js} +24 -1
  26. package/dist/EventWorkerContext-DxfS_0fJ.js.map +1 -0
  27. package/dist/ILogger-Cs5SFzqd.d.ts +34 -0
  28. package/dist/Logger-5ew_YS4P.d.ts +37 -0
  29. package/dist/{MentionableSelectMenuKit-BiUSKUtZ.d.ts → MentionableSelectMenuKit-CPTKqx-O.d.ts} +14 -3
  30. package/dist/{MessageCommandParser-D02-wpZN.js → MessageCommandParser-Cz-3I-wL.js} +70 -2
  31. package/dist/MessageCommandParser-Cz-3I-wL.js.map +1 -0
  32. package/dist/MessageCommandParser-ROLibZPX.d.ts +195 -0
  33. package/dist/{Modal-Cxm6cs5c.d.ts → Modal-C6UTRdYQ.d.ts} +8 -4
  34. package/dist/{ModalKit-CKtQ8eXW.d.ts → ModalKit-Btz58KYn.d.ts} +23 -2
  35. package/dist/{PluginCommon-DPqnQngK.js → PluginCommon-D_Z8Oiic.js} +23 -1
  36. package/dist/PluginCommon-D_Z8Oiic.js.map +1 -0
  37. package/dist/{RoleSelectMenuKit-BSMKkru2.d.ts → RoleSelectMenuKit-C26lU3sN.d.ts} +19 -3
  38. package/dist/{RuntimePlugin-BJoDa8ZR.js → RuntimePlugin-CehKbceZ.js} +5 -2
  39. package/dist/RuntimePlugin-CehKbceZ.js.map +1 -0
  40. package/dist/SelectMenu-Diy87_ba.d.ts +137 -0
  41. package/dist/{StringSelectMenuKit-B9FHTe48.d.ts → StringSelectMenuKit-Bhs8U6WI.d.ts} +19 -3
  42. package/dist/{UserSelectMenuKit-DiP0imyo.d.ts → UserSelectMenuKit-CfqFJdxz.d.ts} +19 -3
  43. package/dist/analytics/analytics-engine.d.ts +25 -25
  44. package/dist/analytics/analytics-engine.js +26 -26
  45. package/dist/analytics/analytics-provider.d.ts +25 -25
  46. package/dist/analytics/constants.d.ts +13 -0
  47. package/dist/analytics/constants.js +1 -1
  48. package/dist/analytics/utils.d.ts +13 -0
  49. package/dist/analytics/utils.js +26 -26
  50. package/dist/app/commands/AppCommandRunner.d.ts +25 -25
  51. package/dist/app/commands/AppCommandRunner.js +26 -26
  52. package/dist/app/commands/Context.d.ts +25 -25
  53. package/dist/app/commands/Context.js +26 -26
  54. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  55. package/dist/app/commands/MessageCommandParser.js +2 -2
  56. package/dist/app/commands/helpers.d.ts +1 -1
  57. package/dist/app/commands/helpers.js +1 -1
  58. package/dist/app/events/EventWorkerContext.d.ts +26 -26
  59. package/dist/app/events/EventWorkerContext.js +1 -1
  60. package/dist/app/handlers/AppCommandHandler.d.ts +25 -25
  61. package/dist/app/handlers/AppCommandHandler.js +26 -26
  62. package/dist/app/handlers/AppEventsHandler.d.ts +25 -25
  63. package/dist/app/handlers/AppEventsHandler.js +26 -26
  64. package/dist/app/index.d.ts +25 -25
  65. package/dist/app/index.js +27 -27
  66. package/dist/app/middleware/signals.js +2 -2
  67. package/dist/app/register/CommandRegistrar.d.ts +25 -25
  68. package/dist/app/register/CommandRegistrar.js +26 -26
  69. package/dist/app/router/CommandsRouter.d.ts +1 -1
  70. package/dist/app/router/CommandsRouter.js +1 -1
  71. package/dist/app/router/index.d.ts +1 -1
  72. package/dist/app/router/index.js +1 -1
  73. package/dist/{app-process-YbSHvqf-.js → app-process-Bo-LedP8.js} +11 -3
  74. package/dist/app-process-Bo-LedP8.js.map +1 -0
  75. package/dist/{build-BejatFZX.js → build-CWrpkal-.js} +14 -6
  76. package/dist/build-CWrpkal-.js.map +1 -0
  77. package/dist/cli/app-process.d.ts +5 -0
  78. package/dist/cli/app-process.js +5 -5
  79. package/dist/cli/build.d.ts +33 -25
  80. package/dist/cli/build.js +29 -29
  81. package/dist/cli/common.d.ts +57 -27
  82. package/dist/cli/common.js +3 -3
  83. package/dist/cli/development.d.ts +4 -0
  84. package/dist/cli/development.js +46 -30
  85. package/dist/cli/development.js.map +1 -1
  86. package/dist/cli/env.d.ts +32 -0
  87. package/dist/cli/env.js +1 -1
  88. package/dist/cli/generators.d.ts +8 -0
  89. package/dist/cli/generators.js +27 -3
  90. package/dist/cli/generators.js.map +1 -1
  91. package/dist/cli/information.d.ts +4 -0
  92. package/dist/cli/information.js +17 -1
  93. package/dist/cli/information.js.map +1 -1
  94. package/dist/cli/init.js +27 -27
  95. package/dist/cli/production.d.ts +9 -0
  96. package/dist/cli/production.js +39 -31
  97. package/dist/cli/production.js.map +1 -1
  98. package/dist/cli/type-checker.d.ts +2 -0
  99. package/dist/cli/type-checker.js +4 -4
  100. package/dist/cli/utils.d.ts +5 -0
  101. package/dist/cli/utils.js +1 -1
  102. package/dist/{common-pvPJVTfe.d.ts → common-DOCvOVC4.d.ts} +7 -2
  103. package/dist/{common-CW8v7gAn.js → common-Dasi9oKU.js} +44 -2
  104. package/dist/common-Dasi9oKU.js.map +1 -0
  105. package/dist/{common-CeO-vn8Y.js → common-vnMIelAE.js} +4 -1
  106. package/dist/common-vnMIelAE.js.map +1 -0
  107. package/dist/components/common/EventInterceptor.d.ts +1 -1
  108. package/dist/components/common/EventInterceptor.js +1 -1
  109. package/dist/components/common/element.d.ts +4 -4
  110. package/dist/components/common/element.js +2 -2
  111. package/dist/components/index.d.ts +20 -20
  112. package/dist/components/index.js +26 -26
  113. package/dist/components/v1/action-row/ActionRow.d.ts +5 -5
  114. package/dist/components/v1/button/Button.d.ts +5 -5
  115. package/dist/components/v1/button/Button.js +26 -26
  116. package/dist/components/v1/button/ButtonKit.d.ts +2 -2
  117. package/dist/components/v1/button/ButtonKit.js +26 -26
  118. package/dist/components/v1/modal/Modal.d.ts +5 -5
  119. package/dist/components/v1/modal/Modal.js +26 -26
  120. package/dist/components/v1/modal/ModalKit.d.ts +2 -2
  121. package/dist/components/v1/modal/ModalKit.js +26 -26
  122. package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +3 -3
  123. package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +26 -26
  124. package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +3 -3
  125. package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +26 -26
  126. package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +3 -3
  127. package/dist/components/v1/select-menu/RoleSelectMenuKit.js +26 -26
  128. package/dist/components/v1/select-menu/SelectMenu.d.ts +8 -8
  129. package/dist/components/v1/select-menu/SelectMenu.js +26 -26
  130. package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +3 -3
  131. package/dist/components/v1/select-menu/StringSelectMenuKit.js +26 -26
  132. package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +3 -3
  133. package/dist/components/v1/select-menu/UserSelectMenuKit.js +26 -26
  134. package/dist/components/v1/select-menu/common.d.ts +2 -2
  135. package/dist/components/v2/common.d.ts +4 -0
  136. package/dist/components/v2/common.js +1 -1
  137. package/dist/components/v2/container.d.ts +1 -1
  138. package/dist/components/v2/container.js +2 -2
  139. package/dist/components/v2/file.d.ts +1 -1
  140. package/dist/components/v2/file.js +1 -1
  141. package/dist/components/v2/index.d.ts +6 -6
  142. package/dist/components/v2/index.js +7 -7
  143. package/dist/components/v2/media-gallery.d.ts +1 -1
  144. package/dist/components/v2/media-gallery.js +2 -2
  145. package/dist/components/v2/section.d.ts +1 -1
  146. package/dist/components/v2/section.js +2 -2
  147. package/dist/components/v2/separator.d.ts +1 -1
  148. package/dist/components/v2/separator.js +1 -1
  149. package/dist/components/v2/text-display.d.ts +1 -1
  150. package/dist/components/v2/text-display.js +1 -1
  151. package/dist/config/config.d.ts +28 -28
  152. package/dist/config/config.js +26 -26
  153. package/dist/config/default.d.ts +30 -27
  154. package/dist/config/default.js +26 -26
  155. package/dist/config/loader.d.ts +33 -27
  156. package/dist/config/loader.js +26 -26
  157. package/dist/config/types.d.ts +26 -26
  158. package/dist/config/utils.d.ts +27 -27
  159. package/dist/config/utils.js +3 -0
  160. package/dist/config/utils.js.map +1 -1
  161. package/dist/{config-BjmEZYpx.d.ts → config-aCpqqs1C.d.ts} +3 -3
  162. package/dist/constants-BTttfrm3.d.ts +42 -0
  163. package/dist/{constants-DWe181uQ.js → constants-CXwjhIYH.js} +9 -1
  164. package/dist/constants-CXwjhIYH.js.map +1 -0
  165. package/dist/{constants-CCqS_v55.js → constants-DDRctWlU.js} +14 -8
  166. package/dist/constants-DDRctWlU.js.map +1 -0
  167. package/dist/{container-CpuiLsZM.js → container-DCjIgp-B.js} +12 -2
  168. package/dist/container-DCjIgp-B.js.map +1 -0
  169. package/dist/container-DaUKKPm-.d.ts +24 -0
  170. package/dist/context/async-context.d.ts +25 -25
  171. package/dist/context/async-context.js +26 -26
  172. package/dist/context/environment.d.ts +25 -25
  173. package/dist/context/environment.js +26 -26
  174. package/dist/element-CAXu1XtK.d.ts +72 -0
  175. package/dist/{element-DcqNz1dV.js → element-Cq-LoDjk.js} +27 -2
  176. package/dist/element-Cq-LoDjk.js.map +1 -0
  177. package/dist/{env-ERkaRfQO.js → env-DemeP-uq.js} +33 -1
  178. package/dist/env-DemeP-uq.js.map +1 -0
  179. package/dist/{error-codes-C_UO39jz.js → error-codes-CxlUBdF6.js} +20 -1
  180. package/dist/error-codes-CxlUBdF6.js.map +1 -0
  181. package/dist/events/CommandKitEventsChannel.d.ts +25 -25
  182. package/dist/events/CommandKitEventsChannel.js +1 -1
  183. package/dist/{feature-flags-BFiGn38a.js → feature-flags-CLZLGnAs.js} +4 -4
  184. package/dist/feature-flags-CLZLGnAs.js.map +1 -0
  185. package/dist/file-DTrr-p09.d.ts +24 -0
  186. package/dist/{file-DE69SSOP.js → file-DVZC0QXI.js} +11 -1
  187. package/dist/file-DVZC0QXI.js.map +1 -0
  188. package/dist/flags/FlagProvider.d.ts +25 -25
  189. package/dist/flags/feature-flags.d.ts +25 -25
  190. package/dist/flags/feature-flags.js +27 -27
  191. package/dist/flags/store.d.ts +25 -25
  192. package/dist/flags/store.js +1 -1
  193. package/dist/{helpers-CswC9gKF.js → helpers-CnfXqF_k.js} +11 -1
  194. package/dist/helpers-CnfXqF_k.js.map +1 -0
  195. package/dist/helpers-Wg6P5fRQ.d.ts +23 -0
  196. package/dist/index.d.ts +34 -34
  197. package/dist/index.js +30 -31
  198. package/dist/{init-BDgyvx9E.js → init-_FwacDcI.js} +6 -6
  199. package/dist/{init-BDgyvx9E.js.map → init-_FwacDcI.js.map} +1 -1
  200. package/dist/logger/DefaultLogger.d.ts +2 -2
  201. package/dist/logger/DefaultLogger.js +26 -26
  202. package/dist/logger/ILogger.d.ts +1 -1
  203. package/dist/logger/Logger.d.ts +2 -2
  204. package/dist/logger/Logger.js +26 -26
  205. package/dist/media-gallery-BMsXSot3.d.ts +49 -0
  206. package/dist/{media-gallery-nUEHqKVF.js → media-gallery-CIKypjbJ.js} +27 -2
  207. package/dist/media-gallery-CIKypjbJ.js.map +1 -0
  208. package/dist/plugins/CompilerPlugin.d.ts +25 -25
  209. package/dist/plugins/CompilerPlugin.js +2 -2
  210. package/dist/plugins/PluginCommon.d.ts +25 -25
  211. package/dist/plugins/PluginCommon.js +1 -1
  212. package/dist/plugins/RuntimePlugin.d.ts +25 -25
  213. package/dist/plugins/RuntimePlugin.js +2 -2
  214. package/dist/plugins/index.d.ts +25 -25
  215. package/dist/plugins/index.js +26 -26
  216. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +25 -25
  217. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +26 -26
  218. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +25 -25
  219. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +1 -1
  220. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +25 -25
  221. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +26 -26
  222. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +37 -25
  223. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +26 -26
  224. package/dist/plugins/plugin-runtime/runtime.d.ts +25 -25
  225. package/dist/plugins/types.d.ts +25 -25
  226. package/dist/{section-D6t7tyEZ.js → section-CuYr0Inu.js} +22 -2
  227. package/dist/section-CuYr0Inu.js.map +1 -0
  228. package/dist/section-Dh_FhPeC.d.ts +45 -0
  229. package/dist/separator-CMf6Cyy5.d.ts +22 -0
  230. package/dist/{separator-DYAFK-Jj.js → separator-DLdWBjSN.js} +11 -1
  231. package/dist/separator-DLdWBjSN.js.map +1 -0
  232. package/dist/{signals-scJdEbly.js → signals-CSSSZAZ6.js} +2 -2
  233. package/dist/{signals-scJdEbly.js.map → signals-CSSSZAZ6.js.map} +1 -1
  234. package/dist/{store-Ci6ib2C9.js → store-x93NXUy_.js} +5 -1
  235. package/dist/store-x93NXUy_.js.map +1 -0
  236. package/dist/{text-display-Dy6JHB5X.js → text-display--p2-BoUa.js} +13 -1
  237. package/dist/text-display--p2-BoUa.js.map +1 -0
  238. package/dist/text-display-DRw3r_lK.d.ts +33 -0
  239. package/dist/{type-checker-CXVdS7qc.js → type-checker-P8oyY259.js} +6 -2
  240. package/dist/type-checker-P8oyY259.js.map +1 -0
  241. package/dist/{types-DjL43eQS.d.ts → types-DwmPE0nY.d.ts} +2 -2
  242. package/dist/{types-package-CTSNSM93.js → types-package-BpY3acyl.js} +8 -2
  243. package/dist/types-package-BpY3acyl.js.map +1 -0
  244. package/dist/types.d.ts +25 -25
  245. package/dist/{utilities-DQT4lzAB.d.ts → utilities-D_MFPmTe.d.ts} +45 -2
  246. package/dist/utils/colors.d.ts +2 -2
  247. package/dist/utils/constants.d.ts +2 -2
  248. package/dist/utils/constants.js +1 -2
  249. package/dist/utils/dev-hooks.d.ts +26 -26
  250. package/dist/utils/dev-hooks.js +26 -26
  251. package/dist/utils/error-codes.d.ts +34 -0
  252. package/dist/utils/error-codes.js +1 -1
  253. package/dist/utils/types-package.d.ts +6 -0
  254. package/dist/utils/types-package.js +2 -2
  255. package/dist/utils/utilities.d.ts +1 -1
  256. package/dist/utils/utilities.js +26 -26
  257. package/dist/utils/warn-unstable.d.ts +10 -0
  258. package/dist/utils/warn-unstable.js +1 -1
  259. package/dist/{utils-IYtoeTur.js → utils-C8a_hMvn.js} +5 -1
  260. package/dist/utils-C8a_hMvn.js.map +1 -0
  261. package/dist/{utils-VCdd7XhD.d.ts → utils-DS6OiGvg.d.ts} +12 -2
  262. package/dist/{version-BSsOib4x.js → version-IoXx-oYe.js} +5 -2
  263. package/dist/version-IoXx-oYe.js.map +1 -0
  264. package/dist/version.js +1 -1
  265. package/dist/{warn-unstable-DHLaxPC8.js → warn-unstable-CttBdmlS.js} +11 -1
  266. package/dist/warn-unstable-CttBdmlS.js.map +1 -0
  267. package/package.json +2 -2
  268. package/dist/CommandKit-CnLBu_7m.js.map +0 -1
  269. package/dist/CommandKitEventsChannel-B6LKgxmv.js +0 -44
  270. package/dist/CommandKitEventsChannel-B6LKgxmv.js.map +0 -1
  271. package/dist/CommandsRouter-BHaPno8o.js.map +0 -1
  272. package/dist/CommandsRouter-C7X-eXE2.d.ts +0 -67
  273. package/dist/CompilerPlugin-DrnhOC1c.js.map +0 -1
  274. package/dist/CompilerPluginRuntime-C9wmPMQf.js.map +0 -1
  275. package/dist/DefaultLogger-CcW-Fuq5.d.ts +0 -30
  276. package/dist/EventInterceptor-Bvh05z7n.js.map +0 -1
  277. package/dist/EventWorkerContext-BAKiTqJz.js.map +0 -1
  278. package/dist/ILogger-kqwb2kUu.d.ts +0 -11
  279. package/dist/Logger-B4B_URL-.d.ts +0 -17
  280. package/dist/MessageCommandParser-D02-wpZN.js.map +0 -1
  281. package/dist/MessageCommandParser-tzroBwij.d.ts +0 -62
  282. package/dist/PluginCommon-DPqnQngK.js.map +0 -1
  283. package/dist/RuntimePlugin-BJoDa8ZR.js.map +0 -1
  284. package/dist/SelectMenu-b7jgrkjO.d.ts +0 -36
  285. package/dist/app-process-YbSHvqf-.js.map +0 -1
  286. package/dist/build-BejatFZX.js.map +0 -1
  287. package/dist/common-CW8v7gAn.js.map +0 -1
  288. package/dist/common-CeO-vn8Y.js.map +0 -1
  289. package/dist/constants-BPWSrMkn.d.ts +0 -18
  290. package/dist/constants-CCqS_v55.js.map +0 -1
  291. package/dist/constants-DWe181uQ.js.map +0 -1
  292. package/dist/container-CpuiLsZM.js.map +0 -1
  293. package/dist/container-CwEATQy2.d.ts +0 -10
  294. package/dist/element-D_nyVwgB.d.ts +0 -30
  295. package/dist/element-DcqNz1dV.js.map +0 -1
  296. package/dist/env-ERkaRfQO.js.map +0 -1
  297. package/dist/error-codes-C_UO39jz.js.map +0 -1
  298. package/dist/feature-flags-BFiGn38a.js.map +0 -1
  299. package/dist/file-BdyYwkaI.d.ts +0 -10
  300. package/dist/file-DE69SSOP.js.map +0 -1
  301. package/dist/helpers-CswC9gKF.js.map +0 -1
  302. package/dist/helpers-DAmE106r.d.ts +0 -9
  303. package/dist/media-gallery-DCu02VXc.d.ts +0 -17
  304. package/dist/media-gallery-nUEHqKVF.js.map +0 -1
  305. package/dist/section-D6t7tyEZ.js.map +0 -1
  306. package/dist/section-fktaECHL.d.ts +0 -18
  307. package/dist/separator-CuesaLrC.d.ts +0 -8
  308. package/dist/separator-DYAFK-Jj.js.map +0 -1
  309. package/dist/store-Ci6ib2C9.js.map +0 -1
  310. package/dist/text-display-DNMwmGHJ.d.ts +0 -12
  311. package/dist/text-display-Dy6JHB5X.js.map +0 -1
  312. package/dist/type-checker-CXVdS7qc.js.map +0 -1
  313. package/dist/types-package-CTSNSM93.js.map +0 -1
  314. package/dist/utils/clone.d.ts +0 -5
  315. package/dist/utils/clone.js +0 -9
  316. package/dist/utils/clone.js.map +0 -1
  317. package/dist/utils/get-paths.d.ts +0 -6
  318. package/dist/utils/get-paths.js +0 -34
  319. package/dist/utils/get-paths.js.map +0 -1
  320. package/dist/utils-IYtoeTur.js.map +0 -1
  321. package/dist/version-BSsOib4x.js.map +0 -1
  322. package/dist/warn-unstable-DHLaxPC8.js.map +0 -1
@@ -1,8 +1,18 @@
1
1
  const require_chunk = require('./chunk-nOFOJqeH.js');
2
- const require_common = require('./common-CeO-vn8Y.js');
2
+ const require_common = require('./common-vnMIelAE.js');
3
3
  const discord_js = require_chunk.__toESM(require("discord.js"));
4
4
 
5
5
  //#region src/components/v2/container.ts
6
+ /**
7
+ * The components v2 container component
8
+ * @param props - The properties for the container component.
9
+ * @returns the container builder instance.
10
+ * @example ```tsx
11
+ * import { Container } from 'commandkit';
12
+ *
13
+ * const container = <Container>...</Container>;
14
+ * ```
15
+ */
6
16
  function Container(props) {
7
17
  const container = new discord_js.ContainerBuilder();
8
18
  require_common.applyId(props, container);
@@ -30,4 +40,4 @@ Object.defineProperty(exports, 'Container', {
30
40
  return Container;
31
41
  }
32
42
  });
33
- //# sourceMappingURL=container-CpuiLsZM.js.map
43
+ //# sourceMappingURL=container-DCjIgp-B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-DCjIgp-B.js","names":[],"sources":["../src/components/v2/container.ts"],"sourcesContent":["import {\n ActionRowBuilder,\n ComponentBuilder,\n ContainerBuilder,\n ContainerComponentData,\n FileBuilder,\n MediaGalleryBuilder,\n SectionBuilder,\n SeparatorBuilder,\n TextDisplayBuilder,\n} from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * Represents the properties for a container component.\n */\nexport interface ContainerProps\n extends Omit<ContainerComponentData, 'type' | 'components'> {\n children?: ComponentBuilder[];\n}\n\n/**\n * The components v2 container component\n * @param props - The properties for the container component.\n * @returns the container builder instance.\n * @example ```tsx\n * import { Container } from 'commandkit';\n *\n * const container = <Container>...</Container>;\n * ```\n */\nexport function Container(props: ContainerProps): ContainerBuilder {\n const container = new ContainerBuilder();\n\n applyId(props, container);\n\n if (typeof props.accentColor != null) {\n container.setAccentColor(props.accentColor);\n }\n\n if (props.spoiler != null) {\n container.setSpoiler(props.spoiler);\n }\n\n if (props.children != null) {\n if (!Array.isArray(props.children)) props.children = [props.children];\n if (props.children.length === 0) return container;\n\n for (const child of props.children.flat()) {\n if (child instanceof TextDisplayBuilder) {\n container.addTextDisplayComponents(child);\n }\n\n if (child instanceof FileBuilder) {\n container.addFileComponents(child);\n }\n\n if (child instanceof ActionRowBuilder) {\n container.addActionRowComponents(child);\n }\n\n if (child instanceof SeparatorBuilder) {\n container.addSeparatorComponents(child);\n }\n\n if (child instanceof SectionBuilder) {\n container.addSectionComponents(child);\n }\n\n if (child instanceof MediaGalleryBuilder) {\n container.addMediaGalleryComponents(child);\n }\n }\n }\n\n return container;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,SAAgB,UAAU,OAAyC;CACjE,MAAM,YAAY,IAAI;AAEtB,wBAAQ,OAAO,UAAU;AAGvB,WAAU,eAAe,MAAM,YAAY;AAG7C,KAAI,MAAM,WAAW,KACnB,WAAU,WAAW,MAAM,QAAQ;AAGrC,KAAI,MAAM,YAAY,MAAM;AAC1B,OAAK,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,QAAS;AACrE,MAAI,MAAM,SAAS,WAAW,EAAG,QAAO;AAExC,OAAK,MAAM,SAAS,MAAM,SAAS,MAAM,EAAE;AACzC,OAAI,iBAAiB,8BACnB,WAAU,yBAAyB,MAAM;AAG3C,OAAI,iBAAiB,uBACnB,WAAU,kBAAkB,MAAM;AAGpC,OAAI,iBAAiB,4BACnB,WAAU,uBAAuB,MAAM;AAGzC,OAAI,iBAAiB,4BACnB,WAAU,uBAAuB,MAAM;AAGzC,OAAI,iBAAiB,0BACnB,WAAU,qBAAqB,MAAM;AAGvC,OAAI,iBAAiB,+BACnB,WAAU,0BAA0B,MAAM;EAE9C;CACF;AAEA,QAAO;AACT"}
@@ -0,0 +1,24 @@
1
+ import { ComponentBuilder, ContainerBuilder, ContainerComponentData } from "discord.js";
2
+
3
+ //#region src/components/v2/container.d.ts
4
+
5
+ /**
6
+ * Represents the properties for a container component.
7
+ */
8
+ interface ContainerProps extends Omit<ContainerComponentData, 'type' | 'components'> {
9
+ children?: ComponentBuilder[];
10
+ }
11
+ /**
12
+ * The components v2 container component
13
+ * @param props - The properties for the container component.
14
+ * @returns the container builder instance.
15
+ * @example ```tsx
16
+ * import { Container } from 'commandkit';
17
+ *
18
+ * const container = <Container>...</Container>;
19
+ * ```
20
+ */
21
+ declare function Container(props: ContainerProps): ContainerBuilder;
22
+ //#endregion
23
+ export { Container, ContainerProps };
24
+ //# sourceMappingURL=container-DaUKKPm-.d.ts.map
@@ -1,32 +1,32 @@
1
- import { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment } from "../CommandKit-B-mjdP5x.js";
2
- import "../EventInterceptor-D_oEWSnF.js";
3
- import "../ButtonKit-BSI7lCI0.js";
4
- import "../ModalKit-CKtQ8eXW.js";
5
- import "../element-D_nyVwgB.js";
6
- import "../ActionRow-D0wafJhZ.js";
1
+ import { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment } from "../CommandKit-BkMUDbou.js";
2
+ import "../EventInterceptor-x-R2qshQ.js";
3
+ import "../ButtonKit-C7r7RPNf.js";
4
+ import "../ModalKit-Btz58KYn.js";
5
+ import "../element-CAXu1XtK.js";
6
+ import "../ActionRow-DKnFVDME.js";
7
7
  import "../types-CJ-XvOFN.js";
8
- import "../Button-Bl5nbwTS.js";
9
- import "../Modal-Cxm6cs5c.js";
10
- import "../common-pvPJVTfe.js";
11
- import "../StringSelectMenuKit-B9FHTe48.js";
12
- import "../ChannelSelectMenuKit-L15A2jpT.js";
13
- import "../MentionableSelectMenuKit-BiUSKUtZ.js";
14
- import "../UserSelectMenuKit-DiP0imyo.js";
15
- import "../RoleSelectMenuKit-BSMKkru2.js";
16
- import "../SelectMenu-b7jgrkjO.js";
17
- import "../container-CwEATQy2.js";
18
- import "../file-BdyYwkaI.js";
19
- import "../media-gallery-DCu02VXc.js";
20
- import "../section-fktaECHL.js";
21
- import "../separator-CuesaLrC.js";
22
- import "../text-display-DNMwmGHJ.js";
8
+ import "../Button-4ZUXdA56.js";
9
+ import "../Modal-C6UTRdYQ.js";
10
+ import "../common-DOCvOVC4.js";
11
+ import "../StringSelectMenuKit-Bhs8U6WI.js";
12
+ import "../ChannelSelectMenuKit-BrXvBYNH.js";
13
+ import "../MentionableSelectMenuKit-CPTKqx-O.js";
14
+ import "../UserSelectMenuKit-CfqFJdxz.js";
15
+ import "../RoleSelectMenuKit-C26lU3sN.js";
16
+ import "../SelectMenu-Diy87_ba.js";
17
+ import "../container-DaUKKPm-.js";
18
+ import "../file-DTrr-p09.js";
19
+ import "../media-gallery-BMsXSot3.js";
20
+ import "../section-Dh_FhPeC.js";
21
+ import "../separator-CMf6Cyy5.js";
22
+ import "../text-display-DRw3r_lK.js";
23
23
  import "../index-Dw5cCt-A.js";
24
24
  import "../index-E7Wvm5uX.js";
25
- import "../MessageCommandParser-tzroBwij.js";
25
+ import "../MessageCommandParser-ROLibZPX.js";
26
26
  import "../signals-DUoWkeZ7.js";
27
- import "../helpers-DAmE106r.js";
28
- import "../CommandsRouter-C7X-eXE2.js";
27
+ import "../helpers-Wg6P5fRQ.js";
28
+ import "../CommandsRouter-CoOA7hkf.js";
29
29
  import "../EventsRouter-BacqK6z3.js";
30
30
  import "../index-CUPkUUOR.js";
31
- import "../constants-BPWSrMkn.js";
31
+ import "../constants-BTttfrm3.js";
32
32
  export { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment };
@@ -1,39 +1,39 @@
1
1
  require('../colors-Cd4Oz-r-.js');
2
2
  require('../ActionRow-CmTHbo2t.js');
3
- require('../error-codes-C_UO39jz.js');
4
- const require_CommandKit = require('../CommandKit-CnLBu_7m.js');
3
+ require('../error-codes-CxlUBdF6.js');
4
+ const require_CommandKit = require('../CommandKit-C0W3U6jh.js');
5
5
  require('../common-CcfjYnPG.js');
6
- require('../common-CeO-vn8Y.js');
7
- require('../container-CpuiLsZM.js');
8
- require('../file-DE69SSOP.js');
9
- require('../media-gallery-nUEHqKVF.js');
10
- require('../section-D6t7tyEZ.js');
11
- require('../separator-DYAFK-Jj.js');
12
- require('../text-display-Dy6JHB5X.js');
6
+ require('../common-vnMIelAE.js');
7
+ require('../container-DCjIgp-B.js');
8
+ require('../file-DVZC0QXI.js');
9
+ require('../media-gallery-CIKypjbJ.js');
10
+ require('../section-CuYr0Inu.js');
11
+ require('../separator-DLdWBjSN.js');
12
+ require('../text-display--p2-BoUa.js');
13
13
  require('../v2-DofkPKHs.js');
14
- require('../warn-unstable-DHLaxPC8.js');
15
- require('../element-DcqNz1dV.js');
14
+ require('../warn-unstable-CttBdmlS.js');
15
+ require('../element-Cq-LoDjk.js');
16
16
  require('../types-B5VPP9ig.js');
17
- require('../EventInterceptor-Bvh05z7n.js');
18
- require('../constants-CCqS_v55.js');
19
- require('../PluginCommon-DPqnQngK.js');
20
- require('../CompilerPlugin-DrnhOC1c.js');
21
- require('../RuntimePlugin-BJoDa8ZR.js');
17
+ require('../EventInterceptor-DWCHCGRh.js');
18
+ require('../constants-DDRctWlU.js');
19
+ require('../PluginCommon-D_Z8Oiic.js');
20
+ require('../CompilerPlugin-Bmy4izKz.js');
21
+ require('../RuntimePlugin-CehKbceZ.js');
22
22
  require('../types-Bq0EWaM3.js');
23
- require('../CompilerPluginRuntime-C9wmPMQf.js');
23
+ require('../CompilerPluginRuntime-CgVU_gU0.js');
24
24
  require('../runtime-D0JnztkU.js');
25
- require('../EventWorkerContext-BAKiTqJz.js');
25
+ require('../EventWorkerContext-DxfS_0fJ.js');
26
26
  require('../resolve-file-url-ifwdwqmq.js');
27
- require('../MessageCommandParser-D02-wpZN.js');
28
- require('../signals-scJdEbly.js');
29
- require('../constants-DWe181uQ.js');
30
- require('../types-package-CTSNSM93.js');
31
- require('../CommandsRouter-BHaPno8o.js');
27
+ require('../MessageCommandParser-Cz-3I-wL.js');
28
+ require('../signals-CSSSZAZ6.js');
29
+ require('../constants-CXwjhIYH.js');
30
+ require('../types-package-BpY3acyl.js');
31
+ require('../CommandsRouter-DFRh47qD.js');
32
32
  require('../EventsRouter-CqnrlbjN.js');
33
33
  require('../router-Dn35v30f.js');
34
- require('../common-CW8v7gAn.js');
35
- require('../CommandKitEventsChannel-B6LKgxmv.js');
36
- require('../store-Ci6ib2C9.js');
34
+ require('../common-Dasi9oKU.js');
35
+ require('../CommandKitEventsChannel-BL_YN3Rm.js');
36
+ require('../store-x93NXUy_.js');
37
37
 
38
38
  exports.exitContext = require_CommandKit.exitContext;
39
39
  exports.getCommandKit = require_CommandKit.getCommandKit;
@@ -1,32 +1,32 @@
1
- import { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter } from "../CommandKit-B-mjdP5x.js";
2
- import "../EventInterceptor-D_oEWSnF.js";
3
- import "../ButtonKit-BSI7lCI0.js";
4
- import "../ModalKit-CKtQ8eXW.js";
5
- import "../element-D_nyVwgB.js";
6
- import "../ActionRow-D0wafJhZ.js";
1
+ import { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter } from "../CommandKit-BkMUDbou.js";
2
+ import "../EventInterceptor-x-R2qshQ.js";
3
+ import "../ButtonKit-C7r7RPNf.js";
4
+ import "../ModalKit-Btz58KYn.js";
5
+ import "../element-CAXu1XtK.js";
6
+ import "../ActionRow-DKnFVDME.js";
7
7
  import "../types-CJ-XvOFN.js";
8
- import "../Button-Bl5nbwTS.js";
9
- import "../Modal-Cxm6cs5c.js";
10
- import "../common-pvPJVTfe.js";
11
- import "../StringSelectMenuKit-B9FHTe48.js";
12
- import "../ChannelSelectMenuKit-L15A2jpT.js";
13
- import "../MentionableSelectMenuKit-BiUSKUtZ.js";
14
- import "../UserSelectMenuKit-DiP0imyo.js";
15
- import "../RoleSelectMenuKit-BSMKkru2.js";
16
- import "../SelectMenu-b7jgrkjO.js";
17
- import "../container-CwEATQy2.js";
18
- import "../file-BdyYwkaI.js";
19
- import "../media-gallery-DCu02VXc.js";
20
- import "../section-fktaECHL.js";
21
- import "../separator-CuesaLrC.js";
22
- import "../text-display-DNMwmGHJ.js";
8
+ import "../Button-4ZUXdA56.js";
9
+ import "../Modal-C6UTRdYQ.js";
10
+ import "../common-DOCvOVC4.js";
11
+ import "../StringSelectMenuKit-Bhs8U6WI.js";
12
+ import "../ChannelSelectMenuKit-BrXvBYNH.js";
13
+ import "../MentionableSelectMenuKit-CPTKqx-O.js";
14
+ import "../UserSelectMenuKit-CfqFJdxz.js";
15
+ import "../RoleSelectMenuKit-C26lU3sN.js";
16
+ import "../SelectMenu-Diy87_ba.js";
17
+ import "../container-DaUKKPm-.js";
18
+ import "../file-DTrr-p09.js";
19
+ import "../media-gallery-BMsXSot3.js";
20
+ import "../section-Dh_FhPeC.js";
21
+ import "../separator-CMf6Cyy5.js";
22
+ import "../text-display-DRw3r_lK.js";
23
23
  import "../index-Dw5cCt-A.js";
24
24
  import "../index-E7Wvm5uX.js";
25
- import "../MessageCommandParser-tzroBwij.js";
25
+ import "../MessageCommandParser-ROLibZPX.js";
26
26
  import "../signals-DUoWkeZ7.js";
27
- import "../helpers-DAmE106r.js";
28
- import "../CommandsRouter-C7X-eXE2.js";
27
+ import "../helpers-Wg6P5fRQ.js";
28
+ import "../CommandsRouter-CoOA7hkf.js";
29
29
  import "../EventsRouter-BacqK6z3.js";
30
30
  import "../index-CUPkUUOR.js";
31
- import "../constants-BPWSrMkn.js";
31
+ import "../constants-BTttfrm3.js";
32
32
  export { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter };
@@ -1,39 +1,39 @@
1
1
  require('../colors-Cd4Oz-r-.js');
2
2
  require('../ActionRow-CmTHbo2t.js');
3
- require('../error-codes-C_UO39jz.js');
4
- const require_CommandKit = require('../CommandKit-CnLBu_7m.js');
3
+ require('../error-codes-CxlUBdF6.js');
4
+ const require_CommandKit = require('../CommandKit-C0W3U6jh.js');
5
5
  require('../common-CcfjYnPG.js');
6
- require('../common-CeO-vn8Y.js');
7
- require('../container-CpuiLsZM.js');
8
- require('../file-DE69SSOP.js');
9
- require('../media-gallery-nUEHqKVF.js');
10
- require('../section-D6t7tyEZ.js');
11
- require('../separator-DYAFK-Jj.js');
12
- require('../text-display-Dy6JHB5X.js');
6
+ require('../common-vnMIelAE.js');
7
+ require('../container-DCjIgp-B.js');
8
+ require('../file-DVZC0QXI.js');
9
+ require('../media-gallery-CIKypjbJ.js');
10
+ require('../section-CuYr0Inu.js');
11
+ require('../separator-DLdWBjSN.js');
12
+ require('../text-display--p2-BoUa.js');
13
13
  require('../v2-DofkPKHs.js');
14
- require('../warn-unstable-DHLaxPC8.js');
15
- require('../element-DcqNz1dV.js');
14
+ require('../warn-unstable-CttBdmlS.js');
15
+ require('../element-Cq-LoDjk.js');
16
16
  require('../types-B5VPP9ig.js');
17
- require('../EventInterceptor-Bvh05z7n.js');
18
- require('../constants-CCqS_v55.js');
19
- require('../PluginCommon-DPqnQngK.js');
20
- require('../CompilerPlugin-DrnhOC1c.js');
21
- require('../RuntimePlugin-BJoDa8ZR.js');
17
+ require('../EventInterceptor-DWCHCGRh.js');
18
+ require('../constants-DDRctWlU.js');
19
+ require('../PluginCommon-D_Z8Oiic.js');
20
+ require('../CompilerPlugin-Bmy4izKz.js');
21
+ require('../RuntimePlugin-CehKbceZ.js');
22
22
  require('../types-Bq0EWaM3.js');
23
- require('../CompilerPluginRuntime-C9wmPMQf.js');
23
+ require('../CompilerPluginRuntime-CgVU_gU0.js');
24
24
  require('../runtime-D0JnztkU.js');
25
- require('../EventWorkerContext-BAKiTqJz.js');
25
+ require('../EventWorkerContext-DxfS_0fJ.js');
26
26
  require('../resolve-file-url-ifwdwqmq.js');
27
- require('../MessageCommandParser-D02-wpZN.js');
28
- require('../signals-scJdEbly.js');
29
- require('../constants-DWe181uQ.js');
30
- require('../types-package-CTSNSM93.js');
31
- require('../CommandsRouter-BHaPno8o.js');
27
+ require('../MessageCommandParser-Cz-3I-wL.js');
28
+ require('../signals-CSSSZAZ6.js');
29
+ require('../constants-CXwjhIYH.js');
30
+ require('../types-package-BpY3acyl.js');
31
+ require('../CommandsRouter-DFRh47qD.js');
32
32
  require('../EventsRouter-CqnrlbjN.js');
33
33
  require('../router-Dn35v30f.js');
34
- require('../common-CW8v7gAn.js');
35
- require('../CommandKitEventsChannel-B6LKgxmv.js');
36
- require('../store-Ci6ib2C9.js');
34
+ require('../common-Dasi9oKU.js');
35
+ require('../CommandKitEventsChannel-BL_YN3Rm.js');
36
+ require('../store-x93NXUy_.js');
37
37
 
38
38
  exports.CommandKitEnvironment = require_CommandKit.CommandKitEnvironment;
39
39
  exports.CommandKitEnvironmentType = require_CommandKit.CommandKitEnvironmentType;
@@ -0,0 +1,72 @@
1
+ import { ButtonKit } from "./ButtonKit-C7r7RPNf.js";
2
+ import { ModalKit } from "./ModalKit-Btz58KYn.js";
3
+ import { ActionRowBuilder, TextInputBuilder } from "discord.js";
4
+
5
+ //#region src/components/common/element.d.ts
6
+
7
+ /**
8
+ * Represents the types of elements that can be used in CommandKit.
9
+ */
10
+ declare const ElementType: {
11
+ readonly ActionRow: "action-row";
12
+ readonly Button: "button-kit";
13
+ readonly Modal: "modal";
14
+ readonly TextInput: "text-input";
15
+ };
16
+ /**
17
+ * The type of element that can be used in CommandKit.
18
+ * This is a union of the keys of the ElementType object.
19
+ */
20
+ type ElementType = (typeof ElementType)[keyof typeof ElementType];
21
+ /**
22
+ * The data structure that maps each ElementType to its corresponding CommandKit element.
23
+ */
24
+ interface CommandKitElementData {
25
+ [ElementType.ActionRow]: ActionRowBuilder;
26
+ [ElementType.Button]: ButtonKit;
27
+ [ElementType.Modal]: ModalKit;
28
+ [ElementType.TextInput]: TextInputBuilder;
29
+ }
30
+ /**
31
+ * Represents a CommandKit element with a specific type and data.
32
+ */
33
+ type CommandKitElement<Type extends ElementType> = CommandKitElementData[Type];
34
+ /**
35
+ * Represents any CommandKit element, which can be of any type defined in CommandKitElementData.
36
+ */
37
+ type AnyCommandKitElement = CommandKitElement<ElementType>;
38
+ /**
39
+ * Checks if the given element is a CommandKit element.
40
+ * @param element The element to check.
41
+ * @returns True if the element is a CommandKit element, false otherwise.
42
+ */
43
+ declare function isCommandKitElement(element: unknown): element is CommandKitElement<ElementType>;
44
+ /**
45
+ * Gets the element data for a specific CommandKit element.
46
+ * @param element The CommandKit element to get the data for.
47
+ * @returns The element data for the specified CommandKit element.
48
+ */
49
+ declare function getElement<T extends ElementType, E extends CommandKitElement<T>>(element: E): CommandKitElementData[T];
50
+ /**
51
+ * Represents the properties for a fragment element in CommandKit.
52
+ */
53
+ interface FragmentElementProps {
54
+ children: [];
55
+ }
56
+ /**
57
+ * Represents a fragment of CommandKit elements.
58
+ * @param props The properties for the fragment.
59
+ * @returns The fragment element.
60
+ */
61
+ declare function Fragment(props: FragmentElementProps): CommandKitElementData[ElementType][];
62
+ /**
63
+ * The createElement function is used to create CommandKit elements.
64
+ * @param type The type of the element to create.
65
+ * @param props The properties for the element.
66
+ * @param children The children of the element.
67
+ * @returns The created CommandKit element.
68
+ */
69
+ declare function createElement(type: Function, props: Record<string, unknown>, ...children: any[]): CommandKitElement<ElementType>;
70
+ //#endregion
71
+ export { AnyCommandKitElement, CommandKitElement, CommandKitElementData, ElementType, Fragment, FragmentElementProps, createElement, getElement, isCommandKitElement };
72
+ //# sourceMappingURL=element-CAXu1XtK.d.ts.map
@@ -1,25 +1,50 @@
1
- const require_warn_unstable = require('./warn-unstable-DHLaxPC8.js');
1
+ const require_warn_unstable = require('./warn-unstable-CttBdmlS.js');
2
2
 
3
3
  //#region src/components/common/element.ts
4
+ /**
5
+ * Represents the types of elements that can be used in CommandKit.
6
+ */
4
7
  const ElementType = {
5
8
  ActionRow: "action-row",
6
9
  Button: "button-kit",
7
10
  Modal: "modal",
8
11
  TextInput: "text-input"
9
12
  };
13
+ /**
14
+ * Checks if the given element is a CommandKit element.
15
+ * @param element The element to check.
16
+ * @returns True if the element is a CommandKit element, false otherwise.
17
+ */
10
18
  function isCommandKitElement(element) {
11
19
  if (typeof element !== "object" || element === null) return false;
12
20
  if (!Reflect.has(element, "type")) return false;
13
21
  if (!Reflect.has(element, "data")) return false;
14
22
  return true;
15
23
  }
24
+ /**
25
+ * Gets the element data for a specific CommandKit element.
26
+ * @param element The CommandKit element to get the data for.
27
+ * @returns The element data for the specified CommandKit element.
28
+ */
16
29
  function getElement(element) {
17
30
  return element.data;
18
31
  }
32
+ /**
33
+ * Represents a fragment of CommandKit elements.
34
+ * @param props The properties for the fragment.
35
+ * @returns The fragment element.
36
+ */
19
37
  function Fragment(props) {
20
38
  require_warn_unstable.warnUnstable("CommandKit JSX");
21
39
  return Array.isArray(props.children) ? props.children.flat() : [props.children];
22
40
  }
41
+ /**
42
+ * The createElement function is used to create CommandKit elements.
43
+ * @param type The type of the element to create.
44
+ * @param props The properties for the element.
45
+ * @param children The children of the element.
46
+ * @returns The created CommandKit element.
47
+ */
23
48
  function createElement(type, props, ...children) {
24
49
  require_warn_unstable.warnUnstable("CommandKit JSX");
25
50
  return type({
@@ -59,4 +84,4 @@ Object.defineProperty(exports, 'isCommandKitElement', {
59
84
  return isCommandKitElement;
60
85
  }
61
86
  });
62
- //# sourceMappingURL=element-DcqNz1dV.js.map
87
+ //# sourceMappingURL=element-Cq-LoDjk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-Cq-LoDjk.js","names":[],"sources":["../src/components/common/element.ts"],"sourcesContent":["import { ActionRowBuilder, TextInputBuilder } from 'discord.js';\nimport type { ButtonKit } from '../v1/button/ButtonKit';\nimport { warnUnstable } from '../../utils/warn-unstable';\nimport { ModalKit } from '../v1/modal/ModalKit';\n\n/**\n * Represents the types of elements that can be used in CommandKit.\n */\nexport const ElementType = {\n ActionRow: 'action-row',\n Button: 'button-kit',\n Modal: 'modal',\n TextInput: 'text-input',\n} as const;\n\n/**\n * The type of element that can be used in CommandKit.\n * This is a union of the keys of the ElementType object.\n */\nexport type ElementType = (typeof ElementType)[keyof typeof ElementType];\n\n/**\n * The data structure that maps each ElementType to its corresponding CommandKit element.\n */\nexport interface CommandKitElementData {\n [ElementType.ActionRow]: ActionRowBuilder;\n [ElementType.Button]: ButtonKit;\n [ElementType.Modal]: ModalKit;\n [ElementType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Represents a CommandKit element with a specific type and data.\n */\nexport type CommandKitElement<Type extends ElementType> =\n CommandKitElementData[Type];\n\n/**\n * Represents any CommandKit element, which can be of any type defined in CommandKitElementData.\n */\nexport type AnyCommandKitElement = CommandKitElement<ElementType>;\n\n/**\n * Checks if the given element is a CommandKit element.\n * @param element The element to check.\n * @returns True if the element is a CommandKit element, false otherwise.\n */\nexport function isCommandKitElement(\n element: unknown,\n): element is CommandKitElement<ElementType> {\n if (typeof element !== 'object' || element === null) return false;\n if (!Reflect.has(element, 'type')) return false;\n if (!Reflect.has(element, 'data')) return false;\n\n return true;\n}\n\n/**\n * Gets the element data for a specific CommandKit element.\n * @param element The CommandKit element to get the data for.\n * @returns The element data for the specified CommandKit element.\n */\nexport function getElement<\n T extends ElementType,\n E extends CommandKitElement<T>,\n>(element: E): CommandKitElementData[T] {\n return element.data as CommandKitElementData[T];\n}\n\n/**\n * Represents the properties for a fragment element in CommandKit.\n */\nexport interface FragmentElementProps {\n children: [];\n}\n\n/**\n * Represents a fragment of CommandKit elements.\n * @param props The properties for the fragment.\n * @returns The fragment element.\n */\nexport function Fragment(\n props: FragmentElementProps,\n): CommandKitElementData[ElementType][] {\n warnUnstable('CommandKit JSX');\n\n return Array.isArray(props.children)\n ? props.children.flat()\n : [props.children];\n}\n\n/**\n * The createElement function is used to create CommandKit elements.\n * @param type The type of the element to create.\n * @param props The properties for the element.\n * @param children The children of the element.\n * @returns The created CommandKit element.\n */\nexport function createElement(\n type: Function,\n props: Record<string, unknown>,\n ...children: any[]\n): CommandKitElement<ElementType> {\n warnUnstable('CommandKit JSX');\n return type({ ...props, children: props.children ?? children });\n}\n\nexport { createElement as jsx, createElement as jsxs };\n"],"mappings":";;;;;;AAQA,MAAa,cAAc;CACzB,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;AACZ;;;;;;AAkCD,SAAgB,oBAChB,SAC4C;AAC1C,YAAW,YAAY,YAAY,YAAY,KAAM,QAAO;AAC5D,MAAK,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAC1C,MAAK,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAE1C,QAAO;AACT;;;;;;AAOA,SAAgB,WAGhB,SAAsC;AACpC,QAAO,QAAQ;AACjB;;;;;;AAcA,SAAgB,SAChB,OACuC;AACrC,oCAAa,iBAAiB;AAE9B,QAAO,MAAM,QAAQ,MAAM,SAAQ,GACnC,MAAM,SAAS,MAAM,GACrB,CAAC,MAAM,QAAS;AAClB;;;;;;;;AASA,SAAgB,cAChB,MACA,OACA,GAAG,UAC8B;AAC/B,oCAAa,iBAAiB;AAC9B,QAAO,KAAK;EAAE,GAAG;EAAO,UAAU,MAAM,YAAY;CAAU,EAAC;AACjE"}
@@ -1,5 +1,9 @@
1
1
 
2
2
  //#region src/cli/env.ts
3
+ /**
4
+ * @private
5
+ * @internal
6
+ */
3
7
  function DevEnv(_static = false) {
4
8
  const common = {
5
9
  NODE_ENV: "development",
@@ -8,6 +12,10 @@ function DevEnv(_static = false) {
8
12
  if (_static) return Object.assign({}, common);
9
13
  return Object.assign({}, process.env, common);
10
14
  }
15
+ /**
16
+ * @private
17
+ * @internal
18
+ */
11
19
  function ProdEnv(_static = false) {
12
20
  const common = {
13
21
  NODE_ENV: "production",
@@ -16,11 +24,35 @@ function ProdEnv(_static = false) {
16
24
  if (_static) return Object.assign({}, common);
17
25
  return Object.assign({}, process.env, common);
18
26
  }
27
+ /**
28
+ * @private
29
+ * @internal
30
+ */
19
31
  const CommonEnvFiles = [".env", ".env.local"];
32
+ /**
33
+ * @private
34
+ * @internal
35
+ */
20
36
  const DevEnvFiles = [".env.development", ".env.development.local"];
37
+ /**
38
+ * @private
39
+ * @internal
40
+ */
21
41
  const ProdEnvFiles = [".env.production", ".env.production.local"];
42
+ /**
43
+ * @private
44
+ * @internal
45
+ */
22
46
  const devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];
47
+ /**
48
+ * @private
49
+ * @internal
50
+ */
23
51
  const prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];
52
+ /**
53
+ * @private
54
+ * @internal
55
+ */
24
56
  function setCLIEnv() {
25
57
  process.env.COMMANDKIT_IS_CLI = "true";
26
58
  }
@@ -74,4 +106,4 @@ Object.defineProperty(exports, 'setCLIEnv', {
74
106
  return setCLIEnv;
75
107
  }
76
108
  });
77
- //# sourceMappingURL=env-ERkaRfQO.js.map
109
+ //# sourceMappingURL=env-DemeP-uq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-DemeP-uq.js","names":[],"sources":["../src/cli/env.ts"],"sourcesContent":["/**\n * @private\n * @internal\n */\nexport function DevEnv(_static = false) {\n const common = {\n NODE_ENV: 'development',\n COMMANDKIT_IS_DEV: 'true',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport function ProdEnv(_static = false) {\n const common = {\n NODE_ENV: 'production',\n COMMANDKIT_IS_DEV: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport const CommonEnvFiles = ['.env', '.env.local'];\n/**\n * @private\n * @internal\n */\nexport const DevEnvFiles = ['.env.development', '.env.development.local'];\n/**\n * @private\n * @internal\n */\nexport const ProdEnvFiles = ['.env.production', '.env.production.local'];\n/**\n * @private\n * @internal\n */\nexport const devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];\n/**\n * @private\n * @internal\n */\nexport const prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];\n/**\n * @private\n * @internal\n */\nexport function setCLIEnv() {\n process.env.COMMANDKIT_IS_CLI = 'true';\n}\n"],"mappings":";;;;;;AAIA,SAAgB,OAAO,UAAU,OAAO;CACtC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;CACpB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,CAAE,GAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,CAAE,GAAE,QAAQ,KAAK,OAAO;AAC/C;;;;;AAMA,SAAgB,QAAQ,UAAU,OAAO;CACvC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;CACpB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,CAAE,GAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,CAAE,GAAE,QAAQ,KAAK,OAAO;AAC/C;;;;;AAMA,MAAa,iBAAiB,CAAC,QAAQ,YAAa;;;;;AAKpD,MAAa,cAAc,CAAC,oBAAoB,wBAAyB;;;;;AAKzE,MAAa,eAAe,CAAC,mBAAmB,uBAAwB;;;;;AAKxE,MAAa,iBAAiB,CAAC,GAAG,gBAAgB,GAAG,WAAY;;;;;AAKjE,MAAa,kBAAkB,CAAC,GAAG,gBAAgB,GAAG,YAAa;;;;;AAKnE,SAAgB,YAAY;AAC1B,SAAQ,IAAI,oBAAoB;AAClC"}
@@ -1,22 +1,41 @@
1
1
 
2
2
  //#region src/utils/error-codes.ts
3
+ /**
4
+ * The error codes used by CommandKit.
5
+ */
3
6
  const CommandKitErrorCodes = {
4
7
  ExitMiddleware: Symbol("kExitMiddleware"),
5
8
  ForwardedCommand: Symbol("kForwardedCommand"),
6
9
  InvalidCommandPrefix: Symbol("kInvalidCommandPrefix"),
7
10
  PluginCaptureHandle: Symbol("kPluginCaptureHandle")
8
11
  };
12
+ /**
13
+ * Creates a new CommandKit error with the specified code.
14
+ * @param code The error code to assign to the error.
15
+ * @returns A new CommandKit error instance.
16
+ */
9
17
  function createCommandKitError(code) {
10
18
  const error = new Error();
11
19
  Reflect.set(error, "code", code);
12
20
  return error;
13
21
  }
22
+ /**
23
+ * Checks if the given error is a CommandKit error.
24
+ * @param error The error to check.
25
+ * @returns True if the error is a CommandKit error, false otherwise.
26
+ */
14
27
  function isCommandKitError(error) {
15
28
  if (!(error instanceof Error)) return false;
16
29
  const code = Reflect.get(error, "code");
17
30
  for (const key in CommandKitErrorCodes) if (CommandKitErrorCodes[key] === code) return true;
18
31
  return false;
19
32
  }
33
+ /**
34
+ * Checks if the given error is of a specific CommandKit error type.
35
+ * @param error The error to check.
36
+ * @param code The error code or an array of error codes to check against.
37
+ * @returns True if the error matches the specified code(s), false otherwise.
38
+ */
20
39
  function isErrorType(error, code) {
21
40
  if (!isCommandKitError(error)) return false;
22
41
  const errorCode = Reflect.get(error, "code");
@@ -50,4 +69,4 @@ Object.defineProperty(exports, 'isErrorType', {
50
69
  return isErrorType;
51
70
  }
52
71
  });
53
- //# sourceMappingURL=error-codes-C_UO39jz.js.map
72
+ //# sourceMappingURL=error-codes-CxlUBdF6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-codes-CxlUBdF6.js","names":[],"sources":["../src/utils/error-codes.ts"],"sourcesContent":["/**\n * The error codes used by CommandKit.\n */\nexport const CommandKitErrorCodes = {\n /**\n * Error code for exiting middleware.\n */\n ExitMiddleware: Symbol('kExitMiddleware'),\n /**\n * Error code for forwarded commands.\n */\n ForwardedCommand: Symbol('kForwardedCommand'),\n /**\n * Error code for invalid command prefix.\n */\n InvalidCommandPrefix: Symbol('kInvalidCommandPrefix'),\n /**\n * Error code for plugin capture handle.\n */\n PluginCaptureHandle: Symbol('kPluginCaptureHandle'),\n} as const;\n\n/**\n * The type for CommandKit errors.\n */\nexport type CommandKitError = Error & { code: symbol };\n\n/**\n * Creates a new CommandKit error with the specified code.\n * @param code The error code to assign to the error.\n * @returns A new CommandKit error instance.\n */\nexport function createCommandKitError(code: symbol): CommandKitError {\n const error = new Error() as CommandKitError;\n\n Reflect.set(error, 'code', code);\n\n return error;\n}\n\n/**\n * Checks if the given error is a CommandKit error.\n * @param error The error to check.\n * @returns True if the error is a CommandKit error, false otherwise.\n */\nexport function isCommandKitError(error: unknown): error is CommandKitError {\n if (!(error instanceof Error)) return false;\n const code = Reflect.get(error, 'code');\n\n for (const key in CommandKitErrorCodes) {\n if (CommandKitErrorCodes[key as keyof typeof CommandKitErrorCodes] === code)\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if the given error is of a specific CommandKit error type.\n * @param error The error to check.\n * @param code The error code or an array of error codes to check against.\n * @returns True if the error matches the specified code(s), false otherwise.\n */\nexport function isErrorType(error: unknown, code: symbol | symbol[]): boolean {\n if (!isCommandKitError(error)) return false;\n const errorCode = Reflect.get(error, 'code');\n\n if (!errorCode) return false;\n\n if (Array.isArray(code)) return code.includes(errorCode);\n\n return errorCode === code;\n}\n"],"mappings":";;;;;AAGA,MAAa,uBAAuB;CAIlC,gBAAgB,OAAO,kBAAkB;CAIzC,kBAAkB,OAAO,oBAAoB;CAI7C,sBAAsB,OAAO,wBAAwB;CAIrD,qBAAqB,OAAO,uBAAuB;AACpD;;;;;;AAYD,SAAgB,sBAAsB,MAA+B;CACnE,MAAM,QAAQ,IAAI;AAElB,SAAQ,IAAI,OAAO,QAAQ,KAAK;AAEhC,QAAO;AACT;;;;;;AAOA,SAAgB,kBAAkB,OAA0C;AAC1E,OAAM,iBAAiB,OAAQ,QAAO;CACtC,MAAM,OAAO,QAAQ,IAAI,OAAO,OAAO;AAEvC,MAAK,MAAM,OAAO,qBAChB,KAAI,qBAAqB,SAA8C,KACvE,QAAO;AAGT,QAAO;AACT;;;;;;;AAQA,SAAgB,YAAY,OAAgB,MAAkC;AAC5E,MAAK,kBAAkB,MAAM,CAAE,QAAO;CACtC,MAAM,YAAY,QAAQ,IAAI,OAAO,OAAO;AAE5C,MAAK,UAAW,QAAO;AAEvB,KAAI,MAAM,QAAQ,KAAK,CAAE,QAAO,KAAK,SAAS,UAAU;AAExD,QAAO,cAAc;AACvB"}
@@ -1,32 +1,32 @@
1
- import { CommandKitEventsChannel, ListenerFunction } from "../CommandKit-B-mjdP5x.js";
2
- import "../EventInterceptor-D_oEWSnF.js";
3
- import "../ButtonKit-BSI7lCI0.js";
4
- import "../ModalKit-CKtQ8eXW.js";
5
- import "../element-D_nyVwgB.js";
6
- import "../ActionRow-D0wafJhZ.js";
1
+ import { CommandKitEventsChannel, ListenerFunction } from "../CommandKit-BkMUDbou.js";
2
+ import "../EventInterceptor-x-R2qshQ.js";
3
+ import "../ButtonKit-C7r7RPNf.js";
4
+ import "../ModalKit-Btz58KYn.js";
5
+ import "../element-CAXu1XtK.js";
6
+ import "../ActionRow-DKnFVDME.js";
7
7
  import "../types-CJ-XvOFN.js";
8
- import "../Button-Bl5nbwTS.js";
9
- import "../Modal-Cxm6cs5c.js";
10
- import "../common-pvPJVTfe.js";
11
- import "../StringSelectMenuKit-B9FHTe48.js";
12
- import "../ChannelSelectMenuKit-L15A2jpT.js";
13
- import "../MentionableSelectMenuKit-BiUSKUtZ.js";
14
- import "../UserSelectMenuKit-DiP0imyo.js";
15
- import "../RoleSelectMenuKit-BSMKkru2.js";
16
- import "../SelectMenu-b7jgrkjO.js";
17
- import "../container-CwEATQy2.js";
18
- import "../file-BdyYwkaI.js";
19
- import "../media-gallery-DCu02VXc.js";
20
- import "../section-fktaECHL.js";
21
- import "../separator-CuesaLrC.js";
22
- import "../text-display-DNMwmGHJ.js";
8
+ import "../Button-4ZUXdA56.js";
9
+ import "../Modal-C6UTRdYQ.js";
10
+ import "../common-DOCvOVC4.js";
11
+ import "../StringSelectMenuKit-Bhs8U6WI.js";
12
+ import "../ChannelSelectMenuKit-BrXvBYNH.js";
13
+ import "../MentionableSelectMenuKit-CPTKqx-O.js";
14
+ import "../UserSelectMenuKit-CfqFJdxz.js";
15
+ import "../RoleSelectMenuKit-C26lU3sN.js";
16
+ import "../SelectMenu-Diy87_ba.js";
17
+ import "../container-DaUKKPm-.js";
18
+ import "../file-DTrr-p09.js";
19
+ import "../media-gallery-BMsXSot3.js";
20
+ import "../section-Dh_FhPeC.js";
21
+ import "../separator-CMf6Cyy5.js";
22
+ import "../text-display-DRw3r_lK.js";
23
23
  import "../index-Dw5cCt-A.js";
24
24
  import "../index-E7Wvm5uX.js";
25
- import "../MessageCommandParser-tzroBwij.js";
25
+ import "../MessageCommandParser-ROLibZPX.js";
26
26
  import "../signals-DUoWkeZ7.js";
27
- import "../helpers-DAmE106r.js";
28
- import "../CommandsRouter-C7X-eXE2.js";
27
+ import "../helpers-Wg6P5fRQ.js";
28
+ import "../CommandsRouter-CoOA7hkf.js";
29
29
  import "../EventsRouter-BacqK6z3.js";
30
30
  import "../index-CUPkUUOR.js";
31
- import "../constants-BPWSrMkn.js";
31
+ import "../constants-BTttfrm3.js";
32
32
  export { CommandKitEventsChannel, ListenerFunction };
@@ -1,3 +1,3 @@
1
- const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-B6LKgxmv.js');
1
+ const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-BL_YN3Rm.js');
2
2
 
3
3
  exports.CommandKitEventsChannel = require_CommandKitEventsChannel.CommandKitEventsChannel;