@industry-theme/principal-view-panels 0.1.40 → 0.1.41

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;AAuC/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwhCjE,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;AAuC/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyhCjE,CAAC"}
@@ -48596,7 +48596,7 @@ function requireGraphRenderer() {
48596
48596
  createdEdges: [],
48597
48597
  deletedEdges: []
48598
48598
  });
48599
- const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges, violations = [], configName: _configName, showMinimap = true, showControls = true, showBackground = true, backgroundVariant = "dots", showTooltips = true, events = [], onEventProcessed, editable = false, onPendingChangesChange, onEditStateChange, editStateRef, onSourceClick }) => {
48599
+ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges, violations = [], configName: _configName, showMinimap = true, showControls = true, showBackground = true, backgroundVariant = "dots", backgroundGap, showTooltips = true, events = [], onEventProcessed, editable = false, onPendingChangesChange, onEditStateChange, editStateRef, onSourceClick }) => {
48600
48600
  const { fitView } = (0, react_2.useReactFlow)();
48601
48601
  const { theme } = (0, industry_theme_1.useTheme)();
48602
48602
  const [animationState, setAnimationState] = (0, react_1.useState)({
@@ -49131,7 +49131,7 @@ function requireGraphRenderer() {
49131
49131
  }, 100);
49132
49132
  return () => clearTimeout(timeoutId);
49133
49133
  }, [baseNodesKey, baseEdgesKey, fitView]);
49134
- 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, onPaneClick, onSelectionChange: handleSelectionChange, panOnDrag: true, selectionOnDrag: false, selectionKeyCode: editable ? "Shift" : null, multiSelectionKeyCode: "Shift", children: [showBackground && (0, jsx_runtime_1.jsx)(react_2.Background, { color: backgroundVariant === "dots" ? theme.colors.border : theme.colors.textMuted, gap: backgroundVariant === "dots" ? 16 : 50, size: backgroundVariant === "dots" ? 1 : 0.5, variant: backgroundVariant === "dots" ? react_2.BackgroundVariant.Dots : backgroundVariant === "lines" ? react_2.BackgroundVariant.Lines : react_2.BackgroundVariant.Cross }), 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) => {
49134
+ 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, onPaneClick, onSelectionChange: handleSelectionChange, panOnDrag: true, selectionOnDrag: false, selectionKeyCode: editable ? "Shift" : null, multiSelectionKeyCode: "Shift", children: [showBackground && (0, jsx_runtime_1.jsx)(react_2.Background, { color: backgroundVariant === "dots" ? theme.colors.border : theme.colors.textMuted, gap: backgroundGap ?? (backgroundVariant === "dots" ? 16 : 50), size: backgroundVariant === "dots" ? 1 : 0.5, variant: backgroundVariant === "dots" ? react_2.BackgroundVariant.Dots : backgroundVariant === "lines" ? react_2.BackgroundVariant.Lines : react_2.BackgroundVariant.Cross }), 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) => {
49135
49135
  var _a;
49136
49136
  const nodeData = node.data;
49137
49137
  return ((_a = nodeData == null ? void 0 : nodeData.typeDefinition) == null ? void 0 : _a.color) || theme.colors.secondary;
@@ -49348,8 +49348,8 @@ function requireGraphRenderer() {
49348
49348
  }, children: (0, jsx_runtime_1.jsx)("p", { children: "No canvas data provided." }) });
49349
49349
  }
49350
49350
  const { configuration, nodes, edges } = canvasData;
49351
- const { violations, configName, showMinimap, showControls, showBackground, backgroundVariant, showTooltips, events, onEventProcessed, editable, onPendingChangesChange, onSourceClick } = props;
49352
- return (0, jsx_runtime_1.jsx)("div", { className, style: { width, height, position: "relative" }, children: (0, jsx_runtime_1.jsx)(react_2.ReactFlowProvider, { children: (0, jsx_runtime_1.jsx)(GraphRendererInner, { configuration, nodes, edges, violations, configName, showMinimap, showControls, showBackground, backgroundVariant, showTooltips, events, onEventProcessed, editable, onPendingChangesChange, editStateRef, onSourceClick }) }) });
49351
+ const { violations, configName, showMinimap, showControls, showBackground, backgroundVariant, backgroundGap, showTooltips, events, onEventProcessed, editable, onPendingChangesChange, onSourceClick } = props;
49352
+ return (0, jsx_runtime_1.jsx)("div", { className, style: { width, height, position: "relative" }, children: (0, jsx_runtime_1.jsx)(react_2.ReactFlowProvider, { children: (0, jsx_runtime_1.jsx)(GraphRendererInner, { configuration, nodes, edges, violations, configName, showMinimap, showControls, showBackground, backgroundVariant, backgroundGap, showTooltips, events, onEventProcessed, editable, onPendingChangesChange, editStateRef, onSourceClick }) }) });
49353
49353
  });
49354
49354
  exports$1.GraphRenderer.displayName = "GraphRenderer";
49355
49355
  })(GraphRenderer);
@@ -50899,6 +50899,7 @@ const PrincipalViewGraphPanel = ({
50899
50899
  showControls: true,
50900
50900
  showBackground: true,
50901
50901
  backgroundVariant: state.showGridLines ? "lines" : "dots",
50902
+ backgroundGap: state.showGridLines ? 75 : void 0,
50902
50903
  showTooltips: state.showTooltips,
50903
50904
  editable: state.isEditMode,
50904
50905
  onPendingChangesChange: handlePendingChangesChange,