@tanstack/cta-ui 0.10.0-alpha.23 → 0.10.0-alpha.26
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/assets/index-D0-fpgzI.js +223 -0
- package/dist/assets/index-D0-fpgzI.js.map +1 -0
- package/dist/assets/index-D5brMzJg.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +13 -0
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +25 -0
- package/dist/robots.txt +3 -0
- package/dist/tailwind.svg +1 -0
- package/dist/tanstack.png +0 -0
- package/dist/typescript.svg +1 -0
- package/index.html +12 -0
- package/{src → lib}/engine-handling/add-to-app-wrapper.ts +37 -41
- package/{src → lib}/engine-handling/create-app-wrapper.ts +35 -37
- package/{src → lib}/engine-handling/generate-initial-payload.ts +27 -1
- package/lib/engine-handling/server-environment.ts +37 -0
- package/lib/index.ts +140 -34
- package/lib/types.d.ts +13 -0
- package/lib-dist/engine-handling/add-to-app-wrapper.d.ts +12 -0
- package/lib-dist/engine-handling/add-to-app-wrapper.js +73 -0
- package/lib-dist/engine-handling/create-app-wrapper.d.ts +13 -0
- package/lib-dist/engine-handling/create-app-wrapper.js +68 -0
- package/lib-dist/engine-handling/file-helpers.d.ts +2 -0
- package/lib-dist/engine-handling/file-helpers.js +20 -0
- package/lib-dist/engine-handling/framework-registration.d.ts +1 -0
- package/lib-dist/engine-handling/framework-registration.js +10 -0
- package/lib-dist/engine-handling/generate-initial-payload.d.ts +40 -0
- package/lib-dist/engine-handling/generate-initial-payload.js +93 -0
- package/lib-dist/engine-handling/server-environment.d.ts +17 -0
- package/lib-dist/engine-handling/server-environment.js +18 -0
- package/lib-dist/index.d.ts +3 -7
- package/lib-dist/index.js +119 -18
- package/package.json +11 -12
- package/src/components/sidebar-items/starter.tsx +12 -4
- package/src/components/starters-carousel.tsx +45 -0
- package/src/components/startup-dialog.tsx +73 -0
- package/src/components/ui/carousel.tsx +239 -0
- package/src/index.tsx +44 -0
- package/src/lib/api.ts +10 -8
- package/src/main.tsx +12 -0
- package/src/store/project.ts +39 -0
- package/src/types.d.ts +15 -0
- package/vite.config.ts +16 -0
- package/app.config.js +0 -22
- package/src/api.ts +0 -6
- package/src/client.tsx +0 -8
- package/src/engine-handling/server-environment.ts +0 -26
- package/src/integrations/tanstack-query/layout.tsx +0 -5
- package/src/integrations/tanstack-query/root-provider.tsx +0 -15
- package/src/logo.svg +0 -44
- package/src/routeTree.gen.ts +0 -88
- package/src/router.tsx +0 -32
- package/src/routes/__root.tsx +0 -86
- package/src/routes/api/add-to-app.ts +0 -21
- package/src/routes/api/create-app.ts +0 -21
- package/src/routes/api/dry-run-add-to-app.ts +0 -16
- package/src/routes/api/dry-run-create-app.ts +0 -16
- package/src/routes/api/initial-payload.ts +0 -10
- package/src/routes/api/load-remote-add-on.ts +0 -42
- package/src/routes/api/load-starter.ts +0 -47
- package/src/routes/api/shutdown.ts +0 -11
- package/src/routes/index.tsx +0 -15
- package/src/ssr.tsx +0 -12
- /package/{src → lib}/engine-handling/file-helpers.ts +0 -0
- /package/{src → lib}/engine-handling/framework-registration.ts +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
import { AddOnCompiledSchema } from '@tanstack/cta-engine'
|
|
5
|
-
|
|
6
|
-
export const APIRoute = createAPIFileRoute('/api/load-remote-add-on')({
|
|
7
|
-
GET: async ({ request }) => {
|
|
8
|
-
const incomingUrl = new URL(request.url)
|
|
9
|
-
const url = incomingUrl.searchParams.get('url')
|
|
10
|
-
|
|
11
|
-
if (!url) {
|
|
12
|
-
return json({ error: 'url is required' }, { status: 400 })
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
const response = await fetch(url)
|
|
17
|
-
const data = await response.json()
|
|
18
|
-
|
|
19
|
-
const parsed = AddOnCompiledSchema.safeParse(data)
|
|
20
|
-
|
|
21
|
-
if (!parsed.success) {
|
|
22
|
-
return json({ error: 'Invalid add-on data' }, { status: 400 })
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return json({
|
|
26
|
-
id: url,
|
|
27
|
-
name: parsed.data.name,
|
|
28
|
-
description: parsed.data.description,
|
|
29
|
-
version: parsed.data.version,
|
|
30
|
-
author: parsed.data.author,
|
|
31
|
-
license: parsed.data.license,
|
|
32
|
-
link: parsed.data.link,
|
|
33
|
-
smallLogo: parsed.data.smallLogo,
|
|
34
|
-
logo: parsed.data.logo,
|
|
35
|
-
type: parsed.data.type,
|
|
36
|
-
modes: parsed.data.modes,
|
|
37
|
-
})
|
|
38
|
-
} catch {
|
|
39
|
-
return json({ error: 'Failed to load add-on' }, { status: 500 })
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
})
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
import { StarterCompiledSchema } from '@tanstack/cta-engine'
|
|
5
|
-
|
|
6
|
-
export const APIRoute = createAPIFileRoute('/api/load-starter')({
|
|
7
|
-
GET: async ({ request }) => {
|
|
8
|
-
const incomingUrl = new URL(request.url)
|
|
9
|
-
const url = incomingUrl.searchParams.get('url')
|
|
10
|
-
|
|
11
|
-
if (!url) {
|
|
12
|
-
return json({ error: 'url is required' }, { status: 400 })
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
const response = await fetch(url)
|
|
17
|
-
const data = await response.json()
|
|
18
|
-
|
|
19
|
-
const parsed = StarterCompiledSchema.safeParse(data)
|
|
20
|
-
|
|
21
|
-
if (!parsed.success) {
|
|
22
|
-
return json({ error: 'Invalid starter data' }, { status: 400 })
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return json({
|
|
26
|
-
url,
|
|
27
|
-
|
|
28
|
-
id: parsed.data.id,
|
|
29
|
-
name: parsed.data.name,
|
|
30
|
-
description: parsed.data.description,
|
|
31
|
-
version: parsed.data.version,
|
|
32
|
-
author: parsed.data.author,
|
|
33
|
-
license: parsed.data.license,
|
|
34
|
-
dependsOn: parsed.data.dependsOn,
|
|
35
|
-
|
|
36
|
-
mode: parsed.data.mode,
|
|
37
|
-
typescript: parsed.data.typescript,
|
|
38
|
-
tailwind: parsed.data.tailwind,
|
|
39
|
-
banner: parsed.data.banner
|
|
40
|
-
? url.replace('starter.json', parsed.data.banner)
|
|
41
|
-
: undefined,
|
|
42
|
-
})
|
|
43
|
-
} catch {
|
|
44
|
-
return json({ error: 'Failed to load starter' }, { status: 500 })
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
})
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
export const APIRoute = createAPIFileRoute('/api/shutdown')({
|
|
5
|
-
POST: () => {
|
|
6
|
-
setTimeout(() => {
|
|
7
|
-
process.exit(0)
|
|
8
|
-
}, 50)
|
|
9
|
-
return json({ shutdown: true })
|
|
10
|
-
},
|
|
11
|
-
})
|
package/src/routes/index.tsx
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createFileRoute } from '@tanstack/react-router'
|
|
2
|
-
|
|
3
|
-
import FileNavigator from '@/components/file-navigator'
|
|
4
|
-
|
|
5
|
-
export const Route = createFileRoute('/')({
|
|
6
|
-
component: App,
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
function App() {
|
|
10
|
-
return (
|
|
11
|
-
<div className="pl-3">
|
|
12
|
-
<FileNavigator />
|
|
13
|
-
</div>
|
|
14
|
-
)
|
|
15
|
-
}
|
package/src/ssr.tsx
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createStartHandler,
|
|
3
|
-
defaultStreamHandler,
|
|
4
|
-
} from '@tanstack/react-start/server'
|
|
5
|
-
import { getRouterManifest } from '@tanstack/react-start/router-manifest'
|
|
6
|
-
|
|
7
|
-
import { createRouter } from './router'
|
|
8
|
-
|
|
9
|
-
export default createStartHandler({
|
|
10
|
-
createRouter,
|
|
11
|
-
getRouterManifest,
|
|
12
|
-
})(defaultStreamHandler)
|
|
File without changes
|
|
File without changes
|