likec4 1.48.0 → 1.49.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 (113) hide show
  1. package/README.md +11 -1
  2. package/__app__/src/likec4.js +5595 -4127
  3. package/__app__/src/routes/index.js +3 -153
  4. package/__app__/src/routes/projects.js +21 -1087
  5. package/__app__/src/routes/single.js +1221 -16
  6. package/__app__/src/style.css +1 -1
  7. package/__app__/src/vendors.js +3507 -894
  8. package/__app__/src/webcomponent.js +1 -1
  9. package/config/schema.json +155 -143
  10. package/dist/THIRD-PARTY-LICENSES.md +1739 -0
  11. package/dist/_chunks/GraphvizBinaryAdapter.mjs +72 -0
  12. package/dist/_chunks/filenames.mjs +14 -0
  13. package/dist/_chunks/index.d.mts +224 -129
  14. package/dist/_chunks/index2.d.mts +2033 -1908
  15. package/dist/_chunks/libs/@chevrotain/gast.mjs +1 -3969
  16. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
  17. package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
  18. package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
  19. package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
  20. package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
  21. package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
  22. package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
  23. package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +14 -14
  24. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
  25. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
  26. package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
  27. package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
  28. package/dist/_chunks/libs/ajv.mjs +1 -777
  29. package/dist/_chunks/libs/atomically.mjs +1 -362
  30. package/dist/_chunks/libs/birpc.mjs +1 -201
  31. package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
  32. package/dist/_chunks/libs/chevrotain.mjs +55 -6229
  33. package/dist/_chunks/libs/conf.mjs +1 -2258
  34. package/dist/_chunks/libs/defu.mjs +1 -42
  35. package/dist/_chunks/libs/esm-env.mjs +1 -5
  36. package/dist/_chunks/libs/eventemitter3.mjs +1 -243
  37. package/dist/_chunks/libs/fast-equals.mjs +1 -446
  38. package/dist/_chunks/libs/find-up-simple.mjs +1 -24
  39. package/dist/_chunks/libs/get-port.mjs +1 -107
  40. package/dist/_chunks/libs/is-docker.mjs +1 -26
  41. package/dist/_chunks/libs/is-error-instance.mjs +1 -26
  42. package/dist/_chunks/libs/is-inside-container.mjs +1 -20
  43. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  44. package/dist/_chunks/libs/isexe.mjs +1 -127
  45. package/dist/_chunks/libs/json5.mjs +14 -959
  46. package/dist/_chunks/libs/khroma.mjs +1 -605
  47. package/dist/_chunks/libs/ky.mjs +2 -807
  48. package/dist/_chunks/libs/langium.d.mts +2880 -2844
  49. package/dist/_chunks/libs/langium.mjs +32 -20351
  50. package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
  51. package/dist/_chunks/libs/nanostores.mjs +1 -198
  52. package/dist/_chunks/libs/p-limit.mjs +1 -120
  53. package/dist/_chunks/libs/p-queue.mjs +1 -449
  54. package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
  55. package/dist/_chunks/libs/package-up.mjs +1 -10
  56. package/dist/_chunks/libs/parse-ms.mjs +1 -36
  57. package/dist/_chunks/libs/pathe.mjs +1 -0
  58. package/dist/_chunks/libs/picomatch.mjs +1 -1673
  59. package/dist/_chunks/libs/pretty-ms.mjs +1 -80
  60. package/dist/_chunks/libs/remeda.mjs +1 -690
  61. package/dist/_chunks/libs/safe-stringify.mjs +1 -21
  62. package/dist/_chunks/libs/strip-indent.mjs +1 -15
  63. package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
  64. package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
  65. package/dist/_chunks/libs/ufo.mjs +1 -240
  66. package/dist/_chunks/libs/which.mjs +1 -84
  67. package/dist/_chunks/libs/word-wrap.mjs +12 -43
  68. package/dist/_chunks/node.mjs +481 -0
  69. package/dist/_chunks/plugin.mjs +98 -772
  70. package/dist/_chunks/rolldown-runtime.mjs +1 -48
  71. package/dist/_chunks/sequence-view.mjs +1 -575
  72. package/dist/cli/index.mjs +127 -1846
  73. package/dist/config/index.d.mts +2 -2
  74. package/dist/config/index.mjs +1 -6
  75. package/dist/index.d.mts +148 -7
  76. package/dist/index.mjs +1 -21
  77. package/dist/model/builder.mjs +1 -3
  78. package/dist/model/index.d.mts +57 -3
  79. package/dist/model/index.mjs +1 -5
  80. package/dist/vite-plugin/index.d.mts +4 -3
  81. package/dist/vite-plugin/index.mjs +1 -22
  82. package/dist/vite-plugin/internal.d.mts +5 -5
  83. package/dist/vite-plugin/internal.mjs +1 -68
  84. package/package.json +60 -41
  85. package/react/{index.d.ts → index.d.mts} +112 -70
  86. package/react/{index.js → index.mjs} +21361 -22064
  87. package/react/package.json +2 -5
  88. package/vite-plugin-modules.d.ts +5 -5
  89. package/dist/_chunks/LikeC4.d.mts +0 -121
  90. package/dist/_chunks/LikeC4.mjs +0 -202
  91. package/dist/_chunks/config-app.prod.d.mts +0 -18
  92. package/dist/_chunks/config-app.prod.mjs +0 -188
  93. package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
  94. package/dist/_chunks/define-config.mjs +0 -409
  95. package/dist/_chunks/index3.d.mts +0 -60
  96. package/dist/_chunks/index4.d.mts +0 -1
  97. package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +0 -10
  98. package/dist/_chunks/libs/hono.mjs +0 -1829
  99. package/dist/_chunks/libs/nanoid.mjs +0 -29
  100. package/dist/_chunks/model.mjs +0 -12
  101. package/dist/_chunks/module.d.mts +0 -71
  102. package/dist/_chunks/module.mjs +0 -18657
  103. package/dist/_chunks/vite-build.mjs +0 -69
  104. package/dist/_chunks/vite-dev.mjs +0 -79
  105. package/dist/_chunks/vite-preview.mjs +0 -27
  106. package/dist/language/module.d.mts +0 -5
  107. package/dist/language/module.mjs +0 -20
  108. package/dist/vite/vite-build.d.mts +0 -26
  109. package/dist/vite/vite-build.mjs +0 -27
  110. package/dist/vite/vite-dev.d.mts +0 -34
  111. package/dist/vite/vite-dev.mjs +0 -29
  112. package/dist/vite/vite-preview.d.mts +0 -20
  113. package/dist/vite/vite-preview.mjs +0 -26
@@ -1,29 +0,0 @@
1
- import { webcrypto } from "node:crypto";
2
-
3
- //#region ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/url-alphabet/index.js
4
- const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
5
-
6
- //#endregion
7
- //#region ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
8
- const POOL_SIZE_MULTIPLIER = 128;
9
- let pool, poolOffset;
10
- function fillPool(bytes) {
11
- if (!pool || pool.length < bytes) {
12
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
13
- webcrypto.getRandomValues(pool);
14
- poolOffset = 0;
15
- } else if (poolOffset + bytes > pool.length) {
16
- webcrypto.getRandomValues(pool);
17
- poolOffset = 0;
18
- }
19
- poolOffset += bytes;
20
- }
21
- function nanoid(size = 21) {
22
- fillPool(size |= 0);
23
- let id = "";
24
- for (let i = poolOffset - size; i < poolOffset; i++) id += urlAlphabet[pool[i] & 63];
25
- return id;
26
- }
27
-
28
- //#endregion
29
- export { nanoid as t };
@@ -1,12 +0,0 @@
1
- import { Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentNodeModel, DeploymentRelationModel as DeploymentRelationModel$1, EdgeModel, ElementModel as ElementModel$1, LikeC4DeploymentModel, LikeC4Model, LikeC4Model as LikeC4Model$1, LikeC4ViewModel as LikeC4ViewModel$1, NodeModel, RelationshipModel as RelationshipModel$1, deploymentConnection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel as isDeploymentElementModel$1, isDeploymentNodeModel, isDeploymentRelationModel as isDeploymentRelationModel$1, isEdgeModel, isElementModel as isElementModel$1, isIncoming, isLikeC4ViewModel as isLikeC4ViewModel$1, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, isRelationModel as isRelationModel$1, mergeConnections, modelConnection as modelConnection$1, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from "@likec4/core/model";
2
-
3
- //#region src/model/index.ts
4
- /**
5
- * Used by vite plugin to generate `virtual:likec4/model`
6
- */
7
- function createLikeC4Model(model) {
8
- return LikeC4Model.create(model);
9
- }
10
-
11
- //#endregion
12
- export { isIncoming as A, sortDeepestFirst as B, isAnyInOut as C, isDeploymentRelationModel$1 as D, isDeploymentNodeModel as E, isOutgoing as F, isRelationModel$1 as I, mergeConnections as L, isNestedConnection as M, isNestedElementOfDeployedInstanceModel as N, isEdgeModel as O, isNodeModel as P, modelConnection$1 as R, hasSameTarget as S, isDeploymentElementModel$1 as T, findAscendingConnections as _, DeploymentNodeModel as a, hasSameSource as b, ElementModel$1 as c, LikeC4ViewModel$1 as d, NodeModel as f, differenceConnections as g, deploymentConnection as h, DeploymentConnectionModel as i, isLikeC4ViewModel$1 as j, isElementModel$1 as k, LikeC4DeploymentModel as l, createLikeC4Model as m, ConnectionModel as n, DeploymentRelationModel$1 as o, RelationshipModel$1 as p, DeployedInstanceModel as r, EdgeModel as s, Connection as t, LikeC4Model$1 as u, findDeepestNestedConnection as v, isDeployedInstanceModel as w, hasSameSourceTarget as x, findDescendantConnections as y, sortConnectionsByBoundaryHierarchy as z };
@@ -1,71 +0,0 @@
1
- import { Ct as WorkspaceFolder, Et as Module, y as DeepPartial } from "./libs/langium.mjs";
2
- import { n as LikeC4Services } from "./index2.mjs";
3
- import "boxen";
4
- import { LogErrorOptions, LogType } from "vite";
5
-
6
- //#region src/logger.d.ts
7
- declare function createLikeC4Logger(prefix: string | readonly [string, ...string[]]): {
8
- info(msg: string): void;
9
- warn(msg: unknown): void;
10
- warnOnce(msg: string): void;
11
- error(msg: unknown, options?: LogErrorOptions): void;
12
- clearScreen: (_type: LogType) => void;
13
- hasErrorLogged: (_error: any) => boolean;
14
- hasWarned: boolean;
15
- };
16
- type ViteLogger = ReturnType<typeof createLikeC4Logger>;
17
- type Logger = {
18
- info(msg: string): void;
19
- warn(msg: unknown): void;
20
- error(err: unknown): void;
21
- };
22
- //#endregion
23
- //#region src/language/Workspace.d.ts
24
- declare class CliWorkspace {
25
- private services;
26
- private isInitialized;
27
- constructor(services: CliServices);
28
- initWorkspace(workspace: WorkspaceFolder): Promise<void>;
29
- }
30
- //#endregion
31
- //#region src/language/module.d.ts
32
- type CliAddedServices = {
33
- logger: Logger;
34
- cli: {
35
- Workspace: CliWorkspace;
36
- };
37
- };
38
- type CliServices = LikeC4Services & CliAddedServices;
39
- declare const CliModule: Module<CliServices, DeepPartial<LikeC4Services> & CliAddedServices>;
40
- type CreateLanguageServiceOptions = {
41
- /**
42
- * Whether to use the file system for the language service.
43
- * @default true
44
- */
45
- useFileSystem?: boolean;
46
- /**
47
- * Whether to watch for changes in the workspace.
48
- * @default false
49
- */
50
- watch?: boolean;
51
- /**
52
- * Logger to use for the language service.
53
- * @default 'default'
54
- */
55
- logger?: Logger | 'vite' | 'default' | false;
56
- /**
57
- * Whether to use the `dot` binary for layouting or the WebAssembly version.
58
- * @default 'wasm'
59
- */
60
- graphviz?: 'wasm' | 'binary';
61
- /**
62
- * Whether to start MCP server
63
- * @default false
64
- */
65
- mcp?: false | 'stdio' | {
66
- port: number;
67
- };
68
- };
69
- declare function createLanguageServices(opts?: CreateLanguageServiceOptions): CliServices;
70
- //#endregion
71
- export { createLanguageServices as a, CreateLanguageServiceOptions as i, CliModule as n, Logger as o, CliServices as r, ViteLogger as s, CliAddedServices as t };