likec4 1.27.1 → 1.27.3

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.
@@ -8665,10 +8665,10 @@ const a=super.elementToSubgraph(e,o);return e.children.length>1&&a.set(attribute
8665
8665
  set(c?attribute.xlabel:attribute.label,f),e.color){const l=this.getRelationshipColorValues(e.color);r.attributes.apply({[attribute.color]:l.lineColor,[attribute.fontcolor]:l.labelColor});}let[i,u]=[e.head??DefaultArrowType,e.tail??"none"];return i==="none"&&u==="none"?(r.attributes.apply({[attribute.arrowtail]:"none",[attribute.arrowhead]:"none",[attribute.dir]:"none"}),r):e.dir==="both"?(r.attributes.apply({[attribute.arrowhead]:toArrowType(i),[attribute.arrowtail]:toArrowType(e.tail??i),[attribute.dir]:"both"}),!c&&ComputedNode$1.modelRef(w)!==ComputedNode$1.modelRef(v)&&r.attributes.set(attribute.constraint,false),r):(i!==DefaultArrowType&&r.attributes.set(
8666
8666
  attribute.arrowhead,toArrowType(i)),u!=="none"&&r.attributes.set(attribute.arrowtail,toArrowType(u)),r)}}
8667
8667
 
8668
- class DynamicViewPrinter extends DotPrinter{static toDot(t){return new DynamicViewPrinter(t).print()}postBuild(t){t.set(attribute.TBbalance,"max");}addEdge(t,b){const{nodes:n}=this.
8669
- view,[s,p]=t.dir==="back"?[t.target,t.source]:[t.source,t.target],[T,h,c]=this.edgeEndpoint(s,e=>last(e)),[V,f,d]=this.edgeEndpoint(p,first),r=b.edge([h,f],{[attribute.likec4_id]:t.id,[attribute.style]:t.line??DefaultEdgeStyle});if(d&&r.attributes.set(attribute.lhead,d),c&&r.attributes.set(attribute.ltail,c),t.color&&t.color!==DefaultRelationshipColor){const e=this.getRelationshipColorValues(t.color);r.attributes.apply({[attribute.color]:e.lineColor,[attribute.fontcolor]:e.labelColor});}const y=[t.label?.trim(),t.technology?.trim()].filter(isTruthy).join(`
8670
- `),w=extractStep(t.id),x=stepEdgeLabel(w,y);r.attributes.set(attribute.label,x);const u=this.graphology.getEdgeAttribute(t.id,"weight");t.source!==t.target&&u>1&&r.attributes.set(attribute.weight,u);const D=n.findIndex(e=>e.id===s);n.findIndex(e=>e.id===p)<D&&t.dir!=="back"&&r.attributes.apply({[attribute.constraint]:false});let[i,a]=[t.head??DefaultArrowType,t.tail??"none"];return t.dir==="back"?(r.attributes.apply({[attribute.arrowtail]:toArrowType(i),[attribute.minlen]:0,[attribute.dir]:"back"}),a!=="none"&&r.attributes.apply({[attribute.arrowhead]:toArrowType(a),[attribute.dir]:"both"}),r):i==="none"&&a==="none"||
8671
- i!=="none"&&a!=="none"?(r.attributes.apply({[attribute.arrowhead]:toArrowType(i),[attribute.arrowtail]:toArrowType(a),[attribute.dir]:"both"}),r):i==="none"?(r.attributes.delete(attribute.arrowhead),r.attributes.apply({[attribute.arrowtail]:toArrowType(a),[attribute.minlen]:0,[attribute.dir]:"back"}),r):(i!==DefaultArrowType&&r.attributes.set(attribute.arrowhead,toArrowType(i)),r)}}
8668
+ class DynamicViewPrinter extends DotPrinter{static toDot(t){return new DynamicViewPrinter(t).print()}postBuild(t){t.delete(attribute.TBbalance);}addEdge(t,b){const{nodes:n}=this.
8669
+ view,[s,p]=t.dir==="back"?[t.target,t.source]:[t.source,t.target],[T,h,d]=this.edgeEndpoint(s,r=>last(r)),[V,f,c]=this.edgeEndpoint(p,first),e=b.edge([h,f],{[attribute.likec4_id]:t.id,[attribute.style]:t.line??DefaultEdgeStyle});if(c&&e.attributes.set(attribute.lhead,c),d&&e.attributes.set(attribute.ltail,d),t.color&&t.color!==DefaultRelationshipColor){const r=this.getRelationshipColorValues(t.color);e.attributes.apply({[attribute.color]:r.lineColor,[attribute.fontcolor]:r.labelColor});}const y=[t.label?.trim(),t.technology?.trim()].filter(isTruthy).join(`
8670
+ `),w=extractStep(t.id),D=stepEdgeLabel(w,y);e.attributes.set(attribute.label,D);const u=this.graphology.getEdgeAttribute(t.id,"weight");t.source!==t.target&&u>1&&e.attributes.set(attribute.weight,u);const E=n.findIndex(r=>r.id===s);n.findIndex(r=>r.id===p)<E&&t.dir!=="back"&&e.attributes.apply({[attribute.constraint]:false});let[i,a]=[t.head??DefaultArrowType,t.tail??"none"];return t.dir==="back"?(e.attributes.apply({[attribute.arrowtail]:toArrowType(i),[attribute.minlen]:0,[attribute.dir]:"back"}),a!=="none"&&e.attributes.apply({[attribute.arrowhead]:toArrowType(a),[attribute.dir]:"both"}),e):i==="none"&&a==="none"||
8671
+ i!=="none"&&a!=="none"?(e.attributes.apply({[attribute.arrowhead]:toArrowType(i),[attribute.arrowtail]:toArrowType(a),[attribute.dir]:"both"}),e):i==="none"?(e.attributes.delete(attribute.arrowhead),e.attributes.apply({[attribute.arrowtail]:toArrowType(a),[attribute.minlen]:0,[attribute.dir]:"back"}),e):(i!==DefaultArrowType&&e.attributes.set(attribute.arrowhead,toArrowType(i)),e)}}
8672
8672
 
8673
8673
  class ElementViewPrinter extends DotPrinter{postBuild(t){this.assignGroups();const b=new Set,w=this.view.nodes.reduce((l,i)=>(isCompound(i)&&(b.add(
8674
8674
  i.id),l.push(i)),l),[]);let h=false;for(const l of w){const i=pipe(l.children,filter(n=>!this.compoundIds.has(n)),map(n=>this.computedNode(n)),filter(n=>n.inEdges.length===0&&n.outEdges.length===0));if(i.length<=2)continue;let s=2;switch(true){case i.length>11:s=4;break;case i.length>4:s=3;break}const g=nonNullable(this.getSubgraph(l.id),`Subgraph not found for ${l.id}`);let f=null;chunk(i,s).forEach(n=>{const a=n.length>1?g.createSubgraph({[attribute.rank]:"same"}):null;n.forEach((m,r)=>{const d=this.getGraphNode(m.id);d&&(a?.node(d.id),
@@ -1,4 +1,4 @@
1
- import{relative as Z}from"node:path";import{f as ee,g as x,T as te,N as U,i as ne,n as _,j as S,u as m,l as ie,C as re,a as oe,b as D,c as ae,t as se,d as P,m as de,p as ce,e as O,L as le}from"./likec4.CcbefjP5.mjs";function pe(t){var e,i;if(t){if("astNode"in t)return ge(t);if(Array.isArray(t))return t.reduce(A,void 0);{const n=t,r=ue(n)?fe((i=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&i!==void 0?i:n?.astNode):void 0;return v(n,r)}}else return}function ue(t){return typeof t<"u"&&"e\
1
+ import{relative as Z}from"node:path";import{f as ee,g as x,T as te,N as U,i as ne,n as _,j as S,u as m,l as ie,C as re,a as oe,b as D,c as ae,t as se,d as P,m as de,p as ce,e as O,L as le}from"./likec4.CY1x3B5z.mjs";function pe(t){var e,i;if(t){if("astNode"in t)return ge(t);if(Array.isArray(t))return t.reduce(A,void 0);{const n=t,r=ue(n)?fe((i=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&i!==void 0?i:n?.astNode):void 0;return v(n,r)}}else return}function ue(t){return typeof t<"u"&&"e\
2
2
  lement"in t&&"text"in t}function fe(t){try{return x(t).uri.toString()}catch{return}}function ge(t){var e,i;const{astNode:n,property:r,index:a}=t??{},o=(e=n?.$cstNode)!==null&&e!==void 0?e:n?.$textRegion;if(!(n===void 0||o===void 0)){if(r===void 0)return v(o,T(n));{const s=d=>a!==void 0&&a>-1&&Array.isArray(n[r])?a<d.length?d[a]:void 0:d.reduce(A,void 0);if(!((i=o.assignments)===null||i===void 0)&&i[r]){const d=s(o.assignments[r]);return d&&v(d,T(n))}else if(n.$cstNode){const d=s(ee(n.$cstNode,r));
3
3
  return d&&v(d,T(n))}else return}}}function T(t){var e,i,n,r;return t.$cstNode?(i=(e=x(t))===null||e===void 0?void 0:e.uri)===null||i===void 0?void 0:i.toString():t.$textRegion?t.$textRegion.documentURI||((r=(n=new te(t,a=>a.$container?[a.$container]:[]).find(a=>{var o;return(o=a.$textRegion)===null||o===void 0?void 0:o.documentURI}))===null||n===void 0?void 0:n.$textRegion)===null||r===void 0?void 0:r.documentURI):void 0}function v(t,e){var i,n;const r={offset:t.offset,end:(i=t.end)!==null&&i!==
4
4
  void 0?i:t.offset+t.length,length:(n=t.length)!==null&&n!==void 0?n:t.end-t.offset};return t.range&&(r.range=t.range),e??(e=t.fileURI),e&&(r.fileURI=e),r}function A(t,e){var i,n;if(t){if(!e)return t&&v(t)}else return e&&v(e);const r=(i=t.end)!==null&&i!==void 0?i:t.offset+t.length,a=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,o=Math.min(t.offset,e.offset),s=Math.max(r,a),d=s-o,c={offset:o,end:s,length:d};if(t.range&&e.range&&(c.range={start:e.range.start.line<t.range.start.line||e.range.start.
@@ -1,4 +1,4 @@
1
- import { L as LikeC4LanguageServices } from '../shared/likec4.C0T-ybr5.mjs';
1
+ import { L as LikeC4LanguageServices } from '../shared/likec4.QmEWuoHf.mjs';
2
2
  import '@likec4/core';
3
3
  import 'type-fest';
4
4
  import '@likec4/core/types';
@@ -1,2 +1,2 @@
1
- export{L as LikeC4VitePlugin}from"../shared/likec4.D_ELXBwW.mjs";import"node:path";import"../shared/likec4.CcbefjP5.mjs";import"node:fs";import"node:url";import"tty";import"node:util";import"util";import"path";import"os";import"crypto";import"net";import"url";import"fs";import"child_process";import"@likec4/core";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"node:process";import"boxen";import"node:child_process";
1
+ export{L as LikeC4VitePlugin}from"../shared/likec4.sbYSTpRI.mjs";import"node:path";import"../shared/likec4.CY1x3B5z.mjs";import"node:fs";import"node:url";import"tty";import"node:util";import"util";import"path";import"os";import"crypto";import"net";import"url";import"fs";import"child_process";import"@likec4/core";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"node:process";import"boxen";import"node:child_process";
2
2
  import"node:events";import"node:fs/promises";import"node:stream/promises";import"node:os";import"fs/promises";import"@likec4/core/model";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "likec4",
3
- "version": "1.27.1",
3
+ "version": "1.27.3",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -77,31 +77,31 @@
77
77
  "playwright": "^1.51.1",
78
78
  "react": "^19.0.0",
79
79
  "react-dom": "^19.0.0",
80
- "rollup": "^4.37.0",
80
+ "rollup": "^4.38.0",
81
81
  "type-fest": "^4.38.0",
82
- "vite": "^6.2.3",
83
- "@likec4/core": "1.27.1"
82
+ "vite": "^6.2.4",
83
+ "@likec4/core": "1.27.3"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@pandacss/dev": "^0.53.3",
87
87
  "@dagrejs/dagre": "1.1.4",
88
88
  "@fontsource/ibm-plex-sans": "^5.2.5",
89
- "@mantine/core": "7.17.2",
90
- "@mantine/hooks": "7.17.2",
89
+ "@mantine/core": "7.17.3",
90
+ "@mantine/hooks": "7.17.3",
91
91
  "@nanostores/react": "0.8.4",
92
92
  "@react-hookz/web": "^25.1.0",
93
93
  "@tabler/icons-react": "3.31.0",
94
94
  "@tanstack/react-router": "^1.114.13",
95
95
  "@tanstack/router-cli": "^1.114.13",
96
96
  "@tanstack/router-vite-plugin": "^1.114.13",
97
- "@types/node": "^20.17.27",
97
+ "@types/node": "^20.17.28",
98
98
  "@types/prop-types": "^15.7.14",
99
99
  "@types/react": "^19.0.12",
100
100
  "@types/react-dom": "^19.0.4",
101
- "@types/semver": "^7.5.8",
101
+ "@types/semver": "^7.7.0",
102
102
  "@types/yargs": "^17.0.33",
103
- "@xyflow/react": "^12.4.4",
104
- "@xyflow/system": "^0.0.52",
103
+ "@xyflow/react": "^12.5.2",
104
+ "@xyflow/system": "^0.0.53",
105
105
  "dts-bundle-generator": "^9.5.1",
106
106
  "autoprefixer": "^10.4.21",
107
107
  "classnames": "^2.5.1",
@@ -114,14 +114,14 @@
114
114
  "esm-env": "^1.2.2",
115
115
  "fast-equals": "^5.2.2",
116
116
  "fdir": "^6.4.3",
117
- "framer-motion": "^12.5.0",
117
+ "framer-motion": "^12.6.2",
118
118
  "get-port": "^7.1.0",
119
119
  "glob": "^11.0.1",
120
120
  "html-to-image": "^1.11.13",
121
121
  "json5": "^2.2.3",
122
122
  "ky": "^1.7.5",
123
123
  "langium": "3.4.0",
124
- "merge-error-cause": "^5.0.1",
124
+ "merge-error-cause": "^5.0.2",
125
125
  "mkdirp": "^3.0.1",
126
126
  "nano-spawn": "^0.2.0",
127
127
  "nanostores": "0.11.4",
@@ -156,15 +156,15 @@
156
156
  "wireit": "^0.14.11",
157
157
  "which": "^5.0.0",
158
158
  "yargs": "17.7.2",
159
- "@likec4/style-preset": "1.27.1",
160
- "@likec4/styles": "1.27.1",
161
- "@likec4/diagram": "1.27.1",
162
- "@likec4/generators": "1.27.1",
163
- "@likec4/icons": "1.27.1",
164
- "@likec4/language-server": "1.27.1",
165
- "@likec4/layouts": "1.27.1",
166
- "@likec4/log": "1.27.1",
167
- "@likec4/tsconfig": "1.27.1"
159
+ "@likec4/style-preset": "1.27.3",
160
+ "@likec4/styles": "1.27.3",
161
+ "@likec4/diagram": "1.27.3",
162
+ "@likec4/icons": "1.27.3",
163
+ "@likec4/generators": "1.27.3",
164
+ "@likec4/language-server": "1.27.3",
165
+ "@likec4/log": "1.27.3",
166
+ "@likec4/tsconfig": "1.27.3",
167
+ "@likec4/layouts": "1.27.3"
168
168
  },
169
169
  "scripts": {
170
170
  "typecheck": "tsc --build --verbose",
package/react/index.d.mts CHANGED
@@ -655,12 +655,12 @@ interface DiagramNode extends ComputedNode {
655
655
  labelBBox: BBox;
656
656
  }
657
657
  declare namespace DiagramNode {
658
- function modelRef(node: DiagramNode): Fqn | null;
659
- function deploymentRef(node: DiagramNode): Fqn | null;
658
+ function modelRef(node: Pick<DiagramNode, "id" | "modelRef">): Fqn | null;
659
+ function deploymentRef(node: Pick<DiagramNode, "id" | "deploymentRef">): Fqn | null;
660
660
  /**
661
661
  * Nodes group is a special kind of node, exisiting only in view
662
662
  */
663
- function isNodesGroup(node: DiagramNode): boolean;
663
+ function isNodesGroup(node: Pick<DiagramNode, "kind">): boolean;
664
664
  }
665
665
  interface DiagramEdge extends ComputedEdge {
666
666
  points: NonEmptyArray<Point>;
@@ -945,8 +945,18 @@ type OnConnectStartParams = {
945
945
  type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectStartParams) => void;
946
946
  type OnConnect = (connection: Connection) => void;
947
947
  type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
948
+ type PaddingUnit = "px" | "%";
949
+ type PaddingWithUnit = `${number}${PaddingUnit}` | number;
950
+ type Padding = PaddingWithUnit | {
951
+ top?: PaddingWithUnit;
952
+ right?: PaddingWithUnit;
953
+ bottom?: PaddingWithUnit;
954
+ left?: PaddingWithUnit;
955
+ x?: PaddingWithUnit;
956
+ y?: PaddingWithUnit;
957
+ };
948
958
  type FitViewOptionsBase<NodeType extends NodeBase = NodeBase> = {
949
- padding?: number;
959
+ padding?: Padding;
950
960
  includeHiddenNodes?: boolean;
951
961
  minZoom?: number;
952
962
  maxZoom?: number;
@@ -979,7 +989,7 @@ type SetCenterOptions = ViewportHelperFunctionOptions & {
979
989
  type FitBoundsOptions = ViewportHelperFunctionOptions & {
980
990
  padding?: number;
981
991
  };
982
- type PanelPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
992
+ type PanelPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "center-left" | "center-right";
983
993
  type ProOptions = {
984
994
  account?: string;
985
995
  hideAttribution: boolean;
@@ -1117,7 +1127,7 @@ type OnSelectionChangeParams<NodeType extends Node$1 = Node$1, EdgeType extends
1117
1127
  };
1118
1128
  type OnSelectionChangeFunc<NodeType extends Node$1 = Node$1, EdgeType extends Edge = Edge> = (params: OnSelectionChangeParams<NodeType, EdgeType>) => void;
1119
1129
  type FitViewOptions<NodeType extends Node$1 = Node$1> = FitViewOptionsBase<NodeType>;
1120
- type FitView = (fitViewOptions?: FitViewOptions) => Promise<boolean>;
1130
+ type FitView<NodeType extends Node$1 = Node$1> = (fitViewOptions?: FitViewOptions<NodeType>) => Promise<boolean>;
1121
1131
  type OnInit<NodeType extends Node$1 = Node$1, EdgeType extends Edge = Edge> = (reactFlowInstance: ReactFlowInstance<NodeType, EdgeType>) => void;
1122
1132
  type ViewportHelperFunctions = {
1123
1133
  /**
@@ -1158,17 +1168,6 @@ type ViewportHelperFunctions = {
1158
1168
  * @returns Viewport
1159
1169
  */
1160
1170
  getViewport: GetViewport;
1161
- /**
1162
- * Fits the view.
1163
- *
1164
- * @param options.padding - optional padding
1165
- * @param options.includeHiddenNodes - optional includeHiddenNodes
1166
- * @param options.minZoom - optional minZoom
1167
- * @param options.maxZoom - optional maxZoom
1168
- * @param options.duration - optional duration. If set, a transition will be applied
1169
- * @param options.nodes - optional nodes to fit the view to
1170
- */
1171
- fitView: FitView;
1172
1171
  /**
1173
1172
  * Sets the center of the view to the given position.
1174
1173
  *
@@ -1222,7 +1221,14 @@ type SelectionDragHandler<NodeType extends Node$1 = Node$1> = (event: ReactMouse
1222
1221
  type OnNodeDrag<NodeType extends Node$1 = Node$1> = (event: ReactMouseEvent, node: NodeType, nodes: NodeType[]) => void;
1223
1222
  type NodeProps$1<NodeType extends Node$1 = Node$1> = NodeProps<NodeType>;
1224
1223
  type EdgeLabelOptions = {
1225
- label?: string | ReactNode;
1224
+ /**
1225
+ * The label or custom element to render along the edge. This is commonly a text label or some
1226
+ * custom controls.
1227
+ */
1228
+ label?: ReactNode;
1229
+ /**
1230
+ * Custom styles to apply to the label.
1231
+ */
1226
1232
  labelStyle?: CSSProperties;
1227
1233
  labelShowBg?: boolean;
1228
1234
  labelBgStyle?: CSSProperties;
@@ -1988,6 +1994,7 @@ type GeneralHelpers<NodeType extends Node$1 = Node$1, EdgeType extends Edge = Ed
1988
1994
  nodeId: string;
1989
1995
  handleId?: string | null;
1990
1996
  }) => NodeConnection[];
1997
+ fitView: FitView<NodeType>;
1991
1998
  };
1992
1999
  type ReactFlowInstance<NodeType extends Node$1 = Node$1, EdgeType extends Edge = Edge> = GeneralHelpers<NodeType, EdgeType> & Omit<ViewportHelperFunctions, "initialized"> & {
1993
2000
  viewportInitialized: boolean;
@@ -2020,6 +2027,8 @@ type ChangeEvent = {
2020
2027
  };
2021
2028
  type OnChange = (event: ChangeEvent) => void;
2022
2029
  type OverrideReactFlowProps = Pick<ReactFlowProps, "paneClickDistance" | "nodeClickDistance" | "selectionKeyCode" | "panActivationKeyCode" | "multiSelectionKeyCode" | "zoomActivationKeyCode" | "snapToGrid" | "snapGrid" | "onlyRenderVisibleElements" | "nodesDraggable" | "nodesFocusable" | "elementsSelectable" | "selectNodesOnDrag" | "panOnDrag" | "preventScrolling" | "zoomOnScroll" | "zoomOnPinch" | "panOnScroll" | "panOnScrollSpeed" | "panOnScrollMode" | "zoomOnDoubleClick" | "nodeDragThreshold">;
2030
+ type PaddingUnit$1 = "px" | "%";
2031
+ type PaddingWithUnit$1 = `${number}${PaddingUnit$1}` | number;
2023
2032
  interface LikeC4DiagramProperties {
2024
2033
  view: DiagramView;
2025
2034
  className?: string | undefined;
@@ -2050,10 +2059,10 @@ interface LikeC4DiagramProperties {
2050
2059
  */
2051
2060
  fitView?: boolean | undefined;
2052
2061
  /**
2053
- * Seems like this is percentage of the view size
2054
- * @default 0
2062
+ * Padding around the diagram
2063
+ * @default '8px'
2055
2064
  */
2056
- fitViewPadding?: number | undefined;
2065
+ fitViewPadding?: PaddingWithUnit$1 | undefined;
2057
2066
  /**
2058
2067
  * @default false if readonly
2059
2068
  */
@@ -2222,10 +2231,10 @@ export interface LikeC4ViewProps<ViewId = string, Tag = string, Kind = string> {
2222
2231
  */
2223
2232
  fitView?: boolean | undefined;
2224
2233
  /**
2225
- * Seems like this is percentage of the view size
2226
- * @default 0.1
2234
+ * Padding around the diagram
2235
+ * @default '8px'
2227
2236
  */
2228
- fitViewPadding?: number | undefined;
2237
+ fitViewPadding?: PaddingWithUnit$1 | undefined;
2229
2238
  /**
2230
2239
  * Display diagram title / description
2231
2240
  *
@@ -2302,10 +2311,10 @@ interface LikeC4BrowserProps {
2302
2311
  */
2303
2312
  background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
2304
2313
  /**
2305
- * Seems like this is percentage of the view size
2306
- * @default 0.1
2314
+ * Padding around the diagram
2315
+ * @default '16px'
2307
2316
  */
2308
- fitViewPadding?: number | undefined;
2317
+ fitViewPadding?: PaddingWithUnit$1 | undefined;
2309
2318
  /**
2310
2319
  * Show/hide panel with top left controls,
2311
2320
  * @default true