@industry-theme/principal-view-panels 0.1.28 → 0.1.30

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.
@@ -3996,6 +3996,89 @@ function requireUmd() {
3996
3996
  })(umd$1, umd$1.exports);
3997
3997
  return umd$1.exports;
3998
3998
  }
3999
+ function isErrorSeverity(severity) {
4000
+ if (severity === void 0)
4001
+ return false;
4002
+ if (typeof severity === "string") {
4003
+ return severity === "ERROR" || severity === "FATAL";
4004
+ }
4005
+ return severity >= 17;
4006
+ }
4007
+ function isWarnSeverity(severity) {
4008
+ if (severity === void 0)
4009
+ return false;
4010
+ if (typeof severity === "string") {
4011
+ return severity === "WARN";
4012
+ }
4013
+ return severity >= 13 && severity <= 16;
4014
+ }
4015
+ function isExactMatch(op) {
4016
+ return typeof op === "object" && "exact" in op;
4017
+ }
4018
+ function isGlobMatch(op) {
4019
+ return typeof op === "object" && "glob" in op;
4020
+ }
4021
+ function isRegexMatch(op) {
4022
+ return typeof op === "object" && "regex" in op;
4023
+ }
4024
+ function isExistsMatch(op) {
4025
+ return typeof op === "object" && "exists" in op;
4026
+ }
4027
+ function isOneOfMatch(op) {
4028
+ return typeof op === "object" && "oneOf" in op;
4029
+ }
4030
+ function isStringShorthand(op) {
4031
+ return typeof op === "string";
4032
+ }
4033
+ function normalizeOperator(op) {
4034
+ if (typeof op === "string") {
4035
+ return { exact: op };
4036
+ }
4037
+ return op;
4038
+ }
4039
+ const DEFAULT_AUDIT_CONFIG = {
4040
+ maxOrphanSignatures: 1e3,
4041
+ maxSamplesPerOrphan: 5
4042
+ };
4043
+ function parseDuration(duration) {
4044
+ const match = duration.match(/^(\d+(?:\.\d+)?)(ms|s|m|h|d)$/);
4045
+ if (!match)
4046
+ return null;
4047
+ const value = parseFloat(match[1]);
4048
+ const unit = match[2];
4049
+ const multipliers = {
4050
+ ms: 1,
4051
+ s: 1e3,
4052
+ m: 60 * 1e3,
4053
+ h: 60 * 60 * 1e3,
4054
+ d: 24 * 60 * 60 * 1e3
4055
+ };
4056
+ return value * multipliers[unit];
4057
+ }
4058
+ function createResourceSignature(resource) {
4059
+ const signatureKeys = [
4060
+ "service.name",
4061
+ "service.namespace",
4062
+ "deployment.environment",
4063
+ "db.system",
4064
+ "db.name",
4065
+ "k8s.deployment.name",
4066
+ "k8s.namespace.name",
4067
+ "messaging.system",
4068
+ "messaging.destination.name"
4069
+ ];
4070
+ const signature = {};
4071
+ for (const key of signatureKeys) {
4072
+ if (resource[key] !== void 0) {
4073
+ signature[key] = resource[key];
4074
+ }
4075
+ }
4076
+ return signature;
4077
+ }
4078
+ function signatureToKey(resource) {
4079
+ const entries = Object.entries(resource).filter(([, v]) => v !== void 0).sort(([a2], [b]) => a2.localeCompare(b));
4080
+ return entries.map(([k, v]) => `${k}=${v}`).join("|");
4081
+ }
3999
4082
  class ValidationEngine {
4000
4083
  constructor(rules) {
4001
4084
  this.violationCount = 0;
@@ -5304,19 +5387,19 @@ class CanvasConverter {
5304
5387
  * Convert a single canvas node to React Flow node
5305
5388
  */
5306
5389
  static convertNode(node, canvas) {
5307
- var _a, _b;
5390
+ var _a, _b, _c, _d;
5308
5391
  const pv = node.pv;
5309
5392
  const color = resolveCanvasColor(node.color);
5310
5393
  let nodeName;
5311
5394
  switch (node.type) {
5312
5395
  case "text":
5313
- nodeName = node.text.split("\n")[0].replace(/^#+ /, "").substring(0, 50);
5396
+ nodeName = ((_a = node.text) == null ? void 0 : _a.split("\n")[0].replace(/^#+ /, "").substring(0, 50)) || "Text";
5314
5397
  break;
5315
5398
  case "file":
5316
- nodeName = node.file.split("/").pop() || node.file;
5399
+ nodeName = ((_b = node.file) == null ? void 0 : _b.split("/").pop()) || node.file || "File";
5317
5400
  break;
5318
5401
  case "link":
5319
- nodeName = node.url;
5402
+ nodeName = node.url || "Link";
5320
5403
  break;
5321
5404
  case "group":
5322
5405
  nodeName = node.label || "Group";
@@ -5328,7 +5411,7 @@ class CanvasConverter {
5328
5411
  canvasType: node.type,
5329
5412
  shape: (pv == null ? void 0 : pv.shape) || "rectangle",
5330
5413
  icon: pv == null ? void 0 : pv.icon,
5331
- color: ((_b = (_a = pv == null ? void 0 : pv.states) == null ? void 0 : _a.idle) == null ? void 0 : _b.color) || color,
5414
+ color: ((_d = (_c = pv == null ? void 0 : pv.states) == null ? void 0 : _c.idle) == null ? void 0 : _d.color) || color,
5332
5415
  width: node.width,
5333
5416
  height: node.height
5334
5417
  };
@@ -5400,7 +5483,7 @@ class CanvasConverter {
5400
5483
  * Convert Extended Canvas to internal NodeState/EdgeState format
5401
5484
  */
5402
5485
  static canvasToGraph(canvas) {
5403
- var _a, _b;
5486
+ var _a, _b, _c, _d, _e2;
5404
5487
  const nodes = [];
5405
5488
  const edges = [];
5406
5489
  const now2 = Date.now();
@@ -5411,16 +5494,16 @@ class CanvasConverter {
5411
5494
  let nodeDescription;
5412
5495
  switch (node.type) {
5413
5496
  case "text": {
5414
- const lines = node.text.split("\n");
5415
- nodeName = lines[0].replace(/^#+ /, "").substring(0, 50);
5497
+ const lines = ((_a = node.text) == null ? void 0 : _a.split("\n")) || [];
5498
+ nodeName = ((_b = lines[0]) == null ? void 0 : _b.replace(/^#+ /, "").substring(0, 50)) || "Text";
5416
5499
  nodeDescription = lines.slice(1).join("\n").trim() || void 0;
5417
5500
  break;
5418
5501
  }
5419
5502
  case "file":
5420
- nodeName = node.file.split("/").pop() || node.file;
5503
+ nodeName = ((_c = node.file) == null ? void 0 : _c.split("/").pop()) || node.file || "File";
5421
5504
  break;
5422
5505
  case "link":
5423
- nodeName = node.url;
5506
+ nodeName = node.url || "Link";
5424
5507
  break;
5425
5508
  case "group":
5426
5509
  nodeName = node.label || "Group";
@@ -5429,12 +5512,14 @@ class CanvasConverter {
5429
5512
  nodeName = (pv == null ? void 0 : pv.nodeType) || node.id;
5430
5513
  break;
5431
5514
  }
5515
+ const finalName = (pv == null ? void 0 : pv.name) || nodeName;
5516
+ const finalDescription = (pv == null ? void 0 : pv.description) || nodeDescription;
5432
5517
  nodes.push({
5433
5518
  id: node.id,
5434
5519
  type: (pv == null ? void 0 : pv.nodeType) || node.type,
5435
- name: nodeName,
5520
+ name: finalName,
5436
5521
  data: {
5437
- description: nodeDescription,
5522
+ description: finalDescription,
5438
5523
  shape: (pv == null ? void 0 : pv.shape) || "rectangle",
5439
5524
  icon: pv == null ? void 0 : pv.icon,
5440
5525
  // Color priority: pv.fill > node.color
@@ -5446,6 +5531,10 @@ class CanvasConverter {
5446
5531
  sources: (pv == null ? void 0 : pv.sources) || [],
5447
5532
  actions: (pv == null ? void 0 : pv.actions) || [],
5448
5533
  states: pv == null ? void 0 : pv.states,
5534
+ // OTEL metadata for visualization
5535
+ otel: pv == null ? void 0 : pv.otel,
5536
+ // Resource matching for log association
5537
+ resourceMatch: pv == null ? void 0 : pv.resourceMatch,
5449
5538
  canvasType: node.type,
5450
5539
  ...node.type === "text" ? { text: node.text } : {},
5451
5540
  ...node.type === "file" ? { file: node.file } : {},
@@ -5465,7 +5554,7 @@ class CanvasConverter {
5465
5554
  if (canvas.edges) {
5466
5555
  for (const edge of canvas.edges) {
5467
5556
  const pv = edge.pv;
5468
- const edgeTypeDef = (pv == null ? void 0 : pv.edgeType) ? (_b = (_a = canvas.pv) == null ? void 0 : _a.edgeTypes) == null ? void 0 : _b[pv.edgeType] : void 0;
5557
+ const edgeTypeDef = (pv == null ? void 0 : pv.edgeType) ? (_e2 = (_d = canvas.pv) == null ? void 0 : _d.edgeTypes) == null ? void 0 : _e2[pv.edgeType] : void 0;
5469
5558
  edges.push({
5470
5559
  id: edge.id,
5471
5560
  type: (pv == null ? void 0 : pv.edgeType) || "default",
@@ -5952,7 +6041,7 @@ class EventRecorderService {
5952
6041
  /**
5953
6042
  * Handle single log message
5954
6043
  */
5955
- handleLog(message, connectionId) {
6044
+ handleLog(message, _connectionId) {
5956
6045
  if (!this.isRecording) {
5957
6046
  return null;
5958
6047
  }
@@ -5978,7 +6067,7 @@ class EventRecorderService {
5978
6067
  /**
5979
6068
  * Handle batch log message
5980
6069
  */
5981
- handleLogBatch(message, connectionId) {
6070
+ handleLogBatch(message, _connectionId) {
5982
6071
  if (!this.isRecording) {
5983
6072
  return null;
5984
6073
  }
@@ -11371,6 +11460,7 @@ const dist = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
11371
11460
  CanvasConverter,
11372
11461
  ConfigurationLoader,
11373
11462
  ConfigurationValidator,
11463
+ DEFAULT_AUDIT_CONFIG,
11374
11464
  DEFAULT_EXCLUDE_PATTERNS,
11375
11465
  DEFAULT_INCLUDE_PATTERNS,
11376
11466
  EventProcessor,
@@ -11390,28 +11480,40 @@ const dist = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
11390
11480
  builtinRules,
11391
11481
  connectionTypeReferences,
11392
11482
  createDefaultRulesEngine,
11483
+ createResourceSignature,
11393
11484
  createRulesEngine,
11394
11485
  deadEndStates,
11395
11486
  formatConfigErrors,
11396
11487
  getConfigNameFromFilename: getConfigNameFromFilename$1,
11397
11488
  getDefaultConfig,
11398
11489
  hasPVExtension,
11490
+ isErrorSeverity,
11491
+ isExactMatch,
11492
+ isExistsMatch,
11399
11493
  isFileNode,
11494
+ isGlobMatch,
11400
11495
  isGroupNode,
11401
11496
  isLinkNode,
11497
+ isOneOfMatch,
11498
+ isRegexMatch,
11402
11499
  isRuleDisabled,
11500
+ isStringShorthand,
11403
11501
  isTextNode,
11502
+ isWarnSeverity,
11404
11503
  isYamlFile,
11405
11504
  libraryNodeTypeMatch,
11406
11505
  mergeConfigs,
11407
11506
  minimumNodeSources,
11408
11507
  noUnknownFields,
11508
+ normalizeOperator,
11409
11509
  normalizeSeverity,
11410
11510
  orphanedEdgeTypes,
11411
11511
  orphanedNodeTypes,
11512
+ parseDuration,
11412
11513
  parseYaml,
11413
11514
  requiredMetadata,
11414
11515
  resolveCanvasColor,
11516
+ signatureToKey,
11415
11517
  stateTransitionReferences,
11416
11518
  unreachableStates,
11417
11519
  validActionPatterns,
@@ -47083,6 +47185,119 @@ function requireIconResolver() {
47083
47185
  iconResolver.Icon = Icon2;
47084
47186
  return iconResolver;
47085
47187
  }
47188
+ var NodeTooltip = {};
47189
+ var hasRequiredNodeTooltip;
47190
+ function requireNodeTooltip() {
47191
+ if (hasRequiredNodeTooltip) return NodeTooltip;
47192
+ hasRequiredNodeTooltip = 1;
47193
+ Object.defineProperty(NodeTooltip, "__esModule", { value: true });
47194
+ NodeTooltip.NodeTooltip = void 0;
47195
+ const jsx_runtime_1 = require$$0;
47196
+ const react_1 = React2;
47197
+ const react_dom_1 = require$$2;
47198
+ const NodeTooltip$1 = ({ description, otel, visible, nodeRef }) => {
47199
+ const [position, setPosition] = (0, react_1.useState)(null);
47200
+ (0, react_1.useEffect)(() => {
47201
+ if (visible && (nodeRef == null ? void 0 : nodeRef.current)) {
47202
+ const rect = nodeRef.current.getBoundingClientRect();
47203
+ setPosition({
47204
+ top: rect.bottom + 8,
47205
+ // 8px below the node
47206
+ left: rect.left + rect.width / 2
47207
+ // centered horizontally
47208
+ });
47209
+ } else if (!nodeRef) {
47210
+ setPosition({ top: 0, left: 0 });
47211
+ }
47212
+ }, [visible, nodeRef]);
47213
+ if (!visible)
47214
+ return null;
47215
+ if (!description && !otel)
47216
+ return null;
47217
+ const usePortal = Boolean(nodeRef);
47218
+ const getKindLabel = (kind) => {
47219
+ switch (kind) {
47220
+ case "type":
47221
+ return "Type";
47222
+ case "service":
47223
+ return "Service";
47224
+ case "instance":
47225
+ return "Instance";
47226
+ default:
47227
+ return kind;
47228
+ }
47229
+ };
47230
+ const getKindColor = (kind) => {
47231
+ switch (kind) {
47232
+ case "type":
47233
+ return "#4A90E2";
47234
+ // Blue
47235
+ case "service":
47236
+ return "#7ED321";
47237
+ // Green
47238
+ case "instance":
47239
+ return "#9B59B6";
47240
+ // Purple
47241
+ default:
47242
+ return "#888";
47243
+ }
47244
+ };
47245
+ const tooltipContent = (0, jsx_runtime_1.jsxs)("div", { style: {
47246
+ position: usePortal ? "fixed" : "absolute",
47247
+ top: usePortal ? (position == null ? void 0 : position.top) ?? 0 : "100%",
47248
+ left: usePortal ? (position == null ? void 0 : position.left) ?? 0 : "50%",
47249
+ transform: "translateX(-50%)",
47250
+ marginTop: usePortal ? 0 : "8px",
47251
+ padding: "8px 12px",
47252
+ backgroundColor: "rgba(0, 0, 0, 0.9)",
47253
+ color: "white",
47254
+ borderRadius: "6px",
47255
+ fontSize: "11px",
47256
+ maxWidth: "250px",
47257
+ zIndex: 99999,
47258
+ pointerEvents: "none",
47259
+ boxShadow: "0 4px 12px rgba(0,0,0,0.4)",
47260
+ whiteSpace: "normal",
47261
+ opacity: usePortal ? position ? 1 : 0 : 1
47262
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
47263
+ position: "absolute",
47264
+ top: "-6px",
47265
+ left: "50%",
47266
+ transform: "translateX(-50%)",
47267
+ width: 0,
47268
+ height: 0,
47269
+ borderLeft: "6px solid transparent",
47270
+ borderRight: "6px solid transparent",
47271
+ borderBottom: "6px solid rgba(0, 0, 0, 0.9)"
47272
+ } }), otel && (0, jsx_runtime_1.jsxs)("div", { style: {
47273
+ display: "flex",
47274
+ alignItems: "center",
47275
+ gap: "6px",
47276
+ marginBottom: description ? "6px" : 0
47277
+ }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
47278
+ backgroundColor: getKindColor(otel.kind),
47279
+ color: "white",
47280
+ padding: "2px 6px",
47281
+ borderRadius: "3px",
47282
+ fontSize: "9px",
47283
+ fontWeight: 600,
47284
+ textTransform: "uppercase"
47285
+ }, children: getKindLabel(otel.kind) }), otel.category && (0, jsx_runtime_1.jsx)("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "10px" }, children: otel.category }), otel.isNew && (0, jsx_runtime_1.jsx)("span", { style: {
47286
+ backgroundColor: "#F5A623",
47287
+ color: "white",
47288
+ padding: "1px 4px",
47289
+ borderRadius: "3px",
47290
+ fontSize: "8px",
47291
+ fontWeight: 600
47292
+ }, children: "NEW" })] }), description && (0, jsx_runtime_1.jsx)("div", { style: { lineHeight: "1.4", color: "rgba(255,255,255,0.9)" }, children: description })] });
47293
+ if (usePortal) {
47294
+ return (0, react_dom_1.createPortal)(tooltipContent, document.body);
47295
+ }
47296
+ return tooltipContent;
47297
+ };
47298
+ NodeTooltip.NodeTooltip = NodeTooltip$1;
47299
+ return NodeTooltip;
47300
+ }
47086
47301
  var hasRequiredCustomNode;
47087
47302
  function requireCustomNode() {
47088
47303
  if (hasRequiredCustomNode) return CustomNode;
@@ -47090,12 +47305,56 @@ function requireCustomNode() {
47090
47305
  Object.defineProperty(CustomNode, "__esModule", { value: true });
47091
47306
  CustomNode.CustomNode = void 0;
47092
47307
  const jsx_runtime_1 = require$$0;
47093
- const react_1 = /* @__PURE__ */ requireUmd();
47308
+ const react_1 = React2;
47309
+ const react_2 = /* @__PURE__ */ requireUmd();
47094
47310
  const iconResolver_1 = requireIconResolver();
47311
+ const NodeTooltip_1 = requireNodeTooltip();
47095
47312
  const CustomNode$1 = ({ data, selected }) => {
47096
- var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o2, _p, _q, _r, _s, _t2, _u;
47313
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o2;
47314
+ const [isHovered, setIsHovered] = (0, react_1.useState)(false);
47315
+ const nodeRef = (0, react_1.useRef)(null);
47097
47316
  const nodeProps = data;
47098
47317
  const { typeDefinition, state, hasViolations, data: nodeData, animationType, animationDuration = 1e3, editable = false } = nodeProps;
47318
+ const otelInfo = nodeData == null ? void 0 : nodeData.otel;
47319
+ const description = nodeData == null ? void 0 : nodeData.description;
47320
+ const getOtelBadgeColor = (kind) => {
47321
+ switch (kind) {
47322
+ case "type":
47323
+ return "#4A90E2";
47324
+ // Blue
47325
+ case "service":
47326
+ return "#7ED321";
47327
+ // Green
47328
+ case "instance":
47329
+ return "#9B59B6";
47330
+ // Purple
47331
+ default:
47332
+ return "#888";
47333
+ }
47334
+ };
47335
+ const renderOtelBadge = () => {
47336
+ if (!(otelInfo == null ? void 0 : otelInfo.kind))
47337
+ return null;
47338
+ const badgeColor = getOtelBadgeColor(otelInfo.kind);
47339
+ const label = otelInfo.kind.charAt(0).toUpperCase();
47340
+ return (0, jsx_runtime_1.jsx)("div", { style: {
47341
+ position: "absolute",
47342
+ top: -6,
47343
+ right: -6,
47344
+ width: 18,
47345
+ height: 18,
47346
+ borderRadius: "50%",
47347
+ backgroundColor: badgeColor,
47348
+ color: "white",
47349
+ fontSize: "10px",
47350
+ fontWeight: 700,
47351
+ display: "flex",
47352
+ alignItems: "center",
47353
+ justifyContent: "center",
47354
+ boxShadow: "0 1px 3px rgba(0,0,0,0.3)",
47355
+ zIndex: 10
47356
+ }, title: `${otelInfo.kind}${otelInfo.category ? ` (${otelInfo.category})` : ""}`, children: label });
47357
+ };
47099
47358
  if (!typeDefinition) {
47100
47359
  return (0, jsx_runtime_1.jsx)("div", { style: { padding: "10px", border: "2px solid red", borderRadius: "4px" }, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px", color: "red" }, children: "Error: Missing node type definition" }) });
47101
47360
  }
@@ -47126,7 +47385,6 @@ function requireCustomNode() {
47126
47385
  const animationClass = getAnimationClass();
47127
47386
  const isGroup = nodeData.canvasType === "group";
47128
47387
  const getShapeStyles = () => {
47129
- var _a2, _b2;
47130
47388
  const baseStyles = {
47131
47389
  padding: "12px 16px",
47132
47390
  backgroundColor: isGroup ? "rgba(255, 255, 255, 0.7)" : "white",
@@ -47137,8 +47395,9 @@ function requireCustomNode() {
47137
47395
  // Use 100% width/height to fill the node container (for resizing support)
47138
47396
  width: "100%",
47139
47397
  height: "100%",
47140
- minWidth: ((_a2 = typeDefinition.size) == null ? void 0 : _a2.width) || 80,
47141
- minHeight: ((_b2 = typeDefinition.size) == null ? void 0 : _b2.height) || 40,
47398
+ // Use small absolute minimums - typeDefinition.size is the default, not the minimum
47399
+ minWidth: 20,
47400
+ minHeight: 20,
47142
47401
  display: "flex",
47143
47402
  flexDirection: "column",
47144
47403
  alignItems: "center",
@@ -47196,8 +47455,8 @@ function requireCustomNode() {
47196
47455
  const isHexagon = typeDefinition.shape === "hexagon";
47197
47456
  const isCircle = typeDefinition.shape === "circle";
47198
47457
  const keepAspectRatio = isCircle;
47199
- const minWidth = ((_g = typeDefinition.size) == null ? void 0 : _g.width) || 80;
47200
- const minHeight = ((_h = typeDefinition.size) == null ? void 0 : _h.height) || (isCircle ? minWidth : 40);
47458
+ const minWidth = 40;
47459
+ const minHeight = isCircle ? 40 : 30;
47201
47460
  const hexagonClipPath = "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)";
47202
47461
  const hexagonBorderWidth = 2;
47203
47462
  const hexagonBorderStyle = isHexagon ? {
@@ -47207,8 +47466,9 @@ function requireCustomNode() {
47207
47466
  // Use 100% to fill container for resizing support
47208
47467
  width: "100%",
47209
47468
  height: "100%",
47210
- minWidth: ((_i = typeDefinition.size) == null ? void 0 : _i.width) || 120,
47211
- minHeight: ((_j = typeDefinition.size) == null ? void 0 : _j.height) || 120,
47469
+ // Use small absolute minimums - typeDefinition.size is the default, not the minimum
47470
+ minWidth: 20,
47471
+ minHeight: 20,
47212
47472
  boxShadow: selected ? `0 0 0 2px ${strokeColor}` : "0 2px 4px rgba(0,0,0,0.1)",
47213
47473
  transition: "box-shadow 0.2s ease",
47214
47474
  boxSizing: "border-box"
@@ -47238,8 +47498,9 @@ function requireCustomNode() {
47238
47498
  backgroundColor: hasViolations ? "#D0021B" : strokeColor,
47239
47499
  width: "100%",
47240
47500
  height: "100%",
47241
- minWidth: ((_k = typeDefinition.size) == null ? void 0 : _k.width) || 80,
47242
- minHeight: ((_l = typeDefinition.size) == null ? void 0 : _l.height) || 80,
47501
+ // Use small absolute minimums - typeDefinition.size is the default, not the minimum
47502
+ minWidth: 20,
47503
+ minHeight: 20,
47243
47504
  boxShadow: selected ? `0 0 0 2px ${strokeColor}` : "0 2px 4px rgba(0,0,0,0.1)",
47244
47505
  transition: "box-shadow 0.2s ease",
47245
47506
  boxSizing: "border-box"
@@ -47281,7 +47542,7 @@ function requireCustomNode() {
47281
47542
  }
47282
47543
  return offsetStyle;
47283
47544
  };
47284
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [editable && (0, jsx_runtime_1.jsx)(react_1.NodeResizer, { color: strokeColor, isVisible: selected, minWidth, minHeight, keepAspectRatio, handleStyle: {
47545
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [editable && (0, jsx_runtime_1.jsx)(react_2.NodeResizer, { color: strokeColor, isVisible: selected, minWidth, minHeight, keepAspectRatio, handleStyle: {
47285
47546
  width: 8,
47286
47547
  height: 8,
47287
47548
  borderRadius: 2,
@@ -47289,29 +47550,29 @@ function requireCustomNode() {
47289
47550
  }, lineStyle: {
47290
47551
  borderWidth: 1,
47291
47552
  zIndex: 20
47292
- } }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Top, id: "top", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Bottom, id: "bottom", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Left, id: "left", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "target", position: react_1.Position.Right, id: "right", style: getHandleStyle() }), isHexagon ? (0, jsx_runtime_1.jsx)("div", { style: hexagonBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: hexagonInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
47553
+ } }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "target", position: react_2.Position.Top, id: "top", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "target", position: react_2.Position.Bottom, id: "bottom", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "target", position: react_2.Position.Left, id: "left", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "target", position: react_2.Position.Right, id: "right", style: getHandleStyle() }), isHexagon ? (0, jsx_runtime_1.jsxs)("div", { ref: nodeRef, style: { position: "relative", width: "100%", height: "100%" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderOtelBadge(), (0, jsx_runtime_1.jsx)("div", { style: hexagonBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: hexagonInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
47293
47554
  fontSize: "10px",
47294
47555
  backgroundColor: color,
47295
47556
  color: "white",
47296
47557
  padding: "2px 6px",
47297
47558
  borderRadius: "4px",
47298
47559
  textAlign: "center"
47299
- }, children: ((_m = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _m.label) || ((_o2 = (_n2 = typeDefinition.states) == null ? void 0 : _n2[state]) == null ? void 0 : _o2.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47560
+ }, children: ((_g = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _g.label) || ((_i = (_h = typeDefinition.states) == null ? void 0 : _h[state]) == null ? void 0 : _i.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47300
47561
  fontSize: "10px",
47301
47562
  color: "#D0021B",
47302
47563
  fontWeight: "bold"
47303
- }, children: "⚠️" })] }) }) : isDiamond ? (0, jsx_runtime_1.jsx)("div", { style: diamondBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: diamondInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
47564
+ }, children: "⚠️" })] }) }), (0, jsx_runtime_1.jsx)(NodeTooltip_1.NodeTooltip, { description, otel: otelInfo, visible: isHovered, nodeRef })] }) : isDiamond ? (0, jsx_runtime_1.jsxs)("div", { ref: nodeRef, style: { position: "relative", width: "100%", height: "100%" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderOtelBadge(), (0, jsx_runtime_1.jsx)("div", { style: diamondBorderStyle, className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: diamondInnerStyle, children: [icon && (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: (0, iconResolver_1.resolveIcon)(icon, 20) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", wordBreak: "break-word" }, children: displayName }), state && (0, jsx_runtime_1.jsx)("div", { style: {
47304
47565
  fontSize: "10px",
47305
47566
  backgroundColor: color,
47306
47567
  color: "white",
47307
47568
  padding: "2px 6px",
47308
47569
  borderRadius: "4px",
47309
47570
  textAlign: "center"
47310
- }, children: ((_p = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _p.label) || ((_r = (_q = typeDefinition.states) == null ? void 0 : _q[state]) == null ? void 0 : _r.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47571
+ }, children: ((_j = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _j.label) || ((_l = (_k = typeDefinition.states) == null ? void 0 : _k[state]) == null ? void 0 : _l.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47311
47572
  fontSize: "10px",
47312
47573
  color: "#D0021B",
47313
47574
  fontWeight: "bold"
47314
- }, children: "⚠️" })] }) }) : (0, jsx_runtime_1.jsx)("div", { style: getShapeStyles(), className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: {
47575
+ }, children: "⚠️" })] }) }), (0, jsx_runtime_1.jsx)(NodeTooltip_1.NodeTooltip, { description, otel: otelInfo, visible: isHovered, nodeRef })] }) : (0, jsx_runtime_1.jsxs)("div", { ref: nodeRef, style: { position: "relative", width: "100%", height: "100%" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [renderOtelBadge(), (0, jsx_runtime_1.jsx)("div", { style: getShapeStyles(), className: animationClass, children: (0, jsx_runtime_1.jsxs)("div", { style: {
47315
47576
  ...isGroup ? { width: "100%" } : {}
47316
47577
  }, children: [isGroup ? (0, jsx_runtime_1.jsxs)("div", { style: {
47317
47578
  display: "flex",
@@ -47326,11 +47587,11 @@ function requireCustomNode() {
47326
47587
  padding: "2px 6px",
47327
47588
  borderRadius: "4px",
47328
47589
  textAlign: "center"
47329
- }, children: ((_s = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _s.label) || ((_u = (_t2 = typeDefinition.states) == null ? void 0 : _t2[state]) == null ? void 0 : _u.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47590
+ }, children: ((_m = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _m.label) || ((_o2 = (_n2 = typeDefinition.states) == null ? void 0 : _n2[state]) == null ? void 0 : _o2.label) || state }), hasViolations && (0, jsx_runtime_1.jsx)("div", { style: {
47330
47591
  fontSize: "10px",
47331
47592
  color: "#D0021B",
47332
47593
  fontWeight: "bold"
47333
- }, children: "⚠️" })] }) }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "source", position: react_1.Position.Top, id: "top-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "source", position: react_1.Position.Bottom, id: "bottom-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "source", position: react_1.Position.Left, id: "left-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_1.Handle, { type: "source", position: react_1.Position.Right, id: "right-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)("style", { children: `
47594
+ }, children: "⚠️" })] }) }), (0, jsx_runtime_1.jsx)(NodeTooltip_1.NodeTooltip, { description, otel: otelInfo, visible: isHovered, nodeRef })] }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "source", position: react_2.Position.Top, id: "top-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "source", position: react_2.Position.Bottom, id: "bottom-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "source", position: react_2.Position.Left, id: "left-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)(react_2.Handle, { type: "source", position: react_2.Position.Right, id: "right-out", style: getHandleStyle() }), (0, jsx_runtime_1.jsx)("style", { children: `
47334
47595
  /* Processing pulse - continuous breathing effect */
47335
47596
  .node-pulse {
47336
47597
  animation: node-pulse ease-in-out infinite;
@@ -48011,7 +48272,7 @@ function requireNodeInfoPanel() {
48011
48272
  "GitPullRequest"
48012
48273
  ];
48013
48274
  const NodeInfoPanel$1 = ({ node, typeDefinition, availableNodeTypes, onClose, onDelete, onUpdate, onSourceClick }) => {
48014
- var _a, _b, _c, _d, _e2, _f, _g, _h, _i;
48275
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j;
48015
48276
  const { theme } = (0, industry_theme_1.useTheme)();
48016
48277
  const nodeColor = ((_a = node.data) == null ? void 0 : _a.color) || (typeDefinition == null ? void 0 : typeDefinition.color) || theme.colors.primary;
48017
48278
  const canEdit = Boolean(onUpdate);
@@ -48044,10 +48305,13 @@ function requireNodeInfoPanel() {
48044
48305
  "shape",
48045
48306
  "states",
48046
48307
  "actions",
48047
- "nodeType"
48308
+ "nodeType",
48309
+ "otel",
48310
+ "resourceMatch"
48048
48311
  ];
48312
+ const otelInfo = (_d = node.data) == null ? void 0 : _d.otel;
48049
48313
  const nodeDataEntries = node.data ? Object.entries(node.data).filter(([key]) => !internalFields.includes(key)) : [];
48050
- const sources = ((_d = node.data) == null ? void 0 : _d.sources) || [];
48314
+ const sources = ((_e2 = node.data) == null ? void 0 : _e2.sources) || [];
48051
48315
  const handleTypeChange = (newType) => {
48052
48316
  if (onUpdate && newType !== node.type) {
48053
48317
  onUpdate(node.id, { type: newType });
@@ -48093,7 +48357,7 @@ function requireNodeInfoPanel() {
48093
48357
  display: "flex",
48094
48358
  alignItems: "center",
48095
48359
  justifyContent: "center"
48096
- }, children: "×" })] }), ((_e2 = node.data) == null ? void 0 : _e2.description) && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Description" }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px" }, children: String(node.data.description) })] }), sources.length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Sources" }), (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: sources.map((source, index2) => onSourceClick ? (0, jsx_runtime_1.jsx)("button", { onClick: () => onSourceClick(node.id, source), style: {
48360
+ }, children: "×" })] }), ((_f = node.data) == null ? void 0 : _f.description) && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Description" }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: "12px" }, children: String(node.data.description) })] }), sources.length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "Sources" }), (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: sources.map((source, index2) => onSourceClick ? (0, jsx_runtime_1.jsx)("button", { onClick: () => onSourceClick(node.id, source), style: {
48097
48361
  fontSize: "11px",
48098
48362
  padding: "2px 8px",
48099
48363
  backgroundColor: theme.colors.muted,
@@ -48114,7 +48378,25 @@ function requireNodeInfoPanel() {
48114
48378
  backgroundColor: theme.colors.muted,
48115
48379
  borderRadius: "4px",
48116
48380
  color: theme.colors.textSecondary
48117
- }, children: source }, index2)) })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowDetails(!showDetails), style: {
48381
+ }, children: source }, index2)) })] }), otelInfo && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "OpenTelemetry" }), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px", alignItems: "center" }, children: [otelInfo.kind && (0, jsx_runtime_1.jsx)("span", { style: {
48382
+ fontSize: "10px",
48383
+ fontWeight: 600,
48384
+ padding: "3px 8px",
48385
+ borderRadius: "4px",
48386
+ textTransform: "uppercase",
48387
+ color: "white",
48388
+ backgroundColor: otelInfo.kind === "type" ? "#4A90E2" : otelInfo.kind === "service" ? "#7ED321" : otelInfo.kind === "instance" ? "#9B59B6" : "#888"
48389
+ }, children: otelInfo.kind }), otelInfo.category && (0, jsx_runtime_1.jsx)("span", { style: {
48390
+ fontSize: "11px",
48391
+ color: theme.colors.textSecondary
48392
+ }, children: otelInfo.category }), otelInfo.isNew && (0, jsx_runtime_1.jsx)("span", { style: {
48393
+ fontSize: "9px",
48394
+ fontWeight: 600,
48395
+ padding: "2px 6px",
48396
+ borderRadius: "3px",
48397
+ backgroundColor: "#F5A623",
48398
+ color: "white"
48399
+ }, children: "NEW" })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowDetails(!showDetails), style: {
48118
48400
  width: "100%",
48119
48401
  padding: "8px",
48120
48402
  backgroundColor: theme.colors.surface,
@@ -48191,11 +48473,11 @@ function requireNodeInfoPanel() {
48191
48473
  }, children: node.type })] }), node.state && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { fontSize: "10px", color: theme.colors.textSecondary, marginBottom: "4px" }, children: "State" }), (0, jsx_runtime_1.jsx)("div", { style: {
48192
48474
  fontSize: "12px",
48193
48475
  padding: "4px 8px",
48194
- backgroundColor: ((_g = (_f = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _f[node.state]) == null ? void 0 : _g.color) || theme.colors.secondary,
48476
+ backgroundColor: ((_h = (_g = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _g[node.state]) == null ? void 0 : _h.color) || theme.colors.secondary,
48195
48477
  color: theme.colors.background,
48196
48478
  borderRadius: "4px",
48197
48479
  display: "inline-block"
48198
- }, children: ((_i = (_h = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _h[node.state]) == null ? void 0 : _i.label) || node.state })] }), hasSchemaFields && displayFields.filter((f) => f.field !== nameField).length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
48480
+ }, children: ((_j = (_i = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _i[node.state]) == null ? void 0 : _j.label) || node.state })] }), hasSchemaFields && displayFields.filter((f) => f.field !== nameField).length > 0 && (0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "12px" }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
48199
48481
  fontSize: "10px",
48200
48482
  color: theme.colors.textSecondary,
48201
48483
  marginBottom: "8px",
@@ -49368,7 +49650,7 @@ function requireDist() {
49368
49650
  hasRequiredDist = 1;
49369
49651
  (function(exports$1) {
49370
49652
  Object.defineProperty(exports$1, "__esModule", { value: true });
49371
- exports$1.resolveIcon = exports$1.Icon = exports$1.computeOptimalEdgeSides = exports$1.hasCycleBetweenNodes = exports$1.autoLayoutNodes = exports$1.convertToXYFlowEdges = exports$1.convertToXYFlowNodes = exports$1.CustomEdge = exports$1.GenericEdge = exports$1.CustomNode = exports$1.GenericNode = exports$1.ConfigurationSelector = exports$1.NodeInfoPanel = exports$1.EdgeInfoPanel = exports$1.MetricsDashboard = exports$1.EventLog = exports$1.GraphRenderer = void 0;
49653
+ exports$1.resolveIcon = exports$1.Icon = exports$1.computeOptimalEdgeSides = exports$1.hasCycleBetweenNodes = exports$1.autoLayoutNodes = exports$1.convertToXYFlowEdges = exports$1.convertToXYFlowNodes = exports$1.NodeTooltip = exports$1.CustomEdge = exports$1.GenericEdge = exports$1.CustomNode = exports$1.GenericNode = exports$1.ConfigurationSelector = exports$1.NodeInfoPanel = exports$1.EdgeInfoPanel = exports$1.MetricsDashboard = exports$1.EventLog = exports$1.GraphRenderer = void 0;
49372
49654
  var GraphRenderer_1 = requireGraphRenderer();
49373
49655
  Object.defineProperty(exports$1, "GraphRenderer", { enumerable: true, get: function() {
49374
49656
  return GraphRenderer_1.GraphRenderer;
@@ -49409,6 +49691,10 @@ function requireDist() {
49409
49691
  Object.defineProperty(exports$1, "CustomEdge", { enumerable: true, get: function() {
49410
49692
  return CustomEdge_1.CustomEdge;
49411
49693
  } });
49694
+ var NodeTooltip_1 = requireNodeTooltip();
49695
+ Object.defineProperty(exports$1, "NodeTooltip", { enumerable: true, get: function() {
49696
+ return NodeTooltip_1.NodeTooltip;
49697
+ } });
49412
49698
  var graphConverter_1 = requireGraphConverter();
49413
49699
  Object.defineProperty(exports$1, "convertToXYFlowNodes", { enumerable: true, get: function() {
49414
49700
  return graphConverter_1.convertToXYFlowNodes;