@sanity/sdk 0.0.0-rc.6 → 0.0.0

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 (53) hide show
  1. package/README.md +7 -15
  2. package/dist/index.d.ts +562 -234
  3. package/dist/index.js +515 -256
  4. package/dist/index.js.map +1 -1
  5. package/package.json +12 -10
  6. package/src/_exports/index.ts +17 -2
  7. package/src/auth/dashboardUtils.test.ts +41 -0
  8. package/src/auth/dashboardUtils.ts +12 -0
  9. package/src/auth/getOrganizationVerificationState.test.ts +197 -0
  10. package/src/auth/getOrganizationVerificationState.ts +73 -0
  11. package/src/auth/handleAuthCallback.test.ts +2 -0
  12. package/src/auth/handleAuthCallback.ts +1 -0
  13. package/src/auth/logout.test.ts +1 -0
  14. package/src/auth/logout.ts +1 -0
  15. package/src/auth/refreshStampedToken.ts +1 -0
  16. package/src/auth/studioModeAuth.test.ts +1 -1
  17. package/src/auth/studioModeAuth.ts +1 -0
  18. package/src/auth/subscribeToStateAndFetchCurrentUser.test.ts +2 -0
  19. package/src/auth/subscribeToStateAndFetchCurrentUser.ts +1 -0
  20. package/src/client/clientStore.ts +22 -18
  21. package/src/comlink/node/actions/releaseNode.ts +16 -14
  22. package/src/config/__tests__/handles.test.ts +30 -0
  23. package/src/config/handles.ts +67 -0
  24. package/src/config/sanityConfig.ts +44 -16
  25. package/src/document/actions.ts +188 -60
  26. package/src/document/applyDocumentActions.ts +12 -5
  27. package/src/document/documentStore.test.ts +70 -121
  28. package/src/document/documentStore.ts +57 -27
  29. package/src/document/patchOperations.test.ts +1 -1
  30. package/src/document/patchOperations.ts +39 -39
  31. package/src/document/sharedListener.ts +3 -1
  32. package/src/favorites/favorites.test.ts +237 -0
  33. package/src/favorites/favorites.ts +122 -0
  34. package/src/preview/resolvePreview.test.ts +3 -4
  35. package/src/preview/subscribeToStateAndFetchBatches.test.ts +1 -1
  36. package/src/preview/subscribeToStateAndFetchBatches.ts +4 -2
  37. package/src/project/organizationVerification.test.ts +35 -0
  38. package/src/project/organizationVerification.ts +26 -0
  39. package/src/projection/getProjectionState.ts +36 -11
  40. package/src/projection/resolveProjection.test.ts +3 -4
  41. package/src/projection/resolveProjection.ts +35 -9
  42. package/src/projection/subscribeToStateAndFetchBatches.test.ts +1 -1
  43. package/src/projection/subscribeToStateAndFetchBatches.ts +4 -2
  44. package/src/query/queryStore.test.ts +12 -12
  45. package/src/query/queryStore.ts +71 -42
  46. package/src/releases/getPerspectiveState.test.ts +192 -0
  47. package/src/releases/getPerspectiveState.ts +93 -0
  48. package/src/releases/releasesStore.test.ts +170 -0
  49. package/src/releases/releasesStore.ts +89 -0
  50. package/src/releases/utils/sortReleases.test.ts +336 -0
  51. package/src/releases/utils/sortReleases.ts +48 -0
  52. package/src/utils/listenQuery.test.ts +302 -0
  53. package/src/utils/listenQuery.ts +128 -0
package/README.md CHANGED
@@ -2,25 +2,17 @@
2
2
  <a href="https://sanity.io">
3
3
  <img src="https://cdn.sanity.io/images/3do82whm/next/1dfce9dde7a62ccaa8e8377254a1e919f6c07ad3-128x128.svg" />
4
4
  </a>
5
- <h1 align="center">Sanity SDK</h1>
5
+ <h1 align="center">Sanity Core App SDK</h1>
6
6
  </p>
7
7
 
8
- Core utilities for creating Sanity applications.
8
+ Core functionality powering the React SDK.
9
9
 
10
- ## 💻 Installation
10
+ ## Documentation
11
11
 
12
- ```bash
13
- npm i @sanity/sdk
14
- ```
12
+ - Familiarize yourself with the App SDK via a conceptual overview, a quickstart guide, and a step by step walkthrough on **[the Sanity Docs site](https://sanity.io/docs/app-sdk)**
13
+ - Go in depth with the **[App SDK reference docs](https://sdk-docs.sanity.dev)**
14
+ - View example implementations on the **[SDK Explorer](https://sdk-examples.sanity.dev)**
15
15
 
16
- ## 📚 SDK Documentation
17
-
18
- See the [SDK Documentation](https://sdk-docs.sanity.dev) for more information.
19
-
20
- ## 🧑‍💻 Implementations
21
-
22
- - [React](https://www.npmjs.com/package/@sanity/sdk-react)
23
-
24
- ## 📄 License
16
+ ## License
25
17
 
26
18
  MIT © Sanity.io