@noya-app/noya-api-client-react 0.1.44 → 0.1.45
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 +9 -9
- package/CHANGELOG.md +7 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -151
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -117
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7457,7 +7457,7 @@ import { isDeepEqual as isDeepEqual2 } from "@noya-app/noya-utils";
|
|
|
7457
7457
|
import { Observable as Observable8 } from "@noya-app/observable";
|
|
7458
7458
|
|
|
7459
7459
|
// ../state-manager/src/multiplayer.ts
|
|
7460
|
-
import { Cache, hash, isDeepEqual as
|
|
7460
|
+
import { Cache, hash, isDeepEqual as isDeepEqual4, uuid as uuid5 } from "@noya-app/noya-utils";
|
|
7461
7461
|
import { Observable as Observable10, get as get2, set as set2 } from "@noya-app/observable";
|
|
7462
7462
|
|
|
7463
7463
|
// ../../node_modules/@marcbachmann/cel-js/lib/errors.js
|
|
@@ -10474,6 +10474,9 @@ celEnvironment.registerFunction("random(): double", () => Math.random()).registe
|
|
|
10474
10474
|
).registerFunction("uuid(): string", () => uuid4());
|
|
10475
10475
|
var READ_DENIED = Symbol("readDenied");
|
|
10476
10476
|
|
|
10477
|
+
// ../state-manager/src/serverScripts.ts
|
|
10478
|
+
import { uuid as createUuid, isDeepEqual as isDeepEqual3 } from "@noya-app/noya-utils";
|
|
10479
|
+
|
|
10477
10480
|
// ../state-manager/src/stateManager.ts
|
|
10478
10481
|
import {
|
|
10479
10482
|
Observable as Observable9,
|
|
@@ -10485,7 +10488,7 @@ var createHash = (value, options) => hash(value, { ...options, ignoreUndefinedPr
|
|
|
10485
10488
|
|
|
10486
10489
|
// ../state-manager/src/NoyaManager.ts
|
|
10487
10490
|
import { uuid as uuid12 } from "@noya-app/noya-utils";
|
|
10488
|
-
import { Observable as
|
|
10491
|
+
import { Observable as Observable21, set as set3 } from "@noya-app/observable";
|
|
10489
10492
|
|
|
10490
10493
|
// ../noya-pipeline/src/graphToTasks.ts
|
|
10491
10494
|
import { get as get3 } from "@noya-app/observable";
|
|
@@ -10596,29 +10599,32 @@ import { Observable as Observable11 } from "@noya-app/observable";
|
|
|
10596
10599
|
import { Observable as Observable12 } from "@noya-app/observable";
|
|
10597
10600
|
|
|
10598
10601
|
// ../state-manager/src/ResourceManager.ts
|
|
10599
|
-
import { isDeepEqual as
|
|
10602
|
+
import { isDeepEqual as isDeepEqual5, uuid as uuid7 } from "@noya-app/noya-utils";
|
|
10600
10603
|
import { Observable as Observable13 } from "@noya-app/observable";
|
|
10601
10604
|
|
|
10605
|
+
// ../state-manager/src/SandboxManager.ts
|
|
10606
|
+
import { Observable as Observable14 } from "@noya-app/observable";
|
|
10607
|
+
|
|
10602
10608
|
// ../state-manager/src/rpcManager.ts
|
|
10603
10609
|
import { uuid as uuid8 } from "@noya-app/noya-utils";
|
|
10604
|
-
import { Observable as
|
|
10610
|
+
import { Observable as Observable15 } from "@noya-app/observable";
|
|
10605
10611
|
|
|
10606
10612
|
// ../state-manager/src/SecretManager.ts
|
|
10607
|
-
import { Observable as
|
|
10613
|
+
import { Observable as Observable16 } from "@noya-app/observable";
|
|
10608
10614
|
|
|
10609
10615
|
// ../state-manager/src/TaskManager.ts
|
|
10610
|
-
import { Observable as
|
|
10616
|
+
import { Observable as Observable17 } from "@noya-app/observable";
|
|
10611
10617
|
|
|
10612
10618
|
// ../state-manager/src/TranscriptionManager.ts
|
|
10613
10619
|
import { Base64 as Base642 } from "@noya-app/noya-utils";
|
|
10614
|
-
import { Observable as
|
|
10620
|
+
import { Observable as Observable18 } from "@noya-app/observable";
|
|
10615
10621
|
|
|
10616
10622
|
// ../state-manager/src/UserManager.ts
|
|
10617
|
-
import { Observable as
|
|
10623
|
+
import { Observable as Observable20 } from "@noya-app/observable";
|
|
10618
10624
|
|
|
10619
10625
|
// ../state-manager/src/sync/clientId.ts
|
|
10620
10626
|
import { uuid as uuid9 } from "@noya-app/noya-utils";
|
|
10621
|
-
import { Observable as
|
|
10627
|
+
import { Observable as Observable19 } from "@noya-app/observable";
|
|
10622
10628
|
|
|
10623
10629
|
// ../state-manager/src/sync/defaultNames.ts
|
|
10624
10630
|
import { upperFirst } from "@noya-app/noya-utils";
|
|
@@ -10691,9 +10697,9 @@ function getClientAnimalFromName(name) {
|
|
|
10691
10697
|
var CLIENT_ID_STORAGE_KEY = "noya-client-id";
|
|
10692
10698
|
var CLIENT_NAME_STORAGE_KEY = "noya-client-name";
|
|
10693
10699
|
var CLIENT_IMAGE_STORAGE_KEY = "noya-client-image";
|
|
10694
|
-
var clientId$ = new
|
|
10695
|
-
var clientName$ = new
|
|
10696
|
-
var clientImage$ = new
|
|
10700
|
+
var clientId$ = new Observable19(void 0);
|
|
10701
|
+
var clientName$ = new Observable19(void 0);
|
|
10702
|
+
var clientImage$ = new Observable19(void 0);
|
|
10697
10703
|
var safeGetItem = (key) => {
|
|
10698
10704
|
try {
|
|
10699
10705
|
return typeof localStorage !== "undefined" ? localStorage.getItem(key) : null;
|
|
@@ -10745,9 +10751,6 @@ import { Base64 as Base643 } from "@noya-app/noya-utils";
|
|
|
10745
10751
|
// ../state-manager/src/sync/localStorageSync.ts
|
|
10746
10752
|
import { uuid as uuid11 } from "@noya-app/noya-utils";
|
|
10747
10753
|
|
|
10748
|
-
// ../state-manager/src/serverScripts.ts
|
|
10749
|
-
import { uuid as createUuid, isDeepEqual as isDeepEqual5 } from "@noya-app/noya-utils";
|
|
10750
|
-
|
|
10751
10754
|
// ../noya-keymap/src/hooks.ts
|
|
10752
10755
|
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
10753
10756
|
|
|
@@ -10873,7 +10876,7 @@ import { useEffect as useEffect17 } from "react";
|
|
|
10873
10876
|
|
|
10874
10877
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
10875
10878
|
import {
|
|
10876
|
-
Observable as
|
|
10879
|
+
Observable as Observable22
|
|
10877
10880
|
} from "@noya-app/observable";
|
|
10878
10881
|
|
|
10879
10882
|
// ../noya-react-utils/src/components/AutoSizer.tsx
|
|
@@ -11180,7 +11183,7 @@ function downloadBlob(...params) {
|
|
|
11180
11183
|
}
|
|
11181
11184
|
|
|
11182
11185
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
11183
|
-
import
|
|
11186
|
+
import React36, {
|
|
11184
11187
|
createContext as createContext3,
|
|
11185
11188
|
useCallback as useCallback14,
|
|
11186
11189
|
useContext as useContext4,
|
|
@@ -11279,12 +11282,12 @@ var ErrorOverlay = React6.memo(function ErrorOverlay2({
|
|
|
11279
11282
|
});
|
|
11280
11283
|
|
|
11281
11284
|
// ../noya-multiplayer-react/src/inspector/useStateInspector.tsx
|
|
11282
|
-
import
|
|
11285
|
+
import React34 from "react";
|
|
11283
11286
|
import { createRoot } from "react-dom/client";
|
|
11284
11287
|
|
|
11285
11288
|
// ../noya-multiplayer-react/src/inspector/StateInspector.tsx
|
|
11286
11289
|
import { Base64 as Base644, memoize as memoize2, uuid as uuid13 } from "@noya-app/noya-utils";
|
|
11287
|
-
import
|
|
11290
|
+
import React33, {
|
|
11288
11291
|
useCallback as useCallback12,
|
|
11289
11292
|
useEffect as useEffect13,
|
|
11290
11293
|
useLayoutEffect as useLayoutEffect4
|
|
@@ -12867,7 +12870,9 @@ function EventsSection({
|
|
|
12867
12870
|
setShowEvents,
|
|
12868
12871
|
colorScheme,
|
|
12869
12872
|
eventsContainerRef,
|
|
12870
|
-
connectionEvents
|
|
12873
|
+
connectionEvents,
|
|
12874
|
+
paused,
|
|
12875
|
+
onTogglePaused
|
|
12871
12876
|
}) {
|
|
12872
12877
|
const theme3 = getStateInspectorTheme(colorScheme);
|
|
12873
12878
|
return /* @__PURE__ */ React25.createElement(
|
|
@@ -12876,9 +12881,20 @@ function EventsSection({
|
|
|
12876
12881
|
open: showEvents,
|
|
12877
12882
|
setOpen: setShowEvents,
|
|
12878
12883
|
title: "Events",
|
|
12879
|
-
colorScheme
|
|
12884
|
+
colorScheme,
|
|
12885
|
+
right: /* @__PURE__ */ React25.createElement(StateInspectorButton, { theme: theme3, onClick: onTogglePaused }, paused ? "Resume" : "Pause")
|
|
12880
12886
|
},
|
|
12881
|
-
/* @__PURE__ */ React25.createElement(StateInspectorDisclosureRowInner, { ref: eventsContainerRef },
|
|
12887
|
+
/* @__PURE__ */ React25.createElement(StateInspectorDisclosureRowInner, { ref: eventsContainerRef }, paused && /* @__PURE__ */ React25.createElement(
|
|
12888
|
+
"div",
|
|
12889
|
+
{
|
|
12890
|
+
style: {
|
|
12891
|
+
padding: "4px 12px",
|
|
12892
|
+
fontSize: "11px",
|
|
12893
|
+
opacity: 0.7
|
|
12894
|
+
}
|
|
12895
|
+
},
|
|
12896
|
+
"Event streaming paused"
|
|
12897
|
+
), connectionEvents?.map(
|
|
12882
12898
|
(event, index) => event.type === "stateChange" ? /* @__PURE__ */ React25.createElement(StateInspectorRow, { key: index, colorScheme }, "connection:", " ", /* @__PURE__ */ React25.createElement("span", { style: { fontStyle: "italic" } }, event.state.toLowerCase())) : /* @__PURE__ */ React25.createElement(
|
|
12883
12899
|
StateInspectorRow,
|
|
12884
12900
|
{
|
|
@@ -12909,7 +12925,7 @@ function EventsSection({
|
|
|
12909
12925
|
}
|
|
12910
12926
|
)
|
|
12911
12927
|
)
|
|
12912
|
-
), !connectionEvents && /* @__PURE__ */ React25.createElement(
|
|
12928
|
+
), !connectionEvents?.length && /* @__PURE__ */ React25.createElement(
|
|
12913
12929
|
"div",
|
|
12914
12930
|
{
|
|
12915
12931
|
style: {
|
|
@@ -13161,7 +13177,8 @@ function ServerScriptLogsSection({
|
|
|
13161
13177
|
logs,
|
|
13162
13178
|
containerRef,
|
|
13163
13179
|
paused,
|
|
13164
|
-
onTogglePaused
|
|
13180
|
+
onTogglePaused,
|
|
13181
|
+
title = "Server Script Logs"
|
|
13165
13182
|
}) {
|
|
13166
13183
|
const theme3 = getStateInspectorTheme(colorScheme);
|
|
13167
13184
|
return /* @__PURE__ */ React27.createElement(
|
|
@@ -13169,7 +13186,7 @@ function ServerScriptLogsSection({
|
|
|
13169
13186
|
{
|
|
13170
13187
|
open: showLogs,
|
|
13171
13188
|
setOpen: setShowLogs,
|
|
13172
|
-
title
|
|
13189
|
+
title,
|
|
13173
13190
|
colorScheme,
|
|
13174
13191
|
right: /* @__PURE__ */ React27.createElement(StateInspectorButton, { theme: theme3, onClick: onTogglePaused }, paused ? "Resume" : "Pause")
|
|
13175
13192
|
},
|
|
@@ -13198,6 +13215,18 @@ function ServerScriptLogsSection({
|
|
|
13198
13215
|
},
|
|
13199
13216
|
/* @__PURE__ */ React27.createElement("span", null, formatTimestamp(log.timestamp)),
|
|
13200
13217
|
/* @__PURE__ */ React27.createElement("span", { style: { color: levelColors[log.level] } }, log.level),
|
|
13218
|
+
(log.origin || log.target || log.mode) && /* @__PURE__ */ React27.createElement(
|
|
13219
|
+
"span",
|
|
13220
|
+
{
|
|
13221
|
+
style: {
|
|
13222
|
+
fontFamily: "monospace",
|
|
13223
|
+
textTransform: "none",
|
|
13224
|
+
fontSize: "10px",
|
|
13225
|
+
opacity: 0.75
|
|
13226
|
+
}
|
|
13227
|
+
},
|
|
13228
|
+
[log.origin ?? log.target, log.mode].filter(Boolean).join(" / ")
|
|
13229
|
+
),
|
|
13201
13230
|
/* @__PURE__ */ React27.createElement(
|
|
13202
13231
|
"span",
|
|
13203
13232
|
{
|
|
@@ -13223,8 +13252,7 @@ function ServerScriptLogsSection({
|
|
|
13223
13252
|
{
|
|
13224
13253
|
key: index,
|
|
13225
13254
|
data: value,
|
|
13226
|
-
theme: theme3
|
|
13227
|
-
expandLevel: 3
|
|
13255
|
+
theme: theme3
|
|
13228
13256
|
}
|
|
13229
13257
|
)) : /* @__PURE__ */ React27.createElement("span", { style: { fontSize: "11px", opacity: 0.7 } }, "No data")
|
|
13230
13258
|
))), !logs?.length && /* @__PURE__ */ React27.createElement(
|
|
@@ -13869,6 +13897,31 @@ function useLocalStorageState(key, defaultValue) {
|
|
|
13869
13897
|
return [state, setLocalStorageState];
|
|
13870
13898
|
}
|
|
13871
13899
|
|
|
13900
|
+
// ../noya-multiplayer-react/src/inspector/usePausedStream.ts
|
|
13901
|
+
import React31 from "react";
|
|
13902
|
+
function usePausedStream(items) {
|
|
13903
|
+
const [paused, setPaused] = React31.useState(false);
|
|
13904
|
+
const [visibleItems, setVisibleItems] = React31.useState(items ?? []);
|
|
13905
|
+
const togglePaused = React31.useCallback(() => {
|
|
13906
|
+
setPaused((value) => {
|
|
13907
|
+
if (!value) {
|
|
13908
|
+
setVisibleItems(items ?? []);
|
|
13909
|
+
}
|
|
13910
|
+
return !value;
|
|
13911
|
+
});
|
|
13912
|
+
}, [items]);
|
|
13913
|
+
React31.useEffect(() => {
|
|
13914
|
+
if (paused) return;
|
|
13915
|
+
setVisibleItems(items ?? []);
|
|
13916
|
+
}, [items, paused]);
|
|
13917
|
+
return {
|
|
13918
|
+
paused,
|
|
13919
|
+
setPaused,
|
|
13920
|
+
togglePaused,
|
|
13921
|
+
visibleItems
|
|
13922
|
+
};
|
|
13923
|
+
}
|
|
13924
|
+
|
|
13872
13925
|
// ../noya-multiplayer-react/src/inspector/StateInspector.tsx
|
|
13873
13926
|
var StateInspector = memoGeneric(function StateInspector2({
|
|
13874
13927
|
noyaManager,
|
|
@@ -13891,16 +13944,17 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
13891
13944
|
activityEventsManager,
|
|
13892
13945
|
logManager
|
|
13893
13946
|
} = noyaManager;
|
|
13894
|
-
const [didMount, setDidMount] =
|
|
13947
|
+
const [didMount, setDidMount] = React33.useState(false);
|
|
13895
13948
|
const tasks = useObservable2(taskManager.tasks$);
|
|
13896
13949
|
const inputs = useObservable2(ioManager.inputs$);
|
|
13897
13950
|
const outputTransforms = useObservable2(ioManager.outputTransforms$);
|
|
13898
13951
|
useLayoutEffect4(() => {
|
|
13899
13952
|
setDidMount(true);
|
|
13900
13953
|
}, []);
|
|
13901
|
-
const eventsContainerRef =
|
|
13902
|
-
const activityEventsContainerRef =
|
|
13903
|
-
const serverLogsContainerRef =
|
|
13954
|
+
const eventsContainerRef = React33.useRef(null);
|
|
13955
|
+
const activityEventsContainerRef = React33.useRef(null);
|
|
13956
|
+
const serverLogsContainerRef = React33.useRef(null);
|
|
13957
|
+
const serverSimulationLogsContainerRef = React33.useRef(null);
|
|
13904
13958
|
const [showInspector, setShowInspector] = useLocalStorageState(
|
|
13905
13959
|
"noya-multiplayer-react-show-inspector",
|
|
13906
13960
|
true
|
|
@@ -13917,6 +13971,10 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
13917
13971
|
"noya-multiplayer-react-show-users",
|
|
13918
13972
|
true
|
|
13919
13973
|
);
|
|
13974
|
+
const [showUserDetails, setShowUserDetails] = useLocalStorageState(
|
|
13975
|
+
"noya-multiplayer-react-show-user-details",
|
|
13976
|
+
false
|
|
13977
|
+
);
|
|
13920
13978
|
const [showData, setShowData] = useLocalStorageState(
|
|
13921
13979
|
"noya-multiplayer-react-show-data",
|
|
13922
13980
|
true
|
|
@@ -13957,35 +14015,51 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
13957
14015
|
"noya-multiplayer-react-show-server-logs",
|
|
13958
14016
|
false
|
|
13959
14017
|
);
|
|
14018
|
+
const [showServerSimulationLogs, setShowServerSimulationLogs] = useLocalStorageState(
|
|
14019
|
+
"noya-multiplayer-react-show-server-simulation-logs",
|
|
14020
|
+
false
|
|
14021
|
+
);
|
|
14022
|
+
const [showSimulation, setShowSimulation] = useLocalStorageState(
|
|
14023
|
+
"noya-multiplayer-react-show-simulation",
|
|
14024
|
+
false
|
|
14025
|
+
);
|
|
13960
14026
|
const connectionEvents = useObservable2(connectionEventManager.events$);
|
|
14027
|
+
const {
|
|
14028
|
+
visibleItems: visibleConnectionEvents,
|
|
14029
|
+
paused: connectionEventsPaused,
|
|
14030
|
+
togglePaused: toggleConnectionEventsPaused
|
|
14031
|
+
} = usePausedStream(connectionEvents);
|
|
13961
14032
|
useEffect13(() => {
|
|
13962
14033
|
if (eventsContainerRef.current) {
|
|
13963
14034
|
eventsContainerRef.current.scrollTop = eventsContainerRef.current.scrollHeight;
|
|
13964
14035
|
}
|
|
13965
|
-
}, [
|
|
14036
|
+
}, [visibleConnectionEvents]);
|
|
13966
14037
|
const serverLogs = useObservable2(logManager.logs$);
|
|
13967
|
-
const
|
|
13968
|
-
|
|
13969
|
-
|
|
14038
|
+
const {
|
|
14039
|
+
visibleItems: visibleServerLogs,
|
|
14040
|
+
paused: serverLogsPaused,
|
|
14041
|
+
togglePaused: toggleServerLogsPaused
|
|
14042
|
+
} = usePausedStream(serverLogs);
|
|
14043
|
+
const serverSimulationLogs = useObservable2(
|
|
14044
|
+
multiplayerStateManager.serverSimulationLogs$
|
|
13970
14045
|
);
|
|
13971
|
-
const
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
return !value;
|
|
13977
|
-
});
|
|
13978
|
-
}, [serverLogs]);
|
|
13979
|
-
useEffect13(() => {
|
|
13980
|
-
if (serverLogsPaused) return;
|
|
13981
|
-
setVisibleServerLogs(serverLogs ?? []);
|
|
13982
|
-
}, [serverLogs, serverLogsPaused]);
|
|
14046
|
+
const {
|
|
14047
|
+
visibleItems: visibleServerSimulationLogs,
|
|
14048
|
+
paused: serverSimulationLogsPaused,
|
|
14049
|
+
togglePaused: toggleServerSimulationLogsPaused
|
|
14050
|
+
} = usePausedStream(serverSimulationLogs);
|
|
13983
14051
|
useEffect13(() => {
|
|
13984
14052
|
if (!showServerLogs) return;
|
|
13985
14053
|
if (serverLogsContainerRef.current) {
|
|
13986
14054
|
serverLogsContainerRef.current.scrollTop = serverLogsContainerRef.current.scrollHeight;
|
|
13987
14055
|
}
|
|
13988
14056
|
}, [showServerLogs, visibleServerLogs]);
|
|
14057
|
+
useEffect13(() => {
|
|
14058
|
+
if (!showServerSimulationLogs) return;
|
|
14059
|
+
if (serverSimulationLogsContainerRef.current) {
|
|
14060
|
+
serverSimulationLogsContainerRef.current.scrollTop = serverSimulationLogsContainerRef.current.scrollHeight;
|
|
14061
|
+
}
|
|
14062
|
+
}, [showServerSimulationLogs, visibleServerSimulationLogs]);
|
|
13989
14063
|
const multipeerStateInitialized = useObservable2(
|
|
13990
14064
|
multiplayerStateManager.isInitialized$
|
|
13991
14065
|
);
|
|
@@ -13997,8 +14071,10 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
13997
14071
|
const assetsInitialized = useObservable2(assetManager.isInitialized$);
|
|
13998
14072
|
const secrets = useObservable2(secretManager.secrets$);
|
|
13999
14073
|
const secretsInitialized = useObservable2(secretManager.isInitialized$);
|
|
14000
|
-
const connectedUsers = useObservable2(userManager.
|
|
14074
|
+
const connectedUsers = useObservable2(userManager.allUsers$);
|
|
14001
14075
|
const connectionId = useObservable2(userManager.currentConnectionId$);
|
|
14076
|
+
const simulationDiagnostics = multiplayerStateManager.getServerSimulationDiagnostics?.() ?? null;
|
|
14077
|
+
const showSimulationLogsSection = (simulationDiagnostics?.simulateLocally ?? false) || visibleServerSimulationLogs.length > 0;
|
|
14002
14078
|
const state = useObservable2(multiplayerStateManager.optimisticState$);
|
|
14003
14079
|
const inputsInitialized = useObservable2(ioManager.inputsInitialized$);
|
|
14004
14080
|
const outputTransformsInitialized = useObservable2(
|
|
@@ -14042,7 +14118,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14042
14118
|
}, [noyaManager]);
|
|
14043
14119
|
if (!didMount) return null;
|
|
14044
14120
|
if (!showInspector) {
|
|
14045
|
-
return /* @__PURE__ */
|
|
14121
|
+
return /* @__PURE__ */ React33.createElement(
|
|
14046
14122
|
"div",
|
|
14047
14123
|
{
|
|
14048
14124
|
...props,
|
|
@@ -14054,7 +14130,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14054
14130
|
},
|
|
14055
14131
|
onClick: () => setShowInspector(true)
|
|
14056
14132
|
},
|
|
14057
|
-
/* @__PURE__ */
|
|
14133
|
+
/* @__PURE__ */ React33.createElement(
|
|
14058
14134
|
StateInspectorToggleButton,
|
|
14059
14135
|
{
|
|
14060
14136
|
showInspector,
|
|
@@ -14065,7 +14141,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14065
14141
|
)
|
|
14066
14142
|
);
|
|
14067
14143
|
}
|
|
14068
|
-
return /* @__PURE__ */
|
|
14144
|
+
return /* @__PURE__ */ React33.createElement(
|
|
14069
14145
|
"div",
|
|
14070
14146
|
{
|
|
14071
14147
|
...props,
|
|
@@ -14074,7 +14150,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14074
14150
|
...props.style
|
|
14075
14151
|
}
|
|
14076
14152
|
},
|
|
14077
|
-
/* @__PURE__ */
|
|
14153
|
+
/* @__PURE__ */ React33.createElement(
|
|
14078
14154
|
StateInspectorDisclosureSection,
|
|
14079
14155
|
{
|
|
14080
14156
|
isFirst: true,
|
|
@@ -14084,9 +14160,17 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14084
14160
|
colorScheme,
|
|
14085
14161
|
style: {
|
|
14086
14162
|
flex: "0 0 auto",
|
|
14087
|
-
maxHeight: "
|
|
14163
|
+
maxHeight: "50%",
|
|
14164
|
+
overflowY: "auto"
|
|
14088
14165
|
},
|
|
14089
|
-
right: /* @__PURE__ */
|
|
14166
|
+
right: /* @__PURE__ */ React33.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React33.createElement(
|
|
14167
|
+
StateInspectorButton,
|
|
14168
|
+
{
|
|
14169
|
+
theme: theme3,
|
|
14170
|
+
onClick: () => setShowUserDetails(!showUserDetails)
|
|
14171
|
+
},
|
|
14172
|
+
"Toggle details"
|
|
14173
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14090
14174
|
StateInspectorToggleButton,
|
|
14091
14175
|
{
|
|
14092
14176
|
showInspector,
|
|
@@ -14094,19 +14178,21 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14094
14178
|
theme: theme3,
|
|
14095
14179
|
anchor
|
|
14096
14180
|
}
|
|
14097
|
-
)
|
|
14181
|
+
))
|
|
14098
14182
|
},
|
|
14099
|
-
/* @__PURE__ */
|
|
14100
|
-
|
|
14101
|
-
return /* @__PURE__ */ React31.createElement(
|
|
14183
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, { style: { flex: "0 0 auto" } }, connectedUsers?.filter((user) => showUserDetails || !user.inactive).map((user, index, array) => {
|
|
14184
|
+
return /* @__PURE__ */ React33.createElement(
|
|
14102
14185
|
StateInspectorRow,
|
|
14103
14186
|
{
|
|
14104
14187
|
key: user.connectionId,
|
|
14105
14188
|
colorScheme,
|
|
14106
14189
|
variant: user.connectionId === connectionId ? "up" : void 0,
|
|
14107
|
-
bordered: index !== array.length - 1
|
|
14190
|
+
bordered: index !== array.length - 1,
|
|
14191
|
+
style: {
|
|
14192
|
+
opacity: user.inactive ? 0.5 : 1
|
|
14193
|
+
}
|
|
14108
14194
|
},
|
|
14109
|
-
user.image && /* @__PURE__ */
|
|
14195
|
+
user.image && /* @__PURE__ */ React33.createElement(
|
|
14110
14196
|
"img",
|
|
14111
14197
|
{
|
|
14112
14198
|
src: user.image,
|
|
@@ -14123,12 +14209,9 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14123
14209
|
}
|
|
14124
14210
|
}
|
|
14125
14211
|
),
|
|
14126
|
-
user.name
|
|
14127
|
-
" (",
|
|
14128
|
-
ellipsis(identifier, 8, "middle"),
|
|
14129
|
-
")"
|
|
14212
|
+
showUserDetails ? /* @__PURE__ */ React33.createElement(themedObjectInspector, { data: user, theme: theme3 }) : user.name
|
|
14130
14213
|
);
|
|
14131
|
-
}), !connectedUsers && /* @__PURE__ */
|
|
14214
|
+
}), !connectedUsers && /* @__PURE__ */ React33.createElement(
|
|
14132
14215
|
"div",
|
|
14133
14216
|
{
|
|
14134
14217
|
style: {
|
|
@@ -14139,13 +14222,13 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14139
14222
|
gap: "4px"
|
|
14140
14223
|
}
|
|
14141
14224
|
},
|
|
14142
|
-
/* @__PURE__ */
|
|
14225
|
+
/* @__PURE__ */ React33.createElement("span", null, "No connected users")
|
|
14143
14226
|
))
|
|
14144
14227
|
),
|
|
14145
|
-
/* @__PURE__ */
|
|
14228
|
+
/* @__PURE__ */ React33.createElement(
|
|
14146
14229
|
StateInspectorDisclosureSection,
|
|
14147
14230
|
{
|
|
14148
|
-
title: /* @__PURE__ */
|
|
14231
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Data", /* @__PURE__ */ React33.createElement(
|
|
14149
14232
|
ColoredDot,
|
|
14150
14233
|
{
|
|
14151
14234
|
type: multipeerStateInitialized ? "success" : "error"
|
|
@@ -14154,7 +14237,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14154
14237
|
colorScheme,
|
|
14155
14238
|
setOpen: setShowData,
|
|
14156
14239
|
open: showData,
|
|
14157
|
-
right: /* @__PURE__ */
|
|
14240
|
+
right: /* @__PURE__ */ React33.createElement(
|
|
14158
14241
|
"span",
|
|
14159
14242
|
{
|
|
14160
14243
|
style: {
|
|
@@ -14162,9 +14245,9 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14162
14245
|
gap: "12px"
|
|
14163
14246
|
}
|
|
14164
14247
|
},
|
|
14165
|
-
/* @__PURE__ */
|
|
14166
|
-
/* @__PURE__ */
|
|
14167
|
-
/* @__PURE__ */
|
|
14248
|
+
/* @__PURE__ */ React33.createElement(StateInspectorButton, { theme: theme3, onClick: handleImportAll }, "Import"),
|
|
14249
|
+
/* @__PURE__ */ React33.createElement(StateInspectorButton, { theme: theme3, onClick: handleExportAll }, "Export"),
|
|
14250
|
+
/* @__PURE__ */ React33.createElement(
|
|
14168
14251
|
StateInspectorButton,
|
|
14169
14252
|
{
|
|
14170
14253
|
theme: theme3,
|
|
@@ -14176,14 +14259,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14176
14259
|
)
|
|
14177
14260
|
)
|
|
14178
14261
|
},
|
|
14179
|
-
/* @__PURE__ */
|
|
14262
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, /* @__PURE__ */ React33.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14180
14263
|
themedObjectInspector,
|
|
14181
14264
|
{
|
|
14182
14265
|
name: multiplayerStateManager.schema ? "state" : void 0,
|
|
14183
14266
|
data: state,
|
|
14184
14267
|
theme: theme3
|
|
14185
14268
|
}
|
|
14186
|
-
)), multiplayerStateManager.schema && /* @__PURE__ */
|
|
14269
|
+
)), multiplayerStateManager.schema && /* @__PURE__ */ React33.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14187
14270
|
themedObjectInspector,
|
|
14188
14271
|
{
|
|
14189
14272
|
name: "schema",
|
|
@@ -14192,7 +14275,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14192
14275
|
}
|
|
14193
14276
|
)))
|
|
14194
14277
|
),
|
|
14195
|
-
/* @__PURE__ */
|
|
14278
|
+
/* @__PURE__ */ React33.createElement(
|
|
14196
14279
|
HistorySection,
|
|
14197
14280
|
{
|
|
14198
14281
|
showHistory,
|
|
@@ -14202,14 +14285,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14202
14285
|
multiplayerStateManager
|
|
14203
14286
|
}
|
|
14204
14287
|
),
|
|
14205
|
-
/* @__PURE__ */
|
|
14288
|
+
/* @__PURE__ */ React33.createElement(
|
|
14206
14289
|
StateInspectorDisclosureSection,
|
|
14207
14290
|
{
|
|
14208
14291
|
open: showAssets,
|
|
14209
14292
|
setOpen: setShowAssets,
|
|
14210
|
-
title: /* @__PURE__ */
|
|
14293
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Assets (", assets.length, ")", /* @__PURE__ */ React33.createElement(ColoredDot, { type: assetsInitialized ? "success" : "error" })),
|
|
14211
14294
|
colorScheme,
|
|
14212
|
-
right: /* @__PURE__ */
|
|
14295
|
+
right: /* @__PURE__ */ React33.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React33.createElement(
|
|
14213
14296
|
StateInspectorButton,
|
|
14214
14297
|
{
|
|
14215
14298
|
theme: theme3,
|
|
@@ -14224,7 +14307,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14224
14307
|
}
|
|
14225
14308
|
},
|
|
14226
14309
|
"Delete all"
|
|
14227
|
-
), /* @__PURE__ */
|
|
14310
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14228
14311
|
StateInspectorButton,
|
|
14229
14312
|
{
|
|
14230
14313
|
theme: theme3,
|
|
@@ -14237,7 +14320,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14237
14320
|
}
|
|
14238
14321
|
},
|
|
14239
14322
|
"Reload"
|
|
14240
|
-
), /* @__PURE__ */
|
|
14323
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14241
14324
|
StateInspectorButton,
|
|
14242
14325
|
{
|
|
14243
14326
|
theme: theme3,
|
|
@@ -14261,14 +14344,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14261
14344
|
"Upload"
|
|
14262
14345
|
))
|
|
14263
14346
|
},
|
|
14264
|
-
/* @__PURE__ */
|
|
14347
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, assets.map((asset) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key: asset.id, colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14265
14348
|
themedObjectInspector,
|
|
14266
14349
|
{
|
|
14267
14350
|
name: asset.id,
|
|
14268
14351
|
data: truncateAsset(asset),
|
|
14269
14352
|
theme: theme3
|
|
14270
14353
|
}
|
|
14271
|
-
), /* @__PURE__ */
|
|
14354
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14272
14355
|
StateInspectorButton,
|
|
14273
14356
|
{
|
|
14274
14357
|
theme: theme3,
|
|
@@ -14277,14 +14360,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14277
14360
|
"Delete"
|
|
14278
14361
|
))))
|
|
14279
14362
|
),
|
|
14280
|
-
advanced && /* @__PURE__ */
|
|
14363
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14281
14364
|
StateInspectorDisclosureSection,
|
|
14282
14365
|
{
|
|
14283
|
-
title: /* @__PURE__ */
|
|
14366
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Resources (", resources.length, ")", /* @__PURE__ */ React33.createElement(ColoredDot, { type: resourcesInitialized ? "success" : "error" })),
|
|
14284
14367
|
colorScheme,
|
|
14285
14368
|
open: showResources,
|
|
14286
14369
|
setOpen: setShowResources,
|
|
14287
|
-
right: /* @__PURE__ */
|
|
14370
|
+
right: /* @__PURE__ */ React33.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React33.createElement(
|
|
14288
14371
|
StateInspectorButton,
|
|
14289
14372
|
{
|
|
14290
14373
|
theme: theme3,
|
|
@@ -14299,7 +14382,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14299
14382
|
}
|
|
14300
14383
|
},
|
|
14301
14384
|
"Delete all"
|
|
14302
|
-
), /* @__PURE__ */
|
|
14385
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14303
14386
|
StateInspectorButton,
|
|
14304
14387
|
{
|
|
14305
14388
|
theme: theme3,
|
|
@@ -14312,7 +14395,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14312
14395
|
}
|
|
14313
14396
|
},
|
|
14314
14397
|
"Create Directory"
|
|
14315
|
-
), /* @__PURE__ */
|
|
14398
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14316
14399
|
StateInspectorButton,
|
|
14317
14400
|
{
|
|
14318
14401
|
theme: theme3,
|
|
@@ -14332,21 +14415,21 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14332
14415
|
"Create Asset"
|
|
14333
14416
|
))
|
|
14334
14417
|
},
|
|
14335
|
-
/* @__PURE__ */
|
|
14418
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, resources?.map((resource) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key: resource.id, colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14336
14419
|
themedObjectInspector,
|
|
14337
14420
|
{
|
|
14338
14421
|
name: resource.path,
|
|
14339
14422
|
data: resource,
|
|
14340
14423
|
theme: theme3
|
|
14341
14424
|
}
|
|
14342
|
-
), /* @__PURE__ */
|
|
14425
|
+
), /* @__PURE__ */ React33.createElement("div", { style: { display: "flex", gap: "4px" } }, /* @__PURE__ */ React33.createElement(
|
|
14343
14426
|
StateInspectorButton,
|
|
14344
14427
|
{
|
|
14345
14428
|
theme: theme3,
|
|
14346
14429
|
onClick: () => resourceManager.deleteResource({ id: resource.id })
|
|
14347
14430
|
},
|
|
14348
14431
|
"Delete"
|
|
14349
|
-
), /* @__PURE__ */
|
|
14432
|
+
), /* @__PURE__ */ React33.createElement(
|
|
14350
14433
|
StateInspectorButton,
|
|
14351
14434
|
{
|
|
14352
14435
|
theme: theme3,
|
|
@@ -14359,14 +14442,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14359
14442
|
"Rename"
|
|
14360
14443
|
)))))
|
|
14361
14444
|
),
|
|
14362
|
-
advanced && /* @__PURE__ */
|
|
14445
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14363
14446
|
StateInspectorDisclosureSection,
|
|
14364
14447
|
{
|
|
14365
|
-
title: /* @__PURE__ */
|
|
14448
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Secrets", /* @__PURE__ */ React33.createElement(ColoredDot, { type: secretsInitialized ? "success" : "error" })),
|
|
14366
14449
|
colorScheme,
|
|
14367
14450
|
open: showSecrets,
|
|
14368
14451
|
setOpen: setShowSecrets,
|
|
14369
|
-
right: /* @__PURE__ */
|
|
14452
|
+
right: /* @__PURE__ */ React33.createElement(
|
|
14370
14453
|
StateInspectorButton,
|
|
14371
14454
|
{
|
|
14372
14455
|
theme: theme3,
|
|
@@ -14381,7 +14464,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14381
14464
|
"Create"
|
|
14382
14465
|
)
|
|
14383
14466
|
},
|
|
14384
|
-
/* @__PURE__ */
|
|
14467
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, secrets.map((secret) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key: secret.id, colorScheme }, /* @__PURE__ */ React33.createElement(themedObjectInspector, { data: secret, theme: theme3 }), /* @__PURE__ */ React33.createElement(
|
|
14385
14468
|
StateInspectorButton,
|
|
14386
14469
|
{
|
|
14387
14470
|
theme: theme3,
|
|
@@ -14390,15 +14473,15 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14390
14473
|
"Delete"
|
|
14391
14474
|
))))
|
|
14392
14475
|
),
|
|
14393
|
-
advanced && /* @__PURE__ */
|
|
14476
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14394
14477
|
StateInspectorDisclosureSection,
|
|
14395
14478
|
{
|
|
14396
14479
|
open: showInputs,
|
|
14397
14480
|
setOpen: setShowInputs,
|
|
14398
|
-
title: /* @__PURE__ */
|
|
14481
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Inputs", /* @__PURE__ */ React33.createElement(ColoredDot, { type: inputsInitialized ? "success" : "error" })),
|
|
14399
14482
|
colorScheme
|
|
14400
14483
|
},
|
|
14401
|
-
/* @__PURE__ */
|
|
14484
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, inputs?.map((input) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key: input.id, colorScheme }, /* @__PURE__ */ React33.createElement(themedObjectInspector, { data: input, theme: theme3 }))), !inputs?.length && /* @__PURE__ */ React33.createElement(
|
|
14402
14485
|
"div",
|
|
14403
14486
|
{
|
|
14404
14487
|
style: {
|
|
@@ -14409,15 +14492,15 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14409
14492
|
gap: "4px"
|
|
14410
14493
|
}
|
|
14411
14494
|
},
|
|
14412
|
-
/* @__PURE__ */
|
|
14495
|
+
/* @__PURE__ */ React33.createElement("span", null, "No inputs")
|
|
14413
14496
|
))
|
|
14414
14497
|
),
|
|
14415
|
-
advanced && /* @__PURE__ */
|
|
14498
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14416
14499
|
StateInspectorDisclosureSection,
|
|
14417
14500
|
{
|
|
14418
14501
|
open: showOutputTransforms,
|
|
14419
14502
|
setOpen: setShowOutputTransforms,
|
|
14420
|
-
title: /* @__PURE__ */
|
|
14503
|
+
title: /* @__PURE__ */ React33.createElement(StateInspectorTitleLabel, null, "Output Transforms", /* @__PURE__ */ React33.createElement(
|
|
14421
14504
|
ColoredDot,
|
|
14422
14505
|
{
|
|
14423
14506
|
type: outputTransformsInitialized ? "success" : "error"
|
|
@@ -14425,7 +14508,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14425
14508
|
)),
|
|
14426
14509
|
colorScheme
|
|
14427
14510
|
},
|
|
14428
|
-
/* @__PURE__ */
|
|
14511
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, outputTransforms?.map((transform) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key: transform.id, colorScheme }, /* @__PURE__ */ React33.createElement(themedObjectInspector, { data: transform, theme: theme3 }))), !outputTransforms?.length && /* @__PURE__ */ React33.createElement(
|
|
14429
14512
|
"div",
|
|
14430
14513
|
{
|
|
14431
14514
|
style: {
|
|
@@ -14436,10 +14519,10 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14436
14519
|
gap: "4px"
|
|
14437
14520
|
}
|
|
14438
14521
|
},
|
|
14439
|
-
/* @__PURE__ */
|
|
14522
|
+
/* @__PURE__ */ React33.createElement("span", null, "No output transforms")
|
|
14440
14523
|
))
|
|
14441
14524
|
),
|
|
14442
|
-
advanced && /* @__PURE__ */
|
|
14525
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14443
14526
|
StateInspectorDisclosureSection,
|
|
14444
14527
|
{
|
|
14445
14528
|
title: "Tasks",
|
|
@@ -14447,7 +14530,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14447
14530
|
open: showTasks,
|
|
14448
14531
|
setOpen: setShowTasks
|
|
14449
14532
|
},
|
|
14450
|
-
/* @__PURE__ */
|
|
14533
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, tasks?.map((task) => /* @__PURE__ */ React33.createElement(
|
|
14451
14534
|
StateInspectorRow,
|
|
14452
14535
|
{
|
|
14453
14536
|
key: task.id,
|
|
@@ -14456,7 +14539,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14456
14539
|
backgroundColor: task.status === "done" ? "rgba(0,255,0,0.2)" : task.status === "error" ? "rgba(255,0,0,0.2)" : void 0
|
|
14457
14540
|
}
|
|
14458
14541
|
},
|
|
14459
|
-
/* @__PURE__ */
|
|
14542
|
+
/* @__PURE__ */ React33.createElement(
|
|
14460
14543
|
themedObjectInspector,
|
|
14461
14544
|
{
|
|
14462
14545
|
name: task.name,
|
|
@@ -14466,7 +14549,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14466
14549
|
)
|
|
14467
14550
|
)))
|
|
14468
14551
|
),
|
|
14469
|
-
/* @__PURE__ */
|
|
14552
|
+
/* @__PURE__ */ React33.createElement(
|
|
14470
14553
|
StateInspectorDisclosureSection,
|
|
14471
14554
|
{
|
|
14472
14555
|
open: showShared,
|
|
@@ -14474,7 +14557,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14474
14557
|
title: "Shared Connection Data",
|
|
14475
14558
|
colorScheme
|
|
14476
14559
|
},
|
|
14477
|
-
/* @__PURE__ */
|
|
14560
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, Object.entries(shared).map(([key, value]) => /* @__PURE__ */ React33.createElement(StateInspectorRow, { key, colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14478
14561
|
themedObjectInspector,
|
|
14479
14562
|
{
|
|
14480
14563
|
name: key,
|
|
@@ -14484,7 +14567,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14484
14567
|
}
|
|
14485
14568
|
))))
|
|
14486
14569
|
),
|
|
14487
|
-
/* @__PURE__ */
|
|
14570
|
+
/* @__PURE__ */ React33.createElement(
|
|
14488
14571
|
ServerScriptLogsSection,
|
|
14489
14572
|
{
|
|
14490
14573
|
colorScheme,
|
|
@@ -14496,7 +14579,44 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14496
14579
|
containerRef: serverLogsContainerRef
|
|
14497
14580
|
}
|
|
14498
14581
|
),
|
|
14499
|
-
|
|
14582
|
+
showSimulationLogsSection && /* @__PURE__ */ React33.createElement(
|
|
14583
|
+
ServerScriptLogsSection,
|
|
14584
|
+
{
|
|
14585
|
+
title: "Server Script Simulation Logs",
|
|
14586
|
+
colorScheme,
|
|
14587
|
+
showLogs: showServerSimulationLogs,
|
|
14588
|
+
setShowLogs: setShowServerSimulationLogs,
|
|
14589
|
+
logs: visibleServerSimulationLogs,
|
|
14590
|
+
paused: serverSimulationLogsPaused,
|
|
14591
|
+
onTogglePaused: toggleServerSimulationLogsPaused,
|
|
14592
|
+
containerRef: serverSimulationLogsContainerRef
|
|
14593
|
+
}
|
|
14594
|
+
),
|
|
14595
|
+
/* @__PURE__ */ React33.createElement(
|
|
14596
|
+
StateInspectorDisclosureSection,
|
|
14597
|
+
{
|
|
14598
|
+
open: showSimulation,
|
|
14599
|
+
setOpen: setShowSimulation,
|
|
14600
|
+
title: "Server Simulation",
|
|
14601
|
+
colorScheme
|
|
14602
|
+
},
|
|
14603
|
+
/* @__PURE__ */ React33.createElement(StateInspectorDisclosureRowInner, null, /* @__PURE__ */ React33.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React33.createElement(
|
|
14604
|
+
themedObjectInspector,
|
|
14605
|
+
{
|
|
14606
|
+
name: "status",
|
|
14607
|
+
data: simulationDiagnostics ?? {
|
|
14608
|
+
simulateLocally: false,
|
|
14609
|
+
simulatorActive: false,
|
|
14610
|
+
clockSkewMs: 0,
|
|
14611
|
+
invocations: [],
|
|
14612
|
+
pendingPredictions: []
|
|
14613
|
+
},
|
|
14614
|
+
theme: theme3,
|
|
14615
|
+
expandLevel: 2
|
|
14616
|
+
}
|
|
14617
|
+
)))
|
|
14618
|
+
),
|
|
14619
|
+
advanced && /* @__PURE__ */ React33.createElement(
|
|
14500
14620
|
ActivityEventsSection,
|
|
14501
14621
|
{
|
|
14502
14622
|
colorScheme,
|
|
@@ -14506,10 +14626,12 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14506
14626
|
activityEventsManager
|
|
14507
14627
|
}
|
|
14508
14628
|
),
|
|
14509
|
-
/* @__PURE__ */
|
|
14629
|
+
/* @__PURE__ */ React33.createElement(
|
|
14510
14630
|
EventsSection,
|
|
14511
14631
|
{
|
|
14512
|
-
connectionEvents,
|
|
14632
|
+
connectionEvents: visibleConnectionEvents,
|
|
14633
|
+
paused: connectionEventsPaused,
|
|
14634
|
+
onTogglePaused: toggleConnectionEventsPaused,
|
|
14513
14635
|
colorScheme,
|
|
14514
14636
|
eventsContainerRef,
|
|
14515
14637
|
showEvents,
|
|
@@ -14535,7 +14657,7 @@ function useManagedHistory(stateManager) {
|
|
|
14535
14657
|
}
|
|
14536
14658
|
|
|
14537
14659
|
// ../noya-multiplayer-react/src/singleton.tsx
|
|
14538
|
-
import
|
|
14660
|
+
import React35 from "react";
|
|
14539
14661
|
|
|
14540
14662
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
14541
14663
|
var AnyNoyaStateContext = createContext3(void 0);
|
|
@@ -14557,8 +14679,8 @@ function useActivityEventsForManager(streamFilter, activityEventsManager) {
|
|
|
14557
14679
|
}
|
|
14558
14680
|
|
|
14559
14681
|
// ../noya-multiplayer-react/src/components/UserPointersOverlay.tsx
|
|
14560
|
-
import { Observable as
|
|
14561
|
-
import
|
|
14682
|
+
import { Observable as Observable23 } from "@noya-app/observable";
|
|
14683
|
+
import React37, { useEffect as useEffect18, useMemo as useMemo12, useState as useState18 } from "react";
|
|
14562
14684
|
function shouldShow(hideAfter, updatedAt) {
|
|
14563
14685
|
return !!updatedAt && Date.now() - updatedAt < hideAfter;
|
|
14564
14686
|
}
|
|
@@ -14571,7 +14693,7 @@ var UserPointerInternal = memoGeneric(function UserPointerInternal2({
|
|
|
14571
14693
|
const observable = useMemo12(() => {
|
|
14572
14694
|
const metadata$ = sharedConnectionDataManager.metadata$.observePath([user.connectionId]).throttle(50);
|
|
14573
14695
|
const data$ = sharedConnectionDataManager.data$.observePath([user.connectionId]).throttle(50);
|
|
14574
|
-
return
|
|
14696
|
+
return Observable23.combine([metadata$, data$], ([metadata2, data2]) => {
|
|
14575
14697
|
return { metadata: metadata2, data: data2 };
|
|
14576
14698
|
});
|
|
14577
14699
|
}, [sharedConnectionDataManager, user.connectionId]);
|
|
@@ -14603,9 +14725,9 @@ var UserPointersOverlay = memoGeneric(function UserPointers({
|
|
|
14603
14725
|
sharedConnectionDataManager.currentConnectionId$
|
|
14604
14726
|
);
|
|
14605
14727
|
const connectedUsers = useObservable2(userManager.connectedUsers$);
|
|
14606
|
-
return /* @__PURE__ */
|
|
14728
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, connectedUsers.map((user) => {
|
|
14607
14729
|
if (user.connectionId === currentConnectionId) return null;
|
|
14608
|
-
return /* @__PURE__ */
|
|
14730
|
+
return /* @__PURE__ */ React37.createElement(
|
|
14609
14731
|
UserPointerInternal,
|
|
14610
14732
|
{
|
|
14611
14733
|
key: user.connectionId,
|