@elaraai/e3-ui-components 1.0.60 → 1.0.62
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/DatasetKeySearch.d.ts +84 -0
- package/dist/components/DatasetKeySearch.d.ts.map +1 -0
- package/dist/components/DatasetPreview.d.ts.map +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +3 -0
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/index.cjs +443 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +446 -109
- package/dist/index.js.map +1 -1
- package/dist/ontology/accents.d.ts +2 -2
- package/dist/ontology/index.d.ts.map +1 -1
- package/package.json +21 -15
package/dist/index.cjs
CHANGED
|
@@ -8944,7 +8944,7 @@ const ConflictRow = React.memo(function ConflictRow2({ row, depth, bindingPathSt
|
|
|
8944
8944
|
gap: "8px",
|
|
8945
8945
|
mt: "10px",
|
|
8946
8946
|
p: "12px",
|
|
8947
|
-
bg: "
|
|
8947
|
+
bg: "bg.surface",
|
|
8948
8948
|
border: "1px solid",
|
|
8949
8949
|
borderColor: "fg.warning",
|
|
8950
8950
|
borderRadius: "md",
|
|
@@ -20466,28 +20466,18 @@ function FiAlertTriangle(props) {
|
|
|
20466
20466
|
return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "9", "x2": "12", "y2": "13" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "17", "x2": "12.01", "y2": "17" }, "child": [] }] })(props);
|
|
20467
20467
|
}
|
|
20468
20468
|
const NODE_KIND_ACCENT = {
|
|
20469
|
-
process: "
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20481
|
-
data: "#b8862d",
|
|
20482
|
-
// status.warn
|
|
20483
|
-
resource: "#56727a",
|
|
20484
|
-
// color-mix(brand.600 30%, gray.500)
|
|
20485
|
-
policy: "#8d7a5f",
|
|
20486
|
-
// color-mix(status.warn 50%, gray.600)
|
|
20487
|
-
document: "#bcd1d3",
|
|
20488
|
-
// color-mix(brand.600 30%, gray.100)
|
|
20489
|
-
group: "#4a5f5f"
|
|
20490
|
-
// gray.600
|
|
20469
|
+
process: "brand.600",
|
|
20470
|
+
computation: "color-mix(in srgb, var(--chakra-colors-brand-600) 60%, var(--chakra-colors-gray-500))",
|
|
20471
|
+
decision: "brand.700",
|
|
20472
|
+
objective: "gray.800",
|
|
20473
|
+
kpi: "status.pos",
|
|
20474
|
+
agent: "color-mix(in srgb, var(--chakra-colors-brand-700) 45%, color-mix(in srgb, var(--chakra-colors-status-warn) 15%, var(--chakra-colors-gray-500)))",
|
|
20475
|
+
// plum — people/role tone
|
|
20476
|
+
data: "status.warn",
|
|
20477
|
+
resource: "color-mix(in srgb, var(--chakra-colors-brand-600) 30%, var(--chakra-colors-gray-500))",
|
|
20478
|
+
policy: "color-mix(in srgb, var(--chakra-colors-status-warn) 50%, var(--chakra-colors-gray-600))",
|
|
20479
|
+
document: "color-mix(in srgb, var(--chakra-colors-brand-600) 30%, var(--chakra-colors-gray-100))",
|
|
20480
|
+
group: "gray.600"
|
|
20491
20481
|
};
|
|
20492
20482
|
const EDGE_DASH = {
|
|
20493
20483
|
// flow — solid
|
|
@@ -57172,20 +57162,7 @@ function OntologyEditorBody({
|
|
|
57172
57162
|
const proOptions = React.useMemo(() => ({ hideAttribution: true }), []);
|
|
57173
57163
|
const miniMapNodeColor = React.useCallback((node2) => {
|
|
57174
57164
|
const data4 = node2.data;
|
|
57175
|
-
|
|
57176
|
-
process: "#3a7780",
|
|
57177
|
-
computation: "#42757d",
|
|
57178
|
-
decision: "#2b4b55",
|
|
57179
|
-
objective: "#253333",
|
|
57180
|
-
kpi: "#2f7a5b",
|
|
57181
|
-
agent: "#6d5a7a",
|
|
57182
|
-
data: "#b8862d",
|
|
57183
|
-
resource: "#56727a",
|
|
57184
|
-
policy: "#8d7a5f",
|
|
57185
|
-
document: "#bcd1d3",
|
|
57186
|
-
group: "#4a5f5f"
|
|
57187
|
-
};
|
|
57188
|
-
return accent[data4.type] ?? "#6b8080";
|
|
57165
|
+
return NODE_KIND_ACCENT[data4.type] ?? "fg.muted";
|
|
57189
57166
|
}, []);
|
|
57190
57167
|
const getNode = React.useCallback(
|
|
57191
57168
|
(id3) => ontology.nodes.find((n2) => n2.id === id3),
|
|
@@ -64029,6 +64006,271 @@ class ErrorBoundary extends React.Component {
|
|
|
64029
64006
|
return this.props.children;
|
|
64030
64007
|
}
|
|
64031
64008
|
}
|
|
64009
|
+
const FIND_DEBOUNCE_MS = 250;
|
|
64010
|
+
const POPUP_LIMIT = 20;
|
|
64011
|
+
function structFields(keyType) {
|
|
64012
|
+
if (keyType.type !== "Struct") return null;
|
|
64013
|
+
const fields = keyType.value;
|
|
64014
|
+
return fields.length > 0 ? fields : null;
|
|
64015
|
+
}
|
|
64016
|
+
function splitTopLevel(text) {
|
|
64017
|
+
const parts = [];
|
|
64018
|
+
let current = "";
|
|
64019
|
+
let inString = false;
|
|
64020
|
+
let depth = 0;
|
|
64021
|
+
for (let i = 0; i < text.length; i++) {
|
|
64022
|
+
const ch = text[i];
|
|
64023
|
+
if (inString) {
|
|
64024
|
+
current += ch;
|
|
64025
|
+
if (ch === "\\" && i + 1 < text.length) {
|
|
64026
|
+
current += text[i + 1];
|
|
64027
|
+
i++;
|
|
64028
|
+
} else if (ch === '"') {
|
|
64029
|
+
inString = false;
|
|
64030
|
+
}
|
|
64031
|
+
continue;
|
|
64032
|
+
}
|
|
64033
|
+
if (ch === '"') {
|
|
64034
|
+
inString = true;
|
|
64035
|
+
current += ch;
|
|
64036
|
+
} else if (ch === "(" || ch === "[" || ch === "{") {
|
|
64037
|
+
depth++;
|
|
64038
|
+
current += ch;
|
|
64039
|
+
} else if (ch === ")" || ch === "]" || ch === "}") {
|
|
64040
|
+
depth--;
|
|
64041
|
+
current += ch;
|
|
64042
|
+
} else if (ch === "," && depth === 0) {
|
|
64043
|
+
parts.push(current);
|
|
64044
|
+
current = "";
|
|
64045
|
+
} else {
|
|
64046
|
+
current += ch;
|
|
64047
|
+
}
|
|
64048
|
+
}
|
|
64049
|
+
parts.push(current);
|
|
64050
|
+
return parts;
|
|
64051
|
+
}
|
|
64052
|
+
function keySignature(keyType) {
|
|
64053
|
+
const fields = structFields(keyType);
|
|
64054
|
+
if (fields === null) return keyType.type;
|
|
64055
|
+
return `(${fields.map((f2) => `${f2.name}: ${f2.type.type}`).join(", ")})`;
|
|
64056
|
+
}
|
|
64057
|
+
function parseKeyInput(keyType, text) {
|
|
64058
|
+
const fields = structFields(keyType);
|
|
64059
|
+
if (fields === null) {
|
|
64060
|
+
if (keyType.type === "String") return { kind: "query", query: { prefix: text } };
|
|
64061
|
+
const parsed = east.parseFor(keyType)(text);
|
|
64062
|
+
if (!parsed.success) return { kind: "hint", hint: `Key is ${keyType.type}` };
|
|
64063
|
+
return { kind: "query", query: { key: east.printFor(keyType)(parsed.value) } };
|
|
64064
|
+
}
|
|
64065
|
+
if (text.trimStart().startsWith("(")) {
|
|
64066
|
+
const parsed = east.parseFor(keyType)(text);
|
|
64067
|
+
if (!parsed.success) return { kind: "hint", hint: `Key is ${keySignature(keyType)}` };
|
|
64068
|
+
return { kind: "query", query: { key: east.printFor(keyType)(parsed.value) } };
|
|
64069
|
+
}
|
|
64070
|
+
const segments = splitTopLevel(text);
|
|
64071
|
+
if (segments.length > fields.length) {
|
|
64072
|
+
return { kind: "hint", hint: `Key is ${keySignature(keyType)}` };
|
|
64073
|
+
}
|
|
64074
|
+
const exact = [];
|
|
64075
|
+
for (let i = 0; i < segments.length; i++) {
|
|
64076
|
+
const field = fields[i];
|
|
64077
|
+
const raw = segments[i].trim();
|
|
64078
|
+
const isLast = i === segments.length - 1;
|
|
64079
|
+
if (isLast && raw === "" && i > 0) {
|
|
64080
|
+
return { kind: "query", query: { fields: exact } };
|
|
64081
|
+
}
|
|
64082
|
+
if (field.type.type === "String" && !raw.startsWith('"')) {
|
|
64083
|
+
if (isLast) {
|
|
64084
|
+
return exact.length === 0 ? { kind: "query", query: { prefix: raw } } : { kind: "query", query: { fields: exact, prefix: raw } };
|
|
64085
|
+
}
|
|
64086
|
+
exact.push(east.printFor(east.StringType)(raw));
|
|
64087
|
+
continue;
|
|
64088
|
+
}
|
|
64089
|
+
const parsed = east.parseFor(field.type)(raw);
|
|
64090
|
+
if (!parsed.success) {
|
|
64091
|
+
return { kind: "hint", hint: `${field.name} is ${field.type.type} — key is ${keySignature(keyType)}` };
|
|
64092
|
+
}
|
|
64093
|
+
exact.push(east.printFor(field.type)(parsed.value));
|
|
64094
|
+
}
|
|
64095
|
+
return { kind: "query", query: { fields: exact } };
|
|
64096
|
+
}
|
|
64097
|
+
const MATCH_NOTHING = { lower: () => false, upper: () => false };
|
|
64098
|
+
function keyRangePredicates(keyType, query) {
|
|
64099
|
+
if ("key" in query) return null;
|
|
64100
|
+
if (keyType.type === "Struct") {
|
|
64101
|
+
const meta3 = keyType.value;
|
|
64102
|
+
const literals = "fields" in query ? query.fields : [];
|
|
64103
|
+
if (literals.length > meta3.length) return MATCH_NOTHING;
|
|
64104
|
+
const values = [];
|
|
64105
|
+
for (let j2 = 0; j2 < literals.length; j2++) {
|
|
64106
|
+
const parsed = east.parseFor(meta3[j2].type)(literals[j2]);
|
|
64107
|
+
if (!parsed.success) return MATCH_NOTHING;
|
|
64108
|
+
values.push(parsed.value);
|
|
64109
|
+
}
|
|
64110
|
+
const cmps = meta3.map((f2) => east.compareFor(f2.type));
|
|
64111
|
+
const lead = (k2) => {
|
|
64112
|
+
for (let j2 = 0; j2 < values.length; j2++) {
|
|
64113
|
+
const c2 = cmps[j2](k2[meta3[j2].name], values[j2]);
|
|
64114
|
+
if (c2 !== 0) return c2;
|
|
64115
|
+
}
|
|
64116
|
+
return 0;
|
|
64117
|
+
};
|
|
64118
|
+
const prefix22 = query.prefix;
|
|
64119
|
+
if (prefix22 === void 0) {
|
|
64120
|
+
return { lower: (k2) => lead(k2) >= 0, upper: (k2) => lead(k2) > 0 };
|
|
64121
|
+
}
|
|
64122
|
+
const prefixIdx = values.length;
|
|
64123
|
+
if (prefixIdx >= meta3.length || meta3[prefixIdx].type.type !== "String") return MATCH_NOTHING;
|
|
64124
|
+
const prefixName = meta3[prefixIdx].name;
|
|
64125
|
+
const prefixCmp = cmps[prefixIdx];
|
|
64126
|
+
return {
|
|
64127
|
+
lower: (k2) => {
|
|
64128
|
+
const c2 = lead(k2);
|
|
64129
|
+
return c2 !== 0 ? c2 > 0 : prefixCmp(k2[prefixName], prefix22) >= 0;
|
|
64130
|
+
},
|
|
64131
|
+
upper: (k2) => {
|
|
64132
|
+
const c2 = lead(k2);
|
|
64133
|
+
if (c2 !== 0) return c2 > 0;
|
|
64134
|
+
const field = k2[prefixName];
|
|
64135
|
+
return prefixCmp(field, prefix22) > 0 && !field.startsWith(prefix22);
|
|
64136
|
+
}
|
|
64137
|
+
};
|
|
64138
|
+
}
|
|
64139
|
+
if (!("prefix" in query) || query.prefix === void 0 || keyType.type !== "String") return MATCH_NOTHING;
|
|
64140
|
+
const prefix2 = query.prefix;
|
|
64141
|
+
const cmp = east.compareFor(keyType);
|
|
64142
|
+
return {
|
|
64143
|
+
lower: (k2) => cmp(k2, prefix2) >= 0,
|
|
64144
|
+
upper: (k2) => cmp(k2, prefix2) > 0 && !k2.startsWith(prefix2)
|
|
64145
|
+
};
|
|
64146
|
+
}
|
|
64147
|
+
const DatasetKeySearch = React.memo(function DatasetKeySearch2({ keyType, onFind, onListRange, onJump, onClear }) {
|
|
64148
|
+
const [range, setRange] = React.useState(null);
|
|
64149
|
+
const [items, setItems] = React.useState([]);
|
|
64150
|
+
const [activeIdx, setActiveIdx] = React.useState(-1);
|
|
64151
|
+
const [hint, setHint] = React.useState(null);
|
|
64152
|
+
const [resetSeq, setResetSeq] = React.useState(0);
|
|
64153
|
+
const debounceRef = React.useRef(void 0);
|
|
64154
|
+
const findSeqRef = React.useRef(0);
|
|
64155
|
+
React.useEffect(() => () => clearTimeout(debounceRef.current), []);
|
|
64156
|
+
const runFind = React.useCallback((query) => {
|
|
64157
|
+
const seq = ++findSeqRef.current;
|
|
64158
|
+
void (async () => {
|
|
64159
|
+
try {
|
|
64160
|
+
const result = await onFind(query);
|
|
64161
|
+
if (seq !== findSeqRef.current) return;
|
|
64162
|
+
setRange(result);
|
|
64163
|
+
setActiveIdx(-1);
|
|
64164
|
+
if (result.found) {
|
|
64165
|
+
const labels = await onListRange(result.row, Math.min(POPUP_LIMIT, result.count));
|
|
64166
|
+
if (seq !== findSeqRef.current) return;
|
|
64167
|
+
setItems(labels.map((label, i) => ({ row: result.row + i, label })));
|
|
64168
|
+
} else {
|
|
64169
|
+
setItems([]);
|
|
64170
|
+
}
|
|
64171
|
+
} catch {
|
|
64172
|
+
if (seq !== findSeqRef.current) return;
|
|
64173
|
+
setRange(null);
|
|
64174
|
+
setItems([]);
|
|
64175
|
+
}
|
|
64176
|
+
})();
|
|
64177
|
+
}, [onFind, onListRange]);
|
|
64178
|
+
const resetQueryState = React.useCallback(() => {
|
|
64179
|
+
clearTimeout(debounceRef.current);
|
|
64180
|
+
findSeqRef.current++;
|
|
64181
|
+
setRange(null);
|
|
64182
|
+
setItems([]);
|
|
64183
|
+
setActiveIdx(-1);
|
|
64184
|
+
setHint(null);
|
|
64185
|
+
}, []);
|
|
64186
|
+
const handleInput = React.useCallback((text) => {
|
|
64187
|
+
clearTimeout(debounceRef.current);
|
|
64188
|
+
if (text === "") {
|
|
64189
|
+
resetQueryState();
|
|
64190
|
+
onClear == null ? void 0 : onClear();
|
|
64191
|
+
return;
|
|
64192
|
+
}
|
|
64193
|
+
const parsed = parseKeyInput(keyType, text);
|
|
64194
|
+
if (parsed.kind === "hint") {
|
|
64195
|
+
findSeqRef.current++;
|
|
64196
|
+
setRange(null);
|
|
64197
|
+
setItems([]);
|
|
64198
|
+
setActiveIdx(-1);
|
|
64199
|
+
setHint(parsed.hint);
|
|
64200
|
+
return;
|
|
64201
|
+
}
|
|
64202
|
+
setHint(null);
|
|
64203
|
+
debounceRef.current = setTimeout(() => runFind(parsed.query), FIND_DEBOUNCE_MS);
|
|
64204
|
+
}, [keyType, runFind, resetQueryState, onClear]);
|
|
64205
|
+
const clearSearch = React.useCallback(() => {
|
|
64206
|
+
resetQueryState();
|
|
64207
|
+
setResetSeq((s2) => s2 + 1);
|
|
64208
|
+
onClear == null ? void 0 : onClear();
|
|
64209
|
+
}, [resetQueryState, onClear]);
|
|
64210
|
+
const commit = React.useCallback((row) => {
|
|
64211
|
+
onJump(row);
|
|
64212
|
+
if (range !== null) setActiveIdx(row - range.row);
|
|
64213
|
+
}, [onJump, range]);
|
|
64214
|
+
const step3 = React.useCallback((delta) => {
|
|
64215
|
+
if (range === null || !range.found) return;
|
|
64216
|
+
const next2 = Math.max(0, Math.min(range.count - 1, (activeIdx === -1 ? 0 : activeIdx) + delta));
|
|
64217
|
+
commit(range.row + next2);
|
|
64218
|
+
}, [range, activeIdx, commit]);
|
|
64219
|
+
const onKeyDownCapture = React.useCallback((e3) => {
|
|
64220
|
+
if (e3.key !== "Enter" || range === null || !range.found) return;
|
|
64221
|
+
if (document.querySelector('[data-scope="combobox"][data-part="content"] [data-highlighted]') !== null) return;
|
|
64222
|
+
commit(range.row + Math.max(0, activeIdx));
|
|
64223
|
+
}, [range, activeIdx, commit]);
|
|
64224
|
+
const placeholder = React.useMemo(() => {
|
|
64225
|
+
const fields = structFields(keyType);
|
|
64226
|
+
if (fields !== null) return `Search keys (${fields.map((f2) => f2.name).join(", ")})`;
|
|
64227
|
+
return keyType.type === "String" ? "Search keys" : `Find key (${keyType.type})`;
|
|
64228
|
+
}, [keyType]);
|
|
64229
|
+
const payload = React.useMemo(() => ({
|
|
64230
|
+
value: east.none,
|
|
64231
|
+
items: items.map((it) => ({ value: String(it.row), label: it.label, disabled: east.none })),
|
|
64232
|
+
placeholder: east.some(placeholder),
|
|
64233
|
+
multiple: east.none,
|
|
64234
|
+
disabled: east.none,
|
|
64235
|
+
allowCustomValue: east.some(true),
|
|
64236
|
+
onChange: east.some((v3) => commit(Number(v3))),
|
|
64237
|
+
onChangeMultiple: east.none,
|
|
64238
|
+
onInputValueChange: east.some(handleInput),
|
|
64239
|
+
onOpenChange: east.none,
|
|
64240
|
+
style: east.some({ size: east.some(east.variant("xs", null)), color: east.none, background: east.none, borderColor: east.none })
|
|
64241
|
+
}), [items, placeholder, commit, handleInput]);
|
|
64242
|
+
const status = hint !== null ? hint : range === null ? null : !range.found ? "No matches" : activeIdx === -1 ? `${range.count.toLocaleString()} ${range.count === 1 ? "match" : "matches"}` : `${(activeIdx + 1).toLocaleString()} of ${range.count.toLocaleString()}`;
|
|
64243
|
+
const canStep = range !== null && range.found && range.count > 1;
|
|
64244
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 1, align: "center", minW: "0", onKeyDownCapture, "data-part": "dataset-key-search", children: [
|
|
64245
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { width: `min(${placeholder.length + 10}ch, 40rem)`, minW: "12rem", flexShrink: 1, children: /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.EastChakraCombobox, { value: payload, selectionBehavior: "preserve" }, resetSeq) }),
|
|
64246
|
+
status !== null && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "fg.muted", whiteSpace: "nowrap", children: status }),
|
|
64247
|
+
canStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
64248
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64249
|
+
react.IconButton,
|
|
64250
|
+
{
|
|
64251
|
+
"aria-label": "Previous match",
|
|
64252
|
+
size: "2xs",
|
|
64253
|
+
variant: "ghost",
|
|
64254
|
+
disabled: activeIdx <= 0,
|
|
64255
|
+
onClick: () => step3(-1),
|
|
64256
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faChevronUp })
|
|
64257
|
+
}
|
|
64258
|
+
),
|
|
64259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64260
|
+
react.IconButton,
|
|
64261
|
+
{
|
|
64262
|
+
"aria-label": "Next match",
|
|
64263
|
+
size: "2xs",
|
|
64264
|
+
variant: "ghost",
|
|
64265
|
+
disabled: activeIdx >= range.count - 1,
|
|
64266
|
+
onClick: () => step3(1),
|
|
64267
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faChevronDown })
|
|
64268
|
+
}
|
|
64269
|
+
)
|
|
64270
|
+
] }),
|
|
64271
|
+
(range !== null || hint !== null) && /* @__PURE__ */ jsxRuntime.jsx(react.IconButton, { "aria-label": "Clear search", size: "2xs", variant: "ghost", onClick: clearSearch, children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faXmark }) })
|
|
64272
|
+
] });
|
|
64273
|
+
});
|
|
64032
64274
|
function pagingDebug(...args) {
|
|
64033
64275
|
try {
|
|
64034
64276
|
if (typeof localStorage === "undefined") return;
|
|
@@ -64040,6 +64282,17 @@ function pagingDebug(...args) {
|
|
|
64040
64282
|
console.info("[e3-paging]", ...args);
|
|
64041
64283
|
}
|
|
64042
64284
|
const PAGE_SIZE = 500;
|
|
64285
|
+
const MAX_RETAINED_PAGES = 8;
|
|
64286
|
+
function pruneRetainedPages(pages, firstPage, lastPage, max5) {
|
|
64287
|
+
if (pages.size <= max5) return pages;
|
|
64288
|
+
const distance2 = (p2) => p2 < firstPage ? firstPage - p2 : p2 > lastPage ? p2 - lastPage : 0;
|
|
64289
|
+
const keep = [...pages.keys()].sort((a2, b2) => distance2(a2) - distance2(b2) || a2 - b2).slice(0, max5);
|
|
64290
|
+
const kept = /* @__PURE__ */ new Map();
|
|
64291
|
+
for (const p2 of keep.sort((a2, b2) => a2 - b2)) {
|
|
64292
|
+
kept.set(p2, pages.get(p2));
|
|
64293
|
+
}
|
|
64294
|
+
return kept;
|
|
64295
|
+
}
|
|
64043
64296
|
function pageRows(type, decoded, offset) {
|
|
64044
64297
|
if (type.type === "Array") {
|
|
64045
64298
|
const elemType2 = type.value;
|
|
@@ -64083,12 +64336,14 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64083
64336
|
const [totals, setTotals] = React.useState(null);
|
|
64084
64337
|
const [loadingCount, setLoadingCount] = React.useState(0);
|
|
64085
64338
|
const [error3, setError] = React.useState(null);
|
|
64339
|
+
const [jumpRow, setJumpRow] = React.useState(void 0);
|
|
64086
64340
|
const inflightRef = React.useRef(/* @__PURE__ */ new Set());
|
|
64087
64341
|
React.useEffect(() => {
|
|
64088
64342
|
pagingDebug(`reset (path=${path2}, hash=${hash2.slice(0, 8)})`);
|
|
64089
64343
|
setPages(/* @__PURE__ */ new Map());
|
|
64090
64344
|
setTotals(null);
|
|
64091
64345
|
setError(null);
|
|
64346
|
+
setJumpRow(void 0);
|
|
64092
64347
|
inflightRef.current.clear();
|
|
64093
64348
|
}, [path2, hash2]);
|
|
64094
64349
|
const loadPage = React.useCallback((pageIdx) => {
|
|
@@ -64096,13 +64351,13 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64096
64351
|
inflightRef.current.add(pageIdx);
|
|
64097
64352
|
setLoadingCount((n2) => n2 + 1);
|
|
64098
64353
|
pagingDebug(`fetch p${pageIdx} (offset=${pageIdx * PAGE_SIZE}, limit=${PAGE_SIZE}, hash=${hash2.slice(0, 8)})`);
|
|
64099
|
-
const
|
|
64354
|
+
const pathParts2 = path2.split(".").filter(Boolean).map((v3) => east.variant("field", v3));
|
|
64100
64355
|
const reqOpts = requestOptions ?? { token: null };
|
|
64101
64356
|
queryClient.fetchQuery({
|
|
64102
64357
|
queryKey: ["datasetPage", apiUrl, repo, workspace, path2, hash2, `p${pageIdx}`],
|
|
64103
64358
|
// Hash-pinned: the URL is a pure function of the bytes, so any
|
|
64104
64359
|
// HTTP cache between here and the server can hold it immutably.
|
|
64105
|
-
queryFn: () => e3ApiClient.datasetGetPage(apiUrl, repo, workspace,
|
|
64360
|
+
queryFn: () => e3ApiClient.datasetGetPage(apiUrl, repo, workspace, pathParts2, { offset: pageIdx * PAGE_SIZE, limit: PAGE_SIZE, hash: hash2 }, reqOpts),
|
|
64106
64361
|
staleTime: Infinity
|
|
64107
64362
|
// pages of one content hash are immutable
|
|
64108
64363
|
}).then((page) => {
|
|
@@ -64139,8 +64394,35 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64139
64394
|
if (!pages.has(p2)) missing.push(p2);
|
|
64140
64395
|
}
|
|
64141
64396
|
pagingDebug(`need rows [${startRow}, ${endRow}) → pages ${first2}..${last2}, missing=[${missing.join(",")}], inflight=[${[...inflightRef.current].join(",")}]`);
|
|
64397
|
+
setPages((prev2) => pruneRetainedPages(prev2, first2, last2, MAX_RETAINED_PAGES));
|
|
64142
64398
|
for (const p2 of missing) loadPage(p2);
|
|
64143
64399
|
}, [pages, loadPage]);
|
|
64400
|
+
const keyType = React.useMemo(() => type.type === "Dict" ? type.value.key : type.type === "Set" ? type.value : null, [type]);
|
|
64401
|
+
const pathParts = React.useMemo(() => path2.split(".").filter(Boolean).map((v3) => east.variant("field", v3)), [path2]);
|
|
64402
|
+
const onFindKey = React.useCallback(async (query) => {
|
|
64403
|
+
const reqOpts = requestOptions ?? { token: null };
|
|
64404
|
+
const queryTag = JSON.stringify(query);
|
|
64405
|
+
const result = await queryClient.fetchQuery({
|
|
64406
|
+
queryKey: ["datasetFind", apiUrl, repo, workspace, path2, hash2, queryTag],
|
|
64407
|
+
queryFn: () => e3ApiClient.datasetFindKey(apiUrl, repo, workspace, pathParts, { ...query, hash: hash2 }, reqOpts),
|
|
64408
|
+
staleTime: Infinity
|
|
64409
|
+
// hash-pinned: one content hash, one answer
|
|
64410
|
+
});
|
|
64411
|
+
pagingDebug(`find ${queryTag}: found=${result.found} row=${result.row} count=${result.count}`);
|
|
64412
|
+
return result;
|
|
64413
|
+
}, [queryClient, apiUrl, repo, workspace, path2, hash2, pathParts, requestOptions]);
|
|
64414
|
+
const onListRange = React.useCallback(async (row, limit2) => {
|
|
64415
|
+
const reqOpts = requestOptions ?? { token: null };
|
|
64416
|
+
const page = await queryClient.fetchQuery({
|
|
64417
|
+
queryKey: ["datasetPage", apiUrl, repo, workspace, path2, hash2, `w${row}:${limit2}`],
|
|
64418
|
+
queryFn: () => e3ApiClient.datasetGetPage(apiUrl, repo, workspace, pathParts, { offset: row, limit: limit2, hash: hash2 }, reqOpts),
|
|
64419
|
+
staleTime: Infinity
|
|
64420
|
+
});
|
|
64421
|
+
const decoded = east.decodeBeast2For(type)(page.data);
|
|
64422
|
+
const stringKeys = keyType !== null && keyType.type === "String";
|
|
64423
|
+
const keys = type.type === "Dict" ? [...decoded.keys()] : [...decoded.values()];
|
|
64424
|
+
return keys.map((k2) => stringKeys ? k2 : eastUi.ValueTree.keyLabel(keyType, k2));
|
|
64425
|
+
}, [queryClient, apiUrl, repo, workspace, path2, hash2, pathParts, requestOptions, type, keyType]);
|
|
64144
64426
|
const treeValue = React.useMemo(() => ({
|
|
64145
64427
|
root: eastUi.ValueTree.materialize(type, emptyOf(type)),
|
|
64146
64428
|
onEdit: east.none,
|
|
@@ -64153,8 +64435,9 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64153
64435
|
totalRows: totals.elements,
|
|
64154
64436
|
pageSize: PAGE_SIZE,
|
|
64155
64437
|
pages,
|
|
64156
|
-
onNeedRows
|
|
64157
|
-
|
|
64438
|
+
onNeedRows,
|
|
64439
|
+
scrollToRow: jumpRow
|
|
64440
|
+
}, [totals, pages, onNeedRows, jumpRow]);
|
|
64158
64441
|
if (error3 !== null) {
|
|
64159
64442
|
if (error3 instanceof e3ApiClient.ApiError && error3.code === "dataset_too_large") {
|
|
64160
64443
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { height: "100%", direction: "column", align: "center", justify: "center", gap: 3, p: 6, children: [
|
|
@@ -64179,6 +64462,16 @@ const PagedDatasetPreview = React.memo(function PagedDatasetPreview2({
|
|
|
64179
64462
|
formatSize(totals.bytes > 0 ? totals.bytes : sizeBytes)
|
|
64180
64463
|
] }),
|
|
64181
64464
|
loadingCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "fg.muted", children: "Loading…" }),
|
|
64465
|
+
keyType !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
64466
|
+
DatasetKeySearch,
|
|
64467
|
+
{
|
|
64468
|
+
keyType,
|
|
64469
|
+
onFind: onFindKey,
|
|
64470
|
+
onListRange,
|
|
64471
|
+
onJump: setJumpRow,
|
|
64472
|
+
onClear: () => setJumpRow(void 0)
|
|
64473
|
+
}
|
|
64474
|
+
),
|
|
64182
64475
|
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: 1, justify: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(DownloadButton, { onClick: onDownload }) })
|
|
64183
64476
|
] }),
|
|
64184
64477
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, minHeight: 0, overflow: "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.EastChakraValueTree, { value: treeValue, storageKey: `${path2}:page`, paging }) })
|
|
@@ -64250,6 +64543,37 @@ const DatasetPreview = React.memo(function DatasetPreview2({
|
|
|
64250
64543
|
await setMutation.mutateAsync({ path: treePath, data: data4 });
|
|
64251
64544
|
await queryClient.invalidateQueries({ queryKey: ["datasetStatus", apiUrl, repo, workspace, path2] });
|
|
64252
64545
|
}, [apiUrl, repo, workspace, path2, type, setMutation, queryClient]);
|
|
64546
|
+
const keyType = React.useMemo(() => type === void 0 ? null : type.type === "Dict" ? type.value.key : type.type === "Set" ? type.value : null, [type]);
|
|
64547
|
+
const inlineKeys = React.useMemo(() => decoded === void 0 || type === void 0 ? null : type.type === "Dict" ? [...decoded.keys()] : type.type === "Set" ? [...decoded.values()] : null, [type, decoded]);
|
|
64548
|
+
const [jumpRow, setJumpRow] = React.useState(void 0);
|
|
64549
|
+
React.useEffect(() => {
|
|
64550
|
+
setJumpRow(void 0);
|
|
64551
|
+
}, [decoded]);
|
|
64552
|
+
const onFindInline = React.useCallback(async (query) => {
|
|
64553
|
+
if (inlineKeys === null || keyType === null) return { found: false, row: 0, count: 0 };
|
|
64554
|
+
const range = keyRangePredicates(keyType, query);
|
|
64555
|
+
if (range === null) {
|
|
64556
|
+
const parsed = east.parseFor(keyType)(query.key);
|
|
64557
|
+
if (!parsed.success) return { found: false, row: 0, count: 0 };
|
|
64558
|
+
const cmp = east.compareFor(keyType);
|
|
64559
|
+
for (let i = 0; i < inlineKeys.length; i++) {
|
|
64560
|
+
const order = cmp(inlineKeys[i], parsed.value);
|
|
64561
|
+
if (order === 0) return { found: true, row: i, count: 1 };
|
|
64562
|
+
if (order > 0) return { found: false, row: i, count: 0 };
|
|
64563
|
+
}
|
|
64564
|
+
return { found: false, row: inlineKeys.length, count: 0 };
|
|
64565
|
+
}
|
|
64566
|
+
let row = inlineKeys.findIndex(range.lower);
|
|
64567
|
+
if (row === -1) row = inlineKeys.length;
|
|
64568
|
+
let count2 = 0;
|
|
64569
|
+
while (row + count2 < inlineKeys.length && !range.upper(inlineKeys[row + count2])) count2++;
|
|
64570
|
+
return { found: count2 > 0, row, count: count2 };
|
|
64571
|
+
}, [inlineKeys, keyType]);
|
|
64572
|
+
const onListInline = React.useCallback(async (row, limit2) => {
|
|
64573
|
+
if (inlineKeys === null || keyType === null) return [];
|
|
64574
|
+
const stringKeys = keyType.type === "String";
|
|
64575
|
+
return inlineKeys.slice(row, row + limit2).map((k2) => stringKeys ? k2 : eastUi.ValueTree.keyLabel(keyType, k2));
|
|
64576
|
+
}, [inlineKeys, keyType]);
|
|
64253
64577
|
const treeValue = React.useMemo(() => {
|
|
64254
64578
|
if (type === void 0 || decoded === void 0) return null;
|
|
64255
64579
|
const root2 = eastUi.ValueTree.materialize(type, decoded);
|
|
@@ -64304,14 +64628,26 @@ const DatasetPreview = React.memo(function DatasetPreview2({
|
|
|
64304
64628
|
const count = type === void 0 || decoded === void 0 ? null : type.type === "Array" ? decoded.length : type.type === "Set" || type.type === "Dict" ? decoded.size : null;
|
|
64305
64629
|
const countText = count === null ? "" : `${count.toLocaleString()} ${(type == null ? void 0 : type.type) === "Dict" ? "entries" : "items"} · `;
|
|
64306
64630
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: "column", height: "100%", overflow: "hidden", children: [
|
|
64307
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { px: 4, py: 2,
|
|
64308
|
-
|
|
64309
|
-
|
|
64310
|
-
|
|
64311
|
-
|
|
64312
|
-
|
|
64631
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { px: 4, py: 2, gap: 2, align: "center", flexShrink: 0, borderBottom: "1px solid", borderColor: "border.subtle", children: [
|
|
64632
|
+
keyType !== null && inlineKeys !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
64633
|
+
DatasetKeySearch,
|
|
64634
|
+
{
|
|
64635
|
+
keyType,
|
|
64636
|
+
onFind: onFindInline,
|
|
64637
|
+
onListRange: onListInline,
|
|
64638
|
+
onJump: setJumpRow,
|
|
64639
|
+
onClear: () => setJumpRow(void 0)
|
|
64640
|
+
}
|
|
64641
|
+
),
|
|
64642
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { flex: 1, justify: "flex-end", align: "center", gap: 2, children: [
|
|
64643
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "xs", color: "fg.muted", children: [
|
|
64644
|
+
countText,
|
|
64645
|
+
formatSize(sizeBytes)
|
|
64646
|
+
] }),
|
|
64647
|
+
/* @__PURE__ */ jsxRuntime.jsx(DownloadButton, { onClick: download })
|
|
64648
|
+
] })
|
|
64313
64649
|
] }),
|
|
64314
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, minHeight: 0, overflow: "hidden", children: treeValue !== null && /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.EastChakraValueTree, { value: treeValue, storageKey: path2 ?? "value" }) })
|
|
64650
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: 1, minHeight: 0, overflow: "hidden", children: treeValue !== null && /* @__PURE__ */ jsxRuntime.jsx(eastUiComponents.EastChakraValueTree, { value: treeValue, storageKey: path2 ?? "value", scrollToRow: jumpRow }) })
|
|
64315
64651
|
] });
|
|
64316
64652
|
});
|
|
64317
64653
|
const InputPreview = React.memo(function InputPreview2({
|
|
@@ -64457,10 +64793,10 @@ function HighlightedLine({
|
|
|
64457
64793
|
"span",
|
|
64458
64794
|
{
|
|
64459
64795
|
style: {
|
|
64460
|
-
backgroundColor: isCurrent ? "
|
|
64461
|
-
color: "
|
|
64796
|
+
backgroundColor: isCurrent ? "var(--chakra-colors-status-warn)" : "var(--chakra-colors-status-warn-subtle-strong)",
|
|
64797
|
+
color: "var(--chakra-colors-fg-default)",
|
|
64462
64798
|
borderRadius: "2px",
|
|
64463
|
-
outline: isCurrent ? "2px solid
|
|
64799
|
+
outline: isCurrent ? "2px solid var(--chakra-colors-status-warn)" : void 0
|
|
64464
64800
|
},
|
|
64465
64801
|
children: text.slice(match2.start, match2.end)
|
|
64466
64802
|
},
|
|
@@ -64613,7 +64949,7 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64613
64949
|
{
|
|
64614
64950
|
px: 3,
|
|
64615
64951
|
py: 2,
|
|
64616
|
-
bg: "
|
|
64952
|
+
bg: "bg.inverse",
|
|
64617
64953
|
borderTopRadius: "md",
|
|
64618
64954
|
align: "center",
|
|
64619
64955
|
justify: "space-between",
|
|
@@ -64621,8 +64957,8 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64621
64957
|
gap: 2,
|
|
64622
64958
|
children: [
|
|
64623
64959
|
/* @__PURE__ */ jsxRuntime.jsx(react.Tabs.RootProvider, { value: tabs, size: "sm", variant: "line", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Tabs.List, { borderBottom: "none", children: [
|
|
64624
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Trigger, { value: "stdout", color: "
|
|
64625
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Trigger, { value: "stderr", color: "
|
|
64960
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Trigger, { value: "stdout", color: "fg.subtle", _selected: { color: "fg.inverse" }, children: "stdout" }),
|
|
64961
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Trigger, { value: "stderr", color: "fg.subtle", _selected: { color: "fg.inverse" }, children: "stderr" })
|
|
64626
64962
|
] }) }),
|
|
64627
64963
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { align: "center", gap: 1, children: [
|
|
64628
64964
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -64633,22 +64969,22 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64633
64969
|
value: searchQuery,
|
|
64634
64970
|
onChange: (e3) => setSearchQuery(e3.target.value),
|
|
64635
64971
|
onKeyDown: handleSearchKeyDown,
|
|
64636
|
-
bg: "
|
|
64972
|
+
bg: "bg.inverse",
|
|
64637
64973
|
border: "none",
|
|
64638
|
-
color: "
|
|
64639
|
-
_placeholder: { color: "
|
|
64974
|
+
color: "fg.inverse",
|
|
64975
|
+
_placeholder: { color: "fg.subtle" },
|
|
64640
64976
|
width: "min(150px, 40vw)"
|
|
64641
64977
|
}
|
|
64642
64978
|
),
|
|
64643
|
-
searchQuery && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "
|
|
64979
|
+
searchQuery && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "fg.subtle", minWidth: "50px", textAlign: "center", children: matches33.length > 0 ? `${currentMatchIndex + 1}/${matches33.length}` : "0/0" }),
|
|
64644
64980
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64645
64981
|
react.IconButton,
|
|
64646
64982
|
{
|
|
64647
64983
|
variant: "ghost",
|
|
64648
64984
|
size: "xs",
|
|
64649
64985
|
onClick: handlePrevMatch,
|
|
64650
|
-
color: "
|
|
64651
|
-
_hover: { color: "
|
|
64986
|
+
color: "fg.subtle",
|
|
64987
|
+
_hover: { color: "fg.inverse" },
|
|
64652
64988
|
"aria-label": "Previous match",
|
|
64653
64989
|
disabled: matches33.length === 0,
|
|
64654
64990
|
children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faChevronUp })
|
|
@@ -64660,8 +64996,8 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64660
64996
|
variant: "ghost",
|
|
64661
64997
|
size: "xs",
|
|
64662
64998
|
onClick: handleNextMatch,
|
|
64663
|
-
color: "
|
|
64664
|
-
_hover: { color: "
|
|
64999
|
+
color: "fg.subtle",
|
|
65000
|
+
_hover: { color: "fg.inverse" },
|
|
64665
65001
|
"aria-label": "Next match",
|
|
64666
65002
|
disabled: matches33.length === 0,
|
|
64667
65003
|
children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faChevronDown })
|
|
@@ -64673,8 +65009,8 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64673
65009
|
variant: "ghost",
|
|
64674
65010
|
size: "xs",
|
|
64675
65011
|
onClick: handleCopy,
|
|
64676
|
-
color: "
|
|
64677
|
-
_hover: { color: "
|
|
65012
|
+
color: "fg.subtle",
|
|
65013
|
+
_hover: { color: "fg.inverse" },
|
|
64678
65014
|
"aria-label": "Copy logs",
|
|
64679
65015
|
children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: copied ? faCheck : faCopy })
|
|
64680
65016
|
}
|
|
@@ -64695,7 +65031,7 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64695
65031
|
borderTopWidth: "0",
|
|
64696
65032
|
fontFamily: "mono",
|
|
64697
65033
|
fontSize: "sm",
|
|
64698
|
-
color: "
|
|
65034
|
+
color: "fg.inverse",
|
|
64699
65035
|
onScroll: handleScroll,
|
|
64700
65036
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
64701
65037
|
"div",
|
|
@@ -64720,12 +65056,12 @@ function VirtualizedLogViewer({ content, tabs }) {
|
|
|
64720
65056
|
height: `${virtualItem.size}px`,
|
|
64721
65057
|
transform: `translateY(${virtualItem.start}px)`
|
|
64722
65058
|
},
|
|
64723
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { px: 3, py: 0.5, _hover: { bg: "
|
|
65059
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { px: 3, py: 0.5, _hover: { bg: "bg.inverse" }, children: [
|
|
64724
65060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64725
65061
|
react.Text,
|
|
64726
65062
|
{
|
|
64727
65063
|
as: "span",
|
|
64728
|
-
color: "
|
|
65064
|
+
color: "fg.muted",
|
|
64729
65065
|
minWidth: "50px",
|
|
64730
65066
|
textAlign: "right",
|
|
64731
65067
|
mr: 3,
|
|
@@ -65023,20 +65359,20 @@ function ValueNode({
|
|
|
65023
65359
|
}) {
|
|
65024
65360
|
if (depth > 20) {
|
|
65025
65361
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65026
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65362
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65027
65363
|
label,
|
|
65028
65364
|
":"
|
|
65029
65365
|
] }),
|
|
65030
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65366
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "[max depth reached]" })
|
|
65031
65367
|
] });
|
|
65032
65368
|
}
|
|
65033
65369
|
if (isPrimitive(type)) {
|
|
65034
65370
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65035
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65371
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65036
65372
|
label,
|
|
65037
65373
|
":"
|
|
65038
65374
|
] }),
|
|
65039
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: type.type === "String" ? "
|
|
65375
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: type.type === "String" ? "fg.success" : type.type === "Integer" || type.type === "Float" ? "link" : "fg.muted", children: formatPrimitive(type, value) }),
|
|
65040
65376
|
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "gray", variant: "subtle", children: type.type })
|
|
65041
65377
|
] });
|
|
65042
65378
|
}
|
|
@@ -65046,28 +65382,28 @@ function ValueNode({
|
|
|
65046
65382
|
const elementType = type.value;
|
|
65047
65383
|
if (items.length === 0) {
|
|
65048
65384
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65049
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65385
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65050
65386
|
label,
|
|
65051
65387
|
":"
|
|
65052
65388
|
] }),
|
|
65053
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65054
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65389
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "[]" }),
|
|
65390
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: "Array[0]" })
|
|
65055
65391
|
] });
|
|
65056
65392
|
}
|
|
65057
65393
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65058
65394
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65059
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65395
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65060
65396
|
label,
|
|
65061
65397
|
":"
|
|
65062
65398
|
] }),
|
|
65063
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65399
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: typeLabel })
|
|
65064
65400
|
] }),
|
|
65065
65401
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { pl: 4, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
65066
65402
|
react.Box,
|
|
65067
65403
|
{
|
|
65068
65404
|
py: 1,
|
|
65069
65405
|
borderBottom: index2 < items.length - 1 ? "1px solid" : void 0,
|
|
65070
|
-
borderColor: "
|
|
65406
|
+
borderColor: "border.strong",
|
|
65071
65407
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
65072
65408
|
ValueNode,
|
|
65073
65409
|
{
|
|
@@ -65087,21 +65423,21 @@ function ValueNode({
|
|
|
65087
65423
|
const obj = value;
|
|
65088
65424
|
if (fields.length === 0) {
|
|
65089
65425
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65090
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65426
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65091
65427
|
label,
|
|
65092
65428
|
":"
|
|
65093
65429
|
] }),
|
|
65094
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65095
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65430
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "{}" }),
|
|
65431
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "warning", variant: "subtle", children: "Struct" })
|
|
65096
65432
|
] });
|
|
65097
65433
|
}
|
|
65098
65434
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65099
65435
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65100
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65436
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65101
65437
|
label,
|
|
65102
65438
|
":"
|
|
65103
65439
|
] }),
|
|
65104
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65440
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "warning", variant: "subtle", children: typeLabel })
|
|
65105
65441
|
] }),
|
|
65106
65442
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { pl: 4, children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
65107
65443
|
ValueNode,
|
|
@@ -65121,11 +65457,11 @@ function ValueNode({
|
|
|
65121
65457
|
const activeCase = cases.find((c2) => c2.name === variant.type);
|
|
65122
65458
|
if (!activeCase) {
|
|
65123
65459
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65124
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65460
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65125
65461
|
label,
|
|
65126
65462
|
":"
|
|
65127
65463
|
] }),
|
|
65128
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "
|
|
65464
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "fg.danger", children: [
|
|
65129
65465
|
"Unknown variant: ",
|
|
65130
65466
|
variant.type
|
|
65131
65467
|
] })
|
|
@@ -65133,11 +65469,11 @@ function ValueNode({
|
|
|
65133
65469
|
}
|
|
65134
65470
|
if (activeCase.type.type === "Null") {
|
|
65135
65471
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65136
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65472
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65137
65473
|
label,
|
|
65138
65474
|
":"
|
|
65139
65475
|
] }),
|
|
65140
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Badge, { size: "xs", colorPalette: "
|
|
65476
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: [
|
|
65141
65477
|
".",
|
|
65142
65478
|
variant.type
|
|
65143
65479
|
] })
|
|
@@ -65145,11 +65481,11 @@ function ValueNode({
|
|
|
65145
65481
|
}
|
|
65146
65482
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65147
65483
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65148
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65484
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65149
65485
|
label,
|
|
65150
65486
|
":"
|
|
65151
65487
|
] }),
|
|
65152
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Badge, { size: "xs", colorPalette: "
|
|
65488
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: [
|
|
65153
65489
|
".",
|
|
65154
65490
|
variant.type
|
|
65155
65491
|
] })
|
|
@@ -65170,29 +65506,29 @@ function ValueNode({
|
|
|
65170
65506
|
const valueType = type.value.value;
|
|
65171
65507
|
if (map3.size === 0) {
|
|
65172
65508
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65173
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65509
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65174
65510
|
label,
|
|
65175
65511
|
":"
|
|
65176
65512
|
] }),
|
|
65177
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65178
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65513
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "Map{}" }),
|
|
65514
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "info", variant: "subtle", children: "Dict[0]" })
|
|
65179
65515
|
] });
|
|
65180
65516
|
}
|
|
65181
65517
|
const entries = Array.from(map3.entries());
|
|
65182
65518
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65183
65519
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65184
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65520
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65185
65521
|
label,
|
|
65186
65522
|
":"
|
|
65187
65523
|
] }),
|
|
65188
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65524
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "info", variant: "subtle", children: typeLabel })
|
|
65189
65525
|
] }),
|
|
65190
65526
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { pl: 4, children: entries.map(([k2, v3], i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
65191
65527
|
react.Box,
|
|
65192
65528
|
{
|
|
65193
65529
|
py: 2,
|
|
65194
65530
|
borderBottom: i < entries.length - 1 ? "1px solid" : void 0,
|
|
65195
|
-
borderColor: "
|
|
65531
|
+
borderColor: "border.strong",
|
|
65196
65532
|
children: [
|
|
65197
65533
|
/* @__PURE__ */ jsxRuntime.jsx(ValueNode, { type: keyType, value: k2, depth: depth + 1 }),
|
|
65198
65534
|
/* @__PURE__ */ jsxRuntime.jsx(ValueNode, { type: valueType, value: v3, depth: depth + 1 })
|
|
@@ -65207,29 +65543,29 @@ function ValueNode({
|
|
|
65207
65543
|
const elementType = type.value;
|
|
65208
65544
|
if (set3.size === 0) {
|
|
65209
65545
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65210
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65546
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65211
65547
|
label,
|
|
65212
65548
|
":"
|
|
65213
65549
|
] }),
|
|
65214
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65215
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65550
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "Set{}" }),
|
|
65551
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: "Set[0]" })
|
|
65216
65552
|
] });
|
|
65217
65553
|
}
|
|
65218
65554
|
const items = Array.from(set3);
|
|
65219
65555
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65220
65556
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65221
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65557
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65222
65558
|
label,
|
|
65223
65559
|
":"
|
|
65224
65560
|
] }),
|
|
65225
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65561
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "brand", variant: "subtle", children: typeLabel })
|
|
65226
65562
|
] }),
|
|
65227
65563
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { pl: 4, children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
65228
65564
|
react.Box,
|
|
65229
65565
|
{
|
|
65230
65566
|
py: 1,
|
|
65231
65567
|
borderBottom: i < items.length - 1 ? "1px solid" : void 0,
|
|
65232
|
-
borderColor: "
|
|
65568
|
+
borderColor: "border.strong",
|
|
65233
65569
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
65234
65570
|
ValueNode,
|
|
65235
65571
|
{
|
|
@@ -65247,11 +65583,11 @@ function ValueNode({
|
|
|
65247
65583
|
const ref = value;
|
|
65248
65584
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
65249
65585
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { style: { cursor: "pointer", padding: "2px 0", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
65250
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65586
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65251
65587
|
label,
|
|
65252
65588
|
":"
|
|
65253
65589
|
] }),
|
|
65254
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "
|
|
65590
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "danger", variant: "subtle", children: "Ref" })
|
|
65255
65591
|
] }),
|
|
65256
65592
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { pl: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
65257
65593
|
ValueNode,
|
|
@@ -65265,20 +65601,20 @@ function ValueNode({
|
|
|
65265
65601
|
}
|
|
65266
65602
|
if (type.type === "Function" || type.type === "AsyncFunction") {
|
|
65267
65603
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65268
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65604
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65269
65605
|
label,
|
|
65270
65606
|
":"
|
|
65271
65607
|
] }),
|
|
65272
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "
|
|
65608
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.muted", children: "[function]" }),
|
|
65273
65609
|
/* @__PURE__ */ jsxRuntime.jsx(react.Badge, { size: "xs", colorPalette: "gray", variant: "subtle", children: type.type })
|
|
65274
65610
|
] });
|
|
65275
65611
|
}
|
|
65276
65612
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { py: 0.5, display: "flex", alignItems: "center", gap: 2, children: [
|
|
65277
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "purple
|
|
65613
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "accent.purple", fontWeight: "medium", children: [
|
|
65278
65614
|
label,
|
|
65279
65615
|
":"
|
|
65280
65616
|
] }),
|
|
65281
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "
|
|
65617
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", color: "fg.muted", children: [
|
|
65282
65618
|
"[",
|
|
65283
65619
|
type.type,
|
|
65284
65620
|
"]"
|
|
@@ -65302,6 +65638,7 @@ function EastValueViewer({ type, value }) {
|
|
|
65302
65638
|
exports.BindPlatform = BindPlatform;
|
|
65303
65639
|
exports.BindRuntime = BindRuntime;
|
|
65304
65640
|
exports.DataTaskPreview = DataTaskPreview;
|
|
65641
|
+
exports.DatasetKeySearch = DatasetKeySearch;
|
|
65305
65642
|
exports.DatasetPreview = DatasetPreview;
|
|
65306
65643
|
exports.E3Provider = E3Provider;
|
|
65307
65644
|
exports.EastChakraDecisionJournal = EastChakraDecisionJournal;
|