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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-
|
|
1
|
+
import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-Bh0-5vdC.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Application and component lifecycle primitives.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-
|
|
1
|
+
import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-Bh0-5vdC.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Application and component lifecycle primitives.
|
package/dist/server.cjs
CHANGED
|
@@ -151,6 +151,13 @@ function applyProp(dom, element, name, value) {
|
|
|
151
151
|
}
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
+
if (name.startsWith("style.")) {
|
|
155
|
+
const el = element;
|
|
156
|
+
const prop = name.slice("style.".length);
|
|
157
|
+
if (value === null || value === void 0) el.style.removeProperty(prop);
|
|
158
|
+
else el.style.setProperty(prop, String(value));
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
154
161
|
if (value === null || value === void 0 || value === false) {
|
|
155
162
|
dom.removeAttribute(element, name);
|
|
156
163
|
return;
|
|
@@ -718,6 +725,11 @@ var TAG_MAP = {
|
|
|
718
725
|
"list-item": "li",
|
|
719
726
|
image: "img",
|
|
720
727
|
link: "a",
|
|
728
|
+
// A `code()` node renders as a semantic `<pre>` outer element; the mount/
|
|
729
|
+
// hydrate branches add a single inner `<code>` holding the escaped source
|
|
730
|
+
// (mirrors how `text` renders `<span>` + an inner text node). One graph
|
|
731
|
+
// node → one outer element preserves positional hydration.
|
|
732
|
+
code: "pre",
|
|
721
733
|
component: "div",
|
|
722
734
|
slot: "div",
|
|
723
735
|
fragment: "div",
|
|
@@ -1462,6 +1474,23 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
1462
1474
|
dom.appendChild(parentDom, el2);
|
|
1463
1475
|
return instance2;
|
|
1464
1476
|
}
|
|
1477
|
+
if (graphNode.type === "code") {
|
|
1478
|
+
const source = String(graphNode.getProp("text") ?? "");
|
|
1479
|
+
const pre = dom.createElement("pre");
|
|
1480
|
+
const codeEl = dom.createElement("code");
|
|
1481
|
+
const textNode = dom.createTextNode(source);
|
|
1482
|
+
dom.appendChild(codeEl, textNode);
|
|
1483
|
+
dom.appendChild(pre, codeEl);
|
|
1484
|
+
applyNodeProps(ctx, graphNode, pre);
|
|
1485
|
+
const instance2 = new NodeInstance(graphNode, pre);
|
|
1486
|
+
ctx.instances.set(graphNode.id, instance2);
|
|
1487
|
+
wireEvents(dom, graph, graphNode, pre, instance2);
|
|
1488
|
+
if (graphNode.stateRefs.length !== 0) {
|
|
1489
|
+
wireSignalBindings(ctx, graphNode, instance2, textUpdate(dom, pre, textNode));
|
|
1490
|
+
}
|
|
1491
|
+
dom.appendChild(parentDom, pre);
|
|
1492
|
+
return instance2;
|
|
1493
|
+
}
|
|
1465
1494
|
if (graphNode.type === "link") {
|
|
1466
1495
|
const el2 = dom.createElement("a");
|
|
1467
1496
|
const href = graphNode.getProp("href");
|
|
@@ -1919,7 +1948,7 @@ function renderToString(compiled, options = {}) {
|
|
|
1919
1948
|
}
|
|
1920
1949
|
|
|
1921
1950
|
// src/version.ts
|
|
1922
|
-
var VERSION = "2.
|
|
1951
|
+
var VERSION = "2.7.0";
|
|
1923
1952
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1924
1953
|
0 && (module.exports = {
|
|
1925
1954
|
STATE_MARKER_ATTR,
|