likec4 1.58.0 → 1.59.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 (63) hide show
  1. package/__app__/codegen/webcomponent.mjs +14 -14
  2. package/__app__/src/chunks/AIChat.mjs +153 -156
  3. package/__app__/src/chunks/LikeC4Styles.mjs +1553 -1255
  4. package/__app__/src/chunks/ProjectsOverview.mjs +127 -130
  5. package/__app__/src/chunks/hooks.mjs +419 -106
  6. package/__app__/src/chunks/libs/@floating-ui.mjs +8 -8
  7. package/__app__/src/chunks/libs/@mantine.mjs +3039 -2135
  8. package/__app__/src/chunks/libs/@tanstack-ai.mjs +4 -4
  9. package/__app__/src/chunks/libs/@tanstack.mjs +93 -118
  10. package/__app__/src/chunks/libs/@xstate/react.mjs +30 -16
  11. package/__app__/src/chunks/libs/@xyflow/react.mjs +50 -26
  12. package/__app__/src/chunks/libs/bezier-js.mjs +11 -8
  13. package/__app__/src/chunks/libs/framer.mjs +1188 -1155
  14. package/__app__/src/chunks/libs/zod.mjs +191 -188
  15. package/__app__/src/chunks/rolldown-runtime.mjs +8 -1
  16. package/__app__/src/chunks/styled-system.mjs +23 -16
  17. package/__app__/src/main.mjs +22275 -9432
  18. package/__app__/src/style.css +1 -1
  19. package/dist/chunks/dist.mjs +10 -0
  20. package/dist/chunks/enableServer.mjs +1 -1
  21. package/dist/chunks/index.d.mts +9 -9
  22. package/dist/chunks/index2.d.mts +386 -229
  23. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  24. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  25. package/dist/chunks/libs/@logtape/logtape.mjs +3 -3
  26. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  27. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  28. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  29. package/dist/chunks/libs/chevrotain.mjs +4 -4
  30. package/dist/chunks/libs/json5.mjs +1 -1
  31. package/dist/chunks/libs/langium.d.mts +2940 -2914
  32. package/dist/chunks/libs/langium.mjs +9 -9
  33. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  34. package/dist/chunks/libs/p-queue.mjs +1 -1
  35. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  36. package/dist/chunks/libs/pako.mjs +1 -1
  37. package/dist/chunks/libs/picomatch.mjs +1 -1
  38. package/dist/chunks/libs/remeda.mjs +1 -1
  39. package/dist/chunks/libs/unstorage.d.mts +1 -0
  40. package/dist/chunks/libs/which.mjs +1 -1
  41. package/dist/chunks/libs/zod.d.mts +48 -36
  42. package/dist/chunks/libs/zod.mjs +4 -4
  43. package/dist/chunks/logger.mjs +1 -0
  44. package/dist/chunks/node.mjs +57 -66
  45. package/dist/chunks/rolldown-runtime.mjs +1 -1
  46. package/dist/chunks/sequence-view.mjs +1 -1
  47. package/dist/chunks/vite-plugin.mjs +43 -43
  48. package/dist/cli/index.mjs +159 -157
  49. package/dist/index.d.mts +2 -3
  50. package/dist/index.mjs +1 -1
  51. package/dist/model/index.d.mts +5 -4
  52. package/dist/vite-plugin/index.d.mts +6 -9
  53. package/dist/vite-plugin/internal/index.d.mts +15 -10
  54. package/package.json +37 -37
  55. package/react/index.d.mts +761 -111
  56. package/react/index.mjs +13974 -10232
  57. package/__app__/src/chunks/DiagramActorProvider.mjs +0 -7638
  58. package/__app__/src/chunks/Markdown.mjs +0 -146
  59. package/__app__/src/chunks/NavigationPanel.mjs +0 -61
  60. package/__app__/src/chunks/adhoc-editor.mjs +0 -3386
  61. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +0 -1894
  62. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +0 -252
  63. package/__app__/src/chunks/libs/remeda.mjs +0 -642
package/react/index.d.mts CHANGED
@@ -2,13 +2,14 @@ import { Any } from '@likec4/core/types';
2
2
  import { AutoLayoutDirection } from '@likec4/core/types';
3
3
  import { aux } from '@likec4/core/types';
4
4
  import { BBox } from '@likec4/core/types';
5
- import { BBox as BBox_2 } from '@likec4/core/geometry';
6
- import { BBox as BBox_3 } from '@likec4/core';
5
+ import { BBox as BBox_2 } from '@likec4/core';
6
+ import { BBox as BBox_3 } from '@likec4/core/geometry';
7
7
  import { CamelCasedProperties } from 'type-fest';
8
8
  import { Color } from '@likec4/core/types';
9
+ import { ComponentType } from 'react';
9
10
  import { ComputedNodeStyle } from '@likec4/core/types';
10
11
  import { ComputedNodeStyle as ComputedNodeStyle_2 } from '@likec4/core';
11
- import { Context as Context_4 } from 'react';
12
+ import { Context as Context_5 } from 'react';
12
13
  import { ControlButton } from '@xyflow/react';
13
14
  import { CSSProperties } from 'react';
14
15
  import { DependencyList } from 'react';
@@ -19,17 +20,19 @@ import { DiagramNode } from '@likec4/core/types';
19
20
  import { DiagramNodeDriftReason } from '@likec4/core/types';
20
21
  import { DiagramView } from '@likec4/core/types';
21
22
  import { DynamicViewDisplayVariant } from '@likec4/core/types';
23
+ import { DynamicViewFlow } from '@likec4/core/types';
22
24
  import { Edge } from '@xyflow/react';
23
- import { EdgeChange } from '@xyflow/system';
24
- import { EdgeChange as EdgeChange_2 } from '@xyflow/react';
25
- import { EdgeId } from '@likec4/core/types';
26
- import { EdgeId as EdgeId_2 } from '@likec4/core';
25
+ import { EdgeChange } from '@xyflow/react';
26
+ import { EdgeChange as EdgeChange_2 } from '@xyflow/system';
27
+ import { EdgeId } from '@likec4/core';
28
+ import { EdgeId as EdgeId_2 } from '@likec4/core/types';
27
29
  import { EdgeProps } from '@xyflow/react';
28
30
  import { EffectCallback } from 'react';
29
31
  import { ElementKind } from '@likec4/core/types';
30
32
  import { ElementProps } from '@mantine/core';
31
33
  import { ElementShape as ElementShape_2 } from '@likec4/core/types';
32
34
  import { ElementStyle } from '@likec4/core/types';
35
+ import { ErrorInfo } from 'react';
33
36
  import { Except } from 'type-fest';
34
37
  import { ExclusiveUnion } from '@likec4/core/types';
35
38
  import { ExclusiveUnion as ExclusiveUnion_2 } from '@likec4/core';
@@ -63,8 +66,8 @@ import { MotionStyle } from 'motion/react';
63
66
  import { MouseEvent as MouseEvent_2 } from 'react';
64
67
  import { NavigationPanelRecipe } from '../../styled-system/recipes';
65
68
  import { Node as Node_2 } from '@xyflow/react';
66
- import { NodeChange } from '@xyflow/system';
67
- import { NodeChange as NodeChange_2 } from '@xyflow/react';
69
+ import { NodeChange } from '@xyflow/react';
70
+ import { NodeChange as NodeChange_2 } from '@xyflow/system';
68
71
  import { NodeId } from '@likec4/core/types';
69
72
  import { NodeId as NodeId_3 } from '@likec4/core';
70
73
  import { NodeModel } from '@likec4/core/model';
@@ -96,7 +99,7 @@ import { RichTextOrEmpty } from '@likec4/core/types';
96
99
  import { SetRequired } from 'type-fest';
97
100
  import { Simplify } from 'type-fest';
98
101
  import { SimplifyDeep } from 'type-fest';
99
- import { StepEdgeId } from '@likec4/core/types';
102
+ import { StepPath } from '@likec4/core/types';
100
103
  import { StyleContextConsumer } from '../../styled-system/jsx';
101
104
  import { StyleContextProvider } from '../../styled-system/jsx';
102
105
  import type * as t from '@likec4/core/types';
@@ -360,6 +363,39 @@ in TInput = NonReducibleUnknown, TSystem extends AnyActorSystem = AnyActorSystem
360
363
  getPersistedSnapshot: (snapshot: TSnapshot, options?: unknown) => Snapshot<unknown>;
361
364
  }
362
365
 
366
+ declare const _actorLogic: StateMachine<Context_4, Events_4, {}, never, never, {
367
+ type: "was opened on hover";
368
+ params: unknown;
369
+ } | {
370
+ type: "has search query";
371
+ params: unknown;
372
+ } | {
373
+ type: "search query is empty";
374
+ params: unknown;
375
+ }, "open timeout" | "close timeout", "pending" | "idle" | {
376
+ active: "search" | "opened" | "decide" | "closing";
377
+ }, "active", Input_3, NonReducibleUnknown, EventObject, MetaObject, {
378
+ id: "navigationPanel";
379
+ states: {
380
+ readonly idle: {
381
+ id: "idle";
382
+ };
383
+ readonly pending: {};
384
+ readonly active: {
385
+ states: {
386
+ readonly decide: {};
387
+ readonly opened: {};
388
+ readonly search: {};
389
+ readonly closing: {};
390
+ };
391
+ };
392
+ };
393
+ }>;
394
+
395
+ declare type ActorLogicMap = {
396
+ [K in keyof ChildrenActors]: ActorRefFromLogic<ChildrenActors[K]> | undefined;
397
+ };
398
+
363
399
  declare interface ActorOptions<TLogic extends AnyActorLogic> {
364
400
  /**
365
401
  * The clock that is responsible for setting and clearing timeouts, such as
@@ -518,6 +554,22 @@ declare type ActorRefFromLogic<T extends AnyActorLogic> = ActorRef<SnapshotFrom<
518
554
 
519
555
  declare type ActorRefLike = Pick<AnyActorRef, 'sessionId' | 'send' | 'getSnapshot'>;
520
556
 
557
+ declare const actors: {
558
+ hotkey: HotkeyActorLogic;
559
+ overlays: OverlaysActorLogic;
560
+ search: SearchActorLogic;
561
+ mediaPrint: MediaPrintActorLogic;
562
+ editor: EditorActorLogic;
563
+ navigationPanel: NavigationPanelActorLogic;
564
+ };
565
+
566
+ declare const actors_2: {
567
+ hotkey: HotkeyActorLogic_2;
568
+ applyLatest: PromiseActorLogic<EditorCalls.ApplyLatestToManual.Output, EditorCalls.ApplyLatestToManual.Input, EventObject>;
569
+ executeChange: PromiseActorLogic<EditorCalls.ExecuteChange.Output, EditorCalls.ExecuteChange.Input, EventObject>;
570
+ applySemanticLayout: PromiseActorLogic<EditorCalls.ApplySemanticLayout.Output, EditorCalls.ApplySemanticLayout.Input, EventObject>;
571
+ };
572
+
521
573
  declare interface ActorScope<TSnapshot extends Snapshot<unknown>, TEvent extends EventObject, TSystem extends AnyActorSystem = AnyActorSystem, TEmitted extends EventObject = EventObject> {
522
574
  self: ActorRef<TSnapshot, TEvent, TEmitted>;
523
575
  id: string;
@@ -605,6 +657,12 @@ export declare namespace Base {
605
657
  export type Dimmed = 'immediate' | boolean;
606
658
  }
607
659
 
660
+ /**
661
+ * Here is a trick to reduce inference types
662
+ */
663
+ declare interface BaseDiagramMachineLogic<Actors extends Partial<ActorLogicMap> = ActorLogicMap, State extends StateValue = never> extends StateMachine<DiagramContext, DiagramEvents, Actors & Omit<ActorLogicMap, keyof Actors>, ChildrenActor, never, never, never, State, never, Input_4, never, DiagramEmittedEvents, never, never> {
664
+ }
665
+
608
666
  export declare interface BaseEdge<Data extends Record<string, unknown> = Record<string, unknown>, EdgeType extends string = string> extends SetRequired<Edge<Data & BaseEdgeData, EdgeType>, 'type' | 'data'> {
609
667
  }
610
668
 
@@ -632,6 +690,14 @@ export declare interface BaseEdgeProps<E extends BaseEdge = BaseEdge> extends Ed
632
690
 
633
691
  export declare type BaseEdgePropsWithData<Data extends Record<string, unknown>> = BaseEdgeProps<BaseEdge<Data>>;
634
692
 
693
+ /**
694
+ * to workaround circular dependency issue between editor and diagram packages
695
+ */
696
+ declare interface BaseEditorActorLogic<State extends StateValue = any> extends StateMachine<EditorActorContext, EditorActorEvent, inferChildrenRef<typeof actors_2>, inferProvidedActor<typeof actors_2>, never, never, never, State, EditorActorStateTag, EditorActorInput, never, EditorActorEmitedEvent, never, never> {
697
+ }
698
+
699
+ declare type BaseEditorActorRef = ActorRefFromLogic<BaseEditorActorLogic>;
700
+
635
701
  declare interface BaseInspectionEventProperties {
636
702
  rootId: string;
637
703
  /**
@@ -666,15 +732,32 @@ export declare interface BaseNodeProps<N extends BaseNode = BaseNode> extends No
666
732
 
667
733
  export declare type BaseNodePropsWithData<Data extends Record<string, unknown>> = BaseNodeProps<BaseNode<Data>>;
668
734
 
735
+ declare type CallbackActorLogic<TEvent extends EventObject, TInput = NonReducibleUnknown, TEmitted extends EventObject = EventObject> = ActorLogic<CallbackSnapshot<TInput>, TEvent, TInput, AnyActorSystem, TEmitted>;
736
+
737
+ declare type CallbackSnapshot<TInput> = Snapshot<undefined> & {
738
+ input: TInput;
739
+ };
740
+
741
+ declare type ChildrenActor = {
742
+ [K in keyof ChildrenActors]: {
743
+ id: K;
744
+ logic: ChildrenActors[K];
745
+ src: K;
746
+ };
747
+ }[keyof ChildrenActors];
748
+
749
+ declare type ChildrenActors = typeof actors;
750
+
669
751
  declare interface Clock {
670
752
  setTimeout(fn: (...args: any[]) => void, timeout: number): any;
671
753
  clearTimeout(id: any): void;
672
754
  }
673
755
 
674
- export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): JSX.Element;
756
+ export declare function CompoundActionButton({ selected, data: { hovered: isHovered, }, icon, ariaLabel, onClick, }: CompoundActionButtonProps): JSX.Element;
675
757
 
676
758
  declare type CompoundActionButtonProps = Simplify<BaseNodeProps & {
677
759
  icon?: ReactNode;
760
+ ariaLabel?: string;
678
761
  onClick: (e: MouseEvent_2) => void;
679
762
  }>;
680
763
 
@@ -725,10 +808,11 @@ export declare type CompoundDeploymentNodeProps<A extends Any_5 = Unknown_3> = {
725
808
 
726
809
  export declare function CompoundDeploymentToolbar(props: Types.NodeProps<'compound-deployment'>): JSX.Element;
727
810
 
728
- export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): JSX.Element;
811
+ export declare function CompoundDetailsButton({ selected, data: { hovered: isHovered, }, icon, ariaLabel, onClick, }: CompoundDetailsButtonProps): JSX.Element;
729
812
 
730
813
  declare type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
731
814
  icon?: ReactNode;
815
+ ariaLabel?: string;
732
816
  onClick: (e: MouseEvent_2) => void;
733
817
  }>;
734
818
 
@@ -791,10 +875,16 @@ declare type CompoundNodeContainerProps = PropsWithChildren<HTMLAttributes<HTMLD
791
875
  nodeProps: BaseNodeProps<BaseNode<RequiredData>>;
792
876
  }>;
793
877
 
794
- export declare function CompoundTitle({ data }: CompoundTitleProps): JSX.Element;
878
+ export declare function CompoundTitle({ data, 'aria-hidden': ariaHidden }: CompoundTitleProps): JSX.Element;
795
879
 
796
880
  declare type CompoundTitleProps = {
797
881
  data: RequiredData_2;
882
+ /**
883
+ * Opt-in: hide the title from assistive technologies. The main diagram sets
884
+ * this because the compound node's accessible label already conveys the
885
+ * title, so re-exposing it here would cause a duplicate announcement.
886
+ */
887
+ 'aria-hidden'?: boolean | undefined;
798
888
  };
799
889
 
800
890
  declare type Compute<A> = {
@@ -820,7 +910,7 @@ declare interface Context_2 {
820
910
  enableSelectSubject: boolean;
821
911
  enableChangeScope: boolean;
822
912
  xyflow: XYFLowInstance | null;
823
- xystore: XYStoreApi_2 | null;
913
+ xystore: XYStoreApi | null;
824
914
  layouted: LayoutRelationshipsViewResult | null;
825
915
  navigateFromNode: string | null;
826
916
  xynodes: RelationshipsBrowserTypes.Node[];
@@ -831,16 +921,37 @@ declare type Context_3 = Readonly<{
831
921
  subject: Subject;
832
922
  viewId: ViewId_3;
833
923
  xyflow: XYFLowInstance_2 | null;
834
- xystore: XYStoreApi_3 | null;
924
+ xystore: XYStoreApi_2 | null;
835
925
  initialized: {
836
926
  xydata: boolean;
837
927
  xyflow: boolean;
838
928
  };
839
929
  xynodes: RelationshipDetailsTypes.Node[];
840
930
  xyedges: RelationshipDetailsTypes.Edge[];
841
- bounds: BBox_3;
931
+ bounds: BBox_2;
842
932
  }>;
843
933
 
934
+ declare function Context_4({ input }: {
935
+ input: Input_3;
936
+ }): Context_4;
937
+
938
+ declare interface Context_4 {
939
+ view: LayoutedView;
940
+ viewModel: CurrentViewModel | null;
941
+ /**
942
+ * Who activated the dropdown
943
+ * (if `click` then the dropdown is always open until dismissed)
944
+ * @default 'hover'
945
+ */
946
+ activatedBy: 'hover' | 'click';
947
+ /**
948
+ * The folder that is currently selected in the dropdown
949
+ * By default it is the root
950
+ */
951
+ selectedFolder: string;
952
+ searchQuery: string;
953
+ }
954
+
844
955
  declare type ContextFactory<TContext extends MachineContext, TActor extends ProvidedActor, TInput, TEvent extends EventObject = EventObject> = ({ spawn, input, self }: {
845
956
  spawn: Spawner<TActor>;
846
957
  input: TInput;
@@ -915,7 +1026,7 @@ export declare const DeploymentElementActions: ({ extraButtons, ...props }: Depl
915
1026
 
916
1027
  declare type DeploymentElementActionsProps = SimplifyDeep<{
917
1028
  selected?: boolean;
918
- data: Pick<Types.DeploymentElementNodeData, 'id' | 'modelFqn' | 'navigateTo'> & BaseNodeData;
1029
+ data: Pick<Types.DeploymentElementNodeData, 'id' | 'modelFqn' | 'navigateTo' | 'title'> & BaseNodeData;
919
1030
  }> & WithExtraButtons;
920
1031
 
921
1032
  export declare function DeploymentElementToolbar(props: Types.NodeProps<'deployment'>): JSX.Element;
@@ -983,25 +1094,24 @@ export declare interface DiagramActorRef extends DiagramMachineRef {
983
1094
  system: System;
984
1095
  }
985
1096
 
986
- export declare type DiagramActorSnapshot = MachineSnapshot<DiagramContext, DiagramEvents, {
987
- overlays: OverlaysActorRef | undefined;
988
- search: SearchActorRef | undefined;
989
- editor: EditorActorRef | undefined;
990
- }, any, any, any, {}, {}>;
1097
+ export declare type DiagramActorSnapshot = SnapshotFrom<DiagramMachineLogic>;
991
1098
 
992
- export declare interface DiagramApi<A extends Any_3 = Unknown_2> {
1099
+ export declare class DiagramApi<A extends Any_3 = Unknown_2> {
1100
+ private static cache;
1101
+ static withActor(actorRef: RefObject<DiagramActorRef>): DiagramApi;
993
1102
  /**
994
1103
  * React ref to the diagram actor
995
1104
  */
996
1105
  readonly ref: RefObject<DiagramActorRef>;
1106
+ private constructor();
997
1107
  /**
998
1108
  * @warning Do not use in render phase
999
1109
  */
1000
- readonly actor: DiagramActorRef;
1110
+ get actor(): DiagramActorRef;
1001
1111
  /**
1002
1112
  * @warning Do not use in render phase
1003
1113
  */
1004
- readonly currentView: t.DiagramView<A>;
1114
+ get currentView(): t.DiagramView<A>;
1005
1115
  /**
1006
1116
  * Editor actor reference
1007
1117
  * @warning Do not use in render phase
@@ -1043,7 +1153,7 @@ export declare interface DiagramApi<A extends Any_3 = Unknown_2> {
1043
1153
  /**
1044
1154
  * If running in editor, trigger opening source file
1045
1155
  */
1046
- openSource(params: OpenSourceParams<A>): void;
1156
+ openSource(params: OpenSourceParams<Unknown_2>): void;
1047
1157
  /**
1048
1158
  * Open element details card
1049
1159
  */
@@ -1110,21 +1220,31 @@ export declare interface DiagramApi<A extends Any_3 = Unknown_2> {
1110
1220
  * @warning Do not use in render phase
1111
1221
  */
1112
1222
  findDiagramEdge(xyedgeId: string): t.DiagramEdge<A> | null;
1113
- startWalkthrough(): void;
1114
- walkthroughStep(direction?: 'next' | 'previous'): void;
1223
+ startWalkthrough(stepId?: t.StepPath): void;
1224
+ walkthroughStep(value?: 'next' | 'prev' | {
1225
+ step: t.StepPath;
1226
+ }): void;
1115
1227
  stopWalkthrough(): void;
1116
- toggleFeature(feature: FeatureName, forceValue?: boolean): void;
1228
+ toggleFeature(feature: TogglableFeature, forceValue?: boolean): void;
1117
1229
  highlightNotation(notation: NodeNotation, kind?: string): void;
1118
1230
  unhighlightNotation(): void;
1119
1231
  openSearch(searchValue?: string): void;
1120
- triggerChange(viewChange: ViewChange): void;
1232
+ triggerChange(change: ViewChange): void;
1121
1233
  /**
1122
1234
  * Switch dynamic view display variant
1123
1235
  */
1124
1236
  switchDynamicViewVariant(variant: DynamicViewDisplayVariant): void;
1237
+ /**
1238
+ * Toggle sequence flow collapse/expand
1239
+ */
1240
+ toggleSequenceFlow(flowId: t.StepPath): void;
1125
1241
  }
1126
1242
 
1127
- export declare interface DiagramContext extends Input {
1243
+ export declare function DiagramContext({ input }: {
1244
+ input: Input_4;
1245
+ }): DiagramContext;
1246
+
1247
+ export declare interface DiagramContext extends Input_4 {
1128
1248
  xynodes: Types.Node[];
1129
1249
  xyedges: Types.Edge[];
1130
1250
  features: EnabledFeatures;
@@ -1167,8 +1287,12 @@ export declare interface DiagramContext extends Input {
1167
1287
  xyflow: XYFlowInstance | null;
1168
1288
  dynamicViewVariant: DynamicViewDisplayVariant;
1169
1289
  activeWalkthrough: null | {
1170
- stepId: StepEdgeId;
1171
- parallelPrefix: string | null;
1290
+ stepId: StepPath;
1291
+ activeFlow: StepPath | null;
1292
+ outlinePanelWidth: number;
1293
+ };
1294
+ collapsedSequenceFlows: {
1295
+ [flowId: StepPath]: boolean;
1172
1296
  };
1173
1297
  }
1174
1298
 
@@ -1205,6 +1329,7 @@ export declare type DiagramEmittedEvents = {
1205
1329
  } | {
1206
1330
  type: 'walkthroughStep';
1207
1331
  edge: Types.Edge;
1332
+ stepId: StepPath;
1208
1333
  } | {
1209
1334
  type: 'walkthroughStopped';
1210
1335
  } | {
@@ -1223,8 +1348,8 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1223
1348
  instance: XYFlowInstance;
1224
1349
  } | {
1225
1350
  type: 'xyflow.applyChanges';
1226
- edges?: EdgeChange<Types.Edge>[];
1227
- nodes?: NodeChange<Types.Node>[];
1351
+ edges?: EdgeChange_2<Types.Edge>[];
1352
+ nodes?: NodeChange_2<Types.Node>[];
1228
1353
  } | {
1229
1354
  type: 'xyflow.viewportMoved';
1230
1355
  viewport: Viewport;
@@ -1246,10 +1371,10 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1246
1371
  type: 'xyflow.resized';
1247
1372
  } | {
1248
1373
  type: 'xyflow.nodeMouseEnter';
1249
- node: Types.Node;
1374
+ node: Types.Node | NodeId;
1250
1375
  } | {
1251
1376
  type: 'xyflow.nodeMouseLeave';
1252
- node: Types.Node;
1377
+ node: Types.Node | NodeId;
1253
1378
  } | {
1254
1379
  type: 'xyflow.edgeMouseEnter';
1255
1380
  edge: Types.Edge;
@@ -1261,7 +1386,7 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1261
1386
  } | {
1262
1387
  type: 'xyflow.fitDiagram';
1263
1388
  duration?: number;
1264
- bounds?: BBox_2;
1389
+ bounds?: BBox_3;
1265
1390
  } | {
1266
1391
  type: 'xyflow.setViewport';
1267
1392
  duration?: number;
@@ -1272,15 +1397,17 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1272
1397
  duration?: number;
1273
1398
  } | {
1274
1399
  type: 'xyflow.centerViewport';
1275
- edgeId: EdgeId;
1400
+ edgeId: EdgeId_2;
1276
1401
  duration?: number;
1402
+ } | {
1403
+ type: 'xyflow.resetSelection';
1277
1404
  } | {
1278
1405
  type: 'update.nodeData';
1279
1406
  nodeId: NodeId;
1280
1407
  data: PartialDeep<Types.NodeData>;
1281
1408
  } | {
1282
1409
  type: 'update.edgeData';
1283
- edgeId: EdgeId;
1410
+ edgeId: EdgeId_2;
1284
1411
  data: PartialDeep<Types.EdgeData>;
1285
1412
  } | {
1286
1413
  type: 'update.view';
@@ -1294,10 +1421,10 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1294
1421
  xyedges: Types.Edge[];
1295
1422
  } | {
1296
1423
  type: 'update.view-bounds';
1297
- bounds: BBox_2;
1424
+ bounds: BBox_3;
1298
1425
  } | {
1299
1426
  type: 'update.inputs';
1300
- inputs: Partial<Omit<Input, 'view' | 'xystore' | 'dynamicViewVariant' | 'features'>>;
1427
+ inputs: Partial<Omit<Input_4, 'view' | 'xystore' | 'dynamicViewVariant' | 'features'>>;
1301
1428
  } | {
1302
1429
  type: 'update.features';
1303
1430
  features: EnabledFeatures;
@@ -1310,7 +1437,7 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1310
1437
  } | {
1311
1438
  type: 'open.relationshipDetails';
1312
1439
  params: {
1313
- edgeId: EdgeId;
1440
+ edgeId: EdgeId_2;
1314
1441
  } | {
1315
1442
  source: Fqn;
1316
1443
  target: Fqn;
@@ -1348,18 +1475,34 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1348
1475
  variant: DynamicViewDisplayVariant;
1349
1476
  } | {
1350
1477
  type: 'walkthrough.start';
1351
- stepId?: StepEdgeId;
1478
+ stepId?: StepPath | undefined;
1479
+ } | {
1480
+ type: 'walkthrough.step';
1481
+ direction: 'next' | 'prev';
1482
+ stepId?: never;
1352
1483
  } | {
1353
1484
  type: 'walkthrough.step';
1354
- direction: 'next' | 'previous';
1485
+ stepId: StepPath;
1486
+ direction?: never;
1355
1487
  } | {
1356
1488
  type: 'walkthrough.end';
1489
+ } | {
1490
+ type: 'sequence.flow.collapse';
1491
+ flowId: StepPath;
1492
+ } | {
1493
+ type: 'sequence.flow.expand';
1494
+ flowId: StepPath;
1495
+ } | {
1496
+ type: 'sequence.flow.toggle';
1497
+ flowId: StepPath;
1498
+ } | {
1499
+ type: 'sequence.walkthrough.end';
1357
1500
  } | {
1358
1501
  type: 'highlight.node';
1359
1502
  nodeId: NodeId;
1360
1503
  } | {
1361
1504
  type: 'highlight.edge';
1362
- edgeId: EdgeId;
1505
+ edgeId: EdgeId_2;
1363
1506
  } | {
1364
1507
  type: 'unhighlight.all';
1365
1508
  } | {
@@ -1387,6 +1530,152 @@ export declare type DiagramEvents = HotKeyEvent | MediaPrintEvent | {
1387
1530
  type: 'destroy';
1388
1531
  };
1389
1532
 
1533
+ declare const _diagramMachine: StateMachine<DiagramContext, DiagramEvents, {
1534
+ search?: ActorRefFromLogic<SearchActorLogic>;
1535
+ hotkey?: ActorRefFromLogic<HotkeyActorLogic>;
1536
+ overlays?: ActorRefFromLogic<OverlaysActorLogic>;
1537
+ mediaPrint?: ActorRefFromLogic<MediaPrintActorLogic>;
1538
+ editor?: ActorRefFromLogic<EditorActorLogic>;
1539
+ navigationPanel?: ActorRefFromLogic<NavigationPanelActorLogic>;
1540
+ }, {
1541
+ src: "search";
1542
+ logic: SearchActorLogic;
1543
+ id: "search";
1544
+ } | {
1545
+ src: "hotkey";
1546
+ logic: HotkeyActorLogic;
1547
+ id: "hotkey";
1548
+ } | {
1549
+ src: "overlays";
1550
+ logic: OverlaysActorLogic;
1551
+ id: "overlays";
1552
+ } | {
1553
+ src: "mediaPrint";
1554
+ logic: MediaPrintActorLogic;
1555
+ id: "mediaPrint";
1556
+ } | {
1557
+ src: "editor";
1558
+ logic: EditorActorLogic;
1559
+ id: "editor";
1560
+ } | {
1561
+ src: "navigationPanel";
1562
+ logic: NavigationPanelActorLogic;
1563
+ id: "navigationPanel";
1564
+ }, never, {
1565
+ type: "isReady";
1566
+ params: unknown;
1567
+ } | {
1568
+ type: "enabled: Editor";
1569
+ params: unknown;
1570
+ } | {
1571
+ type: "enabled: FitView";
1572
+ params: unknown;
1573
+ } | {
1574
+ type: "enabled: FocusMode";
1575
+ params: unknown;
1576
+ } | {
1577
+ type: "enabled: Readonly";
1578
+ params: unknown;
1579
+ } | {
1580
+ type: "enabled: RelationshipDetails";
1581
+ params: unknown;
1582
+ } | {
1583
+ type: "enabled: Search";
1584
+ params: unknown;
1585
+ } | {
1586
+ type: "enabled: ElementDetails";
1587
+ params: unknown;
1588
+ } | {
1589
+ type: "enabled: OpenSource";
1590
+ params: unknown;
1591
+ } | {
1592
+ type: "enabled: DynamicViewWalkthrough";
1593
+ params: unknown;
1594
+ } | {
1595
+ type: "enabled: NavigationPanel";
1596
+ params: unknown;
1597
+ } | {
1598
+ type: "focus.node: autoUnfocus";
1599
+ params: unknown;
1600
+ } | {
1601
+ type: "enabled: Overlays";
1602
+ params: unknown;
1603
+ } | {
1604
+ type: "not readonly";
1605
+ params: unknown;
1606
+ } | {
1607
+ type: "is dynamic view";
1608
+ params: unknown;
1609
+ } | {
1610
+ type: "is dynamic view in sequence variant";
1611
+ params: unknown;
1612
+ } | {
1613
+ type: "is same view";
1614
+ params: unknown;
1615
+ } | {
1616
+ type: "is another view";
1617
+ params: unknown;
1618
+ } | {
1619
+ type: "click: node has modelFqn";
1620
+ params: unknown;
1621
+ } | {
1622
+ type: "click: selected node";
1623
+ params: unknown;
1624
+ } | {
1625
+ type: "click: same node";
1626
+ params: unknown;
1627
+ } | {
1628
+ type: "click: focused node";
1629
+ params: unknown;
1630
+ } | {
1631
+ type: "click: node.type = seq-subflow";
1632
+ params: unknown;
1633
+ } | {
1634
+ type: "click: node has connections";
1635
+ params: unknown;
1636
+ } | {
1637
+ type: "click: selected edge";
1638
+ params: unknown;
1639
+ } | {
1640
+ type: "click: active walkthrough step";
1641
+ params: unknown;
1642
+ }, never, "final" | "isReady" | "navigating" | "initializing" | {
1643
+ ready: "idle" | "walkthrough" | "focused" | "printing";
1644
+ }, string, Input_4, NonReducibleUnknown, DiagramEmittedEvents, MetaObject, {
1645
+ states: {
1646
+ readonly initializing: {};
1647
+ readonly isReady: {};
1648
+ readonly ready: {
1649
+ states: {
1650
+ idle: {
1651
+ id: string;
1652
+ };
1653
+ focused: {
1654
+ id: string;
1655
+ };
1656
+ walkthrough: {
1657
+ id: string;
1658
+ };
1659
+ printing: {
1660
+ id: string;
1661
+ };
1662
+ };
1663
+ };
1664
+ readonly navigating: {
1665
+ id: string;
1666
+ };
1667
+ readonly final: {};
1668
+ };
1669
+ }>;
1670
+
1671
+ declare interface DiagramMachineLogic extends BaseDiagramMachineLogic<{
1672
+ overlays: OverlaysActorRef | undefined;
1673
+ search: SearchActorRef | undefined;
1674
+ editor: BaseEditorActorRef | undefined;
1675
+ navigationPanel: NavigationPanelActorRef | undefined;
1676
+ }, StateValueFrom<typeof _diagramMachine>> {
1677
+ }
1678
+
1390
1679
  declare interface DiagramMachineRef extends ActorRef<DiagramActorSnapshot, DiagramEvents, DiagramEmittedEvents> {
1391
1680
  }
1392
1681
 
@@ -1500,10 +1789,7 @@ declare interface EditorActorInput {
1500
1789
  viewId: t.ViewId;
1501
1790
  }
1502
1791
 
1503
- declare interface EditorActorLogic extends StateMachine<EditorActorContext, EditorActorEvent, any, any, any, any, any, {
1504
- editor: 'idle' | 'moving';
1505
- syncQueue: 'idle' | 'pending' | 'suspended' | 'process';
1506
- }, EditorActorStateTag, EditorActorInput, any, EditorActorEmitedEvent, any, any> {
1792
+ declare interface EditorActorLogic extends BaseEditorActorLogic {
1507
1793
  }
1508
1794
 
1509
1795
  declare interface EditorActorRef extends ActorRef<EditorActorSnapshot, EditorActorEvent, EditorActorEmitedEvent> {
@@ -1513,6 +1799,46 @@ declare type EditorActorSnapshot = SnapshotFrom<EditorActorLogic>;
1513
1799
 
1514
1800
  declare type EditorActorStateTag = 'pending' | 'busy' | 'ai-semantic-layout';
1515
1801
 
1802
+ declare namespace EditorCalls {
1803
+ type ApplyLatestToManual = (params: {
1804
+ input: ApplyLatestToManual.Input;
1805
+ }) => Promise<ApplyLatestToManual.Output>;
1806
+ namespace ApplyLatestToManual {
1807
+ type Input = {
1808
+ viewId: t.ViewId;
1809
+ current: t.LayoutedView | undefined;
1810
+ };
1811
+ type Output = {
1812
+ updated: t.LayoutedView;
1813
+ };
1814
+ }
1815
+ type ApplySemanticLayout = (params: {
1816
+ input: ApplySemanticLayout.Input;
1817
+ }) => Promise<ApplySemanticLayout.Output>;
1818
+ namespace ApplySemanticLayout {
1819
+ type Input = {
1820
+ viewId: t.ViewId;
1821
+ };
1822
+ type Output = {};
1823
+ }
1824
+ type ExecuteChange = (params: {
1825
+ input: ExecuteChange.Input;
1826
+ }) => Promise<ExecuteChange.Output>;
1827
+ namespace ExecuteChange {
1828
+ type Input = {
1829
+ viewId: t.ViewId;
1830
+ changes: t.ViewChange[];
1831
+ };
1832
+ /**
1833
+ * Returns the changes that were applied to the view
1834
+ */
1835
+ type Output = {
1836
+ requested: t.ViewChange[];
1837
+ applied: t.ViewChange[];
1838
+ };
1839
+ }
1840
+ }
1841
+
1516
1842
  declare type EffectCallback_2 = (...args: any[]) => any;
1517
1843
 
1518
1844
  declare type EffectHook<Callback extends EffectCallback_2 = EffectCallback_2, Deps extends DependencyList | undefined = DependencyList | undefined, RestArgs extends any[] = any[]> = ((...args: [Callback, Deps, ...RestArgs]) => void) | ((...args: [Callback, Deps]) => void);
@@ -1547,6 +1873,7 @@ export declare function ElementActionButtons({ selected, data: { hovered: isHove
1547
1873
  export declare namespace ElementActionButtons {
1548
1874
  export type Item = {
1549
1875
  key?: string;
1876
+ ariaLabel?: string;
1550
1877
  icon?: ReactNode;
1551
1878
  onClick: (e: MouseEvent_2) => void;
1552
1879
  };
@@ -1589,7 +1916,7 @@ export declare function ElementActions({ extraButtons, ...props }: ElementAction
1589
1916
 
1590
1917
  declare type ElementActionsProps = SimplifyDeep<{
1591
1918
  selected?: boolean;
1592
- data: Pick<Types.ElementNodeData, 'id' | 'modelFqn' | 'navigateTo'> & BaseNodeData;
1919
+ data: Pick<Types.ElementNodeData, 'id' | 'modelFqn' | 'navigateTo' | 'title'> & BaseNodeData;
1593
1920
  }> & WithExtraButtons;
1594
1921
 
1595
1922
  /**
@@ -1611,7 +1938,9 @@ declare type ElementActionsProps = SimplifyDeep<{
1611
1938
  * </ElementData.Root>
1612
1939
  * ```
1613
1940
  */
1614
- export declare function ElementData({ data }: ElementDataProps): JSX.Element;
1941
+ export declare function ElementData({ data, 'aria-hidden': ariaHidden }: ElementDataProps & {
1942
+ 'aria-hidden'?: boolean | undefined;
1943
+ }): JSX.Element;
1615
1944
 
1616
1945
  export declare namespace ElementData {
1617
1946
  var Root: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & ElementDataProps & RefAttributes<HTMLDivElement>>;
@@ -1635,12 +1964,13 @@ declare type ElementDataProps = {
1635
1964
  declare interface ElementDetailsActorRef extends ActorRef<ElementDetailsSnapshot, Events> {
1636
1965
  }
1637
1966
 
1638
- export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): JSX.Element;
1967
+ export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, ariaLabel, onClick, }: ElementDetailsButtonProps): JSX.Element;
1639
1968
 
1640
1969
  declare type ElementDetailsButtonProps = {
1641
1970
  selected?: boolean;
1642
1971
  data: BaseNodeData;
1643
1972
  icon?: ReactNode;
1973
+ ariaLabel?: string;
1644
1974
  onClick: (e: MouseEvent_2) => void;
1645
1975
  };
1646
1976
 
@@ -1652,9 +1982,18 @@ export declare function ElementDetailsButtonWithHandler(props: {
1652
1982
  };
1653
1983
  }): JSX.Element | null;
1654
1984
 
1985
+ declare type ElementDetailsInput = {
1986
+ subject: Fqn;
1987
+ currentView: DiagramView;
1988
+ initiatedFrom?: {
1989
+ node?: NodeId;
1990
+ clientRect?: Rect;
1991
+ };
1992
+ };
1993
+
1655
1994
  declare interface ElementDetailsLogic extends StateMachine<Context, Events, {
1656
1995
  [key: `${string}-relationships`]: RelationshipsBrowserActorRef | undefined;
1657
- }, any, any, any, any, any, never, Input_2, any, any, any, any> {
1996
+ }, any, any, any, any, any, never, ElementDetailsInput, any, any, any, any> {
1658
1997
  }
1659
1998
 
1660
1999
  declare type ElementDetailsSnapshot = SnapshotFrom<ElementDetailsLogic>;
@@ -1793,6 +2132,78 @@ declare interface ErrorActorEvent<TErrorData = unknown, TId extends string = str
1793
2132
  actorId: TId;
1794
2133
  }
1795
2134
 
2135
+ export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): JSX.Element;
2136
+
2137
+ declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
2138
+
2139
+ declare type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
2140
+ fallback?: never;
2141
+ /**
2142
+ * React component responsible for returning a fallback UI based on a thrown value.
2143
+ *
2144
+ * ```tsx
2145
+ * <ErrorBoundary FallbackComponent={Fallback} />
2146
+ * ```
2147
+ */
2148
+ FallbackComponent: ComponentType<FallbackProps>;
2149
+ fallbackRender?: never;
2150
+ };
2151
+
2152
+ declare type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
2153
+ /**
2154
+ * Static content to render in place of an error if one is thrown.
2155
+ *
2156
+ * ```tsx
2157
+ * <ErrorBoundary fallback={<div className="text-red">Something went wrong</div>} />
2158
+ * ```
2159
+ */
2160
+ fallback: ReactNode;
2161
+ FallbackComponent?: never;
2162
+ fallbackRender?: never;
2163
+ };
2164
+
2165
+ declare type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
2166
+ fallback?: never;
2167
+ FallbackComponent?: never;
2168
+ /**
2169
+ * [Render prop](https://react.dev/reference/react/Children#calling-a-render-prop-to-customize-rendering) function responsible for returning a fallback UI based on a thrown value.
2170
+ *
2171
+ * ```tsx
2172
+ * <ErrorBoundary fallbackRender={({ error, resetErrorBoundary }) => <div>...</div>} />
2173
+ * ```
2174
+ */
2175
+ fallbackRender: (props: FallbackProps) => ReactNode;
2176
+ };
2177
+
2178
+ declare type ErrorBoundarySharedProps = PropsWithChildren<{
2179
+ /**
2180
+ * Optional callback to enable e.g. logging error information to a server.
2181
+ *
2182
+ * @param error Value that was thrown; typically an instance of `Error`
2183
+ * @param info React "component stack" identifying where the error was thrown
2184
+ */
2185
+ onError?: (error: unknown, info: ErrorInfo) => void;
2186
+ /**
2187
+ * Optional callback to be notified when an error boundary is reset so React can retry the failed render.
2188
+ */
2189
+ onReset?: (details: {
2190
+ reason: "imperative-api";
2191
+ args: unknown[];
2192
+ } | {
2193
+ reason: "keys";
2194
+ prev: unknown[] | undefined;
2195
+ next: unknown[] | undefined;
2196
+ }) => void;
2197
+ /**
2198
+ * When changed, these keys will reset a triggered error boundary.
2199
+ * This can be useful when an error condition may be tied to some specific state (that can be uniquely identified by key).
2200
+ * See the documentation for examples of how to use this prop.
2201
+ */
2202
+ resetKeys?: unknown[];
2203
+ }>;
2204
+
2205
+ export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): JSX.Element;
2206
+
1796
2207
  declare interface ErrorMachineSnapshot<TContext extends MachineContext, TEvent extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TStateValue extends StateValue, TTag extends string, TOutput, TMeta extends MetaObject, TStateSchema extends StateSchema> extends MachineSnapshotBase<TContext, TEvent, TChildren, TStateValue, TTag, TOutput, TMeta, TStateSchema> {
1797
2208
  status: 'error';
1798
2209
  output: undefined;
@@ -1821,7 +2232,7 @@ declare type Events = {
1821
2232
  declare type Events_2 = {
1822
2233
  type: 'xyflow.init';
1823
2234
  instance: XYFLowInstance;
1824
- store: XYStoreApi_2;
2235
+ store: XYStoreApi;
1825
2236
  } | {
1826
2237
  type: 'xyflow.nodeClick';
1827
2238
  node: RelationshipsBrowserTypes.Node;
@@ -1830,10 +2241,10 @@ declare type Events_2 = {
1830
2241
  edge: RelationshipsBrowserTypes.Edge;
1831
2242
  } | {
1832
2243
  type: 'xyflow.applyNodeChanges';
1833
- changes: NodeChange_2<RelationshipsBrowserTypes.Node>[];
2244
+ changes: NodeChange<RelationshipsBrowserTypes.Node>[];
1834
2245
  } | {
1835
2246
  type: 'xyflow.applyEdgeChanges';
1836
- changes: EdgeChange_2<RelationshipsBrowserTypes.Edge>[];
2247
+ changes: EdgeChange<RelationshipsBrowserTypes.Edge>[];
1837
2248
  } | {
1838
2249
  type: 'xyflow.paneClick';
1839
2250
  } | {
@@ -1861,7 +2272,7 @@ declare type Events_2 = {
1861
2272
  } | {
1862
2273
  type: 'fitDiagram';
1863
2274
  duration?: number;
1864
- bounds?: BBox_3;
2275
+ bounds?: BBox_2;
1865
2276
  } | {
1866
2277
  type: 'navigate.to';
1867
2278
  subject: Fqn_3;
@@ -1884,7 +2295,7 @@ declare type Events_2 = {
1884
2295
  declare type Events_3 = {
1885
2296
  type: 'xyflow.init';
1886
2297
  instance: XYFLowInstance_2;
1887
- store: XYStoreApi_3;
2298
+ store: XYStoreApi_2;
1888
2299
  } | {
1889
2300
  type: 'xyflow.nodeClick';
1890
2301
  node: RelationshipDetailsTypes.Node;
@@ -1907,10 +2318,10 @@ declare type Events_3 = {
1907
2318
  edges: RelationshipDetailsTypes.Edge[];
1908
2319
  } | {
1909
2320
  type: 'xyflow.applyNodeChanges';
1910
- changes: NodeChange_2<RelationshipDetailsTypes.Node>[];
2321
+ changes: NodeChange<RelationshipDetailsTypes.Node>[];
1911
2322
  } | {
1912
2323
  type: 'xyflow.applyEdgeChanges';
1913
- changes: EdgeChange_2<RelationshipDetailsTypes.Edge>[];
2324
+ changes: EdgeChange<RelationshipDetailsTypes.Edge>[];
1914
2325
  } | {
1915
2326
  type: 'xyflow.paneClick';
1916
2327
  } | {
@@ -1925,11 +2336,11 @@ declare type Events_3 = {
1925
2336
  } | {
1926
2337
  type: 'fitDiagram';
1927
2338
  duration?: number;
1928
- bounds?: BBox_3;
2339
+ bounds?: BBox_2;
1929
2340
  } | {
1930
2341
  type: 'navigate.to';
1931
2342
  params: {
1932
- edgeId: EdgeId_2;
2343
+ edgeId: EdgeId;
1933
2344
  viewId?: ViewId_3;
1934
2345
  } | {
1935
2346
  source: Fqn_3;
@@ -1940,6 +2351,51 @@ declare type Events_3 = {
1940
2351
  type: 'close';
1941
2352
  };
1942
2353
 
2354
+ declare type Events_4 = {
2355
+ type: 'update.inputs';
2356
+ inputs: Input_3;
2357
+ } | {
2358
+ type: 'searchQuery.change';
2359
+ value: string;
2360
+ } | {
2361
+ type: 'searchQuery.changed';
2362
+ } | {
2363
+ type: 'select.folder';
2364
+ folderPath: string;
2365
+ } | {
2366
+ type: 'select.view';
2367
+ viewId: ViewId;
2368
+ } | {
2369
+ type: 'breadcrumbs.mouseLeave';
2370
+ } | {
2371
+ type: 'breadcrumbs.mouseEnter.root';
2372
+ } | {
2373
+ type: 'breadcrumbs.mouseLeave.root';
2374
+ } | {
2375
+ type: 'breadcrumbs.mouseEnter.folder';
2376
+ folderPath: string;
2377
+ } | {
2378
+ type: 'breadcrumbs.mouseLeave.folder';
2379
+ folderPath: string;
2380
+ } | {
2381
+ type: 'breadcrumbs.mouseEnter.viewtitle';
2382
+ } | {
2383
+ type: 'breadcrumbs.mouseLeave.viewtitle';
2384
+ } | {
2385
+ type: 'breadcrumbs.click.root';
2386
+ } | {
2387
+ type: 'breadcrumbs.click.folder';
2388
+ folderPath: string;
2389
+ } | {
2390
+ type: 'breadcrumbs.click.viewtitle';
2391
+ } | {
2392
+ type: 'dropdown.mouseEnter';
2393
+ } | {
2394
+ type: 'dropdown.mouseLeave';
2395
+ } | {
2396
+ type: 'dropdown.dismiss';
2397
+ };
2398
+
1943
2399
  declare interface ExecutableActionObject {
1944
2400
  type: string;
1945
2401
  info: ActionArgs<MachineContext, EventObject, EventObject>;
@@ -1949,6 +2405,11 @@ declare interface ExecutableActionObject {
1949
2405
 
1950
2406
  declare type ExtractEvent<TEvent extends EventObject, TDescriptor extends EventDescriptor<TEvent>> = string extends TEvent['type'] ? TEvent : NormalizeDescriptor<TDescriptor> extends infer TNormalizedDescriptor ? TEvent extends any ? true extends EventDescriptorMatches<TEvent['type'], TNormalizedDescriptor> ? TEvent : never : never : never;
1951
2407
 
2408
+ declare type FallbackProps = {
2409
+ error: unknown;
2410
+ resetErrorBoundary: (...args: unknown[]) => void;
2411
+ };
2412
+
1952
2413
  export declare type FeatureName = typeof FeatureNames[number];
1953
2414
 
1954
2415
  declare const FeatureNames: readonly ["Controls", "Editor", "AISemanticLayout", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Notes", "Vscode", "ElementTags"];
@@ -1991,6 +2452,12 @@ declare type GuardPredicate<TContext extends MachineContext, TExpressionEvent ex
1991
2452
 
1992
2453
  declare type HistoryValue<TContext extends MachineContext, TEvent extends EventObject> = Record<string, Array<StateNode<TContext, TEvent>>>;
1993
2454
 
2455
+ declare interface HotkeyActorLogic extends CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent> {
2456
+ }
2457
+
2458
+ declare interface HotkeyActorLogic_2 extends CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent_2> {
2459
+ }
2460
+
1994
2461
  declare type HotKeyEvent = {
1995
2462
  type: 'key.esc' | `key.arrow.${'left' | 'right' | 'up' | 'down'}`;
1996
2463
  };
@@ -2049,6 +2516,18 @@ export declare function IfNotReadOnly({ children }: PropsWithChildren): JSX_2.El
2049
2516
 
2050
2517
  export declare function IfReadOnly({ children }: PropsWithChildren): JSX_2.Element | null;
2051
2518
 
2519
+ declare type inferChildrenRef<A> = A extends Record<string, AnyActorLogic> ? {
2520
+ [K in keyof A & string]: ActorRefFromLogic<A[K]> | undefined;
2521
+ } : never;
2522
+
2523
+ declare type inferProvidedActor<A> = A extends Record<string, AnyActorLogic> ? {
2524
+ [K in keyof A & string]: {
2525
+ id: K;
2526
+ logic: A[K];
2527
+ src: K;
2528
+ };
2529
+ }[keyof A & string] : never;
2530
+
2052
2531
  declare type InitialContext<TContext extends MachineContext, TActor extends ProvidedActor, TInput, TEvent extends EventObject> = TContext | ContextFactory<TContext, TActor, TInput, TEvent>;
2053
2532
 
2054
2533
  declare interface InitialTransitionConfig<TContext extends MachineContext, TEvent extends EventObject, TActor extends ProvidedActor, TAction extends ParameterizedObject, TGuard extends ParameterizedObject, TDelay extends string> extends TransitionConfig<TContext, TEvent, TEvent, TActor, TAction, TGuard, TDelay, TODO, // TEmitted
@@ -2061,29 +2540,7 @@ declare interface InitialTransitionDefinition<TContext extends MachineContext, T
2061
2540
  guard?: never;
2062
2541
  }
2063
2542
 
2064
- declare interface Input {
2065
- view: DiagramView;
2066
- xystore: XYStoreApi;
2067
- zoomable: boolean;
2068
- pannable: boolean;
2069
- nodesDraggable: boolean;
2070
- nodesSelectable: boolean;
2071
- fitViewPadding: ViewPaddings;
2072
- where: WhereOperator | null;
2073
- dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
2074
- features?: EnabledFeatures;
2075
- }
2076
-
2077
- declare type Input_2 = {
2078
- subject: Fqn;
2079
- currentView: DiagramView;
2080
- initiatedFrom?: {
2081
- node?: NodeId;
2082
- clientRect?: Rect;
2083
- };
2084
- };
2085
-
2086
- declare type Input_3 = {
2543
+ declare type Input = {
2087
2544
  subject: Fqn_3;
2088
2545
  viewId: ViewId_3 | null;
2089
2546
  scope: 'global' | 'view';
@@ -2092,9 +2549,9 @@ declare type Input_3 = {
2092
2549
  enableChangeScope?: boolean;
2093
2550
  };
2094
2551
 
2095
- declare type Input_4 = ExclusiveUnion_2<{
2552
+ declare type Input_2 = ExclusiveUnion_2<{
2096
2553
  Edge: {
2097
- edgeId: EdgeId_2;
2554
+ edgeId: EdgeId;
2098
2555
  viewId: ViewId_3;
2099
2556
  };
2100
2557
  Between: {
@@ -2104,6 +2561,24 @@ declare type Input_4 = ExclusiveUnion_2<{
2104
2561
  };
2105
2562
  }>;
2106
2563
 
2564
+ declare interface Input_3 {
2565
+ view: LayoutedView;
2566
+ viewModel: CurrentViewModel | null;
2567
+ }
2568
+
2569
+ declare interface Input_4 {
2570
+ view: DiagramView;
2571
+ xystore: XYStoreApi_3;
2572
+ zoomable: boolean;
2573
+ pannable: boolean;
2574
+ nodesDraggable: boolean;
2575
+ nodesSelectable: boolean;
2576
+ fitViewPadding: ViewPaddings;
2577
+ where: WhereOperator | null;
2578
+ dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
2579
+ features?: EnabledFeatures;
2580
+ }
2581
+
2107
2582
  declare type InputFrom<T> = T extends StateMachine<infer _TContext, infer _TEvent, infer _TChildren, infer _TActor, infer _TAction, infer _TGuard, infer _TDelay, infer _TStateValue, infer _TTag, infer TInput, infer _TOutput, infer _TEmitted, infer _TMeta, infer _TStateSchema> ? TInput : T extends ActorLogic<infer _TSnapshot, infer _TEvent, infer TInput, infer _TSystem, infer _TEmitted> ? TInput : never;
2108
2583
 
2109
2584
  declare interface InspectedActionEvent extends BaseInspectionEventProperties {
@@ -3003,6 +3478,9 @@ export declare const Markdown: ForwardRefExoticComponent<Omit<Omit< DetailedHTML
3003
3478
  emptyText?: string;
3004
3479
  } & RefAttributes<HTMLDivElement>>;
3005
3480
 
3481
+ declare interface MediaPrintActorLogic extends CallbackActorLogic<AnyEventObject, NonReducibleUnknown, MediaPrintEvent> {
3482
+ }
3483
+
3006
3484
  declare type MediaPrintEvent = {
3007
3485
  type: 'media.print.on';
3008
3486
  } | {
@@ -3034,7 +3512,7 @@ declare interface NavigationHistoryEntry_2 {
3034
3512
  };
3035
3513
  focusedNode?: NodeId | null;
3036
3514
  dynamicViewVariant?: DynamicViewDisplayVariant | null;
3037
- activeWalkthrough?: null | StepEdgeId;
3515
+ activeWalkthrough?: null | StepPath;
3038
3516
  }
3039
3517
 
3040
3518
  export declare const NavigationPanel: {
@@ -3045,6 +3523,14 @@ export declare const NavigationPanel: {
3045
3523
  Dropdown: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
3046
3524
  };
3047
3525
 
3526
+ declare interface NavigationPanelActorLogic extends StateMachine<Context_4, Events_4, any, any, any, any, any, StateValueFrom<typeof _actorLogic>, Tags_3, Input_3, any, any, any, any> {
3527
+ }
3528
+
3529
+ declare interface NavigationPanelActorRef extends ActorRef<NavigationPanelActorSnapshot, Events_4, never> {
3530
+ }
3531
+
3532
+ declare type NavigationPanelActorSnapshot = SnapshotFrom<NavigationPanelActorLogic>;
3533
+
3048
3534
  declare type NodeId_2 = t.aux.NodeId;
3049
3535
 
3050
3536
  export declare type NodeRenderers = Partial<CamelCasedProperties<Types.NodeRenderers>>;
@@ -3229,7 +3715,7 @@ export declare type OverlayProps = PropsWithChildren<{
3229
3715
 
3230
3716
  declare namespace Overlays {
3231
3717
  namespace ElementDetails {
3232
- interface Input extends Input_2 {
3718
+ interface Input extends ElementDetailsInput {
3233
3719
  }
3234
3720
  interface Logic extends ElementDetailsLogic {
3235
3721
  }
@@ -3237,14 +3723,14 @@ declare namespace Overlays {
3237
3723
  }
3238
3724
  }
3239
3725
  namespace RelationshipDetails {
3240
- type Input = Input_4;
3726
+ type Input = Input_2;
3241
3727
  interface Logic extends RelationshipDetailsLogic {
3242
3728
  }
3243
3729
  interface ActorRef extends RelationshipDetailsActorRef {
3244
3730
  }
3245
3731
  }
3246
3732
  namespace RelationshipsBrowser {
3247
- interface Input extends Input_3 {
3733
+ interface Input extends Input {
3248
3734
  }
3249
3735
  interface Logic extends RelationshipsBrowserLogic {
3250
3736
  }
@@ -3281,7 +3767,7 @@ declare interface OverlaysContext {
3281
3767
  }>;
3282
3768
  }
3283
3769
 
3284
- declare type OverrideReactFlowProps = Pick<ReactFlowProps<Types.AnyNode, Types.AnyEdge>, 'paneClickDistance' | 'nodeClickDistance' | 'selectionKeyCode' | 'panActivationKeyCode' | 'multiSelectionKeyCode' | 'zoomActivationKeyCode' | 'snapToGrid' | 'snapGrid' | 'onlyRenderVisibleElements' | 'nodesDraggable' | 'nodesFocusable' | 'elementsSelectable' | 'selectNodesOnDrag' | 'panOnDrag' | 'preventScrolling' | 'zoomOnScroll' | 'zoomOnPinch' | 'panOnScroll' | 'panOnScrollSpeed' | 'panOnScrollMode' | 'zoomOnDoubleClick' | 'nodeDragThreshold'>;
3770
+ declare type OverrideReactFlowProps = Pick<ReactFlowProps<Types.AnyNode, Types.AnyEdge>, 'paneClickDistance' | 'nodeClickDistance' | 'selectionKeyCode' | 'panActivationKeyCode' | 'multiSelectionKeyCode' | 'zoomActivationKeyCode' | 'snapToGrid' | 'snapGrid' | 'onlyRenderVisibleElements' | 'nodesDraggable' | 'nodesFocusable' | 'elementsSelectable' | 'selectNodesOnDrag' | 'panOnDrag' | 'preventScrolling' | 'zoomOnScroll' | 'zoomOnPinch' | 'panOnScroll' | 'panOnScrollSpeed' | 'panOnScrollMode' | 'zoomOnDoubleClick' | 'nodeDragThreshold' | 'edgesFocusable'>;
3285
3771
 
3286
3772
  export declare type PaddingUnit = 'px' | '%';
3287
3773
 
@@ -3302,7 +3788,7 @@ declare type PickEmittedEvent<T> = T extends DiagramEmittedEvents['type'] ? Diag
3302
3788
  * Picks appropriate bounds from the view,
3303
3789
  * depending on its type and dynamic variant
3304
3790
  */
3305
- export declare function pickViewBounds(view: LayoutedView, dynamicVariant?: DynamicViewDisplayVariant): BBox_2;
3791
+ export declare function pickViewBounds(view: LayoutedView, dynamicVariant?: DynamicViewDisplayVariant): BBox_3;
3306
3792
 
3307
3793
  /**
3308
3794
  * PortalToContainer is used to render elements outside the LikeC4DiagramXYFlow, but inside the container.
@@ -3331,6 +3817,16 @@ declare type ProjectsOverviewXYProps = {
3331
3817
  colorScheme?: 'light' | 'dark' | undefined;
3332
3818
  };
3333
3819
 
3820
+ declare type PromiseActorLogic<TOutput, TInput = unknown, TEmitted extends EventObject = EventObject> = ActorLogic<PromiseSnapshot<TOutput, TInput>, {
3821
+ type: string;
3822
+ [k: string]: unknown;
3823
+ }, TInput, // input
3824
+ AnyActorSystem, TEmitted>;
3825
+
3826
+ declare type PromiseSnapshot<TOutput, TInput> = Snapshot<TOutput> & {
3827
+ input: TInput | undefined;
3828
+ };
3829
+
3334
3830
  declare interface ProvidedActor {
3335
3831
  src: string;
3336
3832
  logic: UnknownActorLogic;
@@ -3378,7 +3874,7 @@ export declare type ReactLikeC4Props<A extends t.aux.Any = t.aux.UnknownLayouted
3378
3874
  style?: CSSProperties | undefined;
3379
3875
  mantineTheme?: any;
3380
3876
  /** Function to generate nonce attribute added to all generated `<style />` tags */
3381
- styleNonce?: string | (() => string) | undefined;
3877
+ styleNonce?: string | (() => string | undefined) | undefined;
3382
3878
  children?: ReactNode | undefined;
3383
3879
  } & Omit<LikeC4DiagramProperties<A>, 'view'> & LikeC4DiagramEventHandlers<A>;
3384
3880
 
@@ -3391,7 +3887,7 @@ declare type RelationId = t.aux.RelationId;
3391
3887
  declare interface RelationshipDetailsActorRef extends ActorRef<RelationshipDetailsSnapshot, Events_3> {
3392
3888
  }
3393
3889
 
3394
- declare interface RelationshipDetailsLogic extends StateMachine<Context_3, Events_3, {}, any, any, any, any, any, Tags_2, Input_4, any, any, any, any> {
3890
+ declare interface RelationshipDetailsLogic extends StateMachine<Context_3, Events_3, {}, any, any, any, any, any, Tags_2, Input_2, any, any, any, any> {
3395
3891
  }
3396
3892
 
3397
3893
  declare type RelationshipDetailsSnapshot = SnapshotFrom<RelationshipDetailsLogic>;
@@ -3453,7 +3949,7 @@ declare namespace RelationshipDetailsTypes {
3453
3949
  declare interface RelationshipsBrowserActorRef extends ActorRef<RelationshipsBrowserSnapshot, Events_2> {
3454
3950
  }
3455
3951
 
3456
- declare interface RelationshipsBrowserLogic extends StateMachine<Context_2, Events_2, {}, any, any, any, any, any, Tags, Input_3, any, any, any, any> {
3952
+ declare interface RelationshipsBrowserLogic extends StateMachine<Context_2, Events_2, {}, any, any, any, any, any, Tags, Input, any, any, any, any> {
3457
3953
  }
3458
3954
 
3459
3955
  declare type RelationshipsBrowserSnapshot = SnapshotFrom<RelationshipsBrowserLogic>;
@@ -3631,7 +4127,7 @@ declare type SearchActorSnapshot = SnapshotFrom<SearchActorLogic>;
3631
4127
 
3632
4128
  export declare const searchBodyCss: string;
3633
4129
 
3634
- export declare const SearchContext: Context_4<SearchContextValue | null>;
4130
+ export declare const SearchContext: Context_5<SearchContextValue | null>;
3635
4131
 
3636
4132
  declare interface SearchContext_2 {
3637
4133
  openedWithSearch: string | null;
@@ -3669,6 +4165,60 @@ export declare const searchDialogCss: string;
3669
4165
  */
3670
4166
  export declare const SearchPanelContent: ForwardRefExoticComponent<RefAttributes<HTMLDivElement>>;
3671
4167
 
4168
+ /**
4169
+ * Tuple type for selector and compare function pair
4170
+ */
4171
+ declare type SelectAndCompare<A, B> = [
4172
+ selector: (snapshot: A) => B,
4173
+ compare: (a: B, b: B) => boolean
4174
+ ];
4175
+
4176
+ export declare const selectDiagramContext: <T>(select: (state: DiagramContext) => T, compare?: ((old: NoInfer<T>, next: NoInfer<T>) => boolean) | undefined) => SelectAndCompare< MachineSnapshot<DiagramContext, DiagramEvents, {
4177
+ overlays: OverlaysActorRef | undefined;
4178
+ search: SearchActorRef | undefined;
4179
+ editor: BaseEditorActorRef | undefined;
4180
+ navigationPanel: NavigationPanelActorRef | undefined;
4181
+ } & Omit<{
4182
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
4183
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
4184
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
4185
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
4186
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
4187
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
4188
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
4189
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
4190
+ }, never, never, never, never>, T>;
4191
+
4192
+ export declare const selectDiagramSnapshot: <T>(select: (state: MachineSnapshot<DiagramContext, DiagramEvents, {
4193
+ overlays: OverlaysActorRef | undefined;
4194
+ search: SearchActorRef | undefined;
4195
+ editor: BaseEditorActorRef | undefined;
4196
+ navigationPanel: NavigationPanelActorRef | undefined;
4197
+ } & Omit<{
4198
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
4199
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
4200
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
4201
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
4202
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
4203
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
4204
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
4205
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
4206
+ }, never, never, never, never>) => T, compare?: ((old: NoInfer<T>, next: NoInfer<T>) => boolean) | undefined) => SelectAndCompare< MachineSnapshot<DiagramContext, DiagramEvents, {
4207
+ overlays: OverlaysActorRef | undefined;
4208
+ search: SearchActorRef | undefined;
4209
+ editor: BaseEditorActorRef | undefined;
4210
+ navigationPanel: NavigationPanelActorRef | undefined;
4211
+ } & Omit<{
4212
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
4213
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
4214
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
4215
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
4216
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
4217
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
4218
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
4219
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
4220
+ }, never, never, never, never>, T>;
4221
+
3672
4222
  export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): JSX.Element;
3673
4223
 
3674
4224
  export declare function sequenceActorNode<A extends Any_5 = Unknown_3>(component: FC<SequenceActorNodeProps<A>>): Types.NodeRenderer<'seq-actor'>;
@@ -3680,9 +4230,9 @@ export declare type SequenceActorNodeProps<A extends Any_5 = Unknown_3> = {
3680
4230
 
3681
4231
  export declare function SequenceParallelArea(props: Types.NodeProps<'seq-parallel'>): JSX.Element;
3682
4232
 
3683
- declare function setData<E extends WithData<any>>(value: E, state: Partial<E['data']>): E;
4233
+ declare function setData<E extends WithData<any>>(value: E, data: Partial<E['data']>): E;
3684
4234
 
3685
- declare function setData<E extends WithData<any>>(state: Partial<NoInfer<E['data']>>): (value: E) => E;
4235
+ declare function setData<E extends WithData<any>>(state: Partial<NoInfer<E>['data']>): (value: E) => E;
3686
4236
 
3687
4237
  declare function setDimmed<T extends WithDimmed>(value: T, dimmed: 'immediate' | boolean): T;
3688
4238
 
@@ -3771,6 +4321,8 @@ options?: {
3771
4321
  }
3772
4322
  ], IsNotNever<RequiredActorOptions<TActor>>> : never;
3773
4323
 
4324
+ declare type StateFrom<T extends AnyStateMachine | ((...args: any[]) => AnyStateMachine)> = T extends AnyStateMachine ? ReturnType<T['transition']> : T extends (...args: any[]) => AnyStateMachine ? ReturnType<ReturnType<T>['transition']> : never;
4325
+
3774
4326
  declare type StateId<TSchema extends StateSchema, TKey extends string = '(machine)', TParentKey extends string | null = null> = (TSchema extends {
3775
4327
  id: string;
3776
4328
  } ? TSchema['id'] : TParentKey extends null ? TKey : `${TParentKey}.${TKey}`) | (TSchema['states'] extends Record<string, any> ? Values<{
@@ -4124,6 +4676,8 @@ declare type StatesDefinition<TContext extends MachineContext, TEvent extends Ev
4124
4676
  */
4125
4677
  declare type StateValue = string | StateValueMap;
4126
4678
 
4679
+ declare type StateValueFrom<TMachine extends AnyStateMachine> = Parameters<StateFrom<TMachine>['matches']>[0];
4680
+
4127
4681
  declare interface StateValueMap {
4128
4682
  [key: string]: StateValue | undefined;
4129
4683
  }
@@ -4141,7 +4695,7 @@ declare interface StoppedMachineSnapshot<TContext extends MachineContext, TEvent
4141
4695
  declare type StrictViewId<A> = t.aux.StrictViewId<A>;
4142
4696
 
4143
4697
  declare type Subject = {
4144
- edgeId: EdgeId_2;
4698
+ edgeId: EdgeId;
4145
4699
  source?: never;
4146
4700
  target?: never;
4147
4701
  } | {
@@ -4168,7 +4722,8 @@ declare type System = ActorSystem<{
4168
4722
  diagram: DiagramMachineRef;
4169
4723
  overlays: OverlaysActorRef;
4170
4724
  search: SearchActorRef;
4171
- editor: EditorActorRef;
4725
+ editor: BaseEditorActorRef;
4726
+ navigationPanel: NavigationPanelActorRef;
4172
4727
  };
4173
4728
  }>;
4174
4729
 
@@ -4176,6 +4731,8 @@ declare type Tags = 'active';
4176
4731
 
4177
4732
  declare type Tags_2 = never;
4178
4733
 
4734
+ declare type Tags_3 = 'active';
4735
+
4179
4736
  declare type TODO = any;
4180
4737
 
4181
4738
  declare type TogglableFeature = ('ReadOnly' | 'CompareWithLatest') & FeatureName;
@@ -4276,6 +4833,7 @@ export declare namespace Types {
4276
4833
  height: number;
4277
4834
  type: 'target' | 'source';
4278
4835
  position: 'left' | 'right' | 'top' | 'bottom';
4836
+ hidden?: boolean;
4279
4837
  };
4280
4838
  export type SequenceActorNodeData = Simplify<LeafNodeData & {
4281
4839
  navigateTo: ViewId | null;
@@ -4283,6 +4841,34 @@ export declare namespace Types {
4283
4841
  ports: Array<SequenceActorNodePort>;
4284
4842
  viewHeight: number;
4285
4843
  }>;
4844
+ /**
4845
+ * Represents subflow area in the diagram
4846
+ * `try` and `alt` flows have special handling in the diagram
4847
+ */
4848
+ export type SequenceSubflowData = LeafNodeData & {
4849
+ flowId: StepPath;
4850
+ title: string | undefined;
4851
+ /**
4852
+ * This is first subflow in current flow
4853
+ */
4854
+ isFirst?: boolean | undefined;
4855
+ /**
4856
+ * This is last subflow in current flow
4857
+ */
4858
+ isLast?: boolean | undefined;
4859
+ collapsed: boolean;
4860
+ } & ({
4861
+ flowType: Exclude<DynamicViewFlow.SubFlowType, 'try' | 'alt'>;
4862
+ } | SequenceSubflowData.AltOrTry);
4863
+ export namespace SequenceSubflowData {
4864
+ export type AltOrTry = {
4865
+ flowType: 'try' | 'alt';
4866
+ headerHeight: number;
4867
+ };
4868
+ }
4869
+ /**
4870
+ * @deprecated Use {@link SequenceSubflowData} instead
4871
+ */
4286
4872
  export type SequenceParallelAreaData = Simplify<LeafNodeData & {
4287
4873
  parallelPrefix: string;
4288
4874
  }>;
@@ -4325,10 +4911,11 @@ export declare namespace Types {
4325
4911
  export type DeploymentElementNode = BaseNode<DeploymentElementNodeData, 'deployment'>;
4326
4912
  export type SequenceActorNode = BaseNode<SequenceActorNodeData, 'seq-actor'>;
4327
4913
  export type SequenceParallelArea = BaseNode<SequenceParallelAreaData, 'seq-parallel'>;
4914
+ export type SequenceSubflowArea = BaseNode<SequenceSubflowData, 'seq-subflow'>;
4328
4915
  export type CompoundElementNode = BaseNode<CompoundElementNodeData, 'compound-element'>;
4329
4916
  export type CompoundDeploymentNode = BaseNode<CompoundDeploymentNodeData, 'compound-deployment'>;
4330
4917
  export type ViewGroupNode = BaseNode<ViewGroupNodeData, 'view-group'>;
4331
- export type AnyNode = ElementNode | DeploymentElementNode | CompoundElementNode | CompoundDeploymentNode | ViewGroupNode | SequenceActorNode | SequenceParallelArea;
4918
+ export type AnyNode = ElementNode | DeploymentElementNode | CompoundElementNode | CompoundDeploymentNode | ViewGroupNode | SequenceActorNode | SequenceParallelArea | SequenceSubflowArea;
4332
4919
  export type NodeType = AnyNode['type'];
4333
4920
  export type NodeData = ExclusiveUnion<{
4334
4921
  ElementNodeData: ElementNodeData;
@@ -4338,6 +4925,7 @@ export declare namespace Types {
4338
4925
  ViewGroupNodeData: ViewGroupNodeData;
4339
4926
  SequenceActorNodeData: SequenceActorNodeData;
4340
4927
  SequenceParallelAreaData: SequenceParallelAreaData;
4928
+ SequenceSubflowAreaData: SequenceSubflowData;
4341
4929
  }>;
4342
4930
  export type Node<Type extends NodeType = NodeType> = Extract<AnyNode, {
4343
4931
  type: Type;
@@ -4348,8 +4936,21 @@ export declare namespace Types {
4348
4936
  labelXY: XYPosition | null;
4349
4937
  isLabelCustomized?: boolean | undefined;
4350
4938
  controlPoints: XYPosition[] | undefined | null;
4939
+ /**
4940
+ * When dynamic view in "diagram" variant
4941
+ * Edges are RelationshipEdgeData - stepnum is used to determine the step number
4942
+ * (backward compatibility)
4943
+ */
4944
+ stepnum?: number;
4351
4945
  }>;
4352
- export type SequenceStepEdgeData = Simplify<BaseEdgeData & NonOptional<Pick<DiagramEdge, 'id' | 'label' | 'technology' | 'points' | 'dir' | 'color' | 'line' | 'head' | 'tail' | 'navigateTo' | 'astPath' | 'drifts'>> & {
4946
+ export type SequenceStepEdgeData = Simplify<BaseEdgeData & NonOptional<Pick<DiagramEdge, 'label' | 'technology' | 'points' | 'dir' | 'color' | 'line' | 'head' | 'tail' | 'navigateTo' | 'astPath' | 'drifts'>> & {
4947
+ id: StepPath;
4948
+ state?: 'processed' | 'active' | 'skipped' | 'pending' | null;
4949
+ stepnum: number;
4950
+ parentFlow: null | {
4951
+ id: StepPath;
4952
+ type: DynamicViewFlow.SubFlowType;
4953
+ };
4353
4954
  notes: MarkdownOrString | null;
4354
4955
  labelXY: XYPosition | null;
4355
4956
  labelBBox: BBox;
@@ -4435,15 +5036,64 @@ export declare function useCurrentViewModel(): CurrentViewModel;
4435
5036
 
4436
5037
  export declare function useDiagram(): DiagramApi;
4437
5038
 
4438
- export declare function useDiagramActorRef(): DiagramActorRef;
5039
+ export declare const useDiagramActorRef: () => DiagramActorRef;
4439
5040
 
4440
5041
  /**
4441
5042
  * Read diagram context
5043
+ * @deprecated use {@link useDiagramSelector}
4442
5044
  */
4443
5045
  export declare function useDiagramContext<T = unknown>(selector: (context: DiagramContext) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean, deps?: DependencyList): T;
4444
5046
 
4445
5047
  export declare function useDiagramEventHandlers(): DiagramEventHandlersContext;
4446
5048
 
5049
+ export declare const useDiagramSelector: {
5050
+ <T>(select: (state: MachineSnapshot<DiagramContext, DiagramEvents, {
5051
+ overlays: OverlaysActorRef | undefined;
5052
+ search: SearchActorRef | undefined;
5053
+ editor: BaseEditorActorRef | undefined;
5054
+ navigationPanel: NavigationPanelActorRef | undefined;
5055
+ } & Omit<{
5056
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
5057
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
5058
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
5059
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
5060
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
5061
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
5062
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
5063
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
5064
+ }, never, never, never, never>) => T): T;
5065
+ <T>(selectorCompare: SelectAndCompare< MachineSnapshot<DiagramContext, DiagramEvents, {
5066
+ overlays: OverlaysActorRef | undefined;
5067
+ search: SearchActorRef | undefined;
5068
+ editor: BaseEditorActorRef | undefined;
5069
+ navigationPanel: NavigationPanelActorRef | undefined;
5070
+ } & Omit<{
5071
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
5072
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
5073
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
5074
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
5075
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
5076
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
5077
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
5078
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
5079
+ }, never, never, never, never>, T>): T;
5080
+ <T>(selector: (snapshot: MachineSnapshot<DiagramContext, DiagramEvents, {
5081
+ overlays: OverlaysActorRef | undefined;
5082
+ search: SearchActorRef | undefined;
5083
+ editor: BaseEditorActorRef | undefined;
5084
+ navigationPanel: NavigationPanelActorRef | undefined;
5085
+ } & Omit<{
5086
+ hotkey: ActorRefFromLogic<HotkeyActorLogic> | undefined;
5087
+ overlays: ActorRefFromLogic<OverlaysActorLogic> | undefined;
5088
+ search: ActorRefFromLogic<SearchActorLogic> | undefined;
5089
+ mediaPrint: ActorRefFromLogic<MediaPrintActorLogic> | undefined;
5090
+ editor: ActorRefFromLogic<EditorActorLogic> | undefined;
5091
+ navigationPanel: ActorRefFromLogic<NavigationPanelActorLogic> | undefined;
5092
+ }, "search" | "overlays" | "editor" | "navigationPanel">, "final" | "isReady" | "navigating" | "ready" | "initializing" | {
5093
+ ready?: NonNullable<"idle" | "walkthrough" | "focused" | "printing">;
5094
+ }, never, never, never, never>) => T, compare: (a: T, b: T) => boolean): T;
5095
+ };
5096
+
4447
5097
  export declare function useEnabledFeatures(): EnabledFeatures;
4448
5098
 
4449
5099
  /**
@@ -4651,18 +5301,18 @@ declare type XYFlowInstance = ReactFlowInstance<Types.AnyNode, Types.AnyEdge>;
4651
5301
  declare type XYFLowInstance_2 = ReactFlowInstance<RelationshipDetailsTypes.AnyNode, RelationshipDetailsTypes.Edge>;
4652
5302
 
4653
5303
  declare type XYStoreApi = {
4654
- getState: () => XYStoreState;
4655
- setState: (state: Partial<XYStoreState> | ((state: XYStoreState) => Partial<XYStoreState>)) => void;
4656
- subscribe: (listener: (state: XYStoreState, prevState: XYStoreState) => void) => () => void;
5304
+ getState: () => XYStoreState_2;
5305
+ setState: (state: XYStoreState_2) => void;
4657
5306
  };
4658
5307
 
4659
5308
  declare type XYStoreApi_2 = {
4660
- getState: () => XYStoreState_2;
4661
- setState: (state: XYStoreState_2) => void;
5309
+ getState: () => XYStoreState_3;
4662
5310
  };
4663
5311
 
4664
5312
  declare type XYStoreApi_3 = {
4665
- getState: () => XYStoreState_3;
5313
+ getState: () => XYStoreState;
5314
+ setState: (state: Partial<XYStoreState> | ((state: XYStoreState) => Partial<XYStoreState>)) => void;
5315
+ subscribe: (listener: (state: XYStoreState, prevState: XYStoreState) => void) => () => void;
4666
5316
  };
4667
5317
 
4668
5318
  export declare type XYStoreState = ReactFlowState<Types.AnyNode, Types.AnyEdge>;