v0.0.0-alpha.24
0.0.0-alpha.24 (2025-04-09)
⚠ BREAKING CHANGES
- use hosted login for standalone apps (#386)
- replace
sanityConfigs
prop withconfig
prop inand
- replace
resourceId
concept with explicitprojectId
anddataset
fields in handles - rename
_type
todocumentType
in DocumentHandle interface and related usages - rename
_id
todocumentId
in DocumentHandle interface and related usages - update document hooks and actions to expect
DocumentHandle
props - update project and dataset hooks to use
ProjectHandle
orDatasetHandle
- remove
, introduce
for configuration - rename usePermissions → useDocumentPermissions (#365)
- rename useActions → useDocumentActions and useActions → useDocumentActions (#362)
- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback (#358)
- rename
results
todata
for useProjection hook (#335) - rename
result
todata
for usePreview hook (#325) - react: flatten sdk-react imports (#319)
- remove
schema
from sanity config - remove schema state and schema manager
- remove
useDocuments
anduseSearch
hooks - allow multiple resources via instances (#271)
- renames
org
auth scope toglobal
(#187)
Features
createStore
prototype (#46) (d3d69f8)useProjects
,useProject
,useDatasets
(#235) (cc95dfd)- add
useQuery
,useInfiniteList
,usePaginatedList
hooks (1a3f4ad) - add authorization (#52) (59501f1)
- add document list store (#58) (b66ea04)
- add hooks for AuthStore (#91) (4367719)
- add preview store (#62) (c343f1e)
- add React and Vitest (#3) (e55dc32)
- add session hooks and store (#59) (65ac911)
- add storybook and dev affordances (#6) (15b45e8)
- add turborepo (#2) (19c53e1)
- add TypeDoc (#43) (2274873)
- add useClient hook (#96) (c50883b)
- add useDashboardOrganizationId hook (#339) (401468e)
- add useProjection hook (#257) (fbaafe0)
- add useUsers hook (#239) (b89bcf0)
- add versions information to all packages (#275) (afb2fec)
- allow multiple resources via instances (#271) (6f4d541)
- auth: fetch current user when token is present (#92) (f38008c)
- auth: refresh stamped tokens (#225) (10b2745)
- AuthStore (#79) (f52e68e)
- client: add a global api client (#209) (5898b1d)
- core: add comlink controller and channel store (#141) (cf1e5d5)
- core: add comlink node store (#156) (a080357)
- core: add README and npm keywords (#115) (8a3c492)
- core: create client store (#38) (8545333)
- core: update client store to subscribe to changes in auth (#85) (a42d58d)
- core: use separate client for auth and refresh client store with token (#64) (9d18fbf)
- create sanity instance and store map (#40) (a7bf3e1)
- document hooks: update the documentation for the Document hook s an optional resourceId (#280) (eb65378)
- document permissions (#226) (107f434)
- document store (#197) (497bb26)
- export the SanityDocument type (#221) (dc6dbc8)
- introduce consistent Handle pattern (
ProjectHandle
,DatasetHandle
,DocumentHandle
) across the SDK (969d70e) - kitchen-sink: add routing to kitchen-sink (#99) (50483ea)
- make packages public (#320) (8c94c29)
- react: add AuthBoundary (#102) (bd657a0)
- react: add react compiler to the build process (#298) (bfb74eb)
- react: add useDocuments hook (#98) (d0f0c1a)
- react: flatten sdk-react imports (#319) (3922025)
- refactor to internal auth store (#95) (5807a2b)
- remove
, introduce
for configuration (969d70e) - remove
schema
from sanity config (6257fe3) - remove
useDocuments
anduseSearch
hooks (9f37daf) - remove schema state and schema manager (6257fe3)
- rename
_id
todocumentId
in DocumentHandle interface and related usages (969d70e) - rename
_type
todocumentType
in DocumentHandle interface and related usages (969d70e) - rename
result
todata
for usePreview hook (#325) (1e5813e) - rename
results
todata
for useProjection hook (#335) (026dd26) - rename useActions → useDocumentActions and useActions → useDocumentActions (#362) (c753897)
- rename usePermissions → useDocumentPermissions (#365) (6ca2ada)
- replace
resourceId
concept with explicitprojectId
anddataset
fields in handles (969d70e) - replace
sanityConfigs
prop withconfig
prop inand
(969d70e) - replace jsdoc with tsdoc (#75) (7074a38)
- resolve preview projections (#130) (d30997e)
- store Dashboard context (#307) (a6c454e)
- update document hooks and actions to expect
DocumentHandle
props (969d70e) - update project and dataset hooks to use
ProjectHandle
orDatasetHandle
(969d70e) - update query and list hooks to accept optional
DatasetHandle
for configuration (969d70e) - use hosted login for standalone apps (#386) (9c1ad58)
- use projection for previews and remove schema usage (6257fe3)
Bug Fixes
- add access api types inside the SDK (#261) (ff53123)
- add lint to turbo.json and run prettier (909f0d3)
- all client requests are properly tagged (#274) (6df8938)
- auth: ensure that authStore is a true shared resource store (#371) (1709d95)
- auth: only attempt to refresh stamped tokens (#304) (b08a319)
- build: fixes build warning (#252) (bed82f8)
- comlink: expose statuses and destroy unused resources (#233) (8b8a40c)
- core: add correct perspective to useProjection (#295) (8792e00)
- core: add raw perspective to client (#237) (202c4ba)
- core: determine env for version (#293) (643eac4)
- core: emit current token state on subscribe (#139) (7ec0d98)
- core: fixes apiVersion in usersStore (#262) (248eb19)
- core: use drafts instead of previewDrafts (#279) (45305ad)
- correct auth state subscription (#101) (9ba03d0)
- deps: update dependency @sanity/client to ^6.28.3 (#287) (fc5c5a1)
- deps: update dependency @sanity/comlink to v3 (#296) (14fbe1b)
- deps: update dependency @sanity/mutate to ^0.12.4 (#395) (6cbb54a)
- deps: Update eslint-tooling (#69) (d9d8e09)
- deps: update pkg-utils to v7 (#384) (ce9a952)
- deps: Update sanity monorepo to ^3.78.1 (#297) (835b594)
- deps: upgrade
@sanity/client
, do not usewithCredentials
(#368) (8e1cbd9) - environment variable access for Remix (#168) (4ad3587)
- fix typedoc annotations for hooks (#361) (778a63a)
- initialize client with configured apiHost (#186) (13c72cb)
- make apiVersion required in getClient (#230) (91458d3)
- mark packages as private for now (#11) (a103825)
- package access and version (#89) (c4eb26d)
- trigger release (#210) (2b36c98)
- update typedoc to use package mode (#117) (7f4e0e1)