@likec4/diagram 1.28.1 → 1.29.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 (30) hide show
  1. package/bundle/index.js +292 -258
  2. package/dist/_virtual/index.js +1 -1
  3. package/dist/base/primitives/customEdge.js +1 -1
  4. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +3 -0
  5. package/dist/base/primitives/edge/EdgeLabel.css.js +3 -0
  6. package/dist/base/primitives/edge/EdgeLabel.d.ts +1 -1
  7. package/dist/base/primitives/edge/EdgeLabel.js +2 -1
  8. package/dist/components/SearchControl.css.js +8 -2
  9. package/dist/hooks/safeContext.d.ts +2 -5
  10. package/dist/hooks/safeContext.js +2 -1
  11. package/dist/hooks/useDiagram.d.ts +711 -146
  12. package/dist/likec4diagram/ui/controls/Controls.js +3 -3
  13. package/dist/node_modules/.pnpm/{react@19.0.0 → react@19.1.0}/node_modules/react/cjs/react.production.js +14 -6
  14. package/dist/overlays/element-details/ElementDetails.js +1 -1
  15. package/dist/state/DiagramActorProvider.js +2 -2
  16. package/dist/state/diagram-machine.d.ts +715 -142
  17. package/dist/state/diagram-machine.js +48 -6
  18. package/dist/styles.css.js +1 -1
  19. package/package.json +15 -15
  20. package/src/LikeC4Diagram.tsx +0 -1
  21. package/src/base/primitives/customEdge.ts +1 -0
  22. package/src/base/primitives/edge/EdgeLabel.css.ts +3 -0
  23. package/src/base/primitives/edge/EdgeLabel.tsx +2 -1
  24. package/src/components/SearchControl.css.ts +7 -1
  25. package/src/hooks/safeContext.tsx +3 -1
  26. package/src/likec4diagram/ui/controls/Controls.tsx +3 -3
  27. package/src/overlays/element-details/ElementDetails.tsx +2 -2
  28. package/src/state/DiagramActorProvider.tsx +3 -3
  29. package/src/state/diagram-machine.ts +48 -5
  30. /package/dist/node_modules/.pnpm/{react@19.0.0 → react@19.1.0}/node_modules/react/index.js +0 -0
@@ -808,6 +808,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
808
808
  type: "enabled: Readonly";
809
809
  params: unknown;
810
810
  };
811
+ "enabled: RelationshipDetails": {
812
+ type: "enabled: RelationshipDetails";
813
+ params: unknown;
814
+ };
811
815
  "not readonly": {
812
816
  type: "not readonly";
813
817
  params: unknown;
@@ -836,6 +840,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
836
840
  type: "click: node has connections";
837
841
  params: unknown;
838
842
  };
843
+ "click: selected edge": {
844
+ type: "click: selected edge";
845
+ params: unknown;
846
+ };
839
847
  }>, never, "isReady" | "initializing" | "navigating" | {
840
848
  ready: "idle" | "walkthrough" | "focused";
841
849
  }, string, Input, NonReducibleUnknown, EventObject, MetaObject, {
@@ -5168,6 +5176,19 @@ export declare const diagramMachine: StateMachine<Context, Events, {
5168
5176
  }>, never, never, never, never>;
5169
5177
  readonly target: "focused";
5170
5178
  };
5179
+ readonly 'xyflow.edgeClick': readonly [{
5180
+ readonly guard: any;
5181
+ readonly actions: ActionFunction<Context, {
5182
+ type: "xyflow.edgeClick";
5183
+ edge: Types.Edge;
5184
+ }, Events, undefined, never, never, never, never, never>;
5185
+ }, {
5186
+ readonly guard: any;
5187
+ readonly actions: ActionFunction<Context, {
5188
+ type: "xyflow.edgeClick";
5189
+ edge: Types.Edge;
5190
+ }, Events, undefined, never, never, never, never, never>;
5191
+ }];
5171
5192
  };
5172
5193
  };
5173
5194
  readonly focused: {
@@ -6058,6 +6079,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
6058
6079
  type: "enabled: Readonly";
6059
6080
  params: unknown;
6060
6081
  };
6082
+ "enabled: RelationshipDetails": {
6083
+ type: "enabled: RelationshipDetails";
6084
+ params: unknown;
6085
+ };
6061
6086
  "not readonly": {
6062
6087
  type: "not readonly";
6063
6088
  params: unknown;
@@ -6086,6 +6111,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
6086
6111
  type: "click: node has connections";
6087
6112
  params: unknown;
6088
6113
  };
6114
+ "click: selected edge": {
6115
+ type: "click: selected edge";
6116
+ params: unknown;
6117
+ };
6089
6118
  }>, never, EventObject>;
6090
6119
  readonly on: {
6091
6120
  readonly 'xyflow.nodeClick': readonly [{
@@ -8542,6 +8571,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
8542
8571
  type: "enabled: Readonly";
8543
8572
  params: unknown;
8544
8573
  };
8574
+ "enabled: RelationshipDetails": {
8575
+ type: "enabled: RelationshipDetails";
8576
+ params: unknown;
8577
+ };
8545
8578
  "not readonly": {
8546
8579
  type: "not readonly";
8547
8580
  params: unknown;
@@ -8570,11 +8603,16 @@ export declare const diagramMachine: StateMachine<Context, Events, {
8570
8603
  type: "click: node has connections";
8571
8604
  params: unknown;
8572
8605
  };
8606
+ "click: selected edge": {
8607
+ type: "click: selected edge";
8608
+ params: unknown;
8609
+ };
8573
8610
  }>, never, EventObject>;
8574
8611
  };
8575
- readonly 'notations.unhighlight': {
8576
- readonly actions: ActionFunction<Context, {
8577
- type: "notations.unhighlight";
8612
+ readonly 'xyflow.edgeClick': {
8613
+ readonly actions: readonly [ ActionFunction<Context, {
8614
+ type: "xyflow.edgeClick";
8615
+ edge: Types.Edge;
8578
8616
  }, Events, undefined, Values<{
8579
8617
  syncManualLayoutActorLogic: {
8580
8618
  src: "syncManualLayoutActorLogic";
@@ -8828,159 +8866,670 @@ export declare const diagramMachine: StateMachine<Context, Events, {
8828
8866
  }>;
8829
8867
  id: "overlays";
8830
8868
  };
8831
- }>, never, never, never, never>;
8832
- };
8833
- readonly 'walkthrough.end': {
8834
- readonly target: "idle";
8835
- };
8836
- readonly 'xyflow.paneDblClick': {
8837
- readonly target: "idle";
8838
- };
8839
- readonly 'update.view': {
8840
- readonly guard: "is another view";
8841
- readonly actions: ActionFunction<Context, {
8842
- type: "update.view";
8843
- view: DiagramView;
8844
- xynodes: Types.Node[];
8845
- xyedges: Types.Edge[];
8846
- }, Events, undefined, never, never, never, never, never>;
8847
- readonly target: "idle";
8848
- };
8849
- };
8850
- readonly exit: ActionFunction<Context, Events, Events, undefined, Values<{
8851
- syncManualLayoutActorLogic: {
8852
- src: "syncManualLayoutActorLogic";
8853
- logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
8854
- type: "trigger:OnChange";
8855
- params: {
8856
- change: ViewChange;
8857
- };
8858
- }, {
8859
- type: "same view";
8860
- params: unknown;
8861
- }, "timeout", "synced" | "pending" | "stopped" | "idle" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
8862
- readonly initial: "idle";
8863
- readonly context: ({ input }: {
8864
- spawn: {
8865
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
8866
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
8867
- id?: never;
8868
- systemId?: string;
8869
- input?: InputFrom<TLogic>;
8870
- syncSnapshot?: boolean;
8871
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
8872
- };
8873
- input: Input;
8874
- self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
8875
- }) => {
8876
- parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
8877
- viewId: ViewId;
8878
- };
8879
- readonly states: {
8880
- readonly idle: {
8881
- readonly tags: "ready";
8882
- readonly on: {
8883
- readonly sync: {
8884
- readonly target: "pending";
8885
- };
8869
+ }>, never, never, never, never>, ActionFunction<Context, Events, Events, undefined, Values<{
8870
+ syncManualLayoutActorLogic: {
8871
+ src: "syncManualLayoutActorLogic";
8872
+ logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
8873
+ type: "trigger:OnChange";
8874
+ params: {
8875
+ change: ViewChange;
8886
8876
  };
8887
- };
8888
- readonly paused: {
8889
- readonly tags: "pending";
8890
- readonly on: {
8891
- readonly sync: {
8892
- readonly target: "pending";
8877
+ }, {
8878
+ type: "same view";
8879
+ params: unknown;
8880
+ }, "timeout", "synced" | "pending" | "stopped" | "idle" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
8881
+ readonly initial: "idle";
8882
+ readonly context: ({ input }: {
8883
+ spawn: {
8884
+ <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
8885
+ <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
8886
+ id?: never;
8887
+ systemId?: string;
8888
+ input?: InputFrom<TLogic>;
8889
+ syncSnapshot?: boolean;
8890
+ } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
8893
8891
  };
8892
+ input: Input;
8893
+ self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
8894
+ }) => {
8895
+ parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
8896
+ viewId: ViewId;
8894
8897
  };
8895
- };
8896
- readonly pending: {
8897
- readonly tags: "pending";
8898
- readonly on: {
8899
- readonly sync: {
8900
- readonly target: "pending";
8901
- readonly reenter: true;
8898
+ readonly states: {
8899
+ readonly idle: {
8900
+ readonly tags: "ready";
8901
+ readonly on: {
8902
+ readonly sync: {
8903
+ readonly target: "pending";
8904
+ };
8905
+ };
8902
8906
  };
8903
- readonly cancel: {
8904
- readonly target: "paused";
8907
+ readonly paused: {
8908
+ readonly tags: "pending";
8909
+ readonly on: {
8910
+ readonly sync: {
8911
+ readonly target: "pending";
8912
+ };
8913
+ };
8905
8914
  };
8906
- };
8907
- readonly after: {
8908
- readonly timeout: readonly [{
8909
- readonly guard: "same view";
8910
- readonly actions: {
8911
- readonly type: "trigger:OnChange";
8912
- readonly params: ({ context }: {
8913
- context: Readonly< Input>;
8914
- event: SyncLayoutEvents;
8915
- }) => {
8916
- change: ViewChange.SaveManualLayout;
8915
+ readonly pending: {
8916
+ readonly tags: "pending";
8917
+ readonly on: {
8918
+ readonly sync: {
8919
+ readonly target: "pending";
8920
+ readonly reenter: true;
8921
+ };
8922
+ readonly cancel: {
8923
+ readonly target: "paused";
8917
8924
  };
8918
8925
  };
8919
- readonly target: "synced";
8920
- }, {
8921
- readonly target: "stopped";
8922
- }];
8926
+ readonly after: {
8927
+ readonly timeout: readonly [{
8928
+ readonly guard: "same view";
8929
+ readonly actions: {
8930
+ readonly type: "trigger:OnChange";
8931
+ readonly params: ({ context }: {
8932
+ context: Readonly< Input>;
8933
+ event: SyncLayoutEvents;
8934
+ }) => {
8935
+ change: ViewChange.SaveManualLayout;
8936
+ };
8937
+ };
8938
+ readonly target: "synced";
8939
+ }, {
8940
+ readonly target: "stopped";
8941
+ }];
8942
+ };
8943
+ };
8944
+ readonly synced: {
8945
+ readonly tags: "ready";
8946
+ readonly on: {
8947
+ readonly sync: {
8948
+ readonly target: "pending";
8949
+ };
8950
+ };
8951
+ };
8952
+ readonly stopped: {
8953
+ readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
8954
+ readonly type: "final";
8955
+ };
8923
8956
  };
8924
- };
8925
- readonly synced: {
8926
- readonly tags: "ready";
8927
8957
  readonly on: {
8928
- readonly sync: {
8929
- readonly target: "pending";
8958
+ readonly synced: {
8959
+ readonly target: ".synced";
8960
+ };
8961
+ readonly stop: {
8962
+ readonly target: ".stopped";
8930
8963
  };
8931
8964
  };
8932
- };
8933
- readonly stopped: {
8934
- readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
8935
- readonly type: "final";
8936
- };
8937
- };
8938
- readonly on: {
8939
- readonly synced: {
8940
- readonly target: ".synced";
8941
- };
8942
- readonly stop: {
8943
- readonly target: ".stopped";
8944
- };
8945
- };
8946
- }>;
8947
- id: "syncLayout";
8948
- };
8949
- hotkeyActorLogic: {
8950
- src: "hotkeyActorLogic";
8951
- logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
8952
- id: "hotkey";
8953
- };
8954
- overlaysActorLogic: {
8955
- src: "overlaysActorLogic";
8956
- logic: StateMachine<OverlaysContext, OverlayActorEvent, {
8957
- [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
8958
- [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
8959
- [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
8960
- hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
8961
- }, Values<{
8962
- elementDetails: {
8963
- src: "elementDetails";
8964
- logic: ElementDetailsLogic;
8965
- id: `elementDetails-${number}`;
8966
- };
8967
- relationshipsBrowser: {
8968
- src: "relationshipsBrowser";
8969
- logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
8970
- id: `relationshipsBrowser-${number}`;
8971
- };
8972
- relationshipDetails: {
8973
- src: "relationshipDetails";
8974
- logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
8975
- id: `relationshipDetails-${number}`;
8965
+ }>;
8966
+ id: "syncLayout";
8976
8967
  };
8977
- hotkey: {
8978
- src: "hotkey";
8979
- logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
8968
+ hotkeyActorLogic: {
8969
+ src: "hotkeyActorLogic";
8970
+ logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
8980
8971
  id: "hotkey";
8981
8972
  };
8982
- }>, Values<{
8983
- closeLastOverlay: {
8973
+ overlaysActorLogic: {
8974
+ src: "overlaysActorLogic";
8975
+ logic: StateMachine<OverlaysContext, OverlayActorEvent, {
8976
+ [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
8977
+ [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
8978
+ [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
8979
+ hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
8980
+ }, Values<{
8981
+ elementDetails: {
8982
+ src: "elementDetails";
8983
+ logic: ElementDetailsLogic;
8984
+ id: `elementDetails-${number}`;
8985
+ };
8986
+ relationshipsBrowser: {
8987
+ src: "relationshipsBrowser";
8988
+ logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
8989
+ id: `relationshipsBrowser-${number}`;
8990
+ };
8991
+ relationshipDetails: {
8992
+ src: "relationshipDetails";
8993
+ logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
8994
+ id: `relationshipDetails-${number}`;
8995
+ };
8996
+ hotkey: {
8997
+ src: "hotkey";
8998
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
8999
+ id: "hotkey";
9000
+ };
9001
+ }>, Values<{
9002
+ closeLastOverlay: {
9003
+ type: "closeLastOverlay";
9004
+ params: NonReducibleUnknown;
9005
+ };
9006
+ closeSpecificOverlay: {
9007
+ type: "closeSpecificOverlay";
9008
+ params: {
9009
+ actorId: string;
9010
+ };
9011
+ };
9012
+ closeAllOverlays: {
9013
+ type: "closeAllOverlays";
9014
+ params: NonReducibleUnknown;
9015
+ };
9016
+ openElementDetails: {
9017
+ type: "openElementDetails";
9018
+ params: NonReducibleUnknown;
9019
+ };
9020
+ openRelationshipDetails: {
9021
+ type: "openRelationshipDetails";
9022
+ params: NonReducibleUnknown;
9023
+ };
9024
+ openRelationshipsBrowser: {
9025
+ type: "openRelationshipsBrowser";
9026
+ params: NonReducibleUnknown;
9027
+ };
9028
+ listenToEsc: {
9029
+ type: "listenToEsc";
9030
+ params: NonReducibleUnknown;
9031
+ };
9032
+ stopListeningToEsc: {
9033
+ type: "stopListeningToEsc";
9034
+ params: NonReducibleUnknown;
9035
+ };
9036
+ }>, Values<{
9037
+ "has overlays?": {
9038
+ type: "has overlays?";
9039
+ params: unknown;
9040
+ };
9041
+ "close specific overlay?": {
9042
+ type: "close specific overlay?";
9043
+ params: unknown;
9044
+ };
9045
+ "last: is relationshipDetails?": {
9046
+ type: "last: is relationshipDetails?";
9047
+ params: unknown;
9048
+ };
9049
+ "last: is relationshipsBrowser?": {
9050
+ type: "last: is relationshipsBrowser?";
9051
+ params: unknown;
9052
+ };
9053
+ }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
9054
+ readonly id: "overlays";
9055
+ readonly context: () => {
9056
+ seq: number;
9057
+ overlays: never[];
9058
+ };
9059
+ readonly initial: "idle";
9060
+ readonly on: {
9061
+ readonly 'open.elementDetails': {
9062
+ readonly actions: "openElementDetails";
9063
+ readonly target: ".active";
9064
+ readonly reenter: false;
9065
+ };
9066
+ readonly 'open.relationshipDetails': {
9067
+ readonly actions: "openRelationshipDetails";
9068
+ readonly target: ".active";
9069
+ readonly reenter: false;
9070
+ };
9071
+ readonly 'open.relationshipsBrowser': {
9072
+ readonly actions: "openRelationshipsBrowser";
9073
+ readonly target: ".active";
9074
+ readonly reenter: false;
9075
+ };
9076
+ };
9077
+ readonly states: {
9078
+ readonly idle: {};
9079
+ readonly active: {
9080
+ readonly entry: "listenToEsc";
9081
+ readonly exit: "stopListeningToEsc";
9082
+ readonly on: {
9083
+ readonly close: readonly [{
9084
+ readonly guard: "close specific overlay?";
9085
+ readonly actions: {
9086
+ readonly type: "closeSpecificOverlay";
9087
+ readonly params: ({ event }: {
9088
+ context: OverlaysContext;
9089
+ event: {
9090
+ type: "close";
9091
+ actorId?: string | undefined;
9092
+ };
9093
+ }) => {
9094
+ actorId: string;
9095
+ };
9096
+ };
9097
+ readonly target: "closing";
9098
+ }, {
9099
+ readonly actions: "closeLastOverlay";
9100
+ readonly target: "closing";
9101
+ }];
9102
+ readonly 'close.all': {
9103
+ readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
9104
+ readonly target: "idle";
9105
+ };
9106
+ };
9107
+ };
9108
+ readonly closing: {
9109
+ readonly always: readonly [{
9110
+ readonly guard: "has overlays?";
9111
+ readonly target: "active";
9112
+ }, {
9113
+ readonly actions: "stopListeningToEsc";
9114
+ readonly target: "idle";
9115
+ }];
9116
+ };
9117
+ };
9118
+ readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
9119
+ }>;
9120
+ id: "overlays";
9121
+ };
9122
+ }>, never, never, never, never>, "xyflow:fitFocusedBounds"];
9123
+ };
9124
+ readonly 'notations.unhighlight': {
9125
+ readonly actions: ActionFunction<Context, {
9126
+ type: "notations.unhighlight";
9127
+ }, Events, undefined, Values<{
9128
+ syncManualLayoutActorLogic: {
9129
+ src: "syncManualLayoutActorLogic";
9130
+ logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
9131
+ type: "trigger:OnChange";
9132
+ params: {
9133
+ change: ViewChange;
9134
+ };
9135
+ }, {
9136
+ type: "same view";
9137
+ params: unknown;
9138
+ }, "timeout", "synced" | "pending" | "stopped" | "idle" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
9139
+ readonly initial: "idle";
9140
+ readonly context: ({ input }: {
9141
+ spawn: {
9142
+ <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
9143
+ <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
9144
+ id?: never;
9145
+ systemId?: string;
9146
+ input?: InputFrom<TLogic>;
9147
+ syncSnapshot?: boolean;
9148
+ } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
9149
+ };
9150
+ input: Input;
9151
+ self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
9152
+ }) => {
9153
+ parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
9154
+ viewId: ViewId;
9155
+ };
9156
+ readonly states: {
9157
+ readonly idle: {
9158
+ readonly tags: "ready";
9159
+ readonly on: {
9160
+ readonly sync: {
9161
+ readonly target: "pending";
9162
+ };
9163
+ };
9164
+ };
9165
+ readonly paused: {
9166
+ readonly tags: "pending";
9167
+ readonly on: {
9168
+ readonly sync: {
9169
+ readonly target: "pending";
9170
+ };
9171
+ };
9172
+ };
9173
+ readonly pending: {
9174
+ readonly tags: "pending";
9175
+ readonly on: {
9176
+ readonly sync: {
9177
+ readonly target: "pending";
9178
+ readonly reenter: true;
9179
+ };
9180
+ readonly cancel: {
9181
+ readonly target: "paused";
9182
+ };
9183
+ };
9184
+ readonly after: {
9185
+ readonly timeout: readonly [{
9186
+ readonly guard: "same view";
9187
+ readonly actions: {
9188
+ readonly type: "trigger:OnChange";
9189
+ readonly params: ({ context }: {
9190
+ context: Readonly< Input>;
9191
+ event: SyncLayoutEvents;
9192
+ }) => {
9193
+ change: ViewChange.SaveManualLayout;
9194
+ };
9195
+ };
9196
+ readonly target: "synced";
9197
+ }, {
9198
+ readonly target: "stopped";
9199
+ }];
9200
+ };
9201
+ };
9202
+ readonly synced: {
9203
+ readonly tags: "ready";
9204
+ readonly on: {
9205
+ readonly sync: {
9206
+ readonly target: "pending";
9207
+ };
9208
+ };
9209
+ };
9210
+ readonly stopped: {
9211
+ readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
9212
+ readonly type: "final";
9213
+ };
9214
+ };
9215
+ readonly on: {
9216
+ readonly synced: {
9217
+ readonly target: ".synced";
9218
+ };
9219
+ readonly stop: {
9220
+ readonly target: ".stopped";
9221
+ };
9222
+ };
9223
+ }>;
9224
+ id: "syncLayout";
9225
+ };
9226
+ hotkeyActorLogic: {
9227
+ src: "hotkeyActorLogic";
9228
+ logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
9229
+ id: "hotkey";
9230
+ };
9231
+ overlaysActorLogic: {
9232
+ src: "overlaysActorLogic";
9233
+ logic: StateMachine<OverlaysContext, OverlayActorEvent, {
9234
+ [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
9235
+ [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
9236
+ [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
9237
+ hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
9238
+ }, Values<{
9239
+ elementDetails: {
9240
+ src: "elementDetails";
9241
+ logic: ElementDetailsLogic;
9242
+ id: `elementDetails-${number}`;
9243
+ };
9244
+ relationshipsBrowser: {
9245
+ src: "relationshipsBrowser";
9246
+ logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
9247
+ id: `relationshipsBrowser-${number}`;
9248
+ };
9249
+ relationshipDetails: {
9250
+ src: "relationshipDetails";
9251
+ logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
9252
+ id: `relationshipDetails-${number}`;
9253
+ };
9254
+ hotkey: {
9255
+ src: "hotkey";
9256
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
9257
+ id: "hotkey";
9258
+ };
9259
+ }>, Values<{
9260
+ closeLastOverlay: {
9261
+ type: "closeLastOverlay";
9262
+ params: NonReducibleUnknown;
9263
+ };
9264
+ closeSpecificOverlay: {
9265
+ type: "closeSpecificOverlay";
9266
+ params: {
9267
+ actorId: string;
9268
+ };
9269
+ };
9270
+ closeAllOverlays: {
9271
+ type: "closeAllOverlays";
9272
+ params: NonReducibleUnknown;
9273
+ };
9274
+ openElementDetails: {
9275
+ type: "openElementDetails";
9276
+ params: NonReducibleUnknown;
9277
+ };
9278
+ openRelationshipDetails: {
9279
+ type: "openRelationshipDetails";
9280
+ params: NonReducibleUnknown;
9281
+ };
9282
+ openRelationshipsBrowser: {
9283
+ type: "openRelationshipsBrowser";
9284
+ params: NonReducibleUnknown;
9285
+ };
9286
+ listenToEsc: {
9287
+ type: "listenToEsc";
9288
+ params: NonReducibleUnknown;
9289
+ };
9290
+ stopListeningToEsc: {
9291
+ type: "stopListeningToEsc";
9292
+ params: NonReducibleUnknown;
9293
+ };
9294
+ }>, Values<{
9295
+ "has overlays?": {
9296
+ type: "has overlays?";
9297
+ params: unknown;
9298
+ };
9299
+ "close specific overlay?": {
9300
+ type: "close specific overlay?";
9301
+ params: unknown;
9302
+ };
9303
+ "last: is relationshipDetails?": {
9304
+ type: "last: is relationshipDetails?";
9305
+ params: unknown;
9306
+ };
9307
+ "last: is relationshipsBrowser?": {
9308
+ type: "last: is relationshipsBrowser?";
9309
+ params: unknown;
9310
+ };
9311
+ }>, never, "active" | "idle" | "closing", string, NonReducibleUnknown, NonReducibleUnknown, OverlayActorEmitedEvent, MetaObject, {
9312
+ readonly id: "overlays";
9313
+ readonly context: () => {
9314
+ seq: number;
9315
+ overlays: never[];
9316
+ };
9317
+ readonly initial: "idle";
9318
+ readonly on: {
9319
+ readonly 'open.elementDetails': {
9320
+ readonly actions: "openElementDetails";
9321
+ readonly target: ".active";
9322
+ readonly reenter: false;
9323
+ };
9324
+ readonly 'open.relationshipDetails': {
9325
+ readonly actions: "openRelationshipDetails";
9326
+ readonly target: ".active";
9327
+ readonly reenter: false;
9328
+ };
9329
+ readonly 'open.relationshipsBrowser': {
9330
+ readonly actions: "openRelationshipsBrowser";
9331
+ readonly target: ".active";
9332
+ readonly reenter: false;
9333
+ };
9334
+ };
9335
+ readonly states: {
9336
+ readonly idle: {};
9337
+ readonly active: {
9338
+ readonly entry: "listenToEsc";
9339
+ readonly exit: "stopListeningToEsc";
9340
+ readonly on: {
9341
+ readonly close: readonly [{
9342
+ readonly guard: "close specific overlay?";
9343
+ readonly actions: {
9344
+ readonly type: "closeSpecificOverlay";
9345
+ readonly params: ({ event }: {
9346
+ context: OverlaysContext;
9347
+ event: {
9348
+ type: "close";
9349
+ actorId?: string | undefined;
9350
+ };
9351
+ }) => {
9352
+ actorId: string;
9353
+ };
9354
+ };
9355
+ readonly target: "closing";
9356
+ }, {
9357
+ readonly actions: "closeLastOverlay";
9358
+ readonly target: "closing";
9359
+ }];
9360
+ readonly 'close.all': {
9361
+ readonly actions: readonly ["closeAllOverlays", "stopListeningToEsc"];
9362
+ readonly target: "idle";
9363
+ };
9364
+ };
9365
+ };
9366
+ readonly closing: {
9367
+ readonly always: readonly [{
9368
+ readonly guard: "has overlays?";
9369
+ readonly target: "active";
9370
+ }, {
9371
+ readonly actions: "stopListeningToEsc";
9372
+ readonly target: "idle";
9373
+ }];
9374
+ };
9375
+ };
9376
+ readonly exit: readonly ["stopListeningToEsc", "closeAllOverlays"];
9377
+ }>;
9378
+ id: "overlays";
9379
+ };
9380
+ }>, never, never, never, never>;
9381
+ };
9382
+ readonly 'walkthrough.end': {
9383
+ readonly target: "idle";
9384
+ };
9385
+ readonly 'xyflow.paneDblClick': {
9386
+ readonly target: "idle";
9387
+ };
9388
+ readonly 'update.view': {
9389
+ readonly guard: "is another view";
9390
+ readonly actions: ActionFunction<Context, {
9391
+ type: "update.view";
9392
+ view: DiagramView;
9393
+ xynodes: Types.Node[];
9394
+ xyedges: Types.Edge[];
9395
+ }, Events, undefined, never, never, never, never, never>;
9396
+ readonly target: "idle";
9397
+ };
9398
+ };
9399
+ readonly exit: ActionFunction<Context, Events, Events, undefined, Values<{
9400
+ syncManualLayoutActorLogic: {
9401
+ src: "syncManualLayoutActorLogic";
9402
+ logic: StateMachine<Readonly< Input>, SyncLayoutEvents, {}, never, {
9403
+ type: "trigger:OnChange";
9404
+ params: {
9405
+ change: ViewChange;
9406
+ };
9407
+ }, {
9408
+ type: "same view";
9409
+ params: unknown;
9410
+ }, "timeout", "synced" | "pending" | "stopped" | "idle" | "paused", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
9411
+ readonly initial: "idle";
9412
+ readonly context: ({ input }: {
9413
+ spawn: {
9414
+ <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
9415
+ <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
9416
+ id?: never;
9417
+ systemId?: string;
9418
+ input?: InputFrom<TLogic>;
9419
+ syncSnapshot?: boolean;
9420
+ } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
9421
+ };
9422
+ input: Input;
9423
+ self: ActorRef< MachineSnapshot<Readonly< Input>, SyncLayoutEvents, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, SyncLayoutEvents, AnyEventObject>;
9424
+ }) => {
9425
+ parent: ActorRef< MachineSnapshot<Context, Events, any, any, any, any, any, any>, Events, any>;
9426
+ viewId: ViewId;
9427
+ };
9428
+ readonly states: {
9429
+ readonly idle: {
9430
+ readonly tags: "ready";
9431
+ readonly on: {
9432
+ readonly sync: {
9433
+ readonly target: "pending";
9434
+ };
9435
+ };
9436
+ };
9437
+ readonly paused: {
9438
+ readonly tags: "pending";
9439
+ readonly on: {
9440
+ readonly sync: {
9441
+ readonly target: "pending";
9442
+ };
9443
+ };
9444
+ };
9445
+ readonly pending: {
9446
+ readonly tags: "pending";
9447
+ readonly on: {
9448
+ readonly sync: {
9449
+ readonly target: "pending";
9450
+ readonly reenter: true;
9451
+ };
9452
+ readonly cancel: {
9453
+ readonly target: "paused";
9454
+ };
9455
+ };
9456
+ readonly after: {
9457
+ readonly timeout: readonly [{
9458
+ readonly guard: "same view";
9459
+ readonly actions: {
9460
+ readonly type: "trigger:OnChange";
9461
+ readonly params: ({ context }: {
9462
+ context: Readonly< Input>;
9463
+ event: SyncLayoutEvents;
9464
+ }) => {
9465
+ change: ViewChange.SaveManualLayout;
9466
+ };
9467
+ };
9468
+ readonly target: "synced";
9469
+ }, {
9470
+ readonly target: "stopped";
9471
+ }];
9472
+ };
9473
+ };
9474
+ readonly synced: {
9475
+ readonly tags: "ready";
9476
+ readonly on: {
9477
+ readonly sync: {
9478
+ readonly target: "pending";
9479
+ };
9480
+ };
9481
+ };
9482
+ readonly stopped: {
9483
+ readonly entry: ActionFunction<Readonly< Input>, SyncLayoutEvents, SyncLayoutEvents, undefined, never, never, never, never, never>;
9484
+ readonly type: "final";
9485
+ };
9486
+ };
9487
+ readonly on: {
9488
+ readonly synced: {
9489
+ readonly target: ".synced";
9490
+ };
9491
+ readonly stop: {
9492
+ readonly target: ".stopped";
9493
+ };
9494
+ };
9495
+ }>;
9496
+ id: "syncLayout";
9497
+ };
9498
+ hotkeyActorLogic: {
9499
+ src: "hotkeyActorLogic";
9500
+ logic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
9501
+ id: "hotkey";
9502
+ };
9503
+ overlaysActorLogic: {
9504
+ src: "overlaysActorLogic";
9505
+ logic: StateMachine<OverlaysContext, OverlayActorEvent, {
9506
+ [x: `elementDetails-${number}`]: ActorRefFromLogic<ElementDetailsLogic> | undefined;
9507
+ [x: `relationshipsBrowser-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipsBrowser.Logic> | undefined;
9508
+ [x: `relationshipDetails-${number}`]: ActorRefFromLogic<import("../overlays/types").Overlays.RelationshipDetails.Logic> | undefined;
9509
+ hotkey?: ActorRefFromLogic<CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>>;
9510
+ }, Values<{
9511
+ elementDetails: {
9512
+ src: "elementDetails";
9513
+ logic: ElementDetailsLogic;
9514
+ id: `elementDetails-${number}`;
9515
+ };
9516
+ relationshipsBrowser: {
9517
+ src: "relationshipsBrowser";
9518
+ logic: import("../overlays/types").Overlays.RelationshipsBrowser.Logic;
9519
+ id: `relationshipsBrowser-${number}`;
9520
+ };
9521
+ relationshipDetails: {
9522
+ src: "relationshipDetails";
9523
+ logic: import("../overlays/types").Overlays.RelationshipDetails.Logic;
9524
+ id: `relationshipDetails-${number}`;
9525
+ };
9526
+ hotkey: {
9527
+ src: "hotkey";
9528
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>;
9529
+ id: "hotkey";
9530
+ };
9531
+ }>, Values<{
9532
+ closeLastOverlay: {
8984
9533
  type: "closeLastOverlay";
8985
9534
  params: NonReducibleUnknown;
8986
9535
  };
@@ -9227,6 +9776,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9227
9776
  type: "enabled: Readonly";
9228
9777
  params: unknown;
9229
9778
  };
9779
+ "enabled: RelationshipDetails": {
9780
+ type: "enabled: RelationshipDetails";
9781
+ params: unknown;
9782
+ };
9230
9783
  "not readonly": {
9231
9784
  type: "not readonly";
9232
9785
  params: unknown;
@@ -9255,6 +9808,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9255
9808
  type: "click: node has connections";
9256
9809
  params: unknown;
9257
9810
  };
9811
+ "click: selected edge": {
9812
+ type: "click: selected edge";
9813
+ params: unknown;
9814
+ };
9258
9815
  }>, never, EventObject>;
9259
9816
  };
9260
9817
  };
@@ -9657,6 +10214,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9657
10214
  type: "enabled: Readonly";
9658
10215
  params: unknown;
9659
10216
  };
10217
+ "enabled: RelationshipDetails": {
10218
+ type: "enabled: RelationshipDetails";
10219
+ params: unknown;
10220
+ };
9660
10221
  "not readonly": {
9661
10222
  type: "not readonly";
9662
10223
  params: unknown;
@@ -9685,6 +10246,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
9685
10246
  type: "click: node has connections";
9686
10247
  params: unknown;
9687
10248
  };
10249
+ "click: selected edge": {
10250
+ type: "click: selected edge";
10251
+ params: unknown;
10252
+ };
9688
10253
  }>, never, EventObject>;
9689
10254
  readonly target: "#idle";
9690
10255
  };
@@ -11639,6 +12204,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
11639
12204
  type: "enabled: Readonly";
11640
12205
  params: unknown;
11641
12206
  };
12207
+ "enabled: RelationshipDetails": {
12208
+ type: "enabled: RelationshipDetails";
12209
+ params: unknown;
12210
+ };
11642
12211
  "not readonly": {
11643
12212
  type: "not readonly";
11644
12213
  params: unknown;
@@ -11667,6 +12236,10 @@ export declare const diagramMachine: StateMachine<Context, Events, {
11667
12236
  type: "click: node has connections";
11668
12237
  params: unknown;
11669
12238
  };
12239
+ "click: selected edge": {
12240
+ type: "click: selected edge";
12241
+ params: unknown;
12242
+ };
11670
12243
  }>, never, EventObject>];
11671
12244
  };
11672
12245
  readonly 'update.inputs': {