create-loumi-app 1.1.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-loumi-app",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "CLI tool to scaffold Loumi web projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,12 @@ interface BreadcrumbItem {
25
25
  url: string;
26
26
  }
27
27
 
28
- function jsonLdScript(data: Record<string, any>): string {
28
+ type JsonLdValue = string | number | boolean | null | JsonLdObject | JsonLdValue[];
29
+ interface JsonLdObject {
30
+ [key: string]: JsonLdValue;
31
+ }
32
+
33
+ function jsonLdScript(data: JsonLdObject): string {
29
34
  return `<script type="application/ld+json">${JSON.stringify(data)}</script>`;
30
35
  }
31
36
 
@@ -17,7 +17,12 @@ export function seo({
17
17
  canonicalUrl,
18
18
  noIndex = false,
19
19
  }: SeoOptions) {
20
- const meta: Array<Record<string, string>> = [{ title }];
20
+ type MetaTag =
21
+ | { title: string }
22
+ | { name: string; content: string }
23
+ | { property: string; content: string };
24
+
25
+ const meta: MetaTag[] = [{ title }];
21
26
 
22
27
  if (description) {
23
28
  meta.push({ name: "description", content: description });
@@ -47,7 +52,7 @@ export function seo({
47
52
  meta.push({ name: "twitter:image", content: ogImage });
48
53
  }
49
54
 
50
- const links: Array<Record<string, string>> = [];
55
+ const links: Array<{ rel: string; href: string }> = [];
51
56
  if (canonicalUrl) {
52
57
  links.push({ rel: "canonical", href: canonicalUrl });
53
58
  }
@@ -14,6 +14,9 @@ export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
14
14
  select: (state) => state.id === rootRouteId,
15
15
  });
16
16
 
17
+ const btnSecondary =
18
+ "px-4 py-2 bg-gray-700 text-white rounded-lg hover:bg-gray-600 transition-colors";
19
+
17
20
  return (
18
21
  <div className="min-h-screen flex items-center justify-center bg-gray-900 p-4">
19
22
  <div className="text-center">
@@ -26,17 +29,11 @@ export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
26
29
  Try Again
27
30
  </button>
28
31
  {isRoot ? (
29
- <a
30
- href="/"
31
- className="px-4 py-2 bg-gray-700 text-white rounded-lg hover:bg-gray-600 transition-colors"
32
- >
32
+ <a href="/" className={btnSecondary}>
33
33
  Home
34
34
  </a>
35
35
  ) : (
36
- <Link
37
- to="/"
38
- className="px-4 py-2 bg-gray-700 text-white rounded-lg hover:bg-gray-600 transition-colors"
39
- >
36
+ <Link to="/" className={btnSecondary}>
40
37
  Home
41
38
  </Link>
42
39
  )}