likec4 1.60.0 → 1.61.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.
- package/README.md +2 -0
- package/__app__/codegen/react.mjs +4 -10
- package/__app__/codegen/webcomponent.mjs +5 -208
- package/__app__/index.html +15 -15
- package/__app__/src/aichat/index.mjs +1 -2
- package/__app__/src/chunks/AIChat.mjs +292 -117
- package/__app__/src/chunks/ErrorComponent.mjs +444 -0
- package/__app__/src/chunks/Header.mjs +269 -0
- package/__app__/src/chunks/ViewReact.mjs +438 -0
- package/__app__/src/chunks/find.mjs +38 -0
- package/__app__/src/chunks/hooks.mjs +18 -541
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +11101 -1797
- package/__app__/src/chunks/libs/@tanstack.mjs +4563 -3083
- package/__app__/src/chunks/libs/fast-equals.mjs +140 -71
- package/__app__/src/chunks/{es.mjs → libs/html-to-image.mjs} +16 -22
- package/__app__/src/chunks/libs/nanostores.mjs +4 -8
- package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
- package/__app__/src/chunks/react.mjs +22 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +3 -32
- package/__app__/src/chunks/router.mjs +106 -0
- package/__app__/src/chunks/scope.mjs +106 -0
- package/__app__/src/chunks/searchParams.mjs +29 -0
- package/__app__/src/chunks/single-index.mjs +465 -0
- package/__app__/src/chunks/styled-system.mjs +1916 -2946
- package/__app__/src/chunks/useAsync.mjs +69 -0
- package/__app__/src/chunks/useSyncedRef.mjs +16 -0
- package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
- package/__app__/src/components/CopyToClipboard.mjs +53 -0
- package/__app__/src/components/ErrorComponent.mjs +1 -0
- package/__app__/src/components/NavigationPanel.mjs +63 -0
- package/__app__/src/components/NotFound.mjs +155 -0
- package/__app__/src/components/ViewOutlet.mjs +9 -0
- package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
- package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
- package/__app__/src/components/model-diff/compare-model.mjs +76 -0
- package/__app__/src/components/model-diff/state.mjs +45 -0
- package/__app__/src/components/search/OverviewSearch.mjs +92 -0
- package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
- package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
- package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
- package/__app__/src/components/sidebar/Drawer.mjs +178 -0
- package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
- package/__app__/src/components/sidebar/data.mjs +94 -0
- package/__app__/src/components/sidebar/state.mjs +16 -0
- package/__app__/src/components/view-page/Header.mjs +1 -0
- package/__app__/src/components/view-page/SelectProject.mjs +258 -0
- package/__app__/src/components/view-page/ShareModal.mjs +111 -0
- package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
- package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
- package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
- package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
- package/__app__/src/components/view-page/state.mjs +17 -0
- package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
- package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
- package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
- package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
- package/__app__/src/context/ModelDiffsContext.mjs +33 -0
- package/__app__/src/context/safeCtx.mjs +14 -0
- package/__app__/src/hooks.mjs +1 -0
- package/__app__/src/main.mjs +4 -48126
- package/__app__/src/pages/EmbedPage.mjs +93 -0
- package/__app__/src/pages/ExportPage.mjs +691 -0
- package/__app__/src/pages/ProjectsOverview.mjs +23 -0
- package/__app__/src/pages/ViewAsD2.mjs +105 -0
- package/__app__/src/pages/ViewAsDot.mjs +65 -0
- package/__app__/src/pages/ViewAsMmd.mjs +109 -0
- package/__app__/src/pages/ViewAsPuml.mjs +105 -0
- package/__app__/src/pages/ViewEditor.mjs +220 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/pages/export-layout.mjs +95 -0
- package/__app__/src/pages/export-page-params.mjs +9 -0
- package/__app__/src/pages/styles.css.mjs +23 -0
- package/__app__/src/routeTree.gen.mjs +105 -0
- package/__app__/src/router.mjs +1 -0
- package/__app__/src/routes/__root.mjs +65 -0
- package/__app__/src/routes/index.css.mjs +29 -0
- package/__app__/src/routes/index.mjs +32 -0
- package/__app__/src/routes/project._projectId/-components.mjs +100 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
- package/__app__/src/routes/project._projectId/index.mjs +14 -0
- package/__app__/src/routes/project._projectId/route.mjs +93 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
- package/__app__/src/routes/projects.mjs +36 -0
- package/__app__/src/routes/single-index.mjs +1 -0
- package/__app__/src/routes/webcomponent._.mjs +94 -0
- package/__app__/src/style.css +1156 -1147
- package/config/schema.json +26 -2
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +375 -393
- package/dist/chunks/filenames.mjs +26 -20
- package/dist/chunks/generate-likec4.mjs +4 -4
- package/dist/chunks/index.d.mts +16 -15
- package/dist/chunks/index2.d.mts +7041 -3293
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -5
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
- package/dist/chunks/libs/chevrotain.mjs +19 -19
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/langium.d.mts +80 -2933
- package/dist/chunks/libs/langium.mjs +6 -6
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/node.mjs +110 -77
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +183 -164
- package/dist/cli/index.mjs +157 -101
- package/dist/config/index.d.mts +65 -4
- package/dist/config/index.mjs +1 -1
- package/dist/generators/likec4.d.mts +16 -64
- package/dist/index.d.mts +2 -4
- package/dist/model/index.d.mts +0 -10
- package/dist/vite-plugin/index.d.mts +83 -61
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -2
- package/dist/vite-plugin/internal/index.d.mts +91 -17
- package/dist/vite-plugin/internal/index.mjs +156 -110
- package/package.json +60 -55
- package/react/index.d.mts +3010 -4014
- package/react/index.mjs +170 -171
- package/react/rolldown-runtime-CfRud99p.js +1 -0
- package/skills/likec4-dsl/SKILL.md +71 -25
- package/skills/likec4-dsl/evals/evals-public.json +5 -0
- package/skills/likec4-dsl/evals/grading-spec.json +15 -1
- package/skills/likec4-dsl/references/cli.md +39 -10
- package/skills/likec4-dsl/references/configuration.md +5 -5
- package/skills/likec4-dsl/references/diffs.md +52 -0
- package/skills/likec4-dsl/references/examples.md +2 -2
- package/skills/likec4-dsl/references/identifier-validity.md +31 -31
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +16 -15
- package/skills/likec4-dsl/references/model.md +42 -11
- package/skills/likec4-dsl/references/specification.md +11 -7
- package/skills/likec4-dsl/references/troubleshooting.md +47 -42
- package/skills/likec4-dsl/references/views.md +2 -2
- package/vite-plugin-modules.d.ts +126 -51
- package/__app__/src/chunks/LikeC4Styles.mjs +0 -4522
- package/__app__/src/chunks/ProjectsOverview.mjs +0 -827
- package/__app__/src/chunks/libs/@floating-ui.mjs +0 -3286
- package/__app__/src/chunks/libs/@mantine.mjs +0 -17731
- package/__app__/src/chunks/libs/@xstate/react.mjs +0 -3471
- package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -7927
- package/__app__/src/chunks/libs/bezier-js.mjs +0 -1593
- package/__app__/src/chunks/libs/d3.mjs +0 -4531
- package/__app__/src/chunks/libs/framer.mjs +0 -11331
- package/__app__/src/chunks/libs/zod.mjs +0 -5404
- package/dist/chunks/libs/@chevrotain/types.d.mts +0 -111
- package/react/rolldown-runtime-DnkiqaRY.js +0 -1
package/dist/config/index.d.mts
CHANGED
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
import { i as __name } from "../chunks/rolldown-runtime.mjs";
|
|
2
2
|
import { C as defineGenerators, D as isLikeC4Config, E as defineThemeColor, O as isLikeC4JsonConfig, S as defineConfig, T as defineTheme, _ as RelationshipsBrowserConfigSchema, a as IncludeConfig, b as WebappConfigSchema, c as LikeC4ProjectConfigInput, d as LikeC4StylesConfig, f as LikeC4StylesConfigInput, g as RelationshipBrowserScopeSchema, h as RelationshipBrowserScope, i as GeneratorFnParams, k as isLikeC4NonJsonConfig, l as LikeC4ProjectConfigOps, m as LocateResult, n as GeneratorFn, o as LikeC4ConfigThemeInput, p as LikeC4StylesConfigSchema, r as GeneratorFnContext, s as LikeC4ProjectConfig, t as ConfigFilenames, u as LikeC4ProjectJsonConfig, v as ThemeColorValuesInput, w as defineStyle, x as WebappExportFormatSchema, y as WebappConfig } from "../chunks/index.mjs";
|
|
3
|
-
|
|
4
|
-
//#region src/webapp-export-formats.d.ts
|
|
3
|
+
import z from "zod/v4";
|
|
5
4
|
declare const WebappExportFormats: readonly ["png", "jpg", "dot", "d2", "mmd", "puml", "drawio"];
|
|
6
5
|
type WebappExportFormat = typeof WebappExportFormats[number];
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Schema of the LikeC4 app config (`likec4.app.config.ts`).
|
|
8
|
+
* Extends the application options of the Vite plugin with the options of the CLI.
|
|
9
|
+
*
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
declare const LikeC4AppConfigSchema: z.ZodObject<{
|
|
13
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
14
|
+
graphviz: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
wasm: "wasm";
|
|
16
|
+
binary: "binary";
|
|
17
|
+
}>>;
|
|
18
|
+
base: z.ZodOptional<z.ZodString>;
|
|
19
|
+
publicDir: z.ZodOptional<z.ZodString>;
|
|
20
|
+
build: z.ZodPrefault<z.ZodObject<{
|
|
21
|
+
outDir: z.ZodOptional<z.ZodString>;
|
|
22
|
+
singleFile: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
webcomponent: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
server: z.ZodPrefault<z.ZodObject<{
|
|
26
|
+
host: z.ZodOptional<z.ZodString>;
|
|
27
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
hmrPort: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
title: z.ZodDefault<z.ZodString>;
|
|
32
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
light: "light";
|
|
34
|
+
dark: "dark";
|
|
35
|
+
}>>;
|
|
36
|
+
useHashHistory: z.ZodDefault<z.ZodBoolean>;
|
|
37
|
+
webcomponentPrefix: z.ZodDefault<z.ZodString>;
|
|
38
|
+
customization: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
/**
|
|
41
|
+
* LikeC4 app config as written in `likec4.app.config.ts`
|
|
42
|
+
*
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
45
|
+
type LikeC4AppConfigInput = z.input<typeof LikeC4AppConfigSchema>;
|
|
46
|
+
/**
|
|
47
|
+
* Defines the LikeC4 app config: options of the application, its build and the dev server,
|
|
48
|
+
* that otherwise are given to the CLI as flags.
|
|
49
|
+
*
|
|
50
|
+
* The CLI looks for `likec4.app.config.{ts,mts,cts,js,mjs,cjs}` in the workspace and in the current directory.
|
|
51
|
+
* Paths are relative to the config file. Flags of the CLI take precedence over the config.
|
|
52
|
+
*
|
|
53
|
+
* @experimental
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* // likec4.app.config.ts
|
|
57
|
+
* import { defineAppConfig } from 'likec4/config'
|
|
58
|
+
*
|
|
59
|
+
* export default defineAppConfig({
|
|
60
|
+
* title: 'My Architecture',
|
|
61
|
+
* customization: './likec4.customization.tsx',
|
|
62
|
+
* build: {
|
|
63
|
+
* outDir: './dist',
|
|
64
|
+
* },
|
|
65
|
+
* })
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function defineAppConfig(config: LikeC4AppConfigInput): LikeC4AppConfigInput;
|
|
69
|
+
export { type ConfigFilenames, type GeneratorFn, type GeneratorFnContext, type GeneratorFnParams, type IncludeConfig, type LikeC4AppConfigInput, type LikeC4ConfigThemeInput, type LikeC4ProjectConfig, type LikeC4ProjectConfigInput, LikeC4ProjectConfigOps, type LikeC4ProjectJsonConfig, type LikeC4StylesConfig, type LikeC4StylesConfigInput, type LikeC4StylesConfigSchema, type LocateResult, type RelationshipBrowserScope, type RelationshipBrowserScopeSchema, type RelationshipsBrowserConfigSchema, type ThemeColorValuesInput, type WebappConfig, type WebappConfigSchema, type WebappExportFormat, type WebappExportFormatSchema, type WebappExportFormats, 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,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};
|
|
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)}function defineAppConfig(e){return e}export{e as LikeC4ProjectConfigOps,defineAppConfig,defineConfig,defineGenerators,defineStyle,defineTheme,defineThemeColor,s as isLikeC4Config,i as isLikeC4JsonConfig,o as isLikeC4NonJsonConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __name } from "../chunks/rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { M as DocumentSegment, O as Properties, T as AstNode, Wt as Range } from "../chunks/libs/langium.mjs";
|
|
3
3
|
import * as z$1$1 from "zod/v4";
|
|
4
4
|
import z from "zod/v4";
|
|
5
5
|
import { RelationshipArrowType, RelationshipLineType } from "@likec4/core/styles";
|
|
@@ -8,7 +8,6 @@ import { MarkdownOrString as MarkdownOrString$1, scalar as scalar$2 } from "@lik
|
|
|
8
8
|
import * as z$1$2 from "zod";
|
|
9
9
|
import z$2 from "zod";
|
|
10
10
|
import { ConditionalKeys, IfAny, IsUnknown, Or, Simplify } from "type-fest";
|
|
11
|
-
//#region ../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/generate/generator-tracing.d.ts
|
|
12
11
|
interface TraceSourceSpec {
|
|
13
12
|
astNode: AstNode;
|
|
14
13
|
property?: string;
|
|
@@ -33,8 +32,6 @@ interface DocumentSegmentWithFileURI extends Omit<DocumentSegment, 'range'> {
|
|
|
33
32
|
fileURI?: string;
|
|
34
33
|
range?: Range;
|
|
35
34
|
}
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region ../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/generate/generator-node.d.ts
|
|
38
35
|
/**
|
|
39
36
|
* Common type of expected results of functions contributing to code generation.
|
|
40
37
|
* Includes `undefined` for allowing contributing functions to explicitly contribute
|
|
@@ -739,8 +736,6 @@ declare class NewLineNode {
|
|
|
739
736
|
readonly count: NewLineNode.NoOfLineBreaks;
|
|
740
737
|
constructor(lineDelimiter?: string, ifNotEmpty?: boolean, count?: NewLineNode.NoOfLineBreaks);
|
|
741
738
|
}
|
|
742
|
-
//#endregion
|
|
743
|
-
//#region ../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/generate/node-joiner.d.ts
|
|
744
739
|
interface JoinOptions<T, U extends T = T> {
|
|
745
740
|
/**
|
|
746
741
|
* A plain or type guard filter function.
|
|
@@ -768,8 +763,6 @@ interface JoinOptions<T, U extends T = T> {
|
|
|
768
763
|
*/
|
|
769
764
|
skipNewLineAfterLastItem?: true;
|
|
770
765
|
}
|
|
771
|
-
//#endregion
|
|
772
|
-
//#region ../generators/dist/likec4/operators/base.d.mts
|
|
773
766
|
declare namespace base_d_exports {
|
|
774
767
|
export { AnyCtx, AnyOp, Ctx, InferOp, Op, Ops, Output, body, ctxOf, eachOnFresh, eq, executeOnCtx, executeOnFresh, foreach, foreachNewLine, fresh, guard, indent, inlineText, join, lazy, lines, markdown, markdownOrString$1 as markdownOrString, materialize, merge, newline, noop, operation, print$1 as print, printProperty, property, select, separateComma, separateNewLine, separateWith, space, spaceBetween, text, when, withctx, zodOp };
|
|
775
768
|
}
|
|
@@ -948,15 +941,15 @@ declare function body(open: string, close: string): <A>(...ops: Ops<A>) => Op<A>
|
|
|
948
941
|
/**
|
|
949
942
|
* Append text to the current line, wrapped in single quotes
|
|
950
943
|
* Multiple lines are joined with spaces
|
|
951
|
-
* Escapes single quotes
|
|
944
|
+
* Escapes single quotes with a backslash
|
|
952
945
|
*/
|
|
953
946
|
declare function inlineText<A extends string>(): Op<A>;
|
|
954
947
|
declare function inlineText(value: string): InferOp;
|
|
955
948
|
/**
|
|
956
949
|
* Appends text (handles newlines)
|
|
957
|
-
* If the text contains newlines, it is
|
|
950
|
+
* If the text contains newlines, it is printed as an indented block between single quotes
|
|
958
951
|
*
|
|
959
|
-
* Escapes single quotes
|
|
952
|
+
* Escapes single quotes with a backslash
|
|
960
953
|
*/
|
|
961
954
|
declare function text<A extends string>(): Op<A>;
|
|
962
955
|
declare function text<A>(format: (value: A) => string): Op<A>;
|
|
@@ -1178,8 +1171,6 @@ declare function zodOp<const Z extends z$1$2.core.$ZodType<any, any>>(schema: Z)
|
|
|
1178
1171
|
<A extends IN>(): Op<A>;
|
|
1179
1172
|
noparse<A extends OUT>(): Op<A>;
|
|
1180
1173
|
};
|
|
1181
|
-
//#endregion
|
|
1182
|
-
//#region ../generators/dist/likec4/schemas/common.d.mts
|
|
1183
1174
|
declare namespace common_d_exports {
|
|
1184
1175
|
export { MarkdownOrStringInput, ZArrow, ZBorder, ZColor, ZFqn, ZIcon, ZIconPosition, ZKind, ZLine, ZLink, ZMarkdownOrString, ZMetadata, ZMetadataValue, ZShape, ZSize, ZSizing, ZStyle, ZTag, ZViewId, arrow, border, color, customColor, fqn, icon, iconPosition, id, kind, line, link, links, markdownOrString, metadata, metadataValue$1 as metadataValue, opacity, props, shape, size, sizing, style, tag, tags, themeColor, viewId };
|
|
1185
1176
|
}
|
|
@@ -1281,8 +1272,6 @@ declare const props: z$1$1.ZodObject<{
|
|
|
1281
1272
|
links: z$1$1.ZodOptional<z$1$1.ZodNullable<z$1$1.ZodReadonly<z$1$1.ZodArray<ZLink>>>>;
|
|
1282
1273
|
metadata: z$1$1.ZodOptional<z$1$1.ZodNullable<ZMetadata>>;
|
|
1283
1274
|
}, z$1$1.core.$strip>;
|
|
1284
|
-
//#endregion
|
|
1285
|
-
//#region ../generators/dist/likec4/schemas/expression.d.mts
|
|
1286
1275
|
declare namespace expression_d_exports {
|
|
1287
1276
|
export { ZElementKindExpr, ZElementTagExpr, ZExpression, ZFqnExpr, ZFqnExprCustom, ZFqnExprOrWhere, ZFqnRef, ZRefDeployment, ZRefExpr, ZRefModel, ZRelationExpr, ZRelationExprAny, ZRelationExprCustom, ZRelationExprOrWhere, ZWhereExpr, ZWhereOperator, ZWhereParticipant, ZWhereTagKindMetadata, ZWildcardExpr, directRelationExpr$1 as directRelationExpr, elementKindExpr, elementTagExpr, expression$1 as expression, fqnExpr$1 as fqnExpr, fqnExprAny$1 as fqnExprAny, fqnExprCustom$1 as fqnExprCustom, fqnExprOrWhere$1 as fqnExprOrWhere, fqnRef$1 as fqnRef, incomingRelationExpr$1 as incomingRelationExpr, inoutRelationExpr, outgoingRelationExpr$1 as outgoingRelationExpr, refDeployment, refExpr, refModel, relationExpr$1 as relationExpr, relationExprAny$1 as relationExprAny, relationExprCustom$1 as relationExprCustom, relationExprOrWhere$1 as relationExprOrWhere, selector, whereAnd$1 as whereAnd, whereExpr, whereKind, whereMetadata, whereNot$1 as whereNot, whereOperator$1 as whereOperator, whereOr$1 as whereOr, whereParticipant$1 as whereParticipant, whereTag, wildcardExpr };
|
|
1288
1277
|
}
|
|
@@ -1551,8 +1540,6 @@ declare namespace ZExpression {
|
|
|
1551
1540
|
type Out = z$1$1.output<ZExpression>;
|
|
1552
1541
|
type In = z$1$1.input<ZExpression>;
|
|
1553
1542
|
}
|
|
1554
|
-
//#endregion
|
|
1555
|
-
//#region ../generators/dist/likec4/schemas/views.d.mts
|
|
1556
1543
|
declare namespace views_d_exports$1 {
|
|
1557
1544
|
export { StepRecursive, SubflowStep, ViewRuleGroupInput, ViewRuleGroupOutput, WithSteps, ZAutoLayoutDirection, ZBaseView, ZDeploymentView, ZDynamicStep, ZDynamicView, ZDynamicViewStep, ZDynamicViewSubflow, ZElementView, ZStepInput, ZStepOutput, ZViewRuleGroup, ZViewRulePredicate, anyView$1 as anyView, autoLayoutDirection, deploymentView$1 as deploymentView, deploymentViewRule$1 as deploymentViewRule, deploymentViewRuleIncludeAncestors$1 as deploymentViewRuleIncludeAncestors, dynamicStep, dynamicStepAlt, dynamicStepAltBranch, dynamicStepBlock, dynamicStepSeries, dynamicStepTry, dynamicView$1 as dynamicView, dynamicViewRule$1 as dynamicViewRule, dynamicViewStep, dynamicViewSubflow, dynamicViewVariant, elementView$1 as elementView, elementViewRule$1 as elementViewRule, viewRuleAutoLayout$1 as viewRuleAutoLayout, viewRuleExclude$1 as viewRuleExclude, viewRuleGlobalPredicate$1 as viewRuleGlobalPredicate, viewRuleGlobalStyle$1 as viewRuleGlobalStyle, viewRuleGroup$1 as viewRuleGroup, viewRuleInclude$1 as viewRuleInclude, viewRulePredicate$1 as viewRulePredicate, viewRuleRank$1 as viewRuleRank, viewRuleStyle$1 as viewRuleStyle, views$1 as views };
|
|
1558
1545
|
}
|
|
@@ -1741,7 +1728,7 @@ declare const deploymentViewRule$1: z$2.ZodUnion<readonly [ZViewRulePredicate, z
|
|
|
1741
1728
|
predicateId: string;
|
|
1742
1729
|
}>>, z$2.ZodObject<{
|
|
1743
1730
|
includeAncestors: z$2.ZodBoolean;
|
|
1744
|
-
}, z$2.core.$strict
|
|
1731
|
+
}, z$2.core.$strict>, ZViewRuleGroup]>;
|
|
1745
1732
|
/**
|
|
1746
1733
|
* Replicates ParsedElementView from the core,
|
|
1747
1734
|
* less strict, as the generator should be able to handle missing fields and provide defaults.
|
|
@@ -1770,7 +1757,7 @@ declare const deploymentView$1: ZBaseView<{
|
|
|
1770
1757
|
predicateId: string;
|
|
1771
1758
|
}>>, z$2.ZodObject<{
|
|
1772
1759
|
includeAncestors: z$2.ZodBoolean;
|
|
1773
|
-
}, z$2.core.$strict
|
|
1760
|
+
}, z$2.core.$strict>, ZViewRuleGroup]>>>>;
|
|
1774
1761
|
}>;
|
|
1775
1762
|
type ZDeploymentView = typeof deploymentView$1;
|
|
1776
1763
|
declare const _dynamicStep: z$2.ZodObject<{
|
|
@@ -1996,7 +1983,7 @@ declare const anyView$1: z$2.ZodUnion<readonly [ZBaseView<{
|
|
|
1996
1983
|
predicateId: string;
|
|
1997
1984
|
}>>, z$2.ZodObject<{
|
|
1998
1985
|
includeAncestors: z$2.ZodBoolean;
|
|
1999
|
-
}, z$2.core.$strict
|
|
1986
|
+
}, z$2.core.$strict>, ZViewRuleGroup]>>>>;
|
|
2000
1987
|
}>, ZBaseView<{
|
|
2001
1988
|
_type: z$2.ZodLiteral<"dynamic">;
|
|
2002
1989
|
variant: z$2.ZodOptional<z$2.ZodEnum<{
|
|
@@ -2083,7 +2070,7 @@ declare const views$1: z$2.ZodRecord<ZViewId, z$2.ZodUnion<readonly [ZBaseView<{
|
|
|
2083
2070
|
predicateId: string;
|
|
2084
2071
|
}>>, z$2.ZodObject<{
|
|
2085
2072
|
includeAncestors: z$2.ZodBoolean;
|
|
2086
|
-
}, z$2.core.$strict
|
|
2073
|
+
}, z$2.core.$strict>, ZViewRuleGroup]>>>>;
|
|
2087
2074
|
}>, ZBaseView<{
|
|
2088
2075
|
_type: z$2.ZodLiteral<"dynamic">;
|
|
2089
2076
|
variant: z$2.ZodOptional<z$2.ZodEnum<{
|
|
@@ -2115,9 +2102,6 @@ declare const views$1: z$2.ZodRecord<ZViewId, z$2.ZodUnion<readonly [ZBaseView<{
|
|
|
2115
2102
|
rankSep: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodNumber>>;
|
|
2116
2103
|
}, z$2.core.$strip>]>>>;
|
|
2117
2104
|
}>]>>;
|
|
2118
|
-
//#endregion
|
|
2119
|
-
//#region ../generators/dist/likec4/schemas/likec4data.d.mts
|
|
2120
|
-
//#region src/likec4/schemas/likec4data.d.ts
|
|
2121
2105
|
declare const likec4dataPreTransform: z$1$1.ZodObject<{
|
|
2122
2106
|
views: z$1$1.ZodOptional<z$1$1.ZodRecord<ZViewId, z$1$1.ZodUnion<readonly [ZBaseView<{
|
|
2123
2107
|
_type: z$1$1.ZodLiteral<"element">;
|
|
@@ -2174,7 +2158,7 @@ declare const likec4dataPreTransform: z$1$1.ZodObject<{
|
|
|
2174
2158
|
predicateId: string;
|
|
2175
2159
|
}>>, z$1$1.ZodObject<{
|
|
2176
2160
|
includeAncestors: z$1$1.ZodBoolean;
|
|
2177
|
-
}, z$1$1.core.$strict
|
|
2161
|
+
}, z$1$1.core.$strict>, ZViewRuleGroup]>>>>;
|
|
2178
2162
|
}>, ZBaseView<{
|
|
2179
2163
|
_type: z$1$1.ZodLiteral<"dynamic">;
|
|
2180
2164
|
variant: z$1$1.ZodOptional<z$1$1.ZodEnum<{
|
|
@@ -2954,9 +2938,6 @@ declare const likec4dataPreTransform: z$1$1.ZodObject<{
|
|
|
2954
2938
|
}>[]>>>>;
|
|
2955
2939
|
}, z$1$1.core.$strip>;
|
|
2956
2940
|
interface ZLikeC4Data extends z$1$1.ZodObject<typeof likec4dataPreTransform.shape> {}
|
|
2957
|
-
//#endregion
|
|
2958
|
-
//#endregion
|
|
2959
|
-
//#region ../generators/dist/likec4/schemas/deployment.d.mts
|
|
2960
2941
|
declare namespace deployment_d_exports$1 {
|
|
2961
2942
|
export { element$3 as element, instance$1 as instance, node$1 as node, relationship$4 as relationship, schema$2 as schema };
|
|
2962
2943
|
}
|
|
@@ -3386,8 +3367,6 @@ declare const schema$2: z$1$1.ZodObject<{
|
|
|
3386
3367
|
[x: string]: any;
|
|
3387
3368
|
}[]>>>;
|
|
3388
3369
|
}, z$1$1.core.$strip>;
|
|
3389
|
-
//#endregion
|
|
3390
|
-
//#region ../generators/dist/likec4/schemas/model.d.mts
|
|
3391
3370
|
declare namespace model_d_exports$1 {
|
|
3392
3371
|
export { ZElement, ZRelationship, ZRelationshipEndpoint, ZRelationshipId, element$2 as element, elements, relationship$3 as relationship, relationshipEndpoint, relationshipId, relationships, schema$1 as schema };
|
|
3393
3372
|
}
|
|
@@ -3675,8 +3654,6 @@ declare const schema$1: z$1$1.ZodObject<{
|
|
|
3675
3654
|
metadata?: unknown;
|
|
3676
3655
|
}>[]>>>;
|
|
3677
3656
|
}, z$1$1.core.$strip>;
|
|
3678
|
-
//#endregion
|
|
3679
|
-
//#region ../generators/dist/likec4/schemas/specification.d.mts
|
|
3680
3657
|
declare namespace specification_d_exports$1 {
|
|
3681
3658
|
export { element$1 as element, relationship$2 as relationship, schema, tagSpec };
|
|
3682
3659
|
}
|
|
@@ -3801,9 +3778,6 @@ declare const schema: z$1$1.ZodObject<{
|
|
|
3801
3778
|
color?: any;
|
|
3802
3779
|
}>>>, z$1$1.ZodPipe<z$1$1.ZodArray<ZTag>, z$1$1.ZodTransform<Record<scalar.Tag, Record<string, any>>, scalar.Tag[]>>]>>;
|
|
3803
3780
|
}, z$1$1.core.$strip>;
|
|
3804
|
-
//#endregion
|
|
3805
|
-
//#region ../generators/dist/likec4/schemas/index.d.mts
|
|
3806
|
-
//#region src/likec4/schemas/index.d.ts
|
|
3807
3781
|
export declare const schemas: {
|
|
3808
3782
|
common: typeof common_d_exports;
|
|
3809
3783
|
expr: typeof expression_d_exports;
|
|
@@ -3877,9 +3851,6 @@ export declare namespace schemas {
|
|
|
3877
3851
|
type Data = z.output<typeof schemas.likec4data>;
|
|
3878
3852
|
}
|
|
3879
3853
|
}
|
|
3880
|
-
//#endregion
|
|
3881
|
-
//#endregion
|
|
3882
|
-
//#region ../generators/dist/likec4/operators/deployment.d.mts
|
|
3883
3854
|
declare namespace deployment_d_exports {
|
|
3884
3855
|
export { deployment, instance, node, relationship$1 as relationship };
|
|
3885
3856
|
}
|
|
@@ -4091,8 +4062,6 @@ declare const deployment: {
|
|
|
4091
4062
|
}> | undefined;
|
|
4092
4063
|
}>(): Op<A>;
|
|
4093
4064
|
};
|
|
4094
|
-
//#endregion
|
|
4095
|
-
//#region ../generators/dist/likec4/operators/expressions.d.mts
|
|
4096
4065
|
declare namespace expressions_d_exports {
|
|
4097
4066
|
export { directRelationExpr, expression, fqnExpr, fqnExprAny, fqnExprCustom, fqnExprOrWhere, fqnRef, inOutRelationExpr, incomingRelationExpr, outgoingRelationExpr, relationExpr, relationExprAny, relationExprCustom, relationExprOrWhere, whereAnd, whereKindEqual, whereMetadataEqual, whereNot, whereOperator, whereOr, whereParticipant, whereTagEqual };
|
|
4098
4067
|
}
|
|
@@ -4502,9 +4471,6 @@ declare const expression: {
|
|
|
4502
4471
|
};
|
|
4503
4472
|
}>(): Op<A>;
|
|
4504
4473
|
};
|
|
4505
|
-
//#endregion
|
|
4506
|
-
//#region ../generators/dist/likec4/operators/likec4data.d.mts
|
|
4507
|
-
//#region src/likec4/operators/likec4data.d.ts
|
|
4508
4474
|
declare const likec4data: {
|
|
4509
4475
|
<A extends {
|
|
4510
4476
|
views?: Record<string, {
|
|
@@ -4548,7 +4514,7 @@ declare const likec4data: {
|
|
|
4548
4514
|
include: ZExpression.In[];
|
|
4549
4515
|
} | {
|
|
4550
4516
|
exclude: ZExpression.In[];
|
|
4551
|
-
} | {
|
|
4517
|
+
} | ZViewRuleGroup.In | {
|
|
4552
4518
|
targets: ZFqnExpr.In[];
|
|
4553
4519
|
style: ZStyle.In;
|
|
4554
4520
|
notation?: string | undefined;
|
|
@@ -5117,9 +5083,6 @@ declare const likec4data: {
|
|
|
5117
5083
|
}>> | undefined;
|
|
5118
5084
|
}>(): Op<A>;
|
|
5119
5085
|
};
|
|
5120
|
-
//#endregion
|
|
5121
|
-
//#endregion
|
|
5122
|
-
//#region ../generators/dist/likec4/operators/model.d.mts
|
|
5123
5086
|
declare namespace model_d_exports {
|
|
5124
5087
|
export { element, model, relationship };
|
|
5125
5088
|
}
|
|
@@ -5281,8 +5244,6 @@ declare const model: {
|
|
|
5281
5244
|
}>> | undefined;
|
|
5282
5245
|
}>(): Op<A>;
|
|
5283
5246
|
};
|
|
5284
|
-
//#endregion
|
|
5285
|
-
//#region ../generators/dist/likec4/operators/properties.d.mts
|
|
5286
5247
|
declare namespace properties_d_exports {
|
|
5287
5248
|
export { colorProperty, descriptionProperty, iconProperty, linkProperty, linksProperty, markdownProperty, metadataProperty, metadataValue, notationProperty, notesProperty, opacityProperty, relationConnector, styleBlockProperty, styleProperties, summaryProperty, tagsProperty, technologyProperty, textProperty, titleProperty };
|
|
5288
5249
|
}
|
|
@@ -5348,8 +5309,6 @@ declare const styleProperties: {
|
|
|
5348
5309
|
* Renders the arrow between relationship endpoints, e.g. `->`, `<->` or `-[async]<->`.
|
|
5349
5310
|
*/
|
|
5350
5311
|
declare function relationConnector(kind: string | undefined | null, isBidirectional: boolean | undefined | null): string;
|
|
5351
|
-
//#endregion
|
|
5352
|
-
//#region ../generators/dist/likec4/operators/specification.d.mts
|
|
5353
5312
|
declare namespace specification_d_exports {
|
|
5354
5313
|
export { elementKind, relationshipKind, specification, tagSpecification };
|
|
5355
5314
|
}
|
|
@@ -5447,8 +5406,6 @@ declare const specification: {
|
|
|
5447
5406
|
}> | undefined;
|
|
5448
5407
|
}>(): Op<A>;
|
|
5449
5408
|
};
|
|
5450
|
-
//#endregion
|
|
5451
|
-
//#region ../generators/dist/likec4/operators/views.d.mts
|
|
5452
5409
|
declare namespace views_d_exports {
|
|
5453
5410
|
export { anyView, deploymentView, deploymentViewRule, deploymentViewRuleIncludeAncestors, dynamicView, dynamicViewRule, elementView, elementViewRule, step, stepAny, viewRuleAutoLayout, viewRuleExclude, viewRuleGlobalPredicate, viewRuleGlobalStyle, viewRuleGroup, viewRuleInclude, viewRulePredicate, viewRuleRank, viewRuleStyle, views };
|
|
5454
5411
|
}
|
|
@@ -5783,7 +5740,7 @@ declare const deploymentViewRule: {
|
|
|
5783
5740
|
include: ZExpression.In[];
|
|
5784
5741
|
} | {
|
|
5785
5742
|
exclude: ZExpression.In[];
|
|
5786
|
-
} | {
|
|
5743
|
+
} | ZViewRuleGroup.In | {
|
|
5787
5744
|
targets: ZFqnExpr.In[];
|
|
5788
5745
|
style: ZStyle.In;
|
|
5789
5746
|
notation?: string | undefined;
|
|
@@ -5808,7 +5765,7 @@ declare const deploymentView: {
|
|
|
5808
5765
|
include: ZExpression.In[];
|
|
5809
5766
|
} | {
|
|
5810
5767
|
exclude: ZExpression.In[];
|
|
5811
|
-
} | {
|
|
5768
|
+
} | ZViewRuleGroup.In | {
|
|
5812
5769
|
targets: ZFqnExpr.In[];
|
|
5813
5770
|
style: ZStyle.In;
|
|
5814
5771
|
notation?: string | undefined;
|
|
@@ -5855,6 +5812,7 @@ declare const stepAny: {
|
|
|
5855
5812
|
*
|
|
5856
5813
|
* @example
|
|
5857
5814
|
* ```likec4
|
|
5815
|
+
|
|
5858
5816
|
* ```
|
|
5859
5817
|
*/
|
|
5860
5818
|
declare const step: {
|
|
@@ -6203,7 +6161,7 @@ declare const anyView: {
|
|
|
6203
6161
|
include: ZExpression.In[];
|
|
6204
6162
|
} | {
|
|
6205
6163
|
exclude: ZExpression.In[];
|
|
6206
|
-
} | {
|
|
6164
|
+
} | ZViewRuleGroup.In | {
|
|
6207
6165
|
targets: ZFqnExpr.In[];
|
|
6208
6166
|
style: ZStyle.In;
|
|
6209
6167
|
notation?: string | undefined;
|
|
@@ -6378,7 +6336,7 @@ declare const views: {
|
|
|
6378
6336
|
include: ZExpression.In[];
|
|
6379
6337
|
} | {
|
|
6380
6338
|
exclude: ZExpression.In[];
|
|
6381
|
-
} | {
|
|
6339
|
+
} | ZViewRuleGroup.In | {
|
|
6382
6340
|
targets: ZFqnExpr.In[];
|
|
6383
6341
|
style: ZStyle.In;
|
|
6384
6342
|
notation?: string | undefined;
|
|
@@ -6511,14 +6469,9 @@ declare const views: {
|
|
|
6511
6469
|
links?: readonly Link[] | null | undefined;
|
|
6512
6470
|
}>>(): Op<A>;
|
|
6513
6471
|
};
|
|
6514
|
-
//#endregion
|
|
6515
|
-
//#region ../generators/dist/likec4/operators/index.d.mts
|
|
6516
6472
|
declare namespace index_d_exports {
|
|
6517
6473
|
export { base_d_exports as base, body, deployment, deploymentView, deployment_d_exports as deployments, dynamicView, eachOnFresh, elementView, eq, expressions_d_exports as expr, expression, foreach, foreachNewLine, guard, indent, inlineText, join, lazy, likec4data, lines, markdown, markdownOrString$1 as markdownOrString, materialize, merge, model, model_d_exports as models, newline, noop, print$1 as print, printProperty, property, properties_d_exports as props, select, separateComma, separateNewLine, separateWith, space, spaceBetween, specification, specification_d_exports as specifications, text, views_d_exports as views, when, withctx };
|
|
6518
6474
|
}
|
|
6519
|
-
//#endregion
|
|
6520
|
-
//#region ../generators/dist/likec4/generate-likec4.d.mts
|
|
6521
|
-
//#region src/likec4/generate-likec4.d.ts
|
|
6522
6475
|
type Params = {
|
|
6523
6476
|
indent?: string | number;
|
|
6524
6477
|
};
|
|
@@ -6570,9 +6523,8 @@ declare function generateLikeC4(input: schemas.likec4data.Input, params?: Params
|
|
|
6570
6523
|
export declare function print(operation: AnyOp): string;
|
|
6571
6524
|
export declare function print<O extends AnyOp>(operation: O, value: ctxOf<NoInfer<O>>, params?: Params): string;
|
|
6572
6525
|
/**
|
|
6573
|
-
* Same as {@link
|
|
6526
|
+
* Same as {@link print} but uses tab indentation
|
|
6574
6527
|
*/
|
|
6575
6528
|
export declare function printWithTabIndent(operation: AnyOp): string;
|
|
6576
6529
|
export declare function printWithTabIndent<O extends AnyOp>(operation: O, data: ctxOf<NoInfer<O>>): string;
|
|
6577
|
-
//#endregion
|
|
6578
6530
|
export { type AnyCtx, type AnyOp, type Ctx, type InferOp, type Op, type Ops, type Output, type ctxOf, generateLikeC4 as generate, index_d_exports as ops };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { i as __name } from "./chunks/rolldown-runtime.mjs";
|
|
2
|
-
import { n as writeDSL, r as LikeC4$1, t as WriteDSLOptions } from "./chunks/index2.mjs";
|
|
2
|
+
import { a as ast_d_exports, n as writeDSL, r as LikeC4$1, t as WriteDSLOptions } from "./chunks/index2.mjs";
|
|
3
3
|
export type * from "@likec4/core/types";
|
|
4
|
-
//#region src/LikeC4.d.ts
|
|
5
4
|
type LikeC4Options = {
|
|
6
5
|
/**
|
|
7
6
|
* By default, if LikeC4 model is invalid, errors are printed to the console.
|
|
@@ -47,5 +46,4 @@ export declare namespace LikeC4 {
|
|
|
47
46
|
*/
|
|
48
47
|
function fromWorkspace(path?: string, _opts?: LikeC4Options): Promise<LikeC4>;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
export { type LikeC4Options, type WriteDSLOptions, writeDSL };
|
|
49
|
+
export { type LikeC4Options, type WriteDSLOptions, type ast_d_exports as ast, writeDSL };
|
package/dist/model/index.d.mts
CHANGED
|
@@ -4,8 +4,6 @@ import { BBox, 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
6
|
export type * from "@likec4/core/types";
|
|
7
|
-
//#region ../layouts/dist/sequence/_types.d.mts
|
|
8
|
-
//#region src/sequence/_types.d.ts
|
|
9
7
|
interface SequenceActorStepPort {
|
|
10
8
|
id: string;
|
|
11
9
|
cx: number;
|
|
@@ -46,18 +44,10 @@ interface SequenceViewLayout {
|
|
|
46
44
|
parallelAreas: Array<SequenceParallelArea>;
|
|
47
45
|
bounds: BBox;
|
|
48
46
|
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region ../layouts/dist/sequence/sequence-view.d.mts
|
|
52
|
-
//#region src/sequence/sequence-view.d.ts
|
|
53
47
|
export declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/model/index.d.ts
|
|
57
48
|
export type UnknownLayouted = types.UnknownLayouted;
|
|
58
49
|
/**
|
|
59
50
|
* Used by vite plugin to generate `virtual:likec4/model`
|
|
60
51
|
*/
|
|
61
52
|
export declare function createLikeC4Model(model: any): LikeC4Model$1<UnknownLayouted>;
|
|
62
|
-
//#endregion
|
|
63
53
|
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 };
|
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
import { i as __name } from "../chunks/rolldown-runtime.mjs";
|
|
2
|
-
import "../chunks/index.mjs";
|
|
3
2
|
import { i as LikeC4LanguageServices } from "../chunks/index2.mjs";
|
|
4
|
-
import "
|
|
3
|
+
import z from "zod/v4";
|
|
5
4
|
import { PluginOption } from "vite";
|
|
6
5
|
import { AnyTextAdapter } from "@tanstack/ai";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Options of the LikeC4 application, shared by the Vite plugin and the app config of the CLI.
|
|
8
|
+
*
|
|
9
|
+
* @experimental
|
|
10
|
+
*/
|
|
11
|
+
declare const LikeC4AppOptionsSchema: z.ZodObject<{
|
|
12
|
+
title: z.ZodDefault<z.ZodString>;
|
|
13
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
light: "light";
|
|
15
|
+
dark: "dark";
|
|
16
|
+
}>>;
|
|
17
|
+
useHashHistory: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
webcomponentPrefix: z.ZodDefault<z.ZodString>;
|
|
19
|
+
customization: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/**
|
|
22
|
+
* Options of the LikeC4 application as written by the user, see {@link LikeC4AppOptionsSchema}
|
|
23
|
+
*
|
|
24
|
+
* @experimental
|
|
25
|
+
*/
|
|
26
|
+
type LikeC4AppOptions = z.input<typeof LikeC4AppOptionsSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use {@link LikeC4AppOptions} at the top level of the plugin options
|
|
29
|
+
*/
|
|
30
|
+
interface LikeC4AppConfig {
|
|
10
31
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @default 'likec4'
|
|
32
|
+
* @deprecated Use `webcomponentPrefix` at the top level of the plugin options
|
|
13
33
|
*/
|
|
14
34
|
webcomponentPrefix?: string;
|
|
15
35
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @default 'LikeC4'
|
|
36
|
+
* @deprecated Use `title` at the top level of the plugin options
|
|
18
37
|
*/
|
|
19
38
|
pageTitle?: string;
|
|
20
39
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @default false
|
|
40
|
+
* @deprecated Use `useHashHistory` at the top level of the plugin options
|
|
23
41
|
*/
|
|
24
42
|
useHashHistory?: boolean | undefined;
|
|
25
43
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @default 'auto'
|
|
44
|
+
* @deprecated Use `theme` at the top level of the plugin options
|
|
28
45
|
*/
|
|
29
46
|
theme?: 'light' | 'dark' | undefined;
|
|
30
47
|
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region ../vite-plugin/dist/plugin.d.mts
|
|
34
|
-
//#region src/plugin.d.ts
|
|
35
48
|
interface AIOptions<TAdapter extends AnyTextAdapter = AnyTextAdapter> {
|
|
36
49
|
/**
|
|
37
50
|
* The AI adapter to use
|
|
@@ -57,45 +70,12 @@ interface AIOptions<TAdapter extends AnyTextAdapter = AnyTextAdapter> {
|
|
|
57
70
|
modelOptions?: TAdapter['~types']['providerOptions'];
|
|
58
71
|
maxTokens?: number;
|
|
59
72
|
}
|
|
60
|
-
type
|
|
73
|
+
type LikeC4WorkspaceOptions = {
|
|
61
74
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* Or set to `disabled` to disable AI.
|
|
75
|
+
* Initialize LikeC4 from the specified workspace path.
|
|
76
|
+
* If not provided, vite project root will be used.
|
|
65
77
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* @see https://tanstack.com/ai/latest/docs/getting-started/overview#adapters
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* import { openRouterText } from '@tanstack/ai-openrouter'
|
|
72
|
-
*
|
|
73
|
-
* export default defineConfig({
|
|
74
|
-
* plugins: [
|
|
75
|
-
* likec4VitePlugin({
|
|
76
|
-
* ai: {
|
|
77
|
-
* adapter: openRouterText("openai/gpt-5")
|
|
78
|
-
* },
|
|
79
|
-
* }),
|
|
80
|
-
* ],
|
|
81
|
-
* })
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
ai?: 'disabled' | 'auto' | AIOptions | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Define vite environments where this plugin should be active
|
|
87
|
-
* By default, the plugin is active in all environments
|
|
88
|
-
*/
|
|
89
|
-
environments?: string | string[];
|
|
90
|
-
/**
|
|
91
|
-
* Configuration for the static application
|
|
92
|
-
*/
|
|
93
|
-
appConfig?: AppConfig;
|
|
94
|
-
};
|
|
95
|
-
type LikeC4VitePluginOptions = SharedOptions & ({
|
|
96
|
-
/**
|
|
97
|
-
* Initializes a LikeC4 instance from the specified workspace path.
|
|
98
|
-
* By default it is vite project root.
|
|
78
|
+
* As alternative you can provide {@link LikeC4LanguageServices} instance via `languageServices` option.
|
|
99
79
|
*/
|
|
100
80
|
workspace?: string;
|
|
101
81
|
/**
|
|
@@ -126,11 +106,14 @@ type LikeC4VitePluginOptions = SharedOptions & ({
|
|
|
126
106
|
* @default 'warning'
|
|
127
107
|
*/
|
|
128
108
|
logLevel?: 'trace' | 'debug' | 'info' | 'warning' | 'error' | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Either provide path to {@link LikeC4WorkspaceOptions.workspace} or {@link LikeC4LanguageServices} instance.
|
|
111
|
+
*/
|
|
129
112
|
languageServices?: never;
|
|
130
113
|
} | {
|
|
131
114
|
/**
|
|
132
|
-
* If you have instance of {@link LikeC4LanguageServices}
|
|
133
|
-
*
|
|
115
|
+
* If you have instance of {@link LikeC4LanguageServices}, pass it directly.
|
|
116
|
+
* None of the options below are applied when this option is used.
|
|
134
117
|
*/
|
|
135
118
|
languageServices: LikeC4LanguageServices;
|
|
136
119
|
workspace?: never;
|
|
@@ -139,8 +122,47 @@ type LikeC4VitePluginOptions = SharedOptions & ({
|
|
|
139
122
|
graphviz?: never;
|
|
140
123
|
watch?: never;
|
|
141
124
|
logLevel?: never;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Configuration for the LikeC4 Vite plugin
|
|
128
|
+
*
|
|
129
|
+
* @see {@link LikeC4WorkspaceOptions} for workspace options (language services)
|
|
130
|
+
* @see {@link LikeC4AppOptions} for application-specific options
|
|
131
|
+
*/
|
|
132
|
+
type LikeC4VitePluginOptions = LikeC4WorkspaceOptions & LikeC4AppOptions & {
|
|
133
|
+
/**
|
|
134
|
+
* AI configuration, by default enabled with automatic detection based on environment variables.
|
|
135
|
+
* You can also provide explicit configuration.
|
|
136
|
+
* Or set to `disabled` to disable AI.
|
|
137
|
+
*
|
|
138
|
+
* @default 'auto' (automatic detection based on environment variables)
|
|
139
|
+
*
|
|
140
|
+
* @see https://tanstack.com/ai/latest/docs/getting-started/overview#adapters
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { openRouterText } from '@tanstack/ai-openrouter'
|
|
144
|
+
*
|
|
145
|
+
* export default defineConfig({
|
|
146
|
+
* plugins: [
|
|
147
|
+
* likec4VitePlugin({
|
|
148
|
+
* ai: {
|
|
149
|
+
* adapter: openRouterText("openai/gpt-5")
|
|
150
|
+
* },
|
|
151
|
+
* }),
|
|
152
|
+
* ],
|
|
153
|
+
* })
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
ai?: 'disabled' | 'auto' | AIOptions | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* Define vite environments where this plugin should be active
|
|
159
|
+
* By default, the plugin is active in all environments
|
|
160
|
+
*/
|
|
161
|
+
environments?: string | string[];
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated Use the options at the top level: `title`, `theme`, `useHashHistory`, `webcomponentPrefix`
|
|
164
|
+
*/
|
|
165
|
+
appConfig?: LikeC4AppConfig | undefined;
|
|
166
|
+
};
|
|
167
|
+
export declare function LikeC4VitePlugin({ environments, appConfig, title, theme, useHashHistory, webcomponentPrefix, customization, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
|
|
168
|
+
export type { LikeC4AppConfig, LikeC4AppOptions, LikeC4VitePluginOptions };
|