@vention/machine-apps-components 1.31.10 → 1.32.1

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.
@@ -0,0 +1,4 @@
1
+ export * from "../lib/flex-container/flex-container";
2
+ export * from "../lib/load-state/load-state";
3
+ export * from "../lib/page-loading/page-loading";
4
+ export * from "../lib/page-load-error/page-load-error";
package/src/index.d.ts CHANGED
@@ -12,6 +12,9 @@ export * from "./lib/bottom-nav-bar/bottom-nav-bar";
12
12
  export type { BottomNavBarItemProps } from "./lib/bottom-nav-bar/bottom-nav-bar-item";
13
13
  export * from "./lib/bottom-nav-bar/icon-badge-button";
14
14
  export * from "./lib/flex-container/flex-container";
15
+ export * from "./lib/load-state/load-state";
16
+ export * from "./lib/page-loading/page-loading";
17
+ export * from "./lib/page-load-error/page-load-error";
15
18
  export * from "./lib/sidebar/sidebar";
16
19
  export type { SidebarItem, SidebarProps, SidebarVariant } from "./lib/sidebar/sidebar";
17
20
  export * from "./lib/logs/logs-table";
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from "react";
2
+ type LoadStateProps = {
3
+ isLoading: boolean;
4
+ isError: boolean;
5
+ setupError?: string;
6
+ onRetry: () => void;
7
+ isEmpty: boolean;
8
+ errorText: string;
9
+ emptyText: string;
10
+ retryText: string;
11
+ children: ReactNode;
12
+ };
13
+ /**
14
+ * Shows a list loaded from the machine, or why it can't:
15
+ *
16
+ * loading ─► a spinner
17
+ * setup error ─► errorText and the backend's message
18
+ * other error ─► errorText and a Retry button
19
+ * empty ─► emptyText
20
+ * otherwise ─► children
21
+ */
22
+ export declare const LoadState: ({ isLoading, isError, setupError, onRetry, isEmpty, errorText, emptyText, retryText, children, }: LoadStateProps) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,8 @@
1
+ type PageLoadErrorProps = {
2
+ message: string;
3
+ actionText: string;
4
+ onAction: () => void;
5
+ };
6
+ /** A full-page error with one action, e.g. back to the first page. */
7
+ export declare const PageLoadError: ({ message, actionText, onAction }: PageLoadErrorProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare const PageLoading: () => import("react/jsx-runtime").JSX.Element;