streetui 2.5.0 → 2.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/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-j2ged4cF.d.cts → hydration-diagnostics-Bh0-5vdC.d.cts} +82 -60
- package/dist/{hydration-diagnostics-j2ged4cF.d.ts → hydration-diagnostics-Bh0-5vdC.d.ts} +82 -60
- package/dist/index.cjs +1443 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1033 -6
- package/dist/index.d.ts +1033 -6
- package/dist/index.js +1376 -201
- package/dist/index.js.map +1 -1
- package/dist/{renderer-interface-DngAhfHx.d.ts → renderer-interface-BOpzkWWQ.d.ts} +1 -1
- package/dist/{renderer-interface-hcqzG-N6.d.cts → renderer-interface-D0021Or5.d.cts} +1 -1
- package/dist/{server-VTKCPoqG.d.ts → server-CzcNNC9F.d.ts} +1 -1
- package/dist/{server-Codluzqu.d.cts → server-cE_Qhu4k.d.cts} +1 -1
- package/dist/server.cjs +30 -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 +30 -1
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +245 -183
- 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 +245 -183
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* (`streetui --version`) — the consolidated test-suite pins all three to the
|
|
8
8
|
* same coordinated release so they can never silently drift apart.
|
|
9
9
|
*/
|
|
10
|
-
declare const VERSION = "2.
|
|
10
|
+
declare const VERSION = "2.7.0";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* StreetUI reactive signals — framework-owned reactivity, no external libraries.
|
|
@@ -275,7 +275,7 @@ declare function formatDiagnostic(d: Diagnostic): string;
|
|
|
275
275
|
* in the Semantic Application Graph.
|
|
276
276
|
*/
|
|
277
277
|
|
|
278
|
-
type SemanticNodeType = 'application' | 'page' | 'section' | 'container' | 'heading' | 'text' | 'button' | 'input' | 'form' | 'list' | 'list-item' | 'image' | 'link' | 'component' | 'slot' | 'fragment' | 'reactive-list' | 'conditional' | 'portal' | 'head';
|
|
278
|
+
type SemanticNodeType = 'application' | 'page' | 'section' | 'container' | 'heading' | 'text' | 'button' | 'input' | 'form' | 'list' | 'list-item' | 'image' | 'link' | 'code' | 'component' | 'slot' | 'fragment' | 'reactive-list' | 'conditional' | 'portal' | 'head';
|
|
279
279
|
interface NodeMetadata {
|
|
280
280
|
readonly createdAt: number;
|
|
281
281
|
readonly [key: string]: unknown;
|
|
@@ -759,60 +759,60 @@ type BindableText = TextValue | ReadonlySignal<TextValue>;
|
|
|
759
759
|
*/
|
|
760
760
|
interface A11yOptions {
|
|
761
761
|
/** ARIA role (e.g. 'dialog', 'alert', 'status', 'navigation'). */
|
|
762
|
-
readonly role?: string;
|
|
762
|
+
readonly role?: string | undefined;
|
|
763
763
|
/** tabindex value. Use 0 to make an element focusable, -1 to remove from tab order. */
|
|
764
|
-
readonly tabIndex?: number;
|
|
764
|
+
readonly tabIndex?: number | undefined;
|
|
765
765
|
/** aria-label — an accessible name when no visible label element exists. */
|
|
766
|
-
readonly ariaLabel?: string;
|
|
766
|
+
readonly ariaLabel?: string | undefined;
|
|
767
767
|
/** aria-labelledby — id(s) of the element(s) that label this one. */
|
|
768
|
-
readonly ariaLabelledBy?: string;
|
|
768
|
+
readonly ariaLabelledBy?: string | undefined;
|
|
769
769
|
/** aria-describedby — id(s) of the element(s) that describe this one. */
|
|
770
|
-
readonly ariaDescribedBy?: string;
|
|
770
|
+
readonly ariaDescribedBy?: string | undefined;
|
|
771
771
|
/** aria-expanded — for disclosure widgets (rendered as the string "true"/"false"). */
|
|
772
|
-
readonly ariaExpanded?: boolean;
|
|
772
|
+
readonly ariaExpanded?: boolean | undefined;
|
|
773
773
|
/** aria-controls — id of the element this one controls. */
|
|
774
|
-
readonly ariaControls?: string;
|
|
774
|
+
readonly ariaControls?: string | undefined;
|
|
775
775
|
/** aria-hidden — hide decorative content from assistive tech. */
|
|
776
|
-
readonly ariaHidden?: boolean;
|
|
776
|
+
readonly ariaHidden?: boolean | undefined;
|
|
777
777
|
/** aria-live — announce dynamic changes ('polite' | 'assertive' | 'off'). */
|
|
778
|
-
readonly ariaLive?: 'off' | 'polite' | 'assertive';
|
|
778
|
+
readonly ariaLive?: 'off' | 'polite' | 'assertive' | undefined;
|
|
779
779
|
/** aria-current — mark the current item in a set (e.g. 'page' for active nav). */
|
|
780
|
-
readonly ariaCurrent?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
780
|
+
readonly ariaCurrent?: boolean | 'page' | 'step' | 'location' | 'date' | 'time' | undefined;
|
|
781
781
|
/** aria-invalid — mark a form field as failing validation. */
|
|
782
|
-
readonly ariaInvalid?: boolean;
|
|
782
|
+
readonly ariaInvalid?: boolean | undefined;
|
|
783
783
|
/** aria-required — mark a form field as required. */
|
|
784
|
-
readonly ariaRequired?: boolean;
|
|
784
|
+
readonly ariaRequired?: boolean | undefined;
|
|
785
785
|
/** aria-modal — mark a dialog as modal (content outside is inert to AT). */
|
|
786
|
-
readonly ariaModal?: boolean;
|
|
786
|
+
readonly ariaModal?: boolean | undefined;
|
|
787
787
|
/** aria-owns — id(s) of elements owned by this one when the DOM can't express it. */
|
|
788
|
-
readonly ariaOwns?: string;
|
|
788
|
+
readonly ariaOwns?: string | undefined;
|
|
789
789
|
/** aria-activedescendant — id of the active option in a composite widget (menu/listbox/combobox). */
|
|
790
|
-
readonly ariaActiveDescendant?: string;
|
|
790
|
+
readonly ariaActiveDescendant?: string | undefined;
|
|
791
791
|
/** aria-haspopup — the element opens a popup ('menu' | 'listbox' | 'dialog' | 'grid' | 'tree' | true). */
|
|
792
|
-
readonly ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
792
|
+
readonly ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;
|
|
793
793
|
/** aria-selected — selection state within a composite widget. */
|
|
794
|
-
readonly ariaSelected?: boolean;
|
|
794
|
+
readonly ariaSelected?: boolean | undefined;
|
|
795
795
|
}
|
|
796
796
|
interface TextOptions extends A11yOptions {
|
|
797
|
-
readonly class?: string;
|
|
798
|
-
readonly id?: string;
|
|
797
|
+
readonly class?: string | undefined;
|
|
798
|
+
readonly id?: string | undefined;
|
|
799
799
|
}
|
|
800
800
|
interface HeadingOptions extends TextOptions {
|
|
801
|
-
readonly level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
801
|
+
readonly level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
802
802
|
}
|
|
803
803
|
interface ButtonOptions extends A11yOptions {
|
|
804
|
-
readonly class?: string;
|
|
805
|
-
readonly id?: string;
|
|
806
|
-
readonly disabled?: Bindable<boolean
|
|
807
|
-
readonly onClick?: () => void;
|
|
804
|
+
readonly class?: string | undefined;
|
|
805
|
+
readonly id?: string | undefined;
|
|
806
|
+
readonly disabled?: Bindable<boolean> | undefined;
|
|
807
|
+
readonly onClick?: (() => void) | undefined;
|
|
808
808
|
}
|
|
809
809
|
interface InputOptionsBase extends A11yOptions {
|
|
810
|
-
readonly class?: string;
|
|
811
|
-
readonly id?: string;
|
|
812
|
-
readonly type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
|
|
813
|
-
readonly placeholder?: string;
|
|
814
|
-
readonly disabled?: Bindable<boolean
|
|
815
|
-
readonly onChange?: (value: string) => void;
|
|
810
|
+
readonly class?: string | undefined;
|
|
811
|
+
readonly id?: string | undefined;
|
|
812
|
+
readonly type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | undefined;
|
|
813
|
+
readonly placeholder?: string | undefined;
|
|
814
|
+
readonly disabled?: Bindable<boolean> | undefined;
|
|
815
|
+
readonly onChange?: ((value: string) => void) | undefined;
|
|
816
816
|
}
|
|
817
817
|
/**
|
|
818
818
|
* Explicitly-controlled input: supply `value` and/or `onInput` yourself.
|
|
@@ -821,8 +821,8 @@ interface InputOptionsBase extends A11yOptions {
|
|
|
821
821
|
* the type checker rather than resolved silently at runtime.
|
|
822
822
|
*/
|
|
823
823
|
interface ControlledInputOptions extends InputOptionsBase {
|
|
824
|
-
readonly value?: Bindable<string
|
|
825
|
-
readonly onInput?: (value: string) => void;
|
|
824
|
+
readonly value?: Bindable<string> | undefined;
|
|
825
|
+
readonly onInput?: ((value: string) => void) | undefined;
|
|
826
826
|
readonly bind?: never;
|
|
827
827
|
}
|
|
828
828
|
/**
|
|
@@ -837,24 +837,37 @@ interface BoundInputOptions extends InputOptionsBase {
|
|
|
837
837
|
}
|
|
838
838
|
type InputOptions = ControlledInputOptions | BoundInputOptions;
|
|
839
839
|
interface LinkOptions extends A11yOptions {
|
|
840
|
-
readonly class?: string;
|
|
841
|
-
readonly id?: string;
|
|
840
|
+
readonly class?: string | undefined;
|
|
841
|
+
readonly id?: string | undefined;
|
|
842
842
|
readonly href: string;
|
|
843
|
-
readonly external?: boolean;
|
|
844
|
-
readonly onClick?: () => void;
|
|
843
|
+
readonly external?: boolean | undefined;
|
|
844
|
+
readonly onClick?: (() => void) | undefined;
|
|
845
845
|
}
|
|
846
846
|
interface ImageOptions extends A11yOptions {
|
|
847
|
-
readonly class?: string;
|
|
848
|
-
readonly id?: string;
|
|
847
|
+
readonly class?: string | undefined;
|
|
848
|
+
readonly id?: string | undefined;
|
|
849
849
|
readonly src: string;
|
|
850
850
|
readonly alt: string;
|
|
851
|
-
readonly width?: number;
|
|
852
|
-
readonly height?: number;
|
|
851
|
+
readonly width?: number | undefined;
|
|
852
|
+
readonly height?: number | undefined;
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Options for the `code` leaf — a semantic preformatted code block that renders
|
|
856
|
+
* as `<pre><code>…</code></pre>` with the source escaped at the renderer
|
|
857
|
+
* boundary (no raw-HTML injection). An optional `language` hint is emitted as a
|
|
858
|
+
* `data-language` attribute on the outer `<pre>` for styling / highlighting
|
|
859
|
+
* hooks; it is purely declarative and never parsed or executed by the
|
|
860
|
+
* framework.
|
|
861
|
+
*/
|
|
862
|
+
interface CodeOptions extends A11yOptions {
|
|
863
|
+
readonly class?: string | undefined;
|
|
864
|
+
readonly id?: string | undefined;
|
|
865
|
+
readonly language?: string | undefined;
|
|
853
866
|
}
|
|
854
867
|
interface ContainerOptions extends A11yOptions {
|
|
855
|
-
readonly class?: string;
|
|
856
|
-
readonly id?: string;
|
|
857
|
-
readonly key?: string;
|
|
868
|
+
readonly class?: string | undefined;
|
|
869
|
+
readonly id?: string | undefined;
|
|
870
|
+
readonly key?: string | undefined;
|
|
858
871
|
/**
|
|
859
872
|
* Enter/leave transition for this element (§2). CSS class-based and
|
|
860
873
|
* browser-only: on the server it is ignored (deterministic SSR output). The
|
|
@@ -863,12 +876,12 @@ interface ContainerOptions extends A11yOptions {
|
|
|
863
876
|
* before the element is removed and disposed — the reconciler defers teardown
|
|
864
877
|
* until the transition completes.
|
|
865
878
|
*/
|
|
866
|
-
readonly transition?: TransitionConfig;
|
|
879
|
+
readonly transition?: TransitionConfig | undefined;
|
|
867
880
|
}
|
|
868
881
|
interface SectionOptions extends ContainerOptions {
|
|
869
882
|
}
|
|
870
883
|
interface FormOptions extends ContainerOptions {
|
|
871
|
-
readonly onSubmit?: (e: Event) => void;
|
|
884
|
+
readonly onSubmit?: ((e: Event) => void) | undefined;
|
|
872
885
|
}
|
|
873
886
|
interface ListOptions extends ContainerOptions {
|
|
874
887
|
/**
|
|
@@ -878,14 +891,14 @@ interface ListOptions extends ContainerOptions {
|
|
|
878
891
|
* reclaimed (leave→enter). `transition` (inherited) applies to the list
|
|
879
892
|
* container itself; `itemTransition` applies to its rows.
|
|
880
893
|
*/
|
|
881
|
-
readonly itemTransition?: TransitionConfig;
|
|
894
|
+
readonly itemTransition?: TransitionConfig | undefined;
|
|
882
895
|
}
|
|
883
896
|
/** Options for `when()` (§2 conditional transitions). */
|
|
884
897
|
interface WhenOptions {
|
|
885
898
|
/** Transition applied to the active branch as it mounts/unmounts. */
|
|
886
|
-
readonly transition?: TransitionConfig;
|
|
899
|
+
readonly transition?: TransitionConfig | undefined;
|
|
887
900
|
/** Also animate the branch present on the initial mount (appear). */
|
|
888
|
-
readonly appear?: boolean;
|
|
901
|
+
readonly appear?: boolean | undefined;
|
|
889
902
|
}
|
|
890
903
|
/** Options for a plain portal (mount children into `document.body`). */
|
|
891
904
|
interface PortalOptions extends ContainerOptions {
|
|
@@ -903,13 +916,13 @@ interface OverlayOptions extends ContainerOptions {
|
|
|
903
916
|
/** Reactive open/visibility state. When it flips, the panel mounts/unmounts. */
|
|
904
917
|
readonly open: Bindable<boolean>;
|
|
905
918
|
/** Requested-close callback (fired on Escape when `closeOnEscape`). Flip `open` here. */
|
|
906
|
-
readonly onClose?: () => void;
|
|
919
|
+
readonly onClose?: (() => void) | undefined;
|
|
907
920
|
/** Restore focus to the previously-focused element on close. Default: per-kind. */
|
|
908
|
-
readonly restoreFocus?: boolean;
|
|
921
|
+
readonly restoreFocus?: boolean | undefined;
|
|
909
922
|
/** id of the element to focus first when the overlay opens (else first focusable). */
|
|
910
|
-
readonly initialFocusId?: string;
|
|
923
|
+
readonly initialFocusId?: string | undefined;
|
|
911
924
|
/** Escape key invokes `onClose`. Default: per-kind. */
|
|
912
|
-
readonly closeOnEscape?: boolean;
|
|
925
|
+
readonly closeOnEscape?: boolean | undefined;
|
|
913
926
|
}
|
|
914
927
|
type SectionBuilder = (section: SectionDSL) => void;
|
|
915
928
|
type ContainerBuilder = (container: ContainerDSL) => void;
|
|
@@ -927,9 +940,9 @@ interface ErrorBoundaryOptions {
|
|
|
927
940
|
* Reactive error source(s) to observe — typically a resource's `error` signal.
|
|
928
941
|
* When any becomes non-null, the fallback replaces the body.
|
|
929
942
|
*/
|
|
930
|
-
readonly source?: ErrorSource | ReadonlyArray<ErrorSource
|
|
943
|
+
readonly source?: ErrorSource | ReadonlyArray<ErrorSource> | undefined;
|
|
931
944
|
/** Invoked by the fallback's `retry()`, before the body is re-attempted (e.g. `resource.refetch`). */
|
|
932
|
-
readonly onRetry?: () => void;
|
|
945
|
+
readonly onRetry?: (() => void) | undefined;
|
|
933
946
|
/**
|
|
934
947
|
* Error-reporting hook (§6/§7). Called with the current error each time the
|
|
935
948
|
* boundary ENTERS its error state (i.e. when the fallback mounts), including
|
|
@@ -938,7 +951,7 @@ interface ErrorBoundaryOptions {
|
|
|
938
951
|
* boundary's behavior, and receives the same `unknown` error the fallback
|
|
939
952
|
* sees (no sensitive framework internals are injected).
|
|
940
953
|
*/
|
|
941
|
-
readonly onError?: (error: unknown) => void;
|
|
954
|
+
readonly onError?: ((error: unknown) => void) | undefined;
|
|
942
955
|
}
|
|
943
956
|
/**
|
|
944
957
|
* Branch builders for {@link ContainerDSL.asyncBoundary} — the loading / error /
|
|
@@ -952,12 +965,12 @@ interface ErrorBoundaryOptions {
|
|
|
952
965
|
*/
|
|
953
966
|
interface AsyncBoundaryBranches<T> {
|
|
954
967
|
/** Shown while the resource is idle or performing its first load (no data yet). */
|
|
955
|
-
readonly loading?: (content: ContainerDSL) => void;
|
|
968
|
+
readonly loading?: ((content: ContainerDSL) => void) | undefined;
|
|
956
969
|
/**
|
|
957
970
|
* Shown while the resource is in its error state. Receives the current error
|
|
958
971
|
* and a `retry()` that re-runs the loader (a thin wrapper over `refetch`).
|
|
959
972
|
*/
|
|
960
|
-
readonly error?: (content: ContainerDSL, error: unknown, retry: () => void) => void;
|
|
973
|
+
readonly error?: ((content: ContainerDSL, error: unknown, retry: () => void) => void) | undefined;
|
|
961
974
|
/**
|
|
962
975
|
* Shown once the resource has data (including while a refetch keeps the old
|
|
963
976
|
* value visible). Receives the data as a `ReadonlySignal<T>` so the branch can
|
|
@@ -972,6 +985,14 @@ interface ContentDSL {
|
|
|
972
985
|
input(options?: InputOptions): void;
|
|
973
986
|
image(options: ImageOptions): void;
|
|
974
987
|
link(label: BindableText, options: LinkOptions): void;
|
|
988
|
+
/**
|
|
989
|
+
* Preformatted code block rendering as `<pre><code>…</code></pre>`. The source
|
|
990
|
+
* is escaped at the renderer boundary (never injected as raw HTML), whitespace
|
|
991
|
+
* is preserved by the semantic `<pre>`, and an optional `language` hint is
|
|
992
|
+
* emitted as `data-language` on the `<pre>`. SSR- and hydration-safe; reuses
|
|
993
|
+
* the same text binding/escaping machinery as `text`.
|
|
994
|
+
*/
|
|
995
|
+
code(source: BindableText, options?: CodeOptions): void;
|
|
975
996
|
}
|
|
976
997
|
interface ContainerDSL extends ContentDSL {
|
|
977
998
|
section(key: string, builder: SectionBuilder, options?: SectionOptions): void;
|
|
@@ -1133,6 +1154,7 @@ declare class ContentBuilderBase implements ContentDSL {
|
|
|
1133
1154
|
input(options?: InputOptions): void;
|
|
1134
1155
|
image(options: ImageOptions): void;
|
|
1135
1156
|
link(label: BindableText, options: LinkOptions): void;
|
|
1157
|
+
code(source: BindableText, options?: CodeOptions): void;
|
|
1136
1158
|
}
|
|
1137
1159
|
declare class ContainerBuilderBase extends ContentBuilderBase implements ContainerDSL {
|
|
1138
1160
|
section(key: string, builder: SectionBuilder, options?: SectionOptions): void;
|
|
@@ -1346,4 +1368,4 @@ declare function consoleHydrationDiagnosticSink(logger?: {
|
|
|
1346
1368
|
warn(message: string): void;
|
|
1347
1369
|
}): HydrationDiagnosticSink;
|
|
1348
1370
|
|
|
1349
|
-
export { type
|
|
1371
|
+
export { type EventDescriptor as $, type ApplicationId as A, BaseNode as B, type CompiledApplication as C, DiagnosticCollector as D, type ComponentContext as E, type ComponentRender as F, GraphNode as G, type HydrationDiagnostic as H, type ComponentSetup as I, ContainerBuilderImpl as J, type ContainerOptions as K, type ContentDSL as L, type ControlledInputOptions as M, DerivedSignal as N, type Diagnostic as O, type PageDSL as P, DiagnosticError as Q, type ReadonlySignal as R, StreetApp as S, type TransitionConfig as T, type Unsubscribe as U, VERSION as V, type DiagnosticLocation as W, type DiagnosticSeverity as X, type ErrorBoundaryOptions as Y, type ErrorFallbackBuilder as Z, type ErrorSource as _, type ComponentDefinition as a, nodeIdPrefix as a$, type FormBuilder as a0, FormBuilderImpl as a1, type FormDSL as a2, type FormOptions as a3, type GraphNodeData as a4, type HandlerFn as a5, type HeadContribution as a6, type HeadEntry as a7, type HeadMetadata as a8, type HeadingOptions as a9, type SectionDSL as aA, type SectionOptions as aB, type SerializedGraph as aC, type SerializedNode as aD, type StateRef as aE, type StreetUI as aF, type TextOptions as aG, type TextValue as aH, type WhenOptions as aI, batch as aJ, compile as aK, compileGraph as aL, component as aM, consoleHydrationDiagnosticSink as aN, createHydrationDiagnosticCollector as aO, createNodeId as aP, derived as aQ, effect as aR, formatDiagnostic as aS, formatHydrationDiagnostic as aT, generateApplicationId as aU, generateNodeId as aV, isBatching as aW, isComponentDefinition as aX, isHeadContribution as aY, isTransitionConfig as aZ, nextId as a_, type HydrationMismatchType as aa, type ImageOptions as ab, type InputOptions as ac, type InputOptionsBase as ad, type LinkDescriptor as ae, type LinkOptions as af, type ListBuilder as ag, ListBuilderImpl as ah, type ListDSL as ai, type ListOptions as aj, type ListPlanEntry as ak, type MetaDescriptor as al, type NodeId as am, type NodeMetadata as an, type OverlayOptions as ao, type PageBuilder as ap, PageBuilderImpl as aq, type PortalOptions as ar, type PropValue as as, type Props as at, type ReactiveConsumer as au, type ReactiveSource as av, type ResolvedTransition as aw, type ResourceLoader as ax, type SectionBuilder as ay, SectionBuilderImpl as az, type ContainerBuilder as b, observerCount as b0, reactiveListItemKey as b1, reactiveListItemSignature as b2, resetIdCounter as b3, resolveHead as b4, resolveTransition as b5, resource as b6, signal as b7, signalKind as b8, streetui as b9, Signal as c, type Subscriber as d, type ResourceStatus as e, type ResourceOptions as f, type Resource as g, type ResourceLoaderContext as h, ApplicationGraph as i, type HydrationDiagnosticSink as j, type SemanticNodeType as k, type ContainerDSL as l, type SignalKind as m, type A11yOptions as n, AppBuilder as o, type AppDSL as p, type AppOptions as q, type ApplicationGraphOptions as r, type AsyncBoundaryBranches as s, type Bindable as t, type BindableString as u, type BindableText as v, type BoundInputOptions as w, type ButtonOptions as x, type CodeOptions as y, type CompileOptions as z };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* (`streetui --version`) — the consolidated test-suite pins all three to the
|
|
8
8
|
* same coordinated release so they can never silently drift apart.
|
|
9
9
|
*/
|
|
10
|
-
declare const VERSION = "2.
|
|
10
|
+
declare const VERSION = "2.7.0";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* StreetUI reactive signals — framework-owned reactivity, no external libraries.
|
|
@@ -275,7 +275,7 @@ declare function formatDiagnostic(d: Diagnostic): string;
|
|
|
275
275
|
* in the Semantic Application Graph.
|
|
276
276
|
*/
|
|
277
277
|
|
|
278
|
-
type SemanticNodeType = 'application' | 'page' | 'section' | 'container' | 'heading' | 'text' | 'button' | 'input' | 'form' | 'list' | 'list-item' | 'image' | 'link' | 'component' | 'slot' | 'fragment' | 'reactive-list' | 'conditional' | 'portal' | 'head';
|
|
278
|
+
type SemanticNodeType = 'application' | 'page' | 'section' | 'container' | 'heading' | 'text' | 'button' | 'input' | 'form' | 'list' | 'list-item' | 'image' | 'link' | 'code' | 'component' | 'slot' | 'fragment' | 'reactive-list' | 'conditional' | 'portal' | 'head';
|
|
279
279
|
interface NodeMetadata {
|
|
280
280
|
readonly createdAt: number;
|
|
281
281
|
readonly [key: string]: unknown;
|
|
@@ -759,60 +759,60 @@ type BindableText = TextValue | ReadonlySignal<TextValue>;
|
|
|
759
759
|
*/
|
|
760
760
|
interface A11yOptions {
|
|
761
761
|
/** ARIA role (e.g. 'dialog', 'alert', 'status', 'navigation'). */
|
|
762
|
-
readonly role?: string;
|
|
762
|
+
readonly role?: string | undefined;
|
|
763
763
|
/** tabindex value. Use 0 to make an element focusable, -1 to remove from tab order. */
|
|
764
|
-
readonly tabIndex?: number;
|
|
764
|
+
readonly tabIndex?: number | undefined;
|
|
765
765
|
/** aria-label — an accessible name when no visible label element exists. */
|
|
766
|
-
readonly ariaLabel?: string;
|
|
766
|
+
readonly ariaLabel?: string | undefined;
|
|
767
767
|
/** aria-labelledby — id(s) of the element(s) that label this one. */
|
|
768
|
-
readonly ariaLabelledBy?: string;
|
|
768
|
+
readonly ariaLabelledBy?: string | undefined;
|
|
769
769
|
/** aria-describedby — id(s) of the element(s) that describe this one. */
|
|
770
|
-
readonly ariaDescribedBy?: string;
|
|
770
|
+
readonly ariaDescribedBy?: string | undefined;
|
|
771
771
|
/** aria-expanded — for disclosure widgets (rendered as the string "true"/"false"). */
|
|
772
|
-
readonly ariaExpanded?: boolean;
|
|
772
|
+
readonly ariaExpanded?: boolean | undefined;
|
|
773
773
|
/** aria-controls — id of the element this one controls. */
|
|
774
|
-
readonly ariaControls?: string;
|
|
774
|
+
readonly ariaControls?: string | undefined;
|
|
775
775
|
/** aria-hidden — hide decorative content from assistive tech. */
|
|
776
|
-
readonly ariaHidden?: boolean;
|
|
776
|
+
readonly ariaHidden?: boolean | undefined;
|
|
777
777
|
/** aria-live — announce dynamic changes ('polite' | 'assertive' | 'off'). */
|
|
778
|
-
readonly ariaLive?: 'off' | 'polite' | 'assertive';
|
|
778
|
+
readonly ariaLive?: 'off' | 'polite' | 'assertive' | undefined;
|
|
779
779
|
/** aria-current — mark the current item in a set (e.g. 'page' for active nav). */
|
|
780
|
-
readonly ariaCurrent?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
780
|
+
readonly ariaCurrent?: boolean | 'page' | 'step' | 'location' | 'date' | 'time' | undefined;
|
|
781
781
|
/** aria-invalid — mark a form field as failing validation. */
|
|
782
|
-
readonly ariaInvalid?: boolean;
|
|
782
|
+
readonly ariaInvalid?: boolean | undefined;
|
|
783
783
|
/** aria-required — mark a form field as required. */
|
|
784
|
-
readonly ariaRequired?: boolean;
|
|
784
|
+
readonly ariaRequired?: boolean | undefined;
|
|
785
785
|
/** aria-modal — mark a dialog as modal (content outside is inert to AT). */
|
|
786
|
-
readonly ariaModal?: boolean;
|
|
786
|
+
readonly ariaModal?: boolean | undefined;
|
|
787
787
|
/** aria-owns — id(s) of elements owned by this one when the DOM can't express it. */
|
|
788
|
-
readonly ariaOwns?: string;
|
|
788
|
+
readonly ariaOwns?: string | undefined;
|
|
789
789
|
/** aria-activedescendant — id of the active option in a composite widget (menu/listbox/combobox). */
|
|
790
|
-
readonly ariaActiveDescendant?: string;
|
|
790
|
+
readonly ariaActiveDescendant?: string | undefined;
|
|
791
791
|
/** aria-haspopup — the element opens a popup ('menu' | 'listbox' | 'dialog' | 'grid' | 'tree' | true). */
|
|
792
|
-
readonly ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
792
|
+
readonly ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;
|
|
793
793
|
/** aria-selected — selection state within a composite widget. */
|
|
794
|
-
readonly ariaSelected?: boolean;
|
|
794
|
+
readonly ariaSelected?: boolean | undefined;
|
|
795
795
|
}
|
|
796
796
|
interface TextOptions extends A11yOptions {
|
|
797
|
-
readonly class?: string;
|
|
798
|
-
readonly id?: string;
|
|
797
|
+
readonly class?: string | undefined;
|
|
798
|
+
readonly id?: string | undefined;
|
|
799
799
|
}
|
|
800
800
|
interface HeadingOptions extends TextOptions {
|
|
801
|
-
readonly level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
801
|
+
readonly level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
802
802
|
}
|
|
803
803
|
interface ButtonOptions extends A11yOptions {
|
|
804
|
-
readonly class?: string;
|
|
805
|
-
readonly id?: string;
|
|
806
|
-
readonly disabled?: Bindable<boolean
|
|
807
|
-
readonly onClick?: () => void;
|
|
804
|
+
readonly class?: string | undefined;
|
|
805
|
+
readonly id?: string | undefined;
|
|
806
|
+
readonly disabled?: Bindable<boolean> | undefined;
|
|
807
|
+
readonly onClick?: (() => void) | undefined;
|
|
808
808
|
}
|
|
809
809
|
interface InputOptionsBase extends A11yOptions {
|
|
810
|
-
readonly class?: string;
|
|
811
|
-
readonly id?: string;
|
|
812
|
-
readonly type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
|
|
813
|
-
readonly placeholder?: string;
|
|
814
|
-
readonly disabled?: Bindable<boolean
|
|
815
|
-
readonly onChange?: (value: string) => void;
|
|
810
|
+
readonly class?: string | undefined;
|
|
811
|
+
readonly id?: string | undefined;
|
|
812
|
+
readonly type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | undefined;
|
|
813
|
+
readonly placeholder?: string | undefined;
|
|
814
|
+
readonly disabled?: Bindable<boolean> | undefined;
|
|
815
|
+
readonly onChange?: ((value: string) => void) | undefined;
|
|
816
816
|
}
|
|
817
817
|
/**
|
|
818
818
|
* Explicitly-controlled input: supply `value` and/or `onInput` yourself.
|
|
@@ -821,8 +821,8 @@ interface InputOptionsBase extends A11yOptions {
|
|
|
821
821
|
* the type checker rather than resolved silently at runtime.
|
|
822
822
|
*/
|
|
823
823
|
interface ControlledInputOptions extends InputOptionsBase {
|
|
824
|
-
readonly value?: Bindable<string
|
|
825
|
-
readonly onInput?: (value: string) => void;
|
|
824
|
+
readonly value?: Bindable<string> | undefined;
|
|
825
|
+
readonly onInput?: ((value: string) => void) | undefined;
|
|
826
826
|
readonly bind?: never;
|
|
827
827
|
}
|
|
828
828
|
/**
|
|
@@ -837,24 +837,37 @@ interface BoundInputOptions extends InputOptionsBase {
|
|
|
837
837
|
}
|
|
838
838
|
type InputOptions = ControlledInputOptions | BoundInputOptions;
|
|
839
839
|
interface LinkOptions extends A11yOptions {
|
|
840
|
-
readonly class?: string;
|
|
841
|
-
readonly id?: string;
|
|
840
|
+
readonly class?: string | undefined;
|
|
841
|
+
readonly id?: string | undefined;
|
|
842
842
|
readonly href: string;
|
|
843
|
-
readonly external?: boolean;
|
|
844
|
-
readonly onClick?: () => void;
|
|
843
|
+
readonly external?: boolean | undefined;
|
|
844
|
+
readonly onClick?: (() => void) | undefined;
|
|
845
845
|
}
|
|
846
846
|
interface ImageOptions extends A11yOptions {
|
|
847
|
-
readonly class?: string;
|
|
848
|
-
readonly id?: string;
|
|
847
|
+
readonly class?: string | undefined;
|
|
848
|
+
readonly id?: string | undefined;
|
|
849
849
|
readonly src: string;
|
|
850
850
|
readonly alt: string;
|
|
851
|
-
readonly width?: number;
|
|
852
|
-
readonly height?: number;
|
|
851
|
+
readonly width?: number | undefined;
|
|
852
|
+
readonly height?: number | undefined;
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Options for the `code` leaf — a semantic preformatted code block that renders
|
|
856
|
+
* as `<pre><code>…</code></pre>` with the source escaped at the renderer
|
|
857
|
+
* boundary (no raw-HTML injection). An optional `language` hint is emitted as a
|
|
858
|
+
* `data-language` attribute on the outer `<pre>` for styling / highlighting
|
|
859
|
+
* hooks; it is purely declarative and never parsed or executed by the
|
|
860
|
+
* framework.
|
|
861
|
+
*/
|
|
862
|
+
interface CodeOptions extends A11yOptions {
|
|
863
|
+
readonly class?: string | undefined;
|
|
864
|
+
readonly id?: string | undefined;
|
|
865
|
+
readonly language?: string | undefined;
|
|
853
866
|
}
|
|
854
867
|
interface ContainerOptions extends A11yOptions {
|
|
855
|
-
readonly class?: string;
|
|
856
|
-
readonly id?: string;
|
|
857
|
-
readonly key?: string;
|
|
868
|
+
readonly class?: string | undefined;
|
|
869
|
+
readonly id?: string | undefined;
|
|
870
|
+
readonly key?: string | undefined;
|
|
858
871
|
/**
|
|
859
872
|
* Enter/leave transition for this element (§2). CSS class-based and
|
|
860
873
|
* browser-only: on the server it is ignored (deterministic SSR output). The
|
|
@@ -863,12 +876,12 @@ interface ContainerOptions extends A11yOptions {
|
|
|
863
876
|
* before the element is removed and disposed — the reconciler defers teardown
|
|
864
877
|
* until the transition completes.
|
|
865
878
|
*/
|
|
866
|
-
readonly transition?: TransitionConfig;
|
|
879
|
+
readonly transition?: TransitionConfig | undefined;
|
|
867
880
|
}
|
|
868
881
|
interface SectionOptions extends ContainerOptions {
|
|
869
882
|
}
|
|
870
883
|
interface FormOptions extends ContainerOptions {
|
|
871
|
-
readonly onSubmit?: (e: Event) => void;
|
|
884
|
+
readonly onSubmit?: ((e: Event) => void) | undefined;
|
|
872
885
|
}
|
|
873
886
|
interface ListOptions extends ContainerOptions {
|
|
874
887
|
/**
|
|
@@ -878,14 +891,14 @@ interface ListOptions extends ContainerOptions {
|
|
|
878
891
|
* reclaimed (leave→enter). `transition` (inherited) applies to the list
|
|
879
892
|
* container itself; `itemTransition` applies to its rows.
|
|
880
893
|
*/
|
|
881
|
-
readonly itemTransition?: TransitionConfig;
|
|
894
|
+
readonly itemTransition?: TransitionConfig | undefined;
|
|
882
895
|
}
|
|
883
896
|
/** Options for `when()` (§2 conditional transitions). */
|
|
884
897
|
interface WhenOptions {
|
|
885
898
|
/** Transition applied to the active branch as it mounts/unmounts. */
|
|
886
|
-
readonly transition?: TransitionConfig;
|
|
899
|
+
readonly transition?: TransitionConfig | undefined;
|
|
887
900
|
/** Also animate the branch present on the initial mount (appear). */
|
|
888
|
-
readonly appear?: boolean;
|
|
901
|
+
readonly appear?: boolean | undefined;
|
|
889
902
|
}
|
|
890
903
|
/** Options for a plain portal (mount children into `document.body`). */
|
|
891
904
|
interface PortalOptions extends ContainerOptions {
|
|
@@ -903,13 +916,13 @@ interface OverlayOptions extends ContainerOptions {
|
|
|
903
916
|
/** Reactive open/visibility state. When it flips, the panel mounts/unmounts. */
|
|
904
917
|
readonly open: Bindable<boolean>;
|
|
905
918
|
/** Requested-close callback (fired on Escape when `closeOnEscape`). Flip `open` here. */
|
|
906
|
-
readonly onClose?: () => void;
|
|
919
|
+
readonly onClose?: (() => void) | undefined;
|
|
907
920
|
/** Restore focus to the previously-focused element on close. Default: per-kind. */
|
|
908
|
-
readonly restoreFocus?: boolean;
|
|
921
|
+
readonly restoreFocus?: boolean | undefined;
|
|
909
922
|
/** id of the element to focus first when the overlay opens (else first focusable). */
|
|
910
|
-
readonly initialFocusId?: string;
|
|
923
|
+
readonly initialFocusId?: string | undefined;
|
|
911
924
|
/** Escape key invokes `onClose`. Default: per-kind. */
|
|
912
|
-
readonly closeOnEscape?: boolean;
|
|
925
|
+
readonly closeOnEscape?: boolean | undefined;
|
|
913
926
|
}
|
|
914
927
|
type SectionBuilder = (section: SectionDSL) => void;
|
|
915
928
|
type ContainerBuilder = (container: ContainerDSL) => void;
|
|
@@ -927,9 +940,9 @@ interface ErrorBoundaryOptions {
|
|
|
927
940
|
* Reactive error source(s) to observe — typically a resource's `error` signal.
|
|
928
941
|
* When any becomes non-null, the fallback replaces the body.
|
|
929
942
|
*/
|
|
930
|
-
readonly source?: ErrorSource | ReadonlyArray<ErrorSource
|
|
943
|
+
readonly source?: ErrorSource | ReadonlyArray<ErrorSource> | undefined;
|
|
931
944
|
/** Invoked by the fallback's `retry()`, before the body is re-attempted (e.g. `resource.refetch`). */
|
|
932
|
-
readonly onRetry?: () => void;
|
|
945
|
+
readonly onRetry?: (() => void) | undefined;
|
|
933
946
|
/**
|
|
934
947
|
* Error-reporting hook (§6/§7). Called with the current error each time the
|
|
935
948
|
* boundary ENTERS its error state (i.e. when the fallback mounts), including
|
|
@@ -938,7 +951,7 @@ interface ErrorBoundaryOptions {
|
|
|
938
951
|
* boundary's behavior, and receives the same `unknown` error the fallback
|
|
939
952
|
* sees (no sensitive framework internals are injected).
|
|
940
953
|
*/
|
|
941
|
-
readonly onError?: (error: unknown) => void;
|
|
954
|
+
readonly onError?: ((error: unknown) => void) | undefined;
|
|
942
955
|
}
|
|
943
956
|
/**
|
|
944
957
|
* Branch builders for {@link ContainerDSL.asyncBoundary} — the loading / error /
|
|
@@ -952,12 +965,12 @@ interface ErrorBoundaryOptions {
|
|
|
952
965
|
*/
|
|
953
966
|
interface AsyncBoundaryBranches<T> {
|
|
954
967
|
/** Shown while the resource is idle or performing its first load (no data yet). */
|
|
955
|
-
readonly loading?: (content: ContainerDSL) => void;
|
|
968
|
+
readonly loading?: ((content: ContainerDSL) => void) | undefined;
|
|
956
969
|
/**
|
|
957
970
|
* Shown while the resource is in its error state. Receives the current error
|
|
958
971
|
* and a `retry()` that re-runs the loader (a thin wrapper over `refetch`).
|
|
959
972
|
*/
|
|
960
|
-
readonly error?: (content: ContainerDSL, error: unknown, retry: () => void) => void;
|
|
973
|
+
readonly error?: ((content: ContainerDSL, error: unknown, retry: () => void) => void) | undefined;
|
|
961
974
|
/**
|
|
962
975
|
* Shown once the resource has data (including while a refetch keeps the old
|
|
963
976
|
* value visible). Receives the data as a `ReadonlySignal<T>` so the branch can
|
|
@@ -972,6 +985,14 @@ interface ContentDSL {
|
|
|
972
985
|
input(options?: InputOptions): void;
|
|
973
986
|
image(options: ImageOptions): void;
|
|
974
987
|
link(label: BindableText, options: LinkOptions): void;
|
|
988
|
+
/**
|
|
989
|
+
* Preformatted code block rendering as `<pre><code>…</code></pre>`. The source
|
|
990
|
+
* is escaped at the renderer boundary (never injected as raw HTML), whitespace
|
|
991
|
+
* is preserved by the semantic `<pre>`, and an optional `language` hint is
|
|
992
|
+
* emitted as `data-language` on the `<pre>`. SSR- and hydration-safe; reuses
|
|
993
|
+
* the same text binding/escaping machinery as `text`.
|
|
994
|
+
*/
|
|
995
|
+
code(source: BindableText, options?: CodeOptions): void;
|
|
975
996
|
}
|
|
976
997
|
interface ContainerDSL extends ContentDSL {
|
|
977
998
|
section(key: string, builder: SectionBuilder, options?: SectionOptions): void;
|
|
@@ -1133,6 +1154,7 @@ declare class ContentBuilderBase implements ContentDSL {
|
|
|
1133
1154
|
input(options?: InputOptions): void;
|
|
1134
1155
|
image(options: ImageOptions): void;
|
|
1135
1156
|
link(label: BindableText, options: LinkOptions): void;
|
|
1157
|
+
code(source: BindableText, options?: CodeOptions): void;
|
|
1136
1158
|
}
|
|
1137
1159
|
declare class ContainerBuilderBase extends ContentBuilderBase implements ContainerDSL {
|
|
1138
1160
|
section(key: string, builder: SectionBuilder, options?: SectionOptions): void;
|
|
@@ -1346,4 +1368,4 @@ declare function consoleHydrationDiagnosticSink(logger?: {
|
|
|
1346
1368
|
warn(message: string): void;
|
|
1347
1369
|
}): HydrationDiagnosticSink;
|
|
1348
1370
|
|
|
1349
|
-
export { type
|
|
1371
|
+
export { type EventDescriptor as $, type ApplicationId as A, BaseNode as B, type CompiledApplication as C, DiagnosticCollector as D, type ComponentContext as E, type ComponentRender as F, GraphNode as G, type HydrationDiagnostic as H, type ComponentSetup as I, ContainerBuilderImpl as J, type ContainerOptions as K, type ContentDSL as L, type ControlledInputOptions as M, DerivedSignal as N, type Diagnostic as O, type PageDSL as P, DiagnosticError as Q, type ReadonlySignal as R, StreetApp as S, type TransitionConfig as T, type Unsubscribe as U, VERSION as V, type DiagnosticLocation as W, type DiagnosticSeverity as X, type ErrorBoundaryOptions as Y, type ErrorFallbackBuilder as Z, type ErrorSource as _, type ComponentDefinition as a, nodeIdPrefix as a$, type FormBuilder as a0, FormBuilderImpl as a1, type FormDSL as a2, type FormOptions as a3, type GraphNodeData as a4, type HandlerFn as a5, type HeadContribution as a6, type HeadEntry as a7, type HeadMetadata as a8, type HeadingOptions as a9, type SectionDSL as aA, type SectionOptions as aB, type SerializedGraph as aC, type SerializedNode as aD, type StateRef as aE, type StreetUI as aF, type TextOptions as aG, type TextValue as aH, type WhenOptions as aI, batch as aJ, compile as aK, compileGraph as aL, component as aM, consoleHydrationDiagnosticSink as aN, createHydrationDiagnosticCollector as aO, createNodeId as aP, derived as aQ, effect as aR, formatDiagnostic as aS, formatHydrationDiagnostic as aT, generateApplicationId as aU, generateNodeId as aV, isBatching as aW, isComponentDefinition as aX, isHeadContribution as aY, isTransitionConfig as aZ, nextId as a_, type HydrationMismatchType as aa, type ImageOptions as ab, type InputOptions as ac, type InputOptionsBase as ad, type LinkDescriptor as ae, type LinkOptions as af, type ListBuilder as ag, ListBuilderImpl as ah, type ListDSL as ai, type ListOptions as aj, type ListPlanEntry as ak, type MetaDescriptor as al, type NodeId as am, type NodeMetadata as an, type OverlayOptions as ao, type PageBuilder as ap, PageBuilderImpl as aq, type PortalOptions as ar, type PropValue as as, type Props as at, type ReactiveConsumer as au, type ReactiveSource as av, type ResolvedTransition as aw, type ResourceLoader as ax, type SectionBuilder as ay, SectionBuilderImpl as az, type ContainerBuilder as b, observerCount as b0, reactiveListItemKey as b1, reactiveListItemSignature as b2, resetIdCounter as b3, resolveHead as b4, resolveTransition as b5, resource as b6, signal as b7, signalKind as b8, streetui as b9, Signal as c, type Subscriber as d, type ResourceStatus as e, type ResourceOptions as f, type Resource as g, type ResourceLoaderContext as h, ApplicationGraph as i, type HydrationDiagnosticSink as j, type SemanticNodeType as k, type ContainerDSL as l, type SignalKind as m, type A11yOptions as n, AppBuilder as o, type AppDSL as p, type AppOptions as q, type ApplicationGraphOptions as r, type AsyncBoundaryBranches as s, type Bindable as t, type BindableString as u, type BindableText as v, type BoundInputOptions as w, type ButtonOptions as x, type CodeOptions as y, type CompileOptions as z };
|