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/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/{compile-Cte0nf06.d.cts → compile-CJJQYi71.d.cts} +137 -2
- package/dist/{compile-Cte0nf06.d.ts → compile-CJJQYi71.d.ts} +137 -2
- 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-zK-fihvd.d.cts → hydration-diagnostics-BQeehq3i.d.cts} +1 -1
- package/dist/{hydration-diagnostics-Ddgs3Puu.d.ts → hydration-diagnostics-DNAJumYF.d.ts} +1 -1
- package/dist/index.cjs +103 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -7
- package/dist/index.d.ts +40 -7
- package/dist/index.js +99 -2
- package/dist/index.js.map +1 -1
- package/dist/{server-D4A8eunr.d.cts → server-CnLEnlYU.d.cts} +1 -1
- package/dist/{server-cgmCiPsz.d.ts → server-DNlg7ou2.d.ts} +1 -1
- package/dist/server.cjs +9 -2
- 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 +9 -2
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +1088 -2
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +63 -4
- package/dist/testing.d.ts +63 -4
- package/dist/testing.js +1082 -2
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
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-
|
|
2
|
-
export { V as VERSION } from './compile-
|
|
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-
|
|
2
|
-
export { V as VERSION } from './compile-
|
|
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
|
|
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.
|
|
1442
|
+
var VERSION = "1.8.0";
|
|
1436
1443
|
export {
|
|
1437
1444
|
STATE_MARKER_ATTR,
|
|
1438
1445
|
ServerDOMAdapter,
|