@everysk/apps-sdk 0.1.0 → 0.3.0-beta-20261016180126

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 (349) hide show
  1. package/README.md +395 -8
  2. package/dist/EveryskApp.d.ts +34 -2
  3. package/dist/EveryskApp.d.ts.map +1 -1
  4. package/dist/EveryskApp.js +35 -2
  5. package/dist/EveryskApp.js.map +1 -1
  6. package/dist/agGrid/handleRowsScrollEnd.d.ts +53 -0
  7. package/dist/agGrid/handleRowsScrollEnd.d.ts.map +1 -0
  8. package/dist/agGrid/handleRowsScrollEnd.js +47 -0
  9. package/dist/agGrid/handleRowsScrollEnd.js.map +1 -0
  10. package/dist/agGrid/index.d.ts +2 -0
  11. package/dist/agGrid/index.d.ts.map +1 -1
  12. package/dist/agGrid/index.js +2 -1
  13. package/dist/api/datastore.d.ts +10 -8
  14. package/dist/api/datastore.d.ts.map +1 -1
  15. package/dist/api/datastore.js +24 -55
  16. package/dist/api/datastore.js.map +1 -1
  17. package/dist/api/entityQuery.d.ts +46 -41
  18. package/dist/api/entityQuery.d.ts.map +1 -1
  19. package/dist/api/entityQuery.js +55 -14
  20. package/dist/api/entityQuery.js.map +1 -1
  21. package/dist/api/file.d.ts +26 -9
  22. package/dist/api/file.d.ts.map +1 -1
  23. package/dist/api/file.js +45 -55
  24. package/dist/api/file.js.map +1 -1
  25. package/dist/api/portfolio.d.ts +11 -8
  26. package/dist/api/portfolio.d.ts.map +1 -1
  27. package/dist/api/portfolio.js +24 -55
  28. package/dist/api/portfolio.js.map +1 -1
  29. package/dist/api/profile.d.ts +3 -2
  30. package/dist/api/profile.d.ts.map +1 -1
  31. package/dist/api/profile.js +4 -9
  32. package/dist/api/profile.js.map +1 -1
  33. package/dist/api/request.d.ts +106 -0
  34. package/dist/api/request.d.ts.map +1 -0
  35. package/dist/api/request.js +132 -0
  36. package/dist/api/request.js.map +1 -0
  37. package/dist/api/websocketsConfig.d.ts +7 -2
  38. package/dist/api/websocketsConfig.d.ts.map +1 -1
  39. package/dist/api/websocketsConfig.js +2 -10
  40. package/dist/api/websocketsConfig.js.map +1 -1
  41. package/dist/api/workflow.d.ts +84 -89
  42. package/dist/api/workflow.d.ts.map +1 -1
  43. package/dist/api/workflow.js +121 -208
  44. package/dist/api/workflow.js.map +1 -1
  45. package/dist/api/workspace.d.ts +18 -8
  46. package/dist/api/workspace.d.ts.map +1 -1
  47. package/dist/api/workspace.js +21 -26
  48. package/dist/api/workspace.js.map +1 -1
  49. package/dist/components/ui/Footer/index.d.ts.map +1 -1
  50. package/dist/components/ui/Footer/index.js.map +1 -1
  51. package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -1
  52. package/dist/components/ui/GlobalLoading/index.js.map +1 -1
  53. package/dist/components/ui/PageContainer/index.d.ts +1 -1
  54. package/dist/components/ui/PageContainer/index.d.ts.map +1 -1
  55. package/dist/components/ui/PageContainer/index.js.map +1 -1
  56. package/dist/components/ui/Toolbar/index.d.ts +40 -3
  57. package/dist/components/ui/Toolbar/index.d.ts.map +1 -1
  58. package/dist/components/ui/Toolbar/index.js +42 -15
  59. package/dist/components/ui/Toolbar/index.js.map +1 -1
  60. package/dist/contexts/appAlertContext/provider.js.map +1 -1
  61. package/dist/contexts/appAlertContext/types.d.ts.map +1 -1
  62. package/dist/contexts/appConfigContext/index.d.ts.map +1 -1
  63. package/dist/contexts/appConfigContext/index.js.map +1 -1
  64. package/dist/contexts/appConfigContext/provider.d.ts.map +1 -1
  65. package/dist/contexts/appConfigContext/provider.js.map +1 -1
  66. package/dist/contexts/webSocketContext/handler.d.ts +3 -2
  67. package/dist/contexts/webSocketContext/handler.d.ts.map +1 -1
  68. package/dist/contexts/webSocketContext/handler.js.map +1 -1
  69. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +1 -1
  70. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +1 -1
  71. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -1
  72. package/dist/contexts/webSocketContext/provider.d.ts +6 -3
  73. package/dist/contexts/webSocketContext/provider.d.ts.map +1 -1
  74. package/dist/contexts/webSocketContext/provider.js +42 -7
  75. package/dist/contexts/webSocketContext/provider.js.map +1 -1
  76. package/dist/contexts/webSocketContext/types.d.ts +7 -5
  77. package/dist/contexts/webSocketContext/types.d.ts.map +1 -1
  78. package/dist/file/index.d.ts +2 -0
  79. package/dist/file/index.d.ts.map +1 -1
  80. package/dist/hooks/datastore/useDatastoreMutations.d.ts +4 -4
  81. package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -1
  82. package/dist/hooks/datastore/useDatastoreMutations.js +17 -55
  83. package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -1
  84. package/dist/hooks/datastore/useFetchDatastore.d.ts +30 -41
  85. package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -1
  86. package/dist/hooks/datastore/useFetchDatastore.js +25 -59
  87. package/dist/hooks/datastore/useFetchDatastore.js.map +1 -1
  88. package/dist/hooks/datastore/useFetchDatastores.d.ts +47 -52
  89. package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -1
  90. package/dist/hooks/datastore/useFetchDatastores.js +55 -70
  91. package/dist/hooks/datastore/useFetchDatastores.js.map +1 -1
  92. package/dist/hooks/file/fileData.d.ts +17 -0
  93. package/dist/hooks/file/fileData.d.ts.map +1 -0
  94. package/dist/hooks/file/fileData.js +10 -0
  95. package/dist/hooks/file/fileData.js.map +1 -0
  96. package/dist/hooks/file/useFetchFile.d.ts +38 -58
  97. package/dist/hooks/file/useFetchFile.d.ts.map +1 -1
  98. package/dist/hooks/file/useFetchFile.js +26 -66
  99. package/dist/hooks/file/useFetchFile.js.map +1 -1
  100. package/dist/hooks/file/useFetchFiles.d.ts +18 -52
  101. package/dist/hooks/file/useFetchFiles.d.ts.map +1 -1
  102. package/dist/hooks/file/useFetchFiles.js +53 -69
  103. package/dist/hooks/file/useFetchFiles.js.map +1 -1
  104. package/dist/hooks/file/useFileMutations.d.ts +9 -8
  105. package/dist/hooks/file/useFileMutations.d.ts.map +1 -1
  106. package/dist/hooks/file/useFileMutations.js +23 -60
  107. package/dist/hooks/file/useFileMutations.js.map +1 -1
  108. package/dist/hooks/portfolio/useFetchPortfolio.d.ts +16 -50
  109. package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -1
  110. package/dist/hooks/portfolio/useFetchPortfolio.js +15 -63
  111. package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -1
  112. package/dist/hooks/portfolio/useFetchPortfolios.d.ts +13 -52
  113. package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -1
  114. package/dist/hooks/portfolio/useFetchPortfolios.js +29 -71
  115. package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -1
  116. package/dist/hooks/portfolio/usePortfolioMutations.d.ts +8 -8
  117. package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -1
  118. package/dist/hooks/portfolio/usePortfolioMutations.js +20 -58
  119. package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -1
  120. package/dist/hooks/profile/useFetchProfile.d.ts +18 -44
  121. package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -1
  122. package/dist/hooks/profile/useFetchProfile.js +16 -48
  123. package/dist/hooks/profile/useFetchProfile.js.map +1 -1
  124. package/dist/hooks/useAxios.js.map +1 -1
  125. package/dist/hooks/useEntityInfiniteQuery.d.ts +88 -0
  126. package/dist/hooks/useEntityInfiniteQuery.d.ts.map +1 -0
  127. package/dist/hooks/useEntityInfiniteQuery.js +111 -0
  128. package/dist/hooks/useEntityInfiniteQuery.js.map +1 -0
  129. package/dist/hooks/useEntityMutation.d.ts +47 -0
  130. package/dist/hooks/useEntityMutation.d.ts.map +1 -0
  131. package/dist/hooks/useEntityMutation.js +58 -0
  132. package/dist/hooks/useEntityMutation.js.map +1 -0
  133. package/dist/hooks/useEntityQuery.d.ts +68 -0
  134. package/dist/hooks/useEntityQuery.d.ts.map +1 -0
  135. package/dist/hooks/useEntityQuery.js +75 -0
  136. package/dist/hooks/useEntityQuery.js.map +1 -0
  137. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +17 -34
  138. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -1
  139. package/dist/hooks/workflow/useFetchWorkerExecution.js +16 -46
  140. package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -1
  141. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +179 -41
  142. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -1
  143. package/dist/hooks/workflow/useFetchWorkerExecutions.js +29 -62
  144. package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -1
  145. package/dist/hooks/workflow/useFetchWorkflow.d.ts +16 -35
  146. package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -1
  147. package/dist/hooks/workflow/useFetchWorkflow.js +15 -48
  148. package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -1
  149. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +17 -34
  150. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -1
  151. package/dist/hooks/workflow/useFetchWorkflowExecution.js +16 -46
  152. package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -1
  153. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +22 -36
  154. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -1
  155. package/dist/hooks/workflow/useFetchWorkflowExecutions.js +43 -56
  156. package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -1
  157. package/dist/hooks/workflow/useFetchWorkflows.d.ts +20 -37
  158. package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -1
  159. package/dist/hooks/workflow/useFetchWorkflows.js +32 -47
  160. package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -1
  161. package/dist/hooks/workflow/useRunWorkflow.d.ts +21 -16
  162. package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -1
  163. package/dist/hooks/workflow/useRunWorkflow.js +66 -29
  164. package/dist/hooks/workflow/useRunWorkflow.js.map +1 -1
  165. package/dist/hooks/workflow/useTriggerWorkflow.d.ts +20 -0
  166. package/dist/hooks/workflow/useTriggerWorkflow.d.ts.map +1 -0
  167. package/dist/hooks/workflow/useTriggerWorkflow.js +32 -0
  168. package/dist/hooks/workflow/useTriggerWorkflow.js.map +1 -0
  169. package/dist/hooks/workspace/useFetchWorkspace.d.ts +19 -34
  170. package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -1
  171. package/dist/hooks/workspace/useFetchWorkspace.js +16 -46
  172. package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -1
  173. package/dist/hooks/workspace/useFetchWorkspaces.d.ts +17 -37
  174. package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -1
  175. package/dist/hooks/workspace/useFetchWorkspaces.js +25 -47
  176. package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -1
  177. package/dist/index.d.ts +13 -10
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +13 -11
  180. package/dist/lib/abort.d.ts +58 -0
  181. package/dist/lib/abort.d.ts.map +1 -0
  182. package/dist/lib/abort.js +112 -0
  183. package/dist/lib/abort.js.map +1 -0
  184. package/dist/lib/datastoreTable.d.ts +59 -54
  185. package/dist/lib/datastoreTable.d.ts.map +1 -1
  186. package/dist/lib/datastoreTable.js +58 -62
  187. package/dist/lib/datastoreTable.js.map +1 -1
  188. package/dist/lib/file.d.ts +34 -0
  189. package/dist/lib/file.d.ts.map +1 -0
  190. package/dist/lib/file.js +63 -0
  191. package/dist/lib/file.js.map +1 -0
  192. package/dist/lib/queryClient.d.ts.map +1 -1
  193. package/dist/lib/queryClient.js.map +1 -1
  194. package/dist/lib/workflowRun.d.ts +91 -0
  195. package/dist/lib/workflowRun.d.ts.map +1 -0
  196. package/dist/lib/workflowRun.js +224 -0
  197. package/dist/lib/workflowRun.js.map +1 -0
  198. package/dist/socket/index.d.ts +1 -3
  199. package/dist/socket/index.d.ts.map +1 -1
  200. package/dist/socket/index.js +3 -5
  201. package/dist/test/mocks/index.d.ts +1 -1
  202. package/dist/test/mocks/index.d.ts.map +1 -1
  203. package/dist/test/renderWithProviders.d.ts +2 -2
  204. package/dist/test/renderWithProviders.d.ts.map +1 -1
  205. package/dist/test/renderWithProviders.js.map +1 -1
  206. package/dist/test/setup.js.map +1 -1
  207. package/dist/theme/index.d.ts +1 -1
  208. package/dist/theme/index.d.ts.map +1 -1
  209. package/dist/theme/overrides/index.d.ts +4 -2
  210. package/dist/theme/overrides/index.d.ts.map +1 -1
  211. package/dist/theme/overrides/index.js +5 -3
  212. package/dist/theme/overrides/index.js.map +1 -1
  213. package/dist/theme/overrides/muiButton.d.ts +2 -2
  214. package/dist/theme/overrides/muiButton.js.map +1 -1
  215. package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -1
  216. package/dist/theme/overrides/muiCssBaseline.js.map +1 -1
  217. package/dist/theme/overrides/muiDatePicker.js.map +1 -1
  218. package/dist/theme/overrides/muiFormControl.js.map +1 -1
  219. package/dist/theme/overrides/muiIconButton.d.ts +2 -2
  220. package/dist/theme/overrides/muiIconButton.js.map +1 -1
  221. package/dist/theme/overrides/muiSelect.d.ts.map +1 -1
  222. package/dist/theme/overrides/muiSelect.js.map +1 -1
  223. package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -1
  224. package/dist/theme/overrides/muiSvgIcon.js.map +1 -1
  225. package/dist/theme/overrides/muiTextField.js.map +1 -1
  226. package/dist/theme/overrides/muiToggleButton.d.ts +2 -2
  227. package/dist/theme/overrides/muiToggleButton.js.map +1 -1
  228. package/dist/theme/overrides/muiToggleButtonGroup.d.ts +2 -2
  229. package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -1
  230. package/dist/theme/themes/DefaultDark.js +2 -2
  231. package/dist/theme/themes/DefaultDark.js.map +1 -1
  232. package/dist/theme/themes/DefaultLight.js +2 -2
  233. package/dist/theme/themes/DefaultLight.js.map +1 -1
  234. package/dist/theme/themes/EveryskDark.js +2 -2
  235. package/dist/theme/themes/EveryskDark.js.map +1 -1
  236. package/dist/theme/themes/EveryskLight.js +2 -2
  237. package/dist/theme/themes/EveryskLight.js.map +1 -1
  238. package/dist/theme/themes/MidnightEmber.js +2 -2
  239. package/dist/theme/themes/MidnightEmber.js.map +1 -1
  240. package/dist/types/anyRecord.d.ts.map +1 -1
  241. package/dist/types/datastore.d.ts +35 -5
  242. package/dist/types/datastore.d.ts.map +1 -1
  243. package/dist/types/datastoreDataFormat.d.ts +13 -0
  244. package/dist/types/datastoreDataFormat.d.ts.map +1 -0
  245. package/dist/types/entityQuery.d.ts +86 -16
  246. package/dist/types/entityQuery.d.ts.map +1 -1
  247. package/dist/types/file.d.ts +7 -3
  248. package/dist/types/file.d.ts.map +1 -1
  249. package/dist/types/portfolio.d.ts +1 -3
  250. package/dist/types/portfolio.d.ts.map +1 -1
  251. package/dist/types/profile.d.ts +0 -10
  252. package/dist/types/profile.d.ts.map +1 -1
  253. package/dist/types/workflow.d.ts +35 -6
  254. package/dist/types/workflow.d.ts.map +1 -1
  255. package/dist/types/workspace.d.ts +1 -2
  256. package/dist/types/workspace.d.ts.map +1 -1
  257. package/dist/ui/index.d.ts +1 -1
  258. package/dist/ui/index.d.ts.map +1 -1
  259. package/dist/workflow/index.d.ts +2 -0
  260. package/dist/workflow/index.d.ts.map +1 -1
  261. package/package.json +6 -6
  262. package/src/EveryskApp.tsx +53 -2
  263. package/src/agGrid/handleRowsScrollEnd.ts +71 -0
  264. package/src/agGrid/index.ts +5 -1
  265. package/src/api/datastore.ts +79 -107
  266. package/src/api/entityQuery.ts +86 -17
  267. package/src/api/file.ts +110 -103
  268. package/src/api/portfolio.ts +82 -125
  269. package/src/api/profile.ts +25 -18
  270. package/src/api/request.ts +168 -0
  271. package/src/api/websocketsConfig.ts +11 -19
  272. package/src/api/workflow.ts +232 -334
  273. package/src/api/workspace.ts +43 -43
  274. package/src/components/ui/Footer/index.tsx +8 -7
  275. package/src/components/ui/GlobalLoading/index.tsx +13 -3
  276. package/src/components/ui/PageContainer/index.tsx +9 -2
  277. package/src/components/ui/Toolbar/index.tsx +105 -30
  278. package/src/contexts/appAlertContext/provider.tsx +1 -1
  279. package/src/contexts/appAlertContext/types.ts +3 -3
  280. package/src/contexts/appConfigContext/index.tsx +1 -1
  281. package/src/contexts/appConfigContext/provider.tsx +1 -5
  282. package/src/contexts/webSocketContext/handler.ts +8 -2
  283. package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +1 -1
  284. package/src/contexts/webSocketContext/provider.tsx +64 -14
  285. package/src/contexts/webSocketContext/types.ts +7 -6
  286. package/src/file/index.ts +2 -0
  287. package/src/hooks/datastore/useDatastoreMutations.ts +19 -60
  288. package/src/hooks/datastore/useFetchDatastore.ts +45 -73
  289. package/src/hooks/datastore/useFetchDatastores.ts +106 -131
  290. package/src/hooks/file/fileData.ts +19 -0
  291. package/src/hooks/file/useFetchFile.ts +41 -76
  292. package/src/hooks/file/useFetchFiles.ts +92 -87
  293. package/src/hooks/file/useFileMutations.ts +23 -73
  294. package/src/hooks/portfolio/useFetchPortfolio.ts +26 -78
  295. package/src/hooks/portfolio/useFetchPortfolios.ts +50 -93
  296. package/src/hooks/portfolio/usePortfolioMutations.ts +22 -72
  297. package/src/hooks/profile/useFetchProfile.ts +24 -65
  298. package/src/hooks/useAxios.ts +5 -5
  299. package/src/hooks/useEntityInfiniteQuery.ts +193 -0
  300. package/src/hooks/useEntityMutation.ts +70 -0
  301. package/src/hooks/useEntityQuery.ts +117 -0
  302. package/src/hooks/workflow/useFetchWorkerExecution.ts +27 -56
  303. package/src/hooks/workflow/useFetchWorkerExecutions.ts +54 -79
  304. package/src/hooks/workflow/useFetchWorkflow.ts +24 -58
  305. package/src/hooks/workflow/useFetchWorkflowExecution.ts +27 -57
  306. package/src/hooks/workflow/useFetchWorkflowExecutions.ts +64 -73
  307. package/src/hooks/workflow/useFetchWorkflows.ts +48 -64
  308. package/src/hooks/workflow/useRunWorkflow.ts +82 -36
  309. package/src/hooks/workflow/useTriggerWorkflow.ts +36 -0
  310. package/src/hooks/workspace/useFetchWorkspace.ts +25 -58
  311. package/src/hooks/workspace/useFetchWorkspaces.ts +38 -69
  312. package/src/index.ts +34 -19
  313. package/src/lib/abort.ts +131 -0
  314. package/src/lib/datastoreTable.ts +127 -74
  315. package/src/lib/file.ts +67 -0
  316. package/src/lib/queryClient.ts +11 -13
  317. package/src/lib/workflowRun.ts +329 -0
  318. package/src/socket/index.ts +1 -3
  319. package/src/test/mocks/index.ts +1 -5
  320. package/src/test/renderWithProviders.tsx +8 -3
  321. package/src/test/setup.ts +16 -16
  322. package/src/theme/index.ts +1 -1
  323. package/src/theme/overrides/index.ts +5 -3
  324. package/src/theme/overrides/muiButton.ts +3 -3
  325. package/src/theme/overrides/muiCssBaseline.ts +11 -12
  326. package/src/theme/overrides/muiDatePicker.ts +2 -2
  327. package/src/theme/overrides/muiFormControl.ts +2 -2
  328. package/src/theme/overrides/muiIconButton.ts +3 -3
  329. package/src/theme/overrides/muiSelect.ts +2 -2
  330. package/src/theme/overrides/muiSvgIcon.ts +2 -2
  331. package/src/theme/overrides/muiTextField.ts +1 -1
  332. package/src/theme/overrides/muiToggleButton.ts +4 -4
  333. package/src/theme/overrides/muiToggleButtonGroup.ts +4 -4
  334. package/src/theme/themes/DefaultDark.ts +2 -2
  335. package/src/theme/themes/DefaultLight.ts +2 -2
  336. package/src/theme/themes/EveryskDark.ts +2 -2
  337. package/src/theme/themes/EveryskLight.ts +2 -2
  338. package/src/theme/themes/MidnightEmber.ts +15 -15
  339. package/src/types/anyRecord.ts +2 -2
  340. package/src/types/datastore.ts +56 -22
  341. package/src/types/datastoreDataFormat.ts +12 -0
  342. package/src/types/entityQuery.ts +122 -38
  343. package/src/types/file.ts +8 -6
  344. package/src/types/portfolio.ts +70 -74
  345. package/src/types/profile.ts +0 -11
  346. package/src/types/workflow.ts +38 -9
  347. package/src/types/workspace.ts +2 -4
  348. package/src/ui/index.ts +1 -1
  349. package/src/workflow/index.ts +5 -0
@@ -0,0 +1,224 @@
1
+ import { isRetryableFailure } from "../api/request.js";
2
+ import { isTerminalRunStatus } from "../api/workflow.js";
3
+ import { abortable, createDeadline, unlessAborted } from "./abort.js";
4
+ //#region src/lib/workflowRun.ts
5
+ /** The alert a run hook shows when its failure carries no message of its own. */
6
+ var RUN_FAILED_MESSAGE = "Unable to run the workflow. Please try again.";
7
+ /** The events the backend sends when a run's Ender finishes. */
8
+ var RUN_END_EVENTS = ["WORKFLOW_EXECUTION_COMPLETED", "WORKFLOW_EXECUTION_FAILED"];
9
+ var isRunEndEvent = (event) => RUN_END_EVENTS.includes(event.event_type);
10
+ /**
11
+ * The error a run ends with when its caller stopped it — the screen went away, or the app's own
12
+ * signal — with that signal's reason as the cause. One class for both phases, the wait and the
13
+ * result read, so a caller can tell a stop from a failure with `instanceof` rather than by its
14
+ * message.
15
+ */
16
+ var WorkflowRunAbortedError = class extends Error {
17
+ constructor(reason) {
18
+ super("Waiting for the workflow run was aborted", { cause: reason });
19
+ this.name = "WorkflowRunAbortedError";
20
+ }
21
+ };
22
+ /** The longest delay `setTimeout` honours; it fires a longer one after 1 ms. */
23
+ var MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
24
+ /**
25
+ * Throws when a wait option is not a positive number a timer can wait: zero or NaN would read
26
+ * back to back, and above `MAX_TIMER_DELAY_MS` the timer fires at once.
27
+ */
28
+ var requireTimerDelays = (options) => {
29
+ for (const [name, value] of Object.entries(options)) if (!(value > 0 && value <= MAX_TIMER_DELAY_MS)) throw new Error(`[apps-sdk] runWorkflowToEnd: ${name} must be a positive number of milliseconds up to ${MAX_TIMER_DELAY_MS}, got ${value}`);
30
+ };
31
+ /** The triggers kept for later while the loop is busy reading, highest first. */
32
+ var PENDING_PRIORITY = [
33
+ "unavailable",
34
+ "end",
35
+ "reconnect"
36
+ ];
37
+ var socketUnavailableError = () => /* @__PURE__ */ new Error("Real-time notifications are unavailable, so the end of the workflow run cannot be followed. The run itself may still be going on on the server.");
38
+ /**
39
+ * The triggers, handed by the socket listeners to the wait loop one at a time, so the loop reads
40
+ * as a sequence while the listeners stay callbacks.
41
+ *
42
+ * Only one trigger is kept for later while the loop is busy reading, the highest in
43
+ * `PENDING_PRIORITY`; `progress` only restarts the silence, which matters only while the loop
44
+ * waits. `unavailable` outranks everything, since it ends the wait; `end` outranks `reconnect`,
45
+ * since both lead to a read and the end's read is the one that keeps going.
46
+ */
47
+ var createTriggerQueue = (signal) => {
48
+ let pending = null;
49
+ let wake = null;
50
+ const outranks = (trigger) => PENDING_PRIORITY.includes(trigger) && (!pending || PENDING_PRIORITY.indexOf(trigger) < PENDING_PRIORITY.indexOf(pending));
51
+ return {
52
+ push(trigger) {
53
+ if (wake) return wake(trigger);
54
+ if (outranks(trigger)) pending = trigger;
55
+ },
56
+ /** The next trigger, or `silence` when none comes within `silenceMs`. */
57
+ next(silenceMs) {
58
+ if (pending) {
59
+ const trigger = pending;
60
+ pending = null;
61
+ return Promise.resolve(trigger);
62
+ }
63
+ return abortable(signal, (resolve) => {
64
+ const silenceTimer = setTimeout(() => resolve("silence"), silenceMs);
65
+ wake = resolve;
66
+ return () => {
67
+ clearTimeout(silenceTimer);
68
+ wake = null;
69
+ };
70
+ });
71
+ }
72
+ };
73
+ };
74
+ /**
75
+ * Hands `onEvent` the events of one execution. Listening starts at once, and events are kept
76
+ * until `follow` names the execution: a quick run can end before `POST /run` answers. After that,
77
+ * only that execution's events pass — the channel carries every run of the account.
78
+ */
79
+ var listenToRun = (subscribeToEvents, onEvent) => {
80
+ let workflowExecutionId = null;
81
+ const buffered = [];
82
+ const isFollowed = (event) => event.workflow_execution_id === workflowExecutionId;
83
+ return {
84
+ follow(id) {
85
+ workflowExecutionId = id;
86
+ buffered.splice(0).filter(isFollowed).forEach(onEvent);
87
+ },
88
+ stop: subscribeToEvents((event) => {
89
+ if (!workflowExecutionId) buffered.push(event);
90
+ else if (isFollowed(event)) onEvent(event);
91
+ })
92
+ };
93
+ };
94
+ /**
95
+ * Follows the socket's status for the wait, starting from the one the subscription reports at
96
+ * once. It reports the socket coming back (`connected` after any other status) and going: an
97
+ * `error` that lasts `unavailableAfterMs` without a reconnect, counted from the first one, since
98
+ * `connecting` in between only means socket.io is retrying. `isConnected` is false from any other
99
+ * status until the next `connected`; the run is not started before then.
100
+ */
101
+ var watchSocket = (subscribeToStatus, { unavailableAfterMs, onReconnect, onUnavailable }) => {
102
+ let connected = true;
103
+ let graceTimer;
104
+ const endGrace = () => {
105
+ clearTimeout(graceTimer);
106
+ graceTimer = void 0;
107
+ };
108
+ const stopListening = subscribeToStatus((status) => {
109
+ if (status === "error" && graceTimer === void 0) graceTimer = setTimeout(onUnavailable, unavailableAfterMs);
110
+ if (status !== "connected") {
111
+ connected = false;
112
+ return;
113
+ }
114
+ endGrace();
115
+ if (!connected) {
116
+ connected = true;
117
+ onReconnect();
118
+ }
119
+ });
120
+ return {
121
+ isConnected: () => connected,
122
+ stop() {
123
+ endGrace();
124
+ stopListening();
125
+ }
126
+ };
127
+ };
128
+ /**
129
+ * runWorkflowToEnd
130
+ *
131
+ * Starts a workflow run and waits for it to end, listening to the websocket rather than polling;
132
+ * the end itself is read from the API. Resolves with the ended execution, whatever its
133
+ * `run_status` — deciding what counts as success is the caller's.
134
+ *
135
+ * The websocket says *when* to read, never *what* happened. The backend publishes a
136
+ * `WORKER_EXECUTION_*` event per worker and a `WORKFLOW_EXECUTION_COMPLETED|FAILED` one when the
137
+ * Ender finishes, all on the account's channel. That end event goes out before `run_status` is
138
+ * written, and its `COMPLETED` is the Ender's status, not the run's: so it triggers a read, and
139
+ * then more on a short, doubling delay (`confirmIntervalMs`, capped at `silenceMs`) until the run
140
+ * reads ended — no later event would trigger one.
141
+ *
142
+ * Delivery is at most once, with no replay, and the server cuts every socket about once an hour.
143
+ * So the execution is also read after `silenceMs` without any event of the run, and as soon as
144
+ * the socket reconnects. A read that fails in a way that may pass (no response, a 5XX, a 429) does
145
+ * not end the wait — the next trigger reads again — and the last such failure is the cause if the
146
+ * wait times out, until a read succeeds. Any other failure ends it at once: a 4XX, or anything
147
+ * that is not a request failure, such as a body that is not the expected JSON.
148
+ *
149
+ * The run's end cannot be followed without the socket, so a socket in `error` for
150
+ * `unavailableAfterMs` — its config failed, or the server dropped it — fails the wait. The run is
151
+ * held back until the socket is connected, so it is never started unfollowable, and nothing it
152
+ * publishes goes out before the wait is listening.
153
+ *
154
+ * A timeout or an abort stops everything at once through one signal: the wait, the pause between
155
+ * reads, and the read in flight, whose request is cancelled. The start request is abandoned
156
+ * rather than cancelled — `startRun` takes no signal — so the run may still begin on the server.
157
+ *
158
+ * @param params - The start and read calls, the websocket subscriptions and the wait options.
159
+ * @returns The execution, once its `run_status` is terminal.
160
+ * @throws {Error} If a wait option is not a positive number, the run cannot be started or has no
161
+ * execution id, a read fails for good, the socket stays unavailable for `unavailableAfterMs`, or
162
+ * the wait times out or is aborted (`WorkflowRunAbortedError`, with the signal's reason as the cause).
163
+ */
164
+ var runWorkflowToEnd = async ({ startRun, getExecution, subscribeToEvents, subscribeToStatus, silenceMs = 6e4, timeoutMs = 3e5, confirmIntervalMs = 1e3, unavailableAfterMs = 3e4, signal }) => {
165
+ requireTimerDelays({
166
+ silenceMs,
167
+ timeoutMs,
168
+ confirmIntervalMs,
169
+ unavailableAfterMs
170
+ });
171
+ let lastError;
172
+ const deadline = createDeadline({
173
+ timeoutMs,
174
+ signal,
175
+ timeoutError: () => new Error("Timed out while waiting for the workflow run to end", { cause: lastError }),
176
+ abortError: () => new WorkflowRunAbortedError(signal?.reason)
177
+ });
178
+ const waitSignal = deadline.signal;
179
+ const triggers = createTriggerQueue(waitSignal);
180
+ const runEvents = listenToRun(subscribeToEvents, (event) => triggers.push(isRunEndEvent(event) ? "end" : "progress"));
181
+ const connection = watchSocket(subscribeToStatus, {
182
+ unavailableAfterMs,
183
+ onReconnect: () => triggers.push("reconnect"),
184
+ onUnavailable: () => triggers.push("unavailable")
185
+ });
186
+ /** Reads the execution once; `null` while the run has not ended. */
187
+ const readIfEnded = async (id) => {
188
+ try {
189
+ const execution = await unlessAborted(getExecution(id, waitSignal), waitSignal);
190
+ lastError = void 0;
191
+ return isTerminalRunStatus(execution.run_status) ? execution : null;
192
+ } catch (error) {
193
+ if (waitSignal.aborted) throw waitSignal.reason;
194
+ if (!isRetryableFailure(error)) throw error;
195
+ lastError = error;
196
+ return null;
197
+ }
198
+ };
199
+ try {
200
+ if (waitSignal.aborted) throw waitSignal.reason;
201
+ while (!connection.isConnected()) if (await triggers.next(silenceMs) === "unavailable") throw socketUnavailableError();
202
+ const id = (await unlessAborted(startRun(), waitSignal))?.id;
203
+ if (!id) throw new Error("Workflow run did not return an execution id");
204
+ runEvents.follow(id);
205
+ let confirmDelay;
206
+ for (;;) {
207
+ const trigger = await triggers.next(confirmDelay ?? silenceMs);
208
+ if (trigger === "unavailable") throw socketUnavailableError();
209
+ if (trigger === "progress") continue;
210
+ if (trigger === "end") confirmDelay = confirmIntervalMs;
211
+ else if (trigger === "silence" && confirmDelay !== void 0) confirmDelay = Math.min(confirmDelay * 2, silenceMs);
212
+ const ended = await readIfEnded(id);
213
+ if (ended) return ended;
214
+ }
215
+ } finally {
216
+ deadline.dispose();
217
+ runEvents.stop();
218
+ connection.stop();
219
+ }
220
+ };
221
+ //#endregion
222
+ export { RUN_FAILED_MESSAGE, WorkflowRunAbortedError, runWorkflowToEnd };
223
+
224
+ //# sourceMappingURL=workflowRun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowRun.js","names":[],"sources":["../../src/lib/workflowRun.ts"],"sourcesContent":["import { isRetryableFailure } from \"@/api/request\";\nimport { isTerminalRunStatus } from \"@/api/workflow\";\nimport { abortable, createDeadline, unlessAborted } from \"@/lib/abort\";\nimport type { WebSocketNotification, WebSocketStatus } from \"@/contexts/webSocketContext/types\";\nimport type { WorkflowExecution } from \"@/types/workflow\";\n\n/** The alert a run hook shows when its failure carries no message of its own. */\nexport const RUN_FAILED_MESSAGE = \"Unable to run the workflow. Please try again.\";\n\n/** The events the backend sends when a run's Ender finishes. */\nconst RUN_END_EVENTS: readonly string[] = [\n \"WORKFLOW_EXECUTION_COMPLETED\",\n \"WORKFLOW_EXECUTION_FAILED\",\n];\n\nconst isRunEndEvent = (event: WebSocketNotification) => RUN_END_EVENTS.includes(event.event_type);\n\n/**\n * The error a run ends with when its caller stopped it — the screen went away, or the app's own\n * signal — with that signal's reason as the cause. One class for both phases, the wait and the\n * result read, so a caller can tell a stop from a failure with `instanceof` rather than by its\n * message.\n */\nexport class WorkflowRunAbortedError extends Error {\n constructor(reason: unknown) {\n super(\"Waiting for the workflow run was aborted\", { cause: reason });\n this.name = \"WorkflowRunAbortedError\";\n }\n}\n\n/** The longest delay `setTimeout` honours; it fires a longer one after 1 ms. */\nconst MAX_TIMER_DELAY_MS = 2 ** 31 - 1;\n\n/**\n * Throws when a wait option is not a positive number a timer can wait: zero or NaN would read\n * back to back, and above `MAX_TIMER_DELAY_MS` the timer fires at once.\n */\nconst requireTimerDelays = (options: Record<string, number>) => {\n for (const [name, value] of Object.entries(options)) {\n if (!(value > 0 && value <= MAX_TIMER_DELAY_MS)) {\n throw new Error(\n `[apps-sdk] runWorkflowToEnd: ${name} must be a positive number of milliseconds up to ${MAX_TIMER_DELAY_MS}, got ${value}`,\n );\n }\n }\n};\n\nexport type WorkflowWaitOptions = {\n /**\n * How long the run may go without any event before the execution is read anyway, in\n * milliseconds. Defaults to a minute. It covers a lost event, and a long worker, which sends\n * nothing while it runs.\n */\n silenceMs?: number;\n /** How long to wait for the run to end before giving up, in milliseconds. Defaults to 5 minutes. */\n timeoutMs?: number;\n /**\n * The first gap between reads after the end event, while the run still reads RUNNING, in\n * milliseconds. It doubles each time it passes without a new event, up to `silenceMs`.\n * Defaults to 1 second.\n */\n confirmIntervalMs?: number;\n /**\n * How long the socket may stay in `error` before the run is given up on as unfollowable, in\n * milliseconds. Defaults to 30 seconds: socket.io keeps retrying after a failed reconnect, on\n * a backoff that alone can reach about 7.5 seconds between attempts.\n */\n unavailableAfterMs?: number;\n /** Stops waiting. `useRunWorkflow` also stops when its screen unmounts. */\n signal?: AbortSignal;\n};\n\nexport type RunWorkflowToEndParams = WorkflowWaitOptions & {\n /** Starts the run (`POST /workflows/:id/run`) and returns the execution it created. */\n startRun: () => Promise<WorkflowExecution>;\n /**\n * Reads the execution; its `run_status` is what says the run ended, and how. Pass `signal` to\n * the request, so a timeout or an abort cancels a read in flight.\n */\n getExecution: (workflowExecutionId: string, signal: AbortSignal) => Promise<WorkflowExecution>;\n /** The websocket context's `subscribe`. */\n subscribeToEvents: (listener: (event: WebSocketNotification) => void) => () => void;\n /**\n * The websocket context's `subscribeStatus`, which tells a new listener the current status at\n * once: that is how the wait learns the status it begins in.\n */\n subscribeToStatus: (listener: (status: WebSocketStatus) => void) => () => void;\n};\n\n/**\n * What wakes the wait up: an event of the run (`progress`, or `end` for the Ender's), the socket\n * coming back (`reconnect`) or going (`unavailable`), or nothing at all for `silenceMs` (`silence`).\n */\ntype Trigger = \"progress\" | \"end\" | \"reconnect\" | \"unavailable\" | \"silence\";\n\n/** The triggers kept for later while the loop is busy reading, highest first. */\nconst PENDING_PRIORITY: Trigger[] = [\"unavailable\", \"end\", \"reconnect\"];\n\nconst socketUnavailableError = () =>\n new Error(\n \"Real-time notifications are unavailable, so the end of the workflow run cannot be followed. \" +\n \"The run itself may still be going on on the server.\",\n );\n\n/**\n * The triggers, handed by the socket listeners to the wait loop one at a time, so the loop reads\n * as a sequence while the listeners stay callbacks.\n *\n * Only one trigger is kept for later while the loop is busy reading, the highest in\n * `PENDING_PRIORITY`; `progress` only restarts the silence, which matters only while the loop\n * waits. `unavailable` outranks everything, since it ends the wait; `end` outranks `reconnect`,\n * since both lead to a read and the end's read is the one that keeps going.\n */\nconst createTriggerQueue = (signal: AbortSignal) => {\n let pending: Trigger | null = null;\n let wake: ((trigger: Trigger) => void) | null = null;\n const outranks = (trigger: Trigger) =>\n PENDING_PRIORITY.includes(trigger) &&\n (!pending || PENDING_PRIORITY.indexOf(trigger) < PENDING_PRIORITY.indexOf(pending));\n\n return {\n push(trigger: Trigger) {\n if (wake) return wake(trigger);\n if (outranks(trigger)) pending = trigger;\n },\n /** The next trigger, or `silence` when none comes within `silenceMs`. */\n next(silenceMs: number): Promise<Trigger> {\n if (pending) {\n const trigger = pending;\n pending = null;\n return Promise.resolve(trigger);\n }\n return abortable<Trigger>(signal, (resolve) => {\n const silenceTimer = setTimeout(() => resolve(\"silence\"), silenceMs);\n wake = resolve;\n return () => {\n clearTimeout(silenceTimer);\n wake = null;\n };\n });\n },\n };\n};\n\n/**\n * Hands `onEvent` the events of one execution. Listening starts at once, and events are kept\n * until `follow` names the execution: a quick run can end before `POST /run` answers. After that,\n * only that execution's events pass — the channel carries every run of the account.\n */\nconst listenToRun = (\n subscribeToEvents: RunWorkflowToEndParams[\"subscribeToEvents\"],\n onEvent: (event: WebSocketNotification) => void,\n) => {\n let workflowExecutionId: string | null = null;\n const buffered: WebSocketNotification[] = [];\n const isFollowed = (event: WebSocketNotification) =>\n event.workflow_execution_id === workflowExecutionId;\n\n const stop = subscribeToEvents((event) => {\n if (!workflowExecutionId) buffered.push(event);\n else if (isFollowed(event)) onEvent(event);\n });\n\n return {\n follow(id: string) {\n workflowExecutionId = id;\n buffered.splice(0).filter(isFollowed).forEach(onEvent);\n },\n stop,\n };\n};\n\n/**\n * Follows the socket's status for the wait, starting from the one the subscription reports at\n * once. It reports the socket coming back (`connected` after any other status) and going: an\n * `error` that lasts `unavailableAfterMs` without a reconnect, counted from the first one, since\n * `connecting` in between only means socket.io is retrying. `isConnected` is false from any other\n * status until the next `connected`; the run is not started before then.\n */\nconst watchSocket = (\n subscribeToStatus: RunWorkflowToEndParams[\"subscribeToStatus\"],\n {\n unavailableAfterMs,\n onReconnect,\n onUnavailable,\n }: { unavailableAfterMs: number; onReconnect: () => void; onUnavailable: () => void },\n) => {\n let connected = true;\n let graceTimer: ReturnType<typeof setTimeout> | undefined;\n const endGrace = () => {\n clearTimeout(graceTimer);\n graceTimer = undefined;\n };\n\n const stopListening = subscribeToStatus((status) => {\n if (status === \"error\" && graceTimer === undefined)\n graceTimer = setTimeout(onUnavailable, unavailableAfterMs);\n if (status !== \"connected\") {\n connected = false;\n return;\n }\n endGrace();\n if (!connected) {\n connected = true;\n onReconnect();\n }\n });\n\n return {\n isConnected: () => connected,\n stop() {\n endGrace();\n stopListening();\n },\n };\n};\n\n/**\n * runWorkflowToEnd\n *\n * Starts a workflow run and waits for it to end, listening to the websocket rather than polling;\n * the end itself is read from the API. Resolves with the ended execution, whatever its\n * `run_status` — deciding what counts as success is the caller's.\n *\n * The websocket says *when* to read, never *what* happened. The backend publishes a\n * `WORKER_EXECUTION_*` event per worker and a `WORKFLOW_EXECUTION_COMPLETED|FAILED` one when the\n * Ender finishes, all on the account's channel. That end event goes out before `run_status` is\n * written, and its `COMPLETED` is the Ender's status, not the run's: so it triggers a read, and\n * then more on a short, doubling delay (`confirmIntervalMs`, capped at `silenceMs`) until the run\n * reads ended — no later event would trigger one.\n *\n * Delivery is at most once, with no replay, and the server cuts every socket about once an hour.\n * So the execution is also read after `silenceMs` without any event of the run, and as soon as\n * the socket reconnects. A read that fails in a way that may pass (no response, a 5XX, a 429) does\n * not end the wait — the next trigger reads again — and the last such failure is the cause if the\n * wait times out, until a read succeeds. Any other failure ends it at once: a 4XX, or anything\n * that is not a request failure, such as a body that is not the expected JSON.\n *\n * The run's end cannot be followed without the socket, so a socket in `error` for\n * `unavailableAfterMs` — its config failed, or the server dropped it — fails the wait. The run is\n * held back until the socket is connected, so it is never started unfollowable, and nothing it\n * publishes goes out before the wait is listening.\n *\n * A timeout or an abort stops everything at once through one signal: the wait, the pause between\n * reads, and the read in flight, whose request is cancelled. The start request is abandoned\n * rather than cancelled — `startRun` takes no signal — so the run may still begin on the server.\n *\n * @param params - The start and read calls, the websocket subscriptions and the wait options.\n * @returns The execution, once its `run_status` is terminal.\n * @throws {Error} If a wait option is not a positive number, the run cannot be started or has no\n * execution id, a read fails for good, the socket stays unavailable for `unavailableAfterMs`, or\n * the wait times out or is aborted (`WorkflowRunAbortedError`, with the signal's reason as the cause).\n */\nexport const runWorkflowToEnd = async ({\n startRun,\n getExecution,\n subscribeToEvents,\n subscribeToStatus,\n silenceMs = 60_000,\n timeoutMs = 5 * 60_000,\n confirmIntervalMs = 1_000,\n unavailableAfterMs = 30_000,\n signal,\n}: RunWorkflowToEndParams): Promise<WorkflowExecution> => {\n requireTimerDelays({ silenceMs, timeoutMs, confirmIntervalMs, unavailableAfterMs });\n\n let lastError: unknown;\n const deadline = createDeadline({\n timeoutMs,\n signal,\n timeoutError: () =>\n new Error(\"Timed out while waiting for the workflow run to end\", { cause: lastError }),\n abortError: () => new WorkflowRunAbortedError(signal?.reason),\n });\n const waitSignal = deadline.signal;\n\n const triggers = createTriggerQueue(waitSignal);\n const runEvents = listenToRun(subscribeToEvents, (event) =>\n triggers.push(isRunEndEvent(event) ? \"end\" : \"progress\"),\n );\n const connection = watchSocket(subscribeToStatus, {\n unavailableAfterMs,\n onReconnect: () => triggers.push(\"reconnect\"),\n onUnavailable: () => triggers.push(\"unavailable\"),\n });\n\n /** Reads the execution once; `null` while the run has not ended. */\n const readIfEnded = async (id: string) => {\n try {\n const execution = await unlessAborted(getExecution(id, waitSignal), waitSignal);\n lastError = undefined;\n return isTerminalRunStatus(execution.run_status) ? execution : null;\n } catch (error) {\n if (waitSignal.aborted) throw waitSignal.reason;\n if (!isRetryableFailure(error)) throw error;\n lastError = error;\n return null;\n }\n };\n\n try {\n if (waitSignal.aborted) throw waitSignal.reason;\n while (!connection.isConnected()) {\n if ((await triggers.next(silenceMs)) === \"unavailable\") throw socketUnavailableError();\n }\n\n const id = (await unlessAborted(startRun(), waitSignal))?.id;\n if (!id) throw new Error(\"Workflow run did not return an execution id\");\n runEvents.follow(id);\n\n let confirmDelay: number | undefined;\n for (;;) {\n const trigger = await triggers.next(confirmDelay ?? silenceMs);\n if (trigger === \"unavailable\") throw socketUnavailableError();\n if (trigger === \"progress\") continue;\n\n if (trigger === \"end\") confirmDelay = confirmIntervalMs;\n else if (trigger === \"silence\" && confirmDelay !== undefined)\n confirmDelay = Math.min(confirmDelay * 2, silenceMs);\n\n const ended = await readIfEnded(id);\n if (ended) return ended;\n }\n } finally {\n deadline.dispose();\n runEvents.stop();\n connection.stop();\n }\n};\n"],"mappings":";;;;;AAOA,IAAa,qBAAqB;;AAGlC,IAAM,iBAAoC,CACtC,gCACA,2BACJ;AAEA,IAAM,iBAAiB,UAAiC,eAAe,SAAS,MAAM,UAAU;;;;;;;AAQhG,IAAa,0BAAb,cAA6C,MAAM;CAC/C,YAAY,QAAiB;EACzB,MAAM,4CAA4C,EAAE,OAAO,OAAO,CAAC;EACnE,KAAK,OAAO;CAChB;AACJ;;AAGA,IAAM,qBAAqB,KAAK,KAAK;;;;;AAMrC,IAAM,sBAAsB,YAAoC;CAC5D,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,OAAO,GAC9C,IAAI,EAAE,QAAQ,KAAK,SAAS,qBACxB,MAAM,IAAI,MACN,gCAAgC,KAAK,mDAAmD,mBAAmB,QAAQ,OACvH;AAGZ;;AAmDA,IAAM,mBAA8B;CAAC;CAAe;CAAO;AAAW;AAEtE,IAAM,+CACF,IAAI,MACA,iJAEJ;;;;;;;;;;AAWJ,IAAM,sBAAsB,WAAwB;CAChD,IAAI,UAA0B;CAC9B,IAAI,OAA4C;CAChD,MAAM,YAAY,YACd,iBAAiB,SAAS,OAAO,MAChC,CAAC,WAAW,iBAAiB,QAAQ,OAAO,IAAI,iBAAiB,QAAQ,OAAO;CAErF,OAAO;EACH,KAAK,SAAkB;GACnB,IAAI,MAAM,OAAO,KAAK,OAAO;GAC7B,IAAI,SAAS,OAAO,GAAG,UAAU;EACrC;;EAEA,KAAK,WAAqC;GACtC,IAAI,SAAS;IACT,MAAM,UAAU;IAChB,UAAU;IACV,OAAO,QAAQ,QAAQ,OAAO;GAClC;GACA,OAAO,UAAmB,SAAS,YAAY;IAC3C,MAAM,eAAe,iBAAiB,QAAQ,SAAS,GAAG,SAAS;IACnE,OAAO;IACP,aAAa;KACT,aAAa,YAAY;KACzB,OAAO;IACX;GACJ,CAAC;EACL;CACJ;AACJ;;;;;;AAOA,IAAM,eACF,mBACA,YACC;CACD,IAAI,sBAAqC;CACzC,MAAM,WAAoC,CAAC;CAC3C,MAAM,cAAc,UAChB,MAAM,0BAA0B;CAOpC,OAAO;EACH,OAAO,IAAY;GACf,sBAAsB;GACtB,SAAS,OAAO,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,OAAO;EACzD;EACA,MAVS,mBAAmB,UAAU;GACtC,IAAI,CAAC,qBAAqB,SAAS,KAAK,KAAK;QACxC,IAAI,WAAW,KAAK,GAAG,QAAQ,KAAK;EAC7C,CAOI;CACJ;AACJ;;;;;;;;AASA,IAAM,eACF,mBACA,EACI,oBACA,aACA,oBAEH;CACD,IAAI,YAAY;CAChB,IAAI;CACJ,MAAM,iBAAiB;EACnB,aAAa,UAAU;EACvB,aAAa,KAAA;CACjB;CAEA,MAAM,gBAAgB,mBAAmB,WAAW;EAChD,IAAI,WAAW,WAAW,eAAe,KAAA,GACrC,aAAa,WAAW,eAAe,kBAAkB;EAC7D,IAAI,WAAW,aAAa;GACxB,YAAY;GACZ;EACJ;EACA,SAAS;EACT,IAAI,CAAC,WAAW;GACZ,YAAY;GACZ,YAAY;EAChB;CACJ,CAAC;CAED,OAAO;EACH,mBAAmB;EACnB,OAAO;GACH,SAAS;GACT,cAAc;EAClB;CACJ;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAa,mBAAmB,OAAO,EACnC,UACA,cACA,mBACA,mBACA,YAAY,KACZ,YAAY,KACZ,oBAAoB,KACpB,qBAAqB,KACrB,aACsD;CACtD,mBAAmB;EAAE;EAAW;EAAW;EAAmB;CAAmB,CAAC;CAElF,IAAI;CACJ,MAAM,WAAW,eAAe;EAC5B;EACA;EACA,oBACI,IAAI,MAAM,uDAAuD,EAAE,OAAO,UAAU,CAAC;EACzF,kBAAkB,IAAI,wBAAwB,QAAQ,MAAM;CAChE,CAAC;CACD,MAAM,aAAa,SAAS;CAE5B,MAAM,WAAW,mBAAmB,UAAU;CAC9C,MAAM,YAAY,YAAY,oBAAoB,UAC9C,SAAS,KAAK,cAAc,KAAK,IAAI,QAAQ,UAAU,CAC3D;CACA,MAAM,aAAa,YAAY,mBAAmB;EAC9C;EACA,mBAAmB,SAAS,KAAK,WAAW;EAC5C,qBAAqB,SAAS,KAAK,aAAa;CACpD,CAAC;;CAGD,MAAM,cAAc,OAAO,OAAe;EACtC,IAAI;GACA,MAAM,YAAY,MAAM,cAAc,aAAa,IAAI,UAAU,GAAG,UAAU;GAC9E,YAAY,KAAA;GACZ,OAAO,oBAAoB,UAAU,UAAU,IAAI,YAAY;EACnE,SAAS,OAAO;GACZ,IAAI,WAAW,SAAS,MAAM,WAAW;GACzC,IAAI,CAAC,mBAAmB,KAAK,GAAG,MAAM;GACtC,YAAY;GACZ,OAAO;EACX;CACJ;CAEA,IAAI;EACA,IAAI,WAAW,SAAS,MAAM,WAAW;EACzC,OAAO,CAAC,WAAW,YAAY,GAC3B,IAAK,MAAM,SAAS,KAAK,SAAS,MAAO,eAAe,MAAM,uBAAuB;EAGzF,MAAM,MAAM,MAAM,cAAc,SAAS,GAAG,UAAU,EAAA,EAAI;EAC1D,IAAI,CAAC,IAAI,MAAM,IAAI,MAAM,6CAA6C;EACtE,UAAU,OAAO,EAAE;EAEnB,IAAI;EACJ,SAAS;GACL,MAAM,UAAU,MAAM,SAAS,KAAK,gBAAgB,SAAS;GAC7D,IAAI,YAAY,eAAe,MAAM,uBAAuB;GAC5D,IAAI,YAAY,YAAY;GAE5B,IAAI,YAAY,OAAO,eAAe;QACjC,IAAI,YAAY,aAAa,iBAAiB,KAAA,GAC/C,eAAe,KAAK,IAAI,eAAe,GAAG,SAAS;GAEvD,MAAM,QAAQ,MAAM,YAAY,EAAE;GAClC,IAAI,OAAO,OAAO;EACtB;CACJ,UAAU;EACN,SAAS,QAAQ;EACjB,UAAU,KAAK;EACf,WAAW,KAAK;CACpB;AACJ"}
@@ -1,10 +1,8 @@
1
1
  export * from "../contexts/webSocketContext/index.js";
2
2
  export * from "../contexts/webSocketContext/provider.js";
3
3
  export * from "../contexts/webSocketContext/types.d.ts";
4
- export * from "../contexts/webSocketContext/constants.js";
5
- export * from "../contexts/webSocketContext/handler.js";
4
+ export { APP_NOTIFICATION_EVENT_TYPE } from "../contexts/webSocketContext/constants.js";
6
5
  export * from "../contexts/webSocketContext/hooks/useWebSocket/index.js";
7
6
  export * from "../contexts/webSocketContext/hooks/useWebSocketSubscription/index.js";
8
7
  export * from "../contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js";
9
- export * from "../api/websocketsConfig.js";
10
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/socket/index.ts"],"names":[],"mappings":"AAUA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,kEAAkE,CAAC;AACjF,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/socket/index.ts"],"names":[],"mappings":"AAUA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,kEAAkE,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { WebSocketContext } from "../contexts/webSocketContext/index.js";
2
- import { getWebsocketsConfig } from "../api/websocketsConfig.js";
3
- import { APP_NOTIFICATION_EVENT_TYPE, JOIN_EVENT, NOTIFICATION_EVENT } from "../contexts/webSocketContext/constants.js";
4
- import { WebSocketHandler } from "../contexts/webSocketContext/handler.js";
5
- import { WebSocketProvider } from "../contexts/webSocketContext/provider.js";
6
2
  import { useWebSocket } from "../contexts/webSocketContext/hooks/useWebSocket/index.js";
3
+ import { APP_NOTIFICATION_EVENT_TYPE } from "../contexts/webSocketContext/constants.js";
4
+ import { WebSocketProvider } from "../contexts/webSocketContext/provider.js";
7
5
  import { useWebSocketSubscription } from "../contexts/webSocketContext/hooks/useWebSocketSubscription/index.js";
8
6
  import { useAppNotificationSubscription } from "../contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js";
9
- export { APP_NOTIFICATION_EVENT_TYPE, JOIN_EVENT, NOTIFICATION_EVENT, WebSocketContext, WebSocketHandler, WebSocketProvider, getWebsocketsConfig, useAppNotificationSubscription, useWebSocket, useWebSocketSubscription };
7
+ export { APP_NOTIFICATION_EVENT_TYPE, WebSocketContext, WebSocketProvider, useAppNotificationSubscription, useWebSocket, useWebSocketSubscription };
@@ -1,5 +1,5 @@
1
1
  export { agGridReactMock } from "./agGridReact";
2
- export { agGridEnterpriseMock, getAgGridLicenseKey, resetAgGridLicense, } from "./agGridEnterprise";
2
+ export { agGridEnterpriseMock, getAgGridLicenseKey, resetAgGridLicense } from "./agGridEnterprise";
3
3
  export { socketIoClientMock, createMockSocket, getMockSocket, resetMockSocket, } from "./socketIoClient";
4
4
  export type { MockSocket, SocketEventHandler } from "./socketIoClient";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/mocks/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACH,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/mocks/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EACH,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { type RenderOptions, type RenderHookOptions } from "@testing-library/react";
3
3
  import { QueryClient } from "@tanstack/react-query";
4
- import { type ProviderComponent } from "../EveryskApp.js";
4
+ import { type ProviderEntry } from "../EveryskApp.js";
5
5
  import type { AnyRecord } from "../types/anyRecord.d.ts";
6
6
  /**
7
7
  * Test wrapper for apps built on this SDK.
@@ -21,7 +21,7 @@ export declare function createTestQueryClient(): QueryClient;
21
21
  type ProviderOptions = {
22
22
  queryClient?: QueryClient;
23
23
  /** Extra providers, mounted inside the core tree and around the subject. */
24
- providers?: ProviderComponent[];
24
+ providers?: ProviderEntry[];
25
25
  /** Injected instead of `window.APP_ID`, so a test needs no page globals. */
26
26
  appId?: string | null;
27
27
  /** Injected instead of `window.APP_CONFIG`. */
@@ -1 +1 @@
1
- {"version":3,"file":"renderWithProviders.d.ts","sourceRoot":"","sources":["../../src/test/renderWithProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAGH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,wBAAgB,qBAAqB,IAAI,WAAW,CAOnD;AAED,KAAK,eAAe,GAAG;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,SAAS,CAAC;CACjC,CAAC;AAkBF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,EAAE,EAAE,YAAY,EAChB,OAAO,GAAE,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAM;;;uBAjD3D,CAAC,yJAC0D,CAAC,6BACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEb;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,KAAK,EACjD,IAAI,EAAE,CAAC,YAAY,EAAE,KAAK,KAAK,MAAM,EACrC,OAAO,GAAE,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAM;;;;;;;EAgB5E"}
1
+ {"version":3,"file":"renderWithProviders.d.ts","sourceRoot":"","sources":["../../src/test/renderWithProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAGH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,wBAAgB,qBAAqB,IAAI,WAAW,CAOnD;AAED,KAAK,eAAe,GAAG;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,SAAS,CAAC;CACjC,CAAC;AAuBF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,EAAE,EAAE,YAAY,EAChB,OAAO,GAAE,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAM;;;uBAtDvD,CAAC,yJAC0D,CAAC,6BACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqEjB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,KAAK,EACjD,IAAI,EAAE,CAAC,YAAY,EAAE,KAAK,KAAK,MAAM,EACrC,OAAO,GAAE,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAM;;;;;;;EAgB5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderWithProviders.js","names":[],"sources":["../../src/test/renderWithProviders.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\n\nimport {\n render,\n renderHook,\n type RenderOptions,\n type RenderHookOptions,\n} from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { QueryClient } from \"@tanstack/react-query\";\n\nimport { EveryskApp, type ProviderComponent } from \"@/EveryskApp\";\nimport type { AnyRecord } from \"@/types/anyRecord\";\n\n/**\n * Test wrapper for apps built on this SDK.\n *\n * It renders through `EveryskApp` — the very component the app mounts — rather than\n * re-listing the providers. The template's version duplicated the `App.tsx` tree and had to\n * be kept in sync by hand, which is how you get a suite that passes while the app is broken.\n *\n * Each render gets a FRESH QueryClient with retries off and caching disabled, so tests never\n * share server state. Pass your own via `options.queryClient` to seed the cache or assert on\n * it. Optional providers (AG Grid's license, the socket provider) are not mounted by default:\n * pass them in `options.providers` — the template's version wrapped every test in the\n * broadcast provider, which is one of the things that kept it alive with no consumer.\n */\n\n/** Build an isolated QueryClient for a single test (no retries, no caching). */\nexport function createTestQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: { retry: false, gcTime: 0, staleTime: 0, refetchOnWindowFocus: false },\n mutations: { retry: false },\n },\n });\n}\n\ntype ProviderOptions = {\n queryClient?: QueryClient;\n /** Extra providers, mounted inside the core tree and around the subject. */\n providers?: ProviderComponent[];\n /** Injected instead of `window.APP_ID`, so a test needs no page globals. */\n appId?: string | null;\n /** Injected instead of `window.APP_CONFIG`. */\n appEnvironmentVar?: AnyRecord;\n};\n\nconst buildWrapper = ({ queryClient, providers, appId, appEnvironmentVar }: ProviderOptions & {\n queryClient: QueryClient;\n}) =>\n function Wrapper({ children }: { children?: React.ReactNode }) {\n return (\n <EveryskApp\n queryClient={queryClient}\n providers={providers}\n appId={appId}\n appEnvironmentVar={appEnvironmentVar}\n >\n {children}\n </EveryskApp>\n );\n };\n\n/**\n * Render a component inside the core provider tree.\n *\n * Returns everything from RTL's `render`, plus a ready `user` (userEvent.setup()) and the\n * `queryClient` used, so assertions can reach the cache.\n */\nexport function renderWithProviders(\n ui: ReactElement,\n options: ProviderOptions & Omit<RenderOptions, \"wrapper\"> = {},\n) {\n const {\n queryClient = createTestQueryClient(),\n providers,\n appId,\n appEnvironmentVar,\n ...renderOptions\n } = options;\n const user = userEvent.setup();\n\n const result = render(ui, {\n wrapper: buildWrapper({ queryClient, providers, appId, appEnvironmentVar }),\n ...renderOptions,\n });\n\n return { user, queryClient, ...result };\n}\n\n/**\n * Render a hook inside the core provider tree (for entity hooks that need QueryClient,\n * AppAlert, AppConfig, etc.).\n */\nexport function renderHookWithProviders<Result, Props>(\n hook: (initialProps: Props) => Result,\n options: ProviderOptions & Omit<RenderHookOptions<Props>, \"wrapper\"> = {},\n) {\n const {\n queryClient = createTestQueryClient(),\n providers,\n appId,\n appEnvironmentVar,\n ...hookOptions\n } = options;\n\n const result = renderHook(hook, {\n wrapper: buildWrapper({ queryClient, providers, appId, appEnvironmentVar }),\n ...hookOptions,\n });\n\n return { queryClient, ...result };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,wBAAqC;CACjD,OAAO,IAAI,YAAY,EACnB,gBAAgB;EACZ,SAAS;GAAE,OAAO;GAAO,QAAQ;GAAG,WAAW;GAAG,sBAAsB;EAAM;EAC9E,WAAW,EAAE,OAAO,MAAM;CAC9B,EACJ,CAAC;AACL;AAYA,IAAM,gBAAgB,EAAE,aAAa,WAAW,OAAO,wBAGnD,SAAS,QAAQ,EAAE,YAA4C;CAC3D,OACI,oBAAC,YAAD;EACiB;EACF;EACJ;EACY;EAElB;CACO,CAAA;AAEpB;;;;;;;AAQJ,SAAgB,oBACZ,IACA,UAA4D,CAAC,GAC/D;CACE,MAAM,EACF,cAAc,sBAAsB,GACpC,WACA,OACA,mBACA,GAAG,kBACH;CAQJ,OAAO;EAAE,MAPI,UAAU,MAOd;EAAM;EAAa,GALb,OAAO,IAAI;GACtB,SAAS,aAAa;IAAE;IAAa;IAAW;IAAO;GAAkB,CAAC;GAC1E,GAAG;EACP,CAE+B;CAAO;AAC1C;;;;;AAMA,SAAgB,wBACZ,MACA,UAAuE,CAAC,GAC1E;CACE,MAAM,EACF,cAAc,sBAAsB,GACpC,WACA,OACA,mBACA,GAAG,gBACH;CAOJ,OAAO;EAAE;EAAa,GALP,WAAW,MAAM;GAC5B,SAAS,aAAa;IAAE;IAAa;IAAW;IAAO;GAAkB,CAAC;GAC1E,GAAG;EACP,CAEyB;CAAO;AACpC"}
1
+ {"version":3,"file":"renderWithProviders.js","names":[],"sources":["../../src/test/renderWithProviders.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\n\nimport {\n render,\n renderHook,\n type RenderOptions,\n type RenderHookOptions,\n} from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { QueryClient } from \"@tanstack/react-query\";\n\nimport { EveryskApp, type ProviderEntry } from \"@/EveryskApp\";\nimport type { AnyRecord } from \"@/types/anyRecord\";\n\n/**\n * Test wrapper for apps built on this SDK.\n *\n * It renders through `EveryskApp` — the very component the app mounts — rather than\n * re-listing the providers. The template's version duplicated the `App.tsx` tree and had to\n * be kept in sync by hand, which is how you get a suite that passes while the app is broken.\n *\n * Each render gets a FRESH QueryClient with retries off and caching disabled, so tests never\n * share server state. Pass your own via `options.queryClient` to seed the cache or assert on\n * it. Optional providers (AG Grid's license, the socket provider) are not mounted by default:\n * pass them in `options.providers` — the template's version wrapped every test in the\n * broadcast provider, which is one of the things that kept it alive with no consumer.\n */\n\n/** Build an isolated QueryClient for a single test (no retries, no caching). */\nexport function createTestQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: { retry: false, gcTime: 0, staleTime: 0, refetchOnWindowFocus: false },\n mutations: { retry: false },\n },\n });\n}\n\ntype ProviderOptions = {\n queryClient?: QueryClient;\n /** Extra providers, mounted inside the core tree and around the subject. */\n providers?: ProviderEntry[];\n /** Injected instead of `window.APP_ID`, so a test needs no page globals. */\n appId?: string | null;\n /** Injected instead of `window.APP_CONFIG`. */\n appEnvironmentVar?: AnyRecord;\n};\n\nconst buildWrapper = ({\n queryClient,\n providers,\n appId,\n appEnvironmentVar,\n}: ProviderOptions & {\n queryClient: QueryClient;\n}) =>\n function Wrapper({ children }: { children?: React.ReactNode }) {\n return (\n <EveryskApp\n queryClient={queryClient}\n providers={providers}\n appId={appId}\n appEnvironmentVar={appEnvironmentVar}\n >\n {children}\n </EveryskApp>\n );\n };\n\n/**\n * Render a component inside the core provider tree.\n *\n * Returns everything from RTL's `render`, plus a ready `user` (userEvent.setup()) and the\n * `queryClient` used, so assertions can reach the cache.\n */\nexport function renderWithProviders(\n ui: ReactElement,\n options: ProviderOptions & Omit<RenderOptions, \"wrapper\"> = {},\n) {\n const {\n queryClient = createTestQueryClient(),\n providers,\n appId,\n appEnvironmentVar,\n ...renderOptions\n } = options;\n const user = userEvent.setup();\n\n const result = render(ui, {\n wrapper: buildWrapper({ queryClient, providers, appId, appEnvironmentVar }),\n ...renderOptions,\n });\n\n return { user, queryClient, ...result };\n}\n\n/**\n * Render a hook inside the core provider tree (for entity hooks that need QueryClient,\n * AppAlert, AppConfig, etc.).\n */\nexport function renderHookWithProviders<Result, Props>(\n hook: (initialProps: Props) => Result,\n options: ProviderOptions & Omit<RenderHookOptions<Props>, \"wrapper\"> = {},\n) {\n const {\n queryClient = createTestQueryClient(),\n providers,\n appId,\n appEnvironmentVar,\n ...hookOptions\n } = options;\n\n const result = renderHook(hook, {\n wrapper: buildWrapper({ queryClient, providers, appId, appEnvironmentVar }),\n ...hookOptions,\n });\n\n return { queryClient, ...result };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,wBAAqC;CACjD,OAAO,IAAI,YAAY,EACnB,gBAAgB;EACZ,SAAS;GAAE,OAAO;GAAO,QAAQ;GAAG,WAAW;GAAG,sBAAsB;EAAM;EAC9E,WAAW,EAAE,OAAO,MAAM;CAC9B,EACJ,CAAC;AACL;AAYA,IAAM,gBAAgB,EAClB,aACA,WACA,OACA,wBAIA,SAAS,QAAQ,EAAE,YAA4C;CAC3D,OACI,oBAAC,YAAD;EACiB;EACF;EACJ;EACY;EAElB;CACO,CAAA;AAEpB;;;;;;;AAQJ,SAAgB,oBACZ,IACA,UAA4D,CAAC,GAC/D;CACE,MAAM,EACF,cAAc,sBAAsB,GACpC,WACA,OACA,mBACA,GAAG,kBACH;CAQJ,OAAO;EAAE,MAPI,UAAU,MAOd;EAAM;EAAa,GALb,OAAO,IAAI;GACtB,SAAS,aAAa;IAAE;IAAa;IAAW;IAAO;GAAkB,CAAC;GAC1E,GAAG;EACP,CAE+B;CAAO;AAC1C;;;;;AAMA,SAAgB,wBACZ,MACA,UAAuE,CAAC,GAC1E;CACE,MAAM,EACF,cAAc,sBAAsB,GACpC,WACA,OACA,mBACA,GAAG,gBACH;CAOJ,OAAO;EAAE;EAAa,GALP,WAAW,MAAM;GAC5B,SAAS,aAAa;IAAE;IAAa;IAAW;IAAO;GAAkB,CAAC;GAC1E,GAAG;EACP,CAEyB;CAAO;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"setup.js","names":[],"sources":["../../src/test/setup.ts"],"sourcesContent":["import { afterEach, vi } from \"vitest\";\nimport { cleanup } from \"@testing-library/react\";\n\nimport \"@testing-library/jest-dom/vitest\";\n\n// Unmount React trees and clear the jsdom document between tests so they stay isolated.\nafterEach(() => {\n cleanup();\n});\n\n// jsdom does not implement matchMedia; MUI's `useMediaQuery` needs it. The theme no longer\n// reads it — it is pinned to the brand dark theme — but responsive components still do.\nif (!window.matchMedia) {\n window.matchMedia = vi.fn().mockImplementation((query: string) => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: vi.fn(),\n removeListener: vi.fn(),\n addEventListener: vi.fn(),\n removeEventListener: vi.fn(),\n dispatchEvent: vi.fn(),\n }));\n}\n\n// jsdom does not implement ResizeObserver; several MUI components observe their container.\nif (!globalThis.ResizeObserver) {\n globalThis.ResizeObserver = class {\n observe(): void {}\n unobserve(): void {}\n disconnect(): void {}\n };\n}\n\n// The template stubbed `BroadcastChannel` here, which jsdom does not implement. Nothing in\n// the SDK constructs one any more — the broadcast context is gone, superseded by the socket\n// layer — so the stub would only be dead setup. Whatever needs it can bring its own.\n\n// Deliberately no `window.APP_ID` / `window.APP_CONFIG` defaults here.\n//\n// The template seeded them (\"app_template\", {}) because its providers read the globals\n// directly and would otherwise see nothing. The SDK's providers handle absence on their own —\n// `AppConfigProvider` reports `appId: null`, `BroadcastChannelProvider` falls back to its own\n// channel name — and seeding the globals would hide exactly that path from the suite, which is\n// the path every consumer hits in dev. A test that needs configuration injects it:\n// `renderWithProviders(ui, { appId, appEnvironmentVar })`.\n"],"mappings":";;;;AAMA,gBAAgB;CACd,QAAQ;AACV,CAAC;AAID,IAAI,CAAC,OAAO,YACV,OAAO,aAAa,GAAG,GAAG,CAAC,CAAC,oBAAoB,WAAmB;CACjE,SAAS;CACT,OAAO;CACP,UAAU;CACV,aAAa,GAAG,GAAG;CACnB,gBAAgB,GAAG,GAAG;CACtB,kBAAkB,GAAG,GAAG;CACxB,qBAAqB,GAAG,GAAG;CAC3B,eAAe,GAAG,GAAG;AACvB,EAAE;AAIJ,IAAI,CAAC,WAAW,gBACd,WAAW,iBAAiB,MAAM;CAChC,UAAgB,CAAC;CACjB,YAAkB,CAAC;CACnB,aAAmB,CAAC;AACtB"}
1
+ {"version":3,"file":"setup.js","names":[],"sources":["../../src/test/setup.ts"],"sourcesContent":["import { afterEach, vi } from \"vitest\";\nimport { cleanup } from \"@testing-library/react\";\n\nimport \"@testing-library/jest-dom/vitest\";\n\n// Unmount React trees and clear the jsdom document between tests so they stay isolated.\nafterEach(() => {\n cleanup();\n});\n\n// jsdom does not implement matchMedia; MUI's `useMediaQuery` needs it. The theme no longer\n// reads it — it is pinned to the brand dark theme — but responsive components still do.\nif (!window.matchMedia) {\n window.matchMedia = vi.fn().mockImplementation((query: string) => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: vi.fn(),\n removeListener: vi.fn(),\n addEventListener: vi.fn(),\n removeEventListener: vi.fn(),\n dispatchEvent: vi.fn(),\n }));\n}\n\n// jsdom does not implement ResizeObserver; several MUI components observe their container.\nif (!globalThis.ResizeObserver) {\n globalThis.ResizeObserver = class {\n observe(): void {}\n unobserve(): void {}\n disconnect(): void {}\n };\n}\n\n// The template stubbed `BroadcastChannel` here, which jsdom does not implement. Nothing in\n// the SDK constructs one any more — the broadcast context is gone, superseded by the socket\n// layer — so the stub would only be dead setup. Whatever needs it can bring its own.\n\n// Deliberately no `window.APP_ID` / `window.APP_CONFIG` defaults here.\n//\n// The template seeded them (\"app_template\", {}) because its providers read the globals\n// directly and would otherwise see nothing. The SDK's providers handle absence on their own —\n// `AppConfigProvider` reports `appId: null`, `BroadcastChannelProvider` falls back to its own\n// channel name — and seeding the globals would hide exactly that path from the suite, which is\n// the path every consumer hits in dev. A test that needs configuration injects it:\n// `renderWithProviders(ui, { appId, appEnvironmentVar })`.\n"],"mappings":";;;;AAMA,gBAAgB;CACZ,QAAQ;AACZ,CAAC;AAID,IAAI,CAAC,OAAO,YACR,OAAO,aAAa,GAAG,GAAG,CAAC,CAAC,oBAAoB,WAAmB;CAC/D,SAAS;CACT,OAAO;CACP,UAAU;CACV,aAAa,GAAG,GAAG;CACnB,gBAAgB,GAAG,GAAG;CACtB,kBAAkB,GAAG,GAAG;CACxB,qBAAqB,GAAG,GAAG;CAC3B,eAAe,GAAG,GAAG;AACzB,EAAE;AAIN,IAAI,CAAC,WAAW,gBACZ,WAAW,iBAAiB,MAAM;CAC9B,UAAgB,CAAC;CACjB,YAAkB,CAAC;CACnB,aAAmB,CAAC;AACxB"}
@@ -5,5 +5,5 @@ export { EveryskDarkTheme } from "./themes/EveryskDark";
5
5
  export { DefaultLightTheme } from "./themes/DefaultLight";
6
6
  export { DefaultDarkTheme } from "./themes/DefaultDark";
7
7
  export { MidnightEmberTheme } from "./themes/MidnightEmber";
8
- export { components } from "./overrides";
8
+ export { componentOverrides } from "./overrides";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import type { Components, Theme } from "@mui/material/styles";
2
2
  /**
3
3
  * Shared MUI component overrides applied by every theme (light, dark and branded).
4
- * They read `theme.palette.mode`, so the same set works for any palette.
4
+ * They read `theme.palette.mode`, so the same set works for any palette. Public as
5
+ * `componentOverrides` for an app that builds its own theme; `components` alone, at the root of
6
+ * the package, did not say whose components.
5
7
  */
6
- export declare const components: Components<Omit<Theme, "components">>;
8
+ export declare const componentOverrides: Components<Omit<Theme, "components">>;
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAe9D;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAW5D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAe9D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAWpE,CAAC"}
@@ -11,9 +11,11 @@ import { MuiButton } from "./muiButton.js";
11
11
  //#region src/theme/overrides/index.ts
12
12
  /**
13
13
  * Shared MUI component overrides applied by every theme (light, dark and branded).
14
- * They read `theme.palette.mode`, so the same set works for any palette.
14
+ * They read `theme.palette.mode`, so the same set works for any palette. Public as
15
+ * `componentOverrides` for an app that builds its own theme; `components` alone, at the root of
16
+ * the package, did not say whose components.
15
17
  */
16
- var components = {
18
+ var componentOverrides = {
17
19
  MuiCssBaseline,
18
20
  MuiDatePicker,
19
21
  MuiTextField,
@@ -26,6 +28,6 @@ var components = {
26
28
  MuiIconButton
27
29
  };
28
30
  //#endregion
29
- export { components };
31
+ export { componentOverrides };
30
32
 
31
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/theme/overrides/index.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nimport type { } from '@mui/x-date-pickers/themeAugmentation';\n\nimport { MuiCssBaseline } from \"./muiCssBaseline\";\nimport { MuiDatePicker } from \"./muiDatePicker\";\nimport { MuiTextField } from \"./muiTextField\";\nimport { MuiFormControl } from \"./muiFormControl\";\nimport { MuiSelect } from \"./muiSelect\";\nimport { MuiSvgIcon } from \"./muiSvgIcon\";\nimport { MuiToggleButton } from \"./muiToggleButton\";\nimport { MuiToggleButtonGroup } from \"./muiToggleButtonGroup\";\nimport { MuiIconButton } from \"./muiIconButton\";\nimport { MuiButton } from \"./muiButton\";\n\n/**\n * Shared MUI component overrides applied by every theme (light, dark and branded).\n * They read `theme.palette.mode`, so the same set works for any palette.\n */\nexport const components: Components<Omit<Theme, \"components\">> = {\n MuiCssBaseline,\n MuiDatePicker,\n MuiTextField,\n MuiSelect,\n MuiFormControl,\n MuiSvgIcon,\n MuiToggleButton,\n MuiToggleButtonGroup,\n MuiButton,\n MuiIconButton,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,IAAa,aAAoD;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/theme/overrides/index.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nimport type {} from \"@mui/x-date-pickers/themeAugmentation\";\n\nimport { MuiCssBaseline } from \"./muiCssBaseline\";\nimport { MuiDatePicker } from \"./muiDatePicker\";\nimport { MuiTextField } from \"./muiTextField\";\nimport { MuiFormControl } from \"./muiFormControl\";\nimport { MuiSelect } from \"./muiSelect\";\nimport { MuiSvgIcon } from \"./muiSvgIcon\";\nimport { MuiToggleButton } from \"./muiToggleButton\";\nimport { MuiToggleButtonGroup } from \"./muiToggleButtonGroup\";\nimport { MuiIconButton } from \"./muiIconButton\";\nimport { MuiButton } from \"./muiButton\";\n\n/**\n * Shared MUI component overrides applied by every theme (light, dark and branded).\n * They read `theme.palette.mode`, so the same set works for any palette. Public as\n * `componentOverrides` for an app that builds its own theme; `components` alone, at the root of\n * the package, did not say whose components.\n */\nexport const componentOverrides: Components<Omit<Theme, \"components\">> = {\n MuiCssBaseline,\n MuiDatePicker,\n MuiTextField,\n MuiSelect,\n MuiFormControl,\n MuiSvgIcon,\n MuiToggleButton,\n MuiToggleButtonGroup,\n MuiButton,\n MuiIconButton,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,IAAa,qBAA4D;CACrE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ"}
@@ -1,3 +1,3 @@
1
- import type { Components, Theme } from '@mui/material/styles';
2
- export declare const MuiButton: Components<Theme>['MuiButton'];
1
+ import type { Components, Theme } from "@mui/material/styles";
2
+ export declare const MuiButton: Components<Theme>["MuiButton"];
3
3
  //# sourceMappingURL=muiButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"muiButton.js","names":[],"sources":["../../../src/theme/overrides/muiButton.ts"],"sourcesContent":["import type { Components, Theme } from '@mui/material/styles';\n\nexport const MuiButton: Components<Theme>['MuiButton'] = {\n defaultProps: {\n size: 'small',\n },\n};\n"],"mappings":";AAEA,IAAa,YAA4C,EACrD,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiButton.js","names":[],"sources":["../../../src/theme/overrides/muiButton.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiButton: Components<Theme>[\"MuiButton\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,YAA4C,EACrD,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiCssBaseline.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiCssBaseline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,cAAc;4BACC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BhC,CAAA"}
1
+ {"version":3,"file":"muiCssBaseline.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiCssBaseline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,cAAc;4BACC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiCssBaseline.js","names":[],"sources":["../../../src/theme/overrides/muiCssBaseline.ts"],"sourcesContent":["import * as colors from \"@mui/material/colors\";\nimport type { Theme } from \"@mui/material/styles\";\n\nexport const MuiCssBaseline = {\n styleOverrides: (theme: Theme) => ({\n \"*::-webkit-scrollbar\": {\n width: 8,\n height: 8,\n },\n \"*::-webkit-scrollbar-thumb\": {\n borderRadius: 10,\n backgroundColor: '#959595'\n\n },\n \"*::-webkit-scrollbar-thumb:hover \": {\n backgroundColor: '#959595'\n },\n \"*:hover::-webkit-scrollbar-thumb\": {\n backgroundColor: '#959595'\n },\n\n \"*::-webkit-scrollbar-thumb:active\": {\n backgroundColor: theme.palette.primary.main\n },\n\n \"*::-moz-selection\": {\n color: (theme.palette.mode === \"dark\" ? colors.common.black : colors.common.white),\n backgroundColor: theme.palette.primary.main\n },\n \"*::selection\": {\n color: (theme.palette.mode === \"dark\") ? colors.common.black : colors.common.white,\n backgroundColor: theme.palette.primary.main\n }\n })\n}"],"mappings":";;AAGA,IAAa,iBAAiB,EAC1B,iBAAiB,WAAkB;CAC/B,wBAAwB;EACpB,OAAO;EACP,QAAQ;CACZ;CACA,8BAA8B;EAC1B,cAAc;EACd,iBAAiB;CAErB;CACA,qCAAqC,EACjC,iBAAiB,UACrB;CACA,oCAAoC,EAChC,iBAAiB,UACrB;CAEA,qCAAqC,EACjC,iBAAiB,MAAM,QAAQ,QAAQ,KAC3C;CAEA,qBAAqB;EACjB,OAAQ,MAAM,QAAQ,SAAS,SAAS,OAAO,OAAO,QAAQ,OAAO,OAAO;EAC5E,iBAAiB,MAAM,QAAQ,QAAQ;CAC3C;CACA,gBAAgB;EACZ,OAAQ,MAAM,QAAQ,SAAS,SAAU,OAAO,OAAO,QAAQ,OAAO,OAAO;EAC7E,iBAAiB,MAAM,QAAQ,QAAQ;CAC3C;AACJ,GACJ"}
1
+ {"version":3,"file":"muiCssBaseline.js","names":[],"sources":["../../../src/theme/overrides/muiCssBaseline.ts"],"sourcesContent":["import * as colors from \"@mui/material/colors\";\nimport type { Theme } from \"@mui/material/styles\";\n\nexport const MuiCssBaseline = {\n styleOverrides: (theme: Theme) => ({\n \"*::-webkit-scrollbar\": {\n width: 8,\n height: 8,\n },\n \"*::-webkit-scrollbar-thumb\": {\n borderRadius: 10,\n backgroundColor: \"#959595\",\n },\n \"*::-webkit-scrollbar-thumb:hover \": {\n backgroundColor: \"#959595\",\n },\n \"*:hover::-webkit-scrollbar-thumb\": {\n backgroundColor: \"#959595\",\n },\n\n \"*::-webkit-scrollbar-thumb:active\": {\n backgroundColor: theme.palette.primary.main,\n },\n\n \"*::-moz-selection\": {\n color: theme.palette.mode === \"dark\" ? colors.common.black : colors.common.white,\n backgroundColor: theme.palette.primary.main,\n },\n \"*::selection\": {\n color: theme.palette.mode === \"dark\" ? colors.common.black : colors.common.white,\n backgroundColor: theme.palette.primary.main,\n },\n }),\n};\n"],"mappings":";;AAGA,IAAa,iBAAiB,EAC1B,iBAAiB,WAAkB;CAC/B,wBAAwB;EACpB,OAAO;EACP,QAAQ;CACZ;CACA,8BAA8B;EAC1B,cAAc;EACd,iBAAiB;CACrB;CACA,qCAAqC,EACjC,iBAAiB,UACrB;CACA,oCAAoC,EAChC,iBAAiB,UACrB;CAEA,qCAAqC,EACjC,iBAAiB,MAAM,QAAQ,QAAQ,KAC3C;CAEA,qBAAqB;EACjB,OAAO,MAAM,QAAQ,SAAS,SAAS,OAAO,OAAO,QAAQ,OAAO,OAAO;EAC3E,iBAAiB,MAAM,QAAQ,QAAQ;CAC3C;CACA,gBAAgB;EACZ,OAAO,MAAM,QAAQ,SAAS,SAAS,OAAO,OAAO,QAAQ,OAAO,OAAO;EAC3E,iBAAiB,MAAM,QAAQ,QAAQ;CAC3C;AACJ,GACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiDatePicker.js","names":[],"sources":["../../../src/theme/overrides/muiDatePicker.ts"],"sourcesContent":["export const MuiDatePicker = {\n defaultProps: {\n slotProps: { textField: { size: 'small' as const } },\n },\n};"],"mappings":";AAAA,IAAa,gBAAgB,EACzB,cAAc,EACV,WAAW,EAAE,WAAW,EAAE,MAAM,QAAiB,EAAE,EACvD,EACJ"}
1
+ {"version":3,"file":"muiDatePicker.js","names":[],"sources":["../../../src/theme/overrides/muiDatePicker.ts"],"sourcesContent":["export const MuiDatePicker = {\n defaultProps: {\n slotProps: { textField: { size: \"small\" as const } },\n },\n};\n"],"mappings":";AAAA,IAAa,gBAAgB,EACzB,cAAc,EACV,WAAW,EAAE,WAAW,EAAE,MAAM,QAAiB,EAAE,EACvD,EACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiFormControl.js","names":[],"sources":["../../../src/theme/overrides/muiFormControl.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiFormControl: Components<Theme>[\"MuiFormControl\"] = {\n defaultProps: {\n size: 'small',\n },\n};"],"mappings":";AAEA,IAAa,iBAAsD,EAC/D,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiFormControl.js","names":[],"sources":["../../../src/theme/overrides/muiFormControl.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiFormControl: Components<Theme>[\"MuiFormControl\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,iBAAsD,EAC/D,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1,3 +1,3 @@
1
- import type { Components, Theme } from '@mui/material/styles';
2
- export declare const MuiIconButton: Components<Theme>['MuiIconButton'];
1
+ import type { Components, Theme } from "@mui/material/styles";
2
+ export declare const MuiIconButton: Components<Theme>["MuiIconButton"];
3
3
  //# sourceMappingURL=muiIconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"muiIconButton.js","names":[],"sources":["../../../src/theme/overrides/muiIconButton.ts"],"sourcesContent":["import type { Components, Theme } from '@mui/material/styles';\n\nexport const MuiIconButton: Components<Theme>['MuiIconButton'] = {\n defaultProps: {\n size: 'small',\n },\n};\n"],"mappings":";AAEA,IAAa,gBAAoD,EAC7D,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiIconButton.js","names":[],"sources":["../../../src/theme/overrides/muiIconButton.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiIconButton: Components<Theme>[\"MuiIconButton\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,gBAAoD,EAC7D,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiSelect.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,WAAW,CAIpD,CAAA"}
1
+ {"version":3,"file":"muiSelect.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,WAAW,CAIpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiSelect.js","names":[],"sources":["../../../src/theme/overrides/muiSelect.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiSelect: Components<Theme>[\"MuiSelect\"] = {\n defaultProps: {\n size: 'small',\n },\n}"],"mappings":";AAEA,IAAa,YAA4C,EACrD,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiSelect.js","names":[],"sources":["../../../src/theme/overrides/muiSelect.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiSelect: Components<Theme>[\"MuiSelect\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,YAA4C,EACrD,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiSvgIcon.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiSvgIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAItD,CAAA"}
1
+ {"version":3,"file":"muiSvgIcon.d.ts","sourceRoot":"","sources":["../../../src/theme/overrides/muiSvgIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAItD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiSvgIcon.js","names":[],"sources":["../../../src/theme/overrides/muiSvgIcon.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiSvgIcon: Components<Theme>[\"MuiSvgIcon\"] = {\n defaultProps: {\n fontSize: 'small',\n },\n}"],"mappings":";AAEA,IAAa,aAA8C,EACvD,cAAc,EACV,UAAU,QACd,EACJ"}
1
+ {"version":3,"file":"muiSvgIcon.js","names":[],"sources":["../../../src/theme/overrides/muiSvgIcon.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiSvgIcon: Components<Theme>[\"MuiSvgIcon\"] = {\n defaultProps: {\n fontSize: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,aAA8C,EACvD,cAAc,EACV,UAAU,QACd,EACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"muiTextField.js","names":[],"sources":["../../../src/theme/overrides/muiTextField.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiTextField: Components<Theme>[\"MuiTextField\"] = {\n defaultProps: {\n size: \"small\",\n },\n};"],"mappings":";AAEA,IAAa,eAAkD,EAC3D,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiTextField.js","names":[],"sources":["../../../src/theme/overrides/muiTextField.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiTextField: Components<Theme>[\"MuiTextField\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,eAAkD,EAC3D,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1,3 +1,3 @@
1
- import type { Components, Theme } from '@mui/material/styles';
2
- export declare const MuiToggleButton: Components<Theme>['MuiToggleButton'];
1
+ import type { Components, Theme } from "@mui/material/styles";
2
+ export declare const MuiToggleButton: Components<Theme>["MuiToggleButton"];
3
3
  //# sourceMappingURL=muiToggleButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"muiToggleButton.js","names":[],"sources":["../../../src/theme/overrides/muiToggleButton.ts"],"sourcesContent":["import type { Components, Theme } from '@mui/material/styles';\n\nexport const MuiToggleButton: Components<Theme>['MuiToggleButton'] = {\n defaultProps: {\n size: 'small',\n },\n};"],"mappings":";AAEA,IAAa,kBAAwD,EACjE,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiToggleButton.js","names":[],"sources":["../../../src/theme/overrides/muiToggleButton.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiToggleButton: Components<Theme>[\"MuiToggleButton\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,kBAAwD,EACjE,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1,3 +1,3 @@
1
- import type { Components, Theme } from '@mui/material/styles';
2
- export declare const MuiToggleButtonGroup: Components<Theme>['MuiToggleButtonGroup'];
1
+ import type { Components, Theme } from "@mui/material/styles";
2
+ export declare const MuiToggleButtonGroup: Components<Theme>["MuiToggleButtonGroup"];
3
3
  //# sourceMappingURL=muiToggleButtonGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"muiToggleButtonGroup.js","names":[],"sources":["../../../src/theme/overrides/muiToggleButtonGroup.ts"],"sourcesContent":["import type { Components, Theme } from '@mui/material/styles';\n\nexport const MuiToggleButtonGroup: Components<Theme>['MuiToggleButtonGroup'] = {\n defaultProps: {\n size: 'small',\n },\n};"],"mappings":";AAEA,IAAa,uBAAkE,EAC3E,cAAc,EACV,MAAM,QACV,EACJ"}
1
+ {"version":3,"file":"muiToggleButtonGroup.js","names":[],"sources":["../../../src/theme/overrides/muiToggleButtonGroup.ts"],"sourcesContent":["import type { Components, Theme } from \"@mui/material/styles\";\n\nexport const MuiToggleButtonGroup: Components<Theme>[\"MuiToggleButtonGroup\"] = {\n defaultProps: {\n size: \"small\",\n },\n};\n"],"mappings":";AAEA,IAAa,uBAAkE,EAC3E,cAAc,EACV,MAAM,QACV,EACJ"}
@@ -1,4 +1,4 @@
1
- import { components } from "../overrides/index.js";
1
+ import { componentOverrides } from "../overrides/index.js";
2
2
  import { createTheme } from "@mui/material/styles";
3
3
  //#region src/theme/themes/DefaultDark.ts
4
4
  /**
@@ -7,7 +7,7 @@ import { createTheme } from "@mui/material/styles";
7
7
  */
8
8
  var DefaultDarkTheme = createTheme({
9
9
  palette: { mode: "dark" },
10
- components
10
+ components: componentOverrides
11
11
  });
12
12
  //#endregion
13
13
  export { DefaultDarkTheme };
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultDark.js","names":[],"sources":["../../../src/theme/themes/DefaultDark.ts"],"sourcesContent":["import { createTheme, type Theme } from \"@mui/material/styles\";\n\nimport { components } from \"@/theme/overrides\";\n\n/**\n * Neutral dark theme. Uses MUI's default palette (no brand color) plus the\n * shared component overrides — a clean starting point each app can customize.\n */\nexport const DefaultDarkTheme: Theme = createTheme({\n palette: {\n mode: \"dark\",\n },\n components,\n});\n"],"mappings":";;;;;;;AAQA,IAAa,mBAA0B,YAAY;CAC/C,SAAS,EACL,MAAM,OACV;CACA;AACJ,CAAC"}
1
+ {"version":3,"file":"DefaultDark.js","names":[],"sources":["../../../src/theme/themes/DefaultDark.ts"],"sourcesContent":["import { createTheme, type Theme } from \"@mui/material/styles\";\n\nimport { componentOverrides } from \"@/theme/overrides\";\n\n/**\n * Neutral dark theme. Uses MUI's default palette (no brand color) plus the\n * shared component overrides — a clean starting point each app can customize.\n */\nexport const DefaultDarkTheme: Theme = createTheme({\n palette: {\n mode: \"dark\",\n },\n components: componentOverrides,\n});\n"],"mappings":";;;;;;;AAQA,IAAa,mBAA0B,YAAY;CAC/C,SAAS,EACL,MAAM,OACV;CACA,YAAY;AAChB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { components } from "../overrides/index.js";
1
+ import { componentOverrides } from "../overrides/index.js";
2
2
  import { createTheme } from "@mui/material/styles";
3
3
  //#region src/theme/themes/DefaultLight.ts
4
4
  /**
@@ -7,7 +7,7 @@ import { createTheme } from "@mui/material/styles";
7
7
  */
8
8
  var DefaultLightTheme = createTheme({
9
9
  palette: { mode: "light" },
10
- components
10
+ components: componentOverrides
11
11
  });
12
12
  //#endregion
13
13
  export { DefaultLightTheme };