likec4 1.57.0 → 1.58.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.
Files changed (168) hide show
  1. package/__app__/codegen/react.mjs +7 -8
  2. package/__app__/codegen/webcomponent.mjs +70 -881
  3. package/__app__/src/aichat/index.mjs +8 -1
  4. package/__app__/src/chunks/AIChat.mjs +959 -0
  5. package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
  6. package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
  7. package/__app__/src/chunks/Markdown.mjs +146 -0
  8. package/__app__/src/chunks/NavigationPanel.mjs +61 -0
  9. package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
  10. package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
  11. package/__app__/src/chunks/es.mjs +439 -0
  12. package/__app__/src/chunks/hooks.mjs +145 -0
  13. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
  14. package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
  15. package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
  16. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
  17. package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
  18. package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
  19. package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
  20. package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
  21. package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
  22. package/__app__/src/chunks/libs/d3.mjs +2842 -0
  23. package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
  24. package/__app__/src/chunks/libs/framer.mjs +5872 -0
  25. package/__app__/src/chunks/libs/remeda.mjs +642 -0
  26. package/__app__/src/chunks/libs/zod.mjs +3170 -0
  27. package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
  28. package/__app__/src/chunks/styled-system.mjs +1040 -0
  29. package/__app__/src/fonts.css +1 -1
  30. package/__app__/src/main.mjs +14816 -14
  31. package/__app__/src/style.css +1 -1
  32. package/dist/chunks/enableServer.mjs +1 -1
  33. package/dist/chunks/filenames.mjs +2 -2
  34. package/dist/chunks/index2.d.mts +1877 -734
  35. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  36. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  37. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  38. package/dist/chunks/libs/chevrotain.mjs +25 -25
  39. package/dist/chunks/libs/langium.mjs +1 -1
  40. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  41. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  42. package/dist/chunks/libs/remeda.mjs +1 -1
  43. package/dist/chunks/libs/ufo.mjs +1 -1
  44. package/dist/chunks/libs/unstorage.mjs +1 -1
  45. package/dist/chunks/libs/which.mjs +1 -1
  46. package/dist/chunks/libs/zod.mjs +65 -0
  47. package/dist/chunks/node.mjs +73 -62
  48. package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
  49. package/dist/cli/index.mjs +184 -144
  50. package/dist/index.d.mts +1 -1
  51. package/dist/index.mjs +1 -1
  52. package/dist/model/index.d.mts +1 -1
  53. package/dist/vite-plugin/index.mjs +1 -1
  54. package/dist/vite-plugin/internal/index.d.mts +52 -57
  55. package/dist/vite-plugin/internal/index.mjs +946 -1
  56. package/package.json +46 -47
  57. package/react/index.d.mts +92 -23
  58. package/react/index.mjs +44551 -42605
  59. package/__app__/chunks/AIChat2.mjs +0 -2
  60. package/__app__/chunks/DiagramActorProvider.mjs +0 -10
  61. package/__app__/chunks/EmbedPage.mjs +0 -1
  62. package/__app__/chunks/ExportPage.mjs +0 -2
  63. package/__app__/chunks/LikeC4Diagram.mjs +0 -19
  64. package/__app__/chunks/LikeC4Styles.mjs +0 -48
  65. package/__app__/chunks/Markdown.mjs +0 -1
  66. package/__app__/chunks/NavigationPanel.mjs +0 -1
  67. package/__app__/chunks/ViewReact.mjs +0 -1
  68. package/__app__/chunks/adhoc-editor.mjs +0 -1
  69. package/__app__/chunks/aichat.mjs +0 -1
  70. package/__app__/chunks/box.mjs +0 -1
  71. package/__app__/chunks/create-style-context.mjs +0 -1
  72. package/__app__/chunks/css.mjs +0 -1
  73. package/__app__/chunks/factory.mjs +0 -1
  74. package/__app__/chunks/hooks.mjs +0 -1
  75. package/__app__/chunks/hstack.mjs +0 -1
  76. package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
  77. package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
  78. package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
  79. package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
  80. package/__app__/chunks/libs/@mantine/core.mjs +0 -41
  81. package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
  82. package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
  83. package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
  84. package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
  85. package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
  86. package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
  87. package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
  88. package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
  89. package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
  90. package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
  91. package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
  92. package/__app__/chunks/libs/@xstate/react.mjs +0 -1
  93. package/__app__/chunks/libs/@xstate/store.mjs +0 -1
  94. package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
  95. package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
  96. package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
  97. package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
  98. package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
  99. package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
  100. package/__app__/chunks/libs/bezier-js.mjs +0 -1
  101. package/__app__/chunks/libs/copy-anything.mjs +0 -1
  102. package/__app__/chunks/libs/d3-path.mjs +0 -1
  103. package/__app__/chunks/libs/d3-shape.mjs +0 -1
  104. package/__app__/chunks/libs/fast-equals.mjs +0 -1
  105. package/__app__/chunks/libs/framer-motion.mjs +0 -9
  106. package/__app__/chunks/libs/html-to-image.mjs +0 -2
  107. package/__app__/chunks/libs/motion-dom.mjs +0 -1
  108. package/__app__/chunks/libs/nanostores.mjs +0 -1
  109. package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
  110. package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
  111. package/__app__/chunks/libs/remeda.mjs +0 -1
  112. package/__app__/chunks/libs/superjson.mjs +0 -1
  113. package/__app__/chunks/libs/zod.mjs +0 -64
  114. package/__app__/chunks/rolldown-runtime.mjs +0 -1
  115. package/__app__/chunks/styles.css.mjs +0 -1
  116. package/__app__/chunks/txt.mjs +0 -1
  117. package/__app__/chunks/useLikeC4Project.mjs +0 -1
  118. package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
  119. package/__app__/src/pages/EmbedPage.mjs +0 -1
  120. package/__app__/src/pages/ExportPage.mjs +0 -1
  121. package/__app__/src/pages/ProjectsOverview.mjs +0 -1
  122. package/__app__/src/pages/ViewAsD2.mjs +0 -1
  123. package/__app__/src/pages/ViewAsDot.mjs +0 -1
  124. package/__app__/src/pages/ViewAsMmd.mjs +0 -1
  125. package/__app__/src/pages/ViewAsPuml.mjs +0 -1
  126. package/__app__/src/pages/ViewEditor.mjs +0 -1
  127. package/__app__/src/pages/ViewReact.mjs +0 -1
  128. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  129. package/dist/chunks/libs/@hono/mcp.mjs +0 -70
  130. package/dist/chunks/libs/@hono/node-server.mjs +0 -1
  131. package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
  132. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  133. package/dist/chunks/libs/ajv.mjs +0 -1
  134. package/dist/chunks/libs/ansi-align.mjs +0 -2
  135. package/dist/chunks/libs/ansi-regex.mjs +0 -1
  136. package/dist/chunks/libs/ansi-styles.mjs +0 -1
  137. package/dist/chunks/libs/atomically.mjs +0 -1
  138. package/dist/chunks/libs/boxen.mjs +0 -22
  139. package/dist/chunks/libs/conf.mjs +0 -1
  140. package/dist/chunks/libs/defu.mjs +0 -1
  141. package/dist/chunks/libs/destr.mjs +0 -1
  142. package/dist/chunks/libs/find-up-simple.mjs +0 -1
  143. package/dist/chunks/libs/get-port.mjs +0 -1
  144. package/dist/chunks/libs/hono.mjs +0 -1
  145. package/dist/chunks/libs/is-docker.mjs +0 -1
  146. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  147. package/dist/chunks/libs/is-inside-container.mjs +0 -1
  148. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  149. package/dist/chunks/libs/isexe.mjs +0 -1
  150. package/dist/chunks/libs/ky.mjs +0 -3
  151. package/dist/chunks/libs/p-debounce.mjs +0 -1
  152. package/dist/chunks/libs/p-limit.mjs +0 -1
  153. package/dist/chunks/libs/p-timeout.mjs +0 -1
  154. package/dist/chunks/libs/package-up.mjs +0 -1
  155. package/dist/chunks/libs/parse-ms.mjs +0 -1
  156. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  157. package/dist/chunks/libs/strip-indent.mjs +0 -1
  158. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  159. package/dist/chunks/libs/ts-graphviz.mjs +0 -1
  160. package/dist/chunks/libs/unctx.mjs +0 -1
  161. package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
  162. package/dist/chunks/libs/word-wrap.mjs +0 -12
  163. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
  164. package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
  165. package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
  166. package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
  167. package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
  168. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as __name } from "./chunks/rolldown-runtime.mjs";
2
2
  import { t as LikeC4$1 } from "./chunks/index2.mjs";
3
- export * from "@likec4/core/types";
3
+ export type * from "@likec4/core/types";
4
4
 
5
5
  //#region src/LikeC4.d.ts
6
6
  type LikeC4Options = {
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e}from"./chunks/rolldown-runtime.mjs";import{n as t,t as n}from"./chunks/node.mjs";import{t as r}from"./chunks/libs/defu.mjs";import{exact as i}from"@likec4/core";let a;(function(a){async function fromSource$1(e,t){let{logger:a,watch:o,...s}=t??{};return n(e,r(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),a.fromSource=fromSource$1;async function fromWorkspace$1(e=``,n){let{logger:a,watch:o,...s}=n??{};return t(e,r(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),a.fromWorkspace=fromWorkspace$1})(a||={});export{a as LikeC4};
1
+ import{i as e}from"./chunks/rolldown-runtime.mjs";import{l as t,n,t as r}from"./chunks/node.mjs";import{exact as i}from"@likec4/core";let a;(function(a){async function fromSource$1(e,n){let{logger:a,watch:o,...s}=n??{};return r(e,t(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),a.fromSource=fromSource$1;async function fromWorkspace$1(e=``,r){let{logger:a,watch:o,...s}=r??{};return n(e,t(i({...s,configureLogger:a}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),a.fromWorkspace=fromWorkspace$1})(a||={});export{a as LikeC4};
@@ -3,7 +3,7 @@ import * as types from "@likec4/core/types";
3
3
  import { BBox, EdgeId, LayoutedDynamicView, NodeId, ViewId } from "@likec4/core/types";
4
4
  import { Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4DeploymentModel, LikeC4Model, LikeC4Model as LikeC4Model$1, LikeC4ViewModel, NodeModel, RelationshipModel, deploymentConnection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, isRelationModel, mergeConnections, modelConnection, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from "@likec4/core/model";
5
5
  import { ComputedProjectEdge, ComputedProjectNode, ComputedProjectsView, LayoutedProjectEdge, LayoutedProjectNode, LayoutedProjectsView } from "@likec4/core/compute-view";
6
- export * from "@likec4/core/types";
6
+ export type * from "@likec4/core/types";
7
7
 
8
8
  //#region ../layouts/dist/sequence/index.d.mts
9
9
  //#region src/sequence/_types.d.ts
@@ -1 +1 @@
1
- import{t as e}from"../chunks/plugin.mjs";export{e as LikeC4VitePlugin};
1
+ import{t as e}from"../chunks/vite-plugin.mjs";export{e as LikeC4VitePlugin};
@@ -1,11 +1,10 @@
1
- import { t as __name } from "./chunks/rolldown-runtime.mjs";
2
1
  import { LikeC4Model } from "@likec4/core/model";
3
2
  import { DependencyList } from "react";
4
3
  import { LayoutedElementView, LayoutedLikeC4ModelData, LayoutedView, ProjectId, ViewChange, ViewId } from "@likec4/core/types";
5
4
  import { AdhocViewPredicate } from "@likec4/core/compute-view";
6
5
 
7
- //#region ../vite-plugin/dist/internal/chunks/libs/@nanostores/react.d.mts
8
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/atom/index.d.ts
6
+ //#region ../vite-plugin/dist/internal/index.d.mts
7
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/atom/index.d.ts
9
8
  type AllKeys<T> = T extends any ? keyof T : never;
10
9
  type Primitive = boolean | number | string;
11
10
  type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends ((...args: any) => any) ? Value : Value extends Primitive ? Value : Value extends object ? Readonly<Value> : Value;
@@ -127,7 +126,7 @@ type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
127
126
  * @returns The store object with methods to subscribe.
128
127
  */
129
128
  declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt; //#endregion
130
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/map/index.d.ts
129
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/map/index.d.ts
131
130
  type KeyofBase = keyof any;
132
131
  type Get<T, K extends KeyofBase> = Extract<T, { [K1 in K]: any }>[K];
133
132
  type HasIndexSignature<T> = string extends keyof T ? true : false;
@@ -220,60 +219,11 @@ interface PreinitializedMapStore<Value extends object = any> extends MapStore<Va
220
219
  * @returns The store object with methods to subscribe.
221
220
  */
222
221
  declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Value> & StoreExt; //#endregion
223
- //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.2.0_react@19.2.6/node_modules/@nanostores/react/index.d.ts
224
- type StoreKeys<T> = T extends {
225
- setKey: (k: infer K, v: any) => unknown;
226
- } ? K : never;
227
- interface UseStoreOptions<SomeStore> {
228
- /**
229
- * @default
230
- * ```ts
231
- * [store, options.keys]
232
- * ```
233
- */
234
- deps?: DependencyList;
235
- /**
236
- * Will re-render components only on specific key changes.
237
- */
238
- keys?: StoreKeys<SomeStore>[];
239
- /**
240
- * Enable SSR support. Set `initial` when store's initial value is the same on
241
- * server and client, or provide a function to return the server store state
242
- * for advanced cases (per useSyncExternalStore's getServerSnapshot).
243
- */
244
- ssr?: (() => StoreValue<SomeStore>) | 'initial' | false;
245
- }
246
- /**
247
- * Subscribe to store changes and get store’s value.
248
- *
249
- * Can be user with store builder too.
250
- *
251
- * ```js
252
- * import { useStore } from 'nanostores/react'
253
- *
254
- * import { router } from '../store/router'
255
- *
256
- * export const Layout = () => {
257
- * let page = useStore(router)
258
- * if (page.route === 'home') {
259
- * return <HomePage />
260
- * } else {
261
- * return <Error404 />
262
- * }
263
- * }
264
- * ```
265
- *
266
- * @param store Store instance.
267
- * @returns Store value.
268
- */
269
- declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>; //#endregion
270
- //#endregion
271
- //#region ../vite-plugin/dist/internal/chunks/libs/nanostores.d.mts
272
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/task/index.d.ts
222
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/task/index.d.ts
273
223
  interface Task<Value> extends Promise<Value> {
274
224
  t: true;
275
225
  } //#endregion
276
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/computed/index.d.ts
226
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/computed/index.d.ts
277
227
  type StoreValues<Stores extends AnyStore[]> = { [Index in keyof Stores]: StoreValue<Stores[Index]> };
278
228
  interface Computed {
279
229
  /**
@@ -322,8 +272,6 @@ interface Batched {
322
272
  <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
323
273
  }
324
274
  declare const batched: Batched; //#endregion
325
- //#endregion
326
- //#region ../vite-plugin/dist/internal/index.d.mts
327
275
  //#region src/rpc/protocol.d.ts
328
276
  interface LikeC4VitePluginRpc {
329
277
  /**
@@ -354,6 +302,53 @@ interface LikeC4VitePluginRpc {
354
302
  predicates: AdhocViewPredicate[];
355
303
  }): Promise<LayoutedElementView>;
356
304
  } //#endregion
305
+ //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.3.0_react@19.2.7/node_modules/@nanostores/react/index.d.ts
306
+ type StoreKeys<T> = T extends {
307
+ setKey: (k: infer K, v: any) => unknown;
308
+ } ? K : never;
309
+ interface UseStoreOptions<SomeStore> {
310
+ /**
311
+ * @default
312
+ * ```ts
313
+ * [store, options.keys]
314
+ * ```
315
+ */
316
+ deps?: DependencyList;
317
+ /**
318
+ * Will re-render components only on specific key changes.
319
+ */
320
+ keys?: StoreKeys<SomeStore>[];
321
+ /**
322
+ * Enable SSR support. Set `initial` when store's initial value is the same on
323
+ * server and client, or provide a function to return the server store state
324
+ * for advanced cases (per useSyncExternalStore's getServerSnapshot).
325
+ */
326
+ ssr?: (() => StoreValue<SomeStore>) | 'initial' | false;
327
+ }
328
+ /**
329
+ * Subscribe to store changes and get store’s value.
330
+ *
331
+ * Can be user with store builder too.
332
+ *
333
+ * ```js
334
+ * import { useStore } from 'nanostores/react'
335
+ *
336
+ * import { router } from '../store/router'
337
+ *
338
+ * export const Layout = () => {
339
+ * let page = useStore(router)
340
+ * if (page.route === 'home') {
341
+ * return <HomePage />
342
+ * } else {
343
+ * return <Error404 />
344
+ * }
345
+ * }
346
+ * ```
347
+ *
348
+ * @param store Store instance.
349
+ * @returns Store value.
350
+ */
351
+ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>; //#endregion
357
352
  //#region src/internal.d.ts
358
353
  interface LikeC4VitePluginRpcOptions {
359
354
  /**