@likec4/diagram 1.1.0 → 1.1.1

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,4 +1,4 @@
1
1
  import { LikeC4DiagramEventHandlers, LikeC4DiagramProperties } from './LikeC4Diagram.props';
2
2
 
3
3
  export type LikeC4DiagramProps = LikeC4DiagramProperties & LikeC4DiagramEventHandlers;
4
- export declare function LikeC4Diagram({ view, className, fitView, fitViewPadding, readonly, pannable, zoomable, nodesSelectable, nodesDraggable, background, controls, showElementLinks, initialWidth, initialHeight, keepAspectRatio, onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onChange, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu }: LikeC4DiagramProps): JSX.Element;
4
+ export declare function LikeC4Diagram({ view, className, fitView, fitViewPadding, readonly, pannable, zoomable, nodesSelectable, nodesDraggable, background, controls, showElementLinks, showDiagramTitle, initialWidth, initialHeight, keepAspectRatio, onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onChange, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu }: LikeC4DiagramProps): JSX.Element;
@@ -1,8 +1,8 @@
1
- import { XYBackgroundProps } from './xyflow/XYFlowBackground';
2
1
  import { XYFlowEdge, XYFlowNode } from './xyflow/types';
2
+ import { XYBackgroundProps } from './xyflow/XYFlowBackground';
3
3
  import { SetRequired, Simplify } from 'type-fest';
4
4
  import { MouseEvent as ReactMouseEvent } from 'react';
5
- import { DiagramEdge, DiagramNode, DiagramView, ElementShape, Fqn, NonEmptyArray, ThemeColor, ViewID } from '@likec4/core';
5
+ import { BorderStyle, DiagramEdge, DiagramNode, DiagramView, ElementShape, Fqn, NonEmptyArray, ThemeColor, ViewID } from '@likec4/core';
6
6
 
7
7
  export type DiagramNodeWithNavigate = Simplify<SetRequired<DiagramNode, 'navigateTo'>>;
8
8
  export type OnNavigateTo = {
@@ -23,18 +23,18 @@ export type OnEdgeClick = (event: {
23
23
  */
24
24
  export type OnCanvasClick = (event: ReactMouseEvent) => void;
25
25
  export declare namespace Changes {
26
- interface ChangeColor {
27
- op: 'change-color';
28
- color: ThemeColor;
29
- targets: NonEmptyArray<Fqn>;
30
- }
31
- interface ChangeShape {
32
- op: 'change-shape';
33
- shape: ElementShape;
26
+ interface ChangeElementStyle {
27
+ op: 'change-element-style';
28
+ style: {
29
+ border?: BorderStyle;
30
+ opacity?: number;
31
+ shape?: ElementShape;
32
+ color?: ThemeColor;
33
+ };
34
34
  targets: NonEmptyArray<Fqn>;
35
35
  }
36
36
  }
37
- export type Change = Changes.ChangeColor | Changes.ChangeShape;
37
+ export type Change = Changes.ChangeElementStyle;
38
38
  export type ChangeEvent = {
39
39
  changes: NonEmptyArray<Change>;
40
40
  };
@@ -103,6 +103,11 @@ export interface LikeC4DiagramProperties {
103
103
  * @default true
104
104
  */
105
105
  showElementLinks?: boolean | undefined;
106
+ /**
107
+ * Display panel with diagram title / description
108
+ * @default true
109
+ */
110
+ showDiagramTitle?: boolean | undefined;
106
111
  }
107
112
  export interface LikeC4DiagramEventHandlers {
108
113
  onChange?: OnChange | null | undefined;