@noya-app/noya-multiplayer-react 0.1.70 → 0.1.71
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 +11 -11
- package/CHANGELOG.md +8 -0
- package/dist/index.bundle.js +30 -20
- package/dist/index.d.mts +18 -9
- package/dist/index.d.ts +18 -9
- package/dist/index.js +58 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/NoyaStateContext.tsx +8 -8
- package/src/__tests__/noyaApp.test.ts +28 -0
- package/src/components/UserPointersOverlay.tsx +4 -4
- package/src/hooks.ts +3 -2
- package/src/inspector/StateInspector.tsx +239 -224
- package/src/inspector/StateInspectorRow.tsx +3 -1
- package/src/inspector/useStateInspector.tsx +8 -3
- package/src/noyaApp.ts +17 -3
- package/src/singleton.tsx +14 -0
package/src/singleton.tsx
CHANGED
|
@@ -24,6 +24,8 @@ export type AnyNoyaSingletonBindings = {
|
|
|
24
24
|
inspector?: boolean | StateInspectorOptions;
|
|
25
25
|
theme: AppTheme;
|
|
26
26
|
viewType: AppViewType;
|
|
27
|
+
userId?: string;
|
|
28
|
+
isDemo: boolean;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export type AnyNoyaSingletonOptions<
|
|
@@ -75,6 +77,13 @@ export function initializeNoyaSingleton<
|
|
|
75
77
|
managerOptions
|
|
76
78
|
);
|
|
77
79
|
|
|
80
|
+
if (appData.userId) {
|
|
81
|
+
noyaManagerSingleton.ephemeralUserDataManager.setCurrentUserId(
|
|
82
|
+
appData.userId
|
|
83
|
+
);
|
|
84
|
+
noyaManagerSingleton.userManager.setCurrentUserId(appData.userId);
|
|
85
|
+
}
|
|
86
|
+
|
|
78
87
|
const resolvedSync =
|
|
79
88
|
sync ??
|
|
80
89
|
getSyncAdapter<S, M, E, MenuT>({
|
|
@@ -108,6 +117,9 @@ export function initializeNoyaSingleton<
|
|
|
108
117
|
anchor={
|
|
109
118
|
resolvedInspector === true ? "bottom right" : resolvedInspector.anchor
|
|
110
119
|
}
|
|
120
|
+
advanced={
|
|
121
|
+
resolvedInspector === true ? false : resolvedInspector.advanced
|
|
122
|
+
}
|
|
111
123
|
/>
|
|
112
124
|
);
|
|
113
125
|
}
|
|
@@ -117,6 +129,8 @@ export function initializeNoyaSingleton<
|
|
|
117
129
|
inspector: resolvedInspector,
|
|
118
130
|
theme: resolvedTheme,
|
|
119
131
|
viewType: resolvedViewType,
|
|
132
|
+
userId: appData.userId,
|
|
133
|
+
isDemo: appData.isDemo,
|
|
120
134
|
};
|
|
121
135
|
}
|
|
122
136
|
|