streetui 1.6.0 → 1.7.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/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as Signal, b as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, c as ApplicationGraph, G as GraphNode, C as CompiledApplication, d as SemanticNodeType, P as PageDSL, e as ContainerDSL, f as SignalKind } from './compile-CEom4hkp.cjs';
2
- export { g as A11yOptions, h as AppBuilder, i as AppDSL, j as AppOptions, k as ApplicationGraphOptions, B as BaseNode, l as Bindable, m as BindableText, n as BoundInputOptions, o as ButtonOptions, p as CompileOptions, q as ContainerBuilder, r as ContainerBuilderImpl, s as ContainerOptions, t as ContentDSL, u as ControlledInputOptions, v as DerivedSignal, w as Diagnostic, x as DiagnosticError, y as DiagnosticLocation, z as DiagnosticSeverity, E as ErrorBoundaryOptions, F as ErrorFallbackBuilder, H as ErrorSource, I as EventDescriptor, J as FormBuilder, K as FormBuilderImpl, L as FormDSL, M as FormOptions, N as GraphNodeData, O as HandlerFn, Q as HeadingOptions, T as ImageOptions, W as InputOptions, X as InputOptionsBase, Y as LinkOptions, Z as ListBuilder, _ as ListBuilderImpl, $ as ListDSL, a0 as ListOptions, a1 as ListPlanEntry, a2 as NodeId, a3 as NodeMetadata, a4 as PageBuilder, a5 as PageBuilderImpl, a6 as PropValue, a7 as Props, a8 as ReactiveConsumer, a9 as ReactiveSource, aa as SectionBuilder, ab as SectionBuilderImpl, ac as SectionDSL, ad as SectionOptions, ae as SerializedGraph, af as SerializedNode, ag as StateRef, S as StreetApp, ah as StreetUI, ai as TextOptions, aj as TextValue, V as VERSION, ak as batch, al as compile, am as compileGraph, an as createNodeId, ao as derived, ap as effect, aq as formatDiagnostic, ar as generateApplicationId, as as generateNodeId, at as isBatching, au as nextId, av as nodeIdPrefix, aw as observerCount, ax as reactiveListItemKey, ay as reactiveListItemSignature, az as resetIdCounter, aA as signal, aB as signalKind, aC as streetui } from './compile-CEom4hkp.cjs';
3
- import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-D286jpZZ.cjs';
4
- export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-D286jpZZ.cjs';
5
- import { D as DOMAdapter } from './server-C2xovHHb.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-C2xovHHb.cjs';
1
+ import { a as Signal, b as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, c as ApplicationGraph, G as GraphNode, C as CompiledApplication, d as SemanticNodeType, P as PageDSL, e as ContainerDSL, f as SignalKind } from './compile-Cte0nf06.cjs';
2
+ export { g as A11yOptions, h as AppBuilder, i as AppDSL, j as AppOptions, k as ApplicationGraphOptions, B as BaseNode, l as Bindable, m as BindableText, n as BoundInputOptions, o as ButtonOptions, p as CompileOptions, q as ContainerBuilder, r as ContainerBuilderImpl, s as ContainerOptions, t as ContentDSL, u as ControlledInputOptions, v as DerivedSignal, w as Diagnostic, x as DiagnosticError, y as DiagnosticLocation, z as DiagnosticSeverity, E as ErrorBoundaryOptions, F as ErrorFallbackBuilder, H as ErrorSource, I as EventDescriptor, J as FormBuilder, K as FormBuilderImpl, L as FormDSL, M as FormOptions, N as GraphNodeData, O as HandlerFn, Q as HeadingOptions, T as ImageOptions, W as InputOptions, X as InputOptionsBase, Y as LinkOptions, Z as ListBuilder, _ as ListBuilderImpl, $ as ListDSL, a0 as ListOptions, a1 as ListPlanEntry, a2 as NodeId, a3 as NodeMetadata, a4 as OverlayOptions, a5 as PageBuilder, a6 as PageBuilderImpl, a7 as PortalOptions, a8 as PropValue, a9 as Props, aa as ReactiveConsumer, ab as ReactiveSource, ac as SectionBuilder, ad as SectionBuilderImpl, ae as SectionDSL, af as SectionOptions, ag as SerializedGraph, ah as SerializedNode, ai as StateRef, S as StreetApp, aj as StreetUI, ak as TextOptions, al as TextValue, V as VERSION, am as batch, an as compile, ao as compileGraph, ap as createNodeId, aq as derived, ar as effect, as as formatDiagnostic, at as generateApplicationId, au as generateNodeId, av as isBatching, aw as nextId, ax as nodeIdPrefix, ay as observerCount, az as reactiveListItemKey, aA as reactiveListItemSignature, aB as resetIdCounter, aC as signal, aD as signalKind, aE as streetui } from './compile-Cte0nf06.cjs';
3
+ import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-zK-fihvd.cjs';
4
+ export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-zK-fihvd.cjs';
5
+ import { D as DOMAdapter } from './server-D4A8eunr.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-D4A8eunr.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;
@@ -579,7 +583,7 @@ declare const browserDOMAdapter: BrowserDOMAdapter;
579
583
  * `DOMAdapter` interface, and `ServerDOMAdapter` translates adapter calls into
580
584
  * operations on this model.
581
585
  */
582
- type ServerNodeKind = 'element' | 'text' | 'comment' | 'fragment';
586
+ type ServerNodeKind = 'element' | 'text' | 'comment' | 'fragment' | 'raw';
583
587
  interface ServerNode {
584
588
  readonly kind: ServerNodeKind;
585
589
  parent: ServerParent | null;
@@ -609,6 +613,25 @@ declare class ServerFragment implements ServerNode {
609
613
  parent: ServerParent | null;
610
614
  readonly children: ServerNode[];
611
615
  }
616
+ /**
617
+ * A pre-serialized, verbatim HTML fragment (v1.7 static SSR plan).
618
+ *
619
+ * Emitted for provably-static subtrees whose HTML the compiler-derived static
620
+ * SSR plan already computed once. Serializing this node copies its stored
621
+ * string directly — it allocates no ServerElement/ServerText, no attribute Map
622
+ * and no children array for the collapsed subtree. The stored `html` is
623
+ * produced by the exact same mount + serialize pipeline as the runtime path, so
624
+ * the output is byte-identical (the v1.7 byte-identity gate proves this).
625
+ *
626
+ * This node is SSR-only: it is created solely via `ServerDOMAdapter.createRawHTML`
627
+ * on the server render path and never appears in a browser build.
628
+ */
629
+ declare class ServerRawHTML implements ServerNode {
630
+ readonly kind: "raw";
631
+ parent: ServerParent | null;
632
+ readonly html: string;
633
+ constructor(html: string);
634
+ }
612
635
  declare class ServerElement implements ServerNode {
613
636
  readonly kind: "element";
614
637
  parent: ServerParent | null;
@@ -627,7 +650,7 @@ declare class ServerElement implements ServerNode {
627
650
  declare function escapeHtmlText(value: string): string;
628
651
  /** Escape a double-quoted attribute value. */
629
652
  declare function escapeHtmlAttr(value: string): string;
630
- /** Serialize a single server node (element/text/comment/fragment) to HTML. */
653
+ /** Serialize a single server node (element/text/comment/fragment/raw) to HTML. */
631
654
  declare function serializeServerNode(node: ServerNode): string;
632
655
  /** Serialize the children of an element or fragment (its "inner HTML"). */
633
656
  declare function serializeChildren(node: ServerElement | ServerFragment): string;
@@ -655,6 +678,42 @@ declare function focusById(dom: DOMAdapter, root: Element | Document, id: string
655
678
  * Returns true if a focusable element was found and focused.
656
679
  */
657
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;
658
717
 
659
718
  /**
660
719
  * NodeInstance — the renderer's live counterpart to a GraphNode.
@@ -698,8 +757,18 @@ interface RenderContext {
698
757
  * DevTools/diagnostics stay off the production runtime path.
699
758
  */
700
759
  readonly hydrationDiagnostics?: HydrationDiagnosticSink;
760
+ /**
761
+ * Optional SSR-only static-subtree plan (v1.7). Maps a maximal
762
+ * static-subtree root GraphNode.id → its precomputed, verbatim HTML string.
763
+ * Present only on the server render path when a plan has been built; on the
764
+ * browser mount path it is always `undefined`, so the client hot path is
765
+ * unaffected (a single `=== undefined` check short-circuits). When a mounted
766
+ * node's id is in this map, the renderer emits the precomputed HTML via
767
+ * `dom.createRawHTML` instead of recursively constructing the subtree.
768
+ */
769
+ readonly staticHTML?: ReadonlyMap<string, string>;
701
770
  }
702
- declare function createRenderContext(dom: DOMAdapter, graph: ApplicationGraph, container: Element, hydrationDiagnostics?: HydrationDiagnosticSink): RenderContext;
771
+ declare function createRenderContext(dom: DOMAdapter, graph: ApplicationGraph, container: Element, hydrationDiagnostics?: HydrationDiagnosticSink, staticHTML?: ReadonlyMap<string, string>): RenderContext;
703
772
 
704
773
  /**
705
774
  * Attribute and property application helpers.
@@ -756,6 +825,20 @@ declare function wireSignalBindings(ctx: RenderContext, graphNode: GraphNode, in
756
825
  * eager build factory (it only ever renders 0..1 branch, so eager is fine).
757
826
  */
758
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;
759
842
 
760
843
  /**
761
844
  * Patch — targeted DOM updates driven by signal changes.
@@ -1807,4 +1890,4 @@ interface ResolvedConfig {
1807
1890
  /** Identity helper that gives `streetui.config.ts` full type-checking + inference. */
1808
1891
  declare function defineConfig(config: StreetUIConfig): StreetUIConfig;
1809
1892
 
1810
- 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, 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 };
1893
+ 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, 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, 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, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as Signal, b as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, c as ApplicationGraph, G as GraphNode, C as CompiledApplication, d as SemanticNodeType, P as PageDSL, e as ContainerDSL, f as SignalKind } from './compile-CEom4hkp.js';
2
- export { g as A11yOptions, h as AppBuilder, i as AppDSL, j as AppOptions, k as ApplicationGraphOptions, B as BaseNode, l as Bindable, m as BindableText, n as BoundInputOptions, o as ButtonOptions, p as CompileOptions, q as ContainerBuilder, r as ContainerBuilderImpl, s as ContainerOptions, t as ContentDSL, u as ControlledInputOptions, v as DerivedSignal, w as Diagnostic, x as DiagnosticError, y as DiagnosticLocation, z as DiagnosticSeverity, E as ErrorBoundaryOptions, F as ErrorFallbackBuilder, H as ErrorSource, I as EventDescriptor, J as FormBuilder, K as FormBuilderImpl, L as FormDSL, M as FormOptions, N as GraphNodeData, O as HandlerFn, Q as HeadingOptions, T as ImageOptions, W as InputOptions, X as InputOptionsBase, Y as LinkOptions, Z as ListBuilder, _ as ListBuilderImpl, $ as ListDSL, a0 as ListOptions, a1 as ListPlanEntry, a2 as NodeId, a3 as NodeMetadata, a4 as PageBuilder, a5 as PageBuilderImpl, a6 as PropValue, a7 as Props, a8 as ReactiveConsumer, a9 as ReactiveSource, aa as SectionBuilder, ab as SectionBuilderImpl, ac as SectionDSL, ad as SectionOptions, ae as SerializedGraph, af as SerializedNode, ag as StateRef, S as StreetApp, ah as StreetUI, ai as TextOptions, aj as TextValue, V as VERSION, ak as batch, al as compile, am as compileGraph, an as createNodeId, ao as derived, ap as effect, aq as formatDiagnostic, ar as generateApplicationId, as as generateNodeId, at as isBatching, au as nextId, av as nodeIdPrefix, aw as observerCount, ax as reactiveListItemKey, ay as reactiveListItemSignature, az as resetIdCounter, aA as signal, aB as signalKind, aC as streetui } from './compile-CEom4hkp.js';
3
- import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-YrG-OJJe.js';
4
- export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-YrG-OJJe.js';
5
- import { D as DOMAdapter } from './server-xU-BEwAj.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-xU-BEwAj.js';
1
+ import { a as Signal, b as Subscriber, U as Unsubscribe, R as ReadonlySignal, A as ApplicationId, D as DiagnosticCollector, c as ApplicationGraph, G as GraphNode, C as CompiledApplication, d as SemanticNodeType, P as PageDSL, e as ContainerDSL, f as SignalKind } from './compile-Cte0nf06.js';
2
+ export { g as A11yOptions, h as AppBuilder, i as AppDSL, j as AppOptions, k as ApplicationGraphOptions, B as BaseNode, l as Bindable, m as BindableText, n as BoundInputOptions, o as ButtonOptions, p as CompileOptions, q as ContainerBuilder, r as ContainerBuilderImpl, s as ContainerOptions, t as ContentDSL, u as ControlledInputOptions, v as DerivedSignal, w as Diagnostic, x as DiagnosticError, y as DiagnosticLocation, z as DiagnosticSeverity, E as ErrorBoundaryOptions, F as ErrorFallbackBuilder, H as ErrorSource, I as EventDescriptor, J as FormBuilder, K as FormBuilderImpl, L as FormDSL, M as FormOptions, N as GraphNodeData, O as HandlerFn, Q as HeadingOptions, T as ImageOptions, W as InputOptions, X as InputOptionsBase, Y as LinkOptions, Z as ListBuilder, _ as ListBuilderImpl, $ as ListDSL, a0 as ListOptions, a1 as ListPlanEntry, a2 as NodeId, a3 as NodeMetadata, a4 as OverlayOptions, a5 as PageBuilder, a6 as PageBuilderImpl, a7 as PortalOptions, a8 as PropValue, a9 as Props, aa as ReactiveConsumer, ab as ReactiveSource, ac as SectionBuilder, ad as SectionBuilderImpl, ae as SectionDSL, af as SectionOptions, ag as SerializedGraph, ah as SerializedNode, ai as StateRef, S as StreetApp, aj as StreetUI, ak as TextOptions, al as TextValue, V as VERSION, am as batch, an as compile, ao as compileGraph, ap as createNodeId, aq as derived, ar as effect, as as formatDiagnostic, at as generateApplicationId, au as generateNodeId, av as isBatching, aw as nextId, ax as nodeIdPrefix, ay as observerCount, az as reactiveListItemKey, aA as reactiveListItemSignature, aB as resetIdCounter, aC as signal, aD as signalKind, aE as streetui } from './compile-Cte0nf06.js';
3
+ import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-Ddgs3Puu.js';
4
+ export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-Ddgs3Puu.js';
5
+ import { D as DOMAdapter } from './server-cgmCiPsz.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-cgmCiPsz.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;
@@ -579,7 +583,7 @@ declare const browserDOMAdapter: BrowserDOMAdapter;
579
583
  * `DOMAdapter` interface, and `ServerDOMAdapter` translates adapter calls into
580
584
  * operations on this model.
581
585
  */
582
- type ServerNodeKind = 'element' | 'text' | 'comment' | 'fragment';
586
+ type ServerNodeKind = 'element' | 'text' | 'comment' | 'fragment' | 'raw';
583
587
  interface ServerNode {
584
588
  readonly kind: ServerNodeKind;
585
589
  parent: ServerParent | null;
@@ -609,6 +613,25 @@ declare class ServerFragment implements ServerNode {
609
613
  parent: ServerParent | null;
610
614
  readonly children: ServerNode[];
611
615
  }
616
+ /**
617
+ * A pre-serialized, verbatim HTML fragment (v1.7 static SSR plan).
618
+ *
619
+ * Emitted for provably-static subtrees whose HTML the compiler-derived static
620
+ * SSR plan already computed once. Serializing this node copies its stored
621
+ * string directly — it allocates no ServerElement/ServerText, no attribute Map
622
+ * and no children array for the collapsed subtree. The stored `html` is
623
+ * produced by the exact same mount + serialize pipeline as the runtime path, so
624
+ * the output is byte-identical (the v1.7 byte-identity gate proves this).
625
+ *
626
+ * This node is SSR-only: it is created solely via `ServerDOMAdapter.createRawHTML`
627
+ * on the server render path and never appears in a browser build.
628
+ */
629
+ declare class ServerRawHTML implements ServerNode {
630
+ readonly kind: "raw";
631
+ parent: ServerParent | null;
632
+ readonly html: string;
633
+ constructor(html: string);
634
+ }
612
635
  declare class ServerElement implements ServerNode {
613
636
  readonly kind: "element";
614
637
  parent: ServerParent | null;
@@ -627,7 +650,7 @@ declare class ServerElement implements ServerNode {
627
650
  declare function escapeHtmlText(value: string): string;
628
651
  /** Escape a double-quoted attribute value. */
629
652
  declare function escapeHtmlAttr(value: string): string;
630
- /** Serialize a single server node (element/text/comment/fragment) to HTML. */
653
+ /** Serialize a single server node (element/text/comment/fragment/raw) to HTML. */
631
654
  declare function serializeServerNode(node: ServerNode): string;
632
655
  /** Serialize the children of an element or fragment (its "inner HTML"). */
633
656
  declare function serializeChildren(node: ServerElement | ServerFragment): string;
@@ -655,6 +678,42 @@ declare function focusById(dom: DOMAdapter, root: Element | Document, id: string
655
678
  * Returns true if a focusable element was found and focused.
656
679
  */
657
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;
658
717
 
659
718
  /**
660
719
  * NodeInstance — the renderer's live counterpart to a GraphNode.
@@ -698,8 +757,18 @@ interface RenderContext {
698
757
  * DevTools/diagnostics stay off the production runtime path.
699
758
  */
700
759
  readonly hydrationDiagnostics?: HydrationDiagnosticSink;
760
+ /**
761
+ * Optional SSR-only static-subtree plan (v1.7). Maps a maximal
762
+ * static-subtree root GraphNode.id → its precomputed, verbatim HTML string.
763
+ * Present only on the server render path when a plan has been built; on the
764
+ * browser mount path it is always `undefined`, so the client hot path is
765
+ * unaffected (a single `=== undefined` check short-circuits). When a mounted
766
+ * node's id is in this map, the renderer emits the precomputed HTML via
767
+ * `dom.createRawHTML` instead of recursively constructing the subtree.
768
+ */
769
+ readonly staticHTML?: ReadonlyMap<string, string>;
701
770
  }
702
- declare function createRenderContext(dom: DOMAdapter, graph: ApplicationGraph, container: Element, hydrationDiagnostics?: HydrationDiagnosticSink): RenderContext;
771
+ declare function createRenderContext(dom: DOMAdapter, graph: ApplicationGraph, container: Element, hydrationDiagnostics?: HydrationDiagnosticSink, staticHTML?: ReadonlyMap<string, string>): RenderContext;
703
772
 
704
773
  /**
705
774
  * Attribute and property application helpers.
@@ -756,6 +825,20 @@ declare function wireSignalBindings(ctx: RenderContext, graphNode: GraphNode, in
756
825
  * eager build factory (it only ever renders 0..1 branch, so eager is fine).
757
826
  */
758
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;
759
842
 
760
843
  /**
761
844
  * Patch — targeted DOM updates driven by signal changes.
@@ -1807,4 +1890,4 @@ interface ResolvedConfig {
1807
1890
  /** Identity helper that gives `streetui.config.ts` full type-checking + inference. */
1808
1891
  declare function defineConfig(config: StreetUIConfig): StreetUIConfig;
1809
1892
 
1810
- 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, 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 };
1893
+ 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, 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, 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, wireEvents, wireOverlayBehavior, wireReactiveList, wireSignalBindings };