@toriistudio/v0-playground 0.5.1 → 0.5.3
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 +9 -3
- package/dist/index.mjs +9 -3
- package/package.json +50 -12
package/dist/index.js
CHANGED
|
@@ -876,7 +876,11 @@ var ResponsiveCamera = ({
|
|
|
876
876
|
}, [height, camera, width]);
|
|
877
877
|
return null;
|
|
878
878
|
};
|
|
879
|
-
var Canvas = ({
|
|
879
|
+
var Canvas = ({
|
|
880
|
+
mediaProps,
|
|
881
|
+
children,
|
|
882
|
+
...otherProps
|
|
883
|
+
}) => {
|
|
880
884
|
const canvasRef = (0, import_react8.useRef)(null);
|
|
881
885
|
const [parentSize, setParentSize] = (0, import_react8.useState)(null);
|
|
882
886
|
(0, import_react8.useEffect)(() => {
|
|
@@ -914,6 +918,7 @@ var Canvas = ({ mediaProps, children }) => {
|
|
|
914
918
|
resize: { polyfill: ResizeObserver },
|
|
915
919
|
style: { width: parentSize?.width, height: parentSize?.height },
|
|
916
920
|
gl: { preserveDrawingBuffer: true },
|
|
921
|
+
...otherProps,
|
|
917
922
|
children: [
|
|
918
923
|
parentSize?.height && parentSize?.width && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
919
924
|
ResponsiveCamera,
|
|
@@ -938,9 +943,10 @@ var Canvas_default = Canvas;
|
|
|
938
943
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
939
944
|
var PlaygroundCanvas = ({
|
|
940
945
|
children,
|
|
941
|
-
mediaProps
|
|
946
|
+
mediaProps,
|
|
947
|
+
...otherProps
|
|
942
948
|
}) => {
|
|
943
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Playground, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Canvas_default, { mediaProps, children }) });
|
|
949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Playground, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Canvas_default, { mediaProps, ...otherProps, children }) });
|
|
944
950
|
};
|
|
945
951
|
var PlaygroundCanvas_default = PlaygroundCanvas;
|
|
946
952
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -846,7 +846,11 @@ var ResponsiveCamera = ({
|
|
|
846
846
|
}, [height, camera, width]);
|
|
847
847
|
return null;
|
|
848
848
|
};
|
|
849
|
-
var Canvas = ({
|
|
849
|
+
var Canvas = ({
|
|
850
|
+
mediaProps,
|
|
851
|
+
children,
|
|
852
|
+
...otherProps
|
|
853
|
+
}) => {
|
|
850
854
|
const canvasRef = useRef4(null);
|
|
851
855
|
const [parentSize, setParentSize] = useState6(null);
|
|
852
856
|
useEffect6(() => {
|
|
@@ -884,6 +888,7 @@ var Canvas = ({ mediaProps, children }) => {
|
|
|
884
888
|
resize: { polyfill: ResizeObserver },
|
|
885
889
|
style: { width: parentSize?.width, height: parentSize?.height },
|
|
886
890
|
gl: { preserveDrawingBuffer: true },
|
|
891
|
+
...otherProps,
|
|
887
892
|
children: [
|
|
888
893
|
parentSize?.height && parentSize?.width && /* @__PURE__ */ jsx14(
|
|
889
894
|
ResponsiveCamera,
|
|
@@ -908,9 +913,10 @@ var Canvas_default = Canvas;
|
|
|
908
913
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
909
914
|
var PlaygroundCanvas = ({
|
|
910
915
|
children,
|
|
911
|
-
mediaProps
|
|
916
|
+
mediaProps,
|
|
917
|
+
...otherProps
|
|
912
918
|
}) => {
|
|
913
|
-
return /* @__PURE__ */ jsx15(Playground, { children: /* @__PURE__ */ jsx15(Canvas_default, { mediaProps, children }) });
|
|
919
|
+
return /* @__PURE__ */ jsx15(Playground, { children: /* @__PURE__ */ jsx15(Canvas_default, { mediaProps, ...otherProps, children }) });
|
|
914
920
|
};
|
|
915
921
|
var PlaygroundCanvas_default = PlaygroundCanvas;
|
|
916
922
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toriistudio/v0-playground",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "V0 Playground",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"LICENSE",
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
|
+
"sideEffects": false,
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "tsup",
|
|
32
33
|
"local:push": "yarn build && yalc push",
|
|
@@ -43,9 +44,9 @@
|
|
|
43
44
|
"react",
|
|
44
45
|
"component",
|
|
45
46
|
"headless",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
47
|
+
"canvas",
|
|
48
|
+
"r3f",
|
|
49
|
+
"three"
|
|
49
50
|
],
|
|
50
51
|
"author": "toriistudio",
|
|
51
52
|
"license": "MIT",
|
|
@@ -54,23 +55,37 @@
|
|
|
54
55
|
},
|
|
55
56
|
"homepage": "https://github.com/toriistudio/v0-playground#readme",
|
|
56
57
|
"peerDependencies": {
|
|
58
|
+
"react": ">=18 <20",
|
|
59
|
+
"react-dom": ">=18 <20",
|
|
57
60
|
"@radix-ui/react-label": "^2.1.6",
|
|
58
61
|
"@radix-ui/react-select": "^2.2.4",
|
|
59
62
|
"@radix-ui/react-slider": "^1.3.4",
|
|
60
63
|
"@radix-ui/react-slot": "^1.2.3",
|
|
61
64
|
"@radix-ui/react-switch": "^1.2.4",
|
|
62
|
-
"@react-three/drei": "^10.3.0",
|
|
63
|
-
"@react-three/fiber": "^9.1.2",
|
|
64
65
|
"class-variance-authority": "^0.7.1",
|
|
65
66
|
"clsx": "^2.1.1",
|
|
66
67
|
"lodash": "^4.17.21",
|
|
67
68
|
"lucide-react": "^0.522.0",
|
|
68
|
-
"react": "^19.1.0",
|
|
69
|
-
"react-dom": "^19.1.0",
|
|
70
69
|
"tailwind-merge": "^3.3.1",
|
|
71
70
|
"tailwindcss-animate": "^1.0.7",
|
|
72
|
-
"three": "
|
|
73
|
-
"three
|
|
71
|
+
"@react-three/fiber": ">=9.0.0",
|
|
72
|
+
"@react-three/drei": ">=10.0.0",
|
|
73
|
+
"three": ">=0.157 <1",
|
|
74
|
+
"three-stdlib": ">=2.36.0"
|
|
75
|
+
},
|
|
76
|
+
"peerDependenciesMeta": {
|
|
77
|
+
"@react-three/fiber": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"@react-three/drei": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"three": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"three-stdlib": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
74
89
|
},
|
|
75
90
|
"devDependencies": {
|
|
76
91
|
"@radix-ui/react-label": "^2.1.6",
|
|
@@ -80,6 +95,8 @@
|
|
|
80
95
|
"@radix-ui/react-switch": "^1.2.4",
|
|
81
96
|
"@react-three/drei": "^10.3.0",
|
|
82
97
|
"@react-three/fiber": "^9.1.2",
|
|
98
|
+
"three": "^0.177.0",
|
|
99
|
+
"three-stdlib": "^2.36.0",
|
|
83
100
|
"@types/lodash": "^4.17.19",
|
|
84
101
|
"@types/node": "^24.0.3",
|
|
85
102
|
"@types/react": "^19.1.2",
|
|
@@ -91,12 +108,33 @@
|
|
|
91
108
|
"tailwind-merge": "^3.3.1",
|
|
92
109
|
"tailwindcss": "^4.1.10",
|
|
93
110
|
"tailwindcss-animate": "^1.0.7",
|
|
94
|
-
"three": "^0.177.0",
|
|
95
|
-
"three-stdlib": "^2.36.0",
|
|
96
111
|
"tsup": "^8.4.0",
|
|
97
112
|
"typescript": "^5.8.3"
|
|
98
113
|
},
|
|
99
114
|
"publishConfig": {
|
|
100
115
|
"access": "public"
|
|
116
|
+
},
|
|
117
|
+
"engines": {
|
|
118
|
+
"node": ">=18"
|
|
119
|
+
},
|
|
120
|
+
"tsup": {
|
|
121
|
+
"entry": [
|
|
122
|
+
"src/index.ts"
|
|
123
|
+
],
|
|
124
|
+
"dts": true,
|
|
125
|
+
"format": [
|
|
126
|
+
"cjs",
|
|
127
|
+
"esm"
|
|
128
|
+
],
|
|
129
|
+
"sourcemap": true,
|
|
130
|
+
"clean": true,
|
|
131
|
+
"external": [
|
|
132
|
+
"react",
|
|
133
|
+
"react-dom",
|
|
134
|
+
"@react-three/fiber",
|
|
135
|
+
"@react-three/drei",
|
|
136
|
+
"three",
|
|
137
|
+
"three-stdlib"
|
|
138
|
+
]
|
|
101
139
|
}
|
|
102
140
|
}
|