@darajs/core 1.0.0-a.1

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 (462) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/dist/actions/download-content.d.ts +8 -0
  4. package/dist/actions/download-content.d.ts.map +1 -0
  5. package/dist/actions/download-content.js +46 -0
  6. package/dist/actions/download-content.js.map +1 -0
  7. package/dist/actions/download-variable.d.ts +8 -0
  8. package/dist/actions/download-variable.d.ts.map +1 -0
  9. package/dist/actions/download-variable.js +153 -0
  10. package/dist/actions/download-variable.js.map +1 -0
  11. package/dist/actions/index.d.ts +11 -0
  12. package/dist/actions/index.d.ts.map +1 -0
  13. package/dist/actions/index.js +11 -0
  14. package/dist/actions/index.js.map +1 -0
  15. package/dist/actions/logout.d.ts +8 -0
  16. package/dist/actions/logout.d.ts.map +1 -0
  17. package/dist/actions/logout.js +24 -0
  18. package/dist/actions/logout.js.map +1 -0
  19. package/dist/actions/navigate-to.d.ts +8 -0
  20. package/dist/actions/navigate-to.d.ts.map +1 -0
  21. package/dist/actions/navigate-to.js +77 -0
  22. package/dist/actions/navigate-to.js.map +1 -0
  23. package/dist/actions/notify.d.ts +8 -0
  24. package/dist/actions/notify.d.ts.map +1 -0
  25. package/dist/actions/notify.js +16 -0
  26. package/dist/actions/notify.js.map +1 -0
  27. package/dist/actions/reset-variables.d.ts +8 -0
  28. package/dist/actions/reset-variables.d.ts.map +1 -0
  29. package/dist/actions/reset-variables.js +24 -0
  30. package/dist/actions/reset-variables.js.map +1 -0
  31. package/dist/actions/side-effect.d.ts +8 -0
  32. package/dist/actions/side-effect.d.ts.map +1 -0
  33. package/dist/actions/side-effect.js +44 -0
  34. package/dist/actions/side-effect.js.map +1 -0
  35. package/dist/actions/trigger-variable.d.ts +8 -0
  36. package/dist/actions/trigger-variable.d.ts.map +1 -0
  37. package/dist/actions/trigger-variable.js +25 -0
  38. package/dist/actions/trigger-variable.js.map +1 -0
  39. package/dist/actions/update-variable.d.ts +9 -0
  40. package/dist/actions/update-variable.d.ts.map +1 -0
  41. package/dist/actions/update-variable.js +89 -0
  42. package/dist/actions/update-variable.js.map +1 -0
  43. package/dist/actions/utils.d.ts +9 -0
  44. package/dist/actions/utils.d.ts.map +1 -0
  45. package/dist/actions/utils.js +37 -0
  46. package/dist/actions/utils.js.map +1 -0
  47. package/dist/api/core.d.ts +34 -0
  48. package/dist/api/core.d.ts.map +1 -0
  49. package/dist/api/core.js +110 -0
  50. package/dist/api/core.js.map +1 -0
  51. package/dist/api/http.d.ts +9 -0
  52. package/dist/api/http.d.ts.map +1 -0
  53. package/dist/api/http.js +38 -0
  54. package/dist/api/http.js.map +1 -0
  55. package/dist/api/index.d.ts +5 -0
  56. package/dist/api/index.d.ts.map +1 -0
  57. package/dist/api/index.js +5 -0
  58. package/dist/api/index.js.map +1 -0
  59. package/dist/api/websocket.d.ts +140 -0
  60. package/dist/api/websocket.d.ts.map +1 -0
  61. package/dist/api/websocket.js +241 -0
  62. package/dist/api/websocket.js.map +1 -0
  63. package/dist/assets/fonts/Manrope-VariableFont_wght.ttf +0 -0
  64. package/dist/assets/login-background.svg +11 -0
  65. package/dist/assets/logo.svg +12 -0
  66. package/dist/auth/auth-context.d.ts +22 -0
  67. package/dist/auth/auth-context.d.ts.map +1 -0
  68. package/dist/auth/auth-context.js +18 -0
  69. package/dist/auth/auth-context.js.map +1 -0
  70. package/dist/auth/auth-wrapper.d.ts +14 -0
  71. package/dist/auth/auth-wrapper.d.ts.map +1 -0
  72. package/dist/auth/auth-wrapper.js +90 -0
  73. package/dist/auth/auth-wrapper.js.map +1 -0
  74. package/dist/auth/auth.d.ts +61 -0
  75. package/dist/auth/auth.d.ts.map +1 -0
  76. package/dist/auth/auth.js +161 -0
  77. package/dist/auth/auth.js.map +1 -0
  78. package/dist/auth/basic/basic-auth-login.d.ts +6 -0
  79. package/dist/auth/basic/basic-auth-login.d.ts.map +1 -0
  80. package/dist/auth/basic/basic-auth-login.js +174 -0
  81. package/dist/auth/basic/basic-auth-login.js.map +1 -0
  82. package/dist/auth/basic/basic-auth-logout.d.ts +6 -0
  83. package/dist/auth/basic/basic-auth-logout.d.ts.map +1 -0
  84. package/dist/auth/basic/basic-auth-logout.js +18 -0
  85. package/dist/auth/basic/basic-auth-logout.js.map +1 -0
  86. package/dist/auth/default/default-auth-login.d.ts +6 -0
  87. package/dist/auth/default/default-auth-login.d.ts.map +1 -0
  88. package/dist/auth/default/default-auth-login.js +66 -0
  89. package/dist/auth/default/default-auth-login.js.map +1 -0
  90. package/dist/auth/index.d.ts +7 -0
  91. package/dist/auth/index.d.ts.map +1 -0
  92. package/dist/auth/index.js +7 -0
  93. package/dist/auth/index.js.map +1 -0
  94. package/dist/components/fallback/default.d.ts +5 -0
  95. package/dist/components/fallback/default.d.ts.map +1 -0
  96. package/dist/components/fallback/default.js +10 -0
  97. package/dist/components/fallback/default.js.map +1 -0
  98. package/dist/components/fallback/dots.d.ts +8 -0
  99. package/dist/components/fallback/dots.d.ts.map +1 -0
  100. package/dist/components/fallback/dots.js +77 -0
  101. package/dist/components/fallback/dots.js.map +1 -0
  102. package/dist/components/fallback/row.d.ts +5 -0
  103. package/dist/components/fallback/row.d.ts.map +1 -0
  104. package/dist/components/fallback/row.js +14 -0
  105. package/dist/components/fallback/row.js.map +1 -0
  106. package/dist/components/for/for.d.ts +35 -0
  107. package/dist/components/for/for.d.ts.map +1 -0
  108. package/dist/components/for/for.js +43 -0
  109. package/dist/components/for/for.js.map +1 -0
  110. package/dist/components/index.d.ts +9 -0
  111. package/dist/components/index.d.ts.map +1 -0
  112. package/dist/components/index.js +9 -0
  113. package/dist/components/index.js.map +1 -0
  114. package/dist/components/menu/menu.d.ts +14 -0
  115. package/dist/components/menu/menu.d.ts.map +1 -0
  116. package/dist/components/menu/menu.js +58 -0
  117. package/dist/components/menu/menu.js.map +1 -0
  118. package/dist/components/progress-tracker/progress-tracker.d.ts +18 -0
  119. package/dist/components/progress-tracker/progress-tracker.d.ts.map +1 -0
  120. package/dist/components/progress-tracker/progress-tracker.js +202 -0
  121. package/dist/components/progress-tracker/progress-tracker.js.map +1 -0
  122. package/dist/components/router-content/router-content.d.ts +14 -0
  123. package/dist/components/router-content/router-content.d.ts.map +1 -0
  124. package/dist/components/router-content/router-content.js +17 -0
  125. package/dist/components/router-content/router-content.js.map +1 -0
  126. package/dist/components/side-bar-frame/side-bar-frame.d.ts +21 -0
  127. package/dist/components/side-bar-frame/side-bar-frame.d.ts.map +1 -0
  128. package/dist/components/side-bar-frame/side-bar-frame.js +63 -0
  129. package/dist/components/side-bar-frame/side-bar-frame.js.map +1 -0
  130. package/dist/components/top-bar-frame/top-bar-frame.d.ts +16 -0
  131. package/dist/components/top-bar-frame/top-bar-frame.d.ts.map +1 -0
  132. package/dist/components/top-bar-frame/top-bar-frame.js +70 -0
  133. package/dist/components/top-bar-frame/top-bar-frame.js.map +1 -0
  134. package/dist/dara_core-1.0.0a1-py3-none-any.whl +0 -0
  135. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts +17 -0
  136. package/dist/devtools/backend-errors/backend-errors-ctx.d.ts.map +1 -0
  137. package/dist/devtools/backend-errors/backend-errors-ctx.js +37 -0
  138. package/dist/devtools/backend-errors/backend-errors-ctx.js.map +1 -0
  139. package/dist/devtools/backend-errors/backend-errors.d.ts +6 -0
  140. package/dist/devtools/backend-errors/backend-errors.d.ts.map +1 -0
  141. package/dist/devtools/backend-errors/backend-errors.js +57 -0
  142. package/dist/devtools/backend-errors/backend-errors.js.map +1 -0
  143. package/dist/devtools/backend-errors/error-display.d.ts +22 -0
  144. package/dist/devtools/backend-errors/error-display.d.ts.map +1 -0
  145. package/dist/devtools/backend-errors/error-display.js +99 -0
  146. package/dist/devtools/backend-errors/error-display.js.map +1 -0
  147. package/dist/devtools/backend-errors/index.d.ts +3 -0
  148. package/dist/devtools/backend-errors/index.d.ts.map +1 -0
  149. package/dist/devtools/backend-errors/index.js +3 -0
  150. package/dist/devtools/backend-errors/index.js.map +1 -0
  151. package/dist/devtools/devtools-content.d.ts +12 -0
  152. package/dist/devtools/devtools-content.d.ts.map +1 -0
  153. package/dist/devtools/devtools-content.js +73 -0
  154. package/dist/devtools/devtools-content.js.map +1 -0
  155. package/dist/devtools/devtools-context.d.ts +7 -0
  156. package/dist/devtools/devtools-context.d.ts.map +1 -0
  157. package/dist/devtools/devtools-context.js +9 -0
  158. package/dist/devtools/devtools-context.js.map +1 -0
  159. package/dist/devtools/devtools-wrapper.d.ts +8 -0
  160. package/dist/devtools/devtools-wrapper.d.ts.map +1 -0
  161. package/dist/devtools/devtools-wrapper.js +64 -0
  162. package/dist/devtools/devtools-wrapper.js.map +1 -0
  163. package/dist/devtools/devtools.d.ts +5 -0
  164. package/dist/devtools/devtools.d.ts.map +1 -0
  165. package/dist/devtools/devtools.js +10 -0
  166. package/dist/devtools/devtools.js.map +1 -0
  167. package/dist/devtools/floating-button.d.ts +24 -0
  168. package/dist/devtools/floating-button.d.ts.map +1 -0
  169. package/dist/devtools/floating-button.js +96 -0
  170. package/dist/devtools/floating-button.js.map +1 -0
  171. package/dist/devtools/index.d.ts +2 -0
  172. package/dist/devtools/index.d.ts.map +1 -0
  173. package/dist/devtools/index.js +2 -0
  174. package/dist/devtools/index.js.map +1 -0
  175. package/dist/devtools/resizer.d.ts +18 -0
  176. package/dist/devtools/resizer.d.ts.map +1 -0
  177. package/dist/devtools/resizer.js +48 -0
  178. package/dist/devtools/resizer.js.map +1 -0
  179. package/dist/devtools/use-move.d.ts +21 -0
  180. package/dist/devtools/use-move.d.ts.map +1 -0
  181. package/dist/devtools/use-move.js +55 -0
  182. package/dist/devtools/use-move.js.map +1 -0
  183. package/dist/index.css +95 -0
  184. package/dist/index.d.ts +15 -0
  185. package/dist/index.d.ts.map +1 -0
  186. package/dist/index.js +13 -0
  187. package/dist/index.js.map +1 -0
  188. package/dist/jest-setup.d.ts +2 -0
  189. package/dist/jest-setup.d.ts.map +1 -0
  190. package/dist/jest-setup.js +7 -0
  191. package/dist/jest-setup.js.map +1 -0
  192. package/dist/pages/error-page.d.ts +3 -0
  193. package/dist/pages/error-page.d.ts.map +1 -0
  194. package/dist/pages/error-page.js +32 -0
  195. package/dist/pages/error-page.js.map +1 -0
  196. package/dist/pages/sso-callback-page.d.ts +6 -0
  197. package/dist/pages/sso-callback-page.d.ts.map +1 -0
  198. package/dist/pages/sso-callback-page.js +8 -0
  199. package/dist/pages/sso-callback-page.js.map +1 -0
  200. package/dist/run.d.ts +22 -0
  201. package/dist/run.d.ts.map +1 -0
  202. package/dist/run.js +40 -0
  203. package/dist/run.js.map +1 -0
  204. package/dist/shared/center/center.d.ts +5 -0
  205. package/dist/shared/center/center.d.ts.map +1 -0
  206. package/dist/shared/center/center.js +15 -0
  207. package/dist/shared/center/center.js.map +1 -0
  208. package/dist/shared/context/direction-context.d.ts +7 -0
  209. package/dist/shared/context/direction-context.d.ts.map +1 -0
  210. package/dist/shared/context/direction-context.js +4 -0
  211. package/dist/shared/context/direction-context.js.map +1 -0
  212. package/dist/shared/context/display-context.d.ts +14 -0
  213. package/dist/shared/context/display-context.d.ts.map +1 -0
  214. package/dist/shared/context/display-context.js +4 -0
  215. package/dist/shared/context/display-context.js.map +1 -0
  216. package/dist/shared/context/fallback-context.d.ts +11 -0
  217. package/dist/shared/context/fallback-context.d.ts.map +1 -0
  218. package/dist/shared/context/fallback-context.js +4 -0
  219. package/dist/shared/context/fallback-context.js.map +1 -0
  220. package/dist/shared/context/global-task-context.d.ts +40 -0
  221. package/dist/shared/context/global-task-context.d.ts.map +1 -0
  222. package/dist/shared/context/global-task-context.js +78 -0
  223. package/dist/shared/context/global-task-context.js.map +1 -0
  224. package/dist/shared/context/importers-context.d.ts +7 -0
  225. package/dist/shared/context/importers-context.d.ts.map +1 -0
  226. package/dist/shared/context/importers-context.js +4 -0
  227. package/dist/shared/context/importers-context.js.map +1 -0
  228. package/dist/shared/context/index.d.ts +10 -0
  229. package/dist/shared/context/index.d.ts.map +1 -0
  230. package/dist/shared/context/index.js +10 -0
  231. package/dist/shared/context/index.js.map +1 -0
  232. package/dist/shared/context/registries-context.d.ts +21 -0
  233. package/dist/shared/context/registries-context.d.ts.map +1 -0
  234. package/dist/shared/context/registries-context.js +8 -0
  235. package/dist/shared/context/registries-context.js.map +1 -0
  236. package/dist/shared/context/variable-context.d.ts +10 -0
  237. package/dist/shared/context/variable-context.d.ts.map +1 -0
  238. package/dist/shared/context/variable-context.js +4 -0
  239. package/dist/shared/context/variable-context.js.map +1 -0
  240. package/dist/shared/context/websocket-context.d.ts +8 -0
  241. package/dist/shared/context/websocket-context.d.ts.map +1 -0
  242. package/dist/shared/context/websocket-context.js +4 -0
  243. package/dist/shared/context/websocket-context.js.map +1 -0
  244. package/dist/shared/dynamic-component/dynamic-component.d.ts +16 -0
  245. package/dist/shared/dynamic-component/dynamic-component.d.ts.map +1 -0
  246. package/dist/shared/dynamic-component/dynamic-component.js +243 -0
  247. package/dist/shared/dynamic-component/dynamic-component.js.map +1 -0
  248. package/dist/shared/error-handling/error-display.d.ts +8 -0
  249. package/dist/shared/error-handling/error-display.d.ts.map +1 -0
  250. package/dist/shared/error-handling/error-display.js +92 -0
  251. package/dist/shared/error-handling/error-display.js.map +1 -0
  252. package/dist/shared/error-handling/index.d.ts +3 -0
  253. package/dist/shared/error-handling/index.d.ts.map +1 -0
  254. package/dist/shared/error-handling/index.js +3 -0
  255. package/dist/shared/error-handling/index.js.map +1 -0
  256. package/dist/shared/error-handling/types.d.ts +10 -0
  257. package/dist/shared/error-handling/types.d.ts.map +1 -0
  258. package/dist/shared/error-handling/types.js +9 -0
  259. package/dist/shared/error-handling/types.js.map +1 -0
  260. package/dist/shared/index.d.ts +11 -0
  261. package/dist/shared/index.d.ts.map +1 -0
  262. package/dist/shared/index.js +9 -0
  263. package/dist/shared/index.js.map +1 -0
  264. package/dist/shared/interactivity/data-variable.d.ts +66 -0
  265. package/dist/shared/interactivity/data-variable.d.ts.map +1 -0
  266. package/dist/shared/interactivity/data-variable.js +186 -0
  267. package/dist/shared/interactivity/data-variable.js.map +1 -0
  268. package/dist/shared/interactivity/derived-variable.d.ts +153 -0
  269. package/dist/shared/interactivity/derived-variable.d.ts.map +1 -0
  270. package/dist/shared/interactivity/derived-variable.js +403 -0
  271. package/dist/shared/interactivity/derived-variable.js.map +1 -0
  272. package/dist/shared/interactivity/filtering.d.ts +9 -0
  273. package/dist/shared/interactivity/filtering.d.ts.map +1 -0
  274. package/dist/shared/interactivity/filtering.js +20 -0
  275. package/dist/shared/interactivity/filtering.js.map +1 -0
  276. package/dist/shared/interactivity/index.d.ts +12 -0
  277. package/dist/shared/interactivity/index.d.ts.map +1 -0
  278. package/dist/shared/interactivity/index.js +11 -0
  279. package/dist/shared/interactivity/index.js.map +1 -0
  280. package/dist/shared/interactivity/internal.d.ts +8 -0
  281. package/dist/shared/interactivity/internal.d.ts.map +1 -0
  282. package/dist/shared/interactivity/internal.js +10 -0
  283. package/dist/shared/interactivity/internal.js.map +1 -0
  284. package/dist/shared/interactivity/nested.d.ts +16 -0
  285. package/dist/shared/interactivity/nested.d.ts.map +1 -0
  286. package/dist/shared/interactivity/nested.js +50 -0
  287. package/dist/shared/interactivity/nested.js.map +1 -0
  288. package/dist/shared/interactivity/plain-variable.d.ts +23 -0
  289. package/dist/shared/interactivity/plain-variable.d.ts.map +1 -0
  290. package/dist/shared/interactivity/plain-variable.js +89 -0
  291. package/dist/shared/interactivity/plain-variable.js.map +1 -0
  292. package/dist/shared/interactivity/resolve-value.d.ts +13 -0
  293. package/dist/shared/interactivity/resolve-value.d.ts.map +1 -0
  294. package/dist/shared/interactivity/resolve-value.js +36 -0
  295. package/dist/shared/interactivity/resolve-value.js.map +1 -0
  296. package/dist/shared/interactivity/resolve-variable.d.ts +18 -0
  297. package/dist/shared/interactivity/resolve-variable.d.ts.map +1 -0
  298. package/dist/shared/interactivity/resolve-variable.js +47 -0
  299. package/dist/shared/interactivity/resolve-variable.js.map +1 -0
  300. package/dist/shared/interactivity/store.d.ts +35 -0
  301. package/dist/shared/interactivity/store.d.ts.map +1 -0
  302. package/dist/shared/interactivity/store.js +47 -0
  303. package/dist/shared/interactivity/store.js.map +1 -0
  304. package/dist/shared/interactivity/triggers.d.ts +31 -0
  305. package/dist/shared/interactivity/triggers.d.ts.map +1 -0
  306. package/dist/shared/interactivity/triggers.js +105 -0
  307. package/dist/shared/interactivity/triggers.js.map +1 -0
  308. package/dist/shared/interactivity/url-variable.d.ts +12 -0
  309. package/dist/shared/interactivity/url-variable.d.ts.map +1 -0
  310. package/dist/shared/interactivity/url-variable.js +28 -0
  311. package/dist/shared/interactivity/url-variable.js.map +1 -0
  312. package/dist/shared/interactivity/use-any-variable.d.ts +8 -0
  313. package/dist/shared/interactivity/use-any-variable.d.ts.map +1 -0
  314. package/dist/shared/interactivity/use-any-variable.js +38 -0
  315. package/dist/shared/interactivity/use-any-variable.js.map +1 -0
  316. package/dist/shared/interactivity/use-data-variable.d.ts +12 -0
  317. package/dist/shared/interactivity/use-data-variable.d.ts.map +1 -0
  318. package/dist/shared/interactivity/use-data-variable.js +56 -0
  319. package/dist/shared/interactivity/use-data-variable.js.map +1 -0
  320. package/dist/shared/interactivity/use-refresh-selector.d.ts +5 -0
  321. package/dist/shared/interactivity/use-refresh-selector.d.ts.map +1 -0
  322. package/dist/shared/interactivity/use-refresh-selector.js +16 -0
  323. package/dist/shared/interactivity/use-refresh-selector.js.map +1 -0
  324. package/dist/shared/interactivity/use-reset-variables.d.ts +8 -0
  325. package/dist/shared/interactivity/use-reset-variables.d.ts.map +1 -0
  326. package/dist/shared/interactivity/use-reset-variables.js +46 -0
  327. package/dist/shared/interactivity/use-reset-variables.js.map +1 -0
  328. package/dist/shared/interactivity/use-server-component.d.ts +24 -0
  329. package/dist/shared/interactivity/use-server-component.d.ts.map +1 -0
  330. package/dist/shared/interactivity/use-server-component.js +227 -0
  331. package/dist/shared/interactivity/use-server-component.js.map +1 -0
  332. package/dist/shared/interactivity/use-trigger-variable.d.ts +9 -0
  333. package/dist/shared/interactivity/use-trigger-variable.d.ts.map +1 -0
  334. package/dist/shared/interactivity/use-trigger-variable.js +18 -0
  335. package/dist/shared/interactivity/use-trigger-variable.js.map +1 -0
  336. package/dist/shared/interactivity/use-variable-state.d.ts +9 -0
  337. package/dist/shared/interactivity/use-variable-state.d.ts.map +1 -0
  338. package/dist/shared/interactivity/use-variable-state.js +35 -0
  339. package/dist/shared/interactivity/use-variable-state.js.map +1 -0
  340. package/dist/shared/interactivity/use-variable-value.d.ts +20 -0
  341. package/dist/shared/interactivity/use-variable-value.d.ts.map +1 -0
  342. package/dist/shared/interactivity/use-variable-value.js +77 -0
  343. package/dist/shared/interactivity/use-variable-value.js.map +1 -0
  344. package/dist/shared/interactivity/use-variable.d.ts +11 -0
  345. package/dist/shared/interactivity/use-variable.d.ts.map +1 -0
  346. package/dist/shared/interactivity/use-variable.js +62 -0
  347. package/dist/shared/interactivity/use-variable.js.map +1 -0
  348. package/dist/shared/private-route/private-route.d.ts +23 -0
  349. package/dist/shared/private-route/private-route.d.ts.map +1 -0
  350. package/dist/shared/private-route/private-route.js +39 -0
  351. package/dist/shared/private-route/private-route.js.map +1 -0
  352. package/dist/shared/template-root/dynamic-context.d.ts +9 -0
  353. package/dist/shared/template-root/dynamic-context.d.ts.map +1 -0
  354. package/dist/shared/template-root/dynamic-context.js +28 -0
  355. package/dist/shared/template-root/dynamic-context.js.map +1 -0
  356. package/dist/shared/template-root/template-root.d.ts +8 -0
  357. package/dist/shared/template-root/template-root.d.ts.map +1 -0
  358. package/dist/shared/template-root/template-root.js +76 -0
  359. package/dist/shared/template-root/template-root.js.map +1 -0
  360. package/dist/shared/utils/clean-session-cache.d.ts +9 -0
  361. package/dist/shared/utils/clean-session-cache.d.ts.map +1 -0
  362. package/dist/shared/utils/clean-session-cache.js +17 -0
  363. package/dist/shared/utils/clean-session-cache.js.map +1 -0
  364. package/dist/shared/utils/embed.d.ts +13 -0
  365. package/dist/shared/utils/embed.d.ts.map +1 -0
  366. package/dist/shared/utils/embed.js +23 -0
  367. package/dist/shared/utils/embed.js.map +1 -0
  368. package/dist/shared/utils/get-icon.d.ts +9 -0
  369. package/dist/shared/utils/get-icon.d.ts.map +1 -0
  370. package/dist/shared/utils/get-icon.js +30 -0
  371. package/dist/shared/utils/get-icon.js.map +1 -0
  372. package/dist/shared/utils/hashing.d.ts +14 -0
  373. package/dist/shared/utils/hashing.d.ts.map +1 -0
  374. package/dist/shared/utils/hashing.js +26 -0
  375. package/dist/shared/utils/hashing.js.map +1 -0
  376. package/dist/shared/utils/index.d.ts +18 -0
  377. package/dist/shared/utils/index.d.ts.map +1 -0
  378. package/dist/shared/utils/index.js +16 -0
  379. package/dist/shared/utils/index.js.map +1 -0
  380. package/dist/shared/utils/inject-css.d.ts +13 -0
  381. package/dist/shared/utils/inject-css.d.ts.map +1 -0
  382. package/dist/shared/utils/inject-css.js +25 -0
  383. package/dist/shared/utils/inject-css.js.map +1 -0
  384. package/dist/shared/utils/is-js-component.d.ts +9 -0
  385. package/dist/shared/utils/is-js-component.d.ts.map +1 -0
  386. package/dist/shared/utils/is-js-component.js +11 -0
  387. package/dist/shared/utils/is-js-component.js.map +1 -0
  388. package/dist/shared/utils/normalization.d.ts +19 -0
  389. package/dist/shared/utils/normalization.d.ts.map +1 -0
  390. package/dist/shared/utils/normalization.js +118 -0
  391. package/dist/shared/utils/normalization.js.map +1 -0
  392. package/dist/shared/utils/resolve-theme.d.ts +9 -0
  393. package/dist/shared/utils/resolve-theme.d.ts.map +1 -0
  394. package/dist/shared/utils/resolve-theme.js +28 -0
  395. package/dist/shared/utils/resolve-theme.js.map +1 -0
  396. package/dist/shared/utils/templating.d.ts +24 -0
  397. package/dist/shared/utils/templating.d.ts.map +1 -0
  398. package/dist/shared/utils/templating.js +67 -0
  399. package/dist/shared/utils/templating.js.map +1 -0
  400. package/dist/shared/utils/use-action-registry.d.ts +11 -0
  401. package/dist/shared/utils/use-action-registry.d.ts.map +1 -0
  402. package/dist/shared/utils/use-action-registry.js +18 -0
  403. package/dist/shared/utils/use-action-registry.js.map +1 -0
  404. package/dist/shared/utils/use-action.d.ts +9 -0
  405. package/dist/shared/utils/use-action.d.ts.map +1 -0
  406. package/dist/shared/utils/use-action.js +84 -0
  407. package/dist/shared/utils/use-action.js.map +1 -0
  408. package/dist/shared/utils/use-component-registry.d.ts +11 -0
  409. package/dist/shared/utils/use-component-registry.d.ts.map +1 -0
  410. package/dist/shared/utils/use-component-registry.js +46 -0
  411. package/dist/shared/utils/use-component-registry.js.map +1 -0
  412. package/dist/shared/utils/use-component-styles.d.ts +24 -0
  413. package/dist/shared/utils/use-component-styles.d.ts.map +1 -0
  414. package/dist/shared/utils/use-component-styles.js +68 -0
  415. package/dist/shared/utils/use-component-styles.js.map +1 -0
  416. package/dist/shared/utils/use-defer-loadable.d.ts +8 -0
  417. package/dist/shared/utils/use-defer-loadable.d.ts.map +1 -0
  418. package/dist/shared/utils/use-defer-loadable.js +44 -0
  419. package/dist/shared/utils/use-defer-loadable.js.map +1 -0
  420. package/dist/shared/utils/use-interval.d.ts +9 -0
  421. package/dist/shared/utils/use-interval.d.ts.map +1 -0
  422. package/dist/shared/utils/use-interval.js +18 -0
  423. package/dist/shared/utils/use-interval.js.map +1 -0
  424. package/dist/shared/utils/use-previous.d.ts +10 -0
  425. package/dist/shared/utils/use-previous.d.ts.map +1 -0
  426. package/dist/shared/utils/use-previous.js +17 -0
  427. package/dist/shared/utils/use-previous.js.map +1 -0
  428. package/dist/shared/utils/use-url-sync.d.ts +20 -0
  429. package/dist/shared/utils/use-url-sync.d.ts.map +1 -0
  430. package/dist/shared/utils/use-url-sync.js +68 -0
  431. package/dist/shared/utils/use-url-sync.js.map +1 -0
  432. package/dist/shared/utils/use-window-title.d.ts +3 -0
  433. package/dist/shared/utils/use-window-title.d.ts.map +1 -0
  434. package/dist/shared/utils/use-window-title.js +14 -0
  435. package/dist/shared/utils/use-window-title.js.map +1 -0
  436. package/dist/shared/variable-state-provider/variable-state-provider.d.ts +10 -0
  437. package/dist/shared/variable-state-provider/variable-state-provider.d.ts.map +1 -0
  438. package/dist/shared/variable-state-provider/variable-state-provider.js +21 -0
  439. package/dist/shared/variable-state-provider/variable-state-provider.js.map +1 -0
  440. package/dist/shared/wrapper/wrapper.d.ts +7 -0
  441. package/dist/shared/wrapper/wrapper.d.ts.map +1 -0
  442. package/dist/shared/wrapper/wrapper.js +14 -0
  443. package/dist/shared/wrapper/wrapper.js.map +1 -0
  444. package/dist/types/auth.d.ts +15 -0
  445. package/dist/types/auth.d.ts.map +1 -0
  446. package/dist/types/auth.js +6 -0
  447. package/dist/types/auth.js.map +1 -0
  448. package/dist/types/core.d.ts +325 -0
  449. package/dist/types/core.d.ts.map +1 -0
  450. package/dist/types/core.js +22 -0
  451. package/dist/types/core.js.map +1 -0
  452. package/dist/types/index.d.ts +7 -0
  453. package/dist/types/index.d.ts.map +1 -0
  454. package/dist/types/index.js +4 -0
  455. package/dist/types/index.js.map +1 -0
  456. package/dist/types/utils.d.ts +50 -0
  457. package/dist/types/utils.d.ts.map +1 -0
  458. package/dist/types/utils.js +84 -0
  459. package/dist/types/utils.js.map +1 -0
  460. package/dist/umd/dara.core.umd.js +93592 -0
  461. package/dist/umd/style.css +848 -0
  462. package/package.json +117 -0
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useRef, useState } from 'react';
3
+ import styled from '@darajs/styled-components';
4
+ import { useBackendErrors } from './backend-errors';
5
+ import DevToolsContent from './devtools-content';
6
+ import FloatingButton, { BUTTON_SIZE } from './floating-button';
7
+ import Resizer from './resizer';
8
+ import useMove from './use-move';
9
+ const MIN_WIDTH = 350;
10
+ const MAX_WIDTH = 600;
11
+ /**
12
+ * Fit a given width value between the sidebar bounds
13
+ *
14
+ * @param width to fit in bounds
15
+ */
16
+ function fitInBounds(width) {
17
+ if (width > MAX_WIDTH) {
18
+ return MAX_WIDTH;
19
+ }
20
+ if (width < MIN_WIDTH) {
21
+ return MIN_WIDTH;
22
+ }
23
+ return width;
24
+ }
25
+ const SidebarWrapper = styled.div `
26
+ display: flex;
27
+ flex-direction: row;
28
+ flex-grow: 0;
29
+ flex-shrink: 0;
30
+
31
+ min-width: ${MIN_WIDTH}px;
32
+ max-width: ${MAX_WIDTH}px;
33
+ height: 100%;
34
+
35
+ box-shadow: 8px 2px 32px -2px rgba(0, 0, 0, 0.25);
36
+ `;
37
+ /**
38
+ * DevTools parent display component.
39
+ * Displays an absolutely-positioned floating button to toggle the view of the devtools sidebar,
40
+ * and a sidebar with the devtools content.
41
+ */
42
+ function DevToolsWrapper() {
43
+ const [showDevtools, setShowDevtools] = useState(false);
44
+ const { errors } = useBackendErrors();
45
+ const sidebarRef = useRef(null);
46
+ const [sidebarWidth, setSidebarWidth] = useState(MIN_WIDTH);
47
+ // invoked on resizer move
48
+ const resize = useCallback((mouseMoveEvent) => {
49
+ setSidebarWidth(fitInBounds(sidebarRef.current.getBoundingClientRect().right - mouseMoveEvent.clientX));
50
+ }, []);
51
+ const { startMoving: startResizing } = useMove(resize);
52
+ // Button state lifted out of button component so the position doesn't reset when opening/closing sidebar
53
+ const buttonState = useState([
54
+ window.innerWidth - BUTTON_SIZE * 2,
55
+ window.innerHeight - BUTTON_SIZE * 2,
56
+ ]);
57
+ // If not showing devtools, don't include the sidebar in the dom at all
58
+ if (!showDevtools) {
59
+ return (_jsx(FloatingButton, { buttonState: buttonState, onClick: () => setShowDevtools(true), showErrorBadge: errors.length > 0 }));
60
+ }
61
+ return (_jsxs(SidebarWrapper, { ref: sidebarRef, style: { width: sidebarWidth }, children: [_jsx(Resizer, { onGrab: startResizing, sidebarWidth: sidebarWidth }), _jsx(DevToolsContent, { onCloseDevtools: () => setShowDevtools(false), style: { width: sidebarWidth } })] }));
62
+ }
63
+ export default DevToolsWrapper;
64
+ //# sourceMappingURL=devtools-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools-wrapper.js","sourceRoot":"","sources":["../../js/devtools/devtools-wrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,cAAc,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;;GAIG;AACH,SAAS,WAAW,CAAC,KAAa;IAC9B,IAAI,KAAK,GAAG,SAAS,EAAE;QACnB,OAAO,SAAS,CAAC;KACpB;IAED,IAAI,KAAK,GAAG,SAAS,EAAE;QACnB,OAAO,SAAS,CAAC;KACpB;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;iBAMhB,SAAS;iBACT,SAAS;;;;CAIzB,CAAC;AAEF;;;;GAIG;AACH,SAAS,eAAe;IACpB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEtC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAE5D,0BAA0B;IAC1B,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,cAA0B,EAAE,EAAE;QACtD,eAAe,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5G,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvD,yGAAyG;IACzG,MAAM,WAAW,GAAG,QAAQ,CAAmB;QAC3C,MAAM,CAAC,UAAU,GAAG,WAAW,GAAG,CAAC;QACnC,MAAM,CAAC,WAAW,GAAG,WAAW,GAAG,CAAC;KACvC,CAAC,CAAC;IAEH,uEAAuE;IACvE,IAAI,CAAC,YAAY,EAAE;QACf,OAAO,CACH,KAAC,cAAc,IACX,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EACpC,cAAc,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,GACnC,CACL,CAAC;KACL;IAED,OAAO,CACH,MAAC,cAAc,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,aAC3D,KAAC,OAAO,IAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,GAAI,EAC9D,KAAC,eAAe,IAAC,eAAe,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAI,IACrF,CACpB,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Display devtools
3
+ */
4
+ export default function DevTools(): JSX.Element;
5
+ //# sourceMappingURL=devtools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../js/devtools/devtools.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,IAAI,GAAG,CAAC,OAAO,CAM9C"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import DevtoolsContext from './devtools-context';
3
+ import DevToolsWrapper from './devtools-wrapper';
4
+ /**
5
+ * Display devtools
6
+ */
7
+ export default function DevTools() {
8
+ return (_jsx(DevtoolsContext, { children: _jsx(DevToolsWrapper, {}) }));
9
+ }
10
+ //# sourceMappingURL=devtools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.js","sourceRoot":"","sources":["../../js/devtools/devtools.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC5B,OAAO,CACH,KAAC,eAAe,cACZ,KAAC,eAAe,KAAG,GACL,CACrB,CAAC;AACN,CAAC"}
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ export declare const BUTTON_SIZE = 50;
3
+ type Position = [number, number];
4
+ interface FloatingButtonProps {
5
+ /**
6
+ * Button state
7
+ */
8
+ buttonState: [Position, React.Dispatch<React.SetStateAction<Position>>];
9
+ /**
10
+ * Handler to invoke on button click
11
+ */
12
+ onClick: () => void;
13
+ /**
14
+ * Whether to show an error badge
15
+ */
16
+ showErrorBadge: boolean;
17
+ }
18
+ /**
19
+ * Floating, draggable button.
20
+ * Can display an error badge in top-right corner.
21
+ */
22
+ export default function FloatingButton(props: FloatingButtonProps): JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=floating-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-button.d.ts","sourceRoot":"","sources":["../../js/devtools/floating-button.tsx"],"names":[],"mappings":";AAMA,eAAO,MAAM,WAAW,KAAK,CAAC;AAuC9B,KAAK,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjC,UAAU,mBAAmB;IACzB;;OAEG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACxE;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CA8E9E"}
@@ -0,0 +1,96 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef } from 'react';
3
+ import styled from '@darajs/styled-components';
4
+ import useMove from './use-move';
5
+ export const BUTTON_SIZE = 50;
6
+ const DRAG_OFFSET = BUTTON_SIZE / 2;
7
+ const FloatingDevtoolButton = styled.button `
8
+ cursor: ${(props) => (props.$isDragging ? 'grab' : 'pointer')};
9
+
10
+ position: fixed;
11
+ z-index: 10;
12
+
13
+ display: inline-block;
14
+
15
+ width: ${BUTTON_SIZE}px;
16
+ height: ${BUTTON_SIZE}px;
17
+
18
+ color: ${(props) => props.theme.colors.blue1};
19
+
20
+ background-color: ${(props) => props.theme.colors.secondary};
21
+ border: 1px solid;
22
+ border-color: ${(props) => props.theme.colors.secondary};
23
+ border-radius: 30%;
24
+
25
+ transition-delay: 0s;
26
+ transition-timing-function: ease;
27
+ transition-duration: 150ms;
28
+ transition-property: ${(props) => (!props.$isDragging ? 'left top' : 'none')};
29
+ `;
30
+ const ErrorBadge = styled.i `
31
+ position: absolute;
32
+ top: -0.8rem;
33
+ right: -0.8rem;
34
+
35
+ #badge-circle {
36
+ color: ${(props) => props.theme.colors.error};
37
+ }
38
+ `;
39
+ /**
40
+ * Floating, draggable button.
41
+ * Can display an error badge in top-right corner.
42
+ */
43
+ export default function FloatingButton(props) {
44
+ const buttonRef = useRef(null);
45
+ const [buttonPosition, setButtonPosition] = props.buttonState;
46
+ const moveButton = useCallback((mouseMoveEvent) => {
47
+ // updates button position to mouse position
48
+ // (- drag offset because we want the button's center to be where the mouse is, not it's top-left corner)
49
+ setButtonPosition([mouseMoveEvent.clientX - DRAG_OFFSET, mouseMoveEvent.clientY - DRAG_OFFSET]);
50
+ }, []);
51
+ const { startMoving, isMoving: isButtonMoving } = useMove(moveButton);
52
+ /**
53
+ * Fix button position by moving it to it's correct position
54
+ */
55
+ function fixButtonPosition() {
56
+ if (!buttonRef.current) {
57
+ return;
58
+ }
59
+ const { x, y } = buttonRef.current.getBoundingClientRect();
60
+ setButtonPosition((oldPos) => {
61
+ let [newX, newY] = oldPos;
62
+ // It's X position must be BUTTON_SIZE pixels from the left/right side of the window
63
+ if (x < BUTTON_SIZE || x < window.innerWidth / 2) {
64
+ newX = BUTTON_SIZE;
65
+ }
66
+ else if (x > window.innerWidth / 2 || window.innerWidth - x < BUTTON_SIZE * 2) {
67
+ newX = window.innerWidth - BUTTON_SIZE * 2;
68
+ }
69
+ // It's Y position must be not be less than BUTTON_SIZE from top/bottom of the window
70
+ if (y < BUTTON_SIZE) {
71
+ newY = BUTTON_SIZE;
72
+ }
73
+ else if (window.innerHeight - y < BUTTON_SIZE * 2) {
74
+ newY = window.innerHeight - BUTTON_SIZE * 2;
75
+ }
76
+ return [newX, newY];
77
+ });
78
+ }
79
+ // Fix button position on window resize so it stays in bounds
80
+ useEffect(() => {
81
+ window.addEventListener('resize', fixButtonPosition);
82
+ return () => {
83
+ window.removeEventListener('resize', fixButtonPosition);
84
+ };
85
+ }, []);
86
+ useEffect(() => {
87
+ // Whenever button stops moving fix button position on next animation frame
88
+ if (!isButtonMoving) {
89
+ requestAnimationFrame(() => {
90
+ fixButtonPosition();
91
+ });
92
+ }
93
+ }, [isButtonMoving]);
94
+ return (_jsxs(FloatingDevtoolButton, { "$isDragging": isButtonMoving, className: "fa-stack", onClick: () => !isButtonMoving && props.onClick(), onMouseDown: startMoving, ref: buttonRef, style: { left: `${buttonPosition[0]}px`, top: `${buttonPosition[1]}px` }, children: [props.showErrorBadge && (_jsxs(ErrorBadge, { className: "fa-stack", children: [_jsx("i", { className: "fa-stack-2x fa-solid fa-circle", id: "badge-circle" }), _jsx("i", { className: "fa-stack-1x fa-solid fa-triangle-exclamation", id: "badge-triangle" })] })), _jsx("i", { className: "fa-solid fa-bug fa-lg" })] }));
95
+ }
96
+ //# sourceMappingURL=floating-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-button.js","sourceRoot":"","sources":["../../js/devtools/floating-button.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export { default as DevTools } from './devtools';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/devtools/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as DevTools } from './devtools';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../js/devtools/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { MouseEventHandler } from 'react';
2
+ interface ResizerProps {
3
+ /**
4
+ * Callback to execute when resizer is grabbed
5
+ */
6
+ onGrab: MouseEventHandler;
7
+ /**
8
+ * Current width of the sidebar
9
+ */
10
+ sidebarWidth: number;
11
+ }
12
+ /**
13
+ * Sidebar resizer.
14
+ * Displays a thin resizer bar with a larger grab area for easier resizing.
15
+ */
16
+ export default function Resizer(props: ResizerProps): JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=resizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizer.d.ts","sourceRoot":"","sources":["../../js/devtools/resizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6CpD,UAAU,YAAY;IAClB;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAE1B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAahE"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import styled from '@darajs/styled-components';
4
+ const ResizerWrapper = styled.div `
5
+ position: absolute;
6
+ top: 0;
7
+ bottom: 0;
8
+
9
+ margin: 0;
10
+ padding: 0;
11
+ `;
12
+ const ResizerDisplay = styled.div `
13
+ pointer-events: none;
14
+
15
+ position: absolute;
16
+ top: 0;
17
+ right: -1px;
18
+ bottom: 0;
19
+
20
+ width: 4px;
21
+
22
+ background-color: ${(props) => (props.$hover ? '#3F9BF8' : 'transparent')};
23
+
24
+ transition: background-color 200ms ease;
25
+ `;
26
+ const ResizerGrabArea = styled.button `
27
+ cursor: col-resize;
28
+ resize: horizontal;
29
+ /* This means the grab area will have 16px to the left of the sidebar and 8px on the right side */
30
+ position: absolute;
31
+ right: -8px;
32
+
33
+ width: 24px;
34
+ height: 100%;
35
+ padding: 0;
36
+
37
+ background-color: transparent;
38
+ border: 0;
39
+ `;
40
+ /**
41
+ * Sidebar resizer.
42
+ * Displays a thin resizer bar with a larger grab area for easier resizing.
43
+ */
44
+ export default function Resizer(props) {
45
+ const [isHovered, setIsHovered] = useState(false);
46
+ return (_jsxs(ResizerWrapper, { style: { right: props.sidebarWidth }, children: [_jsx(ResizerDisplay, { "$hover": isHovered }), _jsx(ResizerGrabArea, { onMouseDown: props.onGrab, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) })] }));
47
+ }
48
+ //# sourceMappingURL=resizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizer.js","sourceRoot":"","sources":["../../js/devtools/resizer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOhC,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAE/B;;;;;;;;;;wBAUsB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC;;;CAG5E,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;;;;;;;;;CAapC,CAAC;AAcF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IAC/C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACH,MAAC,cAAc,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,aAChD,KAAC,cAAc,cAAS,SAAS,GAAI,EACrC,KAAC,eAAe,IACZ,WAAW,EAAE,KAAK,CAAC,MAAM,EACzB,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,GACzC,IACW,CACpB,CAAC;AACN,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { MouseEventHandler } from 'react';
2
+ type MoveHandler = (ev: MouseEvent) => void;
3
+ export interface UseMoveInterface {
4
+ /**
5
+ * Whether move is hapenning
6
+ */
7
+ isMoving: boolean;
8
+ /**
9
+ * Callback to call when a move is started.
10
+ * Should be attached to a component's `onMouseDown` attribute.
11
+ */
12
+ startMoving: MouseEventHandler;
13
+ }
14
+ /**
15
+ * Helper hook to support moving an element
16
+ *
17
+ * @param move move handler invoked whenever element is moved
18
+ */
19
+ export default function useMove(move: MoveHandler): UseMoveInterface;
20
+ export {};
21
+ //# sourceMappingURL=use-move.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-move.d.ts","sourceRoot":"","sources":["../../js/devtools/use-move.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA4C,MAAM,OAAO,CAAC;AAEpF,KAAK,WAAW,GAAG,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;AAE5C,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,EAAE,iBAAiB,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CA0DnE"}
@@ -0,0 +1,55 @@
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+ /**
3
+ * Helper hook to support moving an element
4
+ *
5
+ * @param move move handler invoked whenever element is moved
6
+ */
7
+ export default function useMove(move) {
8
+ const [isMoving, setIsMoving] = useState(false);
9
+ const mouseDown = useRef(false);
10
+ /**
11
+ * On move invoke move handler if we're currently moving
12
+ */
13
+ const onMove = useCallback((moveEvent) => {
14
+ if (isMoving) {
15
+ move(moveEvent);
16
+ }
17
+ }, [isMoving]);
18
+ /**
19
+ * Handler to be invoked when movement should start happening (i.e. on mousedown on a component)
20
+ */
21
+ const startMoving = useCallback(() => {
22
+ mouseDown.current = true;
23
+ setTimeout(() => {
24
+ // Only start moving if mouse is still down after 100ms to allow clicking
25
+ if (mouseDown.current) {
26
+ setIsMoving(true);
27
+ }
28
+ }, 100);
29
+ }, []);
30
+ /**
31
+ * Handler invoked on mouseup
32
+ */
33
+ const stopMoving = useCallback(() => {
34
+ mouseDown.current = false;
35
+ setTimeout(() => {
36
+ // Only stop moving is mouse is still up
37
+ if (!mouseDown.current) {
38
+ setIsMoving(false);
39
+ }
40
+ }, 50);
41
+ }, []);
42
+ /**
43
+ * Globally listen to mouse movements and mouseup events
44
+ */
45
+ useEffect(() => {
46
+ window.addEventListener('mousemove', onMove);
47
+ window.addEventListener('mouseup', stopMoving);
48
+ return () => {
49
+ window.removeEventListener('mousemove', onMove);
50
+ window.removeEventListener('mouseup', stopMoving);
51
+ };
52
+ }, [onMove, stopMoving]);
53
+ return { isMoving, startMoving };
54
+ }
55
+ //# sourceMappingURL=use-move.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-move.js","sourceRoot":"","sources":["../../js/devtools/use-move.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAgBpF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAiB;IAC7C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,MAAM,GAAG,WAAW,CACtB,CAAC,SAAqB,EAAE,EAAE;QACtB,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,CAAC;SACnB;IACL,CAAC,EACD,CAAC,QAAQ,CAAC,CACb,CAAC;IAEF;;OAEG;IACH,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAEzB,UAAU,CAAC,GAAG,EAAE;YACZ,yEAAyE;YACzE,IAAI,SAAS,CAAC,OAAO,EAAE;gBACnB,WAAW,CAAC,IAAI,CAAC,CAAC;aACrB;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;IACZ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP;;OAEG;IACH,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAE1B,UAAU,CAAC,GAAG,EAAE;YACZ,wCAAwC;YACxC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;gBACpB,WAAW,CAAC,KAAK,CAAC,CAAC;aACtB;QACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAE/C,OAAO,GAAG,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAChD,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACtD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAEzB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACrC,CAAC"}
package/dist/index.css ADDED
@@ -0,0 +1,95 @@
1
+ @font-face {
2
+ font-family: 'Manrope';
3
+ font-weight: 300 900;
4
+ font-style: normal;
5
+ src: url('./assets/fonts/Manrope-VariableFont_wght.ttf') format('truetype-variations');
6
+ }
7
+
8
+ /* Give react the whole page width and height to work with */
9
+ html,
10
+ body,
11
+ #dara_root {
12
+ display: flex;
13
+ height: 100%;
14
+ width: 100%;
15
+
16
+ font-family: 'Manrope';
17
+ font-size: 16px;
18
+ }
19
+
20
+ /* The following is a css-reset from: https://piccalil.li/blog/a-modern-css-reset */
21
+
22
+ /* Box sizing rules */
23
+ *,
24
+ *::before,
25
+ *::after {
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ /* Remove default margin */
30
+ body,
31
+ h1,
32
+ h2,
33
+ h3,
34
+ h4,
35
+ p,
36
+ figure,
37
+ blockquote,
38
+ dl,
39
+ dd {
40
+ margin: 0;
41
+ }
42
+
43
+ /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
44
+ ul[role='list'],
45
+ ol[role='list'] {
46
+ list-style: none;
47
+ }
48
+
49
+ /* Set core root defaults */
50
+ html:focus-within {
51
+ scroll-behavior: smooth;
52
+ }
53
+
54
+ /* Set core body defaults */
55
+ body {
56
+ min-height: 100vh;
57
+ text-rendering: optimizeSpeed;
58
+ line-height: 1.2;
59
+ }
60
+
61
+ /* A elements that don't have a class get default styles */
62
+ a:not([class]) {
63
+ text-decoration-skip-ink: auto;
64
+ }
65
+
66
+ /* Make images easier to work with */
67
+ img,
68
+ picture {
69
+ max-width: 100%;
70
+ display: block;
71
+ }
72
+
73
+ /* Inherit fonts for inputs and buttons */
74
+ input,
75
+ button,
76
+ textarea,
77
+ select {
78
+ font: inherit;
79
+ }
80
+
81
+ /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
82
+ @media (prefers-reduced-motion: reduce) {
83
+ html:focus-within {
84
+ scroll-behavior: auto;
85
+ }
86
+
87
+ *,
88
+ *::before,
89
+ *::after {
90
+ animation-duration: 0.01ms !important;
91
+ animation-iteration-count: 1 !important;
92
+ transition-duration: 0.01ms !important;
93
+ scroll-behavior: auto !important;
94
+ }
95
+ }
@@ -0,0 +1,15 @@
1
+ import run from './run';
2
+ import type { RawCssProp } from './shared';
3
+ import type { Action, ActionDef, ActionHook, ActionInstance, AnyDataVariable, AnyVariable, BaseComponentProps, BaseStylingProps, ClauseQuery, ComponentInstance, Condition, DataFrame, DataVariable, DerivedVariable, FilterQuery, Pagination, QueryOperator, SingleVariable, StyledComponentProps, Template, UrlVariable, ValueQuery, Variable } from './types';
4
+ export * as ReactRouter from 'react-router-dom';
5
+ export * as Notifications from '@darajs/ui-notifications';
6
+ export type { Action, ActionHook, ActionInstance, ActionDef, Condition, Template, Variable, ComponentInstance, SingleVariable, DerivedVariable, UrlVariable, DataVariable, DataFrame, FilterQuery, Pagination, ClauseQuery, QueryOperator, ValueQuery, AnyDataVariable, AnyVariable, BaseStylingProps, StyledComponentProps, BaseComponentProps, };
7
+ export { useActionContext, UpdateVariable, TriggerVariable, SideEffect, NavigateTo, ResetVariables, DownloadVariable, DownloadContent, Notify, Logout, } from './actions';
8
+ export { useAuthCtx, useSessionToken, BasicAuthLogin, BasicAuthLogout, DefaultAuthLogin, revokeSession, verifySessionToken, handleAuthErrors, DARA_JWT_TOKEN, useUser, } from './auth';
9
+ export { request } from './api';
10
+ export { DefaultFallback, RowFallback, Menu, RouterContent, SideBarFrame, TopBarFrame, ProgressTracker, For, } from './components';
11
+ export { DynamicComponent, Center, useAction, useVariable, getIcon, useDataVariable, combineFilters, DisplayCtx, useComponentStyles, injectCss, useAnyVariable, resolveValue, useVariableValue, normalizeRequest, } from './shared';
12
+ export { ConditionOperator, isVariable } from './types';
13
+ export type { RawCssProp };
14
+ export default run;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../js/index.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,QAAQ,EACX,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,YAAY,EACR,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACrB,CAAC;AAEF,OAAO,EACH,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,MAAM,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,OAAO,GACV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,eAAe,EACf,WAAW,EACX,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,eAAe,EACf,GAAG,GACN,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,WAAW,EACX,OAAO,EACP,eAAe,EACf,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,CAAC;AAG3B,eAAe,GAAG,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import run from './run';
2
+ // re-export things which have shared contexts, so UMD builds can access the share contexts
3
+ export * as ReactRouter from 'react-router-dom';
4
+ export * as Notifications from '@darajs/ui-notifications';
5
+ export { useActionContext, UpdateVariable, TriggerVariable, SideEffect, NavigateTo, ResetVariables, DownloadVariable, DownloadContent, Notify, Logout, } from './actions';
6
+ export { useAuthCtx, useSessionToken, BasicAuthLogin, BasicAuthLogout, DefaultAuthLogin, revokeSession, verifySessionToken, handleAuthErrors, DARA_JWT_TOKEN, useUser, } from './auth';
7
+ export { request } from './api';
8
+ export { DefaultFallback, RowFallback, Menu, RouterContent, SideBarFrame, TopBarFrame, ProgressTracker, For, } from './components';
9
+ export { DynamicComponent, Center, useAction, useVariable, getIcon, useDataVariable, combineFilters, DisplayCtx, useComponentStyles, injectCss, useAnyVariable, resolveValue, useVariableValue, normalizeRequest, } from './shared';
10
+ export { ConditionOperator, isVariable } from './types';
11
+ // Add default export
12
+ export default run;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../js/index.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AA4BxB,2FAA2F;AAC3F,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AA4B1D,OAAO,EACH,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,MAAM,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,OAAO,GACV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,eAAe,EACf,WAAW,EACX,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,eAAe,EACf,GAAG,GACN,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,WAAW,EACX,OAAO,EACP,eAAe,EACf,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGxD,qBAAqB;AACrB,eAAe,GAAG,CAAC"}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=jest-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-setup.d.ts","sourceRoot":"","sources":["../js/jest-setup.ts"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
+ import '@testing-library/jest-dom';
3
+ import { RecoilEnv } from 'recoil';
4
+ // disable duplicate atom key checking in tests, as we clear the registries between tests
5
+ // but recoil does not provide a way to clear the atoms in their internals, so the warnings are false positives
6
+ RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = false;
7
+ //# sourceMappingURL=jest-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-setup.js","sourceRoot":"","sources":["../js/jest-setup.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,yFAAyF;AACzF,+GAA+G;AAC/G,SAAS,CAAC,0CAA0C,GAAG,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare function ErrorPage(): JSX.Element;
2
+ export default ErrorPage;
3
+ //# sourceMappingURL=error-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-page.d.ts","sourceRoot":"","sources":["../../js/pages/error-page.tsx"],"names":[],"mappings":"AAkCA,iBAAS,SAAS,IAAI,GAAG,CAAC,OAAO,CAkBhC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { useLocation } from 'react-router-dom';
4
+ import styled from '@darajs/styled-components';
5
+ import { Button } from '@darajs/ui-components';
6
+ import Center from '../shared/center/center';
7
+ const CenteredDivWithGap = styled(Center) `
8
+ gap: 0.6rem;
9
+ margin: 10px;
10
+ text-align: center;
11
+ `;
12
+ const errorMessages = {
13
+ '403': {
14
+ description: 'You are not authorised to access this application. Please contact the application owner to enable access.',
15
+ styling: 'error',
16
+ title: 'We were not able to authenticate you',
17
+ },
18
+ default: {
19
+ description: 'Your login session may have expired. Try again.',
20
+ styling: 'primary',
21
+ title: 'We were not able to authenticate you',
22
+ },
23
+ };
24
+ function ErrorPage() {
25
+ const { search } = useLocation();
26
+ const query = useMemo(() => new URLSearchParams(search), [search]);
27
+ const code = query.get('code');
28
+ const errorConfig = errorMessages[code] || errorMessages.default;
29
+ return (_jsxs(CenteredDivWithGap, { children: [_jsx("h1", { children: errorConfig.title }), _jsx("p", { children: errorConfig.description }), _jsx(Button, { href: "/login", styling: errorConfig.styling, children: "Retry" })] }));
30
+ }
31
+ export default ErrorPage;
32
+ //# sourceMappingURL=error-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-page.js","sourceRoot":"","sources":["../../js/pages/error-page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAE5C,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;;;CAIxC,CAAC;AAQF,MAAM,aAAa,GAAgC;IAC/C,KAAK,EAAE;QACH,WAAW,EACP,2GAA2G;QAC/G,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,sCAAsC;KAChD;IACD,OAAO,EAAE;QACL,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,sCAAsC;KAChD;CACJ,CAAC;AAEF,SAAS,SAAS;IACd,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEnE,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE/B,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC;IAEjE,OAAO,CACH,MAAC,kBAAkB,eACf,uBAAK,WAAW,CAAC,KAAK,GAAM,EAC5B,sBAAI,WAAW,CAAC,WAAW,GAAK,EAChC,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,WAAW,CAAC,OAAO,sBAEzC,IACQ,CACxB,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * SSO Auth callback placeholder
3
+ */
4
+ declare function SSOCallbackPage(): JSX.Element;
5
+ export default SSOCallbackPage;
6
+ //# sourceMappingURL=sso-callback-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso-callback-page.d.ts","sourceRoot":"","sources":["../../js/pages/sso-callback-page.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,iBAAS,eAAe,IAAI,GAAG,CAAC,OAAO,CAEtC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * SSO Auth callback placeholder
3
+ */
4
+ function SSOCallbackPage() {
5
+ return null;
6
+ }
7
+ export default SSOCallbackPage;
8
+ //# sourceMappingURL=sso-callback-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso-callback-page.js","sourceRoot":"","sources":["../../js/pages/sso-callback-page.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,SAAS,eAAe;IACpB,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,eAAe,eAAe,CAAC"}