aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/src/schemas.ts6
-rw-r--r--packages/shared/src/stores/SharedStore.ts4
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/shared/src/schemas.ts b/packages/shared/src/schemas.ts
index 2f108bd..7fb9717 100644
--- a/packages/shared/src/schemas.ts
+++ b/packages/shared/src/schemas.ts
@@ -20,6 +20,11 @@
20 20
21import { z } from 'zod'; 21import { z } from 'zod';
22 22
23const setSelectedServiceId = z.object({
24 action: z.literal('set-selected-service-id'),
25 serviceId: z.string(),
26});
27
23export const browserViewBounds = z.object({ 28export const browserViewBounds = z.object({
24 x: z.number().int().nonnegative(), 29 x: z.number().int().nonnegative(),
25 y: z.number().int().nonnegative(), 30 y: z.number().int().nonnegative(),
@@ -48,6 +53,7 @@ const reloadAllServicesAction = z.object({
48}); 53});
49 54
50export const action = z.union([ 55export const action = z.union([
56 setSelectedServiceId,
51 setBrowserViewBoundsAction, 57 setBrowserViewBoundsAction,
52 setThemeSourceAction, 58 setThemeSourceAction,
53 reloadAllServicesAction, 59 reloadAllServicesAction,
diff --git a/packages/shared/src/stores/SharedStore.ts b/packages/shared/src/stores/SharedStore.ts
index ffa387f..e6e2cad 100644
--- a/packages/shared/src/stores/SharedStore.ts
+++ b/packages/shared/src/stores/SharedStore.ts
@@ -28,11 +28,13 @@ import {
28 28
29import { config } from './Config'; 29import { config } from './Config';
30import { runtimeService } from './RuntimeService'; 30import { runtimeService } from './RuntimeService';
31import { service } from './Service';
31 32
32export const sharedStore = types.model('SharedStore', { 33export const sharedStore = types.model('SharedStore', {
33 config: types.optional(config, {}), 34 config: types.optional(config, {}),
34 shouldUseDarkColors: false,
35 runtimeServices: types.map(runtimeService), 35 runtimeServices: types.map(runtimeService),
36 selectedService: types.safeReference(service),
37 shouldUseDarkColors: false,
36}); 38});
37 39
38export interface SharedStore extends Instance<typeof sharedStore> {} 40export interface SharedStore extends Instance<typeof sharedStore> {}