@arbidocs/react 0.5.41 → 0.5.43

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.
package/dist/index.cjs CHANGED
@@ -1851,6 +1851,19 @@ function resolvingOffline(mutation) {
1851
1851
  });
1852
1852
  return { ...mutation, mutateAsync };
1853
1853
  }
1854
+ function useMarkDocumentShared() {
1855
+ const qc = reactQuery.useQueryClient();
1856
+ return React.useCallback(
1857
+ (documentExtId) => {
1858
+ chunkGAW2PLSL_cjs.patchDocuments(
1859
+ qc,
1860
+ (old) => old.map((doc) => doc.external_id === documentExtId ? { ...doc, shared: true } : doc)
1861
+ );
1862
+ void qc.invalidateQueries({ queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.document(documentExtId) });
1863
+ },
1864
+ [qc]
1865
+ );
1866
+ }
1854
1867
  function useUpdateDocuments() {
1855
1868
  const arbi = chunkYIUUTRMQ_cjs.useArbi();
1856
1869
  const qc = reactQuery.useQueryClient();
@@ -15809,6 +15822,7 @@ exports.useMailUnlock = useMailUnlock;
15809
15822
  exports.useMailboxFolders = useMailboxFolders;
15810
15823
  exports.useMailboxSyncProgress = useMailboxSyncProgress;
15811
15824
  exports.useMarkChatRead = useMarkChatRead;
15825
+ exports.useMarkDocumentShared = useMarkDocumentShared;
15812
15826
  exports.useMarkNotificationsRead = useMarkNotificationsRead;
15813
15827
  exports.useMcpTools = useMcpTools;
15814
15828
  exports.useMentionCandidates = useMentionCandidates;