@noya-app/noya-multiplayer-react 0.1.51 → 0.1.53
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.
- package/.turbo/turbo-build.log +22 -11
- package/CHANGELOG.md +16 -0
- package/dist/index.bundle.js +29 -8
- package/dist/index.d.mts +21 -10
- package/dist/index.d.ts +21 -10
- package/dist/index.js +1951 -1880
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1766 -1698
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/NoyaStateContext.tsx +8 -7
- package/src/ai.ts +17 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as _noya_app_state_manager from '@noya-app/state-manager';
|
|
2
|
-
import { ConnectedUsersManager, EphemeralUserDataManager, NoyaManager, StateManager, StateManagerOptions, MultiplayerStateManagerOptions, SyncAdapter, TSchema, Static, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
2
|
+
import { AIToolDefinition, ConnectedUsersManager, EphemeralUserDataManager, NoyaManager, StateManager, StateManagerOptions, MultiplayerStateManagerOptions, SyncAdapter, TSchema, Static, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
3
3
|
export * from '@noya-app/state-manager';
|
|
4
4
|
import React, { SetStateAction } from 'react';
|
|
5
5
|
import { GetAtPath, ObservableOptions, PathKey, Observable } from '@noya-app/observable';
|
|
6
6
|
import { MenuItem } from '@noya-app/noya-designsystem';
|
|
7
7
|
import { OutputTransform, Input } from '@noya-app/noya-schemas';
|
|
8
8
|
|
|
9
|
+
declare function useRegisterAITool(tool: AIToolDefinition): void;
|
|
10
|
+
declare function useCallableAITools(): _noya_app_state_manager.CallableAIToolsMap;
|
|
11
|
+
|
|
9
12
|
type Point = {
|
|
10
13
|
x: number;
|
|
11
14
|
y: number;
|
|
@@ -117,11 +120,13 @@ interface NoyaStateProviderProps<S, M extends object, E extends object, MenuT ex
|
|
|
117
120
|
initialState?: S;
|
|
118
121
|
fallback?: React.ReactNode;
|
|
119
122
|
}
|
|
120
|
-
|
|
123
|
+
type AnyNoyaStateContextValue = {
|
|
121
124
|
noyaManager: NoyaManager<any, any, any, any>;
|
|
122
125
|
theme: AppTheme;
|
|
123
126
|
viewType: AppViewType;
|
|
124
127
|
};
|
|
128
|
+
declare const AnyNoyaStateContext: React.Context<AnyNoyaStateContextValue | undefined>;
|
|
129
|
+
declare function useAnyNoyaStateContext(): AnyNoyaStateContextValue;
|
|
125
130
|
declare function useAnyNoyaManager(): NoyaManager<any, any, any, any>;
|
|
126
131
|
declare function useColorScheme(): AppTheme;
|
|
127
132
|
declare function useViewType(): AppViewType;
|
|
@@ -137,17 +142,17 @@ declare function useSecretManager(): _noya_app_state_manager.SecretManager;
|
|
|
137
142
|
declare function useSecrets(): _noya_app_state_manager.Secret[];
|
|
138
143
|
declare function useSecret(name: string): _noya_app_state_manager.Secret | undefined;
|
|
139
144
|
declare function useInputs(): ({
|
|
140
|
-
required: boolean;
|
|
141
|
-
kind: "file";
|
|
142
|
-
toolId: string | null;
|
|
143
145
|
id: string;
|
|
146
|
+
kind: "file";
|
|
144
147
|
name: string;
|
|
148
|
+
required: boolean;
|
|
149
|
+
toolId: string | null;
|
|
145
150
|
description: string | null;
|
|
146
151
|
} | {
|
|
147
|
-
required: boolean;
|
|
148
|
-
kind: "data";
|
|
149
152
|
id: string;
|
|
153
|
+
kind: "data";
|
|
150
154
|
name: string;
|
|
155
|
+
required: boolean;
|
|
151
156
|
description: string | null;
|
|
152
157
|
schema: {
|
|
153
158
|
default?: string | undefined;
|
|
@@ -236,17 +241,23 @@ declare function useInputs(): ({
|
|
|
236
241
|
};
|
|
237
242
|
_kind: "Object";
|
|
238
243
|
} | null;
|
|
244
|
+
} | {
|
|
245
|
+
id: string;
|
|
246
|
+
kind: "secret";
|
|
247
|
+
name: string;
|
|
248
|
+
required: boolean;
|
|
249
|
+
description: string | null;
|
|
239
250
|
})[];
|
|
240
251
|
declare function useOutputTransforms(): ({
|
|
241
252
|
value: string;
|
|
242
|
-
kind: "script";
|
|
243
253
|
id: string;
|
|
254
|
+
kind: "script";
|
|
244
255
|
location: "state" | "url";
|
|
245
256
|
order: number;
|
|
246
257
|
} | {
|
|
247
258
|
value: string;
|
|
248
|
-
kind: "jsonPointer";
|
|
249
259
|
id: string;
|
|
260
|
+
kind: "jsonPointer";
|
|
250
261
|
order: number;
|
|
251
262
|
})[];
|
|
252
263
|
declare function useIOManager(): _noya_app_state_manager.IOManager;
|
|
@@ -339,4 +350,4 @@ declare class WebSocketConnection<State> {
|
|
|
339
350
|
removeListener(listener: (state: ReconnectingWebSocketState) => void): void;
|
|
340
351
|
}
|
|
341
352
|
|
|
342
|
-
export { AnyEphemeralUserDataManagerContext, type AppData, type AppTheme, type AppViewType, ConnectedUsersContext, type ConnectionEvent, type ConnectionOptions, FallbackUntilInitialized, type GetAppDataOptions, type RenderUserPointer, type RenderUserPointerProps, StateInspector, type StateInspectorAnchor, type StateInspectorOptions, type UseMultiplayerStateOptions, type UseNoyaStateOptions, type UseNoyaStateResult, type UserPointerData, UserPointersOverlay, type UserPointersOverlayProps, WebSocketConnection, createDefaultAppData, createNoyaContext, enforceSchema, getAppData, parseAppDataParameter, useAIManager, useAnyEphemeralUserData, useAnyNoyaManager, useAnyNoyaStateContext, useAsset, useAssetManager, useAssets, useColorScheme, useConnectedUsersManager, useCurrentUserId, useIOManager, useInputs, useIsInitialized, useManagedHistory, useManagedState, useMultiplayerState, useNoyaState, useObservable, useOutputTransforms, usePipelineManager, useSecret, useSecretManager, useSecrets, useSyncStateManager, useViewType };
|
|
353
|
+
export { AnyEphemeralUserDataManagerContext, AnyNoyaStateContext, type AnyNoyaStateContextValue, type AppData, type AppTheme, type AppViewType, ConnectedUsersContext, type ConnectionEvent, type ConnectionOptions, FallbackUntilInitialized, type GetAppDataOptions, type RenderUserPointer, type RenderUserPointerProps, StateInspector, type StateInspectorAnchor, type StateInspectorOptions, type UseMultiplayerStateOptions, type UseNoyaStateOptions, type UseNoyaStateResult, type UserPointerData, UserPointersOverlay, type UserPointersOverlayProps, WebSocketConnection, createDefaultAppData, createNoyaContext, enforceSchema, getAppData, parseAppDataParameter, useAIManager, useAnyEphemeralUserData, useAnyNoyaManager, useAnyNoyaStateContext, useAsset, useAssetManager, useAssets, useCallableAITools, useColorScheme, useConnectedUsersManager, useCurrentUserId, useIOManager, useInputs, useIsInitialized, useManagedHistory, useManagedState, useMultiplayerState, useNoyaState, useObservable, useOutputTransforms, usePipelineManager, useRegisterAITool, useSecret, useSecretManager, useSecrets, useSyncStateManager, useViewType };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as _noya_app_state_manager from '@noya-app/state-manager';
|
|
2
|
-
import { ConnectedUsersManager, EphemeralUserDataManager, NoyaManager, StateManager, StateManagerOptions, MultiplayerStateManagerOptions, SyncAdapter, TSchema, Static, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
2
|
+
import { AIToolDefinition, ConnectedUsersManager, EphemeralUserDataManager, NoyaManager, StateManager, StateManagerOptions, MultiplayerStateManagerOptions, SyncAdapter, TSchema, Static, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
3
3
|
export * from '@noya-app/state-manager';
|
|
4
4
|
import React, { SetStateAction } from 'react';
|
|
5
5
|
import { GetAtPath, ObservableOptions, PathKey, Observable } from '@noya-app/observable';
|
|
6
6
|
import { MenuItem } from '@noya-app/noya-designsystem';
|
|
7
7
|
import { OutputTransform, Input } from '@noya-app/noya-schemas';
|
|
8
8
|
|
|
9
|
+
declare function useRegisterAITool(tool: AIToolDefinition): void;
|
|
10
|
+
declare function useCallableAITools(): _noya_app_state_manager.CallableAIToolsMap;
|
|
11
|
+
|
|
9
12
|
type Point = {
|
|
10
13
|
x: number;
|
|
11
14
|
y: number;
|
|
@@ -117,11 +120,13 @@ interface NoyaStateProviderProps<S, M extends object, E extends object, MenuT ex
|
|
|
117
120
|
initialState?: S;
|
|
118
121
|
fallback?: React.ReactNode;
|
|
119
122
|
}
|
|
120
|
-
|
|
123
|
+
type AnyNoyaStateContextValue = {
|
|
121
124
|
noyaManager: NoyaManager<any, any, any, any>;
|
|
122
125
|
theme: AppTheme;
|
|
123
126
|
viewType: AppViewType;
|
|
124
127
|
};
|
|
128
|
+
declare const AnyNoyaStateContext: React.Context<AnyNoyaStateContextValue | undefined>;
|
|
129
|
+
declare function useAnyNoyaStateContext(): AnyNoyaStateContextValue;
|
|
125
130
|
declare function useAnyNoyaManager(): NoyaManager<any, any, any, any>;
|
|
126
131
|
declare function useColorScheme(): AppTheme;
|
|
127
132
|
declare function useViewType(): AppViewType;
|
|
@@ -137,17 +142,17 @@ declare function useSecretManager(): _noya_app_state_manager.SecretManager;
|
|
|
137
142
|
declare function useSecrets(): _noya_app_state_manager.Secret[];
|
|
138
143
|
declare function useSecret(name: string): _noya_app_state_manager.Secret | undefined;
|
|
139
144
|
declare function useInputs(): ({
|
|
140
|
-
required: boolean;
|
|
141
|
-
kind: "file";
|
|
142
|
-
toolId: string | null;
|
|
143
145
|
id: string;
|
|
146
|
+
kind: "file";
|
|
144
147
|
name: string;
|
|
148
|
+
required: boolean;
|
|
149
|
+
toolId: string | null;
|
|
145
150
|
description: string | null;
|
|
146
151
|
} | {
|
|
147
|
-
required: boolean;
|
|
148
|
-
kind: "data";
|
|
149
152
|
id: string;
|
|
153
|
+
kind: "data";
|
|
150
154
|
name: string;
|
|
155
|
+
required: boolean;
|
|
151
156
|
description: string | null;
|
|
152
157
|
schema: {
|
|
153
158
|
default?: string | undefined;
|
|
@@ -236,17 +241,23 @@ declare function useInputs(): ({
|
|
|
236
241
|
};
|
|
237
242
|
_kind: "Object";
|
|
238
243
|
} | null;
|
|
244
|
+
} | {
|
|
245
|
+
id: string;
|
|
246
|
+
kind: "secret";
|
|
247
|
+
name: string;
|
|
248
|
+
required: boolean;
|
|
249
|
+
description: string | null;
|
|
239
250
|
})[];
|
|
240
251
|
declare function useOutputTransforms(): ({
|
|
241
252
|
value: string;
|
|
242
|
-
kind: "script";
|
|
243
253
|
id: string;
|
|
254
|
+
kind: "script";
|
|
244
255
|
location: "state" | "url";
|
|
245
256
|
order: number;
|
|
246
257
|
} | {
|
|
247
258
|
value: string;
|
|
248
|
-
kind: "jsonPointer";
|
|
249
259
|
id: string;
|
|
260
|
+
kind: "jsonPointer";
|
|
250
261
|
order: number;
|
|
251
262
|
})[];
|
|
252
263
|
declare function useIOManager(): _noya_app_state_manager.IOManager;
|
|
@@ -339,4 +350,4 @@ declare class WebSocketConnection<State> {
|
|
|
339
350
|
removeListener(listener: (state: ReconnectingWebSocketState) => void): void;
|
|
340
351
|
}
|
|
341
352
|
|
|
342
|
-
export { AnyEphemeralUserDataManagerContext, type AppData, type AppTheme, type AppViewType, ConnectedUsersContext, type ConnectionEvent, type ConnectionOptions, FallbackUntilInitialized, type GetAppDataOptions, type RenderUserPointer, type RenderUserPointerProps, StateInspector, type StateInspectorAnchor, type StateInspectorOptions, type UseMultiplayerStateOptions, type UseNoyaStateOptions, type UseNoyaStateResult, type UserPointerData, UserPointersOverlay, type UserPointersOverlayProps, WebSocketConnection, createDefaultAppData, createNoyaContext, enforceSchema, getAppData, parseAppDataParameter, useAIManager, useAnyEphemeralUserData, useAnyNoyaManager, useAnyNoyaStateContext, useAsset, useAssetManager, useAssets, useColorScheme, useConnectedUsersManager, useCurrentUserId, useIOManager, useInputs, useIsInitialized, useManagedHistory, useManagedState, useMultiplayerState, useNoyaState, useObservable, useOutputTransforms, usePipelineManager, useSecret, useSecretManager, useSecrets, useSyncStateManager, useViewType };
|
|
353
|
+
export { AnyEphemeralUserDataManagerContext, AnyNoyaStateContext, type AnyNoyaStateContextValue, type AppData, type AppTheme, type AppViewType, ConnectedUsersContext, type ConnectionEvent, type ConnectionOptions, FallbackUntilInitialized, type GetAppDataOptions, type RenderUserPointer, type RenderUserPointerProps, StateInspector, type StateInspectorAnchor, type StateInspectorOptions, type UseMultiplayerStateOptions, type UseNoyaStateOptions, type UseNoyaStateResult, type UserPointerData, UserPointersOverlay, type UserPointersOverlayProps, WebSocketConnection, createDefaultAppData, createNoyaContext, enforceSchema, getAppData, parseAppDataParameter, useAIManager, useAnyEphemeralUserData, useAnyNoyaManager, useAnyNoyaStateContext, useAsset, useAssetManager, useAssets, useCallableAITools, useColorScheme, useConnectedUsersManager, useCurrentUserId, useIOManager, useInputs, useIsInitialized, useManagedHistory, useManagedState, useMultiplayerState, useNoyaState, useObservable, useOutputTransforms, usePipelineManager, useRegisterAITool, useSecret, useSecretManager, useSecrets, useSyncStateManager, useViewType };
|