likec4 1.59.2 → 1.59.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.
- package/__app__/src/chunks/AIChat.mjs +21 -26
- package/__app__/src/chunks/LikeC4Styles.mjs +257 -263
- package/__app__/src/chunks/ProjectsOverview.mjs +58 -58
- package/__app__/src/chunks/hooks.mjs +106 -80
- package/__app__/src/chunks/libs/@floating-ui.mjs +646 -332
- package/__app__/src/chunks/libs/@mantine.mjs +1911 -1734
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +26 -26
- package/__app__/src/chunks/libs/@tanstack.mjs +42 -41
- package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
- package/__app__/src/chunks/libs/@xyflow/react.mjs +532 -445
- package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
- package/__app__/src/chunks/libs/d3.mjs +16 -36
- package/__app__/src/chunks/libs/fast-equals.mjs +1 -1
- package/__app__/src/chunks/libs/framer.mjs +294 -273
- package/__app__/src/chunks/libs/zod.mjs +17 -14
- package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
- package/__app__/src/chunks/styled-system.mjs +9 -15
- package/__app__/src/main.mjs +15994 -15936
- package/__app__/src/style.css +1 -1
- package/config/schema.json +35 -0
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +745 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +7 -6
- package/dist/chunks/index.d.mts +11 -0
- package/dist/chunks/index2.d.mts +41 -5
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
- package/dist/chunks/libs/@logtape/logtape.mjs +1 -1
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
- package/dist/chunks/libs/chevrotain.mjs +16 -16
- package/dist/chunks/libs/json5.mjs +3 -3
- package/dist/chunks/libs/langium.mjs +11 -11
- package/dist/chunks/libs/merge-error-cause.mjs +2 -2
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/zod.mjs +4 -4
- package/dist/chunks/node.mjs +69 -57
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +161 -50
- package/dist/cli/index.mjs +272 -162
- package/dist/config/index.d.mts +7 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +64 -27
- package/dist/vite-plugin/internal/index.mjs +65 -29
- package/package.json +39 -39
- package/react/index.d.mts +76 -1
- package/react/index.mjs +7302 -6778
- package/vite-plugin-modules.d.ts +18 -0
- package/dist/chunks/dist.mjs +0 -10
- package/dist/chunks/logger.mjs +0 -1
package/dist/config/index.d.mts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { i as __name } from "../chunks/rolldown-runtime.mjs";
|
|
1
2
|
import { _ as isLikeC4JsonConfig, a as LikeC4ProjectConfig, c as LikeC4ProjectJsonConfig, d as defineConfig, f as defineGenerators, g as isLikeC4Config, h as defineThemeColor, l as LikeC4StylesConfig, m as defineTheme, n as GeneratorFnContext, o as LikeC4ProjectConfigInput, p as defineStyle, r as GeneratorFnParams, s as LikeC4ProjectConfigOps, t as GeneratorFn, u as LikeC4StylesConfigInput, v as isLikeC4NonJsonConfig } from "../chunks/index.mjs";
|
|
2
|
-
export
|
|
3
|
+
//#region ../config/dist/chunks/webapp-export-formats.d.mts
|
|
4
|
+
//#region src/webapp-export-formats.d.ts
|
|
5
|
+
declare const WebappExportFormats: readonly ["png", "jpg", "dot", "d2", "mmd", "puml", "drawio"];
|
|
6
|
+
type WebappExportFormat = typeof WebappExportFormats[number];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type GeneratorFn, type GeneratorFnContext, type GeneratorFnParams, type LikeC4ProjectConfig, type LikeC4ProjectConfigInput, LikeC4ProjectConfigOps, type LikeC4ProjectJsonConfig, type LikeC4StylesConfig, type LikeC4StylesConfigInput, type WebappExportFormat, defineConfig, defineGenerators, defineStyle, defineTheme, defineThemeColor, isLikeC4Config, isLikeC4JsonConfig, isLikeC4NonJsonConfig };
|
package/dist/config/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/rolldown-runtime.mjs";import{a as e,d as t,
|
|
1
|
+
import"../chunks/rolldown-runtime.mjs";import{a as e,d as t,f as n,i as r,n as i,o as a,r as o,t as s,u as c}from"../chunks/filenames.mjs";function defineConfig(e){return a.parse(e)}function defineGenerators(e){return r.parse(e)}function defineThemeColor(e){return n.parse(e)}function defineTheme(e){return c.parse(e)}function defineStyle(e){return t.parse(e)}export{e as LikeC4ProjectConfigOps,defineConfig,defineGenerators,defineStyle,defineTheme,defineThemeColor,s as isLikeC4Config,i as isLikeC4JsonConfig,o as isLikeC4NonJsonConfig};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunks/rolldown-runtime.mjs";import{n as
|
|
1
|
+
import{i as e}from"./chunks/rolldown-runtime.mjs";import{i as t,r as n,t as r}from"./chunks/node.mjs";import{n as i}from"./chunks/sequence-view.mjs";import{exact as a}from"@likec4/core";let o;(function(t){async function fromSource$1(e,t){let{logger:n,watch:o,...s}=t??{};return r(e,i(a({...s,configureLogger:n}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),t.fromSource=fromSource$1;async function fromWorkspace$1(e=``,t){let{logger:r,watch:o,...s}=t??{};return n(e,i(a({...s,configureLogger:r}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),t.fromWorkspace=fromWorkspace$1})(o||={});export{o as LikeC4,t as writeDSL};
|
|
@@ -3,7 +3,7 @@ import { DependencyList } from "react";
|
|
|
3
3
|
import { LayoutedElementView, LayoutedLikeC4ModelData, LayoutedView, ProjectId, ViewChange, ViewId } from "@likec4/core/types";
|
|
4
4
|
import { AdhocViewPredicate } from "@likec4/core/compute-view";
|
|
5
5
|
//#region ../vite-plugin/dist/internal/index.d.mts
|
|
6
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
6
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/atom/index.d.ts
|
|
7
7
|
type AllKeys<T> = T extends any ? keyof T : never;
|
|
8
8
|
type Primitive = boolean | number | string;
|
|
9
9
|
type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends ((...args: any) => any) ? Value : Value extends Primitive ? Value : Value extends object ? Readonly<Value> : Value;
|
|
@@ -11,6 +11,23 @@ type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends (
|
|
|
11
11
|
* Store object.
|
|
12
12
|
*/
|
|
13
13
|
interface ReadableAtom<Value = any> {
|
|
14
|
+
/**
|
|
15
|
+
* Compares the previous and next values on every `set`.
|
|
16
|
+
*
|
|
17
|
+
* Returning `true` means the values are the same, so the store keeps the old
|
|
18
|
+
* value and no listener is called.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Called only by the store's own writes, so a store that never writes never
|
|
22
|
+
* calls it. `Map#setKey` uses {@link MapStore#eqKey} instead.
|
|
23
|
+
*
|
|
24
|
+
* Before the first write, `oldValue` can be `undefined`, for instance on the
|
|
25
|
+
* first run of a computed store.
|
|
26
|
+
*
|
|
27
|
+
* @default Object.is
|
|
28
|
+
* @returns `true` if the values are equal, `false` otherwise.
|
|
29
|
+
*/
|
|
30
|
+
eq(oldValue: ReadonlyIfObject<Value> | undefined, newValue: ReadonlyIfObject<Value>): boolean;
|
|
14
31
|
/**
|
|
15
32
|
* Get store value.
|
|
16
33
|
*
|
|
@@ -41,7 +58,7 @@ interface ReadableAtom<Value = any> {
|
|
|
41
58
|
* @param listener Callback with store value and old value.
|
|
42
59
|
* @returns Function to remove listener.
|
|
43
60
|
*/
|
|
44
|
-
listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value>) => void): () => void;
|
|
61
|
+
listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value> | undefined) => void): () => void;
|
|
45
62
|
/**
|
|
46
63
|
* Low-level method to notify listeners about changes in the store.
|
|
47
64
|
*
|
|
@@ -126,21 +143,36 @@ type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
|
|
|
126
143
|
*/
|
|
127
144
|
declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
|
|
128
145
|
//#endregion
|
|
129
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
146
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/map/index.d.ts
|
|
130
147
|
type KeyofBase = keyof any;
|
|
131
|
-
type Get<T, K extends KeyofBase> =
|
|
148
|
+
type Get<T, K extends KeyofBase> = T extends any ? K extends keyof T ? T[K] : never : never;
|
|
132
149
|
type HasIndexSignature<T> = string extends keyof T ? true : false;
|
|
133
|
-
type ValueWithUndefinedForIndexSignatures<Value, Key extends
|
|
150
|
+
type ValueWithUndefinedForIndexSignatures<Value, Key extends KeyofBase> = Value extends any ? HasIndexSignature<Value> extends true ? undefined | Get<Value, Key> : Get<Value, Key> : never;
|
|
134
151
|
type WritableStore<Value = any> = (Value extends object ? MapStore<Value> : never) | WritableAtom<Value>;
|
|
135
152
|
type Store<Value = any> = ReadableAtom<Value> | WritableStore<Value>;
|
|
136
|
-
type
|
|
153
|
+
type Gettable<Value = any> = {
|
|
137
154
|
get(): Value;
|
|
138
|
-
readonly value: undefined | Value;
|
|
139
155
|
};
|
|
140
|
-
type StoreValue<SomeStore> = SomeStore extends
|
|
141
|
-
get(): infer Value;
|
|
142
|
-
} ? Value : any;
|
|
156
|
+
type StoreValue<SomeStore> = SomeStore extends Gettable<infer Value> ? Value : any;
|
|
143
157
|
interface MapStore<Value extends object = any> extends WritableAtom<Value> {
|
|
158
|
+
/**
|
|
159
|
+
* Compares the previous and next values for a key on `setKey`.
|
|
160
|
+
*
|
|
161
|
+
* Returning `true` means the values are the same, so the store keeps the old
|
|
162
|
+
* value and no listener is called.
|
|
163
|
+
*
|
|
164
|
+
* One function serves every key of the map, so the key name comes as the
|
|
165
|
+
* third argument. The old value is `undefined` when the key is not in the map
|
|
166
|
+
* yet.
|
|
167
|
+
*
|
|
168
|
+
* @remarks
|
|
169
|
+
* Deleting an existing key skips the comparison and notifies either way.
|
|
170
|
+
* Whole-value writes use {@link ReadableAtom#eq} instead.
|
|
171
|
+
*
|
|
172
|
+
* @default Object.is
|
|
173
|
+
* @returns `true` if the values are equal, `false` otherwise.
|
|
174
|
+
*/
|
|
175
|
+
eqKey<Key extends AllKeys<Value>>(oldValue: Get<Value, Key> | undefined, newValue: Get<Value, Key> | undefined, key: Key): boolean;
|
|
144
176
|
/**
|
|
145
177
|
* Subscribe to store changes.
|
|
146
178
|
*
|
|
@@ -148,11 +180,10 @@ interface MapStore<Value extends object = any> extends WritableAtom<Value> {
|
|
|
148
180
|
* immediately.
|
|
149
181
|
*
|
|
150
182
|
* @param listener Callback with store value and old value.
|
|
151
|
-
* @param changedKey Key that
|
|
152
|
-
* has been used to change a store.
|
|
183
|
+
* @param changedKey Key that changed, when the notification carries one.
|
|
153
184
|
* @returns Function to remove listener.
|
|
154
185
|
*/
|
|
155
|
-
listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value
|
|
186
|
+
listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value> | undefined, changedKey: AllKeys<Value> | undefined) => void): () => void;
|
|
156
187
|
/**
|
|
157
188
|
* Low-level method to notify listeners about changes in the store.
|
|
158
189
|
*
|
|
@@ -189,7 +220,7 @@ interface MapStore<Value extends object = any> extends WritableAtom<Value> {
|
|
|
189
220
|
* @param key The key name.
|
|
190
221
|
* @param value New value.
|
|
191
222
|
*/
|
|
192
|
-
setKey<Key extends AllKeys<Value>>(key: Key, value:
|
|
223
|
+
setKey<Key extends AllKeys<Value>>(key: Key, value: ValueWithUndefinedForIndexSignatures<Value, Key>): void;
|
|
193
224
|
/**
|
|
194
225
|
* Subscribe to store changes and call listener immediately.
|
|
195
226
|
*
|
|
@@ -202,8 +233,7 @@ interface MapStore<Value extends object = any> extends WritableAtom<Value> {
|
|
|
202
233
|
* ```
|
|
203
234
|
*
|
|
204
235
|
* @param listener Callback with store value and old value.
|
|
205
|
-
* @param changedKey Key that
|
|
206
|
-
* if `setKey` has been used to change a store.
|
|
236
|
+
* @param changedKey Key that changed, when the notification carries one.
|
|
207
237
|
* @returns Function to remove listener.
|
|
208
238
|
*/
|
|
209
239
|
subscribe(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value> | undefined, changedKey: AllKeys<Value> | undefined) => void): () => void;
|
|
@@ -212,21 +242,28 @@ interface PreinitializedMapStore<Value extends object = any> extends MapStore<Va
|
|
|
212
242
|
readonly value: Value;
|
|
213
243
|
}
|
|
214
244
|
/**
|
|
215
|
-
* Create map store. Map store is a store with
|
|
216
|
-
* as a store value.
|
|
245
|
+
* Create map store with an initial value. Map store is a store with
|
|
246
|
+
* key-value object as a store value.
|
|
247
|
+
*
|
|
248
|
+
* @param value Initial store value.
|
|
249
|
+
* @returns The store object with methods to subscribe.
|
|
250
|
+
*/
|
|
251
|
+
declare function map<Value extends object, StoreExt extends object = object>(value: Value): PreinitializedMapStore<Value> & StoreExt;
|
|
252
|
+
/**
|
|
253
|
+
* Create map store with no initial value, or one that may be missing.
|
|
217
254
|
*
|
|
218
|
-
* @param
|
|
255
|
+
* @param value Initial store value, if there is one.
|
|
219
256
|
* @returns The store object with methods to subscribe.
|
|
220
257
|
*/
|
|
221
|
-
declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Value
|
|
258
|
+
declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Partial<Value>> & StoreExt;
|
|
222
259
|
//#endregion
|
|
223
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
260
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/task/index.d.ts
|
|
224
261
|
interface Task<Value> extends Promise<Value> {
|
|
225
262
|
t: true;
|
|
226
263
|
}
|
|
227
264
|
//#endregion
|
|
228
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
229
|
-
type StoreValues<Stores extends
|
|
265
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/computed/index.d.ts
|
|
266
|
+
type StoreValues<Stores extends readonly Gettable[]> = { -readonly [Index in keyof Stores]: StoreValue<Stores[Index]>; };
|
|
230
267
|
interface Computed {
|
|
231
268
|
/**
|
|
232
269
|
* @deprecated Use `@nanostores/async`.
|
|
@@ -235,7 +272,7 @@ interface Computed {
|
|
|
235
272
|
/**
|
|
236
273
|
* @deprecated Use `@nanostores/async`.
|
|
237
274
|
*/
|
|
238
|
-
<Value, OriginStores extends
|
|
275
|
+
<Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value>): ReadableAtom<undefined | Value>;
|
|
239
276
|
<Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Value): ReadableAtom<Value>;
|
|
240
277
|
/**
|
|
241
278
|
* Create derived store, which use generates value from another stores.
|
|
@@ -252,7 +289,7 @@ interface Computed {
|
|
|
252
289
|
*
|
|
253
290
|
* Use `@nanostores/async` for async function.
|
|
254
291
|
*/
|
|
255
|
-
<Value, OriginStores extends
|
|
292
|
+
<Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
|
|
256
293
|
}
|
|
257
294
|
declare const computed: Computed;
|
|
258
295
|
interface Batched {
|
|
@@ -271,7 +308,7 @@ interface Batched {
|
|
|
271
308
|
* })
|
|
272
309
|
* ```
|
|
273
310
|
*/
|
|
274
|
-
<Value, OriginStores extends
|
|
311
|
+
<Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
|
|
275
312
|
}
|
|
276
313
|
declare const batched: Batched;
|
|
277
314
|
//#endregion
|
|
@@ -306,7 +343,7 @@ interface LikeC4VitePluginRpc {
|
|
|
306
343
|
}): Promise<LayoutedElementView>;
|
|
307
344
|
}
|
|
308
345
|
//#endregion
|
|
309
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.
|
|
346
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.2_react@19.2.8/node_modules/@nanostores/react/index.d.ts
|
|
310
347
|
type StoreKeys<T> = T extends {
|
|
311
348
|
setKey: (k: infer K, v: any) => unknown;
|
|
312
349
|
} ? K : never;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { LikeC4Model } from "@likec4/core/model";
|
|
2
2
|
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
4
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/atom/index.js
|
|
5
5
|
let listenerQueue = [];
|
|
6
6
|
let lqIndex = 0;
|
|
7
|
+
let batchSeen = null;
|
|
7
8
|
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
8
9
|
const nanostoresGlobal = globalThis.nanostoresGlobal ||= { epoch: 0 };
|
|
10
|
+
let drainQueue = () => {
|
|
11
|
+
let thrown;
|
|
12
|
+
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER) try {
|
|
13
|
+
listenerQueue[lqIndex](listenerQueue[lqIndex + 1].value, listenerQueue[lqIndex + 2], listenerQueue[lqIndex + 3]);
|
|
14
|
+
} catch (e) {
|
|
15
|
+
thrown = e;
|
|
16
|
+
}
|
|
17
|
+
listenerQueue.length = 0;
|
|
18
|
+
if (thrown) throw thrown;
|
|
19
|
+
};
|
|
9
20
|
const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
10
21
|
let listeners = [];
|
|
11
22
|
let $atom = {
|
|
23
|
+
eq: Object.is,
|
|
12
24
|
get() {
|
|
13
25
|
if (!$atom.lc) $atom.listen(() => {})();
|
|
14
26
|
return $atom.value;
|
|
@@ -29,17 +41,18 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
29
41
|
},
|
|
30
42
|
notify(oldValue, changedKey) {
|
|
31
43
|
nanostoresGlobal.epoch++;
|
|
32
|
-
let runListenerQueue = !listenerQueue.length;
|
|
33
|
-
for (let listener of listeners)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
listenerQueue.
|
|
44
|
+
let runListenerQueue = !listenerQueue.length && !batchSeen;
|
|
45
|
+
for (let listener of listeners) {
|
|
46
|
+
if (batchSeen?.has(listener)) continue;
|
|
47
|
+
batchSeen?.add(listener);
|
|
48
|
+
listenerQueue.push(listener, $atom, oldValue, batchSeen ? void 0 : changedKey);
|
|
37
49
|
}
|
|
50
|
+
if (runListenerQueue) drainQueue();
|
|
38
51
|
},
|
|
39
52
|
off() {},
|
|
40
53
|
set(newValue) {
|
|
41
54
|
let oldValue = $atom.value;
|
|
42
|
-
if (oldValue
|
|
55
|
+
if (!$atom.eq(oldValue, newValue)) {
|
|
43
56
|
$atom.value = newValue;
|
|
44
57
|
$atom.notify(oldValue);
|
|
45
58
|
}
|
|
@@ -55,7 +68,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
//#endregion
|
|
58
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
71
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/lifecycle/index.js
|
|
59
72
|
const MOUNT = 5;
|
|
60
73
|
const UNMOUNT = 6;
|
|
61
74
|
const REVERT_MUTATION = 10;
|
|
@@ -115,7 +128,7 @@ let onMount = ($store, initialize) => {
|
|
|
115
128
|
};
|
|
116
129
|
|
|
117
130
|
//#endregion
|
|
118
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
131
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/computed/index.js
|
|
119
132
|
let computedStore = (stores, cb, batched) => {
|
|
120
133
|
if (!Array.isArray(stores)) stores = [stores];
|
|
121
134
|
let previousArgs;
|
|
@@ -160,25 +173,49 @@ const computed = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores
|
|
|
160
173
|
const batched = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores, fn, true);
|
|
161
174
|
|
|
162
175
|
//#endregion
|
|
163
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
176
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/deep-map/path.js
|
|
177
|
+
function getPath(obj, path) {
|
|
178
|
+
let allKeys = getAllKeysFromPath(path);
|
|
179
|
+
let res = obj;
|
|
180
|
+
for (let key of allKeys) {
|
|
181
|
+
if (res == null) return;
|
|
182
|
+
res = res[key];
|
|
183
|
+
}
|
|
184
|
+
return res;
|
|
185
|
+
}
|
|
186
|
+
const ARRAY_INDEX = /(.*)\[(\d+)\]/;
|
|
187
|
+
function getAllKeysFromPath(path) {
|
|
188
|
+
return path.split(".").flatMap((key) => getKeyAndIndicesFromKey(key));
|
|
189
|
+
}
|
|
190
|
+
function getKeyAndIndicesFromKey(key) {
|
|
191
|
+
if (ARRAY_INDEX.test(key)) {
|
|
192
|
+
let [, keyPart, index] = key.match(ARRAY_INDEX);
|
|
193
|
+
return [...getKeyAndIndicesFromKey(keyPart), index];
|
|
194
|
+
}
|
|
195
|
+
return [key];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/listen-keys/index.js
|
|
164
200
|
function listenKeys($store, keys, listener) {
|
|
165
|
-
let keysSet = new Set(keys)
|
|
201
|
+
let keysSet = new Set(keys);
|
|
166
202
|
return $store.listen((value, oldValue, changed) => {
|
|
167
|
-
if (keysSet.has(changed)) listener(value, oldValue, changed);
|
|
203
|
+
if (changed === void 0 ? keys.some((key) => oldValue === void 0 || value[key] !== oldValue[key] || getPath(value, key) !== getPath(oldValue, key)) : keysSet.has(changed) || keysSet.has(changed.split(/\.|\[/)[0])) listener(value, oldValue, changed);
|
|
168
204
|
});
|
|
169
205
|
}
|
|
170
206
|
|
|
171
207
|
//#endregion
|
|
172
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
208
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/map/index.js
|
|
173
209
|
const map = /* @__NO_SIDE_EFFECTS__ */ (initial = {}) => {
|
|
174
210
|
let $map = /* @__PURE__ */ atom(initial);
|
|
211
|
+
$map.eqKey = Object.is;
|
|
175
212
|
$map.setKey = function(key, value) {
|
|
176
213
|
let oldMap = $map.value;
|
|
177
214
|
if (typeof value === "undefined" && key in $map.value) {
|
|
178
215
|
$map.value = { ...$map.value };
|
|
179
216
|
delete $map.value[key];
|
|
180
217
|
$map.notify(oldMap, key);
|
|
181
|
-
} else if ($map.value[key]
|
|
218
|
+
} else if (!$map.eqKey($map.value[key], value, key)) {
|
|
182
219
|
$map.value = {
|
|
183
220
|
...$map.value,
|
|
184
221
|
[key]: value
|
|
@@ -190,7 +227,7 @@ const map = /* @__NO_SIDE_EFFECTS__ */ (initial = {}) => {
|
|
|
190
227
|
};
|
|
191
228
|
|
|
192
229
|
//#endregion
|
|
193
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.
|
|
230
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.2_react@19.2.8/node_modules/@nanostores/react/index.js
|
|
194
231
|
let emit = (snapshotRef, onChange) => (value) => {
|
|
195
232
|
if (snapshotRef.current === value) return;
|
|
196
233
|
snapshotRef.current = value;
|
|
@@ -210,9 +247,7 @@ function useStore(store, { keys, deps = [store, keys], ssr } = {}) {
|
|
|
210
247
|
}
|
|
211
248
|
|
|
212
249
|
//#endregion
|
|
213
|
-
//#region ../../node_modules/.pnpm/birpc@4.
|
|
214
|
-
const TYPE_REQUEST = "q";
|
|
215
|
-
const TYPE_RESPONSE = "s";
|
|
250
|
+
//#region ../../node_modules/.pnpm/birpc@4.2.0/node_modules/birpc/dist/index.mjs
|
|
216
251
|
function createPromiseWithResolvers() {
|
|
217
252
|
let resolve;
|
|
218
253
|
let reject;
|
|
@@ -248,7 +283,7 @@ function createBirpc($functions, options) {
|
|
|
248
283
|
const req = {
|
|
249
284
|
m: method,
|
|
250
285
|
a: args,
|
|
251
|
-
t:
|
|
286
|
+
t: "q"
|
|
252
287
|
};
|
|
253
288
|
if (optional) req.o = true;
|
|
254
289
|
const send = async (_req) => post(serialize(_req));
|
|
@@ -302,7 +337,7 @@ function createBirpc($functions, options) {
|
|
|
302
337
|
$call: (method, ...args) => _call(method, args, false),
|
|
303
338
|
$callOptional: (method, ...args) => _call(method, args, false, true),
|
|
304
339
|
$callEvent: (method, ...args) => _call(method, args, true),
|
|
305
|
-
$callRaw: (options
|
|
340
|
+
$callRaw: (options) => _call(options.method, options.args, options.event, options.optional),
|
|
306
341
|
$rejectPendingCalls,
|
|
307
342
|
get $closed() {
|
|
308
343
|
return $closed;
|
|
@@ -314,7 +349,7 @@ function createBirpc($functions, options) {
|
|
|
314
349
|
$functions
|
|
315
350
|
};
|
|
316
351
|
if (proxify) rpc = new Proxy({}, { get(_, method) {
|
|
317
|
-
if (Object.
|
|
352
|
+
if (Object.hasOwn(builtinMethods, method)) return builtinMethods[method];
|
|
318
353
|
if (method === "then" && !eventNames.includes("then") && !("then" in $functions)) return void 0;
|
|
319
354
|
const sendEvent = (...args) => _call(method, args, true);
|
|
320
355
|
if (eventNames.includes(method)) {
|
|
@@ -358,7 +393,7 @@ function createBirpc($functions, options) {
|
|
|
358
393
|
if (options.onGeneralError?.call(rpc, e) !== true) throw e;
|
|
359
394
|
return;
|
|
360
395
|
}
|
|
361
|
-
if (msg.t ===
|
|
396
|
+
if (msg.t === "q") {
|
|
362
397
|
const { m: method, a: args, o: optional } = msg;
|
|
363
398
|
let result, error;
|
|
364
399
|
let fn = await (resolver ? resolver.call(rpc, method, $functions[method]) : $functions[method]);
|
|
@@ -375,7 +410,7 @@ function createBirpc($functions, options) {
|
|
|
375
410
|
}
|
|
376
411
|
if (!error) try {
|
|
377
412
|
await post(serialize({
|
|
378
|
-
t:
|
|
413
|
+
t: "s",
|
|
379
414
|
i: msg.i,
|
|
380
415
|
r: result
|
|
381
416
|
}), ...extra);
|
|
@@ -386,7 +421,7 @@ function createBirpc($functions, options) {
|
|
|
386
421
|
}
|
|
387
422
|
try {
|
|
388
423
|
await post(serialize({
|
|
389
|
-
t:
|
|
424
|
+
t: "s",
|
|
390
425
|
i: msg.i,
|
|
391
426
|
e: error
|
|
392
427
|
}), ...extra);
|
|
@@ -856,7 +891,7 @@ function createCustomEqual(options = {}) {
|
|
|
856
891
|
}
|
|
857
892
|
|
|
858
893
|
//#endregion
|
|
859
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
894
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/lazyDataLastImpl--3B10z3s.js
|
|
860
895
|
function e(e, t, n) {
|
|
861
896
|
let r = (n) => e(n, ...t);
|
|
862
897
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -866,7 +901,7 @@ function e(e, t, n) {
|
|
|
866
901
|
}
|
|
867
902
|
|
|
868
903
|
//#endregion
|
|
869
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
904
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/purry.js
|
|
870
905
|
function t$1(t, n, r) {
|
|
871
906
|
let i = t.length - n.length;
|
|
872
907
|
if (i === 0) return t(...n);
|
|
@@ -875,7 +910,7 @@ function t$1(t, n, r) {
|
|
|
875
910
|
}
|
|
876
911
|
|
|
877
912
|
//#endregion
|
|
878
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
913
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/mapValues.js
|
|
879
914
|
function t(...t) {
|
|
880
915
|
return t$1(n, t);
|
|
881
916
|
}
|
|
@@ -896,7 +931,7 @@ function n(e, t) {
|
|
|
896
931
|
*/
|
|
897
932
|
function createRpc(options) {
|
|
898
933
|
return createBirpc({}, {
|
|
899
|
-
timeout:
|
|
934
|
+
timeout: 12e4,
|
|
900
935
|
post: (data) => options.send("likec4:rpc", data),
|
|
901
936
|
on: (fn) => options.on("likec4:rpc", fn),
|
|
902
937
|
onTimeoutError(functionName) {
|
|
@@ -932,7 +967,8 @@ function createHooksForModel($atom) {
|
|
|
932
967
|
return useStore($likec4views);
|
|
933
968
|
}
|
|
934
969
|
function useLikeC4View(viewId) {
|
|
935
|
-
|
|
970
|
+
const $view = useMemo(() => /* @__PURE__ */ computed($likec4model, (model) => model.findView(viewId)?.$layouted ?? null), [viewId]);
|
|
971
|
+
return useStore($view);
|
|
936
972
|
}
|
|
937
973
|
return {
|
|
938
974
|
updateModel,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "likec4",
|
|
3
3
|
"description": "Toolchain for your architecture diagrams",
|
|
4
|
-
"version": "1.59.
|
|
4
|
+
"version": "1.59.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://likec4.dev",
|
|
7
7
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -90,22 +90,22 @@
|
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@hpcc-js/wasm-graphviz": "1.22.2",
|
|
93
|
-
"@
|
|
93
|
+
"@likec4/core": "1.59.3",
|
|
94
|
+
"@likec4/icons": "1.46.4",
|
|
95
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
94
96
|
"bundle-require": "^5.1.0",
|
|
95
97
|
"esbuild": "0.28.1",
|
|
96
98
|
"fdir": "6.4.0",
|
|
97
99
|
"playwright": "1.60.0",
|
|
98
100
|
"chokidar": "^5.0.0",
|
|
99
|
-
"immer": "^11.1.
|
|
101
|
+
"immer": "^11.1.18",
|
|
100
102
|
"std-env": "^4.1.0",
|
|
101
103
|
"type-fest": "^4.41.0",
|
|
102
104
|
"vite-plugin-singlefile": "^2.3.3",
|
|
103
|
-
"vite": "^8.
|
|
105
|
+
"vite": "^8.2.2",
|
|
104
106
|
"yargs": "17.7.2",
|
|
105
107
|
"nano-spawn": "^2.1.0",
|
|
106
|
-
"use-sync-external-store": "^1.6.0"
|
|
107
|
-
"@likec4/core": "1.59.2",
|
|
108
|
-
"@likec4/icons": "1.46.4"
|
|
108
|
+
"use-sync-external-store": "^1.6.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
111
|
"@tanstack/ai": "^0.14.0",
|
|
@@ -139,19 +139,35 @@
|
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"langium": "3.5.0",
|
|
142
|
+
"@likec4/config": "1.59.3",
|
|
143
|
+
"@likec4/leanix-bridge": "1.59.3",
|
|
144
|
+
"@likec4/log": "1.59.3",
|
|
145
|
+
"@likec4/language-server": "1.59.3",
|
|
146
|
+
"@likec4/language-services": "1.59.3",
|
|
147
|
+
"@likec4/mcp": "1.59.3",
|
|
142
148
|
"@dagrejs/dagre": "1.1.8",
|
|
143
149
|
"@fontsource-variable/ibm-plex-sans": "^5.2.8",
|
|
150
|
+
"@likec4/devops": "1.59.3",
|
|
151
|
+
"@likec4/diagram": "1.59.3",
|
|
152
|
+
"@likec4/layouts": "1.59.3",
|
|
153
|
+
"@likec4/vite-plugin": "1.59.3",
|
|
154
|
+
"@likec4/react": "1.59.3",
|
|
155
|
+
"@likec4/spa": "1.59.3",
|
|
156
|
+
"@likec4/generators": "1.59.3",
|
|
157
|
+
"@likec4/style-preset": "1.59.3",
|
|
158
|
+
"@likec4/styles": "1.59.3",
|
|
159
|
+
"@likec4/tsconfig": "1.59.3",
|
|
144
160
|
"@pandacss/dev": "^1.11.4",
|
|
145
161
|
"@tanstack/ai": "^0.14.0",
|
|
146
162
|
"@types/node": "~22.19.19",
|
|
147
163
|
"@types/picomatch": "^4.0.3",
|
|
148
|
-
"@types/react": "19.2.
|
|
149
|
-
"@types/react-dom": "19.2.
|
|
164
|
+
"@types/react": "19.2.18",
|
|
165
|
+
"@types/react-dom": "19.2.5",
|
|
150
166
|
"@types/semver": "^7.7.1",
|
|
151
167
|
"@types/yargs": "^17.0.33",
|
|
152
168
|
"autoprefixer": "^10.5.4",
|
|
153
169
|
"picomatch": "^4.0.5",
|
|
154
|
-
"birpc": "^4.
|
|
170
|
+
"birpc": "^4.2.0",
|
|
155
171
|
"boxen": "^8.0.1",
|
|
156
172
|
"clsx": "^2.1.1",
|
|
157
173
|
"conf": "^15.1.0",
|
|
@@ -165,29 +181,29 @@
|
|
|
165
181
|
"ky": "^1.14.3",
|
|
166
182
|
"mkdirp": "^3.0.1",
|
|
167
183
|
"npm-run-all2": "^8.0.4",
|
|
168
|
-
"p-limit": "7.3.
|
|
169
|
-
"nanostores": "1.
|
|
184
|
+
"p-limit": "7.3.2",
|
|
185
|
+
"nanostores": "1.5.2",
|
|
170
186
|
"@nanostores/react": "1.1.0",
|
|
171
187
|
"oxlint": "1.72.0",
|
|
172
188
|
"package-manager-detector": "1.6.0",
|
|
173
189
|
"package-up": "^5.0.0",
|
|
174
|
-
"postcss": "8.5.
|
|
190
|
+
"postcss": "8.5.23",
|
|
175
191
|
"pretty-ms": "^9.3.0",
|
|
176
|
-
"react": "19.2.
|
|
177
|
-
"react-dom": "19.2.
|
|
178
|
-
"react-error-boundary": "^6.1.
|
|
179
|
-
"react-resizable-panels": "^4.
|
|
180
|
-
"remeda": "^2.
|
|
192
|
+
"react": "19.2.8",
|
|
193
|
+
"react-dom": "19.2.8",
|
|
194
|
+
"react-error-boundary": "^6.1.4",
|
|
195
|
+
"react-resizable-panels": "^4.12.3",
|
|
196
|
+
"remeda": "^2.45.0",
|
|
181
197
|
"semver": "^7.8.1",
|
|
182
198
|
"strip-indent": "^4.1.1",
|
|
183
|
-
"tinyrainbow": "^3.1.
|
|
199
|
+
"tinyrainbow": "^3.1.1",
|
|
184
200
|
"tsx": "4.22.5",
|
|
185
|
-
"turbo": "2.10.
|
|
201
|
+
"turbo": "2.10.12",
|
|
186
202
|
"typescript": "6.0.3",
|
|
187
203
|
"ufo": "1.6.4",
|
|
188
204
|
"tsdown": "^0.22.9",
|
|
189
|
-
"vite-plugin-dts": "^5.0
|
|
190
|
-
"vitest": "4.1.
|
|
205
|
+
"vite-plugin-dts": "^5.1.0",
|
|
206
|
+
"vitest": "4.1.11",
|
|
191
207
|
"vscode-jsonrpc": "8.2.0",
|
|
192
208
|
"vscode-languageserver": "9.0.1",
|
|
193
209
|
"vscode-languageserver-types": "3.17.5",
|
|
@@ -195,23 +211,7 @@
|
|
|
195
211
|
"which": "^5.0.0",
|
|
196
212
|
"wireit": "0.14.12",
|
|
197
213
|
"zod": "^4.4.3",
|
|
198
|
-
"zx": "8.8.5"
|
|
199
|
-
"@likec4/leanix-bridge": "1.59.2",
|
|
200
|
-
"@likec4/config": "1.59.2",
|
|
201
|
-
"@likec4/language-server": "1.59.2",
|
|
202
|
-
"@likec4/log": "1.59.2",
|
|
203
|
-
"@likec4/language-services": "1.59.2",
|
|
204
|
-
"@likec4/mcp": "1.59.2",
|
|
205
|
-
"@likec4/devops": "1.59.2",
|
|
206
|
-
"@likec4/diagram": "1.59.2",
|
|
207
|
-
"@likec4/layouts": "1.59.2",
|
|
208
|
-
"@likec4/vite-plugin": "1.59.2",
|
|
209
|
-
"@likec4/react": "1.59.2",
|
|
210
|
-
"@likec4/spa": "1.59.2",
|
|
211
|
-
"@likec4/generators": "1.59.2",
|
|
212
|
-
"@likec4/style-preset": "1.59.2",
|
|
213
|
-
"@likec4/styles": "1.59.2",
|
|
214
|
-
"@likec4/tsconfig": "1.59.2"
|
|
214
|
+
"zx": "8.8.5"
|
|
215
215
|
},
|
|
216
216
|
"scripts": {
|
|
217
217
|
"typecheck": "tsc --build --verbose",
|