@industry-theme/principal-view-panels 0.1.15 → 0.1.17

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":"PrincipalViewGraphPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PrincipalViewGraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAoD/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8hCjE,CAAC"}
1
+ {"version":3,"file":"PrincipalViewGraphPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PrincipalViewGraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAsD/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2rCjE,CAAC"}
@@ -26674,7 +26674,7 @@ const __iconNode$dd = [
26674
26674
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
26675
26675
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
26676
26676
  ];
26677
- const Info = createLucideIcon$1("info", __iconNode$dd);
26677
+ const Info$1 = createLucideIcon$1("info", __iconNode$dd);
26678
26678
  /**
26679
26679
  * @license lucide-react v0.554.0 - ISC
26680
26680
  *
@@ -27940,7 +27940,7 @@ const __iconNode$bX = [
27940
27940
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
27941
27941
  ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
27942
27942
  ];
27943
- const LockOpen$1 = createLucideIcon$1("lock-open", __iconNode$bX);
27943
+ const LockOpen = createLucideIcon$1("lock-open", __iconNode$bX);
27944
27944
  /**
27945
27945
  * @license lucide-react v0.554.0 - ISC
27946
27946
  *
@@ -27963,7 +27963,7 @@ const __iconNode$bV = [
27963
27963
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
27964
27964
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
27965
27965
  ];
27966
- const Lock$1 = createLucideIcon$1("lock", __iconNode$bV);
27966
+ const Lock = createLucideIcon$1("lock", __iconNode$bV);
27967
27967
  /**
27968
27968
  * @license lucide-react v0.554.0 - ISC
27969
27969
  *
@@ -31263,7 +31263,7 @@ const __iconNode$8J = [
31263
31263
  ],
31264
31264
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
31265
31265
  ];
31266
- const Pencil = createLucideIcon$1("pencil", __iconNode$8J);
31266
+ const Pencil$1 = createLucideIcon$1("pencil", __iconNode$8J);
31267
31267
  /**
31268
31268
  * @license lucide-react v0.554.0 - ISC
31269
31269
  *
@@ -40493,7 +40493,7 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
40493
40493
  Inbox,
40494
40494
  IndianRupee,
40495
40495
  Infinity: Infinity$1,
40496
- Info,
40496
+ Info: Info$1,
40497
40497
  InspectionPanel,
40498
40498
  Instagram,
40499
40499
  Italic,
@@ -40573,10 +40573,10 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
40573
40573
  Locate,
40574
40574
  LocateFixed,
40575
40575
  LocateOff,
40576
- Lock: Lock$1,
40576
+ Lock,
40577
40577
  LockKeyhole,
40578
40578
  LockKeyholeOpen,
40579
- LockOpen: LockOpen$1,
40579
+ LockOpen,
40580
40580
  LogIn,
40581
40581
  LogOut,
40582
40582
  Logs,
@@ -40777,7 +40777,7 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
40777
40777
  PenLine,
40778
40778
  PenOff,
40779
40779
  PenTool,
40780
- Pencil,
40780
+ Pencil: Pencil$1,
40781
40781
  PencilLine,
40782
40782
  PencilOff,
40783
40783
  PencilRuler,
@@ -43249,8 +43249,8 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
43249
43249
  IndianRupeeIcon: IndianRupee,
43250
43250
  Infinity: Infinity$1,
43251
43251
  InfinityIcon: Infinity$1,
43252
- Info,
43253
- InfoIcon: Info,
43252
+ Info: Info$1,
43253
+ InfoIcon: Info$1,
43254
43254
  Inspect: SquareMousePointer,
43255
43255
  InspectIcon: SquareMousePointer,
43256
43256
  InspectionPanel,
@@ -43431,14 +43431,14 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
43431
43431
  LocateOffIcon: LocateOff,
43432
43432
  LocationEdit: MapPinPen,
43433
43433
  LocationEditIcon: MapPinPen,
43434
- Lock: Lock$1,
43435
- LockIcon: Lock$1,
43434
+ Lock,
43435
+ LockIcon: Lock,
43436
43436
  LockKeyhole,
43437
43437
  LockKeyholeIcon: LockKeyhole,
43438
43438
  LockKeyholeOpen,
43439
43439
  LockKeyholeOpenIcon: LockKeyholeOpen,
43440
- LockOpen: LockOpen$1,
43441
- LockOpenIcon: LockOpen$1,
43440
+ LockOpen,
43441
+ LockOpenIcon: LockOpen,
43442
43442
  LogIn,
43443
43443
  LogInIcon: LogIn,
43444
43444
  LogOut,
@@ -44407,7 +44407,7 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
44407
44407
  LucideIndentIncrease: ListIndentIncrease,
44408
44408
  LucideIndianRupee: IndianRupee,
44409
44409
  LucideInfinity: Infinity$1,
44410
- LucideInfo: Info,
44410
+ LucideInfo: Info$1,
44411
44411
  LucideInspect: SquareMousePointer,
44412
44412
  LucideInspectionPanel: InspectionPanel,
44413
44413
  LucideInstagram: Instagram,
@@ -44498,10 +44498,10 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
44498
44498
  LucideLocateFixed: LocateFixed,
44499
44499
  LucideLocateOff: LocateOff,
44500
44500
  LucideLocationEdit: MapPinPen,
44501
- LucideLock: Lock$1,
44501
+ LucideLock: Lock,
44502
44502
  LucideLockKeyhole: LockKeyhole,
44503
44503
  LucideLockKeyholeOpen: LockKeyholeOpen,
44504
- LucideLockOpen: LockOpen$1,
44504
+ LucideLockOpen: LockOpen,
44505
44505
  LucideLogIn: LogIn,
44506
44506
  LucideLogOut: LogOut,
44507
44507
  LucideLogs: Logs,
@@ -44730,7 +44730,7 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
44730
44730
  LucidePenOff: PenOff,
44731
44731
  LucidePenSquare: SquarePen,
44732
44732
  LucidePenTool: PenTool,
44733
- LucidePencil: Pencil,
44733
+ LucidePencil: Pencil$1,
44734
44734
  LucidePencilLine: PencilLine,
44735
44735
  LucidePencilOff: PencilOff,
44736
44736
  LucidePencilRuler: PencilRuler,
@@ -45229,7 +45229,7 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
45229
45229
  LucideUniversity: University,
45230
45230
  LucideUnlink: Unlink,
45231
45231
  LucideUnlink2: Unlink2,
45232
- LucideUnlock: LockOpen$1,
45232
+ LucideUnlock: LockOpen,
45233
45233
  LucideUnlockKeyhole: LockKeyholeOpen,
45234
45234
  LucideUnplug: Unplug,
45235
45235
  LucideUpload: Upload,
@@ -45785,8 +45785,8 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
45785
45785
  PenSquareIcon: SquarePen,
45786
45786
  PenTool,
45787
45787
  PenToolIcon: PenTool,
45788
- Pencil,
45789
- PencilIcon: Pencil,
45788
+ Pencil: Pencil$1,
45789
+ PencilIcon: Pencil$1,
45790
45790
  PencilLine,
45791
45791
  PencilLineIcon: PencilLine,
45792
45792
  PencilOff,
@@ -46783,8 +46783,8 @@ const lucideReact = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
46783
46783
  Unlink2,
46784
46784
  Unlink2Icon: Unlink2,
46785
46785
  UnlinkIcon: Unlink,
46786
- Unlock: LockOpen$1,
46787
- UnlockIcon: LockOpen$1,
46786
+ Unlock: LockOpen,
46787
+ UnlockIcon: LockOpen,
46788
46788
  UnlockKeyhole: LockKeyholeOpen,
46789
46789
  UnlockKeyholeIcon: LockKeyholeOpen,
46790
46790
  Unplug,
@@ -48697,7 +48697,7 @@ function requireGraphRenderer() {
48697
48697
  }, 100);
48698
48698
  return () => clearTimeout(timeoutId);
48699
48699
  }, [baseNodesKey, fitView]);
48700
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.ReactFlow, { nodes: xyflowNodes, edges: xyflowEdges, nodeTypes, edgeTypes, minZoom: 0.1, maxZoom: 4, defaultEdgeOptions: { type: "custom" }, onEdgeClick, onNodeClick, proOptions: { hideAttribution: true }, nodesDraggable: editable, elementsSelectable: true, nodesConnectable: editable, edgesReconnectable: editable, reconnectRadius: 100, elevateEdgesOnSelect: true, onNodesChange: handleNodesChange, onConnect: handleConnect, onReconnectStart: handleReconnectStart, onReconnect: handleReconnect, onReconnectEnd: handleReconnectEnd, panOnDrag: true, selectionOnDrag: false, children: [showBackground && (0, jsx_runtime_1.jsx)(react_2.Background, { color: theme.colors.border, gap: 16, size: 1 }), showControls && (0, jsx_runtime_1.jsx)(react_2.Controls, { showZoom: true, showFitView: true, showInteractive: true }), showMinimap && (0, jsx_runtime_1.jsx)(react_2.MiniMap, { nodeColor: (node) => {
48700
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.ReactFlow, { nodes: xyflowNodes, edges: xyflowEdges, nodeTypes, edgeTypes, minZoom: 0.1, maxZoom: 4, defaultEdgeOptions: { type: "custom" }, onEdgeClick, onNodeClick, proOptions: { hideAttribution: true }, nodesDraggable: editable, elementsSelectable: true, nodesConnectable: editable, edgesReconnectable: editable, reconnectRadius: 25, elevateEdgesOnSelect: true, onNodesChange: handleNodesChange, onConnect: handleConnect, onReconnectStart: handleReconnectStart, onReconnect: handleReconnect, onReconnectEnd: handleReconnectEnd, panOnDrag: true, selectionOnDrag: false, children: [showBackground && (0, jsx_runtime_1.jsx)(react_2.Background, { color: theme.colors.border, gap: 16, size: 1 }), showControls && (0, jsx_runtime_1.jsx)(react_2.Controls, { showZoom: true, showFitView: true, showInteractive: true }), showMinimap && (0, jsx_runtime_1.jsx)(react_2.MiniMap, { nodeColor: (node) => {
48701
48701
  var _a;
48702
48702
  const nodeData = node.data;
48703
48703
  return ((_a = nodeData == null ? void 0 : nodeData.typeDefinition) == null ? void 0 : _a.color) || theme.colors.secondary;
@@ -49300,19 +49300,31 @@ const FileBraces = createLucideIcon("file-braces", __iconNode$e);
49300
49300
  * See the LICENSE file in the root directory of this source tree.
49301
49301
  */
49302
49302
  const __iconNode$d = [
49303
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
49304
+ ["path", { d: "M12 16v-4", key: "1dtifu" }],
49305
+ ["path", { d: "M12 8h.01", key: "e9boi3" }]
49306
+ ];
49307
+ const Info = createLucideIcon("info", __iconNode$d);
49308
+ /**
49309
+ * @license lucide-react v0.552.0 - ISC
49310
+ *
49311
+ * This source code is licensed under the ISC license.
49312
+ * See the LICENSE file in the root directory of this source tree.
49313
+ */
49314
+ const __iconNode$c = [
49303
49315
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
49304
49316
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
49305
49317
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
49306
49318
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
49307
49319
  ];
49308
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$d);
49320
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$c);
49309
49321
  /**
49310
49322
  * @license lucide-react v0.552.0 - ISC
49311
49323
  *
49312
49324
  * This source code is licensed under the ISC license.
49313
49325
  * See the LICENSE file in the root directory of this source tree.
49314
49326
  */
49315
- const __iconNode$c = [
49327
+ const __iconNode$b = [
49316
49328
  ["path", { d: "M12 2v4", key: "3427ic" }],
49317
49329
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
49318
49330
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -49322,18 +49334,7 @@ const __iconNode$c = [
49322
49334
  ["path", { d: "M2 12h4", key: "j09sii" }],
49323
49335
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
49324
49336
  ];
49325
- const Loader = createLucideIcon("loader", __iconNode$c);
49326
- /**
49327
- * @license lucide-react v0.552.0 - ISC
49328
- *
49329
- * This source code is licensed under the ISC license.
49330
- * See the LICENSE file in the root directory of this source tree.
49331
- */
49332
- const __iconNode$b = [
49333
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
49334
- ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
49335
- ];
49336
- const LockOpen = createLucideIcon("lock-open", __iconNode$b);
49337
+ const Loader = createLucideIcon("loader", __iconNode$b);
49337
49338
  /**
49338
49339
  * @license lucide-react v0.552.0 - ISC
49339
49340
  *
@@ -49341,10 +49342,13 @@ const LockOpen = createLucideIcon("lock-open", __iconNode$b);
49341
49342
  * See the LICENSE file in the root directory of this source tree.
49342
49343
  */
49343
49344
  const __iconNode$a = [
49344
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
49345
- ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
49345
+ ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
49346
+ ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
49347
+ ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
49348
+ ["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }],
49349
+ ["path", { d: "M12 12V8", key: "2874zd" }]
49346
49350
  ];
49347
- const Lock = createLucideIcon("lock", __iconNode$a);
49351
+ const Network = createLucideIcon("network", __iconNode$a);
49348
49352
  /**
49349
49353
  * @license lucide-react v0.552.0 - ISC
49350
49354
  *
@@ -49352,13 +49356,10 @@ const Lock = createLucideIcon("lock", __iconNode$a);
49352
49356
  * See the LICENSE file in the root directory of this source tree.
49353
49357
  */
49354
49358
  const __iconNode$9 = [
49355
- ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
49356
- ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
49357
- ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
49358
- ["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }],
49359
- ["path", { d: "M12 12V8", key: "2874zd" }]
49359
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
49360
+ ["path", { d: "M9 3v18", key: "fh3hqa" }]
49360
49361
  ];
49361
- const Network = createLucideIcon("network", __iconNode$9);
49362
+ const PanelLeft = createLucideIcon("panel-left", __iconNode$9);
49362
49363
  /**
49363
49364
  * @license lucide-react v0.552.0 - ISC
49364
49365
  *
@@ -49366,10 +49367,10 @@ const Network = createLucideIcon("network", __iconNode$9);
49366
49367
  * See the LICENSE file in the root directory of this source tree.
49367
49368
  */
49368
49369
  const __iconNode$8 = [
49369
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
49370
- ["path", { d: "M9 3v18", key: "fh3hqa" }]
49370
+ ["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
49371
+ ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
49371
49372
  ];
49372
- const PanelLeft = createLucideIcon("panel-left", __iconNode$8);
49373
+ const Pause = createLucideIcon("pause", __iconNode$8);
49373
49374
  /**
49374
49375
  * @license lucide-react v0.552.0 - ISC
49375
49376
  *
@@ -49377,10 +49378,16 @@ const PanelLeft = createLucideIcon("panel-left", __iconNode$8);
49377
49378
  * See the LICENSE file in the root directory of this source tree.
49378
49379
  */
49379
49380
  const __iconNode$7 = [
49380
- ["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
49381
- ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
49381
+ [
49382
+ "path",
49383
+ {
49384
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
49385
+ key: "1a8usu"
49386
+ }
49387
+ ],
49388
+ ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
49382
49389
  ];
49383
- const Pause = createLucideIcon("pause", __iconNode$7);
49390
+ const Pencil = createLucideIcon("pencil", __iconNode$7);
49384
49391
  /**
49385
49392
  * @license lucide-react v0.552.0 - ISC
49386
49393
  *
@@ -53278,7 +53285,7 @@ const PrincipalViewGraphPanel = ({
53278
53285
  actions,
53279
53286
  events
53280
53287
  }) => {
53281
- var _a;
53288
+ var _a, _b, _c;
53282
53289
  const { theme } = useTheme();
53283
53290
  const graphRef = useRef(null);
53284
53291
  const [state, setState] = useState({
@@ -53291,6 +53298,7 @@ const PrincipalViewGraphPanel = ({
53291
53298
  selectedConfigId: null,
53292
53299
  showCanvasSelector: false,
53293
53300
  showHelp: false,
53301
+ showLegend: false,
53294
53302
  isEditMode: false,
53295
53303
  hasUnsavedChanges: false,
53296
53304
  isSaving: false,
@@ -53306,8 +53314,9 @@ const PrincipalViewGraphPanel = ({
53306
53314
  const selectedConfigIdRef = useRef(null);
53307
53315
  selectedConfigIdRef.current = state.selectedConfigId;
53308
53316
  const skipNextFileChangeRef = useRef(false);
53317
+ const [pathCopied, setPathCopied] = useState(false);
53309
53318
  const loadConfiguration = useCallback(async (configId) => {
53310
- var _a2, _b, _c;
53319
+ var _a2, _b2, _c2;
53311
53320
  setState((prev) => ({ ...prev, loading: prev.canvas === null, error: null }));
53312
53321
  try {
53313
53322
  const ctx = contextRef.current;
@@ -53388,7 +53397,7 @@ const PrincipalViewGraphPanel = ({
53388
53397
  const configDescriptions = {};
53389
53398
  configDescriptions[selectedConfig.id] = {
53390
53399
  name: ((_a2 = canvas.pv) == null ? void 0 : _a2.name) || selectedConfig.name,
53391
- description: ((_b = canvas.pv) == null ? void 0 : _b.description) || null
53400
+ description: ((_b2 = canvas.pv) == null ? void 0 : _b2.description) || null
53392
53401
  };
53393
53402
  const loadOtherDescriptions = async () => {
53394
53403
  for (const config of availableConfigs) {
@@ -53399,14 +53408,14 @@ const PrincipalViewGraphPanel = ({
53399
53408
  if (configContentStr && typeof configContentStr === "string") {
53400
53409
  const configCanvas = ConfigLoader.parseCanvas(configContentStr);
53401
53410
  setState((prev) => {
53402
- var _a3, _b2;
53411
+ var _a3, _b3;
53403
53412
  return {
53404
53413
  ...prev,
53405
53414
  configDescriptions: {
53406
53415
  ...prev.configDescriptions,
53407
53416
  [config.id]: {
53408
53417
  name: ((_a3 = configCanvas.pv) == null ? void 0 : _a3.name) || config.name,
53409
- description: ((_b2 = configCanvas.pv) == null ? void 0 : _b2.description) || null
53418
+ description: ((_b3 = configCanvas.pv) == null ? void 0 : _b3.description) || null
53410
53419
  }
53411
53420
  }
53412
53421
  };
@@ -53428,7 +53437,7 @@ const PrincipalViewGraphPanel = ({
53428
53437
  selectedConfigId: selectedConfig.id,
53429
53438
  hasUnsavedChanges: false
53430
53439
  }));
53431
- (_c = graphRef.current) == null ? void 0 : _c.resetEditState();
53440
+ (_c2 = graphRef.current) == null ? void 0 : _c2.resetEditState();
53432
53441
  } catch (error) {
53433
53442
  console.error("[PrincipalView] Error during config load:", error);
53434
53443
  setState((prev) => ({
@@ -53449,6 +53458,18 @@ const PrincipalViewGraphPanel = ({
53449
53458
  const toggleHelp = useCallback(() => {
53450
53459
  setState((prev) => ({ ...prev, showHelp: !prev.showHelp }));
53451
53460
  }, []);
53461
+ const toggleLegend = useCallback(() => {
53462
+ setState((prev) => ({ ...prev, showLegend: !prev.showLegend }));
53463
+ }, []);
53464
+ const copyConfigPath = useCallback(() => {
53465
+ const currentConfig = state.availableConfigs.find((c2) => c2.id === state.selectedConfigId);
53466
+ if (currentConfig == null ? void 0 : currentConfig.path) {
53467
+ navigator.clipboard.writeText(currentConfig.path).then(() => {
53468
+ setPathCopied(true);
53469
+ setTimeout(() => setPathCopied(false), 2e3);
53470
+ });
53471
+ }
53472
+ }, [state.availableConfigs, state.selectedConfigId]);
53452
53473
  const handleCanvasSelect = useCallback((configId) => {
53453
53474
  loadConfiguration(configId);
53454
53475
  }, [loadConfiguration]);
@@ -53466,7 +53487,7 @@ const PrincipalViewGraphPanel = ({
53466
53487
  setState((prev) => ({ ...prev, hasUnsavedChanges: false }));
53467
53488
  }, [loadConfiguration]);
53468
53489
  const saveAllChanges = useCallback(async () => {
53469
- var _a2, _b;
53490
+ var _a2, _b2;
53470
53491
  if (!state.canvas) return;
53471
53492
  const pendingChanges = (_a2 = graphRef.current) == null ? void 0 : _a2.getPendingChanges();
53472
53493
  const hasGraphChanges = (pendingChanges == null ? void 0 : pendingChanges.hasChanges) ?? false;
@@ -53498,7 +53519,7 @@ const PrincipalViewGraphPanel = ({
53498
53519
  isSaving: false,
53499
53520
  hasUnsavedChanges: false
53500
53521
  }));
53501
- (_b = graphRef.current) == null ? void 0 : _b.resetEditState();
53522
+ (_b2 = graphRef.current) == null ? void 0 : _b2.resetEditState();
53502
53523
  } catch (error) {
53503
53524
  console.error("[PrincipalView] Error saving changes:", error);
53504
53525
  setState((prev) => ({
@@ -53666,6 +53687,26 @@ const PrincipalViewGraphPanel = ({
53666
53687
  fontWeight: theme.fontWeights.medium,
53667
53688
  color: theme.colors.text
53668
53689
  }, children: ((_a = state.canvas.pv) == null ? void 0 : _a.name) || "Untitled" }),
53690
+ /* @__PURE__ */ jsx(
53691
+ "button",
53692
+ {
53693
+ onClick: copyConfigPath,
53694
+ title: pathCopied ? "Copied!" : "Copy path to clipboard",
53695
+ style: {
53696
+ display: "flex",
53697
+ alignItems: "center",
53698
+ justifyContent: "center",
53699
+ padding: theme.space[1],
53700
+ backgroundColor: "transparent",
53701
+ color: pathCopied ? theme.colors.success || "#22c55e" : theme.colors.textMuted,
53702
+ border: "none",
53703
+ borderRadius: theme.radii[0],
53704
+ cursor: "pointer",
53705
+ transition: "all 0.15s"
53706
+ },
53707
+ children: pathCopied ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 })
53708
+ }
53709
+ ),
53669
53710
  state.isEditMode && state.hasUnsavedChanges && /* @__PURE__ */ jsx("span", { style: {
53670
53711
  fontSize: theme.fontSizes[1],
53671
53712
  color: theme.colors.warning || "#f59e0b",
@@ -53727,6 +53768,29 @@ const PrincipalViewGraphPanel = ({
53727
53768
  )
53728
53769
  ] }) })
53729
53770
  ] }),
53771
+ /* @__PURE__ */ jsx(
53772
+ "button",
53773
+ {
53774
+ onClick: toggleLegend,
53775
+ title: "Edge Legend",
53776
+ style: {
53777
+ display: "flex",
53778
+ alignItems: "center",
53779
+ justifyContent: "center",
53780
+ width: 40,
53781
+ height: 39,
53782
+ padding: 0,
53783
+ backgroundColor: state.showLegend ? theme.colors.primary : "transparent",
53784
+ color: state.showLegend ? "white" : theme.colors.textMuted,
53785
+ border: "none",
53786
+ borderLeft: `1px solid ${theme.colors.border}`,
53787
+ cursor: "pointer",
53788
+ transition: "all 0.15s",
53789
+ flexShrink: 0
53790
+ },
53791
+ children: /* @__PURE__ */ jsx(Info, { size: 18 })
53792
+ }
53793
+ ),
53730
53794
  /* @__PURE__ */ jsx(
53731
53795
  "button",
53732
53796
  {
@@ -53771,7 +53835,7 @@ const PrincipalViewGraphPanel = ({
53771
53835
  transition: "all 0.15s",
53772
53836
  flexShrink: 0
53773
53837
  },
53774
- children: state.isEditMode ? /* @__PURE__ */ jsx(LockOpen, { size: 18 }) : /* @__PURE__ */ jsx(Lock, { size: 18 })
53838
+ children: /* @__PURE__ */ jsx(Pencil, { size: 18 })
53775
53839
  }
53776
53840
  )
53777
53841
  ] }),
@@ -54144,7 +54208,86 @@ const PrincipalViewGraphPanel = ({
54144
54208
  }
54145
54209
  ),
54146
54210
  /* @__PURE__ */ jsx(EmptyStateContent, { theme })
54147
- ] }) })
54211
+ ] }) }),
54212
+ state.showLegend && /* @__PURE__ */ jsxs("div", { style: {
54213
+ position: "absolute",
54214
+ top: 0,
54215
+ left: 0,
54216
+ right: 0,
54217
+ height: 40,
54218
+ backgroundColor: theme.colors.background,
54219
+ borderBottom: `1px solid ${theme.colors.border}`,
54220
+ padding: `0 ${theme.space[3]}`,
54221
+ display: "flex",
54222
+ alignItems: "center",
54223
+ gap: theme.space[4],
54224
+ overflowX: "auto",
54225
+ zIndex: 50,
54226
+ boxSizing: "border-box"
54227
+ }, children: [
54228
+ /* @__PURE__ */ jsx("span", { style: {
54229
+ fontSize: theme.fontSizes[1],
54230
+ fontWeight: theme.fontWeights.medium,
54231
+ color: theme.colors.textMuted,
54232
+ flexShrink: 0
54233
+ }, children: "Edges:" }),
54234
+ ((_c = (_b = state.canvas) == null ? void 0 : _b.pv) == null ? void 0 : _c.edgeTypes) && Object.keys(state.canvas.pv.edgeTypes).length > 0 ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: theme.space[4], flexWrap: "wrap" }, children: Object.entries(state.canvas.pv.edgeTypes).map(([typeName, edgeType]) => /* @__PURE__ */ jsxs(
54235
+ "div",
54236
+ {
54237
+ style: {
54238
+ display: "flex",
54239
+ alignItems: "center",
54240
+ gap: theme.space[2]
54241
+ },
54242
+ children: [
54243
+ /* @__PURE__ */ jsxs("svg", { width: "40", height: "12", style: { flexShrink: 0 }, children: [
54244
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
54245
+ "marker",
54246
+ {
54247
+ id: `legend-arrow-${typeName}`,
54248
+ markerWidth: "8",
54249
+ markerHeight: "6",
54250
+ refX: "7",
54251
+ refY: "3",
54252
+ orient: "auto",
54253
+ children: /* @__PURE__ */ jsx(
54254
+ "polygon",
54255
+ {
54256
+ points: "0 0, 8 3, 0 6",
54257
+ fill: edgeType.color || "#64748b"
54258
+ }
54259
+ )
54260
+ }
54261
+ ) }),
54262
+ /* @__PURE__ */ jsx(
54263
+ "line",
54264
+ {
54265
+ x1: "2",
54266
+ y1: "6",
54267
+ x2: "32",
54268
+ y2: "6",
54269
+ stroke: edgeType.color || "#64748b",
54270
+ strokeWidth: Math.min(edgeType.width || 2, 3),
54271
+ strokeDasharray: edgeType.style === "dashed" ? "4,2" : edgeType.style === "dotted" ? "2,2" : void 0,
54272
+ markerEnd: edgeType.directed ? `url(#legend-arrow-${typeName})` : void 0
54273
+ }
54274
+ )
54275
+ ] }),
54276
+ /* @__PURE__ */ jsx("span", { style: {
54277
+ fontSize: theme.fontSizes[1],
54278
+ color: theme.colors.text,
54279
+ textTransform: "capitalize",
54280
+ whiteSpace: "nowrap"
54281
+ }, children: typeName.replace(/-/g, " ") })
54282
+ ]
54283
+ },
54284
+ typeName
54285
+ )) }) : /* @__PURE__ */ jsx("span", { style: {
54286
+ fontSize: theme.fontSizes[1],
54287
+ color: theme.colors.textMuted,
54288
+ fontStyle: "italic"
54289
+ }, children: "No edge types defined" })
54290
+ ] })
54148
54291
  ] })
54149
54292
  ] });
54150
54293
  };