MCPcopy Index your code
hub / github.com/tinyplex/tinybase / Inspector

Function Inspector

src/ui-react-inspector/index.tsx:11–43  ·  view source on GitHub ↗
({
  position = 'right',
  open = false,
  hue = 270,
}: InspectorProps)

Source from the content-addressed store, hash-verified

9import {Panel} from './Panel.tsx';
10
11export const Inspector = ({
12 position = 'right',
13 open = false,
14 hue = 270,
15}: InspectorProps) => {
16 const s = useCreateStore(createStore); // The inspector's Store throughout.
17
18 useCreatePersister(
19 s,
20 (s) => createSessionPersister(s, UNIQUE_ID),
21 undefined,
22 async (persister) => {
23 await persister.load([
24 {},
25 {
26 position: getInitialPosition(position),
27 open: !!open,
28 },
29 ]);
30 await persister.startAutoSave();
31 },
32 );
33
34 return (
35 <>
36 <aside id={UNIQUE_ID} style={{'--hue': hue} as CSSProperties}>
37 <Nub s={s} />
38 <Panel s={s} />
39 </aside>
40 <style>{APP_STYLESHEET}</style>
41 </>
42 );
43};

Callers

nothing calls this directly

Calls 6

useCreateStoreFunction · 0.90
useCreatePersisterFunction · 0.90
getInitialPositionFunction · 0.90
loadMethod · 0.65
startAutoSaveMethod · 0.65
createSessionPersisterFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…