lkd-web-kit 0.7.14 → 0.7.16

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 (386) hide show
  1. package/dist/components/EmptyState/index.cjs +5 -5
  2. package/dist/components/Icon.cjs +2 -2
  3. package/dist/components/InfinityLoadMoreButton/index.cjs +15 -8
  4. package/dist/components/InfinityLoadMoreButton/index.js +13 -6
  5. package/dist/components/{SelectInfinity → InfinitySelect}/index.cjs +17 -12
  6. package/dist/components/{SelectInfinity → InfinitySelect}/index.js +14 -9
  7. package/dist/components/MyCheckboxGroup/index.cjs +2 -2
  8. package/dist/components/MyDateInput/index.cjs +3 -3
  9. package/dist/components/MyDatePickerInput/CalendarIcon.cjs +7 -7
  10. package/dist/components/MyDatePickerInput/index.cjs +3 -3
  11. package/dist/components/MyDateTimePicker/index.cjs +3 -3
  12. package/dist/components/MyMonthPickerInput/index.cjs +3 -3
  13. package/dist/components/MyMultiSelect/index.cjs +2 -2
  14. package/dist/components/MyNotifications/index.cjs +2 -2
  15. package/dist/components/MyNumberInput/index.cjs +2 -2
  16. package/dist/components/MyRadioGroup/index.cjs +2 -2
  17. package/dist/components/MySelect/index.cjs +2 -2
  18. package/dist/components/MyTextInput/index.cjs +2 -2
  19. package/dist/components/MyTextarea/index.cjs +2 -2
  20. package/dist/components/MyTimeInput/index.cjs +2 -2
  21. package/dist/components/NavItems.cjs +4 -4
  22. package/dist/contexts/NavigationHistoryContext/hook.cjs +2 -2
  23. package/dist/contexts/NavigationHistoryContext/hook.js +2 -2
  24. package/dist/contexts/NavigationHistoryContext/index.cjs +3 -3
  25. package/dist/contexts/PageDataContext/index.cjs +2 -2
  26. package/dist/form/Form.cjs +2 -2
  27. package/dist/form/{FormButtonSubmit.cjs → FormSubmitButton.cjs} +4 -4
  28. package/dist/form/{FormButtonSubmit.js → FormSubmitButton.js} +2 -2
  29. package/dist/form/base/FormCheckbox.cjs +2 -2
  30. package/dist/form/base/FormCheckboxGroup.cjs +2 -2
  31. package/dist/form/base/FormDateInput.cjs +2 -2
  32. package/dist/form/base/FormDatePickerInput.cjs +2 -2
  33. package/dist/form/base/FormDateTimePicker.cjs +2 -2
  34. package/dist/form/base/FormMonthPickerInput.cjs +2 -2
  35. package/dist/form/base/FormMultiSelect.cjs +2 -2
  36. package/dist/form/base/FormNumberInput.cjs +2 -2
  37. package/dist/form/base/FormRadioGroup.cjs +2 -2
  38. package/dist/form/base/FormSelect.cjs +2 -2
  39. package/dist/form/base/FormSelectInfinity.cjs +3 -3
  40. package/dist/form/base/FormSelectInfinity.js +1 -1
  41. package/dist/form/base/FormTextInput.cjs +2 -2
  42. package/dist/form/base/FormTextarea.cjs +2 -2
  43. package/dist/form/base/FormTimeInput.cjs +2 -2
  44. package/dist/hocs/withController.cjs +3 -3
  45. package/dist/hocs/withModalManager.cjs +2 -2
  46. package/dist/index.cjs +37 -39
  47. package/dist/index.d.ts +8 -21
  48. package/dist/index.js +2 -3
  49. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.cjs +2 -2
  50. package/package.json +2 -2
  51. package/dist/_virtual/___vite-browser-external.cjs +0 -12
  52. package/dist/_virtual/___vite-browser-external.js +0 -6
  53. package/dist/_virtual/__vite-browser-external.cjs +0 -5
  54. package/dist/_virtual/__vite-browser-external.js +0 -3
  55. package/dist/_virtual/_commonjsHelpers.cjs +0 -34
  56. package/dist/_virtual/_commonjsHelpers.js +0 -30
  57. package/dist/_virtual/_interop_require_default.cjs +0 -7
  58. package/dist/_virtual/_interop_require_default.js +0 -3
  59. package/dist/_virtual/_interop_require_wildcard.cjs +0 -7
  60. package/dist/_virtual/_interop_require_wildcard.js +0 -3
  61. package/dist/_virtual/add-base-path.cjs +0 -7
  62. package/dist/_virtual/add-base-path.js +0 -3
  63. package/dist/_virtual/add-locale.cjs +0 -7
  64. package/dist/_virtual/add-locale.js +0 -3
  65. package/dist/_virtual/add-locale2.cjs +0 -7
  66. package/dist/_virtual/add-locale2.js +0 -3
  67. package/dist/_virtual/add-path-prefix.cjs +0 -7
  68. package/dist/_virtual/add-path-prefix.js +0 -3
  69. package/dist/_virtual/add-path-suffix.cjs +0 -7
  70. package/dist/_virtual/add-path-suffix.js +0 -3
  71. package/dist/_virtual/app-paths.cjs +0 -7
  72. package/dist/_virtual/app-paths.js +0 -3
  73. package/dist/_virtual/bloom-filter.cjs +0 -7
  74. package/dist/_virtual/bloom-filter.js +0 -3
  75. package/dist/_virtual/compare-states.cjs +0 -7
  76. package/dist/_virtual/compare-states.js +0 -3
  77. package/dist/_virtual/constants.cjs +0 -7
  78. package/dist/_virtual/constants.js +0 -3
  79. package/dist/_virtual/denormalize-page-path.cjs +0 -7
  80. package/dist/_virtual/denormalize-page-path.js +0 -3
  81. package/dist/_virtual/deployment-id.cjs +0 -7
  82. package/dist/_virtual/deployment-id.js +0 -3
  83. package/dist/_virtual/detect-domain-locale.cjs +0 -7
  84. package/dist/_virtual/detect-domain-locale.js +0 -3
  85. package/dist/_virtual/detect-domain-locale2.cjs +0 -7
  86. package/dist/_virtual/detect-domain-locale2.js +0 -3
  87. package/dist/_virtual/disable-smooth-scroll.cjs +0 -7
  88. package/dist/_virtual/disable-smooth-scroll.js +0 -3
  89. package/dist/_virtual/encode-uri-path.cjs +0 -7
  90. package/dist/_virtual/encode-uri-path.js +0 -3
  91. package/dist/_virtual/ensure-leading-slash.cjs +0 -7
  92. package/dist/_virtual/ensure-leading-slash.js +0 -3
  93. package/dist/_virtual/escape-regexp.cjs +0 -7
  94. package/dist/_virtual/escape-regexp.js +0 -3
  95. package/dist/_virtual/format-next-pathname-info.cjs +0 -7
  96. package/dist/_virtual/format-next-pathname-info.js +0 -3
  97. package/dist/_virtual/format-url.cjs +0 -7
  98. package/dist/_virtual/format-url.js +0 -3
  99. package/dist/_virtual/get-asset-path-from-route.cjs +0 -7
  100. package/dist/_virtual/get-asset-path-from-route.js +0 -3
  101. package/dist/_virtual/get-cookie-parser.cjs +0 -7
  102. package/dist/_virtual/get-cookie-parser.js +0 -3
  103. package/dist/_virtual/get-dynamic-param.cjs +0 -7
  104. package/dist/_virtual/get-dynamic-param.js +0 -3
  105. package/dist/_virtual/get-next-pathname-info.cjs +0 -7
  106. package/dist/_virtual/get-next-pathname-info.js +0 -3
  107. package/dist/_virtual/get-segment-param.cjs +0 -7
  108. package/dist/_virtual/get-segment-param.js +0 -3
  109. package/dist/_virtual/has-base-path.cjs +0 -7
  110. package/dist/_virtual/has-base-path.js +0 -3
  111. package/dist/_virtual/head-manager-context.shared-runtime.cjs +0 -7
  112. package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
  113. package/dist/_virtual/html-bots.cjs +0 -7
  114. package/dist/_virtual/html-bots.js +0 -3
  115. package/dist/_virtual/index.cjs +0 -7
  116. package/dist/_virtual/index.js +0 -3
  117. package/dist/_virtual/index2.cjs +0 -7
  118. package/dist/_virtual/index2.js +0 -3
  119. package/dist/_virtual/index3.cjs +0 -7
  120. package/dist/_virtual/index3.js +0 -3
  121. package/dist/_virtual/index4.cjs +0 -7
  122. package/dist/_virtual/index4.js +0 -3
  123. package/dist/_virtual/index5.cjs +0 -7
  124. package/dist/_virtual/index5.js +0 -3
  125. package/dist/_virtual/interception-routes.cjs +0 -7
  126. package/dist/_virtual/interception-routes.js +0 -3
  127. package/dist/_virtual/interpolate-as.cjs +0 -7
  128. package/dist/_virtual/interpolate-as.js +0 -3
  129. package/dist/_virtual/invariant-error.cjs +0 -7
  130. package/dist/_virtual/invariant-error.js +0 -3
  131. package/dist/_virtual/is-api-route.cjs +0 -7
  132. package/dist/_virtual/is-api-route.js +0 -3
  133. package/dist/_virtual/is-bot.cjs +0 -7
  134. package/dist/_virtual/is-bot.js +0 -3
  135. package/dist/_virtual/is-dynamic.cjs +0 -7
  136. package/dist/_virtual/is-dynamic.js +0 -3
  137. package/dist/_virtual/is-error.cjs +0 -7
  138. package/dist/_virtual/is-error.js +0 -3
  139. package/dist/_virtual/is-local-url.cjs +0 -7
  140. package/dist/_virtual/is-local-url.js +0 -3
  141. package/dist/_virtual/is-plain-object.cjs +0 -7
  142. package/dist/_virtual/is-plain-object.js +0 -3
  143. package/dist/_virtual/mitt.cjs +0 -7
  144. package/dist/_virtual/mitt.js +0 -3
  145. package/dist/_virtual/normalize-locale-path.cjs +0 -7
  146. package/dist/_virtual/normalize-locale-path.js +0 -3
  147. package/dist/_virtual/normalize-path-sep.cjs +0 -7
  148. package/dist/_virtual/normalize-path-sep.js +0 -3
  149. package/dist/_virtual/normalize-trailing-slash.cjs +0 -7
  150. package/dist/_virtual/normalize-trailing-slash.js +0 -3
  151. package/dist/_virtual/omit.cjs +0 -7
  152. package/dist/_virtual/omit.js +0 -3
  153. package/dist/_virtual/parse-loader-tree.cjs +0 -7
  154. package/dist/_virtual/parse-loader-tree.js +0 -3
  155. package/dist/_virtual/parse-path.cjs +0 -7
  156. package/dist/_virtual/parse-path.js +0 -3
  157. package/dist/_virtual/parse-relative-url.cjs +0 -7
  158. package/dist/_virtual/parse-relative-url.js +0 -3
  159. package/dist/_virtual/parse-url.cjs +0 -7
  160. package/dist/_virtual/parse-url.js +0 -3
  161. package/dist/_virtual/path-has-prefix.cjs +0 -7
  162. package/dist/_virtual/path-has-prefix.js +0 -3
  163. package/dist/_virtual/path-match.cjs +0 -7
  164. package/dist/_virtual/path-match.js +0 -3
  165. package/dist/_virtual/prepare-destination.cjs +0 -7
  166. package/dist/_virtual/prepare-destination.js +0 -3
  167. package/dist/_virtual/querystring.cjs +0 -7
  168. package/dist/_virtual/querystring.js +0 -3
  169. package/dist/_virtual/react-is.development.cjs +0 -7
  170. package/dist/_virtual/react-is.development.js +0 -3
  171. package/dist/_virtual/react-is.production.cjs +0 -7
  172. package/dist/_virtual/react-is.production.js +0 -3
  173. package/dist/_virtual/remove-base-path.cjs +0 -7
  174. package/dist/_virtual/remove-base-path.js +0 -3
  175. package/dist/_virtual/remove-locale.cjs +0 -7
  176. package/dist/_virtual/remove-locale.js +0 -3
  177. package/dist/_virtual/remove-path-prefix.cjs +0 -7
  178. package/dist/_virtual/remove-path-prefix.js +0 -3
  179. package/dist/_virtual/remove-trailing-slash.cjs +0 -7
  180. package/dist/_virtual/remove-trailing-slash.js +0 -3
  181. package/dist/_virtual/request-idle-callback.cjs +0 -7
  182. package/dist/_virtual/request-idle-callback.js +0 -3
  183. package/dist/_virtual/resolve-href.cjs +0 -7
  184. package/dist/_virtual/resolve-href.js +0 -3
  185. package/dist/_virtual/resolve-rewrites.cjs +0 -7
  186. package/dist/_virtual/resolve-rewrites.js +0 -3
  187. package/dist/_virtual/route-loader.cjs +0 -7
  188. package/dist/_virtual/route-loader.js +0 -3
  189. package/dist/_virtual/route-match-utils.cjs +0 -7
  190. package/dist/_virtual/route-match-utils.js +0 -3
  191. package/dist/_virtual/route-matcher.cjs +0 -7
  192. package/dist/_virtual/route-matcher.js +0 -3
  193. package/dist/_virtual/route-pattern-normalizer.cjs +0 -7
  194. package/dist/_virtual/route-pattern-normalizer.js +0 -3
  195. package/dist/_virtual/route-regex.cjs +0 -7
  196. package/dist/_virtual/route-regex.js +0 -3
  197. package/dist/_virtual/router-context.shared-runtime.cjs +0 -7
  198. package/dist/_virtual/router-context.shared-runtime.js +0 -3
  199. package/dist/_virtual/router.cjs +0 -9
  200. package/dist/_virtual/router.js +0 -5
  201. package/dist/_virtual/router2.cjs +0 -7
  202. package/dist/_virtual/router2.js +0 -3
  203. package/dist/_virtual/router3.cjs +0 -7
  204. package/dist/_virtual/router3.js +0 -3
  205. package/dist/_virtual/script.cjs +0 -7
  206. package/dist/_virtual/script.js +0 -3
  207. package/dist/_virtual/segment.cjs +0 -7
  208. package/dist/_virtual/segment.js +0 -3
  209. package/dist/_virtual/set-attributes-from-props.cjs +0 -7
  210. package/dist/_virtual/set-attributes-from-props.js +0 -3
  211. package/dist/_virtual/sorted-routes.cjs +0 -7
  212. package/dist/_virtual/sorted-routes.js +0 -3
  213. package/dist/_virtual/trusted-types.cjs +0 -7
  214. package/dist/_virtual/trusted-types.js +0 -3
  215. package/dist/_virtual/utils.cjs +0 -7
  216. package/dist/_virtual/utils.js +0 -3
  217. package/dist/_virtual/warn-once.cjs +0 -7
  218. package/dist/_virtual/warn-once.js +0 -3
  219. package/dist/_virtual/with-router.cjs +0 -7
  220. package/dist/_virtual/with-router.js +0 -3
  221. package/dist/components/InfinityLoader/index.cjs +0 -68
  222. package/dist/components/InfinityLoader/index.js +0 -64
  223. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +0 -20
  224. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -16
  225. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +0 -52
  226. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -48
  227. package/dist/node_modules/next/dist/build/deployment-id.cjs +0 -34
  228. package/dist/node_modules/next/dist/build/deployment-id.js +0 -30
  229. package/dist/node_modules/next/dist/client/add-base-path.cjs +0 -42
  230. package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
  231. package/dist/node_modules/next/dist/client/add-locale.cjs +0 -43
  232. package/dist/node_modules/next/dist/client/add-locale.js +0 -39
  233. package/dist/node_modules/next/dist/client/detect-domain-locale.cjs +0 -40
  234. package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -36
  235. package/dist/node_modules/next/dist/client/has-base-path.cjs +0 -40
  236. package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
  237. package/dist/node_modules/next/dist/client/normalize-trailing-slash.cjs +0 -54
  238. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -50
  239. package/dist/node_modules/next/dist/client/remove-base-path.cjs +0 -49
  240. package/dist/node_modules/next/dist/client/remove-base-path.js +0 -45
  241. package/dist/node_modules/next/dist/client/remove-locale.cjs +0 -45
  242. package/dist/node_modules/next/dist/client/remove-locale.js +0 -41
  243. package/dist/node_modules/next/dist/client/request-idle-callback.cjs +0 -56
  244. package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
  245. package/dist/node_modules/next/dist/client/resolve-href.cjs +0 -132
  246. package/dist/node_modules/next/dist/client/resolve-href.js +0 -128
  247. package/dist/node_modules/next/dist/client/route-loader.cjs +0 -363
  248. package/dist/node_modules/next/dist/client/route-loader.js +0 -359
  249. package/dist/node_modules/next/dist/client/router.cjs +0 -201
  250. package/dist/node_modules/next/dist/client/router.js +0 -197
  251. package/dist/node_modules/next/dist/client/script.cjs +0 -366
  252. package/dist/node_modules/next/dist/client/script.js +0 -362
  253. package/dist/node_modules/next/dist/client/set-attributes-from-props.cjs +0 -81
  254. package/dist/node_modules/next/dist/client/set-attributes-from-props.js +0 -77
  255. package/dist/node_modules/next/dist/client/trusted-types.cjs +0 -56
  256. package/dist/node_modules/next/dist/client/trusted-types.js +0 -52
  257. package/dist/node_modules/next/dist/client/with-router.cjs +0 -54
  258. package/dist/node_modules/next/dist/client/with-router.js +0 -50
  259. package/dist/node_modules/next/dist/compiled/cookie/index.cjs +0 -22
  260. package/dist/node_modules/next/dist/compiled/cookie/index.js +0 -18
  261. package/dist/node_modules/next/dist/compiled/gzip-size/index.cjs +0 -17
  262. package/dist/node_modules/next/dist/compiled/gzip-size/index.js +0 -13
  263. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.cjs +0 -16
  264. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -12
  265. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.cjs +0 -147
  266. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +0 -143
  267. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.cjs +0 -144
  268. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +0 -140
  269. package/dist/node_modules/next/dist/compiled/react-is/index.cjs +0 -23
  270. package/dist/node_modules/next/dist/compiled/react-is/index.js +0 -19
  271. package/dist/node_modules/next/dist/lib/constants.cjs +0 -365
  272. package/dist/node_modules/next/dist/lib/constants.js +0 -361
  273. package/dist/node_modules/next/dist/lib/is-api-route.cjs +0 -31
  274. package/dist/node_modules/next/dist/lib/is-api-route.js +0 -27
  275. package/dist/node_modules/next/dist/lib/is-error.cjs +0 -91
  276. package/dist/node_modules/next/dist/lib/is-error.js +0 -87
  277. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.cjs +0 -115
  278. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -111
  279. package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.cjs +0 -39
  280. package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.js +0 -35
  281. package/dist/node_modules/next/dist/shared/lib/bloom-filter.cjs +0 -101
  282. package/dist/node_modules/next/dist/shared/lib/bloom-filter.js +0 -97
  283. package/dist/node_modules/next/dist/shared/lib/encode-uri-path.cjs +0 -31
  284. package/dist/node_modules/next/dist/shared/lib/encode-uri-path.js +0 -27
  285. package/dist/node_modules/next/dist/shared/lib/escape-regexp.cjs +0 -37
  286. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -33
  287. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.cjs +0 -36
  288. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -32
  289. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.cjs +0 -41
  290. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -37
  291. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.cjs +0 -70
  292. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -66
  293. package/dist/node_modules/next/dist/shared/lib/invariant-error.cjs +0 -34
  294. package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -30
  295. package/dist/node_modules/next/dist/shared/lib/is-plain-object.cjs +0 -54
  296. package/dist/node_modules/next/dist/shared/lib/is-plain-object.js +0 -50
  297. package/dist/node_modules/next/dist/shared/lib/mitt.cjs +0 -58
  298. package/dist/node_modules/next/dist/shared/lib/mitt.js +0 -54
  299. package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.cjs +0 -36
  300. package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +0 -32
  301. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.cjs +0 -36
  302. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -32
  303. package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.cjs +0 -37
  304. package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +0 -33
  305. package/dist/node_modules/next/dist/shared/lib/router/router.cjs +0 -1814
  306. package/dist/node_modules/next/dist/shared/lib/router/router.js +0 -1810
  307. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.cjs +0 -46
  308. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -42
  309. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.cjs +0 -37
  310. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -33
  311. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.cjs +0 -37
  312. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +0 -33
  313. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.cjs +0 -65
  314. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
  315. package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.cjs +0 -50
  316. package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.js +0 -46
  317. package/dist/node_modules/next/dist/shared/lib/router/utils/disable-smooth-scroll.cjs +0 -60
  318. package/dist/node_modules/next/dist/shared/lib/router/utils/disable-smooth-scroll.js +0 -56
  319. package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.cjs +0 -47
  320. package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -43
  321. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.cjs +0 -103
  322. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -99
  323. package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.cjs +0 -32
  324. package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js +0 -28
  325. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.cjs +0 -208
  326. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -204
  327. package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.cjs +0 -71
  328. package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -67
  329. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.cjs +0 -94
  330. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -90
  331. package/dist/node_modules/next/dist/shared/lib/router/utils/html-bots.cjs +0 -29
  332. package/dist/node_modules/next/dist/shared/lib/router/utils/html-bots.js +0 -25
  333. package/dist/node_modules/next/dist/shared/lib/router/utils/index.cjs +0 -43
  334. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -39
  335. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.cjs +0 -119
  336. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -115
  337. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.cjs +0 -71
  338. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -67
  339. package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.cjs +0 -68
  340. package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.js +0 -64
  341. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.cjs +0 -43
  342. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -39
  343. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.cjs +0 -44
  344. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -40
  345. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.cjs +0 -37
  346. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -33
  347. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.cjs +0 -46
  348. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -42
  349. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.cjs +0 -51
  350. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -47
  351. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.cjs +0 -54
  352. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +0 -50
  353. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.cjs +0 -50
  354. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.js +0 -46
  355. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.cjs +0 -37
  356. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -33
  357. package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.cjs +0 -66
  358. package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.js +0 -62
  359. package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.cjs +0 -303
  360. package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +0 -299
  361. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.cjs +0 -90
  362. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -86
  363. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.cjs +0 -56
  364. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +0 -52
  365. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.cjs +0 -39
  366. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -35
  367. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.cjs +0 -140
  368. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.js +0 -136
  369. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.cjs +0 -127
  370. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -123
  371. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.cjs +0 -63
  372. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -59
  373. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.cjs +0 -272
  374. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -268
  375. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.cjs +0 -256
  376. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -252
  377. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.cjs +0 -36
  378. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -32
  379. package/dist/node_modules/next/dist/shared/lib/segment.cjs +0 -103
  380. package/dist/node_modules/next/dist/shared/lib/segment.js +0 -99
  381. package/dist/node_modules/next/dist/shared/lib/utils/warn-once.cjs +0 -38
  382. package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +0 -34
  383. package/dist/node_modules/next/dist/shared/lib/utils.cjs +0 -204
  384. package/dist/node_modules/next/dist/shared/lib/utils.js +0 -200
  385. package/dist/node_modules/next/router.cjs +0 -17
  386. package/dist/node_modules/next/router.js +0 -13
@@ -1,103 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const formatUrl = require('../../../../../../../_virtual/format-url.cjs');
6
- const _interop_require_wildcard = require('../../../../../../@swc/helpers/cjs/_interop_require_wildcard.cjs');
7
- const querystring = require('./querystring.cjs');
8
-
9
- var hasRequiredFormatUrl;
10
-
11
- function requireFormatUrl () {
12
- if (hasRequiredFormatUrl) return formatUrl.__exports;
13
- hasRequiredFormatUrl = 1;
14
- (function (exports) {
15
- Object.defineProperty(exports, "__esModule", {
16
- value: true
17
- });
18
- function _export(target, all) {
19
- for(var name in all)Object.defineProperty(target, name, {
20
- enumerable: true,
21
- get: all[name]
22
- });
23
- }
24
- _export(exports, {
25
- formatUrl: function() {
26
- return formatUrl;
27
- },
28
- formatWithValidation: function() {
29
- return formatWithValidation;
30
- },
31
- urlObjectKeys: function() {
32
- return urlObjectKeys;
33
- }
34
- });
35
- const _interop_require_wildcard$1 = /*@__PURE__*/ _interop_require_wildcard.__require();
36
- const _querystring = /*#__PURE__*/ _interop_require_wildcard$1._(querystring.__require());
37
- const slashedProtocols = /https?|ftp|gopher|file/;
38
- function formatUrl(urlObj) {
39
- let { auth, hostname } = urlObj;
40
- let protocol = urlObj.protocol || '';
41
- let pathname = urlObj.pathname || '';
42
- let hash = urlObj.hash || '';
43
- let query = urlObj.query || '';
44
- let host = false;
45
- auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
46
- if (urlObj.host) {
47
- host = auth + urlObj.host;
48
- } else if (hostname) {
49
- host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
50
- if (urlObj.port) {
51
- host += ':' + urlObj.port;
52
- }
53
- }
54
- if (query && typeof query === 'object') {
55
- query = String(_querystring.urlQueryToSearchParams(query));
56
- }
57
- let search = urlObj.search || query && `?${query}` || '';
58
- if (protocol && !protocol.endsWith(':')) protocol += ':';
59
- if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
60
- host = '//' + (host || '');
61
- if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
62
- } else if (!host) {
63
- host = '';
64
- }
65
- if (hash && hash[0] !== '#') hash = '#' + hash;
66
- if (search && search[0] !== '?') search = '?' + search;
67
- pathname = pathname.replace(/[?#]/g, encodeURIComponent);
68
- search = search.replace('#', '%23');
69
- return `${protocol}${host}${pathname}${search}${hash}`;
70
- }
71
- const urlObjectKeys = [
72
- 'auth',
73
- 'hash',
74
- 'host',
75
- 'hostname',
76
- 'href',
77
- 'path',
78
- 'pathname',
79
- 'port',
80
- 'protocol',
81
- 'query',
82
- 'search',
83
- 'slashes'
84
- ];
85
- function formatWithValidation(url) {
86
- if (process.env.NODE_ENV === 'development') {
87
- if (url !== null && typeof url === 'object') {
88
- Object.keys(url).forEach((key)=>{
89
- if (!urlObjectKeys.includes(key)) {
90
- console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
91
- }
92
- });
93
- }
94
- }
95
- return formatUrl(url);
96
- }
97
-
98
-
99
- } (formatUrl.__exports));
100
- return formatUrl.__exports;
101
- }
102
-
103
- exports.__require = requireFormatUrl;
@@ -1,99 +0,0 @@
1
- import { __exports as formatUrl } from '../../../../../../../_virtual/format-url.js';
2
- import { __require as require_interop_require_wildcard } from '../../../../../../@swc/helpers/cjs/_interop_require_wildcard.js';
3
- import { __require as requireQuerystring } from './querystring.js';
4
-
5
- var hasRequiredFormatUrl;
6
-
7
- function requireFormatUrl () {
8
- if (hasRequiredFormatUrl) return formatUrl;
9
- hasRequiredFormatUrl = 1;
10
- (function (exports) {
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
13
- });
14
- function _export(target, all) {
15
- for(var name in all)Object.defineProperty(target, name, {
16
- enumerable: true,
17
- get: all[name]
18
- });
19
- }
20
- _export(exports, {
21
- formatUrl: function() {
22
- return formatUrl;
23
- },
24
- formatWithValidation: function() {
25
- return formatWithValidation;
26
- },
27
- urlObjectKeys: function() {
28
- return urlObjectKeys;
29
- }
30
- });
31
- const _interop_require_wildcard = /*@__PURE__*/ require_interop_require_wildcard();
32
- const _querystring = /*#__PURE__*/ _interop_require_wildcard._(requireQuerystring());
33
- const slashedProtocols = /https?|ftp|gopher|file/;
34
- function formatUrl(urlObj) {
35
- let { auth, hostname } = urlObj;
36
- let protocol = urlObj.protocol || '';
37
- let pathname = urlObj.pathname || '';
38
- let hash = urlObj.hash || '';
39
- let query = urlObj.query || '';
40
- let host = false;
41
- auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
42
- if (urlObj.host) {
43
- host = auth + urlObj.host;
44
- } else if (hostname) {
45
- host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
46
- if (urlObj.port) {
47
- host += ':' + urlObj.port;
48
- }
49
- }
50
- if (query && typeof query === 'object') {
51
- query = String(_querystring.urlQueryToSearchParams(query));
52
- }
53
- let search = urlObj.search || query && `?${query}` || '';
54
- if (protocol && !protocol.endsWith(':')) protocol += ':';
55
- if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
56
- host = '//' + (host || '');
57
- if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
58
- } else if (!host) {
59
- host = '';
60
- }
61
- if (hash && hash[0] !== '#') hash = '#' + hash;
62
- if (search && search[0] !== '?') search = '?' + search;
63
- pathname = pathname.replace(/[?#]/g, encodeURIComponent);
64
- search = search.replace('#', '%23');
65
- return `${protocol}${host}${pathname}${search}${hash}`;
66
- }
67
- const urlObjectKeys = [
68
- 'auth',
69
- 'hash',
70
- 'host',
71
- 'hostname',
72
- 'href',
73
- 'path',
74
- 'pathname',
75
- 'port',
76
- 'protocol',
77
- 'query',
78
- 'search',
79
- 'slashes'
80
- ];
81
- function formatWithValidation(url) {
82
- if (process.env.NODE_ENV === 'development') {
83
- if (url !== null && typeof url === 'object') {
84
- Object.keys(url).forEach((key)=>{
85
- if (!urlObjectKeys.includes(key)) {
86
- console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
87
- }
88
- });
89
- }
90
- }
91
- return formatUrl(url);
92
- }
93
-
94
-
95
- } (formatUrl));
96
- return formatUrl;
97
- }
98
-
99
- export { requireFormatUrl as __require };
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const getAssetPathFromRoute = require('../../../../../../../_virtual/get-asset-path-from-route.cjs');
6
-
7
- var hasRequiredGetAssetPathFromRoute;
8
-
9
- function requireGetAssetPathFromRoute () {
10
- if (hasRequiredGetAssetPathFromRoute) return getAssetPathFromRoute.__exports;
11
- hasRequiredGetAssetPathFromRoute = 1;
12
- (function (exports) {
13
- Object.defineProperty(exports, "__esModule", {
14
- value: true
15
- });
16
- Object.defineProperty(exports, "default", {
17
- enumerable: true,
18
- get: function() {
19
- return getAssetPathFromRoute;
20
- }
21
- });
22
- function getAssetPathFromRoute(route, ext = '') {
23
- const path = route === '/' ? '/index' : /^\/index(\/|$)/.test(route) ? `/index${route}` : route;
24
- return path + ext;
25
- }
26
-
27
-
28
- } (getAssetPathFromRoute.__exports));
29
- return getAssetPathFromRoute.__exports;
30
- }
31
-
32
- exports.__require = requireGetAssetPathFromRoute;
@@ -1,28 +0,0 @@
1
- import { __exports as getAssetPathFromRoute } from '../../../../../../../_virtual/get-asset-path-from-route.js';
2
-
3
- var hasRequiredGetAssetPathFromRoute;
4
-
5
- function requireGetAssetPathFromRoute () {
6
- if (hasRequiredGetAssetPathFromRoute) return getAssetPathFromRoute;
7
- hasRequiredGetAssetPathFromRoute = 1;
8
- (function (exports) {
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- Object.defineProperty(exports, "default", {
13
- enumerable: true,
14
- get: function() {
15
- return getAssetPathFromRoute;
16
- }
17
- });
18
- function getAssetPathFromRoute(route, ext = '') {
19
- const path = route === '/' ? '/index' : /^\/index(\/|$)/.test(route) ? `/index${route}` : route;
20
- return path + ext;
21
- }
22
-
23
-
24
- } (getAssetPathFromRoute));
25
- return getAssetPathFromRoute;
26
- }
27
-
28
- export { requireGetAssetPathFromRoute as __require };
@@ -1,208 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const getDynamicParam = require('../../../../../../../_virtual/get-dynamic-param.cjs');
6
- const invariantError = require('../../invariant-error.cjs');
7
- const parseLoaderTree = require('./parse-loader-tree.cjs');
8
- const getSegmentParam = require('./get-segment-param.cjs');
9
-
10
- var hasRequiredGetDynamicParam;
11
-
12
- function requireGetDynamicParam () {
13
- if (hasRequiredGetDynamicParam) return getDynamicParam.__exports;
14
- hasRequiredGetDynamicParam = 1;
15
- (function (exports) {
16
- Object.defineProperty(exports, "__esModule", {
17
- value: true
18
- });
19
- function _export(target, all) {
20
- for(var name in all)Object.defineProperty(target, name, {
21
- enumerable: true,
22
- get: all[name]
23
- });
24
- }
25
- _export(exports, {
26
- PARAMETER_PATTERN: function() {
27
- return PARAMETER_PATTERN;
28
- },
29
- getDynamicParam: function() {
30
- return getDynamicParam;
31
- },
32
- interpolateParallelRouteParams: function() {
33
- return interpolateParallelRouteParams;
34
- },
35
- parseMatchedParameter: function() {
36
- return parseMatchedParameter;
37
- },
38
- parseParameter: function() {
39
- return parseParameter;
40
- }
41
- });
42
- const _invarianterror = invariantError.__require();
43
- const _parseloadertree = parseLoaderTree.__require();
44
- const _getsegmentparam = getSegmentParam.__require();
45
- /**
46
- * Gets the value of a param from the params object. This correctly handles the
47
- * case where the param is a fallback route param and encodes the resulting
48
- * value.
49
- *
50
- * @param interpolatedParams - The params object.
51
- * @param segmentKey - The key of the segment.
52
- * @param fallbackRouteParams - The fallback route params.
53
- * @returns The value of the param.
54
- */ function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
55
- let value = interpolatedParams[segmentKey];
56
- if (fallbackRouteParams?.has(segmentKey)) {
57
- // We know that the fallback route params has the segment key because we
58
- // checked that above.
59
- const [searchValue] = fallbackRouteParams.get(segmentKey);
60
- value = searchValue;
61
- } else if (Array.isArray(value)) {
62
- value = value.map((i)=>encodeURIComponent(i));
63
- } else if (typeof value === 'string') {
64
- value = encodeURIComponent(value);
65
- }
66
- return value;
67
- }
68
- function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
69
- const interpolated = structuredClone(params);
70
- // Stack-based traversal with depth tracking
71
- const stack = [
72
- {
73
- tree: loaderTree,
74
- depth: 0
75
- }
76
- ];
77
- // Derive value from pagePath based on depth and parameter type
78
- const pathSegments = pagePath.split('/').slice(1) // Remove first empty string
79
- ;
80
- while(stack.length > 0){
81
- const { tree, depth } = stack.pop();
82
- const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
83
- // Check if current segment contains a parameter
84
- const segmentParam = (0, _getsegmentparam.getSegmentParam)(segment);
85
- if (segmentParam && !interpolated.hasOwnProperty(segmentParam.param) && // If the param is in the fallback route params, we don't need to
86
- // interpolate it because it's already marked as being unknown.
87
- !fallbackRouteParams?.has(segmentParam.param)) {
88
- switch(segmentParam.type){
89
- case 'catchall':
90
- case 'optional-catchall':
91
- case 'catchall-intercepted-(..)(..)':
92
- case 'catchall-intercepted-(.)':
93
- case 'catchall-intercepted-(..)':
94
- case 'catchall-intercepted-(...)':
95
- // For catchall parameters, take all remaining segments from this depth
96
- const remainingSegments = pathSegments.slice(depth);
97
- // Process each segment to handle any dynamic params
98
- const processedSegments = remainingSegments.flatMap((pathSegment)=>{
99
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
100
- // If the segment matches a param, return the param value otherwise,
101
- // it's a static segment, so just return that. We don't use the
102
- // `getParamValue` function here because we don't want the values to
103
- // be encoded, that's handled on get by the `getDynamicParam`
104
- // function.
105
- return param ? interpolated[param.param] : pathSegment;
106
- }).filter((s)=>s !== undefined);
107
- if (processedSegments.length > 0) {
108
- interpolated[segmentParam.param] = processedSegments;
109
- }
110
- break;
111
- case 'dynamic':
112
- case 'dynamic-intercepted-(..)(..)':
113
- case 'dynamic-intercepted-(.)':
114
- case 'dynamic-intercepted-(..)':
115
- case 'dynamic-intercepted-(...)':
116
- // For regular dynamic parameters, take the segment at this depth
117
- if (depth < pathSegments.length) {
118
- const pathSegment = pathSegments[depth];
119
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
120
- interpolated[segmentParam.param] = param ? interpolated[param.param] : pathSegment;
121
- }
122
- break;
123
- default:
124
- segmentParam.type;
125
- }
126
- }
127
- // Calculate next depth - increment if this is not a route group and not empty
128
- let nextDepth = depth;
129
- const isRouteGroup = segment.startsWith('(') && segment.endsWith(')');
130
- if (!isRouteGroup && segment !== '') {
131
- nextDepth++;
132
- }
133
- // Add all parallel routes to the stack for processing
134
- for (const route of Object.values(parallelRoutes)){
135
- stack.push({
136
- tree: route,
137
- depth: nextDepth
138
- });
139
- }
140
- }
141
- return interpolated;
142
- }
143
- function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
144
- let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
145
- // handle the case where an optional catchall does not have a value,
146
- // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`
147
- if (!value || value.length === 0) {
148
- if (dynamicParamType === 'oc') {
149
- return {
150
- param: segmentKey,
151
- value: null,
152
- type: dynamicParamType,
153
- treeSegment: [
154
- segmentKey,
155
- '',
156
- dynamicParamType
157
- ]
158
- };
159
- }
160
- throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
161
- value: "E864",
162
- enumerable: false,
163
- configurable: true
164
- });
165
- }
166
- return {
167
- param: segmentKey,
168
- // The value that is passed to user code.
169
- value,
170
- // The value that is rendered in the router tree.
171
- treeSegment: [
172
- segmentKey,
173
- Array.isArray(value) ? value.join('/') : value,
174
- dynamicParamType
175
- ],
176
- type: dynamicParamType
177
- };
178
- }
179
- const PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
180
- function parseParameter(param) {
181
- const match = param.match(PARAMETER_PATTERN);
182
- if (!match) {
183
- return parseMatchedParameter(param);
184
- }
185
- return parseMatchedParameter(match[2]);
186
- }
187
- function parseMatchedParameter(param) {
188
- const optional = param.startsWith('[') && param.endsWith(']');
189
- if (optional) {
190
- param = param.slice(1, -1);
191
- }
192
- const repeat = param.startsWith('...');
193
- if (repeat) {
194
- param = param.slice(3);
195
- }
196
- return {
197
- key: param,
198
- repeat,
199
- optional
200
- };
201
- }
202
-
203
-
204
- } (getDynamicParam.__exports));
205
- return getDynamicParam.__exports;
206
- }
207
-
208
- exports.__require = requireGetDynamicParam;
@@ -1,204 +0,0 @@
1
- import { __exports as getDynamicParam } from '../../../../../../../_virtual/get-dynamic-param.js';
2
- import { __require as requireInvariantError } from '../../invariant-error.js';
3
- import { __require as requireParseLoaderTree } from './parse-loader-tree.js';
4
- import { __require as requireGetSegmentParam } from './get-segment-param.js';
5
-
6
- var hasRequiredGetDynamicParam;
7
-
8
- function requireGetDynamicParam () {
9
- if (hasRequiredGetDynamicParam) return getDynamicParam;
10
- hasRequiredGetDynamicParam = 1;
11
- (function (exports) {
12
- Object.defineProperty(exports, "__esModule", {
13
- value: true
14
- });
15
- function _export(target, all) {
16
- for(var name in all)Object.defineProperty(target, name, {
17
- enumerable: true,
18
- get: all[name]
19
- });
20
- }
21
- _export(exports, {
22
- PARAMETER_PATTERN: function() {
23
- return PARAMETER_PATTERN;
24
- },
25
- getDynamicParam: function() {
26
- return getDynamicParam;
27
- },
28
- interpolateParallelRouteParams: function() {
29
- return interpolateParallelRouteParams;
30
- },
31
- parseMatchedParameter: function() {
32
- return parseMatchedParameter;
33
- },
34
- parseParameter: function() {
35
- return parseParameter;
36
- }
37
- });
38
- const _invarianterror = requireInvariantError();
39
- const _parseloadertree = requireParseLoaderTree();
40
- const _getsegmentparam = requireGetSegmentParam();
41
- /**
42
- * Gets the value of a param from the params object. This correctly handles the
43
- * case where the param is a fallback route param and encodes the resulting
44
- * value.
45
- *
46
- * @param interpolatedParams - The params object.
47
- * @param segmentKey - The key of the segment.
48
- * @param fallbackRouteParams - The fallback route params.
49
- * @returns The value of the param.
50
- */ function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
51
- let value = interpolatedParams[segmentKey];
52
- if (fallbackRouteParams?.has(segmentKey)) {
53
- // We know that the fallback route params has the segment key because we
54
- // checked that above.
55
- const [searchValue] = fallbackRouteParams.get(segmentKey);
56
- value = searchValue;
57
- } else if (Array.isArray(value)) {
58
- value = value.map((i)=>encodeURIComponent(i));
59
- } else if (typeof value === 'string') {
60
- value = encodeURIComponent(value);
61
- }
62
- return value;
63
- }
64
- function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
65
- const interpolated = structuredClone(params);
66
- // Stack-based traversal with depth tracking
67
- const stack = [
68
- {
69
- tree: loaderTree,
70
- depth: 0
71
- }
72
- ];
73
- // Derive value from pagePath based on depth and parameter type
74
- const pathSegments = pagePath.split('/').slice(1) // Remove first empty string
75
- ;
76
- while(stack.length > 0){
77
- const { tree, depth } = stack.pop();
78
- const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
79
- // Check if current segment contains a parameter
80
- const segmentParam = (0, _getsegmentparam.getSegmentParam)(segment);
81
- if (segmentParam && !interpolated.hasOwnProperty(segmentParam.param) && // If the param is in the fallback route params, we don't need to
82
- // interpolate it because it's already marked as being unknown.
83
- !fallbackRouteParams?.has(segmentParam.param)) {
84
- switch(segmentParam.type){
85
- case 'catchall':
86
- case 'optional-catchall':
87
- case 'catchall-intercepted-(..)(..)':
88
- case 'catchall-intercepted-(.)':
89
- case 'catchall-intercepted-(..)':
90
- case 'catchall-intercepted-(...)':
91
- // For catchall parameters, take all remaining segments from this depth
92
- const remainingSegments = pathSegments.slice(depth);
93
- // Process each segment to handle any dynamic params
94
- const processedSegments = remainingSegments.flatMap((pathSegment)=>{
95
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
96
- // If the segment matches a param, return the param value otherwise,
97
- // it's a static segment, so just return that. We don't use the
98
- // `getParamValue` function here because we don't want the values to
99
- // be encoded, that's handled on get by the `getDynamicParam`
100
- // function.
101
- return param ? interpolated[param.param] : pathSegment;
102
- }).filter((s)=>s !== undefined);
103
- if (processedSegments.length > 0) {
104
- interpolated[segmentParam.param] = processedSegments;
105
- }
106
- break;
107
- case 'dynamic':
108
- case 'dynamic-intercepted-(..)(..)':
109
- case 'dynamic-intercepted-(.)':
110
- case 'dynamic-intercepted-(..)':
111
- case 'dynamic-intercepted-(...)':
112
- // For regular dynamic parameters, take the segment at this depth
113
- if (depth < pathSegments.length) {
114
- const pathSegment = pathSegments[depth];
115
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
116
- interpolated[segmentParam.param] = param ? interpolated[param.param] : pathSegment;
117
- }
118
- break;
119
- default:
120
- segmentParam.type;
121
- }
122
- }
123
- // Calculate next depth - increment if this is not a route group and not empty
124
- let nextDepth = depth;
125
- const isRouteGroup = segment.startsWith('(') && segment.endsWith(')');
126
- if (!isRouteGroup && segment !== '') {
127
- nextDepth++;
128
- }
129
- // Add all parallel routes to the stack for processing
130
- for (const route of Object.values(parallelRoutes)){
131
- stack.push({
132
- tree: route,
133
- depth: nextDepth
134
- });
135
- }
136
- }
137
- return interpolated;
138
- }
139
- function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
140
- let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
141
- // handle the case where an optional catchall does not have a value,
142
- // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`
143
- if (!value || value.length === 0) {
144
- if (dynamicParamType === 'oc') {
145
- return {
146
- param: segmentKey,
147
- value: null,
148
- type: dynamicParamType,
149
- treeSegment: [
150
- segmentKey,
151
- '',
152
- dynamicParamType
153
- ]
154
- };
155
- }
156
- throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
157
- value: "E864",
158
- enumerable: false,
159
- configurable: true
160
- });
161
- }
162
- return {
163
- param: segmentKey,
164
- // The value that is passed to user code.
165
- value,
166
- // The value that is rendered in the router tree.
167
- treeSegment: [
168
- segmentKey,
169
- Array.isArray(value) ? value.join('/') : value,
170
- dynamicParamType
171
- ],
172
- type: dynamicParamType
173
- };
174
- }
175
- const PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
176
- function parseParameter(param) {
177
- const match = param.match(PARAMETER_PATTERN);
178
- if (!match) {
179
- return parseMatchedParameter(param);
180
- }
181
- return parseMatchedParameter(match[2]);
182
- }
183
- function parseMatchedParameter(param) {
184
- const optional = param.startsWith('[') && param.endsWith(']');
185
- if (optional) {
186
- param = param.slice(1, -1);
187
- }
188
- const repeat = param.startsWith('...');
189
- if (repeat) {
190
- param = param.slice(3);
191
- }
192
- return {
193
- key: param,
194
- repeat,
195
- optional
196
- };
197
- }
198
-
199
-
200
- } (getDynamicParam));
201
- return getDynamicParam;
202
- }
203
-
204
- export { requireGetDynamicParam as __require };