@stapel/workspaces-react 0.1.0 → 0.4.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 +78 -0
- package/README.md +45 -3
- package/dist/api/generated/schema.d.ts +759 -0
- package/dist/api/generated/schema.d.ts.map +1 -0
- package/dist/api/generated/schema.js +2 -0
- package/dist/api/generated/schema.js.map +1 -0
- package/dist/api/types.d.ts +22 -6
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/workspacesApi.d.ts +3 -3
- package/dist/api/workspacesApi.d.ts.map +1 -1
- package/dist/api/workspacesApi.js +14 -1
- package/dist/api/workspacesApi.js.map +1 -1
- package/dist/flows/registry.d.ts +22 -0
- package/dist/flows/registry.d.ts.map +1 -0
- package/dist/flows/registry.js +20 -0
- package/dist/flows/registry.js.map +1 -0
- package/dist/headless/Members.d.ts +6 -1
- package/dist/headless/Members.d.ts.map +1 -1
- package/dist/headless/Members.js +1 -1
- package/dist/headless/Members.js.map +1 -1
- package/dist/headless/WorkspacesProvider.d.ts +4 -3
- package/dist/headless/WorkspacesProvider.d.ts.map +1 -1
- package/dist/headless/WorkspacesProvider.js +4 -6
- package/dist/headless/WorkspacesProvider.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/context.d.ts +6 -9
- package/dist/model/context.d.ts.map +1 -1
- package/dist/model/context.js +11 -16
- package/dist/model/context.js.map +1 -1
- package/dist/model/queries.d.ts +6 -4
- package/dist/model/queries.d.ts.map +1 -1
- package/dist/model/queries.js +8 -5
- package/dist/model/queries.js.map +1 -1
- package/dist/model/queryKeys.d.ts +2 -0
- package/dist/model/queryKeys.d.ts.map +1 -1
- package/dist/model/queryKeys.js +3 -0
- package/dist/model/queryKeys.js.map +1 -1
- package/dist/model/runtime.d.ts +12 -21
- package/dist/model/runtime.d.ts.map +1 -1
- package/dist/model/runtime.js +2 -14
- package/dist/model/runtime.js.map +1 -1
- package/llms.txt +3 -3
- package/manifest.json +12 -10
- package/package.json +5 -4
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +761 -0
- package/src/api/types.ts +23 -6
- package/src/api/workspacesApi.ts +17 -5
- package/src/flows/registry.ts +32 -0
- package/src/headless/Members.tsx +7 -2
- package/src/headless/WorkspacesProvider.tsx +5 -10
- package/src/index.ts +4 -3
- package/src/model/context.tsx +16 -17
- package/src/model/queries.ts +16 -7
- package/src/model/queryKeys.ts +9 -0
- package/src/model/runtime.ts +14 -35
- package/dist/flows/generated/flows.gen.d.ts +0 -19
- package/dist/flows/generated/flows.gen.d.ts.map +0 -1
- package/dist/flows/generated/flows.gen.js +0 -23
- package/dist/flows/generated/flows.gen.js.map +0 -1
- package/src/flows/generated/flows.gen.ts +0 -38
- package/src/flows/generated/flows.json +0 -1
package/dist/model/runtime.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createModuleRuntime } from "@stapel/core";
|
|
2
2
|
import { createWorkspacesApi } from "../api/workspacesApi.js";
|
|
3
3
|
export function createWorkspacesRuntime(options) {
|
|
4
|
-
|
|
5
|
-
const client = createStapelClient({
|
|
6
|
-
baseUrl: options.baseUrl,
|
|
7
|
-
...(options.fetch !== undefined ? { fetch: options.fetch } : {}),
|
|
8
|
-
...(options.credentials !== undefined
|
|
9
|
-
? { credentials: options.credentials }
|
|
10
|
-
: {}),
|
|
11
|
-
...(options.defaultHeaders !== undefined
|
|
12
|
-
? { defaultHeaders: options.defaultHeaders }
|
|
13
|
-
: {}),
|
|
14
|
-
});
|
|
15
|
-
const api = createWorkspacesApi(client);
|
|
16
|
-
return { client, api, analytics };
|
|
4
|
+
return createModuleRuntime(createWorkspacesApi, options);
|
|
17
5
|
}
|
|
18
6
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/model/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/model/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAkB9D,MAAM,UAAU,uBAAuB,CACrC,OAAuC;IAEvC,OAAO,mBAAmB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC"}
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @stapel/workspaces-react 0.
|
|
1
|
+
# @stapel/workspaces-react 0.4.0
|
|
2
2
|
|
|
3
|
-
Headless React flow pair for stapel-workspaces (contract >=0.
|
|
3
|
+
Headless React flow pair for stapel-workspaces (contract >=0.4 <0.5) — business + state, zero visual opinion.
|
|
4
4
|
Built on @stapel/core: typed client + StapelApiError envelope, auth token refresh,
|
|
5
5
|
verification-403 interception, i18n engine, analytics facade, TanStack Query layer.
|
|
6
6
|
|
|
@@ -27,8 +27,8 @@ Request/response schema names are in manifest.json + the generated types.
|
|
|
27
27
|
- workspaces_api_invitations_accept_create: POST /workspaces/api/invitations/accept
|
|
28
28
|
- workspaces_api_members_destroy: DELETE /workspaces/api/{workspace_id}/members/{user_id}
|
|
29
29
|
- workspaces_api_members_invite_create: POST /workspaces/api/{workspace_id}/members/invite
|
|
30
|
+
- workspaces_api_members_list: GET /workspaces/api/{workspace_id}/members
|
|
30
31
|
- workspaces_api_members_partial_update: PATCH /workspaces/api/{workspace_id}/members/{user_id}
|
|
31
|
-
- workspaces_api_members_retrieve: GET /workspaces/api/{workspace_id}/members
|
|
32
32
|
- workspaces_api_partial_update: PATCH /workspaces/api/{workspace_id}
|
|
33
33
|
- workspaces_api_retrieve: GET /workspaces/api/
|
|
34
34
|
- workspaces_api_retrieve_2: GET /workspaces/api/{workspace_id}
|
package/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$generated": "by scripts/gen-manifest.mjs — do not edit; drift-gated (pnpm gen:manifest:check)",
|
|
3
3
|
"package": "@stapel/workspaces-react",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"backend": {
|
|
6
6
|
"module": "stapel-workspaces",
|
|
7
|
-
"contract": ">=0.
|
|
7
|
+
"contract": ">=0.4 <0.5"
|
|
8
8
|
},
|
|
9
9
|
"layers": [
|
|
10
10
|
"api",
|
|
@@ -65,6 +65,13 @@
|
|
|
65
65
|
"request": "MemberInviteRequest",
|
|
66
66
|
"response": "MemberInviteResponse"
|
|
67
67
|
},
|
|
68
|
+
"workspaces_api_members_list": {
|
|
69
|
+
"method": "GET",
|
|
70
|
+
"path": "/workspaces/api/{workspace_id}/members",
|
|
71
|
+
"tag": "Members",
|
|
72
|
+
"request": null,
|
|
73
|
+
"response": "PaginatedMemberResponseList"
|
|
74
|
+
},
|
|
68
75
|
"workspaces_api_members_partial_update": {
|
|
69
76
|
"method": "PATCH",
|
|
70
77
|
"path": "/workspaces/api/{workspace_id}/members/{user_id}",
|
|
@@ -72,13 +79,6 @@
|
|
|
72
79
|
"request": "PatchedMemberUpdateRequest",
|
|
73
80
|
"response": "MemberResponse"
|
|
74
81
|
},
|
|
75
|
-
"workspaces_api_members_retrieve": {
|
|
76
|
-
"method": "GET",
|
|
77
|
-
"path": "/workspaces/api/{workspace_id}/members",
|
|
78
|
-
"tag": "Members",
|
|
79
|
-
"request": null,
|
|
80
|
-
"response": "MemberListResponse"
|
|
81
|
-
},
|
|
82
82
|
"workspaces_api_partial_update": {
|
|
83
83
|
"method": "PATCH",
|
|
84
84
|
"path": "/workspaces/api/{workspace_id}",
|
|
@@ -154,7 +154,8 @@
|
|
|
154
154
|
"queryKey": [
|
|
155
155
|
"workspaces",
|
|
156
156
|
"members",
|
|
157
|
-
"{workspaceId}"
|
|
157
|
+
"{workspaceId}",
|
|
158
|
+
"{params}"
|
|
158
159
|
]
|
|
159
160
|
},
|
|
160
161
|
"useRemoveMember": {
|
|
@@ -684,6 +685,7 @@
|
|
|
684
685
|
"MemberRoleChange",
|
|
685
686
|
"MemberRoleUpdate",
|
|
686
687
|
"MembersBag",
|
|
688
|
+
"MembersParams",
|
|
687
689
|
"Remediation",
|
|
688
690
|
"Schemas",
|
|
689
691
|
"WorkspaceCreate",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stapel/workspaces-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Headless React flow pair for stapel-workspaces: typed API client, TanStack Query hooks, flow machines, headless components, and i18n keys. Zero visual opinion.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"size-limit": "^11.2.0",
|
|
67
67
|
"typescript": "^5.8.3",
|
|
68
68
|
"vitest": "^3.2.4",
|
|
69
|
+
"@stapel/core": "^0.4.0",
|
|
69
70
|
"@stapel/showcase": "^0.2.0",
|
|
70
|
-
"@stapel/tokens": "^0.
|
|
71
|
-
"@stapel/core": "^0.3.0"
|
|
71
|
+
"@stapel/tokens": "^0.4.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=22"
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "tsc -p tsconfig.json",
|
|
81
|
-
"test": "tsc -p tsconfig.demo.json && vitest run",
|
|
81
|
+
"test": "tsc -p tsconfig.demo.json && vitest run --exclude test/prodBundlePurity.test.ts",
|
|
82
|
+
"test:pack": "vitest run test/prodBundlePurity.test.ts",
|
|
82
83
|
"lint": "eslint .",
|
|
83
84
|
"size": "size-limit"
|
|
84
85
|
}
|