@talrace/ngx-noder 0.0.7 → 0.0.8

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 (647) hide show
  1. package/README.md +75 -66
  2. package/esm2022/lib/apart-components/add-link-dialog/add-link-dialog.component.mjs +61 -0
  3. package/esm2022/lib/apart-components/add-link-dialog/validation.helper.mjs +7 -0
  4. package/esm2022/lib/apart-components/add-link-mobile/add-link-mobile.component.mjs +47 -0
  5. package/esm2022/lib/apart-components/confirm-dialog/confirm-dialog.component.mjs +32 -0
  6. package/esm2022/lib/apart-components/editor-search/editor-search-dialog.component.mjs +64 -0
  7. package/esm2022/lib/apart-components/editor-title/editor-title.component.mjs +89 -0
  8. package/esm2022/lib/apart-components/editor-title-mobile/editor-title-mobile.component.mjs +22 -0
  9. package/esm2022/lib/apart-components/editor-toolbar/components/base-toolbar.component.mjs +111 -0
  10. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/color-picker/color-picker.component.mjs +37 -0
  11. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font/font.component.mjs +49 -0
  12. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font-size/font-size.component.mjs +90 -0
  13. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font-style/font-style.component.mjs +81 -0
  14. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/format/format.component.mjs +28 -0
  15. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/heading/heading.component.mjs +22 -0
  16. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/numbering/numbering.component.mjs +53 -0
  17. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/print/print.component.mjs +18 -0
  18. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/undo-redo/undo-redo.component.mjs +27 -0
  19. package/esm2022/lib/apart-components/editor-toolbar/components/buttons/zoom/zoom.component.mjs +71 -0
  20. package/esm2022/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.mjs +94 -0
  21. package/esm2022/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/menu-dropdowns-mobile.component.mjs +24 -0
  22. package/esm2022/lib/apart-components/editor-toolbar/components/toolbar-actions/toolbar-actions.component.mjs +65 -0
  23. package/esm2022/lib/apart-components/editor-toolbar/editor-mobile-toolbar/editor-mobile-toolbar.component.mjs +84 -0
  24. package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.mjs +90 -0
  25. package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar.module.mjs +117 -0
  26. package/esm2022/lib/apart-components/editor-toolbar/shared/constants/editor-toolbar-modes.const.mjs +8 -0
  27. package/esm2022/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/constants/numbering-templates.const.mjs +6 -6
  28. package/esm2022/lib/apart-components/editor-toolbar/shared/constants/svg-icons.const.mjs +157 -0
  29. package/esm2022/lib/apart-components/editor-toolbar/shared/enums/alignment.enum.mjs +8 -0
  30. package/esm2022/lib/apart-components/editor-toolbar/shared/enums/editor-toolbar-mode.enum.mjs +11 -0
  31. package/esm2022/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-template-type.enum.mjs +1 -1
  32. package/esm2022/lib/apart-components/editor-toolbar/shared/enums/numbering-type.enum.mjs +6 -0
  33. package/esm2022/lib/apart-components/editor-toolbar/shared/services/custom-icon.service.mjs +34 -0
  34. package/esm2022/lib/apart-components/editor-toolbar/shared/services/editor-toolbar.service.mjs +26 -0
  35. package/esm2022/lib/apart-components/editor-toolbar/shared/services/toolbar-core.service.mjs +60 -0
  36. package/esm2022/lib/apart-components/editor-toolbar/shared/toolbar-styles.helper.mjs +55 -0
  37. package/esm2022/lib/apart-components/insert-table/insert-table.component.mjs +54 -0
  38. package/esm2022/lib/apart-components/insert-table-mobile/insert-table-mobile.component.mjs +84 -0
  39. package/esm2022/lib/apart-components/text-format-mobile/text-format-mobile.component.mjs +123 -0
  40. package/esm2022/lib/editor/components/edges/edge-element.model.mjs +9 -0
  41. package/esm2022/lib/editor/components/edges/edge-type.enum.mjs +6 -0
  42. package/esm2022/lib/editor/components/edges/edge.component.mjs +99 -0
  43. package/esm2022/lib/editor/components/edges/edges.mjs +108 -0
  44. package/esm2022/lib/editor/components/edges/page-type.enum.mjs +7 -0
  45. package/esm2022/lib/editor/components/editor.component.mjs +112 -0
  46. package/esm2022/lib/editor/components/external-element/external-element.service.mjs +6 -0
  47. package/esm2022/lib/editor/components/external-element/external-elements.const.mjs +4 -0
  48. package/esm2022/lib/editor/components/external-element/external-sidenav.interface.mjs +2 -0
  49. package/esm2022/lib/editor/components/external-element/external.component.mjs +41 -0
  50. package/esm2022/lib/editor/components/external-element/models/element-data.model.mjs +9 -0
  51. package/esm2022/lib/editor/components/external-element/models/external-element.model.mjs +11 -0
  52. package/esm2022/lib/editor/components/external-element/models/external-sidenav.model.mjs +15 -0
  53. package/esm2022/lib/editor/components/image/components/image.component.mjs +88 -0
  54. package/esm2022/lib/editor/components/image/image-api.service.mjs +36 -0
  55. package/esm2022/lib/editor/components/image/input-handler/image-input.handler.mjs +38 -0
  56. package/esm2022/lib/editor/components/image/resizer/coordinate.mjs +2 -0
  57. package/esm2022/lib/editor/components/image/resizer/direction-wrapper.mjs +19 -0
  58. package/esm2022/lib/editor/components/image/resizer/direction.enum.mjs +12 -0
  59. package/esm2022/lib/editor/components/image/resizer/resizer.component.mjs +106 -0
  60. package/esm2022/lib/editor/components/image/resizer/size-delta.mjs +2 -0
  61. package/esm2022/lib/editor/components/image/resizer/size-wrapper.mjs +52 -0
  62. package/esm2022/lib/editor/components/image/size.mjs +2 -0
  63. package/esm2022/lib/editor/components/shared/abstract/base.component.mjs +59 -0
  64. package/esm2022/lib/editor/components/shared/abstract/destroy.component.mjs +18 -0
  65. package/esm2022/lib/editor/components/shared/custom-component.hepler.mjs +43 -0
  66. package/esm2022/lib/editor/components/shared/custom-components.interface.mjs +2 -0
  67. package/esm2022/lib/editor/components/shared/custom-content-markers.const.mjs +3 -0
  68. package/esm2022/lib/editor/components/shared/custom-content.mjs +2 -0
  69. package/esm2022/lib/editor/components/shared/services/component.service.mjs +64 -0
  70. package/esm2022/lib/editor/components/shared/services/custom-content.service.mjs +163 -0
  71. package/esm2022/lib/editor/components/shared/services/overlay.service.mjs +55 -0
  72. package/esm2022/lib/editor/components/tab/tab.component.mjs +44 -0
  73. package/esm2022/lib/editor/components/tab/tab.helper.mjs +6 -0
  74. package/esm2022/lib/editor/components/table/cell-resizer/cell-resizer.mjs +118 -0
  75. package/esm2022/lib/editor/components/table/components/table-cell.component.mjs +97 -0
  76. package/esm2022/lib/editor/components/table/components/table.component.mjs +401 -0
  77. package/esm2022/lib/{+shared/editor/core → editor/components/table}/enums/hrule.enum.mjs +1 -1
  78. package/esm2022/lib/editor/components/table/enums/reisizer-side.enum.mjs +8 -0
  79. package/esm2022/lib/editor/components/table/enums/vertical-merge.enum.mjs +6 -0
  80. package/esm2022/lib/editor/components/table/models/cell-data.model.mjs +18 -0
  81. package/esm2022/lib/editor/components/table/models/cell-resizer-parameters.model.mjs +9 -0
  82. package/esm2022/lib/editor/components/table/models/row-data.model.mjs +8 -0
  83. package/esm2022/lib/editor/components/table/models/selection-range.model.mjs +7 -0
  84. package/esm2022/lib/editor/components/table/overlay-menu/overlay-menu.component.mjs +74 -0
  85. package/esm2022/lib/editor/components/table/selection/table-selection.mjs +366 -0
  86. package/esm2022/lib/editor/content/constants/display-values.const.mjs +8 -0
  87. package/esm2022/lib/editor/content/constants/document-info.const.mjs +13 -0
  88. package/esm2022/lib/editor/content/constants/editor.const.mjs +62 -0
  89. package/esm2022/lib/editor/content/contents.interface.mjs +2 -0
  90. package/esm2022/lib/editor/content/display-data/display-token.model.mjs +12 -0
  91. package/esm2022/lib/editor/content/display-data/document.mjs +134 -0
  92. package/esm2022/lib/editor/content/display-data/format-ext.model.mjs +10 -0
  93. package/esm2022/lib/editor/content/display-data/general-properties.model.mjs +11 -0
  94. package/esm2022/lib/editor/content/display-data/indent.model.mjs +9 -0
  95. package/esm2022/lib/editor/content/display-data/line-info.model.mjs +9 -0
  96. package/esm2022/lib/editor/content/display-data/lines.mjs +96 -0
  97. package/esm2022/lib/editor/content/display-data/pages.wrap.mjs +226 -0
  98. package/esm2022/lib/editor/content/display-data/paragraph-info.interface.mjs +2 -0
  99. package/esm2022/lib/editor/content/display-data/paragraph.mjs +52 -0
  100. package/esm2022/lib/editor/content/display-data/text-line-info.mjs +34 -0
  101. package/esm2022/lib/editor/content/display-data/toolbar-styles.interface.mjs +2 -0
  102. package/esm2022/lib/editor/content/helpers/content-style.helper.mjs +96 -0
  103. package/esm2022/lib/{+shared/editor → editor/content}/helpers/format.helper.mjs +1 -1
  104. package/esm2022/lib/{+shared/editor → editor/content}/helpers/indexed-element.helper.mjs +1 -1
  105. package/esm2022/lib/editor/content/helpers/scaling.helper.mjs +9 -0
  106. package/esm2022/lib/editor/content/margin.model.mjs +16 -0
  107. package/esm2022/lib/editor/content/page-vertical-data.model.mjs +9 -0
  108. package/esm2022/lib/{+shared/editor/core/enums → editor/content}/vertical-alignment.enum.mjs +1 -1
  109. package/esm2022/lib/editor/core/event-emitting.mjs +56 -0
  110. package/esm2022/lib/editor/display/cell.interface.mjs +2 -0
  111. package/esm2022/lib/editor/display/event.helper.mjs +18 -0
  112. package/esm2022/lib/editor/display/layers/cursor.layer.mjs +101 -0
  113. package/esm2022/lib/editor/display/layers/layer.config.mjs +2 -0
  114. package/esm2022/lib/editor/display/layers/pages.layer.mjs +97 -0
  115. package/esm2022/lib/editor/display/layers/print.pages.layer.mjs +7 -0
  116. package/esm2022/lib/editor/display/layers/print.text.layer.mjs +7 -0
  117. package/esm2022/lib/editor/display/layers/selection.layer.mjs +113 -0
  118. package/esm2022/lib/editor/display/layers/text.layer.mjs +203 -0
  119. package/esm2022/lib/editor/display/print/print.helper.mjs +40 -0
  120. package/esm2022/lib/editor/display/print/print.renderer.mjs +67 -0
  121. package/esm2022/lib/editor/display/print/print.rendering.helper.mjs +7 -0
  122. package/esm2022/lib/editor/display/render-changes.interface.mjs +2 -0
  123. package/esm2022/lib/editor/display/render-changes.model.mjs +25 -0
  124. package/esm2022/lib/editor/display/renderer.mjs +206 -0
  125. package/esm2022/lib/editor/display/rendering.helper.mjs +187 -0
  126. package/esm2022/lib/editor/display/renderloop.mjs +26 -0
  127. package/esm2022/lib/editor/display/virtual.renderer.mjs +317 -0
  128. package/esm2022/lib/editor/display/visible-range.interface.mjs +2 -0
  129. package/esm2022/lib/editor/editor.module.mjs +67 -0
  130. package/esm2022/lib/editor/execution/distance.model.mjs +10 -0
  131. package/esm2022/lib/editor/execution/edit.session.mjs +1117 -0
  132. package/esm2022/lib/editor/execution/editor.mjs +1346 -0
  133. package/esm2022/lib/editor/execution/helpers/delta.helper.mjs +18 -0
  134. package/esm2022/lib/editor/execution/helpers/dom.helper.mjs +42 -0
  135. package/esm2022/lib/editor/execution/helpers/format-style.helper.mjs +64 -0
  136. package/esm2022/lib/editor/execution/helpers/page.helper.mjs +12 -0
  137. package/esm2022/lib/editor/execution/helpers/paragraph-style.helper.mjs +41 -0
  138. package/esm2022/lib/editor/execution/helpers/paragraph.helper.mjs +169 -0
  139. package/esm2022/lib/editor/execution/regulator.service.mjs +198 -0
  140. package/esm2022/lib/editor/execution/targeting/cell-session-source.model.mjs +19 -0
  141. package/esm2022/lib/editor/execution/targeting/edge-session-source.model.mjs +15 -0
  142. package/esm2022/lib/editor/execution/targeting/main-session-source.model.mjs +8 -0
  143. package/esm2022/lib/editor/execution/targeting/session-source.model.mjs +3 -0
  144. package/esm2022/lib/editor/execution/targeting/session.model.mjs +10 -0
  145. package/esm2022/lib/editor/gadgets/font-metrics/editor-version.const.mjs +2 -0
  146. package/esm2022/lib/editor/gadgets/font-metrics/font-metric-size.interface.mjs +2 -0
  147. package/esm2022/lib/editor/gadgets/font-metrics/font-metrics.helper.mjs +88 -0
  148. package/esm2022/lib/editor/gadgets/history/operation-history.mjs +206 -0
  149. package/esm2022/lib/editor/gadgets/history/operation.type.mjs +2 -0
  150. package/esm2022/lib/editor/gadgets/history/operations-history-info.model.mjs +7 -0
  151. package/esm2022/lib/editor/gadgets/numbering/numbering-data.model.mjs +9 -0
  152. package/esm2022/lib/{+shared/editor/core/enums → editor/gadgets/numbering}/numbering-marker-type.enum.mjs +1 -1
  153. package/esm2022/lib/editor/gadgets/numbering/numbering.helper.mjs +82 -0
  154. package/esm2022/lib/editor/gadgets/page-break/break-types.enum.mjs +7 -0
  155. package/esm2022/lib/editor/gadgets/page-break/break.helper.mjs +18 -0
  156. package/esm2022/lib/editor/gadgets/scrollbar.mjs +81 -0
  157. package/esm2022/lib/editor/gadgets/search/replace.interface.mjs +2 -0
  158. package/esm2022/lib/editor/gadgets/search/search-iteration.interface.mjs +2 -0
  159. package/esm2022/lib/editor/gadgets/search/search.mjs +231 -0
  160. package/esm2022/lib/editor/gadgets/unicode/unicode-chars.const.mjs +5 -0
  161. package/esm2022/lib/editor/gadgets/unicode/unicode.helper.mjs +20 -0
  162. package/esm2022/lib/editor/interaction/base.handler.mjs +19 -0
  163. package/esm2022/lib/editor/interaction/document.handler.mjs +27 -0
  164. package/esm2022/lib/editor/interaction/editor.service.mjs +325 -0
  165. package/esm2022/lib/editor/interaction/input.handler.mjs +149 -0
  166. package/esm2022/lib/{+shared/enums → editor/interaction}/mode.enum.mjs +1 -1
  167. package/esm2022/lib/editor/interaction/mouse-button.enum.mjs +7 -0
  168. package/esm2022/lib/editor/interaction/mouse.handler.mjs +49 -0
  169. package/esm2022/lib/editor/interaction/text-input.mjs +53 -0
  170. package/esm2022/lib/editor/operations/commands.service.mjs +20 -0
  171. package/esm2022/lib/editor/operations/enums/command-type.enum.mjs +32 -0
  172. package/esm2022/lib/editor/operations/enums/target-type.enum.mjs +7 -0
  173. package/esm2022/lib/editor/operations/helpers/break-operations.helper.mjs +9 -0
  174. package/esm2022/lib/editor/operations/helpers/content-operations.helper.mjs +15 -0
  175. package/esm2022/lib/editor/operations/helpers/format-operations.helper.mjs +55 -0
  176. package/esm2022/lib/editor/operations/helpers/image-operations.helper.mjs +19 -0
  177. package/esm2022/lib/editor/operations/helpers/indexed-element-operations.helper.mjs +43 -0
  178. package/esm2022/lib/editor/operations/helpers/link-operations.helper.mjs +28 -0
  179. package/esm2022/lib/editor/operations/helpers/numbering-operations.helper.mjs +55 -0
  180. package/esm2022/lib/editor/operations/helpers/paragraph-operations.helper.mjs +114 -0
  181. package/esm2022/lib/editor/operations/helpers/tab-operations.helper.mjs +16 -0
  182. package/esm2022/lib/editor/operations/helpers/table-operations.helper.mjs +374 -0
  183. package/esm2022/lib/editor/operations/operations-helper.helper.mjs +432 -0
  184. package/esm2022/lib/editor/operations/save-commands.helper.mjs +127 -0
  185. package/esm2022/lib/editor/operations/target-operations.helper.mjs +23 -0
  186. package/esm2022/lib/editor/positioning/alignments.const.mjs +8 -0
  187. package/esm2022/lib/editor/positioning/content.helper.mjs +36 -0
  188. package/esm2022/lib/editor/positioning/cursor-paragraph.mjs +13 -0
  189. package/esm2022/lib/editor/positioning/cursor-position.interface.mjs +2 -0
  190. package/esm2022/lib/editor/positioning/insert-index.interface.mjs +2 -0
  191. package/esm2022/lib/editor/positioning/line-width.helper.mjs +13 -0
  192. package/esm2022/lib/editor/positioning/position.helper.mjs +194 -0
  193. package/esm2022/lib/editor/positioning/range.mjs +94 -0
  194. package/esm2022/lib/editor/positioning/selection.mjs +307 -0
  195. package/esm2022/lib/editor/revision.helper.mjs +91 -0
  196. package/esm2022/lib/models/generated/cell.model.mjs +1 -1
  197. package/esm2022/lib/models/generated/command.model.mjs +5 -1
  198. package/esm2022/lib/models/generated/insert-paragraph.model.mjs +20 -0
  199. package/esm2022/lib/models/generated/replace.model.mjs +5 -1
  200. package/esm2022/public-api.mjs +37 -31
  201. package/fesm2022/talrace-ngx-noder.mjs +3398 -2731
  202. package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
  203. package/lib/apart-components/add-link-dialog/add-link-dialog.component.d.ts +27 -0
  204. package/lib/apart-components/add-link-dialog/validation.helper.d.ts +5 -0
  205. package/lib/apart-components/add-link-mobile/add-link-mobile.component.d.ts +19 -0
  206. package/lib/{+shared → apart-components}/confirm-dialog/confirm-dialog.component.d.ts +2 -1
  207. package/lib/{+shared → apart-components}/editor-search/editor-search-dialog.component.d.ts +6 -7
  208. package/lib/apart-components/editor-title/editor-title.component.d.ts +25 -0
  209. package/lib/apart-components/editor-title-mobile/editor-title-mobile.component.d.ts +6 -0
  210. package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +49 -0
  211. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/color-picker/color-picker.component.d.ts +1 -1
  212. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font/font.component.d.ts +2 -2
  213. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-size/font-size.component.d.ts +1 -1
  214. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-style/font-style.component.d.ts +1 -1
  215. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/format/format.component.d.ts +2 -2
  216. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/heading/heading.component.d.ts +1 -1
  217. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/numbering/numbering.component.d.ts +3 -3
  218. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/print/print.component.d.ts +1 -1
  219. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/undo-redo/undo-redo.component.d.ts +1 -1
  220. package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/zoom/zoom.component.d.ts +1 -1
  221. package/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.d.ts +36 -0
  222. package/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/menu-dropdowns-mobile.component.d.ts +14 -0
  223. package/lib/apart-components/editor-toolbar/components/toolbar-actions/toolbar-actions.component.d.ts +23 -0
  224. package/lib/apart-components/editor-toolbar/editor-mobile-toolbar/editor-mobile-toolbar.component.d.ts +26 -0
  225. package/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.d.ts +40 -0
  226. package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +32 -0
  227. package/lib/apart-components/editor-toolbar/shared/constants/editor-toolbar-modes.const.d.ts +2 -0
  228. package/lib/apart-components/editor-toolbar/shared/constants/numbering-templates.const.d.ts +6 -0
  229. package/lib/apart-components/editor-toolbar/shared/enums/editor-toolbar-mode.enum.d.ts +9 -0
  230. package/lib/apart-components/editor-toolbar/shared/services/editor-toolbar.service.d.ts +14 -0
  231. package/lib/apart-components/editor-toolbar/shared/services/toolbar-core.service.d.ts +38 -0
  232. package/lib/{+shared/editor-toolbar/helpers → apart-components/editor-toolbar/shared}/toolbar-styles.helper.d.ts +2 -2
  233. package/lib/{+shared → apart-components}/insert-table/insert-table.component.d.ts +1 -1
  234. package/lib/apart-components/insert-table-mobile/insert-table-mobile.component.d.ts +30 -0
  235. package/lib/apart-components/text-format-mobile/text-format-mobile.component.d.ts +35 -0
  236. package/lib/{+shared/editor/core/models → editor/components/edges}/edge-element.model.d.ts +1 -1
  237. package/lib/editor/components/edges/edge.component.d.ts +44 -0
  238. package/lib/{+shared/editor/core → editor}/components/edges/edges.d.ts +7 -7
  239. package/lib/{+shared/editor → editor/components}/editor.component.d.ts +11 -11
  240. package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-sidenav.interface.d.ts +1 -1
  241. package/lib/{+shared/editor/custom-components → editor/components}/external-element/external.component.d.ts +4 -4
  242. package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/external-element.model.d.ts +2 -1
  243. package/lib/{+shared/editor/custom-components → editor/components}/image/components/image.component.d.ts +4 -4
  244. package/lib/editor/components/image/image-api.service.d.ts +17 -0
  245. package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/resizer.component.d.ts +2 -2
  246. package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/size-wrapper.d.ts +1 -1
  247. package/lib/{+shared/editor/custom-components → editor/components}/shared/abstract/base.component.d.ts +6 -4
  248. package/lib/editor/components/shared/abstract/destroy.component.d.ts +9 -0
  249. package/lib/{+shared/editor/custom-components/shared/helpers → editor/components/shared}/custom-component.hepler.d.ts +3 -3
  250. package/lib/editor/components/shared/custom-components.interface.d.ts +13 -0
  251. package/lib/editor/components/shared/custom-content.d.ts +5 -0
  252. package/lib/{+shared/editor/custom-components/shared/services/component → editor/components/shared/services}/component.service.d.ts +1 -1
  253. package/lib/editor/components/shared/services/custom-content.service.d.ts +33 -0
  254. package/lib/{+shared/editor/custom-components → editor/components}/tab/tab.component.d.ts +2 -2
  255. package/lib/{+shared/editor/custom-components → editor/components}/table/cell-resizer/cell-resizer.d.ts +2 -1
  256. package/lib/editor/components/table/components/table-cell.component.d.ts +45 -0
  257. package/lib/{+shared/editor/custom-components → editor/components}/table/components/table.component.d.ts +26 -11
  258. package/lib/{+shared/editor/custom-components → editor/components}/table/overlay-menu/overlay-menu.component.d.ts +2 -2
  259. package/lib/{+shared/editor/custom-components → editor/components}/table/selection/table-selection.d.ts +3 -3
  260. package/lib/{+shared/editor/core → editor/content}/constants/editor.const.d.ts +3 -3
  261. package/lib/editor/content/contents.interface.d.ts +22 -0
  262. package/lib/{+shared/editor/core/models → editor/content/display-data}/display-token.model.d.ts +1 -1
  263. package/lib/{+shared/editor/core → editor/content/display-data}/document.d.ts +9 -9
  264. package/lib/{+shared/editor/core/models → editor/content/display-data}/format-ext.model.d.ts +1 -1
  265. package/lib/{+shared/editor/execution/models → editor/content/display-data}/general-properties.model.d.ts +2 -1
  266. package/lib/{+shared/editor/core/models → editor/content/display-data}/line-info.model.d.ts +1 -0
  267. package/lib/{+shared/editor/core/layers → editor/content/display-data}/lines.d.ts +1 -1
  268. package/lib/editor/content/display-data/pages.wrap.d.ts +42 -0
  269. package/lib/{+shared/editor/core/paging → editor/content/display-data}/paragraph.d.ts +8 -5
  270. package/lib/{+shared/editor/core/paging → editor/content/display-data}/text-line-info.d.ts +4 -2
  271. package/lib/editor/content/helpers/content-style.helper.d.ts +11 -0
  272. package/lib/{+shared/editor → editor/content}/helpers/indexed-element.helper.d.ts +1 -1
  273. package/lib/editor/content/helpers/scaling.helper.d.ts +4 -0
  274. package/lib/{+shared/editor/core/paging → editor/content}/page-vertical-data.model.d.ts +1 -1
  275. package/lib/{+shared/editor/core/base → editor/core}/event-emitting.d.ts +0 -5
  276. package/lib/{+shared/editor/core → editor/display}/layers/cursor.layer.d.ts +7 -8
  277. package/lib/{+shared/editor/core/interfaces → editor/display/layers}/layer.config.d.ts +2 -2
  278. package/lib/{+shared/editor/core → editor/display}/layers/pages.layer.d.ts +5 -6
  279. package/lib/editor/display/layers/print.text.layer.d.ts +4 -0
  280. package/lib/{+shared/editor/core → editor/display}/layers/selection.layer.d.ts +5 -6
  281. package/lib/editor/display/layers/text.layer.d.ts +34 -0
  282. package/lib/{+shared/helpers → editor/display/print}/print.helper.d.ts +3 -3
  283. package/lib/editor/display/print/print.renderer.d.ts +23 -0
  284. package/lib/{+shared/editor/core/helpers → editor/display/print}/print.rendering.helper.d.ts +2 -2
  285. package/lib/{+shared/editor/core/models → editor/display}/render-changes.model.d.ts +1 -1
  286. package/lib/{+shared/editor/core → editor/display}/renderer.d.ts +10 -13
  287. package/lib/{+shared/editor/core/helpers → editor/display}/rendering.helper.d.ts +10 -10
  288. package/lib/{+shared/editor/core/layers → editor/display}/renderloop.d.ts +2 -2
  289. package/lib/{+shared/editor/core → editor/display}/virtual.renderer.d.ts +14 -29
  290. package/lib/editor/editor.module.d.ts +31 -0
  291. package/lib/{+shared/editor/core → editor/execution}/edit.session.d.ts +65 -63
  292. package/lib/{+shared/editor/core → editor/execution}/editor.d.ts +48 -42
  293. package/lib/editor/execution/helpers/delta.helper.d.ts +6 -0
  294. package/lib/{+shared/editor/core → editor/execution}/helpers/format-style.helper.d.ts +3 -5
  295. package/lib/{+shared/editor/core → editor/execution}/helpers/page.helper.d.ts +1 -1
  296. package/lib/{+shared/editor/core → editor/execution}/helpers/paragraph-style.helper.d.ts +1 -1
  297. package/lib/{+shared/editor/core → editor/execution}/helpers/paragraph.helper.d.ts +14 -8
  298. package/lib/{+shared/editor → editor}/execution/regulator.service.d.ts +16 -15
  299. package/lib/{+shared/editor/execution/models → editor/execution/targeting}/cell-session-source.model.d.ts +3 -3
  300. package/lib/{+shared/editor/execution/models → editor/execution/targeting}/edge-session-source.model.d.ts +3 -3
  301. package/lib/{+shared/editor/execution/models → editor/execution/targeting}/main-session-source.model.d.ts +1 -1
  302. package/lib/{+shared/editor/execution/models → editor/execution/targeting}/session-source.model.d.ts +1 -1
  303. package/lib/{+shared/editor/execution/models → editor/execution/targeting}/session.model.d.ts +3 -3
  304. package/lib/{+shared/editor/core/helpers → editor/gadgets/font-metrics}/font-metrics.helper.d.ts +1 -1
  305. package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operation-history.d.ts +9 -7
  306. package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operation.type.d.ts +2 -1
  307. package/lib/{+shared/editor/core/models → editor/gadgets/numbering}/numbering-data.model.d.ts +1 -1
  308. package/lib/{+shared/editor/core/helpers → editor/gadgets/numbering}/numbering.helper.d.ts +8 -8
  309. package/lib/{+shared/editor/helpers → editor/gadgets/page-break}/break.helper.d.ts +2 -2
  310. package/lib/{+shared/editor/core/layers → editor/gadgets}/scrollbar.d.ts +9 -18
  311. package/lib/{+shared/editor/core → editor/gadgets/search}/search.d.ts +4 -4
  312. package/lib/editor/interaction/base.handler.d.ts +9 -0
  313. package/lib/editor/interaction/document.handler.d.ts +10 -0
  314. package/lib/{+shared/editor → editor}/interaction/editor.service.d.ts +24 -18
  315. package/lib/{+shared/editor → editor}/interaction/input.handler.d.ts +4 -5
  316. package/lib/{+shared/editor → editor}/interaction/mouse.handler.d.ts +1 -1
  317. package/lib/{+shared/editor → editor}/operations/enums/command-type.enum.d.ts +11 -10
  318. package/lib/{+shared/editor → editor}/operations/helpers/break-operations.helper.d.ts +2 -2
  319. package/lib/{+shared/editor → editor}/operations/helpers/format-operations.helper.d.ts +2 -2
  320. package/lib/editor/operations/helpers/image-operations.helper.d.ts +7 -0
  321. package/lib/{+shared/editor → editor}/operations/helpers/indexed-element-operations.helper.d.ts +1 -1
  322. package/lib/{+shared/editor → editor}/operations/helpers/link-operations.helper.d.ts +1 -1
  323. package/lib/{+shared/editor → editor}/operations/helpers/numbering-operations.helper.d.ts +3 -3
  324. package/lib/{+shared/editor → editor}/operations/helpers/paragraph-operations.helper.d.ts +3 -2
  325. package/lib/{+shared/editor → editor}/operations/helpers/tab-operations.helper.d.ts +1 -1
  326. package/lib/{+shared/editor → editor}/operations/helpers/table-operations.helper.d.ts +6 -6
  327. package/lib/{+shared/editor/operations/helpers → editor/operations}/operations-helper.helper.d.ts +21 -19
  328. package/lib/{+shared/editor/operations/helpers → editor/operations}/save-commands.helper.d.ts +28 -22
  329. package/lib/editor/operations/target-operations.helper.d.ts +6 -0
  330. package/lib/{+shared/editor/helpers → editor/positioning}/content.helper.d.ts +10 -5
  331. package/lib/editor/positioning/cursor-paragraph.d.ts +7 -0
  332. package/lib/{+shared/editor/core/interfaces → editor/positioning}/cursor-position.interface.d.ts +1 -1
  333. package/lib/{+shared/editor/core/helpers → editor/positioning}/line-width.helper.d.ts +2 -2
  334. package/lib/{+shared/editor/core/helpers → editor/positioning}/position.helper.d.ts +9 -9
  335. package/lib/{+shared/editor/core → editor/positioning}/range.d.ts +12 -12
  336. package/lib/{+shared/editor → editor}/positioning/selection.d.ts +10 -10
  337. package/lib/editor/revision.helper.d.ts +15 -0
  338. package/lib/models/generated/cell.model.d.ts +1 -0
  339. package/lib/models/generated/command.model.d.ts +2 -0
  340. package/lib/models/generated/insert-paragraph.model.d.ts +10 -0
  341. package/lib/models/generated/replace.model.d.ts +2 -0
  342. package/package.json +1 -1
  343. package/public-api.d.ts +36 -30
  344. package/src/_ngx-noder.theme.scss +20 -13
  345. package/src/assets/fonts/nc-iconfont.css +112 -106
  346. package/src/assets/fonts/nc-iconfont.eot +0 -0
  347. package/src/assets/fonts/nc-iconfont.svg +4 -1
  348. package/src/assets/fonts/nc-iconfont.ttf +0 -0
  349. package/src/assets/fonts/nc-iconfont.woff +0 -0
  350. package/src/lib/{+shared → apart-components}/add-link-dialog/_add-link-dialog.theme.scss +4 -4
  351. package/src/lib/apart-components/add-link-mobile/_add-link-mobile.theme.scss +25 -0
  352. package/src/lib/apart-components/confirm-dialog/_theme.scss +30 -0
  353. package/src/lib/apart-components/editor-title/_editor-title.theme.scss +28 -0
  354. package/src/lib/apart-components/editor-title-mobile/_editor-title-mobile.theme.scss +42 -0
  355. package/src/lib/apart-components/editor-toolbar/_editor-toolbar.theme.scss +27 -0
  356. package/src/lib/apart-components/editor-toolbar/_theme.scss +25 -0
  357. package/src/lib/apart-components/editor-toolbar/components/buttons/color-picker/_color-picker.theme.scss +12 -0
  358. package/src/lib/apart-components/editor-toolbar/components/buttons/font/_font.theme.scss +12 -0
  359. package/src/lib/apart-components/editor-toolbar/components/buttons/font-size/_font-size.theme.scss +14 -0
  360. package/src/lib/apart-components/editor-toolbar/components/buttons/font-style/_font-style.theme.scss +21 -0
  361. package/src/lib/apart-components/editor-toolbar/components/buttons/format/_format.theme.scss +21 -0
  362. package/src/lib/apart-components/editor-toolbar/components/buttons/numbering/_numbering.theme.scss +70 -0
  363. package/src/lib/apart-components/editor-toolbar/components/buttons/undo-redo/_undo-redo.theme.scss +16 -0
  364. package/src/lib/apart-components/editor-toolbar/components/menu-dropdowns/_menu-dropdowns.theme.scss +26 -0
  365. package/src/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/_menu-dropdowns-mobile.theme.scss +33 -0
  366. package/src/lib/apart-components/editor-toolbar/components/toolbar-actions/_toolbar-actions.theme.scss +22 -0
  367. package/src/lib/{+shared → apart-components}/insert-table/_insert-table.theme.scss +10 -7
  368. package/src/lib/apart-components/insert-table-mobile/_insert-table-mobile.theme.scss +54 -0
  369. package/src/lib/apart-components/text-format-mobile/_text-format-mobile.theme.scss +86 -0
  370. package/src/lib/editor/_theme.scss +5 -0
  371. package/src/lib/editor/components/_editor.theme.scss +112 -0
  372. package/src/scss/_fonts.scss +3 -0
  373. package/src/scss/base-editor.scss +329 -0
  374. package/src/styles.scss +3 -58
  375. package/esm2022/lib/+shared/abstract/base-api.service.mjs +0 -99
  376. package/esm2022/lib/+shared/abstract/observer.component.mjs +0 -24
  377. package/esm2022/lib/+shared/confirm-dialog/confirm-dialog.component.mjs +0 -28
  378. package/esm2022/lib/+shared/constants/default-file-name.const.mjs +0 -2
  379. package/esm2022/lib/+shared/constants/paginator-sizes.const.mjs +0 -3
  380. package/esm2022/lib/+shared/editor/core/base/event-emitting.mjs +0 -71
  381. package/esm2022/lib/+shared/editor/core/components/edges/edge-type.enum.mjs +0 -6
  382. package/esm2022/lib/+shared/editor/core/components/edges/edge.component.mjs +0 -100
  383. package/esm2022/lib/+shared/editor/core/components/edges/edges.mjs +0 -104
  384. package/esm2022/lib/+shared/editor/core/constants/alignments.const.mjs +0 -8
  385. package/esm2022/lib/+shared/editor/core/constants/clipboardEventTypes.const.mjs +0 -6
  386. package/esm2022/lib/+shared/editor/core/constants/content-style-change.const.mjs +0 -15
  387. package/esm2022/lib/+shared/editor/core/constants/display-values.const.mjs +0 -8
  388. package/esm2022/lib/+shared/editor/core/constants/document-info.const.mjs +0 -13
  389. package/esm2022/lib/+shared/editor/core/constants/editor-version.const.mjs +0 -2
  390. package/esm2022/lib/+shared/editor/core/constants/editor.const.mjs +0 -62
  391. package/esm2022/lib/+shared/editor/core/constants/unicode-chars.const.mjs +0 -5
  392. package/esm2022/lib/+shared/editor/core/document.mjs +0 -134
  393. package/esm2022/lib/+shared/editor/core/edit.session.mjs +0 -1102
  394. package/esm2022/lib/+shared/editor/core/editor.mjs +0 -1279
  395. package/esm2022/lib/+shared/editor/core/enums/break-types.enum.mjs +0 -7
  396. package/esm2022/lib/+shared/editor/core/enums/mouse-button.enum.mjs +0 -7
  397. package/esm2022/lib/+shared/editor/core/enums/page-type.enum.mjs +0 -7
  398. package/esm2022/lib/+shared/editor/core/helpers/content-style.helper.mjs +0 -156
  399. package/esm2022/lib/+shared/editor/core/helpers/delta.helper.mjs +0 -18
  400. package/esm2022/lib/+shared/editor/core/helpers/dom.helper.mjs +0 -42
  401. package/esm2022/lib/+shared/editor/core/helpers/event.helper.mjs +0 -18
  402. package/esm2022/lib/+shared/editor/core/helpers/font-metrics.helper.mjs +0 -88
  403. package/esm2022/lib/+shared/editor/core/helpers/format-style.helper.mjs +0 -72
  404. package/esm2022/lib/+shared/editor/core/helpers/line-width.helper.mjs +0 -13
  405. package/esm2022/lib/+shared/editor/core/helpers/numbering.helper.mjs +0 -83
  406. package/esm2022/lib/+shared/editor/core/helpers/page.helper.mjs +0 -12
  407. package/esm2022/lib/+shared/editor/core/helpers/paragraph-style.helper.mjs +0 -41
  408. package/esm2022/lib/+shared/editor/core/helpers/paragraph.helper.mjs +0 -132
  409. package/esm2022/lib/+shared/editor/core/helpers/position.helper.mjs +0 -191
  410. package/esm2022/lib/+shared/editor/core/helpers/print.rendering.helper.mjs +0 -7
  411. package/esm2022/lib/+shared/editor/core/helpers/rendering.helper.mjs +0 -186
  412. package/esm2022/lib/+shared/editor/core/helpers/unicode.helper.mjs +0 -20
  413. package/esm2022/lib/+shared/editor/core/interfaces/cell.interface.mjs +0 -2
  414. package/esm2022/lib/+shared/editor/core/interfaces/cursor-position.interface.mjs +0 -2
  415. package/esm2022/lib/+shared/editor/core/interfaces/font-metric-size.interface.mjs +0 -2
  416. package/esm2022/lib/+shared/editor/core/interfaces/layer.config.mjs +0 -2
  417. package/esm2022/lib/+shared/editor/core/interfaces/paragraph-info.interface.mjs +0 -2
  418. package/esm2022/lib/+shared/editor/core/interfaces/render-changes.interface.mjs +0 -2
  419. package/esm2022/lib/+shared/editor/core/interfaces/replace.interface.mjs +0 -2
  420. package/esm2022/lib/+shared/editor/core/interfaces/search-iteration.interface.mjs +0 -2
  421. package/esm2022/lib/+shared/editor/core/interfaces/toolbar-styles.interface.mjs +0 -2
  422. package/esm2022/lib/+shared/editor/core/interfaces/visible-line-info.interface.mjs +0 -2
  423. package/esm2022/lib/+shared/editor/core/interfaces/visible-range.interface.mjs +0 -2
  424. package/esm2022/lib/+shared/editor/core/keyboard/text-input.mjs +0 -53
  425. package/esm2022/lib/+shared/editor/core/layers/cursor.layer.mjs +0 -103
  426. package/esm2022/lib/+shared/editor/core/layers/edges.layer.mjs +0 -99
  427. package/esm2022/lib/+shared/editor/core/layers/lines.mjs +0 -96
  428. package/esm2022/lib/+shared/editor/core/layers/pages.layer.mjs +0 -106
  429. package/esm2022/lib/+shared/editor/core/layers/print.edges.layer.mjs +0 -7
  430. package/esm2022/lib/+shared/editor/core/layers/print.pages.layer.mjs +0 -7
  431. package/esm2022/lib/+shared/editor/core/layers/print.text.layer.mjs +0 -7
  432. package/esm2022/lib/+shared/editor/core/layers/renderloop.mjs +0 -26
  433. package/esm2022/lib/+shared/editor/core/layers/scrollbar.mjs +0 -100
  434. package/esm2022/lib/+shared/editor/core/layers/selection.layer.mjs +0 -115
  435. package/esm2022/lib/+shared/editor/core/layers/text.layer.mjs +0 -124
  436. package/esm2022/lib/+shared/editor/core/models/display-token.model.mjs +0 -12
  437. package/esm2022/lib/+shared/editor/core/models/distance.model.mjs +0 -10
  438. package/esm2022/lib/+shared/editor/core/models/edge-element.model.mjs +0 -9
  439. package/esm2022/lib/+shared/editor/core/models/format-ext.model.mjs +0 -10
  440. package/esm2022/lib/+shared/editor/core/models/indent.model.mjs +0 -9
  441. package/esm2022/lib/+shared/editor/core/models/line-info.model.mjs +0 -9
  442. package/esm2022/lib/+shared/editor/core/models/margin.model.mjs +0 -16
  443. package/esm2022/lib/+shared/editor/core/models/numbering-data.model.mjs +0 -9
  444. package/esm2022/lib/+shared/editor/core/models/render-changes.model.mjs +0 -25
  445. package/esm2022/lib/+shared/editor/core/paging/page-vertical-data.model.mjs +0 -9
  446. package/esm2022/lib/+shared/editor/core/paging/pages.wrap.mjs +0 -219
  447. package/esm2022/lib/+shared/editor/core/paging/paragraph.mjs +0 -52
  448. package/esm2022/lib/+shared/editor/core/paging/text-line-info.mjs +0 -34
  449. package/esm2022/lib/+shared/editor/core/point.mjs +0 -13
  450. package/esm2022/lib/+shared/editor/core/print.renderer.mjs +0 -72
  451. package/esm2022/lib/+shared/editor/core/range.mjs +0 -94
  452. package/esm2022/lib/+shared/editor/core/renderer.mjs +0 -217
  453. package/esm2022/lib/+shared/editor/core/search.mjs +0 -231
  454. package/esm2022/lib/+shared/editor/core/virtual.renderer.mjs +0 -356
  455. package/esm2022/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.mjs +0 -35
  456. package/esm2022/lib/+shared/editor/custom-components/external-element/external-element.service.mjs +0 -6
  457. package/esm2022/lib/+shared/editor/custom-components/external-element/external-elements.const.mjs +0 -4
  458. package/esm2022/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.mjs +0 -2
  459. package/esm2022/lib/+shared/editor/custom-components/external-element/external.component.mjs +0 -41
  460. package/esm2022/lib/+shared/editor/custom-components/external-element/models/element-data.model.mjs +0 -9
  461. package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-element.model.mjs +0 -10
  462. package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.mjs +0 -15
  463. package/esm2022/lib/+shared/editor/custom-components/image/components/image.component.mjs +0 -87
  464. package/esm2022/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.mjs +0 -38
  465. package/esm2022/lib/+shared/editor/custom-components/image/interfaces/size.mjs +0 -2
  466. package/esm2022/lib/+shared/editor/custom-components/image/resizer/coordinate.mjs +0 -2
  467. package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.mjs +0 -19
  468. package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction.enum.mjs +0 -12
  469. package/esm2022/lib/+shared/editor/custom-components/image/resizer/resizer.component.mjs +0 -106
  470. package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-delta.mjs +0 -2
  471. package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-wrapper.mjs +0 -52
  472. package/esm2022/lib/+shared/editor/custom-components/image/services/image-api.service.mjs +0 -14
  473. package/esm2022/lib/+shared/editor/custom-components/shared/abstract/base.component.mjs +0 -57
  474. package/esm2022/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.mjs +0 -3
  475. package/esm2022/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.mjs +0 -43
  476. package/esm2022/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.mjs +0 -2
  477. package/esm2022/lib/+shared/editor/custom-components/shared/services/component/component.service.mjs +0 -64
  478. package/esm2022/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.mjs +0 -120
  479. package/esm2022/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.mjs +0 -55
  480. package/esm2022/lib/+shared/editor/custom-components/shared/types/custom-content.mjs +0 -2
  481. package/esm2022/lib/+shared/editor/custom-components/tab/tab.component.mjs +0 -43
  482. package/esm2022/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.mjs +0 -118
  483. package/esm2022/lib/+shared/editor/custom-components/table/components/table-cell.component.mjs +0 -95
  484. package/esm2022/lib/+shared/editor/custom-components/table/components/table.component.mjs +0 -293
  485. package/esm2022/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.mjs +0 -8
  486. package/esm2022/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.mjs +0 -6
  487. package/esm2022/lib/+shared/editor/custom-components/table/models/cell-data.model.mjs +0 -18
  488. package/esm2022/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.mjs +0 -9
  489. package/esm2022/lib/+shared/editor/custom-components/table/models/row-data.model.mjs +0 -8
  490. package/esm2022/lib/+shared/editor/custom-components/table/models/selection-range.model.mjs +0 -7
  491. package/esm2022/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.mjs +0 -74
  492. package/esm2022/lib/+shared/editor/custom-components/table/selection/table-selection.mjs +0 -358
  493. package/esm2022/lib/+shared/editor/editor.component.mjs +0 -103
  494. package/esm2022/lib/+shared/editor/editor.module.mjs +0 -85
  495. package/esm2022/lib/+shared/editor/execution/models/cell-session-source.model.mjs +0 -19
  496. package/esm2022/lib/+shared/editor/execution/models/edge-session-source.model.mjs +0 -15
  497. package/esm2022/lib/+shared/editor/execution/models/general-properties.model.mjs +0 -11
  498. package/esm2022/lib/+shared/editor/execution/models/main-session-source.model.mjs +0 -8
  499. package/esm2022/lib/+shared/editor/execution/models/session-source.model.mjs +0 -3
  500. package/esm2022/lib/+shared/editor/execution/models/session.model.mjs +0 -10
  501. package/esm2022/lib/+shared/editor/execution/regulator.service.mjs +0 -193
  502. package/esm2022/lib/+shared/editor/helpers/break.helper.mjs +0 -18
  503. package/esm2022/lib/+shared/editor/helpers/content.helper.mjs +0 -30
  504. package/esm2022/lib/+shared/editor/helpers/tab.helper.mjs +0 -6
  505. package/esm2022/lib/+shared/editor/interaction/editor.service.mjs +0 -309
  506. package/esm2022/lib/+shared/editor/interaction/input.handler.mjs +0 -160
  507. package/esm2022/lib/+shared/editor/interaction/mouse.handler.mjs +0 -49
  508. package/esm2022/lib/+shared/editor/interfaces/contents.interface.mjs +0 -2
  509. package/esm2022/lib/+shared/editor/interfaces/insert-index.interface.mjs +0 -2
  510. package/esm2022/lib/+shared/editor/operation-history/operation-history.mjs +0 -184
  511. package/esm2022/lib/+shared/editor/operation-history/operation.type.mjs +0 -2
  512. package/esm2022/lib/+shared/editor/operation-history/operations-history-info.model.mjs +0 -7
  513. package/esm2022/lib/+shared/editor/operations/enums/command-type.enum.mjs +0 -31
  514. package/esm2022/lib/+shared/editor/operations/enums/target-type.enum.mjs +0 -7
  515. package/esm2022/lib/+shared/editor/operations/helpers/break-operations.helper.mjs +0 -9
  516. package/esm2022/lib/+shared/editor/operations/helpers/content-operations.helper.mjs +0 -15
  517. package/esm2022/lib/+shared/editor/operations/helpers/format-operations.helper.mjs +0 -56
  518. package/esm2022/lib/+shared/editor/operations/helpers/image-operations.helper.mjs +0 -19
  519. package/esm2022/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.mjs +0 -43
  520. package/esm2022/lib/+shared/editor/operations/helpers/link-operations.helper.mjs +0 -28
  521. package/esm2022/lib/+shared/editor/operations/helpers/numbering-operations.helper.mjs +0 -55
  522. package/esm2022/lib/+shared/editor/operations/helpers/operations-helper.helper.mjs +0 -394
  523. package/esm2022/lib/+shared/editor/operations/helpers/paragraph-operations.helper.mjs +0 -83
  524. package/esm2022/lib/+shared/editor/operations/helpers/save-commands.helper.mjs +0 -118
  525. package/esm2022/lib/+shared/editor/operations/helpers/tab-operations.helper.mjs +0 -16
  526. package/esm2022/lib/+shared/editor/operations/helpers/table-operations.helper.mjs +0 -371
  527. package/esm2022/lib/+shared/editor/operations/helpers/target-operations.helper.mjs +0 -23
  528. package/esm2022/lib/+shared/editor/positioning/selection.mjs +0 -307
  529. package/esm2022/lib/+shared/editor/store/editor.actions.mjs +0 -13
  530. package/esm2022/lib/+shared/editor-header/editor-header.component.mjs +0 -314
  531. package/esm2022/lib/+shared/editor-search/editor-search-dialog.component.mjs +0 -71
  532. package/esm2022/lib/+shared/editor-toolbar/color-picker/color-picker.component.mjs +0 -32
  533. package/esm2022/lib/+shared/editor-toolbar/constants/svg-icons.const.mjs +0 -157
  534. package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.component.mjs +0 -115
  535. package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.module.mjs +0 -107
  536. package/esm2022/lib/+shared/editor-toolbar/enums/alignment.enum.mjs +0 -8
  537. package/esm2022/lib/+shared/editor-toolbar/enums/numbering-type.enum.mjs +0 -6
  538. package/esm2022/lib/+shared/editor-toolbar/font/font.component.mjs +0 -45
  539. package/esm2022/lib/+shared/editor-toolbar/font-size/font-size.component.mjs +0 -85
  540. package/esm2022/lib/+shared/editor-toolbar/font-style/font-style.component.mjs +0 -80
  541. package/esm2022/lib/+shared/editor-toolbar/format/format.component.mjs +0 -28
  542. package/esm2022/lib/+shared/editor-toolbar/heading/heading.component.mjs +0 -23
  543. package/esm2022/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.mjs +0 -55
  544. package/esm2022/lib/+shared/editor-toolbar/numbering/numbering.component.mjs +0 -53
  545. package/esm2022/lib/+shared/editor-toolbar/print/print.component.mjs +0 -18
  546. package/esm2022/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.mjs +0 -27
  547. package/esm2022/lib/+shared/editor-toolbar/zoom/zoom.component.mjs +0 -74
  548. package/esm2022/lib/+shared/helpers/print.helper.mjs +0 -40
  549. package/esm2022/lib/+shared/insert-table/insert-table.component.mjs +0 -54
  550. package/esm2022/lib/+shared/services/commands.service.mjs +0 -20
  551. package/esm2022/lib/+shared/services/custom-icon.service.mjs +0 -34
  552. package/lib/+shared/abstract/base-api.service.d.ts +0 -23
  553. package/lib/+shared/abstract/observer.component.d.ts +0 -10
  554. package/lib/+shared/constants/default-file-name.const.d.ts +0 -1
  555. package/lib/+shared/constants/paginator-sizes.const.d.ts +0 -2
  556. package/lib/+shared/editor/core/components/edges/edge.component.d.ts +0 -45
  557. package/lib/+shared/editor/core/constants/clipboardEventTypes.const.d.ts +0 -5
  558. package/lib/+shared/editor/core/constants/content-style-change.const.d.ts +0 -14
  559. package/lib/+shared/editor/core/helpers/content-style.helper.d.ts +0 -16
  560. package/lib/+shared/editor/core/helpers/delta.helper.d.ts +0 -6
  561. package/lib/+shared/editor/core/interfaces/visible-line-info.interface.d.ts +0 -5
  562. package/lib/+shared/editor/core/layers/edges.layer.d.ts +0 -24
  563. package/lib/+shared/editor/core/layers/print.edges.layer.d.ts +0 -4
  564. package/lib/+shared/editor/core/layers/print.text.layer.d.ts +0 -5
  565. package/lib/+shared/editor/core/layers/text.layer.d.ts +0 -22
  566. package/lib/+shared/editor/core/paging/pages.wrap.d.ts +0 -41
  567. package/lib/+shared/editor/core/point.d.ts +0 -7
  568. package/lib/+shared/editor/core/print.renderer.d.ts +0 -25
  569. package/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.d.ts +0 -14
  570. package/lib/+shared/editor/custom-components/image/services/image-api.service.d.ts +0 -8
  571. package/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.d.ts +0 -13
  572. package/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.d.ts +0 -30
  573. package/lib/+shared/editor/custom-components/shared/types/custom-content.d.ts +0 -5
  574. package/lib/+shared/editor/custom-components/table/components/table-cell.component.d.ts +0 -45
  575. package/lib/+shared/editor/editor.module.d.ts +0 -30
  576. package/lib/+shared/editor/interfaces/contents.interface.d.ts +0 -22
  577. package/lib/+shared/editor/operations/helpers/image-operations.helper.d.ts +0 -7
  578. package/lib/+shared/editor/operations/helpers/target-operations.helper.d.ts +0 -6
  579. package/lib/+shared/editor/store/editor.actions.d.ts +0 -11
  580. package/lib/+shared/editor-header/editor-header.component.d.ts +0 -101
  581. package/lib/+shared/editor-toolbar/constants/numbering-templates.const.d.ts +0 -6
  582. package/lib/+shared/editor-toolbar/editor-toolbar.component.d.ts +0 -44
  583. package/lib/+shared/editor-toolbar/editor-toolbar.module.d.ts +0 -28
  584. package/src/lib/+shared/editor/_editor.theme.scss +0 -35
  585. package/src/lib/+shared/editor/custom-components/external-element/element-toolbar/_element-toolbar.theme.scss +0 -10
  586. package/src/lib/+shared/editor-header/_editor-header.theme.scss +0 -106
  587. package/src/lib/+shared/editor-toolbar/_editor-toolbar.theme.scss +0 -33
  588. package/src/lib/+shared/editor-toolbar/numbering/_numbering.theme.scss +0 -29
  589. /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/constants/svg-icons.const.d.ts +0 -0
  590. /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/alignment.enum.d.ts +0 -0
  591. /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-template-type.enum.d.ts +0 -0
  592. /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-type.enum.d.ts +0 -0
  593. /package/lib/{+shared → apart-components/editor-toolbar/shared}/services/custom-icon.service.d.ts +0 -0
  594. /package/lib/{+shared/editor/core → editor}/components/edges/edge-type.enum.d.ts +0 -0
  595. /package/lib/{+shared/editor/core/enums → editor/components/edges}/page-type.enum.d.ts +0 -0
  596. /package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-element.service.d.ts +0 -0
  597. /package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-elements.const.d.ts +0 -0
  598. /package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/element-data.model.d.ts +0 -0
  599. /package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/external-sidenav.model.d.ts +0 -0
  600. /package/lib/{+shared/editor/custom-components → editor/components}/image/input-handler/image-input.handler.d.ts +0 -0
  601. /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/coordinate.d.ts +0 -0
  602. /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/direction-wrapper.d.ts +0 -0
  603. /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/direction.enum.d.ts +0 -0
  604. /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/size-delta.d.ts +0 -0
  605. /package/lib/{+shared/editor/custom-components/image/interfaces → editor/components/image}/size.d.ts +0 -0
  606. /package/lib/{+shared/editor/custom-components/shared/constants → editor/components/shared}/custom-content-markers.const.d.ts +0 -0
  607. /package/lib/{+shared/editor/custom-components/shared/services/overlay → editor/components/shared/services}/overlay.service.d.ts +0 -0
  608. /package/lib/{+shared/editor/helpers → editor/components/tab}/tab.helper.d.ts +0 -0
  609. /package/lib/{+shared/editor/core → editor/components/table}/enums/hrule.enum.d.ts +0 -0
  610. /package/lib/{+shared/editor/custom-components → editor/components}/table/enums/reisizer-side.enum.d.ts +0 -0
  611. /package/lib/{+shared/editor/custom-components → editor/components}/table/enums/vertical-merge.enum.d.ts +0 -0
  612. /package/lib/{+shared/editor/custom-components → editor/components}/table/models/cell-data.model.d.ts +0 -0
  613. /package/lib/{+shared/editor/custom-components → editor/components}/table/models/cell-resizer-parameters.model.d.ts +0 -0
  614. /package/lib/{+shared/editor/custom-components → editor/components}/table/models/row-data.model.d.ts +0 -0
  615. /package/lib/{+shared/editor/custom-components → editor/components}/table/models/selection-range.model.d.ts +0 -0
  616. /package/lib/{+shared/editor/core → editor/content}/constants/display-values.const.d.ts +0 -0
  617. /package/lib/{+shared/editor/core → editor/content}/constants/document-info.const.d.ts +0 -0
  618. /package/lib/{+shared/editor/core/models → editor/content/display-data}/indent.model.d.ts +0 -0
  619. /package/lib/{+shared/editor/core/interfaces → editor/content/display-data}/paragraph-info.interface.d.ts +0 -0
  620. /package/lib/{+shared/editor/core/interfaces → editor/content/display-data}/toolbar-styles.interface.d.ts +0 -0
  621. /package/lib/{+shared/editor → editor/content}/helpers/format.helper.d.ts +0 -0
  622. /package/lib/{+shared/editor/core/models → editor/content}/margin.model.d.ts +0 -0
  623. /package/lib/{+shared/editor/core/enums → editor/content}/vertical-alignment.enum.d.ts +0 -0
  624. /package/lib/{+shared/editor/core/interfaces → editor/display}/cell.interface.d.ts +0 -0
  625. /package/lib/{+shared/editor/core/helpers → editor/display}/event.helper.d.ts +0 -0
  626. /package/lib/{+shared/editor/core → editor/display}/layers/print.pages.layer.d.ts +0 -0
  627. /package/lib/{+shared/editor/core/interfaces → editor/display}/render-changes.interface.d.ts +0 -0
  628. /package/lib/{+shared/editor/core/interfaces → editor/display}/visible-range.interface.d.ts +0 -0
  629. /package/lib/{+shared/editor/core/models → editor/execution}/distance.model.d.ts +0 -0
  630. /package/lib/{+shared/editor/core → editor/execution}/helpers/dom.helper.d.ts +0 -0
  631. /package/lib/{+shared/editor/core/constants → editor/gadgets/font-metrics}/editor-version.const.d.ts +0 -0
  632. /package/lib/{+shared/editor/core/interfaces → editor/gadgets/font-metrics}/font-metric-size.interface.d.ts +0 -0
  633. /package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operations-history-info.model.d.ts +0 -0
  634. /package/lib/{+shared/editor/core/enums → editor/gadgets/numbering}/numbering-marker-type.enum.d.ts +0 -0
  635. /package/lib/{+shared/editor/core/enums → editor/gadgets/page-break}/break-types.enum.d.ts +0 -0
  636. /package/lib/{+shared/editor/core/interfaces → editor/gadgets/search}/replace.interface.d.ts +0 -0
  637. /package/lib/{+shared/editor/core/interfaces → editor/gadgets/search}/search-iteration.interface.d.ts +0 -0
  638. /package/lib/{+shared/editor/core/constants → editor/gadgets/unicode}/unicode-chars.const.d.ts +0 -0
  639. /package/lib/{+shared/editor/core/helpers → editor/gadgets/unicode}/unicode.helper.d.ts +0 -0
  640. /package/lib/{+shared/enums → editor/interaction}/mode.enum.d.ts +0 -0
  641. /package/lib/{+shared/editor/core/enums → editor/interaction}/mouse-button.enum.d.ts +0 -0
  642. /package/lib/{+shared/editor/core/keyboard → editor/interaction}/text-input.d.ts +0 -0
  643. /package/lib/{+shared/services → editor/operations}/commands.service.d.ts +0 -0
  644. /package/lib/{+shared/editor → editor}/operations/enums/target-type.enum.d.ts +0 -0
  645. /package/lib/{+shared/editor → editor}/operations/helpers/content-operations.helper.d.ts +0 -0
  646. /package/lib/{+shared/editor/core/constants → editor/positioning}/alignments.const.d.ts +0 -0
  647. /package/lib/{+shared/editor/interfaces → editor/positioning}/insert-index.interface.d.ts +0 -0
@@ -1,307 +0,0 @@
1
- import { ContentHelper } from '../helpers/content.helper';
2
- import { Point } from '../core/point';
3
- import { PositionHelper } from '../core/helpers/position.helper';
4
- import { Range } from '../core/range';
5
- export class Selection {
6
- constructor() {
7
- this.anchor = null;
8
- this.cursor = new Point(0, 0);
9
- this.keepLinePositionX = null;
10
- }
11
- get isEmpty() {
12
- return this.anchor === null || (this.anchor.row === this.cursor.row && this.anchor.column === this.cursor.column);
13
- }
14
- get isBackwards() {
15
- return this.anchor.row > this.cursor.row || (this.anchor.row === this.cursor.row && this.anchor.column > this.cursor.column);
16
- }
17
- get range() {
18
- const cursor = new Point(this.cursor.row, this.cursor.column);
19
- if (this.isEmpty) {
20
- return new Range(cursor, cursor);
21
- }
22
- const anchor = new Point(this.anchor.row, this.anchor.column);
23
- return this.isBackwards ? new Range(cursor, anchor) : new Range(anchor, cursor);
24
- }
25
- placeCursor(cursor) {
26
- this.cursor = cursor;
27
- this.anchor = null;
28
- this.keepLinePositionX = null;
29
- }
30
- moveCursor(cursor) {
31
- this.cursor = cursor;
32
- this.keepLinePositionX = null;
33
- }
34
- placeSelection(cursor, anchor) {
35
- this.cursor = cursor;
36
- this.anchor = anchor;
37
- this.keepLinePositionX = null;
38
- }
39
- moveSelection(position) {
40
- if (!this.anchor) {
41
- this.anchor = this.cursor;
42
- }
43
- this.moveCursor(position);
44
- }
45
- clearSelection() {
46
- this.anchor = null;
47
- this.keepLinePositionX = null;
48
- }
49
- selectAll(model) {
50
- const last = model.paragraphs.length - 1;
51
- const length = last > 0 ? model.contentLength - model.paragraphs[last - 1].insertIndex - 1 : model.contentLength;
52
- this.placeSelection(new Point(0, 0), new Point(last, length));
53
- }
54
- selectUp(session) {
55
- if (!this.anchor) {
56
- this.anchor = this.cursor;
57
- }
58
- this.moveCursorUp(session, this.cursor);
59
- }
60
- navigateUp(session) {
61
- const position = this.isEmpty || this.isBackwards ? this.cursor : this.anchor;
62
- this.moveCursorUp(session, position);
63
- this.anchor = null;
64
- }
65
- selectDown(session) {
66
- if (!this.anchor) {
67
- this.anchor = this.cursor;
68
- }
69
- this.moveCursorDown(session, this.cursor);
70
- }
71
- navigateDown(session) {
72
- const position = this.isEmpty || !this.isBackwards ? this.cursor : this.anchor;
73
- this.moveCursorDown(session, position);
74
- this.anchor = null;
75
- }
76
- selectRight(session) {
77
- const position = this.getCursorRight(session);
78
- this.moveSelection(position);
79
- }
80
- navigateRight(session) {
81
- if (this.isEmpty) {
82
- const position = this.getCursorRight(session);
83
- this.placeCursor(position);
84
- }
85
- else {
86
- const position = !this.isBackwards ? this.cursor : this.anchor;
87
- this.placeCursor(position);
88
- }
89
- }
90
- selectLeft(session) {
91
- const position = this.getCursorLeft(session);
92
- this.moveSelection(position);
93
- }
94
- navigateLeft(session) {
95
- if (this.isEmpty) {
96
- const position = this.getCursorLeft(session);
97
- this.placeCursor(position);
98
- }
99
- else {
100
- const position = this.isBackwards ? this.cursor : this.anchor;
101
- this.placeCursor(position);
102
- }
103
- }
104
- selectLineStart(session) {
105
- const position = this.getLineStart(session, this.cursor);
106
- this.moveSelection(position);
107
- }
108
- navigateLineStart(session) {
109
- const position = this.getLineStart(session, this.cursor);
110
- this.placeCursor(position);
111
- }
112
- selectLineEnd(session) {
113
- const position = this.getLineEnd(session, this.cursor);
114
- this.moveSelection(position);
115
- }
116
- navigateLineEnd(session) {
117
- const position = this.getLineEnd(session, this.cursor);
118
- this.placeCursor(position);
119
- }
120
- selectFileEnd(session) {
121
- const paragraph = session.document.lines.length - 1;
122
- const paragraphIndex = session.document.lines[paragraph].length;
123
- this.moveSelection(new Point(paragraph, paragraphIndex));
124
- }
125
- navigateFileEnd(session) {
126
- const paragraph = session.document.lines.length - 1;
127
- const paragraphIndex = session.document.lines[paragraph].length;
128
- this.placeCursor(new Point(paragraph, paragraphIndex));
129
- }
130
- selectFileStart() {
131
- this.moveSelection(new Point(0, 0));
132
- }
133
- navigateFileStart() {
134
- this.placeCursor(new Point(0, 0));
135
- }
136
- selectWordRight(session) {
137
- const position = this.getWordRight(session, this.cursor);
138
- this.moveSelection(position);
139
- }
140
- navigateWordRight(session) {
141
- const position = this.getWordRight(session, this.cursor);
142
- this.placeCursor(position);
143
- }
144
- selectWordLeft(session) {
145
- const position = this.getWordLeft(session, this.cursor);
146
- this.moveSelection(position);
147
- }
148
- navigateWordLeft(session) {
149
- const position = this.getWordLeft(session, this.cursor);
150
- this.placeCursor(position);
151
- }
152
- moveCursorUp(session, position) {
153
- const line = PositionHelper.documentToScreen(session, position.row, position.column);
154
- if (line.row === 0) {
155
- this.selectLineStart(session);
156
- }
157
- else {
158
- this.moveToLine(session, line.row - 1, line);
159
- }
160
- }
161
- moveCursorDown(session, position) {
162
- const line = PositionHelper.documentToScreen(session, position.row, position.column);
163
- const paragraphsCount = session.pagesWrap.paragraphs.length;
164
- const lastParagraph = session.pagesWrap.paragraphs[paragraphsCount - 1];
165
- const lastParagraphLine = lastParagraph.textLinesInfo[lastParagraph.textLinesInfo.length - 1].screenLine;
166
- if (line.row === lastParagraphLine) {
167
- this.selectLineEnd(session);
168
- }
169
- else {
170
- this.moveToLine(session, line.row + 1, line);
171
- }
172
- }
173
- moveToLine(session, line, fromLine) {
174
- if (!this.keepLinePositionX) {
175
- this.keepLinePositionX = PositionHelper.screenToPixel(session, fromLine.row, fromLine.column).pageX;
176
- }
177
- const column = PositionHelper.getApproximatePosition(session, line, this.keepLinePositionX);
178
- this.cursor = PositionHelper.screenToDocument(session, line, column);
179
- }
180
- getCursorLeft(session) {
181
- if (this.cursor.row === 0 && this.cursor.column === 0) {
182
- return this.cursor;
183
- }
184
- const index = ContentHelper.paragraphPositionToDocumentIndex(session.wrapParagraphIndex, this.cursor);
185
- return ContentHelper.documentIndexToParagraphIndex(session.wrapParagraphIndex, index - 1);
186
- }
187
- getCursorRight(session) {
188
- const last = session.pagesWrap.paragraphs.length - 1;
189
- if (this.cursor.row === last && this.cursor.column === session.document.lines[last].length) {
190
- return this.cursor;
191
- }
192
- const index = ContentHelper.paragraphPositionToDocumentIndex(session.wrapParagraphIndex, this.cursor);
193
- return ContentHelper.documentIndexToParagraphIndex(session.wrapParagraphIndex, index + 1);
194
- }
195
- getLineStart(session, position) {
196
- const line = PositionHelper.documentToScreen(session, position.row, position.column);
197
- return PositionHelper.screenToDocument(session, line.row, 0);
198
- }
199
- getLineEnd(session, position) {
200
- const line = PositionHelper.documentToScreen(session, position.row, position.column);
201
- const paragraphLength = session.document.lines[position.row].length;
202
- const linesCount = session.pagesWrap.paragraphs[position.row].textLinesInfo.length;
203
- if (linesCount === 1) {
204
- return PositionHelper.screenToDocument(session, line.row, paragraphLength);
205
- }
206
- const paragraphLine = line.row - session.wrapParagraphLine[position.row];
207
- let index;
208
- if (paragraphLine === 0) {
209
- index = session.wrapData[position.row][0];
210
- }
211
- else if (paragraphLine === linesCount - 1) {
212
- index = paragraphLength - session.wrapData[position.row][paragraphLine - 1];
213
- }
214
- else {
215
- index = session.wrapData[position.row][paragraphLine] - session.wrapData[position.row][paragraphLine - 1];
216
- }
217
- return PositionHelper.screenToDocument(session, line.row, index);
218
- }
219
- getWordRight(session, position) {
220
- let row = position.row;
221
- let column = position.column;
222
- const line = session.document.lines[row];
223
- const documentLength = session.document.lines.length;
224
- if (row + 1 >= documentLength && column === line.length) {
225
- return position;
226
- }
227
- let rightOfCursor = line.substring(column);
228
- if (column === line.length) {
229
- do {
230
- row++;
231
- rightOfCursor = session.document.lines[row];
232
- } while (row < documentLength && /^\s*$/.test(rightOfCursor));
233
- if (!/^\s+/.test(rightOfCursor)) {
234
- rightOfCursor = '';
235
- }
236
- column = 0;
237
- }
238
- const index = this.shortWordEndIndex(session.tokenRe, rightOfCursor);
239
- return new Point(row, column + index);
240
- }
241
- getWordLeft(session, position) {
242
- let row = position.row;
243
- let column = position.column;
244
- if (column === 0 && row === 0) {
245
- return position;
246
- }
247
- let line = session.document.lines[row].substring(0, column);
248
- if (column === 0) {
249
- do {
250
- row--;
251
- line = session.document.lines[row];
252
- } while (row > 0 && /^\s*$/.test(line));
253
- column = line.length;
254
- if (!/\s+$/.test(line)) {
255
- line = '';
256
- }
257
- }
258
- const leftOfCursor = line.split('').reverse().join('');
259
- const index = this.shortWordEndIndex(session.tokenRe, leftOfCursor);
260
- return new Point(row, column - index);
261
- }
262
- shortWordEndIndex(tokenRe, rightOfCursor) {
263
- let index;
264
- tokenRe.lastIndex = 0;
265
- if (tokenRe.exec(rightOfCursor)) {
266
- index = tokenRe.lastIndex;
267
- }
268
- else {
269
- index = this.handleNoTokenFound(tokenRe, rightOfCursor);
270
- }
271
- tokenRe.lastIndex = 0;
272
- return index;
273
- }
274
- handleNoTokenFound(tokenRe, rightOfCursor) {
275
- const whitespaceRe = /\s/;
276
- let index = 0;
277
- while (rightOfCursor[index] && whitespaceRe.test(rightOfCursor[index])) {
278
- index++;
279
- }
280
- if (index < 1) {
281
- index = this.handleNoWhitespaceFound(tokenRe, rightOfCursor, whitespaceRe);
282
- }
283
- return index;
284
- }
285
- handleNoWhitespaceFound(tokenRe, rightOfCursor, whitespaceRe) {
286
- let index = 0;
287
- tokenRe.lastIndex = 0;
288
- while (rightOfCursor[index] && !tokenRe.test(rightOfCursor[index])) {
289
- tokenRe.lastIndex = 0;
290
- index++;
291
- if (whitespaceRe.test(rightOfCursor[index])) {
292
- if (index > 2) {
293
- index--;
294
- break;
295
- }
296
- while (rightOfCursor[index] && whitespaceRe.test(rightOfCursor[index])) {
297
- index++;
298
- }
299
- if (index > 2) {
300
- break;
301
- }
302
- }
303
- }
304
- return index;
305
- }
306
- }
307
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvK3NoYXJlZC9lZGl0b3IvcG9zaXRpb25pbmcvc2VsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUcxRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3RDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqRSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXRDLE1BQU0sT0FBTyxTQUFTO0lBQXRCO1FBQ0ksV0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XG4gICAgICAgIGNvbnN0IGxpbmUgPSBzZXNzaW9uLmRvY3VtZW50LmxpbmVzW3Jvd107XG4gICAgICAgIGNvbnN0IGRvY3VtZW50TGVuZ3RoID0gc2Vzc2lvbi5kb2N1bWVudC5saW5lcy5sZW5ndGg7XG4gICAgICAgIGlmIChyb3cgKyAxID49IGRvY3VtZW50TGVuZ3RoICYmIGNvbHVtbiA9PT0gbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbjtcbiAgICAgICAgfVxuICAgICAgICBsZXQgcmlnaHRPZkN1cnNvciA9IGxpbmUuc3Vic3RyaW5nKGNvbHVtbik7XG4gICAgICAgIGlmIChjb2x1bW4gPT09IGxpbmUubGVuZ3RoKSB7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgcm93Kys7XG4gICAgICAgICAgICAgICAgcmlnaHRPZkN1cnNvciA9IHNlc3Npb24uZG9jdW1lbnQubGluZXNbcm93XTtcbiAgICAgICAgICAgIH0gd2hpbGUgKHJvdyA8IGRvY3VtZW50TGVuZ3RoICYmIC9eXFxzKiQvLnRlc3QocmlnaHRPZkN1cnNvcikpO1xuICAgICAgICAgICAgaWYgKCEvXlxccysvLnRlc3QocmlnaHRPZkN1cnNvcikpIHtcbiAgICAgICAgICAgICAgICByaWdodE9mQ3Vyc29yID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb2x1bW4gPSAwO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5zaG9ydFdvcmRFbmRJbmRleChzZXNzaW9uLnRva2VuUmUsIHJpZ2h0T2ZDdXJzb3IpO1xuICAgICAgICByZXR1cm4gbmV3IFBvaW50KHJvdywgY29sdW1uICsgaW5kZXgpO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0V29yZExlZnQoc2Vzc2lvbjogRWRpdFNlc3Npb24sIHBvc2l0aW9uOiBQb2ludCk6IFBvaW50IHtcbiAgICAgICAgbGV0IHJvdyA9IHBvc2l0aW9uLnJvdztcbiAgICAgICAgbGV0IGNvbHVtbiA9IHBvc2l0aW9uLmNvbHVtbjtcbiAgICAgICAgaWYgKGNvbHVtbiA9PT0gMCAmJiByb3cgPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbjtcbiAgICAgICAgfVxuICAgICAgICBsZXQgbGluZSA9IHNlc3Npb24uZG9jdW1lbnQubGluZXNbcm93XS5zdWJzdHJpbmcoMCwgY29sdW1uKTtcbiAgICAgICAgaWYgKGNvbHVtbiA9PT0gMCkge1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIHJvdy0tO1xuICAgICAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmRvY3VtZW50LmxpbmVzW3Jvd107XG4gICAgICAgICAgICB9IHdoaWxlIChyb3cgPiAwICYmIC9eXFxzKiQvLnRlc3QobGluZSkpO1xuICAgICAgICAgICAgY29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoIS9cXHMrJC8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgIGxpbmUgPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBsZWZ0T2ZDdXJzb3IgPSBsaW5lLnNwbGl0KCcnKS5yZXZlcnNlKCkuam9pbignJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5zaG9ydFdvcmRFbmRJbmRleChzZXNzaW9uLnRva2VuUmUsIGxlZnRPZkN1cnNvcik7XG4gICAgICAgIHJldHVybiBuZXcgUG9pbnQocm93LCBjb2x1bW4gLSBpbmRleCk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBzaG9ydFdvcmRFbmRJbmRleCh0b2tlblJlOiBSZWdFeHAsIHJpZ2h0T2ZDdXJzb3I6IHN0cmluZyk6IG51bWJlciB7XG4gICAgICAgIGxldCBpbmRleDogbnVtYmVyO1xuICAgICAgICB0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dG9rZW5SZS5sYXN0SW5kZXggPSAwO1xuICAgICAgICB3aGlsZSAocmlnaHRPZkN1cnNvcltpbmRleF0gJiYgIXRva2VuUmUudGVzdChyaWdodE9mQ3Vyc29yW2luZGV4XSkpIHtcbiAgICAgICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgIGluZGV4Kys7XG4gICAgICAgICAgICBpZiAod2hpdGVzcGFjZVJlLnRlc3QocmlnaHRPZkN1cnNvcltpbmRleF0pKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gMikge1xuICAgICAgICAgICAgICAgICAgICBpbmRleC0tO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgd2hpbGUgKHJpZ2h0T2ZDdXJzb3JbaW5kZXhdICYmIHdoaXRlc3BhY2VSZS50ZXN0KHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSkge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgfVxufVxuIl19
@@ -1,13 +0,0 @@
1
- export class SetDocx {
2
- static { this.type = '[Editor] set docx'; }
3
- constructor(content) {
4
- this.content = content;
5
- }
6
- }
7
- export class OpenDocx {
8
- static { this.type = '[Editor] open docx'; }
9
- constructor(documentId) {
10
- this.documentId = documentId;
11
- }
12
- }
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2VkaXRvci9zdG9yZS9lZGl0b3IuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLE9BQU8sT0FBTzthQUNBLFNBQUksR0FBRyxtQkFBbUIsQ0FBQztJQUMzQyxZQUFtQixPQUFrQjtRQUFsQixZQUFPLEdBQVAsT0FBTyxDQUFXO0lBQUcsQ0FBQzs7QUFHN0MsTUFBTSxPQUFPLFFBQVE7YUFDRCxTQUFJLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsWUFBbUIsVUFBa0I7UUFBbEIsZUFBVSxHQUFWLFVBQVUsQ0FBUTtJQUFHLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEb2N4TW9kZWwgfSBmcm9tICcuLi8uLi8uLi9tb2RlbHMvZ2VuZXJhdGVkL2RvY3gubW9kZWwnO1xuXG5leHBvcnQgY2xhc3MgU2V0RG9jeCB7XG4gICAgc3RhdGljIHJlYWRvbmx5IHR5cGUgPSAnW0VkaXRvcl0gc2V0IGRvY3gnO1xuICAgIGNvbnN0cnVjdG9yKHB1YmxpYyBjb250ZW50OiBEb2N4TW9kZWwpIHt9XG59XG5cbmV4cG9ydCBjbGFzcyBPcGVuRG9jeCB7XG4gICAgc3RhdGljIHJlYWRvbmx5IHR5cGUgPSAnW0VkaXRvcl0gb3BlbiBkb2N4JztcbiAgICBjb25zdHJ1Y3RvcihwdWJsaWMgZG9jdW1lbnRJZDogbnVtYmVyKSB7fVxufVxuIl19