@elaraai/e3-ui-components 1.0.41 → 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"}
@@ -5,6 +5,12 @@ export interface TaskPreviewProps {
5
5
  workspace: string;
6
6
  task: string;
7
7
  requestOptions?: RequestOptions;
8
+ /**
9
+ * Chromeless mode: drop the task-name header bar and, for a `ui` task,
10
+ * render the output edge-to-edge (forwarded to {@link UITaskPreview} as
11
+ * `bare`) — for host kiosk embedding of a deployed `<App>`. Default `false`.
12
+ */
13
+ bare?: boolean;
8
14
  }
9
15
  export declare const TaskPreview: import('react').NamedExoticComponent<TaskPreviewProps>;
10
16
  //# sourceMappingURL=TaskPreview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/TaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7D,MAAM,WAAW,gBAAgB;IAC7B,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,WAAW,wDAsCmF,CAAC"}
1
+ {"version":3,"file":"TaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/TaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7D,MAAM,WAAW,gBAAgB;IAC7B,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;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,wDA4C8G,CAAC"}
@@ -11,6 +11,13 @@ export interface UITaskPreviewProps {
11
11
  * Poll interval (ms) for the manifest's declared reads. Default 1000ms.
12
12
  */
13
13
  pollInterval?: number;
14
+ /**
15
+ * Chromeless mode: drop the padding + scroll wrapper so the ui output
16
+ * (e.g. a deployed `<App>` shell that owns its own layout) fills its
17
+ * container edge-to-edge — for host kiosk embedding. Default `false`
18
+ * (the padded, scrollable preview wrapper).
19
+ */
20
+ bare?: boolean;
14
21
  }
15
22
  export declare const UITaskPreview: import('react').NamedExoticComponent<UITaskPreviewProps>;
16
23
  //# sourceMappingURL=UITaskPreview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UITaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/UITaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAW9E,MAAM,WAAW,kBAAkB;IAC/B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,eAAO,MAAM,aAAa,0DAsHxB,CAAC"}
1
+ {"version":3,"file":"UITaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/UITaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAW9E,MAAM,WAAW,kBAAkB;IAC/B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAMD,eAAO,MAAM,aAAa,0DAyHxB,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(".");
@@ -64133,7 +64138,8 @@ function treePathToString$1(path2) {
64133
64138
  const UITaskPreview = React.memo(function UITaskPreview2({
64134
64139
  task,
64135
64140
  config: config2,
64136
- pollInterval = 1e3
64141
+ pollInterval = 1e3,
64142
+ bare = false
64137
64143
  }) {
64138
64144
  var _a2, _b2;
64139
64145
  const e3 = useE3ConfigOptional();
@@ -64209,7 +64215,7 @@ const UITaskPreview = React.memo(function UITaskPreview2({
64209
64215
  if (statusQuery.data.refType !== "value") return /* @__PURE__ */ jsxRuntime.jsx(StatusDisplay, { variant: "info", title: "No output yet", message: "Task has not produced a value" });
64210
64216
  if (valueQuery.isLoading || !valueQuery.data) return /* @__PURE__ */ jsxRuntime.jsx(StatusDisplay, { variant: "loading", title: "Loading..." });
64211
64217
  if (valueQuery.error) return /* @__PURE__ */ jsxRuntime.jsx(StatusDisplay, { variant: "error", title: "Decode failed", message: valueQuery.error.message });
64212
- return /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.UIStoreProvider, { store, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { height: "100%", overflow: "auto", p: "4", children: /* @__PURE__ */ jsxRuntime.jsx(
64218
+ return /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.UIStoreProvider, { store, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { height: "100%", overflow: bare ? void 0 : "auto", p: bare ? void 0 : "4", minH: bare ? 0 : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
64213
64219
  eastUiComponents.EastChakraComponent,
64214
64220
  {
64215
64221
  value: valueQuery.data.decoded,
@@ -64592,10 +64598,10 @@ async function fetchAllLogs(apiUrl, repo, workspace, taskName, stream, requestOp
64592
64598
  }, requestOptions ?? { token: null });
64593
64599
  allData += chunk.data;
64594
64600
  totalSize = chunk.totalSize;
64595
- if (chunk.complete || allData.length >= MAX_TOTAL_SIZE) {
64601
+ if (chunk.complete || allData.length >= MAX_TOTAL_SIZE || chunk.size === 0n) {
64596
64602
  break;
64597
64603
  }
64598
- offset += CHUNK_SIZE;
64604
+ offset += Number(chunk.size);
64599
64605
  }
64600
64606
  return {
64601
64607
  data: allData,
@@ -64726,18 +64732,20 @@ const TaskPreview = React.memo(function TaskPreview2({
64726
64732
  repo,
64727
64733
  workspace,
64728
64734
  task,
64729
- requestOptions
64735
+ requestOptions,
64736
+ bare = false
64730
64737
  }) {
64731
64738
  const detailsQuery = useTaskDetails(apiUrl, repo, workspace, task, {
64732
64739
  ...requestOptions != null && { requestOptions }
64733
64740
  });
64734
64741
  const kind = detailsQuery.data ? getTaskKind(detailsQuery.data) : null;
64735
64742
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { height: "100%", display: "flex", flexDirection: "column", overflow: "hidden", children: [
64736
- /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", flexShrink: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: task }) }),
64743
+ !bare && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", flexShrink: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: task }) }),
64737
64744
  /* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, overflow: "hidden", minHeight: 0, children: detailsQuery.isLoading ? /* @__PURE__ */ jsxRuntime.jsx(StatusDisplay, { variant: "loading", title: "Loading task..." }) : detailsQuery.error ? /* @__PURE__ */ jsxRuntime.jsx(StatusDisplay, { variant: "error", title: "Error", message: detailsQuery.error.message }) : kind === "ui" ? /* @__PURE__ */ jsxRuntime.jsx(
64738
64745
  UITaskPreview,
64739
64746
  {
64740
64747
  task,
64748
+ bare,
64741
64749
  config: { apiUrl, repo, workspace, token: (requestOptions == null ? void 0 : requestOptions.token) ?? null }
64742
64750
  }
64743
64751
  ) : /* @__PURE__ */ jsxRuntime.jsx(
@@ -64751,7 +64759,7 @@ const TaskPreview = React.memo(function TaskPreview2({
64751
64759
  }
64752
64760
  ) })
64753
64761
  ] });
64754
- }, (prev2, next2) => prev2.task === next2.task && prev2.repo === next2.repo && prev2.workspace === next2.workspace);
64762
+ }, (prev2, next2) => prev2.task === next2.task && prev2.repo === next2.repo && prev2.workspace === next2.workspace && prev2.bare === next2.bare);
64755
64763
  function formatPrimitive(type, value) {
64756
64764
  switch (type.type) {
64757
64765
  case "Null":