@korso/shepherd-ui 0.3.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.
@@ -3,6 +3,21 @@ 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, }: ConfigPanelProps): JSX_2.Element;
7
+
8
+ export declare interface ConfigPanelProps {
9
+ /** The active workspace all sections configure. */
10
+ workspace: WorkspaceSummaryT;
11
+ /** The DIRECT Hub URL embedded in the agent install command. */
12
+ hubUrl?: string;
13
+ /** Bumped by the shell to force the roster to refetch (invite created/redeemed). */
14
+ membersRefreshKey?: number;
15
+ /** Called after an invite is created, so the shell can refresh the roster. */
16
+ onMembersChanged?: () => void;
17
+ /** Called after a successful leave, so the shell re-lists its workspaces. */
18
+ onLeft?: () => void;
19
+ }
20
+
6
21
  export declare function ConnectAgent({ workspaceId, hubUrl }: ConnectAgentProps): JSX_2.Element;
7
22
 
8
23
  export declare interface ConnectAgentProps {
@@ -92,7 +107,7 @@ declare type CreateWorkspaceResponseT = z.infer<typeof CreateWorkspaceResponse>;
92
107
  *
93
108
  * @returns The dashboard element.
94
109
  */
95
- export declare function Dashboard({ workspaceId, config, hasWorkspace, }?: DashboardProps): ReactElement;
110
+ export declare function Dashboard({ workspaceId, config, switcher, hasWorkspace, }?: DashboardProps): ReactElement;
96
111
 
97
112
  /** Props for {@link Dashboard}. The client comes from context. */
98
113
  export declare interface DashboardProps {
@@ -109,6 +124,12 @@ export declare interface DashboardProps {
109
124
  * (the self-host case) keeps the board a plain two-tab Tasks/Chat wallboard.
110
125
  */
111
126
  config?: ReactNode;
127
+ /**
128
+ * The hosted-shell workspace switcher, rendered in the header beside the brand
129
+ * on EVERY tab (not just Config) so the active workspace is always visible.
130
+ * Omitted for self-host, which has a single implicit team workspace.
131
+ */
132
+ switcher?: ReactNode;
112
133
  /**
113
134
  * Whether the account currently belongs to a workspace. Only meaningful in the
114
135
  * hosted shell (paired with {@link config}). When `false`, the Tasks/Chat
@@ -170,6 +191,15 @@ declare const FeedbackResponse: z.ZodObject<{
170
191
 
171
192
  declare type FeedbackResponseT = z.infer<typeof FeedbackResponse>;
172
193
 
194
+ export declare function GeneralSettings({ workspace, onLeft }: GeneralSettingsProps): JSX_2.Element;
195
+
196
+ export declare interface GeneralSettingsProps {
197
+ /** The active workspace whose identity is shown. */
198
+ workspace: WorkspaceSummaryT;
199
+ /** Called after a successful leave, so the shell refreshes its workspace list. */
200
+ onLeft?: () => void;
201
+ }
202
+
173
203
  declare const InviteByEmailResponse: z.ZodObject<{
174
204
  email: z.ZodString;
175
205
  sentAt: z.ZodString;
@@ -202,6 +232,15 @@ declare const InviteResponse: z.ZodObject<{
202
232
 
203
233
  export declare type InviteResponseT = z.infer<typeof InviteResponse>;
204
234
 
235
+ export declare function Invites({ workspaceId, onMembersChanged }: InvitesProps): JSX_2.Element;
236
+
237
+ export declare interface InvitesProps {
238
+ /** The workspace invites are minted against. */
239
+ workspaceId: string;
240
+ /** Called after an invite is created (may change the pending-invite roster). */
241
+ onMembersChanged?: () => void;
242
+ }
243
+
205
244
  declare const ListMembersResponse: z.ZodObject<{
206
245
  members: z.ZodArray<z.ZodObject<{
207
246
  accountId: z.ZodString;
@@ -317,7 +356,7 @@ declare const ListWorkspacesResponse: z.ZodObject<{
317
356
 
318
357
  declare type ListWorkspacesResponseT = z.infer<typeof ListWorkspacesResponse>;
319
358
 
320
- export declare function Members({ workspaceId, refreshKey, canRemove, onLeft }: MembersProps): JSX_2.Element;
359
+ export declare function Members({ workspaceId, refreshKey, canRemove }: MembersProps): JSX_2.Element;
321
360
 
322
361
  export declare interface MembersProps {
323
362
  workspaceId: string;
@@ -325,8 +364,6 @@ export declare interface MembersProps {
325
364
  refreshKey?: number;
326
365
  /** When true, render the per-member remove control (the caller gates on admin). */
327
366
  canRemove?: boolean;
328
- /** Called after a successful self-service leave, so the shell can refresh. */
329
- onLeft?: () => void;
330
367
  }
331
368
 
332
369
  declare const MemberSummary: z.ZodObject<{
@@ -754,22 +791,6 @@ declare const WorkspaceLandscapeResponse: z.ZodObject<{
754
791
 
755
792
  export declare type WorkspaceLandscapeResponseT = z.infer<typeof WorkspaceLandscapeResponse>;
756
793
 
757
- export declare function Workspaces({ workspaces, selected, onChanged, onSelect, onMembersChanged, }: WorkspacesProps): JSX_2.Element;
758
-
759
- export declare interface WorkspacesProps {
760
- /** All workspaces the account belongs to (for the switcher / context). */
761
- workspaces: WorkspaceSummaryT[];
762
- /** The currently-selected workspace, or null when the account has none. */
763
- selected: WorkspaceSummaryT | null;
764
- /** Called after a mutation that changes membership (create / join / leave). */
765
- onChanged: () => void;
766
- /** Switch the active workspace (optional simple switcher). */
767
- onSelect?: (workspaceId: string) => void;
768
- /** Called after a mutation that may change the selected workspace's roster
769
- * (an invite created, a code redeemed), so the sibling <Members> refetches. */
770
- onMembersChanged?: () => void;
771
- }
772
-
773
794
  /** One workspace as seen by an account, with that account's role in it. */
774
795
  declare const WorkspaceSummary: z.ZodObject<{
775
796
  id: z.ZodString;
@@ -790,4 +811,19 @@ declare const WorkspaceSummary: z.ZodObject<{
790
811
 
791
812
  export declare type WorkspaceSummaryT = z.infer<typeof WorkspaceSummary>;
792
813
 
814
+ export declare function WorkspaceSwitcher({ workspaces, selected, onSelect, onChanged, onMembersChanged, }: WorkspaceSwitcherProps): JSX_2.Element;
815
+
816
+ export declare interface WorkspaceSwitcherProps {
817
+ /** All workspaces the account belongs to. */
818
+ workspaces: WorkspaceSummaryT[];
819
+ /** The currently-active workspace, or null when the account has none. */
820
+ selected: WorkspaceSummaryT | null;
821
+ /** Switch the active workspace. */
822
+ onSelect: (workspaceId: string) => void;
823
+ /** Called after a create/join changes membership, so the shell re-lists. */
824
+ onChanged: () => void;
825
+ /** Called after a join (which adds the caller to a new roster). */
826
+ onMembersChanged?: () => void;
827
+ }
828
+
793
829
  export { }