likec4 1.48.0 → 1.50.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 +11 -1
- package/__app__/src/likec4.js +5941 -4496
- package/__app__/src/routes/index.js +3 -153
- package/__app__/src/routes/projects.js +21 -1087
- package/__app__/src/routes/single.js +1228 -16
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +4649 -1897
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +169 -141
- package/dist/THIRD-PARTY-LICENSES.md +1769 -0
- package/dist/_chunks/LikeC4.mjs +1154 -202
- package/dist/_chunks/binary.mjs +72 -0
- package/dist/_chunks/index.d.mts +234 -140
- package/dist/_chunks/index2.d.mts +2043 -1828
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +30 -0
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
- package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
- package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
- package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
- package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
- package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
- package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +114 -14
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
- package/dist/_chunks/libs/@nanostores/react.d.mts +61 -1
- package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
- package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +1 -10
- package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
- package/dist/_chunks/libs/ajv.mjs +1 -777
- package/dist/_chunks/libs/atomically.mjs +1 -362
- package/dist/_chunks/libs/birpc.mjs +1 -201
- package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
- package/dist/_chunks/libs/chevrotain.mjs +55 -6229
- package/dist/_chunks/libs/conf.mjs +1 -2258
- package/dist/_chunks/libs/defu.mjs +1 -42
- package/dist/_chunks/libs/esm-env.mjs +1 -5
- package/dist/_chunks/libs/eventemitter3.mjs +1 -243
- package/dist/_chunks/libs/fast-equals.mjs +1 -446
- package/dist/_chunks/libs/find-up-simple.mjs +1 -24
- package/dist/_chunks/libs/get-port.mjs +1 -107
- package/dist/_chunks/libs/is-docker.mjs +1 -26
- package/dist/_chunks/libs/is-error-instance.mjs +1 -26
- package/dist/_chunks/libs/is-inside-container.mjs +1 -20
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
- package/dist/_chunks/libs/isexe.mjs +1 -127
- package/dist/_chunks/libs/json5.mjs +14 -959
- package/dist/_chunks/libs/khroma.mjs +1 -605
- package/dist/_chunks/libs/ky.mjs +2 -807
- package/dist/_chunks/libs/langium.d.mts +2913 -2876
- package/dist/_chunks/libs/langium.mjs +33 -20351
- package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
- package/dist/_chunks/libs/p-limit.mjs +1 -120
- package/dist/_chunks/libs/p-queue.mjs +1 -449
- package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
- package/dist/_chunks/libs/package-up.mjs +1 -10
- package/dist/_chunks/libs/pako.mjs +1 -0
- package/dist/_chunks/libs/parse-ms.mjs +1 -36
- package/dist/_chunks/libs/pathe.mjs +1 -0
- package/dist/_chunks/libs/picomatch.mjs +1 -1673
- package/dist/_chunks/libs/pretty-ms.mjs +1 -80
- package/dist/_chunks/libs/remeda.mjs +2 -690
- package/dist/_chunks/libs/safe-stringify.mjs +1 -21
- package/dist/_chunks/libs/strip-indent.mjs +1 -15
- package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
- package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
- package/dist/_chunks/libs/ufo.mjs +1 -240
- package/dist/_chunks/libs/which.mjs +1 -84
- package/dist/_chunks/libs/word-wrap.mjs +12 -43
- package/dist/_chunks/rolldown-runtime.mjs +1 -48
- package/dist/_chunks/sequence.mjs +1 -0
- package/dist/_chunks/src.mjs +15 -0
- package/dist/_chunks/src2.mjs +499 -0
- package/dist/cli/index.mjs +77 -1952
- package/dist/config/index.d.mts +2 -2
- package/dist/config/index.mjs +1 -6
- package/dist/index.d.mts +150 -7
- package/dist/index.mjs +1 -21
- package/dist/model/builder.mjs +1 -3
- package/dist/model/index.d.mts +57 -3
- package/dist/model/index.mjs +1 -5
- package/dist/vite-plugin/index.d.mts +7 -3
- package/dist/vite-plugin/index.mjs +1 -22
- package/dist/vite-plugin/internal.d.mts +6 -7
- package/dist/vite-plugin/internal.mjs +1 -68
- package/package.json +64 -45
- package/react/{index.d.ts → index.d.mts} +114 -72
- package/react/{index.js → index.mjs} +21320 -22041
- package/react/package.json +2 -5
- package/vite-plugin-modules.d.ts +10 -5
- package/dist/_chunks/LikeC4.d.mts +0 -121
- package/dist/_chunks/config-app.prod.d.mts +0 -18
- package/dist/_chunks/config-app.prod.mjs +0 -188
- package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
- package/dist/_chunks/define-config.mjs +0 -409
- package/dist/_chunks/index3.d.mts +0 -60
- package/dist/_chunks/libs/@chevrotain/gast.mjs +0 -3969
- package/dist/_chunks/libs/hono.mjs +0 -1829
- package/dist/_chunks/libs/nanoid.mjs +0 -29
- package/dist/_chunks/libs/nanostores.d.mts +0 -63
- package/dist/_chunks/libs/nanostores.mjs +0 -198
- package/dist/_chunks/model.mjs +0 -12
- package/dist/_chunks/module.d.mts +0 -71
- package/dist/_chunks/module.mjs +0 -18657
- package/dist/_chunks/plugin.mjs +0 -996
- package/dist/_chunks/sequence-view.mjs +0 -575
- package/dist/_chunks/vite-build.mjs +0 -69
- package/dist/_chunks/vite-dev.mjs +0 -79
- package/dist/_chunks/vite-preview.mjs +0 -27
- package/dist/language/module.d.mts +0 -5
- package/dist/language/module.mjs +0 -20
- package/dist/vite/vite-build.d.mts +0 -26
- package/dist/vite/vite-build.mjs +0 -27
- package/dist/vite/vite-dev.d.mts +0 -34
- package/dist/vite/vite-dev.mjs +0 -29
- package/dist/vite/vite-preview.d.mts +0 -20
- package/dist/vite/vite-preview.mjs +0 -26
- /package/dist/_chunks/{index4.d.mts → libs/@chevrotain/types.d.mts} +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { AdhocViewPredicate } from '@likec4/core/compute-view';
|
|
2
1
|
import { Align } from '@xyflow/react';
|
|
3
2
|
import { Any } from '@likec4/core/types';
|
|
4
3
|
import { AutoLayoutDirection } from '@likec4/core/types';
|
|
5
4
|
import { aux } from '@likec4/core/types';
|
|
6
5
|
import { BBox } from '@likec4/core/types';
|
|
7
|
-
import { BBox as BBox_2 } from '@likec4/core';
|
|
6
|
+
import { BBox as BBox_2 } from '@likec4/core/geometry';
|
|
7
|
+
import { BBox as BBox_3 } from '@likec4/core';
|
|
8
8
|
import { CamelCasedProperties } from 'type-fest';
|
|
9
9
|
import { Color } from '@likec4/core/types';
|
|
10
10
|
import { ComputedNodeStyle } from '@likec4/core/types';
|
|
11
11
|
import { ComputedNodeStyle as ComputedNodeStyle_2 } from '@likec4/core';
|
|
12
|
-
import { Context as Context_4 } from 'react';
|
|
13
12
|
import { ControlButton } from '@xyflow/react';
|
|
14
13
|
import { Controls } from '@xyflow/react';
|
|
15
14
|
import { CSSProperties } from 'react';
|
|
@@ -43,7 +42,6 @@ import { HTMLAttributes } from 'react';
|
|
|
43
42
|
import { IconUrl } from '@likec4/core/types';
|
|
44
43
|
import { JSX } from 'react/jsx-runtime';
|
|
45
44
|
import { JsxStyleProps } from '@likec4/styles/types';
|
|
46
|
-
import { LayoutedElementView } from '@likec4/core/types';
|
|
47
45
|
import { LayoutedProjectsView } from '@likec4/core/compute-view';
|
|
48
46
|
import { LayoutedView } from '@likec4/core/types';
|
|
49
47
|
import { LayoutType } from '@likec4/core/types';
|
|
@@ -51,7 +49,6 @@ import { LikeC4Model } from '@likec4/core/model';
|
|
|
51
49
|
import { LikeC4Project } from '@likec4/core/types';
|
|
52
50
|
import { LikeC4Styles } from '@likec4/core/styles';
|
|
53
51
|
import { LikeC4ViewModel } from '@likec4/core/model';
|
|
54
|
-
import { MantineThemeOverride } from '@mantine/core';
|
|
55
52
|
import { MarkdownOrString } from '@likec4/core/types';
|
|
56
53
|
import { MarkdownOrString as MarkdownOrString_2 } from '@likec4/core';
|
|
57
54
|
import { MemoExoticComponent } from 'react';
|
|
@@ -59,6 +56,7 @@ import { MiniMap } from '@xyflow/react';
|
|
|
59
56
|
import { MiniMapNode } from '@xyflow/react';
|
|
60
57
|
import { MiniMapNodeProps } from '@xyflow/react';
|
|
61
58
|
import { MotionNodeLayoutOptions } from 'motion/react';
|
|
59
|
+
import { MotionStyle } from 'motion/react';
|
|
62
60
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
63
61
|
import { Node as Node_2 } from '@xyflow/react';
|
|
64
62
|
import { NodeChange } from '@xyflow/system';
|
|
@@ -96,8 +94,7 @@ import { Simplify } from 'type-fest';
|
|
|
96
94
|
import { SimplifyDeep } from 'type-fest';
|
|
97
95
|
import { StepEdgeId } from '@likec4/core/types';
|
|
98
96
|
import type * as t from '@likec4/core/types';
|
|
99
|
-
import { UnknownLayouted } from '@likec4/core';
|
|
100
|
-
import { UnknownLayouted as UnknownLayouted_3 } from '@likec4/core/types';
|
|
97
|
+
import { UnknownLayouted as UnknownLayouted_2 } from '@likec4/core/types';
|
|
101
98
|
import { ViewChange } from '@likec4/core/types';
|
|
102
99
|
import { ViewId } from '@likec4/core/types';
|
|
103
100
|
import { ViewId as ViewId_3 } from '@likec4/core';
|
|
@@ -541,10 +538,6 @@ declare interface ActorSystemInfo {
|
|
|
541
538
|
actors: Record<string, AnyActorRef>;
|
|
542
539
|
}
|
|
543
540
|
|
|
544
|
-
export declare type AdhocViewService = {
|
|
545
|
-
process: (input: CalcAdhocViewInput) => Promise<CalcAdhocViewOutput>;
|
|
546
|
-
};
|
|
547
|
-
|
|
548
541
|
declare type AlignmentMode = LinearAlignmentMode | GridAlignmentMode;
|
|
549
542
|
|
|
550
543
|
declare type Any_2 = t.aux.Any;
|
|
@@ -664,14 +657,6 @@ export declare interface BaseNodeProps<N extends BaseNode = BaseNode> extends No
|
|
|
664
657
|
|
|
665
658
|
export declare type BaseNodePropsWithData<Data extends Record<string, unknown>> = BaseNodeProps<BaseNode<Data>>;
|
|
666
659
|
|
|
667
|
-
declare type CalcAdhocViewInput = {
|
|
668
|
-
predicates: AdhocViewPredicate[];
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
declare type CalcAdhocViewOutput = {
|
|
672
|
-
view: LayoutedElementView;
|
|
673
|
-
};
|
|
674
|
-
|
|
675
660
|
declare interface Clock {
|
|
676
661
|
setTimeout(fn: (...args: any[]) => void, timeout: number): any;
|
|
677
662
|
clearTimeout(id: any): void;
|
|
@@ -844,7 +829,7 @@ declare type Context_3 = Readonly<{
|
|
|
844
829
|
};
|
|
845
830
|
xynodes: RelationshipDetailsTypes.Node[];
|
|
846
831
|
xyedges: RelationshipDetailsTypes.Edge[];
|
|
847
|
-
bounds:
|
|
832
|
+
bounds: BBox_3;
|
|
848
833
|
}>;
|
|
849
834
|
|
|
850
835
|
declare type ContextFactory<TContext extends MachineContext, TActor extends ProvidedActor, TInput, TEvent extends EventObject = EventObject> = ({ spawn, input, self }: {
|
|
@@ -857,16 +842,9 @@ declare type ContextFactory<TContext extends MachineContext, TActor extends Prov
|
|
|
857
842
|
|
|
858
843
|
export declare function createLikeC4Editor(callbacks: LikeC4EditorCallbacks): LikeC4EditorCallbacks;
|
|
859
844
|
|
|
860
|
-
export declare type CurrentViewModel = LikeC4ViewModel<
|
|
845
|
+
export declare type CurrentViewModel = LikeC4ViewModel<UnknownLayouted, LayoutedView<UnknownLayouted>>;
|
|
861
846
|
|
|
862
847
|
declare type Data = {
|
|
863
|
-
shape: ElementShape_2;
|
|
864
|
-
width: number;
|
|
865
|
-
height: number;
|
|
866
|
-
style?: ComputedNodeStyle;
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
declare type Data_2 = {
|
|
870
848
|
tags: readonly string[] | null | undefined;
|
|
871
849
|
width: number;
|
|
872
850
|
};
|
|
@@ -1048,6 +1026,17 @@ export declare interface DiagramApi<A extends Any_3 = Unknown_2> {
|
|
|
1048
1026
|
openRelationshipDetails(...params: [edgeId: EdgeId_3] | [source: Fqn_4<A>, target: Fqn_4<A>]): void;
|
|
1049
1027
|
updateNodeData(nodeId: NodeId_2, data: PartialDeep<Types.NodeData>): void;
|
|
1050
1028
|
updateEdgeData(edgeId: EdgeId_3, data: PartialDeep<Types.EdgeData>): void;
|
|
1029
|
+
highlightNode(nodeId: NodeId_2): void;
|
|
1030
|
+
highlightEdge(edgeId: EdgeId_3): void;
|
|
1031
|
+
unhighlightAll(): void;
|
|
1032
|
+
/**
|
|
1033
|
+
* Center viewport on a given node
|
|
1034
|
+
*/
|
|
1035
|
+
centerViewportOnNode(target: NodeId_2): void;
|
|
1036
|
+
/**
|
|
1037
|
+
* Center viewport on a given edge (centering on edge means including both source and target nodes in view)
|
|
1038
|
+
*/
|
|
1039
|
+
centerViewportOnEdge(target: EdgeId_3): void;
|
|
1051
1040
|
/**
|
|
1052
1041
|
* Start editing, either node or edge
|
|
1053
1042
|
*/
|
|
@@ -1199,9 +1188,11 @@ export declare type DiagramEmittedEvents = {
|
|
|
1199
1188
|
};
|
|
1200
1189
|
|
|
1201
1190
|
declare type DiagramEventHandlersContext = RequiredOrNull<LikeC4DiagramEventHandlers> & {
|
|
1202
|
-
handlersRef:
|
|
1191
|
+
handlersRef: DiagramEventHandlersRef;
|
|
1203
1192
|
};
|
|
1204
1193
|
|
|
1194
|
+
declare type DiagramEventHandlersRef = RefObject<Required<LikeC4DiagramEventHandlers>>;
|
|
1195
|
+
|
|
1205
1196
|
export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
|
|
1206
1197
|
type: 'xyflow.init';
|
|
1207
1198
|
instance: XYFlowInstance;
|
|
@@ -1250,6 +1241,14 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
|
|
|
1250
1241
|
type: 'xyflow.setViewport';
|
|
1251
1242
|
duration?: number;
|
|
1252
1243
|
viewport: Viewport;
|
|
1244
|
+
} | {
|
|
1245
|
+
type: 'xyflow.centerViewport';
|
|
1246
|
+
nodeId: NodeId;
|
|
1247
|
+
duration?: number;
|
|
1248
|
+
} | {
|
|
1249
|
+
type: 'xyflow.centerViewport';
|
|
1250
|
+
edgeId: EdgeId;
|
|
1251
|
+
duration?: number;
|
|
1253
1252
|
} | {
|
|
1254
1253
|
type: 'update.nodeData';
|
|
1255
1254
|
nodeId: NodeId;
|
|
@@ -1273,7 +1272,7 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
|
|
|
1273
1272
|
bounds: BBox_2;
|
|
1274
1273
|
} | {
|
|
1275
1274
|
type: 'update.inputs';
|
|
1276
|
-
inputs: Partial<Omit<Input, 'view' | 'xystore' | 'dynamicViewVariant'>>;
|
|
1275
|
+
inputs: Partial<Omit<Input, 'view' | 'xystore' | 'dynamicViewVariant' | 'features'>>;
|
|
1277
1276
|
} | {
|
|
1278
1277
|
type: 'update.features';
|
|
1279
1278
|
features: EnabledFeatures;
|
|
@@ -1330,6 +1329,14 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
|
|
|
1330
1329
|
direction: 'next' | 'previous';
|
|
1331
1330
|
} | {
|
|
1332
1331
|
type: 'walkthrough.end';
|
|
1332
|
+
} | {
|
|
1333
|
+
type: 'highlight.node';
|
|
1334
|
+
nodeId: NodeId;
|
|
1335
|
+
} | {
|
|
1336
|
+
type: 'highlight.edge';
|
|
1337
|
+
edgeId: EdgeId;
|
|
1338
|
+
} | {
|
|
1339
|
+
type: 'unhighlight.all';
|
|
1333
1340
|
} | {
|
|
1334
1341
|
type: 'notations.highlight';
|
|
1335
1342
|
notation: NodeNotation;
|
|
@@ -1692,7 +1699,7 @@ export declare const ElementNodeContainer: ForwardRefExoticComponent<{
|
|
|
1692
1699
|
[key: `data-${string}`]: string | undefined;
|
|
1693
1700
|
nodeProps: BaseNodePropsWithData<RequiredData_4>;
|
|
1694
1701
|
className?: string | undefined;
|
|
1695
|
-
style?:
|
|
1702
|
+
style?: MotionStyle | undefined;
|
|
1696
1703
|
} & MotionNodeLayoutOptions & {
|
|
1697
1704
|
children?: ReactNode | undefined;
|
|
1698
1705
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1702,16 +1709,16 @@ export declare type ElementNodeProps<A extends Any_5 = Unknown_3> = {
|
|
|
1702
1709
|
nodeModel: NodeModel.WithElement<A>;
|
|
1703
1710
|
};
|
|
1704
1711
|
|
|
1705
|
-
export declare function ElementShape({ data, width, height,
|
|
1712
|
+
export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): JSX.Element;
|
|
1706
1713
|
|
|
1707
1714
|
declare type ElementShapeProps = {
|
|
1708
|
-
data:
|
|
1715
|
+
data: RequiredData_5;
|
|
1709
1716
|
width?: number | undefined;
|
|
1710
1717
|
height?: number | undefined;
|
|
1711
1718
|
/**
|
|
1712
1719
|
* @default true
|
|
1713
1720
|
*/
|
|
1714
|
-
|
|
1721
|
+
showSelectionOutline?: boolean | undefined;
|
|
1715
1722
|
};
|
|
1716
1723
|
|
|
1717
1724
|
export declare const ElementTag: ForwardRefExoticComponent<{
|
|
@@ -1721,7 +1728,7 @@ export declare const ElementTag: ForwardRefExoticComponent<{
|
|
|
1721
1728
|
|
|
1722
1729
|
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => JSX.Element | null>;
|
|
1723
1730
|
|
|
1724
|
-
declare type ElementTagsProps = BaseNodePropsWithData<
|
|
1731
|
+
declare type ElementTagsProps = BaseNodePropsWithData<Data> & {
|
|
1725
1732
|
onTagClick?: (tag: `#${string}`) => void;
|
|
1726
1733
|
onTagMouseEnter?: (tag: `#${string}`) => void;
|
|
1727
1734
|
onTagMouseLeave?: (tag: `#${string}`) => void;
|
|
@@ -1815,7 +1822,7 @@ declare type Events_2 = {
|
|
|
1815
1822
|
} | {
|
|
1816
1823
|
type: 'fitDiagram';
|
|
1817
1824
|
duration?: number;
|
|
1818
|
-
bounds?:
|
|
1825
|
+
bounds?: BBox_3;
|
|
1819
1826
|
} | {
|
|
1820
1827
|
type: 'navigate.to';
|
|
1821
1828
|
subject: Fqn_3;
|
|
@@ -1879,7 +1886,7 @@ declare type Events_3 = {
|
|
|
1879
1886
|
} | {
|
|
1880
1887
|
type: 'fitDiagram';
|
|
1881
1888
|
duration?: number;
|
|
1882
|
-
bounds?:
|
|
1889
|
+
bounds?: BBox_3;
|
|
1883
1890
|
} | {
|
|
1884
1891
|
type: 'navigate.to';
|
|
1885
1892
|
params: {
|
|
@@ -1905,7 +1912,7 @@ declare type ExtractEvent<TEvent extends EventObject, TDescriptor extends EventD
|
|
|
1905
1912
|
|
|
1906
1913
|
export declare type FeatureName = typeof FeatureNames[number];
|
|
1907
1914
|
|
|
1908
|
-
declare const FeatureNames: readonly ["Controls", "Editor", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Vscode", "ElementTags"];
|
|
1915
|
+
declare const FeatureNames: readonly ["Controls", "Editor", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Notes", "Vscode", "ElementTags"];
|
|
1909
1916
|
|
|
1910
1917
|
declare type Fqn_2<A> = t.aux.Fqn<A>;
|
|
1911
1918
|
|
|
@@ -1915,10 +1922,8 @@ export declare const FramerMotionConfig: ({ reducedMotion, children, }: PropsWit
|
|
|
1915
1922
|
/**
|
|
1916
1923
|
* If true, will respect the device prefersReducedMotion setting by switching
|
|
1917
1924
|
* transform animations off.
|
|
1918
|
-
*
|
|
1919
|
-
* @public
|
|
1920
1925
|
*/
|
|
1921
|
-
reducedMotion?: "always" | "never" | "user";
|
|
1926
|
+
reducedMotion?: "always" | "never" | "user" | undefined;
|
|
1922
1927
|
}>) => JSX.Element;
|
|
1923
1928
|
|
|
1924
1929
|
declare type GetConcreteByKey<T, TKey extends keyof T, TValue extends T[TKey]> = T & Record<TKey, TValue>;
|
|
@@ -2035,6 +2040,7 @@ declare interface Input {
|
|
|
2035
2040
|
fitViewPadding: ViewPaddings;
|
|
2036
2041
|
where: WhereOperator | null;
|
|
2037
2042
|
dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
|
|
2043
|
+
features?: EnabledFeatures;
|
|
2038
2044
|
}
|
|
2039
2045
|
|
|
2040
2046
|
declare type Input_2 = {
|
|
@@ -2213,10 +2219,6 @@ declare namespace LayoutResult {
|
|
|
2213
2219
|
};
|
|
2214
2220
|
}
|
|
2215
2221
|
|
|
2216
|
-
export declare function LikeC4AdHocViewEditor({ service }: {
|
|
2217
|
-
service: AdhocViewService;
|
|
2218
|
-
}): JSX.Element;
|
|
2219
|
-
|
|
2220
2222
|
export declare interface LikeC4BrowserProps {
|
|
2221
2223
|
/**
|
|
2222
2224
|
* Background pattern for the browser view.
|
|
@@ -2291,6 +2293,12 @@ export declare interface LikeC4BrowserProps {
|
|
|
2291
2293
|
* @default true
|
|
2292
2294
|
*/
|
|
2293
2295
|
enableCompareWithLatest?: boolean | undefined;
|
|
2296
|
+
/**
|
|
2297
|
+
* Display element notes, if they are present in the view
|
|
2298
|
+
*
|
|
2299
|
+
* @default true
|
|
2300
|
+
*/
|
|
2301
|
+
enableNotes?: boolean | undefined;
|
|
2294
2302
|
/**
|
|
2295
2303
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
2296
2304
|
*
|
|
@@ -2317,7 +2325,7 @@ export declare type LikeC4ColorScheme = 'light' | 'dark';
|
|
|
2317
2325
|
*
|
|
2318
2326
|
* Use {@link ReactLikeC4} or {@link LikeC4View} for ready-to-use component
|
|
2319
2327
|
*/
|
|
2320
|
-
export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>): JSX.Element;
|
|
2328
|
+
export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, enableNotes, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>): JSX.Element;
|
|
2321
2329
|
|
|
2322
2330
|
export declare interface LikeC4DiagramEventHandlers<A extends Any_2 = Unknown> {
|
|
2323
2331
|
onNavigateTo?: OnNavigateTo<A> | null | undefined;
|
|
@@ -2469,6 +2477,12 @@ export declare interface LikeC4DiagramProperties<A extends Any_2 = Unknown> {
|
|
|
2469
2477
|
* @default false
|
|
2470
2478
|
*/
|
|
2471
2479
|
enableElementTags?: boolean | undefined;
|
|
2480
|
+
/**
|
|
2481
|
+
* Display element notes, if they are present in the view
|
|
2482
|
+
*
|
|
2483
|
+
* @default true
|
|
2484
|
+
*/
|
|
2485
|
+
enableNotes?: boolean | undefined;
|
|
2472
2486
|
/**
|
|
2473
2487
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
2474
2488
|
* Enable it if you have a large or static view
|
|
@@ -2480,6 +2494,8 @@ export declare interface LikeC4DiagramProperties<A extends Any_2 = Unknown> {
|
|
|
2480
2494
|
/**
|
|
2481
2495
|
* Render icon for an element, bundled or remote
|
|
2482
2496
|
* By default, if icon is http:// or https://, it will be rendered as an image
|
|
2497
|
+
*
|
|
2498
|
+
* Consider using `IconRendererProvider`
|
|
2483
2499
|
*/
|
|
2484
2500
|
renderIcon?: ElementIconRenderer | undefined;
|
|
2485
2501
|
/**
|
|
@@ -2545,10 +2561,10 @@ export declare type LikeC4EditorProviderProps = PropsWithChildren<{
|
|
|
2545
2561
|
/**
|
|
2546
2562
|
* Ensures LikeC4Model context
|
|
2547
2563
|
*/
|
|
2548
|
-
export declare function LikeC4ModelProvider
|
|
2564
|
+
export declare function LikeC4ModelProvider({ children, likec4model, }: PropsWithChildren<LikeC4ModelProviderProps>): JSX.Element;
|
|
2549
2565
|
|
|
2550
|
-
export declare interface LikeC4ModelProviderProps
|
|
2551
|
-
likec4model: LikeC4Model<
|
|
2566
|
+
export declare interface LikeC4ModelProviderProps {
|
|
2567
|
+
likec4model: LikeC4Model<any>;
|
|
2552
2568
|
}
|
|
2553
2569
|
|
|
2554
2570
|
declare type LikeC4ProjectsContext = {
|
|
@@ -2556,11 +2572,9 @@ declare type LikeC4ProjectsContext = {
|
|
|
2556
2572
|
onProjectChange: (id: ProjectId) => void;
|
|
2557
2573
|
};
|
|
2558
2574
|
|
|
2559
|
-
declare const LikeC4ProjectsContext: Context_4<LikeC4ProjectsContext | null>;
|
|
2560
|
-
|
|
2561
2575
|
export declare function LikeC4ProjectsOverview({ view, className, onNavigateToProject, ...props }: LikeC4ProjectsOverviewProps): JSX.Element;
|
|
2562
2576
|
|
|
2563
|
-
export declare type LikeC4ProjectsOverviewProps = Simplify<
|
|
2577
|
+
export declare type LikeC4ProjectsOverviewProps = Simplify<ProjectsOverviewProps & {
|
|
2564
2578
|
className?: string;
|
|
2565
2579
|
onSelectProject?: ProjectsOverviewProps['onNavigateToProject'];
|
|
2566
2580
|
}>;
|
|
@@ -2590,7 +2604,7 @@ export declare interface LikeC4ProjectsProviderProps {
|
|
|
2590
2604
|
*
|
|
2591
2605
|
* Component is wrapped in ShadowRoot to isolate styles.
|
|
2592
2606
|
*/
|
|
2593
|
-
export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, layoutType: initialLayoutType, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>): JSX.Element;
|
|
2607
|
+
export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, layoutType: initialLayoutType, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableNotes, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>): JSX.Element;
|
|
2594
2608
|
|
|
2595
2609
|
export declare interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
|
|
2596
2610
|
/**
|
|
@@ -2727,6 +2741,12 @@ export declare interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayo
|
|
|
2727
2741
|
* @default enableRelationshipDetails
|
|
2728
2742
|
*/
|
|
2729
2743
|
enableRelationshipBrowser?: boolean | undefined;
|
|
2744
|
+
/**
|
|
2745
|
+
* Display element notes, if they are present in the view
|
|
2746
|
+
*
|
|
2747
|
+
* @default false
|
|
2748
|
+
*/
|
|
2749
|
+
enableNotes?: boolean | undefined;
|
|
2730
2750
|
/**
|
|
2731
2751
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
2732
2752
|
*
|
|
@@ -3002,7 +3022,7 @@ declare type Observer<T> = {
|
|
|
3002
3022
|
*/
|
|
3003
3023
|
export declare type OnCanvasClick = (event: MouseEvent_2) => void;
|
|
3004
3024
|
|
|
3005
|
-
declare type OnCanvasContextMenu = (event: MouseEvent_2
|
|
3025
|
+
declare type OnCanvasContextMenu = (event: MouseEvent_2) => void;
|
|
3006
3026
|
|
|
3007
3027
|
export declare type OnEdgeClick<A extends Any_2 = Unknown> = (edge: DiagramEdge<A>, event: MouseEvent_2) => void;
|
|
3008
3028
|
|
|
@@ -3177,7 +3197,7 @@ declare type PickEmittedEvent<T> = T extends DiagramEmittedEvents['type'] ? Diag
|
|
|
3177
3197
|
* Picks appropriate bounds from the view,
|
|
3178
3198
|
* depending on its type and dynamic variant
|
|
3179
3199
|
*/
|
|
3180
|
-
export declare function pickViewBounds(view: LayoutedView, dynamicVariant?: DynamicViewDisplayVariant):
|
|
3200
|
+
export declare function pickViewBounds(view: LayoutedView, dynamicVariant?: DynamicViewDisplayVariant): BBox_2;
|
|
3181
3201
|
|
|
3182
3202
|
/**
|
|
3183
3203
|
* PortalToContainer is used to render elements outside the LikeC4DiagramXYFlow, but inside the container.
|
|
@@ -3422,6 +3442,13 @@ declare type RequiredData_4 = {
|
|
|
3422
3442
|
style?: ComputedNodeStyle;
|
|
3423
3443
|
};
|
|
3424
3444
|
|
|
3445
|
+
declare type RequiredData_5 = {
|
|
3446
|
+
shape: ElementShape_2;
|
|
3447
|
+
width: number;
|
|
3448
|
+
height: number;
|
|
3449
|
+
style?: ComputedNodeStyle;
|
|
3450
|
+
};
|
|
3451
|
+
|
|
3425
3452
|
declare type RequiredLogicInput<TLogic extends AnyActorLogic> = undefined extends InputFrom<TLogic> ? never : 'input';
|
|
3426
3453
|
|
|
3427
3454
|
declare type RequiredOrNull<T> = {
|
|
@@ -3468,11 +3495,17 @@ declare type SearchActorEvent = {
|
|
|
3468
3495
|
} | {
|
|
3469
3496
|
type: 'pickview.open';
|
|
3470
3497
|
elementFqn: Fqn;
|
|
3498
|
+
} | {
|
|
3499
|
+
type: 'navigate.to';
|
|
3500
|
+
viewId: ViewId;
|
|
3501
|
+
focusOnElement?: Fqn | undefined;
|
|
3502
|
+
} | {
|
|
3503
|
+
type: 'animation.presence.end';
|
|
3471
3504
|
} | {
|
|
3472
3505
|
type: 'pickview.close';
|
|
3473
3506
|
};
|
|
3474
3507
|
|
|
3475
|
-
declare interface SearchActorLogic extends StateMachine<SearchContext, SearchActorEvent, {}, any, any, any, any, 'inactive' | 'opened' | 'pickView', never, never, any, any, any, any> {
|
|
3508
|
+
declare interface SearchActorLogic extends StateMachine<SearchContext, SearchActorEvent, {}, any, any, any, any, 'inactive' | 'opened' | 'pickView' | 'waitAnimationEnd', never, never, any, any, any, any> {
|
|
3476
3509
|
}
|
|
3477
3510
|
|
|
3478
3511
|
declare interface SearchActorRef extends ActorRef<SearchActorSnapshot, SearchActorEvent> {
|
|
@@ -3484,6 +3517,10 @@ declare interface SearchContext {
|
|
|
3484
3517
|
openedWithSearch: string | null;
|
|
3485
3518
|
searchValue: string;
|
|
3486
3519
|
pickViewFor: Fqn | null;
|
|
3520
|
+
navigateTo: {
|
|
3521
|
+
viewId: ViewId;
|
|
3522
|
+
focusOnElement?: Fqn | undefined;
|
|
3523
|
+
} | null;
|
|
3487
3524
|
}
|
|
3488
3525
|
|
|
3489
3526
|
export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): JSX.Element;
|
|
@@ -3519,7 +3556,11 @@ declare const ShadowRoot_2: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElem
|
|
|
3519
3556
|
width: number;
|
|
3520
3557
|
height: number;
|
|
3521
3558
|
};
|
|
3522
|
-
|
|
3559
|
+
/**
|
|
3560
|
+
* Mantine theme override to apply within the shadow root
|
|
3561
|
+
* @see https://mantine.dev/theming/mantine-provider/#theme-prop
|
|
3562
|
+
*/
|
|
3563
|
+
theme?: any;
|
|
3523
3564
|
} & RefAttributes<HTMLDivElement>>;
|
|
3524
3565
|
export { ShadowRoot_2 as ShadowRoot }
|
|
3525
3566
|
|
|
@@ -4060,7 +4101,7 @@ declare type TransitionsConfig<TContext extends MachineContext, TEvent extends E
|
|
|
4060
4101
|
declare type TransitionTarget = SingleOrArray<string>;
|
|
4061
4102
|
|
|
4062
4103
|
export declare namespace Types {
|
|
4063
|
-
export type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
4104
|
+
export type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'notes' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
4064
4105
|
/**
|
|
4065
4106
|
* View layout direction, used by DefaultHandles to position node handles
|
|
4066
4107
|
*/
|
|
@@ -4109,7 +4150,7 @@ export declare namespace Types {
|
|
|
4109
4150
|
export type SequenceParallelAreaData = Simplify<LeafNodeData & {
|
|
4110
4151
|
parallelPrefix: string;
|
|
4111
4152
|
}>;
|
|
4112
|
-
export type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
4153
|
+
export type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'notes' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
4113
4154
|
/**
|
|
4114
4155
|
* View layout direction, used by DefaultHandles to position node handles
|
|
4115
4156
|
*/
|
|
@@ -4225,12 +4266,12 @@ declare type UnknownGuard = UnknownReferencedGuard | UnknownInlineGuard;
|
|
|
4225
4266
|
|
|
4226
4267
|
declare type UnknownInlineGuard = Guard<MachineContext, EventObject, undefined, ParameterizedObject>;
|
|
4227
4268
|
|
|
4228
|
-
declare type
|
|
4269
|
+
declare type UnknownLayouted = t.aux.UnknownLayouted;
|
|
4229
4270
|
|
|
4230
4271
|
declare type UnknownReferencedGuard = Guard<MachineContext, EventObject, ParameterizedObject['params'], ParameterizedObject>;
|
|
4231
4272
|
|
|
4232
4273
|
/**
|
|
4233
|
-
* @returns The callback to change current project.
|
|
4274
|
+
* @returns The callback to change current project, or a no-op if no LikeC4ProjectsProvider is found.
|
|
4234
4275
|
*/
|
|
4235
4276
|
export declare function useChangeLikeC4Project(): (id: ProjectId) => void;
|
|
4236
4277
|
|
|
@@ -4254,7 +4295,7 @@ export declare function useCurrentViewId(): ViewId;
|
|
|
4254
4295
|
*/
|
|
4255
4296
|
export declare function useCurrentViewModel(): CurrentViewModel;
|
|
4256
4297
|
|
|
4257
|
-
export declare function useDiagram(): DiagramApi
|
|
4298
|
+
export declare function useDiagram(): DiagramApi;
|
|
4258
4299
|
|
|
4259
4300
|
export declare function useDiagramActorRef(): DiagramActorRef;
|
|
4260
4301
|
|
|
@@ -4272,11 +4313,16 @@ export declare function useEnabledFeatures(): EnabledFeatures;
|
|
|
4272
4313
|
*/
|
|
4273
4314
|
export declare function useHasProjects(): boolean;
|
|
4274
4315
|
|
|
4316
|
+
/**
|
|
4317
|
+
* @returns The LikeC4Model from context.
|
|
4318
|
+
* @throws If no LikeC4ModelProvider is found.
|
|
4319
|
+
*/
|
|
4275
4320
|
export declare function useLikeC4Model<A extends Any_4 = t.aux.UnknownLayouted>(): LikeC4Model<A>;
|
|
4276
4321
|
|
|
4277
4322
|
/**
|
|
4278
4323
|
* Returns current LikeC4 project.
|
|
4279
|
-
* Requires
|
|
4324
|
+
* Requires LikeC4ModelProvider in the tree.
|
|
4325
|
+
* Falls back to model's project if LikeC4ProjectsProvider is not available.
|
|
4280
4326
|
*/
|
|
4281
4327
|
export declare function useLikeC4Project(): LikeC4Project;
|
|
4282
4328
|
|
|
@@ -4290,9 +4336,6 @@ export declare function useLikeC4ProjectId(): ProjectId;
|
|
|
4290
4336
|
*/
|
|
4291
4337
|
export declare function useLikeC4Projects(): ReadonlyArray<LikeC4Project>;
|
|
4292
4338
|
|
|
4293
|
-
/**
|
|
4294
|
-
* @returns The callback to change current project.
|
|
4295
|
-
*/
|
|
4296
4339
|
export declare function useLikeC4ProjectsContext(): LikeC4ProjectsContext;
|
|
4297
4340
|
|
|
4298
4341
|
export declare function useLikeC4Specification(): t.Specification<t.aux.UnknownLayouted>;
|
|
@@ -4314,13 +4357,12 @@ export declare function useOnDiagramEvent<T extends DiagramEmittedEvents['type']
|
|
|
4314
4357
|
once?: boolean;
|
|
4315
4358
|
}): void;
|
|
4316
4359
|
|
|
4317
|
-
/**
|
|
4318
|
-
* Returns the current view model from the context, or null if no view model is found.
|
|
4319
|
-
* @see useCurrentViewModel
|
|
4320
|
-
*/
|
|
4321
4360
|
export declare function useOptionalCurrentViewModel(): CurrentViewModel | null;
|
|
4322
4361
|
|
|
4323
|
-
|
|
4362
|
+
/**
|
|
4363
|
+
* @returns The LikeC4Model from context, or null if no LikeC4ModelProvider is found.
|
|
4364
|
+
*/
|
|
4365
|
+
export declare function useOptionalLikeC4Model<A extends t.aux.Any = UnknownLayouted>(): LikeC4Model<A> | null;
|
|
4324
4366
|
|
|
4325
4367
|
/**
|
|
4326
4368
|
* Differs from useState in that:
|
|
@@ -4389,7 +4431,7 @@ declare type ViewId_4<A> = t.aux.ViewId<A>;
|
|
|
4389
4431
|
*/
|
|
4390
4432
|
export declare type ViewPadding = PaddingWithUnit | ViewPaddings;
|
|
4391
4433
|
|
|
4392
|
-
declare type ViewPaddings = {
|
|
4434
|
+
export declare type ViewPaddings = {
|
|
4393
4435
|
top?: PaddingWithUnit;
|
|
4394
4436
|
right?: PaddingWithUnit;
|
|
4395
4437
|
bottom?: PaddingWithUnit;
|