jodit 4.0.0-beta.41 → 4.0.0-beta.48

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 (505) hide show
  1. package/CHANGELOG.md +12 -6
  2. package/README.md +54 -12
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.js +5592 -5068
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.js +8 -8
  7. package/es2015/plugins/debug/debug.min.js +2 -2
  8. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.js +785 -749
  10. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  11. package/es2018/jodit.css +4896 -0
  12. package/es2018/jodit.js +38892 -0
  13. package/es2018/jodit.min.css +1 -0
  14. package/es2018/jodit.min.js +10 -0
  15. package/es2018/plugins/debug/debug.js +97 -0
  16. package/es2018/plugins/debug/debug.min.js +10 -0
  17. package/es2018/plugins/speech-recognize/speech-recognize.css +42 -0
  18. package/es2018/plugins/speech-recognize/speech-recognize.js +1043 -0
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.css +1 -0
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +10 -0
  21. package/es2021/jodit.css +1 -1
  22. package/es2021/jodit.js +5590 -5066
  23. package/es2021/jodit.min.js +2 -2
  24. package/es2021/plugins/debug/debug.js +8 -8
  25. package/es2021/plugins/debug/debug.min.js +2 -2
  26. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.js +773 -737
  28. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  29. package/es2021.en/jodit.css +1 -1
  30. package/es2021.en/jodit.js +5191 -4747
  31. package/es2021.en/jodit.min.js +2 -2
  32. package/es2021.en/plugins/debug/debug.js +8 -8
  33. package/es2021.en/plugins/debug/debug.min.js +2 -2
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +34 -18
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.js +7386 -1682
  39. package/es5/jodit.min.css +1 -1
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.js +10 -10
  42. package/es5/plugins/debug/debug.min.js +2 -2
  43. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.js +791 -755
  45. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  46. package/esm/config.js +2 -1
  47. package/esm/core/constants.js +2 -1
  48. package/esm/core/view/view.js +2 -1
  49. package/esm/index.js +0 -5
  50. package/esm/langs/index.js +20 -20
  51. package/esm/plugins/copy-format/langs/index.js +0 -25
  52. package/esm/plugins/index.js +0 -44
  53. package/esm/plugins/line-height/langs/index.js +0 -25
  54. package/esm/plugins/preview/preview.js +1 -1
  55. package/esm/plugins/spellcheck/langs/index.js +0 -25
  56. package/esm/plugins/symbols/langs/index.js +0 -25
  57. package/package.json +3 -6
  58. package/types/config.d.ts +560 -1
  59. package/types/core/async/async.d.ts +32 -0
  60. package/types/core/async/index.d.ts +3 -0
  61. package/types/core/component/component.d.ts +81 -0
  62. package/types/core/component/index.d.ts +3 -0
  63. package/types/core/component/statuses.d.ts +3 -0
  64. package/types/core/component/view-component.d.ts +13 -0
  65. package/types/core/constants.d.ts +62 -1
  66. package/types/core/create/create.d.ts +32 -0
  67. package/types/core/create/index.d.ts +3 -0
  68. package/types/core/decorators/cache/cache.d.ts +5 -0
  69. package/types/core/decorators/component/component.d.ts +9 -0
  70. package/types/core/decorators/debounce/debounce.d.ts +8 -0
  71. package/types/core/decorators/hook/hook.d.ts +8 -0
  72. package/types/core/decorators/idle/idle.d.ts +5 -0
  73. package/types/core/decorators/index.d.ts +5 -0
  74. package/types/core/decorators/nonenumerable/nonenumerable.d.ts +5 -0
  75. package/types/core/decorators/persistent/persistent.d.ts +5 -0
  76. package/types/core/decorators/wait/wait.d.ts +5 -0
  77. package/types/core/decorators/watch/watch.d.ts +8 -0
  78. package/types/core/dom/dom.d.ts +180 -0
  79. package/types/core/dom/index.d.ts +3 -0
  80. package/types/core/dom/lazy-walker.d.ts +3 -0
  81. package/types/core/event-emitter/event-emitter.d.ts +99 -0
  82. package/types/core/event-emitter/eventify.d.ts +25 -0
  83. package/types/core/event-emitter/index.d.ts +3 -0
  84. package/types/core/event-emitter/observable.d.ts +38 -0
  85. package/types/core/event-emitter/store.d.ts +3 -0
  86. package/types/core/global.d.ts +12 -0
  87. package/types/core/helpers/array/as-array.d.ts +3 -0
  88. package/types/core/helpers/array/index.d.ts +3 -0
  89. package/types/core/helpers/array/split-array.d.ts +6 -0
  90. package/types/core/helpers/array/to-array.d.ts +4 -0
  91. package/types/core/helpers/async/index.d.ts +3 -0
  92. package/types/core/helpers/async/set-timeout.d.ts +9 -0
  93. package/types/core/helpers/checker/has-browser-color-picker.d.ts +6 -0
  94. package/types/core/helpers/checker/index.d.ts +3 -0
  95. package/types/core/helpers/checker/is-array.d.ts +6 -0
  96. package/types/core/helpers/checker/is-boolean.d.ts +3 -0
  97. package/types/core/helpers/checker/is-equal.d.ts +3 -0
  98. package/types/core/helpers/checker/is-function.d.ts +6 -0
  99. package/types/core/helpers/checker/is-html-from-word.d.ts +6 -0
  100. package/types/core/helpers/checker/is-html.d.ts +3 -0
  101. package/types/core/helpers/checker/is-imp-interface.d.ts +12 -0
  102. package/types/core/helpers/checker/is-int.d.ts +3 -0
  103. package/types/core/helpers/checker/is-jodit-object.d.ts +6 -0
  104. package/types/core/helpers/checker/is-marker.d.ts +3 -0
  105. package/types/core/helpers/checker/is-native-function.d.ts +6 -0
  106. package/types/core/helpers/checker/is-number.d.ts +6 -0
  107. package/types/core/helpers/checker/is-numeric.d.ts +3 -0
  108. package/types/core/helpers/checker/is-plain-object.d.ts +6 -0
  109. package/types/core/helpers/checker/is-promise.d.ts +3 -0
  110. package/types/core/helpers/checker/is-set.d.ts +3 -0
  111. package/types/core/helpers/checker/is-string.d.ts +6 -0
  112. package/types/core/helpers/checker/is-url.d.ts +6 -0
  113. package/types/core/helpers/checker/is-valid-name.d.ts +6 -0
  114. package/types/core/helpers/checker/is-view-object.d.ts +6 -0
  115. package/types/core/helpers/checker/is-void.d.ts +6 -0
  116. package/types/core/helpers/checker/is-window.d.ts +3 -0
  117. package/types/core/helpers/color/color-to-hex.d.ts +16 -0
  118. package/types/core/helpers/color/index.d.ts +3 -0
  119. package/types/core/helpers/html/apply-styles.d.ts +5 -0
  120. package/types/core/helpers/html/clean-from-word.d.ts +4 -0
  121. package/types/core/helpers/html/htmlspecialchars.d.ts +7 -0
  122. package/types/core/helpers/html/index.d.ts +3 -0
  123. package/types/core/helpers/html/nl2br.d.ts +6 -0
  124. package/types/core/helpers/html/safe-html.d.ts +3 -0
  125. package/types/core/helpers/html/strip-tags.d.ts +6 -0
  126. package/types/core/helpers/index.d.ts +5 -0
  127. package/types/core/helpers/normalize/index.d.ts +3 -0
  128. package/types/core/helpers/normalize/normalize-color.d.ts +6 -0
  129. package/types/core/helpers/normalize/normalize-key-aliases.d.ts +3 -0
  130. package/types/core/helpers/normalize/normalize-license.d.ts +3 -0
  131. package/types/core/helpers/normalize/normalize-path.d.ts +3 -0
  132. package/types/core/helpers/normalize/normalize-relative-path.d.ts +3 -0
  133. package/types/core/helpers/normalize/normalize-size.d.ts +6 -0
  134. package/types/core/helpers/normalize/normalize-url.d.ts +3 -0
  135. package/types/core/helpers/size/get-content-width.d.ts +3 -0
  136. package/types/core/helpers/size/get-scroll-parent.d.ts +3 -0
  137. package/types/core/helpers/size/index.d.ts +3 -0
  138. package/types/core/helpers/size/inner-width.d.ts +3 -0
  139. package/types/core/helpers/size/object-size.d.ts +3 -0
  140. package/types/core/helpers/size/offset.d.ts +7 -0
  141. package/types/core/helpers/size/position.d.ts +3 -0
  142. package/types/core/helpers/string/camel-case.d.ts +6 -0
  143. package/types/core/helpers/string/fuzzy-search-index.d.ts +4 -0
  144. package/types/core/helpers/string/i18n.d.ts +31 -0
  145. package/types/core/helpers/string/index.d.ts +3 -0
  146. package/types/core/helpers/string/kebab-case.d.ts +3 -0
  147. package/types/core/helpers/string/stringify.d.ts +3 -0
  148. package/types/core/helpers/string/trim.d.ts +7 -0
  149. package/types/core/helpers/string/ucfirst.d.ts +6 -0
  150. package/types/core/helpers/utils/align.d.ts +12 -0
  151. package/types/core/helpers/utils/append-script.d.ts +12 -0
  152. package/types/core/helpers/utils/assert.d.ts +1 -0
  153. package/types/core/helpers/utils/attr.d.ts +12 -0
  154. package/types/core/helpers/utils/browser.d.ts +14 -0
  155. package/types/core/helpers/utils/build-query.d.ts +6 -0
  156. package/types/core/helpers/utils/complete-url.d.ts +3 -0
  157. package/types/core/helpers/utils/config-proto.d.ts +33 -0
  158. package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +3 -0
  159. package/types/core/helpers/utils/css.d.ts +6 -0
  160. package/types/core/helpers/utils/ctrl-key.d.ts +7 -0
  161. package/types/core/helpers/utils/data-bind.d.ts +3 -0
  162. package/types/core/helpers/utils/default-language.d.ts +3 -0
  163. package/types/core/helpers/utils/error/error.d.ts +3 -0
  164. package/types/core/helpers/utils/error/errors/abort-error.d.ts +3 -0
  165. package/types/core/helpers/utils/error/errors/connection-error.d.ts +3 -0
  166. package/types/core/helpers/utils/error/errors/index.d.ts +3 -0
  167. package/types/core/helpers/utils/error/errors/options-error.d.ts +3 -0
  168. package/types/core/helpers/utils/error/index.d.ts +3 -0
  169. package/types/core/helpers/utils/get-class-name.d.ts +3 -0
  170. package/types/core/helpers/utils/get.d.ts +22 -0
  171. package/types/core/helpers/utils/human-size-to-bytes.d.ts +7 -0
  172. package/types/core/helpers/utils/index.d.ts +3 -0
  173. package/types/core/helpers/utils/mark-deprecated.d.ts +10 -0
  174. package/types/core/helpers/utils/parse-query.d.ts +6 -0
  175. package/types/core/helpers/utils/print.d.ts +9 -0
  176. package/types/core/helpers/utils/reset.d.ts +10 -0
  177. package/types/core/helpers/utils/scroll-into-view.d.ts +6 -0
  178. package/types/core/helpers/utils/selector.d.ts +29 -0
  179. package/types/core/helpers/utils/set.d.ts +16 -0
  180. package/types/core/helpers/utils/stack.d.ts +3 -0
  181. package/types/core/helpers/utils/utils.d.ts +24 -0
  182. package/types/core/helpers/utils/val.d.ts +3 -0
  183. package/types/core/plugin/helpers/init-instance.d.ts +11 -0
  184. package/types/core/plugin/helpers/load.d.ts +9 -0
  185. package/types/core/plugin/helpers/make-instance.d.ts +7 -0
  186. package/types/core/plugin/helpers/utils.d.ts +3 -0
  187. package/types/core/plugin/index.d.ts +3 -0
  188. package/types/core/plugin/interface.d.ts +4 -0
  189. package/types/core/plugin/plugin-system.d.ts +30 -0
  190. package/types/core/plugin/plugin.d.ts +10 -0
  191. package/types/core/request/ajax.d.ts +5 -0
  192. package/types/core/request/config.d.ts +6 -0
  193. package/types/core/request/index.d.ts +3 -0
  194. package/types/core/request/response.d.ts +3 -0
  195. package/types/core/selection/helpers/index.d.ts +3 -0
  196. package/types/core/selection/helpers/move-node-inside-start.d.ts +8 -0
  197. package/types/core/selection/helpers/move-the-node-along-the-edge-outward.d.ts +4 -0
  198. package/types/core/selection/index.d.ts +3 -0
  199. package/types/core/selection/interface.d.ts +9 -0
  200. package/types/core/selection/selection.d.ts +196 -0
  201. package/types/core/selection/style/api/extract.d.ts +16 -0
  202. package/types/core/selection/style/api/finite-state-machine.d.ts +3 -0
  203. package/types/core/selection/style/api/get-suit-child.d.ts +8 -0
  204. package/types/core/selection/style/api/get-suit-parent.d.ts +8 -0
  205. package/types/core/selection/style/api/has-same-style.d.ts +7 -0
  206. package/types/core/selection/style/api/is-inside-invisible-element.d.ts +4 -0
  207. package/types/core/selection/style/api/is-normal-node.d.ts +4 -0
  208. package/types/core/selection/style/api/is-same-attributes.d.ts +4 -0
  209. package/types/core/selection/style/api/is-suit-element.d.ts +24 -0
  210. package/types/core/selection/style/api/list/toggle-ordered-list.d.ts +4 -0
  211. package/types/core/selection/style/api/list/wrap-list.d.ts +5 -0
  212. package/types/core/selection/style/api/toggle-attributes.d.ts +4 -0
  213. package/types/core/selection/style/api/unwrap-children.d.ts +4 -0
  214. package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +4 -0
  215. package/types/core/selection/style/api/wrap.d.ts +4 -0
  216. package/types/core/selection/style/apply-style.d.ts +4 -0
  217. package/types/core/selection/style/commit-style.d.ts +9 -0
  218. package/types/core/storage/engines/local-storage-provider.d.ts +9 -0
  219. package/types/core/storage/engines/memory-storage-provider.d.ts +3 -0
  220. package/types/core/storage/index.d.ts +3 -0
  221. package/types/core/storage/storage.d.ts +5 -0
  222. package/types/core/traits/dlgs.d.ts +3 -0
  223. package/types/core/traits/elms.d.ts +9 -0
  224. package/types/core/traits/mods.d.ts +11 -0
  225. package/types/core/ui/button/button/button.d.ts +35 -0
  226. package/types/core/ui/button/group/group.d.ts +6 -0
  227. package/types/core/ui/button/index.d.ts +5 -0
  228. package/types/core/ui/button/tooltip/tooltip.d.ts +5 -0
  229. package/types/core/ui/element.d.ts +27 -0
  230. package/types/core/ui/form/block/block.d.ts +4 -0
  231. package/types/core/ui/form/form.d.ts +7 -0
  232. package/types/core/ui/form/index.d.ts +3 -0
  233. package/types/core/ui/form/inputs/area/area.d.ts +6 -0
  234. package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +8 -0
  235. package/types/core/ui/form/inputs/file/file.d.ts +4 -0
  236. package/types/core/ui/form/inputs/index.d.ts +3 -0
  237. package/types/core/ui/form/inputs/input/input.d.ts +18 -0
  238. package/types/core/ui/form/inputs/select/select.d.ts +10 -0
  239. package/types/core/ui/form/validators/index.d.ts +3 -0
  240. package/types/core/ui/form/validators/input.d.ts +9 -0
  241. package/types/core/ui/form/validators/select.d.ts +6 -0
  242. package/types/core/ui/group/group.d.ts +32 -0
  243. package/types/core/ui/group/index.d.ts +3 -0
  244. package/types/core/ui/group/list.d.ts +16 -0
  245. package/types/core/ui/group/separator.d.ts +3 -0
  246. package/types/core/ui/group/spacer.d.ts +3 -0
  247. package/types/core/ui/helpers/buttons.d.ts +9 -0
  248. package/types/core/ui/helpers/get-control-type.d.ts +10 -0
  249. package/types/core/ui/helpers/get-strong-control-types.d.ts +6 -0
  250. package/types/core/ui/icon.d.ts +15 -0
  251. package/types/core/ui/index.d.ts +5 -0
  252. package/types/core/ui/popup/index.d.ts +3 -0
  253. package/types/core/ui/popup/popup.d.ts +35 -0
  254. package/types/core/ui/progress-bar/progress-bar.d.ts +10 -0
  255. package/types/core/view/view-with-toolbar.d.ts +22 -0
  256. package/types/core/view/view.d.ts +66 -1
  257. package/types/index.d.ts +5 -0
  258. package/types/jodit.d.ts +248 -0
  259. package/types/langs/index.d.ts +5 -0
  260. package/types/modules/context-menu/context-menu.d.ts +20 -0
  261. package/types/modules/dialog/alert.d.ts +17 -0
  262. package/types/modules/dialog/confirm.d.ts +17 -0
  263. package/types/modules/dialog/dialog.d.ts +115 -0
  264. package/types/modules/dialog/index.d.ts +5 -0
  265. package/types/modules/dialog/prompt.d.ts +20 -0
  266. package/types/modules/file-browser/builders/context-menu.d.ts +3 -0
  267. package/types/modules/file-browser/builders/elements-map.d.ts +7 -0
  268. package/types/modules/file-browser/builders/item.d.ts +3 -0
  269. package/types/modules/file-browser/data-provider.d.ts +72 -0
  270. package/types/modules/file-browser/factories.d.ts +3 -0
  271. package/types/modules/file-browser/fetch/delete-file.d.ts +7 -0
  272. package/types/modules/file-browser/fetch/load-items.d.ts +7 -0
  273. package/types/modules/file-browser/fetch/load-tree.d.ts +7 -0
  274. package/types/modules/file-browser/file-browser.d.ts +39 -0
  275. package/types/modules/file-browser/index.d.ts +5 -0
  276. package/types/modules/file-browser/listeners/native-listeners.d.ts +12 -0
  277. package/types/modules/file-browser/listeners/self-listeners.d.ts +6 -0
  278. package/types/modules/file-browser/listeners/state-listeners.d.ts +7 -0
  279. package/types/modules/file-browser/ui/index.d.ts +3 -0
  280. package/types/modules/history/command.d.ts +3 -0
  281. package/types/modules/history/history.d.ts +37 -0
  282. package/types/modules/history/snapshot.d.ts +40 -0
  283. package/types/modules/history/stack.d.ts +3 -0
  284. package/types/modules/image-editor/image-editor.d.ts +54 -1
  285. package/types/modules/image-editor/templates/form.d.ts +3 -0
  286. package/types/modules/index.d.ts +5 -0
  287. package/types/modules/messages/message.d.ts +3 -0
  288. package/types/modules/messages/messages.d.ts +8 -0
  289. package/types/modules/status-bar/status-bar.d.ts +20 -0
  290. package/types/modules/table/table.d.ts +57 -0
  291. package/types/modules/toolbar/button/button.d.ts +34 -1
  292. package/types/modules/toolbar/button/content.d.ts +6 -0
  293. package/types/modules/toolbar/button/index.d.ts +3 -0
  294. package/types/modules/toolbar/collection/collection.d.ts +23 -0
  295. package/types/modules/toolbar/collection/editor-collection.d.ts +19 -0
  296. package/types/modules/toolbar/factory.d.ts +11 -0
  297. package/types/modules/uploader/config.d.ts +6 -0
  298. package/types/modules/uploader/helpers/build-data.d.ts +3 -0
  299. package/types/modules/uploader/helpers/data-uri-to-blob.d.ts +6 -0
  300. package/types/modules/uploader/helpers/index.d.ts +3 -0
  301. package/types/modules/uploader/helpers/process-old-browser-drag.d.ts +3 -0
  302. package/types/modules/uploader/helpers/send-files.d.ts +6 -0
  303. package/types/modules/uploader/helpers/send.d.ts +3 -0
  304. package/types/modules/uploader/uploader.d.ts +35 -0
  305. package/types/modules/widget/color-picker/color-picker.d.ts +22 -0
  306. package/types/modules/widget/file-selector/file-selector.d.ts +41 -0
  307. package/types/modules/widget/index.d.ts +5 -0
  308. package/types/modules/widget/tabs/tabs.d.ts +22 -0
  309. package/types/plugins/about/about.d.ts +5 -0
  310. package/types/plugins/add-new-line/add-new-line.d.ts +9 -0
  311. package/types/plugins/add-new-line/config.d.ts +22 -0
  312. package/types/plugins/backspace/backspace.d.ts +11 -0
  313. package/types/plugins/backspace/cases/check-join-neighbors.d.ts +7 -0
  314. package/types/plugins/backspace/cases/check-join-two-lists.d.ts +16 -0
  315. package/types/plugins/backspace/cases/check-not-collapsed.d.ts +16 -0
  316. package/types/plugins/backspace/cases/check-remove-char.d.ts +16 -0
  317. package/types/plugins/backspace/cases/check-remove-content-not-editable.d.ts +7 -0
  318. package/types/plugins/backspace/cases/check-remove-empty-neighbor.d.ts +16 -0
  319. package/types/plugins/backspace/cases/check-remove-empty-parent.d.ts +17 -0
  320. package/types/plugins/backspace/cases/check-remove-unbreakable-element.d.ts +17 -0
  321. package/types/plugins/backspace/cases/check-table-cell.d.ts +17 -0
  322. package/types/plugins/backspace/cases/check-unwrap-first-list-item.d.ts +17 -0
  323. package/types/plugins/backspace/cases/index.d.ts +3 -0
  324. package/types/plugins/backspace/helpers.d.ts +11 -0
  325. package/types/plugins/backspace/interface.d.ts +27 -0
  326. package/types/plugins/bold/bold.d.ts +8 -0
  327. package/types/plugins/bold/interface.d.ts +18 -0
  328. package/types/plugins/class-span/class-span.d.ts +27 -0
  329. package/types/plugins/clean-html/clean-html.d.ts +17 -0
  330. package/types/plugins/clean-html/config.d.ts +73 -0
  331. package/types/plugins/clean-html/helpers/get-hash.d.ts +6 -0
  332. package/types/plugins/clean-html/helpers/index.d.ts +3 -0
  333. package/types/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.d.ts +11 -0
  334. package/types/plugins/clean-html/helpers/remove-format/remove-format-for-selection.d.ts +7 -0
  335. package/types/plugins/clean-html/helpers/visitor/filters/allow-attributes.d.ts +6 -0
  336. package/types/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.d.ts +6 -0
  337. package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +6 -0
  338. package/types/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.d.ts +6 -0
  339. package/types/plugins/clean-html/helpers/visitor/filters/remove-inv-text-nodes.d.ts +6 -0
  340. package/types/plugins/clean-html/helpers/visitor/filters/replace-old-tags.d.ts +6 -0
  341. package/types/plugins/clean-html/helpers/visitor/filters/sanitize-attributes.d.ts +6 -0
  342. package/types/plugins/clean-html/helpers/visitor/filters/try-remove-node.d.ts +6 -0
  343. package/types/plugins/clean-html/helpers/visitor/visit-node-walker.d.ts +6 -0
  344. package/types/plugins/clipboard/clipboard.d.ts +10 -0
  345. package/types/plugins/color/color.d.ts +8 -0
  346. package/types/plugins/copy-format/copy-format.d.ts +5 -0
  347. package/types/plugins/debug/debug.d.ts +5 -0
  348. package/types/plugins/delete/delete.d.ts +14 -0
  349. package/types/plugins/delete/interface.d.ts +3 -0
  350. package/types/plugins/drag-and-drop/drag-and-drop.d.ts +5 -0
  351. package/types/plugins/drag-and-drop-element/config.d.ts +3 -0
  352. package/types/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +26 -0
  353. package/types/plugins/dtd/after-insert/index.d.ts +4 -0
  354. package/types/plugins/dtd/after-insert/remove-extra-br.d.ts +9 -0
  355. package/types/plugins/dtd/before-insert/check-block-nesting.d.ts +9 -0
  356. package/types/plugins/dtd/before-insert/index.d.ts +4 -0
  357. package/types/plugins/dtd/config.d.ts +12 -0
  358. package/types/plugins/enter/enter.d.ts +11 -0
  359. package/types/plugins/enter/helpers/check-br.d.ts +7 -0
  360. package/types/plugins/enter/helpers/check-unsplittable-box.d.ts +7 -0
  361. package/types/plugins/enter/helpers/get-block-wrapper.d.ts +7 -0
  362. package/types/plugins/enter/helpers/has-previous-block.d.ts +6 -0
  363. package/types/plugins/enter/helpers/index.d.ts +3 -0
  364. package/types/plugins/enter/helpers/insert-paragraph.d.ts +7 -0
  365. package/types/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +7 -0
  366. package/types/plugins/enter/helpers/process-empty-li-leaf.d.ts +7 -0
  367. package/types/plugins/enter/helpers/split-fragment.d.ts +8 -0
  368. package/types/plugins/enter/helpers/wrap-text.d.ts +8 -0
  369. package/types/plugins/enter/interface.d.ts +20 -0
  370. package/types/plugins/file/file.d.ts +5 -0
  371. package/types/plugins/focus/focus.d.ts +5 -0
  372. package/types/plugins/font/font.d.ts +8 -0
  373. package/types/plugins/format-block/format-block.d.ts +8 -0
  374. package/types/plugins/fullsize/config.d.ts +22 -0
  375. package/types/plugins/fullsize/fullsize.d.ts +8 -0
  376. package/types/plugins/hotkeys/config.d.ts +3 -0
  377. package/types/plugins/hotkeys/hotkeys.d.ts +10 -0
  378. package/types/plugins/hr/hr.d.ts +5 -0
  379. package/types/plugins/iframe/config.d.ts +49 -0
  380. package/types/plugins/iframe/iframe.d.ts +9 -0
  381. package/types/plugins/image/image.d.ts +5 -0
  382. package/types/plugins/image-processor/config.d.ts +3 -0
  383. package/types/plugins/image-processor/image-processor.d.ts +8 -0
  384. package/types/plugins/image-properties/config.d.ts +60 -0
  385. package/types/plugins/image-properties/image-properties.d.ts +42 -0
  386. package/types/plugins/image-properties/templates/form.d.ts +3 -0
  387. package/types/plugins/image-properties/templates/main-tab.d.ts +3 -0
  388. package/types/plugins/image-properties/templates/position-tab.d.ts +3 -0
  389. package/types/plugins/indent/config.d.ts +3 -0
  390. package/types/plugins/indent/helpers.d.ts +4 -0
  391. package/types/plugins/indent/indent.d.ts +8 -0
  392. package/types/plugins/index.d.ts +5 -0
  393. package/types/plugins/inline-popup/config/config.d.ts +3 -0
  394. package/types/plugins/inline-popup/config/items/a.d.ts +3 -0
  395. package/types/plugins/inline-popup/config/items/cells.d.ts +3 -0
  396. package/types/plugins/inline-popup/config/items/iframe.d.ts +3 -0
  397. package/types/plugins/inline-popup/config/items/img.d.ts +3 -0
  398. package/types/plugins/inline-popup/config/items/toolbar.d.ts +3 -0
  399. package/types/plugins/inline-popup/inline-popup.d.ts +36 -0
  400. package/types/plugins/justify/justify.d.ts +8 -0
  401. package/types/plugins/key-arrow-outside/key-arrow-outside.d.ts +8 -0
  402. package/types/plugins/limit/config.d.ts +9 -0
  403. package/types/plugins/limit/limit.d.ts +22 -0
  404. package/types/plugins/line-height/config.d.ts +9 -0
  405. package/types/plugins/line-height/line-height.d.ts +5 -0
  406. package/types/plugins/link/config.d.ts +33 -0
  407. package/types/plugins/link/link.d.ts +11 -0
  408. package/types/plugins/link/template.d.ts +3 -0
  409. package/types/plugins/media/config.d.ts +9 -0
  410. package/types/plugins/media/media.d.ts +8 -0
  411. package/types/plugins/mobile/config.d.ts +6 -0
  412. package/types/plugins/mobile/mobile.d.ts +8 -0
  413. package/types/plugins/ordered-list/ordered-list.d.ts +8 -0
  414. package/types/plugins/paste/config.d.ts +19 -0
  415. package/types/plugins/paste/helpers.d.ts +15 -0
  416. package/types/plugins/paste/interface.d.ts +15 -0
  417. package/types/plugins/paste/paste.d.ts +31 -0
  418. package/types/plugins/paste-from-word/config.d.ts +21 -0
  419. package/types/plugins/paste-from-word/paste-from-word.d.ts +11 -0
  420. package/types/plugins/paste-storage/paste-storage.d.ts +8 -0
  421. package/types/plugins/placeholder/config.d.ts +31 -0
  422. package/types/plugins/placeholder/placeholder.d.ts +12 -0
  423. package/types/plugins/powered-by-jodit/powered-by-jodit.d.ts +8 -0
  424. package/types/plugins/preview/preview.d.ts +5 -0
  425. package/types/plugins/print/lib/generate-critical-css.d.ts +6 -0
  426. package/types/plugins/print/print.d.ts +5 -0
  427. package/types/plugins/redo-undo/redo-undo.d.ts +9 -0
  428. package/types/plugins/resize-cells/resize-cells.d.ts +42 -0
  429. package/types/plugins/resize-handler/resize-handler.d.ts +26 -0
  430. package/types/plugins/resizer/config.d.ts +31 -0
  431. package/types/plugins/resizer/resizer.d.ts +22 -0
  432. package/types/plugins/search/config.d.ts +21 -0
  433. package/types/plugins/search/helpers/index.d.ts +3 -0
  434. package/types/plugins/search/helpers/sentence-finder.d.ts +3 -0
  435. package/types/plugins/search/helpers/wrap-ranges-texts-in-tmp-span.d.ts +18 -0
  436. package/types/plugins/search/interface.d.ts +23 -0
  437. package/types/plugins/search/search.d.ts +22 -0
  438. package/types/plugins/search/ui/search.d.ts +6 -0
  439. package/types/plugins/select/config.d.ts +8 -0
  440. package/types/plugins/select/select.d.ts +19 -0
  441. package/types/plugins/select-cells/select-cells.d.ts +34 -0
  442. package/types/plugins/size/size.d.ts +27 -0
  443. package/types/plugins/source/config.d.ts +25 -0
  444. package/types/plugins/source/editor/engines/ace.d.ts +6 -0
  445. package/types/plugins/source/editor/engines/area.d.ts +3 -0
  446. package/types/plugins/source/editor/engines/index.d.ts +3 -0
  447. package/types/plugins/source/editor/factory.d.ts +3 -0
  448. package/types/plugins/source/editor/sourceEditor.d.ts +6 -0
  449. package/types/plugins/source/source.d.ts +17 -0
  450. package/types/plugins/speech-recognize/config.d.ts +41 -0
  451. package/types/plugins/speech-recognize/constants.d.ts +4 -0
  452. package/types/plugins/speech-recognize/helpers/api.d.ts +3 -0
  453. package/types/plugins/speech-recognize/helpers/exec-spell-command.d.ts +3 -0
  454. package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -0
  455. package/types/plugins/speech-recognize/helpers/sound.d.ts +3 -0
  456. package/types/plugins/speech-recognize/interface.d.ts +12 -0
  457. package/types/plugins/speech-recognize/speech-recognize.d.ts +5 -0
  458. package/types/plugins/spellcheck/config.d.ts +4 -0
  459. package/types/plugins/spellcheck/spellcheck.d.ts +5 -0
  460. package/types/plugins/stat/stat.d.ts +5 -0
  461. package/types/plugins/sticky/config.d.ts +19 -0
  462. package/types/plugins/sticky/sticky.d.ts +18 -0
  463. package/types/plugins/symbols/symbols.d.ts +11 -0
  464. package/types/plugins/tab/cases/index.d.ts +3 -0
  465. package/types/plugins/tab/cases/on-tab-inside-li.d.ts +8 -0
  466. package/types/plugins/tab/config.d.ts +3 -0
  467. package/types/plugins/table/table.d.ts +5 -0
  468. package/types/plugins/table-keyboard-navigation/table-keyboard-navigation.d.ts +8 -0
  469. package/types/plugins/wrap-nodes/config.d.ts +13 -0
  470. package/types/plugins/xpath/xpath.d.ts +5 -0
  471. package/types/styles/icons/index.d.ts +5 -0
  472. package/types/tsconfig.json +3 -21
  473. package/esm/plugins/source/editor/engines/custom.js +0 -34
  474. package/esm/plugins/speech-recognize/config.js +0 -92
  475. package/esm/plugins/speech-recognize/constants.js +0 -11
  476. package/esm/plugins/speech-recognize/helpers/api.js +0 -7
  477. package/esm/plugins/speech-recognize/helpers/exec-spell-command.js +0 -9
  478. package/esm/plugins/speech-recognize/helpers/recognize-manager.js +0 -168
  479. package/esm/plugins/speech-recognize/helpers/sound.js +0 -30
  480. package/esm/plugins/speech-recognize/interface.js +0 -6
  481. package/esm/plugins/speech-recognize/langs/ar.js +0 -14
  482. package/esm/plugins/speech-recognize/langs/cs_cz.js +0 -14
  483. package/esm/plugins/speech-recognize/langs/de.js +0 -14
  484. package/esm/plugins/speech-recognize/langs/es.js +0 -14
  485. package/esm/plugins/speech-recognize/langs/fa.js +0 -14
  486. package/esm/plugins/speech-recognize/langs/fr.js +0 -14
  487. package/esm/plugins/speech-recognize/langs/he.js +0 -14
  488. package/esm/plugins/speech-recognize/langs/hu.js +0 -14
  489. package/esm/plugins/speech-recognize/langs/id.js +0 -14
  490. package/esm/plugins/speech-recognize/langs/index.js +0 -26
  491. package/esm/plugins/speech-recognize/langs/it.js +0 -14
  492. package/esm/plugins/speech-recognize/langs/ja.js +0 -14
  493. package/esm/plugins/speech-recognize/langs/ko.js +0 -14
  494. package/esm/plugins/speech-recognize/langs/mn.js +0 -14
  495. package/esm/plugins/speech-recognize/langs/nl.js +0 -14
  496. package/esm/plugins/speech-recognize/langs/pl.js +0 -14
  497. package/esm/plugins/speech-recognize/langs/pt_br.js +0 -14
  498. package/esm/plugins/speech-recognize/langs/ru.js +0 -14
  499. package/esm/plugins/speech-recognize/langs/tr.js +0 -14
  500. package/esm/plugins/speech-recognize/langs/zh_cn.js +0 -14
  501. package/esm/plugins/speech-recognize/langs/zh_tw.js +0 -14
  502. package/esm/plugins/speech-recognize/speech-recognize.js +0 -115
  503. package/esm/polyfills.js +0 -54
  504. package/types/plugins/source/editor/engines/custom.d.ts +0 -24
  505. package/types/polyfills.d.ts +0 -10
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.0.0-beta.41
4
+ * Version: v4.0.0-beta.48
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -18,974 +18,1010 @@
18
18
  })(self, function() {
19
19
  return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[781],{
20
20
 
21
- /***/ 42714:
22
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
21
+ /***/ 57998:
22
+ /***/ (function(module) {
23
23
 
24
24
  "use strict";
25
- // ESM COMPAT FLAG
26
- __webpack_require__.r(__webpack_exports__);
27
25
 
28
- // EXPORTS
29
- __webpack_require__.d(__webpack_exports__, {
30
- "SpeechRecognizeNative": function() { return /* binding */ SpeechRecognizeNative; }
31
- });
26
+ /*!
27
+ * Jodit Editor (https://xdsoft.net/jodit/)
28
+ * Released under MIT see LICENSE.txt in the project root for license information.
29
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
30
+ */
31
+ module.exports = {
32
+ newline: 'الخط الجديد',
33
+ delete: 'حذف',
34
+ space: 'الفضاء',
35
+ 'Speech Recognize': 'التعرف على الكلام',
36
+ Sound: 'الصوت',
37
+ 'Interim Results': 'النتائج المؤقتة'
38
+ };
32
39
 
33
- // NAMESPACE OBJECT: ./src/plugins/speech-recognize/langs/index.ts
34
- var langs_namespaceObject = {};
35
- __webpack_require__.r(langs_namespaceObject);
36
- __webpack_require__.d(langs_namespaceObject, {
37
- "ar": function() { return ar; },
38
- "cs_cz": function() { return cs_cz; },
39
- "de": function() { return de; },
40
- "es": function() { return es; },
41
- "fa": function() { return fa; },
42
- "fr": function() { return fr; },
43
- "he": function() { return he; },
44
- "hu": function() { return hu; },
45
- "id": function() { return id; },
46
- "it": function() { return it; },
47
- "ja": function() { return ja; },
48
- "ko": function() { return ko; },
49
- "mn": function() { return mn; },
50
- "nl": function() { return nl; },
51
- "pl": function() { return pl; },
52
- "pt_br": function() { return pt_br; },
53
- "ru": function() { return ru; },
54
- "tr": function() { return tr; },
55
- "zh_cn": function() { return zh_cn; },
56
- "zh_tw": function() { return zh_tw; }
57
- });
58
40
 
59
- // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
60
- var tslib_es6 = __webpack_require__(20255);
61
- // EXTERNAL MODULE: ./src/core/plugin/index.ts
62
- var core_plugin = __webpack_require__(57549);
63
- // EXTERNAL MODULE: ./src/core/decorators/watch/watch.ts
64
- var watch = __webpack_require__(46163);
65
- // EXTERNAL MODULE: ./src/core/helpers/utils/utils.ts
66
- var utils = __webpack_require__(67309);
67
- // EXTERNAL MODULE: ./src/core/global.ts
68
- var global = __webpack_require__(17332);
69
- // EXTERNAL MODULE: ./src/core/dom/dom.ts
70
- var dom = __webpack_require__(24263);
71
- // EXTERNAL MODULE: ./src/core/decorators/debounce/debounce.ts
72
- var debounce = __webpack_require__(55773);
73
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/exec-spell-command.ts
41
+ /***/ }),
42
+
43
+ /***/ 90833:
44
+ /***/ (function(module) {
45
+
46
+ "use strict";
47
+
74
48
  /*!
75
49
  * Jodit Editor (https://xdsoft.net/jodit/)
76
50
  * Released under MIT see LICENSE.txt in the project root for license information.
77
51
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
78
52
  */
79
- function execSpellCommand(jodit, commandSentence) {
80
- const [command, value] = commandSentence.split('::');
81
- jodit.execCommand(command, null, value);
82
- }
53
+ module.exports = {
54
+ newline: 'řádek',
55
+ delete: 'odstranit',
56
+ space: 'prostora',
57
+ 'Speech Recognize': 'Rozpoznání Řeči',
58
+ Sound: 'Zvuk',
59
+ 'Interim Results': 'Průběžné Výsledky'
60
+ };
61
+
62
+
63
+ /***/ }),
64
+
65
+ /***/ 36373:
66
+ /***/ (function(module) {
67
+
68
+ "use strict";
83
69
 
84
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ar.js
85
- var ar = __webpack_require__(5466);
86
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/cs_cz.js
87
- var cs_cz = __webpack_require__(65226);
88
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/de.js
89
- var de = __webpack_require__(87541);
90
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/es.js
91
- var es = __webpack_require__(87104);
92
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/fa.js
93
- var fa = __webpack_require__(53808);
94
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/fr.js
95
- var fr = __webpack_require__(48954);
96
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/he.js
97
- var he = __webpack_require__(14694);
98
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/hu.js
99
- var hu = __webpack_require__(67381);
100
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/id.js
101
- var id = __webpack_require__(99549);
102
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/it.js
103
- var it = __webpack_require__(28428);
104
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ja.js
105
- var ja = __webpack_require__(25363);
106
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ko.js
107
- var ko = __webpack_require__(96929);
108
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/mn.js
109
- var mn = __webpack_require__(26781);
110
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/nl.js
111
- var nl = __webpack_require__(58499);
112
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/pl.js
113
- var pl = __webpack_require__(59430);
114
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/pt_br.js
115
- var pt_br = __webpack_require__(70297);
116
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ru.js
117
- var ru = __webpack_require__(98949);
118
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/tr.js
119
- var tr = __webpack_require__(61232);
120
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/zh_cn.js
121
- var zh_cn = __webpack_require__(56775);
122
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/zh_tw.js
123
- var zh_tw = __webpack_require__(97957);
124
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/langs/index.ts
125
70
  /*!
126
71
  * Jodit Editor (https://xdsoft.net/jodit/)
127
72
  * Released under MIT see LICENSE.txt in the project root for license information.
128
73
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
129
74
  */
75
+ module.exports = {
76
+ newline: 'Zeilenumbruch',
77
+ delete: 'löschen',
78
+ space: 'Raum',
79
+ 'Speech Recognize': 'Sprache Erkennen',
80
+ Sound: 'Sound',
81
+ 'Interim Results': 'Zwischenergebnis'
82
+ };
83
+
84
+
85
+ /***/ }),
86
+
87
+ /***/ 97192:
88
+ /***/ (function(module) {
130
89
 
90
+ "use strict";
131
91
 
92
+ /*!
93
+ * Jodit Editor (https://xdsoft.net/jodit/)
94
+ * Released under MIT see LICENSE.txt in the project root for license information.
95
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
96
+ */
97
+ module.exports = {
98
+ newline: 'nueva línea',
99
+ delete: 'eliminar',
100
+ space: 'espacio',
101
+ 'Speech Recognize': 'Reconocimiento de Voz',
102
+ Sound: 'Sonido',
103
+ 'Interim Results': 'Resultados Provisionales'
104
+ };
132
105
 
133
106
 
107
+ /***/ }),
134
108
 
109
+ /***/ 6043:
110
+ /***/ (function(module) {
135
111
 
112
+ "use strict";
136
113
 
114
+ /*!
115
+ * Jodit Editor (https://xdsoft.net/jodit/)
116
+ * Released under MIT see LICENSE.txt in the project root for license information.
117
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
118
+ */
119
+ module.exports = {
120
+ newline: 'خط جدید',
121
+ delete: 'حذف',
122
+ space: 'فضا',
123
+ 'Speech Recognize': 'گفتار را تشخیص دهید',
124
+ Sound: 'صدا',
125
+ 'Interim Results': 'نتایج موقت'
126
+ };
137
127
 
138
128
 
129
+ /***/ }),
139
130
 
131
+ /***/ 76305:
132
+ /***/ (function(module) {
140
133
 
134
+ "use strict";
141
135
 
136
+ /*!
137
+ * Jodit Editor (https://xdsoft.net/jodit/)
138
+ * Released under MIT see LICENSE.txt in the project root for license information.
139
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
140
+ */
141
+ module.exports = {
142
+ newline: 'nouvelle ligne',
143
+ delete: 'supprimer',
144
+ space: 'espace',
145
+ 'Speech Recognize': 'Reconnaissance Vocale',
146
+ Sound: 'Son',
147
+ 'Interim Results': 'Résultats Intermédiaires'
148
+ };
142
149
 
143
150
 
151
+ /***/ }),
144
152
 
153
+ /***/ 45834:
154
+ /***/ (function(module) {
145
155
 
156
+ "use strict";
146
157
 
158
+ /*!
159
+ * Jodit Editor (https://xdsoft.net/jodit/)
160
+ * Released under MIT see LICENSE.txt in the project root for license information.
161
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
162
+ */
163
+ module.exports = {
164
+ newline: 'חדשות',
165
+ delete: 'מחק',
166
+ space: 'שטח',
167
+ 'Speech Recognize': 'דיבור מזהה',
168
+ Sound: 'קול',
169
+ 'Interim Results': 'תוצאות ביניים'
170
+ };
147
171
 
148
172
 
173
+ /***/ }),
149
174
 
175
+ /***/ 40509:
176
+ /***/ (function(module) {
150
177
 
178
+ "use strict";
151
179
 
152
- // EXTERNAL MODULE: ./src/config.ts
153
- var config = __webpack_require__(93166);
154
- // EXTERNAL MODULE: ./src/core/helpers/utils/data-bind.ts
155
- var data_bind = __webpack_require__(63122);
156
- // EXTERNAL MODULE: ./src/core/helpers/checker/is-boolean.ts
157
- var is_boolean = __webpack_require__(67749);
158
- // EXTERNAL MODULE: ./src/core/ui/icon.ts
159
- var icon = __webpack_require__(77904);
160
- // EXTERNAL MODULE: ./src/core/event-emitter/eventify.ts
161
- var eventify = __webpack_require__(73852);
162
- // EXTERNAL MODULE: ./src/core/decorators/index.ts + 7 modules
163
- var decorators = __webpack_require__(68574);
164
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/constants.ts
165
180
  /*!
166
181
  * Jodit Editor (https://xdsoft.net/jodit/)
167
182
  * Released under MIT see LICENSE.txt in the project root for license information.
168
183
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
169
184
  */
170
- const PII = 440;
171
- const WARN = 940;
185
+ module.exports = {
186
+ newline: 'újsor',
187
+ delete: 'törlés',
188
+ space: 'tér',
189
+ 'Speech Recognize': 'A Beszéd Felismeri',
190
+ Sound: 'Hang',
191
+ 'Interim Results': 'Időközi Eredmények'
192
+ };
193
+
194
+
195
+ /***/ }),
196
+
197
+ /***/ 75720:
198
+ /***/ (function(module) {
199
+
200
+ "use strict";
172
201
 
173
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/sound.ts
174
202
  /*!
175
203
  * Jodit Editor (https://xdsoft.net/jodit/)
176
204
  * Released under MIT see LICENSE.txt in the project root for license information.
177
205
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
178
206
  */
207
+ module.exports = {
208
+ newline: 'newline',
209
+ delete: 'Hapus',
210
+ space: 'ruang',
211
+ 'Speech Recognize': 'Pidato Mengenali',
212
+ Sound: 'Suara',
213
+ 'Interim Results': 'Hasil Sementara'
214
+ };
179
215
 
180
- function sound({ sec = 0.1, frequency = PII, gain = 0.1, type = 'sine' } = {}) {
181
- if (typeof window.AudioContext === 'undefined' &&
182
- typeof window.webkitAudioContext === 'undefined') {
183
- return;
184
- }
185
- const context = new (window.AudioContext ||
186
- window.webkitAudioContext)();
187
- const vol = context.createGain();
188
- const osc = context.createOscillator();
189
- osc.type = type;
190
- osc.frequency.value = frequency;
191
- osc.connect(vol);
192
- vol.connect(context.destination);
193
- osc.start();
194
- osc.stop(context.currentTime + sec);
195
- vol.gain.value = gain;
196
- }
197
216
 
198
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/recognize-manager.ts
217
+ /***/ }),
218
+
219
+ /***/ 88369:
220
+ /***/ (function(module) {
221
+
222
+ "use strict";
223
+
199
224
  /*!
200
225
  * Jodit Editor (https://xdsoft.net/jodit/)
201
226
  * Released under MIT see LICENSE.txt in the project root for license information.
202
227
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
203
228
  */
204
- var RecognizeManager_1;
229
+ module.exports = {
230
+ newline: 'nuova riga',
231
+ delete: 'eliminare',
232
+ space: 'spazio',
233
+ 'Speech Recognize': 'Discorso Riconoscere',
234
+ Sound: 'Suono',
235
+ 'Interim Results': 'Risultati intermedi'
236
+ };
205
237
 
206
238
 
239
+ /***/ }),
207
240
 
241
+ /***/ 30878:
242
+ /***/ (function(module) {
208
243
 
244
+ "use strict";
209
245
 
210
- let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends eventify/* Eventify */.a {
211
- set lang(v) {
212
- this._lang = v;
213
- this._api.lang = v;
214
- }
215
- get lang() {
216
- return this._lang;
217
- }
218
- set continuous(v) {
219
- this._continuous = v;
220
- this._api.continuous = v;
221
- }
222
- get continuous() {
223
- return this._continuous;
224
- }
225
- set interimResults(v) {
226
- this._interimResults = v;
227
- this._api.interimResults = v;
228
- }
229
- get interimResults() {
230
- return this._interimResults;
231
- }
232
- constructor(async, api) {
233
- super();
234
- this.async = async;
235
- this._continuous = false;
236
- this._interimResults = false;
237
- this.sound = true;
238
- this._isEnabled = false;
239
- this._restartTimeout = 0;
240
- this._onSpeechStart = (e) => {
241
- if (!this._isEnabled) {
242
- return;
243
- }
244
- this.async.clearTimeout(this._restartTimeout);
245
- this._restartTimeout = this.async.setTimeout(() => {
246
- this.restart();
247
- this.emit('pulse', false);
248
- this._makeSound(WARN);
249
- }, 5000);
250
- this.emit('pulse', true);
251
- };
252
- this._progressTimeout = 0;
253
- this._api = api;
254
- RecognizeManager_1._instances.add(this);
255
- }
256
- destruct() {
257
- this.stop();
258
- RecognizeManager_1._instances.delete(this);
259
- super.destruct();
260
- }
261
- get isEnabled() {
262
- return this._isEnabled;
263
- }
264
- start() {
265
- if (this._isEnabled) {
266
- return;
267
- }
268
- this._isEnabled = true;
269
- RecognizeManager_1._instances.forEach(instance => {
270
- if (instance !== this) {
271
- instance.stop();
272
- }
273
- });
274
- this._api.start();
275
- this.__on('speechstart', this._onSpeechStart)
276
- .__on('error', this._onError)
277
- .__on('result', this._onResult);
278
- }
279
- stop() {
280
- if (!this._isEnabled) {
281
- return;
282
- }
283
- try {
284
- this._api.abort();
285
- this._api.stop();
286
- }
287
- catch (_a) { }
288
- this.__off('speechstart', this._onSpeechStart)
289
- .__off('error', this._onError)
290
- .__off('result', this._onResult);
291
- this.async.clearTimeout(this._restartTimeout);
292
- this._isEnabled = false;
293
- this.emit('pulse', false);
294
- }
295
- toggle() {
296
- if (!this._isEnabled) {
297
- this.start();
298
- }
299
- else {
300
- this.stop();
301
- }
302
- }
303
- restart() {
304
- this.stop();
305
- this.start();
306
- }
307
- __on(event, callback) {
308
- this._api.addEventListener(event, callback);
309
- return this;
310
- }
311
- __off(event, callback) {
312
- this._api.removeEventListener(event, callback);
313
- return this;
314
- }
315
- _onResult(e) {
316
- if (!this._isEnabled) {
317
- return;
318
- }
319
- this.async.clearTimeout(this._progressTimeout);
320
- const resultItem = e.results.item(e.resultIndex);
321
- const { transcript } = resultItem.item(0);
322
- const resultHandler = () => {
323
- try {
324
- this.async.clearTimeout(this._restartTimeout);
325
- this.emit('result', transcript);
326
- }
327
- catch (_a) { }
328
- this.restart();
329
- this.emit('pulse', false);
330
- this._makeSound(PII);
331
- };
332
- if (resultItem.isFinal === false) {
333
- this.emit('progress', transcript);
334
- this._progressTimeout = this.async.setTimeout(resultHandler, 500);
335
- return;
336
- }
337
- resultHandler();
338
- }
339
- _onError() {
340
- if (!this._isEnabled) {
341
- return;
342
- }
343
- this._makeSound(WARN);
344
- this.emit('pulse', false);
345
- this.restart();
346
- }
347
- _makeSound(frequency) {
348
- if (this.sound) {
349
- sound({ frequency });
350
- }
351
- }
246
+ /*!
247
+ * Jodit Editor (https://xdsoft.net/jodit/)
248
+ * Released under MIT see LICENSE.txt in the project root for license information.
249
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
250
+ */
251
+ module.exports = {
252
+ newline: '改行',
253
+ delete: '削除',
254
+ space: 'スペース',
255
+ 'Speech Recognize': '音声認識',
256
+ Sound: '音',
257
+ 'Interim Results': '中間結果'
352
258
  };
353
- RecognizeManager._instances = new Set();
354
- RecognizeManager = RecognizeManager_1 = (0,tslib_es6/* __decorate */.gn)([
355
- decorators.autobind
356
- ], RecognizeManager);
357
259
 
358
260
 
359
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/api.ts
261
+ /***/ }),
262
+
263
+ /***/ 37780:
264
+ /***/ (function(module) {
265
+
266
+ "use strict";
267
+
360
268
  /*!
361
269
  * Jodit Editor (https://xdsoft.net/jodit/)
362
270
  * Released under MIT see LICENSE.txt in the project root for license information.
363
271
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
364
272
  */
365
- const SpeechRecognition = window.SpeechRecognition ||
366
- window.webkitSpeechRecognition;
273
+ module.exports = {
274
+ newline: '줄 바꿈',
275
+ delete: '삭제',
276
+ space: '공간',
277
+ 'Speech Recognize': '음성 인식',
278
+ Sound: '소리',
279
+ 'Interim Results': '중간 결과'
280
+ };
281
+
282
+
283
+ /***/ }),
284
+
285
+ /***/ 4105:
286
+ /***/ (function(module) {
287
+
288
+ "use strict";
367
289
 
368
- // EXTERNAL MODULE: ./src/plugins/speech-recognize/speech-recognize.svg
369
- var speech_recognize = __webpack_require__(55106);
370
- var speech_recognize_default = /*#__PURE__*/__webpack_require__.n(speech_recognize);
371
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/config.ts
372
290
  /*!
373
291
  * Jodit Editor (https://xdsoft.net/jodit/)
374
292
  * Released under MIT see LICENSE.txt in the project root for license information.
375
293
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
376
294
  */
295
+ module.exports = {
296
+ newline: 'Шинэ мөр',
297
+ delete: 'Устгах',
298
+ space: 'Зай',
299
+ 'Speech Recognize': 'Дуу хоолой таних',
300
+ Sound: 'Дуу',
301
+ 'Interim Results': 'Түр зуурын үр дүн'
302
+ };
377
303
 
378
304
 
305
+ /***/ }),
379
306
 
307
+ /***/ 2589:
308
+ /***/ (function(module) {
380
309
 
310
+ "use strict";
381
311
 
312
+ /*!
313
+ * Jodit Editor (https://xdsoft.net/jodit/)
314
+ * Released under MIT see LICENSE.txt in the project root for license information.
315
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
316
+ */
317
+ module.exports = {
318
+ newline: 'regel',
319
+ delete: 'verwijderen',
320
+ space: 'ruimte',
321
+ 'Speech Recognize': 'Spraak Herkennen',
322
+ Sound: 'Geluid',
323
+ 'Interim Results': 'Tussentijdse Resultaten'
324
+ };
382
325
 
383
326
 
384
- config/* Config.prototype.speechRecognize */.D.prototype.speechRecognize = {
385
- api: SpeechRecognition,
386
- sound: true,
387
- continuous: true,
388
- interimResults: true,
389
- commands: {
390
- 'newline|enter': 'enter',
391
- 'delete|remove word|delete word': 'backspaceWordButton',
392
- comma: 'inserthtml::,',
393
- underline: 'inserthtml::_',
394
- hyphen: 'inserthtml::-',
395
- space: 'inserthtml:: ',
396
- question: 'inserthtml::?',
397
- dot: 'inserthtml::.',
398
- 'quote|quotes|open quote': "inserthtml::'",
399
- 'header|header h1': 'formatblock::h1',
400
- 'select all': 'selectall'
401
- }
402
- };
403
- icon/* Icon.set */.J.set('speech-recognize', (speech_recognize_default()));
404
- config/* Config.prototype.controls.speechRecognize */.D.prototype.controls.speechRecognize = {
405
- isActive(jodit, _) {
406
- const api = (0,data_bind/* dataBind */.q)(jodit, 'speech');
407
- return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
408
- },
409
- isDisabled(jodit) {
410
- return !jodit.o.speechRecognize.api;
411
- },
412
- exec(jodit, current, { button, control }) {
413
- const { api: Api, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
414
- if (!Api) {
415
- jodit.alert('Speech recognize API unsupported in your browser');
416
- return;
417
- }
418
- let api = (0,data_bind/* dataBind */.q)(jodit, 'speech');
419
- if (!api) {
420
- const nativeApi = new Api();
421
- api = new RecognizeManager(jodit.async, nativeApi);
422
- api.lang = lang;
423
- api.continuous = continuous;
424
- api.interimResults = interimResults;
425
- api.sound = sound;
426
- (0,data_bind/* dataBind */.q)(jodit, 'speech', api);
427
- api.on('pulse', (enable) => {
428
- button.setMod('pulse', enable);
429
- });
430
- api.on('result', (text) => jodit.e.fire('speechRecognizeResult', text));
431
- api.on('progress', (text) => jodit.e.fire('speechRecognizeProgressResult', text));
432
- button.hookStatus('beforeDestruct', () => {
433
- api.destruct();
434
- });
435
- }
436
- if (control.args) {
437
- const key = control.args[0];
438
- if ((0,is_boolean/* isBoolean */.j)(api[key])) {
439
- api[key] = !api[key];
440
- if (api.isEnabled) {
441
- api.restart();
442
- }
443
- return;
444
- }
445
- }
446
- api.toggle();
447
- button.state.activated = api.isEnabled;
448
- },
449
- name: 'speechRecognize',
450
- command: 'toggleSpeechRecognize',
451
- tooltip: 'Speech Recognize',
452
- list: {
453
- sound: 'Sound',
454
- interimResults: 'Interim Results'
455
- },
456
- childTemplate(jodit, key, value) {
457
- var _a;
458
- const api = (0,data_bind/* dataBind */.q)(jodit, 'speech'), checked = (_a = api === null || api === void 0 ? void 0 : api[key]) !== null && _a !== void 0 ? _a : jodit.o.speechRecognize[key];
459
- return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'>&nbsp;${value}</span>`;
460
- },
461
- mods: {
462
- stroke: false
463
- }
464
- };
327
+ /***/ }),
328
+
329
+ /***/ 72556:
330
+ /***/ (function(module) {
331
+
332
+ "use strict";
465
333
 
466
- ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/speech-recognize.ts
467
334
  /*!
468
335
  * Jodit Editor (https://xdsoft.net/jodit/)
469
336
  * Released under MIT see LICENSE.txt in the project root for license information.
470
337
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
471
338
  */
339
+ module.exports = {
340
+ newline: 'newline',
341
+ delete: 'usunąć',
342
+ space: 'przestrzeń',
343
+ 'Speech Recognize': 'Rozpoznawanie Mowy',
344
+ Sound: 'Dźwięk',
345
+ 'Interim Results': 'Wyniki Okresowe'
346
+ };
472
347
 
473
348
 
349
+ /***/ }),
474
350
 
351
+ /***/ 11695:
352
+ /***/ (function(module) {
475
353
 
354
+ "use strict";
476
355
 
356
+ /*!
357
+ * Jodit Editor (https://xdsoft.net/jodit/)
358
+ * Released under MIT see LICENSE.txt in the project root for license information.
359
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
360
+ */
361
+ module.exports = {
362
+ newline: 'linha',
363
+ delete: 'excluir',
364
+ space: 'espaco',
365
+ 'Speech Recognize': 'Discurso Reconhecer',
366
+ Sound: 'Som',
367
+ 'Interim Results': 'Resultados Provisórios'
368
+ };
477
369
 
478
370
 
371
+ /***/ }),
479
372
 
373
+ /***/ 52415:
374
+ /***/ (function(module) {
480
375
 
376
+ "use strict";
481
377
 
482
-
483
- class SpeechRecognizeNative extends core_plugin/* Plugin */.S {
484
- constructor(j) {
485
- super(j);
486
- this._commandToWord = {};
487
- if (j.o.speechRecognize.api) {
488
- j.registerButton({
489
- group: 'state',
490
- name: 'speechRecognize'
491
- });
492
- }
493
- }
494
- afterInit(jodit) {
495
- const { commands } = jodit.o.speechRecognize;
496
- if (commands) {
497
- (0,global/* extendLang */.xl)(langs_namespaceObject);
498
- (0,utils/* keys */.XP)(commands, false).forEach(words => {
499
- const keys = words.split('|');
500
- keys.forEach(key => {
501
- key = key.trim().toLowerCase();
502
- this._commandToWord[key] = commands[words];
503
- const translatedKeys = jodit.i18n(key);
504
- if (translatedKeys !== key) {
505
- translatedKeys.split('|').forEach(translatedKey => {
506
- this._commandToWord[translatedKey.trim().toLowerCase()] = commands[words].trim();
507
- });
508
- }
509
- });
510
- });
511
- }
512
- }
513
- beforeDestruct(jodit) { }
514
- onSpeechRecognizeProgressResult(text) {
515
- if (!this.messagePopup) {
516
- this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
517
- }
518
- this.j.workplace.appendChild(this.messagePopup);
519
- this.j.async.setTimeout(() => {
520
- dom/* Dom.safeRemove */.i.safeRemove(this.messagePopup);
521
- }, {
522
- label: 'onSpeechRecognizeProgressResult',
523
- timeout: 1000
524
- });
525
- this.messagePopup.innerText = text + '|';
526
- }
527
- onSpeechRecognizeResult(text) {
528
- const { j } = this, { s } = j;
529
- dom/* Dom.safeRemove */.i.safeRemove(this.messagePopup);
530
- if (!this._checkCommand(text)) {
531
- const { range } = s, node = s.current();
532
- if (s.isCollapsed() &&
533
- dom/* Dom.isText */.i.isText(node) &&
534
- dom/* Dom.isOrContains */.i.isOrContains(j.editor, node) &&
535
- node.nodeValue) {
536
- const sentence = node.nodeValue;
537
- node.nodeValue =
538
- sentence +
539
- (/[\u00A0 ]\uFEFF*$/.test(sentence) ? '' : ' ') +
540
- text;
541
- range.setStartAfter(node);
542
- s.selectRange(range);
543
- j.synchronizeValues();
544
- }
545
- else {
546
- s.insertHTML(text);
547
- }
548
- }
549
- }
550
- _checkCommand(command) {
551
- command = command.toLowerCase().replace(/\./g, '');
552
- if (this._commandToWord[command]) {
553
- execSpellCommand(this.j, this._commandToWord[command]);
554
- return true;
555
- }
556
- return false;
557
- }
558
- }
559
- (0,tslib_es6/* __decorate */.gn)([
560
- (0,watch/* watch */.YP)(':speechRecognizeProgressResult'),
561
- (0,debounce/* debounce */.D)()
562
- ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
563
- (0,tslib_es6/* __decorate */.gn)([
564
- (0,watch/* watch */.YP)(':speechRecognizeResult')
565
- ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
566
- if (typeof Jodit !== 'undefined') {
567
- Jodit.plugins.add('speech-recognize', SpeechRecognizeNative);
568
- }
378
+ /*!
379
+ * Jodit Editor (https://xdsoft.net/jodit/)
380
+ * Released under MIT see LICENSE.txt in the project root for license information.
381
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
382
+ */
383
+ module.exports = {
384
+ newline: 'новая строка|перенос|энтер',
385
+ delete: 'удалить',
386
+ space: 'пробел',
387
+ 'Speech Recognize': 'Распознавание речи',
388
+ Sound: 'Звук',
389
+ 'Interim Results': 'Промежуточные результаты'
390
+ };
569
391
 
570
392
 
571
393
  /***/ }),
572
394
 
573
- /***/ 5466:
395
+ /***/ 14569:
574
396
  /***/ (function(module) {
575
397
 
398
+ "use strict";
399
+
576
400
  /*!
577
401
  * Jodit Editor (https://xdsoft.net/jodit/)
578
402
  * Released under MIT see LICENSE.txt in the project root for license information.
579
403
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
580
404
  */
581
-
582
405
  module.exports = {
583
- newline: 'الخط الجديد',
584
- delete: 'حذف',
585
- space: 'الفضاء',
586
- 'Speech Recognize': 'التعرف على الكلام',
587
- Sound: 'الصوت',
588
- 'Interim Results': 'النتائج المؤقتة'
406
+ newline: 'yeni satır',
407
+ delete: 'silmek',
408
+ space: 'uzay',
409
+ 'Speech Recognize': 'Konuşma Tanıma',
410
+ Sound: 'Ses',
411
+ 'Interim Results': 'Ara Sonuçlar'
589
412
  };
590
413
 
591
414
 
592
415
  /***/ }),
593
416
 
594
- /***/ 65226:
417
+ /***/ 58649:
595
418
  /***/ (function(module) {
596
419
 
420
+ "use strict";
421
+
597
422
  /*!
598
423
  * Jodit Editor (https://xdsoft.net/jodit/)
599
424
  * Released under MIT see LICENSE.txt in the project root for license information.
600
425
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
601
426
  */
602
-
603
427
  module.exports = {
604
- newline: 'řádek',
605
- delete: 'odstranit',
606
- space: 'prostora',
607
- 'Speech Recognize': 'Rozpoznání Řeči',
608
- Sound: 'Zvuk',
609
- 'Interim Results': 'Průběžné Výsledky'
428
+ newline: '新行',
429
+ delete: '删除',
430
+ space: '空间',
431
+ 'Speech Recognize': '言语识别',
432
+ Sound: '声音',
433
+ 'Interim Results': '中期业绩'
610
434
  };
611
435
 
612
436
 
613
437
  /***/ }),
614
438
 
615
- /***/ 87541:
439
+ /***/ 66040:
616
440
  /***/ (function(module) {
617
441
 
442
+ "use strict";
443
+
444
+ /*!
445
+ * Jodit Editor (https://xdsoft.net/jodit/)
446
+ * Released under MIT see LICENSE.txt in the project root for license information.
447
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
448
+ */
449
+ module.exports = {
450
+ newline: 'นิวไลน์',
451
+ delete: 'ลบ',
452
+ space: 'พื้นที่',
453
+ 'Speech Recognize': 'การรับรู้คำพูด',
454
+ Sound: 'เสียง',
455
+ 'Interim Results': 'ผลระหว่างกาล'
456
+ };
457
+
458
+
459
+ /***/ }),
460
+
461
+ /***/ 29204:
462
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
463
+
464
+ "use strict";
465
+ // ESM COMPAT FLAG
466
+ __webpack_require__.r(__webpack_exports__);
467
+
468
+ // EXPORTS
469
+ __webpack_require__.d(__webpack_exports__, {
470
+ "SpeechRecognizeNative": function() { return /* binding */ SpeechRecognizeNative; }
471
+ });
472
+
473
+ // NAMESPACE OBJECT: ./src/plugins/speech-recognize/langs/index.ts
474
+ var langs_namespaceObject = {};
475
+ __webpack_require__.r(langs_namespaceObject);
476
+ __webpack_require__.d(langs_namespaceObject, {
477
+ "ar": function() { return ar; },
478
+ "cs_cz": function() { return cs_cz; },
479
+ "de": function() { return de; },
480
+ "es": function() { return es; },
481
+ "fa": function() { return fa; },
482
+ "fr": function() { return fr; },
483
+ "he": function() { return he; },
484
+ "hu": function() { return hu; },
485
+ "id": function() { return id; },
486
+ "it": function() { return it; },
487
+ "ja": function() { return ja; },
488
+ "ko": function() { return ko; },
489
+ "mn": function() { return mn; },
490
+ "nl": function() { return nl; },
491
+ "pl": function() { return pl; },
492
+ "pt_br": function() { return pt_br; },
493
+ "ru": function() { return ru; },
494
+ "tr": function() { return tr; },
495
+ "zh_cn": function() { return zh_cn; },
496
+ "zh_tw": function() { return zh_tw; }
497
+ });
498
+
499
+ // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
500
+ var tslib_es6 = __webpack_require__(85699);
501
+ // EXTERNAL MODULE: ./src/core/plugin/index.ts
502
+ var core_plugin = __webpack_require__(7331);
503
+ // EXTERNAL MODULE: ./src/core/decorators/watch/watch.ts
504
+ var watch = __webpack_require__(69082);
505
+ // EXTERNAL MODULE: ./src/core/helpers/utils/utils.ts
506
+ var utils = __webpack_require__(87398);
507
+ // EXTERNAL MODULE: ./src/core/global.ts
508
+ var global = __webpack_require__(79102);
509
+ // EXTERNAL MODULE: ./src/core/dom/dom.ts
510
+ var dom = __webpack_require__(9162);
511
+ // EXTERNAL MODULE: ./src/core/decorators/debounce/debounce.ts
512
+ var debounce = __webpack_require__(62294);
513
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/exec-spell-command.ts
514
+ /*!
515
+ * Jodit Editor (https://xdsoft.net/jodit/)
516
+ * Released under MIT see LICENSE.txt in the project root for license information.
517
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
518
+ */
519
+ function execSpellCommand(jodit, commandSentence) {
520
+ const [command, value] = commandSentence.split('::');
521
+ jodit.execCommand(command, null, value);
522
+ }
523
+
524
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ar.js
525
+ var ar = __webpack_require__(57998);
526
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/cs_cz.js
527
+ var cs_cz = __webpack_require__(90833);
528
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/de.js
529
+ var de = __webpack_require__(36373);
530
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/es.js
531
+ var es = __webpack_require__(97192);
532
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/fa.js
533
+ var fa = __webpack_require__(6043);
534
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/fr.js
535
+ var fr = __webpack_require__(76305);
536
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/he.js
537
+ var he = __webpack_require__(45834);
538
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/hu.js
539
+ var hu = __webpack_require__(40509);
540
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/id.js
541
+ var id = __webpack_require__(75720);
542
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/it.js
543
+ var it = __webpack_require__(88369);
544
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ja.js
545
+ var ja = __webpack_require__(30878);
546
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ko.js
547
+ var ko = __webpack_require__(37780);
548
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/mn.js
549
+ var mn = __webpack_require__(4105);
550
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/nl.js
551
+ var nl = __webpack_require__(2589);
552
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/pl.js
553
+ var pl = __webpack_require__(72556);
554
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/pt_br.js
555
+ var pt_br = __webpack_require__(11695);
556
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/ru.js
557
+ var ru = __webpack_require__(52415);
558
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/tr.js
559
+ var tr = __webpack_require__(14569);
560
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/zh_cn.js
561
+ var zh_cn = __webpack_require__(58649);
562
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/langs/zh_tw.js
563
+ var zh_tw = __webpack_require__(66040);
564
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/langs/index.ts
618
565
  /*!
619
566
  * Jodit Editor (https://xdsoft.net/jodit/)
620
567
  * Released under MIT see LICENSE.txt in the project root for license information.
621
568
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
622
569
  */
623
570
 
624
- module.exports = {
625
- newline: 'Zeilenumbruch',
626
- delete: 'löschen',
627
- space: 'Raum',
628
- 'Speech Recognize': 'Sprache Erkennen',
629
- Sound: 'Sound',
630
- 'Interim Results': 'Zwischenergebnis'
631
- };
632
-
633
-
634
- /***/ }),
635
-
636
- /***/ 87104:
637
- /***/ (function(module) {
638
571
 
639
- /*!
640
- * Jodit Editor (https://xdsoft.net/jodit/)
641
- * Released under MIT see LICENSE.txt in the project root for license information.
642
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
643
- */
644
572
 
645
- module.exports = {
646
- newline: 'nueva línea',
647
- delete: 'eliminar',
648
- space: 'espacio',
649
- 'Speech Recognize': 'Reconocimiento de Voz',
650
- Sound: 'Sonido',
651
- 'Interim Results': 'Resultados Provisionales'
652
- };
653
573
 
654
574
 
655
- /***/ }),
656
575
 
657
- /***/ 53808:
658
- /***/ (function(module) {
659
576
 
660
- /*!
661
- * Jodit Editor (https://xdsoft.net/jodit/)
662
- * Released under MIT see LICENSE.txt in the project root for license information.
663
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
664
- */
665
577
 
666
- module.exports = {
667
- newline: 'خط جدید',
668
- delete: 'حذف',
669
- space: 'فضا',
670
- 'Speech Recognize': 'گفتار را تشخیص دهید',
671
- Sound: 'صدا',
672
- 'Interim Results': 'نتایج موقت'
673
- };
674
578
 
675
579
 
676
- /***/ }),
677
580
 
678
- /***/ 48954:
679
- /***/ (function(module) {
680
581
 
681
- /*!
682
- * Jodit Editor (https://xdsoft.net/jodit/)
683
- * Released under MIT see LICENSE.txt in the project root for license information.
684
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
685
- */
686
582
 
687
- module.exports = {
688
- newline: 'nouvelle ligne',
689
- delete: 'supprimer',
690
- space: 'espace',
691
- 'Speech Recognize': 'Reconnaissance Vocale',
692
- Sound: 'Son',
693
- 'Interim Results': 'Résultats Intermédiaires'
694
- };
695
583
 
696
584
 
697
- /***/ }),
698
585
 
699
- /***/ 14694:
700
- /***/ (function(module) {
701
586
 
702
- /*!
703
- * Jodit Editor (https://xdsoft.net/jodit/)
704
- * Released under MIT see LICENSE.txt in the project root for license information.
705
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
706
- */
707
587
 
708
- module.exports = {
709
- newline: 'חדשות',
710
- delete: 'מחק',
711
- space: 'שטח',
712
- 'Speech Recognize': 'דיבור מזהה',
713
- Sound: 'קול',
714
- 'Interim Results': 'תוצאות ביניים'
715
- };
716
588
 
717
589
 
718
- /***/ }),
719
590
 
720
- /***/ 67381:
721
- /***/ (function(module) {
722
591
 
592
+ // EXTERNAL MODULE: ./src/config.ts
593
+ var config = __webpack_require__(37446);
594
+ // EXTERNAL MODULE: ./src/core/helpers/utils/data-bind.ts
595
+ var data_bind = __webpack_require__(25920);
596
+ // EXTERNAL MODULE: ./src/core/helpers/checker/is-boolean.ts
597
+ var is_boolean = __webpack_require__(88751);
598
+ // EXTERNAL MODULE: ./src/core/ui/icon.ts
599
+ var icon = __webpack_require__(30052);
600
+ // EXTERNAL MODULE: ./src/core/event-emitter/eventify.ts
601
+ var eventify = __webpack_require__(3569);
602
+ // EXTERNAL MODULE: ./src/core/decorators/index.ts + 7 modules
603
+ var decorators = __webpack_require__(98928);
604
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/constants.ts
723
605
  /*!
724
606
  * Jodit Editor (https://xdsoft.net/jodit/)
725
607
  * Released under MIT see LICENSE.txt in the project root for license information.
726
608
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
727
609
  */
728
-
729
- module.exports = {
730
- newline: 'újsor',
731
- delete: 'törlés',
732
- space: 'tér',
733
- 'Speech Recognize': 'A Beszéd Felismeri',
734
- Sound: 'Hang',
735
- 'Interim Results': 'Időközi Eredmények'
736
- };
737
-
738
-
739
- /***/ }),
740
-
741
- /***/ 99549:
742
- /***/ (function(module) {
743
-
744
- /*!
745
- * Jodit Editor (https://xdsoft.net/jodit/)
746
- * Released under MIT see LICENSE.txt in the project root for license information.
747
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
610
+ /**
611
+ * @module plugins/speech-recognize
612
+ * @internal
748
613
  */
614
+ const PII = 440;
615
+ const WARN = 940;
749
616
 
750
- module.exports = {
751
- newline: 'newline',
752
- delete: 'Hapus',
753
- space: 'ruang',
754
- 'Speech Recognize': 'Pidato Mengenali',
755
- Sound: 'Suara',
756
- 'Interim Results': 'Hasil Sementara'
757
- };
758
-
759
-
760
- /***/ }),
761
-
762
- /***/ 28428:
763
- /***/ (function(module) {
764
-
617
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/sound.ts
765
618
  /*!
766
619
  * Jodit Editor (https://xdsoft.net/jodit/)
767
620
  * Released under MIT see LICENSE.txt in the project root for license information.
768
621
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
769
622
  */
623
+ /**
624
+ * @module plugins/speech-recognize
625
+ */
770
626
 
771
- module.exports = {
772
- newline: 'nuova riga',
773
- delete: 'eliminare',
774
- space: 'spazio',
775
- 'Speech Recognize': 'Discorso Riconoscere',
776
- Sound: 'Suono',
777
- 'Interim Results': 'Risultati intermedi'
778
- };
779
-
780
-
781
- /***/ }),
782
-
783
- /***/ 25363:
784
- /***/ (function(module) {
627
+ /**
628
+ * @internal
629
+ */
630
+ function sound({ sec = 0.1, frequency = PII, gain = 0.1, type = 'sine' } = {}) {
631
+ if (typeof window.AudioContext === 'undefined' &&
632
+ typeof window.webkitAudioContext === 'undefined') {
633
+ return;
634
+ }
635
+ // one context per document
636
+ const context = new (window.AudioContext ||
637
+ window.webkitAudioContext)();
638
+ const vol = context.createGain();
639
+ const osc = context.createOscillator();
640
+ osc.type = type;
641
+ osc.frequency.value = frequency; // Hz
642
+ osc.connect(vol);
643
+ vol.connect(context.destination);
644
+ osc.start(); // start the oscillator
645
+ osc.stop(context.currentTime + sec);
646
+ vol.gain.value = gain;
647
+ }
785
648
 
649
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/recognize-manager.ts
786
650
  /*!
787
651
  * Jodit Editor (https://xdsoft.net/jodit/)
788
652
  * Released under MIT see LICENSE.txt in the project root for license information.
789
653
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
790
654
  */
791
-
792
- module.exports = {
793
- newline: '改行',
794
- delete: '削除',
795
- space: 'スペース',
796
- 'Speech Recognize': '音声認識',
797
- Sound: '音',
798
- 'Interim Results': '中間結果'
799
- };
655
+ var RecognizeManager_1;
800
656
 
801
657
 
802
- /***/ }),
803
658
 
804
- /***/ 96929:
805
- /***/ (function(module) {
806
659
 
807
- /*!
808
- * Jodit Editor (https://xdsoft.net/jodit/)
809
- * Released under MIT see LICENSE.txt in the project root for license information.
810
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
811
- */
812
660
 
813
- module.exports = {
814
- newline: '줄 바꿈',
815
- delete: '삭제',
816
- space: '공간',
817
- 'Speech Recognize': '음성 인식',
818
- Sound: '소리',
819
- 'Interim Results': '중간 결과'
661
+ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends eventify/* Eventify */.a {
662
+ set lang(v) {
663
+ this._lang = v;
664
+ this._api.lang = v;
665
+ }
666
+ get lang() {
667
+ return this._lang;
668
+ }
669
+ set continuous(v) {
670
+ this._continuous = v;
671
+ this._api.continuous = v;
672
+ }
673
+ get continuous() {
674
+ return this._continuous;
675
+ }
676
+ set interimResults(v) {
677
+ this._interimResults = v;
678
+ this._api.interimResults = v;
679
+ }
680
+ get interimResults() {
681
+ return this._interimResults;
682
+ }
683
+ constructor(async, api) {
684
+ super();
685
+ this.async = async;
686
+ this._continuous = false;
687
+ this._interimResults = false;
688
+ this.sound = true;
689
+ this._isEnabled = false;
690
+ this._restartTimeout = 0;
691
+ this._onSpeechStart = (e) => {
692
+ if (!this._isEnabled) {
693
+ return;
694
+ }
695
+ this.async.clearTimeout(this._restartTimeout);
696
+ this._restartTimeout = this.async.setTimeout(() => {
697
+ this.restart();
698
+ this.emit('pulse', false);
699
+ this._makeSound(WARN);
700
+ }, 5000);
701
+ this.emit('pulse', true);
702
+ };
703
+ this._progressTimeout = 0;
704
+ this._api = api;
705
+ RecognizeManager_1._instances.add(this);
706
+ }
707
+ destruct() {
708
+ this.stop();
709
+ RecognizeManager_1._instances.delete(this);
710
+ super.destruct();
711
+ }
712
+ get isEnabled() {
713
+ return this._isEnabled;
714
+ }
715
+ start() {
716
+ if (this._isEnabled) {
717
+ return;
718
+ }
719
+ this._isEnabled = true;
720
+ RecognizeManager_1._instances.forEach(instance => {
721
+ if (instance !== this) {
722
+ instance.stop();
723
+ }
724
+ });
725
+ this._api.start();
726
+ this.__on('speechstart', this._onSpeechStart)
727
+ .__on('error', this._onError)
728
+ .__on('result', this._onResult);
729
+ }
730
+ stop() {
731
+ if (!this._isEnabled) {
732
+ return;
733
+ }
734
+ try {
735
+ this._api.abort();
736
+ this._api.stop();
737
+ }
738
+ catch (_a) { }
739
+ this.__off('speechstart', this._onSpeechStart)
740
+ .__off('error', this._onError)
741
+ .__off('result', this._onResult);
742
+ this.async.clearTimeout(this._restartTimeout);
743
+ this._isEnabled = false;
744
+ this.emit('pulse', false);
745
+ }
746
+ toggle() {
747
+ if (!this._isEnabled) {
748
+ this.start();
749
+ }
750
+ else {
751
+ this.stop();
752
+ }
753
+ }
754
+ restart() {
755
+ this.stop();
756
+ this.start();
757
+ }
758
+ __on(event, callback) {
759
+ this._api.addEventListener(event, callback);
760
+ return this;
761
+ }
762
+ __off(event, callback) {
763
+ this._api.removeEventListener(event, callback);
764
+ return this;
765
+ }
766
+ _onResult(e) {
767
+ if (!this._isEnabled) {
768
+ return;
769
+ }
770
+ this.async.clearTimeout(this._progressTimeout);
771
+ const resultItem = e.results.item(e.resultIndex);
772
+ const { transcript } = resultItem.item(0);
773
+ const resultHandler = () => {
774
+ try {
775
+ this.async.clearTimeout(this._restartTimeout);
776
+ this.emit('result', transcript);
777
+ }
778
+ catch (_a) { }
779
+ this.restart();
780
+ this.emit('pulse', false);
781
+ this._makeSound(PII);
782
+ };
783
+ if (resultItem.isFinal === false) {
784
+ this.emit('progress', transcript);
785
+ this._progressTimeout = this.async.setTimeout(resultHandler, 500);
786
+ return;
787
+ }
788
+ resultHandler();
789
+ }
790
+ _onError() {
791
+ if (!this._isEnabled) {
792
+ return;
793
+ }
794
+ this._makeSound(WARN);
795
+ this.emit('pulse', false);
796
+ this.restart();
797
+ }
798
+ _makeSound(frequency) {
799
+ if (this.sound) {
800
+ sound({ frequency });
801
+ }
802
+ }
820
803
  };
804
+ RecognizeManager._instances = new Set();
805
+ RecognizeManager = RecognizeManager_1 = (0,tslib_es6/* __decorate */.gn)([
806
+ decorators.autobind
807
+ ], RecognizeManager);
821
808
 
822
809
 
823
- /***/ }),
824
-
825
- /***/ 26781:
826
- /***/ (function(module) {
827
-
810
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/helpers/api.ts
828
811
  /*!
829
812
  * Jodit Editor (https://xdsoft.net/jodit/)
830
813
  * Released under MIT see LICENSE.txt in the project root for license information.
831
814
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
832
815
  */
816
+ const SpeechRecognition = window.SpeechRecognition ||
817
+ window.webkitSpeechRecognition;
833
818
 
834
- module.exports = {
835
- newline: 'Шинэ мөр',
836
- delete: 'Устгах',
837
- space: 'Зай',
838
- 'Speech Recognize': 'Дуу хоолой таних',
839
- Sound: 'Дуу',
840
- 'Interim Results': 'Түр зуурын үр дүн'
841
- };
842
-
843
-
844
- /***/ }),
845
-
846
- /***/ 58499:
847
- /***/ (function(module) {
848
-
819
+ // EXTERNAL MODULE: ./src/plugins/speech-recognize/speech-recognize.svg
820
+ var speech_recognize = __webpack_require__(55106);
821
+ var speech_recognize_default = /*#__PURE__*/__webpack_require__.n(speech_recognize);
822
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/config.ts
849
823
  /*!
850
824
  * Jodit Editor (https://xdsoft.net/jodit/)
851
825
  * Released under MIT see LICENSE.txt in the project root for license information.
852
826
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
853
827
  */
854
828
 
855
- module.exports = {
856
- newline: 'regel',
857
- delete: 'verwijderen',
858
- space: 'ruimte',
859
- 'Speech Recognize': 'Spraak Herkennen',
860
- Sound: 'Geluid',
861
- 'Interim Results': 'Tussentijdse Resultaten'
862
- };
863
-
864
-
865
- /***/ }),
866
-
867
- /***/ 59430:
868
- /***/ (function(module) {
869
-
870
- /*!
871
- * Jodit Editor (https://xdsoft.net/jodit/)
872
- * Released under MIT see LICENSE.txt in the project root for license information.
873
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
874
- */
875
829
 
876
- module.exports = {
877
- newline: 'newline',
878
- delete: 'usunąć',
879
- space: 'przestrzeń',
880
- 'Speech Recognize': 'Rozpoznawanie Mowy',
881
- Sound: 'Dźwięk',
882
- 'Interim Results': 'Wyniki Okresowe'
883
- };
884
830
 
885
831
 
886
- /***/ }),
887
832
 
888
- /***/ 70297:
889
- /***/ (function(module) {
890
833
 
891
- /*!
892
- * Jodit Editor (https://xdsoft.net/jodit/)
893
- * Released under MIT see LICENSE.txt in the project root for license information.
894
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
895
- */
896
834
 
897
- module.exports = {
898
- newline: 'linha',
899
- delete: 'excluir',
900
- space: 'espaco',
901
- 'Speech Recognize': 'Discurso Reconhecer',
902
- Sound: 'Som',
903
- 'Interim Results': 'Resultados Provisórios'
835
+ config/* Config.prototype.speechRecognize */.D.prototype.speechRecognize = {
836
+ api: SpeechRecognition,
837
+ sound: true,
838
+ continuous: true,
839
+ interimResults: true,
840
+ commands: {
841
+ 'newline|enter': 'enter',
842
+ 'delete|remove word|delete word': 'backspaceWordButton',
843
+ comma: 'inserthtml::,',
844
+ underline: 'inserthtml::_',
845
+ hyphen: 'inserthtml::-',
846
+ space: 'inserthtml:: ',
847
+ question: 'inserthtml::?',
848
+ dot: 'inserthtml::.',
849
+ 'quote|quotes|open quote': "inserthtml::'",
850
+ 'header|header h1': 'formatblock::h1',
851
+ 'select all': 'selectall'
852
+ }
904
853
  };
905
-
906
-
907
- /***/ }),
908
-
909
- /***/ 98949:
910
- /***/ (function(module) {
911
-
912
- /*!
913
- * Jodit Editor (https://xdsoft.net/jodit/)
914
- * Released under MIT see LICENSE.txt in the project root for license information.
915
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
916
- */
917
-
918
- module.exports = {
919
- newline: 'новая строка|перенос|энтер',
920
- delete: 'удалить',
921
- space: 'пробел',
922
- 'Speech Recognize': 'Распознавание речи',
923
- Sound: 'Звук',
924
- 'Interim Results': 'Промежуточные результаты'
854
+ icon/* Icon.set */.J.set('speech-recognize', (speech_recognize_default()));
855
+ config/* Config.prototype.controls.speechRecognize */.D.prototype.controls.speechRecognize = {
856
+ isActive(jodit, _) {
857
+ const api = (0,data_bind/* dataBind */.q)(jodit, 'speech');
858
+ return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
859
+ },
860
+ isDisabled(jodit) {
861
+ return !jodit.o.speechRecognize.api;
862
+ },
863
+ exec(jodit, current, { button, control }) {
864
+ const { api: Api, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
865
+ if (!Api) {
866
+ jodit.alert('Speech recognize API unsupported in your browser');
867
+ return;
868
+ }
869
+ let api = (0,data_bind/* dataBind */.q)(jodit, 'speech');
870
+ if (!api) {
871
+ const nativeApi = new Api();
872
+ api = new RecognizeManager(jodit.async, nativeApi);
873
+ api.lang = lang;
874
+ api.continuous = continuous;
875
+ api.interimResults = interimResults;
876
+ api.sound = sound;
877
+ (0,data_bind/* dataBind */.q)(jodit, 'speech', api);
878
+ api.on('pulse', (enable) => {
879
+ button.setMod('pulse', enable);
880
+ });
881
+ api.on('result', (text) => jodit.e.fire('speechRecognizeResult', text));
882
+ api.on('progress', (text) => jodit.e.fire('speechRecognizeProgressResult', text));
883
+ button.hookStatus('beforeDestruct', () => {
884
+ api.destruct();
885
+ });
886
+ }
887
+ if (control.args) {
888
+ const key = control.args[0];
889
+ if ((0,is_boolean/* isBoolean */.j)(api[key])) {
890
+ api[key] = !api[key];
891
+ if (api.isEnabled) {
892
+ api.restart();
893
+ }
894
+ return;
895
+ }
896
+ }
897
+ api.toggle();
898
+ button.state.activated = api.isEnabled;
899
+ },
900
+ name: 'speechRecognize',
901
+ command: 'toggleSpeechRecognize',
902
+ tooltip: 'Speech Recognize',
903
+ list: {
904
+ sound: 'Sound',
905
+ interimResults: 'Interim Results'
906
+ },
907
+ childTemplate(jodit, key, value) {
908
+ var _a;
909
+ const api = (0,data_bind/* dataBind */.q)(jodit, 'speech'), checked = (_a = api === null || api === void 0 ? void 0 : api[key]) !== null && _a !== void 0 ? _a : jodit.o.speechRecognize[key];
910
+ return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'>&nbsp;${value}</span>`;
911
+ },
912
+ mods: {
913
+ stroke: false
914
+ }
925
915
  };
926
916
 
927
-
928
- /***/ }),
929
-
930
- /***/ 61232:
931
- /***/ (function(module) {
932
-
917
+ ;// CONCATENATED MODULE: ./src/plugins/speech-recognize/speech-recognize.ts
933
918
  /*!
934
919
  * Jodit Editor (https://xdsoft.net/jodit/)
935
920
  * Released under MIT see LICENSE.txt in the project root for license information.
936
921
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
937
922
  */
938
923
 
939
- module.exports = {
940
- newline: 'yeni satır',
941
- delete: 'silmek',
942
- space: 'uzay',
943
- 'Speech Recognize': 'Konuşma Tanıma',
944
- Sound: 'Ses',
945
- 'Interim Results': 'Ara Sonuçlar'
946
- };
924
+ /**
925
+ * [[include:plugins/speech-recognize/README.md]]
926
+ * @packageDocumentation
927
+ * @module plugins/speech-recognize
928
+ */
947
929
 
948
930
 
949
- /***/ }),
950
931
 
951
- /***/ 56775:
952
- /***/ (function(module) {
953
932
 
954
- /*!
955
- * Jodit Editor (https://xdsoft.net/jodit/)
956
- * Released under MIT see LICENSE.txt in the project root for license information.
957
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
958
- */
959
933
 
960
- module.exports = {
961
- newline: '新行',
962
- delete: '删除',
963
- space: '空间',
964
- 'Speech Recognize': '言语识别',
965
- Sound: '声音',
966
- 'Interim Results': '中期业绩'
967
- };
968
934
 
969
935
 
970
- /***/ }),
971
936
 
972
- /***/ 97957:
973
- /***/ (function(module) {
974
937
 
975
- /*!
976
- * Jodit Editor (https://xdsoft.net/jodit/)
977
- * Released under MIT see LICENSE.txt in the project root for license information.
978
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
979
- */
980
938
 
981
- module.exports = {
982
- newline: 'นิวไลน์',
983
- delete: 'ลบ',
984
- space: 'พื้นที่',
985
- 'Speech Recognize': 'การรับรู้คำพูด',
986
- Sound: 'เสียง',
987
- 'Interim Results': 'ผลระหว่างกาล'
988
- };
939
+ class SpeechRecognizeNative extends core_plugin/* Plugin */.S {
940
+ constructor(j) {
941
+ super(j);
942
+ this._commandToWord = {};
943
+ if (j.o.speechRecognize.api) {
944
+ j.registerButton({
945
+ group: 'state',
946
+ name: 'speechRecognize'
947
+ });
948
+ }
949
+ }
950
+ afterInit(jodit) {
951
+ const { commands } = jodit.o.speechRecognize;
952
+ if (commands) {
953
+ (0,global/* extendLang */.xl)(langs_namespaceObject);
954
+ (0,utils/* keys */.XP)(commands, false).forEach(words => {
955
+ const keys = words.split('|');
956
+ keys.forEach(key => {
957
+ key = key.trim().toLowerCase();
958
+ this._commandToWord[key] = commands[words];
959
+ const translatedKeys = jodit.i18n(key);
960
+ if (translatedKeys !== key) {
961
+ translatedKeys.split('|').forEach(translatedKey => {
962
+ this._commandToWord[translatedKey.trim().toLowerCase()] = commands[words].trim();
963
+ });
964
+ }
965
+ });
966
+ });
967
+ }
968
+ }
969
+ beforeDestruct(jodit) { }
970
+ onSpeechRecognizeProgressResult(text) {
971
+ if (!this.messagePopup) {
972
+ this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
973
+ }
974
+ this.j.workplace.appendChild(this.messagePopup);
975
+ this.j.async.setTimeout(() => {
976
+ dom/* Dom.safeRemove */.i.safeRemove(this.messagePopup);
977
+ }, {
978
+ label: 'onSpeechRecognizeProgressResult',
979
+ timeout: 1000
980
+ });
981
+ this.messagePopup.innerText = text + '|';
982
+ }
983
+ onSpeechRecognizeResult(text) {
984
+ const { j } = this, { s } = j;
985
+ dom/* Dom.safeRemove */.i.safeRemove(this.messagePopup);
986
+ if (!this._checkCommand(text)) {
987
+ const { range } = s, node = s.current();
988
+ if (s.isCollapsed() &&
989
+ dom/* Dom.isText */.i.isText(node) &&
990
+ dom/* Dom.isOrContains */.i.isOrContains(j.editor, node) &&
991
+ node.nodeValue) {
992
+ const sentence = node.nodeValue;
993
+ node.nodeValue =
994
+ sentence +
995
+ (/[\u00A0 ]\uFEFF*$/.test(sentence) ? '' : ' ') +
996
+ text;
997
+ range.setStartAfter(node);
998
+ s.selectRange(range);
999
+ j.synchronizeValues();
1000
+ }
1001
+ else {
1002
+ s.insertHTML(text);
1003
+ }
1004
+ }
1005
+ }
1006
+ _checkCommand(command) {
1007
+ command = command.toLowerCase().replace(/\./g, '');
1008
+ if (this._commandToWord[command]) {
1009
+ execSpellCommand(this.j, this._commandToWord[command]);
1010
+ return true;
1011
+ }
1012
+ return false;
1013
+ }
1014
+ }
1015
+ (0,tslib_es6/* __decorate */.gn)([
1016
+ (0,watch/* watch */.YP)(':speechRecognizeProgressResult'),
1017
+ (0,debounce/* debounce */.D)()
1018
+ ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
1019
+ (0,tslib_es6/* __decorate */.gn)([
1020
+ (0,watch/* watch */.YP)(':speechRecognizeResult')
1021
+ ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
1022
+ if (typeof Jodit !== 'undefined') {
1023
+ Jodit.plugins.add('speech-recognize', SpeechRecognizeNative);
1024
+ }
989
1025
 
990
1026
 
991
1027
  /***/ }),
@@ -1000,7 +1036,7 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http
1000
1036
  },
1001
1037
  /******/ function(__webpack_require__) { // webpackRuntimeModules
1002
1038
  /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
1003
- /******/ var __webpack_exports__ = (__webpack_exec__(42714));
1039
+ /******/ var __webpack_exports__ = (__webpack_exec__(29204));
1004
1040
  /******/ return __webpack_exports__;
1005
1041
  /******/ }
1006
1042
  ]);