streetui 1.6.1 → 1.8.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/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/{compile-CEom4hkp.d.cts → compile-CJJQYi71.d.cts} +215 -3
- package/dist/{compile-CEom4hkp.d.ts → compile-CJJQYi71.d.ts} +215 -3
- 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-D286jpZZ.d.cts → hydration-diagnostics-BQeehq3i.d.cts} +1 -1
- package/dist/{hydration-diagnostics-YrG-OJJe.d.ts → hydration-diagnostics-DNAJumYF.d.ts} +1 -1
- package/dist/index.cjs +402 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -7
- package/dist/index.d.ts +94 -7
- package/dist/index.js +390 -3
- package/dist/index.js.map +1 -1
- package/dist/{server-ZBh5DO-z.d.cts → server-CnLEnlYU.d.cts} +17 -1
- package/dist/{server-jbB-7oN-.d.ts → server-DNlg7ou2.d.ts} +17 -1
- package/dist/server.cjs +1025 -865
- 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 +1025 -865
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +1273 -3
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +63 -4
- package/dist/testing.d.ts +63 -4
- package/dist/testing.js +1267 -3
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-
|
|
4
|
-
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-
|
|
5
|
-
import { D as DOMAdapter } from './server-
|
|
6
|
-
export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState, c as serverDOMAdapter } from './server-
|
|
1
|
+
import { c as Signal, d as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, e as ApplicationGraph, G as GraphNode, C as CompiledApplication, f as SemanticNodeType, P as PageDSL, g as ContainerDSL, h as SignalKind } from './compile-CJJQYi71.cjs';
|
|
2
|
+
export { i as A11yOptions, j as AppBuilder, k as AppDSL, l as AppOptions, m as ApplicationGraphOptions, B as BaseNode, n as Bindable, o as BindableText, p as BoundInputOptions, q as ButtonOptions, r as CompileOptions, b as ComponentChildren, s as ComponentContext, a as ComponentDefinition, t as ComponentRender, u as ComponentSetup, b as ContainerBuilder, v as ContainerBuilderImpl, w as ContainerOptions, x as ContentDSL, y as ControlledInputOptions, z as DerivedSignal, E as Diagnostic, F as DiagnosticError, H as DiagnosticLocation, I as DiagnosticSeverity, J as ErrorBoundaryOptions, K as ErrorFallbackBuilder, L as ErrorSource, M as EventDescriptor, N as FormBuilder, O as FormBuilderImpl, Q as FormDSL, T as FormOptions, W as GraphNodeData, X as HandlerFn, Y as HeadingOptions, Z as ImageOptions, _ as InputOptions, $ as InputOptionsBase, a0 as LinkOptions, a1 as ListBuilder, a2 as ListBuilderImpl, a3 as ListDSL, a4 as ListOptions, a5 as ListPlanEntry, a6 as NodeId, a7 as NodeMetadata, a8 as OverlayOptions, a9 as PageBuilder, aa as PageBuilderImpl, ab as PortalOptions, ac as PropValue, ad as Props, ae as ReactiveConsumer, af as ReactiveSource, ag as SectionBuilder, ah as SectionBuilderImpl, ai as SectionDSL, aj as SectionOptions, ak as SerializedGraph, al as SerializedNode, am as StateRef, S as StreetApp, an as StreetUI, ao as TextOptions, ap as TextValue, V as VERSION, aq as batch, ar as compile, as as compileGraph, at as component, au as createNodeId, av as derived, aw as effect, ax as formatDiagnostic, ay as generateApplicationId, az as generateNodeId, aA as isBatching, aB as isComponentDefinition, aC as nextId, aD as nodeIdPrefix, aE as observerCount, aF as reactiveListItemKey, aG as reactiveListItemSignature, aH as resetIdCounter, aI as signal, aJ as signalKind, aK as streetui } from './compile-CJJQYi71.cjs';
|
|
3
|
+
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-BQeehq3i.cjs';
|
|
4
|
+
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-BQeehq3i.cjs';
|
|
5
|
+
import { D as DOMAdapter } from './server-CnLEnlYU.cjs';
|
|
6
|
+
export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState, c as serverDOMAdapter } from './server-CnLEnlYU.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A simple reactive store built on top of signals.
|
|
@@ -557,6 +557,10 @@ declare class BrowserDOMAdapter implements DOMAdapter {
|
|
|
557
557
|
querySelectorAll(root: Element | Document, selector: string): NodeListOf<Element>;
|
|
558
558
|
getElementById(id: string): Element | null;
|
|
559
559
|
focus(element: Element): void;
|
|
560
|
+
body(): Element | null;
|
|
561
|
+
activeElement(): Element | null;
|
|
562
|
+
contains(ancestor: Element, node: Node): boolean;
|
|
563
|
+
matches(element: Element, selector: string): boolean;
|
|
560
564
|
isElement(node: Node): node is Element;
|
|
561
565
|
isTextNode(node: Node): node is Text;
|
|
562
566
|
tagName(element: Element): string;
|
|
@@ -674,6 +678,42 @@ declare function focusById(dom: DOMAdapter, root: Element | Document, id: string
|
|
|
674
678
|
* Returns true if a focusable element was found and focused.
|
|
675
679
|
*/
|
|
676
680
|
declare function focusFirst(dom: DOMAdapter, container: Element | Document, selector?: string): boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Ordered list of focusable/tabbable descendants of `container`.
|
|
683
|
+
* Re-checks each candidate against the selector so elements disabled after the
|
|
684
|
+
* initial query (e.g. a button toggled to `disabled`) are excluded.
|
|
685
|
+
*/
|
|
686
|
+
declare function getFocusable(dom: DOMAdapter, container: Element, selector?: string): Element[];
|
|
687
|
+
/**
|
|
688
|
+
* Capture the currently-focused element so it can be restored later (e.g. when
|
|
689
|
+
* a dialog closes). Returns null on the server or when nothing is focused.
|
|
690
|
+
*/
|
|
691
|
+
declare function saveFocus(dom: DOMAdapter): Element | null;
|
|
692
|
+
/** Restore focus to a previously {@link saveFocus}-d element. No-op if null. */
|
|
693
|
+
declare function restoreFocus(dom: DOMAdapter, saved: Element | null): void;
|
|
694
|
+
/**
|
|
695
|
+
* Move focus into `container` on open: the element with id `initialFocusId` if
|
|
696
|
+
* given and present, otherwise the first focusable element. Server-safe no-op.
|
|
697
|
+
*/
|
|
698
|
+
declare function focusInitial(dom: DOMAdapter, container: Element, initialFocusId?: string): void;
|
|
699
|
+
/**
|
|
700
|
+
* Trap Tab / Shift+Tab focus within `container` (wrap-around at both ends).
|
|
701
|
+
* Attaches a keydown listener to the container and returns a cleanup function
|
|
702
|
+
* that detaches it. Server-safe: `addEventListener` is a no-op, and the returned
|
|
703
|
+
* cleanup is still callable.
|
|
704
|
+
*/
|
|
705
|
+
declare function trapFocus(dom: DOMAdapter, container: Element): () => void;
|
|
706
|
+
/**
|
|
707
|
+
* Modal containment: if focus moves to an element outside `container`, redirect
|
|
708
|
+
* it back inside. Listens on the document body (focusin bubbles there) and
|
|
709
|
+
* returns a cleanup function. Server-safe no-op (body() is null).
|
|
710
|
+
*/
|
|
711
|
+
declare function containFocus(dom: DOMAdapter, container: Element): () => void;
|
|
712
|
+
/**
|
|
713
|
+
* Invoke `handler` when Escape is pressed while focus is within `target`.
|
|
714
|
+
* Returns a cleanup function. Server-safe no-op.
|
|
715
|
+
*/
|
|
716
|
+
declare function onEscape(dom: DOMAdapter, target: Element, handler: () => void): () => void;
|
|
677
717
|
|
|
678
718
|
/**
|
|
679
719
|
* NodeInstance — the renderer's live counterpart to a GraphNode.
|
|
@@ -785,6 +825,30 @@ declare function wireSignalBindings(ctx: RenderContext, graphNode: GraphNode, in
|
|
|
785
825
|
* eager build factory (it only ever renders 0..1 branch, so eager is fine).
|
|
786
826
|
*/
|
|
787
827
|
declare function wireReactiveList(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance, el: Element): void;
|
|
828
|
+
/**
|
|
829
|
+
* Attach overlay focus/keyboard behavior to a mounted portal. Server-safe: on
|
|
830
|
+
* the server `dom.body()` is null so this returns immediately (SSR emits inert
|
|
831
|
+
* markup, no focus concept). A plain portal has no `__overlay__` descriptor, so
|
|
832
|
+
* this also returns immediately — the behavior is purely additive.
|
|
833
|
+
*
|
|
834
|
+
* The panel is mounted/unmounted by the portal's inner `when(open, …)`, whose
|
|
835
|
+
* signal subscription is registered *before* this one (the conditional child is
|
|
836
|
+
* mounted earlier in the portal branch). Signal subscribers fire synchronously
|
|
837
|
+
* in subscription order, so on open→true the panel DOM exists before we move
|
|
838
|
+
* focus into it, and on open→false the panel is torn down before we restore
|
|
839
|
+
* focus. All listeners are tracked on the instance and torn down on unmount.
|
|
840
|
+
*/
|
|
841
|
+
declare function wireOverlayBehavior(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance, target: Element): void;
|
|
842
|
+
/**
|
|
843
|
+
* Wire a component instance's lifecycle (§9). Reads the optional
|
|
844
|
+
* `__component__<id>` descriptor — an array of teardown callbacks the DSL's
|
|
845
|
+
* `component()` collected from the setup's `ctx.effect`/`ctx.onCleanup` — and
|
|
846
|
+
* routes each into `NodeInstance.trackCleanup`, so they run (children-first)
|
|
847
|
+
* when the component leaves the graph. Shared by the mount and hydrate paths so
|
|
848
|
+
* both attach identical ownership. A `'component'` node with no cleanups (no
|
|
849
|
+
* effects/resources) registers no descriptor and this is a no-op.
|
|
850
|
+
*/
|
|
851
|
+
declare function wireComponentBehavior(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance): void;
|
|
788
852
|
|
|
789
853
|
/**
|
|
790
854
|
* Patch — targeted DOM updates driven by signal changes.
|
|
@@ -1403,6 +1467,29 @@ declare function printGraph(graph: ApplicationGraph): string;
|
|
|
1403
1467
|
declare function printDiagnostics(compiled: CompiledApplication): string;
|
|
1404
1468
|
/** Returns node counts per type. */
|
|
1405
1469
|
declare function nodeTypeStats(graph: ApplicationGraph): Record<string, number>;
|
|
1470
|
+
/** A single component instance surfaced for DevTools inspection (§21). */
|
|
1471
|
+
interface InspectedComponent {
|
|
1472
|
+
/** The build-order node id (churns across rebuilds — not stable identity). */
|
|
1473
|
+
id: string;
|
|
1474
|
+
/** The stable, author-provided identity key passed at the call site. */
|
|
1475
|
+
key: string | undefined;
|
|
1476
|
+
/** The definition's human-readable name (from `data-streetui-component`). */
|
|
1477
|
+
name: string;
|
|
1478
|
+
/** Depth of the component node in the graph. */
|
|
1479
|
+
depth: number;
|
|
1480
|
+
/** Number of direct child nodes the component rendered. */
|
|
1481
|
+
childCount: number;
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* List every `component()` instance in the graph, in document order, with its
|
|
1485
|
+
* stable `key`, human-readable `name` and location. Components are ordinary
|
|
1486
|
+
* `'component'` GraphNodes (they flow through `inspectGraph`/`printGraph`
|
|
1487
|
+
* already); this is the first-class, component-aware view for DevTools — it
|
|
1488
|
+
* reads the inspectable `data-streetui-component` name attribute the DSL sets,
|
|
1489
|
+
* never any internal `_`-prefixed metadata. Names/keys are stable across
|
|
1490
|
+
* fine-grained prop updates (which never rebuild the node).
|
|
1491
|
+
*/
|
|
1492
|
+
declare function inspectComponents(graph: ApplicationGraph): InspectedComponent[];
|
|
1406
1493
|
|
|
1407
1494
|
/**
|
|
1408
1495
|
* DevTools foundation (v0.6, Phase 18). A single read-only entry point that
|
|
@@ -1836,4 +1923,4 @@ interface ResolvedConfig {
|
|
|
1836
1923
|
/** Identity helper that gives `streetui.config.ts` full type-checking + inference. */
|
|
1837
1924
|
declare function defineConfig(config: StreetUIConfig): StreetUIConfig;
|
|
1838
1925
|
|
|
1839
|
-
export { type A11yIds, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, BrowserDOMAdapter, CleanupRegistry, 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 DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, EventBus, type EventHandler, FOCUSABLE_SELECTOR, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HydrationDiagnosticSink, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalOptions, type InspectedNode, type InspectedPage, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LifecycleHook, type LifecyclePhase, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, 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, type RenderContext, RenderHandle, type ResolvedConfig, type Resource, type ResourceInspection, type ResourceLike, type ResourceLoader, type ResourceLoaderContext, type ResourceOptions, type 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, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, createApplication, createBrowserHistory, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderContext, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, diagnosePerformance, email, environment, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, formatDiagnosticContext, frameworkError, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectContext, inspectForm, inspectGraph, inspectI18n, inspectResource, inspectRouter, inspectSignal, interpolate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, nodeTypeStats, normalizePath, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, reportDiagnostic, required, resolveTag, resource, routerOutlet, runValidators, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, validateGraph, wireEvents, wireReactiveList, wireSignalBindings };
|
|
1926
|
+
export { type A11yIds, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, BrowserDOMAdapter, CleanupRegistry, 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 DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, EventBus, type EventHandler, FOCUSABLE_SELECTOR, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HydrationDiagnosticSink, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalOptions, type InspectedComponent, type InspectedNode, type InspectedPage, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LifecycleHook, type LifecyclePhase, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, 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, type RenderContext, RenderHandle, type ResolvedConfig, type Resource, type ResourceInspection, type ResourceLike, type ResourceLoader, type ResourceLoaderContext, type ResourceOptions, type 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, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, containFocus, createApplication, createBrowserHistory, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderContext, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, diagnosePerformance, email, environment, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, focusInitial, formatDiagnosticContext, frameworkError, getFocusable, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectComponents, inspectContext, inspectForm, inspectGraph, inspectI18n, inspectResource, inspectRouter, inspectSignal, interpolate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, nodeTypeStats, normalizePath, onEscape, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, reportDiagnostic, required, resolveTag, resource, restoreFocus, routerOutlet, runValidators, saveFocus, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, trapFocus, validateGraph, wireComponentBehavior, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-
|
|
4
|
-
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-
|
|
5
|
-
import { D as DOMAdapter } from './server-
|
|
6
|
-
export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState, c as serverDOMAdapter } from './server-
|
|
1
|
+
import { c as Signal, d as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, e as ApplicationGraph, G as GraphNode, C as CompiledApplication, f as SemanticNodeType, P as PageDSL, g as ContainerDSL, h as SignalKind } from './compile-CJJQYi71.js';
|
|
2
|
+
export { i as A11yOptions, j as AppBuilder, k as AppDSL, l as AppOptions, m as ApplicationGraphOptions, B as BaseNode, n as Bindable, o as BindableText, p as BoundInputOptions, q as ButtonOptions, r as CompileOptions, b as ComponentChildren, s as ComponentContext, a as ComponentDefinition, t as ComponentRender, u as ComponentSetup, b as ContainerBuilder, v as ContainerBuilderImpl, w as ContainerOptions, x as ContentDSL, y as ControlledInputOptions, z as DerivedSignal, E as Diagnostic, F as DiagnosticError, H as DiagnosticLocation, I as DiagnosticSeverity, J as ErrorBoundaryOptions, K as ErrorFallbackBuilder, L as ErrorSource, M as EventDescriptor, N as FormBuilder, O as FormBuilderImpl, Q as FormDSL, T as FormOptions, W as GraphNodeData, X as HandlerFn, Y as HeadingOptions, Z as ImageOptions, _ as InputOptions, $ as InputOptionsBase, a0 as LinkOptions, a1 as ListBuilder, a2 as ListBuilderImpl, a3 as ListDSL, a4 as ListOptions, a5 as ListPlanEntry, a6 as NodeId, a7 as NodeMetadata, a8 as OverlayOptions, a9 as PageBuilder, aa as PageBuilderImpl, ab as PortalOptions, ac as PropValue, ad as Props, ae as ReactiveConsumer, af as ReactiveSource, ag as SectionBuilder, ah as SectionBuilderImpl, ai as SectionDSL, aj as SectionOptions, ak as SerializedGraph, al as SerializedNode, am as StateRef, S as StreetApp, an as StreetUI, ao as TextOptions, ap as TextValue, V as VERSION, aq as batch, ar as compile, as as compileGraph, at as component, au as createNodeId, av as derived, aw as effect, ax as formatDiagnostic, ay as generateApplicationId, az as generateNodeId, aA as isBatching, aB as isComponentDefinition, aC as nextId, aD as nodeIdPrefix, aE as observerCount, aF as reactiveListItemKey, aG as reactiveListItemSignature, aH as resetIdCounter, aI as signal, aJ as signalKind, aK as streetui } from './compile-CJJQYi71.js';
|
|
3
|
+
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-DNAJumYF.js';
|
|
4
|
+
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-DNAJumYF.js';
|
|
5
|
+
import { D as DOMAdapter } from './server-DNlg7ou2.js';
|
|
6
|
+
export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState, c as serverDOMAdapter } from './server-DNlg7ou2.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A simple reactive store built on top of signals.
|
|
@@ -557,6 +557,10 @@ declare class BrowserDOMAdapter implements DOMAdapter {
|
|
|
557
557
|
querySelectorAll(root: Element | Document, selector: string): NodeListOf<Element>;
|
|
558
558
|
getElementById(id: string): Element | null;
|
|
559
559
|
focus(element: Element): void;
|
|
560
|
+
body(): Element | null;
|
|
561
|
+
activeElement(): Element | null;
|
|
562
|
+
contains(ancestor: Element, node: Node): boolean;
|
|
563
|
+
matches(element: Element, selector: string): boolean;
|
|
560
564
|
isElement(node: Node): node is Element;
|
|
561
565
|
isTextNode(node: Node): node is Text;
|
|
562
566
|
tagName(element: Element): string;
|
|
@@ -674,6 +678,42 @@ declare function focusById(dom: DOMAdapter, root: Element | Document, id: string
|
|
|
674
678
|
* Returns true if a focusable element was found and focused.
|
|
675
679
|
*/
|
|
676
680
|
declare function focusFirst(dom: DOMAdapter, container: Element | Document, selector?: string): boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Ordered list of focusable/tabbable descendants of `container`.
|
|
683
|
+
* Re-checks each candidate against the selector so elements disabled after the
|
|
684
|
+
* initial query (e.g. a button toggled to `disabled`) are excluded.
|
|
685
|
+
*/
|
|
686
|
+
declare function getFocusable(dom: DOMAdapter, container: Element, selector?: string): Element[];
|
|
687
|
+
/**
|
|
688
|
+
* Capture the currently-focused element so it can be restored later (e.g. when
|
|
689
|
+
* a dialog closes). Returns null on the server or when nothing is focused.
|
|
690
|
+
*/
|
|
691
|
+
declare function saveFocus(dom: DOMAdapter): Element | null;
|
|
692
|
+
/** Restore focus to a previously {@link saveFocus}-d element. No-op if null. */
|
|
693
|
+
declare function restoreFocus(dom: DOMAdapter, saved: Element | null): void;
|
|
694
|
+
/**
|
|
695
|
+
* Move focus into `container` on open: the element with id `initialFocusId` if
|
|
696
|
+
* given and present, otherwise the first focusable element. Server-safe no-op.
|
|
697
|
+
*/
|
|
698
|
+
declare function focusInitial(dom: DOMAdapter, container: Element, initialFocusId?: string): void;
|
|
699
|
+
/**
|
|
700
|
+
* Trap Tab / Shift+Tab focus within `container` (wrap-around at both ends).
|
|
701
|
+
* Attaches a keydown listener to the container and returns a cleanup function
|
|
702
|
+
* that detaches it. Server-safe: `addEventListener` is a no-op, and the returned
|
|
703
|
+
* cleanup is still callable.
|
|
704
|
+
*/
|
|
705
|
+
declare function trapFocus(dom: DOMAdapter, container: Element): () => void;
|
|
706
|
+
/**
|
|
707
|
+
* Modal containment: if focus moves to an element outside `container`, redirect
|
|
708
|
+
* it back inside. Listens on the document body (focusin bubbles there) and
|
|
709
|
+
* returns a cleanup function. Server-safe no-op (body() is null).
|
|
710
|
+
*/
|
|
711
|
+
declare function containFocus(dom: DOMAdapter, container: Element): () => void;
|
|
712
|
+
/**
|
|
713
|
+
* Invoke `handler` when Escape is pressed while focus is within `target`.
|
|
714
|
+
* Returns a cleanup function. Server-safe no-op.
|
|
715
|
+
*/
|
|
716
|
+
declare function onEscape(dom: DOMAdapter, target: Element, handler: () => void): () => void;
|
|
677
717
|
|
|
678
718
|
/**
|
|
679
719
|
* NodeInstance — the renderer's live counterpart to a GraphNode.
|
|
@@ -785,6 +825,30 @@ declare function wireSignalBindings(ctx: RenderContext, graphNode: GraphNode, in
|
|
|
785
825
|
* eager build factory (it only ever renders 0..1 branch, so eager is fine).
|
|
786
826
|
*/
|
|
787
827
|
declare function wireReactiveList(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance, el: Element): void;
|
|
828
|
+
/**
|
|
829
|
+
* Attach overlay focus/keyboard behavior to a mounted portal. Server-safe: on
|
|
830
|
+
* the server `dom.body()` is null so this returns immediately (SSR emits inert
|
|
831
|
+
* markup, no focus concept). A plain portal has no `__overlay__` descriptor, so
|
|
832
|
+
* this also returns immediately — the behavior is purely additive.
|
|
833
|
+
*
|
|
834
|
+
* The panel is mounted/unmounted by the portal's inner `when(open, …)`, whose
|
|
835
|
+
* signal subscription is registered *before* this one (the conditional child is
|
|
836
|
+
* mounted earlier in the portal branch). Signal subscribers fire synchronously
|
|
837
|
+
* in subscription order, so on open→true the panel DOM exists before we move
|
|
838
|
+
* focus into it, and on open→false the panel is torn down before we restore
|
|
839
|
+
* focus. All listeners are tracked on the instance and torn down on unmount.
|
|
840
|
+
*/
|
|
841
|
+
declare function wireOverlayBehavior(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance, target: Element): void;
|
|
842
|
+
/**
|
|
843
|
+
* Wire a component instance's lifecycle (§9). Reads the optional
|
|
844
|
+
* `__component__<id>` descriptor — an array of teardown callbacks the DSL's
|
|
845
|
+
* `component()` collected from the setup's `ctx.effect`/`ctx.onCleanup` — and
|
|
846
|
+
* routes each into `NodeInstance.trackCleanup`, so they run (children-first)
|
|
847
|
+
* when the component leaves the graph. Shared by the mount and hydrate paths so
|
|
848
|
+
* both attach identical ownership. A `'component'` node with no cleanups (no
|
|
849
|
+
* effects/resources) registers no descriptor and this is a no-op.
|
|
850
|
+
*/
|
|
851
|
+
declare function wireComponentBehavior(ctx: RenderContext, graphNode: GraphNode, instance: NodeInstance): void;
|
|
788
852
|
|
|
789
853
|
/**
|
|
790
854
|
* Patch — targeted DOM updates driven by signal changes.
|
|
@@ -1403,6 +1467,29 @@ declare function printGraph(graph: ApplicationGraph): string;
|
|
|
1403
1467
|
declare function printDiagnostics(compiled: CompiledApplication): string;
|
|
1404
1468
|
/** Returns node counts per type. */
|
|
1405
1469
|
declare function nodeTypeStats(graph: ApplicationGraph): Record<string, number>;
|
|
1470
|
+
/** A single component instance surfaced for DevTools inspection (§21). */
|
|
1471
|
+
interface InspectedComponent {
|
|
1472
|
+
/** The build-order node id (churns across rebuilds — not stable identity). */
|
|
1473
|
+
id: string;
|
|
1474
|
+
/** The stable, author-provided identity key passed at the call site. */
|
|
1475
|
+
key: string | undefined;
|
|
1476
|
+
/** The definition's human-readable name (from `data-streetui-component`). */
|
|
1477
|
+
name: string;
|
|
1478
|
+
/** Depth of the component node in the graph. */
|
|
1479
|
+
depth: number;
|
|
1480
|
+
/** Number of direct child nodes the component rendered. */
|
|
1481
|
+
childCount: number;
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* List every `component()` instance in the graph, in document order, with its
|
|
1485
|
+
* stable `key`, human-readable `name` and location. Components are ordinary
|
|
1486
|
+
* `'component'` GraphNodes (they flow through `inspectGraph`/`printGraph`
|
|
1487
|
+
* already); this is the first-class, component-aware view for DevTools — it
|
|
1488
|
+
* reads the inspectable `data-streetui-component` name attribute the DSL sets,
|
|
1489
|
+
* never any internal `_`-prefixed metadata. Names/keys are stable across
|
|
1490
|
+
* fine-grained prop updates (which never rebuild the node).
|
|
1491
|
+
*/
|
|
1492
|
+
declare function inspectComponents(graph: ApplicationGraph): InspectedComponent[];
|
|
1406
1493
|
|
|
1407
1494
|
/**
|
|
1408
1495
|
* DevTools foundation (v0.6, Phase 18). A single read-only entry point that
|
|
@@ -1836,4 +1923,4 @@ interface ResolvedConfig {
|
|
|
1836
1923
|
/** Identity helper that gives `streetui.config.ts` full type-checking + inference. */
|
|
1837
1924
|
declare function defineConfig(config: StreetUIConfig): StreetUIConfig;
|
|
1838
1925
|
|
|
1839
|
-
export { type A11yIds, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, BrowserDOMAdapter, CleanupRegistry, 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 DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, EventBus, type EventHandler, FOCUSABLE_SELECTOR, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HydrationDiagnosticSink, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalOptions, type InspectedNode, type InspectedPage, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LifecycleHook, type LifecyclePhase, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, 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, type RenderContext, RenderHandle, type ResolvedConfig, type Resource, type ResourceInspection, type ResourceLike, type ResourceLoader, type ResourceLoaderContext, type ResourceOptions, type 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, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, createApplication, createBrowserHistory, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderContext, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, diagnosePerformance, email, environment, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, formatDiagnosticContext, frameworkError, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectContext, inspectForm, inspectGraph, inspectI18n, inspectResource, inspectRouter, inspectSignal, interpolate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, nodeTypeStats, normalizePath, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, reportDiagnostic, required, resolveTag, resource, routerOutlet, runValidators, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, validateGraph, wireEvents, wireReactiveList, wireSignalBindings };
|
|
1926
|
+
export { type A11yIds, Application, ApplicationGraph, ApplicationId, type ApplicationIdentity, type ApplicationInspection, type ApplicationOptions, type ApplicationPanel, BrowserDOMAdapter, CleanupRegistry, 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 DiagnosticsSummary, type DomBinding, DomEventRegistry, Environment, type EnvironmentCapabilities, type EnvironmentKind, EventBus, type EventHandler, FOCUSABLE_SELECTOR, type Field, type Form, type FormConfig, type FormInspection, type FormLike, type FormValidators, type FormValues, GraphNode, HydrationDiagnosticSink, type I18n, type I18nConfig, type I18nInspection, type I18nLike, type InspectFormOptions, type InspectI18nOptions, type InspectResourceOptions, type InspectSignalOptions, type InspectedComponent, type InspectedNode, type InspectedPage, type InterpolationParams, type IsActiveOptions, type Job, Lifecycle, type LifecycleHook, type LifecyclePhase, type MatchResult, type MessageMap, type MountFn, type MountRouterOptions, type MountedApplication, type MountedRouter, 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, type RenderContext, RenderHandle, type ResolvedConfig, type Resource, type ResourceInspection, type ResourceLike, type ResourceLoader, type ResourceLoaderContext, type ResourceOptions, type 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, Unsubscribe, type Validator, a11yIds, applyNodeProps, applyProp, bindDomEvent, browserDOMAdapter, buttonUpdate, consoleDiagnosticSink, containFocus, createApplication, createBrowserHistory, createContext, createDevTools, createForm, createI18n, createMemoryHistory, createRenderContext, createRenderer, createRouter, createRuntime, createStore, createStreetEvent, defineConfig, diagnosePerformance, email, environment, escapeHtmlAttr, escapeHtmlText, flushSync, focusById, focusFirst, focusInitial, formatDiagnosticContext, frameworkError, getFocusable, globalEventBus, headingUpdate, hydrateGraph, inputUpdate, inspectApplication, inspectComponents, inspectContext, inspectForm, inspectGraph, inspectI18n, inspectResource, inspectRouter, inspectSignal, interpolate, matchPattern, matchRoutes, maxLength, minLength, mountGraph, mountNode, mountRouter, nodeTypeStats, normalizePath, onEscape, patchNode, patchProp, pattern, printDiagnostics, printGraph, reconcileChildren, reconcileChildrenByPlan, reportDiagnostic, required, resolveTag, resource, restoreFocus, routerOutlet, runValidators, saveFocus, scheduleImmediate, scheduleUpdate, scheduler, serializeChildren, serializeServerNode, splitTarget, textUpdate, toIdToken, transformGraph, trapFocus, validateGraph, wireComponentBehavior, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };
|