@korso/shepherd-ui 0.9.1 → 0.11.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/LICENSE +661 -661
- package/README.md +50 -47
- package/dist/JoinWorkspace.d.ts +12 -0
- package/dist/JoinWorkspace.js +34 -0
- package/dist/ShepherdRoot.d.ts +6 -1
- package/dist/ShepherdRoot.js +4 -3
- package/dist/components/Dashboard.d.ts +6 -1
- package/dist/components/Dashboard.js +2 -2
- package/dist/config/ConfigPanel.d.ts +6 -1
- package/dist/config/ConfigPanel.js +3 -2
- package/dist/config/SignOutAction.d.ts +7 -0
- package/dist/config/SignOutAction.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/lib/{Dashboard-BSGZuM-A.js → Dashboard-YgxAVEUF.js} +604 -561
- package/dist/lib/index.d.ts +31 -3
- package/dist/lib/index.js +470 -407
- package/dist/lib/selfhost.js +32 -32
- package/dist/lib/styles.css +507 -465
- package/dist/selfhost/assets/index-BhrpCYNE.js +40 -0
- package/dist/selfhost/assets/index-Do2kYzi3.css +1 -0
- package/dist/selfhost/index.html +13 -13
- package/dist/selfhost.js +14 -13
- package/package.json +67 -67
- package/dist/selfhost/assets/index-0s8wNrl-.css +0 -1
- package/dist/selfhost/assets/index-BK1xPf0V.js +0 -40
package/dist/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ReactElement } from 'react';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
-
export declare function ConfigPanel({ workspace, hubUrl, membersRefreshKey, onMembersChanged, onLeft, onDeleted, }: ConfigPanelProps): JSX_2.Element;
|
|
6
|
+
export declare function ConfigPanel({ workspace, hubUrl, membersRefreshKey, onMembersChanged, onLeft, onDeleted, onLogout, }: ConfigPanelProps): JSX_2.Element;
|
|
7
7
|
|
|
8
8
|
export declare interface ConfigPanelProps {
|
|
9
9
|
/** The active workspace all sections configure. */
|
|
@@ -18,6 +18,11 @@ export declare interface ConfigPanelProps {
|
|
|
18
18
|
onLeft?: () => void;
|
|
19
19
|
/** Called after a successful delete, so the shell re-lists its workspaces. */
|
|
20
20
|
onDeleted?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Hosted session logout hook. Shepherd renders the control while the host owns
|
|
23
|
+
* the authentication side effect.
|
|
24
|
+
*/
|
|
25
|
+
onLogout?: () => void;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export declare function ConnectAgent({ hubUrl }: ConnectAgentProps): JSX_2.Element;
|
|
@@ -108,7 +113,7 @@ declare type CreateWorkspaceResponseT = z.infer<typeof CreateWorkspaceResponse>;
|
|
|
108
113
|
*
|
|
109
114
|
* @returns The dashboard element.
|
|
110
115
|
*/
|
|
111
|
-
export declare function Dashboard({ workspaceId, config, switcher, hasWorkspace, }?: DashboardProps): ReactElement;
|
|
116
|
+
export declare function Dashboard({ workspaceId, config, switcher, hasWorkspace, onLogout, }?: DashboardProps): ReactElement;
|
|
112
117
|
|
|
113
118
|
/** Props for {@link Dashboard}. The client comes from context. */
|
|
114
119
|
export declare interface DashboardProps {
|
|
@@ -139,6 +144,11 @@ export declare interface DashboardProps {
|
|
|
139
144
|
* has its implicit team workspace).
|
|
140
145
|
*/
|
|
141
146
|
hasWorkspace?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Optional header logout seam. The dashboard only renders the control and
|
|
149
|
+
* invokes this callback; authentication side effects belong to the caller.
|
|
150
|
+
*/
|
|
151
|
+
onLogout?: () => void;
|
|
142
152
|
}
|
|
143
153
|
|
|
144
154
|
declare const DeleteWorkspaceResponse: z.ZodObject<{
|
|
@@ -254,6 +264,19 @@ export declare interface InvitesProps {
|
|
|
254
264
|
onMembersChanged?: () => void;
|
|
255
265
|
}
|
|
256
266
|
|
|
267
|
+
export declare function JoinWorkspace({ code, onJoined }: JoinWorkspaceProps): JSX_2.Element;
|
|
268
|
+
|
|
269
|
+
export declare interface JoinWorkspaceProps {
|
|
270
|
+
/** The raw invite code from the URL segment, forwarded opaquely to the hub. */
|
|
271
|
+
code: string;
|
|
272
|
+
/**
|
|
273
|
+
* Invoked once the redeem succeeds, with the workspace just joined. The host
|
|
274
|
+
* navigates to its board surface; the component keeps showing the success
|
|
275
|
+
* state until that navigation lands.
|
|
276
|
+
*/
|
|
277
|
+
onJoined: (workspace: WorkspaceSummaryT) => void;
|
|
278
|
+
}
|
|
279
|
+
|
|
257
280
|
declare const ListMembersResponse: z.ZodObject<{
|
|
258
281
|
members: z.ZodArray<z.ZodObject<{
|
|
259
282
|
accountId: z.ZodString;
|
|
@@ -589,7 +612,7 @@ declare interface ShepherdClientProviderProps {
|
|
|
589
612
|
children: ReactNode;
|
|
590
613
|
}
|
|
591
614
|
|
|
592
|
-
export declare function ShepherdRoot({ hubUrl }: ShepherdRootProps): JSX_2.Element;
|
|
615
|
+
export declare function ShepherdRoot({ hubUrl, onLogout }: ShepherdRootProps): JSX_2.Element;
|
|
593
616
|
|
|
594
617
|
export declare interface ShepherdRootProps {
|
|
595
618
|
/**
|
|
@@ -598,6 +621,11 @@ export declare interface ShepherdRootProps {
|
|
|
598
621
|
* to the client's baseUrl, which is correct for self-host.
|
|
599
622
|
*/
|
|
600
623
|
hubUrl?: string;
|
|
624
|
+
/**
|
|
625
|
+
* Hosted session logout hook. The embedding frontend/BFF owns cookies,
|
|
626
|
+
* session state, and OIDC cleanup; Shepherd only renders the Config action.
|
|
627
|
+
*/
|
|
628
|
+
onLogout?: () => void;
|
|
601
629
|
}
|
|
602
630
|
|
|
603
631
|
declare const TokenSummary: z.ZodObject<{
|