@arbidocs/react 0.5.164 → 0.5.166

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 (96) hide show
  1. package/dist/ai/MessageArtifactCard.js +16 -0
  2. package/dist/ai/MessageArtifactCard.js.map +2 -2
  3. package/dist/artifacts/artifact-kind.js +12 -1
  4. package/dist/artifacts/artifact-kind.js.map +2 -2
  5. package/dist/artifacts/index.cjs +26 -15
  6. package/dist/artifacts/index.cjs.map +1 -1
  7. package/dist/artifacts/index.d.ts +3 -20
  8. package/dist/artifacts/index.js +3 -1
  9. package/dist/artifacts/index.js.map +2 -2
  10. package/dist/calls/livekit/index.cjs +48 -48
  11. package/dist/chat/ChatBubble.js +56 -65
  12. package/dist/chat/ChatBubble.js.map +2 -2
  13. package/dist/chat/open-document.js +4 -1
  14. package/dist/chat/open-document.js.map +2 -2
  15. package/dist/{chunk-6HJZCIND.cjs → chunk-3DPOR5IR.cjs} +6 -3
  16. package/dist/chunk-3DPOR5IR.cjs.map +1 -0
  17. package/dist/{chunk-42X5ZO7Y.cjs → chunk-4TWXQFHU.cjs} +69 -69
  18. package/dist/{chunk-42X5ZO7Y.cjs.map → chunk-4TWXQFHU.cjs.map} +1 -1
  19. package/dist/{chunk-ZZBCZRA5.cjs → chunk-5QOZLKAY.cjs} +5 -2
  20. package/dist/chunk-5QOZLKAY.cjs.map +1 -0
  21. package/dist/{chunk-SUMXDNYG.cjs → chunk-BI4SYRLX.cjs} +70 -63
  22. package/dist/chunk-BI4SYRLX.cjs.map +1 -0
  23. package/dist/{chunk-ZBI5AMZC.cjs → chunk-HRQS27DO.cjs} +37 -37
  24. package/dist/{chunk-ZBI5AMZC.cjs.map → chunk-HRQS27DO.cjs.map} +1 -1
  25. package/dist/{chunk-V5WCKJEH.cjs → chunk-Q7BGWKHP.cjs} +44 -44
  26. package/dist/{chunk-V5WCKJEH.cjs.map → chunk-Q7BGWKHP.cjs.map} +1 -1
  27. package/dist/{chunk-6TJL4Z2F.cjs → chunk-TX7UCN73.cjs} +10 -10
  28. package/dist/{chunk-6TJL4Z2F.cjs.map → chunk-TX7UCN73.cjs.map} +1 -1
  29. package/dist/{chunk-WJIRX5MS.cjs → chunk-W4W75MSO.cjs} +134 -25
  30. package/dist/chunk-W4W75MSO.cjs.map +1 -0
  31. package/dist/chunk-WABJGKVA.cjs +246 -0
  32. package/dist/chunk-WABJGKVA.cjs.map +1 -0
  33. package/dist/databases.js.map +2 -2
  34. package/dist/directmessages/DmComposer.js +26 -10
  35. package/dist/directmessages/DmComposer.js.map +2 -2
  36. package/dist/directmessages/index.js +2 -0
  37. package/dist/directmessages/index.js.map +2 -2
  38. package/dist/directmessages/useChats.js +11 -0
  39. package/dist/directmessages/useChats.js.map +2 -2
  40. package/dist/document-tools/core.cjs +100 -100
  41. package/dist/document-tools/core.d.ts +2 -2
  42. package/dist/document-tools/index.cjs +102 -102
  43. package/dist/document-tools/index.d.ts +2 -2
  44. package/dist/entities/DocumentEntity.js +8 -3
  45. package/dist/entities/DocumentEntity.js.map +2 -2
  46. package/dist/entities/EntityActionsMenu.js +53 -0
  47. package/dist/entities/EntityActionsMenu.js.map +7 -0
  48. package/dist/entities/EntityPill.js +50 -16
  49. package/dist/entities/EntityPill.js.map +2 -2
  50. package/dist/entities/ProjectEntity.js +4 -0
  51. package/dist/entities/ProjectEntity.js.map +2 -2
  52. package/dist/entities/TagEntity.js +1 -0
  53. package/dist/entities/TagEntity.js.map +2 -2
  54. package/dist/entities/UserEntity.js +25 -3
  55. package/dist/entities/UserEntity.js.map +2 -2
  56. package/dist/entities/links.js +9 -0
  57. package/dist/entities/links.js.map +7 -0
  58. package/dist/entities/reference-data.js +56 -0
  59. package/dist/entities/reference-data.js.map +7 -0
  60. package/dist/{file-shares.d-Bwy9k3Db.d.ts → file-shares.d-Dlt7pKRi.d.ts} +3 -0
  61. package/dist/host/config.js.map +2 -2
  62. package/dist/index.cjs +1836 -1748
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/{index.d-Dy_Pz6Vl.d.ts → index.d-BaZUctD1.d.ts} +34 -10
  65. package/dist/index.d.ts +164 -20
  66. package/dist/index.js +5 -0
  67. package/dist/index.js.map +2 -2
  68. package/dist/query-keys.js +3 -0
  69. package/dist/query-keys.js.map +2 -2
  70. package/dist/session/conversation-panels.js +5 -3
  71. package/dist/session/conversation-panels.js.map +2 -2
  72. package/dist/session/layout.js +5 -0
  73. package/dist/session/layout.js.map +2 -2
  74. package/dist/shell/index.cjs +37 -37
  75. package/dist/{stored-markdown.d-Bp18vrbr.d.ts → stored-markdown.d-BLQPny3e.d.ts} +21 -1
  76. package/dist/ui/index.cjs +155 -151
  77. package/dist/ui/index.d.ts +1 -1
  78. package/dist/ui/index.js +2 -0
  79. package/dist/ui/index.js.map +2 -2
  80. package/dist/viewers/AudioViewer.js +13 -3
  81. package/dist/viewers/AudioViewer.js.map +2 -2
  82. package/dist/viewers/MediaTranscriptPlayer.js +171 -0
  83. package/dist/viewers/MediaTranscriptPlayer.js.map +7 -0
  84. package/dist/viewers/VideoViewer.js +4 -11
  85. package/dist/viewers/VideoViewer.js.map +2 -2
  86. package/dist/viewers/index.cjs +8 -4
  87. package/dist/viewers/index.d.ts +17 -3
  88. package/dist/viewers/index.js +2 -0
  89. package/dist/viewers/index.js.map +2 -2
  90. package/package.json +3 -3
  91. package/dist/chunk-6HJZCIND.cjs.map +0 -1
  92. package/dist/chunk-SUMXDNYG.cjs.map +0 -1
  93. package/dist/chunk-TMPDW7J5.cjs +0 -79
  94. package/dist/chunk-TMPDW7J5.cjs.map +0 -1
  95. package/dist/chunk-WJIRX5MS.cjs.map +0 -1
  96. package/dist/chunk-ZZBCZRA5.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkSUMXDNYG_cjs = require('./chunk-SUMXDNYG.cjs');
4
- var chunkZZBCZRA5_cjs = require('./chunk-ZZBCZRA5.cjs');
3
+ var chunkBI4SYRLX_cjs = require('./chunk-BI4SYRLX.cjs');
4
+ var chunk5QOZLKAY_cjs = require('./chunk-5QOZLKAY.cjs');
5
5
  var chunk5ECKSF6H_cjs = require('./chunk-5ECKSF6H.cjs');
6
6
  var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
7
7
  var reactQuery = require('@tanstack/react-query');
@@ -10,9 +10,9 @@ var browser = require('@arbidocs/sdk/browser');
10
10
  var client = require('@arbidocs/client');
11
11
 
12
12
  function useUserSettings(options) {
13
- const arbi = chunkZZBCZRA5_cjs.useArbi();
13
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
14
14
  return reactQuery.useQuery({
15
- queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings(),
15
+ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings(),
16
16
  queryFn: () => arbi.settings.get(),
17
17
  // Edited about once a month, and every write here patches the cache: no refetch on each mount.
18
18
  staleTime: 30 * 60 * 1e3,
@@ -21,23 +21,23 @@ function useUserSettings(options) {
21
21
  });
22
22
  }
23
23
  function useUpdateUserSettings() {
24
- const arbi = chunkZZBCZRA5_cjs.useArbi();
24
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
25
25
  const qc = reactQuery.useQueryClient();
26
26
  return reactQuery.useMutation({
27
27
  mutationFn: (patch) => arbi.settings.update(patch),
28
28
  onMutate: async (patch) => {
29
- await qc.cancelQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings() });
30
- const previous = qc.getQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings());
29
+ await qc.cancelQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings() });
30
+ const previous = qc.getQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings());
31
31
  qc.setQueryData(
32
- chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings(),
32
+ chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings(),
33
33
  (old) => old ? { ...old, ...patch } : old
34
34
  );
35
35
  return { previous };
36
36
  },
37
37
  onError: (_err, _patch, context) => {
38
- qc.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings(), context?.previous);
38
+ qc.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings(), context?.previous);
39
39
  },
40
- onSettled: () => qc.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.userSettings() })
40
+ onSettled: () => qc.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.userSettings() })
41
41
  });
42
42
  }
43
43
  var ALWAYS_ON = { on: true, set: () => {
@@ -60,7 +60,7 @@ function useLocalSwitch(source, feature) {
60
60
  return { on: saved ?? fallback, set };
61
61
  }
62
62
  function useFeatureSwitch(feature) {
63
- const source = chunkZZBCZRA5_cjs.useArbiHost().features?.[feature];
63
+ const source = chunk5QOZLKAY_cjs.useArbiHost().features?.[feature];
64
64
  const useSource = !source ? useUnlisted : "userSetting" in source ? useUserSettingSwitch : useLocalSwitch;
65
65
  return useSource(source, feature);
66
66
  }
@@ -71,7 +71,7 @@ function useNoSettings() {
71
71
  return { data: void 0 };
72
72
  }
73
73
  function useFeatureCheck() {
74
- const features = chunkZZBCZRA5_cjs.useArbiHost().features;
74
+ const features = chunk5QOZLKAY_cjs.useArbiHost().features;
75
75
  const useSettings = Object.values(features ?? {}).some(
76
76
  (source) => !!source && "userSetting" in source
77
77
  ) ? useUserSettings : useNoSettings;
@@ -193,13 +193,13 @@ function byActivity(a, b) {
193
193
  return bt - at;
194
194
  }
195
195
  function cachedChats(queryClient) {
196
- return queryClient.getQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatList()) ?? [];
196
+ return queryClient.getQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatList()) ?? [];
197
197
  }
198
198
  function cachedChat(queryClient, chatExtId) {
199
199
  return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
200
200
  }
201
201
  function upsertChat(queryClient, chat) {
202
- queryClient.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatList(), (old) => {
202
+ queryClient.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatList(), (old) => {
203
203
  if (!old) return old;
204
204
  const rest = old.filter((c) => c.external_id !== chat.external_id);
205
205
  return [chat, ...rest].sort(byActivity);
@@ -207,13 +207,13 @@ function upsertChat(queryClient, chat) {
207
207
  }
208
208
  function removeChat(queryClient, chatExtId) {
209
209
  queryClient.setQueryData(
210
- chunkZZBCZRA5_cjs.arbiQueryKeys.chatList(),
210
+ chunk5QOZLKAY_cjs.arbiQueryKeys.chatList(),
211
211
  (old) => old?.filter((c) => c.external_id !== chatExtId)
212
212
  );
213
- queryClient.removeQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId) });
213
+ queryClient.removeQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId) });
214
214
  }
215
215
  function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
216
- queryClient.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
216
+ queryClient.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
217
217
  if (!old) return old;
218
218
  const without = old.messages.filter(
219
219
  (m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
@@ -223,12 +223,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
223
223
  }
224
224
  function dropFromThread(queryClient, chatExtId, messageExtId) {
225
225
  queryClient.setQueryData(
226
- chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId),
226
+ chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId),
227
227
  (old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
228
228
  );
229
229
  }
230
230
  function replaceInThread(queryClient, chatExtId, message) {
231
- queryClient.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
231
+ queryClient.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
232
232
  if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
233
233
  return {
234
234
  ...old,
@@ -238,14 +238,14 @@ function replaceInThread(queryClient, chatExtId, message) {
238
238
  }
239
239
  function patchLastMessage(queryClient, chatExtId, message) {
240
240
  queryClient.setQueryData(
241
- chunkZZBCZRA5_cjs.arbiQueryKeys.chatList(),
241
+ chunk5QOZLKAY_cjs.arbiQueryKeys.chatList(),
242
242
  (old) => old?.map(
243
243
  (c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
244
244
  )
245
245
  );
246
246
  }
247
247
  async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
248
- const thread = queryClient.getQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId));
248
+ const thread = queryClient.getQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId));
249
249
  const before = thread?.messages.find((m) => m.external_id === messageExtId);
250
250
  const listed = cachedChat(queryClient, chatExtId);
251
251
  const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
@@ -266,7 +266,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
266
266
  return;
267
267
  }
268
268
  const chat = cachedChat(queryClient, chatExtId);
269
- if (!chat || !queryClient.getQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
269
+ if (!chat || !queryClient.getQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
270
270
  try {
271
271
  replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
272
272
  } catch (err) {
@@ -278,7 +278,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
278
278
  const me = myChatId(arbi);
279
279
  const chat = cachedChat(queryClient, chatExtId);
280
280
  if (!chat) {
281
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.chatList() });
281
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.chatList() });
282
282
  return;
283
283
  }
284
284
  const mine = message.sender_ext_id === me;
@@ -292,7 +292,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
292
292
  (m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
293
293
  ) : chat.members
294
294
  });
295
- if (queryClient.getQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId))) {
295
+ if (queryClient.getQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId))) {
296
296
  try {
297
297
  appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
298
298
  } catch (err) {
@@ -303,7 +303,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
303
303
  function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
304
304
  const me = myChatId(arbi);
305
305
  queryClient.setQueryData(
306
- chunkZZBCZRA5_cjs.arbiQueryKeys.chatList(),
306
+ chunk5QOZLKAY_cjs.arbiQueryKeys.chatList(),
307
307
  (old) => old?.map(
308
308
  (c) => c.external_id !== chatExtId ? c : {
309
309
  ...c,
@@ -329,14 +329,14 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
329
329
  }
330
330
  upsertChat(queryClient, chat);
331
331
  if (!message)
332
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.chatThread(chatExtId) });
332
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.chatThread(chatExtId) });
333
333
  }
334
334
  function applyAgentDmStatus(queryClient, status) {
335
335
  if (!["queued", "working", "done", "failed"].includes(status.status)) return;
336
- queryClient.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
336
+ queryClient.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
337
337
  if (status.status === "done" || status.status === "failed") {
338
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.calendarQueryKeys.all() });
339
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.all() });
338
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.calendarQueryKeys.all() });
339
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.all() });
340
340
  }
341
341
  }
342
342
  async function applyChatEvent(arbi, queryClient, event) {
@@ -352,13 +352,13 @@ async function applyChatEvent(arbi, queryClient, event) {
352
352
 
353
353
  // src/calls/keys.ts
354
354
  function serverCallsExperimental(queryClient) {
355
- return queryClient.getQueryData(chunkZZBCZRA5_cjs.callQueryKeys.config())?.experimental !== false;
355
+ return queryClient.getQueryData(chunk5QOZLKAY_cjs.callQueryKeys.config())?.experimental !== false;
356
356
  }
357
357
  function invalidateCall(queryClient, message) {
358
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.call(message.call_ext_id) });
358
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.call(message.call_ext_id) });
359
359
  const thread = message.log_conversation_ext_id;
360
360
  if (thread) {
361
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.conversationActivity(thread) });
361
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.conversationActivity(thread) });
362
362
  }
363
363
  }
364
364
 
@@ -609,19 +609,19 @@ function applyCallEvent(queryClient, event, options = {}) {
609
609
  }
610
610
  case "call.recording": {
611
611
  if (callExtId)
612
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recordingsOf(callExtId) });
612
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recordingsOf(callExtId) });
613
613
  const state2 = browser.calls.recordingStateFrom(m);
614
614
  relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
615
615
  return true;
616
616
  }
617
617
  case "call.recording_updated": {
618
618
  if (callExtId)
619
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recordingsOf(callExtId) });
619
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recordingsOf(callExtId) });
620
620
  return true;
621
621
  }
622
622
  case "call.recording_deleted": {
623
623
  if (callExtId)
624
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recordingsOf(callExtId) });
624
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recordingsOf(callExtId) });
625
625
  const recordingExtId = str(m.recording_ext_id);
626
626
  relay(
627
627
  "call.recording_deleted",
@@ -914,11 +914,11 @@ function useProfile(options) {
914
914
  const { client, enabled } = useAccountClient();
915
915
  const qc = reactQuery.useQueryClient();
916
916
  react.useEffect(
917
- () => client.onProfileChange(() => qc.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.profile(), client.profile())),
917
+ () => client.onProfileChange(() => qc.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.profile(), client.profile())),
918
918
  [client, qc]
919
919
  );
920
920
  return reactQuery.useQuery({
921
- queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.profile(),
921
+ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.profile(),
922
922
  queryFn: () => client.profile(),
923
923
  enabled: (options?.enabled ?? true) && enabled,
924
924
  staleTime: Infinity
@@ -933,9 +933,9 @@ function useUpdateProfile() {
933
933
  return client.profile();
934
934
  },
935
935
  onSuccess: (profile) => {
936
- qc.setQueryData(chunkZZBCZRA5_cjs.arbiQueryKeys.profile(), profile);
937
- void qc.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.identity() });
938
- return qc.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.workspaces() });
936
+ qc.setQueryData(chunk5QOZLKAY_cjs.arbiQueryKeys.profile(), profile);
937
+ void qc.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.identity() });
938
+ return qc.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.workspaces() });
939
939
  }
940
940
  });
941
941
  }
@@ -1037,7 +1037,7 @@ function arbiAccountClient(arbi, overrides = {}) {
1037
1037
  if (everywhere) await arbi.sessions.logoutAll();
1038
1038
  else await arbi.logout();
1039
1039
  } finally {
1040
- chunkSUMXDNYG_cjs.clearSealedDrafts();
1040
+ chunkBI4SYRLX_cjs.clearSealedDrafts();
1041
1041
  chunk5ECKSF6H_cjs.clearChatArtifacts();
1042
1042
  await wipeOfflineMail().catch(() => {
1043
1043
  });
@@ -1084,7 +1084,7 @@ var NO_ACCOUNT = {
1084
1084
  };
1085
1085
  var ALWAYS = () => true;
1086
1086
  function useAccountClient() {
1087
- const { account, arbi } = chunkZZBCZRA5_cjs.useArbiHost();
1087
+ const { account, arbi } = chunk5QOZLKAY_cjs.useArbiHost();
1088
1088
  const fallback = react.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
1089
1089
  const useEnabled = account?.useEnabled ?? ALWAYS;
1090
1090
  const enabled = useEnabled();
@@ -1095,9 +1095,9 @@ function useAccountClient() {
1095
1095
  return { client: fallback, enabled: arbi.isLoggedIn };
1096
1096
  }
1097
1097
  function useEntitlements() {
1098
- const { arbi } = chunkZZBCZRA5_cjs.useArbiHost();
1098
+ const { arbi } = chunk5QOZLKAY_cjs.useArbiHost();
1099
1099
  return reactQuery.useQuery({
1100
- queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.entitlements(),
1100
+ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.entitlements(),
1101
1101
  queryFn: () => arbi.account.entitlements(),
1102
1102
  enabled: !!arbi?.isLoggedIn,
1103
1103
  // A plan change shows on the next read; the API enforces it at once either way.
@@ -1106,7 +1106,7 @@ function useEntitlements() {
1106
1106
  }
1107
1107
  function useInvalidateEntitlements() {
1108
1108
  const qc = reactQuery.useQueryClient();
1109
- return () => qc.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.entitlements() });
1109
+ return () => qc.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.entitlements() });
1110
1110
  }
1111
1111
  function useIsEntitled(feature) {
1112
1112
  const { data } = useEntitlements();
@@ -1230,8 +1230,8 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
1230
1230
  });
1231
1231
  if (!ref) throw new Error("The server did not return a meeting chat");
1232
1232
  if (ref.kind === "chat")
1233
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.arbiQueryKeys.chatList() });
1234
- else void chunkSUMXDNYG_cjs.invalidateConversationLists(queryClient);
1233
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.chatList() });
1234
+ else void chunkBI4SYRLX_cjs.invalidateConversationLists(queryClient);
1235
1235
  return ref;
1236
1236
  })();
1237
1237
  pending.set(callExtId, run);
@@ -2236,9 +2236,9 @@ async function transcribeRecording(params) {
2236
2236
  return { stored, failed };
2237
2237
  }
2238
2238
  function useCallsConfig() {
2239
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2239
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2240
2240
  const { data } = reactQuery.useQuery({
2241
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.config(),
2241
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.config(),
2242
2242
  queryFn: () => arbi.calls.config(),
2243
2243
  enabled: arbi.isLoggedIn,
2244
2244
  staleTime: 5 * 6e4,
@@ -2256,9 +2256,9 @@ function useCallTranscriptionAvailable() {
2256
2256
  return useCallsConfig()?.transcription_available === true;
2257
2257
  }
2258
2258
  function useCall(callExtId) {
2259
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2259
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2260
2260
  return reactQuery.useQuery({
2261
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.call(callExtId ?? ""),
2261
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.call(callExtId ?? ""),
2262
2262
  queryFn: () => arbi.calls.get(callExtId),
2263
2263
  enabled: !!callExtId && arbi.isLoggedIn,
2264
2264
  staleTime: 6e4,
@@ -2266,18 +2266,18 @@ function useCall(callExtId) {
2266
2266
  });
2267
2267
  }
2268
2268
  function useCallRecordings(callExtId, enabled = true) {
2269
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2269
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2270
2270
  return reactQuery.useQuery({
2271
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recordings(callExtId ?? ""),
2271
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recordings(callExtId ?? ""),
2272
2272
  queryFn: () => arbi.calls.recording.list(callExtId),
2273
2273
  enabled: !!callExtId && enabled && arbi.isLoggedIn,
2274
2274
  retry: false
2275
2275
  });
2276
2276
  }
2277
2277
  function useCallRecording(callExtId, recordingExtId) {
2278
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2278
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2279
2279
  return reactQuery.useQuery({
2280
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2280
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2281
2281
  queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
2282
2282
  enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
2283
2283
  retry: false
@@ -2289,21 +2289,21 @@ function useRecordingWindows(callExtId, enabled) {
2289
2289
  return react.useMemo(() => data ? recordingWindowsOf(data) : NO_WINDOWS, [data]);
2290
2290
  }
2291
2291
  function useCallInviteLinks(callExtId) {
2292
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2292
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2293
2293
  return reactQuery.useQuery({
2294
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2294
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2295
2295
  queryFn: () => arbi.calls.inviteLinks.list(callExtId),
2296
2296
  enabled: !!callExtId && arbi.isLoggedIn,
2297
2297
  retry: false
2298
2298
  });
2299
2299
  }
2300
2300
  function useRecordingActions(call) {
2301
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2301
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2302
2302
  const queryClient = reactQuery.useQueryClient();
2303
2303
  return react.useMemo(
2304
2304
  () => ({
2305
2305
  refresh: () => void queryClient.invalidateQueries({
2306
- queryKey: chunkZZBCZRA5_cjs.callQueryKeys.recordingsOf(call.external_id)
2306
+ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.recordingsOf(call.external_id)
2307
2307
  }),
2308
2308
  open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
2309
2309
  transcribe: async (opened, onProgress) => transcribeRecording({
@@ -2319,12 +2319,12 @@ function useRecordingActions(call) {
2319
2319
  );
2320
2320
  }
2321
2321
  function useRevokeCallInviteLink(callExtId) {
2322
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2322
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2323
2323
  const queryClient = reactQuery.useQueryClient();
2324
2324
  return react.useCallback(
2325
2325
  async (inviteExtId) => {
2326
2326
  await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
2327
- void queryClient.invalidateQueries({ queryKey: chunkZZBCZRA5_cjs.callQueryKeys.inviteLinks(callExtId) });
2327
+ void queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.callQueryKeys.inviteLinks(callExtId) });
2328
2328
  },
2329
2329
  [arbi, queryClient, callExtId]
2330
2330
  );
@@ -2382,12 +2382,12 @@ async function saveRecordingFilesToThread(arbi, params) {
2382
2382
  });
2383
2383
  }
2384
2384
  function useSaveToThread() {
2385
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2385
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2386
2386
  const queryClient = reactQuery.useQueryClient();
2387
2387
  return react.useMemo(() => {
2388
2388
  const thenRefresh = async (run) => {
2389
2389
  const result = await run;
2390
- void chunkSUMXDNYG_cjs.invalidateConversationLists(queryClient);
2390
+ void chunkBI4SYRLX_cjs.invalidateConversationLists(queryClient);
2391
2391
  return result;
2392
2392
  };
2393
2393
  return {
@@ -2669,9 +2669,9 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
2669
2669
  return workspace?.users?.find((wu) => wu.user.external_id === me)?.role === "guest";
2670
2670
  }
2671
2671
  function useMeetingReadOnly(lockedWorkspaceExtId) {
2672
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2672
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2673
2673
  const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
2674
- const { data: workspaces } = chunkSUMXDNYG_cjs.useWorkspaces({
2674
+ const { data: workspaces } = chunkBI4SYRLX_cjs.useWorkspaces({
2675
2675
  enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
2676
2676
  });
2677
2677
  return isWorkspaceGuestOf(
@@ -2694,9 +2694,9 @@ function useCanHostCalls() {
2694
2694
  return callsEnabled && entitled;
2695
2695
  }
2696
2696
  function useOpenCallMeetingChat() {
2697
- const arbi = chunkZZBCZRA5_cjs.useArbi();
2697
+ const arbi = chunk5QOZLKAY_cjs.useArbi();
2698
2698
  const queryClient = reactQuery.useQueryClient();
2699
- const open = chunkZZBCZRA5_cjs.useArbiHost().calls?.openMeetingChat;
2699
+ const open = chunk5QOZLKAY_cjs.useArbiHost().calls?.openMeetingChat;
2700
2700
  return react.useCallback(
2701
2701
  async (target) => {
2702
2702
  try {
@@ -2924,5 +2924,5 @@ exports.useUserSettings = useUserSettings;
2924
2924
  exports.wipeOfflineMail = wipeOfflineMail;
2925
2925
  exports.wrapTrackKey = wrapTrackKey;
2926
2926
  exports.writeSamples = writeSamples;
2927
- //# sourceMappingURL=chunk-42X5ZO7Y.cjs.map
2928
- //# sourceMappingURL=chunk-42X5ZO7Y.cjs.map
2927
+ //# sourceMappingURL=chunk-4TWXQFHU.cjs.map
2928
+ //# sourceMappingURL=chunk-4TWXQFHU.cjs.map