@elaraai/e3-ui-components 1.0.42 → 1.0.43

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.
@@ -1 +1 @@
1
- {"version":3,"file":"InputPreview.d.ts","sourceRoot":"","sources":["../../src/components/InputPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,yDA0BuD,CAAC"}
1
+ {"version":3,"file":"InputPreview.d.ts","sourceRoot":"","sources":["../../src/components/InputPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,yDA6BuD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { keepPreviousData } from '@tanstack/react-query';
1
2
  import { DatasetStatusDetail } from '@elaraai/e3-api-client';
2
3
  import { option } from '@elaraai/east';
3
4
  /**
@@ -22,5 +23,11 @@ export interface QueryOverrides {
22
23
  refetchOnMount?: boolean | 'always';
23
24
  retry?: boolean | number;
24
25
  retryDelay?: number | ((attempt: number) => number);
26
+ /**
27
+ * Value to show while a new query key loads. `keepPreviousData` holds the
28
+ * previous result on screen so a key change (e.g. an edit producing a new
29
+ * content hash) does not flash the loading state.
30
+ */
31
+ placeholderData?: typeof keepPreviousData;
25
32
  }
26
33
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAC/C,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CACvD"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAC/C,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACpD;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,gBAAgB,CAAC;CAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAwD7D,wBAAgB,WAAW,CACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,GAAE,QAAQ,GAAG,QAAmB,EACtC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;UAlDd,MAAM;YAAU,MAAM;UAAQ,MAAM;eAAa,MAAM;cAAY,OAAO;UA2D5F"}
1
+ {"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA2D7D,wBAAgB,WAAW,CACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,GAAE,QAAQ,GAAG,QAAmB,EACtC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;UArDd,MAAM;YAAU,MAAM;UAAQ,MAAM;eAAa,MAAM;cAAY,OAAO;UA8D5F"}
package/dist/index.cjs CHANGED
@@ -64112,20 +64112,25 @@ const InputPreview = React.memo(function InputPreview2({
64112
64112
  requestOptions
64113
64113
  }) {
64114
64114
  const displayName = path2.replace(/^\.inputs\./, "");
64115
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden", children: [
64116
- /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", justify: "space-between", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: displayName }) }),
64117
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, overflow: "hidden", minHeight: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
64118
- DatasetPreview,
64119
- {
64120
- apiUrl,
64121
- repo,
64122
- workspace,
64123
- path: path2,
64124
- editable: true,
64125
- ...requestOptions != null && { requestOptions }
64126
- }
64127
- ) })
64128
- ] });
64115
+ return (
64116
+ // `height` rather than `flex`, matching the sibling previews: the host
64117
+ // mount is not always a flex container, and a `flex` bound would then
64118
+ // silently fall back to auto height and grow with the content.
64119
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { height: "100%", display: "flex", flexDirection: "column", overflow: "hidden", children: [
64120
+ /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", justify: "space-between", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: displayName }) }),
64121
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, overflow: "hidden", minHeight: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
64122
+ DatasetPreview,
64123
+ {
64124
+ apiUrl,
64125
+ repo,
64126
+ workspace,
64127
+ path: path2,
64128
+ editable: true,
64129
+ ...requestOptions != null && { requestOptions }
64130
+ }
64131
+ ) })
64132
+ ] })
64133
+ );
64129
64134
  }, (prev2, next2) => prev2.path === next2.path && prev2.workspace === next2.workspace);
64130
64135
  function treePathToString$1(path2) {
64131
64136
  return path2.map((p2) => p2.value).join(".");
@@ -64593,10 +64598,10 @@ async function fetchAllLogs(apiUrl, repo, workspace, taskName, stream, requestOp
64593
64598
  }, requestOptions ?? { token: null });
64594
64599
  allData += chunk.data;
64595
64600
  totalSize = chunk.totalSize;
64596
- if (chunk.complete || allData.length >= MAX_TOTAL_SIZE) {
64601
+ if (chunk.complete || allData.length >= MAX_TOTAL_SIZE || chunk.size === 0n) {
64597
64602
  break;
64598
64603
  }
64599
- offset += CHUNK_SIZE;
64604
+ offset += Number(chunk.size);
64600
64605
  }
64601
64606
  return {
64602
64607
  data: allData,