vinext 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +1 -1
  2. package/dist/build/action-owner-manifest.d.ts +3 -2
  3. package/dist/build/action-owner-manifest.js +18 -2
  4. package/dist/build/app-page-static-eligibility.d.ts +17 -1
  5. package/dist/build/app-page-static-eligibility.js +80 -13
  6. package/dist/build/clean-output.d.ts +2 -1
  7. package/dist/build/client-build-config.d.ts +13 -3
  8. package/dist/build/client-build-config.js +46 -9
  9. package/dist/build/client-reference-async.d.ts +48 -0
  10. package/dist/build/client-reference-async.js +123 -0
  11. package/dist/build/client-reference-chunks.d.ts +32 -0
  12. package/dist/build/client-reference-chunks.js +111 -0
  13. package/dist/build/client-reference-groups.d.ts +9 -1
  14. package/dist/build/client-reference-groups.js +40 -2
  15. package/dist/build/css-url-assets.d.ts +2 -1
  16. package/dist/build/google-fonts/fallback-metrics.d.ts +2 -1
  17. package/dist/build/google-fonts/find-font-files-in-css.d.ts +1 -0
  18. package/dist/build/google-fonts/find-font-files-in-css.js +17 -4
  19. package/dist/build/google-fonts/font-metadata.d.ts +2 -1
  20. package/dist/build/google-fonts/validate.d.ts +2 -1
  21. package/dist/build/inline-css.d.ts +2 -1
  22. package/dist/build/layout-classification.d.ts +2 -1
  23. package/dist/build/module-dependency-cache.d.ts +2 -1
  24. package/dist/build/next-client-runtime-manifests.d.ts +2 -1
  25. package/dist/build/precompress.d.ts +2 -1
  26. package/dist/build/precompress.js +1 -1
  27. package/dist/build/prerender-paths.d.ts +2 -1
  28. package/dist/build/prerender-phase.d.ts +2 -1
  29. package/dist/build/prerender-server-pool.js +1 -1
  30. package/dist/build/prerender.d.ts +3 -2
  31. package/dist/build/prerender.js +5 -4
  32. package/dist/build/report.d.ts +2 -1
  33. package/dist/build/route-classification-injector.d.ts +2 -1
  34. package/dist/build/route-classification-manifest.d.ts +2 -1
  35. package/dist/build/run-prerender.d.ts +2 -1
  36. package/dist/build/server-actions-encryption-key.d.ts +2 -1
  37. package/dist/build/ssr-manifest.js +25 -2
  38. package/dist/build/standalone.d.ts +2 -1
  39. package/dist/cache/cache-adapters-virtual.d.ts +2 -1
  40. package/dist/cache.js +1 -2
  41. package/dist/check.d.ts +2 -1
  42. package/dist/check.js +4 -0
  43. package/dist/cli-args.d.ts +2 -1
  44. package/dist/cli.js +2 -0
  45. package/dist/client/client-redirect-matcher.js +2 -1
  46. package/dist/client/client-redirects.d.ts +4 -3
  47. package/dist/client/client-redirects.js +2 -1
  48. package/dist/client/client-rewrites.d.ts +2 -1
  49. package/dist/client/dev-error-overlay-store.d.ts +2 -1
  50. package/dist/client/index.js +1 -2
  51. package/dist/client/instrumentation-client-state.js +5 -5
  52. package/dist/client/navigation-runtime.d.ts +3 -1
  53. package/dist/client/navigation-runtime.js +1 -1
  54. package/dist/client/pages-router-link-navigation.d.ts +2 -1
  55. package/dist/client/vinext-next-data.d.ts +25 -1
  56. package/dist/client/window-next.d.ts +2 -1
  57. package/dist/config/config-matchers.d.ts +12 -1
  58. package/dist/config/config-matchers.js +111 -16
  59. package/dist/config/dotenv.d.ts +2 -1
  60. package/dist/config/next-config.d.ts +13 -1
  61. package/dist/config/next-config.js +29 -4
  62. package/dist/config/tsconfig-paths.d.ts +2 -1
  63. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/detector.js +23 -0
  64. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/index.js +2 -0
  65. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/lookup.js +25 -0
  66. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/bmp.js +11 -0
  67. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/cur.js +15 -0
  68. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/dds.js +11 -0
  69. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/gif.js +12 -0
  70. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/heif.js +55 -0
  71. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/icns.js +76 -0
  72. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ico.js +39 -0
  73. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/index.js +46 -0
  74. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/j2c.js +11 -0
  75. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jp2.js +21 -0
  76. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jpg.js +71 -0
  77. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl-stream.js +42 -0
  78. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl.js +46 -0
  79. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ktx.js +19 -0
  80. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/png.js +28 -0
  81. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/pnm.js +54 -0
  82. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/psd.js +11 -0
  83. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/svg.js +79 -0
  84. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tga.js +15 -0
  85. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tiff.js +96 -0
  86. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/utils.js +53 -0
  87. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/webp.js +45 -0
  88. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/utils/bit-reader.js +38 -0
  89. package/dist/deps/.pnpm/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +2 -2
  90. package/dist/entries/app-browser-entry.d.ts +20 -5
  91. package/dist/entries/app-browser-entry.js +79 -6
  92. package/dist/entries/app-rsc-entry.d.ts +2 -1
  93. package/dist/entries/app-rsc-entry.js +42 -12
  94. package/dist/entries/app-rsc-manifest.d.ts +2 -1
  95. package/dist/entries/app-rsc-manifest.js +53 -0
  96. package/dist/entries/pages-entry-helpers.js +1 -2
  97. package/dist/entries/pages-server-entry.d.ts +2 -1
  98. package/dist/entries/pages-server-entry.js +1 -1
  99. package/dist/entries/runtime-entry-module.d.ts +1 -0
  100. package/dist/entries/runtime-entry-module.js +4 -1
  101. package/dist/image/image-adapters-virtual.d.ts +2 -1
  102. package/dist/index.js +102 -34
  103. package/dist/plugins/client-compile-hints.d.ts +30 -0
  104. package/dist/plugins/client-compile-hints.js +88 -0
  105. package/dist/plugins/client-reference-dedup.d.ts +2 -1
  106. package/dist/plugins/cloudflare-dev-module-urls.d.ts +2 -1
  107. package/dist/plugins/dynamic-preload-metadata.d.ts +3 -1
  108. package/dist/plugins/dynamic-preload-metadata.js +1 -1
  109. package/dist/plugins/environment.d.ts +2 -1
  110. package/dist/plugins/fonts.js +9 -12
  111. package/dist/plugins/ignore-dynamic-requests.d.ts +2 -1
  112. package/dist/plugins/import-meta-url.d.ts +2 -1
  113. package/dist/plugins/og-assets.d.ts +2 -1
  114. package/dist/plugins/og-assets.js +2 -3
  115. package/dist/plugins/optimize-imports.d.ts +2 -1
  116. package/dist/plugins/pages-node-externals.d.ts +2 -1
  117. package/dist/plugins/remove-console.d.ts +2 -1
  118. package/dist/plugins/require-condition-resolution.d.ts +2 -1
  119. package/dist/plugins/rsc-client-reference-loaders.d.ts +8 -0
  120. package/dist/plugins/rsc-client-reference-loaders.js +170 -68
  121. package/dist/plugins/rsc-client-shim-excludes.js +2 -0
  122. package/dist/plugins/sass.d.ts +2 -1
  123. package/dist/plugins/strip-server-exports.d.ts +2 -1
  124. package/dist/plugins/styled-jsx.d.ts +2 -1
  125. package/dist/plugins/transform-result.d.ts +2 -1
  126. package/dist/plugins/typeof-window.d.ts +2 -1
  127. package/dist/plugins/worker-image-imports.js +1 -1
  128. package/dist/plugins/worker-use-server.d.ts +2 -1
  129. package/dist/routing/app-route-graph.d.ts +40 -0
  130. package/dist/routing/app-route-graph.js +122 -50
  131. package/dist/routing/browser-route-manifest.d.ts +2 -1
  132. package/dist/routing/optimistic-route-trie.d.ts +2 -1
  133. package/dist/routing/route-matching.d.ts +2 -1
  134. package/dist/routing/route-pattern.d.ts +2 -1
  135. package/dist/server/accept-encoding.d.ts +2 -1
  136. package/dist/server/app-action-forwarding.d.ts +2 -1
  137. package/dist/server/app-bfcache-identity.d.ts +2 -1
  138. package/dist/server/app-browser-action-result.d.ts +2 -1
  139. package/dist/server/app-browser-client-reuse-manifest.d.ts +2 -1
  140. package/dist/server/app-browser-entry.js +30 -6
  141. package/dist/server/app-browser-error.d.ts +2 -1
  142. package/dist/server/app-browser-history-controller.d.ts +2 -1
  143. package/dist/server/app-browser-hydration.d.ts +2 -1
  144. package/dist/server/app-browser-interception-context.d.ts +2 -1
  145. package/dist/server/app-browser-navigation-controller.js +15 -10
  146. package/dist/server/app-browser-popstate.d.ts +2 -1
  147. package/dist/server/app-browser-rsc-redirect.d.ts +2 -1
  148. package/dist/server/app-browser-server-action-client.d.ts +2 -1
  149. package/dist/server/app-browser-state.js +1 -1
  150. package/dist/server/app-browser-stream.d.ts +2 -1
  151. package/dist/server/app-browser-visible-commit.d.ts +2 -1
  152. package/dist/server/app-client-reference-manifest.d.ts +31 -0
  153. package/dist/server/app-client-reference-manifest.js +46 -0
  154. package/dist/server/app-client-reference-preloader.d.ts +25 -5
  155. package/dist/server/app-client-reference-preloader.js +22 -7
  156. package/dist/server/app-elements-wire.d.ts +2 -1
  157. package/dist/server/app-elements.d.ts +2 -0
  158. package/dist/server/app-elements.js +3 -1
  159. package/dist/server/app-fallback-renderer.d.ts +9 -2
  160. package/dist/server/app-fallback-renderer.js +4 -1
  161. package/dist/server/app-history-state.d.ts +2 -1
  162. package/dist/server/app-inline-css-client.d.ts +2 -1
  163. package/dist/server/app-layout-param-observation.d.ts +2 -1
  164. package/dist/server/app-metadata-tracing.d.ts +2 -1
  165. package/dist/server/app-optimistic-routing.d.ts +18 -1
  166. package/dist/server/app-optimistic-routing.js +34 -1
  167. package/dist/server/app-page-boundary-render.d.ts +20 -2
  168. package/dist/server/app-page-boundary-render.js +221 -38
  169. package/dist/server/app-page-boundary.d.ts +34 -5
  170. package/dist/server/app-page-boundary.js +40 -7
  171. package/dist/server/app-page-cache-finalizer.d.ts +2 -1
  172. package/dist/server/app-page-cache-finalizer.js +1 -1
  173. package/dist/server/app-page-cache-render.d.ts +10 -2
  174. package/dist/server/app-page-cache-render.js +14 -2
  175. package/dist/server/app-page-cache.js +2 -2
  176. package/dist/server/app-page-dispatch.d.ts +34 -1
  177. package/dist/server/app-page-dispatch.js +163 -34
  178. package/dist/server/app-page-element-builder.d.ts +17 -1
  179. package/dist/server/app-page-element-builder.js +187 -66
  180. package/dist/server/app-page-execution.d.ts +28 -1
  181. package/dist/server/app-page-execution.js +114 -5
  182. package/dist/server/app-page-head.d.ts +95 -3
  183. package/dist/server/app-page-head.js +307 -152
  184. package/dist/server/app-page-http-access-fallback-metadata.d.ts +48 -2
  185. package/dist/server/app-page-http-access-fallback-metadata.js +76 -1
  186. package/dist/server/app-page-method.d.ts +2 -1
  187. package/dist/server/app-page-probe.d.ts +2 -1
  188. package/dist/server/app-page-render-identity.d.ts +2 -1
  189. package/dist/server/app-page-render.d.ts +7 -1
  190. package/dist/server/app-page-render.js +35 -10
  191. package/dist/server/app-page-request.d.ts +14 -1
  192. package/dist/server/app-page-request.js +1 -1
  193. package/dist/server/app-page-route-wiring.d.ts +52 -2
  194. package/dist/server/app-page-route-wiring.js +197 -47
  195. package/dist/server/app-page-rsc-render-status.d.ts +2 -1
  196. package/dist/server/app-page-search-params-observation.d.ts +7 -2
  197. package/dist/server/app-page-search-params-observation.js +8 -1
  198. package/dist/server/app-page-segment-plan.d.ts +2 -1
  199. package/dist/server/app-page-stream.d.ts +31 -1
  200. package/dist/server/app-page-stream.js +23 -4
  201. package/dist/server/app-pages-bridge.d.ts +2 -1
  202. package/dist/server/app-ppr-fallback-shell-render.d.ts +2 -1
  203. package/dist/server/app-ppr-fallback-shell.d.ts +2 -1
  204. package/dist/server/app-prerender-endpoints.d.ts +2 -1
  205. package/dist/server/app-prerender-static-params.d.ts +2 -1
  206. package/dist/server/app-render-dependency.d.ts +11 -1
  207. package/dist/server/app-render-dependency.js +26 -7
  208. package/dist/server/app-request-stage-independent-entry.d.ts +2 -1
  209. package/dist/server/app-response-stage-entry.d.ts +2 -1
  210. package/dist/server/app-route-handler-cache.d.ts +2 -1
  211. package/dist/server/app-route-handler-dispatch.d.ts +2 -1
  212. package/dist/server/app-route-handler-dispatch.js +1 -1
  213. package/dist/server/app-route-handler-execution.d.ts +2 -1
  214. package/dist/server/app-route-handler-response.d.ts +2 -1
  215. package/dist/server/app-route-handler-runtime.d.ts +2 -1
  216. package/dist/server/app-route-module-loader.d.ts +18 -1
  217. package/dist/server/app-route-module-loader.js +8 -0
  218. package/dist/server/app-route-tree-prefetch.d.ts +2 -1
  219. package/dist/server/app-rsc-error-handler.d.ts +2 -1
  220. package/dist/server/app-rsc-errors.d.ts +2 -1
  221. package/dist/server/app-rsc-handler.d.ts +2 -1
  222. package/dist/server/app-rsc-handler.js +6 -10
  223. package/dist/server/app-rsc-response-finalizer.d.ts +2 -1
  224. package/dist/server/app-rsc-route-matching.d.ts +38 -1
  225. package/dist/server/app-rsc-route-matching.js +24 -0
  226. package/dist/server/app-segment-config.d.ts +2 -1
  227. package/dist/server/app-segment-config.js +1 -14
  228. package/dist/server/app-server-action-execution.d.ts +2 -1
  229. package/dist/server/app-server-action-execution.js +3 -3
  230. package/dist/server/app-ssr-entry.d.ts +6 -0
  231. package/dist/server/app-ssr-entry.js +91 -44
  232. package/dist/server/app-ssr-error-meta.d.ts +2 -1
  233. package/dist/server/app-ssr-search-params-gate.d.ts +2 -1
  234. package/dist/server/app-ssr-stream.d.ts +22 -10
  235. package/dist/server/app-ssr-stream.js +299 -67
  236. package/dist/server/app-static-generation.d.ts +2 -1
  237. package/dist/server/app-streamed-client-references.d.ts +39 -0
  238. package/dist/server/app-streamed-client-references.js +156 -0
  239. package/dist/server/app-visited-response-cache.d.ts +2 -1
  240. package/dist/server/app-worker-stages.d.ts +2 -1
  241. package/dist/server/artifact-compatibility.d.ts +2 -1
  242. package/dist/server/bfcache-identity.d.ts +2 -1
  243. package/dist/server/cache-headers.d.ts +2 -1
  244. package/dist/server/cacheability-request.d.ts +2 -1
  245. package/dist/server/client-reuse-manifest.d.ts +2 -1
  246. package/dist/server/config-headers.d.ts +2 -1
  247. package/dist/server/csp.d.ts +2 -1
  248. package/dist/server/default-global-not-found-module.d.ts +2 -1
  249. package/dist/server/default-http-access-fallback-modules.d.ts +33 -0
  250. package/dist/server/default-http-access-fallback-modules.js +31 -0
  251. package/dist/server/defer-until-stream-consumed.d.ts +34 -0
  252. package/dist/server/defer-until-stream-consumed.js +154 -21
  253. package/dist/server/dev-lockfile.d.ts +32 -2
  254. package/dist/server/dev-lockfile.js +46 -2
  255. package/dist/server/dev-module-runner.d.ts +2 -1
  256. package/dist/server/dev-server.js +10 -3
  257. package/dist/server/fetch-handler.js +1 -2
  258. package/dist/server/file-based-metadata.d.ts +2 -1
  259. package/dist/server/framework-tracer.d.ts +2 -1
  260. package/dist/server/html.d.ts +1 -0
  261. package/dist/server/html.js +19 -1
  262. package/dist/server/http-conditional.d.ts +2 -1
  263. package/dist/server/http-error-responses.d.ts +2 -1
  264. package/dist/server/implicit-tags.d.ts +2 -1
  265. package/dist/server/metadata-route-build-data.d.ts +2 -1
  266. package/dist/server/metadata-route-build-data.js +1 -1
  267. package/dist/server/metadata-route-response.d.ts +2 -1
  268. package/dist/server/metadata-route-response.js +1 -1
  269. package/dist/server/metadata-routes.d.ts +2 -1
  270. package/dist/server/middleware-runtime.d.ts +2 -1
  271. package/dist/server/navigation-trace.d.ts +2 -1
  272. package/dist/server/next-error-digest.d.ts +2 -1
  273. package/dist/server/nitro-public-files-plugin.d.ts +2 -1
  274. package/dist/server/nitro-public-files.d.ts +2 -1
  275. package/dist/server/opentelemetry-api.d.ts +2 -1
  276. package/dist/server/operation-token.d.ts +2 -1
  277. package/dist/server/pages-api-route.d.ts +2 -1
  278. package/dist/server/pages-asset-tags.d.ts +2 -1
  279. package/dist/server/pages-body-parser-config.d.ts +2 -1
  280. package/dist/server/pages-client-assets.d.ts +4 -0
  281. package/dist/server/pages-data-route.d.ts +2 -1
  282. package/dist/server/pages-document-asset-props.d.ts +2 -1
  283. package/dist/server/pages-document-initial-props.d.ts +2 -1
  284. package/dist/server/pages-execution-tracing.d.ts +2 -1
  285. package/dist/server/pages-execution-tracing.js +1 -1
  286. package/dist/server/pages-get-initial-props.d.ts +2 -1
  287. package/dist/server/pages-page-data.d.ts +7 -1
  288. package/dist/server/pages-page-data.js +35 -12
  289. package/dist/server/pages-page-handler.d.ts +3 -2
  290. package/dist/server/pages-page-handler.js +16 -7
  291. package/dist/server/pages-page-method.d.ts +2 -1
  292. package/dist/server/pages-page-response.d.ts +2 -1
  293. package/dist/server/pages-preview.d.ts +2 -1
  294. package/dist/server/pages-readiness.d.ts +2 -1
  295. package/dist/server/pages-request-pipeline.d.ts +2 -1
  296. package/dist/server/pages-request-pipeline.js +4 -5
  297. package/dist/server/pages-request-stage-entry.d.ts +2 -1
  298. package/dist/server/pages-response-stage-entry.d.ts +2 -1
  299. package/dist/server/pages-route-data-kind.d.ts +2 -1
  300. package/dist/server/prerender-cache-life-header.d.ts +2 -1
  301. package/dist/server/prerender-route-params.d.ts +2 -1
  302. package/dist/server/prod-server.js +9 -3
  303. package/dist/server/request-log.d.ts +2 -1
  304. package/dist/server/request-tracing.d.ts +2 -1
  305. package/dist/server/request-tracing.js +1 -1
  306. package/dist/server/response-start-tracing.js +7 -29
  307. package/dist/server/rsc-render-stream.d.ts +4 -0
  308. package/dist/server/rsc-render-stream.js +25 -0
  309. package/dist/server/seed-cache.d.ts +2 -1
  310. package/dist/server/seed-cache.js +1 -1
  311. package/dist/server/static-file-cache.d.ts +2 -1
  312. package/dist/server/static-file-cache.js +1 -0
  313. package/dist/server/static-layout-client-reuse-proof.d.ts +2 -1
  314. package/dist/server/worker-revalidation-context.d.ts +2 -1
  315. package/dist/server/worker-stages.d.ts +2 -1
  316. package/dist/shims/app.d.ts +2 -1
  317. package/dist/shims/cache-callable-runtime.d.ts +2 -1
  318. package/dist/shims/cache-handler.d.ts +8 -3
  319. package/dist/shims/cache-handler.js +29 -9
  320. package/dist/shims/caught-not-found-boundaries.d.ts +15 -0
  321. package/dist/shims/caught-not-found-boundaries.js +48 -0
  322. package/dist/shims/cdn-purge-routes.d.ts +2 -1
  323. package/dist/shims/client-locale.js +2 -1
  324. package/dist/shims/client-page-root.d.ts +2 -1
  325. package/dist/shims/config.d.ts +2 -1
  326. package/dist/shims/default-forbidden.d.ts +4 -0
  327. package/dist/shims/default-forbidden.js +18 -0
  328. package/dist/shims/default-not-found.d.ts +0 -5
  329. package/dist/shims/default-not-found.js +5 -41
  330. package/dist/shims/default-unauthorized.d.ts +4 -0
  331. package/dist/shims/default-unauthorized.js +18 -0
  332. package/dist/shims/error-boundary.d.ts +39 -3
  333. package/dist/shims/error-boundary.js +31 -16
  334. package/dist/shims/font-google.js +1 -2
  335. package/dist/shims/font-utils.d.ts +3 -2
  336. package/dist/shims/font-utils.js +5 -3
  337. package/dist/shims/form.js +1 -1
  338. package/dist/shims/http-access-error-fallback.d.ts +7 -0
  339. package/dist/shims/http-access-error-fallback.js +47 -0
  340. package/dist/shims/image.d.ts +1 -22
  341. package/dist/shims/internal/app-prefetch-fetch-queue.d.ts +22 -2
  342. package/dist/shims/internal/app-prefetch-fetch-queue.js +71 -18
  343. package/dist/shims/internal/app-route-prefetch-policy.d.ts +14 -3
  344. package/dist/shims/internal/app-route-prefetch-policy.js +29 -4
  345. package/dist/shims/internal/cache-context-accessor.d.ts +2 -1
  346. package/dist/shims/internal/client-reference-loader.d.ts +7 -0
  347. package/dist/shims/internal/client-reference-loader.js +91 -0
  348. package/dist/shims/internal/cookie-serialize.d.ts +2 -1
  349. package/dist/shims/internal/cookies.js +1 -2
  350. package/dist/shims/internal/headers-state.d.ts +2 -0
  351. package/dist/shims/internal/headers-state.js +6 -1
  352. package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +2 -1
  353. package/dist/shims/internal/interpolate-as.d.ts +2 -1
  354. package/dist/shims/internal/pages-data-target.d.ts +2 -1
  355. package/dist/shims/internal/pages-data-url.d.ts +2 -1
  356. package/dist/shims/internal/thenable-well-known-properties.d.ts +2 -1
  357. package/dist/shims/link.js +195 -52
  358. package/dist/shims/metadata.d.ts +32 -11
  359. package/dist/shims/metadata.js +88 -26
  360. package/dist/shims/navigation-errors.d.ts +2 -1
  361. package/dist/shims/navigation.d.ts +22 -2
  362. package/dist/shims/navigation.js +74 -20
  363. package/dist/shims/pages-router-runtime.d.ts +2 -1
  364. package/dist/shims/ppr-fallback-shell.d.ts +2 -1
  365. package/dist/shims/router.js +14 -3
  366. package/dist/shims/unified-request-context.js +3 -3
  367. package/dist/typegen.d.ts +2 -1
  368. package/dist/utils/client-build-manifest.d.ts +4 -1
  369. package/dist/utils/client-build-manifest.js +9 -2
  370. package/dist/utils/client-entry-manifest.d.ts +13 -0
  371. package/dist/utils/client-entry-manifest.js +20 -1
  372. package/dist/utils/client-reference-chunks.d.ts +45 -0
  373. package/dist/utils/client-reference-chunks.js +30 -0
  374. package/dist/utils/client-runtime-metadata.d.ts +9 -1
  375. package/dist/utils/client-runtime-metadata.js +40 -9
  376. package/dist/utils/compare.d.ts +9 -0
  377. package/dist/utils/compare.js +15 -1
  378. package/dist/utils/lazy-chunks.d.ts +14 -0
  379. package/dist/utils/lazy-chunks.js +27 -1
  380. package/dist/utils/middleware-request-headers.d.ts +2 -1
  381. package/dist/utils/project.d.ts +2 -1
  382. package/dist/utils/project.js +9 -1
  383. package/dist/utils/query.d.ts +2 -1
  384. package/dist/utils/sorted-array.d.ts +2 -1
  385. package/dist/utils/vite-cli-invocation.d.ts +2 -1
  386. package/package.json +5 -5
  387. package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +0 -808
  388. package/dist/server/default-not-found-module.d.ts +0 -19
  389. package/dist/server/default-not-found-module.js +0 -18
  390. package/dist/server/rsc-stream-hints.d.ts +0 -21
  391. package/dist/server/rsc-stream-hints.js +0 -227
@@ -200,4 +200,4 @@ function hasAppNavigationRuntimeBootstrap() {
200
200
  return getNavigationRuntime() !== null;
201
201
  }
202
202
  //#endregion
203
- export { NAVIGATION_RUNTIME_KEY, createNavigationRuntimeRouteManifestLoader, ensureNavigationRuntimeRscBootstrap, getNavigationRuntime, hasAppNavigationRuntime, hasAppNavigationRuntimeBootstrap, loadNavigationRuntimeRouteManifest, registerNavigationRuntimeBootstrap, registerNavigationRuntimeFunctions };
203
+ export { NAVIGATION_RUNTIME_KEY, createNavigationRuntimeRouteManifestLoader, ensureNavigationRuntimeRscBootstrap, getNavigationRuntime, hasAppNavigationRuntime, hasAppNavigationRuntimeBootstrap, isNavigationRuntimeFunctions, loadNavigationRuntimeRouteManifest, registerNavigationRuntimeBootstrap, registerNavigationRuntimeFunctions };
@@ -39,4 +39,5 @@ export declare function navigatePagesRouterLinkWithFallback({ router, loadRouter
39
39
  navigation: PagesRouterLinkNavigation;
40
40
  fallback: () => void;
41
41
  }): Promise<void>;
42
- //#endregion
42
+ //#endregion
43
+ export {};
@@ -5,10 +5,33 @@ export type VinextLinkPrefetchRoute = {
5
5
  documentOnly?: boolean;
6
6
  isDynamic: boolean;
7
7
  patternParts: string[];
8
+ /**
9
+ * The route's segment config rules out static generation, so Next.js
10
+ * renders it on every request, and its automatic prefetch never renders the
11
+ * page. Read at build time. Never set with Cache Components: segment config
12
+ * doesn't decide what renders dynamically there, so an automatic prefetch of
13
+ * a dynamic route without a loading boundary still renders its page
14
+ * (Next.js prefetches its static shell instead).
15
+ */
16
+ rendersDynamically?: true;
17
+ /**
18
+ * Intercepting pages that can render a URL of this route under a matching
19
+ * interception context. Next.js builds each as its own route, so its
20
+ * `rendersDynamically` replaces the route's own then. Set only alongside
21
+ * `rendersDynamically` classification.
22
+ */
23
+ intercepts?: VinextLinkPrefetchIntercept[];
8
24
  requiresDynamicNavigationRequest?: boolean;
9
25
  /** The route has dynamic params above its root layout. */
10
26
  hasRootParams?: true;
11
27
  };
28
+ export type VinextLinkPrefetchIntercept = {
29
+ /** The URL pattern of the route the interception context must be on, or below. */
30
+ sourcePatternParts: string[];
31
+ /** The URL pattern the intercepting page intercepts. */
32
+ targetPatternParts: string[];
33
+ rendersDynamically?: true;
34
+ };
12
35
  /**
13
36
  * Pages Router route pattern exposed to the client so the App Router's
14
37
  * navigation runtime can decide whether a soft-navigated URL should be
@@ -49,4 +72,5 @@ type VinextLocaleGlobalTarget = {
49
72
  export declare function extractVinextNextDataJson(html: string): string | null;
50
73
  export declare function parseVinextNextDataJson(json: string): BrowserVinextNextData;
51
74
  export declare function applyVinextLocaleGlobals(target: VinextLocaleGlobalTarget, nextData: VinextNextData): void;
52
- //#endregion
75
+ //#endregion
76
+ export {};
@@ -168,4 +168,5 @@ type WindowNext = {
168
168
  */
169
169
  export declare function installWindowNext(fields: Partial<WindowNext>): void;
170
170
  export declare function setWindowNextInternalSourcePage(sourcePage: string | null): void;
171
- //#endregion
171
+ //#endregion
172
+ export {};
@@ -55,7 +55,7 @@ export declare function checkHasConditions(has: HasCondition[] | undefined, miss
55
55
  */
56
56
  export type RedirectMatch = {
57
57
  destination: string;
58
- permanent: boolean;
58
+ statusCode: number;
59
59
  destinationQuery: RedirectDestinationQueryPart[];
60
60
  };
61
61
  /**
@@ -157,6 +157,17 @@ export declare function sanitizeDestination(dest: string): string;
157
157
  * https://github.com/vercel/next.js/blob/canary/packages/next/src/server/server-route-utils.ts
158
158
  */
159
159
  export declare function preserveRedirectDestinationQuery(destination: string, requestSearch: string, destinationQuery?: RedirectDestinationQueryPart[]): string;
160
+ /**
161
+ * Percent-encode what a config-redirect `Location` header cannot carry.
162
+ *
163
+ * The destination template was already parsed like a URL by matchRedirect, so
164
+ * its literal path, hash and host are encoded as Next.js sends them. Captures
165
+ * and the destination query are inserted verbatim, like Next.js, so they can
166
+ * still hold control or non-ASCII characters. Next.js writes those raw and its
167
+ * Node server answers 500 for a character above U+00FF (the Headers
168
+ * constructor throws the same way); vinext percent-encodes them instead.
169
+ */
170
+ export declare function encodeRedirectLocation(location: string): string;
160
171
  /**
161
172
  * Proxy an incoming request to an external URL and return the upstream response.
162
173
  *
@@ -388,10 +388,13 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
388
388
  onRuleSourceMatch?.(redirect);
389
389
  const conditionParams = redirect.has || redirect.missing ? collectConditionParams(redirect.has, redirect.missing, ctx) : _emptyParams();
390
390
  if (!conditionParams) continue;
391
- localeMatch = resolveRedirectMatch(redirect, {
392
- [entry.paramName]: "",
393
- ...conditionParams
394
- });
391
+ localeMatch = {
392
+ redirect,
393
+ params: {
394
+ [entry.paramName]: "",
395
+ ...conditionParams
396
+ }
397
+ };
395
398
  localeMatchIndex = entry.originalIndex;
396
399
  break;
397
400
  }
@@ -408,10 +411,13 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
408
411
  onRuleSourceMatch?.(redirect);
409
412
  const conditionParams = redirect.has || redirect.missing ? collectConditionParams(redirect.has, redirect.missing, ctx) : _emptyParams();
410
413
  if (!conditionParams) continue;
411
- localeMatch = resolveRedirectMatch(redirect, {
412
- [entry.paramName]: localePart,
413
- ...conditionParams
414
- });
414
+ localeMatch = {
415
+ redirect,
416
+ params: {
417
+ [entry.paramName]: localePart,
418
+ ...conditionParams
419
+ }
420
+ };
415
421
  localeMatchIndex = entry.originalIndex;
416
422
  break;
417
423
  }
@@ -428,10 +434,10 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
428
434
  return resolveRedirectMatch(redirect, {
429
435
  ...params,
430
436
  ...conditionParams
431
- });
437
+ }, basePathState);
432
438
  }
433
439
  }
434
- return localeMatch;
440
+ return localeMatch && resolveRedirectMatch(localeMatch.redirect, localeMatch.params, basePathState);
435
441
  }
436
442
  /**
437
443
  * Apply rewrite rules from next.config.js.
@@ -492,11 +498,83 @@ function matchesRewriteSource(pathname, rewrite, basePathState = _BASEPATH_DEFAU
492
498
  function substituteAndSanitizeDestination(destination, params, kind) {
493
499
  return sanitizeDestination(substituteDestinationParams(destination, params, kind));
494
500
  }
495
- function resolveRedirectMatch(redirect, params) {
501
+ /**
502
+ * Prepare a redirect destination template as Next.js does before substituting
503
+ * params. processRoutes (load-custom-routes.ts) prefixes a local destination
504
+ * with the basePath (a bare `/` becomes the basePath, except on the
505
+ * default-locale variant), then parseDestination (prepare-destination.ts) parses it
506
+ * with the URL parser, its param tokens escaped so they survive. This trims
507
+ * whitespace, resolves dot segments and backslashes, percent-encodes the path
508
+ * and hash, punycodes the host, drops an empty query or hash, and throws (a
509
+ * 500) on an invalid absolute URL. Captures are substituted afterwards, so the
510
+ * parser never sees them. The query text is kept verbatim, as
511
+ * preserveRedirectDestinationQuery emits it.
512
+ */
513
+ function parseRedirectDestinationTemplate(redirect, params, { basePath, hadBasePath }) {
514
+ let template = redirect.destination;
515
+ const isLocal = template.startsWith("/");
516
+ if (isLocal && basePath && hadBasePath) template = template === "/" && !redirect.defaultLocaleVariant ? basePath : basePath + template;
517
+ template = template.replace(LOCATION_STRIPPED_RE, "");
518
+ let marker = "__ESC_COLON_";
519
+ while (template.toLowerCase().includes(marker.toLowerCase())) marker = `_${marker}`;
520
+ const paramValues = Object.values(params);
521
+ let literalColon = "__ESC_LITERAL_COLON_";
522
+ while (template.includes(literalColon) || paramValues.some((value) => value.includes(literalColon))) literalColon = `_${literalColon}`;
523
+ const keys = Object.keys(params).sort((a, b) => b.length - a.length);
524
+ const keyPattern = keys.map((key) => key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
525
+ const escaped = keys.length === 0 ? template : template.replace(new RegExp(`\\\\.|:(${keyPattern})(?![A-Za-z0-9_])`, "gs"), (match, key) => key ? `${marker}${key}` : match);
526
+ const consumeEscapes = (value) => value.replace(/\\(.)/gs, (_, char) => char === ":" ? literalColon : char);
527
+ let url;
528
+ try {
529
+ url = isLocal ? new URL(`http://n${escaped}`) : new URL(escaped);
530
+ } catch {
531
+ return {
532
+ template,
533
+ literalColon,
534
+ parsed: false
535
+ };
536
+ }
537
+ const hash = url.hash;
538
+ url.search = "";
539
+ url.hash = "";
540
+ const hashIndex = template.indexOf("#");
541
+ const beforeHash = hashIndex === -1 ? template : template.slice(0, hashIndex);
542
+ const queryIndex = beforeHash.indexOf("?");
543
+ const query = queryIndex === -1 ? "" : beforeHash.slice(queryIndex);
544
+ let base = isLocal ? url.pathname : url.href;
545
+ if (!isLocal && (url.username || url.password)) {
546
+ const auth = url.username ? `${encodeURIComponent(url.password ? `${url.username}:${url.password}` : url.username).replace(/%3A/i, ":")}@` : "";
547
+ url.username = "";
548
+ url.password = "";
549
+ base = url.href.replace("//", `//${auth}`);
550
+ }
551
+ if (!isLocal && !SPECIAL_SCHEME_RE.test(url.protocol)) base = base.slice(0, base.length - url.pathname.length) + consumeEscapes(url.pathname);
552
+ const markerRe = new RegExp(`${marker}(${keyPattern})`, "gi");
553
+ const unescape = (value) => keys.length === 0 ? value : value.replace(markerRe, (_, key) => `:${keys.includes(key) ? key : keys.find((k) => k.toLowerCase() === key.toLowerCase())}`);
554
+ return {
555
+ template: `${unescape(base)}${/^\?&*$/.test(query) ? "" : query}${unescape(consumeEscapes(hash))}`,
556
+ literalColon,
557
+ parsed: true
558
+ };
559
+ }
560
+ const SPECIAL_SCHEME_RE = /^(?:https?|wss?|ftp|file):$/;
561
+ const REDIRECT_ORIGIN_RE = /^[A-Za-z][A-Za-z0-9+.-]*:\/\/[^/?#]*/;
562
+ /**
563
+ * Next.js resolve-routes.ts runs normalizeRepeatedSlashes on the prepared
564
+ * destination's pathname, after params are substituted: backslashes become
565
+ * `/` and runs of slashes collapse, so a basePath-prefixed `//target`
566
+ * becomes `/docs/target`. `destination` starts at the pathname.
567
+ */
568
+ function normalizeRedirectPathnameSlashes(destination) {
569
+ return destination.replace(/^[^?#]*/, (pathname) => pathname.replace(/\\/g, "/").replace(/\/\/+/g, "/"));
570
+ }
571
+ function resolveRedirectMatch(redirect, params, basePathState) {
572
+ const { template: destination, literalColon, parsed } = parseRedirectDestinationTemplate(redirect, params, basePathState);
573
+ const origin = REDIRECT_ORIGIN_RE.exec(destination)?.[0] ?? "";
496
574
  return {
497
- destination: substituteAndSanitizeDestination(redirect.destination, params, "redirect"),
498
- permanent: redirect.permanent,
499
- destinationQuery: substituteRedirectDestinationQuery(redirect.destination, params)
575
+ destination: (!parsed ? substituteAndSanitizeDestination(destination, params, "redirect") : origin ? substituteDestinationParams(origin, params, "redirect") + normalizeRedirectPathnameSlashes(substituteDestinationParams(destination.slice(origin.length), params, "redirect")) : normalizeRedirectPathnameSlashes(substituteAndSanitizeDestination(destination, params, "redirect"))).replaceAll(literalColon, ":"),
576
+ statusCode: redirect.statusCode || (redirect.permanent ? 308 : 307),
577
+ destinationQuery: substituteRedirectDestinationQuery(destination, params)
500
578
  };
501
579
  }
502
580
  /**
@@ -639,6 +717,22 @@ function preserveRedirectDestinationQuery(destination, requestSearch, destinatio
639
717
  }).flat().join("&");
640
718
  return mergedQuery === "" ? `${pathPart}${hash}` : `${pathPart}?${mergedQuery}${hash}`;
641
719
  }
720
+ const LOCATION_STRIPPED_RE = /^[\u0000- ]+|[\u0000- ]+$|[\t\n\r]/g;
721
+ const LOCATION_UNSAFE_RE = /[\u0000-\u0008\u000A-\u001F\u007F]|[^\u0000-\u007F]/gu;
722
+ const LONE_SURROGATE_RE = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
723
+ /**
724
+ * Percent-encode what a config-redirect `Location` header cannot carry.
725
+ *
726
+ * The destination template was already parsed like a URL by matchRedirect, so
727
+ * its literal path, hash and host are encoded as Next.js sends them. Captures
728
+ * and the destination query are inserted verbatim, like Next.js, so they can
729
+ * still hold control or non-ASCII characters. Next.js writes those raw and its
730
+ * Node server answers 500 for a character above U+00FF (the Headers
731
+ * constructor throws the same way); vinext percent-encodes them instead.
732
+ */
733
+ function encodeRedirectLocation(location) {
734
+ return location.replace(LONE_SURROGATE_RE, "�").replace(LOCATION_UNSAFE_RE, encodeURIComponent);
735
+ }
642
736
  function parseExternalRewriteUrl(externalUrl) {
643
737
  try {
644
738
  return new URL(externalUrl);
@@ -901,7 +995,8 @@ function applyLocaleToRoutes(routes, i18n, type, options = {}) {
901
995
  const localizedSource = `/${locale}${suffixFor(r.source)}`;
902
996
  out.push({
903
997
  ...r,
904
- source: localizedSource
998
+ source: localizedSource,
999
+ ...type === "redirect" ? { defaultLocaleVariant: true } : {}
905
1000
  });
906
1001
  }
907
1002
  const internalSource = `${internalLocale}${suffixFor(r.source)}`;
@@ -918,4 +1013,4 @@ function applyLocaleToRoutes(routes, i18n, type, options = {}) {
918
1013
  return out;
919
1014
  }
920
1015
  //#endregion
921
- export { applyLocaleToRoutes, applyMiddlewareRequestHeaders, checkHasConditions, configSourceError, isExternalUrl, matchConfigPattern, matchHeaders, matchRedirect, matchRewrite, matchesRewriteSource, normalizeHost, parseCookies, preserveRedirectDestinationQuery, proxyExternalRequest, requestContextFromRequest, sanitizeDestination };
1016
+ export { applyLocaleToRoutes, applyMiddlewareRequestHeaders, checkHasConditions, configSourceError, encodeRedirectLocation, isExternalUrl, matchConfigPattern, matchHeaders, matchRedirect, matchRewrite, matchesRewriteSource, normalizeHost, parseCookies, preserveRedirectDestinationQuery, proxyExternalRequest, requestContextFromRequest, sanitizeDestination };
@@ -47,4 +47,5 @@ export declare function getDotenvFiles(mode: string): string[];
47
47
  * commands (which don't go through Vite at all), this is the only loading.
48
48
  */
49
49
  export declare function loadDotenv({ root, mode, processEnv }: LoadDotenvOptions): LoadDotenvResult;
50
- //#endregion
50
+ //#endregion
51
+ export {};
@@ -18,7 +18,13 @@ export type HasCondition = {
18
18
  export type NextRedirect = {
19
19
  source: string;
20
20
  destination: string;
21
- permanent: boolean;
21
+ /** `true` answers 308, `false` 307. Ignored when `statusCode` is set. */
22
+ permanent?: boolean;
23
+ /**
24
+ * Explicit redirect status, taking precedence over `permanent` as in Next.js
25
+ * `getRedirectStatus` (lib/redirect-status.ts).
26
+ */
27
+ statusCode?: 301 | 302 | 303 | 307 | 308;
22
28
  has?: HasCondition[];
23
29
  missing?: HasCondition[];
24
30
  /**
@@ -36,6 +42,12 @@ export type NextRedirect = {
36
42
  * `.nextjs-ref/packages/next/src/lib/load-custom-routes.ts:26`.
37
43
  */
38
44
  basePath?: false;
45
+ /**
46
+ * Internal: set by `applyLocaleToRoutes` on the `/${defaultLocale}` variant.
47
+ * Next.js `processRoutes` prefixes that variant's destination with the
48
+ * basePath without turning a bare `/` into the bare basePath.
49
+ */
50
+ defaultLocaleVariant?: true;
39
51
  };
40
52
  export type NextRewrite = {
41
53
  source: string;
@@ -374,7 +374,8 @@ function warnDeprecatedConfigOptions(config, root) {
374
374
  ["experimental.instrumentationHook", `\`experimental.instrumentationHook\` is no longer needed, because \`instrumentation.js\` is available by default. You can remove it from ${configFileName}.`]
375
375
  ];
376
376
  for (const [propertyPath, warning] of warnings) if (hasConfigProperty(config, propertyPath)) warnConfigOnce(warning);
377
- if (readOptionalRecord(config.experimental)?.skipTrailingSlashRedirect != null) warnConfigOnce(`\`experimental.skipTrailingSlashRedirect\` has been moved to \`skipTrailingSlashRedirect\`. Please update your ${configFileName} file accordingly.`);
377
+ const experimental = readOptionalRecord(config.experimental);
378
+ for (const key of ["skipTrailingSlashRedirect", "cacheComponents"]) if (experimental?.[key] != null) warnConfigOnce(`\`experimental.${key}\` has been moved to \`${key}\`. Please update your ${configFileName} file accordingly.`);
378
379
  }
379
380
  async function resolveNextConfigInput(config, phase = PHASE_DEVELOPMENT_SERVER) {
380
381
  return await resolveConfigValue(config, phase);
@@ -808,6 +809,28 @@ function validateConfigConditions(type, routes) {
808
809
  }
809
810
  if (invalid.length > 0) throw new Error(`Invalid next.config.js ${type} has/missing condition${invalid.length === 1 ? "" : "s"}:\n${invalid.join("\n")}\nEach item must be { type: header, cookie, query or host, key: string, value?: string }, with a value and no key required for host.`);
810
811
  }
812
+ const REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([
813
+ 301,
814
+ 302,
815
+ 303,
816
+ 307,
817
+ 308
818
+ ]);
819
+ /**
820
+ * Fail config loading on a redirect without a valid status, with the rules of
821
+ * Next.js's checkRedirect (load-custom-routes.ts): `statusCode` must be one of
822
+ * the redirect statuses, and `permanent` a boolean when it is absent.
823
+ */
824
+ function validateRedirectStatuses(redirects) {
825
+ const invalid = [];
826
+ for (const redirect of redirects) {
827
+ const parts = [];
828
+ if (redirect.statusCode && !REDIRECT_STATUS_CODES.has(redirect.statusCode)) parts.push("`statusCode` is not undefined or valid statusCode");
829
+ if (typeof redirect.permanent !== "boolean" && !redirect.statusCode) parts.push("`permanent` is not set to `true` or `false`");
830
+ if (parts.length > 0) invalid.push(` ${describeSource(redirect.source)}: ${parts.join(", ")}`);
831
+ }
832
+ if (invalid.length > 0) throw new Error(`Invalid next.config.js redirect${invalid.length === 1 ? "" : "s"}:\n${invalid.join("\n")}\nValid redirect statusCode values are ${[...REDIRECT_STATUS_CODES].join(", ")}`);
833
+ }
811
834
  /** JSON for a config value, or its type when JSON cannot serialize it. */
812
835
  function describeConfigValue(value) {
813
836
  try {
@@ -950,6 +973,7 @@ async function resolveNextConfig(config, root = toSlash(process.cwd()), options
950
973
  validateConfigSources("redirect", redirects);
951
974
  validateConfigSources("rewrite", allRewrites);
952
975
  validateConfigConditions("redirect", redirects);
976
+ validateRedirectStatuses(redirects);
953
977
  validateConfigConditions("rewrite", allRewrites);
954
978
  const invalidBasePathRewrites = allRewrites.filter((rewrite) => rewrite.basePath === false && !(rewrite.destination.startsWith("http://") || rewrite.destination.startsWith("https://")));
955
979
  if (invalidBasePathRewrites.length > 0) throw new Error(invalidBasePathRewrites.map((rewrite) => `The route ${rewrite.source} rewrites urls outside of the basePath. Please use a destination that starts with \`http://\` or \`https://\` https://nextjs.org/docs/messages/invalid-external-rewrite`).concat(`Invalid rewrite${invalidBasePathRewrites.length === 1 ? "" : "s"} found`).join("\n"));
@@ -986,6 +1010,7 @@ async function resolveNextConfig(config, root = toSlash(process.cwd()), options
986
1010
  };
987
1011
  const allowedDevOrigins = Array.isArray(config.allowedDevOrigins) ? config.allowedDevOrigins : [];
988
1012
  const experimental = readOptionalRecord(config.experimental);
1013
+ const cacheComponents = (experimental?.cacheComponents ?? config.cacheComponents) === true;
989
1014
  const serverActionsConfig = readOptionalRecord(experimental?.serverActions);
990
1015
  const serverActionsAllowedOrigins = readStringArray(serverActionsConfig?.allowedOrigins);
991
1016
  const serverActionsBodySizeLimitConfig = readOptionalBodySizeLimit(serverActionsConfig?.bodySizeLimit);
@@ -1001,7 +1026,7 @@ async function resolveNextConfig(config, root = toSlash(process.cwd()), options
1001
1026
  const appShells = experimental?.appShells === true;
1002
1027
  if (appShells) {
1003
1028
  const missingCoFlags = [];
1004
- if (!config.cacheComponents) missingCoFlags.push("cacheComponents");
1029
+ if (!cacheComponents) missingCoFlags.push("cacheComponents");
1005
1030
  if (!prefetchInlining) missingCoFlags.push("experimental.prefetchInlining");
1006
1031
  if (experimental?.varyParams !== true) missingCoFlags.push("experimental.varyParams");
1007
1032
  if (experimental?.optimisticRouting !== true) missingCoFlags.push("experimental.optimisticRouting");
@@ -1022,7 +1047,7 @@ async function resolveNextConfig(config, root = toSlash(process.cwd()), options
1022
1047
  exclude: lightningCssFeatureNamesToMask(readStringArray(rawLightningCssFeatures?.exclude))
1023
1048
  };
1024
1049
  if (rawLightningCssFeatures && !useLightningcss) console.warn("[vinext] experimental.lightningCssFeatures is set but experimental.useLightningcss is not enabled. The lightningCssFeatures option has no effect without useLightningcss.");
1025
- if (experimental?.cachedNavigations === true && !config.cacheComponents) console.warn("[vinext] `experimental.cachedNavigations` requires `cacheComponents: true` to have any effect. Set `cacheComponents: true` in your next.config, or remove `experimental.cachedNavigations`.");
1050
+ if (experimental?.cachedNavigations === true && !cacheComponents) console.warn("[vinext] `experimental.cachedNavigations` requires `cacheComponents: true` to have any effect. Set `cacheComponents: true` in your next.config, or remove `experimental.cachedNavigations`.");
1026
1051
  if (config.webpack !== void 0) {
1027
1052
  if (mdx || Object.keys(webpackProbe.aliases).length > 0 || webpackProbe.resolveExtensionsCustomized || webpackProbe.instrumentationClientRouteManifest !== void 0) console.warn("[vinext] next.config option \"webpack\" is only partially supported. vinext preserves resolve.alias, resolve.extensions, MDX loader settings, and instrumentation-client route manifests, but other webpack customization is ignored");
1028
1053
  else console.warn("[vinext] next.config option \"webpack\" is not yet supported and will be ignored");
@@ -1073,7 +1098,7 @@ async function resolveNextConfig(config, root = toSlash(process.cwd()), options
1073
1098
  instrumentationClientInject: Array.isArray(config.instrumentationClientInject) ? config.instrumentationClientInject.filter((x) => typeof x === "string") : [],
1074
1099
  instrumentationClientRouteManifest: webpackProbe.instrumentationClientRouteManifest,
1075
1100
  instrumentationServerValueInjections: webpackProbe.instrumentationServerValueInjections,
1076
- cacheComponents: config.cacheComponents ?? false,
1101
+ cacheComponents,
1077
1102
  appNavFailHandling: experimental?.appNavFailHandling === true,
1078
1103
  gestureTransition: experimental?.gestureTransition === true,
1079
1104
  prefetchInlining,
@@ -17,4 +17,5 @@ export declare function loadTsconfigResolutionForRoot(projectRoot: string): Tsco
17
17
  * Back-compat helper for call sites that only need `compilerOptions.paths`.
18
18
  */
19
19
  export declare function loadTsconfigPathAliasesForRoot(projectRoot: string): Record<string, string>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -0,0 +1,23 @@
1
+ import { typeHandlers, types } from "./types/index.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/detector.js
3
+ const firstBytes = /* @__PURE__ */ new Map([
4
+ [0, "heif"],
5
+ [56, "psd"],
6
+ [66, "bmp"],
7
+ [68, "dds"],
8
+ [71, "gif"],
9
+ [73, "tiff"],
10
+ [77, "tiff"],
11
+ [82, "webp"],
12
+ [105, "icns"],
13
+ [137, "png"],
14
+ [255, "jpg"]
15
+ ]);
16
+ function detector(input) {
17
+ const byte = input[0];
18
+ const type = firstBytes.get(byte);
19
+ if (type && typeHandlers.get(type)?.validate(input)) return type;
20
+ return types.find((type) => typeHandlers.get(type)?.validate(input));
21
+ }
22
+ //#endregion
23
+ export { detector };
@@ -0,0 +1,2 @@
1
+ import "./types/index.js";
2
+ export { imageSize } from "./lookup.js";
@@ -0,0 +1,25 @@
1
+ import { typeHandlers } from "./types/index.js";
2
+ import { detector } from "./detector.js";
3
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/lookup.js
4
+ const globalOptions = { disabledTypes: [] };
5
+ function imageSize(input) {
6
+ const type = detector(input);
7
+ if (typeof type !== "undefined") {
8
+ if (globalOptions.disabledTypes.indexOf(type) > -1) throw new TypeError(`disabled file type: ${type}`);
9
+ const size = typeHandlers.get(type)?.calculate(input);
10
+ if (size !== void 0) {
11
+ size.type = size.type ?? type;
12
+ if (size.images && size.images.length > 1) {
13
+ const largestImage = size.images.reduce((largest, current) => {
14
+ return current.width * current.height > largest.width * largest.height ? current : largest;
15
+ }, size.images[0]);
16
+ size.width = largestImage.width;
17
+ size.height = largestImage.height;
18
+ }
19
+ return size;
20
+ }
21
+ }
22
+ throw new TypeError(`unsupported file type: ${type}`);
23
+ }
24
+ //#endregion
25
+ export { imageSize };
@@ -0,0 +1,11 @@
1
+ import { readInt32LE, readUInt32LE, toUTF8String } from "./utils.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/bmp.js
3
+ const BMP = {
4
+ validate: (input) => toUTF8String(input, 0, 2) === "BM",
5
+ calculate: (input) => ({
6
+ height: Math.abs(readInt32LE(input, 22)),
7
+ width: readUInt32LE(input, 18)
8
+ })
9
+ };
10
+ //#endregion
11
+ export { BMP };
@@ -0,0 +1,15 @@
1
+ import { readUInt16LE } from "./utils.js";
2
+ import { ICO } from "./ico.js";
3
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/cur.js
4
+ const TYPE_CURSOR = 2;
5
+ const CUR = {
6
+ validate(input) {
7
+ const reserved = readUInt16LE(input, 0);
8
+ const imageCount = readUInt16LE(input, 4);
9
+ if (reserved !== 0 || imageCount === 0) return false;
10
+ return readUInt16LE(input, 2) === TYPE_CURSOR;
11
+ },
12
+ calculate: (input) => ICO.calculate(input)
13
+ };
14
+ //#endregion
15
+ export { CUR };
@@ -0,0 +1,11 @@
1
+ import { readUInt32LE } from "./utils.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/dds.js
3
+ const DDS = {
4
+ validate: (input) => readUInt32LE(input, 0) === 542327876,
5
+ calculate: (input) => ({
6
+ height: readUInt32LE(input, 12),
7
+ width: readUInt32LE(input, 16)
8
+ })
9
+ };
10
+ //#endregion
11
+ export { DDS };
@@ -0,0 +1,12 @@
1
+ import { readUInt16LE, toUTF8String } from "./utils.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/gif.js
3
+ const gifRegexp = /^GIF8[79]a/;
4
+ const GIF = {
5
+ validate: (input) => gifRegexp.test(toUTF8String(input, 0, 6)),
6
+ calculate: (input) => ({
7
+ height: readUInt16LE(input, 8),
8
+ width: readUInt16LE(input, 6)
9
+ })
10
+ };
11
+ //#endregion
12
+ export { GIF };
@@ -0,0 +1,55 @@
1
+ import { findBox, readUInt32BE, toUTF8String } from "./utils.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/heif.js
3
+ const brandMap = {
4
+ avif: "avif",
5
+ mif1: "heif",
6
+ msf1: "heif",
7
+ heic: "heic",
8
+ heix: "heic",
9
+ hevc: "heic",
10
+ hevx: "heic"
11
+ };
12
+ const HEIF = {
13
+ validate(input) {
14
+ if (toUTF8String(input, 4, 8) !== "ftyp") return false;
15
+ const ftypBox = findBox(input, "ftyp", 0);
16
+ if (!ftypBox) return false;
17
+ return toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12) in brandMap;
18
+ },
19
+ calculate(input) {
20
+ const metaBox = findBox(input, "meta", 0);
21
+ const iprpBox = metaBox && findBox(input, "iprp", metaBox.offset + 12);
22
+ const ipcoBox = iprpBox && findBox(input, "ipco", iprpBox.offset + 8);
23
+ if (!ipcoBox) throw new TypeError("Invalid HEIF, no ipco box found");
24
+ const type = toUTF8String(input, 8, 12);
25
+ const images = [];
26
+ let currentOffset = ipcoBox.offset + 8;
27
+ while (currentOffset < ipcoBox.offset + ipcoBox.size) {
28
+ const ispeBox = findBox(input, "ispe", currentOffset);
29
+ if (!ispeBox) break;
30
+ if (ispeBox.size < 20) throw new TypeError("Invalid HEIF");
31
+ const rawWidth = readUInt32BE(input, ispeBox.offset + 12);
32
+ const rawHeight = readUInt32BE(input, ispeBox.offset + 16);
33
+ const clapBox = findBox(input, "clap", currentOffset);
34
+ let width = rawWidth;
35
+ const height = rawHeight;
36
+ if (clapBox && clapBox.size >= 16 && clapBox.offset < ipcoBox.offset + ipcoBox.size) width = rawWidth - readUInt32BE(input, clapBox.offset + 12);
37
+ images.push({
38
+ height,
39
+ width
40
+ });
41
+ const nextOffset = ispeBox.offset + ispeBox.size;
42
+ if (nextOffset <= currentOffset) throw new TypeError("Invalid HEIF");
43
+ currentOffset = nextOffset;
44
+ }
45
+ if (images.length === 0) throw new TypeError("Invalid HEIF, no sizes found");
46
+ return {
47
+ width: images[0].width,
48
+ height: images[0].height,
49
+ type,
50
+ ...images.length > 1 ? { images } : {}
51
+ };
52
+ }
53
+ };
54
+ //#endregion
55
+ export { HEIF };
@@ -0,0 +1,76 @@
1
+ import { readUInt32BE, toUTF8String } from "./utils.js";
2
+ //#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/icns.js
3
+ const SIZE_HEADER = 8;
4
+ const FILE_LENGTH_OFFSET = 4;
5
+ const ENTRY_LENGTH_OFFSET = 4;
6
+ const ICON_TYPE_SIZE = {
7
+ ICON: 32,
8
+ "ICN#": 32,
9
+ "icm#": 16,
10
+ icm4: 16,
11
+ icm8: 16,
12
+ "ics#": 16,
13
+ ics4: 16,
14
+ ics8: 16,
15
+ is32: 16,
16
+ s8mk: 16,
17
+ icp4: 16,
18
+ icl4: 32,
19
+ icl8: 32,
20
+ il32: 32,
21
+ l8mk: 32,
22
+ icp5: 32,
23
+ ic11: 32,
24
+ ich4: 48,
25
+ ich8: 48,
26
+ ih32: 48,
27
+ h8mk: 48,
28
+ icp6: 64,
29
+ ic12: 32,
30
+ it32: 128,
31
+ t8mk: 128,
32
+ ic07: 128,
33
+ ic08: 256,
34
+ ic13: 256,
35
+ ic09: 512,
36
+ ic14: 512,
37
+ ic10: 1024
38
+ };
39
+ function readImageHeader(input, imageOffset) {
40
+ const imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET;
41
+ if (imageLengthOffset + 4 > input.length) throw new TypeError("Invalid ICNS");
42
+ return [toUTF8String(input, imageOffset, imageLengthOffset), readUInt32BE(input, imageLengthOffset)];
43
+ }
44
+ function getImageSize(type) {
45
+ const size = ICON_TYPE_SIZE[type];
46
+ return {
47
+ width: size,
48
+ height: size,
49
+ type
50
+ };
51
+ }
52
+ const ICNS = {
53
+ validate: (input) => toUTF8String(input, 0, 4) === "icns",
54
+ calculate(input) {
55
+ const inputLength = input.length;
56
+ const fileLength = readUInt32BE(input, FILE_LENGTH_OFFSET);
57
+ let imageOffset = SIZE_HEADER;
58
+ const images = [];
59
+ while (imageOffset < fileLength && imageOffset < inputLength) {
60
+ const imageHeader = readImageHeader(input, imageOffset);
61
+ const entryLength = imageHeader[1];
62
+ if (entryLength < 8) throw new TypeError("Invalid ICNS");
63
+ const imageSize = getImageSize(imageHeader[0]);
64
+ images.push(imageSize);
65
+ imageOffset += entryLength;
66
+ }
67
+ if (images.length === 0) throw new TypeError("Invalid ICNS, no sizes found");
68
+ return {
69
+ width: images[0].width,
70
+ height: images[0].height,
71
+ ...images.length > 1 ? { images } : {}
72
+ };
73
+ }
74
+ };
75
+ //#endregion
76
+ export { ICNS };