streetui 2.4.0 → 2.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.
@@ -1,4 +1,4 @@
1
- import { C as CompiledApplication } from './hydration-diagnostics-85_qrDqr.cjs';
1
+ import { C as CompiledApplication } from './hydration-diagnostics-D1GlzulR.cjs';
2
2
 
3
3
  /**
4
4
  * The interface the runtime uses to communicate with the renderer.
@@ -1,4 +1,4 @@
1
- import { C as CompiledApplication } from './hydration-diagnostics-85_qrDqr.js';
1
+ import { C as CompiledApplication } from './hydration-diagnostics-D1GlzulR.js';
2
2
 
3
3
  /**
4
4
  * The interface the runtime uses to communicate with the renderer.
@@ -1,4 +1,4 @@
1
- import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-85_qrDqr.js';
1
+ import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-D1GlzulR.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-85_qrDqr.cjs';
1
+ import { G as GraphNode, R as ReadonlySignal, C as CompiledApplication, i as ApplicationGraph, j as HydrationDiagnosticSink } from './hydration-diagnostics-D1GlzulR.cjs';
2
2
 
3
3
  /**
4
4
  * Application and component lifecycle primitives.
package/dist/server.cjs CHANGED
@@ -718,6 +718,11 @@ var TAG_MAP = {
718
718
  "list-item": "li",
719
719
  image: "img",
720
720
  link: "a",
721
+ // A `code()` node renders as a semantic `<pre>` outer element; the mount/
722
+ // hydrate branches add a single inner `<code>` holding the escaped source
723
+ // (mirrors how `text` renders `<span>` + an inner text node). One graph
724
+ // node → one outer element preserves positional hydration.
725
+ code: "pre",
721
726
  component: "div",
722
727
  slot: "div",
723
728
  fragment: "div",
@@ -1462,6 +1467,23 @@ function mountNode(ctx, graphNode, parentDom) {
1462
1467
  dom.appendChild(parentDom, el2);
1463
1468
  return instance2;
1464
1469
  }
1470
+ if (graphNode.type === "code") {
1471
+ const source = String(graphNode.getProp("text") ?? "");
1472
+ const pre = dom.createElement("pre");
1473
+ const codeEl = dom.createElement("code");
1474
+ const textNode = dom.createTextNode(source);
1475
+ dom.appendChild(codeEl, textNode);
1476
+ dom.appendChild(pre, codeEl);
1477
+ applyNodeProps(ctx, graphNode, pre);
1478
+ const instance2 = new NodeInstance(graphNode, pre);
1479
+ ctx.instances.set(graphNode.id, instance2);
1480
+ wireEvents(dom, graph, graphNode, pre, instance2);
1481
+ if (graphNode.stateRefs.length !== 0) {
1482
+ wireSignalBindings(ctx, graphNode, instance2, textUpdate(dom, pre, textNode));
1483
+ }
1484
+ dom.appendChild(parentDom, pre);
1485
+ return instance2;
1486
+ }
1465
1487
  if (graphNode.type === "link") {
1466
1488
  const el2 = dom.createElement("a");
1467
1489
  const href = graphNode.getProp("href");
@@ -1919,7 +1941,7 @@ function renderToString(compiled, options = {}) {
1919
1941
  }
1920
1942
 
1921
1943
  // src/version.ts
1922
- var VERSION = "2.4.0";
1944
+ var VERSION = "2.6.0";
1923
1945
  // Annotate the CommonJS export names for ESM import in node:
1924
1946
  0 && (module.exports = {
1925
1947
  STATE_MARKER_ATTR,