streetui 1.7.0 → 1.8.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 { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState } from './server-D4A8eunr.cjs';
2
- export { V as VERSION } from './compile-Cte0nf06.cjs';
1
+ export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState } from './server-CnLEnlYU.cjs';
2
+ export { V as VERSION } from './compile-CJJQYi71.cjs';
package/dist/server.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState } from './server-cgmCiPsz.js';
2
- export { V as VERSION } from './compile-Cte0nf06.js';
1
+ export { R as RenderToStringOptions, S as STATE_MARKER_ATTR, a as ServerDOMAdapter, r as readState, b as renderToString, s as serializeState } from './server-DNlg7ou2.js';
2
+ export { V as VERSION } from './compile-CJJQYi71.js';
package/dist/server.js CHANGED
@@ -1110,6 +1110,7 @@ function mountNode(ctx, graphNode, parentDom) {
1110
1110
  instance.addChild(childInstance);
1111
1111
  }
1112
1112
  dom.appendChild(parentDom, el);
1113
+ if (graphNode.type === "component") wireComponentBehavior(ctx, graphNode, instance);
1113
1114
  return instance;
1114
1115
  }
1115
1116
  function textUpdate(dom, el, textNode) {
@@ -1278,6 +1279,11 @@ function wireOverlayBehavior(ctx, graphNode, instance, target) {
1278
1279
  instance.trackCleanup(teardown);
1279
1280
  if (openSig.peek() === true) onOpenChange(true);
1280
1281
  }
1282
+ function wireComponentBehavior(ctx, graphNode, instance) {
1283
+ const fn = ctx.graph.getHandler(`__component__${graphNode.id}`);
1284
+ if (fn === void 0) return;
1285
+ for (const cleanup of fn()) instance.trackCleanup(cleanup);
1286
+ }
1281
1287
 
1282
1288
  // ../renderer/src/dehydrate.ts
1283
1289
  var STATE_MARKER_ATTR = "data-streetui-state";
@@ -1345,7 +1351,8 @@ function analyzeGraph(graph) {
1345
1351
  const isList = node.type === "reactive-list";
1346
1352
  const isConditional = node.type === "conditional";
1347
1353
  const isPortal = node.type === "portal";
1348
- const isStatic = node.stateRefs.length === 0 && !hasEvents && !isList && !isConditional && !isPortal;
1354
+ const isComponent = node.type === "component";
1355
+ const isStatic = node.stateRefs.length === 0 && !hasEvents && !isList && !isConditional && !isPortal && !isComponent;
1349
1356
  const isStaticSubtree = isStatic && allChildrenStatic;
1350
1357
  nodes.set(node.id, {
1351
1358
  isStatic,
@@ -1432,7 +1439,7 @@ function renderToString(compiled, options = {}) {
1432
1439
  }
1433
1440
 
1434
1441
  // src/version.ts
1435
- var VERSION = "1.7.0";
1442
+ var VERSION = "1.8.0";
1436
1443
  export {
1437
1444
  STATE_MARKER_ATTR,
1438
1445
  ServerDOMAdapter,