commandkit 1.2.1-dev.20260414011507 → 1.2.1-dev.20260919165908

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 (269) hide show
  1. package/README.md +1 -1
  2. package/cache.cjs +2 -0
  3. package/cache.d.ts +1 -0
  4. package/dist/{ActionRow-Bt9qi0Mb.d.ts → ActionRow-DSh9roc5.d.ts} +2 -3
  5. package/dist/{Button-DxJLcZIU.d.ts → Button-BPsE5ju0.d.ts} +5 -6
  6. package/dist/{ButtonKit-BfcyvWfj.d.ts → ButtonKit-CNPmVg3h.d.ts} +2 -3
  7. package/dist/{ChannelSelectMenuKit-DYkudikb.d.ts → ChannelSelectMenuKit-CcOdaLQ6.d.ts} +3 -4
  8. package/dist/{CommandTree-DwfiCsOl.d.ts → CommandTree-qu-8oAEV.d.ts} +1 -1
  9. package/dist/{CommandsRouter-D-b3xv38.d.ts → CommandsRouter-Co225Ae5.d.ts} +24 -4
  10. package/dist/{EventInterceptor-D9JKMcfi.d.ts → EventInterceptor-wg378vJp.d.ts} +1 -2
  11. package/dist/{EventsRouter-Dyr_oJJD.d.ts → EventsRouter-Bt63ZuEF.d.ts} +21 -2
  12. package/dist/{MentionableSelectMenuKit-Mu4xqP6B.d.ts → MentionableSelectMenuKit-8_Nkgn_a.d.ts} +3 -4
  13. package/dist/{MessageCommandParser-UTKsRvb9.d.ts → MessageCommandParser-BYbxHOSK.d.ts} +1 -2
  14. package/dist/{Modal-v9rrcMl-.d.ts → Modal-DbWK6VmV.d.ts} +5 -6
  15. package/dist/{ModalKit-XJSM65SV.d.ts → ModalKit-CnmUVpw-.d.ts} +2 -3
  16. package/dist/{RoleSelectMenuKit-CCjcp3HY.d.ts → RoleSelectMenuKit-Bei7DHqD.d.ts} +3 -4
  17. package/dist/{SelectMenu-CY0vvoSu.d.ts → SelectMenu-Bce_PClo.d.ts} +8 -9
  18. package/dist/{StringSelectMenuKit-G5nBTicX.d.ts → StringSelectMenuKit-CBeB9HqT.d.ts} +3 -4
  19. package/dist/TreeArtifact-D6FZ5SVd.d.ts +27 -0
  20. package/dist/{UserSelectMenuKit-D3SO_fXA.d.ts → UserSelectMenuKit-DZmeZ_Tp.d.ts} +3 -4
  21. package/dist/analytics/analytics-engine.d.ts +1 -1
  22. package/dist/analytics/analytics-engine.js +1 -1
  23. package/dist/analytics/analytics-provider.d.ts +1 -1
  24. package/dist/analytics/constants.js +0 -1
  25. package/dist/analytics/constants.js.map +1 -1
  26. package/dist/analytics/utils.js +1 -1
  27. package/dist/{analytics-engine-BYA0ongA.d.ts → analytics-engine-Bz1p7ud3.d.ts} +51 -15
  28. package/dist/app/commands/AppCommandRunner.d.ts +1 -1
  29. package/dist/app/commands/AppCommandRunner.js +1 -1
  30. package/dist/app/commands/Context.d.ts +1 -1
  31. package/dist/app/commands/Context.js +1 -1
  32. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  33. package/dist/app/commands/MessageCommandParser.js +4 -1
  34. package/dist/app/commands/MessageCommandParser.js.map +1 -1
  35. package/dist/app/commands/helpers.d.ts +1 -1
  36. package/dist/app/commands/helpers.js +0 -1
  37. package/dist/app/commands/helpers.js.map +1 -1
  38. package/dist/app/events/EventWorkerContext.d.ts +3 -3
  39. package/dist/app/events/EventWorkerContext.js +0 -1
  40. package/dist/app/events/EventWorkerContext.js.map +1 -1
  41. package/dist/app/handlers/AppCommandHandler.d.ts +1 -1
  42. package/dist/app/handlers/AppCommandHandler.js +1 -1
  43. package/dist/app/handlers/AppEventsHandler.d.ts +1 -1
  44. package/dist/app/handlers/AppEventsHandler.js +1 -1
  45. package/dist/app/index.d.ts +5 -5
  46. package/dist/app/index.js +1 -1
  47. package/dist/app/interrupt/signals.d.ts +1 -1
  48. package/dist/app/interrupt/signals.js.map +1 -1
  49. package/dist/app/middlewares/permissions.d.ts +1 -2
  50. package/dist/app/middlewares/permissions.js +1 -1
  51. package/dist/app/register/CommandRegistrar.d.ts +1 -1
  52. package/dist/app/register/CommandRegistrar.js +1 -1
  53. package/dist/app/router/CommandTree.d.ts +1 -1
  54. package/dist/app/router/CommandsRouter.d.ts +2 -2
  55. package/dist/app/router/CommandsRouter.js +60 -1
  56. package/dist/app/router/CommandsRouter.js.map +1 -1
  57. package/dist/app/router/EventsRouter.d.ts +2 -2
  58. package/dist/app/router/EventsRouter.js +56 -3
  59. package/dist/app/router/EventsRouter.js.map +1 -1
  60. package/dist/app/router/TreeArtifact.d.ts +2 -0
  61. package/dist/app/router/TreeArtifact.js +87 -0
  62. package/dist/app/router/TreeArtifact.js.map +1 -0
  63. package/dist/app/router/index.d.ts +6 -4
  64. package/dist/app/router/index.js +8 -1
  65. package/dist/{checkbox-CvQGiyRe.d.ts → checkbox-DoR0Pcxm.d.ts} +2 -3
  66. package/dist/cli/app-process.d.ts +2 -4
  67. package/dist/cli/app-process.js +0 -1
  68. package/dist/cli/app-process.js.map +1 -1
  69. package/dist/cli/build.d.ts +4 -9
  70. package/dist/cli/build.js +30 -4
  71. package/dist/cli/build.js.map +1 -1
  72. package/dist/cli/common.d.ts +3 -6
  73. package/dist/cli/common.js +2 -2
  74. package/dist/cli/common.js.map +1 -1
  75. package/dist/cli/development.d.ts +4 -5
  76. package/dist/cli/development.js +11 -11
  77. package/dist/cli/development.js.map +1 -1
  78. package/dist/cli/env.js.map +1 -1
  79. package/dist/cli/generators.js +0 -1
  80. package/dist/cli/generators.js.map +1 -1
  81. package/dist/cli/information.js +4 -5
  82. package/dist/cli/information.js.map +1 -1
  83. package/dist/cli/init.d.ts +1 -3
  84. package/dist/cli/init.js +37 -12
  85. package/dist/cli/init.js.map +1 -1
  86. package/dist/cli/production.d.ts +1 -3
  87. package/dist/cli/production.js +1 -2
  88. package/dist/cli/production.js.map +1 -1
  89. package/dist/cli/type-checker.js +0 -1
  90. package/dist/cli/type-checker.js.map +1 -1
  91. package/dist/cli/utils.d.ts +0 -1
  92. package/dist/cli/utils.js.map +1 -1
  93. package/dist/{commandkit-DTqT800J.js → commandkit-DoxpAUsW.js} +165 -87
  94. package/dist/commandkit-DoxpAUsW.js.map +1 -0
  95. package/dist/commandkit.d.ts +1 -1
  96. package/dist/commandkit.js +1 -1
  97. package/dist/{common-CCvvgnxi.d.ts → common-CIbPzguv.d.ts} +2 -3
  98. package/dist/components/common/EventInterceptor.d.ts +1 -1
  99. package/dist/components/common/EventInterceptor.js +1 -0
  100. package/dist/components/common/EventInterceptor.js.map +1 -1
  101. package/dist/components/common/element.d.ts +1 -1
  102. package/dist/components/common/element.js +1 -1
  103. package/dist/components/common/types.d.ts +1 -1
  104. package/dist/components/display/common.d.ts +0 -1
  105. package/dist/components/display/common.js +1 -1
  106. package/dist/components/display/container.d.ts +1 -1
  107. package/dist/components/display/container.js +1 -1
  108. package/dist/components/display/file.d.ts +1 -1
  109. package/dist/components/display/file.js +0 -1
  110. package/dist/components/display/file.js.map +1 -1
  111. package/dist/components/display/index.d.ts +9 -8
  112. package/dist/components/display/index.js +1 -1
  113. package/dist/components/display/label.d.ts +1 -1
  114. package/dist/components/display/label.js +1 -1
  115. package/dist/components/display/media-gallery.d.ts +1 -1
  116. package/dist/components/display/media-gallery.js +1 -1
  117. package/dist/components/display/poll.d.ts +1 -1
  118. package/dist/components/display/poll.js +4 -10
  119. package/dist/components/display/poll.js.map +1 -1
  120. package/dist/components/display/section.d.ts +1 -1
  121. package/dist/components/display/section.js +1 -1
  122. package/dist/components/display/separator.d.ts +1 -1
  123. package/dist/components/display/separator.js +0 -1
  124. package/dist/components/display/separator.js.map +1 -1
  125. package/dist/components/display/text-display.d.ts +1 -1
  126. package/dist/components/display/text-display.js +0 -1
  127. package/dist/components/display/text-display.js.map +1 -1
  128. package/dist/components/index.d.ts +25 -24
  129. package/dist/components/index.js +1 -1
  130. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -1
  131. package/dist/components/interactive/action-row/ActionRow.js +0 -1
  132. package/dist/components/interactive/action-row/ActionRow.js.map +1 -1
  133. package/dist/components/interactive/button/Button.d.ts +1 -1
  134. package/dist/components/interactive/button/Button.js +1 -1
  135. package/dist/components/interactive/button/ButtonKit.d.ts +1 -1
  136. package/dist/components/interactive/button/ButtonKit.js +1 -1
  137. package/dist/components/interactive/checkbox/checkbox.d.ts +1 -1
  138. package/dist/components/interactive/checkbox/checkbox.js +1 -1
  139. package/dist/components/interactive/modal/Modal.d.ts +1 -1
  140. package/dist/components/interactive/modal/Modal.js +1 -1
  141. package/dist/components/interactive/modal/ModalKit.d.ts +1 -1
  142. package/dist/components/interactive/modal/ModalKit.js +1 -1
  143. package/dist/components/interactive/radio/radio.d.ts +1 -1
  144. package/dist/components/interactive/radio/radio.js +1 -1
  145. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -1
  146. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +1 -1
  147. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -1
  148. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +1 -1
  149. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -1
  150. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +1 -1
  151. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -1
  152. package/dist/components/interactive/select-menu/SelectMenu.js +1 -1
  153. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -1
  154. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +1 -1
  155. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -1
  156. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +1 -1
  157. package/dist/components/interactive/select-menu/common.d.ts +1 -1
  158. package/dist/config/config.d.ts +1 -2
  159. package/dist/config/config.js +1 -1
  160. package/dist/config/default.d.ts +1 -2
  161. package/dist/config/default.js +1 -1
  162. package/dist/config/loader.d.ts +1 -2
  163. package/dist/config/loader.js +1 -1
  164. package/dist/config/types.d.ts +1 -1
  165. package/dist/config/utils.d.ts +1 -1
  166. package/dist/config/utils.js.map +1 -1
  167. package/dist/{constants-D_sgdBHy.d.ts → constants-B7AfnOFa.d.ts} +1 -1
  168. package/dist/{constants-GWSfiS4h.d.ts → constants-kWgE3L9F.d.ts} +15 -2
  169. package/dist/{container-B7Kmw__R.d.ts → container-NVgblXmw.d.ts} +1 -2
  170. package/dist/context/async-context.d.ts +1 -1
  171. package/dist/context/async-context.js +1 -1
  172. package/dist/context/environment.d.ts +1 -1
  173. package/dist/context/environment.js +1 -1
  174. package/dist/{element-DeLvTMfZ.d.ts → element-BMZYAAQ-.d.ts} +3 -4
  175. package/dist/events/CommandKitEventsChannel.d.ts +1 -1
  176. package/dist/events/CommandKitEventsChannel.js +3 -2
  177. package/dist/events/CommandKitEventsChannel.js.map +1 -1
  178. package/dist/{file-BP8aoN3A.d.ts → file-DYAmr697.d.ts} +1 -2
  179. package/dist/flags/FlagProvider.d.ts +1 -1
  180. package/dist/flags/FlagProvider.js +1 -0
  181. package/dist/flags/FlagProvider.js.map +1 -1
  182. package/dist/flags/feature-flags.d.ts +1 -1
  183. package/dist/flags/feature-flags.js +1 -1
  184. package/dist/flags/store.d.ts +1 -1
  185. package/dist/flags/store.js +0 -1
  186. package/dist/flags/store.js.map +1 -1
  187. package/dist/{helpers-C5jRrAM1.d.ts → helpers-vlnRvNJv.d.ts} +1 -2
  188. package/dist/index-CAFaKBs_.d.ts +8 -0
  189. package/dist/index-COt7nfC9.d.ts +2 -0
  190. package/dist/index-DvqHpiuh.d.ts +16 -0
  191. package/dist/index.d.ts +37 -34
  192. package/dist/index.js +9 -2
  193. package/dist/kv/constants.d.ts +1 -1
  194. package/dist/kv/constants.js.map +1 -1
  195. package/dist/kv/dotprops.js.map +1 -1
  196. package/dist/kv/kv.d.ts +0 -1
  197. package/dist/kv/kv.js +1 -1
  198. package/dist/kv/kv.js.map +1 -1
  199. package/dist/kv/serde.d.ts +1 -2
  200. package/dist/kv/serde.js +27 -27
  201. package/dist/kv/serde.js.map +1 -1
  202. package/dist/{label-CqHiBMXP.d.ts → label-DClaYktn.d.ts} +1 -2
  203. package/dist/logger/DefaultLogger.d.ts +0 -1
  204. package/dist/logger/DefaultLogger.js +1 -1
  205. package/dist/logger/Logger.d.ts +0 -1
  206. package/dist/logger/Logger.js +1 -1
  207. package/dist/logger/NoopLogger.d.ts +0 -1
  208. package/dist/logger/NoopLogger.js.map +1 -1
  209. package/dist/{media-gallery-hFfa57Kd.d.ts → media-gallery-z2Snzz-u.d.ts} +1 -2
  210. package/dist/plugins/CompilerPlugin.d.ts +1 -1
  211. package/dist/plugins/CompilerPlugin.js +2 -2
  212. package/dist/plugins/CompilerPlugin.js.map +1 -1
  213. package/dist/plugins/PluginCommon.d.ts +1 -1
  214. package/dist/plugins/PluginCommon.js +1 -1
  215. package/dist/plugins/PluginCommon.js.map +1 -1
  216. package/dist/plugins/RuntimePlugin.d.ts +1 -1
  217. package/dist/plugins/RuntimePlugin.js +2 -2
  218. package/dist/plugins/RuntimePlugin.js.map +1 -1
  219. package/dist/plugins/index.d.ts +1 -1
  220. package/dist/plugins/index.js +1 -1
  221. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -1
  222. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +1 -1
  223. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -1
  224. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +1 -1
  225. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -1
  226. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +1 -1
  227. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -2
  228. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +1 -1
  229. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -1
  230. package/dist/plugins/types.d.ts +1 -1
  231. package/dist/{poll-ElAd5Z2K.d.ts → poll-D2QDStsw.d.ts} +4 -14
  232. package/dist/{radio-Dcd4YIZx.d.ts → radio-CJH_N4lq.d.ts} +2 -3
  233. package/dist/{section-BqDLXlp3.d.ts → section-DrFBT5b-.d.ts} +1 -2
  234. package/dist/{separator-DSaCa1Tc.d.ts → separator-BVm3w6yd.d.ts} +1 -2
  235. package/dist/{signals-DVOXPkQK.d.ts → signals-DRMDrCOn.d.ts} +1 -1
  236. package/dist/{text-display-D-0dD7bR.d.ts → text-display-BG0nNqy3.d.ts} +1 -2
  237. package/dist/{types-DZy7U-Ld.d.ts → types-ur7SvktF.d.ts} +1 -1
  238. package/dist/types.d.ts +1 -1
  239. package/dist/utils/colors.d.ts +1 -3
  240. package/dist/utils/colors.js +0 -1
  241. package/dist/utils/colors.js.map +1 -1
  242. package/dist/utils/constants.d.ts +2 -2
  243. package/dist/utils/constants.js +19 -0
  244. package/dist/utils/constants.js.map +1 -1
  245. package/dist/utils/dev-hooks.d.ts +1 -1
  246. package/dist/utils/dev-hooks.js +1 -1
  247. package/dist/utils/error-codes.js +15 -0
  248. package/dist/utils/error-codes.js.map +1 -1
  249. package/dist/utils/resolve-file-url.js +2 -2
  250. package/dist/utils/resolve-file-url.js.map +1 -1
  251. package/dist/utils/types-package.d.ts +6 -2
  252. package/dist/utils/types-package.js +31 -38
  253. package/dist/utils/types-package.js.map +1 -1
  254. package/dist/utils/useful-stuff/async-queue.js.map +1 -1
  255. package/dist/utils/useful-stuff/mutex.js.map +1 -1
  256. package/dist/utils/useful-stuff/ratelimiter.js +4 -1
  257. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  258. package/dist/utils/useful-stuff/semaphore.js.map +1 -1
  259. package/dist/utils/utilities.js +1 -1
  260. package/dist/utils/warning.d.ts +1 -5
  261. package/dist/utils/warning.js.map +1 -1
  262. package/dist/version.js +1 -1
  263. package/dist/version.js.map +1 -1
  264. package/package.json +17 -17
  265. package/dist/commandkit-DTqT800J.js.map +0 -1
  266. package/dist/index-CQiOqvUC.d.ts +0 -1
  267. package/dist/index-CTLjHn5u.d.ts +0 -1
  268. package/dist/index-LKrIp3Oo.d.ts +0 -1
  269. /package/dist/{chunk-BE-pF4vm.js → rolldown-runtime-C_NdSu1c.js} +0 -0
@@ -1,2 +1,2 @@
1
- import { _ as CommandKitConfig, g as CommandKitCompilerOptions, v as CommandKitJsRuntime } from "../analytics-engine-BYA0ongA.js";
1
+ import { _ as CommandKitConfig, g as CommandKitCompilerOptions, v as CommandKitJsRuntime } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { CommandKitCompilerOptions, CommandKitConfig, CommandKitJsRuntime };
@@ -1,2 +1,2 @@
1
- import { f as DeepPartial, h as mergeDeep, m as ResolvedCommandKitConfig, p as DeepRequired } from "../analytics-engine-BYA0ongA.js";
1
+ import { f as DeepPartial, h as mergeDeep, m as ResolvedCommandKitConfig, p as DeepRequired } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { DeepPartial, DeepRequired, ResolvedCommandKitConfig, mergeDeep };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../src/config/utils.ts"],"sourcesContent":["import { CommandKitConfig } from './types';\n\n/**\n * @private\n */\nexport type DeepRequired<T, OptionalKeys extends keyof T = never> = {\n [P in keyof T]-?: P extends OptionalKeys ? Partial<T[P]> : DeepRequired<T[P]>;\n};\n\n/**\n * @private\n */\nexport type DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>;\n};\n\n/**\n * @private\n * @example\n * ```ts\n * const target = { a: 1, b: { c: 2 } };\n * const source = { b: { d: 3 } };\n * const result = mergeDeep(target, source);\n * // result = { a: 1, b: { c: 2, d: 3 } }\n * ```\n */\nexport const mergeDeep = <T extends Record<string, any>>(\n target: T,\n source?: T,\n tracker = new WeakMap<object, boolean>(),\n): T => {\n if (!source) return target;\n const isObject = (obj: unknown) =>\n obj && typeof obj === 'object' && !Array.isArray(obj);\n\n // Prevent infinite recursion\n if (tracker.has(target)) {\n return target;\n }\n\n // Mark the target as visited\n tracker.set(target, true);\n\n const output: T = { ...target };\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n } else {\n output[key as keyof T] = mergeDeep(target[key], source[key], tracker);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n\n return output as T;\n};\n\nexport type ResolvedCommandKitConfig = DeepRequired<\n CommandKitConfig,\n 'compilerOptions'\n>;\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAa,aACb,QACA,QACA,0BAAU,IAAE,SAA4B,KACjC;AACL,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,YAAY,QAClB,OAAO,OAAE,QAAa,YAAY,CAAC,MAAE,QAAM,IAAQ;AAGnD,KAAI,QAAQ,IAAI,OAAO,CACrB,QAAO;AAIT,SAAQ,IAAI,QAAQ,KAAK;CAEzB,MAAM,SAAY,EAAE,GAAG,QAAQ;AAC/B,KAAI,SAAS,OAAO,IAAI,SAAS,OAAO,CACtC,QAAO,KAAK,OAAO,CAAC,SAAS,QAAQ;AACnC,MAAI,SAAS,OAAO,KAAK,CACvB,KAAI,EAAE,OAAO,QACX,QAAO,OAAO,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;MAE7C,QAAO,OAAkB,UAAU,OAAO,MAAM,OAAO,MAAM,QAAQ;MAGvE,QAAO,OAAO,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;GAE/C;AAGJ,QAAO"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":[],"mappings":""}
@@ -16,4 +16,4 @@ declare enum SerializerType {
16
16
  }
17
17
  //#endregion
18
18
  export { SerializerType as t };
19
- //# sourceMappingURL=constants-D_sgdBHy.d.ts.map
19
+ //# sourceMappingURL=constants-B7AfnOFa.d.ts.map
@@ -43,10 +43,23 @@ declare const HMREventType: {
43
43
  */
44
44
  readonly Unknown: "unknown";
45
45
  };
46
+ /**
47
+ * File system change types delivered through HMR messages.
48
+ */
49
+ declare const HMREventChangeType: {
50
+ readonly Add: "add";
51
+ readonly Change: "change";
52
+ readonly Unlink: "unlink";
53
+ readonly UnlinkDir: "unlinkDir";
54
+ };
46
55
  /**
47
56
  * The type for HMR events.
48
57
  */
49
58
  type HMREventType = (typeof HMREventType)[keyof typeof HMREventType];
59
+ /**
60
+ * The type for file change events in HMR payloads.
61
+ */
62
+ type HMREventChangeType = (typeof HMREventChangeType)[keyof typeof HMREventChangeType];
50
63
  //#endregion
51
- export { COMMANDKIT_IS_TEST as a, COMMANDKIT_IS_DEV as i, COMMANDKIT_CWD as n, HMREventType as o, COMMANDKIT_IS_CLI as r, isBuildLikeEnvironment as s, COMMANDKIT_BOOTSTRAP_MODE as t };
52
- //# sourceMappingURL=constants-GWSfiS4h.d.ts.map
64
+ export { COMMANDKIT_IS_TEST as a, isBuildLikeEnvironment as c, COMMANDKIT_IS_DEV as i, COMMANDKIT_CWD as n, HMREventChangeType as o, COMMANDKIT_IS_CLI as r, HMREventType as s, COMMANDKIT_BOOTSTRAP_MODE as t };
65
+ //# sourceMappingURL=constants-kWgE3L9F.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { ColorResolvable, ComponentBuilder, ContainerBuilder, ContainerComponentData } from "discord.js";
2
-
3
2
  //#region src/components/display/container.d.ts
4
3
  /**
5
4
  * Represents the properties for a container component.
@@ -21,4 +20,4 @@ interface ContainerProps extends Omit<ContainerComponentData, 'type' | 'componen
21
20
  declare function Container(props: ContainerProps): ContainerBuilder;
22
21
  //#endregion
23
22
  export { ContainerProps as n, Container as t };
24
- //# sourceMappingURL=container-B7Kmw__R.d.ts.map
23
+ //# sourceMappingURL=container-NVgblXmw.d.ts.map
@@ -1,2 +1,2 @@
1
- import { At as isCommandWorkerContext, Dt as exitContext, Et as GenericFunction, Mt as provideContext, Nt as useEnvironment, Ot as getCommandKit, Pt as useStore, Tt as AsyncFunction, jt as makeContextAwareFunction, kt as getContext } from "../analytics-engine-BYA0ongA.js";
1
+ import { At as isCommandWorkerContext, Dt as exitContext, Et as GenericFunction, Mt as provideContext, Nt as useEnvironment, Ot as getCommandKit, Pt as useStore, Tt as AsyncFunction, jt as makeContextAwareFunction, kt as getContext } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment, useStore };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_commandkit = require('../commandkit-DTqT800J.js');
2
+ const require_commandkit = require('../commandkit-DoxpAUsW.js');
3
3
 
4
4
  exports.exitContext = require_commandkit.exitContext;
5
5
  exports.getCommandKit = require_commandkit.getCommandKit;
@@ -1,2 +1,2 @@
1
- import { Ft as CommandKitEnvironment, It as CommandKitEnvironmentInternalData, Lt as CommandKitEnvironmentType, Rt as after, zt as cancelAfter } from "../analytics-engine-BYA0ongA.js";
1
+ import { Ft as CommandKitEnvironment, It as CommandKitEnvironmentInternalData, Lt as CommandKitEnvironmentType, Rt as after, zt as cancelAfter } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_commandkit = require('../commandkit-DTqT800J.js');
2
+ const require_commandkit = require('../commandkit-DoxpAUsW.js');
3
3
 
4
4
  exports.CommandKitEnvironment = require_commandkit.CommandKitEnvironment;
5
5
  exports.CommandKitEnvironmentType = require_commandkit.CommandKitEnvironmentType;
@@ -1,7 +1,6 @@
1
- import { t as ButtonKit } from "./ButtonKit-BfcyvWfj.js";
2
- import { i as ModalKit } from "./ModalKit-XJSM65SV.js";
1
+ import { t as ButtonKit } from "./ButtonKit-CNPmVg3h.js";
2
+ import { i as ModalKit } from "./ModalKit-CnmUVpw-.js";
3
3
  import { ActionRowBuilder, TextInputBuilder } from "discord.js";
4
-
5
4
  //#region src/components/common/element.d.ts
6
5
  /**
7
6
  * Represents the types of elements that can be used in CommandKit.
@@ -69,4 +68,4 @@ declare function createElement(type: Function, props: Record<string, unknown>, .
69
68
  declare function applyDefaultOptionalComponentBehavior<P>(props: P): P;
70
69
  //#endregion
71
70
  export { Fragment as a, createElement as c, ElementType as i, getElement as l, CommandKitElement as n, FragmentElementProps as o, CommandKitElementData as r, applyDefaultOptionalComponentBehavior as s, AnyCommandKitElement as t, isCommandKitElement as u };
72
- //# sourceMappingURL=element-DeLvTMfZ.d.ts.map
71
+ //# sourceMappingURL=element-BMZYAAQ-.d.ts.map
@@ -1,2 +1,2 @@
1
- import { ct as CommandKitEventsChannel, lt as ListenerFunction } from "../analytics-engine-BYA0ongA.js";
1
+ import { ct as CommandKitEventsChannel, lt as ListenerFunction } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { CommandKitEventsChannel, ListenerFunction };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-BE-pF4vm.js');
2
+ const require_rolldown_runtime = require('../rolldown-runtime-C_NdSu1c.js');
3
3
  let node_events = require("node:events");
4
- node_events = require_chunk.__toESM(node_events);
4
+ node_events = require_rolldown_runtime.__toESM(node_events);
5
5
 
6
6
  //#region src/events/CommandKitEventsChannel.ts
7
7
  /**
@@ -10,6 +10,7 @@ node_events = require_chunk.__toESM(node_events);
10
10
  * within a specific namespace.
11
11
  */
12
12
  var CommandKitEventsChannel = class {
13
+ commandkit;
13
14
  emitter = new node_events.default();
14
15
  /**
15
16
  * Creates a new instance of CommandKitEventsChannel.
@@ -1 +1 @@
1
- {"version":3,"file":"CommandKitEventsChannel.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,qBAAc;;;;;CAMpC,AAAO,YAAY,AAAgB,YAAwB;EAAxB;;;;;;;;;;CAUnC,AAAO,GAAG,WAAmB;AAC3B,SAAO;GACL,IAAI,KAAK,GAAG,KAAK,MAAM,UAAU;GACjC,KAAK,KAAK,IAAI,KAAK,MAAM,UAAU;GACnC,MAAM,KAAK,KAAK,KAAK,MAAM,UAAU;GACrC,MAAM,KAAK,KAAK,KAAK,MAAM,UAAU;GACrC,oBAAoB,KAAK,mBAAmB,KAAK,MAAM,UAAU;GAClE;;;;;;;;CASH,AAAO,GAAG,WAAmB,OAAe,UAA4B;AACtE,OAAK,QAAQ,GAAG,GAAG,UAAU,GAAG,SAAS,SAAS;;;;;;;;CASpD,AAAO,IAAI,WAAmB,OAAe,UAA4B;AACvE,OAAK,QAAQ,IAAI,GAAG,UAAU,GAAG,SAAS,SAAS;;;;;;;;;CAUrD,AAAO,KAAK,WAAmB,OAAe,UAA4B;AACxE,OAAK,QAAQ,KAAK,GAAG,UAAU,GAAG,SAAS,SAAS;;;;;;;;;CAUtD,AAAO,KAAK,WAAmB,OAAe,GAAG,MAAa;AAC5D,SAAO,KAAK,QAAQ,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK;;CAU5D,AAAO,mBAAmB,WAAmB,OAAsB;AACjE,MAAI,MACF,MAAK,QAAQ,mBAAmB,GAAG,UAAU,GAAG,QAAQ;MAExD,MAAK,QAAQ,mBAAmB,UAAU"}
1
+ {"version":3,"file":"CommandKitEventsChannel.js","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,4 @@
1
1
  import { FileBuilder, FileComponentData } from "discord.js";
2
-
3
2
  //#region src/components/display/file.d.ts
4
3
  /**
5
4
  * Represents the properties for a file component.
@@ -20,4 +19,4 @@ interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {
20
19
  declare function File(props: FileProps): FileBuilder;
21
20
  //#endregion
22
21
  export { FileProps as n, File as t };
23
- //# sourceMappingURL=file-BP8aoN3A.d.ts.map
22
+ //# sourceMappingURL=file-DYAmr697.d.ts.map
@@ -1,2 +1,2 @@
1
- import { F as JsonFlagProvider, N as FlagConfiguration, P as FlagProvider } from "../analytics-engine-BYA0ongA.js";
1
+ import { F as JsonFlagProvider, N as FlagConfiguration, P as FlagProvider } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { FlagConfiguration, FlagProvider, JsonFlagProvider };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
  * Example implementation for a simple JSON-based flag provider
6
6
  */
7
7
  var JsonFlagProvider = class {
8
+ config;
8
9
  flags = /* @__PURE__ */ new Map();
9
10
  constructor(config) {
10
11
  this.config = config;
@@ -1 +1 @@
1
- {"version":3,"file":"FlagProvider.js","names":[],"sources":["../../src/flags/FlagProvider.ts"],"sourcesContent":["import type { MaybePromise } from './feature-flags';\n\n/**\n * Interface for external feature flag providers.\n * Implement this interface to integrate with external flag management systems\n * like LaunchDarkly, Split, Unleash, etc.\n */\nexport interface FlagProvider {\n /**\n * Initialize the provider (e.g., establish connections, load initial config)\n */\n initialize?(): MaybePromise<void>;\n\n /**\n * Get the current value/configuration for a feature flag\n * @param key - The feature flag key\n * @param context - Optional context for flag evaluation\n * @returns The flag configuration or null if not found\n */\n getFlag(key: string, context?: any): MaybePromise<FlagConfiguration | null>;\n\n /**\n * Check if a flag exists in the external system\n * @param key - The feature flag key\n */\n hasFlag(key: string): MaybePromise<boolean>;\n\n /**\n * Cleanup resources when the provider is no longer needed\n */\n destroy?(): MaybePromise<void>;\n}\n\n/**\n * Configuration returned by external flag providers\n */\nexport interface FlagConfiguration {\n /**\n * Whether the flag is enabled/disabled at the provider level\n */\n enabled: boolean;\n\n /**\n * Optional configuration data that can be used in the decide function\n */\n config?: Record<string, any>;\n\n /**\n * Optional percentage for gradual rollouts (0-100)\n */\n percentage?: number;\n\n /**\n * Optional targeting rules or segments\n */\n targeting?: {\n segments?: string[];\n rules?: Array<{\n condition: string;\n value: any;\n }>;\n };\n}\n\n/**\n * Example implementation for a simple JSON-based flag provider\n */\nexport class JsonFlagProvider implements FlagProvider {\n private flags: Map<string, FlagConfiguration> = new Map();\n\n public constructor(private config: Record<string, FlagConfiguration>) {\n Object.entries(config).forEach(([key, value]) => {\n this.flags.set(key, value);\n });\n }\n\n public async getFlag(key: string): Promise<FlagConfiguration | null> {\n return this.flags.get(key) || null;\n }\n\n public async hasFlag(key: string): Promise<boolean> {\n return this.flags.has(key);\n }\n\n public async destroy(): Promise<void> {\n this.flags.clear();\n }\n}\n"],"mappings":";;;;;;AAmEA,IAAa,mBAAb,MAAsD;CACpD,AAAQ,wBAAwC,IAAI,KAAK;CAEzD,AAAO,YAAY,AAAQ,QAA2C;EAA3C;AACzB,SAAO,QAAQ,OAAO,CAAC,SAAS,CAAC,KAAK,WAAW;AAC/C,QAAK,MAAM,IAAI,KAAK,MAAM;IAC1B;;CAGJ,MAAa,QAAQ,KAAgD;AACnE,SAAO,KAAK,MAAM,IAAI,IAAI,IAAI;;CAGhC,MAAa,QAAQ,KAA+B;AAClD,SAAO,KAAK,MAAM,IAAI,IAAI;;CAG5B,MAAa,UAAyB;AACpC,OAAK,MAAM,OAAO"}
1
+ {"version":3,"file":"FlagProvider.js","names":[],"sources":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import { A as MaybePromise, C as DecideFunction, D as FeatureFlagDefinition, E as FeatureFlag, M as setFlagProvider, O as FlagRunner, S as CustomEvaluationFunction, T as EventFlagContext, b as CommandFlagContext, j as flag, k as IdentifyFunction, w as EvaluationContext, x as CustomEvaluationContext } from "../analytics-engine-BYA0ongA.js";
1
+ import { A as MaybePromise, C as DecideFunction, D as FeatureFlagDefinition, E as FeatureFlag, M as setFlagProvider, O as FlagRunner, S as CustomEvaluationFunction, T as EventFlagContext, b as CommandFlagContext, j as flag, k as IdentifyFunction, w as EvaluationContext, x as CustomEvaluationContext } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { CommandFlagContext, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, EvaluationContext, EventFlagContext, FeatureFlag, FeatureFlagDefinition, FlagRunner, IdentifyFunction, MaybePromise, flag, setFlagProvider };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_commandkit = require('../commandkit-DTqT800J.js');
2
+ const require_commandkit = require('../commandkit-DoxpAUsW.js');
3
3
 
4
4
  exports.FeatureFlag = require_commandkit.FeatureFlag;
5
5
  exports.flag = require_commandkit.flag;
@@ -1,2 +1,2 @@
1
- import { y as FlagStore } from "../analytics-engine-BYA0ongA.js";
1
+ import { y as FlagStore } from "../analytics-engine-Bz1p7ud3.js";
2
2
  export { FlagStore };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-BE-pF4vm.js');
3
2
  let discord_js = require("discord.js");
4
3
 
5
4
  //#region src/flags/store.ts
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":[],"sources":["../../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\n/**\n * Represents a store for feature flags.\n * This store extends the Collection class to manage feature flags by their keys.\n */\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;;;;;;AAOA,IAAa,YAAb,cAA+B,sBAA0C"}
1
+ {"version":3,"file":"store.js","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,4 @@
1
1
  import { Interaction, Message } from "discord.js";
2
-
3
2
  //#region src/app/commands/helpers.d.ts
4
3
  /**
5
4
  * Union type representing possible command sources.
@@ -19,4 +18,4 @@ declare function isMessageSource(source: CommandSource): source is Message;
19
18
  declare function isInteractionSource(source: CommandSource): source is Interaction;
20
19
  //#endregion
21
20
  export { isInteractionSource as n, isMessageSource as r, CommandSource as t };
22
- //# sourceMappingURL=helpers-C5jRrAM1.d.ts.map
21
+ //# sourceMappingURL=helpers-vlnRvNJv.d.ts.map
@@ -0,0 +1,8 @@
1
+ import "./container-NVgblXmw.js";
2
+ import "./file-DYAmr697.js";
3
+ import "./media-gallery-z2Snzz-u.js";
4
+ import "./section-DrFBT5b-.js";
5
+ import "./separator-BVm3w6yd.js";
6
+ import "./text-display-BG0nNqy3.js";
7
+ import "./label-DClaYktn.js";
8
+ import "./poll-D2QDStsw.js";
@@ -0,0 +1,2 @@
1
+ import "./CommandsRouter-Co225Ae5.js";
2
+ import "./TreeArtifact-D6FZ5SVd.js";
@@ -0,0 +1,16 @@
1
+ import "./ButtonKit-CNPmVg3h.js";
2
+ import "./ModalKit-CnmUVpw-.js";
3
+ import "./element-BMZYAAQ-.js";
4
+ import "./ActionRow-DSh9roc5.js";
5
+ import "./Button-BPsE5ju0.js";
6
+ import "./Modal-DbWK6VmV.js";
7
+ import "./common-CIbPzguv.js";
8
+ import "./StringSelectMenuKit-CBeB9HqT.js";
9
+ import "./ChannelSelectMenuKit-CcOdaLQ6.js";
10
+ import "./MentionableSelectMenuKit-8_Nkgn_a.js";
11
+ import "./UserSelectMenuKit-DZmeZ_Tp.js";
12
+ import "./RoleSelectMenuKit-Bei7DHqD.js";
13
+ import "./SelectMenu-Bce_PClo.js";
14
+ import "./checkbox-DoR0Pcxm.js";
15
+ import "./radio-CJH_N4lq.js";
16
+ import "./index-CAFaKBs_.js";
package/dist/index.d.ts CHANGED
@@ -1,36 +1,39 @@
1
- import { $ as RuntimePlugin, $t as InteractionCommandMiddlewareContext, A as MaybePromise, At as isCommandWorkerContext, Bt as CommandRegistrar, C as DecideFunction, D as FeatureFlagDefinition, Dt as exitContext, E as FeatureFlag, Et as GenericFunction, Ft as CommandKitEnvironment, G as CompilerPlugin, Gt as AutocompleteCommandMiddlewareContext, H as CompilerPluginRuntime, Ht as AnyCommandExecute, I as CommandKitPluginRuntime, It as CommandKitEnvironmentInternalData, J as isCompilerPlugin, Jt as CommandContextOptions, K as PluginTransformParameters, Kt as ChatInputCommand, Lt as CommandKitEnvironmentType, M as setFlagProvider, Mt as provideContext, Nt as useEnvironment, O as FlagRunner, Ot as getCommandKit, Pt as useStore, Q as TemplateHandler, Qt as InteractionCommandContext, Rt as after, S as CustomEvaluationFunction, St as RunCommand, T as EventFlagContext, Tt as AsyncFunction, U as CommonDirectiveTransformer, Ut as AutocompleteCommand, V as CommonPluginRuntime, Vt as PreRegisterCommandsEvent, W as CommonDirectiveTransformerOptions, Wt as AutocompleteCommandContext, X as CommandKitPlugin, Xt as Context, Y as CommandKitEventDispatch, Yt as CommandExecutionMode, Z as MaybeFalsey, Zt as ContextParameters, _n as EventHandler, _t as CommandTypeData, an as MessageContextMenuCommandMiddlewareContext, b as CommandFlagContext, bt as PreparedAppCommandExecution, c as CommandKitConfiguration, cn as SlashCommandMiddlewareContext, d as onBootstrap, dn as UserContextMenuCommandMiddlewareContext, dt as AppCommandHandler, en as MessageCommand, et as isRuntimePlugin, fn as CommandContext, ft as AppCommandNative, gn as CommandMetadataFunction, gt as CommandDataSchemaValue, hn as CommandMetadata, ht as CommandDataSchemaKey, in as MessageContextMenuCommandContext, j as flag, jt as makeContextAwareFunction, k as IdentifyFunction, kt as getContext, l as commandkit, ln as UserContextMenuCommand, mn as CommandKitOptions, mt as CommandDataSchema, nn as MessageCommandMiddlewareContext, o as BootstrapFunction, on as MiddlewareContext, pn as CommandData, pt as CommandBuilderLike, q as TransformedResult, qt as ChatInputCommandContext, rn as MessageContextMenuCommand, s as CommandKit, sn as MiddlewareContextArgs, tn as MessageCommandContext, tt as CommandKitHMREvent, u as onApplicationBootstrap, un as UserContextMenuCommandContext, ut as AppCommand, vt as CustomAppCommandProps, w as EvaluationContext, x as CustomEvaluationContext, xt as ResolvableCommand, yt as LoadedCommand, zt as cancelAfter } from "./analytics-engine-BYA0ongA.js";
2
- import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler, t as EventInterceptor } from "./EventInterceptor-D9JKMcfi.js";
3
- import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, n as ButtonKitPredicate, o as OnButtonKitClick, r as CommandKitButtonBuilderInteractionCollectorDispatch, s as OnButtonKitEnd, t as ButtonKit } from "./ButtonKit-BfcyvWfj.js";
4
- import { a as ModalKitPredicate, i as ModalKit, n as CommandKitModalBuilderInteractionCollectorDispatchContextData, o as OnModalKitEnd, r as CommandKitModalBuilderOnEnd, s as OnModalKitSubmit, t as CommandKitModalBuilderInteractionCollectorDispatch } from "./ModalKit-XJSM65SV.js";
5
- import { a as Fragment, c as createElement, i as ElementType, l as getElement, n as CommandKitElement, o as FragmentElementProps, r as CommandKitElementData, s as applyDefaultOptionalComponentBehavior, t as AnyCommandKitElement, u as isCommandKitElement } from "./element-DeLvTMfZ.js";
6
- import { n as ActionRowProps, t as ActionRow } from "./ActionRow-Bt9qi0Mb.js";
7
- import { t as MaybeArray } from "./types-DZy7U-Ld.js";
8
- import { n as ButtonChildrenLike, r as ButtonProps, t as Button } from "./Button-DxJLcZIU.js";
9
- import { a as ParagraphInput, c as TextInputProps, i as ModalProps, n as FileUploadProps, o as ShortInput, r as Modal, s as TextInput, t as FileUpload } from "./Modal-v9rrcMl-.js";
10
- import { a as OnSelectMenuKitSubmit, i as OnSelectMenuKitEnd, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CCvvgnxi.js";
11
- import { n as StringSelectMenuKit, r as StringSelectMenuKitPredicate, t as OnStringSelectMenuKitSubmit } from "./StringSelectMenuKit-G5nBTicX.js";
12
- import { n as ChannelSelectMenuKitPredicate, r as OnChannelSelectMenuKitSubmit, t as ChannelSelectMenuKit } from "./ChannelSelectMenuKit-DYkudikb.js";
13
- import { n as MentionableSelectMenuKitPredicate, r as OnMentionableSelectMenuKitSubmit, t as MentionableSelectMenuKit } from "./MentionableSelectMenuKit-Mu4xqP6B.js";
14
- import { n as UserSelectMenuKit, r as UserSelectMenuKitPredicate, t as OnUserSelectMenuKitSubmit } from "./UserSelectMenuKit-D3SO_fXA.js";
15
- import { n as RoleSelectMenuKit, r as RoleSelectMenuKitPredicate, t as OnRoleSelectMenuKitSubmit } from "./RoleSelectMenuKit-CCjcp3HY.js";
16
- import { a as MentionableSelectMenu, c as RoleSelectMenu, d as StringSelectMenu, f as StringSelectMenuOption, g as UserSelectMenuProps, h as UserSelectMenu, i as CommonSelectMenuProps, l as RoleSelectMenuProps, m as StringSelectMenuProps, n as ChannelSelectMenuProps, o as MentionableSelectMenuProps, p as StringSelectMenuOptionProps, r as CommonBuilderKit, s as ResolveBuilderInteraction, t as ChannelSelectMenu, u as SelectMenuProps } from "./SelectMenu-CY0vvoSu.js";
17
- import { a as CheckboxGroupProps, i as CheckboxGroupOptionProps, n as CheckboxGroup, o as CheckboxProps, r as CheckboxGroupOption, t as Checkbox } from "./checkbox-CvQGiyRe.js";
18
- import { i as RadioGroupProps, n as RadioGroupOption, r as RadioGroupOptionProps, t as RadioGroup } from "./radio-Dcd4YIZx.js";
19
- import { n as ContainerProps, t as Container } from "./container-B7Kmw__R.js";
20
- import { n as FileProps, t as File } from "./file-BP8aoN3A.js";
21
- import { i as MediaGalleryProps, n as MediaGalleryItem, r as MediaGalleryItemProps, t as MediaGallery } from "./media-gallery-hFfa57Kd.js";
22
- import { i as ThumbnailProps, n as SectionProps, r as Thumbnail, t as Section } from "./section-BqDLXlp3.js";
23
- import { n as SeparatorProps, t as Separator } from "./separator-DSaCa1Tc.js";
24
- import { n as TextDisplay, r as TextDisplayProps, t as StringEncodable } from "./text-display-D-0dD7bR.js";
25
- import { n as LabelProps, t as Label } from "./label-CqHiBMXP.js";
26
- import { a as PollProps, i as PollChildrenType, n as PollAnswer, o as PollQuestion, r as PollAnswerProps, s as PollQuestionProps, t as Poll } from "./poll-ElAd5Z2K.js";
27
- import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-UTKsRvb9.js";
28
- import { i as stopMiddlewares, n as rethrow, r as stopEvents, t as redirect } from "./signals-DVOXPkQK.js";
29
- import { n as isInteractionSource, r as isMessageSource, t as CommandSource } from "./helpers-C5jRrAM1.js";
30
- import { a as CompiledCommandRoute, i as CommandTreeNodeSource, n as CommandTreeNode, r as CommandTreeNodeKind, t as CommandRouteDiagnostic } from "./CommandTree-DwfiCsOl.js";
31
- import { a as ParsedCommandData, i as Middleware, n as CommandsRouter, r as CommandsRouterOptions, t as Command } from "./CommandsRouter-D-b3xv38.js";
32
- import { i as ParsedEvent, n as EventsRouterOptions, r as EventsTree, t as EventsRouter } from "./EventsRouter-Dyr_oJJD.js";
33
- import { a as COMMANDKIT_IS_TEST, i as COMMANDKIT_IS_DEV, n as COMMANDKIT_CWD, o as HMREventType, r as COMMANDKIT_IS_CLI, s as isBuildLikeEnvironment, t as COMMANDKIT_BOOTSTRAP_MODE } from "./constants-GWSfiS4h.js";
1
+ import { $ as RuntimePlugin, $t as InteractionCommandMiddlewareContext, A as MaybePromise, At as isCommandWorkerContext, Bt as CommandRegistrar, C as DecideFunction, D as FeatureFlagDefinition, Dt as exitContext, E as FeatureFlag, Et as GenericFunction, Ft as CommandKitEnvironment, G as CompilerPlugin, Gt as AutocompleteCommandMiddlewareContext, H as CompilerPluginRuntime, Ht as AnyCommandExecute, I as CommandKitPluginRuntime, It as CommandKitEnvironmentInternalData, J as isCompilerPlugin, Jt as CommandContextOptions, K as PluginTransformParameters, Kt as ChatInputCommand, Lt as CommandKitEnvironmentType, M as setFlagProvider, Mt as provideContext, Nt as useEnvironment, O as FlagRunner, Ot as getCommandKit, Pt as useStore, Q as TemplateHandler, Qt as InteractionCommandContext, Rt as after, S as CustomEvaluationFunction, St as RunCommand, T as EventFlagContext, Tt as AsyncFunction, U as CommonDirectiveTransformer, Ut as AutocompleteCommand, V as CommonPluginRuntime, Vt as PreRegisterCommandsEvent, W as CommonDirectiveTransformerOptions, Wt as AutocompleteCommandContext, X as CommandKitPlugin, Xt as Context, Y as CommandKitEventDispatch, Yt as CommandExecutionMode, Z as MaybeFalsey, Zt as ContextParameters, _n as EventHandler, _t as CommandTypeData, an as MessageContextMenuCommandMiddlewareContext, b as CommandFlagContext, bt as PreparedAppCommandExecution, c as CommandKitConfiguration, cn as SlashCommandMiddlewareContext, d as onBootstrap, dn as UserContextMenuCommandMiddlewareContext, dt as AppCommandHandler, en as MessageCommand, et as isRuntimePlugin, fn as CommandContext, ft as AppCommandNative, gn as CommandMetadataFunction, gt as CommandDataSchemaValue, hn as CommandMetadata, ht as CommandDataSchemaKey, in as MessageContextMenuCommandContext, j as flag, jt as makeContextAwareFunction, k as IdentifyFunction, kt as getContext, l as commandkit, ln as UserContextMenuCommand, mn as CommandKitOptions, mt as CommandDataSchema, nn as MessageCommandMiddlewareContext, o as BootstrapFunction, on as MiddlewareContext, pn as CommandData, pt as CommandBuilderLike, q as TransformedResult, qt as ChatInputCommandContext, rn as MessageContextMenuCommand, s as CommandKit, sn as MiddlewareContextArgs, tn as MessageCommandContext, tt as CommandKitHMREvent, u as onApplicationBootstrap, un as UserContextMenuCommandContext, ut as AppCommand, vt as CustomAppCommandProps, w as EvaluationContext, x as CustomEvaluationContext, xt as ResolvableCommand, yt as LoadedCommand, zt as cancelAfter } from "./analytics-engine-Bz1p7ud3.js";
2
+ import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler, t as EventInterceptor } from "./EventInterceptor-wg378vJp.js";
3
+ import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, n as ButtonKitPredicate, o as OnButtonKitClick, r as CommandKitButtonBuilderInteractionCollectorDispatch, s as OnButtonKitEnd, t as ButtonKit } from "./ButtonKit-CNPmVg3h.js";
4
+ import { a as ModalKitPredicate, i as ModalKit, n as CommandKitModalBuilderInteractionCollectorDispatchContextData, o as OnModalKitEnd, r as CommandKitModalBuilderOnEnd, s as OnModalKitSubmit, t as CommandKitModalBuilderInteractionCollectorDispatch } from "./ModalKit-CnmUVpw-.js";
5
+ import { a as Fragment, c as createElement, i as ElementType, l as getElement, n as CommandKitElement, o as FragmentElementProps, r as CommandKitElementData, s as applyDefaultOptionalComponentBehavior, t as AnyCommandKitElement, u as isCommandKitElement } from "./element-BMZYAAQ-.js";
6
+ import { n as ActionRowProps, t as ActionRow } from "./ActionRow-DSh9roc5.js";
7
+ import { t as MaybeArray } from "./types-ur7SvktF.js";
8
+ import { n as ButtonChildrenLike, r as ButtonProps, t as Button } from "./Button-BPsE5ju0.js";
9
+ import { a as ParagraphInput, c as TextInputProps, i as ModalProps, n as FileUploadProps, o as ShortInput, r as Modal, s as TextInput, t as FileUpload } from "./Modal-DbWK6VmV.js";
10
+ import { a as OnSelectMenuKitSubmit, i as OnSelectMenuKitEnd, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-CIbPzguv.js";
11
+ import { n as StringSelectMenuKit, r as StringSelectMenuKitPredicate, t as OnStringSelectMenuKitSubmit } from "./StringSelectMenuKit-CBeB9HqT.js";
12
+ import { n as ChannelSelectMenuKitPredicate, r as OnChannelSelectMenuKitSubmit, t as ChannelSelectMenuKit } from "./ChannelSelectMenuKit-CcOdaLQ6.js";
13
+ import { n as MentionableSelectMenuKitPredicate, r as OnMentionableSelectMenuKitSubmit, t as MentionableSelectMenuKit } from "./MentionableSelectMenuKit-8_Nkgn_a.js";
14
+ import { n as UserSelectMenuKit, r as UserSelectMenuKitPredicate, t as OnUserSelectMenuKitSubmit } from "./UserSelectMenuKit-DZmeZ_Tp.js";
15
+ import { n as RoleSelectMenuKit, r as RoleSelectMenuKitPredicate, t as OnRoleSelectMenuKitSubmit } from "./RoleSelectMenuKit-Bei7DHqD.js";
16
+ import { a as MentionableSelectMenu, c as RoleSelectMenu, d as StringSelectMenu, f as StringSelectMenuOption, g as UserSelectMenuProps, h as UserSelectMenu, i as CommonSelectMenuProps, l as RoleSelectMenuProps, m as StringSelectMenuProps, n as ChannelSelectMenuProps, o as MentionableSelectMenuProps, p as StringSelectMenuOptionProps, r as CommonBuilderKit, s as ResolveBuilderInteraction, t as ChannelSelectMenu, u as SelectMenuProps } from "./SelectMenu-Bce_PClo.js";
17
+ import { a as CheckboxGroupProps, i as CheckboxGroupOptionProps, n as CheckboxGroup, o as CheckboxProps, r as CheckboxGroupOption, t as Checkbox } from "./checkbox-DoR0Pcxm.js";
18
+ import { i as RadioGroupProps, n as RadioGroupOption, r as RadioGroupOptionProps, t as RadioGroup } from "./radio-CJH_N4lq.js";
19
+ import { n as ContainerProps, t as Container } from "./container-NVgblXmw.js";
20
+ import { n as FileProps, t as File } from "./file-DYAmr697.js";
21
+ import { i as MediaGalleryProps, n as MediaGalleryItem, r as MediaGalleryItemProps, t as MediaGallery } from "./media-gallery-z2Snzz-u.js";
22
+ import { i as ThumbnailProps, n as SectionProps, r as Thumbnail, t as Section } from "./section-DrFBT5b-.js";
23
+ import { n as SeparatorProps, t as Separator } from "./separator-BVm3w6yd.js";
24
+ import { n as TextDisplay, r as TextDisplayProps, t as StringEncodable } from "./text-display-BG0nNqy3.js";
25
+ import { n as LabelProps, t as Label } from "./label-DClaYktn.js";
26
+ import { a as PollProps, i as PollChildrenType, n as PollAnswer, o as PollQuestion, r as PollAnswerProps, s as PollQuestionProps, t as Poll } from "./poll-D2QDStsw.js";
27
+ import "./index-DvqHpiuh.js";
28
+ import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-BYbxHOSK.js";
29
+ import { i as stopMiddlewares, n as rethrow, r as stopEvents, t as redirect } from "./signals-DRMDrCOn.js";
30
+ import { n as isInteractionSource, r as isMessageSource, t as CommandSource } from "./helpers-vlnRvNJv.js";
31
+ import { a as CompiledCommandRoute, i as CommandTreeNodeSource, n as CommandTreeNode, r as CommandTreeNodeKind, t as CommandRouteDiagnostic } from "./CommandTree-qu-8oAEV.js";
32
+ import { a as ParsedCommandData, i as Middleware, n as CommandsRouter, o as RouterFileChangeType, r as CommandsRouterOptions, t as Command } from "./CommandsRouter-Co225Ae5.js";
33
+ import { a as ParsedEvent, i as EventsTree, n as EventsRouterFileChangeType, r as EventsRouterOptions, t as EventsRouter } from "./EventsRouter-Bt63ZuEF.js";
34
+ import { a as createRouterTreeArtifact, i as RouterTreeArtifact, n as ROUTER_TREE_ARTIFACT_FILE, o as hydrateRouterTreeArtifact, r as ROUTER_TREE_ARTIFACT_SCHEMA_VERSION, s as validateRouterTreeArtifact, t as ROUTER_TREE_ARTIFACT_DIRECTORY } from "./TreeArtifact-D6FZ5SVd.js";
35
+ import "./index-COt7nfC9.js";
36
+ import { a as COMMANDKIT_IS_TEST, c as isBuildLikeEnvironment, i as COMMANDKIT_IS_DEV, n as COMMANDKIT_CWD, o as HMREventChangeType, r as COMMANDKIT_IS_CLI, s as HMREventType, t as COMMANDKIT_BOOTSTRAP_MODE } from "./constants-kWgE3L9F.js";
34
37
  import { EventWorkerContext, eventWorkerContext, getEventWorkerContext, isEventWorkerContext, runInEventWorkerContext } from "./app/events/EventWorkerContext.js";
35
38
  import { defineConfig, getConfig } from "./config/config.js";
36
39
  import { ILogger } from "./logger/ILogger.js";
@@ -42,4 +45,4 @@ import { emitWarning, warnDeprecated, warnUnstable } from "./utils/warning.js";
42
45
  import { toFileURL } from "./utils/resolve-file-url.js";
43
46
  import { CommandKitErrorCodes, isErrorType } from "./utils/error-codes.js";
44
47
  import { Client, Collection } from "discord.js";
45
- export { ActionRow, ActionRowProps, AnyCommandExecute, AnyCommandKitElement, AppCommand, AppCommandHandler, AppCommandNative, AsyncFunction, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, BootstrapFunction, Button, ButtonChildrenLike, ButtonKit, ButtonKitPredicate, ButtonProps, COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CWD, COMMANDKIT_IS_CLI, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, ChannelSelectMenu, ChannelSelectMenuKit, ChannelSelectMenuKitPredicate, ChannelSelectMenuProps, ChatInputCommand, ChatInputCommandContext, Checkbox, CheckboxGroup, CheckboxGroupOption, CheckboxGroupOptionProps, CheckboxGroupProps, CheckboxProps, type Client, Collection, Command, CommandBuilderLike, CommandContext, CommandContextOptions, CommandData, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandExecutionMode, CommandFlagContext, CommandKit, CommandKit as default, CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd, CommandKitConfiguration, CommandKitElement, CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, CommandKitErrorCodes, CommandKitEventDispatch, type CommandKitHMREvent, CommandKitLoggerOptions, CommandKitModalBuilderInteractionCollectorDispatch, CommandKitModalBuilderInteractionCollectorDispatchContextData, CommandKitModalBuilderOnEnd, CommandKitOptions, CommandKitPlugin, CommandKitPluginRuntime, CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, CommandMetadata, CommandMetadataFunction, CommandRegistrar, CommandRouteDiagnostic, CommandSource, CommandTreeNode, CommandTreeNodeKind, CommandTreeNodeSource, CommandTypeData, CommandsRouter, CommandsRouterOptions, CommonBuilderKit, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CommonSelectMenuProps, CompiledCommandRoute, CompilerPlugin, CompilerPluginRuntime, Container, ContainerProps, Context, ContextParameters, CustomAppCommandProps, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, DefaultLogger, ElementType, EvaluationContext, EventFlagContext, EventHandler, EventInterceptor, EventInterceptorContextData, EventInterceptorErrorHandler, EventWorkerContext, EventsRouter, EventsRouterOptions, EventsTree, FeatureFlag, FeatureFlagDefinition, File, FileProps, FileUpload, FileUploadProps, FlagRunner, Fragment, FragmentElementProps, GenericFunction, HMREventType, ILogger, IdentifyFunction, InteractionCommandContext, InteractionCommandMiddlewareContext, Label, LabelProps, LoadedCommand, Logger, LoggerImpl, MaybeArray, MaybeFalsey, MaybePromise, MediaGallery, MediaGalleryItem, MediaGalleryItemProps, MediaGalleryProps, MentionableSelectMenu, MentionableSelectMenuKit, MentionableSelectMenuKitPredicate, MentionableSelectMenuProps, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, Middleware, MiddlewareContext, MiddlewareContextArgs, Modal, ModalKit, ModalKitPredicate, ModalProps, OnButtonKitClick, OnButtonKitEnd, OnChannelSelectMenuKitSubmit, OnMentionableSelectMenuKitSubmit, OnModalKitEnd, OnModalKitSubmit, OnRoleSelectMenuKitSubmit, OnSelectMenuKitEnd, OnSelectMenuKitSubmit, OnStringSelectMenuKitSubmit, OnUserSelectMenuKitSubmit, ParagraphInput, ParsedCommandData, ParsedEvent, ParsedMessageCommand, PluginTransformParameters, Poll, PollAnswer, PollAnswerProps, PollChildrenType, PollProps, PollQuestion, PollQuestionProps, PreRegisterCommandsEvent, PreparedAppCommandExecution, RadioGroup, RadioGroupOption, RadioGroupOptionProps, RadioGroupProps, ResolvableCommand, ResolveBuilderInteraction, RoleSelectMenu, RoleSelectMenuKit, RoleSelectMenuKitPredicate, RoleSelectMenuProps, RunCommand, RuntimePlugin, Section, SectionProps, SelectMenuKitPredicate, SelectMenuProps, Separator, SeparatorProps, ShortInput, SlashCommandMiddlewareContext, StringEncodable, StringSelectMenu, StringSelectMenuKit, StringSelectMenuKitPredicate, StringSelectMenuOption, StringSelectMenuOptionProps, StringSelectMenuProps, TemplateHandler, TextDisplay, TextDisplayProps, TextInput, TextInputProps, Thumbnail, ThumbnailProps, TransformedResult, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext, UserSelectMenu, UserSelectMenuKit, UserSelectMenuKitPredicate, UserSelectMenuProps, applyDefaultOptionalComponentBehavior, commandkit, createElement, createElement as jsx, createElement as jsxs, createLogger, debounce, defer, defineConfig, devOnly, emitWarning, eventWorkerContext, exitContext, flag, getCommandKit, getConfig, getContext, getCurrentDirectory, getElement, getEventWorkerContext, getSourceDirectories, isBuildLikeEnvironment, isCommandKitElement, isCommandWorkerContext, isCompilerPlugin, isErrorType, isEventWorkerContext, isInteractionSource, isMessageSource, isRuntimePlugin, makeContextAwareFunction, onApplicationBootstrap, onBootstrap, provideContext, redirect, rethrow, runInEventWorkerContext, setFlagProvider, stopEvents, stopMiddlewares, toFileURL, after as unstable_after, cancelAfter as unstable_cancelAfter, useEnvironment, useStore, version, warnDeprecated, warnUnstable };
48
+ export { ActionRow, ActionRowProps, AnyCommandExecute, AnyCommandKitElement, AppCommand, AppCommandHandler, AppCommandNative, AsyncFunction, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, BootstrapFunction, Button, ButtonChildrenLike, ButtonKit, ButtonKitPredicate, ButtonProps, COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CWD, COMMANDKIT_IS_CLI, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, ChannelSelectMenu, ChannelSelectMenuKit, ChannelSelectMenuKitPredicate, ChannelSelectMenuProps, ChatInputCommand, ChatInputCommandContext, Checkbox, CheckboxGroup, CheckboxGroupOption, CheckboxGroupOptionProps, CheckboxGroupProps, CheckboxProps, type Client, Collection, Command, CommandBuilderLike, type CommandContext, CommandContextOptions, type CommandData, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandExecutionMode, CommandFlagContext, CommandKit, CommandKit as default, CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd, CommandKitConfiguration, CommandKitElement, CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, CommandKitErrorCodes, CommandKitEventDispatch, type CommandKitHMREvent, CommandKitLoggerOptions, CommandKitModalBuilderInteractionCollectorDispatch, CommandKitModalBuilderInteractionCollectorDispatchContextData, CommandKitModalBuilderOnEnd, type CommandKitOptions, CommandKitPlugin, CommandKitPluginRuntime, CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, type CommandMetadata, type CommandMetadataFunction, CommandRegistrar, CommandRouteDiagnostic, type CommandSource, CommandTreeNode, CommandTreeNodeKind, CommandTreeNodeSource, CommandTypeData, CommandsRouter, CommandsRouterOptions, CommonBuilderKit, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CommonSelectMenuProps, CompiledCommandRoute, CompilerPlugin, CompilerPluginRuntime, Container, ContainerProps, Context, ContextParameters, CustomAppCommandProps, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, DefaultLogger, ElementType, EvaluationContext, EventFlagContext, type EventHandler, EventInterceptor, EventInterceptorContextData, EventInterceptorErrorHandler, EventWorkerContext, EventsRouter, EventsRouterFileChangeType, EventsRouterOptions, EventsTree, FeatureFlag, FeatureFlagDefinition, File, FileProps, FileUpload, FileUploadProps, FlagRunner, Fragment, FragmentElementProps, GenericFunction, HMREventChangeType, HMREventType, ILogger, IdentifyFunction, InteractionCommandContext, InteractionCommandMiddlewareContext, Label, LabelProps, LoadedCommand, Logger, LoggerImpl, MaybeArray, MaybeFalsey, MaybePromise, MediaGallery, MediaGalleryItem, MediaGalleryItemProps, MediaGalleryProps, MentionableSelectMenu, MentionableSelectMenuKit, MentionableSelectMenuKitPredicate, MentionableSelectMenuProps, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, Middleware, MiddlewareContext, MiddlewareContextArgs, Modal, ModalKit, ModalKitPredicate, ModalProps, OnButtonKitClick, OnButtonKitEnd, OnChannelSelectMenuKitSubmit, OnMentionableSelectMenuKitSubmit, OnModalKitEnd, OnModalKitSubmit, OnRoleSelectMenuKitSubmit, OnSelectMenuKitEnd, OnSelectMenuKitSubmit, OnStringSelectMenuKitSubmit, OnUserSelectMenuKitSubmit, ParagraphInput, ParsedCommandData, ParsedEvent, ParsedMessageCommand, PluginTransformParameters, Poll, PollAnswer, PollAnswerProps, PollChildrenType, PollProps, PollQuestion, PollQuestionProps, PreRegisterCommandsEvent, PreparedAppCommandExecution, ROUTER_TREE_ARTIFACT_DIRECTORY, ROUTER_TREE_ARTIFACT_FILE, ROUTER_TREE_ARTIFACT_SCHEMA_VERSION, RadioGroup, RadioGroupOption, RadioGroupOptionProps, RadioGroupProps, ResolvableCommand, ResolveBuilderInteraction, RoleSelectMenu, RoleSelectMenuKit, RoleSelectMenuKitPredicate, RoleSelectMenuProps, RouterFileChangeType, RouterTreeArtifact, RunCommand, RuntimePlugin, Section, SectionProps, SelectMenuKitPredicate, SelectMenuProps, Separator, SeparatorProps, ShortInput, SlashCommandMiddlewareContext, StringEncodable, StringSelectMenu, StringSelectMenuKit, StringSelectMenuKitPredicate, StringSelectMenuOption, StringSelectMenuOptionProps, StringSelectMenuProps, TemplateHandler, TextDisplay, TextDisplayProps, TextInput, TextInputProps, Thumbnail, ThumbnailProps, TransformedResult, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext, UserSelectMenu, UserSelectMenuKit, UserSelectMenuKitPredicate, UserSelectMenuProps, applyDefaultOptionalComponentBehavior, commandkit, createElement, createElement as jsx, createElement as jsxs, createLogger, createRouterTreeArtifact, debounce, defer, defineConfig, devOnly, emitWarning, eventWorkerContext, exitContext, flag, getCommandKit, getConfig, getContext, getCurrentDirectory, getElement, getEventWorkerContext, getSourceDirectories, hydrateRouterTreeArtifact, isBuildLikeEnvironment, isCommandKitElement, isCommandWorkerContext, isCompilerPlugin, isErrorType, isEventWorkerContext, isInteractionSource, isMessageSource, isRuntimePlugin, makeContextAwareFunction, onApplicationBootstrap, onBootstrap, provideContext, redirect, rethrow, runInEventWorkerContext, setFlagProvider, stopEvents, stopMiddlewares, toFileURL, after as unstable_after, cancelAfter as unstable_cancelAfter, useEnvironment, useStore, validateRouterTreeArtifact, version, warnDeprecated, warnUnstable };
package/dist/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_chunk = require('./chunk-BE-pF4vm.js');
3
2
  const require_components_interactive_action_row_ActionRow = require('./components/interactive/action-row/ActionRow.js');
4
3
  const require_utils_error_codes = require('./utils/error-codes.js');
5
- const require_commandkit = require('./commandkit-DTqT800J.js');
4
+ const require_commandkit = require('./commandkit-DoxpAUsW.js');
6
5
  const require_plugins_CompilerPlugin = require('./plugins/CompilerPlugin.js');
7
6
  const require_plugins_RuntimePlugin = require('./plugins/RuntimePlugin.js');
8
7
  const require_utils_constants = require('./utils/constants.js');
@@ -15,6 +14,7 @@ const require_app_commands_helpers = require('./app/commands/helpers.js');
15
14
  const require_app_commands_MessageCommandParser = require('./app/commands/MessageCommandParser.js');
16
15
  const require_app_router_CommandsRouter = require('./app/router/CommandsRouter.js');
17
16
  const require_app_router_EventsRouter = require('./app/router/EventsRouter.js');
17
+ const require_app_router_TreeArtifact = require('./app/router/TreeArtifact.js');
18
18
  const require_version = require('./version.js');
19
19
  const require_components_display_file = require('./components/display/file.js');
20
20
  const require_components_display_separator = require('./components/display/separator.js');
@@ -63,6 +63,7 @@ exports.FeatureFlag = require_commandkit.FeatureFlag;
63
63
  exports.File = require_components_display_file.File;
64
64
  exports.FileUpload = require_commandkit.FileUpload;
65
65
  exports.Fragment = require_commandkit.Fragment;
66
+ exports.HMREventChangeType = require_utils_constants.HMREventChangeType;
66
67
  exports.HMREventType = require_utils_constants.HMREventType;
67
68
  exports.Label = require_commandkit.Label;
68
69
  exports.Logger = require_commandkit.Logger;
@@ -79,6 +80,9 @@ exports.ParagraphInput = require_commandkit.ParagraphInput;
79
80
  exports.Poll = require_components_display_poll.Poll;
80
81
  exports.PollAnswer = require_components_display_poll.PollAnswer;
81
82
  exports.PollQuestion = require_components_display_poll.PollQuestion;
83
+ exports.ROUTER_TREE_ARTIFACT_DIRECTORY = require_app_router_TreeArtifact.ROUTER_TREE_ARTIFACT_DIRECTORY;
84
+ exports.ROUTER_TREE_ARTIFACT_FILE = require_app_router_TreeArtifact.ROUTER_TREE_ARTIFACT_FILE;
85
+ exports.ROUTER_TREE_ARTIFACT_SCHEMA_VERSION = require_app_router_TreeArtifact.ROUTER_TREE_ARTIFACT_SCHEMA_VERSION;
82
86
  exports.RadioGroup = require_commandkit.RadioGroup;
83
87
  exports.RadioGroupOption = require_commandkit.RadioGroupOption;
84
88
  exports.RoleSelectMenu = require_commandkit.RoleSelectMenu;
@@ -101,6 +105,7 @@ exports.createElement = require_commandkit.createElement;
101
105
  exports.jsx = require_commandkit.createElement;
102
106
  exports.jsxs = require_commandkit.createElement;
103
107
  exports.createLogger = require_commandkit.createLogger;
108
+ exports.createRouterTreeArtifact = require_app_router_TreeArtifact.createRouterTreeArtifact;
104
109
  exports.debounce = require_commandkit.debounce;
105
110
  exports.default = require_commandkit.src_default;
106
111
  exports.defer = require_commandkit.defer;
@@ -117,6 +122,7 @@ exports.getCurrentDirectory = require_commandkit.getCurrentDirectory;
117
122
  exports.getElement = require_commandkit.getElement;
118
123
  exports.getEventWorkerContext = require_app_events_EventWorkerContext.getEventWorkerContext;
119
124
  exports.getSourceDirectories = require_commandkit.getSourceDirectories;
125
+ exports.hydrateRouterTreeArtifact = require_app_router_TreeArtifact.hydrateRouterTreeArtifact;
120
126
  exports.isBuildLikeEnvironment = require_utils_constants.isBuildLikeEnvironment;
121
127
  exports.isCommandKitElement = require_commandkit.isCommandKitElement;
122
128
  exports.isCommandWorkerContext = require_commandkit.isCommandWorkerContext;
@@ -141,6 +147,7 @@ exports.unstable_after = require_commandkit.after;
141
147
  exports.unstable_cancelAfter = require_commandkit.cancelAfter;
142
148
  exports.useEnvironment = require_commandkit.useEnvironment;
143
149
  exports.useStore = require_commandkit.useStore;
150
+ exports.validateRouterTreeArtifact = require_app_router_TreeArtifact.validateRouterTreeArtifact;
144
151
  exports.version = require_version.version;
145
152
  exports.warnDeprecated = require_utils_warning.warnDeprecated;
146
153
  exports.warnUnstable = require_utils_warning.warnUnstable;
@@ -1,2 +1,2 @@
1
- import { t as SerializerType } from "../constants-D_sgdBHy.js";
1
+ import { t as SerializerType } from "../constants-B7AfnOFa.js";
2
2
  export { SerializerType };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../src/kv/constants.ts"],"sourcesContent":["export enum SerializerType {\n String,\n Number,\n Boolean,\n Object,\n Date,\n BigInt,\n Null,\n Undefined,\n Array,\n Map,\n Set,\n Buffer,\n RegExp,\n}\n"],"mappings":";;;AAAA,IAAY,iBAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"dotprops.js","names":[],"sources":["../../src/kv/dotprops.ts"],"sourcesContent":["export function getNestedValue(obj: any, path: string): any {\n const keys = path.split('.');\n let current = obj;\n\n for (const key of keys) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = current[key];\n }\n\n return current;\n}\n\nexport function setNestedValue(obj: any, path: string, value: any): void {\n const keys = path.split('.');\n const lastKey = keys.pop()!;\n let current = obj;\n\n for (const key of keys) {\n if (current[key] === null || current[key] === undefined) {\n current[key] = {};\n }\n current = current[key];\n }\n\n current[lastKey] = value;\n}\n"],"mappings":";;;AAAA,SAAgB,eAAe,KAAU,MAAmB;CAC1D,MAAM,OAAO,KAAK,MAAM,IAAI;CAC5B,IAAI,UAAU;AAEd,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,YAAY,QAAQ,YAAY,OAClC;AAEF,YAAU,QAAQ;;AAGpB,QAAO;;AAGT,SAAgB,eAAe,KAAU,MAAc,OAAkB;CACvE,MAAM,OAAO,KAAK,MAAM,IAAI;CAC5B,MAAM,UAAU,KAAK,KAAK;CAC1B,IAAI,UAAU;AAEd,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,QAAQ,SAAS,QAAQ,QAAQ,SAAS,OAC5C,SAAQ,OAAO,EAAE;AAEnB,YAAU,QAAQ;;AAGpB,SAAQ,WAAW"}
1
+ {"version":3,"file":"dotprops.js","names":[],"sources":[],"mappings":""}
package/dist/kv/kv.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { SerializedValue } from "./serde.js";
2
2
  import { DatabaseSync } from "node:sqlite";
3
-
4
3
  //#region src/kv/kv.d.ts
5
4
  /**
6
5
  * Mathematical operators supported by the KV math method
package/dist/kv/kv.js CHANGED
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-BE-pF4vm.js');
3
2
  const require_kv_dotprops = require('./dotprops.js');
4
3
  const require_kv_serde = require('./serde.js');
5
4
  let node_sqlite = require("node:sqlite");
@@ -31,6 +30,7 @@ let node_sqlite = require("node:sqlite");
31
30
  * ```
32
31
  */
33
32
  var KV = class KV {
33
+ options;
34
34
  db;
35
35
  statements = {};
36
36
  /**
package/dist/kv/kv.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"kv.js","names":[],"sources":["../../src/kv/kv.ts"],"sourcesContent":["import { DatabaseSync, StatementSync } from 'node:sqlite';\nimport { deserializer, serializer } from './serde';\nimport { getNestedValue, setNestedValue } from './dotprops';\n\nexport type { SerializedValue } from './serde';\n\n/**\n * Mathematical operators supported by the KV math method\n */\nexport type KvMathOperator = '+' | '-' | '*' | '/' | '^' | '%';\n\n/**\n * Configuration options for the KV store\n */\nexport interface KvOptions {\n /** Enable Write-Ahead Logging for better performance and durability */\n enableWAL?: boolean;\n /** Namespace for the key-value store table */\n namespace?: string;\n}\n\n/**\n * A key-value store implementation using SQLite\n *\n * This class provides a simple, persistent key-value storage solution\n * with support for namespaces, automatic cleanup, iteration, expiration, and JSON serialization.\n *\n * @example\n * ```typescript\n * const kv = new KV('data.db');\n *\n * // Store any JSON-serializable data\n * kv.set('user:123', { name: 'John', age: 30 });\n * kv.set('counter', 42);\n * kv.set('active', true);\n * kv.set('dates', [new Date(), new Date()]);\n *\n * // Use dot notation for nested properties\n * kv.set('user:123.name', 'John');\n * kv.set('user:123.settings.theme', 'dark');\n *\n * // Retrieve data\n * const user = kv.get('user:123'); // { name: 'John', age: 30, settings: { theme: 'dark' } }\n * const name = kv.get('user:123.name'); // 'John'\n * ```\n */\nexport class KV implements Disposable, AsyncDisposable {\n private db: DatabaseSync;\n private statements: Record<string, StatementSync> = {};\n\n /**\n * Creates a new KV store instance\n *\n * @param path - Database file path, buffer, URL, or existing DatabaseSync instance\n * @param options - Configuration options for the KV store\n */\n public constructor(\n path: string | Buffer | URL | DatabaseSync,\n private options: KvOptions = {\n enableWAL: true,\n namespace: 'commandkit_kv',\n },\n ) {\n this.db =\n path instanceof DatabaseSync\n ? path\n : new DatabaseSync(path, { open: true });\n\n if (options.enableWAL) {\n this.db.exec(/* sql */ `PRAGMA journal_mode = WAL;`);\n }\n\n const namespace = this.options.namespace ?? 'commandkit_kv';\n\n this.db.exec(/* sql */ `\n CREATE TABLE IF NOT EXISTS ${namespace} (\n key TEXT PRIMARY KEY,\n value TEXT,\n expires_at INTEGER\n )\n `);\n\n this.statements = {\n get: this.db.prepare(\n /* sql */ `SELECT value, expires_at FROM ${namespace} WHERE key = ?`,\n ),\n set: this.db.prepare(\n /* sql */ `INSERT OR REPLACE INTO ${namespace} (key, value, expires_at) VALUES (?, ?, ?)`,\n ),\n setex: this.db.prepare(\n /* sql */ `INSERT OR REPLACE INTO ${namespace} (key, value, expires_at) VALUES (?, ?, ?)`,\n ),\n delete: this.db.prepare(\n /* sql */ `DELETE FROM ${namespace} WHERE key = ?`,\n ),\n has: this.db.prepare(\n /* sql */ `SELECT COUNT(*) FROM ${namespace} WHERE key = ? AND (expires_at IS NULL OR expires_at > ?)`,\n ),\n keys: this.db.prepare(\n /* sql */ `SELECT key FROM ${namespace} WHERE expires_at IS NULL OR expires_at > ?`,\n ),\n values: this.db.prepare(\n /* sql */ `SELECT value FROM ${namespace} WHERE expires_at IS NULL OR expires_at > ?`,\n ),\n clear: this.db.prepare(/* sql */ `DELETE FROM ${namespace}`),\n count: this.db.prepare(\n /* sql */ `SELECT COUNT(*) FROM ${namespace} WHERE expires_at IS NULL OR expires_at > ?`,\n ),\n all: this.db.prepare(\n /* sql */ `SELECT key, value FROM ${namespace} WHERE expires_at IS NULL OR expires_at > ?`,\n ),\n expire: this.db.prepare(\n /* sql */ `UPDATE ${namespace} SET expires_at = ? WHERE key = ?`,\n ),\n ttl: this.db.prepare(\n /* sql */ `SELECT expires_at FROM ${namespace} WHERE key = ?`,\n ),\n namespaces: this.db.prepare(\n /* sql */ `SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%'`,\n ),\n begin: this.db.prepare(/* sql */ `BEGIN TRANSACTION`),\n commit: this.db.prepare(/* sql */ `COMMIT`),\n rollback: this.db.prepare(/* sql */ `ROLLBACK`),\n };\n }\n\n /**\n * Gets the current timestamp in milliseconds\n */\n private getCurrentTime(): number {\n return Date.now();\n }\n\n /**\n * Checks if the database connection is open\n *\n * @returns `true` if the database is open, `false` otherwise\n */\n public isOpen(): boolean {\n return this.db.isOpen;\n }\n\n /**\n * Gets the underlying SQLite database instance\n *\n * @returns The DatabaseSync instance\n */\n public getDatabase(): DatabaseSync {\n return this.db;\n }\n\n /**\n * Closes the database connection\n */\n public close(): void {\n if (this.db.isOpen) this.db.close();\n }\n\n /**\n * Disposable implementation - closes the database when disposed\n */\n public [Symbol.dispose]() {\n this.close();\n }\n\n /**\n * AsyncDisposable implementation - closes the database when disposed\n */\n public async [Symbol.asyncDispose]() {\n this.close();\n }\n\n /**\n * Retrieves a value by key\n *\n * @param key - The key to retrieve (supports dot notation for nested properties)\n * @returns The value associated with the key, or `undefined` if not found or expired\n *\n * @example\n * ```typescript\n * // Store an object\n * kv.set('user:123', { name: 'John', age: 30, settings: { theme: 'dark' } });\n *\n * // Get the entire object\n * const user = kv.get('user:123');\n * // { name: 'John', age: 30, settings: { theme: 'dark' } }\n *\n * // Get nested properties using dot notation\n * const name = kv.get('user:123.name'); // 'John'\n * const theme = kv.get('user:123.settings.theme'); // 'dark'\n * ```\n */\n public get<T = any>(key: string): T | undefined {\n const result = this.statements.get.get(key);\n\n if (!result) return undefined;\n\n // Check if the key has expired\n if (\n result.expires_at &&\n Number(result.expires_at) <= this.getCurrentTime()\n ) {\n this.delete(key);\n return undefined;\n }\n\n const serialized = JSON.parse(result.value as string);\n const deserialized = deserializer(serialized);\n\n // Handle dot notation for nested properties\n if (key.includes('.')) {\n return getNestedValue(deserialized, key.split('.').slice(1).join('.'));\n }\n\n return deserialized;\n }\n\n /**\n * Sets a key-value pair\n *\n * @param key - The key to set (supports dot notation for nested properties)\n * @param value - The value to associate with the key (any JSON-serializable type)\n *\n * @example\n * ```typescript\n * // Store primitive values\n * kv.set('counter', 42);\n * kv.set('active', true);\n * kv.set('name', 'John');\n *\n * // Store objects\n * kv.set('user:123', { name: 'John', age: 30 });\n *\n * // Store arrays\n * kv.set('tags', ['javascript', 'typescript', 'sqlite']);\n *\n * // Store dates\n * kv.set('created', new Date());\n *\n * // Store maps and sets\n * kv.set('permissions', new Map([['admin', true], ['user', false]]));\n * kv.set('unique_ids', new Set([1, 2, 3, 4, 5]));\n *\n * // Use dot notation for nested properties\n * kv.set('user:123.settings.theme', 'dark');\n * kv.set('user:123.settings.notifications', true);\n * ```\n */\n public set(key: string, value: any): void {\n let serializedValue: string;\n\n if (key.includes('.')) {\n // Handle dot notation for nested properties\n const [baseKey, ...pathParts] = key.split('.');\n const path = pathParts.join('.');\n\n // Get existing value or create new object\n const existing = this.get(baseKey) || {};\n setNestedValue(existing, path, value);\n\n const serialized = serializer(existing);\n serializedValue = JSON.stringify(serialized);\n\n this.statements.set.run(baseKey, serializedValue, null);\n } else {\n const serialized = serializer(value);\n serializedValue = JSON.stringify(serialized);\n\n this.statements.set.run(key, serializedValue, null);\n }\n }\n\n /**\n * Sets a key-value pair with expiration\n *\n * @param key - The key to set (supports dot notation for nested properties)\n * @param value - The value to associate with the key (any JSON-serializable type)\n * @param ttl - Time to live in milliseconds\n *\n * @example\n * ```typescript\n * // Set with 1 hour expiration\n * kv.setex('session:123', { userId: 123, token: 'abc123' }, 60 * 60 * 1000);\n *\n * // Set with 5 minutes expiration\n * kv.setex('temp:data', { cached: true, timestamp: Date.now() }, 5 * 60 * 1000);\n *\n * // Use dot notation with expiration\n * kv.setex('user:123.temp_settings', { theme: 'light' }, 30 * 60 * 1000);\n * ```\n */\n public setex(key: string, value: any, ttl: number): void {\n const expiresAt = this.getCurrentTime() + ttl;\n let serializedValue: string;\n\n if (key.includes('.')) {\n // Handle dot notation for nested properties\n const [baseKey, ...pathParts] = key.split('.');\n const path = pathParts.join('.');\n\n // Get existing value or create new object\n const existing = this.get(baseKey) || {};\n setNestedValue(existing, path, value);\n\n const serialized = serializer(existing);\n serializedValue = JSON.stringify(serialized);\n\n this.statements.setex.run(baseKey, serializedValue, expiresAt);\n } else {\n const serialized = serializer(value);\n serializedValue = JSON.stringify(serialized);\n\n this.statements.setex.run(key, serializedValue, expiresAt);\n }\n }\n\n /**\n * Performs mathematical operations on numeric values in the KV store\n *\n * @param key - The key to perform math operation on (supports dot notation for nested properties)\n * @param operator - The mathematical operator to apply\n * @param value - The value to use in the operation\n * @returns The updated value after the mathematical operation\n * @throws Error if the existing value is not numeric or if the operation is invalid\n *\n * @example\n * ```typescript\n * // Initialize a counter\n * kv.set('counter', 10);\n *\n * // Increment by 5\n * const result1 = kv.math('counter', '+', 5); // 15\n *\n * // Multiply by 2\n * const result2 = kv.math('counter', '*', 2); // 30\n *\n * // Use with bigint\n * kv.set('big_counter', BigInt(1000));\n * const result3 = kv.math('big_counter', '+', BigInt(500)); // 1500n\n *\n * // Use with dot notation\n * kv.set('user:123', { score: 100, level: 5 });\n * const result4 = kv.math('user:123.score', '+', 50); // 150\n * ```\n */\n public math(\n key: string,\n operator: KvMathOperator,\n value: number | bigint,\n ): number | bigint {\n const existingValue = this.get(key);\n\n if (existingValue === undefined) {\n throw new Error(`Key '${key}' does not exist`);\n }\n\n if (\n typeof existingValue !== 'number' &&\n typeof existingValue !== 'bigint'\n ) {\n throw new Error(\n `Value at key '${key}' is not numeric. Expected number or bigint, got ${typeof existingValue}`,\n );\n }\n\n // Handle mixed number/bigint operations by converting to bigint\n const isBigIntOperation =\n typeof existingValue === 'bigint' || typeof value === 'bigint';\n\n const existing = isBigIntOperation\n ? typeof existingValue === 'bigint'\n ? existingValue\n : BigInt(existingValue)\n : (existingValue as number);\n const operand = isBigIntOperation\n ? typeof value === 'bigint'\n ? value\n : BigInt(value)\n : (value as number);\n\n let result: number | bigint;\n\n switch (operator) {\n case '+':\n result = (existing as any) + (operand as any);\n break;\n case '-':\n result = (existing as any) - (operand as any);\n break;\n case '*':\n result = (existing as any) * (operand as any);\n break;\n case '/':\n if (operand === 0 || operand === 0n) {\n throw new Error('Division by zero');\n }\n result = (existing as any) / (operand as any);\n break;\n case '^':\n if (isBigIntOperation && operand < 0n) {\n throw new Error(\n 'Exponentiation with negative exponent is not supported for bigint',\n );\n }\n result = (existing as any) ** (operand as any);\n break;\n case '%':\n if (operand === 0 || operand === 0n) {\n throw new Error('Modulo by zero');\n }\n result = (existing as any) % (operand as any);\n break;\n default:\n throw new Error(`Invalid operator: ${operator}`);\n }\n\n // Update the value in the store\n this.set(key, result);\n\n return result;\n }\n\n /**\n * Sets expiration for an existing key\n *\n * @param key - The key to set expiration for\n * @param ttl - Time to live in milliseconds\n * @returns `true` if the key exists and expiration was set, `false` otherwise\n *\n * @example\n * ```typescript\n * kv.set('user:123', { name: 'John', age: 30 });\n *\n * // Set 30 minute expiration\n * if (kv.expire('user:123', 30 * 60 * 1000)) {\n * console.log('Expiration set successfully');\n * }\n * ```\n */\n public expire(key: string, ttl: number): boolean {\n if (!this.has(key)) return false;\n\n const expiresAt = this.getCurrentTime() + ttl;\n this.statements.expire.run(expiresAt, key);\n return true;\n }\n\n /**\n * Gets the time to live for a key\n *\n * @param key - The key to check\n * @returns Time to live in milliseconds, or `-1` if the key doesn't exist, or `-2` if the key has no expiration\n *\n * @example\n * ```typescript\n * const ttl = kv.ttl('user:123');\n * if (ttl > 0) {\n * console.log(`Key expires in ${ttl}ms`);\n * } else if (ttl === -2) {\n * console.log('Key has no expiration');\n * } else {\n * console.log('Key does not exist');\n * }\n * ```\n */\n public ttl(key: string): number {\n const result = this.statements.ttl.get(key);\n\n if (!result) return -1; // Key doesn't exist\n\n if (!result.expires_at) return -2; // No expiration\n\n const remaining = Number(result.expires_at) - this.getCurrentTime();\n return remaining > 0 ? remaining : -1; // Expired or doesn't exist\n }\n\n /**\n * Deletes a key-value pair\n *\n * @param key - The key to delete\n *\n * @example\n * ```typescript\n * kv.delete('user:123');\n * kv.delete('user:123.settings.theme'); // Delete nested property\n * ```\n */\n public delete(key: string): void {\n this.statements.delete.run(key);\n }\n\n /**\n * Checks if a key exists and is not expired\n *\n * @param key - The key to check\n * @returns `true` if the key exists and is not expired, `false` otherwise\n *\n * @example\n * ```typescript\n * if (kv.has('user:123')) {\n * console.log('User exists and is not expired');\n * }\n *\n * if (kv.has('user:123.settings.theme')) {\n * console.log('Theme setting exists');\n * }\n * ```\n */\n public has(key: string): boolean {\n const result = this.statements.has.get(key, this.getCurrentTime());\n\n return (\n result?.count !== undefined &&\n result.count !== null &&\n Number(result.count) > 0\n );\n }\n\n /**\n * Gets all keys in the current namespace (excluding expired keys)\n *\n * @returns Array of all non-expired keys\n *\n * @example\n * ```typescript\n * const keys = kv.keys();\n * console.log('All keys:', keys);\n * ```\n */\n public keys(): string[] {\n const result = this.statements.keys.all(this.getCurrentTime());\n\n return result.map((row) => row.key as string);\n }\n\n /**\n * Gets all values in the current namespace (excluding expired keys)\n *\n * @returns Array of all non-expired values\n *\n * @example\n * ```typescript\n * const values = kv.values();\n * console.log('All values:', values);\n * ```\n */\n public values(): any[] {\n const result = this.statements.values.all(this.getCurrentTime());\n\n return result.map((row) => {\n const serialized = JSON.parse(row.value as string);\n return deserializer(serialized);\n });\n }\n\n /**\n * Gets the total number of key-value pairs in the current namespace (excluding expired keys)\n *\n * @returns The count of non-expired key-value pairs\n *\n * @example\n * ```typescript\n * const count = kv.count();\n * console.log(`Total entries: ${count}`);\n * ```\n */\n public count(): number {\n const result = this.statements.count.get(this.getCurrentTime());\n\n return Number(result?.count ?? 0);\n }\n\n /**\n * Removes all key-value pairs from the current namespace\n *\n * @example\n * ```typescript\n * kv.clear(); // Removes all entries in current namespace\n * ```\n */\n public clear(): void {\n this.statements.clear.run();\n }\n\n /**\n * Gets all key-value pairs as an object (excluding expired keys)\n *\n * @returns Object with all non-expired key-value pairs\n *\n * @example\n * ```typescript\n * const all = kv.all();\n * console.log('All entries:', all);\n * // Output: { 'key1': value1, 'key2': value2 }\n * ```\n */\n public all(): Record<string, any> {\n const result = this.statements.all.all(this.getCurrentTime());\n\n return Object.fromEntries(\n result.map((row) => {\n const serialized = JSON.parse(row.value as string);\n return [row.key as string, deserializer(serialized)];\n }),\n );\n }\n\n /**\n * Gets all available namespaces (tables) in the database\n *\n * @returns Array of namespace names\n *\n * @example\n * ```typescript\n * const namespaces = kv.namespaces();\n * console.log('Available namespaces:', namespaces);\n * ```\n */\n public namespaces(): string[] {\n const result = this.statements.namespaces.all();\n\n return result.map((row) => row.name as string);\n }\n\n /**\n * Gets the current namespace name\n *\n * @returns The current namespace string\n */\n public getCurrentNamespace(): string {\n return this.options.namespace ?? 'commandkit_kv';\n }\n\n /**\n * Creates a new KV instance with a different namespace\n *\n * @param namespace - The namespace to use for the new instance\n * @returns A new KV instance with the specified namespace\n *\n * @example\n * ```typescript\n * const userKv = kv.namespace('users');\n * const configKv = kv.namespace('config');\n *\n * userKv.set('123', { name: 'John', age: 30 });\n * configKv.set('theme', 'dark');\n * ```\n */\n public namespace(namespace: string): KV {\n return new KV(this.db, {\n enableWAL: this.options.enableWAL,\n namespace,\n });\n }\n\n /**\n * Iterator implementation for iterating over all non-expired key-value pairs\n *\n * @returns Iterator yielding [key, value] tuples\n *\n * @example\n * ```typescript\n * for (const [key, value] of kv) {\n * console.log(`${key}:`, value);\n * }\n *\n * // Or using spread operator\n * const entries = [...kv];\n * ```\n */\n public *[Symbol.iterator](): Iterator<[string, any]> {\n const result = this.statements.all.iterate(this.getCurrentTime());\n\n for (const row of result) {\n const serialized = JSON.parse(row.value as string);\n yield [row.key as string, deserializer(serialized)];\n }\n }\n\n /**\n * Executes a function within a transaction\n *\n * @param fn - Function to execute within the transaction (can be async)\n * @returns The result of the function\n *\n * @example\n * ```typescript\n * // Synchronous transaction\n * kv.transaction(() => {\n * kv.set('user:123', { name: 'John', age: 30 });\n * kv.set('user:456', { name: 'Jane', age: 25 });\n * // If any operation fails, all changes are rolled back\n * });\n *\n * // Async transaction\n * await kv.transaction(async () => {\n * kv.set('user:123', { name: 'John', age: 30 });\n * await someAsyncOperation();\n * kv.set('user:456', { name: 'Jane', age: 25 });\n * // If any operation fails, all changes are rolled back\n * });\n * ```\n */\n public async transaction<T>(fn: () => T | Promise<T>): Promise<T> {\n try {\n // Begin transaction\n this.statements.begin.run();\n\n // Execute the function\n const result = await fn();\n\n // Commit transaction\n this.statements.commit.run();\n\n return result;\n } catch (error) {\n // Rollback transaction on error\n this.statements.rollback.run();\n throw error;\n }\n }\n}\n\n/**\n * Opens a new KV instance\n *\n * @param path - Database file path, buffer, URL, or existing DatabaseSync instance\n * @param options - Configuration options for the KV store\n * @returns A new KV instance\n */\nexport function openKV(\n path: string | Buffer | URL | DatabaseSync = 'commandkit_kv.db',\n options: KvOptions = { enableWAL: true, namespace: 'commandkit_kv' },\n): KV {\n return new KV(path, options);\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"kv.js","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,4 @@
1
- import { t as SerializerType } from "../constants-D_sgdBHy.js";
2
-
1
+ import { t as SerializerType } from "../constants-B7AfnOFa.js";
3
2
  //#region src/kv/serde.d.ts
4
3
  interface SerializedValue {
5
4
  t: SerializerType;