testeranto 0.202.0 → 0.205.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 (1119) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/Dockerfile.golang +14 -0
  3. package/Dockerfile.mothership +11 -0
  4. package/Dockerfile.node +9 -0
  5. package/Dockerfile.python +19 -0
  6. package/Dockerfile.web +9 -0
  7. package/README.md +26 -1
  8. package/UX/chache/index.md +11 -0
  9. package/bundle.js +2 -11
  10. package/dist/cjs-shim.js +2 -0
  11. package/dist/common/example/Calculator.js +105 -0
  12. package/dist/common/example/Calculator.test.adapter.js +39 -0
  13. package/dist/common/example/Calculator.test.implementation.js +50 -0
  14. package/dist/common/example/Calculator.test.js +11 -0
  15. package/dist/common/example/Calculator.test.specification.js +92 -0
  16. package/dist/common/example/Calculator.test.types.js +3 -0
  17. package/dist/common/scripts/build-example.js +105 -0
  18. package/dist/common/src/Helpo.js +55 -0
  19. package/dist/common/src/Init.js +9 -1
  20. package/dist/common/src/Node.js +0 -1
  21. package/dist/common/src/PM/golingvuBuild.js +46 -0
  22. package/dist/common/src/PM/pitonoBuild.js +46 -0
  23. package/dist/common/src/PM/utils.js +8 -1
  24. package/dist/common/src/PM/web.js +4 -8
  25. package/dist/common/src/Pure.js +0 -14
  26. package/dist/common/src/Pure.test.js +1 -6
  27. package/dist/common/src/Web.js +1 -35
  28. package/dist/common/src/WebSidecar.js +0 -1
  29. package/dist/common/src/app/FileService.js +25 -0
  30. package/dist/common/src/app/api.js +73 -0
  31. package/dist/common/src/app/backend/PM_0.js +317 -0
  32. package/dist/common/src/app/backend/PM_1_WithProcesses.js +922 -0
  33. package/dist/common/src/app/backend/PM_2_WithTCP.js +244 -0
  34. package/dist/common/src/app/backend/PM_WithBuild.js +120 -0
  35. package/dist/common/src/app/backend/PM_WithEslintAndTsc.js +133 -0
  36. package/dist/common/src/app/backend/PM_WithGit.js +586 -0
  37. package/dist/common/src/app/backend/PM_WithHelpo.js +257 -0
  38. package/dist/common/src/app/backend/PM_WithProcesses.js +1083 -0
  39. package/dist/common/src/app/backend/PM_WithTCP.js +388 -0
  40. package/dist/common/src/app/backend/getAllFilesRecursively.js +22 -0
  41. package/dist/common/src/app/backend/main.js +804 -0
  42. package/dist/common/src/app/backend/makePrompt.js +73 -0
  43. package/dist/common/src/app/backend/utils.js +144 -0
  44. package/dist/common/src/app/frontend/App.js +206 -0
  45. package/dist/common/src/app/frontend/DevelopmentFileService.js +98 -0
  46. package/dist/common/src/app/frontend/GitFileService.js +262 -0
  47. package/dist/common/src/app/frontend/GitHubAuthService.js +184 -0
  48. package/dist/common/src/app/frontend/api.js +93 -0
  49. package/dist/common/src/app/frontend/components/DesignEditorPage.js +208 -0
  50. package/dist/common/src/app/frontend/components/SunriseAnimation.js +291 -0
  51. package/dist/common/src/app/frontend/components/SunriseAnimation.test/interface.js +68 -0
  52. package/dist/common/src/app/frontend/components/pure/AppFrame.js +177 -0
  53. package/dist/common/src/app/frontend/components/pure/GitHubLoginButton.js +18 -0
  54. package/dist/common/src/app/frontend/components/pure/GitIntegrationView.js +383 -0
  55. package/dist/common/src/app/frontend/components/pure/HelpoChatDrawer.js +179 -0
  56. package/dist/common/src/app/frontend/components/pure/MagicRobotModal.js +73 -0
  57. package/dist/common/src/app/frontend/components/pure/ModalContent.test/index.js +61 -0
  58. package/dist/common/src/app/frontend/components/pure/NavBar.js +45 -0
  59. package/dist/common/src/app/frontend/components/pure/ProcessDetails.js +49 -0
  60. package/dist/common/src/app/frontend/components/pure/ProcessInput.js +62 -0
  61. package/dist/common/src/app/frontend/components/pure/ProcessList.js +52 -0
  62. package/dist/common/src/app/frontend/components/pure/ProcessLogs.js +67 -0
  63. package/dist/common/src/app/frontend/components/pure/ProcessManager.js +113 -0
  64. package/dist/common/src/app/frontend/components/pure/ProcessManagerView.js +82 -0
  65. package/dist/common/src/app/frontend/components/pure/ProcessManagerViewTypes.js +2 -0
  66. package/dist/common/src/app/frontend/components/pure/ProcessSidebar.js +56 -0
  67. package/dist/common/src/app/frontend/components/pure/ProcessTerminal.js +62 -0
  68. package/dist/common/src/app/frontend/components/pure/ProjectPageView.js +69 -0
  69. package/dist/common/src/app/frontend/components/pure/ProjectPageView.test/implementation.js +185 -0
  70. package/dist/common/src/app/frontend/components/pure/Settings.js +122 -0
  71. package/dist/common/src/app/frontend/components/pure/Settings.test.js +30 -0
  72. package/dist/common/src/app/frontend/components/pure/SignIn.js +22 -0
  73. package/dist/common/src/app/frontend/components/pure/SingleProcessView.js +126 -0
  74. package/dist/common/src/app/frontend/components/pure/TerminalInput.js +76 -0
  75. package/dist/common/src/app/frontend/components/pure/TerminalLogs.js +80 -0
  76. package/dist/common/src/app/frontend/components/stateful/DratoPage.js +319 -0
  77. package/dist/common/src/app/frontend/components/stateful/FeaturesReporter.js +22 -0
  78. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.js +51 -0
  79. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.js +152 -0
  80. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.js +156 -0
  81. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.js +169 -0
  82. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.js +30 -0
  83. package/dist/common/src/app/frontend/components/stateful/GenericXMLEditorPage.js +306 -0
  84. package/dist/common/src/app/frontend/components/stateful/GitIntegrationPage.js +252 -0
  85. package/dist/common/src/app/frontend/components/stateful/GrafeoPage.js +437 -0
  86. package/dist/common/src/app/frontend/components/stateful/ProcessManagerPage.js +113 -0
  87. package/dist/common/src/app/frontend/components/stateful/ProjectPage.js +108 -0
  88. package/dist/common/src/app/frontend/components/stateful/ProjectsPage.js +136 -0
  89. package/dist/common/src/app/frontend/components/stateful/SVGEditor/CircleForm.js +24 -0
  90. package/dist/common/src/app/frontend/components/stateful/SVGEditor/GroupForm.js +22 -0
  91. package/dist/common/src/app/frontend/components/stateful/SVGEditor/RectForm.js +25 -0
  92. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.js +15 -0
  93. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.js +87 -0
  94. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.js +23 -0
  95. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.js +23 -0
  96. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGPreview.js +178 -0
  97. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.js +155 -0
  98. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTree.js +105 -0
  99. package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTypes.js +2 -0
  100. package/dist/common/src/app/frontend/components/stateful/SVGEditorPage.js +437 -0
  101. package/dist/common/src/app/frontend/components/stateful/SingleProcessPage.js +134 -0
  102. package/dist/common/src/app/frontend/components/stateful/SkriboPage.js +517 -0
  103. package/dist/common/src/app/frontend/fetchDataUtil.js +187 -0
  104. package/dist/common/src/app/frontend/flua/FluaPage.js +378 -0
  105. package/dist/common/src/app/frontend/testPage/ITestPageViewProps.js +2 -0
  106. package/dist/common/src/app/frontend/testPage/ProjectsTree.js +179 -0
  107. package/dist/common/src/app/frontend/testPage/TestPage.js +85 -0
  108. package/dist/common/src/app/frontend/testPage/TestPageLeftContent.js +48 -0
  109. package/dist/common/src/app/frontend/testPage/TestPageMainContent.js +82 -0
  110. package/dist/common/src/app/frontend/testPage/TestPageNavbar.js +33 -0
  111. package/dist/common/src/app/frontend/testPage/TestPageView.js +352 -0
  112. package/dist/common/src/app/frontend/testPage/TestPageView.test/implementation.js +158 -0
  113. package/dist/common/src/app/frontend/testPage/TestPageView.test/index.js +15 -0
  114. package/dist/common/src/app/frontend/testPage/TestPageView.test/specification.js +27 -0
  115. package/dist/common/src/app/frontend/testPage/TestPageView_utils.js +128 -0
  116. package/dist/common/src/app/frontend/useFileSystemSync.js +108 -0
  117. package/dist/common/src/app/frontend/useFs.js +15 -0
  118. package/dist/common/src/app/frontend/useGitMode.js +20 -0
  119. package/dist/common/src/app/frontend/useTerminalWebSocket.js +44 -0
  120. package/dist/common/src/app/frontend/useWebSocket.js +16 -0
  121. package/dist/common/src/app/types.js +2 -0
  122. package/dist/common/src/builders/golang.js +30 -0
  123. package/dist/common/src/builders/node.js +35 -0
  124. package/dist/common/src/builders/python.js +28 -0
  125. package/dist/common/src/builders/web.js +35 -0
  126. package/dist/common/src/esbuildConfigs/node.js +3 -1
  127. package/dist/common/src/lib/BaseGiven.js +95 -18
  128. package/dist/common/src/lib/BaseSuite.js +55 -8
  129. package/dist/common/src/lib/BaseSuite.test/test.js +58 -103
  130. package/dist/common/src/lib/BaseThen.js +28 -29
  131. package/dist/common/src/lib/BaseWhen.js +7 -5
  132. package/dist/common/src/lib/Tiposkripto.js +26 -11
  133. package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +35 -45
  134. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +15 -13
  135. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +8 -5
  136. package/dist/common/src/lib/pmProxy.js +0 -33
  137. package/dist/common/src/lib/pmProxy.test/implementation.js +83 -90
  138. package/dist/common/src/lib/pmProxy.test/index.js +1 -3
  139. package/dist/common/src/lib/pmProxy.test/mockPM.js +1 -0
  140. package/dist/common/src/lib/pmProxy.test/specification.js +0 -1
  141. package/dist/common/src/mothership/index.js +164 -2
  142. package/dist/common/src/mothership/test.js +4 -2
  143. package/dist/common/src/testeranto.js +96 -97
  144. package/dist/common/src/utils/generateGolingvuMetafile.js +157 -0
  145. package/dist/common/src/utils/golingvuMetafile/fileDiscovery.js +142 -0
  146. package/dist/common/src/utils/golingvuMetafile/goList.js +103 -0
  147. package/dist/common/src/utils/golingvuMetafile/helpers.js +68 -0
  148. package/dist/common/src/utils/golingvuMetafile/importParser.js +89 -0
  149. package/dist/common/src/utils/golingvuMetafile/types.js +3 -0
  150. package/dist/common/src/utils/golingvuMetafile.js +7 -114
  151. package/dist/common/src/utils/golingvuWatcher.js +233 -0
  152. package/dist/common/src/utils/logFiles.js +9 -1
  153. package/dist/common/src/utils/pitonoMetafile.js +222 -42
  154. package/dist/common/src/utils/pitonoWatcher.js +130 -0
  155. package/dist/common/src/utils/writeGolingvuMetafile.js +324 -0
  156. package/dist/common/testeranto.config.js +28 -39
  157. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  158. package/dist/module/example/Calculator.js +101 -0
  159. package/dist/module/example/Calculator.test.adapter.js +36 -0
  160. package/dist/module/example/Calculator.test.implementation.js +47 -0
  161. package/dist/module/example/Calculator.test.js +6 -0
  162. package/dist/module/example/Calculator.test.specification.js +88 -0
  163. package/dist/module/example/Calculator.test.types.js +2 -0
  164. package/dist/module/scripts/build-example.js +100 -0
  165. package/dist/module/src/Helpo.js +48 -0
  166. package/dist/module/src/Init.js +9 -1
  167. package/dist/module/src/Node.js +0 -1
  168. package/dist/module/src/PM/golingvuBuild.js +42 -0
  169. package/dist/module/src/PM/pitonoBuild.js +42 -0
  170. package/dist/module/src/PM/utils.js +8 -1
  171. package/dist/module/src/PM/web.js +4 -8
  172. package/dist/module/src/Pure.js +0 -14
  173. package/dist/module/src/Pure.test.js +1 -6
  174. package/dist/module/src/Web.js +1 -35
  175. package/dist/module/src/WebSidecar.js +0 -1
  176. package/dist/module/src/app/FileService.js +21 -0
  177. package/dist/module/src/app/api.js +70 -0
  178. package/dist/module/src/app/backend/PM_0.js +310 -0
  179. package/dist/module/src/app/backend/PM_1_WithProcesses.js +882 -0
  180. package/dist/module/src/app/backend/PM_2_WithTCP.js +237 -0
  181. package/dist/module/src/app/backend/PM_WithBuild.js +113 -0
  182. package/dist/module/src/app/backend/PM_WithEslintAndTsc.js +126 -0
  183. package/dist/module/src/app/backend/PM_WithGit.js +546 -0
  184. package/dist/module/src/app/backend/PM_WithHelpo.js +250 -0
  185. package/dist/module/src/app/backend/PM_WithProcesses.js +1083 -0
  186. package/dist/module/src/app/backend/PM_WithTCP.js +381 -0
  187. package/dist/module/src/app/backend/getAllFilesRecursively.js +16 -0
  188. package/dist/module/src/app/backend/main.js +764 -0
  189. package/dist/module/src/app/backend/makePrompt.js +66 -0
  190. package/dist/module/src/app/backend/utils.js +131 -0
  191. package/dist/module/src/app/frontend/App.js +164 -0
  192. package/dist/module/src/app/frontend/DevelopmentFileService.js +91 -0
  193. package/dist/module/src/app/frontend/GitFileService.js +258 -0
  194. package/dist/module/src/app/frontend/GitHubAuthService.js +180 -0
  195. package/dist/module/src/app/frontend/api.js +87 -0
  196. package/dist/module/src/app/frontend/components/DesignEditorPage.js +171 -0
  197. package/dist/module/src/app/frontend/components/SunriseAnimation.js +256 -0
  198. package/dist/module/src/app/frontend/components/SunriseAnimation.test/interface.js +32 -0
  199. package/dist/module/src/app/frontend/components/pure/AppFrame.js +140 -0
  200. package/dist/module/src/app/frontend/components/pure/GitHubLoginButton.js +11 -0
  201. package/dist/module/src/app/frontend/components/pure/GitIntegrationView.js +346 -0
  202. package/dist/module/src/app/frontend/components/pure/HelpoChatDrawer.js +142 -0
  203. package/dist/module/src/app/frontend/components/pure/MagicRobotModal.js +66 -0
  204. package/dist/module/src/app/frontend/components/pure/ModalContent.test/index.js +56 -0
  205. package/dist/module/src/app/frontend/components/pure/NavBar.js +38 -0
  206. package/dist/module/src/app/frontend/components/pure/ProcessDetails.js +42 -0
  207. package/dist/module/src/app/frontend/components/pure/ProcessInput.js +25 -0
  208. package/dist/module/src/app/frontend/components/pure/ProcessList.js +45 -0
  209. package/dist/module/src/app/frontend/components/pure/ProcessLogs.js +30 -0
  210. package/dist/module/src/app/frontend/components/pure/ProcessManager.js +76 -0
  211. package/dist/module/src/app/frontend/components/pure/ProcessManagerView.js +45 -0
  212. package/dist/module/src/app/frontend/components/pure/ProcessSidebar.js +49 -0
  213. package/dist/module/src/app/frontend/components/pure/ProcessTerminal.js +25 -0
  214. package/dist/module/src/app/frontend/components/pure/ProjectPageView.js +62 -0
  215. package/dist/module/src/app/frontend/components/pure/ProjectPageView.test/implementation.js +182 -0
  216. package/dist/module/src/app/frontend/components/pure/Settings.js +85 -0
  217. package/dist/module/src/app/frontend/components/pure/Settings.test.js +30 -0
  218. package/dist/module/src/app/frontend/components/pure/SignIn.js +15 -0
  219. package/dist/module/src/app/frontend/components/pure/SingleProcessView.js +126 -0
  220. package/dist/module/src/app/frontend/components/pure/TerminalInput.js +39 -0
  221. package/dist/module/src/app/frontend/components/pure/TerminalLogs.js +43 -0
  222. package/dist/module/src/app/frontend/components/stateful/DratoPage.js +282 -0
  223. package/dist/module/src/app/frontend/components/stateful/FeaturesReporter.js +22 -0
  224. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.js +44 -0
  225. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.js +115 -0
  226. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.js +119 -0
  227. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.js +132 -0
  228. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.js +23 -0
  229. package/dist/module/src/app/frontend/components/stateful/GenericXMLEditorPage.js +269 -0
  230. package/dist/module/src/app/frontend/components/stateful/GitIntegrationPage.js +215 -0
  231. package/dist/module/src/app/frontend/components/stateful/GrafeoPage.js +400 -0
  232. package/dist/module/src/app/frontend/components/stateful/ProcessManagerPage.js +76 -0
  233. package/dist/module/src/app/frontend/components/stateful/ProjectPage.js +71 -0
  234. package/dist/module/src/app/frontend/components/stateful/ProjectsPage.js +99 -0
  235. package/dist/module/src/app/frontend/components/stateful/SVGEditor/CircleForm.js +17 -0
  236. package/dist/module/src/app/frontend/components/stateful/SVGEditor/GroupForm.js +15 -0
  237. package/dist/module/src/app/frontend/components/stateful/SVGEditor/RectForm.js +18 -0
  238. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.js +8 -0
  239. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.js +50 -0
  240. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.js +16 -0
  241. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.js +16 -0
  242. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGPreview.js +141 -0
  243. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.js +118 -0
  244. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTree.js +68 -0
  245. package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTypes.js +1 -0
  246. package/dist/module/src/app/frontend/components/stateful/SVGEditorPage.js +400 -0
  247. package/dist/module/src/app/frontend/components/stateful/SingleProcessPage.js +134 -0
  248. package/dist/module/src/app/frontend/components/stateful/SkriboPage.js +510 -0
  249. package/dist/module/src/app/frontend/fetchDataUtil.js +187 -0
  250. package/dist/module/src/app/frontend/flua/FluaPage.js +341 -0
  251. package/dist/module/src/app/frontend/testPage/ITestPageViewProps.js +1 -0
  252. package/dist/module/src/app/frontend/testPage/ProjectsTree.js +142 -0
  253. package/dist/module/src/app/frontend/testPage/TestPage.js +48 -0
  254. package/dist/module/src/app/frontend/testPage/TestPageLeftContent.js +11 -0
  255. package/dist/module/src/app/frontend/testPage/TestPageMainContent.js +75 -0
  256. package/dist/module/src/app/frontend/testPage/TestPageNavbar.js +26 -0
  257. package/dist/module/src/app/frontend/testPage/TestPageView.js +315 -0
  258. package/dist/module/src/app/frontend/testPage/TestPageView.test/implementation.js +122 -0
  259. package/dist/module/src/app/frontend/testPage/TestPageView.test/index.js +10 -0
  260. package/dist/module/src/app/frontend/testPage/TestPageView.test/specification.js +23 -0
  261. package/dist/module/src/app/frontend/testPage/TestPageView_utils.js +120 -0
  262. package/dist/module/src/app/frontend/useFileSystemSync.js +108 -0
  263. package/dist/module/src/app/frontend/useFs.js +11 -0
  264. package/dist/module/src/app/frontend/useGitMode.js +16 -0
  265. package/dist/module/src/app/frontend/useTerminalWebSocket.js +40 -0
  266. package/dist/module/src/app/frontend/useWebSocket.js +12 -0
  267. package/dist/module/src/app/types.js +1 -0
  268. package/dist/module/src/builders/golang.js +28 -0
  269. package/dist/module/src/builders/node.js +33 -0
  270. package/dist/module/src/builders/python.js +26 -0
  271. package/dist/module/src/builders/web.js +33 -0
  272. package/dist/module/src/esbuildConfigs/node.js +3 -1
  273. package/dist/module/src/lib/BaseGiven.js +95 -18
  274. package/dist/module/src/lib/BaseSuite.js +55 -8
  275. package/dist/module/src/lib/BaseSuite.test/test.js +58 -103
  276. package/dist/module/src/lib/BaseThen.js +28 -29
  277. package/dist/module/src/lib/BaseWhen.js +7 -5
  278. package/dist/module/src/lib/Tiposkripto.js +26 -11
  279. package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +35 -45
  280. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +15 -13
  281. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +8 -5
  282. package/dist/module/src/lib/pmProxy.js +0 -33
  283. package/dist/module/src/lib/pmProxy.test/implementation.js +83 -90
  284. package/dist/module/src/lib/pmProxy.test/index.js +1 -3
  285. package/dist/module/src/lib/pmProxy.test/mockPM.js +1 -0
  286. package/dist/module/src/lib/pmProxy.test/specification.js +0 -1
  287. package/dist/module/src/mothership/index.js +164 -2
  288. package/dist/module/src/mothership/test.js +4 -2
  289. package/dist/module/src/testeranto.js +94 -95
  290. package/dist/module/src/utils/generateGolingvuMetafile.js +151 -0
  291. package/dist/module/src/utils/golingvuMetafile/fileDiscovery.js +136 -0
  292. package/dist/module/src/utils/golingvuMetafile/goList.js +97 -0
  293. package/dist/module/src/utils/golingvuMetafile/helpers.js +59 -0
  294. package/dist/module/src/utils/golingvuMetafile/importParser.js +83 -0
  295. package/dist/module/src/utils/golingvuMetafile/types.js +2 -0
  296. package/dist/module/src/utils/golingvuMetafile.js +6 -109
  297. package/dist/module/src/utils/golingvuWatcher.js +226 -0
  298. package/dist/module/src/utils/logFiles.js +9 -1
  299. package/dist/module/src/utils/pitonoMetafile.js +224 -44
  300. package/dist/module/src/utils/pitonoWatcher.js +123 -0
  301. package/dist/module/src/utils/writeGolingvuMetafile.js +318 -0
  302. package/dist/module/testeranto.config.js +28 -39
  303. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  304. package/dist/prebuild/App.css +251 -173
  305. package/dist/prebuild/App.js +20096 -43669
  306. package/dist/prebuild/init-docs.mjs +9 -1
  307. package/dist/prebuild/testeranto.mjs +3635 -2389
  308. package/dist/types/src/Helpo.d.ts +1 -0
  309. package/dist/types/src/PM/golingvuBuild.d.ts +11 -0
  310. package/dist/types/src/PM/pitonoBuild.d.ts +11 -0
  311. package/dist/types/src/PM/web.d.ts +4 -4
  312. package/dist/types/src/Pure.d.ts +1 -1
  313. package/dist/types/src/Pure.test.d.ts +60 -1
  314. package/dist/types/src/Types.d.ts +1 -0
  315. package/dist/types/src/Web.d.ts +1 -1
  316. package/dist/types/src/app/FileService.d.ts +37 -0
  317. package/dist/types/src/app/api.d.ts +37 -0
  318. package/dist/types/src/app/backend/PM_0.d.ts +38 -0
  319. package/dist/types/src/app/backend/PM_1_WithProcesses.d.ts +149 -0
  320. package/dist/types/src/app/backend/PM_2_WithTCP.d.ts +29 -0
  321. package/dist/types/src/app/backend/PM_WithBuild.d.ts +8 -0
  322. package/dist/types/src/app/backend/PM_WithEslintAndTsc.d.ts +22 -0
  323. package/dist/types/src/app/backend/PM_WithGit.d.ts +24 -0
  324. package/dist/types/src/app/backend/PM_WithHelpo.d.ts +43 -0
  325. package/dist/types/src/app/backend/PM_WithTCP.d.ts +41 -0
  326. package/dist/types/src/app/backend/getAllFilesRecursively.d.ts +1 -0
  327. package/dist/types/src/app/backend/main.d.ts +15 -0
  328. package/dist/types/src/app/backend/makePrompt.d.ts +2 -0
  329. package/dist/types/src/app/backend/utils.d.ts +20 -0
  330. package/dist/types/src/app/frontend/App.d.ts +14 -0
  331. package/dist/types/src/app/frontend/DevelopmentFileService.d.ts +25 -0
  332. package/dist/types/src/app/frontend/GitFileService.d.ts +27 -0
  333. package/dist/types/src/app/frontend/api.d.ts +10 -0
  334. package/dist/types/src/app/frontend/components/SunriseAnimation.test/interface.d.ts +11 -0
  335. package/dist/types/src/app/frontend/components/SunriseAnimation.test/types.d.ts +39 -0
  336. package/dist/types/src/app/frontend/components/pure/AppFrame.d.ts +11 -0
  337. package/dist/types/src/app/frontend/components/pure/AppFrame.test/index.d.ts +3 -0
  338. package/dist/types/src/app/frontend/components/pure/FeaturesReporterView.d.ts +7 -0
  339. package/dist/types/src/app/frontend/components/pure/FeaturesReporterView.test/index.d.ts +2 -0
  340. package/dist/types/src/app/frontend/components/pure/GitIntegrationView.d.ts +27 -0
  341. package/dist/types/src/app/frontend/components/pure/HelpoChatDrawer.d.ts +7 -0
  342. package/dist/types/src/app/frontend/components/pure/MagicRobotModal.d.ts +16 -0
  343. package/dist/types/src/app/frontend/components/pure/ModalContent.test/index.d.ts +14 -0
  344. package/dist/types/src/app/frontend/components/pure/ProcessDetails.d.ts +8 -0
  345. package/dist/types/src/app/frontend/components/pure/ProcessInput.d.ts +10 -0
  346. package/dist/types/src/app/frontend/components/pure/ProcessList.d.ts +10 -0
  347. package/dist/types/src/app/frontend/components/pure/ProcessLogs.d.ts +6 -0
  348. package/dist/types/src/app/frontend/components/pure/ProcessManagerView.d.ts +10 -0
  349. package/dist/types/src/app/frontend/components/pure/ProcessManagerViewTypes.d.ts +10 -0
  350. package/dist/types/src/app/frontend/components/pure/ProcessSidebar.d.ts +8 -0
  351. package/dist/types/src/app/frontend/components/pure/ProcessTerminal.d.ts +8 -0
  352. package/dist/types/src/app/frontend/components/pure/ProjectPageView.d.ts +14 -0
  353. package/dist/types/src/app/frontend/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
  354. package/dist/types/src/app/frontend/components/pure/ProjectPageView.test/index.d.ts +17 -0
  355. package/dist/types/src/app/frontend/components/pure/TerminalInput.d.ts +6 -0
  356. package/dist/types/src/app/frontend/components/pure/TerminalLogs.d.ts +6 -0
  357. package/dist/types/src/app/frontend/components/stateful/DratoPage.d.ts +8 -0
  358. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.d.ts +9 -0
  359. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.d.ts +12 -0
  360. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.d.ts +11 -0
  361. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.d.ts +8 -0
  362. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.d.ts +17 -0
  363. package/dist/types/src/app/frontend/components/stateful/GenericXMLEditorPage.d.ts +21 -0
  364. package/dist/types/src/app/frontend/components/stateful/GrafeoPage.d.ts +8 -0
  365. package/dist/types/src/app/frontend/components/stateful/SVGEditor/CircleForm.d.ts +8 -0
  366. package/dist/types/src/app/frontend/components/stateful/SVGEditor/GroupForm.d.ts +8 -0
  367. package/dist/types/src/app/frontend/components/stateful/SVGEditor/RectForm.d.ts +8 -0
  368. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.d.ts +9 -0
  369. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.d.ts +9 -0
  370. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.d.ts +9 -0
  371. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.d.ts +9 -0
  372. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGPreview.d.ts +12 -0
  373. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.d.ts +8 -0
  374. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTree.d.ts +20 -0
  375. package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTypes.d.ts +30 -0
  376. package/dist/types/src/app/frontend/components/stateful/SVGEditorPage.d.ts +7 -0
  377. package/dist/types/src/app/frontend/components/stateful/SkriboPage.d.ts +1 -0
  378. package/dist/types/src/app/frontend/flua/FluaPage.d.ts +2 -0
  379. package/dist/types/src/app/frontend/testPage/ITestPageViewProps.d.ts +14 -0
  380. package/dist/types/src/app/frontend/testPage/ProjectsTree.d.ts +17 -0
  381. package/dist/types/src/app/frontend/testPage/TestPageLeftContent.d.ts +14 -0
  382. package/dist/types/src/app/frontend/testPage/TestPageMainContent.d.ts +7 -0
  383. package/dist/types/src/app/frontend/testPage/TestPageNavbar.d.ts +7 -0
  384. package/dist/types/src/app/frontend/testPage/TestPageView.d.ts +2 -0
  385. package/dist/types/src/app/frontend/testPage/TestPageView.test/implementation.d.ts +13 -0
  386. package/dist/types/src/app/frontend/testPage/TestPageView.test/index.d.ts +13 -0
  387. package/dist/types/src/app/frontend/testPage/TestPageView.test/specification.d.ts +11 -0
  388. package/dist/types/src/app/frontend/testPage/TestPageView.test/types.d.ts +65 -0
  389. package/dist/types/src/app/frontend/testPage/TestPageView_utils.d.ts +23 -0
  390. package/dist/types/src/app/frontend/useFs.d.ts +2 -0
  391. package/dist/types/src/app/frontend/useTerminalWebSocket.d.ts +4 -0
  392. package/dist/types/src/app/frontend/useWebSocket.d.ts +8 -0
  393. package/dist/types/src/app/types.d.ts +1 -0
  394. package/dist/types/src/builders/golang.d.ts +1 -0
  395. package/dist/types/src/builders/node.d.ts +1 -0
  396. package/dist/types/src/builders/python.d.ts +1 -0
  397. package/dist/types/src/builders/web.d.ts +1 -0
  398. package/dist/types/src/lib/BaseGiven.d.ts +3 -3
  399. package/dist/types/src/lib/BaseSuite.d.ts +4 -3
  400. package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +2 -1
  401. package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +2 -1
  402. package/dist/types/src/lib/BaseThen.d.ts +2 -0
  403. package/dist/types/src/lib/BaseWhen.d.ts +2 -0
  404. package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +1 -1
  405. package/dist/types/src/utils/generateGolingvuMetafile.d.ts +2 -0
  406. package/dist/types/src/utils/golingvuMetafile/fileDiscovery.d.ts +1 -0
  407. package/dist/types/src/utils/golingvuMetafile/goList.d.ts +2 -0
  408. package/dist/types/src/utils/golingvuMetafile/helpers.d.ts +7 -0
  409. package/dist/types/src/utils/golingvuMetafile/importParser.d.ts +5 -0
  410. package/dist/types/src/utils/golingvuMetafile/types.d.ts +66 -0
  411. package/dist/types/src/utils/golingvuMetafile.d.ts +4 -19
  412. package/dist/types/src/utils/golingvuWatcher.d.ts +14 -0
  413. package/dist/types/src/utils/logFiles.d.ts +29 -1
  414. package/dist/types/src/utils/pitonoMetafile.d.ts +18 -3
  415. package/dist/types/src/utils/pitonoWatcher.d.ts +13 -0
  416. package/dist/types/src/utils/writeGolingvuMetafile.d.ts +2 -0
  417. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  418. package/docker-compose.yml +74 -0
  419. package/docs/testing.prompt.txt +5 -1
  420. package/example/Calculator.go +99 -0
  421. package/example/Calculator.golingvu.adapter.go +81 -0
  422. package/example/Calculator.golingvu.implementation.go +144 -0
  423. package/example/Calculator.golingvu.specification.go +68 -0
  424. package/example/Calculator.golingvu.test.go +216 -0
  425. package/example/Calculator.pitono.adapter.py +68 -0
  426. package/example/Calculator.pitono.implementation.py +30 -0
  427. package/example/Calculator.pitono.specification.py +154 -0
  428. package/example/Calculator.pitono.test.py +132 -0
  429. package/example/Calculator.py +93 -0
  430. package/example/Calculator.test.adapter.ts +46 -0
  431. package/example/Calculator.test.implementation.ts +55 -0
  432. package/example/Calculator.test.specification.ts +213 -0
  433. package/example/Calculator.test.ts +13 -0
  434. package/example/Calculator.test.types.ts +50 -0
  435. package/example/Calculator.ts +114 -0
  436. package/example/README.md +1 -0
  437. package/example/__pycache__/Calculator.cpython-313.pyc +0 -0
  438. package/example/go.mod +7 -0
  439. package/example/go.sum +2 -0
  440. package/example/requirements.txt +9 -0
  441. package/example/single-kanban-process.xml +9 -0
  442. package/example/test_example.py +143 -74
  443. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/LICENSE +21 -0
  444. package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/golingvu.go +398 -63
  445. package/example/vendor/modules.txt +1 -2
  446. package/go.mod +6 -1
  447. package/go.sum +2 -0
  448. package/golingvu.tmp.txt +68 -0
  449. package/log.txt +39 -0
  450. package/package.json +61 -44
  451. package/scripts/build-example.ts +106 -0
  452. package/src/Helpo.tsx +89 -0
  453. package/src/Init.ts +9 -1
  454. package/src/Node.ts +0 -1
  455. package/src/NodeSidecar.ts +0 -8
  456. package/src/PM/__tests__/nodeSidecar.testeranto.ts +4 -1
  457. package/src/PM/golingvuBuild.ts +56 -0
  458. package/src/PM/pitonoBuild.ts +56 -0
  459. package/src/PM/types.ts +1 -0
  460. package/src/PM/utils.ts +7 -1
  461. package/src/PM/web.ts +8 -24
  462. package/src/Pure.test.ts +18 -9
  463. package/src/Pure.ts +1 -16
  464. package/src/Types.ts +1 -0
  465. package/src/Web.ts +2 -38
  466. package/src/WebSidecar.ts +1 -1
  467. package/src/app/FileService.ts +91 -0
  468. package/src/app/api.ts +75 -0
  469. package/src/app/backend/PM_0.ts +392 -0
  470. package/src/app/backend/PM_1_WithProcesses.ts +1186 -0
  471. package/src/app/backend/PM_2_WithTCP.ts +283 -0
  472. package/src/app/backend/PM_WithBuild.ts +148 -0
  473. package/src/app/backend/PM_WithEslintAndTsc.ts +194 -0
  474. package/src/app/backend/PM_WithGit.ts +662 -0
  475. package/src/app/backend/PM_WithHelpo.ts +340 -0
  476. package/src/app/backend/PM_WithProcesses.ts +1247 -0
  477. package/src/app/backend/PM_WithTCP.ts +777 -0
  478. package/src/app/backend/getAllFilesRecursively.ts +17 -0
  479. package/src/app/backend/main.ts +1011 -0
  480. package/src/app/backend/makePrompt.ts +92 -0
  481. package/src/app/backend/utils.ts +202 -0
  482. package/src/app/frontend/App.tsx +242 -0
  483. package/src/app/frontend/DevelopmentFileService.ts +117 -0
  484. package/src/app/frontend/GitFileService.ts +285 -0
  485. package/src/app/frontend/GitHubAuthService.ts +241 -0
  486. package/src/app/frontend/api.ts +108 -0
  487. package/src/app/frontend/app.scss +119 -0
  488. package/src/app/frontend/components/DesignEditorPage.tsx +210 -0
  489. package/src/app/frontend/components/SunriseAnimation.test/interface.ts +50 -0
  490. package/src/app/frontend/components/SunriseAnimation.test/types.ts +53 -0
  491. package/src/app/frontend/components/SunriseAnimation.tsx +350 -0
  492. package/src/app/frontend/components/pure/AppFrame.tsx +445 -0
  493. package/src/app/frontend/components/pure/FeaturesReporterView.tsx +38 -0
  494. package/src/app/frontend/components/pure/GitHubLoginButton.tsx +32 -0
  495. package/src/app/frontend/components/pure/GitIntegrationView.tsx +727 -0
  496. package/src/app/frontend/components/pure/HelpoChatDrawer.tsx +223 -0
  497. package/src/app/frontend/components/pure/MagicRobotModal.tsx +135 -0
  498. package/src/app/frontend/components/pure/ModalContent.test/index.tsx +68 -0
  499. package/src/app/frontend/components/pure/NavBar.tsx +119 -0
  500. package/src/app/frontend/components/pure/ProcessDetails.tsx +99 -0
  501. package/src/app/frontend/components/pure/ProcessInput.tsx +67 -0
  502. package/src/app/frontend/components/pure/ProcessList.tsx +89 -0
  503. package/src/app/frontend/components/pure/ProcessLogs.tsx +54 -0
  504. package/src/app/frontend/components/pure/ProcessManager.tsx +109 -0
  505. package/src/app/frontend/components/pure/ProcessManagerView.tsx +89 -0
  506. package/src/app/frontend/components/pure/ProcessManagerViewTypes.ts +10 -0
  507. package/src/app/frontend/components/pure/ProcessSidebar.tsx +88 -0
  508. package/src/app/frontend/components/pure/ProcessTerminal.tsx +55 -0
  509. package/src/app/frontend/components/pure/ProjectPageView.test/implementation.tsx +216 -0
  510. package/src/app/frontend/components/pure/ProjectPageView.tsx +165 -0
  511. package/src/app/frontend/components/pure/Settings.test.tsx +34 -0
  512. package/src/app/frontend/components/pure/Settings.tsx +171 -0
  513. package/src/app/frontend/components/pure/SignIn.tsx +33 -0
  514. package/src/app/frontend/components/pure/SingleProcessView.tsx +140 -0
  515. package/src/app/frontend/components/pure/TerminalInput.tsx +73 -0
  516. package/src/app/frontend/components/pure/TerminalLogs.tsx +80 -0
  517. package/src/app/frontend/components/stateful/DratoPage.tsx +457 -0
  518. package/src/app/frontend/components/stateful/FeaturesReporter.tsx +27 -0
  519. package/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.tsx +105 -0
  520. package/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.tsx +174 -0
  521. package/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.tsx +234 -0
  522. package/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.tsx +173 -0
  523. package/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.tsx +105 -0
  524. package/src/app/frontend/components/stateful/GenericXMLEditorPage.tsx +455 -0
  525. package/src/app/frontend/components/stateful/GitIntegrationPage.tsx +256 -0
  526. package/src/app/frontend/components/stateful/GrafeoPage.tsx +563 -0
  527. package/src/app/frontend/components/stateful/ProcessManagerPage.tsx +110 -0
  528. package/src/app/frontend/components/stateful/ProjectPage.tsx +94 -0
  529. package/src/app/frontend/components/stateful/ProjectsPage.tsx +129 -0
  530. package/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.tsx +91 -0
  531. package/src/app/frontend/components/stateful/SVGEditor/SVGPreview.tsx +227 -0
  532. package/src/app/frontend/components/stateful/SVGEditorPage.tsx +517 -0
  533. package/src/app/frontend/components/stateful/SingleProcessPage.tsx +144 -0
  534. package/src/app/frontend/components/stateful/SkriboPage.tsx +577 -0
  535. package/src/app/frontend/fetchDataUtil.ts +206 -0
  536. package/src/app/frontend/flua/FluaPage.tsx +458 -0
  537. package/src/app/frontend/flua/agile.xsd +32 -0
  538. package/src/app/frontend/flua/core.xsd +42 -0
  539. package/src/app/frontend/flua/kanban.xsd +21 -0
  540. package/src/app/frontend/flua/scrum.xsd +35 -0
  541. package/src/app/frontend/testPage/ITestPageViewProps.ts +14 -0
  542. package/src/app/frontend/testPage/ProjectsTree.tsx +329 -0
  543. package/src/app/frontend/testPage/TestPage.tsx +75 -0
  544. package/src/app/frontend/testPage/TestPageLeftContent.tsx +54 -0
  545. package/src/app/frontend/testPage/TestPageMainContent.tsx +181 -0
  546. package/src/app/frontend/testPage/TestPageNavbar.tsx +52 -0
  547. package/src/app/frontend/testPage/TestPageView.test/implementation.ts +209 -0
  548. package/src/app/frontend/testPage/TestPageView.test/index.tsx +22 -0
  549. package/src/app/frontend/testPage/TestPageView.test/specification.ts +60 -0
  550. package/src/app/frontend/testPage/TestPageView.test/types.ts +92 -0
  551. package/src/app/frontend/testPage/TestPageView.tsx +481 -0
  552. package/src/app/frontend/testPage/TestPageView_utils.tsx +301 -0
  553. package/src/app/frontend/testPage/index.md +14 -0
  554. package/src/app/frontend/useFileSystemSync.ts +117 -0
  555. package/src/app/frontend/useFs.ts +16 -0
  556. package/src/app/frontend/useGitMode.ts +21 -0
  557. package/src/app/frontend/useTerminalWebSocket.ts +56 -0
  558. package/src/app/frontend/useWebSocket.ts +20 -0
  559. package/src/app/trash +1697 -0
  560. package/src/app/types.ts +1 -0
  561. package/src/builders/golang.ts +29 -0
  562. package/src/builders/node.ts +34 -0
  563. package/src/builders/python.ts +28 -0
  564. package/src/builders/web.ts +34 -0
  565. package/src/cjs-shim.js +2 -0
  566. package/src/esbuildConfigs/node.ts +1 -1
  567. package/src/golingvu/PM/golang_test.go +103 -0
  568. package/src/golingvu/README.md +186 -2
  569. package/src/golingvu/base_given.go +110 -24
  570. package/src/golingvu/base_suite.go +54 -8
  571. package/src/golingvu/base_then.go +2 -2
  572. package/src/golingvu/base_when.go +2 -2
  573. package/src/golingvu/go.mod +6 -0
  574. package/src/golingvu/golingvu.go +683 -32
  575. package/src/golingvu/types.go +0 -14
  576. package/src/graphml.xsd +345 -0
  577. package/src/helpo/directives.md +5 -0
  578. package/src/helpo/prompt.txt +38 -0
  579. package/src/lib/BaseGiven.ts +106 -32
  580. package/src/lib/BaseSuite.test/test.ts +92 -180
  581. package/src/lib/BaseSuite.ts +60 -10
  582. package/src/lib/BaseThen.ts +36 -37
  583. package/src/lib/BaseWhen.ts +12 -13
  584. package/src/lib/Tiposkripto.test/MockTiposkripto.ts +59 -63
  585. package/src/lib/Tiposkripto.test/Tiposkripto.implementation.ts +33 -20
  586. package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +9 -8
  587. package/src/lib/Tiposkripto.ts +27 -15
  588. package/src/lib/pmProxy.test/implementation.ts +112 -117
  589. package/src/lib/pmProxy.test/index.ts +2 -2
  590. package/src/lib/pmProxy.test/mockPM.ts +1 -0
  591. package/src/lib/pmProxy.test/mockPMBase.ts +1 -1
  592. package/src/lib/pmProxy.test/specification.ts +0 -2
  593. package/src/lib/pmProxy.test/types.ts +1 -0
  594. package/src/lib/pmProxy.ts +0 -37
  595. package/src/mothership/index.ts +197 -2
  596. package/src/mothership/test.ts +5 -5
  597. package/src/pitono/PM/__pycache__/python.cpython-313.pyc +0 -0
  598. package/src/pitono/PM/python.py +168 -0
  599. package/src/pitono/Pitono.py +444 -0
  600. package/src/pitono/PitonoTest.py +25 -0
  601. package/src/pitono/README.md +21 -0
  602. package/src/pitono/__init__.py +6 -0
  603. package/src/pitono/__pycache__/Pitono.cpython-313.pyc +0 -0
  604. package/src/pitono/__pycache__/__init__.cpython-313.pyc +0 -0
  605. package/src/pitono/__pycache__/base_given.cpython-313.pyc +0 -0
  606. package/src/pitono/__pycache__/base_suite.cpython-313.pyc +0 -0
  607. package/src/pitono/__pycache__/base_then.cpython-313.pyc +0 -0
  608. package/src/pitono/__pycache__/base_when.cpython-313.pyc +0 -0
  609. package/src/pitono/__pycache__/core_generator.cpython-313.pyc +0 -0
  610. package/src/pitono/__pycache__/simple_adapter.cpython-313.pyc +0 -0
  611. package/src/pitono/__pycache__/types.cpython-313.pyc +0 -0
  612. package/src/pitono/base_given.py +178 -0
  613. package/src/pitono/base_suite.py +149 -0
  614. package/src/pitono/base_then.py +65 -0
  615. package/src/pitono/base_when.py +67 -0
  616. package/src/pitono/pitono.egg-info/PKG-INFO +42 -0
  617. package/src/pitono/pitono.egg-info/SOURCES.txt +8 -0
  618. package/src/pitono/types.py +87 -0
  619. package/src/style.scss +261 -2
  620. package/src/testeranto.ts +120 -153
  621. package/src/utils/generateGolingvuMetafile.ts +196 -0
  622. package/src/utils/golingvuMetafile/fileDiscovery.ts +157 -0
  623. package/src/utils/golingvuMetafile/goList.ts +106 -0
  624. package/src/utils/golingvuMetafile/helpers.ts +65 -0
  625. package/src/utils/golingvuMetafile/importParser.ts +97 -0
  626. package/src/utils/golingvuMetafile/types.ts +78 -0
  627. package/src/utils/golingvuMetafile.ts +6 -163
  628. package/src/utils/golingvuWatcher.ts +280 -0
  629. package/src/utils/logFiles.ts +10 -2
  630. package/src/utils/pitonoMetafile.ts +328 -58
  631. package/src/utils/pitonoWatcher.ts +150 -0
  632. package/src/utils/writeGolingvuMetafile.ts +386 -0
  633. package/testeranto/App.css +251 -173
  634. package/testeranto/App.js +20080 -43664
  635. package/testeranto/bundles/golang/core/example/Calculator.golingvu.test +58 -0
  636. package/testeranto/bundles/node/core/example/Calculator.test.mjs +5481 -122
  637. package/testeranto/bundles/python/core/Calculator.pitono.test.py +1 -1
  638. package/testeranto/helpo_chat_history.json +1 -0
  639. package/testeranto/metafiles/golang/core.json +144 -49
  640. package/testeranto/metafiles/node/core.json +92 -583
  641. package/testeranto/metafiles/python/core.json +50 -9
  642. package/testeranto/reports/core/config.json +5 -61
  643. package/testeranto/reports/core/example/Calculator.golingvu.test/golang/exit.log +1 -0
  644. package/testeranto/reports/core/example/Calculator.golingvu.test/golang/stderr.log +7 -0
  645. package/testeranto/reports/core/example/Calculator.pitono.test/python/message.txt +16 -0
  646. package/testeranto/reports/core/example/Calculator.pitono.test/python/prompt.txt +13 -0
  647. package/testeranto/reports/core/example/Calculator.pitono.test/python/stdout.log +26 -0
  648. package/testeranto/reports/core/example/Calculator.pitono.test/python/tests.json +255 -0
  649. package/testeranto/reports/core/example/Calculator.test/node/lint_errors.txt +2 -0
  650. package/testeranto/reports/core/example/Calculator.test/node/message.txt +16 -0
  651. package/testeranto/reports/core/example/Calculator.test/node/prompt.txt +13 -0
  652. package/testeranto/reports/core/example/Calculator.test/node/stderr.log +566 -0
  653. package/testeranto/reports/core/example/Calculator.test/node/tests.json +1163 -0
  654. package/testeranto/reports/core/example/Calculator.test/node/type_errors.txt +26 -0
  655. package/testeranto/reports/core/summary.json +7 -47
  656. package/testeranto.config.ts +33 -43
  657. package/tsc.log +305 -370
  658. package/dist/common/src/App.js +0 -219
  659. package/dist/common/src/PM/PM_WithBuild.js +0 -135
  660. package/dist/common/src/PM/PM_WithEslintAndTsc.js +0 -204
  661. package/dist/common/src/PM/PM_WithGit.js +0 -517
  662. package/dist/common/src/PM/PM_WithProcesses.js +0 -519
  663. package/dist/common/src/PM/PM_WithWebSocket.js +0 -535
  664. package/dist/common/src/PM/base.js +0 -319
  665. package/dist/common/src/PM/main.js +0 -672
  666. package/dist/common/src/PM/metafileOutputs.js +0 -78
  667. package/dist/common/src/ReportServer.js +0 -1
  668. package/dist/common/src/ReportServer.test.ts/index.js +0 -78
  669. package/dist/common/src/ReportServerLib.js +0 -1
  670. package/dist/common/src/components/DesignEditorPage.js +0 -205
  671. package/dist/common/src/components/SunriseAnimation.js +0 -291
  672. package/dist/common/src/components/SunriseAnimation.test/interface.js +0 -68
  673. package/dist/common/src/components/pure/AppFrame.js +0 -81
  674. package/dist/common/src/components/pure/GitHubLoginButton.js +0 -18
  675. package/dist/common/src/components/pure/GitIntegrationView.js +0 -342
  676. package/dist/common/src/components/pure/ModalContent.test/index.js +0 -58
  677. package/dist/common/src/components/pure/NavBar.js +0 -44
  678. package/dist/common/src/components/pure/ProcessManager.js +0 -113
  679. package/dist/common/src/components/pure/ProcessManagerView.js +0 -236
  680. package/dist/common/src/components/pure/ProjectPageView.js +0 -68
  681. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +0 -184
  682. package/dist/common/src/components/pure/Settings.js +0 -121
  683. package/dist/common/src/components/pure/Settings.test.js +0 -34
  684. package/dist/common/src/components/pure/SignIn.js +0 -22
  685. package/dist/common/src/components/pure/SingleProcessView.js +0 -167
  686. package/dist/common/src/components/pure/TestPageView.js +0 -373
  687. package/dist/common/src/components/pure/TestPageView.test/implementation.js +0 -157
  688. package/dist/common/src/components/pure/TestPageView.test/index.js +0 -15
  689. package/dist/common/src/components/pure/TestPageView.test/specification.js +0 -26
  690. package/dist/common/src/components/pure/TestPageView_utils.js +0 -117
  691. package/dist/common/src/components/stateful/FeaturesReporter.js +0 -60
  692. package/dist/common/src/components/stateful/GitIntegrationPage.js +0 -12
  693. package/dist/common/src/components/stateful/ProcessManagerPage.js +0 -110
  694. package/dist/common/src/components/stateful/ProjectPage.js +0 -102
  695. package/dist/common/src/components/stateful/ProjectsPage.js +0 -116
  696. package/dist/common/src/components/stateful/SingleProcessPage.js +0 -137
  697. package/dist/common/src/components/stateful/TestPage.js +0 -270
  698. package/dist/common/src/hooks/useGitMode.js +0 -21
  699. package/dist/common/src/services/FileService.js +0 -505
  700. package/dist/common/src/services/GitHubAuthService.js +0 -184
  701. package/dist/common/src/types/features.js +0 -34
  702. package/dist/common/src/utils/api.js +0 -93
  703. package/dist/common/src/utils/featureUtils.js +0 -29
  704. package/dist/common/src/utils/gitTest.js +0 -27
  705. package/dist/common/src/utils/makePrompt.js +0 -116
  706. package/dist/common/src/utils.js +0 -143
  707. package/dist/module/src/App.js +0 -176
  708. package/dist/module/src/PM/PM_WithBuild.js +0 -128
  709. package/dist/module/src/PM/PM_WithEslintAndTsc.js +0 -197
  710. package/dist/module/src/PM/PM_WithGit.js +0 -477
  711. package/dist/module/src/PM/PM_WithProcesses.js +0 -479
  712. package/dist/module/src/PM/PM_WithWebSocket.js +0 -528
  713. package/dist/module/src/PM/base.js +0 -312
  714. package/dist/module/src/PM/main.js +0 -632
  715. package/dist/module/src/PM/metafileOutputs.js +0 -78
  716. package/dist/module/src/ReportServer.js +0 -1
  717. package/dist/module/src/ReportServer.test.ts/index.js +0 -73
  718. package/dist/module/src/ReportServerLib.js +0 -1
  719. package/dist/module/src/components/DesignEditorPage.js +0 -168
  720. package/dist/module/src/components/SunriseAnimation.js +0 -256
  721. package/dist/module/src/components/SunriseAnimation.test/interface.js +0 -32
  722. package/dist/module/src/components/pure/AppFrame.js +0 -74
  723. package/dist/module/src/components/pure/GitHubLoginButton.js +0 -11
  724. package/dist/module/src/components/pure/GitIntegrationView.js +0 -305
  725. package/dist/module/src/components/pure/ModalContent.test/index.js +0 -53
  726. package/dist/module/src/components/pure/NavBar.js +0 -37
  727. package/dist/module/src/components/pure/ProcessManager.js +0 -76
  728. package/dist/module/src/components/pure/ProcessManagerView.js +0 -199
  729. package/dist/module/src/components/pure/ProjectPageView.js +0 -61
  730. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +0 -181
  731. package/dist/module/src/components/pure/Settings.js +0 -84
  732. package/dist/module/src/components/pure/Settings.test.js +0 -29
  733. package/dist/module/src/components/pure/SignIn.js +0 -15
  734. package/dist/module/src/components/pure/SingleProcessView.js +0 -130
  735. package/dist/module/src/components/pure/TestPageView.js +0 -336
  736. package/dist/module/src/components/pure/TestPageView.test/implementation.js +0 -121
  737. package/dist/module/src/components/pure/TestPageView.test/index.js +0 -10
  738. package/dist/module/src/components/pure/TestPageView.test/specification.js +0 -22
  739. package/dist/module/src/components/pure/TestPageView_utils.js +0 -109
  740. package/dist/module/src/components/stateful/FeaturesReporter.js +0 -23
  741. package/dist/module/src/components/stateful/GitIntegrationPage.js +0 -5
  742. package/dist/module/src/components/stateful/ProcessManagerPage.js +0 -73
  743. package/dist/module/src/components/stateful/ProjectPage.js +0 -65
  744. package/dist/module/src/components/stateful/ProjectsPage.js +0 -79
  745. package/dist/module/src/components/stateful/SingleProcessPage.js +0 -100
  746. package/dist/module/src/components/stateful/TestPage.js +0 -233
  747. package/dist/module/src/hooks/useGitMode.js +0 -17
  748. package/dist/module/src/services/FileService.js +0 -468
  749. package/dist/module/src/services/GitHubAuthService.js +0 -180
  750. package/dist/module/src/types/features.js +0 -31
  751. package/dist/module/src/utils/api.js +0 -87
  752. package/dist/module/src/utils/featureUtils.js +0 -24
  753. package/dist/module/src/utils/gitTest.js +0 -23
  754. package/dist/module/src/utils/makePrompt.js +0 -109
  755. package/dist/module/src/utils.js +0 -130
  756. package/dist/types/src/App.d.ts +0 -19
  757. package/dist/types/src/PM/PM_WithBuild.d.ts +0 -13
  758. package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +0 -22
  759. package/dist/types/src/PM/PM_WithGit.d.ts +0 -27
  760. package/dist/types/src/PM/PM_WithProcesses.d.ts +0 -29
  761. package/dist/types/src/PM/PM_WithWebSocket.d.ts +0 -108
  762. package/dist/types/src/PM/base.d.ts +0 -35
  763. package/dist/types/src/PM/main.d.ts +0 -8
  764. package/dist/types/src/ReportServer.test.ts/index.d.ts +0 -2
  765. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -11
  766. package/dist/types/src/components/SunriseAnimation.test/types.d.ts +0 -39
  767. package/dist/types/src/components/pure/AppFrame.d.ts +0 -11
  768. package/dist/types/src/components/pure/AppFrame.test/index.d.ts +0 -3
  769. package/dist/types/src/components/pure/FeaturesReporterView.d.ts +0 -7
  770. package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +0 -2
  771. package/dist/types/src/components/pure/GitIntegrationView.d.ts +0 -1
  772. package/dist/types/src/components/pure/ModalContent.test/index.d.ts +0 -2
  773. package/dist/types/src/components/pure/ProcessManagerView.d.ts +0 -20
  774. package/dist/types/src/components/pure/ProjectPageView.d.ts +0 -14
  775. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +0 -3
  776. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +0 -2
  777. package/dist/types/src/components/pure/SingleProcessView.d.ts +0 -10
  778. package/dist/types/src/components/pure/TestPageView.d.ts +0 -16
  779. package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +0 -12
  780. package/dist/types/src/components/pure/TestPageView.test/index.d.ts +0 -3
  781. package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +0 -11
  782. package/dist/types/src/components/pure/TestPageView.test/types.d.ts +0 -65
  783. package/dist/types/src/components/pure/TestPageView_utils.d.ts +0 -23
  784. package/dist/types/src/components/stateful/FeaturesReporter.d.ts +0 -2
  785. package/dist/types/src/components/stateful/SingleProcessPage.d.ts +0 -2
  786. package/dist/types/src/services/FileService.d.ts +0 -34
  787. package/dist/types/src/types/features.d.ts +0 -7
  788. package/dist/types/src/utils/api.d.ts +0 -10
  789. package/dist/types/src/utils/featureUtils.d.ts +0 -6
  790. package/dist/types/src/utils/gitTest.d.ts +0 -11
  791. package/dist/types/src/utils/makePrompt.d.ts +0 -2
  792. package/dist/types/src/utils.d.ts +0 -20
  793. package/pitono/__init__.py +0 -54
  794. package/pitono/base_given.py +0 -131
  795. package/pitono/base_suite.py +0 -95
  796. package/pitono/base_then.py +0 -50
  797. package/pitono/base_when.py +0 -52
  798. package/pitono/pitono.egg-info/PKG-INFO +0 -17
  799. package/pitono/pitono.egg-info/SOURCES.txt +0 -7
  800. package/pitono/types.py +0 -78
  801. package/src/App.tsx +0 -228
  802. package/src/PM/PM_WithBuild.ts +0 -171
  803. package/src/PM/PM_WithEslintAndTsc.ts +0 -279
  804. package/src/PM/PM_WithGit.ts +0 -585
  805. package/src/PM/PM_WithProcesses.ts +0 -639
  806. package/src/PM/PM_WithWebSocket.ts +0 -631
  807. package/src/PM/base.ts +0 -390
  808. package/src/PM/main.ts +0 -849
  809. package/src/PM/metafileOutputs.ts +0 -90
  810. package/src/ReportServer.test.ts/index.ts +0 -194
  811. package/src/app.scss +0 -19
  812. package/src/components/DesignEditorPage.tsx +0 -202
  813. package/src/components/SunriseAnimation.test/interface.ts +0 -49
  814. package/src/components/SunriseAnimation.test/types.ts +0 -53
  815. package/src/components/SunriseAnimation.tsx +0 -350
  816. package/src/components/pure/AppFrame.tsx +0 -300
  817. package/src/components/pure/FeaturesReporterView.tsx +0 -37
  818. package/src/components/pure/GitHubLoginButton.tsx +0 -31
  819. package/src/components/pure/GitIntegrationView.tsx +0 -443
  820. package/src/components/pure/ModalContent.test/index.tsx +0 -67
  821. package/src/components/pure/NavBar.tsx +0 -118
  822. package/src/components/pure/ProcessManager.tsx +0 -118
  823. package/src/components/pure/ProcessManagerView.tsx +0 -410
  824. package/src/components/pure/ProjectPageView.test/implementation.tsx +0 -213
  825. package/src/components/pure/ProjectPageView.tsx +0 -148
  826. package/src/components/pure/Settings.test.tsx +0 -34
  827. package/src/components/pure/Settings.tsx +0 -163
  828. package/src/components/pure/SignIn.tsx +0 -33
  829. package/src/components/pure/SingleProcessView.tsx +0 -231
  830. package/src/components/pure/TestPageView.test/implementation.ts +0 -162
  831. package/src/components/pure/TestPageView.test/index.tsx +0 -20
  832. package/src/components/pure/TestPageView.test/specification.ts +0 -59
  833. package/src/components/pure/TestPageView.test/types.ts +0 -92
  834. package/src/components/pure/TestPageView.tsx +0 -706
  835. package/src/components/pure/TestPageView_utils.tsx +0 -285
  836. package/src/components/stateful/FeaturesReporter.tsx +0 -26
  837. package/src/components/stateful/GitIntegrationPage.tsx +0 -8
  838. package/src/components/stateful/ProcessManagerPage.tsx +0 -104
  839. package/src/components/stateful/ProjectPage.tsx +0 -86
  840. package/src/components/stateful/ProjectsPage.tsx +0 -100
  841. package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +0 -73
  842. package/src/components/stateful/SVGEditor/SVGPreview.tsx +0 -225
  843. package/src/components/stateful/SVGEditorPage.tsx +0 -503
  844. package/src/components/stateful/SingleProcessPage.tsx +0 -142
  845. package/src/components/stateful/TestPage.tsx +0 -268
  846. package/src/golingvu/base_suite_test.go +0 -197
  847. package/src/hooks/useGitMode.ts +0 -20
  848. package/src/services/FileService.ts +0 -542
  849. package/src/services/GitHubAuthService.ts +0 -240
  850. package/src/templates/frontpage.html +0 -340
  851. package/src/templates/frontpage.md +0 -79
  852. package/src/types/features.ts +0 -38
  853. package/src/utils/api.ts +0 -108
  854. package/src/utils/featureUtils.tsx +0 -42
  855. package/src/utils/gitTest.ts +0 -29
  856. package/src/utils/makePrompt.ts +0 -149
  857. package/src/utils.ts +0 -202
  858. package/stargazers.txt +0 -15
  859. package/testeranto/bundles/golang/core/Calculator.golingvu.go +0 -53
  860. package/testeranto/bundles/golang/core/Calculator.golingvu.golingvu.go +0 -53
  861. package/testeranto/bundles/node/core/chunk-RIM6RECA.mjs +0 -1170
  862. package/testeranto/bundles/node/core/chunk-VXVF7WFO.mjs +0 -4321
  863. package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +0 -270
  864. package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +0 -574
  865. package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +0 -482
  866. package/testeranto/bundles/pure/core/chunk-XYOCRDEQ.mjs +0 -1080
  867. package/testeranto/bundles/pure/core/src/Pure.test.mjs +0 -410
  868. package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +0 -270
  869. package/testeranto/bundles/python/core/test_example.py +0 -24
  870. package/testeranto/bundles/web/core/MPLUSRounded1c-Black-O75GP5JI.ttf +0 -0
  871. package/testeranto/bundles/web/core/MPLUSRounded1c-Bold-R524Q5BH.ttf +0 -0
  872. package/testeranto/bundles/web/core/MPLUSRounded1c-ExtraBold-C6GRMYVT.ttf +0 -0
  873. package/testeranto/bundles/web/core/MPLUSRounded1c-Light-WKN65Y2C.ttf +0 -0
  874. package/testeranto/bundles/web/core/MPLUSRounded1c-Medium-ZC4DWL7C.ttf +0 -0
  875. package/testeranto/bundles/web/core/MPLUSRounded1c-Regular-DT6EKZ3S.ttf +0 -0
  876. package/testeranto/bundles/web/core/MPLUSRounded1c-Thin-YWDNVG6M.ttf +0 -0
  877. package/testeranto/bundles/web/core/chunk-DFRN4SYZ.mjs +0 -2297
  878. package/testeranto/bundles/web/core/chunk-JMDLMADH.mjs +0 -27996
  879. package/testeranto/bundles/web/core/chunk-LQMU5NCG.mjs +0 -3082
  880. package/testeranto/bundles/web/core/chunk-Q5TONB2Z.mjs +0 -6874
  881. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +0 -164
  882. package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +0 -11697
  883. package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +0 -336
  884. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +0 -11697
  885. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +0 -517
  886. package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +0 -285
  887. package/testeranto/metafiles/pure/core.json +0 -734
  888. package/testeranto/metafiles/web/core.json +0 -16501
  889. package/testeranto/reports/core/src/Pure.test/pure/message.txt +0 -17
  890. package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +0 -14
  891. package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +0 -73
  892. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +0 -91
  893. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -2
  894. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +0 -68
  895. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +0 -30
  896. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -2
  897. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -88
  898. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +0 -1
  899. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/message.txt +0 -17
  900. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -15
  901. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +0 -1
  902. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +0 -29
  903. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +0 -53
  904. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/exit.log +0 -0
  905. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
  906. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +0 -17
  907. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -15
  908. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +0 -58
  909. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/debug.log +0 -0
  910. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -1
  911. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +0 -1
  912. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/info.log +0 -0
  913. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -29
  914. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/warn.log +0 -0
  915. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +0 -1
  916. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/lint_errors.txt +0 -0
  917. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +0 -17
  918. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +0 -17
  919. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +0 -55
  920. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +0 -191
  921. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +0 -71
  922. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +0 -1
  923. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +0 -15
  924. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/message.txt +0 -17
  925. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +0 -17
  926. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +0 -20
  927. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +0 -4
  928. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +0 -49
  929. package/testeranto.ts-0.0.1.tgz +0 -0
  930. package/type-fix.txt +0 -2
  931. /package/{dist/types/src/PM/metafileOutputs.d.ts → build-go.sh} +0 -0
  932. /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.js +0 -0
  933. /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/index.js +0 -0
  934. /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/specification.js +0 -0
  935. /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/types.js +0 -0
  936. /package/dist/common/src/{components → app/frontend/components}/TestStatusBadge.js +0 -0
  937. /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.js +0 -0
  938. /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/index.js +0 -0
  939. /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/specification.js +0 -0
  940. /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/types.js +0 -0
  941. /package/dist/common/src/{components → app/frontend/components}/pure/ArtifactTree.js +0 -0
  942. /package/dist/common/src/{components → app/frontend/components}/pure/BuildLogViewer.js +0 -0
  943. /package/dist/common/src/{components → app/frontend/components}/pure/DebugEnv.js +0 -0
  944. /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.js +0 -0
  945. /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.js +0 -0
  946. /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.js +0 -0
  947. /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.js +0 -0
  948. /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.js +0 -0
  949. /package/dist/common/src/{components → app/frontend/components}/pure/FileTree.js +0 -0
  950. /package/dist/common/src/{components → app/frontend/components}/pure/FileTreeItem.js +0 -0
  951. /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.js +0 -0
  952. /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.js +0 -0
  953. /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/specification.js +0 -0
  954. /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/types.js +0 -0
  955. /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.js +0 -0
  956. /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.js +0 -0
  957. /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.js +0 -0
  958. /package/dist/common/src/{components → app/frontend/components}/pure/ProjectsPageView.js +0 -0
  959. /package/dist/common/src/{components → app/frontend/components}/pure/SettingsButton.js +0 -0
  960. /package/dist/common/src/{components → app/frontend/components}/pure/TestTable.js +0 -0
  961. /package/dist/common/src/{components → app/frontend/components}/pure/ThemeCard.js +0 -0
  962. /package/dist/common/src/{components → app/frontend/components}/pure/ToastNotification.js +0 -0
  963. /package/dist/common/src/{components → app/frontend/components}/pure/UserProfile.js +0 -0
  964. /package/dist/common/src/{components → app/frontend/components}/stateful/AuthCallbackPage.js +0 -0
  965. /package/dist/common/src/{components → app/frontend/components}/stateful/FileTree.js +0 -0
  966. /package/dist/common/src/{components → app/frontend/components}/stateful/SettingsPage.js +0 -0
  967. /package/dist/common/src/{components → app/frontend/components}/stateful/TextEditorPage.js +0 -0
  968. /package/dist/common/src/{components/pure → app/frontend/testPage}/TestPageView.test/types.js +0 -0
  969. /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.js +0 -0
  970. /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/index.js +0 -0
  971. /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/specification.js +0 -0
  972. /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/types.js +0 -0
  973. /package/dist/module/src/{components → app/frontend/components}/TestStatusBadge.js +0 -0
  974. /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.js +0 -0
  975. /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/index.js +0 -0
  976. /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/specification.js +0 -0
  977. /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/types.js +0 -0
  978. /package/dist/module/src/{components → app/frontend/components}/pure/ArtifactTree.js +0 -0
  979. /package/dist/module/src/{components → app/frontend/components}/pure/BuildLogViewer.js +0 -0
  980. /package/dist/module/src/{components → app/frontend/components}/pure/DebugEnv.js +0 -0
  981. /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.js +0 -0
  982. /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.js +0 -0
  983. /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.js +0 -0
  984. /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.js +0 -0
  985. /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.js +0 -0
  986. /package/dist/module/src/{components → app/frontend/components}/pure/FileTree.js +0 -0
  987. /package/dist/module/src/{components → app/frontend/components}/pure/FileTreeItem.js +0 -0
  988. /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.js +0 -0
  989. /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.js +0 -0
  990. /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/specification.js +0 -0
  991. /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/types.js +0 -0
  992. /package/dist/{types/src/components/pure/Settings.test.d.ts → module/src/app/frontend/components/pure/ProcessManagerViewTypes.js} +0 -0
  993. /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.js +0 -0
  994. /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.js +0 -0
  995. /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.js +0 -0
  996. /package/dist/module/src/{components → app/frontend/components}/pure/ProjectsPageView.js +0 -0
  997. /package/dist/module/src/{components → app/frontend/components}/pure/SettingsButton.js +0 -0
  998. /package/dist/module/src/{components → app/frontend/components}/pure/TestTable.js +0 -0
  999. /package/dist/module/src/{components → app/frontend/components}/pure/ThemeCard.js +0 -0
  1000. /package/dist/module/src/{components → app/frontend/components}/pure/ToastNotification.js +0 -0
  1001. /package/dist/module/src/{components → app/frontend/components}/pure/UserProfile.js +0 -0
  1002. /package/dist/module/src/{components → app/frontend/components}/stateful/AuthCallbackPage.js +0 -0
  1003. /package/dist/module/src/{components → app/frontend/components}/stateful/FileTree.js +0 -0
  1004. /package/dist/module/src/{components → app/frontend/components}/stateful/SettingsPage.js +0 -0
  1005. /package/dist/module/src/{components → app/frontend/components}/stateful/TextEditorPage.js +0 -0
  1006. /package/dist/module/src/{components/pure → app/frontend/testPage}/TestPageView.test/types.js +0 -0
  1007. /package/dist/types/src/{ReportServer.d.ts → app/backend/PM_WithProcesses.d.ts} +0 -0
  1008. /package/dist/types/src/{services → app/frontend}/GitHubAuthService.d.ts +0 -0
  1009. /package/dist/types/src/{components → app/frontend/components}/DesignEditorPage.d.ts +0 -0
  1010. /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.d.ts +0 -0
  1011. /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.d.ts +0 -0
  1012. /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/index.d.ts +0 -0
  1013. /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/specification.d.ts +0 -0
  1014. /package/dist/types/src/{components → app/frontend/components}/TestStatusBadge.d.ts +0 -0
  1015. /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.d.ts +0 -0
  1016. /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/specification.d.ts +0 -0
  1017. /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/types.d.ts +0 -0
  1018. /package/dist/types/src/{components → app/frontend/components}/pure/ArtifactTree.d.ts +0 -0
  1019. /package/dist/types/src/{components → app/frontend/components}/pure/BuildLogViewer.d.ts +0 -0
  1020. /package/dist/types/src/{components → app/frontend/components}/pure/DebugEnv.d.ts +0 -0
  1021. /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.d.ts +0 -0
  1022. /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.d.ts +0 -0
  1023. /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.d.ts +0 -0
  1024. /package/dist/types/src/{components → app/frontend/components}/pure/FileTree.d.ts +0 -0
  1025. /package/dist/types/src/{components → app/frontend/components}/pure/FileTreeItem.d.ts +0 -0
  1026. /package/dist/types/src/{components → app/frontend/components}/pure/GitHubLoginButton.d.ts +0 -0
  1027. /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.d.ts +0 -0
  1028. /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.d.ts +0 -0
  1029. /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/specification.d.ts +0 -0
  1030. /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/types.d.ts +0 -0
  1031. /package/dist/types/src/{components → app/frontend/components}/pure/NavBar.d.ts +0 -0
  1032. /package/dist/types/src/{components → app/frontend/components}/pure/ProcessManager.d.ts +0 -0
  1033. /package/dist/types/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.d.ts +0 -0
  1034. /package/dist/types/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.d.ts +0 -0
  1035. /package/dist/types/src/{components → app/frontend/components}/pure/ProjectsPageView.d.ts +0 -0
  1036. /package/dist/types/src/{components → app/frontend/components}/pure/Settings.d.ts +0 -0
  1037. /package/dist/types/src/{ReportServerLib.d.ts → app/frontend/components/pure/Settings.test.d.ts} +0 -0
  1038. /package/dist/types/src/{components → app/frontend/components}/pure/SettingsButton.d.ts +0 -0
  1039. /package/dist/types/src/{components → app/frontend/components}/pure/SignIn.d.ts +0 -0
  1040. /package/dist/types/src/{components/stateful/FileTree.d.ts → app/frontend/components/pure/SingleProcessView.d.ts} +0 -0
  1041. /package/dist/types/src/{components → app/frontend/components}/pure/TestTable.d.ts +0 -0
  1042. /package/dist/types/src/{components → app/frontend/components}/pure/ThemeCard.d.ts +0 -0
  1043. /package/dist/types/src/{components → app/frontend/components}/pure/ToastNotification.d.ts +0 -0
  1044. /package/dist/types/src/{components → app/frontend/components}/pure/UserProfile.d.ts +0 -0
  1045. /package/dist/types/src/{components → app/frontend/components}/stateful/AuthCallbackPage.d.ts +0 -0
  1046. /package/{src/ReportServer.ts → dist/types/src/app/frontend/components/stateful/FeaturesReporter.d.ts} +0 -0
  1047. /package/{src/ReportServerLib.ts → dist/types/src/app/frontend/components/stateful/FileTree.d.ts} +0 -0
  1048. /package/dist/types/src/{components → app/frontend/components}/stateful/GitIntegrationPage.d.ts +0 -0
  1049. /package/dist/types/src/{components → app/frontend/components}/stateful/ProcessManagerPage.d.ts +0 -0
  1050. /package/dist/types/src/{components → app/frontend/components}/stateful/ProjectPage.d.ts +0 -0
  1051. /package/dist/types/src/{components → app/frontend/components}/stateful/ProjectsPage.d.ts +0 -0
  1052. /package/dist/types/src/{components → app/frontend/components}/stateful/SettingsPage.d.ts +0 -0
  1053. /package/{src/components/SunriseAnimation.test/implementation.ts → dist/types/src/app/frontend/components/stateful/SingleProcessPage.d.ts} +0 -0
  1054. /package/dist/types/src/{components → app/frontend/components}/stateful/TextEditorPage.d.ts +0 -0
  1055. /package/{src/components/SunriseAnimation.test/index.ts → dist/types/src/app/frontend/fetchDataUtil.d.ts} +0 -0
  1056. /package/dist/types/src/{components/stateful → app/frontend/testPage}/TestPage.d.ts +0 -0
  1057. /package/{src/components/SunriseAnimation.test/specification.ts → dist/types/src/app/frontend/useFileSystemSync.d.ts} +0 -0
  1058. /package/dist/types/src/{hooks → app/frontend}/useGitMode.d.ts +0 -0
  1059. /package/{testeranto/reports/core/src/Pure.test/pure/exit.log → docker.md} +0 -0
  1060. /package/{testeranto/reports/core/src/Pure.test/pure/lint_errors.txt → src/app/frontend/components/SunriseAnimation.test/implementation.ts} +0 -0
  1061. /package/{testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/debug.log → src/app/frontend/components/SunriseAnimation.test/index.ts} +0 -0
  1062. /package/src/{components → app/frontend/components}/SunriseAnimation.test/index.tsx +0 -0
  1063. /package/{testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/warn.log → src/app/frontend/components/SunriseAnimation.test/specification.ts} +0 -0
  1064. /package/src/{components → app/frontend/components}/TestStatusBadge.tsx +0 -0
  1065. /package/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.tsx +0 -0
  1066. /package/src/{components → app/frontend/components}/pure/AppFrame.test/index.tsx +0 -0
  1067. /package/src/{components → app/frontend/components}/pure/AppFrame.test/specification.ts +0 -0
  1068. /package/src/{components → app/frontend/components}/pure/AppFrame.test/types.ts +0 -0
  1069. /package/src/{components → app/frontend/components}/pure/ArtifactTree.tsx +0 -0
  1070. /package/src/{components → app/frontend/components}/pure/BuildLogViewer.tsx +0 -0
  1071. /package/src/{components → app/frontend/components}/pure/DebugEnv.tsx +0 -0
  1072. /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.tsx +0 -0
  1073. /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.tsx +0 -0
  1074. /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.ts +0 -0
  1075. /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.ts +0 -0
  1076. /package/src/{components → app/frontend/components}/pure/FileTree.tsx +0 -0
  1077. /package/src/{components → app/frontend/components}/pure/FileTreeItem.tsx +0 -0
  1078. /package/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.tsx +0 -0
  1079. /package/src/{components → app/frontend/components}/pure/ModalContent.test/specification.ts +0 -0
  1080. /package/src/{components → app/frontend/components}/pure/ModalContent.test/types.ts +0 -0
  1081. /package/src/{components → app/frontend/components}/pure/ModalContent.tsx +0 -0
  1082. /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.tsx +0 -0
  1083. /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.ts +0 -0
  1084. /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.ts +0 -0
  1085. /package/src/{components → app/frontend/components}/pure/ProjectsPageView.tsx +0 -0
  1086. /package/src/{components → app/frontend/components}/pure/SettingsButton.md +0 -0
  1087. /package/src/{components → app/frontend/components}/pure/SettingsButton.tsx +0 -0
  1088. /package/src/{components → app/frontend/components}/pure/TestTable.tsx +0 -0
  1089. /package/src/{components → app/frontend/components}/pure/ThemeCard.tsx +0 -0
  1090. /package/src/{components → app/frontend/components}/pure/ToastNotification.tsx +0 -0
  1091. /package/src/{components → app/frontend/components}/pure/UserProfile.tsx +0 -0
  1092. /package/src/{components → app/frontend/components}/stateful/AuthCallbackPage.tsx +0 -0
  1093. /package/src/{components → app/frontend/components}/stateful/FileTree.tsx +0 -0
  1094. /package/src/{components → app/frontend/components}/stateful/SVGEditor/CircleForm.tsx +0 -0
  1095. /package/src/{components → app/frontend/components}/stateful/SVGEditor/GroupForm.tsx +0 -0
  1096. /package/src/{components → app/frontend/components}/stateful/SVGEditor/RectForm.tsx +0 -0
  1097. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGAttributeField.tsx +0 -0
  1098. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGEditorControls.tsx +0 -0
  1099. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGElementForm.tsx +0 -0
  1100. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTextEditor.tsx +0 -0
  1101. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTree.tsx +0 -0
  1102. /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTypes.ts +0 -0
  1103. /package/src/{components → app/frontend/components}/stateful/SVGEditor/svg.xsd.xml +0 -0
  1104. /package/src/{components → app/frontend/components}/stateful/SettingsPage.tsx +0 -0
  1105. /package/src/{components → app/frontend/components}/stateful/TextEditorPage.tsx +0 -0
  1106. /package/{pitono → src/pitono}/core_generator.py +0 -0
  1107. /package/{pitono → src/pitono}/pitono.egg-info/dependency_links.txt +0 -0
  1108. /package/{pitono → src/pitono}/pitono.egg-info/entry_points.txt +0 -0
  1109. /package/{pitono → src/pitono}/pitono.egg-info/top_level.txt +0 -0
  1110. /package/{pitono → src/pitono}/pyproject.toml +0 -0
  1111. /package/{pitono → src/pitono}/setup.py +0 -0
  1112. /package/{pitono → src/pitono}/simple_adapter.py +0 -0
  1113. /package/testeranto/{reports/core/src/components/pure/ProjectPageView.test/index/web/debug.log → helpo_chat_message.txt} +0 -0
  1114. /package/testeranto/{projects.html → index.html} +0 -0
  1115. /package/testeranto/reports/core/{src/components/pure/ProjectPageView.test/index/web/warn.log → example/Calculator.golingvu.test/golang/stdout.log} +0 -0
  1116. /package/testeranto/reports/core/{src/components/pure/FeaturesReporterView.test/index/web → example/Calculator.pitono.test/python}/exit.log +0 -0
  1117. /package/testeranto/reports/core/{src/lib/BaseSuite.test/node.test/node → example/Calculator.pitono.test/python}/stderr.log +0 -0
  1118. /package/testeranto/reports/core/{src/components/pure/ProjectPageView.test/index/web → example/Calculator.test/node}/exit.log +0 -0
  1119. /package/testeranto/reports/core/{src/lib/BaseSuite.test/node.test/node/lint_errors.txt → example/Calculator.test/node/stdout.log} +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
- */