@likec4/diagram 1.23.1 → 1.24.1

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 (118) hide show
  1. package/dist/LikeC4Diagram.css.d.ts +5 -0
  2. package/dist/LikeC4Diagram.css.js +1 -0
  3. package/dist/LikeC4Diagram.d.ts +1 -1
  4. package/dist/LikeC4Diagram.js +6 -2
  5. package/dist/LikeC4Diagram.props.d.ts +6 -0
  6. package/dist/StaticLikeC4Diagram.js +2 -1
  7. package/dist/base/BaseXYFlow.d.ts +1 -1
  8. package/dist/base/BaseXYFlow.js +12 -3
  9. package/dist/base/const.d.ts +1 -1
  10. package/dist/base/const.js +1 -1
  11. package/dist/base/primitives/compound/CompoundActionButton.css.js +2 -0
  12. package/dist/base/primitives/compound/CompoundDetailsButton.css.js +2 -0
  13. package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +0 -1
  14. package/dist/base/primitives/compound/CompoundNodeContainer.css.js +4 -4
  15. package/dist/base/primitives/compound/CompoundNodeContainer.js +35 -22
  16. package/dist/base/primitives/compound/CompoundTitle.css.js +3 -1
  17. package/dist/base/primitives/customNode.js +1 -1
  18. package/dist/base/primitives/edge/EdgeContainer.js +5 -4
  19. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -1
  20. package/dist/base/primitives/edge/EdgeLabel.css.js +2 -5
  21. package/dist/base/primitives/edge/EdgeLabel.js +5 -5
  22. package/dist/base/primitives/edge/edge.css.d.ts +1 -1
  23. package/dist/base/primitives/edge/edge.css.js +4 -5
  24. package/dist/base/primitives/element/ElementActionButtons.css.js +2 -0
  25. package/dist/base/primitives/element/ElementActionButtons.js +4 -3
  26. package/dist/base/primitives/element/ElementDetailsButton.css.js +2 -0
  27. package/dist/base/primitives/element/ElementNodeContainer.css.js +2 -0
  28. package/dist/base/primitives/element/ElementNodeContainer.js +3 -1
  29. package/dist/base/primitives/element/ElementShape.css.js +4 -2
  30. package/dist/base/primitives/element/ElementShape.js +2 -3
  31. package/dist/base/primitives/element/ElementTitle.css.js +2 -0
  32. package/dist/base/primitives/element/styles.css.js +2 -0
  33. package/dist/components/SearchControl.css.js +2 -0
  34. package/dist/context/FramerMotionConfig.d.ts +9 -1
  35. package/dist/context/FramerMotionConfig.js +5 -2
  36. package/dist/context/RootContainer.js +13 -1
  37. package/dist/diagram.css +1 -1
  38. package/dist/globals.css.d.ts +2 -0
  39. package/dist/hooks/safeContext.js +1 -0
  40. package/dist/hooks/useDiagram.d.ts +415 -693
  41. package/dist/hooks/useDiagram.js +1 -0
  42. package/dist/hooks/useIsReducedGraphics.d.ts +4 -0
  43. package/dist/hooks/useIsReducedGraphics.js +8 -0
  44. package/dist/hooks/useXYFlow.js +1 -1
  45. package/dist/likec4diagram/DiagramUI.d.ts +2 -1
  46. package/dist/likec4diagram/DiagramUI.js +5 -3
  47. package/dist/likec4diagram/custom/nodes/nodeTypes.js +2 -2
  48. package/dist/likec4diagram/ui/controls/styles.css.js +2 -0
  49. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.js +2 -0
  50. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +3 -4
  51. package/dist/likec4diagram/ui/search/LikeC4Search.css.js +2 -0
  52. package/dist/overlays/element-details/ElementDetailsCard.js +12 -8
  53. package/dist/overlays/element-details/actor.d.ts +9084 -2569
  54. package/dist/overlays/overlay/Overlay.js +6 -3
  55. package/dist/overlays/relationship-details/RelationshipDetails.js +31 -17
  56. package/dist/overlays/relationship-details/actor.d.ts +228 -3
  57. package/dist/overlays/relationship-details/actor.js +86 -14
  58. package/dist/overlays/relationship-details/hooks.d.ts +3 -0
  59. package/dist/overlays/relationship-details/hooks.js +6 -2
  60. package/dist/overlays/relationships-browser/-useRelationshipsView.js +12 -3
  61. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +12 -3
  62. package/dist/overlays/relationships-browser/actor.d.ts +271 -54
  63. package/dist/overlays/relationships-browser/actor.js +86 -23
  64. package/dist/state/DiagramActorProvider.js +12 -2
  65. package/dist/state/diagram-machine.d.ts +426 -694
  66. package/dist/state/diagram-machine.js +89 -68
  67. package/dist/state/persistence.d.ts +5 -0
  68. package/dist/state/persistence.js +23 -0
  69. package/package.json +9 -9
  70. package/src/LikeC4Diagram.css.ts +13 -5
  71. package/src/LikeC4Diagram.props.ts +7 -0
  72. package/src/LikeC4Diagram.tsx +33 -24
  73. package/src/StaticLikeC4Diagram.tsx +2 -1
  74. package/src/base/BaseXYFlow.tsx +14 -9
  75. package/src/base/const.ts +1 -1
  76. package/src/base/primitives/compound/CompoundActionButton.css.ts +6 -0
  77. package/src/base/primitives/compound/CompoundDetailsButton.css.ts +4 -0
  78. package/src/base/primitives/compound/CompoundNodeContainer.css.ts +41 -59
  79. package/src/base/primitives/compound/CompoundNodeContainer.tsx +42 -22
  80. package/src/base/primitives/compound/CompoundTitle.css.ts +14 -13
  81. package/src/base/primitives/customNode.ts +3 -2
  82. package/src/base/primitives/edge/EdgeContainer.tsx +4 -3
  83. package/src/base/primitives/edge/EdgeLabel.css.ts +17 -11
  84. package/src/base/primitives/edge/EdgeLabel.tsx +4 -4
  85. package/src/base/primitives/edge/edge.css.ts +47 -27
  86. package/src/base/primitives/element/ElementActionButtons.css.ts +4 -0
  87. package/src/base/primitives/element/ElementActionButtons.tsx +4 -2
  88. package/src/base/primitives/element/ElementDetailsButton.css.ts +6 -8
  89. package/src/base/primitives/element/ElementNodeContainer.css.ts +18 -21
  90. package/src/base/primitives/element/ElementNodeContainer.tsx +3 -1
  91. package/src/base/primitives/element/ElementShape.css.ts +10 -6
  92. package/src/base/primitives/element/ElementShape.tsx +2 -2
  93. package/src/components/SearchControl.css.ts +11 -4
  94. package/src/context/FramerMotionConfig.tsx +13 -2
  95. package/src/context/RootContainer.tsx +9 -2
  96. package/src/globals.css.ts +3 -0
  97. package/src/hooks/safeContext.tsx +2 -1
  98. package/src/hooks/useDiagram.ts +1 -0
  99. package/src/hooks/useIsReducedGraphics.ts +5 -0
  100. package/src/hooks/useXYFlow.ts +1 -1
  101. package/src/likec4diagram/DiagramUI.tsx +5 -3
  102. package/src/likec4diagram/custom/nodes/nodeTypes.tsx +2 -2
  103. package/src/likec4diagram/ui/controls/styles.css.ts +11 -1
  104. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.ts +10 -3
  105. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +6 -3
  106. package/src/likec4diagram/ui/search/LikeC4Search.css.ts +1 -0
  107. package/src/overlays/element-details/ElementDetailsCard.tsx +238 -231
  108. package/src/overlays/overlay/Overlay.css.ts +1 -9
  109. package/src/overlays/overlay/Overlay.tsx +6 -3
  110. package/src/overlays/relationship-details/RelationshipDetails.tsx +83 -66
  111. package/src/overlays/relationship-details/actor.ts +106 -13
  112. package/src/overlays/relationship-details/hooks.ts +6 -2
  113. package/src/overlays/relationships-browser/-useRelationshipsView.ts +10 -0
  114. package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +16 -8
  115. package/src/overlays/relationships-browser/actor.ts +92 -22
  116. package/src/state/DiagramActorProvider.tsx +13 -2
  117. package/src/state/diagram-machine.ts +88 -65
  118. package/src/state/persistence.ts +22 -0
@@ -687,6 +687,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
687
687
  type: "trigger:OpenSource";
688
688
  params: OpenSourceParams;
689
689
  };
690
+ "assign lastClickedNode": {
691
+ type: "assign lastClickedNode";
692
+ params: NonReducibleUnknown;
693
+ };
694
+ "open source of focused or last clicked node": {
695
+ type: "open source of focused or last clicked node";
696
+ params: NonReducibleUnknown;
697
+ };
690
698
  "xyflow:setViewportCenter": {
691
699
  type: "xyflow:setViewportCenter";
692
700
  params: {
@@ -741,8 +749,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
741
749
  type: "is another view";
742
750
  params: unknown;
743
751
  };
744
- "click: selected node ": {
745
- type: "click: selected node ";
752
+ "click: selected node": {
753
+ type: "click: selected node";
746
754
  params: unknown;
747
755
  };
748
756
  "click: same node": {
@@ -753,9 +761,11 @@ export declare const diagramMachine: StateMachine<Context, Events, {
753
761
  type: "click: focused node";
754
762
  params: unknown;
755
763
  };
756
- }>, never, "initializing" | "idle" | "walkthrough" | "focused" | {
757
- navigating: "done" | "pending";
758
- }, string, Input, NonReducibleUnknown, EventObject, MetaObject, {
764
+ "click: node has connections": {
765
+ type: "click: node has connections";
766
+ params: unknown;
767
+ };
768
+ }>, never, "initializing" | "idle" | "walkthrough" | "focused" | "navigating", string, Input, NonReducibleUnknown, EventObject, MetaObject, {
759
769
  readonly initial: "initializing";
760
770
  readonly context: ({ input, self, spawn }: {
761
771
  spawn: {
@@ -1560,9 +1570,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
1560
1570
  enableLikeC4Model: boolean;
1561
1571
  enableVscode: boolean;
1562
1572
  };
1563
- toggledFeatures: {
1564
- enableReadOnly: true;
1565
- };
1573
+ toggledFeatures: Partial<EnabledFeatures>;
1566
1574
  initialized: false;
1567
1575
  viewportChangedManually: false;
1568
1576
  lastOnNavigate: null;
@@ -1977,6 +1985,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
1977
1985
  type: "trigger:OpenSource";
1978
1986
  params: OpenSourceParams;
1979
1987
  };
1988
+ "assign lastClickedNode": {
1989
+ type: "assign lastClickedNode";
1990
+ params: NonReducibleUnknown;
1991
+ };
1992
+ "open source of focused or last clicked node": {
1993
+ type: "open source of focused or last clicked node";
1994
+ params: NonReducibleUnknown;
1995
+ };
1980
1996
  "xyflow:setViewportCenter": {
1981
1997
  type: "xyflow:setViewportCenter";
1982
1998
  params: {
@@ -2031,8 +2047,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
2031
2047
  type: "is another view";
2032
2048
  params: unknown;
2033
2049
  };
2034
- "click: selected node ": {
2035
- type: "click: selected node ";
2050
+ "click: selected node": {
2051
+ type: "click: selected node";
2036
2052
  params: unknown;
2037
2053
  };
2038
2054
  "click: same node": {
@@ -2043,6 +2059,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
2043
2059
  type: "click: focused node";
2044
2060
  params: unknown;
2045
2061
  };
2062
+ "click: node has connections": {
2063
+ type: "click: node has connections";
2064
+ params: unknown;
2065
+ };
2046
2066
  }>, never, EventObject>;
2047
2067
  readonly target: "idle";
2048
2068
  };
@@ -2312,263 +2332,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
2312
2332
  }>, never, never, never, never>];
2313
2333
  readonly target: "focused";
2314
2334
  }, {
2315
- readonly actions: ActionFunction<Context, {
2316
- type: "xyflow.nodeClick";
2317
- node: Types.Node;
2318
- }, Events, undefined, Values<{
2319
- syncManualLayoutActorLogic: {
2320
- src: "syncManualLayoutActorLogic";
2321
- logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
2322
- type: "trigger:OnChange";
2323
- params: {
2324
- change: ViewChange;
2325
- };
2326
- }, {
2327
- type: "same view";
2328
- params: unknown;
2329
- }, "timeout", "paused" | "stopped" | "idle" | "synced" | "pending", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
2330
- readonly initial: "idle";
2331
- readonly context: ({ input }: {
2332
- spawn: {
2333
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
2334
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
2335
- id?: never;
2336
- systemId?: string;
2337
- input?: InputFrom<TLogic>;
2338
- syncSnapshot?: boolean;
2339
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
2340
- };
2341
- input: Input;
2342
- self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
2343
- }) => {
2344
- parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
2345
- viewId: ViewId;
2346
- };
2347
- readonly states: {
2348
- readonly idle: {
2349
- readonly tags: "ready";
2350
- readonly on: {
2351
- readonly sync: {
2352
- readonly target: "pending";
2353
- };
2354
- };
2355
- };
2356
- readonly paused: {
2357
- readonly tags: "pending";
2358
- readonly on: {
2359
- readonly sync: {
2360
- readonly target: "pending";
2361
- };
2362
- };
2363
- };
2364
- readonly pending: {
2365
- readonly tags: "pending";
2366
- readonly on: {
2367
- readonly sync: {
2368
- readonly target: "pending";
2369
- readonly reenter: true;
2370
- };
2371
- readonly cancel: {
2372
- readonly target: "paused";
2373
- };
2374
- };
2375
- readonly after: {
2376
- readonly timeout: readonly [{
2377
- readonly guard: "same view";
2378
- readonly actions: {
2379
- readonly type: "trigger:OnChange";
2380
- readonly params: ({ context }: {
2381
- context: Readonly< Input>;
2382
- event: SyncLayoutEvents;
2383
- }) => {
2384
- change: ViewChange.SaveManualLayout;
2385
- };
2386
- };
2387
- readonly target: "synced";
2388
- }, {
2389
- readonly target: "stopped";
2390
- }];
2391
- };
2392
- };
2393
- readonly synced: {
2394
- readonly tags: "ready";
2395
- readonly on: {
2396
- readonly sync: {
2397
- readonly target: "pending";
2398
- };
2399
- };
2400
- };
2401
- readonly stopped: {
2402
- readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
2403
- readonly type: "final";
2404
- };
2405
- };
2406
- readonly on: {
2407
- readonly synced: {
2408
- readonly target: ".synced";
2409
- };
2410
- readonly stop: {
2411
- readonly target: ".stopped";
2412
- };
2413
- };
2414
- }>;
2415
- id: "syncLayout";
2416
- };
2417
- hotkeyActorLogic: {
2418
- src: "hotkeyActorLogic";
2419
- logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
2420
- id: "hotkey";
2421
- };
2422
- overlaysActorLogic: {
2423
- src: "overlaysActorLogic";
2424
- logic: StateMachine<OverlaysContext, OverlayActorEvent, {
2425
- [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
2426
- [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
2427
- [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
2428
- hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
2429
- }, Values<{
2430
- elementDetails: {
2431
- src: "elementDetails";
2432
- logic: ElementDetailsLogic;
2433
- id: `elementDetails-${number}`;
2434
- };
2435
- relationshipDetails: {
2436
- src: "relationshipDetails";
2437
- logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
2438
- id: `relationshipDetails-${number}`;
2439
- };
2440
- relationshipsBrowser: {
2441
- src: "relationshipsBrowser";
2442
- logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
2443
- id: `relationshipsBrowser-${number}`;
2444
- };
2445
- hotkey: {
2446
- src: "hotkey";
2447
- logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
2448
- id: "hotkey";
2449
- };
2450
- }>, Values<{
2451
- closeLastOverlay: {
2452
- type: "closeLastOverlay";
2453
- params: NonReducibleUnknown;
2454
- };
2455
- closeSpecificOverlay: {
2456
- type: "closeSpecificOverlay";
2457
- params: {
2458
- actorId: string;
2459
- };
2460
- };
2461
- closeAllOverlays: {
2462
- type: "closeAllOverlays";
2463
- params: NonReducibleUnknown;
2464
- };
2465
- openElementDetails: {
2466
- type: "openElementDetails";
2467
- params: NonReducibleUnknown;
2468
- };
2469
- openRelationshipDetails: {
2470
- type: "openRelationshipDetails";
2471
- params: NonReducibleUnknown;
2472
- };
2473
- openRelationshipsBrowser: {
2474
- type: "openRelationshipsBrowser";
2475
- params: NonReducibleUnknown;
2476
- };
2477
- listenToEsc: {
2478
- type: "listenToEsc";
2479
- params: NonReducibleUnknown;
2480
- };
2481
- stopListeningToEsc: {
2482
- type: "stopListeningToEsc";
2483
- params: NonReducibleUnknown;
2484
- };
2485
- }>, Values<{
2486
- "has overlays?": {
2487
- type: "has overlays?";
2488
- params: unknown;
2489
- };
2490
- "close specific overlay?": {
2491
- type: "close specific overlay?";
2492
- params: unknown;
2493
- };
2494
- "last: is relationshipDetails?": {
2495
- type: "last: is relationshipDetails?";
2496
- params: unknown;
2497
- };
2498
- "last: is relationshipsBrowser?": {
2499
- type: "last: is relationshipsBrowser?";
2500
- params: unknown;
2501
- };
2502
- }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
2503
- readonly id: "overlays";
2504
- readonly context: () => {
2505
- seq: number;
2506
- overlays: never[];
2507
- };
2508
- readonly initial: "idle";
2509
- readonly on: {
2510
- readonly 'open.elementDetails': {
2511
- readonly actions: "openElementDetails";
2512
- readonly target: ".active";
2513
- readonly reenter: false;
2514
- };
2515
- readonly 'open.relationshipDetails': {
2516
- readonly actions: "openRelationshipDetails";
2517
- readonly target: ".active";
2518
- readonly reenter: false;
2519
- };
2520
- readonly 'open.relationshipsBrowser': {
2521
- readonly actions: "openRelationshipsBrowser";
2522
- readonly target: ".active";
2523
- readonly reenter: false;
2524
- };
2525
- };
2526
- readonly states: {
2527
- readonly idle: {};
2528
- readonly active: {
2529
- readonly entry: "listenToEsc";
2530
- readonly exit: "stopListeningToEsc";
2531
- readonly on: {
2532
- readonly close: readonly [{
2533
- readonly guard: "close specific overlay?";
2534
- readonly actions: {
2535
- readonly type: "closeSpecificOverlay";
2536
- readonly params: ({ event }: {
2537
- context: OverlaysContext;
2538
- event: {
2539
- type: "close";
2540
- actorId?: string | undefined;
2541
- };
2542
- }) => {
2543
- actorId: string;
2544
- };
2545
- };
2546
- readonly target: "closing";
2547
- }, {
2548
- readonly actions: "closeLastOverlay";
2549
- readonly target: "closing";
2550
- }];
2551
- readonly 'close.all': {
2552
- readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
2553
- readonly target: "idle";
2554
- };
2555
- };
2556
- };
2557
- readonly closing: {
2558
- readonly always: readonly [{
2559
- readonly guard: "has overlays?";
2560
- readonly target: "active";
2561
- }, {
2562
- readonly actions: "stopListeningToEsc";
2563
- readonly target: "idle";
2564
- }];
2565
- };
2566
- };
2567
- readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
2568
- }>;
2569
- id: "overlays";
2570
- };
2571
- }>, never, never, never, never>;
2335
+ readonly actions: readonly ["assign lastClickedNode", "open source of focused or last clicked node"];
2572
2336
  }];
2573
2337
  readonly 'xyflow.paneClick': {
2574
2338
  readonly actions: readonly [ ActionFunction<Context, {
@@ -3368,7 +3132,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
3368
3132
  }>;
3369
3133
  id: "overlays";
3370
3134
  };
3371
- }>, never, never, never, never>, ActionFunction<Context, Events, Events, undefined, Values<{
3135
+ }>, never, never, never, never>, "open source of focused or last clicked node", ActionFunction<Context, Events, Events, undefined, Values<{
3372
3136
  syncManualLayoutActorLogic: {
3373
3137
  src: "syncManualLayoutActorLogic";
3374
3138
  logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
@@ -3912,6 +3676,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
3912
3676
  type: "trigger:OpenSource";
3913
3677
  params: OpenSourceParams;
3914
3678
  };
3679
+ "assign lastClickedNode": {
3680
+ type: "assign lastClickedNode";
3681
+ params: NonReducibleUnknown;
3682
+ };
3683
+ "open source of focused or last clicked node": {
3684
+ type: "open source of focused or last clicked node";
3685
+ params: NonReducibleUnknown;
3686
+ };
3915
3687
  "xyflow:setViewportCenter": {
3916
3688
  type: "xyflow:setViewportCenter";
3917
3689
  params: {
@@ -3966,8 +3738,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
3966
3738
  type: "is another view";
3967
3739
  params: unknown;
3968
3740
  };
3969
- "click: selected node ": {
3970
- type: "click: selected node ";
3741
+ "click: selected node": {
3742
+ type: "click: selected node";
3971
3743
  params: unknown;
3972
3744
  };
3973
3745
  "click: same node": {
@@ -3978,6 +3750,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
3978
3750
  type: "click: focused node";
3979
3751
  params: unknown;
3980
3752
  };
3753
+ "click: node has connections": {
3754
+ type: "click: node has connections";
3755
+ params: unknown;
3756
+ };
3981
3757
  }>, never, EventObject>;
3982
3758
  readonly on: {
3983
3759
  readonly 'xyflow.nodeClick': readonly [{
@@ -4493,7 +4269,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
4493
4269
  }>;
4494
4270
  id: "overlays";
4495
4271
  };
4496
- }>, never, never, never, never>, {
4272
+ }>, never, never, never, never>, "open source of focused or last clicked node", {
4497
4273
  readonly type: "xyflow:fitDiagram";
4498
4274
  readonly params: typeof focusedBounds;
4499
4275
  }];
@@ -5008,7 +4784,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5008
4784
  }>;
5009
4785
  id: "overlays";
5010
4786
  };
5011
- }>, never, never, never, never>, {
4787
+ }>, never, never, never, never>, "open source of focused or last clicked node", {
5012
4788
  readonly type: "xyflow:fitDiagram";
5013
4789
  readonly params: typeof focusedBounds;
5014
4790
  }];
@@ -5247,50 +5023,316 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5247
5023
  actorId: string;
5248
5024
  };
5249
5025
  };
5250
- readonly target: "closing";
5251
- }, {
5252
- readonly actions: "closeLastOverlay";
5253
- readonly target: "closing";
5254
- }];
5255
- readonly 'close.all': {
5256
- readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
5257
- readonly target: "idle";
5026
+ readonly target: "closing";
5027
+ }, {
5028
+ readonly actions: "closeLastOverlay";
5029
+ readonly target: "closing";
5030
+ }];
5031
+ readonly 'close.all': {
5032
+ readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
5033
+ readonly target: "idle";
5034
+ };
5035
+ };
5036
+ };
5037
+ readonly closing: {
5038
+ readonly always: readonly [{
5039
+ readonly guard: "has overlays?";
5040
+ readonly target: "active";
5041
+ }, {
5042
+ readonly actions: "stopListeningToEsc";
5043
+ readonly target: "idle";
5044
+ }];
5045
+ };
5046
+ };
5047
+ readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
5048
+ }>;
5049
+ id: "overlays";
5050
+ };
5051
+ }>, never, never, never, never>;
5052
+ readonly target: "idle";
5053
+ };
5054
+ readonly 'saveManualLayout.*': {
5055
+ readonly guard: "not readonly";
5056
+ readonly actions: ActionFunction<Context, {
5057
+ type: "saveManualLayout.schedule";
5058
+ } | {
5059
+ type: "saveManualLayout.cancel";
5060
+ }, Events, undefined, never, never, never, never, never>;
5061
+ };
5062
+ };
5063
+ };
5064
+ readonly navigating: {
5065
+ readonly entry: readonly ["closeAllOverlays", "stopSyncLayout", {
5066
+ readonly type: "trigger:NavigateTo";
5067
+ readonly params: ({ context }: {
5068
+ context: Context;
5069
+ event: Events;
5070
+ }) => {
5071
+ viewId: ViewId;
5072
+ };
5073
+ }];
5074
+ readonly exit: ActionFunction<Context, Events, Events, undefined, Values<{
5075
+ syncManualLayoutActorLogic: {
5076
+ src: "syncManualLayoutActorLogic";
5077
+ logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
5078
+ type: "trigger:OnChange";
5079
+ params: {
5080
+ change: ViewChange;
5081
+ };
5082
+ }, {
5083
+ type: "same view";
5084
+ params: unknown;
5085
+ }, "timeout", "paused" | "stopped" | "idle" | "synced" | "pending", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
5086
+ readonly initial: "idle";
5087
+ readonly context: ({ input }: {
5088
+ spawn: {
5089
+ <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
5090
+ <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
5091
+ id?: never;
5092
+ systemId?: string;
5093
+ input?: InputFrom<TLogic>;
5094
+ syncSnapshot?: boolean;
5095
+ } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
5096
+ };
5097
+ input: Input;
5098
+ self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
5099
+ }) => {
5100
+ parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
5101
+ viewId: ViewId;
5102
+ };
5103
+ readonly states: {
5104
+ readonly idle: {
5105
+ readonly tags: "ready";
5106
+ readonly on: {
5107
+ readonly sync: {
5108
+ readonly target: "pending";
5109
+ };
5110
+ };
5111
+ };
5112
+ readonly paused: {
5113
+ readonly tags: "pending";
5114
+ readonly on: {
5115
+ readonly sync: {
5116
+ readonly target: "pending";
5117
+ };
5118
+ };
5119
+ };
5120
+ readonly pending: {
5121
+ readonly tags: "pending";
5122
+ readonly on: {
5123
+ readonly sync: {
5124
+ readonly target: "pending";
5125
+ readonly reenter: true;
5126
+ };
5127
+ readonly cancel: {
5128
+ readonly target: "paused";
5129
+ };
5130
+ };
5131
+ readonly after: {
5132
+ readonly timeout: readonly [{
5133
+ readonly guard: "same view";
5134
+ readonly actions: {
5135
+ readonly type: "trigger:OnChange";
5136
+ readonly params: ({ context }: {
5137
+ context: Readonly< Input>;
5138
+ event: SyncLayoutEvents;
5139
+ }) => {
5140
+ change: ViewChange.SaveManualLayout;
5141
+ };
5142
+ };
5143
+ readonly target: "synced";
5144
+ }, {
5145
+ readonly target: "stopped";
5146
+ }];
5147
+ };
5148
+ };
5149
+ readonly synced: {
5150
+ readonly tags: "ready";
5151
+ readonly on: {
5152
+ readonly sync: {
5153
+ readonly target: "pending";
5154
+ };
5155
+ };
5156
+ };
5157
+ readonly stopped: {
5158
+ readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
5159
+ readonly type: "final";
5160
+ };
5161
+ };
5162
+ readonly on: {
5163
+ readonly synced: {
5164
+ readonly target: ".synced";
5165
+ };
5166
+ readonly stop: {
5167
+ readonly target: ".stopped";
5168
+ };
5169
+ };
5170
+ }>;
5171
+ id: "syncLayout";
5172
+ };
5173
+ hotkeyActorLogic: {
5174
+ src: "hotkeyActorLogic";
5175
+ logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
5176
+ id: "hotkey";
5177
+ };
5178
+ overlaysActorLogic: {
5179
+ src: "overlaysActorLogic";
5180
+ logic: StateMachine<OverlaysContext, OverlayActorEvent, {
5181
+ [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
5182
+ [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
5183
+ [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
5184
+ hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
5185
+ }, Values<{
5186
+ elementDetails: {
5187
+ src: "elementDetails";
5188
+ logic: ElementDetailsLogic;
5189
+ id: `elementDetails-${number}`;
5190
+ };
5191
+ relationshipDetails: {
5192
+ src: "relationshipDetails";
5193
+ logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
5194
+ id: `relationshipDetails-${number}`;
5195
+ };
5196
+ relationshipsBrowser: {
5197
+ src: "relationshipsBrowser";
5198
+ logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
5199
+ id: `relationshipsBrowser-${number}`;
5200
+ };
5201
+ hotkey: {
5202
+ src: "hotkey";
5203
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
5204
+ id: "hotkey";
5205
+ };
5206
+ }>, Values<{
5207
+ closeLastOverlay: {
5208
+ type: "closeLastOverlay";
5209
+ params: NonReducibleUnknown;
5210
+ };
5211
+ closeSpecificOverlay: {
5212
+ type: "closeSpecificOverlay";
5213
+ params: {
5214
+ actorId: string;
5215
+ };
5216
+ };
5217
+ closeAllOverlays: {
5218
+ type: "closeAllOverlays";
5219
+ params: NonReducibleUnknown;
5220
+ };
5221
+ openElementDetails: {
5222
+ type: "openElementDetails";
5223
+ params: NonReducibleUnknown;
5224
+ };
5225
+ openRelationshipDetails: {
5226
+ type: "openRelationshipDetails";
5227
+ params: NonReducibleUnknown;
5228
+ };
5229
+ openRelationshipsBrowser: {
5230
+ type: "openRelationshipsBrowser";
5231
+ params: NonReducibleUnknown;
5232
+ };
5233
+ listenToEsc: {
5234
+ type: "listenToEsc";
5235
+ params: NonReducibleUnknown;
5236
+ };
5237
+ stopListeningToEsc: {
5238
+ type: "stopListeningToEsc";
5239
+ params: NonReducibleUnknown;
5240
+ };
5241
+ }>, Values<{
5242
+ "has overlays?": {
5243
+ type: "has overlays?";
5244
+ params: unknown;
5245
+ };
5246
+ "close specific overlay?": {
5247
+ type: "close specific overlay?";
5248
+ params: unknown;
5249
+ };
5250
+ "last: is relationshipDetails?": {
5251
+ type: "last: is relationshipDetails?";
5252
+ params: unknown;
5253
+ };
5254
+ "last: is relationshipsBrowser?": {
5255
+ type: "last: is relationshipsBrowser?";
5256
+ params: unknown;
5257
+ };
5258
+ }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
5259
+ readonly id: "overlays";
5260
+ readonly context: () => {
5261
+ seq: number;
5262
+ overlays: never[];
5263
+ };
5264
+ readonly initial: "idle";
5265
+ readonly on: {
5266
+ readonly 'open.elementDetails': {
5267
+ readonly actions: "openElementDetails";
5268
+ readonly target: ".active";
5269
+ readonly reenter: false;
5270
+ };
5271
+ readonly 'open.relationshipDetails': {
5272
+ readonly actions: "openRelationshipDetails";
5273
+ readonly target: ".active";
5274
+ readonly reenter: false;
5275
+ };
5276
+ readonly 'open.relationshipsBrowser': {
5277
+ readonly actions: "openRelationshipsBrowser";
5278
+ readonly target: ".active";
5279
+ readonly reenter: false;
5280
+ };
5281
+ };
5282
+ readonly states: {
5283
+ readonly idle: {};
5284
+ readonly active: {
5285
+ readonly entry: "listenToEsc";
5286
+ readonly exit: "stopListeningToEsc";
5287
+ readonly on: {
5288
+ readonly close: readonly [{
5289
+ readonly guard: "close specific overlay?";
5290
+ readonly actions: {
5291
+ readonly type: "closeSpecificOverlay";
5292
+ readonly params: ({ event }: {
5293
+ context: OverlaysContext;
5294
+ event: {
5295
+ type: "close";
5296
+ actorId?: string | undefined;
5297
+ };
5298
+ }) => {
5299
+ actorId: string;
5258
5300
  };
5259
5301
  };
5260
- };
5261
- readonly closing: {
5262
- readonly always: readonly [{
5263
- readonly guard: "has overlays?";
5264
- readonly target: "active";
5265
- }, {
5266
- readonly actions: "stopListeningToEsc";
5267
- readonly target: "idle";
5268
- }];
5302
+ readonly target: "closing";
5303
+ }, {
5304
+ readonly actions: "closeLastOverlay";
5305
+ readonly target: "closing";
5306
+ }];
5307
+ readonly 'close.all': {
5308
+ readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
5309
+ readonly target: "idle";
5269
5310
  };
5270
5311
  };
5271
- readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
5272
- }>;
5273
- id: "overlays";
5312
+ };
5313
+ readonly closing: {
5314
+ readonly always: readonly [{
5315
+ readonly guard: "has overlays?";
5316
+ readonly target: "active";
5317
+ }, {
5318
+ readonly actions: "stopListeningToEsc";
5319
+ readonly target: "idle";
5320
+ }];
5321
+ };
5274
5322
  };
5275
- }>, never, never, never, never>;
5276
- readonly target: "idle";
5323
+ readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
5324
+ }>;
5325
+ id: "overlays";
5277
5326
  };
5278
- readonly 'saveManualLayout.*': {
5279
- readonly guard: "not readonly";
5327
+ }>, never, never, never, never>;
5328
+ readonly on: {
5329
+ readonly 'update.view': {
5280
5330
  readonly actions: ActionFunction<Context, {
5281
- type: "saveManualLayout.schedule";
5282
- } | {
5283
- type: "saveManualLayout.cancel";
5284
- }, Events, undefined, never, never, never, never, never>;
5285
- };
5286
- };
5287
- };
5288
- readonly navigating: {
5289
- readonly initial: "pending";
5290
- readonly type: "compound";
5291
- readonly states: {
5292
- readonly pending: {
5293
- readonly entry: ActionFunction<Context, Events, Events, undefined, Values<{
5331
+ type: "update.view";
5332
+ view: DiagramView;
5333
+ xynodes: Types.Node[];
5334
+ xyedges: Types.Edge[];
5335
+ }, Events, undefined, Values<{
5294
5336
  syncManualLayoutActorLogic: {
5295
5337
  src: "syncManualLayoutActorLogic";
5296
5338
  logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
@@ -5577,6 +5619,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5577
5619
  type: "trigger:OpenSource";
5578
5620
  params: OpenSourceParams;
5579
5621
  };
5622
+ "assign lastClickedNode": {
5623
+ type: "assign lastClickedNode";
5624
+ params: NonReducibleUnknown;
5625
+ };
5626
+ "open source of focused or last clicked node": {
5627
+ type: "open source of focused or last clicked node";
5628
+ params: NonReducibleUnknown;
5629
+ };
5580
5630
  "xyflow:setViewportCenter": {
5581
5631
  type: "xyflow:setViewportCenter";
5582
5632
  params: {
@@ -5631,8 +5681,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5631
5681
  type: "is another view";
5632
5682
  params: unknown;
5633
5683
  };
5634
- "click: selected node ": {
5635
- type: "click: selected node ";
5684
+ "click: selected node": {
5685
+ type: "click: selected node";
5636
5686
  params: unknown;
5637
5687
  };
5638
5688
  "click: same node": {
@@ -5643,380 +5693,17 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5643
5693
  type: "click: focused node";
5644
5694
  params: unknown;
5645
5695
  };
5646
- }>, never, EventObject>;
5647
- readonly on: {
5648
- readonly 'update.view': {
5649
- readonly actions: ActionFunction<Context, {
5650
- type: "update.view";
5651
- view: DiagramView;
5652
- xynodes: Types.Node[];
5653
- xyedges: Types.Edge[];
5654
- }, Events, undefined, Values<{
5655
- syncManualLayoutActorLogic: {
5656
- src: "syncManualLayoutActorLogic";
5657
- logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
5658
- type: "trigger:OnChange";
5659
- params: {
5660
- change: ViewChange;
5661
- };
5662
- }, {
5663
- type: "same view";
5664
- params: unknown;
5665
- }, "timeout", "paused" | "stopped" | "idle" | "synced" | "pending", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
5666
- readonly initial: "idle";
5667
- readonly context: ({ input }: {
5668
- spawn: {
5669
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
5670
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
5671
- id?: never;
5672
- systemId?: string;
5673
- input?: InputFrom<TLogic>;
5674
- syncSnapshot?: boolean;
5675
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
5676
- };
5677
- input: Input;
5678
- self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
5679
- }) => {
5680
- parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
5681
- viewId: ViewId;
5682
- };
5683
- readonly states: {
5684
- readonly idle: {
5685
- readonly tags: "ready";
5686
- readonly on: {
5687
- readonly sync: {
5688
- readonly target: "pending";
5689
- };
5690
- };
5691
- };
5692
- readonly paused: {
5693
- readonly tags: "pending";
5694
- readonly on: {
5695
- readonly sync: {
5696
- readonly target: "pending";
5697
- };
5698
- };
5699
- };
5700
- readonly pending: {
5701
- readonly tags: "pending";
5702
- readonly on: {
5703
- readonly sync: {
5704
- readonly target: "pending";
5705
- readonly reenter: true;
5706
- };
5707
- readonly cancel: {
5708
- readonly target: "paused";
5709
- };
5710
- };
5711
- readonly after: {
5712
- readonly timeout: readonly [{
5713
- readonly guard: "same view";
5714
- readonly actions: {
5715
- readonly type: "trigger:OnChange";
5716
- readonly params: ({ context }: {
5717
- context: Readonly< Input>;
5718
- event: SyncLayoutEvents;
5719
- }) => {
5720
- change: ViewChange.SaveManualLayout;
5721
- };
5722
- };
5723
- readonly target: "synced";
5724
- }, {
5725
- readonly target: "stopped";
5726
- }];
5727
- };
5728
- };
5729
- readonly synced: {
5730
- readonly tags: "ready";
5731
- readonly on: {
5732
- readonly sync: {
5733
- readonly target: "pending";
5734
- };
5735
- };
5736
- };
5737
- readonly stopped: {
5738
- readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
5739
- readonly type: "final";
5740
- };
5741
- };
5742
- readonly on: {
5743
- readonly synced: {
5744
- readonly target: ".synced";
5745
- };
5746
- readonly stop: {
5747
- readonly target: ".stopped";
5748
- };
5749
- };
5750
- }>;
5751
- id: "syncLayout";
5752
- };
5753
- hotkeyActorLogic: {
5754
- src: "hotkeyActorLogic";
5755
- logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
5756
- id: "hotkey";
5757
- };
5758
- overlaysActorLogic: {
5759
- src: "overlaysActorLogic";
5760
- logic: StateMachine<OverlaysContext, OverlayActorEvent, {
5761
- [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
5762
- [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
5763
- [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
5764
- hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
5765
- }, Values<{
5766
- elementDetails: {
5767
- src: "elementDetails";
5768
- logic: ElementDetailsLogic;
5769
- id: `elementDetails-${number}`;
5770
- };
5771
- relationshipDetails: {
5772
- src: "relationshipDetails";
5773
- logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
5774
- id: `relationshipDetails-${number}`;
5775
- };
5776
- relationshipsBrowser: {
5777
- src: "relationshipsBrowser";
5778
- logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
5779
- id: `relationshipsBrowser-${number}`;
5780
- };
5781
- hotkey: {
5782
- src: "hotkey";
5783
- logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
5784
- id: "hotkey";
5785
- };
5786
- }>, Values<{
5787
- closeLastOverlay: {
5788
- type: "closeLastOverlay";
5789
- params: NonReducibleUnknown;
5790
- };
5791
- closeSpecificOverlay: {
5792
- type: "closeSpecificOverlay";
5793
- params: {
5794
- actorId: string;
5795
- };
5796
- };
5797
- closeAllOverlays: {
5798
- type: "closeAllOverlays";
5799
- params: NonReducibleUnknown;
5800
- };
5801
- openElementDetails: {
5802
- type: "openElementDetails";
5803
- params: NonReducibleUnknown;
5804
- };
5805
- openRelationshipDetails: {
5806
- type: "openRelationshipDetails";
5807
- params: NonReducibleUnknown;
5808
- };
5809
- openRelationshipsBrowser: {
5810
- type: "openRelationshipsBrowser";
5811
- params: NonReducibleUnknown;
5812
- };
5813
- listenToEsc: {
5814
- type: "listenToEsc";
5815
- params: NonReducibleUnknown;
5816
- };
5817
- stopListeningToEsc: {
5818
- type: "stopListeningToEsc";
5819
- params: NonReducibleUnknown;
5820
- };
5821
- }>, Values<{
5822
- "has overlays?": {
5823
- type: "has overlays?";
5824
- params: unknown;
5825
- };
5826
- "close specific overlay?": {
5827
- type: "close specific overlay?";
5828
- params: unknown;
5829
- };
5830
- "last: is relationshipDetails?": {
5831
- type: "last: is relationshipDetails?";
5832
- params: unknown;
5833
- };
5834
- "last: is relationshipsBrowser?": {
5835
- type: "last: is relationshipsBrowser?";
5836
- params: unknown;
5837
- };
5838
- }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
5839
- readonly id: "overlays";
5840
- readonly context: () => {
5841
- seq: number;
5842
- overlays: never[];
5843
- };
5844
- readonly initial: "idle";
5845
- readonly on: {
5846
- readonly 'open.elementDetails': {
5847
- readonly actions: "openElementDetails";
5848
- readonly target: ".active";
5849
- readonly reenter: false;
5850
- };
5851
- readonly 'open.relationshipDetails': {
5852
- readonly actions: "openRelationshipDetails";
5853
- readonly target: ".active";
5854
- readonly reenter: false;
5855
- };
5856
- readonly 'open.relationshipsBrowser': {
5857
- readonly actions: "openRelationshipsBrowser";
5858
- readonly target: ".active";
5859
- readonly reenter: false;
5860
- };
5861
- };
5862
- readonly states: {
5863
- readonly idle: {};
5864
- readonly active: {
5865
- readonly entry: "listenToEsc";
5866
- readonly exit: "stopListeningToEsc";
5867
- readonly on: {
5868
- readonly close: readonly [{
5869
- readonly guard: "close specific overlay?";
5870
- readonly actions: {
5871
- readonly type: "closeSpecificOverlay";
5872
- readonly params: ({ event }: {
5873
- context: OverlaysContext;
5874
- event: {
5875
- type: "close";
5876
- actorId?: string | undefined;
5877
- };
5878
- }) => {
5879
- actorId: string;
5880
- };
5881
- };
5882
- readonly target: "closing";
5883
- }, {
5884
- readonly actions: "closeLastOverlay";
5885
- readonly target: "closing";
5886
- }];
5887
- readonly 'close.all': {
5888
- readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
5889
- readonly target: "idle";
5890
- };
5891
- };
5892
- };
5893
- readonly closing: {
5894
- readonly always: readonly [{
5895
- readonly guard: "has overlays?";
5896
- readonly target: "active";
5897
- }, {
5898
- readonly actions: "stopListeningToEsc";
5899
- readonly target: "idle";
5900
- }];
5901
- };
5902
- };
5903
- readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
5904
- }>;
5905
- id: "overlays";
5906
- };
5907
- }>, Values<{
5908
- "xyflow:fitDiagram": {
5909
- type: "xyflow:fitDiagram";
5910
- params: {
5911
- duration?: number;
5912
- bounds?: BBox;
5913
- } | undefined;
5914
- };
5915
- closeAllOverlays: {
5916
- type: "closeAllOverlays";
5917
- params: NonReducibleUnknown;
5918
- };
5919
- "layout.align": {
5920
- type: "layout.align";
5921
- params: {
5922
- mode: AlignmentMode;
5923
- };
5924
- };
5925
- "trigger:OnChange": {
5926
- type: "trigger:OnChange";
5927
- params: {
5928
- change: ViewChange;
5929
- };
5930
- };
5931
- "trigger:NavigateTo": {
5932
- type: "trigger:NavigateTo";
5933
- params: {
5934
- viewId: ViewId;
5935
- };
5936
- };
5937
- "trigger:OpenSource": {
5938
- type: "trigger:OpenSource";
5939
- params: OpenSourceParams;
5940
- };
5941
- "xyflow:setViewportCenter": {
5942
- type: "xyflow:setViewportCenter";
5943
- params: {
5944
- x: number;
5945
- y: number;
5946
- };
5947
- };
5948
- "xyflow:setViewport": {
5949
- type: "xyflow:setViewport";
5950
- params: {
5951
- viewport: Viewport;
5952
- duration?: number;
5953
- };
5954
- };
5955
- "xyflow:alignNodeFromToAfterNavigate": {
5956
- type: "xyflow:alignNodeFromToAfterNavigate";
5957
- params: {
5958
- fromNode: NodeId;
5959
- toPosition: XYPoint;
5960
- };
5961
- };
5962
- updateFeatures: {
5963
- type: "updateFeatures";
5964
- params: NonReducibleUnknown;
5965
- };
5966
- stopSyncLayout: {
5967
- type: "stopSyncLayout";
5968
- params: NonReducibleUnknown;
5969
- };
5970
- }>, Values<{
5971
- "enabled: FitView": {
5972
- type: "enabled: FitView";
5973
- params: unknown;
5974
- };
5975
- "enabled: FocusMode": {
5976
- type: "enabled: FocusMode";
5977
- params: unknown;
5978
- };
5979
- "enabled: Readonly": {
5980
- type: "enabled: Readonly";
5981
- params: unknown;
5982
- };
5983
- "not readonly": {
5984
- type: "not readonly";
5985
- params: unknown;
5986
- };
5987
- "is dynamic view": {
5988
- type: "is dynamic view";
5989
- params: unknown;
5990
- };
5991
- "is another view": {
5992
- type: "is another view";
5993
- params: unknown;
5994
- };
5995
- "click: selected node ": {
5996
- type: "click: selected node ";
5997
- params: unknown;
5998
- };
5999
- "click: same node": {
6000
- type: "click: same node";
6001
- params: unknown;
6002
- };
6003
- "click: focused node": {
6004
- type: "click: focused node";
6005
- params: unknown;
6006
- };
6007
- }>, never, EventObject>;
6008
- readonly target: "done";
5696
+ "click: node has connections": {
5697
+ type: "click: node has connections";
5698
+ params: unknown;
6009
5699
  };
6010
- };
6011
- };
6012
- readonly done: {
6013
- readonly type: "final";
5700
+ }>, never, EventObject>;
5701
+ readonly target: "#idle";
6014
5702
  };
6015
5703
  };
6016
- readonly onDone: {
6017
- readonly target: "idle";
6018
- };
6019
- readonly exit: ActionFunction<Context, Events, Events, undefined, Values<{
5704
+ };
5705
+ readonly walkthrough: {
5706
+ readonly entry: readonly [ ActionFunction<Context, Events, Events, undefined, Values<{
6020
5707
  syncManualLayoutActorLogic: {
6021
5708
  src: "syncManualLayoutActorLogic";
6022
5709
  logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
@@ -6269,10 +5956,7 @@ export declare const diagramMachine: StateMachine<Context, Events, {
6269
5956
  }>;
6270
5957
  id: "overlays";
6271
5958
  };
6272
- }>, never, never, never, never>;
6273
- };
6274
- readonly walkthrough: {
6275
- readonly entry: readonly [ ActionFunction<Context, Events, Events, undefined, Values<{
5959
+ }>, never, never, never, never>, ActionFunction<Context, Events, Events, undefined, Values<{
6276
5960
  syncManualLayoutActorLogic: {
6277
5961
  src: "syncManualLayoutActorLogic";
6278
5962
  logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
@@ -7083,6 +6767,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7083
6767
  type: "trigger:OpenSource";
7084
6768
  params: OpenSourceParams;
7085
6769
  };
6770
+ "assign lastClickedNode": {
6771
+ type: "assign lastClickedNode";
6772
+ params: NonReducibleUnknown;
6773
+ };
6774
+ "open source of focused or last clicked node": {
6775
+ type: "open source of focused or last clicked node";
6776
+ params: NonReducibleUnknown;
6777
+ };
7086
6778
  "xyflow:setViewportCenter": {
7087
6779
  type: "xyflow:setViewportCenter";
7088
6780
  params: {
@@ -7137,8 +6829,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7137
6829
  type: "is another view";
7138
6830
  params: unknown;
7139
6831
  };
7140
- "click: selected node ": {
7141
- type: "click: selected node ";
6832
+ "click: selected node": {
6833
+ type: "click: selected node";
7142
6834
  params: unknown;
7143
6835
  };
7144
6836
  "click: same node": {
@@ -7149,6 +6841,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7149
6841
  type: "click: focused node";
7150
6842
  params: unknown;
7151
6843
  };
6844
+ "click: node has connections": {
6845
+ type: "click: node has connections";
6846
+ params: unknown;
6847
+ };
7152
6848
  }>, never, EventObject>;
7153
6849
  };
7154
6850
  readonly 'walkthrough.end': {
@@ -7452,6 +7148,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7452
7148
  type: "trigger:OpenSource";
7453
7149
  params: OpenSourceParams;
7454
7150
  };
7151
+ "assign lastClickedNode": {
7152
+ type: "assign lastClickedNode";
7153
+ params: NonReducibleUnknown;
7154
+ };
7155
+ "open source of focused or last clicked node": {
7156
+ type: "open source of focused or last clicked node";
7157
+ params: NonReducibleUnknown;
7158
+ };
7455
7159
  "xyflow:setViewportCenter": {
7456
7160
  type: "xyflow:setViewportCenter";
7457
7161
  params: {
@@ -7506,8 +7210,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7506
7210
  type: "is another view";
7507
7211
  params: unknown;
7508
7212
  };
7509
- "click: selected node ": {
7510
- type: "click: selected node ";
7213
+ "click: selected node": {
7214
+ type: "click: selected node";
7511
7215
  params: unknown;
7512
7216
  };
7513
7217
  "click: same node": {
@@ -7518,6 +7222,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
7518
7222
  type: "click: focused node";
7519
7223
  params: unknown;
7520
7224
  };
7225
+ "click: node has connections": {
7226
+ type: "click: node has connections";
7227
+ params: unknown;
7228
+ };
7521
7229
  }>, never, EventObject>;
7522
7230
  };
7523
7231
  };
@@ -9642,6 +9350,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9642
9350
  type: "trigger:OpenSource";
9643
9351
  params: OpenSourceParams;
9644
9352
  };
9353
+ "assign lastClickedNode": {
9354
+ type: "assign lastClickedNode";
9355
+ params: NonReducibleUnknown;
9356
+ };
9357
+ "open source of focused or last clicked node": {
9358
+ type: "open source of focused or last clicked node";
9359
+ params: NonReducibleUnknown;
9360
+ };
9645
9361
  "xyflow:setViewportCenter": {
9646
9362
  type: "xyflow:setViewportCenter";
9647
9363
  params: {
@@ -9696,8 +9412,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9696
9412
  type: "is another view";
9697
9413
  params: unknown;
9698
9414
  };
9699
- "click: selected node ": {
9700
- type: "click: selected node ";
9415
+ "click: selected node": {
9416
+ type: "click: selected node";
9701
9417
  params: unknown;
9702
9418
  };
9703
9419
  "click: same node": {
@@ -9708,6 +9424,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9708
9424
  type: "click: focused node";
9709
9425
  params: unknown;
9710
9426
  };
9427
+ "click: node has connections": {
9428
+ type: "click: node has connections";
9429
+ params: unknown;
9430
+ };
9711
9431
  }>, never, EventObject>];
9712
9432
  };
9713
9433
  readonly 'update.inputs': {
@@ -11063,6 +10783,14 @@ export declare const diagramMachine: StateMachine<Context, Events, {
11063
10783
  type: "trigger:OpenSource";
11064
10784
  params: OpenSourceParams;
11065
10785
  };
10786
+ "assign lastClickedNode": {
10787
+ type: "assign lastClickedNode";
10788
+ params: NonReducibleUnknown;
10789
+ };
10790
+ "open source of focused or last clicked node": {
10791
+ type: "open source of focused or last clicked node";
10792
+ params: NonReducibleUnknown;
10793
+ };
11066
10794
  "xyflow:setViewportCenter": {
11067
10795
  type: "xyflow:setViewportCenter";
11068
10796
  params: {
@@ -11117,8 +10845,8 @@ export declare const diagramMachine: StateMachine<Context, Events, {
11117
10845
  type: "is another view";
11118
10846
  params: unknown;
11119
10847
  };
11120
- "click: selected node ": {
11121
- type: "click: selected node ";
10848
+ "click: selected node": {
10849
+ type: "click: selected node";
11122
10850
  params: unknown;
11123
10851
  };
11124
10852
  "click: same node": {
@@ -11129,6 +10857,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
11129
10857
  type: "click: focused node";
11130
10858
  params: unknown;
11131
10859
  };
10860
+ "click: node has connections": {
10861
+ type: "click: node has connections";
10862
+ params: unknown;
10863
+ };
11132
10864
  }>, never, EventObject>;
11133
10865
  };
11134
10866
  readonly 'open.relationshipsBrowser': {