jodit-pro 4.12.32 → 4.12.34

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 (333) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +8 -8
  4. package/es2015/jodit.js +38 -2
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +34 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +596 -44
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.css +1 -1
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +33 -33
  10. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  11. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.css +1 -1
  22. package/es2015/plugins/color-picker/color-picker.js +1 -1
  23. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  24. package/es2015/plugins/emoji/emoji.css +1 -1
  25. package/es2015/plugins/emoji/emoji.js +1 -1
  26. package/es2015/plugins/emoji/emoji.min.js +1 -1
  27. package/es2015/plugins/export-docs/export-docs.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  29. package/es2015/plugins/finder/finder.css +1 -1
  30. package/es2015/plugins/finder/finder.js +1 -1
  31. package/es2015/plugins/finder/finder.min.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.css +1 -1
  33. package/es2015/plugins/google-maps/google-maps.js +1 -1
  34. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  35. package/es2015/plugins/google-search/google-search.js +1 -1
  36. package/es2015/plugins/google-search/google-search.min.js +1 -1
  37. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  42. package/es2015/plugins/keyboard/keyboard.css +1 -1
  43. package/es2015/plugins/keyboard/keyboard.js +1 -1
  44. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  45. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  47. package/es2015/plugins/page-break/page-break.js +1 -1
  48. package/es2015/plugins/page-break/page-break.min.js +1 -1
  49. package/es2015/plugins/paste-code/paste-code.css +1 -1
  50. package/es2015/plugins/paste-code/paste-code.js +1 -1
  51. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  52. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  53. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  54. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  55. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  56. package/es2015/plugins/style/style.css +1 -1
  57. package/es2015/plugins/style/style.js +1 -1
  58. package/es2015/plugins/style/style.min.js +1 -1
  59. package/es2015/plugins/templates/templates.css +1 -1
  60. package/es2015/plugins/templates/templates.js +1 -1
  61. package/es2015/plugins/templates/templates.min.js +1 -1
  62. package/es2015/plugins/todo-list/todo-list.css +1 -1
  63. package/es2015/plugins/todo-list/todo-list.js +1 -1
  64. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  65. package/es2015/plugins/translate/translate.css +1 -1
  66. package/es2015/plugins/translate/translate.js +1 -1
  67. package/es2015/plugins/translate/translate.min.js +1 -1
  68. package/es2015/plugins/tune-block/tune-block.css +1 -1
  69. package/es2015/plugins/tune-block/tune-block.js +1 -1
  70. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  71. package/es2018/jodit.fat.min.css +1 -1
  72. package/es2018/jodit.fat.min.js +6 -6
  73. package/es2018/jodit.min.js +2 -2
  74. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.css +1 -1
  75. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +38 -38
  76. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  77. package/es2018/plugins/backup/backup.min.js +1 -1
  78. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  79. package/es2018/plugins/change-case/change-case.min.js +1 -1
  80. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  81. package/es2018/plugins/emoji/emoji.min.js +1 -1
  82. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  83. package/es2018/plugins/finder/finder.min.js +1 -1
  84. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  85. package/es2018/plugins/google-search/google-search.min.js +1 -1
  86. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  87. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  88. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  89. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  90. package/es2018/plugins/page-break/page-break.min.js +1 -1
  91. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  92. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  93. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  94. package/es2018/plugins/style/style.min.js +1 -1
  95. package/es2018/plugins/templates/templates.min.js +1 -1
  96. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  97. package/es2018/plugins/translate/translate.min.js +1 -1
  98. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  99. package/es2021/jodit.css +1 -1
  100. package/es2021/jodit.fat.min.css +1 -1
  101. package/es2021/jodit.fat.min.js +8 -8
  102. package/es2021/jodit.js +38 -2
  103. package/es2021/jodit.min.js +3 -3
  104. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +34 -1
  105. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +569 -42
  106. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.css +1 -1
  107. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +9 -9
  108. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  109. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  110. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  111. package/es2021/plugins/backup/backup.css +1 -1
  112. package/es2021/plugins/backup/backup.js +1 -1
  113. package/es2021/plugins/backup/backup.min.js +1 -1
  114. package/es2021/plugins/button-generator/button-generator.css +1 -1
  115. package/es2021/plugins/button-generator/button-generator.js +1 -1
  116. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  117. package/es2021/plugins/change-case/change-case.js +1 -1
  118. package/es2021/plugins/change-case/change-case.min.js +1 -1
  119. package/es2021/plugins/color-picker/color-picker.css +1 -1
  120. package/es2021/plugins/color-picker/color-picker.js +1 -1
  121. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  122. package/es2021/plugins/emoji/emoji.css +1 -1
  123. package/es2021/plugins/emoji/emoji.js +1 -1
  124. package/es2021/plugins/emoji/emoji.min.js +1 -1
  125. package/es2021/plugins/export-docs/export-docs.js +1 -1
  126. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  127. package/es2021/plugins/finder/finder.css +1 -1
  128. package/es2021/plugins/finder/finder.js +1 -1
  129. package/es2021/plugins/finder/finder.min.js +1 -1
  130. package/es2021/plugins/google-maps/google-maps.css +1 -1
  131. package/es2021/plugins/google-maps/google-maps.js +1 -1
  132. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  133. package/es2021/plugins/google-search/google-search.js +1 -1
  134. package/es2021/plugins/google-search/google-search.min.js +1 -1
  135. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  136. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  137. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  138. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  139. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  140. package/es2021/plugins/keyboard/keyboard.css +1 -1
  141. package/es2021/plugins/keyboard/keyboard.js +1 -1
  142. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  143. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  144. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  145. package/es2021/plugins/page-break/page-break.js +1 -1
  146. package/es2021/plugins/page-break/page-break.min.js +1 -1
  147. package/es2021/plugins/paste-code/paste-code.css +1 -1
  148. package/es2021/plugins/paste-code/paste-code.js +1 -1
  149. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  150. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  151. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  152. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  153. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  154. package/es2021/plugins/style/style.css +1 -1
  155. package/es2021/plugins/style/style.js +1 -1
  156. package/es2021/plugins/style/style.min.js +1 -1
  157. package/es2021/plugins/templates/templates.css +1 -1
  158. package/es2021/plugins/templates/templates.js +1 -1
  159. package/es2021/plugins/templates/templates.min.js +1 -1
  160. package/es2021/plugins/todo-list/todo-list.css +1 -1
  161. package/es2021/plugins/todo-list/todo-list.js +1 -1
  162. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  163. package/es2021/plugins/translate/translate.css +1 -1
  164. package/es2021/plugins/translate/translate.js +1 -1
  165. package/es2021/plugins/translate/translate.min.js +1 -1
  166. package/es2021/plugins/tune-block/tune-block.css +1 -1
  167. package/es2021/plugins/tune-block/tune-block.js +1 -1
  168. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  169. package/es2021.en/jodit.css +1 -1
  170. package/es2021.en/jodit.fat.min.css +1 -1
  171. package/es2021.en/jodit.fat.min.js +25 -25
  172. package/es2021.en/jodit.js +38 -2
  173. package/es2021.en/jodit.min.js +3 -3
  174. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +34 -1
  175. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +569 -42
  176. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.css +1 -1
  177. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +9 -9
  178. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  179. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  180. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  181. package/es2021.en/plugins/backup/backup.css +1 -1
  182. package/es2021.en/plugins/backup/backup.js +1 -1
  183. package/es2021.en/plugins/backup/backup.min.js +1 -1
  184. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  185. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  186. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  187. package/es2021.en/plugins/change-case/change-case.js +1 -1
  188. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  189. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  190. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  191. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  192. package/es2021.en/plugins/emoji/emoji.css +1 -1
  193. package/es2021.en/plugins/emoji/emoji.js +1 -1
  194. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  195. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  196. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  197. package/es2021.en/plugins/finder/finder.css +1 -1
  198. package/es2021.en/plugins/finder/finder.js +1 -1
  199. package/es2021.en/plugins/finder/finder.min.js +1 -1
  200. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  201. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  202. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  203. package/es2021.en/plugins/google-search/google-search.js +1 -1
  204. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  205. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  206. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  207. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  208. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  209. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  210. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  211. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  212. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  213. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  214. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  215. package/es2021.en/plugins/page-break/page-break.js +1 -1
  216. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  217. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  218. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  219. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  220. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  221. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  222. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  223. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  224. package/es2021.en/plugins/style/style.css +1 -1
  225. package/es2021.en/plugins/style/style.js +1 -1
  226. package/es2021.en/plugins/style/style.min.js +1 -1
  227. package/es2021.en/plugins/templates/templates.css +1 -1
  228. package/es2021.en/plugins/templates/templates.js +1 -1
  229. package/es2021.en/plugins/templates/templates.min.js +1 -1
  230. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  231. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  232. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  233. package/es2021.en/plugins/translate/translate.css +1 -1
  234. package/es2021.en/plugins/translate/translate.js +1 -1
  235. package/es2021.en/plugins/translate/translate.min.js +1 -1
  236. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  237. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  238. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  239. package/es5/jodit.css +2 -2
  240. package/es5/jodit.fat.min.css +1 -1
  241. package/es5/jodit.fat.min.js +2 -2
  242. package/es5/jodit.js +38 -2
  243. package/es5/jodit.min.css +2 -2
  244. package/es5/jodit.min.js +2 -2
  245. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +34 -1
  246. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +734 -44
  247. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.css +1 -1
  248. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  249. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  250. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  251. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  252. package/es5/plugins/backup/backup.css +1 -1
  253. package/es5/plugins/backup/backup.js +1 -1
  254. package/es5/plugins/backup/backup.min.js +1 -1
  255. package/es5/plugins/button-generator/button-generator.css +1 -1
  256. package/es5/plugins/button-generator/button-generator.js +1 -1
  257. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  258. package/es5/plugins/change-case/change-case.js +1 -1
  259. package/es5/plugins/change-case/change-case.min.js +1 -1
  260. package/es5/plugins/color-picker/color-picker.css +1 -1
  261. package/es5/plugins/color-picker/color-picker.js +1 -1
  262. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  263. package/es5/plugins/emoji/emoji.css +1 -1
  264. package/es5/plugins/emoji/emoji.js +1 -1
  265. package/es5/plugins/emoji/emoji.min.js +1 -1
  266. package/es5/plugins/export-docs/export-docs.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  268. package/es5/plugins/finder/finder.css +1 -1
  269. package/es5/plugins/finder/finder.js +1 -1
  270. package/es5/plugins/finder/finder.min.js +1 -1
  271. package/es5/plugins/google-maps/google-maps.css +1 -1
  272. package/es5/plugins/google-maps/google-maps.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  274. package/es5/plugins/google-search/google-search.js +1 -1
  275. package/es5/plugins/google-search/google-search.min.js +1 -1
  276. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  277. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  278. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  279. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  281. package/es5/plugins/keyboard/keyboard.css +1 -1
  282. package/es5/plugins/keyboard/keyboard.js +1 -1
  283. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  284. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  285. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  286. package/es5/plugins/page-break/page-break.js +1 -1
  287. package/es5/plugins/page-break/page-break.min.js +1 -1
  288. package/es5/plugins/paste-code/paste-code.css +1 -1
  289. package/es5/plugins/paste-code/paste-code.js +1 -1
  290. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  291. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  292. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  293. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  294. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  295. package/es5/plugins/style/style.css +1 -1
  296. package/es5/plugins/style/style.js +1 -1
  297. package/es5/plugins/style/style.min.js +1 -1
  298. package/es5/plugins/templates/templates.css +1 -1
  299. package/es5/plugins/templates/templates.js +1 -1
  300. package/es5/plugins/templates/templates.min.js +1 -1
  301. package/es5/plugins/todo-list/todo-list.css +1 -1
  302. package/es5/plugins/todo-list/todo-list.js +1 -1
  303. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  304. package/es5/plugins/translate/translate.css +1 -1
  305. package/es5/plugins/translate/translate.js +1 -1
  306. package/es5/plugins/translate/translate.min.js +1 -1
  307. package/es5/plugins/tune-block/tune-block.css +1 -1
  308. package/es5/plugins/tune-block/tune-block.js +1 -1
  309. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  310. package/es5/polyfills.fat.min.js +1 -1
  311. package/es5/polyfills.js +1 -1
  312. package/es5/polyfills.min.js +1 -1
  313. package/esm/plugins/ai-assistant-pro/config.js +1 -1
  314. package/esm/plugins/ai-assistant-pro/icons/microphone.svg.js +1 -0
  315. package/esm/plugins/ai-assistant-pro/interface/options.d.ts +35 -0
  316. package/esm/plugins/ai-assistant-pro/providers/jodit-ai-adapter.js +1 -1
  317. package/esm/plugins/ai-assistant-pro/ui/input-area/input-area.d.ts +20 -0
  318. package/esm/plugins/ai-assistant-pro/ui/input-area/input-area.js +2 -2
  319. package/esm/plugins/ai-assistant-pro/voice/microphone-streamer.d.ts +26 -0
  320. package/esm/plugins/ai-assistant-pro/voice/microphone-streamer.js +1 -0
  321. package/esm/plugins/ai-assistant-pro/voice/voice-engine.d.ts +36 -0
  322. package/esm/plugins/ai-assistant-pro/voice/voice-engine.js +0 -0
  323. package/esm/plugins/ai-assistant-pro/voice/voice-input-button.d.ts +85 -0
  324. package/esm/plugins/ai-assistant-pro/voice/voice-input-button.js +1 -0
  325. package/esm/plugins/ai-assistant-pro/voice/voice-transcriber.d.ts +55 -0
  326. package/esm/plugins/ai-assistant-pro/voice/voice-transcriber.js +1 -0
  327. package/package.json +1 -1
  328. package/types/plugins/ai-assistant-pro/interface/options.d.ts +35 -0
  329. package/types/plugins/ai-assistant-pro/ui/input-area/input-area.d.ts +20 -0
  330. package/types/plugins/ai-assistant-pro/voice/microphone-streamer.d.ts +26 -0
  331. package/types/plugins/ai-assistant-pro/voice/voice-engine.d.ts +36 -0
  332. package/types/plugins/ai-assistant-pro/voice/voice-input-button.d.ts +85 -0
  333. package/types/plugins/ai-assistant-pro/voice/voice-transcriber.d.ts +55 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.12.32
4
+ * Version: v4.12.34
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -46,6 +46,13 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\
46
46
 
47
47
  /***/ }),
48
48
 
49
+ /***/ 99293:
50
+ /***/ (function(module) {
51
+
52
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <rect x=\"9\" y=\"2\" width=\"6\" height=\"12\" rx=\"3\"></rect> <path d=\"M5 10v1a7 7 0 0 0 14 0v-1\" fill=\"none\"></path> <line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"22\"></line> <line x1=\"8\" y1=\"22\" x2=\"16\" y2=\"22\"></line> </svg>"
53
+
54
+ /***/ }),
55
+
49
56
  /***/ 99219:
50
57
  /***/ (function(module) {
51
58
 
@@ -2271,18 +2278,20 @@ jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_28__.JoditPro.plugins.add('aiAssist
2271
2278
  /* harmony import */ var _icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_8__);
2272
2279
  /* harmony import */ var _icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(83207);
2273
2280
  /* harmony import */ var _icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_9__);
2274
- /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99219);
2275
- /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_send_svg__WEBPACK_IMPORTED_MODULE_10__);
2276
- /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63674);
2277
- /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_icons_shield_svg__WEBPACK_IMPORTED_MODULE_11__);
2278
- /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4133);
2279
- /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_12__);
2280
- /* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(94454);
2281
- /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(53835);
2282
- /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(6441);
2283
- /* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12153);
2284
- /* harmony import */ var jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(31974);
2285
- /* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(72573);
2281
+ /* harmony import */ var _icons_microphone_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99293);
2282
+ /* harmony import */ var _icons_microphone_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_microphone_svg__WEBPACK_IMPORTED_MODULE_10__);
2283
+ /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99219);
2284
+ /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_icons_send_svg__WEBPACK_IMPORTED_MODULE_11__);
2285
+ /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(63674);
2286
+ /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_icons_shield_svg__WEBPACK_IMPORTED_MODULE_12__);
2287
+ /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4133);
2288
+ /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_13__);
2289
+ /* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(94454);
2290
+ /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53835);
2291
+ /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6441);
2292
+ /* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(12153);
2293
+ /* harmony import */ var jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(31974);
2294
+ /* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72573);
2286
2295
  /*!
2287
2296
  * Jodit Editor PRO (https://xdsoft.net/jodit/)
2288
2297
  * See LICENSE.md in the project root for license information.
@@ -2307,10 +2316,11 @@ var _Config_prototype_tuneBlock;
2307
2316
 
2308
2317
 
2309
2318
 
2319
+
2310
2320
  // Register icons
2311
- jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_16__.Icon.set('ai-assistant-pro', (_icons_ai_assistant_svg__WEBPACK_IMPORTED_MODULE_7___default())).set('ai-commands-pro', (_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_8___default())).set('ai-add-context', (_icons_add_context_svg__WEBPACK_IMPORTED_MODULE_6___default())).set('send', (_icons_send_svg__WEBPACK_IMPORTED_MODULE_10___default())).set('tool-bolt', (_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_12___default())).set('chevron-right', (_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_9___default())).set('shield', (_icons_shield_svg__WEBPACK_IMPORTED_MODULE_11___default()));
2321
+ jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_17__.Icon.set('ai-assistant-pro', (_icons_ai_assistant_svg__WEBPACK_IMPORTED_MODULE_7___default())).set('ai-commands-pro', (_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_8___default())).set('ai-add-context', (_icons_add_context_svg__WEBPACK_IMPORTED_MODULE_6___default())).set('send', (_icons_send_svg__WEBPACK_IMPORTED_MODULE_11___default())).set('microphone', (_icons_microphone_svg__WEBPACK_IMPORTED_MODULE_10___default())).set('tool-bolt', (_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_13___default())).set('chevron-right', (_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_9___default())).set('shield', (_icons_shield_svg__WEBPACK_IMPORTED_MODULE_12___default()));
2312
2322
  // Default configuration
2313
- jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro = {
2323
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.aiAssistantPro = {
2314
2324
  // ===== Display Settings =====
2315
2325
  displayMode: 'right',
2316
2326
  panelWidth: 400,
@@ -2326,7 +2336,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2326
2336
  retryDelay: 1000,
2327
2337
  maxRecursionToolCallDepth: 1000,
2328
2338
  // ===== Tools Configuration =====
2329
- enabledTools: (0,_tools__WEBPACK_IMPORTED_MODULE_14__.getToolNames)(),
2339
+ enabledTools: (0,_tools__WEBPACK_IMPORTED_MODULE_15__.getToolNames)(),
2330
2340
  customTools: [],
2331
2341
  toolPermissions: {},
2332
2342
  // ===== Permission Settings =====
@@ -2366,7 +2376,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2366
2376
  },
2367
2377
  formatMessageContent: function formatMessageContent(content, role) {
2368
2378
  // For user and assistant messages, use markdown
2369
- return marked__WEBPACK_IMPORTED_MODULE_18__.marked.parse(content, {
2379
+ return marked__WEBPACK_IMPORTED_MODULE_19__.marked.parse(content, {
2370
2380
  breaks: true,
2371
2381
  gfm: true
2372
2382
  });
@@ -2385,6 +2395,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2385
2395
  autoOpen: true,
2386
2396
  rememberLastConversation: true,
2387
2397
  autoFocusInput: true,
2398
+ voiceInputEnabled: false,
2388
2399
  closeAfterInsert: false,
2389
2400
  enableSoundNotifications: false,
2390
2401
  debug: false,
@@ -2472,15 +2483,15 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2472
2483
  })();
2473
2484
  },
2474
2485
  getAIProviderOptions: function getAIProviderOptions1(name, config) {
2475
- return (0,_providers__WEBPACK_IMPORTED_MODULE_13__.getAIProviderOptions)(name, config);
2486
+ return (0,_providers__WEBPACK_IMPORTED_MODULE_14__.getAIProviderOptions)(name, config);
2476
2487
  },
2477
2488
  registerAIProvider: function registerAIProvider1(name, factory) {
2478
- (0,_providers__WEBPACK_IMPORTED_MODULE_13__.registerAIProvider)(name, factory);
2489
+ (0,_providers__WEBPACK_IMPORTED_MODULE_14__.registerAIProvider)(name, factory);
2479
2490
  }
2480
2491
  };
2481
2492
  /**
2482
2493
  * Main AI Assistant Pro control for toolbar
2483
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.controls.aiAssistantPro = {
2494
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.controls.aiAssistantPro = {
2484
2495
  icon: 'ai-assistant-pro',
2485
2496
  tooltip: 'AI Assistant',
2486
2497
  /**
@@ -2515,7 +2526,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2515
2526
  };
2516
2527
  /**
2517
2528
  * Add Context control for context menu (adds selection to AI context)
2518
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.controls.aiAddContext = {
2529
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.controls.aiAddContext = {
2519
2530
  icon: 'ai-add-context',
2520
2531
  tooltip: 'Add to AI Context',
2521
2532
  /**
@@ -2537,7 +2548,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2537
2548
  };
2538
2549
  /**
2539
2550
  * AI Commands control - quick AI commands dropdown
2540
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.controls.aiCommandsPro = {
2551
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.controls.aiCommandsPro = {
2541
2552
  icon: 'ai-commands-pro',
2542
2553
  tooltip: 'AI Commands',
2543
2554
  /**
@@ -2547,7 +2558,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2547
2558
  },
2548
2559
  /**
2549
2560
  * Default list of commands (can be overridden via quickCommands config)
2550
- */ list: jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_17__.aiAssitentCommands,
2561
+ */ list: jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_18__.aiAssitentCommands,
2551
2562
  /**
2552
2563
  * Execute handler - fires event with command name
2553
2564
  */ exec: function exec(editor, event, param) {
@@ -2557,7 +2568,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.aiAssistantPro =
2557
2568
  };
2558
2569
  /**
2559
2570
  * Extend tune-block popup to include "Add to AI Context" option
2560
- */ var originalTuneBlockPopup = ((_Config_prototype_tuneBlock = jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.tuneBlock) === null || _Config_prototype_tuneBlock === void 0 ? void 0 : _Config_prototype_tuneBlock.popup) || {};
2571
+ */ var originalTuneBlockPopup = ((_Config_prototype_tuneBlock = jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.tuneBlock) === null || _Config_prototype_tuneBlock === void 0 ? void 0 : _Config_prototype_tuneBlock.popup) || {};
2561
2572
  // Add AI context option to all block types
2562
2573
  var tuneBlockExtension = {};
2563
2574
  // Common block types
@@ -2597,8 +2608,8 @@ blockTypes.forEach(function(tag) {
2597
2608
  ]);
2598
2609
  });
2599
2610
  // Merge with existing tune-block configuration
2600
- if (jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.tuneBlock) {
2601
- jodit_esm_config__WEBPACK_IMPORTED_MODULE_15__.Config.prototype.tuneBlock.popup = (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, originalTuneBlockPopup, tuneBlockExtension);
2611
+ if (jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.tuneBlock) {
2612
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.tuneBlock.popup = (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, originalTuneBlockPopup, tuneBlockExtension);
2602
2613
  }
2603
2614
 
2604
2615
 
@@ -6446,9 +6457,17 @@ __webpack_require__.r(__webpack_exports__);
6446
6457
  var url = config.url.replace(/\/+$/, '');
6447
6458
  var provider = (_config_provider = config.provider) !== null && _config_provider !== void 0 ? _config_provider : 'openai';
6448
6459
  var stream = config.stream !== false;
6460
+ // Voice dictation goes over a WebSocket to the transcription proxy; derive its
6461
+ // wss URL from the same host (http→ws, https→wss).
6462
+ var transcribeUrl = "".concat(url.replace(/^http/, 'ws'), "/v1/ai/transcribe");
6449
6463
  return {
6450
6464
  apiMode: 'incremental',
6451
6465
  maxRetries: 0,
6466
+ // Enable voice dictation; the transcription model is chosen server-side
6467
+ // (like the text model). Override per-editor with the `voiceInput*` options.
6468
+ voiceInputEnabled: true,
6469
+ voiceInputUrl: transcribeUrl,
6470
+ voiceInputApiKey: config.apiKey,
6452
6471
  textAutocompleteEnabled: true,
6453
6472
  textAutocompleteApiRequest: function textAutocompleteApiRequest(query, maxSuggestions, signal) {
6454
6473
  return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_1__._)(function() {
@@ -8651,11 +8670,12 @@ UIConversationList = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__
8651
8670
  /* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84669);
8652
8671
  /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18766);
8653
8672
  /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
8654
- /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65478);
8655
- /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38837);
8656
- /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67510);
8657
- /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62843);
8658
- /* harmony import */ var jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(85120);
8673
+ /* harmony import */ var _voice_voice_input_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(66330);
8674
+ /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65478);
8675
+ /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(38837);
8676
+ /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(67510);
8677
+ /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62843);
8678
+ /* harmony import */ var jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(85120);
8659
8679
  /*!
8660
8680
  * Jodit Editor PRO (https://xdsoft.net/jodit/)
8661
8681
  * See LICENSE.md in the project root for license information.
@@ -8673,6 +8693,7 @@ UIConversationList = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__
8673
8693
 
8674
8694
 
8675
8695
 
8696
+
8676
8697
  var UIInputArea = /*#__PURE__*/ function(UIElement) {
8677
8698
  "use strict";
8678
8699
  (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(UIInputArea, UIElement);
@@ -8681,7 +8702,7 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8681
8702
  var _this;
8682
8703
  _this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIInputArea, [
8683
8704
  view
8684
- ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "textarea", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "sendButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "stopButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "contextBadges", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "contexts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "isLoading", void 0), _this.options = options, _this.textarea = null, _this.sendButton = null, _this.stopButton = null, _this.contexts = [], _this.isLoading = false;
8705
+ ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "textarea", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "sendButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "stopButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "voiceButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "contextBadges", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "contexts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "isLoading", void 0), _this.options = options, _this.textarea = null, _this.sendButton = null, _this.stopButton = null, _this.voiceButton = null, _this.contexts = [], _this.isLoading = false;
8685
8706
  return _this;
8686
8707
  }
8687
8708
  (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIInputArea, [
@@ -8694,10 +8715,11 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8694
8715
  {
8695
8716
  key: "setParentView",
8696
8717
  value: function setParentView(view) {
8697
- var _this_textarea, _this_sendButton, _this_stopButton;
8718
+ var _this_textarea, _this_sendButton, _this_stopButton, _this_voiceButton;
8698
8719
  (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.setParentView(view);
8699
8720
  (_this_sendButton = this.sendButton) === null || _this_sendButton === void 0 ? void 0 : _this_sendButton.setParentView(view);
8700
8721
  (_this_stopButton = this.stopButton) === null || _this_stopButton === void 0 ? void 0 : _this_stopButton.setParentView(view);
8722
+ (_this_voiceButton = this.voiceButton) === null || _this_voiceButton === void 0 ? void 0 : _this_voiceButton.setParentView(view);
8701
8723
  return (0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(UIInputArea.prototype), "setParentView", this).call(this, view);
8702
8724
  }
8703
8725
  },
@@ -8722,22 +8744,38 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8722
8744
  this.contextBadges = this.getElm('context-badges');
8723
8745
  this.createControls();
8724
8746
  this.attachHandlers();
8747
+ this.autosize();
8748
+ }
8749
+ },
8750
+ {
8751
+ key: "autosize",
8752
+ value: /** Grow the textarea to fit its content up to a max height, then scroll. */ function autosize() {
8753
+ var _this_textarea;
8754
+ var input = (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput;
8755
+ if (!input) {
8756
+ return;
8757
+ }
8758
+ var maxHeight = 160;
8759
+ input.style.height = 'auto';
8760
+ input.style.height = "".concat(Math.min(input.scrollHeight, maxHeight), "px");
8761
+ input.style.overflowY = input.scrollHeight > maxHeight ? 'auto' : 'hidden';
8725
8762
  }
8726
8763
  },
8727
8764
  {
8728
8765
  key: "createControls",
8729
8766
  value: function createControls() {
8767
+ var _this = this;
8730
8768
  var textareaWrapper = this.getElm('textarea-wrapper');
8731
8769
  var buttonsWrapper = this.getElm('buttons');
8732
8770
  // Textarea
8733
- this.textarea = new jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_12__.UITextArea(this.j, {
8771
+ this.textarea = new jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_13__.UITextArea(this.j, {
8734
8772
  name: 'message',
8735
8773
  placeholder: this.options.placeholderText,
8736
8774
  resizable: false
8737
8775
  });
8738
8776
  textareaWrapper.appendChild(this.textarea.container);
8739
8777
  // Send button
8740
- this.sendButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_11__.UIButton(this.j, {
8778
+ this.sendButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_12__.UIButton(this.j, {
8741
8779
  name: 'send-message',
8742
8780
  icon: {
8743
8781
  name: 'send'
@@ -8746,7 +8784,7 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8746
8784
  size: 'middle'
8747
8785
  });
8748
8786
  // Stop button
8749
- this.stopButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_11__.UIButton(this.j, {
8787
+ this.stopButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_12__.UIButton(this.j, {
8750
8788
  name: 'abort-message',
8751
8789
  icon: {
8752
8790
  name: 'cancel'
@@ -8755,6 +8793,59 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8755
8793
  size: 'middle'
8756
8794
  });
8757
8795
  this.stopButton.container.style.display = 'none';
8796
+ // Microphone (voice dictation) button — only when configured.
8797
+ if (this.options.voiceInputEnabled) {
8798
+ this.voiceButton = new _voice_voice_input_button__WEBPACK_IMPORTED_MODULE_8__.VoiceInputButton(this.j, {
8799
+ url: this.options.voiceInputUrl,
8800
+ apiKey: this.options.voiceInputApiKey,
8801
+ defaultModel: this.options.voiceInputDefaultModel,
8802
+ language: this.options.voiceInputLanguage,
8803
+ silenceTimeoutMs: this.options.voiceInputSilenceTimeoutMs,
8804
+ autoSendSilenceMs: this.options.voiceInputAutoSendSilenceMs,
8805
+ api: this.options.voiceInputApi
8806
+ }, {
8807
+ getValue: function getValue() {
8808
+ var _ref;
8809
+ var _this_textarea;
8810
+ return (_ref = (_this_textarea = _this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput.value) !== null && _ref !== void 0 ? _ref : '';
8811
+ },
8812
+ setValue: function setValue(value, caret) {
8813
+ if (!_this.textarea) {
8814
+ return;
8815
+ }
8816
+ _this.textarea.value = value;
8817
+ if (caret !== undefined) {
8818
+ var input = _this.textarea.nativeInput;
8819
+ input.selectionStart = caret;
8820
+ input.selectionEnd = caret;
8821
+ }
8822
+ _this.autosize();
8823
+ },
8824
+ getSelection: function getSelection() {
8825
+ var _input_selectionStart, _input_selectionEnd;
8826
+ var _this_textarea;
8827
+ var input = (_this_textarea = _this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput;
8828
+ if (!input) {
8829
+ return {
8830
+ start: 0,
8831
+ end: 0
8832
+ };
8833
+ }
8834
+ var len = input.value.length;
8835
+ return {
8836
+ start: (_input_selectionStart = input.selectionStart) !== null && _input_selectionStart !== void 0 ? _input_selectionStart : len,
8837
+ end: (_input_selectionEnd = input.selectionEnd) !== null && _input_selectionEnd !== void 0 ? _input_selectionEnd : len
8838
+ };
8839
+ },
8840
+ focus: function focus() {
8841
+ return _this.focus();
8842
+ },
8843
+ send: function send() {
8844
+ return _this.onSend();
8845
+ }
8846
+ });
8847
+ buttonsWrapper.appendChild(this.voiceButton.container);
8848
+ }
8758
8849
  buttonsWrapper.appendChild(this.sendButton.container);
8759
8850
  buttonsWrapper.appendChild(this.stopButton.container);
8760
8851
  }
@@ -8765,6 +8856,10 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8765
8856
  var _this = this;
8766
8857
  this.j.e.on(this.sendButton, 'click', this.onSend);
8767
8858
  this.j.e.on(this.stopButton, 'click', this.onStop);
8859
+ // Auto-grow the textarea as the user types.
8860
+ this.j.e.on(this.textarea.nativeInput, 'input', function() {
8861
+ return _this.autosize();
8862
+ });
8768
8863
  // Handle keyboard shortcuts
8769
8864
  this.j.e.on(this.textarea.nativeInput, 'keydown', function(e) {
8770
8865
  var _this_options = _this.options, sendShortcut = _this_options.sendShortcut, sendOnEnter = _this_options.sendOnEnter;
@@ -8809,6 +8904,7 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8809
8904
  this.j.e.fire('sendMessage.ai-assistant-pro', message);
8810
8905
  if (!this.textarea) return;
8811
8906
  this.textarea.value = '';
8907
+ this.autosize();
8812
8908
  this.textarea.nativeInput.focus();
8813
8909
  }
8814
8910
  },
@@ -8865,7 +8961,7 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8865
8961
  value: function setLoading(loading) {
8866
8962
  this.isLoading = loading;
8867
8963
  var _this = this, sendButton = _this.sendButton, stopButton = _this.stopButton, textarea = _this.textarea;
8868
- (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_9__.assert)(sendButton && stopButton && textarea, 'Buttons must be initialized');
8964
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_10__.assert)(sendButton && stopButton && textarea, 'Buttons must be initialized');
8869
8965
  textarea.setMod('disabled', loading);
8870
8966
  sendButton.setMod('disabled', loading);
8871
8967
  this.setMod('loading', loading);
@@ -8890,6 +8986,7 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8890
8986
  value: function setValue(value) {
8891
8987
  if (this.textarea) {
8892
8988
  this.textarea.value = value;
8989
+ this.autosize();
8893
8990
  }
8894
8991
  }
8895
8992
  },
@@ -8903,30 +9000,31 @@ var UIInputArea = /*#__PURE__*/ function(UIElement) {
8903
9000
  {
8904
9001
  key: "destruct",
8905
9002
  value: function destruct() {
8906
- var _this_textarea, _this_sendButton, _this_stopButton;
9003
+ var _this_textarea, _this_sendButton, _this_stopButton, _this_voiceButton;
8907
9004
  (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.destruct();
8908
9005
  (_this_sendButton = this.sendButton) === null || _this_sendButton === void 0 ? void 0 : _this_sendButton.destruct();
8909
9006
  (_this_stopButton = this.stopButton) === null || _this_stopButton === void 0 ? void 0 : _this_stopButton.destruct();
9007
+ (_this_voiceButton = this.voiceButton) === null || _this_voiceButton === void 0 ? void 0 : _this_voiceButton.destruct();
8910
9008
  (0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(UIInputArea.prototype), "destruct", this).call(this);
8911
9009
  }
8912
9010
  }
8913
9011
  ]);
8914
9012
  return UIInputArea;
8915
- }(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_10__.UIElement);
9013
+ }(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_11__.UIElement);
8916
9014
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
8917
- (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.watch)('input-row:click')
9015
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__.watch)('input-row:click')
8918
9016
  ], UIInputArea.prototype, "onInputRowClick", null);
8919
9017
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
8920
- (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.hook)('ready')
9018
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__.hook)('ready')
8921
9019
  ], UIInputArea.prototype, "afterRender", null);
8922
9020
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
8923
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
9021
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__.autobind
8924
9022
  ], UIInputArea.prototype, "onSend", null);
8925
9023
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
8926
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
9024
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__.autobind
8927
9025
  ], UIInputArea.prototype, "onStop", null);
8928
9026
  UIInputArea = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
8929
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.component
9027
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_9__.component
8930
9028
  ], UIInputArea);
8931
9029
 
8932
9030
 
@@ -11428,6 +11526,598 @@ UIWelcomeScreen = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__dec
11428
11526
  ], UIWelcomeScreen);
11429
11527
 
11430
11528
 
11529
+ /***/ }),
11530
+
11531
+ /***/ 88710:
11532
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11533
+
11534
+ "use strict";
11535
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11536
+ /* harmony export */ MicrophoneStreamer: function() { return /* binding */ MicrophoneStreamer; }
11537
+ /* harmony export */ });
11538
+ /* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77688);
11539
+ /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
11540
+ /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
11541
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
11542
+ /* harmony import */ var _swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62361);
11543
+
11544
+
11545
+
11546
+
11547
+
11548
+ /*!
11549
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
11550
+ * See LICENSE.md in the project root for license information.
11551
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
11552
+ */ /**
11553
+ * Captures the microphone and emits mono PCM16 @ 24 kHz audio frames — the format
11554
+ * the transcription proxy forwards to the realtime provider. Downsamples from the
11555
+ * browser's native sample rate. Uses only global browser APIs (`getUserMedia`,
11556
+ * `AudioContext`) so it can be stubbed in tests.
11557
+ *
11558
+ * @module plugins/ai-assistant-pro/voice
11559
+ */ var TARGET_SAMPLE_RATE = 24000;
11560
+ function floatTo16BitPCM(input) {
11561
+ var output = new Int16Array(input.length);
11562
+ for(var i = 0; i < input.length; i++){
11563
+ var sample = Math.max(-1, Math.min(1, input[i]));
11564
+ output[i] = sample < 0 ? sample * 0x8000 : sample * 0x7fff;
11565
+ }
11566
+ return output;
11567
+ }
11568
+ function downsample(input, inputRate, outputRate) {
11569
+ if (outputRate >= inputRate) {
11570
+ return input;
11571
+ }
11572
+ var ratio = inputRate / outputRate;
11573
+ var newLength = Math.round(input.length / ratio);
11574
+ var result = new Float32Array(newLength);
11575
+ for(var i = 0; i < newLength; i++){
11576
+ result[i] = input[Math.min(Math.round(i * ratio), input.length - 1)];
11577
+ }
11578
+ return result;
11579
+ }
11580
+ var MicrophoneStreamer = /*#__PURE__*/ function() {
11581
+ "use strict";
11582
+ function MicrophoneStreamer(onFrame) {
11583
+ (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, MicrophoneStreamer);
11584
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "onFrame", void 0);
11585
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "stream", void 0);
11586
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "audioCtx", void 0);
11587
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "processor", void 0);
11588
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "source", void 0);
11589
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "zeroGain", void 0);
11590
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "running", void 0);
11591
+ this.onFrame = onFrame;
11592
+ this.stream = null;
11593
+ this.audioCtx = null;
11594
+ this.processor = null;
11595
+ this.source = null;
11596
+ this.zeroGain = null;
11597
+ this.running = false;
11598
+ }
11599
+ (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(MicrophoneStreamer, [
11600
+ {
11601
+ key: "start",
11602
+ value: /**
11603
+ * Request the microphone and start streaming audio frames. Rejects if access
11604
+ * is denied or the audio graph cannot start.
11605
+ */ function start() {
11606
+ return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function() {
11607
+ var _this, _, ctx, source, processor, zeroGain;
11608
+ return (0,_swc_helpers_ts_generator__WEBPACK_IMPORTED_MODULE_4__._)(this, function(_state) {
11609
+ switch(_state.label){
11610
+ case 0:
11611
+ _this = this;
11612
+ this.running = true;
11613
+ _ = this;
11614
+ return [
11615
+ 4,
11616
+ navigator.mediaDevices.getUserMedia({
11617
+ audio: {
11618
+ channelCount: 1,
11619
+ echoCancellation: true,
11620
+ noiseSuppression: true
11621
+ }
11622
+ })
11623
+ ];
11624
+ case 1:
11625
+ _.stream = _state.sent();
11626
+ if (!this.running) {
11627
+ this.stopTracks();
11628
+ return [
11629
+ 2
11630
+ ];
11631
+ }
11632
+ ctx = new AudioContext();
11633
+ if (!(ctx.state === 'suspended')) return [
11634
+ 3,
11635
+ 3
11636
+ ];
11637
+ return [
11638
+ 4,
11639
+ ctx.resume()
11640
+ ];
11641
+ case 2:
11642
+ _state.sent();
11643
+ _state.label = 3;
11644
+ case 3:
11645
+ if (!this.running) {
11646
+ void ctx.close();
11647
+ return [
11648
+ 2
11649
+ ];
11650
+ }
11651
+ source = ctx.createMediaStreamSource(this.stream);
11652
+ processor = ctx.createScriptProcessor(4096, 1, 1);
11653
+ zeroGain = ctx.createGain();
11654
+ zeroGain.gain.value = 0; // keep the graph running without playback
11655
+ processor.onaudioprocess = function(e) {
11656
+ if (!_this.running) {
11657
+ return;
11658
+ }
11659
+ var input = e.inputBuffer.getChannelData(0);
11660
+ var pcm = floatTo16BitPCM(downsample(input, e.inputBuffer.sampleRate, TARGET_SAMPLE_RATE));
11661
+ // Send the typed-array view directly — its bytes are the PCM16 frame.
11662
+ _this.onFrame(pcm);
11663
+ };
11664
+ source.connect(processor);
11665
+ processor.connect(zeroGain);
11666
+ zeroGain.connect(ctx.destination);
11667
+ this.audioCtx = ctx;
11668
+ this.source = source;
11669
+ this.processor = processor;
11670
+ this.zeroGain = zeroGain;
11671
+ return [
11672
+ 2
11673
+ ];
11674
+ }
11675
+ });
11676
+ }).call(this);
11677
+ }
11678
+ },
11679
+ {
11680
+ /** Stop streaming and release the microphone and audio graph. */ key: "stop",
11681
+ value: function stop() {
11682
+ var _this_zeroGain, _this_source;
11683
+ this.running = false;
11684
+ if (this.processor) {
11685
+ this.processor.onaudioprocess = null;
11686
+ this.processor.disconnect();
11687
+ this.processor = null;
11688
+ }
11689
+ (_this_zeroGain = this.zeroGain) === null || _this_zeroGain === void 0 ? void 0 : _this_zeroGain.disconnect();
11690
+ (_this_source = this.source) === null || _this_source === void 0 ? void 0 : _this_source.disconnect();
11691
+ this.zeroGain = null;
11692
+ this.source = null;
11693
+ if (this.audioCtx) {
11694
+ void this.audioCtx.close();
11695
+ this.audioCtx = null;
11696
+ }
11697
+ this.stopTracks();
11698
+ }
11699
+ },
11700
+ {
11701
+ key: "stopTracks",
11702
+ value: function stopTracks() {
11703
+ var _this_stream;
11704
+ (_this_stream = this.stream) === null || _this_stream === void 0 ? void 0 : _this_stream.getTracks().forEach(function(track) {
11705
+ return track.stop();
11706
+ });
11707
+ this.stream = null;
11708
+ }
11709
+ }
11710
+ ]);
11711
+ return MicrophoneStreamer;
11712
+ }();
11713
+
11714
+
11715
+ /***/ }),
11716
+
11717
+ /***/ 66330:
11718
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11719
+
11720
+ "use strict";
11721
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11722
+ /* harmony export */ VoiceInputButton: function() { return /* binding */ VoiceInputButton; }
11723
+ /* harmony export */ });
11724
+ /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20616);
11725
+ /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67709);
11726
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82749);
11727
+ /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56075);
11728
+ /* harmony import */ var _voice_transcriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20466);
11729
+ /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62843);
11730
+ /*!
11731
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
11732
+ * See LICENSE.md in the project root for license information.
11733
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
11734
+ */
11735
+
11736
+
11737
+
11738
+
11739
+
11740
+ var ACTIVE_CLASS = 'jodit-ai-voice-active';
11741
+ /**
11742
+ * The microphone button for the assistant input area. Toggles a
11743
+ * `VoiceTranscriber` session and writes interim/final transcripts into the prompt
11744
+ * (interim text is previewed; final phrases are appended).
11745
+ */ var VoiceInputButton = /*#__PURE__*/ function() {
11746
+ "use strict";
11747
+ function VoiceInputButton(jodit, config, io) {
11748
+ var _this = this;
11749
+ (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_0__._)(this, VoiceInputButton);
11750
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "jodit", void 0);
11751
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "config", void 0);
11752
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "io", void 0);
11753
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "button", void 0);
11754
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "engine", void 0);
11755
+ /** Whether a recognition session is active. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "listening", void 0);
11756
+ /** Whether a phrase is in progress (between its first interim and its final). */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "phraseActive", void 0);
11757
+ /** Prompt text before the caret, captured at the start of the current phrase. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "before", void 0);
11758
+ /** Prompt text after the caret (or selection), captured at phrase start. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "after", void 0);
11759
+ /** Pending hands-free auto-send timer id (0 = none). */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "autoSendTimer", void 0);
11760
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "onPromptSent", void 0);
11761
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "toggle", void 0);
11762
+ this.jodit = jodit;
11763
+ this.config = config;
11764
+ this.io = io;
11765
+ this.engine = null;
11766
+ this.listening = false;
11767
+ this.phraseActive = false;
11768
+ this.before = '';
11769
+ this.after = '';
11770
+ this.autoSendTimer = 0;
11771
+ this.onPromptSent = function() {
11772
+ _this.phraseActive = false;
11773
+ };
11774
+ this.toggle = function() {
11775
+ if (_this.listening) {
11776
+ var _this_engine;
11777
+ (_this_engine = _this.engine) === null || _this_engine === void 0 ? void 0 : _this_engine.stop();
11778
+ // Reset the UI immediately on manual stop (a close that we initiate
11779
+ // does not always re-emit `onEnd`).
11780
+ _this.reset();
11781
+ return;
11782
+ }
11783
+ _this.start();
11784
+ };
11785
+ this.button = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_5__.UIButton(jodit, {
11786
+ name: 'voice-input',
11787
+ icon: {
11788
+ name: 'microphone'
11789
+ },
11790
+ variant: 'initial',
11791
+ size: 'middle'
11792
+ });
11793
+ this.button.container.setAttribute('title', 'Dictate');
11794
+ this.button.container.setAttribute('data-ref', 'voiceInputButton');
11795
+ this.jodit.e.on(this.button, 'click', this.toggle);
11796
+ // Sending clears the prompt; end the current phrase so the next one
11797
+ // re-captures its baseline from the (now empty) input rather than
11798
+ // re-inserting the text that was just sent.
11799
+ this.jodit.e.on('sendMessage.ai-assistant-pro', this.onPromptSent);
11800
+ }
11801
+ (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_1__._)(VoiceInputButton, [
11802
+ {
11803
+ key: "container",
11804
+ get: function get() {
11805
+ return this.button.container;
11806
+ }
11807
+ },
11808
+ {
11809
+ key: "setParentView",
11810
+ value: function setParentView(view) {
11811
+ this.button.setParentView(view);
11812
+ }
11813
+ },
11814
+ {
11815
+ key: "start",
11816
+ value: function start() {
11817
+ var _this = this;
11818
+ var callbacks = {
11819
+ onInterim: function onInterim(text) {
11820
+ // New speech — cancel any pending hands-free send.
11821
+ _this.clearAutoSend();
11822
+ _this.insertPhrase(text);
11823
+ },
11824
+ onFinal: function onFinal(text) {
11825
+ _this.insertPhrase(text);
11826
+ _this.phraseActive = false;
11827
+ _this.scheduleAutoSend();
11828
+ },
11829
+ onError: function onError() {
11830
+ return _this.reset();
11831
+ },
11832
+ onEnd: function onEnd() {
11833
+ return _this.reset();
11834
+ }
11835
+ };
11836
+ var engine;
11837
+ if (this.config.api) {
11838
+ engine = this.config.api(callbacks);
11839
+ } else {
11840
+ var _this_config = this.config, url = _this_config.url, apiKey = _this_config.apiKey;
11841
+ if (!url || !apiKey) {
11842
+ return;
11843
+ }
11844
+ engine = new _voice_transcriber__WEBPACK_IMPORTED_MODULE_4__.VoiceTranscriber((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_3__._)({
11845
+ url: url,
11846
+ apiKey: apiKey,
11847
+ model: this.config.defaultModel,
11848
+ language: this.config.language,
11849
+ silenceMs: this.config.silenceTimeoutMs
11850
+ }, callbacks));
11851
+ }
11852
+ this.phraseActive = false;
11853
+ this.engine = engine;
11854
+ this.listening = true;
11855
+ this.setActive(true);
11856
+ engine.start();
11857
+ }
11858
+ },
11859
+ {
11860
+ key: "reset",
11861
+ value: function reset() {
11862
+ this.clearAutoSend();
11863
+ this.setActive(false);
11864
+ this.phraseActive = false;
11865
+ this.listening = false;
11866
+ this.engine = null;
11867
+ this.io.focus();
11868
+ }
11869
+ },
11870
+ {
11871
+ key: "scheduleAutoSend",
11872
+ value: /**
11873
+ * Schedule a hands-free auto-send after `autoSendSilenceMs` of no new speech.
11874
+ * No-op when the option is unset/null.
11875
+ */ function scheduleAutoSend() {
11876
+ var _this = this;
11877
+ this.clearAutoSend();
11878
+ var ms = this.config.autoSendSilenceMs;
11879
+ if (ms == null) {
11880
+ return;
11881
+ }
11882
+ this.autoSendTimer = this.jodit.async.setTimeout(function() {
11883
+ _this.autoSendTimer = 0;
11884
+ _this.io.send();
11885
+ }, ms);
11886
+ }
11887
+ },
11888
+ {
11889
+ key: "clearAutoSend",
11890
+ value: function clearAutoSend() {
11891
+ if (this.autoSendTimer) {
11892
+ this.jodit.async.clearTimeout(this.autoSendTimer);
11893
+ this.autoSendTimer = 0;
11894
+ }
11895
+ }
11896
+ },
11897
+ {
11898
+ key: "setActive",
11899
+ value: function setActive(active) {
11900
+ this.button.container.classList.toggle(ACTIVE_CLASS, active);
11901
+ }
11902
+ },
11903
+ {
11904
+ key: "insertPhrase",
11905
+ value: /**
11906
+ * Insert the current phrase at the caret. The text around the caret (or
11907
+ * selection) is captured once at the start of each phrase from the live input,
11908
+ * so dictation lands where the cursor is, replaces any selection, and respects
11909
+ * manual edits / sends between phrases. Subsequent interims of the same phrase
11910
+ * replace its preview rather than accumulating.
11911
+ */ function insertPhrase(segment) {
11912
+ if (!this.phraseActive) {
11913
+ this.phraseActive = true;
11914
+ var _this_io_getSelection = this.io.getSelection(), start = _this_io_getSelection.start, end = _this_io_getSelection.end;
11915
+ var value = this.io.getValue();
11916
+ this.before = value.slice(0, start);
11917
+ this.after = value.slice(end);
11918
+ }
11919
+ // Avoid gluing words: add a separating space when inserting mid-text.
11920
+ var needsSpace = this.before.length > 0 && !/\s$/.test(this.before);
11921
+ var inserted = (needsSpace ? ' ' : '') + segment;
11922
+ var caret = this.before.length + inserted.length;
11923
+ this.io.setValue(this.before + inserted + this.after, caret);
11924
+ }
11925
+ },
11926
+ {
11927
+ key: "destruct",
11928
+ value: function destruct() {
11929
+ var _this_engine;
11930
+ this.clearAutoSend();
11931
+ this.jodit.e.off('sendMessage.ai-assistant-pro', this.onPromptSent);
11932
+ (_this_engine = this.engine) === null || _this_engine === void 0 ? void 0 : _this_engine.stop();
11933
+ this.engine = null;
11934
+ this.button.destruct();
11935
+ }
11936
+ }
11937
+ ]);
11938
+ return VoiceInputButton;
11939
+ }();
11940
+
11941
+
11942
+ /***/ }),
11943
+
11944
+ /***/ 20466:
11945
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11946
+
11947
+ "use strict";
11948
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11949
+ /* harmony export */ VoiceTranscriber: function() { return /* binding */ VoiceTranscriber; }
11950
+ /* harmony export */ });
11951
+ /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20616);
11952
+ /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67709);
11953
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82749);
11954
+ /* harmony import */ var _microphone_streamer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88710);
11955
+ /*!
11956
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
11957
+ * See LICENSE.md in the project root for license information.
11958
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
11959
+ */
11960
+
11961
+
11962
+
11963
+ var VoiceTranscriber = /*#__PURE__*/ function() {
11964
+ "use strict";
11965
+ function VoiceTranscriber(options) {
11966
+ (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_0__._)(this, VoiceTranscriber);
11967
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "options", void 0);
11968
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "ws", void 0);
11969
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "streamer", void 0);
11970
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_2__._)(this, "running", void 0);
11971
+ this.options = options;
11972
+ this.ws = null;
11973
+ this.streamer = null;
11974
+ this.running = false;
11975
+ }
11976
+ (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_1__._)(VoiceTranscriber, [
11977
+ {
11978
+ key: "isActive",
11979
+ get: function get() {
11980
+ return this.running;
11981
+ }
11982
+ },
11983
+ {
11984
+ /** Open the socket and begin a transcription session. */ key: "start",
11985
+ value: function start() {
11986
+ var _this = this;
11987
+ if (this.running) {
11988
+ return;
11989
+ }
11990
+ this.running = true;
11991
+ var url;
11992
+ try {
11993
+ var u = new URL(this.options.url);
11994
+ u.searchParams.set('key', this.options.apiKey);
11995
+ if (this.options.model) {
11996
+ u.searchParams.set('model', this.options.model);
11997
+ }
11998
+ if (this.options.language) {
11999
+ u.searchParams.set('language', this.options.language);
12000
+ }
12001
+ if (this.options.silenceMs !== undefined) {
12002
+ u.searchParams.set('silence', String(this.options.silenceMs));
12003
+ }
12004
+ url = u.toString();
12005
+ } catch (unused) {
12006
+ this.fail('Invalid transcription URL');
12007
+ return;
12008
+ }
12009
+ var ws = new WebSocket(url);
12010
+ ws.binaryType = 'arraybuffer';
12011
+ this.ws = ws;
12012
+ ws.addEventListener('message', function(event) {
12013
+ return _this.onMessage(event);
12014
+ });
12015
+ ws.addEventListener('error', function() {
12016
+ return _this.fail('Transcription connection error');
12017
+ });
12018
+ ws.addEventListener('close', function() {
12019
+ return _this.finish();
12020
+ });
12021
+ }
12022
+ },
12023
+ {
12024
+ /** Stop the session and release the microphone. */ key: "stop",
12025
+ value: function stop() {
12026
+ var _this_streamer;
12027
+ if (!this.running) {
12028
+ return;
12029
+ }
12030
+ this.running = false;
12031
+ (_this_streamer = this.streamer) === null || _this_streamer === void 0 ? void 0 : _this_streamer.stop();
12032
+ this.streamer = null;
12033
+ if (this.ws && (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING)) {
12034
+ this.ws.close();
12035
+ }
12036
+ }
12037
+ },
12038
+ {
12039
+ key: "onMessage",
12040
+ value: function onMessage(event) {
12041
+ if (typeof event.data !== 'string') {
12042
+ return;
12043
+ }
12044
+ var data;
12045
+ try {
12046
+ data = JSON.parse(event.data);
12047
+ } catch (unused) {
12048
+ return;
12049
+ }
12050
+ switch(data.type){
12051
+ case 'ready':
12052
+ var _this_options_onReady, _this_options;
12053
+ (_this_options_onReady = (_this_options = this.options).onReady) === null || _this_options_onReady === void 0 ? void 0 : _this_options_onReady.call(_this_options);
12054
+ this.startAudio();
12055
+ break;
12056
+ case 'delta':
12057
+ if (data.text) {
12058
+ var _this_options_onInterim, _this_options1;
12059
+ (_this_options_onInterim = (_this_options1 = this.options).onInterim) === null || _this_options_onInterim === void 0 ? void 0 : _this_options_onInterim.call(_this_options1, data.text);
12060
+ }
12061
+ break;
12062
+ case 'final':
12063
+ if (data.text) {
12064
+ var _this_options_onFinal, _this_options2;
12065
+ (_this_options_onFinal = (_this_options2 = this.options).onFinal) === null || _this_options_onFinal === void 0 ? void 0 : _this_options_onFinal.call(_this_options2, data.text);
12066
+ }
12067
+ break;
12068
+ case 'error':
12069
+ var _data_message;
12070
+ this.fail((_data_message = data.message) !== null && _data_message !== void 0 ? _data_message : 'Transcription error');
12071
+ break;
12072
+ }
12073
+ }
12074
+ },
12075
+ {
12076
+ key: "startAudio",
12077
+ value: function startAudio() {
12078
+ var _this = this;
12079
+ if (!this.running || this.streamer) {
12080
+ return;
12081
+ }
12082
+ var streamer = new _microphone_streamer__WEBPACK_IMPORTED_MODULE_3__.MicrophoneStreamer(function(frame) {
12083
+ var _this_ws;
12084
+ if (((_this_ws = _this.ws) === null || _this_ws === void 0 ? void 0 : _this_ws.readyState) === WebSocket.OPEN) {
12085
+ _this.ws.send(frame);
12086
+ }
12087
+ });
12088
+ this.streamer = streamer;
12089
+ streamer.start().catch(function() {
12090
+ _this.fail('Microphone access denied');
12091
+ });
12092
+ }
12093
+ },
12094
+ {
12095
+ key: "fail",
12096
+ value: function fail(message) {
12097
+ var _this_options_onError, _this_options;
12098
+ (_this_options_onError = (_this_options = this.options).onError) === null || _this_options_onError === void 0 ? void 0 : _this_options_onError.call(_this_options, message);
12099
+ this.stop();
12100
+ }
12101
+ },
12102
+ {
12103
+ key: "finish",
12104
+ value: function finish() {
12105
+ var _this_streamer;
12106
+ var wasRunning = this.running;
12107
+ this.running = false;
12108
+ (_this_streamer = this.streamer) === null || _this_streamer === void 0 ? void 0 : _this_streamer.stop();
12109
+ this.streamer = null;
12110
+ if (wasRunning) {
12111
+ var _this_options_onEnd, _this_options;
12112
+ (_this_options_onEnd = (_this_options = this.options).onEnd) === null || _this_options_onEnd === void 0 ? void 0 : _this_options_onEnd.call(_this_options);
12113
+ }
12114
+ }
12115
+ }
12116
+ ]);
12117
+ return VoiceTranscriber;
12118
+ }();
12119
+
12120
+
11431
12121
  /***/ }),
11432
12122
 
11433
12123
  /***/ 18549: