@univerjs-pro/collaboration 0.1.10

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 (274) hide show
  1. package/README.md +17 -0
  2. package/lib/cjs/index.js +1 -0
  3. package/lib/es/index.js +1 -0
  4. package/lib/types/controllers/doc-transform/algorithms/doc-algo.d.ts +4 -0
  5. package/lib/types/controllers/doc-transform/doc-transform.controller.d.ts +10 -0
  6. package/lib/types/controllers/doc-transform/text-x-pro/__tests__/transform-position.spec.d.ts +1 -0
  7. package/lib/types/controllers/doc-transform/text-x-pro/__tests__/transform.spec.d.ts +1 -0
  8. package/lib/types/controllers/doc-transform/text-x-pro/text-x-pro.d.ts +34 -0
  9. package/lib/types/controllers/doc-transform/text-x-pro/utils.d.ts +3 -0
  10. package/lib/types/controllers/sheet-transform/algorithms/__tests__/transform-test-bed.d.ts +19 -0
  11. package/lib/types/controllers/sheet-transform/algorithms/add-conditional-rule/__test__/add-conditional-rule.algo.spec.d.ts +1 -0
  12. package/lib/types/controllers/sheet-transform/algorithms/add-conditional-rule/add-conditional-formatting-rule.algo.d.ts +4 -0
  13. package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/add-data-validation.algo.spec.d.ts +1 -0
  14. package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/update-data-validation.algo.spec.d.ts +1 -0
  15. package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/util.d.ts +14 -0
  16. package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/add-data-validation.algo.d.ts +16 -0
  17. package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/update-data-validation.algo.d.ts +4 -0
  18. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
  19. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/insert-col.algo.spec.d.ts +1 -0
  20. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/insert-row.algo.spec.d.ts +1 -0
  21. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/move-col.algo.spec.d.ts +1 -0
  22. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/move-row.algo.spec.d.ts +1 -0
  23. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-col.algo.spec.d.ts +1 -0
  24. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-row.algo.spec.d.ts +1 -0
  25. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  26. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/set-range-values.algo.spec.d.ts +1 -0
  27. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/add-worksheet-merge.algo.d.ts +4 -0
  28. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/insert-col.algo.d.ts +6 -0
  29. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/insert-row.algo.d.ts +6 -0
  30. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-col.algo.d.ts +4 -0
  31. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-range.algo.d.ts +4 -0
  32. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-row.algo.d.ts +4 -0
  33. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-col.algo.d.ts +4 -0
  34. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-row.algo.d.ts +4 -0
  35. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-worksheet-merge.algo.d.ts +4 -0
  36. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/set-range-values.algo.d.ts +4 -0
  37. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/set-selection.algo.d.ts +4 -0
  38. package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/utils/merge-tools.d.ts +3 -0
  39. package/lib/types/controllers/sheet-transform/algorithms/delete-conditional-formatting-rule/delete-conditional-formatting-rule.algo.d.ts +4 -0
  40. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
  41. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/insert-col.algo.spec.d.ts +1 -0
  42. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/move-col.algo.spec.d.ts +1 -0
  43. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/move-range.algo.spec.d.ts +1 -0
  44. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-col.algo.spec.d.ts +1 -0
  45. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-numfmt.algo.spec.d.ts +1 -0
  46. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  47. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-col-hidden.algo.spec.d.ts +1 -0
  48. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-col-visible.algo.spec.d.ts +1 -0
  49. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-numfmt.algo.spec.d.ts +1 -0
  50. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-range-values.algo.spec.d.ts +1 -0
  51. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
  52. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  53. package/lib/types/controllers/sheet-transform/algorithms/insert-col/add-data-validation.algo.d.ts +5 -0
  54. package/lib/types/controllers/sheet-transform/algorithms/insert-col/add-worksheet-merge.algo.d.ts +4 -0
  55. package/lib/types/controllers/sheet-transform/algorithms/insert-col/insert-col.algo.d.ts +4 -0
  56. package/lib/types/controllers/sheet-transform/algorithms/insert-col/move-col.algo.d.ts +4 -0
  57. package/lib/types/controllers/sheet-transform/algorithms/insert-col/move-range.algo.d.ts +4 -0
  58. package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-col.algo.d.ts +4 -0
  59. package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-numfmt.algo.d.ts +4 -0
  60. package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-worksheet-merge.algo.d.ts +4 -0
  61. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-col-hidden.algo.d.ts +4 -0
  62. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-col-visible.algo.d.ts +4 -0
  63. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-numfmt.algo.d.ts +4 -0
  64. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-range-values.algo.d.ts +4 -0
  65. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-selection.algo.d.ts +8 -0
  66. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-sheets-filter-criteria.algo.d.ts +5 -0
  67. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-sheets-filter-range.algo.d.ts +5 -0
  68. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-worksheet-col-width.algo.d.ts +4 -0
  69. package/lib/types/controllers/sheet-transform/algorithms/insert-col/update-data-validation.algo.d.ts +5 -0
  70. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
  71. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/insert-row.algo.spec.d.ts +1 -0
  72. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/move-range.algo.spec.d.ts +1 -0
  73. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/move-row.algo.spec.d.ts +1 -0
  74. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-numfmt.algo.spec.d.ts +1 -0
  75. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-row.algo.spec.d.ts +1 -0
  76. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  77. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-numfmt.algo.spec.d.ts +1 -0
  78. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-range-values.algo.spec.d.ts +1 -0
  79. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-row-hidden.algo.spec.d.ts +1 -0
  80. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-row-visible.algo.spec.d.ts +1 -0
  81. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  82. package/lib/types/controllers/sheet-transform/algorithms/insert-row/add-data-validation.algo.d.ts +5 -0
  83. package/lib/types/controllers/sheet-transform/algorithms/insert-row/add-worksheet-merge.algo.d.ts +4 -0
  84. package/lib/types/controllers/sheet-transform/algorithms/insert-row/insert-row.algo.d.ts +4 -0
  85. package/lib/types/controllers/sheet-transform/algorithms/insert-row/move-range.algo.d.ts +4 -0
  86. package/lib/types/controllers/sheet-transform/algorithms/insert-row/move-row.algo.d.ts +4 -0
  87. package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-numfmt.algo.d.ts +4 -0
  88. package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-row.algo.d.ts +4 -0
  89. package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-worksheet-merge.algo.d.ts +4 -0
  90. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-numfmt.algo.d.ts +4 -0
  91. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-range-values.algo.d.ts +4 -0
  92. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-row-hidden.algo.d.ts +4 -0
  93. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-row-visible.algo.d.ts +4 -0
  94. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-selection.algo.d.ts +8 -0
  95. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-sheets-filter-range.algo.d.ts +5 -0
  96. package/lib/types/controllers/sheet-transform/algorithms/insert-row/update-data-validation.algo.d.ts +5 -0
  97. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
  98. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/move-col.algo.spec.d.ts +1 -0
  99. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/move-range.algo.spec.d.ts +1 -0
  100. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/remove-numfmt.algo.spec.d.ts +1 -0
  101. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  102. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-col-hidden.algo.spec.d.ts +1 -0
  103. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-col-visible.algo.spec.d.ts +1 -0
  104. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-numfmt.algo.spec.d.ts +1 -0
  105. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-range-values.algo.spec.d.ts +1 -0
  106. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
  107. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  108. package/lib/types/controllers/sheet-transform/algorithms/move-col/add-data-validation.algo.d.ts +7 -0
  109. package/lib/types/controllers/sheet-transform/algorithms/move-col/add-worksheet-merge.algo.d.ts +4 -0
  110. package/lib/types/controllers/sheet-transform/algorithms/move-col/move-col.algo.d.ts +4 -0
  111. package/lib/types/controllers/sheet-transform/algorithms/move-col/move-range.algo.d.ts +4 -0
  112. package/lib/types/controllers/sheet-transform/algorithms/move-col/remove-numfmt.algo.d.ts +4 -0
  113. package/lib/types/controllers/sheet-transform/algorithms/move-col/remove-worksheet-merge.algo.d.ts +4 -0
  114. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-col-hidden.algo.d.ts +4 -0
  115. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-col-visible.algo.d.ts +4 -0
  116. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-numfmt.algo.d.ts +4 -0
  117. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-range-values.algo.d.ts +4 -0
  118. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-selection.algo.d.ts +8 -0
  119. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-sheets-filter-criteria.algo.d.ts +5 -0
  120. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-sheets-filter-range.algo.d.ts +5 -0
  121. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-worksheet-col-width.algo.d.ts +4 -0
  122. package/lib/types/controllers/sheet-transform/algorithms/move-col/update-data-validation.algo.d.ts +10 -0
  123. package/lib/types/controllers/sheet-transform/algorithms/move-conditional-formatting-rule/__test__/move-conditional-formatting-rule.algo.algo.spec.d.ts +1 -0
  124. package/lib/types/controllers/sheet-transform/algorithms/move-conditional-formatting-rule/move-conditional-formatting-rule.algo.d.ts +4 -0
  125. package/lib/types/controllers/sheet-transform/algorithms/move-range/add-data-validation.algo.d.ts +5 -0
  126. package/lib/types/controllers/sheet-transform/algorithms/move-range/add-worksheet-merge.algo.d.ts +4 -0
  127. package/lib/types/controllers/sheet-transform/algorithms/move-range/move-range.algo.d.ts +4 -0
  128. package/lib/types/controllers/sheet-transform/algorithms/move-range/remove-numfmt.algo.d.ts +4 -0
  129. package/lib/types/controllers/sheet-transform/algorithms/move-range/set-numfmt.algo.d.ts +4 -0
  130. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
  131. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/move-range.algo.spec.d.ts +1 -0
  132. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/move-row.algo.spec.d.ts +1 -0
  133. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/remove-numfmt.algo.spec.d.ts +1 -0
  134. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  135. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-numfmt.algo.spec.d.ts +1 -0
  136. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-range-values.algo.spec.d.ts +1 -0
  137. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-row-hidden.algo.spec.d.ts +1 -0
  138. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-row-visible.algo.spec.d.ts +1 -0
  139. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  140. package/lib/types/controllers/sheet-transform/algorithms/move-row/add-data-validation.algo.d.ts +5 -0
  141. package/lib/types/controllers/sheet-transform/algorithms/move-row/add-worksheet-merge.algo.d.ts +4 -0
  142. package/lib/types/controllers/sheet-transform/algorithms/move-row/move-range.algo.d.ts +4 -0
  143. package/lib/types/controllers/sheet-transform/algorithms/move-row/move-row.algo.d.ts +4 -0
  144. package/lib/types/controllers/sheet-transform/algorithms/move-row/remove-numfmt.algo.d.ts +4 -0
  145. package/lib/types/controllers/sheet-transform/algorithms/move-row/remove-worksheet-merge.algo.d.ts +4 -0
  146. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-numfmt.algo.d.ts +4 -0
  147. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-range-values.algo.d.ts +4 -0
  148. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-row-hidden.algo.d.ts +4 -0
  149. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-row-visible.algo.d.ts +4 -0
  150. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-selection.algo.d.ts +8 -0
  151. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-sheets-filter-range.algo.d.ts +5 -0
  152. package/lib/types/controllers/sheet-transform/algorithms/move-row/update-data-validation.algo.d.ts +5 -0
  153. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/move-col.algo.spec.d.ts +1 -0
  154. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/move-range.algo.spec.d.ts +1 -0
  155. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-col.algo.spec.d.ts +1 -0
  156. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-numfmt.algo.spec.d.ts +1 -0
  157. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  158. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-col-hidden.algo.spec.d.ts +1 -0
  159. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-col-visible.algo.spec.d.ts +1 -0
  160. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-numfmt.algo.spec.d.ts +1 -0
  161. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-range-values.algo.spec.d.ts +1 -0
  162. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
  163. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  164. package/lib/types/controllers/sheet-transform/algorithms/remove-col/add-data-validation.algo.d.ts +5 -0
  165. package/lib/types/controllers/sheet-transform/algorithms/remove-col/add-worksheet-merge.algo.d.ts +4 -0
  166. package/lib/types/controllers/sheet-transform/algorithms/remove-col/move-col.algo.d.ts +4 -0
  167. package/lib/types/controllers/sheet-transform/algorithms/remove-col/move-range.algo.d.ts +4 -0
  168. package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-col.algo.d.ts +4 -0
  169. package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-numfmt.algo.d.ts +4 -0
  170. package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-worksheet-merge.algo.d.ts +4 -0
  171. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-col-hidden.algo.d.ts +4 -0
  172. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-col-visible.algo.d.ts +4 -0
  173. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-numfmt.algo.d.ts +4 -0
  174. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-range-values.algo.d.ts +4 -0
  175. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-selection.algo.d.ts +8 -0
  176. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-sheets-filter-criteria.algo.d.ts +5 -0
  177. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-sheets-filter-range.algo.d.ts +5 -0
  178. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-worksheet-col-width.algo.d.ts +4 -0
  179. package/lib/types/controllers/sheet-transform/algorithms/remove-col/update-data-validation.algo.d.ts +5 -0
  180. package/lib/types/controllers/sheet-transform/algorithms/remove-data-validation/__test__/remove-data-validation.algo.spec.d.ts +1 -0
  181. package/lib/types/controllers/sheet-transform/algorithms/remove-data-validation/remove-data-validation.algo.d.ts +4 -0
  182. package/lib/types/controllers/sheet-transform/algorithms/remove-numfmt/remove-numfmt.algo.d.ts +4 -0
  183. package/lib/types/controllers/sheet-transform/algorithms/remove-numfmt/set-numfmt.algo.d.ts +4 -0
  184. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/move-range.algo.spec.d.ts +1 -0
  185. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/move-row.algo.spec.d.ts +1 -0
  186. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-numfmt.algo.spec.d.ts +1 -0
  187. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-row.algo.spec.d.ts +1 -0
  188. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  189. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-numfmt.algo.spec.d.ts +1 -0
  190. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-range-value.algo.spec.d.ts +1 -0
  191. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-row-hidden.algo.spec.d.ts +1 -0
  192. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-row-visible.algo.spec.d.ts +1 -0
  193. package/lib/types/controllers/sheet-transform/algorithms/remove-row/add-data-validation.algo.d.ts +5 -0
  194. package/lib/types/controllers/sheet-transform/algorithms/remove-row/add-worksheet-merge.algo.d.ts +4 -0
  195. package/lib/types/controllers/sheet-transform/algorithms/remove-row/move-range.algo.d.ts +4 -0
  196. package/lib/types/controllers/sheet-transform/algorithms/remove-row/move-row.algo.d.ts +4 -0
  197. package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-numfmt.algo.d.ts +4 -0
  198. package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-row.algo.d.ts +4 -0
  199. package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-worksheet-merge.algo.d.ts +4 -0
  200. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-numfmt.algo.d.ts +4 -0
  201. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-range-values.algo.d.ts +4 -0
  202. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-row-hidden.algo.d.ts +4 -0
  203. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-row-visible.algo.d.ts +4 -0
  204. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-selection.algo.d.ts +8 -0
  205. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-sheets-filter-range.algo.d.ts +5 -0
  206. package/lib/types/controllers/sheet-transform/algorithms/remove-row/update-data-validation.algo.d.ts +5 -0
  207. package/lib/types/controllers/sheet-transform/algorithms/remove-sheets-filter/remove-sheets-filter.algo.d.ts +4 -0
  208. package/lib/types/controllers/sheet-transform/algorithms/remove-sheets-filter/set-sheets-filter-range.algo.d.ts +4 -0
  209. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/add-worksheet-merge.algo.spec.d.ts +1 -0
  210. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/insert-col.algo.spec.d.ts +1 -0
  211. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/insert-row.algo.spec.d.ts +1 -0
  212. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/add-worksheet-merge.algo.d.ts +4 -0
  213. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/insert-col.algo.d.ts +4 -0
  214. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/insert-row.algo.d.ts +4 -0
  215. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/move-col.algo.d.ts +4 -0
  216. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/move-row.algo.d.ts +4 -0
  217. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/remove-col.algo.d.ts +4 -0
  218. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/remove-row.algo.d.ts +4 -0
  219. package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/set-selection.algo.d.ts +4 -0
  220. package/lib/types/controllers/sheet-transform/algorithms/set-conditional-formatting-rule/__test__/set-conditional-formatting-rule.algo.spec.d.ts +1 -0
  221. package/lib/types/controllers/sheet-transform/algorithms/set-conditional-formatting-rule/set-conditional-formatting-rule.algo.d.ts +4 -0
  222. package/lib/types/controllers/sheet-transform/algorithms/set-frozen/__test__/set-frozen.algo.spec.d.ts +1 -0
  223. package/lib/types/controllers/sheet-transform/algorithms/set-frozen/set-frozen.algo.d.ts +4 -0
  224. package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/__test__/set-numfmt.algo.spec.d.ts +1 -0
  225. package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/remove-numfmt.algo.d.ts +4 -0
  226. package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/set-numfmt.algo.d.ts +4 -0
  227. package/lib/types/controllers/sheet-transform/algorithms/set-range-values/__test__/set-range-valuea.algo.spec.d.ts +1 -0
  228. package/lib/types/controllers/sheet-transform/algorithms/set-range-values/add-worksheet-merge.algo.d.ts +4 -0
  229. package/lib/types/controllers/sheet-transform/algorithms/set-range-values/move-range.algo.d.ts +4 -0
  230. package/lib/types/controllers/sheet-transform/algorithms/set-range-values/set-range-values.algo.d.ts +4 -0
  231. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/move-range.algo.d.ts +5 -0
  232. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/remove-sheets-filter.algo.d.ts +4 -0
  233. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/set-range-values.algo.d.ts +5 -0
  234. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/set-sheets-filter-criteria.algo.d.ts +4 -0
  235. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-range/remove-sheets-filter.algo.d.ts +4 -0
  236. package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-range/set-sheets-filter-range.algo.d.ts +4 -0
  237. package/lib/types/controllers/sheet-transform/algorithms/set-tab-color/__test__/set-tab-color.algo.spec.d.ts +1 -0
  238. package/lib/types/controllers/sheet-transform/algorithms/set-tab-color/set-tab-color.algo.d.ts +4 -0
  239. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-col-width/set-worksheet-col-width.algo.d.ts +4 -0
  240. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-name/set-worksheet-name.algo.d.ts +4 -0
  241. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/add-data-validation.algo.spec.d.ts +1 -0
  242. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/remove-data-validation.algo.spec.d.ts +1 -0
  243. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/update-data-validation.algo.spec.d.ts +1 -0
  244. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/add-data-validation.algo.d.ts +4 -0
  245. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/remove-data-validation.algo.d.ts +4 -0
  246. package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/update-data-validation.algo.d.ts +4 -0
  247. package/lib/types/controllers/sheet-transform/algorithms/utils.d.ts +29 -0
  248. package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/add-worksheet-merge.algo.spec.d.ts +1 -0
  249. package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
  250. package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/worksheet.algo.spec.d.ts +1 -0
  251. package/lib/types/controllers/sheet-transform/algorithms/worksheet/add-worksheet-merge.algo.d.ts +3 -0
  252. package/lib/types/controllers/sheet-transform/algorithms/worksheet/remove-worksheet-merge.algo.d.ts +3 -0
  253. package/lib/types/controllers/sheet-transform/algorithms/worksheet/worksheet.algo.d.ts +9 -0
  254. package/lib/types/controllers/sheet-transform/sheet-transform.controller.d.ts +10 -0
  255. package/lib/types/index.d.ts +12 -0
  256. package/lib/types/models/changeset.d.ts +16 -0
  257. package/lib/types/models/collaboration-events.d.ts +211 -0
  258. package/lib/types/models/socket-events.d.ts +54 -0
  259. package/lib/types/plugin.d.ts +12 -0
  260. package/lib/types/services/compose-changesets/compose-changesets.service.d.ts +6 -0
  261. package/lib/types/services/compress-mutation/compress-mutation-service.d.ts +20 -0
  262. package/lib/types/services/compress-mutation/compress-mutations/__test__/set-range-values.spec.d.ts +16 -0
  263. package/lib/types/services/compress-mutation/compress-mutations/set-range-values.d.ts +14 -0
  264. package/lib/types/services/rev/__tests__/rev.service.spec.d.ts +20 -0
  265. package/lib/types/services/rev/rev.service.d.ts +23 -0
  266. package/lib/types/services/snapshot/__tests__/snapshot.service.spec.d.ts +12 -0
  267. package/lib/types/services/snapshot/snapshot.service.d.ts +22 -0
  268. package/lib/types/services/transform/__tests__/doc.transform.service.spec.d.ts +1 -0
  269. package/lib/types/services/transform/__tests__/transform.service.spec.d.ts +1 -0
  270. package/lib/types/services/transform/transform.service.d.ts +115 -0
  271. package/lib/types/services/transform/types.d.ts +48 -0
  272. package/lib/types/utils.d.ts +4 -0
  273. package/lib/umd/index.js +1 -0
  274. package/package.json +79 -0
@@ -0,0 +1,12 @@
1
+ import { Injector } from '@wendellhu/redi';
2
+ import { Plugin } from '@univerjs/core';
3
+
4
+ export interface ICollaborationPluginConfig {
5
+ }
6
+ export declare class CollaborationPlugin extends Plugin {
7
+ private _config;
8
+ protected _injector: Injector;
9
+ static pluginName: string;
10
+ constructor(_config: ICollaborationPluginConfig, _injector: Injector);
11
+ onStarting(injector: Injector): void;
12
+ }
@@ -0,0 +1,6 @@
1
+ import { IChangeset } from '../../models/changeset';
2
+ import { IChangeset as IProtocolChangeset } from '@univerjs/protocol';
3
+
4
+ export declare class ComposeChangesetsService {
5
+ composeDocChangesets(changesets: IProtocolChangeset[]): IChangeset;
6
+ }
@@ -0,0 +1,20 @@
1
+ import { InterceptorManager } from '@univerjs/core';
2
+
3
+ /**
4
+ * During transmission, compression is performed for a specific operation,referencing during transport.
5
+ * Before send -> compress -> transmission -> ... -> node apply -> decompression -> apply.
6
+ * Before send -> compress -> transmission -> ... -> node transform -> decompression -> apply.
7
+ * Before send -> compress -> transmission -> ... -> take from server -> decompression -> apply.
8
+ * Before send -> compress -> save to local -> ... -> take from local -> decompression -> apply.
9
+ * @export
10
+ * @class CompressMutationService
11
+ */
12
+ export declare class CompressMutationService {
13
+ interceptor: InterceptorManager<{
14
+ COMPRESS_MUTATION_APPLY: import('@univerjs/core').IInterceptor<import('@univerjs/core').IMutationInfo<object>[], null>;
15
+ COMPRESS_MUTATION_SEND: import('@univerjs/core').IInterceptor<import('@univerjs/core').IMutationInfo<object>[], null>;
16
+ }>;
17
+ constructor();
18
+ private _init;
19
+ private _initSetRangeValues;
20
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ICellData, IObjectMatrixPrimitiveType, Nullable } from '@univerjs/core';
2
+
3
+ export declare const transformRefStyleFromCells: (matrix?: IObjectMatrixPrimitiveType<Nullable<ICellData>>) => {
4
+ cellValue: undefined;
5
+ styleRefMap: undefined;
6
+ } | {
7
+ cellValue: IObjectMatrixPrimitiveType<Nullable<ICellData>>;
8
+ styleRefMap: {
9
+ [id: string]: Nullable<string | import('@univerjs/core').IStyleData>;
10
+ };
11
+ };
12
+ export declare const transformCellsFromRefStyle: (matrix?: IObjectMatrixPrimitiveType<Nullable<ICellData>>, styleRefMap?: {
13
+ [id: string]: ICellData['s'];
14
+ }) => IObjectMatrixPrimitiveType<Nullable<ICellData>> | undefined;
@@ -0,0 +1,20 @@
1
+ import { Dependency, Injector } from '@wendellhu/redi';
2
+ import { IWorkbookData, PluginCtor, Workbook, Plugin, Univer } from '@univerjs/core';
3
+
4
+ export interface ITestBed {
5
+ univer: Univer;
6
+ get: Injector['get'];
7
+ sheet: Workbook;
8
+ }
9
+ export declare function createCollaborationTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[], plugins?: Array<PluginCtor<Plugin>>): {
10
+ univer: Univer;
11
+ get: {
12
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
13
+ <T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
14
+ <T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
15
+ <T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
16
+ <T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
17
+ <T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
18
+ };
19
+ sheet: Workbook;
20
+ };
@@ -0,0 +1,23 @@
1
+ import { ILogService, IUniverInstanceService } from '@univerjs/core';
2
+
3
+ /** Some special mutations. It a changeset contains the following mutations it should create a snapshot immediately. */
4
+ export declare const SINGLE_SNAPSHOT_MUTATIONS: Set<string>;
5
+ /**
6
+ * This service provide util functions to get revision number of a document or increment the revision number.
7
+ */
8
+ export declare class RevisionService {
9
+ private readonly _univerInstanceService;
10
+ private readonly _logService;
11
+ constructor(_univerInstanceService: IUniverInstanceService, _logService: ILogService);
12
+ /**
13
+ * Get the current revision of a document.
14
+ * @param unitID
15
+ */
16
+ getCurrentRevForDocument(unitID: string): number;
17
+ /**
18
+ * Increment the revision number of a document.
19
+ * @param unitID
20
+ * @returns The revision number after increment.
21
+ */
22
+ incrementRevForDocument(unitID: string): number;
23
+ }
@@ -0,0 +1,12 @@
1
+ import { IFetchMissingChangesetsResponse, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetResponse, ISaveSheetBlockResponse, ISaveSnapshotResponse } from '@univerjs/protocol';
2
+ import { ILogContext, ISnapshotServerService } from '@univerjs/core';
3
+
4
+ export declare class MockSnapshotServerService implements ISnapshotServerService {
5
+ getUnitOnRev(_context: ILogContext, params: IGetUnitOnRevRequest): Promise<IGetUnitOnRevResponse>;
6
+ getSheetBlock(_context: ILogContext, params: IGetSheetBlockRequest): Promise<IGetSheetBlockResponse>;
7
+ fetchMissingChangesets(): Promise<IFetchMissingChangesetsResponse>;
8
+ getResourcesRequest(): Promise<IGetResourcesResponse>;
9
+ saveSnapshot(): Promise<ISaveSnapshotResponse>;
10
+ saveSheetBlock(): Promise<ISaveSheetBlockResponse>;
11
+ saveChangeset(): Promise<ISaveChangesetResponse>;
12
+ }
@@ -0,0 +1,22 @@
1
+ import { RevisionService } from '../rev/rev.service';
2
+ import { CompressMutationService } from '../compress-mutation/compress-mutation-service';
3
+ import { Injector } from '@wendellhu/redi';
4
+ import { DocumentDataModel, IDocumentData, ILogContext, IWorkbookData, Workbook, ICommandService, IResourceManagerService, ISnapshotServerService, IUniverInstanceService } from '@univerjs/core';
5
+
6
+ /**
7
+ * The service provides methods to load snapshots from the snapshot server.
8
+ */
9
+ export declare class SnapshotService {
10
+ private readonly _revisionService;
11
+ private readonly _univerInstanceService;
12
+ private readonly _snapshotServerService;
13
+ private readonly _commandService;
14
+ private _injector;
15
+ private _compressMutationService;
16
+ private _resourceManagerService;
17
+ constructor(_revisionService: RevisionService, _univerInstanceService: IUniverInstanceService, _snapshotServerService: ISnapshotServerService, _commandService: ICommandService, _injector: Injector, _compressMutationService: CompressMutationService, _resourceManagerService: IResourceManagerService);
18
+ loadSheet(unitID: string, rev: number, context?: ILogContext): Promise<Workbook>;
19
+ loadDoc(unitID: string, rev: number, context?: ILogContext): Promise<DocumentDataModel>;
20
+ save(_context: ILogContext, workbook: Workbook): IWorkbookData;
21
+ saveDoc(_context: ILogContext, document: DocumentDataModel): IDocumentData;
22
+ }
@@ -0,0 +1,115 @@
1
+ import { IFailureTransformChangesetsResult, IFailureTransformMutationResult, IFailureTransformMutationsResult, ISuccessTransformChangesetsResult, ISuccessTransformMutationResult, ISuccessTransformMutationsResult, ITransformChangesetsResult, ITransformMutationResult, ITransformMutationsResult, ITransformMutationsWithChangesetResult } from './types';
2
+ import { IChangeset } from '../../models/changeset';
3
+ import { IMutationInfo, Disposable } from '@univerjs/core';
4
+
5
+ /**
6
+ * A single transform algorithm. Algorithms are registered to the transform service in the form of `{m1}-{m2}`.
7
+ * When the transform service is transforming two mutations, it would find the algorithm by the form of `{m1}-{m2}`.
8
+ * `m1` is the mutation on the left side, and `m2` is the mutation on the right side.
9
+ */
10
+ export interface IMutationTransformAlgorithm<M extends object = any, N extends object = any> {
11
+ m1: string;
12
+ m2?: string | 'any';
13
+ handler(m1: IMutationInfo<M>, m2: IMutationInfo<N>): ITransformMutationResult;
14
+ handler(m1: IMutationInfo<M>, m2: IMutationInfo<N>, onlyLater?: true): Omit<ISuccessTransformMutationResult, 'm1Prime'> | IFailureTransformMutationResult;
15
+ }
16
+ /**
17
+ * This service's responsibility is to transform mutations (changesets).
18
+ *
19
+ * Features could register transform algorithms to this service, so this the service could transform more mutations.
20
+ *
21
+ * This should be used both on client and server.
22
+ *
23
+ * This service is also business-agnostic, so it could be used in docs, sheets and slides.
24
+ */
25
+ export interface ITransformService {
26
+ /**
27
+ * Register an algorithm to transform two kinds of mutations.
28
+ *
29
+ * Note that this method is not the same as other registering methods in Univer, it wouldn't return a disposable,
30
+ * because it would cause critical problems if you unregister a transform algorithm.
31
+ */
32
+ registerTransformAlgorithm: (algorithms: IMutationTransformAlgorithm) => void;
33
+ /**
34
+ * Transform two single mutations. Note that m1Prime and m2Prime may not be single mutations. 1x1 may result in nxn.
35
+ *
36
+ * @internal
37
+ *
38
+ * Visualization:
39
+ *
40
+ * /\
41
+ * m1 / \ m2
42
+ * / \
43
+ * \ /
44
+ * m2Prime \ / m1Prime
45
+ * \/
46
+ *
47
+ * @param m1
48
+ * @param m2
49
+ * @param onlyLeft If set to true, the result would only contain m1Prime.
50
+ */
51
+ transformMutation(m1: IMutationInfo, m2: IMutationInfo): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>;
52
+ transformMutation(m1: IMutationInfo, m2: IMutationInfo, onlyLater: false): ITransformMutationResult;
53
+ /**
54
+ * Transform two array of mutations. Not that the time complexity (also memory complexity) of this method is O(m*n),
55
+ * in which m & n are numbers of mutations in each array.
56
+ *
57
+ * @internal
58
+ *
59
+ * Visualization:
60
+ *
61
+ * /\
62
+ * m1 / \ m2
63
+ * / \
64
+ * /\ /\
65
+ * / \ / \
66
+ * / \/ \
67
+ * \ /\ /
68
+ * \ / \ /
69
+ * \/ \/
70
+ * \ /
71
+ * \ /
72
+ * m2Prime \/ m1Prime
73
+ *
74
+ * @param m1
75
+ * @param m2
76
+ */
77
+ transformMutations(m1: IMutationInfo[], m2: IMutationInfo[]): IFailureTransformMutationsResult | Omit<ISuccessTransformMutationsResult, 'm1Prime'>;
78
+ transformMutations(m1: IMutationInfo[], m2: IMutationInfo[], onlyLater: boolean): ITransformMutationsResult;
79
+ /**
80
+ * Transform two arrays of changesets
81
+ *
82
+ * @internal
83
+ */
84
+ transformChangesets(c1: IChangeset[], c2: IChangeset[]): IFailureTransformChangesetsResult | Omit<ISuccessTransformChangesetsResult, 'c1Prime'>;
85
+ transformChangesets(c1: IChangeset[], c2: IChangeset[], onlyLater: false): ITransformChangesetsResult;
86
+ /**
87
+ * Transform mutations with changesets. We only wants transformed mutations here.
88
+ *
89
+ * @internal
90
+ */
91
+ transformMutationsWithChangeset: (c1: IChangeset, m2: IMutationInfo[]) => ITransformMutationsWithChangesetResult;
92
+ }
93
+ export declare const ITransformService: import('@wendellhu/redi').IdentifierDecorator<ITransformService>;
94
+ export declare class TransformService extends Disposable implements ITransformService {
95
+ private readonly _transformMap;
96
+ dispose(): void;
97
+ registerTransformAlgorithm(algorithm: IMutationTransformAlgorithm): void;
98
+ transformMutation(m1: IMutationInfo, m2: IMutationInfo): ITransformMutationResult;
99
+ transformMutation(m1: IMutationInfo, m2: IMutationInfo, onlyLater: true): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>;
100
+ transformMutations(m1: IMutationInfo[], m2: IMutationInfo[]): ITransformMutationsResult;
101
+ transformMutations(m1: IMutationInfo[], m2: IMutationInfo[], onlyLater: true): IFailureTransformMutationsResult | Omit<ISuccessTransformMutationsResult, 'm1Prime'>;
102
+ /**
103
+ * Assume `m1` has already applied to the document, we need m2Prime to be applied to the document.
104
+ *
105
+ * @param m1
106
+ * @param m2
107
+ * @returns transformed mutations of m2
108
+ */
109
+ private _rightInclineTransformMutations;
110
+ private _leftInclineTransformMutations;
111
+ transformChangesets(c1: IChangeset[], c2: IChangeset[]): ITransformChangesetsResult;
112
+ transformChangesets(c1: IChangeset[], c2: IChangeset[], onlyLater: true): IFailureTransformChangesetsResult | Omit<ISuccessTransformChangesetsResult, 'c1Prime'>;
113
+ transformMutationsWithChangeset(c1: IChangeset, m2: IMutationInfo[]): ITransformMutationsWithChangesetResult;
114
+ }
115
+ export declare function makeArray<T>(input: T | T[]): T[];
@@ -0,0 +1,48 @@
1
+ import { IChangeset } from '../../models/changeset';
2
+ import { IMutationInfo } from '@univerjs/core';
3
+
4
+ export interface ISuccessTransformMutationResult {
5
+ m1Prime: IMutationInfo | IMutationInfo[];
6
+ m2Prime: IMutationInfo | IMutationInfo[];
7
+ }
8
+ export interface IFailureTransformMutationResult {
9
+ error: Error;
10
+ }
11
+ export type ITransformMutationResult = ISuccessTransformMutationResult | IFailureTransformMutationResult;
12
+ export declare function isTransformMutationFailure(result: ITransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>): result is IFailureTransformMutationResult;
13
+ export declare function isTransformMutationSuccess(result: ITransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>): result is ISuccessTransformMutationResult;
14
+ export interface IFailureInclineTransformMutationsResult {
15
+ error: Error;
16
+ }
17
+ export type IInclineTransformMutationsResult = IMutationInfo[] | IFailureInclineTransformMutationsResult;
18
+ export declare function isInclineTransformMutationsFailure(result: IInclineTransformMutationsResult): result is IFailureInclineTransformMutationsResult;
19
+ export interface ISuccessTransformMutationsResult {
20
+ m1Prime: IMutationInfo[];
21
+ m2Prime: IMutationInfo[];
22
+ }
23
+ export interface IFailureTransformMutationsResult {
24
+ error: Error;
25
+ }
26
+ export type ITransformMutationsResult = ISuccessTransformMutationsResult | IFailureTransformMutationsResult;
27
+ export declare function isTransformMutationsFailure(result: Partial<ITransformMutationsResult>): result is IFailureTransformMutationsResult;
28
+ export declare function isTransformMutationsSuccess(result: Partial<ITransformMutationsResult>): result is ISuccessTransformMutationsResult;
29
+ export interface ISuccessTransformChangesetsResult {
30
+ c1Prime: IChangeset[];
31
+ c2Prime: IChangeset[];
32
+ }
33
+ export interface IFailureTransformChangesetsResult {
34
+ error: Error;
35
+ }
36
+ export type ITransformChangesetsResult = ISuccessTransformChangesetsResult | IFailureTransformChangesetsResult;
37
+ export declare function isTransformChangesetsFailure(result: Partial<ITransformChangesetsResult>): result is IFailureTransformChangesetsResult;
38
+ export declare function isTransformChangesetsSuccess(result: Partial<ITransformChangesetsResult>): result is ISuccessTransformChangesetsResult;
39
+ export interface ISuccessTransformMutationsWithChangesetResult {
40
+ c1Prime: IChangeset;
41
+ m2Prime: IMutationInfo[];
42
+ }
43
+ export interface IFailureTransformMutationsWithChangesetResult {
44
+ error: Error;
45
+ }
46
+ export type ITransformMutationsWithChangesetResult = ISuccessTransformMutationsWithChangesetResult | IFailureTransformMutationsWithChangesetResult;
47
+ export declare function isTransformMutationsWithChangesetFailure(result: ITransformMutationsWithChangesetResult): result is IFailureTransformMutationsWithChangesetResult;
48
+ export declare function isTransformMutationsWithChangesetSuccess(result: ITransformMutationsWithChangesetResult): result is ISuccessTransformMutationsWithChangesetResult;
@@ -0,0 +1,4 @@
1
+ import { UniverType } from '@univerjs/protocol';
2
+ import { UniverInstanceType } from '@univerjs/core';
3
+
4
+ export declare function mapDocumentTypeToUniverType(documentType: UniverInstanceType): UniverType;