uapp-communication-sdk 1.0.0-dev.67 → 1.0.0-dev.72

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 (59) hide show
  1. package/README.md +5 -2
  2. package/communication-sdk.cjs +16 -14
  3. package/communication-sdk.js +7900 -7651
  4. package/communication-sdk.standalone.js +162 -160
  5. package/package.json +1 -1
  6. package/types/core/time/viewer-timezone.d.ts +17 -0
  7. package/types/core/time/viewer-timezone.d.ts.map +1 -1
  8. package/types/features/calls/presentation/CallOverlay.d.ts.map +1 -1
  9. package/types/features/calls/presentation/call-pip.d.ts +62 -0
  10. package/types/features/calls/presentation/call-pip.d.ts.map +1 -0
  11. package/types/features/calls/presentation/use-call-pip.d.ts +30 -0
  12. package/types/features/calls/presentation/use-call-pip.d.ts.map +1 -0
  13. package/types/features/chat/presentation/ConversationHeader.d.ts.map +1 -1
  14. package/types/features/chat/presentation/MemberRow.d.ts.map +1 -1
  15. package/types/features/chat/presentation/dm-presence.d.ts +1 -2
  16. package/types/features/chat/presentation/dm-presence.d.ts.map +1 -1
  17. package/types/features/presence/application/index.d.ts +1 -0
  18. package/types/features/presence/application/index.d.ts.map +1 -1
  19. package/types/features/presence/application/use-cases/get-presence-of.d.ts +14 -0
  20. package/types/features/presence/application/use-cases/get-presence-of.d.ts.map +1 -0
  21. package/types/features/presence/domain/index.d.ts +1 -0
  22. package/types/features/presence/domain/index.d.ts.map +1 -1
  23. package/types/features/presence/domain/others-presence.d.ts +18 -0
  24. package/types/features/presence/domain/others-presence.d.ts.map +1 -0
  25. package/types/features/presence/domain/ports/presence-gateway.d.ts +7 -0
  26. package/types/features/presence/domain/ports/presence-gateway.d.ts.map +1 -1
  27. package/types/features/presence/infrastructure/dto/presence-dtos.d.ts +34 -0
  28. package/types/features/presence/infrastructure/dto/presence-dtos.d.ts.map +1 -1
  29. package/types/features/presence/infrastructure/http-presence-gateway.d.ts +2 -1
  30. package/types/features/presence/infrastructure/http-presence-gateway.d.ts.map +1 -1
  31. package/types/features/presence/infrastructure/http-presence-routes.d.ts +2 -0
  32. package/types/features/presence/infrastructure/http-presence-routes.d.ts.map +1 -1
  33. package/types/features/presence/infrastructure/presence-mappers.d.ts +3 -2
  34. package/types/features/presence/infrastructure/presence-mappers.d.ts.map +1 -1
  35. package/types/features/presence/presence-module.d.ts +2 -1
  36. package/types/features/presence/presence-module.d.ts.map +1 -1
  37. package/types/features/presence/presentation/MyPresenceMenu.d.ts.map +1 -1
  38. package/types/features/presence/presentation/PresenceModuleProvider.d.ts.map +1 -1
  39. package/types/features/presence/presentation/ViewerPresenceBadge.d.ts +22 -0
  40. package/types/features/presence/presentation/ViewerPresenceBadge.d.ts.map +1 -0
  41. package/types/features/presence/presentation/index.d.ts +2 -0
  42. package/types/features/presence/presentation/index.d.ts.map +1 -1
  43. package/types/features/presence/presentation/use-live-presence-poll.d.ts +18 -0
  44. package/types/features/presence/presentation/use-live-presence-poll.d.ts.map +1 -0
  45. package/types/features/users/presentation/UserPresenceCell.d.ts.map +1 -1
  46. package/types/sdk/index.d.ts +1 -1
  47. package/types/sdk/index.d.ts.map +1 -1
  48. package/types/sdk/presence/presence-client.d.ts +24 -0
  49. package/types/sdk/presence/presence-client.d.ts.map +1 -1
  50. package/types/shared/presence/PresenceBadge.d.ts +14 -3
  51. package/types/shared/presence/PresenceBadge.d.ts.map +1 -1
  52. package/types/shared/presence/index.d.ts +0 -1
  53. package/types/shared/presence/index.d.ts.map +1 -1
  54. package/types/shared/presence/live-presence-store.d.ts +24 -4
  55. package/types/shared/presence/live-presence-store.d.ts.map +1 -1
  56. package/types/shared/presence/presence-status.d.ts +1 -1
  57. package/types/shared/presence/presence-status.d.ts.map +1 -1
  58. package/types/shared/presence/format-presence-time.d.ts +0 -13
  59. package/types/shared/presence/format-presence-time.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PresenceBadge.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,2FAA2F;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,yCAK3B,kBAAkB,KAAG,YAYvB,CAAC"}
1
+ {"version":3,"file":"PresenceBadge.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3F,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,0CAK3B,kBAAkB,KAAG,YAYvB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  export * from './presence-status';
2
- export * from './format-presence-time';
3
2
  export * from './live-presence-store';
4
3
  export * from './PresenceBadge';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { PresenceStatus } from './presence-status';
2
- /** A person's status as last announced over the live connection. */
2
+ /** A person's status as last learned from the server — over an event or a poll. */
3
3
  export interface LiveStatusEntry {
4
4
  readonly status: PresenceStatus;
5
5
  /** When it ends (ISO UTC), or null when it is open-ended. */
@@ -8,14 +8,34 @@ export interface LiveStatusEntry {
8
8
  /**
9
9
  * The live status announced for a person, or undefined when none has arrived.
10
10
  *
11
- * <p>Undefined rather than a default: "nothing announced" and "announced as offline" are different
11
+ * <p>Undefined rather than a default: "nothing learned" and "learned to be offline" are different
12
12
  * facts, and only the caller knows what to fall back to.</p>
13
+ *
14
+ * <p>Mounting this hook also REGISTERS the person as visible, which is what puts them on the poll
15
+ * list — rendering a badge is the subscription, so no surface can forget to subscribe.</p>
13
16
  */
14
17
  export declare const useLiveStatus: (userId: string | null | undefined) => LiveStatusEntry | undefined;
15
- /** Record an announced status. Called by whichever transport owns the live connection. */
18
+ /**
19
+ * The ids currently watched by at least one mounted badge, as a SORTED, JOINED string.
20
+ *
21
+ * <p>A string rather than an array on purpose: zustand compares selector results by reference, and a
22
+ * fresh array every render would re-render every subscriber on every store write. The string is
23
+ * stable until the SET of watched people genuinely changes — which is exactly when the poll should
24
+ * re-key.</p>
25
+ */
26
+ export declare const useWatchedPresenceKey: () => string;
27
+ /** Record one announced status. Called by whichever transport owns the live connection. */
16
28
  export declare const applyLiveStatus: (userId: string, status: PresenceStatus, untilUtc: string | null) => void;
29
+ /** Record a whole poll response in one store write, so fifty badges re-render once, not fifty times. */
30
+ export declare const applyLiveStatuses: (entries: readonly {
31
+ userId: string;
32
+ status: PresenceStatus;
33
+ untilUtc: string | null;
34
+ }[]) => void;
17
35
  /** Read a status outside React (tests, non-hook call sites). */
18
36
  export declare const readLiveStatus: (userId: string) => LiveStatusEntry | undefined;
19
- /** Wipe every announced status on sign-out, and between tests. */
37
+ /** Read the watcher registry outside React (tests). */
38
+ export declare const readWatchedPresenceIds: () => readonly string[];
39
+ /** Wipe everything LEARNED — on sign-out, and between tests. Watchers mirror mounts and survive. */
20
40
  export declare const resetLivePresence: () => void;
21
41
  //# sourceMappingURL=live-presence-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live-presence-store.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/live-presence-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAqCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,eAAe,GAAG,SAGjF,CAAC;AAEJ,0FAA0F;AAC1F,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,QAAQ,cAAc,EACtB,UAAU,MAAM,GAAG,IAAI,KACtB,IAEF,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,eAAe,GAAG,SAClB,CAAC;AAEjD,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAC"}
1
+ {"version":3,"file":"live-presence-store.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/live-presence-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AA6ED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,eAAe,GAAG,SAiBnF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAO,MACsC,CAAC;AAEhF,2FAA2F;AAC3F,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,QAAQ,cAAc,EACtB,UAAU,MAAM,GAAG,IAAI,KACtB,IAEF,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,GAC5B,SAAS,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAAE,KACtF,IAEF,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,eAAe,GAAG,SAClB,CAAC;AAEjD,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,QAAO,SAAS,MAAM,EACK,CAAC;AAE/D,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAC"}
@@ -37,5 +37,5 @@ export declare const presenceStatusMeta: (status: PresenceStatus) => PresenceSta
37
37
  * formatted in the READER's locale — the server sends an instant, never a rendered string, because it
38
38
  * cannot know which timezone the person reading this is in.</p>
39
39
  */
40
- export declare const presenceLabel: (status: PresenceStatus, untilUtc: string | null | undefined, formatTime: (iso: string) => string) => string;
40
+ export declare const presenceLabel: (status: PresenceStatus, untilUtc: string | null | undefined, formatUntil: (iso: string) => string) => string;
41
41
  //# sourceMappingURL=presence-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence-status.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/presence-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,MAAM,GACN,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAYd;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAC/B,cAAqD,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,cAAc,KAAG,MACrC,CAAC;AAE5B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACtE;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,kBAAkB,EAO1D,CAAC;AASF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,cAAc,KAAG,kBACU,CAAC;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,cAAc,EACtB,UAAU,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,YAAY,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KAClC,MAMF,CAAC"}
1
+ {"version":3,"file":"presence-status.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/presence-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,MAAM,GACN,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAYd;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAC/B,cAAqD,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,cAAc,KAAG,MACrC,CAAC;AAE5B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACtE;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,kBAAkB,EAO1D,CAAC;AASF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,cAAc,KAAG,kBACU,CAAC;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,cAAc,EACtB,UAAU,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,MAMF,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * The end of a status, in the READER's clock.
3
- *
4
- * <p>The server sends an instant and never a rendered string, so the zone is chosen here — and it is
5
- * deliberately the browser's, not the viewer's configured schedule timezone. "Busy until 15:30" is
6
- * read to decide whether to interrupt someone right now; the only clock that answers that is the one
7
- * on the wall of whoever is reading it.</p>
8
- *
9
- * <p>Returns the raw value unchanged when it is not a parseable instant: showing the input beats
10
- * "Invalid Date", and beats a badge that vanishes because formatting threw.</p>
11
- */
12
- export declare const formatPresenceTime: (iso: string) => string;
13
- //# sourceMappingURL=format-presence-time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-presence-time.d.ts","sourceRoot":"","sources":["../../../../../src/shared/presence/format-presence-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAMhD,CAAC"}