streetui 2.1.0 → 2.2.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/README.md +23 -17
- package/dist/bin.cjs +1 -1
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +1 -1
- package/dist/create-bin.cjs +1 -1
- package/dist/create-bin.cjs.map +1 -1
- package/dist/create-bin.js +1 -1
- package/dist/create-bin.js.map +1 -1
- package/dist/{hydration-diagnostics-Jm3qUydo.d.cts → hydration-diagnostics-CEhFie5X.d.cts} +1 -1
- package/dist/{hydration-diagnostics-Jm3qUydo.d.ts → hydration-diagnostics-CEhFie5X.d.ts} +1 -1
- package/dist/index.cjs +349 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +252 -6
- package/dist/index.d.ts +252 -6
- package/dist/index.js +343 -1
- package/dist/index.js.map +1 -1
- package/dist/{renderer-interface-CPrfslvr.d.ts → renderer-interface-CYJIOjj5.d.ts} +1 -1
- package/dist/{renderer-interface-moxwy5PA.d.cts → renderer-interface-DhgAgwa9.d.cts} +1 -1
- package/dist/{server-_kf9p9SV.d.cts → server-Lwm5W3o9.d.cts} +1 -1
- package/dist/{server-DG0tvuRt.d.ts → server-wz5X8SA9.d.ts} +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +1 -1
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +1 -1
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as Signal, d as Subscriber, U as Unsubscribe, R as ReadonlySignal, e as ResourceStatus, f as ResourceOptions, g as Resource, h as ResourceLoaderContext, A as ApplicationId, D as DiagnosticCollector, i as ApplicationGraph, G as GraphNode, C as CompiledApplication, j as HydrationDiagnosticSink, k as SemanticNodeType, P as PageDSL, T as TransitionConfig, l as ContainerDSL, m as SignalKind } from './hydration-diagnostics-
|
|
2
|
-
export { n as A11yOptions, o as AppBuilder, p as AppDSL, q as AppOptions, r as ApplicationGraphOptions, s as AsyncBoundaryBranches, B as BaseNode, t as Bindable, u as BindableString, v as BindableText, w as BoundInputOptions, x as ButtonOptions, y as CompileOptions, b as ComponentChildren, z as ComponentContext, a as ComponentDefinition, E as ComponentRender, F as ComponentSetup, b as ContainerBuilder, I as ContainerBuilderImpl, J as ContainerOptions, K as ContentDSL, L as ControlledInputOptions, M as DerivedSignal, N as Diagnostic, O as DiagnosticError, Q as DiagnosticLocation, W as DiagnosticSeverity, X as ErrorBoundaryOptions, Y as ErrorFallbackBuilder, Z as ErrorSource, _ as EventDescriptor, $ as FormBuilder, a0 as FormBuilderImpl, a1 as FormDSL, a2 as FormOptions, a3 as GraphNodeData, a4 as HandlerFn, a5 as HeadContribution, a6 as HeadEntry, a7 as HeadMetadata, a8 as HeadingOptions, H as HydrationDiagnostic, a9 as HydrationMismatchType, aa as ImageOptions, ab as InputOptions, ac as InputOptionsBase, ad as LinkDescriptor, ae as LinkOptions, af as ListBuilder, ag as ListBuilderImpl, ah as ListDSL, ai as ListOptions, aj as ListPlanEntry, ak as MetaDescriptor, al as NodeId, am as NodeMetadata, an as OverlayOptions, ao as PageBuilder, ap as PageBuilderImpl, aq as PortalOptions, ar as PropValue, as as Props, at as ReactiveConsumer, au as ReactiveSource, av as ResolvedTransition, aw as ResourceLoader, ax as SectionBuilder, ay as SectionBuilderImpl, az as SectionDSL, aA as SectionOptions, aB as SerializedGraph, aC as SerializedNode, aD as StateRef, S as StreetApp, aE as StreetUI, aF as TextOptions, aG as TextValue, V as VERSION, aH as WhenOptions, aI as batch, aJ as compile, aK as compileGraph, aL as component, aM as consoleHydrationDiagnosticSink, aN as createHydrationDiagnosticCollector, aO as createNodeId, aP as derived, aQ as effect, aR as formatDiagnostic, aS as formatHydrationDiagnostic, aT as generateApplicationId, aU as generateNodeId, aV as isBatching, aW as isComponentDefinition, aX as isHeadContribution, aY as isTransitionConfig, aZ as nextId, a_ as nodeIdPrefix, a$ as observerCount, b0 as reactiveListItemKey, b1 as reactiveListItemSignature, b2 as resetIdCounter, b3 as resolveHead, b4 as resolveTransition, b5 as resource, b6 as signal, b7 as signalKind, b8 as streetui } from './hydration-diagnostics-
|
|
3
|
-
import { L as Lifecycle, C as CleanupRegistry, D as DOMAdapter, N as NodeInstance, R as RenderContext } from './server-
|
|
4
|
-
export { H as HeadManager, a as LifecycleHook, b as LifecyclePhase, c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, e as createRenderContext, r as readState, f as renderHead, g as renderToString, s as serializeState, h as serverDOMAdapter, w as wireHeadBehavior } from './server-
|
|
5
|
-
import { R as RenderHandle, S as StreetRenderer } from './renderer-interface-
|
|
1
|
+
import { c as Signal, d as Subscriber, U as Unsubscribe, R as ReadonlySignal, e as ResourceStatus, f as ResourceOptions, g as Resource, h as ResourceLoaderContext, A as ApplicationId, D as DiagnosticCollector, i as ApplicationGraph, G as GraphNode, C as CompiledApplication, j as HydrationDiagnosticSink, k as SemanticNodeType, P as PageDSL, T as TransitionConfig, l as ContainerDSL, m as SignalKind } from './hydration-diagnostics-CEhFie5X.cjs';
|
|
2
|
+
export { n as A11yOptions, o as AppBuilder, p as AppDSL, q as AppOptions, r as ApplicationGraphOptions, s as AsyncBoundaryBranches, B as BaseNode, t as Bindable, u as BindableString, v as BindableText, w as BoundInputOptions, x as ButtonOptions, y as CompileOptions, b as ComponentChildren, z as ComponentContext, a as ComponentDefinition, E as ComponentRender, F as ComponentSetup, b as ContainerBuilder, I as ContainerBuilderImpl, J as ContainerOptions, K as ContentDSL, L as ControlledInputOptions, M as DerivedSignal, N as Diagnostic, O as DiagnosticError, Q as DiagnosticLocation, W as DiagnosticSeverity, X as ErrorBoundaryOptions, Y as ErrorFallbackBuilder, Z as ErrorSource, _ as EventDescriptor, $ as FormBuilder, a0 as FormBuilderImpl, a1 as FormDSL, a2 as FormOptions, a3 as GraphNodeData, a4 as HandlerFn, a5 as HeadContribution, a6 as HeadEntry, a7 as HeadMetadata, a8 as HeadingOptions, H as HydrationDiagnostic, a9 as HydrationMismatchType, aa as ImageOptions, ab as InputOptions, ac as InputOptionsBase, ad as LinkDescriptor, ae as LinkOptions, af as ListBuilder, ag as ListBuilderImpl, ah as ListDSL, ai as ListOptions, aj as ListPlanEntry, ak as MetaDescriptor, al as NodeId, am as NodeMetadata, an as OverlayOptions, ao as PageBuilder, ap as PageBuilderImpl, aq as PortalOptions, ar as PropValue, as as Props, at as ReactiveConsumer, au as ReactiveSource, av as ResolvedTransition, aw as ResourceLoader, ax as SectionBuilder, ay as SectionBuilderImpl, az as SectionDSL, aA as SectionOptions, aB as SerializedGraph, aC as SerializedNode, aD as StateRef, S as StreetApp, aE as StreetUI, aF as TextOptions, aG as TextValue, V as VERSION, aH as WhenOptions, aI as batch, aJ as compile, aK as compileGraph, aL as component, aM as consoleHydrationDiagnosticSink, aN as createHydrationDiagnosticCollector, aO as createNodeId, aP as derived, aQ as effect, aR as formatDiagnostic, aS as formatHydrationDiagnostic, aT as generateApplicationId, aU as generateNodeId, aV as isBatching, aW as isComponentDefinition, aX as isHeadContribution, aY as isTransitionConfig, aZ as nextId, a_ as nodeIdPrefix, a$ as observerCount, b0 as reactiveListItemKey, b1 as reactiveListItemSignature, b2 as resetIdCounter, b3 as resolveHead, b4 as resolveTransition, b5 as resource, b6 as signal, b7 as signalKind, b8 as streetui } from './hydration-diagnostics-CEhFie5X.cjs';
|
|
3
|
+
import { L as Lifecycle, C as CleanupRegistry, D as DOMAdapter, N as NodeInstance, R as RenderContext } from './server-Lwm5W3o9.cjs';
|
|
4
|
+
export { H as HeadManager, a as LifecycleHook, b as LifecyclePhase, c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, e as createRenderContext, r as readState, f as renderHead, g as renderToString, s as serializeState, h as serverDOMAdapter, w as wireHeadBehavior } from './server-Lwm5W3o9.cjs';
|
|
5
|
+
import { R as RenderHandle, S as StreetRenderer } from './renderer-interface-DhgAgwa9.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A simple reactive store built on top of signals.
|
|
@@ -2065,6 +2065,32 @@ interface InspectResourceOptions {
|
|
|
2065
2065
|
}
|
|
2066
2066
|
/** Snapshot a resource's lifecycle. Payload/message hidden unless opted in. */
|
|
2067
2067
|
declare function inspectResource(resource: ResourceLike, options?: InspectResourceOptions): ResourceInspection;
|
|
2068
|
+
/** The read-only slice of a mutation this module needs. */
|
|
2069
|
+
interface MutationLike {
|
|
2070
|
+
readonly status: ReadonlySignal<ResourceStatus>;
|
|
2071
|
+
readonly data: ReadonlySignal<unknown>;
|
|
2072
|
+
readonly error: ReadonlySignal<unknown>;
|
|
2073
|
+
readonly pending: ReadonlySignal<boolean>;
|
|
2074
|
+
}
|
|
2075
|
+
interface MutationInspection {
|
|
2076
|
+
readonly status: ResourceStatus;
|
|
2077
|
+
readonly pending: boolean;
|
|
2078
|
+
readonly hasData: boolean;
|
|
2079
|
+
readonly hasError: boolean;
|
|
2080
|
+
/** The error's constructor name (safe — no message/payload). */
|
|
2081
|
+
readonly errorName: string | undefined;
|
|
2082
|
+
/** The error message — only present when `includeData` is set. */
|
|
2083
|
+
readonly errorMessage?: string;
|
|
2084
|
+
/** The most recent result — only present when `includeData` is set. */
|
|
2085
|
+
readonly data?: unknown;
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Snapshot a mutation's write-side lifecycle (idle/loading/success/error). The
|
|
2089
|
+
* write-side counterpart to {@link inspectResource}: payload/message hidden
|
|
2090
|
+
* unless opted in, because a mutation result commonly carries user data. Never
|
|
2091
|
+
* triggers the mutation — a pure `peek` over its exposed signals.
|
|
2092
|
+
*/
|
|
2093
|
+
declare function inspectMutation(mutation: MutationLike, options?: InspectResourceOptions): MutationInspection;
|
|
2068
2094
|
interface RouteMatchLike {
|
|
2069
2095
|
readonly path: string;
|
|
2070
2096
|
readonly pattern: string;
|
|
@@ -2142,6 +2168,147 @@ interface InspectI18nOptions {
|
|
|
2142
2168
|
/** Snapshot i18n locale state and (optionally) missing translation keys. */
|
|
2143
2169
|
declare function inspectI18n(i18n: I18nLike, options?: InspectI18nOptions): I18nInspection;
|
|
2144
2170
|
|
|
2171
|
+
/**
|
|
2172
|
+
* Detailed structural inspectors for DevTools (2.2 Phase 1).
|
|
2173
|
+
*
|
|
2174
|
+
* Two read-only views derived purely from the one compiled graph — no second
|
|
2175
|
+
* graph, no subscriptions, no runtime instrumentation:
|
|
2176
|
+
*
|
|
2177
|
+
* - `inspectEvents` — the Event Inspector panel (#8): every node that carries
|
|
2178
|
+
* event handlers, with the handler *types* it registers (never the handler
|
|
2179
|
+
* functions themselves).
|
|
2180
|
+
* - `inspectSignalGraph` — the Signal / Dependency Graph panel (#4): the
|
|
2181
|
+
* bipartite wiring between distinct signal ids and the graph nodes that bind
|
|
2182
|
+
* them, optionally enriched with each signal's live `kind` and
|
|
2183
|
+
* `observerCount` when the caller supplies the live `Signal` instances by id.
|
|
2184
|
+
*
|
|
2185
|
+
* Both are pure: safe to call in a server, a test, or a DevTools panel.
|
|
2186
|
+
*/
|
|
2187
|
+
|
|
2188
|
+
/** A node that registers one or more event handlers. */
|
|
2189
|
+
interface InspectedEventNode {
|
|
2190
|
+
/** The build-order node id. */
|
|
2191
|
+
readonly id: string;
|
|
2192
|
+
/** The node's semantic type (button/input/…). */
|
|
2193
|
+
readonly nodeType: string;
|
|
2194
|
+
/** The stable author-provided key, if any. */
|
|
2195
|
+
readonly key: string | undefined;
|
|
2196
|
+
/** Depth of the node in the graph. */
|
|
2197
|
+
readonly depth: number;
|
|
2198
|
+
/** Event types wired on the node (e.g. `['click', 'keydown']`). Sorted. */
|
|
2199
|
+
readonly eventTypes: readonly string[];
|
|
2200
|
+
}
|
|
2201
|
+
/** A prod-safe summary of the graph's event wiring. */
|
|
2202
|
+
interface EventInspection {
|
|
2203
|
+
/** Every node carrying handlers, in document order. */
|
|
2204
|
+
readonly nodes: readonly InspectedEventNode[];
|
|
2205
|
+
/** Total handler registrations across all nodes. */
|
|
2206
|
+
readonly totalHandlers: number;
|
|
2207
|
+
/** Count of registrations per event type (e.g. `{ click: 3, input: 2 }`). */
|
|
2208
|
+
readonly byType: Readonly<Record<string, number>>;
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* List every node that registers event handlers, with the handler *types* it
|
|
2212
|
+
* wires. Reads only the public graph structure (`node.events[].type`); the
|
|
2213
|
+
* handler functions are never surfaced. Document order, deterministic.
|
|
2214
|
+
*/
|
|
2215
|
+
declare function inspectEvents(graph: ApplicationGraph): EventInspection;
|
|
2216
|
+
/** One signal id and the nodes that bind it. */
|
|
2217
|
+
interface SignalGraphNode {
|
|
2218
|
+
/** The signal id as recorded in the graph's state references. */
|
|
2219
|
+
readonly signalId: string;
|
|
2220
|
+
/** Distinct graph-node ids that bind this signal. */
|
|
2221
|
+
readonly boundNodeIds: readonly string[];
|
|
2222
|
+
/** Number of binding edges into this signal (may exceed boundNodeIds if a node binds it twice). */
|
|
2223
|
+
readonly bindingCount: number;
|
|
2224
|
+
/** Live signal kind, present only when the live instance was supplied. */
|
|
2225
|
+
readonly kind?: SignalKind;
|
|
2226
|
+
/** Live observer count, present only when the live instance was supplied. */
|
|
2227
|
+
readonly observerCount?: number;
|
|
2228
|
+
}
|
|
2229
|
+
/** A single binding edge: a node prop is driven by a signal. */
|
|
2230
|
+
interface SignalGraphEdge {
|
|
2231
|
+
readonly signalId: string;
|
|
2232
|
+
readonly nodeId: string;
|
|
2233
|
+
readonly nodeType: string;
|
|
2234
|
+
readonly propKey: string;
|
|
2235
|
+
}
|
|
2236
|
+
/** The bipartite signal↔node wiring of an application. */
|
|
2237
|
+
interface SignalGraph {
|
|
2238
|
+
/** Distinct signals bound anywhere in the graph, sorted by id. */
|
|
2239
|
+
readonly signals: readonly SignalGraphNode[];
|
|
2240
|
+
/** Every binding edge, in document order. */
|
|
2241
|
+
readonly edges: readonly SignalGraphEdge[];
|
|
2242
|
+
}
|
|
2243
|
+
interface InspectSignalGraphOptions {
|
|
2244
|
+
/**
|
|
2245
|
+
* Live `Signal` instances keyed by their signal id. When supplied, each
|
|
2246
|
+
* matching signal in the graph is enriched with its live `kind` and
|
|
2247
|
+
* `observerCount`. Purely additive — omit for a structure-only graph.
|
|
2248
|
+
*/
|
|
2249
|
+
readonly signalsById?: Readonly<Record<string, ReadonlySignal<unknown>>>;
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* Build the bipartite dependency graph between signals and the nodes that bind
|
|
2253
|
+
* them. Structural by default; pass `signalsById` to enrich with live
|
|
2254
|
+
* kind/observer counts. Deterministic ordering (edges in document order,
|
|
2255
|
+
* signals sorted by id).
|
|
2256
|
+
*/
|
|
2257
|
+
declare function inspectSignalGraph(compiled: CompiledApplication, options?: InspectSignalGraphOptions): SignalGraph;
|
|
2258
|
+
|
|
2259
|
+
/**
|
|
2260
|
+
* SSR / Hydration inspection for DevTools (2.2 Phase 1, panel #12).
|
|
2261
|
+
*
|
|
2262
|
+
* A structural, read-only view of how a compiled application splits into the
|
|
2263
|
+
* parts that are *statically serialized* on the server versus the *dynamic*
|
|
2264
|
+
* parts the client must hydrate. It reuses the compiler's existing
|
|
2265
|
+
* `analyzeGraph` classifier (the very same analysis the SSR static-subtree plan
|
|
2266
|
+
* and the hydration fast-path already consume) so DevTools introduces no second
|
|
2267
|
+
* analysis and no second graph. Nothing is measured at runtime and nothing is
|
|
2268
|
+
* mutated — this is a pure derivation over the one `CompiledApplication`.
|
|
2269
|
+
*
|
|
2270
|
+
* HONEST SCOPE: these are *structural* counts (how many nodes are static, how
|
|
2271
|
+
* many hydrate, how many portals/islands exist). They are NOT wall-clock SSR or
|
|
2272
|
+
* hydration timings — real render/hydrate timing needs a browser, and the
|
|
2273
|
+
* browser gate is BLOCKED in this environment. The panel labels this honestly.
|
|
2274
|
+
*/
|
|
2275
|
+
|
|
2276
|
+
interface HydrationInspection {
|
|
2277
|
+
/** Total GraphNodes analysed (root included). */
|
|
2278
|
+
readonly totalNodes: number;
|
|
2279
|
+
/** Nodes classified static (no dynamic text/attr/events of their own). */
|
|
2280
|
+
readonly staticNodes: number;
|
|
2281
|
+
/** Maximal whole-static subtrees — the units the SSR plan precomputes verbatim. */
|
|
2282
|
+
readonly staticSubtrees: number;
|
|
2283
|
+
/** Dynamic nodes the client must reconcile/hydrate (total − static). */
|
|
2284
|
+
readonly dynamicNodes: number;
|
|
2285
|
+
/** Nodes with dynamic (signal-bound) text. */
|
|
2286
|
+
readonly dynamicTextNodes: number;
|
|
2287
|
+
/** Nodes with dynamic (signal-bound) attributes. */
|
|
2288
|
+
readonly dynamicAttrNodes: number;
|
|
2289
|
+
/** Nodes carrying event handlers — the interactive surface hydration wires. */
|
|
2290
|
+
readonly eventNodes: number;
|
|
2291
|
+
/** Reactive keyed-list sites. */
|
|
2292
|
+
readonly lists: number;
|
|
2293
|
+
/** Conditional (`when`) sites. */
|
|
2294
|
+
readonly conditionals: number;
|
|
2295
|
+
/** Portal hosts (overlays) — relocated to <body> on hydrate, inlined in SSR. */
|
|
2296
|
+
readonly portals: number;
|
|
2297
|
+
/** `head()` contribution anchors — adopted, never duplicated, on hydrate. */
|
|
2298
|
+
readonly headAnchors: number;
|
|
2299
|
+
/**
|
|
2300
|
+
* Fraction of nodes that are static (0..1), rounded to 4 dp. A high ratio
|
|
2301
|
+
* means most of the document ships as precomputed HTML and hydration only
|
|
2302
|
+
* wires the dynamic remainder. Deterministic; no timing involved.
|
|
2303
|
+
*/
|
|
2304
|
+
readonly staticRatio: number;
|
|
2305
|
+
}
|
|
2306
|
+
/**
|
|
2307
|
+
* Build the SSR/hydration inspection for a compiled application. Pure and
|
|
2308
|
+
* side-effect free — safe in a server, a test, or a DevTools panel.
|
|
2309
|
+
*/
|
|
2310
|
+
declare function inspectHydration(compiled: CompiledApplication): HydrationInspection;
|
|
2311
|
+
|
|
2145
2312
|
/**
|
|
2146
2313
|
* DevTools session & panels — the first real StreetUI DevTools surface.
|
|
2147
2314
|
*
|
|
@@ -2213,8 +2380,26 @@ interface DevToolsSnapshot {
|
|
|
2213
2380
|
readonly transitions: readonly InspectedTransition[];
|
|
2214
2381
|
/** Compilation diagnostics (§8). */
|
|
2215
2382
|
readonly diagnostics: DiagnosticsPanel;
|
|
2383
|
+
/**
|
|
2384
|
+
* Event Inspector (panel #8): every node carrying handlers, with the event
|
|
2385
|
+
* *types* wired (never the handler functions). Structural, deterministic.
|
|
2386
|
+
*/
|
|
2387
|
+
readonly events: EventInspection;
|
|
2388
|
+
/**
|
|
2389
|
+
* Signal / Dependency Graph (panel #4): the bipartite signal↔node wiring,
|
|
2390
|
+
* enriched with live kind/observer counts for any signal the app registered
|
|
2391
|
+
* (matched by id against `sources.signalsById`).
|
|
2392
|
+
*/
|
|
2393
|
+
readonly signalGraph: SignalGraph;
|
|
2394
|
+
/**
|
|
2395
|
+
* SSR / Hydration Inspector (panel #12): structural static-vs-dynamic split.
|
|
2396
|
+
* Counts only — NOT wall-clock SSR/hydration timings (browser gate BLOCKED).
|
|
2397
|
+
*/
|
|
2398
|
+
readonly hydration: HydrationInspection;
|
|
2216
2399
|
readonly router?: RouterInspection;
|
|
2217
2400
|
readonly resources?: Readonly<Record<string, ResourceInspection>>;
|
|
2401
|
+
/** Mutation Inspector (panel #7): live write-side lifecycles, by label. */
|
|
2402
|
+
readonly mutations?: Readonly<Record<string, MutationInspection>>;
|
|
2218
2403
|
readonly forms?: Readonly<Record<string, FormInspection>>;
|
|
2219
2404
|
readonly contexts?: Readonly<Record<string, ContextInspection>>;
|
|
2220
2405
|
readonly i18n?: I18nInspection;
|
|
@@ -2228,8 +2413,16 @@ interface DevToolsSnapshot {
|
|
|
2228
2413
|
interface DevToolsSources {
|
|
2229
2414
|
/** Live signals to inspect, keyed by a human label shown in the panel. */
|
|
2230
2415
|
readonly signals?: Readonly<Record<string, ReadonlySignal<unknown>>>;
|
|
2416
|
+
/**
|
|
2417
|
+
* Live signals keyed by their *signal id* (not a human label). Used only to
|
|
2418
|
+
* enrich the Signal/Dependency Graph (panel #4) with live kind/observer
|
|
2419
|
+
* counts. Optional and purely additive — omit for a structure-only graph.
|
|
2420
|
+
*/
|
|
2421
|
+
readonly signalsById?: Readonly<Record<string, ReadonlySignal<unknown>>>;
|
|
2231
2422
|
/** Live resources to inspect, keyed by label. */
|
|
2232
2423
|
readonly resources?: Readonly<Record<string, ResourceLike>>;
|
|
2424
|
+
/** Live mutations to inspect, keyed by label (panel #7). */
|
|
2425
|
+
readonly mutations?: Readonly<Record<string, MutationLike>>;
|
|
2233
2426
|
/** The app router, if any. */
|
|
2234
2427
|
readonly router?: RouterLike;
|
|
2235
2428
|
/** Live forms to inspect, keyed by label. */
|
|
@@ -2320,6 +2513,59 @@ declare function escapeHtml(value: unknown): string;
|
|
|
2320
2513
|
*/
|
|
2321
2514
|
declare function renderDevToolsHTML(s: DevToolsSnapshot): string;
|
|
2322
2515
|
|
|
2516
|
+
/**
|
|
2517
|
+
* Interactive DevTools view (2.2 Phase 1) — a self-contained, 12-panel browser
|
|
2518
|
+
* DevTools surface rendered as ONE HTML document.
|
|
2519
|
+
*
|
|
2520
|
+
* This extends the static `renderDevToolsHTML` (2.0 §8) into a *tabbed,
|
|
2521
|
+
* interactive* tool while preserving every DevTools design constraint:
|
|
2522
|
+
*
|
|
2523
|
+
* - It consumes ONLY an existing {@link DevToolsSnapshot} (already composed
|
|
2524
|
+
* from the read-only inspectors). There is NO second framework runtime, NO
|
|
2525
|
+
* second reactive system, NO second graph, and NO DOM/subscription work at
|
|
2526
|
+
* render time — this function is a pure string builder.
|
|
2527
|
+
* - The snapshot is embedded once as inert JSON. A small, dependency-free
|
|
2528
|
+
* vanilla-JS controller (no framework, no bundler, no network) renders the
|
|
2529
|
+
* panels from that JSON in the browser: tab switching, component selection,
|
|
2530
|
+
* and a Refresh button.
|
|
2531
|
+
* - Refresh is pull-based and never mutates the app: the controller calls an
|
|
2532
|
+
* optional host hook `window.__STREETUI_DEVTOOLS_REFRESH__()` that, when the
|
|
2533
|
+
* host provides it, returns a fresh snapshot (e.g. from `session.refresh()`).
|
|
2534
|
+
* Absent the hook, Refresh is a no-op — DevTools is never pushed to.
|
|
2535
|
+
* - Every value the controller injects into the DOM is escaped; the embedded
|
|
2536
|
+
* JSON is `<`-escaped so app data cannot break out of the <script> block.
|
|
2537
|
+
*
|
|
2538
|
+
* The 12 panels map 1:1 to the milestone spec: (1) Component Tree,
|
|
2539
|
+
* (2) Component Inspector, (3) Reactive State, (4) Signal/Dependency Graph,
|
|
2540
|
+
* (5) Router, (6) Resource/Async, (7) Mutation, (8) Event, (9) Overlay,
|
|
2541
|
+
* (10) Performance Timeline, (11) Error Diagnostics, (12) SSR/Hydration.
|
|
2542
|
+
*
|
|
2543
|
+
* HONEST SCOPE: this produces markup + a controller script. That it *renders*
|
|
2544
|
+
* pixels, is screen-reader conformant, or hits 60fps in a real browser is NOT
|
|
2545
|
+
* claimed and has NOT been observed here — no browser/AT exists in this
|
|
2546
|
+
* environment (browser + AT gates remain BLOCKED). What tests verify is that the
|
|
2547
|
+
* document faithfully and safely embeds the snapshot and that the controller
|
|
2548
|
+
* logic is deterministic (exercised under happy-dom, which is NOT a browser).
|
|
2549
|
+
*/
|
|
2550
|
+
|
|
2551
|
+
interface InteractiveDevToolsOptions {
|
|
2552
|
+
/** Tab id to open first. Defaults to `'components'`. */
|
|
2553
|
+
readonly initialTab?: string;
|
|
2554
|
+
/** Document <title>. Defaults to `StreetUI DevTools — <app name>`. */
|
|
2555
|
+
readonly title?: string;
|
|
2556
|
+
}
|
|
2557
|
+
/** The 12 panels, in tab order. `id` is stable and used by the controller/tests. */
|
|
2558
|
+
declare const DEVTOOLS_TABS: readonly {
|
|
2559
|
+
readonly id: string;
|
|
2560
|
+
readonly label: string;
|
|
2561
|
+
}[];
|
|
2562
|
+
/**
|
|
2563
|
+
* Render the interactive 12-panel DevTools document for a snapshot. Static,
|
|
2564
|
+
* side-effect-free string builder. Re-run with a fresh snapshot (or let the
|
|
2565
|
+
* in-page Refresh button pull one via the host hook) to reflect new state.
|
|
2566
|
+
*/
|
|
2567
|
+
declare function renderInteractiveDevTools(snapshot: DevToolsSnapshot, options?: InteractiveDevToolsOptions): string;
|
|
2568
|
+
|
|
2323
2569
|
/**
|
|
2324
2570
|
* DevTools report (2.1 §23) — the first *usable* DevTools interface: one call
|
|
2325
2571
|
* that turns a compiled application into a complete, self-contained HTML page a
|
|
@@ -2408,4 +2654,4 @@ interface ResolvedConfig {
|
|
|
2408
2654
|
/** Identity helper that gives `streetui.config.ts` full type-checking + inference. */
|
|
2409
2655
|
declare function defineConfig(config: StreetUIConfig): StreetUIConfig;
|
|
2410
2656
|
|
|
2411
|
-
export { type A11yIds, type Announcer, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, type AuthSession, type AuthSessionConfig, type AuthStatus, BrowserDOMAdapter, CleanupRegistry, type Client, type ClientConfig, CompiledApplication, ContainerDSL, type Context, type ContextInspection, type ContextLike, DEFAULT_PERF_THRESHOLDS, DOMAdapter, type DevToolsOptions, type DevToolsSession, type DevToolsSnapshot, type DevToolsSources, DiagnosticCollector, type DiagnosticContext, type DiagnosticSink, type DiagnosticsPanel, type DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, type ErrorReport, type ErrorReportOptions, EventBus, type EventHandler, FOCUSABLE_SELECTOR, type FetchLike, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HttpError, type HttpMethod, HydrationDiagnosticSink, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalOptions, type InspectedComponent, type InspectedInteractions, type InspectedNode, type InspectedOverlay, type InspectedPage, type InspectedTransition, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LoadUser, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, type Mutation, type MutationOptions, type MutationStatus, type Mutator, type NavigateOptions, NodeInstance, type NodeInstanceOptions, PageDSL, type PerfDiagnostic, type PerfDiagnosticCode, type PerfSnapshot, type PerfThresholds, type PerformancePanel, type PlanEntry, type Priority, ROUTER_OUTLET_ID, ReadonlySignal, type ReconcileResult, RenderContext, RenderHandle, type RequestConfig, type ResolvedConfig, type ResolvedTransitionLike, Resource, type ResourceInspection, type ResourceLike, ResourceLoaderContext, ResourceOptions, ResourceStatus, type RouteBuilder, type RouteContext, type RouteDefinition, type RouteMatch, type RouteMatchLike, type Router, type RouterHistory, type RouterInspection, type RouterLike, type RouterLocation, type RouterOptions, Runtime, RuntimeNodeInstance, type RuntimeOptions, Scheduler, type SchedulerDiagnostics, SemanticNodeType, ServerComment, ServerElement, ServerFragment, type ServerNode, type ServerNodeKind, type ServerParent, ServerRawHTML, ServerStyle, ServerText, type ShellBuilder, Signal, type SignalInspection, SignalKind, type SignalsPanel, Store, type StoreState, type StreetEvent, type StreetEventType, StreetFrameworkError, StreetRenderHandle, StreetRenderer, StreetRendererImpl, type StreetRendererOptions, type StreetUIConfig, type SubmitStatus, Subscriber, TransitionConfig, TransitionController, type TransitionHooks, type TransitionPhase, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, containFocus, createAnnouncer, createApplication, createAuthSession, createBrowserHistory, createClient, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, describeError, diagnosePerformance, email, environment, escapeHtml, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, focusInitial, formatDiagnosticContext, frameworkError, getFocusable, getResolvedTransition, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectComponents, inspectContext, inspectForm, inspectGraph, inspectI18n, inspectInteractions, inspectResource, inspectRouter, inspectSignal, interpolate, linkUpdate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, mutation, nodeTypeStats, normalizePath, onEscape, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, renderDevToolsHTML, renderDevToolsReport, reportDiagnostic, reportError, required, resolveTag, restoreFocus, routerOutlet, rovingMenu, runElementTransition, runValidators, saveFocus, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, trapFocus, validateGraph, wireComponentBehavior, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };
|
|
2657
|
+
export { type A11yIds, type Announcer, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, type AuthSession, type AuthSessionConfig, type AuthStatus, BrowserDOMAdapter, CleanupRegistry, type Client, type ClientConfig, CompiledApplication, ContainerDSL, type Context, type ContextInspection, type ContextLike, DEFAULT_PERF_THRESHOLDS, DEVTOOLS_TABS, DOMAdapter, type DevToolsOptions, type DevToolsSession, type DevToolsSnapshot, type DevToolsSources, DiagnosticCollector, type DiagnosticContext, type DiagnosticSink, type DiagnosticsPanel, type DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, type ErrorReport, type ErrorReportOptions, EventBus, type EventHandler, type EventInspection, FOCUSABLE_SELECTOR, type FetchLike, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HttpError, type HttpMethod, HydrationDiagnosticSink, type HydrationInspection, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalGraphOptions, type InspectSignalOptions, type InspectedComponent, type InspectedEventNode, type InspectedInteractions, type InspectedNode, type InspectedOverlay, type InspectedPage, type InspectedTransition, type InteractiveDevToolsOptions, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LoadUser, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, type Mutation, type MutationInspection, type MutationLike, type MutationOptions, type MutationStatus, type Mutator, type NavigateOptions, NodeInstance, type NodeInstanceOptions, PageDSL, type PerfDiagnostic, type PerfDiagnosticCode, type PerfSnapshot, type PerfThresholds, type PerformancePanel, type PlanEntry, type Priority, ROUTER_OUTLET_ID, ReadonlySignal, type ReconcileResult, RenderContext, RenderHandle, type RequestConfig, type ResolvedConfig, type ResolvedTransitionLike, Resource, type ResourceInspection, type ResourceLike, ResourceLoaderContext, ResourceOptions, ResourceStatus, type RouteBuilder, type RouteContext, type RouteDefinition, type RouteMatch, type RouteMatchLike, type Router, type RouterHistory, type RouterInspection, type RouterLike, type RouterLocation, type RouterOptions, Runtime, RuntimeNodeInstance, type RuntimeOptions, Scheduler, type SchedulerDiagnostics, SemanticNodeType, ServerComment, ServerElement, ServerFragment, type ServerNode, type ServerNodeKind, type ServerParent, ServerRawHTML, ServerStyle, ServerText, type ShellBuilder, Signal, type SignalGraph, type SignalGraphEdge, type SignalGraphNode, type SignalInspection, SignalKind, type SignalsPanel, Store, type StoreState, type StreetEvent, type StreetEventType, StreetFrameworkError, StreetRenderHandle, StreetRenderer, StreetRendererImpl, type StreetRendererOptions, type StreetUIConfig, type SubmitStatus, Subscriber, TransitionConfig, TransitionController, type TransitionHooks, type TransitionPhase, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, containFocus, createAnnouncer, createApplication, createAuthSession, createBrowserHistory, createClient, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, describeError, diagnosePerformance, email, environment, escapeHtml, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, focusInitial, formatDiagnosticContext, frameworkError, getFocusable, getResolvedTransition, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectComponents, inspectContext, inspectEvents, inspectForm, inspectGraph, inspectHydration, inspectI18n, inspectInteractions, inspectMutation, inspectResource, inspectRouter, inspectSignal, inspectSignalGraph, interpolate, linkUpdate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, mutation, nodeTypeStats, normalizePath, onEscape, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, renderDevToolsHTML, renderDevToolsReport, renderInteractiveDevTools, reportDiagnostic, reportError, required, resolveTag, restoreFocus, routerOutlet, rovingMenu, runElementTransition, runValidators, saveFocus, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, trapFocus, validateGraph, wireComponentBehavior, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };
|