Skip to content

Commit

Permalink
Merge pull request #9 from statelyai/mellson/sta-5494-add-digraph-eve…
Browse files Browse the repository at this point in the history
…nt-to-sky-packages

Add digraph event to sky packages
  • Loading branch information
mellson authored Nov 3, 2023
2 parents 51d7e33 + db58b38 commit 8a25bf2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-flowers-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@statelyai/sky': patch
---

Add editor digraph event to the types.
21 changes: 16 additions & 5 deletions packages/sky-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ type InternalSkyClientSimulateEvent =
| { type: 'simulation.stop' }
| { type: 'simulation.update' | 'simulation.reset'; value: StateValue };

export type SkyClientSimulateEvent = SafeSkyEvent &
InternalSkyClientSimulateEvent;

type InternalSkyClientActorEvent =
| {
type: 'actor.init';
Expand All @@ -46,9 +43,18 @@ type InternalSkyClientActorEvent =
}
| { type: 'actor.send'; event: AnyEventObject };

type InternalClientEditorEvent = { type: 'digraphEvent'; event: any };

export type SkyClientSimulateEvent = SafeSkyEvent &
InternalSkyClientSimulateEvent;
export type SkyClientEditorEvent = SafeSkyEvent & InternalClientEditorEvent;

export type SkyClientActorEvent = SafeSkyEvent & InternalSkyClientActorEvent;

export type SkyClientEvent = SkyClientSimulateEvent | SkyClientActorEvent;
export type SkyClientEvent =
| SkyClientSimulateEvent
| SkyClientActorEvent
| SkyClientEditorEvent;

type InternalSkyServerSimulateEvent =
| { type: 'simulation.start'; value?: StateValue }
Expand All @@ -69,11 +75,16 @@ type MultiplayerSkyEvent = {
numberOfPlayers: number;
};

type InternalServerEditorEvent = { type: 'digraphEvent'; event: any };

export type SkyServerMultiplayerEvent = SafeSkyEvent & MultiplayerSkyEvent;

export type SkyServerActorEvent = SafeSkyEvent & InternalSkyServerActorEvent;

export type SkyServerEditorEvent = SafeSkyEvent & InternalServerEditorEvent;

export type SkyServerEvent =
| SkyServerSimulateEvent
| SkyServerActorEvent
| SkyServerMultiplayerEvent;
| SkyServerMultiplayerEvent
| SkyServerEditorEvent;

0 comments on commit 8a25bf2

Please sign in to comment.