@pepperdash/mobile-control-react-app-core 1.21.0-fix-double-join-call.4 → 1.21.0-fix-double-join-call.6

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.
@@ -1,2 +1,2 @@
1
- export * from './apiService';
1
+ export * from './useInitialize';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export declare const httpClient: import("axios").AxiosInstance;
2
2
  /**
3
3
  * Initialize the application by getting the local config data and setting it in the store
4
- * @returns {Promise<boolean>} true if successful, false if not
4
+ * @returns {() => Promise<boolean>} true if successful, false if not
5
5
  */
6
6
  export declare function useInitialize(): () => Promise<boolean>;
7
- //# sourceMappingURL=apiService.d.ts.map
7
+ //# sourceMappingURL=useInitialize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitialize.d.ts","sourceRoot":"","sources":["../../src/lib/services/useInitialize.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,+BAAiB,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,OAAO,CAAC,OAAO,CAAC,CA0CtD"}
@@ -4,7 +4,7 @@ export declare const useAppDispatch: import("react-redux").UseDispatch<import("r
4
4
  rooms: Record<string, import("..").RoomState>;
5
5
  devices: Record<string, import("..").DeviceState>;
6
6
  ui: import(".").UiConfigState;
7
- }, undefined, import("redux").UnknownAction> & import("redux").Dispatch<import("redux").UnknownAction>>;
7
+ }, undefined, import("redux").UnknownAction> & Record<string, never> & import("redux").Dispatch<import("redux").UnknownAction>>;
8
8
  export declare const useAppSelector: import("react-redux").UseSelector<{
9
9
  appConfig: import("./appConfig/appConfig.slice").AppConfigState;
10
10
  runtimeConfig: import("./runtimeConfig/runtimeConfig.slice").RuntimeConfigState;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/lib/store/hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;uGAAuC,CAAC;AACnE,eAAO,MAAM,cAAc;;;;;;EAAqC,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/lib/store/hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;+HAAuC,CAAC;AACnE,eAAO,MAAM,cAAc;;;;;;EAAqC,CAAC"}
@@ -15,5 +15,6 @@ export { appConfigActions } from './appConfig/appConfig.slice';
15
15
  export { devicesActions } from './devices/devices.slice';
16
16
  export { roomsActions } from './rooms/rooms.slice';
17
17
  export { runtimeConfigActions } from './runtimeConfig/runtimeConfig.slice';
18
+ export * from './middleware';
18
19
  export { uiActions } from './ui/ui.slice';
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAE9B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAE9B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Redux Middleware
3
+ *
4
+ * Barrel export for Redux middleware including WebSocket middleware.
5
+ *
6
+ * @module Middleware
7
+ */
8
+ export * from './websocketMiddleware';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/store/middleware/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { Middleware } from '@reduxjs/toolkit';
2
+ import { Message } from '../../types';
3
+ import { RoomState } from '../../types/state/state';
4
+ import { DeviceState } from '../../types/state/state/DeviceState';
5
+ import { AppConfigState } from '../appConfig/appConfig.slice';
6
+ import { RuntimeConfigState } from '../runtimeConfig/runtimeConfig.slice';
7
+ import { UiConfigState } from '../ui/ui.slice';
8
+ type LocalRootState = {
9
+ appConfig: AppConfigState;
10
+ runtimeConfig: RuntimeConfigState;
11
+ rooms: Record<string, RoomState>;
12
+ devices: Record<string, DeviceState>;
13
+ ui: UiConfigState;
14
+ };
15
+ /**
16
+ * WebSocket middleware action types
17
+ */
18
+ export declare const WS_CONNECT = "websocket/connect";
19
+ export declare const WS_DISCONNECT = "websocket/disconnect";
20
+ export declare const WS_SEND_MESSAGE = "websocket/sendMessage";
21
+ export declare const WS_ADD_EVENT_HANDLER = "websocket/addEventHandler";
22
+ export declare const WS_REMOVE_EVENT_HANDLER = "websocket/removeEventHandler";
23
+ export declare const WS_RECONNECT = "websocket/reconnect";
24
+ /**
25
+ * WebSocket middleware action creators
26
+ */
27
+ export declare const wsConnect: () => {
28
+ type: string;
29
+ };
30
+ export declare const wsDisconnect: () => {
31
+ type: string;
32
+ };
33
+ export declare const wsSendMessage: (messageType: string, content: unknown) => {
34
+ type: string;
35
+ payload: {
36
+ messageType: string;
37
+ content: unknown;
38
+ };
39
+ };
40
+ export declare const wsAddEventHandler: (eventType: string, key: string, callback: (data: Message) => void) => {
41
+ type: string;
42
+ payload: {
43
+ eventType: string;
44
+ key: string;
45
+ callback: (data: Message) => void;
46
+ };
47
+ };
48
+ export declare const wsRemoveEventHandler: (eventType: string, key: string) => {
49
+ type: string;
50
+ payload: {
51
+ eventType: string;
52
+ key: string;
53
+ };
54
+ };
55
+ export declare const wsReconnect: () => {
56
+ type: string;
57
+ };
58
+ /**
59
+ * Creates the WebSocket middleware
60
+ */
61
+ export declare const createWebSocketMiddleware: () => Middleware<Record<string, never>, LocalRootState>;
62
+ export {};
63
+ //# sourceMappingURL=websocketMiddleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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,MAAM,oBAAoB,cAAe,MAAM,OAAO,MAAM;;;;;;CAGjE,CAAC;AACH,eAAO,MAAM,WAAW;;CAAiC,CAAC;AAa1D;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,WAC3C,OAAO,MAAM,EAAE,KAAK,CAAC,EACrB,cAAc,CA2mBf,CAAC"}
@@ -11,7 +11,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
11
11
  rooms: Record<string, import("..").RoomState>;
12
12
  devices: Record<string, import("..").DeviceState>;
13
13
  ui: import("./ui/ui.slice").UiConfigState;
14
- }, undefined, import("redux").UnknownAction>;
14
+ }, undefined, import("redux").UnknownAction> & Record<string, never>;
15
15
  }>, import("redux").StoreEnhancer]>>;
16
16
  export type RootState = ReturnType<typeof store.getState>;
17
17
  export type AppDispatch = typeof store.dispatch;
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/lib/store/store.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;oCAEhB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/lib/store/store.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;oCAShB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  /**
3
- * The context component that contains the websocket connection and provides the functions to send messages
4
- * Must wrap all other components
5
- * @param children the child components. First child should be a room buseness logic component
3
+ * Backward-compatible WebSocket provider that uses Redux middleware
4
+ * Maintains the same API as the original WebsocketProvider
5
+ *
6
+ * @param children the child components
6
7
  */
7
8
  declare const WebsocketProvider: ({ children }: {
8
9
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"WebsocketProvider.d.ts","sourceRoot":"","sources":["../../src/lib/utils/WebsocketProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAuB5E;;;;GAIG;AACH,QAAA,MAAM,iBAAiB;cAA8B,SAAS;6CA0Y7D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"WebsocketProvider.d.ts","sourceRoot":"","sources":["../../src/lib/utils/WebsocketProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAC;AAc1D;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB;cAA8B,SAAS;6CAwE7D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pepperdash/mobile-control-react-app-core",
3
3
  "private": false,
4
- "version": "1.21.0-fix-double-join-call.4",
4
+ "version": "1.21.0-fix-double-join-call.6",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiService.d.ts","sourceRoot":"","sources":["../../src/lib/services/apiService.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,+BAAiB,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,aAAa,2BAuC5B"}