streetui 1.4.0 → 1.5.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-Cgx1PjG6.d.cts → compile-DGHUC0T6.d.cts} +1 -1
- package/dist/{compile-Cgx1PjG6.d.ts → compile-DGHUC0T6.d.ts} +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-e6iDuR1D.d.ts → hydration-diagnostics-Cv0Bi9Aj.d.ts} +1 -1
- package/dist/{hydration-diagnostics-DWZZylCS.d.cts → hydration-diagnostics-D9odszLZ.d.cts} +1 -1
- package/dist/index.cjs +36 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -9
- package/dist/index.d.ts +12 -9
- package/dist/index.js +36 -15
- package/dist/index.js.map +1 -1
- package/dist/{server-BJAEdjDF.d.ts → server-CHT2bFkR.d.ts} +1 -1
- package/dist/{server-EGgKDFOc.d.cts → server-CNgoINXH.d.cts} +1 -1
- package/dist/server.cjs +36 -15
- 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 +36 -15
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +36 -15
- 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 +36 -15
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
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-
|
|
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-
|
|
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 { 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-DGHUC0T6.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-DGHUC0T6.cjs';
|
|
3
|
+
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-D9odszLZ.cjs';
|
|
4
|
+
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-D9odszLZ.cjs';
|
|
5
|
+
import { D as DOMAdapter } from './server-CNgoINXH.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-CNgoINXH.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A simple reactive store built on top of signals.
|
|
@@ -614,11 +614,14 @@ declare class ServerElement implements ServerNode {
|
|
|
614
614
|
parent: ServerParent | null;
|
|
615
615
|
readonly tagName: string;
|
|
616
616
|
readonly attributes: Map<string, string>;
|
|
617
|
-
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). */
|
|
618
|
-
readonly properties: Map<string, unknown>;
|
|
619
617
|
readonly children: ServerNode[];
|
|
620
|
-
|
|
618
|
+
_properties: Map<string, unknown> | null;
|
|
619
|
+
_style: ServerStyle | null;
|
|
621
620
|
constructor(tagName: string);
|
|
621
|
+
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). Allocated on first access. */
|
|
622
|
+
get properties(): Map<string, unknown>;
|
|
623
|
+
/** Inline-style holder mirroring `element.style`. Allocated on first access. */
|
|
624
|
+
get style(): ServerStyle;
|
|
622
625
|
}
|
|
623
626
|
/** Escape text node content. */
|
|
624
627
|
declare function escapeHtmlText(value: string): string;
|
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-
|
|
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-
|
|
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 { 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-DGHUC0T6.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-DGHUC0T6.js';
|
|
3
|
+
import { R as RenderHandle, S as StreetRenderer, a as HydrationDiagnosticSink } from './hydration-diagnostics-Cv0Bi9Aj.js';
|
|
4
|
+
export { H as HydrationDiagnostic, b as HydrationMismatchType, c as consoleHydrationDiagnosticSink, d as createHydrationDiagnosticCollector, f as formatHydrationDiagnostic } from './hydration-diagnostics-Cv0Bi9Aj.js';
|
|
5
|
+
import { D as DOMAdapter } from './server-CHT2bFkR.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-CHT2bFkR.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A simple reactive store built on top of signals.
|
|
@@ -614,11 +614,14 @@ declare class ServerElement implements ServerNode {
|
|
|
614
614
|
parent: ServerParent | null;
|
|
615
615
|
readonly tagName: string;
|
|
616
616
|
readonly attributes: Map<string, string>;
|
|
617
|
-
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). */
|
|
618
|
-
readonly properties: Map<string, unknown>;
|
|
619
617
|
readonly children: ServerNode[];
|
|
620
|
-
|
|
618
|
+
_properties: Map<string, unknown> | null;
|
|
619
|
+
_style: ServerStyle | null;
|
|
621
620
|
constructor(tagName: string);
|
|
621
|
+
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). Allocated on first access. */
|
|
622
|
+
get properties(): Map<string, unknown>;
|
|
623
|
+
/** Inline-style holder mirroring `element.style`. Allocated on first access. */
|
|
624
|
+
get style(): ServerStyle;
|
|
622
625
|
}
|
|
623
626
|
/** Escape text node content. */
|
|
624
627
|
declare function escapeHtmlText(value: string): string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
|
-
var VERSION = "1.
|
|
2
|
+
var VERSION = "1.5.0";
|
|
3
3
|
|
|
4
4
|
// ../state/src/signal.ts
|
|
5
5
|
var _activeConsumer = null;
|
|
@@ -1882,13 +1882,30 @@ var ServerElement = class {
|
|
|
1882
1882
|
parent = null;
|
|
1883
1883
|
tagName;
|
|
1884
1884
|
attributes = /* @__PURE__ */ new Map();
|
|
1885
|
-
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). */
|
|
1886
|
-
properties = /* @__PURE__ */ new Map();
|
|
1887
1885
|
children = [];
|
|
1888
|
-
|
|
1886
|
+
// Lazily-allocated stores. On the 10k-row SSR corpus ~0% of elements carry JS
|
|
1887
|
+
// properties or inline styles (measured, §5: 1 of 80,029 elements uses
|
|
1888
|
+
// `properties`, 0 use `style`), so eagerly allocating a `properties` Map plus
|
|
1889
|
+
// a `ServerStyle` (which itself holds a Map) per element wasted ~240k
|
|
1890
|
+
// allocations per /users render — all in the dominant mount phase. These are
|
|
1891
|
+
// created on first WRITE via the `properties`/`style` getters; the serializer
|
|
1892
|
+
// reads the raw `_properties`/`_style` fields so a READ never forces an
|
|
1893
|
+
// allocation. Output is byte-identical: an unset store previously serialized
|
|
1894
|
+
// to nothing (empty `properties.has(...)` / `style.isEmpty`), and a null store
|
|
1895
|
+
// is skipped the same way.
|
|
1896
|
+
_properties = null;
|
|
1897
|
+
_style = null;
|
|
1889
1898
|
constructor(tagName) {
|
|
1890
1899
|
this.tagName = tagName.toLowerCase();
|
|
1891
1900
|
}
|
|
1901
|
+
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). Allocated on first access. */
|
|
1902
|
+
get properties() {
|
|
1903
|
+
return this._properties ??= /* @__PURE__ */ new Map();
|
|
1904
|
+
}
|
|
1905
|
+
/** Inline-style holder mirroring `element.style`. Allocated on first access. */
|
|
1906
|
+
get style() {
|
|
1907
|
+
return this._style ??= new ServerStyle();
|
|
1908
|
+
}
|
|
1892
1909
|
};
|
|
1893
1910
|
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
|
1894
1911
|
"area",
|
|
@@ -1981,20 +1998,24 @@ function serializeAttributes(el) {
|
|
|
1981
1998
|
parts.push(` ${name}="${escapeHtmlAttr(value)}"`);
|
|
1982
1999
|
}
|
|
1983
2000
|
}
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2001
|
+
const props = el._properties;
|
|
2002
|
+
if (props !== null) {
|
|
2003
|
+
for (const [name, kind] of SERIALIZED_PROPERTY_ENTRIES) {
|
|
2004
|
+
if (!props.has(name)) continue;
|
|
2005
|
+
if (el.attributes.has(name)) continue;
|
|
2006
|
+
const raw = props.get(name);
|
|
2007
|
+
if (kind === "boolean") {
|
|
2008
|
+
if (raw === true) parts.push(` ${name}`);
|
|
2009
|
+
} else {
|
|
2010
|
+
if (raw !== void 0 && raw !== null) {
|
|
2011
|
+
parts.push(` ${name}="${escapeHtmlAttr(String(raw))}"`);
|
|
2012
|
+
}
|
|
1993
2013
|
}
|
|
1994
2014
|
}
|
|
1995
2015
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
2016
|
+
const style = el._style;
|
|
2017
|
+
if (style !== null && !style.isEmpty && !el.attributes.has("style")) {
|
|
2018
|
+
parts.push(` style="${escapeHtmlAttr(style.toCss())}"`);
|
|
1998
2019
|
}
|
|
1999
2020
|
return parts.join("");
|
|
2000
2021
|
}
|