bosia 0.2.3 → 0.3.1

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.
Files changed (86) hide show
  1. package/README.md +39 -39
  2. package/package.json +56 -54
  3. package/src/ambient.d.ts +31 -0
  4. package/src/cli/add.ts +120 -114
  5. package/src/cli/build.ts +10 -10
  6. package/src/cli/create.ts +142 -137
  7. package/src/cli/dev.ts +7 -9
  8. package/src/cli/feat.ts +266 -258
  9. package/src/cli/index.ts +51 -42
  10. package/src/cli/registry.ts +136 -115
  11. package/src/cli/start.ts +17 -17
  12. package/src/cli/test.ts +25 -0
  13. package/src/core/build.ts +72 -56
  14. package/src/core/client/App.svelte +177 -156
  15. package/src/core/client/appState.svelte.ts +33 -31
  16. package/src/core/client/enhance.ts +83 -78
  17. package/src/core/client/hydrate.ts +95 -81
  18. package/src/core/client/prefetch.ts +101 -94
  19. package/src/core/client/router.svelte.ts +64 -51
  20. package/src/core/cookies.ts +70 -66
  21. package/src/core/cors.ts +44 -35
  22. package/src/core/csrf.ts +38 -38
  23. package/src/core/dedup.ts +17 -17
  24. package/src/core/dev.ts +196 -168
  25. package/src/core/env.ts +160 -148
  26. package/src/core/envCodegen.ts +73 -73
  27. package/src/core/errors.ts +48 -49
  28. package/src/core/hooks.ts +50 -50
  29. package/src/core/html.ts +184 -145
  30. package/src/core/matcher.ts +130 -121
  31. package/src/core/paths.ts +8 -10
  32. package/src/core/plugin.ts +113 -107
  33. package/src/core/prerender.ts +191 -122
  34. package/src/core/renderer.ts +359 -286
  35. package/src/core/routeFile.ts +140 -127
  36. package/src/core/routeTypes.ts +144 -83
  37. package/src/core/scanner.ts +125 -95
  38. package/src/core/server.ts +538 -424
  39. package/src/core/types.ts +25 -20
  40. package/src/lib/index.ts +8 -8
  41. package/src/lib/utils.ts +44 -30
  42. package/templates/default/.prettierignore +5 -0
  43. package/templates/default/.prettierrc.json +9 -0
  44. package/templates/default/README.md +5 -5
  45. package/templates/default/package.json +22 -18
  46. package/templates/default/src/app.css +80 -80
  47. package/templates/default/src/app.d.ts +3 -3
  48. package/templates/default/src/routes/+error.svelte +7 -10
  49. package/templates/default/src/routes/+layout.svelte +2 -2
  50. package/templates/default/src/routes/+page.svelte +30 -32
  51. package/templates/default/src/routes/about/+page.svelte +3 -3
  52. package/templates/default/tsconfig.json +20 -20
  53. package/templates/demo/.prettierignore +5 -0
  54. package/templates/demo/.prettierrc.json +9 -0
  55. package/templates/demo/README.md +9 -9
  56. package/templates/demo/package.json +22 -17
  57. package/templates/demo/src/app.css +80 -80
  58. package/templates/demo/src/app.d.ts +3 -3
  59. package/templates/demo/src/hooks.server.ts +9 -9
  60. package/templates/demo/src/routes/(public)/+layout.svelte +45 -23
  61. package/templates/demo/src/routes/(public)/+page.svelte +96 -67
  62. package/templates/demo/src/routes/(public)/about/+page.svelte +13 -25
  63. package/templates/demo/src/routes/(public)/all/[...catchall]/+page.svelte +24 -28
  64. package/templates/demo/src/routes/(public)/blog/+page.svelte +55 -46
  65. package/templates/demo/src/routes/(public)/blog/[slug]/+page.server.ts +36 -38
  66. package/templates/demo/src/routes/(public)/blog/[slug]/+page.svelte +60 -42
  67. package/templates/demo/src/routes/+error.svelte +10 -7
  68. package/templates/demo/src/routes/+layout.server.ts +4 -4
  69. package/templates/demo/src/routes/+layout.svelte +2 -2
  70. package/templates/demo/src/routes/actions-test/+page.server.ts +16 -16
  71. package/templates/demo/src/routes/actions-test/+page.svelte +49 -49
  72. package/templates/demo/src/routes/api/hello/+server.ts +25 -25
  73. package/templates/demo/tsconfig.json +20 -20
  74. package/templates/todo/.prettierignore +5 -0
  75. package/templates/todo/.prettierrc.json +9 -0
  76. package/templates/todo/README.md +9 -9
  77. package/templates/todo/package.json +22 -17
  78. package/templates/todo/src/app.css +80 -80
  79. package/templates/todo/src/app.d.ts +7 -7
  80. package/templates/todo/src/hooks.server.ts +9 -9
  81. package/templates/todo/src/routes/+error.svelte +10 -7
  82. package/templates/todo/src/routes/+layout.server.ts +4 -4
  83. package/templates/todo/src/routes/+layout.svelte +2 -2
  84. package/templates/todo/src/routes/+page.svelte +44 -44
  85. package/templates/todo/template.json +1 -1
  86. package/templates/todo/tsconfig.json +20 -20
package/src/core/types.ts CHANGED
@@ -1,37 +1,42 @@
1
1
  // ─── Bosia Core Types ────────────────────────────────────
2
2
 
3
+ /** Canonicalization mode for trailing slashes. Set per-page or per-layout. */
4
+ export type TrailingSlash = "never" | "always" | "ignore";
5
+
3
6
  /** A page route discovered from the file system */
4
7
  export interface PageRoute {
5
- /** URL pattern, e.g. "/" or "/blog/[slug]" or "/[...rest]" */
6
- pattern: string;
7
- /** Path to +page.svelte, relative to src/routes/ */
8
- page: string;
9
- /** Chain of +layout.svelte paths root → leaf, relative to src/routes/ */
10
- layouts: string[];
11
- /** Path to +page.server.ts if exists, relative to src/routes/ */
12
- pageServer: string | null;
13
- /** Chain of +layout.server.ts files root → leaf, with their layout depth */
14
- layoutServers: { path: string; depth: number }[];
8
+ /** URL pattern, e.g. "/" or "/blog/[slug]" or "/[...rest]" */
9
+ pattern: string;
10
+ /** Path to +page.svelte, relative to src/routes/ */
11
+ page: string;
12
+ /** Chain of +layout.svelte paths root → leaf, relative to src/routes/ */
13
+ layouts: string[];
14
+ /** Path to +page.server.ts if exists, relative to src/routes/ */
15
+ pageServer: string | null;
16
+ /** Chain of +layout.server.ts files root → leaf, with their layout depth */
17
+ layoutServers: { path: string; depth: number }[];
18
+ /** Effective trailing-slash mode (page wins over layout chain). Defaults to "never". */
19
+ trailingSlash: TrailingSlash;
15
20
  }
16
21
 
17
22
  /** An API route discovered from the file system */
18
23
  export interface ApiRoute {
19
- /** URL pattern, e.g. "/api/hello" or "/api/users/[id]" */
20
- pattern: string;
21
- /** Path to +server.ts, relative to src/routes/ */
22
- server: string;
24
+ /** URL pattern, e.g. "/api/hello" or "/api/users/[id]" */
25
+ pattern: string;
26
+ /** Path to +server.ts, relative to src/routes/ */
27
+ server: string;
23
28
  }
24
29
 
25
30
  /** The full route manifest produced by the scanner */
26
31
  export interface RouteManifest {
27
- pages: PageRoute[];
28
- apis: ApiRoute[];
29
- /** Path to root +error.svelte if it exists, relative to src/routes/ */
30
- errorPage: string | null;
32
+ pages: PageRoute[];
33
+ apis: ApiRoute[];
34
+ /** Path to root +error.svelte if it exists, relative to src/routes/ */
35
+ errorPage: string | null;
31
36
  }
32
37
 
33
38
  /** Result of matching a URL against a route */
34
39
  export interface RouteMatch<T> {
35
- route: T;
36
- params: Record<string, string>;
40
+ route: T;
41
+ params: Record<string, string>;
37
42
  }
package/src/lib/index.ts CHANGED
@@ -8,14 +8,14 @@ export { sequence } from "../core/hooks.ts";
8
8
  export { error, redirect, fail } from "../core/errors.ts";
9
9
  export type { HttpError, Redirect, RedirectOptions, ActionFailure } from "../core/errors.ts";
10
10
  export type {
11
- RequestEvent,
12
- LoadEvent,
13
- MetadataEvent,
14
- Metadata,
15
- Handle,
16
- ResolveFunction,
17
- Cookies,
18
- CookieOptions,
11
+ RequestEvent,
12
+ LoadEvent,
13
+ MetadataEvent,
14
+ Metadata,
15
+ Handle,
16
+ ResolveFunction,
17
+ Cookies,
18
+ CookieOptions,
19
19
  } from "../core/hooks.ts";
20
20
  export type { CsrfConfig } from "../core/csrf.ts";
21
21
  export type { CorsConfig } from "../core/cors.ts";
package/src/lib/utils.ts CHANGED
@@ -2,45 +2,59 @@ import { twMerge } from "tailwind-merge";
2
2
 
3
3
  type ClassDictionary = Record<string, any>;
4
4
  type ClassArray = ClassValue[];
5
- type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
5
+ type ClassValue =
6
+ | ClassArray
7
+ | ClassDictionary
8
+ | string
9
+ | number
10
+ | bigint
11
+ | null
12
+ | boolean
13
+ | undefined;
6
14
 
7
15
  function clsx(...inputs: ClassValue[]): string {
8
- let str = '';
9
- for (const input of inputs) {
10
- if (!input) continue;
11
- if (typeof input === 'string' || typeof input === 'number') {
12
- str && (str += ' ');
13
- str += input;
14
- } else if (Array.isArray(input)) {
15
- const inner = clsx(...input);
16
- if (inner) { str && (str += ' '); str += inner; }
17
- } else if (typeof input === 'object') {
18
- for (const k in input) {
19
- if ((input as ClassDictionary)[k]) { str && (str += ' '); str += k; }
20
- }
21
- }
22
- }
23
- return str;
16
+ let str = "";
17
+ for (const input of inputs) {
18
+ if (!input) continue;
19
+ if (typeof input === "string" || typeof input === "number") {
20
+ str && (str += " ");
21
+ str += input;
22
+ } else if (Array.isArray(input)) {
23
+ const inner = clsx(...input);
24
+ if (inner) {
25
+ str && (str += " ");
26
+ str += inner;
27
+ }
28
+ } else if (typeof input === "object") {
29
+ for (const k in input) {
30
+ if ((input as ClassDictionary)[k]) {
31
+ str && (str += " ");
32
+ str += k;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ return str;
24
38
  }
25
39
 
26
40
  export function cn(...inputs: ClassValue[]) {
27
- return twMerge(clsx(inputs));
41
+ return twMerge(clsx(inputs));
28
42
  }
29
43
 
30
44
  export function getServerTime() {
31
- const now = new Date();
32
- const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
45
+ const now = new Date();
46
+ const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
33
47
 
34
- // Get timezone offset in minutes and convert to ±HH:MM format
35
- const offsetMinutes = -now.getTimezoneOffset();
36
- const offsetHours = Math.floor(Math.abs(offsetMinutes) / 60);
37
- const offsetMins = Math.abs(offsetMinutes) % 60;
38
- const sign = offsetMinutes >= 0 ? '+' : '-';
39
- const offsetStr = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMins).padStart(2, '0')}`;
48
+ // Get timezone offset in minutes and convert to ±HH:MM format
49
+ const offsetMinutes = -now.getTimezoneOffset();
50
+ const offsetHours = Math.floor(Math.abs(offsetMinutes) / 60);
51
+ const offsetMins = Math.abs(offsetMinutes) % 60;
52
+ const sign = offsetMinutes >= 0 ? "+" : "-";
53
+ const offsetStr = `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMins).padStart(2, "0")}`;
40
54
 
41
- // Convert UTC time to local time by adding the offset
42
- const localTime = new Date(now.getTime() + offsetMinutes * 60 * 1000);
43
- const timestamp = localTime.toISOString().slice(0, -1) + offsetStr;
55
+ // Convert UTC time to local time by adding the offset
56
+ const localTime = new Date(now.getTime() + offsetMinutes * 60 * 1000);
57
+ const timestamp = localTime.toISOString().slice(0, -1) + offsetStr;
44
58
 
45
- return { timestamp, timezone: timeZone };
59
+ return { timestamp, timezone: timeZone };
46
60
  }
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ build
4
+ .bosia
5
+ bun.lock
@@ -0,0 +1,9 @@
1
+ {
2
+ "useTabs": true,
3
+ "tabWidth": 4,
4
+ "singleQuote": false,
5
+ "trailingComma": "all",
6
+ "printWidth": 100,
7
+ "plugins": ["prettier-plugin-svelte"],
8
+ "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
9
+ }
@@ -48,7 +48,7 @@ Fetch data on the server before rendering:
48
48
  import type { LoadEvent } from "bosia";
49
49
 
50
50
  export async function load({ params }: LoadEvent) {
51
- return { post: await getPost(params.slug) };
51
+ return { post: await getPost(params.slug) };
52
52
  }
53
53
  ```
54
54
 
@@ -57,7 +57,7 @@ export async function load({ params }: LoadEvent) {
57
57
  ```typescript
58
58
  // src/routes/api/hello/+server.ts
59
59
  export function GET() {
60
- return Response.json({ message: "hello" });
60
+ return Response.json({ message: "hello" });
61
61
  }
62
62
  ```
63
63
 
@@ -79,8 +79,8 @@ src/routes/
79
79
 
80
80
  ```svelte
81
81
  <div class="bg-background text-foreground">
82
- <p class="text-muted-foreground">Muted text</p>
83
- <button class="bg-primary text-primary-foreground">Click</button>
82
+ <p class="text-muted-foreground">Muted text</p>
83
+ <button class="bg-primary text-primary-foreground">Click</button>
84
84
  </div>
85
85
  ```
86
86
 
@@ -92,7 +92,7 @@ Dark mode is supported via the `.dark` class on any parent element.
92
92
  import { cn } from "$lib/utils";
93
93
 
94
94
  // Merges Tailwind classes safely
95
- cn("px-4 py-2", isActive && "bg-primary")
95
+ cn("px-4 py-2", isActive && "bg-primary");
96
96
  ```
97
97
 
98
98
  ## Learn More
@@ -1,20 +1,24 @@
1
1
  {
2
- "name": "{{PROJECT_NAME}}",
3
- "private": true,
4
- "type": "module",
5
- "scripts": {
6
- "dev": "bosia dev",
7
- "build": "bosia build",
8
- "start": "bosia start",
9
- "check": "tsc --noEmit"
10
- },
11
- "dependencies": {
12
- "bosia": "^{{BOSIA_VERSION}}",
13
- "svelte": "^5.20.0",
14
- "tailwind-merge": "^3.5.0"
15
- },
16
- "devDependencies": {
17
- "@types/bun": "latest",
18
- "typescript": "^5"
19
- }
2
+ "name": "{{PROJECT_NAME}}",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "bosia dev",
7
+ "build": "bosia build",
8
+ "start": "bosia start",
9
+ "check": "tsc --noEmit && prettier --check .",
10
+ "format": "prettier --write .",
11
+ "format:check": "prettier --check ."
12
+ },
13
+ "dependencies": {
14
+ "bosia": "^{{BOSIA_VERSION}}",
15
+ "svelte": "^5.20.0",
16
+ "tailwind-merge": "^3.5.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/bun": "latest",
20
+ "prettier": "^3.3.0",
21
+ "prettier-plugin-svelte": "^3.2.0",
22
+ "typescript": "^5"
23
+ }
20
24
  }
@@ -8,125 +8,125 @@
8
8
  */
9
9
 
10
10
  @theme {
11
- --color-background: hsl(var(--background));
12
- --color-foreground: hsl(var(--foreground));
11
+ --color-background: hsl(var(--background));
12
+ --color-foreground: hsl(var(--foreground));
13
13
 
14
- --color-card: hsl(var(--card));
15
- --color-card-foreground: hsl(var(--card-foreground));
14
+ --color-card: hsl(var(--card));
15
+ --color-card-foreground: hsl(var(--card-foreground));
16
16
 
17
- --color-popover: hsl(var(--popover));
18
- --color-popover-foreground: hsl(var(--popover-foreground));
17
+ --color-popover: hsl(var(--popover));
18
+ --color-popover-foreground: hsl(var(--popover-foreground));
19
19
 
20
- --color-primary: hsl(var(--primary));
21
- --color-primary-foreground: hsl(var(--primary-foreground));
20
+ --color-primary: hsl(var(--primary));
21
+ --color-primary-foreground: hsl(var(--primary-foreground));
22
22
 
23
- --color-secondary: hsl(var(--secondary));
24
- --color-secondary-foreground: hsl(var(--secondary-foreground));
23
+ --color-secondary: hsl(var(--secondary));
24
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
25
25
 
26
- --color-muted: hsl(var(--muted));
27
- --color-muted-foreground: hsl(var(--muted-foreground));
26
+ --color-muted: hsl(var(--muted));
27
+ --color-muted-foreground: hsl(var(--muted-foreground));
28
28
 
29
- --color-accent: hsl(var(--accent));
30
- --color-accent-foreground: hsl(var(--accent-foreground));
29
+ --color-accent: hsl(var(--accent));
30
+ --color-accent-foreground: hsl(var(--accent-foreground));
31
31
 
32
- --color-destructive: hsl(var(--destructive));
33
- --color-destructive-foreground: hsl(var(--destructive-foreground));
32
+ --color-destructive: hsl(var(--destructive));
33
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
34
34
 
35
- --color-border: hsl(var(--border));
36
- --color-input: hsl(var(--input));
37
- --color-ring: hsl(var(--ring));
35
+ --color-border: hsl(var(--border));
36
+ --color-input: hsl(var(--input));
37
+ --color-ring: hsl(var(--ring));
38
38
 
39
- --radius-sm: calc(var(--radius) - 4px);
40
- --radius-md: calc(var(--radius) - 2px);
41
- --radius-lg: var(--radius);
42
- --radius-xl: calc(var(--radius) + 4px);
39
+ --radius-sm: calc(var(--radius) - 4px);
40
+ --radius-md: calc(var(--radius) - 2px);
41
+ --radius-lg: var(--radius);
42
+ --radius-xl: calc(var(--radius) + 4px);
43
43
  }
44
44
 
45
45
  /* ─── Light Theme (Default) ─────────────────────────────── */
46
46
 
47
47
  :root {
48
- --background: 0 0% 100%;
49
- --foreground: 222.2 84% 4.9%;
48
+ --background: 0 0% 100%;
49
+ --foreground: 222.2 84% 4.9%;
50
50
 
51
- --card: 0 0% 100%;
52
- --card-foreground: 222.2 84% 4.9%;
51
+ --card: 0 0% 100%;
52
+ --card-foreground: 222.2 84% 4.9%;
53
53
 
54
- --popover: 0 0% 100%;
55
- --popover-foreground: 222.2 84% 4.9%;
54
+ --popover: 0 0% 100%;
55
+ --popover-foreground: 222.2 84% 4.9%;
56
56
 
57
- --primary: 222.2 47.4% 11.2%;
58
- --primary-foreground: 210 40% 98%;
57
+ --primary: 222.2 47.4% 11.2%;
58
+ --primary-foreground: 210 40% 98%;
59
59
 
60
- --secondary: 210 40% 96.1%;
61
- --secondary-foreground: 222.2 47.4% 11.2%;
60
+ --secondary: 210 40% 96.1%;
61
+ --secondary-foreground: 222.2 47.4% 11.2%;
62
62
 
63
- --muted: 210 40% 96.1%;
64
- --muted-foreground: 215.4 16.3% 46.9%;
63
+ --muted: 210 40% 96.1%;
64
+ --muted-foreground: 215.4 16.3% 46.9%;
65
65
 
66
- --accent: 210 40% 96.1%;
67
- --accent-foreground: 222.2 47.4% 11.2%;
66
+ --accent: 210 40% 96.1%;
67
+ --accent-foreground: 222.2 47.4% 11.2%;
68
68
 
69
- --destructive: 0 84.2% 60.2%;
70
- --destructive-foreground: 210 40% 98%;
69
+ --destructive: 0 84.2% 60.2%;
70
+ --destructive-foreground: 210 40% 98%;
71
71
 
72
- --border: 214.3 31.8% 91.4%;
73
- --input: 214.3 31.8% 91.4%;
74
- --ring: 222.2 84% 4.9%;
72
+ --border: 214.3 31.8% 91.4%;
73
+ --input: 214.3 31.8% 91.4%;
74
+ --ring: 222.2 84% 4.9%;
75
75
 
76
- --radius: 0.5rem;
76
+ --radius: 0.5rem;
77
77
  }
78
78
 
79
79
  /* ─── Dark Theme ─────────────────────────────────────────── */
80
80
 
81
81
  .dark {
82
- --background: 222.2 84% 4.9%;
83
- --foreground: 210 40% 98%;
82
+ --background: 222.2 84% 4.9%;
83
+ --foreground: 210 40% 98%;
84
84
 
85
- --card: 222.2 84% 4.9%;
86
- --card-foreground: 210 40% 98%;
85
+ --card: 222.2 84% 4.9%;
86
+ --card-foreground: 210 40% 98%;
87
87
 
88
- --popover: 222.2 84% 4.9%;
89
- --popover-foreground: 210 40% 98%;
88
+ --popover: 222.2 84% 4.9%;
89
+ --popover-foreground: 210 40% 98%;
90
90
 
91
- --primary: 210 40% 98%;
92
- --primary-foreground: 222.2 47.4% 11.2%;
91
+ --primary: 210 40% 98%;
92
+ --primary-foreground: 222.2 47.4% 11.2%;
93
93
 
94
- --secondary: 217.2 32.6% 17.5%;
95
- --secondary-foreground: 210 40% 98%;
94
+ --secondary: 217.2 32.6% 17.5%;
95
+ --secondary-foreground: 210 40% 98%;
96
96
 
97
- --muted: 217.2 32.6% 17.5%;
98
- --muted-foreground: 215 20.2% 65.1%;
97
+ --muted: 217.2 32.6% 17.5%;
98
+ --muted-foreground: 215 20.2% 65.1%;
99
99
 
100
- --accent: 217.2 32.6% 17.5%;
101
- --accent-foreground: 210 40% 98%;
100
+ --accent: 217.2 32.6% 17.5%;
101
+ --accent-foreground: 210 40% 98%;
102
102
 
103
- --destructive: 0 62.8% 30.6%;
104
- --destructive-foreground: 210 40% 98%;
103
+ --destructive: 0 62.8% 30.6%;
104
+ --destructive-foreground: 210 40% 98%;
105
105
 
106
- --border: 217.2 32.6% 17.5%;
107
- --input: 217.2 32.6% 17.5%;
108
- --ring: 212.7 26.8% 83.9%;
106
+ --border: 217.2 32.6% 17.5%;
107
+ --input: 217.2 32.6% 17.5%;
108
+ --ring: 212.7 26.8% 83.9%;
109
109
  }
110
110
 
111
111
  /* ─── Base Styles ────────────────────────────────────────── */
112
112
 
113
113
  @layer base {
114
- * {
115
- border-color: theme(--color-border);
116
- }
117
-
118
- body {
119
- background-color: theme(--color-background);
120
- color: theme(--color-foreground);
121
- font-family:
122
- "Inter",
123
- system-ui,
124
- -apple-system,
125
- BlinkMacSystemFont,
126
- "Segoe UI",
127
- Roboto,
128
- "Helvetica Neue",
129
- Arial,
130
- sans-serif;
131
- }
114
+ * {
115
+ border-color: theme(--color-border);
116
+ }
117
+
118
+ body {
119
+ background-color: theme(--color-background);
120
+ color: theme(--color-foreground);
121
+ font-family:
122
+ "Inter",
123
+ system-ui,
124
+ -apple-system,
125
+ BlinkMacSystemFont,
126
+ "Segoe UI",
127
+ Roboto,
128
+ "Helvetica Neue",
129
+ Arial,
130
+ sans-serif;
131
+ }
132
132
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="svelte" />
2
2
 
3
3
  declare module "*.svelte" {
4
- import type { Component } from "svelte";
5
- const component: Component<Record<string, any>, Record<string, any>, any>;
6
- export default component;
4
+ import type { Component } from "svelte";
5
+ const component: Component<Record<string, any>, Record<string, any>, any>;
6
+ export default component;
7
7
  }
@@ -1,18 +1,15 @@
1
1
  <script lang="ts">
2
- let { error }: { error: { status: number; message: string } } = $props();
2
+ let { error }: { error: { status: number; message: string } } = $props();
3
3
  </script>
4
4
 
5
5
  <svelte:head>
6
- <title>{error.status} — {error.message}</title>
6
+ <title>{error.status} — {error.message}</title>
7
7
  </svelte:head>
8
8
 
9
9
  <main class="flex min-h-screen flex-col items-center justify-center gap-4 text-center px-4">
10
- <p class="text-8xl font-bold text-gray-200">{error.status}</p>
11
- <p class="text-2xl font-semibold">{error.message}</p>
12
- <a
13
- href="/"
14
- class="mt-4 rounded-md border px-4 py-2 text-sm hover:bg-muted transition-colors"
15
- >
16
- Go home
17
- </a>
10
+ <p class="text-8xl font-bold text-gray-200">{error.status}</p>
11
+ <p class="text-2xl font-semibold">{error.message}</p>
12
+ <a href="/" class="mt-4 rounded-md border px-4 py-2 text-sm hover:bg-muted transition-colors">
13
+ Go home
14
+ </a>
18
15
  </main>
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import "../app.css";
3
- let { children }: { children: any } = $props();
2
+ import "../app.css";
3
+ let { children }: { children: any } = $props();
4
4
  </script>
5
5
 
6
6
  {@render children()}
@@ -1,36 +1,34 @@
1
- <script lang="ts">
2
- const name = "{{PROJECT_NAME}}";
3
- </script>
4
-
5
1
  <main class="flex min-h-screen flex-col items-center justify-center gap-6 p-8">
6
- <div class="flex flex-col items-center gap-3 text-center">
7
- <img src="/favicon.svg" alt="" class="size-16" />
8
- <h1 class="text-4xl font-bold tracking-tight">{name}</h1>
9
- <p class="text-muted-foreground text-lg">
10
- A Bosia project — SSR + Svelte 5 + Bun + ElysiaJS
11
- </p>
12
- </div>
2
+ <div class="flex flex-col items-center gap-3 text-center">
3
+ <img src="/favicon.svg" alt="" class="size-16" />
4
+ <h1 class="text-4xl font-bold tracking-tight">Welcome to Bosia</h1>
5
+ <p class="text-muted-foreground text-lg">
6
+ A Bosia project — SSR + Svelte 5 + Bun + ElysiaJS
7
+ </p>
8
+ </div>
13
9
 
14
- <div class="mt-4 flex gap-3">
15
- <a
16
- href="https://github.com/bosapi/bosia"
17
- target="_blank"
18
- rel="noopener noreferrer"
19
- class="bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-4 py-2 text-sm font-medium transition-colors"
20
- >
21
- Docs
22
- </a>
23
- <a
24
- href="https://github.com/bosapi/bosia/tree/main/registry"
25
- target="_blank"
26
- rel="noopener noreferrer"
27
- class="border-border bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md border px-4 py-2 text-sm font-medium transition-colors"
28
- >
29
- Components
30
- </a>
31
- </div>
10
+ <div class="mt-4 flex gap-3">
11
+ <a
12
+ href="https://github.com/bosapi/bosia"
13
+ target="_blank"
14
+ rel="noopener noreferrer"
15
+ class="bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-4 py-2 text-sm font-medium transition-colors"
16
+ >
17
+ Docs
18
+ </a>
19
+ <a
20
+ href="https://github.com/bosapi/bosia/tree/main/registry"
21
+ target="_blank"
22
+ rel="noopener noreferrer"
23
+ class="border-border bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md border px-4 py-2 text-sm font-medium transition-colors"
24
+ >
25
+ Components
26
+ </a>
27
+ </div>
32
28
 
33
- <p class="text-muted-foreground mt-6 text-sm">
34
- Edit <code class="bg-muted rounded px-1 py-0.5 font-mono text-xs">src/routes/+page.svelte</code> to get started
35
- </p>
29
+ <p class="text-muted-foreground mt-6 text-sm">
30
+ Edit <code class="bg-muted rounded px-1 py-0.5 font-mono text-xs"
31
+ >src/routes/+page.svelte</code
32
+ > to get started
33
+ </p>
36
34
  </main>
@@ -1,8 +1,8 @@
1
1
  <svelte:head>
2
- <title>About | {{PROJECT_NAME}}</title>
2
+ <title>About | Bosia</title>
3
3
  </svelte:head>
4
4
 
5
5
  <div>
6
- <h1>About</h1>
7
- <p>This page is prerendered at build time — no server work per request.</p>
6
+ <h1>About</h1>
7
+ <p>This page is prerendered at build time — no server work per request.</p>
8
8
  </div>