@cbnventures/nova 0.34.1 → 0.35.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.
Files changed (41) hide show
  1. package/build/package.json +1 -1
  2. package/build/src/types/tests/cli/scaffold/app/android.test.d.ts +2 -0
  3. package/build/src/types/tests/scaffold-output-contract.test.d.ts +27 -0
  4. package/build/templates/scaffold/app/android/package.json +1 -1
  5. package/build/templates/scaffold/app/apple/Sources/ContentView.swift +6 -6
  6. package/build/templates/scaffold/app/apple/Sources/Localizable.xcstrings +75 -0
  7. package/build/templates/scaffold/app/apple/package.json +1 -1
  8. package/build/templates/scaffold/app/astro/package.json +1 -1
  9. package/build/templates/scaffold/app/astro/src/i18n/en.json +48 -0
  10. package/build/templates/scaffold/app/astro/src/pages/index.astro +31 -30
  11. package/build/templates/scaffold/app/discord-bot/package.json +1 -1
  12. package/build/templates/scaffold/app/express/package.json +1 -1
  13. package/build/templates/scaffold/app/nextjs/package.json +1 -1
  14. package/build/templates/scaffold/app/nextjs/src/app/[lang]/dictionaries/en.json +31 -0
  15. package/build/templates/scaffold/app/nextjs/src/app/[lang]/dictionaries.ts +33 -0
  16. package/build/templates/scaffold/app/nextjs/src/app/[lang]/layout.tsx +92 -0
  17. package/build/templates/scaffold/app/nextjs/src/app/{page.tsx → [lang]/page.tsx} +54 -34
  18. package/build/templates/scaffold/app/nextjs/src/i18n/config.ts +42 -0
  19. package/build/templates/scaffold/app/nextjs/src/proxy.ts +56 -0
  20. package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/dictionaries.d.ts +21 -0
  21. package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/layout.d.ts +63 -0
  22. package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/page.d.ts +22 -0
  23. package/build/templates/scaffold/app/nextjs/src/types/i18n/config.d.ts +22 -0
  24. package/build/templates/scaffold/app/nextjs/src/types/proxy.d.ts +30 -0
  25. package/build/templates/scaffold/app/vite/package.json +1 -1
  26. package/build/templates/scaffold/docs/docusaurus/package.json +2 -2
  27. package/build/templates/scaffold/docs/docusaurus/src/pages/index.tsx +81 -20
  28. package/build/templates/scaffold/package/github-action/package.json +1 -1
  29. package/build/templates/scaffold/package/homebridge/package.json +1 -1
  30. package/build/templates/scaffold/package/pfsense/package.json +1 -1
  31. package/build/templates/scaffold-options/app/android-launchpad/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/ui/main/MainScreen.kt +40 -34
  32. package/build/templates/scaffold-options/app/android-native/app/src/main/res/values/strings.xml +27 -0
  33. package/build/templates/scaffold-options/app/astro/cloudflare/astro.config.mjs +7 -0
  34. package/build/templates/scaffold-options/app/astro/node/astro.config.mjs +7 -0
  35. package/build/templates/scaffold-options/app/astro/static/astro.config.mjs +7 -0
  36. package/build/templates/scaffold-options/tool/serverless/cloudflare-workers/package.json +1 -1
  37. package/build/templates/scaffold-options/tool/serverless/vercel-functions/package.json +1 -1
  38. package/package.json +1 -1
  39. package/build/templates/scaffold/app/nextjs/src/app/layout.tsx +0 -46
  40. package/build/templates/scaffold/app/nextjs/src/types/app/layout.d.ts +0 -25
  41. package/build/templates/scaffold/app/nextjs/src/types/app/page.d.ts +0 -8
@@ -1,99 +1,119 @@
1
- import type { App_Page_Home_Returns } from '../types/app/page.d.ts';
1
+ import { notFound } from 'next/navigation';
2
+
3
+ import { hasLocale } from '../../i18n/config';
4
+ import { getDictionary } from './dictionaries';
5
+
6
+ import type {
7
+ App_Lang_Page_Home_Dictionary,
8
+ App_Lang_Page_Home_Params,
9
+ App_Lang_Page_Home_Props,
10
+ App_Lang_Page_Home_Returns,
11
+ } from '../../types/app/[lang]/page.d.ts';
2
12
 
3
13
  /**
4
14
  * Page - Home.
5
15
  *
6
- * Renders the generated application landing page.
7
- * Replace this content as the first product routes are introduced.
16
+ * Renders the generated application landing page from the active locale's
17
+ * server-side dictionary.
18
+ *
19
+ * @param {App_Lang_Page_Home_Props} props - Props.
8
20
  *
9
- * @returns {App_Page_Home_Returns}
21
+ * @returns {App_Lang_Page_Home_Returns}
10
22
  *
11
23
  * @since 0.0.0
12
24
  */
13
- function Home(): App_Page_Home_Returns {
25
+ async function Home(props: App_Lang_Page_Home_Props): App_Lang_Page_Home_Returns {
26
+ const params: App_Lang_Page_Home_Params = await props['params'];
27
+
28
+ if (hasLocale(params['lang']) === false) {
29
+ notFound();
30
+ }
31
+
32
+ const dictionary: App_Lang_Page_Home_Dictionary = await getDictionary(params['lang']);
33
+
14
34
  return (
15
35
  <main className="nova-launchpad" data-nova-framework="nextjs">
16
36
  <div className="nova-launchpad__shell">
17
37
  <header className="nova-launchpad__header">
18
38
  <div className="nova-launchpad__brand">
19
39
  <svg className="nova-launchpad__mark" aria-hidden="true" viewBox="0 0 1024 1024"><use href="/nova-socials.svg#nova" /></svg>
20
- <span>Nova</span>
40
+ <span>{dictionary['brandNova']}</span>
21
41
  <span className="nova-launchpad__cross">×</span>
22
- <span>Next.js</span>
42
+ <span>{dictionary['brandFramework']}</span>
23
43
  </div>
24
44
  <a className="nova-launchpad__docs-link" href="https://nova.cbnventures.io/docs/quickstart/" target="_blank" rel="noreferrer">
25
- Read Nova Docs ↗
45
+ {dictionary['readNovaDocs']}
26
46
  </a>
27
47
  </header>
28
48
  <div className="nova-launchpad__body">
29
49
  <section>
30
50
  <h1 className="nova-launchpad__title">
31
- <span>Next.js</span>
32
- <span className="nova-launchpad__title-accent">starts here.</span>
51
+ <span>{dictionary['title']}</span>
52
+ <span className="nova-launchpad__title-accent">{dictionary['titleAccent']}</span>
33
53
  </h1>
34
54
  <p className="nova-launchpad__lede">
35
- A production-ready Next.js workspace with strict checks, tests, and a clean path from first edit to deployment.
55
+ {dictionary['description']}
36
56
  </p>
37
57
  <div className="nova-launchpad__actions">
38
58
  <a className="nova-launchpad__primary-link" href="https://nextjs.org/docs" target="_blank" rel="noreferrer">
39
- Explore Next.js docs ↗
59
+ {dictionary['exploreDocs']}
40
60
  </a>
41
61
  <span className="nova-launchpad__edit-hint">
42
- Start in
62
+ {dictionary['editHint']}
43
63
  {' '}
44
- <code>src/app/page.tsx</code>
64
+ <code>src/app/[lang]/page.tsx</code>
45
65
  </span>
46
66
  </div>
47
67
  </section>
48
- <aside className="nova-launchpad__sequence" aria-label="Launch sequence">
49
- <p className="nova-launchpad__sequence-label">Launch sequence</p>
68
+ <aside className="nova-launchpad__sequence" aria-label={dictionary['launchSequence']}>
69
+ <p className="nova-launchpad__sequence-label">{dictionary['launchSequence']}</p>
50
70
  <ol className="nova-launchpad__steps">
51
71
  <li className="nova-launchpad__step">
52
- <span className="nova-launchpad__step-number">01</span>
72
+ <span className="nova-launchpad__step-number">{dictionary['stepOneNumber']}</span>
53
73
  <div>
54
- <strong>Shape the experience</strong>
55
- <p>Replace this starter with your first real product experience.</p>
74
+ <strong>{dictionary['stepOneTitle']}</strong>
75
+ <p>{dictionary['stepOneDescription']}</p>
56
76
  </div>
57
77
  </li>
58
78
  <li className="nova-launchpad__step">
59
- <span className="nova-launchpad__step-number">02</span>
79
+ <span className="nova-launchpad__step-number">{dictionary['stepTwoNumber']}</span>
60
80
  <div>
61
- <strong>Keep the contract</strong>
62
- <p>Run the workspace checks while the project takes shape.</p>
81
+ <strong>{dictionary['stepTwoTitle']}</strong>
82
+ <p>{dictionary['stepTwoDescription']}</p>
63
83
  </div>
64
84
  </li>
65
85
  <li className="nova-launchpad__step">
66
- <span className="nova-launchpad__step-number">03</span>
86
+ <span className="nova-launchpad__step-number">{dictionary['stepThreeNumber']}</span>
67
87
  <div>
68
- <strong>Ship confidently</strong>
69
- <p>Build the same production artifact Nova already validates.</p>
88
+ <strong>{dictionary['stepThreeTitle']}</strong>
89
+ <p>{dictionary['stepThreeDescription']}</p>
70
90
  </div>
71
91
  </li>
72
92
  </ol>
73
93
  </aside>
74
94
  </div>
75
95
  <footer className="nova-launchpad__footer">
76
- <span>Generated with Nova</span>
77
- <nav className="nova-launchpad__socials" aria-label="CBN Ventures social media">
78
- <a className="nova-launchpad__social-link" href="https://www.facebook.com/cbnventures" target="_blank" rel="noreferrer" aria-label="Facebook">
96
+ <span>{dictionary['footerCredit']}</span>
97
+ <nav className="nova-launchpad__socials" aria-label={dictionary['socialLabel']}>
98
+ <a className="nova-launchpad__social-link" href="https://www.facebook.com/cbnventures" target="_blank" rel="noreferrer" aria-label={dictionary['facebook']}>
79
99
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#facebook" /></svg>
80
100
  </a>
81
- <a className="nova-launchpad__social-link" href="https://x.com/cbnventures" target="_blank" rel="noreferrer" aria-label="X">
101
+ <a className="nova-launchpad__social-link" href="https://x.com/cbnventures" target="_blank" rel="noreferrer" aria-label={dictionary['x']}>
82
102
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#x" /></svg>
83
103
  </a>
84
- <a className="nova-launchpad__social-link" href="https://www.youtube.com/@cbnventures" target="_blank" rel="noreferrer" aria-label="YouTube">
104
+ <a className="nova-launchpad__social-link" href="https://www.youtube.com/@cbnventures" target="_blank" rel="noreferrer" aria-label={dictionary['youtube']}>
85
105
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#youtube" /></svg>
86
106
  </a>
87
- <a className="nova-launchpad__social-link" href="https://www.instagram.com/cbnventures/" target="_blank" rel="noreferrer" aria-label="Instagram">
107
+ <a className="nova-launchpad__social-link" href="https://www.instagram.com/cbnventures/" target="_blank" rel="noreferrer" aria-label={dictionary['instagram']}>
88
108
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#instagram" /></svg>
89
109
  </a>
90
- <a className="nova-launchpad__social-link" href="https://github.com/cbnventures" target="_blank" rel="noreferrer" aria-label="GitHub">
110
+ <a className="nova-launchpad__social-link" href="https://github.com/cbnventures" target="_blank" rel="noreferrer" aria-label={dictionary['github']}>
91
111
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#github" /></svg>
92
112
  </a>
93
- <a className="nova-launchpad__social-link" href="https://play.google.com/store/apps/dev?id=6419450160526226105" target="_blank" rel="noreferrer" aria-label="Google Play">
113
+ <a className="nova-launchpad__social-link" href="https://play.google.com/store/apps/dev?id=6419450160526226105" target="_blank" rel="noreferrer" aria-label={dictionary['googlePlay']}>
94
114
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#google-play" /></svg>
95
115
  </a>
96
- <a className="nova-launchpad__social-link" href="https://www.linkedin.com/company/cbnventures/" target="_blank" rel="noreferrer" aria-label="LinkedIn">
116
+ <a className="nova-launchpad__social-link" href="https://www.linkedin.com/company/cbnventures/" target="_blank" rel="noreferrer" aria-label={dictionary['linkedin']}>
97
117
  <svg className="nova-launchpad__social-icon" aria-hidden="true"><use href="/nova-socials.svg#linkedin" /></svg>
98
118
  </a>
99
119
  </nav>
@@ -0,0 +1,42 @@
1
+ import type {
2
+ I18n_Config_DefaultLocale,
3
+ I18n_Config_HasLocale_Locale,
4
+ I18n_Config_HasLocale_TypeGuard,
5
+ I18n_Config_Locales,
6
+ } from '../types/i18n/config.d.ts';
7
+
8
+ /**
9
+ * Config - Default Locale.
10
+ *
11
+ * Keeps English available before consumers add translated dictionaries.
12
+ * Acts as the destination for requests without a supported locale prefix.
13
+ *
14
+ * @since 0.0.0
15
+ */
16
+ export const defaultLocale: I18n_Config_DefaultLocale = 'en';
17
+
18
+ /**
19
+ * Config - Locales.
20
+ *
21
+ * Defines the locale routes generated by the application.
22
+ * Consumers extend this list alongside their server-side dictionaries.
23
+ *
24
+ * @since 0.0.0
25
+ */
26
+ export const locales: I18n_Config_Locales = ['en'];
27
+
28
+ /**
29
+ * Config - Has Locale.
30
+ *
31
+ * Narrows an incoming route segment to a supported application locale.
32
+ * Keeps route validation synchronized with the configured locale list.
33
+ *
34
+ * @param {I18n_Config_HasLocale_Locale} locale - Locale.
35
+ *
36
+ * @returns {I18n_Config_HasLocale_TypeGuard}
37
+ *
38
+ * @since 0.0.0
39
+ */
40
+ export function hasLocale(locale: I18n_Config_HasLocale_Locale): locale is I18n_Config_HasLocale_TypeGuard {
41
+ return locales.some((supportedLocale) => supportedLocale === locale);
42
+ }
@@ -0,0 +1,56 @@
1
+ import { NextResponse } from 'next/server';
2
+
3
+ import {
4
+ defaultLocale,
5
+ locales,
6
+ } from './i18n/config';
7
+
8
+ import type {
9
+ Proxy_Config,
10
+ Proxy_LocalizeRequest_Pathname,
11
+ Proxy_LocalizeRequest_PathnameHasLocale,
12
+ Proxy_LocalizeRequest_Request,
13
+ Proxy_LocalizeRequest_Returns,
14
+ Proxy_LocalizeRequest_Url,
15
+ } from './types/proxy.d.ts';
16
+
17
+ /**
18
+ * Proxy - Config.
19
+ *
20
+ * Runs locale routing for application pages while leaving framework internals
21
+ * and static files untouched.
22
+ *
23
+ * @since 0.0.0
24
+ */
25
+ export const config: Proxy_Config = {
26
+ matcher: ['/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|.*\\..*).*)'],
27
+ };
28
+
29
+ /**
30
+ * Proxy - Localize Request.
31
+ *
32
+ * Keeps an existing supported locale route or redirects to the English route.
33
+ * Consumers can add browser-language negotiation when they add more locales.
34
+ *
35
+ * @param {Proxy_LocalizeRequest_Request} request - Request.
36
+ *
37
+ * @returns {Proxy_LocalizeRequest_Returns}
38
+ *
39
+ * @since 0.0.0
40
+ */
41
+ function localizeRequest(request: Proxy_LocalizeRequest_Request): Proxy_LocalizeRequest_Returns {
42
+ const pathname: Proxy_LocalizeRequest_Pathname = request.nextUrl.pathname;
43
+ const pathnameHasLocale: Proxy_LocalizeRequest_PathnameHasLocale = locales.some((locale) => pathname === `/${locale}` || pathname.startsWith(`/${locale}/`));
44
+
45
+ if (pathnameHasLocale === true) {
46
+ return NextResponse.next();
47
+ }
48
+
49
+ const url: Proxy_LocalizeRequest_Url = request.nextUrl.clone();
50
+
51
+ url.pathname = `/${defaultLocale}${pathname}`;
52
+
53
+ return NextResponse.redirect(url);
54
+ }
55
+
56
+ export default localizeRequest;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Dictionaries.
3
+ *
4
+ * @since 0.0.0
5
+ */
6
+ export type App_Lang_Dictionaries_Dictionaries_Dictionary = Record<string, string>;
7
+
8
+ export type App_Lang_Dictionaries_Dictionaries_Loader_Returns = Promise<App_Lang_Dictionaries_Dictionaries_Dictionary>;
9
+
10
+ export type App_Lang_Dictionaries_Dictionaries_Loader = () => App_Lang_Dictionaries_Dictionaries_Loader_Returns;
11
+
12
+ export type App_Lang_Dictionaries_Dictionaries = Record<'en', App_Lang_Dictionaries_Dictionaries_Loader>;
13
+
14
+ /**
15
+ * Dictionaries.
16
+ *
17
+ * @since 0.0.0
18
+ */
19
+ export type App_Lang_Dictionaries_GetDictionary_Locale = keyof App_Lang_Dictionaries_Dictionaries;
20
+
21
+ export type App_Lang_Dictionaries_GetDictionary_Returns = Promise<App_Lang_Dictionaries_Dictionaries_Dictionary>;
@@ -0,0 +1,63 @@
1
+ import type { Metadata } from 'next';
2
+ import type {
3
+ ReactElement,
4
+ ReactNode,
5
+ } from 'react';
6
+
7
+ /**
8
+ * Layout.
9
+ *
10
+ * @since 0.0.0
11
+ */
12
+ export type App_Lang_Layout_GenerateMetadata_Props_Params_Lang = string;
13
+
14
+ export type App_Lang_Layout_GenerateMetadata_Props_Params = {
15
+ lang: App_Lang_Layout_GenerateMetadata_Props_Params_Lang;
16
+ };
17
+
18
+ export type App_Lang_Layout_GenerateMetadata_Props = {
19
+ params: Promise<App_Lang_Layout_GenerateMetadata_Props_Params>;
20
+ };
21
+
22
+ export type App_Lang_Layout_GenerateMetadata_Returns = Promise<Metadata>;
23
+
24
+ export type App_Lang_Layout_GenerateMetadata_Params = App_Lang_Layout_GenerateMetadata_Props_Params;
25
+
26
+ export type App_Lang_Layout_GenerateMetadata_Dictionary = Record<string, string>;
27
+
28
+ /**
29
+ * Layout.
30
+ *
31
+ * @since 0.0.0
32
+ */
33
+ export type App_Lang_Layout_GenerateStaticParams_Returns = App_Lang_Layout_GenerateStaticParams_StaticParams;
34
+
35
+ export type App_Lang_Layout_GenerateStaticParams_StaticParam_Lang = 'en';
36
+
37
+ export type App_Lang_Layout_GenerateStaticParams_StaticParam = {
38
+ lang: App_Lang_Layout_GenerateStaticParams_StaticParam_Lang;
39
+ };
40
+
41
+ export type App_Lang_Layout_GenerateStaticParams_StaticParams = App_Lang_Layout_GenerateStaticParams_StaticParam[];
42
+
43
+ /**
44
+ * Layout.
45
+ *
46
+ * @since 0.0.0
47
+ */
48
+ export type App_Lang_Layout_RootLayout_Props_Children = ReactNode;
49
+
50
+ export type App_Lang_Layout_RootLayout_Props_Params_Lang = string;
51
+
52
+ export type App_Lang_Layout_RootLayout_Props_Params = {
53
+ lang: App_Lang_Layout_RootLayout_Props_Params_Lang;
54
+ };
55
+
56
+ export type App_Lang_Layout_RootLayout_Props = {
57
+ children: App_Lang_Layout_RootLayout_Props_Children;
58
+ params: Promise<App_Lang_Layout_RootLayout_Props_Params>;
59
+ };
60
+
61
+ export type App_Lang_Layout_RootLayout_Returns = Promise<ReactElement>;
62
+
63
+ export type App_Lang_Layout_RootLayout_Params = App_Lang_Layout_RootLayout_Props_Params;
@@ -0,0 +1,22 @@
1
+ import type { ReactElement } from 'react';
2
+
3
+ /**
4
+ * Page.
5
+ *
6
+ * @since 0.0.0
7
+ */
8
+ export type App_Lang_Page_Home_Props_Params_Lang = string;
9
+
10
+ export type App_Lang_Page_Home_Props_Params = {
11
+ lang: App_Lang_Page_Home_Props_Params_Lang;
12
+ };
13
+
14
+ export type App_Lang_Page_Home_Props = {
15
+ params: Promise<App_Lang_Page_Home_Props_Params>;
16
+ };
17
+
18
+ export type App_Lang_Page_Home_Returns = Promise<ReactElement>;
19
+
20
+ export type App_Lang_Page_Home_Params = App_Lang_Page_Home_Props_Params;
21
+
22
+ export type App_Lang_Page_Home_Dictionary = Record<string, string>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Config.
3
+ *
4
+ * @since 0.0.0
5
+ */
6
+ export type I18n_Config_DefaultLocale = 'en';
7
+
8
+ /**
9
+ * Config.
10
+ *
11
+ * @since 0.0.0
12
+ */
13
+ export type I18n_Config_HasLocale_Locale = string;
14
+
15
+ export type I18n_Config_HasLocale_TypeGuard = I18n_Config_DefaultLocale;
16
+
17
+ /**
18
+ * Config.
19
+ *
20
+ * @since 0.0.0
21
+ */
22
+ export type I18n_Config_Locales = readonly I18n_Config_DefaultLocale[];
@@ -0,0 +1,30 @@
1
+ import type {
2
+ NextRequest,
3
+ NextResponse,
4
+ } from 'next/server';
5
+
6
+ /**
7
+ * Proxy - Config.
8
+ *
9
+ * @since 0.0.0
10
+ */
11
+ export type Proxy_Config_Matcher = string[];
12
+
13
+ export type Proxy_Config = {
14
+ matcher: Proxy_Config_Matcher;
15
+ };
16
+
17
+ /**
18
+ * Proxy - Localize Request.
19
+ *
20
+ * @since 0.0.0
21
+ */
22
+ export type Proxy_LocalizeRequest_Request = NextRequest;
23
+
24
+ export type Proxy_LocalizeRequest_Returns = NextResponse;
25
+
26
+ export type Proxy_LocalizeRequest_Pathname = string;
27
+
28
+ export type Proxy_LocalizeRequest_PathnameHasLocale = boolean;
29
+
30
+ export type Proxy_LocalizeRequest_Url = NextRequest['nextUrl'];
@@ -22,7 +22,7 @@
22
22
  "node": "[__SCAFFOLD_VERSION_NODE_ENGINE__]"
23
23
  },
24
24
  "dependencies": {
25
- "@cbnventures/nova": "0.34.1"
25
+ "@cbnventures/nova": "0.35.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "[__SCAFFOLD_VERSION_TYPES_NODE_22__]",
@@ -27,8 +27,8 @@
27
27
  "node": "[__SCAFFOLD_VERSION_NODE_ENGINE__]"
28
28
  },
29
29
  "dependencies": {
30
- "@cbnventures/docusaurus-preset-nova": "0.34.1",
31
- "@cbnventures/nova": "0.34.1",
30
+ "@cbnventures/docusaurus-preset-nova": "0.35.0",
31
+ "@cbnventures/nova": "0.35.0",
32
32
  "@docusaurus/core": "[__SCAFFOLD_VERSION_DOCUSAURUS__]",
33
33
  "react": "[__SCAFFOLD_VERSION_REACT__]",
34
34
  "react-dom": "[__SCAFFOLD_VERSION_REACT_DOM__]"
@@ -4,6 +4,7 @@ import {
4
4
  Hero,
5
5
  Stats,
6
6
  } from '@cbnventures/docusaurus-preset-nova/blocks';
7
+ import { translate } from '@docusaurus/Translate';
7
8
  import Layout from '@theme/Layout';
8
9
 
9
10
  import type {
@@ -35,66 +36,126 @@ function Home(): Pages_Index_Home_Returns {
35
36
  return (
36
37
  <Layout>
37
38
  <Hero
38
- eyebrow="Nova × Docusaurus"
39
- heading="Docusaurus starts here."
40
- tagline="A documentation workspace with a cohesive Nova preset, strict checks, local search, and room to grow."
41
- ctaLabel="Read the introduction"
39
+ eyebrow={translate({
40
+ id: 'homepage.hero.eyebrow',
41
+ message: 'Nova × Docusaurus',
42
+ })}
43
+ heading={translate({
44
+ id: 'homepage.hero.heading',
45
+ message: 'Docusaurus starts here.',
46
+ })}
47
+ tagline={translate({
48
+ id: 'homepage.hero.tagline',
49
+ message: 'A documentation workspace with a cohesive Nova preset, strict checks, local search, and room to grow.',
50
+ })}
51
+ ctaLabel={translate({
52
+ id: 'homepage.hero.ctaLabel',
53
+ message: 'Read the introduction',
54
+ })}
42
55
  ctaLink="/docs/intro"
43
- secondaryCtaLabel="Read Nova Docs"
56
+ secondaryCtaLabel={translate({
57
+ id: 'homepage.hero.secondaryCtaLabel',
58
+ message: 'Read Nova Docs',
59
+ })}
44
60
  secondaryCtaLink="https://nova.cbnventures.io/docs/quickstart/"
45
61
  />
46
62
  <main id="components">
47
63
  <Stats
48
- heading="Ready from the first build"
49
- description="The generated workspace demonstrates the preset instead of leaving its most useful surfaces empty."
64
+ heading={translate({
65
+ id: 'homepage.stats.heading',
66
+ message: 'Ready from the first build',
67
+ })}
68
+ description={translate({
69
+ id: 'homepage.stats.description',
70
+ message: 'The generated workspace demonstrates the preset instead of leaving its most useful surfaces empty.',
71
+ })}
50
72
  surface="alt"
51
73
  items={[
52
74
  {
53
75
  value: '6',
54
- label: 'Visual presets',
76
+ label: translate({
77
+ id: 'homepage.stats.visualPresets',
78
+ message: 'Visual presets',
79
+ }),
55
80
  color: 'primary',
56
81
  },
57
82
  {
58
83
  value: '1',
59
- label: 'Local search index',
84
+ label: translate({
85
+ id: 'homepage.stats.localSearchIndex',
86
+ message: 'Local search index',
87
+ }),
60
88
  color: 'accent',
61
89
  },
62
90
  {
63
91
  value: '0',
64
- label: 'Swizzles required',
92
+ label: translate({
93
+ id: 'homepage.stats.swizzlesRequired',
94
+ message: 'Swizzles required',
95
+ }),
65
96
  color: 'primary',
66
97
  },
67
98
  {
68
99
  value: '100%',
69
- label: 'TypeScript configured',
100
+ label: translate({
101
+ id: 'homepage.stats.typescriptConfigured',
102
+ message: 'TypeScript configured',
103
+ }),
70
104
  color: 'accent',
71
105
  },
72
106
  ]}
73
107
  />
74
108
  <Features
75
- heading="A complete documentation starting point"
109
+ heading={translate({
110
+ id: 'homepage.features.heading',
111
+ message: 'A complete documentation starting point',
112
+ })}
76
113
  items={[
77
114
  {
78
115
  icon: 'lucide:pencil',
79
- title: 'Write',
80
- description: 'Start with the sample guides and grow the sidebar around the way your readers think.',
116
+ title: translate({
117
+ id: 'homepage.features.write.title',
118
+ message: 'Write',
119
+ }),
120
+ description: translate({
121
+ id: 'homepage.features.write.description',
122
+ message: 'Start with the sample guides and grow the sidebar around the way your readers think.',
123
+ }),
81
124
  },
82
125
  {
83
126
  icon: 'lucide:compass',
84
- title: 'Navigate',
85
- description: 'Use the populated navbar, footer, search, and sidebar as a real information architecture.',
127
+ title: translate({
128
+ id: 'homepage.features.navigate.title',
129
+ message: 'Navigate',
130
+ }),
131
+ description: translate({
132
+ id: 'homepage.features.navigate.description',
133
+ message: 'Use the populated navbar, footer, search, and sidebar as a real information architecture.',
134
+ }),
86
135
  },
87
136
  {
88
137
  icon: 'lucide:rocket',
89
- title: 'Publish',
90
- description: 'Build the same optimized and searchable documentation site Nova validates locally and in automation.',
138
+ title: translate({
139
+ id: 'homepage.features.publish.title',
140
+ message: 'Publish',
141
+ }),
142
+ description: translate({
143
+ id: 'homepage.features.publish.description',
144
+ message: 'Build the same optimized and searchable documentation site Nova validates locally and in automation.',
145
+ }),
91
146
  },
92
147
  ]}
93
148
  />
94
149
  {(blogEnabled === true) && (
95
150
  <BlogPreview
96
- heading="From the starter blog"
97
- description="The most recent posts appear automatically when the docs-and-blog content model is selected."
151
+ heading={translate({
152
+ id: 'homepage.blog.heading',
153
+ message: 'From the starter blog',
154
+ })}
155
+ description={translate({
156
+ id: 'homepage.blog.description',
157
+ message: 'The most recent posts appear automatically when the docs-and-blog content model is selected.',
158
+ })}
98
159
  auto={true}
99
160
  limit={3}
100
161
  sort="newest"
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@actions/core": "[__SCAFFOLD_VERSION_ACTIONS_CORE__]",
29
- "@cbnventures/nova": "0.34.1"
29
+ "@cbnventures/nova": "0.35.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@github/local-action": "[__SCAFFOLD_VERSION_GITHUB_LOCAL_ACTION__]",
@@ -43,7 +43,7 @@
43
43
  "node": "[__SCAFFOLD_VERSION_NODE_ENGINE__]"
44
44
  },
45
45
  "dependencies": {
46
- "@cbnventures/nova": "0.34.1"
46
+ "@cbnventures/nova": "0.35.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "[__SCAFFOLD_VERSION_TYPES_NODE_24__]",
@@ -29,7 +29,7 @@
29
29
  "node": "[__SCAFFOLD_VERSION_NODE_ENGINE_PFSENSE__]"
30
30
  },
31
31
  "dependencies": {
32
- "@cbnventures/nova": "0.34.1"
32
+ "@cbnventures/nova": "0.35.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "[__SCAFFOLD_VERSION_TYPES_NODE_24__]",