@ifiwas/standard-view 2.0.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/.prettierignore +67 -0
- package/.prettierrc +12 -0
- package/CHANGELOG.md +42 -0
- package/LICENSE +8 -0
- package/README.md +199 -0
- package/debug-storybook.log +179 -0
- package/declarations.d.ts +17 -0
- package/dist/standard-view.es.js +9522 -0
- package/dist/standard-view.es.js.map +1 -0
- package/dist/standard-view.umd.js +41 -0
- package/dist/standard-view.umd.js.map +1 -0
- package/fonts/gentilis.bold.typeface.json +1 -0
- package/fonts/gentilis.typeface.json +1 -0
- package/fonts/helvetiker.bold.typeface.json +1 -0
- package/fonts/helvetiker.typeface.json +1 -0
- package/fonts/optimer.bold.typeface.json +1 -0
- package/fonts/optimer.typeface.json +1 -0
- package/images.d.ts +7 -0
- package/index.js +10 -0
- package/lib/controls/OrbitControls.d.ts +9 -0
- package/lib/controls/OrbitControls.js +761 -0
- package/lib/controls/index.d.ts +1 -0
- package/lib/controls/index.js +18 -0
- package/lib/groups/Arrow.d.ts +19 -0
- package/lib/groups/Arrow.js +134 -0
- package/lib/groups/Axis.d.ts +20 -0
- package/lib/groups/Axis.js +147 -0
- package/lib/groups/BoundingBox.d.ts +9 -0
- package/lib/groups/BoundingBox.js +143 -0
- package/lib/groups/Camera.d.ts +32 -0
- package/lib/groups/Camera.js +477 -0
- package/lib/groups/Capsule.d.ts +9 -0
- package/lib/groups/Capsule.js +112 -0
- package/lib/groups/FBX.d.ts +9 -0
- package/lib/groups/FBX.js +213 -0
- package/lib/groups/GLTF.d.ts +9 -0
- package/lib/groups/GLTF.js +198 -0
- package/lib/groups/Group.d.ts +63 -0
- package/lib/groups/Group.js +426 -0
- package/lib/groups/OBJ.d.ts +11 -0
- package/lib/groups/OBJ.js +252 -0
- package/lib/groups/PCD.d.ts +9 -0
- package/lib/groups/PCD.js +82 -0
- package/lib/groups/Path.d.ts +19 -0
- package/lib/groups/Path.js +160 -0
- package/lib/groups/index.d.ts +11 -0
- package/lib/groups/index.js +91 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +298 -0
- package/lib/lights/AmbientLight.d.ts +8 -0
- package/lib/lights/AmbientLight.js +37 -0
- package/lib/lights/DirectionalLight.d.ts +8 -0
- package/lib/lights/DirectionalLight.js +43 -0
- package/lib/lights/HemisphereLight.d.ts +13 -0
- package/lib/lights/HemisphereLight.js +108 -0
- package/lib/lights/LightWithShadows.d.ts +24 -0
- package/lib/lights/LightWithShadows.js +188 -0
- package/lib/lights/PointLight.d.ts +9 -0
- package/lib/lights/PointLight.js +47 -0
- package/lib/lights/RectAreaLight.d.ts +13 -0
- package/lib/lights/RectAreaLight.js +177 -0
- package/lib/lights/SpotLight.d.ts +10 -0
- package/lib/lights/SpotLight.js +49 -0
- package/lib/lights/index.d.ts +6 -0
- package/lib/lights/index.js +48 -0
- package/lib/primitives/Box.d.ts +6 -0
- package/lib/primitives/Box.js +43 -0
- package/lib/primitives/Circle.d.ts +10 -0
- package/lib/primitives/Circle.js +85 -0
- package/lib/primitives/Cylinder.d.ts +15 -0
- package/lib/primitives/Cylinder.js +180 -0
- package/lib/primitives/Label.d.ts +18 -0
- package/lib/primitives/Label.js +189 -0
- package/lib/primitives/Line.d.ts +19 -0
- package/lib/primitives/Line.js +173 -0
- package/lib/primitives/Mesh.d.ts +72 -0
- package/lib/primitives/Mesh.js +642 -0
- package/lib/primitives/Plane.d.ts +7 -0
- package/lib/primitives/Plane.js +47 -0
- package/lib/primitives/Polygon.d.ts +8 -0
- package/lib/primitives/Polygon.js +75 -0
- package/lib/primitives/Quad.d.ts +9 -0
- package/lib/primitives/Quad.js +110 -0
- package/lib/primitives/Sphere.d.ts +14 -0
- package/lib/primitives/Sphere.js +92 -0
- package/lib/primitives/Text.d.ts +20 -0
- package/lib/primitives/Text.js +285 -0
- package/lib/primitives/Triangle.d.ts +8 -0
- package/lib/primitives/Triangle.js +83 -0
- package/lib/primitives/index.d.ts +12 -0
- package/lib/primitives/index.js +90 -0
- package/lib/shaders/index.d.ts +0 -0
- package/lib/shaders/index.js +2 -0
- package/lib/types/three-jsx.d.js +5 -0
- package/lib/utils/constants.js +181 -0
- package/lib/utils/events.d.ts +22 -0
- package/lib/utils/events.js +98 -0
- package/lib/utils/hooks.d.ts +8 -0
- package/lib/utils/hooks.js +96 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +110 -0
- package/lib/utils/interfaces.d.ts +9 -0
- package/lib/utils/interfaces.js +5 -0
- package/lib/utils/math.d.ts +12 -0
- package/lib/utils/math.js +31 -0
- package/lib/utils/performance.d.ts +7 -0
- package/lib/utils/performance.js +114 -0
- package/lib/utils/styles.js +10 -0
- package/lib/utils/util.d.ts +76 -0
- package/lib/utils/util.js +290 -0
- package/lib/views/ContextBridge.d.ts +23 -0
- package/lib/views/ContextBridge.js +98 -0
- package/lib/views/SceneCamera.d.ts +7 -0
- package/lib/views/SceneCamera.js +52 -0
- package/lib/views/SetBackground.d.ts +9 -0
- package/lib/views/SetBackground.js +90 -0
- package/lib/views/SetControls.d.ts +19 -0
- package/lib/views/SetControls.js +173 -0
- package/lib/views/SetRenderer.d.ts +25 -0
- package/lib/views/SetRenderer.js +66 -0
- package/lib/views/SetShadows.d.ts +7 -0
- package/lib/views/SetShadows.js +48 -0
- package/lib/views/View3D.d.ts +21 -0
- package/lib/views/View3D.js +289 -0
- package/lib/views/ViewContext.d.ts +23 -0
- package/lib/views/ViewContext.js +55 -0
- package/lib/views/index.d.ts +2 -0
- package/lib/views/index.js +20 -0
- package/netlify.toml +15 -0
- package/package.json +110 -0
- package/tsconfig.json +42 -0
- package/tsconfig.prod.json +3 -0
- package/tsconfig.test.json +6 -0
- package/vite.config.ts +37 -0
package/.prettierignore
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
yarn.lock
|
|
4
|
+
package-lock.json
|
|
5
|
+
|
|
6
|
+
# Build outputs
|
|
7
|
+
dist/
|
|
8
|
+
lib/
|
|
9
|
+
build/
|
|
10
|
+
storybook-static/
|
|
11
|
+
|
|
12
|
+
# Generated files
|
|
13
|
+
*.min.js
|
|
14
|
+
*.min.css
|
|
15
|
+
|
|
16
|
+
# Logs
|
|
17
|
+
*.log
|
|
18
|
+
|
|
19
|
+
# Runtime data
|
|
20
|
+
pids
|
|
21
|
+
*.pid
|
|
22
|
+
*.seed
|
|
23
|
+
*.pid.lock
|
|
24
|
+
|
|
25
|
+
# Coverage directory used by tools like istanbul
|
|
26
|
+
coverage/
|
|
27
|
+
|
|
28
|
+
# nyc test coverage
|
|
29
|
+
.nyc_output
|
|
30
|
+
|
|
31
|
+
# Dependency directories
|
|
32
|
+
jspm_packages/
|
|
33
|
+
|
|
34
|
+
# Optional npm cache directory
|
|
35
|
+
.npm
|
|
36
|
+
|
|
37
|
+
# Optional REPL history
|
|
38
|
+
.node_repl_history
|
|
39
|
+
|
|
40
|
+
# Output of 'npm pack'
|
|
41
|
+
*.tgz
|
|
42
|
+
|
|
43
|
+
# Yarn Integrity file
|
|
44
|
+
.yarn-integrity
|
|
45
|
+
|
|
46
|
+
# dotenv environment variables file
|
|
47
|
+
.env
|
|
48
|
+
|
|
49
|
+
# IDE files
|
|
50
|
+
.vscode/
|
|
51
|
+
.idea/
|
|
52
|
+
|
|
53
|
+
# OS generated files
|
|
54
|
+
.DS_Store
|
|
55
|
+
.DS_Store?
|
|
56
|
+
._*
|
|
57
|
+
.Spotlight-V100
|
|
58
|
+
.Trashes
|
|
59
|
+
ehthumbs.db
|
|
60
|
+
Thumbs.db
|
|
61
|
+
|
|
62
|
+
# Git
|
|
63
|
+
.git/
|
|
64
|
+
|
|
65
|
+
# Storybook
|
|
66
|
+
.storybook/main.js
|
|
67
|
+
.storybook/preview.js
|
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
# Unreleased
|
|
4
|
+
|
|
5
|
+
# 2.0.0
|
|
6
|
+
|
|
7
|
+
- 🎉 Added support for latest npm dependencies
|
|
8
|
+
- 🧹 Removed webpack
|
|
9
|
+
- 🧹 Fixed jest.config
|
|
10
|
+
- 🧹 Fixed three.js dependencies
|
|
11
|
+
- Fixed Camera
|
|
12
|
+
- Fixed BufferGeometry
|
|
13
|
+
- outputColorSpace --> outputEncoding
|
|
14
|
+
- 🧹 Fixed Broken Stories
|
|
15
|
+
- 💫 Added gltf paths to three.js examples in GLTF Story
|
|
16
|
+
- 💫 Converted Stories to TypeScript
|
|
17
|
+
- 💫 Updated Light intensities
|
|
18
|
+
- 💫 Updated Text Extrusion heights
|
|
19
|
+
- 💫 Fixed Canvas size
|
|
20
|
+
|
|
21
|
+
# 1.0.6
|
|
22
|
+
|
|
23
|
+
- 🎉 Added support for legacy code paths
|
|
24
|
+
|
|
25
|
+
# 1.0.5
|
|
26
|
+
|
|
27
|
+
- 🎉 Added `FBX` which accepts the following props
|
|
28
|
+
- `fbxPath`: string
|
|
29
|
+
- `fbxURL`: string
|
|
30
|
+
- `actionIndex`: number
|
|
31
|
+
- all `Group` props
|
|
32
|
+
- 📖 Added `FBX` Story
|
|
33
|
+
- Fix [Issue #2](https://github.com/standard-ai/standard-view/issues/2)
|
|
34
|
+
- Fix bug in nested context story
|
|
35
|
+
|
|
36
|
+
# 1.0.2 - 1.0.4
|
|
37
|
+
|
|
38
|
+
- 🧹 Cleaned up readme and fix image links
|
|
39
|
+
|
|
40
|
+
# 1.0.0
|
|
41
|
+
|
|
42
|
+
- 🎊 Released this library as Open Source
|
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright 2020 Standard Cognition
|
|
2
|
+
Copyright 2026 If I Was
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Standard View
|
|
2
|
+
|
|
3
|
+
Forked from @standard/view
|
|
4
|
+
|
|
5
|
+
# Usage
|
|
6
|
+
|
|
7
|
+
Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
$ npm install @ifiwas/standard-view
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Place Views into your React App. For example:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
import { View3D, Box } from '@ifiwas/standard-view';
|
|
17
|
+
.
|
|
18
|
+
.
|
|
19
|
+
.
|
|
20
|
+
<View3D>
|
|
21
|
+
<Box position={[1, 0, 0]} color="green" />
|
|
22
|
+
<Box position={[-1, 0, 0]} color="red" />
|
|
23
|
+
</View3D>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/example.png?raw=true" width="250" height="200" />
|
|
27
|
+
|
|
28
|
+
For details about valid properties, look at the interfaces named `*Props`, where `*` is the component name, in `src/primitves/` and `src/groups/`.
|
|
29
|
+
|
|
30
|
+
## Stories
|
|
31
|
+
|
|
32
|
+
`yarn storybook` to see stories of each component in `standard-view`.
|
|
33
|
+
You may also visit [Standard View Storybook](https://standard-view.ifiwaslabs.com) served with netlify.
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/sample-platter.gif?raw=true" width="800" height="400" />
|
|
39
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/standard-cube.gif?raw=true" width="400" height="400" />
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## create-react-app to Standard View Project
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/create-app-to-standard-view.gif?raw=true" />
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
## Fit to Window
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/canvas-css.gif?raw=true" />
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
Set `.App canvas` in css file to adjust Standard View `View3D` canvas.
|
|
55
|
+
|
|
56
|
+
## Intellisense
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://github.com/ifiwas/standard-view/blob/master/example-gifs/intellisense.gif?raw=true" />
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
For VSCode, press `ctrl + space` to force load intellisense at cursor location.
|
|
63
|
+
|
|
64
|
+
## Standard View Components
|
|
65
|
+
|
|
66
|
+
Primitives
|
|
67
|
+
|
|
68
|
+
- `Mesh`
|
|
69
|
+
- `Box`
|
|
70
|
+
- `Camera`
|
|
71
|
+
- `Circle`
|
|
72
|
+
- `Cylinder`
|
|
73
|
+
- `Plane`
|
|
74
|
+
- `Polygon`
|
|
75
|
+
- `Quad`
|
|
76
|
+
- `Sphere`
|
|
77
|
+
- `Triangle`
|
|
78
|
+
|
|
79
|
+
Groups
|
|
80
|
+
|
|
81
|
+
- `Group`
|
|
82
|
+
- `Arrow`
|
|
83
|
+
- `Axis`
|
|
84
|
+
- `Capsule`
|
|
85
|
+
- `GLTF`
|
|
86
|
+
- `OBJ`
|
|
87
|
+
- `PCD`
|
|
88
|
+
|
|
89
|
+
Lines
|
|
90
|
+
|
|
91
|
+
- `Line`
|
|
92
|
+
- `BoundingBox` (Group)
|
|
93
|
+
|
|
94
|
+
Texts
|
|
95
|
+
|
|
96
|
+
- `Text` (Mesh)
|
|
97
|
+
- `Label` (Mesh)
|
|
98
|
+
|
|
99
|
+
Lights
|
|
100
|
+
|
|
101
|
+
- `AmbientLight`
|
|
102
|
+
- `DirectionalLight`
|
|
103
|
+
- `HemisphereLight`
|
|
104
|
+
- `PointLight`
|
|
105
|
+
- `SpotLight`
|
|
106
|
+
|
|
107
|
+
Views
|
|
108
|
+
|
|
109
|
+
- `View3D`
|
|
110
|
+
|
|
111
|
+
## Mesh
|
|
112
|
+
|
|
113
|
+
All Standard View primitives are composed within `Mesh`,
|
|
114
|
+
with the exception of `Line`, `BoundingBox`, `Text`, and `Group`.
|
|
115
|
+
Therefore, properties of `Mesh` are common to nearly alll components.
|
|
116
|
+
Here is a list of explicitly managed `Mesh` properties in Standard View:
|
|
117
|
+
|
|
118
|
+
Mesh Properties
|
|
119
|
+
|
|
120
|
+
- position: Array\<number\>
|
|
121
|
+
- scale: Array\<number\>
|
|
122
|
+
- rotation: Array\<number\>
|
|
123
|
+
- quaternion: Array\<number\>
|
|
124
|
+
|
|
125
|
+
Material Properties
|
|
126
|
+
|
|
127
|
+
- color: string
|
|
128
|
+
- hoverColor: string
|
|
129
|
+
- opacity: number
|
|
130
|
+
- texturePath: string
|
|
131
|
+
- textureURL: string
|
|
132
|
+
- material: THREE.Material
|
|
133
|
+
|
|
134
|
+
Geometry Properties
|
|
135
|
+
|
|
136
|
+
- wireframe: boolean
|
|
137
|
+
- side: number
|
|
138
|
+
- geometry: THREE.Geometry
|
|
139
|
+
|
|
140
|
+
Animation Properties
|
|
141
|
+
|
|
142
|
+
- animation: Function
|
|
143
|
+
- state: Object
|
|
144
|
+
|
|
145
|
+
Event Properties
|
|
146
|
+
|
|
147
|
+
- onClick: Function
|
|
148
|
+
- onDoubleClick: Function
|
|
149
|
+
- onWheel: Function
|
|
150
|
+
- onPointerUp: Function
|
|
151
|
+
- onPointerDown: Function
|
|
152
|
+
- onPointerOver: Function
|
|
153
|
+
- onPointerOut: Function
|
|
154
|
+
- onPointerMove: Function
|
|
155
|
+
|
|
156
|
+
`Mesh` can also support animations via the animation property. A function with one argument that may be destructured to include `state`, `setState`, `mesh`, and any Canvas properties desired for the animation.
|
|
157
|
+
All primitives and shapes may have animation. These animations are reactive, so they incur many render calls, but also maintain `react-three-renderer`'s native raycasting for the event property functions.
|
|
158
|
+
|
|
159
|
+
`Mesh` also exposes `@react-three/fiber`'s the event property functions but with a constrained argument set, similar to animation. All event property functions take one arguement that may be destructured to include `mesh`, `state`, `setState`, and any Canvas prop. The benefit of this design, just like animations, is that a reference to `mesh` is automatically provided. Moreover, `@react-three/fiber`'s `Canvas` state properties are exposed. This allows event functions to reach right into the `@react-three/fiber`/`three.js`'s `scene`, `camera`, `gl`, etc. Hence all shapes that are `Mesh`s may have these event property functions.
|
|
160
|
+
|
|
161
|
+
Of course, `Mesh` can accept properties handled by `@react-three/fiber`/`three.js` as well.
|
|
162
|
+
After explicitly managing these properties, remaining properties are passed to `@react-three/fiber`'s `mesh`.
|
|
163
|
+
(`Mesh` is a wrapper of `@react-three/fiber`'s `mesh`, which is a wrapper of `THREE.Mesh`.)
|
|
164
|
+
|
|
165
|
+
## View3D
|
|
166
|
+
|
|
167
|
+
Here is a list of explicitly managed `View3D` properties in Standard View:
|
|
168
|
+
|
|
169
|
+
WebGLRenderer Properties
|
|
170
|
+
|
|
171
|
+
- background: string
|
|
172
|
+
|
|
173
|
+
Camera Control Properties
|
|
174
|
+
|
|
175
|
+
- trackballControls: boolean
|
|
176
|
+
- orbitControls: boolean
|
|
177
|
+
- mapControls: boolean
|
|
178
|
+
|
|
179
|
+
Of course, `View3D` can accept `Canvas` properties handled by `@react-three/fiber` as well. The Standard View properties are handled and stripped away before passing the properties to `Canvas`.
|
|
180
|
+
(`View3D` is a wrapper of `@react-three/fiber`'s `Canvas`.)
|
|
181
|
+
|
|
182
|
+
## Text
|
|
183
|
+
|
|
184
|
+
`Text` in Standard View is composed within a `Mesh`. So `Text` may accept all the same properties as a `Mesh`. `Text` also should have a `text` property with the desired string to be displayed and also a `font` or `fontName`. `font`s are typeface.json fonts and must be a `THREE.Font`. The default `three.js` fonts are also included in Standard View, so simply passing `fontName` with one of those fonts will work.
|
|
185
|
+
|
|
186
|
+
Fonts
|
|
187
|
+
|
|
188
|
+
- helvetiker
|
|
189
|
+
- helvetikerBold
|
|
190
|
+
- optimer
|
|
191
|
+
- optimerBold
|
|
192
|
+
- gentilis
|
|
193
|
+
- gentilisBold
|
|
194
|
+
|
|
195
|
+
In general `Text` will be much more computation expensive to render compared to `Label` which is just a `Plane` with a texture of the desired text.
|
|
196
|
+
|
|
197
|
+
## @react-three/fiber
|
|
198
|
+
|
|
199
|
+
Checkout [`@react-three/fiber`'s page](https://github.com/drcmda/@react-three/fiber) for more details.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
[01:10:45.334] [INFO] Storybook Upgrade - v9.0.16
|
|
2
|
+
[01:10:45.425] [INFO] detect-projects-spinner-start: Detecting projects...
|
|
3
|
+
[01:10:45.428] [DEBUG] Finding Storybook projects...
|
|
4
|
+
[01:10:45.590] [DEBUG] Found 1 Storybook projects
|
|
5
|
+
[01:10:45.591] [INFO] detect-projects-spinner: Detecting projects: 1 projects
|
|
6
|
+
[01:10:45.592] [DEBUG] Getting Storybook data...
|
|
7
|
+
[01:10:45.592] [DEBUG] Getting Storybook info...
|
|
8
|
+
[01:10:45.593] [DEBUG] Loading main config...
|
|
9
|
+
[01:10:45.783] [DEBUG] Getting stories paths...
|
|
10
|
+
[01:10:45.815] [DEBUG] Getting package manager...
|
|
11
|
+
[01:10:46.088] [DEBUG] Getting Storybook version...
|
|
12
|
+
[01:10:46.089] [DEBUG] /.storybook - Validating before version... 8.6.14
|
|
13
|
+
[01:10:46.089] [DEBUG] /.storybook - Validating upgrade compatibility...
|
|
14
|
+
[01:10:46.089] [DEBUG] /.storybook - Fetching NPM version information...
|
|
15
|
+
[01:10:46.089] [DEBUG] Getting CLI versions from NPM for storybook...
|
|
16
|
+
[01:10:46.091] [DEBUG] Getting CLI versions from NPM for storybook@next...
|
|
17
|
+
[01:10:46.953] [DEBUG] /.storybook - Evaluating blockers...
|
|
18
|
+
[01:10:46.956] [DEBUG] Getting installed version for @storybook/experimental-addon-test...
|
|
19
|
+
[01:10:47.594] [INFO] detect-projects-spinner-stop: 1 project detected
|
|
20
|
+
[01:10:47.595] [DEBUG] Found 1 valid projects and 0 error projects
|
|
21
|
+
[01:10:47.595] [INFO] Upgrading from 8.6.14 to 9.0.16
|
|
22
|
+
[01:10:47.669] [INFO] upgrade-dependencies-task-start: Fetching versions to update package.json files..
|
|
23
|
+
[01:10:47.669] [DEBUG] Updating dependencies in /.storybook...
|
|
24
|
+
[01:10:47.741] [INFO] upgrade-dependencies-task: /package.json
|
|
25
|
+
[01:10:47.742] [DEBUG] {
|
|
26
|
+
"upgradedDependencies": []
|
|
27
|
+
}
|
|
28
|
+
[01:10:47.742] [DEBUG] {
|
|
29
|
+
"upgradedDevDependencies": [
|
|
30
|
+
"@storybook/addon-links@9.0.16",
|
|
31
|
+
"@storybook/cli@^9.0.16",
|
|
32
|
+
"@storybook/react@^9.0.16",
|
|
33
|
+
"@storybook/react-vite@9.0.16"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
[01:10:47.742] [DEBUG] {
|
|
37
|
+
"upgradedPeerDependencies": []
|
|
38
|
+
}
|
|
39
|
+
[01:10:47.743] [DEBUG] Getting CLI versions from NPM for @storybook/addon-links...
|
|
40
|
+
[01:10:48.561] [DEBUG] Getting CLI versions from NPM for @storybook/cli...
|
|
41
|
+
[01:10:49.342] [DEBUG] Getting CLI versions from NPM for @storybook/react...
|
|
42
|
+
[01:10:50.114] [DEBUG] Getting CLI versions from NPM for @storybook/react-vite...
|
|
43
|
+
[01:10:50.754] [INFO] upgrade-dependencies-task-success: Updated package versions in package.json files
|
|
44
|
+
[01:10:50.754] [INFO] detect-automigrations-task-start: Detecting automigrations...
|
|
45
|
+
[01:10:50.755] [DEBUG] Starting automigration collection across 1 projects and 15 fixes...
|
|
46
|
+
[01:10:50.827] [INFO] detect-automigrations-task: Checking automigrations for /.storybook...
|
|
47
|
+
[01:10:50.827] [DEBUG] Processing project: /.storybook
|
|
48
|
+
[01:10:50.827] [DEBUG] Checking fix eslintPlugin for project /.storybook...
|
|
49
|
+
[01:10:50.831] [DEBUG] Checking fix addon-mdx-gfm-remove for project /.storybook...
|
|
50
|
+
[01:10:50.832] [DEBUG] Checking fix addon-storysource-code-panel for project /.storybook...
|
|
51
|
+
[01:10:50.832] [DEBUG] Checking fix upgrade-storybook-related-dependencies for project /.storybook...
|
|
52
|
+
[01:10:50.832] [DEBUG] Checking for incompatible storybook packages...
|
|
53
|
+
[01:10:50.835] [DEBUG] Getting installed version for @storybook/addon-essentials...
|
|
54
|
+
[01:10:50.836] [DEBUG] Getting installed version for @storybook/addon-interactions...
|
|
55
|
+
[01:10:50.838] [DEBUG] Getting installed version for @storybook/blocks...
|
|
56
|
+
[01:10:50.839] [DEBUG] Getting installed version for @storybook/testing-library...
|
|
57
|
+
[01:10:53.007] [DEBUG] Getting CLI versions from NPM for @storybook/addon-interactions...
|
|
58
|
+
[01:10:53.038] [DEBUG] Getting CLI versions from NPM for @storybook/testing-library...
|
|
59
|
+
[01:10:53.116] [DEBUG] Getting CLI versions from NPM for @storybook/blocks...
|
|
60
|
+
[01:10:53.184] [DEBUG] Getting CLI versions from NPM for @storybook/addon-essentials...
|
|
61
|
+
[01:10:53.981] [DEBUG] Checking fix initial-globals for project /.storybook...
|
|
62
|
+
[01:10:54.005] [DEBUG] Checking fix addon-a11y-addon-test for project /.storybook...
|
|
63
|
+
[01:10:54.005] [DEBUG] Checking fix consolidated-imports for project /.storybook...
|
|
64
|
+
[01:10:54.006] [DEBUG] Checking fix addon-experimental-test for project /.storybook...
|
|
65
|
+
[01:10:54.006] [DEBUG] Using cached installed version for @storybook/experimental-addon-test...
|
|
66
|
+
[01:10:54.006] [DEBUG] Checking fix rnstorybook-config for project /.storybook...
|
|
67
|
+
[01:10:54.006] [DEBUG] Checking fix remove-addon-interactions for project /.storybook...
|
|
68
|
+
[01:10:54.006] [DEBUG] Checking fix renderer-to-framework for project /.storybook...
|
|
69
|
+
[01:10:54.007] [DEBUG] Checking fix remove-essential-addons for project /.storybook...
|
|
70
|
+
[01:10:54.007] [DEBUG] Checking fix addon-a11y-parameters for project /.storybook...
|
|
71
|
+
[01:10:54.007] [DEBUG] Checking fix remove-docs-autodocs for project /.storybook...
|
|
72
|
+
[01:10:54.013] [DEBUG] Checking fix wrap-require for project /.storybook...
|
|
73
|
+
[01:10:54.088] [INFO] detect-automigrations-task:
|
|
74
|
+
Automigrations detected:
|
|
75
|
+
[01:10:54.165] [INFO] detect-automigrations-task: ✔ eslintPlugin
|
|
76
|
+
[01:10:54.235] [INFO] detect-automigrations-task: ✔ consolidated-imports
|
|
77
|
+
[01:10:54.303] [INFO] detect-automigrations-task: ✔ remove-addon-interactions
|
|
78
|
+
[01:10:54.375] [INFO] detect-automigrations-task: ✔ renderer-to-framework
|
|
79
|
+
[01:10:54.445] [INFO] detect-automigrations-task: ✔ remove-essential-addons
|
|
80
|
+
[01:10:54.513] [INFO] detect-automigrations-task: ✔ remove-docs-autodocs
|
|
81
|
+
[01:10:54.513] [INFO] detect-automigrations-task-success: 6 automigration(s) detected
|
|
82
|
+
[01:11:15.257] [PROMPT] Select automigrations to run {"choice":["eslintPlugin","consolidated-imports","remove-addon-interactions","renderer-to-framework","remove-essential-addons","remove-docs-autodocs"]}
|
|
83
|
+
[01:11:15.258] [INFO] automigrate-/.storybook-task-start: Running automigrations for /.storybook
|
|
84
|
+
[01:11:15.258] [DEBUG] Adding dependencies: eslint-plugin-storybook@9.0.16
|
|
85
|
+
[01:11:15.259] [DEBUG] Getting CLI versions from NPM for eslint-plugin-storybook...
|
|
86
|
+
[01:11:15.906] [INFO] automigrate-/.storybook-task: ✔ eslintPlugin
|
|
87
|
+
[01:11:15.994] [INFO] automigrate-/.storybook-task: ✔ consolidated-imports
|
|
88
|
+
[01:11:15.998] [DEBUG] Uninstalling @storybook/addon-interactions
|
|
89
|
+
[01:11:15.999] [DEBUG] Removing '@storybook/addon-interactions' from main.js addons field.
|
|
90
|
+
[01:11:16.076] [INFO] automigrate-/.storybook-task: ✔ remove-addon-interactions
|
|
91
|
+
[01:11:16.076] [DEBUG]
|
|
92
|
+
Migrating @storybook/react to @storybook/react-vite
|
|
93
|
+
[01:11:16.079] [DEBUG] Updating package.json files...
|
|
94
|
+
[01:11:16.149] [INFO] automigrate-/.storybook-task: ✔ renderer-to-framework
|
|
95
|
+
[01:11:16.153] [DEBUG] Uninstalling @storybook/addon-essentials
|
|
96
|
+
[01:11:16.153] [DEBUG] Removing '@storybook/addon-essentials' from main.js addons field.
|
|
97
|
+
[01:11:16.158] [DEBUG] Getting Storybook info...
|
|
98
|
+
[01:11:16.159] [DEBUG] Loading main config...
|
|
99
|
+
[01:11:16.178] [DEBUG] Getting stories paths...
|
|
100
|
+
[01:11:16.181] [DEBUG] Getting package manager...
|
|
101
|
+
[01:11:16.190] [DEBUG] Getting Storybook version...
|
|
102
|
+
[01:11:16.261] [INFO] automigrate-/.storybook-task: Verifying @storybook/addon-docs
|
|
103
|
+
[01:11:16.332] [INFO] automigrate-/.storybook-task: Installing @storybook/addon-docs@9.0.16
|
|
104
|
+
[01:11:16.333] [DEBUG] Getting CLI versions from NPM for @storybook/addon-docs...
|
|
105
|
+
[01:11:17.138] [INFO] automigrate-/.storybook-task: Adding '@storybook/addon-docs' to the "addons" field in
|
|
106
|
+
/Users/wasif/git-repos/ifiwas/standard-view/.storybook/main.js
|
|
107
|
+
[01:11:17.219] [INFO] automigrate-/.storybook-task: ✔ remove-essential-addons
|
|
108
|
+
[01:11:17.292] [INFO] automigrate-/.storybook-task: 🔄 Updating docs parameter in main config file...
|
|
109
|
+
[01:11:17.368] [INFO] automigrate-/.storybook-task: ✔ remove-docs-autodocs
|
|
110
|
+
[01:11:17.369] [INFO] automigrate-/.storybook-task-success: Completed automigrations for /.storybook
|
|
111
|
+
[01:11:17.369] [INFO] Installing dependencies...
|
|
112
|
+
[01:11:17.369] [INFO] install-dependencies-task-start: Installing dependencies...
|
|
113
|
+
[01:11:17.622] [INFO] yarn install v1.22.22
|
|
114
|
+
[01:11:17.692] [INFO] install-dependencies-task: yarn install v1.22.22
|
|
115
|
+
[01:11:17.695] [INFO] [1/4] Resolving packages...
|
|
116
|
+
[01:11:17.762] [INFO] install-dependencies-task: [1/4] Resolving packages...
|
|
117
|
+
[01:11:20.123] [INFO] [2/4] Fetching packages...
|
|
118
|
+
[01:11:20.190] [INFO] install-dependencies-task: [2/4] Fetching packages...
|
|
119
|
+
[01:11:20.534] [INFO] [3/4] Linking dependencies...
|
|
120
|
+
[01:11:20.606] [INFO] install-dependencies-task: [3/4] Linking dependencies...
|
|
121
|
+
[01:11:21.959] [INFO] [4/4] Building fresh packages...
|
|
122
|
+
[01:11:22.031] [INFO] install-dependencies-task: [4/4] Building fresh packages...
|
|
123
|
+
[01:11:22.031] [INFO] success Saved lockfile.
|
|
124
|
+
$ yarn build
|
|
125
|
+
[01:11:22.100] [INFO] install-dependencies-task: success Saved lockfile.
|
|
126
|
+
$ yarn build
|
|
127
|
+
[01:11:22.567] [INFO] yarn run v1.22.22
|
|
128
|
+
[01:11:22.635] [INFO] install-dependencies-task: yarn run v1.22.22
|
|
129
|
+
[01:11:22.635] [INFO] $ vite build && yarn build-babel && yarn build-tsc
|
|
130
|
+
[01:11:22.707] [INFO] install-dependencies-task: $ vite build && yarn build-babel && yarn build-tsc
|
|
131
|
+
[01:11:23.248] [INFO] vite v5.4.19 building for production...
|
|
132
|
+
[01:11:23.317] [INFO] install-dependencies-task: vite v5.4.19 building for production...
|
|
133
|
+
[01:11:23.317] [INFO] transforming...
|
|
134
|
+
[01:11:23.388] [INFO] install-dependencies-task: transforming...
|
|
135
|
+
[01:11:25.176] [INFO] ✓ 230 modules transformed.
|
|
136
|
+
[01:11:25.245] [INFO] install-dependencies-task: ✓ 230 modules transformed.
|
|
137
|
+
[01:11:25.545] [INFO] rendering chunks...
|
|
138
|
+
[01:11:25.616] [INFO] install-dependencies-task: rendering chunks...
|
|
139
|
+
[01:11:25.763] [INFO] computing gzip size...
|
|
140
|
+
[01:11:25.835] [INFO] install-dependencies-task: computing gzip size...
|
|
141
|
+
[01:11:25.835] [INFO] dist/standard-view.es.js 1,712.11 kB │ gzip: 437.10 kB │ map: 4,791.33 kB
|
|
142
|
+
[01:11:25.907] [INFO] install-dependencies-task: dist/standard-view.es.js 1,712.11 kB │ gzip: 437.10 kB │ map: 4,791.33 kB
|
|
143
|
+
[01:11:26.634] [INFO] dist/standard-view.umd.js 1,292.53 kB │ gzip: 389.87 kB │ map: 4,683.34 kB
|
|
144
|
+
[01:11:26.702] [INFO] install-dependencies-task: dist/standard-view.umd.js 1,292.53 kB │ gzip: 389.87 kB │ map: 4,683.34 kB
|
|
145
|
+
[01:11:26.703] [INFO] ✓ built in 3.37s
|
|
146
|
+
[01:11:26.774] [INFO] install-dependencies-task: ✓ built in 3.37s
|
|
147
|
+
[01:11:27.123] [INFO] $ babel --extensions '.ts,.tsx,.js,.jsx' src/ -d lib/ --copy-files
|
|
148
|
+
[01:11:27.195] [INFO] install-dependencies-task: $ babel --extensions '.ts,.tsx,.js,.jsx' src/ -d lib/ --copy-files
|
|
149
|
+
[01:11:29.505] [INFO] Successfully compiled 55 files with Babel (1931ms).
|
|
150
|
+
[01:11:29.573] [INFO] install-dependencies-task: Successfully compiled 55 files with Babel (1931ms).
|
|
151
|
+
[01:11:29.822] [INFO] $ tsc
|
|
152
|
+
[01:11:29.894] [INFO] install-dependencies-task: $ tsc
|
|
153
|
+
[01:11:32.643] [INFO] Done in 10.08s.
|
|
154
|
+
[01:11:32.716] [INFO] install-dependencies-task: Done in 10.08s.
|
|
155
|
+
[01:11:32.716] [INFO] Done in 15.05s.
|
|
156
|
+
[01:11:32.787] [INFO] install-dependencies-task: Done in 15.05s.
|
|
157
|
+
[01:11:32.788] [INFO] Dependencies installed
|
|
158
|
+
[01:11:32.788] [INFO] install-dependencies-task-success: Dependencies installed
|
|
159
|
+
[01:11:32.788] [INFO] Checking the health of your project(s)..
|
|
160
|
+
[01:11:33.479] [WARN] /.storybook: 1 issue found
|
|
161
|
+
[01:11:33.549] [INFO] The "storybook" package was not found in your package.json.
|
|
162
|
+
Installing "storybook" as a direct dev dependency in your package.json is required.
|
|
163
|
+
[01:11:33.549] [INFO] Missing Storybook Dependency
|
|
164
|
+
[01:11:33.620] [INFO] The "storybook" package was not found in your package.json.
|
|
165
|
+
Installing "storybook" as a direct dev dependency in your package.json is required.
|
|
166
|
+
[01:11:33.691] [INFO] Storybook doctor is complete!
|
|
167
|
+
[01:11:33.762] [INFO] You can always recheck the health of your project(s) by running:
|
|
168
|
+
npx storybook doctor
|
|
169
|
+
[01:11:33.834] [INFO] The upgrade is complete!
|
|
170
|
+
[01:11:33.905] [INFO] Your project(s) have been upgraded successfully, but some issues were found which need your attention, please check Storybook doctor logs above.
|
|
171
|
+
[01:11:34.399] [INFO] If you want to learn more about the automigrations that executed in your project(s), please check the following links:
|
|
172
|
+
|
|
173
|
+
• eslintPlugin
|
|
174
|
+
• consolidated-imports
|
|
175
|
+
• remove-addon-interactions
|
|
176
|
+
• renderer-to-framework
|
|
177
|
+
• remove-essential-addons
|
|
178
|
+
• remove-docs-autodocs
|
|
179
|
+
[01:11:34.471] [INFO] For a full list of changes, please check our migration guide: https://storybook.js.org/docs/migration-guide
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// declarations.d.ts
|
|
2
|
+
|
|
3
|
+
declare module "*.png";
|
|
4
|
+
declare module "*.jpg";
|
|
5
|
+
declare module "*.jpeg";
|
|
6
|
+
declare module "*.gif";
|
|
7
|
+
declare module "*.svg";
|
|
8
|
+
declare module "*.glb";
|
|
9
|
+
declare module "*.gltf";
|
|
10
|
+
declare module "*.fbx";
|
|
11
|
+
declare module "*.obj";
|
|
12
|
+
declare module "*.mtl";
|
|
13
|
+
declare module "*.pcd";
|
|
14
|
+
declare module "*.hdr";
|
|
15
|
+
declare module "*.typeface.json";
|
|
16
|
+
declare module "*.wasm";
|
|
17
|
+
declare module "*.bin";
|