@braincrew-lab/langchain-canvas 0.1.4 → 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.
- package/dist/index.js +5 -1
- package/package.json +16 -22
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 = () =>
|
|
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.
|
|
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",
|
|
@@ -18,29 +18,17 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"comment": "Dev resolves to source (no build needed; Next transpiles via transpilePackages). publishConfig swaps to dist for npm.",
|
|
21
|
-
"main": "./
|
|
22
|
-
"types": "./
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
23
|
"exports": {
|
|
24
|
-
".":
|
|
25
|
-
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./styles.css": "./dist/styles.css"
|
|
26
29
|
},
|
|
27
30
|
"publishConfig": {
|
|
28
|
-
"access": "public"
|
|
29
|
-
"main": "./dist/index.js",
|
|
30
|
-
"types": "./dist/index.d.ts",
|
|
31
|
-
"exports": {
|
|
32
|
-
".": {
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
34
|
-
"import": "./dist/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./styles.css": "./dist/styles.css"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsup",
|
|
41
|
-
"dev": "tsup --watch",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
43
|
-
"test": "vitest run"
|
|
31
|
+
"access": "public"
|
|
44
32
|
},
|
|
45
33
|
"peerDependencies": {
|
|
46
34
|
"react": "^18 || ^19",
|
|
@@ -65,5 +53,11 @@
|
|
|
65
53
|
"tsup": "^8.2.4",
|
|
66
54
|
"typescript": "^5.5.4",
|
|
67
55
|
"vitest": "^2"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup",
|
|
59
|
+
"dev": "tsup --watch",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"test": "vitest run"
|
|
68
62
|
}
|
|
69
|
-
}
|
|
63
|
+
}
|