Two fixes: 1. layout.ts: Add estimateTextSize() fallback (~0.6 × fontSize per char) for when MeasureFunc returns null (font not loaded) or CanvasKit is unavailable. Previously fell back to child.width/child.height which defaults to 100×100 for new nodes, blowing up every HUG container. 2. ai/tools.ts: Only call computeAllLayouts + requestRender + push undo for mutating tools (def.mutates). Read-only tools (describe, get_jsx, node_bounds, etc.) were triggering full layout recompute on every call, wasting cycles and potentially destabilizing layouts during AI sessions. |
||
|---|---|---|
| .. | ||
| components.ts | ||
| export-jsx.ts | ||
| index.ts | ||
| jsx-runtime.ts | ||
| mini-react.ts | ||
| render-jsx.ts | ||
| renderer.ts | ||
| tailwind.ts | ||
| tree.ts | ||