@copilotkit/react-textarea 0.28.0-alpha.8 → 0.28.0-alpha.9

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 (339) hide show
  1. package/.turbo/turbo-build.log +341 -379
  2. package/CHANGELOG.md +12 -0
  3. package/dist/chunk-224UKA7C.mjs +9 -4
  4. package/dist/chunk-224UKA7C.mjs.map +1 -1
  5. package/dist/chunk-2C7O2EVM.mjs +4 -4
  6. package/dist/chunk-2C7O2EVM.mjs.map +1 -1
  7. package/dist/chunk-2QDCE7PD.mjs +6 -3
  8. package/dist/chunk-2QDCE7PD.mjs.map +1 -1
  9. package/dist/chunk-3PQ7GSFE.mjs +4 -4
  10. package/dist/chunk-3PQ7GSFE.mjs.map +1 -1
  11. package/dist/chunk-4NHVQZ67.mjs +6 -5
  12. package/dist/chunk-4NHVQZ67.mjs.map +1 -1
  13. package/dist/chunk-4OJ3H65F.mjs +5 -2
  14. package/dist/chunk-4OJ3H65F.mjs.map +1 -1
  15. package/dist/chunk-5J3UZV77.mjs +23 -11
  16. package/dist/chunk-5J3UZV77.mjs.map +1 -1
  17. package/dist/chunk-5UNJXFUO.mjs +4 -4
  18. package/dist/chunk-5UNJXFUO.mjs.map +1 -1
  19. package/dist/chunk-72P3KOHZ.mjs +17 -7
  20. package/dist/chunk-72P3KOHZ.mjs.map +1 -1
  21. package/dist/chunk-7LSRNPNI.mjs +4 -4
  22. package/dist/chunk-7LSRNPNI.mjs.map +1 -1
  23. package/dist/chunk-7SUZ6CXM.mjs +15 -6
  24. package/dist/chunk-7SUZ6CXM.mjs.map +1 -1
  25. package/dist/chunk-AZHILHKM.mjs +21 -8
  26. package/dist/chunk-AZHILHKM.mjs.map +1 -1
  27. package/dist/chunk-B6TKVDDY.mjs +58 -22
  28. package/dist/chunk-B6TKVDDY.mjs.map +1 -1
  29. package/dist/chunk-BBZ7AWOB.mjs +8 -4
  30. package/dist/chunk-BBZ7AWOB.mjs.map +1 -1
  31. package/dist/chunk-DE5K76I2.mjs +0 -2
  32. package/dist/chunk-DE5K76I2.mjs.map +1 -1
  33. package/dist/chunk-DRV2FOHZ.mjs +11 -6
  34. package/dist/chunk-DRV2FOHZ.mjs.map +1 -1
  35. package/dist/chunk-ECR45NSD.mjs +7 -4
  36. package/dist/chunk-ECR45NSD.mjs.map +1 -1
  37. package/dist/chunk-FJNUPSQK.mjs +16 -5
  38. package/dist/chunk-FJNUPSQK.mjs.map +1 -1
  39. package/dist/chunk-FP2EKU3L.mjs +4 -4
  40. package/dist/chunk-FP2EKU3L.mjs.map +1 -1
  41. package/dist/chunk-GQN2HYFJ.mjs +4 -4
  42. package/dist/chunk-GQN2HYFJ.mjs.map +1 -1
  43. package/dist/chunk-H4VKQGVU.mjs +0 -2
  44. package/dist/chunk-H4VKQGVU.mjs.map +1 -1
  45. package/dist/chunk-IU3WTXLQ.mjs +0 -2
  46. package/dist/chunk-IU3WTXLQ.mjs.map +1 -1
  47. package/dist/chunk-JJLQVT7S.mjs +6 -3
  48. package/dist/chunk-JJLQVT7S.mjs.map +1 -1
  49. package/dist/chunk-KDVMG3XF.mjs +5 -2
  50. package/dist/chunk-KDVMG3XF.mjs.map +1 -1
  51. package/dist/chunk-KFQZHRPJ.mjs +15 -8
  52. package/dist/chunk-KFQZHRPJ.mjs.map +1 -1
  53. package/dist/chunk-KNQIEOFP.mjs +3 -2
  54. package/dist/chunk-KNQIEOFP.mjs.map +1 -1
  55. package/dist/chunk-L7VVZH4Q.mjs +0 -2
  56. package/dist/chunk-L7VVZH4Q.mjs.map +1 -1
  57. package/dist/chunk-LQ2OWQU7.mjs +11 -7
  58. package/dist/chunk-LQ2OWQU7.mjs.map +1 -1
  59. package/dist/chunk-LYB4B6MK.mjs +6 -5
  60. package/dist/chunk-LYB4B6MK.mjs.map +1 -1
  61. package/dist/chunk-M2DR4KVB.mjs +6 -3
  62. package/dist/chunk-M2DR4KVB.mjs.map +1 -1
  63. package/dist/chunk-MMVDU6DF.mjs +0 -2
  64. package/dist/chunk-MMVDU6DF.mjs.map +1 -1
  65. package/dist/chunk-MRXNTQOX.mjs +6 -2
  66. package/dist/chunk-MRXNTQOX.mjs.map +1 -1
  67. package/dist/chunk-P4QVFRLY.mjs +17 -7
  68. package/dist/chunk-P4QVFRLY.mjs.map +1 -1
  69. package/dist/chunk-PTZVE6NC.mjs +22 -8
  70. package/dist/chunk-PTZVE6NC.mjs.map +1 -1
  71. package/dist/chunk-QCPS6IYI.mjs +15 -6
  72. package/dist/chunk-QCPS6IYI.mjs.map +1 -1
  73. package/dist/chunk-RKQ6RTZM.mjs +5 -2
  74. package/dist/chunk-RKQ6RTZM.mjs.map +1 -1
  75. package/dist/chunk-RT4UTBH3.mjs +15 -6
  76. package/dist/chunk-RT4UTBH3.mjs.map +1 -1
  77. package/dist/chunk-RUV6NBIF.mjs +0 -2
  78. package/dist/chunk-RUV6NBIF.mjs.map +1 -1
  79. package/dist/chunk-SNQEBH5I.mjs +24 -10
  80. package/dist/chunk-SNQEBH5I.mjs.map +1 -1
  81. package/dist/chunk-SX6NY5FW.mjs +11 -6
  82. package/dist/chunk-SX6NY5FW.mjs.map +1 -1
  83. package/dist/chunk-T6MTDQZ7.mjs +4 -4
  84. package/dist/chunk-T6MTDQZ7.mjs.map +1 -1
  85. package/dist/chunk-VB4VNCIQ.mjs +28 -12
  86. package/dist/chunk-VB4VNCIQ.mjs.map +1 -1
  87. package/dist/chunk-VPEH6V7T.mjs +12 -6
  88. package/dist/chunk-VPEH6V7T.mjs.map +1 -1
  89. package/dist/chunk-WADHCMPK.mjs +0 -2
  90. package/dist/chunk-WADHCMPK.mjs.map +1 -1
  91. package/dist/chunk-WFTAAA7R.mjs +16 -8
  92. package/dist/chunk-WFTAAA7R.mjs.map +1 -1
  93. package/dist/chunk-WJHSY5T6.mjs +0 -2
  94. package/dist/chunk-WJHSY5T6.mjs.map +1 -1
  95. package/dist/chunk-WTASPE2W.mjs +41 -22
  96. package/dist/chunk-WTASPE2W.mjs.map +1 -1
  97. package/dist/chunk-XW3ICO4S.mjs +10 -4
  98. package/dist/chunk-XW3ICO4S.mjs.map +1 -1
  99. package/dist/components/base-copilot-textarea/base-copilot-textarea.js +379 -257
  100. package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
  101. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +39 -35
  102. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs.map +1 -1
  103. package/dist/components/base-copilot-textarea/render-element.js +32 -11
  104. package/dist/components/base-copilot-textarea/render-element.js.map +1 -1
  105. package/dist/components/base-copilot-textarea/render-element.mjs +7 -3
  106. package/dist/components/base-copilot-textarea/render-element.mjs.map +1 -1
  107. package/dist/components/base-copilot-textarea/render-placeholder.js +29 -8
  108. package/dist/components/base-copilot-textarea/render-placeholder.js.map +1 -1
  109. package/dist/components/base-copilot-textarea/render-placeholder.mjs +7 -3
  110. package/dist/components/base-copilot-textarea/render-placeholder.mjs.map +1 -1
  111. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js +44 -17
  112. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js.map +1 -1
  113. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +8 -4
  114. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs.map +1 -1
  115. package/dist/components/base-copilot-textarea/use-add-branding-css.js +29 -7
  116. package/dist/components/base-copilot-textarea/use-add-branding-css.js.map +1 -1
  117. package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +7 -3
  118. package/dist/components/base-copilot-textarea/use-add-branding-css.mjs.map +1 -1
  119. package/dist/components/copilot-textarea/copilot-textarea.js +414 -272
  120. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  121. package/dist/components/copilot-textarea/copilot-textarea.mjs +48 -44
  122. package/dist/components/copilot-textarea/copilot-textarea.mjs.map +1 -1
  123. package/dist/components/hovering-toolbar/hovering-editor-provider.js +35 -12
  124. package/dist/components/hovering-toolbar/hovering-editor-provider.js.map +1 -1
  125. package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +9 -3
  126. package/dist/components/hovering-toolbar/hovering-editor-provider.mjs.map +1 -1
  127. package/dist/components/hovering-toolbar/hovering-toolbar-components.js +66 -36
  128. package/dist/components/hovering-toolbar/hovering-toolbar-components.js.map +1 -1
  129. package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +15 -3
  130. package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs.map +1 -1
  131. package/dist/components/hovering-toolbar/hovering-toolbar.js +247 -179
  132. package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
  133. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +22 -18
  134. package/dist/components/hovering-toolbar/hovering-toolbar.mjs.map +1 -1
  135. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +180 -129
  136. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
  137. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +16 -12
  138. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs.map +1 -1
  139. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +185 -131
  140. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
  141. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +17 -13
  142. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs.map +1 -1
  143. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js +71 -55
  144. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js.map +1 -1
  145. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs +11 -5
  146. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs.map +1 -1
  147. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +185 -131
  148. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
  149. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +18 -14
  150. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs.map +1 -1
  151. package/dist/components/index.js +418 -273
  152. package/dist/components/index.js.map +1 -1
  153. package/dist/components/index.mjs +52 -45
  154. package/dist/components/index.mjs.map +1 -1
  155. package/dist/components/manual-ui/chip-with-icon.js +31 -9
  156. package/dist/components/manual-ui/chip-with-icon.js.map +1 -1
  157. package/dist/components/manual-ui/chip-with-icon.mjs +6 -5
  158. package/dist/components/manual-ui/chip-with-icon.mjs.map +1 -1
  159. package/dist/components/source-search-box/source-search-box.js +104 -72
  160. package/dist/components/source-search-box/source-search-box.js.map +1 -1
  161. package/dist/components/source-search-box/source-search-box.mjs +12 -6
  162. package/dist/components/source-search-box/source-search-box.mjs.map +1 -1
  163. package/dist/components/ui/button.js +56 -40
  164. package/dist/components/ui/button.js.map +1 -1
  165. package/dist/components/ui/button.mjs +10 -4
  166. package/dist/components/ui/button.mjs.map +1 -1
  167. package/dist/components/ui/card.js +70 -50
  168. package/dist/components/ui/card.js.map +1 -1
  169. package/dist/components/ui/card.mjs +18 -7
  170. package/dist/components/ui/card.mjs.map +1 -1
  171. package/dist/components/ui/command.js +139 -97
  172. package/dist/components/ui/command.js.map +1 -1
  173. package/dist/components/ui/command.mjs +26 -5
  174. package/dist/components/ui/command.mjs.map +1 -1
  175. package/dist/components/ui/dialog.js +90 -69
  176. package/dist/components/ui/dialog.js.map +1 -1
  177. package/dist/components/ui/dialog.mjs +21 -4
  178. package/dist/components/ui/dialog.mjs.map +1 -1
  179. package/dist/components/ui/label.js +55 -40
  180. package/dist/components/ui/label.js.map +1 -1
  181. package/dist/components/ui/label.mjs +9 -4
  182. package/dist/components/ui/label.mjs.map +1 -1
  183. package/dist/components/ui/separator.js +54 -39
  184. package/dist/components/ui/separator.js.map +1 -1
  185. package/dist/components/ui/separator.mjs +15 -8
  186. package/dist/components/ui/separator.mjs.map +1 -1
  187. package/dist/components/ui/textarea.js +50 -35
  188. package/dist/components/ui/textarea.js.map +1 -1
  189. package/dist/components/ui/textarea.mjs +13 -7
  190. package/dist/components/ui/textarea.mjs.map +1 -1
  191. package/dist/context/index.js +17 -2
  192. package/dist/context/index.js.map +1 -1
  193. package/dist/context/index.mjs +1 -2
  194. package/dist/context/index.mjs.map +1 -1
  195. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js +43 -18
  196. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js.map +1 -1
  197. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +10 -6
  198. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs.map +1 -1
  199. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.js +50 -25
  200. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.js.map +1 -1
  201. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +8 -4
  202. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs.map +1 -1
  203. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js +62 -29
  204. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
  205. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +9 -5
  206. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs.map +1 -1
  207. package/dist/hooks/index.js +17 -2
  208. package/dist/hooks/index.js.map +1 -1
  209. package/dist/hooks/index.mjs +1 -2
  210. package/dist/hooks/index.mjs.map +1 -1
  211. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +35 -11
  212. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
  213. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +8 -4
  214. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +1 -1
  215. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +38 -14
  216. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
  217. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +8 -4
  218. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs.map +1 -1
  219. package/dist/hooks/misc/use-autosize-textarea.js +25 -7
  220. package/dist/hooks/misc/use-autosize-textarea.js.map +1 -1
  221. package/dist/hooks/misc/use-autosize-textarea.mjs +7 -3
  222. package/dist/hooks/misc/use-autosize-textarea.mjs.map +1 -1
  223. package/dist/index.js +422 -275
  224. package/dist/index.js.map +1 -1
  225. package/dist/index.mjs +62 -49
  226. package/dist/index.mjs.map +1 -1
  227. package/dist/lib/debouncer.js +27 -5
  228. package/dist/lib/debouncer.js.map +1 -1
  229. package/dist/lib/debouncer.mjs +7 -3
  230. package/dist/lib/debouncer.mjs.map +1 -1
  231. package/dist/lib/editor-to-text.js +30 -8
  232. package/dist/lib/editor-to-text.js.map +1 -1
  233. package/dist/lib/editor-to-text.mjs +7 -3
  234. package/dist/lib/editor-to-text.mjs.map +1 -1
  235. package/dist/lib/get-text-around-cursor.js +49 -24
  236. package/dist/lib/get-text-around-cursor.js.map +1 -1
  237. package/dist/lib/get-text-around-cursor.mjs +13 -3
  238. package/dist/lib/get-text-around-cursor.mjs.map +1 -1
  239. package/dist/lib/retry.js +27 -4
  240. package/dist/lib/retry.js.map +1 -1
  241. package/dist/lib/retry.mjs +7 -3
  242. package/dist/lib/retry.mjs.map +1 -1
  243. package/dist/lib/slatejs-edits/add-autocompletions.js +29 -7
  244. package/dist/lib/slatejs-edits/add-autocompletions.js.map +1 -1
  245. package/dist/lib/slatejs-edits/add-autocompletions.mjs +7 -3
  246. package/dist/lib/slatejs-edits/add-autocompletions.mjs.map +1 -1
  247. package/dist/lib/slatejs-edits/clear-autocompletions.js +31 -9
  248. package/dist/lib/slatejs-edits/clear-autocompletions.js.map +1 -1
  249. package/dist/lib/slatejs-edits/clear-autocompletions.mjs +7 -3
  250. package/dist/lib/slatejs-edits/clear-autocompletions.mjs.map +1 -1
  251. package/dist/lib/slatejs-edits/replace-text.js +32 -10
  252. package/dist/lib/slatejs-edits/replace-text.js.map +1 -1
  253. package/dist/lib/slatejs-edits/replace-text.mjs +7 -3
  254. package/dist/lib/slatejs-edits/replace-text.mjs.map +1 -1
  255. package/dist/lib/slatejs-edits/with-partial-history.js +42 -19
  256. package/dist/lib/slatejs-edits/with-partial-history.js.map +1 -1
  257. package/dist/lib/slatejs-edits/with-partial-history.mjs +9 -3
  258. package/dist/lib/slatejs-edits/with-partial-history.mjs.map +1 -1
  259. package/dist/lib/stream-promise-flatten.js +27 -5
  260. package/dist/lib/stream-promise-flatten.js.map +1 -1
  261. package/dist/lib/stream-promise-flatten.mjs +7 -3
  262. package/dist/lib/stream-promise-flatten.mjs.map +1 -1
  263. package/dist/lib/utils.js +44 -16
  264. package/dist/lib/utils.js.map +1 -1
  265. package/dist/lib/utils.mjs +17 -3
  266. package/dist/lib/utils.mjs.map +1 -1
  267. package/dist/lib/utils.test.js +1 -2
  268. package/dist/lib/utils.test.js.map +1 -1
  269. package/dist/lib/utils.test.mjs +0 -1
  270. package/dist/lib/utils.test.mjs.map +1 -1
  271. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.js +17 -2
  272. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.js.map +1 -1
  273. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs +0 -2
  274. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs.map +1 -1
  275. package/dist/types/autosuggestions-config/autosuggestions-config.js +35 -9
  276. package/dist/types/autosuggestions-config/autosuggestions-config.js.map +1 -1
  277. package/dist/types/autosuggestions-config/autosuggestions-config.mjs +12 -8
  278. package/dist/types/autosuggestions-config/autosuggestions-config.mjs.map +1 -1
  279. package/dist/types/autosuggestions-config/editing-api-config.js +31 -6
  280. package/dist/types/autosuggestions-config/editing-api-config.js.map +1 -1
  281. package/dist/types/autosuggestions-config/editing-api-config.mjs +11 -3
  282. package/dist/types/autosuggestions-config/editing-api-config.mjs.map +1 -1
  283. package/dist/types/autosuggestions-config/index.js +35 -9
  284. package/dist/types/autosuggestions-config/index.js.map +1 -1
  285. package/dist/types/autosuggestions-config/index.mjs +13 -9
  286. package/dist/types/autosuggestions-config/index.mjs.map +1 -1
  287. package/dist/types/autosuggestions-config/insertions-api-config.js +31 -6
  288. package/dist/types/autosuggestions-config/insertions-api-config.js.map +1 -1
  289. package/dist/types/autosuggestions-config/insertions-api-config.mjs +11 -3
  290. package/dist/types/autosuggestions-config/insertions-api-config.mjs.map +1 -1
  291. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.js +17 -2
  292. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.js.map +1 -1
  293. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs +0 -2
  294. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs.map +1 -1
  295. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.js +17 -2
  296. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.js.map +1 -1
  297. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs +0 -2
  298. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs.map +1 -1
  299. package/dist/types/autosuggestions-config/suggestions-api-config.js +31 -6
  300. package/dist/types/autosuggestions-config/suggestions-api-config.js.map +1 -1
  301. package/dist/types/autosuggestions-config/suggestions-api-config.mjs +11 -3
  302. package/dist/types/autosuggestions-config/suggestions-api-config.mjs.map +1 -1
  303. package/dist/types/base/autosuggestion-state.js +17 -2
  304. package/dist/types/base/autosuggestion-state.js.map +1 -1
  305. package/dist/types/base/autosuggestion-state.mjs +0 -2
  306. package/dist/types/base/autosuggestion-state.mjs.map +1 -1
  307. package/dist/types/base/autosuggestions-bare-function.js +17 -2
  308. package/dist/types/base/autosuggestions-bare-function.js.map +1 -1
  309. package/dist/types/base/autosuggestions-bare-function.mjs +0 -2
  310. package/dist/types/base/autosuggestions-bare-function.mjs.map +1 -1
  311. package/dist/types/base/base-autosuggestions-config.js +29 -7
  312. package/dist/types/base/base-autosuggestions-config.js.map +1 -1
  313. package/dist/types/base/base-autosuggestions-config.mjs +7 -3
  314. package/dist/types/base/base-autosuggestions-config.mjs.map +1 -1
  315. package/dist/types/base/base-copilot-textarea-props.js +17 -2
  316. package/dist/types/base/base-copilot-textarea-props.js.map +1 -1
  317. package/dist/types/base/base-copilot-textarea-props.mjs +0 -2
  318. package/dist/types/base/base-copilot-textarea-props.mjs.map +1 -1
  319. package/dist/types/base/custom-editor.js +17 -2
  320. package/dist/types/base/custom-editor.js.map +1 -1
  321. package/dist/types/base/custom-editor.mjs +0 -2
  322. package/dist/types/base/custom-editor.mjs.map +1 -1
  323. package/dist/types/base/editor-autocomplete-state.js +32 -8
  324. package/dist/types/base/editor-autocomplete-state.js.map +1 -1
  325. package/dist/types/base/editor-autocomplete-state.mjs +8 -4
  326. package/dist/types/base/editor-autocomplete-state.mjs.map +1 -1
  327. package/dist/types/base/index.js +30 -6
  328. package/dist/types/base/index.js.map +1 -1
  329. package/dist/types/base/index.mjs +8 -4
  330. package/dist/types/base/index.mjs.map +1 -1
  331. package/dist/types/html-copilot-textarea-element.js +17 -2
  332. package/dist/types/html-copilot-textarea-element.js.map +1 -1
  333. package/dist/types/html-copilot-textarea-element.mjs +1 -2
  334. package/dist/types/html-copilot-textarea-element.mjs.map +1 -1
  335. package/dist/types/index.js +37 -10
  336. package/dist/types/index.js.map +1 -1
  337. package/dist/types/index.mjs +18 -11
  338. package/dist/types/index.mjs.map +1 -1
  339. package/package.json +8 -8
@@ -1,46 +1,53 @@
1
- import '../chunk-MMVDU6DF.mjs';
2
- export { CopilotTextarea } from '../chunk-SNQEBH5I.mjs';
3
- import '../chunk-RT4UTBH3.mjs';
4
- import '../chunk-QCPS6IYI.mjs';
5
- import '../chunk-RUV6NBIF.mjs';
6
- import '../chunk-AZHILHKM.mjs';
7
- import '../chunk-4OJ3H65F.mjs';
8
- import '../chunk-RKQ6RTZM.mjs';
9
- import '../chunk-KDVMG3XF.mjs';
10
- export { BaseCopilotTextarea } from '../chunk-B6TKVDDY.mjs';
11
- import '../chunk-DRV2FOHZ.mjs';
12
- import '../chunk-4NHVQZ67.mjs';
13
- import '../chunk-VPEH6V7T.mjs';
14
- import '../chunk-2C7O2EVM.mjs';
15
- import '../chunk-GQN2HYFJ.mjs';
16
- import '../chunk-5UNJXFUO.mjs';
17
- import '../chunk-72P3KOHZ.mjs';
18
- import '../chunk-JJLQVT7S.mjs';
19
- import '../chunk-LQ2OWQU7.mjs';
20
- import '../chunk-7LSRNPNI.mjs';
21
- import '../chunk-5J3UZV77.mjs';
22
- import '../chunk-L7VVZH4Q.mjs';
23
- import '../chunk-BBZ7AWOB.mjs';
24
- import '../chunk-VB4VNCIQ.mjs';
25
- import '../chunk-SX6NY5FW.mjs';
26
- import '../chunk-3PQ7GSFE.mjs';
27
- import '../chunk-WFTAAA7R.mjs';
28
- import '../chunk-KFQZHRPJ.mjs';
29
- import '../chunk-LYB4B6MK.mjs';
30
- import '../chunk-P4QVFRLY.mjs';
31
- import '../chunk-FJNUPSQK.mjs';
32
- import '../chunk-WTASPE2W.mjs';
33
- import '../chunk-PTZVE6NC.mjs';
34
- import '../chunk-2QDCE7PD.mjs';
35
- import '../chunk-7SUZ6CXM.mjs';
36
- import '../chunk-WJHSY5T6.mjs';
37
- import '../chunk-FP2EKU3L.mjs';
38
- import '../chunk-224UKA7C.mjs';
39
- import '../chunk-XW3ICO4S.mjs';
40
- import '../chunk-M2DR4KVB.mjs';
41
- import '../chunk-T6MTDQZ7.mjs';
42
- import '../chunk-ECR45NSD.mjs';
43
- import '../chunk-KNQIEOFP.mjs';
44
- import '../chunk-MRXNTQOX.mjs';
45
- //# sourceMappingURL=out.js.map
1
+ import "../chunk-MMVDU6DF.mjs";
2
+ import {
3
+ CopilotTextarea
4
+ } from "../chunk-SNQEBH5I.mjs";
5
+ import "../chunk-RT4UTBH3.mjs";
6
+ import "../chunk-QCPS6IYI.mjs";
7
+ import "../chunk-RUV6NBIF.mjs";
8
+ import "../chunk-AZHILHKM.mjs";
9
+ import "../chunk-4OJ3H65F.mjs";
10
+ import "../chunk-RKQ6RTZM.mjs";
11
+ import "../chunk-KDVMG3XF.mjs";
12
+ import {
13
+ BaseCopilotTextarea
14
+ } from "../chunk-B6TKVDDY.mjs";
15
+ import "../chunk-DRV2FOHZ.mjs";
16
+ import "../chunk-4NHVQZ67.mjs";
17
+ import "../chunk-VPEH6V7T.mjs";
18
+ import "../chunk-2C7O2EVM.mjs";
19
+ import "../chunk-GQN2HYFJ.mjs";
20
+ import "../chunk-5UNJXFUO.mjs";
21
+ import "../chunk-72P3KOHZ.mjs";
22
+ import "../chunk-JJLQVT7S.mjs";
23
+ import "../chunk-LQ2OWQU7.mjs";
24
+ import "../chunk-7LSRNPNI.mjs";
25
+ import "../chunk-5J3UZV77.mjs";
26
+ import "../chunk-L7VVZH4Q.mjs";
27
+ import "../chunk-BBZ7AWOB.mjs";
28
+ import "../chunk-VB4VNCIQ.mjs";
29
+ import "../chunk-SX6NY5FW.mjs";
30
+ import "../chunk-3PQ7GSFE.mjs";
31
+ import "../chunk-WFTAAA7R.mjs";
32
+ import "../chunk-KFQZHRPJ.mjs";
33
+ import "../chunk-LYB4B6MK.mjs";
34
+ import "../chunk-P4QVFRLY.mjs";
35
+ import "../chunk-FJNUPSQK.mjs";
36
+ import "../chunk-WTASPE2W.mjs";
37
+ import "../chunk-PTZVE6NC.mjs";
38
+ import "../chunk-2QDCE7PD.mjs";
39
+ import "../chunk-7SUZ6CXM.mjs";
40
+ import "../chunk-WJHSY5T6.mjs";
41
+ import "../chunk-FP2EKU3L.mjs";
42
+ import "../chunk-224UKA7C.mjs";
43
+ import "../chunk-XW3ICO4S.mjs";
44
+ import "../chunk-M2DR4KVB.mjs";
45
+ import "../chunk-T6MTDQZ7.mjs";
46
+ import "../chunk-ECR45NSD.mjs";
47
+ import "../chunk-KNQIEOFP.mjs";
48
+ import "../chunk-MRXNTQOX.mjs";
49
+ export {
50
+ BaseCopilotTextarea,
51
+ CopilotTextarea
52
+ };
46
53
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,16 +1,38 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4
19
 
5
20
  // src/components/manual-ui/chip-with-icon.tsx
21
+ var chip_with_icon_exports = {};
22
+ __export(chip_with_icon_exports, {
23
+ ChipWithIcon: () => ChipWithIcon
24
+ });
25
+ module.exports = __toCommonJS(chip_with_icon_exports);
26
+ var import_jsx_runtime = require("react/jsx-runtime");
6
27
  var ChipWithIcon = ({ label, onDelete, iconUrl }) => {
7
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white", children: [
8
- iconUrl && /* @__PURE__ */ jsxRuntime.jsx("img", { src: iconUrl, alt: "icon", className: "w-4 h-4 rounded-full mr-2" }),
28
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white", children: [
29
+ iconUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: iconUrl, alt: "icon", className: "w-4 h-4 rounded-full mr-2" }),
9
30
  label,
10
- /* @__PURE__ */ jsxRuntime.jsx("button", { className: "ml-2 text-white hover:text-gray-200 focus:outline-none", onClick: onDelete, children: "x" })
31
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "ml-2 text-white hover:text-gray-200 focus:outline-none", onClick: onDelete, children: "x" })
11
32
  ] });
12
33
  };
13
-
14
- exports.ChipWithIcon = ChipWithIcon;
15
- //# sourceMappingURL=out.js.map
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ ChipWithIcon
37
+ });
16
38
  //# sourceMappingURL=chip-with-icon.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/manual-ui/chip-with-icon.tsx"],"names":[],"mappings":";AAQI,SACc,KADd;AAFG,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,QAAQ,MAAyB;AAC/E,SACE,qBAAC,UAAK,WAAU,+FACb;AAAA,eAAW,oBAAC,SAAI,KAAK,SAAS,KAAI,QAAO,WAAU,6BAA4B;AAAA,IAC/E;AAAA,IACD,oBAAC,YAAO,WAAU,0DAAyD,SAAS,UAAU,eAE9F;AAAA,KACF;AAEJ","sourcesContent":["export interface ChipWithIconProps {\n label: string;\n onDelete: () => void;\n iconUrl: string;\n}\n\nexport const ChipWithIcon = ({ label, onDelete, iconUrl }: ChipWithIconProps) => {\n return (\n <span className=\"inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white\">\n {iconUrl && <img src={iconUrl} alt=\"icon\" className=\"w-4 h-4 rounded-full mr-2\" />}\n {label}\n <button className=\"ml-2 text-white hover:text-gray-200 focus:outline-none\" onClick={onDelete}>\n x\n </button>\n </span>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../../src/components/manual-ui/chip-with-icon.tsx"],"sourcesContent":["export interface ChipWithIconProps {\n label: string;\n onDelete: () => void;\n iconUrl: string;\n}\n\nexport const ChipWithIcon = ({ label, onDelete, iconUrl }: ChipWithIconProps) => {\n return (\n <span className=\"inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white\">\n {iconUrl && <img src={iconUrl} alt=\"icon\" className=\"w-4 h-4 rounded-full mr-2\" />}\n {label}\n <button className=\"ml-2 text-white hover:text-gray-200 focus:outline-none\" onClick={onDelete}>\n x\n </button>\n </span>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQI;AAFG,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,QAAQ,MAAyB;AAC/E,SACE,6CAAC,UAAK,WAAU,+FACb;AAAA,eAAW,4CAAC,SAAI,KAAK,SAAS,KAAI,QAAO,WAAU,6BAA4B;AAAA,IAC/E;AAAA,IACD,4CAAC,YAAO,WAAU,0DAAyD,SAAS,UAAU,eAE9F;AAAA,KACF;AAEJ;","names":[]}
@@ -1,6 +1,7 @@
1
- import '../../chunk-MRXNTQOX.mjs';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import "../../chunk-MRXNTQOX.mjs";
3
2
 
3
+ // src/components/manual-ui/chip-with-icon.tsx
4
+ import { jsx, jsxs } from "react/jsx-runtime";
4
5
  var ChipWithIcon = ({ label, onDelete, iconUrl }) => {
5
6
  return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white", children: [
6
7
  iconUrl && /* @__PURE__ */ jsx("img", { src: iconUrl, alt: "icon", className: "w-4 h-4 rounded-full mr-2" }),
@@ -8,7 +9,7 @@ var ChipWithIcon = ({ label, onDelete, iconUrl }) => {
8
9
  /* @__PURE__ */ jsx("button", { className: "ml-2 text-white hover:text-gray-200 focus:outline-none", onClick: onDelete, children: "x" })
9
10
  ] });
10
11
  };
11
-
12
- export { ChipWithIcon };
13
- //# sourceMappingURL=out.js.map
12
+ export {
13
+ ChipWithIcon
14
+ };
14
15
  //# sourceMappingURL=chip-with-icon.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/manual-ui/chip-with-icon.tsx"],"names":[],"mappings":";;;AAQI,SACc,KADd;AAFG,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,QAAQ,MAAyB;AAC/E,SACE,qBAAC,UAAK,WAAU,+FACb;AAAA,eAAW,oBAAC,SAAI,KAAK,SAAS,KAAI,QAAO,WAAU,6BAA4B;AAAA,IAC/E;AAAA,IACD,oBAAC,YAAO,WAAU,0DAAyD,SAAS,UAAU,eAE9F;AAAA,KACF;AAEJ","sourcesContent":["export interface ChipWithIconProps {\n label: string;\n onDelete: () => void;\n iconUrl: string;\n}\n\nexport const ChipWithIcon = ({ label, onDelete, iconUrl }: ChipWithIconProps) => {\n return (\n <span className=\"inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white\">\n {iconUrl && <img src={iconUrl} alt=\"icon\" className=\"w-4 h-4 rounded-full mr-2\" />}\n {label}\n <button className=\"ml-2 text-white hover:text-gray-200 focus:outline-none\" onClick={onDelete}>\n x\n </button>\n </span>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../../src/components/manual-ui/chip-with-icon.tsx"],"sourcesContent":["export interface ChipWithIconProps {\n label: string;\n onDelete: () => void;\n iconUrl: string;\n}\n\nexport const ChipWithIcon = ({ label, onDelete, iconUrl }: ChipWithIconProps) => {\n return (\n <span className=\"inline-flex items-center px-3 py-1 rounded-full bg-slate-200 text-sm font-medium text-white\">\n {iconUrl && <img src={iconUrl} alt=\"icon\" className=\"w-4 h-4 rounded-full mr-2\" />}\n {label}\n <button className=\"ml-2 text-white hover:text-gray-200 focus:outline-none\" onClick={onDelete}>\n x\n </button>\n </span>\n );\n};\n"],"mappings":";;;AAQI,SACc,KADd;AAFG,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,QAAQ,MAAyB;AAC/E,SACE,qBAAC,UAAK,WAAU,+FACb;AAAA,eAAW,oBAAC,SAAI,KAAK,SAAS,KAAI,QAAO,WAAU,6BAA4B;AAAA,IAC/E;AAAA,IACD,oBAAC,YAAO,WAAU,0DAAyD,SAAS,UAAU,eAE9F;AAAA,KACF;AAEJ;","names":[]}
@@ -1,34 +1,10 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var cmdk = require('cmdk');
5
- var clsx = require('clsx');
6
- var nanoid = require('nanoid');
7
- var tailwindMerge = require('tailwind-merge');
8
- var jsxRuntime = require('react/jsx-runtime');
9
-
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
-
1
+ "use strict";
2
+ var __create = Object.create;
30
3
  var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
31
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __getProtoOf = Object.getPrototypeOf;
32
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
33
9
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
34
10
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -55,17 +31,59 @@ var __objRest = (source, exclude) => {
55
31
  }
56
32
  return target;
57
33
  };
34
+ var __export = (target, all) => {
35
+ for (var name in all)
36
+ __defProp(target, name, { get: all[name], enumerable: true });
37
+ };
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
47
+ // If the importer is in node compatibility mode or this is not an ESM
48
+ // file that has been converted to a CommonJS file using a Babel-
49
+ // compatible transform (i.e. "__esModule" has not been set), then set
50
+ // "default" to the CommonJS "module.exports" for node compatibility.
51
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
52
+ mod
53
+ ));
54
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
55
+
56
+ // src/components/source-search-box/source-search-box.tsx
57
+ var source_search_box_exports = {};
58
+ __export(source_search_box_exports, {
59
+ Logo: () => Logo,
60
+ SourceSearchBox: () => SourceSearchBox
61
+ });
62
+ module.exports = __toCommonJS(source_search_box_exports);
63
+ var import_react = require("react");
64
+
65
+ // src/components/ui/command.tsx
66
+ var React = __toESM(require("react"));
67
+ var import_cmdk = require("cmdk");
68
+
69
+ // src/lib/utils.ts
70
+ var import_clsx = require("clsx");
71
+ var import_nanoid = require("nanoid");
72
+ var import_tailwind_merge = require("tailwind-merge");
58
73
  function cn(...inputs) {
59
- return tailwindMerge.twMerge(clsx.clsx(inputs));
74
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
60
75
  }
61
- nanoid.customAlphabet(
76
+ var nanoid = (0, import_nanoid.customAlphabet)(
62
77
  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
63
78
  7
64
79
  );
65
- var Command = React__namespace.forwardRef((_a, ref) => {
80
+
81
+ // src/components/ui/command.tsx
82
+ var import_jsx_runtime = require("react/jsx-runtime");
83
+ var Command = React.forwardRef((_a, ref) => {
66
84
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
67
- return /* @__PURE__ */ jsxRuntime.jsx(
68
- cmdk.Command,
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ import_cmdk.Command,
69
87
  __spreadValues({
70
88
  ref,
71
89
  className: cn(
@@ -75,11 +93,11 @@ var Command = React__namespace.forwardRef((_a, ref) => {
75
93
  }, props)
76
94
  );
77
95
  });
78
- Command.displayName = cmdk.Command.displayName;
79
- var CommandInput = React__namespace.forwardRef((_a, ref) => {
96
+ Command.displayName = import_cmdk.Command.displayName;
97
+ var CommandInput = React.forwardRef((_a, ref) => {
80
98
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
81
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: /* @__PURE__ */ jsxRuntime.jsx(
82
- cmdk.Command.Input,
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
+ import_cmdk.Command.Input,
83
101
  __spreadValues({
84
102
  ref,
85
103
  className: cn(
@@ -89,24 +107,24 @@ var CommandInput = React__namespace.forwardRef((_a, ref) => {
89
107
  }, props)
90
108
  ) });
91
109
  });
92
- CommandInput.displayName = cmdk.Command.Input.displayName;
93
- var CommandList = React__namespace.forwardRef((_a, ref) => {
110
+ CommandInput.displayName = import_cmdk.Command.Input.displayName;
111
+ var CommandList = React.forwardRef((_a, ref) => {
94
112
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
95
- return /* @__PURE__ */ jsxRuntime.jsx(
96
- cmdk.Command.List,
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ import_cmdk.Command.List,
97
115
  __spreadValues({
98
116
  ref,
99
117
  className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden pb-2", className)
100
118
  }, props)
101
119
  );
102
120
  });
103
- CommandList.displayName = cmdk.Command.List.displayName;
104
- var CommandEmpty = React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, __spreadValues({ ref, className: "py-6 text-center text-sm" }, props)));
105
- CommandEmpty.displayName = cmdk.Command.Empty.displayName;
106
- var CommandGroup = React__namespace.forwardRef((_a, ref) => {
121
+ CommandList.displayName = import_cmdk.Command.List.displayName;
122
+ var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cmdk.Command.Empty, __spreadValues({ ref, className: "py-6 text-center text-sm" }, props)));
123
+ CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
124
+ var CommandGroup = React.forwardRef((_a, ref) => {
107
125
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
108
- return /* @__PURE__ */ jsxRuntime.jsx(
109
- cmdk.Command.Group,
126
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
+ import_cmdk.Command.Group,
110
128
  __spreadValues({
111
129
  ref,
112
130
  className: cn(
@@ -116,22 +134,22 @@ var CommandGroup = React__namespace.forwardRef((_a, ref) => {
116
134
  }, props)
117
135
  );
118
136
  });
119
- CommandGroup.displayName = cmdk.Command.Group.displayName;
120
- var CommandSeparator = React__namespace.forwardRef((_a, ref) => {
137
+ CommandGroup.displayName = import_cmdk.Command.Group.displayName;
138
+ var CommandSeparator = React.forwardRef((_a, ref) => {
121
139
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
122
- return /* @__PURE__ */ jsxRuntime.jsx(
123
- cmdk.Command.Separator,
140
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
141
+ import_cmdk.Command.Separator,
124
142
  __spreadValues({
125
143
  ref,
126
144
  className: cn("-mx-1 h-px bg-border", className)
127
145
  }, props)
128
146
  );
129
147
  });
130
- CommandSeparator.displayName = cmdk.Command.Separator.displayName;
131
- var CommandItem = React__namespace.forwardRef((_a, ref) => {
148
+ CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
149
+ var CommandItem = React.forwardRef((_a, ref) => {
132
150
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
133
- return /* @__PURE__ */ jsxRuntime.jsx(
134
- cmdk.Command.Item,
151
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
+ import_cmdk.Command.Item,
135
153
  __spreadValues({
136
154
  ref,
137
155
  className: cn(
@@ -141,10 +159,23 @@ var CommandItem = React__namespace.forwardRef((_a, ref) => {
141
159
  }, props)
142
160
  );
143
161
  });
144
- CommandItem.displayName = cmdk.Command.Item.displayName;
162
+ CommandItem.displayName = import_cmdk.Command.Item.displayName;
163
+ var CommandShortcut = (_a) => {
164
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
165
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
166
+ "span",
167
+ __spreadValues({
168
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className)
169
+ }, props)
170
+ );
171
+ };
172
+ CommandShortcut.displayName = "CommandShortcut";
173
+
174
+ // src/components/source-search-box/source-search-box.tsx
175
+ var import_jsx_runtime2 = require("react/jsx-runtime");
145
176
  function SourceSearchBox(props) {
146
- const [selectedValue, setSelectedValue] = React.useState("");
147
- return /* @__PURE__ */ jsxRuntime.jsxs(
177
+ const [selectedValue, setSelectedValue] = (0, import_react.useState)("");
178
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
148
179
  Command,
149
180
  {
150
181
  className: "rounded-lg border shadow-md",
@@ -160,7 +191,7 @@ function SourceSearchBox(props) {
160
191
  return 0;
161
192
  },
162
193
  children: [
163
- /* @__PURE__ */ jsxRuntime.jsx(
194
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
164
195
  CommandInput,
165
196
  {
166
197
  value: props.searchTerm,
@@ -168,18 +199,18 @@ function SourceSearchBox(props) {
168
199
  placeholder: "Search for a command..."
169
200
  }
170
201
  ),
171
- /* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
172
- /* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "No results found." }),
173
- /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { heading: "Available resources", children: props.suggestedFiles.map((filePointer) => {
174
- return /* @__PURE__ */ jsxRuntime.jsx(
202
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(CommandList, { children: [
203
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CommandEmpty, { children: "No results found." }),
204
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CommandGroup, { heading: "Available resources", children: props.suggestedFiles.map((filePointer) => {
205
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
175
206
  CommandItem,
176
207
  {
177
208
  value: filePointer.name,
178
209
  onSelect: (value) => {
179
210
  props.onSelectedFile(filePointer);
180
211
  },
181
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: " px-3 flex flex-row gap-1 items-center", children: [
182
- /* @__PURE__ */ jsxRuntime.jsx(Logo, { width: "20px", height: "20px", children: /* @__PURE__ */ jsxRuntime.jsx(
212
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: " px-3 flex flex-row gap-1 items-center", children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Logo, { width: "20px", height: "20px", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
183
214
  "img",
184
215
  {
185
216
  src: filePointer.iconImageUri,
@@ -193,7 +224,7 @@ function SourceSearchBox(props) {
193
224
  `word-${filePointer.sourceApplication}.${filePointer.name}`
194
225
  );
195
226
  }) }),
196
- /* @__PURE__ */ jsxRuntime.jsx(CommandSeparator, {})
227
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CommandSeparator, {})
197
228
  ] })
198
229
  ]
199
230
  }
@@ -204,10 +235,11 @@ function Logo({
204
235
  width,
205
236
  height
206
237
  }) {
207
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", style: { width, height }, children });
238
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", style: { width, height }, children });
208
239
  }
209
-
210
- exports.Logo = Logo;
211
- exports.SourceSearchBox = SourceSearchBox;
212
- //# sourceMappingURL=out.js.map
240
+ // Annotate the CommonJS export names for ESM import in node:
241
+ 0 && (module.exports = {
242
+ Logo,
243
+ SourceSearchBox
244
+ });
213
245
  //# sourceMappingURL=source-search-box.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/source-search-box/source-search-box.tsx","../../../src/components/ui/command.tsx","../../../src/lib/utils.ts"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;;;ACEzB,YAAY,WAAW;AAEvB,SAAS,WAAW,wBAAwB;;;ACJ5C,SAAS,YAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAEO,IAAM,SAAS;AAAA,EACpB;AAAA,EACA;AACF;;;ADGE;AAJF,IAAM,UAAgB,iBAGpB,CAAC,IAAyB,QAAK;AAA9B,eAAE,YAbL,IAaG,IAAgB,kBAAhB,IAAgB,CAAd;AACH;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAAA,CACD;AACD,QAAQ,cAAc,iBAAiB;AAgBvC,IAAM,eAAqB,iBAGzB,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ClC;AAAA,gBAEA,+BAAC,SAAI,WAAU,2CACb;AAAA,kCAAAA,KAAC,QAAK,OAAM,QAAO,QAAO,QACxB,0BAAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,KAAK,YAAY;AAAA,sBACjB,KAAK,YAAY;AAAA,sBACjB,WAAU;AAAA;AAAA,kBACZ,GACF;AAAA,kBACC,YAAY;AAAA,mBACf;AAAA;AAAA,cAfK,QAAQ,YAAY,qBAAqB,YAAY;AAAA,YAgB5D;AAAA,UAEJ,CAAC,GACH;AAAA,UAqBA,gBAAAA,KAAC,oBAAiB;AAAA,WACpB;AAAA;AAAA;AAAA,EACF;AAEJ;AAEO,SAAS,KAAK;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE,gBAAAA,KAAC,SAAI,WAAU,oCAAmC,OAAO,EAAE,OAAc,OAAe,GACrF,UACH;AAEJ","sourcesContent":["import { useState } from \"react\";\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"../ui/command\";\n\nimport { Calculator, Calendar, CreditCard, Settings, Smile, User } from \"lucide-react\";\n\nimport { DocumentPointer } from \"@copilotkit/react-core\";\n\nexport interface SourceSearchBoxProps {\n searchTerm: string;\n suggestedFiles: DocumentPointer[];\n onSelectedFile: (filePointer: DocumentPointer) => void;\n}\n\nexport function SourceSearchBox(props: SourceSearchBoxProps) {\n const [selectedValue, setSelectedValue] = useState<string>(\"\");\n\n return (\n <Command\n className=\"rounded-lg border shadow-md\"\n value={selectedValue}\n onValueChange={(value) => {\n setSelectedValue(value);\n }}\n filter={(value, search) => {\n // if the search term is empty, show all commands\n if (props.searchTerm === \"\") return 1;\n\n // if the search term is a prefix of the command, show it\n if (value.startsWith(props.searchTerm)) return 1;\n\n // otherwise, don't show it\n return 0;\n }}\n >\n <CommandInput\n value={props.searchTerm}\n className=\"rounded-t-lg hidden\"\n placeholder=\"Search for a command...\"\n />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n\n <CommandGroup heading=\"Available resources\">\n {props.suggestedFiles.map((filePointer) => {\n return (\n <CommandItem\n key={`word-${filePointer.sourceApplication}.${filePointer.name}`}\n value={filePointer.name}\n onSelect={(value) => {\n props.onSelectedFile(filePointer);\n }}\n >\n <div className=\" px-3 flex flex-row gap-1 items-center\">\n <Logo width=\"20px\" height=\"20px\">\n <img\n src={filePointer.iconImageUri}\n alt={filePointer.sourceApplication}\n className=\"w-full h-full\"\n />\n </Logo>\n {filePointer.name}\n </div>\n </CommandItem>\n );\n })}\n </CommandGroup>\n\n {/* <CommandGroup heading=\"Suggestions\">\n <CommandItem\n onSelect={(value) => {\n console.log(value);\n console.log(value);\n }}\n >\n <Calendar className=\"mr-2 h-4 w-4\" />\n <span>Calendar</span>\n </CommandItem>\n <CommandItem>\n <Smile className=\"mr-2 h-4 w-4\" />\n <span>Search Emoji</span>\n </CommandItem>\n <CommandItem>\n <Calculator className=\"mr-2 h-4 w-4\" />\n <span>Calculator</span>\n </CommandItem>\n </CommandGroup> */}\n <CommandSeparator />\n </CommandList>\n </Command>\n );\n}\n\nexport function Logo({\n children,\n width,\n height,\n}: {\n children: React.ReactNode;\n width: string;\n height: string;\n}) {\n return (\n <div className=\"flex items-center justify-center\" style={{ width: width, height: height }}>\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n {/* <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" /> */}\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden pb-2\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { customAlphabet } from \"nanoid\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const nanoid = customAlphabet(\n \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\",\n 7,\n); // 7-character random string\n\nexport async function fetcher<JSON = any>(input: RequestInfo, init?: RequestInit): Promise<JSON> {\n const res = await fetch(input, init);\n\n if (!res.ok) {\n const json = await res.json();\n if (json.error) {\n const error = new Error(json.error) as Error & {\n status: number;\n };\n error.status = res.status;\n throw error;\n } else {\n throw new Error(\"An unexpected error occurred\");\n }\n }\n\n return res.json();\n}\n\nexport function formatDate(input: string | number | Date): string {\n const date = new Date(input);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n\nexport const arraysAreEqual = (arr1: number[], arr2: number[]): boolean =>\n arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]);\n\nexport function nullableCompatibleEqualityCheck<T>(\n naiveEqualityCheck: (a: T, b: T) => boolean,\n a: T | null | undefined,\n b: T | null | undefined,\n): boolean {\n if (a === null || a === undefined || b === null || b === undefined) {\n return a === b;\n }\n\n return naiveEqualityCheck(a, b);\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/source-search-box/source-search-box.tsx","../../../src/components/ui/command.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { useState } from \"react\";\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"../ui/command\";\n\nimport { Calculator, Calendar, CreditCard, Settings, Smile, User } from \"lucide-react\";\n\nimport { DocumentPointer } from \"@copilotkit/react-core\";\n\nexport interface SourceSearchBoxProps {\n searchTerm: string;\n suggestedFiles: DocumentPointer[];\n onSelectedFile: (filePointer: DocumentPointer) => void;\n}\n\nexport function SourceSearchBox(props: SourceSearchBoxProps) {\n const [selectedValue, setSelectedValue] = useState<string>(\"\");\n\n return (\n <Command\n className=\"rounded-lg border shadow-md\"\n value={selectedValue}\n onValueChange={(value) => {\n setSelectedValue(value);\n }}\n filter={(value, search) => {\n // if the search term is empty, show all commands\n if (props.searchTerm === \"\") return 1;\n\n // if the search term is a prefix of the command, show it\n if (value.startsWith(props.searchTerm)) return 1;\n\n // otherwise, don't show it\n return 0;\n }}\n >\n <CommandInput\n value={props.searchTerm}\n className=\"rounded-t-lg hidden\"\n placeholder=\"Search for a command...\"\n />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n\n <CommandGroup heading=\"Available resources\">\n {props.suggestedFiles.map((filePointer) => {\n return (\n <CommandItem\n key={`word-${filePointer.sourceApplication}.${filePointer.name}`}\n value={filePointer.name}\n onSelect={(value) => {\n props.onSelectedFile(filePointer);\n }}\n >\n <div className=\" px-3 flex flex-row gap-1 items-center\">\n <Logo width=\"20px\" height=\"20px\">\n <img\n src={filePointer.iconImageUri}\n alt={filePointer.sourceApplication}\n className=\"w-full h-full\"\n />\n </Logo>\n {filePointer.name}\n </div>\n </CommandItem>\n );\n })}\n </CommandGroup>\n\n {/* <CommandGroup heading=\"Suggestions\">\n <CommandItem\n onSelect={(value) => {\n console.log(value);\n console.log(value);\n }}\n >\n <Calendar className=\"mr-2 h-4 w-4\" />\n <span>Calendar</span>\n </CommandItem>\n <CommandItem>\n <Smile className=\"mr-2 h-4 w-4\" />\n <span>Search Emoji</span>\n </CommandItem>\n <CommandItem>\n <Calculator className=\"mr-2 h-4 w-4\" />\n <span>Calculator</span>\n </CommandItem>\n </CommandGroup> */}\n <CommandSeparator />\n </CommandList>\n </Command>\n );\n}\n\nexport function Logo({\n children,\n width,\n height,\n}: {\n children: React.ReactNode;\n width: string;\n height: string;\n}) {\n return (\n <div className=\"flex items-center justify-center\" style={{ width: width, height: height }}>\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n {/* <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" /> */}\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden pb-2\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { customAlphabet } from \"nanoid\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const nanoid = customAlphabet(\n \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\",\n 7,\n); // 7-character random string\n\nexport async function fetcher<JSON = any>(input: RequestInfo, init?: RequestInit): Promise<JSON> {\n const res = await fetch(input, init);\n\n if (!res.ok) {\n const json = await res.json();\n if (json.error) {\n const error = new Error(json.error) as Error & {\n status: number;\n };\n error.status = res.status;\n throw error;\n } else {\n throw new Error(\"An unexpected error occurred\");\n }\n }\n\n return res.json();\n}\n\nexport function formatDate(input: string | number | Date): string {\n const date = new Date(input);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n\nexport const arraysAreEqual = (arr1: number[], arr2: number[]): boolean =>\n arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]);\n\nexport function nullableCompatibleEqualityCheck<T>(\n naiveEqualityCheck: (a: T, b: T) => boolean,\n a: T | null | undefined,\n b: T | null | undefined,\n): boolean {\n if (a === null || a === undefined || b === null || b === undefined) {\n return a === b;\n }\n\n return naiveEqualityCheck(a, b);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyB;;;ACEzB,YAAuB;AAEvB,kBAA4C;;;ACJ5C,kBAAsC;AACtC,oBAA+B;AAC/B,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;AAEO,IAAM,aAAS;AAAA,EACpB;AAAA,EACA;AACF;;;ADGE;AAJF,IAAM,UAAgB,iBAGpB,CAAC,IAAyB,QAAK;AAA9B,eAAE,YAbL,IAaG,IAAgB,kBAAhB,IAAgB,CAAd;AACH;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAAA,CACD;AACD,QAAQ,cAAc,YAAAA,QAAiB;AAgBvC,IAAM,eAAqB,iBAGzB,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA1CL,IA0CG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,qDAAC,SAAI,WAAU,mCAAkC,sBAAmB,IAElE;AAAA,IAAC,YAAAC,QAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN,GACF;AAAA,CACD;AAED,aAAa,cAAc,YAAAA,QAAiB,MAAM;AAElD,IAAM,cAAoB,iBAGxB,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA7DL,IA6DG,IAAgB,kBAAhB,IAAgB,CAAd;AACH;AAAA,IAAC,YAAAA,QAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA,WAAW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,GAIG;AACD,SACE,6CAAC,SAAI,WAAU,oCAAmC,OAAO,EAAE,OAAc,OAAe,GACrF,UACH;AAEJ;","names":["CommandPrimitive","CommandPrimitive","import_jsx_runtime"]}
@@ -1,7 +1,13 @@
1
- export { Logo, SourceSearchBox } from '../../chunk-FJNUPSQK.mjs';
2
- import '../../chunk-WTASPE2W.mjs';
3
- import '../../chunk-PTZVE6NC.mjs';
4
- import '../../chunk-7SUZ6CXM.mjs';
5
- import '../../chunk-MRXNTQOX.mjs';
6
- //# sourceMappingURL=out.js.map
1
+ import {
2
+ Logo,
3
+ SourceSearchBox
4
+ } from "../../chunk-FJNUPSQK.mjs";
5
+ import "../../chunk-WTASPE2W.mjs";
6
+ import "../../chunk-PTZVE6NC.mjs";
7
+ import "../../chunk-7SUZ6CXM.mjs";
8
+ import "../../chunk-MRXNTQOX.mjs";
9
+ export {
10
+ Logo,
11
+ SourceSearchBox
12
+ };
7
13
  //# sourceMappingURL=source-search-box.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}