@animaapp/anima-sdk-react 0.2.8 → 0.3.1

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.
@@ -0,0 +1,25 @@
1
+ import { join, dirname } from "path";
2
+
3
+ /**
4
+ * This function is used to resolve the absolute path of a package.
5
+ * It is needed in projects that use Yarn PnP or are set up within a monorepo.
6
+ */
7
+ function getAbsolutePath(value) {
8
+ return dirname(require.resolve(join(value, "package.json")));
9
+ }
10
+
11
+ /** @type { import('@storybook/react-vite').StorybookConfig } */
12
+ const config = {
13
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
14
+ addons: [
15
+ getAbsolutePath("@storybook/addon-essentials"),
16
+ getAbsolutePath("@storybook/addon-onboarding"),
17
+ getAbsolutePath("@chromatic-com/storybook"),
18
+ getAbsolutePath("@storybook/addon-interactions"),
19
+ ],
20
+ framework: {
21
+ name: getAbsolutePath("@storybook/react-vite"),
22
+ options: {},
23
+ },
24
+ };
25
+ export default config;
@@ -0,0 +1,13 @@
1
+ /** @type { import('@storybook/react').Preview } */
2
+ const preview = {
3
+ parameters: {
4
+ controls: {
5
+ matchers: {
6
+ color: /(background|color)$/i,
7
+ date: /Date$/i,
8
+ },
9
+ },
10
+ },
11
+ };
12
+
13
+ export default preview;
@@ -1,13 +1,13 @@
1
1
 
2
2
  vite v6.0.11 building for production...
3
- transforming (1) src/index.ts../node_modules/swr/dist/_internal/config-context-client-Cm1JTDEP.mjs (1:0): Module level directives cause errors when bundled, "use client" in "../node_modules/swr/dist/_internal/config-context-client-Cm1JTDEP.mjs" was ignored.
3
+ transforming (1) src/index.tstransforming (13) ../node_modules/swr/dist/_internal/constants.mjs../node_modules/swr/dist/_internal/config-context-client-Cm1JTDEP.mjs (1:0): Module level directives cause errors when bundled, "use client" in "../node_modules/swr/dist/_internal/config-context-client-Cm1JTDEP.mjs" was ignored.
4
4
  ✓ 25 modules transformed.
5
5
  rendering chunks (1)...
6
6
  [vite:dts] Start generate declaration files...
7
- computing gzip size (0)...computing gzip size (1)...dist/index.cjs 112.89 kB │ gzip: 33.33 kB │ map: 415.45 kB
7
+ computing gzip size (0)...computing gzip size (1)...dist/index.cjs 113.03 kB │ gzip: 32.99 kB │ map: 416.13 kB
8
8
  [vite:dts] Start rollup declaration files...
9
9
  Analysis will use the bundled TypeScript version 5.7.2
10
- [vite:dts] Declaration files built in 1880ms.
10
+ [vite:dts] Declaration files built in 2349ms.
11
11
  
12
- rendering chunks (1)...computing gzip size (1)...dist/index.js 167.12 kB │ gzip: 41.94 kB │ map: 432.75 kB
13
- ✓ built in 2.27s
12
+ rendering chunks (1)...computing gzip size (1)...dist/index.js 167.32 kB │ gzip: 41.60 kB │ map: 433.44 kB
13
+ ✓ built in 2.82s
@@ -0,0 +1,48 @@
1
+
2
+ Debugger listening on ws://127.0.0.1:55824/e986c11e-da68-43dc-b346-1128e146a7cf
3
+ For help, see: https://nodejs.org/en/docs/inspector
4
+ Debugger attached.
5
+ Debugger listening on ws://127.0.0.1:55837/86d83af6-408f-454a-bb79-047072081990
6
+ For help, see: https://nodejs.org/en/docs/inspector
7
+ Debugger attached.
8
+ @storybook/core v8.6.6
9
+ 
10
+ info => Starting manager..
11
+ WARN No story files found for the specified pattern: src/**/*.mdx
12
+ info => Starting preview..
13
+ info Using tsconfig paths for react-docgen
14
+ ╭──────────────────────────────────────────────────────────────────────────────────────────╮
15
+ │ │
16
+ │ Storybook 8.6.6 for react-vite started │
17
+ │ 195 ms for manager and 1.39 s for preview │
18
+ │ │
19
+ │ Local: http://localhost:6006/ │
20
+ │ On your network: http://10.16.22.162:6006/ │
21
+ │ │
22
+ │ A new version (8.6.7) is available! │
23
+ │ │
24
+ │ Upgrade now: npx storybook@latest upgrade │
25
+ │ │
26
+ │ Read full changelog: https://github.com/storybookjs/storybook/blob/main/CHANGELOG.md │
27
+ │ │
28
+ ╰──────────────────────────────────────────────────────────────────────────────────────────╯
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+ 7:24:47 PM [vite] (client) page reload src/stories/useAnimaCodegen.stories.tsx
48
+ Waiting for the debugger to disconnect...
@@ -0,0 +1,161 @@
1
+
2
+ Determining test suites to run...
3
+
4
+
5
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
6
+
7
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
8
+
9
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
10
+
11
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
12
+
13
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
14
+
15
+
16
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
17
+
18
+
19
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
20
+
21
+
22
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
23
+
24
+
25
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
26
+
27
+
28
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
29
+
30
+
31
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
32
+
33
+
34
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
35
+
36
+
37
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
38
+
39
+
40
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
41
+
42
+
43
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
44
+
45
+
46
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
47
+
48
+
49
+ page.evaluate: StorybookTestRunnerError:
50
+ An error occurred in the following story. Access the link for full output:
51
+ http://127.0.0.1:6006/?path=/story/hooks-useanimacodegen--success&addonPanel=storybook/interactions/panel
52
+
53
+ Message:
54
+ expected null to match object { sessionId: Anything, …(4) }
55
+ 
56
+  
57
+ 
58
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:217:58
59
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
60
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
61
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
62
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
63
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
64
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16
65
+  at testFn (sdk-react/src/stories/useAnimaCodegen.stories.tsx:302:49)
66
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:315:33)
67
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
68
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
69
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
70
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
71
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
72
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16)
73
+
74
+  ● Hooks/useAnimaCodegen › InvalidBody › play-test
75
+
76
+ page.evaluate: StorybookTestRunnerError:
77
+ An error occurred in the following story. Access the link for full output:
78
+ http://127.0.0.1:6006/?path=/story/hooks-useanimacodegen--invalid-body&addonPanel=storybook/interactions/panel
79
+
80
+ Message:
81
+ expected { name: 'TypeError', …(1) } to match object { …(4) }
82
+ 
83
+  
84
+ 
85
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:404:58
86
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
87
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
88
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
89
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
90
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
91
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16
92
+  at testFn (sdk-react/src/stories/useAnimaCodegen.stories.tsx:489:49)
93
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:502:33)
94
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
95
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
96
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
97
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
98
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
99
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16)
100
+
101
+  ● Hooks/useAnimaCodegen › NotFoundFile › play-test
102
+
103
+ page.evaluate: StorybookTestRunnerError:
104
+ An error occurred in the following story. Access the link for full output:
105
+ http://127.0.0.1:6006/?path=/story/hooks-useanimacodegen--not-found-file&addonPanel=storybook/interactions/panel
106
+
107
+ Message:
108
+ expected { name: 'TypeError', …(1) } to match object { name: 'Task Crashed', …(1) }
109
+ 
110
+  
111
+ 
112
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:591:58
113
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
114
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
115
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
116
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
117
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
118
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16
119
+  at testFn (sdk-react/src/stories/useAnimaCodegen.stories.tsx:676:49)
120
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:689:33)
121
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
122
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
123
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
124
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
125
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
126
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16)
127
+
128
+  ● Hooks/useAnimaCodegen › InvalidSelectedNode › play-test
129
+
130
+ page.evaluate: StorybookTestRunnerError:
131
+ An error occurred in the following story. Access the link for full output:
132
+ http://127.0.0.1:6006/?path=/story/hooks-useanimacodegen--invalid-selected-node&addonPanel=storybook/interactions/panel
133
+
134
+ Message:
135
+ expected { name: 'TypeError', …(1) } to match object { name: 'Task Crashed', …(1) }
136
+ 
137
+  
138
+ 
139
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:778:58
140
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
141
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
142
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
143
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
144
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
145
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16
146
+  at testFn (sdk-react/src/stories/useAnimaCodegen.stories.tsx:863:49)
147
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:876:33)
148
+  at step (sdk-react/src/stories/useAnimaCodegen.stories.tsx:161:23)
149
+  at Object.next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:102:20)
150
+  at asyncGeneratorStep (sdk-react/src/stories/useAnimaCodegen.stories.tsx:4:28)
151
+  at _next (sdk-react/src/stories/useAnimaCodegen.stories.tsx:22:17)
152
+  at sdk-react/src/stories/useAnimaCodegen.stories.tsx:27:13
153
+  at Object.<anonymous> (sdk-react/src/stories/useAnimaCodegen.stories.tsx:19:16)
154
+
155
+
156
+  RUNS   browser: chromium  src/stories/useAnimaCodegen.stories.tsx
157
+
158
+ Tests: 4 failed, 4 total
159
+ Snapshots: 0 total
160
+ Time: 1.07 s
161
+ Ran all test suites.