-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathindex.ts
More file actions
69 lines (59 loc) · 2.28 KB
/
Copy pathindex.ts
File metadata and controls
69 lines (59 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* Public entry point for embedding the Inspect log viewer into an external application
* by consuming this package's **source** directly — the `<App />` component, client
* APIs, store initializer, and selection hooks needed to host the viewer in-process.
*
* Disclaimer: semantic versioning is NOT used. This surface evolves with the host
* application's needs. Consumers pinning to a revision must expect breaking changes
* at any time and adapt accordingly.
*/
// Main React App Component
export { App } from "./app/App";
// Client APIs
export { clientApi } from "./client/api/client-api";
export { default as simpleHttpApi } from "./client/api/static-http/api-static-http.ts";
export { viewServerApi as createViewServerApi } from "./client/api/view-server/api-view-server.ts";
// Embedder api injection — install a per-dir api factory before initializing
// the store and rendering <App/>; setLogRoot re-points the viewer at a
// different dir (rebuilding the api through the same factory).
export { setApiFactory, setLogRoot } from "./app_config";
// Embedder react-query provider — wrap chrome that calls the viewer's selection
// hooks outside <App/> so they resolve the viewer's react-query client.
// useViewerReady gates that chrome until app config resolves (the hooks throw
// before then).
export { InspectQueryClientProvider, useViewerReady } from "./embed";
// Client API - Types
export type {
Capabilities,
ClientAPI,
LogViewAPI,
LogRoot,
LogContents,
LogPreview,
PendingSampleResponse,
SampleDataResponse,
} from "./client/api/types";
// Log types
export type {
EvalSet,
LogHandle,
LogFilesResponse,
} from "@tsmono/inspect-common/types";
// State Store
export { initializeStore } from "./state/store";
// Selection hooks (also usable by chrome outside RouterProvider)
export {
useSelectedScores,
useSelectedSampleSummary,
useLogSelection,
} from "./embed";
// Selection-related types
export type { SampleSummary } from "./client/api/types";
export type { ScoreLabel } from "./app/types";
// Scroll-direction hook — used by embedders to drive their own chrome
// collapse with the same hysteresis behaviour the viewer uses internally.
export {
useScrollDirection,
type UseScrollDirectionOptions,
type UseScrollDirectionResult,
} from "@tsmono/react/hooks";