likec4 1.34.2 → 1.35.0

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.
@@ -2,7 +2,7 @@ import { Tagged, ValueOf, ConditionalPick, Writable, Simplify, MergeExclusive }
2
2
  import * as c4 from '@likec4/core';
3
3
  import { Fqn, EdgeId, AnyAux, aux, ComputedView, Specification, DiagramView, MultiMap as MultiMap$1, ProjectId, NonEmptyArray, NonEmptyReadonlyArray, ViewId, RelationId, DeploymentFqn, ViewChange } from '@likec4/core';
4
4
  import { LikeC4Model } from '@likec4/core/model';
5
- import picomatch from '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.0/node_modules/@types/picomatch/posix.d.ts';
5
+ import picomatch from '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.2/node_modules/@types/picomatch/posix.d.ts';
6
6
  import { ProjectId as ProjectId$1, Fqn as Fqn$1 } from '@likec4/core/types';
7
7
  import { DefaultWeakMap, MultiMap as MultiMap$2 } from '@likec4/core/utils';
8
8
 
@@ -16262,7 +16262,7 @@ interface LineProperty extends AstNode {
16262
16262
  }
16263
16263
  declare const LineProperty = "LineProperty";
16264
16264
  interface LinkProperty extends AstNode {
16265
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | RelationBody;
16265
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
16266
16266
  readonly $type: 'LinkProperty';
16267
16267
  key: 'link';
16268
16268
  title?: string;
@@ -16270,7 +16270,7 @@ interface LinkProperty extends AstNode {
16270
16270
  }
16271
16271
  declare const LinkProperty = "LinkProperty";
16272
16272
  interface MarkdownOrString extends AstNode {
16273
- readonly $container: ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
16273
+ readonly $container: ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
16274
16274
  readonly $type: 'MarkdownOrString';
16275
16275
  markdown?: string;
16276
16276
  text?: string;
@@ -16306,6 +16306,7 @@ declare const ModelDeployments = "ModelDeployments";
16306
16306
  interface ModelViews extends AstNode {
16307
16307
  readonly $container: LikeC4Grammar;
16308
16308
  readonly $type: 'ModelViews';
16309
+ folder?: string;
16309
16310
  name: 'views';
16310
16311
  styles: Array<ViewRuleStyleOrGlobalRef>;
16311
16312
  views: Array<LikeC4View>;
@@ -16464,7 +16465,7 @@ interface SpecificationDeploymentNodeKind extends AstNode {
16464
16465
  readonly $container: SpecificationRule;
16465
16466
  readonly $type: 'SpecificationDeploymentNodeKind';
16466
16467
  kind: DeploymentNodeKind;
16467
- props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
16468
+ props: Array<ElementStyleProperty | LinkProperty | SpecificationElementStringProperty>;
16468
16469
  tags?: Tags;
16469
16470
  }
16470
16471
  declare const SpecificationDeploymentNodeKind = "SpecificationDeploymentNodeKind";
@@ -16472,15 +16473,15 @@ interface SpecificationElementKind extends AstNode {
16472
16473
  readonly $container: SpecificationRule;
16473
16474
  readonly $type: 'SpecificationElementKind';
16474
16475
  kind: ElementKind;
16475
- props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
16476
+ props: Array<ElementStyleProperty | LinkProperty | SpecificationElementStringProperty>;
16476
16477
  tags?: Tags;
16477
16478
  }
16478
16479
  declare const SpecificationElementKind = "SpecificationElementKind";
16479
16480
  interface SpecificationElementStringProperty extends AstNode {
16480
16481
  readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
16481
16482
  readonly $type: 'SpecificationElementStringProperty';
16482
- key: 'notation' | 'technology';
16483
- value: string;
16483
+ key: 'description' | 'notation' | 'technology' | 'title';
16484
+ value: MarkdownOrString;
16484
16485
  }
16485
16486
  declare const SpecificationElementStringProperty = "SpecificationElementStringProperty";
16486
16487
  interface SpecificationRelationshipKind extends AstNode {
@@ -1,4 +1,4 @@
1
- import{relative as de}from"node:path";import{f as ce,g as J,T as le,N as V,i as pe,n as x,j as U,u as N,l as ue,C as fe,m as ge,a as he,b as me,c as we,d as W,e as Ie,p as Ne,h as G,L as ye}from"./likec4.B5b4pT-B.mjs";import{compareNatural as ve}from"@likec4/core/utils";import{RichText as ke}from"@likec4/core/types";function Le(n){var e,i;if(n){if("astNode"in n)return Se(n);if(Array.isArray(n))return n.reduce(z,void 0);{const t=n,r=$e(t)?je((i=(e=t?.root)===null||e===void 0?void 0:e.astNode)!==null&&
1
+ import{relative as de}from"node:path";import{f as ce,g as J,T as le,N as V,i as pe,n as x,j as U,u as N,l as ue,C as fe,m as ge,a as he,b as me,c as we,d as W,e as Ie,p as Ne,h as G,L as ye}from"./likec4.B4j8eNO5.mjs";import{compareNatural as ve}from"@likec4/core/utils";import{RichText as ke}from"@likec4/core/types";function Le(n){var e,i;if(n){if("astNode"in n)return Se(n);if(Array.isArray(n))return n.reduce(z,void 0);{const t=n,r=$e(t)?je((i=(e=t?.root)===null||e===void 0?void 0:e.astNode)!==null&&
2
2
  i!==void 0?i:t?.astNode):void 0;return C(t,r)}}else return}function $e(n){return typeof n<"u"&&"element"in n&&"text"in n}function je(n){try{return J(n).uri.toString()}catch{return}}function Se(n){var e,i;const{astNode:t,property:r,index:a}=n??{},s=(e=t?.$cstNode)!==null&&e!==void 0?e:t?.$textRegion;if(!(t===void 0||s===void 0)){if(r===void 0)return C(s,O(t));{const o=c=>a!==void 0&&a>-1&&Array.isArray(t[r])?a<c.length?c[a]:void 0:c.reduce(z,void 0);if(!((i=s.assignments)===null||i===void 0)&&i[r]){
3
3
  const c=o(s.assignments[r]);return c&&C(c,O(t))}else if(t.$cstNode){const c=o(ce(t.$cstNode,r));return c&&C(c,O(t))}else return}}}function O(n){var e,i,t,r;return n.$cstNode?(i=(e=J(n))===null||e===void 0?void 0:e.uri)===null||i===void 0?void 0:i.toString():n.$textRegion?n.$textRegion.documentURI||((r=(t=new le(n,a=>a.$container?[a.$container]:[]).find(a=>{var s;return(s=a.$textRegion)===null||s===void 0?void 0:s.documentURI}))===null||t===void 0?void 0:t.$textRegion)===null||r===void 0?void 0:r.
4
4
  documentURI):void 0}function C(n,e){var i,t;const r={offset:n.offset,end:(i=n.end)!==null&&i!==void 0?i:n.offset+n.length,length:(t=n.length)!==null&&t!==void 0?t:n.end-n.offset};return n.range&&(r.range=n.range),e??(e=n.fileURI),e&&(r.fileURI=e),r}function z(n,e){var i,t;if(n){if(!e)return n&&C(n)}else return e&&C(e);const r=(i=n.end)!==null&&i!==void 0?i:n.offset+n.length,a=(t=e.end)!==null&&t!==void 0?t:e.offset+e.length,s=Math.min(n.offset,e.offset),o=Math.max(r,a),c=o-s,p={offset:s,end:o,length:c};
@@ -1,8 +1,8 @@
1
- import { L as LikeC4LanguageServices } from '../shared/likec4.C6HFkgux.mjs';
1
+ import { L as LikeC4LanguageServices } from '../shared/likec4.CcP3mRJH.mjs';
2
2
  import 'type-fest';
3
3
  import '@likec4/core';
4
4
  import '@likec4/core/model';
5
- import '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.0/node_modules/@types/picomatch/posix.d.ts';
5
+ import '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.2/node_modules/@types/picomatch/posix.d.ts';
6
6
  import '@likec4/core/types';
7
7
  import '@likec4/core/utils';
8
8
 
@@ -1,2 +1,2 @@
1
- export{L as LikeC4VitePlugin}from"../shared/likec4.ButMg-j9.mjs";import"node:path";import"../shared/likec4.B5b4pT-B.mjs";import"node:fs";import"node:url";import"../shared/likec4.BeWJWU7_.mjs";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"@hpcc-js/wasm-graphviz";import"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
1
+ export{L as LikeC4VitePlugin}from"../shared/likec4.SsV1pHm2.mjs";import"node:path";import"../shared/likec4.B4j8eNO5.mjs";import"node:fs";import"node:url";import"../shared/likec4.BeWJWU7_.mjs";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"@hpcc-js/wasm-graphviz";import"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
2
2
  import"@likec4/core/utils";import"node:process";import"boxen";import"node:child_process";import"node:events";import"node:fs/promises";import"node:stream/promises";import"node:readline/promises";import"node:os";import"fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "likec4",
3
- "version": "1.34.2",
3
+ "version": "1.35.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -96,7 +96,7 @@
96
96
  "rollup": "^4.44.0",
97
97
  "type-fest": "^4.41.0",
98
98
  "vite": "^6.3.5",
99
- "@likec4/core": "1.34.2"
99
+ "@likec4/core": "1.35.0"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "react": "^18.x || ^19.x",
@@ -105,23 +105,23 @@
105
105
  "devDependencies": {
106
106
  "@dagrejs/dagre": "1.1.5",
107
107
  "@fontsource/ibm-plex-sans": "^5.2.6",
108
- "@mantine/core": "8.1.2",
109
- "@mantine/hooks": "8.1.2",
108
+ "@mantine/core": "8.2.1",
109
+ "@mantine/hooks": "8.2.1",
110
110
  "@nanostores/react": "1.0.0",
111
111
  "@pandacss/dev": "^0.54.0",
112
112
  "@react-hookz/web": "^25.1.1",
113
- "@tabler/icons-react": "3.31.0",
113
+ "@tabler/icons-react": "3.34.1",
114
114
  "@tanstack/react-router": "^1.114.13",
115
115
  "@tanstack/router-cli": "^1.114.13",
116
116
  "@tanstack/router-vite-plugin": "^1.114.13",
117
- "@types/node": "~20.19.1",
118
- "@types/picomatch": "^4.0.0",
119
- "@types/react": "19.1.8",
120
- "@types/react-dom": "19.1.6",
117
+ "@types/node": "~20.19.2",
118
+ "@types/picomatch": "^4.0.2",
119
+ "@types/react": "19.1.9",
120
+ "@types/react-dom": "19.1.7",
121
121
  "@types/semver": "^7.7.0",
122
122
  "@types/yargs": "^17.0.33",
123
- "@xyflow/react": "^12.6.4",
124
- "@xyflow/system": "^0.0.61",
123
+ "@xyflow/react": "12.6.4",
124
+ "@xyflow/system": "0.0.61",
125
125
  "autoprefixer": "^10.4.21",
126
126
  "classnames": "^2.5.1",
127
127
  "clsx": "^2.1.1",
@@ -142,18 +142,18 @@
142
142
  "langium": "3.5.0",
143
143
  "merge-error-cause": "^5.0.2",
144
144
  "mkdirp": "^3.0.1",
145
- "motion": "^12.12.2",
145
+ "motion": "^12.23.11",
146
146
  "nano-spawn": "^1.0.2",
147
147
  "nanostores": "1.0.1",
148
148
  "npm-run-all2": "^8.0.4",
149
149
  "p-limit": "6.2.0",
150
150
  "package-manager-detector": "1.3.0",
151
151
  "package-up": "^5.0.0",
152
- "picomatch": "^4.0.2",
152
+ "picomatch": "^4.0.3",
153
153
  "postcss": "8.5.5",
154
154
  "pretty-ms": "^9.2.0",
155
- "react": "^19.1.0",
156
- "react-dom": "^19.1.0",
155
+ "react": "^19.1.1",
156
+ "react-dom": "^19.1.1",
157
157
  "react-error-boundary": "^6.0.0",
158
158
  "react-resizable-panels": "^3.0.3",
159
159
  "react-shadow": "^20.6.0",
@@ -162,8 +162,8 @@
162
162
  "std-env": "^3.9.0",
163
163
  "strip-indent": "^4.0.0",
164
164
  "tinyrainbow": "^2.0.0",
165
- "tsx": "4.19.4",
166
- "turbo": "2.5.4",
165
+ "tsx": "4.20.3",
166
+ "turbo": "2.5.5",
167
167
  "typescript": "5.8.3",
168
168
  "ufo": "1.6.1",
169
169
  "unbuild": "3.5.0",
@@ -171,22 +171,22 @@
171
171
  "vite-plugin-inspect": "^11.1.0",
172
172
  "vite-plugin-singlefile": "^2.2.0",
173
173
  "vitest": "3.2.4",
174
- "vscode-jsonrpc": "8.2.0",
174
+ "vscode-jsonrpc": "8.2.1",
175
175
  "vscode-languageserver": "9.0.1",
176
176
  "vscode-languageserver-types": "3.17.5",
177
177
  "vscode-uri": "3.1.0",
178
178
  "which": "^5.0.0",
179
179
  "wireit": "0.14.12",
180
180
  "yargs": "17.7.2",
181
- "@likec4/diagram": "1.34.2",
182
- "@likec4/icons": "1.34.2",
183
- "@likec4/generators": "1.34.2",
184
- "@likec4/language-server": "1.34.2",
185
- "@likec4/layouts": "1.34.2",
186
- "@likec4/log": "1.34.2",
187
- "@likec4/styles": "1.34.2",
188
- "@likec4/style-preset": "1.34.2",
189
- "@likec4/tsconfig": "1.34.2"
181
+ "@likec4/diagram": "1.35.0",
182
+ "@likec4/generators": "1.35.0",
183
+ "@likec4/language-server": "1.35.0",
184
+ "@likec4/layouts": "1.35.0",
185
+ "@likec4/icons": "1.35.0",
186
+ "@likec4/styles": "1.35.0",
187
+ "@likec4/style-preset": "1.35.0",
188
+ "@likec4/log": "1.35.0",
189
+ "@likec4/tsconfig": "1.35.0"
190
190
  },
191
191
  "scripts": {
192
192
  "typecheck": "tsc --build --verbose",
package/react/index.d.mts CHANGED
@@ -1971,7 +1971,6 @@ type ControlsCustomLayoutProps = {
1971
1971
  navigationButtons: ReactNode;
1972
1972
  search: ReactNode;
1973
1973
  actionsGroup: ReactNode;
1974
- syncInProgressBadge: ReactNode;
1975
1974
  };
1976
1975
  type ControlsCustomLayout = (props: ControlsCustomLayoutProps) => ReactNode;
1977
1976
  type Dimmed = "immediate" | boolean;
@@ -2135,6 +2134,14 @@ type OnChange = (event: ChangeEvent) => void;
2135
2134
  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">;
2136
2135
  type PaddingUnit$1 = "px" | "%";
2137
2136
  type PaddingWithUnit$1 = `${number}${PaddingUnit$1}` | number;
2137
+ type ViewPadding = PaddingWithUnit$1 | {
2138
+ top?: PaddingWithUnit$1;
2139
+ right?: PaddingWithUnit$1;
2140
+ bottom?: PaddingWithUnit$1;
2141
+ left?: PaddingWithUnit$1;
2142
+ x?: PaddingWithUnit$1;
2143
+ y?: PaddingWithUnit$1;
2144
+ };
2138
2145
  interface LikeC4DiagramProperties<A extends Any> {
2139
2146
  view: LayoutedView<A>;
2140
2147
  className?: string | undefined;
@@ -2155,10 +2162,11 @@ interface LikeC4DiagramProperties<A extends Any> {
2155
2162
  readonly?: boolean | undefined;
2156
2163
  /**
2157
2164
  * Show/hide panel with top left controls,
2165
+ * - `next` - Experimental navigation panel
2158
2166
  *
2159
2167
  * @default true if not readonly
2160
2168
  */
2161
- controls?: boolean | undefined;
2169
+ controls?: boolean | "next" | undefined;
2162
2170
  /**
2163
2171
  * If set, initial viewport will show all nodes & edges
2164
2172
  * @default true
@@ -2167,8 +2175,29 @@ interface LikeC4DiagramProperties<A extends Any> {
2167
2175
  /**
2168
2176
  * Padding around the diagram
2169
2177
  * @default '8px'
2170
- */
2171
- fitViewPadding?: PaddingWithUnit$1 | undefined;
2178
+ *
2179
+ * @see {@link ViewPadding}
2180
+ *
2181
+ * @example
2182
+ * ```tsx
2183
+ * <LikeC4Diagram
2184
+ * fitViewPadding={{
2185
+ * x: '16px',
2186
+ * y: '16px',
2187
+ * }}
2188
+ * />
2189
+ *
2190
+ * <LikeC4Diagram
2191
+ * fitViewPadding={{
2192
+ * top: '8px',
2193
+ * right: '8px',
2194
+ * bottom: '8px',
2195
+ * left: '8px',
2196
+ * }}
2197
+ * />
2198
+ * ```
2199
+ */
2200
+ fitViewPadding?: ViewPadding | undefined;
2172
2201
  /**
2173
2202
  * @default false if readonly
2174
2203
  */
@@ -2253,8 +2282,9 @@ interface LikeC4DiagramProperties<A extends Any> {
2253
2282
  /**
2254
2283
  * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
2255
2284
  * Enable it if you have a large or static view
2285
+ * - `auto` - will be `true` if view has more then 3000 * 2000 pixels
2256
2286
  *
2257
- * @default 'auto' - will be `true` if view has more then 3000 * 2000 pixels
2287
+ * @default 'auto'
2258
2288
  */
2259
2289
  reduceGraphics?: "auto" | boolean | undefined;
2260
2290
  /**
@@ -2264,6 +2294,11 @@ interface LikeC4DiagramProperties<A extends Any> {
2264
2294
  renderIcon?: ElementIconRenderer | undefined;
2265
2295
  /**
2266
2296
  * Customize layout of the controls on the top left
2297
+ *
2298
+ * @note
2299
+ * Ignored if `controls="next"`
2300
+ *
2301
+ * @see {@link controls}
2267
2302
  */
2268
2303
  renderControls?: ControlsCustomLayout | undefined;
2269
2304
  /**
@@ -2359,8 +2394,10 @@ export interface LikeC4ViewProps<A extends Any> {
2359
2394
  /**
2360
2395
  * Padding around the diagram
2361
2396
  * @default '8px'
2397
+ *
2398
+ * @see {@link ViewPadding}
2362
2399
  */
2363
- fitViewPadding?: PaddingWithUnit$1 | undefined;
2400
+ fitViewPadding?: ViewPadding | undefined;
2364
2401
  /**
2365
2402
  * Display diagram title / description
2366
2403
  *
@@ -2452,9 +2489,11 @@ interface LikeC4BrowserProps {
2452
2489
  fitViewPadding?: PaddingWithUnit$1 | undefined;
2453
2490
  /**
2454
2491
  * Show/hide panel with top left controls,
2455
- * @default true
2492
+ * - `next` - show navigation panel (Experimental)
2493
+ *
2494
+ * @default `next`
2456
2495
  */
2457
- controls?: boolean | undefined;
2496
+ controls?: boolean | "next" | undefined;
2458
2497
  /**
2459
2498
  * Display diagram title / description
2460
2499
  *