@univerjs-pro/collaboration 0.4.1 → 0.4.2-nightly.202410301606

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 (63) hide show
  1. package/lib/es/index.js +1 -1
  2. package/lib/types/controllers/sheet-transform/algorithms/gridlines/gridlines.algo.d.ts +4 -0
  3. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__tests__/set-sheets-filter-range.algo.spec.d.ts +1 -0
  4. package/lib/types/controllers/sheet-transform/algorithms/insert-col/__tests__/set-worksheet-col-width.algo.spec.d.ts +1 -0
  5. package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-col-data.algo.d.ts +3 -0
  6. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-row-data.algo.spec.d.ts +1 -0
  7. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-worksheet-row-auto-height.algo.spec.d.ts +1 -0
  8. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-worksheet-row-height.algo.spec.d.ts +1 -0
  9. package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-worksheet-row-is-auto-height.algo.spec.d.ts +1 -0
  10. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-row-data.algo.d.ts +3 -0
  11. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-worksheet-row-auto-height.algo.d.ts +3 -0
  12. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-worksheet-row-height.algo.d.ts +3 -0
  13. package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-worksheet-row-is-auto-height.algo.d.ts +3 -0
  14. package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-col-custom.algo.spec.d.ts +1 -0
  15. package/lib/types/controllers/sheet-transform/algorithms/move-col/add-comment.algo.d.ts +1 -1
  16. package/lib/types/controllers/sheet-transform/algorithms/move-col/set-col-data.algo.d.ts +3 -0
  17. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-row-data.algo.spec.d.ts +1 -0
  18. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-worksheet-row-auto-height.algo.spec.d.ts +1 -0
  19. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-worksheet-row-height.algo.spec.d.ts +1 -0
  20. package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-worksheet-row-is-auto-height.algo.spec.d.ts +1 -0
  21. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-row-data.algo.d.ts +3 -0
  22. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-worksheet-row-auto-height.algo.d.ts +3 -0
  23. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-worksheet-row-height.algo.d.ts +3 -0
  24. package/lib/types/controllers/sheet-transform/algorithms/move-row/set-worksheet-row-is-auto-height.algo.d.ts +3 -0
  25. package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-col-data.algo.spec.d.ts +1 -0
  26. package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-col-data.algo.d.ts +3 -0
  27. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-row-custom.algo.spec.d.ts +1 -0
  28. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-worksheet-row-auto-height.algo.spec.d.ts +1 -0
  29. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-worksheet-row-height.algo.spec.d.ts +1 -0
  30. package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-worksheet-row-is-auto-height.algo.spec.d.ts +1 -0
  31. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-row-data.algo.d.ts +3 -0
  32. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-worksheet-row-auto-height.algo.d.ts +3 -0
  33. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-worksheet-row-height.algo.d.ts +3 -0
  34. package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-worksheet-row-is-auto-height.algo.d.ts +3 -0
  35. package/lib/types/controllers/sheet-transform/algorithms/set-col-data/__tests__/set-col-data.algo.spec.d.ts +1 -0
  36. package/lib/types/controllers/sheet-transform/algorithms/set-col-data/set-col-data.algo.d.ts +3 -0
  37. package/lib/types/controllers/sheet-transform/algorithms/set-row-data/__tests__/set-row-data.algo.spec.d.ts +1 -0
  38. package/lib/types/controllers/sheet-transform/algorithms/set-row-data/set-row-data.algo.d.ts +3 -0
  39. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-auto-height/__tests__/set-worksheet-row-auto-height.algo.spec.d.ts +1 -0
  40. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-auto-height/set-worksheet-row-auto-height.algo.d.ts +3 -0
  41. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-height/__tests__/set-worksheet-row-height.algo.spec.d.ts +1 -0
  42. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-height/set-worksheet-row-height.algo.d.ts +3 -0
  43. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-is-auto-height/__tests__/set-worksheet-row-is-auto-height.algo.spec.d.ts +1 -0
  44. package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-row-is-auto-height/set-worksheet-row-is-auto-height.algo.d.ts +3 -0
  45. package/lib/types/index.d.ts +1 -1
  46. package/lib/types/models/collaboration-events.d.ts +9 -0
  47. package/lib/umd/index.js +1 -1
  48. package/package.json +23 -39
  49. package/lib/cjs/index.js +0 -1
  50. /package/lib/types/controllers/sheet-transform/algorithms/{insert-col/__test__/add-worksheet-merge.algo.spec.d.ts → gridlines/__tests__/gridlines.algo.spec.d.ts} +0 -0
  51. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/insert-col.algo.spec.d.ts → __tests__/add-worksheet-merge.algo.spec.d.ts} +0 -0
  52. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/move-col.algo.spec.d.ts → __tests__/insert-col.algo.spec.d.ts} +0 -0
  53. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/move-range.algo.spec.d.ts → __tests__/move-col.algo.spec.d.ts} +0 -0
  54. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/remove-col.algo.spec.d.ts → __tests__/move-range.algo.spec.d.ts} +0 -0
  55. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/remove-numfmt.algo.spec.d.ts → __tests__/remove-col.algo.spec.d.ts} +0 -0
  56. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/remove-worksheet-merge.algo.spec.d.ts → __tests__/remove-numfmt.algo.spec.d.ts} +0 -0
  57. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-col-hidden.algo.spec.d.ts → __tests__/remove-worksheet-merge.algo.spec.d.ts} +0 -0
  58. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-col-visible.algo.spec.d.ts → __tests__/set-col-data.algo.spec.d.ts} +0 -0
  59. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-numfmt.algo.spec.d.ts → __tests__/set-col-hidden.algo.spec.d.ts} +0 -0
  60. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-range-values.algo.spec.d.ts → __tests__/set-col-visible.algo.spec.d.ts} +0 -0
  61. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-sheets-filter-criteria.algo.spec.d.ts → __tests__/set-numfmt.algo.spec.d.ts} +0 -0
  62. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-sheets-filter-range.algo.spec.d.ts → __tests__/set-range-values.algo.spec.d.ts} +0 -0
  63. /package/lib/types/controllers/sheet-transform/algorithms/insert-col/{__test__/set-worksheet-col-width.algo.spec.d.ts → __tests__/set-sheets-filter-criteria.algo.spec.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ import { IToggleGridlinesMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const ToggleGridlinesWithSelf: IMutationTransformAlgorithm<IToggleGridlinesMutationParams, IToggleGridlinesMutationParams>;
4
+ export declare const GridlinesAlgorithms: Array<IMutationTransformAlgorithm>;
@@ -0,0 +1,3 @@
1
+ import { IInsertColMutationParams, ISetColDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const insertColMutationWithSetColData: IMutationTransformAlgorithm<IInsertColMutationParams, ISetColDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IInsertRowMutationParams, ISetRowDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const insertRowMutationWithSetRowData: IMutationTransformAlgorithm<IInsertRowMutationParams, ISetRowDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IInsertRowMutationParams, ISetWorksheetRowAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const insertRowMutationWithSetWorksheetRowAutoHeight: IMutationTransformAlgorithm<IInsertRowMutationParams, ISetWorksheetRowAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IInsertRowMutationParams, ISetWorksheetRowHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const insertRowMutationWithSetWorksheetRowHeight: IMutationTransformAlgorithm<IInsertRowMutationParams, ISetWorksheetRowHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IInsertRowMutationParams, ISetWorksheetRowIsAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const insertRowMutationWithSetWorksheetRowIsAutoHeight: IMutationTransformAlgorithm<IInsertRowMutationParams, ISetWorksheetRowIsAutoHeightMutationParams>;
@@ -1,4 +1,4 @@
1
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
1
2
  import { IMoveColumnsMutationParams } from '@univerjs/sheets';
2
3
  import { IAddCommentMutationParams } from '@univerjs/thread-comment';
3
- import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
4
4
  export declare const moveColWithAddComment: IMutationTransformAlgorithm<IMoveColumnsMutationParams, IAddCommentMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IMoveColumnsMutationParams, ISetColDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const moveColMutationWithSetColData: IMutationTransformAlgorithm<IMoveColumnsMutationParams, ISetColDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IMoveRowsMutationParams, ISetRowDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const moveRowMutationWithSetRowData: IMutationTransformAlgorithm<IMoveRowsMutationParams, ISetRowDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IMoveRowsMutationParams, ISetWorksheetRowAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const moveRowMutationWithSetWorksheetRowAutoHeight: IMutationTransformAlgorithm<IMoveRowsMutationParams, ISetWorksheetRowAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IMoveRowsMutationParams, ISetWorksheetRowHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const moveRowMutationWithSetWorksheetRowHeight: IMutationTransformAlgorithm<IMoveRowsMutationParams, ISetWorksheetRowHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IMoveRowsMutationParams, ISetWorksheetRowIsAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const moveRowMutationWithSetWorksheetRowIsAutoHeight: IMutationTransformAlgorithm<IMoveRowsMutationParams, ISetWorksheetRowIsAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IRemoveColMutationParams, ISetColDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const removeColMutationWithSetColData: IMutationTransformAlgorithm<IRemoveColMutationParams, ISetColDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IRemoveRowsMutationParams, ISetRowDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const removeRowMutationWithSetRowData: IMutationTransformAlgorithm<IRemoveRowsMutationParams, ISetRowDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IRemoveRowsMutationParams, ISetWorksheetRowAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const removeRowMutationWithSetWorksheetRowAutoHeight: IMutationTransformAlgorithm<IRemoveRowsMutationParams, ISetWorksheetRowAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IRemoveRowsMutationParams, ISetWorksheetRowHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const removeRowMutationWithSetWorksheetRowHeight: IMutationTransformAlgorithm<IRemoveRowsMutationParams, ISetWorksheetRowHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { IRemoveRowsMutationParams, ISetWorksheetRowIsAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const removeRowMutationWithSetWorksheetRowIsAutoHeight: IMutationTransformAlgorithm<IRemoveRowsMutationParams, ISetWorksheetRowIsAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { ISetColDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const setColDataMutationWithSelf: IMutationTransformAlgorithm<ISetColDataMutationParams, ISetColDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { ISetRowDataMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const setRowDataMutationWithSelf: IMutationTransformAlgorithm<ISetRowDataMutationParams, ISetRowDataMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { ISetWorksheetRowAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const setWorksheetRowAutoHeightMutationWithSelf: IMutationTransformAlgorithm<ISetWorksheetRowAutoHeightMutationParams, ISetWorksheetRowAutoHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { ISetWorksheetRowHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const setWorksheetRowHeightMutationWithSelf: IMutationTransformAlgorithm<ISetWorksheetRowHeightMutationParams, ISetWorksheetRowHeightMutationParams>;
@@ -0,0 +1,3 @@
1
+ import { ISetWorksheetRowIsAutoHeightMutationParams } from '@univerjs/sheets';
2
+ import { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const setWorksheetRowIsAutoHeightMutationWithSelf: IMutationTransformAlgorithm<ISetWorksheetRowIsAutoHeightMutationParams, ISetWorksheetRowIsAutoHeightMutationParams>;
@@ -1,7 +1,7 @@
1
1
  export { SheetTransformController } from './controllers/sheet-transform/sheet-transform.controller';
2
2
  export { DocTransformController } from './controllers/doc-transform/doc-transform.controller';
3
3
  export { type IChangeset, parseChangesetToProtocol, parseMutationToProtocol, parseProtocolChangeset, parseProtocolCommand, parseProtocolMutation, } from './models/changeset';
4
- export { CollaborationEvent, type IAcknowledgedChangeset, type IAcknowledgementEvent, type ICollaborationEvent, type ICollaborationUser, type IFetchingMissEvent, type IFetchOperationsEvent, type INewChangesetsEvent, type INewHostEvent, type IOperationEvent, type IPermissionUpdateEvent, type IPseudoFetchMissingResultEvent, type IRejectedChangeset, type IRejectionEvent, type IRequestHostEvent, type IShouldCloseConnEvent, type ISubmitChangesetEvent, type ITerminateEvent, type IUpdateCursorEvent, type IUserJoinEvent, type IUserLeaveEvent, type IUserSelectionEvent, } from './models/collaboration-events';
4
+ export { CollaborationEvent, type IAcknowledgedChangeset, type IAcknowledgementEvent, type ICollaborationEvent, type ICollaborationUser, type IFetchingMissEvent, type IFetchOperationsEvent, type INewChangesetsEvent, type INewHostEvent, type IOperationEvent, type IPermissionUpdateEvent, type IPseudoFetchMissingResultEvent, type IRejectedChangeset, type IRejectionEvent, type IRequestHostEvent, type IRetryEvent, type IShouldCloseConnEvent, type ISubmitChangesetEvent, type ITerminateEvent, type IUpdateCursorEvent, type IUserJoinEvent, type IUserLeaveEvent, type IUserSelectionEvent, } from './models/collaboration-events';
5
5
  export { type ICombRequestEvent, type ICombResponseEvent, type IHeartbeatRequestEvent, type IHeartbeatResponseEvent, type IHelloRequestEvent, type IHelloResponseEvent, type IIngestQuestEvent, type IJoinRequestEvent, type IJoinResponseEvent, type ILeaveRequestEvent, type IRecvResponseEvent, } from './models/socket-events';
6
6
  export { UniverCollaborationPlugin } from './plugin';
7
7
  export { CompressMutationService } from './services/compress-mutation/compress-mutation-service';
@@ -29,6 +29,11 @@ export declare enum CollaborationEvent {
29
29
  * the changeset should be rejected.
30
30
  */
31
31
  CHANGESET_REJ = "changeset_rej",
32
+ /**
33
+ * The submitted changeset could not be acknowledged by unexpected server error, so
34
+ * the changeset should be resent.
35
+ */
36
+ CHANGESET_SHOULD_RETRY = "changeset_should_retry",
32
37
  /**
33
38
  * When a changeset sent by the client is acknowledged by the server,
34
39
  * the server should broadcast this changeset to other clients.
@@ -151,6 +156,10 @@ export interface IRejectionEvent {
151
156
  changeset: IRejectedChangeset;
152
157
  };
153
158
  }
159
+ export interface IRetryEvent {
160
+ eventID: CollaborationEvent.CHANGESET_SHOULD_RETRY;
161
+ data: IChangeset;
162
+ }
154
163
  export interface ICollaborationUser {
155
164
  userID: string;
156
165
  memberID: string;