testeranto 0.202.0 → 0.203.0

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 (773) hide show
  1. package/README.md +23 -0
  2. package/UX/chache/index.md +11 -0
  3. package/dist/prebuild/App.css +78 -0
  4. package/dist/prebuild/App.js +4828 -2814
  5. package/dist/prebuild/testeranto.mjs +2650 -1037
  6. package/example/Calculator.go +63 -0
  7. package/example/Calculator.golingvu.adapter.go +81 -0
  8. package/example/Calculator.golingvu.go +67 -0
  9. package/example/Calculator.golingvu.implementation.go +95 -0
  10. package/example/Calculator.golingvu.specification.go +68 -0
  11. package/example/Calculator.pitono.adapter.py +68 -0
  12. package/example/Calculator.pitono.implementation.py +30 -0
  13. package/example/Calculator.pitono.specification.py +154 -0
  14. package/example/Calculator.pitono.test.py +47 -0
  15. package/example/Calculator.py +93 -0
  16. package/example/Calculator.test.adapter.ts +86 -0
  17. package/example/Calculator.test.implementation.ts +82 -0
  18. package/example/Calculator.test.specification.ts +213 -0
  19. package/example/Calculator.test.ts +13 -0
  20. package/example/Calculator.test.types.ts +50 -0
  21. package/example/Calculator.ts +130 -0
  22. package/example/README.md +1 -0
  23. package/example/base_suite_test.go +51 -0
  24. package/example/cmd/main.go +16 -0
  25. package/example/go.mod +9 -0
  26. package/example/main +0 -0
  27. package/example/test_example.py +143 -74
  28. package/{testeranto → example/testeranto}/bundles/golang/core/Calculator.golingvu.go +1 -1
  29. package/example/testeranto/metafiles/golang/core.json +198 -0
  30. package/go.mod +3 -1
  31. package/golingvu.tmp.txt +68 -0
  32. package/log.txt +85 -0
  33. package/package.json +50 -41
  34. package/scripts/build-example.ts +245 -0
  35. package/src/App.tsx +94 -44
  36. package/src/Helpo.tsx +89 -0
  37. package/src/PM/PM_WithBuild.ts +32 -20
  38. package/src/PM/PM_WithGit.ts +60 -13
  39. package/src/PM/PM_WithHelpo.ts +341 -0
  40. package/src/PM/PM_WithProcesses.ts +484 -223
  41. package/src/PM/PM_WithWebSocket.ts +210 -2
  42. package/src/PM/golingvuBuild.ts +56 -0
  43. package/src/PM/main.ts +570 -438
  44. package/src/PM/pitonoBuild.ts +56 -0
  45. package/src/PM/utils.ts +7 -1
  46. package/src/app.scss +102 -0
  47. package/src/components/pure/AppFrame.tsx +259 -149
  48. package/src/components/pure/GitIntegrationView.tsx +527 -238
  49. package/src/components/pure/HelpoChatDrawer.tsx +222 -0
  50. package/src/components/pure/MagicRobotModal.tsx +136 -0
  51. package/src/components/pure/ProcessDetails.tsx +99 -0
  52. package/src/components/pure/ProcessInput.tsx +67 -0
  53. package/src/components/pure/ProcessList.tsx +89 -0
  54. package/src/components/pure/ProcessLogs.tsx +54 -0
  55. package/src/components/pure/ProcessManager.tsx +37 -46
  56. package/src/components/pure/ProcessManagerView.tsx +42 -367
  57. package/src/components/pure/ProcessManagerViewTypes.ts +10 -0
  58. package/src/components/pure/ProcessSidebar.tsx +88 -0
  59. package/src/components/pure/ProcessTerminal.tsx +51 -0
  60. package/src/components/pure/SingleProcessView.tsx +140 -231
  61. package/src/components/pure/TerminalInput.tsx +73 -0
  62. package/src/components/pure/TerminalLogs.tsx +80 -0
  63. package/src/components/pure/TestPageView.tsx +21 -116
  64. package/src/components/pure/TestPageView_utils.tsx +2 -0
  65. package/src/components/stateful/DratoPage.tsx +457 -0
  66. package/src/components/stateful/GenericXMLEditor/AttributeEditor.tsx +87 -0
  67. package/src/components/stateful/GenericXMLEditor/Drawer.tsx +174 -0
  68. package/src/components/stateful/GenericXMLEditor/GenericPreview.tsx +160 -0
  69. package/src/components/stateful/GenericXMLEditor/GenericTextEditor.tsx +104 -0
  70. package/src/components/stateful/GenericXMLEditor/GenericTree.tsx +104 -0
  71. package/src/components/stateful/GenericXMLEditorPage.tsx +346 -0
  72. package/src/components/stateful/GitIntegrationPage.tsx +258 -3
  73. package/src/components/stateful/GrafeoPage.tsx +563 -0
  74. package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +26 -8
  75. package/src/components/stateful/SVGEditor/SVGPreview.tsx +4 -2
  76. package/src/components/stateful/SVGEditorPage.tsx +195 -181
  77. package/src/components/stateful/SingleProcessPage.tsx +133 -131
  78. package/src/components/stateful/SkriboPage.tsx +765 -0
  79. package/src/components/stateful/TestPage.tsx +3 -2
  80. package/src/esbuildConfigs/node.ts +1 -1
  81. package/src/example/go.mod +9 -0
  82. package/src/example/main.go +61 -0
  83. package/src/golingvu/PM/golang_test.go +103 -0
  84. package/src/golingvu/README.md +186 -2
  85. package/src/golingvu/base_given.go +89 -2
  86. package/src/golingvu/base_suite.go +48 -2
  87. package/src/golingvu/go.mod +6 -0
  88. package/src/golingvu/golingvu.go +703 -29
  89. package/src/golingvu/types.go +0 -14
  90. package/src/helpo/directives.md +5 -0
  91. package/src/helpo/prompt.txt +38 -0
  92. package/src/hooks/useTerminalWebSocket.ts +49 -0
  93. package/src/lib/BaseGiven.ts +126 -28
  94. package/src/lib/BaseSuite.test/test.ts +97 -180
  95. package/src/lib/BaseSuite.ts +52 -10
  96. package/src/lib/BaseThen.ts +34 -38
  97. package/src/lib/BaseWhen.ts +9 -2
  98. package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +9 -8
  99. package/src/lib/Tiposkripto.ts +41 -11
  100. package/src/lib/pmProxy.ts +55 -18
  101. package/src/pitono/PM/python.py +165 -0
  102. package/src/pitono/Pitono.py +298 -0
  103. package/src/pitono/PitonoTest.py +25 -0
  104. package/src/pitono/README.md +21 -0
  105. package/src/pitono/__init__.py +6 -0
  106. package/{pitono → src/pitono}/base_given.py +42 -20
  107. package/{pitono → src/pitono}/base_suite.py +55 -2
  108. package/{pitono → src/pitono}/base_then.py +15 -1
  109. package/{pitono → src/pitono}/base_when.py +15 -1
  110. package/{pitono → src/pitono}/pitono.egg-info/PKG-INFO +25 -0
  111. package/{pitono → src/pitono}/pitono.egg-info/SOURCES.txt +1 -0
  112. package/src/pitono/types.py +87 -0
  113. package/src/services/FileService.ts +146 -11
  114. package/src/testeranto.ts +115 -149
  115. package/src/utils/golingvuMetafile.ts +822 -118
  116. package/src/utils/golingvuWatcher.ts +285 -0
  117. package/src/utils/logFiles.ts +10 -2
  118. package/src/utils/makePrompt.ts +12 -1
  119. package/src/utils/pitonoMetafile.ts +326 -54
  120. package/src/utils/pitonoWatcher.ts +157 -0
  121. package/testeranto/App.css +78 -0
  122. package/testeranto/App.js +4828 -2814
  123. package/testeranto/bundles/node/core/{chunk-RIM6RECA.mjs → chunk-MJTSYIAQ.mjs} +179 -250
  124. package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +110 -62
  125. package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +135 -137
  126. package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +4317 -4
  127. package/testeranto/bundles/pure/core/{chunk-XYOCRDEQ.mjs → chunk-6HR24P27.mjs} +96 -173
  128. package/testeranto/bundles/pure/core/src/Pure.test.mjs +1 -1
  129. package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +110 -62
  130. package/testeranto/bundles/web/core/{chunk-JMDLMADH.mjs → chunk-AZZHJNSU.mjs} +2473 -191
  131. package/testeranto/bundles/web/core/{chunk-LQMU5NCG.mjs → chunk-ME6I6FJZ.mjs} +96 -173
  132. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +15 -0
  133. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +3 -5
  134. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +0 -78
  135. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +15 -0
  136. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +6476 -69
  137. package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.html +15 -0
  138. package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +110 -62
  139. package/testeranto/helpo_chat_history.json +1 -0
  140. package/testeranto/metafiles/golang/core.json +42 -47
  141. package/testeranto/metafiles/node/core.json +263 -247
  142. package/testeranto/metafiles/pure/core.json +23 -38
  143. package/testeranto/metafiles/python/core.json +85 -9
  144. package/testeranto/metafiles/web/core.json +966 -460
  145. package/testeranto/reports/core/config.json +30 -6
  146. package/testeranto/reports/core/example/Calculator.golingvu/golang/exit.log +1 -0
  147. package/testeranto/reports/core/example/Calculator.golingvu/golang/stderr.log +2 -0
  148. package/testeranto/reports/core/example/Calculator.golingvu/golang/stdout.log +1 -0
  149. package/testeranto/reports/core/example/Calculator.pitono.test/python/exit.log +1 -0
  150. package/testeranto/reports/core/example/Calculator.pitono.test/python/stderr.log +11 -0
  151. package/testeranto/reports/core/example/Calculator.pitono.test/python/stdout.log +1 -0
  152. package/testeranto/reports/core/example/Calculator.test/node/exit.log +1 -0
  153. package/testeranto/reports/core/example/Calculator.test/node/lint_errors.txt +2 -0
  154. package/testeranto/reports/core/example/Calculator.test/node/message.txt +16 -0
  155. package/testeranto/reports/core/example/Calculator.test/node/prompt.txt +13 -0
  156. package/testeranto/reports/core/example/Calculator.test/node/stderr.log +33 -0
  157. package/testeranto/reports/core/example/Calculator.test/node/stdout.log +1076 -0
  158. package/testeranto/reports/core/example/Calculator.test/node/tests.json +1109 -0
  159. package/testeranto/reports/core/example/Calculator.test/node/type_errors.txt +34 -0
  160. package/testeranto/reports/core/example/test_example/python/exit.log +1 -0
  161. package/testeranto/reports/core/example/test_example/python/stderr.log +24 -0
  162. package/testeranto/reports/core/src/Pure.test/pure/message.txt +1 -2
  163. package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +4 -5
  164. package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +16 -3
  165. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +0 -91
  166. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/exit.log +0 -1
  167. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -2
  168. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/message.txt +17 -0
  169. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +26 -0
  170. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +69 -0
  171. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/lint_errors.txt +16 -0
  172. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/message.txt +17 -0
  173. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/prompt.txt +27 -0
  174. package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/type_errors.txt +42 -0
  175. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +0 -30
  176. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/exit.log +0 -1
  177. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -2
  178. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +30 -0
  179. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +17 -0
  180. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +30 -0
  181. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +58 -0
  182. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +1 -1
  183. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +9 -1
  184. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stderr.log +1 -0
  185. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +4 -1
  186. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +98 -7
  187. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +44 -28
  188. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +1 -2
  189. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +4 -6
  190. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +44 -28
  191. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -1
  192. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +0 -1
  193. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/message.txt +17 -0
  194. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +25 -0
  195. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +69 -0
  196. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -1
  197. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +1 -2
  198. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +4 -8
  199. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +68 -35
  200. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +336 -6
  201. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/tests.json +166 -0
  202. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +20 -13
  203. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -1
  204. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +9 -1
  205. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +0 -20
  206. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +1 -3
  207. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +31 -0
  208. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +16 -3
  209. package/testeranto/reports/core/summary.json +46 -19
  210. package/testeranto.config.ts +18 -30
  211. package/dist/cjs-shim.js +0 -12
  212. package/dist/common/design-editor/DesignEditor.js +0 -77
  213. package/dist/common/design-editor/index.js +0 -18
  214. package/dist/common/design-editor/server.js +0 -98
  215. package/dist/common/design-editor/types.js +0 -2
  216. package/dist/common/package.json +0 -3
  217. package/dist/common/src/App.js +0 -219
  218. package/dist/common/src/CoreTypes.js +0 -2
  219. package/dist/common/src/Init.js +0 -48
  220. package/dist/common/src/Node.js +0 -40
  221. package/dist/common/src/NodeSidecar.js +0 -15
  222. package/dist/common/src/PM/PM_WithBuild.js +0 -135
  223. package/dist/common/src/PM/PM_WithEslintAndTsc.js +0 -204
  224. package/dist/common/src/PM/PM_WithGit.js +0 -517
  225. package/dist/common/src/PM/PM_WithProcesses.js +0 -519
  226. package/dist/common/src/PM/PM_WithWebSocket.js +0 -535
  227. package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +0 -108
  228. package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +0 -93
  229. package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +0 -93
  230. package/dist/common/src/PM/base.js +0 -319
  231. package/dist/common/src/PM/index.js +0 -6
  232. package/dist/common/src/PM/main.js +0 -672
  233. package/dist/common/src/PM/metafileOutputs.js +0 -78
  234. package/dist/common/src/PM/node.js +0 -179
  235. package/dist/common/src/PM/nodeSidecar.js +0 -65
  236. package/dist/common/src/PM/pitonoRunner.js +0 -54
  237. package/dist/common/src/PM/pure.js +0 -103
  238. package/dist/common/src/PM/pureSidecar.js +0 -48
  239. package/dist/common/src/PM/sidecar.js +0 -11
  240. package/dist/common/src/PM/types.js +0 -2
  241. package/dist/common/src/PM/utils.js +0 -210
  242. package/dist/common/src/PM/web.js +0 -106
  243. package/dist/common/src/PM/webSidecar.js +0 -47
  244. package/dist/common/src/Pure.js +0 -52
  245. package/dist/common/src/Pure.test.js +0 -180
  246. package/dist/common/src/PureSidecar.js +0 -13
  247. package/dist/common/src/ReportServer.js +0 -1
  248. package/dist/common/src/ReportServer.test.ts/index.js +0 -78
  249. package/dist/common/src/ReportServerLib.js +0 -1
  250. package/dist/common/src/Types.js +0 -2
  251. package/dist/common/src/Web.js +0 -61
  252. package/dist/common/src/WebSidecar.js +0 -14
  253. package/dist/common/src/components/DesignEditorPage.js +0 -205
  254. package/dist/common/src/components/SunriseAnimation.js +0 -291
  255. package/dist/common/src/components/SunriseAnimation.test/implementation.js +0 -1
  256. package/dist/common/src/components/SunriseAnimation.test/index.js +0 -1
  257. package/dist/common/src/components/SunriseAnimation.test/interface.js +0 -68
  258. package/dist/common/src/components/SunriseAnimation.test/specification.js +0 -1
  259. package/dist/common/src/components/SunriseAnimation.test/types.js +0 -2
  260. package/dist/common/src/components/TestStatusBadge.js +0 -35
  261. package/dist/common/src/components/pure/AppFrame.js +0 -81
  262. package/dist/common/src/components/pure/AppFrame.test/implementation.js +0 -63
  263. package/dist/common/src/components/pure/AppFrame.test/index.js +0 -14
  264. package/dist/common/src/components/pure/AppFrame.test/specification.js +0 -25
  265. package/dist/common/src/components/pure/AppFrame.test/types.js +0 -3
  266. package/dist/common/src/components/pure/ArtifactTree.js +0 -80
  267. package/dist/common/src/components/pure/BuildLogViewer.js +0 -106
  268. package/dist/common/src/components/pure/DebugEnv.js +0 -30
  269. package/dist/common/src/components/pure/FeaturesReporterView.js +0 -23
  270. package/dist/common/src/components/pure/FeaturesReporterView.test/implementation.js +0 -84
  271. package/dist/common/src/components/pure/FeaturesReporterView.test/index.js +0 -14
  272. package/dist/common/src/components/pure/FeaturesReporterView.test/specification.js +0 -27
  273. package/dist/common/src/components/pure/FeaturesReporterView.test/types.js +0 -2
  274. package/dist/common/src/components/pure/FileTree.js +0 -34
  275. package/dist/common/src/components/pure/FileTreeItem.js +0 -29
  276. package/dist/common/src/components/pure/GitHubLoginButton.js +0 -18
  277. package/dist/common/src/components/pure/GitIntegrationView.js +0 -342
  278. package/dist/common/src/components/pure/ModalContent.js +0 -86
  279. package/dist/common/src/components/pure/ModalContent.test/implementation.js +0 -35
  280. package/dist/common/src/components/pure/ModalContent.test/index.js +0 -58
  281. package/dist/common/src/components/pure/ModalContent.test/specification.js +0 -19
  282. package/dist/common/src/components/pure/ModalContent.test/types.js +0 -4
  283. package/dist/common/src/components/pure/NavBar.js +0 -44
  284. package/dist/common/src/components/pure/ProcessManager.js +0 -113
  285. package/dist/common/src/components/pure/ProcessManagerView.js +0 -236
  286. package/dist/common/src/components/pure/ProjectPageView.js +0 -68
  287. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +0 -184
  288. package/dist/common/src/components/pure/ProjectPageView.test/index.js +0 -14
  289. package/dist/common/src/components/pure/ProjectPageView.test/specification.js +0 -32
  290. package/dist/common/src/components/pure/ProjectPageView.test/types.js +0 -4
  291. package/dist/common/src/components/pure/ProjectsPageView.js +0 -72
  292. package/dist/common/src/components/pure/Settings.js +0 -121
  293. package/dist/common/src/components/pure/Settings.test.js +0 -34
  294. package/dist/common/src/components/pure/SettingsButton.js +0 -13
  295. package/dist/common/src/components/pure/SignIn.js +0 -22
  296. package/dist/common/src/components/pure/SingleProcessView.js +0 -167
  297. package/dist/common/src/components/pure/TestPageView.js +0 -373
  298. package/dist/common/src/components/pure/TestPageView.test/implementation.js +0 -157
  299. package/dist/common/src/components/pure/TestPageView.test/index.js +0 -15
  300. package/dist/common/src/components/pure/TestPageView.test/specification.js +0 -26
  301. package/dist/common/src/components/pure/TestPageView.test/types.js +0 -4
  302. package/dist/common/src/components/pure/TestPageView_utils.js +0 -117
  303. package/dist/common/src/components/pure/TestTable.js +0 -33
  304. package/dist/common/src/components/pure/ThemeCard.js +0 -15
  305. package/dist/common/src/components/pure/ToastNotification.js +0 -14
  306. package/dist/common/src/components/pure/UserProfile.js +0 -27
  307. package/dist/common/src/components/stateful/AuthCallbackPage.js +0 -51
  308. package/dist/common/src/components/stateful/FeaturesReporter.js +0 -60
  309. package/dist/common/src/components/stateful/FileTree.js +0 -59
  310. package/dist/common/src/components/stateful/GitIntegrationPage.js +0 -12
  311. package/dist/common/src/components/stateful/ProcessManagerPage.js +0 -110
  312. package/dist/common/src/components/stateful/ProjectPage.js +0 -102
  313. package/dist/common/src/components/stateful/ProjectsPage.js +0 -116
  314. package/dist/common/src/components/stateful/SettingsPage.js +0 -72
  315. package/dist/common/src/components/stateful/SingleProcessPage.js +0 -137
  316. package/dist/common/src/components/stateful/TestPage.js +0 -270
  317. package/dist/common/src/components/stateful/TextEditorPage.js +0 -154
  318. package/dist/common/src/defaultConfig.js +0 -19
  319. package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +0 -38
  320. package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -21
  321. package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
  322. package/dist/common/src/esbuildConfigs/index.js +0 -21
  323. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -30
  324. package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -24
  325. package/dist/common/src/esbuildConfigs/node.js +0 -24
  326. package/dist/common/src/esbuildConfigs/pure.js +0 -42
  327. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +0 -19
  328. package/dist/common/src/esbuildConfigs/web.js +0 -48
  329. package/dist/common/src/hooks/useGitMode.js +0 -21
  330. package/dist/common/src/init-docs.js +0 -9
  331. package/dist/common/src/lib/BaseGiven.js +0 -99
  332. package/dist/common/src/lib/BaseSuite.js +0 -91
  333. package/dist/common/src/lib/BaseSuite.test/mock.js +0 -68
  334. package/dist/common/src/lib/BaseSuite.test/node.test.js +0 -10
  335. package/dist/common/src/lib/BaseSuite.test/pure.test.js +0 -10
  336. package/dist/common/src/lib/BaseSuite.test/test.js +0 -229
  337. package/dist/common/src/lib/BaseSuite.test/web.test.js +0 -10
  338. package/dist/common/src/lib/BaseThen.js +0 -64
  339. package/dist/common/src/lib/BaseWhen.js +0 -45
  340. package/dist/common/src/lib/Sidecar.js +0 -7
  341. package/dist/common/src/lib/Tiposkripto.js +0 -173
  342. package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -180
  343. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -29
  344. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -213
  345. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.js +0 -11
  346. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -50
  347. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -2
  348. package/dist/common/src/lib/abstractBase.test/MockGiven.js +0 -24
  349. package/dist/common/src/lib/abstractBase.test/MockThen.js +0 -16
  350. package/dist/common/src/lib/abstractBase.test/MockWhen.js +0 -20
  351. package/dist/common/src/lib/abstractBase.test/adapter.js +0 -24
  352. package/dist/common/src/lib/abstractBase.test/implementation.js +0 -38
  353. package/dist/common/src/lib/abstractBase.test/index.js +0 -18
  354. package/dist/common/src/lib/abstractBase.test/specification.js +0 -19
  355. package/dist/common/src/lib/abstractBase.test/types.js +0 -2
  356. package/dist/common/src/lib/index.js +0 -31
  357. package/dist/common/src/lib/pmProxy.js +0 -293
  358. package/dist/common/src/lib/pmProxy.test/adapter.js +0 -54
  359. package/dist/common/src/lib/pmProxy.test/implementation.js +0 -137
  360. package/dist/common/src/lib/pmProxy.test/index.js +0 -15
  361. package/dist/common/src/lib/pmProxy.test/mockPM.js +0 -34
  362. package/dist/common/src/lib/pmProxy.test/mockPMBase.js +0 -131
  363. package/dist/common/src/lib/pmProxy.test/specification.js +0 -179
  364. package/dist/common/src/lib/pmProxy.test/types.js +0 -2
  365. package/dist/common/src/lib/types.js +0 -3
  366. package/dist/common/src/mothership/index.js +0 -21
  367. package/dist/common/src/mothership/test.js +0 -83
  368. package/dist/common/src/run.js +0 -49
  369. package/dist/common/src/services/FileService.js +0 -505
  370. package/dist/common/src/services/GitHubAuthService.js +0 -184
  371. package/dist/common/src/testeranto.js +0 -224
  372. package/dist/common/src/types/features.js +0 -34
  373. package/dist/common/src/utils/api.js +0 -93
  374. package/dist/common/src/utils/buildTemplates.js +0 -37
  375. package/dist/common/src/utils/featureUtils.js +0 -29
  376. package/dist/common/src/utils/gitTest.js +0 -27
  377. package/dist/common/src/utils/golingvuMetafile.js +0 -116
  378. package/dist/common/src/utils/logFiles.js +0 -52
  379. package/dist/common/src/utils/makePrompt.js +0 -116
  380. package/dist/common/src/utils/pitonoMetafile.js +0 -67
  381. package/dist/common/src/utils/queue.js +0 -36
  382. package/dist/common/src/utils.js +0 -143
  383. package/dist/common/src/web.html.js +0 -18
  384. package/dist/common/testeranto.config.js +0 -102
  385. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  386. package/dist/module/design-editor/DesignEditor.js +0 -40
  387. package/dist/module/design-editor/index.js +0 -2
  388. package/dist/module/design-editor/server.js +0 -92
  389. package/dist/module/design-editor/types.js +0 -1
  390. package/dist/module/package.json +0 -3
  391. package/dist/module/src/App.js +0 -176
  392. package/dist/module/src/CoreTypes.js +0 -1
  393. package/dist/module/src/Init.js +0 -43
  394. package/dist/module/src/Node.js +0 -33
  395. package/dist/module/src/NodeSidecar.js +0 -11
  396. package/dist/module/src/PM/PM_WithBuild.js +0 -128
  397. package/dist/module/src/PM/PM_WithEslintAndTsc.js +0 -197
  398. package/dist/module/src/PM/PM_WithGit.js +0 -477
  399. package/dist/module/src/PM/PM_WithProcesses.js +0 -479
  400. package/dist/module/src/PM/PM_WithWebSocket.js +0 -528
  401. package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +0 -103
  402. package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +0 -88
  403. package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +0 -88
  404. package/dist/module/src/PM/base.js +0 -312
  405. package/dist/module/src/PM/index.js +0 -2
  406. package/dist/module/src/PM/main.js +0 -632
  407. package/dist/module/src/PM/metafileOutputs.js +0 -78
  408. package/dist/module/src/PM/node.js +0 -172
  409. package/dist/module/src/PM/nodeSidecar.js +0 -58
  410. package/dist/module/src/PM/pitonoRunner.js +0 -47
  411. package/dist/module/src/PM/pure.js +0 -99
  412. package/dist/module/src/PM/pureSidecar.js +0 -41
  413. package/dist/module/src/PM/sidecar.js +0 -7
  414. package/dist/module/src/PM/types.js +0 -1
  415. package/dist/module/src/PM/utils.js +0 -196
  416. package/dist/module/src/PM/web.js +0 -102
  417. package/dist/module/src/PM/webSidecar.js +0 -40
  418. package/dist/module/src/Pure.js +0 -45
  419. package/dist/module/src/Pure.test.js +0 -175
  420. package/dist/module/src/PureSidecar.js +0 -9
  421. package/dist/module/src/ReportServer.js +0 -1
  422. package/dist/module/src/ReportServer.test.ts/index.js +0 -73
  423. package/dist/module/src/ReportServerLib.js +0 -1
  424. package/dist/module/src/Types.js +0 -1
  425. package/dist/module/src/Web.js +0 -54
  426. package/dist/module/src/WebSidecar.js +0 -10
  427. package/dist/module/src/components/DesignEditorPage.js +0 -168
  428. package/dist/module/src/components/SunriseAnimation.js +0 -256
  429. package/dist/module/src/components/SunriseAnimation.test/implementation.js +0 -1
  430. package/dist/module/src/components/SunriseAnimation.test/index.js +0 -1
  431. package/dist/module/src/components/SunriseAnimation.test/interface.js +0 -32
  432. package/dist/module/src/components/SunriseAnimation.test/specification.js +0 -1
  433. package/dist/module/src/components/SunriseAnimation.test/types.js +0 -1
  434. package/dist/module/src/components/TestStatusBadge.js +0 -28
  435. package/dist/module/src/components/pure/AppFrame.js +0 -74
  436. package/dist/module/src/components/pure/AppFrame.test/implementation.js +0 -57
  437. package/dist/module/src/components/pure/AppFrame.test/index.js +0 -9
  438. package/dist/module/src/components/pure/AppFrame.test/specification.js +0 -21
  439. package/dist/module/src/components/pure/AppFrame.test/types.js +0 -2
  440. package/dist/module/src/components/pure/ArtifactTree.js +0 -80
  441. package/dist/module/src/components/pure/BuildLogViewer.js +0 -99
  442. package/dist/module/src/components/pure/DebugEnv.js +0 -23
  443. package/dist/module/src/components/pure/FeaturesReporterView.js +0 -16
  444. package/dist/module/src/components/pure/FeaturesReporterView.test/implementation.js +0 -81
  445. package/dist/module/src/components/pure/FeaturesReporterView.test/index.js +0 -9
  446. package/dist/module/src/components/pure/FeaturesReporterView.test/specification.js +0 -23
  447. package/dist/module/src/components/pure/FeaturesReporterView.test/types.js +0 -1
  448. package/dist/module/src/components/pure/FileTree.js +0 -27
  449. package/dist/module/src/components/pure/FileTreeItem.js +0 -22
  450. package/dist/module/src/components/pure/GitHubLoginButton.js +0 -11
  451. package/dist/module/src/components/pure/GitIntegrationView.js +0 -305
  452. package/dist/module/src/components/pure/ModalContent.js +0 -79
  453. package/dist/module/src/components/pure/ModalContent.test/implementation.js +0 -32
  454. package/dist/module/src/components/pure/ModalContent.test/index.js +0 -53
  455. package/dist/module/src/components/pure/ModalContent.test/specification.js +0 -15
  456. package/dist/module/src/components/pure/ModalContent.test/types.js +0 -3
  457. package/dist/module/src/components/pure/NavBar.js +0 -37
  458. package/dist/module/src/components/pure/ProcessManager.js +0 -76
  459. package/dist/module/src/components/pure/ProcessManagerView.js +0 -199
  460. package/dist/module/src/components/pure/ProjectPageView.js +0 -61
  461. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +0 -181
  462. package/dist/module/src/components/pure/ProjectPageView.test/index.js +0 -9
  463. package/dist/module/src/components/pure/ProjectPageView.test/specification.js +0 -28
  464. package/dist/module/src/components/pure/ProjectPageView.test/types.js +0 -3
  465. package/dist/module/src/components/pure/ProjectsPageView.js +0 -65
  466. package/dist/module/src/components/pure/Settings.js +0 -84
  467. package/dist/module/src/components/pure/Settings.test.js +0 -29
  468. package/dist/module/src/components/pure/SettingsButton.js +0 -6
  469. package/dist/module/src/components/pure/SignIn.js +0 -15
  470. package/dist/module/src/components/pure/SingleProcessView.js +0 -130
  471. package/dist/module/src/components/pure/TestPageView.js +0 -336
  472. package/dist/module/src/components/pure/TestPageView.test/implementation.js +0 -121
  473. package/dist/module/src/components/pure/TestPageView.test/index.js +0 -10
  474. package/dist/module/src/components/pure/TestPageView.test/specification.js +0 -22
  475. package/dist/module/src/components/pure/TestPageView.test/types.js +0 -3
  476. package/dist/module/src/components/pure/TestPageView_utils.js +0 -109
  477. package/dist/module/src/components/pure/TestTable.js +0 -26
  478. package/dist/module/src/components/pure/ThemeCard.js +0 -8
  479. package/dist/module/src/components/pure/ToastNotification.js +0 -7
  480. package/dist/module/src/components/pure/UserProfile.js +0 -20
  481. package/dist/module/src/components/stateful/AuthCallbackPage.js +0 -14
  482. package/dist/module/src/components/stateful/FeaturesReporter.js +0 -23
  483. package/dist/module/src/components/stateful/FileTree.js +0 -59
  484. package/dist/module/src/components/stateful/GitIntegrationPage.js +0 -5
  485. package/dist/module/src/components/stateful/ProcessManagerPage.js +0 -73
  486. package/dist/module/src/components/stateful/ProjectPage.js +0 -65
  487. package/dist/module/src/components/stateful/ProjectsPage.js +0 -79
  488. package/dist/module/src/components/stateful/SettingsPage.js +0 -35
  489. package/dist/module/src/components/stateful/SingleProcessPage.js +0 -100
  490. package/dist/module/src/components/stateful/TestPage.js +0 -233
  491. package/dist/module/src/components/stateful/TextEditorPage.js +0 -117
  492. package/dist/module/src/defaultConfig.js +0 -17
  493. package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +0 -32
  494. package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -18
  495. package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
  496. package/dist/module/src/esbuildConfigs/index.js +0 -19
  497. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -25
  498. package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -21
  499. package/dist/module/src/esbuildConfigs/node.js +0 -19
  500. package/dist/module/src/esbuildConfigs/pure.js +0 -37
  501. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +0 -14
  502. package/dist/module/src/esbuildConfigs/web.js +0 -43
  503. package/dist/module/src/hooks/useGitMode.js +0 -17
  504. package/dist/module/src/init-docs.js +0 -4
  505. package/dist/module/src/lib/BaseGiven.js +0 -95
  506. package/dist/module/src/lib/BaseSuite.js +0 -87
  507. package/dist/module/src/lib/BaseSuite.test/mock.js +0 -61
  508. package/dist/module/src/lib/BaseSuite.test/node.test.js +0 -5
  509. package/dist/module/src/lib/BaseSuite.test/pure.test.js +0 -5
  510. package/dist/module/src/lib/BaseSuite.test/test.js +0 -225
  511. package/dist/module/src/lib/BaseSuite.test/web.test.js +0 -5
  512. package/dist/module/src/lib/BaseThen.js +0 -60
  513. package/dist/module/src/lib/BaseWhen.js +0 -41
  514. package/dist/module/src/lib/Sidecar.js +0 -3
  515. package/dist/module/src/lib/Tiposkripto.js +0 -170
  516. package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -173
  517. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -26
  518. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -210
  519. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.js +0 -6
  520. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -46
  521. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -1
  522. package/dist/module/src/lib/abstractBase.test/MockGiven.js +0 -20
  523. package/dist/module/src/lib/abstractBase.test/MockThen.js +0 -12
  524. package/dist/module/src/lib/abstractBase.test/MockWhen.js +0 -16
  525. package/dist/module/src/lib/abstractBase.test/adapter.js +0 -21
  526. package/dist/module/src/lib/abstractBase.test/implementation.js +0 -35
  527. package/dist/module/src/lib/abstractBase.test/index.js +0 -13
  528. package/dist/module/src/lib/abstractBase.test/specification.js +0 -15
  529. package/dist/module/src/lib/abstractBase.test/types.js +0 -1
  530. package/dist/module/src/lib/index.js +0 -26
  531. package/dist/module/src/lib/pmProxy.js +0 -284
  532. package/dist/module/src/lib/pmProxy.test/adapter.js +0 -51
  533. package/dist/module/src/lib/pmProxy.test/implementation.js +0 -134
  534. package/dist/module/src/lib/pmProxy.test/index.js +0 -10
  535. package/dist/module/src/lib/pmProxy.test/mockPM.js +0 -30
  536. package/dist/module/src/lib/pmProxy.test/mockPMBase.js +0 -127
  537. package/dist/module/src/lib/pmProxy.test/specification.js +0 -175
  538. package/dist/module/src/lib/pmProxy.test/types.js +0 -1
  539. package/dist/module/src/lib/types.js +0 -2
  540. package/dist/module/src/mothership/index.js +0 -16
  541. package/dist/module/src/mothership/test.js +0 -78
  542. package/dist/module/src/run.js +0 -49
  543. package/dist/module/src/services/FileService.js +0 -468
  544. package/dist/module/src/services/GitHubAuthService.js +0 -180
  545. package/dist/module/src/testeranto.js +0 -186
  546. package/dist/module/src/types/features.js +0 -31
  547. package/dist/module/src/utils/api.js +0 -87
  548. package/dist/module/src/utils/buildTemplates.js +0 -33
  549. package/dist/module/src/utils/featureUtils.js +0 -24
  550. package/dist/module/src/utils/gitTest.js +0 -23
  551. package/dist/module/src/utils/golingvuMetafile.js +0 -109
  552. package/dist/module/src/utils/logFiles.js +0 -47
  553. package/dist/module/src/utils/makePrompt.js +0 -109
  554. package/dist/module/src/utils/pitonoMetafile.js +0 -60
  555. package/dist/module/src/utils/queue.js +0 -32
  556. package/dist/module/src/utils.js +0 -130
  557. package/dist/module/src/web.html.js +0 -16
  558. package/dist/module/testeranto.config.js +0 -100
  559. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  560. package/dist/types/design-editor/DesignEditor.d.ts +0 -1
  561. package/dist/types/src/App.d.ts +0 -19
  562. package/dist/types/src/CoreTypes.d.ts +0 -52
  563. package/dist/types/src/Init.d.ts +0 -2
  564. package/dist/types/src/Node.d.ts +0 -9
  565. package/dist/types/src/NodeSidecar.d.ts +0 -6
  566. package/dist/types/src/PM/PM_WithBuild.d.ts +0 -13
  567. package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +0 -22
  568. package/dist/types/src/PM/PM_WithGit.d.ts +0 -27
  569. package/dist/types/src/PM/PM_WithProcesses.d.ts +0 -29
  570. package/dist/types/src/PM/PM_WithWebSocket.d.ts +0 -108
  571. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +0 -2
  572. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +0 -2
  573. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +0 -2
  574. package/dist/types/src/PM/base.d.ts +0 -35
  575. package/dist/types/src/PM/index.d.ts +0 -35
  576. package/dist/types/src/PM/main.d.ts +0 -8
  577. package/dist/types/src/PM/node.d.ts +0 -38
  578. package/dist/types/src/PM/nodeSidecar.d.ts +0 -13
  579. package/dist/types/src/PM/pitonoRunner.d.ts +0 -7
  580. package/dist/types/src/PM/pure.d.ts +0 -41
  581. package/dist/types/src/PM/pureSidecar.d.ts +0 -11
  582. package/dist/types/src/PM/sidecar.d.ts +0 -8
  583. package/dist/types/src/PM/types.d.ts +0 -118
  584. package/dist/types/src/PM/utils.d.ts +0 -35
  585. package/dist/types/src/PM/web.d.ts +0 -41
  586. package/dist/types/src/PM/webSidecar.d.ts +0 -11
  587. package/dist/types/src/Pure.d.ts +0 -14
  588. package/dist/types/src/Pure.test.d.ts +0 -2
  589. package/dist/types/src/PureSidecar.d.ts +0 -8
  590. package/dist/types/src/ReportServer.test.ts/index.d.ts +0 -2
  591. package/dist/types/src/Types.d.ts +0 -119
  592. package/dist/types/src/Web.d.ts +0 -9
  593. package/dist/types/src/WebSidecar.d.ts +0 -8
  594. package/dist/types/src/components/DesignEditorPage.d.ts +0 -1
  595. package/dist/types/src/components/SunriseAnimation.d.ts +0 -5
  596. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -11
  597. package/dist/types/src/components/SunriseAnimation.test/types.d.ts +0 -39
  598. package/dist/types/src/components/TestStatusBadge.d.ts +0 -15
  599. package/dist/types/src/components/pure/AppFrame.d.ts +0 -11
  600. package/dist/types/src/components/pure/AppFrame.test/implementation.d.ts +0 -3
  601. package/dist/types/src/components/pure/AppFrame.test/index.d.ts +0 -3
  602. package/dist/types/src/components/pure/AppFrame.test/specification.d.ts +0 -3
  603. package/dist/types/src/components/pure/AppFrame.test/types.d.ts +0 -33
  604. package/dist/types/src/components/pure/BuildLogViewer.d.ts +0 -7
  605. package/dist/types/src/components/pure/DebugEnv.d.ts +0 -2
  606. package/dist/types/src/components/pure/FeaturesReporterView.d.ts +0 -7
  607. package/dist/types/src/components/pure/FeaturesReporterView.test/implementation.d.ts +0 -3
  608. package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +0 -2
  609. package/dist/types/src/components/pure/FeaturesReporterView.test/specification.d.ts +0 -3
  610. package/dist/types/src/components/pure/FeaturesReporterView.test/types.d.ts +0 -54
  611. package/dist/types/src/components/pure/FileTree.d.ts +0 -6
  612. package/dist/types/src/components/pure/FileTreeItem.d.ts +0 -8
  613. package/dist/types/src/components/pure/GitHubLoginButton.d.ts +0 -8
  614. package/dist/types/src/components/pure/GitIntegrationView.d.ts +0 -1
  615. package/dist/types/src/components/pure/ModalContent.d.ts +0 -7
  616. package/dist/types/src/components/pure/ModalContent.test/implementation.d.ts +0 -3
  617. package/dist/types/src/components/pure/ModalContent.test/index.d.ts +0 -2
  618. package/dist/types/src/components/pure/ModalContent.test/specification.d.ts +0 -3
  619. package/dist/types/src/components/pure/ModalContent.test/types.d.ts +0 -45
  620. package/dist/types/src/components/pure/NavBar.d.ts +0 -23
  621. package/dist/types/src/components/pure/ProcessManager.d.ts +0 -8
  622. package/dist/types/src/components/pure/ProcessManagerView.d.ts +0 -20
  623. package/dist/types/src/components/pure/ProjectPageView.d.ts +0 -14
  624. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +0 -3
  625. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +0 -2
  626. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +0 -3
  627. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +0 -57
  628. package/dist/types/src/components/pure/ProjectsPageView.d.ts +0 -29
  629. package/dist/types/src/components/pure/Settings.d.ts +0 -1
  630. package/dist/types/src/components/pure/Settings.test.d.ts +0 -1
  631. package/dist/types/src/components/pure/SettingsButton.d.ts +0 -2
  632. package/dist/types/src/components/pure/SignIn.d.ts +0 -1
  633. package/dist/types/src/components/pure/SingleProcessView.d.ts +0 -10
  634. package/dist/types/src/components/pure/TestPageView.d.ts +0 -16
  635. package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +0 -12
  636. package/dist/types/src/components/pure/TestPageView.test/index.d.ts +0 -3
  637. package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +0 -11
  638. package/dist/types/src/components/pure/TestPageView.test/types.d.ts +0 -65
  639. package/dist/types/src/components/pure/TestPageView_utils.d.ts +0 -23
  640. package/dist/types/src/components/pure/TestTable.d.ts +0 -16
  641. package/dist/types/src/components/pure/ThemeCard.d.ts +0 -9
  642. package/dist/types/src/components/pure/ToastNotification.d.ts +0 -6
  643. package/dist/types/src/components/pure/UserProfile.d.ts +0 -2
  644. package/dist/types/src/components/stateful/AuthCallbackPage.d.ts +0 -2
  645. package/dist/types/src/components/stateful/FeaturesReporter.d.ts +0 -2
  646. package/dist/types/src/components/stateful/GitIntegrationPage.d.ts +0 -1
  647. package/dist/types/src/components/stateful/ProcessManagerPage.d.ts +0 -2
  648. package/dist/types/src/components/stateful/ProjectPage.d.ts +0 -1
  649. package/dist/types/src/components/stateful/ProjectsPage.d.ts +0 -1
  650. package/dist/types/src/components/stateful/SettingsPage.d.ts +0 -2
  651. package/dist/types/src/components/stateful/SingleProcessPage.d.ts +0 -2
  652. package/dist/types/src/components/stateful/TestPage.d.ts +0 -1
  653. package/dist/types/src/components/stateful/TextEditorPage.d.ts +0 -1
  654. package/dist/types/src/defaultConfig.d.ts +0 -3
  655. package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +0 -2
  656. package/dist/types/src/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
  657. package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
  658. package/dist/types/src/esbuildConfigs/index.d.ts +0 -4
  659. package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
  660. package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +0 -2
  661. package/dist/types/src/esbuildConfigs/node.d.ts +0 -4
  662. package/dist/types/src/esbuildConfigs/pure.d.ts +0 -4
  663. package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +0 -6
  664. package/dist/types/src/esbuildConfigs/web.d.ts +0 -4
  665. package/dist/types/src/hooks/useGitMode.d.ts +0 -7
  666. package/dist/types/src/init-docs.d.ts +0 -1
  667. package/dist/types/src/lib/BaseGiven.d.ts +0 -44
  668. package/dist/types/src/lib/BaseSuite.d.ts +0 -46
  669. package/dist/types/src/lib/BaseSuite.test/mock.d.ts +0 -21
  670. package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +0 -2
  671. package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +0 -2
  672. package/dist/types/src/lib/BaseSuite.test/test.d.ts +0 -37
  673. package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +0 -2
  674. package/dist/types/src/lib/BaseThen.d.ts +0 -27
  675. package/dist/types/src/lib/BaseWhen.d.ts +0 -27
  676. package/dist/types/src/lib/Sidecar.d.ts +0 -5
  677. package/dist/types/src/lib/Tiposkripto.d.ts +0 -37
  678. package/dist/types/src/lib/Tiposkripto.test/MockTiposkripto.d.ts +0 -18
  679. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.adapter.d.ts +0 -3
  680. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.d.ts +0 -2
  681. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.implementation.d.ts +0 -3
  682. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.specification.d.ts +0 -3
  683. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.types.d.ts +0 -58
  684. package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +0 -9
  685. package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +0 -6
  686. package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +0 -6
  687. package/dist/types/src/lib/abstractBase.test/adapter.d.ts +0 -3
  688. package/dist/types/src/lib/abstractBase.test/implementation.d.ts +0 -3
  689. package/dist/types/src/lib/abstractBase.test/index.d.ts +0 -2
  690. package/dist/types/src/lib/abstractBase.test/specification.d.ts +0 -3
  691. package/dist/types/src/lib/abstractBase.test/types.d.ts +0 -39
  692. package/dist/types/src/lib/index.d.ts +0 -73
  693. package/dist/types/src/lib/pmProxy.d.ts +0 -12
  694. package/dist/types/src/lib/pmProxy.test/adapter.d.ts +0 -3
  695. package/dist/types/src/lib/pmProxy.test/implementation.d.ts +0 -3
  696. package/dist/types/src/lib/pmProxy.test/index.d.ts +0 -6
  697. package/dist/types/src/lib/pmProxy.test/mockPM.d.ts +0 -10
  698. package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +0 -40
  699. package/dist/types/src/lib/pmProxy.test/specification.d.ts +0 -3
  700. package/dist/types/src/lib/pmProxy.test/types.d.ts +0 -42
  701. package/dist/types/src/lib/types.d.ts +0 -24
  702. package/dist/types/src/mothership/index.d.ts +0 -2
  703. package/dist/types/src/mothership/test.d.ts +0 -2
  704. package/dist/types/src/services/FileService.d.ts +0 -34
  705. package/dist/types/src/services/GitHubAuthService.d.ts +0 -32
  706. package/dist/types/src/testeranto.d.ts +0 -1
  707. package/dist/types/src/types/features.d.ts +0 -7
  708. package/dist/types/src/utils/api.d.ts +0 -10
  709. package/dist/types/src/utils/buildTemplates.d.ts +0 -1
  710. package/dist/types/src/utils/featureUtils.d.ts +0 -6
  711. package/dist/types/src/utils/gitTest.d.ts +0 -11
  712. package/dist/types/src/utils/golingvuMetafile.d.ts +0 -19
  713. package/dist/types/src/utils/logFiles.d.ts +0 -75
  714. package/dist/types/src/utils/makePrompt.d.ts +0 -2
  715. package/dist/types/src/utils/pitonoMetafile.d.ts +0 -7
  716. package/dist/types/src/utils/queue.d.ts +0 -11
  717. package/dist/types/src/utils.d.ts +0 -20
  718. package/dist/types/src/web.html.d.ts +0 -2
  719. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  720. package/example/__pycache__/Calculator.cpython-313.pyc +0 -0
  721. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/README.md +0 -187
  722. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_given.go +0 -163
  723. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_suite.go +0 -85
  724. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_then.go +0 -21
  725. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_when.go +0 -21
  726. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/golingvu.go +0 -554
  727. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/test_adapter.go +0 -33
  728. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/types.go +0 -72
  729. package/example/vendor/modules.txt +0 -5
  730. package/pitono/__init__.py +0 -54
  731. package/pitono/types.py +0 -78
  732. package/src/PM/metafileOutputs.ts +0 -90
  733. package/src/golingvu/base_suite_test.go +0 -197
  734. package/src/pitono/PM/__pycache__/python.cpython-313.pyc +0 -0
  735. package/src/pitono/__pycache__/Pitono.cpython-313.pyc +0 -0
  736. package/src/pitono/__pycache__/__init__.cpython-313.pyc +0 -0
  737. package/src/pitono/__pycache__/base_given.cpython-313.pyc +0 -0
  738. package/src/pitono/__pycache__/base_suite.cpython-313.pyc +0 -0
  739. package/src/pitono/__pycache__/base_then.cpython-313.pyc +0 -0
  740. package/src/pitono/__pycache__/base_when.cpython-313.pyc +0 -0
  741. package/src/pitono/__pycache__/core_generator.cpython-313.pyc +0 -0
  742. package/src/pitono/__pycache__/simple_adapter.cpython-313.pyc +0 -0
  743. package/src/pitono/__pycache__/types.cpython-313.pyc +0 -0
  744. package/src/templates/frontpage.html +0 -340
  745. package/src/templates/frontpage.md +0 -79
  746. package/testeranto/bundles/golang/core/Calculator.golingvu.golingvu.go +0 -53
  747. package/testeranto/bundles/node/core/chunk-VXVF7WFO.mjs +0 -4321
  748. package/testeranto/bundles/node/core/example/Calculator.test.mjs +0 -503
  749. package/testeranto/bundles/python/core/Calculator.pitono.test.py +0 -24
  750. package/testeranto/bundles/python/core/test_example.py +0 -24
  751. package/testeranto/bundles/web/core/chunk-DFRN4SYZ.mjs +0 -2297
  752. package/testeranto/bundles/web/core/chunk-Q5TONB2Z.mjs +0 -6874
  753. package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +0 -11697
  754. package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +0 -336
  755. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +0 -68
  756. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -88
  757. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -29
  758. /package/{pitono → src/pitono}/core_generator.py +0 -0
  759. /package/{pitono → src/pitono}/pitono.egg-info/dependency_links.txt +0 -0
  760. /package/{pitono → src/pitono}/pitono.egg-info/entry_points.txt +0 -0
  761. /package/{pitono → src/pitono}/pitono.egg-info/top_level.txt +0 -0
  762. /package/{pitono → src/pitono}/pyproject.toml +0 -0
  763. /package/{pitono → src/pitono}/setup.py +0 -0
  764. /package/{pitono → src/pitono}/simple_adapter.py +0 -0
  765. /package/{dist/types/src/PM/metafileOutputs.d.ts → testeranto/helpo_chat_message.txt} +0 -0
  766. /package/{dist/types/src/ReportServer.d.ts → testeranto/reports/core/example/test_example/python/stdout.log} +0 -0
  767. /package/{dist/types/src/ReportServerLib.d.ts → testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/lint_errors.txt} +0 -0
  768. /package/{dist/types/src/components/SunriseAnimation.test/implementation.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/debug.log} +0 -0
  769. /package/{dist/types/src/components/SunriseAnimation.test/index.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/error.log} +0 -0
  770. /package/{dist/types/src/components/SunriseAnimation.test/specification.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/exit.log} +0 -0
  771. /package/{dist/types/src/components/pure/ArtifactTree.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/info.log} +0 -0
  772. /package/{dist/types/src/components/stateful/FileTree.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/warn.log} +0 -0
  773. /package/{dist/types/src/run.d.ts → testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/lint_errors.txt} +0 -0
@@ -1,2297 +0,0 @@
1
- import {
2
- require_react
3
- } from "./chunk-JMDLMADH.mjs";
4
- import {
5
- __toESM,
6
- init_buffer,
7
- init_dirname,
8
- init_process
9
- } from "./chunk-LQMU5NCG.mjs";
10
-
11
- // node_modules/react-router/dist/development/chunk-PVWAREVJ.mjs
12
- init_dirname();
13
- init_buffer();
14
- init_process();
15
- var React = __toESM(require_react(), 1);
16
- var React2 = __toESM(require_react(), 1);
17
- var React3 = __toESM(require_react(), 1);
18
- var React4 = __toESM(require_react(), 1);
19
- var React9 = __toESM(require_react(), 1);
20
- var React8 = __toESM(require_react(), 1);
21
- var React7 = __toESM(require_react(), 1);
22
- var React6 = __toESM(require_react(), 1);
23
- var React5 = __toESM(require_react(), 1);
24
- var React10 = __toESM(require_react(), 1);
25
- var React11 = __toESM(require_react(), 1);
26
- function createMemoryHistory(options = {}) {
27
- let { initialEntries = ["/"], initialIndex, v5Compat = false } = options;
28
- let entries;
29
- entries = initialEntries.map(
30
- (entry, index2) => createMemoryLocation(
31
- entry,
32
- typeof entry === "string" ? null : entry.state,
33
- index2 === 0 ? "default" : void 0
34
- )
35
- );
36
- let index = clampIndex(
37
- initialIndex == null ? entries.length - 1 : initialIndex
38
- );
39
- let action = "POP";
40
- let listener = null;
41
- function clampIndex(n) {
42
- return Math.min(Math.max(n, 0), entries.length - 1);
43
- }
44
- function getCurrentLocation() {
45
- return entries[index];
46
- }
47
- function createMemoryLocation(to, state = null, key) {
48
- let location = createLocation(
49
- entries ? getCurrentLocation().pathname : "/",
50
- to,
51
- state,
52
- key
53
- );
54
- warning(
55
- location.pathname.charAt(0) === "/",
56
- `relative pathnames are not supported in memory history: ${JSON.stringify(
57
- to
58
- )}`
59
- );
60
- return location;
61
- }
62
- function createHref2(to) {
63
- return typeof to === "string" ? to : createPath(to);
64
- }
65
- let history = {
66
- get index() {
67
- return index;
68
- },
69
- get action() {
70
- return action;
71
- },
72
- get location() {
73
- return getCurrentLocation();
74
- },
75
- createHref: createHref2,
76
- createURL(to) {
77
- return new URL(createHref2(to), "http://localhost");
78
- },
79
- encodeLocation(to) {
80
- let path = typeof to === "string" ? parsePath(to) : to;
81
- return {
82
- pathname: path.pathname || "",
83
- search: path.search || "",
84
- hash: path.hash || ""
85
- };
86
- },
87
- push(to, state) {
88
- action = "PUSH";
89
- let nextLocation = createMemoryLocation(to, state);
90
- index += 1;
91
- entries.splice(index, entries.length, nextLocation);
92
- if (v5Compat && listener) {
93
- listener({ action, location: nextLocation, delta: 1 });
94
- }
95
- },
96
- replace(to, state) {
97
- action = "REPLACE";
98
- let nextLocation = createMemoryLocation(to, state);
99
- entries[index] = nextLocation;
100
- if (v5Compat && listener) {
101
- listener({ action, location: nextLocation, delta: 0 });
102
- }
103
- },
104
- go(delta) {
105
- action = "POP";
106
- let nextIndex = clampIndex(index + delta);
107
- let nextLocation = entries[nextIndex];
108
- index = nextIndex;
109
- if (listener) {
110
- listener({ action, location: nextLocation, delta });
111
- }
112
- },
113
- listen(fn) {
114
- listener = fn;
115
- return () => {
116
- listener = null;
117
- };
118
- }
119
- };
120
- return history;
121
- }
122
- function invariant(value, message) {
123
- if (value === false || value === null || typeof value === "undefined") {
124
- throw new Error(message);
125
- }
126
- }
127
- function warning(cond, message) {
128
- if (!cond) {
129
- if (typeof console !== "undefined")
130
- console.warn(message);
131
- try {
132
- throw new Error(message);
133
- } catch (e) {
134
- }
135
- }
136
- }
137
- function createKey() {
138
- return Math.random().toString(36).substring(2, 10);
139
- }
140
- function createLocation(current, to, state = null, key) {
141
- let location = {
142
- pathname: typeof current === "string" ? current : current.pathname,
143
- search: "",
144
- hash: "",
145
- ...typeof to === "string" ? parsePath(to) : to,
146
- state,
147
- // TODO: This could be cleaned up. push/replace should probably just take
148
- // full Locations now and avoid the need to run through this flow at all
149
- // But that's a pretty big refactor to the current test suite so going to
150
- // keep as is for the time being and just let any incoming keys take precedence
151
- key: to && to.key || key || createKey()
152
- };
153
- return location;
154
- }
155
- function createPath({
156
- pathname = "/",
157
- search = "",
158
- hash = ""
159
- }) {
160
- if (search && search !== "?")
161
- pathname += search.charAt(0) === "?" ? search : "?" + search;
162
- if (hash && hash !== "#")
163
- pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
164
- return pathname;
165
- }
166
- function parsePath(path) {
167
- let parsedPath = {};
168
- if (path) {
169
- let hashIndex = path.indexOf("#");
170
- if (hashIndex >= 0) {
171
- parsedPath.hash = path.substring(hashIndex);
172
- path = path.substring(0, hashIndex);
173
- }
174
- let searchIndex = path.indexOf("?");
175
- if (searchIndex >= 0) {
176
- parsedPath.search = path.substring(searchIndex);
177
- path = path.substring(0, searchIndex);
178
- }
179
- if (path) {
180
- parsedPath.pathname = path;
181
- }
182
- }
183
- return parsedPath;
184
- }
185
- var _map;
186
- _map = /* @__PURE__ */ new WeakMap();
187
- function matchRoutes(routes, locationArg, basename = "/") {
188
- return matchRoutesImpl(routes, locationArg, basename, false);
189
- }
190
- function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
191
- let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
192
- let pathname = stripBasename(location.pathname || "/", basename);
193
- if (pathname == null) {
194
- return null;
195
- }
196
- let branches = flattenRoutes(routes);
197
- rankRouteBranches(branches);
198
- let matches = null;
199
- for (let i = 0; matches == null && i < branches.length; ++i) {
200
- let decoded = decodePath(pathname);
201
- matches = matchRouteBranch(
202
- branches[i],
203
- decoded,
204
- allowPartial
205
- );
206
- }
207
- return matches;
208
- }
209
- function convertRouteMatchToUiMatch(match, loaderData) {
210
- let { route, pathname, params } = match;
211
- return {
212
- id: route.id,
213
- pathname,
214
- params,
215
- data: loaderData[route.id],
216
- loaderData: loaderData[route.id],
217
- handle: route.handle
218
- };
219
- }
220
- function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
221
- let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
222
- let meta = {
223
- relativePath: relativePath === void 0 ? route.path || "" : relativePath,
224
- caseSensitive: route.caseSensitive === true,
225
- childrenIndex: index,
226
- route
227
- };
228
- if (meta.relativePath.startsWith("/")) {
229
- if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {
230
- return;
231
- }
232
- invariant(
233
- meta.relativePath.startsWith(parentPath),
234
- `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
235
- );
236
- meta.relativePath = meta.relativePath.slice(parentPath.length);
237
- }
238
- let path = joinPaths([parentPath, meta.relativePath]);
239
- let routesMeta = parentsMeta.concat(meta);
240
- if (route.children && route.children.length > 0) {
241
- invariant(
242
- // Our types know better, but runtime JS may not!
243
- // @ts-expect-error
244
- route.index !== true,
245
- `Index routes must not have child routes. Please remove all child routes from route path "${path}".`
246
- );
247
- flattenRoutes(
248
- route.children,
249
- branches,
250
- routesMeta,
251
- path,
252
- hasParentOptionalSegments
253
- );
254
- }
255
- if (route.path == null && !route.index) {
256
- return;
257
- }
258
- branches.push({
259
- path,
260
- score: computeScore(path, route.index),
261
- routesMeta
262
- });
263
- };
264
- routes.forEach((route, index) => {
265
- if (route.path === "" || !route.path?.includes("?")) {
266
- flattenRoute(route, index);
267
- } else {
268
- for (let exploded of explodeOptionalSegments(route.path)) {
269
- flattenRoute(route, index, true, exploded);
270
- }
271
- }
272
- });
273
- return branches;
274
- }
275
- function explodeOptionalSegments(path) {
276
- let segments = path.split("/");
277
- if (segments.length === 0)
278
- return [];
279
- let [first, ...rest] = segments;
280
- let isOptional = first.endsWith("?");
281
- let required = first.replace(/\?$/, "");
282
- if (rest.length === 0) {
283
- return isOptional ? [required, ""] : [required];
284
- }
285
- let restExploded = explodeOptionalSegments(rest.join("/"));
286
- let result = [];
287
- result.push(
288
- ...restExploded.map(
289
- (subpath) => subpath === "" ? required : [required, subpath].join("/")
290
- )
291
- );
292
- if (isOptional) {
293
- result.push(...restExploded);
294
- }
295
- return result.map(
296
- (exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded
297
- );
298
- }
299
- function rankRouteBranches(branches) {
300
- branches.sort(
301
- (a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(
302
- a.routesMeta.map((meta) => meta.childrenIndex),
303
- b.routesMeta.map((meta) => meta.childrenIndex)
304
- )
305
- );
306
- }
307
- var paramRe = /^:[\w-]+$/;
308
- var dynamicSegmentValue = 3;
309
- var indexRouteValue = 2;
310
- var emptySegmentValue = 1;
311
- var staticSegmentValue = 10;
312
- var splatPenalty = -2;
313
- var isSplat = (s) => s === "*";
314
- function computeScore(path, index) {
315
- let segments = path.split("/");
316
- let initialScore = segments.length;
317
- if (segments.some(isSplat)) {
318
- initialScore += splatPenalty;
319
- }
320
- if (index) {
321
- initialScore += indexRouteValue;
322
- }
323
- return segments.filter((s) => !isSplat(s)).reduce(
324
- (score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue),
325
- initialScore
326
- );
327
- }
328
- function compareIndexes(a, b) {
329
- let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
330
- return siblings ? (
331
- // If two routes are siblings, we should try to match the earlier sibling
332
- // first. This allows people to have fine-grained control over the matching
333
- // behavior by simply putting routes with identical paths in the order they
334
- // want them tried.
335
- a[a.length - 1] - b[b.length - 1]
336
- ) : (
337
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
338
- // so they sort equally.
339
- 0
340
- );
341
- }
342
- function matchRouteBranch(branch, pathname, allowPartial = false) {
343
- let { routesMeta } = branch;
344
- let matchedParams = {};
345
- let matchedPathname = "/";
346
- let matches = [];
347
- for (let i = 0; i < routesMeta.length; ++i) {
348
- let meta = routesMeta[i];
349
- let end = i === routesMeta.length - 1;
350
- let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
351
- let match = matchPath(
352
- { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },
353
- remainingPathname
354
- );
355
- let route = meta.route;
356
- if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {
357
- match = matchPath(
358
- {
359
- path: meta.relativePath,
360
- caseSensitive: meta.caseSensitive,
361
- end: false
362
- },
363
- remainingPathname
364
- );
365
- }
366
- if (!match) {
367
- return null;
368
- }
369
- Object.assign(matchedParams, match.params);
370
- matches.push({
371
- // TODO: Can this as be avoided?
372
- params: matchedParams,
373
- pathname: joinPaths([matchedPathname, match.pathname]),
374
- pathnameBase: normalizePathname(
375
- joinPaths([matchedPathname, match.pathnameBase])
376
- ),
377
- route
378
- });
379
- if (match.pathnameBase !== "/") {
380
- matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
381
- }
382
- }
383
- return matches;
384
- }
385
- function matchPath(pattern, pathname) {
386
- if (typeof pattern === "string") {
387
- pattern = { path: pattern, caseSensitive: false, end: true };
388
- }
389
- let [matcher, compiledParams] = compilePath(
390
- pattern.path,
391
- pattern.caseSensitive,
392
- pattern.end
393
- );
394
- let match = pathname.match(matcher);
395
- if (!match)
396
- return null;
397
- let matchedPathname = match[0];
398
- let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
399
- let captureGroups = match.slice(1);
400
- let params = compiledParams.reduce(
401
- (memo2, { paramName, isOptional }, index) => {
402
- if (paramName === "*") {
403
- let splatValue = captureGroups[index] || "";
404
- pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
405
- }
406
- const value = captureGroups[index];
407
- if (isOptional && !value) {
408
- memo2[paramName] = void 0;
409
- } else {
410
- memo2[paramName] = (value || "").replace(/%2F/g, "/");
411
- }
412
- return memo2;
413
- },
414
- {}
415
- );
416
- return {
417
- params,
418
- pathname: matchedPathname,
419
- pathnameBase,
420
- pattern
421
- };
422
- }
423
- function compilePath(path, caseSensitive = false, end = true) {
424
- warning(
425
- path === "*" || !path.endsWith("*") || path.endsWith("/*"),
426
- `Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".`
427
- );
428
- let params = [];
429
- let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
430
- /\/:([\w-]+)(\?)?/g,
431
- (_, paramName, isOptional) => {
432
- params.push({ paramName, isOptional: isOptional != null });
433
- return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
434
- }
435
- ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
436
- if (path.endsWith("*")) {
437
- params.push({ paramName: "*" });
438
- regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
439
- } else if (end) {
440
- regexpSource += "\\/*$";
441
- } else if (path !== "" && path !== "/") {
442
- regexpSource += "(?:(?=\\/|$))";
443
- } else {
444
- }
445
- let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : "i");
446
- return [matcher, params];
447
- }
448
- function decodePath(value) {
449
- try {
450
- return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
451
- } catch (error) {
452
- warning(
453
- false,
454
- `The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
455
- );
456
- return value;
457
- }
458
- }
459
- function stripBasename(pathname, basename) {
460
- if (basename === "/")
461
- return pathname;
462
- if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
463
- return null;
464
- }
465
- let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
466
- let nextChar = pathname.charAt(startIndex);
467
- if (nextChar && nextChar !== "/") {
468
- return null;
469
- }
470
- return pathname.slice(startIndex) || "/";
471
- }
472
- function resolvePath(to, fromPathname = "/") {
473
- let {
474
- pathname: toPathname,
475
- search = "",
476
- hash = ""
477
- } = typeof to === "string" ? parsePath(to) : to;
478
- let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
479
- return {
480
- pathname,
481
- search: normalizeSearch(search),
482
- hash: normalizeHash(hash)
483
- };
484
- }
485
- function resolvePathname(relativePath, fromPathname) {
486
- let segments = fromPathname.replace(/\/+$/, "").split("/");
487
- let relativeSegments = relativePath.split("/");
488
- relativeSegments.forEach((segment) => {
489
- if (segment === "..") {
490
- if (segments.length > 1)
491
- segments.pop();
492
- } else if (segment !== ".") {
493
- segments.push(segment);
494
- }
495
- });
496
- return segments.length > 1 ? segments.join("/") : "/";
497
- }
498
- function getInvalidPathError(char, field, dest, path) {
499
- return `Cannot include a '${char}' character in a manually specified \`to.${field}\` field [${JSON.stringify(
500
- path
501
- )}]. Please separate it out to the \`to.${dest}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
502
- }
503
- function getPathContributingMatches(matches) {
504
- return matches.filter(
505
- (match, index) => index === 0 || match.route.path && match.route.path.length > 0
506
- );
507
- }
508
- function getResolveToMatches(matches) {
509
- let pathMatches = getPathContributingMatches(matches);
510
- return pathMatches.map(
511
- (match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase
512
- );
513
- }
514
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {
515
- let to;
516
- if (typeof toArg === "string") {
517
- to = parsePath(toArg);
518
- } else {
519
- to = { ...toArg };
520
- invariant(
521
- !to.pathname || !to.pathname.includes("?"),
522
- getInvalidPathError("?", "pathname", "search", to)
523
- );
524
- invariant(
525
- !to.pathname || !to.pathname.includes("#"),
526
- getInvalidPathError("#", "pathname", "hash", to)
527
- );
528
- invariant(
529
- !to.search || !to.search.includes("#"),
530
- getInvalidPathError("#", "search", "hash", to)
531
- );
532
- }
533
- let isEmptyPath = toArg === "" || to.pathname === "";
534
- let toPathname = isEmptyPath ? "/" : to.pathname;
535
- let from;
536
- if (toPathname == null) {
537
- from = locationPathname;
538
- } else {
539
- let routePathnameIndex = routePathnames.length - 1;
540
- if (!isPathRelative && toPathname.startsWith("..")) {
541
- let toSegments = toPathname.split("/");
542
- while (toSegments[0] === "..") {
543
- toSegments.shift();
544
- routePathnameIndex -= 1;
545
- }
546
- to.pathname = toSegments.join("/");
547
- }
548
- from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
549
- }
550
- let path = resolvePath(to, from);
551
- let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
552
- let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
553
- if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
554
- path.pathname += "/";
555
- }
556
- return path;
557
- }
558
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
559
- var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
560
- var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
561
- var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
562
- function isRouteErrorResponse(error) {
563
- return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
564
- }
565
- var validMutationMethodsArr = [
566
- "POST",
567
- "PUT",
568
- "PATCH",
569
- "DELETE"
570
- ];
571
- var validMutationMethods = new Set(
572
- validMutationMethodsArr
573
- );
574
- var validRequestMethodsArr = [
575
- "GET",
576
- ...validMutationMethodsArr
577
- ];
578
- var validRequestMethods = new Set(validRequestMethodsArr);
579
- var ResetLoaderDataSymbol = Symbol("ResetLoaderData");
580
- var DataRouterContext = React.createContext(null);
581
- DataRouterContext.displayName = "DataRouter";
582
- var DataRouterStateContext = React.createContext(null);
583
- DataRouterStateContext.displayName = "DataRouterState";
584
- var RSCRouterContext = React.createContext(false);
585
- var ViewTransitionContext = React.createContext({
586
- isTransitioning: false
587
- });
588
- ViewTransitionContext.displayName = "ViewTransition";
589
- var FetchersContext = React.createContext(
590
- /* @__PURE__ */ new Map()
591
- );
592
- FetchersContext.displayName = "Fetchers";
593
- var AwaitContext = React.createContext(null);
594
- AwaitContext.displayName = "Await";
595
- var NavigationContext = React.createContext(
596
- null
597
- );
598
- NavigationContext.displayName = "Navigation";
599
- var LocationContext = React.createContext(
600
- null
601
- );
602
- LocationContext.displayName = "Location";
603
- var RouteContext = React.createContext({
604
- outlet: null,
605
- matches: [],
606
- isDataRoute: false
607
- });
608
- RouteContext.displayName = "Route";
609
- var RouteErrorContext = React.createContext(null);
610
- RouteErrorContext.displayName = "RouteError";
611
- var ENABLE_DEV_WARNINGS = true;
612
- function useHref(to, { relative } = {}) {
613
- invariant(
614
- useInRouterContext(),
615
- // TODO: This error is probably because they somehow have 2 versions of the
616
- // router loaded. We can help them understand how to avoid that.
617
- `useHref() may be used only in the context of a <Router> component.`
618
- );
619
- let { basename, navigator } = React2.useContext(NavigationContext);
620
- let { hash, pathname, search } = useResolvedPath(to, { relative });
621
- let joinedPathname = pathname;
622
- if (basename !== "/") {
623
- joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
624
- }
625
- return navigator.createHref({ pathname: joinedPathname, search, hash });
626
- }
627
- function useInRouterContext() {
628
- return React2.useContext(LocationContext) != null;
629
- }
630
- function useLocation() {
631
- invariant(
632
- useInRouterContext(),
633
- // TODO: This error is probably because they somehow have 2 versions of the
634
- // router loaded. We can help them understand how to avoid that.
635
- `useLocation() may be used only in the context of a <Router> component.`
636
- );
637
- return React2.useContext(LocationContext).location;
638
- }
639
- var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;
640
- function useIsomorphicLayoutEffect(cb) {
641
- let isStatic = React2.useContext(NavigationContext).static;
642
- if (!isStatic) {
643
- React2.useLayoutEffect(cb);
644
- }
645
- }
646
- function useNavigate() {
647
- let { isDataRoute } = React2.useContext(RouteContext);
648
- return isDataRoute ? useNavigateStable() : useNavigateUnstable();
649
- }
650
- function useNavigateUnstable() {
651
- invariant(
652
- useInRouterContext(),
653
- // TODO: This error is probably because they somehow have 2 versions of the
654
- // router loaded. We can help them understand how to avoid that.
655
- `useNavigate() may be used only in the context of a <Router> component.`
656
- );
657
- let dataRouterContext = React2.useContext(DataRouterContext);
658
- let { basename, navigator } = React2.useContext(NavigationContext);
659
- let { matches } = React2.useContext(RouteContext);
660
- let { pathname: locationPathname } = useLocation();
661
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
662
- let activeRef = React2.useRef(false);
663
- useIsomorphicLayoutEffect(() => {
664
- activeRef.current = true;
665
- });
666
- let navigate = React2.useCallback(
667
- (to, options = {}) => {
668
- warning(activeRef.current, navigateEffectWarning);
669
- if (!activeRef.current)
670
- return;
671
- if (typeof to === "number") {
672
- navigator.go(to);
673
- return;
674
- }
675
- let path = resolveTo(
676
- to,
677
- JSON.parse(routePathnamesJson),
678
- locationPathname,
679
- options.relative === "path"
680
- );
681
- if (dataRouterContext == null && basename !== "/") {
682
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
683
- }
684
- (!!options.replace ? navigator.replace : navigator.push)(
685
- path,
686
- options.state,
687
- options
688
- );
689
- },
690
- [
691
- basename,
692
- navigator,
693
- routePathnamesJson,
694
- locationPathname,
695
- dataRouterContext
696
- ]
697
- );
698
- return navigate;
699
- }
700
- var OutletContext = React2.createContext(null);
701
- function useResolvedPath(to, { relative } = {}) {
702
- let { matches } = React2.useContext(RouteContext);
703
- let { pathname: locationPathname } = useLocation();
704
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
705
- return React2.useMemo(
706
- () => resolveTo(
707
- to,
708
- JSON.parse(routePathnamesJson),
709
- locationPathname,
710
- relative === "path"
711
- ),
712
- [to, routePathnamesJson, locationPathname, relative]
713
- );
714
- }
715
- function useRoutesImpl(routes, locationArg, dataRouterState, unstable_onError, future) {
716
- invariant(
717
- useInRouterContext(),
718
- // TODO: This error is probably because they somehow have 2 versions of the
719
- // router loaded. We can help them understand how to avoid that.
720
- `useRoutes() may be used only in the context of a <Router> component.`
721
- );
722
- let { navigator } = React2.useContext(NavigationContext);
723
- let { matches: parentMatches } = React2.useContext(RouteContext);
724
- let routeMatch = parentMatches[parentMatches.length - 1];
725
- let parentParams = routeMatch ? routeMatch.params : {};
726
- let parentPathname = routeMatch ? routeMatch.pathname : "/";
727
- let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";
728
- let parentRoute = routeMatch && routeMatch.route;
729
- if (ENABLE_DEV_WARNINGS) {
730
- let parentPath = parentRoute && parentRoute.path || "";
731
- warningOnce(
732
- parentPathname,
733
- !parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"),
734
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${parentPathname}" (under <Route path="${parentPath}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
735
-
736
- Please change the parent <Route path="${parentPath}"> to <Route path="${parentPath === "/" ? "*" : `${parentPath}/*`}">.`
737
- );
738
- }
739
- let locationFromContext = useLocation();
740
- let location;
741
- if (locationArg) {
742
- let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
743
- invariant(
744
- parentPathnameBase === "/" || parsedLocationArg.pathname?.startsWith(parentPathnameBase),
745
- `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
746
- );
747
- location = parsedLocationArg;
748
- } else {
749
- location = locationFromContext;
750
- }
751
- let pathname = location.pathname || "/";
752
- let remainingPathname = pathname;
753
- if (parentPathnameBase !== "/") {
754
- let parentSegments = parentPathnameBase.replace(/^\//, "").split("/");
755
- let segments = pathname.replace(/^\//, "").split("/");
756
- remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
757
- }
758
- let matches = matchRoutes(routes, { pathname: remainingPathname });
759
- if (ENABLE_DEV_WARNINGS) {
760
- warning(
761
- parentRoute || matches != null,
762
- `No routes matched location "${location.pathname}${location.search}${location.hash}" `
763
- );
764
- warning(
765
- matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,
766
- `Matched leaf route at location "${location.pathname}${location.search}${location.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
767
- );
768
- }
769
- let renderedMatches = _renderMatches(
770
- matches && matches.map(
771
- (match) => Object.assign({}, match, {
772
- params: Object.assign({}, parentParams, match.params),
773
- pathname: joinPaths([
774
- parentPathnameBase,
775
- // Re-encode pathnames that were decoded inside matchRoutes
776
- navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname
777
- ]),
778
- pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
779
- parentPathnameBase,
780
- // Re-encode pathnames that were decoded inside matchRoutes
781
- navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase
782
- ])
783
- })
784
- ),
785
- parentMatches,
786
- dataRouterState,
787
- unstable_onError,
788
- future
789
- );
790
- if (locationArg && renderedMatches) {
791
- return /* @__PURE__ */ React2.createElement(
792
- LocationContext.Provider,
793
- {
794
- value: {
795
- location: {
796
- pathname: "/",
797
- search: "",
798
- hash: "",
799
- state: null,
800
- key: "default",
801
- ...location
802
- },
803
- navigationType: "POP"
804
- /* Pop */
805
- }
806
- },
807
- renderedMatches
808
- );
809
- }
810
- return renderedMatches;
811
- }
812
- function DefaultErrorComponent() {
813
- let error = useRouteError();
814
- let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);
815
- let stack = error instanceof Error ? error.stack : null;
816
- let lightgrey = "rgba(200,200,200, 0.5)";
817
- let preStyles = { padding: "0.5rem", backgroundColor: lightgrey };
818
- let codeStyles = { padding: "2px 4px", backgroundColor: lightgrey };
819
- let devInfo = null;
820
- if (ENABLE_DEV_WARNINGS) {
821
- console.error(
822
- "Error handled by React Router default ErrorBoundary:",
823
- error
824
- );
825
- devInfo = /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("p", null, "\u{1F4BF} Hey developer \u{1F44B}"), /* @__PURE__ */ React2.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React2.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React2.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
826
- }
827
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React2.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React2.createElement("pre", { style: preStyles }, stack) : null, devInfo);
828
- }
829
- var defaultErrorElement = /* @__PURE__ */ React2.createElement(DefaultErrorComponent, null);
830
- var RenderErrorBoundary = class extends React2.Component {
831
- constructor(props) {
832
- super(props);
833
- this.state = {
834
- location: props.location,
835
- revalidation: props.revalidation,
836
- error: props.error
837
- };
838
- }
839
- static getDerivedStateFromError(error) {
840
- return { error };
841
- }
842
- static getDerivedStateFromProps(props, state) {
843
- if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") {
844
- return {
845
- error: props.error,
846
- location: props.location,
847
- revalidation: props.revalidation
848
- };
849
- }
850
- return {
851
- error: props.error !== void 0 ? props.error : state.error,
852
- location: state.location,
853
- revalidation: props.revalidation || state.revalidation
854
- };
855
- }
856
- componentDidCatch(error, errorInfo) {
857
- if (this.props.unstable_onError) {
858
- this.props.unstable_onError(error, errorInfo);
859
- } else {
860
- console.error(
861
- "React Router caught the following error during render",
862
- error
863
- );
864
- }
865
- }
866
- render() {
867
- return this.state.error !== void 0 ? /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React2.createElement(
868
- RouteErrorContext.Provider,
869
- {
870
- value: this.state.error,
871
- children: this.props.component
872
- }
873
- )) : this.props.children;
874
- }
875
- };
876
- function RenderedRoute({ routeContext, match, children }) {
877
- let dataRouterContext = React2.useContext(DataRouterContext);
878
- if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {
879
- dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
880
- }
881
- return /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: routeContext }, children);
882
- }
883
- function _renderMatches(matches, parentMatches = [], dataRouterState = null, unstable_onError = null, future = null) {
884
- if (matches == null) {
885
- if (!dataRouterState) {
886
- return null;
887
- }
888
- if (dataRouterState.errors) {
889
- matches = dataRouterState.matches;
890
- } else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {
891
- matches = dataRouterState.matches;
892
- } else {
893
- return null;
894
- }
895
- }
896
- let renderedMatches = matches;
897
- let errors = dataRouterState?.errors;
898
- if (errors != null) {
899
- let errorIndex = renderedMatches.findIndex(
900
- (m) => m.route.id && errors?.[m.route.id] !== void 0
901
- );
902
- invariant(
903
- errorIndex >= 0,
904
- `Could not find a matching route for errors on route IDs: ${Object.keys(
905
- errors
906
- ).join(",")}`
907
- );
908
- renderedMatches = renderedMatches.slice(
909
- 0,
910
- Math.min(renderedMatches.length, errorIndex + 1)
911
- );
912
- }
913
- let renderFallback = false;
914
- let fallbackIndex = -1;
915
- if (dataRouterState) {
916
- for (let i = 0; i < renderedMatches.length; i++) {
917
- let match = renderedMatches[i];
918
- if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {
919
- fallbackIndex = i;
920
- }
921
- if (match.route.id) {
922
- let { loaderData, errors: errors2 } = dataRouterState;
923
- let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);
924
- if (match.route.lazy || needsToRunLoader) {
925
- renderFallback = true;
926
- if (fallbackIndex >= 0) {
927
- renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);
928
- } else {
929
- renderedMatches = [renderedMatches[0]];
930
- }
931
- break;
932
- }
933
- }
934
- }
935
- }
936
- return renderedMatches.reduceRight(
937
- (outlet, match, index) => {
938
- let error;
939
- let shouldRenderHydrateFallback = false;
940
- let errorElement = null;
941
- let hydrateFallbackElement = null;
942
- if (dataRouterState) {
943
- error = errors && match.route.id ? errors[match.route.id] : void 0;
944
- errorElement = match.route.errorElement || defaultErrorElement;
945
- if (renderFallback) {
946
- if (fallbackIndex < 0 && index === 0) {
947
- warningOnce(
948
- "route-fallback",
949
- false,
950
- "No `HydrateFallback` element provided to render during initial hydration"
951
- );
952
- shouldRenderHydrateFallback = true;
953
- hydrateFallbackElement = null;
954
- } else if (fallbackIndex === index) {
955
- shouldRenderHydrateFallback = true;
956
- hydrateFallbackElement = match.route.hydrateFallbackElement || null;
957
- }
958
- }
959
- }
960
- let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));
961
- let getChildren = () => {
962
- let children;
963
- if (error) {
964
- children = errorElement;
965
- } else if (shouldRenderHydrateFallback) {
966
- children = hydrateFallbackElement;
967
- } else if (match.route.Component) {
968
- children = /* @__PURE__ */ React2.createElement(match.route.Component, null);
969
- } else if (match.route.element) {
970
- children = match.route.element;
971
- } else {
972
- children = outlet;
973
- }
974
- return /* @__PURE__ */ React2.createElement(
975
- RenderedRoute,
976
- {
977
- match,
978
- routeContext: {
979
- outlet,
980
- matches: matches2,
981
- isDataRoute: dataRouterState != null
982
- },
983
- children
984
- }
985
- );
986
- };
987
- return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2.createElement(
988
- RenderErrorBoundary,
989
- {
990
- location: dataRouterState.location,
991
- revalidation: dataRouterState.revalidation,
992
- component: errorElement,
993
- error,
994
- children: getChildren(),
995
- routeContext: { outlet: null, matches: matches2, isDataRoute: true },
996
- unstable_onError
997
- }
998
- ) : getChildren();
999
- },
1000
- null
1001
- );
1002
- }
1003
- function getDataRouterConsoleError(hookName) {
1004
- return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1005
- }
1006
- function useDataRouterContext(hookName) {
1007
- let ctx = React2.useContext(DataRouterContext);
1008
- invariant(ctx, getDataRouterConsoleError(hookName));
1009
- return ctx;
1010
- }
1011
- function useDataRouterState(hookName) {
1012
- let state = React2.useContext(DataRouterStateContext);
1013
- invariant(state, getDataRouterConsoleError(hookName));
1014
- return state;
1015
- }
1016
- function useRouteContext(hookName) {
1017
- let route = React2.useContext(RouteContext);
1018
- invariant(route, getDataRouterConsoleError(hookName));
1019
- return route;
1020
- }
1021
- function useCurrentRouteId(hookName) {
1022
- let route = useRouteContext(hookName);
1023
- let thisRoute = route.matches[route.matches.length - 1];
1024
- invariant(
1025
- thisRoute.route.id,
1026
- `${hookName} can only be used on routes that contain a unique "id"`
1027
- );
1028
- return thisRoute.route.id;
1029
- }
1030
- function useRouteId() {
1031
- return useCurrentRouteId(
1032
- "useRouteId"
1033
- /* UseRouteId */
1034
- );
1035
- }
1036
- function useNavigation() {
1037
- let state = useDataRouterState(
1038
- "useNavigation"
1039
- /* UseNavigation */
1040
- );
1041
- return state.navigation;
1042
- }
1043
- function useMatches() {
1044
- let { matches, loaderData } = useDataRouterState(
1045
- "useMatches"
1046
- /* UseMatches */
1047
- );
1048
- return React2.useMemo(
1049
- () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),
1050
- [matches, loaderData]
1051
- );
1052
- }
1053
- function useRouteError() {
1054
- let error = React2.useContext(RouteErrorContext);
1055
- let state = useDataRouterState(
1056
- "useRouteError"
1057
- /* UseRouteError */
1058
- );
1059
- let routeId = useCurrentRouteId(
1060
- "useRouteError"
1061
- /* UseRouteError */
1062
- );
1063
- if (error !== void 0) {
1064
- return error;
1065
- }
1066
- return state.errors?.[routeId];
1067
- }
1068
- function useNavigateStable() {
1069
- let { router } = useDataRouterContext(
1070
- "useNavigate"
1071
- /* UseNavigateStable */
1072
- );
1073
- let id = useCurrentRouteId(
1074
- "useNavigate"
1075
- /* UseNavigateStable */
1076
- );
1077
- let activeRef = React2.useRef(false);
1078
- useIsomorphicLayoutEffect(() => {
1079
- activeRef.current = true;
1080
- });
1081
- let navigate = React2.useCallback(
1082
- async (to, options = {}) => {
1083
- warning(activeRef.current, navigateEffectWarning);
1084
- if (!activeRef.current)
1085
- return;
1086
- if (typeof to === "number") {
1087
- router.navigate(to);
1088
- } else {
1089
- await router.navigate(to, { fromRouteId: id, ...options });
1090
- }
1091
- },
1092
- [router, id]
1093
- );
1094
- return navigate;
1095
- }
1096
- var alreadyWarned = {};
1097
- function warningOnce(key, cond, message) {
1098
- if (!cond && !alreadyWarned[key]) {
1099
- alreadyWarned[key] = true;
1100
- warning(false, message);
1101
- }
1102
- }
1103
- var MemoizedDataRoutes = React3.memo(DataRoutes);
1104
- function DataRoutes({
1105
- routes,
1106
- future,
1107
- state,
1108
- unstable_onError
1109
- }) {
1110
- return useRoutesImpl(routes, void 0, state, unstable_onError, future);
1111
- }
1112
- function MemoryRouter({
1113
- basename,
1114
- children,
1115
- initialEntries,
1116
- initialIndex
1117
- }) {
1118
- let historyRef = React3.useRef();
1119
- if (historyRef.current == null) {
1120
- historyRef.current = createMemoryHistory({
1121
- initialEntries,
1122
- initialIndex,
1123
- v5Compat: true
1124
- });
1125
- }
1126
- let history = historyRef.current;
1127
- let [state, setStateImpl] = React3.useState({
1128
- action: history.action,
1129
- location: history.location
1130
- });
1131
- let setState = React3.useCallback(
1132
- (newState) => {
1133
- React3.startTransition(() => setStateImpl(newState));
1134
- },
1135
- [setStateImpl]
1136
- );
1137
- React3.useLayoutEffect(() => history.listen(setState), [history, setState]);
1138
- return /* @__PURE__ */ React3.createElement(
1139
- Router,
1140
- {
1141
- basename,
1142
- children,
1143
- location: state.location,
1144
- navigationType: state.action,
1145
- navigator: history
1146
- }
1147
- );
1148
- }
1149
- function Router({
1150
- basename: basenameProp = "/",
1151
- children = null,
1152
- location: locationProp,
1153
- navigationType = "POP",
1154
- navigator,
1155
- static: staticProp = false
1156
- }) {
1157
- invariant(
1158
- !useInRouterContext(),
1159
- `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`
1160
- );
1161
- let basename = basenameProp.replace(/^\/*/, "/");
1162
- let navigationContext = React3.useMemo(
1163
- () => ({
1164
- basename,
1165
- navigator,
1166
- static: staticProp,
1167
- future: {}
1168
- }),
1169
- [basename, navigator, staticProp]
1170
- );
1171
- if (typeof locationProp === "string") {
1172
- locationProp = parsePath(locationProp);
1173
- }
1174
- let {
1175
- pathname = "/",
1176
- search = "",
1177
- hash = "",
1178
- state = null,
1179
- key = "default"
1180
- } = locationProp;
1181
- let locationContext = React3.useMemo(() => {
1182
- let trailingPathname = stripBasename(pathname, basename);
1183
- if (trailingPathname == null) {
1184
- return null;
1185
- }
1186
- return {
1187
- location: {
1188
- pathname: trailingPathname,
1189
- search,
1190
- hash,
1191
- state,
1192
- key
1193
- },
1194
- navigationType
1195
- };
1196
- }, [basename, pathname, search, hash, state, key, navigationType]);
1197
- warning(
1198
- locationContext != null,
1199
- `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
1200
- );
1201
- if (locationContext == null) {
1202
- return null;
1203
- }
1204
- return /* @__PURE__ */ React3.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3.createElement(LocationContext.Provider, { children, value: locationContext }));
1205
- }
1206
- var defaultMethod = "get";
1207
- var defaultEncType = "application/x-www-form-urlencoded";
1208
- function isHtmlElement(object) {
1209
- return object != null && typeof object.tagName === "string";
1210
- }
1211
- function isButtonElement(object) {
1212
- return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
1213
- }
1214
- function isFormElement(object) {
1215
- return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
1216
- }
1217
- function isInputElement(object) {
1218
- return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
1219
- }
1220
- function isModifiedEvent(event) {
1221
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
1222
- }
1223
- function shouldProcessLinkClick(event, target) {
1224
- return event.button === 0 && // Ignore everything but left clicks
1225
- (!target || target === "_self") && // Let browser handle "target=_blank" etc.
1226
- !isModifiedEvent(event);
1227
- }
1228
- var _formDataSupportsSubmitter = null;
1229
- function isFormDataSubmitterSupported() {
1230
- if (_formDataSupportsSubmitter === null) {
1231
- try {
1232
- new FormData(
1233
- document.createElement("form"),
1234
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
1235
- 0
1236
- );
1237
- _formDataSupportsSubmitter = false;
1238
- } catch (e) {
1239
- _formDataSupportsSubmitter = true;
1240
- }
1241
- }
1242
- return _formDataSupportsSubmitter;
1243
- }
1244
- var supportedFormEncTypes = /* @__PURE__ */ new Set([
1245
- "application/x-www-form-urlencoded",
1246
- "multipart/form-data",
1247
- "text/plain"
1248
- ]);
1249
- function getFormEncType(encType) {
1250
- if (encType != null && !supportedFormEncTypes.has(encType)) {
1251
- warning(
1252
- false,
1253
- `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
1254
- );
1255
- return null;
1256
- }
1257
- return encType;
1258
- }
1259
- function getFormSubmissionInfo(target, basename) {
1260
- let method;
1261
- let action;
1262
- let encType;
1263
- let formData;
1264
- let body;
1265
- if (isFormElement(target)) {
1266
- let attr = target.getAttribute("action");
1267
- action = attr ? stripBasename(attr, basename) : null;
1268
- method = target.getAttribute("method") || defaultMethod;
1269
- encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
1270
- formData = new FormData(target);
1271
- } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
1272
- let form = target.form;
1273
- if (form == null) {
1274
- throw new Error(
1275
- `Cannot submit a <button> or <input type="submit"> without a <form>`
1276
- );
1277
- }
1278
- let attr = target.getAttribute("formaction") || form.getAttribute("action");
1279
- action = attr ? stripBasename(attr, basename) : null;
1280
- method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
1281
- encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
1282
- formData = new FormData(form, target);
1283
- if (!isFormDataSubmitterSupported()) {
1284
- let { name, type, value } = target;
1285
- if (type === "image") {
1286
- let prefix = name ? `${name}.` : "";
1287
- formData.append(`${prefix}x`, "0");
1288
- formData.append(`${prefix}y`, "0");
1289
- } else if (name) {
1290
- formData.append(name, value);
1291
- }
1292
- }
1293
- } else if (isHtmlElement(target)) {
1294
- throw new Error(
1295
- `Cannot submit element that is not <form>, <button>, or <input type="submit|image">`
1296
- );
1297
- } else {
1298
- method = defaultMethod;
1299
- action = null;
1300
- encType = defaultEncType;
1301
- body = target;
1302
- }
1303
- if (formData && encType === "text/plain") {
1304
- body = formData;
1305
- formData = void 0;
1306
- }
1307
- return { action, method: method.toLowerCase(), encType, formData, body };
1308
- }
1309
- var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
1310
- function invariant2(value, message) {
1311
- if (value === false || value === null || typeof value === "undefined") {
1312
- throw new Error(message);
1313
- }
1314
- }
1315
- var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
1316
- function singleFetchUrl(reqUrl, basename, extension) {
1317
- let url = typeof reqUrl === "string" ? new URL(
1318
- reqUrl,
1319
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
1320
- // don't assume window is available
1321
- typeof window === "undefined" ? "server://singlefetch/" : window.location.origin
1322
- ) : reqUrl;
1323
- if (url.pathname === "/") {
1324
- url.pathname = `_root.${extension}`;
1325
- } else if (basename && stripBasename(url.pathname, basename) === "/") {
1326
- url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
1327
- } else {
1328
- url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
1329
- }
1330
- return url;
1331
- }
1332
- async function loadRouteModule(route, routeModulesCache) {
1333
- if (route.id in routeModulesCache) {
1334
- return routeModulesCache[route.id];
1335
- }
1336
- try {
1337
- let routeModule = await import(
1338
- /* @vite-ignore */
1339
- /* webpackIgnore: true */
1340
- route.module
1341
- );
1342
- routeModulesCache[route.id] = routeModule;
1343
- return routeModule;
1344
- } catch (error) {
1345
- console.error(
1346
- `Error loading route module \`${route.module}\`, reloading page...`
1347
- );
1348
- console.error(error);
1349
- if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error
1350
- import.meta.hot) {
1351
- throw error;
1352
- }
1353
- window.location.reload();
1354
- return new Promise(() => {
1355
- });
1356
- }
1357
- }
1358
- function isPageLinkDescriptor(object) {
1359
- return object != null && typeof object.page === "string";
1360
- }
1361
- function isHtmlLinkDescriptor(object) {
1362
- if (object == null) {
1363
- return false;
1364
- }
1365
- if (object.href == null) {
1366
- return object.rel === "preload" && typeof object.imageSrcSet === "string" && typeof object.imageSizes === "string";
1367
- }
1368
- return typeof object.rel === "string" && typeof object.href === "string";
1369
- }
1370
- async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
1371
- let links = await Promise.all(
1372
- matches.map(async (match) => {
1373
- let route = manifest.routes[match.route.id];
1374
- if (route) {
1375
- let mod = await loadRouteModule(route, routeModules);
1376
- return mod.links ? mod.links() : [];
1377
- }
1378
- return [];
1379
- })
1380
- );
1381
- return dedupeLinkDescriptors(
1382
- links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map(
1383
- (link) => link.rel === "stylesheet" ? { ...link, rel: "prefetch", as: "style" } : { ...link, rel: "prefetch" }
1384
- )
1385
- );
1386
- }
1387
- function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {
1388
- let isNew = (match, index) => {
1389
- if (!currentMatches[index])
1390
- return true;
1391
- return match.route.id !== currentMatches[index].route.id;
1392
- };
1393
- let matchPathChanged = (match, index) => {
1394
- return (
1395
- // param change, /users/123 -> /users/456
1396
- currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
1397
- // e.g. /files/images/avatar.jpg -> files/finances.xls
1398
- currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"]
1399
- );
1400
- };
1401
- if (mode === "assets") {
1402
- return nextMatches.filter(
1403
- (match, index) => isNew(match, index) || matchPathChanged(match, index)
1404
- );
1405
- }
1406
- if (mode === "data") {
1407
- return nextMatches.filter((match, index) => {
1408
- let manifestRoute = manifest.routes[match.route.id];
1409
- if (!manifestRoute || !manifestRoute.hasLoader) {
1410
- return false;
1411
- }
1412
- if (isNew(match, index) || matchPathChanged(match, index)) {
1413
- return true;
1414
- }
1415
- if (match.route.shouldRevalidate) {
1416
- let routeChoice = match.route.shouldRevalidate({
1417
- currentUrl: new URL(
1418
- location.pathname + location.search + location.hash,
1419
- window.origin
1420
- ),
1421
- currentParams: currentMatches[0]?.params || {},
1422
- nextUrl: new URL(page, window.origin),
1423
- nextParams: match.params,
1424
- defaultShouldRevalidate: true
1425
- });
1426
- if (typeof routeChoice === "boolean") {
1427
- return routeChoice;
1428
- }
1429
- }
1430
- return true;
1431
- });
1432
- }
1433
- return [];
1434
- }
1435
- function getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {
1436
- return dedupeHrefs(
1437
- matches.map((match) => {
1438
- let route = manifest.routes[match.route.id];
1439
- if (!route)
1440
- return [];
1441
- let hrefs = [route.module];
1442
- if (route.clientActionModule) {
1443
- hrefs = hrefs.concat(route.clientActionModule);
1444
- }
1445
- if (route.clientLoaderModule) {
1446
- hrefs = hrefs.concat(route.clientLoaderModule);
1447
- }
1448
- if (includeHydrateFallback && route.hydrateFallbackModule) {
1449
- hrefs = hrefs.concat(route.hydrateFallbackModule);
1450
- }
1451
- if (route.imports) {
1452
- hrefs = hrefs.concat(route.imports);
1453
- }
1454
- return hrefs;
1455
- }).flat(1)
1456
- );
1457
- }
1458
- function dedupeHrefs(hrefs) {
1459
- return [...new Set(hrefs)];
1460
- }
1461
- function sortKeys(obj) {
1462
- let sorted = {};
1463
- let keys = Object.keys(obj).sort();
1464
- for (let key of keys) {
1465
- sorted[key] = obj[key];
1466
- }
1467
- return sorted;
1468
- }
1469
- function dedupeLinkDescriptors(descriptors, preloads) {
1470
- let set = /* @__PURE__ */ new Set();
1471
- let preloadsSet = new Set(preloads);
1472
- return descriptors.reduce((deduped, descriptor) => {
1473
- let alreadyModulePreload = preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === "script" && descriptor.href && preloadsSet.has(descriptor.href);
1474
- if (alreadyModulePreload) {
1475
- return deduped;
1476
- }
1477
- let key = JSON.stringify(sortKeys(descriptor));
1478
- if (!set.has(key)) {
1479
- set.add(key);
1480
- deduped.push({ key, link: descriptor });
1481
- }
1482
- return deduped;
1483
- }, []);
1484
- }
1485
- function useDataRouterContext2() {
1486
- let context = React8.useContext(DataRouterContext);
1487
- invariant2(
1488
- context,
1489
- "You must render this element inside a <DataRouterContext.Provider> element"
1490
- );
1491
- return context;
1492
- }
1493
- function useDataRouterStateContext() {
1494
- let context = React8.useContext(DataRouterStateContext);
1495
- invariant2(
1496
- context,
1497
- "You must render this element inside a <DataRouterStateContext.Provider> element"
1498
- );
1499
- return context;
1500
- }
1501
- var FrameworkContext = React8.createContext(void 0);
1502
- FrameworkContext.displayName = "FrameworkContext";
1503
- function useFrameworkContext() {
1504
- let context = React8.useContext(FrameworkContext);
1505
- invariant2(
1506
- context,
1507
- "You must render this element inside a <HydratedRouter> element"
1508
- );
1509
- return context;
1510
- }
1511
- function usePrefetchBehavior(prefetch, theirElementProps) {
1512
- let frameworkContext = React8.useContext(FrameworkContext);
1513
- let [maybePrefetch, setMaybePrefetch] = React8.useState(false);
1514
- let [shouldPrefetch, setShouldPrefetch] = React8.useState(false);
1515
- let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
1516
- let ref = React8.useRef(null);
1517
- React8.useEffect(() => {
1518
- if (prefetch === "render") {
1519
- setShouldPrefetch(true);
1520
- }
1521
- if (prefetch === "viewport") {
1522
- let callback = (entries) => {
1523
- entries.forEach((entry) => {
1524
- setShouldPrefetch(entry.isIntersecting);
1525
- });
1526
- };
1527
- let observer = new IntersectionObserver(callback, { threshold: 0.5 });
1528
- if (ref.current)
1529
- observer.observe(ref.current);
1530
- return () => {
1531
- observer.disconnect();
1532
- };
1533
- }
1534
- }, [prefetch]);
1535
- React8.useEffect(() => {
1536
- if (maybePrefetch) {
1537
- let id = setTimeout(() => {
1538
- setShouldPrefetch(true);
1539
- }, 100);
1540
- return () => {
1541
- clearTimeout(id);
1542
- };
1543
- }
1544
- }, [maybePrefetch]);
1545
- let setIntent = () => {
1546
- setMaybePrefetch(true);
1547
- };
1548
- let cancelIntent = () => {
1549
- setMaybePrefetch(false);
1550
- setShouldPrefetch(false);
1551
- };
1552
- if (!frameworkContext) {
1553
- return [false, ref, {}];
1554
- }
1555
- if (prefetch !== "intent") {
1556
- return [shouldPrefetch, ref, {}];
1557
- }
1558
- return [
1559
- shouldPrefetch,
1560
- ref,
1561
- {
1562
- onFocus: composeEventHandlers(onFocus, setIntent),
1563
- onBlur: composeEventHandlers(onBlur, cancelIntent),
1564
- onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),
1565
- onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),
1566
- onTouchStart: composeEventHandlers(onTouchStart, setIntent)
1567
- }
1568
- ];
1569
- }
1570
- function composeEventHandlers(theirHandler, ourHandler) {
1571
- return (event) => {
1572
- theirHandler && theirHandler(event);
1573
- if (!event.defaultPrevented) {
1574
- ourHandler(event);
1575
- }
1576
- };
1577
- }
1578
- function PrefetchPageLinks({ page, ...linkProps }) {
1579
- let { router } = useDataRouterContext2();
1580
- let matches = React8.useMemo(
1581
- () => matchRoutes(router.routes, page, router.basename),
1582
- [router.routes, page, router.basename]
1583
- );
1584
- if (!matches) {
1585
- return null;
1586
- }
1587
- return /* @__PURE__ */ React8.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps });
1588
- }
1589
- function useKeyedPrefetchLinks(matches) {
1590
- let { manifest, routeModules } = useFrameworkContext();
1591
- let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React8.useState([]);
1592
- React8.useEffect(() => {
1593
- let interrupted = false;
1594
- void getKeyedPrefetchLinks(matches, manifest, routeModules).then(
1595
- (links) => {
1596
- if (!interrupted) {
1597
- setKeyedPrefetchLinks(links);
1598
- }
1599
- }
1600
- );
1601
- return () => {
1602
- interrupted = true;
1603
- };
1604
- }, [matches, manifest, routeModules]);
1605
- return keyedPrefetchLinks;
1606
- }
1607
- function PrefetchPageLinksImpl({
1608
- page,
1609
- matches: nextMatches,
1610
- ...linkProps
1611
- }) {
1612
- let location = useLocation();
1613
- let { manifest, routeModules } = useFrameworkContext();
1614
- let { basename } = useDataRouterContext2();
1615
- let { loaderData, matches } = useDataRouterStateContext();
1616
- let newMatchesForData = React8.useMemo(
1617
- () => getNewMatchesForLinks(
1618
- page,
1619
- nextMatches,
1620
- matches,
1621
- manifest,
1622
- location,
1623
- "data"
1624
- ),
1625
- [page, nextMatches, matches, manifest, location]
1626
- );
1627
- let newMatchesForAssets = React8.useMemo(
1628
- () => getNewMatchesForLinks(
1629
- page,
1630
- nextMatches,
1631
- matches,
1632
- manifest,
1633
- location,
1634
- "assets"
1635
- ),
1636
- [page, nextMatches, matches, manifest, location]
1637
- );
1638
- let dataHrefs = React8.useMemo(() => {
1639
- if (page === location.pathname + location.search + location.hash) {
1640
- return [];
1641
- }
1642
- let routesParams = /* @__PURE__ */ new Set();
1643
- let foundOptOutRoute = false;
1644
- nextMatches.forEach((m) => {
1645
- let manifestRoute = manifest.routes[m.route.id];
1646
- if (!manifestRoute || !manifestRoute.hasLoader) {
1647
- return;
1648
- }
1649
- if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {
1650
- foundOptOutRoute = true;
1651
- } else if (manifestRoute.hasClientLoader) {
1652
- foundOptOutRoute = true;
1653
- } else {
1654
- routesParams.add(m.route.id);
1655
- }
1656
- });
1657
- if (routesParams.size === 0) {
1658
- return [];
1659
- }
1660
- let url = singleFetchUrl(page, basename, "data");
1661
- if (foundOptOutRoute && routesParams.size > 0) {
1662
- url.searchParams.set(
1663
- "_routes",
1664
- nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(",")
1665
- );
1666
- }
1667
- return [url.pathname + url.search];
1668
- }, [
1669
- basename,
1670
- loaderData,
1671
- location,
1672
- manifest,
1673
- newMatchesForData,
1674
- nextMatches,
1675
- page,
1676
- routeModules
1677
- ]);
1678
- let moduleHrefs = React8.useMemo(
1679
- () => getModuleLinkHrefs(newMatchesForAssets, manifest),
1680
- [newMatchesForAssets, manifest]
1681
- );
1682
- let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
1683
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
1684
- // these don't spread `linkProps` because they are full link descriptors
1685
- // already with their own props
1686
- /* @__PURE__ */ React8.createElement("link", { key, nonce: linkProps.nonce, ...link })
1687
- )));
1688
- }
1689
- function mergeRefs(...refs) {
1690
- return (value) => {
1691
- refs.forEach((ref) => {
1692
- if (typeof ref === "function") {
1693
- ref(value);
1694
- } else if (ref != null) {
1695
- ref.current = value;
1696
- }
1697
- });
1698
- };
1699
- }
1700
- var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
1701
- try {
1702
- if (isBrowser) {
1703
- window.__reactRouterVersion = // @ts-expect-error
1704
- "7.8.2";
1705
- }
1706
- } catch (e) {
1707
- }
1708
- function HistoryRouter({
1709
- basename,
1710
- children,
1711
- history
1712
- }) {
1713
- let [state, setStateImpl] = React10.useState({
1714
- action: history.action,
1715
- location: history.location
1716
- });
1717
- let setState = React10.useCallback(
1718
- (newState) => {
1719
- React10.startTransition(() => setStateImpl(newState));
1720
- },
1721
- [setStateImpl]
1722
- );
1723
- React10.useLayoutEffect(() => history.listen(setState), [history, setState]);
1724
- return /* @__PURE__ */ React10.createElement(
1725
- Router,
1726
- {
1727
- basename,
1728
- children,
1729
- location: state.location,
1730
- navigationType: state.action,
1731
- navigator: history
1732
- }
1733
- );
1734
- }
1735
- HistoryRouter.displayName = "unstable_HistoryRouter";
1736
- var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1737
- var Link = React10.forwardRef(
1738
- function LinkWithRef({
1739
- onClick,
1740
- discover = "render",
1741
- prefetch = "none",
1742
- relative,
1743
- reloadDocument,
1744
- replace: replace2,
1745
- state,
1746
- target,
1747
- to,
1748
- preventScrollReset,
1749
- viewTransition,
1750
- ...rest
1751
- }, forwardedRef) {
1752
- let { basename } = React10.useContext(NavigationContext);
1753
- let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
1754
- let absoluteHref;
1755
- let isExternal = false;
1756
- if (typeof to === "string" && isAbsolute) {
1757
- absoluteHref = to;
1758
- if (isBrowser) {
1759
- try {
1760
- let currentUrl = new URL(window.location.href);
1761
- let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
1762
- let path = stripBasename(targetUrl.pathname, basename);
1763
- if (targetUrl.origin === currentUrl.origin && path != null) {
1764
- to = path + targetUrl.search + targetUrl.hash;
1765
- } else {
1766
- isExternal = true;
1767
- }
1768
- } catch (e) {
1769
- warning(
1770
- false,
1771
- `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1772
- );
1773
- }
1774
- }
1775
- }
1776
- let href = useHref(to, { relative });
1777
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
1778
- prefetch,
1779
- rest
1780
- );
1781
- let internalOnClick = useLinkClickHandler(to, {
1782
- replace: replace2,
1783
- state,
1784
- target,
1785
- preventScrollReset,
1786
- relative,
1787
- viewTransition
1788
- });
1789
- function handleClick(event) {
1790
- if (onClick)
1791
- onClick(event);
1792
- if (!event.defaultPrevented) {
1793
- internalOnClick(event);
1794
- }
1795
- }
1796
- let link = (
1797
- // eslint-disable-next-line jsx-a11y/anchor-has-content
1798
- /* @__PURE__ */ React10.createElement(
1799
- "a",
1800
- {
1801
- ...rest,
1802
- ...prefetchHandlers,
1803
- href: absoluteHref || href,
1804
- onClick: isExternal || reloadDocument ? onClick : handleClick,
1805
- ref: mergeRefs(forwardedRef, prefetchRef),
1806
- target,
1807
- "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
1808
- }
1809
- )
1810
- );
1811
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href })) : link;
1812
- }
1813
- );
1814
- Link.displayName = "Link";
1815
- var NavLink = React10.forwardRef(
1816
- function NavLinkWithRef({
1817
- "aria-current": ariaCurrentProp = "page",
1818
- caseSensitive = false,
1819
- className: classNameProp = "",
1820
- end = false,
1821
- style: styleProp,
1822
- to,
1823
- viewTransition,
1824
- children,
1825
- ...rest
1826
- }, ref) {
1827
- let path = useResolvedPath(to, { relative: rest.relative });
1828
- let location = useLocation();
1829
- let routerState = React10.useContext(DataRouterStateContext);
1830
- let { navigator, basename } = React10.useContext(NavigationContext);
1831
- let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
1832
- // eslint-disable-next-line react-hooks/rules-of-hooks
1833
- useViewTransitionState(path) && viewTransition === true;
1834
- let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
1835
- let locationPathname = location.pathname;
1836
- let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
1837
- if (!caseSensitive) {
1838
- locationPathname = locationPathname.toLowerCase();
1839
- nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
1840
- toPathname = toPathname.toLowerCase();
1841
- }
1842
- if (nextLocationPathname && basename) {
1843
- nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
1844
- }
1845
- const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
1846
- let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
1847
- let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
1848
- let renderProps = {
1849
- isActive,
1850
- isPending,
1851
- isTransitioning
1852
- };
1853
- let ariaCurrent = isActive ? ariaCurrentProp : void 0;
1854
- let className;
1855
- if (typeof classNameProp === "function") {
1856
- className = classNameProp(renderProps);
1857
- } else {
1858
- className = [
1859
- classNameProp,
1860
- isActive ? "active" : null,
1861
- isPending ? "pending" : null,
1862
- isTransitioning ? "transitioning" : null
1863
- ].filter(Boolean).join(" ");
1864
- }
1865
- let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
1866
- return /* @__PURE__ */ React10.createElement(
1867
- Link,
1868
- {
1869
- ...rest,
1870
- "aria-current": ariaCurrent,
1871
- className,
1872
- ref,
1873
- style,
1874
- to,
1875
- viewTransition
1876
- },
1877
- typeof children === "function" ? children(renderProps) : children
1878
- );
1879
- }
1880
- );
1881
- NavLink.displayName = "NavLink";
1882
- var Form = React10.forwardRef(
1883
- ({
1884
- discover = "render",
1885
- fetcherKey,
1886
- navigate,
1887
- reloadDocument,
1888
- replace: replace2,
1889
- state,
1890
- method = defaultMethod,
1891
- action,
1892
- onSubmit,
1893
- relative,
1894
- preventScrollReset,
1895
- viewTransition,
1896
- ...props
1897
- }, forwardedRef) => {
1898
- let submit = useSubmit();
1899
- let formAction = useFormAction(action, { relative });
1900
- let formMethod = method.toLowerCase() === "get" ? "get" : "post";
1901
- let isAbsolute = typeof action === "string" && ABSOLUTE_URL_REGEX2.test(action);
1902
- let submitHandler = (event) => {
1903
- onSubmit && onSubmit(event);
1904
- if (event.defaultPrevented)
1905
- return;
1906
- event.preventDefault();
1907
- let submitter = event.nativeEvent.submitter;
1908
- let submitMethod = submitter?.getAttribute("formmethod") || method;
1909
- submit(submitter || event.currentTarget, {
1910
- fetcherKey,
1911
- method: submitMethod,
1912
- navigate,
1913
- replace: replace2,
1914
- state,
1915
- relative,
1916
- preventScrollReset,
1917
- viewTransition
1918
- });
1919
- };
1920
- return /* @__PURE__ */ React10.createElement(
1921
- "form",
1922
- {
1923
- ref: forwardedRef,
1924
- method: formMethod,
1925
- action: formAction,
1926
- onSubmit: reloadDocument ? onSubmit : submitHandler,
1927
- ...props,
1928
- "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
1929
- }
1930
- );
1931
- }
1932
- );
1933
- Form.displayName = "Form";
1934
- function ScrollRestoration({
1935
- getKey,
1936
- storageKey,
1937
- ...props
1938
- }) {
1939
- let remixContext = React10.useContext(FrameworkContext);
1940
- let { basename } = React10.useContext(NavigationContext);
1941
- let location = useLocation();
1942
- let matches = useMatches();
1943
- useScrollRestoration({ getKey, storageKey });
1944
- let ssrKey = React10.useMemo(
1945
- () => {
1946
- if (!remixContext || !getKey)
1947
- return null;
1948
- let userKey = getScrollRestorationKey(
1949
- location,
1950
- matches,
1951
- basename,
1952
- getKey
1953
- );
1954
- return userKey !== location.key ? userKey : null;
1955
- },
1956
- // Nah, we only need this the first time for the SSR render
1957
- // eslint-disable-next-line react-hooks/exhaustive-deps
1958
- []
1959
- );
1960
- if (!remixContext || remixContext.isSpaMode) {
1961
- return null;
1962
- }
1963
- let restoreScroll = ((storageKey2, restoreKey) => {
1964
- if (!window.history.state || !window.history.state.key) {
1965
- let key = Math.random().toString(32).slice(2);
1966
- window.history.replaceState({ key }, "");
1967
- }
1968
- try {
1969
- let positions = JSON.parse(sessionStorage.getItem(storageKey2) || "{}");
1970
- let storedY = positions[restoreKey || window.history.state.key];
1971
- if (typeof storedY === "number") {
1972
- window.scrollTo(0, storedY);
1973
- }
1974
- } catch (error) {
1975
- console.error(error);
1976
- sessionStorage.removeItem(storageKey2);
1977
- }
1978
- }).toString();
1979
- return /* @__PURE__ */ React10.createElement(
1980
- "script",
1981
- {
1982
- ...props,
1983
- suppressHydrationWarning: true,
1984
- dangerouslySetInnerHTML: {
1985
- __html: `(${restoreScroll})(${JSON.stringify(
1986
- storageKey || SCROLL_RESTORATION_STORAGE_KEY
1987
- )}, ${JSON.stringify(ssrKey)})`
1988
- }
1989
- }
1990
- );
1991
- }
1992
- ScrollRestoration.displayName = "ScrollRestoration";
1993
- function getDataRouterConsoleError2(hookName) {
1994
- return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1995
- }
1996
- function useDataRouterContext3(hookName) {
1997
- let ctx = React10.useContext(DataRouterContext);
1998
- invariant(ctx, getDataRouterConsoleError2(hookName));
1999
- return ctx;
2000
- }
2001
- function useDataRouterState2(hookName) {
2002
- let state = React10.useContext(DataRouterStateContext);
2003
- invariant(state, getDataRouterConsoleError2(hookName));
2004
- return state;
2005
- }
2006
- function useLinkClickHandler(to, {
2007
- target,
2008
- replace: replaceProp,
2009
- state,
2010
- preventScrollReset,
2011
- relative,
2012
- viewTransition
2013
- } = {}) {
2014
- let navigate = useNavigate();
2015
- let location = useLocation();
2016
- let path = useResolvedPath(to, { relative });
2017
- return React10.useCallback(
2018
- (event) => {
2019
- if (shouldProcessLinkClick(event, target)) {
2020
- event.preventDefault();
2021
- let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
2022
- navigate(to, {
2023
- replace: replace2,
2024
- state,
2025
- preventScrollReset,
2026
- relative,
2027
- viewTransition
2028
- });
2029
- }
2030
- },
2031
- [
2032
- location,
2033
- navigate,
2034
- path,
2035
- replaceProp,
2036
- state,
2037
- target,
2038
- to,
2039
- preventScrollReset,
2040
- relative,
2041
- viewTransition
2042
- ]
2043
- );
2044
- }
2045
- var fetcherId = 0;
2046
- var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
2047
- function useSubmit() {
2048
- let { router } = useDataRouterContext3(
2049
- "useSubmit"
2050
- /* UseSubmit */
2051
- );
2052
- let { basename } = React10.useContext(NavigationContext);
2053
- let currentRouteId = useRouteId();
2054
- return React10.useCallback(
2055
- async (target, options = {}) => {
2056
- let { action, method, encType, formData, body } = getFormSubmissionInfo(
2057
- target,
2058
- basename
2059
- );
2060
- if (options.navigate === false) {
2061
- let key = options.fetcherKey || getUniqueFetcherId();
2062
- await router.fetch(key, currentRouteId, options.action || action, {
2063
- preventScrollReset: options.preventScrollReset,
2064
- formData,
2065
- body,
2066
- formMethod: options.method || method,
2067
- formEncType: options.encType || encType,
2068
- flushSync: options.flushSync
2069
- });
2070
- } else {
2071
- await router.navigate(options.action || action, {
2072
- preventScrollReset: options.preventScrollReset,
2073
- formData,
2074
- body,
2075
- formMethod: options.method || method,
2076
- formEncType: options.encType || encType,
2077
- replace: options.replace,
2078
- state: options.state,
2079
- fromRouteId: currentRouteId,
2080
- flushSync: options.flushSync,
2081
- viewTransition: options.viewTransition
2082
- });
2083
- }
2084
- },
2085
- [router, basename, currentRouteId]
2086
- );
2087
- }
2088
- function useFormAction(action, { relative } = {}) {
2089
- let { basename } = React10.useContext(NavigationContext);
2090
- let routeContext = React10.useContext(RouteContext);
2091
- invariant(routeContext, "useFormAction must be used inside a RouteContext");
2092
- let [match] = routeContext.matches.slice(-1);
2093
- let path = { ...useResolvedPath(action ? action : ".", { relative }) };
2094
- let location = useLocation();
2095
- if (action == null) {
2096
- path.search = location.search;
2097
- let params = new URLSearchParams(path.search);
2098
- let indexValues = params.getAll("index");
2099
- let hasNakedIndexParam = indexValues.some((v) => v === "");
2100
- if (hasNakedIndexParam) {
2101
- params.delete("index");
2102
- indexValues.filter((v) => v).forEach((v) => params.append("index", v));
2103
- let qs = params.toString();
2104
- path.search = qs ? `?${qs}` : "";
2105
- }
2106
- }
2107
- if ((!action || action === ".") && match.route.index) {
2108
- path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
2109
- }
2110
- if (basename !== "/") {
2111
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
2112
- }
2113
- return createPath(path);
2114
- }
2115
- var SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";
2116
- var savedScrollPositions = {};
2117
- function getScrollRestorationKey(location, matches, basename, getKey) {
2118
- let key = null;
2119
- if (getKey) {
2120
- if (basename !== "/") {
2121
- key = getKey(
2122
- {
2123
- ...location,
2124
- pathname: stripBasename(location.pathname, basename) || location.pathname
2125
- },
2126
- matches
2127
- );
2128
- } else {
2129
- key = getKey(location, matches);
2130
- }
2131
- }
2132
- if (key == null) {
2133
- key = location.key;
2134
- }
2135
- return key;
2136
- }
2137
- function useScrollRestoration({
2138
- getKey,
2139
- storageKey
2140
- } = {}) {
2141
- let { router } = useDataRouterContext3(
2142
- "useScrollRestoration"
2143
- /* UseScrollRestoration */
2144
- );
2145
- let { restoreScrollPosition, preventScrollReset } = useDataRouterState2(
2146
- "useScrollRestoration"
2147
- /* UseScrollRestoration */
2148
- );
2149
- let { basename } = React10.useContext(NavigationContext);
2150
- let location = useLocation();
2151
- let matches = useMatches();
2152
- let navigation = useNavigation();
2153
- React10.useEffect(() => {
2154
- window.history.scrollRestoration = "manual";
2155
- return () => {
2156
- window.history.scrollRestoration = "auto";
2157
- };
2158
- }, []);
2159
- usePageHide(
2160
- React10.useCallback(() => {
2161
- if (navigation.state === "idle") {
2162
- let key = getScrollRestorationKey(location, matches, basename, getKey);
2163
- savedScrollPositions[key] = window.scrollY;
2164
- }
2165
- try {
2166
- sessionStorage.setItem(
2167
- storageKey || SCROLL_RESTORATION_STORAGE_KEY,
2168
- JSON.stringify(savedScrollPositions)
2169
- );
2170
- } catch (error) {
2171
- warning(
2172
- false,
2173
- `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
2174
- );
2175
- }
2176
- window.history.scrollRestoration = "auto";
2177
- }, [navigation.state, getKey, basename, location, matches, storageKey])
2178
- );
2179
- if (typeof document !== "undefined") {
2180
- React10.useLayoutEffect(() => {
2181
- try {
2182
- let sessionPositions = sessionStorage.getItem(
2183
- storageKey || SCROLL_RESTORATION_STORAGE_KEY
2184
- );
2185
- if (sessionPositions) {
2186
- savedScrollPositions = JSON.parse(sessionPositions);
2187
- }
2188
- } catch (e) {
2189
- }
2190
- }, [storageKey]);
2191
- React10.useLayoutEffect(() => {
2192
- let disableScrollRestoration = router?.enableScrollRestoration(
2193
- savedScrollPositions,
2194
- () => window.scrollY,
2195
- getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0
2196
- );
2197
- return () => disableScrollRestoration && disableScrollRestoration();
2198
- }, [router, basename, getKey]);
2199
- React10.useLayoutEffect(() => {
2200
- if (restoreScrollPosition === false) {
2201
- return;
2202
- }
2203
- if (typeof restoreScrollPosition === "number") {
2204
- window.scrollTo(0, restoreScrollPosition);
2205
- return;
2206
- }
2207
- try {
2208
- if (location.hash) {
2209
- let el = document.getElementById(
2210
- decodeURIComponent(location.hash.slice(1))
2211
- );
2212
- if (el) {
2213
- el.scrollIntoView();
2214
- return;
2215
- }
2216
- }
2217
- } catch {
2218
- warning(
2219
- false,
2220
- `"${location.hash.slice(
2221
- 1
2222
- )}" is not a decodable element ID. The view will not scroll to it.`
2223
- );
2224
- }
2225
- if (preventScrollReset === true) {
2226
- return;
2227
- }
2228
- window.scrollTo(0, 0);
2229
- }, [location, restoreScrollPosition, preventScrollReset]);
2230
- }
2231
- }
2232
- function usePageHide(callback, options) {
2233
- let { capture } = options || {};
2234
- React10.useEffect(() => {
2235
- let opts = capture != null ? { capture } : void 0;
2236
- window.addEventListener("pagehide", callback, opts);
2237
- return () => {
2238
- window.removeEventListener("pagehide", callback, opts);
2239
- };
2240
- }, [callback, capture]);
2241
- }
2242
- function useViewTransitionState(to, { relative } = {}) {
2243
- let vtContext = React10.useContext(ViewTransitionContext);
2244
- invariant(
2245
- vtContext != null,
2246
- "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
2247
- );
2248
- let { basename } = useDataRouterContext3(
2249
- "useViewTransitionState"
2250
- /* useViewTransitionState */
2251
- );
2252
- let path = useResolvedPath(to, { relative });
2253
- if (!vtContext.isTransitioning) {
2254
- return false;
2255
- }
2256
- let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
2257
- let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
2258
- return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
2259
- }
2260
-
2261
- // node_modules/react-router/dist/development/index.mjs
2262
- init_dirname();
2263
- init_buffer();
2264
- init_process();
2265
- "use client";
2266
-
2267
- export {
2268
- useLocation,
2269
- MemoryRouter,
2270
- Link
2271
- };
2272
- /*! Bundled license information:
2273
-
2274
- react-router/dist/development/chunk-PVWAREVJ.mjs:
2275
- (**
2276
- * react-router v7.8.2
2277
- *
2278
- * Copyright (c) Remix Software Inc.
2279
- *
2280
- * This source code is licensed under the MIT license found in the
2281
- * LICENSE.md file in the root directory of this source tree.
2282
- *
2283
- * @license MIT
2284
- *)
2285
-
2286
- react-router/dist/development/index.mjs:
2287
- (**
2288
- * react-router v7.8.2
2289
- *
2290
- * Copyright (c) Remix Software Inc.
2291
- *
2292
- * This source code is licensed under the MIT license found in the
2293
- * LICENSE.md file in the root directory of this source tree.
2294
- *
2295
- * @license MIT
2296
- *)
2297
- */