@assistant-ui/react 0.9.5 → 0.10.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 (1321) hide show
  1. package/dist/api/AssistantRuntime.js +8 -34
  2. package/dist/api/AssistantRuntime.js.map +1 -1
  3. package/dist/api/AttachmentRuntime.js +12 -41
  4. package/dist/api/AttachmentRuntime.js.map +1 -1
  5. package/dist/api/ComposerRuntime.js +29 -54
  6. package/dist/api/ComposerRuntime.js.map +1 -1
  7. package/dist/api/ContentPartRuntime.js +4 -30
  8. package/dist/api/ContentPartRuntime.js.map +1 -1
  9. package/dist/api/MessageRuntime.js +34 -55
  10. package/dist/api/MessageRuntime.js.map +1 -1
  11. package/dist/api/RuntimePathTypes.js +0 -18
  12. package/dist/api/RuntimePathTypes.js.map +1 -1
  13. package/dist/api/ThreadListItemRuntime.js +4 -30
  14. package/dist/api/ThreadListItemRuntime.js.map +1 -1
  15. package/dist/api/ThreadListRuntime.js +30 -52
  16. package/dist/api/ThreadListRuntime.js.map +1 -1
  17. package/dist/api/ThreadRuntime.js +27 -50
  18. package/dist/api/ThreadRuntime.js.map +1 -1
  19. package/dist/api/index.js +0 -18
  20. package/dist/api/index.js.map +1 -1
  21. package/dist/api/subscribable/BaseSubject.js +4 -30
  22. package/dist/api/subscribable/BaseSubject.js.map +1 -1
  23. package/dist/api/subscribable/EventSubscriptionSubject.js +5 -31
  24. package/dist/api/subscribable/EventSubscriptionSubject.js.map +1 -1
  25. package/dist/api/subscribable/LazyMemoizeSubject.js +7 -33
  26. package/dist/api/subscribable/LazyMemoizeSubject.js.map +1 -1
  27. package/dist/api/subscribable/NestedSubscriptionSubject.js +5 -31
  28. package/dist/api/subscribable/NestedSubscriptionSubject.js.map +1 -1
  29. package/dist/api/subscribable/SKIP_UPDATE.js +3 -29
  30. package/dist/api/subscribable/SKIP_UPDATE.js.map +1 -1
  31. package/dist/api/subscribable/ShallowMemoizeSubject.js +10 -36
  32. package/dist/api/subscribable/ShallowMemoizeSubject.js.map +1 -1
  33. package/dist/api/subscribable/Subscribable.js +0 -18
  34. package/dist/api/subscribable/Subscribable.js.map +1 -1
  35. package/dist/api/subscribable/shallowEqual.js +2 -28
  36. package/dist/api/subscribable/shallowEqual.js.map +1 -1
  37. package/dist/cloud/AssistantCloud.js +12 -38
  38. package/dist/cloud/AssistantCloud.js.map +1 -1
  39. package/dist/cloud/AssistantCloudAPI.js +14 -36
  40. package/dist/cloud/AssistantCloudAPI.js.map +1 -1
  41. package/dist/cloud/AssistantCloudAuthStrategy.js +10 -38
  42. package/dist/cloud/AssistantCloudAuthStrategy.js.map +1 -1
  43. package/dist/cloud/AssistantCloudAuthTokens.js +4 -30
  44. package/dist/cloud/AssistantCloudAuthTokens.js.map +1 -1
  45. package/dist/cloud/AssistantCloudRuns.js +6 -32
  46. package/dist/cloud/AssistantCloudRuns.js.map +1 -1
  47. package/dist/cloud/AssistantCloudThreadHistoryAdapter.js +12 -38
  48. package/dist/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
  49. package/dist/cloud/AssistantCloudThreadMessages.js +4 -30
  50. package/dist/cloud/AssistantCloudThreadMessages.js.map +1 -1
  51. package/dist/cloud/AssistantCloudThreads.js +6 -32
  52. package/dist/cloud/AssistantCloudThreads.js.map +1 -1
  53. package/dist/cloud/auiV0.js +8 -35
  54. package/dist/cloud/auiV0.js.map +1 -1
  55. package/dist/cloud/index.js +4 -31
  56. package/dist/cloud/index.js.map +1 -1
  57. package/dist/cloud/useCloudThreadListRuntime.js +7 -33
  58. package/dist/cloud/useCloudThreadListRuntime.js.map +1 -1
  59. package/dist/context/ReadonlyStore.js +3 -29
  60. package/dist/context/ReadonlyStore.js.map +1 -1
  61. package/dist/context/index.js +3 -28
  62. package/dist/context/index.js.map +1 -1
  63. package/dist/context/providers/AssistantRuntimeProvider.js +31 -53
  64. package/dist/context/providers/AssistantRuntimeProvider.js.map +1 -1
  65. package/dist/context/providers/AttachmentRuntimeProvider.js +16 -42
  66. package/dist/context/providers/AttachmentRuntimeProvider.js.map +1 -1
  67. package/dist/context/providers/ContentPartRuntimeProvider.js +16 -42
  68. package/dist/context/providers/ContentPartRuntimeProvider.js.map +1 -1
  69. package/dist/context/providers/MessageRuntimeProvider.js +19 -45
  70. package/dist/context/providers/MessageRuntimeProvider.js.map +1 -1
  71. package/dist/context/providers/TextContentPartProvider.js +24 -46
  72. package/dist/context/providers/TextContentPartProvider.js.map +1 -1
  73. package/dist/context/providers/ThreadListItemRuntimeProvider.js +18 -42
  74. package/dist/context/providers/ThreadListItemRuntimeProvider.js.map +1 -1
  75. package/dist/context/providers/ThreadRuntimeProvider.js +19 -45
  76. package/dist/context/providers/ThreadRuntimeProvider.js.map +1 -1
  77. package/dist/context/providers/ThreadViewportProvider.js +19 -42
  78. package/dist/context/providers/ThreadViewportProvider.js.map +1 -1
  79. package/dist/context/providers/index.js +4 -31
  80. package/dist/context/providers/index.js.map +1 -1
  81. package/dist/context/react/AssistantContext.js +11 -42
  82. package/dist/context/react/AssistantContext.js.map +1 -1
  83. package/dist/context/react/AttachmentContext.js +11 -45
  84. package/dist/context/react/AttachmentContext.js.map +1 -1
  85. package/dist/context/react/ComposerContext.js +8 -35
  86. package/dist/context/react/ComposerContext.js.map +1 -1
  87. package/dist/context/react/ContentPartContext.js +8 -36
  88. package/dist/context/react/ContentPartContext.js.map +1 -1
  89. package/dist/context/react/MessageContext.js +12 -43
  90. package/dist/context/react/MessageContext.js.map +1 -1
  91. package/dist/context/react/ThreadContext.js +12 -42
  92. package/dist/context/react/ThreadContext.js.map +1 -1
  93. package/dist/context/react/ThreadListItemContext.js +8 -36
  94. package/dist/context/react/ThreadListItemContext.js.map +1 -1
  95. package/dist/context/react/ThreadViewportContext.js +8 -36
  96. package/dist/context/react/ThreadViewportContext.js.map +1 -1
  97. package/dist/context/react/index.js +38 -62
  98. package/dist/context/react/index.js.map +1 -1
  99. package/dist/context/react/utils/createContextHook.js +4 -30
  100. package/dist/context/react/utils/createContextHook.js.map +1 -1
  101. package/dist/context/react/utils/createContextStoreHook.js +2 -28
  102. package/dist/context/react/utils/createContextStoreHook.js.map +1 -1
  103. package/dist/context/react/utils/createStateHookForRuntime.js +6 -30
  104. package/dist/context/react/utils/createStateHookForRuntime.js.map +1 -1
  105. package/dist/context/react/utils/ensureBinding.js +21 -27
  106. package/dist/context/react/utils/ensureBinding.js.map +1 -1
  107. package/dist/context/react/utils/useRuntimeState.js +8 -35
  108. package/dist/context/react/utils/useRuntimeState.js.map +1 -1
  109. package/dist/context/stores/AssistantToolUIs.js +4 -30
  110. package/dist/context/stores/AssistantToolUIs.js.map +1 -1
  111. package/dist/context/stores/MessageUtils.js +4 -30
  112. package/dist/context/stores/MessageUtils.js.map +1 -1
  113. package/dist/context/stores/ThreadViewport.js +5 -31
  114. package/dist/context/stores/ThreadViewport.js.map +1 -1
  115. package/dist/context/stores/index.js +0 -18
  116. package/dist/context/stores/index.js.map +1 -1
  117. package/dist/index.js +10 -54
  118. package/dist/index.js.map +1 -1
  119. package/dist/internal.js +16 -51
  120. package/dist/internal.js.map +1 -1
  121. package/dist/model-context/ModelContextTypes.js +3 -48
  122. package/dist/model-context/ModelContextTypes.js.map +1 -1
  123. package/dist/model-context/index.js +17 -47
  124. package/dist/model-context/index.js.map +1 -1
  125. package/dist/model-context/makeAssistantTool.js +5 -31
  126. package/dist/model-context/makeAssistantTool.js.map +1 -1
  127. package/dist/model-context/makeAssistantToolUI.js +7 -31
  128. package/dist/model-context/makeAssistantToolUI.js.map +1 -1
  129. package/dist/model-context/makeAssistantVisible.js +33 -52
  130. package/dist/model-context/makeAssistantVisible.js.map +1 -1
  131. package/dist/model-context/tool.js +2 -28
  132. package/dist/model-context/tool.js.map +1 -1
  133. package/dist/model-context/useAssistantInstructions.js +8 -34
  134. package/dist/model-context/useAssistantInstructions.js.map +1 -1
  135. package/dist/model-context/useAssistantTool.js +12 -35
  136. package/dist/model-context/useAssistantTool.js.map +1 -1
  137. package/dist/model-context/useAssistantToolUI.js +7 -33
  138. package/dist/model-context/useAssistantToolUI.js.map +1 -1
  139. package/dist/model-context/useInlineRender.js +8 -34
  140. package/dist/model-context/useInlineRender.js.map +1 -1
  141. package/dist/primitives/actionBar/ActionBarCopy.js +24 -47
  142. package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
  143. package/dist/primitives/actionBar/ActionBarEdit.js +12 -36
  144. package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
  145. package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +17 -43
  146. package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
  147. package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +15 -41
  148. package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
  149. package/dist/primitives/actionBar/ActionBarReload.js +15 -39
  150. package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
  151. package/dist/primitives/actionBar/ActionBarRoot.js +15 -38
  152. package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
  153. package/dist/primitives/actionBar/ActionBarSpeak.js +12 -36
  154. package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
  155. package/dist/primitives/actionBar/ActionBarStopSpeaking.js +21 -44
  156. package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
  157. package/dist/primitives/actionBar/index.js +17 -50
  158. package/dist/primitives/actionBar/index.js.map +1 -1
  159. package/dist/primitives/actionBar/useActionBarFloatStatus.js +13 -37
  160. package/dist/primitives/actionBar/useActionBarFloatStatus.js.map +1 -1
  161. package/dist/primitives/assistantModal/AssistantModalAnchor.js +9 -45
  162. package/dist/primitives/assistantModal/AssistantModalAnchor.js.map +1 -1
  163. package/dist/primitives/assistantModal/AssistantModalContent.js +11 -47
  164. package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
  165. package/dist/primitives/assistantModal/AssistantModalRoot.js +14 -50
  166. package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
  167. package/dist/primitives/assistantModal/AssistantModalTrigger.js +9 -45
  168. package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
  169. package/dist/primitives/assistantModal/index.js +9 -38
  170. package/dist/primitives/assistantModal/index.js.map +1 -1
  171. package/dist/primitives/assistantModal/scope.js +4 -40
  172. package/dist/primitives/assistantModal/scope.js.map +1 -1
  173. package/dist/primitives/attachment/AttachmentName.js +7 -33
  174. package/dist/primitives/attachment/AttachmentName.js.map +1 -1
  175. package/dist/primitives/attachment/AttachmentRemove.js +11 -35
  176. package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
  177. package/dist/primitives/attachment/AttachmentRoot.js +7 -33
  178. package/dist/primitives/attachment/AttachmentRoot.js.map +1 -1
  179. package/dist/primitives/attachment/AttachmentThumb.js +9 -35
  180. package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
  181. package/dist/primitives/attachment/index.js +9 -38
  182. package/dist/primitives/attachment/index.js.map +1 -1
  183. package/dist/primitives/branchPicker/BranchPickerCount.js +8 -34
  184. package/dist/primitives/branchPicker/BranchPickerCount.js.map +1 -1
  185. package/dist/primitives/branchPicker/BranchPickerNext.js +15 -36
  186. package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
  187. package/dist/primitives/branchPicker/BranchPickerNumber.js +8 -34
  188. package/dist/primitives/branchPicker/BranchPickerNumber.js.map +1 -1
  189. package/dist/primitives/branchPicker/BranchPickerPrevious.js +15 -36
  190. package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
  191. package/dist/primitives/branchPicker/BranchPickerRoot.js +8 -34
  192. package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
  193. package/dist/primitives/branchPicker/index.js +11 -41
  194. package/dist/primitives/branchPicker/index.js.map +1 -1
  195. package/dist/primitives/composer/ComposerAddAttachment.js +12 -36
  196. package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
  197. package/dist/primitives/composer/ComposerAttachments.js +19 -45
  198. package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
  199. package/dist/primitives/composer/ComposerCancel.js +12 -36
  200. package/dist/primitives/composer/ComposerCancel.js.map +1 -1
  201. package/dist/primitives/composer/ComposerIf.js +6 -32
  202. package/dist/primitives/composer/ComposerIf.js.map +1 -1
  203. package/dist/primitives/composer/ComposerInput.js +39 -67
  204. package/dist/primitives/composer/ComposerInput.js.map +1 -1
  205. package/dist/primitives/composer/ComposerRoot.js +14 -38
  206. package/dist/primitives/composer/ComposerRoot.js.map +1 -1
  207. package/dist/primitives/composer/ComposerSend.js +15 -40
  208. package/dist/primitives/composer/ComposerSend.js.map +1 -1
  209. package/dist/primitives/composer/index.js +15 -47
  210. package/dist/primitives/composer/index.js.map +1 -1
  211. package/dist/primitives/contentPart/ContentPartImage.js +9 -35
  212. package/dist/primitives/contentPart/ContentPartImage.js.map +1 -1
  213. package/dist/primitives/contentPart/ContentPartInProgress.js +5 -31
  214. package/dist/primitives/contentPart/ContentPartInProgress.js.map +1 -1
  215. package/dist/primitives/contentPart/ContentPartText.js +11 -35
  216. package/dist/primitives/contentPart/ContentPartText.js.map +1 -1
  217. package/dist/primitives/contentPart/index.js +7 -35
  218. package/dist/primitives/contentPart/index.js.map +1 -1
  219. package/dist/primitives/contentPart/useContentPartFile.js +5 -31
  220. package/dist/primitives/contentPart/useContentPartFile.js.map +1 -1
  221. package/dist/primitives/contentPart/useContentPartImage.js +5 -31
  222. package/dist/primitives/contentPart/useContentPartImage.js.map +1 -1
  223. package/dist/primitives/contentPart/useContentPartReasoning.js +5 -31
  224. package/dist/primitives/contentPart/useContentPartReasoning.js.map +1 -1
  225. package/dist/primitives/contentPart/useContentPartSource.js +5 -31
  226. package/dist/primitives/contentPart/useContentPartSource.js.map +1 -1
  227. package/dist/primitives/contentPart/useContentPartText.js +5 -31
  228. package/dist/primitives/contentPart/useContentPartText.js.map +1 -1
  229. package/dist/primitives/index.js +18 -69
  230. package/dist/primitives/index.js.map +1 -1
  231. package/dist/primitives/message/MessageAttachments.js +19 -45
  232. package/dist/primitives/message/MessageAttachments.js.map +1 -1
  233. package/dist/primitives/message/MessageContent.js +54 -72
  234. package/dist/primitives/message/MessageContent.js.map +1 -1
  235. package/dist/primitives/message/MessageIf.js +12 -35
  236. package/dist/primitives/message/MessageIf.js.map +1 -1
  237. package/dist/primitives/message/MessageRoot.js +18 -41
  238. package/dist/primitives/message/MessageRoot.js.map +1 -1
  239. package/dist/primitives/message/index.js +9 -38
  240. package/dist/primitives/message/index.js.map +1 -1
  241. package/dist/primitives/thread/ThreadEmpty.js +5 -31
  242. package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
  243. package/dist/primitives/thread/ThreadIf.js +6 -32
  244. package/dist/primitives/thread/ThreadIf.js.map +1 -1
  245. package/dist/primitives/thread/ThreadMessages.js +23 -50
  246. package/dist/primitives/thread/ThreadMessages.js.map +1 -1
  247. package/dist/primitives/thread/ThreadRoot.js +7 -33
  248. package/dist/primitives/thread/ThreadRoot.js.map +1 -1
  249. package/dist/primitives/thread/ThreadScrollToBottom.js +15 -36
  250. package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
  251. package/dist/primitives/thread/ThreadSuggestion.js +13 -37
  252. package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
  253. package/dist/primitives/thread/ThreadViewport.js +14 -40
  254. package/dist/primitives/thread/ThreadViewport.js.map +1 -1
  255. package/dist/primitives/thread/index.js +15 -47
  256. package/dist/primitives/thread/index.js.map +1 -1
  257. package/dist/primitives/thread/useThreadViewportAutoScroll.js +22 -48
  258. package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
  259. package/dist/primitives/threadList/ThreadListItems.js +14 -40
  260. package/dist/primitives/threadList/ThreadListItems.js.map +1 -1
  261. package/dist/primitives/threadList/ThreadListNew.js +14 -40
  262. package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
  263. package/dist/primitives/threadList/ThreadListRoot.js +7 -33
  264. package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
  265. package/dist/primitives/threadList/index.js +7 -35
  266. package/dist/primitives/threadList/index.js.map +1 -1
  267. package/dist/primitives/threadListItem/ThreadListItemArchive.js +11 -35
  268. package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
  269. package/dist/primitives/threadListItem/ThreadListItemDelete.js +9 -33
  270. package/dist/primitives/threadListItem/ThreadListItemDelete.js.map +1 -1
  271. package/dist/primitives/threadListItem/ThreadListItemRoot.js +10 -36
  272. package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
  273. package/dist/primitives/threadListItem/ThreadListItemTitle.js +7 -33
  274. package/dist/primitives/threadListItem/ThreadListItemTitle.js.map +1 -1
  275. package/dist/primitives/threadListItem/ThreadListItemTrigger.js +9 -33
  276. package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
  277. package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +9 -33
  278. package/dist/primitives/threadListItem/ThreadListItemUnarchive.js.map +1 -1
  279. package/dist/primitives/threadListItem/index.js +13 -44
  280. package/dist/primitives/threadListItem/index.js.map +1 -1
  281. package/dist/runtimes/adapters/RuntimeAdapterProvider.js +10 -37
  282. package/dist/runtimes/adapters/RuntimeAdapterProvider.js.map +1 -1
  283. package/dist/runtimes/adapters/attachment/AttachmentAdapter.js +0 -18
  284. package/dist/runtimes/adapters/attachment/AttachmentAdapter.js.map +1 -1
  285. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.js +4 -30
  286. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.js.map +1 -1
  287. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.js +5 -31
  288. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.js.map +1 -1
  289. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.js +5 -31
  290. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.js.map +1 -1
  291. package/dist/runtimes/adapters/attachment/index.js +5 -33
  292. package/dist/runtimes/adapters/attachment/index.js.map +1 -1
  293. package/dist/runtimes/adapters/feedback/FeedbackAdapter.js +0 -18
  294. package/dist/runtimes/adapters/feedback/FeedbackAdapter.js.map +1 -1
  295. package/dist/runtimes/adapters/feedback/index.js +0 -18
  296. package/dist/runtimes/adapters/feedback/index.js.map +1 -1
  297. package/dist/runtimes/adapters/index.js +4 -30
  298. package/dist/runtimes/adapters/index.js.map +1 -1
  299. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.js +0 -18
  300. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.js.map +1 -1
  301. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.js +4 -30
  302. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.js.map +1 -1
  303. package/dist/runtimes/adapters/speech/index.js +3 -29
  304. package/dist/runtimes/adapters/speech/index.js.map +1 -1
  305. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.js +0 -18
  306. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.js.map +1 -1
  307. package/dist/runtimes/adapters/suggestion/index.js +0 -18
  308. package/dist/runtimes/adapters/suggestion/index.js.map +1 -1
  309. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.js +0 -18
  310. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.js.map +1 -1
  311. package/dist/runtimes/composer/BaseComposerRuntimeCore.js +6 -32
  312. package/dist/runtimes/composer/BaseComposerRuntimeCore.js.map +1 -1
  313. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js +8 -34
  314. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
  315. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.js +5 -31
  316. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.js.map +1 -1
  317. package/dist/runtimes/core/AssistantRuntimeCore.js +0 -18
  318. package/dist/runtimes/core/AssistantRuntimeCore.js.map +1 -1
  319. package/dist/runtimes/core/BaseAssistantRuntimeCore.js +6 -32
  320. package/dist/runtimes/core/BaseAssistantRuntimeCore.js.map +1 -1
  321. package/dist/runtimes/core/BaseThreadRuntimeCore.js +14 -38
  322. package/dist/runtimes/core/BaseThreadRuntimeCore.js.map +1 -1
  323. package/dist/runtimes/core/ComposerRuntimeCore.js +0 -18
  324. package/dist/runtimes/core/ComposerRuntimeCore.js.map +1 -1
  325. package/dist/runtimes/core/ThreadListRuntimeCore.js +0 -18
  326. package/dist/runtimes/core/ThreadListRuntimeCore.js.map +1 -1
  327. package/dist/runtimes/core/ThreadRuntimeCore.js +0 -18
  328. package/dist/runtimes/core/ThreadRuntimeCore.js.map +1 -1
  329. package/dist/runtimes/core/index.js +0 -18
  330. package/dist/runtimes/core/index.js.map +1 -1
  331. package/dist/runtimes/external-store/ExternalStoreAdapter.js +0 -18
  332. package/dist/runtimes/external-store/ExternalStoreAdapter.js.map +1 -1
  333. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +10 -36
  334. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
  335. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js +9 -35
  336. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
  337. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js +23 -47
  338. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
  339. package/dist/runtimes/external-store/ThreadMessageConverter.js +4 -30
  340. package/dist/runtimes/external-store/ThreadMessageConverter.js.map +1 -1
  341. package/dist/runtimes/external-store/ThreadMessageLike.js +8 -34
  342. package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
  343. package/dist/runtimes/external-store/auto-status.js +6 -33
  344. package/dist/runtimes/external-store/auto-status.js.map +1 -1
  345. package/dist/runtimes/external-store/createMessageConverter.js +22 -40
  346. package/dist/runtimes/external-store/createMessageConverter.js.map +1 -1
  347. package/dist/runtimes/external-store/external-message-converter.js +30 -54
  348. package/dist/runtimes/external-store/external-message-converter.js.map +1 -1
  349. package/dist/runtimes/external-store/getExternalStoreMessage.js +7 -35
  350. package/dist/runtimes/external-store/getExternalStoreMessage.js.map +1 -1
  351. package/dist/runtimes/external-store/index.js +14 -39
  352. package/dist/runtimes/external-store/index.js.map +1 -1
  353. package/dist/runtimes/external-store/useExternalStoreRuntime.js +12 -38
  354. package/dist/runtimes/external-store/useExternalStoreRuntime.js.map +1 -1
  355. package/dist/runtimes/index.js +8 -40
  356. package/dist/runtimes/index.js.map +1 -1
  357. package/dist/runtimes/local/ChatModelAdapter.js +0 -18
  358. package/dist/runtimes/local/ChatModelAdapter.js.map +1 -1
  359. package/dist/runtimes/local/LocalRuntimeCore.js +11 -37
  360. package/dist/runtimes/local/LocalRuntimeCore.js.map +1 -1
  361. package/dist/runtimes/local/LocalRuntimeOptions.js +3 -29
  362. package/dist/runtimes/local/LocalRuntimeOptions.js.map +1 -1
  363. package/dist/runtimes/local/LocalThreadListRuntimeCore.js +6 -32
  364. package/dist/runtimes/local/LocalThreadListRuntimeCore.js.map +1 -1
  365. package/dist/runtimes/local/LocalThreadRuntimeCore.js +11 -37
  366. package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
  367. package/dist/runtimes/local/index.js +3 -29
  368. package/dist/runtimes/local/index.js.map +1 -1
  369. package/dist/runtimes/local/shouldContinue.js +3 -29
  370. package/dist/runtimes/local/shouldContinue.js.map +1 -1
  371. package/dist/runtimes/local/useLocalRuntime.js +18 -44
  372. package/dist/runtimes/local/useLocalRuntime.js.map +1 -1
  373. package/dist/runtimes/remote-thread-list/BaseSubscribable.js +4 -30
  374. package/dist/runtimes/remote-thread-list/BaseSubscribable.js.map +1 -1
  375. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.js +4 -30
  376. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.js.map +1 -1
  377. package/dist/runtimes/remote-thread-list/OptimisticState.js +6 -32
  378. package/dist/runtimes/remote-thread-list/OptimisticState.js.map +1 -1
  379. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.js +33 -50
  380. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.js.map +1 -1
  381. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js +28 -54
  382. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
  383. package/dist/runtimes/remote-thread-list/adapter/cloud.js +23 -44
  384. package/dist/runtimes/remote-thread-list/adapter/cloud.js.map +1 -1
  385. package/dist/runtimes/remote-thread-list/adapter/in-memory.js +4 -30
  386. package/dist/runtimes/remote-thread-list/adapter/in-memory.js.map +1 -1
  387. package/dist/runtimes/remote-thread-list/index.js +5 -32
  388. package/dist/runtimes/remote-thread-list/index.js.map +1 -1
  389. package/dist/runtimes/remote-thread-list/types.js +0 -18
  390. package/dist/runtimes/remote-thread-list/types.js.map +1 -1
  391. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js +13 -39
  392. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js.map +1 -1
  393. package/dist/runtimes/utils/MessageRepository.js +14 -41
  394. package/dist/runtimes/utils/MessageRepository.js.map +1 -1
  395. package/dist/tests/setup.js +3 -2995
  396. package/dist/tests/setup.js.map +1 -1
  397. package/dist/types/AssistantTypes.js +0 -18
  398. package/dist/types/AssistantTypes.js.map +1 -1
  399. package/dist/types/AttachmentTypes.js +0 -18
  400. package/dist/types/AttachmentTypes.js.map +1 -1
  401. package/dist/types/ContentPartComponentTypes.js +0 -18
  402. package/dist/types/ContentPartComponentTypes.js.map +1 -1
  403. package/dist/types/Unsubscribe.js +0 -18
  404. package/dist/types/Unsubscribe.js.map +1 -1
  405. package/dist/types/index.js +0 -18
  406. package/dist/types/index.js.map +1 -1
  407. package/dist/utils/CompositeContextProvider.js +8 -32
  408. package/dist/utils/CompositeContextProvider.js.map +1 -1
  409. package/dist/utils/RequireAtLeastOne.js +0 -18
  410. package/dist/utils/RequireAtLeastOne.js.map +1 -1
  411. package/dist/utils/combined/createCombinedStore.js +5 -31
  412. package/dist/utils/combined/createCombinedStore.js.map +1 -1
  413. package/dist/utils/combined/useCombinedStore.js +8 -32
  414. package/dist/utils/combined/useCombinedStore.js.map +1 -1
  415. package/dist/utils/createActionButton.js +13 -37
  416. package/dist/utils/createActionButton.js.map +1 -1
  417. package/dist/utils/getThreadMessageText.js +3 -29
  418. package/dist/utils/getThreadMessageText.js.map +1 -1
  419. package/dist/utils/hooks/useManagedRef.js +6 -32
  420. package/dist/utils/hooks/useManagedRef.js.map +1 -1
  421. package/dist/utils/hooks/useOnResizeContent.js +9 -35
  422. package/dist/utils/hooks/useOnResizeContent.js.map +1 -1
  423. package/dist/utils/hooks/useOnScrollToBottom.js +9 -35
  424. package/dist/utils/hooks/useOnScrollToBottom.js.map +1 -1
  425. package/dist/utils/idUtils.js +7 -35
  426. package/dist/utils/idUtils.js.map +1 -1
  427. package/dist/utils/json/is-json.js +2 -30
  428. package/dist/utils/json/is-json.js.map +1 -1
  429. package/dist/utils/json/json-value.js +0 -18
  430. package/dist/utils/json/json-value.js.map +1 -1
  431. package/dist/utils/smooth/SmoothContext.js +24 -48
  432. package/dist/utils/smooth/SmoothContext.js.map +1 -1
  433. package/dist/utils/smooth/index.js +4 -32
  434. package/dist/utils/smooth/index.js.map +1 -1
  435. package/dist/utils/smooth/useSmooth.js +23 -49
  436. package/dist/utils/smooth/useSmooth.js.map +1 -1
  437. package/dist/utils/useToolArgsFieldStatus.js +8 -34
  438. package/dist/utils/useToolArgsFieldStatus.js.map +1 -1
  439. package/package.json +18 -9
  440. package/src/model-context/ModelContextTypes.ts +14 -21
  441. package/src/model-context/makeAssistantVisible.tsx +2 -0
  442. package/src/model-context/tool.ts +6 -12
  443. package/src/runtimes/external-store/createMessageConverter.tsx +10 -1
  444. package/dist/api/AssistantRuntime.d.ts +0 -64
  445. package/dist/api/AssistantRuntime.d.ts.map +0 -1
  446. package/dist/api/AssistantRuntime.mjs +0 -46
  447. package/dist/api/AssistantRuntime.mjs.map +0 -1
  448. package/dist/api/AttachmentRuntime.d.ts +0 -63
  449. package/dist/api/AttachmentRuntime.d.ts.map +0 -1
  450. package/dist/api/AttachmentRuntime.mjs +0 -59
  451. package/dist/api/AttachmentRuntime.mjs.map +0 -1
  452. package/dist/api/ComposerRuntime.d.ts +0 -114
  453. package/dist/api/ComposerRuntime.d.ts.map +0 -1
  454. package/dist/api/ComposerRuntime.mjs +0 -230
  455. package/dist/api/ComposerRuntime.mjs.map +0 -1
  456. package/dist/api/ContentPartRuntime.d.ts +0 -33
  457. package/dist/api/ContentPartRuntime.d.ts.map +0 -1
  458. package/dist/api/ContentPartRuntime.mjs +0 -47
  459. package/dist/api/ContentPartRuntime.mjs.map +0 -1
  460. package/dist/api/MessageRuntime.d.ts +0 -80
  461. package/dist/api/MessageRuntime.d.ts.map +0 -1
  462. package/dist/api/MessageRuntime.mjs +0 -212
  463. package/dist/api/MessageRuntime.mjs.map +0 -1
  464. package/dist/api/RuntimePathTypes.d.ts +0 -64
  465. package/dist/api/RuntimePathTypes.d.ts.map +0 -1
  466. package/dist/api/RuntimePathTypes.mjs +0 -1
  467. package/dist/api/RuntimePathTypes.mjs.map +0 -1
  468. package/dist/api/ThreadListItemRuntime.d.ts +0 -55
  469. package/dist/api/ThreadListItemRuntime.d.ts.map +0 -1
  470. package/dist/api/ThreadListItemRuntime.mjs +0 -71
  471. package/dist/api/ThreadListItemRuntime.mjs.map +0 -1
  472. package/dist/api/ThreadListRuntime.d.ts +0 -42
  473. package/dist/api/ThreadListRuntime.d.ts.map +0 -1
  474. package/dist/api/ThreadListRuntime.mjs +0 -165
  475. package/dist/api/ThreadListRuntime.mjs.map +0 -1
  476. package/dist/api/ThreadRuntime.d.ts +0 -216
  477. package/dist/api/ThreadRuntime.d.ts.map +0 -1
  478. package/dist/api/ThreadRuntime.mjs +0 -235
  479. package/dist/api/ThreadRuntime.mjs.map +0 -1
  480. package/dist/api/index.d.ts +0 -9
  481. package/dist/api/index.d.ts.map +0 -1
  482. package/dist/api/index.mjs +0 -1
  483. package/dist/api/index.mjs.map +0 -1
  484. package/dist/api/subscribable/BaseSubject.d.ts +0 -11
  485. package/dist/api/subscribable/BaseSubject.d.ts.map +0 -1
  486. package/dist/api/subscribable/BaseSubject.mjs +0 -32
  487. package/dist/api/subscribable/BaseSubject.mjs.map +0 -1
  488. package/dist/api/subscribable/EventSubscriptionSubject.d.ts +0 -13
  489. package/dist/api/subscribable/EventSubscriptionSubject.d.ts.map +0 -1
  490. package/dist/api/subscribable/EventSubscriptionSubject.mjs +0 -37
  491. package/dist/api/subscribable/EventSubscriptionSubject.mjs.map +0 -1
  492. package/dist/api/subscribable/LazyMemoizeSubject.d.ts +0 -13
  493. package/dist/api/subscribable/LazyMemoizeSubject.d.ts.map +0 -1
  494. package/dist/api/subscribable/LazyMemoizeSubject.mjs +0 -37
  495. package/dist/api/subscribable/LazyMemoizeSubject.mjs.map +0 -1
  496. package/dist/api/subscribable/NestedSubscriptionSubject.d.ts +0 -12
  497. package/dist/api/subscribable/NestedSubscriptionSubject.d.ts.map +0 -1
  498. package/dist/api/subscribable/NestedSubscriptionSubject.mjs +0 -41
  499. package/dist/api/subscribable/NestedSubscriptionSubject.mjs.map +0 -1
  500. package/dist/api/subscribable/SKIP_UPDATE.d.ts +0 -3
  501. package/dist/api/subscribable/SKIP_UPDATE.d.ts.map +0 -1
  502. package/dist/api/subscribable/SKIP_UPDATE.mjs +0 -6
  503. package/dist/api/subscribable/SKIP_UPDATE.mjs.map +0 -1
  504. package/dist/api/subscribable/ShallowMemoizeSubject.d.ts +0 -13
  505. package/dist/api/subscribable/ShallowMemoizeSubject.d.ts.map +0 -1
  506. package/dist/api/subscribable/ShallowMemoizeSubject.mjs +0 -41
  507. package/dist/api/subscribable/ShallowMemoizeSubject.mjs.map +0 -1
  508. package/dist/api/subscribable/Subscribable.d.ts +0 -16
  509. package/dist/api/subscribable/Subscribable.d.ts.map +0 -1
  510. package/dist/api/subscribable/Subscribable.mjs +0 -1
  511. package/dist/api/subscribable/Subscribable.mjs.map +0 -1
  512. package/dist/api/subscribable/shallowEqual.d.ts +0 -2
  513. package/dist/api/subscribable/shallowEqual.d.ts.map +0 -1
  514. package/dist/api/subscribable/shallowEqual.mjs +0 -16
  515. package/dist/api/subscribable/shallowEqual.mjs.map +0 -1
  516. package/dist/cloud/AssistantCloud.d.ts +0 -13
  517. package/dist/cloud/AssistantCloud.d.ts.map +0 -1
  518. package/dist/cloud/AssistantCloud.mjs +0 -22
  519. package/dist/cloud/AssistantCloud.mjs.map +0 -1
  520. package/dist/cloud/AssistantCloudAPI.d.ts +0 -27
  521. package/dist/cloud/AssistantCloudAPI.d.ts.map +0 -1
  522. package/dist/cloud/AssistantCloudAPI.mjs +0 -87
  523. package/dist/cloud/AssistantCloudAPI.mjs.map +0 -1
  524. package/dist/cloud/AssistantCloudAuthStrategy.d.ts +0 -30
  525. package/dist/cloud/AssistantCloudAuthStrategy.d.ts.map +0 -1
  526. package/dist/cloud/AssistantCloudAuthStrategy.mjs +0 -139
  527. package/dist/cloud/AssistantCloudAuthStrategy.mjs.map +0 -1
  528. package/dist/cloud/AssistantCloudAuthTokens.d.ts +0 -11
  529. package/dist/cloud/AssistantCloudAuthTokens.d.ts.map +0 -1
  530. package/dist/cloud/AssistantCloudAuthTokens.mjs +0 -13
  531. package/dist/cloud/AssistantCloudAuthTokens.mjs.map +0 -1
  532. package/dist/cloud/AssistantCloudRuns.d.ts +0 -15
  533. package/dist/cloud/AssistantCloudRuns.d.ts.map +0 -1
  534. package/dist/cloud/AssistantCloudRuns.mjs +0 -21
  535. package/dist/cloud/AssistantCloudRuns.mjs.map +0 -1
  536. package/dist/cloud/AssistantCloudThreadHistoryAdapter.d.ts +0 -5
  537. package/dist/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +0 -1
  538. package/dist/cloud/AssistantCloudThreadHistoryAdapter.mjs +0 -47
  539. package/dist/cloud/AssistantCloudThreadHistoryAdapter.mjs.map +0 -1
  540. package/dist/cloud/AssistantCloudThreadMessages.d.ts +0 -30
  541. package/dist/cloud/AssistantCloudThreadMessages.d.ts.map +0 -1
  542. package/dist/cloud/AssistantCloudThreadMessages.mjs +0 -21
  543. package/dist/cloud/AssistantCloudThreadMessages.mjs.map +0 -1
  544. package/dist/cloud/AssistantCloudThreads.d.ts +0 -48
  545. package/dist/cloud/AssistantCloudThreads.d.ts.map +0 -1
  546. package/dist/cloud/AssistantCloudThreads.mjs +0 -30
  547. package/dist/cloud/AssistantCloudThreads.mjs.map +0 -1
  548. package/dist/cloud/auiV0.d.ts +0 -54
  549. package/dist/cloud/auiV0.d.ts.map +0 -1
  550. package/dist/cloud/auiV0.mjs +0 -88
  551. package/dist/cloud/auiV0.mjs.map +0 -1
  552. package/dist/cloud/index.d.ts +0 -3
  553. package/dist/cloud/index.d.ts.map +0 -1
  554. package/dist/cloud/index.mjs +0 -8
  555. package/dist/cloud/index.mjs.map +0 -1
  556. package/dist/cloud/useCloudThreadListRuntime.d.ts +0 -14
  557. package/dist/cloud/useCloudThreadListRuntime.d.ts.map +0 -1
  558. package/dist/cloud/useCloudThreadListRuntime.mjs +0 -20
  559. package/dist/cloud/useCloudThreadListRuntime.mjs.map +0 -1
  560. package/dist/context/ReadonlyStore.d.ts +0 -4
  561. package/dist/context/ReadonlyStore.d.ts.map +0 -1
  562. package/dist/context/ReadonlyStore.mjs +0 -8
  563. package/dist/context/ReadonlyStore.mjs.map +0 -1
  564. package/dist/context/index.d.ts +0 -4
  565. package/dist/context/index.d.ts.map +0 -1
  566. package/dist/context/index.mjs +0 -5
  567. package/dist/context/index.mjs.map +0 -1
  568. package/dist/context/providers/AssistantRuntimeProvider.d.ts +0 -13
  569. package/dist/context/providers/AssistantRuntimeProvider.d.ts.map +0 -1
  570. package/dist/context/providers/AssistantRuntimeProvider.mjs +0 -59
  571. package/dist/context/providers/AssistantRuntimeProvider.mjs.map +0 -1
  572. package/dist/context/providers/AttachmentRuntimeProvider.d.ts +0 -9
  573. package/dist/context/providers/AttachmentRuntimeProvider.d.ts.map +0 -1
  574. package/dist/context/providers/AttachmentRuntimeProvider.mjs +0 -33
  575. package/dist/context/providers/AttachmentRuntimeProvider.mjs.map +0 -1
  576. package/dist/context/providers/ContentPartRuntimeProvider.d.ts +0 -9
  577. package/dist/context/providers/ContentPartRuntimeProvider.d.ts.map +0 -1
  578. package/dist/context/providers/ContentPartRuntimeProvider.mjs +0 -28
  579. package/dist/context/providers/ContentPartRuntimeProvider.mjs.map +0 -1
  580. package/dist/context/providers/MessageRuntimeProvider.d.ts +0 -9
  581. package/dist/context/providers/MessageRuntimeProvider.d.ts.map +0 -1
  582. package/dist/context/providers/MessageRuntimeProvider.mjs +0 -37
  583. package/dist/context/providers/MessageRuntimeProvider.mjs.map +0 -1
  584. package/dist/context/providers/TextContentPartProvider.d.ts +0 -9
  585. package/dist/context/providers/TextContentPartProvider.d.ts.map +0 -1
  586. package/dist/context/providers/TextContentPartProvider.mjs +0 -66
  587. package/dist/context/providers/TextContentPartProvider.mjs.map +0 -1
  588. package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +0 -9
  589. package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +0 -1
  590. package/dist/context/providers/ThreadListItemRuntimeProvider.mjs +0 -30
  591. package/dist/context/providers/ThreadListItemRuntimeProvider.mjs.map +0 -1
  592. package/dist/context/providers/ThreadRuntimeProvider.d.ts +0 -10
  593. package/dist/context/providers/ThreadRuntimeProvider.d.ts.map +0 -1
  594. package/dist/context/providers/ThreadRuntimeProvider.mjs +0 -33
  595. package/dist/context/providers/ThreadRuntimeProvider.mjs.map +0 -1
  596. package/dist/context/providers/ThreadViewportProvider.d.ts +0 -3
  597. package/dist/context/providers/ThreadViewportProvider.d.ts.map +0 -1
  598. package/dist/context/providers/ThreadViewportProvider.mjs +0 -42
  599. package/dist/context/providers/ThreadViewportProvider.mjs.map +0 -1
  600. package/dist/context/providers/index.d.ts +0 -3
  601. package/dist/context/providers/index.d.ts.map +0 -1
  602. package/dist/context/providers/index.mjs +0 -8
  603. package/dist/context/providers/index.mjs.map +0 -1
  604. package/dist/context/react/AssistantContext.d.ts +0 -62
  605. package/dist/context/react/AssistantContext.d.ts.map +0 -1
  606. package/dist/context/react/AssistantContext.mjs +0 -34
  607. package/dist/context/react/AssistantContext.mjs.map +0 -1
  608. package/dist/context/react/AttachmentContext.d.ts +0 -836
  609. package/dist/context/react/AttachmentContext.d.ts.map +0 -1
  610. package/dist/context/react/AttachmentContext.mjs +0 -67
  611. package/dist/context/react/AttachmentContext.mjs.map +0 -1
  612. package/dist/context/react/ComposerContext.d.ts +0 -35
  613. package/dist/context/react/ComposerContext.d.ts.map +0 -1
  614. package/dist/context/react/ComposerContext.mjs +0 -17
  615. package/dist/context/react/ComposerContext.mjs.map +0 -1
  616. package/dist/context/react/ContentPartContext.d.ts +0 -41
  617. package/dist/context/react/ContentPartContext.d.ts.map +0 -1
  618. package/dist/context/react/ContentPartContext.mjs +0 -25
  619. package/dist/context/react/ContentPartContext.mjs.map +0 -1
  620. package/dist/context/react/MessageContext.d.ts +0 -86
  621. package/dist/context/react/MessageContext.d.ts.map +0 -1
  622. package/dist/context/react/MessageContext.mjs +0 -35
  623. package/dist/context/react/MessageContext.mjs.map +0 -1
  624. package/dist/context/react/ThreadContext.d.ts +0 -75
  625. package/dist/context/react/ThreadContext.d.ts.map +0 -1
  626. package/dist/context/react/ThreadContext.mjs +0 -38
  627. package/dist/context/react/ThreadContext.mjs.map +0 -1
  628. package/dist/context/react/ThreadListItemContext.d.ts +0 -41
  629. package/dist/context/react/ThreadListItemContext.d.ts.map +0 -1
  630. package/dist/context/react/ThreadListItemContext.mjs +0 -25
  631. package/dist/context/react/ThreadListItemContext.mjs.map +0 -1
  632. package/dist/context/react/ThreadViewportContext.d.ts +0 -24
  633. package/dist/context/react/ThreadViewportContext.d.ts.map +0 -1
  634. package/dist/context/react/ThreadViewportContext.mjs +0 -18
  635. package/dist/context/react/ThreadViewportContext.mjs.map +0 -1
  636. package/dist/context/react/index.d.ts +0 -14
  637. package/dist/context/react/index.d.ts.map +0 -1
  638. package/dist/context/react/index.mjs +0 -66
  639. package/dist/context/react/index.mjs.map +0 -1
  640. package/dist/context/react/utils/createContextHook.d.ts +0 -11
  641. package/dist/context/react/utils/createContextHook.d.ts.map +0 -1
  642. package/dist/context/react/utils/createContextHook.mjs +0 -18
  643. package/dist/context/react/utils/createContextHook.mjs.map +0 -1
  644. package/dist/context/react/utils/createContextStoreHook.d.ts +0 -26
  645. package/dist/context/react/utils/createContextStoreHook.d.ts.map +0 -1
  646. package/dist/context/react/utils/createContextStoreHook.mjs +0 -31
  647. package/dist/context/react/utils/createContextStoreHook.mjs.map +0 -1
  648. package/dist/context/react/utils/createStateHookForRuntime.d.ts +0 -31
  649. package/dist/context/react/utils/createStateHookForRuntime.d.ts.map +0 -1
  650. package/dist/context/react/utils/createStateHookForRuntime.mjs +0 -24
  651. package/dist/context/react/utils/createStateHookForRuntime.mjs.map +0 -1
  652. package/dist/context/react/utils/ensureBinding.d.ts +0 -2
  653. package/dist/context/react/utils/ensureBinding.d.ts.map +0 -1
  654. package/dist/context/react/utils/ensureBinding.mjs +0 -11
  655. package/dist/context/react/utils/ensureBinding.mjs.map +0 -1
  656. package/dist/context/react/utils/useRuntimeState.d.ts +0 -10
  657. package/dist/context/react/utils/useRuntimeState.d.ts.map +0 -1
  658. package/dist/context/react/utils/useRuntimeState.mjs +0 -22
  659. package/dist/context/react/utils/useRuntimeState.mjs.map +0 -1
  660. package/dist/context/stores/AssistantToolUIs.d.ts +0 -14
  661. package/dist/context/stores/AssistantToolUIs.d.ts.map +0 -1
  662. package/dist/context/stores/AssistantToolUIs.mjs +0 -35
  663. package/dist/context/stores/AssistantToolUIs.mjs.map +0 -1
  664. package/dist/context/stores/MessageUtils.d.ts +0 -8
  665. package/dist/context/stores/MessageUtils.d.ts.map +0 -1
  666. package/dist/context/stores/MessageUtils.mjs +0 -18
  667. package/dist/context/stores/MessageUtils.mjs.map +0 -1
  668. package/dist/context/stores/ThreadViewport.d.ts +0 -8
  669. package/dist/context/stores/ThreadViewport.d.ts.map +0 -1
  670. package/dist/context/stores/ThreadViewport.mjs +0 -25
  671. package/dist/context/stores/ThreadViewport.mjs.map +0 -1
  672. package/dist/context/stores/index.d.ts +0 -4
  673. package/dist/context/stores/index.d.ts.map +0 -1
  674. package/dist/context/stores/index.mjs +0 -1
  675. package/dist/context/stores/index.mjs.map +0 -1
  676. package/dist/index.d.ts +0 -9
  677. package/dist/index.d.ts.map +0 -1
  678. package/dist/index.mjs +0 -13
  679. package/dist/index.mjs.map +0 -1
  680. package/dist/internal.d.ts +0 -14
  681. package/dist/internal.d.ts.map +0 -1
  682. package/dist/internal.mjs +0 -27
  683. package/dist/internal.mjs.map +0 -1
  684. package/dist/model-context/ModelContextTypes.d.ts +0 -56
  685. package/dist/model-context/ModelContextTypes.d.ts.map +0 -1
  686. package/dist/model-context/ModelContextTypes.mjs +0 -61
  687. package/dist/model-context/ModelContextTypes.mjs.map +0 -1
  688. package/dist/model-context/index.d.ts +0 -23
  689. package/dist/model-context/index.d.ts.map +0 -1
  690. package/dist/model-context/index.mjs +0 -26
  691. package/dist/model-context/index.mjs.map +0 -1
  692. package/dist/model-context/makeAssistantTool.d.ts +0 -7
  693. package/dist/model-context/makeAssistantTool.d.ts.map +0 -1
  694. package/dist/model-context/makeAssistantTool.mjs +0 -16
  695. package/dist/model-context/makeAssistantTool.mjs.map +0 -1
  696. package/dist/model-context/makeAssistantToolUI.d.ts +0 -7
  697. package/dist/model-context/makeAssistantToolUI.d.ts.map +0 -1
  698. package/dist/model-context/makeAssistantToolUI.mjs +0 -18
  699. package/dist/model-context/makeAssistantToolUI.mjs.map +0 -1
  700. package/dist/model-context/makeAssistantVisible.d.ts +0 -7
  701. package/dist/model-context/makeAssistantVisible.d.ts.map +0 -1
  702. package/dist/model-context/makeAssistantVisible.mjs +0 -93
  703. package/dist/model-context/makeAssistantVisible.mjs.map +0 -1
  704. package/dist/model-context/tool.d.ts +0 -12
  705. package/dist/model-context/tool.d.ts.map +0 -1
  706. package/dist/model-context/tool.mjs +0 -8
  707. package/dist/model-context/tool.mjs.map +0 -1
  708. package/dist/model-context/useAssistantInstructions.d.ts +0 -7
  709. package/dist/model-context/useAssistantInstructions.d.ts.map +0 -1
  710. package/dist/model-context/useAssistantInstructions.mjs +0 -26
  711. package/dist/model-context/useAssistantInstructions.mjs.map +0 -1
  712. package/dist/model-context/useAssistantTool.d.ts +0 -9
  713. package/dist/model-context/useAssistantTool.d.ts.map +0 -1
  714. package/dist/model-context/useAssistantTool.mjs +0 -31
  715. package/dist/model-context/useAssistantTool.mjs.map +0 -1
  716. package/dist/model-context/useAssistantToolUI.d.ts +0 -7
  717. package/dist/model-context/useAssistantToolUI.d.ts.map +0 -1
  718. package/dist/model-context/useAssistantToolUI.mjs +0 -16
  719. package/dist/model-context/useAssistantToolUI.mjs.map +0 -1
  720. package/dist/model-context/useInlineRender.d.ts +0 -4
  721. package/dist/model-context/useInlineRender.d.ts.map +0 -1
  722. package/dist/model-context/useInlineRender.mjs +0 -22
  723. package/dist/model-context/useInlineRender.mjs.map +0 -1
  724. package/dist/primitives/actionBar/ActionBarCopy.d.ts +0 -15
  725. package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +0 -1
  726. package/dist/primitives/actionBar/ActionBarCopy.mjs +0 -56
  727. package/dist/primitives/actionBar/ActionBarCopy.mjs.map +0 -1
  728. package/dist/primitives/actionBar/ActionBarEdit.d.ts +0 -11
  729. package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +0 -1
  730. package/dist/primitives/actionBar/ActionBarEdit.mjs +0 -25
  731. package/dist/primitives/actionBar/ActionBarEdit.mjs.map +0 -1
  732. package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +0 -11
  733. package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +0 -1
  734. package/dist/primitives/actionBar/ActionBarFeedbackNegative.mjs +0 -41
  735. package/dist/primitives/actionBar/ActionBarFeedbackNegative.mjs.map +0 -1
  736. package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +0 -11
  737. package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +0 -1
  738. package/dist/primitives/actionBar/ActionBarFeedbackPositive.mjs +0 -39
  739. package/dist/primitives/actionBar/ActionBarFeedbackPositive.mjs.map +0 -1
  740. package/dist/primitives/actionBar/ActionBarReload.d.ts +0 -11
  741. package/dist/primitives/actionBar/ActionBarReload.d.ts.map +0 -1
  742. package/dist/primitives/actionBar/ActionBarReload.mjs +0 -31
  743. package/dist/primitives/actionBar/ActionBarReload.mjs.map +0 -1
  744. package/dist/primitives/actionBar/ActionBarRoot.d.ts +0 -20
  745. package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +0 -1
  746. package/dist/primitives/actionBar/ActionBarRoot.mjs +0 -31
  747. package/dist/primitives/actionBar/ActionBarRoot.mjs.map +0 -1
  748. package/dist/primitives/actionBar/ActionBarSpeak.d.ts +0 -11
  749. package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +0 -1
  750. package/dist/primitives/actionBar/ActionBarSpeak.mjs +0 -27
  751. package/dist/primitives/actionBar/ActionBarSpeak.mjs.map +0 -1
  752. package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts +0 -11
  753. package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +0 -1
  754. package/dist/primitives/actionBar/ActionBarStopSpeaking.mjs +0 -48
  755. package/dist/primitives/actionBar/ActionBarStopSpeaking.mjs.map +0 -1
  756. package/dist/primitives/actionBar/index.d.ts +0 -9
  757. package/dist/primitives/actionBar/index.d.ts.map +0 -1
  758. package/dist/primitives/actionBar/index.mjs +0 -20
  759. package/dist/primitives/actionBar/index.mjs.map +0 -1
  760. package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts +0 -12
  761. package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts.map +0 -1
  762. package/dist/primitives/actionBar/useActionBarFloatStatus.mjs +0 -41
  763. package/dist/primitives/actionBar/useActionBarFloatStatus.mjs.map +0 -1
  764. package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts +0 -8
  765. package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts.map +0 -1
  766. package/dist/primitives/assistantModal/AssistantModalAnchor.mjs +0 -21
  767. package/dist/primitives/assistantModal/AssistantModalAnchor.mjs.map +0 -1
  768. package/dist/primitives/assistantModal/AssistantModalContent.d.ts +0 -12
  769. package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +0 -1
  770. package/dist/primitives/assistantModal/AssistantModalContent.mjs +0 -39
  771. package/dist/primitives/assistantModal/AssistantModalContent.mjs.map +0 -1
  772. package/dist/primitives/assistantModal/AssistantModalRoot.d.ts +0 -9
  773. package/dist/primitives/assistantModal/AssistantModalRoot.d.ts.map +0 -1
  774. package/dist/primitives/assistantModal/AssistantModalRoot.mjs +0 -60
  775. package/dist/primitives/assistantModal/AssistantModalRoot.mjs.map +0 -1
  776. package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts +0 -8
  777. package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +0 -1
  778. package/dist/primitives/assistantModal/AssistantModalTrigger.mjs +0 -19
  779. package/dist/primitives/assistantModal/AssistantModalTrigger.mjs.map +0 -1
  780. package/dist/primitives/assistantModal/index.d.ts +0 -5
  781. package/dist/primitives/assistantModal/index.d.ts.map +0 -1
  782. package/dist/primitives/assistantModal/index.mjs +0 -12
  783. package/dist/primitives/assistantModal/index.mjs.map +0 -1
  784. package/dist/primitives/assistantModal/scope.d.ts +0 -8
  785. package/dist/primitives/assistantModal/scope.d.ts.map +0 -1
  786. package/dist/primitives/assistantModal/scope.mjs +0 -7
  787. package/dist/primitives/assistantModal/scope.mjs.map +0 -1
  788. package/dist/primitives/attachment/AttachmentName.d.ts +0 -6
  789. package/dist/primitives/attachment/AttachmentName.d.ts.map +0 -1
  790. package/dist/primitives/attachment/AttachmentName.mjs +0 -14
  791. package/dist/primitives/attachment/AttachmentName.mjs.map +0 -1
  792. package/dist/primitives/attachment/AttachmentRemove.d.ts +0 -11
  793. package/dist/primitives/attachment/AttachmentRemove.d.ts.map +0 -1
  794. package/dist/primitives/attachment/AttachmentRemove.mjs +0 -23
  795. package/dist/primitives/attachment/AttachmentRemove.mjs.map +0 -1
  796. package/dist/primitives/attachment/AttachmentRoot.d.ts +0 -12
  797. package/dist/primitives/attachment/AttachmentRoot.d.ts.map +0 -1
  798. package/dist/primitives/attachment/AttachmentRoot.mjs +0 -12
  799. package/dist/primitives/attachment/AttachmentRoot.mjs.map +0 -1
  800. package/dist/primitives/attachment/AttachmentThumb.d.ts +0 -12
  801. package/dist/primitives/attachment/AttachmentThumb.d.ts.map +0 -1
  802. package/dist/primitives/attachment/AttachmentThumb.mjs +0 -19
  803. package/dist/primitives/attachment/AttachmentThumb.mjs.map +0 -1
  804. package/dist/primitives/attachment/index.d.ts +0 -5
  805. package/dist/primitives/attachment/index.d.ts.map +0 -1
  806. package/dist/primitives/attachment/index.mjs +0 -12
  807. package/dist/primitives/attachment/index.mjs.map +0 -1
  808. package/dist/primitives/branchPicker/BranchPickerCount.d.ts +0 -6
  809. package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +0 -1
  810. package/dist/primitives/branchPicker/BranchPickerCount.mjs +0 -18
  811. package/dist/primitives/branchPicker/BranchPickerCount.mjs.map +0 -1
  812. package/dist/primitives/branchPicker/BranchPickerNext.d.ts +0 -11
  813. package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +0 -1
  814. package/dist/primitives/branchPicker/BranchPickerNext.mjs +0 -28
  815. package/dist/primitives/branchPicker/BranchPickerNext.mjs.map +0 -1
  816. package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +0 -6
  817. package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +0 -1
  818. package/dist/primitives/branchPicker/BranchPickerNumber.mjs +0 -18
  819. package/dist/primitives/branchPicker/BranchPickerNumber.mjs.map +0 -1
  820. package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +0 -11
  821. package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +0 -1
  822. package/dist/primitives/branchPicker/BranchPickerPrevious.mjs +0 -28
  823. package/dist/primitives/branchPicker/BranchPickerPrevious.mjs.map +0 -1
  824. package/dist/primitives/branchPicker/BranchPickerRoot.d.ts +0 -14
  825. package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +0 -1
  826. package/dist/primitives/branchPicker/BranchPickerRoot.mjs +0 -13
  827. package/dist/primitives/branchPicker/BranchPickerRoot.mjs.map +0 -1
  828. package/dist/primitives/branchPicker/index.d.ts +0 -6
  829. package/dist/primitives/branchPicker/index.d.ts.map +0 -1
  830. package/dist/primitives/branchPicker/index.mjs +0 -14
  831. package/dist/primitives/branchPicker/index.mjs.map +0 -1
  832. package/dist/primitives/composer/ComposerAddAttachment.d.ts +0 -17
  833. package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +0 -1
  834. package/dist/primitives/composer/ComposerAddAttachment.mjs +0 -42
  835. package/dist/primitives/composer/ComposerAddAttachment.mjs.map +0 -1
  836. package/dist/primitives/composer/ComposerAttachments.d.ts +0 -13
  837. package/dist/primitives/composer/ComposerAttachments.d.ts.map +0 -1
  838. package/dist/primitives/composer/ComposerAttachments.mjs +0 -57
  839. package/dist/primitives/composer/ComposerAttachments.mjs.map +0 -1
  840. package/dist/primitives/composer/ComposerCancel.d.ts +0 -11
  841. package/dist/primitives/composer/ComposerCancel.d.ts.map +0 -1
  842. package/dist/primitives/composer/ComposerCancel.mjs +0 -25
  843. package/dist/primitives/composer/ComposerCancel.mjs.map +0 -1
  844. package/dist/primitives/composer/ComposerIf.d.ts +0 -12
  845. package/dist/primitives/composer/ComposerIf.d.ts.map +0 -1
  846. package/dist/primitives/composer/ComposerIf.mjs +0 -23
  847. package/dist/primitives/composer/ComposerIf.mjs.map +0 -1
  848. package/dist/primitives/composer/ComposerInput.d.ts +0 -21
  849. package/dist/primitives/composer/ComposerInput.d.ts.map +0 -1
  850. package/dist/primitives/composer/ComposerInput.mjs +0 -115
  851. package/dist/primitives/composer/ComposerInput.mjs.map +0 -1
  852. package/dist/primitives/composer/ComposerRoot.d.ts +0 -10
  853. package/dist/primitives/composer/ComposerRoot.d.ts.map +0 -1
  854. package/dist/primitives/composer/ComposerRoot.mjs +0 -31
  855. package/dist/primitives/composer/ComposerRoot.mjs.map +0 -1
  856. package/dist/primitives/composer/ComposerSend.d.ts +0 -10
  857. package/dist/primitives/composer/ComposerSend.d.ts.map +0 -1
  858. package/dist/primitives/composer/ComposerSend.mjs +0 -32
  859. package/dist/primitives/composer/ComposerSend.mjs.map +0 -1
  860. package/dist/primitives/composer/index.d.ts +0 -8
  861. package/dist/primitives/composer/index.d.ts.map +0 -1
  862. package/dist/primitives/composer/index.mjs +0 -18
  863. package/dist/primitives/composer/index.mjs.map +0 -1
  864. package/dist/primitives/contentPart/ContentPartImage.d.ts +0 -10
  865. package/dist/primitives/contentPart/ContentPartImage.d.ts.map +0 -1
  866. package/dist/primitives/contentPart/ContentPartImage.mjs +0 -16
  867. package/dist/primitives/contentPart/ContentPartImage.mjs.map +0 -1
  868. package/dist/primitives/contentPart/ContentPartInProgress.d.ts +0 -6
  869. package/dist/primitives/contentPart/ContentPartInProgress.d.ts.map +0 -1
  870. package/dist/primitives/contentPart/ContentPartInProgress.mjs +0 -13
  871. package/dist/primitives/contentPart/ContentPartInProgress.mjs.map +0 -1
  872. package/dist/primitives/contentPart/ContentPartText.d.ts +0 -16
  873. package/dist/primitives/contentPart/ContentPartText.d.ts.map +0 -1
  874. package/dist/primitives/contentPart/ContentPartText.mjs +0 -18
  875. package/dist/primitives/contentPart/ContentPartText.mjs.map +0 -1
  876. package/dist/primitives/contentPart/index.d.ts +0 -4
  877. package/dist/primitives/contentPart/index.d.ts.map +0 -1
  878. package/dist/primitives/contentPart/index.mjs +0 -10
  879. package/dist/primitives/contentPart/index.mjs.map +0 -1
  880. package/dist/primitives/contentPart/useContentPartFile.d.ts +0 -5
  881. package/dist/primitives/contentPart/useContentPartFile.d.ts.map +0 -1
  882. package/dist/primitives/contentPart/useContentPartFile.mjs +0 -18
  883. package/dist/primitives/contentPart/useContentPartFile.mjs.map +0 -1
  884. package/dist/primitives/contentPart/useContentPartImage.d.ts +0 -5
  885. package/dist/primitives/contentPart/useContentPartImage.d.ts.map +0 -1
  886. package/dist/primitives/contentPart/useContentPartImage.mjs +0 -18
  887. package/dist/primitives/contentPart/useContentPartImage.mjs.map +0 -1
  888. package/dist/primitives/contentPart/useContentPartReasoning.d.ts +0 -5
  889. package/dist/primitives/contentPart/useContentPartReasoning.d.ts.map +0 -1
  890. package/dist/primitives/contentPart/useContentPartReasoning.mjs +0 -18
  891. package/dist/primitives/contentPart/useContentPartReasoning.mjs.map +0 -1
  892. package/dist/primitives/contentPart/useContentPartSource.d.ts +0 -5
  893. package/dist/primitives/contentPart/useContentPartSource.d.ts.map +0 -1
  894. package/dist/primitives/contentPart/useContentPartSource.mjs +0 -18
  895. package/dist/primitives/contentPart/useContentPartSource.mjs.map +0 -1
  896. package/dist/primitives/contentPart/useContentPartText.d.ts +0 -7
  897. package/dist/primitives/contentPart/useContentPartText.d.ts.map +0 -1
  898. package/dist/primitives/contentPart/useContentPartText.mjs +0 -18
  899. package/dist/primitives/contentPart/useContentPartText.mjs.map +0 -1
  900. package/dist/primitives/index.d.ts +0 -17
  901. package/dist/primitives/index.d.ts.map +0 -1
  902. package/dist/primitives/index.mjs +0 -36
  903. package/dist/primitives/index.mjs.map +0 -1
  904. package/dist/primitives/message/MessageAttachments.d.ts +0 -13
  905. package/dist/primitives/message/MessageAttachments.d.ts.map +0 -1
  906. package/dist/primitives/message/MessageAttachments.mjs +0 -58
  907. package/dist/primitives/message/MessageAttachments.mjs.map +0 -1
  908. package/dist/primitives/message/MessageContent.d.ts +0 -23
  909. package/dist/primitives/message/MessageContent.d.ts.map +0 -1
  910. package/dist/primitives/message/MessageContent.mjs +0 -131
  911. package/dist/primitives/message/MessageContent.mjs.map +0 -1
  912. package/dist/primitives/message/MessageIf.d.ts +0 -21
  913. package/dist/primitives/message/MessageIf.d.ts.map +0 -1
  914. package/dist/primitives/message/MessageIf.mjs +0 -55
  915. package/dist/primitives/message/MessageIf.mjs.map +0 -1
  916. package/dist/primitives/message/MessageRoot.d.ts +0 -10
  917. package/dist/primitives/message/MessageRoot.d.ts.map +0 -1
  918. package/dist/primitives/message/MessageRoot.mjs +0 -45
  919. package/dist/primitives/message/MessageRoot.mjs.map +0 -1
  920. package/dist/primitives/message/index.d.ts +0 -5
  921. package/dist/primitives/message/index.d.ts.map +0 -1
  922. package/dist/primitives/message/index.mjs +0 -12
  923. package/dist/primitives/message/index.mjs.map +0 -1
  924. package/dist/primitives/thread/ThreadEmpty.d.ts +0 -6
  925. package/dist/primitives/thread/ThreadEmpty.d.ts.map +0 -1
  926. package/dist/primitives/thread/ThreadEmpty.mjs +0 -15
  927. package/dist/primitives/thread/ThreadEmpty.mjs.map +0 -1
  928. package/dist/primitives/thread/ThreadIf.d.ts +0 -14
  929. package/dist/primitives/thread/ThreadIf.d.ts.map +0 -1
  930. package/dist/primitives/thread/ThreadIf.mjs +0 -27
  931. package/dist/primitives/thread/ThreadIf.mjs.map +0 -1
  932. package/dist/primitives/thread/ThreadMessages.d.ts +0 -27
  933. package/dist/primitives/thread/ThreadMessages.d.ts.map +0 -1
  934. package/dist/primitives/thread/ThreadMessages.mjs +0 -77
  935. package/dist/primitives/thread/ThreadMessages.mjs.map +0 -1
  936. package/dist/primitives/thread/ThreadRoot.d.ts +0 -10
  937. package/dist/primitives/thread/ThreadRoot.d.ts.map +0 -1
  938. package/dist/primitives/thread/ThreadRoot.mjs +0 -12
  939. package/dist/primitives/thread/ThreadRoot.mjs.map +0 -1
  940. package/dist/primitives/thread/ThreadScrollToBottom.d.ts +0 -11
  941. package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +0 -1
  942. package/dist/primitives/thread/ThreadScrollToBottom.mjs +0 -28
  943. package/dist/primitives/thread/ThreadScrollToBottom.mjs.map +0 -1
  944. package/dist/primitives/thread/ThreadSuggestion.d.ts +0 -19
  945. package/dist/primitives/thread/ThreadSuggestion.d.ts.map +0 -1
  946. package/dist/primitives/thread/ThreadSuggestion.mjs +0 -34
  947. package/dist/primitives/thread/ThreadSuggestion.mjs.map +0 -1
  948. package/dist/primitives/thread/ThreadViewport.d.ts +0 -14
  949. package/dist/primitives/thread/ThreadViewport.d.ts.map +0 -1
  950. package/dist/primitives/thread/ThreadViewport.mjs +0 -25
  951. package/dist/primitives/thread/ThreadViewport.mjs.map +0 -1
  952. package/dist/primitives/thread/index.d.ts +0 -8
  953. package/dist/primitives/thread/index.d.ts.map +0 -1
  954. package/dist/primitives/thread/index.mjs +0 -18
  955. package/dist/primitives/thread/index.mjs.map +0 -1
  956. package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts +0 -8
  957. package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts.map +0 -1
  958. package/dist/primitives/thread/useThreadViewportAutoScroll.mjs +0 -68
  959. package/dist/primitives/thread/useThreadViewportAutoScroll.mjs.map +0 -1
  960. package/dist/primitives/threadList/ThreadListItems.d.ts +0 -11
  961. package/dist/primitives/threadList/ThreadListItems.d.ts.map +0 -1
  962. package/dist/primitives/threadList/ThreadListItems.mjs +0 -46
  963. package/dist/primitives/threadList/ThreadListItems.mjs.map +0 -1
  964. package/dist/primitives/threadList/ThreadListNew.d.ts +0 -11
  965. package/dist/primitives/threadList/ThreadListNew.d.ts.map +0 -1
  966. package/dist/primitives/threadList/ThreadListNew.mjs +0 -36
  967. package/dist/primitives/threadList/ThreadListNew.mjs.map +0 -1
  968. package/dist/primitives/threadList/ThreadListRoot.d.ts +0 -12
  969. package/dist/primitives/threadList/ThreadListRoot.d.ts.map +0 -1
  970. package/dist/primitives/threadList/ThreadListRoot.mjs +0 -12
  971. package/dist/primitives/threadList/ThreadListRoot.mjs.map +0 -1
  972. package/dist/primitives/threadList/index.d.ts +0 -4
  973. package/dist/primitives/threadList/index.d.ts.map +0 -1
  974. package/dist/primitives/threadList/index.mjs +0 -10
  975. package/dist/primitives/threadList/index.mjs.map +0 -1
  976. package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts +0 -11
  977. package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +0 -1
  978. package/dist/primitives/threadListItem/ThreadListItemArchive.mjs +0 -22
  979. package/dist/primitives/threadListItem/ThreadListItemArchive.mjs.map +0 -1
  980. package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts +0 -11
  981. package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +0 -1
  982. package/dist/primitives/threadListItem/ThreadListItemDelete.mjs +0 -21
  983. package/dist/primitives/threadListItem/ThreadListItemDelete.mjs.map +0 -1
  984. package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +0 -12
  985. package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +0 -1
  986. package/dist/primitives/threadListItem/ThreadListItemRoot.mjs +0 -23
  987. package/dist/primitives/threadListItem/ThreadListItemRoot.mjs.map +0 -1
  988. package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts +0 -8
  989. package/dist/primitives/threadListItem/ThreadListItemTitle.d.ts.map +0 -1
  990. package/dist/primitives/threadListItem/ThreadListItemTitle.mjs +0 -14
  991. package/dist/primitives/threadListItem/ThreadListItemTitle.mjs.map +0 -1
  992. package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +0 -11
  993. package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +0 -1
  994. package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs +0 -21
  995. package/dist/primitives/threadListItem/ThreadListItemTrigger.mjs.map +0 -1
  996. package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts +0 -11
  997. package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +0 -1
  998. package/dist/primitives/threadListItem/ThreadListItemUnarchive.mjs +0 -21
  999. package/dist/primitives/threadListItem/ThreadListItemUnarchive.mjs.map +0 -1
  1000. package/dist/primitives/threadListItem/index.d.ts +0 -7
  1001. package/dist/primitives/threadListItem/index.d.ts.map +0 -1
  1002. package/dist/primitives/threadListItem/index.mjs +0 -16
  1003. package/dist/primitives/threadListItem/index.mjs.map +0 -1
  1004. package/dist/runtimes/adapters/RuntimeAdapterProvider.d.ts +0 -17
  1005. package/dist/runtimes/adapters/RuntimeAdapterProvider.d.ts.map +0 -1
  1006. package/dist/runtimes/adapters/RuntimeAdapterProvider.mjs +0 -29
  1007. package/dist/runtimes/adapters/RuntimeAdapterProvider.mjs.map +0 -1
  1008. package/dist/runtimes/adapters/attachment/AttachmentAdapter.d.ts +0 -10
  1009. package/dist/runtimes/adapters/attachment/AttachmentAdapter.d.ts.map +0 -1
  1010. package/dist/runtimes/adapters/attachment/AttachmentAdapter.mjs +0 -1
  1011. package/dist/runtimes/adapters/attachment/AttachmentAdapter.mjs.map +0 -1
  1012. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.d.ts +0 -13
  1013. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.d.ts.map +0 -1
  1014. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.mjs +0 -79
  1015. package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.mjs.map +0 -1
  1016. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.d.ts +0 -11
  1017. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.d.ts.map +0 -1
  1018. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.mjs +0 -38
  1019. package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.mjs.map +0 -1
  1020. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.d.ts +0 -11
  1021. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.d.ts.map +0 -1
  1022. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.mjs +0 -40
  1023. package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.mjs.map +0 -1
  1024. package/dist/runtimes/adapters/attachment/index.d.ts +0 -5
  1025. package/dist/runtimes/adapters/attachment/index.d.ts.map +0 -1
  1026. package/dist/runtimes/adapters/attachment/index.mjs +0 -10
  1027. package/dist/runtimes/adapters/attachment/index.mjs.map +0 -1
  1028. package/dist/runtimes/adapters/feedback/FeedbackAdapter.d.ts +0 -10
  1029. package/dist/runtimes/adapters/feedback/FeedbackAdapter.d.ts.map +0 -1
  1030. package/dist/runtimes/adapters/feedback/FeedbackAdapter.mjs +0 -1
  1031. package/dist/runtimes/adapters/feedback/FeedbackAdapter.mjs.map +0 -1
  1032. package/dist/runtimes/adapters/feedback/index.d.ts +0 -2
  1033. package/dist/runtimes/adapters/feedback/index.d.ts.map +0 -1
  1034. package/dist/runtimes/adapters/feedback/index.mjs +0 -1
  1035. package/dist/runtimes/adapters/feedback/index.mjs.map +0 -1
  1036. package/dist/runtimes/adapters/index.d.ts +0 -5
  1037. package/dist/runtimes/adapters/index.d.ts.map +0 -1
  1038. package/dist/runtimes/adapters/index.mjs +0 -6
  1039. package/dist/runtimes/adapters/index.mjs.map +0 -1
  1040. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.d.ts +0 -41
  1041. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.d.ts.map +0 -1
  1042. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.mjs +0 -1
  1043. package/dist/runtimes/adapters/speech/SpeechAdapterTypes.mjs.map +0 -1
  1044. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.d.ts +0 -5
  1045. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.d.ts.map +0 -1
  1046. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.mjs +0 -43
  1047. package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.mjs.map +0 -1
  1048. package/dist/runtimes/adapters/speech/index.d.ts +0 -3
  1049. package/dist/runtimes/adapters/speech/index.d.ts.map +0 -1
  1050. package/dist/runtimes/adapters/speech/index.mjs +0 -6
  1051. package/dist/runtimes/adapters/speech/index.mjs.map +0 -1
  1052. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.d.ts +0 -10
  1053. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.d.ts.map +0 -1
  1054. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.mjs +0 -1
  1055. package/dist/runtimes/adapters/suggestion/SuggestionAdapter.mjs.map +0 -1
  1056. package/dist/runtimes/adapters/suggestion/index.d.ts +0 -2
  1057. package/dist/runtimes/adapters/suggestion/index.d.ts.map +0 -1
  1058. package/dist/runtimes/adapters/suggestion/index.mjs +0 -1
  1059. package/dist/runtimes/adapters/suggestion/index.mjs.map +0 -1
  1060. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.d.ts +0 -10
  1061. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.d.ts.map +0 -1
  1062. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.mjs +0 -1
  1063. package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.mjs.map +0 -1
  1064. package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts +0 -39
  1065. package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts.map +0 -1
  1066. package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs +0 -163
  1067. package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs.map +0 -1
  1068. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts +0 -25
  1069. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts.map +0 -1
  1070. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs +0 -48
  1071. package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs.map +0 -1
  1072. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.d.ts +0 -21
  1073. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.d.ts.map +0 -1
  1074. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.mjs +0 -41
  1075. package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.mjs.map +0 -1
  1076. package/dist/runtimes/core/AssistantRuntimeCore.d.ts +0 -16
  1077. package/dist/runtimes/core/AssistantRuntimeCore.d.ts.map +0 -1
  1078. package/dist/runtimes/core/AssistantRuntimeCore.mjs +0 -1
  1079. package/dist/runtimes/core/AssistantRuntimeCore.mjs.map +0 -1
  1080. package/dist/runtimes/core/BaseAssistantRuntimeCore.d.ts +0 -11
  1081. package/dist/runtimes/core/BaseAssistantRuntimeCore.d.ts.map +0 -1
  1082. package/dist/runtimes/core/BaseAssistantRuntimeCore.mjs +0 -12
  1083. package/dist/runtimes/core/BaseAssistantRuntimeCore.mjs.map +0 -1
  1084. package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts +0 -60
  1085. package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts.map +0 -1
  1086. package/dist/runtimes/core/BaseThreadRuntimeCore.mjs +0 -141
  1087. package/dist/runtimes/core/BaseThreadRuntimeCore.mjs.map +0 -1
  1088. package/dist/runtimes/core/ComposerRuntimeCore.d.ts +0 -28
  1089. package/dist/runtimes/core/ComposerRuntimeCore.d.ts.map +0 -1
  1090. package/dist/runtimes/core/ComposerRuntimeCore.mjs +0 -1
  1091. package/dist/runtimes/core/ComposerRuntimeCore.mjs.map +0 -1
  1092. package/dist/runtimes/core/ThreadListRuntimeCore.d.ts +0 -34
  1093. package/dist/runtimes/core/ThreadListRuntimeCore.d.ts.map +0 -1
  1094. package/dist/runtimes/core/ThreadListRuntimeCore.mjs +0 -1
  1095. package/dist/runtimes/core/ThreadListRuntimeCore.mjs.map +0 -1
  1096. package/dist/runtimes/core/ThreadRuntimeCore.d.ts +0 -79
  1097. package/dist/runtimes/core/ThreadRuntimeCore.d.ts.map +0 -1
  1098. package/dist/runtimes/core/ThreadRuntimeCore.mjs +0 -1
  1099. package/dist/runtimes/core/ThreadRuntimeCore.mjs.map +0 -1
  1100. package/dist/runtimes/core/index.d.ts +0 -2
  1101. package/dist/runtimes/core/index.d.ts.map +0 -1
  1102. package/dist/runtimes/core/index.mjs +0 -1
  1103. package/dist/runtimes/core/index.mjs.map +0 -1
  1104. package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts +0 -64
  1105. package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts.map +0 -1
  1106. package/dist/runtimes/external-store/ExternalStoreAdapter.mjs +0 -1
  1107. package/dist/runtimes/external-store/ExternalStoreAdapter.mjs.map +0 -1
  1108. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts +0 -9
  1109. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts.map +0 -1
  1110. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs +0 -25
  1111. package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs.map +0 -1
  1112. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts +0 -35
  1113. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts.map +0 -1
  1114. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs +0 -134
  1115. package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs.map +0 -1
  1116. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts +0 -36
  1117. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +0 -1
  1118. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs +0 -191
  1119. package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs.map +0 -1
  1120. package/dist/runtimes/external-store/ThreadMessageConverter.d.ts +0 -7
  1121. package/dist/runtimes/external-store/ThreadMessageConverter.d.ts.map +0 -1
  1122. package/dist/runtimes/external-store/ThreadMessageConverter.mjs +0 -16
  1123. package/dist/runtimes/external-store/ThreadMessageConverter.mjs.map +0 -1
  1124. package/dist/runtimes/external-store/ThreadMessageLike.d.ts +0 -28
  1125. package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +0 -1
  1126. package/dist/runtimes/external-store/ThreadMessageLike.mjs +0 -111
  1127. package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +0 -1
  1128. package/dist/runtimes/external-store/auto-status.d.ts +0 -9
  1129. package/dist/runtimes/external-store/auto-status.d.ts.map +0 -1
  1130. package/dist/runtimes/external-store/auto-status.mjs +0 -13
  1131. package/dist/runtimes/external-store/auto-status.mjs.map +0 -1
  1132. package/dist/runtimes/external-store/createMessageConverter.d.ts +0 -12
  1133. package/dist/runtimes/external-store/createMessageConverter.d.ts.map +0 -1
  1134. package/dist/runtimes/external-store/createMessageConverter.mjs +0 -52
  1135. package/dist/runtimes/external-store/createMessageConverter.mjs.map +0 -1
  1136. package/dist/runtimes/external-store/external-message-converter.d.ts +0 -22
  1137. package/dist/runtimes/external-store/external-message-converter.d.ts.map +0 -1
  1138. package/dist/runtimes/external-store/external-message-converter.mjs +0 -238
  1139. package/dist/runtimes/external-store/external-message-converter.mjs.map +0 -1
  1140. package/dist/runtimes/external-store/getExternalStoreMessage.d.ts +0 -9
  1141. package/dist/runtimes/external-store/getExternalStoreMessage.d.ts.map +0 -1
  1142. package/dist/runtimes/external-store/getExternalStoreMessage.mjs +0 -24
  1143. package/dist/runtimes/external-store/getExternalStoreMessage.mjs.map +0 -1
  1144. package/dist/runtimes/external-store/index.d.ts +0 -7
  1145. package/dist/runtimes/external-store/index.d.ts.map +0 -1
  1146. package/dist/runtimes/external-store/index.mjs +0 -20
  1147. package/dist/runtimes/external-store/index.mjs.map +0 -1
  1148. package/dist/runtimes/external-store/useExternalStoreRuntime.d.ts +0 -4
  1149. package/dist/runtimes/external-store/useExternalStoreRuntime.d.ts.map +0 -1
  1150. package/dist/runtimes/external-store/useExternalStoreRuntime.mjs +0 -23
  1151. package/dist/runtimes/external-store/useExternalStoreRuntime.mjs.map +0 -1
  1152. package/dist/runtimes/index.d.ts +0 -7
  1153. package/dist/runtimes/index.d.ts.map +0 -1
  1154. package/dist/runtimes/index.mjs +0 -11
  1155. package/dist/runtimes/index.mjs.map +0 -1
  1156. package/dist/runtimes/local/ChatModelAdapter.d.ts +0 -36
  1157. package/dist/runtimes/local/ChatModelAdapter.d.ts.map +0 -1
  1158. package/dist/runtimes/local/ChatModelAdapter.mjs +0 -1
  1159. package/dist/runtimes/local/ChatModelAdapter.mjs.map +0 -1
  1160. package/dist/runtimes/local/LocalRuntimeCore.d.ts +0 -11
  1161. package/dist/runtimes/local/LocalRuntimeCore.d.ts.map +0 -1
  1162. package/dist/runtimes/local/LocalRuntimeCore.mjs +0 -24
  1163. package/dist/runtimes/local/LocalRuntimeCore.mjs.map +0 -1
  1164. package/dist/runtimes/local/LocalRuntimeOptions.d.ts +0 -46
  1165. package/dist/runtimes/local/LocalRuntimeOptions.d.ts.map +0 -1
  1166. package/dist/runtimes/local/LocalRuntimeOptions.mjs +0 -25
  1167. package/dist/runtimes/local/LocalRuntimeOptions.mjs.map +0 -1
  1168. package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts +0 -32
  1169. package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts.map +0 -1
  1170. package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs +0 -72
  1171. package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs.map +0 -1
  1172. package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts +0 -45
  1173. package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts.map +0 -1
  1174. package/dist/runtimes/local/LocalThreadRuntimeCore.mjs +0 -309
  1175. package/dist/runtimes/local/LocalThreadRuntimeCore.mjs.map +0 -1
  1176. package/dist/runtimes/local/index.d.ts +0 -4
  1177. package/dist/runtimes/local/index.d.ts.map +0 -1
  1178. package/dist/runtimes/local/index.mjs +0 -6
  1179. package/dist/runtimes/local/index.mjs.map +0 -1
  1180. package/dist/runtimes/local/shouldContinue.d.ts +0 -3
  1181. package/dist/runtimes/local/shouldContinue.d.ts.map +0 -1
  1182. package/dist/runtimes/local/shouldContinue.mjs +0 -13
  1183. package/dist/runtimes/local/shouldContinue.mjs.map +0 -1
  1184. package/dist/runtimes/local/useLocalRuntime.d.ts +0 -5
  1185. package/dist/runtimes/local/useLocalRuntime.d.ts.map +0 -1
  1186. package/dist/runtimes/local/useLocalRuntime.mjs +0 -46
  1187. package/dist/runtimes/local/useLocalRuntime.mjs.map +0 -1
  1188. package/dist/runtimes/remote-thread-list/BaseSubscribable.d.ts +0 -8
  1189. package/dist/runtimes/remote-thread-list/BaseSubscribable.d.ts.map +0 -1
  1190. package/dist/runtimes/remote-thread-list/BaseSubscribable.mjs +0 -37
  1191. package/dist/runtimes/remote-thread-list/BaseSubscribable.mjs.map +0 -1
  1192. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.d.ts +0 -3
  1193. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.d.ts.map +0 -1
  1194. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.mjs +0 -128
  1195. package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.mjs.map +0 -1
  1196. package/dist/runtimes/remote-thread-list/OptimisticState.d.ts +0 -23
  1197. package/dist/runtimes/remote-thread-list/OptimisticState.d.ts.map +0 -1
  1198. package/dist/runtimes/remote-thread-list/OptimisticState.mjs +0 -60
  1199. package/dist/runtimes/remote-thread-list/OptimisticState.mjs.map +0 -1
  1200. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts +0 -81
  1201. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts.map +0 -1
  1202. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.mjs +0 -128
  1203. package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.mjs.map +0 -1
  1204. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts +0 -119
  1205. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts.map +0 -1
  1206. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.mjs +0 -431
  1207. package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.mjs.map +0 -1
  1208. package/dist/runtimes/remote-thread-list/adapter/cloud.d.ts +0 -13
  1209. package/dist/runtimes/remote-thread-list/adapter/cloud.d.ts.map +0 -1
  1210. package/dist/runtimes/remote-thread-list/adapter/cloud.mjs +0 -83
  1211. package/dist/runtimes/remote-thread-list/adapter/cloud.mjs.map +0 -1
  1212. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +0 -12
  1213. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +0 -1
  1214. package/dist/runtimes/remote-thread-list/adapter/in-memory.mjs +0 -30
  1215. package/dist/runtimes/remote-thread-list/adapter/in-memory.mjs.map +0 -1
  1216. package/dist/runtimes/remote-thread-list/index.d.ts +0 -4
  1217. package/dist/runtimes/remote-thread-list/index.d.ts.map +0 -1
  1218. package/dist/runtimes/remote-thread-list/index.mjs +0 -8
  1219. package/dist/runtimes/remote-thread-list/index.mjs.map +0 -1
  1220. package/dist/runtimes/remote-thread-list/types.d.ts +0 -32
  1221. package/dist/runtimes/remote-thread-list/types.d.ts.map +0 -1
  1222. package/dist/runtimes/remote-thread-list/types.mjs +0 -1
  1223. package/dist/runtimes/remote-thread-list/types.mjs.map +0 -1
  1224. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.d.ts +0 -4
  1225. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.d.ts.map +0 -1
  1226. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.mjs +0 -32
  1227. package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.mjs.map +0 -1
  1228. package/dist/runtimes/utils/MessageRepository.d.ts +0 -151
  1229. package/dist/runtimes/utils/MessageRepository.d.ts.map +0 -1
  1230. package/dist/runtimes/utils/MessageRepository.mjs +0 -345
  1231. package/dist/runtimes/utils/MessageRepository.mjs.map +0 -1
  1232. package/dist/tests/MessageRepository.test.d.ts +0 -2
  1233. package/dist/tests/MessageRepository.test.d.ts.map +0 -1
  1234. package/dist/tests/setup.d.ts +0 -2
  1235. package/dist/tests/setup.d.ts.map +0 -1
  1236. package/dist/tests/setup.mjs +0 -2974
  1237. package/dist/tests/setup.mjs.map +0 -1
  1238. package/dist/types/AssistantTypes.d.ts +0 -132
  1239. package/dist/types/AssistantTypes.d.ts.map +0 -1
  1240. package/dist/types/AssistantTypes.mjs +0 -1
  1241. package/dist/types/AssistantTypes.mjs.map +0 -1
  1242. package/dist/types/AttachmentTypes.d.ts +0 -35
  1243. package/dist/types/AttachmentTypes.d.ts.map +0 -1
  1244. package/dist/types/AttachmentTypes.mjs +0 -1
  1245. package/dist/types/AttachmentTypes.mjs.map +0 -1
  1246. package/dist/types/ContentPartComponentTypes.d.ts +0 -24
  1247. package/dist/types/ContentPartComponentTypes.d.ts.map +0 -1
  1248. package/dist/types/ContentPartComponentTypes.mjs +0 -1
  1249. package/dist/types/ContentPartComponentTypes.mjs.map +0 -1
  1250. package/dist/types/Unsubscribe.d.ts +0 -2
  1251. package/dist/types/Unsubscribe.d.ts.map +0 -1
  1252. package/dist/types/Unsubscribe.mjs +0 -1
  1253. package/dist/types/Unsubscribe.mjs.map +0 -1
  1254. package/dist/types/index.d.ts +0 -5
  1255. package/dist/types/index.d.ts.map +0 -1
  1256. package/dist/types/index.mjs +0 -1
  1257. package/dist/types/index.mjs.map +0 -1
  1258. package/dist/utils/CompositeContextProvider.d.ts +0 -10
  1259. package/dist/utils/CompositeContextProvider.d.ts.map +0 -1
  1260. package/dist/utils/CompositeContextProvider.mjs +0 -34
  1261. package/dist/utils/CompositeContextProvider.mjs.map +0 -1
  1262. package/dist/utils/RequireAtLeastOne.d.ts +0 -4
  1263. package/dist/utils/RequireAtLeastOne.d.ts.map +0 -1
  1264. package/dist/utils/RequireAtLeastOne.mjs +0 -1
  1265. package/dist/utils/RequireAtLeastOne.mjs.map +0 -1
  1266. package/dist/utils/combined/createCombinedStore.d.ts +0 -8
  1267. package/dist/utils/combined/createCombinedStore.d.ts.map +0 -1
  1268. package/dist/utils/combined/createCombinedStore.mjs +0 -22
  1269. package/dist/utils/combined/createCombinedStore.mjs.map +0 -1
  1270. package/dist/utils/combined/useCombinedStore.d.ts +0 -3
  1271. package/dist/utils/combined/useCombinedStore.d.ts.map +0 -1
  1272. package/dist/utils/combined/useCombinedStore.mjs +0 -15
  1273. package/dist/utils/combined/useCombinedStore.mjs.map +0 -1
  1274. package/dist/utils/createActionButton.d.ts +0 -11
  1275. package/dist/utils/createActionButton.d.ts.map +0 -1
  1276. package/dist/utils/createActionButton.mjs +0 -37
  1277. package/dist/utils/createActionButton.mjs.map +0 -1
  1278. package/dist/utils/getThreadMessageText.d.ts +0 -3
  1279. package/dist/utils/getThreadMessageText.d.ts.map +0 -1
  1280. package/dist/utils/getThreadMessageText.mjs +0 -11
  1281. package/dist/utils/getThreadMessageText.mjs.map +0 -1
  1282. package/dist/utils/hooks/useManagedRef.d.ts +0 -2
  1283. package/dist/utils/hooks/useManagedRef.d.ts.map +0 -1
  1284. package/dist/utils/hooks/useManagedRef.mjs +0 -21
  1285. package/dist/utils/hooks/useManagedRef.mjs.map +0 -1
  1286. package/dist/utils/hooks/useOnResizeContent.d.ts +0 -2
  1287. package/dist/utils/hooks/useOnResizeContent.d.ts.map +0 -1
  1288. package/dist/utils/hooks/useOnResizeContent.mjs +0 -34
  1289. package/dist/utils/hooks/useOnResizeContent.mjs.map +0 -1
  1290. package/dist/utils/hooks/useOnScrollToBottom.d.ts +0 -2
  1291. package/dist/utils/hooks/useOnScrollToBottom.d.ts.map +0 -1
  1292. package/dist/utils/hooks/useOnScrollToBottom.mjs +0 -17
  1293. package/dist/utils/hooks/useOnScrollToBottom.mjs.map +0 -1
  1294. package/dist/utils/idUtils.d.ts +0 -4
  1295. package/dist/utils/idUtils.d.ts.map +0 -1
  1296. package/dist/utils/idUtils.mjs +0 -15
  1297. package/dist/utils/idUtils.mjs.map +0 -1
  1298. package/dist/utils/json/is-json.d.ts +0 -5
  1299. package/dist/utils/json/is-json.d.ts.map +0 -1
  1300. package/dist/utils/json/is-json.mjs +0 -35
  1301. package/dist/utils/json/is-json.mjs.map +0 -1
  1302. package/dist/utils/json/json-value.d.ts +0 -6
  1303. package/dist/utils/json/json-value.d.ts.map +0 -1
  1304. package/dist/utils/json/json-value.mjs +0 -1
  1305. package/dist/utils/json/json-value.mjs.map +0 -1
  1306. package/dist/utils/smooth/SmoothContext.d.ts +0 -87
  1307. package/dist/utils/smooth/SmoothContext.d.ts.map +0 -1
  1308. package/dist/utils/smooth/SmoothContext.mjs +0 -53
  1309. package/dist/utils/smooth/SmoothContext.mjs.map +0 -1
  1310. package/dist/utils/smooth/index.d.ts +0 -3
  1311. package/dist/utils/smooth/index.d.ts.map +0 -1
  1312. package/dist/utils/smooth/index.mjs +0 -11
  1313. package/dist/utils/smooth/index.mjs.map +0 -1
  1314. package/dist/utils/smooth/useSmooth.d.ts +0 -4
  1315. package/dist/utils/smooth/useSmooth.d.ts.map +0 -1
  1316. package/dist/utils/smooth/useSmooth.mjs +0 -114
  1317. package/dist/utils/smooth/useSmooth.mjs.map +0 -1
  1318. package/dist/utils/useToolArgsFieldStatus.d.ts +0 -12
  1319. package/dist/utils/useToolArgsFieldStatus.d.ts.map +0 -1
  1320. package/dist/utils/useToolArgsFieldStatus.mjs +0 -20
  1321. package/dist/utils/useToolArgsFieldStatus.mjs.map +0 -1
@@ -1,2998 +1,6 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
-
25
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/vi.B-PuvDzu.js
26
- var import_expect = require("@vitest/expect.js");
27
- var import_runner = require("@vitest/runner.js");
28
- var import_utils2 = require("@vitest/runner/utils.js");
29
- var chai$1 = __toESM(require("chai.js"), 1);
30
-
31
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/utils.CtocqOoE.js
32
- var import_utils = require("@vitest/utils.js");
33
- var NAME_WORKER_STATE = "__vitest_worker__";
34
- function getWorkerState() {
35
- const workerState = globalThis[NAME_WORKER_STATE];
36
- if (!workerState) {
37
- const errorMsg = 'Vitest failed to access its internal state.\n\nOne of the following is possible:\n- "vitest" is imported directly without running "vitest" command\n- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n';
38
- throw new Error(errorMsg);
39
- }
40
- return workerState;
41
- }
42
- function getCurrentEnvironment() {
43
- const state = getWorkerState();
44
- return state?.environment.name;
45
- }
46
- function isChildProcess() {
47
- return typeof process !== "undefined" && !!process.send;
48
- }
49
- function resetModules(modules, resetMocks = false) {
50
- const skipPaths = [
51
- /\/vitest\/dist\//,
52
- /\/vite-node\/dist\//,
53
- /vitest-virtual-\w+\/dist/,
54
- /@vitest\/dist/,
55
- ...!resetMocks ? [/^mock:/] : []
56
- ];
57
- modules.forEach((mod, path) => {
58
- if (skipPaths.some((re) => re.test(path))) {
59
- return;
60
- }
61
- modules.invalidateModule(mod);
62
- });
63
- }
64
- function waitNextTick() {
65
- const { setTimeout } = (0, import_utils.getSafeTimers)();
66
- return new Promise((resolve) => setTimeout(resolve, 0));
67
- }
68
- async function waitForImportsToResolve() {
69
- await waitNextTick();
70
- const state = getWorkerState();
71
- const promises = [];
72
- let resolvingCount = 0;
73
- for (const mod of state.moduleCache.values()) {
74
- if (mod.promise && !mod.evaluated) {
75
- promises.push(mod.promise);
76
- }
77
- if (mod.resolving) {
78
- resolvingCount++;
79
- }
80
- }
81
- if (!promises.length && !resolvingCount) {
82
- return;
83
- }
84
- await Promise.allSettled(promises);
85
- await waitForImportsToResolve();
86
- }
87
-
88
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/vi.B-PuvDzu.js
89
- var import_utils3 = require("@vitest/utils.js");
90
-
91
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
92
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
93
- function getDefaultExportFromCjs(x) {
94
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
95
- }
96
-
97
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/vi.B-PuvDzu.js
98
- var import_snapshot = require("@vitest/snapshot.js");
99
- var import_error = require("@vitest/utils/error.js");
100
- var import_spy = require("@vitest/spy.js");
101
- var import_source_map = require("@vitest/utils/source-map.js");
102
-
103
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/date.CDOsz-HY.js
104
- var RealDate = Date;
105
- var now = null;
106
- var MockDate = class _MockDate extends RealDate {
107
- constructor(y, m, d, h, M, s, ms) {
108
- super();
109
- let date;
110
- switch (arguments.length) {
111
- case 0:
112
- if (now !== null) {
113
- date = new RealDate(now.valueOf());
114
- } else {
115
- date = new RealDate();
116
- }
117
- break;
118
- case 1:
119
- date = new RealDate(y);
120
- break;
121
- default:
122
- d = typeof d === "undefined" ? 1 : d;
123
- h = h || 0;
124
- M = M || 0;
125
- s = s || 0;
126
- ms = ms || 0;
127
- date = new RealDate(y, m, d, h, M, s, ms);
128
- break;
129
- }
130
- Object.setPrototypeOf(date, _MockDate.prototype);
131
- return date;
132
- }
133
- };
134
- MockDate.UTC = RealDate.UTC;
135
- MockDate.now = function() {
136
- return new MockDate().valueOf();
137
- };
138
- MockDate.parse = function(dateString) {
139
- return RealDate.parse(dateString);
140
- };
141
- MockDate.toString = function() {
142
- return RealDate.toString();
143
- };
144
- function mockDate(date) {
145
- const dateObj = new RealDate(date.valueOf());
146
- if (Number.isNaN(dateObj.getTime())) {
147
- throw new TypeError(`mockdate: The time set is an invalid date: ${date}`);
148
- }
149
- globalThis.Date = MockDate;
150
- now = dateObj.valueOf();
151
- }
152
- function resetDate() {
153
- globalThis.Date = RealDate;
154
- }
155
-
156
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/chunks/vi.B-PuvDzu.js
157
- var unsupported = [
158
- "matchSnapshot",
159
- "toMatchSnapshot",
160
- "toMatchInlineSnapshot",
161
- "toThrowErrorMatchingSnapshot",
162
- "toThrowErrorMatchingInlineSnapshot",
163
- "throws",
164
- "Throw",
165
- "throw",
166
- "toThrow",
167
- "toThrowError"
168
- ];
169
- function createExpectPoll(expect2) {
170
- return function poll(fn2, options = {}) {
171
- const state = getWorkerState();
172
- const defaults = state.config.expect?.poll ?? {};
173
- const { interval = defaults.interval ?? 50, timeout = defaults.timeout ?? 1e3, message } = options;
174
- const assertion = expect2(null, message).withContext({ poll: true });
175
- fn2 = fn2.bind(assertion);
176
- const test2 = chai$1.util.flag(assertion, "vitest-test");
177
- if (!test2) {
178
- throw new Error("expect.poll() must be called inside a test");
179
- }
180
- const proxy = new Proxy(assertion, { get(target, key, receiver) {
181
- const assertionFunction = Reflect.get(target, key, receiver);
182
- if (typeof assertionFunction !== "function") {
183
- return assertionFunction instanceof chai$1.Assertion ? proxy : assertionFunction;
184
- }
185
- if (key === "assert") {
186
- return assertionFunction;
187
- }
188
- if (typeof key === "string" && unsupported.includes(key)) {
189
- throw new SyntaxError(`expect.poll() is not supported in combination with .${key}(). Use vi.waitFor() if your assertion condition is unstable.`);
190
- }
191
- return function(...args) {
192
- const STACK_TRACE_ERROR = new Error("STACK_TRACE_ERROR");
193
- const promise = () => new Promise((resolve, reject) => {
194
- let intervalId;
195
- let timeoutId;
196
- let lastError;
197
- const { setTimeout, clearTimeout } = (0, import_utils3.getSafeTimers)();
198
- const check = async () => {
199
- try {
200
- chai$1.util.flag(assertion, "_name", key);
201
- const obj = await fn2();
202
- chai$1.util.flag(assertion, "object", obj);
203
- resolve(await assertionFunction.call(assertion, ...args));
204
- clearTimeout(intervalId);
205
- clearTimeout(timeoutId);
206
- } catch (err) {
207
- lastError = err;
208
- if (!chai$1.util.flag(assertion, "_isLastPollAttempt")) {
209
- intervalId = setTimeout(check, interval);
210
- }
211
- }
212
- };
213
- timeoutId = setTimeout(() => {
214
- clearTimeout(intervalId);
215
- chai$1.util.flag(assertion, "_isLastPollAttempt", true);
216
- const rejectWithCause = (cause) => {
217
- reject(copyStackTrace$1(new Error("Matcher did not succeed in time.", { cause }), STACK_TRACE_ERROR));
218
- };
219
- check().then(() => rejectWithCause(lastError)).catch((e) => rejectWithCause(e));
220
- }, timeout);
221
- check();
222
- });
223
- let awaited = false;
224
- test2.onFinished ??= [];
225
- test2.onFinished.push(() => {
226
- if (!awaited) {
227
- const negated = chai$1.util.flag(assertion, "negate") ? "not." : "";
228
- const name = chai$1.util.flag(assertion, "_poll.element") ? "element(locator)" : "poll(assertion)";
229
- const assertionString = `expect.${name}.${negated}${String(key)}()`;
230
- const error = new Error(`${assertionString} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
231
-
232
- await ${assertionString}
233
- `);
234
- throw copyStackTrace$1(error, STACK_TRACE_ERROR);
235
- }
236
- });
237
- let resultPromise;
238
- return {
239
- then(onFulfilled, onRejected) {
240
- awaited = true;
241
- return (resultPromise ||= promise()).then(onFulfilled, onRejected);
242
- },
243
- catch(onRejected) {
244
- return (resultPromise ||= promise()).catch(onRejected);
245
- },
246
- finally(onFinally) {
247
- return (resultPromise ||= promise()).finally(onFinally);
248
- },
249
- [Symbol.toStringTag]: "Promise"
250
- };
251
- };
252
- } });
253
- return proxy;
254
- };
255
- }
256
- function copyStackTrace$1(target, source) {
257
- if (source.stack !== void 0) {
258
- target.stack = source.stack.replace(source.message, target.message);
259
- }
260
- return target;
261
- }
262
- function commonjsRequire(path) {
263
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
264
- }
265
- var chaiSubset$1 = { exports: {} };
266
- var chaiSubset = chaiSubset$1.exports;
267
- var hasRequiredChaiSubset;
268
- function requireChaiSubset() {
269
- if (hasRequiredChaiSubset) return chaiSubset$1.exports;
270
- hasRequiredChaiSubset = 1;
271
- (function(module2, exports2) {
272
- (function() {
273
- (function(chaiSubset2) {
274
- if (typeof commonjsRequire === "function" && true && true) {
275
- return module2.exports = chaiSubset2;
276
- } else {
277
- return chai.use(chaiSubset2);
278
- }
279
- })(function(chai3, utils) {
280
- var Assertion2 = chai3.Assertion;
281
- var assertionPrototype = Assertion2.prototype;
282
- Assertion2.addMethod("containSubset", function(expected) {
283
- var actual = utils.flag(this, "object");
284
- var showDiff = chai3.config.showDiff;
285
- assertionPrototype.assert.call(
286
- this,
287
- compare(expected, actual),
288
- "expected #{act} to contain subset #{exp}",
289
- "expected #{act} to not contain subset #{exp}",
290
- expected,
291
- actual,
292
- showDiff
293
- );
294
- });
295
- chai3.assert.containSubset = function(val, exp, msg) {
296
- new chai3.Assertion(val, msg).to.be.containSubset(exp);
297
- };
298
- function compare(expected, actual) {
299
- if (expected === actual) {
300
- return true;
301
- }
302
- if (typeof actual !== typeof expected) {
303
- return false;
304
- }
305
- if (typeof expected !== "object" || expected === null) {
306
- return expected === actual;
307
- }
308
- if (!!expected && !actual) {
309
- return false;
310
- }
311
- if (Array.isArray(expected)) {
312
- if (typeof actual.length !== "number") {
313
- return false;
314
- }
315
- var aa = Array.prototype.slice.call(actual);
316
- return expected.every(function(exp) {
317
- return aa.some(function(act) {
318
- return compare(exp, act);
319
- });
320
- });
321
- }
322
- if (expected instanceof Date) {
323
- if (actual instanceof Date) {
324
- return expected.getTime() === actual.getTime();
325
- } else {
326
- return false;
327
- }
328
- }
329
- return Object.keys(expected).every(function(key) {
330
- var eo = expected[key];
331
- var ao = actual[key];
332
- if (typeof eo === "object" && eo !== null && ao !== null) {
333
- return compare(eo, ao);
334
- }
335
- if (typeof eo === "function") {
336
- return eo(ao);
337
- }
338
- return ao === eo;
339
- });
340
- }
341
- });
342
- }).call(chaiSubset);
343
- })(chaiSubset$1);
344
- return chaiSubset$1.exports;
345
- }
346
- var chaiSubsetExports = requireChaiSubset();
347
- var Subset = /* @__PURE__ */ getDefaultExportFromCjs(chaiSubsetExports);
348
- function createAssertionMessage(util2, assertion, hasArgs) {
349
- const not = util2.flag(assertion, "negate") ? "not." : "";
350
- const name = `${util2.flag(assertion, "_name")}(${"expected"})`;
351
- const promiseName = util2.flag(assertion, "promise");
352
- const promise = promiseName ? `.${promiseName}` : "";
353
- return `expect(actual)${promise}.${not}${name}`;
354
- }
355
- function recordAsyncExpect(_test, promise, assertion, error) {
356
- const test2 = _test;
357
- if (test2 && promise instanceof Promise) {
358
- promise = promise.finally(() => {
359
- if (!test2.promises) {
360
- return;
361
- }
362
- const index = test2.promises.indexOf(promise);
363
- if (index !== -1) {
364
- test2.promises.splice(index, 1);
365
- }
366
- });
367
- if (!test2.promises) {
368
- test2.promises = [];
369
- }
370
- test2.promises.push(promise);
371
- let resolved = false;
372
- test2.onFinished ??= [];
373
- test2.onFinished.push(() => {
374
- if (!resolved) {
375
- const processor = globalThis.__vitest_worker__?.onFilterStackTrace || ((s) => s || "");
376
- const stack = processor(error.stack);
377
- console.warn([
378
- `Promise returned by \`${assertion}\` was not awaited. `,
379
- "Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",
380
- "Please remember to await the assertion.\n",
381
- stack
382
- ].join(""));
383
- }
384
- });
385
- return {
386
- then(onFulfilled, onRejected) {
387
- resolved = true;
388
- return promise.then(onFulfilled, onRejected);
389
- },
390
- catch(onRejected) {
391
- return promise.catch(onRejected);
392
- },
393
- finally(onFinally) {
394
- return promise.finally(onFinally);
395
- },
396
- [Symbol.toStringTag]: "Promise"
397
- };
398
- }
399
- return promise;
400
- }
401
- var _client;
402
- function getSnapshotClient() {
403
- if (!_client) {
404
- _client = new import_snapshot.SnapshotClient({ isEqual: (received, expected) => {
405
- return (0, import_expect.equals)(received, expected, [import_expect.iterableEquality, import_expect.subsetEquality]);
406
- } });
407
- }
408
- return _client;
409
- }
410
- function getError(expected, promise) {
411
- if (typeof expected !== "function") {
412
- if (!promise) {
413
- throw new Error(`expected must be a function, received ${typeof expected}`);
414
- }
415
- return expected;
416
- }
417
- try {
418
- expected();
419
- } catch (e) {
420
- return e;
421
- }
422
- throw new Error("snapshot function didn't throw");
423
- }
424
- function getTestNames(test2) {
425
- return {
426
- filepath: test2.file.filepath,
427
- name: (0, import_utils2.getNames)(test2).slice(1).join(" > "),
428
- testId: test2.id
429
- };
430
- }
431
- var SnapshotPlugin = (chai3, utils) => {
432
- function getTest(assertionName, obj) {
433
- const test2 = utils.flag(obj, "vitest-test");
434
- if (!test2) {
435
- throw new Error(`'${assertionName}' cannot be used without test context`);
436
- }
437
- return test2;
438
- }
439
- for (const key of ["matchSnapshot", "toMatchSnapshot"]) {
440
- utils.addMethod(chai3.Assertion.prototype, key, function(properties, message) {
441
- utils.flag(this, "_name", key);
442
- const isNot = utils.flag(this, "negate");
443
- if (isNot) {
444
- throw new Error(`${key} cannot be used with "not"`);
445
- }
446
- const expected = utils.flag(this, "object");
447
- const test2 = getTest(key, this);
448
- if (typeof properties === "string" && typeof message === "undefined") {
449
- message = properties;
450
- properties = void 0;
451
- }
452
- const errorMessage = utils.flag(this, "message");
453
- getSnapshotClient().assert({
454
- received: expected,
455
- message,
456
- isInline: false,
457
- properties,
458
- errorMessage,
459
- ...getTestNames(test2)
460
- });
461
- });
462
- }
463
- utils.addMethod(chai3.Assertion.prototype, "toMatchFileSnapshot", function(file, message) {
464
- utils.flag(this, "_name", "toMatchFileSnapshot");
465
- const isNot = utils.flag(this, "negate");
466
- if (isNot) {
467
- throw new Error('toMatchFileSnapshot cannot be used with "not"');
468
- }
469
- const error = new Error("resolves");
470
- const expected = utils.flag(this, "object");
471
- const test2 = getTest("toMatchFileSnapshot", this);
472
- const errorMessage = utils.flag(this, "message");
473
- const promise = getSnapshotClient().assertRaw({
474
- received: expected,
475
- message,
476
- isInline: false,
477
- rawSnapshot: { file },
478
- errorMessage,
479
- ...getTestNames(test2)
480
- });
481
- return recordAsyncExpect(test2, promise, createAssertionMessage(utils, this), error);
482
- });
483
- utils.addMethod(chai3.Assertion.prototype, "toMatchInlineSnapshot", function __INLINE_SNAPSHOT__(properties, inlineSnapshot, message) {
484
- utils.flag(this, "_name", "toMatchInlineSnapshot");
485
- const isNot = utils.flag(this, "negate");
486
- if (isNot) {
487
- throw new Error('toMatchInlineSnapshot cannot be used with "not"');
488
- }
489
- const test2 = getTest("toMatchInlineSnapshot", this);
490
- const isInsideEach = test2.each || test2.suite?.each;
491
- if (isInsideEach) {
492
- throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");
493
- }
494
- const expected = utils.flag(this, "object");
495
- const error = utils.flag(this, "error");
496
- if (typeof properties === "string") {
497
- message = inlineSnapshot;
498
- inlineSnapshot = properties;
499
- properties = void 0;
500
- }
501
- if (inlineSnapshot) {
502
- inlineSnapshot = (0, import_snapshot.stripSnapshotIndentation)(inlineSnapshot);
503
- }
504
- const errorMessage = utils.flag(this, "message");
505
- getSnapshotClient().assert({
506
- received: expected,
507
- message,
508
- isInline: true,
509
- properties,
510
- inlineSnapshot,
511
- error,
512
- errorMessage,
513
- ...getTestNames(test2)
514
- });
515
- });
516
- utils.addMethod(chai3.Assertion.prototype, "toThrowErrorMatchingSnapshot", function(message) {
517
- utils.flag(this, "_name", "toThrowErrorMatchingSnapshot");
518
- const isNot = utils.flag(this, "negate");
519
- if (isNot) {
520
- throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');
521
- }
522
- const expected = utils.flag(this, "object");
523
- const test2 = getTest("toThrowErrorMatchingSnapshot", this);
524
- const promise = utils.flag(this, "promise");
525
- const errorMessage = utils.flag(this, "message");
526
- getSnapshotClient().assert({
527
- received: getError(expected, promise),
528
- message,
529
- errorMessage,
530
- ...getTestNames(test2)
531
- });
532
- });
533
- utils.addMethod(chai3.Assertion.prototype, "toThrowErrorMatchingInlineSnapshot", function __INLINE_SNAPSHOT__(inlineSnapshot, message) {
534
- const isNot = utils.flag(this, "negate");
535
- if (isNot) {
536
- throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');
537
- }
538
- const test2 = getTest("toThrowErrorMatchingInlineSnapshot", this);
539
- const isInsideEach = test2.each || test2.suite?.each;
540
- if (isInsideEach) {
541
- throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");
542
- }
543
- const expected = utils.flag(this, "object");
544
- const error = utils.flag(this, "error");
545
- const promise = utils.flag(this, "promise");
546
- const errorMessage = utils.flag(this, "message");
547
- if (inlineSnapshot) {
548
- inlineSnapshot = (0, import_snapshot.stripSnapshotIndentation)(inlineSnapshot);
549
- }
550
- getSnapshotClient().assert({
551
- received: getError(expected, promise),
552
- message,
553
- inlineSnapshot,
554
- isInline: true,
555
- error,
556
- errorMessage,
557
- ...getTestNames(test2)
558
- });
559
- });
560
- utils.addMethod(chai3.expect, "addSnapshotSerializer", import_snapshot.addSerializer);
561
- };
562
- chai$1.use(import_expect.JestExtend);
563
- chai$1.use(import_expect.JestChaiExpect);
564
- chai$1.use(Subset);
565
- chai$1.use(SnapshotPlugin);
566
- chai$1.use(import_expect.JestAsymmetricMatchers);
567
- function createExpect(test2) {
568
- const expect2 = (value, message) => {
569
- const { assertionCalls } = (0, import_expect.getState)(expect2);
570
- (0, import_expect.setState)({ assertionCalls: assertionCalls + 1 }, expect2);
571
- const assert3 = chai$1.expect(value, message);
572
- const _test = test2 || (0, import_runner.getCurrentTest)();
573
- if (_test) {
574
- return assert3.withTest(_test);
575
- } else {
576
- return assert3;
577
- }
578
- };
579
- Object.assign(expect2, chai$1.expect);
580
- Object.assign(expect2, globalThis[import_expect.ASYMMETRIC_MATCHERS_OBJECT]);
581
- expect2.getState = () => (0, import_expect.getState)(expect2);
582
- expect2.setState = (state) => (0, import_expect.setState)(state, expect2);
583
- const globalState = (0, import_expect.getState)(globalThis[import_expect.GLOBAL_EXPECT]) || {};
584
- (0, import_expect.setState)({
585
- ...globalState,
586
- assertionCalls: 0,
587
- isExpectingAssertions: false,
588
- isExpectingAssertionsError: null,
589
- expectedAssertionsNumber: null,
590
- expectedAssertionsNumberErrorGen: null,
591
- environment: getCurrentEnvironment(),
592
- get testPath() {
593
- return getWorkerState().filepath;
594
- },
595
- currentTestName: test2 ? (0, import_utils2.getTestName)(test2) : globalState.currentTestName
596
- }, expect2);
597
- expect2.extend = (matchers) => chai$1.expect.extend(expect2, matchers);
598
- expect2.addEqualityTesters = (customTesters) => (0, import_expect.addCustomEqualityTesters)(customTesters);
599
- expect2.soft = (...args) => {
600
- return expect2(...args).withContext({ soft: true });
601
- };
602
- expect2.poll = createExpectPoll(expect2);
603
- expect2.unreachable = (message) => {
604
- chai$1.assert.fail(`expected${message ? ` "${message}" ` : " "}not to be reached`);
605
- };
606
- function assertions(expected) {
607
- const errorGen = () => new Error(`expected number of assertions to be ${expected}, but got ${expect2.getState().assertionCalls}`);
608
- if (Error.captureStackTrace) {
609
- Error.captureStackTrace(errorGen(), assertions);
610
- }
611
- expect2.setState({
612
- expectedAssertionsNumber: expected,
613
- expectedAssertionsNumberErrorGen: errorGen
614
- });
615
- }
616
- function hasAssertions() {
617
- const error = new Error("expected any number of assertion, but got none");
618
- if (Error.captureStackTrace) {
619
- Error.captureStackTrace(error, hasAssertions);
620
- }
621
- expect2.setState({
622
- isExpectingAssertions: true,
623
- isExpectingAssertionsError: error
624
- });
625
- }
626
- chai$1.util.addMethod(expect2, "assertions", assertions);
627
- chai$1.util.addMethod(expect2, "hasAssertions", hasAssertions);
628
- expect2.extend(import_expect.customMatchers);
629
- return expect2;
630
- }
631
- var globalExpect = createExpect();
632
- Object.defineProperty(globalThis, import_expect.GLOBAL_EXPECT, {
633
- value: globalExpect,
634
- writable: true,
635
- configurable: true
636
- });
637
- var fakeTimersSrc = {};
638
- var global2;
639
- var hasRequiredGlobal;
640
- function requireGlobal() {
641
- if (hasRequiredGlobal) return global2;
642
- hasRequiredGlobal = 1;
643
- var globalObject;
644
- if (typeof commonjsGlobal !== "undefined") {
645
- globalObject = commonjsGlobal;
646
- } else if (typeof window !== "undefined") {
647
- globalObject = window;
648
- } else {
649
- globalObject = self;
650
- }
651
- global2 = globalObject;
652
- return global2;
653
- }
654
- var throwsOnProto_1;
655
- var hasRequiredThrowsOnProto;
656
- function requireThrowsOnProto() {
657
- if (hasRequiredThrowsOnProto) return throwsOnProto_1;
658
- hasRequiredThrowsOnProto = 1;
659
- let throwsOnProto;
660
- try {
661
- const object2 = {};
662
- object2.__proto__;
663
- throwsOnProto = false;
664
- } catch (_) {
665
- throwsOnProto = true;
666
- }
667
- throwsOnProto_1 = throwsOnProto;
668
- return throwsOnProto_1;
669
- }
670
- var copyPrototypeMethods;
671
- var hasRequiredCopyPrototypeMethods;
672
- function requireCopyPrototypeMethods() {
673
- if (hasRequiredCopyPrototypeMethods) return copyPrototypeMethods;
674
- hasRequiredCopyPrototypeMethods = 1;
675
- var call = Function.call;
676
- var throwsOnProto = requireThrowsOnProto();
677
- var disallowedProperties = [
678
- // ignore size because it throws from Map
679
- "size",
680
- "caller",
681
- "callee",
682
- "arguments"
683
- ];
684
- if (throwsOnProto) {
685
- disallowedProperties.push("__proto__");
686
- }
687
- copyPrototypeMethods = function copyPrototypeMethods2(prototype) {
688
- return Object.getOwnPropertyNames(prototype).reduce(
689
- function(result, name) {
690
- if (disallowedProperties.includes(name)) {
691
- return result;
692
- }
693
- if (typeof prototype[name] !== "function") {
694
- return result;
695
- }
696
- result[name] = call.bind(prototype[name]);
697
- return result;
698
- },
699
- /* @__PURE__ */ Object.create(null)
700
- );
701
- };
702
- return copyPrototypeMethods;
703
- }
704
- var array;
705
- var hasRequiredArray;
706
- function requireArray() {
707
- if (hasRequiredArray) return array;
708
- hasRequiredArray = 1;
709
- var copyPrototype = requireCopyPrototypeMethods();
710
- array = copyPrototype(Array.prototype);
711
- return array;
712
- }
713
- var calledInOrder_1;
714
- var hasRequiredCalledInOrder;
715
- function requireCalledInOrder() {
716
- if (hasRequiredCalledInOrder) return calledInOrder_1;
717
- hasRequiredCalledInOrder = 1;
718
- var every2 = requireArray().every;
719
- function hasCallsLeft(callMap, spy) {
720
- if (callMap[spy.id] === void 0) {
721
- callMap[spy.id] = 0;
722
- }
723
- return callMap[spy.id] < spy.callCount;
724
- }
725
- function checkAdjacentCalls(callMap, spy, index, spies) {
726
- var calledBeforeNext = true;
727
- if (index !== spies.length - 1) {
728
- calledBeforeNext = spy.calledBefore(spies[index + 1]);
729
- }
730
- if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
731
- callMap[spy.id] += 1;
732
- return true;
733
- }
734
- return false;
735
- }
736
- function calledInOrder(spies) {
737
- var callMap = {};
738
- var _spies = arguments.length > 1 ? arguments : spies;
739
- return every2(_spies, checkAdjacentCalls.bind(null, callMap));
740
- }
741
- calledInOrder_1 = calledInOrder;
742
- return calledInOrder_1;
743
- }
744
- var className_1;
745
- var hasRequiredClassName;
746
- function requireClassName() {
747
- if (hasRequiredClassName) return className_1;
748
- hasRequiredClassName = 1;
749
- function className(value) {
750
- const name = value.constructor && value.constructor.name;
751
- return name || null;
752
- }
753
- className_1 = className;
754
- return className_1;
755
- }
756
- var deprecated = {};
757
- var hasRequiredDeprecated;
758
- function requireDeprecated() {
759
- if (hasRequiredDeprecated) return deprecated;
760
- hasRequiredDeprecated = 1;
761
- (function(exports2) {
762
- exports2.wrap = function(func, msg) {
763
- var wrapped = function() {
764
- exports2.printWarning(msg);
765
- return func.apply(this, arguments);
766
- };
767
- if (func.prototype) {
768
- wrapped.prototype = func.prototype;
769
- }
770
- return wrapped;
771
- };
772
- exports2.defaultMsg = function(packageName, funcName) {
773
- return `${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`;
774
- };
775
- exports2.printWarning = function(msg) {
776
- if (typeof process === "object" && process.emitWarning) {
777
- process.emitWarning(msg);
778
- } else if (console.info) {
779
- console.info(msg);
780
- } else {
781
- console.log(msg);
782
- }
783
- };
784
- })(deprecated);
785
- return deprecated;
786
- }
787
- var every;
788
- var hasRequiredEvery;
789
- function requireEvery() {
790
- if (hasRequiredEvery) return every;
791
- hasRequiredEvery = 1;
792
- every = function every2(obj, fn2) {
793
- var pass = true;
794
- try {
795
- obj.forEach(function() {
796
- if (!fn2.apply(this, arguments)) {
797
- throw new Error();
798
- }
799
- });
800
- } catch (e) {
801
- pass = false;
802
- }
803
- return pass;
804
- };
805
- return every;
806
- }
807
- var functionName;
808
- var hasRequiredFunctionName;
809
- function requireFunctionName() {
810
- if (hasRequiredFunctionName) return functionName;
811
- hasRequiredFunctionName = 1;
812
- functionName = function functionName2(func) {
813
- if (!func) {
814
- return "";
815
- }
816
- try {
817
- return func.displayName || func.name || // Use function decomposition as a last resort to get function
818
- // name. Does not rely on function decomposition to work - if it
819
- // doesn't debugging will be slightly less informative
820
- // (i.e. toString will say 'spy' rather than 'myFunc').
821
- (String(func).match(/function ([^\s(]+)/) || [])[1];
822
- } catch (e) {
823
- return "";
824
- }
825
- };
826
- return functionName;
827
- }
828
- var orderByFirstCall_1;
829
- var hasRequiredOrderByFirstCall;
830
- function requireOrderByFirstCall() {
831
- if (hasRequiredOrderByFirstCall) return orderByFirstCall_1;
832
- hasRequiredOrderByFirstCall = 1;
833
- var sort = requireArray().sort;
834
- var slice = requireArray().slice;
835
- function comparator(a, b) {
836
- var aCall = a.getCall(0);
837
- var bCall = b.getCall(0);
838
- var aId = aCall && aCall.callId || -1;
839
- var bId = bCall && bCall.callId || -1;
840
- return aId < bId ? -1 : 1;
841
- }
842
- function orderByFirstCall(spies) {
843
- return sort(slice(spies), comparator);
844
- }
845
- orderByFirstCall_1 = orderByFirstCall;
846
- return orderByFirstCall_1;
847
- }
848
- var _function;
849
- var hasRequired_function;
850
- function require_function() {
851
- if (hasRequired_function) return _function;
852
- hasRequired_function = 1;
853
- var copyPrototype = requireCopyPrototypeMethods();
854
- _function = copyPrototype(Function.prototype);
855
- return _function;
856
- }
857
- var map;
858
- var hasRequiredMap;
859
- function requireMap() {
860
- if (hasRequiredMap) return map;
861
- hasRequiredMap = 1;
862
- var copyPrototype = requireCopyPrototypeMethods();
863
- map = copyPrototype(Map.prototype);
864
- return map;
865
- }
866
- var object;
867
- var hasRequiredObject;
868
- function requireObject() {
869
- if (hasRequiredObject) return object;
870
- hasRequiredObject = 1;
871
- var copyPrototype = requireCopyPrototypeMethods();
872
- object = copyPrototype(Object.prototype);
873
- return object;
874
- }
875
- var set;
876
- var hasRequiredSet;
877
- function requireSet() {
878
- if (hasRequiredSet) return set;
879
- hasRequiredSet = 1;
880
- var copyPrototype = requireCopyPrototypeMethods();
881
- set = copyPrototype(Set.prototype);
882
- return set;
883
- }
884
- var string;
885
- var hasRequiredString;
886
- function requireString() {
887
- if (hasRequiredString) return string;
888
- hasRequiredString = 1;
889
- var copyPrototype = requireCopyPrototypeMethods();
890
- string = copyPrototype(String.prototype);
891
- return string;
892
- }
893
- var prototypes;
894
- var hasRequiredPrototypes;
895
- function requirePrototypes() {
896
- if (hasRequiredPrototypes) return prototypes;
897
- hasRequiredPrototypes = 1;
898
- prototypes = {
899
- array: requireArray(),
900
- function: require_function(),
901
- map: requireMap(),
902
- object: requireObject(),
903
- set: requireSet(),
904
- string: requireString()
905
- };
906
- return prototypes;
907
- }
908
- var typeDetect$1 = { exports: {} };
909
- var typeDetect = typeDetect$1.exports;
910
- var hasRequiredTypeDetect;
911
- function requireTypeDetect() {
912
- if (hasRequiredTypeDetect) return typeDetect$1.exports;
913
- hasRequiredTypeDetect = 1;
914
- (function(module2, exports2) {
915
- (function(global3, factory) {
916
- module2.exports = factory();
917
- })(typeDetect, function() {
918
- var promiseExists = typeof Promise === "function";
919
- var globalObject = typeof self === "object" ? self : commonjsGlobal;
920
- var symbolExists = typeof Symbol !== "undefined";
921
- var mapExists = typeof Map !== "undefined";
922
- var setExists = typeof Set !== "undefined";
923
- var weakMapExists = typeof WeakMap !== "undefined";
924
- var weakSetExists = typeof WeakSet !== "undefined";
925
- var dataViewExists = typeof DataView !== "undefined";
926
- var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== "undefined";
927
- var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== "undefined";
928
- var setEntriesExists = setExists && typeof Set.prototype.entries === "function";
929
- var mapEntriesExists = mapExists && typeof Map.prototype.entries === "function";
930
- var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries());
931
- var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries());
932
- var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === "function";
933
- var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());
934
- var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === "function";
935
- var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(""[Symbol.iterator]());
936
- var toStringLeftSliceLength = 8;
937
- var toStringRightSliceLength = -1;
938
- function typeDetect2(obj) {
939
- var typeofObj = typeof obj;
940
- if (typeofObj !== "object") {
941
- return typeofObj;
942
- }
943
- if (obj === null) {
944
- return "null";
945
- }
946
- if (obj === globalObject) {
947
- return "global";
948
- }
949
- if (Array.isArray(obj) && (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))) {
950
- return "Array";
951
- }
952
- if (typeof window === "object" && window !== null) {
953
- if (typeof window.location === "object" && obj === window.location) {
954
- return "Location";
955
- }
956
- if (typeof window.document === "object" && obj === window.document) {
957
- return "Document";
958
- }
959
- if (typeof window.navigator === "object") {
960
- if (typeof window.navigator.mimeTypes === "object" && obj === window.navigator.mimeTypes) {
961
- return "MimeTypeArray";
962
- }
963
- if (typeof window.navigator.plugins === "object" && obj === window.navigator.plugins) {
964
- return "PluginArray";
965
- }
966
- }
967
- if ((typeof window.HTMLElement === "function" || typeof window.HTMLElement === "object") && obj instanceof window.HTMLElement) {
968
- if (obj.tagName === "BLOCKQUOTE") {
969
- return "HTMLQuoteElement";
970
- }
971
- if (obj.tagName === "TD") {
972
- return "HTMLTableDataCellElement";
973
- }
974
- if (obj.tagName === "TH") {
975
- return "HTMLTableHeaderCellElement";
976
- }
977
- }
978
- }
979
- var stringTag = symbolToStringTagExists && obj[Symbol.toStringTag];
980
- if (typeof stringTag === "string") {
981
- return stringTag;
982
- }
983
- var objPrototype = Object.getPrototypeOf(obj);
984
- if (objPrototype === RegExp.prototype) {
985
- return "RegExp";
986
- }
987
- if (objPrototype === Date.prototype) {
988
- return "Date";
989
- }
990
- if (promiseExists && objPrototype === Promise.prototype) {
991
- return "Promise";
992
- }
993
- if (setExists && objPrototype === Set.prototype) {
994
- return "Set";
995
- }
996
- if (mapExists && objPrototype === Map.prototype) {
997
- return "Map";
998
- }
999
- if (weakSetExists && objPrototype === WeakSet.prototype) {
1000
- return "WeakSet";
1001
- }
1002
- if (weakMapExists && objPrototype === WeakMap.prototype) {
1003
- return "WeakMap";
1004
- }
1005
- if (dataViewExists && objPrototype === DataView.prototype) {
1006
- return "DataView";
1007
- }
1008
- if (mapExists && objPrototype === mapIteratorPrototype) {
1009
- return "Map Iterator";
1010
- }
1011
- if (setExists && objPrototype === setIteratorPrototype) {
1012
- return "Set Iterator";
1013
- }
1014
- if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {
1015
- return "Array Iterator";
1016
- }
1017
- if (stringIteratorExists && objPrototype === stringIteratorPrototype) {
1018
- return "String Iterator";
1019
- }
1020
- if (objPrototype === null) {
1021
- return "Object";
1022
- }
1023
- return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength);
1024
- }
1025
- return typeDetect2;
1026
- });
1027
- })(typeDetect$1);
1028
- return typeDetect$1.exports;
1029
- }
1030
- var typeOf;
1031
- var hasRequiredTypeOf;
1032
- function requireTypeOf() {
1033
- if (hasRequiredTypeOf) return typeOf;
1034
- hasRequiredTypeOf = 1;
1035
- var type = requireTypeDetect();
1036
- typeOf = function typeOf2(value) {
1037
- return type(value).toLowerCase();
1038
- };
1039
- return typeOf;
1040
- }
1041
- var valueToString_1;
1042
- var hasRequiredValueToString;
1043
- function requireValueToString() {
1044
- if (hasRequiredValueToString) return valueToString_1;
1045
- hasRequiredValueToString = 1;
1046
- function valueToString(value) {
1047
- if (value && value.toString) {
1048
- return value.toString();
1049
- }
1050
- return String(value);
1051
- }
1052
- valueToString_1 = valueToString;
1053
- return valueToString_1;
1054
- }
1055
- var lib;
1056
- var hasRequiredLib;
1057
- function requireLib() {
1058
- if (hasRequiredLib) return lib;
1059
- hasRequiredLib = 1;
1060
- lib = {
1061
- global: requireGlobal(),
1062
- calledInOrder: requireCalledInOrder(),
1063
- className: requireClassName(),
1064
- deprecated: requireDeprecated(),
1065
- every: requireEvery(),
1066
- functionName: requireFunctionName(),
1067
- orderByFirstCall: requireOrderByFirstCall(),
1068
- prototypes: requirePrototypes(),
1069
- typeOf: requireTypeOf(),
1070
- valueToString: requireValueToString()
1071
- };
1072
- return lib;
1073
- }
1074
- var hasRequiredFakeTimersSrc;
1075
- function requireFakeTimersSrc() {
1076
- if (hasRequiredFakeTimersSrc) return fakeTimersSrc;
1077
- hasRequiredFakeTimersSrc = 1;
1078
- const globalObject = requireLib().global;
1079
- let timersModule, timersPromisesModule;
1080
- if (typeof __vitest_required__ !== "undefined") {
1081
- try {
1082
- timersModule = __vitest_required__.timers;
1083
- } catch (e) {
1084
- }
1085
- try {
1086
- timersPromisesModule = __vitest_required__.timersPromises;
1087
- } catch (e) {
1088
- }
1089
- }
1090
- function withGlobal(_global) {
1091
- const maxTimeout = Math.pow(2, 31) - 1;
1092
- const idCounterStart = 1e12;
1093
- const NOOP = function() {
1094
- return void 0;
1095
- };
1096
- const NOOP_ARRAY = function() {
1097
- return [];
1098
- };
1099
- const isPresent = {};
1100
- let timeoutResult, addTimerReturnsObject = false;
1101
- if (_global.setTimeout) {
1102
- isPresent.setTimeout = true;
1103
- timeoutResult = _global.setTimeout(NOOP, 0);
1104
- addTimerReturnsObject = typeof timeoutResult === "object";
1105
- }
1106
- isPresent.clearTimeout = Boolean(_global.clearTimeout);
1107
- isPresent.setInterval = Boolean(_global.setInterval);
1108
- isPresent.clearInterval = Boolean(_global.clearInterval);
1109
- isPresent.hrtime = _global.process && typeof _global.process.hrtime === "function";
1110
- isPresent.hrtimeBigint = isPresent.hrtime && typeof _global.process.hrtime.bigint === "function";
1111
- isPresent.nextTick = _global.process && typeof _global.process.nextTick === "function";
1112
- const utilPromisify = _global.process && _global.__vitest_required__ && _global.__vitest_required__.util.promisify;
1113
- isPresent.performance = _global.performance && typeof _global.performance.now === "function";
1114
- const hasPerformancePrototype = _global.Performance && (typeof _global.Performance).match(/^(function|object)$/);
1115
- const hasPerformanceConstructorPrototype = _global.performance && _global.performance.constructor && _global.performance.constructor.prototype;
1116
- isPresent.queueMicrotask = _global.hasOwnProperty("queueMicrotask");
1117
- isPresent.requestAnimationFrame = _global.requestAnimationFrame && typeof _global.requestAnimationFrame === "function";
1118
- isPresent.cancelAnimationFrame = _global.cancelAnimationFrame && typeof _global.cancelAnimationFrame === "function";
1119
- isPresent.requestIdleCallback = _global.requestIdleCallback && typeof _global.requestIdleCallback === "function";
1120
- isPresent.cancelIdleCallbackPresent = _global.cancelIdleCallback && typeof _global.cancelIdleCallback === "function";
1121
- isPresent.setImmediate = _global.setImmediate && typeof _global.setImmediate === "function";
1122
- isPresent.clearImmediate = _global.clearImmediate && typeof _global.clearImmediate === "function";
1123
- isPresent.Intl = _global.Intl && typeof _global.Intl === "object";
1124
- if (_global.clearTimeout) {
1125
- _global.clearTimeout(timeoutResult);
1126
- }
1127
- const NativeDate = _global.Date;
1128
- const NativeIntl = isPresent.Intl ? Object.defineProperties(
1129
- /* @__PURE__ */ Object.create(null),
1130
- Object.getOwnPropertyDescriptors(_global.Intl)
1131
- ) : void 0;
1132
- let uniqueTimerId = idCounterStart;
1133
- if (NativeDate === void 0) {
1134
- throw new Error(
1135
- "The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)"
1136
- );
1137
- }
1138
- isPresent.Date = true;
1139
- class FakePerformanceEntry {
1140
- constructor(name, entryType, startTime, duration) {
1141
- this.name = name;
1142
- this.entryType = entryType;
1143
- this.startTime = startTime;
1144
- this.duration = duration;
1145
- }
1146
- toJSON() {
1147
- return JSON.stringify({ ...this });
1148
- }
1149
- }
1150
- function isNumberFinite(num) {
1151
- if (Number.isFinite) {
1152
- return Number.isFinite(num);
1153
- }
1154
- return isFinite(num);
1155
- }
1156
- let isNearInfiniteLimit = false;
1157
- function checkIsNearInfiniteLimit(clock, i) {
1158
- if (clock.loopLimit && i === clock.loopLimit - 1) {
1159
- isNearInfiniteLimit = true;
1160
- }
1161
- }
1162
- function resetIsNearInfiniteLimit() {
1163
- isNearInfiniteLimit = false;
1164
- }
1165
- function parseTime(str) {
1166
- if (!str) {
1167
- return 0;
1168
- }
1169
- const strings = str.split(":");
1170
- const l = strings.length;
1171
- let i = l;
1172
- let ms = 0;
1173
- let parsed;
1174
- if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
1175
- throw new Error(
1176
- "tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits"
1177
- );
1178
- }
1179
- while (i--) {
1180
- parsed = parseInt(strings[i], 10);
1181
- if (parsed >= 60) {
1182
- throw new Error(`Invalid time ${str}`);
1183
- }
1184
- ms += parsed * Math.pow(60, l - i - 1);
1185
- }
1186
- return ms * 1e3;
1187
- }
1188
- function nanoRemainder(msFloat) {
1189
- const modulo = 1e6;
1190
- const remainder = msFloat * 1e6 % modulo;
1191
- const positiveRemainder = remainder < 0 ? remainder + modulo : remainder;
1192
- return Math.floor(positiveRemainder);
1193
- }
1194
- function getEpoch(epoch) {
1195
- if (!epoch) {
1196
- return 0;
1197
- }
1198
- if (typeof epoch.getTime === "function") {
1199
- return epoch.getTime();
1200
- }
1201
- if (typeof epoch === "number") {
1202
- return epoch;
1203
- }
1204
- throw new TypeError("now should be milliseconds since UNIX epoch");
1205
- }
1206
- function inRange(from, to, timer) {
1207
- return timer && timer.callAt >= from && timer.callAt <= to;
1208
- }
1209
- function getInfiniteLoopError(clock, job) {
1210
- const infiniteLoopError = new Error(
1211
- `Aborting after running ${clock.loopLimit} timers, assuming an infinite loop!`
1212
- );
1213
- if (!job.error) {
1214
- return infiniteLoopError;
1215
- }
1216
- const computedTargetPattern = /target\.*[<|(|[].*?[>|\]|)]\s*/;
1217
- let clockMethodPattern = new RegExp(
1218
- String(Object.keys(clock).join("|"))
1219
- );
1220
- if (addTimerReturnsObject) {
1221
- clockMethodPattern = new RegExp(
1222
- `\\s+at (Object\\.)?(?:${Object.keys(clock).join("|")})\\s+`
1223
- );
1224
- }
1225
- let matchedLineIndex = -1;
1226
- job.error.stack.split("\n").some(function(line, i) {
1227
- const matchedComputedTarget = line.match(computedTargetPattern);
1228
- if (matchedComputedTarget) {
1229
- matchedLineIndex = i;
1230
- return true;
1231
- }
1232
- const matchedClockMethod = line.match(clockMethodPattern);
1233
- if (matchedClockMethod) {
1234
- matchedLineIndex = i;
1235
- return false;
1236
- }
1237
- return matchedLineIndex >= 0;
1238
- });
1239
- const stack = `${infiniteLoopError}
1240
- ${job.type || "Microtask"} - ${job.func.name || "anonymous"}
1241
- ${job.error.stack.split("\n").slice(matchedLineIndex + 1).join("\n")}`;
1242
- try {
1243
- Object.defineProperty(infiniteLoopError, "stack", {
1244
- value: stack
1245
- });
1246
- } catch (e) {
1247
- }
1248
- return infiniteLoopError;
1249
- }
1250
- function createDate() {
1251
- class ClockDate extends NativeDate {
1252
- /**
1253
- * @param {number} year
1254
- * @param {number} month
1255
- * @param {number} date
1256
- * @param {number} hour
1257
- * @param {number} minute
1258
- * @param {number} second
1259
- * @param {number} ms
1260
- * @returns void
1261
- */
1262
- // eslint-disable-next-line no-unused-vars
1263
- constructor(year, month, date, hour, minute, second, ms) {
1264
- if (arguments.length === 0) {
1265
- super(ClockDate.clock.now);
1266
- } else {
1267
- super(...arguments);
1268
- }
1269
- Object.defineProperty(this, "constructor", {
1270
- value: NativeDate,
1271
- enumerable: false
1272
- });
1273
- }
1274
- static [Symbol.hasInstance](instance) {
1275
- return instance instanceof NativeDate;
1276
- }
1277
- }
1278
- ClockDate.isFake = true;
1279
- if (NativeDate.now) {
1280
- ClockDate.now = function now2() {
1281
- return ClockDate.clock.now;
1282
- };
1283
- }
1284
- if (NativeDate.toSource) {
1285
- ClockDate.toSource = function toSource() {
1286
- return NativeDate.toSource();
1287
- };
1288
- }
1289
- ClockDate.toString = function toString() {
1290
- return NativeDate.toString();
1291
- };
1292
- const ClockDateProxy = new Proxy(ClockDate, {
1293
- // handler for [[Call]] invocations (i.e. not using `new`)
1294
- apply() {
1295
- if (this instanceof ClockDate) {
1296
- throw new TypeError(
1297
- "A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic."
1298
- );
1299
- }
1300
- return new NativeDate(ClockDate.clock.now).toString();
1301
- }
1302
- });
1303
- return ClockDateProxy;
1304
- }
1305
- function createIntl() {
1306
- const ClockIntl = {};
1307
- Object.getOwnPropertyNames(NativeIntl).forEach(
1308
- (property) => ClockIntl[property] = NativeIntl[property]
1309
- );
1310
- ClockIntl.DateTimeFormat = function(...args) {
1311
- const realFormatter = new NativeIntl.DateTimeFormat(...args);
1312
- const formatter = {};
1313
- ["formatRange", "formatRangeToParts", "resolvedOptions"].forEach(
1314
- (method) => {
1315
- formatter[method] = realFormatter[method].bind(realFormatter);
1316
- }
1317
- );
1318
- ["format", "formatToParts"].forEach((method) => {
1319
- formatter[method] = function(date) {
1320
- return realFormatter[method](date || ClockIntl.clock.now);
1321
- };
1322
- });
1323
- return formatter;
1324
- };
1325
- ClockIntl.DateTimeFormat.prototype = Object.create(
1326
- NativeIntl.DateTimeFormat.prototype
1327
- );
1328
- ClockIntl.DateTimeFormat.supportedLocalesOf = NativeIntl.DateTimeFormat.supportedLocalesOf;
1329
- return ClockIntl;
1330
- }
1331
- function enqueueJob(clock, job) {
1332
- if (!clock.jobs) {
1333
- clock.jobs = [];
1334
- }
1335
- clock.jobs.push(job);
1336
- }
1337
- function runJobs(clock) {
1338
- if (!clock.jobs) {
1339
- return;
1340
- }
1341
- for (let i = 0; i < clock.jobs.length; i++) {
1342
- const job = clock.jobs[i];
1343
- job.func.apply(null, job.args);
1344
- checkIsNearInfiniteLimit(clock, i);
1345
- if (clock.loopLimit && i > clock.loopLimit) {
1346
- throw getInfiniteLoopError(clock, job);
1347
- }
1348
- }
1349
- resetIsNearInfiniteLimit();
1350
- clock.jobs = [];
1351
- }
1352
- function addTimer(clock, timer) {
1353
- if (timer.func === void 0) {
1354
- throw new Error("Callback must be provided to timer calls");
1355
- }
1356
- if (addTimerReturnsObject) {
1357
- if (typeof timer.func !== "function") {
1358
- throw new TypeError(
1359
- `[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${timer.func} of type ${typeof timer.func}`
1360
- );
1361
- }
1362
- }
1363
- if (isNearInfiniteLimit) {
1364
- timer.error = new Error();
1365
- }
1366
- timer.type = timer.immediate ? "Immediate" : "Timeout";
1367
- if (timer.hasOwnProperty("delay")) {
1368
- if (typeof timer.delay !== "number") {
1369
- timer.delay = parseInt(timer.delay, 10);
1370
- }
1371
- if (!isNumberFinite(timer.delay)) {
1372
- timer.delay = 0;
1373
- }
1374
- timer.delay = timer.delay > maxTimeout ? 1 : timer.delay;
1375
- timer.delay = Math.max(0, timer.delay);
1376
- }
1377
- if (timer.hasOwnProperty("interval")) {
1378
- timer.type = "Interval";
1379
- timer.interval = timer.interval > maxTimeout ? 1 : timer.interval;
1380
- }
1381
- if (timer.hasOwnProperty("animation")) {
1382
- timer.type = "AnimationFrame";
1383
- timer.animation = true;
1384
- }
1385
- if (timer.hasOwnProperty("idleCallback")) {
1386
- timer.type = "IdleCallback";
1387
- timer.idleCallback = true;
1388
- }
1389
- if (!clock.timers) {
1390
- clock.timers = {};
1391
- }
1392
- timer.id = uniqueTimerId++;
1393
- timer.createdAt = clock.now;
1394
- timer.callAt = clock.now + (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
1395
- clock.timers[timer.id] = timer;
1396
- if (addTimerReturnsObject) {
1397
- const res = {
1398
- refed: true,
1399
- ref: function() {
1400
- this.refed = true;
1401
- return res;
1402
- },
1403
- unref: function() {
1404
- this.refed = false;
1405
- return res;
1406
- },
1407
- hasRef: function() {
1408
- return this.refed;
1409
- },
1410
- refresh: function() {
1411
- timer.callAt = clock.now + (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
1412
- clock.timers[timer.id] = timer;
1413
- return res;
1414
- },
1415
- [Symbol.toPrimitive]: function() {
1416
- return timer.id;
1417
- }
1418
- };
1419
- return res;
1420
- }
1421
- return timer.id;
1422
- }
1423
- function compareTimers(a, b) {
1424
- if (a.callAt < b.callAt) {
1425
- return -1;
1426
- }
1427
- if (a.callAt > b.callAt) {
1428
- return 1;
1429
- }
1430
- if (a.immediate && !b.immediate) {
1431
- return -1;
1432
- }
1433
- if (!a.immediate && b.immediate) {
1434
- return 1;
1435
- }
1436
- if (a.createdAt < b.createdAt) {
1437
- return -1;
1438
- }
1439
- if (a.createdAt > b.createdAt) {
1440
- return 1;
1441
- }
1442
- if (a.id < b.id) {
1443
- return -1;
1444
- }
1445
- if (a.id > b.id) {
1446
- return 1;
1447
- }
1448
- }
1449
- function firstTimerInRange(clock, from, to) {
1450
- const timers2 = clock.timers;
1451
- let timer = null;
1452
- let id, isInRange;
1453
- for (id in timers2) {
1454
- if (timers2.hasOwnProperty(id)) {
1455
- isInRange = inRange(from, to, timers2[id]);
1456
- if (isInRange && (!timer || compareTimers(timer, timers2[id]) === 1)) {
1457
- timer = timers2[id];
1458
- }
1459
- }
1460
- }
1461
- return timer;
1462
- }
1463
- function firstTimer(clock) {
1464
- const timers2 = clock.timers;
1465
- let timer = null;
1466
- let id;
1467
- for (id in timers2) {
1468
- if (timers2.hasOwnProperty(id)) {
1469
- if (!timer || compareTimers(timer, timers2[id]) === 1) {
1470
- timer = timers2[id];
1471
- }
1472
- }
1473
- }
1474
- return timer;
1475
- }
1476
- function lastTimer(clock) {
1477
- const timers2 = clock.timers;
1478
- let timer = null;
1479
- let id;
1480
- for (id in timers2) {
1481
- if (timers2.hasOwnProperty(id)) {
1482
- if (!timer || compareTimers(timer, timers2[id]) === -1) {
1483
- timer = timers2[id];
1484
- }
1485
- }
1486
- }
1487
- return timer;
1488
- }
1489
- function callTimer(clock, timer) {
1490
- if (typeof timer.interval === "number") {
1491
- clock.timers[timer.id].callAt += timer.interval;
1492
- } else {
1493
- delete clock.timers[timer.id];
1494
- }
1495
- if (typeof timer.func === "function") {
1496
- timer.func.apply(null, timer.args);
1497
- } else {
1498
- const eval2 = eval;
1499
- (function() {
1500
- eval2(timer.func);
1501
- })();
1502
- }
1503
- }
1504
- function getClearHandler(ttype) {
1505
- if (ttype === "IdleCallback" || ttype === "AnimationFrame") {
1506
- return `cancel${ttype}`;
1507
- }
1508
- return `clear${ttype}`;
1509
- }
1510
- function getScheduleHandler(ttype) {
1511
- if (ttype === "IdleCallback" || ttype === "AnimationFrame") {
1512
- return `request${ttype}`;
1513
- }
1514
- return `set${ttype}`;
1515
- }
1516
- function createWarnOnce() {
1517
- let calls = 0;
1518
- return function(msg) {
1519
- !calls++ && console.warn(msg);
1520
- };
1521
- }
1522
- const warnOnce = createWarnOnce();
1523
- function clearTimer(clock, timerId, ttype) {
1524
- if (!timerId) {
1525
- return;
1526
- }
1527
- if (!clock.timers) {
1528
- clock.timers = {};
1529
- }
1530
- const id = Number(timerId);
1531
- if (Number.isNaN(id) || id < idCounterStart) {
1532
- const handlerName = getClearHandler(ttype);
1533
- if (clock.shouldClearNativeTimers === true) {
1534
- const nativeHandler = clock[`_${handlerName}`];
1535
- return typeof nativeHandler === "function" ? nativeHandler(timerId) : void 0;
1536
- }
1537
- warnOnce(
1538
- `FakeTimers: ${handlerName} was invoked to clear a native timer instead of one created by this library.
1539
- To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
1540
- );
1541
- }
1542
- if (clock.timers.hasOwnProperty(id)) {
1543
- const timer = clock.timers[id];
1544
- if (timer.type === ttype || timer.type === "Timeout" && ttype === "Interval" || timer.type === "Interval" && ttype === "Timeout") {
1545
- delete clock.timers[id];
1546
- } else {
1547
- const clear = getClearHandler(ttype);
1548
- const schedule = getScheduleHandler(timer.type);
1549
- throw new Error(
1550
- `Cannot clear timer: timer created with ${schedule}() but cleared with ${clear}()`
1551
- );
1552
- }
1553
- }
1554
- }
1555
- function uninstall(clock, config) {
1556
- let method, i, l;
1557
- const installedHrTime = "_hrtime";
1558
- const installedNextTick = "_nextTick";
1559
- for (i = 0, l = clock.methods.length; i < l; i++) {
1560
- method = clock.methods[i];
1561
- if (method === "hrtime" && _global.process) {
1562
- _global.process.hrtime = clock[installedHrTime];
1563
- } else if (method === "nextTick" && _global.process) {
1564
- _global.process.nextTick = clock[installedNextTick];
1565
- } else if (method === "performance") {
1566
- const originalPerfDescriptor = Object.getOwnPropertyDescriptor(
1567
- clock,
1568
- `_${method}`
1569
- );
1570
- if (originalPerfDescriptor && originalPerfDescriptor.get && !originalPerfDescriptor.set) {
1571
- Object.defineProperty(
1572
- _global,
1573
- method,
1574
- originalPerfDescriptor
1575
- );
1576
- } else if (originalPerfDescriptor.configurable) {
1577
- _global[method] = clock[`_${method}`];
1578
- }
1579
- } else {
1580
- if (_global[method] && _global[method].hadOwnProperty) {
1581
- _global[method] = clock[`_${method}`];
1582
- } else {
1583
- try {
1584
- delete _global[method];
1585
- } catch (ignore) {
1586
- }
1587
- }
1588
- }
1589
- if (clock.timersModuleMethods !== void 0) {
1590
- for (let j = 0; j < clock.timersModuleMethods.length; j++) {
1591
- const entry = clock.timersModuleMethods[j];
1592
- timersModule[entry.methodName] = entry.original;
1593
- }
1594
- }
1595
- if (clock.timersPromisesModuleMethods !== void 0) {
1596
- for (let j = 0; j < clock.timersPromisesModuleMethods.length; j++) {
1597
- const entry = clock.timersPromisesModuleMethods[j];
1598
- timersPromisesModule[entry.methodName] = entry.original;
1599
- }
1600
- }
1601
- }
1602
- if (config.shouldAdvanceTime === true) {
1603
- _global.clearInterval(clock.attachedInterval);
1604
- }
1605
- clock.methods = [];
1606
- for (const [listener, signal] of clock.abortListenerMap.entries()) {
1607
- signal.removeEventListener("abort", listener);
1608
- clock.abortListenerMap.delete(listener);
1609
- }
1610
- if (!clock.timers) {
1611
- return [];
1612
- }
1613
- return Object.keys(clock.timers).map(function mapper(key) {
1614
- return clock.timers[key];
1615
- });
1616
- }
1617
- function hijackMethod(target, method, clock) {
1618
- clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(
1619
- target,
1620
- method
1621
- );
1622
- clock[`_${method}`] = target[method];
1623
- if (method === "Date") {
1624
- target[method] = clock[method];
1625
- } else if (method === "Intl") {
1626
- target[method] = clock[method];
1627
- } else if (method === "performance") {
1628
- const originalPerfDescriptor = Object.getOwnPropertyDescriptor(
1629
- target,
1630
- method
1631
- );
1632
- if (originalPerfDescriptor && originalPerfDescriptor.get && !originalPerfDescriptor.set) {
1633
- Object.defineProperty(
1634
- clock,
1635
- `_${method}`,
1636
- originalPerfDescriptor
1637
- );
1638
- const perfDescriptor = Object.getOwnPropertyDescriptor(
1639
- clock,
1640
- method
1641
- );
1642
- Object.defineProperty(target, method, perfDescriptor);
1643
- } else {
1644
- target[method] = clock[method];
1645
- }
1646
- } else {
1647
- target[method] = function() {
1648
- return clock[method].apply(clock, arguments);
1649
- };
1650
- Object.defineProperties(
1651
- target[method],
1652
- Object.getOwnPropertyDescriptors(clock[method])
1653
- );
1654
- }
1655
- target[method].clock = clock;
1656
- }
1657
- function doIntervalTick(clock, advanceTimeDelta) {
1658
- clock.tick(advanceTimeDelta);
1659
- }
1660
- const timers = {
1661
- setTimeout: _global.setTimeout,
1662
- clearTimeout: _global.clearTimeout,
1663
- setInterval: _global.setInterval,
1664
- clearInterval: _global.clearInterval,
1665
- Date: _global.Date
1666
- };
1667
- if (isPresent.setImmediate) {
1668
- timers.setImmediate = _global.setImmediate;
1669
- }
1670
- if (isPresent.clearImmediate) {
1671
- timers.clearImmediate = _global.clearImmediate;
1672
- }
1673
- if (isPresent.hrtime) {
1674
- timers.hrtime = _global.process.hrtime;
1675
- }
1676
- if (isPresent.nextTick) {
1677
- timers.nextTick = _global.process.nextTick;
1678
- }
1679
- if (isPresent.performance) {
1680
- timers.performance = _global.performance;
1681
- }
1682
- if (isPresent.requestAnimationFrame) {
1683
- timers.requestAnimationFrame = _global.requestAnimationFrame;
1684
- }
1685
- if (isPresent.queueMicrotask) {
1686
- timers.queueMicrotask = _global.queueMicrotask;
1687
- }
1688
- if (isPresent.cancelAnimationFrame) {
1689
- timers.cancelAnimationFrame = _global.cancelAnimationFrame;
1690
- }
1691
- if (isPresent.requestIdleCallback) {
1692
- timers.requestIdleCallback = _global.requestIdleCallback;
1693
- }
1694
- if (isPresent.cancelIdleCallback) {
1695
- timers.cancelIdleCallback = _global.cancelIdleCallback;
1696
- }
1697
- if (isPresent.Intl) {
1698
- timers.Intl = NativeIntl;
1699
- }
1700
- const originalSetTimeout = _global.setImmediate || _global.setTimeout;
1701
- function createClock(start, loopLimit) {
1702
- start = Math.floor(getEpoch(start));
1703
- loopLimit = loopLimit || 1e3;
1704
- let nanos = 0;
1705
- const adjustedSystemTime = [0, 0];
1706
- const clock = {
1707
- now: start,
1708
- Date: createDate(),
1709
- loopLimit
1710
- };
1711
- clock.Date.clock = clock;
1712
- function getTimeToNextFrame() {
1713
- return 16 - (clock.now - start) % 16;
1714
- }
1715
- function hrtime(prev) {
1716
- const millisSinceStart = clock.now - adjustedSystemTime[0] - start;
1717
- const secsSinceStart = Math.floor(millisSinceStart / 1e3);
1718
- const remainderInNanos = (millisSinceStart - secsSinceStart * 1e3) * 1e6 + nanos - adjustedSystemTime[1];
1719
- if (Array.isArray(prev)) {
1720
- if (prev[1] > 1e9) {
1721
- throw new TypeError(
1722
- "Number of nanoseconds can't exceed a billion"
1723
- );
1724
- }
1725
- const oldSecs = prev[0];
1726
- let nanoDiff = remainderInNanos - prev[1];
1727
- let secDiff = secsSinceStart - oldSecs;
1728
- if (nanoDiff < 0) {
1729
- nanoDiff += 1e9;
1730
- secDiff -= 1;
1731
- }
1732
- return [secDiff, nanoDiff];
1733
- }
1734
- return [secsSinceStart, remainderInNanos];
1735
- }
1736
- function fakePerformanceNow() {
1737
- const hrt = hrtime();
1738
- const millis = hrt[0] * 1e3 + hrt[1] / 1e6;
1739
- return millis;
1740
- }
1741
- if (isPresent.hrtimeBigint) {
1742
- hrtime.bigint = function() {
1743
- const parts = hrtime();
1744
- return BigInt(parts[0]) * BigInt(1e9) + BigInt(parts[1]);
1745
- };
1746
- }
1747
- if (isPresent.Intl) {
1748
- clock.Intl = createIntl();
1749
- clock.Intl.clock = clock;
1750
- }
1751
- clock.requestIdleCallback = function requestIdleCallback(func, timeout) {
1752
- let timeToNextIdlePeriod = 0;
1753
- if (clock.countTimers() > 0) {
1754
- timeToNextIdlePeriod = 50;
1755
- }
1756
- const result = addTimer(clock, {
1757
- func,
1758
- args: Array.prototype.slice.call(arguments, 2),
1759
- delay: typeof timeout === "undefined" ? timeToNextIdlePeriod : Math.min(timeout, timeToNextIdlePeriod),
1760
- idleCallback: true
1761
- });
1762
- return Number(result);
1763
- };
1764
- clock.cancelIdleCallback = function cancelIdleCallback(timerId) {
1765
- return clearTimer(clock, timerId, "IdleCallback");
1766
- };
1767
- clock.setTimeout = function setTimeout(func, timeout) {
1768
- return addTimer(clock, {
1769
- func,
1770
- args: Array.prototype.slice.call(arguments, 2),
1771
- delay: timeout
1772
- });
1773
- };
1774
- if (typeof _global.Promise !== "undefined" && utilPromisify) {
1775
- clock.setTimeout[utilPromisify.custom] = function promisifiedSetTimeout(timeout, arg) {
1776
- return new _global.Promise(function setTimeoutExecutor(resolve) {
1777
- addTimer(clock, {
1778
- func: resolve,
1779
- args: [arg],
1780
- delay: timeout
1781
- });
1782
- });
1783
- };
1784
- }
1785
- clock.clearTimeout = function clearTimeout(timerId) {
1786
- return clearTimer(clock, timerId, "Timeout");
1787
- };
1788
- clock.nextTick = function nextTick(func) {
1789
- return enqueueJob(clock, {
1790
- func,
1791
- args: Array.prototype.slice.call(arguments, 1),
1792
- error: isNearInfiniteLimit ? new Error() : null
1793
- });
1794
- };
1795
- clock.queueMicrotask = function queueMicrotask(func) {
1796
- return clock.nextTick(func);
1797
- };
1798
- clock.setInterval = function setInterval(func, timeout) {
1799
- timeout = parseInt(timeout, 10);
1800
- return addTimer(clock, {
1801
- func,
1802
- args: Array.prototype.slice.call(arguments, 2),
1803
- delay: timeout,
1804
- interval: timeout
1805
- });
1806
- };
1807
- clock.clearInterval = function clearInterval(timerId) {
1808
- return clearTimer(clock, timerId, "Interval");
1809
- };
1810
- if (isPresent.setImmediate) {
1811
- clock.setImmediate = function setImmediate(func) {
1812
- return addTimer(clock, {
1813
- func,
1814
- args: Array.prototype.slice.call(arguments, 1),
1815
- immediate: true
1816
- });
1817
- };
1818
- if (typeof _global.Promise !== "undefined" && utilPromisify) {
1819
- clock.setImmediate[utilPromisify.custom] = function promisifiedSetImmediate(arg) {
1820
- return new _global.Promise(
1821
- function setImmediateExecutor(resolve) {
1822
- addTimer(clock, {
1823
- func: resolve,
1824
- args: [arg],
1825
- immediate: true
1826
- });
1827
- }
1828
- );
1829
- };
1830
- }
1831
- clock.clearImmediate = function clearImmediate(timerId) {
1832
- return clearTimer(clock, timerId, "Immediate");
1833
- };
1834
- }
1835
- clock.countTimers = function countTimers() {
1836
- return Object.keys(clock.timers || {}).length + (clock.jobs || []).length;
1837
- };
1838
- clock.requestAnimationFrame = function requestAnimationFrame(func) {
1839
- const result = addTimer(clock, {
1840
- func,
1841
- delay: getTimeToNextFrame(),
1842
- get args() {
1843
- return [fakePerformanceNow()];
1844
- },
1845
- animation: true
1846
- });
1847
- return Number(result);
1848
- };
1849
- clock.cancelAnimationFrame = function cancelAnimationFrame(timerId) {
1850
- return clearTimer(clock, timerId, "AnimationFrame");
1851
- };
1852
- clock.runMicrotasks = function runMicrotasks() {
1853
- runJobs(clock);
1854
- };
1855
- function doTick(tickValue, isAsync, resolve, reject) {
1856
- const msFloat = typeof tickValue === "number" ? tickValue : parseTime(tickValue);
1857
- const ms = Math.floor(msFloat);
1858
- const remainder = nanoRemainder(msFloat);
1859
- let nanosTotal = nanos + remainder;
1860
- let tickTo = clock.now + ms;
1861
- if (msFloat < 0) {
1862
- throw new TypeError("Negative ticks are not supported");
1863
- }
1864
- if (nanosTotal >= 1e6) {
1865
- tickTo += 1;
1866
- nanosTotal -= 1e6;
1867
- }
1868
- nanos = nanosTotal;
1869
- let tickFrom = clock.now;
1870
- let previous = clock.now;
1871
- let timer, firstException, oldNow, nextPromiseTick, compensationCheck, postTimerCall;
1872
- clock.duringTick = true;
1873
- oldNow = clock.now;
1874
- runJobs(clock);
1875
- if (oldNow !== clock.now) {
1876
- tickFrom += clock.now - oldNow;
1877
- tickTo += clock.now - oldNow;
1878
- }
1879
- function doTickInner() {
1880
- timer = firstTimerInRange(clock, tickFrom, tickTo);
1881
- while (timer && tickFrom <= tickTo) {
1882
- if (clock.timers[timer.id]) {
1883
- tickFrom = timer.callAt;
1884
- clock.now = timer.callAt;
1885
- oldNow = clock.now;
1886
- try {
1887
- runJobs(clock);
1888
- callTimer(clock, timer);
1889
- } catch (e) {
1890
- firstException = firstException || e;
1891
- }
1892
- if (isAsync) {
1893
- originalSetTimeout(nextPromiseTick);
1894
- return;
1895
- }
1896
- compensationCheck();
1897
- }
1898
- postTimerCall();
1899
- }
1900
- oldNow = clock.now;
1901
- runJobs(clock);
1902
- if (oldNow !== clock.now) {
1903
- tickFrom += clock.now - oldNow;
1904
- tickTo += clock.now - oldNow;
1905
- }
1906
- clock.duringTick = false;
1907
- timer = firstTimerInRange(clock, tickFrom, tickTo);
1908
- if (timer) {
1909
- try {
1910
- clock.tick(tickTo - clock.now);
1911
- } catch (e) {
1912
- firstException = firstException || e;
1913
- }
1914
- } else {
1915
- clock.now = tickTo;
1916
- nanos = nanosTotal;
1917
- }
1918
- if (firstException) {
1919
- throw firstException;
1920
- }
1921
- if (isAsync) {
1922
- resolve(clock.now);
1923
- } else {
1924
- return clock.now;
1925
- }
1926
- }
1927
- nextPromiseTick = isAsync && function() {
1928
- try {
1929
- compensationCheck();
1930
- postTimerCall();
1931
- doTickInner();
1932
- } catch (e) {
1933
- reject(e);
1934
- }
1935
- };
1936
- compensationCheck = function() {
1937
- if (oldNow !== clock.now) {
1938
- tickFrom += clock.now - oldNow;
1939
- tickTo += clock.now - oldNow;
1940
- previous += clock.now - oldNow;
1941
- }
1942
- };
1943
- postTimerCall = function() {
1944
- timer = firstTimerInRange(clock, previous, tickTo);
1945
- previous = tickFrom;
1946
- };
1947
- return doTickInner();
1948
- }
1949
- clock.tick = function tick(tickValue) {
1950
- return doTick(tickValue, false);
1951
- };
1952
- if (typeof _global.Promise !== "undefined") {
1953
- clock.tickAsync = function tickAsync(tickValue) {
1954
- return new _global.Promise(function(resolve, reject) {
1955
- originalSetTimeout(function() {
1956
- try {
1957
- doTick(tickValue, true, resolve, reject);
1958
- } catch (e) {
1959
- reject(e);
1960
- }
1961
- });
1962
- });
1963
- };
1964
- }
1965
- clock.next = function next() {
1966
- runJobs(clock);
1967
- const timer = firstTimer(clock);
1968
- if (!timer) {
1969
- return clock.now;
1970
- }
1971
- clock.duringTick = true;
1972
- try {
1973
- clock.now = timer.callAt;
1974
- callTimer(clock, timer);
1975
- runJobs(clock);
1976
- return clock.now;
1977
- } finally {
1978
- clock.duringTick = false;
1979
- }
1980
- };
1981
- if (typeof _global.Promise !== "undefined") {
1982
- clock.nextAsync = function nextAsync() {
1983
- return new _global.Promise(function(resolve, reject) {
1984
- originalSetTimeout(function() {
1985
- try {
1986
- const timer = firstTimer(clock);
1987
- if (!timer) {
1988
- resolve(clock.now);
1989
- return;
1990
- }
1991
- let err;
1992
- clock.duringTick = true;
1993
- clock.now = timer.callAt;
1994
- try {
1995
- callTimer(clock, timer);
1996
- } catch (e) {
1997
- err = e;
1998
- }
1999
- clock.duringTick = false;
2000
- originalSetTimeout(function() {
2001
- if (err) {
2002
- reject(err);
2003
- } else {
2004
- resolve(clock.now);
2005
- }
2006
- });
2007
- } catch (e) {
2008
- reject(e);
2009
- }
2010
- });
2011
- });
2012
- };
2013
- }
2014
- clock.runAll = function runAll() {
2015
- let numTimers, i;
2016
- runJobs(clock);
2017
- for (i = 0; i < clock.loopLimit; i++) {
2018
- if (!clock.timers) {
2019
- resetIsNearInfiniteLimit();
2020
- return clock.now;
2021
- }
2022
- numTimers = Object.keys(clock.timers).length;
2023
- if (numTimers === 0) {
2024
- resetIsNearInfiniteLimit();
2025
- return clock.now;
2026
- }
2027
- clock.next();
2028
- checkIsNearInfiniteLimit(clock, i);
2029
- }
2030
- const excessJob = firstTimer(clock);
2031
- throw getInfiniteLoopError(clock, excessJob);
2032
- };
2033
- clock.runToFrame = function runToFrame() {
2034
- return clock.tick(getTimeToNextFrame());
2035
- };
2036
- if (typeof _global.Promise !== "undefined") {
2037
- clock.runAllAsync = function runAllAsync() {
2038
- return new _global.Promise(function(resolve, reject) {
2039
- let i = 0;
2040
- function doRun() {
2041
- originalSetTimeout(function() {
2042
- try {
2043
- runJobs(clock);
2044
- let numTimers;
2045
- if (i < clock.loopLimit) {
2046
- if (!clock.timers) {
2047
- resetIsNearInfiniteLimit();
2048
- resolve(clock.now);
2049
- return;
2050
- }
2051
- numTimers = Object.keys(
2052
- clock.timers
2053
- ).length;
2054
- if (numTimers === 0) {
2055
- resetIsNearInfiniteLimit();
2056
- resolve(clock.now);
2057
- return;
2058
- }
2059
- clock.next();
2060
- i++;
2061
- doRun();
2062
- checkIsNearInfiniteLimit(clock, i);
2063
- return;
2064
- }
2065
- const excessJob = firstTimer(clock);
2066
- reject(getInfiniteLoopError(clock, excessJob));
2067
- } catch (e) {
2068
- reject(e);
2069
- }
2070
- });
2071
- }
2072
- doRun();
2073
- });
2074
- };
2075
- }
2076
- clock.runToLast = function runToLast() {
2077
- const timer = lastTimer(clock);
2078
- if (!timer) {
2079
- runJobs(clock);
2080
- return clock.now;
2081
- }
2082
- return clock.tick(timer.callAt - clock.now);
2083
- };
2084
- if (typeof _global.Promise !== "undefined") {
2085
- clock.runToLastAsync = function runToLastAsync() {
2086
- return new _global.Promise(function(resolve, reject) {
2087
- originalSetTimeout(function() {
2088
- try {
2089
- const timer = lastTimer(clock);
2090
- if (!timer) {
2091
- runJobs(clock);
2092
- resolve(clock.now);
2093
- }
2094
- resolve(clock.tickAsync(timer.callAt - clock.now));
2095
- } catch (e) {
2096
- reject(e);
2097
- }
2098
- });
2099
- });
2100
- };
2101
- }
2102
- clock.reset = function reset() {
2103
- nanos = 0;
2104
- clock.timers = {};
2105
- clock.jobs = [];
2106
- clock.now = start;
2107
- };
2108
- clock.setSystemTime = function setSystemTime(systemTime) {
2109
- const newNow = getEpoch(systemTime);
2110
- const difference = newNow - clock.now;
2111
- let id, timer;
2112
- adjustedSystemTime[0] = adjustedSystemTime[0] + difference;
2113
- adjustedSystemTime[1] = adjustedSystemTime[1] + nanos;
2114
- clock.now = newNow;
2115
- nanos = 0;
2116
- for (id in clock.timers) {
2117
- if (clock.timers.hasOwnProperty(id)) {
2118
- timer = clock.timers[id];
2119
- timer.createdAt += difference;
2120
- timer.callAt += difference;
2121
- }
2122
- }
2123
- };
2124
- clock.jump = function jump(tickValue) {
2125
- const msFloat = typeof tickValue === "number" ? tickValue : parseTime(tickValue);
2126
- const ms = Math.floor(msFloat);
2127
- for (const timer of Object.values(clock.timers)) {
2128
- if (clock.now + ms > timer.callAt) {
2129
- timer.callAt = clock.now + ms;
2130
- }
2131
- }
2132
- clock.tick(ms);
2133
- };
2134
- if (isPresent.performance) {
2135
- clock.performance = /* @__PURE__ */ Object.create(null);
2136
- clock.performance.now = fakePerformanceNow;
2137
- }
2138
- if (isPresent.hrtime) {
2139
- clock.hrtime = hrtime;
2140
- }
2141
- return clock;
2142
- }
2143
- function install(config) {
2144
- if (arguments.length > 1 || config instanceof Date || Array.isArray(config) || typeof config === "number") {
2145
- throw new TypeError(
2146
- `FakeTimers.install called with ${String(
2147
- config
2148
- )} install requires an object parameter`
2149
- );
2150
- }
2151
- if (_global.Date.isFake === true) {
2152
- throw new TypeError(
2153
- "Can't install fake timers twice on the same global object."
2154
- );
2155
- }
2156
- config = typeof config !== "undefined" ? config : {};
2157
- config.shouldAdvanceTime = config.shouldAdvanceTime || false;
2158
- config.advanceTimeDelta = config.advanceTimeDelta || 20;
2159
- config.shouldClearNativeTimers = config.shouldClearNativeTimers || false;
2160
- if (config.target) {
2161
- throw new TypeError(
2162
- "config.target is no longer supported. Use `withGlobal(target)` instead."
2163
- );
2164
- }
2165
- function handleMissingTimer(timer) {
2166
- if (config.ignoreMissingTimers) {
2167
- return;
2168
- }
2169
- throw new ReferenceError(
2170
- `non-existent timers and/or objects cannot be faked: '${timer}'`
2171
- );
2172
- }
2173
- let i, l;
2174
- const clock = createClock(config.now, config.loopLimit);
2175
- clock.shouldClearNativeTimers = config.shouldClearNativeTimers;
2176
- clock.uninstall = function() {
2177
- return uninstall(clock, config);
2178
- };
2179
- clock.abortListenerMap = /* @__PURE__ */ new Map();
2180
- clock.methods = config.toFake || [];
2181
- if (clock.methods.length === 0) {
2182
- clock.methods = Object.keys(timers);
2183
- }
2184
- if (config.shouldAdvanceTime === true) {
2185
- const intervalTick = doIntervalTick.bind(
2186
- null,
2187
- clock,
2188
- config.advanceTimeDelta
2189
- );
2190
- const intervalId = _global.setInterval(
2191
- intervalTick,
2192
- config.advanceTimeDelta
2193
- );
2194
- clock.attachedInterval = intervalId;
2195
- }
2196
- if (clock.methods.includes("performance")) {
2197
- const proto = (() => {
2198
- if (hasPerformanceConstructorPrototype) {
2199
- return _global.performance.constructor.prototype;
2200
- }
2201
- if (hasPerformancePrototype) {
2202
- return _global.Performance.prototype;
2203
- }
2204
- })();
2205
- if (proto) {
2206
- Object.getOwnPropertyNames(proto).forEach(function(name) {
2207
- if (name !== "now") {
2208
- clock.performance[name] = name.indexOf("getEntries") === 0 ? NOOP_ARRAY : NOOP;
2209
- }
2210
- });
2211
- clock.performance.mark = (name) => new FakePerformanceEntry(name, "mark", 0, 0);
2212
- clock.performance.measure = (name) => new FakePerformanceEntry(name, "measure", 0, 100);
2213
- clock.performance.timeOrigin = getEpoch(config.now);
2214
- } else if ((config.toFake || []).includes("performance")) {
2215
- return handleMissingTimer("performance");
2216
- }
2217
- }
2218
- if (_global === globalObject && timersModule) {
2219
- clock.timersModuleMethods = [];
2220
- }
2221
- if (_global === globalObject && timersPromisesModule) {
2222
- clock.timersPromisesModuleMethods = [];
2223
- }
2224
- for (i = 0, l = clock.methods.length; i < l; i++) {
2225
- const nameOfMethodToReplace = clock.methods[i];
2226
- if (!isPresent[nameOfMethodToReplace]) {
2227
- handleMissingTimer(nameOfMethodToReplace);
2228
- continue;
2229
- }
2230
- if (nameOfMethodToReplace === "hrtime") {
2231
- if (_global.process && typeof _global.process.hrtime === "function") {
2232
- hijackMethod(_global.process, nameOfMethodToReplace, clock);
2233
- }
2234
- } else if (nameOfMethodToReplace === "nextTick") {
2235
- if (_global.process && typeof _global.process.nextTick === "function") {
2236
- hijackMethod(_global.process, nameOfMethodToReplace, clock);
2237
- }
2238
- } else {
2239
- hijackMethod(_global, nameOfMethodToReplace, clock);
2240
- }
2241
- if (clock.timersModuleMethods !== void 0 && timersModule[nameOfMethodToReplace]) {
2242
- const original = timersModule[nameOfMethodToReplace];
2243
- clock.timersModuleMethods.push({
2244
- methodName: nameOfMethodToReplace,
2245
- original
2246
- });
2247
- timersModule[nameOfMethodToReplace] = _global[nameOfMethodToReplace];
2248
- }
2249
- if (clock.timersPromisesModuleMethods !== void 0) {
2250
- if (nameOfMethodToReplace === "setTimeout") {
2251
- clock.timersPromisesModuleMethods.push({
2252
- methodName: "setTimeout",
2253
- original: timersPromisesModule.setTimeout
2254
- });
2255
- timersPromisesModule.setTimeout = (delay, value, options = {}) => new Promise((resolve, reject) => {
2256
- const abort = () => {
2257
- options.signal.removeEventListener(
2258
- "abort",
2259
- abort
2260
- );
2261
- clock.abortListenerMap.delete(abort);
2262
- clock.clearTimeout(handle);
2263
- reject(options.signal.reason);
2264
- };
2265
- const handle = clock.setTimeout(() => {
2266
- if (options.signal) {
2267
- options.signal.removeEventListener(
2268
- "abort",
2269
- abort
2270
- );
2271
- clock.abortListenerMap.delete(abort);
2272
- }
2273
- resolve(value);
2274
- }, delay);
2275
- if (options.signal) {
2276
- if (options.signal.aborted) {
2277
- abort();
2278
- } else {
2279
- options.signal.addEventListener(
2280
- "abort",
2281
- abort
2282
- );
2283
- clock.abortListenerMap.set(
2284
- abort,
2285
- options.signal
2286
- );
2287
- }
2288
- }
2289
- });
2290
- } else if (nameOfMethodToReplace === "setImmediate") {
2291
- clock.timersPromisesModuleMethods.push({
2292
- methodName: "setImmediate",
2293
- original: timersPromisesModule.setImmediate
2294
- });
2295
- timersPromisesModule.setImmediate = (value, options = {}) => new Promise((resolve, reject) => {
2296
- const abort = () => {
2297
- options.signal.removeEventListener(
2298
- "abort",
2299
- abort
2300
- );
2301
- clock.abortListenerMap.delete(abort);
2302
- clock.clearImmediate(handle);
2303
- reject(options.signal.reason);
2304
- };
2305
- const handle = clock.setImmediate(() => {
2306
- if (options.signal) {
2307
- options.signal.removeEventListener(
2308
- "abort",
2309
- abort
2310
- );
2311
- clock.abortListenerMap.delete(abort);
2312
- }
2313
- resolve(value);
2314
- });
2315
- if (options.signal) {
2316
- if (options.signal.aborted) {
2317
- abort();
2318
- } else {
2319
- options.signal.addEventListener(
2320
- "abort",
2321
- abort
2322
- );
2323
- clock.abortListenerMap.set(
2324
- abort,
2325
- options.signal
2326
- );
2327
- }
2328
- }
2329
- });
2330
- } else if (nameOfMethodToReplace === "setInterval") {
2331
- clock.timersPromisesModuleMethods.push({
2332
- methodName: "setInterval",
2333
- original: timersPromisesModule.setInterval
2334
- });
2335
- timersPromisesModule.setInterval = (delay, value, options = {}) => ({
2336
- [Symbol.asyncIterator]: () => {
2337
- const createResolvable = () => {
2338
- let resolve, reject;
2339
- const promise = new Promise((res, rej) => {
2340
- resolve = res;
2341
- reject = rej;
2342
- });
2343
- promise.resolve = resolve;
2344
- promise.reject = reject;
2345
- return promise;
2346
- };
2347
- let done = false;
2348
- let hasThrown = false;
2349
- let returnCall;
2350
- let nextAvailable = 0;
2351
- const nextQueue = [];
2352
- const handle = clock.setInterval(() => {
2353
- if (nextQueue.length > 0) {
2354
- nextQueue.shift().resolve();
2355
- } else {
2356
- nextAvailable++;
2357
- }
2358
- }, delay);
2359
- const abort = () => {
2360
- options.signal.removeEventListener(
2361
- "abort",
2362
- abort
2363
- );
2364
- clock.abortListenerMap.delete(abort);
2365
- clock.clearInterval(handle);
2366
- done = true;
2367
- for (const resolvable of nextQueue) {
2368
- resolvable.resolve();
2369
- }
2370
- };
2371
- if (options.signal) {
2372
- if (options.signal.aborted) {
2373
- done = true;
2374
- } else {
2375
- options.signal.addEventListener(
2376
- "abort",
2377
- abort
2378
- );
2379
- clock.abortListenerMap.set(
2380
- abort,
2381
- options.signal
2382
- );
2383
- }
2384
- }
2385
- return {
2386
- next: async () => {
2387
- if (options.signal?.aborted && !hasThrown) {
2388
- hasThrown = true;
2389
- throw options.signal.reason;
2390
- }
2391
- if (done) {
2392
- return { done: true, value: void 0 };
2393
- }
2394
- if (nextAvailable > 0) {
2395
- nextAvailable--;
2396
- return { done: false, value };
2397
- }
2398
- const resolvable = createResolvable();
2399
- nextQueue.push(resolvable);
2400
- await resolvable;
2401
- if (returnCall && nextQueue.length === 0) {
2402
- returnCall.resolve();
2403
- }
2404
- if (options.signal?.aborted && !hasThrown) {
2405
- hasThrown = true;
2406
- throw options.signal.reason;
2407
- }
2408
- if (done) {
2409
- return { done: true, value: void 0 };
2410
- }
2411
- return { done: false, value };
2412
- },
2413
- return: async () => {
2414
- if (done) {
2415
- return { done: true, value: void 0 };
2416
- }
2417
- if (nextQueue.length > 0) {
2418
- returnCall = createResolvable();
2419
- await returnCall;
2420
- }
2421
- clock.clearInterval(handle);
2422
- done = true;
2423
- if (options.signal) {
2424
- options.signal.removeEventListener(
2425
- "abort",
2426
- abort
2427
- );
2428
- clock.abortListenerMap.delete(abort);
2429
- }
2430
- return { done: true, value: void 0 };
2431
- }
2432
- };
2433
- }
2434
- });
2435
- }
2436
- }
2437
- }
2438
- return clock;
2439
- }
2440
- return {
2441
- timers,
2442
- createClock,
2443
- install,
2444
- withGlobal
2445
- };
2446
- }
2447
- const defaultImplementation = withGlobal(globalObject);
2448
- fakeTimersSrc.timers = defaultImplementation.timers;
2449
- fakeTimersSrc.createClock = defaultImplementation.createClock;
2450
- fakeTimersSrc.install = defaultImplementation.install;
2451
- fakeTimersSrc.withGlobal = withGlobal;
2452
- return fakeTimersSrc;
2453
- }
2454
- var fakeTimersSrcExports = requireFakeTimersSrc();
2455
- var FakeTimers = class {
2456
- _global;
2457
- _clock;
2458
- _fakingTime;
2459
- _fakingDate;
2460
- _fakeTimers;
2461
- _userConfig;
2462
- _now = RealDate.now;
2463
- constructor({ global: global3, config }) {
2464
- this._userConfig = config;
2465
- this._fakingDate = null;
2466
- this._fakingTime = false;
2467
- this._fakeTimers = fakeTimersSrcExports.withGlobal(global3);
2468
- this._global = global3;
2469
- }
2470
- clearAllTimers() {
2471
- if (this._fakingTime) {
2472
- this._clock.reset();
2473
- }
2474
- }
2475
- dispose() {
2476
- this.useRealTimers();
2477
- }
2478
- runAllTimers() {
2479
- if (this._checkFakeTimers()) {
2480
- this._clock.runAll();
2481
- }
2482
- }
2483
- async runAllTimersAsync() {
2484
- if (this._checkFakeTimers()) {
2485
- await this._clock.runAllAsync();
2486
- }
2487
- }
2488
- runOnlyPendingTimers() {
2489
- if (this._checkFakeTimers()) {
2490
- this._clock.runToLast();
2491
- }
2492
- }
2493
- async runOnlyPendingTimersAsync() {
2494
- if (this._checkFakeTimers()) {
2495
- await this._clock.runToLastAsync();
2496
- }
2497
- }
2498
- advanceTimersToNextTimer(steps = 1) {
2499
- if (this._checkFakeTimers()) {
2500
- for (let i = steps; i > 0; i--) {
2501
- this._clock.next();
2502
- this._clock.tick(0);
2503
- if (this._clock.countTimers() === 0) {
2504
- break;
2505
- }
2506
- }
2507
- }
2508
- }
2509
- async advanceTimersToNextTimerAsync(steps = 1) {
2510
- if (this._checkFakeTimers()) {
2511
- for (let i = steps; i > 0; i--) {
2512
- await this._clock.nextAsync();
2513
- this._clock.tick(0);
2514
- if (this._clock.countTimers() === 0) {
2515
- break;
2516
- }
2517
- }
2518
- }
2519
- }
2520
- advanceTimersByTime(msToRun) {
2521
- if (this._checkFakeTimers()) {
2522
- this._clock.tick(msToRun);
2523
- }
2524
- }
2525
- async advanceTimersByTimeAsync(msToRun) {
2526
- if (this._checkFakeTimers()) {
2527
- await this._clock.tickAsync(msToRun);
2528
- }
2529
- }
2530
- advanceTimersToNextFrame() {
2531
- if (this._checkFakeTimers()) {
2532
- this._clock.runToFrame();
2533
- }
2534
- }
2535
- runAllTicks() {
2536
- if (this._checkFakeTimers()) {
2537
- this._clock.runMicrotasks();
2538
- }
2539
- }
2540
- useRealTimers() {
2541
- if (this._fakingDate) {
2542
- resetDate();
2543
- this._fakingDate = null;
2544
- }
2545
- if (this._fakingTime) {
2546
- this._clock.uninstall();
2547
- this._fakingTime = false;
2548
- }
2549
- }
2550
- useFakeTimers() {
2551
- if (this._fakingDate) {
2552
- throw new Error('"setSystemTime" was called already and date was mocked. Reset timers using `vi.useRealTimers()` if you want to use fake timers again.');
2553
- }
2554
- if (!this._fakingTime) {
2555
- const toFake = Object.keys(this._fakeTimers.timers).filter((timer) => timer !== "nextTick" && timer !== "queueMicrotask");
2556
- if (this._userConfig?.toFake?.includes("nextTick") && isChildProcess()) {
2557
- throw new Error("process.nextTick cannot be mocked inside child_process");
2558
- }
2559
- this._clock = this._fakeTimers.install({
2560
- now: Date.now(),
2561
- ...this._userConfig,
2562
- toFake: this._userConfig?.toFake || toFake,
2563
- ignoreMissingTimers: true
2564
- });
2565
- this._fakingTime = true;
2566
- }
2567
- }
2568
- reset() {
2569
- if (this._checkFakeTimers()) {
2570
- const { now: now2 } = this._clock;
2571
- this._clock.reset();
2572
- this._clock.setSystemTime(now2);
2573
- }
2574
- }
2575
- setSystemTime(now2) {
2576
- const date = typeof now2 === "undefined" || now2 instanceof Date ? now2 : new Date(now2);
2577
- if (this._fakingTime) {
2578
- this._clock.setSystemTime(date);
2579
- } else {
2580
- this._fakingDate = date ?? new Date(this.getRealSystemTime());
2581
- mockDate(this._fakingDate);
2582
- }
2583
- }
2584
- getMockedSystemTime() {
2585
- return this._fakingTime ? new Date(this._clock.now) : this._fakingDate;
2586
- }
2587
- getRealSystemTime() {
2588
- return this._now();
2589
- }
2590
- getTimerCount() {
2591
- if (this._checkFakeTimers()) {
2592
- return this._clock.countTimers();
2593
- }
2594
- return 0;
2595
- }
2596
- configure(config) {
2597
- this._userConfig = config;
2598
- }
2599
- isFakeTimers() {
2600
- return this._fakingTime;
2601
- }
2602
- _checkFakeTimers() {
2603
- if (!this._fakingTime) {
2604
- throw new Error('Timers are not mocked. Try calling "vi.useFakeTimers()" first.');
2605
- }
2606
- return this._fakingTime;
2607
- }
2608
- };
2609
- function copyStackTrace(target, source) {
2610
- if (source.stack !== void 0) {
2611
- target.stack = source.stack.replace(source.message, target.message);
2612
- }
2613
- return target;
2614
- }
2615
- function waitFor(callback, options = {}) {
2616
- const { setTimeout, setInterval, clearTimeout, clearInterval } = (0, import_utils3.getSafeTimers)();
2617
- const { interval = 50, timeout = 1e3 } = typeof options === "number" ? { timeout: options } : options;
2618
- const STACK_TRACE_ERROR = new Error("STACK_TRACE_ERROR");
2619
- return new Promise((resolve, reject) => {
2620
- let lastError;
2621
- let promiseStatus = "idle";
2622
- let timeoutId;
2623
- let intervalId;
2624
- const onResolve = (result) => {
2625
- if (timeoutId) {
2626
- clearTimeout(timeoutId);
2627
- }
2628
- if (intervalId) {
2629
- clearInterval(intervalId);
2630
- }
2631
- resolve(result);
2632
- };
2633
- const handleTimeout = () => {
2634
- if (intervalId) {
2635
- clearInterval(intervalId);
2636
- }
2637
- let error = lastError;
2638
- if (!error) {
2639
- error = copyStackTrace(new Error("Timed out in waitFor!"), STACK_TRACE_ERROR);
2640
- }
2641
- reject(error);
2642
- };
2643
- const checkCallback = () => {
2644
- if (vi.isFakeTimers()) {
2645
- vi.advanceTimersByTime(interval);
2646
- }
2647
- if (promiseStatus === "pending") {
2648
- return;
2649
- }
2650
- try {
2651
- const result = callback();
2652
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
2653
- const thenable = result;
2654
- promiseStatus = "pending";
2655
- thenable.then((resolvedValue) => {
2656
- promiseStatus = "resolved";
2657
- onResolve(resolvedValue);
2658
- }, (rejectedValue) => {
2659
- promiseStatus = "rejected";
2660
- lastError = rejectedValue;
2661
- });
2662
- } else {
2663
- onResolve(result);
2664
- return true;
2665
- }
2666
- } catch (error) {
2667
- lastError = error;
2668
- }
2669
- };
2670
- if (checkCallback() === true) {
2671
- return;
2672
- }
2673
- timeoutId = setTimeout(handleTimeout, timeout);
2674
- intervalId = setInterval(checkCallback, interval);
2675
- });
2676
- }
2677
- function waitUntil(callback, options = {}) {
2678
- const { setTimeout, setInterval, clearTimeout, clearInterval } = (0, import_utils3.getSafeTimers)();
2679
- const { interval = 50, timeout = 1e3 } = typeof options === "number" ? { timeout: options } : options;
2680
- const STACK_TRACE_ERROR = new Error("STACK_TRACE_ERROR");
2681
- return new Promise((resolve, reject) => {
2682
- let promiseStatus = "idle";
2683
- let timeoutId;
2684
- let intervalId;
2685
- const onReject = (error) => {
2686
- if (intervalId) {
2687
- clearInterval(intervalId);
2688
- }
2689
- if (!error) {
2690
- error = copyStackTrace(new Error("Timed out in waitUntil!"), STACK_TRACE_ERROR);
2691
- }
2692
- reject(error);
2693
- };
2694
- const onResolve = (result) => {
2695
- if (!result) {
2696
- return;
2697
- }
2698
- if (timeoutId) {
2699
- clearTimeout(timeoutId);
2700
- }
2701
- if (intervalId) {
2702
- clearInterval(intervalId);
2703
- }
2704
- resolve(result);
2705
- return true;
2706
- };
2707
- const checkCallback = () => {
2708
- if (vi.isFakeTimers()) {
2709
- vi.advanceTimersByTime(interval);
2710
- }
2711
- if (promiseStatus === "pending") {
2712
- return;
2713
- }
2714
- try {
2715
- const result = callback();
2716
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
2717
- const thenable = result;
2718
- promiseStatus = "pending";
2719
- thenable.then((resolvedValue) => {
2720
- promiseStatus = "resolved";
2721
- onResolve(resolvedValue);
2722
- }, (rejectedValue) => {
2723
- promiseStatus = "rejected";
2724
- onReject(rejectedValue);
2725
- });
2726
- } else {
2727
- return onResolve(result);
2728
- }
2729
- } catch (error) {
2730
- onReject(error);
2731
- }
2732
- };
2733
- if (checkCallback() === true) {
2734
- return;
2735
- }
2736
- timeoutId = setTimeout(onReject, timeout);
2737
- intervalId = setInterval(checkCallback, interval);
2738
- });
2739
- }
2740
- function createVitest() {
2741
- let _config = null;
2742
- const workerState = getWorkerState();
2743
- let _timers;
2744
- const timers = () => _timers ||= new FakeTimers({
2745
- global: globalThis,
2746
- config: workerState.config.fakeTimers
2747
- });
2748
- const _stubsGlobal = /* @__PURE__ */ new Map();
2749
- const _stubsEnv = /* @__PURE__ */ new Map();
2750
- const _envBooleans = [
2751
- "PROD",
2752
- "DEV",
2753
- "SSR"
2754
- ];
2755
- const utils = {
2756
- useFakeTimers(config) {
2757
- if (isChildProcess()) {
2758
- if (config?.toFake?.includes("nextTick") || workerState.config?.fakeTimers?.toFake?.includes("nextTick")) {
2759
- throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');
2760
- }
2761
- }
2762
- if (config) {
2763
- timers().configure({
2764
- ...workerState.config.fakeTimers,
2765
- ...config
2766
- });
2767
- } else {
2768
- timers().configure(workerState.config.fakeTimers);
2769
- }
2770
- timers().useFakeTimers();
2771
- return utils;
2772
- },
2773
- isFakeTimers() {
2774
- return timers().isFakeTimers();
2775
- },
2776
- useRealTimers() {
2777
- timers().useRealTimers();
2778
- return utils;
2779
- },
2780
- runOnlyPendingTimers() {
2781
- timers().runOnlyPendingTimers();
2782
- return utils;
2783
- },
2784
- async runOnlyPendingTimersAsync() {
2785
- await timers().runOnlyPendingTimersAsync();
2786
- return utils;
2787
- },
2788
- runAllTimers() {
2789
- timers().runAllTimers();
2790
- return utils;
2791
- },
2792
- async runAllTimersAsync() {
2793
- await timers().runAllTimersAsync();
2794
- return utils;
2795
- },
2796
- runAllTicks() {
2797
- timers().runAllTicks();
2798
- return utils;
2799
- },
2800
- advanceTimersByTime(ms) {
2801
- timers().advanceTimersByTime(ms);
2802
- return utils;
2803
- },
2804
- async advanceTimersByTimeAsync(ms) {
2805
- await timers().advanceTimersByTimeAsync(ms);
2806
- return utils;
2807
- },
2808
- advanceTimersToNextTimer() {
2809
- timers().advanceTimersToNextTimer();
2810
- return utils;
2811
- },
2812
- async advanceTimersToNextTimerAsync() {
2813
- await timers().advanceTimersToNextTimerAsync();
2814
- return utils;
2815
- },
2816
- advanceTimersToNextFrame() {
2817
- timers().advanceTimersToNextFrame();
2818
- return utils;
2819
- },
2820
- getTimerCount() {
2821
- return timers().getTimerCount();
2822
- },
2823
- setSystemTime(time) {
2824
- timers().setSystemTime(time);
2825
- return utils;
2826
- },
2827
- getMockedSystemTime() {
2828
- return timers().getMockedSystemTime();
2829
- },
2830
- getRealSystemTime() {
2831
- return timers().getRealSystemTime();
2832
- },
2833
- clearAllTimers() {
2834
- timers().clearAllTimers();
2835
- return utils;
2836
- },
2837
- spyOn: import_spy.spyOn,
2838
- fn: import_spy.fn,
2839
- waitFor,
2840
- waitUntil,
2841
- hoisted(factory) {
2842
- (0, import_utils3.assertTypes)(factory, '"vi.hoisted" factory', ["function"]);
2843
- return factory();
2844
- },
2845
- mock(path, factory) {
2846
- if (typeof path !== "string") {
2847
- throw new TypeError(`vi.mock() expects a string path, but received a ${typeof path}`);
2848
- }
2849
- const importer = getImporter("mock");
2850
- _mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer, _mocker().getMockContext().callstack)) : factory);
2851
- },
2852
- unmock(path) {
2853
- if (typeof path !== "string") {
2854
- throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof path}`);
2855
- }
2856
- _mocker().queueUnmock(path, getImporter("unmock"));
2857
- },
2858
- doMock(path, factory) {
2859
- if (typeof path !== "string") {
2860
- throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof path}`);
2861
- }
2862
- const importer = getImporter("doMock");
2863
- _mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer, _mocker().getMockContext().callstack)) : factory);
2864
- },
2865
- doUnmock(path) {
2866
- if (typeof path !== "string") {
2867
- throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof path}`);
2868
- }
2869
- _mocker().queueUnmock(path, getImporter("doUnmock"));
2870
- },
2871
- async importActual(path) {
2872
- return _mocker().importActual(path, getImporter("importActual"), _mocker().getMockContext().callstack);
2873
- },
2874
- async importMock(path) {
2875
- return _mocker().importMock(path, getImporter("importMock"));
2876
- },
2877
- mocked(item, _options = {}) {
2878
- return item;
2879
- },
2880
- isMockFunction(fn2) {
2881
- return (0, import_spy.isMockFunction)(fn2);
2882
- },
2883
- clearAllMocks() {
2884
- [...import_spy.mocks].reverse().forEach((spy) => spy.mockClear());
2885
- return utils;
2886
- },
2887
- resetAllMocks() {
2888
- [...import_spy.mocks].reverse().forEach((spy) => spy.mockReset());
2889
- return utils;
2890
- },
2891
- restoreAllMocks() {
2892
- [...import_spy.mocks].reverse().forEach((spy) => spy.mockRestore());
2893
- return utils;
2894
- },
2895
- stubGlobal(name, value) {
2896
- if (!_stubsGlobal.has(name)) {
2897
- _stubsGlobal.set(name, Object.getOwnPropertyDescriptor(globalThis, name));
2898
- }
2899
- Object.defineProperty(globalThis, name, {
2900
- value,
2901
- writable: true,
2902
- configurable: true,
2903
- enumerable: true
2904
- });
2905
- return utils;
2906
- },
2907
- stubEnv(name, value) {
2908
- if (!_stubsEnv.has(name)) {
2909
- _stubsEnv.set(name, process.env[name]);
2910
- }
2911
- if (_envBooleans.includes(name)) {
2912
- process.env[name] = value ? "1" : "";
2913
- } else if (value === void 0) {
2914
- delete process.env[name];
2915
- } else {
2916
- process.env[name] = String(value);
2917
- }
2918
- return utils;
2919
- },
2920
- unstubAllGlobals() {
2921
- _stubsGlobal.forEach((original, name) => {
2922
- if (!original) {
2923
- Reflect.deleteProperty(globalThis, name);
2924
- } else {
2925
- Object.defineProperty(globalThis, name, original);
2926
- }
2927
- });
2928
- _stubsGlobal.clear();
2929
- return utils;
2930
- },
2931
- unstubAllEnvs() {
2932
- _stubsEnv.forEach((original, name) => {
2933
- if (original === void 0) {
2934
- delete process.env[name];
2935
- } else {
2936
- process.env[name] = original;
2937
- }
2938
- });
2939
- _stubsEnv.clear();
2940
- return utils;
2941
- },
2942
- resetModules() {
2943
- resetModules(workerState.moduleCache);
2944
- return utils;
2945
- },
2946
- async dynamicImportSettled() {
2947
- return waitForImportsToResolve();
2948
- },
2949
- setConfig(config) {
2950
- if (!_config) {
2951
- _config = { ...workerState.config };
2952
- }
2953
- Object.assign(workerState.config, config);
2954
- },
2955
- resetConfig() {
2956
- if (_config) {
2957
- Object.assign(workerState.config, _config);
2958
- }
2959
- }
2960
- };
2961
- return utils;
2962
- }
2963
- var vitest = createVitest();
2964
- var vi = vitest;
2965
- function _mocker() {
2966
- return typeof __vitest_mocker__ !== "undefined" ? __vitest_mocker__ : new Proxy({}, { get(_, name) {
2967
- throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(name)}() is forbidden.`);
2968
- } });
2969
- }
2970
- function getImporter(name) {
2971
- const stackTrace = (0, import_utils3.createSimpleStackTrace)({ stackTraceLimit: 5 });
2972
- const stackArray = stackTrace.split("\n");
2973
- const importerStackIndex = stackArray.findIndex((stack2) => {
2974
- return stack2.includes(` at Object.${name}`) || stack2.includes(`${name}@`);
2975
- });
2976
- const stack = (0, import_source_map.parseSingleStack)(stackArray[importerStackIndex + 1]);
2977
- return stack?.file || "";
2978
- }
2979
-
2980
- // ../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.1_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3/node_modules/vitest/dist/index.js
2981
- var import_expect_type = require("expect-type.js");
2982
- var import_runner2 = require("@vitest/runner.js");
2983
- var chai2 = __toESM(require("chai.js"), 1);
2984
- var import_chai = require("chai.js");
2985
- var import_expect2 = require("@vitest/expect.js");
2986
- var import_utils4 = require("@vitest/runner/utils.js");
2987
- var import_utils5 = require("@vitest/utils.js");
2988
- var import_snapshot2 = require("@vitest/snapshot.js");
2989
- var import_error2 = require("@vitest/utils/error.js");
2990
- var import_spy2 = require("@vitest/spy.js");
2991
- var import_source_map2 = require("@vitest/utils/source-map.js");
2992
-
2993
- // src/tests/setup.ts
2994
- var OriginalDate = global.Date;
2995
- var fixedDate = new OriginalDate("2023-01-01");
1
+ import { vi } from "vitest";
2
+ const OriginalDate = global.Date;
3
+ const fixedDate = new OriginalDate("2023-01-01");
2996
4
  global.Date = vi.fn(() => fixedDate);
2997
5
  global.Date.now = vi.fn(() => fixedDate.getTime());
2998
6
  //# sourceMappingURL=setup.js.map