MCPcopy Create free account
hub / github.com/tinyplex/tinybase / Inspector

Function Inspector

src/ui-solid-inspector/index.tsx:1164–1198  ·  view source on GitHub ↗
(props: InspectorProps)

Source from the content-addressed store, hash-verified

1162};
1163
1164export const Inspector = (props: InspectorProps) => {
1165 const position = props.position ?? 'right';
1166 const open = props.open ?? false;
1167 const values = {
1168 position: getInitialPosition(position),
1169 open: !!open,
1170 };
1171 const s = useCreateStore(createStore);
1172 const [ready, setReady] = createSignal(false);
1173
1174 useCreatePersister(
1175 s,
1176 (s) => createSessionPersister(s, UNIQUE_ID),
1177 async (persister) => {
1178 await persister.load([{}, values]);
1179 await persister.startAutoSave();
1180 setReady(true);
1181 },
1182 (persister) => persister.destroy(),
1183 );
1184
1185 return (
1186 <>
1187 {ready() ? (
1188 <aside id={UNIQUE_ID} style={{'--hue': props.hue ?? 270}}>
1189 <Nub s={s()} />
1190 <Panel s={s()} />
1191 </aside>
1192 ) : (
1193 EMPTY_STRING
1194 )}
1195 <style>{APP_STYLESHEET}</style>
1196 </>
1197 );
1198};

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…