API index and search · Build metadata
@rindle/react-devtools
0.0.0 · Public export map; development manifest version (0.0.0).
attachDevtools
FunctionDeclaration · Source: packages/devtools/src/global.ts:73 · Supporting declarations
Attach a devtools pane to a running client (DEBUG-TOOLS-BROWSER-DESIGN §6.2). Call this ONLY in a
dev build (e.g. behind import.meta.env.DEV with a dynamic import("@rindle/devtools")) so the
pane, its core, and this registration tree-shake out of production. Returns the {@link DevtoolsCore}
(also discoverable via {@link getDevtoolsHub}); call core.detach() to unwind.
export declare function attachDevtools(target: DevtoolsTarget, opts?: DevtoolsCoreOptions): DevtoolsCore;DevtoolsCore
ClassDeclaration · Source: packages/devtools/src/core.ts:44 · Supporting declarations
export declare class DevtoolsCore {
private readonly store;
private readonly backend?;
private readonly detachStore;
private readonly detachServerDeltas?;
private readonly hasServerDeltaTap;
private readonly timelineCap;
private readonly deltaCap;
private readonly sampleRows;
private readonly autoFlush;
private readonly now;
private readonly pollHandle?;
private readonly timeline;
private readonly order;
/** The pending keys seen at the previous recompute — the diff basis for lifecycle transitions. */
private prevPendingKeys;
private deltas;
private deltaSeq;
/** Set by a `batch` delta, consumed by the next recompute: did view churn coincide with a
* confirmation this turn? (the §4.1 snap-back heuristic). */
private churnSeen;
private queries;
private optimistic?;
private readonly listeners;
private dirty;
private flushScheduled;
private snapshot;
/** Optional deregistration from the global hub (set by {@link attachDevtools}). */
onDetach?: () => void;
constructor(target: DevtoolsTarget, opts?: DevtoolsCoreOptions);
/** The current read-model. Reference-stable between updates (rebuilt only on recompute), so it is
* safe to feed a `useSyncExternalStore`-style binding. */
getState(): DevtoolsState;
/** Subscribe to updates; fires immediately with the current state, then after each recompute. */
subscribe(listener: () => void): () => void;
/** Force a synchronous recompute (also used by the safety-net poll and by tests). */
refresh(): void;
/** Clear the delta stream ring (a panel "clear" affordance). */
clearDeltas(): void;
/** Drop every SETTLED timeline row (confirmed/dropped), keeping live pending ones + the deltas. */
clearHistory(): void;
/** Detach from the client: stop the poll, drop the store tap, deregister from the global hub. */
detach(): void;
private attachServerDeltas;
private onStoreDelta;
private onServerDelta;
private onResultType;
private markDirty;
private flush;
private recompute;
/** Reconstruct the fork/rebase lifecycle by diffing this pending snapshot against the previous
* one (DEBUG-TOOLS-BROWSER-DESIGN §4.1): new keys → invoked; vanished keys → confirmed (mid ≤
* confirmedLmid) or dropped; a fold's `f:<foldKey>` → `m:<mid>` transition is linked, not double
* counted. */
private reconcileTimeline;
private rebuildQueries;
private pushServerDelta;
private pushChangeDelta;
private pushNormalizedDelta;
private appendDelta;
private addEntry;
private renameEntry;
}DevtoolsState
InterfaceDeclaration · Source: packages/devtools/src/types.ts:154 · Supporting declarations
The whole devtools snapshot a panel renders. Reference-stable arrays between updates where the
underlying data did not change is NOT guaranteed — panels should treat each getState() as fresh.
export interface DevtoolsState {
/** Newest-last mutation timeline (capped). */
timeline: TimelineEntry[];
/** Every live materialized view. */
queries: QueryEntry[];
/** Newest-last delta stream ring (capped). */
deltas: DeltaEntry[];
/** The raw optimistic-loop snapshot, when the backend exposes one (a "loop" summary line). */
optimistic?: OptimisticInspect;
capabilities: {
optimistic: boolean;
};
}getDevtoolsCore
FunctionDeclaration · Source: packages/devtools/src/global.ts:64 · Supporting declarations
The most recently attached core, or undefined — the common single-app convenience a panel uses.
export declare function getDevtoolsCore(): DevtoolsCore | undefined;getDevtoolsHub
FunctionDeclaration · Source: packages/devtools/src/global.ts:58 · Supporting declarations
Get (creating on first use) the global devtools hub. A panel calls this to discover attached
clients; it is safe to call before any attachDevtools.
export declare function getDevtoolsHub(): DevtoolsHub;RindleDevtools
FunctionDeclaration · Source: packages/react-devtools/src/index.ts:36 · Supporting declarations
The floating Rindle devtools panel. Renders just a launcher until a client is attached via
attachDevtools(app).
export declare function RindleDevtools({ core: explicit, defaultOpen }: RindleDevtoolsProps): ReactNode;RindleDevtoolsProps
InterfaceDeclaration · Source: packages/react-devtools/src/index.ts:26 · Supporting declarations
export interface RindleDevtoolsProps {
/** Bind to a specific core. Omit to auto-discover the most recently attached client via the
* global hub (the common case). */
core?: DevtoolsCore;
/** Open the panel on first mount. Default false (starts as the launcher button). */
defaultOpen?: boolean;
}