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
 
@@ -1193,18 +1200,20 @@ jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_19__.JoditPro.plugins.add('aiAssist
1193
1200
  /* harmony import */ var _icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_6__);
1194
1201
  /* harmony import */ var _icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83207);
1195
1202
  /* harmony import */ var _icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_7__);
1196
- /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(99219);
1197
- /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_icons_send_svg__WEBPACK_IMPORTED_MODULE_8__);
1198
- /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63674);
1199
- /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_icons_shield_svg__WEBPACK_IMPORTED_MODULE_9__);
1200
- /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4133);
1201
- /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_10__);
1202
- /* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(94454);
1203
- /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(53835);
1204
- /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(6441);
1205
- /* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12153);
1206
- /* harmony import */ var jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(31974);
1207
- /* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(72573);
1203
+ /* harmony import */ var _icons_microphone_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(99293);
1204
+ /* harmony import */ var _icons_microphone_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_icons_microphone_svg__WEBPACK_IMPORTED_MODULE_8__);
1205
+ /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99219);
1206
+ /* harmony import */ var _icons_send_svg__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_icons_send_svg__WEBPACK_IMPORTED_MODULE_9__);
1207
+ /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63674);
1208
+ /* harmony import */ var _icons_shield_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_icons_shield_svg__WEBPACK_IMPORTED_MODULE_10__);
1209
+ /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4133);
1210
+ /* harmony import */ var _icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_11__);
1211
+ /* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(94454);
1212
+ /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53835);
1213
+ /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(6441);
1214
+ /* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12153);
1215
+ /* harmony import */ var jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(31974);
1216
+ /* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(72573);
1208
1217
  /*!
1209
1218
  * Jodit Editor PRO (https://xdsoft.net/jodit/)
1210
1219
  * See LICENSE.md in the project root for license information.
@@ -1227,10 +1236,11 @@ var _Config_prototype_tuneBlock;
1227
1236
 
1228
1237
 
1229
1238
 
1239
+
1230
1240
  // Register icons
1231
- jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_14__.Icon.set('ai-assistant-pro', (_icons_ai_assistant_svg__WEBPACK_IMPORTED_MODULE_5___default())).set('ai-commands-pro', (_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_6___default())).set('ai-add-context', (_icons_add_context_svg__WEBPACK_IMPORTED_MODULE_4___default())).set('send', (_icons_send_svg__WEBPACK_IMPORTED_MODULE_8___default())).set('tool-bolt', (_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_10___default())).set('chevron-right', (_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_7___default())).set('shield', (_icons_shield_svg__WEBPACK_IMPORTED_MODULE_9___default()));
1241
+ jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_15__.Icon.set('ai-assistant-pro', (_icons_ai_assistant_svg__WEBPACK_IMPORTED_MODULE_5___default())).set('ai-commands-pro', (_icons_ai_commands_svg__WEBPACK_IMPORTED_MODULE_6___default())).set('ai-add-context', (_icons_add_context_svg__WEBPACK_IMPORTED_MODULE_4___default())).set('send', (_icons_send_svg__WEBPACK_IMPORTED_MODULE_9___default())).set('microphone', (_icons_microphone_svg__WEBPACK_IMPORTED_MODULE_8___default())).set('tool-bolt', (_icons_tool_bolt_svg__WEBPACK_IMPORTED_MODULE_11___default())).set('chevron-right', (_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_7___default())).set('shield', (_icons_shield_svg__WEBPACK_IMPORTED_MODULE_10___default()));
1232
1242
  // Default configuration
1233
- jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro = {
1243
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.aiAssistantPro = {
1234
1244
  // ===== Display Settings =====
1235
1245
  displayMode: 'right',
1236
1246
  panelWidth: 400,
@@ -1246,7 +1256,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1246
1256
  retryDelay: 1000,
1247
1257
  maxRecursionToolCallDepth: 1000,
1248
1258
  // ===== Tools Configuration =====
1249
- enabledTools: (0,_tools__WEBPACK_IMPORTED_MODULE_12__.getToolNames)(),
1259
+ enabledTools: (0,_tools__WEBPACK_IMPORTED_MODULE_13__.getToolNames)(),
1250
1260
  customTools: [],
1251
1261
  toolPermissions: {},
1252
1262
  // ===== Permission Settings =====
@@ -1286,7 +1296,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1286
1296
  },
1287
1297
  formatMessageContent: (content, role)=>{
1288
1298
  // For user and assistant messages, use markdown
1289
- return marked__WEBPACK_IMPORTED_MODULE_16__.marked.parse(content, {
1299
+ return marked__WEBPACK_IMPORTED_MODULE_17__.marked.parse(content, {
1290
1300
  breaks: true,
1291
1301
  gfm: true
1292
1302
  });
@@ -1305,6 +1315,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1305
1315
  autoOpen: true,
1306
1316
  rememberLastConversation: true,
1307
1317
  autoFocusInput: true,
1318
+ voiceInputEnabled: false,
1308
1319
  closeAfterInsert: false,
1309
1320
  enableSoundNotifications: false,
1310
1321
  debug: false,
@@ -1361,15 +1372,15 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1361
1372
  })();
1362
1373
  },
1363
1374
  getAIProviderOptions (name, config) {
1364
- return (0,_providers__WEBPACK_IMPORTED_MODULE_11__.getAIProviderOptions)(name, config);
1375
+ return (0,_providers__WEBPACK_IMPORTED_MODULE_12__.getAIProviderOptions)(name, config);
1365
1376
  },
1366
1377
  registerAIProvider (name, factory) {
1367
- (0,_providers__WEBPACK_IMPORTED_MODULE_11__.registerAIProvider)(name, factory);
1378
+ (0,_providers__WEBPACK_IMPORTED_MODULE_12__.registerAIProvider)(name, factory);
1368
1379
  }
1369
1380
  };
1370
1381
  /**
1371
1382
  * Main AI Assistant Pro control for toolbar
1372
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.aiAssistantPro = {
1383
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.controls.aiAssistantPro = {
1373
1384
  icon: 'ai-assistant-pro',
1374
1385
  tooltip: 'AI Assistant',
1375
1386
  /**
@@ -1404,7 +1415,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1404
1415
  };
1405
1416
  /**
1406
1417
  * Add Context control for context menu (adds selection to AI context)
1407
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.aiAddContext = {
1418
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.controls.aiAddContext = {
1408
1419
  icon: 'ai-add-context',
1409
1420
  tooltip: 'Add to AI Context',
1410
1421
  /**
@@ -1426,7 +1437,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1426
1437
  };
1427
1438
  /**
1428
1439
  * AI Commands control - quick AI commands dropdown
1429
- */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.aiCommandsPro = {
1440
+ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.controls.aiCommandsPro = {
1430
1441
  icon: 'ai-commands-pro',
1431
1442
  tooltip: 'AI Commands',
1432
1443
  /**
@@ -1436,7 +1447,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1436
1447
  },
1437
1448
  /**
1438
1449
  * Default list of commands (can be overridden via quickCommands config)
1439
- */ list: jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_15__.aiAssitentCommands,
1450
+ */ list: jodit_esm_plugins_ai_assistant_config__WEBPACK_IMPORTED_MODULE_16__.aiAssitentCommands,
1440
1451
  /**
1441
1452
  * Execute handler - fires event with command name
1442
1453
  */ exec (editor, event, { control }) {
@@ -1445,7 +1456,7 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
1445
1456
  };
1446
1457
  /**
1447
1458
  * Extend tune-block popup to include "Add to AI Context" option
1448
- */ const originalTuneBlockPopup = ((_Config_prototype_tuneBlock = jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.tuneBlock) === null || _Config_prototype_tuneBlock === void 0 ? void 0 : _Config_prototype_tuneBlock.popup) || {};
1459
+ */ const originalTuneBlockPopup = ((_Config_prototype_tuneBlock = jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.tuneBlock) === null || _Config_prototype_tuneBlock === void 0 ? void 0 : _Config_prototype_tuneBlock.popup) || {};
1449
1460
  // Add AI context option to all block types
1450
1461
  const tuneBlockExtension = {};
1451
1462
  // Common block types
@@ -1486,8 +1497,8 @@ blockTypes.forEach((tag)=>{
1486
1497
  ];
1487
1498
  });
1488
1499
  // Merge with existing tune-block configuration
1489
- if (jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.tuneBlock) {
1490
- jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.tuneBlock.popup = (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, originalTuneBlockPopup, tuneBlockExtension);
1500
+ if (jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.tuneBlock) {
1501
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_14__.Config.prototype.tuneBlock.popup = (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, originalTuneBlockPopup, tuneBlockExtension);
1491
1502
  }
1492
1503
 
1493
1504
 
@@ -3919,9 +3930,17 @@ __webpack_require__.r(__webpack_exports__);
3919
3930
  const url = config.url.replace(/\/+$/, '');
3920
3931
  const provider = (_config_provider = config.provider) !== null && _config_provider !== void 0 ? _config_provider : 'openai';
3921
3932
  const stream = config.stream !== false;
3933
+ // Voice dictation goes over a WebSocket to the transcription proxy; derive its
3934
+ // wss URL from the same host (http→ws, https→wss).
3935
+ const transcribeUrl = `${url.replace(/^http/, 'ws')}/v1/ai/transcribe`;
3922
3936
  return {
3923
3937
  apiMode: 'incremental',
3924
3938
  maxRetries: 0,
3939
+ // Enable voice dictation; the transcription model is chosen server-side
3940
+ // (like the text model). Override per-editor with the `voiceInput*` options.
3941
+ voiceInputEnabled: true,
3942
+ voiceInputUrl: transcribeUrl,
3943
+ voiceInputApiKey: config.apiKey,
3925
3944
  textAutocompleteEnabled: true,
3926
3945
  textAutocompleteApiRequest: (query, maxSuggestions, signal)=>(0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_1__._)(function*() {
3927
3946
  var _data_result;
@@ -5773,11 +5792,12 @@ UIConversationList = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
5773
5792
  /* harmony export */ });
5774
5793
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
5775
5794
  /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
5776
- /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65478);
5777
- /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38837);
5778
- /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67510);
5779
- /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62843);
5780
- /* harmony import */ var jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85120);
5795
+ /* harmony import */ var _voice_voice_input_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66330);
5796
+ /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65478);
5797
+ /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38837);
5798
+ /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(67510);
5799
+ /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62843);
5800
+ /* harmony import */ var jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85120);
5781
5801
  /*!
5782
5802
  * Jodit Editor PRO (https://xdsoft.net/jodit/)
5783
5803
  * See LICENSE.md in the project root for license information.
@@ -5789,15 +5809,17 @@ UIConversationList = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
5789
5809
 
5790
5810
 
5791
5811
 
5792
- class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIElement {
5812
+
5813
+ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_5__.UIElement {
5793
5814
  className() {
5794
5815
  return 'UIInputArea';
5795
5816
  }
5796
5817
  setParentView(view) {
5797
- var _this_textarea, _this_sendButton, _this_stopButton;
5818
+ var _this_textarea, _this_sendButton, _this_stopButton, _this_voiceButton;
5798
5819
  (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.setParentView(view);
5799
5820
  (_this_sendButton = this.sendButton) === null || _this_sendButton === void 0 ? void 0 : _this_sendButton.setParentView(view);
5800
5821
  (_this_stopButton = this.stopButton) === null || _this_stopButton === void 0 ? void 0 : _this_stopButton.setParentView(view);
5822
+ (_this_voiceButton = this.voiceButton) === null || _this_voiceButton === void 0 ? void 0 : _this_voiceButton.setParentView(view);
5801
5823
  return super.setParentView(view);
5802
5824
  }
5803
5825
  render() {
@@ -5824,19 +5846,31 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5824
5846
  this.contextBadges = this.getElm('context-badges');
5825
5847
  this.createControls();
5826
5848
  this.attachHandlers();
5849
+ this.autosize();
5850
+ }
5851
+ /** Grow the textarea to fit its content up to a max height, then scroll. */ autosize() {
5852
+ var _this_textarea;
5853
+ const input = (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput;
5854
+ if (!input) {
5855
+ return;
5856
+ }
5857
+ const maxHeight = 160;
5858
+ input.style.height = 'auto';
5859
+ input.style.height = `${Math.min(input.scrollHeight, maxHeight)}px`;
5860
+ input.style.overflowY = input.scrollHeight > maxHeight ? 'auto' : 'hidden';
5827
5861
  }
5828
5862
  createControls() {
5829
5863
  const textareaWrapper = this.getElm('textarea-wrapper');
5830
5864
  const buttonsWrapper = this.getElm('buttons');
5831
5865
  // Textarea
5832
- this.textarea = new jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_6__.UITextArea(this.j, {
5866
+ this.textarea = new jodit_esm_core_ui_form_inputs_area_area__WEBPACK_IMPORTED_MODULE_7__.UITextArea(this.j, {
5833
5867
  name: 'message',
5834
5868
  placeholder: this.options.placeholderText,
5835
5869
  resizable: false
5836
5870
  });
5837
5871
  textareaWrapper.appendChild(this.textarea.container);
5838
5872
  // Send button
5839
- this.sendButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_5__.UIButton(this.j, {
5873
+ this.sendButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_6__.UIButton(this.j, {
5840
5874
  name: 'send-message',
5841
5875
  icon: {
5842
5876
  name: 'send'
@@ -5845,7 +5879,7 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5845
5879
  size: 'middle'
5846
5880
  });
5847
5881
  // Stop button
5848
- this.stopButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_5__.UIButton(this.j, {
5882
+ this.stopButton = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_6__.UIButton(this.j, {
5849
5883
  name: 'abort-message',
5850
5884
  icon: {
5851
5885
  name: 'cancel'
@@ -5854,12 +5888,63 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5854
5888
  size: 'middle'
5855
5889
  });
5856
5890
  this.stopButton.container.style.display = 'none';
5891
+ // Microphone (voice dictation) button — only when configured.
5892
+ if (this.options.voiceInputEnabled) {
5893
+ this.voiceButton = new _voice_voice_input_button__WEBPACK_IMPORTED_MODULE_2__.VoiceInputButton(this.j, {
5894
+ url: this.options.voiceInputUrl,
5895
+ apiKey: this.options.voiceInputApiKey,
5896
+ defaultModel: this.options.voiceInputDefaultModel,
5897
+ language: this.options.voiceInputLanguage,
5898
+ silenceTimeoutMs: this.options.voiceInputSilenceTimeoutMs,
5899
+ autoSendSilenceMs: this.options.voiceInputAutoSendSilenceMs,
5900
+ api: this.options.voiceInputApi
5901
+ }, {
5902
+ getValue: ()=>{
5903
+ var _ref;
5904
+ var _this_textarea;
5905
+ return (_ref = (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput.value) !== null && _ref !== void 0 ? _ref : '';
5906
+ },
5907
+ setValue: (value, caret)=>{
5908
+ if (!this.textarea) {
5909
+ return;
5910
+ }
5911
+ this.textarea.value = value;
5912
+ if (caret !== undefined) {
5913
+ const input = this.textarea.nativeInput;
5914
+ input.selectionStart = caret;
5915
+ input.selectionEnd = caret;
5916
+ }
5917
+ this.autosize();
5918
+ },
5919
+ getSelection: ()=>{
5920
+ var _input_selectionStart, _input_selectionEnd;
5921
+ var _this_textarea;
5922
+ const input = (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.nativeInput;
5923
+ if (!input) {
5924
+ return {
5925
+ start: 0,
5926
+ end: 0
5927
+ };
5928
+ }
5929
+ const len = input.value.length;
5930
+ return {
5931
+ start: (_input_selectionStart = input.selectionStart) !== null && _input_selectionStart !== void 0 ? _input_selectionStart : len,
5932
+ end: (_input_selectionEnd = input.selectionEnd) !== null && _input_selectionEnd !== void 0 ? _input_selectionEnd : len
5933
+ };
5934
+ },
5935
+ focus: ()=>this.focus(),
5936
+ send: ()=>this.onSend()
5937
+ });
5938
+ buttonsWrapper.appendChild(this.voiceButton.container);
5939
+ }
5857
5940
  buttonsWrapper.appendChild(this.sendButton.container);
5858
5941
  buttonsWrapper.appendChild(this.stopButton.container);
5859
5942
  }
5860
5943
  attachHandlers() {
5861
5944
  this.j.e.on(this.sendButton, 'click', this.onSend);
5862
5945
  this.j.e.on(this.stopButton, 'click', this.onStop);
5946
+ // Auto-grow the textarea as the user types.
5947
+ this.j.e.on(this.textarea.nativeInput, 'input', ()=>this.autosize());
5863
5948
  // Handle keyboard shortcuts
5864
5949
  this.j.e.on(this.textarea.nativeInput, 'keydown', (e)=>{
5865
5950
  const { sendShortcut, sendOnEnter } = this.options;
@@ -5901,6 +5986,7 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5901
5986
  this.j.e.fire('sendMessage.ai-assistant-pro', message);
5902
5987
  if (!this.textarea) return;
5903
5988
  this.textarea.value = '';
5989
+ this.autosize();
5904
5990
  this.textarea.nativeInput.focus();
5905
5991
  }
5906
5992
  onStop() {
@@ -5940,7 +6026,7 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5940
6026
  setLoading(loading) {
5941
6027
  this.isLoading = loading;
5942
6028
  const { sendButton, stopButton, textarea } = this;
5943
- (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_3__.assert)(sendButton && stopButton && textarea, 'Buttons must be initialized');
6029
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_4__.assert)(sendButton && stopButton && textarea, 'Buttons must be initialized');
5944
6030
  textarea.setMod('disabled', loading);
5945
6031
  sendButton.setMod('disabled', loading);
5946
6032
  this.setMod('loading', loading);
@@ -5959,6 +6045,7 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5959
6045
  setValue(value) {
5960
6046
  if (this.textarea) {
5961
6047
  this.textarea.value = value;
6048
+ this.autosize();
5962
6049
  }
5963
6050
  }
5964
6051
  getValue() {
@@ -5966,30 +6053,31 @@ class UIInputArea extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_4__.UIEleme
5966
6053
  return ((_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.value.trim()) || '';
5967
6054
  }
5968
6055
  destruct() {
5969
- var _this_textarea, _this_sendButton, _this_stopButton;
6056
+ var _this_textarea, _this_sendButton, _this_stopButton, _this_voiceButton;
5970
6057
  (_this_textarea = this.textarea) === null || _this_textarea === void 0 ? void 0 : _this_textarea.destruct();
5971
6058
  (_this_sendButton = this.sendButton) === null || _this_sendButton === void 0 ? void 0 : _this_sendButton.destruct();
5972
6059
  (_this_stopButton = this.stopButton) === null || _this_stopButton === void 0 ? void 0 : _this_stopButton.destruct();
6060
+ (_this_voiceButton = this.voiceButton) === null || _this_voiceButton === void 0 ? void 0 : _this_voiceButton.destruct();
5973
6061
  super.destruct();
5974
6062
  }
5975
6063
  constructor(view, options){
5976
- super(view), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "textarea", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "sendButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "stopButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "contextBadges", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "contexts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isLoading", void 0), this.options = options, this.textarea = null, this.sendButton = null, this.stopButton = null, this.contexts = [], this.isLoading = false;
6064
+ super(view), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "textarea", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "sendButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "stopButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "voiceButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "contextBadges", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "contexts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isLoading", void 0), this.options = options, this.textarea = null, this.sendButton = null, this.stopButton = null, this.voiceButton = null, this.contexts = [], this.isLoading = false;
5977
6065
  }
5978
6066
  }
5979
6067
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
5980
- (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('input-row:click')
6068
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__.watch)('input-row:click')
5981
6069
  ], UIInputArea.prototype, "onInputRowClick", null);
5982
6070
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
5983
- (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__.hook)('ready')
6071
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__.hook)('ready')
5984
6072
  ], UIInputArea.prototype, "afterRender", null);
5985
6073
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
5986
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
6074
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__.autobind
5987
6075
  ], UIInputArea.prototype, "onSend", null);
5988
6076
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
5989
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
6077
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__.autobind
5990
6078
  ], UIInputArea.prototype, "onStop", null);
5991
6079
  UIInputArea = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
5992
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
6080
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_3__.component
5993
6081
  ], UIInputArea);
5994
6082
 
5995
6083
 
@@ -7879,6 +7967,470 @@ UIWelcomeScreen = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__dec
7879
7967
  ], UIWelcomeScreen);
7880
7968
 
7881
7969
 
7970
+ /***/ }),
7971
+
7972
+ /***/ 88710:
7973
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7974
+
7975
+ "use strict";
7976
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7977
+ /* harmony export */ MicrophoneStreamer: function() { return /* binding */ MicrophoneStreamer; }
7978
+ /* harmony export */ });
7979
+ /* harmony import */ var _swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77688);
7980
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82749);
7981
+
7982
+
7983
+ /*!
7984
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
7985
+ * See LICENSE.md in the project root for license information.
7986
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
7987
+ */ /**
7988
+ * Captures the microphone and emits mono PCM16 @ 24 kHz audio frames — the format
7989
+ * the transcription proxy forwards to the realtime provider. Downsamples from the
7990
+ * browser's native sample rate. Uses only global browser APIs (`getUserMedia`,
7991
+ * `AudioContext`) so it can be stubbed in tests.
7992
+ *
7993
+ * @module plugins/ai-assistant-pro/voice
7994
+ */ const TARGET_SAMPLE_RATE = 24000;
7995
+ function floatTo16BitPCM(input) {
7996
+ const output = new Int16Array(input.length);
7997
+ for(let i = 0; i < input.length; i++){
7998
+ const sample = Math.max(-1, Math.min(1, input[i]));
7999
+ output[i] = sample < 0 ? sample * 0x8000 : sample * 0x7fff;
8000
+ }
8001
+ return output;
8002
+ }
8003
+ function downsample(input, inputRate, outputRate) {
8004
+ if (outputRate >= inputRate) {
8005
+ return input;
8006
+ }
8007
+ const ratio = inputRate / outputRate;
8008
+ const newLength = Math.round(input.length / ratio);
8009
+ const result = new Float32Array(newLength);
8010
+ for(let i = 0; i < newLength; i++){
8011
+ result[i] = input[Math.min(Math.round(i * ratio), input.length - 1)];
8012
+ }
8013
+ return result;
8014
+ }
8015
+ class MicrophoneStreamer {
8016
+ /**
8017
+ * Request the microphone and start streaming audio frames. Rejects if access
8018
+ * is denied or the audio graph cannot start.
8019
+ */ start() {
8020
+ return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
8021
+ this.running = true;
8022
+ this.stream = yield navigator.mediaDevices.getUserMedia({
8023
+ audio: {
8024
+ channelCount: 1,
8025
+ echoCancellation: true,
8026
+ noiseSuppression: true
8027
+ }
8028
+ });
8029
+ if (!this.running) {
8030
+ this.stopTracks();
8031
+ return;
8032
+ }
8033
+ const ctx = new AudioContext();
8034
+ // Browsers often start the context suspended (autoplay policy); without
8035
+ // resuming, onaudioprocess never fires and no audio is sent.
8036
+ if (ctx.state === 'suspended') {
8037
+ yield ctx.resume();
8038
+ }
8039
+ if (!this.running) {
8040
+ void ctx.close();
8041
+ return;
8042
+ }
8043
+ const source = ctx.createMediaStreamSource(this.stream);
8044
+ const processor = ctx.createScriptProcessor(4096, 1, 1);
8045
+ const zeroGain = ctx.createGain();
8046
+ zeroGain.gain.value = 0; // keep the graph running without playback
8047
+ processor.onaudioprocess = (e)=>{
8048
+ if (!this.running) {
8049
+ return;
8050
+ }
8051
+ const input = e.inputBuffer.getChannelData(0);
8052
+ const pcm = floatTo16BitPCM(downsample(input, e.inputBuffer.sampleRate, TARGET_SAMPLE_RATE));
8053
+ // Send the typed-array view directly — its bytes are the PCM16 frame.
8054
+ this.onFrame(pcm);
8055
+ };
8056
+ source.connect(processor);
8057
+ processor.connect(zeroGain);
8058
+ zeroGain.connect(ctx.destination);
8059
+ this.audioCtx = ctx;
8060
+ this.source = source;
8061
+ this.processor = processor;
8062
+ this.zeroGain = zeroGain;
8063
+ }).call(this);
8064
+ }
8065
+ /** Stop streaming and release the microphone and audio graph. */ stop() {
8066
+ var _this_zeroGain, _this_source;
8067
+ this.running = false;
8068
+ if (this.processor) {
8069
+ this.processor.onaudioprocess = null;
8070
+ this.processor.disconnect();
8071
+ this.processor = null;
8072
+ }
8073
+ (_this_zeroGain = this.zeroGain) === null || _this_zeroGain === void 0 ? void 0 : _this_zeroGain.disconnect();
8074
+ (_this_source = this.source) === null || _this_source === void 0 ? void 0 : _this_source.disconnect();
8075
+ this.zeroGain = null;
8076
+ this.source = null;
8077
+ if (this.audioCtx) {
8078
+ void this.audioCtx.close();
8079
+ this.audioCtx = null;
8080
+ }
8081
+ this.stopTracks();
8082
+ }
8083
+ stopTracks() {
8084
+ var _this_stream;
8085
+ (_this_stream = this.stream) === null || _this_stream === void 0 ? void 0 : _this_stream.getTracks().forEach((track)=>track.stop());
8086
+ this.stream = null;
8087
+ }
8088
+ /**
8089
+ * @param onFrame - receives each binary PCM16 audio frame to send upstream.
8090
+ */ constructor(onFrame){
8091
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "onFrame", void 0);
8092
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "stream", void 0);
8093
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "audioCtx", void 0);
8094
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "processor", void 0);
8095
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "source", void 0);
8096
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "zeroGain", void 0);
8097
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "running", void 0);
8098
+ this.onFrame = onFrame;
8099
+ this.stream = null;
8100
+ this.audioCtx = null;
8101
+ this.processor = null;
8102
+ this.source = null;
8103
+ this.zeroGain = null;
8104
+ this.running = false;
8105
+ }
8106
+ }
8107
+
8108
+
8109
+ /***/ }),
8110
+
8111
+ /***/ 66330:
8112
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8113
+
8114
+ "use strict";
8115
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8116
+ /* harmony export */ VoiceInputButton: function() { return /* binding */ VoiceInputButton; }
8117
+ /* harmony export */ });
8118
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
8119
+ /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56075);
8120
+ /* harmony import */ var _voice_transcriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20466);
8121
+ /* harmony import */ var jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62843);
8122
+ /*!
8123
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
8124
+ * See LICENSE.md in the project root for license information.
8125
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
8126
+ */
8127
+
8128
+
8129
+
8130
+ const ACTIVE_CLASS = 'jodit-ai-voice-active';
8131
+ /**
8132
+ * The microphone button for the assistant input area. Toggles a
8133
+ * `VoiceTranscriber` session and writes interim/final transcripts into the prompt
8134
+ * (interim text is previewed; final phrases are appended).
8135
+ */ class VoiceInputButton {
8136
+ get container() {
8137
+ return this.button.container;
8138
+ }
8139
+ setParentView(view) {
8140
+ this.button.setParentView(view);
8141
+ }
8142
+ start() {
8143
+ const callbacks = {
8144
+ onInterim: (text)=>{
8145
+ // New speech — cancel any pending hands-free send.
8146
+ this.clearAutoSend();
8147
+ this.insertPhrase(text);
8148
+ },
8149
+ onFinal: (text)=>{
8150
+ this.insertPhrase(text);
8151
+ this.phraseActive = false;
8152
+ this.scheduleAutoSend();
8153
+ },
8154
+ onError: ()=>this.reset(),
8155
+ onEnd: ()=>this.reset()
8156
+ };
8157
+ let engine;
8158
+ if (this.config.api) {
8159
+ engine = this.config.api(callbacks);
8160
+ } else {
8161
+ const { url, apiKey } = this.config;
8162
+ if (!url || !apiKey) {
8163
+ return;
8164
+ }
8165
+ engine = new _voice_transcriber__WEBPACK_IMPORTED_MODULE_2__.VoiceTranscriber((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({
8166
+ url,
8167
+ apiKey,
8168
+ model: this.config.defaultModel,
8169
+ language: this.config.language,
8170
+ silenceMs: this.config.silenceTimeoutMs
8171
+ }, callbacks));
8172
+ }
8173
+ this.phraseActive = false;
8174
+ this.engine = engine;
8175
+ this.listening = true;
8176
+ this.setActive(true);
8177
+ engine.start();
8178
+ }
8179
+ reset() {
8180
+ this.clearAutoSend();
8181
+ this.setActive(false);
8182
+ this.phraseActive = false;
8183
+ this.listening = false;
8184
+ this.engine = null;
8185
+ this.io.focus();
8186
+ }
8187
+ /**
8188
+ * Schedule a hands-free auto-send after `autoSendSilenceMs` of no new speech.
8189
+ * No-op when the option is unset/null.
8190
+ */ scheduleAutoSend() {
8191
+ this.clearAutoSend();
8192
+ const ms = this.config.autoSendSilenceMs;
8193
+ if (ms == null) {
8194
+ return;
8195
+ }
8196
+ this.autoSendTimer = this.jodit.async.setTimeout(()=>{
8197
+ this.autoSendTimer = 0;
8198
+ this.io.send();
8199
+ }, ms);
8200
+ }
8201
+ clearAutoSend() {
8202
+ if (this.autoSendTimer) {
8203
+ this.jodit.async.clearTimeout(this.autoSendTimer);
8204
+ this.autoSendTimer = 0;
8205
+ }
8206
+ }
8207
+ setActive(active) {
8208
+ this.button.container.classList.toggle(ACTIVE_CLASS, active);
8209
+ }
8210
+ /**
8211
+ * Insert the current phrase at the caret. The text around the caret (or
8212
+ * selection) is captured once at the start of each phrase from the live input,
8213
+ * so dictation lands where the cursor is, replaces any selection, and respects
8214
+ * manual edits / sends between phrases. Subsequent interims of the same phrase
8215
+ * replace its preview rather than accumulating.
8216
+ */ insertPhrase(segment) {
8217
+ if (!this.phraseActive) {
8218
+ this.phraseActive = true;
8219
+ const { start, end } = this.io.getSelection();
8220
+ const value = this.io.getValue();
8221
+ this.before = value.slice(0, start);
8222
+ this.after = value.slice(end);
8223
+ }
8224
+ // Avoid gluing words: add a separating space when inserting mid-text.
8225
+ const needsSpace = this.before.length > 0 && !/\s$/.test(this.before);
8226
+ const inserted = (needsSpace ? ' ' : '') + segment;
8227
+ const caret = this.before.length + inserted.length;
8228
+ this.io.setValue(this.before + inserted + this.after, caret);
8229
+ }
8230
+ destruct() {
8231
+ var _this_engine;
8232
+ this.clearAutoSend();
8233
+ this.jodit.e.off('sendMessage.ai-assistant-pro', this.onPromptSent);
8234
+ (_this_engine = this.engine) === null || _this_engine === void 0 ? void 0 : _this_engine.stop();
8235
+ this.engine = null;
8236
+ this.button.destruct();
8237
+ }
8238
+ constructor(jodit, config, io){
8239
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "jodit", void 0);
8240
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "config", void 0);
8241
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "io", void 0);
8242
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "button", void 0);
8243
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "engine", void 0);
8244
+ /** Whether a recognition session is active. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "listening", void 0);
8245
+ /** Whether a phrase is in progress (between its first interim and its final). */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "phraseActive", void 0);
8246
+ /** Prompt text before the caret, captured at the start of the current phrase. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "before", void 0);
8247
+ /** Prompt text after the caret (or selection), captured at phrase start. */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "after", void 0);
8248
+ /** Pending hands-free auto-send timer id (0 = none). */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "autoSendTimer", void 0);
8249
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "onPromptSent", void 0);
8250
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "toggle", void 0);
8251
+ this.jodit = jodit;
8252
+ this.config = config;
8253
+ this.io = io;
8254
+ this.engine = null;
8255
+ this.listening = false;
8256
+ this.phraseActive = false;
8257
+ this.before = '';
8258
+ this.after = '';
8259
+ this.autoSendTimer = 0;
8260
+ this.onPromptSent = ()=>{
8261
+ this.phraseActive = false;
8262
+ };
8263
+ this.toggle = ()=>{
8264
+ if (this.listening) {
8265
+ var _this_engine;
8266
+ (_this_engine = this.engine) === null || _this_engine === void 0 ? void 0 : _this_engine.stop();
8267
+ // Reset the UI immediately on manual stop (a close that we initiate
8268
+ // does not always re-emit `onEnd`).
8269
+ this.reset();
8270
+ return;
8271
+ }
8272
+ this.start();
8273
+ };
8274
+ this.button = new jodit_esm_core_ui_button__WEBPACK_IMPORTED_MODULE_3__.UIButton(jodit, {
8275
+ name: 'voice-input',
8276
+ icon: {
8277
+ name: 'microphone'
8278
+ },
8279
+ variant: 'initial',
8280
+ size: 'middle'
8281
+ });
8282
+ this.button.container.setAttribute('title', 'Dictate');
8283
+ this.button.container.setAttribute('data-ref', 'voiceInputButton');
8284
+ this.jodit.e.on(this.button, 'click', this.toggle);
8285
+ // Sending clears the prompt; end the current phrase so the next one
8286
+ // re-captures its baseline from the (now empty) input rather than
8287
+ // re-inserting the text that was just sent.
8288
+ this.jodit.e.on('sendMessage.ai-assistant-pro', this.onPromptSent);
8289
+ }
8290
+ }
8291
+
8292
+
8293
+ /***/ }),
8294
+
8295
+ /***/ 20466:
8296
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8297
+
8298
+ "use strict";
8299
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8300
+ /* harmony export */ VoiceTranscriber: function() { return /* binding */ VoiceTranscriber; }
8301
+ /* harmony export */ });
8302
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
8303
+ /* harmony import */ var _microphone_streamer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88710);
8304
+ /*!
8305
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
8306
+ * See LICENSE.md in the project root for license information.
8307
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
8308
+ */
8309
+
8310
+ class VoiceTranscriber {
8311
+ get isActive() {
8312
+ return this.running;
8313
+ }
8314
+ /** Open the socket and begin a transcription session. */ start() {
8315
+ if (this.running) {
8316
+ return;
8317
+ }
8318
+ this.running = true;
8319
+ let url;
8320
+ try {
8321
+ const u = new URL(this.options.url);
8322
+ u.searchParams.set('key', this.options.apiKey);
8323
+ if (this.options.model) {
8324
+ u.searchParams.set('model', this.options.model);
8325
+ }
8326
+ if (this.options.language) {
8327
+ u.searchParams.set('language', this.options.language);
8328
+ }
8329
+ if (this.options.silenceMs !== undefined) {
8330
+ u.searchParams.set('silence', String(this.options.silenceMs));
8331
+ }
8332
+ url = u.toString();
8333
+ } catch (unused) {
8334
+ this.fail('Invalid transcription URL');
8335
+ return;
8336
+ }
8337
+ const ws = new WebSocket(url);
8338
+ ws.binaryType = 'arraybuffer';
8339
+ this.ws = ws;
8340
+ ws.addEventListener('message', (event)=>this.onMessage(event));
8341
+ ws.addEventListener('error', ()=>this.fail('Transcription connection error'));
8342
+ ws.addEventListener('close', ()=>this.finish());
8343
+ }
8344
+ /** Stop the session and release the microphone. */ stop() {
8345
+ var _this_streamer;
8346
+ if (!this.running) {
8347
+ return;
8348
+ }
8349
+ this.running = false;
8350
+ (_this_streamer = this.streamer) === null || _this_streamer === void 0 ? void 0 : _this_streamer.stop();
8351
+ this.streamer = null;
8352
+ if (this.ws && (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING)) {
8353
+ this.ws.close();
8354
+ }
8355
+ }
8356
+ onMessage(event) {
8357
+ if (typeof event.data !== 'string') {
8358
+ return;
8359
+ }
8360
+ let data;
8361
+ try {
8362
+ data = JSON.parse(event.data);
8363
+ } catch (unused) {
8364
+ return;
8365
+ }
8366
+ switch(data.type){
8367
+ case 'ready':
8368
+ var _this_options_onReady, _this_options;
8369
+ (_this_options_onReady = (_this_options = this.options).onReady) === null || _this_options_onReady === void 0 ? void 0 : _this_options_onReady.call(_this_options);
8370
+ this.startAudio();
8371
+ break;
8372
+ case 'delta':
8373
+ if (data.text) {
8374
+ var _this_options_onInterim, _this_options1;
8375
+ (_this_options_onInterim = (_this_options1 = this.options).onInterim) === null || _this_options_onInterim === void 0 ? void 0 : _this_options_onInterim.call(_this_options1, data.text);
8376
+ }
8377
+ break;
8378
+ case 'final':
8379
+ if (data.text) {
8380
+ var _this_options_onFinal, _this_options2;
8381
+ (_this_options_onFinal = (_this_options2 = this.options).onFinal) === null || _this_options_onFinal === void 0 ? void 0 : _this_options_onFinal.call(_this_options2, data.text);
8382
+ }
8383
+ break;
8384
+ case 'error':
8385
+ var _data_message;
8386
+ this.fail((_data_message = data.message) !== null && _data_message !== void 0 ? _data_message : 'Transcription error');
8387
+ break;
8388
+ }
8389
+ }
8390
+ startAudio() {
8391
+ if (!this.running || this.streamer) {
8392
+ return;
8393
+ }
8394
+ const streamer = new _microphone_streamer__WEBPACK_IMPORTED_MODULE_1__.MicrophoneStreamer((frame)=>{
8395
+ var _this_ws;
8396
+ if (((_this_ws = this.ws) === null || _this_ws === void 0 ? void 0 : _this_ws.readyState) === WebSocket.OPEN) {
8397
+ this.ws.send(frame);
8398
+ }
8399
+ });
8400
+ this.streamer = streamer;
8401
+ streamer.start().catch(()=>{
8402
+ this.fail('Microphone access denied');
8403
+ });
8404
+ }
8405
+ fail(message) {
8406
+ var _this_options_onError, _this_options;
8407
+ (_this_options_onError = (_this_options = this.options).onError) === null || _this_options_onError === void 0 ? void 0 : _this_options_onError.call(_this_options, message);
8408
+ this.stop();
8409
+ }
8410
+ finish() {
8411
+ var _this_streamer;
8412
+ const wasRunning = this.running;
8413
+ this.running = false;
8414
+ (_this_streamer = this.streamer) === null || _this_streamer === void 0 ? void 0 : _this_streamer.stop();
8415
+ this.streamer = null;
8416
+ if (wasRunning) {
8417
+ var _this_options_onEnd, _this_options;
8418
+ (_this_options_onEnd = (_this_options = this.options).onEnd) === null || _this_options_onEnd === void 0 ? void 0 : _this_options_onEnd.call(_this_options);
8419
+ }
8420
+ }
8421
+ constructor(options){
8422
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0);
8423
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "ws", void 0);
8424
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "streamer", void 0);
8425
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "running", void 0);
8426
+ this.options = options;
8427
+ this.ws = null;
8428
+ this.streamer = null;
8429
+ this.running = false;
8430
+ }
8431
+ }
8432
+
8433
+
7882
8434
  /***/ }),
7883
8435
 
7884
8436
  /***/ 18549: