@camstack/ui-library 0.1.49 → 0.1.51
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/dist/composites/copy-button.d.ts +12 -0
- package/dist/composites/device-export-panel.d.ts +16 -0
- package/dist/composites/error-box.d.ts +19 -0
- package/dist/composites/index.d.ts +7 -0
- package/dist/composites/qr-code.d.ts +12 -0
- package/dist/generated/system-hooks.d.ts +18 -0
- package/dist/index.cjs +2103 -448
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1645 -4
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface CopyButtonProps {
|
|
3
|
+
/** String copied to the clipboard when the button is pressed. */
|
|
4
|
+
readonly value: string;
|
|
5
|
+
/** Optional visible label rendered next to the icon. Icon-only when omitted. */
|
|
6
|
+
readonly label?: string;
|
|
7
|
+
/** Extra classes merged onto the button. */
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
/** Disable the button (e.g. nothing to copy). */
|
|
10
|
+
readonly disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function CopyButton({ value, label, className, disabled }: CopyButtonProps): ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface DeviceExportPanelProps {
|
|
3
|
+
/**
|
|
4
|
+
* Addon id of the export addon whose surface is rendered. Used for
|
|
5
|
+
* labelling and to scope cache invalidation; the underlying cap
|
|
6
|
+
* router resolves the (hub-resident) provider by `nodeId`.
|
|
7
|
+
*/
|
|
8
|
+
readonly addonId: string;
|
|
9
|
+
/** Optional callback to open a device-details page. */
|
|
10
|
+
readonly onOpenDevice?: (deviceId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic device-export panel. Addon-agnostic — only the `device-export`
|
|
14
|
+
* cap drives it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function DeviceExportPanel({ addonId, onOpenDevice }: DeviceExportPanelProps): ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ErrorBoxVariant = 'danger' | 'warning';
|
|
3
|
+
export interface ErrorBoxProps {
|
|
4
|
+
/** The error message. Accepts a string or richer content. */
|
|
5
|
+
message: ReactNode;
|
|
6
|
+
/** Optional bold headline shown above the message. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional retry handler. When supplied (and no custom `action` is
|
|
10
|
+
* given) a compact "Retry" button is rendered.
|
|
11
|
+
*/
|
|
12
|
+
onRetry?: () => void;
|
|
13
|
+
/** Custom action slot — overrides the default retry button. */
|
|
14
|
+
action?: ReactNode;
|
|
15
|
+
/** Visual flavor. Defaults to `danger`. */
|
|
16
|
+
variant?: ErrorBoxVariant;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function ErrorBox({ message, title, onRetry, action, variant, className, }: ErrorBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,7 @@ export * from './version-badge';
|
|
|
17
17
|
export * from './form-field';
|
|
18
18
|
export * from './page-header';
|
|
19
19
|
export * from './empty-state';
|
|
20
|
+
export * from './error-box';
|
|
20
21
|
export * from './confirm-dialog';
|
|
21
22
|
export * from './stat-card';
|
|
22
23
|
export * from './key-value-list';
|
|
@@ -61,6 +62,12 @@ export { StreamPanel } from './stream-panel';
|
|
|
61
62
|
export type { StreamPanelProps, StreamChoice, StreamStats } from './stream-panel';
|
|
62
63
|
export { StreamBrokerSelector } from './stream-broker-selector';
|
|
63
64
|
export type { StreamBrokerSelectorProps } from './stream-broker-selector';
|
|
65
|
+
export { DeviceExportPanel } from './device-export-panel';
|
|
66
|
+
export type { DeviceExportPanelProps } from './device-export-panel';
|
|
67
|
+
export { QrCode } from './qr-code';
|
|
68
|
+
export type { QrCodeProps } from './qr-code';
|
|
69
|
+
export { CopyButton } from './copy-button';
|
|
70
|
+
export type { CopyButtonProps } from './copy-button';
|
|
64
71
|
export { LoginForm } from './login-form';
|
|
65
72
|
export type { LoginFormProps } from './login-form';
|
|
66
73
|
export { DevShell, useDevShell } from './dev-shell';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface QrCodeProps {
|
|
3
|
+
/** The string encoded into the QR. Empty/whitespace renders nothing. */
|
|
4
|
+
readonly value: string;
|
|
5
|
+
/** Rendered width/height in CSS pixels. Defaults to 192. */
|
|
6
|
+
readonly size?: number;
|
|
7
|
+
/** Extra classes merged onto the wrapper. */
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
/** Accessible label for the generated QR. */
|
|
10
|
+
readonly alt?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function QrCode({ value, size, className, alt }: QrCodeProps): ReactElement | null;
|
|
@@ -33,6 +33,14 @@ export declare const useAddonsRollbackPackage: typeof trpc.addons.rollbackPackag
|
|
|
33
33
|
export declare const useAddonsForceRefresh: typeof trpc.addons.forceRefresh.useMutation;
|
|
34
34
|
/** Generated alias around `trpc.addons.restartServer.useMutation`. */
|
|
35
35
|
export declare const useAddonsRestartServer: typeof trpc.addons.restartServer.useMutation;
|
|
36
|
+
/** Generated alias around `trpc.addons.getLastRestart.useQuery`. */
|
|
37
|
+
export declare const useAddonsGetLastRestart: typeof trpc.addons.getLastRestart.useQuery;
|
|
38
|
+
/** Generated alias around `trpc.addons.listFrameworkPackages.useQuery`. */
|
|
39
|
+
export declare const useAddonsListFrameworkPackages: typeof trpc.addons.listFrameworkPackages.useQuery;
|
|
40
|
+
/** Generated alias around `trpc.addons.listCapabilityProviders.useQuery`. */
|
|
41
|
+
export declare const useAddonsListCapabilityProviders: typeof trpc.addons.listCapabilityProviders.useQuery;
|
|
42
|
+
/** Generated alias around `trpc.addons.updateFrameworkPackage.useMutation`. */
|
|
43
|
+
export declare const useAddonsUpdateFrameworkPackage: typeof trpc.addons.updateFrameworkPackage.useMutation;
|
|
36
44
|
/** Generated alias around `trpc.addons.getVersions.useQuery`. */
|
|
37
45
|
export declare const useAddonsGetVersions: typeof trpc.addons.getVersions.useQuery;
|
|
38
46
|
/** Generated alias around `trpc.addons.restartAddon.useMutation`. */
|
|
@@ -411,6 +419,8 @@ export declare const useMeshNetworkJoin: typeof trpc.meshNetwork.join.useMutatio
|
|
|
411
419
|
export declare const useMeshNetworkStartLogin: typeof trpc.meshNetwork.startLogin.useMutation;
|
|
412
420
|
/** Generated alias around `trpc.meshNetwork.leave.useMutation`. */
|
|
413
421
|
export declare const useMeshNetworkLeave: typeof trpc.meshNetwork.leave.useMutation;
|
|
422
|
+
/** Generated alias around `trpc.meshNetwork.logout.useMutation`. */
|
|
423
|
+
export declare const useMeshNetworkLogout: typeof trpc.meshNetwork.logout.useMutation;
|
|
414
424
|
/** Generated alias around `trpc.meshNetwork.listPeers.useQuery`. */
|
|
415
425
|
export declare const useMeshNetworkListPeers: typeof trpc.meshNetwork.listPeers.useQuery;
|
|
416
426
|
/** Generated alias around `trpc.meshNetwork.testConnection.useMutation`. */
|
|
@@ -421,6 +431,12 @@ export declare const useMeshOrchestratorListProviders: typeof trpc.meshOrchestra
|
|
|
421
431
|
export declare const useMeshOrchestratorJoinProvider: typeof trpc.meshOrchestrator.joinProvider.useMutation;
|
|
422
432
|
/** Generated alias around `trpc.meshOrchestrator.leaveProvider.useMutation`. */
|
|
423
433
|
export declare const useMeshOrchestratorLeaveProvider: typeof trpc.meshOrchestrator.leaveProvider.useMutation;
|
|
434
|
+
/** Generated alias around `trpc.meshOrchestrator.startLoginProvider.useMutation`. */
|
|
435
|
+
export declare const useMeshOrchestratorStartLoginProvider: typeof trpc.meshOrchestrator.startLoginProvider.useMutation;
|
|
436
|
+
/** Generated alias around `trpc.meshOrchestrator.logoutProvider.useMutation`. */
|
|
437
|
+
export declare const useMeshOrchestratorLogoutProvider: typeof trpc.meshOrchestrator.logoutProvider.useMutation;
|
|
438
|
+
/** Generated alias around `trpc.meshOrchestrator.listProviderPeers.useQuery`. */
|
|
439
|
+
export declare const useMeshOrchestratorListProviderPeers: typeof trpc.meshOrchestrator.listProviderPeers.useQuery;
|
|
424
440
|
/** Generated alias around `trpc.metricsProvider.collectSnapshot.useQuery`. */
|
|
425
441
|
export declare const useMetricsProviderCollectSnapshot: typeof trpc.metricsProvider.collectSnapshot.useQuery;
|
|
426
442
|
/** Generated alias around `trpc.metricsProvider.getCached.useQuery`. */
|
|
@@ -505,6 +521,8 @@ export declare const useNodesShutdownNode: typeof trpc.nodes.shutdownNode.useMut
|
|
|
505
521
|
export declare const useNodesRenameNode: typeof trpc.nodes.renameNode.useMutation;
|
|
506
522
|
/** Generated alias around `trpc.nodes.clusterAddonStatus.useQuery`. */
|
|
507
523
|
export declare const useNodesClusterAddonStatus: typeof trpc.nodes.clusterAddonStatus.useQuery;
|
|
524
|
+
/** Generated alias around `trpc.nodes.getNodeAddons.useQuery`. */
|
|
525
|
+
export declare const useNodesGetNodeAddons: typeof trpc.nodes.getNodeAddons.useQuery;
|
|
508
526
|
/** Generated alias around `trpc.nodes.setProcessLogLevel.useMutation`. */
|
|
509
527
|
export declare const useNodesSetProcessLogLevel: typeof trpc.nodes.setProcessLogLevel.useMutation;
|
|
510
528
|
/** Generated alias around `trpc.nodes.executeQuery.useMutation`. */
|