streetui 1.4.0 → 1.6.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-CEom4hkp.d.cts} +1 -1
- package/dist/{compile-Cgx1PjG6.d.ts → compile-CEom4hkp.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-DWZZylCS.d.cts → hydration-diagnostics-D286jpZZ.d.cts} +1 -1
- package/dist/{hydration-diagnostics-e6iDuR1D.d.ts → hydration-diagnostics-YrG-OJJe.d.ts} +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-EGgKDFOc.d.cts → server-C2xovHHb.d.cts} +1 -1
- package/dist/{server-BJAEdjDF.d.ts → server-xU-BEwAj.d.ts} +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/testing.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as StreetApp } from './compile-
|
|
2
|
-
export { V as VERSION } from './compile-
|
|
3
|
-
import { R as RenderHandle, H as HydrationDiagnostic } from './hydration-diagnostics-
|
|
1
|
+
import { S as StreetApp } from './compile-CEom4hkp.cjs';
|
|
2
|
+
export { V as VERSION } from './compile-CEom4hkp.cjs';
|
|
3
|
+
import { R as RenderHandle, H as HydrationDiagnostic } from './hydration-diagnostics-D286jpZZ.cjs';
|
|
4
4
|
export * from 'streetui/diagnostics';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as StreetApp } from './compile-
|
|
2
|
-
export { V as VERSION } from './compile-
|
|
3
|
-
import { R as RenderHandle, H as HydrationDiagnostic } from './hydration-diagnostics-
|
|
1
|
+
import { S as StreetApp } from './compile-CEom4hkp.js';
|
|
2
|
+
export { V as VERSION } from './compile-CEom4hkp.js';
|
|
3
|
+
import { R as RenderHandle, H as HydrationDiagnostic } from './hydration-diagnostics-YrG-OJJe.js';
|
|
4
4
|
export * from 'streetui/diagnostics';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -315,13 +315,30 @@ var ServerElement = class {
|
|
|
315
315
|
parent = null;
|
|
316
316
|
tagName;
|
|
317
317
|
attributes = /* @__PURE__ */ new Map();
|
|
318
|
-
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). */
|
|
319
|
-
properties = /* @__PURE__ */ new Map();
|
|
320
318
|
children = [];
|
|
321
|
-
|
|
319
|
+
// Lazily-allocated stores. On the 10k-row SSR corpus ~0% of elements carry JS
|
|
320
|
+
// properties or inline styles (measured, §5: 1 of 80,029 elements uses
|
|
321
|
+
// `properties`, 0 use `style`), so eagerly allocating a `properties` Map plus
|
|
322
|
+
// a `ServerStyle` (which itself holds a Map) per element wasted ~240k
|
|
323
|
+
// allocations per /users render — all in the dominant mount phase. These are
|
|
324
|
+
// created on first WRITE via the `properties`/`style` getters; the serializer
|
|
325
|
+
// reads the raw `_properties`/`_style` fields so a READ never forces an
|
|
326
|
+
// allocation. Output is byte-identical: an unset store previously serialized
|
|
327
|
+
// to nothing (empty `properties.has(...)` / `style.isEmpty`), and a null store
|
|
328
|
+
// is skipped the same way.
|
|
329
|
+
_properties = null;
|
|
330
|
+
_style = null;
|
|
322
331
|
constructor(tagName) {
|
|
323
332
|
this.tagName = tagName.toLowerCase();
|
|
324
333
|
}
|
|
334
|
+
/** JS properties set via `setProperty` (e.g. input `value`, `checked`). Allocated on first access. */
|
|
335
|
+
get properties() {
|
|
336
|
+
return this._properties ??= /* @__PURE__ */ new Map();
|
|
337
|
+
}
|
|
338
|
+
/** Inline-style holder mirroring `element.style`. Allocated on first access. */
|
|
339
|
+
get style() {
|
|
340
|
+
return this._style ??= new ServerStyle();
|
|
341
|
+
}
|
|
325
342
|
};
|
|
326
343
|
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
|
327
344
|
"area",
|
|
@@ -414,20 +431,24 @@ function serializeAttributes(el) {
|
|
|
414
431
|
parts.push(` ${name}="${escapeHtmlAttr(value)}"`);
|
|
415
432
|
}
|
|
416
433
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
434
|
+
const props = el._properties;
|
|
435
|
+
if (props !== null) {
|
|
436
|
+
for (const [name, kind] of SERIALIZED_PROPERTY_ENTRIES) {
|
|
437
|
+
if (!props.has(name)) continue;
|
|
438
|
+
if (el.attributes.has(name)) continue;
|
|
439
|
+
const raw = props.get(name);
|
|
440
|
+
if (kind === "boolean") {
|
|
441
|
+
if (raw === true) parts.push(` ${name}`);
|
|
442
|
+
} else {
|
|
443
|
+
if (raw !== void 0 && raw !== null) {
|
|
444
|
+
parts.push(` ${name}="${escapeHtmlAttr(String(raw))}"`);
|
|
445
|
+
}
|
|
426
446
|
}
|
|
427
447
|
}
|
|
428
448
|
}
|
|
429
|
-
|
|
430
|
-
|
|
449
|
+
const style = el._style;
|
|
450
|
+
if (style !== null && !style.isEmpty && !el.attributes.has("style")) {
|
|
451
|
+
parts.push(` style="${escapeHtmlAttr(style.toCss())}"`);
|
|
431
452
|
}
|
|
432
453
|
return parts.join("");
|
|
433
454
|
}
|
|
@@ -2014,7 +2035,7 @@ function formatInspection(inspection) {
|
|
|
2014
2035
|
}
|
|
2015
2036
|
|
|
2016
2037
|
// src/version.ts
|
|
2017
|
-
var VERSION = "1.
|
|
2038
|
+
var VERSION = "1.6.0";
|
|
2018
2039
|
export {
|
|
2019
2040
|
VERSION,
|
|
2020
2041
|
analyzeGraph,
|