@braincrew-lab/langchain-canvas 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1530,7 +1530,11 @@ function useSlideFit(ratio, boxRef) {
1530
1530
  if (!ratio) return;
1531
1531
  const el = boxRef.current;
1532
1532
  if (!el) return;
1533
- const fit = () => setScale(Math.min(1, (el.clientWidth - 40) / SLIDE_W));
1533
+ const fit = () => {
1534
+ const w = el.clientWidth;
1535
+ if (w <= 40) return;
1536
+ setScale(Math.min(1, (w - 40) / SLIDE_W));
1537
+ };
1534
1538
  fit();
1535
1539
  const ro = new ResizeObserver(fit);
1536
1540
  ro.observe(el);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braincrew-lab/langchain-canvas",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A live canvas for LangChain agents — stream documents, charts, and rich artifacts into a React panel.",
5
5
  "license": "MIT",
6
6
  "type": "module",