@univerjs-pro/collaboration-client-ui 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (101) hide show
  1. package/README.md +6 -3
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -1
  5. package/lib/cjs/locale/ca-ES.js +1 -1
  6. package/lib/cjs/locale/de-DE.js +1 -1
  7. package/lib/cjs/locale/en-US.js +1 -1
  8. package/lib/cjs/locale/es-ES.js +1 -1
  9. package/lib/cjs/locale/fa-IR.js +1 -1
  10. package/lib/cjs/locale/fr-FR.js +1 -1
  11. package/lib/cjs/locale/id-ID.js +1 -1
  12. package/lib/cjs/locale/it-IT.js +1 -1
  13. package/lib/cjs/locale/ja-JP.js +1 -1
  14. package/lib/cjs/locale/ko-KR.js +1 -1
  15. package/lib/cjs/locale/pl-PL.js +1 -1
  16. package/lib/cjs/locale/pt-BR.js +1 -1
  17. package/lib/cjs/locale/ru-RU.js +1 -1
  18. package/lib/cjs/locale/sk-SK.js +1 -1
  19. package/lib/cjs/locale/vi-VN.js +1 -1
  20. package/lib/cjs/locale/zh-CN.js +1 -1
  21. package/lib/cjs/locale/zh-HK.js +1 -1
  22. package/lib/cjs/locale/zh-TW.js +1 -1
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -1
  26. package/lib/es/locale/ca-ES.js +1 -1
  27. package/lib/es/locale/de-DE.js +1 -1
  28. package/lib/es/locale/en-US.js +1 -1
  29. package/lib/es/locale/es-ES.js +1 -1
  30. package/lib/es/locale/fa-IR.js +1 -1
  31. package/lib/es/locale/fr-FR.js +1 -1
  32. package/lib/es/locale/id-ID.js +1 -1
  33. package/lib/es/locale/it-IT.js +1 -1
  34. package/lib/es/locale/ja-JP.js +1 -1
  35. package/lib/es/locale/ko-KR.js +1 -1
  36. package/lib/es/locale/pl-PL.js +1 -1
  37. package/lib/es/locale/pt-BR.js +1 -1
  38. package/lib/es/locale/ru-RU.js +1 -1
  39. package/lib/es/locale/sk-SK.js +1 -1
  40. package/lib/es/locale/vi-VN.js +1 -1
  41. package/lib/es/locale/zh-CN.js +1 -1
  42. package/lib/es/locale/zh-HK.js +1 -1
  43. package/lib/es/locale/zh-TW.js +1 -1
  44. package/lib/facade.js +1 -1
  45. package/lib/index.css +87 -0
  46. package/lib/index.js +1 -1
  47. package/lib/locale/ar-SA.js +1 -1
  48. package/lib/locale/ca-ES.js +1 -1
  49. package/lib/locale/de-DE.js +1 -1
  50. package/lib/locale/en-US.js +1 -1
  51. package/lib/locale/es-ES.js +1 -1
  52. package/lib/locale/fa-IR.js +1 -1
  53. package/lib/locale/fr-FR.js +1 -1
  54. package/lib/locale/id-ID.js +1 -1
  55. package/lib/locale/it-IT.js +1 -1
  56. package/lib/locale/ja-JP.js +1 -1
  57. package/lib/locale/ko-KR.js +1 -1
  58. package/lib/locale/pl-PL.js +1 -1
  59. package/lib/locale/pt-BR.js +1 -1
  60. package/lib/locale/ru-RU.js +1 -1
  61. package/lib/locale/sk-SK.js +1 -1
  62. package/lib/locale/vi-VN.js +1 -1
  63. package/lib/locale/zh-CN.js +1 -1
  64. package/lib/locale/zh-HK.js +1 -1
  65. package/lib/locale/zh-TW.js +1 -1
  66. package/lib/types/controllers/clipboard/docs/image/image-paste.controller.d.ts +1 -2
  67. package/lib/types/controllers/collab-cursor/board-collab-cursor-entity.d.ts +31 -0
  68. package/lib/types/controllers/collab-cursor/board-collab-cursor-render.controller.d.ts +21 -0
  69. package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +3 -2
  70. package/lib/types/controllers/collab-cursor/slide-collab-cursor-entity.d.ts +1 -1
  71. package/lib/types/controllers/collab-status/collab-status.controller.d.ts +11 -0
  72. package/lib/types/controllers/snapshot-loading/snapshot-loading.controller.d.ts +36 -0
  73. package/lib/types/index.d.ts +0 -2
  74. package/lib/types/locale/en-US.d.ts +5 -0
  75. package/lib/types/models/cursor.d.ts +12 -8
  76. package/lib/types/views/components/SnapshotLoadingTimeout.d.ts +15 -0
  77. package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +2 -0
  78. package/lib/types/views/shapes/slide-collab-cursor.shape.d.ts +2 -2
  79. package/lib/types/views/shapes/text-bubble.shape.d.ts +1 -0
  80. package/lib/umd/facade.js +1 -1
  81. package/lib/umd/index.js +1 -1
  82. package/lib/umd/locale/ar-SA.js +1 -1
  83. package/lib/umd/locale/ca-ES.js +1 -1
  84. package/lib/umd/locale/de-DE.js +1 -1
  85. package/lib/umd/locale/en-US.js +1 -1
  86. package/lib/umd/locale/es-ES.js +1 -1
  87. package/lib/umd/locale/fa-IR.js +1 -1
  88. package/lib/umd/locale/fr-FR.js +1 -1
  89. package/lib/umd/locale/id-ID.js +1 -1
  90. package/lib/umd/locale/it-IT.js +1 -1
  91. package/lib/umd/locale/ja-JP.js +1 -1
  92. package/lib/umd/locale/ko-KR.js +1 -1
  93. package/lib/umd/locale/pl-PL.js +1 -1
  94. package/lib/umd/locale/pt-BR.js +1 -1
  95. package/lib/umd/locale/ru-RU.js +1 -1
  96. package/lib/umd/locale/sk-SK.js +1 -1
  97. package/lib/umd/locale/vi-VN.js +1 -1
  98. package/lib/umd/locale/zh-CN.js +1 -1
  99. package/lib/umd/locale/zh-HK.js +1 -1
  100. package/lib/umd/locale/zh-TW.js +1 -1
  101. package/package.json +23 -22
@@ -1 +1 @@
1
- const _0x45876e=_0x40c3;function _0x40c3(_0x30f8f4,_0x3bdd4f){_0x30f8f4=_0x30f8f4-0x104;const _0x3f3cd5=_0x3f3c();let _0x40c35c=_0x3f3cd5[_0x30f8f4];return _0x40c35c;}function _0x3f3c(){const _0x339ac8=['公式計算已開始。','正在擷取伺服器資料...','9168003LEiPJI','已同步','111735kBEFJo','協作衝突','7917525fkVBUQ','目前無法執行公式計算,請稍後重試。','383mFGpEN','同步中...','協作房間已滿,您的編輯將暫存於本機。','公式計算佇列已滿,正在等待可用資源...','108021GNbOAy','24vsRqMA','150yNsMAI','已離線,編輯將儲存在本機','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','9278992uxACzV','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','編輯衝突','3525900TcRsDu','認證錯誤','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','連線失敗,將在稍後重試連線。','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','本機檔案','58ZEhqYN','連線失敗,請檢查您的網絡。'];_0x3f3c=function(){return _0x339ac8;};return _0x3f3c();}(function(_0x3c89c7,_0x524b46){const _0x288e12=_0x40c3,_0x52b40e=_0x3c89c7();while(!![]){try{const _0x637eb8=-parseInt(_0x288e12(0x117))/0x1*(parseInt(_0x288e12(0x10d))/0x2)+-parseInt(_0x288e12(0x11b))/0x3*(parseInt(_0x288e12(0x11c))/0x4)+-parseInt(_0x288e12(0x113))/0x5*(parseInt(_0x288e12(0x11d))/0x6)+-parseInt(_0x288e12(0x115))/0x7+parseInt(_0x288e12(0x104))/0x8+parseInt(_0x288e12(0x111))/0x9+parseInt(_0x288e12(0x107))/0xa;if(_0x637eb8===_0x524b46)break;else _0x52b40e['push'](_0x52b40e['shift']());}catch(_0x98897b){_0x52b40e['push'](_0x52b40e['shift']());}}}(_0x3f3c,0x95f58));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x45876e(0x110),'conflict':_0x45876e(0x106),'notCollab':_0x45876e(0x10c),'synced':_0x45876e(0x112),'syncing':_0x45876e(0x118),'offline':_0x45876e(0x11e)},'session':{'connection-failed':_0x45876e(0x10e),'will-retry':_0x45876e(0x10a),'room-full':_0x45876e(0x119),'collaboration-timeout':'伺服器未回應協作請求,您的編輯將儲存在本機。'},'conflict':{'title':_0x45876e(0x114),'content':'您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。'},'permission':{'title':_0x45876e(0x108),'content':_0x45876e(0x11f)},'collaboration':{'offline-data-not-saved':_0x45876e(0x105),'single-unit':{'warning':_0x45876e(0x109)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x45876e(0x10b)},'formula':{'calculation':{'started':_0x45876e(0x10f),'waiting':_0x45876e(0x11a),'unable':_0x45876e(0x116)}}}};export{e as default};
1
+ const _0x39f281=_0x11e8;(function(_0x471fe4,_0xe0d9e6){const _0x1be1d2=_0x11e8,_0x57657f=_0x471fe4();while(!![]){try{const _0x45efda=parseInt(_0x1be1d2(0x15b))/0x1*(-parseInt(_0x1be1d2(0x159))/0x2)+parseInt(_0x1be1d2(0x15e))/0x3*(parseInt(_0x1be1d2(0x16c))/0x4)+-parseInt(_0x1be1d2(0x163))/0x5+-parseInt(_0x1be1d2(0x162))/0x6*(-parseInt(_0x1be1d2(0x172))/0x7)+parseInt(_0x1be1d2(0x15f))/0x8+-parseInt(_0x1be1d2(0x160))/0x9*(-parseInt(_0x1be1d2(0x16e))/0xa)+-parseInt(_0x1be1d2(0x16b))/0xb*(parseInt(_0x1be1d2(0x168))/0xc);if(_0x45efda===_0xe0d9e6)break;else _0x57657f['push'](_0x57657f['shift']());}catch(_0x15a9aa){_0x57657f['push'](_0x57657f['shift']());}}}(_0x479e,0x46121));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x39f281(0x166)}},'collabStatus':{'fetchMiss':_0x39f281(0x164),'conflict':'編輯衝突','notCollab':_0x39f281(0x175),'synced':'已同步','syncing':_0x39f281(0x165),'offline':'已離線,編輯將儲存在本機'},'snapshotLoading':{'loadingSheet':_0x39f281(0x161),'timeout':'資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','refresh':_0x39f281(0x16d)},'session':{'connection-failed':_0x39f281(0x15d),'will-retry':_0x39f281(0x171),'room-full':_0x39f281(0x167),'collaboration-timeout':_0x39f281(0x169)},'conflict':{'title':_0x39f281(0x170),'content':'您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。'},'permission':{'title':_0x39f281(0x15c),'content':_0x39f281(0x158)},'collaboration':{'offline-data-not-saved':_0x39f281(0x16f),'single-unit':{'warning':_0x39f281(0x173)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x39f281(0x15a)},'formula':{'calculation':{'started':'公式計算已開始。','waiting':_0x39f281(0x16a),'unable':_0x39f281(0x174)}}}};function _0x11e8(_0x150d5f,_0xe5744f){_0x150d5f=_0x150d5f-0x158;const _0x479e36=_0x479e();let _0x11e82d=_0x479e36[_0x150d5f];return _0x11e82d;}export{e as default};function _0x479e(){const _0x28025a=['1045033zFpAkS','1189616mqbuqW','重新整理頁面','10uiajpz','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','協作衝突','連線失敗,將在稍後重試連線。','395248Tgwzzb','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','目前無法執行公式計算,請稍後重試。','本機檔案','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','3810kOrAPU','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','301PXSllj','認證錯誤','連線失敗,請檢查您的網絡。','3vRQjHn','3012304HgJXXB','3903129zguFqv','正在載入工作表','42ClRWvC','1312225VyyYyV','正在擷取伺服器資料...','同步中...','點擊重新連線','協作房間已滿,您的編輯將暫存於本機。','48DGlZSM','伺服器未回應協作請求,您的編輯將儲存在本機。','公式計算佇列已滿,正在等待可用資源...'];_0x479e=function(){return _0x28025a;};return _0x479e();}
@@ -1 +1 @@
1
- const _0x38feea=_0x18f6;function _0x3daf(){const _0x3cee94=['同步中...','公式計算已開始。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','5492290FZPTBV','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','本機檔案','3237190kZHrmL','連線失敗,將在稍後重試連線。','1518KxXUXw','目前無法執行公式計算,請稍後重試。','連線失敗,請檢查您的網路。','514968dHcsjb','由於協作房間已關閉,編輯權限已被收回。','編輯衝突','2960iSEVGm','614HHHyKN','認證錯誤','21105LpluAZ','點擊重新連線','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','5328701lrWnUB','920500TOItVs','已離線,編輯將儲存在本機','50jREnGm','6lwMmEq','正在擷取伺服器資料...','伺服器未回應協作請求,您的編輯將儲存在本機。','公式計算佇列已滿,正在等待可用資源...'];_0x3daf=function(){return _0x3cee94;};return _0x3daf();}function _0x18f6(_0x2c8392,_0x5bc449){_0x2c8392=_0x2c8392-0xcc;const _0x3dafcd=_0x3daf();let _0x18f675=_0x3dafcd[_0x2c8392];return _0x18f675;}(function(_0x529823,_0x57d5e9){const _0x48974a=_0x18f6,_0xfb17d4=_0x529823();while(!![]){try{const _0x28bac5=parseInt(_0x48974a(0xd8))/0x1+parseInt(_0x48974a(0xd2))/0x2*(-parseInt(_0x48974a(0xe7))/0x3)+parseInt(_0x48974a(0xce))/0x4+parseInt(_0x48974a(0xe2))/0x5*(parseInt(_0x48974a(0xdb))/0x6)+-parseInt(_0x48974a(0xd7))/0x7+parseInt(_0x48974a(0xd1))/0x8*(parseInt(_0x48974a(0xd4))/0x9)+parseInt(_0x48974a(0xda))/0xa*(-parseInt(_0x48974a(0xe5))/0xb);if(_0x28bac5===_0x57d5e9)break;else _0xfb17d4['push'](_0xfb17d4['shift']());}catch(_0x2e5ee9){_0xfb17d4['push'](_0xfb17d4['shift']());}}}(_0x3daf,0x99273));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x38feea(0xd5)}},'collabStatus':{'fetchMiss':_0x38feea(0xdc),'conflict':_0x38feea(0xd0),'notCollab':_0x38feea(0xe4),'synced':'已同步','syncing':_0x38feea(0xdf),'offline':_0x38feea(0xd9)},'session':{'connection-failed':_0x38feea(0xcd),'will-retry':_0x38feea(0xe6),'room-full':'協作房間已滿,您的編輯將暫存於本機。','collaboration-timeout':_0x38feea(0xdd)},'conflict':{'title':'協作衝突','content':'您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。'},'permission':{'title':_0x38feea(0xd3),'content':_0x38feea(0xd6)},'collaboration':{'offline-data-not-saved':'您有未儲存至伺服器的離線編輯,請檢查網路後重試。','single-unit':{'warning':_0x38feea(0xe1)},'closeRoom':_0x38feea(0xcf)},'auth':{'needGotoLoginAlert':_0x38feea(0xe3)},'formula':{'calculation':{'started':_0x38feea(0xe0),'waiting':_0x38feea(0xde),'unable':_0x38feea(0xcc)}}}};export{e as default};
1
+ function _0x99c3(_0x18ae46,_0xee0109){_0x18ae46=_0x18ae46-0x112;const _0x2dc78b=_0x2dc7();let _0x99c36d=_0x2dc78b[_0x18ae46];return _0x99c36d;}function _0x2dc7(){const _0x197672=['伺服器未回應協作請求,您的編輯將儲存在本機。','點擊重新連線','同步中...','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','835610qpGEhm','正在擷取伺服器資料...','8ZjsWYw','770664ZjckgO','本機檔案','已離線,編輯將儲存在本機','7UurSdx','公式計算已開始。','5184423tKYYTP','協作衝突','連線失敗,將在稍後重試連線。','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','7217976ppYFas','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','已同步','390XKVBqp','1913468ckiAuv','協作房間已滿,您的編輯將暫存於本機。','190cNTJIy','公式計算佇列已滿,正在等待可用資源...','604582OfGXtL','目前無法執行公式計算,請稍後重試。','編輯衝突','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','25505oxIsGt'];_0x2dc7=function(){return _0x197672;};return _0x2dc7();}const _0x462113=_0x99c3;(function(_0xad1fe5,_0x588214){const _0x10c4d2=_0x99c3,_0x5016c7=_0xad1fe5();while(!![]){try{const _0x83f80f=-parseInt(_0x10c4d2(0x121))/0x1+parseInt(_0x10c4d2(0x114))/0x2+-parseInt(_0x10c4d2(0x124))/0x3*(parseInt(_0x10c4d2(0x123))/0x4)+parseInt(_0x10c4d2(0x11c))/0x5*(-parseInt(_0x10c4d2(0x113))/0x6)+-parseInt(_0x10c4d2(0x127))/0x7*(-parseInt(_0x10c4d2(0x12d))/0x8)+-parseInt(_0x10c4d2(0x129))/0x9+-parseInt(_0x10c4d2(0x116))/0xa*(-parseInt(_0x10c4d2(0x118))/0xb);if(_0x83f80f===_0x588214)break;else _0x5016c7['push'](_0x5016c7['shift']());}catch(_0xdf2169){_0x5016c7['push'](_0x5016c7['shift']());}}}(_0x2dc7,0x9dc75));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x462113(0x11e)}},'collabStatus':{'fetchMiss':_0x462113(0x122),'conflict':_0x462113(0x11a),'notCollab':_0x462113(0x125),'synced':_0x462113(0x112),'syncing':_0x462113(0x11f),'offline':_0x462113(0x126)},'snapshotLoading':{'loadingSheet':'正在載入工作表','timeout':_0x462113(0x120),'refresh':'重新整理頁面'},'session':{'connection-failed':'連線失敗,請檢查您的網路。','will-retry':_0x462113(0x12b),'room-full':_0x462113(0x115),'collaboration-timeout':_0x462113(0x11d)},'conflict':{'title':_0x462113(0x12a),'content':_0x462113(0x12e)},'permission':{'title':'認證錯誤','content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'offline-data-not-saved':'您有未儲存至伺服器的離線編輯,請檢查網路後重試。','single-unit':{'warning':_0x462113(0x11b)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x462113(0x12c)},'formula':{'calculation':{'started':_0x462113(0x128),'waiting':_0x462113(0x117),'unable':_0x462113(0x119)}}}};export{e as default};
@@ -1,6 +1,5 @@
1
- import { RxDisposable } from '@univerjs/core';
1
+ import { IImageIoService, RxDisposable } from '@univerjs/core';
2
2
  import { IDocClipboardService } from '@univerjs/docs-ui';
3
- import { IImageIoService } from '@univerjs/drawing';
4
3
  export declare class ImagePasteController extends RxDisposable {
5
4
  private _docClipboardService;
6
5
  private _imageIoService;
@@ -0,0 +1,31 @@
1
+ import type { ICollaborationUser } from '@univerjs-pro/collaboration';
2
+ import type { CollaborationSession } from '@univerjs-pro/collaboration-client';
3
+ import type { IBoardCollabCursor, IBoardCollabSelectionPayload } from '../../models/cursor';
4
+ import { IBoardElementStateService } from '@univerjs-pro/boards-ui';
5
+ import { MemberService } from '@univerjs-pro/collaboration-client';
6
+ import { RxDisposable } from '@univerjs/core';
7
+ import { ColorAssignService } from '../../services/color-assign/color-assign.service';
8
+ export declare function parseBoardCursorSelection(selection: string): IBoardCollabSelectionPayload | null;
9
+ export declare class BoardCollabCursorEntity extends RxDisposable {
10
+ readonly unitID: string;
11
+ private readonly _session;
12
+ private readonly _colorAssignService;
13
+ private readonly _memberService;
14
+ private readonly _boardElementStateService;
15
+ private _online;
16
+ private _init;
17
+ private _cursorInfo$;
18
+ cursorInfo$: import("rxjs").Observable<Map<string, import("../../models/cursor").IElementCollabCursor>>;
19
+ get cursorInfo(): Readonly<Map<string, IBoardCollabCursor>>;
20
+ private _roomMembers$;
21
+ roomMembers$: import("rxjs").Observable<ICollaborationUser[]>;
22
+ get roomMembers(): Readonly<ICollaborationUser[]>;
23
+ constructor(unitID: string, _session: CollaborationSession, _colorAssignService: ColorAssignService, _memberService: MemberService, _boardElementStateService: IBoardElementStateService);
24
+ dispose(): void;
25
+ init(): void;
26
+ private _onCursorUpdate;
27
+ private _onCursorDelete;
28
+ private _updateLocalCursor;
29
+ private _toggleOnline;
30
+ private _toggleOffline;
31
+ }
@@ -0,0 +1,21 @@
1
+ import type { BoardModel } from '@univerjs-pro/boards';
2
+ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
+ import { RxDisposable, ThemeService } from '@univerjs/core';
4
+ import { CollabCursorController } from './collab-cursor.controller';
5
+ export declare class BoardCollabCursorRenderController extends RxDisposable implements IRenderModule {
6
+ private readonly _context;
7
+ private readonly _collabCursorController;
8
+ private readonly _themeService;
9
+ private _cursors;
10
+ private _renderScheduled;
11
+ private _isApplyingOverlays;
12
+ private _latestCursors;
13
+ constructor(_context: IRenderContext<BoardModel>, _collabCursorController: CollabCursorController, _themeService: ThemeService);
14
+ dispose(): void;
15
+ private _init;
16
+ private _scheduleRender;
17
+ private _render;
18
+ private _removeCollabCursors;
19
+ private _getSceneObjectByKey;
20
+ private _getObjectBounds;
21
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Observable } from 'rxjs';
2
- import type { IDocCollabCursor, ISheetCollabCursor, ISlideCollabCursor } from '../../models/cursor';
2
+ import type { IBoardCollabCursor, IDocCollabCursor, ISheetCollabCursor, ISlideCollabCursor } from '../../models/cursor';
3
3
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
4
4
  import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
5
5
  /**
@@ -15,9 +15,10 @@ export declare class CollabCursorController extends RxDisposable {
15
15
  private readonly _entityInit$;
16
16
  constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService);
17
17
  dispose(): void;
18
- getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor> | Map<string, ISlideCollabCursor>>;
18
+ getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor> | Map<string, ISlideCollabCursor> | Map<string, IBoardCollabCursor>>;
19
19
  private _init;
20
20
  private _startSheetCollabCursor;
21
21
  private _startDocCollabCursor;
22
22
  private _startSlideCollabCursor;
23
+ private _startBoardCollabCursor;
23
24
  }
@@ -18,7 +18,7 @@ export declare class SlideCollabCursorEntity extends RxDisposable {
18
18
  private _online;
19
19
  private _init;
20
20
  private _cursorInfo$;
21
- cursorInfo$: import("rxjs").Observable<Map<string, ISlideCollabCursor>>;
21
+ cursorInfo$: import("rxjs").Observable<Map<string, import("../../models/cursor").IElementCollabCursor>>;
22
22
  get cursorInfo(): Readonly<Map<string, ISlideCollabCursor>>;
23
23
  private _roomMembers$;
24
24
  roomMembers$: import("rxjs").Observable<ICollaborationUser[]>;
@@ -15,4 +15,15 @@ export declare class DesktopCollaborationStatusDisplayController extends Disposa
15
15
  private _initStatusListener;
16
16
  protected _initStatusComponent(): void;
17
17
  }
18
+ export declare class BoardCollaborationStatusDisplayController extends Disposable {
19
+ private readonly _univerInstanceService;
20
+ private readonly _injector;
21
+ private readonly _collaborationController;
22
+ private readonly _uiPartsService;
23
+ protected readonly _status$: BehaviorSubject<CollaborationStatus>;
24
+ constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collaborationController: CollaborationController, _uiPartsService: IUIPartsService);
25
+ private _initStatusListener;
26
+ protected _initStatusComponent(): void;
27
+ }
18
28
  export declare function getCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
29
+ export declare function getBoardCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
@@ -0,0 +1,36 @@
1
+ import type { ISnapshotLoadingTimeoutState } from '../../views/components/SnapshotLoadingTimeout';
2
+ import { SnapshotLoadingService } from '@univerjs-pro/collaboration';
3
+ import { Disposable, Injector, LocaleService, PluginService } from '@univerjs/core';
4
+ import { IMessageService, IShortcutService, IUIPartsService } from '@univerjs/ui';
5
+ import { IURLService } from '../../services/url/url.service';
6
+ export declare class SnapshotLoadingController extends Disposable {
7
+ private readonly _snapshotLoadingService;
8
+ private readonly _messageService;
9
+ private readonly _localeService;
10
+ private readonly _injector;
11
+ private readonly _pluginService;
12
+ private readonly _shortcutService;
13
+ private readonly _urlService;
14
+ private readonly _timeoutState$;
15
+ private readonly _interactionBlocked$;
16
+ private readonly _messageIds;
17
+ private readonly _blockProgressWatches;
18
+ private readonly _handoffUnitIds;
19
+ private _latestStates;
20
+ private _previewUnitId?;
21
+ private _shortcutBlock?;
22
+ private _sheetLoadingRenderService?;
23
+ readonly timeoutState$: import("rxjs").Observable<ISnapshotLoadingTimeoutState | null>;
24
+ constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector, _pluginService: PluginService, uiPartsService: IUIPartsService, _shortcutService: IShortcutService, _urlService: IURLService);
25
+ dispose(): void;
26
+ private _updateMessage;
27
+ private _watchBlockProgress;
28
+ private _clearBlockProgressWatch;
29
+ private _clearTimeoutState;
30
+ private _updateSheetPreview;
31
+ private _handoffPreview;
32
+ private _hidePreview;
33
+ private _setInteractionBlocked;
34
+ private _isVisibleUnit;
35
+ private _getSheetLoadingRenderService;
36
+ }
@@ -1,12 +1,10 @@
1
1
  import './global.css';
2
2
  export type { IUniverCollaborationClientUIConfig } from './config/config';
3
3
  export { DesktopCollaborationStatusDisplayController } from './controllers/collab-status/collab-status.controller';
4
- export { CollaborationDataLoaderController } from './controllers/data-loader/data-loader.controller';
5
4
  export { UniverCollaborationClientUIPlugin } from './plugin';
6
5
  export { BrowserCollaborationSocketService } from './services/collaboration-socket/collaboration-socket.service';
7
6
  export { RemoteUniscriptService } from './services/remote-uniscript/remote-uniscript.service';
8
7
  export { WebBrowserSingleActiveUnitService } from './services/single-active-unit/single-active-unit.service';
9
8
  export { IURLService } from './services/url/url.service';
10
- export { WebURLService } from './services/url/web-url.service';
11
9
  export { SheetCollabCursorShape } from './views/shapes/sheet-collab-cursor.shape';
12
10
  export type { ISheetCollabCursorShapeProps } from './views/shapes/sheet-collab-cursor.shape';
@@ -13,6 +13,11 @@ declare const locale: {
13
13
  syncing: string;
14
14
  offline: string;
15
15
  };
16
+ snapshotLoading: {
17
+ loadingSheet: string;
18
+ timeout: string;
19
+ refresh: string;
20
+ };
16
21
  session: {
17
22
  'connection-failed': string;
18
23
  'will-retry': string;
@@ -34,26 +34,30 @@ export interface IDocCollabCursor {
34
34
  /** The deserialized ranges of collab cursor. */
35
35
  ranges: ITextRangeWithStyle[];
36
36
  }
37
- export interface ISlideCollabSelectionPayload {
38
- kind: 'slide-element-selection';
37
+ export interface IElementCollabSelectionPayload<TKind extends string = string> {
38
+ kind: TKind;
39
39
  unitId: string;
40
40
  subUnitId: string;
41
41
  selectedIds: string[];
42
42
  focusedId: string | null;
43
43
  }
44
- export interface ISlideCollabCursor {
44
+ export interface IElementCollabCursor {
45
45
  /** Stroke color of this collab cursor */
46
46
  color: string;
47
47
  /** Displayed user name of this cursor */
48
48
  name: string;
49
- /** Slide unit ID */
49
+ /** Host unit ID */
50
50
  unitId: string;
51
- /** Slide page ID */
51
+ /** Host page ID */
52
52
  subUnitId: string;
53
- /** Remote selected drawing IDs */
53
+ /** Remote selected element IDs */
54
54
  selectedIds: string[];
55
- /** Remote focused drawing ID */
55
+ /** Remote focused element ID */
56
56
  focusedId: string | null;
57
- /** Serialized slide selection payload */
57
+ /** Serialized selection payload */
58
58
  selection: string;
59
59
  }
60
+ export type ISlideCollabSelectionPayload = IElementCollabSelectionPayload<'slide-element-selection'>;
61
+ export type ISlideCollabCursor = IElementCollabCursor;
62
+ export type IBoardCollabSelectionPayload = IElementCollabSelectionPayload<'board-element-selection'>;
63
+ export type IBoardCollabCursor = IElementCollabCursor;
@@ -0,0 +1,15 @@
1
+ import type { Observable } from 'rxjs';
2
+ export interface ISnapshotLoadingTimeoutState {
3
+ unitId: string;
4
+ content: string;
5
+ refreshLabel: string;
6
+ }
7
+ interface IProps {
8
+ state$: Observable<ISnapshotLoadingTimeoutState | null>;
9
+ }
10
+ interface ISnapshotLoadingGlobalProps extends IProps {
11
+ interactionBlocked$: Observable<boolean>;
12
+ }
13
+ export declare function SnapshotLoadingGlobal({ state$, interactionBlocked$ }: ISnapshotLoadingGlobalProps): import("react").JSX.Element;
14
+ export declare function SnapshotLoadingTimeout({ state$ }: IProps): import("react").JSX.Element | null;
15
+ export {};
@@ -11,6 +11,7 @@ export interface ISheetCollabCursorShapeProps extends IShapeProps, ISheetCollabC
11
11
  showText?: boolean;
12
12
  backgroundColor?: string;
13
13
  offsetY?: number;
14
+ labelHorizontalPosition?: 'left' | 'right';
14
15
  }
15
16
  /**
16
17
  * Render a single collaborated cursor on the canvas.
@@ -29,6 +30,7 @@ export declare class SheetCollabCursorShape<T extends ISheetCollabCursorShapePro
29
30
  private _blinkIntervalTimer?;
30
31
  private _isBlinkVisible;
31
32
  private _offsetY?;
33
+ private _labelHorizontalPosition;
32
34
  constructor(key?: string, props?: T);
33
35
  setOffsetY(offsetY: number): void;
34
36
  setShapeProps(props: Partial<ISheetCollabCursorShapeProps>): void;
@@ -1,8 +1,8 @@
1
1
  import type { IShapeProps } from '@univerjs/engine-render';
2
- import type { ISlideCollabCursor } from '../../models/cursor';
2
+ import type { IElementCollabCursor } from '../../models/cursor';
3
3
  import { Shape } from '@univerjs/engine-render';
4
4
  export declare const SLIDE_COLLAB_CURSOR_ZINDEX = 5002;
5
- export interface ISlideCollabCursorShapeProps extends IShapeProps, ISlideCollabCursor {
5
+ export interface ISlideCollabCursorShapeProps extends IShapeProps, IElementCollabCursor {
6
6
  showText?: boolean;
7
7
  }
8
8
  export declare class SlideCollabCursorShape<T extends ISlideCollabCursorShapeProps = ISlideCollabCursorShapeProps> extends Shape<T> {
@@ -4,6 +4,7 @@ export declare const COLLAB_CURSOR_LABEL_HEIGHT = 20;
4
4
  export declare const COLLAB_CURSOR_LABEL_MAX_WIDTH = 200;
5
5
  export declare const COLLAB_CURSOR_LABEL_TEXT_PADDING_LR = 4;
6
6
  export declare const COLLAB_CURSOR_LABEL_TEXT_PADDING_TB = 5;
7
+ export declare function getTextBubbleWidth(ctx: CanvasRenderingContext2D, text: string): number;
7
8
  export interface ITextBubbleShapeProps extends IShapeProps {
8
9
  color: string;
9
10
  text: string;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2922be,_0x4ee9e3){var _0x17ee73=_0x52c8,_0x5a9ae4=_0x2922be();while(!![]){try{var _0x2b790a=-parseInt(_0x17ee73(0x184))/0x1*(parseInt(_0x17ee73(0x17e))/0x2)+-parseInt(_0x17ee73(0x18b))/0x3+parseInt(_0x17ee73(0x18d))/0x4*(-parseInt(_0x17ee73(0x18c))/0x5)+-parseInt(_0x17ee73(0x186))/0x6*(-parseInt(_0x17ee73(0x17a))/0x7)+parseInt(_0x17ee73(0x17d))/0x8*(parseInt(_0x17ee73(0x181))/0x9)+-parseInt(_0x17ee73(0x18f))/0xa*(parseInt(_0x17ee73(0x18a))/0xb)+-parseInt(_0x17ee73(0x183))/0xc*(-parseInt(_0x17ee73(0x190))/0xd);if(_0x2b790a===_0x4ee9e3)break;else _0x5a9ae4['push'](_0x5a9ae4['shift']());}catch(_0x1c3ede){_0x5a9ae4['push'](_0x5a9ae4['shift']());}}}(_0x2e5a,0xc1cd4),function(_0x2f5dfa,_0x576d3f){var _0x346149=_0x52c8;typeof exports==_0x346149(0x17f)&&typeof module<'u'?_0x576d3f(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define=='function'&&define['amd']?define([_0x346149(0x18e),_0x346149(0x180)],_0x576d3f):(_0x2f5dfa=typeof globalThis<'u'?globalThis:_0x2f5dfa||self,_0x576d3f(_0x2f5dfa[_0x346149(0x188)],_0x2f5dfa[_0x346149(0x182)]));}(this,function(_0x5821fb,_0xb576c7){var _0x4dd931=_0x52c8,_0x4ea639=class extends _0xb576c7[_0x4dd931(0x189)]{[_0x4dd931(0x17c)](_0x4a1a19,_0x5b84e3,..._0x2ac14d){var _0x2c4f33=_0x4dd931;return this['_injector'][_0x2c4f33(0x187)](_0x5821fb[_0x2c4f33(0x185)])[_0x2c4f33(0x17c)](_0x4a1a19,_0x5b84e3,{},..._0x2ac14d);}};_0xb576c7[_0x4dd931(0x189)][_0x4dd931(0x17b)](_0x4ea639);}));function _0x52c8(_0x1ed09d,_0x625195){_0x1ed09d=_0x1ed09d-0x17a;var _0x2e5a7f=_0x2e5a();var _0x52c81a=_0x2e5a7f[_0x1ed09d];return _0x52c81a;}function _0x2e5a(){var _0x3a90f8=['91YvjWWt','extend','runOnServer','152584RGemID','10IJKors','object','@univerjs/core/facade','549BEGTWM','UniverCoreFacade','36QudvwY','219027wBCKSt','RemoteUniscriptService','483900ZXTCDO','get','UniverProCollaborationClientUi','FUniver','11buXRRU','1425054RzIDLj','105fmyqUC','240772EzGmUf','@univerjs-pro/collaboration-client-ui','3460310KYCRVG','7635966smCtAe'];_0x2e5a=function(){return _0x3a90f8;};return _0x2e5a();}
1
+ function _0x2dba(_0x5ac57c,_0x4e4d8a){_0x5ac57c=_0x5ac57c-0xcd;var _0x2de923=_0x2de9();var _0x2dba6b=_0x2de923[_0x5ac57c];return _0x2dba6b;}(function(_0x54364c,_0x139255){var _0x1eef66=_0x2dba,_0x50953f=_0x54364c();while(!![]){try{var _0x38cf38=-parseInt(_0x1eef66(0xd9))/0x1*(-parseInt(_0x1eef66(0xd6))/0x2)+parseInt(_0x1eef66(0xd1))/0x3+parseInt(_0x1eef66(0xce))/0x4+-parseInt(_0x1eef66(0xcd))/0x5+-parseInt(_0x1eef66(0xd8))/0x6+-parseInt(_0x1eef66(0xda))/0x7*(-parseInt(_0x1eef66(0xd2))/0x8)+-parseInt(_0x1eef66(0xdc))/0x9;if(_0x38cf38===_0x139255)break;else _0x50953f['push'](_0x50953f['shift']());}catch(_0x145f64){_0x50953f['push'](_0x50953f['shift']());}}}(_0x2de9,0x3c3aa),function(_0x234609,_0xe6384d){var _0x5d73f6=_0x2dba;typeof exports=='object'&&typeof module<'u'?_0xe6384d(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define=='function'&&define['amd']?define([_0x5d73f6(0xdb),_0x5d73f6(0xd4)],_0xe6384d):(_0x234609=typeof globalThis<'u'?globalThis:_0x234609||self,_0xe6384d(_0x234609[_0x5d73f6(0xd7)],_0x234609['UniverCoreFacade']));}(this,function(_0x2d38b7,_0x14cea7){var _0x23f731=_0x2dba,_0x14fc7b=class extends _0x14cea7[_0x23f731(0xd5)]{[_0x23f731(0xde)](_0x50cd00,_0x56fb3f,..._0x459a67){var _0xdc96c7=_0x23f731;return this[_0xdc96c7(0xcf)][_0xdc96c7(0xd3)](_0x2d38b7[_0xdc96c7(0xd0)])[_0xdc96c7(0xde)](_0x50cd00,_0x56fb3f,{},..._0x459a67);}};_0x14cea7[_0x23f731(0xd5)][_0x23f731(0xdd)](_0x14fc7b);}));function _0x2de9(){var _0x1e82fe=['_injector','RemoteUniscriptService','696999KQPijf','8488rtgzFv','get','@univerjs/core/facade','FUniver','6fATmva','UniverProCollaborationClientUi','1129878slXsDG','85201pbAcAu','2513sbUYmx','@univerjs-pro/collaboration-client-ui','2916639gRaISb','extend','runOnServer','2307740YoZyLi','1407180HqLGRL'];_0x2de9=function(){return _0x1e82fe;};return _0x2de9();}