likec4 1.25.1 → 1.26.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/__app__/react/likec4.tsx +12 -28
- package/__app__/src/main.js +48928 -3
- package/__app__/src/style.css +1 -1
- package/__app__/webcomponent/webcomponent.js +2 -16
- package/dist/cli/index.mjs +727 -1112
- package/dist/index.d.mts +11 -16022
- package/dist/index.d.ts +11 -16022
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +2 -2
- package/dist/model/index.d.ts +2 -2
- package/dist/shared/likec4.C0X7XZt3.mjs +3682 -0
- package/dist/shared/likec4.Cz9mPeTQ.mjs +356 -0
- package/dist/shared/likec4.Y_4a6gTW.d.mts +2063 -0
- package/dist/shared/likec4.Y_4a6gTW.d.ts +2063 -0
- package/dist/vite-plugin/index.d.mts +48 -0
- package/dist/vite-plugin/index.d.ts +48 -0
- package/dist/vite-plugin/index.mjs +2 -0
- package/package.json +27 -14
- package/react/index.d.ts +10 -1
- package/react/index.js +6489 -5513
- package/vite-plugin-modules.d.ts +88 -0
- package/__app__/src/chunks/-index-overview-CKkCSnRi.js +0 -310
- package/__app__/src/chunks/-view-lazy-data-CI4xD57c.js +0 -9
- package/__app__/src/chunks/likec4-CyM7Z_P_.js +0 -6139
- package/__app__/src/chunks/main-BWk4fT0y.js +0 -25442
- package/__app__/src/chunks/mantine-BYP9_27v.js +0 -13364
- package/__app__/src/chunks/tanstack-router-x-0typxf.js +0 -2925
- package/__app__/src/icons.js +0 -9
- package/dist/shared/likec4.8R_NjvKs.mjs +0 -3608
- /package/__app__/src/{chunks/index-C6pszJh8.js → index-C6pszJh8.js} +0 -0
- /package/react/{style.css → likec4.css} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { L as LikeC4LanguageServices } from '../shared/likec4.Y_4a6gTW.mjs';
|
|
2
|
+
import '@likec4/core';
|
|
3
|
+
import 'type-fest';
|
|
4
|
+
|
|
5
|
+
type LikeC4VitePluginOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Initializes a LikeC4 instance from the specified workspace path.
|
|
8
|
+
* By default it is vite project root.
|
|
9
|
+
*/
|
|
10
|
+
workspace?: string;
|
|
11
|
+
/**
|
|
12
|
+
* By default, if LikeC4 model is invalid, errors are printed to the console.
|
|
13
|
+
* Disable this behavior by setting this option to false.
|
|
14
|
+
*
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
printErrors?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, initialization will return rejected promise with the LikeC4 instance.
|
|
20
|
+
* Use `likec4.getErrors()` to get the errors.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
throwIfInvalid?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to use the `dot` binary for layouting or the WebAssembly version.
|
|
26
|
+
* @default 'wasm'
|
|
27
|
+
*/
|
|
28
|
+
graphviz?: 'wasm' | 'binary';
|
|
29
|
+
/**
|
|
30
|
+
* If you have instance of {@link LikeC4}
|
|
31
|
+
* you can pass `languageServices` from it.
|
|
32
|
+
*/
|
|
33
|
+
languageServices?: LikeC4LanguageServices;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
useOverviewGraph?: boolean;
|
|
38
|
+
} | {
|
|
39
|
+
languageServices: LikeC4LanguageServices;
|
|
40
|
+
workspace?: never;
|
|
41
|
+
printErrors?: never;
|
|
42
|
+
throwIfInvalid?: never;
|
|
43
|
+
graphviz?: never;
|
|
44
|
+
useOverviewGraph?: boolean;
|
|
45
|
+
};
|
|
46
|
+
declare function LikeC4VitePlugin({ useOverviewGraph, ...opts }: LikeC4VitePluginOptions): any;
|
|
47
|
+
|
|
48
|
+
export { LikeC4VitePlugin, type LikeC4VitePluginOptions };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { L as LikeC4LanguageServices } from '../shared/likec4.Y_4a6gTW.js';
|
|
2
|
+
import '@likec4/core';
|
|
3
|
+
import 'type-fest';
|
|
4
|
+
|
|
5
|
+
type LikeC4VitePluginOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Initializes a LikeC4 instance from the specified workspace path.
|
|
8
|
+
* By default it is vite project root.
|
|
9
|
+
*/
|
|
10
|
+
workspace?: string;
|
|
11
|
+
/**
|
|
12
|
+
* By default, if LikeC4 model is invalid, errors are printed to the console.
|
|
13
|
+
* Disable this behavior by setting this option to false.
|
|
14
|
+
*
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
printErrors?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, initialization will return rejected promise with the LikeC4 instance.
|
|
20
|
+
* Use `likec4.getErrors()` to get the errors.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
throwIfInvalid?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to use the `dot` binary for layouting or the WebAssembly version.
|
|
26
|
+
* @default 'wasm'
|
|
27
|
+
*/
|
|
28
|
+
graphviz?: 'wasm' | 'binary';
|
|
29
|
+
/**
|
|
30
|
+
* If you have instance of {@link LikeC4}
|
|
31
|
+
* you can pass `languageServices` from it.
|
|
32
|
+
*/
|
|
33
|
+
languageServices?: LikeC4LanguageServices;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
useOverviewGraph?: boolean;
|
|
38
|
+
} | {
|
|
39
|
+
languageServices: LikeC4LanguageServices;
|
|
40
|
+
workspace?: never;
|
|
41
|
+
printErrors?: never;
|
|
42
|
+
throwIfInvalid?: never;
|
|
43
|
+
graphviz?: never;
|
|
44
|
+
useOverviewGraph?: boolean;
|
|
45
|
+
};
|
|
46
|
+
declare function LikeC4VitePlugin({ useOverviewGraph, ...opts }: LikeC4VitePluginOptions): any;
|
|
47
|
+
|
|
48
|
+
export { LikeC4VitePlugin, type LikeC4VitePluginOptions };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{L as LikeC4VitePlugin}from"../shared/likec4.Cz9mPeTQ.mjs";import"node:path";import"../shared/likec4.C0X7XZt3.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
|
+
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.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -44,6 +44,17 @@
|
|
|
44
44
|
"default": "./react/index.js"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
+
"./vite-plugin-modules": {
|
|
48
|
+
"types": "./vite-plugin-modules.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./vite-plugin": {
|
|
51
|
+
"sources": "./src/vite-plugin/index.ts",
|
|
52
|
+
"default": {
|
|
53
|
+
"types": "./dist/vite-plugin/index.d.mts",
|
|
54
|
+
"import": "./dist/vite-plugin/index.mjs",
|
|
55
|
+
"default": "./dist/vite-plugin/index.mjs"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
47
58
|
"./react/style.css": "./react/style.css",
|
|
48
59
|
"./icons/all": {
|
|
49
60
|
"types": "./icons/all.d.ts",
|
|
@@ -69,8 +80,8 @@
|
|
|
69
80
|
"react-dom": "~19.0.0",
|
|
70
81
|
"rollup": "4.34.6",
|
|
71
82
|
"type-fest": "4.34.1",
|
|
72
|
-
"vite": "
|
|
73
|
-
"@likec4/core": "~1.
|
|
83
|
+
"vite": "^6.2.0",
|
|
84
|
+
"@likec4/core": "~1.26.0"
|
|
74
85
|
},
|
|
75
86
|
"devDependencies": {
|
|
76
87
|
"@dagrejs/dagre": "1.1.4",
|
|
@@ -81,9 +92,10 @@
|
|
|
81
92
|
"@nanostores/react": "0.8.4",
|
|
82
93
|
"@react-hookz/web": "^25.0.1",
|
|
83
94
|
"@tabler/icons-react": "3.29.0",
|
|
84
|
-
"@tanstack/react-router": "1.
|
|
85
|
-
"@tanstack/router-cli": "1.
|
|
86
|
-
"@tanstack/router-
|
|
95
|
+
"@tanstack/react-router": "1.114.4",
|
|
96
|
+
"@tanstack/router-cli": "1.114.4",
|
|
97
|
+
"@tanstack/router-devtools": "1.114.4",
|
|
98
|
+
"@tanstack/router-vite-plugin": "1.114.4",
|
|
87
99
|
"@types/node": "^20.17.23",
|
|
88
100
|
"@types/prop-types": "^15.7.14",
|
|
89
101
|
"@types/react": "~19.0.10",
|
|
@@ -141,22 +153,23 @@
|
|
|
141
153
|
"unbuild": "^3.3.1",
|
|
142
154
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
143
155
|
"vite-plugin-dts": "^4.5.0",
|
|
156
|
+
"vite-plugin-inspect": "^11.0.0",
|
|
144
157
|
"vite-plugin-shadow-style": "^1.2.0",
|
|
145
158
|
"vite-plugin-singlefile": "^2.1.0",
|
|
146
|
-
"vitest": "^3.0.
|
|
159
|
+
"vitest": "^3.0.8",
|
|
147
160
|
"vscode-jsonrpc": "8.2.0",
|
|
148
161
|
"vscode-languageserver": "9.0.1",
|
|
149
162
|
"vscode-languageserver-types": "3.17.5",
|
|
150
163
|
"vscode-uri": "3.1.0",
|
|
151
164
|
"which": "^5.0.0",
|
|
152
165
|
"yargs": "17.7.2",
|
|
153
|
-
"@likec4/
|
|
154
|
-
"@likec4/
|
|
155
|
-
"@likec4/language-server": "1.
|
|
156
|
-
"@likec4/layouts": "1.
|
|
157
|
-
"@likec4/
|
|
158
|
-
"@likec4/
|
|
159
|
-
"@likec4/
|
|
166
|
+
"@likec4/diagram": "1.26.0",
|
|
167
|
+
"@likec4/icons": "1.26.0",
|
|
168
|
+
"@likec4/language-server": "1.26.0",
|
|
169
|
+
"@likec4/layouts": "1.26.0",
|
|
170
|
+
"@likec4/generators": "1.26.0",
|
|
171
|
+
"@likec4/log": "1.26.0",
|
|
172
|
+
"@likec4/tsconfig": "1.26.0"
|
|
160
173
|
},
|
|
161
174
|
"scripts": {
|
|
162
175
|
"turbo-build": "turbo run build --log-prefix=none --log-order=grouped",
|
package/react/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { deepEqual } from 'fast-equals';
|
|
2
3
|
import type { DependencyList } from 'react';
|
|
3
4
|
import { DiagramEdge } from '@likec4/core';
|
|
4
5
|
import { DiagramNode } from '@likec4/core';
|
|
@@ -21,6 +22,8 @@ declare type AnyStore<Value = any> = {
|
|
|
21
22
|
readonly value: undefined | Value
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
declare type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>
|
|
26
|
+
|
|
24
27
|
/**
|
|
25
28
|
* Create store with atomic value. It could be a string or an object, which you
|
|
26
29
|
* will replace completely.
|
|
@@ -119,6 +122,10 @@ declare type ControlsCustomLayoutProps = {
|
|
|
119
122
|
syncInProgressBadge: ReactNode;
|
|
120
123
|
};
|
|
121
124
|
|
|
125
|
+
export declare const createHooksForModel: (arg: unknown) => unknown;
|
|
126
|
+
|
|
127
|
+
export { deepEqual }
|
|
128
|
+
|
|
122
129
|
declare type DiagramNodeWithNavigate<ID = ViewId> = Omit<DiagramNode, 'navigateTo'> & {
|
|
123
130
|
navigateTo: ID;
|
|
124
131
|
};
|
|
@@ -587,7 +594,9 @@ export declare namespace nano {
|
|
|
587
594
|
atom,
|
|
588
595
|
computed,
|
|
589
596
|
map,
|
|
590
|
-
useStore
|
|
597
|
+
useStore,
|
|
598
|
+
Atom,
|
|
599
|
+
WritableAtom
|
|
591
600
|
}
|
|
592
601
|
}
|
|
593
602
|
|