@arbidocs/react 0.5.53 → 0.5.55

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 (40) hide show
  1. package/README.md +15 -0
  2. package/dist/artifacts/index.cjs +9 -9
  3. package/dist/artifacts/index.js +3 -3
  4. package/dist/calls/livekit/index.cjs +48 -48
  5. package/dist/calls/livekit/index.js +3 -3
  6. package/dist/{chunk-ME4TS33T.cjs → chunk-2JQ7QNOO.cjs} +31 -31
  7. package/dist/{chunk-ME4TS33T.cjs.map → chunk-2JQ7QNOO.cjs.map} +1 -1
  8. package/dist/{chunk-W7DQJT4T.cjs → chunk-3CVY5SGY.cjs} +159 -22
  9. package/dist/chunk-3CVY5SGY.cjs.map +1 -0
  10. package/dist/{chunk-KOLCL4KV.js → chunk-4TKNUJKD.js} +3 -3
  11. package/dist/{chunk-KOLCL4KV.js.map → chunk-4TKNUJKD.js.map} +1 -1
  12. package/dist/{chunk-MB34NKBZ.js → chunk-DFZECLD3.js} +2 -2
  13. package/dist/chunk-DFZECLD3.js.map +1 -0
  14. package/dist/{chunk-G3GPVSTA.js → chunk-JFL7BBZ6.js} +3 -3
  15. package/dist/{chunk-G3GPVSTA.js.map → chunk-JFL7BBZ6.js.map} +1 -1
  16. package/dist/{chunk-BIHGAW4G.js → chunk-PVUZULHI.js} +3 -3
  17. package/dist/{chunk-BIHGAW4G.js.map → chunk-PVUZULHI.js.map} +1 -1
  18. package/dist/{chunk-ODGIOGH5.cjs → chunk-UKEUDTOE.cjs} +16 -16
  19. package/dist/{chunk-ODGIOGH5.cjs.map → chunk-UKEUDTOE.cjs.map} +1 -1
  20. package/dist/{chunk-ONGNP4JM.cjs → chunk-V64EETLS.cjs} +4 -4
  21. package/dist/{chunk-ONGNP4JM.cjs.map → chunk-V64EETLS.cjs.map} +1 -1
  22. package/dist/{chunk-JQSHGBNI.js → chunk-WRMA2JYX.js} +139 -8
  23. package/dist/chunk-WRMA2JYX.js.map +1 -0
  24. package/dist/{chunk-YIUUTRMQ.cjs → chunk-YRY6DGRU.cjs} +2 -2
  25. package/dist/chunk-YRY6DGRU.cjs.map +1 -0
  26. package/dist/document-tools/index.cjs +41 -41
  27. package/dist/document-tools/index.js +3 -3
  28. package/dist/index.cjs +797 -780
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +202 -122
  31. package/dist/index.d.ts +202 -122
  32. package/dist/index.js +37 -43
  33. package/dist/index.js.map +1 -1
  34. package/dist/viewers/index.cjs +2 -2
  35. package/dist/viewers/index.js +1 -1
  36. package/package.json +3 -3
  37. package/dist/chunk-JQSHGBNI.js.map +0 -1
  38. package/dist/chunk-MB34NKBZ.js.map +0 -1
  39. package/dist/chunk-W7DQJT4T.cjs.map +0 -1
  40. package/dist/chunk-YIUUTRMQ.cjs.map +0 -1
@@ -3,7 +3,7 @@
3
3
  var chunkRRWAX52L_cjs = require('./chunk-RRWAX52L.cjs');
4
4
  var chunkN73IMVFF_cjs = require('./chunk-N73IMVFF.cjs');
5
5
  var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
6
- var chunkYIUUTRMQ_cjs = require('./chunk-YIUUTRMQ.cjs');
6
+ var chunkYRY6DGRU_cjs = require('./chunk-YRY6DGRU.cjs');
7
7
  var client = require('@arbidocs/client');
8
8
  var react = require('react');
9
9
  var reactQuery = require('@tanstack/react-query');
@@ -873,7 +873,7 @@ var createOwnStore = (host) => createArbiSessionStore(
873
873
  var moduleDefault = null;
874
874
  var defaultStore = () => moduleDefault ??= createArbiSessionStore();
875
875
  function useArbiSessionStore() {
876
- const host = chunkYIUUTRMQ_cjs.useArbiHost();
876
+ const host = chunkYRY6DGRU_cjs.useArbiHost();
877
877
  if (host.session) return host.session;
878
878
  const own = host[chunkN73IMVFF_cjs.OWN_SESSION_SLOT];
879
879
  if (own) return own.current ??= createOwnStore(host);
@@ -912,7 +912,7 @@ var SIGNED_OUT = {
912
912
  var noSubscription = () => () => {
913
913
  };
914
914
  function useArbiSession() {
915
- return useSignedInSession(chunkYIUUTRMQ_cjs.useArbiHost().arbi?.session ?? null);
915
+ return useSignedInSession(chunkYRY6DGRU_cjs.useArbiHost().arbi?.session ?? null);
916
916
  }
917
917
  function useSignedInSession(session) {
918
918
  const state = react.useSyncExternalStore(
@@ -1040,7 +1040,7 @@ function isUsageMetered(usage, subscription) {
1040
1040
  return !(empty && subscription === "dev");
1041
1041
  }
1042
1042
  function useWorkspaces(options) {
1043
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1043
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1044
1044
  return reactQuery.useQuery({
1045
1045
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.workspaces(),
1046
1046
  queryFn: () => arbi.workspaces.list(),
@@ -1048,7 +1048,7 @@ function useWorkspaces(options) {
1048
1048
  });
1049
1049
  }
1050
1050
  function useDocumentVersionList(docId, options) {
1051
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1051
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1052
1052
  return reactQuery.useQuery({
1053
1053
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.documentVersions(docId ?? ""),
1054
1054
  queryFn: () => arbi.documents.versions(docId),
@@ -1056,7 +1056,7 @@ function useDocumentVersionList(docId, options) {
1056
1056
  });
1057
1057
  }
1058
1058
  function useConversations(workspaceId, options) {
1059
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1059
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1060
1060
  const live = options?.live === true;
1061
1061
  return reactQuery.useQuery({
1062
1062
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.conversations(workspaceId ?? ""),
@@ -1069,7 +1069,7 @@ function useConversations(workspaceId, options) {
1069
1069
  });
1070
1070
  }
1071
1071
  function useBuiltinCommands() {
1072
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1072
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1073
1073
  const query = reactQuery.useQuery({
1074
1074
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.assistantCommands(),
1075
1075
  queryFn: () => arbi.assistant.commands(),
@@ -1080,7 +1080,7 @@ function useBuiltinCommands() {
1080
1080
  return { commands, isLoading: query.isLoading };
1081
1081
  }
1082
1082
  function useMessageDetails(messageId, options) {
1083
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1083
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1084
1084
  return reactQuery.useQuery({
1085
1085
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.messageDetails(messageId ?? ""),
1086
1086
  queryFn: () => arbi.conversations.getMessage(messageId),
@@ -1088,7 +1088,7 @@ function useMessageDetails(messageId, options) {
1088
1088
  });
1089
1089
  }
1090
1090
  function useConversationThreads(conversationId, options) {
1091
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1091
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1092
1092
  const session = useArbiSessionStore();
1093
1093
  return reactQuery.useQuery({
1094
1094
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.conversationThreads(conversationId ?? ""),
@@ -1116,7 +1116,7 @@ var tagListKey = (query) => [
1116
1116
  query.linksLimit !== void 0 ? `links:${query.linksLimit}` : ""
1117
1117
  ].filter(Boolean).join("|");
1118
1118
  function useTags(workspaceId, options) {
1119
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1119
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1120
1120
  const { enabled, ...query } = options ?? {};
1121
1121
  const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
1122
1122
  const key = tagListKey(query);
@@ -1128,7 +1128,7 @@ function useTags(workspaceId, options) {
1128
1128
  });
1129
1129
  }
1130
1130
  function useThumbnails(docIds, options) {
1131
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1131
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1132
1132
  return reactQuery.useQuery({
1133
1133
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.thumbnails(docIds),
1134
1134
  queryFn: () => arbi.documents.getThumbnails(docIds),
@@ -1137,7 +1137,7 @@ function useThumbnails(docIds, options) {
1137
1137
  });
1138
1138
  }
1139
1139
  function useParsedDocument(docId, stage = "final", options) {
1140
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1140
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1141
1141
  return reactQuery.useQuery({
1142
1142
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.parsedDoc(docId ?? "", stage),
1143
1143
  queryFn: () => {
@@ -1152,13 +1152,13 @@ function useParsedDocument(docId, stage = "final", options) {
1152
1152
  });
1153
1153
  }
1154
1154
  function useAssistantQuery() {
1155
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1155
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1156
1156
  return reactQuery.useMutation({
1157
1157
  mutationFn: ({ request, handlers }) => arbi.assistant.ask(request, handlers)
1158
1158
  });
1159
1159
  }
1160
1160
  function useAgents(options) {
1161
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1161
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1162
1162
  return reactQuery.useQuery({
1163
1163
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.agents(),
1164
1164
  queryFn: () => arbi.agents.list(),
@@ -1166,7 +1166,7 @@ function useAgents(options) {
1166
1166
  });
1167
1167
  }
1168
1168
  function useDeleteAgents() {
1169
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1169
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1170
1170
  const qc = reactQuery.useQueryClient();
1171
1171
  return reactQuery.useMutation({
1172
1172
  mutationFn: ({ agentExtIds }) => arbi.agents.delete(agentExtIds),
@@ -1185,7 +1185,7 @@ function useDeleteAgents() {
1185
1185
  });
1186
1186
  }
1187
1187
  function useHealth(options) {
1188
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1188
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1189
1189
  return reactQuery.useQuery({
1190
1190
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.health(),
1191
1191
  queryFn: () => arbi.health.check(),
@@ -1193,7 +1193,7 @@ function useHealth(options) {
1193
1193
  });
1194
1194
  }
1195
1195
  function useAvailableModels(options) {
1196
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1196
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1197
1197
  return reactQuery.useQuery({
1198
1198
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.availableModels(),
1199
1199
  queryFn: () => arbi.health.models(),
@@ -1202,7 +1202,7 @@ function useAvailableModels(options) {
1202
1202
  });
1203
1203
  }
1204
1204
  function useConfigs(options) {
1205
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1205
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1206
1206
  return reactQuery.useQuery({
1207
1207
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.configVersions(),
1208
1208
  queryFn: () => arbi.agentConfig.list(),
@@ -1210,7 +1210,7 @@ function useConfigs(options) {
1210
1210
  });
1211
1211
  }
1212
1212
  function useConfig(configId, options) {
1213
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1213
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1214
1214
  return reactQuery.useQuery({
1215
1215
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.config(configId ?? ""),
1216
1216
  queryFn: () => arbi.agentConfig.get(configId),
@@ -1219,7 +1219,7 @@ function useConfig(configId, options) {
1219
1219
  });
1220
1220
  }
1221
1221
  function useActivity(options) {
1222
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1222
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1223
1223
  return reactQuery.useQuery({
1224
1224
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.activity(),
1225
1225
  queryFn: () => arbi.dm.listActivity({ limit: options?.limit, offset: options?.offset }),
@@ -1227,7 +1227,7 @@ function useActivity(options) {
1227
1227
  });
1228
1228
  }
1229
1229
  function useWorkspaceActivity(workspaceId, options) {
1230
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1230
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1231
1231
  return reactQuery.useInfiniteQuery({
1232
1232
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.workspaceActivity(workspaceId ?? ""),
1233
1233
  queryFn: async ({ pageParam }) => {
@@ -1243,7 +1243,7 @@ function useWorkspaceActivity(workspaceId, options) {
1243
1243
  });
1244
1244
  }
1245
1245
  function useProjects(options) {
1246
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1246
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1247
1247
  return reactQuery.useQuery({
1248
1248
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projects(),
1249
1249
  queryFn: () => arbi.projects.list(),
@@ -1251,7 +1251,7 @@ function useProjects(options) {
1251
1251
  });
1252
1252
  }
1253
1253
  function useProjectUsage(projectExtId, monthsBack = 0, options) {
1254
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1254
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1255
1255
  const usage = reactQuery.useQuery({
1256
1256
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projectUsage(projectExtId ?? "", monthsBack),
1257
1257
  queryFn: () => arbi.projects.usage(projectExtId, monthsBack),
@@ -1263,7 +1263,7 @@ function useProjectUsage(projectExtId, monthsBack = 0, options) {
1263
1263
  return { ...usage, metered };
1264
1264
  }
1265
1265
  function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
1266
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1266
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1267
1267
  const enabled = (options?.enabled ?? true) && arbi.isLoggedIn;
1268
1268
  const projects = useProjects({ enabled: enabled && projectExtIds.length > 0 });
1269
1269
  const results = reactQuery.useQueries({
@@ -1337,7 +1337,7 @@ function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
1337
1337
  }, [signature]);
1338
1338
  }
1339
1339
  function useProjectInvoices(projectExtId, options) {
1340
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1340
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1341
1341
  return reactQuery.useQuery({
1342
1342
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projectInvoices(projectExtId ?? ""),
1343
1343
  queryFn: () => arbi.projects.invoices(projectExtId),
@@ -1345,7 +1345,7 @@ function useProjectInvoices(projectExtId, options) {
1345
1345
  });
1346
1346
  }
1347
1347
  function useCurrentUser(options) {
1348
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1348
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1349
1349
  return reactQuery.useQuery({
1350
1350
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.currentUser(),
1351
1351
  queryFn: () => arbi.user.me(),
@@ -1355,7 +1355,7 @@ function useCurrentUser(options) {
1355
1355
  });
1356
1356
  }
1357
1357
  function useFirmPool(options) {
1358
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1358
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1359
1359
  return reactQuery.useQuery({
1360
1360
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.firmPool(),
1361
1361
  queryFn: () => arbi.firm.pool(),
@@ -1371,7 +1371,7 @@ function useBoxRole(options = {}) {
1371
1371
  return { isBox, isBoxAdmin: isBox && !!data?.can_top_up };
1372
1372
  }
1373
1373
  function useTopUpFirmPool() {
1374
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1374
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1375
1375
  const queryClient = reactQuery.useQueryClient();
1376
1376
  return reactQuery.useMutation({
1377
1377
  mutationFn: (aiAddons) => arbi.firm.topUp(aiAddons),
@@ -1396,7 +1396,7 @@ function useCanCreateProjects() {
1396
1396
  return user.data?.can_create_projects;
1397
1397
  }
1398
1398
  function useUserUsageToday(options) {
1399
- const arbi = chunkYIUUTRMQ_cjs.useArbi();
1399
+ const arbi = chunkYRY6DGRU_cjs.useArbi();
1400
1400
  return reactQuery.useQuery({
1401
1401
  queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.userUsageToday(),
1402
1402
  queryFn: () => arbi.user.usageToday(),
@@ -1473,5 +1473,5 @@ exports.useTransientView = useTransientView;
1473
1473
  exports.useUserUsageToday = useUserUsageToday;
1474
1474
  exports.useWorkspaceActivity = useWorkspaceActivity;
1475
1475
  exports.useWorkspaces = useWorkspaces;
1476
- //# sourceMappingURL=chunk-ME4TS33T.cjs.map
1477
- //# sourceMappingURL=chunk-ME4TS33T.cjs.map
1476
+ //# sourceMappingURL=chunk-2JQ7QNOO.cjs.map
1477
+ //# sourceMappingURL=chunk-2JQ7QNOO.cjs.map