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.
@@ -1,4 +1,4 @@
1
- import { C as CompiledApplication } from './compile-Cte0nf06.cjs';
1
+ import { C as CompiledApplication } from './compile-CJJQYi71.cjs';
2
2
 
3
3
  /**
4
4
  * DOMAdapter — framework-owned abstraction over DOM operations.
@@ -1,4 +1,4 @@
1
- import { C as CompiledApplication } from './compile-Cte0nf06.js';
1
+ import { C as CompiledApplication } from './compile-CJJQYi71.js';
2
2
 
3
3
  /**
4
4
  * DOMAdapter — framework-owned abstraction over DOM operations.
package/dist/server.cjs CHANGED
@@ -1141,6 +1141,7 @@ function mountNode(ctx, graphNode, parentDom) {
1141
1141
  instance.addChild(childInstance);
1142
1142
  }
1143
1143
  dom.appendChild(parentDom, el);
1144
+ if (graphNode.type === "component") wireComponentBehavior(ctx, graphNode, instance);
1144
1145
  return instance;
1145
1146
  }
1146
1147
  function textUpdate(dom, el, textNode) {
@@ -1309,6 +1310,11 @@ function wireOverlayBehavior(ctx, graphNode, instance, target) {
1309
1310
  instance.trackCleanup(teardown);
1310
1311
  if (openSig.peek() === true) onOpenChange(true);
1311
1312
  }
1313
+ function wireComponentBehavior(ctx, graphNode, instance) {
1314
+ const fn = ctx.graph.getHandler(`__component__${graphNode.id}`);
1315
+ if (fn === void 0) return;
1316
+ for (const cleanup of fn()) instance.trackCleanup(cleanup);
1317
+ }
1312
1318
 
1313
1319
  // ../renderer/src/dehydrate.ts
1314
1320
  var STATE_MARKER_ATTR = "data-streetui-state";
@@ -1376,7 +1382,8 @@ function analyzeGraph(graph) {
1376
1382
  const isList = node.type === "reactive-list";
1377
1383
  const isConditional = node.type === "conditional";
1378
1384
  const isPortal = node.type === "portal";
1379
- const isStatic = node.stateRefs.length === 0 && !hasEvents && !isList && !isConditional && !isPortal;
1385
+ const isComponent = node.type === "component";
1386
+ const isStatic = node.stateRefs.length === 0 && !hasEvents && !isList && !isConditional && !isPortal && !isComponent;
1380
1387
  const isStaticSubtree = isStatic && allChildrenStatic;
1381
1388
  nodes.set(node.id, {
1382
1389
  isStatic,
@@ -1463,7 +1470,7 @@ function renderToString(compiled, options = {}) {
1463
1470
  }
1464
1471
 
1465
1472
  // src/version.ts
1466
- var VERSION = "1.7.0";
1473
+ var VERSION = "1.8.0";
1467
1474
  // Annotate the CommonJS export names for ESM import in node:
1468
1475
  0 && (module.exports = {
1469
1476
  STATE_MARKER_ATTR,