@amoa/casting 0.1.5 → 0.1.6

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 (320) hide show
  1. package/dist/export/index.js +9 -9
  2. package/dist/form/buttons/index.js +2 -2
  3. package/dist/form/caption/index.js +2 -2
  4. package/dist/form/description/index.js +2 -2
  5. package/dist/form/email/index.js +3 -3
  6. package/dist/form/index.js +4 -4
  7. package/dist/form/inputs/index.js +2 -2
  8. package/dist/form/password/index.js +3 -3
  9. package/dist/index.css +33 -1647
  10. package/dist/waiter/index.js +11 -13
  11. package/package.json +4 -3
  12. package/dist/_virtual/_commonjsHelpers.js +0 -5
  13. package/dist/_virtual/_interop_require_default.js +0 -3
  14. package/dist/_virtual/_interop_require_wildcard.js +0 -3
  15. package/dist/_virtual/action-async-storage-instance.js +0 -3
  16. package/dist/_virtual/action-async-storage.external.js +0 -3
  17. package/dist/_virtual/add-base-path.js +0 -3
  18. package/dist/_virtual/add-locale.js +0 -3
  19. package/dist/_virtual/add-locale2.js +0 -3
  20. package/dist/_virtual/add-path-prefix.js +0 -3
  21. package/dist/_virtual/app-paths.js +0 -3
  22. package/dist/_virtual/app-router-context.shared-runtime.js +0 -3
  23. package/dist/_virtual/app-router-headers.js +0 -3
  24. package/dist/_virtual/app.js +0 -3
  25. package/dist/_virtual/async-local-storage.js +0 -3
  26. package/dist/_virtual/bailout-to-csr.js +0 -3
  27. package/dist/_virtual/boundary-constants.js +0 -3
  28. package/dist/_virtual/constants.js +0 -3
  29. package/dist/_virtual/deployment-id.js +0 -3
  30. package/dist/_virtual/detect-domain-locale.js +0 -3
  31. package/dist/_virtual/detect-domain-locale2.js +0 -3
  32. package/dist/_virtual/dynamic-rendering-utils.js +0 -3
  33. package/dist/_virtual/dynamic-rendering.js +0 -3
  34. package/dist/_virtual/ensure-leading-slash.js +0 -3
  35. package/dist/_virtual/error-once.js +0 -3
  36. package/dist/_virtual/escape-regexp.js +0 -3
  37. package/dist/_virtual/find-closest-quality.js +0 -3
  38. package/dist/_virtual/forbidden.js +0 -3
  39. package/dist/_virtual/format-url.js +0 -3
  40. package/dist/_virtual/get-domain-locale.js +0 -3
  41. package/dist/_virtual/get-dynamic-param.js +0 -3
  42. package/dist/_virtual/get-img-props.js +0 -3
  43. package/dist/_virtual/get-segment-param.js +0 -3
  44. package/dist/_virtual/has-base-path.js +0 -3
  45. package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
  46. package/dist/_virtual/head.js +0 -3
  47. package/dist/_virtual/hooks-client-context.shared-runtime.js +0 -3
  48. package/dist/_virtual/hooks-server-context.js +0 -3
  49. package/dist/_virtual/http-access-fallback.js +0 -3
  50. package/dist/_virtual/image-blur-svg.js +0 -3
  51. package/dist/_virtual/image-component.js +0 -3
  52. package/dist/_virtual/image-config-context.shared-runtime.js +0 -3
  53. package/dist/_virtual/image-config.js +0 -3
  54. package/dist/_virtual/image-external.js +0 -3
  55. package/dist/_virtual/image-loader.js +0 -3
  56. package/dist/_virtual/image.js +0 -7
  57. package/dist/_virtual/index.js +0 -3
  58. package/dist/_virtual/index2.js +0 -3
  59. package/dist/_virtual/index3.js +0 -3
  60. package/dist/_virtual/interception-prefix-from-param-type.js +0 -3
  61. package/dist/_virtual/interception-routes.js +0 -3
  62. package/dist/_virtual/interpolate-as.js +0 -3
  63. package/dist/_virtual/invariant-error.js +0 -3
  64. package/dist/_virtual/is-dynamic.js +0 -3
  65. package/dist/_virtual/is-local-url.js +0 -3
  66. package/dist/_virtual/is-next-router-error.js +0 -3
  67. package/dist/_virtual/is-postpone.js +0 -3
  68. package/dist/_virtual/jsx-runtime.js +0 -5
  69. package/dist/_virtual/jsx-runtime2.js +0 -3
  70. package/dist/_virtual/link.js +0 -7
  71. package/dist/_virtual/link2.js +0 -3
  72. package/dist/_virtual/match-local-pattern.js +0 -3
  73. package/dist/_virtual/match-remote-pattern.js +0 -3
  74. package/dist/_virtual/navigation.js +0 -3
  75. package/dist/_virtual/navigation.react-server.js +0 -3
  76. package/dist/_virtual/navigation2.js +0 -3
  77. package/dist/_virtual/normalize-locale-path.js +0 -3
  78. package/dist/_virtual/normalize-locale-path2.js +0 -3
  79. package/dist/_virtual/normalize-trailing-slash.js +0 -3
  80. package/dist/_virtual/not-found.js +0 -3
  81. package/dist/_virtual/omit.js +0 -3
  82. package/dist/_virtual/parse-loader-tree.js +0 -3
  83. package/dist/_virtual/parse-path.js +0 -3
  84. package/dist/_virtual/path-has-prefix.js +0 -3
  85. package/dist/_virtual/querystring.js +0 -3
  86. package/dist/_virtual/react-jsx-runtime.development.js +0 -3
  87. package/dist/_virtual/react-jsx-runtime.production.js +0 -3
  88. package/dist/_virtual/readonly-url-search-params.js +0 -3
  89. package/dist/_virtual/redirect-error.js +0 -3
  90. package/dist/_virtual/redirect-status-code.js +0 -3
  91. package/dist/_virtual/redirect.js +0 -3
  92. package/dist/_virtual/remove-trailing-slash.js +0 -3
  93. package/dist/_virtual/request-idle-callback.js +0 -3
  94. package/dist/_virtual/resolve-href.js +0 -3
  95. package/dist/_virtual/resolve-param-value.js +0 -3
  96. package/dist/_virtual/route-match-utils.js +0 -3
  97. package/dist/_virtual/route-matcher.js +0 -3
  98. package/dist/_virtual/route-pattern-normalizer.js +0 -3
  99. package/dist/_virtual/route-regex.js +0 -3
  100. package/dist/_virtual/router-context.shared-runtime.js +0 -3
  101. package/dist/_virtual/scheduler.js +0 -3
  102. package/dist/_virtual/segment.js +0 -3
  103. package/dist/_virtual/server-inserted-html.shared-runtime.js +0 -3
  104. package/dist/_virtual/side-effect.js +0 -3
  105. package/dist/_virtual/sorted-routes.js +0 -3
  106. package/dist/_virtual/static-generation-bailout.js +0 -3
  107. package/dist/_virtual/unauthorized.js +0 -3
  108. package/dist/_virtual/unrecognized-action-error.js +0 -3
  109. package/dist/_virtual/unstable-rethrow.browser.js +0 -3
  110. package/dist/_virtual/unstable-rethrow.js +0 -3
  111. package/dist/_virtual/unstable-rethrow.server.js +0 -3
  112. package/dist/_virtual/use-intersection.js +0 -3
  113. package/dist/_virtual/use-merged-ref.js +0 -3
  114. package/dist/_virtual/utils.js +0 -3
  115. package/dist/_virtual/warn-once.js +0 -3
  116. package/dist/_virtual/work-async-storage-instance.js +0 -3
  117. package/dist/_virtual/work-async-storage.external.js +0 -3
  118. package/dist/_virtual/work-unit-async-storage-instance.js +0 -3
  119. package/dist/_virtual/work-unit-async-storage.external.js +0 -3
  120. package/dist/config/config.json.js +0 -37
  121. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -16
  122. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -48
  123. package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
  124. package/dist/node_modules/next/dist/client/add-locale.js +0 -39
  125. package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -112
  126. package/dist/node_modules/next/dist/client/components/forbidden.js +0 -62
  127. package/dist/node_modules/next/dist/client/components/hooks-server-context.js +0 -50
  128. package/dist/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +0 -77
  129. package/dist/node_modules/next/dist/client/components/is-next-router-error.js +0 -37
  130. package/dist/node_modules/next/dist/client/components/navigation.js +0 -198
  131. package/dist/node_modules/next/dist/client/components/navigation.react-server.js +0 -80
  132. package/dist/node_modules/next/dist/client/components/not-found.js +0 -56
  133. package/dist/node_modules/next/dist/client/components/readonly-url-search-params.js +0 -58
  134. package/dist/node_modules/next/dist/client/components/redirect-error.js +0 -60
  135. package/dist/node_modules/next/dist/client/components/redirect-status-code.js +0 -36
  136. package/dist/node_modules/next/dist/client/components/redirect.js +0 -98
  137. package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +0 -50
  138. package/dist/node_modules/next/dist/client/components/unauthorized.js +0 -63
  139. package/dist/node_modules/next/dist/client/components/unrecognized-action-error.js +0 -47
  140. package/dist/node_modules/next/dist/client/components/unstable-rethrow.browser.js +0 -42
  141. package/dist/node_modules/next/dist/client/components/unstable-rethrow.js +0 -41
  142. package/dist/node_modules/next/dist/client/components/unstable-rethrow.server.js +0 -50
  143. package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -36
  144. package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -51
  145. package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
  146. package/dist/node_modules/next/dist/client/image-component.js +0 -343
  147. package/dist/node_modules/next/dist/client/link.js +0 -466
  148. package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -40
  149. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -54
  150. package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
  151. package/dist/node_modules/next/dist/client/resolve-href.js +0 -124
  152. package/dist/node_modules/next/dist/client/use-intersection.js +0 -126
  153. package/dist/node_modules/next/dist/client/use-merged-ref.js +0 -79
  154. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -439
  155. package/dist/node_modules/next/dist/compiled/picomatch/index.js +0 -1662
  156. package/dist/node_modules/next/dist/lib/constants.js +0 -339
  157. package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +0 -41
  158. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -114
  159. package/dist/node_modules/next/dist/lib/scheduler.js +0 -69
  160. package/dist/node_modules/next/dist/server/app-render/action-async-storage-instance.js +0 -26
  161. package/dist/node_modules/next/dist/server/app-render/action-async-storage.external.js +0 -25
  162. package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +0 -83
  163. package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +0 -804
  164. package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +0 -26
  165. package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +0 -25
  166. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +0 -26
  167. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +0 -221
  168. package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +0 -90
  169. package/dist/node_modules/next/dist/server/lib/router-utils/is-postpone.js +0 -27
  170. package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +0 -56
  171. package/dist/node_modules/next/dist/shared/lib/deployment-id.js +0 -41
  172. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -32
  173. package/dist/node_modules/next/dist/shared/lib/find-closest-quality.js +0 -30
  174. package/dist/node_modules/next/dist/shared/lib/get-img-props.js +0 -617
  175. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -31
  176. package/dist/node_modules/next/dist/shared/lib/head.js +0 -177
  177. package/dist/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +0 -65
  178. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -36
  179. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -66
  180. package/dist/node_modules/next/dist/shared/lib/image-blur-svg.js +0 -42
  181. package/dist/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +0 -33
  182. package/dist/node_modules/next/dist/shared/lib/image-config.js +0 -56
  183. package/dist/node_modules/next/dist/shared/lib/image-external.js +0 -60
  184. package/dist/node_modules/next/dist/shared/lib/image-loader.js +0 -119
  185. package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -29
  186. package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +0 -43
  187. package/dist/node_modules/next/dist/shared/lib/match-local-pattern.js +0 -54
  188. package/dist/node_modules/next/dist/shared/lib/match-remote-pattern.js +0 -71
  189. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -31
  190. package/dist/node_modules/next/dist/shared/lib/router/routes/app.js +0 -130
  191. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -41
  192. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -36
  193. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
  194. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -88
  195. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -176
  196. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -89
  197. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -38
  198. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +0 -44
  199. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -109
  200. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -71
  201. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -38
  202. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -39
  203. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -32
  204. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -46
  205. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -46
  206. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -34
  207. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -82
  208. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -34
  209. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +0 -128
  210. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -122
  211. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -61
  212. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -312
  213. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -246
  214. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -31
  215. package/dist/node_modules/next/dist/shared/lib/segment.js +0 -102
  216. package/dist/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +0 -44
  217. package/dist/node_modules/next/dist/shared/lib/side-effect.js +0 -78
  218. package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +0 -33
  219. package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +0 -33
  220. package/dist/node_modules/next/dist/shared/lib/utils.js +0 -192
  221. package/dist/node_modules/next/image.js +0 -13
  222. package/dist/node_modules/next/link.js +0 -13
  223. package/dist/node_modules/next/navigation.js +0 -13
  224. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -240
  225. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -44
  226. package/dist/node_modules/react/jsx-runtime.js +0 -19
  227. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -26
  228. package/dist/packages/carving/src/carving.js +0 -34
  229. package/dist/packages/carving/src/condo.js +0 -17
  230. package/dist/packages/carving/src/logos/amoa.js +0 -17
  231. package/dist/packages/forge/src/classes.js +0 -17
  232. package/dist/packages/forge/src/dates/date.js +0 -8
  233. package/dist/packages/forge/src/dates/day.js +0 -7
  234. package/dist/packages/forge/src/dates/index.js +0 -31
  235. package/dist/packages/forge/src/dates/month.js +0 -35
  236. package/dist/packages/forge/src/dates/year.js +0 -16
  237. package/dist/packages/forge/src/fetcher/index.js +0 -37
  238. package/dist/packages/forge/src/fetcher/querystring.js +0 -9
  239. package/dist/packages/forge/src/files.js +0 -17
  240. package/dist/packages/forge/src/numbers/index.js +0 -5
  241. package/dist/packages/forge/src/strings/characters.js +0 -3
  242. package/dist/packages/forge/src/strings/diacritics.js +0 -261
  243. package/dist/packages/forge/src/strings/index.js +0 -24
  244. package/dist/packages/hooks/src/use-debounce.js +0 -19
  245. package/dist/packages/hooks/src/use-tooltip.js +0 -27
  246. package/dist/packages/ingots/src/address/api/form.js +0 -12
  247. package/dist/packages/ingots/src/address/config.json.js +0 -16
  248. package/dist/packages/ingots/src/address/index.js +0 -115
  249. package/dist/packages/ingots/src/address/index.module.css.js +0 -3
  250. package/dist/packages/ingots/src/address/service.js +0 -41
  251. package/dist/packages/ingots/src/backdrop/index.js +0 -18
  252. package/dist/packages/ingots/src/backdrop/index.module.css.js +0 -3
  253. package/dist/packages/ingots/src/button/index.js +0 -56
  254. package/dist/packages/ingots/src/button/index.module.css.js +0 -3
  255. package/dist/packages/ingots/src/checkbox/index.js +0 -47
  256. package/dist/packages/ingots/src/checkbox/index.module.css.js +0 -3
  257. package/dist/packages/ingots/src/date/erase/index.js +0 -22
  258. package/dist/packages/ingots/src/date/erase/index.module.css.js +0 -3
  259. package/dist/packages/ingots/src/date/input/index.js +0 -113
  260. package/dist/packages/ingots/src/date/input/index.module.css.js +0 -3
  261. package/dist/packages/ingots/src/date/picker/day/index.js +0 -35
  262. package/dist/packages/ingots/src/date/picker/day/index.module.css.js +0 -3
  263. package/dist/packages/ingots/src/date/picker/days/index.js +0 -59
  264. package/dist/packages/ingots/src/date/picker/days/index.module.css.js +0 -3
  265. package/dist/packages/ingots/src/date/picker/handle/index.js +0 -40
  266. package/dist/packages/ingots/src/date/picker/handle/index.module.css.js +0 -3
  267. package/dist/packages/ingots/src/date/picker/index.js +0 -154
  268. package/dist/packages/ingots/src/date/picker/index.module.css.js +0 -3
  269. package/dist/packages/ingots/src/date/picker/menu/index.js +0 -32
  270. package/dist/packages/ingots/src/date/picker/menu/index.module.css.js +0 -3
  271. package/dist/packages/ingots/src/date/picker/menu/item.js +0 -30
  272. package/dist/packages/ingots/src/date/picker/menu/item.module.css.js +0 -3
  273. package/dist/packages/ingots/src/file/api/index.js +0 -14
  274. package/dist/packages/ingots/src/file/card/index.js +0 -65
  275. package/dist/packages/ingots/src/file/card/index.module.css.js +0 -3
  276. package/dist/packages/ingots/src/file/index.js +0 -34
  277. package/dist/packages/ingots/src/file/index.module.css.js +0 -3
  278. package/dist/packages/ingots/src/file/input/index.js +0 -261
  279. package/dist/packages/ingots/src/file/input/index.module.css.js +0 -3
  280. package/dist/packages/ingots/src/input/index.js +0 -75
  281. package/dist/packages/ingots/src/input/src/validation/index.js +0 -3
  282. package/dist/packages/ingots/src/loader/index.js +0 -23
  283. package/dist/packages/ingots/src/loader/index.module.css.js +0 -3
  284. package/dist/packages/ingots/src/loader/variants/spinner/index.js +0 -31
  285. package/dist/packages/ingots/src/loader/variants/spinner/index.module.css.js +0 -3
  286. package/dist/packages/ingots/src/select/card/index.js +0 -33
  287. package/dist/packages/ingots/src/select/card/index.module.css.js +0 -3
  288. package/dist/packages/ingots/src/select/category/index.js +0 -13
  289. package/dist/packages/ingots/src/select/category/index.module.css.js +0 -3
  290. package/dist/packages/ingots/src/select/content/index.js +0 -46
  291. package/dist/packages/ingots/src/select/index.js +0 -155
  292. package/dist/packages/ingots/src/select/index.module.css.js +0 -3
  293. package/dist/packages/ingots/src/select/option/index.js +0 -35
  294. package/dist/packages/ingots/src/select/option/index.module.css.js +0 -3
  295. package/dist/packages/ingots/src/select/options/index.js +0 -59
  296. package/dist/packages/ingots/src/select/options/index.module.css.js +0 -3
  297. package/dist/packages/ingots/src/snackbar/context.js +0 -9
  298. package/dist/packages/ingots/src/tag/index.js +0 -16
  299. package/dist/packages/ingots/src/tag/index.module.css.js +0 -3
  300. package/dist/packages/ingots/src/text/index.js +0 -92
  301. package/dist/packages/ingots/src/text/index.module.css.js +0 -3
  302. package/dist/packages/ingots/src/textarea/index.js +0 -62
  303. package/dist/packages/ingots/src/textarea/index.module.css.js +0 -3
  304. package/dist/packages/ingots/src/toggle/index.js +0 -43
  305. package/dist/packages/ingots/src/toggle/index.module.css.js +0 -3
  306. package/dist/packages/runes/src/icon.js +0 -16
  307. package/dist/packages/runes/src/paths/alert.js +0 -18
  308. package/dist/packages/runes/src/paths/arrow/path.js +0 -18
  309. package/dist/packages/runes/src/paths/calendar.js +0 -18
  310. package/dist/packages/runes/src/paths/check/fill.js +0 -18
  311. package/dist/packages/runes/src/paths/check/regular.js +0 -18
  312. package/dist/packages/runes/src/paths/chevron/down.js +0 -18
  313. package/dist/packages/runes/src/paths/chevron/left.js +0 -18
  314. package/dist/packages/runes/src/paths/chevron/right.js +0 -18
  315. package/dist/packages/runes/src/paths/click.js +0 -18
  316. package/dist/packages/runes/src/paths/cross/regular.js +0 -16
  317. package/dist/packages/runes/src/paths/download.js +0 -18
  318. package/dist/packages/runes/src/paths/file.js +0 -18
  319. package/dist/packages/runes/src/paths/link.js +0 -23
  320. package/dist/packages/wares/src/authentication/index.js +0 -11
@@ -1,312 +0,0 @@
1
- import { __exports as routeRegex } from '../../../../../../../_virtual/route-regex.js';
2
- import { __require as requireConstants } from '../../../../lib/constants.js';
3
- import { __require as requireInterceptionRoutes } from './interception-routes.js';
4
- import { __require as requireEscapeRegexp } from '../../escape-regexp.js';
5
- import { __require as requireRemoveTrailingSlash } from './remove-trailing-slash.js';
6
- import { __require as requireGetDynamicParam } from './get-dynamic-param.js';
7
-
8
- var hasRequiredRouteRegex;
9
-
10
- function requireRouteRegex () {
11
- if (hasRequiredRouteRegex) return routeRegex;
12
- hasRequiredRouteRegex = 1;
13
- (function (exports$1) {
14
-
15
- Object.defineProperty(exports$1, "__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$1, {
25
- getNamedMiddlewareRegex: function () {
26
- return getNamedMiddlewareRegex;
27
- },
28
- getNamedRouteRegex: function () {
29
- return getNamedRouteRegex;
30
- },
31
- getRouteRegex: function () {
32
- return getRouteRegex;
33
- }
34
- });
35
- const _constants = requireConstants();
36
- const _interceptionroutes = requireInterceptionRoutes();
37
- const _escaperegexp = requireEscapeRegexp();
38
- const _removetrailingslash = requireRemoveTrailingSlash();
39
- const _getdynamicparam = requireGetDynamicParam();
40
- function getParametrizedRoute(route, includeSuffix, includePrefix) {
41
- const groups = {};
42
- let groupIndex = 1;
43
- const segments = [];
44
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')) {
45
- const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find(m => segment.startsWith(m));
46
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
47
- ;
48
- if (markerMatch && paramMatches && paramMatches[2]) {
49
- const {
50
- key,
51
- optional,
52
- repeat
53
- } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
54
- groups[key] = {
55
- pos: groupIndex++,
56
- repeat,
57
- optional
58
- };
59
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
60
- } else if (paramMatches && paramMatches[2]) {
61
- const {
62
- key,
63
- repeat,
64
- optional
65
- } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
66
- groups[key] = {
67
- pos: groupIndex++,
68
- repeat,
69
- optional
70
- };
71
- if (includePrefix && paramMatches[1]) {
72
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
73
- }
74
- let s = repeat ? optional ? '(?:/(.+?))?' : '/(.+?)' : '/([^/]+?)';
75
- // Remove the leading slash if includePrefix already added it.
76
- if (includePrefix && paramMatches[1]) {
77
- s = s.substring(1);
78
- }
79
- segments.push(s);
80
- } else {
81
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
82
- }
83
- // If there's a suffix, add it to the segments if it's enabled.
84
- if (includeSuffix && paramMatches && paramMatches[3]) {
85
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
86
- }
87
- }
88
- return {
89
- parameterizedRoute: segments.join(''),
90
- groups
91
- };
92
- }
93
- function getRouteRegex(normalizedRoute, {
94
- includeSuffix = false,
95
- includePrefix = false,
96
- excludeOptionalTrailingSlash = false
97
- } = {}) {
98
- const {
99
- parameterizedRoute,
100
- groups
101
- } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
102
- let re = parameterizedRoute;
103
- if (!excludeOptionalTrailingSlash) {
104
- re += '(?:/)?';
105
- }
106
- return {
107
- re: new RegExp(`^${re}$`),
108
- groups: groups
109
- };
110
- }
111
- /**
112
- * Builds a function to generate a minimal routeKey using only a-z and minimal
113
- * number of characters.
114
- */
115
- function buildGetSafeRouteKey() {
116
- let i = 0;
117
- return () => {
118
- let routeKey = '';
119
- let j = ++i;
120
- while (j > 0) {
121
- routeKey += String.fromCharCode(97 + (j - 1) % 26);
122
- j = Math.floor((j - 1) / 26);
123
- }
124
- return routeKey;
125
- };
126
- }
127
- function getSafeKeyFromSegment({
128
- interceptionMarker,
129
- getSafeRouteKey,
130
- segment,
131
- routeKeys,
132
- keyPrefix,
133
- backreferenceDuplicateKeys
134
- }) {
135
- const {
136
- key,
137
- optional,
138
- repeat
139
- } = (0, _getdynamicparam.parseMatchedParameter)(segment);
140
- // replace any non-word characters since they can break
141
- // the named regex
142
- let cleanedKey = key.replace(/\W/g, '');
143
- if (keyPrefix) {
144
- cleanedKey = `${keyPrefix}${cleanedKey}`;
145
- }
146
- let invalidKey = false;
147
- // check if the key is still invalid and fallback to using a known
148
- // safe key
149
- if (cleanedKey.length === 0 || cleanedKey.length > 30) {
150
- invalidKey = true;
151
- }
152
- if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
153
- invalidKey = true;
154
- }
155
- if (invalidKey) {
156
- cleanedKey = getSafeRouteKey();
157
- }
158
- const duplicateKey = cleanedKey in routeKeys;
159
- if (keyPrefix) {
160
- routeKeys[cleanedKey] = `${keyPrefix}${key}`;
161
- } else {
162
- routeKeys[cleanedKey] = key;
163
- }
164
- // if the segment has an interception marker, make sure that's part of the regex pattern
165
- // this is to ensure that the route with the interception marker doesn't incorrectly match
166
- // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])
167
- const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : '';
168
- let pattern;
169
- if (duplicateKey && backreferenceDuplicateKeys) {
170
- // Use a backreference to the key to ensure that the key is the same value
171
- // in each of the placeholders.
172
- pattern = `\\k<${cleanedKey}>`;
173
- } else if (repeat) {
174
- pattern = `(?<${cleanedKey}>.+?)`;
175
- } else {
176
- pattern = `(?<${cleanedKey}>[^/]+?)`;
177
- }
178
- return {
179
- key,
180
- pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
181
- cleanedKey: cleanedKey,
182
- optional,
183
- repeat
184
- };
185
- }
186
- function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
187
- names: {},
188
- intercepted: {}
189
- }) {
190
- const getSafeRouteKey = buildGetSafeRouteKey();
191
- const routeKeys = {};
192
- const segments = [];
193
- const inverseParts = [];
194
- // Ensure we don't mutate the original reference object.
195
- reference = structuredClone(reference);
196
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')) {
197
- const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some(m => segment.startsWith(m));
198
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
199
- ;
200
- const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : undefined;
201
- let keyPrefix;
202
- if (interceptionMarker && paramMatches?.[2]) {
203
- keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
204
- reference.intercepted[paramMatches[2]] = interceptionMarker;
205
- } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
206
- keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
207
- } else {
208
- keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : undefined;
209
- }
210
- if (interceptionMarker && paramMatches && paramMatches[2]) {
211
- // If there's an interception marker, add it to the segments.
212
- const {
213
- key,
214
- pattern,
215
- cleanedKey,
216
- repeat,
217
- optional
218
- } = getSafeKeyFromSegment({
219
- getSafeRouteKey,
220
- interceptionMarker,
221
- segment: paramMatches[2],
222
- routeKeys,
223
- keyPrefix,
224
- backreferenceDuplicateKeys
225
- });
226
- segments.push(pattern);
227
- inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
228
- reference.names[key] ??= cleanedKey;
229
- } else if (paramMatches && paramMatches[2]) {
230
- // If there's a prefix, add it to the segments if it's enabled.
231
- if (includePrefix && paramMatches[1]) {
232
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
233
- inverseParts.push(`/${paramMatches[1]}`);
234
- }
235
- const {
236
- key,
237
- pattern,
238
- cleanedKey,
239
- repeat,
240
- optional
241
- } = getSafeKeyFromSegment({
242
- getSafeRouteKey,
243
- segment: paramMatches[2],
244
- routeKeys,
245
- keyPrefix,
246
- backreferenceDuplicateKeys
247
- });
248
- // Remove the leading slash if includePrefix already added it.
249
- let s = pattern;
250
- if (includePrefix && paramMatches[1]) {
251
- s = s.substring(1);
252
- }
253
- segments.push(s);
254
- inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
255
- reference.names[key] ??= cleanedKey;
256
- } else {
257
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
258
- inverseParts.push(`/${segment}`);
259
- }
260
- // If there's a suffix, add it to the segments if it's enabled.
261
- if (includeSuffix && paramMatches && paramMatches[3]) {
262
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
263
- inverseParts.push(paramMatches[3]);
264
- }
265
- }
266
- return {
267
- namedParameterizedRoute: segments.join(''),
268
- routeKeys,
269
- pathToRegexpPattern: inverseParts.join(''),
270
- reference
271
- };
272
- }
273
- function getNamedRouteRegex(normalizedRoute, options) {
274
- const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
275
- let namedRegex = result.namedParameterizedRoute;
276
- if (!options.excludeOptionalTrailingSlash) {
277
- namedRegex += '(?:/)?';
278
- }
279
- return {
280
- ...getRouteRegex(normalizedRoute, options),
281
- namedRegex: `^${namedRegex}$`,
282
- routeKeys: result.routeKeys,
283
- pathToRegexpPattern: result.pathToRegexpPattern,
284
- reference: result.reference
285
- };
286
- }
287
- function getNamedMiddlewareRegex(normalizedRoute, options) {
288
- const {
289
- parameterizedRoute
290
- } = getParametrizedRoute(normalizedRoute, false, false);
291
- const {
292
- catchAll = true
293
- } = options;
294
- if (parameterizedRoute === '/') {
295
- let catchAllRegex = catchAll ? '.*' : '';
296
- return {
297
- namedRegex: `^/${catchAllRegex}$`
298
- };
299
- }
300
- const {
301
- namedParameterizedRoute
302
- } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, undefined);
303
- let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : '';
304
- return {
305
- namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
306
- };
307
- }
308
- } (routeRegex));
309
- return routeRegex;
310
- }
311
-
312
- export { requireRouteRegex as __require };
@@ -1,246 +0,0 @@
1
- import { __exports as sortedRoutes } from '../../../../../../../_virtual/sorted-routes.js';
2
-
3
- var hasRequiredSortedRoutes;
4
-
5
- function requireSortedRoutes () {
6
- if (hasRequiredSortedRoutes) return sortedRoutes;
7
- hasRequiredSortedRoutes = 1;
8
- (function (exports$1) {
9
-
10
- Object.defineProperty(exports$1, "__esModule", {
11
- value: true
12
- });
13
- function _export(target, all) {
14
- for (var name in all) Object.defineProperty(target, name, {
15
- enumerable: true,
16
- get: all[name]
17
- });
18
- }
19
- _export(exports$1, {
20
- getSortedRouteObjects: function () {
21
- return getSortedRouteObjects;
22
- },
23
- getSortedRoutes: function () {
24
- return getSortedRoutes;
25
- }
26
- });
27
- class UrlNode {
28
- insert(urlPath) {
29
- this._insert(urlPath.split('/').filter(Boolean), [], false);
30
- }
31
- smoosh() {
32
- return this._smoosh();
33
- }
34
- _smoosh(prefix = '/') {
35
- const childrenPaths = [...this.children.keys()].sort();
36
- if (this.slugName !== null) {
37
- childrenPaths.splice(childrenPaths.indexOf('[]'), 1);
38
- }
39
- if (this.restSlugName !== null) {
40
- childrenPaths.splice(childrenPaths.indexOf('[...]'), 1);
41
- }
42
- if (this.optionalRestSlugName !== null) {
43
- childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1);
44
- }
45
- const routes = childrenPaths.map(c => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [...prev, ...curr], []);
46
- if (this.slugName !== null) {
47
- routes.push(...this.children.get('[]')._smoosh(`${prefix}[${this.slugName}]/`));
48
- }
49
- if (!this.placeholder) {
50
- const r = prefix === '/' ? '/' : prefix.slice(0, -1);
51
- if (this.optionalRestSlugName != null) {
52
- throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
53
- value: "E458",
54
- enumerable: false,
55
- configurable: true
56
- });
57
- }
58
- routes.unshift(r);
59
- }
60
- if (this.restSlugName !== null) {
61
- routes.push(...this.children.get('[...]')._smoosh(`${prefix}[...${this.restSlugName}]/`));
62
- }
63
- if (this.optionalRestSlugName !== null) {
64
- routes.push(...this.children.get('[[...]]')._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
65
- }
66
- return routes;
67
- }
68
- _insert(urlPaths, slugNames, isCatchAll) {
69
- if (urlPaths.length === 0) {
70
- this.placeholder = false;
71
- return;
72
- }
73
- if (isCatchAll) {
74
- throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
75
- value: "E392",
76
- enumerable: false,
77
- configurable: true
78
- });
79
- }
80
- // The next segment in the urlPaths list
81
- let nextSegment = urlPaths[0];
82
- // Check if the segment matches `[something]`
83
- if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {
84
- // Strip `[` and `]`, leaving only `something`
85
- let segmentName = nextSegment.slice(1, -1);
86
- let isOptional = false;
87
- if (segmentName.startsWith('[') && segmentName.endsWith(']')) {
88
- // Strip optional `[` and `]`, leaving only `something`
89
- segmentName = segmentName.slice(1, -1);
90
- isOptional = true;
91
- }
92
- if (segmentName.startsWith('…')) {
93
- throw Object.defineProperty(new Error(`Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
94
- value: "E147",
95
- enumerable: false,
96
- configurable: true
97
- });
98
- }
99
- if (segmentName.startsWith('...')) {
100
- // Strip `...`, leaving only `something`
101
- segmentName = segmentName.substring(3);
102
- isCatchAll = true;
103
- }
104
- if (segmentName.startsWith('[') || segmentName.endsWith(']')) {
105
- throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
106
- value: "E421",
107
- enumerable: false,
108
- configurable: true
109
- });
110
- }
111
- if (segmentName.startsWith('.')) {
112
- throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
113
- value: "E288",
114
- enumerable: false,
115
- configurable: true
116
- });
117
- }
118
- function handleSlug(previousSlug, nextSlug) {
119
- if (previousSlug !== null) {
120
- // If the specific segment already has a slug but the slug is not `something`
121
- // This prevents collisions like:
122
- // pages/[post]/index.js
123
- // pages/[id]/index.js
124
- // Because currently multiple dynamic params on the same segment level are not supported
125
- if (previousSlug !== nextSlug) {
126
- // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.
127
- throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
128
- value: "E337",
129
- enumerable: false,
130
- configurable: true
131
- });
132
- }
133
- }
134
- slugNames.forEach(slug => {
135
- if (slug === nextSlug) {
136
- throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
137
- value: "E247",
138
- enumerable: false,
139
- configurable: true
140
- });
141
- }
142
- if (slug.replace(/\W/g, '') === nextSegment.replace(/\W/g, '')) {
143
- throw Object.defineProperty(new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`), "__NEXT_ERROR_CODE", {
144
- value: "E499",
145
- enumerable: false,
146
- configurable: true
147
- });
148
- }
149
- });
150
- slugNames.push(nextSlug);
151
- }
152
- if (isCatchAll) {
153
- if (isOptional) {
154
- if (this.restSlugName != null) {
155
- throw Object.defineProperty(new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`), "__NEXT_ERROR_CODE", {
156
- value: "E299",
157
- enumerable: false,
158
- configurable: true
159
- });
160
- }
161
- handleSlug(this.optionalRestSlugName, segmentName);
162
- // slugName is kept as it can only be one particular slugName
163
- this.optionalRestSlugName = segmentName;
164
- // nextSegment is overwritten to [[...]] so that it can later be sorted specifically
165
- nextSegment = '[[...]]';
166
- } else {
167
- if (this.optionalRestSlugName != null) {
168
- throw Object.defineProperty(new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
169
- value: "E300",
170
- enumerable: false,
171
- configurable: true
172
- });
173
- }
174
- handleSlug(this.restSlugName, segmentName);
175
- // slugName is kept as it can only be one particular slugName
176
- this.restSlugName = segmentName;
177
- // nextSegment is overwritten to [...] so that it can later be sorted specifically
178
- nextSegment = '[...]';
179
- }
180
- } else {
181
- if (isOptional) {
182
- throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
183
- value: "E435",
184
- enumerable: false,
185
- configurable: true
186
- });
187
- }
188
- handleSlug(this.slugName, segmentName);
189
- // slugName is kept as it can only be one particular slugName
190
- this.slugName = segmentName;
191
- // nextSegment is overwritten to [] so that it can later be sorted specifically
192
- nextSegment = '[]';
193
- }
194
- }
195
- // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode
196
- if (!this.children.has(nextSegment)) {
197
- this.children.set(nextSegment, new UrlNode());
198
- }
199
- this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
200
- }
201
- constructor() {
202
- this.placeholder = true;
203
- this.children = new Map();
204
- this.slugName = null;
205
- this.restSlugName = null;
206
- this.optionalRestSlugName = null;
207
- }
208
- }
209
- function getSortedRoutes(normalizedPages) {
210
- // First the UrlNode is created, and every UrlNode can have only 1 dynamic segment
211
- // Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js
212
- // Only 1 dynamic segment per nesting level
213
- // So in the case that is test/integration/dynamic-routing it'll be this:
214
- // pages/[post]/comments.js
215
- // pages/blog/[post]/comment/[id].js
216
- // Both are fine because `pages/[post]` and `pages/blog` are on the same level
217
- // So in this case `UrlNode` created here has `this.slugName === 'post'`
218
- // And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities
219
- // Instead what has to be passed through is the upwards path's dynamic names
220
- const root = new UrlNode();
221
- // Here the `root` gets injected multiple paths, and insert will break them up into sublevels
222
- normalizedPages.forEach(pagePath => root.insert(pagePath));
223
- // Smoosh will then sort those sublevels up to the point where you get the correct route definition priority
224
- return root.smoosh();
225
- }
226
- function getSortedRouteObjects(objects, getter) {
227
- // We're assuming here that all the pathnames are unique, that way we can
228
- // sort the list and use the index as the key.
229
- const indexes = {};
230
- const pathnames = [];
231
- for (let i = 0; i < objects.length; i++) {
232
- const pathname = getter(objects[i]);
233
- indexes[pathname] = i;
234
- pathnames[i] = pathname;
235
- }
236
- // Sort the pathnames.
237
- const sorted = getSortedRoutes(pathnames);
238
- // Map the sorted pathnames back to the original objects using the new sorted
239
- // index.
240
- return sorted.map(pathname => objects[indexes[pathname]]);
241
- }
242
- } (sortedRoutes));
243
- return sortedRoutes;
244
- }
245
-
246
- export { requireSortedRoutes as __require };
@@ -1,31 +0,0 @@
1
- import { __exports as routerContext_sharedRuntime } from '../../../../../_virtual/router-context.shared-runtime.js';
2
- import { __require as require_interop_require_default } from '../../../../@swc/helpers/cjs/_interop_require_default.js';
3
- import React__default from 'react';
4
-
5
- var hasRequiredRouterContext_sharedRuntime;
6
-
7
- function requireRouterContext_sharedRuntime () {
8
- if (hasRequiredRouterContext_sharedRuntime) return routerContext_sharedRuntime;
9
- hasRequiredRouterContext_sharedRuntime = 1;
10
- (function (exports$1) {
11
-
12
- Object.defineProperty(exports$1, "__esModule", {
13
- value: true
14
- });
15
- Object.defineProperty(exports$1, "RouterContext", {
16
- enumerable: true,
17
- get: function () {
18
- return RouterContext;
19
- }
20
- });
21
- const _interop_require_default = /*@__PURE__*/ require_interop_require_default();
22
- const _react = /*#__PURE__*/_interop_require_default._(React__default);
23
- const RouterContext = _react.default.createContext(null);
24
- if (process.env.NODE_ENV !== 'production') {
25
- RouterContext.displayName = 'RouterContext';
26
- }
27
- } (routerContext_sharedRuntime));
28
- return routerContext_sharedRuntime;
29
- }
30
-
31
- export { requireRouterContext_sharedRuntime as __require };
@@ -1,102 +0,0 @@
1
- import { __exports as segment } from '../../../../../_virtual/segment.js';
2
-
3
- var hasRequiredSegment;
4
-
5
- function requireSegment () {
6
- if (hasRequiredSegment) return segment;
7
- hasRequiredSegment = 1;
8
- (function (exports$1) {
9
-
10
- Object.defineProperty(exports$1, "__esModule", {
11
- value: true
12
- });
13
- function _export(target, all) {
14
- for (var name in all) Object.defineProperty(target, name, {
15
- enumerable: true,
16
- get: all[name]
17
- });
18
- }
19
- _export(exports$1, {
20
- DEFAULT_SEGMENT_KEY: function () {
21
- return DEFAULT_SEGMENT_KEY;
22
- },
23
- NOT_FOUND_SEGMENT_KEY: function () {
24
- return NOT_FOUND_SEGMENT_KEY;
25
- },
26
- PAGE_SEGMENT_KEY: function () {
27
- return PAGE_SEGMENT_KEY;
28
- },
29
- addSearchParamsIfPageSegment: function () {
30
- return addSearchParamsIfPageSegment;
31
- },
32
- computeSelectedLayoutSegment: function () {
33
- return computeSelectedLayoutSegment;
34
- },
35
- getSegmentValue: function () {
36
- return getSegmentValue;
37
- },
38
- getSelectedLayoutSegmentPath: function () {
39
- return getSelectedLayoutSegmentPath;
40
- },
41
- isGroupSegment: function () {
42
- return isGroupSegment;
43
- },
44
- isParallelRouteSegment: function () {
45
- return isParallelRouteSegment;
46
- }
47
- });
48
- function getSegmentValue(segment) {
49
- return Array.isArray(segment) ? segment[1] : segment;
50
- }
51
- function isGroupSegment(segment) {
52
- // Use array[0] for performant purpose
53
- return segment[0] === '(' && segment.endsWith(')');
54
- }
55
- function isParallelRouteSegment(segment) {
56
- return segment.startsWith('@') && segment !== '@children';
57
- }
58
- function addSearchParamsIfPageSegment(segment, searchParams) {
59
- const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
60
- if (isPageSegment) {
61
- const stringifiedQuery = JSON.stringify(searchParams);
62
- return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY;
63
- }
64
- return segment;
65
- }
66
- function computeSelectedLayoutSegment(segments, parallelRouteKey) {
67
- if (!segments || segments.length === 0) {
68
- return null;
69
- }
70
- // For 'children', use first segment; for other parallel routes, use last segment
71
- const rawSegment = parallelRouteKey === 'children' ? segments[0] : segments[segments.length - 1];
72
- // If the default slot is showing, return null since it's not technically "selected" (it's a fallback)
73
- // Returning an internal value like `__DEFAULT__` would be confusing
74
- return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
75
- }
76
- function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
77
- let node;
78
- if (first) {
79
- // Use the provided parallel route key on the first parallel route
80
- node = tree[1][parallelRouteKey];
81
- } else {
82
- // After first parallel route prefer children, if there's no children pick the first parallel route.
83
- const parallelRoutes = tree[1];
84
- node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
85
- }
86
- if (!node) return segmentPath;
87
- const segment = node[0];
88
- let segmentValue = getSegmentValue(segment);
89
- if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
90
- return segmentPath;
91
- }
92
- segmentPath.push(segmentValue);
93
- return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
94
- }
95
- const PAGE_SEGMENT_KEY = '__PAGE__';
96
- const DEFAULT_SEGMENT_KEY = '__DEFAULT__';
97
- const NOT_FOUND_SEGMENT_KEY = '/_not-found';
98
- } (segment));
99
- return segment;
100
- }
101
-
102
- export { requireSegment as __require };