@univerjs-pro/collaboration-client-ui 1.0.0-alpha.8 → 1.0.0-beta.1

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 (104) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.css +10 -26
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/commands/operations/update-remote-unit-presence.operation.d.ts +25 -0
  66. package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +2 -4
  67. package/lib/types/controllers/collab-cursor/unit-presence-collab-cursor-entity.d.ts +38 -0
  68. package/lib/types/controllers/collab-cursor/unit-presence-collab-cursor.controller.d.ts +21 -0
  69. package/lib/types/controllers/collab-status/collab-status.controller.d.ts +8 -13
  70. package/lib/types/controllers/data-loader/data-loader.controller.d.ts +1 -2
  71. package/lib/types/controllers/snapshot-loading/snapshot-loading.controller.d.ts +3 -15
  72. package/lib/types/locale/en-US.d.ts +0 -1
  73. package/lib/types/models/cursor.d.ts +0 -25
  74. package/lib/types/plugin.d.ts +3 -2
  75. package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +3 -3
  76. package/lib/types/views/components/SnapshotLoadingTimeout.d.ts +0 -4
  77. package/lib/types/views/shapes/doc-collab-cursor.d.ts +6 -1
  78. package/lib/umd/facade.js +1 -1
  79. package/lib/umd/index.js +1 -1
  80. package/lib/umd/locale/ar-SA.js +1 -1
  81. package/lib/umd/locale/ca-ES.js +1 -1
  82. package/lib/umd/locale/de-DE.js +1 -1
  83. package/lib/umd/locale/en-US.js +1 -1
  84. package/lib/umd/locale/es-ES.js +1 -1
  85. package/lib/umd/locale/fa-IR.js +1 -1
  86. package/lib/umd/locale/fr-FR.js +1 -1
  87. package/lib/umd/locale/id-ID.js +1 -1
  88. package/lib/umd/locale/it-IT.js +1 -1
  89. package/lib/umd/locale/ja-JP.js +1 -1
  90. package/lib/umd/locale/ko-KR.js +1 -1
  91. package/lib/umd/locale/pl-PL.js +1 -1
  92. package/lib/umd/locale/pt-BR.js +1 -1
  93. package/lib/umd/locale/ru-RU.js +1 -1
  94. package/lib/umd/locale/sk-SK.js +1 -1
  95. package/lib/umd/locale/vi-VN.js +1 -1
  96. package/lib/umd/locale/zh-CN.js +1 -1
  97. package/lib/umd/locale/zh-HK.js +1 -1
  98. package/lib/umd/locale/zh-TW.js +1 -1
  99. package/package.json +19 -23
  100. package/lib/types/controllers/collab-cursor/board-collab-cursor-entity.d.ts +0 -31
  101. package/lib/types/controllers/collab-cursor/board-collab-cursor-render.controller.d.ts +0 -21
  102. package/lib/types/controllers/collab-cursor/slide-collab-cursor-entity.d.ts +0 -34
  103. package/lib/types/controllers/collab-cursor/slide-collab-cursor-render.controller.d.ts +0 -21
  104. package/lib/types/views/shapes/slide-collab-cursor.shape.d.ts +0 -15
@@ -1 +1 @@
1
- const _0x7a789d=_0x2ba1;function _0x2ba1(_0x3bcf97,_0x547227){_0x3bcf97=_0x3bcf97-0x187;const _0x286bb1=_0x286b();let _0x2ba164=_0x286bb1[_0x3bcf97];return _0x2ba164;}(function(_0x4b3488,_0x42b269){const _0x5c554c=_0x2ba1,_0x491d1f=_0x4b3488();while(!![]){try{const _0x35a5b9=-parseInt(_0x5c554c(0x193))/0x1*(-parseInt(_0x5c554c(0x18b))/0x2)+-parseInt(_0x5c554c(0x190))/0x3+parseInt(_0x5c554c(0x19a))/0x4+parseInt(_0x5c554c(0x192))/0x5*(-parseInt(_0x5c554c(0x1a7))/0x6)+parseInt(_0x5c554c(0x18f))/0x7*(-parseInt(_0x5c554c(0x1a8))/0x8)+-parseInt(_0x5c554c(0x194))/0x9+parseInt(_0x5c554c(0x1a1))/0xa;if(_0x35a5b9===_0x42b269)break;else _0x491d1f['push'](_0x491d1f['shift']());}catch(_0x23452f){_0x491d1f['push'](_0x491d1f['shift']());}}}(_0x286b,0xb2f8b));function _0x286b(){const _0xdba516=['編輯衝突','公式計算已開始。','連線失敗,請檢查您的網絡。','公式計算佇列已滿,正在等待可用資源...','332SayVHy','認證錯誤','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','由於協作房間已關閉,編輯權限已被收回。','89383XvmUlM','4190466AWdjnK','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','25DpGoHs','6445uveWBw','3477177znIOaA','已同步','已離線,編輯將儲存在本機','協作衝突','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','本機檔案','2925968WOiAyi','重新整理頁面','伺服器未回應協作請求,您的編輯將儲存在本機。','連線失敗,將在稍後重試連線。','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','同步中...','19262740NmvaHA','正在擷取伺服器資料...','目前無法執行公式計算,請稍後重試。','協作房間已滿,您的編輯將暫存於本機。','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','正在載入工作表','978666gtXgTQ','248Hqzewe'];_0x286b=function(){return _0xdba516;};return _0x286b();}const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x7a789d(0x1a2),'conflict':_0x7a789d(0x187),'notCollab':_0x7a789d(0x199),'synced':_0x7a789d(0x195),'syncing':_0x7a789d(0x1a0),'offline':_0x7a789d(0x196)},'snapshotLoading':{'loadingSheet':_0x7a789d(0x1a6),'timeout':_0x7a789d(0x191),'refresh':_0x7a789d(0x19b)},'session':{'connection-failed':_0x7a789d(0x189),'will-retry':_0x7a789d(0x19d),'room-full':_0x7a789d(0x1a4),'collaboration-timeout':_0x7a789d(0x19c)},'conflict':{'title':_0x7a789d(0x197),'content':_0x7a789d(0x198)},'permission':{'title':_0x7a789d(0x18c),'content':_0x7a789d(0x18d)},'collaboration':{'offline-data-not-saved':_0x7a789d(0x1a5),'single-unit':{'warning':_0x7a789d(0x19f)},'closeRoom':_0x7a789d(0x18e)},'auth':{'needGotoLoginAlert':_0x7a789d(0x19e)},'formula':{'calculation':{'started':_0x7a789d(0x188),'waiting':_0x7a789d(0x18a),'unable':_0x7a789d(0x1a3)}}}};export{e as default};
1
+ function _0x531c(_0x404e00,_0x37487f){_0x404e00=_0x404e00-0xf8;const _0x171b3d=_0x171b();let _0x531cd6=_0x171b3d[_0x404e00];return _0x531cd6;}const _0x11ee9b=_0x531c;function _0x171b(){const _0x1bed62=['935124hVckUK','5yWIIQj','9TrQhnO','協作房間已滿,您的編輯將暫存於本機。','506832oRnRsL','已離線,編輯將儲存在本機','已同步','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','連線失敗,請檢查您的網絡。','正在擷取伺服器資料...','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','1048030xBCubX','公式計算佇列已滿,正在等待可用資源...','1318905pKORnL','109067EEiHTM','1714398tvlPxP','目前無法執行公式計算,請稍後重試。','171724cARcLR','由於協作房間已關閉,編輯權限已被收回。','248TdeZLd','公式計算已開始。'];_0x171b=function(){return _0x1bed62;};return _0x171b();}(function(_0x4c0d43,_0x1e922a){const _0x22670c=_0x531c,_0x4be5d0=_0x4c0d43();while(!![]){try{const _0x48aa1d=-parseInt(_0x22670c(0xf8))/0x1+parseInt(_0x22670c(0xfc))/0x2+parseInt(_0x22670c(0x10a))/0x3+-parseInt(_0x22670c(0x100))/0x4+-parseInt(_0x22670c(0xfd))/0x5*(-parseInt(_0x22670c(0x10c))/0x6)+parseInt(_0x22670c(0x10b))/0x7*(-parseInt(_0x22670c(0xfa))/0x8)+parseInt(_0x22670c(0xfe))/0x9*(-parseInt(_0x22670c(0x108))/0xa);if(_0x48aa1d===_0x1e922a)break;else _0x4be5d0['push'](_0x4be5d0['shift']());}catch(_0x42cb96){_0x4be5d0['push'](_0x4be5d0['shift']());}}}(_0x171b,0x4adfc));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x11ee9b(0x106),'conflict':'編輯衝突','notCollab':'本機檔案','synced':_0x11ee9b(0x102),'syncing':'同步中...','offline':_0x11ee9b(0x101)},'snapshotLoading':{'timeout':'資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','refresh':'重新整理頁面'},'session':{'connection-failed':_0x11ee9b(0x105),'will-retry':'連線失敗,將在稍後重試連線。','room-full':_0x11ee9b(0xff),'collaboration-timeout':'伺服器未回應協作請求,您的編輯將儲存在本機。'},'conflict':{'title':'協作衝突','content':_0x11ee9b(0x103)},'permission':{'title':'認證錯誤','content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'offline-data-not-saved':_0x11ee9b(0x107),'single-unit':{'warning':_0x11ee9b(0x104)},'closeRoom':_0x11ee9b(0xf9)},'auth':{'needGotoLoginAlert':'您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。'},'formula':{'calculation':{'started':_0x11ee9b(0xfb),'waiting':_0x11ee9b(0x109),'unable':_0x11ee9b(0x10d)}}}};export{e as default};
@@ -1 +1 @@
1
- const _0x55087b=_0x1553;function _0x4426(){const _0x399c56=['正在擷取伺服器資料...','519605fhiPkK','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','2683163HdukIF','連線失敗,將在稍後重試連線。','重新整理頁面','您有未儲存至伺服器的離線編輯,請檢查網路後重試。','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','18moImGY','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','伺服器未回應協作請求,您的編輯將儲存在本機。','145184cGcNfa','已同步','1529487PNtwwv','1154090cSvUoe','4TkTUCk','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','1885640jUbRLW','已離線,編輯將儲存在本機','18bHKZQj','同步中...','公式計算已開始。','正在載入工作表','編輯衝突','協作房間已滿,您的編輯將暫存於本機。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','208898QmOMIO'];_0x4426=function(){return _0x399c56;};return _0x4426();}(function(_0x37ce36,_0x523d57){const _0x42e24a=_0x1553,_0x520a10=_0x37ce36();while(!![]){try{const _0x380482=-parseInt(_0x42e24a(0xc8))/0x1*(-parseInt(_0x42e24a(0xb8))/0x2)+parseInt(_0x42e24a(0xc6))/0x3+parseInt(_0x42e24a(0xc4))/0x4+-parseInt(_0x42e24a(0xba))/0x5*(parseInt(_0x42e24a(0xc1))/0x6)+-parseInt(_0x42e24a(0xbc))/0x7+parseInt(_0x42e24a(0xca))/0x8+-parseInt(_0x42e24a(0xcc))/0x9*(parseInt(_0x42e24a(0xc7))/0xa);if(_0x380482===_0x523d57)break;else _0x520a10['push'](_0x520a10['shift']());}catch(_0x2803f1){_0x520a10['push'](_0x520a10['shift']());}}}(_0x4426,0x42d48));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x55087b(0xb9),'conflict':_0x55087b(0xb5),'notCollab':'本機檔案','synced':_0x55087b(0xc5),'syncing':_0x55087b(0xcd),'offline':_0x55087b(0xcb)},'snapshotLoading':{'loadingSheet':_0x55087b(0xb4),'timeout':_0x55087b(0xbb),'refresh':_0x55087b(0xbe)},'session':{'connection-failed':'連線失敗,請檢查您的網路。','will-retry':_0x55087b(0xbd),'room-full':_0x55087b(0xb6),'collaboration-timeout':_0x55087b(0xc3)},'conflict':{'title':'協作衝突','content':_0x55087b(0xc9)},'permission':{'title':'認證錯誤','content':_0x55087b(0xc2)},'collaboration':{'offline-data-not-saved':_0x55087b(0xbf),'single-unit':{'warning':_0x55087b(0xb7)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x55087b(0xc0)},'formula':{'calculation':{'started':_0x55087b(0xce),'waiting':'公式計算佇列已滿,正在等待可用資源...','unable':'目前無法執行公式計算,請稍後重試。'}}}};function _0x1553(_0x42b003,_0x3af462){_0x42b003=_0x42b003-0xb4;const _0x4426b4=_0x4426();let _0x15531f=_0x4426b4[_0x42b003];return _0x15531f;}export{e as default};
1
+ function _0x33f2(){const _0x2a1053=['重新整理頁面','72Ufczog','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','公式計算佇列已滿,正在等待可用資源...','75467qDUJGC','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','558874vUzvEe','3647310tFgWOv','5296437roifeh','5hYMKTE','公式計算已開始。','連線失敗,將在稍後重試連線。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','137109VPVtcv','由於協作房間已關閉,編輯權限已被收回。','點擊重新連線','本機檔案','已離線,編輯將儲存在本機','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','9993445jdOUtn','您有未儲存至伺服器的離線編輯,請檢查網路後重試。','38443836rVVWKF','正在擷取伺服器資料...','同步中...','16agBPVv','協作房間已滿,您的編輯將暫存於本機。','1wSnzDA','10CQXxgM','連線失敗,請檢查您的網路。'];_0x33f2=function(){return _0x2a1053;};return _0x33f2();}const _0x19d7fc=_0x59fd;(function(_0x3dedef,_0x494b59){const _0x8d5056=_0x59fd,_0x5ea338=_0x3dedef();while(!![]){try{const _0x7bf32a=parseInt(_0x8d5056(0x8c))/0x1*(-parseInt(_0x8d5056(0x96))/0x2)+parseInt(_0x8d5056(0x9d))/0x3*(-parseInt(_0x8d5056(0x8a))/0x4)+-parseInt(_0x8d5056(0x99))/0x5*(parseInt(_0x8d5056(0x97))/0x6)+-parseInt(_0x8d5056(0x94))/0x7*(parseInt(_0x8d5056(0x90))/0x8)+parseInt(_0x8d5056(0x98))/0x9*(-parseInt(_0x8d5056(0x8d))/0xa)+-parseInt(_0x8d5056(0x85))/0xb+parseInt(_0x8d5056(0x87))/0xc;if(_0x7bf32a===_0x494b59)break;else _0x5ea338['push'](_0x5ea338['shift']());}catch(_0xf6ee6e){_0x5ea338['push'](_0x5ea338['shift']());}}}(_0x33f2,0x83b6e));function _0x59fd(_0x599fae,_0x50ff0e){_0x599fae=_0x599fae-0x84;const _0x33f24d=_0x33f2();let _0x59fdc7=_0x33f24d[_0x599fae];return _0x59fdc7;}const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x19d7fc(0x9f)}},'collabStatus':{'fetchMiss':_0x19d7fc(0x88),'conflict':'編輯衝突','notCollab':_0x19d7fc(0xa0),'synced':'已同步','syncing':_0x19d7fc(0x89),'offline':_0x19d7fc(0xa1)},'snapshotLoading':{'timeout':_0x19d7fc(0x92),'refresh':_0x19d7fc(0x8f)},'session':{'connection-failed':_0x19d7fc(0x8e),'will-retry':_0x19d7fc(0x9b),'room-full':_0x19d7fc(0x8b),'collaboration-timeout':'伺服器未回應協作請求,您的編輯將儲存在本機。'},'conflict':{'title':'協作衝突','content':_0x19d7fc(0x95)},'permission':{'title':'認證錯誤','content':_0x19d7fc(0x91)},'collaboration':{'offline-data-not-saved':_0x19d7fc(0x86),'single-unit':{'warning':_0x19d7fc(0x9c)},'closeRoom':_0x19d7fc(0x9e)},'auth':{'needGotoLoginAlert':_0x19d7fc(0x84)},'formula':{'calculation':{'started':_0x19d7fc(0x9a),'waiting':_0x19d7fc(0x93),'unable':'目前無法執行公式計算,請稍後重試。'}}}};export{e as default};
@@ -0,0 +1,25 @@
1
+ import type { IOperation, UniverInstanceType } from '@univerjs/core';
2
+ import type { IRemoteUnitPresenceState } from '@univerjs/ui';
3
+ export declare enum UnitPresenceUpdateType {
4
+ SET = "set",
5
+ REMOVE = "remove",
6
+ CLEAR = "clear"
7
+ }
8
+ export interface ISetRemoteUnitPresenceUpdate {
9
+ type: UnitPresenceUpdateType.SET;
10
+ state: IRemoteUnitPresenceState;
11
+ }
12
+ export interface IRemoveRemoteUnitPresenceUpdate {
13
+ type: UnitPresenceUpdateType.REMOVE;
14
+ unitId: string;
15
+ memberId: string;
16
+ }
17
+ export interface IClearRemoteUnitPresenceUpdate {
18
+ type: UnitPresenceUpdateType.CLEAR;
19
+ unitId: string;
20
+ }
21
+ export interface IUpdateRemoteUnitPresenceOperationParams {
22
+ unitType: UniverInstanceType;
23
+ update: ISetRemoteUnitPresenceUpdate | IRemoveRemoteUnitPresenceUpdate | IClearRemoteUnitPresenceUpdate;
24
+ }
25
+ export declare const UpdateRemoteUnitPresenceOperation: IOperation<IUpdateRemoteUnitPresenceOperationParams>;
@@ -1,5 +1,5 @@
1
1
  import type { Observable } from 'rxjs';
2
- import type { IDocCollabCursor, IElementCollabCursor, ISheetCollabCursor } from '../../models/cursor';
2
+ import type { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
3
3
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
4
4
  import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
5
5
  /**
@@ -15,10 +15,8 @@ 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, IElementCollabCursor> | Map<string, IElementCollabCursor>>;
18
+ getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor>>;
19
19
  private _init;
20
20
  private _startSheetCollabCursor;
21
21
  private _startDocCollabCursor;
22
- private _startSlideCollabCursor;
23
- private _startBoardCollabCursor;
24
22
  }
@@ -0,0 +1,38 @@
1
+ import type { CollaborationSession } from '@univerjs-pro/collaboration-client';
2
+ import type { UniverInstanceType } from '@univerjs/core';
3
+ import type { IUnitPresenceUIAdapter } from '@univerjs/ui';
4
+ import { MemberService } from '@univerjs-pro/collaboration-client';
5
+ import { ICommandService, RxDisposable } from '@univerjs/core';
6
+ import { ColorAssignService } from '../../services/color-assign/color-assign.service';
7
+ interface IUnitPresencePayload {
8
+ kind: string;
9
+ unitType: UniverInstanceType;
10
+ unitId: string;
11
+ subUnitId: string;
12
+ selectedIds: string[];
13
+ focusedId: string | null;
14
+ pointer: {
15
+ x: number;
16
+ y: number;
17
+ } | null;
18
+ }
19
+ export declare function parseUnitPresencePayload(selection: string, fallbackUnitType?: UniverInstanceType): IUnitPresencePayload | null;
20
+ export declare class UnitPresenceCollabCursorEntity extends RxDisposable {
21
+ readonly unitId: string;
22
+ private readonly _session;
23
+ private readonly _adapter;
24
+ private readonly _colorAssignService;
25
+ private readonly _memberService;
26
+ private readonly _commandService;
27
+ private _online;
28
+ private _initialized;
29
+ constructor(unitId: string, _session: CollaborationSession, _adapter: IUnitPresenceUIAdapter, _colorAssignService: ColorAssignService, _memberService: MemberService, _commandService: ICommandService);
30
+ get unitType(): UniverInstanceType;
31
+ dispose(): void;
32
+ init(): void;
33
+ private _sendLocalPresence;
34
+ private _handleCursorUpdate;
35
+ private _removeRemotePresence;
36
+ private _clearRemotePresences;
37
+ }
38
+ export {};
@@ -0,0 +1,21 @@
1
+ import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
2
+ import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
3
+ import { IUnitPresenceUIAdapterRegistry } from '@univerjs/ui';
4
+ export declare class UnitPresenceCollabCursorController extends RxDisposable {
5
+ private readonly _univerInstanceService;
6
+ private readonly _injector;
7
+ private readonly _collabSessionService;
8
+ private readonly _adapterRegistry;
9
+ private _isDisposed;
10
+ private readonly _entities;
11
+ private readonly _pendingEntities;
12
+ private readonly _adapterDisposables;
13
+ constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService, _adapterRegistry: IUnitPresenceUIAdapterRegistry);
14
+ dispose(): void;
15
+ private _init;
16
+ private _syncAdapters;
17
+ private _bindAdapter;
18
+ private _startEntity;
19
+ private _disposeEntity;
20
+ private _disposeEntitiesForType;
21
+ }
@@ -1,6 +1,6 @@
1
1
  import { CollaborationController, CollaborationStatus } from '@univerjs-pro/collaboration-client';
2
2
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
3
- import { IUIPartsService } from '@univerjs/ui';
3
+ import { IUIPartsService, IUnitPresenceUIAdapterRegistry } from '@univerjs/ui';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
  /**
6
6
  * This controller is responsible for monitoring the collaboration status of the currently focused unit.
@@ -10,20 +10,15 @@ export declare class DesktopCollaborationStatusDisplayController extends Disposa
10
10
  private readonly _injector;
11
11
  private readonly _collaborationController;
12
12
  private readonly _uiPartsService;
13
+ private readonly _presenceAdapterRegistry;
13
14
  protected readonly _status$: BehaviorSubject<CollaborationStatus>;
14
- constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collaborationController: CollaborationController, _uiPartsService: IUIPartsService);
15
- private _initStatusListener;
16
- protected _initStatusComponent(): void;
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);
15
+ private readonly _presenceStatusRegistrations;
16
+ constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collaborationController: CollaborationController, _uiPartsService: IUIPartsService, _presenceAdapterRegistry: IUnitPresenceUIAdapterRegistry);
17
+ dispose(): void;
25
18
  private _initStatusListener;
26
19
  protected _initStatusComponent(): void;
20
+ private _initPresenceStatusComponents;
21
+ private _syncPresenceStatusComponents;
22
+ private _registerPresenceStatusComponent;
27
23
  }
28
24
  export declare function getCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
29
- export declare function getBoardCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
@@ -1,6 +1,5 @@
1
1
  import { DataLoaderService } from '@univerjs-pro/collaboration-client';
2
2
  import { ICommandService, ILogService, RxDisposable } from '@univerjs/core';
3
- import { IRemoteInstanceService } from '@univerjs/rpc';
4
3
  import { IURLService } from '../../services/url/url.service';
5
4
  /**
6
5
  * This controller loads data when URL changes.
@@ -10,7 +9,7 @@ export declare class CollaborationDataLoaderController extends RxDisposable {
10
9
  private readonly _logService;
11
10
  private readonly _commandService;
12
11
  private readonly _dataLoaderService;
13
- constructor(_urlService: IURLService, _logService: ILogService, _commandService: ICommandService, _dataLoaderService: DataLoaderService, remoteInstanceService?: IRemoteInstanceService);
12
+ constructor(_urlService: IURLService, _logService: ILogService, _commandService: ICommandService, _dataLoaderService: DataLoaderService);
14
13
  private _init;
15
14
  private _setupSubUnitSync;
16
15
  private _updateURLWithCurrentState;
@@ -1,36 +1,24 @@
1
1
  import type { ISnapshotLoadingTimeoutState } from '../../views/components/SnapshotLoadingTimeout';
2
2
  import { SnapshotLoadingService } from '@univerjs-pro/collaboration';
3
- import { Disposable, Injector, LocaleService, PluginService } from '@univerjs/core';
4
- import { IMessageService, IShortcutService, IUIPartsService } from '@univerjs/ui';
3
+ import { Disposable, Injector, LocaleService } from '@univerjs/core';
4
+ import { IMessageService, IUIPartsService } from '@univerjs/ui';
5
5
  import { IURLService } from '../../services/url/url.service';
6
6
  export declare class SnapshotLoadingController extends Disposable {
7
7
  private readonly _snapshotLoadingService;
8
8
  private readonly _messageService;
9
9
  private readonly _localeService;
10
10
  private readonly _injector;
11
- private readonly _pluginService;
12
- private readonly _shortcutService;
13
11
  private readonly _urlService;
14
12
  private readonly _timeoutState$;
15
- private readonly _interactionBlocked$;
16
13
  private readonly _messageIds;
17
14
  private readonly _blockProgressWatches;
18
- private readonly _handoffUnitIds;
19
15
  private _latestStates;
20
- private _previewUnitId?;
21
- private _shortcutBlock?;
22
- private _sheetLoadingRenderService?;
23
16
  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);
17
+ constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector, uiPartsService: IUIPartsService, _urlService: IURLService);
25
18
  dispose(): void;
26
19
  private _updateMessage;
27
20
  private _watchBlockProgress;
28
21
  private _clearBlockProgressWatch;
29
22
  private _clearTimeoutState;
30
- private _updateSheetPreview;
31
- private _handoffPreview;
32
- private _hidePreview;
33
- private _setInteractionBlocked;
34
23
  private _isVisibleUnit;
35
- private _getSheetLoadingRenderService;
36
24
  }
@@ -14,7 +14,6 @@ declare const locale: {
14
14
  offline: string;
15
15
  };
16
16
  snapshotLoading: {
17
- loadingSheet: string;
18
17
  timeout: string;
19
18
  refresh: string;
20
19
  };
@@ -34,28 +34,3 @@ export interface IDocCollabCursor {
34
34
  /** The deserialized ranges of collab cursor. */
35
35
  ranges: ITextRangeWithStyle[];
36
36
  }
37
- export interface IElementCollabSelectionPayload<TKind extends string = string> {
38
- kind: TKind;
39
- unitId: string;
40
- subUnitId: string;
41
- selectedIds: string[];
42
- focusedId: string | null;
43
- }
44
- export interface IElementCollabCursor {
45
- /** Stroke color of this collab cursor */
46
- color: string;
47
- /** Displayed user name of this cursor */
48
- name: string;
49
- /** Host unit ID */
50
- unitId: string;
51
- /** Host page ID */
52
- subUnitId: string;
53
- /** Remote selected element IDs */
54
- selectedIds: string[];
55
- /** Remote focused element ID */
56
- focusedId: string | null;
57
- /** Serialized selection payload */
58
- selection: string;
59
- }
60
- export type ISlideCollabSelectionPayload = IElementCollabSelectionPayload<'slide-element-selection'>;
61
- export type IBoardCollabSelectionPayload = IElementCollabSelectionPayload<'board-element-selection'>;
@@ -1,15 +1,16 @@
1
1
  import type { IUniverCollaborationClientUIConfig } from './config/config';
2
- import { IConfigService, Injector, Plugin } from '@univerjs/core';
2
+ import { ICommandService, IConfigService, Injector, Plugin } from '@univerjs/core';
3
3
  import { IRenderManagerService } from '@univerjs/engine-render';
4
4
  export declare class UniverCollaborationClientUIPlugin extends Plugin {
5
5
  private readonly _config;
6
6
  private readonly _renderManagerService;
7
7
  protected _injector: Injector;
8
8
  private readonly _configService;
9
+ private readonly _commandService;
9
10
  static pluginName: string;
10
11
  static packageName: string;
11
12
  static version: string;
12
- constructor(_config: Partial<IUniverCollaborationClientUIConfig> | undefined, _renderManagerService: IRenderManagerService, _injector: Injector, _configService: IConfigService);
13
+ constructor(_config: Partial<IUniverCollaborationClientUIConfig> | undefined, _renderManagerService: IRenderManagerService, _injector: Injector, _configService: IConfigService, _commandService: ICommandService);
13
14
  onStarting(): void;
14
15
  onRendered(): void;
15
16
  private _registerDependencies;
@@ -1,9 +1,9 @@
1
1
  import type { IChangeset } from '@univerjs-pro/collaboration';
2
2
  import { ITransformService } from '@univerjs-pro/collaboration';
3
- import { Injector } from '@univerjs/core';
3
+ import { DocSelectionManagerService } from '@univerjs/docs';
4
4
  export declare class DocTransformSelectionsService {
5
- private readonly _injector;
5
+ private readonly _docSelectionManagerService;
6
6
  private readonly _transformService;
7
- constructor(_injector: Injector, _transformService: ITransformService);
7
+ constructor(_docSelectionManagerService: DocSelectionManagerService, _transformService: ITransformService);
8
8
  transformSelections(changeset: IChangeset): void;
9
9
  }
@@ -7,9 +7,5 @@ export interface ISnapshotLoadingTimeoutState {
7
7
  interface IProps {
8
8
  state$: Observable<ISnapshotLoadingTimeoutState | null>;
9
9
  }
10
- interface ISnapshotLoadingGlobalProps extends IProps {
11
- interactionBlocked$: Observable<boolean>;
12
- }
13
- export declare function SnapshotLoadingGlobal({ state$, interactionBlocked$ }: ISnapshotLoadingGlobalProps): import("react").JSX.Element;
14
10
  export declare function SnapshotLoadingTimeout({ state$ }: IProps): import("react").JSX.Element | null;
15
11
  export {};
@@ -1,4 +1,5 @@
1
- import type { Documents, DocumentSkeleton, Scene } from '@univerjs/engine-render';
1
+ import type { Nullable } from '@univerjs/core';
2
+ import type { Documents, DocumentSkeleton, INodePosition, Scene } from '@univerjs/engine-render';
2
3
  import type { IDocCollabCursor } from '../../models/cursor';
3
4
  /**
4
5
  * Render a single collaborated cursor on the canvas.
@@ -25,3 +26,7 @@ export declare class DocCollabCursor {
25
26
  private _getAnchorBounding;
26
27
  private _getScale;
27
28
  }
29
+ export declare function getDocCollabCursorTextRenderability(startPosition: Nullable<INodePosition>, endPosition: Nullable<INodePosition>): {
30
+ canRenderAnchor: boolean;
31
+ canRenderSelection: boolean;
32
+ };
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x4003(_0x32880f,_0x39309a){_0x32880f=_0x32880f-0x19b;var _0x548194=_0x5481();var _0x4003e2=_0x548194[_0x32880f];return _0x4003e2;}(function(_0xec81f9,_0x9f8169){var _0x2ca7ee=_0x4003,_0x543682=_0xec81f9();while(!![]){try{var _0x9d27c=parseInt(_0x2ca7ee(0x19d))/0x1+parseInt(_0x2ca7ee(0x1a3))/0x2*(parseInt(_0x2ca7ee(0x1ac))/0x3)+-parseInt(_0x2ca7ee(0x1af))/0x4*(parseInt(_0x2ca7ee(0x1a1))/0x5)+parseInt(_0x2ca7ee(0x1a5))/0x6+parseInt(_0x2ca7ee(0x19e))/0x7*(-parseInt(_0x2ca7ee(0x1a0))/0x8)+parseInt(_0x2ca7ee(0x1ae))/0x9+-parseInt(_0x2ca7ee(0x1ab))/0xa*(parseInt(_0x2ca7ee(0x1a4))/0xb);if(_0x9d27c===_0x9f8169)break;else _0x543682['push'](_0x543682['shift']());}catch(_0x489e0a){_0x543682['push'](_0x543682['shift']());}}}(_0x5481,0xdb4e5),function(_0x39064f,_0x11efec){var _0x518abc=_0x4003;typeof exports=='object'&&typeof module<'u'?_0x11efec(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define=='function'&&define[_0x518abc(0x1a6)]?define(['@univerjs-pro/collaboration-client-ui',_0x518abc(0x1a2)],_0x11efec):(_0x39064f=typeof globalThis<'u'?globalThis:_0x39064f||self,_0x11efec(_0x39064f[_0x518abc(0x1ad)],_0x39064f[_0x518abc(0x19b)]));}(this,function(_0x1c481e,_0x476195){var _0x5e4b8e=_0x4003,_0x2bcbc0=class extends _0x476195['FUniver']{[_0x5e4b8e(0x1aa)](_0x8bc636,_0x50f04f,..._0x299efd){var _0x204cad=_0x5e4b8e;return this[_0x204cad(0x19f)][_0x204cad(0x19c)](_0x1c481e[_0x204cad(0x1a8)])['runOnServer'](_0x8bc636,_0x50f04f,{},..._0x299efd);}};_0x476195[_0x5e4b8e(0x1a9)][_0x5e4b8e(0x1a7)](_0x2bcbc0);}));function _0x5481(){var _0x38a55e=['56HIfcMH','134455ZOAiMp','@univerjs/core/facade','16rqXoYv','396099ZvisCN','2413074xNKNOc','amd','extend','RemoteUniscriptService','FUniver','runOnServer','200MyHKBr','635982ixMkgv','UniverProCollaborationClientUi','6070338BmptNq','68mEOqgp','UniverCoreFacade','get','19462SwpUUx','716471LiPVVG','_injector'];_0x5481=function(){return _0x38a55e;};return _0x5481();}
1
+ function _0x143b(_0x425993,_0x4c5b22){_0x425993=_0x425993-0x156;var _0x186a87=_0x186a();var _0x143b41=_0x186a87[_0x425993];return _0x143b41;}function _0x186a(){var _0x1db30c=['object','16IcjYwf','function','2256648yhrVyv','56RyCveO','616887QSbRfs','runOnServer','1138502cfqRTJ','@univerjs/core/facade','UniverProCollaborationClientUi','1780NPNbSI','_injector','21329ceBZjK','RemoteUniscriptService','89344eVhyQc','FUniver','10090591fkUXUN','299454pTkIoO','10mkrurt','amd','UniverCoreFacade'];_0x186a=function(){return _0x1db30c;};return _0x186a();}(function(_0x182074,_0x438e90){var _0x1abfac=_0x143b,_0x202a66=_0x182074();while(!![]){try{var _0x284d04=parseInt(_0x1abfac(0x159))/0x1+parseInt(_0x1abfac(0x160))/0x2+-parseInt(_0x1abfac(0x163))/0x3*(-parseInt(_0x1abfac(0x156))/0x4)+-parseInt(_0x1abfac(0x164))/0x5*(parseInt(_0x1abfac(0x16a))/0x6)+-parseInt(_0x1abfac(0x162))/0x7+parseInt(_0x1abfac(0x168))/0x8*(parseInt(_0x1abfac(0x157))/0x9)+-parseInt(_0x1abfac(0x15c))/0xa*(-parseInt(_0x1abfac(0x15e))/0xb);if(_0x284d04===_0x438e90)break;else _0x202a66['push'](_0x202a66['shift']());}catch(_0x127876){_0x202a66['push'](_0x202a66['shift']());}}}(_0x186a,0xd4305),function(_0x3989a6,_0x10fc38){var _0x4bc4e3=_0x143b;typeof exports==_0x4bc4e3(0x167)&&typeof module<'u'?_0x10fc38(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define==_0x4bc4e3(0x169)&&define[_0x4bc4e3(0x165)]?define(['@univerjs-pro/collaboration-client-ui',_0x4bc4e3(0x15a)],_0x10fc38):(_0x3989a6=typeof globalThis<'u'?globalThis:_0x3989a6||self,_0x10fc38(_0x3989a6[_0x4bc4e3(0x15b)],_0x3989a6[_0x4bc4e3(0x166)]));}(this,function(_0x103547,_0x29a325){var _0x1e4f89=_0x143b,_0x5b0d76=class extends _0x29a325['FUniver']{[_0x1e4f89(0x158)](_0x1bbb52,_0x584631,..._0x526e78){var _0x34caf1=_0x1e4f89;return this[_0x34caf1(0x15d)]['get'](_0x103547[_0x34caf1(0x15f)])['runOnServer'](_0x1bbb52,_0x584631,{},..._0x526e78);}};_0x29a325[_0x1e4f89(0x161)]['extend'](_0x5b0d76);}));