@shipfox/client-secrets 17.0.0 → 22.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-secrets",
3
3
  "license": "MIT",
4
- "version": "17.0.0",
4
+ "version": "22.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -29,9 +29,9 @@
29
29
  "@tanstack/react-form": "^1.32.0",
30
30
  "@shipfox/api-secrets-dto": "12.0.0",
31
31
  "@shipfox/client-api": "6.0.1",
32
- "@shipfox/client-shell": "17.0.0",
33
- "@shipfox/client-ui": "17.0.0",
34
- "@shipfox/react-ui": "1.2.0"
32
+ "@shipfox/client-shell": "22.0.0",
33
+ "@shipfox/client-ui": "22.0.0",
34
+ "@shipfox/react-ui": "2.1.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@tanstack/react-query": "^5.101.0",
@@ -1,32 +1,27 @@
1
+ import {Panel, PanelBody, PanelRow} from '@shipfox/react-ui/panel';
1
2
  import {Skeleton} from '@shipfox/react-ui/skeleton';
2
- import {cn} from '@shipfox/react-ui/utils';
3
-
4
- export const STORE_SURFACE_CLASS =
5
- 'overflow-hidden rounded-8 border border-border-neutral-base bg-background-neutral-base';
6
3
 
7
4
  /** Placeholder rows shown while the store list loads. */
8
5
  export function StoreRowsSkeleton({label}: {label: string}) {
9
6
  return (
10
- <div role="status" aria-label={label} className={STORE_SURFACE_CLASS}>
11
- <ul className="divide-y divide-border-neutral-base">
12
- {[0, 1, 2].map((row) => (
13
- <li key={row} className="flex items-center gap-cluster px-row py-row">
14
- <Skeleton className="h-16 w-140" />
15
- <Skeleton className="h-16 w-96" />
16
- <Skeleton className="ml-auto h-14 w-80 shrink-0" />
17
- </li>
18
- ))}
19
- </ul>
20
- </div>
7
+ <Panel>
8
+ <PanelBody asChild>
9
+ <ul role="status" aria-label={label}>
10
+ {[0, 1, 2].map((row) => (
11
+ <PanelRow
12
+ asChild
13
+ className="justify-start gap-cluster hover:bg-background-neutral-base"
14
+ key={row}
15
+ >
16
+ <li>
17
+ <Skeleton className="h-16 w-140" />
18
+ <Skeleton className="h-16 w-96" />
19
+ <Skeleton className="ml-auto h-14 w-80 shrink-0" />
20
+ </li>
21
+ </PanelRow>
22
+ ))}
23
+ </ul>
24
+ </PanelBody>
25
+ </Panel>
21
26
  );
22
27
  }
23
-
24
- export function StoreSurface({
25
- className,
26
- children,
27
- }: {
28
- className?: string;
29
- children: React.ReactNode;
30
- }) {
31
- return <div className={cn(STORE_SURFACE_CLASS, className)}>{children}</div>;
32
- }
@@ -8,6 +8,7 @@ import {
8
8
  } from '@shipfox/react-ui/dropdown-menu';
9
9
  import {EmptyState} from '@shipfox/react-ui/empty-state';
10
10
  import {Modal, ModalContent, ModalHeader, ModalTitle} from '@shipfox/react-ui/modal';
11
+ import {Panel} from '@shipfox/react-ui/panel';
11
12
  import {RelativeTime, RelativeTimeProvider} from '@shipfox/react-ui/relative-time';
12
13
  import {
13
14
  Table,
@@ -26,7 +27,7 @@ import {copyKeyName} from './copy-key.js';
26
27
  import {DeleteEntryDialog} from './delete-entry-dialog.js';
27
28
  import {secretsErrorToFormError} from './form-errors.js';
28
29
  import {SecretForm} from './secret-form.js';
29
- import {StoreRowsSkeleton, StoreSurface} from './store-section-shell.js';
30
+ import {StoreRowsSkeleton} from './store-section-shell.js';
30
31
 
31
32
  const SECRETS_DESCRIPTION =
32
33
  'Encrypted, write-only values for sensitive data like API keys, tokens, and passwords.';
@@ -70,28 +71,29 @@ export function WorkspaceSecretsSection({workspaceId}: {workspaceId: string}) {
70
71
  {secretsQuery.isPending ? <StoreRowsSkeleton label="Loading secrets" /> : null}
71
72
 
72
73
  {secretsQuery.isError && secretsQuery.data === undefined ? (
73
- <StoreSurface className="px-row">
74
- <QueryLoadError query={secretsQuery} subject="secrets" />
75
- </StoreSurface>
74
+ <Panel>
75
+ <QueryLoadError query={secretsQuery} subject="secrets" variant="panel" />
76
+ </Panel>
76
77
  ) : null}
77
78
 
78
79
  {secretsQuery.data !== undefined && secrets.length === 0 ? (
79
- <StoreSurface className="px-row">
80
+ <Panel>
80
81
  <EmptyState
81
82
  icon="keyLine"
82
83
  title="No secrets yet"
83
84
  description={EMPTY_SECRETS_DESCRIPTION}
85
+ variant="panel"
84
86
  action={
85
87
  <Button size="sm" onClick={() => setFormState({mode: 'create'})}>
86
88
  Create secret
87
89
  </Button>
88
90
  }
89
91
  />
90
- </StoreSurface>
92
+ </Panel>
91
93
  ) : null}
92
94
 
93
95
  {secrets.length > 0 ? (
94
- <StoreSurface>
96
+ <Panel>
95
97
  <Table>
96
98
  <TableHeader>
97
99
  <TableRow>
@@ -114,7 +116,7 @@ export function WorkspaceSecretsSection({workspaceId}: {workspaceId: string}) {
114
116
  ))}
115
117
  </TableBody>
116
118
  </Table>
117
- </StoreSurface>
119
+ </Panel>
118
120
  ) : null}
119
121
  </section>
120
122
 
@@ -8,6 +8,7 @@ import {
8
8
  } from '@shipfox/react-ui/dropdown-menu';
9
9
  import {EmptyState} from '@shipfox/react-ui/empty-state';
10
10
  import {Modal, ModalContent, ModalHeader, ModalTitle} from '@shipfox/react-ui/modal';
11
+ import {Panel} from '@shipfox/react-ui/panel';
11
12
  import {RelativeTime, RelativeTimeProvider} from '@shipfox/react-ui/relative-time';
12
13
  import {
13
14
  Table,
@@ -25,7 +26,7 @@ import {useDeleteVariableMutation, useVariablesQuery} from '#hooks/api/variables
25
26
  import {copyKeyName} from './copy-key.js';
26
27
  import {DeleteEntryDialog} from './delete-entry-dialog.js';
27
28
  import {secretsErrorToFormError} from './form-errors.js';
28
- import {StoreRowsSkeleton, StoreSurface} from './store-section-shell.js';
29
+ import {StoreRowsSkeleton} from './store-section-shell.js';
29
30
  import {VariableForm} from './variable-form.js';
30
31
 
31
32
  const VARIABLES_DESCRIPTION =
@@ -70,28 +71,29 @@ export function WorkspaceVariablesSection({workspaceId}: {workspaceId: string})
70
71
  {variablesQuery.isPending ? <StoreRowsSkeleton label="Loading variables" /> : null}
71
72
 
72
73
  {variablesQuery.isError && variablesQuery.data === undefined ? (
73
- <StoreSurface className="px-row">
74
- <QueryLoadError query={variablesQuery} subject="variables" />
75
- </StoreSurface>
74
+ <Panel>
75
+ <QueryLoadError query={variablesQuery} subject="variables" variant="panel" />
76
+ </Panel>
76
77
  ) : null}
77
78
 
78
79
  {variablesQuery.data !== undefined && variables.length === 0 ? (
79
- <StoreSurface className="px-row">
80
+ <Panel>
80
81
  <EmptyState
81
82
  icon="bracesLine"
82
83
  title="No variables yet"
83
84
  description={EMPTY_VARIABLES_DESCRIPTION}
85
+ variant="panel"
84
86
  action={
85
87
  <Button size="sm" onClick={() => setFormState({mode: 'create'})}>
86
88
  Create variable
87
89
  </Button>
88
90
  }
89
91
  />
90
- </StoreSurface>
92
+ </Panel>
91
93
  ) : null}
92
94
 
93
95
  {variables.length > 0 ? (
94
- <StoreSurface>
96
+ <Panel>
95
97
  <Table>
96
98
  <TableHeader>
97
99
  <TableRow>
@@ -114,7 +116,7 @@ export function WorkspaceVariablesSection({workspaceId}: {workspaceId: string})
114
116
  ))}
115
117
  </TableBody>
116
118
  </Table>
117
- </StoreSurface>
119
+ </Panel>
118
120
  ) : null}
119
121
  </section>
120
122
 
@@ -2,5 +2,6 @@ import {defineRoute, useActiveWorkspace} from '@shipfox/client-shell/runtime';
2
2
  import {WorkspaceSecretsSection} from '#index.js';
3
3
 
4
4
  export default defineRoute({
5
+ staticData: {frame: 'content'},
5
6
  component: () => <WorkspaceSecretsSection workspaceId={useActiveWorkspace().id} />,
6
7
  });
@@ -2,5 +2,6 @@ import {defineRoute, useActiveWorkspace} from '@shipfox/client-shell/runtime';
2
2
  import {WorkspaceVariablesSection} from '#index.js';
3
3
 
4
4
  export default defineRoute({
5
+ staticData: {frame: 'content'},
5
6
  component: () => <WorkspaceVariablesSection workspaceId={useActiveWorkspace().id} />,
6
7
  });