create-rudder-app 0.3.1 → 0.5.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/dist/index.js +98 -20
- package/dist/index.js.map +1 -1
- package/dist/templates/app/auth-controller.d.ts +2 -0
- package/dist/templates/app/auth-controller.d.ts.map +1 -0
- package/dist/templates/app/auth-controller.js +51 -0
- package/dist/templates/app/auth-controller.js.map +1 -0
- package/dist/templates/app/mcp-echo-server.d.ts +2 -0
- package/dist/templates/app/mcp-echo-server.d.ts.map +1 -0
- package/dist/templates/app/mcp-echo-server.js +13 -0
- package/dist/templates/app/mcp-echo-server.js.map +1 -0
- package/dist/templates/app/mcp-echo-tool.d.ts +2 -0
- package/dist/templates/app/mcp-echo-tool.d.ts.map +1 -0
- package/dist/templates/app/mcp-echo-tool.js +20 -0
- package/dist/templates/app/mcp-echo-tool.js.map +1 -0
- package/dist/templates/app/service-provider.d.ts +3 -0
- package/dist/templates/app/service-provider.d.ts.map +1 -0
- package/dist/templates/app/service-provider.js +48 -0
- package/dist/templates/app/service-provider.js.map +1 -0
- package/dist/templates/app/user-model.d.ts +2 -0
- package/dist/templates/app/user-model.d.ts.map +1 -0
- package/dist/templates/app/user-model.js +19 -0
- package/dist/templates/app/user-model.js.map +1 -0
- package/dist/templates/bootstrap/app.d.ts +3 -0
- package/dist/templates/bootstrap/app.d.ts.map +1 -0
- package/dist/templates/bootstrap/app.js +41 -0
- package/dist/templates/bootstrap/app.js.map +1 -0
- package/dist/templates/bootstrap/providers.d.ts +3 -0
- package/dist/templates/bootstrap/providers.d.ts.map +1 -0
- package/dist/templates/bootstrap/providers.js +27 -0
- package/dist/templates/bootstrap/providers.js.map +1 -0
- package/dist/templates/configs/ai.d.ts +2 -0
- package/dist/templates/configs/ai.d.ts.map +1 -0
- package/dist/templates/configs/ai.js +32 -0
- package/dist/templates/configs/ai.js.map +1 -0
- package/dist/templates/configs/app.d.ts +2 -0
- package/dist/templates/configs/app.d.ts.map +1 -0
- package/dist/templates/configs/app.js +12 -0
- package/dist/templates/configs/app.js.map +1 -0
- package/dist/templates/configs/auth.d.ts +3 -0
- package/dist/templates/configs/auth.d.ts.map +1 -0
- package/dist/templates/configs/auth.js +16 -0
- package/dist/templates/configs/auth.js.map +1 -0
- package/dist/templates/configs/cache.d.ts +2 -0
- package/dist/templates/configs/cache.d.ts.map +1 -0
- package/dist/templates/configs/cache.js +28 -0
- package/dist/templates/configs/cache.js.map +1 -0
- package/dist/templates/configs/crypt.d.ts +2 -0
- package/dist/templates/configs/crypt.d.ts.map +1 -0
- package/dist/templates/configs/crypt.js +16 -0
- package/dist/templates/configs/crypt.js.map +1 -0
- package/dist/templates/configs/database.d.ts +3 -0
- package/dist/templates/configs/database.d.ts.map +1 -0
- package/dist/templates/configs/database.js +28 -0
- package/dist/templates/configs/database.js.map +1 -0
- package/dist/templates/configs/hash.d.ts +2 -0
- package/dist/templates/configs/hash.d.ts.map +1 -0
- package/dist/templates/configs/hash.js +12 -0
- package/dist/templates/configs/hash.js.map +1 -0
- package/dist/templates/configs/horizon.d.ts +2 -0
- package/dist/templates/configs/horizon.d.ts.map +1 -0
- package/dist/templates/configs/horizon.js +30 -0
- package/dist/templates/configs/horizon.js.map +1 -0
- package/dist/templates/configs/index.d.ts +3 -0
- package/dist/templates/configs/index.d.ts.map +1 -0
- package/dist/templates/configs/index.js +92 -0
- package/dist/templates/configs/index.js.map +1 -0
- package/dist/templates/configs/localization.d.ts +2 -0
- package/dist/templates/configs/localization.d.ts.map +1 -0
- package/dist/templates/configs/localization.js +13 -0
- package/dist/templates/configs/localization.js.map +1 -0
- package/dist/templates/configs/log.d.ts +2 -0
- package/dist/templates/configs/log.d.ts.map +1 -0
- package/dist/templates/configs/log.js +40 -0
- package/dist/templates/configs/log.js.map +1 -0
- package/dist/templates/configs/mail.d.ts +2 -0
- package/dist/templates/configs/mail.d.ts.map +1 -0
- package/dist/templates/configs/mail.js +33 -0
- package/dist/templates/configs/mail.js.map +1 -0
- package/dist/templates/configs/passport.d.ts +2 -0
- package/dist/templates/configs/passport.d.ts.map +1 -0
- package/dist/templates/configs/passport.js +22 -0
- package/dist/templates/configs/passport.js.map +1 -0
- package/dist/templates/configs/pennant.d.ts +2 -0
- package/dist/templates/configs/pennant.d.ts.map +1 -0
- package/dist/templates/configs/pennant.js +16 -0
- package/dist/templates/configs/pennant.js.map +1 -0
- package/dist/templates/configs/pulse.d.ts +2 -0
- package/dist/templates/configs/pulse.d.ts.map +1 -0
- package/dist/templates/configs/pulse.js +21 -0
- package/dist/templates/configs/pulse.js.map +1 -0
- package/dist/templates/configs/queue.d.ts +2 -0
- package/dist/templates/configs/queue.d.ts.map +1 -0
- package/dist/templates/configs/queue.js +28 -0
- package/dist/templates/configs/queue.js.map +1 -0
- package/dist/templates/configs/sanctum.d.ts +2 -0
- package/dist/templates/configs/sanctum.d.ts.map +1 -0
- package/dist/templates/configs/sanctum.js +19 -0
- package/dist/templates/configs/sanctum.js.map +1 -0
- package/dist/templates/configs/server.d.ts +2 -0
- package/dist/templates/configs/server.d.ts.map +1 -0
- package/dist/templates/configs/server.js +15 -0
- package/dist/templates/configs/server.js.map +1 -0
- package/dist/templates/configs/session.d.ts +2 -0
- package/dist/templates/configs/session.d.ts.map +1 -0
- package/dist/templates/configs/session.js +26 -0
- package/dist/templates/configs/session.js.map +1 -0
- package/dist/templates/configs/socialite.d.ts +2 -0
- package/dist/templates/configs/socialite.d.ts.map +1 -0
- package/dist/templates/configs/socialite.js +27 -0
- package/dist/templates/configs/socialite.js.map +1 -0
- package/dist/templates/configs/storage.d.ts +2 -0
- package/dist/templates/configs/storage.d.ts.map +1 -0
- package/dist/templates/configs/storage.js +35 -0
- package/dist/templates/configs/storage.js.map +1 -0
- package/dist/templates/configs/sync.d.ts +3 -0
- package/dist/templates/configs/sync.d.ts.map +1 -0
- package/dist/templates/configs/sync.js +17 -0
- package/dist/templates/configs/sync.js.map +1 -0
- package/dist/templates/configs/telescope.d.ts +2 -0
- package/dist/templates/configs/telescope.d.ts.map +1 -0
- package/dist/templates/configs/telescope.js +25 -0
- package/dist/templates/configs/telescope.js.map +1 -0
- package/dist/templates/css/index.d.ts +3 -0
- package/dist/templates/css/index.d.ts.map +1 -0
- package/dist/templates/css/index.js +140 -0
- package/dist/templates/css/index.js.map +1 -0
- package/dist/templates/css/plain.d.ts +2 -0
- package/dist/templates/css/plain.d.ts.map +1 -0
- package/dist/templates/css/plain.js +373 -0
- package/dist/templates/css/plain.js.map +1 -0
- package/dist/templates/css/tailwind.d.ts +2 -0
- package/dist/templates/css/tailwind.d.ts.map +1 -0
- package/dist/templates/css/tailwind.js +176 -0
- package/dist/templates/css/tailwind.js.map +1 -0
- package/dist/templates/demos/avatar.d.ts +3 -0
- package/dist/templates/demos/avatar.d.ts.map +1 -0
- package/dist/templates/demos/avatar.js +182 -0
- package/dist/templates/demos/avatar.js.map +1 -0
- package/dist/templates/demos/cache.d.ts +3 -0
- package/dist/templates/demos/cache.d.ts.map +1 -0
- package/dist/templates/demos/cache.js +99 -0
- package/dist/templates/demos/cache.js.map +1 -0
- package/dist/templates/demos/contact.d.ts +3 -0
- package/dist/templates/demos/contact.d.ts.map +1 -0
- package/dist/templates/demos/contact.js +106 -0
- package/dist/templates/demos/contact.js.map +1 -0
- package/dist/templates/demos/fibonacci.d.ts +7 -0
- package/dist/templates/demos/fibonacci.d.ts.map +1 -0
- package/dist/templates/demos/fibonacci.js +172 -0
- package/dist/templates/demos/fibonacci.js.map +1 -0
- package/dist/templates/demos/http.d.ts +3 -0
- package/dist/templates/demos/http.d.ts.map +1 -0
- package/dist/templates/demos/http.js +117 -0
- package/dist/templates/demos/http.js.map +1 -0
- package/dist/templates/demos/index-view.d.ts +3 -0
- package/dist/templates/demos/index-view.d.ts.map +1 -0
- package/dist/templates/demos/index-view.js +144 -0
- package/dist/templates/demos/index-view.js.map +1 -0
- package/dist/templates/demos/localization.d.ts +4 -0
- package/dist/templates/demos/localization.d.ts.map +1 -0
- package/dist/templates/demos/localization.js +130 -0
- package/dist/templates/demos/localization.js.map +1 -0
- package/dist/templates/demos/mail.d.ts +4 -0
- package/dist/templates/demos/mail.d.ts.map +1 -0
- package/dist/templates/demos/mail.js +127 -0
- package/dist/templates/demos/mail.js.map +1 -0
- package/dist/templates/demos/notifications.d.ts +4 -0
- package/dist/templates/demos/notifications.d.ts.map +1 -0
- package/dist/templates/demos/notifications.js +133 -0
- package/dist/templates/demos/notifications.js.map +1 -0
- package/dist/templates/demos/pennant.d.ts +8 -0
- package/dist/templates/demos/pennant.d.ts.map +1 -0
- package/dist/templates/demos/pennant.js +138 -0
- package/dist/templates/demos/pennant.js.map +1 -0
- package/dist/templates/demos/queue.d.ts +4 -0
- package/dist/templates/demos/queue.d.ts.map +1 -0
- package/dist/templates/demos/queue.js +107 -0
- package/dist/templates/demos/queue.js.map +1 -0
- package/dist/templates/demos/registry.d.ts +13 -0
- package/dist/templates/demos/registry.d.ts.map +1 -0
- package/dist/templates/demos/registry.js +26 -0
- package/dist/templates/demos/registry.js.map +1 -0
- package/dist/templates/demos/rudder-socket.d.ts +2 -0
- package/dist/templates/demos/rudder-socket.d.ts.map +1 -0
- package/dist/templates/demos/rudder-socket.js +95 -0
- package/dist/templates/demos/rudder-socket.js.map +1 -0
- package/dist/templates/demos/sync.d.ts +2 -0
- package/dist/templates/demos/sync.d.ts.map +1 -0
- package/dist/templates/demos/sync.js +97 -0
- package/dist/templates/demos/sync.js.map +1 -0
- package/dist/templates/demos/system-info.d.ts +3 -0
- package/dist/templates/demos/system-info.d.ts.map +1 -0
- package/dist/templates/demos/system-info.js +142 -0
- package/dist/templates/demos/system-info.js.map +1 -0
- package/dist/templates/demos/todos.d.ts +6 -0
- package/dist/templates/demos/todos.d.ts.map +1 -0
- package/dist/templates/demos/todos.js +246 -0
- package/dist/templates/demos/todos.js.map +1 -0
- package/dist/templates/demos/ws.d.ts +2 -0
- package/dist/templates/demos/ws.d.ts.map +1 -0
- package/dist/templates/demos/ws.js +106 -0
- package/dist/templates/demos/ws.js.map +1 -0
- package/dist/templates/env.d.ts +7 -0
- package/dist/templates/env.d.ts.map +1 -0
- package/dist/templates/env.js +113 -0
- package/dist/templates/env.js.map +1 -0
- package/dist/templates/package-json.d.ts +3 -0
- package/dist/templates/package-json.d.ts.map +1 -0
- package/dist/templates/package-json.js +193 -0
- package/dist/templates/package-json.js.map +1 -0
- package/dist/templates/package-managers.d.ts +14 -0
- package/dist/templates/package-managers.d.ts.map +1 -0
- package/dist/templates/package-managers.js +49 -0
- package/dist/templates/package-managers.js.map +1 -0
- package/dist/templates/pages/ai-chat.d.ts +7 -0
- package/dist/templates/pages/ai-chat.d.ts.map +1 -0
- package/dist/templates/pages/ai-chat.js +285 -0
- package/dist/templates/pages/ai-chat.js.map +1 -0
- package/dist/templates/pages/demo.d.ts +4 -0
- package/dist/templates/pages/demo.d.ts.map +1 -0
- package/dist/templates/pages/demo.js +71 -0
- package/dist/templates/pages/demo.js.map +1 -0
- package/dist/templates/pages/error.d.ts +7 -0
- package/dist/templates/pages/error.d.ts.map +1 -0
- package/dist/templates/pages/error.js +148 -0
- package/dist/templates/pages/error.js.map +1 -0
- package/dist/templates/pages/index.d.ts +9 -0
- package/dist/templates/pages/index.d.ts.map +1 -0
- package/dist/templates/pages/index.js +311 -0
- package/dist/templates/pages/index.js.map +1 -0
- package/dist/templates/prisma/auth.d.ts +2 -0
- package/dist/templates/prisma/auth.d.ts.map +1 -0
- package/dist/templates/prisma/auth.js +22 -0
- package/dist/templates/prisma/auth.js.map +1 -0
- package/dist/templates/prisma/base.d.ts +3 -0
- package/dist/templates/prisma/base.d.ts.map +1 -0
- package/dist/templates/prisma/base.js +14 -0
- package/dist/templates/prisma/base.js.map +1 -0
- package/dist/templates/prisma/config.d.ts +3 -0
- package/dist/templates/prisma/config.d.ts.map +1 -0
- package/dist/templates/prisma/config.js +15 -0
- package/dist/templates/prisma/config.js.map +1 -0
- package/dist/templates/prisma/notification.d.ts +2 -0
- package/dist/templates/prisma/notification.d.ts.map +1 -0
- package/dist/templates/prisma/notification.js +16 -0
- package/dist/templates/prisma/notification.js.map +1 -0
- package/dist/templates/prisma/passport.d.ts +2 -0
- package/dist/templates/prisma/passport.d.ts.map +1 -0
- package/dist/templates/prisma/passport.js +69 -0
- package/dist/templates/prisma/passport.js.map +1 -0
- package/dist/templates/routes/api.d.ts +3 -0
- package/dist/templates/routes/api.d.ts.map +1 -0
- package/dist/templates/routes/api.js +166 -0
- package/dist/templates/routes/api.js.map +1 -0
- package/dist/templates/routes/console.d.ts +2 -0
- package/dist/templates/routes/console.d.ts.map +1 -0
- package/dist/templates/routes/console.js +22 -0
- package/dist/templates/routes/console.js.map +1 -0
- package/dist/templates/routes/web.d.ts +4 -0
- package/dist/templates/routes/web.d.ts.map +1 -0
- package/dist/templates/routes/web.js +155 -0
- package/dist/templates/routes/web.js.map +1 -0
- package/dist/templates/server.d.ts +2 -0
- package/dist/templates/server.d.ts.map +1 -0
- package/dist/templates/server.js +10 -0
- package/dist/templates/server.js.map +1 -0
- package/dist/templates/tsconfig.d.ts +3 -0
- package/dist/templates/tsconfig.d.ts.map +1 -0
- package/dist/templates/tsconfig.js +33 -0
- package/dist/templates/tsconfig.js.map +1 -0
- package/dist/templates/views/welcome.d.ts +6 -0
- package/dist/templates/views/welcome.d.ts.map +1 -0
- package/dist/templates/views/welcome.js +396 -0
- package/dist/templates/views/welcome.js.map +1 -0
- package/dist/templates/vite.d.ts +3 -0
- package/dist/templates/vite.d.ts.map +1 -0
- package/dist/templates/vite.js +61 -0
- package/dist/templates/vite.js.map +1 -0
- package/dist/templates.d.ts +27 -17
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +158 -3778
- package/dist/templates.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
export function aiChatPageConfig(ctx) {
|
|
2
|
+
switch (ctx.primary) {
|
|
3
|
+
case 'vue':
|
|
4
|
+
return `import type { Config } from 'vike/types'
|
|
5
|
+
import vikeVue from 'vike-vue/config'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
extends: vikeVue,
|
|
9
|
+
} satisfies Config
|
|
10
|
+
`;
|
|
11
|
+
case 'solid':
|
|
12
|
+
return `import type { Config } from 'vike/types'
|
|
13
|
+
import vikeSolid from 'vike-solid/config'
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
extends: vikeSolid,
|
|
17
|
+
} satisfies Config
|
|
18
|
+
`;
|
|
19
|
+
default:
|
|
20
|
+
return `import type { Config } from 'vike/types'
|
|
21
|
+
import vikeReact from 'vike-react/config'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
extends: vikeReact,
|
|
25
|
+
} satisfies Config
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function aiChatPage(ctx) {
|
|
30
|
+
switch (ctx.primary) {
|
|
31
|
+
case 'vue': return aiChatPageVue(ctx);
|
|
32
|
+
case 'solid': return aiChatPageSolid(ctx);
|
|
33
|
+
default: return aiChatPageReact(ctx);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function aiChatPageReact(ctx) {
|
|
37
|
+
const cssImport = `import '@/index.css'\n`;
|
|
38
|
+
return `${cssImport}import { useState, useRef, useEffect } from 'react'
|
|
39
|
+
|
|
40
|
+
interface Message {
|
|
41
|
+
role: 'user' | 'assistant'
|
|
42
|
+
content: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default function Page() {
|
|
46
|
+
const [messages, setMessages] = useState<Message[]>([])
|
|
47
|
+
const [input, setInput] = useState('')
|
|
48
|
+
const [loading, setLoading] = useState(false)
|
|
49
|
+
const scrollRef = useRef<HTMLDivElement>(null)
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
scrollRef.current?.scrollTo(0, scrollRef.current.scrollHeight)
|
|
53
|
+
}, [messages])
|
|
54
|
+
|
|
55
|
+
async function send(e: React.FormEvent) {
|
|
56
|
+
e.preventDefault()
|
|
57
|
+
if (!input.trim() || loading) return
|
|
58
|
+
|
|
59
|
+
const userMsg: Message = { role: 'user', content: input }
|
|
60
|
+
setMessages(prev => [...prev, userMsg])
|
|
61
|
+
setInput('')
|
|
62
|
+
setLoading(true)
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const res = await fetch('/api/ai/chat', {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: { 'Content-Type': 'application/json' },
|
|
68
|
+
body: JSON.stringify({ messages: [...messages, userMsg] }),
|
|
69
|
+
})
|
|
70
|
+
const json = await res.json() as { message: string }
|
|
71
|
+
setMessages(prev => [...prev, { role: 'assistant', content: json.message }])
|
|
72
|
+
} catch {
|
|
73
|
+
setMessages(prev => [...prev, { role: 'assistant', content: 'Something went wrong. Check your AI_PROVIDER and API key in .env.' }])
|
|
74
|
+
} finally {
|
|
75
|
+
setLoading(false)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<div className="chat-wrap">
|
|
81
|
+
<div className="chat-column">
|
|
82
|
+
<div className="chat-header">
|
|
83
|
+
<h1 className="heading-lg">AI Chat</h1>
|
|
84
|
+
<a href="/" className="auth-link muted">← Home</a>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div ref={scrollRef} className="chat-log">
|
|
88
|
+
{messages.length === 0 && (
|
|
89
|
+
<p className="empty-state">Send a message to start chatting.</p>
|
|
90
|
+
)}
|
|
91
|
+
{messages.map((msg, i) => (
|
|
92
|
+
<div key={i} className={\`chat-row \${msg.role === 'user' ? 'is-user' : 'is-assistant'}\`}>
|
|
93
|
+
<div className={\`chat-bubble \${msg.role === 'user' ? 'is-user' : 'is-assistant'}\`}>
|
|
94
|
+
{msg.content}
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
))}
|
|
98
|
+
{loading && (
|
|
99
|
+
<div className="chat-row is-assistant">
|
|
100
|
+
<div className="chat-bubble is-assistant muted">Thinking...</div>
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<form onSubmit={send} className="form-inline chat-input">
|
|
106
|
+
<input
|
|
107
|
+
value={input}
|
|
108
|
+
onChange={e => setInput(e.target.value)}
|
|
109
|
+
placeholder="Type a message..."
|
|
110
|
+
disabled={loading}
|
|
111
|
+
className="form-input"
|
|
112
|
+
/>
|
|
113
|
+
<button type="submit" disabled={loading} className="form-submit">
|
|
114
|
+
Send
|
|
115
|
+
</button>
|
|
116
|
+
</form>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
export function aiChatPageVue(ctx) {
|
|
124
|
+
const cssImport = `import '@/index.css'\n`;
|
|
125
|
+
return `<script setup lang="ts">
|
|
126
|
+
${cssImport}import { ref, nextTick } from 'vue'
|
|
127
|
+
|
|
128
|
+
interface Message {
|
|
129
|
+
role: 'user' | 'assistant'
|
|
130
|
+
content: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const messages = ref<Message[]>([])
|
|
134
|
+
const input = ref('')
|
|
135
|
+
const loading = ref(false)
|
|
136
|
+
const scrollEl = ref<HTMLDivElement>()
|
|
137
|
+
|
|
138
|
+
async function send(e: Event) {
|
|
139
|
+
e.preventDefault()
|
|
140
|
+
if (!input.value.trim() || loading.value) return
|
|
141
|
+
|
|
142
|
+
const userMsg: Message = { role: 'user', content: input.value }
|
|
143
|
+
messages.value.push(userMsg)
|
|
144
|
+
input.value = ''
|
|
145
|
+
loading.value = true
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
const res = await fetch('/api/ai/chat', {
|
|
149
|
+
method: 'POST',
|
|
150
|
+
headers: { 'Content-Type': 'application/json' },
|
|
151
|
+
body: JSON.stringify({ messages: messages.value }),
|
|
152
|
+
})
|
|
153
|
+
const json = await res.json() as { message: string }
|
|
154
|
+
messages.value.push({ role: 'assistant', content: json.message })
|
|
155
|
+
} catch {
|
|
156
|
+
messages.value.push({ role: 'assistant', content: 'Something went wrong. Check your AI_PROVIDER and API key in .env.' })
|
|
157
|
+
} finally {
|
|
158
|
+
loading.value = false
|
|
159
|
+
await nextTick()
|
|
160
|
+
scrollEl.value?.scrollTo(0, scrollEl.value.scrollHeight)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
</script>
|
|
164
|
+
|
|
165
|
+
<template>
|
|
166
|
+
<div class="chat-wrap">
|
|
167
|
+
<div class="chat-column">
|
|
168
|
+
<div class="chat-header">
|
|
169
|
+
<h1 class="heading-lg">AI Chat</h1>
|
|
170
|
+
<a href="/" class="auth-link muted">← Home</a>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div ref="scrollEl" class="chat-log">
|
|
174
|
+
<p v-if="messages.length === 0" class="empty-state">Send a message to start chatting.</p>
|
|
175
|
+
<div v-for="(msg, i) in messages" :key="i" :class="['chat-row', msg.role === 'user' ? 'is-user' : 'is-assistant']">
|
|
176
|
+
<div :class="['chat-bubble', msg.role === 'user' ? 'is-user' : 'is-assistant']">
|
|
177
|
+
{{ msg.content }}
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div v-if="loading" class="chat-row is-assistant">
|
|
181
|
+
<div class="chat-bubble is-assistant muted">Thinking...</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<form @submit="send" class="form-inline chat-input">
|
|
186
|
+
<input v-model="input" placeholder="Type a message..." :disabled="loading" class="form-input" />
|
|
187
|
+
<button type="submit" :disabled="loading" class="form-submit">Send</button>
|
|
188
|
+
</form>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</template>
|
|
192
|
+
`;
|
|
193
|
+
}
|
|
194
|
+
export function aiChatPageSolid(ctx) {
|
|
195
|
+
const cssImport = `import '@/index.css'\n`;
|
|
196
|
+
return `${cssImport}import { createSignal, For, Show, onCleanup } from 'solid-js'
|
|
197
|
+
|
|
198
|
+
interface Message {
|
|
199
|
+
role: 'user' | 'assistant'
|
|
200
|
+
content: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export default function Page() {
|
|
204
|
+
const [messages, setMessages] = createSignal<Message[]>([])
|
|
205
|
+
const [input, setInput] = createSignal('')
|
|
206
|
+
const [loading, setLoading] = createSignal(false)
|
|
207
|
+
let scrollEl: HTMLDivElement | undefined
|
|
208
|
+
|
|
209
|
+
function scrollToBottom() {
|
|
210
|
+
setTimeout(() => scrollEl?.scrollTo(0, scrollEl.scrollHeight), 0)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async function send(e: Event) {
|
|
214
|
+
e.preventDefault()
|
|
215
|
+
if (!input().trim() || loading()) return
|
|
216
|
+
|
|
217
|
+
const userMsg: Message = { role: 'user', content: input() }
|
|
218
|
+
setMessages(prev => [...prev, userMsg])
|
|
219
|
+
setInput('')
|
|
220
|
+
setLoading(true)
|
|
221
|
+
scrollToBottom()
|
|
222
|
+
|
|
223
|
+
try {
|
|
224
|
+
const res = await fetch('/api/ai/chat', {
|
|
225
|
+
method: 'POST',
|
|
226
|
+
headers: { 'Content-Type': 'application/json' },
|
|
227
|
+
body: JSON.stringify({ messages: [...messages()] }),
|
|
228
|
+
})
|
|
229
|
+
const json = await res.json() as { message: string }
|
|
230
|
+
setMessages(prev => [...prev, { role: 'assistant', content: json.message }])
|
|
231
|
+
} catch {
|
|
232
|
+
setMessages(prev => [...prev, { role: 'assistant', content: 'Something went wrong. Check your AI_PROVIDER and API key in .env.' }])
|
|
233
|
+
} finally {
|
|
234
|
+
setLoading(false)
|
|
235
|
+
scrollToBottom()
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<div class="chat-wrap">
|
|
241
|
+
<div class="chat-column">
|
|
242
|
+
<div class="chat-header">
|
|
243
|
+
<h1 class="heading-lg">AI Chat</h1>
|
|
244
|
+
<a href="/" class="auth-link muted">← Home</a>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<div ref={scrollEl} class="chat-log">
|
|
248
|
+
<Show when={messages().length === 0}>
|
|
249
|
+
<p class="empty-state">Send a message to start chatting.</p>
|
|
250
|
+
</Show>
|
|
251
|
+
<For each={messages()}>
|
|
252
|
+
{(msg) => (
|
|
253
|
+
<div class={\`chat-row \${msg.role === 'user' ? 'is-user' : 'is-assistant'}\`}>
|
|
254
|
+
<div class={\`chat-bubble \${msg.role === 'user' ? 'is-user' : 'is-assistant'}\`}>
|
|
255
|
+
{msg.content}
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
)}
|
|
259
|
+
</For>
|
|
260
|
+
<Show when={loading()}>
|
|
261
|
+
<div class="chat-row is-assistant">
|
|
262
|
+
<div class="chat-bubble is-assistant muted">Thinking...</div>
|
|
263
|
+
</div>
|
|
264
|
+
</Show>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<form onSubmit={send} class="form-inline chat-input">
|
|
268
|
+
<input
|
|
269
|
+
value={input()}
|
|
270
|
+
onInput={e => setInput(e.currentTarget.value)}
|
|
271
|
+
placeholder="Type a message..."
|
|
272
|
+
disabled={loading()}
|
|
273
|
+
class="form-input"
|
|
274
|
+
/>
|
|
275
|
+
<button type="submit" disabled={loading()} class="form-submit">
|
|
276
|
+
Send
|
|
277
|
+
</button>
|
|
278
|
+
</form>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
)
|
|
282
|
+
}
|
|
283
|
+
`;
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=ai-chat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-chat.js","sourceRoot":"","sources":["../../../src/templates/pages/ai-chat.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,GAAoB;IACnD,QAAQ,GAAG,CAAC,OAAO,EAAE,CAAC;QACpB,KAAK,KAAK;YACR,OAAO;;;;;;CAMZ,CAAA;QACG,KAAK,OAAO;YACV,OAAO;;;;;;CAMZ,CAAA;QACG;YACE,OAAO;;;;;;CAMZ,CAAA;IACC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAoB;IAC7C,QAAQ,GAAG,CAAC,OAAO,EAAE,CAAC;QACpB,KAAK,KAAK,CAAC,CAAG,OAAO,aAAa,CAAC,GAAG,CAAC,CAAA;QACvC,KAAK,OAAO,CAAC,CAAC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAA;QACzC,OAAO,CAAC,CAAM,OAAO,eAAe,CAAC,GAAG,CAAC,CAAA;IAC3C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFpB,CAAA;AACD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAoB;IAChD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO;EACP,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEV,CAAA;AACD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFpB,CAAA;AACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../src/templates/pages/demo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CA2BpE;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO,EAAE,GAAG,EAAE,eAAe,GAAG,MAAM,CA4CpF"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export function demoPageConfig(fw) {
|
|
2
|
+
switch (fw) {
|
|
3
|
+
case 'vue':
|
|
4
|
+
return `import type { Config } from 'vike/types'
|
|
5
|
+
import vikeVue from 'vike-vue/config'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
extends: vikeVue,
|
|
9
|
+
} satisfies Config
|
|
10
|
+
`;
|
|
11
|
+
case 'solid':
|
|
12
|
+
return `import type { Config } from 'vike/types'
|
|
13
|
+
import vikeSolid from 'vike-solid/config'
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
extends: vikeSolid,
|
|
17
|
+
} satisfies Config
|
|
18
|
+
`;
|
|
19
|
+
default: // react
|
|
20
|
+
return `import type { Config } from 'vike/types'
|
|
21
|
+
import vikeReact from 'vike-react/config'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
extends: vikeReact,
|
|
25
|
+
} satisfies Config
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function demoPage(fw, ctx) {
|
|
30
|
+
const { primary } = ctx;
|
|
31
|
+
switch (fw) {
|
|
32
|
+
case 'react':
|
|
33
|
+
return `export default function Page() {
|
|
34
|
+
return (
|
|
35
|
+
<div className="error-wrap">
|
|
36
|
+
<h1 className="heading-lg">Hello from React</h1>
|
|
37
|
+
<p className="muted">React demo page — running alongside ${primary}.</p>
|
|
38
|
+
<a href="/" className="auth-link muted">← Back to home</a>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
case 'vue':
|
|
44
|
+
return `<script setup lang="ts">
|
|
45
|
+
import '@/index.css'
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<div class="error-wrap">
|
|
50
|
+
<h1 class="heading-lg">Hello from Vue</h1>
|
|
51
|
+
<p class="muted">Vue demo page — running alongside ${primary}.</p>
|
|
52
|
+
<a href="/" class="auth-link muted">← Back to home</a>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
`;
|
|
56
|
+
case 'solid':
|
|
57
|
+
return `import '@/index.css'
|
|
58
|
+
|
|
59
|
+
export default function Page() {
|
|
60
|
+
return (
|
|
61
|
+
<div class="error-wrap">
|
|
62
|
+
<h1 class="heading-lg">Hello from Solid</h1>
|
|
63
|
+
<p class="muted">Solid demo page — running alongside ${primary}.</p>
|
|
64
|
+
<a href="/" class="auth-link muted">← Back to home</a>
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../src/templates/pages/demo.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,cAAc,CAAC,EAA6B;IAC1D,QAAQ,EAAE,EAAE,CAAC;QACX,KAAK,KAAK;YACR,OAAO;;;;;;CAMZ,CAAA;QACG,KAAK,OAAO;YACV,OAAO;;;;;;CAMZ,CAAA;QACG,SAAS,QAAQ;YACf,OAAO;;;;;;CAMZ,CAAA;IACC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EAA6B,EAAE,GAAoB;IAC1E,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;IAEvB,QAAQ,EAAE,EAAE,CAAC;QACX,KAAK,OAAO;YACV,OAAO;;;;iEAIoD,OAAO;;;;;CAKvE,CAAA;QAEG,KAAK,KAAK;YACR,OAAO;;;;;;;yDAO4C,OAAO;;;;CAI/D,CAAA;QAEG,KAAK,OAAO;YACV,OAAO;;;;;;6DAMgD,OAAO;;;;;CAKnE,CAAA;IACC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TemplateContext } from '../../templates.js';
|
|
2
|
+
export declare function pagesErrorConfig(ctx: TemplateContext): string;
|
|
3
|
+
export declare function pagesErrorPage(ctx: TemplateContext): string;
|
|
4
|
+
export declare function pagesErrorPageReact(ctx: TemplateContext): string;
|
|
5
|
+
export declare function pagesErrorPageVue(ctx: TemplateContext): string;
|
|
6
|
+
export declare function pagesErrorPageSolid(ctx: TemplateContext): string;
|
|
7
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/templates/pages/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CA2B7D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAM3D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAwChE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CA8B9D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAuChE"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export function pagesErrorConfig(ctx) {
|
|
2
|
+
switch (ctx.primary) {
|
|
3
|
+
case 'vue':
|
|
4
|
+
return `import type { Config } from 'vike/types'
|
|
5
|
+
import vikeVue from 'vike-vue/config'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
extends: vikeVue,
|
|
9
|
+
} satisfies Config
|
|
10
|
+
`;
|
|
11
|
+
case 'solid':
|
|
12
|
+
return `import type { Config } from 'vike/types'
|
|
13
|
+
import vikeSolid from 'vike-solid/config'
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
extends: vikeSolid,
|
|
17
|
+
} satisfies Config
|
|
18
|
+
`;
|
|
19
|
+
default:
|
|
20
|
+
return `import type { Config } from 'vike/types'
|
|
21
|
+
import vikeReact from 'vike-react/config'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
extends: vikeReact,
|
|
25
|
+
} satisfies Config
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function pagesErrorPage(ctx) {
|
|
30
|
+
switch (ctx.primary) {
|
|
31
|
+
case 'vue': return pagesErrorPageVue(ctx);
|
|
32
|
+
case 'solid': return pagesErrorPageSolid(ctx);
|
|
33
|
+
default: return pagesErrorPageReact(ctx);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function pagesErrorPageReact(ctx) {
|
|
37
|
+
const cssImport = `import '@/index.css'\n`;
|
|
38
|
+
return `${cssImport}import { usePageContext } from 'vike-react/usePageContext'
|
|
39
|
+
|
|
40
|
+
export default function Page() {
|
|
41
|
+
const { is404, abortReason, abortStatusCode } = usePageContext() as {
|
|
42
|
+
is404: boolean
|
|
43
|
+
abortStatusCode?: number
|
|
44
|
+
abortReason?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (is404) {
|
|
48
|
+
return (
|
|
49
|
+
<div className="error-wrap">
|
|
50
|
+
<h1 className="heading-lg">404 — Page Not Found</h1>
|
|
51
|
+
<p className="muted">This page could not be found.</p>
|
|
52
|
+
<a href="/" className="error-link">Go home</a>
|
|
53
|
+
</div>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (abortStatusCode === 401) {
|
|
58
|
+
return (
|
|
59
|
+
<div className="error-wrap">
|
|
60
|
+
<h1 className="heading-lg">401 — Unauthorized</h1>
|
|
61
|
+
<p className="muted">{abortReason ?? 'You must be logged in to view this page.'}</p>
|
|
62
|
+
<a href="/" className="error-link">Go home</a>
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className="error-wrap">
|
|
69
|
+
<h1 className="heading-lg">Something went wrong</h1>
|
|
70
|
+
<p className="muted">{abortReason ?? 'An unexpected error occurred.'}</p>
|
|
71
|
+
<a href="/" className="error-link">Go home</a>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
export function pagesErrorPageVue(ctx) {
|
|
78
|
+
const cssImport = `import '@/index.css'\n`;
|
|
79
|
+
return `<script setup lang="ts">
|
|
80
|
+
${cssImport}import { usePageContext } from 'vike-vue/usePageContext'
|
|
81
|
+
|
|
82
|
+
const pageContext = usePageContext() as {
|
|
83
|
+
is404: boolean
|
|
84
|
+
abortStatusCode?: number
|
|
85
|
+
abortReason?: string
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<template>
|
|
90
|
+
<div v-if="pageContext.is404" class="error-wrap">
|
|
91
|
+
<h1 class="heading-lg">404 — Page Not Found</h1>
|
|
92
|
+
<p class="muted">This page could not be found.</p>
|
|
93
|
+
<a href="/" class="error-link">Go home</a>
|
|
94
|
+
</div>
|
|
95
|
+
<div v-else-if="pageContext.abortStatusCode === 401" class="error-wrap">
|
|
96
|
+
<h1 class="heading-lg">401 — Unauthorized</h1>
|
|
97
|
+
<p class="muted">{{ pageContext.abortReason ?? 'You must be logged in to view this page.' }}</p>
|
|
98
|
+
<a href="/" class="error-link">Go home</a>
|
|
99
|
+
</div>
|
|
100
|
+
<div v-else class="error-wrap">
|
|
101
|
+
<h1 class="heading-lg">Something went wrong</h1>
|
|
102
|
+
<p class="muted">{{ pageContext.abortReason ?? 'An unexpected error occurred.' }}</p>
|
|
103
|
+
<a href="/" class="error-link">Go home</a>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
export function pagesErrorPageSolid(ctx) {
|
|
109
|
+
const cssImport = `import '@/index.css'\n`;
|
|
110
|
+
return `${cssImport}import { Switch, Match } from 'solid-js'
|
|
111
|
+
import { usePageContext } from 'vike-solid/usePageContext'
|
|
112
|
+
|
|
113
|
+
export default function Page() {
|
|
114
|
+
const pageContext = usePageContext() as {
|
|
115
|
+
is404: boolean
|
|
116
|
+
abortStatusCode?: number
|
|
117
|
+
abortReason?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<Switch>
|
|
122
|
+
<Match when={pageContext.is404}>
|
|
123
|
+
<div class="error-wrap">
|
|
124
|
+
<h1 class="heading-lg">404 — Page Not Found</h1>
|
|
125
|
+
<p class="muted">This page could not be found.</p>
|
|
126
|
+
<a href="/" class="error-link">Go home</a>
|
|
127
|
+
</div>
|
|
128
|
+
</Match>
|
|
129
|
+
<Match when={pageContext.abortStatusCode === 401}>
|
|
130
|
+
<div class="error-wrap">
|
|
131
|
+
<h1 class="heading-lg">401 — Unauthorized</h1>
|
|
132
|
+
<p class="muted">{pageContext.abortReason ?? 'You must be logged in to view this page.'}</p>
|
|
133
|
+
<a href="/" class="error-link">Go home</a>
|
|
134
|
+
</div>
|
|
135
|
+
</Match>
|
|
136
|
+
<Match when={true}>
|
|
137
|
+
<div class="error-wrap">
|
|
138
|
+
<h1 class="heading-lg">Something went wrong</h1>
|
|
139
|
+
<p class="muted">{pageContext.abortReason ?? 'An unexpected error occurred.'}</p>
|
|
140
|
+
<a href="/" class="error-link">Go home</a>
|
|
141
|
+
</div>
|
|
142
|
+
</Match>
|
|
143
|
+
</Switch>
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/templates/pages/error.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,GAAoB;IACnD,QAAQ,GAAG,CAAC,OAAO,EAAE,CAAC;QACpB,KAAK,KAAK;YACR,OAAO;;;;;;CAMZ,CAAA;QACG,KAAK,OAAO;YACV,OAAO;;;;;;CAMZ,CAAA;QACG;YACE,OAAO;;;;;;CAMZ,CAAA;IACC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAoB;IACjD,QAAQ,GAAG,CAAC,OAAO,EAAE,CAAC;QACpB,KAAK,KAAK,CAAC,CAAG,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAA;QAC3C,KAAK,OAAO,CAAC,CAAC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAA;QAC7C,OAAO,CAAC,CAAM,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAA;IAC/C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAoB;IACtD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCpB,CAAA;AACD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAoB;IACpD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO;EACP,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BV,CAAA;AACD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAoB;IACtD,MAAM,SAAS,GAAG,wBAAwB,CAAA;IAC1C,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpB,CAAA;AACD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TemplateContext } from '../../templates.js';
|
|
2
|
+
export declare function pagesRootConfig(ctx: TemplateContext): string;
|
|
3
|
+
export declare function pagesIndexConfig(ctx: TemplateContext): string;
|
|
4
|
+
export declare function pagesIndexData(ctx: TemplateContext): string;
|
|
5
|
+
export declare function pagesIndexPage(ctx: TemplateContext): string;
|
|
6
|
+
export declare function pagesIndexPageReact(ctx: TemplateContext): string;
|
|
7
|
+
export declare function pagesIndexPageVue(ctx: TemplateContext): string;
|
|
8
|
+
export declare function pagesIndexPageSolid(ctx: TemplateContext): string;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/pages/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAsB5D;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CA2B7D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAoC3D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAM3D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAyEhE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAsE9D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CA0EhE"}
|