@axiom-lattice/react-sdk 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{AgentDetailSideApp-EQDCKCXY.mjs → AgentDetailSideApp-ZGV4WC4V.mjs} +8 -8
  2. package/dist/AgentGovernanceWorkbench-HCVHQ3P7.mjs +20 -0
  3. package/dist/{MessageGraph-WWTTGLD7.mjs → MessageGraph-OA2HMEHI.mjs} +4 -4
  4. package/dist/{ReactChart-AOJAFAZM.mjs → ReactChart-DWIFRI5G.mjs} +4 -4
  5. package/dist/{SkillFlow-3ZGSHMHW.mjs → SkillFlow-IHRME3YO.mjs} +4 -4
  6. package/dist/{TasksSideApp-42BLTNY4.mjs → TasksSideApp-KKBQDSO4.mjs} +5 -5
  7. package/dist/{TeamWorkspace-U2IO3W4F.mjs → TeamWorkspace-ETVDJAYT.mjs} +4 -4
  8. package/dist/{TopologyRuntimeView-KJQVVUGE.mjs → TopologyRuntimeView-F7JQAXN2.mjs} +5 -5
  9. package/dist/{WorkflowAutomationView-3L3IMYYG.mjs → WorkflowAutomationView-PBZ5K43L.mjs} +7 -7
  10. package/dist/{chunk-4CGRA733.mjs → chunk-3FXH5ZAQ.mjs} +3 -3
  11. package/dist/{chunk-ECHGNV43.mjs → chunk-3MF4SALK.mjs} +6 -6
  12. package/dist/{chunk-HG7UMQO2.mjs → chunk-3SEKZBYQ.mjs} +3 -3
  13. package/dist/{chunk-HJDE5RQJ.mjs → chunk-57IPUJ5T.mjs} +3 -3
  14. package/dist/{chunk-TBQVOSCN.mjs → chunk-6XGZ74LQ.mjs} +24 -18
  15. package/dist/chunk-6XGZ74LQ.mjs.map +1 -0
  16. package/dist/{chunk-ZHOCTUDR.mjs → chunk-EHUPRLAS.mjs} +38 -10
  17. package/dist/chunk-EHUPRLAS.mjs.map +1 -0
  18. package/dist/{chunk-CRGVJY56.mjs → chunk-JQLUFZKH.mjs} +6 -6
  19. package/dist/{chunk-QTXQT77Q.mjs → chunk-KU634FOH.mjs} +4 -4
  20. package/dist/{chunk-XVZUC4U3.mjs → chunk-PEEXMLMK.mjs} +21 -5
  21. package/dist/chunk-PEEXMLMK.mjs.map +1 -0
  22. package/dist/{chunk-JNP2AHRT.mjs → chunk-TA243DB6.mjs} +36 -3
  23. package/dist/chunk-TA243DB6.mjs.map +1 -0
  24. package/dist/{embed-page-AgentDetailSideApp-GH3XNS5A.js → embed-page-AgentDetailSideApp-RM4TDSC5.js} +1 -1
  25. package/dist/{embed-page-AgentGovernanceWorkbench-AXHLZTUG.js → embed-page-AgentGovernanceWorkbench-G6A6QNZY.js} +1 -1
  26. package/dist/{embed-page-MessageGraph-HLLPBTLQ.js → embed-page-MessageGraph-ZLGTKJNE.js} +1 -1
  27. package/dist/{embed-page-ReactChart-46EYPRQ7.js → embed-page-ReactChart-IB6R6G57.js} +1 -1
  28. package/dist/{embed-page-SkillFlow-NMUDTNTY.js → embed-page-SkillFlow-STU36L34.js} +1 -1
  29. package/dist/{embed-page-TasksSideApp-DOCKHJCF.js → embed-page-TasksSideApp-X4APWG4G.js} +1 -1
  30. package/dist/{embed-page-TeamWorkspace-LXOIMYRW.js → embed-page-TeamWorkspace-EK4BNNGD.js} +1 -1
  31. package/dist/{embed-page-TopologyRuntimeView-DT7XXEK2.js → embed-page-TopologyRuntimeView-X5CHJPHN.js} +1 -1
  32. package/dist/{embed-page-WorkflowAutomationView-ONAY4RTM.js → embed-page-WorkflowAutomationView-3LIT27E2.js} +1 -1
  33. package/dist/{embed-page-chunk-JQSBSZMP.js → embed-page-chunk-5WPKSLDW.js} +1 -1
  34. package/dist/embed-page-chunk-64FTYZ5F.js +2 -0
  35. package/dist/{embed-page-chunk-LGZUYB7B.js → embed-page-chunk-734QFJP3.js} +1 -1
  36. package/dist/{embed-page-chunk-RA35MUYW.js → embed-page-chunk-7D54ACES.js} +1 -1
  37. package/dist/{embed-page-chunk-OY4CDWED.js → embed-page-chunk-DDK2VFYD.js} +7 -7
  38. package/dist/{embed-page-chunk-F7G2DME5.js → embed-page-chunk-EQRDCFN5.js} +1 -1
  39. package/dist/{embed-page-chunk-H4W4NDIY.js → embed-page-chunk-W45YCZIC.js} +7 -7
  40. package/dist/embed-page.js +1 -1
  41. package/dist/index.d.mts +41 -3
  42. package/dist/index.d.ts +41 -3
  43. package/dist/index.js +211 -125
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +10 -10
  46. package/dist/web-app.js +1 -6
  47. package/dist/web-app.js.map +1 -1
  48. package/dist/web-app.mjs +1 -1
  49. package/package.json +3 -3
  50. package/dist/AgentGovernanceWorkbench-2HCQ4POL.mjs +0 -20
  51. package/dist/chunk-JNP2AHRT.mjs.map +0 -1
  52. package/dist/chunk-TBQVOSCN.mjs.map +0 -1
  53. package/dist/chunk-XVZUC4U3.mjs.map +0 -1
  54. package/dist/chunk-ZHOCTUDR.mjs.map +0 -1
  55. package/dist/embed-page-chunk-NR2PTMJ6.js +0 -2
  56. /package/dist/{AgentDetailSideApp-EQDCKCXY.mjs.map → AgentDetailSideApp-ZGV4WC4V.mjs.map} +0 -0
  57. /package/dist/{AgentGovernanceWorkbench-2HCQ4POL.mjs.map → AgentGovernanceWorkbench-HCVHQ3P7.mjs.map} +0 -0
  58. /package/dist/{MessageGraph-WWTTGLD7.mjs.map → MessageGraph-OA2HMEHI.mjs.map} +0 -0
  59. /package/dist/{ReactChart-AOJAFAZM.mjs.map → ReactChart-DWIFRI5G.mjs.map} +0 -0
  60. /package/dist/{SkillFlow-3ZGSHMHW.mjs.map → SkillFlow-IHRME3YO.mjs.map} +0 -0
  61. /package/dist/{TasksSideApp-42BLTNY4.mjs.map → TasksSideApp-KKBQDSO4.mjs.map} +0 -0
  62. /package/dist/{TeamWorkspace-U2IO3W4F.mjs.map → TeamWorkspace-ETVDJAYT.mjs.map} +0 -0
  63. /package/dist/{TopologyRuntimeView-KJQVVUGE.mjs.map → TopologyRuntimeView-F7JQAXN2.mjs.map} +0 -0
  64. /package/dist/{WorkflowAutomationView-3L3IMYYG.mjs.map → WorkflowAutomationView-PBZ5K43L.mjs.map} +0 -0
  65. /package/dist/{chunk-4CGRA733.mjs.map → chunk-3FXH5ZAQ.mjs.map} +0 -0
  66. /package/dist/{chunk-ECHGNV43.mjs.map → chunk-3MF4SALK.mjs.map} +0 -0
  67. /package/dist/{chunk-HG7UMQO2.mjs.map → chunk-3SEKZBYQ.mjs.map} +0 -0
  68. /package/dist/{chunk-HJDE5RQJ.mjs.map → chunk-57IPUJ5T.mjs.map} +0 -0
  69. /package/dist/{chunk-CRGVJY56.mjs.map → chunk-JQLUFZKH.mjs.map} +0 -0
  70. /package/dist/{chunk-QTXQT77Q.mjs.map → chunk-KU634FOH.mjs.map} +0 -0
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  CopilotPanel,
3
3
  TrainingContextCard
4
- } from "./chunk-QTXQT77Q.mjs";
4
+ } from "./chunk-KU634FOH.mjs";
5
5
  import {
6
6
  TaskOutlineList
7
- } from "./chunk-HJDE5RQJ.mjs";
7
+ } from "./chunk-57IPUJ5T.mjs";
8
8
  import {
9
9
  WorkflowCanvas_default,
10
10
  expandWorkflow
11
- } from "./chunk-4CGRA733.mjs";
11
+ } from "./chunk-3FXH5ZAQ.mjs";
12
12
  import {
13
13
  WorkflowGraphBase,
14
14
  applyDagreLayout
@@ -50,7 +50,7 @@ import {
50
50
  useTaskCommands,
51
51
  useWorkbenchNavStyles,
52
52
  useWorkspaceContext
53
- } from "./chunk-TBQVOSCN.mjs";
53
+ } from "./chunk-6XGZ74LQ.mjs";
54
54
  import {
55
55
  Background,
56
56
  Controls,
@@ -72,15 +72,18 @@ import {
72
72
  useAuth,
73
73
  useClient,
74
74
  useLatticeChatShellContext
75
- } from "./chunk-JNP2AHRT.mjs";
75
+ } from "./chunk-TA243DB6.mjs";
76
76
  import {
77
77
  AgentWebAppRuntimeClient,
78
78
  AgentWebAppRuntimeClientError
79
79
  } from "./chunk-Y2HJPMUR.mjs";
80
80
  import {
81
+ DEFAULT_LOCALE_STORAGE_KEY,
81
82
  LatticeLocaleProvider,
83
+ LocaleBridgeContext,
84
+ readStoredLocale,
82
85
  useT
83
- } from "./chunk-XVZUC4U3.mjs";
86
+ } from "./chunk-PEEXMLMK.mjs";
84
87
 
85
88
  // src/components/Governance/agentMeta.ts
86
89
  var TYPE_LABEL = {
@@ -389,7 +392,7 @@ var AgentEvalPanel = ({ assistantId, initial, navigationKey, onEvalInvalidated }
389
392
  };
390
393
 
391
394
  // src/integrations/web-app/console-chat/AgentChatApp.tsx
392
- import { useCallback as useCallback3, useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState2 } from "react";
395
+ import { useCallback as useCallback3, useContext, useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState2 } from "react";
393
396
  import { ConfigProvider, Spin as Spin2 } from "antd";
394
397
  import { RuntimeAxiomClient } from "@axiom-lattice/client-sdk";
395
398
 
@@ -585,11 +588,36 @@ function identityScopeKey(identity) {
585
588
  function AgentChatApp(props) {
586
589
  validateProps(props);
587
590
  const scopeKey = `${props.gatewayUrl}\0${props.webAppId}\0${identityScopeKey(props.identity)}`;
591
+ const localeProvidedAbove = useContext(LocaleBridgeContext) !== null;
592
+ const storageKey = props.storageKey ?? DEFAULT_LOCALE_STORAGE_KEY;
593
+ const initialLocale = useMemo(
594
+ () => props.locale ?? readStoredLocale(storageKey) ?? "en-US",
595
+ [props.locale, storageKey]
596
+ );
597
+ const onLocaleChange = useMemo(
598
+ () => props.onLocaleChange ?? (() => {
599
+ if (typeof window !== "undefined") window.location.reload();
600
+ }),
601
+ [props.onLocaleChange]
602
+ );
603
+ if (localeProvidedAbove) {
604
+ return /* @__PURE__ */ jsx3(ScopedAgentChatApp, { ...props }, scopeKey);
605
+ }
588
606
  return (
589
607
  /* The locale provider sits ABOVE ScopedAgentChatApp on purpose: that
590
608
  * component calls useT() itself for its own loading/error copy, so a
591
- * provider rendered inside its return value would only reach descendants. */
592
- /* @__PURE__ */ jsx3(LatticeLocaleProvider, { locale: props.locale, children: /* @__PURE__ */ jsx3(ScopedAgentChatApp, { ...props }, scopeKey) })
609
+ * provider rendered inside its return value would only reach descendants.
610
+ * `locale` is passed down resolved so antd's built-in text follows the same
611
+ * value the dictionaries were loaded for. */
612
+ /* @__PURE__ */ jsx3(
613
+ LatticeLocaleProvider,
614
+ {
615
+ locale: initialLocale,
616
+ storageKey,
617
+ onLocaleChange,
618
+ children: /* @__PURE__ */ jsx3(ScopedAgentChatApp, { ...props, locale: initialLocale }, scopeKey)
619
+ }
620
+ )
593
621
  );
594
622
  }
595
623
  function ScopedAgentChatApp({ gatewayUrl, webAppId, identity, onError, onChatReady, onChatMessage, fetch: fetchImplementation, className, welcome, quickPrompts, locale = "en-US" }) {
@@ -8895,4 +8923,4 @@ export {
8895
8923
  AgentConfigGraph,
8896
8924
  AgentDetailView
8897
8925
  };
8898
- //# sourceMappingURL=chunk-ZHOCTUDR.mjs.map
8926
+ //# sourceMappingURL=chunk-EHUPRLAS.mjs.map