likec4 1.56.0 → 1.57.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 (154) hide show
  1. package/__app__/chunks/AIChat2.mjs +2 -0
  2. package/__app__/chunks/DiagramActorProvider.mjs +4 -4
  3. package/__app__/chunks/EmbedPage.mjs +1 -0
  4. package/__app__/chunks/ExportPage.mjs +2 -0
  5. package/__app__/chunks/LikeC4Diagram.mjs +5 -5
  6. package/__app__/chunks/LikeC4Styles.mjs +11 -11
  7. package/__app__/chunks/Markdown.mjs +1 -0
  8. package/__app__/chunks/NavigationPanel.mjs +1 -1
  9. package/__app__/chunks/ViewReact.mjs +1 -1
  10. package/__app__/chunks/adhoc-editor.mjs +1 -1
  11. package/__app__/chunks/aichat.mjs +1 -0
  12. package/__app__/chunks/box.mjs +1 -0
  13. package/__app__/chunks/create-style-context.mjs +1 -0
  14. package/__app__/chunks/css.mjs +1 -0
  15. package/__app__/chunks/factory.mjs +1 -0
  16. package/__app__/chunks/hooks.mjs +1 -1
  17. package/__app__/chunks/hstack.mjs +1 -0
  18. package/__app__/chunks/libs/@dagrejs/dagre.mjs +1 -1
  19. package/__app__/chunks/libs/@floating-ui/core.mjs +1 -1
  20. package/__app__/chunks/libs/@floating-ui/dom.mjs +1 -1
  21. package/__app__/chunks/libs/@floating-ui/react.mjs +1 -1
  22. package/__app__/chunks/libs/@mantine/core.mjs +24 -24
  23. package/__app__/chunks/libs/@mantine/hooks.mjs +1 -1
  24. package/__app__/chunks/libs/@nanostores/react.mjs +1 -1
  25. package/__app__/chunks/libs/@react-hookz/web.mjs +1 -1
  26. package/__app__/chunks/libs/@tabler/icons-react.mjs +347 -4
  27. package/__app__/chunks/libs/@tanstack/ai-client.mjs +2 -0
  28. package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +1 -0
  29. package/__app__/chunks/libs/@tanstack/ai-react.mjs +1 -0
  30. package/__app__/chunks/libs/@tanstack/ai.mjs +2 -0
  31. package/__app__/chunks/libs/@tanstack/history.mjs +1 -1
  32. package/__app__/chunks/libs/@tanstack/react-router.mjs +3 -3
  33. package/__app__/chunks/libs/@tanstack/router-core.mjs +1 -1
  34. package/__app__/chunks/libs/@xstate/react.mjs +1 -1
  35. package/__app__/chunks/libs/@xstate/store.mjs +1 -1
  36. package/__app__/chunks/libs/@xyflow/react.mjs +3 -3
  37. package/__app__/chunks/libs/@zag-js/anatomy.mjs +1 -1
  38. package/__app__/chunks/libs/@zag-js/collection.mjs +1 -1
  39. package/__app__/chunks/libs/@zag-js/core.mjs +1 -1
  40. package/__app__/chunks/libs/@zag-js/react.mjs +1 -1
  41. package/__app__/chunks/libs/@zag-js/tree-view.mjs +1 -1
  42. package/__app__/chunks/libs/bezier-js.mjs +1 -1
  43. package/__app__/chunks/libs/copy-anything.mjs +1 -0
  44. package/__app__/chunks/libs/d3-path.mjs +1 -1
  45. package/__app__/chunks/libs/d3-shape.mjs +1 -1
  46. package/__app__/chunks/libs/fast-equals.mjs +1 -1
  47. package/__app__/chunks/libs/framer-motion.mjs +3 -3
  48. package/__app__/chunks/libs/html-to-image.mjs +2 -2
  49. package/__app__/chunks/libs/motion-dom.mjs +1 -1
  50. package/__app__/chunks/libs/nanostores.mjs +1 -1
  51. package/__app__/chunks/libs/react-error-boundary.mjs +1 -1
  52. package/__app__/chunks/libs/react-resizable-panels.mjs +1 -1
  53. package/__app__/chunks/libs/remeda.mjs +1 -1
  54. package/__app__/chunks/libs/superjson.mjs +1 -0
  55. package/__app__/chunks/libs/zod.mjs +39 -14
  56. package/__app__/chunks/rolldown-runtime.mjs +1 -1
  57. package/__app__/chunks/styles.css.mjs +1 -1
  58. package/__app__/chunks/txt.mjs +1 -0
  59. package/__app__/chunks/useLikeC4Project.mjs +1 -1
  60. package/__app__/codegen/webcomponent.mjs +221 -69
  61. package/__app__/src/aichat/index.mjs +1 -0
  62. package/__app__/src/main.mjs +45 -1
  63. package/__app__/src/pages/AdHocViewEditor.mjs +1 -1
  64. package/__app__/src/pages/EmbedPage.mjs +1 -1
  65. package/__app__/src/pages/ExportPage.mjs +1 -1
  66. package/__app__/src/pages/ProjectsOverview.mjs +1 -1
  67. package/__app__/src/pages/ViewAsD2.mjs +1 -1
  68. package/__app__/src/pages/ViewAsDot.mjs +1 -1
  69. package/__app__/src/pages/ViewAsMmd.mjs +1 -1
  70. package/__app__/src/pages/ViewAsPuml.mjs +1 -1
  71. package/__app__/src/pages/ViewEditor.mjs +1 -1
  72. package/__app__/src/style.css +1 -1
  73. package/config/schema.json +14 -41
  74. package/dist/chunks/enableServer.mjs +1 -0
  75. package/dist/chunks/index2.d.mts +569 -377
  76. package/dist/chunks/libs/@hono/mcp.mjs +33 -8
  77. package/dist/chunks/libs/@hono/node-server.mjs +1 -1
  78. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +7 -7
  79. package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
  80. package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
  81. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
  82. package/dist/chunks/libs/ajv.mjs +1 -1
  83. package/dist/chunks/libs/ansi-styles.mjs +1 -1
  84. package/dist/chunks/libs/boxen.mjs +2 -2
  85. package/dist/chunks/libs/chevrotain.mjs +2 -2
  86. package/dist/chunks/libs/conf.mjs +1 -1
  87. package/dist/chunks/libs/langium.d.mts +5 -5
  88. package/dist/chunks/libs/langium.mjs +10 -10
  89. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  90. package/dist/chunks/libs/pako.mjs +3 -1
  91. package/dist/chunks/libs/remeda.mjs +1 -1
  92. package/dist/chunks/libs/ts-graphviz.mjs +1 -4
  93. package/dist/chunks/libs/unctx.mjs +1 -0
  94. package/dist/chunks/libs/vscode-languageserver.mjs +1 -1
  95. package/dist/chunks/libs/zod.d.mts +60 -25
  96. package/dist/chunks/node.mjs +62 -45
  97. package/dist/chunks/plugin.mjs +234 -41
  98. package/dist/chunks/sequence-view.mjs +1 -1
  99. package/dist/cli/index.mjs +142 -139
  100. package/dist/index.d.mts +1 -130
  101. package/dist/model/index.d.mts +1 -1
  102. package/dist/vite-plugin/index.d.mts +53 -2
  103. package/dist/vite-plugin/internal/index.d.mts +331 -3
  104. package/dist/vite-plugin/internal/index.mjs +1 -1
  105. package/package.json +65 -51
  106. package/react/index.d.mts +82 -50
  107. package/react/index.mjs +34017 -32421
  108. package/vite-plugin-modules.d.ts +4 -0
  109. package/__app__/chunks/ColorSchemeToggle.mjs +0 -1
  110. package/__app__/chunks/Fallback.mjs +0 -1
  111. package/__app__/chunks/Header.mjs +0 -13
  112. package/__app__/chunks/IconRenderer.mjs +0 -1
  113. package/__app__/chunks/LikeC4ModelContext.mjs +0 -1
  114. package/__app__/chunks/LikeC4ModelContext2.mjs +0 -1
  115. package/__app__/chunks/StaticLikeC4Diagram.mjs +0 -1
  116. package/__app__/chunks/__root.mjs +0 -1
  117. package/__app__/chunks/libs/motion.mjs +0 -1
  118. package/__app__/chunks/libs/xstate.mjs +0 -1
  119. package/__app__/chunks/safeCtx.mjs +0 -1
  120. package/__app__/chunks/searchParams.mjs +0 -1
  121. package/__app__/chunks/single-index.mjs +0 -1
  122. package/__app__/chunks/styled-system.mjs +0 -1
  123. package/__app__/chunks/useUpdateEffect.mjs +0 -1
  124. package/__app__/src/routeTree.gen.mjs +0 -1
  125. package/__app__/src/routes/__root.mjs +0 -1
  126. package/__app__/src/routes/_single/adhoc.mjs +0 -1
  127. package/__app__/src/routes/_single/embed._viewId.mjs +0 -1
  128. package/__app__/src/routes/_single/export._viewId.mjs +0 -1
  129. package/__app__/src/routes/_single/route.mjs +0 -1
  130. package/__app__/src/routes/_single/single-index.mjs +0 -1
  131. package/__app__/src/routes/_single/view._viewId.d2.mjs +0 -1
  132. package/__app__/src/routes/_single/view._viewId.dot.mjs +0 -1
  133. package/__app__/src/routes/_single/view._viewId.index.mjs +0 -1
  134. package/__app__/src/routes/_single/view._viewId.mjs +0 -1
  135. package/__app__/src/routes/_single/view._viewId.mmd.mjs +0 -1
  136. package/__app__/src/routes/_single/view._viewId.puml.mjs +0 -1
  137. package/__app__/src/routes/_single/webcomponent._.mjs +0 -33
  138. package/__app__/src/routes/index.mjs +0 -1
  139. package/__app__/src/routes/project._projectId/-components.mjs +0 -1
  140. package/__app__/src/routes/project._projectId/adhoc.mjs +0 -1
  141. package/__app__/src/routes/project._projectId/embed._viewId.mjs +0 -1
  142. package/__app__/src/routes/project._projectId/export._viewId.mjs +0 -1
  143. package/__app__/src/routes/project._projectId/index.mjs +0 -1
  144. package/__app__/src/routes/project._projectId/route.mjs +0 -1
  145. package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +0 -1
  146. package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +0 -1
  147. package/__app__/src/routes/project._projectId/view._viewId.index.mjs +0 -1
  148. package/__app__/src/routes/project._projectId/view._viewId.mjs +0 -1
  149. package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +0 -1
  150. package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +0 -1
  151. package/__app__/src/routes/projects.mjs +0 -1
  152. package/dist/chunks/libs/ts-graphviz.d.mts +0 -12
  153. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.d.mts +0 -269
  154. package/dist/vite-plugin/internal/chunks/libs/nanostores.d.mts +0 -59
@@ -1,269 +0,0 @@
1
- import { t as __name } from "../../rolldown-runtime.mjs";
2
- import { DependencyList } from "react";
3
-
4
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/atom/index.d.ts
5
- type AllKeys<T> = T extends any ? keyof T : never;
6
- type Primitive = boolean | number | string;
7
- type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends ((...args: any) => any) ? Value : Value extends Primitive ? Value : Value extends object ? Readonly<Value> : Value;
8
- /**
9
- * Store object.
10
- */
11
- interface ReadableAtom<Value = any> {
12
- /**
13
- * Get store value.
14
- *
15
- * In contrast with {@link ReadableAtom#value} this value will be always
16
- * initialized even if store had no listeners.
17
- *
18
- * ```js
19
- * $store.get()
20
- * ```
21
- *
22
- * @returns Store value.
23
- */
24
- get(): Value;
25
- /**
26
- * Low-level attribute to read store’s initial value.
27
- */
28
- readonly init: undefined | Value;
29
- /**
30
- * Listeners count.
31
- */
32
- readonly lc: number;
33
- /**
34
- * Subscribe to store changes.
35
- *
36
- * In contrast with {@link Store#subscribe} it do not call listener
37
- * immediately.
38
- *
39
- * @param listener Callback with store value and old value.
40
- * @returns Function to remove listener.
41
- */
42
- listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value>) => void): () => void;
43
- /**
44
- * Low-level method to notify listeners about changes in the store.
45
- *
46
- * Can cause unexpected behaviour when combined with frontend frameworks
47
- * that perform equality checks for values, such as React.
48
- */
49
- notify(oldValue?: ReadonlyIfObject<Value>): void;
50
- /**
51
- * Unbind all listeners.
52
- */
53
- off(): void;
54
- /**
55
- * Subscribe to store changes and call listener immediately.
56
- *
57
- * ```
58
- * import { $router } from '../store'
59
- *
60
- * $router.subscribe(page => {
61
- * console.log(page)
62
- * })
63
- * ```
64
- *
65
- * @param listener Callback with store value and old value.
66
- * @returns Function to remove listener.
67
- */
68
- subscribe(listener: (value: ReadonlyIfObject<Value>, oldValue?: ReadonlyIfObject<Value>) => void): () => void;
69
- /**
70
- * Low-level method to read store’s value without calling `onStart`.
71
- *
72
- * Try to use only {@link ReadableAtom#get}.
73
- * Without subscribers, value can be undefined.
74
- */
75
- readonly value: undefined | Value;
76
- }
77
- /**
78
- * Store with a way to manually change the value.
79
- */
80
- interface WritableAtom<Value = any> extends ReadableAtom<Value> {
81
- /**
82
- * Change store value.
83
- *
84
- * ```js
85
- * $router.set({ path: location.pathname, page: parse(location.pathname) })
86
- * ```
87
- *
88
- * @param newValue New store value.
89
- */
90
- set(newValue: Value): void;
91
- }
92
- interface PreinitializedWritableAtom<Value> extends WritableAtom<Value> {
93
- readonly value: Value;
94
- }
95
- type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
96
- /**
97
- * Create store with atomic value. It could be a string or an object, which you
98
- * will replace completely.
99
- *
100
- * If you want to change keys in the object inside store, use {@link map}.
101
- *
102
- * ```js
103
- * import { atom, onMount } from 'nanostores'
104
- *
105
- * // Initial value
106
- * export const $router = atom({ path: '', page: 'home' })
107
- *
108
- * function parse () {
109
- * $router.set({ path: location.pathname, page: parse(location.pathname) })
110
- * }
111
- *
112
- * // Listen for URL changes on first store’s listener.
113
- * onMount($router, () => {
114
- * parse()
115
- * window.addEventListener('popstate', parse)
116
- * return () => {
117
- * window.removeEventListener('popstate', parse)
118
- * }
119
- * })
120
- * ```
121
- *
122
- * @param initialValue Initial value of the store.
123
- * @returns The store object with methods to subscribe.
124
- */
125
- declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
126
- //#endregion
127
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/map/index.d.ts
128
- type KeyofBase = keyof any;
129
- type Get<T, K extends KeyofBase> = Extract<T, { [K1 in K]: any }>[K];
130
- type HasIndexSignature<T> = string extends keyof T ? true : false;
131
- type ValueWithUndefinedForIndexSignatures<Value, Key extends keyof Value> = HasIndexSignature<Value> extends true ? undefined | Value[Key] : Value[Key];
132
- type WritableStore<Value = any> = (Value extends object ? MapStore<Value> : never) | WritableAtom<Value>;
133
- type Store<Value = any> = ReadableAtom<Value> | WritableStore<Value>;
134
- type AnyStore<Value = any> = {
135
- get(): Value;
136
- readonly value: undefined | Value;
137
- };
138
- type StoreValue<SomeStore> = SomeStore extends {
139
- get(): infer Value;
140
- } ? Value : any;
141
- interface MapStore<Value extends object = any> extends WritableAtom<Value> {
142
- /**
143
- * Subscribe to store changes.
144
- *
145
- * In contrast with {@link Store#subscribe} it do not call listener
146
- * immediately.
147
- *
148
- * @param listener Callback with store value and old value.
149
- * @param changedKey Key that was changed. Will present only if `setKey`
150
- * has been used to change a store.
151
- * @returns Function to remove listener.
152
- */
153
- listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value>, changedKey: AllKeys<Value>) => void): () => void;
154
- /**
155
- * Low-level method to notify listeners about changes in the store.
156
- *
157
- * Can cause unexpected behaviour when combined with frontend frameworks
158
- * that perform equality checks for values, such as React.
159
- */
160
- notify(oldValue?: ReadonlyIfObject<Value>, changedKey?: AllKeys<Value>): void;
161
- /**
162
- * Change store value.
163
- *
164
- * ```js
165
- * $settings.set({ theme: 'dark' })
166
- * ```
167
- *
168
- * Operation is atomic, subscribers will be notified once with the new value.
169
- * `changedKey` will be undefined
170
- *
171
- * @param newValue New store value.
172
- */
173
- set(newValue: Value): void;
174
- /**
175
- * Change key in store value.
176
- *
177
- * ```js
178
- * $settings.setKey('theme', 'dark')
179
- * ```
180
- *
181
- * To delete key set `undefined`.
182
- *
183
- * ```js
184
- * $settings.setKey('theme', undefined)
185
- * ```
186
- *
187
- * @param key The key name.
188
- * @param value New value.
189
- */
190
- setKey<Key extends AllKeys<Value>>(key: Key, value: Get<Value, Key> | ValueWithUndefinedForIndexSignatures<Value, Key>): void;
191
- /**
192
- * Subscribe to store changes and call listener immediately.
193
- *
194
- * ```
195
- * import { $router } from '../store'
196
- *
197
- * $router.subscribe(page => {
198
- * console.log(page)
199
- * })
200
- * ```
201
- *
202
- * @param listener Callback with store value and old value.
203
- * @param changedKey Key that was changed. Will present only
204
- * if `setKey` has been used to change a store.
205
- * @returns Function to remove listener.
206
- */
207
- subscribe(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value> | undefined, changedKey: AllKeys<Value> | undefined) => void): () => void;
208
- }
209
- interface PreinitializedMapStore<Value extends object = any> extends MapStore<Value> {
210
- readonly value: Value;
211
- }
212
- /**
213
- * Create map store. Map store is a store with key-value object
214
- * as a store value.
215
- *
216
- * @param init Initialize store and return store destructor.
217
- * @returns The store object with methods to subscribe.
218
- */
219
- declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Value> & StoreExt;
220
- //#endregion
221
- //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.2.0_react@19.2.4/node_modules/@nanostores/react/index.d.ts
222
- type StoreKeys<T> = T extends {
223
- setKey: (k: infer K, v: any) => unknown;
224
- } ? K : never;
225
- interface UseStoreOptions<SomeStore> {
226
- /**
227
- * @default
228
- * ```ts
229
- * [store, options.keys]
230
- * ```
231
- */
232
- deps?: DependencyList;
233
- /**
234
- * Will re-render components only on specific key changes.
235
- */
236
- keys?: StoreKeys<SomeStore>[];
237
- /**
238
- * Enable SSR support. Set `initial` when store's initial value is the same on
239
- * server and client, or provide a function to return the server store state
240
- * for advanced cases (per useSyncExternalStore's getServerSnapshot).
241
- */
242
- ssr?: (() => StoreValue<SomeStore>) | 'initial' | false;
243
- }
244
- /**
245
- * Subscribe to store changes and get store’s value.
246
- *
247
- * Can be user with store builder too.
248
- *
249
- * ```js
250
- * import { useStore } from 'nanostores/react'
251
- *
252
- * import { router } from '../store/router'
253
- *
254
- * export const Layout = () => {
255
- * let page = useStore(router)
256
- * if (page.route === 'home') {
257
- * return <HomePage />
258
- * } else {
259
- * return <Error404 />
260
- * }
261
- * }
262
- * ```
263
- *
264
- * @param store Store instance.
265
- * @returns Store value.
266
- */
267
- declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
268
- //#endregion
269
- export { map as a, WritableAtom as c, StoreValue as i, atom as l, AnyStore as n, Atom as o, Store as r, ReadableAtom as s, useStore as t };
@@ -1,59 +0,0 @@
1
- import { t as __name } from "../rolldown-runtime.mjs";
2
- import { i as StoreValue, n as AnyStore, r as Store, s as ReadableAtom } from "./@nanostores/react.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/task/index.d.ts
5
- interface Task<Value> extends Promise<Value> {
6
- t: true;
7
- }
8
- //#endregion
9
- //#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/computed/index.d.ts
10
- type StoreValues<Stores extends AnyStore[]> = { [Index in keyof Stores]: StoreValue<Stores[Index]> };
11
- interface Computed {
12
- /**
13
- * @deprecated Use `@nanostores/async`.
14
- */
15
- <Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Task<Value>): ReadableAtom<undefined | Value>;
16
- /**
17
- * @deprecated Use `@nanostores/async`.
18
- */
19
- <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value>): ReadableAtom<undefined | Value>;
20
- <Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Value): ReadableAtom<Value>;
21
- /**
22
- * Create derived store, which use generates value from another stores.
23
- *
24
- * ```js
25
- * import { computed } from 'nanostores'
26
- *
27
- * import { $users } from './users.js'
28
- *
29
- * export const $admins = computed($users, users => {
30
- * return users.filter(user => user.isAdmin)
31
- * })
32
- * ```
33
- *
34
- * Use `@nanostores/async` for async function.
35
- */
36
- <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
37
- }
38
- declare const computed: Computed;
39
- interface Batched {
40
- <Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Task<Value> | Value): ReadableAtom<Value>;
41
- /**
42
- * Create derived store, which use generates value from another stores.
43
- *
44
- * ```js
45
- * import { batched } from 'nanostores'
46
- *
47
- * const $sortBy = atom('id')
48
- * const $category = atom('')
49
- *
50
- * export const $link = batched([$sortBy, $category], (sortBy, category) => {
51
- * return `/api/entities?sortBy=${sortBy}&category=${category}`
52
- * })
53
- * ```
54
- */
55
- <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
56
- }
57
- declare const batched: Batched;
58
- //#endregion
59
- export { computed as n, batched as t };