@industry-theme/principal-view-panels 0.12.68 → 0.12.70
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":"TraceList.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TraceList.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAe,MAAM,wBAAwB,CAAC;AAkP5F,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjI,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6FAA6F;IAC7F,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,mDAAmD;IACnD,0BAA0B,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/E,gDAAgD;IAChD,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACjD,gDAAgD;IAChD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0mB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,wBAAwB,EAAwB,MAAM,UAAU,CAAC;AA+C/E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAu2D7D,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -99263,6 +99263,7 @@ const SavePatternModal = ({
|
|
|
99263
99263
|
}) => {
|
|
99264
99264
|
const [name2, setName] = useState(trace2.name || "New Pattern");
|
|
99265
99265
|
const [description, setDescription] = useState("");
|
|
99266
|
+
const [hideByDefault, setHideByDefault] = useState(true);
|
|
99266
99267
|
const fingerprint = useMemo(() => extractTraceFingerprint(trace2), [trace2]);
|
|
99267
99268
|
const renderSpanPattern = (pattern, depth = 0) => {
|
|
99268
99269
|
var _a;
|
|
@@ -99272,7 +99273,7 @@ const SavePatternModal = ({
|
|
|
99272
99273
|
color: theme2.colors.text,
|
|
99273
99274
|
fontFamily: theme2.fonts.monospace
|
|
99274
99275
|
}, children: pattern.name }),
|
|
99275
|
-
(_a = pattern.children) == null ? void 0 : _a.map((child
|
|
99276
|
+
(_a = pattern.children) == null ? void 0 : _a.map((child) => renderSpanPattern(child, depth + 1))
|
|
99276
99277
|
] }, `${pattern.name}-${depth}`);
|
|
99277
99278
|
};
|
|
99278
99279
|
return /* @__PURE__ */ jsx(
|
|
@@ -99392,7 +99393,35 @@ const SavePatternModal = ({
|
|
|
99392
99393
|
borderRadius: "4px",
|
|
99393
99394
|
maxHeight: "150px",
|
|
99394
99395
|
overflow: "auto"
|
|
99395
|
-
}, children: fingerprint.length > 0 ? fingerprint.map((pattern
|
|
99396
|
+
}, children: fingerprint.length > 0 ? fingerprint.map((pattern) => renderSpanPattern(pattern, 0)) : /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textMuted, fontSize: theme2.fontSizes[1] }, children: "No spans to capture" }) })
|
|
99397
|
+
] }),
|
|
99398
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "20px" }, children: [
|
|
99399
|
+
/* @__PURE__ */ jsxs("label", { style: {
|
|
99400
|
+
display: "flex",
|
|
99401
|
+
alignItems: "center",
|
|
99402
|
+
gap: "8px",
|
|
99403
|
+
cursor: "pointer",
|
|
99404
|
+
fontSize: theme2.fontSizes[1],
|
|
99405
|
+
fontFamily: theme2.fonts.body,
|
|
99406
|
+
color: theme2.colors.text
|
|
99407
|
+
}, children: [
|
|
99408
|
+
/* @__PURE__ */ jsx(
|
|
99409
|
+
"input",
|
|
99410
|
+
{
|
|
99411
|
+
type: "checkbox",
|
|
99412
|
+
checked: hideByDefault,
|
|
99413
|
+
onChange: (e) => setHideByDefault(e.target.checked),
|
|
99414
|
+
style: { width: "16px", height: "16px", cursor: "pointer" }
|
|
99415
|
+
}
|
|
99416
|
+
),
|
|
99417
|
+
"Hide matching traces by default"
|
|
99418
|
+
] }),
|
|
99419
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
99420
|
+
marginTop: "4px",
|
|
99421
|
+
marginLeft: "24px",
|
|
99422
|
+
fontSize: theme2.fontSizes[0],
|
|
99423
|
+
color: theme2.colors.textSecondary
|
|
99424
|
+
}, children: hideByDefault ? "Traces matching this pattern will be filtered out of the list" : "Traces will remain visible but show the pattern badge" })
|
|
99396
99425
|
] }),
|
|
99397
99426
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end" }, children: [
|
|
99398
99427
|
/* @__PURE__ */ jsx(
|
|
@@ -99415,7 +99444,7 @@ const SavePatternModal = ({
|
|
|
99415
99444
|
/* @__PURE__ */ jsx(
|
|
99416
99445
|
"button",
|
|
99417
99446
|
{
|
|
99418
|
-
onClick: () => onSave(name2, description),
|
|
99447
|
+
onClick: () => onSave(name2, description, hideByDefault),
|
|
99419
99448
|
disabled: isSaving || !name2.trim(),
|
|
99420
99449
|
style: {
|
|
99421
99450
|
padding: "8px 16px",
|
|
@@ -99463,11 +99492,11 @@ const TraceList = ({
|
|
|
99463
99492
|
e.preventDefault();
|
|
99464
99493
|
setModalTraceId(trace2.traceId);
|
|
99465
99494
|
};
|
|
99466
|
-
const handleSavePattern = async (name2, description) => {
|
|
99495
|
+
const handleSavePattern = async (name2, description, hideByDefault) => {
|
|
99467
99496
|
if (!onSaveAsPattern || !modalTrace) return;
|
|
99468
99497
|
setSavingPatternForTraceId(modalTrace.traceId);
|
|
99469
99498
|
try {
|
|
99470
|
-
const pattern = createPatternFromTrace(modalTrace, name2, description);
|
|
99499
|
+
const pattern = createPatternFromTrace(modalTrace, name2, description, hideByDefault);
|
|
99471
99500
|
await onSaveAsPattern(pattern);
|
|
99472
99501
|
setModalTraceId(null);
|
|
99473
99502
|
} catch (err) {
|
|
@@ -100992,6 +101021,24 @@ function useTracePatterns({
|
|
|
100992
101021
|
patternsFilePath
|
|
100993
101022
|
};
|
|
100994
101023
|
}
|
|
101024
|
+
const SpanPatternTree = ({ pattern, theme: theme2, depth }) => {
|
|
101025
|
+
var _a;
|
|
101026
|
+
return /* @__PURE__ */ jsxs("div", { style: { marginLeft: depth * 16 }, children: [
|
|
101027
|
+
/* @__PURE__ */ jsxs("code", { style: {
|
|
101028
|
+
fontFamily: theme2.fonts.monospace,
|
|
101029
|
+
fontSize: theme2.fontSizes[0],
|
|
101030
|
+
color: theme2.colors.text
|
|
101031
|
+
}, children: [
|
|
101032
|
+
pattern.name,
|
|
101033
|
+
pattern.nameMatch && pattern.nameMatch !== "exact" && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textMuted }, children: [
|
|
101034
|
+
" (",
|
|
101035
|
+
pattern.nameMatch,
|
|
101036
|
+
")"
|
|
101037
|
+
] })
|
|
101038
|
+
] }),
|
|
101039
|
+
(_a = pattern.children) == null ? void 0 : _a.map((child, i) => /* @__PURE__ */ jsx(SpanPatternTree, { pattern: child, theme: theme2, depth: depth + 1 }, i))
|
|
101040
|
+
] });
|
|
101041
|
+
};
|
|
100995
101042
|
const TraceListPanel = ({
|
|
100996
101043
|
context: context2,
|
|
100997
101044
|
actions,
|
|
@@ -101099,12 +101146,14 @@ const TraceListPanel = ({
|
|
|
101099
101146
|
}, [versionSnapshots, scenarioTraceSet]);
|
|
101100
101147
|
const [scenarioVisibilityMap, setScenarioVisibilityMap] = useState({});
|
|
101101
101148
|
const [patternVisibilityMap, setPatternVisibilityMap] = useState({});
|
|
101149
|
+
const [expandedPatternIds, setExpandedPatternIds] = useState(/* @__PURE__ */ new Set());
|
|
101102
101150
|
const repositoryPath = (_b = (_a = context2.currentScope) == null ? void 0 : _a.repository) == null ? void 0 : _b.path;
|
|
101103
101151
|
const readFile = actions.readFile;
|
|
101104
101152
|
const writeFile = (_d = (_c = context2.adapters) == null ? void 0 : _c.fileSystem) == null ? void 0 : _d.writeFile;
|
|
101105
101153
|
const {
|
|
101106
101154
|
patterns: tracePatterns,
|
|
101107
|
-
savePattern
|
|
101155
|
+
savePattern,
|
|
101156
|
+
removePattern
|
|
101108
101157
|
} = useTracePatterns({
|
|
101109
101158
|
repositoryPath,
|
|
101110
101159
|
readFile,
|
|
@@ -101181,6 +101230,60 @@ const TraceListPanel = ({
|
|
|
101181
101230
|
},
|
|
101182
101231
|
[actions, versionSnapshots]
|
|
101183
101232
|
);
|
|
101233
|
+
const handlePatternVisibilityToggle = React__default.useCallback(
|
|
101234
|
+
async (patternId, isVisible) => {
|
|
101235
|
+
setPatternVisibilityMap((prev) => ({
|
|
101236
|
+
...prev,
|
|
101237
|
+
[patternId]: isVisible
|
|
101238
|
+
}));
|
|
101239
|
+
const pattern = tracePatterns.find((p2) => p2.id === patternId);
|
|
101240
|
+
if (pattern && savePattern) {
|
|
101241
|
+
try {
|
|
101242
|
+
await savePattern({
|
|
101243
|
+
...pattern,
|
|
101244
|
+
filterDefault: !isVisible
|
|
101245
|
+
// filterDefault is inverse of visibility
|
|
101246
|
+
});
|
|
101247
|
+
} catch (error) {
|
|
101248
|
+
console.error("[TraceListPanel] Failed to update pattern filterDefault:", error);
|
|
101249
|
+
setPatternVisibilityMap((prev) => ({
|
|
101250
|
+
...prev,
|
|
101251
|
+
[patternId]: !isVisible
|
|
101252
|
+
}));
|
|
101253
|
+
}
|
|
101254
|
+
}
|
|
101255
|
+
},
|
|
101256
|
+
[tracePatterns, savePattern]
|
|
101257
|
+
);
|
|
101258
|
+
const handlePatternClick = React__default.useCallback((patternId) => {
|
|
101259
|
+
setExpandedPatternIds((prev) => {
|
|
101260
|
+
const newSet = new Set(prev);
|
|
101261
|
+
if (newSet.has(patternId)) {
|
|
101262
|
+
newSet.delete(patternId);
|
|
101263
|
+
} else {
|
|
101264
|
+
newSet.add(patternId);
|
|
101265
|
+
}
|
|
101266
|
+
return newSet;
|
|
101267
|
+
});
|
|
101268
|
+
}, []);
|
|
101269
|
+
const handlePatternDelete = React__default.useCallback(
|
|
101270
|
+
async (patternId) => {
|
|
101271
|
+
if (!removePattern) return;
|
|
101272
|
+
try {
|
|
101273
|
+
await removePattern(patternId);
|
|
101274
|
+
} catch (error) {
|
|
101275
|
+
console.error("[TraceListPanel] Failed to delete pattern:", error);
|
|
101276
|
+
}
|
|
101277
|
+
},
|
|
101278
|
+
[removePattern]
|
|
101279
|
+
);
|
|
101280
|
+
const patternTraceCounts = useMemo(() => {
|
|
101281
|
+
const counts = {};
|
|
101282
|
+
patternMatches.forEach((match) => {
|
|
101283
|
+
counts[match.patternId] = (counts[match.patternId] || 0) + 1;
|
|
101284
|
+
});
|
|
101285
|
+
return counts;
|
|
101286
|
+
}, [patternMatches]);
|
|
101184
101287
|
const filteredTraces = React__default.useMemo(() => {
|
|
101185
101288
|
return traces.filter((trace2) => {
|
|
101186
101289
|
const hasScenarioMatches = trace2.scenarioMatches && trace2.scenarioMatches.length > 0;
|
|
@@ -101849,7 +101952,7 @@ const TraceListPanel = ({
|
|
|
101849
101952
|
"button",
|
|
101850
101953
|
{
|
|
101851
101954
|
onClick: () => setActiveTab("schematics"),
|
|
101852
|
-
title: "
|
|
101955
|
+
title: "Manifest",
|
|
101853
101956
|
style: {
|
|
101854
101957
|
flex: 1,
|
|
101855
101958
|
height: "100%",
|
|
@@ -101869,7 +101972,7 @@ const TraceListPanel = ({
|
|
|
101869
101972
|
justifyContent: "center",
|
|
101870
101973
|
gap: "6px"
|
|
101871
101974
|
},
|
|
101872
|
-
children: isCompactTabs ? /* @__PURE__ */ jsx(GitBranch, { size: 16 }) : "
|
|
101975
|
+
children: isCompactTabs ? /* @__PURE__ */ jsx(GitBranch, { size: 16 }) : "Manifest"
|
|
101873
101976
|
}
|
|
101874
101977
|
)
|
|
101875
101978
|
]
|
|
@@ -101947,7 +102050,7 @@ const TraceListPanel = ({
|
|
|
101947
102050
|
onRemoveTrace: handleRemoveTrace,
|
|
101948
102051
|
onClearAll: handleClearAll,
|
|
101949
102052
|
expandedTraceIds,
|
|
101950
|
-
emptyMessage: traces.length === 0 ? "No traces received yet. Waiting for telemetry data..." : filteredTraces.length === 0 ? traceFilterMode === "known" ? 'No known traces. Switch to "All" or "Unknown" to see unmatched traces.' : traceFilterMode === "unknown" ? "No unknown traces. All traces have been matched to scenarios." : "All traces filtered by scenario visibility. Toggle scenarios in
|
|
102053
|
+
emptyMessage: traces.length === 0 ? "No traces received yet. Waiting for telemetry data..." : filteredTraces.length === 0 ? traceFilterMode === "known" ? 'No known traces. Switch to "All" or "Unknown" to see unmatched traces.' : traceFilterMode === "unknown" ? "No unknown traces. All traces have been matched to scenarios." : "All traces filtered by scenario visibility. Toggle scenarios in Manifest tab." : void 0,
|
|
101951
102054
|
scenarioVisibilityMap,
|
|
101952
102055
|
onScenarioVisibilityToggle: handleScenarioVisibilityToggle,
|
|
101953
102056
|
patternMatches,
|
|
@@ -102335,6 +102438,163 @@ const TraceListPanel = ({
|
|
|
102335
102438
|
})
|
|
102336
102439
|
}
|
|
102337
102440
|
),
|
|
102441
|
+
tracePatterns.length > 0 && /* @__PURE__ */ jsxs("div", { style: { borderBottom: `1px solid ${theme2.colors.border}` }, children: [
|
|
102442
|
+
/* @__PURE__ */ jsxs(
|
|
102443
|
+
"div",
|
|
102444
|
+
{
|
|
102445
|
+
style: {
|
|
102446
|
+
padding: "12px 16px",
|
|
102447
|
+
display: "flex",
|
|
102448
|
+
alignItems: "center",
|
|
102449
|
+
gap: "8px",
|
|
102450
|
+
backgroundColor: theme2.colors.backgroundSecondary
|
|
102451
|
+
},
|
|
102452
|
+
children: [
|
|
102453
|
+
/* @__PURE__ */ jsx(Bookmark, { size: 16, color: "#06b6d4" }),
|
|
102454
|
+
/* @__PURE__ */ jsxs("span", { style: {
|
|
102455
|
+
fontFamily: theme2.fonts.body,
|
|
102456
|
+
fontSize: theme2.fontSizes[2],
|
|
102457
|
+
fontWeight: theme2.fontWeights.medium,
|
|
102458
|
+
color: theme2.colors.text
|
|
102459
|
+
}, children: [
|
|
102460
|
+
"Patterns (",
|
|
102461
|
+
tracePatterns.length,
|
|
102462
|
+
")"
|
|
102463
|
+
] })
|
|
102464
|
+
]
|
|
102465
|
+
}
|
|
102466
|
+
),
|
|
102467
|
+
tracePatterns.map((pattern) => {
|
|
102468
|
+
const isExpanded = expandedPatternIds.has(pattern.id);
|
|
102469
|
+
const isVisible = patternVisibilityMap[pattern.id] !== false;
|
|
102470
|
+
const traceCount = patternTraceCounts[pattern.id] || 0;
|
|
102471
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
102472
|
+
/* @__PURE__ */ jsxs(
|
|
102473
|
+
"div",
|
|
102474
|
+
{
|
|
102475
|
+
onClick: () => handlePatternClick(pattern.id),
|
|
102476
|
+
style: {
|
|
102477
|
+
padding: "10px 16px",
|
|
102478
|
+
display: "flex",
|
|
102479
|
+
alignItems: "center",
|
|
102480
|
+
gap: "8px",
|
|
102481
|
+
cursor: "pointer",
|
|
102482
|
+
backgroundColor: isExpanded ? `${theme2.colors.primary}10` : "transparent",
|
|
102483
|
+
borderLeft: isExpanded ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
|
|
102484
|
+
transition: "background-color 0.15s"
|
|
102485
|
+
},
|
|
102486
|
+
onMouseEnter: (e) => {
|
|
102487
|
+
if (!isExpanded) e.currentTarget.style.backgroundColor = `${theme2.colors.primary}05`;
|
|
102488
|
+
},
|
|
102489
|
+
onMouseLeave: (e) => {
|
|
102490
|
+
if (!isExpanded) e.currentTarget.style.backgroundColor = "transparent";
|
|
102491
|
+
},
|
|
102492
|
+
children: [
|
|
102493
|
+
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 14, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 14, color: theme2.colors.textSecondary }),
|
|
102494
|
+
/* @__PURE__ */ jsx("span", { style: {
|
|
102495
|
+
flex: 1,
|
|
102496
|
+
fontFamily: theme2.fonts.body,
|
|
102497
|
+
fontSize: theme2.fontSizes[1],
|
|
102498
|
+
color: theme2.colors.text
|
|
102499
|
+
}, children: pattern.name }),
|
|
102500
|
+
traceCount > 0 && /* @__PURE__ */ jsxs("span", { style: {
|
|
102501
|
+
padding: "2px 6px",
|
|
102502
|
+
fontSize: theme2.fontSizes[0],
|
|
102503
|
+
fontFamily: theme2.fonts.body,
|
|
102504
|
+
backgroundColor: `#06b6d415`,
|
|
102505
|
+
color: "#06b6d4",
|
|
102506
|
+
borderRadius: "3px"
|
|
102507
|
+
}, children: [
|
|
102508
|
+
traceCount,
|
|
102509
|
+
" ",
|
|
102510
|
+
traceCount === 1 ? "trace" : "traces"
|
|
102511
|
+
] }),
|
|
102512
|
+
/* @__PURE__ */ jsx(
|
|
102513
|
+
"button",
|
|
102514
|
+
{
|
|
102515
|
+
onClick: (e) => {
|
|
102516
|
+
e.stopPropagation();
|
|
102517
|
+
handlePatternVisibilityToggle(pattern.id, !isVisible);
|
|
102518
|
+
},
|
|
102519
|
+
title: isVisible ? "Hide matching traces" : "Show matching traces",
|
|
102520
|
+
style: {
|
|
102521
|
+
padding: "4px",
|
|
102522
|
+
background: "transparent",
|
|
102523
|
+
border: "none",
|
|
102524
|
+
cursor: "pointer",
|
|
102525
|
+
display: "flex",
|
|
102526
|
+
alignItems: "center",
|
|
102527
|
+
opacity: 0.6,
|
|
102528
|
+
transition: "opacity 0.15s"
|
|
102529
|
+
},
|
|
102530
|
+
onMouseEnter: (e) => {
|
|
102531
|
+
e.currentTarget.style.opacity = "1";
|
|
102532
|
+
},
|
|
102533
|
+
onMouseLeave: (e) => {
|
|
102534
|
+
e.currentTarget.style.opacity = "0.6";
|
|
102535
|
+
},
|
|
102536
|
+
children: isVisible ? /* @__PURE__ */ jsx(Eye, { size: 14, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(EyeOff, { size: 14, color: theme2.colors.textMuted })
|
|
102537
|
+
}
|
|
102538
|
+
),
|
|
102539
|
+
/* @__PURE__ */ jsx(
|
|
102540
|
+
"button",
|
|
102541
|
+
{
|
|
102542
|
+
onClick: (e) => {
|
|
102543
|
+
e.stopPropagation();
|
|
102544
|
+
if (confirm(`Delete pattern "${pattern.name}"?`)) {
|
|
102545
|
+
handlePatternDelete(pattern.id);
|
|
102546
|
+
}
|
|
102547
|
+
},
|
|
102548
|
+
title: "Delete pattern",
|
|
102549
|
+
style: {
|
|
102550
|
+
padding: "4px",
|
|
102551
|
+
background: "transparent",
|
|
102552
|
+
border: "none",
|
|
102553
|
+
cursor: "pointer",
|
|
102554
|
+
display: "flex",
|
|
102555
|
+
alignItems: "center",
|
|
102556
|
+
opacity: 0.6,
|
|
102557
|
+
transition: "opacity 0.15s"
|
|
102558
|
+
},
|
|
102559
|
+
onMouseEnter: (e) => {
|
|
102560
|
+
e.currentTarget.style.opacity = "1";
|
|
102561
|
+
},
|
|
102562
|
+
onMouseLeave: (e) => {
|
|
102563
|
+
e.currentTarget.style.opacity = "0.6";
|
|
102564
|
+
},
|
|
102565
|
+
children: /* @__PURE__ */ jsx(Trash2, { size: 14, color: theme2.colors.error })
|
|
102566
|
+
}
|
|
102567
|
+
)
|
|
102568
|
+
]
|
|
102569
|
+
}
|
|
102570
|
+
),
|
|
102571
|
+
isExpanded && /* @__PURE__ */ jsxs("div", { style: {
|
|
102572
|
+
padding: "12px 16px 12px 40px",
|
|
102573
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
102574
|
+
borderTop: `1px solid ${theme2.colors.border}`
|
|
102575
|
+
}, children: [
|
|
102576
|
+
pattern.description && /* @__PURE__ */ jsx("div", { style: {
|
|
102577
|
+
marginBottom: "12px",
|
|
102578
|
+
fontFamily: theme2.fonts.body,
|
|
102579
|
+
fontSize: theme2.fontSizes[1],
|
|
102580
|
+
color: theme2.colors.textSecondary
|
|
102581
|
+
}, children: pattern.description }),
|
|
102582
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
102583
|
+
fontFamily: theme2.fonts.body,
|
|
102584
|
+
fontSize: theme2.fontSizes[0],
|
|
102585
|
+
color: theme2.colors.textMuted,
|
|
102586
|
+
marginBottom: "8px"
|
|
102587
|
+
}, children: "Span Structure:" }),
|
|
102588
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
102589
|
+
padding: "8px 12px",
|
|
102590
|
+
backgroundColor: theme2.colors.background,
|
|
102591
|
+
borderRadius: "4px",
|
|
102592
|
+
border: `1px solid ${theme2.colors.border}`
|
|
102593
|
+
}, children: pattern.rootSpans.map((spanPattern, i) => /* @__PURE__ */ jsx(SpanPatternTree, { pattern: spanPattern, theme: theme2, depth: 0 }, i)) })
|
|
102594
|
+
] })
|
|
102595
|
+
] }, pattern.id);
|
|
102596
|
+
})
|
|
102597
|
+
] }),
|
|
102338
102598
|
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(
|
|
102339
102599
|
StoryboardWorkflowsTreeCore,
|
|
102340
102600
|
{
|