@sanity/sdk-react 0.0.0-alpha.20 → 0.0.0-alpha.21

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/dist/index.d.ts +276 -207
  2. package/dist/index.js +90 -75
  3. package/dist/index.js.map +1 -1
  4. package/package.json +3 -3
  5. package/src/_exports/index.ts +11 -11
  6. package/src/components/Login/LoginLinks.test.tsx +2 -2
  7. package/src/components/Login/LoginLinks.tsx +2 -2
  8. package/src/components/auth/AuthBoundary.test.tsx +2 -2
  9. package/src/components/auth/LoginCallback.test.tsx +3 -3
  10. package/src/components/auth/LoginCallback.tsx +4 -4
  11. package/src/hooks/auth/useCurrentUser.tsx +1 -0
  12. package/src/hooks/auth/useHandleAuthCallback.test.tsx +16 -0
  13. package/src/hooks/auth/{useHandleCallback.tsx → useHandleAuthCallback.tsx} +6 -6
  14. package/src/hooks/auth/useLogOut.test.tsx +2 -2
  15. package/src/hooks/client/useClient.ts +1 -0
  16. package/src/hooks/comlink/useManageFavorite.test.ts +9 -4
  17. package/src/hooks/comlink/useManageFavorite.ts +42 -13
  18. package/src/hooks/comlink/useRecordDocumentHistoryEvent.test.ts +7 -3
  19. package/src/hooks/comlink/useRecordDocumentHistoryEvent.ts +39 -12
  20. package/src/hooks/dashboard/useNavigateToStudioDocument.test.ts +178 -0
  21. package/src/hooks/dashboard/useNavigateToStudioDocument.ts +31 -5
  22. package/src/hooks/dashboard/useStudioWorkspacesByResourceId.test.tsx +5 -1
  23. package/src/hooks/dashboard/useStudioWorkspacesByResourceId.ts +4 -3
  24. package/src/hooks/datasets/useDatasets.ts +6 -3
  25. package/src/hooks/document/useApplyDocumentActions.test.ts +25 -0
  26. package/src/hooks/document/{useApplyActions.ts → useApplyDocumentActions.ts} +13 -12
  27. package/src/hooks/document/{usePermissions.ts → useDocumentPermissions.ts} +8 -6
  28. package/src/hooks/document/useDocumentSyncStatus.ts +4 -1
  29. package/src/hooks/document/useEditDocument.test.ts +8 -8
  30. package/src/hooks/document/useEditDocument.ts +2 -2
  31. package/src/hooks/{infiniteList/useInfiniteList.test.tsx → documents/useDocuments.test.tsx} +9 -9
  32. package/src/hooks/{infiniteList/useInfiniteList.ts → documents/useDocuments.ts} +10 -10
  33. package/src/hooks/{paginatedList/usePaginatedList.test.tsx → paginatedDocuments/usePaginatedDocuments.test.tsx} +14 -14
  34. package/src/hooks/{paginatedList/usePaginatedList.ts → paginatedDocuments/usePaginatedDocuments.ts} +7 -7
  35. package/src/hooks/preview/usePreview.tsx +2 -2
  36. package/src/hooks/projection/useProjection.ts +2 -2
  37. package/src/hooks/projects/useProject.ts +4 -1
  38. package/src/hooks/projects/useProjects.ts +7 -3
  39. package/src/hooks/auth/useHandleCallback.test.tsx +0 -16
  40. package/src/hooks/document/useApplyActions.test.ts +0 -25
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment as Fragment$1 } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
- import { getAuthState, getLoginUrlsState, fetchLoginUrls, handleCallback, logout, AuthStateType, createSanityInstance, getTokenState, getCurrentUserState, getDashboardOrganizationId, getClientState, getOrCreateController, getOrCreateChannel, releaseChannel, getOrCreateNode, releaseNode, resolveDatasets, getDatasetsState, applyActions, getResourceId, resolveDocument, getDocumentState, subscribeDocumentEvents, getDocumentSyncStatus, editDocument, getPermissionsState, getQueryKey, parseQueryKey, getQueryState, resolveQuery, getPreviewState, resolvePreview, getProjectionState, resolveProjection, resolveProject, getProjectState, resolveProjects, getProjectsState, createUsersStore } from "@sanity/sdk";
3
+ import { getAuthState, getLoginUrlsState, fetchLoginUrls, handleAuthCallback, logout, AuthStateType, createSanityInstance, getTokenState, getCurrentUserState, getDashboardOrganizationId, getClientState, getOrCreateController, getOrCreateChannel, releaseChannel, getOrCreateNode, releaseNode, resolveDatasets, getDatasetsState, applyDocumentActions, getResourceId, resolveDocument, getDocumentState, subscribeDocumentEvents, getPermissionsState, getDocumentSyncStatus, editDocument, getQueryKey, parseQueryKey, getQueryState, resolveQuery, getPreviewState, resolvePreview, getProjectionState, resolveProjection, resolveProject, getProjectState, resolveProjects, getProjectsState, createUsersStore } from "@sanity/sdk";
4
4
  import { ErrorBoundary } from "react-error-boundary";
5
5
  import { createContext, useContext, useSyncExternalStore, useMemo, Fragment, Suspense, useEffect, useRef, useState, useInsertionEffect, useTransition } from "react";
6
6
  import { SanityLogo } from "@sanity/logos";
@@ -147,17 +147,17 @@ function createCallbackHook(callback, resourceId) {
147
147
  }
148
148
  return useHook;
149
149
  }
150
- const useHandleCallback = createCallbackHook(handleCallback);
150
+ const useHandleAuthCallback = createCallbackHook(handleAuthCallback);
151
151
  function LoginCallback(t0) {
152
152
  const $ = c(7), {
153
153
  header,
154
154
  footer
155
- } = t0, handleCallback2 = useHandleCallback();
155
+ } = t0, handleAuthCallback2 = useHandleAuthCallback();
156
156
  let t1, t2;
157
- $[0] !== handleCallback2 ? (t1 = () => {
157
+ $[0] !== handleAuthCallback2 ? (t1 = () => {
158
158
  const url = new URL(location.href);
159
- handleCallback2(url.toString()).then(_temp$8);
160
- }, t2 = [handleCallback2], $[0] = handleCallback2, $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), useEffect(t1, t2);
159
+ handleAuthCallback2(url.toString()).then(_temp$8);
160
+ }, t2 = [handleAuthCallback2], $[0] = handleAuthCallback2, $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), useEffect(t1, t2);
161
161
  let t3;
162
162
  $[3] === Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsxs("div", { className: "sc-login-callback", children: [
163
163
  /* @__PURE__ */ jsx("h1", { className: "sc-login-callback__title", children: "Logging you in\u2026" }),
@@ -405,9 +405,11 @@ function _temp$4(unsubscribe) {
405
405
  return unsubscribe();
406
406
  }
407
407
  function useManageFavorite(t0) {
408
- const $ = c(14), {
409
- _id,
410
- _type
408
+ const $ = c(16), {
409
+ documentId,
410
+ documentType,
411
+ resourceId,
412
+ resourceType
411
413
  } = t0, [isFavorited, setIsFavorited] = useState(!1), [status, setStatus] = useState("idle");
412
414
  let t1;
413
415
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = {
@@ -418,16 +420,23 @@ function useManageFavorite(t0) {
418
420
  const {
419
421
  sendMessage
420
422
  } = useWindowConnection(t1);
423
+ if (resourceType !== "studio" && !resourceId)
424
+ throw new Error("resourceId is required for media-library and canvas resources");
421
425
  let t2;
422
- $[1] !== _id || $[2] !== _type || $[3] !== sendMessage ? (t2 = (action, setFavoriteState) => {
423
- if (!(!_id || !_type))
426
+ $[1] !== documentId || $[2] !== documentType || $[3] !== resourceId || $[4] !== resourceType || $[5] !== sendMessage ? (t2 = (action, setFavoriteState) => {
427
+ if (!(!documentId || !documentType || !resourceType))
424
428
  try {
425
429
  const message = {
426
- type: "core/v1/events/favorite",
430
+ type: "dashboard/v1/events/favorite/mutate",
427
431
  data: {
428
432
  eventType: action,
429
- documentId: _id,
430
- documentType: _type
433
+ documentId,
434
+ documentType,
435
+ resourceType,
436
+ resourceId
437
+ },
438
+ response: {
439
+ success: !0
431
440
  }
432
441
  };
433
442
  sendMessage(message.type, message.data), setIsFavorited(setFavoriteState);
@@ -435,26 +444,28 @@ function useManageFavorite(t0) {
435
444
  const err = t32, error = err instanceof Error ? err : new Error("Failed to update favorite status");
436
445
  throw console.error(`Failed to ${action === "added" ? "favorite" : "unfavorite"} document:`, error), error;
437
446
  }
438
- }, $[1] = _id, $[2] = _type, $[3] = sendMessage, $[4] = t2) : t2 = $[4];
447
+ }, $[1] = documentId, $[2] = documentType, $[3] = resourceId, $[4] = resourceType, $[5] = sendMessage, $[6] = t2) : t2 = $[6];
439
448
  const handleFavoriteAction = t2;
440
449
  let t3;
441
- $[5] !== handleFavoriteAction ? (t3 = () => handleFavoriteAction("added", !0), $[5] = handleFavoriteAction, $[6] = t3) : t3 = $[6];
450
+ $[7] !== handleFavoriteAction ? (t3 = () => handleFavoriteAction("added", !0), $[7] = handleFavoriteAction, $[8] = t3) : t3 = $[8];
442
451
  const favorite = t3;
443
452
  let t4;
444
- $[7] !== handleFavoriteAction ? (t4 = () => handleFavoriteAction("removed", !1), $[7] = handleFavoriteAction, $[8] = t4) : t4 = $[8];
453
+ $[9] !== handleFavoriteAction ? (t4 = () => handleFavoriteAction("removed", !1), $[9] = handleFavoriteAction, $[10] = t4) : t4 = $[10];
445
454
  const unfavorite = t4, t5 = status === "connected";
446
455
  let t6;
447
- return $[9] !== favorite || $[10] !== isFavorited || $[11] !== t5 || $[12] !== unfavorite ? (t6 = {
456
+ return $[11] !== favorite || $[12] !== isFavorited || $[13] !== t5 || $[14] !== unfavorite ? (t6 = {
448
457
  favorite,
449
458
  unfavorite,
450
459
  isFavorited,
451
460
  isConnected: t5
452
- }, $[9] = favorite, $[10] = isFavorited, $[11] = t5, $[12] = unfavorite, $[13] = t6) : t6 = $[13], t6;
461
+ }, $[11] = favorite, $[12] = isFavorited, $[13] = t5, $[14] = unfavorite, $[15] = t6) : t6 = $[15], t6;
453
462
  }
454
463
  function useRecordDocumentHistoryEvent(t0) {
455
- const $ = c(8), {
456
- _id,
457
- _type
464
+ const $ = c(10), {
465
+ documentId,
466
+ documentType,
467
+ resourceType,
468
+ resourceId
458
469
  } = t0, [status, setStatus] = useState("idle");
459
470
  let t1;
460
471
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = {
@@ -465,15 +476,19 @@ function useRecordDocumentHistoryEvent(t0) {
465
476
  const {
466
477
  sendMessage
467
478
  } = useWindowConnection(t1);
479
+ if (resourceType !== "studio" && !resourceId)
480
+ throw new Error("resourceId is required for media-library and canvas resources");
468
481
  let t2;
469
- $[1] !== _id || $[2] !== _type || $[3] !== sendMessage ? (t2 = (eventType) => {
482
+ $[1] !== documentId || $[2] !== documentType || $[3] !== resourceId || $[4] !== resourceType || $[5] !== sendMessage ? (t2 = (eventType) => {
470
483
  try {
471
484
  const message = {
472
- type: "core/v1/events/history",
485
+ type: "dashboard/v1/events/history",
473
486
  data: {
474
487
  eventType,
475
- documentId: _id,
476
- documentType: _type
488
+ documentId,
489
+ documentType,
490
+ resourceType,
491
+ resourceId
477
492
  }
478
493
  };
479
494
  sendMessage(message.type, message.data);
@@ -481,13 +496,13 @@ function useRecordDocumentHistoryEvent(t0) {
481
496
  const error = t32;
482
497
  throw console.error("Failed to record history event:", error), error;
483
498
  }
484
- }, $[1] = _id, $[2] = _type, $[3] = sendMessage, $[4] = t2) : t2 = $[4];
499
+ }, $[1] = documentId, $[2] = documentType, $[3] = resourceId, $[4] = resourceType, $[5] = sendMessage, $[6] = t2) : t2 = $[6];
485
500
  const recordEvent = t2, t3 = status === "connected";
486
501
  let t4;
487
- return $[5] !== recordEvent || $[6] !== t3 ? (t4 = {
502
+ return $[7] !== recordEvent || $[8] !== t3 ? (t4 = {
488
503
  recordEvent,
489
504
  isConnected: t3
490
- }, $[5] = recordEvent, $[6] = t3, $[7] = t4) : t4 = $[7], t4;
505
+ }, $[7] = recordEvent, $[8] = t3, $[9] = t4) : t4 = $[9], t4;
491
506
  }
492
507
  function useStudioWorkspacesByResourceId() {
493
508
  const $ = c(10);
@@ -496,8 +511,8 @@ function useStudioWorkspacesByResourceId() {
496
511
  const [workspacesByResourceId, setWorkspacesByResourceId] = useState(t0), [status, setStatus] = useState("idle"), [error, setError] = useState(null);
497
512
  let t1;
498
513
  $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = {
499
- name: "core/nodes/sdk",
500
- connectTo: "core/channels/sdk",
514
+ name: SDK_NODE_NAME,
515
+ connectTo: SDK_CHANNEL_NAME,
501
516
  onStatus: setStatus
502
517
  }, $[1] = t1) : t1 = $[1];
503
518
  const {
@@ -509,7 +524,7 @@ function useStudioWorkspacesByResourceId() {
509
524
  return;
510
525
  const fetchWorkspaces = async function(signal) {
511
526
  try {
512
- const data = await fetch("core/v1/bridge/context", void 0, {
527
+ const data = await fetch("dashboard/v1/bridge/context", void 0, {
513
528
  signal
514
529
  }), workspaceMap = {};
515
530
  data.context.availableResources.forEach((resource) => {
@@ -546,8 +561,8 @@ function useNavigateToStudioDocument(documentHandle) {
546
561
  } = useStudioWorkspacesByResourceId(), [status, setStatus] = useState("idle");
547
562
  let t0;
548
563
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = {
549
- name: "core/nodes/sdk",
550
- connectTo: "core/channels/sdk",
564
+ name: SDK_NODE_NAME,
565
+ connectTo: SDK_CHANNEL_NAME,
551
566
  onStatus: setStatus
552
567
  }, $[0] = t0) : t0 = $[0];
553
568
  const {
@@ -567,7 +582,7 @@ function useNavigateToStudioDocument(documentHandle) {
567
582
  }
568
583
  workspaces.length > 1 && (console.warn("Multiple workspaces found for document", documentHandle.resourceId), console.warn("Using the first one", workspaces[0]));
569
584
  const message = {
570
- type: "core/v1/bridge/navigate-to-resource",
585
+ type: "dashboard/v1/bridge/navigate-to-resource",
571
586
  data: {
572
587
  resourceId: workspaces[0]._ref,
573
588
  resourceType: "studio",
@@ -589,10 +604,10 @@ const useDatasets = createStateSourceHook({
589
604
  shouldSuspend: (instance) => getDatasetsState(instance).getCurrent() === void 0,
590
605
  suspender: resolveDatasets
591
606
  });
592
- function useApplyActions(resourceId) {
593
- return _useApplyActions(resourceId)();
607
+ function useApplyDocumentActions(resourceId) {
608
+ return _useApplyDocumentActions(resourceId)();
594
609
  }
595
- const _useApplyActions = (resourceId) => createCallbackHook(applyActions, resourceId);
610
+ const _useApplyDocumentActions = (resourceId) => createCallbackHook(applyDocumentActions, resourceId);
596
611
  function useDocument(doc, path) {
597
612
  return _useDocument(doc, path);
598
613
  }
@@ -617,12 +632,38 @@ function useDocumentEvent(handler, doc) {
617
632
  let t3, t4;
618
633
  $[5] !== instance ? (t3 = () => subscribeDocumentEvents(instance, stableHandler), t4 = [instance, stableHandler], $[5] = instance, $[6] = t3, $[7] = t4) : (t3 = $[6], t4 = $[7]), useEffect(t3, t4);
619
634
  }
635
+ function useDocumentPermissions(actions) {
636
+ const $ = c(5);
637
+ if (Array.isArray(actions)) {
638
+ const resourceIds = actions.map(_temp$3);
639
+ if (new Set(resourceIds).size !== 1)
640
+ throw new Error("All actions must have the same resourceId");
641
+ }
642
+ let t0;
643
+ $[0] !== actions ? (t0 = Array.isArray(actions) ? getResourceId(actions[0].resourceId) : getResourceId(actions.resourceId), $[0] = actions, $[1] = t0) : t0 = $[1];
644
+ const instance = useSanityInstance(t0);
645
+ if (getPermissionsState(instance, actions).getCurrent() === void 0)
646
+ throw firstValueFrom(getPermissionsState(instance, actions).observable.pipe(filter(_temp2$2)));
647
+ let t1, t2;
648
+ $[2] !== actions || $[3] !== instance ? (t2 = getPermissionsState(instance, actions), $[2] = actions, $[3] = instance, $[4] = t2) : t2 = $[4], t1 = t2;
649
+ const {
650
+ subscribe,
651
+ getCurrent
652
+ } = t1;
653
+ return useSyncExternalStore(subscribe, getCurrent);
654
+ }
655
+ function _temp2$2(result) {
656
+ return result !== void 0;
657
+ }
658
+ function _temp$3(action) {
659
+ return action.resourceId;
660
+ }
620
661
  const useDocumentSyncStatus = createStateSourceHook(getDocumentSyncStatus), ignoredKeys = ["_id", "_type", "_createdAt", "_updatedAt", "_rev"];
621
662
  function useEditDocument(doc, path) {
622
663
  const $ = c(8);
623
664
  let t0;
624
665
  $[0] !== doc.resourceId ? (t0 = getResourceId(doc.resourceId), $[0] = doc.resourceId, $[1] = t0) : t0 = $[1];
625
- const resourceId = t0, documentId = doc._id, instance = useSanityInstance(resourceId), apply = useApplyActions(resourceId);
666
+ const resourceId = t0, documentId = doc._id, instance = useSanityInstance(resourceId), apply = useApplyDocumentActions(resourceId);
626
667
  if (getDocumentState(instance, documentId).getCurrent() === void 0)
627
668
  throw resolveDocument(instance, documentId);
628
669
  let t1;
@@ -641,7 +682,7 @@ function useEditDocument(doc, path) {
641
682
  const editActions = Object.keys({
642
683
  ...current,
643
684
  ...nextValue_0
644
- }).filter(_temp$3).filter((key_0) => current?.[key_0] !== nextValue_0[key_0]).map((key_1) => key_1 in nextValue_0 ? editDocument(doc, {
685
+ }).filter(_temp$2).filter((key_0) => current?.[key_0] !== nextValue_0[key_0]).map((key_1) => key_1 in nextValue_0 ? editDocument(doc, {
645
686
  set: {
646
687
  [key_1]: nextValue_0[key_1]
647
688
  }
@@ -651,35 +692,9 @@ function useEditDocument(doc, path) {
651
692
  return apply(editActions);
652
693
  }, $[2] = apply, $[3] = doc, $[4] = documentId, $[5] = instance, $[6] = path, $[7] = t1) : t1 = $[7], t1;
653
694
  }
654
- function _temp$3(key) {
695
+ function _temp$2(key) {
655
696
  return !ignoredKeys.includes(key);
656
697
  }
657
- function usePermissions(actions) {
658
- const $ = c(5);
659
- if (Array.isArray(actions)) {
660
- const resourceIds = actions.map(_temp$2);
661
- if (new Set(resourceIds).size !== 1)
662
- throw new Error("All actions must have the same resourceId");
663
- }
664
- let t0;
665
- $[0] !== actions ? (t0 = Array.isArray(actions) ? getResourceId(actions[0].resourceId) : getResourceId(actions.resourceId), $[0] = actions, $[1] = t0) : t0 = $[1];
666
- const instance = useSanityInstance(t0);
667
- if (getPermissionsState(instance, actions).getCurrent() === void 0)
668
- throw firstValueFrom(getPermissionsState(instance, actions).observable.pipe(filter(_temp2$2)));
669
- let t1, t2;
670
- $[2] !== actions || $[3] !== instance ? (t2 = getPermissionsState(instance, actions), $[2] = actions, $[3] = instance, $[4] = t2) : t2 = $[4], t1 = t2;
671
- const {
672
- subscribe,
673
- getCurrent
674
- } = t1;
675
- return useSyncExternalStore(subscribe, getCurrent);
676
- }
677
- function _temp2$2(result) {
678
- return result !== void 0;
679
- }
680
- function _temp$2(action) {
681
- return action.resourceId;
682
- }
683
698
  function useQuery(query, options) {
684
699
  const instance = useSanityInstance(options?.resourceId), [isPending, startTransition] = useTransition(), queryKey = getQueryKey(query, options), [deferredQueryKey, setDeferredQueryKey] = useState(queryKey), deferred = useMemo(() => parseQueryKey(deferredQueryKey), [deferredQueryKey]), [ref, setRef] = useState(new AbortController());
685
700
  useEffect(() => {
@@ -702,7 +717,7 @@ function useQuery(query, options) {
702
717
  };
703
718
  }
704
719
  const DEFAULT_BATCH_SIZE = 25, DEFAULT_PERSPECTIVE$1 = "drafts";
705
- function useInfiniteList(t0) {
720
+ function useDocuments(t0) {
706
721
  const $ = c(31);
707
722
  let filter2, options, orderings, params, search, t1;
708
723
  $[0] !== t0 ? ({
@@ -767,7 +782,7 @@ function _temp$1(str) {
767
782
  return str.trim();
768
783
  }
769
784
  const DEFAULT_PERSPECTIVE = "drafts";
770
- function usePaginatedList(t0) {
785
+ function usePaginatedDocuments(t0) {
771
786
  const $ = c(48);
772
787
  let t1;
773
788
  $[0] !== t0 ? (t1 = t0 === void 0 ? {} : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
@@ -1008,7 +1023,7 @@ function useUsers(params) {
1008
1023
  loadMore: store.loadMore
1009
1024
  }, $[11] = hasMore, $[12] = store.loadMore, $[13] = users, $[14] = t5) : t5 = $[14], t5;
1010
1025
  }
1011
- var version = "0.0.0-alpha.20";
1026
+ var version = "0.0.0-alpha.21";
1012
1027
  function getEnv(key) {
1013
1028
  if (typeof import.meta < "u" && import.meta.env)
1014
1029
  return import.meta.env[key];
@@ -1024,7 +1039,7 @@ export {
1024
1039
  SDKProvider,
1025
1040
  SanityApp,
1026
1041
  SanityProvider,
1027
- useApplyActions,
1042
+ useApplyDocumentActions,
1028
1043
  useAuthState,
1029
1044
  useAuthToken,
1030
1045
  useClient,
@@ -1033,17 +1048,17 @@ export {
1033
1048
  useDatasets,
1034
1049
  useDocument,
1035
1050
  useDocumentEvent,
1051
+ useDocumentPermissions,
1036
1052
  useDocumentSyncStatus,
1053
+ useDocuments,
1037
1054
  useEditDocument,
1038
1055
  useFrameConnection,
1039
- useHandleCallback,
1040
- useInfiniteList,
1056
+ useHandleAuthCallback,
1041
1057
  useLogOut,
1042
1058
  useLoginUrls,
1043
1059
  useManageFavorite,
1044
1060
  useNavigateToStudioDocument,
1045
- usePaginatedList,
1046
- usePermissions,
1061
+ usePaginatedDocuments,
1047
1062
  usePreview,
1048
1063
  useProject,
1049
1064
  useProjection,