@sanity/workflow-studio 0.23.0 → 0.24.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.
- package/CHANGELOG.md +14 -0
- package/README.md +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sanity/workflow-studio
|
|
2
2
|
|
|
3
|
+
## 0.24.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d570436: A project-member directory that has not answered yet reports `loading` instead of reading as a loaded directory with no members. Its fetch starts from a consumer's effect, one commit after the first render, so that first pass previously looked settled-and-empty — enough for the plugin to warn that the logged-in user is not a project member before anything had been fetched, on every fresh page load.
|
|
8
|
+
|
|
9
|
+
The plugin's identity bridge now resolves the logged-in user before consulting the directory's state. An id that carries its own account-global identity — a `g…` global id, a robot, the global id embedded in a third-party-login `e-` id — resolves immediately and is unaffected by a directory that is still loading or has failed. Only a plain project-scoped id needs the member join, so only it waits, and only it can turn out unresolvable once the directory answers. That case keeps its warning, and a directory that failed to load now says so and names the failure instead of attributing it to project membership.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [0bc4328]
|
|
12
|
+
- Updated dependencies [41a3f02]
|
|
13
|
+
- @sanity/workflow-engine@0.24.0
|
|
14
|
+
- @sanity/workflow-react@0.24.0
|
|
15
|
+
- @sanity/workflow-sdk@0.24.0
|
|
16
|
+
|
|
3
17
|
## 0.23.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -36,7 +36,11 @@ Studio source context (`useSource` / `useClient`).
|
|
|
36
36
|
profile records without an Editorial Workflows projection, plus the engine's
|
|
37
37
|
`ProjectUserDirectory` integration. Concurrent loads are coalesced, the
|
|
38
38
|
settled successful directory is reused for the client/project lifetime, and
|
|
39
|
-
failed loads retry after a 30-second backoff.
|
|
39
|
+
failed loads retry after a 30-second backoff. A directory that has not
|
|
40
|
+
answered reports `loading`, including before its fetch starts (the fetch
|
|
41
|
+
begins in a consumer's effect), so an empty `users` with `loading: false`
|
|
42
|
+
and no `error` is a confirmed "no members" rather than a directory nobody
|
|
43
|
+
has asked for. `studioProjectUserDirectory`
|
|
40
44
|
provides the same contract outside React when a Studio client and project ID
|
|
41
45
|
are already available.
|
|
42
46
|
|
package/dist/index.cjs
CHANGED
|
@@ -226,7 +226,7 @@ const projectUsersByClient = /* @__PURE__ */ new WeakMap;
|
|
|
226
226
|
function createProjectUsersStore(client, projectId) {
|
|
227
227
|
let snapshot = {
|
|
228
228
|
users: [],
|
|
229
|
-
loading: !
|
|
229
|
+
loading: !0,
|
|
230
230
|
error: void 0
|
|
231
231
|
}, pending, retryAt = 0, usersById = /* @__PURE__ */ new Map, usersByEmail = /* @__PURE__ */ new Map;
|
|
232
232
|
const listeners = /* @__PURE__ */ new Set, setSnapshot = next => {
|
package/dist/index.d.cts
CHANGED
|
@@ -59,6 +59,11 @@ export declare function studioProjectUserDirectory(
|
|
|
59
59
|
|
|
60
60
|
export declare interface StudioProjectUsersState {
|
|
61
61
|
readonly users: readonly StudioProjectUser[];
|
|
62
|
+
/** True while the directory has not answered, including before its load
|
|
63
|
+
* starts — the fetch begins in a consumer's effect or the first directory
|
|
64
|
+
* lookup, one commit after the first render reads this state. An empty
|
|
65
|
+
* `users` with `loading: false` and no `error` is a confirmed "no
|
|
66
|
+
* members", never a directory nobody has asked for. */
|
|
62
67
|
readonly loading: boolean;
|
|
63
68
|
readonly error: unknown;
|
|
64
69
|
readonly directory: ProjectUserDirectory<StudioProjectUser> | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,11 @@ export declare function studioProjectUserDirectory(
|
|
|
59
59
|
|
|
60
60
|
export declare interface StudioProjectUsersState {
|
|
61
61
|
readonly users: readonly StudioProjectUser[];
|
|
62
|
+
/** True while the directory has not answered, including before its load
|
|
63
|
+
* starts — the fetch begins in a consumer's effect or the first directory
|
|
64
|
+
* lookup, one commit after the first render reads this state. An empty
|
|
65
|
+
* `users` with `loading: false` and no `error` is a confirmed "no
|
|
66
|
+
* members", never a directory nobody has asked for. */
|
|
62
67
|
readonly loading: boolean;
|
|
63
68
|
readonly error: unknown;
|
|
64
69
|
readonly directory: ProjectUserDirectory<StudioProjectUser> | undefined;
|
package/dist/index.js
CHANGED
|
@@ -234,7 +234,7 @@ const projectUsersByClient = /* @__PURE__ */ new WeakMap;
|
|
|
234
234
|
function createProjectUsersStore(client, projectId) {
|
|
235
235
|
let snapshot = {
|
|
236
236
|
users: [],
|
|
237
|
-
loading: !
|
|
237
|
+
loading: !0,
|
|
238
238
|
error: void 0
|
|
239
239
|
}, pending, retryAt = 0, usersById = /* @__PURE__ */ new Map, usersByEmail = /* @__PURE__ */ new Map;
|
|
240
240
|
const listeners = /* @__PURE__ */ new Set, setSnapshot = next => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/workflow-studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "React adapter that drives the @sanity/workflow-engine reactive session in Sanity Studio through the App SDK store.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
"react-dom": "^19.2.7",
|
|
51
51
|
"sanity": "^6",
|
|
52
52
|
"vitest": "^4.1.8",
|
|
53
|
-
"@sanity/workflow-engine": "0.
|
|
54
|
-
"@sanity/workflow-react": "0.
|
|
55
|
-
"@sanity/workflow-sdk": "0.
|
|
53
|
+
"@sanity/workflow-engine": "0.24.0",
|
|
54
|
+
"@sanity/workflow-react": "0.24.0",
|
|
55
|
+
"@sanity/workflow-sdk": "0.24.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@sanity/sdk": "^2.12.0",
|
|
59
59
|
"react": "^19.2.7",
|
|
60
60
|
"sanity": "^6",
|
|
61
|
-
"@sanity/workflow-engine": "0.
|
|
62
|
-
"@sanity/workflow-react": "0.
|
|
63
|
-
"@sanity/workflow-sdk": "0.
|
|
61
|
+
"@sanity/workflow-engine": "0.24.0",
|
|
62
|
+
"@sanity/workflow-react": "0.24.0",
|
|
63
|
+
"@sanity/workflow-sdk": "0.24.0"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=20"
|