likec4 1.3.0 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "likec4",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -65,10 +65,12 @@
65
65
  "lint": "run -T eslint src/ --fix",
66
66
  "clean": "run -T rimraf dist app/dist dev/.export dev/dist node_modules/.vite",
67
67
  "dev": "tsx watch src/cli/index.ts serve dev",
68
- "dev:bigbank": "tsx watch src/cli/index.ts serve ../../docs/likec4/bigbank",
69
- "dev:index-page": "tsx watch src/cli/index.ts serve ../../docs/likec4/index-page",
68
+ "dev:bigbank": "tsx watch src/cli/index.ts serve ../../apps/docs/src/components/bigbank",
69
+ "dev:dynamic-view": "tsx watch src/cli/index.ts serve ../../apps/docs/src/components/dynamic-view",
70
+ "dev:index-page": "tsx watch src/cli/index.ts serve ../../apps/docs/src/components/index-page",
70
71
  "dev:template": "tsx watch src/cli/index.ts serve ../create-likec4/template",
71
72
  "dev:example-cloud": "tsx watch src/cli/index.ts serve ../../examples/cloud-system",
73
+ "dev:failed": "tsx watch src/cli/index.ts serve ../../examples/failed",
72
74
  "dev:example-dev": "tsx watch src/cli/index.ts serve ../../examples/diagrams-dev/likec4",
73
75
  "cli": "tsx src/cli/index.ts",
74
76
  "cli:serve": "tsx watch src/cli/index.ts serve dev",
@@ -78,12 +80,12 @@
78
80
  "cli:export:json": "tsx src/cli/index.ts export json -o dev/export/likec4.json dev"
79
81
  },
80
82
  "dependencies": {
81
- "@hpcc-js/wasm": "2.16.2",
83
+ "@hpcc-js/wasm": "2.18.0",
82
84
  "@vitejs/plugin-react": "4.3.1",
83
85
  "esm-env": "1.0.0",
84
86
  "nanostores": "0.10.3",
85
- "playwright": "1.44.1",
86
- "vite": "5.3.1"
87
+ "playwright": "1.45.0",
88
+ "vite": "5.3.3"
87
89
  },
88
90
  "peerDependencies": {
89
91
  "react": "^18.3.1",
@@ -99,22 +101,21 @@
99
101
  },
100
102
  "devDependencies": {
101
103
  "@fontsource/ibm-plex-sans": "^5.0.20",
102
- "@likec4/core": "1.3.0",
103
- "@likec4/diagram": "1.3.0",
104
- "@likec4/generators": "1.3.0",
105
- "@likec4/language-server": "1.3.0",
106
- "@likec4/layouts": "1.3.0",
107
- "@likec4/tsconfig": "1.3.0",
108
- "@mantine/core": "7.10.2",
109
- "@mantine/hooks": "7.10.2",
110
- "@mantine/vanilla-extract": "7.10.2",
104
+ "@likec4/core": "1.5.0",
105
+ "@likec4/diagram": "1.5.0",
106
+ "@likec4/generators": "1.5.0",
107
+ "@likec4/language-server": "1.5.0",
108
+ "@likec4/layouts": "1.5.0",
109
+ "@likec4/tsconfig": "1.5.0",
110
+ "@mantine/core": "7.11.1",
111
+ "@mantine/hooks": "7.11.1",
112
+ "@mantine/vanilla-extract": "7.11.1",
111
113
  "@nanostores/react": "^0.7.2",
112
114
  "@react-hookz/web": "^24.0.4",
113
- "@tabler/icons-react": "^3.0.0",
114
- "@tanstack/react-router": "^1.36.3",
115
- "@tanstack/router-vite-plugin": "^1.37.0",
116
- "@types/mermaid": "^9.2.0",
117
- "@types/node": "^20.14.2",
115
+ "@tabler/icons-react": "^3.9.0",
116
+ "@tanstack/react-router": "^1.43.4",
117
+ "@tanstack/router-vite-plugin": "^1.43.1",
118
+ "@types/node": "^20.14.10",
118
119
  "@types/prop-types": "^15.7.11",
119
120
  "@types/react": "18.3.3",
120
121
  "@types/react-dom": "18.3.0",
@@ -122,46 +123,47 @@
122
123
  "@types/yargs": "^17.0.32",
123
124
  "@vanilla-extract/css": "^1.15.3",
124
125
  "@vanilla-extract/dynamic": "^2.1.1",
125
- "@vanilla-extract/vite-plugin": "^4.0.11",
126
+ "@vanilla-extract/vite-plugin": "^4.0.13",
127
+ "autoprefixer": "^10.4.19",
126
128
  "ci-info": "^3.9.0",
127
129
  "classnames": "^2.3.2",
128
130
  "clsx": "^2.1.1",
129
131
  "consola": "^3.2.3",
130
132
  "esbuild": "^0.21.5",
131
133
  "esbuild-node-externals": "^1.13.1",
132
- "execa": "^9.1.0",
134
+ "execa": "^9.3.0",
133
135
  "fast-equals": "^5.0.1",
134
- "framer-motion": "^11.2.2",
136
+ "framer-motion": "^11.2.13",
135
137
  "get-port": "^7.1.0",
136
138
  "html-to-image": "^1.11.11",
137
139
  "json5": "^2.2.3",
138
- "langium": "3.1.0",
140
+ "langium": "3.1.2",
139
141
  "mkdirp": "^3.0.1",
140
- "npm-run-all2": "^6.1.2",
141
- "p-limit": "^5.0.0",
142
- "picocolors": "^1.0.0",
143
- "pkg-up": "^5.0.0",
144
- "postcss": "^8.4.38",
142
+ "npm-run-all2": "^6.2.2",
143
+ "p-limit": "^6.0.0",
144
+ "package-up": "^5.0.0",
145
+ "picocolors": "^1.0.1",
146
+ "postcss": "^8.4.39",
145
147
  "postcss-preset-mantine": "^1.15.0",
146
148
  "pretty-ms": "^9.0.0",
147
149
  "prop-types": "^15.8.1",
148
150
  "react": "^18.3.1",
149
151
  "react-dom": "^18.3.1",
150
152
  "react-error-boundary": "^4.0.13",
151
- "react-resizable-panels": "^2.0.19",
152
- "react-shadow": "^20.4.0",
153
- "remeda": "^1.61.0",
153
+ "react-resizable-panels": "^2.0.20",
154
+ "react-shadow": "^20.5.0",
155
+ "remeda": "^2.3.0",
154
156
  "string-hash": "^1.1.3",
155
157
  "strip-indent": "^4.0.0",
156
158
  "terser": "^5.31.1",
157
159
  "tsx": "~4.9.3",
158
- "type-fest": "^4.18.2",
159
- "typescript": "^5.4.5",
160
+ "type-fest": "^4.21.0",
161
+ "typescript": "^5.5.3",
160
162
  "ufo": "^1.5.3",
161
163
  "vite-plugin-css-injected-by-js": "^3.5.1",
162
164
  "vite-plugin-shadow-style": "^1.1.0",
163
- "vitest": "~1.5.3",
165
+ "vitest": "~1.6.0",
164
166
  "yargs": "^17.7.2"
165
167
  },
166
- "packageManager": "yarn@4.3.0"
168
+ "packageManager": "yarn@4.3.1"
167
169
  }
@@ -1,5 +1,4 @@
1
1
  export declare const modalContent: string;
2
2
  export declare const modalBody: string;
3
3
  export declare const cssDiagram: string;
4
- export declare const modalCloseButton: string;
5
- export declare const historyButtons: string;
4
+ export declare const closeButton: string;
@@ -1,7 +1,24 @@
1
- import type { DiagramView, LikeC4ViewBaseProps } from './types';
2
- export type LikeC4BrowserProps<ViewId extends string> = Omit<LikeC4ViewBaseProps<ViewId>, 'viewId' | 'interactive'> & {
1
+ import type { DiagramView } from './types';
2
+ export type LikeC4BrowserProps<ViewId extends string> = {
3
3
  view: DiagramView<ViewId>;
4
+ /**
5
+ * By default determined by the user's system preferences.
6
+ */
7
+ colorScheme?: 'light' | 'dark' | undefined;
8
+ /**
9
+ * LikeC4 views are using 'IBM Plex Sans' font.
10
+ * By default, component injects the CSS to document head.
11
+ * Set to false if you want to handle the font yourself.
12
+ *
13
+ * @default true
14
+ */
15
+ injectFontCss?: boolean | undefined;
16
+ /**
17
+ * Background pattern
18
+ * @default 'dots'
19
+ */
20
+ background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
4
21
  onNavigateTo: (to: ViewId) => void;
5
22
  onClose: () => void;
6
23
  };
7
- export declare function LikeC4Browser<ViewId extends string>({ colorScheme, view, injectFontCss, onNavigateTo, onClose, overlay, background, ...props }: LikeC4BrowserProps<ViewId>): import("react/jsx-runtime").JSX.Element;
24
+ export declare function LikeC4Browser<ViewId extends string>({ colorScheme, view, injectFontCss, onNavigateTo, onClose, background }: LikeC4BrowserProps<ViewId>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,24 @@
1
- import type { DiagramView, LikeC4ViewBaseProps } from './types';
2
- export type LikeC4ViewElementProps<ViewId extends string> = Omit<LikeC4ViewBaseProps<ViewId>, 'viewId' | 'interactive' | 'overlay'> & {
1
+ import { type HTMLAttributes } from 'react';
2
+ import type { DiagramView } from './types';
3
+ export type LikeC4ViewElementProps<ViewId extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
3
4
  view: DiagramView<ViewId>;
5
+ /**
6
+ * By default determined by the user's system preferences.
7
+ */
8
+ colorScheme?: 'light' | 'dark' | undefined;
9
+ /**
10
+ * LikeC4 views are using 'IBM Plex Sans' font.
11
+ * By default, component injects the CSS to document head.
12
+ * Set to false if you want to handle the font yourself.
13
+ *
14
+ * @default true
15
+ */
16
+ injectFontCss?: boolean | undefined;
17
+ /**
18
+ * Background pattern
19
+ * @default 'transparent'
20
+ */
21
+ background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
4
22
  onNavigateTo?: ((to: ViewId) => void) | undefined;
5
23
  };
6
- export declare function LikeC4ViewElement<ViewId extends string>({ onNavigateTo, view, injectFontCss, colorScheme, background, ...props }: LikeC4ViewElementProps<ViewId>): import("react/jsx-runtime").JSX.Element;
24
+ export declare function LikeC4ViewElement<ViewId extends string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, ...props }: LikeC4ViewElementProps<ViewId>): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,6 @@
1
1
  import { type HTMLAttributes } from 'react';
2
2
  type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
3
- rootClassName?: string;
4
3
  injectFontCss?: boolean | undefined;
5
- colorScheme?: 'light' | 'dark' | undefined;
6
4
  };
7
- export declare function ShadowRoot({ children, rootClassName, colorScheme, injectFontCss, ...props }: ShadowRootProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function ShadowRoot({ children, injectFontCss, ...props }: ShadowRootProps): import("react/jsx-runtime").JSX.Element;
8
6
  export {};
@@ -0,0 +1,7 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ type ShadowRootMantineProps = PropsWithChildren<{
3
+ className?: string | undefined;
4
+ colorScheme?: 'light' | 'dark' | undefined;
5
+ }>;
6
+ export declare function ShadowRootMantineProvider({ children, className, colorScheme }: ShadowRootMantineProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};