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.
package/dist/server.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, r as readState, f as renderHead, g as renderToString, s as serializeState } from './server-B5kJng4r.cjs';
2
- export { V as VERSION } from './hydration-diagnostics-85_qrDqr.cjs';
1
+ export { c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, r as readState, f as renderHead, g as renderToString, s as serializeState } from './server-LJGg4GyH.cjs';
2
+ export { V as VERSION } from './hydration-diagnostics-D1GlzulR.cjs';
package/dist/server.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, r as readState, f as renderHead, g as renderToString, s as serializeState } from './server-C4LFr5B4.js';
2
- export { V as VERSION } from './hydration-diagnostics-85_qrDqr.js';
1
+ export { c as RenderToStringOptions, S as STATE_MARKER_ATTR, d as ServerDOMAdapter, r as readState, f as renderHead, g as renderToString, s as serializeState } from './server-BP651UK6.js';
2
+ export { V as VERSION } from './hydration-diagnostics-D1GlzulR.js';
package/dist/server.js CHANGED
@@ -686,6 +686,11 @@ var TAG_MAP = {
686
686
  "list-item": "li",
687
687
  image: "img",
688
688
  link: "a",
689
+ // A `code()` node renders as a semantic `<pre>` outer element; the mount/
690
+ // hydrate branches add a single inner `<code>` holding the escaped source
691
+ // (mirrors how `text` renders `<span>` + an inner text node). One graph
692
+ // node → one outer element preserves positional hydration.
693
+ code: "pre",
689
694
  component: "div",
690
695
  slot: "div",
691
696
  fragment: "div",
@@ -1430,6 +1435,23 @@ function mountNode(ctx, graphNode, parentDom) {
1430
1435
  dom.appendChild(parentDom, el2);
1431
1436
  return instance2;
1432
1437
  }
1438
+ if (graphNode.type === "code") {
1439
+ const source = String(graphNode.getProp("text") ?? "");
1440
+ const pre = dom.createElement("pre");
1441
+ const codeEl = dom.createElement("code");
1442
+ const textNode = dom.createTextNode(source);
1443
+ dom.appendChild(codeEl, textNode);
1444
+ dom.appendChild(pre, codeEl);
1445
+ applyNodeProps(ctx, graphNode, pre);
1446
+ const instance2 = new NodeInstance(graphNode, pre);
1447
+ ctx.instances.set(graphNode.id, instance2);
1448
+ wireEvents(dom, graph, graphNode, pre, instance2);
1449
+ if (graphNode.stateRefs.length !== 0) {
1450
+ wireSignalBindings(ctx, graphNode, instance2, textUpdate(dom, pre, textNode));
1451
+ }
1452
+ dom.appendChild(parentDom, pre);
1453
+ return instance2;
1454
+ }
1433
1455
  if (graphNode.type === "link") {
1434
1456
  const el2 = dom.createElement("a");
1435
1457
  const href = graphNode.getProp("href");
@@ -1887,7 +1909,7 @@ function renderToString(compiled, options = {}) {
1887
1909
  }
1888
1910
 
1889
1911
  // src/version.ts
1890
- var VERSION = "2.4.0";
1912
+ var VERSION = "2.6.0";
1891
1913
  export {
1892
1914
  STATE_MARKER_ATTR,
1893
1915
  ServerDOMAdapter,