@bitbybit-dev/create-app 1.0.0-rc.2 → 1.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/README.md +19 -5
- package/dist/index.js +478 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/cloud/backends/dotnet-rest/BitbybitClient.cs +371 -0
- package/templates/cloud/backends/dotnet-rest/Program.cs +147 -0
- package/templates/cloud/backends/dotnet-rest/Properties/launchSettings.json +14 -0
- package/templates/cloud/backends/dotnet-rest/appsettings.json +13 -0
- package/templates/cloud/backends/dotnet-rest/dotnet-rest.csproj +10 -0
- package/templates/cloud/backends/hono-rest/package.json +19 -0
- package/templates/cloud/backends/hono-rest/src/bitbybit-client.ts +387 -0
- package/templates/cloud/backends/hono-rest/src/index.ts +128 -0
- package/templates/cloud/backends/hono-rest/src/types.ts +4 -0
- package/templates/cloud/backends/hono-rest/tsconfig.json +16 -0
- package/templates/cloud/backends/hono-rest/wrangler.jsonc +11 -0
- package/templates/cloud/backends/hono-sdk/package.json +19 -0
- package/templates/cloud/backends/hono-sdk/src/bitbybit-client.ts +239 -0
- package/templates/cloud/backends/hono-sdk/src/index.ts +155 -0
- package/templates/cloud/backends/hono-sdk/src/types.ts +4 -0
- package/templates/cloud/backends/hono-sdk/tsconfig.json +16 -0
- package/templates/cloud/backends/hono-sdk/wrangler.jsonc +11 -0
- package/templates/cloud/backends/nodejs-rest/.env.example +3 -0
- package/templates/cloud/backends/nodejs-rest/package.json +22 -0
- package/templates/cloud/backends/nodejs-rest/src/bitbybit-client.ts +387 -0
- package/templates/cloud/backends/nodejs-rest/src/index.ts +143 -0
- package/templates/cloud/backends/nodejs-rest/src/types.ts +4 -0
- package/templates/cloud/backends/nodejs-rest/tsconfig.json +17 -0
- package/templates/cloud/backends/nodejs-sdk/.env.example +3 -0
- package/templates/cloud/backends/nodejs-sdk/package.json +23 -0
- package/templates/cloud/backends/nodejs-sdk/src/bitbybit-client.ts +235 -0
- package/templates/cloud/backends/nodejs-sdk/src/index.ts +161 -0
- package/templates/cloud/backends/nodejs-sdk/tsconfig.json +17 -0
- package/templates/cloud/frontend/index.html +13 -0
- package/templates/cloud/frontend/package.json +24 -0
- package/templates/cloud/frontend/src/App.tsx +42 -0
- package/templates/cloud/frontend/src/components/ApiKeyWarning.tsx +41 -0
- package/templates/cloud/frontend/src/components/Header.tsx +8 -0
- package/templates/cloud/frontend/src/components/Tabs.tsx +25 -0
- package/templates/cloud/frontend/src/components/Viewer.tsx +155 -0
- package/templates/cloud/frontend/src/main.tsx +10 -0
- package/templates/cloud/frontend/src/panels/ModelsPanel.tsx +134 -0
- package/templates/cloud/frontend/src/panels/PipelinesPanel.tsx +213 -0
- package/templates/cloud/frontend/src/styles.css +320 -0
- package/templates/cloud/frontend/tsconfig.json +17 -0
- package/templates/cloud/frontend/vite.config.ts +15 -0
- package/templates/vite/babylonjs/typescript/package.json +1 -1
- package/templates/vite/playcanvas/typescript/package.json +1 -1
- package/templates/vite/threejs/typescript/package.json +1 -1
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
background: #1a1c1f;
|
|
5
|
+
color: #f5ece6;
|
|
6
|
+
font-family: "Roboto", system-ui, sans-serif;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.header {
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0; left: 0; right: 0;
|
|
13
|
+
z-index: 20;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
gap: 12px;
|
|
18
|
+
padding: 14px 24px;
|
|
19
|
+
background: rgba(18, 19, 21, 0.85);
|
|
20
|
+
backdrop-filter: blur(10px);
|
|
21
|
+
border-bottom: 1px solid rgba(240, 206, 187, 0.15);
|
|
22
|
+
pointer-events: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.header img {
|
|
26
|
+
width: 36px;
|
|
27
|
+
height: 36px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.header h1 {
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
font-weight: 300;
|
|
33
|
+
color: #F0CEBB;
|
|
34
|
+
letter-spacing: 0.04em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tabs {
|
|
38
|
+
position: fixed;
|
|
39
|
+
top: 65px; left: 0; right: 0;
|
|
40
|
+
z-index: 15;
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
gap: 0;
|
|
44
|
+
background: rgba(18, 19, 21, 0.85);
|
|
45
|
+
backdrop-filter: blur(10px);
|
|
46
|
+
border-bottom: 1px solid rgba(240, 206, 187, 0.1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tab {
|
|
50
|
+
padding: 10px 28px;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
background: transparent;
|
|
54
|
+
color: #888;
|
|
55
|
+
border: none;
|
|
56
|
+
border-bottom: 2px solid transparent;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
transition: all 0.2s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tab:hover {
|
|
62
|
+
color: #F0CEBB;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tab.active {
|
|
66
|
+
color: #F0CEBB;
|
|
67
|
+
border-bottom-color: #F0CEBB;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.panel {
|
|
71
|
+
position: fixed;
|
|
72
|
+
top: 110px;
|
|
73
|
+
left: 0; right: 0; bottom: 0;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
gap: 12px;
|
|
79
|
+
z-index: 10;
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.panel > * {
|
|
84
|
+
pointer-events: auto;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.panel.hidden {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.panel.minimized {
|
|
92
|
+
top: auto;
|
|
93
|
+
bottom: 24px;
|
|
94
|
+
left: 24px;
|
|
95
|
+
right: auto;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
align-items: flex-end;
|
|
98
|
+
justify-content: flex-start;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.panel.minimized .actions {
|
|
103
|
+
flex-direction: row;
|
|
104
|
+
gap: 8px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.panel.minimized .btn {
|
|
108
|
+
padding: 10px 18px;
|
|
109
|
+
font-size: 13px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.panel.minimized .status {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.panel.minimized .json-preview {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.panel.minimized .result-card {
|
|
121
|
+
display: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.actions {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 12px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.btn {
|
|
132
|
+
padding: 14px 32px;
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
font-weight: 400;
|
|
135
|
+
background: #F0CEBB;
|
|
136
|
+
color: #1a1c1f;
|
|
137
|
+
border: none;
|
|
138
|
+
border-radius: 8px;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: all 0.2s;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.btn:hover {
|
|
144
|
+
background: #fff6f3;
|
|
145
|
+
transform: scale(1.05);
|
|
146
|
+
box-shadow: 0 0 20px rgba(240, 206, 187, 0.3);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.btn:disabled {
|
|
150
|
+
opacity: 0.5;
|
|
151
|
+
cursor: not-allowed;
|
|
152
|
+
transform: none;
|
|
153
|
+
box-shadow: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.btn-outline {
|
|
157
|
+
background: transparent;
|
|
158
|
+
color: #F0CEBB;
|
|
159
|
+
border: 1px solid rgba(240, 206, 187, 0.4);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.btn-outline:hover {
|
|
163
|
+
background: rgba(240, 206, 187, 0.1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.btn-danger {
|
|
167
|
+
background: transparent;
|
|
168
|
+
color: #ff6b6b;
|
|
169
|
+
border: 1px solid rgba(255, 107, 107, 0.4);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.btn-danger:hover {
|
|
173
|
+
background: rgba(255, 107, 107, 0.1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.status {
|
|
177
|
+
margin-top: 16px;
|
|
178
|
+
font-size: 14px;
|
|
179
|
+
font-weight: 300;
|
|
180
|
+
min-height: 20px;
|
|
181
|
+
text-align: center;
|
|
182
|
+
color: #888;
|
|
183
|
+
max-width: 600px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.status.error {
|
|
187
|
+
color: #ff6b6b;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.api-key-warning {
|
|
191
|
+
position: fixed;
|
|
192
|
+
top: 65px; left: 0; right: 0;
|
|
193
|
+
z-index: 25;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: flex-start;
|
|
196
|
+
gap: 12px;
|
|
197
|
+
padding: 14px 24px;
|
|
198
|
+
background: rgba(180, 80, 20, 0.92);
|
|
199
|
+
backdrop-filter: blur(10px);
|
|
200
|
+
border-bottom: 1px solid rgba(255, 160, 60, 0.4);
|
|
201
|
+
color: #fff;
|
|
202
|
+
font-size: 14px;
|
|
203
|
+
line-height: 1.5;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.api-key-warning-icon { font-size: 20px; flex-shrink: 0; }
|
|
207
|
+
|
|
208
|
+
.api-key-warning-content strong { display: block; margin-bottom: 4px; }
|
|
209
|
+
|
|
210
|
+
.api-key-warning-content a {
|
|
211
|
+
color: #ffe0a0;
|
|
212
|
+
text-decoration: underline;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.json-preview {
|
|
216
|
+
margin-top: 12px;
|
|
217
|
+
max-width: 600px;
|
|
218
|
+
max-height: 200px;
|
|
219
|
+
overflow: auto;
|
|
220
|
+
background: rgba(0, 0, 0, 0.4);
|
|
221
|
+
border: 1px solid rgba(240, 206, 187, 0.15);
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
padding: 12px;
|
|
224
|
+
font-family: "JetBrains Mono", monospace;
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
color: #a8dadc;
|
|
227
|
+
white-space: pre-wrap;
|
|
228
|
+
text-align: left;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.result-card {
|
|
232
|
+
margin-top: 12px;
|
|
233
|
+
max-width: 600px;
|
|
234
|
+
width: 100%;
|
|
235
|
+
background: rgba(0, 0, 0, 0.35);
|
|
236
|
+
border: 1px solid rgba(240, 206, 187, 0.15);
|
|
237
|
+
border-radius: 8px;
|
|
238
|
+
padding: 14px 16px;
|
|
239
|
+
text-align: left;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.result-card .json-preview {
|
|
243
|
+
margin-top: 8px;
|
|
244
|
+
max-height: 160px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.result-row {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: baseline;
|
|
250
|
+
gap: 10px;
|
|
251
|
+
margin-bottom: 8px;
|
|
252
|
+
font-size: 13px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.result-label {
|
|
256
|
+
color: #888;
|
|
257
|
+
flex-shrink: 0;
|
|
258
|
+
min-width: 72px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.result-value {
|
|
262
|
+
font-family: "JetBrains Mono", monospace;
|
|
263
|
+
font-size: 12px;
|
|
264
|
+
color: #a8dadc;
|
|
265
|
+
word-break: break-all;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.result-link {
|
|
269
|
+
color: #F0CEBB;
|
|
270
|
+
text-decoration: none;
|
|
271
|
+
font-size: 12px;
|
|
272
|
+
word-break: break-all;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.result-link:hover {
|
|
276
|
+
text-decoration: underline;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.result-table {
|
|
280
|
+
width: 100%;
|
|
281
|
+
border-collapse: collapse;
|
|
282
|
+
margin: 8px 0;
|
|
283
|
+
font-size: 13px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.result-table th {
|
|
287
|
+
text-align: left;
|
|
288
|
+
color: #888;
|
|
289
|
+
font-weight: 400;
|
|
290
|
+
padding: 4px 8px 4px 0;
|
|
291
|
+
border-bottom: 1px solid rgba(240, 206, 187, 0.1);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.result-table td {
|
|
295
|
+
padding: 5px 8px 5px 0;
|
|
296
|
+
border-bottom: 1px solid rgba(240, 206, 187, 0.06);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.result-table code {
|
|
300
|
+
font-family: "JetBrains Mono", monospace;
|
|
301
|
+
font-size: 12px;
|
|
302
|
+
color: #a8dadc;
|
|
303
|
+
background: rgba(168, 218, 220, 0.1);
|
|
304
|
+
padding: 1px 5px;
|
|
305
|
+
border-radius: 3px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.btn-raw-toggle {
|
|
309
|
+
margin-top: 8px;
|
|
310
|
+
background: none;
|
|
311
|
+
border: none;
|
|
312
|
+
color: #666;
|
|
313
|
+
font-size: 12px;
|
|
314
|
+
cursor: pointer;
|
|
315
|
+
padding: 2px 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.btn-raw-toggle:hover {
|
|
319
|
+
color: #F0CEBB;
|
|
320
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
build: {
|
|
7
|
+
outDir: "dist",
|
|
8
|
+
emptyOutDir: true,
|
|
9
|
+
},
|
|
10
|
+
server: {
|
|
11
|
+
proxy: {
|
|
12
|
+
"/api": "http://localhost:3000",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|