@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
package/src/lib/api.ts
CHANGED
|
@@ -2,12 +2,14 @@ import type { SerializedOptions } from '@tanstack/cta-engine'
|
|
|
2
2
|
|
|
3
3
|
import type { AddOnInfo, DryRunOutput, InitialData, StarterInfo } from '@/types'
|
|
4
4
|
|
|
5
|
+
const baseUrl = import.meta.env.VITE_API_BASE_URL || ''
|
|
6
|
+
|
|
5
7
|
export async function createAppStreaming(
|
|
6
8
|
options: SerializedOptions,
|
|
7
9
|
chosenAddOns: Array<string>,
|
|
8
10
|
projectStarter?: StarterInfo,
|
|
9
11
|
) {
|
|
10
|
-
return await fetch(
|
|
12
|
+
return await fetch(`${baseUrl}/api/create-app`, {
|
|
11
13
|
method: 'POST',
|
|
12
14
|
body: JSON.stringify({
|
|
13
15
|
options: {
|
|
@@ -23,7 +25,7 @@ export async function createAppStreaming(
|
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export async function addToAppStreaming(chosenAddOns: Array<string>) {
|
|
26
|
-
return await fetch(
|
|
28
|
+
return await fetch(`${baseUrl}/api/add-to-app`, {
|
|
27
29
|
method: 'POST',
|
|
28
30
|
body: JSON.stringify({
|
|
29
31
|
addOns: chosenAddOns,
|
|
@@ -35,23 +37,23 @@ export async function addToAppStreaming(chosenAddOns: Array<string>) {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export function shutdown() {
|
|
38
|
-
return fetch(
|
|
40
|
+
return fetch(`${baseUrl}/api/shutdown`, {
|
|
39
41
|
method: 'POST',
|
|
40
42
|
})
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export async function loadRemoteAddOn(url: string) {
|
|
44
|
-
const response = await fetch(
|
|
46
|
+
const response = await fetch(`${baseUrl}/api/load-remote-add-on?url=${url}`)
|
|
45
47
|
return (await response.json()) as AddOnInfo | { error: string }
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
export async function loadRemoteStarter(url: string) {
|
|
49
|
-
const response = await fetch(
|
|
51
|
+
const response = await fetch(`${baseUrl}/api/load-starter?url=${url}`)
|
|
50
52
|
return (await response.json()) as StarterInfo | { error: string }
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export async function loadInitialData() {
|
|
54
|
-
const payloadReq = await fetch(
|
|
56
|
+
const payloadReq = await fetch(`${baseUrl}/api/initial-payload`)
|
|
55
57
|
return (await payloadReq.json()) as InitialData
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -60,7 +62,7 @@ export async function dryRunCreateApp(
|
|
|
60
62
|
chosenAddOns: Array<string>,
|
|
61
63
|
projectStarter?: StarterInfo,
|
|
62
64
|
) {
|
|
63
|
-
const outputReq = await fetch(
|
|
65
|
+
const outputReq = await fetch(`${baseUrl}/api/dry-run-create-app`, {
|
|
64
66
|
method: 'POST',
|
|
65
67
|
headers: {
|
|
66
68
|
'Content-Type': 'application/json',
|
|
@@ -77,7 +79,7 @@ export async function dryRunCreateApp(
|
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export async function dryRunAddToApp(addOns: Array<string>) {
|
|
80
|
-
const outputReq = await fetch(
|
|
82
|
+
const outputReq = await fetch(`${baseUrl}/api/dry-run-add-to-app`, {
|
|
81
83
|
method: 'POST',
|
|
82
84
|
headers: {
|
|
83
85
|
'Content-Type': 'application/json',
|
package/src/main.tsx
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
|
|
4
|
+
import './styles.css'
|
|
5
|
+
|
|
6
|
+
import RootComponent from './index'
|
|
7
|
+
|
|
8
|
+
const rootElement = document.getElementById('root')
|
|
9
|
+
if (rootElement) {
|
|
10
|
+
const root = ReactDOM.createRoot(rootElement)
|
|
11
|
+
root.render(<RootComponent />)
|
|
12
|
+
}
|
package/src/store/project.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo } from 'react'
|
|
2
2
|
import { create } from 'zustand'
|
|
3
|
+
import { persist } from 'zustand/middleware'
|
|
3
4
|
import { useQuery } from '@tanstack/react-query'
|
|
4
5
|
|
|
5
6
|
import { getAddOnStatus } from './add-ons'
|
|
@@ -38,12 +39,15 @@ const useInitialData = () =>
|
|
|
38
39
|
applicationMode: 'none',
|
|
39
40
|
forcedRouterMode: undefined,
|
|
40
41
|
forcedAddOns: [],
|
|
42
|
+
registry: undefined,
|
|
41
43
|
},
|
|
42
44
|
})
|
|
43
45
|
|
|
44
46
|
const useForcedRouterMode = () => useInitialData().data.forcedRouterMode
|
|
45
47
|
const useForcedAddOns = () => useInitialData().data.forcedAddOns
|
|
46
48
|
|
|
49
|
+
export const useRegistry = () => useInitialData().data.registry
|
|
50
|
+
|
|
47
51
|
export const useProjectLocalFiles = () => useInitialData().data.localFiles
|
|
48
52
|
export const useOriginalOutput = () => useInitialData().data.output
|
|
49
53
|
export const useOriginalSelectedAddOns = () =>
|
|
@@ -263,6 +267,41 @@ export function useDryRun() {
|
|
|
263
267
|
return dryRunOutput
|
|
264
268
|
}
|
|
265
269
|
|
|
270
|
+
type StartupDialogState = {
|
|
271
|
+
open: boolean
|
|
272
|
+
dontShowAgain: boolean
|
|
273
|
+
setOpen: (open: boolean) => void
|
|
274
|
+
setDontShowAgain: (dontShowAgain: boolean) => void
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export const useStartupDialog = create<StartupDialogState>()(
|
|
278
|
+
persist(
|
|
279
|
+
(set) => ({
|
|
280
|
+
open: false,
|
|
281
|
+
dontShowAgain: false,
|
|
282
|
+
setOpen: (open) => set({ open }),
|
|
283
|
+
setDontShowAgain: (dontShowAgain) => set({ dontShowAgain }),
|
|
284
|
+
}),
|
|
285
|
+
{
|
|
286
|
+
name: 'startup-dialog',
|
|
287
|
+
partialize: (state) => ({
|
|
288
|
+
dontShowAgain: state.dontShowAgain,
|
|
289
|
+
}),
|
|
290
|
+
merge: (persistedState: unknown, currentState) => {
|
|
291
|
+
if (
|
|
292
|
+
persistedState &&
|
|
293
|
+
(persistedState as { dontShowAgain?: boolean }).dontShowAgain
|
|
294
|
+
) {
|
|
295
|
+
currentState.open = false
|
|
296
|
+
} else {
|
|
297
|
+
currentState.open = true
|
|
298
|
+
}
|
|
299
|
+
return currentState
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
),
|
|
303
|
+
)
|
|
304
|
+
|
|
266
305
|
export const setProjectName = (projectName: string) =>
|
|
267
306
|
useProjectOptions.setState({
|
|
268
307
|
projectName,
|
package/src/types.d.ts
CHANGED
|
@@ -55,6 +55,20 @@ export type FileTreeItem = TreeDataItem & {
|
|
|
55
55
|
modifiedFile?: string
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
export type Registry = {
|
|
59
|
+
starters: Array<{
|
|
60
|
+
name: string
|
|
61
|
+
description: string
|
|
62
|
+
url: string
|
|
63
|
+
banner?: string
|
|
64
|
+
}>
|
|
65
|
+
'add-ons': Array<{
|
|
66
|
+
name: string
|
|
67
|
+
description: string
|
|
68
|
+
url: string
|
|
69
|
+
}>
|
|
70
|
+
}
|
|
71
|
+
|
|
58
72
|
export type InitialData = {
|
|
59
73
|
options: SerializedOptions
|
|
60
74
|
output: GeneratorOutput
|
|
@@ -66,6 +80,7 @@ export type InitialData = {
|
|
|
66
80
|
applicationMode: ApplicationMode
|
|
67
81
|
forcedRouterMode?: Mode
|
|
68
82
|
forcedAddOns?: Array<string>
|
|
83
|
+
registry: Registry | undefined
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
export type EventItem = {
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
4
|
+
import tailwind from '@tailwindcss/vite'
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react(), tsconfigPaths(), tailwind()],
|
|
8
|
+
server: {
|
|
9
|
+
open: true,
|
|
10
|
+
port: 3000,
|
|
11
|
+
},
|
|
12
|
+
build: {
|
|
13
|
+
outDir: 'dist',
|
|
14
|
+
sourcemap: true,
|
|
15
|
+
},
|
|
16
|
+
})
|
package/app.config.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from '@tanstack/react-start/config'
|
|
2
|
-
import viteTsConfigPaths from 'vite-tsconfig-paths'
|
|
3
|
-
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
tsr: {
|
|
7
|
-
appDirectory: 'src',
|
|
8
|
-
},
|
|
9
|
-
vite: {
|
|
10
|
-
forceOptimizeDeps: true,
|
|
11
|
-
plugins: [
|
|
12
|
-
// this is the plugin that enables path aliases
|
|
13
|
-
viteTsConfigPaths({
|
|
14
|
-
projects: ['./tsconfig.json'],
|
|
15
|
-
}),
|
|
16
|
-
tailwindcss(),
|
|
17
|
-
],
|
|
18
|
-
optimizeDeps: {
|
|
19
|
-
exclude: [],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
})
|
package/src/api.ts
DELETED
package/src/client.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Mode, SerializedOptions } from '@tanstack/cta-engine'
|
|
2
|
-
|
|
3
|
-
export function getProjectPath(): string {
|
|
4
|
-
return process.env.CTA_PROJECT_PATH!
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function getApplicationMode(): 'add' | 'setup' {
|
|
8
|
-
return process.env.CTA_MODE as 'add' | 'setup'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function getProjectOptions(): SerializedOptions {
|
|
12
|
-
return JSON.parse(process.env.CTA_OPTIONS!)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function getForcedRouterMode(): Mode | undefined {
|
|
16
|
-
if (!process.env.CTA_FORCED_ROUTER_MODE) {
|
|
17
|
-
return undefined
|
|
18
|
-
}
|
|
19
|
-
return process.env.CTA_FORCED_ROUTER_MODE as Mode
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function getForcedAddOns(): Array<string> | undefined {
|
|
23
|
-
return (process.env.CTA_FORCED_ADD_ONS?.split(',') || []).filter(
|
|
24
|
-
(addOn: string) => addOn !== '',
|
|
25
|
-
)
|
|
26
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
2
|
-
|
|
3
|
-
const queryClient = new QueryClient()
|
|
4
|
-
|
|
5
|
-
export function getContext() {
|
|
6
|
-
return {
|
|
7
|
-
queryClient,
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function Provider({ children }: { children: React.ReactNode }) {
|
|
12
|
-
return (
|
|
13
|
-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
14
|
-
)
|
|
15
|
-
}
|
package/src/logo.svg
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg id="Layer_1"
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 841.9 595.3">
|
|
4
|
-
<!-- Generator: Adobe Illustrator 29.3.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 146) -->
|
|
5
|
-
<defs>
|
|
6
|
-
<style>
|
|
7
|
-
.st0 {
|
|
8
|
-
fill: #9ae7fc;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.st1 {
|
|
12
|
-
fill: #61dafb;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
</defs>
|
|
16
|
-
<g>
|
|
17
|
-
<path class="st1" d="M666.3,296.5c0-32.5-40.7-63.3-103.1-82.4,14.4-63.6,8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6,0,8.3.9,11.4,2.6,13.6,7.8,19.5,37.5,14.9,75.7-1.1,9.4-2.9,19.3-5.1,29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50,32.6-30.3,63.2-46.9,84-46.9v-22.3c-27.5,0-63.5,19.6-99.9,53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7,0,51.4,16.5,84,46.6-14,14.7-28,31.4-41.3,49.9-22.6,2.4-44,6.1-63.6,11-2.3-10-4-19.7-5.2-29-4.7-38.2,1.1-67.9,14.6-75.8,3-1.8,6.9-2.6,11.5-2.6v-22.3c-8.4,0-16,1.8-22.6,5.6-28.1,16.2-34.4,66.7-19.9,130.1-62.2,19.2-102.7,49.9-102.7,82.3s40.7,63.3,103.1,82.4c-14.4,63.6-8,114.2,20.2,130.4,6.5,3.8,14.1,5.6,22.5,5.6,27.5,0,63.5-19.6,99.9-53.6,36.4,33.8,72.4,53.2,99.9,53.2,8.4,0,16-1.8,22.6-5.6,28.1-16.2,34.4-66.7,19.9-130.1,62-19.1,102.5-49.9,102.5-82.3zm-130.2-66.7c-3.7,12.9-8.3,26.2-13.5,39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4,14.2,2.1,27.9,4.7,41,7.9zm-45.8,106.5c-7.8,13.5-15.8,26.3-24.1,38.2-14.9,1.3-30,2-45.2,2s-30.2-.7-45-1.9c-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8,6.2-13.4,13.2-26.8,20.7-39.9,7.8-13.5,15.8-26.3,24.1-38.2,14.9-1.3,30-2,45.2-2s30.2.7,45,1.9c8.3,11.9,16.4,24.6,24.2,38,7.6,13.1,14.5,26.4,20.8,39.8-6.3,13.4-13.2,26.8-20.7,39.9zm32.3-13c5.4,13.4,10,26.8,13.8,39.8-13.1,3.2-26.9,5.9-41.2,8,4.9-7.7,9.8-15.6,14.4-23.7,4.6-8,8.9-16.1,13-24.1zm-101.4,106.7c-9.3-9.6-18.6-20.3-27.8-32,9,.4,18.2.7,27.5.7s18.7-.2,27.8-.7c-9,11.7-18.3,22.4-27.5,32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9,3.7-12.9,8.3-26.2,13.5-39.5,4.1,8,8.4,16,13.1,24s9.5,15.8,14.4,23.4zm73.9-208.1c9.3,9.6,18.6,20.3,27.8,32-9-.4-18.2-.7-27.5-.7s-18.7.2-27.8.7c9-11.7,18.3-22.4,27.5-32zm-74,58.9c-4.9,7.7-9.8,15.6-14.4,23.7-4.6,8-8.9,16-13,24-5.4-13.4-10-26.8-13.8-39.8,13.1-3.1,26.9-5.8,41.2-7.9zm-90.5,125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6,58.3-50.6c8.6-3.7,18-7,27.7-10.1,5.7,19.6,13.2,40,22.5,60.9-9.2,20.8-16.6,41.1-22.2,60.6-9.9-3.1-19.3-6.5-28-10.2zm53.8,142.9c-13.6-7.8-19.5-37.5-14.9-75.7,1.1-9.4,2.9-19.3,5.1-29.4,19.6,4.8,41,8.5,63.5,10.9,13.5,18.5,27.5,35.3,41.6,50-32.6,30.3-63.2,46.9-84,46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7,38.2-1.1,67.9-14.6,75.8-3,1.8-6.9,2.6-11.5,2.6-20.7,0-51.4-16.5-84-46.6,14-14.7,28-31.4,41.3-49.9,22.6-2.4,44-6.1,63.6-11,2.3,10.1,4.1,19.8,5.2,29.1zm38.5-66.7c-8.6,3.7-18,7-27.7,10.1-5.7-19.6-13.2-40-22.5-60.9,9.2-20.8,16.6-41.1,22.2-60.6,9.9,3.1,19.3,6.5,28.1,10.2,35.4,15.1,58.3,34.9,58.3,50.6,0,15.7-23,35.6-58.4,50.6zm-264.9-268.7z"/>
|
|
18
|
-
<circle class="st1" cx="420.9" cy="296.5" r="45.7"/>
|
|
19
|
-
<path class="st1" d="M520.5,78.1"/>
|
|
20
|
-
</g>
|
|
21
|
-
<circle class="st0" cx="420.8" cy="296.6" r="43"/>
|
|
22
|
-
<path class="st1" d="M466.1,296.6c0,25-20.2,45.2-45.2,45.2s-45.2-20.2-45.2-45.2,20.2-45.2,45.2-45.2,45.2,20.2,45.2,45.2ZM386,295.6v-6.3c0-1.1,1.2-5.1,1.8-6.2,1-1.9,2.9-3.5,4.6-4.7l-3.4-3.4c4-3.6,9.4-3.7,13.7-.7,1.9-4.7,6.6-7.1,11.6-6.7l-.8,4.2c5.9.2,13.1,4.1,13.1,10.8s0,.5-.7.7c-1.7.3-3.4-.4-5-.6s-1.2-.4-1.2.3,2.5,4.1,3,5.5,1,3.5.8,5.3c-5.6-.8-10.5-3.2-14.8-6.7.3,2.6,4.1,21.7,5.3,21.9s.8-.6,1-1.1,1.3-6.3,1.3-6.7c0-1-1.7-1.8-2.2-2.8-1.2-2.7,1.3-4.7,3.7-3.3s5.2,6.2,7.5,7.3,13,1.4,14.8,3.3-2.9,4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.5-3.7,1.5-7.8,3.6-11,1,4.8-1.5,11.6-4.5,15.4s-.4.8-1.2.7c-1.1-4.5-1.3-10.8,1.5-14.8s1.9-2.2,2.3-1.7h0Z"/>
|
|
27
|
-
<path class="st0" d="M411.3,276.8c0-.8,2.1-.4,2.6-.3,2.4.4,4,1.7,6.2,2-1.2-3.1-5.7-3.2-8.4-3.8,0-.8.9-.4,1.4-.4,2.8,0,5.6.7,7.8,2.4,2.2,1.7,4,4,1.2,3.9-4.3,0-7.1-2.4-10.9-3.7h0Z"/>
|
|
28
|
-
<path class="st0" d="M395.3,279.8c-1.1,1.6-3,3-4,4.6s-1.9,2.8-.4,2.5,2.8-4,4.2-4.6-.9,3.6-1.1,4c-.4.7-4.7,5.2-5.4,4.5-.2-4.6,1.8-9.9,6.7-11h0Z"/>
|
|
29
|
-
<path class="st0" d="M437,309.7l-1,2.5c-3.6-2.3-8-2.8-12.1-4,.5-.7,1.1-.7,1.9-.7,3.4,0,7.8,1.8,11.2,2.1h0Z"/>
|
|
30
|
-
<path class="st0" d="M417.2,308.5c0-1,0-5.8,1.4-5.5,4,3.5,6.1,6.2-1.4,5.5Z"/>
|
|
31
|
-
<path class="st0" d="M400.4,276.4c-1.8-.3-3.5.7-5.2.4s-2.3-.8-1.9-1.4c.8-1.6,6.9-1.4,7.2,1h-.1Z"/>
|
|
32
|
-
<path class="st0" d="M410.9,270.1c.4,3-3.6,3.3-5.5,4.6-.6-1.8,5-5.1,5.5-4.6Z"/>
|
|
33
|
-
<path class="st0" d="M426.9,305.9c-2.5-.2-4.1-1.3-5.5-3.4,1.7-.4,2,.8,3,1.4s2.6.3,2.5,1.9h0Z"/>
|
|
34
|
-
<path class="st1" d="M432.4,270.9l.2-1.7c1.1,0,5.1-2.2,5.7-.6s-5.5,2.9-5.8,2.3h-.1Z"/>
|
|
35
|
-
<path class="st1" d="M431.6,265l.2-1.3c8.4-2.1,7.7,3.4-.2,1.3Z"/>
|
|
36
|
-
<path class="st1" d="M434.5,276c-1.1-1.5,5.1-4.6,5.5-2.7s-4.6,4-5.5,2.7Z"/>
|
|
37
|
-
<path class="st1" d="M442.9,276.4c1.1,1.1-4,6.4-4.6,4s3.7-4.9,4.6-4Z"/>
|
|
38
|
-
<path class="st1" d="M445.1,279.9c.7-.4,2.1,0,2,.9s-2.4,4.4-3.5,4,1.3-4.8,1.5-5h0Z"/>
|
|
39
|
-
<path class="st1" d="M448.9,287.4c-.3-.3.4-6.1,2.3-5.5,1.4.4-.2,6.2-2.3,5.5Z"/>
|
|
40
|
-
<path class="st1" d="M457.3,288.6l-1.3-.2-.3-.5c0-.9-.4-4.6.6-4.8,2.1.8,1.5,3.8,1,5.5h0Z"/>
|
|
41
|
-
<path class="st0" d="M420.5,312.8c8.9,0,17.9,4.7,23.4,11.3,5.6,6.6,3.8,3.5,0,6.2-10.7,7.7-26.1,9-38.2,4.2-1.9-.8-10.5-5.1-10.5-6.8s4-5.3,4.8-6.2c5.3-5,13.1-8.6,20.4-8.8h.1Z"/>
|
|
42
|
-
<path class="st0" d="M398.7,316.9l-13.9-1.4c1.7-1,5-.8,6.9-.6s5.6.7,7,2.1h0Z"/>
|
|
43
|
-
<path class="st0" d="M456.9,314.8c.7.5,0,.8-.6.8-1.6.2-3.5-.2-5.1,0-2.4.3-5.2,1.2-7.6,1.3s-1.1,0,0-.5,5.1-1.6,6-1.6h7.4,0Z"/>
|
|
44
|
-
</svg>
|
package/src/routeTree.gen.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// noinspection JSUnusedGlobalSymbols
|
|
6
|
-
|
|
7
|
-
// This file was automatically generated by TanStack Router.
|
|
8
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
9
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
10
|
-
|
|
11
|
-
// Import Routes
|
|
12
|
-
|
|
13
|
-
import { Route as rootRoute } from './routes/__root'
|
|
14
|
-
import { Route as IndexImport } from './routes/index'
|
|
15
|
-
|
|
16
|
-
// Create/Update Routes
|
|
17
|
-
|
|
18
|
-
const IndexRoute = IndexImport.update({
|
|
19
|
-
id: '/',
|
|
20
|
-
path: '/',
|
|
21
|
-
getParentRoute: () => rootRoute,
|
|
22
|
-
} as any)
|
|
23
|
-
|
|
24
|
-
// Populate the FileRoutesByPath interface
|
|
25
|
-
|
|
26
|
-
declare module '@tanstack/react-router' {
|
|
27
|
-
interface FileRoutesByPath {
|
|
28
|
-
'/': {
|
|
29
|
-
id: '/'
|
|
30
|
-
path: '/'
|
|
31
|
-
fullPath: '/'
|
|
32
|
-
preLoaderRoute: typeof IndexImport
|
|
33
|
-
parentRoute: typeof rootRoute
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Create and export the route tree
|
|
39
|
-
|
|
40
|
-
export interface FileRoutesByFullPath {
|
|
41
|
-
'/': typeof IndexRoute
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface FileRoutesByTo {
|
|
45
|
-
'/': typeof IndexRoute
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface FileRoutesById {
|
|
49
|
-
__root__: typeof rootRoute
|
|
50
|
-
'/': typeof IndexRoute
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface FileRouteTypes {
|
|
54
|
-
fileRoutesByFullPath: FileRoutesByFullPath
|
|
55
|
-
fullPaths: '/'
|
|
56
|
-
fileRoutesByTo: FileRoutesByTo
|
|
57
|
-
to: '/'
|
|
58
|
-
id: '__root__' | '/'
|
|
59
|
-
fileRoutesById: FileRoutesById
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface RootRouteChildren {
|
|
63
|
-
IndexRoute: typeof IndexRoute
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const rootRouteChildren: RootRouteChildren = {
|
|
67
|
-
IndexRoute: IndexRoute,
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const routeTree = rootRoute
|
|
71
|
-
._addFileChildren(rootRouteChildren)
|
|
72
|
-
._addFileTypes<FileRouteTypes>()
|
|
73
|
-
|
|
74
|
-
/* ROUTE_MANIFEST_START
|
|
75
|
-
{
|
|
76
|
-
"routes": {
|
|
77
|
-
"__root__": {
|
|
78
|
-
"filePath": "__root.tsx",
|
|
79
|
-
"children": [
|
|
80
|
-
"/"
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
"/": {
|
|
84
|
-
"filePath": "index.tsx"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
ROUTE_MANIFEST_END */
|
package/src/router.tsx
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRouter as createTanstackRouter } from '@tanstack/react-router'
|
|
2
|
-
import { routerWithQueryClient } from '@tanstack/react-router-with-query'
|
|
3
|
-
import * as TanstackQuery from './integrations/tanstack-query/root-provider'
|
|
4
|
-
|
|
5
|
-
// Import the generated route tree
|
|
6
|
-
import { routeTree } from './routeTree.gen'
|
|
7
|
-
|
|
8
|
-
import './styles.css'
|
|
9
|
-
|
|
10
|
-
// Create a new router instance
|
|
11
|
-
export const createRouter = () => {
|
|
12
|
-
const router = routerWithQueryClient(
|
|
13
|
-
createTanstackRouter({
|
|
14
|
-
routeTree,
|
|
15
|
-
context: {
|
|
16
|
-
...TanstackQuery.getContext(),
|
|
17
|
-
},
|
|
18
|
-
scrollRestoration: true,
|
|
19
|
-
defaultPreloadStaleTime: 0,
|
|
20
|
-
}),
|
|
21
|
-
TanstackQuery.getContext().queryClient,
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
return router
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Register the router instance for type safety
|
|
28
|
-
declare module '@tanstack/react-router' {
|
|
29
|
-
interface Register {
|
|
30
|
-
router: ReturnType<typeof createRouter>
|
|
31
|
-
}
|
|
32
|
-
}
|
package/src/routes/__root.tsx
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HeadContent,
|
|
3
|
-
Outlet,
|
|
4
|
-
Scripts,
|
|
5
|
-
createRootRouteWithContext,
|
|
6
|
-
} from '@tanstack/react-router'
|
|
7
|
-
|
|
8
|
-
import appCss from '../styles.css?url'
|
|
9
|
-
|
|
10
|
-
import type { QueryClient } from '@tanstack/react-query'
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
SidebarProvider,
|
|
14
|
-
SidebarTrigger,
|
|
15
|
-
useSidebar,
|
|
16
|
-
} from '@/components/ui/sidebar'
|
|
17
|
-
import { Toaster } from '@/components/toaster'
|
|
18
|
-
|
|
19
|
-
import { AppSidebar } from '@/components/cta-sidebar'
|
|
20
|
-
|
|
21
|
-
interface MyRouterContext {
|
|
22
|
-
queryClient: QueryClient
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function Content() {
|
|
26
|
-
const { open } = useSidebar()
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<main
|
|
30
|
-
className={
|
|
31
|
-
open ? 'w-full max-w-[calc(100%-370px)]' : 'w-full max-w-[100%]'
|
|
32
|
-
}
|
|
33
|
-
>
|
|
34
|
-
<SidebarTrigger className="m-2" />
|
|
35
|
-
<Outlet />
|
|
36
|
-
</main>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
export const Route = createRootRouteWithContext<MyRouterContext>()({
|
|
40
|
-
head: () => ({
|
|
41
|
-
meta: [
|
|
42
|
-
{
|
|
43
|
-
charSet: 'utf-8',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'viewport',
|
|
47
|
-
content: 'width=device-width, initial-scale=1',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
title: 'TanStack CTA',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
links: [
|
|
54
|
-
{
|
|
55
|
-
rel: 'stylesheet',
|
|
56
|
-
href: appCss,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
}),
|
|
60
|
-
|
|
61
|
-
component: () => {
|
|
62
|
-
return (
|
|
63
|
-
<RootDocument>
|
|
64
|
-
<SidebarProvider>
|
|
65
|
-
<AppSidebar />
|
|
66
|
-
<Content />
|
|
67
|
-
<Toaster />
|
|
68
|
-
</SidebarProvider>
|
|
69
|
-
</RootDocument>
|
|
70
|
-
)
|
|
71
|
-
},
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
function RootDocument({ children }: { children: React.ReactNode }) {
|
|
75
|
-
return (
|
|
76
|
-
<html lang="en">
|
|
77
|
-
<head>
|
|
78
|
-
<HeadContent />
|
|
79
|
-
</head>
|
|
80
|
-
<body className="dark">
|
|
81
|
-
{children}
|
|
82
|
-
<Scripts />
|
|
83
|
-
</body>
|
|
84
|
-
</html>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
2
|
-
|
|
3
|
-
import { addToAppWrapper } from '@/engine-handling/add-to-app-wrapper'
|
|
4
|
-
|
|
5
|
-
export const APIRoute = createAPIFileRoute('/api/add-to-app')({
|
|
6
|
-
POST: async ({ request }) => {
|
|
7
|
-
const { addOns } = await request.json()
|
|
8
|
-
|
|
9
|
-
const stream = await addToAppWrapper(addOns, {
|
|
10
|
-
stream: true,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
return new Response(stream as ReadableStream, {
|
|
14
|
-
headers: {
|
|
15
|
-
'Content-Type': 'text/event-stream',
|
|
16
|
-
'Cache-Control': 'no-cache',
|
|
17
|
-
Connection: 'keep-alive',
|
|
18
|
-
},
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
})
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
2
|
-
|
|
3
|
-
import { createAppWrapper } from '@/engine-handling/create-app-wrapper'
|
|
4
|
-
|
|
5
|
-
export const APIRoute = createAPIFileRoute('/api/create-app')({
|
|
6
|
-
POST: async ({ request }) => {
|
|
7
|
-
const { options: serializedOptions } = await request.json()
|
|
8
|
-
|
|
9
|
-
const stream = await createAppWrapper(serializedOptions, {
|
|
10
|
-
stream: true,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
return new Response(stream as ReadableStream, {
|
|
14
|
-
headers: {
|
|
15
|
-
'Content-Type': 'text/event-stream',
|
|
16
|
-
'Cache-Control': 'no-cache',
|
|
17
|
-
Connection: 'keep-alive',
|
|
18
|
-
},
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
import { addToAppWrapper } from '@/engine-handling/add-to-app-wrapper'
|
|
5
|
-
|
|
6
|
-
export const APIRoute = createAPIFileRoute('/api/dry-run-add-to-app')({
|
|
7
|
-
POST: async ({ request }) => {
|
|
8
|
-
const { addOns } = await request.json()
|
|
9
|
-
|
|
10
|
-
return json(
|
|
11
|
-
await addToAppWrapper(addOns, {
|
|
12
|
-
dryRun: true,
|
|
13
|
-
}),
|
|
14
|
-
)
|
|
15
|
-
},
|
|
16
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
import { createAppWrapper } from '@/engine-handling/create-app-wrapper'
|
|
5
|
-
|
|
6
|
-
export const APIRoute = createAPIFileRoute('/api/dry-run-create-app')({
|
|
7
|
-
POST: async ({ request }) => {
|
|
8
|
-
const { options: serializedOptions } = await request.json()
|
|
9
|
-
|
|
10
|
-
return json(
|
|
11
|
-
await createAppWrapper(serializedOptions, {
|
|
12
|
-
dryRun: true,
|
|
13
|
-
}),
|
|
14
|
-
)
|
|
15
|
-
},
|
|
16
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { json } from '@tanstack/react-start'
|
|
2
|
-
import { createAPIFileRoute } from '@tanstack/react-start/api'
|
|
3
|
-
|
|
4
|
-
import { generateInitialPayload } from '@/engine-handling/generate-initial-payload'
|
|
5
|
-
|
|
6
|
-
export const APIRoute = createAPIFileRoute('/api/initial-payload')({
|
|
7
|
-
GET: async () => {
|
|
8
|
-
return json(await generateInitialPayload())
|
|
9
|
-
},
|
|
10
|
-
})
|