@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.
- package/dist/components/InputPreview.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts +6 -0
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts +7 -0
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/hooks/types.d.ts +7 -0
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
- package/dist/index.cjs +29 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -21
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -64094,20 +64094,25 @@ const InputPreview = memo(function InputPreview2({
|
|
|
64094
64094
|
requestOptions
|
|
64095
64095
|
}) {
|
|
64096
64096
|
const displayName = path2.replace(/^\.inputs\./, "");
|
|
64097
|
-
return
|
|
64098
|
-
|
|
64099
|
-
|
|
64100
|
-
|
|
64101
|
-
|
|
64102
|
-
|
|
64103
|
-
|
|
64104
|
-
|
|
64105
|
-
|
|
64106
|
-
|
|
64107
|
-
|
|
64108
|
-
|
|
64109
|
-
|
|
64110
|
-
|
|
64097
|
+
return (
|
|
64098
|
+
// `height` rather than `flex`, matching the sibling previews: the host
|
|
64099
|
+
// mount is not always a flex container, and a `flex` bound would then
|
|
64100
|
+
// silently fall back to auto height and grow with the content.
|
|
64101
|
+
/* @__PURE__ */ jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", overflow: "hidden", children: [
|
|
64102
|
+
/* @__PURE__ */ jsx$1(Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", justify: "space-between", children: /* @__PURE__ */ jsx$1(Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: displayName }) }),
|
|
64103
|
+
/* @__PURE__ */ jsx$1(Box, { flex: 1, overflow: "hidden", minHeight: 0, children: /* @__PURE__ */ jsx$1(
|
|
64104
|
+
DatasetPreview,
|
|
64105
|
+
{
|
|
64106
|
+
apiUrl,
|
|
64107
|
+
repo,
|
|
64108
|
+
workspace,
|
|
64109
|
+
path: path2,
|
|
64110
|
+
editable: true,
|
|
64111
|
+
...requestOptions != null && { requestOptions }
|
|
64112
|
+
}
|
|
64113
|
+
) })
|
|
64114
|
+
] })
|
|
64115
|
+
);
|
|
64111
64116
|
}, (prev2, next2) => prev2.path === next2.path && prev2.workspace === next2.workspace);
|
|
64112
64117
|
function treePathToString$1(path2) {
|
|
64113
64118
|
return path2.map((p2) => p2.value).join(".");
|
|
@@ -64115,7 +64120,8 @@ function treePathToString$1(path2) {
|
|
|
64115
64120
|
const UITaskPreview = memo(function UITaskPreview2({
|
|
64116
64121
|
task,
|
|
64117
64122
|
config: config2,
|
|
64118
|
-
pollInterval = 1e3
|
|
64123
|
+
pollInterval = 1e3,
|
|
64124
|
+
bare = false
|
|
64119
64125
|
}) {
|
|
64120
64126
|
var _a2, _b2;
|
|
64121
64127
|
const e3 = useE3ConfigOptional();
|
|
@@ -64191,7 +64197,7 @@ const UITaskPreview = memo(function UITaskPreview2({
|
|
|
64191
64197
|
if (statusQuery.data.refType !== "value") return /* @__PURE__ */ jsx$1(StatusDisplay, { variant: "info", title: "No output yet", message: "Task has not produced a value" });
|
|
64192
64198
|
if (valueQuery.isLoading || !valueQuery.data) return /* @__PURE__ */ jsx$1(StatusDisplay, { variant: "loading", title: "Loading..." });
|
|
64193
64199
|
if (valueQuery.error) return /* @__PURE__ */ jsx$1(StatusDisplay, { variant: "error", title: "Decode failed", message: valueQuery.error.message });
|
|
64194
|
-
return /* @__PURE__ */ jsx$1(UIStoreProvider, { store, children: /* @__PURE__ */ jsx$1(ErrorBoundary, { children: /* @__PURE__ */ jsx$1(Box, { height: "100%", overflow: "auto", p: "4", children: /* @__PURE__ */ jsx$1(
|
|
64200
|
+
return /* @__PURE__ */ jsx$1(UIStoreProvider, { store, children: /* @__PURE__ */ jsx$1(ErrorBoundary, { children: /* @__PURE__ */ jsx$1(Box, { height: "100%", overflow: bare ? void 0 : "auto", p: bare ? void 0 : "4", minH: bare ? 0 : void 0, children: /* @__PURE__ */ jsx$1(
|
|
64195
64201
|
EastChakraComponent,
|
|
64196
64202
|
{
|
|
64197
64203
|
value: valueQuery.data.decoded,
|
|
@@ -64574,10 +64580,10 @@ async function fetchAllLogs(apiUrl, repo, workspace, taskName, stream, requestOp
|
|
|
64574
64580
|
}, requestOptions ?? { token: null });
|
|
64575
64581
|
allData += chunk.data;
|
|
64576
64582
|
totalSize = chunk.totalSize;
|
|
64577
|
-
if (chunk.complete || allData.length >= MAX_TOTAL_SIZE) {
|
|
64583
|
+
if (chunk.complete || allData.length >= MAX_TOTAL_SIZE || chunk.size === 0n) {
|
|
64578
64584
|
break;
|
|
64579
64585
|
}
|
|
64580
|
-
offset +=
|
|
64586
|
+
offset += Number(chunk.size);
|
|
64581
64587
|
}
|
|
64582
64588
|
return {
|
|
64583
64589
|
data: allData,
|
|
@@ -64708,18 +64714,20 @@ const TaskPreview = memo(function TaskPreview2({
|
|
|
64708
64714
|
repo,
|
|
64709
64715
|
workspace,
|
|
64710
64716
|
task,
|
|
64711
|
-
requestOptions
|
|
64717
|
+
requestOptions,
|
|
64718
|
+
bare = false
|
|
64712
64719
|
}) {
|
|
64713
64720
|
const detailsQuery = useTaskDetails(apiUrl, repo, workspace, task, {
|
|
64714
64721
|
...requestOptions != null && { requestOptions }
|
|
64715
64722
|
});
|
|
64716
64723
|
const kind = detailsQuery.data ? getTaskKind(detailsQuery.data) : null;
|
|
64717
64724
|
return /* @__PURE__ */ jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", overflow: "hidden", children: [
|
|
64718
|
-
/* @__PURE__ */ jsx$1(Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", flexShrink: 0, children: /* @__PURE__ */ jsx$1(Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: task }) }),
|
|
64725
|
+
!bare && /* @__PURE__ */ jsx$1(Flex, { px: 4, py: 2, borderBottom: "1px solid", borderColor: "border.subtle", bg: "bg.surface", align: "center", flexShrink: 0, children: /* @__PURE__ */ jsx$1(Text, { fontSize: "sm", fontWeight: "medium", color: "fg", children: task }) }),
|
|
64719
64726
|
/* @__PURE__ */ jsx$1(Box, { flex: 1, overflow: "hidden", minHeight: 0, children: detailsQuery.isLoading ? /* @__PURE__ */ jsx$1(StatusDisplay, { variant: "loading", title: "Loading task..." }) : detailsQuery.error ? /* @__PURE__ */ jsx$1(StatusDisplay, { variant: "error", title: "Error", message: detailsQuery.error.message }) : kind === "ui" ? /* @__PURE__ */ jsx$1(
|
|
64720
64727
|
UITaskPreview,
|
|
64721
64728
|
{
|
|
64722
64729
|
task,
|
|
64730
|
+
bare,
|
|
64723
64731
|
config: { apiUrl, repo, workspace, token: (requestOptions == null ? void 0 : requestOptions.token) ?? null }
|
|
64724
64732
|
}
|
|
64725
64733
|
) : /* @__PURE__ */ jsx$1(
|
|
@@ -64733,7 +64741,7 @@ const TaskPreview = memo(function TaskPreview2({
|
|
|
64733
64741
|
}
|
|
64734
64742
|
) })
|
|
64735
64743
|
] });
|
|
64736
|
-
}, (prev2, next2) => prev2.task === next2.task && prev2.repo === next2.repo && prev2.workspace === next2.workspace);
|
|
64744
|
+
}, (prev2, next2) => prev2.task === next2.task && prev2.repo === next2.repo && prev2.workspace === next2.workspace && prev2.bare === next2.bare);
|
|
64737
64745
|
function formatPrimitive(type, value) {
|
|
64738
64746
|
switch (type.type) {
|
|
64739
64747
|
case "Null":
|