@manta-eu/react 0.1.6 → 0.1.8

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 (234) hide show
  1. package/README.md +3 -0
  2. package/dist/components/chart/AreaChart.d.ts.map +1 -1
  3. package/dist/components/chart/AreaChart.js +4 -6
  4. package/dist/components/chart/BarChart.d.ts.map +1 -1
  5. package/dist/components/chart/BarChart.js +5 -6
  6. package/dist/components/chart/ComposedChart.d.ts.map +1 -1
  7. package/dist/components/chart/ComposedChart.js +15 -7
  8. package/dist/components/chart/LineChart.d.ts.map +1 -1
  9. package/dist/components/chart/LineChart.js +4 -6
  10. package/dist/components/chart/annotations.d.ts +4 -0
  11. package/dist/components/chart/annotations.d.ts.map +1 -1
  12. package/dist/components/chart/annotations.js +10 -2
  13. package/dist/components/chart/chart-schemas.d.ts +1960 -54
  14. package/dist/components/chart/chart-schemas.d.ts.map +1 -1
  15. package/dist/components/chart/chart-schemas.js +137 -15
  16. package/dist/components/chart/series.d.ts +28 -0
  17. package/dist/components/chart/series.d.ts.map +1 -0
  18. package/dist/components/chart/series.js +61 -0
  19. package/dist/components/chart/stacks.d.ts +9 -0
  20. package/dist/components/chart/stacks.d.ts.map +1 -0
  21. package/dist/components/chart/stacks.js +11 -0
  22. package/dist/components/chat-view/ChatHeaders.d.ts.map +1 -1
  23. package/dist/components/chat-view/ChatHeaders.js +2 -2
  24. package/dist/components/embedded-chat/index.d.ts.map +1 -1
  25. package/dist/components/embedded-chat/index.js +2 -1
  26. package/dist/components/layouts/Sidebar.d.ts.map +1 -1
  27. package/dist/components/layouts/Sidebar.js +14 -3
  28. package/dist/components/layouts/StatusScreen.d.ts.map +1 -1
  29. package/dist/components/layouts/StatusScreen.js +3 -1
  30. package/dist/components/planning/ActioningView.d.ts.map +1 -1
  31. package/dist/components/planning/ActioningView.js +7 -49
  32. package/dist/components/planning/ExecutionSectionItem.d.ts +6 -4
  33. package/dist/components/planning/ExecutionSectionItem.d.ts.map +1 -1
  34. package/dist/components/planning/ExecutionSectionItem.js +2 -2
  35. package/dist/components/planning/ExecutionSections.d.ts +6 -4
  36. package/dist/components/planning/ExecutionSections.d.ts.map +1 -1
  37. package/dist/components/planning/ExecutionSections.js +2 -2
  38. package/dist/components/planning/ManualActionCard.d.ts +14 -8
  39. package/dist/components/planning/ManualActionCard.d.ts.map +1 -1
  40. package/dist/components/planning/ManualActionCard.js +44 -24
  41. package/dist/components/planning/ManualActionList.d.ts +22 -0
  42. package/dist/components/planning/ManualActionList.d.ts.map +1 -0
  43. package/dist/components/planning/ManualActionList.js +35 -0
  44. package/dist/components/planning/manual-action-targets.d.ts +4 -0
  45. package/dist/components/planning/manual-action-targets.d.ts.map +1 -0
  46. package/dist/components/planning/manual-action-targets.js +19 -0
  47. package/dist/components/sidebar/index.d.ts +2 -0
  48. package/dist/components/sidebar/index.d.ts.map +1 -1
  49. package/dist/components/sidebar/index.js +1 -0
  50. package/dist/components/sidebar/nav-user.d.ts +1 -1
  51. package/dist/components/sidebar/nav-user.d.ts.map +1 -1
  52. package/dist/components/sidebar/nav-user.js +3 -3
  53. package/dist/components/sidebar/user-avatar.d.ts +7 -0
  54. package/dist/components/sidebar/user-avatar.d.ts.map +1 -0
  55. package/dist/components/sidebar/user-avatar.js +9 -0
  56. package/dist/components/thinking/manta-swim.d.ts.map +1 -1
  57. package/dist/components/thinking/manta-swim.js +3 -1
  58. package/dist/globals.css +6 -13
  59. package/dist/hooks/use-connection-problems.d.ts.map +1 -1
  60. package/dist/hooks/use-manual-actions.d.ts +13 -3
  61. package/dist/hooks/use-manual-actions.d.ts.map +1 -1
  62. package/dist/hooks/use-manual-actions.js +16 -10
  63. package/dist/hooks/useAuth.d.ts +1 -0
  64. package/dist/hooks/useAuth.d.ts.map +1 -1
  65. package/dist/hooks/useAuth.js +7 -1
  66. package/dist/hooks/useConversations.d.ts +1 -0
  67. package/dist/hooks/useConversations.d.ts.map +1 -1
  68. package/dist/hooks/useResolveManualAction.d.ts +14 -0
  69. package/dist/hooks/useResolveManualAction.d.ts.map +1 -0
  70. package/dist/hooks/useResolveManualAction.js +47 -0
  71. package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
  72. package/dist/ldo-ui.d.ts +2 -1
  73. package/dist/ldo-ui.d.ts.map +1 -1
  74. package/dist/ldo-ui.js +2 -1
  75. package/dist/lib/build-config.d.ts +2 -0
  76. package/dist/lib/build-config.d.ts.map +1 -1
  77. package/dist/lib/build-config.js +2 -0
  78. package/dist/lib/chat-types.d.ts +3 -0
  79. package/dist/lib/chat-types.d.ts.map +1 -1
  80. package/dist/lib/datastore-route-table.d.ts +2 -0
  81. package/dist/lib/datastore-route-table.d.ts.map +1 -1
  82. package/dist/lib/datastore-route-table.js +3 -1
  83. package/dist/lib/datastore-routes.d.ts +7 -1
  84. package/dist/lib/datastore-routes.d.ts.map +1 -1
  85. package/dist/lib/datastore-routes.js +7 -2
  86. package/dist/lib/decode-chart-entities.d.ts.map +1 -1
  87. package/dist/lib/decode-chart-entities.js +5 -1
  88. package/dist/lib/manual-actions.d.ts +1 -0
  89. package/dist/lib/manual-actions.d.ts.map +1 -1
  90. package/dist/lib/manual-actions.js +4 -1
  91. package/dist/lib/structured-data/types.d.ts +7 -2
  92. package/dist/lib/structured-data/types.d.ts.map +1 -1
  93. package/dist/lib/tool-icons.d.ts.map +1 -1
  94. package/dist/lib/tool-icons.js +1 -0
  95. package/dist/providers/AssistantIconProvider.d.ts +11 -0
  96. package/dist/providers/AssistantIconProvider.d.ts.map +1 -0
  97. package/dist/providers/AssistantIconProvider.js +10 -0
  98. package/dist/providers/ChatManagerProvider.d.ts.map +1 -1
  99. package/dist/providers/ChatManagerProvider.js +18 -16
  100. package/dist/providers/NavExtrasProvider.d.ts +23 -0
  101. package/dist/providers/NavExtrasProvider.d.ts.map +1 -0
  102. package/dist/providers/NavExtrasProvider.js +10 -0
  103. package/dist/providers/index.d.ts +2 -0
  104. package/dist/providers/index.d.ts.map +1 -1
  105. package/dist/providers/index.js +2 -0
  106. package/dist/routes/chat/index.d.ts +2 -0
  107. package/dist/routes/chat/index.d.ts.map +1 -1
  108. package/dist/routes/chat/index.js +3 -2
  109. package/dist/routes/explain/ExplainEmpty.d.ts.map +1 -1
  110. package/dist/routes/explain/ExplainEmpty.js +2 -1
  111. package/dist/routes/integrations/catalog-shape.d.ts +8 -3
  112. package/dist/routes/integrations/catalog-shape.d.ts.map +1 -1
  113. package/dist/routes/integrations/components/AddIntegrationModal.d.ts.map +1 -1
  114. package/dist/routes/integrations/components/AddIntegrationModal.js +2 -2
  115. package/dist/routes/integrations/components/MantaSyncPluginDownload.d.ts +13 -0
  116. package/dist/routes/integrations/components/MantaSyncPluginDownload.d.ts.map +1 -0
  117. package/dist/routes/integrations/components/MantaSyncPluginDownload.js +23 -0
  118. package/dist/routes/integrations/components/connect-forms/ConnectFormHeader.d.ts +1 -1
  119. package/dist/routes/integrations/components/connect-forms/ConnectFormHeader.d.ts.map +1 -1
  120. package/dist/routes/integrations/components/connect-forms/ConnectWizardShell.d.ts +1 -1
  121. package/dist/routes/integrations/components/connect-forms/ConnectWizardShell.d.ts.map +1 -1
  122. package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.d.ts +11 -0
  123. package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.d.ts.map +1 -0
  124. package/dist/routes/integrations/components/connect-forms/ConnectionStringInput.js +49 -0
  125. package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts +7 -0
  126. package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts.map +1 -0
  127. package/dist/routes/integrations/components/connect-forms/DashConnectForm.js +87 -0
  128. package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.d.ts +20 -0
  129. package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.d.ts.map +1 -0
  130. package/dist/routes/integrations/components/connect-forms/DataConnectionConnectForm.js +144 -0
  131. package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.d.ts +8 -0
  132. package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.d.ts.map +1 -0
  133. package/dist/routes/integrations/components/connect-forms/DataConnectionFieldInputs.js +44 -0
  134. package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.d.ts +3 -0
  135. package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.d.ts.map +1 -0
  136. package/dist/routes/integrations/components/connect-forms/FigmaConnectForm.js +20 -0
  137. package/dist/routes/integrations/components/connect-forms/GmailConnectForm.d.ts +3 -0
  138. package/dist/routes/integrations/components/connect-forms/GmailConnectForm.d.ts.map +1 -0
  139. package/dist/routes/integrations/components/connect-forms/GmailConnectForm.js +11 -0
  140. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts +3 -0
  141. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts.map +1 -0
  142. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js +37 -0
  143. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts +3 -0
  144. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts.map +1 -0
  145. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js +37 -0
  146. package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.d.ts +21 -0
  147. package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.d.ts.map +1 -0
  148. package/dist/routes/integrations/components/connect-forms/ImportStartedNotice.js +25 -0
  149. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts +45 -0
  150. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts.map +1 -0
  151. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js +187 -0
  152. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts +6 -0
  153. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts.map +1 -0
  154. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js +68 -0
  155. package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.d.ts +10 -0
  156. package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.d.ts.map +1 -0
  157. package/dist/routes/integrations/components/connect-forms/LinkedinConnectForm.js +124 -0
  158. package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.d.ts +14 -0
  159. package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.d.ts.map +1 -0
  160. package/dist/routes/integrations/components/connect-forms/MetaAdsConnectForm.js +183 -0
  161. package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.d.ts +10 -0
  162. package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.d.ts.map +1 -0
  163. package/dist/routes/integrations/components/connect-forms/OAuthConnectLink.js +17 -0
  164. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts +45 -0
  165. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts.map +1 -0
  166. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js +136 -0
  167. package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.d.ts +23 -0
  168. package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.d.ts.map +1 -0
  169. package/dist/routes/integrations/components/connect-forms/OAuthSingleAccountConnectForm.js +63 -0
  170. package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.d.ts +3 -0
  171. package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.d.ts.map +1 -0
  172. package/dist/routes/integrations/components/connect-forms/ShopifyConnectForm.js +14 -0
  173. package/dist/routes/integrations/components/connect-forms/SlackConnectForm.d.ts +3 -0
  174. package/dist/routes/integrations/components/connect-forms/SlackConnectForm.d.ts.map +1 -0
  175. package/dist/routes/integrations/components/connect-forms/SlackConnectForm.js +10 -0
  176. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts +5 -0
  177. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts.map +1 -0
  178. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js +35 -0
  179. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts +5 -0
  180. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts.map +1 -0
  181. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js +47 -0
  182. package/dist/routes/integrations/components/connect-forms/connection-string-fields.d.ts +13 -0
  183. package/dist/routes/integrations/components/connect-forms/connection-string-fields.d.ts.map +1 -0
  184. package/dist/routes/integrations/components/connect-forms/connection-string-fields.js +110 -0
  185. package/dist/routes/integrations/components/connect-forms/dash-folder-tree.d.ts +6 -0
  186. package/dist/routes/integrations/components/connect-forms/dash-folder-tree.d.ts.map +1 -0
  187. package/dist/routes/integrations/components/connect-forms/dash-folder-tree.js +14 -0
  188. package/dist/routes/integrations/components/connect-forms/data-connection-fields.d.ts +35 -0
  189. package/dist/routes/integrations/components/connect-forms/data-connection-fields.d.ts.map +1 -0
  190. package/dist/routes/integrations/components/connect-forms/data-connection-fields.js +88 -0
  191. package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.d.ts +11 -0
  192. package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.d.ts.map +1 -0
  193. package/dist/routes/integrations/components/connect-forms/google-ads-account-tree.js +36 -0
  194. package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.d.ts +6 -0
  195. package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.d.ts.map +1 -0
  196. package/dist/routes/integrations/components/connect-forms/google-analytics-property-tree.js +34 -0
  197. package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.d.ts +12 -0
  198. package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.d.ts.map +1 -0
  199. package/dist/routes/integrations/components/connect-forms/oauth-setup-phase.js +33 -0
  200. package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.d.ts +3 -0
  201. package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.d.ts.map +1 -0
  202. package/dist/routes/integrations/components/connect-forms/setup-account-unavailable-reason.js +8 -0
  203. package/dist/routes/integrations/components/connect-forms/types.d.ts +6 -1
  204. package/dist/routes/integrations/components/connect-forms/types.d.ts.map +1 -1
  205. package/dist/routes/integrations/components/connect-forms/useConnectWizard.d.ts +19 -0
  206. package/dist/routes/integrations/components/connect-forms/useConnectWizard.d.ts.map +1 -0
  207. package/dist/routes/integrations/components/connect-forms/useConnectWizard.js +28 -0
  208. package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.d.ts +4 -0
  209. package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.d.ts.map +1 -0
  210. package/dist/routes/integrations/components/connect-forms/useConnectedExternalIds.js +17 -0
  211. package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.d.ts +7 -0
  212. package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.d.ts.map +1 -0
  213. package/dist/routes/integrations/components/connect-forms/useWindowFocusPoll.js +18 -0
  214. package/dist/routes/integrations/connect-forms.d.ts +16 -0
  215. package/dist/routes/integrations/connect-forms.d.ts.map +1 -0
  216. package/dist/routes/integrations/connect-forms.js +14 -0
  217. package/dist/routes/integrations/connection-view.d.ts.map +1 -1
  218. package/dist/routes/integrations/connection-view.js +30 -7
  219. package/dist/routes/integrations/filter-connected-providers.d.ts +3 -0
  220. package/dist/routes/integrations/filter-connected-providers.d.ts.map +1 -0
  221. package/dist/routes/integrations/filter-connected-providers.js +15 -0
  222. package/dist/routes/integrations/overview.d.ts +3 -0
  223. package/dist/routes/integrations/overview.d.ts.map +1 -0
  224. package/dist/routes/integrations/overview.js +2 -0
  225. package/dist/routes/integrations/types.d.ts +24 -4
  226. package/dist/routes/integrations/types.d.ts.map +1 -1
  227. package/dist/routes/integrations/types.js +10 -0
  228. package/dist/routes/integrations/use-connected-account-entities.d.ts +10 -0
  229. package/dist/routes/integrations/use-connected-account-entities.d.ts.map +1 -0
  230. package/dist/routes/integrations/use-connected-account-entities.js +29 -0
  231. package/dist/routes/memories/components/EmptyStates.d.ts.map +1 -1
  232. package/dist/routes/memories/components/EmptyStates.js +2 -1
  233. package/dist/routes/plans/components/actionPlansTableConfig.d.ts +12 -12
  234. package/package.json +54 -10
@@ -16,6 +16,7 @@ const toolIconMap = {
16
16
  actionPlanShowcase: Zap,
17
17
  showEntities: Images,
18
18
  checkAutoPilotStatus: Zap,
19
+ setDailyChangeLimit: DollarSign,
19
20
  markAsLowRisk: CheckCircle2,
20
21
  readUploadedFile: Paperclip,
21
22
  };
@@ -0,0 +1,11 @@
1
+ import type { ComponentType, ReactNode } from "react";
2
+ export type AssistantIcon = ComponentType<{
3
+ className?: string;
4
+ }>;
5
+ export type AssistantIconProviderProps = {
6
+ icon?: AssistantIcon;
7
+ children: ReactNode;
8
+ };
9
+ export declare function AssistantIconProvider(props: AssistantIconProviderProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function useAssistantIcon(): AssistantIcon | undefined;
11
+ //# sourceMappingURL=AssistantIconProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssistantIconProvider.d.ts","sourceRoot":"","sources":["../../src/providers/AssistantIconProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAIlE,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAItE;AAED,wBAAgB,gBAAgB,8BAE/B"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, use } from "react";
3
+ const AssistantIconContext = createContext(undefined);
4
+ export function AssistantIconProvider(props) {
5
+ const { icon, children } = props;
6
+ return _jsx(AssistantIconContext.Provider, { value: icon, children: children });
7
+ }
8
+ export function useAssistantIcon() {
9
+ return use(AssistantIconContext);
10
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ChatManagerProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ChatManagerProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAY1F,OAAO,EAAE,wBAAwB,EAAE,KAAK,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAE7G,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAgZlE"}
1
+ {"version":3,"file":"ChatManagerProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ChatManagerProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAY1F,OAAO,EAAE,wBAAwB,EAAE,KAAK,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAE7G,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAmZlE"}
@@ -3,7 +3,7 @@ import { buildPlanHref } from "@manta-eu/client/shared/agent-mode";
3
3
  import { ChatContextKind } from "@manta-eu/client/shared/agent-types";
4
4
  import { chatIdSchema, chatManagerBasePath, } from "@manta-eu/client/shared/chat-manager";
5
5
  import { datastoreSocketQuery } from "@manta-eu/client/shared/datastore-path";
6
- import { chatIdToPath } from "@manta-eu/client/shared/index";
6
+ import { chatIdToPath, newChatPath } from "@manta-eu/client/shared/index";
7
7
  import { useAgent } from "agents/react";
8
8
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
9
9
  import { matchPath, useLocation, useMatch, useNavigate } from "react-router";
@@ -29,7 +29,8 @@ export function ChatManagerProvider(props) {
29
29
  const chatMatch = useMatch("/chat/:chatId");
30
30
  const parsedRoutedConversationId = chatIdSchema.safeParse(chatMatch?.params.chatId);
31
31
  const routedConversationId = parsedRoutedConversationId.success ? parsedRoutedConversationId.data : undefined;
32
- const invalidConversationRoute = matchPath("/chat/*", location.pathname) !== null && !routedConversationId;
32
+ const onNewChatPath = matchPath(newChatPath, location.pathname) !== null;
33
+ const invalidConversationRoute = matchPath("/chat/*", location.pathname) !== null && !onNewChatPath && !routedConversationId;
33
34
  const [conversationSelection, setConversationSelection] = useState();
34
35
  const [messageHandoff, setMessageHandoff] = useState();
35
36
  const activeConversation = activeConversationFromSelection(conversationSelection);
@@ -37,7 +38,7 @@ export function ChatManagerProvider(props) {
37
38
  const transitionRevisionRef = useRef(0);
38
39
  const blankConversationRef = useRef(createBlankConversationLifecycle());
39
40
  const expectedClosedConversationRef = useRef(undefined);
40
- const preserveBlankLifecycleOnNextRootRef = useRef(false);
41
+ const preserveBlankLifecycleOnNextBlankChatRef = useRef(false);
41
42
  const conversationSelectionRef = useRef(conversationSelection);
42
43
  const pathnameRef = useRef(location.pathname);
43
44
  const routedConversationIdRef = useRef(routedConversationId);
@@ -74,7 +75,7 @@ export function ChatManagerProvider(props) {
74
75
  activeConversationFromSelection(conversationSelectionRef.current)?.id === conversationId;
75
76
  if (deletingRoutedConversation) {
76
77
  transitionRevisionRef.current++;
77
- void navigate("/", { replace: true });
78
+ void navigate(newChatPath, { replace: true });
78
79
  }
79
80
  else if (deletingActiveConversation) {
80
81
  transitionRevisionRef.current++;
@@ -153,26 +154,27 @@ export function ChatManagerProvider(props) {
153
154
  blankConversationRef.current = createBlankConversationLifecycle();
154
155
  setMessageHandoff(undefined);
155
156
  setConversationSelection(undefined);
156
- if (location.pathname !== "/") {
157
- preserveBlankLifecycleOnNextRootRef.current = true;
158
- void navigate("/");
157
+ if (!onNewChatPath) {
158
+ preserveBlankLifecycleOnNextBlankChatRef.current = true;
159
+ void navigate(newChatPath);
159
160
  }
160
- }, [location.pathname, navigate]);
161
+ }, [onNewChatPath, navigate]);
162
+ // `/` is still a blank chat in an app that gives its datastores no home page.
161
163
  useEffect(() => {
162
- if (location.pathname === "/") {
163
- const preserveBlankLifecycle = preserveBlankLifecycleOnNextRootRef.current;
164
+ if (onNewChatPath || location.pathname === "/") {
165
+ const preserveBlankLifecycle = preserveBlankLifecycleOnNextBlankChatRef.current;
164
166
  if (!preserveBlankLifecycle) {
165
167
  blankConversationRef.current = createBlankConversationLifecycle();
166
168
  transitionRevisionRef.current++;
167
169
  }
168
- preserveBlankLifecycleOnNextRootRef.current = false;
170
+ preserveBlankLifecycleOnNextBlankChatRef.current = false;
169
171
  setMessageHandoff(undefined);
170
172
  setConversationSelection(undefined);
171
173
  }
172
174
  else {
173
- preserveBlankLifecycleOnNextRootRef.current = false;
175
+ preserveBlankLifecycleOnNextBlankChatRef.current = false;
174
176
  }
175
- }, [location.pathname]);
177
+ }, [location.pathname, onNewChatPath]);
176
178
  useEffect(() => {
177
179
  const expectedClose = expectedClosedConversationRef.current;
178
180
  if (expectedClose && expectedClose.conversationId !== activeConversation?.id) {
@@ -186,7 +188,7 @@ export function ChatManagerProvider(props) {
186
188
  transitionRevisionRef.current++;
187
189
  setConversationSelection((current) => (current?.kind === "active" ? undefined : current));
188
190
  toast.error("Chat not found.");
189
- void navigate("/", { replace: true });
191
+ void navigate(newChatPath, { replace: true });
190
192
  return;
191
193
  }
192
194
  if (!routedConversationId ||
@@ -206,13 +208,13 @@ export function ChatManagerProvider(props) {
206
208
  return;
207
209
  }
208
210
  toast.error("Chat not found.");
209
- void navigate("/", { replace: true });
211
+ void navigate(newChatPath, { replace: true });
210
212
  })
211
213
  .catch(() => {
212
214
  if (transitionRevisionRef.current !== revision)
213
215
  return;
214
216
  toast.error("Couldn't open the chat. Please try again.");
215
- void navigate("/", { replace: true });
217
+ void navigate(newChatPath, { replace: true });
216
218
  });
217
219
  }, [invalidConversationRoute, managerAgent, managerAgent.readyState, navigate, routedConversationId]);
218
220
  const transitionContext = useCallback(async (transition) => {
@@ -0,0 +1,23 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+ /**
4
+ * A sidebar entry the host adds, for a feature the design system knows nothing about.
5
+ *
6
+ * The nav is one list in `Sidebar`, and a host that mounts something of its own — `manta/agents` mounts
7
+ * Horns — would otherwise have to fork that list or thread a prop through every `RouteLayout` call site.
8
+ */
9
+ export type NavExtra = {
10
+ id?: string;
11
+ title: string;
12
+ icon: LucideIcon;
13
+ href: string;
14
+ /** Whether this entry is the page being looked at. Defaults to its href and anything under it. */
15
+ isCurrent?: (pathname: string) => boolean;
16
+ };
17
+ export type NavExtrasProviderProps = {
18
+ items?: readonly NavExtra[];
19
+ children: ReactNode;
20
+ };
21
+ export declare function NavExtrasProvider(props: NavExtrasProviderProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function useNavExtras(): readonly NavExtra[];
23
+ //# sourceMappingURL=NavExtrasProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavExtrasProvider.d.ts","sourceRoot":"","sources":["../../src/providers/NavExtrasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,CAAC;AAIF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAI9D;AAED,wBAAgB,YAAY,IAAI,SAAS,QAAQ,EAAE,CAElD"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, use } from "react";
3
+ const NavExtrasContext = createContext([]);
4
+ export function NavExtrasProvider(props) {
5
+ const { items, children } = props;
6
+ return _jsx(NavExtrasContext.Provider, { value: items ?? [], children: children });
7
+ }
8
+ export function useNavExtras() {
9
+ return use(NavExtrasContext);
10
+ }
@@ -1,7 +1,9 @@
1
1
  import { QueryClient } from "@tanstack/react-query";
2
2
  import type { ReactNode } from "react";
3
3
  export * from "./ActiveDatastoreProvider.js";
4
+ export * from "./AssistantIconProvider.js";
4
5
  export * from "./AssistantNameProvider.js";
6
+ export * from "./NavExtrasProvider.js";
5
7
  export * from "./GenerateStructuredDataProvider.js";
6
8
  export * from "./MantaClientProvider.js";
7
9
  export * from "./ShaclFormProvider.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAC;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;A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MAAM,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAsCF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAc9C;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAG1G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAItE"}
@@ -12,7 +12,9 @@ import { ThemeProvider } from "./ThemeProvider.js";
12
12
  import { TooltipProvider as TooltipStateProvider } from "./TooltipProvider.js";
13
13
  import { TooltipProvider } from "#components/tooltip/index";
14
14
  export * from "./ActiveDatastoreProvider.js";
15
+ export * from "./AssistantIconProvider.js";
15
16
  export * from "./AssistantNameProvider.js";
17
+ export * from "./NavExtrasProvider.js";
16
18
  export * from "./GenerateStructuredDataProvider.js";
17
19
  export * from "./MantaClientProvider.js";
18
20
  export * from "./ShaclFormProvider.js";
@@ -1,6 +1,7 @@
1
1
  import type { MantaModelId } from "@manta-eu/client/shared/model";
2
2
  import type { ReactNode } from "react";
3
3
  import type { ChatDraft, Datastore, User } from "#lib/chat-types";
4
+ import { type AssistantIcon } from "#providers/AssistantIconProvider";
4
5
  type ChatRouteProps = {
5
6
  datastore?: Datastore;
6
7
  user: User;
@@ -14,6 +15,7 @@ type ChatRouteProps = {
14
15
  title?: string;
15
16
  welcomeSubtitle?: string;
16
17
  assistantName?: string;
18
+ assistantIcon?: AssistantIcon;
17
19
  mark?: ReactNode;
18
20
  };
19
21
  export declare function ChatRoute(props: ChatRouteProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/chat/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAA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UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CA+C9C"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Chat } from "#components/chat-view/index";
3
3
  import { RouteLayout } from "#components/layouts/RouteLayout";
4
+ import { AssistantIconProvider } from "#providers/AssistantIconProvider";
4
5
  import { AssistantNameProvider } from "#providers/AssistantNameProvider";
5
6
  export function ChatRoute(props) {
6
- const { datastore, user, logout, isOperator, canSwitchDatastore, datastores, allowedModels, initialPrompt, initialDraft, title, welcomeSubtitle, assistantName, mark, } = props;
7
- return (_jsx(AssistantNameProvider, { name: assistantName, children: _jsx(RouteLayout, { user: user, datastore: datastore, datastores: datastores, isOperator: isOperator, canSwitchDatastore: canSwitchDatastore, logout: logout, floatingMobileMenu: true, title: title, mark: mark, children: _jsx(Chat, { datastore: datastore, user: user, onLogout: logout, isOperator: isOperator, allowedModels: allowedModels, initialPrompt: initialPrompt, initialDraft: initialDraft, welcomeSubtitle: welcomeSubtitle, mark: mark }) }) }));
7
+ const { datastore, user, logout, isOperator, canSwitchDatastore, datastores, allowedModels, initialPrompt, initialDraft, title, welcomeSubtitle, assistantName, assistantIcon, mark, } = props;
8
+ return (_jsx(AssistantNameProvider, { name: assistantName, children: _jsx(AssistantIconProvider, { icon: assistantIcon, children: _jsx(RouteLayout, { user: user, datastore: datastore, datastores: datastores, isOperator: isOperator, canSwitchDatastore: canSwitchDatastore, logout: logout, floatingMobileMenu: true, title: title, mark: mark, children: _jsx(Chat, { datastore: datastore, user: user, onLogout: logout, isOperator: isOperator, allowedModels: allowedModels, initialPrompt: initialPrompt, initialDraft: initialDraft, welcomeSubtitle: welcomeSubtitle, mark: mark }) }) }) }));
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExplainEmpty.d.ts","sourceRoot":"","sources":["../../../src/routes/explain/ExplainEmpty.tsx"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,4CAkB3B"}
1
+ {"version":3,"file":"ExplainEmpty.d.ts","sourceRoot":"","sources":["../../../src/routes/explain/ExplainEmpty.tsx"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,4CAkB3B"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { newChatPath } from "@manta-eu/client/shared/index";
2
3
  import { FileQuestion } from "lucide-react";
3
4
  import { Link } from "react-router";
4
5
  import { Button } from "#components/button/index";
5
6
  import { EmptyState } from "#components/empty-state/index";
6
7
  export function ExplainEmpty() {
7
- return (_jsx(EmptyState, { icon: FileQuestion, title: "Choose a fact to explain", description: "Open this view from a chat explanation or a rule sample fact so the URL includes a subject and object.", className: "h-full max-w-lg", children: _jsxs("div", { className: "flex items-center gap-2 mt-4", children: [_jsx(Button, { asChild: true, variant: "secondary", children: _jsx(Link, { to: "/", children: "Back to chat" }) }), _jsx(Button, { asChild: true, variant: "tertiary", children: _jsx(Link, { to: "/rules", children: "View rules" }) })] }) }));
8
+ return (_jsx(EmptyState, { icon: FileQuestion, title: "Choose a fact to explain", description: "Open this view from a chat explanation or a rule sample fact so the URL includes a subject and object.", className: "h-full max-w-lg", children: _jsxs("div", { className: "flex items-center gap-2 mt-4", children: [_jsx(Button, { asChild: true, variant: "secondary", children: _jsx(Link, { to: newChatPath, children: "Back to chat" }) }), _jsx(Button, { asChild: true, variant: "tertiary", children: _jsx(Link, { to: "/rules", children: "View rules" }) })] }) }));
8
9
  }
@@ -2,12 +2,13 @@ import type { GQLIntegration } from "@manta-eu/client";
2
2
  import type { KeycloakRealm } from "@manta-eu/client/shared/constants";
3
3
  import type { HexColor } from "@manta-eu/lib/color";
4
4
  import type { ComponentType } from "react";
5
- import type { ConnectFormProps, InferalConnectFormConfig } from "./components/connect-forms/types.js";
6
- import type { ConnectionSource, ProviderId, ProviderLogoComponent } from "./types.js";
5
+ import type { ConnectFormProps, ImportNotice, InferalConnectFormConfig } from "./components/connect-forms/types.js";
6
+ import type { ConnectionSource, DataConnectorType, ProviderId, ProviderLogoComponent } from "./types.js";
7
7
  export type ConnectionCapability = "provisions-stream";
8
8
  export type ConnectionMethodBase = {
9
9
  capabilities: readonly ConnectionCapability[];
10
10
  connectForm?: ComponentType<ConnectFormProps>;
11
+ importNotice?: ImportNotice;
11
12
  };
12
13
  export type InferalConnectionMethod = ConnectionMethodBase & InferalConnectFormConfig & {
13
14
  source: "inferal";
@@ -22,7 +23,11 @@ export type OAuthConnectionMethod = ConnectionMethodBase & {
22
23
  export type GmailConnectionMethod = ConnectionMethodBase & {
23
24
  source: "gmail";
24
25
  };
25
- export type ProviderConnectionMethod = InferalConnectionMethod | OAuthConnectionMethod | GmailConnectionMethod;
26
+ export type DataConnectionMethod = ConnectionMethodBase & {
27
+ source: "data-connection";
28
+ connectorType: DataConnectorType;
29
+ };
30
+ export type ProviderConnectionMethod = InferalConnectionMethod | OAuthConnectionMethod | GmailConnectionMethod | DataConnectionMethod;
26
31
  export type ConnectableConnectionMethod = ProviderConnectionMethod & {
27
32
  connectForm: ComponentType<ConnectFormProps>;
28
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-shape.d.ts","sourceRoot":"","sources":["../../../src/routes/integrations/catalog-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAA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AwB,EAAE,CAAC;IACvD,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IAAE,EAAE,EAAE,EAAE,CAAA;CAAE,GAAG,oBAAoB,CAAC;AAE3G,MAAM,MAAM,2BAA2B,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IACxE,UAAU,EAAE,EAAE,CAAC;IACf,MAAM,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,oBAAoB,EAC3B,MAAM,GAAE,sBAA2B,GAClC,2BAA2B,GAAG,SAAS,CAOzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AddIntegrationModal.d.ts","sourceRoot":"","sources":["../../../../src/routes/integrations/components/AddIntegrationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK7D,MAAM,MAAM,wBAAwB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IACrE,OAAO,EAAE,SAAS,0BAA0B,CAAC,EAAE,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,wBAAwB,CAAC,EAAE,CAAC,2CAiFtG"}
1
+ {"version":3,"file":"AddIntegrationModal.d.ts","sourceRoot":"","sources":["../../../../src/routes/integrations/components/AddIntegrationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK7D,MAAM,MAAM,wBAAwB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IACrE,OAAO,EAAE,SAAS,0BAA0B,CAAC,EAAE,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,wBAAwB,CAAC,EAAE,CAAC,2CAqFtG"}
@@ -35,8 +35,8 @@ export function AddIntegrationModal(props) {
35
35
  name: selectedProvider.name,
36
36
  brandColor: selectedProvider.brandColor,
37
37
  logo: selectedProvider.logo,
38
- }, inferalConfig: selection.method.source === "inferal" ? selection.method : undefined, onBack: () => {
38
+ }, inferalConfig: selection.method.source === "inferal" ? selection.method : undefined, dataConnectorType: selection.method.source === "data-connection" ? selection.method.connectorType : undefined, onBack: () => {
39
39
  setResumeSpent(true);
40
40
  setSelection(null);
41
- }, onChanged: () => onConnected?.(), onDismiss: () => onOpenChange(false), resumedFromOAuth: selectedProviderResumedFromOAuth })) : (_jsx(IntegrationCatalog, { entries: entries, onSelect: setSelection, scrollable: true, requiredCapability: requiredCapability, header: _jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: title }), _jsx(DialogDescription, { children: description })] }) })) }) }));
41
+ }, onChanged: () => onConnected?.(), onDismiss: () => onOpenChange(false), resumedFromOAuth: selectedProviderResumedFromOAuth, importNotice: selection.method.importNotice })) : (_jsx(IntegrationCatalog, { entries: entries, onSelect: setSelection, scrollable: true, requiredCapability: requiredCapability, header: _jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: title }), _jsx(DialogDescription, { children: description })] }) })) }) }));
42
42
  }
@@ -0,0 +1,13 @@
1
+ import { type ButtonVariant } from "#components/button/index";
2
+ export type MantaSyncPluginLinkProps = {
3
+ path: string;
4
+ variant: ButtonVariant;
5
+ size?: "sm" | "base";
6
+ };
7
+ export declare function MantaSyncPluginLink(props: MantaSyncPluginLinkProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MantaSyncPluginRowAction(): import("react/jsx-runtime").JSX.Element | null;
9
+ export type MantaSyncPluginStepProps = {
10
+ path: string;
11
+ };
12
+ export declare function MantaSyncPluginStep(props: MantaSyncPluginStepProps): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=MantaSyncPluginDownload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MantaSyncPluginDownload.d.ts","sourceRoot":"","sources":["../../../../src/routes/integrations/components/MantaSyncPluginDownload.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGpE,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CASlE;AAED,wBAAgB,wBAAwB,mDAIvC;AAQD,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAgBlE"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isPresent } from "@manta-eu/lib/present";
3
+ import { Download } from "lucide-react";
4
+ import { Link } from "#components/button/index";
5
+ import { mantaSyncPluginPath } from "#lib/build-config";
6
+ export function MantaSyncPluginLink(props) {
7
+ const { path, variant, size } = props;
8
+ return (_jsxs(Link, { href: path, download: true, variant: variant, size: size, children: [_jsx(Download, { "aria-hidden": true }), "Download plugin"] }));
9
+ }
10
+ export function MantaSyncPluginRowAction() {
11
+ if (!isPresent(mantaSyncPluginPath))
12
+ return null;
13
+ return _jsx(MantaSyncPluginLink, { path: mantaSyncPluginPath, variant: "secondary", size: "sm" });
14
+ }
15
+ const importSteps = [
16
+ "Unzip the download.",
17
+ "In Figma, open Plugins → Development → Import plugin from manifest…",
18
+ "Pick manifest.json from the unzipped folder.",
19
+ ];
20
+ export function MantaSyncPluginStep(props) {
21
+ const { path } = props;
22
+ return (_jsxs("div", { className: "flex flex-col items-start gap-4", children: [_jsx(MantaSyncPluginLink, { path: path, variant: "primary" }), _jsx("ol", { className: "grid gap-1.5 list-decimal pl-5", children: importSteps.map((step) => (_jsx("li", { className: "typography-caption text-muted-foreground", children: step }, step))) })] }));
23
+ }
@@ -1,4 +1,4 @@
1
- import type { ProviderPresentation } from "#routes/integrations/types";
1
+ import type { ProviderPresentation } from "../../types.js";
2
2
  export type ConnectFormHeaderProps = {
3
3
  provider: ProviderPresentation<string>;
4
4
  status: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectFormHeader.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/ConnectFormHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAkB9D"}
1
+ {"version":3,"file":"ConnectFormHeader.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/ConnectFormHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAkB9D"}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { ProviderPresentation } from "#routes/integrations/types";
2
+ import type { ProviderPresentation } from "../../types.js";
3
3
  export type ConnectWizardShellProps = {
4
4
  provider: ProviderPresentation<string>;
5
5
  status?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectWizardShell.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/ConnectWizardShell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA8DhE"}
1
+ {"version":3,"file":"ConnectWizardShell.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/ConnectWizardShell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKxD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA8DhE"}
@@ -0,0 +1,11 @@
1
+ import type { ConnectorField } from "./data-connection-fields.js";
2
+ import { type FormOf } from "./DataConnectionFieldInputs.js";
3
+ type ConnectionStringInputProps = {
4
+ form: FormOf;
5
+ connectorType: string;
6
+ allFields: readonly ConnectorField[];
7
+ stepFields: readonly ConnectorField[];
8
+ };
9
+ export declare function ConnectionStringInput(props: ConnectionStringInputProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=ConnectionStringInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionStringInput.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/ConnectionStringInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAInE,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;CACvC,CAAC;AAIF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CA4CtE"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { humanList } from "@manta-eu/lib/humanize";
3
+ import { isPresent } from "@manta-eu/lib/present";
4
+ import { useState } from "react";
5
+ import { connectionStringValues } from "./connection-string-fields.js";
6
+ import { inputId } from "./DataConnectionFieldInputs.js";
7
+ import { Button } from "#components/button/index";
8
+ import { Input } from "#components/input/index";
9
+ export function ConnectionStringInput(props) {
10
+ const { form, connectorType, allFields, stepFields } = props;
11
+ const [text, setText] = useState("");
12
+ const [outcome, setOutcome] = useState();
13
+ function fill(input) {
14
+ const result = connectionStringValues(connectorType, input, allFields);
15
+ if (!result.ok) {
16
+ setOutcome({ error: result.error });
17
+ return false;
18
+ }
19
+ setFormValues(form, result.values);
20
+ const message = filledMessage(Object.keys(result.values), stepFields, allFields);
21
+ setOutcome({ message: [message, result.notice].filter(isPresent).join(" ") });
22
+ setText("");
23
+ return true;
24
+ }
25
+ function fillOnPaste(event) {
26
+ if (fill(event.clipboardData.getData("text")))
27
+ event.preventDefault();
28
+ }
29
+ return (_jsxs("div", { className: "flex items-end gap-2", children: [_jsx(Input, { id: inputId("connection-string"), containerClassName: "flex-1", label: "Connection string", description: "Paste a connection string to fill the fields. Manta does not store it.", descriptionInLabelTooltip: true, type: "password", autoComplete: "off", value: text, onChange: (event) => setText(event.target.value), onPaste: fillOnPaste, error: outcome && "error" in outcome ? outcome.error : undefined, helperText: outcome && "message" in outcome ? outcome.message : undefined }), _jsx(Button, { variant: "secondary", disabled: !isPresent(text), onClick: () => fill(text), children: "Fill fields" })] }));
30
+ }
31
+ function setFormValues(form, values) {
32
+ for (const [key, value] of Object.entries(values)) {
33
+ form.setValue(key, value, { shouldValidate: true, shouldDirty: true });
34
+ }
35
+ }
36
+ function filledMessage(keys, stepFields, allFields) {
37
+ const stepKeys = new Set(stepFields.map((field) => field.key));
38
+ const thisStep = keys.filter((key) => stepKeys.has(key));
39
+ const nextStep = keys.filter((key) => !stepKeys.has(key));
40
+ return [
41
+ isPresent(thisStep) ? `Filled ${fieldTitles(allFields, thisStep)}.` : undefined,
42
+ isPresent(nextStep) ? `Also filled on the next step: ${fieldTitles(allFields, nextStep)}.` : undefined,
43
+ ]
44
+ .filter(isPresent)
45
+ .join(" ");
46
+ }
47
+ function fieldTitles(fields, keys) {
48
+ return humanList(fields.filter((field) => keys.includes(field.key)).map((field) => field.title));
49
+ }
@@ -0,0 +1,7 @@
1
+ import type { ConnectFormProps } from "./types.js";
2
+ export declare function normalizeSubdomain(value: string): string;
3
+ export declare function isValidSubdomain(value: string): boolean;
4
+ export declare function subdomainError(value: string, connectedSubdomains: ReadonlySet<string>, reconnectableSubdomains?: ReadonlySet<string>): string | undefined;
5
+ export declare function dashStartHref(subdomain: string): string;
6
+ export declare function DashConnectForm(props: ConnectFormProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=DashConnectForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashConnectForm.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/DashConnectForm.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA+ChD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQxD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,uBAAuB,GAAE,WAAW,CAAC,MAAM,CAAa,GACvD,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,2CAmDtD"}
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { GQLIntegration, useDashSetupConnectMutation, useDashSetupProgressQuery, } from "@manta-eu/client";
3
+ import { isPresent } from "@manta-eu/lib/present";
4
+ import { useQueryClient } from "@tanstack/react-query";
5
+ import { useState } from "react";
6
+ import { ConnectWizardShell } from "./ConnectWizardShell.js";
7
+ import { dashFolderTreeItems } from "./dash-folder-tree.js";
8
+ import { OAuthSetupConnectForm } from "./OAuthSetupConnectForm.js";
9
+ import { useConnectedExternalIds, useReconnectableExternalIds } from "./useConnectedExternalIds.js";
10
+ import { Input } from "#components/input/index";
11
+ import { useMantaClient } from "#providers/index";
12
+ const copy = {
13
+ providerName: "Dash",
14
+ identityProviderName: "Dash",
15
+ entitySingular: "folder",
16
+ entityPlural: "folders",
17
+ signInDescription: "We'll take you to Dash so you can grant Manta read access to this account's assets and the folders they live in.",
18
+ pickTitle: "Pick the Dash folders to connect",
19
+ pickDescription: "Manta pulls the assets in the folders you pick, and in every folder inside them.",
20
+ noEntitiesLabel: "We couldn't find any folders in this Dash account. Add folders in Dash, then disconnect Dash and connect it again.",
21
+ noneConnectableLabel: "No folders can be connected in this Dash account. Disconnect Dash and connect it again once it has folders.",
22
+ retryGuidance: "To pick folders, disconnect Dash from your integrations and connect it again.",
23
+ };
24
+ function useDashSetup() {
25
+ const { mantaClient } = useMantaClient();
26
+ const queryClient = useQueryClient();
27
+ const progressQuery = useDashSetupProgressQuery(mantaClient, undefined, { staleTime: 0 });
28
+ const connectMutation = useDashSetupConnectMutation(mantaClient);
29
+ const progress = progressQuery.data?.dashSetupProgress;
30
+ return {
31
+ progress: progress && { state: progress.state, rows: progress.folders, lastError: progress.lastError },
32
+ refetchProgress: progressQuery.refetch,
33
+ resetProgress: () => queryClient.setQueryData(useDashSetupProgressQuery.getKey(), {
34
+ dashSetupProgress: { state: [], folders: null, lastError: null },
35
+ }),
36
+ connect: (folderIds) => connectMutation.mutateAsync({ folderIds }),
37
+ isConnecting: connectMutation.isPending,
38
+ };
39
+ }
40
+ // Mirrors the backend's guard: the subdomain becomes a secret-path segment verbatim.
41
+ const subdomainPattern = /^[a-z0-9][a-z0-9-]*$/i;
42
+ const dashHostSuffix = ".dash.app";
43
+ // People paste the address they see, so accept manta.dash.app (with or without a scheme)
44
+ // and keep only the label. A different domain keeps its dots and fails validation.
45
+ export function normalizeSubdomain(value) {
46
+ const withoutScheme = value
47
+ .trim()
48
+ .toLowerCase()
49
+ .replace(/^[a-z]+:\/\//, "");
50
+ const host = withoutScheme.replace(/\/.*$/, "");
51
+ // Only a real Dash host gives up its path; anything else keeps its slashes and fails validation.
52
+ return host.endsWith(dashHostSuffix) ? host.slice(0, -dashHostSuffix.length) : withoutScheme;
53
+ }
54
+ export function isValidSubdomain(value) {
55
+ return subdomainPattern.test(normalizeSubdomain(value));
56
+ }
57
+ export function subdomainError(value, connectedSubdomains, reconnectableSubdomains = new Set()) {
58
+ if (!isPresent(value.trim()))
59
+ return undefined;
60
+ if (!isValidSubdomain(value))
61
+ return "Letters, numbers and hyphens only.";
62
+ const subdomain = normalizeSubdomain(value);
63
+ if (connectedSubdomains.has(subdomain) && !reconnectableSubdomains.has(subdomain)) {
64
+ return "This Dash account is already connected here. Disconnect it first to connect it again.";
65
+ }
66
+ return undefined;
67
+ }
68
+ export function dashStartHref(subdomain) {
69
+ const params = new URLSearchParams({ subdomain: normalizeSubdomain(subdomain) });
70
+ return `/oauth/dash/start?${params}`;
71
+ }
72
+ export function DashConnectForm(props) {
73
+ const { provider, onBack, resumedFromOAuth = false } = props;
74
+ const [subdomain, setSubdomain] = useState("");
75
+ // Back from Dash sign-in, the subdomain is already bound to the grant.
76
+ const [confirmed, setConfirmed] = useState(resumedFromOAuth);
77
+ const setup = useDashSetup();
78
+ const connectedSubdomains = useConnectedExternalIds(GQLIntegration.Dash);
79
+ const reconnectableSubdomains = useReconnectableExternalIds(GQLIntegration.Dash);
80
+ const error = subdomainError(subdomain, connectedSubdomains, reconnectableSubdomains);
81
+ if (!confirmed) {
82
+ return (_jsx(ConnectWizardShell, { provider: provider, totalSteps: 2, currentStep: 1, stepTitle: "Which Dash account?", stepDescription: "Dash grants access one account at a time, so we need to know which one before sending you over.", onBack: onBack, onContinue: () => setConfirmed(true), continueDisabled: !isValidSubdomain(subdomain) || isPresent(error), children: _jsx(Input, { id: "dash-subdomain", label: "Dash subdomain", placeholder: "acme", autoComplete: "off", value: subdomain, onChange: (event) => setSubdomain(event.target.value), error: error, helperText: "The name in your Dash address \u2014 acme, or paste acme.dash.app." }) }));
83
+ }
84
+ return (_jsx(OAuthSetupConnectForm, { ...props,
85
+ // Once signed in, the subdomain step would refuse the account that was just connected.
86
+ onBack: resumedFromOAuth ? onBack : () => setConfirmed(false), integration: GQLIntegration.Dash, oauthStartPath: dashStartHref(subdomain), copy: copy, setup: setup, treeItems: dashFolderTreeItems, treeOptions: { defaultCollapsed: true, includeDescendants: true }, resumesUnfinishedSetup: false }));
87
+ }
@@ -0,0 +1,20 @@
1
+ import type { ProviderPresentation } from "../../types.js";
2
+ import { type ConnectorField, type DataConnectionValues, type StoredDataConnection } from "./data-connection-fields.js";
3
+ import type { ConnectFormProps, StepConfig } from "./types.js";
4
+ export type StoredConnection = StoredDataConnection & {
5
+ id: string;
6
+ };
7
+ type Step = StepConfig<DataConnectionValues>;
8
+ export declare function createSteps(providerName: string, connectorType: string, fields: readonly ConnectorField[], editing?: boolean): Step[];
9
+ export declare function DataConnectionConnectForm(props: ConnectFormProps): import("react/jsx-runtime").JSX.Element;
10
+ export type DataConnectionEditFormProps = {
11
+ provider: ProviderPresentation<string>;
12
+ connectorType: string;
13
+ stored: StoredConnection;
14
+ status: string;
15
+ onChanged: () => void;
16
+ onDismiss: () => void;
17
+ };
18
+ export declare function DataConnectionEditForm(props: DataConnectionEditFormProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=DataConnectionConnectForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataConnectionConnectForm.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/DataConnectionConnectForm.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAIxD,OAAO,EAUL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK5D,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,KAAK,IAAI,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAuE7C,wBAAgB,WAAW,CACzB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,OAAO,UAAQ,GACd,IAAI,EAAE,CAUR;AA4ID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,2CAWhE;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,2CAmBxE"}