@wandelbots/wandelbots-js-react-components 2.32.0-pr.feature-robot-precondition-list.372.8bd8d01 → 2.33.0-pr.feature-robot-precondition-list.372.cb78a22

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,54 @@
1
+ import type { SxProps } from "@mui/material";
2
+ import { LogStore } from "./LogStore";
3
+ export type LogPanelProps = {
4
+ /** Log store instance to use, or create one automatically if not provided */
5
+ store?: LogStore;
6
+ /** Height of the component */
7
+ height?: string | number;
8
+ /** Additional styles */
9
+ sx?: SxProps;
10
+ /** Ref to the log store for external access */
11
+ onStoreReady?: (store: LogStore) => void;
12
+ };
13
+ /**
14
+ * A complete log panel component with built-in state management.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // Simple usage with automatic state management
19
+ * function MyComponent() {
20
+ * const [logStore, setLogStore] = useState<LogStore>()
21
+ *
22
+ * return (
23
+ * <LogPanel
24
+ * height={400}
25
+ * onStoreReady={setLogStore}
26
+ * />
27
+ * )
28
+ * }
29
+ *
30
+ * // Then use the store to add messages
31
+ * logStore?.addInfo("Operation completed successfully")
32
+ * logStore?.addError("Something went wrong")
33
+ * logStore?.addWarning("Warning message")
34
+ * ```
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Usage with external store for shared state
39
+ * function MyApp() {
40
+ * const logStore = useMemo(() => new LogStore(), [])
41
+ *
42
+ * return (
43
+ * <div>
44
+ * <LogPanel store={logStore} height={300} />
45
+ * <SomeOtherComponent onError={(msg) => logStore.addError(msg)} />
46
+ * </div>
47
+ * )
48
+ * }
49
+ * ```
50
+ */
51
+ export declare const LogPanel: ((props: LogPanelProps) => import("react/jsx-runtime").JSX.Element) & {
52
+ displayName: string;
53
+ };
54
+ //# sourceMappingURL=LogPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogPanel.d.ts","sourceRoot":"","sources":["../../src/components/LogPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,MAAM,MAAM,aAAa,GAAG;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAA;CACzC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,QAAQ,WACF,aAAa;;CA2B/B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { LogLevel, LogMessage } from "./LogViewer";
2
+ export declare class LogStore {
3
+ messages: LogMessage[];
4
+ constructor();
5
+ addMessage: (message: string, level?: LogLevel) => void;
6
+ clearMessages: () => void;
7
+ addInfo: (message: string) => void;
8
+ addWarning: (message: string) => void;
9
+ addError: (message: string) => void;
10
+ }
11
+ //# sourceMappingURL=LogStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogStore.d.ts","sourceRoot":"","sources":["../../src/components/LogStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,qBAAa,QAAQ;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAK;;IAU3B,UAAU,GAAI,SAAS,MAAM,EAAE,QAAO,QAAiB,UAQtD;IAED,aAAa,aAEZ;IAED,OAAO,GAAI,SAAS,MAAM,UAEzB;IAED,UAAU,GAAI,SAAS,MAAM,UAE5B;IAED,QAAQ,GAAI,SAAS,MAAM,UAE1B;CACF"}
@@ -0,0 +1,26 @@
1
+ import type { SxProps } from "@mui/material";
2
+ export type LogLevel = "info" | "error" | "warning";
3
+ export type LogMessage = {
4
+ id: string;
5
+ timestamp: Date;
6
+ message: string;
7
+ level: LogLevel;
8
+ };
9
+ export type LogViewerProps = {
10
+ /** Log messages to display */
11
+ messages: LogMessage[];
12
+ /** Callback when clear button is clicked */
13
+ onClear?: () => void;
14
+ /** Height of the component */
15
+ height?: string | number;
16
+ /** Additional styles */
17
+ sx?: SxProps;
18
+ };
19
+ /**
20
+ * A log viewer component that displays timestamped log messages with different levels.
21
+ * Features a header with document icon and clear button, and scrollable message area.
22
+ */
23
+ export declare const LogViewer: ((props: LogViewerProps) => import("react/jsx-runtime").JSX.Element) & {
24
+ displayName: string;
25
+ };
26
+ //# sourceMappingURL=LogViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../../src/components/LogViewer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,UAAU,EAAE,CAAA;IACtB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,WACH,cAAc;;CAmQhC,CAAA"}