@datarecce/ui 0.1.12 → 0.1.14

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 (36) hide show
  1. package/dist/{LineageViewContext-BPpYWJ2B.d.mts → LineageViewContext-DEa54ZNF.d.mts} +1 -1
  2. package/dist/{LineageViewContext-DqJPwm_c.d.ts → LineageViewContext-DPVC8ak8.d.ts} +1 -1
  3. package/dist/{agGridStyles-L5J6VVIU.css → agGridStyles-VYALGSJU.css} +4 -3
  4. package/dist/api.d.mts +6 -5
  5. package/dist/api.d.ts +6 -5
  6. package/dist/api.js +13 -12
  7. package/dist/api.js.map +1 -1
  8. package/dist/api.mjs +13 -12
  9. package/dist/api.mjs.map +1 -1
  10. package/dist/components.d.mts +4 -4
  11. package/dist/components.d.ts +4 -4
  12. package/dist/components.js +1217 -879
  13. package/dist/components.js.map +1 -1
  14. package/dist/components.mjs +962 -623
  15. package/dist/components.mjs.map +1 -1
  16. package/dist/hooks.d.mts +23 -3
  17. package/dist/hooks.d.ts +23 -3
  18. package/dist/hooks.js +742 -538
  19. package/dist/hooks.js.map +1 -1
  20. package/dist/hooks.mjs +587 -383
  21. package/dist/hooks.mjs.map +1 -1
  22. package/dist/index.d.mts +2 -2
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +1311 -962
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +998 -648
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/{lineagecheck-BIlm5vq1.d.ts → lineagecheck-BQaKAQzn.d.mts} +3 -3
  29. package/dist/{lineagecheck-BIlm5vq1.d.mts → lineagecheck-BQaKAQzn.d.ts} +3 -3
  30. package/dist/{style-LYNBK7ND.css → style-466WWZLM.css} +36 -8
  31. package/dist/styles-JV3V5MVO.css +42 -0
  32. package/dist/{styles-PJUYW64Y.css → styles-QUPOR3LM.css} +7 -2
  33. package/dist/types.d.mts +2 -2
  34. package/dist/types.d.ts +2 -2
  35. package/package.json +5 -5
  36. package/dist/styles-VXS6KNFS.css +0 -9
package/dist/hooks.js CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  var reactQuery = require('@tanstack/react-query');
4
4
  var axios = require('axios');
5
+ var React12 = require('react');
6
+ var jsxRuntime = require('react/jsx-runtime');
5
7
  require('@mui/material/Alert');
6
8
  require('@mui/material/CircularProgress');
7
9
  require('@mui/material/Snackbar');
8
10
  var Stack5 = require('@mui/material/Stack');
9
11
  var Typography9 = require('@mui/material/Typography');
10
- var React11 = require('react');
11
- var jsxRuntime = require('react/jsx-runtime');
12
12
  var Box21 = require('@mui/material/Box');
13
13
  var Button2 = require('@mui/material/Button');
14
14
  var MuiDialog2 = require('@mui/material/Dialog');
@@ -33,6 +33,7 @@ var FormControl = require('@mui/material/FormControl');
33
33
  var FormLabel = require('@mui/material/FormLabel');
34
34
  var NativeSelect = require('@mui/material/NativeSelect');
35
35
  var _3 = require('lodash');
36
+ var styles = require('@mui/material/styles');
36
37
  var chart_js = require('chart.js');
37
38
  var reactChartjs2 = require('react-chartjs-2');
38
39
  require('@jeromefitz/date-fns-tz');
@@ -47,21 +48,20 @@ var vsc = require('react-icons/vsc');
47
48
  var pi = require('react-icons/pi');
48
49
  var Tooltip2 = require('@mui/material/Tooltip');
49
50
  var usehooksTs = require('usehooks-ts');
50
- var styles = require('@mui/material/styles');
51
- require('./style-LYNBK7ND.css');
51
+ require('./style-466WWZLM.css');
52
52
  var ListSubheader2 = require('@mui/material/ListSubheader');
53
53
  var agGridCommunity = require('ag-grid-community');
54
54
  var agGridReact = require('ag-grid-react');
55
- require('./agGridStyles-L5J6VVIU.css');
55
+ require('./agGridStyles-VYALGSJU.css');
56
56
  var ButtonGroup = require('@mui/material/ButtonGroup');
57
57
  var Divider = require('@mui/material/Divider');
58
58
 
59
59
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
60
60
 
61
61
  var axios__default = /*#__PURE__*/_interopDefault(axios);
62
+ var React12__default = /*#__PURE__*/_interopDefault(React12);
62
63
  var Stack5__default = /*#__PURE__*/_interopDefault(Stack5);
63
64
  var Typography9__default = /*#__PURE__*/_interopDefault(Typography9);
64
- var React11__default = /*#__PURE__*/_interopDefault(React11);
65
65
  var Box21__default = /*#__PURE__*/_interopDefault(Box21);
66
66
  var Button2__default = /*#__PURE__*/_interopDefault(Button2);
67
67
  var MuiDialog2__default = /*#__PURE__*/_interopDefault(MuiDialog2);
@@ -117,20 +117,32 @@ var axiosClient = axios__default.default.create({
117
117
  new reactQuery.QueryClient();
118
118
 
119
119
  // recce-source/js/src/lib/api/instanceInfo.ts
120
- async function getRecceInstanceInfo() {
121
- return (await axiosClient.get(
120
+ async function getRecceInstanceInfo(client = axiosClient) {
121
+ return (await client.get(
122
122
  "/api/instance-info"
123
123
  )).data;
124
124
  }
125
+ var ApiConfigContext = React12.createContext(null);
126
+ var defaultApiConfigContext = {
127
+ apiPrefix: "",
128
+ authToken: void 0,
129
+ baseUrl: void 0,
130
+ apiClient: axios__default.default.create({ baseURL: PUBLIC_API_URL })
131
+ };
132
+ function useApiConfig() {
133
+ const context = React12.useContext(ApiConfigContext);
134
+ return context ?? defaultApiConfigContext;
135
+ }
125
136
 
126
137
  // recce-source/js/src/lib/hooks/useRecceInstanceInfo.tsx
127
138
  var useRecceInstanceInfo = () => {
139
+ const { apiClient } = useApiConfig();
128
140
  return reactQuery.useQuery({
129
141
  queryKey: cacheKeys.instanceInfo(),
130
- queryFn: getRecceInstanceInfo
142
+ queryFn: () => getRecceInstanceInfo(apiClient)
131
143
  });
132
144
  };
133
- React11.createContext(null);
145
+ React12.createContext(null);
134
146
  var toastIdCounter = 0;
135
147
  var listeners = /* @__PURE__ */ new Set();
136
148
  var toaster = {
@@ -200,9 +212,9 @@ function useClipBoardToast() {
200
212
  failToast
201
213
  };
202
214
  }
203
- var LineageViewContext = React11.createContext(void 0);
215
+ var LineageViewContext = React12.createContext(void 0);
204
216
  var useLineageViewContext = () => {
205
- return React11.useContext(LineageViewContext);
217
+ return React12.useContext(LineageViewContext);
206
218
  };
207
219
  function track(eventInput, eventProperties, eventOptions) {
208
220
  {
@@ -236,11 +248,11 @@ function isExploreAction(type) {
236
248
  return Object.values(EXPLORE_ACTION).includes(type);
237
249
  }
238
250
  function useValueDiffAlertDialog() {
239
- const [open, setOpen] = React11.useState(false);
240
- const [nodeCount, setNodeCount] = React11.useState(0);
241
- const [resolvePromise, setResolvePromise] = React11.useState();
242
- const cancelRef = React11.useRef(null);
243
- const confirm = React11.useCallback((nodeCount2) => {
251
+ const [open, setOpen] = React12.useState(false);
252
+ const [nodeCount, setNodeCount] = React12.useState(0);
253
+ const [resolvePromise, setResolvePromise] = React12.useState();
254
+ const cancelRef = React12.useRef(null);
255
+ const confirm = React12.useCallback((nodeCount2) => {
244
256
  setNodeCount(nodeCount2);
245
257
  return new Promise((resolve) => {
246
258
  setResolvePromise(() => resolve);
@@ -587,20 +599,20 @@ var defaultValue = {
587
599
  shareUrl: void 0,
588
600
  sessionId: void 0
589
601
  };
590
- var InstanceInfo = React11.createContext(defaultValue);
602
+ var InstanceInfo = React12.createContext(defaultValue);
591
603
  function RecceInstanceInfoProvider({
592
604
  children
593
605
  }) {
594
606
  const { data: instanceInfo, isLoading } = useRecceInstanceInfo();
595
- const [featureToggles, setFeatureToggles] = React11.useState(
607
+ const [featureToggles, setFeatureToggles] = React12.useState(
596
608
  defaultFeatureToggles
597
609
  );
598
- const [singleEnv, setSingleEnv] = React11.useState(false);
599
- const [authed, setAuthed] = React11.useState(false);
600
- const [lifetimeExpiredAt, setLifetimeExpiredAt] = React11.useState();
601
- const [shareUrl, setShareUrl] = React11.useState();
602
- const [sessionId, setSessionId] = React11.useState();
603
- const [prevInstanceInfo, setPrevInstanceInfo] = React11.useState(instanceInfo);
610
+ const [singleEnv, setSingleEnv] = React12.useState(false);
611
+ const [authed, setAuthed] = React12.useState(false);
612
+ const [lifetimeExpiredAt, setLifetimeExpiredAt] = React12.useState();
613
+ const [shareUrl, setShareUrl] = React12.useState();
614
+ const [sessionId, setSessionId] = React12.useState();
615
+ const [prevInstanceInfo, setPrevInstanceInfo] = React12.useState(instanceInfo);
604
616
  if (!isLoading && instanceInfo && instanceInfo !== prevInstanceInfo) {
605
617
  setPrevInstanceInfo(instanceInfo);
606
618
  setSingleEnv(instanceInfo.single_env);
@@ -657,22 +669,22 @@ function RecceInstanceInfoProvider({
657
669
  }
658
670
  );
659
671
  }
660
- var useRecceInstanceContext = () => React11.useContext(InstanceInfo);
672
+ var useRecceInstanceContext = () => React12.useContext(InstanceInfo);
661
673
 
662
674
  // recce-source/js/src/lib/api/flag.ts
663
- async function getServerFlag() {
664
- return (await axiosClient.get("/api/flag")).data;
675
+ async function getServerFlag(client = axiosClient) {
676
+ return (await client.get("/api/flag")).data;
665
677
  }
666
- async function markRelaunchHintCompleted() {
678
+ async function markRelaunchHintCompleted(client = axiosClient) {
667
679
  try {
668
- await axiosClient.post(
680
+ await client.post(
669
681
  "/api/relaunch-hint/completed"
670
682
  );
671
683
  } catch (_error) {
672
684
  }
673
685
  }
674
- async function getServerInfo() {
675
- return (await axiosClient.get(`/api/info`)).data;
686
+ async function getServerInfo(client = axiosClient) {
687
+ return (await client.get(`/api/info`)).data;
676
688
  }
677
689
  async function getModelInfo(model) {
678
690
  return (await axiosClient.get(
@@ -734,8 +746,11 @@ async function searchRuns(type, params, limit) {
734
746
  );
735
747
  return response.data;
736
748
  }
737
- async function aggregateRuns() {
738
- const response = await axiosClient.post(`/api/runs/aggregate`, {});
749
+ async function aggregateRuns(client = axiosClient) {
750
+ const response = await client.post(
751
+ `/api/runs/aggregate`,
752
+ {}
753
+ );
739
754
  return response.data;
740
755
  }
741
756
 
@@ -821,7 +836,7 @@ function useIdleDetection() {
821
836
  isDisconnected,
822
837
  isEnabled
823
838
  });
824
- const sendKeepAliveNow = React11.useCallback(async () => {
839
+ const sendKeepAliveNow = React12.useCallback(async () => {
825
840
  if (document.hidden) return;
826
841
  const sent = await sendKeepAlive();
827
842
  if (sent) {
@@ -830,7 +845,7 @@ function useIdleDetection() {
830
845
  });
831
846
  }
832
847
  }, []);
833
- const handleActivity = React11.useCallback(
848
+ const handleActivity = React12.useCallback(
834
849
  (event) => {
835
850
  if (isEnabled && !document.hidden) {
836
851
  debugLog("[Idle Detection] Activity detected", {
@@ -842,7 +857,7 @@ function useIdleDetection() {
842
857
  },
843
858
  [isEnabled, sendKeepAliveNow]
844
859
  );
845
- const handleVisibilityChange = React11.useCallback(() => {
860
+ const handleVisibilityChange = React12.useCallback(() => {
846
861
  if (!isEnabled) return;
847
862
  if (!document.hidden) {
848
863
  debugLog("[Idle Detection] Tab became active", {
@@ -851,14 +866,14 @@ function useIdleDetection() {
851
866
  void sendKeepAliveNow();
852
867
  }
853
868
  }, [isEnabled, sendKeepAliveNow]);
854
- const throttledHandler = React11.useMemo(
869
+ const throttledHandler = React12.useMemo(
855
870
  () => throttle__default.default(handleActivity, IDLE_DETECTION_CONFIG.EVENT_THROTTLE_MS, {
856
871
  leading: true,
857
872
  trailing: true
858
873
  }),
859
874
  [handleActivity]
860
875
  );
861
- React11.useEffect(() => {
876
+ React12.useEffect(() => {
862
877
  if (!isEnabled) {
863
878
  debugLog("[Idle Detection] Disabled", {
864
879
  idleTimeout,
@@ -887,21 +902,21 @@ function useIdleDetection() {
887
902
  };
888
903
  }, [isEnabled, throttledHandler, handleVisibilityChange, idleTimeout]);
889
904
  }
890
- var IdleTimeoutContext = React11.createContext(
905
+ var IdleTimeoutContext = React12.createContext(
891
906
  void 0
892
907
  );
893
908
  function IdleTimeoutProvider({ children }) {
894
909
  const { data: instanceInfo } = useRecceInstanceInfo();
895
- const lastServerSyncRef = React11.useRef(Date.now());
896
- const [remainingSeconds, setRemainingSeconds] = React11.useState(null);
897
- const [isDisconnected, setIsDisconnected] = React11.useState(false);
910
+ const lastServerSyncRef = React12.useRef(Date.now());
911
+ const [remainingSeconds, setRemainingSeconds] = React12.useState(null);
912
+ const [isDisconnected, setIsDisconnected] = React12.useState(false);
898
913
  const idleTimeout = instanceInfo?.idle_timeout ?? null;
899
914
  const isEnabled = idleTimeout !== null && idleTimeout > 0;
900
- const isEnabledRef = React11.useRef(isEnabled);
901
- React11.useEffect(() => {
915
+ const isEnabledRef = React12.useRef(isEnabled);
916
+ React12.useEffect(() => {
902
917
  isEnabledRef.current = isEnabled;
903
918
  }, [isEnabled]);
904
- React11.useEffect(() => {
919
+ React12.useEffect(() => {
905
920
  if (!isEnabled) {
906
921
  setKeepAliveCallback(null);
907
922
  return;
@@ -919,14 +934,14 @@ function IdleTimeoutProvider({ children }) {
919
934
  setKeepAliveCallback(null);
920
935
  };
921
936
  }, [isEnabled]);
922
- const setDisconnected = React11.useCallback(() => {
937
+ const setDisconnected = React12.useCallback(() => {
923
938
  setIsDisconnected(true);
924
939
  }, []);
925
- const resetConnection = React11.useCallback(() => {
940
+ const resetConnection = React12.useCallback(() => {
926
941
  setIsDisconnected(false);
927
942
  lastServerSyncRef.current = Date.now();
928
943
  }, []);
929
- React11.useEffect(() => {
944
+ React12.useEffect(() => {
930
945
  if (!isEnabled || idleTimeout === null) {
931
946
  setRemainingSeconds(null);
932
947
  return;
@@ -969,52 +984,63 @@ function IdleDetector() {
969
984
  return null;
970
985
  }
971
986
  function useIdleTimeout() {
972
- const context = React11.useContext(IdleTimeoutContext);
987
+ const context = React12.useContext(IdleTimeoutContext);
973
988
  if (!context) {
974
989
  throw new Error("useIdleTimeout must be used within IdleTimeoutProvider");
975
990
  }
976
991
  return context;
977
992
  }
978
993
  function useIdleTimeoutSafe() {
979
- return React11.useContext(IdleTimeoutContext) ?? null;
994
+ return React12.useContext(IdleTimeoutContext) ?? null;
980
995
  }
981
996
  var useRecceServerFlag = () => {
997
+ const { apiClient } = useApiConfig();
982
998
  return reactQuery.useQuery({
983
999
  queryKey: cacheKeys.flag(),
984
- queryFn: getServerFlag
1000
+ queryFn: () => getServerFlag(apiClient)
985
1001
  });
986
1002
  };
987
1003
  var defaultLineageGraphsContext = {
988
1004
  isActionAvailable: () => true,
989
1005
  isDemoSite: false
990
1006
  };
991
- var LineageGraphContext = React11.createContext(defaultLineageGraphsContext);
992
- function useLineageWatcher() {
993
- const [artifactsUpdatedToastId, setArtifactsUpdatedToastId] = React11.useState(void 0);
994
- const ref = React11.useRef({
1007
+ var LineageGraphContext = React12.createContext(defaultLineageGraphsContext);
1008
+ function useLineageWatcher({
1009
+ enabled = true,
1010
+ baseUrl,
1011
+ apiPrefix
1012
+ } = {}) {
1013
+ const [artifactsUpdatedToastId, setArtifactsUpdatedToastId] = React12.useState(void 0);
1014
+ const ref = React12.useRef({
995
1015
  ws: void 0,
996
1016
  status: "pending",
997
1017
  artifactsUpdatedToastId: void 0
998
1018
  });
999
- const [status, setStatus] = React11.useState("pending");
1000
- const [envStatus, setEnvStatus] = React11.useState(void 0);
1001
- React11.useEffect(() => {
1019
+ const [status, setStatus] = React12.useState(
1020
+ enabled ? "pending" : "connected"
1021
+ );
1022
+ const [envStatus, setEnvStatus] = React12.useState(void 0);
1023
+ React12.useEffect(() => {
1002
1024
  ref.current.status = status;
1003
1025
  }, [status]);
1004
- React11.useEffect(() => {
1026
+ React12.useEffect(() => {
1005
1027
  ref.current.artifactsUpdatedToastId = artifactsUpdatedToastId;
1006
1028
  }, [artifactsUpdatedToastId]);
1007
1029
  const queryClient = reactQuery.useQueryClient();
1008
- const invalidateCaches = React11.useCallback(() => {
1030
+ const invalidateCaches = React12.useCallback(() => {
1009
1031
  void queryClient.invalidateQueries({ queryKey: cacheKeys.lineage() });
1010
1032
  void queryClient.invalidateQueries({ queryKey: cacheKeys.checks() });
1011
1033
  void queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
1012
1034
  }, [queryClient]);
1013
- const connect = React11.useCallback(() => {
1035
+ const connect = React12.useCallback(() => {
1014
1036
  function httpUrlToWebSocketUrl(url) {
1015
1037
  return url.replace(/(http)(s)?:\/\//, "ws$2://");
1016
1038
  }
1017
- const ws = new WebSocket(`${httpUrlToWebSocketUrl(PUBLIC_API_URL)}/api/ws`);
1039
+ const effectiveBaseUrl = baseUrl ?? PUBLIC_API_URL;
1040
+ const wsPath = apiPrefix ? `${apiPrefix}/ws` : "/api/ws";
1041
+ const ws = new WebSocket(
1042
+ `${httpUrlToWebSocketUrl(effectiveBaseUrl)}${wsPath}`
1043
+ );
1018
1044
  ref.current.ws = ws;
1019
1045
  ws.onopen = () => {
1020
1046
  ws.send("ping");
@@ -1077,8 +1103,11 @@ function useLineageWatcher() {
1077
1103
  });
1078
1104
  ref.current.ws = void 0;
1079
1105
  };
1080
- }, [invalidateCaches]);
1081
- React11.useEffect(() => {
1106
+ }, [invalidateCaches, baseUrl, apiPrefix]);
1107
+ React12.useEffect(() => {
1108
+ if (!enabled) {
1109
+ return;
1110
+ }
1082
1111
  const refObj = ref.current;
1083
1112
  connect();
1084
1113
  return () => {
@@ -1086,7 +1115,7 @@ function useLineageWatcher() {
1086
1115
  refObj.ws.close();
1087
1116
  }
1088
1117
  };
1089
- }, [connect]);
1118
+ }, [connect, enabled]);
1090
1119
  return {
1091
1120
  connectionStatus: status,
1092
1121
  connect,
@@ -1101,15 +1130,16 @@ function LineageGraphContextProvider({ children }) {
1101
1130
  setDisconnected,
1102
1131
  resetConnection
1103
1132
  } = useIdleTimeout();
1133
+ const { apiClient, apiPrefix, baseUrl } = useApiConfig();
1104
1134
  const queryServerInfo = reactQuery.useQuery({
1105
1135
  queryKey: cacheKeys.lineage(),
1106
- queryFn: getServerInfo
1136
+ queryFn: () => getServerInfo(apiClient)
1107
1137
  });
1108
1138
  const queryRunAggregated = reactQuery.useQuery({
1109
1139
  queryKey: cacheKeys.runsAggregated(),
1110
- queryFn: aggregateRuns
1140
+ queryFn: () => aggregateRuns(apiClient)
1111
1141
  });
1112
- const lineageGraph = React11.useMemo(() => {
1142
+ const lineageGraph = React12.useMemo(() => {
1113
1143
  const lineage2 = queryServerInfo.data?.lineage;
1114
1144
  if (!lineage2?.base) {
1115
1145
  return void 0;
@@ -1147,8 +1177,12 @@ function LineageGraphContextProvider({ children }) {
1147
1177
  },
1148
1178
  sqlmesh
1149
1179
  };
1150
- const { connectionStatus, connect, envStatus } = useLineageWatcher();
1151
- React11.useEffect(() => {
1180
+ const { connectionStatus, connect, envStatus } = useLineageWatcher({
1181
+ enabled: true,
1182
+ baseUrl,
1183
+ apiPrefix
1184
+ });
1185
+ React12.useEffect(() => {
1152
1186
  if (connectionStatus === "disconnected") {
1153
1187
  setDisconnected();
1154
1188
  } else if (connectionStatus === "connected") {
@@ -1157,10 +1191,10 @@ function LineageGraphContextProvider({ children }) {
1157
1191
  }, [connectionStatus, setDisconnected, resetConnection]);
1158
1192
  const { data: flags, isLoading } = useRecceServerFlag();
1159
1193
  const { featureToggles, shareUrl } = useRecceInstanceContext();
1160
- const [relaunchHintOpen, setRelaunchHintOpen] = React11.useState(false);
1161
- const [prevRelaunchCondition, setPrevRelaunchCondition] = React11.useState(false);
1194
+ const [relaunchHintOpen, setRelaunchHintOpen] = React12.useState(false);
1195
+ const [prevRelaunchCondition, setPrevRelaunchCondition] = React12.useState(false);
1162
1196
  const queryClient = reactQuery.useQueryClient();
1163
- const isActionAvailable = React11.useCallback(
1197
+ const isActionAvailable = React12.useCallback(
1164
1198
  (name) => {
1165
1199
  if (supportTasks) {
1166
1200
  return supportTasks[name] ?? true;
@@ -1174,7 +1208,7 @@ function LineageGraphContextProvider({ children }) {
1174
1208
  setPrevRelaunchCondition(shouldShowRelaunch);
1175
1209
  setRelaunchHintOpen(shouldShowRelaunch);
1176
1210
  }
1177
- React11.useEffect(() => {
1211
+ React12.useEffect(() => {
1178
1212
  if (shouldShowRelaunch && relaunchHintOpen) {
1179
1213
  trackSingleEnvironment({ action: "target_base_added" });
1180
1214
  }
@@ -1265,7 +1299,7 @@ function LineageGraphContextProvider({ children }) {
1265
1299
  ] })
1266
1300
  ] });
1267
1301
  }
1268
- var useLineageGraphContext = () => React11.useContext(LineageGraphContext);
1302
+ var useLineageGraphContext = () => React12.useContext(LineageGraphContext);
1269
1303
  var useRunsAggregated = () => {
1270
1304
  const { runsAggregated, refetchRunsAggregated } = useLineageGraphContext();
1271
1305
  return [runsAggregated, refetchRunsAggregated];
@@ -1308,13 +1342,13 @@ var RunModal = ({
1308
1342
  params: defaultParams,
1309
1343
  RunForm
1310
1344
  }) => {
1311
- const [params, setParams] = React11.useState(
1345
+ const [params, setParams] = React12.useState(
1312
1346
  defaultParams ?? {}
1313
1347
  );
1314
- const [anchorEl, setAnchorEl] = React11.useState(null);
1315
- const [isReadyToExecute, setIsReadyToExecute] = React11.useState(false);
1348
+ const [anchorEl, setAnchorEl] = React12.useState(null);
1349
+ const [isReadyToExecute, setIsReadyToExecute] = React12.useState(false);
1316
1350
  const documentationUrl = getDocumentationUrl(type);
1317
- const executeClicked = React11.useRef(false);
1351
+ const executeClicked = React12.useRef(false);
1318
1352
  const handleClose = () => {
1319
1353
  if (!executeClicked.current && isExploreAction(type)) {
1320
1354
  trackExploreActionForm({
@@ -1416,8 +1450,9 @@ var RunModal = ({
1416
1450
  sx: {
1417
1451
  p: 0,
1418
1452
  overflow: "auto",
1419
- borderTop: "1px solid lightgray",
1420
- borderBottom: "1px solid lightgray"
1453
+ borderTop: "1px solid",
1454
+ borderBottom: "1px solid",
1455
+ borderColor: "divider"
1421
1456
  },
1422
1457
  children: /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { contain: "layout" }, children: RunForm && /* @__PURE__ */ jsxRuntime.jsx(
1423
1458
  RunForm,
@@ -1481,17 +1516,17 @@ var useModelColumns = (model) => {
1481
1516
  name: model
1482
1517
  }
1483
1518
  });
1484
- const nodeColumns = React11.useMemo(() => {
1519
+ const nodeColumns = React12.useMemo(() => {
1485
1520
  return node ? extractColumns(node) : [];
1486
1521
  }, [node]);
1487
- const [columns, setColumns] = React11.useState([]);
1488
- const [primaryKey, setPrimaryKey] = React11.useState();
1489
- const [isLoading, setIsLoading] = React11.useState(true);
1490
- const [error, setError] = React11.useState(null);
1491
- const [prevNodeColumns, setPrevNodeColumns] = React11.useState([]);
1492
- const [prevNodeId, setPrevNodeId] = React11.useState(node?.id);
1522
+ const [columns, setColumns] = React12.useState([]);
1523
+ const [primaryKey, setPrimaryKey] = React12.useState();
1524
+ const [isLoading, setIsLoading] = React12.useState(true);
1525
+ const [error, setError] = React12.useState(null);
1526
+ const [prevNodeColumns, setPrevNodeColumns] = React12.useState([]);
1527
+ const [prevNodeId, setPrevNodeId] = React12.useState(node?.id);
1493
1528
  const nodePrimaryKey = node ? node.data.data.current?.primary_key : void 0;
1494
- const fetchData = React11.useCallback(async () => {
1529
+ const fetchData = React12.useCallback(async () => {
1495
1530
  if (!node) {
1496
1531
  return;
1497
1532
  }
@@ -1522,7 +1557,7 @@ var useModelColumns = (model) => {
1522
1557
  setIsLoading(false);
1523
1558
  }
1524
1559
  }
1525
- React11.useEffect(() => {
1560
+ React12.useEffect(() => {
1526
1561
  if (nodeColumns.length === 0 && node?.id !== void 0) {
1527
1562
  fetchData().catch((e) => {
1528
1563
  console.error(e);
@@ -1715,10 +1750,56 @@ function formatAsAbbreviatedNumber(input) {
1715
1750
  }).format(input);
1716
1751
  }
1717
1752
  }
1753
+
1754
+ // recce-source/js/src/components/charts/chartTheme.ts
1755
+ function getChartThemeColors(isDark) {
1756
+ return {
1757
+ gridColor: isDark ? "#4b5563" : "#d1d5db",
1758
+ textColor: isDark ? "#e5e7eb" : "#374151",
1759
+ borderColor: isDark ? "#6b7280" : "#9ca3af",
1760
+ tooltipBackgroundColor: isDark ? "#1f2937" : "#ffffff",
1761
+ tooltipTextColor: isDark ? "#e5e7eb" : "#111827"
1762
+ };
1763
+ }
1764
+ function getThemedPluginOptions(isDark) {
1765
+ const colors2 = getChartThemeColors(isDark);
1766
+ return {
1767
+ legend: {
1768
+ labels: {
1769
+ color: colors2.textColor
1770
+ }
1771
+ },
1772
+ title: {
1773
+ color: colors2.textColor
1774
+ },
1775
+ tooltip: {
1776
+ backgroundColor: colors2.tooltipBackgroundColor,
1777
+ titleColor: colors2.tooltipTextColor,
1778
+ bodyColor: colors2.tooltipTextColor,
1779
+ borderColor: colors2.borderColor,
1780
+ borderWidth: 1
1781
+ }
1782
+ };
1783
+ }
1718
1784
  var CURRENT_BAR_COLOR = "#63B3ED";
1719
1785
  var BASE_BAR_COLOR = "#F6AD55";
1720
1786
  var CURRENT_BAR_COLOR_WITH_ALPHA = `${CURRENT_BAR_COLOR}A5`;
1721
1787
  var BASE_BAR_COLOR_WITH_ALPHA = `${BASE_BAR_COLOR}A5`;
1788
+ var CURRENT_BAR_COLOR_DARK = "#90CDF4";
1789
+ var BASE_BAR_COLOR_DARK = "#FBD38D";
1790
+ var CURRENT_BAR_COLOR_DARK_WITH_ALPHA = `${CURRENT_BAR_COLOR_DARK}A5`;
1791
+ var BASE_BAR_COLOR_DARK_WITH_ALPHA = `${BASE_BAR_COLOR_DARK}A5`;
1792
+ var INFO_VAL_COLOR = "#63B3ED";
1793
+ var INFO_VAL_COLOR_DARK = "#90CDF4";
1794
+ function getBarColors(isDark) {
1795
+ return {
1796
+ current: isDark ? CURRENT_BAR_COLOR_DARK : CURRENT_BAR_COLOR,
1797
+ base: isDark ? BASE_BAR_COLOR_DARK : BASE_BAR_COLOR,
1798
+ currentWithAlpha: isDark ? CURRENT_BAR_COLOR_DARK_WITH_ALPHA : CURRENT_BAR_COLOR_WITH_ALPHA,
1799
+ baseWithAlpha: isDark ? BASE_BAR_COLOR_DARK_WITH_ALPHA : BASE_BAR_COLOR_WITH_ALPHA,
1800
+ info: isDark ? INFO_VAL_COLOR_DARK : INFO_VAL_COLOR
1801
+ };
1802
+ }
1722
1803
  function SquareIcon({ color }) {
1723
1804
  return /* @__PURE__ */ jsxRuntime.jsx(
1724
1805
  Box21__default.default,
@@ -1742,6 +1823,8 @@ function HistogramChart({
1742
1823
  hideAxis = false,
1743
1824
  animation = false
1744
1825
  }) {
1826
+ const theme = styles.useTheme();
1827
+ const isDark = theme.palette.mode === "dark";
1745
1828
  chart_js.Chart.register(
1746
1829
  chart_js.BarElement,
1747
1830
  chart_js.TimeSeriesScale,
@@ -1751,8 +1834,10 @@ function HistogramChart({
1751
1834
  chart_js.Legend,
1752
1835
  chart_js.Tooltip
1753
1836
  );
1754
- const chartOptions = getHistogramChartOptions(data, hideAxis, { animation });
1755
- const chartData = getHistogramChartData(data);
1837
+ const chartOptions = getHistogramChartOptions(data, hideAxis, isDark, {
1838
+ animation
1839
+ });
1840
+ const chartData = getHistogramChartData(data, isDark);
1756
1841
  return /* @__PURE__ */ jsxRuntime.jsx(reactChartjs2.Chart, { type: "bar", options: chartOptions, data: chartData, plugins: [] });
1757
1842
  }
1758
1843
  function getHistogramChartDataset(type, binEdges, label, color, data) {
@@ -1773,53 +1858,65 @@ function getHistogramChartDataset(type, binEdges, label, color, data) {
1773
1858
  xAxisID: "x"
1774
1859
  };
1775
1860
  }
1776
- function getHistogramChartData(data) {
1861
+ function getHistogramChartData(data, isDark = false) {
1777
1862
  const { datasets, type, binEdges } = data;
1778
1863
  const [base, current] = datasets;
1864
+ const barColors = getBarColors(isDark);
1779
1865
  const currentDataset = getHistogramChartDataset(
1780
1866
  type,
1781
1867
  binEdges,
1782
1868
  "Current",
1783
- CURRENT_BAR_COLOR_WITH_ALPHA,
1869
+ barColors.currentWithAlpha,
1784
1870
  current
1785
1871
  );
1786
1872
  const baseDataset = getHistogramChartDataset(
1787
1873
  type,
1788
1874
  binEdges,
1789
1875
  "Base",
1790
- BASE_BAR_COLOR_WITH_ALPHA,
1876
+ barColors.baseWithAlpha,
1791
1877
  base
1792
1878
  );
1793
- const newLabels = binEdges.map((v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
1879
+ const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
1794
1880
  return {
1795
1881
  labels: newLabels,
1796
1882
  datasets: [currentDataset, baseDataset]
1797
1883
  };
1798
1884
  }
1799
- function getHistogramChartOptions(data, hideAxis = false, { ...configOverrides } = {}) {
1885
+ function getHistogramChartOptions(data, hideAxis = false, isDark = false, { ...configOverrides } = {}) {
1800
1886
  const { title, datasets, type, samples = 0, binEdges } = data;
1801
1887
  const [base, current] = datasets;
1802
1888
  const isDatetime = type === "datetime";
1889
+ const themeColors = getChartThemeColors(isDark);
1890
+ const themedPlugins = getThemedPluginOptions(isDark);
1803
1891
  return {
1804
1892
  responsive: true,
1805
1893
  maintainAspectRatio: false,
1806
1894
  plugins: {
1807
1895
  legend: {
1808
- reverse: true
1896
+ reverse: true,
1897
+ labels: {
1898
+ color: themeColors.textColor
1899
+ }
1809
1900
  },
1810
1901
  title: {
1811
1902
  display: true,
1812
1903
  text: title,
1813
1904
  font: {
1814
1905
  size: 20
1815
- }
1906
+ },
1907
+ color: themeColors.textColor
1816
1908
  },
1817
1909
  tooltip: {
1818
1910
  mode: "index",
1819
1911
  // position: 'nearest',
1820
1912
  intersect: false,
1913
+ backgroundColor: themedPlugins.tooltip.backgroundColor,
1914
+ titleColor: themedPlugins.tooltip.titleColor,
1915
+ bodyColor: themedPlugins.tooltip.bodyColor,
1916
+ borderColor: themedPlugins.tooltip.borderColor,
1917
+ borderWidth: themedPlugins.tooltip.borderWidth,
1821
1918
  callbacks: {
1822
- title([{ dataIndex, datasetIndex }]) {
1919
+ title([{ dataIndex }]) {
1823
1920
  const result = formatDisplayedBinItem(binEdges, dataIndex);
1824
1921
  const prefix = isDatetime ? DATE_RANGE : type === "string" ? TEXTLENGTH : VALUE_RANGE;
1825
1922
  return `${prefix}
@@ -1836,15 +1933,16 @@ ${result}`;
1836
1933
  }
1837
1934
  }
1838
1935
  },
1839
- scales: getScales(data, hideAxis),
1936
+ scales: getScales(data, hideAxis, isDark),
1840
1937
  ...configOverrides
1841
1938
  };
1842
1939
  }
1843
- function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false) {
1940
+ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false, isDark = false) {
1844
1941
  const isDatetime = type === "datetime";
1845
1942
  const [base, current] = datasets;
1846
1943
  const maxCount = Math.max(...current.counts, ...base.counts);
1847
- const newLabels = binEdges.map((v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
1944
+ const themeColors = getChartThemeColors(isDark);
1945
+ const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
1848
1946
  const xScaleDate = {
1849
1947
  display: !hideAxis,
1850
1948
  type: "timeseries",
@@ -1861,7 +1959,8 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
1861
1959
  ticks: {
1862
1960
  minRotation: 30,
1863
1961
  maxRotation: 30,
1864
- maxTicksLimit: 8
1962
+ maxTicksLimit: 8,
1963
+ color: themeColors.textColor
1865
1964
  }
1866
1965
  };
1867
1966
  const xScaleCategory = {
@@ -1870,9 +1969,10 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
1870
1969
  //Linear doesn't understand bins!
1871
1970
  grid: { display: false },
1872
1971
  ticks: {
1873
- callback(val, index) {
1972
+ callback(_val, index) {
1874
1973
  return newLabels[index];
1875
- }
1974
+ },
1975
+ color: themeColors.textColor
1876
1976
  },
1877
1977
  stacked: true
1878
1978
  };
@@ -1882,12 +1982,13 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
1882
1982
  type: "linear",
1883
1983
  max: maxCount,
1884
1984
  //NOTE: do not add `min` since if they are equal nothing gets displayed sometimes
1885
- border: { dash: [2, 2] },
1985
+ border: { dash: [2, 2], color: themeColors.borderColor },
1886
1986
  grid: {
1887
- color: "lightgray"
1987
+ color: themeColors.gridColor
1888
1988
  },
1889
1989
  ticks: {
1890
1990
  maxTicksLimit: 8,
1991
+ color: themeColors.textColor,
1891
1992
  callback: function(val) {
1892
1993
  return formatAsAbbreviatedNumber(val);
1893
1994
  }
@@ -1903,7 +2004,7 @@ function formatDisplayedBinItem(binEdges, currentIndex) {
1903
2004
  const formattedEnd = formatAsAbbreviatedNumber(endEdge);
1904
2005
  return `${formattedStart} - ${formattedEnd}`;
1905
2006
  }
1906
- var ScreenshotBox = React11.forwardRef(
2007
+ var ScreenshotBox = React12.forwardRef(
1907
2008
  ({
1908
2009
  backgroundColor = "white",
1909
2010
  blockSize,
@@ -1932,6 +2033,8 @@ var ScreenshotBox = React11.forwardRef(
1932
2033
  }
1933
2034
  );
1934
2035
  function _HistogramDiffResultView({ run }, ref) {
2036
+ const theme = styles.useTheme();
2037
+ const isDark = theme.palette.mode === "dark";
1935
2038
  if (!isHistogramDiffRun(run)) {
1936
2039
  throw new Error("Run type must be histogram_diff");
1937
2040
  }
@@ -1944,37 +2047,45 @@ function _HistogramDiffResultView({ run }, ref) {
1944
2047
  if (!base || !current) {
1945
2048
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Loading..." });
1946
2049
  }
1947
- return /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(ScreenshotBox, { ref, height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", flexDirection: "row" }, children: [
1948
- /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } }),
1949
- /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { width: "80%", height: "35vh", m: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1950
- HistogramChart,
1951
- {
1952
- data: {
1953
- title: `Model ${params.model}.${params.column_name}`,
1954
- type: run.params?.column_type ?? "",
1955
- datasets: [base, current],
1956
- min,
1957
- max,
1958
- samples: base.total,
1959
- binEdges
1960
- }
1961
- }
1962
- ) }),
1963
- /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } })
1964
- ] }) }) });
2050
+ return /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2051
+ ScreenshotBox,
2052
+ {
2053
+ ref,
2054
+ height: "100%",
2055
+ backgroundColor: isDark ? "#1f2937" : "white",
2056
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", flexDirection: "row" }, children: [
2057
+ /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } }),
2058
+ /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { width: "80%", height: "35vh", m: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(
2059
+ HistogramChart,
2060
+ {
2061
+ data: {
2062
+ title: `Model ${params.model}.${params.column_name}`,
2063
+ type: run.params?.column_type ?? "",
2064
+ datasets: [base, current],
2065
+ min,
2066
+ max,
2067
+ samples: base.total,
2068
+ binEdges
2069
+ }
2070
+ }
2071
+ ) }),
2072
+ /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } })
2073
+ ] })
2074
+ }
2075
+ ) });
1965
2076
  }
1966
- var HistogramDiffResultView = React11.forwardRef(_HistogramDiffResultView);
2077
+ var HistogramDiffResultView = React12.forwardRef(_HistogramDiffResultView);
1967
2078
  function ProfileDiffForm({
1968
2079
  params,
1969
2080
  onParamsChanged,
1970
2081
  setIsReadyToExecute
1971
2082
  }) {
1972
- const [allColumns, setAllColumns] = React11.useState(
2083
+ const [allColumns, setAllColumns] = React12.useState(
1973
2084
  !params.columns || params.columns.length === 0
1974
2085
  );
1975
2086
  const model = params.model;
1976
2087
  const { columns, isLoading, error } = useModelColumns_default(params.model);
1977
- React11.useEffect(() => {
2088
+ React12.useEffect(() => {
1978
2089
  setIsReadyToExecute(!!model);
1979
2090
  }, [model, setIsReadyToExecute]);
1980
2091
  const columnNames = columns.map((c) => c.name);
@@ -2244,7 +2355,7 @@ function DataFrameColumnGroupHeader({
2244
2355
  onPinnedColumnsChange,
2245
2356
  onColumnsRenderModeChanged
2246
2357
  }) {
2247
- const [anchorEl, setAnchorEl] = React11.useState(null);
2358
+ const [anchorEl, setAnchorEl] = React12.useState(null);
2248
2359
  const menuOpen = Boolean(anchorEl);
2249
2360
  const handleMenuClick = (event) => {
2250
2361
  setAnchorEl(event.currentTarget);
@@ -2367,7 +2478,7 @@ function DataFrameColumnHeader({
2367
2478
  columnType,
2368
2479
  onColumnsRenderModeChanged
2369
2480
  }) {
2370
- const [anchorEl, setAnchorEl] = React11.useState(null);
2481
+ const [anchorEl, setAnchorEl] = React12.useState(null);
2371
2482
  const menuOpen = Boolean(anchorEl);
2372
2483
  const handleMenuClick = (event) => {
2373
2484
  setAnchorEl(event.currentTarget);
@@ -2686,8 +2797,8 @@ function getHeaderCellClass(columnStatus) {
2686
2797
  }
2687
2798
  var defaultRenderCell = (params) => {
2688
2799
  const colDef = params.colDef;
2689
- const columnType = colDef?.columnType;
2690
- const columnRenderMode = colDef?.columnRenderMode;
2800
+ const columnType = colDef?.context?.columnType;
2801
+ const columnRenderMode = colDef?.context?.columnRenderMode;
2691
2802
  const fieldName = colDef?.field ?? "";
2692
2803
  if (!params.data) {
2693
2804
  return null;
@@ -2917,35 +3028,8 @@ var buttonColorVariants = [
2917
3028
  ...createButtonColorVariants("red", colors.red),
2918
3029
  ...createButtonColorVariants("rose", colors.rose),
2919
3030
  ...createButtonColorVariants("fuchsia", colors.fuchsia),
2920
- ...createButtonColorVariants("brand", colors.brand),
2921
- // Neutral uses darker shades for better visibility
2922
- {
2923
- props: { color: "neutral", variant: "contained" },
2924
- style: {
2925
- backgroundColor: colors.neutral[700],
2926
- color: "#FFFFFF",
2927
- "&:hover": { backgroundColor: colors.neutral[800] }
2928
- }
2929
- },
2930
- {
2931
- props: { color: "neutral", variant: "outlined" },
2932
- style: {
2933
- borderColor: colors.neutral[300],
2934
- // Lighter border (neutral.light)
2935
- color: colors.neutral[900],
2936
- "&:hover": {
2937
- borderColor: colors.neutral[400],
2938
- backgroundColor: colors.neutral[100]
2939
- }
2940
- }
2941
- },
2942
- {
2943
- props: { color: "neutral", variant: "text" },
2944
- style: {
2945
- color: colors.neutral[700],
2946
- "&:hover": { backgroundColor: colors.neutral[100] }
2947
- }
2948
- }
3031
+ ...createButtonColorVariants("brand", colors.brand)
3032
+ // Neutral variants are handled via styleOverrides for theme-awareness
2949
3033
  ];
2950
3034
  var progressColorVariants = [
2951
3035
  createProgressColorVariant("iochmara", colors.iochmara),
@@ -3005,11 +3089,31 @@ var componentOverrides = {
3005
3089
  ...buttonColorVariants
3006
3090
  ],
3007
3091
  styleOverrides: {
3008
- root: {
3092
+ root: ({ theme, ownerState }) => ({
3009
3093
  textTransform: "none",
3010
3094
  fontWeight: 500,
3011
- borderRadius: 6
3012
- },
3095
+ borderRadius: 6,
3096
+ // Theme-aware neutral button colors
3097
+ ...ownerState.color === "neutral" && ownerState.variant === "contained" && {
3098
+ backgroundColor: colors.neutral[700],
3099
+ color: "#FFFFFF",
3100
+ "&:hover": { backgroundColor: colors.neutral[800] }
3101
+ },
3102
+ ...ownerState.color === "neutral" && ownerState.variant === "outlined" && {
3103
+ borderColor: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[300],
3104
+ color: theme.palette.mode === "dark" ? colors.neutral[100] : colors.neutral[900],
3105
+ "&:hover": {
3106
+ borderColor: theme.palette.mode === "dark" ? colors.neutral[400] : colors.neutral[400],
3107
+ backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
3108
+ }
3109
+ },
3110
+ ...ownerState.color === "neutral" && ownerState.variant === "text" && {
3111
+ color: theme.palette.mode === "dark" ? colors.neutral[200] : colors.neutral[700],
3112
+ "&:hover": {
3113
+ backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
3114
+ }
3115
+ }
3116
+ }),
3013
3117
  sizeSmall: {
3014
3118
  padding: "0.25rem 0.75rem",
3015
3119
  fontSize: "0.875rem"
@@ -3036,11 +3140,11 @@ var componentOverrides = {
3036
3140
  }
3037
3141
  },
3038
3142
  // Text variant (ghost in Chakra)
3039
- text: {
3143
+ text: ({ theme }) => ({
3040
3144
  "&:hover": {
3041
- backgroundColor: "rgba(0, 0, 0, 0.04)"
3145
+ backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)"
3042
3146
  }
3043
- }
3147
+ })
3044
3148
  }
3045
3149
  },
3046
3150
  // IconButton overrides
@@ -3087,9 +3191,9 @@ var componentOverrides = {
3087
3191
  borderWidth: 2
3088
3192
  }
3089
3193
  },
3090
- notchedOutline: {
3091
- borderColor: colors.neutral[300]
3092
- }
3194
+ notchedOutline: ({ theme }) => ({
3195
+ borderColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[300]
3196
+ })
3093
3197
  }
3094
3198
  },
3095
3199
  // Checkbox overrides
@@ -3136,19 +3240,19 @@ var componentOverrides = {
3136
3240
  },
3137
3241
  MuiMenuItem: {
3138
3242
  styleOverrides: {
3139
- root: {
3243
+ root: ({ theme }) => ({
3140
3244
  fontSize: "0.875rem",
3141
3245
  padding: "0.5rem 0.75rem",
3142
3246
  "&:hover": {
3143
- backgroundColor: colors.neutral[100]
3247
+ backgroundColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[100]
3144
3248
  },
3145
3249
  "&.Mui-selected": {
3146
- backgroundColor: colors.iochmara[50],
3250
+ backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
3147
3251
  "&:hover": {
3148
- backgroundColor: colors.iochmara[100]
3252
+ backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[800] : colors.iochmara[100]
3149
3253
  }
3150
3254
  }
3151
- }
3255
+ })
3152
3256
  }
3153
3257
  },
3154
3258
  // Chip overrides (Tag in Chakra)
@@ -3183,15 +3287,15 @@ var componentOverrides = {
3183
3287
  // Tooltip overrides
3184
3288
  MuiTooltip: {
3185
3289
  styleOverrides: {
3186
- tooltip: {
3187
- backgroundColor: colors.neutral[800],
3290
+ tooltip: ({ theme }) => ({
3291
+ backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800],
3188
3292
  fontSize: "0.75rem",
3189
3293
  padding: "0.25rem 0.5rem",
3190
3294
  borderRadius: 4
3191
- },
3192
- arrow: {
3193
- color: colors.neutral[800]
3194
- }
3295
+ }),
3296
+ arrow: ({ theme }) => ({
3297
+ color: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800]
3298
+ })
3195
3299
  }
3196
3300
  },
3197
3301
  // Alert overrides
@@ -3200,22 +3304,22 @@ var componentOverrides = {
3200
3304
  root: {
3201
3305
  borderRadius: 6
3202
3306
  },
3203
- standardSuccess: {
3204
- backgroundColor: colors.green[50],
3205
- color: colors.green[800]
3206
- },
3207
- standardWarning: {
3208
- backgroundColor: colors.amber[50],
3209
- color: colors.amber[800]
3210
- },
3211
- standardError: {
3212
- backgroundColor: colors.red[50],
3213
- color: colors.red[800]
3214
- },
3215
- standardInfo: {
3216
- backgroundColor: colors.iochmara[50],
3217
- color: colors.iochmara[800]
3218
- }
3307
+ standardSuccess: ({ theme }) => ({
3308
+ backgroundColor: theme.palette.mode === "dark" ? colors.green[900] : colors.green[50],
3309
+ color: theme.palette.mode === "dark" ? colors.green[200] : colors.green[800]
3310
+ }),
3311
+ standardWarning: ({ theme }) => ({
3312
+ backgroundColor: theme.palette.mode === "dark" ? colors.amber[900] : colors.amber[50],
3313
+ color: theme.palette.mode === "dark" ? colors.amber[200] : colors.amber[800]
3314
+ }),
3315
+ standardError: ({ theme }) => ({
3316
+ backgroundColor: theme.palette.mode === "dark" ? colors.red[900] : colors.red[50],
3317
+ color: theme.palette.mode === "dark" ? colors.red[200] : colors.red[800]
3318
+ }),
3319
+ standardInfo: ({ theme }) => ({
3320
+ backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
3321
+ color: theme.palette.mode === "dark" ? colors.iochmara[200] : colors.iochmara[800]
3322
+ })
3219
3323
  }
3220
3324
  },
3221
3325
  // Tabs overrides
@@ -3296,17 +3400,17 @@ var componentOverrides = {
3296
3400
  // Divider overrides
3297
3401
  MuiDivider: {
3298
3402
  styleOverrides: {
3299
- root: {
3300
- borderColor: colors.neutral[200]
3301
- }
3403
+ root: ({ theme }) => ({
3404
+ borderColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[200]
3405
+ })
3302
3406
  }
3303
3407
  },
3304
3408
  // Breadcrumbs overrides
3305
3409
  MuiBreadcrumbs: {
3306
3410
  styleOverrides: {
3307
- separator: {
3308
- color: colors.neutral[400]
3309
- }
3411
+ separator: ({ theme }) => ({
3412
+ color: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[400]
3413
+ })
3310
3414
  }
3311
3415
  }
3312
3416
  };
@@ -3488,7 +3592,7 @@ var DiffText = ({
3488
3592
  noCopy,
3489
3593
  fontSize
3490
3594
  }) => {
3491
- const [isHovered, setIsHovered] = React11.useState(false);
3595
+ const [isHovered, setIsHovered] = React12.useState(false);
3492
3596
  const textColor = colors[colorPalette][800];
3493
3597
  const bgColor = colors[colorPalette][100];
3494
3598
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3546,39 +3650,38 @@ function CopyControl({
3546
3650
  grayOut,
3547
3651
  isHovered
3548
3652
  }) {
3549
- const [copiedText, copyToClipboard] = usehooksTs.useCopyToClipboard();
3550
- const hasCopiedText = Boolean(copiedText);
3551
- if (noCopy || grayOut) {
3552
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
3553
- }
3554
- if (hasCopiedText) {
3555
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Copied" });
3556
- }
3557
- if (!isHovered) {
3653
+ const [, copyToClipboard] = usehooksTs.useCopyToClipboard();
3654
+ const { successToast } = useClipBoardToast();
3655
+ if (noCopy || grayOut || !isHovered) {
3558
3656
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
3559
3657
  }
3560
- return /* @__PURE__ */ jsxRuntime.jsx(
3658
+ const handleCopy = () => {
3659
+ copyToClipboard(value);
3660
+ successToast(`${value} copied`);
3661
+ };
3662
+ return /* @__PURE__ */ jsxRuntime.jsx(Tooltip2__default.default, { title: "Copy Value", children: /* @__PURE__ */ jsxRuntime.jsx(
3561
3663
  IconButton3__default.default,
3562
3664
  {
3563
3665
  "aria-label": "Copy",
3564
3666
  size: "small",
3565
- onClick: () => copyToClipboard(value),
3667
+ onClick: handleCopy,
3566
3668
  sx: {
3567
- minWidth: "10px",
3568
- height: "10px",
3669
+ minWidth: "0.625rem",
3670
+ height: "0.625rem",
3569
3671
  display: "flex",
3570
3672
  alignItems: "center",
3571
3673
  justifyContent: "center",
3572
- p: 0
3674
+ p: 0,
3675
+ color: "inherit"
3573
3676
  },
3574
- children: /* @__PURE__ */ jsxRuntime.jsx(pi.PiCopy, { size: "10px" })
3677
+ children: /* @__PURE__ */ jsxRuntime.jsx(pi.PiCopy, { size: "0.625rem" })
3575
3678
  }
3576
- );
3679
+ ) });
3577
3680
  }
3578
3681
  var inlineRenderCell = (params) => {
3579
3682
  const colDef = params.colDef;
3580
- const columnType = colDef?.columnType;
3581
- const columnRenderMode = colDef?.columnRenderMode;
3683
+ const columnType = colDef?.context?.columnType;
3684
+ const columnRenderMode = colDef?.context?.columnRenderMode;
3582
3685
  const columnKey = colDef?.field ?? "";
3583
3686
  if (!params.data) {
3584
3687
  return null;
@@ -3763,8 +3866,7 @@ function toDiffColumn(config) {
3763
3866
  headerClass: headerCellClass,
3764
3867
  headerComponent,
3765
3868
  cellRenderer: inlineRenderCell,
3766
- columnType,
3767
- columnRenderMode
3869
+ context: { columnType, columnRenderMode }
3768
3870
  };
3769
3871
  }
3770
3872
  const cellClassBase = createCellClassBase(name, columnStatus);
@@ -3773,8 +3875,7 @@ function toDiffColumn(config) {
3773
3875
  headerName: name,
3774
3876
  headerClass: headerCellClass,
3775
3877
  headerGroupComponent: headerComponent,
3776
- columnType,
3777
- columnRenderMode,
3878
+ context: { columnType, columnRenderMode },
3778
3879
  children: [
3779
3880
  {
3780
3881
  field: `base__${name}`,
@@ -3782,8 +3883,7 @@ function toDiffColumn(config) {
3782
3883
  headerClass: headerCellClass,
3783
3884
  cellClass: cellClassBase,
3784
3885
  cellRenderer: defaultRenderCell,
3785
- columnType,
3786
- columnRenderMode
3886
+ context: { columnType, columnRenderMode }
3787
3887
  },
3788
3888
  {
3789
3889
  field: `current__${name}`,
@@ -3791,8 +3891,7 @@ function toDiffColumn(config) {
3791
3891
  headerClass: headerCellClass,
3792
3892
  cellClass: cellClassCurrent,
3793
3893
  cellRenderer: defaultRenderCell,
3794
- columnType,
3795
- columnRenderMode
3894
+ context: { columnType, columnRenderMode }
3796
3895
  }
3797
3896
  ]
3798
3897
  };
@@ -3830,8 +3929,7 @@ function createPrimaryKeyColumn(config, headerProps) {
3830
3929
  return void 0;
3831
3930
  },
3832
3931
  cellRenderer: defaultRenderCell,
3833
- columnType,
3834
- columnRenderMode
3932
+ context: { columnType, columnRenderMode }
3835
3933
  };
3836
3934
  }
3837
3935
  function createDiffColumn(config, displayMode, headerProps, baseTitle, currentTitle) {
@@ -4020,8 +4118,7 @@ function createPrimaryKeyColumn2(config, headerProps) {
4020
4118
  ),
4021
4119
  pinned: "left",
4022
4120
  cellRenderer: defaultRenderCell,
4023
- columnType,
4024
- columnRenderMode
4121
+ context: { columnType, columnRenderMode }
4025
4122
  };
4026
4123
  }
4027
4124
  function createRegularColumn(config, headerProps) {
@@ -4040,8 +4137,7 @@ function createRegularColumn(config, headerProps) {
4040
4137
  }
4041
4138
  ),
4042
4139
  cellRenderer: defaultRenderCell,
4043
- columnType,
4044
- columnRenderMode
4140
+ context: { columnType, columnRenderMode }
4045
4141
  };
4046
4142
  }
4047
4143
  function buildSimpleColumnDefinitions(config) {
@@ -4550,7 +4646,7 @@ function renderIndexCell(params) {
4550
4646
  const value = isRemoved ? baseIndex !== void 0 ? baseIndex : "-" : currentIndex !== void 0 ? currentIndex : "-";
4551
4647
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: value });
4552
4648
  }
4553
- var MemoizedRenderIndexCell = React11__default.default.memo(renderIndexCell);
4649
+ var MemoizedRenderIndexCell = React12__default.default.memo(renderIndexCell);
4554
4650
  MemoizedRenderIndexCell.displayName = "MemoizedRenderIndexCell";
4555
4651
  function renderTypeCell(params) {
4556
4652
  if (!params.data) {
@@ -4583,7 +4679,7 @@ function renderTypeCell(params) {
4583
4679
  }
4584
4680
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: isRemoved ? baseType : currentType });
4585
4681
  }
4586
- var MemoizedRenderTypeCell = React11__default.default.memo(renderTypeCell);
4682
+ var MemoizedRenderTypeCell = React12__default.default.memo(renderTypeCell);
4587
4683
  MemoizedRenderTypeCell.displayName = "MemoizedRenderTypeCell";
4588
4684
  function PrimaryKeyIndicatorCell({
4589
4685
  columnName,
@@ -4609,7 +4705,7 @@ function ValueDiffColumnNameCell({
4609
4705
  }) {
4610
4706
  const { runAction } = useRecceActionContext();
4611
4707
  const { featureToggles } = useRecceInstanceContext();
4612
- const [anchorEl, setAnchorEl] = React11.useState(null);
4708
+ const [anchorEl, setAnchorEl] = React12.useState(null);
4613
4709
  const menuOpen = Boolean(anchorEl);
4614
4710
  const handleMenuClick = (event) => {
4615
4711
  setAnchorEl(event.currentTarget);
@@ -5005,7 +5101,7 @@ var recceGridThemeLight = agGridCommunity.themeQuartz.withParams({
5005
5101
  headerFontWeight: 700,
5006
5102
  cellHorizontalPadding: 8
5007
5103
  });
5008
- agGridCommunity.themeQuartz.withParams({
5104
+ var recceGridThemeDark = agGridCommunity.themeQuartz.withParams({
5009
5105
  backgroundColor: "#1e1e1e",
5010
5106
  headerBackgroundColor: "#252526",
5011
5107
  rowHoverColor: "#1e1e1e",
@@ -5051,9 +5147,9 @@ function _ScreenshotDataGrid({
5051
5147
  renderers,
5052
5148
  ...props
5053
5149
  }, ref) {
5054
- const containerRef = React11.useRef(null);
5055
- const gridApiRef = React11.useRef(null);
5056
- React11.useImperativeHandle(
5150
+ const containerRef = React12.useRef(null);
5151
+ const gridApiRef = React12.useRef(null);
5152
+ React12.useImperativeHandle(
5057
5153
  ref,
5058
5154
  () => ({
5059
5155
  api: gridApiRef.current,
@@ -5061,11 +5157,15 @@ function _ScreenshotDataGrid({
5061
5157
  }),
5062
5158
  []
5063
5159
  );
5064
- const theme = React11.useMemo(() => recceGridThemeLight, []);
5160
+ const muiTheme = styles.useTheme();
5161
+ const gridTheme = React12.useMemo(
5162
+ () => muiTheme.palette.mode === "dark" ? recceGridThemeDark : recceGridThemeLight,
5163
+ [muiTheme.palette.mode]
5164
+ );
5065
5165
  const resolvedColumnDefs = columnDefs ?? columns;
5066
5166
  const resolvedRowData = rowData ?? rows;
5067
5167
  const resolvedDefaultColDef = defaultColDef ?? defaultColumnOptions;
5068
- const mergedDefaultColDef = React11.useMemo(
5168
+ const mergedDefaultColDef = React12.useMemo(
5069
5169
  () => ({
5070
5170
  resizable: true,
5071
5171
  suppressMovable: true,
@@ -5073,11 +5173,11 @@ function _ScreenshotDataGrid({
5073
5173
  }),
5074
5174
  [resolvedDefaultColDef]
5075
5175
  );
5076
- const noRowsOverlayComponent = React11.useMemo(() => {
5176
+ const noRowsOverlayComponent = React12.useMemo(() => {
5077
5177
  if (!renderers?.noRowsFallback) return void 0;
5078
5178
  return () => renderers.noRowsFallback;
5079
5179
  }, [renderers?.noRowsFallback]);
5080
- const resolvedGetRowId = React11.useMemo(() => {
5180
+ const resolvedGetRowId = React12.useMemo(() => {
5081
5181
  if (getRowId) return getRowId;
5082
5182
  return (params) => {
5083
5183
  const data = params.data;
@@ -5088,7 +5188,7 @@ function _ScreenshotDataGrid({
5088
5188
  return String(index ?? Math.random());
5089
5189
  };
5090
5190
  }, [getRowId]);
5091
- const gridKey = React11.useMemo(() => {
5191
+ const gridKey = React12.useMemo(() => {
5092
5192
  if (!resolvedColumnDefs) return "grid";
5093
5193
  const pinnedFields = resolvedColumnDefs.filter(
5094
5194
  (col) => "field" in col && col.pinned === "left"
@@ -5123,18 +5223,18 @@ function _ScreenshotDataGrid({
5123
5223
  "& .ag-header-cell": {
5124
5224
  borderRight: "1px solid var(--ag-border-color)"
5125
5225
  },
5126
- // Diff cell styling
5226
+ // Diff cell styling - theme-aware colors
5127
5227
  "& .diff-cell-added": {
5128
- backgroundColor: "#cefece !important",
5129
- color: "black"
5228
+ backgroundColor: muiTheme.palette.mode === "dark" ? "#1a4d1a !important" : "#cefece !important",
5229
+ color: muiTheme.palette.text.primary
5130
5230
  },
5131
5231
  "& .diff-cell-removed": {
5132
- backgroundColor: "#ffc5c5 !important",
5133
- color: "black"
5232
+ backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
5233
+ color: muiTheme.palette.text.primary
5134
5234
  },
5135
5235
  "& .diff-cell-modified": {
5136
- backgroundColor: "#ffc5c5 !important",
5137
- color: "black"
5236
+ backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
5237
+ color: muiTheme.palette.text.primary
5138
5238
  },
5139
5239
  // Diff header styling
5140
5240
  "& .diff-header-added": {
@@ -5147,18 +5247,18 @@ function _ScreenshotDataGrid({
5147
5247
  },
5148
5248
  // Index column styling
5149
5249
  "& .index-column": {
5150
- color: "rgb(128, 128, 128)",
5250
+ color: muiTheme.palette.text.secondary,
5151
5251
  textAlign: "right"
5152
5252
  },
5153
5253
  // Frozen/pinned column styling
5154
5254
  "& .ag-pinned-left-cols-container .ag-cell": {
5155
- backgroundColor: "#f5f5f5"
5255
+ backgroundColor: muiTheme.palette.mode === "dark" ? "#2d2d2d" : "#f5f5f5"
5156
5256
  }
5157
5257
  },
5158
5258
  children: /* @__PURE__ */ jsxRuntime.jsx(
5159
5259
  agGridReact.AgGridReact,
5160
5260
  {
5161
- theme,
5261
+ theme: gridTheme,
5162
5262
  columnDefs: resolvedColumnDefs,
5163
5263
  rowData: resolvedRowData,
5164
5264
  getRowId: resolvedGetRowId,
@@ -5180,7 +5280,7 @@ function _ScreenshotDataGrid({
5180
5280
  }
5181
5281
  );
5182
5282
  }
5183
- var ScreenshotDataGrid = React11.forwardRef(_ScreenshotDataGrid);
5283
+ var ScreenshotDataGrid = React12.forwardRef(_ScreenshotDataGrid);
5184
5284
  var ToggleSwitch = ({
5185
5285
  value,
5186
5286
  onChange,
@@ -5260,17 +5360,22 @@ var RunToolbar = ({
5260
5360
  warnings,
5261
5361
  children
5262
5362
  }) => {
5363
+ const theme = styles.useTheme();
5364
+ const isDark = theme.palette.mode === "dark";
5365
+ const hasWarnings = warnings && warnings.length > 0;
5263
5366
  return /* @__PURE__ */ jsxRuntime.jsxs(
5264
5367
  Box21__default.default,
5265
5368
  {
5266
5369
  sx: {
5267
5370
  display: "flex",
5268
- borderBottom: "1px solid lightgray",
5371
+ borderBottom: "1px solid",
5372
+ borderColor: "divider",
5269
5373
  justifyContent: "flex-end",
5270
5374
  gap: "5px",
5271
5375
  alignItems: "center",
5272
5376
  px: "10px",
5273
- bgcolor: warnings && warnings.length > 0 ? "amber.100" : "inherit"
5377
+ bgcolor: hasWarnings ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
5378
+ color: hasWarnings ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
5274
5379
  },
5275
5380
  children: [
5276
5381
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5283,8 +5388,13 @@ var RunToolbar = ({
5283
5388
  gap: 0
5284
5389
  },
5285
5390
  children: warnings?.map((warning) => /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { children: [
5286
- /* @__PURE__ */ jsxRuntime.jsx(pi.PiWarning, { color: "amber.600" }),
5287
- " ",
5391
+ /* @__PURE__ */ jsxRuntime.jsx(
5392
+ pi.PiWarning,
5393
+ {
5394
+ color: isDark ? colors.amber[400] : colors.amber[600],
5395
+ style: { verticalAlign: "middle", marginRight: 4 }
5396
+ }
5397
+ ),
5288
5398
  warning
5289
5399
  ] }, _3__default.default.uniqueId(`-${warning}`)))
5290
5400
  }
@@ -5296,18 +5406,20 @@ var RunToolbar = ({
5296
5406
  );
5297
5407
  };
5298
5408
  var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
5409
+ const theme = styles.useTheme();
5410
+ const isDark = theme.palette.mode === "dark";
5299
5411
  if (!isProfileDiffRun(run)) {
5300
5412
  throw new Error("Only run type profile_diff is supported");
5301
5413
  }
5302
- const pinnedColumns = React11.useMemo(
5414
+ const pinnedColumns = React12.useMemo(
5303
5415
  () => viewOptions?.pinned_columns ?? [],
5304
5416
  [viewOptions]
5305
5417
  );
5306
- const displayMode = React11.useMemo(
5418
+ const displayMode = React12.useMemo(
5307
5419
  () => viewOptions?.display_mode ?? "inline",
5308
5420
  [viewOptions]
5309
5421
  );
5310
- const columnsRenderMode = React11.useMemo(
5422
+ const columnsRenderMode = React12.useMemo(
5311
5423
  () => ({
5312
5424
  distinct_proportion: "percent",
5313
5425
  not_null_proportion: "percent",
@@ -5315,7 +5427,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
5315
5427
  }),
5316
5428
  [viewOptions]
5317
5429
  );
5318
- const gridData = React11.useMemo(() => {
5430
+ const gridData = React12.useMemo(() => {
5319
5431
  const onColumnsRenderModeChanged = (cols) => {
5320
5432
  const newRenderModes = {
5321
5433
  ...viewOptions?.columnsRenderMode ?? {},
@@ -5371,7 +5483,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
5371
5483
  sx: {
5372
5484
  display: "flex",
5373
5485
  flexDirection: "column",
5374
- bgcolor: "rgb(249, 249, 249)",
5486
+ bgcolor: isDark ? "grey.900" : "grey.50",
5375
5487
  height: "100%"
5376
5488
  },
5377
5489
  children: [
@@ -5405,14 +5517,16 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
5405
5517
  );
5406
5518
  };
5407
5519
  var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
5520
+ const theme = styles.useTheme();
5521
+ const isDark = theme.palette.mode === "dark";
5408
5522
  if (!isProfileRun(run)) {
5409
5523
  throw new Error("Only run type profile_diff is supported");
5410
5524
  }
5411
- const pinnedColumns = React11.useMemo(
5525
+ const pinnedColumns = React12.useMemo(
5412
5526
  () => viewOptions?.pinned_columns ?? [],
5413
5527
  [viewOptions]
5414
5528
  );
5415
- const columnsRenderMode = React11.useMemo(
5529
+ const columnsRenderMode = React12.useMemo(
5416
5530
  () => ({
5417
5531
  distinct_proportion: "percent",
5418
5532
  not_null_proportion: "percent",
@@ -5420,7 +5534,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
5420
5534
  }),
5421
5535
  [viewOptions]
5422
5536
  );
5423
- const gridData = React11.useMemo(() => {
5537
+ const gridData = React12.useMemo(() => {
5424
5538
  const onColumnsRenderModeChanged = (cols) => {
5425
5539
  const newRenderModes = {
5426
5540
  ...viewOptions?.columnsRenderMode ?? {},
@@ -5474,7 +5588,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
5474
5588
  sx: {
5475
5589
  display: "flex",
5476
5590
  flexDirection: "column",
5477
- bgcolor: "rgb(249, 249, 249)",
5591
+ bgcolor: isDark ? "grey.900" : "grey.50",
5478
5592
  height: "100%"
5479
5593
  },
5480
5594
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -5491,8 +5605,8 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
5491
5605
  }
5492
5606
  );
5493
5607
  };
5494
- var ProfileDiffResultView = React11.forwardRef(PrivateProfileDiffResultView);
5495
- var ProfileResultView = React11.forwardRef(PrivateProfileResultView);
5608
+ var ProfileDiffResultView = React12.forwardRef(PrivateProfileDiffResultView);
5609
+ var ProfileResultView = React12.forwardRef(PrivateProfileResultView);
5496
5610
  var ChangedOnlyCheckbox = ({
5497
5611
  changedOnly,
5498
5612
  onChange
@@ -5525,30 +5639,32 @@ var PrivateQueryDiffResultView = ({
5525
5639
  baseTitle,
5526
5640
  currentTitle
5527
5641
  }, ref) => {
5528
- const primaryKeys = React11.useMemo(
5642
+ const theme = styles.useTheme();
5643
+ const isDark = theme.palette.mode === "dark";
5644
+ const primaryKeys = React12.useMemo(
5529
5645
  () => viewOptions?.primary_keys ?? [],
5530
5646
  [viewOptions]
5531
5647
  );
5532
- const changedOnly = React11.useMemo(
5648
+ const changedOnly = React12.useMemo(
5533
5649
  () => viewOptions?.changed_only ?? false,
5534
5650
  [viewOptions]
5535
5651
  );
5536
- const pinnedColumns = React11.useMemo(
5652
+ const pinnedColumns = React12.useMemo(
5537
5653
  () => viewOptions?.pinned_columns ?? [],
5538
5654
  [viewOptions]
5539
5655
  );
5540
- const displayMode = React11.useMemo(
5656
+ const displayMode = React12.useMemo(
5541
5657
  () => viewOptions?.display_mode ?? "inline",
5542
5658
  [viewOptions]
5543
5659
  );
5544
- const columnsRenderMode = React11.useMemo(
5660
+ const columnsRenderMode = React12.useMemo(
5545
5661
  () => viewOptions?.columnsRenderMode ?? {},
5546
5662
  [viewOptions]
5547
5663
  );
5548
5664
  if (run.type !== "query_diff") {
5549
5665
  throw new Error("QueryDiffResult view should be rendered as query_diff");
5550
5666
  }
5551
- const gridData = React11.useMemo(() => {
5667
+ const gridData = React12.useMemo(() => {
5552
5668
  const onColumnsRenderModeChanged = (cols) => {
5553
5669
  const newRenderModes = {
5554
5670
  ...viewOptions?.columnsRenderMode ?? {},
@@ -5600,7 +5716,7 @@ var PrivateQueryDiffResultView = ({
5600
5716
  currentTitle,
5601
5717
  columnsRenderMode
5602
5718
  ]);
5603
- const warningPKey = React11.useMemo(() => {
5719
+ const warningPKey = React12.useMemo(() => {
5604
5720
  const pkName = primaryKeys.join(", ");
5605
5721
  if (gridData.invalidPKeyBase && gridData.invalidPKeyCurrent) {
5606
5722
  return `Warning: The primary key '${pkName}' is not unique in the base and current environments`;
@@ -5639,7 +5755,7 @@ var PrivateQueryDiffResultView = ({
5639
5755
  sx: {
5640
5756
  display: "flex",
5641
5757
  flexDirection: "column",
5642
- bgcolor: "rgb(249, 249, 249)",
5758
+ bgcolor: isDark ? "grey.900" : "grey.50",
5643
5759
  height: "100%"
5644
5760
  },
5645
5761
  children: [
@@ -5712,26 +5828,28 @@ var PrivateQueryDiffJoinResultView = ({
5712
5828
  baseTitle,
5713
5829
  currentTitle
5714
5830
  }, ref) => {
5831
+ const theme = styles.useTheme();
5832
+ const isDark = theme.palette.mode === "dark";
5715
5833
  if (run.type !== "query_diff") {
5716
5834
  throw new Error("QueryDiffResult view should be rendered as query_diff");
5717
5835
  }
5718
- const changedOnly = React11.useMemo(
5836
+ const changedOnly = React12.useMemo(
5719
5837
  () => viewOptions?.changed_only ?? false,
5720
5838
  [viewOptions]
5721
5839
  );
5722
- const pinnedColumns = React11.useMemo(
5840
+ const pinnedColumns = React12.useMemo(
5723
5841
  () => viewOptions?.pinned_columns ?? [],
5724
5842
  [viewOptions]
5725
5843
  );
5726
- const displayMode = React11.useMemo(
5844
+ const displayMode = React12.useMemo(
5727
5845
  () => viewOptions?.display_mode ?? "inline",
5728
5846
  [viewOptions]
5729
5847
  );
5730
- const columnsRenderMode = React11.useMemo(
5848
+ const columnsRenderMode = React12.useMemo(
5731
5849
  () => viewOptions?.columnsRenderMode ?? {},
5732
5850
  [viewOptions]
5733
5851
  );
5734
- const gridData = React11.useMemo(() => {
5852
+ const gridData = React12.useMemo(() => {
5735
5853
  const onColumnsRenderModeChanged = (cols) => {
5736
5854
  const newRenderModes = {
5737
5855
  ...viewOptions?.columnsRenderMode ?? {},
@@ -5800,7 +5918,7 @@ var PrivateQueryDiffJoinResultView = ({
5800
5918
  sx: {
5801
5919
  display: "flex",
5802
5920
  flexDirection: "column",
5803
- bgcolor: "rgb(249, 249, 249)",
5921
+ bgcolor: isDark ? "grey.900" : "grey.50",
5804
5922
  height: "100%"
5805
5923
  },
5806
5924
  children: [
@@ -5835,7 +5953,7 @@ var PrivateQueryDiffJoinResultView = ({
5835
5953
  sx: {
5836
5954
  display: "flex",
5837
5955
  flexDirection: "column",
5838
- bgcolor: "rgb(249, 249, 249)",
5956
+ bgcolor: isDark ? "grey.900" : "grey.50",
5839
5957
  height: "100%"
5840
5958
  },
5841
5959
  children: [
@@ -5901,11 +6019,11 @@ var PrivateQueryDiffJoinResultView = ({
5901
6019
  }
5902
6020
  );
5903
6021
  };
5904
- var QueryDiffResultViewWithRef = React11.forwardRef(PrivateQueryDiffResultView);
5905
- var QueryDiffJoinResultViewWithRef = React11.forwardRef(
6022
+ var QueryDiffResultViewWithRef = React12.forwardRef(PrivateQueryDiffResultView);
6023
+ var QueryDiffJoinResultViewWithRef = React12.forwardRef(
5906
6024
  PrivateQueryDiffJoinResultView
5907
6025
  );
5908
- var QueryDiffResultView = React11.forwardRef(
6026
+ var QueryDiffResultView = React12.forwardRef(
5909
6027
  (props, ref) => {
5910
6028
  let baseTitle;
5911
6029
  let currentTitle;
@@ -5942,19 +6060,21 @@ var PrivateQueryResultView = ({
5942
6060
  onViewOptionsChanged,
5943
6061
  onAddToChecklist
5944
6062
  }, ref) => {
6063
+ const theme = styles.useTheme();
6064
+ const isDark = theme.palette.mode === "dark";
5945
6065
  if (!(isQueryRun(run) || isQueryBaseRun(run))) {
5946
6066
  throw new Error("run type must be query");
5947
6067
  }
5948
- const pinnedColumns = React11.useMemo(
6068
+ const pinnedColumns = React12.useMemo(
5949
6069
  () => viewOptions?.pinned_columns ?? [],
5950
6070
  [viewOptions]
5951
6071
  );
5952
- const columnsRenderMode = React11.useMemo(
6072
+ const columnsRenderMode = React12.useMemo(
5953
6073
  () => viewOptions?.columnsRenderMode ?? {},
5954
6074
  [viewOptions]
5955
6075
  );
5956
6076
  const dataframe = run.result;
5957
- const gridData = React11.useMemo(() => {
6077
+ const gridData = React12.useMemo(() => {
5958
6078
  const onColumnsRenderModeChanged = (cols) => {
5959
6079
  const newRenderModes = {
5960
6080
  ...viewOptions?.columnsRenderMode ?? {},
@@ -6005,25 +6125,27 @@ var PrivateQueryResultView = ({
6005
6125
  const limit = dataframe ? dataframe.limit ?? 0 : 0;
6006
6126
  const warning = limit > 0 && dataframe?.more ? `Warning: Displayed results are limited to ${limit.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.` : null;
6007
6127
  const showTopBar = onAddToChecklist ?? warning;
6008
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack5__default.default, { sx: { bgcolor: "rgb(249, 249, 249)", height: "100%" }, children: [
6128
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack5__default.default, { sx: { bgcolor: isDark ? "grey.900" : "grey.50", height: "100%" }, children: [
6009
6129
  showTopBar && /* @__PURE__ */ jsxRuntime.jsxs(
6010
6130
  Stack5__default.default,
6011
6131
  {
6012
6132
  direction: "row",
6013
6133
  sx: {
6014
- borderBottom: "1px solid lightgray",
6134
+ borderBottom: "1px solid",
6135
+ borderBottomColor: "divider",
6015
6136
  alignItems: "center",
6016
6137
  gap: "5px",
6017
6138
  px: "10px",
6018
- bgcolor: warning ? "amber.100" : "inherit"
6139
+ bgcolor: warning ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
6140
+ color: warning ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
6019
6141
  },
6020
6142
  children: [
6021
6143
  warning && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6022
6144
  /* @__PURE__ */ jsxRuntime.jsx(
6023
- Box21__default.default,
6145
+ pi.PiWarning,
6024
6146
  {
6025
- component: pi.PiWarning,
6026
- sx: { color: "amber.600", alignSelf: "center" }
6147
+ color: isDark ? colors.amber[400] : colors.amber[600],
6148
+ style: { alignSelf: "center" }
6027
6149
  }
6028
6150
  ),
6029
6151
  " ",
@@ -6059,17 +6181,19 @@ var PrivateQueryResultView = ({
6059
6181
  maxWidth: 800,
6060
6182
  minWidth: 35
6061
6183
  },
6062
- className: "rdg-light"
6184
+ className: isDark ? "rdg-dark" : "rdg-light"
6063
6185
  }
6064
6186
  )
6065
6187
  ] });
6066
6188
  };
6067
- var QueryResultView = React11.forwardRef(PrivateQueryResultView);
6189
+ var QueryResultView = React12.forwardRef(PrivateQueryResultView);
6068
6190
  function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
6191
+ const theme = styles.useTheme();
6192
+ const isDark = theme.palette.mode === "dark";
6069
6193
  if (!typeGuard(run)) {
6070
6194
  throw new Error(`Run type must be ${expectedType}`);
6071
6195
  }
6072
- const gridData = React11.useMemo(() => {
6196
+ const gridData = React12.useMemo(() => {
6073
6197
  return createDataGrid(run) ?? { columns: [], rows: [] };
6074
6198
  }, [run]);
6075
6199
  if (gridData.rows.length === 0) {
@@ -6080,7 +6204,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
6080
6204
  display: "flex",
6081
6205
  alignItems: "center",
6082
6206
  justifyContent: "center",
6083
- bgcolor: "rgb(249,249,249)",
6207
+ bgcolor: isDark ? "grey.900" : "grey.50",
6084
6208
  height: "100%"
6085
6209
  },
6086
6210
  children: "No nodes matched"
@@ -6105,7 +6229,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
6105
6229
  }
6106
6230
  ) });
6107
6231
  }
6108
- var RowCountGridView = React11.forwardRef(_RowCountGridView);
6232
+ var RowCountGridView = React12.forwardRef(_RowCountGridView);
6109
6233
  function _RowCountDiffResultView({ run }, ref) {
6110
6234
  return /* @__PURE__ */ jsxRuntime.jsx(
6111
6235
  RowCountGridView,
@@ -6128,8 +6252,8 @@ function _RowCountResultView({ run }, ref) {
6128
6252
  }
6129
6253
  );
6130
6254
  }
6131
- var RowCountDiffResultView = React11.forwardRef(_RowCountDiffResultView);
6132
- var RowCountResultView = React11.forwardRef(_RowCountResultView);
6255
+ var RowCountDiffResultView = React12.forwardRef(_RowCountDiffResultView);
6256
+ var RowCountResultView = React12.forwardRef(_RowCountResultView);
6133
6257
  function TopKDiffForm({
6134
6258
  params,
6135
6259
  onParamsChanged,
@@ -6137,7 +6261,7 @@ function TopKDiffForm({
6137
6261
  }) {
6138
6262
  const { columns, isLoading, error } = useModelColumns_default(params.model);
6139
6263
  const columnNames = columns.map((c) => c.name);
6140
- React11.useEffect(() => {
6264
+ React12.useEffect(() => {
6141
6265
  setIsReadyToExecute(!!params.column_name);
6142
6266
  }, [params, setIsReadyToExecute]);
6143
6267
  if (isLoading) {
@@ -6164,7 +6288,7 @@ function TopKDiffForm({
6164
6288
  )
6165
6289
  ] }) });
6166
6290
  }
6167
- var INFO_VAL_COLOR = "#63B3ED";
6291
+ var INFO_VAL_COLOR2 = "#63B3ED";
6168
6292
  function prepareSummaryList(topK, isDisplayTopTen) {
6169
6293
  const endAtIndex = isDisplayTopTen ? 10 : topK.counts.length;
6170
6294
  const counts = topK.counts.slice(0, endAtIndex);
@@ -6200,6 +6324,7 @@ function prepareSummaryList(topK, isDisplayTopTen) {
6200
6324
  function TopKChartTooltip({
6201
6325
  base,
6202
6326
  current,
6327
+ barColors,
6203
6328
  children
6204
6329
  }) {
6205
6330
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6207,7 +6332,7 @@ function TopKChartTooltip({
6207
6332
  {
6208
6333
  title: /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { children: [
6209
6334
  /* @__PURE__ */ jsxRuntime.jsxs(Typography9__default.default, { children: [
6210
- /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: CURRENT_BAR_COLOR }),
6335
+ /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.current }),
6211
6336
  "Current: ",
6212
6337
  current.count,
6213
6338
  " (",
@@ -6215,7 +6340,7 @@ function TopKChartTooltip({
6215
6340
  ")"
6216
6341
  ] }),
6217
6342
  /* @__PURE__ */ jsxRuntime.jsxs(Typography9__default.default, { children: [
6218
- /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: BASE_BAR_COLOR }),
6343
+ /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.base }),
6219
6344
  "Base: ",
6220
6345
  base.count,
6221
6346
  " (",
@@ -6232,6 +6357,9 @@ function TopKSummaryBarChart({
6232
6357
  topKDiff,
6233
6358
  isDisplayTopTen
6234
6359
  }) {
6360
+ const theme = styles.useTheme();
6361
+ const isDark = theme.palette.mode === "dark";
6362
+ const barColors = getBarColors(isDark);
6235
6363
  const currents = prepareSummaryList(topKDiff.current, isDisplayTopTen);
6236
6364
  const bases = prepareSummaryList(topKDiff.base, isDisplayTopTen);
6237
6365
  return /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { width: "100%", px: 20, py: 2 }, children: [
@@ -6241,9 +6369,9 @@ function TopKSummaryBarChart({
6241
6369
  Typography9__default.default,
6242
6370
  {
6243
6371
  component: "h3",
6244
- sx: { fontSize: "0.875rem", p: 1, color: "gray" },
6372
+ sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
6245
6373
  children: [
6246
- /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: BASE_BAR_COLOR }),
6374
+ /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.base }),
6247
6375
  " Base"
6248
6376
  ]
6249
6377
  }
@@ -6252,9 +6380,9 @@ function TopKSummaryBarChart({
6252
6380
  Typography9__default.default,
6253
6381
  {
6254
6382
  component: "h3",
6255
- sx: { fontSize: "0.875rem", p: 1, color: "gray" },
6383
+ sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
6256
6384
  children: [
6257
- /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: CURRENT_BAR_COLOR }),
6385
+ /* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.current }),
6258
6386
  " Current"
6259
6387
  ]
6260
6388
  }
@@ -6266,115 +6394,125 @@ function TopKSummaryBarChart({
6266
6394
  if (current.isLastItemOthers && current.count === 0 && base.count === 0) {
6267
6395
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
6268
6396
  }
6269
- return /* @__PURE__ */ jsxRuntime.jsxs(React11.Fragment, { children: [
6270
- /* @__PURE__ */ jsxRuntime.jsx(TopKChartTooltip, { base, current, children: /* @__PURE__ */ jsxRuntime.jsxs(
6271
- Box21__default.default,
6397
+ return /* @__PURE__ */ jsxRuntime.jsxs(React12.Fragment, { children: [
6398
+ /* @__PURE__ */ jsxRuntime.jsx(
6399
+ TopKChartTooltip,
6272
6400
  {
6273
- sx: {
6274
- display: "flex",
6275
- alignItems: "center",
6276
- width: "100%",
6277
- "&:hover": { bgcolor: "action.hover" },
6278
- px: 2
6279
- },
6280
- children: [
6281
- /* @__PURE__ */ jsxRuntime.jsx(
6282
- Typography9__default.default,
6283
- {
6284
- sx: {
6285
- width: "10em",
6286
- fontSize: "0.875rem",
6287
- color: current.isSpecialLabel ? "grey.400" : "inherit",
6288
- overflow: "hidden",
6289
- textOverflow: "ellipsis",
6290
- whiteSpace: "nowrap"
6291
- },
6292
- children: current.label
6293
- }
6294
- ),
6295
- /* @__PURE__ */ jsxRuntime.jsxs(
6296
- Box21__default.default,
6297
- {
6298
- sx: {
6299
- display: "flex",
6300
- width: "70%",
6301
- flexDirection: "column"
6302
- },
6303
- children: [
6304
- /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", height: "1em" }, children: [
6305
- /* @__PURE__ */ jsxRuntime.jsx(
6306
- CategoricalBarChart,
6307
- {
6308
- topkCount: current.count,
6309
- topkLabel: current.label,
6310
- valids: topKDiff.current.valids,
6311
- color: CURRENT_BAR_COLOR
6312
- }
6313
- ),
6314
- /* @__PURE__ */ jsxRuntime.jsx(
6315
- Typography9__default.default,
6316
- {
6317
- sx: {
6318
- ml: 2.5,
6319
- mr: 1,
6320
- fontSize: "0.875rem",
6321
- width: "6em"
6322
- },
6323
- children: current.displayCount
6324
- }
6325
- ),
6326
- /* @__PURE__ */ jsxRuntime.jsx(
6327
- Typography9__default.default,
6328
- {
6329
- sx: {
6330
- color: "grey.400",
6331
- fontSize: "0.875rem",
6332
- width: "4em"
6333
- },
6334
- children: current.displayRatio
6335
- }
6336
- )
6337
- ] }),
6338
- /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", height: "1em" }, children: [
6339
- /* @__PURE__ */ jsxRuntime.jsx(
6340
- CategoricalBarChart,
6341
- {
6342
- topkCount: base.count,
6343
- topkLabel: base.label,
6344
- valids: topKDiff.base.valids,
6345
- color: BASE_BAR_COLOR
6346
- }
6347
- ),
6348
- /* @__PURE__ */ jsxRuntime.jsx(
6349
- Typography9__default.default,
6350
- {
6351
- sx: {
6352
- ml: 2.5,
6353
- mr: 1,
6354
- fontSize: "0.875rem",
6355
- width: "6em"
6356
- },
6357
- children: base.displayCount
6358
- }
6359
- ),
6360
- /* @__PURE__ */ jsxRuntime.jsx(
6361
- Typography9__default.default,
6362
- {
6363
- sx: {
6364
- color: "grey.400",
6365
- fontSize: "0.875rem",
6366
- width: "4em"
6367
- },
6368
- children: base.displayRatio
6369
- }
6370
- )
6371
- ] })
6372
- ]
6373
- }
6374
- )
6375
- ]
6401
+ base,
6402
+ current,
6403
+ barColors,
6404
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
6405
+ Box21__default.default,
6406
+ {
6407
+ sx: {
6408
+ display: "flex",
6409
+ alignItems: "center",
6410
+ width: "100%",
6411
+ "&:hover": { bgcolor: "action.hover" },
6412
+ px: 2
6413
+ },
6414
+ children: [
6415
+ /* @__PURE__ */ jsxRuntime.jsx(
6416
+ Typography9__default.default,
6417
+ {
6418
+ sx: {
6419
+ width: "10em",
6420
+ fontSize: "0.875rem",
6421
+ color: current.isSpecialLabel ? "grey.400" : "inherit",
6422
+ overflow: "hidden",
6423
+ textOverflow: "ellipsis",
6424
+ whiteSpace: "nowrap"
6425
+ },
6426
+ children: current.label
6427
+ }
6428
+ ),
6429
+ /* @__PURE__ */ jsxRuntime.jsxs(
6430
+ Box21__default.default,
6431
+ {
6432
+ sx: {
6433
+ display: "flex",
6434
+ width: "70%",
6435
+ flexDirection: "column"
6436
+ },
6437
+ children: [
6438
+ /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", height: "1em" }, children: [
6439
+ /* @__PURE__ */ jsxRuntime.jsx(
6440
+ CategoricalBarChart,
6441
+ {
6442
+ topkCount: current.count,
6443
+ topkLabel: current.label,
6444
+ valids: topKDiff.current.valids,
6445
+ color: barColors.current,
6446
+ isDark
6447
+ }
6448
+ ),
6449
+ /* @__PURE__ */ jsxRuntime.jsx(
6450
+ Typography9__default.default,
6451
+ {
6452
+ sx: {
6453
+ ml: 2.5,
6454
+ mr: 1,
6455
+ fontSize: "0.875rem",
6456
+ width: "6em"
6457
+ },
6458
+ children: current.displayCount
6459
+ }
6460
+ ),
6461
+ /* @__PURE__ */ jsxRuntime.jsx(
6462
+ Typography9__default.default,
6463
+ {
6464
+ sx: {
6465
+ color: "grey.400",
6466
+ fontSize: "0.875rem",
6467
+ width: "4em"
6468
+ },
6469
+ children: current.displayRatio
6470
+ }
6471
+ )
6472
+ ] }),
6473
+ /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", height: "1em" }, children: [
6474
+ /* @__PURE__ */ jsxRuntime.jsx(
6475
+ CategoricalBarChart,
6476
+ {
6477
+ topkCount: base.count,
6478
+ topkLabel: base.label,
6479
+ valids: topKDiff.base.valids,
6480
+ color: barColors.base,
6481
+ isDark
6482
+ }
6483
+ ),
6484
+ /* @__PURE__ */ jsxRuntime.jsx(
6485
+ Typography9__default.default,
6486
+ {
6487
+ sx: {
6488
+ ml: 2.5,
6489
+ mr: 1,
6490
+ fontSize: "0.875rem",
6491
+ width: "6em"
6492
+ },
6493
+ children: base.displayCount
6494
+ }
6495
+ ),
6496
+ /* @__PURE__ */ jsxRuntime.jsx(
6497
+ Typography9__default.default,
6498
+ {
6499
+ sx: {
6500
+ color: "grey.400",
6501
+ fontSize: "0.875rem",
6502
+ width: "4em"
6503
+ },
6504
+ children: base.displayRatio
6505
+ }
6506
+ )
6507
+ ] })
6508
+ ]
6509
+ }
6510
+ )
6511
+ ]
6512
+ }
6513
+ )
6376
6514
  }
6377
- ) }),
6515
+ ),
6378
6516
  /* @__PURE__ */ jsxRuntime.jsx(Divider__default.default, {})
6379
6517
  ] }, current.label);
6380
6518
  })
@@ -6385,10 +6523,13 @@ function CategoricalBarChart({
6385
6523
  topkLabel,
6386
6524
  valids,
6387
6525
  animation = false,
6388
- color = INFO_VAL_COLOR
6526
+ color = INFO_VAL_COLOR2,
6527
+ isDark = false
6389
6528
  }) {
6390
6529
  chart_js.Chart.register(chart_js.CategoryScale, chart_js.BarElement, chart_js.LinearScale);
6391
- const chartOptions = getCatBarChartOptions(topkCount, valids, { animation });
6530
+ const chartOptions = getCatBarChartOptions(topkCount, valids, isDark, {
6531
+ animation
6532
+ });
6392
6533
  const chartData = getCatBarChartData({
6393
6534
  topkCount,
6394
6535
  topkLabel,
@@ -6396,7 +6537,8 @@ function CategoricalBarChart({
6396
6537
  });
6397
6538
  return /* @__PURE__ */ jsxRuntime.jsx(reactChartjs2.Bar, { data: chartData, options: chartOptions, plugins: [] });
6398
6539
  }
6399
- function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
6540
+ function getCatBarChartOptions(_count, valids, isDark = false, { ...configOverrides } = {}) {
6541
+ const themeColors = getChartThemeColors(isDark);
6400
6542
  return {
6401
6543
  responsive: true,
6402
6544
  maintainAspectRatio: false,
@@ -6405,10 +6547,12 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
6405
6547
  x: {
6406
6548
  display: false,
6407
6549
  max: valids,
6408
- grid: { display: false }
6550
+ grid: { display: false },
6551
+ ticks: { color: themeColors.textColor }
6409
6552
  },
6410
6553
  y: {
6411
- display: false
6554
+ display: false,
6555
+ ticks: { color: themeColors.textColor }
6412
6556
  }
6413
6557
  },
6414
6558
  plugins: {
@@ -6422,7 +6566,7 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
6422
6566
  function getCatBarChartData({
6423
6567
  topkLabel,
6424
6568
  topkCount,
6425
- color = INFO_VAL_COLOR
6569
+ color = INFO_VAL_COLOR2
6426
6570
  }) {
6427
6571
  return {
6428
6572
  labels: [topkLabel],
@@ -6443,39 +6587,53 @@ function getCatBarChartData({
6443
6587
  };
6444
6588
  }
6445
6589
  var PrivateTopKDiffResultView = ({ run }, ref) => {
6446
- const [isDisplayTopTen, setIsDisplayTopTen] = React11.useState(true);
6590
+ const theme = styles.useTheme();
6591
+ const isDark = theme.palette.mode === "dark";
6592
+ const [isDisplayTopTen, setIsDisplayTopTen] = React12.useState(true);
6447
6593
  const result = run.result;
6448
6594
  const params = run.params;
6449
6595
  const baseTopK = result.base;
6450
6596
  const currentTopK = result.current;
6451
6597
  return /* @__PURE__ */ jsxRuntime.jsxs(Box21__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
6452
- /* @__PURE__ */ jsxRuntime.jsxs(ScreenshotBox, { ref, blockSize: "auto", children: [
6453
- /* @__PURE__ */ jsxRuntime.jsxs(
6454
- Typography9__default.default,
6455
- {
6456
- variant: "h5",
6457
- sx: { pt: 4, textAlign: "center", color: "grey.600" },
6458
- children: [
6459
- "Model ",
6460
- params.model,
6461
- ".",
6462
- params.column_name
6463
- ]
6464
- }
6465
- ),
6466
- /* @__PURE__ */ jsxRuntime.jsxs(Stack5__default.default, { direction: "row", alignItems: "center", children: [
6467
- /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } }),
6468
- /* @__PURE__ */ jsxRuntime.jsx(
6469
- TopKSummaryBarChart,
6470
- {
6471
- topKDiff: result,
6472
- valids: currentTopK.valids || 0,
6473
- isDisplayTopTen
6474
- }
6475
- ),
6476
- /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } })
6477
- ] })
6478
- ] }),
6598
+ /* @__PURE__ */ jsxRuntime.jsxs(
6599
+ ScreenshotBox,
6600
+ {
6601
+ ref,
6602
+ blockSize: "auto",
6603
+ backgroundColor: isDark ? "#1f2937" : "white",
6604
+ children: [
6605
+ /* @__PURE__ */ jsxRuntime.jsxs(
6606
+ Typography9__default.default,
6607
+ {
6608
+ variant: "h5",
6609
+ sx: {
6610
+ pt: 4,
6611
+ textAlign: "center",
6612
+ color: isDark ? "grey.200" : "grey.600"
6613
+ },
6614
+ children: [
6615
+ "Model ",
6616
+ params.model,
6617
+ ".",
6618
+ params.column_name
6619
+ ]
6620
+ }
6621
+ ),
6622
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack5__default.default, { direction: "row", alignItems: "center", children: [
6623
+ /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } }),
6624
+ /* @__PURE__ */ jsxRuntime.jsx(
6625
+ TopKSummaryBarChart,
6626
+ {
6627
+ topKDiff: result,
6628
+ valids: currentTopK.valids || 0,
6629
+ isDisplayTopTen
6630
+ }
6631
+ ),
6632
+ /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } })
6633
+ ] })
6634
+ ]
6635
+ }
6636
+ ),
6479
6637
  /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { flex: 1 } }),
6480
6638
  (baseTopK.values.length > 10 || currentTopK.values.length > 10) && /* @__PURE__ */ jsxRuntime.jsx(Box21__default.default, { sx: { display: "flex", p: 5, justifyContent: "start" }, children: /* @__PURE__ */ jsxRuntime.jsx(
6481
6639
  Link__default.default,
@@ -6490,33 +6648,35 @@ var PrivateTopKDiffResultView = ({ run }, ref) => {
6490
6648
  ) })
6491
6649
  ] });
6492
6650
  };
6493
- var TopKDiffResultView = React11.forwardRef(PrivateTopKDiffResultView);
6651
+ var TopKDiffResultView = React12.forwardRef(PrivateTopKDiffResultView);
6494
6652
  var PrivateValueDiffDetailResultView = ({
6495
6653
  run,
6496
6654
  onAddToChecklist,
6497
6655
  viewOptions,
6498
6656
  onViewOptionsChanged
6499
6657
  }, ref) => {
6658
+ const theme = styles.useTheme();
6659
+ const isDark = theme.palette.mode === "dark";
6500
6660
  if (!isValueDiffDetailRun(run)) {
6501
6661
  throw new Error("run type must be value_diff_detail");
6502
6662
  }
6503
- const changedOnly = React11.useMemo(
6663
+ const changedOnly = React12.useMemo(
6504
6664
  () => viewOptions?.changed_only ?? false,
6505
6665
  [viewOptions]
6506
6666
  );
6507
- const pinnedColumns = React11.useMemo(
6667
+ const pinnedColumns = React12.useMemo(
6508
6668
  () => viewOptions?.pinned_columns ?? [],
6509
6669
  [viewOptions]
6510
6670
  );
6511
- const displayMode = React11.useMemo(
6671
+ const displayMode = React12.useMemo(
6512
6672
  () => viewOptions?.display_mode ?? "inline",
6513
6673
  [viewOptions]
6514
6674
  );
6515
- const columnsRenderMode = React11.useMemo(
6675
+ const columnsRenderMode = React12.useMemo(
6516
6676
  () => viewOptions?.columnsRenderMode ?? {},
6517
6677
  [viewOptions]
6518
6678
  );
6519
- const gridData = React11.useMemo(() => {
6679
+ const gridData = React12.useMemo(() => {
6520
6680
  const onColumnsRenderModeChanged = (cols) => {
6521
6681
  const newRenderModes = {
6522
6682
  ...viewOptions?.columnsRenderMode ?? {},
@@ -6581,7 +6741,7 @@ var PrivateValueDiffDetailResultView = ({
6581
6741
  sx: {
6582
6742
  display: "flex",
6583
6743
  flexDirection: "column",
6584
- bgcolor: "rgb(249, 249, 249)",
6744
+ bgcolor: isDark ? "grey.900" : "grey.50",
6585
6745
  height: "100%"
6586
6746
  },
6587
6747
  children: [
@@ -6616,7 +6776,7 @@ var PrivateValueDiffDetailResultView = ({
6616
6776
  sx: {
6617
6777
  display: "flex",
6618
6778
  flexDirection: "column",
6619
- bgcolor: "rgb(249, 249, 249)",
6779
+ bgcolor: isDark ? "grey.900" : "grey.50",
6620
6780
  height: "100%"
6621
6781
  },
6622
6782
  children: [
@@ -6678,7 +6838,7 @@ var PrivateValueDiffDetailResultView = ({
6678
6838
  }
6679
6839
  );
6680
6840
  };
6681
- var ValueDiffDetailResultView = React11.forwardRef(
6841
+ var ValueDiffDetailResultView = React12.forwardRef(
6682
6842
  PrivateValueDiffDetailResultView
6683
6843
  );
6684
6844
  function ValueDiffForm({
@@ -6686,18 +6846,72 @@ function ValueDiffForm({
6686
6846
  onParamsChanged,
6687
6847
  setIsReadyToExecute
6688
6848
  }) {
6689
- const [allColumns, setAllColumns] = React11.useState(
6849
+ const theme = styles.useTheme();
6850
+ const isDark = theme.palette.mode === "dark";
6851
+ const [allColumns, setAllColumns] = React12.useState(
6690
6852
  !params.columns || params.columns.length === 0
6691
6853
  );
6692
6854
  const model = params.model;
6693
6855
  const primaryKey = params.primary_key;
6856
+ const selectStyles = React12.useMemo(
6857
+ () => ({
6858
+ container: (base) => ({
6859
+ ...base,
6860
+ width: "100%"
6861
+ }),
6862
+ control: (base) => ({
6863
+ ...base,
6864
+ minHeight: "40px",
6865
+ backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor,
6866
+ borderColor: isDark ? colors.neutral[600] : base.borderColor
6867
+ }),
6868
+ menu: (base) => ({
6869
+ ...base,
6870
+ backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor
6871
+ }),
6872
+ option: (base, state) => ({
6873
+ ...base,
6874
+ backgroundColor: state.isSelected ? isDark ? colors.neutral[600] : colors.iochmara[500] : state.isFocused ? isDark ? colors.neutral[600] : colors.iochmara[50] : isDark ? colors.neutral[700] : base.backgroundColor,
6875
+ color: isDark ? colors.neutral[200] : base.color
6876
+ }),
6877
+ multiValue: (base) => ({
6878
+ ...base,
6879
+ backgroundColor: isDark ? colors.neutral[600] : base.backgroundColor
6880
+ }),
6881
+ multiValueLabel: (base) => ({
6882
+ ...base,
6883
+ color: isDark ? colors.neutral[200] : base.color
6884
+ }),
6885
+ multiValueRemove: (base) => ({
6886
+ ...base,
6887
+ color: isDark ? colors.neutral[400] : base.color,
6888
+ "&:hover": {
6889
+ backgroundColor: isDark ? colors.neutral[500] : colors.red[200],
6890
+ color: isDark ? colors.neutral[200] : colors.red[600]
6891
+ }
6892
+ }),
6893
+ input: (base) => ({
6894
+ ...base,
6895
+ color: isDark ? colors.neutral[200] : base.color
6896
+ }),
6897
+ singleValue: (base) => ({
6898
+ ...base,
6899
+ color: isDark ? colors.neutral[200] : base.color
6900
+ }),
6901
+ placeholder: (base) => ({
6902
+ ...base,
6903
+ color: isDark ? colors.neutral[400] : base.color
6904
+ })
6905
+ }),
6906
+ [isDark]
6907
+ );
6694
6908
  const {
6695
6909
  columns,
6696
6910
  primaryKey: nodePrimaryKey,
6697
6911
  isLoading,
6698
6912
  error
6699
6913
  } = useModelColumns_default(params.model);
6700
- React11.useEffect(() => {
6914
+ React12.useEffect(() => {
6701
6915
  if (!primaryKey && nodePrimaryKey) {
6702
6916
  onParamsChanged({
6703
6917
  ...params,
@@ -6705,7 +6919,7 @@ function ValueDiffForm({
6705
6919
  });
6706
6920
  }
6707
6921
  }, [primaryKey, nodePrimaryKey, params, onParamsChanged]);
6708
- React11.useEffect(() => {
6922
+ React12.useEffect(() => {
6709
6923
  setIsReadyToExecute(!!(primaryKey && model));
6710
6924
  }, [primaryKey, model, setIsReadyToExecute]);
6711
6925
  const columnNames = columns.map((c) => c.name);
@@ -6750,16 +6964,7 @@ function ValueDiffForm({
6750
6964
  primary_key: optionsArray.length == 1 ? optionsArray[0].value : optionsArray.map((v) => v.value)
6751
6965
  });
6752
6966
  },
6753
- styles: {
6754
- container: (base) => ({
6755
- ...base,
6756
- width: "100%"
6757
- }),
6758
- control: (base) => ({
6759
- ...base,
6760
- minHeight: "40px"
6761
- })
6762
- }
6967
+ styles: selectStyles
6763
6968
  }
6764
6969
  )
6765
6970
  ] }),
@@ -6810,16 +7015,7 @@ function ValueDiffForm({
6810
7015
  columns: cols
6811
7016
  });
6812
7017
  },
6813
- styles: {
6814
- container: (base) => ({
6815
- ...base,
6816
- width: "100%"
6817
- }),
6818
- control: (base) => ({
6819
- ...base,
6820
- minHeight: "40px"
6821
- })
6822
- }
7018
+ styles: selectStyles
6823
7019
  }
6824
7020
  )
6825
7021
  ] })
@@ -6862,27 +7058,35 @@ function _ValueDiffResultView({ run }, ref) {
6862
7058
  " removed)"
6863
7059
  ] }),
6864
7060
  /* @__PURE__ */ jsxRuntime.jsx(
6865
- ScreenshotDataGrid,
7061
+ Box21__default.default,
6866
7062
  {
6867
- ref,
6868
- style: {
6869
- blockSize: "auto",
7063
+ sx: {
7064
+ flex: 1,
7065
+ minHeight: 0,
6870
7066
  maxHeight: "100%",
6871
7067
  overflow: "auto",
6872
- borderBlock: "1px solid lightgray"
7068
+ borderTop: "1px solid",
7069
+ borderBottom: "1px solid",
7070
+ borderColor: "divider"
6873
7071
  },
6874
- columns,
6875
- rows,
6876
- renderers: { noRowsFallback: /* @__PURE__ */ jsxRuntime.jsx(EmptyRowsRenderer, {}) },
6877
- defaultColumnOptions: { resizable: true },
6878
- className: "rdg-light"
7072
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7073
+ ScreenshotDataGrid,
7074
+ {
7075
+ ref,
7076
+ columns,
7077
+ rows,
7078
+ renderers: { noRowsFallback: /* @__PURE__ */ jsxRuntime.jsx(EmptyRowsRenderer, {}) },
7079
+ defaultColumnOptions: { resizable: true },
7080
+ className: "rdg-light"
7081
+ }
7082
+ )
6879
7083
  }
6880
7084
  )
6881
7085
  ]
6882
7086
  }
6883
7087
  );
6884
7088
  }
6885
- var ValueDiffResultView = React11.forwardRef(_ValueDiffResultView);
7089
+ var ValueDiffResultView = React12.forwardRef(_ValueDiffResultView);
6886
7090
 
6887
7091
  // recce-source/js/src/components/run/registry.ts
6888
7092
  var registry = {
@@ -6972,7 +7176,7 @@ var findByRunType = (runType) => {
6972
7176
  function useAppLocation() {
6973
7177
  const router = navigation.useRouter();
6974
7178
  const pathname = navigation.usePathname();
6975
- const setLocation = React11.useCallback(
7179
+ const setLocation = React12.useCallback(
6976
7180
  (to, options) => {
6977
7181
  if (options?.replace) {
6978
7182
  router.replace(to, { scroll: options?.scroll ?? true });
@@ -6984,7 +7188,7 @@ function useAppLocation() {
6984
7188
  );
6985
7189
  return [pathname, setLocation];
6986
7190
  }
6987
- var RecceActionContext = React11.createContext({
7191
+ var RecceActionContext = React12.createContext({
6988
7192
  runAction: () => {
6989
7193
  return void 0;
6990
7194
  },
@@ -7011,27 +7215,27 @@ var RecceActionContext = React11.createContext({
7011
7215
  });
7012
7216
  var useCloseModalEffect = (onClose) => {
7013
7217
  const pathname = navigation.usePathname();
7014
- React11.useEffect(() => {
7218
+ React12.useEffect(() => {
7015
7219
  onClose();
7016
7220
  }, [onClose, pathname]);
7017
7221
  };
7018
7222
  function RecceActionContextProvider({
7019
7223
  children
7020
7224
  }) {
7021
- const [action, setAction] = React11.useState();
7022
- const [isModalOpen, setModalOpen] = React11.useState(false);
7023
- const onModalOpen = React11.useCallback(() => setModalOpen(true), []);
7024
- const onModalClose = React11.useCallback(() => setModalOpen(false), []);
7025
- const [isRunResultOpen, setRunResultOpen] = React11.useState(false);
7026
- const onResultPaneOpen = React11.useCallback(() => setRunResultOpen(true), []);
7027
- const closeRunResult = React11.useCallback(() => setRunResultOpen(false), []);
7028
- const [isHistoryOpen, setHistoryOpen] = React11.useState(false);
7029
- const showHistory = React11.useCallback(() => setHistoryOpen(true), []);
7030
- const closeHistory = React11.useCallback(() => setHistoryOpen(false), []);
7031
- const [runId, setRunId] = React11.useState();
7225
+ const [action, setAction] = React12.useState();
7226
+ const [isModalOpen, setModalOpen] = React12.useState(false);
7227
+ const onModalOpen = React12.useCallback(() => setModalOpen(true), []);
7228
+ const onModalClose = React12.useCallback(() => setModalOpen(false), []);
7229
+ const [isRunResultOpen, setRunResultOpen] = React12.useState(false);
7230
+ const onResultPaneOpen = React12.useCallback(() => setRunResultOpen(true), []);
7231
+ const closeRunResult = React12.useCallback(() => setRunResultOpen(false), []);
7232
+ const [isHistoryOpen, setHistoryOpen] = React12.useState(false);
7233
+ const showHistory = React12.useCallback(() => setHistoryOpen(true), []);
7234
+ const closeHistory = React12.useCallback(() => setHistoryOpen(false), []);
7235
+ const [runId, setRunId] = React12.useState();
7032
7236
  const [location, setLocation] = useAppLocation();
7033
7237
  const queryClient = reactQuery.useQueryClient();
7034
- const showRunId = React11.useCallback(
7238
+ const showRunId = React12.useCallback(
7035
7239
  async (runId2, refreshHistory) => {
7036
7240
  setRunId(runId2);
7037
7241
  onResultPaneOpen();
@@ -7041,11 +7245,11 @@ function RecceActionContextProvider({
7041
7245
  },
7042
7246
  [onResultPaneOpen, queryClient]
7043
7247
  );
7044
- const clearRunResult = React11.useCallback(() => {
7248
+ const clearRunResult = React12.useCallback(() => {
7045
7249
  setRunId(void 0);
7046
7250
  closeRunResult();
7047
7251
  }, [closeRunResult]);
7048
- const runAction = React11.useCallback(
7252
+ const runAction = React12.useCallback(
7049
7253
  async (type, params, options) => {
7050
7254
  try {
7051
7255
  const session = (/* @__PURE__ */ new Date()).getTime().toString();
@@ -7150,15 +7354,15 @@ function RecceActionContextProvider({
7150
7354
  }
7151
7355
  );
7152
7356
  }
7153
- var useRecceActionContext = () => React11.useContext(RecceActionContext);
7154
- var RecceCheckContext = React11.createContext({
7357
+ var useRecceActionContext = () => React12.useContext(RecceActionContext);
7358
+ var RecceCheckContext = React12.createContext({
7155
7359
  latestSelectedCheckId: "",
7156
7360
  setLatestSelectedCheckId: () => {
7157
7361
  return void 0;
7158
7362
  }
7159
7363
  });
7160
7364
  function RecceCheckContextProvider({ children }) {
7161
- const [selectCheckId, setSelectCheckId] = React11__default.default.useState("");
7365
+ const [selectCheckId, setSelectCheckId] = React12__default.default.useState("");
7162
7366
  return /* @__PURE__ */ jsxRuntime.jsx(
7163
7367
  RecceCheckContext.Provider,
7164
7368
  {
@@ -7170,7 +7374,7 @@ function RecceCheckContextProvider({ children }) {
7170
7374
  }
7171
7375
  );
7172
7376
  }
7173
- var useRecceCheckContext = () => React11.useContext(RecceCheckContext);
7377
+ var useRecceCheckContext = () => React12.useContext(RecceCheckContext);
7174
7378
  var defaultSqlQuery = 'select * from {{ ref("mymodel") }}';
7175
7379
  var defaultQueryContext = {
7176
7380
  sqlQuery: defaultSqlQuery,
@@ -7190,12 +7394,12 @@ var defaultQueryContext = {
7190
7394
  return void 0;
7191
7395
  }
7192
7396
  };
7193
- var RecceQueryContext = React11.createContext(defaultQueryContext);
7397
+ var RecceQueryContext = React12.createContext(defaultQueryContext);
7194
7398
  function RecceQueryContextProvider({ children }) {
7195
- const [sqlQuery, setSqlQuery] = React11__default.default.useState(defaultSqlQuery);
7196
- const [baseSqlQuery, setBaseSqlQuery] = React11__default.default.useState(defaultSqlQuery);
7197
- const [isCustomQueries, setCustomQueries] = React11__default.default.useState(false);
7198
- const [primaryKeys, setPrimaryKeys] = React11__default.default.useState();
7399
+ const [sqlQuery, setSqlQuery] = React12__default.default.useState(defaultSqlQuery);
7400
+ const [baseSqlQuery, setBaseSqlQuery] = React12__default.default.useState(defaultSqlQuery);
7401
+ const [isCustomQueries, setCustomQueries] = React12__default.default.useState(false);
7402
+ const [primaryKeys, setPrimaryKeys] = React12__default.default.useState();
7199
7403
  return /* @__PURE__ */ jsxRuntime.jsx(
7200
7404
  RecceQueryContext.Provider,
7201
7405
  {
@@ -7213,18 +7417,18 @@ function RecceQueryContextProvider({ children }) {
7213
7417
  }
7214
7418
  );
7215
7419
  }
7216
- var useRecceQueryContext = () => React11.useContext(RecceQueryContext);
7420
+ var useRecceQueryContext = () => React12.useContext(RecceQueryContext);
7217
7421
  var defaultRowCountStateContext = {
7218
7422
  isNodesFetching: [],
7219
7423
  setIsNodesFetching: () => {
7220
7424
  return void 0;
7221
7425
  }
7222
7426
  };
7223
- var RowCountStateContext = React11.createContext(defaultRowCountStateContext);
7427
+ var RowCountStateContext = React12.createContext(defaultRowCountStateContext);
7224
7428
  function RowCountStateContextProvider({
7225
7429
  children
7226
7430
  }) {
7227
- const [isNodesFetching, setIsNodesFetching] = React11__default.default.useState([]);
7431
+ const [isNodesFetching, setIsNodesFetching] = React12__default.default.useState([]);
7228
7432
  return /* @__PURE__ */ jsxRuntime.jsx(
7229
7433
  RowCountStateContext.Provider,
7230
7434
  {
@@ -7233,19 +7437,19 @@ function RowCountStateContextProvider({
7233
7437
  }
7234
7438
  );
7235
7439
  }
7236
- var useRowCountStateContext = () => React11.useContext(RowCountStateContext);
7440
+ var useRowCountStateContext = () => React12.useContext(RowCountStateContext);
7237
7441
  async function shareState() {
7238
7442
  return (await axiosClient.post(
7239
7443
  "/api/share"
7240
7444
  )).data;
7241
7445
  }
7242
- var ShareState = React11.createContext(void 0);
7446
+ var ShareState = React12.createContext(void 0);
7243
7447
  function RecceShareStateContextProvider({
7244
7448
  children
7245
7449
  }) {
7246
- const [shareUrl, setShareUrl] = React11.useState();
7247
- const [isLoading, setIsLoading] = React11.useState(false);
7248
- const [error, setError] = React11.useState();
7450
+ const [shareUrl, setShareUrl] = React12.useState();
7451
+ const [isLoading, setIsLoading] = React12.useState(false);
7452
+ const [error, setError] = React12.useState();
7249
7453
  const handleShareClick = async () => {
7250
7454
  setIsLoading(true);
7251
7455
  setError(void 0);
@@ -7272,7 +7476,7 @@ function RecceShareStateContextProvider({
7272
7476
  );
7273
7477
  }
7274
7478
  var useRecceShareStateContext = () => {
7275
- const context = React11.useContext(ShareState);
7479
+ const context = React12.useContext(ShareState);
7276
7480
  if (!context) {
7277
7481
  throw new Error(
7278
7482
  "useRecceShareStateContext must be used within a RecceShareStateContextProvider"