@tylertech/forge-ai 0.15.3-dev.0 → 0.16.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/MIGRATION.md +192 -0
  2. package/README.md +76 -2
  3. package/custom-elements.json +5156 -13880
  4. package/dist/_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.mjs +9 -0
  5. package/dist/ai-agent-info/ai-agent-info.mjs +4 -78
  6. package/dist/ai-agent-info/ai-agent-info2.mjs +55 -0
  7. package/dist/ai-agent-info/index.d.ts +1 -1
  8. package/dist/ai-agent-info/index.mjs +1 -5
  9. package/dist/ai-agent-selector/ai-agent-selector.d.ts +2 -2
  10. package/dist/ai-agent-selector/ai-agent-selector.mjs +4 -439
  11. package/dist/ai-agent-selector/ai-agent-selector2.mjs +344 -0
  12. package/dist/ai-agent-selector/index.mjs +1 -5
  13. package/dist/ai-artifact/ai-artifact.mjs +4 -39
  14. package/dist/ai-artifact/ai-artifact2.mjs +31 -0
  15. package/dist/ai-artifact/index.d.ts +1 -1
  16. package/dist/ai-artifact/index.mjs +1 -5
  17. package/dist/ai-artifact-card/ai-artifact-card.mjs +4 -142
  18. package/dist/ai-artifact-card/ai-artifact-card2.mjs +103 -0
  19. package/dist/ai-artifact-card/index.d.ts +1 -1
  20. package/dist/ai-artifact-card/index.mjs +1 -5
  21. package/dist/ai-artifact-card-group/ai-artifact-card-group.mjs +4 -137
  22. package/dist/ai-artifact-card-group/ai-artifact-card-group2.mjs +100 -0
  23. package/dist/ai-artifact-card-group/index.d.ts +1 -1
  24. package/dist/ai-artifact-card-group/index.mjs +1 -5
  25. package/dist/ai-assistant-response/ai-assistant-response.d.ts +2 -3
  26. package/dist/ai-assistant-response/ai-assistant-response.mjs +4 -235
  27. package/dist/ai-assistant-response/ai-assistant-response2.mjs +137 -0
  28. package/dist/ai-assistant-response/index.d.ts +1 -1
  29. package/dist/ai-assistant-response/index.mjs +1 -5
  30. package/dist/ai-canvas/ai-canvas.d.ts +43 -0
  31. package/dist/ai-canvas/ai-canvas.mjs +4 -0
  32. package/dist/ai-canvas/ai-canvas2.mjs +74 -0
  33. package/dist/ai-canvas/index.d.ts +1 -0
  34. package/dist/ai-canvas/index.mjs +1 -0
  35. package/dist/ai-chain-of-thought/ai-chain-of-thought.mjs +4 -45
  36. package/dist/ai-chain-of-thought/ai-chain-of-thought2.mjs +35 -0
  37. package/dist/ai-chain-of-thought/index.d.ts +5 -5
  38. package/dist/ai-chain-of-thought/index.mjs +6 -17
  39. package/dist/ai-chain-of-thought/thought-base/index.mjs +1 -5
  40. package/dist/ai-chain-of-thought/thought-base/thought-base.mjs +4 -43
  41. package/dist/ai-chain-of-thought/thought-base/thought-base2.mjs +31 -0
  42. package/dist/ai-chain-of-thought/thought-detail/index.mjs +1 -5
  43. package/dist/ai-chain-of-thought/thought-detail/thought-detail.mjs +4 -34
  44. package/dist/ai-chain-of-thought/thought-detail/thought-detail2.mjs +26 -0
  45. package/dist/ai-chain-of-thought/thought-image/index.mjs +1 -5
  46. package/dist/ai-chain-of-thought/thought-image/thought-image.mjs +4 -43
  47. package/dist/ai-chain-of-thought/thought-image/thought-image2.mjs +30 -0
  48. package/dist/ai-chain-of-thought/thought-search-result/index.mjs +1 -5
  49. package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.mjs +4 -62
  50. package/dist/ai-chain-of-thought/thought-search-result/thought-search-result2.mjs +45 -0
  51. package/dist/ai-chat-header/ai-chat-header.d.ts +7 -5
  52. package/dist/ai-chat-header/ai-chat-header.mjs +4 -439
  53. package/dist/ai-chat-header/ai-chat-header2.mjs +319 -0
  54. package/dist/ai-chat-header/index.d.ts +2 -2
  55. package/dist/ai-chat-header/index.mjs +1 -5
  56. package/dist/ai-chat-interface/ai-chat-interface.d.ts +1 -0
  57. package/dist/ai-chat-interface/ai-chat-interface.mjs +4 -103
  58. package/dist/ai-chat-interface/ai-chat-interface2.mjs +73 -0
  59. package/dist/ai-chat-interface/index.mjs +1 -5
  60. package/dist/ai-client-message/ai-client-message.d.ts +5 -6
  61. package/dist/ai-client-message/ai-client-message.mjs +4 -112
  62. package/dist/ai-client-message/ai-client-message2.mjs +76 -0
  63. package/dist/ai-client-message/index.mjs +1 -5
  64. package/dist/ai-context-chip/ai-context-chip.d.ts +1 -1
  65. package/dist/ai-context-chip/ai-context-chip.mjs +4 -169
  66. package/dist/ai-context-chip/ai-context-chip2.mjs +113 -0
  67. package/dist/ai-context-chip/index.mjs +1 -5
  68. package/dist/ai-context-items/ai-context-items.d.ts +11 -5
  69. package/dist/ai-context-items/ai-context-items.mjs +4 -78
  70. package/dist/ai-context-items/ai-context-items2.mjs +53 -0
  71. package/dist/ai-context-items/index.d.ts +1 -1
  72. package/dist/ai-context-items/index.mjs +1 -5
  73. package/dist/ai-conversations-panel/ai-conversations-panel.d.ts +2 -2
  74. package/dist/ai-conversations-panel/ai-conversations-panel.mjs +4 -632
  75. package/dist/ai-conversations-panel/ai-conversations-panel2.mjs +531 -0
  76. package/dist/ai-conversations-panel/index.mjs +1 -5
  77. package/dist/ai-copy-button/ai-copy-button.mjs +4 -116
  78. package/dist/ai-copy-button/ai-copy-button2.mjs +88 -0
  79. package/dist/ai-copy-button/index.mjs +1 -5
  80. package/dist/ai-dialog/ai-dialog.mjs +4 -304
  81. package/dist/ai-dialog/ai-dialog2.mjs +237 -0
  82. package/dist/ai-dialog/index.d.ts +1 -1
  83. package/dist/ai-dialog/index.mjs +1 -5
  84. package/dist/ai-disclaimer/ai-disclaimer.mjs +4 -70
  85. package/dist/ai-disclaimer/ai-disclaimer2.mjs +46 -0
  86. package/dist/ai-disclaimer/index.d.ts +1 -1
  87. package/dist/ai-disclaimer/index.mjs +1 -5
  88. package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.mjs +4 -80
  89. package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group2.mjs +51 -0
  90. package/dist/ai-dropdown-menu/ai-dropdown-menu-item.d.ts +5 -1
  91. package/dist/ai-dropdown-menu/ai-dropdown-menu-item.mjs +4 -330
  92. package/dist/ai-dropdown-menu/ai-dropdown-menu-item2.mjs +280 -0
  93. package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.mjs +4 -26
  94. package/dist/ai-dropdown-menu/ai-dropdown-menu-separator2.mjs +19 -0
  95. package/dist/ai-dropdown-menu/ai-dropdown-menu.d.ts +5 -0
  96. package/dist/ai-dropdown-menu/ai-dropdown-menu.mjs +4 -351
  97. package/dist/ai-dropdown-menu/ai-dropdown-menu2.mjs +268 -0
  98. package/dist/ai-dropdown-menu/index.d.ts +1 -0
  99. package/dist/ai-dropdown-menu/index.mjs +5 -10
  100. package/dist/ai-dropdown-menu/navigation-controller.d.ts +9 -1
  101. package/dist/ai-dropdown-menu/navigation-controller.mjs +214 -204
  102. package/dist/ai-dropdown-menu/selection-manager.mjs +202 -182
  103. package/dist/ai-edit-thread/ai-edit-thread.d.ts +1 -1
  104. package/dist/ai-edit-thread/ai-edit-thread.mjs +4 -137
  105. package/dist/ai-edit-thread/ai-edit-thread2.mjs +96 -0
  106. package/dist/ai-edit-thread/index.d.ts +1 -1
  107. package/dist/ai-edit-thread/index.mjs +1 -5
  108. package/dist/ai-empty-state/ai-empty-state.mjs +4 -38
  109. package/dist/ai-empty-state/ai-empty-state2.mjs +28 -0
  110. package/dist/ai-empty-state/index.d.ts +1 -1
  111. package/dist/ai-empty-state/index.mjs +1 -5
  112. package/dist/ai-error-message/ai-error-message.mjs +4 -80
  113. package/dist/ai-error-message/ai-error-message2.mjs +62 -0
  114. package/dist/ai-error-message/index.mjs +1 -5
  115. package/dist/ai-fab/ai-fab.mjs +4 -81
  116. package/dist/ai-fab/ai-fab2.mjs +54 -0
  117. package/dist/ai-fab/index.d.ts +1 -1
  118. package/dist/ai-fab/index.mjs +1 -5
  119. package/dist/ai-file-picker/ai-file-picker.d.ts +1 -0
  120. package/dist/ai-file-picker/ai-file-picker.mjs +4 -224
  121. package/dist/ai-file-picker/ai-file-picker2.mjs +172 -0
  122. package/dist/ai-file-picker/index.mjs +1 -4
  123. package/dist/ai-gradient-container/ai-gradient-container.mjs +4 -61
  124. package/dist/ai-gradient-container/ai-gradient-container2.mjs +38 -0
  125. package/dist/ai-gradient-container/index.d.ts +1 -1
  126. package/dist/ai-gradient-container/index.mjs +1 -5
  127. package/dist/ai-icon/ai-icon.d.ts +3 -0
  128. package/dist/ai-icon/ai-icon.mjs +4 -71
  129. package/dist/ai-icon/ai-icon2.mjs +41 -0
  130. package/dist/ai-icon/index.d.ts +1 -1
  131. package/dist/ai-icon/index.mjs +1 -5
  132. package/dist/ai-message-thread/ai-message-thread.d.ts +5 -4
  133. package/dist/ai-message-thread/ai-message-thread.mjs +4 -359
  134. package/dist/ai-message-thread/ai-message-thread2.mjs +279 -0
  135. package/dist/ai-message-thread/index.mjs +1 -5
  136. package/dist/ai-modal/ai-modal.mjs +4 -178
  137. package/dist/ai-modal/ai-modal2.mjs +141 -0
  138. package/dist/ai-modal/index.mjs +1 -4
  139. package/dist/ai-prompt/ai-prompt.d.ts +10 -6
  140. package/dist/ai-prompt/ai-prompt.mjs +4 -534
  141. package/dist/ai-prompt/ai-prompt2.mjs +438 -0
  142. package/dist/ai-prompt/index.mjs +1 -5
  143. package/dist/ai-reasoning/ai-reasoning.mjs +4 -44
  144. package/dist/ai-reasoning/ai-reasoning2.mjs +35 -0
  145. package/dist/ai-reasoning/index.d.ts +2 -2
  146. package/dist/ai-reasoning/index.mjs +4 -8
  147. package/dist/ai-reasoning/reasoning-content/index.d.ts +1 -1
  148. package/dist/ai-reasoning/reasoning-content/index.mjs +1 -5
  149. package/dist/ai-reasoning/reasoning-content/reasoning-content.mjs +4 -90
  150. package/dist/ai-reasoning/reasoning-content/reasoning-content2.mjs +68 -0
  151. package/dist/ai-reasoning-header/ai-reasoning-header.d.ts +7 -1
  152. package/dist/ai-reasoning-header/ai-reasoning-header.mjs +4 -68
  153. package/dist/ai-reasoning-header/ai-reasoning-header2.mjs +51 -0
  154. package/dist/ai-reasoning-header/index.d.ts +1 -1
  155. package/dist/ai-reasoning-header/index.mjs +1 -5
  156. package/dist/ai-response-message/ai-response-message.mjs +4 -25
  157. package/dist/ai-response-message/ai-response-message2.mjs +17 -0
  158. package/dist/ai-response-message/index.mjs +1 -5
  159. package/dist/ai-response-message-toolbar/ai-response-message-toolbar.d.ts +1 -1
  160. package/dist/ai-response-message-toolbar/ai-response-message-toolbar.mjs +4 -230
  161. package/dist/ai-response-message-toolbar/ai-response-message-toolbar2.mjs +171 -0
  162. package/dist/ai-response-message-toolbar/index.mjs +1 -5
  163. package/dist/ai-sidebar/ai-sidebar.d.ts +4 -4
  164. package/dist/ai-sidebar/ai-sidebar.mjs +4 -256
  165. package/dist/ai-sidebar/ai-sidebar2.mjs +211 -0
  166. package/dist/ai-sidebar/index.d.ts +2 -2
  167. package/dist/ai-sidebar/index.mjs +1 -5
  168. package/dist/ai-slash-command-menu/ai-slash-command-menu.d.ts +1 -1
  169. package/dist/ai-slash-command-menu/ai-slash-command-menu.mjs +4 -200
  170. package/dist/ai-slash-command-menu/ai-slash-command-menu2.mjs +156 -0
  171. package/dist/ai-slash-command-menu/index.mjs +1 -5
  172. package/dist/ai-spinner/ai-spinner.mjs +4 -41
  173. package/dist/ai-spinner/ai-spinner2.mjs +29 -0
  174. package/dist/ai-spinner/index.d.ts +1 -1
  175. package/dist/ai-spinner/index.mjs +1 -5
  176. package/dist/ai-steps/ai-steps.mjs +4 -163
  177. package/dist/ai-steps/ai-steps2.mjs +133 -0
  178. package/dist/ai-steps/index.d.ts +1 -1
  179. package/dist/ai-steps/index.mjs +1 -5
  180. package/dist/ai-suggestions/ai-suggestions.d.ts +2 -5
  181. package/dist/ai-suggestions/ai-suggestions.mjs +4 -164
  182. package/dist/ai-suggestions/ai-suggestions2.mjs +125 -0
  183. package/dist/ai-suggestions/index.d.ts +2 -1
  184. package/dist/ai-suggestions/index.mjs +1 -5
  185. package/dist/ai-thinking-indicator/ai-thinking-indicator.d.ts +2 -1
  186. package/dist/ai-thinking-indicator/ai-thinking-indicator.mjs +4 -160
  187. package/dist/ai-thinking-indicator/ai-thinking-indicator2.mjs +143 -0
  188. package/dist/ai-thinking-indicator/index.d.ts +1 -1
  189. package/dist/ai-thinking-indicator/index.mjs +1 -5
  190. package/dist/ai-thread-actions-menu/ai-thread-actions-menu.d.ts +2 -2
  191. package/dist/ai-thread-actions-menu/ai-thread-actions-menu.mjs +4 -152
  192. package/dist/ai-thread-actions-menu/ai-thread-actions-menu2.mjs +109 -0
  193. package/dist/ai-thread-actions-menu/index.d.ts +1 -1
  194. package/dist/ai-thread-actions-menu/index.mjs +1 -5
  195. package/dist/ai-threads-search/ai-threads-search.d.ts +3 -4
  196. package/dist/ai-threads-search/ai-threads-search.mjs +4 -602
  197. package/dist/ai-threads-search/ai-threads-search2.mjs +495 -0
  198. package/dist/ai-threads-search/index.d.ts +1 -1
  199. package/dist/ai-threads-search/index.mjs +1 -5
  200. package/dist/ai-tool-call/ai-tool-call.d.ts +21 -0
  201. package/dist/ai-tool-call/ai-tool-call.mjs +4 -0
  202. package/dist/ai-tool-call/ai-tool-call2.mjs +132 -0
  203. package/dist/ai-tool-call/create-tool-renderer.d.ts +9 -0
  204. package/dist/ai-tool-call/create-tool-renderer.mjs +10 -0
  205. package/dist/ai-tool-call/index.d.ts +6 -0
  206. package/dist/ai-tool-call/index.mjs +5 -0
  207. package/dist/ai-tool-call/tool-canvas.d.ts +60 -0
  208. package/dist/ai-tool-call/tool-canvas.mjs +135 -0
  209. package/dist/ai-tool-call/utils.d.ts +12 -0
  210. package/dist/ai-tool-call/utils.mjs +20 -0
  211. package/dist/ai-tool-call-indicator/ai-tool-call-indicator.d.ts +2 -2
  212. package/dist/ai-tool-call-indicator/ai-tool-call-indicator.mjs +4 -331
  213. package/dist/ai-tool-call-indicator/ai-tool-call-indicator2.mjs +225 -0
  214. package/dist/ai-tool-call-indicator/index.mjs +1 -5
  215. package/dist/ai-user-message/ai-user-message.mjs +4 -151
  216. package/dist/ai-user-message/ai-user-message2.mjs +105 -0
  217. package/dist/ai-user-message/index.mjs +1 -5
  218. package/dist/ai-user-message-toolbar/ai-user-message-toolbar.mjs +4 -160
  219. package/dist/ai-user-message-toolbar/ai-user-message-toolbar2.mjs +102 -0
  220. package/dist/ai-user-message-toolbar/index.mjs +1 -5
  221. package/dist/ai-voice-input/ai-voice-input.d.ts +1 -1
  222. package/dist/ai-voice-input/ai-voice-input.mjs +4 -113
  223. package/dist/ai-voice-input/ai-voice-input2.mjs +92 -0
  224. package/dist/ai-voice-input/index.d.ts +1 -1
  225. package/dist/ai-voice-input/index.mjs +1 -5
  226. package/dist/core/drag-controller.mjs +196 -221
  227. package/dist/core/index.d.ts +4 -2
  228. package/dist/core/index.mjs +7 -6
  229. package/dist/core/overlay/index.mjs +1 -4
  230. package/dist/core/overlay/overlay.d.ts +1 -1
  231. package/dist/core/overlay/overlay.mjs +4 -180
  232. package/dist/core/overlay/overlay2.mjs +146 -0
  233. package/dist/core/popover/index.mjs +1 -4
  234. package/dist/core/popover/popover.mjs +4 -98
  235. package/dist/core/popover/popover2.mjs +71 -0
  236. package/dist/core/resize-controller.d.ts +5 -0
  237. package/dist/core/resize-controller.mjs +132 -152
  238. package/dist/core/tooltip/index.mjs +1 -4
  239. package/dist/core/tooltip/tooltip.mjs +4 -279
  240. package/dist/core/tooltip/tooltip2.mjs +213 -0
  241. package/dist/index.d.ts +45 -52
  242. package/dist/index.mjs +100 -208
  243. package/dist/jsx.d.ts +895 -0
  244. package/dist/tools/ai-data-table/ai-data-table.d.ts +1 -2
  245. package/dist/tools/ai-data-table/ai-data-table.mjs +4 -257
  246. package/dist/tools/ai-data-table/ai-data-table2.mjs +185 -0
  247. package/dist/tools/ai-data-table/index.d.ts +0 -1
  248. package/dist/tools/ai-data-table/index.mjs +1 -6
  249. package/dist/tools/ai-paginator/ai-paginator.d.ts +14 -0
  250. package/dist/tools/ai-paginator/ai-paginator.mjs +4 -115
  251. package/dist/tools/ai-paginator/ai-paginator2.mjs +90 -0
  252. package/dist/tools/ai-paginator/index.mjs +1 -4
  253. package/dist/tools/ai-steps/ai-steps.d.ts +2 -3
  254. package/dist/tools/ai-steps/ai-steps.mjs +4 -49
  255. package/dist/tools/ai-steps/ai-steps2.mjs +30 -0
  256. package/dist/tools/ai-steps/index.d.ts +0 -1
  257. package/dist/tools/ai-steps/index.mjs +1 -6
  258. package/dist/tools/index.d.ts +3 -3
  259. package/dist/tools/index.mjs +7 -12
  260. package/dist/types/chat.d.ts +102 -0
  261. package/dist/types/feature.d.ts +1 -0
  262. package/dist/types/file.d.ts +36 -0
  263. package/dist/types/index.d.ts +6 -0
  264. package/dist/types/index.mjs +0 -0
  265. package/dist/types/thread.d.ts +14 -0
  266. package/dist/types/tool.d.ts +197 -0
  267. package/dist/utils/csv-utils.mjs +37 -57
  268. package/dist/utils/delete-thread-controller.d.ts +1 -1
  269. package/dist/utils/delete-thread-controller.mjs +48 -71
  270. package/dist/utils/dom.d.ts +14 -0
  271. package/dist/utils/dom.mjs +30 -0
  272. package/dist/utils/format.d.ts +9 -0
  273. package/dist/utils/format.mjs +27 -0
  274. package/dist/utils/index.d.ts +9 -6
  275. package/dist/utils/index.mjs +6 -16
  276. package/dist/utils/infinite-scroll-controller.mjs +88 -94
  277. package/dist/utils/keyboard-navigation-controller.mjs +62 -70
  278. package/dist/utils/markdown-stream-controller.mjs +48 -0
  279. package/dist/utils/markdown.d.ts +10 -1
  280. package/dist/utils/markdown.mjs +261 -40
  281. package/dist/utils/storage-utils.mjs +30 -24
  282. package/package.json +39 -103
  283. package/dist/ai-agent-info/ai-agent-info.scss.mjs +0 -4
  284. package/dist/ai-agent-selector/ai-agent-selector.scss.mjs +0 -4
  285. package/dist/ai-artifact/ai-artifact.scss.mjs +0 -4
  286. package/dist/ai-artifact-card/ai-artifact-card.scss.mjs +0 -283
  287. package/dist/ai-artifact-card-group/ai-artifact-card-group.scss.mjs +0 -173
  288. package/dist/ai-assistant-response/ai-assistant-response.scss.mjs +0 -4
  289. package/dist/ai-attachment/ai-attachment.d.ts +0 -39
  290. package/dist/ai-attachment/ai-attachment.mjs +0 -130
  291. package/dist/ai-attachment/ai-attachment.scss.mjs +0 -4
  292. package/dist/ai-attachment/index.d.ts +0 -1
  293. package/dist/ai-attachment/index.mjs +0 -5
  294. package/dist/ai-button/ai-button.d.ts +0 -21
  295. package/dist/ai-button/ai-button.mjs +0 -68
  296. package/dist/ai-button/ai-button.scss.mjs +0 -4
  297. package/dist/ai-button/index.d.ts +0 -1
  298. package/dist/ai-button/index.mjs +0 -5
  299. package/dist/ai-chain-of-thought/ai-chain-of-thought.scss.mjs +0 -4
  300. package/dist/ai-chain-of-thought/thought-base/thought-base.scss.mjs +0 -4
  301. package/dist/ai-chain-of-thought/thought-detail/thought-detail.scss.mjs +0 -4
  302. package/dist/ai-chain-of-thought/thought-image/thought-image.scss.mjs +0 -4
  303. package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.scss.mjs +0 -4
  304. package/dist/ai-chat-header/ai-chat-header.scss.mjs +0 -4
  305. package/dist/ai-chat-interface/ai-chat-interface.scss.mjs +0 -4
  306. package/dist/ai-chatbot/ag-ui-adapter.d.ts +0 -24
  307. package/dist/ai-chatbot/ag-ui-adapter.mjs +0 -388
  308. package/dist/ai-chatbot/agent-adapter.d.ts +0 -310
  309. package/dist/ai-chatbot/agent-adapter.mjs +0 -221
  310. package/dist/ai-chatbot/agent-runner.d.ts +0 -41
  311. package/dist/ai-chatbot/agent-runner.mjs +0 -265
  312. package/dist/ai-chatbot/ai-chatbot-base.d.ts +0 -178
  313. package/dist/ai-chatbot/ai-chatbot-base.mjs +0 -673
  314. package/dist/ai-chatbot/ai-chatbot-tool-call.d.ts +0 -19
  315. package/dist/ai-chatbot/ai-chatbot-tool-call.mjs +0 -104
  316. package/dist/ai-chatbot/ai-chatbot-tool-call.scss.mjs +0 -4
  317. package/dist/ai-chatbot/ai-chatbot.d.ts +0 -173
  318. package/dist/ai-chatbot/ai-chatbot.mjs +0 -402
  319. package/dist/ai-chatbot/ai-chatbot.scss.mjs +0 -4
  320. package/dist/ai-chatbot/create-tool-renderer.d.ts +0 -9
  321. package/dist/ai-chatbot/create-tool-renderer.mjs +0 -16
  322. package/dist/ai-chatbot/event-emitter.d.ts +0 -43
  323. package/dist/ai-chatbot/event-emitter.mjs +0 -81
  324. package/dist/ai-chatbot/file-upload-manager.d.ts +0 -27
  325. package/dist/ai-chatbot/file-upload-manager.mjs +0 -106
  326. package/dist/ai-chatbot/http-agent-with-credentials.d.ts +0 -8
  327. package/dist/ai-chatbot/http-agent-with-credentials.mjs +0 -14
  328. package/dist/ai-chatbot/index.d.ts +0 -17
  329. package/dist/ai-chatbot/index.mjs +0 -37
  330. package/dist/ai-chatbot/markdown-stream-controller.mjs +0 -50
  331. package/dist/ai-chatbot/message-state-controller.d.ts +0 -72
  332. package/dist/ai-chatbot/message-state-controller.mjs +0 -392
  333. package/dist/ai-chatbot/request-serialization.d.ts +0 -33
  334. package/dist/ai-chatbot/request-serialization.mjs +0 -31
  335. package/dist/ai-chatbot/types.d.ts +0 -470
  336. package/dist/ai-chatbot/utils.d.ts +0 -44
  337. package/dist/ai-chatbot/utils.mjs +0 -110
  338. package/dist/ai-chatbot-launcher/ai-chatbot-launcher.d.ts +0 -152
  339. package/dist/ai-chatbot-launcher/ai-chatbot-launcher.mjs +0 -767
  340. package/dist/ai-chatbot-launcher/ai-chatbot-launcher.scss.mjs +0 -4
  341. package/dist/ai-chatbot-launcher/index.d.ts +0 -1
  342. package/dist/ai-chatbot-launcher/index.mjs +0 -5
  343. package/dist/ai-client-message/ai-client-message.scss.mjs +0 -4
  344. package/dist/ai-confirmation-prompt/ai-confirmation-prompt.d.ts +0 -34
  345. package/dist/ai-confirmation-prompt/ai-confirmation-prompt.mjs +0 -134
  346. package/dist/ai-confirmation-prompt/ai-confirmation-prompt.scss.mjs +0 -4
  347. package/dist/ai-confirmation-prompt/index.d.ts +0 -1
  348. package/dist/ai-confirmation-prompt/index.mjs +0 -5
  349. package/dist/ai-context-chip/ai-context-chip.scss.mjs +0 -4
  350. package/dist/ai-context-items/ai-context-items.scss.mjs +0 -4
  351. package/dist/ai-conversations-panel/ai-conversations-panel.scss.mjs +0 -4
  352. package/dist/ai-copy-button/ai-copy-button.scss.mjs +0 -4
  353. package/dist/ai-dialog/ai-dialog.scss.mjs +0 -4
  354. package/dist/ai-disclaimer/ai-disclaimer.scss.mjs +0 -4
  355. package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.scss.mjs +0 -4
  356. package/dist/ai-dropdown-menu/ai-dropdown-menu-item.scss.mjs +0 -4
  357. package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.scss.mjs +0 -4
  358. package/dist/ai-dropdown-menu/ai-dropdown-menu.scss.mjs +0 -4
  359. package/dist/ai-edit-thread/ai-edit-thread.scss.mjs +0 -4
  360. package/dist/ai-embedded-chat/ai-embedded-chat.d.ts +0 -64
  361. package/dist/ai-embedded-chat/ai-embedded-chat.mjs +0 -172
  362. package/dist/ai-embedded-chat/ai-embedded-chat.scss.mjs +0 -4
  363. package/dist/ai-embedded-chat/index.d.ts +0 -1
  364. package/dist/ai-embedded-chat/index.mjs +0 -5
  365. package/dist/ai-empty-state/ai-empty-state.scss.mjs +0 -4
  366. package/dist/ai-error-message/ai-error-message.scss.mjs +0 -4
  367. package/dist/ai-fab/ai-fab.scss.mjs +0 -4
  368. package/dist/ai-file-picker/ai-file-picker.scss.mjs +0 -4
  369. package/dist/ai-floating-chat/ai-floating-chat.d.ts +0 -53
  370. package/dist/ai-floating-chat/ai-floating-chat.mjs +0 -147
  371. package/dist/ai-floating-chat/ai-floating-chat.scss.mjs +0 -4
  372. package/dist/ai-floating-chat/index.d.ts +0 -1
  373. package/dist/ai-floating-chat/index.mjs +0 -5
  374. package/dist/ai-gradient-container/ai-gradient-container.scss.mjs +0 -4
  375. package/dist/ai-icon/ai-icon.scss.mjs +0 -4
  376. package/dist/ai-icon-button/ai-icon-button.d.ts +0 -19
  377. package/dist/ai-icon-button/ai-icon-button.mjs +0 -66
  378. package/dist/ai-icon-button/ai-icon-button.scss.mjs +0 -4
  379. package/dist/ai-icon-button/index.d.ts +0 -1
  380. package/dist/ai-icon-button/index.mjs +0 -5
  381. package/dist/ai-message-thread/ai-message-thread.scss.mjs +0 -4
  382. package/dist/ai-modal/ai-modal.scss.mjs +0 -4
  383. package/dist/ai-prompt/ai-prompt.scss.mjs +0 -4
  384. package/dist/ai-prompt/prompt-button/index.d.ts +0 -1
  385. package/dist/ai-prompt/prompt-button/index.mjs +0 -5
  386. package/dist/ai-prompt/prompt-button/prompt-button.d.ts +0 -16
  387. package/dist/ai-prompt/prompt-button/prompt-button.mjs +0 -40
  388. package/dist/ai-prompt/prompt-button/prompt-button.scss.mjs +0 -4
  389. package/dist/ai-reasoning/ai-reasoning.scss.mjs +0 -4
  390. package/dist/ai-reasoning/reasoning-content/reasoning-content.scss.mjs +0 -4
  391. package/dist/ai-reasoning-header/ai-reasoning-header.scss.mjs +0 -4
  392. package/dist/ai-response-message/ai-response-message.scss.mjs +0 -4
  393. package/dist/ai-response-message-toolbar/ai-response-message-toolbar.scss.mjs +0 -4
  394. package/dist/ai-sidebar/ai-sidebar.scss.mjs +0 -4
  395. package/dist/ai-sidebar-chat/ai-sidebar-chat.d.ts +0 -54
  396. package/dist/ai-sidebar-chat/ai-sidebar-chat.mjs +0 -163
  397. package/dist/ai-sidebar-chat/ai-sidebar-chat.scss.mjs +0 -4
  398. package/dist/ai-sidebar-chat/index.d.ts +0 -1
  399. package/dist/ai-sidebar-chat/index.mjs +0 -5
  400. package/dist/ai-slash-command-menu/ai-slash-command-menu.scss.mjs +0 -4
  401. package/dist/ai-spinner/ai-spinner.scss.mjs +0 -4
  402. package/dist/ai-steps/ai-steps.scss.mjs +0 -4
  403. package/dist/ai-suggestions/ai-suggestions.scss.mjs +0 -500
  404. package/dist/ai-thinking-indicator/ai-thinking-indicator.scss.mjs +0 -143
  405. package/dist/ai-thread-actions-menu/ai-thread-actions-menu.scss.mjs +0 -4
  406. package/dist/ai-threads/ai-threads.d.ts +0 -82
  407. package/dist/ai-threads/ai-threads.mjs +0 -343
  408. package/dist/ai-threads/ai-threads.scss.mjs +0 -4
  409. package/dist/ai-threads/index.d.ts +0 -1
  410. package/dist/ai-threads/index.mjs +0 -5
  411. package/dist/ai-threads-search/ai-threads-search.scss.mjs +0 -4
  412. package/dist/ai-tool-call-indicator/ai-tool-call-indicator.scss.mjs +0 -4
  413. package/dist/ai-user-message/ai-user-message.scss.mjs +0 -4
  414. package/dist/ai-user-message-toolbar/ai-user-message-toolbar.scss.mjs +0 -4
  415. package/dist/ai-voice-input/ai-voice-input.scss.mjs +0 -4
  416. package/dist/core/chatbot-core-controller.d.ts +0 -57
  417. package/dist/core/chatbot-core-controller.mjs +0 -523
  418. package/dist/core/overlay/overlay.scss.mjs +0 -4
  419. package/dist/core/popover/popover.scss.mjs +0 -4
  420. package/dist/core/tooltip/tooltip.scss.mjs +0 -4
  421. package/dist/tools/ai-data-table/ai-data-table-definition.d.ts +0 -2
  422. package/dist/tools/ai-data-table/ai-data-table-definition.mjs +0 -42
  423. package/dist/tools/ai-data-table/ai-data-table.scss.mjs +0 -4
  424. package/dist/tools/ai-mcp-app/ai-mcp-app.d.ts +0 -69
  425. package/dist/tools/ai-mcp-app/ai-mcp-app.mjs +0 -574
  426. package/dist/tools/ai-mcp-app/ai-mcp-app.scss.mjs +0 -4
  427. package/dist/tools/ai-mcp-app/index.d.ts +0 -3
  428. package/dist/tools/ai-mcp-app/index.mjs +0 -6
  429. package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.d.ts +0 -61
  430. package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.mjs +0 -156
  431. package/dist/tools/ai-mcp-app/mcp-app-bridge-types.d.ts +0 -123
  432. package/dist/tools/ai-mcp-app/mcp-app-bridge.d.ts +0 -41
  433. package/dist/tools/ai-mcp-app/mcp-app-bridge.mjs +0 -293
  434. package/dist/tools/ai-mcp-app/mcp-app-context.d.ts +0 -46
  435. package/dist/tools/ai-mcp-app/mcp-app-context.mjs +0 -5
  436. package/dist/tools/ai-paginator/ai-paginator.scss.mjs +0 -4
  437. package/dist/tools/ai-steps/ai-steps-definition.d.ts +0 -2
  438. package/dist/tools/ai-steps/ai-steps-definition.mjs +0 -50
  439. package/dist/tools/ai-steps/ai-steps.scss.mjs +0 -4
  440. package/dist/utils/inert-outside.d.ts +0 -7
  441. package/dist/utils/inert-outside.mjs +0 -28
  442. package/dist/utils.d.ts +0 -32
  443. package/dist/utils.mjs +0 -57
  444. /package/dist/{ai-chatbot → utils}/markdown-stream-controller.d.ts +0 -0
@@ -0,0 +1,146 @@
1
+ import overlay_default from "./overlay.mjs";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.mjs";
3
+ import { LitElement, html, unsafeCSS } from "lit";
4
+ import { customElement, property } from "lit/decorators.js";
5
+ import { arrow, autoUpdate, computePosition, flip, offset, shift, size } from "@floating-ui/dom";
6
+ //#region src/lib/core/overlay/overlay.ts
7
+ var ForgeAiOverlayComponent = class ForgeAiOverlayComponent extends LitElement {
8
+ constructor(..._args) {
9
+ super(..._args);
10
+ this.anchor = null;
11
+ this.placement = "bottom-start";
12
+ this.flip = true;
13
+ this.shift = false;
14
+ this.autoSize = false;
15
+ this.open = false;
16
+ this.arrowElement = null;
17
+ this.offset = void 0;
18
+ this.dismissMode = "auto";
19
+ this._overlayElement = null;
20
+ this._cleanupAutoUpdate = null;
21
+ this._onToggle = (event) => {
22
+ if (event.target !== event.currentTarget) return;
23
+ this.open = event.newState === "open";
24
+ this.dispatchEvent(new CustomEvent("forge-ai-overlay-toggle", {
25
+ detail: {
26
+ open: this.open,
27
+ newState: event.newState,
28
+ oldState: event.oldState
29
+ },
30
+ bubbles: true,
31
+ composed: true
32
+ }));
33
+ };
34
+ }
35
+ static {
36
+ this.styles = unsafeCSS(overlay_default);
37
+ }
38
+ disconnectedCallback() {
39
+ super.disconnectedCallback();
40
+ this._cleanup();
41
+ }
42
+ updated(changedProperties) {
43
+ if (changedProperties.has("open")) this._handleOpenChange();
44
+ if (changedProperties.has("anchor") || changedProperties.has("placement") || changedProperties.has("flip") || changedProperties.has("shift") || changedProperties.has("autoSize") || changedProperties.has("offset") || changedProperties.has("arrowElement")) {
45
+ if (this.open && this._overlayElement && this.anchor) this._updatePosition();
46
+ }
47
+ }
48
+ _handleOpenChange() {
49
+ if (this.open) this._showOverlay();
50
+ else this._hideOverlay();
51
+ }
52
+ async _showOverlay() {
53
+ if (!this._overlayElement) {
54
+ await this.updateComplete;
55
+ this._overlayElement = this.shadowRoot?.querySelector(".ai-overlay");
56
+ }
57
+ if (this._overlayElement) {
58
+ this._overlayElement.showPopover();
59
+ if (this.anchor) this._updatePosition();
60
+ }
61
+ }
62
+ _hideOverlay() {
63
+ this._overlayElement?.hidePopover();
64
+ this._cleanup();
65
+ }
66
+ _updatePosition() {
67
+ if (!this.anchor || !this._overlayElement) return;
68
+ this._cleanup();
69
+ const middleware = [
70
+ ...this.offset !== void 0 ? [offset(this.offset)] : [],
71
+ ...this.flip ? [flip()] : [],
72
+ ...this.shift ? [shift({ padding: 8 })] : [],
73
+ ...this.autoSize ? [size({
74
+ padding: 8,
75
+ apply: ({ availableWidth, availableHeight, elements }) => {
76
+ elements.floating.style.setProperty("--ai-overlay-available-width", `${availableWidth}px`);
77
+ elements.floating.style.setProperty("--ai-overlay-available-height", `${availableHeight}px`);
78
+ }
79
+ })] : [],
80
+ ...this.arrowElement ? [arrow({
81
+ element: this.arrowElement,
82
+ padding: 8
83
+ })] : []
84
+ ];
85
+ this._cleanupAutoUpdate = autoUpdate(this.anchor, this._overlayElement, () => this._computePosition(middleware));
86
+ }
87
+ async _computePosition(middleware) {
88
+ if (!this.anchor || !this._overlayElement) return;
89
+ try {
90
+ const result = await computePosition(this.anchor, this._overlayElement, {
91
+ placement: this.placement,
92
+ strategy: "fixed",
93
+ middleware
94
+ });
95
+ Object.assign(this._overlayElement.style, {
96
+ left: "0",
97
+ top: "0",
98
+ translate: `${this._roundByDPR(result.x)}px ${this._roundByDPR(result.y)}px`
99
+ });
100
+ this.setAttribute("data-position-placement", result.placement);
101
+ if (this.arrowElement && result.middlewareData.arrow) {
102
+ const { x, y } = result.middlewareData.arrow;
103
+ Object.assign(this.arrowElement.style, {
104
+ left: x != null ? `${x}px` : "",
105
+ top: y != null ? `${y}px` : ""
106
+ });
107
+ }
108
+ } catch (error) {
109
+ console.error("Failed to compute overlay position:", error);
110
+ }
111
+ }
112
+ _roundByDPR(value) {
113
+ const dpr = window.devicePixelRatio || 1;
114
+ return Math.round(value * dpr) / dpr;
115
+ }
116
+ _cleanup() {
117
+ this._cleanupAutoUpdate?.();
118
+ this._cleanupAutoUpdate = null;
119
+ this.removeAttribute("data-position-placement");
120
+ }
121
+ render() {
122
+ return html`
123
+ <div class="ai-overlay" popover=${this.dismissMode} @toggle=${this._onToggle}>
124
+ <slot></slot>
125
+ </div>
126
+ `;
127
+ }
128
+ };
129
+ __decorate([property({ type: Object })], ForgeAiOverlayComponent.prototype, "anchor", void 0);
130
+ __decorate([property()], ForgeAiOverlayComponent.prototype, "placement", void 0);
131
+ __decorate([property({ type: Boolean })], ForgeAiOverlayComponent.prototype, "flip", void 0);
132
+ __decorate([property({ type: Boolean })], ForgeAiOverlayComponent.prototype, "shift", void 0);
133
+ __decorate([property({
134
+ type: Boolean,
135
+ attribute: "auto-size"
136
+ })], ForgeAiOverlayComponent.prototype, "autoSize", void 0);
137
+ __decorate([property({
138
+ type: Boolean,
139
+ reflect: true
140
+ })], ForgeAiOverlayComponent.prototype, "open", void 0);
141
+ __decorate([property({ type: Object })], ForgeAiOverlayComponent.prototype, "arrowElement", void 0);
142
+ __decorate([property({ type: Object })], ForgeAiOverlayComponent.prototype, "offset", void 0);
143
+ __decorate([property({ attribute: "dismiss-mode" })], ForgeAiOverlayComponent.prototype, "dismissMode", void 0);
144
+ ForgeAiOverlayComponent = __decorate([customElement("forge-ai-overlay")], ForgeAiOverlayComponent);
145
+ //#endregion
146
+ export { ForgeAiOverlayComponent };
@@ -1,4 +1 @@
1
- import { ForgeAiPopoverComponent } from "./popover.mjs";
2
- export {
3
- ForgeAiPopoverComponent
4
- };
1
+ export { ForgeAiPopoverComponent } from "./popover2.mjs";
@@ -1,98 +1,4 @@
1
- import { unsafeCSS, LitElement, html } from "lit";
2
- import { property, query, customElement } from "lit/decorators.js";
3
- import "../overlay/overlay.mjs";
4
- import styles from "./popover.scss.mjs";
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __decorateClass = (decorators, target, key, kind) => {
8
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
- if (decorator = decorators[i])
11
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
- if (kind && result) __defProp(target, key, result);
13
- return result;
14
- };
15
- let ForgeAiPopoverComponent = class extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- this.anchor = null;
19
- this.placement = "bottom-start";
20
- this.flip = false;
21
- this.shift = false;
22
- this.autoSize = false;
23
- this.open = false;
24
- this.arrow = false;
25
- this.offset = void 0;
26
- this.dismissMode = "auto";
27
- this._onOverlayToggle = (event) => {
28
- if (event.target !== event.currentTarget) {
29
- return;
30
- }
31
- this.open = event.detail.open;
32
- this.dispatchEvent(
33
- new CustomEvent("forge-ai-popover-toggle", {
34
- detail: event.detail,
35
- bubbles: true,
36
- composed: true
37
- })
38
- );
39
- };
40
- }
41
- render() {
42
- return html`
43
- <forge-ai-overlay
44
- .anchor=${this.anchor}
45
- .placement=${this.placement}
46
- .flip=${this.flip}
47
- .shift=${this.shift}
48
- .autoSize=${this.autoSize}
49
- .offset=${this.offset}
50
- .open=${this.open}
51
- .arrowElement=${this.arrow ? this._arrowElement : null}
52
- .dismissMode=${this.dismissMode}
53
- @forge-ai-overlay-toggle=${this._onOverlayToggle}>
54
- <div class="ai-popover">
55
- ${this.arrow ? html`<div class="ai-popover__arrow"></div>` : null}
56
- <slot></slot>
57
- </div>
58
- </forge-ai-overlay>
59
- `;
60
- }
61
- };
62
- ForgeAiPopoverComponent.styles = unsafeCSS(styles);
63
- __decorateClass([
64
- property({ type: Object })
65
- ], ForgeAiPopoverComponent.prototype, "anchor", 2);
66
- __decorateClass([
67
- property()
68
- ], ForgeAiPopoverComponent.prototype, "placement", 2);
69
- __decorateClass([
70
- property({ type: Boolean })
71
- ], ForgeAiPopoverComponent.prototype, "flip", 2);
72
- __decorateClass([
73
- property({ type: Boolean })
74
- ], ForgeAiPopoverComponent.prototype, "shift", 2);
75
- __decorateClass([
76
- property({ type: Boolean, attribute: "auto-size" })
77
- ], ForgeAiPopoverComponent.prototype, "autoSize", 2);
78
- __decorateClass([
79
- property({ type: Boolean, reflect: true })
80
- ], ForgeAiPopoverComponent.prototype, "open", 2);
81
- __decorateClass([
82
- property({ type: Boolean })
83
- ], ForgeAiPopoverComponent.prototype, "arrow", 2);
84
- __decorateClass([
85
- property({ type: Object })
86
- ], ForgeAiPopoverComponent.prototype, "offset", 2);
87
- __decorateClass([
88
- property({ attribute: "dismiss-mode" })
89
- ], ForgeAiPopoverComponent.prototype, "dismissMode", 2);
90
- __decorateClass([
91
- query(".ai-popover__arrow")
92
- ], ForgeAiPopoverComponent.prototype, "_arrowElement", 2);
93
- ForgeAiPopoverComponent = __decorateClass([
94
- customElement("forge-ai-popover")
95
- ], ForgeAiPopoverComponent);
96
- export {
97
- ForgeAiPopoverComponent
98
- };
1
+ //#region src/lib/core/popover/popover.scss?inline
2
+ var popover_default = ":host {\n display: contents;\n overflow: visible;\n}\n\n.ai-popover {\n position: relative;\n background: var(--forge-theme-surface-bright, #ffffff);\n border-radius: calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1));\n box-shadow: var(--forge-theme-surface-bright-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));\n box-sizing: border-box;\n animation-duration: 150ms;\n animation-timing-function: cubic-bezier(0, 0, 0, 1);\n animation-name: fadein, scalein;\n transform-origin: center center;\n overflow: visible;\n}\n.ai-popover__arrow {\n position: absolute;\n width: 10px;\n height: 10px;\n background: var(--forge-theme-surface-bright, #ffffff);\n transform: rotate(45deg);\n border: 1px solid var(--forge-theme-surface-container, #e0e0e0);\n}\n\nforge-ai-overlay[data-position-placement^=top] .ai-popover:has(.ai-popover__arrow) {\n margin-block-end: var(--forge-spacing-small, 12px);\n}\n\nforge-ai-overlay[data-position-placement^=bottom] .ai-popover:has(.ai-popover__arrow) {\n margin-block-start: var(--forge-spacing-small, 12px);\n}\n\nforge-ai-overlay[data-position-placement^=left] .ai-popover:has(.ai-popover__arrow) {\n margin-inline-end: var(--forge-spacing-small, 12px);\n}\n\nforge-ai-overlay[data-position-placement^=right] .ai-popover:has(.ai-popover__arrow) {\n margin-inline-start: var(--forge-spacing-small, 12px);\n}\n\nforge-ai-overlay[data-position-placement^=top]:not([data-position-placement*=\"-\"]) .ai-popover {\n transform-origin: bottom center;\n}\nforge-ai-overlay[data-position-placement^=top][data-position-placement$=-start] .ai-popover {\n transform-origin: bottom left;\n}\nforge-ai-overlay[data-position-placement^=top][data-position-placement$=-end] .ai-popover {\n transform-origin: bottom right;\n}\nforge-ai-overlay[data-position-placement^=top] .ai-popover__arrow {\n bottom: -6px;\n clip-path: polygon(0 100%, 100% 0, 100% 100%);\n}\n\nforge-ai-overlay[data-position-placement^=right]:not([data-position-placement*=\"-\"]) .ai-popover {\n transform-origin: left center;\n}\nforge-ai-overlay[data-position-placement^=right][data-position-placement$=-start] .ai-popover {\n transform-origin: left top;\n}\nforge-ai-overlay[data-position-placement^=right][data-position-placement$=-end] .ai-popover {\n transform-origin: left bottom;\n}\nforge-ai-overlay[data-position-placement^=right] .ai-popover__arrow {\n left: -6px;\n clip-path: polygon(0 0, 0 100%, 100% 100%);\n}\n\nforge-ai-overlay[data-position-placement^=bottom]:not([data-position-placement*=\"-\"]) .ai-popover {\n transform-origin: top center;\n}\nforge-ai-overlay[data-position-placement^=bottom][data-position-placement$=-start] .ai-popover {\n transform-origin: top left;\n}\nforge-ai-overlay[data-position-placement^=bottom][data-position-placement$=-end] .ai-popover {\n transform-origin: top right;\n}\nforge-ai-overlay[data-position-placement^=bottom] .ai-popover__arrow {\n top: -6px;\n clip-path: polygon(0 0, 0 100%, 100% 0);\n}\n\nforge-ai-overlay[data-position-placement^=left]:not([data-position-placement*=\"-\"]) .ai-popover {\n transform-origin: right center;\n}\nforge-ai-overlay[data-position-placement^=left][data-position-placement$=-start] .ai-popover {\n transform-origin: right top;\n}\nforge-ai-overlay[data-position-placement^=left][data-position-placement$=-end] .ai-popover {\n transform-origin: right bottom;\n}\nforge-ai-overlay[data-position-placement^=left] .ai-popover__arrow {\n right: -6px;\n clip-path: polygon(0 0, 100% 0, 100% 100%);\n}\n\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes scalein {\n from {\n transform: scale(0.8);\n }\n to {\n transform: scale(1);\n }\n}";
3
+ //#endregion
4
+ export { popover_default as default };
@@ -0,0 +1,71 @@
1
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.mjs";
2
+ import "../overlay/overlay2.mjs";
3
+ import popover_default from "./popover.mjs";
4
+ import { LitElement, html, unsafeCSS } from "lit";
5
+ import { customElement, property, query } from "lit/decorators.js";
6
+ //#region src/lib/core/popover/popover.ts
7
+ var ForgeAiPopoverComponent = class ForgeAiPopoverComponent extends LitElement {
8
+ constructor(..._args) {
9
+ super(..._args);
10
+ this.anchor = null;
11
+ this.placement = "bottom-start";
12
+ this.flip = false;
13
+ this.shift = false;
14
+ this.autoSize = false;
15
+ this.open = false;
16
+ this.arrow = false;
17
+ this.offset = void 0;
18
+ this.dismissMode = "auto";
19
+ this._onOverlayToggle = (event) => {
20
+ if (event.target !== event.currentTarget) return;
21
+ this.open = event.detail.open;
22
+ this.dispatchEvent(new CustomEvent("forge-ai-popover-toggle", {
23
+ detail: event.detail,
24
+ bubbles: true,
25
+ composed: true
26
+ }));
27
+ };
28
+ }
29
+ static {
30
+ this.styles = unsafeCSS(popover_default);
31
+ }
32
+ render() {
33
+ return html`
34
+ <forge-ai-overlay
35
+ .anchor=${this.anchor}
36
+ .placement=${this.placement}
37
+ .flip=${this.flip}
38
+ .shift=${this.shift}
39
+ .autoSize=${this.autoSize}
40
+ .offset=${this.offset}
41
+ .open=${this.open}
42
+ .arrowElement=${this.arrow ? this._arrowElement : null}
43
+ .dismissMode=${this.dismissMode}
44
+ @forge-ai-overlay-toggle=${this._onOverlayToggle}>
45
+ <div class="ai-popover">
46
+ ${this.arrow ? html`<div class="ai-popover__arrow"></div>` : null}
47
+ <slot></slot>
48
+ </div>
49
+ </forge-ai-overlay>
50
+ `;
51
+ }
52
+ };
53
+ __decorate([property({ type: Object })], ForgeAiPopoverComponent.prototype, "anchor", void 0);
54
+ __decorate([property()], ForgeAiPopoverComponent.prototype, "placement", void 0);
55
+ __decorate([property({ type: Boolean })], ForgeAiPopoverComponent.prototype, "flip", void 0);
56
+ __decorate([property({ type: Boolean })], ForgeAiPopoverComponent.prototype, "shift", void 0);
57
+ __decorate([property({
58
+ type: Boolean,
59
+ attribute: "auto-size"
60
+ })], ForgeAiPopoverComponent.prototype, "autoSize", void 0);
61
+ __decorate([property({
62
+ type: Boolean,
63
+ reflect: true
64
+ })], ForgeAiPopoverComponent.prototype, "open", void 0);
65
+ __decorate([property({ type: Boolean })], ForgeAiPopoverComponent.prototype, "arrow", void 0);
66
+ __decorate([property({ type: Object })], ForgeAiPopoverComponent.prototype, "offset", void 0);
67
+ __decorate([property({ attribute: "dismiss-mode" })], ForgeAiPopoverComponent.prototype, "dismissMode", void 0);
68
+ __decorate([query(".ai-popover__arrow")], ForgeAiPopoverComponent.prototype, "_arrowElement", void 0);
69
+ ForgeAiPopoverComponent = __decorate([customElement("forge-ai-popover")], ForgeAiPopoverComponent);
70
+ //#endregion
71
+ export { ForgeAiPopoverComponent };
@@ -1,5 +1,6 @@
1
1
  import { ReactiveController, ReactiveControllerHost } from 'lit';
2
2
  import { Ref } from 'lit/directives/ref.js';
3
+ export type ResizeGrowDirection = 'left' | 'right';
3
4
  export interface ResizeControllerOptions {
4
5
  targetElementRef: Ref<HTMLElement>;
5
6
  resizeHandleRef: Ref<HTMLElement>;
@@ -7,6 +8,10 @@ export interface ResizeControllerOptions {
7
8
  maxWidth?: number;
8
9
  defaultWidth?: number;
9
10
  keyboardStep?: number;
11
+ /** Screen direction the handle moves to make the width larger. Defaults to `'left'`, for a panel docked to the right. */
12
+ growDirection?: () => ResizeGrowDirection;
13
+ /** Widest the target may be given its container. Defaults to the window width minus a small buffer. */
14
+ getAvailableWidth?: () => number;
10
15
  onResize?: (width: number) => void;
11
16
  onResizeStart?: () => void;
12
17
  onResizeEnd?: () => void;
@@ -1,153 +1,133 @@
1
- const RESIZE_SCREEN_BUFFER = 100;
2
- class ResizeController {
3
- constructor(host, options) {
4
- this.#isResizing = false;
5
- this.#currentWidth = 0;
6
- this.#dragStartX = 0;
7
- this.#dragStartWidth = 0;
8
- this.handlePointerDown = (event) => {
9
- if (event.button !== 0) {
10
- return;
11
- }
12
- event.preventDefault();
13
- const resizeHandle = this.#options.resizeHandleRef.value;
14
- if (!resizeHandle) {
15
- return;
16
- }
17
- resizeHandle.setPointerCapture(event.pointerId);
18
- this.#dragStartX = event.clientX;
19
- this.#dragStartWidth = this.#currentWidth;
20
- this.#isResizing = true;
21
- this.#host.requestUpdate();
22
- this.#options.onResizeStart();
23
- this.#addResizeListeners();
24
- };
25
- this.handleKeyDown = (event) => {
26
- const step = this.#options.keyboardStep;
27
- let delta = 0;
28
- switch (event.key) {
29
- case "ArrowLeft":
30
- delta = step;
31
- break;
32
- case "ArrowRight":
33
- delta = -step;
34
- break;
35
- default:
36
- return;
37
- }
38
- event.preventDefault();
39
- const previousWidth = this.#currentWidth;
40
- this.#currentWidth = this.#constrainWidth(previousWidth + delta);
41
- this.#applyWidth();
42
- this.#commitIfChanged(previousWidth);
43
- };
44
- this.#handlePointerMove = (event) => {
45
- if (!this.#isResizing) {
46
- return;
47
- }
48
- event.preventDefault();
49
- const deltaX = this.#dragStartX - event.clientX;
50
- const newWidth = this.#dragStartWidth + deltaX;
51
- this.#currentWidth = this.#constrainWidth(newWidth);
52
- this.#applyWidth();
53
- };
54
- this.#handlePointerUp = (event) => {
55
- if (!this.#isResizing) {
56
- return;
57
- }
58
- event.preventDefault();
59
- const resizeHandle = this.#options.resizeHandleRef.value;
60
- if (resizeHandle) {
61
- resizeHandle.releasePointerCapture(event.pointerId);
62
- }
63
- this.#isResizing = false;
64
- this.#host.requestUpdate();
65
- this.#options.onResizeEnd();
66
- this.#commitIfChanged(this.#dragStartWidth);
67
- this.#removeResizeListeners();
68
- };
69
- this.#host = host;
70
- this.#options = {
71
- minWidth: 360,
72
- maxWidth: 800,
73
- defaultWidth: 420,
74
- keyboardStep: 20,
75
- onResize: () => {
76
- },
77
- onResizeStart: () => {
78
- },
79
- onResizeEnd: () => {
80
- },
81
- onCommit: () => {
82
- },
83
- ...options
84
- };
85
- this.#currentWidth = this.#options.defaultWidth;
86
- host.addController(this);
87
- }
88
- #host;
89
- #options;
90
- #isResizing;
91
- #currentWidth;
92
- #dragStartX;
93
- #dragStartWidth;
94
- #resizeAbortController;
95
- hostConnected() {
96
- }
97
- hostDisconnected() {
98
- this.#cleanup();
99
- }
100
- get isResizing() {
101
- return this.#isResizing;
102
- }
103
- get currentWidth() {
104
- return this.#currentWidth;
105
- }
106
- setWidth(width) {
107
- this.#currentWidth = this.#constrainWidth(width);
108
- this.#applyWidth();
109
- }
110
- resetWidth() {
111
- this.setWidth(this.#options.defaultWidth);
112
- }
113
- #handlePointerMove;
114
- #handlePointerUp;
115
- #commitIfChanged(previousWidth) {
116
- if (this.#currentWidth !== previousWidth) {
117
- this.#options.onCommit(this.#currentWidth);
118
- }
119
- }
120
- #constrainWidth(width) {
121
- const availableWidth = window.innerWidth - RESIZE_SCREEN_BUFFER;
122
- const effectiveMaxWidth = Math.min(this.#options.maxWidth, availableWidth);
123
- return Math.max(this.#options.minWidth, Math.min(width, effectiveMaxWidth));
124
- }
125
- #applyWidth() {
126
- this.#options.onResize(this.#currentWidth);
127
- this.#host.requestUpdate();
128
- }
129
- #addResizeListeners() {
130
- if (!this.#resizeAbortController) {
131
- this.#resizeAbortController = new AbortController();
132
- document.addEventListener("pointermove", this.#handlePointerMove, {
133
- signal: this.#resizeAbortController.signal
134
- });
135
- document.addEventListener("pointerup", this.#handlePointerUp, {
136
- signal: this.#resizeAbortController.signal
137
- });
138
- }
139
- }
140
- #removeResizeListeners() {
141
- if (this.#resizeAbortController) {
142
- this.#resizeAbortController.abort();
143
- this.#resizeAbortController = void 0;
144
- }
145
- }
146
- #cleanup() {
147
- this.#removeResizeListeners();
148
- this.#isResizing = false;
149
- }
150
- }
151
- export {
152
- ResizeController
1
+ //#region src/lib/core/resize-controller.ts
2
+ var RESIZE_SCREEN_BUFFER = 100;
3
+ var ResizeController = class {
4
+ #host;
5
+ #options;
6
+ #isResizing;
7
+ #currentWidth;
8
+ #dragStartX;
9
+ #dragStartWidth;
10
+ #resizeAbortController;
11
+ constructor(host, options) {
12
+ this.#isResizing = false;
13
+ this.#currentWidth = 0;
14
+ this.#dragStartX = 0;
15
+ this.#dragStartWidth = 0;
16
+ this.handlePointerDown = (event) => {
17
+ if (event.button !== 0) return;
18
+ event.preventDefault();
19
+ const resizeHandle = this.#options.resizeHandleRef.value;
20
+ if (!resizeHandle) return;
21
+ resizeHandle.setPointerCapture(event.pointerId);
22
+ this.#dragStartX = event.clientX;
23
+ this.#dragStartWidth = this.#currentWidth;
24
+ this.#isResizing = true;
25
+ this.#host.requestUpdate();
26
+ this.#options.onResizeStart();
27
+ this.#addResizeListeners();
28
+ };
29
+ this.handleKeyDown = (event) => {
30
+ const step = this.#options.keyboardStep;
31
+ const growSign = this.#options.growDirection() === "left" ? 1 : -1;
32
+ let delta = 0;
33
+ switch (event.key) {
34
+ case "ArrowLeft":
35
+ delta = step * growSign;
36
+ break;
37
+ case "ArrowRight":
38
+ delta = -step * growSign;
39
+ break;
40
+ default: return;
41
+ }
42
+ event.preventDefault();
43
+ const previousWidth = this.#currentWidth;
44
+ this.#currentWidth = this.#constrainWidth(previousWidth + delta);
45
+ this.#applyWidth();
46
+ this.#commitIfChanged(previousWidth);
47
+ };
48
+ this.#handlePointerMove = (event) => {
49
+ if (!this.#isResizing) return;
50
+ event.preventDefault();
51
+ const deltaX = this.#options.growDirection() === "left" ? this.#dragStartX - event.clientX : event.clientX - this.#dragStartX;
52
+ const newWidth = this.#dragStartWidth + deltaX;
53
+ this.#currentWidth = this.#constrainWidth(newWidth);
54
+ this.#applyWidth();
55
+ };
56
+ this.#handlePointerUp = (event) => {
57
+ if (!this.#isResizing) return;
58
+ event.preventDefault();
59
+ const resizeHandle = this.#options.resizeHandleRef.value;
60
+ if (resizeHandle) resizeHandle.releasePointerCapture(event.pointerId);
61
+ this.#isResizing = false;
62
+ this.#host.requestUpdate();
63
+ this.#options.onResizeEnd();
64
+ this.#commitIfChanged(this.#dragStartWidth);
65
+ this.#removeResizeListeners();
66
+ };
67
+ this.#host = host;
68
+ this.#options = {
69
+ minWidth: 360,
70
+ maxWidth: 800,
71
+ defaultWidth: 420,
72
+ keyboardStep: 20,
73
+ growDirection: () => "left",
74
+ getAvailableWidth: () => window.innerWidth - RESIZE_SCREEN_BUFFER,
75
+ onResize: () => {},
76
+ onResizeStart: () => {},
77
+ onResizeEnd: () => {},
78
+ onCommit: () => {},
79
+ ...options
80
+ };
81
+ this.#currentWidth = this.#options.defaultWidth;
82
+ host.addController(this);
83
+ }
84
+ hostConnected() {}
85
+ hostDisconnected() {
86
+ this.#cleanup();
87
+ }
88
+ get isResizing() {
89
+ return this.#isResizing;
90
+ }
91
+ get currentWidth() {
92
+ return this.#currentWidth;
93
+ }
94
+ setWidth(width) {
95
+ this.#currentWidth = this.#constrainWidth(width);
96
+ this.#applyWidth();
97
+ }
98
+ resetWidth() {
99
+ this.setWidth(this.#options.defaultWidth);
100
+ }
101
+ #handlePointerMove;
102
+ #handlePointerUp;
103
+ #commitIfChanged(previousWidth) {
104
+ if (this.#currentWidth !== previousWidth) this.#options.onCommit(this.#currentWidth);
105
+ }
106
+ #constrainWidth(width) {
107
+ const effectiveMaxWidth = Math.min(this.#options.maxWidth, this.#options.getAvailableWidth());
108
+ return Math.max(this.#options.minWidth, Math.min(width, effectiveMaxWidth));
109
+ }
110
+ #applyWidth() {
111
+ this.#options.onResize(this.#currentWidth);
112
+ this.#host.requestUpdate();
113
+ }
114
+ #addResizeListeners() {
115
+ if (!this.#resizeAbortController) {
116
+ this.#resizeAbortController = new AbortController();
117
+ document.addEventListener("pointermove", this.#handlePointerMove, { signal: this.#resizeAbortController.signal });
118
+ document.addEventListener("pointerup", this.#handlePointerUp, { signal: this.#resizeAbortController.signal });
119
+ }
120
+ }
121
+ #removeResizeListeners() {
122
+ if (this.#resizeAbortController) {
123
+ this.#resizeAbortController.abort();
124
+ this.#resizeAbortController = void 0;
125
+ }
126
+ }
127
+ #cleanup() {
128
+ this.#removeResizeListeners();
129
+ this.#isResizing = false;
130
+ }
153
131
  };
132
+ //#endregion
133
+ export { ResizeController };
@@ -1,4 +1 @@
1
- import { ForgeAiTooltipComponent } from "./tooltip.mjs";
2
- export {
3
- ForgeAiTooltipComponent
4
- };
1
+ export { ForgeAiTooltipComponent } from "./tooltip2.mjs";