@ioai/lerobot-studio 1.2.1 → 1.3.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/CHANGELOG.md +7 -0
- package/dist-lib/{DockviewLayout-CUu7GYs2.js → DockviewLayout-CF0ewhDR.js} +3170 -3744
- package/dist-lib/lerobot.d.ts +118 -0
- package/dist-lib/lerobot.es.js +2727 -1987
- package/dist-lib/{react-window-Bqez0RiF.js → react-window-DqEyepq_.js} +1640 -1066
- package/package.json +1 -1
package/dist-lib/lerobot.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { default as React_2 } from 'react';
|
|
8
|
+
import * as React_3 from 'react';
|
|
8
9
|
|
|
9
10
|
/** Create a viewer data source for a local ZIP, TAR, or TAR.GZ archive. */
|
|
10
11
|
export declare function createArchiveDataSourceFromFile(file: File): DataSource;
|
|
@@ -16,6 +17,9 @@ export declare function createArchiveDataSourceFromFile(file: File): DataSource;
|
|
|
16
17
|
*/
|
|
17
18
|
export declare function createArchiveDataSourceFromUrl(url: string): DataSource;
|
|
18
19
|
|
|
20
|
+
/** Create a viewer data source from a File System Access directory handle. */
|
|
21
|
+
export declare function createDirectoryDataSource(handle: FileSystemDirectoryHandle): DataSource;
|
|
22
|
+
|
|
19
23
|
/**
|
|
20
24
|
* Create a viewer data source from a host-owned list of per-file HTTP(S) URLs.
|
|
21
25
|
*
|
|
@@ -25,6 +29,20 @@ export declare function createArchiveDataSourceFromUrl(url: string): DataSource;
|
|
|
25
29
|
*/
|
|
26
30
|
export declare function createRemoteManifestDataSource(files: RemoteFileEntry[]): DataSource;
|
|
27
31
|
|
|
32
|
+
/** Tabbed picker for local directory, local archive, or remote archive URL. */
|
|
33
|
+
export declare const DatasetSourceSelector: React_2.FC<DatasetSourceSelectorProps>;
|
|
34
|
+
|
|
35
|
+
/** Picker for a local directory, local archive, or remote archive URL. */
|
|
36
|
+
export declare interface DatasetSourceSelectorProps {
|
|
37
|
+
onOpenDirectory: () => void;
|
|
38
|
+
onOpenLocalArchive: () => void;
|
|
39
|
+
onOpenRemoteArchive: (url?: string) => void;
|
|
40
|
+
requested?: ParsedSourceUrl | null;
|
|
41
|
+
onRequestUrl?: (rawUrl: string | null, mode: 'push' | 'replace') => void;
|
|
42
|
+
onRestoreFromUrl?: (requested: ParsedSourceUrl) => void;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
28
46
|
/** Browser-readable storage abstraction consumed by the viewer. */
|
|
29
47
|
export declare interface DataSource {
|
|
30
48
|
/** Return whether a logical dataset path exists. */
|
|
@@ -47,8 +65,50 @@ export declare interface DataSource {
|
|
|
47
65
|
invalidateObjectUrl?(path: string): void | Promise<void>;
|
|
48
66
|
}
|
|
49
67
|
|
|
68
|
+
/** A dropped directory entry with a relative path. */
|
|
69
|
+
export declare interface DirectoryFile {
|
|
70
|
+
file: File;
|
|
71
|
+
path: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Callbacks for window-level file and folder drop (and file paste). */
|
|
75
|
+
export declare interface DragAndDropCallbacks {
|
|
76
|
+
onFile: (file: File) => void;
|
|
77
|
+
onDirectoryHandle?: (handle: FileSystemDirectoryHandle) => void;
|
|
78
|
+
onDirectoryFiles?: (files: DirectoryFile[]) => void;
|
|
79
|
+
onUnresolvedDirectory?: (name: string) => void;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @deprecated Prefer LeRobotStudioProvider */
|
|
83
|
+
export declare const LeRobotProvider: React_2.FC<LeRobotStudioProviderProps>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Shared theme, language, and dataset context for the viewer and a custom welcome page.
|
|
87
|
+
*/
|
|
88
|
+
export declare const LeRobotStudioProvider: React_2.FC<LeRobotStudioProviderProps>;
|
|
89
|
+
|
|
90
|
+
export declare interface LeRobotStudioProviderProps {
|
|
91
|
+
theme?: 'light' | 'dark' | 'system';
|
|
92
|
+
language?: string;
|
|
93
|
+
className?: string;
|
|
94
|
+
children: React_2.ReactNode;
|
|
95
|
+
/** When true, render the shared Sonner toaster inside the studio root. @defaultValue true */
|
|
96
|
+
showToaster?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* When true (default), wrap children in a scoped root for CSS and portals.
|
|
99
|
+
* Set false when the host page already provides its own layout wrapper.
|
|
100
|
+
*/
|
|
101
|
+
wrapRoot?: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
50
104
|
export declare const LeRobotViewer: React_2.FC<LeRobotViewerProps>;
|
|
51
105
|
|
|
106
|
+
/** Viewer without the provider wrapper; render inside `LeRobotStudioProvider`. */
|
|
107
|
+
export declare function LeRobotViewerContent({ dataSource, showSidebar, showPlaybackBar, onFatalError, enableKeyboardShortcuts, onBack, onExport, }: Omit<LeRobotViewerProps, 'theme' | 'language' | 'className'> & {
|
|
108
|
+
showSidebar: boolean;
|
|
109
|
+
showPlaybackBar: boolean;
|
|
110
|
+
}): React_2.JSX.Element | null;
|
|
111
|
+
|
|
52
112
|
/** A fatal viewer error that requires host action or an explicit retry. */
|
|
53
113
|
export declare interface LeRobotViewerError {
|
|
54
114
|
/** Machine-readable category. */
|
|
@@ -97,6 +157,34 @@ export declare interface LeRobotViewerProps {
|
|
|
97
157
|
/** A phase reported while a data source reads or prepares content. */
|
|
98
158
|
export declare type LoadingPhase = 'download' | 'index' | 'gunzip' | 'read';
|
|
99
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Domain table pagination composed from official shadcn pagination primitives.
|
|
162
|
+
*/
|
|
163
|
+
export declare function Pagination({ count, page, onPageChange, rowsPerPage, onRowsPerPageChange, rowsPerPageOptions, className, }: PaginationProps): React_3.JSX.Element;
|
|
164
|
+
|
|
165
|
+
export declare interface PaginationProps {
|
|
166
|
+
count: number;
|
|
167
|
+
page: number;
|
|
168
|
+
onPageChange: (event: unknown, newPage: number) => void;
|
|
169
|
+
rowsPerPage: number;
|
|
170
|
+
onRowsPerPageChange: (event: React_3.ChangeEvent<HTMLSelectElement>) => void;
|
|
171
|
+
rowsPerPageOptions?: number[];
|
|
172
|
+
className?: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Parsed `?url=` intent for restoring a previous local or remote source. */
|
|
176
|
+
export declare interface ParsedSourceUrl {
|
|
177
|
+
kind: SourceKind;
|
|
178
|
+
/** Decoded raw ?url= value */
|
|
179
|
+
raw: string;
|
|
180
|
+
/** UI hint (e.g. local label) */
|
|
181
|
+
hint?: string;
|
|
182
|
+
/** sample:// id */
|
|
183
|
+
sampleId?: string;
|
|
184
|
+
/** IndexedDB has a restorable handle */
|
|
185
|
+
restorable?: boolean;
|
|
186
|
+
}
|
|
187
|
+
|
|
100
188
|
/** Receives data-source progress updates. */
|
|
101
189
|
export declare type ProgressHandler = (info: ProgressInfo) => void;
|
|
102
190
|
|
|
@@ -124,4 +212,34 @@ export declare interface RemoteFileEntry {
|
|
|
124
212
|
sizeBytes?: number | null;
|
|
125
213
|
}
|
|
126
214
|
|
|
215
|
+
/** A sample dataset shown as a card on a welcome page. */
|
|
216
|
+
export declare interface SampleDataset {
|
|
217
|
+
id: string;
|
|
218
|
+
name: string;
|
|
219
|
+
description: string;
|
|
220
|
+
url?: string;
|
|
221
|
+
version?: 'v2' | 'v3';
|
|
222
|
+
title?: string;
|
|
223
|
+
coverImageUrl?: string;
|
|
224
|
+
previewVideoUrl?: string;
|
|
225
|
+
archiveUrl?: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** Cover card for a sample dataset or similar list entry. */
|
|
229
|
+
export declare const SampleDatasetCard: React_2.FC<SampleDatasetCardProps>;
|
|
230
|
+
|
|
231
|
+
/** Cover card for a sample dataset or similar list entry. */
|
|
232
|
+
export declare interface SampleDatasetCardProps {
|
|
233
|
+
sample: SampleDataset;
|
|
234
|
+
onSelect: (sample: SampleDataset) => void | Promise<void>;
|
|
235
|
+
fallbackImageUrl?: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare type SourceKind = 'remoteArchive' | 'localArchive' | 'directory' | 'sample' | 'unknown';
|
|
239
|
+
|
|
240
|
+
/** Window-level drag-and-drop (and file paste) for local archives and directories. */
|
|
241
|
+
export declare function useDragAndDrop(callbacks: DragAndDropCallbacks): {
|
|
242
|
+
isDragging: boolean;
|
|
243
|
+
};
|
|
244
|
+
|
|
127
245
|
export { }
|