@epam/ai-dial-chat-hooks 1.3.0-dev.29 → 1.3.0-dev.294

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 (702) hide show
  1. package/api-error/api-error.d.ts +32 -0
  2. package/api-error/api-error.d.ts.map +1 -0
  3. package/api-error/api-error.js +31 -23
  4. package/api-transport/create-csrf-middleware.d.ts +15 -0
  5. package/api-transport/create-csrf-middleware.d.ts.map +1 -0
  6. package/api-transport/create-unauthorized-middleware.d.ts +40 -0
  7. package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
  8. package/api-transport/create-unauthorized-middleware.js +4 -1
  9. package/attachment/attach-constraints.d.ts +31 -0
  10. package/attachment/attach-constraints.d.ts.map +1 -0
  11. package/attachment/attach-constraints.js +18 -0
  12. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
  13. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
  14. package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
  15. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
  16. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
  17. package/attachments.d.ts +2 -94
  18. package/attachments.js +2 -1
  19. package/catalog/application-credentials.d.ts +15 -0
  20. package/catalog/application-credentials.d.ts.map +1 -0
  21. package/catalog/application-credentials.js +33 -0
  22. package/catalog/catalog-derivations.d.ts +29 -0
  23. package/catalog/catalog-derivations.d.ts.map +1 -0
  24. package/catalog/catalog-derivations.js +13 -6
  25. package/catalog/catalog-entity-kind.d.ts +31 -0
  26. package/catalog/catalog-entity-kind.d.ts.map +1 -0
  27. package/catalog/catalog-entity-kind.js +21 -0
  28. package/catalog/catalog-preferences.d.ts +8 -0
  29. package/catalog/catalog-preferences.d.ts.map +1 -0
  30. package/catalog/catalog-preferences.js +5 -0
  31. package/catalog/catalog-primary-action.d.ts +47 -0
  32. package/catalog/catalog-primary-action.d.ts.map +1 -0
  33. package/catalog/create-publish-api.d.ts +34 -0
  34. package/catalog/create-publish-api.d.ts.map +1 -0
  35. package/catalog/create-publish-api.js +4 -0
  36. package/catalog/deployment-endpoint-url.d.ts +19 -0
  37. package/catalog/deployment-endpoint-url.d.ts.map +1 -0
  38. package/catalog/deployment-id.d.ts +51 -0
  39. package/catalog/deployment-id.d.ts.map +1 -0
  40. package/catalog/deployment-id.js +17 -3
  41. package/catalog/entity-details.d.ts +148 -0
  42. package/catalog/entity-details.d.ts.map +1 -0
  43. package/catalog/favorite-entity-type.d.ts +5 -0
  44. package/catalog/favorite-entity-type.d.ts.map +1 -0
  45. package/catalog/favorite-entity-type.js +10 -0
  46. package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
  47. package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
  48. package/catalog/map-deployment-limits-to-input.d.ts +29 -0
  49. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
  50. package/catalog/map-deployment-limits-to-input.js +3 -4
  51. package/catalog/map-deployment-to-catalog-item.d.ts +72 -0
  52. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
  53. package/catalog/map-deployment-to-catalog-item.js +17 -12
  54. package/catalog/map-entity-details-to-catalog.d.ts +81 -0
  55. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
  56. package/catalog/map-entity-details-to-catalog.js +69 -24
  57. package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
  58. package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
  59. package/catalog/map-skill-to-catalog-item.d.ts +112 -0
  60. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
  61. package/catalog/map-skill-to-catalog-item.js +29 -38
  62. package/catalog/mcp-endpoint-url.d.ts +18 -0
  63. package/catalog/mcp-endpoint-url.d.ts.map +1 -0
  64. package/catalog/publish.d.ts +35 -0
  65. package/catalog/publish.d.ts.map +1 -0
  66. package/catalog/usage-limit-rows.d.ts +14 -0
  67. package/catalog/usage-limit-rows.d.ts.map +1 -0
  68. package/catalog/usage-limit-rows.js +19 -0
  69. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
  70. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
  71. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +117 -0
  72. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
  73. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +108 -107
  74. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
  75. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
  76. package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
  77. package/catalog/useCatalogItemDetails.d.ts +70 -0
  78. package/catalog/useCatalogItemDetails.d.ts.map +1 -0
  79. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
  80. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
  81. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +24 -24
  82. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
  83. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
  84. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
  85. package/catalog/usePublishFolders/usePublishFolders.d.ts +81 -0
  86. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
  87. package/catalog/usePublishFolders/usePublishFolders.js +32 -29
  88. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
  89. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
  90. package/catalog/useSkillItemDetails.d.ts +64 -0
  91. package/catalog/useSkillItemDetails.d.ts.map +1 -0
  92. package/catalog/useSkillItemDetails.js +3 -3
  93. package/catalog.d.ts +2 -1436
  94. package/catalog.js +29 -23
  95. package/conversation/announcement-message.d.ts +61 -0
  96. package/conversation/announcement-message.d.ts.map +1 -0
  97. package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
  98. package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
  99. package/conversation/conversation-draft/conversation-draft-store.js +84 -0
  100. package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
  101. package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
  102. package/conversation/conversation-list.d.ts +6 -0
  103. package/conversation/conversation-list.d.ts.map +1 -0
  104. package/conversation/conversation-list.js +5 -0
  105. package/conversation/conversation-title-stream.d.ts +33 -0
  106. package/conversation/conversation-title-stream.d.ts.map +1 -0
  107. package/conversation/conversation-title-stream.js +103 -0
  108. package/conversation/conversation-transfer/async.d.ts +10 -0
  109. package/conversation/conversation-transfer/async.d.ts.map +1 -0
  110. package/conversation/conversation-transfer/attachment-refs.d.ts +50 -0
  111. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
  112. package/conversation/conversation-transfer/attachment-refs.js +31 -9
  113. package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
  114. package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
  115. package/conversation/conversation-transfer/date.d.ts +5 -0
  116. package/conversation/conversation-transfer/date.d.ts.map +1 -0
  117. package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
  118. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
  119. package/conversation/conversation-transfer/export-conversation.d.ts +14 -0
  120. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
  121. package/conversation/conversation-transfer/export-conversation.js +19 -18
  122. package/conversation/conversation-transfer/import-conversation.d.ts +111 -0
  123. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
  124. package/conversation/conversation-transfer/import-conversation.js +65 -69
  125. package/conversation/conversation-transfer/progress.d.ts +60 -0
  126. package/conversation/conversation-transfer/progress.d.ts.map +1 -0
  127. package/conversation/conversation-transfer/progress.js +1 -1
  128. package/conversation/conversation-transfer/queue.d.ts +54 -0
  129. package/conversation/conversation-transfer/queue.d.ts.map +1 -0
  130. package/conversation/conversation-transfer/types.d.ts +36 -0
  131. package/conversation/conversation-transfer/types.d.ts.map +1 -0
  132. package/conversation/conversation-transfer/zip-export.d.ts +31 -0
  133. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
  134. package/conversation/conversation-transfer/zip-export.js +1 -7
  135. package/conversation/conversation-transfer/zip-import.d.ts +17 -0
  136. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
  137. package/conversation/conversation-transfer/zip-import.js +1 -1
  138. package/conversation/create-chat-stream-api.d.ts +109 -0
  139. package/conversation/create-chat-stream-api.d.ts.map +1 -0
  140. package/conversation/create-chat-stream-api.js +57 -47
  141. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
  142. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
  143. package/conversation/display-name-watch.d.ts +4 -0
  144. package/conversation/display-name-watch.d.ts.map +1 -0
  145. package/conversation/footer-message.d.ts +10 -0
  146. package/conversation/footer-message.d.ts.map +1 -0
  147. package/conversation/generation-registry.d.ts +30 -0
  148. package/conversation/generation-registry.d.ts.map +1 -0
  149. package/conversation/generation-registry.js +33 -0
  150. package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
  151. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
  152. package/conversation/get-model-id-from-conversation-id.js +1 -1
  153. package/conversation/greeting.d.ts +18 -0
  154. package/conversation/greeting.d.ts.map +1 -0
  155. package/conversation/message-factory.d.ts +7 -0
  156. package/conversation/message-factory.d.ts.map +1 -0
  157. package/conversation/message-utils.d.ts +73 -0
  158. package/conversation/message-utils.d.ts.map +1 -0
  159. package/conversation/message-utils.js +14 -10
  160. package/conversation/overlay-messages.d.ts +5 -0
  161. package/conversation/overlay-messages.d.ts.map +1 -0
  162. package/conversation/quick-app-conversation-starters.d.ts +10 -0
  163. package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
  164. package/conversation/scheduled-task-grouping.d.ts +53 -0
  165. package/conversation/scheduled-task-grouping.d.ts.map +1 -0
  166. package/conversation/scheduled-task-grouping.js +45 -0
  167. package/conversation/stage.d.ts +77 -0
  168. package/conversation/stage.d.ts.map +1 -0
  169. package/conversation/starter-option.d.ts +21 -0
  170. package/conversation/starter-option.d.ts.map +1 -0
  171. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +37 -0
  172. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
  173. package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
  174. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
  175. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
  176. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
  177. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
  178. package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
  179. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
  180. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
  181. package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +128 -0
  182. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
  183. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
  184. package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
  185. package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
  186. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
  187. package/conversation/useConversationExport/useConversationExport.js +87 -88
  188. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
  189. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
  190. package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
  191. package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
  192. package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
  193. package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
  194. package/conversation/useConversationHandlers/message-utils.js +2 -2
  195. package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
  196. package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
  197. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
  198. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
  199. package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
  200. package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
  201. package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
  202. package/conversation/useConversationImport/useConversationImport.js +24 -24
  203. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
  204. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
  205. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +65 -0
  206. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
  207. package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
  208. package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
  209. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
  210. package/conversation/useConversationScroll/useConversationScroll.js +2 -6
  211. package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
  212. package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
  213. package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
  214. package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
  215. package/conversation/useConversationStream/conversation-path.d.ts +7 -0
  216. package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
  217. package/conversation/useConversationStream/conversation-path.js +2 -2
  218. package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
  219. package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
  220. package/conversation/useConversationStream/frame-scheduler.js +17 -17
  221. package/conversation/useConversationStream/generation-resume.d.ts +98 -0
  222. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
  223. package/conversation/useConversationStream/generation-resume.js +93 -122
  224. package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
  225. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
  226. package/conversation/useConversationStream/useConversationStream.js +251 -242
  227. package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
  228. package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
  229. package/conversation/useConversationTitleEnrichmentController.js +155 -0
  230. package/conversation/useDeploymentChangeTracking.d.ts +14 -0
  231. package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
  232. package/conversation/useDeploymentChangeTracking.js +23 -0
  233. package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
  234. package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
  235. package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
  236. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
  237. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
  238. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
  239. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
  240. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
  241. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
  242. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
  243. package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
  244. package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
  245. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +50 -0
  246. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
  247. package/conversation/useTranscribeAudio/useTranscribeAudio.js +36 -27
  248. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
  249. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
  250. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
  251. package/conversation-overlay.d.ts +2 -7
  252. package/conversation-overlay.js +1 -2
  253. package/conversation-sources/stage-citations.d.ts +9 -0
  254. package/conversation-sources/stage-citations.d.ts.map +1 -0
  255. package/conversation-sources/stage-citations.js +8 -0
  256. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
  257. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
  258. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
  259. package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
  260. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
  261. package/conversation-sources.d.ts +2 -25
  262. package/conversation-sources.js +3 -1
  263. package/conversation-transfer.d.ts +2 -190
  264. package/conversation.d.ts +2 -1372
  265. package/conversation.js +43 -32
  266. package/entry-points/attachments.d.ts +4 -0
  267. package/entry-points/attachments.d.ts.map +1 -0
  268. package/entry-points/catalog.d.ts +31 -0
  269. package/entry-points/catalog.d.ts.map +1 -0
  270. package/entry-points/conversation-overlay.d.ts +2 -0
  271. package/entry-points/conversation-overlay.d.ts.map +1 -0
  272. package/entry-points/conversation-sources.d.ts +4 -0
  273. package/entry-points/conversation-sources.d.ts.map +1 -0
  274. package/entry-points/conversation-transfer.d.ts +7 -0
  275. package/entry-points/conversation-transfer.d.ts.map +1 -0
  276. package/entry-points/conversation.d.ts +45 -0
  277. package/entry-points/conversation.d.ts.map +1 -0
  278. package/entry-points/external-services.d.ts +2 -0
  279. package/entry-points/external-services.d.ts.map +1 -0
  280. package/entry-points/file-manager-canvas.d.ts +3 -0
  281. package/entry-points/file-manager-canvas.d.ts.map +1 -0
  282. package/entry-points/file-manager.d.ts +33 -0
  283. package/entry-points/file-manager.d.ts.map +1 -0
  284. package/entry-points/mcp-apps.d.ts +6 -0
  285. package/entry-points/mcp-apps.d.ts.map +1 -0
  286. package/entry-points/oauth.d.ts +10 -0
  287. package/entry-points/oauth.d.ts.map +1 -0
  288. package/entry-points/offline-credentials.d.ts +7 -0
  289. package/entry-points/offline-credentials.d.ts.map +1 -0
  290. package/entry-points/project.d.ts +14 -0
  291. package/entry-points/project.d.ts.map +1 -0
  292. package/entry-points/scheduled-tasks.d.ts +13 -0
  293. package/entry-points/scheduled-tasks.d.ts.map +1 -0
  294. package/entry-points/scroll-anchoring.d.ts +2 -0
  295. package/entry-points/scroll-anchoring.d.ts.map +1 -0
  296. package/entry-points/sharing.d.ts +3 -0
  297. package/entry-points/sharing.d.ts.map +1 -0
  298. package/entry-points/skill-editor.d.ts +11 -0
  299. package/entry-points/skill-editor.d.ts.map +1 -0
  300. package/entry-points/skills-state.d.ts +3 -0
  301. package/entry-points/skills-state.d.ts.map +1 -0
  302. package/entry-points/source-content.d.ts +2 -0
  303. package/entry-points/source-content.d.ts.map +1 -0
  304. package/entry-points/usage-limits.d.ts +8 -0
  305. package/entry-points/usage-limits.d.ts.map +1 -0
  306. package/entry-points/usage.d.ts +3 -0
  307. package/entry-points/usage.d.ts.map +1 -0
  308. package/entry-points/utils.d.ts +21 -0
  309. package/entry-points/utils.d.ts.map +1 -0
  310. package/entry-points/viewport-layout.d.ts +5 -0
  311. package/entry-points/viewport-layout.d.ts.map +1 -0
  312. package/external-services/useExternalServiceLogin.d.ts +109 -0
  313. package/external-services/useExternalServiceLogin.d.ts.map +1 -0
  314. package/external-services/useExternalServiceLogin.js +102 -0
  315. package/external-services.d.ts +2 -0
  316. package/external-services.js +1 -0
  317. package/file-manager-canvas.d.ts +2 -418
  318. package/file-manager-canvas.js +3 -2
  319. package/file-manager.d.ts +2 -1250
  320. package/file-manager.js +32 -30
  321. package/files/annotation.d.ts +10 -0
  322. package/files/annotation.d.ts.map +1 -0
  323. package/files/attachment-canvas.d.ts +135 -0
  324. package/files/attachment-canvas.d.ts.map +1 -0
  325. package/files/attachment-canvas.js +18 -10
  326. package/files/attachment-dto-to-display.d.ts +10 -0
  327. package/files/attachment-dto-to-display.d.ts.map +1 -0
  328. package/files/attachment-dto-to-display.js +13 -12
  329. package/files/attachment-types.d.ts +21 -0
  330. package/files/attachment-types.d.ts.map +1 -0
  331. package/files/attachment-types.js +1 -1
  332. package/files/browser-download.d.ts +9 -0
  333. package/files/browser-download.d.ts.map +1 -0
  334. package/files/browser-download.js +23 -0
  335. package/files/create-files-api.d.ts +52 -0
  336. package/files/create-files-api.d.ts.map +1 -0
  337. package/files/create-files-api.js +1 -1
  338. package/files/create-upload-file-with-progress.d.ts +44 -0
  339. package/files/create-upload-file-with-progress.d.ts.map +1 -0
  340. package/files/create-upload-file-with-progress.js +50 -34
  341. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  342. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  343. package/files/dial-file-manager-copy-move.util.js +16 -16
  344. package/files/dial-file-manager-mapping.util.d.ts +55 -0
  345. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  346. package/files/dial-file-manager-mapping.util.js +97 -69
  347. package/files/dial-file-manager-path.util.d.ts +48 -0
  348. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  349. package/files/dial-file-manager.model.d.ts +36 -0
  350. package/files/dial-file-manager.model.d.ts.map +1 -0
  351. package/files/dial-file-manager.types.d.ts +337 -0
  352. package/files/dial-file-manager.types.d.ts.map +1 -0
  353. package/files/dial-file-to-attachment.d.ts +26 -0
  354. package/files/dial-file-to-attachment.d.ts.map +1 -0
  355. package/files/dial-file-to-attachment.js +3 -3
  356. package/files/dial-file.d.ts +36 -0
  357. package/files/dial-file.d.ts.map +1 -0
  358. package/files/dial-file.js +20 -12
  359. package/files/dial-files-api.d.ts +71 -0
  360. package/files/dial-files-api.d.ts.map +1 -0
  361. package/files/download-destination.d.ts +31 -0
  362. package/files/download-destination.d.ts.map +1 -0
  363. package/files/download-progress.d.ts +33 -0
  364. package/files/download-progress.d.ts.map +1 -0
  365. package/files/download-progress.js +28 -0
  366. package/files/file-manager-variant.d.ts +3 -0
  367. package/files/file-manager-variant.d.ts.map +1 -0
  368. package/files/file-name.d.ts +19 -0
  369. package/files/file-name.d.ts.map +1 -0
  370. package/files/prepare-download-destination.d.ts +8 -0
  371. package/files/prepare-download-destination.d.ts.map +1 -0
  372. package/files/resolve-dial-file-api-path.d.ts +12 -0
  373. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  374. package/files/source-content.d.ts +28 -0
  375. package/files/source-content.d.ts.map +1 -0
  376. package/files/source-content.js +1 -1
  377. package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
  378. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  379. package/files/useDialFileListing/useDialFileListing.js +97 -109
  380. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  381. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  382. package/files/useDialFileManager/useDialFileManager.js +5 -2
  383. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
  384. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
  385. package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
  386. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
  387. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  388. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
  389. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  390. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  391. package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
  392. package/files/useDialFileMutations/useDialFileMutations.d.ts +77 -0
  393. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  394. package/files/useDialFileMutations/useDialFileMutations.js +230 -159
  395. package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
  396. package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
  397. package/files/useDialFilePreview/useDialFilePreview.js +45 -0
  398. package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
  399. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  400. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
  401. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  402. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
  403. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
  404. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
  405. package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
  406. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
  407. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
  408. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
  409. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
  410. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
  411. package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
  412. package/index.d.ts +216 -6996
  413. package/index.d.ts.map +1 -0
  414. package/index.js +214 -150
  415. package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
  416. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
  417. package/mcp-apps/mcp-apps-api-client.js +18 -17
  418. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
  419. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
  420. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +30 -0
  421. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
  422. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
  423. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
  424. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
  425. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +28 -31
  426. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
  427. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
  428. package/mcp-apps.d.ts +2 -256
  429. package/oauth/authorize-url.d.ts +16 -0
  430. package/oauth/authorize-url.d.ts.map +1 -0
  431. package/oauth/authorize-url.js +1 -1
  432. package/oauth/handshake.d.ts +30 -0
  433. package/oauth/handshake.d.ts.map +1 -0
  434. package/oauth/handshake.js +3 -10
  435. package/oauth/models.d.ts +81 -0
  436. package/oauth/models.d.ts.map +1 -0
  437. package/oauth/popup.d.ts +30 -0
  438. package/oauth/popup.d.ts.map +1 -0
  439. package/oauth/popup.js +19 -17
  440. package/oauth/toolset-id.d.ts +60 -0
  441. package/oauth/toolset-id.d.ts.map +1 -0
  442. package/oauth/toolset-id.js +9 -2
  443. package/oauth/types.d.ts +84 -0
  444. package/oauth/types.d.ts.map +1 -0
  445. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
  446. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
  447. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +41 -42
  448. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +85 -0
  449. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
  450. package/oauth/useToolsetLogin/useToolsetLogin.js +42 -22
  451. package/oauth.d.ts +2 -472
  452. package/oauth.js +8 -8
  453. package/offline-credentials/map-offline-credentials-response.d.ts +20 -0
  454. package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
  455. package/offline-credentials/map-offline-credentials-response.js +17 -0
  456. package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
  457. package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
  458. package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
  459. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
  460. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
  461. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
  462. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +61 -0
  463. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
  464. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +37 -0
  465. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
  466. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
  467. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
  468. package/offline-credentials.d.ts +2 -0
  469. package/offline-credentials.js +7 -0
  470. package/package.json +49 -25
  471. package/project/project-events.d.ts +14 -0
  472. package/project/project-events.d.ts.map +1 -0
  473. package/project/project-events.js +25 -0
  474. package/project/project-form-errors.d.ts +23 -0
  475. package/project/project-form-errors.d.ts.map +1 -0
  476. package/project/project-form-errors.js +46 -0
  477. package/project/project-limits.d.ts +17 -0
  478. package/project/project-limits.d.ts.map +1 -0
  479. package/project/project-limits.js +11 -0
  480. package/project/project-mapping.d.ts +13 -0
  481. package/project/project-mapping.d.ts.map +1 -0
  482. package/project/project-mapping.js +39 -0
  483. package/project/project-refresh.d.ts +12 -0
  484. package/project/project-refresh.d.ts.map +1 -0
  485. package/project/project-refresh.js +6 -0
  486. package/project/project-watch-stream.d.ts +26 -0
  487. package/project/project-watch-stream.d.ts.map +1 -0
  488. package/project/project-watch-stream.js +39 -0
  489. package/project/projects-api-client.d.ts +175 -0
  490. package/project/projects-api-client.d.ts.map +1 -0
  491. package/project/projects-api-client.js +88 -0
  492. package/project/use-project-actions.d.ts +48 -0
  493. package/project/use-project-actions.d.ts.map +1 -0
  494. package/project/use-project-actions.js +89 -0
  495. package/project/use-project-artifacts.d.ts +24 -0
  496. package/project/use-project-artifacts.d.ts.map +1 -0
  497. package/project/use-project-artifacts.js +78 -0
  498. package/project/use-project-conversations.d.ts +29 -0
  499. package/project/use-project-conversations.d.ts.map +1 -0
  500. package/project/use-project-conversations.js +182 -0
  501. package/project/use-project-submit.d.ts +49 -0
  502. package/project/use-project-submit.d.ts.map +1 -0
  503. package/project/use-project-submit.js +73 -0
  504. package/project/use-project-watch.d.ts +24 -0
  505. package/project/use-project-watch.d.ts.map +1 -0
  506. package/project/use-project-watch.js +41 -0
  507. package/project/use-project.d.ts +23 -0
  508. package/project/use-project.d.ts.map +1 -0
  509. package/project/use-project.js +73 -0
  510. package/project/use-projects.d.ts +27 -0
  511. package/project/use-projects.d.ts.map +1 -0
  512. package/project/use-projects.js +92 -0
  513. package/project.d.ts +2 -0
  514. package/project.js +14 -0
  515. package/prompt/export-prompt.d.ts +31 -0
  516. package/prompt/export-prompt.d.ts.map +1 -0
  517. package/prompt/prompt-resource.d.ts +30 -0
  518. package/prompt/prompt-resource.d.ts.map +1 -0
  519. package/prompt/prompt.d.ts +45 -0
  520. package/prompt/prompt.d.ts.map +1 -0
  521. package/prompt/prompt.js +7 -3
  522. package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
  523. package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
  524. package/scheduled-task/active-scheduled-task.d.ts +58 -0
  525. package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
  526. package/scheduled-task/active-scheduled-task.js +18 -0
  527. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
  528. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
  529. package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
  530. package/scheduled-task/scheduled-task-description.d.ts +41 -0
  531. package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
  532. package/scheduled-task/scheduled-task-description.js +37 -28
  533. package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
  534. package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
  535. package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
  536. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
  537. package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
  538. package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
  539. package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
  540. package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
  541. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
  542. package/scheduled-task/scheduled-task-trigger.js +68 -38
  543. package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
  544. package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
  545. package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
  546. package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
  547. package/scheduled-task/use-scheduled-task-runs.js +19 -31
  548. package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
  549. package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
  550. package/scheduled-task/use-scheduled-tasks.js +1 -1
  551. package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
  552. package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
  553. package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
  554. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
  555. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
  556. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
  557. package/scheduled-tasks.d.ts +2 -256
  558. package/scheduled-tasks.js +6 -1
  559. package/scroll-anchoring.d.ts +2 -50
  560. package/scroll-anchoring.js +1 -2
  561. package/shared/application-schema.d.ts +16 -0
  562. package/shared/application-schema.d.ts.map +1 -0
  563. package/shared/application-schema.js +3 -3
  564. package/shared/browser-timezone.d.ts +7 -0
  565. package/shared/browser-timezone.d.ts.map +1 -0
  566. package/shared/client-channel.d.ts +53 -0
  567. package/shared/client-channel.d.ts.map +1 -0
  568. package/shared/client-channel.js +6 -0
  569. package/shared/cron-day-of-month.d.ts +21 -0
  570. package/shared/cron-day-of-month.d.ts.map +1 -0
  571. package/shared/cron-day-of-month.js +10 -10
  572. package/shared/cron-weekday.d.ts +5 -0
  573. package/shared/cron-weekday.d.ts.map +1 -0
  574. package/shared/custom-apps.d.ts +7 -0
  575. package/shared/custom-apps.d.ts.map +1 -0
  576. package/shared/external-services.d.ts +16 -0
  577. package/shared/external-services.d.ts.map +1 -0
  578. package/shared/formatting.d.ts +5 -0
  579. package/shared/formatting.d.ts.map +1 -0
  580. package/shared/locale.d.ts +45 -0
  581. package/shared/locale.d.ts.map +1 -0
  582. package/shared/locale.js +2 -2
  583. package/shared/read-sse-events.d.ts +10 -0
  584. package/shared/read-sse-events.d.ts.map +1 -0
  585. package/shared/read-sse-events.js +33 -0
  586. package/shared/serialized-writer.d.ts +10 -0
  587. package/shared/serialized-writer.d.ts.map +1 -0
  588. package/shared/serialized-writer.js +35 -0
  589. package/shared/string-utils.d.ts +11 -0
  590. package/shared/string-utils.d.ts.map +1 -0
  591. package/shared/theme-colors.d.ts +16 -0
  592. package/shared/theme-colors.d.ts.map +1 -0
  593. package/shared/theme-colors.js +14 -0
  594. package/shared/toolset-login-events.d.ts +15 -0
  595. package/shared/toolset-login-events.d.ts.map +1 -0
  596. package/shared/usage-stat.d.ts +3 -0
  597. package/shared/usage-stat.d.ts.map +1 -0
  598. package/shared/usage-stat.js +4 -0
  599. package/shared/usePersistedState/usePersistedState.d.ts +28 -0
  600. package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
  601. package/shared/usePersistedState/usePersistedState.js +24 -0
  602. package/sharing.d.ts +2 -65
  603. package/skill/skill-archive.d.ts +7 -0
  604. package/skill/skill-archive.d.ts.map +1 -0
  605. package/skill/skill-file-batch-validation.d.ts +74 -0
  606. package/skill/skill-file-batch-validation.d.ts.map +1 -0
  607. package/skill/skill-file-batch-validation.js +34 -33
  608. package/skill/skill-file-preview.d.ts +25 -0
  609. package/skill/skill-file-preview.d.ts.map +1 -0
  610. package/skill/skill-lookup.d.ts +20 -0
  611. package/skill/skill-lookup.d.ts.map +1 -0
  612. package/skill/skill-lookup.js +12 -0
  613. package/skill/skill-manifest.d.ts +28 -0
  614. package/skill/skill-manifest.d.ts.map +1 -0
  615. package/skill/skill-types.d.ts +46 -0
  616. package/skill/skill-types.d.ts.map +1 -0
  617. package/skill/skill-types.js +1 -1
  618. package/skill/skill.d.ts +160 -0
  619. package/skill/skill.d.ts.map +1 -0
  620. package/skill/skill.js +12 -15
  621. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
  622. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
  623. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
  624. package/skill/useSkillEditorLoad.d.ts +74 -0
  625. package/skill/useSkillEditorLoad.d.ts.map +1 -0
  626. package/skill/useSkillEditorSubmit.d.ts +127 -0
  627. package/skill/useSkillEditorSubmit.d.ts.map +1 -0
  628. package/skill/useSkillEditorSubmit.js +77 -79
  629. package/skill/useSkillFileActions.d.ts +62 -0
  630. package/skill/useSkillFileActions.d.ts.map +1 -0
  631. package/skill/useSkillFileActions.js +36 -21
  632. package/skill/useSkillFilePreview.d.ts +38 -0
  633. package/skill/useSkillFilePreview.d.ts.map +1 -0
  634. package/skill/useSkillsState/useSkillsState.d.ts +35 -0
  635. package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
  636. package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
  637. package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
  638. package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
  639. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
  640. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
  641. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
  642. package/skill-editor.d.ts +2 -655
  643. package/skill-editor.js +3 -1
  644. package/skills-state.d.ts +2 -40
  645. package/skills-state.js +3 -2
  646. package/source-content.d.ts +2 -29
  647. package/source-content.js +1 -2
  648. package/usage/map-usage-data-to-dashboard.d.ts +39 -0
  649. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
  650. package/usage/map-user-usage-to-model-limits.d.ts +62 -0
  651. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
  652. package/usage/map-user-usage-to-model-limits.js +21 -21
  653. package/usage/usage-banner-source.d.ts +24 -0
  654. package/usage/usage-banner-source.d.ts.map +1 -0
  655. package/usage/usage-banner-source.js +61 -0
  656. package/usage/usage-period.d.ts +7 -0
  657. package/usage/usage-period.d.ts.map +1 -0
  658. package/usage/usage-period.js +6 -0
  659. package/usage/usage-reset-time.d.ts +78 -0
  660. package/usage/usage-reset-time.d.ts.map +1 -0
  661. package/usage/usage-reset-time.js +82 -0
  662. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +56 -0
  663. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  664. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +34 -0
  665. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  666. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  667. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  668. package/usage/useUsageData/useUsageData.d.ts +28 -0
  669. package/usage/useUsageData/useUsageData.d.ts.map +1 -0
  670. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +58 -0
  671. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  672. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +70 -0
  673. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  674. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  675. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  676. package/usage-limits.d.ts +2 -0
  677. package/usage-limits.js +9 -0
  678. package/usage.d.ts +2 -125
  679. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +130 -0
  680. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
  681. package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
  682. package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
  683. package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
  684. package/usePageFileDrag/usePageFileDrag.js +3 -3
  685. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
  686. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
  687. package/useShareLink/useShareLink.d.ts +23 -0
  688. package/useShareLink/useShareLink.d.ts.map +1 -0
  689. package/useShareLink/useShareLink.js +18 -17
  690. package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
  691. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
  692. package/useToolsMenu/useToolsMenu.d.ts +31 -0
  693. package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
  694. package/useViewportWidth/useViewportWidth.d.ts +3 -0
  695. package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
  696. package/utils.d.ts +2 -404
  697. package/utils.js +21 -17
  698. package/viewport-layout/canvas-width.d.ts +39 -0
  699. package/viewport-layout/canvas-width.d.ts.map +1 -0
  700. package/viewport-layout/canvas-width.js +23 -0
  701. package/viewport-layout.d.ts +2 -27
  702. package/viewport-layout.js +2 -1
@@ -4,21 +4,22 @@ import { RESERVED_MARKER_NAME as i } from "../dial-file-manager.model.js";
4
4
  import { formatOperationFolderName as a, getVirtualPathName as o, hasForbiddenNameSymbols as s, parseNewFolderVirtualPath as c, resolveOwnerCoords as l } from "../dial-file-manager-path.util.js";
5
5
  import { resolveDialFileApiPath as u, virtualPathToApiPath as d } from "../resolve-dial-file-api-path.js";
6
6
  import { prepareCopyItems as f, prepareMoveRenameItems as p } from "../dial-file-manager-copy-move.util.js";
7
- import { findFirstSuccessfulCopyMoveItem as m } from "../dial-file-manager-mapping.util.js";
8
- import { DownloadDestinationType as h } from "../download-destination.js";
9
- import { getParentFolderPath as g } from "@epam/ai-dial-chat-shared";
10
- import { useCallback as _, useRef as v, useState as y } from "react";
11
- import { ArchiveItemDtoNodeTypeEnum as b, CopyItemDtoNodeTypeEnum as x, DeleteItemDtoNodeTypeEnum as S, MoveItemDtoNodeTypeEnum as ee, RenameItemDtoNodeTypeEnum as C } from "@epam/ai-dial-chat-api-client";
12
- import { NOT_ALLOWED_SYMBOLS as te, NotificationVariant as w } from "@epam/ai-dial-ui-kit";
13
- import { DialFileManagerTabs as T, DialFileNodeType as E } from "@epam/ai-dial-react-file-manager";
7
+ import { findFirstSuccessfulCopyMoveItem as m, resolveTransferFailureReason as h } from "../dial-file-manager-mapping.util.js";
8
+ import { DownloadDestinationType as g } from "../download-destination.js";
9
+ import { createDownloadResponseError as _, estimateArchiveSize as v, getContentLength as y, getDownloadPercent as b, withDownloadProgress as ee } from "../download-progress.js";
10
+ import { ArchiveItemDtoNodeTypeEnum as te, CopyItemDtoNodeTypeEnum as ne, DeleteItemDtoNodeTypeEnum as x, MoveItemDtoNodeTypeEnum as re, RenameItemDtoNodeTypeEnum as ie } from "@epam/ai-dial-chat-api-client";
11
+ import { FileDownloadStatus as S, getParentFolderPath as C, isDownloadInProgress as ae } from "@epam/ai-dial-chat-shared";
12
+ import { useCallback as w, useEffect as oe, useRef as T, useState as E } from "react";
13
+ import { NOT_ALLOWED_SYMBOLS as se, NotificationVariant as D } from "@epam/ai-dial-ui-kit";
14
+ import { DialFileManagerTabs as ce, DialFileNodeType as O } from "@epam/ai-dial-react-file-manager";
14
15
  //#region src/files/useDialFileMutations/useDialFileMutations.ts
15
- var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, currentFolder: M, sharedRootMetaRef: N, listingPermissionsCache: P, invalidateFolders: F, bumpRetry: I, mergeCreatedFolder: L, setFolderPath: R, onNotification: z, onOperationSuccess: B, downloadDestination: V, forbiddenSymbolsRegExp: H }) => {
16
- let [ne, U] = y(!1), [re, W] = y(!1), [ie, G] = y(!1), [K, q] = y(!1), [J, Y] = y(!1), [X, ae] = y(!1), Z = v(null), Q = v(null), $ = _((e, t) => {
16
+ var k = 0, le = () => (k += 1, `download-${Date.now()}-${k}`), A = ({ filesApi: k, bucket: A, rootLabel: j, activeTab: M, folderPath: N, currentFolder: P, sharedRootMetaRef: F, listingPermissionsCache: ue, invalidateFolders: I, bumpRetry: L, mergeCreatedFolder: de, setFolderPath: R, onNotification: z, onOperationSuccess: B, downloadDestination: V, forbiddenSymbolsRegExp: H }) => {
17
+ let [fe, pe] = E(!1), [me, U] = E(null), W = T(/* @__PURE__ */ new Map()), G = T(/* @__PURE__ */ new Map()), K = T(null), [he, ge] = E(!1), [q, _e] = E(!1), [J, ve] = E(!1), [Y, ye] = E(!1), X = T(null), Z = T(null), Q = w((e, t) => {
17
18
  let r = null;
18
19
  if (!e || e.trim() === "") r = { reason: n.Empty };
19
20
  else if (s(e, H)) r = {
20
21
  reason: n.ForbiddenSymbols,
21
- symbols: te
22
+ symbols: se
22
23
  };
23
24
  else if (e === i) r = { reason: n.ReservedName };
24
25
  else if (e.length > 255) r = {
@@ -32,132 +33,198 @@ var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, cu
32
33
  existingName: o.name
33
34
  });
34
35
  }
35
- return Q.current = r, r;
36
- }, [H]), oe = _(async (e, n, i) => {
37
- let { parentVirtualPath: a, name: o } = c(n, k), s = d(a, k), u = M && j === s ? M : {
36
+ return Z.current = r, r;
37
+ }, [H]), be = w(async (e, n, i) => {
38
+ let { parentVirtualPath: a, name: o } = c(n, j), s = d(a, j), u = P && N === s ? P : {
38
39
  id: s,
39
40
  path: s,
40
41
  name: a.split("/").filter(Boolean).pop() ?? "",
41
42
  folderId: s,
42
- nodeType: E.FOLDER,
43
+ nodeType: O.FOLDER,
43
44
  items: []
44
- }, f = Q.current;
45
- if (Q.current = null, $(o, u) || f) return;
46
- U(!0);
47
- let { bucket: p, path: m } = A === T.Shared ? l(s, N.current, O) : {
48
- bucket: O,
45
+ }, f = Z.current;
46
+ if (Z.current = null, Q(o, u) || f) return;
47
+ pe(!0);
48
+ let { bucket: p, path: m } = M === ce.Shared ? l(s, F.current, A) : {
49
+ bucket: A,
49
50
  path: s
50
51
  };
51
52
  try {
52
- L(s, await D.createFolder({
53
+ de(s, await k.createFolder({
53
54
  bucket: p,
54
55
  parentPath: m,
55
56
  name: o
56
- }), P.get(s)), I(), B?.({
57
+ }), ue.get(s)), L(), B?.({
57
58
  kind: r.FolderCreated,
58
59
  name: o
59
60
  });
60
61
  } catch {
61
62
  z?.({
62
- variant: w.Error,
63
+ variant: D.Error,
63
64
  reason: t.FolderCreateFailed
64
65
  });
65
66
  } finally {
66
- U(!1);
67
+ pe(!1);
67
68
  }
68
69
  }, [
69
- A,
70
- O,
71
70
  M,
72
- D,
73
- j,
74
- $,
75
- k,
71
+ A,
76
72
  P,
73
+ k,
74
+ N,
75
+ Q,
76
+ j,
77
+ ue,
78
+ de,
77
79
  L,
78
- I,
79
80
  B,
80
- N,
81
+ F,
81
82
  z
82
- ]), se = _((e) => {
83
+ ]), $ = w((e, t) => {
84
+ G.current.delete(e), U((n) => n && {
85
+ ...n,
86
+ files: n.files.map((n) => n.id === e ? {
87
+ ...n,
88
+ ...t
89
+ } : n)
90
+ });
91
+ }, []), xe = w((e, t) => {
92
+ G.current.set(e, t), K.current ??= requestAnimationFrame(() => {
93
+ K.current = null;
94
+ let e = new Map(G.current);
95
+ G.current.clear(), U((t) => t && {
96
+ ...t,
97
+ files: t.files.map((t) => e.has(t.id) && t.status === S.Downloading ? {
98
+ ...t,
99
+ percent: e.get(t.id)
100
+ } : t)
101
+ });
102
+ });
103
+ }, []);
104
+ oe(() => () => {
105
+ K.current != null && cancelAnimationFrame(K.current);
106
+ }, []);
107
+ let Se = w((e) => {
83
108
  (async () => {
84
- W(!0);
109
+ let n = e.length === 1 && e[0].nodeType === O.ITEM, i = "files.zip";
110
+ n ? i = e[0].name : e.length === 1 && (i = `${e[0].name}.zip`);
111
+ let a = e.length === 1 ? t.DownloadFileFailed : t.DownloadFilesFailed, o;
85
112
  try {
86
- let t = e.length === 1 ? e[0].nodeType === E.ITEM ? e[0].name : `${e[0].name}.zip` : "files.zip", n = await V.resolveDestination(t, e.length === 1 && e[0].nodeType === E.ITEM ? e[0].contentType ?? "application/octet-stream" : "application/zip");
87
- if (n.type === h.Cancelled) return;
88
- if (e.length === 1 && e[0].nodeType === E.ITEM) {
89
- let t = e[0];
90
- if (!t.bucket) throw Error("File is missing bucket");
91
- let i = u(t, t.bucket, k), a = await D.downloadFile(t.bucket, i);
92
- if (!a.ok) throw Error(`Download failed with status ${a.status}`);
93
- let o = await V.triggerDownload(a, t.name, n);
94
- B?.({
95
- kind: r.FileDownloaded,
96
- name: o,
97
- count: 1
98
- });
113
+ o = await V.resolveDestination(i, n ? e[0].contentType ?? "application/octet-stream" : "application/zip");
114
+ } catch {
115
+ z?.({
116
+ variant: D.Error,
117
+ reason: a
118
+ });
119
+ return;
120
+ }
121
+ if (o.type === g.Cancelled) return;
122
+ let s = le(), c = new AbortController();
123
+ W.current.set(s, c), U((e) => ({
124
+ isOpen: !0,
125
+ files: [...e?.files ?? [], {
126
+ id: s,
127
+ name: i,
128
+ status: S.Downloading
129
+ }]
130
+ }));
131
+ try {
132
+ let t, a, l = !1;
133
+ if (n) {
134
+ let n = e[0];
135
+ if (!n.bucket) throw Error("File is missing bucket");
136
+ let r = u(n, n.bucket, j);
137
+ if (t = await k.downloadFile(n.bucket, r, c.signal), !t.ok) throw _(t);
138
+ a = y(t);
99
139
  } else {
100
- let i = e.map((e) => ({
101
- bucket: e.bucket ?? O,
102
- path: u(e, e.bucket ?? O, k),
140
+ let n = e.map((e) => ({
141
+ bucket: e.bucket ?? A,
142
+ path: u(e, e.bucket ?? A, j),
103
143
  name: e.name,
104
- nodeType: e.nodeType === E.FOLDER ? b.Folder : b.Item
105
- })), a = await D.downloadArchive(i);
106
- if (!a.ok) throw Error(`Download failed with status ${a.status}`);
107
- let o = await V.triggerDownload(a, t, n);
108
- e.length === 1 ? B?.({
109
- kind: r.FileDownloaded,
110
- name: o
111
- }) : B?.({
112
- kind: r.FilesDownloaded,
113
- count: e.length
114
- });
144
+ nodeType: e.nodeType === O.FOLDER ? te.Folder : te.Item
145
+ }));
146
+ if (t = await k.downloadArchive(n, c.signal), !t.ok) throw _(t);
147
+ a = v(e.map((e) => ({
148
+ isFolder: e.nodeType === O.FOLDER,
149
+ contentLength: e.contentLength
150
+ }))), l = !0;
115
151
  }
116
- } catch {
117
- z?.({
118
- variant: w.Error,
119
- reason: e.length === 1 ? t.DownloadFileFailed : t.DownloadFilesFailed
152
+ let d = ee(t, (e) => xe(s, b(e, a, l))), f = await V.triggerDownload(d, i, o);
153
+ $(s, {
154
+ status: S.Completed,
155
+ percent: 100
156
+ }), n ? B?.({
157
+ kind: r.FileDownloaded,
158
+ name: f,
159
+ count: 1
160
+ }) : e.length === 1 ? B?.({
161
+ kind: r.FileDownloaded,
162
+ name: f
163
+ }) : B?.({
164
+ kind: r.FilesDownloaded,
165
+ count: e.length
166
+ });
167
+ } catch (e) {
168
+ if (c.signal.aborted) {
169
+ $(s, { status: S.Cancelled });
170
+ return;
171
+ }
172
+ let t = await h(e);
173
+ $(s, {
174
+ status: S.Failed,
175
+ failureReason: t
176
+ }), z?.({
177
+ variant: D.Error,
178
+ reason: a
120
179
  });
121
180
  } finally {
122
- W(!1);
181
+ W.current.delete(s);
123
182
  }
124
183
  })();
125
184
  }, [
126
- O,
127
- k,
185
+ A,
186
+ j,
128
187
  B,
129
188
  z,
130
- D,
131
- V
132
- ]), ce = _((e, n) => {
189
+ k,
190
+ V,
191
+ $,
192
+ xe
193
+ ]), Ce = w((e) => {
194
+ W.current.get(e)?.abort();
195
+ }, []), we = w(() => {
196
+ for (let e of W.current.values()) e.abort();
197
+ }, []), Te = w(() => {
198
+ G.current.clear(), U(null);
199
+ }, []), Ee = ae(me), De = w((e, n) => {
133
200
  e.length !== 0 && (async () => {
134
- G(!0);
201
+ ge(!0);
135
202
  let r = [], i = e.map((e) => {
136
- let t = e.nodeType === E.FOLDER, n = d(e.sourceUrl, k), i = t ? n : n.replace(/\/$/, "");
203
+ let t = e.nodeType === O.FOLDER, n = d(e.sourceUrl, j), i = t ? n : n.replace(/\/$/, "");
137
204
  t && i !== "" && r.push(i.endsWith("/") ? i : `${i}/`);
138
- let a = o(e.sourceUrl, i), { bucket: s, path: c } = A === T.Shared ? l(i, N.current, O) : {
139
- bucket: O,
205
+ let a = o(e.sourceUrl, i), { bucket: s, path: c } = M === ce.Shared ? l(i, F.current, A) : {
206
+ bucket: A,
140
207
  path: i
141
208
  };
142
209
  return {
143
210
  bucket: s,
144
211
  path: c,
145
212
  name: a,
146
- nodeType: t ? S.Folder : S.Item
213
+ nodeType: t ? x.Folder : x.Item
147
214
  };
148
215
  });
149
216
  try {
150
- let { results: e } = await D.deleteFiles(i), r = e.filter((e) => !e.success), a = r.length, o = e.length - a, s = e.find((e) => e.success), c = i.find((e) => e.path === s?.path) ?? i[0];
217
+ let { results: e } = await k.deleteFiles(i), r = e.filter((e) => !e.success), a = r.length, o = e.length - a, s = e.find((e) => e.success), c = i.find((e) => e.path === s?.path) ?? i[0];
151
218
  if (o > 0 && z?.({
152
- variant: w.Success,
219
+ variant: D.Success,
153
220
  reason: t.FilesDeleted,
154
221
  count: o,
155
222
  name: c?.name,
156
- folder: n || k
223
+ folder: n || j
157
224
  }), a > 0) {
158
225
  let e = r.slice(0, 3).map((e) => i.find((t) => t.path === e.path)?.name ?? e.path), n = a - e.length;
159
226
  z?.({
160
- variant: w.Error,
227
+ variant: D.Error,
161
228
  reason: t.FilesDeletePartiallyFailed,
162
229
  names: e,
163
230
  restCount: n
@@ -165,118 +232,122 @@ var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, cu
165
232
  }
166
233
  } catch {
167
234
  z?.({
168
- variant: w.Error,
235
+ variant: D.Error,
169
236
  reason: t.DeleteFailed
170
237
  });
171
238
  }
172
- F([...new Set(i.map((e) => {
173
- if (e.nodeType === S.Folder) return e.path.endsWith("/") ? e.path : `${e.path}/`;
239
+ I([...new Set(i.map((e) => {
240
+ if (e.nodeType === x.Folder) return e.path.endsWith("/") ? e.path : `${e.path}/`;
174
241
  let t = e.path.lastIndexOf("/");
175
242
  return t > 0 ? e.path.slice(0, t + 1) : "";
176
243
  }))]);
177
- let a = r.filter((e) => j.startsWith(e)).reduce((e, t) => e == null || t.length < e.length ? t : e, void 0);
178
- a != null && R(g(a)), I(), G(!1);
244
+ let a = r.filter((e) => N.startsWith(e)).reduce((e, t) => e == null || t.length < e.length ? t : e, void 0);
245
+ a != null && R(C(a)), L(), ge(!1);
179
246
  })();
180
247
  }, [
248
+ M,
181
249
  A,
182
- O,
183
- k,
184
250
  j,
185
- z,
186
- D,
187
251
  N,
252
+ z,
253
+ k,
188
254
  F,
189
255
  I,
256
+ L,
190
257
  R
191
- ]), le = _((t, r) => {
258
+ ]), Oe = w((t, r) => {
192
259
  if (!t || t.trim() === "") return { reason: n.Empty };
193
- let a = r.nodeType === E.ITEM ? e(r.name).extension : "";
260
+ let a = r.nodeType === O.ITEM ? e(r.name).extension : "";
194
261
  if (t === i || a !== "" && t === `${i}${a}`) return { reason: n.ReservedName };
195
262
  if (s(t, H)) return {
196
263
  reason: n.ForbiddenSymbols,
197
- symbols: te
264
+ symbols: se
198
265
  };
199
266
  if (t.length > 255) return {
200
267
  reason: n.TooLong,
201
268
  maxLength: 255
202
269
  };
203
- let o = M?.items ?? [], c = t.toLowerCase(), l = o.find((e) => e.path !== r.path && e.name.toLowerCase() === c);
270
+ let o = P?.items ?? [], c = t.toLowerCase(), l = o.find((e) => e.path !== r.path && e.name.toLowerCase() === c);
204
271
  return l ? {
205
272
  reason: n.DuplicateName,
206
273
  existingName: l.name
207
274
  } : null;
208
- }, [H, M]), ue = _((e, n) => {
209
- if (e.length === 0 || J || X) return;
275
+ }, [H, P]), ke = w((e, n) => {
276
+ if (e.length === 0 || J || Y) return;
210
277
  let i = new AbortController();
211
- Z.current = i, (async () => {
212
- Y(!0);
213
- let o = f(e, O, k), s = o.map(({ dto: e }) => e);
278
+ X.current = i, (async () => {
279
+ ve(!0);
280
+ let o = f(e, A, j), s = o.map(({ dto: e }) => e);
214
281
  try {
215
- let { results: e } = await D.copyFiles(s, i.signal), c = e.filter((e) => !e.success).length, l = e.length - c;
282
+ let { results: e } = await k.copyFiles(s, i.signal), c = e.filter((e) => !e.success).length, l = e.length - c;
216
283
  if (l > 0) {
217
- let t = m(o, e), i = s.every((e) => g(e.sourcePath) === g(e.destinationPath)), c;
284
+ let t = m(o, e), i = s.every((e) => C(e.sourcePath) === C(e.destinationPath)), c;
218
285
  c = i ? l === 1 ? r.FileDuplicated : r.FilesDuplicated : l === 1 ? r.FileCopied : r.FilesCopied, B?.({
219
286
  kind: c,
220
287
  name: t?.destinationName,
221
288
  count: l,
222
- isFolder: t?.dto.nodeType === x.Folder,
223
- destinationFolderName: a(n, k)
289
+ isFolder: t?.dto.nodeType === ne.Folder,
290
+ destinationFolderName: a(n, j)
224
291
  });
225
292
  }
226
293
  c > 0 && c < e.length ? z?.({
227
- variant: w.Error,
294
+ variant: D.Error,
228
295
  reason: t.CopyPartiallyFailed,
229
296
  count: c
230
297
  }) : c === e.length && z?.({
231
- variant: w.Error,
298
+ variant: D.Error,
232
299
  reason: t.CopyFailed
233
300
  });
234
301
  } catch {
235
302
  i.signal.aborted || z?.({
236
- variant: w.Error,
303
+ variant: D.Error,
237
304
  reason: t.CopyFailed
238
305
  });
239
306
  } finally {
240
- F([...new Set(s.flatMap((e) => [g(e.sourcePath), g(e.destinationPath)]))]), I(), Y(!1), Z.current = null;
307
+ I([...new Set(s.flatMap((e) => [C(e.sourcePath), C(e.destinationPath)]))]), L(), ve(!1), X.current = null;
241
308
  }
242
309
  })();
243
310
  }, [
244
- O,
245
- k,
311
+ A,
312
+ j,
246
313
  z,
247
314
  B,
248
- D,
315
+ k,
249
316
  J,
250
- X,
251
- F,
252
- I
253
- ]), de = _(() => {
254
- Z.current?.abort();
317
+ Y,
318
+ I,
319
+ L
320
+ ]), Ae = w(() => {
321
+ X.current?.abort();
255
322
  }, []);
256
323
  return {
257
- isCreatingFolder: ne,
258
- isDownloading: re,
259
- isDeleting: ie,
260
- isRenaming: K,
324
+ isCreatingFolder: fe,
325
+ isDownloading: Ee,
326
+ isDeleting: he,
327
+ isRenaming: q,
261
328
  isCopying: J,
262
- isMoving: X,
263
- onCreateFolder: oe,
264
- onCreateFolderValidate: $,
265
- onDownloadFiles: se,
266
- onDeleteFiles: ce,
267
- onRenameValidate: le,
268
- onMoveToFiles: _((e, n, i) => {
269
- if (e.length === 0 || J || X || K) return;
270
- let { renameDtos: s, preparedMoveItems: c } = p(e, O, k), l = c.map(({ dto: e }) => e), u = new AbortController();
271
- l.length > 0 && (Z.current = u), (async () => {
272
- s.length > 0 && q(!0), l.length > 0 && ae(!0);
329
+ isMoving: Y,
330
+ onCreateFolder: be,
331
+ onCreateFolderValidate: Q,
332
+ onDownloadFiles: Se,
333
+ downloadBatchState: me,
334
+ cancelDownloadFile: Ce,
335
+ cancelAllDownloads: we,
336
+ clearDownloadBatch: Te,
337
+ onDeleteFiles: De,
338
+ onRenameValidate: Oe,
339
+ onMoveToFiles: w((e, n, i) => {
340
+ if (e.length === 0 || J || Y || q) return;
341
+ let { renameDtos: s, preparedMoveItems: c } = p(e, A, j), l = c.map(({ dto: e }) => e), u = new AbortController();
342
+ l.length > 0 && (X.current = u), (async () => {
343
+ s.length > 0 && _e(!0), l.length > 0 && ye(!0);
273
344
  let [e, n] = await Promise.all([(async () => {
274
345
  if (s.length === 0) return {
275
346
  results: [],
276
347
  threw: !1
277
348
  };
278
349
  try {
279
- let { results: e } = await D.renameFiles(s);
350
+ let { results: e } = await k.renameFiles(s);
280
351
  return {
281
352
  results: e,
282
353
  threw: !1
@@ -294,7 +365,7 @@ var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, cu
294
365
  aborted: !1
295
366
  };
296
367
  try {
297
- let { results: e } = await D.moveFiles(l, u.signal);
368
+ let { results: e } = await k.moveFiles(l, u.signal);
298
369
  return {
299
370
  results: e,
300
371
  threw: !1,
@@ -307,15 +378,15 @@ var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, cu
307
378
  aborted: u.signal.aborted
308
379
  };
309
380
  }
310
- })()]), d = e.threw ? s.length : e.results.filter((e) => !e.success).length, f = n.threw && n.aborted, p = f ? 0 : l.length, h = f ? 0 : n.threw ? l.length : n.results.filter((e) => !e.success).length, _ = n.threw ? 0 : n.results.filter((e) => e.success).length, v = s.length + p, y = d + h, b = h > 0;
311
- if (_ > 0) {
381
+ })()]), d = e.threw ? s.length : e.results.filter((e) => !e.success).length, f = n.threw && n.aborted, p = f ? 0 : l.length, h = f ? 0 : n.threw ? l.length : n.results.filter((e) => !e.success).length, g = n.threw ? 0 : n.results.filter((e) => e.success).length, _ = s.length + p, v = d + h, y = h > 0;
382
+ if (g > 0) {
312
383
  let e = m(c, n.results);
313
384
  B?.({
314
- kind: _ === 1 ? r.FileMoved : r.FilesMoved,
385
+ kind: g === 1 ? r.FileMoved : r.FilesMoved,
315
386
  name: e?.destinationName,
316
- count: _,
317
- isFolder: e?.dto.nodeType === ee.Folder,
318
- destinationFolderName: a(i, k)
387
+ count: g,
388
+ isFolder: e?.dto.nodeType === re.Folder,
389
+ destinationFolderName: a(i, j)
319
390
  });
320
391
  }
321
392
  if (s.length === 1 && d === 0) {
@@ -323,44 +394,44 @@ var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, cu
323
394
  B?.({
324
395
  kind: r.FileRenamed,
325
396
  name: o(e.destinationPath, e.destinationPath),
326
- isFolder: e.nodeType === C.Folder
397
+ isFolder: e.nodeType === ie.Folder
327
398
  });
328
399
  }
329
- y > 0 && (y === v ? z?.({
330
- variant: w.Error,
331
- reason: b ? t.MoveFailed : t.RenameFailed
400
+ v > 0 && (v === _ ? z?.({
401
+ variant: D.Error,
402
+ reason: y ? t.MoveFailed : t.RenameFailed
332
403
  }) : z?.({
333
- variant: w.Error,
334
- reason: b ? t.MovePartiallyFailed : t.RenamePartiallyFailed,
335
- count: y
404
+ variant: D.Error,
405
+ reason: y ? t.MovePartiallyFailed : t.RenamePartiallyFailed,
406
+ count: v
336
407
  }));
337
- let x = s.find((t) => t.nodeType === C.Folder && e.results.some((e) => e.success && e.sourcePath === t.sourcePath));
338
- if (x != null) {
339
- let e = x.sourcePath.endsWith("/") ? x.sourcePath : `${x.sourcePath}/`;
340
- if (j === e || j.startsWith(e)) {
341
- let t = x.destinationPath.endsWith("/") ? x.destinationPath : `${x.destinationPath}/`;
342
- R(j.replace(e, t));
408
+ let b = s.find((t) => t.nodeType === ie.Folder && e.results.some((e) => e.success && e.sourcePath === t.sourcePath));
409
+ if (b != null) {
410
+ let e = b.sourcePath.endsWith("/") ? b.sourcePath : `${b.sourcePath}/`;
411
+ if (N === e || N.startsWith(e)) {
412
+ let t = b.destinationPath.endsWith("/") ? b.destinationPath : `${b.destinationPath}/`;
413
+ R(N.replace(e, t));
343
414
  }
344
415
  }
345
- F([...new Set([...s, ...l].flatMap((e) => [g(e.sourcePath), g(e.destinationPath)]))]), I(), q(!1), ae(!1), l.length > 0 && (Z.current = null);
416
+ I([...new Set([...s, ...l].flatMap((e) => [C(e.sourcePath), C(e.destinationPath)]))]), L(), _e(!1), ye(!1), l.length > 0 && (X.current = null);
346
417
  })();
347
418
  }, [
348
- O,
349
- k,
419
+ A,
350
420
  j,
421
+ N,
351
422
  B,
352
423
  z,
353
- D,
424
+ k,
354
425
  J,
355
- X,
356
- K,
357
- F,
426
+ Y,
427
+ q,
358
428
  I,
429
+ L,
359
430
  R
360
431
  ]),
361
- onCopyFiles: ue,
362
- cancelCopyMove: de
432
+ onCopyFiles: ke,
433
+ cancelCopyMove: Ae
363
434
  };
364
435
  };
365
436
  //#endregion
366
- export { D as useDialFileMutations };
437
+ export { A as useDialFileMutations };
@@ -0,0 +1,33 @@
1
+ import { Attachment } from '@epam/ai-dial-chat-shared';
2
+ import { DialFile, FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
3
+ /** Host data and canvas operations for file preview. */
4
+ export interface UseDialFilePreviewOptions {
5
+ /** Current folder tree. */
6
+ items: DialFile[];
7
+ /** Current search hits. Defaults to null. */
8
+ searchResults?: DialFile[] | null;
9
+ /** Default file bucket. */
10
+ bucket: string;
11
+ /** Supported filename extensions, chosen by the host. */
12
+ previewExtensions: string[];
13
+ /** Starts a request and returns its commit guard. */
14
+ startRequest: () => () => boolean;
15
+ /** Opens an attachment, consulting the guard before committing. */
16
+ openAttachment: (attachment: Attachment, isCurrent: () => boolean) => Promise<boolean>;
17
+ /** Opens an unsupported preview with an optional download URL. */
18
+ openUnsupported: (name: string, id: string | undefined, url?: string) => void;
19
+ /** Resolves a download URL for an unsupported attachment. */
20
+ resolveUrl: (attachment: Attachment) => string | undefined;
21
+ }
22
+ /** Stable grid callbacks and the supplied extension policy. */
23
+ export interface UseDialFilePreviewResult {
24
+ /** Previews a file from either current listing. */
25
+ onPreview: (path?: string) => void;
26
+ /** Previews the clicked row. */
27
+ onFileClick: (row: FileManagerGridRow) => void;
28
+ /** Host-provided extension policy. */
29
+ previewExtensions: string[];
30
+ }
31
+ /** Previews current files while rejecting stale or unmounted completions. */
32
+ export declare const useDialFilePreview: ({ items, searchResults, bucket, previewExtensions, startRequest, openAttachment, openUnsupported, resolveUrl, }: UseDialFilePreviewOptions) => UseDialFilePreviewResult;
33
+ //# sourceMappingURL=useDialFilePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialFilePreview.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFilePreview/useDialFilePreview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EACV,QAAQ,EACR,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAM1C,wDAAwD;AACxD,MAAM,WAAW,yBAAyB;IACxC,2BAA2B;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAClC,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qDAAqD;IACrD,YAAY,EAAE,MAAM,MAAM,OAAO,CAAC;IAClC,mEAAmE;IACnE,cAAc,EAAE,CACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,OAAO,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,kEAAkE;IAClE,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,6DAA6D;IAC7D,UAAU,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,MAAM,GAAG,SAAS,CAAC;CAC5D;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,mDAAmD;IACnD,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gCAAgC;IAChC,WAAW,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,sCAAsC;IACtC,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,GAAI,iHAShC,yBAAyB,KAAG,wBAmD9B,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { findDialFileByPath as e } from "../dial-file-manager-path.util.js";
2
+ import { dialFileToAttachment as t } from "../dial-file-to-attachment.js";
3
+ import { useCallback as n, useEffect as r, useRef as i } from "react";
4
+ import { DialFileNodeType as a } from "@epam/ai-dial-ui-kit";
5
+ //#region src/files/useDialFilePreview/useDialFilePreview.ts
6
+ var o = ({ items: o, searchResults: s = null, bucket: c, previewExtensions: l, startRequest: u, openAttachment: d, openUnsupported: f, resolveUrl: p }) => {
7
+ let m = i({
8
+ items: o,
9
+ searchResults: s
10
+ }), h = i(void 0);
11
+ r(() => {
12
+ m.current = {
13
+ items: o,
14
+ searchResults: s
15
+ };
16
+ }, [o, s]), r(() => (h.current = {}, () => {
17
+ h.current = void 0;
18
+ }), []);
19
+ let g = n((n) => {
20
+ if (n == null) return;
21
+ let r = e(m.current.items, n) ?? e(m.current.searchResults ?? [], n);
22
+ if (r?.nodeType !== a.ITEM) return;
23
+ let i = h.current, o = u(), s = () => i !== void 0 && h.current === i && o(), l = t(r, c);
24
+ l ? (async () => {
25
+ let e = !1;
26
+ try {
27
+ e = await d(l, s);
28
+ } catch {}
29
+ !e && s() && f(l.name, l.id, p(l));
30
+ })() : s() && f(r.name, r.path);
31
+ }, [
32
+ c,
33
+ u,
34
+ d,
35
+ f,
36
+ p
37
+ ]);
38
+ return {
39
+ onPreview: g,
40
+ onFileClick: n((e) => g(e.path), [g]),
41
+ previewExtensions: l
42
+ };
43
+ };
44
+ //#endregion
45
+ export { o as useDialFilePreview };