reroute-js 0.1.0 → 0.2.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/CHANGELOG.md +12 -0
- package/elysia/index.js +24 -6
- package/elysia/index.js.map +5 -5
- package/elysia/src/plugin.d.ts.map +1 -1
- package/elysia/src/routes/ssr.d.ts +2 -0
- package/elysia/src/routes/ssr.d.ts.map +1 -1
- package/elysia/src/routes/static.d.ts.map +1 -1
- package/package.json +9 -6
- package/packages/cli/README.md +264 -0
- package/packages/cli/bin.ts +3 -0
- package/packages/core/README.md +90 -0
- package/packages/elysia/README.md +250 -0
- package/packages/react/README.md +3 -0
- package/_/README.md +0 -59
- package/_/basic/package.json +0 -23
- package/_/basic/src/client/App.tsx +0 -10
- package/_/basic/src/client/components/Counter.tsx +0 -15
- package/_/basic/src/client/index.html +0 -12
- package/_/basic/src/client/index.tsx +0 -5
- package/_/basic/src/client/routes/[404].tsx +0 -18
- package/_/basic/src/client/routes/about.tsx +0 -25
- package/_/basic/src/client/routes/index.tsx +0 -57
- package/_/basic/src/index.ts +0 -20
- package/_/basic/tsconfig.json +0 -26
- package/_/blog/package.json +0 -23
- package/_/blog/src/client/App.tsx +0 -10
- package/_/blog/src/client/components/Counter.tsx +0 -14
- package/_/blog/src/client/components/RecentPosts.tsx +0 -90
- package/_/blog/src/client/index.html +0 -13
- package/_/blog/src/client/index.tsx +0 -5
- package/_/blog/src/client/routes/[404].tsx +0 -21
- package/_/blog/src/client/routes/about.tsx +0 -31
- package/_/blog/src/client/routes/blog/[404].tsx +0 -21
- package/_/blog/src/client/routes/blog/[layout].tsx +0 -84
- package/_/blog/src/client/routes/blog/[slug].tsx +0 -11
- package/_/blog/src/client/routes/blog/content/1-hello-world.tsx +0 -27
- package/_/blog/src/client/routes/blog/content/2-what-is-reroute.tsx +0 -31
- package/_/blog/src/client/routes/blog/index.tsx +0 -70
- package/_/blog/src/client/routes/index.tsx +0 -63
- package/_/blog/src/index.ts +0 -20
- package/_/blog/tsconfig.json +0 -26
- package/_/store/package.json +0 -25
- package/_/store/src/client/App.tsx +0 -17
- package/_/store/src/client/components/Header.tsx +0 -40
- package/_/store/src/client/components/ProductCard.tsx +0 -51
- package/_/store/src/client/index.html +0 -17
- package/_/store/src/client/index.tsx +0 -7
- package/_/store/src/client/lib/api.ts +0 -153
- package/_/store/src/client/routes/[404].tsx +0 -63
- package/_/store/src/client/routes/categories/[category].tsx +0 -223
- package/_/store/src/client/routes/categories/index.tsx +0 -187
- package/_/store/src/client/routes/index.tsx +0 -126
- package/_/store/src/client/routes/products/[id].tsx +0 -233
- package/_/store/src/client/routes/products/index.tsx +0 -261
- package/_/store/src/client/theme.css +0 -306
- package/_/store/src/index.ts +0 -19
- package/_/store/tsconfig.json +0 -26
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
@theme {
|
|
4
|
-
/* Primary Brand Colors */
|
|
5
|
-
--color-primary-50: #eff6ff;
|
|
6
|
-
--color-primary-100: #dbeafe;
|
|
7
|
-
--color-primary-200: #bfdbfe;
|
|
8
|
-
--color-primary-300: #93c5fd;
|
|
9
|
-
--color-primary-400: #60a5fa;
|
|
10
|
-
--color-primary-500: #3b82f6;
|
|
11
|
-
--color-primary-600: #2563eb;
|
|
12
|
-
--color-primary-700: #1d4ed8;
|
|
13
|
-
--color-primary-800: #1e40af;
|
|
14
|
-
--color-primary-900: #1e3a8a;
|
|
15
|
-
--color-primary-950: #172554;
|
|
16
|
-
|
|
17
|
-
/* Custom Shadows */
|
|
18
|
-
--shadow-soft:
|
|
19
|
-
0 2px 15px -3px rgb(0 0 0 / 0.07), 0 10px 20px -2px rgb(0 0 0 / 0.04);
|
|
20
|
-
--shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
|
|
21
|
-
--shadow-card-hover:
|
|
22
|
-
0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
|
|
23
|
-
|
|
24
|
-
/* Custom Animations */
|
|
25
|
-
--animate-fade-in: fadeIn 0.3s ease-in-out;
|
|
26
|
-
--animate-slide-up: slideUp 0.4s ease-out;
|
|
27
|
-
--animate-scale-in: scaleIn 0.2s ease-out;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@keyframes fadeIn {
|
|
31
|
-
0% {
|
|
32
|
-
opacity: 0;
|
|
33
|
-
}
|
|
34
|
-
100% {
|
|
35
|
-
opacity: 1;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@keyframes slideUp {
|
|
40
|
-
0% {
|
|
41
|
-
transform: translateY(20px);
|
|
42
|
-
opacity: 0;
|
|
43
|
-
}
|
|
44
|
-
100% {
|
|
45
|
-
transform: translateY(0);
|
|
46
|
-
opacity: 1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@keyframes scaleIn {
|
|
51
|
-
0% {
|
|
52
|
-
transform: scale(0.95);
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
100% {
|
|
56
|
-
transform: scale(1);
|
|
57
|
-
opacity: 1;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@layer base {
|
|
62
|
-
body {
|
|
63
|
-
@apply antialiased bg-gray-50 text-gray-900;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
* {
|
|
67
|
-
@apply border-gray-200;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@utility btn {
|
|
72
|
-
display: inline-flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
padding: 0.75rem 1.5rem;
|
|
76
|
-
border-radius: 0.5rem;
|
|
77
|
-
font-weight: 600;
|
|
78
|
-
transition: all 0.2s;
|
|
79
|
-
|
|
80
|
-
&:disabled {
|
|
81
|
-
opacity: 0.5;
|
|
82
|
-
cursor: not-allowed;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@utility btn-primary {
|
|
87
|
-
background-color: var(--color-primary-600);
|
|
88
|
-
color: white;
|
|
89
|
-
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
90
|
-
|
|
91
|
-
&:hover:not(:disabled) {
|
|
92
|
-
background-color: var(--color-primary-700);
|
|
93
|
-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
|
94
|
-
transform: translateY(-1px);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&:active:not(:disabled) {
|
|
98
|
-
background-color: var(--color-primary-800);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@utility btn-secondary {
|
|
103
|
-
background-color: white;
|
|
104
|
-
color: var(--color-primary-600);
|
|
105
|
-
border: 2px solid var(--color-primary-600);
|
|
106
|
-
|
|
107
|
-
&:hover:not(:disabled) {
|
|
108
|
-
background-color: var(--color-primary-50);
|
|
109
|
-
transform: translateY(-1px);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:active:not(:disabled) {
|
|
113
|
-
background-color: var(--color-primary-100);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@utility btn-sm {
|
|
118
|
-
padding: 0.5rem 1rem;
|
|
119
|
-
font-size: 0.875rem;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@utility btn-lg {
|
|
123
|
-
padding: 1rem 2rem;
|
|
124
|
-
font-size: 1.125rem;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@utility card {
|
|
128
|
-
background-color: white;
|
|
129
|
-
border-radius: 0.75rem;
|
|
130
|
-
box-shadow: var(--shadow-card);
|
|
131
|
-
transition: all 0.2s;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@utility card-hover {
|
|
135
|
-
&:hover {
|
|
136
|
-
box-shadow: var(--shadow-card-hover);
|
|
137
|
-
transform: translateY(-4px);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@utility link {
|
|
142
|
-
color: var(--color-primary-600);
|
|
143
|
-
transition: color 0.15s;
|
|
144
|
-
|
|
145
|
-
&:hover {
|
|
146
|
-
color: var(--color-primary-700);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
@utility link-muted {
|
|
151
|
-
color: rgb(75 85 99);
|
|
152
|
-
transition: color 0.15s;
|
|
153
|
-
|
|
154
|
-
&:hover {
|
|
155
|
-
color: rgb(17 24 39);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@utility badge {
|
|
160
|
-
display: inline-flex;
|
|
161
|
-
align-items: center;
|
|
162
|
-
padding: 0.25rem 0.75rem;
|
|
163
|
-
border-radius: 9999px;
|
|
164
|
-
font-size: 0.75rem;
|
|
165
|
-
font-weight: 600;
|
|
166
|
-
text-transform: uppercase;
|
|
167
|
-
letter-spacing: 0.05em;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@utility badge-primary {
|
|
171
|
-
background-color: var(--color-primary-100);
|
|
172
|
-
color: var(--color-primary-700);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
@utility badge-success {
|
|
176
|
-
background-color: rgb(220 252 231);
|
|
177
|
-
color: rgb(21 128 61);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
@utility input {
|
|
181
|
-
width: 100%;
|
|
182
|
-
padding: 0.625rem 1rem;
|
|
183
|
-
border-radius: 0.5rem;
|
|
184
|
-
border: 1px solid rgb(209 213 219);
|
|
185
|
-
outline: none;
|
|
186
|
-
transition: all 0.15s;
|
|
187
|
-
|
|
188
|
-
&:focus {
|
|
189
|
-
border-color: var(--color-primary-500);
|
|
190
|
-
box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@utility select {
|
|
195
|
-
width: 100%;
|
|
196
|
-
padding: 0.625rem 1rem;
|
|
197
|
-
border-radius: 0.5rem;
|
|
198
|
-
border: 1px solid rgb(209 213 219);
|
|
199
|
-
background-color: white;
|
|
200
|
-
cursor: pointer;
|
|
201
|
-
outline: none;
|
|
202
|
-
transition: all 0.15s;
|
|
203
|
-
|
|
204
|
-
&:focus {
|
|
205
|
-
border-color: var(--color-primary-500);
|
|
206
|
-
box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@utility container-custom {
|
|
211
|
-
max-width: 80rem;
|
|
212
|
-
margin-left: auto;
|
|
213
|
-
margin-right: auto;
|
|
214
|
-
padding-left: 1rem;
|
|
215
|
-
padding-right: 1rem;
|
|
216
|
-
|
|
217
|
-
@media (min-width: 640px) {
|
|
218
|
-
padding-left: 1.5rem;
|
|
219
|
-
padding-right: 1.5rem;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@media (min-width: 1024px) {
|
|
223
|
-
padding-left: 2rem;
|
|
224
|
-
padding-right: 2rem;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@utility section-heading {
|
|
229
|
-
font-size: 1.875rem;
|
|
230
|
-
font-weight: 700;
|
|
231
|
-
color: rgb(17 24 39);
|
|
232
|
-
margin-bottom: 0.5rem;
|
|
233
|
-
|
|
234
|
-
@media (min-width: 768px) {
|
|
235
|
-
font-size: 2.25rem;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
@utility section-subheading {
|
|
240
|
-
font-size: 1.125rem;
|
|
241
|
-
color: rgb(107 114 128);
|
|
242
|
-
margin-bottom: 2rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
@utility product-grid {
|
|
246
|
-
display: grid;
|
|
247
|
-
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
248
|
-
gap: 1.5rem;
|
|
249
|
-
|
|
250
|
-
@media (min-width: 640px) {
|
|
251
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
@media (min-width: 1024px) {
|
|
255
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
@media (min-width: 1280px) {
|
|
259
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@utility feature-card {
|
|
264
|
-
text-align: center;
|
|
265
|
-
padding: 1.5rem;
|
|
266
|
-
border-radius: 0.75rem;
|
|
267
|
-
transition: all 0.2s;
|
|
268
|
-
|
|
269
|
-
&:hover {
|
|
270
|
-
background-color: white;
|
|
271
|
-
box-shadow: var(--shadow-soft);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
@utility animate-in {
|
|
276
|
-
animation: var(--animate-fade-in);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
@utility animate-slide-up {
|
|
280
|
-
animation: var(--animate-slide-up);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
@utility animate-scale {
|
|
284
|
-
animation: var(--animate-scale-in);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/* View Transition API Configuration */
|
|
288
|
-
::view-transition-old(root) {
|
|
289
|
-
animation: 0.25s cubic-bezier(0.4, 0, 1, 1) both fade-out;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
::view-transition-new(root) {
|
|
293
|
-
animation: 0.25s cubic-bezier(0, 0, 0.2, 1) both fade-in;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
@keyframes fade-out {
|
|
297
|
-
to {
|
|
298
|
-
opacity: 0;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@keyframes fade-in {
|
|
303
|
-
from {
|
|
304
|
-
opacity: 0;
|
|
305
|
-
}
|
|
306
|
-
}
|
package/_/store/src/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
|
-
import { createElement } from 'react';
|
|
3
|
-
import { reroute } from 'reroute-js/elysia';
|
|
4
|
-
import App from './client/App';
|
|
5
|
-
|
|
6
|
-
const IS_PRODUCTION = Bun.env.NODE_ENV === 'production';
|
|
7
|
-
|
|
8
|
-
const app = new Elysia()
|
|
9
|
-
.use(
|
|
10
|
-
reroute({
|
|
11
|
-
app: createElement(App),
|
|
12
|
-
minify: IS_PRODUCTION,
|
|
13
|
-
}),
|
|
14
|
-
)
|
|
15
|
-
.listen(Number(Bun.env.PORT || '3001'));
|
|
16
|
-
|
|
17
|
-
console.log(
|
|
18
|
-
`🛒 Reroute Store is running at ${app.server?.hostname}:${app.server?.port} on ${Bun.env.NODE_ENV || 'development'}`,
|
|
19
|
-
);
|
package/_/store/tsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"moduleResolution": "bundler",
|
|
9
|
-
"isolatedModules": true,
|
|
10
|
-
"baseUrl": ".",
|
|
11
|
-
"rootDir": ".",
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"declarationMap": true,
|
|
14
|
-
"outDir": "dist/types",
|
|
15
|
-
"emitDeclarationOnly": true,
|
|
16
|
-
"strict": true,
|
|
17
|
-
"noUnusedLocals": true,
|
|
18
|
-
"noUnusedParameters": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true,
|
|
20
|
-
"jsx": "react-jsx",
|
|
21
|
-
"types": ["bun", "node"],
|
|
22
|
-
"paths": {}
|
|
23
|
-
},
|
|
24
|
-
"include": ["packages/**/*.ts", "packages/**/*.tsx", "test/**/*.d.ts"],
|
|
25
|
-
"exclude": ["node_modules", "dist", "test"]
|
|
26
|
-
}
|