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.
Files changed (208) hide show
  1. package/package.json +2 -2
  2. package/template/01_template/package.json +7 -7
  3. package/template/01_template/src/pages/_layout.tsx +9 -14
  4. package/template/01_template/tsconfig.tsbuildinfo +1 -0
  5. package/template/02_template_js/package.json +5 -5
  6. package/template/02_template_js/src/pages/_layout.jsx +9 -14
  7. package/template/03_demo/package.json +7 -7
  8. package/template/03_demo/src/pages/[slug].tsx +3 -1
  9. package/template/03_demo/src/pages/_layout.tsx +9 -14
  10. package/template/03_demo/tsconfig.json +1 -1
  11. package/template/03_demo/tsconfig.tsbuildinfo +1 -0
  12. package/template/04_cssmodules/package.json +6 -6
  13. package/template/04_cssmodules/src/pages/_layout.tsx +7 -12
  14. package/template/04_cssmodules/src/types.d.ts +1 -0
  15. package/template/04_cssmodules/tsconfig.tsbuildinfo +1 -0
  16. package/template/{11_form → 11_fs-router}/package.json +6 -6
  17. package/template/11_fs-router/src/pages/_layout.tsx +72 -0
  18. package/template/11_fs-router/src/pages/_root.tsx +20 -0
  19. package/template/11_fs-router/tsconfig.tsbuildinfo +1 -0
  20. package/template/{05_nossr → 12_nossr}/package.json +8 -8
  21. package/template/{05_nossr → 12_nossr}/src/pages/_layout.tsx +9 -14
  22. package/template/12_nossr/tsconfig.tsbuildinfo +1 -0
  23. package/template/{05_nossr → 12_nossr}/waku.config.ts +1 -0
  24. package/template/{25_weave_render → 21_create-pages}/package.json +6 -6
  25. package/template/21_create-pages/src/components/HomeLayout.tsx +65 -0
  26. package/template/21_create-pages/src/components/Root.tsx +12 -0
  27. package/template/{07_router → 21_create-pages}/src/entries.tsx +11 -8
  28. package/template/21_create-pages/tsconfig.tsbuildinfo +1 -0
  29. package/template/{10_fs-router → 22_define-router}/package.json +6 -6
  30. package/template/22_define-router/src/components/Counter.tsx +20 -0
  31. package/template/22_define-router/src/components/FooPage.tsx +10 -0
  32. package/template/22_define-router/src/components/HomeLayout.tsx +53 -0
  33. package/template/22_define-router/src/components/NestedBazPage.tsx +8 -0
  34. package/template/22_define-router/src/components/Root.tsx +12 -0
  35. package/template/22_define-router/src/entries.tsx +156 -0
  36. package/template/22_define-router/src/main.tsx +15 -0
  37. package/template/22_define-router/tsconfig.tsbuildinfo +1 -0
  38. package/template/{20_minimal → 31_minimal}/package.json +6 -6
  39. package/template/31_minimal/src/entries.tsx +18 -0
  40. package/template/31_minimal/tsconfig.tsbuildinfo +1 -0
  41. package/template/31_minimal/waku.config.ts +12 -0
  42. package/template/{21_minimal_js → 32_minimal_js}/package.json +4 -4
  43. package/template/{21_minimal_js → 32_minimal_js}/src/entries.jsx +4 -4
  44. package/template/{09_api → 33_promise}/package.json +6 -6
  45. package/template/{22_promise → 33_promise}/src/entries.tsx +5 -7
  46. package/template/33_promise/tsconfig.tsbuildinfo +1 -0
  47. package/template/{23_actions → 34_functions}/package.json +6 -6
  48. package/template/34_functions/src/als.ts +16 -0
  49. package/template/{23_actions → 34_functions}/src/components2/funcs.ts +1 -5
  50. package/template/{23_actions → 34_functions}/src/components2/funcs2.ts +2 -2
  51. package/template/34_functions/src/entries.tsx +29 -0
  52. package/template/34_functions/tsconfig.json +15 -0
  53. package/template/34_functions/tsconfig.tsbuildinfo +1 -0
  54. package/template/34_functions/waku.config.ts +12 -0
  55. package/template/35_nesting/package.json +22 -0
  56. package/template/{24_nesting → 35_nesting}/src/components/Counter.tsx +1 -1
  57. package/template/{24_nesting → 35_nesting}/src/entries.tsx +10 -10
  58. package/template/{24_nesting → 35_nesting}/src/main.tsx +1 -1
  59. package/template/35_nesting/tsconfig.tsbuildinfo +1 -0
  60. package/template/36_form/package.json +22 -0
  61. package/template/{20_minimal → 36_form}/src/entries.tsx +4 -5
  62. package/template/36_form/tsconfig.tsbuildinfo +1 -0
  63. package/template/{12_css → 37_css}/package.json +8 -8
  64. package/template/{12_css → 37_css}/src/entries.tsx +4 -4
  65. package/template/37_css/tsconfig.tsbuildinfo +1 -0
  66. package/template/38_cookies/package.json +26 -0
  67. package/template/{08_cookies → 38_cookies}/src/entries.tsx +4 -4
  68. package/template/38_cookies/tsconfig.tsbuildinfo +1 -0
  69. package/template/{08_cookies → 38_cookies}/waku.config.ts +1 -1
  70. package/template/39_api/package.json +22 -0
  71. package/template/{09_api → 39_api}/src/entries.tsx +4 -4
  72. package/template/39_api/tsconfig.tsbuildinfo +1 -0
  73. package/template/{09_api → 39_api}/waku.config.ts +1 -1
  74. package/template/{13_path-alias → 41_path-alias}/package.json +7 -7
  75. package/template/{23_actions → 41_path-alias}/src/entries.tsx +5 -6
  76. package/template/41_path-alias/tsconfig.tsbuildinfo +1 -0
  77. package/template/{14_react-tweet → 42_react-tweet}/package.json +7 -7
  78. package/template/{14_react-tweet → 42_react-tweet}/src/templates/root-layout.tsx +9 -14
  79. package/template/42_react-tweet/tsconfig.tsbuildinfo +1 -0
  80. package/template/{07_router → 43_weave-render}/package.json +6 -6
  81. package/template/43_weave-render/src/components/BarLayout.tsx +57 -0
  82. package/template/43_weave-render/src/components/BarPage.tsx +10 -0
  83. package/template/{25_weave_render → 43_weave-render}/src/components/HomeLayout.tsx +1 -1
  84. package/template/43_weave-render/src/components/HomePage.tsx +8 -0
  85. package/template/{25_weave_render → 43_weave-render}/src/entries.tsx +2 -5
  86. package/template/43_weave-render/src/styles.css +3 -0
  87. package/template/43_weave-render/tsconfig.tsbuildinfo +1 -0
  88. package/template/07_router/src/components/HomeLayout.tsx +0 -72
  89. package/template/08_cookies/package.json +0 -26
  90. package/template/10_fs-router/src/pages/_layout.tsx +0 -77
  91. package/template/11_form/src/entries.tsx +0 -28
  92. package/template/13_path-alias/src/entries.tsx +0 -28
  93. package/template/22_promise/package.json +0 -22
  94. package/template/24_nesting/package.json +0 -22
  95. package/template/25_weave_render/src/components/BarLayout.tsx +0 -64
  96. /package/template/{10_fs-router → 11_fs-router}/src/components/Counter.tsx +0 -0
  97. /package/template/{10_fs-router → 11_fs-router}/src/entries.tsx +0 -0
  98. /package/template/{07_router → 11_fs-router}/src/main.tsx +0 -0
  99. /package/template/{10_fs-router → 11_fs-router}/src/pages/bar.tsx +0 -0
  100. /package/template/{10_fs-router → 11_fs-router}/src/pages/foo/index.tsx +0 -0
  101. /package/template/{10_fs-router → 11_fs-router}/src/pages/index.tsx +0 -0
  102. /package/template/{10_fs-router → 11_fs-router}/src/pages/nested/[name].tsx +0 -0
  103. /package/template/{05_nossr → 11_fs-router}/tsconfig.json +0 -0
  104. /package/template/{05_nossr → 12_nossr}/gitignore +0 -0
  105. /package/template/{05_nossr → 12_nossr}/postcss.config.js +0 -0
  106. /package/template/{05_nossr → 12_nossr}/public/images/favicon.png +0 -0
  107. /package/template/{05_nossr → 12_nossr}/src/components/counter.tsx +0 -0
  108. /package/template/{05_nossr → 12_nossr}/src/components/footer.tsx +0 -0
  109. /package/template/{05_nossr → 12_nossr}/src/components/header.tsx +0 -0
  110. /package/template/{05_nossr → 12_nossr}/src/entries.ts +0 -0
  111. /package/template/{05_nossr → 12_nossr}/src/pages/about.tsx +0 -0
  112. /package/template/{05_nossr → 12_nossr}/src/pages/index.tsx +0 -0
  113. /package/template/{05_nossr → 12_nossr}/src/styles.css +0 -0
  114. /package/template/{05_nossr → 12_nossr}/tailwind.config.js +0 -0
  115. /package/template/{07_router → 12_nossr}/tsconfig.json +0 -0
  116. /package/template/{07_router → 21_create-pages}/src/components/BarPage.tsx +0 -0
  117. /package/template/{07_router → 21_create-pages}/src/components/Counter.tsx +0 -0
  118. /package/template/{07_router → 21_create-pages}/src/components/FooPage.tsx +0 -0
  119. /package/template/{07_router → 21_create-pages}/src/components/HomePage.tsx +0 -0
  120. /package/template/{07_router → 21_create-pages}/src/components/NestedBazPage.tsx +0 -0
  121. /package/template/{07_router → 21_create-pages}/src/components/NestedQuxPage.tsx +0 -0
  122. /package/template/{07_router → 21_create-pages}/src/components/funcs.ts +0 -0
  123. /package/template/{10_fs-router → 21_create-pages}/src/main.tsx +0 -0
  124. /package/template/{07_router → 21_create-pages}/src/styles.css +0 -0
  125. /package/template/{09_api → 21_create-pages}/tsconfig.json +0 -0
  126. /package/template/{25_weave_render → 22_define-router}/src/components/BarPage.tsx +0 -0
  127. /package/template/{25_weave_render → 22_define-router}/src/components/HomePage.tsx +0 -0
  128. /package/template/{25_weave_render → 22_define-router}/src/styles.css +0 -0
  129. /package/template/{10_fs-router → 22_define-router}/tsconfig.json +0 -0
  130. /package/template/{20_minimal → 31_minimal}/public/404.html +0 -0
  131. /package/template/{20_minimal → 31_minimal}/src/components/App.tsx +0 -0
  132. /package/template/{08_cookies → 31_minimal}/src/components/Counter.tsx +0 -0
  133. /package/template/{08_cookies → 31_minimal}/src/main.tsx +0 -0
  134. /package/template/{11_form → 31_minimal}/tsconfig.json +0 -0
  135. /package/template/{21_minimal_js → 32_minimal_js}/public/404.html +0 -0
  136. /package/template/{21_minimal_js → 32_minimal_js}/src/components/app.jsx +0 -0
  137. /package/template/{21_minimal_js → 32_minimal_js}/src/components/counter.jsx +0 -0
  138. /package/template/{21_minimal_js → 32_minimal_js}/src/main.jsx +0 -0
  139. /package/template/{22_promise → 33_promise}/src/components/App.tsx +0 -0
  140. /package/template/{22_promise → 33_promise}/src/components/Counter.tsx +0 -0
  141. /package/template/{22_promise → 33_promise}/src/components/Hello.tsx +0 -0
  142. /package/template/{22_promise → 33_promise}/src/main.tsx +0 -0
  143. /package/template/{12_css → 33_promise}/tsconfig.json +0 -0
  144. /package/template/{23_actions → 34_functions}/src/components2/App.tsx +0 -0
  145. /package/template/{23_actions → 34_functions}/src/components2/ButtonClient.tsx +0 -0
  146. /package/template/{23_actions → 34_functions}/src/components2/ButtonServer.tsx +0 -0
  147. /package/template/{23_actions → 34_functions}/src/components2/Counter.tsx +0 -0
  148. /package/template/{23_actions → 34_functions}/src/components2/TextBox.tsx +0 -0
  149. /package/template/{09_api → 34_functions}/src/main.tsx +0 -0
  150. /package/template/{24_nesting → 35_nesting}/src/components/App.tsx +0 -0
  151. /package/template/{24_nesting → 35_nesting}/src/components/AppWithoutSsr.tsx +0 -0
  152. /package/template/{24_nesting → 35_nesting}/src/components/CounterWithoutSsr.tsx +0 -0
  153. /package/template/{24_nesting → 35_nesting}/src/components/InnerApp.tsx +0 -0
  154. /package/template/{14_react-tweet → 35_nesting}/tsconfig.json +0 -0
  155. /package/template/{11_form → 36_form}/src/components/App.tsx +0 -0
  156. /package/template/{11_form → 36_form}/src/components/Counter.tsx +0 -0
  157. /package/template/{11_form → 36_form}/src/components/Form.tsx +0 -0
  158. /package/template/{11_form → 36_form}/src/components/ServerForm.tsx +0 -0
  159. /package/template/{11_form → 36_form}/src/components/funcs.ts +0 -0
  160. /package/template/{11_form → 36_form}/src/main.tsx +0 -0
  161. /package/template/{20_minimal → 36_form}/tsconfig.json +0 -0
  162. /package/template/{12_css → 37_css}/src/components/ClientBanner.tsx +0 -0
  163. /package/template/{12_css → 37_css}/src/components/app.css +0 -0
  164. /package/template/{12_css → 37_css}/src/components/app.module.css +0 -0
  165. /package/template/{12_css → 37_css}/src/components/app.tsx +0 -0
  166. /package/template/{12_css → 37_css}/src/components/banner.tsx +0 -0
  167. /package/template/{12_css → 37_css}/src/components/counter.tsx +0 -0
  168. /package/template/{12_css → 37_css}/src/components/layout.styles.css +0 -0
  169. /package/template/{12_css → 37_css}/src/components/layout.tsx +0 -0
  170. /package/template/{12_css → 37_css}/src/components/styles.css.ts +0 -0
  171. /package/template/{12_css → 37_css}/src/main.tsx +0 -0
  172. /package/template/{12_css → 37_css}/src/type.d.ts +0 -0
  173. /package/template/{22_promise → 37_css}/tsconfig.json +0 -0
  174. /package/template/{12_css → 37_css}/vite.config.ts +0 -0
  175. /package/template/{08_cookies → 38_cookies}/private/items.json +0 -0
  176. /package/template/{08_cookies → 38_cookies}/src/components/App.tsx +0 -0
  177. /package/template/{20_minimal → 38_cookies}/src/components/Counter.tsx +0 -0
  178. /package/template/{13_path-alias → 38_cookies}/src/main.tsx +0 -0
  179. /package/template/{08_cookies → 38_cookies}/src/middleware/cookie.ts +0 -0
  180. /package/template/{08_cookies → 38_cookies}/tsconfig.json +0 -0
  181. /package/template/{09_api → 39_api}/src/components/App.tsx +0 -0
  182. /package/template/{09_api → 39_api}/src/components/Counter.tsx +0 -0
  183. /package/template/{20_minimal → 39_api}/src/main.tsx +0 -0
  184. /package/template/{09_api → 39_api}/src/middleware/api.ts +0 -0
  185. /package/template/{23_actions → 39_api}/tsconfig.json +0 -0
  186. /package/template/{13_path-alias → 41_path-alias}/src/components/App.tsx +0 -0
  187. /package/template/{13_path-alias → 41_path-alias}/src/components/Counter.tsx +0 -0
  188. /package/template/{13_path-alias → 41_path-alias}/src/components/MyFragment.tsx +0 -0
  189. /package/template/{23_actions → 41_path-alias}/src/main.tsx +0 -0
  190. /package/template/{13_path-alias → 41_path-alias}/tsconfig.json +0 -0
  191. /package/template/{13_path-alias → 41_path-alias}/vite.config.ts +0 -0
  192. /package/template/{14_react-tweet → 42_react-tweet}/gitignore +0 -0
  193. /package/template/{14_react-tweet → 42_react-tweet}/postcss.config.js +0 -0
  194. /package/template/{14_react-tweet → 42_react-tweet}/public/images/favicon.png +0 -0
  195. /package/template/{14_react-tweet → 42_react-tweet}/src/components/footer.tsx +0 -0
  196. /package/template/{14_react-tweet → 42_react-tweet}/src/components/header.tsx +0 -0
  197. /package/template/{14_react-tweet → 42_react-tweet}/src/entries.tsx +0 -0
  198. /package/template/{14_react-tweet → 42_react-tweet}/src/main.tsx +0 -0
  199. /package/template/{14_react-tweet → 42_react-tweet}/src/styles.css +0 -0
  200. /package/template/{14_react-tweet → 42_react-tweet}/src/templates/home-page.tsx +0 -0
  201. /package/template/{14_react-tweet → 42_react-tweet}/tailwind.config.js +0 -0
  202. /package/template/{24_nesting → 42_react-tweet}/tsconfig.json +0 -0
  203. /package/template/{14_react-tweet → 42_react-tweet}/vite.config.ts +0 -0
  204. /package/template/{25_weave_render → 43_weave-render}/src/components/Counter.tsx +0 -0
  205. /package/template/{25_weave_render → 43_weave-render}/src/components/FooLayout.tsx +0 -0
  206. /package/template/{25_weave_render → 43_weave-render}/src/components/FooPage.tsx +0 -0
  207. /package/template/{25_weave_render → 43_weave-render}/src/main.tsx +0 -0
  208. /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.0",
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": "^0.38.2",
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
19
+ "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.13",
22
- "typescript": "5.6.2"
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
- <html>
15
- <head></head>
16
- <body>
17
- <div className="font-['Nunito']">
18
- <meta property="description" content={data.description} />
19
- <link rel="icon" type="image/png" href={data.icon} />
20
- <Header />
21
- <main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
22
- {children}
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.13"
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
- <html>
11
- <head></head>
12
- <body>
13
- <div className="font-['Nunito']">
14
- <meta property="description" content={data.description} />
15
- <link rel="icon" type="image/png" href={data.icon} />
16
- <Header />
17
- <main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
18
- {children}
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
19
+ "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.13",
22
- "typescript": "5.6.2"
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) return null;
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
- <html>
15
- <head></head>
16
- <body>
17
- <div className="font-nunito">
18
- <meta property="description" content={data.description} />
19
- <link rel="icon" type="image/png" href={data.icon} />
20
- <Header />
21
- <main className="flex items-center justify-center lg:min-h-svh">
22
- {children}
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
 
@@ -9,7 +9,7 @@
9
9
  "skipLibCheck": true,
10
10
  "noUncheckedIndexedAccess": true,
11
11
  "exactOptionalPropertyTypes": true,
12
- "types": ["react/experimental"],
12
+ "types": ["node", "react/experimental"],
13
13
  "jsx": "react-jsx"
14
14
  }
15
15
  }
@@ -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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
20
- "typescript": "5.6.2"
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
- <html>
15
- <head></head>
16
- <body>
17
- <div className={styles.div}>
18
- <meta property="description" content={data.description} />
19
- <link rel="icon" type="image/png" href={data.icon} />
20
- <Header />
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
20
- "typescript": "5.6.2"
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
19
+ "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.13",
22
- "typescript": "5.6.2",
23
- "vite": "5.4.8"
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
- <html>
15
- <head></head>
16
- <body>
17
- <div className="font-['Nunito']">
18
- <meta property="description" content={data.description} />
19
- <link rel="icon" type="image/png" href={data.icon} />
20
- <Header />
21
- <main className="m-6 flex items-center *:min-h-64 *:min-w-64 lg:m-0 lg:min-h-svh lg:justify-center">
22
- {children}
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"}
@@ -1,6 +1,7 @@
1
1
  /** @type {import('waku/config').Config} */
2
2
  export default {
3
3
  middleware: () => [
4
+ import('waku/middleware/context'),
4
5
  import('waku/middleware/dev-server'),
5
6
  import('waku/middleware/rsc'),
6
7
  import('waku/middleware/fallback'),
@@ -9,15 +9,15 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
19
+ "@types/react-dom": "18.3.1",
20
20
  "server-only": "0.0.1",
21
- "typescript": "5.6.2"
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;
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export default function Root({ children }: { children: ReactNode }) {
4
+ return (
5
+ <html>
6
+ <head>
7
+ <title>Waku</title>
8
+ </head>
9
+ <body>{children}</body>
10
+ </html>
11
+ );
12
+ }
@@ -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
- // The use of `lazy` is optional and you can use import statements too.
8
- const HomeLayout = lazy(() => import('./components/HomeLayout'));
9
- const HomePage = lazy(() => import('./components/HomePage'));
10
- const BarPage = lazy(() => import('./components/BarPage'));
11
- const NestedBazPage = lazy(() => import('./components/NestedBazPage'));
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-2d16326d-20240930",
13
- "react-dom": "19.0.0-rc-2d16326d-20240930",
14
- "react-server-dom-webpack": "19.0.0-rc-2d16326d-20240930",
15
- "waku": "0.21.3"
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.0",
20
- "typescript": "5.6.2"
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
+ };