create-waku 0.10.0 → 0.10.2
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 +2 -2
- package/template/01_template/package.json +7 -7
- package/template/01_template/src/pages/_layout.tsx +9 -14
- package/template/01_template/tsconfig.tsbuildinfo +1 -0
- package/template/02_template_js/package.json +5 -5
- package/template/02_template_js/src/pages/_layout.jsx +9 -14
- package/template/03_demo/package.json +7 -7
- package/template/03_demo/src/pages/[slug].tsx +3 -1
- package/template/03_demo/src/pages/_layout.tsx +9 -14
- package/template/03_demo/tsconfig.json +1 -1
- package/template/03_demo/tsconfig.tsbuildinfo +1 -0
- package/template/04_cssmodules/package.json +6 -6
- package/template/04_cssmodules/src/pages/_layout.tsx +7 -12
- package/template/04_cssmodules/src/types.d.ts +1 -0
- package/template/04_cssmodules/tsconfig.tsbuildinfo +1 -0
- package/template/{11_form → 11_fs-router}/package.json +6 -6
- package/template/11_fs-router/src/pages/_layout.tsx +72 -0
- package/template/11_fs-router/src/pages/_root.tsx +20 -0
- package/template/11_fs-router/tsconfig.tsbuildinfo +1 -0
- package/template/{05_nossr → 12_nossr}/package.json +8 -8
- package/template/{05_nossr → 12_nossr}/src/pages/_layout.tsx +9 -14
- package/template/12_nossr/tsconfig.tsbuildinfo +1 -0
- package/template/{05_nossr → 12_nossr}/waku.config.ts +1 -0
- package/template/{25_weave_render → 21_create-pages}/package.json +6 -6
- package/template/21_create-pages/src/components/HomeLayout.tsx +65 -0
- package/template/21_create-pages/src/components/Root.tsx +12 -0
- package/template/{07_router → 21_create-pages}/src/entries.tsx +11 -8
- package/template/21_create-pages/tsconfig.tsbuildinfo +1 -0
- package/template/{10_fs-router → 22_define-router}/package.json +6 -6
- package/template/22_define-router/src/components/Counter.tsx +20 -0
- package/template/22_define-router/src/components/FooPage.tsx +10 -0
- package/template/22_define-router/src/components/HomeLayout.tsx +53 -0
- package/template/22_define-router/src/components/NestedBazPage.tsx +8 -0
- package/template/22_define-router/src/components/Root.tsx +12 -0
- package/template/22_define-router/src/entries.tsx +156 -0
- package/template/22_define-router/src/main.tsx +15 -0
- package/template/22_define-router/tsconfig.tsbuildinfo +1 -0
- package/template/{20_minimal → 31_minimal}/package.json +6 -6
- package/template/31_minimal/src/entries.tsx +18 -0
- package/template/31_minimal/tsconfig.tsbuildinfo +1 -0
- package/template/31_minimal/waku.config.ts +12 -0
- package/template/{21_minimal_js → 32_minimal_js}/package.json +4 -4
- package/template/{21_minimal_js → 32_minimal_js}/src/entries.jsx +4 -4
- package/template/{09_api → 33_promise}/package.json +6 -6
- package/template/{22_promise → 33_promise}/src/entries.tsx +5 -7
- package/template/33_promise/tsconfig.tsbuildinfo +1 -0
- package/template/{23_actions → 34_functions}/package.json +6 -6
- package/template/34_functions/src/als.ts +16 -0
- package/template/{23_actions → 34_functions}/src/components2/funcs.ts +1 -5
- package/template/{23_actions → 34_functions}/src/components2/funcs2.ts +2 -2
- package/template/34_functions/src/entries.tsx +29 -0
- package/template/34_functions/tsconfig.json +15 -0
- package/template/34_functions/tsconfig.tsbuildinfo +1 -0
- package/template/34_functions/waku.config.ts +12 -0
- package/template/35_nesting/package.json +22 -0
- package/template/{24_nesting → 35_nesting}/src/components/Counter.tsx +1 -1
- package/template/{24_nesting → 35_nesting}/src/entries.tsx +10 -10
- package/template/{24_nesting → 35_nesting}/src/main.tsx +1 -1
- package/template/35_nesting/tsconfig.tsbuildinfo +1 -0
- package/template/36_form/package.json +22 -0
- package/template/{20_minimal → 36_form}/src/entries.tsx +4 -5
- package/template/36_form/tsconfig.tsbuildinfo +1 -0
- package/template/{12_css → 37_css}/package.json +8 -8
- package/template/{12_css → 37_css}/src/entries.tsx +4 -4
- package/template/37_css/tsconfig.tsbuildinfo +1 -0
- package/template/38_cookies/package.json +26 -0
- package/template/{08_cookies → 38_cookies}/src/entries.tsx +4 -4
- package/template/38_cookies/tsconfig.tsbuildinfo +1 -0
- package/template/{08_cookies → 38_cookies}/waku.config.ts +1 -1
- package/template/39_api/package.json +22 -0
- package/template/{09_api → 39_api}/src/entries.tsx +4 -4
- package/template/39_api/tsconfig.tsbuildinfo +1 -0
- package/template/{09_api → 39_api}/waku.config.ts +1 -1
- package/template/{13_path-alias → 41_path-alias}/package.json +7 -7
- package/template/{23_actions → 41_path-alias}/src/entries.tsx +5 -6
- package/template/41_path-alias/tsconfig.tsbuildinfo +1 -0
- package/template/{14_react-tweet → 42_react-tweet}/package.json +7 -7
- package/template/{14_react-tweet → 42_react-tweet}/src/templates/root-layout.tsx +9 -14
- package/template/42_react-tweet/tsconfig.tsbuildinfo +1 -0
- package/template/{07_router → 43_weave-render}/package.json +6 -6
- package/template/43_weave-render/src/components/BarLayout.tsx +57 -0
- package/template/43_weave-render/src/components/BarPage.tsx +10 -0
- package/template/{25_weave_render → 43_weave-render}/src/components/HomeLayout.tsx +1 -1
- package/template/43_weave-render/src/components/HomePage.tsx +8 -0
- package/template/{25_weave_render → 43_weave-render}/src/entries.tsx +2 -5
- package/template/43_weave-render/src/styles.css +3 -0
- package/template/43_weave-render/tsconfig.tsbuildinfo +1 -0
- package/template/07_router/src/components/HomeLayout.tsx +0 -72
- package/template/08_cookies/package.json +0 -26
- package/template/10_fs-router/src/pages/_layout.tsx +0 -77
- package/template/11_form/src/entries.tsx +0 -28
- package/template/13_path-alias/src/entries.tsx +0 -28
- package/template/22_promise/package.json +0 -22
- package/template/24_nesting/package.json +0 -22
- package/template/25_weave_render/src/components/BarLayout.tsx +0 -64
- /package/template/{10_fs-router → 11_fs-router}/src/components/Counter.tsx +0 -0
- /package/template/{10_fs-router → 11_fs-router}/src/entries.tsx +0 -0
- /package/template/{07_router → 11_fs-router}/src/main.tsx +0 -0
- /package/template/{10_fs-router → 11_fs-router}/src/pages/bar.tsx +0 -0
- /package/template/{10_fs-router → 11_fs-router}/src/pages/foo/index.tsx +0 -0
- /package/template/{10_fs-router → 11_fs-router}/src/pages/index.tsx +0 -0
- /package/template/{10_fs-router → 11_fs-router}/src/pages/nested/[name].tsx +0 -0
- /package/template/{05_nossr → 11_fs-router}/tsconfig.json +0 -0
- /package/template/{05_nossr → 12_nossr}/gitignore +0 -0
- /package/template/{05_nossr → 12_nossr}/postcss.config.js +0 -0
- /package/template/{05_nossr → 12_nossr}/public/images/favicon.png +0 -0
- /package/template/{05_nossr → 12_nossr}/src/components/counter.tsx +0 -0
- /package/template/{05_nossr → 12_nossr}/src/components/footer.tsx +0 -0
- /package/template/{05_nossr → 12_nossr}/src/components/header.tsx +0 -0
- /package/template/{05_nossr → 12_nossr}/src/entries.ts +0 -0
- /package/template/{05_nossr → 12_nossr}/src/pages/about.tsx +0 -0
- /package/template/{05_nossr → 12_nossr}/src/pages/index.tsx +0 -0
- /package/template/{05_nossr → 12_nossr}/src/styles.css +0 -0
- /package/template/{05_nossr → 12_nossr}/tailwind.config.js +0 -0
- /package/template/{07_router → 12_nossr}/tsconfig.json +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/BarPage.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/Counter.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/FooPage.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/HomePage.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/NestedBazPage.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/NestedQuxPage.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/components/funcs.ts +0 -0
- /package/template/{10_fs-router → 21_create-pages}/src/main.tsx +0 -0
- /package/template/{07_router → 21_create-pages}/src/styles.css +0 -0
- /package/template/{09_api → 21_create-pages}/tsconfig.json +0 -0
- /package/template/{25_weave_render → 22_define-router}/src/components/BarPage.tsx +0 -0
- /package/template/{25_weave_render → 22_define-router}/src/components/HomePage.tsx +0 -0
- /package/template/{25_weave_render → 22_define-router}/src/styles.css +0 -0
- /package/template/{10_fs-router → 22_define-router}/tsconfig.json +0 -0
- /package/template/{20_minimal → 31_minimal}/public/404.html +0 -0
- /package/template/{20_minimal → 31_minimal}/src/components/App.tsx +0 -0
- /package/template/{08_cookies → 31_minimal}/src/components/Counter.tsx +0 -0
- /package/template/{08_cookies → 31_minimal}/src/main.tsx +0 -0
- /package/template/{11_form → 31_minimal}/tsconfig.json +0 -0
- /package/template/{21_minimal_js → 32_minimal_js}/public/404.html +0 -0
- /package/template/{21_minimal_js → 32_minimal_js}/src/components/app.jsx +0 -0
- /package/template/{21_minimal_js → 32_minimal_js}/src/components/counter.jsx +0 -0
- /package/template/{21_minimal_js → 32_minimal_js}/src/main.jsx +0 -0
- /package/template/{22_promise → 33_promise}/src/components/App.tsx +0 -0
- /package/template/{22_promise → 33_promise}/src/components/Counter.tsx +0 -0
- /package/template/{22_promise → 33_promise}/src/components/Hello.tsx +0 -0
- /package/template/{22_promise → 33_promise}/src/main.tsx +0 -0
- /package/template/{12_css → 33_promise}/tsconfig.json +0 -0
- /package/template/{23_actions → 34_functions}/src/components2/App.tsx +0 -0
- /package/template/{23_actions → 34_functions}/src/components2/ButtonClient.tsx +0 -0
- /package/template/{23_actions → 34_functions}/src/components2/ButtonServer.tsx +0 -0
- /package/template/{23_actions → 34_functions}/src/components2/Counter.tsx +0 -0
- /package/template/{23_actions → 34_functions}/src/components2/TextBox.tsx +0 -0
- /package/template/{09_api → 34_functions}/src/main.tsx +0 -0
- /package/template/{24_nesting → 35_nesting}/src/components/App.tsx +0 -0
- /package/template/{24_nesting → 35_nesting}/src/components/AppWithoutSsr.tsx +0 -0
- /package/template/{24_nesting → 35_nesting}/src/components/CounterWithoutSsr.tsx +0 -0
- /package/template/{24_nesting → 35_nesting}/src/components/InnerApp.tsx +0 -0
- /package/template/{14_react-tweet → 35_nesting}/tsconfig.json +0 -0
- /package/template/{11_form → 36_form}/src/components/App.tsx +0 -0
- /package/template/{11_form → 36_form}/src/components/Counter.tsx +0 -0
- /package/template/{11_form → 36_form}/src/components/Form.tsx +0 -0
- /package/template/{11_form → 36_form}/src/components/ServerForm.tsx +0 -0
- /package/template/{11_form → 36_form}/src/components/funcs.ts +0 -0
- /package/template/{11_form → 36_form}/src/main.tsx +0 -0
- /package/template/{20_minimal → 36_form}/tsconfig.json +0 -0
- /package/template/{12_css → 37_css}/src/components/ClientBanner.tsx +0 -0
- /package/template/{12_css → 37_css}/src/components/app.css +0 -0
- /package/template/{12_css → 37_css}/src/components/app.module.css +0 -0
- /package/template/{12_css → 37_css}/src/components/app.tsx +0 -0
- /package/template/{12_css → 37_css}/src/components/banner.tsx +0 -0
- /package/template/{12_css → 37_css}/src/components/counter.tsx +0 -0
- /package/template/{12_css → 37_css}/src/components/layout.styles.css +0 -0
- /package/template/{12_css → 37_css}/src/components/layout.tsx +0 -0
- /package/template/{12_css → 37_css}/src/components/styles.css.ts +0 -0
- /package/template/{12_css → 37_css}/src/main.tsx +0 -0
- /package/template/{12_css → 37_css}/src/type.d.ts +0 -0
- /package/template/{22_promise → 37_css}/tsconfig.json +0 -0
- /package/template/{12_css → 37_css}/vite.config.ts +0 -0
- /package/template/{08_cookies → 38_cookies}/private/items.json +0 -0
- /package/template/{08_cookies → 38_cookies}/src/components/App.tsx +0 -0
- /package/template/{20_minimal → 38_cookies}/src/components/Counter.tsx +0 -0
- /package/template/{13_path-alias → 38_cookies}/src/main.tsx +0 -0
- /package/template/{08_cookies → 38_cookies}/src/middleware/cookie.ts +0 -0
- /package/template/{08_cookies → 38_cookies}/tsconfig.json +0 -0
- /package/template/{09_api → 39_api}/src/components/App.tsx +0 -0
- /package/template/{09_api → 39_api}/src/components/Counter.tsx +0 -0
- /package/template/{20_minimal → 39_api}/src/main.tsx +0 -0
- /package/template/{09_api → 39_api}/src/middleware/api.ts +0 -0
- /package/template/{23_actions → 39_api}/tsconfig.json +0 -0
- /package/template/{13_path-alias → 41_path-alias}/src/components/App.tsx +0 -0
- /package/template/{13_path-alias → 41_path-alias}/src/components/Counter.tsx +0 -0
- /package/template/{13_path-alias → 41_path-alias}/src/components/MyFragment.tsx +0 -0
- /package/template/{23_actions → 41_path-alias}/src/main.tsx +0 -0
- /package/template/{13_path-alias → 41_path-alias}/tsconfig.json +0 -0
- /package/template/{13_path-alias → 41_path-alias}/vite.config.ts +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/gitignore +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/postcss.config.js +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/public/images/favicon.png +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/components/footer.tsx +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/components/header.tsx +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/entries.tsx +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/main.tsx +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/styles.css +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/src/templates/home-page.tsx +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/tailwind.config.js +0 -0
- /package/template/{24_nesting → 42_react-tweet}/tsconfig.json +0 -0
- /package/template/{14_react-tweet → 42_react-tweet}/vite.config.ts +0 -0
- /package/template/{25_weave_render → 43_weave-render}/src/components/Counter.tsx +0 -0
- /package/template/{25_weave_render → 43_weave-render}/src/components/FooLayout.tsx +0 -0
- /package/template/{25_weave_render → 43_weave-render}/src/components/FooPage.tsx +0 -0
- /package/template/{25_weave_render → 43_weave-render}/src/main.tsx +0 -0
- /package/template/{25_weave_render → 43_weave-render}/tsconfig.json +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-waku",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"author": "Daishi Kato",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"contributors": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@types/fs-extra": "^11.0.4",
|
|
23
23
|
"@types/prompts": "^2.4.9",
|
|
24
24
|
"@types/tar": "^6.1.13",
|
|
25
|
-
"@vercel/ncc": "
|
|
25
|
+
"@vercel/ncc": "0.38.2",
|
|
26
26
|
"fs-extra": "^11.2.0",
|
|
27
27
|
"kolorist": "^1.8.0",
|
|
28
28
|
"prompts": "^2.4.2",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.6.
|
|
21
|
+
"tailwindcss": "3.4.14",
|
|
22
|
+
"typescript": "5.6.3"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -11,20 +11,15 @@ export default async function RootLayout({ children }: RootLayoutProps) {
|
|
|
11
11
|
const data = await getData();
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</main>
|
|
24
|
-
<Footer />
|
|
25
|
-
</div>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
14
|
+
<div className="font-['Nunito']">
|
|
15
|
+
<meta name="description" content={data.description} />
|
|
16
|
+
<link rel="icon" type="image/png" href={data.icon} />
|
|
17
|
+
<Header />
|
|
18
|
+
<main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
|
|
19
|
+
{children}
|
|
20
|
+
</main>
|
|
21
|
+
<Footer />
|
|
22
|
+
</div>
|
|
28
23
|
);
|
|
29
24
|
}
|
|
30
25
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"autoprefixer": "10.4.20",
|
|
19
|
-
"tailwindcss": "3.4.
|
|
19
|
+
"tailwindcss": "3.4.14"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -7,20 +7,15 @@ export default async function RootLayout({ children }) {
|
|
|
7
7
|
const data = await getData();
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</main>
|
|
20
|
-
<Footer />
|
|
21
|
-
</div>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
10
|
+
<div className="font-['Nunito']">
|
|
11
|
+
<meta name="description" content={data.description} />
|
|
12
|
+
<link rel="icon" type="image/png" href={data.icon} />
|
|
13
|
+
<Header />
|
|
14
|
+
<main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
|
|
15
|
+
{children}
|
|
16
|
+
</main>
|
|
17
|
+
<Footer />
|
|
18
|
+
</div>
|
|
24
19
|
);
|
|
25
20
|
}
|
|
26
21
|
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.6.
|
|
21
|
+
"tailwindcss": "3.4.14",
|
|
22
|
+
"typescript": "5.6.3"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -8,7 +8,9 @@ type PokemonPageProps = { slug: string };
|
|
|
8
8
|
export default async function PokemonPage({ slug }: PokemonPageProps) {
|
|
9
9
|
const pokemon = await getPokemon(slug);
|
|
10
10
|
|
|
11
|
-
if (!pokemon)
|
|
11
|
+
if (!pokemon) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
const stats = Object.entries(pokemon.base);
|
|
14
16
|
|
|
@@ -11,20 +11,15 @@ export default async function RootLayout({ children }: RootLayoutProps) {
|
|
|
11
11
|
const data = await getData();
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</main>
|
|
24
|
-
<Footer />
|
|
25
|
-
</div>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
14
|
+
<div className="font-nunito">
|
|
15
|
+
<meta name="description" content={data.description} />
|
|
16
|
+
<link rel="icon" type="image/png" href={data.icon} />
|
|
17
|
+
<Header />
|
|
18
|
+
<main className="flex items-center justify-center lg:min-h-svh">
|
|
19
|
+
{children}
|
|
20
|
+
</main>
|
|
21
|
+
<Footer />
|
|
22
|
+
</div>
|
|
28
23
|
);
|
|
29
24
|
}
|
|
30
25
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/components/footer.tsx","./src/components/header.tsx","./src/components/reload.tsx","./src/lib/index.ts","./src/lib/pokemon.ts","./src/pages/[slug].tsx","./src/pages/_layout.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
20
|
-
"typescript": "5.6.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
|
+
"typescript": "5.6.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -11,18 +11,13 @@ export default async function RootLayout({ children }: RootLayoutProps) {
|
|
|
11
11
|
const data = await getData();
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<main className={styles.main}>{children}</main>
|
|
22
|
-
<Footer />
|
|
23
|
-
</div>
|
|
24
|
-
</body>
|
|
25
|
-
</html>
|
|
14
|
+
<div className={styles.div}>
|
|
15
|
+
<meta name="description" content={data.description} />
|
|
16
|
+
<link rel="icon" type="image/png" href={data.icon} />
|
|
17
|
+
<Header />
|
|
18
|
+
<main className={styles.main}>{children}</main>
|
|
19
|
+
<Footer />
|
|
20
|
+
</div>
|
|
26
21
|
);
|
|
27
22
|
}
|
|
28
23
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module '*.module.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/types.d.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
20
|
-
"typescript": "5.6.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
|
+
"typescript": "5.6.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Link } from 'waku/router/client';
|
|
4
|
+
|
|
5
|
+
const Pending = ({ isPending }: { isPending: boolean }) => (
|
|
6
|
+
<span
|
|
7
|
+
style={{
|
|
8
|
+
marginLeft: 5,
|
|
9
|
+
transition: 'opacity 75ms 100ms',
|
|
10
|
+
opacity: isPending ? 1 : 0,
|
|
11
|
+
}}
|
|
12
|
+
>
|
|
13
|
+
Pending...
|
|
14
|
+
</span>
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const HomeLayout = ({ children }: { children: ReactNode }) => (
|
|
18
|
+
<div>
|
|
19
|
+
<title>Waku</title>
|
|
20
|
+
<ul>
|
|
21
|
+
<li>
|
|
22
|
+
<Link
|
|
23
|
+
to="/"
|
|
24
|
+
pending={<Pending isPending />}
|
|
25
|
+
notPending={<Pending isPending={false} />}
|
|
26
|
+
>
|
|
27
|
+
Home
|
|
28
|
+
</Link>
|
|
29
|
+
</li>
|
|
30
|
+
<li>
|
|
31
|
+
<Link
|
|
32
|
+
to="/foo"
|
|
33
|
+
pending={<Pending isPending />}
|
|
34
|
+
notPending={<Pending isPending={false} />}
|
|
35
|
+
>
|
|
36
|
+
Foo
|
|
37
|
+
</Link>
|
|
38
|
+
</li>
|
|
39
|
+
<li>
|
|
40
|
+
<Link
|
|
41
|
+
to="/bar"
|
|
42
|
+
unstable_prefetchOnEnter
|
|
43
|
+
pending={<Pending isPending />}
|
|
44
|
+
notPending={<Pending isPending={false} />}
|
|
45
|
+
>
|
|
46
|
+
Bar
|
|
47
|
+
</Link>
|
|
48
|
+
</li>
|
|
49
|
+
<li>
|
|
50
|
+
<Link
|
|
51
|
+
to="/nested/baz"
|
|
52
|
+
pending={<Pending isPending />}
|
|
53
|
+
notPending={<Pending isPending={false} />}
|
|
54
|
+
>
|
|
55
|
+
Nested / Baz
|
|
56
|
+
</Link>
|
|
57
|
+
</li>
|
|
58
|
+
<li>
|
|
59
|
+
<Link
|
|
60
|
+
to="/nested/qux"
|
|
61
|
+
pending={<Pending isPending />}
|
|
62
|
+
notPending={<Pending isPending={false} />}
|
|
63
|
+
>
|
|
64
|
+
Nested / Qux
|
|
65
|
+
</Link>
|
|
66
|
+
</li>
|
|
67
|
+
</ul>
|
|
68
|
+
{children}
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
export default HomeLayout;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export default function Root({ children }: { children: ReactNode }) {
|
|
4
|
+
return (
|
|
5
|
+
<html>
|
|
6
|
+
<head></head>
|
|
7
|
+
<body
|
|
8
|
+
data-dynamic-root={`Random Number ${Math.round(Math.random() * 100)}`}
|
|
9
|
+
>
|
|
10
|
+
{children}
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const getConfig = async () => {
|
|
17
|
+
return {
|
|
18
|
+
render: 'dynamic',
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/Counter.tsx","./src/pages/_layout.tsx","./src/pages/_root.tsx","./src/pages/bar.tsx","./src/pages/index.tsx","./src/pages/foo/index.tsx","./src/pages/nested/[name].tsx"],"version":"5.6.3"}
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.6.
|
|
23
|
-
"vite": "5.4.
|
|
21
|
+
"tailwindcss": "3.4.14",
|
|
22
|
+
"typescript": "5.6.3",
|
|
23
|
+
"vite": "5.4.9"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -11,20 +11,15 @@ export default async function RootLayout({ children }: RootLayoutProps) {
|
|
|
11
11
|
const data = await getData();
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</main>
|
|
24
|
-
<Footer />
|
|
25
|
-
</div>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
14
|
+
<div className="font-['Nunito']">
|
|
15
|
+
<meta name="description" content={data.description} />
|
|
16
|
+
<link rel="icon" type="image/png" href={data.icon} />
|
|
17
|
+
<Header />
|
|
18
|
+
<main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
|
|
19
|
+
{children}
|
|
20
|
+
</main>
|
|
21
|
+
<Footer />
|
|
22
|
+
</div>
|
|
28
23
|
);
|
|
29
24
|
}
|
|
30
25
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./waku.config.ts","./src/entries.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
20
|
"server-only": "0.0.1",
|
|
21
|
-
"typescript": "5.6.
|
|
21
|
+
"typescript": "5.6.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Link } from 'waku/router/client';
|
|
4
|
+
|
|
5
|
+
import '../styles.css';
|
|
6
|
+
|
|
7
|
+
const Pending = ({ isPending }: { isPending: boolean }) => (
|
|
8
|
+
<span
|
|
9
|
+
style={{
|
|
10
|
+
marginLeft: 5,
|
|
11
|
+
transition: 'opacity 75ms 100ms',
|
|
12
|
+
opacity: isPending ? 1 : 0,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
Pending...
|
|
16
|
+
</span>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const HomeLayout = ({ children }: { children: ReactNode }) => (
|
|
20
|
+
<div>
|
|
21
|
+
<ul>
|
|
22
|
+
<li>
|
|
23
|
+
<Link
|
|
24
|
+
to="/"
|
|
25
|
+
pending={<Pending isPending />}
|
|
26
|
+
notPending={<Pending isPending={false} />}
|
|
27
|
+
>
|
|
28
|
+
Home
|
|
29
|
+
</Link>
|
|
30
|
+
</li>
|
|
31
|
+
<li>
|
|
32
|
+
<Link
|
|
33
|
+
to="/foo"
|
|
34
|
+
pending={<Pending isPending />}
|
|
35
|
+
notPending={<Pending isPending={false} />}
|
|
36
|
+
>
|
|
37
|
+
Foo
|
|
38
|
+
</Link>
|
|
39
|
+
</li>
|
|
40
|
+
<li>
|
|
41
|
+
<Link to="/bar" unstable_prefetchOnEnter>
|
|
42
|
+
Bar
|
|
43
|
+
</Link>
|
|
44
|
+
</li>
|
|
45
|
+
<li>
|
|
46
|
+
<Link to="/baz">Baz</Link>
|
|
47
|
+
</li>
|
|
48
|
+
<li>
|
|
49
|
+
<Link to="/nested/foo">Nested / Foo</Link>
|
|
50
|
+
</li>
|
|
51
|
+
<li>
|
|
52
|
+
<Link to="/nested/bar">Nested / Bar</Link>
|
|
53
|
+
</li>
|
|
54
|
+
<li>
|
|
55
|
+
<Link to="/nested/baz">Nested / Baz</Link>
|
|
56
|
+
</li>
|
|
57
|
+
<li>
|
|
58
|
+
<Link to="/nested/qux">Nested / Qux</Link>
|
|
59
|
+
</li>
|
|
60
|
+
</ul>
|
|
61
|
+
{children}
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
export default HomeLayout;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
1
|
import { createPages } from 'waku';
|
|
3
2
|
import type { PathsForPages } from 'waku/router';
|
|
4
3
|
|
|
5
4
|
import FooPage from './components/FooPage';
|
|
5
|
+
import HomeLayout from './components/HomeLayout';
|
|
6
|
+
import HomePage from './components/HomePage';
|
|
7
|
+
import BarPage from './components/BarPage';
|
|
8
|
+
import NestedBazPage from './components/NestedBazPage';
|
|
9
|
+
import NestedQuxPage from './components/NestedQuxPage';
|
|
10
|
+
import Root from './components/Root';
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const NestedQuxPage = lazy(() => import('./components/NestedQuxPage'));
|
|
12
|
+
const pages = createPages(async ({ createPage, createLayout, createRoot }) => [
|
|
13
|
+
createRoot({
|
|
14
|
+
render: 'static',
|
|
15
|
+
component: Root,
|
|
16
|
+
}),
|
|
13
17
|
|
|
14
|
-
const pages = createPages(async ({ createPage, createLayout }) => [
|
|
15
18
|
createLayout({
|
|
16
19
|
render: 'static',
|
|
17
20
|
path: '/',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/NestedQuxPage.tsx","./src/components/Root.tsx","./src/components/funcs.ts"],"version":"5.6.3"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-bf7e210c-20241017",
|
|
13
|
+
"react-dom": "19.0.0-rc-bf7e210c-20241017",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-bf7e210c-20241017",
|
|
15
|
+
"waku": "0.21.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.11",
|
|
19
|
-
"@types/react-dom": "18.3.
|
|
20
|
-
"typescript": "5.6.
|
|
19
|
+
"@types/react-dom": "18.3.1",
|
|
20
|
+
"typescript": "5.6.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Link, useRouter_UNSTABLE as useRouter } from 'waku/router/client';
|
|
5
|
+
|
|
6
|
+
export const Counter = () => {
|
|
7
|
+
const { path } = useRouter();
|
|
8
|
+
const [count, setCount] = useState(0);
|
|
9
|
+
return (
|
|
10
|
+
<div style={{ border: '3px blue dashed', margin: '1em', padding: '1em' }}>
|
|
11
|
+
<p>Count: {count}</p>
|
|
12
|
+
<button onClick={() => setCount((c) => c + 1)}>Increment</button>
|
|
13
|
+
<h3>This is a client component.</h3>
|
|
14
|
+
<span>path: {path}</span>
|
|
15
|
+
<p>
|
|
16
|
+
<Link to="/">Go to Home</Link>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|