likec4 1.59.2 → 1.59.4

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 (69) hide show
  1. package/__app__/src/chunks/AIChat.mjs +118 -123
  2. package/__app__/src/chunks/LikeC4Styles.mjs +828 -686
  3. package/__app__/src/chunks/ProjectsOverview.mjs +82 -82
  4. package/__app__/src/chunks/es.mjs +1 -1
  5. package/__app__/src/chunks/hooks.mjs +164 -135
  6. package/__app__/src/chunks/libs/@floating-ui.mjs +649 -335
  7. package/__app__/src/chunks/libs/@mantine.mjs +2934 -2040
  8. package/__app__/src/chunks/libs/@tanstack-ai.mjs +28 -28
  9. package/__app__/src/chunks/libs/@tanstack.mjs +46 -51
  10. package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
  11. package/__app__/src/chunks/libs/@xyflow/react.mjs +535 -448
  12. package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
  13. package/__app__/src/chunks/libs/d3.mjs +20 -45
  14. package/__app__/src/chunks/libs/fast-equals.mjs +62 -50
  15. package/__app__/src/chunks/libs/framer.mjs +300 -279
  16. package/__app__/src/chunks/libs/zod.mjs +17 -14
  17. package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
  18. package/__app__/src/chunks/styled-system.mjs +2580 -132
  19. package/__app__/src/main.mjs +24925 -23485
  20. package/__app__/src/style.css +1 -1
  21. package/config/schema.json +49 -0
  22. package/dist/app/render-view-client.css +1 -0
  23. package/dist/app/render-view-client.js +739 -0
  24. package/dist/chunks/enableServer.mjs +1 -1
  25. package/dist/chunks/filenames.mjs +7 -6
  26. package/dist/chunks/index.d.mts +18 -1
  27. package/dist/chunks/index2.d.mts +79 -26
  28. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  29. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
  30. package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
  31. package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
  32. package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
  33. package/dist/chunks/libs/birpc.mjs +1 -1
  34. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  35. package/dist/chunks/libs/chevrotain.mjs +16 -16
  36. package/dist/chunks/libs/json5.mjs +3 -3
  37. package/dist/chunks/libs/langium.d.mts +1777 -16
  38. package/dist/chunks/libs/langium.mjs +11 -11
  39. package/dist/chunks/libs/merge-error-cause.mjs +2 -2
  40. package/dist/chunks/libs/p-queue.mjs +1 -1
  41. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  42. package/dist/chunks/libs/pako.mjs +2 -2
  43. package/dist/chunks/libs/picomatch.mjs +1 -1
  44. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  45. package/dist/chunks/libs/remeda.mjs +1 -1
  46. package/dist/chunks/libs/ufo.mjs +1 -1
  47. package/dist/chunks/libs/unstorage.mjs +1 -1
  48. package/dist/chunks/libs/zod.d.mts +1717 -17
  49. package/dist/chunks/libs/zod.mjs +4 -4
  50. package/dist/chunks/node.mjs +68 -57
  51. package/dist/chunks/rolldown-runtime.mjs +1 -1
  52. package/dist/chunks/sequence-view.mjs +1 -1
  53. package/dist/chunks/vite-plugin.mjs +168 -54
  54. package/dist/cli/index.d.mts +1 -1
  55. package/dist/cli/index.mjs +291 -165
  56. package/dist/config/index.d.mts +7 -1
  57. package/dist/config/index.mjs +1 -1
  58. package/dist/index.d.mts +3 -3
  59. package/dist/index.mjs +1 -1
  60. package/dist/model/index.d.mts +4 -4
  61. package/dist/vite-plugin/index.d.mts +2 -2
  62. package/dist/vite-plugin/internal/index.d.mts +72 -35
  63. package/dist/vite-plugin/internal/index.mjs +125 -44
  64. package/package.json +47 -47
  65. package/react/index.d.mts +22767 -1432
  66. package/react/index.mjs +38152 -32309
  67. package/vite-plugin-modules.d.ts +21 -1
  68. package/dist/chunks/dist.mjs +0 -10
  69. package/dist/chunks/logger.mjs +0 -1
@@ -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 { type GeneratorFn, type GeneratorFnContext, type GeneratorFnParams, type LikeC4ProjectConfig, type LikeC4ProjectConfigInput, LikeC4ProjectConfigOps, type LikeC4ProjectJsonConfig, type LikeC4StylesConfig, type LikeC4StylesConfigInput, defineConfig, defineGenerators, defineStyle, defineTheme, defineThemeColor, isLikeC4Config, isLikeC4JsonConfig, isLikeC4NonJsonConfig };
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 };
@@ -1 +1 @@
1
- import"../chunks/rolldown-runtime.mjs";import{a as e,d as t,i as n,l 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 n.parse(e)}function defineThemeColor(e){return t.parse(e)}function defineTheme(e){return r.parse(e)}function defineStyle(e){return c.parse(e)}export{e as LikeC4ProjectConfigOps,defineConfig,defineGenerators,defineStyle,defineTheme,defineThemeColor,s as isLikeC4Config,i as isLikeC4JsonConfig,o as isLikeC4NonJsonConfig};
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.d.mts CHANGED
@@ -38,8 +38,8 @@ type LikeC4Options = {
38
38
  */
39
39
  logLevel?: 'trace' | 'debug' | 'info' | 'warning' | 'error' | undefined;
40
40
  };
41
- interface LikeC4 extends LikeC4$1 {}
42
- declare namespace LikeC4 {
41
+ export interface LikeC4 extends LikeC4$1 {}
42
+ export declare namespace LikeC4 {
43
43
  function fromSource(likec4SourceCode: string, _opts?: LikeC4Options): Promise<LikeC4>;
44
44
  /**
45
45
  * Initializes a LikeC4 instance from the specified workspace path.
@@ -48,4 +48,4 @@ declare namespace LikeC4 {
48
48
  function fromWorkspace(path?: string, _opts?: LikeC4Options): Promise<LikeC4>;
49
49
  }
50
50
  //#endregion
51
- export { LikeC4, type LikeC4Options, type WriteDSLOptions, writeDSL };
51
+ export { type LikeC4Options, type WriteDSLOptions, writeDSL };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e}from"./chunks/rolldown-runtime.mjs";import{n as t}from"./chunks/sequence-view.mjs";import{n,r,t as i}from"./chunks/node.mjs";import{exact as a}from"@likec4/core";let o;(function(r){async function fromSource$1(e,n){let{logger:r,watch:o,...s}=n??{};return i(e,t(a({...s,configureLogger:r}),{configureLogger:`console`}))}e(fromSource$1,`fromSource`),r.fromSource=fromSource$1;async function fromWorkspace$1(e=``,r){let{logger:i,watch:o,...s}=r??{};return n(e,t(a({...s,configureLogger:i}),{configureLogger:`console`}))}e(fromWorkspace$1,`fromWorkspace`),r.fromWorkspace=fromWorkspace$1})(o||={});export{o as LikeC4,r as writeDSL};
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};
@@ -48,13 +48,13 @@ interface SequenceViewLayout {
48
48
  }
49
49
  //#endregion
50
50
  //#region src/sequence/sequence-view.d.ts
51
- declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
51
+ export declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
52
52
  //#endregion
53
53
  //#region src/model/index.d.ts
54
- type UnknownLayouted = types.UnknownLayouted;
54
+ export type UnknownLayouted = types.UnknownLayouted;
55
55
  /**
56
56
  * Used by vite plugin to generate `virtual:likec4/model`
57
57
  */
58
- declare function createLikeC4Model(model: any): LikeC4Model$1<UnknownLayouted>;
58
+ export declare function createLikeC4Model(model: any): LikeC4Model$1<UnknownLayouted>;
59
59
  //#endregion
60
- export { type ComputedProjectEdge, type ComputedProjectNode, type ComputedProjectsView, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, type DeploymentElementModel, DeploymentNodeModel, type DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, type LayoutedProjectEdge, type LayoutedProjectNode, type LayoutedProjectsView, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, NodeModel, RelationshipModel, type SequenceViewLayout, UnknownLayouted, calcSequenceLayout, createLikeC4Model, 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, type types };
60
+ export { type ComputedProjectEdge, type ComputedProjectNode, type ComputedProjectsView, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, type DeploymentElementModel, DeploymentNodeModel, type DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, type LayoutedProjectEdge, type LayoutedProjectNode, type LayoutedProjectsView, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, NodeModel, RelationshipModel, type SequenceViewLayout, 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, type types };
@@ -138,6 +138,6 @@ type LikeC4VitePluginOptions = SharedOptions & ({
138
138
  watch?: never;
139
139
  logLevel?: never;
140
140
  });
141
- declare function LikeC4VitePlugin({ environments, appConfig, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
141
+ export declare function LikeC4VitePlugin({ environments, appConfig, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
142
142
  //#endregion
143
- export { LikeC4VitePlugin, type LikeC4VitePluginOptions };
143
+ export type { LikeC4VitePluginOptions };
@@ -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.3.0/node_modules/nanostores/atom/index.d.ts
6
+ //#region ../../node_modules/.pnpm/nanostores@1.5.3/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
  *
@@ -124,23 +141,38 @@ type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
124
141
  * @param initialValue Initial value of the store.
125
142
  * @returns The store object with methods to subscribe.
126
143
  */
127
- declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
144
+ export 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.3.0/node_modules/nanostores/map/index.d.ts
146
+ //#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/map/index.d.ts
130
147
  type KeyofBase = keyof any;
131
- type Get<T, K extends KeyofBase> = Extract<T, { [K1 in K]: any; }>[K];
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 keyof Value> = HasIndexSignature<Value> extends true ? undefined | Value[Key] : Value[Key];
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 AnyStore<Value = any> = {
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 was changed. Will present only if `setKey`
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>, changedKey: AllKeys<Value>) => void): () => void;
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: Get<Value, Key> | ValueWithUndefinedForIndexSignatures<Value, Key>): void;
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 was changed. Will present only
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 key-value object
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
+ export 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 init Initialize store and return store destructor.
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> & StoreExt;
258
+ export 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.3.0/node_modules/nanostores/task/index.d.ts
260
+ //#region ../../node_modules/.pnpm/nanostores@1.5.3/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.3.0/node_modules/nanostores/computed/index.d.ts
229
- type StoreValues<Stores extends AnyStore[]> = { [Index in keyof Stores]: StoreValue<Stores[Index]>; };
265
+ //#region ../../node_modules/.pnpm/nanostores@1.5.3/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 AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value>): ReadableAtom<undefined | Value>;
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,9 +289,9 @@ interface Computed {
252
289
  *
253
290
  * Use `@nanostores/async` for async function.
254
291
  */
255
- <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
292
+ <Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
256
293
  }
257
- declare const computed: Computed;
294
+ export declare const computed: Computed;
258
295
  interface Batched {
259
296
  <Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Task<Value> | Value): ReadableAtom<Value>;
260
297
  /**
@@ -271,9 +308,9 @@ interface Batched {
271
308
  * })
272
309
  * ```
273
310
  */
274
- <Value, OriginStores extends AnyStore[]>(stores: [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
311
+ <Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
275
312
  }
276
- declare const batched: Batched;
313
+ export declare const batched: Batched;
277
314
  //#endregion
278
315
  //#region src/rpc/protocol.d.ts
279
316
  interface LikeC4VitePluginRpc {
@@ -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.3.0_react@19.2.7/node_modules/@nanostores/react/index.d.ts
346
+ //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.3_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;
@@ -352,10 +389,10 @@ interface UseStoreOptions<SomeStore> {
352
389
  * @param store Store instance.
353
390
  * @returns Store value.
354
391
  */
355
- declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
392
+ export declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
356
393
  //#endregion
357
394
  //#region src/internal.d.ts
358
- interface LikeC4VitePluginRpcOptions {
395
+ export interface LikeC4VitePluginRpcOptions {
359
396
  /**
360
397
  * Function to post raw message
361
398
  */
@@ -369,8 +406,8 @@ interface LikeC4VitePluginRpcOptions {
369
406
  * Create a PluginRPC instance for the LikeC4 Vite plugin
370
407
  * used by the Vite plugin in virtual modules
371
408
  */
372
- declare function createRpc(options: LikeC4VitePluginRpcOptions): LikeC4VitePluginRpc;
373
- declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData>): {
409
+ export declare function createRpc(options: LikeC4VitePluginRpcOptions): LikeC4VitePluginRpc;
410
+ export declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData>): {
374
411
  updateModel: (data: LayoutedLikeC4ModelData) => void;
375
412
  $likec4model: Atom<LikeC4Model.Layouted>;
376
413
  useLikeC4Model: () => LikeC4Model.Layouted;
@@ -378,4 +415,4 @@ declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData
378
415
  useLikeC4View: (viewId: string) => LayoutedView | null;
379
416
  };
380
417
  //#endregion
381
- export { type Atom, type LikeC4VitePluginRpc, LikeC4VitePluginRpcOptions, type ReadableAtom, type WritableAtom, atom, batched, computed, createHooksForModel, createRpc, map, useStore };
418
+ export type { Atom, LikeC4VitePluginRpc, ReadableAtom, WritableAtom };