@likec4/diagram 1.27.0 → 1.27.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 (57) hide show
  1. package/bundle/index.js +327 -281
  2. package/dist/LikeC4Diagram.js +2 -8
  3. package/dist/base/primitives/compound/CompoundNodeContainer.js +1 -1
  4. package/dist/base/primitives/edge/EdgeLabel.css.js +1 -4
  5. package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -1
  6. package/dist/base/primitives/edge/EdgePath.js +0 -3
  7. package/dist/base/primitives/edge/edge.css.js +2 -0
  8. package/dist/base/primitives/element/ElementNodeContainer.css.js +1 -0
  9. package/dist/base/primitives/element/ElementShape.css.js +1 -12
  10. package/dist/base/primitives/element/ElementTitle.css.js +3 -2
  11. package/dist/base/types.js +2 -2
  12. package/dist/components/Link.js +1 -1
  13. package/dist/hooks/useDiagram.d.ts +320 -490
  14. package/dist/likec4diagram/DiagramXYFlow.js +10 -9
  15. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +30 -41
  16. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +1 -1
  17. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +6 -1
  18. package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +13 -5
  19. package/dist/likec4diagram/useLayoutConstraints.d.ts +11 -10
  20. package/dist/likec4diagram/useLayoutConstraints.js +64 -61
  21. package/dist/overlays/Overlays.js +2 -2
  22. package/dist/overlays/overlay/Overlay.css.js +31 -12
  23. package/dist/overlays/overlay/Overlay.js +30 -27
  24. package/dist/overlays/relationship-details/useLayoutedDetails.js +1 -1
  25. package/dist/overlays/relationships-browser/SelectElement.js +4 -4
  26. package/dist/state/DiagramActorProvider.d.ts +4 -2
  27. package/dist/state/DiagramActorProvider.js +30 -37
  28. package/dist/state/assign.js +2 -2
  29. package/dist/state/diagram-machine.d.ts +450 -608
  30. package/dist/state/diagram-machine.js +87 -57
  31. package/dist/styles.css.js +1 -1
  32. package/package.json +5 -5
  33. package/src/LikeC4Diagram.tsx +1 -7
  34. package/src/base/primitives/compound/CompoundNodeContainer.tsx +1 -1
  35. package/src/base/primitives/edge/EdgeLabel.css.ts +1 -4
  36. package/src/base/primitives/edge/EdgeLabelContainer.tsx +1 -1
  37. package/src/base/primitives/edge/EdgePath.tsx +0 -3
  38. package/src/base/primitives/edge/edge.css.ts +2 -0
  39. package/src/base/primitives/element/ElementNodeContainer.css.ts +1 -0
  40. package/src/base/primitives/element/ElementShape.css.ts +1 -12
  41. package/src/base/primitives/element/ElementTitle.css.ts +3 -2
  42. package/src/base/types.ts +2 -7
  43. package/src/components/Link.tsx +3 -1
  44. package/src/likec4diagram/DiagramXYFlow.tsx +11 -9
  45. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +39 -48
  46. package/src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx +2 -2
  47. package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +5 -0
  48. package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +8 -4
  49. package/src/likec4diagram/useLayoutConstraints.ts +84 -89
  50. package/src/overlays/Overlays.tsx +2 -2
  51. package/src/overlays/overlay/Overlay.css.ts +30 -12
  52. package/src/overlays/overlay/Overlay.tsx +35 -29
  53. package/src/overlays/relationship-details/useLayoutedDetails.ts +1 -1
  54. package/src/overlays/relationships-browser/SelectElement.tsx +5 -5
  55. package/src/state/DiagramActorProvider.tsx +40 -50
  56. package/src/state/assign.ts +2 -2
  57. package/src/state/diagram-machine.ts +100 -69
@@ -285,7 +285,7 @@ export declare function useDiagram(): {
285
285
  };
286
286
  readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
287
287
  }>>;
288
- }, "initializing" | "navigating" | {
288
+ }, "isReady" | "initializing" | "navigating" | {
289
289
  ready: "idle" | "walkthrough" | "focused";
290
290
  }, string, NonReducibleUnknown, MetaObject, {
291
291
  readonly initial: "initializing";
@@ -1074,6 +1074,8 @@ export declare function useDiagram(): {
1074
1074
  input: Input;
1075
1075
  self: ActorRef<MachineSnapshot<DiagramContext, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
1076
1076
  }) => {
1077
+ xyedges: never[];
1078
+ xynodes: never[];
1077
1079
  features: {
1078
1080
  enableControls: boolean;
1079
1081
  enableReadOnly: boolean;
@@ -1093,7 +1095,10 @@ export declare function useDiagram(): {
1093
1095
  enableVscode: boolean;
1094
1096
  };
1095
1097
  toggledFeatures: Partial< EnabledFeatures>;
1096
- initialized: false;
1098
+ initialized: {
1099
+ xydata: false;
1100
+ xyflow: false;
1101
+ };
1097
1102
  viewportChangedManually: false;
1098
1103
  lastOnNavigate: null;
1099
1104
  lastClickedNode: null;
@@ -1110,104 +1115,9 @@ export declare function useDiagram(): {
1110
1115
  zoom: number;
1111
1116
  };
1112
1117
  xyflow: null;
1113
- syncLayoutActorRef: ActorRefFromLogic<StateMachine<Readonly< Input>, Events, {}, never, {
1114
- type: "trigger:OnChange";
1115
- params: {
1116
- change: ViewChange;
1117
- };
1118
- }, {
1119
- type: "same view";
1120
- params: unknown;
1121
- }, "timeout", "stopped" | "idle" | "synced" | "pending" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
1122
- readonly initial: "idle";
1123
- readonly context: ({ input }: {
1124
- spawn: {
1125
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
1126
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
1127
- id?: never;
1128
- systemId?: string;
1129
- input?: InputFrom<TLogic>;
1130
- syncSnapshot?: boolean;
1131
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
1132
- };
1133
- input: Input;
1134
- self: ActorRef<MachineSnapshot<Readonly< Input>, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
1135
- }) => {
1136
- parent: ActorRef<MachineSnapshot<DiagramContext, Events, any, any, any, any, any, any>, Events, any>;
1137
- viewId: ViewId;
1138
- };
1139
- readonly states: {
1140
- readonly idle: {
1141
- readonly tags: "ready";
1142
- readonly on: {
1143
- readonly sync: {
1144
- readonly target: "pending";
1145
- };
1146
- };
1147
- };
1148
- readonly paused: {
1149
- readonly tags: "pending";
1150
- readonly on: {
1151
- readonly sync: {
1152
- readonly target: "pending";
1153
- };
1154
- };
1155
- };
1156
- readonly pending: {
1157
- readonly tags: "pending";
1158
- readonly on: {
1159
- readonly sync: {
1160
- readonly target: "pending";
1161
- readonly reenter: true;
1162
- };
1163
- readonly cancel: {
1164
- readonly target: "paused";
1165
- };
1166
- };
1167
- readonly after: {
1168
- readonly timeout: readonly [{
1169
- readonly guard: "same view";
1170
- readonly actions: {
1171
- readonly type: "trigger:OnChange";
1172
- readonly params: ({ context }: {
1173
- context: Readonly< Input>;
1174
- event: Events;
1175
- }) => {
1176
- change: import("@likec4/core").ViewChange.SaveManualLayout;
1177
- };
1178
- };
1179
- readonly target: "synced";
1180
- }, {
1181
- readonly target: "stopped";
1182
- }];
1183
- };
1184
- };
1185
- readonly synced: {
1186
- readonly tags: "ready";
1187
- readonly on: {
1188
- readonly sync: {
1189
- readonly target: "pending";
1190
- };
1191
- };
1192
- };
1193
- readonly stopped: {
1194
- readonly entry: ActionFunction<Readonly< Input>, Events, Events, undefined, never, never, never, never, never>;
1195
- readonly type: "final";
1196
- };
1197
- };
1198
- readonly on: {
1199
- readonly synced: {
1200
- readonly target: ".synced";
1201
- };
1202
- readonly stop: {
1203
- readonly target: ".stopped";
1204
- };
1205
- };
1206
- }>>;
1118
+ syncLayoutActorRef: null;
1207
1119
  activeWalkthrough: null;
1208
1120
  view: DiagramView;
1209
- xynodes: Types.Node[];
1210
- xyedges: Types.Edge[];
1211
1121
  xystore: {
1212
1122
  getState: () => ReactFlowState<Types.Node, {
1213
1123
  id: string;
@@ -1584,12 +1494,13 @@ export declare function useDiagram(): {
1584
1494
  zoomable: boolean;
1585
1495
  pannable: boolean;
1586
1496
  fitViewPadding: number;
1497
+ nodesSelectable: boolean;
1587
1498
  };
1588
1499
  readonly states: {
1589
1500
  readonly initializing: {
1590
1501
  readonly on: {
1591
1502
  readonly 'xyflow.init': {
1592
- readonly actions: readonly [ ActionFunction<DiagramContext, {
1503
+ readonly actions: ActionFunction<DiagramContext, {
1593
1504
  type: "xyflow.init";
1594
1505
  instance: ReactFlowInstance<Types.Node, Types.Edge>;
1595
1506
  }, Events, undefined, Values<{
@@ -1845,9 +1756,15 @@ export declare function useDiagram(): {
1845
1756
  }>;
1846
1757
  id: "overlays";
1847
1758
  };
1848
- }>, never, never, never, never>, ActionFunction<DiagramContext, {
1849
- type: "xyflow.init";
1850
- instance: ReactFlowInstance<Types.Node, Types.Edge>;
1759
+ }>, never, never, never, never>;
1760
+ readonly target: "isReady";
1761
+ };
1762
+ readonly 'update.view': {
1763
+ readonly actions: ActionFunction<DiagramContext, {
1764
+ type: "update.view";
1765
+ view: DiagramView;
1766
+ xynodes: Types.Node[];
1767
+ xyedges: Types.Edge[];
1851
1768
  }, Events, undefined, Values<{
1852
1769
  syncManualLayoutActorLogic: {
1853
1770
  src: "syncManualLayoutActorLogic";
@@ -2101,150 +2018,277 @@ export declare function useDiagram(): {
2101
2018
  }>;
2102
2019
  id: "overlays";
2103
2020
  };
2104
- }>, Values<{
2105
- onNodeMouseEnter: {
2106
- type: "onNodeMouseEnter";
2021
+ }>, never, never, never, never>;
2022
+ readonly target: "isReady";
2023
+ };
2024
+ };
2025
+ };
2026
+ readonly isReady: {
2027
+ readonly always: readonly [{
2028
+ readonly guard: "isReady";
2029
+ readonly actions: readonly [{
2030
+ readonly type: "xyflow:fitDiagram";
2031
+ readonly params: {
2032
+ readonly duration: 0;
2033
+ };
2034
+ }, "startSyncLayout", ActionFunction<DiagramContext, Events, Events, undefined, Values<{
2035
+ syncManualLayoutActorLogic: {
2036
+ src: "syncManualLayoutActorLogic";
2037
+ logic: StateMachine<Readonly< Input>, Events, {}, never, {
2038
+ type: "trigger:OnChange";
2107
2039
  params: {
2108
- node: Types.Node;
2040
+ change: ViewChange;
2109
2041
  };
2110
- };
2111
- onNodeMouseLeave: {
2112
- type: "onNodeMouseLeave";
2113
- params: {
2114
- node: Types.Node;
2042
+ }, {
2043
+ type: "same view";
2044
+ params: unknown;
2045
+ }, "timeout", "stopped" | "idle" | "synced" | "pending" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
2046
+ readonly initial: "idle";
2047
+ readonly context: ({ input }: {
2048
+ spawn: {
2049
+ <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
2050
+ <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
2051
+ id?: never;
2052
+ systemId?: string;
2053
+ input?: InputFrom<TLogic>;
2054
+ syncSnapshot?: boolean;
2055
+ } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
2056
+ };
2057
+ input: Input;
2058
+ self: ActorRef<MachineSnapshot<Readonly< Input>, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
2059
+ }) => {
2060
+ parent: ActorRef<MachineSnapshot<DiagramContext, Events, any, any, any, any, any, any>, Events, any>;
2061
+ viewId: ViewId;
2115
2062
  };
2116
- };
2117
- onEdgeMouseEnter: {
2118
- type: "onEdgeMouseEnter";
2119
- params: {
2120
- edge: Types.Edge;
2063
+ readonly states: {
2064
+ readonly idle: {
2065
+ readonly tags: "ready";
2066
+ readonly on: {
2067
+ readonly sync: {
2068
+ readonly target: "pending";
2069
+ };
2070
+ };
2071
+ };
2072
+ readonly paused: {
2073
+ readonly tags: "pending";
2074
+ readonly on: {
2075
+ readonly sync: {
2076
+ readonly target: "pending";
2077
+ };
2078
+ };
2079
+ };
2080
+ readonly pending: {
2081
+ readonly tags: "pending";
2082
+ readonly on: {
2083
+ readonly sync: {
2084
+ readonly target: "pending";
2085
+ readonly reenter: true;
2086
+ };
2087
+ readonly cancel: {
2088
+ readonly target: "paused";
2089
+ };
2090
+ };
2091
+ readonly after: {
2092
+ readonly timeout: readonly [{
2093
+ readonly guard: "same view";
2094
+ readonly actions: {
2095
+ readonly type: "trigger:OnChange";
2096
+ readonly params: ({ context }: {
2097
+ context: Readonly< Input>;
2098
+ event: Events;
2099
+ }) => {
2100
+ change: import("@likec4/core").ViewChange.SaveManualLayout;
2101
+ };
2102
+ };
2103
+ readonly target: "synced";
2104
+ }, {
2105
+ readonly target: "stopped";
2106
+ }];
2107
+ };
2108
+ };
2109
+ readonly synced: {
2110
+ readonly tags: "ready";
2111
+ readonly on: {
2112
+ readonly sync: {
2113
+ readonly target: "pending";
2114
+ };
2115
+ };
2116
+ };
2117
+ readonly stopped: {
2118
+ readonly entry: ActionFunction<Readonly< Input>, Events, Events, undefined, never, never, never, never, never>;
2119
+ readonly type: "final";
2120
+ };
2121
2121
  };
2122
- };
2123
- onEdgeMouseLeave: {
2124
- type: "onEdgeMouseLeave";
2125
- params: {
2126
- edge: Types.Edge;
2122
+ readonly on: {
2123
+ readonly synced: {
2124
+ readonly target: ".synced";
2125
+ };
2126
+ readonly stop: {
2127
+ readonly target: ".stopped";
2128
+ };
2127
2129
  };
2128
- };
2129
- "xyflow:fitDiagram": {
2130
- type: "xyflow:fitDiagram";
2131
- params: {
2132
- duration?: number;
2133
- bounds?: BBox;
2134
- } | undefined;
2135
- };
2136
- closeAllOverlays: {
2137
- type: "closeAllOverlays";
2138
- params: NonReducibleUnknown;
2139
- };
2140
- "trigger:OnChange": {
2141
- type: "trigger:OnChange";
2142
- params: {
2143
- change: ViewChange;
2130
+ }>;
2131
+ id: "syncLayout";
2132
+ };
2133
+ hotkeyActorLogic: {
2134
+ src: "hotkeyActorLogic";
2135
+ logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
2136
+ id: "hotkey";
2137
+ };
2138
+ overlaysActorLogic: {
2139
+ src: "overlaysActorLogic";
2140
+ logic: StateMachine<OverlaysContext, OverlayActorEvent, {
2141
+ [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
2142
+ [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
2143
+ [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
2144
+ hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
2145
+ }, Values<{
2146
+ elementDetails: {
2147
+ src: "elementDetails";
2148
+ logic: ElementDetailsLogic;
2149
+ id: `elementDetails-${number}`;
2150
+ };
2151
+ relationshipsBrowser: {
2152
+ src: "relationshipsBrowser";
2153
+ logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
2154
+ id: `relationshipsBrowser-${number}`;
2155
+ };
2156
+ relationshipDetails: {
2157
+ src: "relationshipDetails";
2158
+ logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
2159
+ id: `relationshipDetails-${number}`;
2160
+ };
2161
+ hotkey: {
2162
+ src: "hotkey";
2163
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
2164
+ id: "hotkey";
2165
+ };
2166
+ }>, Values<{
2167
+ closeLastOverlay: {
2168
+ type: "closeLastOverlay";
2169
+ params: NonReducibleUnknown;
2170
+ };
2171
+ closeSpecificOverlay: {
2172
+ type: "closeSpecificOverlay";
2173
+ params: {
2174
+ actorId: string;
2175
+ };
2144
2176
  };
2145
- };
2146
- "layout.align": {
2147
- type: "layout.align";
2148
- params: {
2149
- mode: AlignmentMode;
2177
+ closeAllOverlays: {
2178
+ type: "closeAllOverlays";
2179
+ params: NonReducibleUnknown;
2150
2180
  };
2151
- };
2152
- "trigger:NavigateTo": {
2153
- type: "trigger:NavigateTo";
2154
- params: {
2155
- viewId: ViewId;
2181
+ openElementDetails: {
2182
+ type: "openElementDetails";
2183
+ params: NonReducibleUnknown;
2156
2184
  };
2157
- };
2158
- "trigger:OpenSource": {
2159
- type: "trigger:OpenSource";
2160
- params: OpenSourceParams;
2161
- };
2162
- "assign lastClickedNode": {
2163
- type: "assign lastClickedNode";
2164
- params: NonReducibleUnknown;
2165
- };
2166
- "open source of focused or last clicked node": {
2167
- type: "open source of focused or last clicked node";
2168
- params: NonReducibleUnknown;
2169
- };
2170
- "xyflow:fitFocusedBounds": {
2171
- type: "xyflow:fitFocusedBounds";
2172
- params: unknown;
2173
- };
2174
- "xyflow:setViewportCenter": {
2175
- type: "xyflow:setViewportCenter";
2176
- params: {
2177
- x: number;
2178
- y: number;
2185
+ openRelationshipDetails: {
2186
+ type: "openRelationshipDetails";
2187
+ params: NonReducibleUnknown;
2179
2188
  };
2180
- };
2181
- "xyflow:setViewport": {
2182
- type: "xyflow:setViewport";
2183
- params: {
2184
- viewport: Viewport;
2185
- duration?: number;
2189
+ openRelationshipsBrowser: {
2190
+ type: "openRelationshipsBrowser";
2191
+ params: NonReducibleUnknown;
2186
2192
  };
2187
- };
2188
- "xyflow:alignNodeFromToAfterNavigate": {
2189
- type: "xyflow:alignNodeFromToAfterNavigate";
2190
- params: {
2191
- fromNode: NodeId;
2192
- toPosition: XYPoint;
2193
+ listenToEsc: {
2194
+ type: "listenToEsc";
2195
+ params: NonReducibleUnknown;
2193
2196
  };
2194
- };
2195
- updateFeatures: {
2196
- type: "updateFeatures";
2197
- params: NonReducibleUnknown;
2198
- };
2199
- stopSyncLayout: {
2200
- type: "stopSyncLayout";
2201
- params: NonReducibleUnknown;
2202
- };
2203
- }>, Values<{
2204
- "enabled: FitView": {
2205
- type: "enabled: FitView";
2206
- params: unknown;
2207
- };
2208
- "enabled: FocusMode": {
2209
- type: "enabled: FocusMode";
2210
- params: unknown;
2211
- };
2212
- "enabled: Readonly": {
2213
- type: "enabled: Readonly";
2214
- params: unknown;
2215
- };
2216
- "not readonly": {
2217
- type: "not readonly";
2218
- params: unknown;
2219
- };
2220
- "is dynamic view": {
2221
- type: "is dynamic view";
2222
- params: unknown;
2223
- };
2224
- "is another view": {
2225
- type: "is another view";
2226
- params: unknown;
2227
- };
2228
- "click: selected node": {
2229
- type: "click: selected node";
2230
- params: unknown;
2231
- };
2232
- "click: same node": {
2233
- type: "click: same node";
2234
- params: unknown;
2235
- };
2236
- "click: focused node": {
2237
- type: "click: focused node";
2238
- params: unknown;
2239
- };
2240
- "click: node has connections": {
2241
- type: "click: node has connections";
2242
- params: unknown;
2243
- };
2244
- }>, never, EventObject>];
2245
- readonly target: "ready";
2246
- };
2247
- };
2197
+ stopListeningToEsc: {
2198
+ type: "stopListeningToEsc";
2199
+ params: NonReducibleUnknown;
2200
+ };
2201
+ }>, Values<{
2202
+ "has overlays?": {
2203
+ type: "has overlays?";
2204
+ params: unknown;
2205
+ };
2206
+ "close specific overlay?": {
2207
+ type: "close specific overlay?";
2208
+ params: unknown;
2209
+ };
2210
+ "last: is relationshipDetails?": {
2211
+ type: "last: is relationshipDetails?";
2212
+ params: unknown;
2213
+ };
2214
+ "last: is relationshipsBrowser?": {
2215
+ type: "last: is relationshipsBrowser?";
2216
+ params: unknown;
2217
+ };
2218
+ }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
2219
+ readonly id: "overlays";
2220
+ readonly context: () => {
2221
+ seq: number;
2222
+ overlays: never[];
2223
+ };
2224
+ readonly initial: "idle";
2225
+ readonly on: {
2226
+ readonly 'open.elementDetails': {
2227
+ readonly actions: "openElementDetails";
2228
+ readonly target: ".active";
2229
+ readonly reenter: false;
2230
+ };
2231
+ readonly 'open.relationshipDetails': {
2232
+ readonly actions: "openRelationshipDetails";
2233
+ readonly target: ".active";
2234
+ readonly reenter: false;
2235
+ };
2236
+ readonly 'open.relationshipsBrowser': {
2237
+ readonly actions: "openRelationshipsBrowser";
2238
+ readonly target: ".active";
2239
+ readonly reenter: false;
2240
+ };
2241
+ };
2242
+ readonly states: {
2243
+ readonly idle: {};
2244
+ readonly active: {
2245
+ readonly entry: "listenToEsc";
2246
+ readonly exit: "stopListeningToEsc";
2247
+ readonly on: {
2248
+ readonly close: readonly [{
2249
+ readonly guard: "close specific overlay?";
2250
+ readonly actions: {
2251
+ readonly type: "closeSpecificOverlay";
2252
+ readonly params: ({ event }: {
2253
+ context: OverlaysContext;
2254
+ event: {
2255
+ type: "close";
2256
+ actorId?: string | undefined;
2257
+ };
2258
+ }) => {
2259
+ actorId: string;
2260
+ };
2261
+ };
2262
+ readonly target: "closing";
2263
+ }, {
2264
+ readonly actions: "closeLastOverlay";
2265
+ readonly target: "closing";
2266
+ }];
2267
+ readonly 'close.all': {
2268
+ readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
2269
+ readonly target: "idle";
2270
+ };
2271
+ };
2272
+ };
2273
+ readonly closing: {
2274
+ readonly always: readonly [{
2275
+ readonly guard: "has overlays?";
2276
+ readonly target: "active";
2277
+ }, {
2278
+ readonly actions: "stopListeningToEsc";
2279
+ readonly target: "idle";
2280
+ }];
2281
+ };
2282
+ };
2283
+ readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
2284
+ }>;
2285
+ id: "overlays";
2286
+ };
2287
+ }>, never, never, never, never>];
2288
+ readonly target: "ready";
2289
+ }, {
2290
+ readonly target: "initializing";
2291
+ }];
2248
2292
  };
2249
2293
  readonly ready: {
2250
2294
  readonly initial: "idle";
@@ -5523,11 +5567,19 @@ export declare function useDiagram(): {
5523
5567
  type: "updateFeatures";
5524
5568
  params: NonReducibleUnknown;
5525
5569
  };
5570
+ startSyncLayout: {
5571
+ type: "startSyncLayout";
5572
+ params: NonReducibleUnknown;
5573
+ };
5526
5574
  stopSyncLayout: {
5527
5575
  type: "stopSyncLayout";
5528
5576
  params: NonReducibleUnknown;
5529
5577
  };
5530
5578
  }>, Values<{
5579
+ isReady: {
5580
+ type: "isReady";
5581
+ params: unknown;
5582
+ };
5531
5583
  "enabled: FitView": {
5532
5584
  type: "enabled: FitView";
5533
5585
  params: unknown;
@@ -7734,11 +7786,19 @@ export declare function useDiagram(): {
7734
7786
  type: "updateFeatures";
7735
7787
  params: NonReducibleUnknown;
7736
7788
  };
7789
+ startSyncLayout: {
7790
+ type: "startSyncLayout";
7791
+ params: NonReducibleUnknown;
7792
+ };
7737
7793
  stopSyncLayout: {
7738
7794
  type: "stopSyncLayout";
7739
7795
  params: NonReducibleUnknown;
7740
7796
  };
7741
7797
  }>, Values<{
7798
+ isReady: {
7799
+ type: "isReady";
7800
+ params: unknown;
7801
+ };
7742
7802
  "enabled: FitView": {
7743
7803
  type: "enabled: FitView";
7744
7804
  params: unknown;
@@ -8146,11 +8206,19 @@ export declare function useDiagram(): {
8146
8206
  type: "updateFeatures";
8147
8207
  params: NonReducibleUnknown;
8148
8208
  };
8209
+ startSyncLayout: {
8210
+ type: "startSyncLayout";
8211
+ params: NonReducibleUnknown;
8212
+ };
8149
8213
  stopSyncLayout: {
8150
8214
  type: "stopSyncLayout";
8151
8215
  params: NonReducibleUnknown;
8152
8216
  };
8153
8217
  }>, Values<{
8218
+ isReady: {
8219
+ type: "isReady";
8220
+ params: unknown;
8221
+ };
8154
8222
  "enabled: FitView": {
8155
8223
  type: "enabled: FitView";
8156
8224
  params: unknown;
@@ -8206,260 +8274,6 @@ export declare function useDiagram(): {
8206
8274
  viewId: ViewId;
8207
8275
  };
8208
8276
  }];
8209
- readonly exit: ActionFunction<DiagramContext, Events, Events, undefined, Values<{
8210
- syncManualLayoutActorLogic: {
8211
- src: "syncManualLayoutActorLogic";
8212
- logic: StateMachine<Readonly< Input>, Events, {}, never, {
8213
- type: "trigger:OnChange";
8214
- params: {
8215
- change: ViewChange;
8216
- };
8217
- }, {
8218
- type: "same view";
8219
- params: unknown;
8220
- }, "timeout", "stopped" | "idle" | "synced" | "pending" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
8221
- readonly initial: "idle";
8222
- readonly context: ({ input }: {
8223
- spawn: {
8224
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
8225
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
8226
- id?: never;
8227
- systemId?: string;
8228
- input?: InputFrom<TLogic>;
8229
- syncSnapshot?: boolean;
8230
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
8231
- };
8232
- input: Input;
8233
- self: ActorRef<MachineSnapshot<Readonly< Input>, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
8234
- }) => {
8235
- parent: ActorRef<MachineSnapshot<DiagramContext, Events, any, any, any, any, any, any>, Events, any>;
8236
- viewId: ViewId;
8237
- };
8238
- readonly states: {
8239
- readonly idle: {
8240
- readonly tags: "ready";
8241
- readonly on: {
8242
- readonly sync: {
8243
- readonly target: "pending";
8244
- };
8245
- };
8246
- };
8247
- readonly paused: {
8248
- readonly tags: "pending";
8249
- readonly on: {
8250
- readonly sync: {
8251
- readonly target: "pending";
8252
- };
8253
- };
8254
- };
8255
- readonly pending: {
8256
- readonly tags: "pending";
8257
- readonly on: {
8258
- readonly sync: {
8259
- readonly target: "pending";
8260
- readonly reenter: true;
8261
- };
8262
- readonly cancel: {
8263
- readonly target: "paused";
8264
- };
8265
- };
8266
- readonly after: {
8267
- readonly timeout: readonly [{
8268
- readonly guard: "same view";
8269
- readonly actions: {
8270
- readonly type: "trigger:OnChange";
8271
- readonly params: ({ context }: {
8272
- context: Readonly< Input>;
8273
- event: Events;
8274
- }) => {
8275
- change: import("@likec4/core").ViewChange.SaveManualLayout;
8276
- };
8277
- };
8278
- readonly target: "synced";
8279
- }, {
8280
- readonly target: "stopped";
8281
- }];
8282
- };
8283
- };
8284
- readonly synced: {
8285
- readonly tags: "ready";
8286
- readonly on: {
8287
- readonly sync: {
8288
- readonly target: "pending";
8289
- };
8290
- };
8291
- };
8292
- readonly stopped: {
8293
- readonly entry: ActionFunction<Readonly< Input>, Events, Events, undefined, never, never, never, never, never>;
8294
- readonly type: "final";
8295
- };
8296
- };
8297
- readonly on: {
8298
- readonly synced: {
8299
- readonly target: ".synced";
8300
- };
8301
- readonly stop: {
8302
- readonly target: ".stopped";
8303
- };
8304
- };
8305
- }>;
8306
- id: "syncLayout";
8307
- };
8308
- hotkeyActorLogic: {
8309
- src: "hotkeyActorLogic";
8310
- logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
8311
- id: "hotkey";
8312
- };
8313
- overlaysActorLogic: {
8314
- src: "overlaysActorLogic";
8315
- logic: StateMachine<OverlaysContext, OverlayActorEvent, {
8316
- [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
8317
- [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
8318
- [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
8319
- hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
8320
- }, Values<{
8321
- elementDetails: {
8322
- src: "elementDetails";
8323
- logic: ElementDetailsLogic;
8324
- id: `elementDetails-${number}`;
8325
- };
8326
- relationshipsBrowser: {
8327
- src: "relationshipsBrowser";
8328
- logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
8329
- id: `relationshipsBrowser-${number}`;
8330
- };
8331
- relationshipDetails: {
8332
- src: "relationshipDetails";
8333
- logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
8334
- id: `relationshipDetails-${number}`;
8335
- };
8336
- hotkey: {
8337
- src: "hotkey";
8338
- logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
8339
- id: "hotkey";
8340
- };
8341
- }>, Values<{
8342
- closeLastOverlay: {
8343
- type: "closeLastOverlay";
8344
- params: NonReducibleUnknown;
8345
- };
8346
- closeSpecificOverlay: {
8347
- type: "closeSpecificOverlay";
8348
- params: {
8349
- actorId: string;
8350
- };
8351
- };
8352
- closeAllOverlays: {
8353
- type: "closeAllOverlays";
8354
- params: NonReducibleUnknown;
8355
- };
8356
- openElementDetails: {
8357
- type: "openElementDetails";
8358
- params: NonReducibleUnknown;
8359
- };
8360
- openRelationshipDetails: {
8361
- type: "openRelationshipDetails";
8362
- params: NonReducibleUnknown;
8363
- };
8364
- openRelationshipsBrowser: {
8365
- type: "openRelationshipsBrowser";
8366
- params: NonReducibleUnknown;
8367
- };
8368
- listenToEsc: {
8369
- type: "listenToEsc";
8370
- params: NonReducibleUnknown;
8371
- };
8372
- stopListeningToEsc: {
8373
- type: "stopListeningToEsc";
8374
- params: NonReducibleUnknown;
8375
- };
8376
- }>, Values<{
8377
- "has overlays?": {
8378
- type: "has overlays?";
8379
- params: unknown;
8380
- };
8381
- "close specific overlay?": {
8382
- type: "close specific overlay?";
8383
- params: unknown;
8384
- };
8385
- "last: is relationshipDetails?": {
8386
- type: "last: is relationshipDetails?";
8387
- params: unknown;
8388
- };
8389
- "last: is relationshipsBrowser?": {
8390
- type: "last: is relationshipsBrowser?";
8391
- params: unknown;
8392
- };
8393
- }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
8394
- readonly id: "overlays";
8395
- readonly context: () => {
8396
- seq: number;
8397
- overlays: never[];
8398
- };
8399
- readonly initial: "idle";
8400
- readonly on: {
8401
- readonly 'open.elementDetails': {
8402
- readonly actions: "openElementDetails";
8403
- readonly target: ".active";
8404
- readonly reenter: false;
8405
- };
8406
- readonly 'open.relationshipDetails': {
8407
- readonly actions: "openRelationshipDetails";
8408
- readonly target: ".active";
8409
- readonly reenter: false;
8410
- };
8411
- readonly 'open.relationshipsBrowser': {
8412
- readonly actions: "openRelationshipsBrowser";
8413
- readonly target: ".active";
8414
- readonly reenter: false;
8415
- };
8416
- };
8417
- readonly states: {
8418
- readonly idle: {};
8419
- readonly active: {
8420
- readonly entry: "listenToEsc";
8421
- readonly exit: "stopListeningToEsc";
8422
- readonly on: {
8423
- readonly close: readonly [{
8424
- readonly guard: "close specific overlay?";
8425
- readonly actions: {
8426
- readonly type: "closeSpecificOverlay";
8427
- readonly params: ({ event }: {
8428
- context: OverlaysContext;
8429
- event: {
8430
- type: "close";
8431
- actorId?: string | undefined;
8432
- };
8433
- }) => {
8434
- actorId: string;
8435
- };
8436
- };
8437
- readonly target: "closing";
8438
- }, {
8439
- readonly actions: "closeLastOverlay";
8440
- readonly target: "closing";
8441
- }];
8442
- readonly 'close.all': {
8443
- readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
8444
- readonly target: "idle";
8445
- };
8446
- };
8447
- };
8448
- readonly closing: {
8449
- readonly always: readonly [{
8450
- readonly guard: "has overlays?";
8451
- readonly target: "active";
8452
- }, {
8453
- readonly actions: "stopListeningToEsc";
8454
- readonly target: "idle";
8455
- }];
8456
- };
8457
- };
8458
- readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
8459
- }>;
8460
- id: "overlays";
8461
- };
8462
- }>, never, never, never, never>;
8463
8277
  readonly on: {
8464
8278
  readonly 'update.view': {
8465
8279
  readonly actions: ActionFunction<DiagramContext, {
@@ -8815,11 +8629,19 @@ export declare function useDiagram(): {
8815
8629
  type: "updateFeatures";
8816
8630
  params: NonReducibleUnknown;
8817
8631
  };
8632
+ startSyncLayout: {
8633
+ type: "startSyncLayout";
8634
+ params: NonReducibleUnknown;
8635
+ };
8818
8636
  stopSyncLayout: {
8819
8637
  type: "stopSyncLayout";
8820
8638
  params: NonReducibleUnknown;
8821
8639
  };
8822
8640
  }>, Values<{
8641
+ isReady: {
8642
+ type: "isReady";
8643
+ params: unknown;
8644
+ };
8823
8645
  "enabled: FitView": {
8824
8646
  type: "enabled: FitView";
8825
8647
  params: unknown;
@@ -10782,11 +10604,19 @@ export declare function useDiagram(): {
10782
10604
  type: "updateFeatures";
10783
10605
  params: NonReducibleUnknown;
10784
10606
  };
10607
+ startSyncLayout: {
10608
+ type: "startSyncLayout";
10609
+ params: NonReducibleUnknown;
10610
+ };
10785
10611
  stopSyncLayout: {
10786
10612
  type: "stopSyncLayout";
10787
10613
  params: NonReducibleUnknown;
10788
10614
  };
10789
10615
  }>, Values<{
10616
+ isReady: {
10617
+ type: "isReady";
10618
+ params: unknown;
10619
+ };
10790
10620
  "enabled: FitView": {
10791
10621
  type: "enabled: FitView";
10792
10622
  params: unknown;
@@ -10832,7 +10662,7 @@ export declare function useDiagram(): {
10832
10662
  readonly 'update.inputs': {
10833
10663
  readonly actions: ActionFunction<DiagramContext, {
10834
10664
  type: "update.inputs";
10835
- inputs: Partial<Omit< Input, "view">>;
10665
+ inputs: Partial<Omit< Input, "view" | "xystore">>;
10836
10666
  }, Events, undefined, Values<{
10837
10667
  syncManualLayoutActorLogic: {
10838
10668
  src: "syncManualLayoutActorLogic";