@noya-app/noya-api-client-react 0.1.45 → 0.1.46
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 +8 -0
- package/dist/index.d.mts +14 -54
- package/dist/index.d.ts +14 -54
- package/dist/index.js +835 -484
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +766 -408
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/react/hooks.ts +1 -105
package/dist/index.mjs
CHANGED
|
@@ -2289,8 +2289,6 @@ function useNoyaClientOrFallback() {
|
|
|
2289
2289
|
|
|
2290
2290
|
// src/react/hooks.ts
|
|
2291
2291
|
import { useSelector } from "@legendapp/state/react";
|
|
2292
|
-
import { GENERATED_PAGE_NAME_COUNT } from "@noya-app/noya-api";
|
|
2293
|
-
import { range } from "@noya-app/noya-utils";
|
|
2294
2292
|
import { useObservable } from "@noya-app/observable-react";
|
|
2295
2293
|
import { useCallback, useEffect, useMemo as useMemo2, useRef } from "react";
|
|
2296
2294
|
function useNoyaTools(initial) {
|
|
@@ -2422,87 +2420,11 @@ function useMetadata(key) {
|
|
|
2422
2420
|
const metadataItem = metadata.find((item) => item.key === key);
|
|
2423
2421
|
return metadataItem?.value;
|
|
2424
2422
|
}
|
|
2425
|
-
function useGeneratedComponentNames(name) {
|
|
2426
|
-
const key = name.trim().toLowerCase();
|
|
2427
|
-
const { generatedNames$, loadingNames$ } = useNoyaClientOrFallback();
|
|
2428
|
-
const result = useSelector(
|
|
2429
|
-
() => generatedNames$[key].get()
|
|
2430
|
-
);
|
|
2431
|
-
const loading = useSelector(() => loadingNames$[key].get());
|
|
2432
|
-
return useMemo2(() => ({ names: result ?? [], loading }), [loading, result]);
|
|
2433
|
-
}
|
|
2434
|
-
function useGeneratedComponentDescriptions() {
|
|
2435
|
-
const { generatedDescriptions$, loadingDescriptions$ } = useNoyaClientOrFallback();
|
|
2436
|
-
const descriptions = useSelector(generatedDescriptions$);
|
|
2437
|
-
const loading = useSelector(loadingDescriptions$);
|
|
2438
|
-
return useMemo2(() => ({ descriptions, loading }), [loading, descriptions]);
|
|
2439
|
-
}
|
|
2440
|
-
function useGeneratedComponentDescription(name) {
|
|
2441
|
-
const key = name.trim().toLowerCase();
|
|
2442
|
-
const { generatedDescriptions$, loadingDescriptions$ } = useNoyaClientOrFallback();
|
|
2443
|
-
const description = useSelector(
|
|
2444
|
-
() => generatedDescriptions$[key].get()
|
|
2445
|
-
);
|
|
2446
|
-
const loading = useSelector(() => loadingDescriptions$[key].get());
|
|
2447
|
-
return useMemo2(() => ({ description, loading }), [loading, description]);
|
|
2448
|
-
}
|
|
2449
|
-
function useRandomImages() {
|
|
2450
|
-
const { randomImages$, loadingRandomImages$ } = useNoyaClientOrFallback();
|
|
2451
|
-
const images = useSelector(randomImages$);
|
|
2452
|
-
const loading = useSelector(loadingRandomImages$);
|
|
2453
|
-
return useMemo2(() => ({ images, loading }), [loading, images]);
|
|
2454
|
-
}
|
|
2455
|
-
function useRandomIcons() {
|
|
2456
|
-
const { randomIcons$, loadingRandomIcons$ } = useNoyaClientOrFallback();
|
|
2457
|
-
const icons = useSelector(randomIcons$);
|
|
2458
|
-
const loading = useSelector(loadingRandomIcons$);
|
|
2459
|
-
return useMemo2(() => ({ icons, loading }), [loading, icons]);
|
|
2460
|
-
}
|
|
2461
2423
|
function useNetworkRequests() {
|
|
2462
2424
|
const { requests$ } = useNoyaClientOrFallback();
|
|
2463
2425
|
const requests = useSelector(requests$);
|
|
2464
2426
|
return requests;
|
|
2465
2427
|
}
|
|
2466
|
-
function useGeneratedPageNames() {
|
|
2467
|
-
const { generatedPageNames$ } = useNoyaClientOrFallback();
|
|
2468
|
-
const names = useSelector(generatedPageNames$);
|
|
2469
|
-
const namesWithDefaultsAndTypes = useMemo2(() => {
|
|
2470
|
-
const rangeArray = range(0, GENERATED_PAGE_NAME_COUNT);
|
|
2471
|
-
const withDefaults = rangeArray.map((index) => {
|
|
2472
|
-
const name = names[index];
|
|
2473
|
-
return name ?? { name: `Page ${index + 1}`, loading: true, key: "" };
|
|
2474
|
-
});
|
|
2475
|
-
return withDefaults.map(
|
|
2476
|
-
(name, index) => ({
|
|
2477
|
-
...name,
|
|
2478
|
-
index,
|
|
2479
|
-
type: "suggestion"
|
|
2480
|
-
})
|
|
2481
|
-
);
|
|
2482
|
-
}, [names]);
|
|
2483
|
-
return namesWithDefaultsAndTypes.slice(0, 3);
|
|
2484
|
-
}
|
|
2485
|
-
function useGeneratedPageComponentNames() {
|
|
2486
|
-
const { generatedPageComponentNames$: generatedComponentNames$ } = useNoyaClientOrFallback();
|
|
2487
|
-
const names = useSelector(
|
|
2488
|
-
generatedComponentNames$
|
|
2489
|
-
);
|
|
2490
|
-
const namesWithDefaultsAndTypes = useMemo2(() => {
|
|
2491
|
-
const rangeArray = range(0, GENERATED_PAGE_NAME_COUNT);
|
|
2492
|
-
const withDefaults = rangeArray.map((index) => {
|
|
2493
|
-
const name = names[index];
|
|
2494
|
-
return name ?? { name: `Component ${index + 1}`, loading: true, key: "" };
|
|
2495
|
-
});
|
|
2496
|
-
return withDefaults.map(
|
|
2497
|
-
(name, index) => ({
|
|
2498
|
-
...name,
|
|
2499
|
-
index,
|
|
2500
|
-
type: "suggestion"
|
|
2501
|
-
})
|
|
2502
|
-
);
|
|
2503
|
-
}, [names]);
|
|
2504
|
-
return namesWithDefaultsAndTypes.slice(0, 3);
|
|
2505
|
-
}
|
|
2506
2428
|
function useNoyaSites() {
|
|
2507
2429
|
const sites = useSelector(useNoyaClientOrFallback().sites$);
|
|
2508
2430
|
return sites;
|
|
@@ -3373,15 +3295,15 @@ function Or(pattern) {
|
|
|
3373
3295
|
if (IsCloseParen(pattern, index))
|
|
3374
3296
|
count -= 1;
|
|
3375
3297
|
if (IsSeparator(pattern, index) && count === 0) {
|
|
3376
|
-
const
|
|
3377
|
-
if (
|
|
3378
|
-
expressions.push(TemplateLiteralParse(
|
|
3298
|
+
const range2 = pattern.slice(start, index);
|
|
3299
|
+
if (range2.length > 0)
|
|
3300
|
+
expressions.push(TemplateLiteralParse(range2));
|
|
3379
3301
|
start = index + 1;
|
|
3380
3302
|
}
|
|
3381
3303
|
}
|
|
3382
|
-
const
|
|
3383
|
-
if (
|
|
3384
|
-
expressions.push(TemplateLiteralParse(
|
|
3304
|
+
const range = pattern.slice(start);
|
|
3305
|
+
if (range.length > 0)
|
|
3306
|
+
expressions.push(TemplateLiteralParse(range));
|
|
3385
3307
|
if (expressions.length === 0)
|
|
3386
3308
|
return { type: "const", const: "" };
|
|
3387
3309
|
if (expressions.length === 1)
|
|
@@ -3414,14 +3336,14 @@ function And(pattern) {
|
|
|
3414
3336
|
for (let index = 0; index < pattern.length; index++) {
|
|
3415
3337
|
if (IsOpenParen(pattern, index)) {
|
|
3416
3338
|
const [start, end] = Group(pattern, index);
|
|
3417
|
-
const
|
|
3418
|
-
expressions.push(TemplateLiteralParse(
|
|
3339
|
+
const range = pattern.slice(start, end + 1);
|
|
3340
|
+
expressions.push(TemplateLiteralParse(range));
|
|
3419
3341
|
index = end;
|
|
3420
3342
|
} else {
|
|
3421
3343
|
const [start, end] = Range(pattern, index);
|
|
3422
|
-
const
|
|
3423
|
-
if (
|
|
3424
|
-
expressions.push(TemplateLiteralParse(
|
|
3344
|
+
const range = pattern.slice(start, end);
|
|
3345
|
+
if (range.length > 0)
|
|
3346
|
+
expressions.push(TemplateLiteralParse(range));
|
|
3425
3347
|
index = end - 1;
|
|
3426
3348
|
}
|
|
3427
3349
|
}
|
|
@@ -5255,20 +5177,8 @@ import { isDeepEqual } from "@noya-app/noya-utils";
|
|
|
5255
5177
|
import { Observable as Observable2 } from "@noya-app/observable";
|
|
5256
5178
|
|
|
5257
5179
|
// ../state-manager/src/AssetManager.ts
|
|
5258
|
-
import { Base64,
|
|
5180
|
+
import { Base64, uuid } from "@noya-app/noya-utils";
|
|
5259
5181
|
import { Observable as Observable3 } from "@noya-app/observable";
|
|
5260
|
-
var _toNoyaAsset = memoize(
|
|
5261
|
-
(asset) => ({
|
|
5262
|
-
id: asset.stableId,
|
|
5263
|
-
url: asset.url,
|
|
5264
|
-
createdAt: asset.createdAt,
|
|
5265
|
-
size: asset.size,
|
|
5266
|
-
contentType: asset.contentType,
|
|
5267
|
-
width: asset.width ?? null,
|
|
5268
|
-
height: asset.height ?? null,
|
|
5269
|
-
userId: asset.userId ?? null
|
|
5270
|
-
})
|
|
5271
|
-
);
|
|
5272
5182
|
|
|
5273
5183
|
// ../noya-schemas/src/nullable.ts
|
|
5274
5184
|
var Nullable = (schema) => Type.Union([Type.Null(), schema]);
|
|
@@ -5331,6 +5241,10 @@ var activityEventSchema = Type.Object({
|
|
|
5331
5241
|
});
|
|
5332
5242
|
|
|
5333
5243
|
// ../noya-schemas/src/asset.ts
|
|
5244
|
+
var assetModeSchema = Type.Union([
|
|
5245
|
+
Type.Literal("immutable"),
|
|
5246
|
+
Type.Literal("mutable")
|
|
5247
|
+
]);
|
|
5334
5248
|
var assetSchema = Type.Object({
|
|
5335
5249
|
id: Type.String(),
|
|
5336
5250
|
stableId: Type.String(),
|
|
@@ -5340,7 +5254,9 @@ var assetSchema = Type.Object({
|
|
|
5340
5254
|
contentType: Type.Optional(Type.String()),
|
|
5341
5255
|
width: Type.Union([Type.Null(), Type.Number()]),
|
|
5342
5256
|
height: Type.Union([Type.Null(), Type.Number()]),
|
|
5343
|
-
userId: Type.Union([Type.Null(), Type.String()])
|
|
5257
|
+
userId: Type.Union([Type.Null(), Type.String()]),
|
|
5258
|
+
mode: Type.Optional(assetModeSchema),
|
|
5259
|
+
version: Type.Optional(Type.Number())
|
|
5344
5260
|
});
|
|
5345
5261
|
|
|
5346
5262
|
// ../noya-schemas/src/encode.ts
|
|
@@ -7261,6 +7177,13 @@ import { uuid as uuid2 } from "@noya-app/noya-utils";
|
|
|
7261
7177
|
import { uuid as uuid3 } from "@noya-app/noya-utils";
|
|
7262
7178
|
import { Observable as Observable5 } from "@noya-app/observable";
|
|
7263
7179
|
|
|
7180
|
+
// ../state-manager/src/multiplayer.ts
|
|
7181
|
+
import { Cache, hash, isDeepEqual as isDeepEqual3, uuid as uuid5 } from "@noya-app/noya-utils";
|
|
7182
|
+
import { Observable as Observable8, get as get2, set as set2 } from "@noya-app/observable";
|
|
7183
|
+
|
|
7184
|
+
// ../state-manager/src/LogManager.ts
|
|
7185
|
+
import { Observable as Observable6 } from "@noya-app/observable";
|
|
7186
|
+
|
|
7264
7187
|
// ../state-manager/src/historyEntries.ts
|
|
7265
7188
|
var HistoryEntries;
|
|
7266
7189
|
((HistoryEntries2) => {
|
|
@@ -7347,119 +7270,6 @@ var HistoryEntries;
|
|
|
7347
7270
|
HistoryEntries2.pathsEqual = pathsEqual;
|
|
7348
7271
|
})(HistoryEntries || (HistoryEntries = {}));
|
|
7349
7272
|
|
|
7350
|
-
// ../state-manager/src/IOManager.ts
|
|
7351
|
-
import { Observable as Observable6 } from "@noya-app/observable";
|
|
7352
|
-
|
|
7353
|
-
// ../state-manager/src/jwt.ts
|
|
7354
|
-
function base64UrlEncode(str) {
|
|
7355
|
-
return btoa(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
7356
|
-
}
|
|
7357
|
-
function base64UrlDecode(str) {
|
|
7358
|
-
str = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
7359
|
-
switch (str.length % 4) {
|
|
7360
|
-
case 2:
|
|
7361
|
-
str += "==";
|
|
7362
|
-
break;
|
|
7363
|
-
case 3:
|
|
7364
|
-
str += "=";
|
|
7365
|
-
break;
|
|
7366
|
-
}
|
|
7367
|
-
return atob(str);
|
|
7368
|
-
}
|
|
7369
|
-
var HEADER = {
|
|
7370
|
-
alg: "HS256",
|
|
7371
|
-
typ: "JWT"
|
|
7372
|
-
};
|
|
7373
|
-
var JWT_ERROR = {
|
|
7374
|
-
INVALID_JWT_FORMAT: "Invalid JWT format"
|
|
7375
|
-
// INVALID_SIGNATURE: "Invalid signature",
|
|
7376
|
-
};
|
|
7377
|
-
async function createJwt({
|
|
7378
|
-
payload,
|
|
7379
|
-
secret,
|
|
7380
|
-
header
|
|
7381
|
-
}) {
|
|
7382
|
-
const encoder = new TextEncoder();
|
|
7383
|
-
const encodedHeader = base64UrlEncode(
|
|
7384
|
-
JSON.stringify({ ...HEADER, ...header })
|
|
7385
|
-
);
|
|
7386
|
-
const encodedPayload = base64UrlEncode(JSON.stringify(payload));
|
|
7387
|
-
const dataToSign = `${encodedHeader}.${encodedPayload}`;
|
|
7388
|
-
const key = await crypto.subtle.importKey(
|
|
7389
|
-
"raw",
|
|
7390
|
-
encoder.encode(secret),
|
|
7391
|
-
{ name: "HMAC", hash: "SHA-256" },
|
|
7392
|
-
false,
|
|
7393
|
-
["sign"]
|
|
7394
|
-
);
|
|
7395
|
-
const signature = await crypto.subtle.sign(
|
|
7396
|
-
"HMAC",
|
|
7397
|
-
key,
|
|
7398
|
-
encoder.encode(dataToSign)
|
|
7399
|
-
);
|
|
7400
|
-
const encodedSignature = base64UrlEncode(
|
|
7401
|
-
String.fromCharCode(...new Uint8Array(signature))
|
|
7402
|
-
);
|
|
7403
|
-
return `${dataToSign}.${encodedSignature}`;
|
|
7404
|
-
}
|
|
7405
|
-
async function decodeJwt({
|
|
7406
|
-
token,
|
|
7407
|
-
secret
|
|
7408
|
-
}) {
|
|
7409
|
-
if (typeof token !== "string") {
|
|
7410
|
-
throw new Error(JWT_ERROR.INVALID_JWT_FORMAT);
|
|
7411
|
-
}
|
|
7412
|
-
const [encodedHeader, encodedPayload, encodedSignature] = token.split(".");
|
|
7413
|
-
if (!encodedHeader || !encodedPayload || !encodedSignature) {
|
|
7414
|
-
throw new Error(JWT_ERROR.INVALID_JWT_FORMAT);
|
|
7415
|
-
}
|
|
7416
|
-
const headerJson = base64UrlDecode(encodedHeader);
|
|
7417
|
-
const payloadJson = base64UrlDecode(encodedPayload);
|
|
7418
|
-
const header = JSON.parse(headerJson);
|
|
7419
|
-
const payload = JSON.parse(payloadJson);
|
|
7420
|
-
const dataToVerify = `${encodedHeader}.${encodedPayload}`;
|
|
7421
|
-
const encoder = new TextEncoder();
|
|
7422
|
-
if (secret !== void 0) {
|
|
7423
|
-
const key = await crypto.subtle.importKey(
|
|
7424
|
-
"raw",
|
|
7425
|
-
encoder.encode(secret),
|
|
7426
|
-
{ name: "HMAC", hash: "SHA-256" },
|
|
7427
|
-
false,
|
|
7428
|
-
["verify"]
|
|
7429
|
-
);
|
|
7430
|
-
const binarySignature = base64UrlDecode(encodedSignature);
|
|
7431
|
-
const signature = new Uint8Array(
|
|
7432
|
-
[...binarySignature].map((char) => char.charCodeAt(0))
|
|
7433
|
-
);
|
|
7434
|
-
const valid = await crypto.subtle.verify(
|
|
7435
|
-
"HMAC",
|
|
7436
|
-
key,
|
|
7437
|
-
signature,
|
|
7438
|
-
encoder.encode(dataToVerify)
|
|
7439
|
-
);
|
|
7440
|
-
return { header, payload, valid };
|
|
7441
|
-
}
|
|
7442
|
-
return { header, payload, valid: false };
|
|
7443
|
-
}
|
|
7444
|
-
var jwt;
|
|
7445
|
-
((jwt2) => {
|
|
7446
|
-
jwt2.encode = createJwt;
|
|
7447
|
-
jwt2.decode = decodeJwt;
|
|
7448
|
-
jwt2.ERROR = JWT_ERROR;
|
|
7449
|
-
jwt2.DEFAULT_HEADER = HEADER;
|
|
7450
|
-
})(jwt || (jwt = {}));
|
|
7451
|
-
|
|
7452
|
-
// ../state-manager/src/LogManager.ts
|
|
7453
|
-
import { Observable as Observable7 } from "@noya-app/observable";
|
|
7454
|
-
|
|
7455
|
-
// ../state-manager/src/MenuManager.ts
|
|
7456
|
-
import { isDeepEqual as isDeepEqual2 } from "@noya-app/noya-utils";
|
|
7457
|
-
import { Observable as Observable8 } from "@noya-app/observable";
|
|
7458
|
-
|
|
7459
|
-
// ../state-manager/src/multiplayer.ts
|
|
7460
|
-
import { Cache, hash, isDeepEqual as isDeepEqual4, uuid as uuid5 } from "@noya-app/noya-utils";
|
|
7461
|
-
import { Observable as Observable10, get as get2, set as set2 } from "@noya-app/observable";
|
|
7462
|
-
|
|
7463
7273
|
// ../../node_modules/@marcbachmann/cel-js/lib/errors.js
|
|
7464
7274
|
var ParseError = class extends Error {
|
|
7465
7275
|
#wasConstructedWithAst = false;
|
|
@@ -10475,20 +10285,129 @@ celEnvironment.registerFunction("random(): double", () => Math.random()).registe
|
|
|
10475
10285
|
var READ_DENIED = Symbol("readDenied");
|
|
10476
10286
|
|
|
10477
10287
|
// ../state-manager/src/serverScripts.ts
|
|
10478
|
-
import { uuid as createUuid, isDeepEqual as
|
|
10288
|
+
import { uuid as createUuid, isDeepEqual as isDeepEqual2 } from "@noya-app/noya-utils";
|
|
10479
10289
|
|
|
10480
10290
|
// ../state-manager/src/stateManager.ts
|
|
10481
10291
|
import {
|
|
10482
|
-
Observable as
|
|
10292
|
+
Observable as Observable7,
|
|
10483
10293
|
get as getPath2
|
|
10484
10294
|
} from "@noya-app/observable";
|
|
10485
10295
|
|
|
10486
10296
|
// ../state-manager/src/multiplayer.ts
|
|
10487
10297
|
var createHash = (value, options) => hash(value, { ...options, ignoreUndefinedProperties: true });
|
|
10488
10298
|
|
|
10299
|
+
// ../state-manager/src/GitManager.ts
|
|
10300
|
+
import { Observable as Observable9 } from "@noya-app/observable";
|
|
10301
|
+
|
|
10302
|
+
// ../state-manager/src/IOManager.ts
|
|
10303
|
+
import { Observable as Observable10 } from "@noya-app/observable";
|
|
10304
|
+
|
|
10305
|
+
// ../state-manager/src/jwt.ts
|
|
10306
|
+
function base64UrlEncode(str) {
|
|
10307
|
+
return btoa(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
10308
|
+
}
|
|
10309
|
+
function base64UrlDecode(str) {
|
|
10310
|
+
str = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
10311
|
+
switch (str.length % 4) {
|
|
10312
|
+
case 2:
|
|
10313
|
+
str += "==";
|
|
10314
|
+
break;
|
|
10315
|
+
case 3:
|
|
10316
|
+
str += "=";
|
|
10317
|
+
break;
|
|
10318
|
+
}
|
|
10319
|
+
return atob(str);
|
|
10320
|
+
}
|
|
10321
|
+
var HEADER = {
|
|
10322
|
+
alg: "HS256",
|
|
10323
|
+
typ: "JWT"
|
|
10324
|
+
};
|
|
10325
|
+
var JWT_ERROR = {
|
|
10326
|
+
INVALID_JWT_FORMAT: "Invalid JWT format"
|
|
10327
|
+
// INVALID_SIGNATURE: "Invalid signature",
|
|
10328
|
+
};
|
|
10329
|
+
async function createJwt({
|
|
10330
|
+
payload,
|
|
10331
|
+
secret,
|
|
10332
|
+
header
|
|
10333
|
+
}) {
|
|
10334
|
+
const encoder = new TextEncoder();
|
|
10335
|
+
const encodedHeader = base64UrlEncode(
|
|
10336
|
+
JSON.stringify({ ...HEADER, ...header })
|
|
10337
|
+
);
|
|
10338
|
+
const encodedPayload = base64UrlEncode(JSON.stringify(payload));
|
|
10339
|
+
const dataToSign = `${encodedHeader}.${encodedPayload}`;
|
|
10340
|
+
const key = await crypto.subtle.importKey(
|
|
10341
|
+
"raw",
|
|
10342
|
+
encoder.encode(secret),
|
|
10343
|
+
{ name: "HMAC", hash: "SHA-256" },
|
|
10344
|
+
false,
|
|
10345
|
+
["sign"]
|
|
10346
|
+
);
|
|
10347
|
+
const signature = await crypto.subtle.sign(
|
|
10348
|
+
"HMAC",
|
|
10349
|
+
key,
|
|
10350
|
+
encoder.encode(dataToSign)
|
|
10351
|
+
);
|
|
10352
|
+
const encodedSignature = base64UrlEncode(
|
|
10353
|
+
String.fromCharCode(...new Uint8Array(signature))
|
|
10354
|
+
);
|
|
10355
|
+
return `${dataToSign}.${encodedSignature}`;
|
|
10356
|
+
}
|
|
10357
|
+
async function decodeJwt({
|
|
10358
|
+
token,
|
|
10359
|
+
secret
|
|
10360
|
+
}) {
|
|
10361
|
+
if (typeof token !== "string") {
|
|
10362
|
+
throw new Error(JWT_ERROR.INVALID_JWT_FORMAT);
|
|
10363
|
+
}
|
|
10364
|
+
const [encodedHeader, encodedPayload, encodedSignature] = token.split(".");
|
|
10365
|
+
if (!encodedHeader || !encodedPayload || !encodedSignature) {
|
|
10366
|
+
throw new Error(JWT_ERROR.INVALID_JWT_FORMAT);
|
|
10367
|
+
}
|
|
10368
|
+
const headerJson = base64UrlDecode(encodedHeader);
|
|
10369
|
+
const payloadJson = base64UrlDecode(encodedPayload);
|
|
10370
|
+
const header = JSON.parse(headerJson);
|
|
10371
|
+
const payload = JSON.parse(payloadJson);
|
|
10372
|
+
const dataToVerify = `${encodedHeader}.${encodedPayload}`;
|
|
10373
|
+
const encoder = new TextEncoder();
|
|
10374
|
+
if (secret !== void 0) {
|
|
10375
|
+
const key = await crypto.subtle.importKey(
|
|
10376
|
+
"raw",
|
|
10377
|
+
encoder.encode(secret),
|
|
10378
|
+
{ name: "HMAC", hash: "SHA-256" },
|
|
10379
|
+
false,
|
|
10380
|
+
["verify"]
|
|
10381
|
+
);
|
|
10382
|
+
const binarySignature = base64UrlDecode(encodedSignature);
|
|
10383
|
+
const signature = new Uint8Array(
|
|
10384
|
+
[...binarySignature].map((char) => char.charCodeAt(0))
|
|
10385
|
+
);
|
|
10386
|
+
const valid = await crypto.subtle.verify(
|
|
10387
|
+
"HMAC",
|
|
10388
|
+
key,
|
|
10389
|
+
signature,
|
|
10390
|
+
encoder.encode(dataToVerify)
|
|
10391
|
+
);
|
|
10392
|
+
return { header, payload, valid };
|
|
10393
|
+
}
|
|
10394
|
+
return { header, payload, valid: false };
|
|
10395
|
+
}
|
|
10396
|
+
var jwt;
|
|
10397
|
+
((jwt2) => {
|
|
10398
|
+
jwt2.encode = createJwt;
|
|
10399
|
+
jwt2.decode = decodeJwt;
|
|
10400
|
+
jwt2.ERROR = JWT_ERROR;
|
|
10401
|
+
jwt2.DEFAULT_HEADER = HEADER;
|
|
10402
|
+
})(jwt || (jwt = {}));
|
|
10403
|
+
|
|
10404
|
+
// ../state-manager/src/MenuManager.ts
|
|
10405
|
+
import { isDeepEqual as isDeepEqual4 } from "@noya-app/noya-utils";
|
|
10406
|
+
import { Observable as Observable11 } from "@noya-app/observable";
|
|
10407
|
+
|
|
10489
10408
|
// ../state-manager/src/NoyaManager.ts
|
|
10490
10409
|
import { uuid as uuid12 } from "@noya-app/noya-utils";
|
|
10491
|
-
import { Observable as
|
|
10410
|
+
import { Observable as Observable22, set as set3 } from "@noya-app/observable";
|
|
10492
10411
|
|
|
10493
10412
|
// ../noya-pipeline/src/graphToTasks.ts
|
|
10494
10413
|
import { get as get3 } from "@noya-app/observable";
|
|
@@ -10593,38 +10512,38 @@ var pipelineSchema = Type.Object(
|
|
|
10593
10512
|
);
|
|
10594
10513
|
|
|
10595
10514
|
// ../state-manager/src/PipelineManager.ts
|
|
10596
|
-
import { Observable as
|
|
10515
|
+
import { Observable as Observable12 } from "@noya-app/observable";
|
|
10597
10516
|
|
|
10598
10517
|
// ../state-manager/src/PublishingManager.ts
|
|
10599
|
-
import { Observable as
|
|
10518
|
+
import { Observable as Observable13 } from "@noya-app/observable";
|
|
10600
10519
|
|
|
10601
10520
|
// ../state-manager/src/ResourceManager.ts
|
|
10602
10521
|
import { isDeepEqual as isDeepEqual5, uuid as uuid7 } from "@noya-app/noya-utils";
|
|
10603
|
-
import { Observable as
|
|
10522
|
+
import { Observable as Observable14 } from "@noya-app/observable";
|
|
10604
10523
|
|
|
10605
10524
|
// ../state-manager/src/SandboxManager.ts
|
|
10606
|
-
import { Observable as
|
|
10525
|
+
import { Observable as Observable15 } from "@noya-app/observable";
|
|
10607
10526
|
|
|
10608
10527
|
// ../state-manager/src/rpcManager.ts
|
|
10609
10528
|
import { uuid as uuid8 } from "@noya-app/noya-utils";
|
|
10610
|
-
import { Observable as
|
|
10529
|
+
import { Observable as Observable16 } from "@noya-app/observable";
|
|
10611
10530
|
|
|
10612
10531
|
// ../state-manager/src/SecretManager.ts
|
|
10613
|
-
import { Observable as
|
|
10532
|
+
import { Observable as Observable17 } from "@noya-app/observable";
|
|
10614
10533
|
|
|
10615
10534
|
// ../state-manager/src/TaskManager.ts
|
|
10616
|
-
import { Observable as
|
|
10535
|
+
import { Observable as Observable18 } from "@noya-app/observable";
|
|
10617
10536
|
|
|
10618
10537
|
// ../state-manager/src/TranscriptionManager.ts
|
|
10619
10538
|
import { Base64 as Base642 } from "@noya-app/noya-utils";
|
|
10620
|
-
import { Observable as
|
|
10539
|
+
import { Observable as Observable19 } from "@noya-app/observable";
|
|
10621
10540
|
|
|
10622
10541
|
// ../state-manager/src/UserManager.ts
|
|
10623
|
-
import { Observable as
|
|
10542
|
+
import { Observable as Observable21 } from "@noya-app/observable";
|
|
10624
10543
|
|
|
10625
10544
|
// ../state-manager/src/sync/clientId.ts
|
|
10626
10545
|
import { uuid as uuid9 } from "@noya-app/noya-utils";
|
|
10627
|
-
import { Observable as
|
|
10546
|
+
import { Observable as Observable20 } from "@noya-app/observable";
|
|
10628
10547
|
|
|
10629
10548
|
// ../state-manager/src/sync/defaultNames.ts
|
|
10630
10549
|
import { upperFirst } from "@noya-app/noya-utils";
|
|
@@ -10697,9 +10616,9 @@ function getClientAnimalFromName(name) {
|
|
|
10697
10616
|
var CLIENT_ID_STORAGE_KEY = "noya-client-id";
|
|
10698
10617
|
var CLIENT_NAME_STORAGE_KEY = "noya-client-name";
|
|
10699
10618
|
var CLIENT_IMAGE_STORAGE_KEY = "noya-client-image";
|
|
10700
|
-
var clientId$ = new
|
|
10701
|
-
var clientName$ = new
|
|
10702
|
-
var clientImage$ = new
|
|
10619
|
+
var clientId$ = new Observable20(void 0);
|
|
10620
|
+
var clientName$ = new Observable20(void 0);
|
|
10621
|
+
var clientImage$ = new Observable20(void 0);
|
|
10703
10622
|
var safeGetItem = (key) => {
|
|
10704
10623
|
try {
|
|
10705
10624
|
return typeof localStorage !== "undefined" ? localStorage.getItem(key) : null;
|
|
@@ -10872,11 +10791,11 @@ var createMutatorParametersSchema = Type.Object({
|
|
|
10872
10791
|
});
|
|
10873
10792
|
|
|
10874
10793
|
// ../noya-multiplayer-react/src/ai.ts
|
|
10875
|
-
import { useEffect as
|
|
10794
|
+
import { useEffect as useEffect18 } from "react";
|
|
10876
10795
|
|
|
10877
10796
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
10878
10797
|
import {
|
|
10879
|
-
Observable as
|
|
10798
|
+
Observable as Observable23
|
|
10880
10799
|
} from "@noya-app/observable";
|
|
10881
10800
|
|
|
10882
10801
|
// ../noya-react-utils/src/components/AutoSizer.tsx
|
|
@@ -11183,26 +11102,26 @@ function downloadBlob(...params) {
|
|
|
11183
11102
|
}
|
|
11184
11103
|
|
|
11185
11104
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
11186
|
-
import
|
|
11105
|
+
import React37, {
|
|
11187
11106
|
createContext as createContext3,
|
|
11188
11107
|
useCallback as useCallback14,
|
|
11189
11108
|
useContext as useContext4,
|
|
11190
|
-
useEffect as
|
|
11109
|
+
useEffect as useEffect17,
|
|
11191
11110
|
useMemo as useMemo11,
|
|
11192
|
-
useState as
|
|
11111
|
+
useState as useState18
|
|
11193
11112
|
} from "react";
|
|
11194
11113
|
|
|
11195
11114
|
// ../noya-multiplayer-react/src/noyaApp.ts
|
|
11196
|
-
import { useEffect as
|
|
11115
|
+
import { useEffect as useEffect16, useMemo as useMemo10, useState as useState17 } from "react";
|
|
11197
11116
|
|
|
11198
11117
|
// ../noya-multiplayer-react/src/hooks.ts
|
|
11199
11118
|
import {
|
|
11200
11119
|
createElement as createElement3,
|
|
11201
11120
|
useCallback as useCallback13,
|
|
11202
|
-
useEffect as
|
|
11121
|
+
useEffect as useEffect15,
|
|
11203
11122
|
useMemo as useMemo9,
|
|
11204
|
-
useRef as
|
|
11205
|
-
useState as
|
|
11123
|
+
useRef as useRef12,
|
|
11124
|
+
useState as useState16,
|
|
11206
11125
|
useSyncExternalStore as useSyncExternalStore2
|
|
11207
11126
|
} from "react";
|
|
11208
11127
|
import { createRoot as createRoot2 } from "react-dom/client";
|
|
@@ -11282,14 +11201,14 @@ var ErrorOverlay = React6.memo(function ErrorOverlay2({
|
|
|
11282
11201
|
});
|
|
11283
11202
|
|
|
11284
11203
|
// ../noya-multiplayer-react/src/inspector/useStateInspector.tsx
|
|
11285
|
-
import
|
|
11204
|
+
import React35 from "react";
|
|
11286
11205
|
import { createRoot } from "react-dom/client";
|
|
11287
11206
|
|
|
11288
11207
|
// ../noya-multiplayer-react/src/inspector/StateInspector.tsx
|
|
11289
|
-
import { Base64 as Base644, memoize
|
|
11290
|
-
import
|
|
11208
|
+
import { Base64 as Base644, memoize, uuid as uuid13 } from "@noya-app/noya-utils";
|
|
11209
|
+
import React34, {
|
|
11291
11210
|
useCallback as useCallback12,
|
|
11292
|
-
useEffect as
|
|
11211
|
+
useEffect as useEffect14,
|
|
11293
11212
|
useLayoutEffect as useLayoutEffect4
|
|
11294
11213
|
} from "react";
|
|
11295
11214
|
|
|
@@ -12941,8 +12860,424 @@ function EventsSection({
|
|
|
12941
12860
|
);
|
|
12942
12861
|
}
|
|
12943
12862
|
|
|
12863
|
+
// ../noya-multiplayer-react/src/inspector/sections/GitSection.tsx
|
|
12864
|
+
import React27, { useEffect as useEffect12, useRef as useRef10, useState as useState15 } from "react";
|
|
12865
|
+
|
|
12866
|
+
// ../noya-multiplayer-react/src/inspector/StateInspectorTitleLabel.tsx
|
|
12867
|
+
import React26 from "react";
|
|
12868
|
+
function StateInspectorTitleLabel({
|
|
12869
|
+
children
|
|
12870
|
+
}) {
|
|
12871
|
+
return /* @__PURE__ */ React26.createElement("span", { style: { display: "flex", alignItems: "center", gap: "4px" } }, children);
|
|
12872
|
+
}
|
|
12873
|
+
|
|
12874
|
+
// ../noya-multiplayer-react/src/inspector/sections/GitSection.tsx
|
|
12875
|
+
function GitSection({
|
|
12876
|
+
showGit,
|
|
12877
|
+
setShowGit,
|
|
12878
|
+
colorScheme,
|
|
12879
|
+
gitManager
|
|
12880
|
+
}) {
|
|
12881
|
+
const theme3 = getStateInspectorTheme(colorScheme);
|
|
12882
|
+
const repos = useObservable2(gitManager.repos$);
|
|
12883
|
+
const isInitialized = useObservable2(gitManager.isInitialized$);
|
|
12884
|
+
const repoFiles = useObservable2(gitManager.repoFiles$);
|
|
12885
|
+
const [focusedRepoId, setFocusedRepoId] = useState15(null);
|
|
12886
|
+
const [editingFile, setEditingFile] = useState15(null);
|
|
12887
|
+
const editHandleRef = useRef10(null);
|
|
12888
|
+
const [editContent, setEditContent] = useState15("");
|
|
12889
|
+
const [isEditInitialized, setIsEditInitialized] = useState15(false);
|
|
12890
|
+
const focusedRepo = focusedRepoId ? repos.find((r) => r.id === focusedRepoId) : null;
|
|
12891
|
+
const focusedRepoFilesState = focusedRepoId ? repoFiles[focusedRepoId] : null;
|
|
12892
|
+
const handleFocusRepo = async (repoId) => {
|
|
12893
|
+
if (editHandleRef.current) {
|
|
12894
|
+
editHandleRef.current.close();
|
|
12895
|
+
editHandleRef.current = null;
|
|
12896
|
+
setEditingFile(null);
|
|
12897
|
+
setEditContent("");
|
|
12898
|
+
setIsEditInitialized(false);
|
|
12899
|
+
}
|
|
12900
|
+
setFocusedRepoId(repoId);
|
|
12901
|
+
if (repoId && !repoFiles[repoId]) {
|
|
12902
|
+
await gitManager.fetchRepoFiles(repoId);
|
|
12903
|
+
}
|
|
12904
|
+
};
|
|
12905
|
+
const handleEditFile = (filePath) => {
|
|
12906
|
+
if (!focusedRepoId || !focusedRepoFilesState) return;
|
|
12907
|
+
if (editHandleRef.current) {
|
|
12908
|
+
editHandleRef.current.close();
|
|
12909
|
+
}
|
|
12910
|
+
const handle = gitManager.openEditingHandle(
|
|
12911
|
+
focusedRepoId,
|
|
12912
|
+
filePath,
|
|
12913
|
+
focusedRepoFilesState.ref
|
|
12914
|
+
);
|
|
12915
|
+
editHandleRef.current = handle;
|
|
12916
|
+
setEditingFile(filePath);
|
|
12917
|
+
setIsEditInitialized(false);
|
|
12918
|
+
setEditContent("");
|
|
12919
|
+
};
|
|
12920
|
+
const handleCloseEdit = () => {
|
|
12921
|
+
if (editHandleRef.current) {
|
|
12922
|
+
editHandleRef.current.close();
|
|
12923
|
+
editHandleRef.current = null;
|
|
12924
|
+
}
|
|
12925
|
+
setEditingFile(null);
|
|
12926
|
+
setEditContent("");
|
|
12927
|
+
setIsEditInitialized(false);
|
|
12928
|
+
};
|
|
12929
|
+
useEffect12(() => {
|
|
12930
|
+
const handle = editHandleRef.current;
|
|
12931
|
+
if (!handle) return;
|
|
12932
|
+
const unsubContent = handle.content$.subscribe((content) => {
|
|
12933
|
+
setEditContent(content);
|
|
12934
|
+
});
|
|
12935
|
+
const unsubInitialized = handle.isInitialized$.subscribe((initialized) => {
|
|
12936
|
+
setIsEditInitialized(initialized);
|
|
12937
|
+
});
|
|
12938
|
+
return () => {
|
|
12939
|
+
unsubContent();
|
|
12940
|
+
unsubInitialized();
|
|
12941
|
+
};
|
|
12942
|
+
}, [editingFile]);
|
|
12943
|
+
const handleContentChange = (newContent) => {
|
|
12944
|
+
const handle = editHandleRef.current;
|
|
12945
|
+
if (!handle) return;
|
|
12946
|
+
handle.setState(newContent);
|
|
12947
|
+
};
|
|
12948
|
+
const handleBranchChange = async (ref) => {
|
|
12949
|
+
if (focusedRepoId) {
|
|
12950
|
+
await gitManager.fetchRepoFiles(focusedRepoId, ref);
|
|
12951
|
+
}
|
|
12952
|
+
};
|
|
12953
|
+
const handleAddFile = async () => {
|
|
12954
|
+
if (!focusedRepoId || !focusedRepoFilesState) return;
|
|
12955
|
+
const path2 = prompt("Enter file path (e.g., src/index.ts):");
|
|
12956
|
+
if (!path2) return;
|
|
12957
|
+
try {
|
|
12958
|
+
await gitManager.patchFiles(
|
|
12959
|
+
focusedRepoId,
|
|
12960
|
+
{ create: [{ path: path2, content: "" }] },
|
|
12961
|
+
focusedRepoFilesState.ref
|
|
12962
|
+
);
|
|
12963
|
+
} catch (error) {
|
|
12964
|
+
alert(`Failed to create file: ${error}`);
|
|
12965
|
+
}
|
|
12966
|
+
};
|
|
12967
|
+
const handleRenameFile = async (oldPath) => {
|
|
12968
|
+
if (!focusedRepoId || !focusedRepoFilesState) return;
|
|
12969
|
+
const newPath = prompt(`Rename "${oldPath}" to:`, oldPath);
|
|
12970
|
+
if (!newPath || newPath === oldPath) return;
|
|
12971
|
+
try {
|
|
12972
|
+
await gitManager.patchFiles(
|
|
12973
|
+
focusedRepoId,
|
|
12974
|
+
{ rename: [{ oldPath, newPath }] },
|
|
12975
|
+
focusedRepoFilesState.ref
|
|
12976
|
+
);
|
|
12977
|
+
} catch (error) {
|
|
12978
|
+
alert(`Failed to rename file: ${error}`);
|
|
12979
|
+
}
|
|
12980
|
+
};
|
|
12981
|
+
const handleDeleteFile = async (path2) => {
|
|
12982
|
+
if (!focusedRepoId || !focusedRepoFilesState) return;
|
|
12983
|
+
const confirmed = confirm(`Delete "${path2}"?`);
|
|
12984
|
+
if (!confirmed) return;
|
|
12985
|
+
try {
|
|
12986
|
+
await gitManager.patchFiles(
|
|
12987
|
+
focusedRepoId,
|
|
12988
|
+
{ delete: [{ path: path2 }] },
|
|
12989
|
+
focusedRepoFilesState.ref
|
|
12990
|
+
);
|
|
12991
|
+
if (editingFile === path2) {
|
|
12992
|
+
handleCloseEdit();
|
|
12993
|
+
}
|
|
12994
|
+
} catch (error) {
|
|
12995
|
+
alert(`Failed to delete file: ${error}`);
|
|
12996
|
+
}
|
|
12997
|
+
};
|
|
12998
|
+
return /* @__PURE__ */ React27.createElement(
|
|
12999
|
+
StateInspectorDisclosureSection,
|
|
13000
|
+
{
|
|
13001
|
+
open: showGit,
|
|
13002
|
+
setOpen: setShowGit,
|
|
13003
|
+
title: /* @__PURE__ */ React27.createElement(StateInspectorTitleLabel, null, "Git Repos (", repos.length, ")", /* @__PURE__ */ React27.createElement(ColoredDot, { type: isInitialized ? "success" : "error" })),
|
|
13004
|
+
colorScheme,
|
|
13005
|
+
right: /* @__PURE__ */ React27.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React27.createElement(
|
|
13006
|
+
StateInspectorButton,
|
|
13007
|
+
{
|
|
13008
|
+
theme: theme3,
|
|
13009
|
+
onClick: async () => {
|
|
13010
|
+
try {
|
|
13011
|
+
await gitManager.initRepo();
|
|
13012
|
+
} catch (error) {
|
|
13013
|
+
console.error("[GitSection] Failed to create repo:", error);
|
|
13014
|
+
}
|
|
13015
|
+
}
|
|
13016
|
+
},
|
|
13017
|
+
"Init Repo"
|
|
13018
|
+
))
|
|
13019
|
+
},
|
|
13020
|
+
/* @__PURE__ */ React27.createElement(StateInspectorDisclosureRowInner, null, /* @__PURE__ */ React27.createElement("div", { style: { padding: "4px 12px", display: "flex", gap: "4px" } }, /* @__PURE__ */ React27.createElement(
|
|
13021
|
+
"select",
|
|
13022
|
+
{
|
|
13023
|
+
name: "repoSelector",
|
|
13024
|
+
value: focusedRepoId ?? "",
|
|
13025
|
+
style: { flex: "1 1 auto", height: "19px", minWidth: 0 },
|
|
13026
|
+
onChange: (e) => {
|
|
13027
|
+
const value = e.target.value;
|
|
13028
|
+
handleFocusRepo(value || null);
|
|
13029
|
+
}
|
|
13030
|
+
},
|
|
13031
|
+
/* @__PURE__ */ React27.createElement("option", { value: "" }, "Select a repo..."),
|
|
13032
|
+
repos.map((repo) => /* @__PURE__ */ React27.createElement("option", { key: repo.id, value: repo.id }, repo.id))
|
|
13033
|
+
), focusedRepoId && /* @__PURE__ */ React27.createElement(
|
|
13034
|
+
StateInspectorButton,
|
|
13035
|
+
{
|
|
13036
|
+
theme: theme3,
|
|
13037
|
+
onClick: () => gitManager.fetchRepoFiles(focusedRepoId)
|
|
13038
|
+
},
|
|
13039
|
+
"Refresh"
|
|
13040
|
+
), /* @__PURE__ */ React27.createElement(
|
|
13041
|
+
"label",
|
|
13042
|
+
{
|
|
13043
|
+
style: {
|
|
13044
|
+
display: "flex",
|
|
13045
|
+
alignItems: "center",
|
|
13046
|
+
gap: "4px",
|
|
13047
|
+
fontSize: "11px",
|
|
13048
|
+
whiteSpace: "nowrap"
|
|
13049
|
+
}
|
|
13050
|
+
},
|
|
13051
|
+
"[Include Content = ",
|
|
13052
|
+
gitManager.includeContent ? "true" : "false",
|
|
13053
|
+
"]"
|
|
13054
|
+
)), focusedRepo && focusedRepoFilesState && /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(
|
|
13055
|
+
"div",
|
|
13056
|
+
{
|
|
13057
|
+
style: {
|
|
13058
|
+
padding: "4px 12px",
|
|
13059
|
+
display: "flex",
|
|
13060
|
+
gap: "8px",
|
|
13061
|
+
alignItems: "center",
|
|
13062
|
+
fontSize: "12px"
|
|
13063
|
+
}
|
|
13064
|
+
},
|
|
13065
|
+
/* @__PURE__ */ React27.createElement("span", { style: { color: theme3.BASE_COLOR } }, "Branch:"),
|
|
13066
|
+
focusedRepoFilesState.branches.length > 0 ? /* @__PURE__ */ React27.createElement(
|
|
13067
|
+
"select",
|
|
13068
|
+
{
|
|
13069
|
+
value: focusedRepoFilesState.ref,
|
|
13070
|
+
style: { flex: "1 1 auto", height: "19px" },
|
|
13071
|
+
onChange: (e) => handleBranchChange(e.target.value)
|
|
13072
|
+
},
|
|
13073
|
+
focusedRepoFilesState.branches.map((branch) => /* @__PURE__ */ React27.createElement("option", { key: branch.name, value: branch.name }, branch.name))
|
|
13074
|
+
) : /* @__PURE__ */ React27.createElement("span", { style: { opacity: 0.6, fontStyle: "italic" } }, focusedRepoFilesState.ref || "No branches"),
|
|
13075
|
+
focusedRepoFilesState.oid && /* @__PURE__ */ React27.createElement(
|
|
13076
|
+
"span",
|
|
13077
|
+
{
|
|
13078
|
+
style: {
|
|
13079
|
+
fontFamily: "monospace",
|
|
13080
|
+
fontSize: "10px",
|
|
13081
|
+
opacity: 0.6
|
|
13082
|
+
},
|
|
13083
|
+
title: focusedRepoFilesState.oid
|
|
13084
|
+
},
|
|
13085
|
+
focusedRepoFilesState.oid.slice(0, 7),
|
|
13086
|
+
focusedRepoFilesState.fetchState === "refreshing" && "\u2026"
|
|
13087
|
+
),
|
|
13088
|
+
/* @__PURE__ */ React27.createElement(
|
|
13089
|
+
StateInspectorButton,
|
|
13090
|
+
{
|
|
13091
|
+
theme: theme3,
|
|
13092
|
+
onClick: handleAddFile,
|
|
13093
|
+
style: { fontSize: "10px", padding: "2px 6px" }
|
|
13094
|
+
},
|
|
13095
|
+
"+ Add File"
|
|
13096
|
+
)
|
|
13097
|
+
), focusedRepoFilesState.fetchState === "loading" && /* @__PURE__ */ React27.createElement(
|
|
13098
|
+
"div",
|
|
13099
|
+
{
|
|
13100
|
+
style: {
|
|
13101
|
+
padding: "12px",
|
|
13102
|
+
fontSize: "12px"
|
|
13103
|
+
}
|
|
13104
|
+
},
|
|
13105
|
+
"Loading files..."
|
|
13106
|
+
), focusedRepoFilesState.error && /* @__PURE__ */ React27.createElement(
|
|
13107
|
+
"div",
|
|
13108
|
+
{
|
|
13109
|
+
style: {
|
|
13110
|
+
padding: "12px",
|
|
13111
|
+
fontSize: "12px",
|
|
13112
|
+
color: "#f44"
|
|
13113
|
+
}
|
|
13114
|
+
},
|
|
13115
|
+
"Error: ",
|
|
13116
|
+
focusedRepoFilesState.error
|
|
13117
|
+
), focusedRepoFilesState.fetchState !== "loading" && !focusedRepoFilesState.error && focusedRepoFilesState.files.length === 0 && /* @__PURE__ */ React27.createElement(
|
|
13118
|
+
"div",
|
|
13119
|
+
{
|
|
13120
|
+
style: {
|
|
13121
|
+
padding: "12px",
|
|
13122
|
+
fontSize: "12px"
|
|
13123
|
+
}
|
|
13124
|
+
},
|
|
13125
|
+
"No files (empty repo)"
|
|
13126
|
+
), !editingFile && focusedRepoFilesState.files.map((file, index) => {
|
|
13127
|
+
const fileInfo = focusedRepoFilesState.fileContents?.find(
|
|
13128
|
+
(f) => f.path === file
|
|
13129
|
+
);
|
|
13130
|
+
let preview = "";
|
|
13131
|
+
if (fileInfo) {
|
|
13132
|
+
try {
|
|
13133
|
+
const decoded = atob(fileInfo.content);
|
|
13134
|
+
preview = decoded.slice(0, 40).replace(/\n/g, " ").replace(/\s+/g, " ");
|
|
13135
|
+
if (decoded.length > 40) preview += "\u2026";
|
|
13136
|
+
} catch {
|
|
13137
|
+
}
|
|
13138
|
+
}
|
|
13139
|
+
return /* @__PURE__ */ React27.createElement(
|
|
13140
|
+
"div",
|
|
13141
|
+
{
|
|
13142
|
+
key: index,
|
|
13143
|
+
style: {
|
|
13144
|
+
padding: "2px 12px",
|
|
13145
|
+
display: "flex",
|
|
13146
|
+
justifyContent: "space-between",
|
|
13147
|
+
alignItems: "center",
|
|
13148
|
+
gap: "8px",
|
|
13149
|
+
borderBottom: `1px solid ${colorScheme === "light" ? "rgb(223 223 223)" : "rgb(29 29 29)"}`
|
|
13150
|
+
}
|
|
13151
|
+
},
|
|
13152
|
+
/* @__PURE__ */ React27.createElement(
|
|
13153
|
+
"span",
|
|
13154
|
+
{
|
|
13155
|
+
style: {
|
|
13156
|
+
fontFamily: "monospace",
|
|
13157
|
+
fontSize: "11px",
|
|
13158
|
+
overflow: "hidden",
|
|
13159
|
+
textOverflow: "ellipsis",
|
|
13160
|
+
whiteSpace: "nowrap",
|
|
13161
|
+
minWidth: 0,
|
|
13162
|
+
display: "flex",
|
|
13163
|
+
gap: "8px"
|
|
13164
|
+
},
|
|
13165
|
+
title: file
|
|
13166
|
+
},
|
|
13167
|
+
/* @__PURE__ */ React27.createElement("span", null, file),
|
|
13168
|
+
preview && /* @__PURE__ */ React27.createElement("span", { style: { opacity: 0.5 } }, preview)
|
|
13169
|
+
),
|
|
13170
|
+
/* @__PURE__ */ React27.createElement("span", { style: { display: "flex", gap: "4px", flexShrink: 0 } }, /* @__PURE__ */ React27.createElement(
|
|
13171
|
+
StateInspectorButton,
|
|
13172
|
+
{
|
|
13173
|
+
theme: theme3,
|
|
13174
|
+
onClick: () => handleEditFile(file),
|
|
13175
|
+
style: { fontSize: "10px", padding: "2px 6px" }
|
|
13176
|
+
},
|
|
13177
|
+
"Edit"
|
|
13178
|
+
), /* @__PURE__ */ React27.createElement(
|
|
13179
|
+
StateInspectorButton,
|
|
13180
|
+
{
|
|
13181
|
+
theme: theme3,
|
|
13182
|
+
onClick: () => handleRenameFile(file),
|
|
13183
|
+
style: { fontSize: "10px", padding: "2px 6px" }
|
|
13184
|
+
},
|
|
13185
|
+
"Rename"
|
|
13186
|
+
), /* @__PURE__ */ React27.createElement(
|
|
13187
|
+
StateInspectorButton,
|
|
13188
|
+
{
|
|
13189
|
+
theme: theme3,
|
|
13190
|
+
onClick: () => handleDeleteFile(file),
|
|
13191
|
+
style: { fontSize: "10px", padding: "2px 6px" }
|
|
13192
|
+
},
|
|
13193
|
+
"Delete"
|
|
13194
|
+
))
|
|
13195
|
+
);
|
|
13196
|
+
}), editingFile && /* @__PURE__ */ React27.createElement(
|
|
13197
|
+
"div",
|
|
13198
|
+
{
|
|
13199
|
+
style: {
|
|
13200
|
+
padding: "8px 12px",
|
|
13201
|
+
borderTop: `1px solid ${theme3.DIVIDER_COLOR}`,
|
|
13202
|
+
flex: "1 1 auto",
|
|
13203
|
+
display: "flex",
|
|
13204
|
+
flexDirection: "column",
|
|
13205
|
+
minHeight: 0
|
|
13206
|
+
}
|
|
13207
|
+
},
|
|
13208
|
+
/* @__PURE__ */ React27.createElement(
|
|
13209
|
+
"div",
|
|
13210
|
+
{
|
|
13211
|
+
style: {
|
|
13212
|
+
display: "flex",
|
|
13213
|
+
justifyContent: "space-between",
|
|
13214
|
+
alignItems: "center",
|
|
13215
|
+
marginBottom: "8px",
|
|
13216
|
+
flexShrink: 0
|
|
13217
|
+
}
|
|
13218
|
+
},
|
|
13219
|
+
/* @__PURE__ */ React27.createElement(
|
|
13220
|
+
"span",
|
|
13221
|
+
{
|
|
13222
|
+
style: {
|
|
13223
|
+
fontFamily: "monospace",
|
|
13224
|
+
fontSize: "11px",
|
|
13225
|
+
fontWeight: "bold"
|
|
13226
|
+
}
|
|
13227
|
+
},
|
|
13228
|
+
editingFile,
|
|
13229
|
+
!isEditInitialized && /* @__PURE__ */ React27.createElement("span", { style: { opacity: 0.5, marginLeft: "8px" } }, "Loading...")
|
|
13230
|
+
),
|
|
13231
|
+
/* @__PURE__ */ React27.createElement(
|
|
13232
|
+
StateInspectorButton,
|
|
13233
|
+
{
|
|
13234
|
+
theme: theme3,
|
|
13235
|
+
onClick: handleCloseEdit,
|
|
13236
|
+
style: { fontSize: "10px", padding: "2px 6px" }
|
|
13237
|
+
},
|
|
13238
|
+
"Close"
|
|
13239
|
+
)
|
|
13240
|
+
),
|
|
13241
|
+
/* @__PURE__ */ React27.createElement(
|
|
13242
|
+
"textarea",
|
|
13243
|
+
{
|
|
13244
|
+
value: editContent,
|
|
13245
|
+
onChange: (e) => handleContentChange(e.target.value),
|
|
13246
|
+
disabled: !isEditInitialized,
|
|
13247
|
+
style: {
|
|
13248
|
+
width: "100%",
|
|
13249
|
+
flex: "1 1 auto",
|
|
13250
|
+
minHeight: "100px",
|
|
13251
|
+
fontFamily: "monospace",
|
|
13252
|
+
fontSize: "11px",
|
|
13253
|
+
padding: "8px",
|
|
13254
|
+
border: `1px solid ${theme3.DIVIDER_COLOR}`,
|
|
13255
|
+
borderRadius: "4px",
|
|
13256
|
+
backgroundColor: theme3.ROW_BACKGROUND,
|
|
13257
|
+
color: theme3.BASE_COLOR,
|
|
13258
|
+
resize: "none",
|
|
13259
|
+
boxSizing: "border-box"
|
|
13260
|
+
}
|
|
13261
|
+
}
|
|
13262
|
+
)
|
|
13263
|
+
)), repos.length === 0 && /* @__PURE__ */ React27.createElement(
|
|
13264
|
+
"div",
|
|
13265
|
+
{
|
|
13266
|
+
style: {
|
|
13267
|
+
padding: "12px",
|
|
13268
|
+
fontSize: "12px",
|
|
13269
|
+
display: "flex",
|
|
13270
|
+
flexDirection: "column",
|
|
13271
|
+
gap: "4px"
|
|
13272
|
+
}
|
|
13273
|
+
},
|
|
13274
|
+
/* @__PURE__ */ React27.createElement("span", null, "No git repos")
|
|
13275
|
+
))
|
|
13276
|
+
);
|
|
13277
|
+
}
|
|
13278
|
+
|
|
12944
13279
|
// ../noya-multiplayer-react/src/inspector/sections/HistorySection.tsx
|
|
12945
|
-
import
|
|
13280
|
+
import React28, { useEffect as useEffect13, useRef as useRef11 } from "react";
|
|
12946
13281
|
|
|
12947
13282
|
// ../noya-multiplayer-react/src/inspector/utils.ts
|
|
12948
13283
|
function pathToString(extendedPath) {
|
|
@@ -12997,15 +13332,15 @@ function HistorySection({
|
|
|
12997
13332
|
historySnapshot,
|
|
12998
13333
|
multiplayerStateManager
|
|
12999
13334
|
}) {
|
|
13000
|
-
const ref =
|
|
13335
|
+
const ref = useRef11(null);
|
|
13001
13336
|
const theme3 = getStateInspectorTheme(colorScheme);
|
|
13002
13337
|
const solidBorderColor = getStateInspectorBorderColor(colorScheme);
|
|
13003
|
-
|
|
13338
|
+
useEffect13(() => {
|
|
13004
13339
|
if (ref.current) {
|
|
13005
13340
|
ref.current.scrollTop = ref.current.scrollHeight;
|
|
13006
13341
|
}
|
|
13007
13342
|
}, [historySnapshot]);
|
|
13008
|
-
|
|
13343
|
+
useEffect13(() => {
|
|
13009
13344
|
if (!ref.current) return;
|
|
13010
13345
|
const historyEntry = ref.current.querySelector(
|
|
13011
13346
|
`#${HISTORY_ELEMENT_PREFIX}${historySnapshot.historyIndex}`
|
|
@@ -13017,14 +13352,14 @@ function HistorySection({
|
|
|
13017
13352
|
});
|
|
13018
13353
|
}
|
|
13019
13354
|
}, [historySnapshot.historyIndex]);
|
|
13020
|
-
return /* @__PURE__ */
|
|
13355
|
+
return /* @__PURE__ */ React28.createElement(
|
|
13021
13356
|
StateInspectorDisclosureSection,
|
|
13022
13357
|
{
|
|
13023
13358
|
open: showHistory,
|
|
13024
13359
|
setOpen: setShowHistory,
|
|
13025
13360
|
title: "History",
|
|
13026
13361
|
colorScheme,
|
|
13027
|
-
right: /* @__PURE__ */
|
|
13362
|
+
right: /* @__PURE__ */ React28.createElement(
|
|
13028
13363
|
"span",
|
|
13029
13364
|
{
|
|
13030
13365
|
style: {
|
|
@@ -13032,7 +13367,7 @@ function HistorySection({
|
|
|
13032
13367
|
gap: "4px"
|
|
13033
13368
|
}
|
|
13034
13369
|
},
|
|
13035
|
-
/* @__PURE__ */
|
|
13370
|
+
/* @__PURE__ */ React28.createElement(
|
|
13036
13371
|
StateInspectorButton,
|
|
13037
13372
|
{
|
|
13038
13373
|
disabled: !historySnapshot.canUndo,
|
|
@@ -13041,7 +13376,7 @@ function HistorySection({
|
|
|
13041
13376
|
multiplayerStateManager.undo();
|
|
13042
13377
|
}
|
|
13043
13378
|
},
|
|
13044
|
-
/* @__PURE__ */
|
|
13379
|
+
/* @__PURE__ */ React28.createElement("span", { style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React28.createElement(
|
|
13045
13380
|
"svg",
|
|
13046
13381
|
{
|
|
13047
13382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13049,7 +13384,7 @@ function HistorySection({
|
|
|
13049
13384
|
height: "1em",
|
|
13050
13385
|
viewBox: "0 0 20 20"
|
|
13051
13386
|
},
|
|
13052
|
-
/* @__PURE__ */
|
|
13387
|
+
/* @__PURE__ */ React28.createElement(
|
|
13053
13388
|
"path",
|
|
13054
13389
|
{
|
|
13055
13390
|
fill: "currentColor",
|
|
@@ -13058,7 +13393,7 @@ function HistorySection({
|
|
|
13058
13393
|
)
|
|
13059
13394
|
))
|
|
13060
13395
|
),
|
|
13061
|
-
/* @__PURE__ */
|
|
13396
|
+
/* @__PURE__ */ React28.createElement(
|
|
13062
13397
|
StateInspectorButton,
|
|
13063
13398
|
{
|
|
13064
13399
|
disabled: !historySnapshot.canRedo,
|
|
@@ -13067,7 +13402,7 @@ function HistorySection({
|
|
|
13067
13402
|
multiplayerStateManager.redo();
|
|
13068
13403
|
}
|
|
13069
13404
|
},
|
|
13070
|
-
/* @__PURE__ */
|
|
13405
|
+
/* @__PURE__ */ React28.createElement("span", { style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React28.createElement(
|
|
13071
13406
|
"svg",
|
|
13072
13407
|
{
|
|
13073
13408
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13075,7 +13410,7 @@ function HistorySection({
|
|
|
13075
13410
|
height: "1em",
|
|
13076
13411
|
viewBox: "0 0 20 20"
|
|
13077
13412
|
},
|
|
13078
|
-
/* @__PURE__ */
|
|
13413
|
+
/* @__PURE__ */ React28.createElement(
|
|
13079
13414
|
"path",
|
|
13080
13415
|
{
|
|
13081
13416
|
fill: "currentColor",
|
|
@@ -13086,7 +13421,7 @@ function HistorySection({
|
|
|
13086
13421
|
)
|
|
13087
13422
|
)
|
|
13088
13423
|
},
|
|
13089
|
-
/* @__PURE__ */
|
|
13424
|
+
/* @__PURE__ */ React28.createElement(StateInspectorDisclosureRowInner, { ref }, /* @__PURE__ */ React28.createElement(
|
|
13090
13425
|
"div",
|
|
13091
13426
|
{
|
|
13092
13427
|
id: `${HISTORY_ELEMENT_PREFIX}0`,
|
|
@@ -13100,7 +13435,7 @@ function HistorySection({
|
|
|
13100
13435
|
background: historySnapshot.historyIndex === 0 ? "rgb(59 130 246 / 15%)" : void 0
|
|
13101
13436
|
}
|
|
13102
13437
|
},
|
|
13103
|
-
/* @__PURE__ */
|
|
13438
|
+
/* @__PURE__ */ React28.createElement(
|
|
13104
13439
|
"span",
|
|
13105
13440
|
{
|
|
13106
13441
|
style: {
|
|
@@ -13115,7 +13450,7 @@ function HistorySection({
|
|
|
13115
13450
|
), historySnapshot.history.map((entry, index) => {
|
|
13116
13451
|
const metadata = entry.metadata;
|
|
13117
13452
|
const { id, name, timestamp, ...rest } = metadata;
|
|
13118
|
-
return /* @__PURE__ */
|
|
13453
|
+
return /* @__PURE__ */ React28.createElement(
|
|
13119
13454
|
"div",
|
|
13120
13455
|
{
|
|
13121
13456
|
id: `${HISTORY_ELEMENT_PREFIX}${index + 1}`,
|
|
@@ -13126,7 +13461,7 @@ function HistorySection({
|
|
|
13126
13461
|
background: index + 1 === historySnapshot.historyIndex ? "rgb(59 130 246 / 15%)" : void 0
|
|
13127
13462
|
}
|
|
13128
13463
|
},
|
|
13129
|
-
typeof name === "string" && /* @__PURE__ */
|
|
13464
|
+
typeof name === "string" && /* @__PURE__ */ React28.createElement(
|
|
13130
13465
|
"pre",
|
|
13131
13466
|
{
|
|
13132
13467
|
style: {
|
|
@@ -13137,9 +13472,9 @@ function HistorySection({
|
|
|
13137
13472
|
}
|
|
13138
13473
|
},
|
|
13139
13474
|
entry.metadata.name,
|
|
13140
|
-
Object.keys(rest).length > 0 && /* @__PURE__ */
|
|
13475
|
+
Object.keys(rest).length > 0 && /* @__PURE__ */ React28.createElement(themedObjectInspector, { data: rest, theme: theme3 })
|
|
13141
13476
|
),
|
|
13142
|
-
entry.redoPatches?.map((patch, j) => /* @__PURE__ */
|
|
13477
|
+
entry.redoPatches?.map((patch, j) => /* @__PURE__ */ React28.createElement(
|
|
13143
13478
|
"pre",
|
|
13144
13479
|
{
|
|
13145
13480
|
key: j,
|
|
@@ -13150,10 +13485,10 @@ function HistorySection({
|
|
|
13150
13485
|
margin: 0
|
|
13151
13486
|
}
|
|
13152
13487
|
},
|
|
13153
|
-
patch.op === "add" && /* @__PURE__ */
|
|
13154
|
-
patch.op === "replace" && /* @__PURE__ */
|
|
13155
|
-
patch.op === "remove" && /* @__PURE__ */
|
|
13156
|
-
patch.op === "move" && /* @__PURE__ */
|
|
13488
|
+
patch.op === "add" && /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("span", { style: { fontStyle: "italic" } }, pathToString(patch.path)), " = ", /* @__PURE__ */ React28.createElement(themedObjectInspector, { data: patch.value, theme: theme3 })),
|
|
13489
|
+
patch.op === "replace" && /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("span", { style: { fontStyle: "italic" } }, pathToString(patch.path)), " = ", /* @__PURE__ */ React28.createElement(themedObjectInspector, { data: patch.value, theme: theme3 })),
|
|
13490
|
+
patch.op === "remove" && /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("span", { style: { color: theme3.OBJECT_VALUE_STRING_COLOR } }, "delete", " "), /* @__PURE__ */ React28.createElement("span", { style: { fontStyle: "italic" } }, pathToString(patch.path))),
|
|
13491
|
+
patch.op === "move" && /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("span", { style: { fontStyle: "italic" } }, pathToString(patch.from)), " -> ", /* @__PURE__ */ React28.createElement("span", { style: { fontStyle: "italic" } }, pathToString(patch.path)))
|
|
13157
13492
|
))
|
|
13158
13493
|
);
|
|
13159
13494
|
}))
|
|
@@ -13161,7 +13496,7 @@ function HistorySection({
|
|
|
13161
13496
|
}
|
|
13162
13497
|
|
|
13163
13498
|
// ../noya-multiplayer-react/src/inspector/sections/ServerScriptLogsSection.tsx
|
|
13164
|
-
import
|
|
13499
|
+
import React29 from "react";
|
|
13165
13500
|
var levelColors = {
|
|
13166
13501
|
error: "#f87171",
|
|
13167
13502
|
warn: "#facc15",
|
|
@@ -13181,16 +13516,16 @@ function ServerScriptLogsSection({
|
|
|
13181
13516
|
title = "Server Script Logs"
|
|
13182
13517
|
}) {
|
|
13183
13518
|
const theme3 = getStateInspectorTheme(colorScheme);
|
|
13184
|
-
return /* @__PURE__ */
|
|
13519
|
+
return /* @__PURE__ */ React29.createElement(
|
|
13185
13520
|
StateInspectorDisclosureSection,
|
|
13186
13521
|
{
|
|
13187
13522
|
open: showLogs,
|
|
13188
13523
|
setOpen: setShowLogs,
|
|
13189
13524
|
title,
|
|
13190
13525
|
colorScheme,
|
|
13191
|
-
right: /* @__PURE__ */
|
|
13526
|
+
right: /* @__PURE__ */ React29.createElement(StateInspectorButton, { theme: theme3, onClick: onTogglePaused }, paused ? "Resume" : "Pause")
|
|
13192
13527
|
},
|
|
13193
|
-
/* @__PURE__ */
|
|
13528
|
+
/* @__PURE__ */ React29.createElement(StateInspectorDisclosureRowInner, { ref: containerRef }, paused && /* @__PURE__ */ React29.createElement(
|
|
13194
13529
|
"div",
|
|
13195
13530
|
{
|
|
13196
13531
|
style: {
|
|
@@ -13200,7 +13535,7 @@ function ServerScriptLogsSection({
|
|
|
13200
13535
|
}
|
|
13201
13536
|
},
|
|
13202
13537
|
"Log streaming paused"
|
|
13203
|
-
), logs.map((log) => /* @__PURE__ */
|
|
13538
|
+
), logs.map((log) => /* @__PURE__ */ React29.createElement(StateInspectorRow, { key: log.id, colorScheme }, /* @__PURE__ */ React29.createElement(
|
|
13204
13539
|
"div",
|
|
13205
13540
|
{
|
|
13206
13541
|
style: {
|
|
@@ -13213,9 +13548,9 @@ function ServerScriptLogsSection({
|
|
|
13213
13548
|
textTransform: "uppercase"
|
|
13214
13549
|
}
|
|
13215
13550
|
},
|
|
13216
|
-
/* @__PURE__ */
|
|
13217
|
-
/* @__PURE__ */
|
|
13218
|
-
(log.origin || log.target || log.mode) && /* @__PURE__ */
|
|
13551
|
+
/* @__PURE__ */ React29.createElement("span", null, formatTimestamp(log.timestamp)),
|
|
13552
|
+
/* @__PURE__ */ React29.createElement("span", { style: { color: levelColors[log.level] } }, log.level),
|
|
13553
|
+
(log.origin || log.target || log.mode) && /* @__PURE__ */ React29.createElement(
|
|
13219
13554
|
"span",
|
|
13220
13555
|
{
|
|
13221
13556
|
style: {
|
|
@@ -13227,7 +13562,7 @@ function ServerScriptLogsSection({
|
|
|
13227
13562
|
},
|
|
13228
13563
|
[log.origin ?? log.target, log.mode].filter(Boolean).join(" / ")
|
|
13229
13564
|
),
|
|
13230
|
-
/* @__PURE__ */
|
|
13565
|
+
/* @__PURE__ */ React29.createElement(
|
|
13231
13566
|
"span",
|
|
13232
13567
|
{
|
|
13233
13568
|
style: {
|
|
@@ -13238,7 +13573,7 @@ function ServerScriptLogsSection({
|
|
|
13238
13573
|
},
|
|
13239
13574
|
log.scriptId
|
|
13240
13575
|
)
|
|
13241
|
-
), /* @__PURE__ */
|
|
13576
|
+
), /* @__PURE__ */ React29.createElement(
|
|
13242
13577
|
"div",
|
|
13243
13578
|
{
|
|
13244
13579
|
style: {
|
|
@@ -13247,15 +13582,15 @@ function ServerScriptLogsSection({
|
|
|
13247
13582
|
gap: "4px"
|
|
13248
13583
|
}
|
|
13249
13584
|
},
|
|
13250
|
-
log.values.length > 0 ? log.values.map((value, index) => /* @__PURE__ */
|
|
13585
|
+
log.values.length > 0 ? log.values.map((value, index) => /* @__PURE__ */ React29.createElement(
|
|
13251
13586
|
themedObjectInspector,
|
|
13252
13587
|
{
|
|
13253
13588
|
key: index,
|
|
13254
13589
|
data: value,
|
|
13255
13590
|
theme: theme3
|
|
13256
13591
|
}
|
|
13257
|
-
)) : /* @__PURE__ */
|
|
13258
|
-
))), !logs?.length && /* @__PURE__ */
|
|
13592
|
+
)) : /* @__PURE__ */ React29.createElement("span", { style: { fontSize: "11px", opacity: 0.7 } }, "No data")
|
|
13593
|
+
))), !logs?.length && /* @__PURE__ */ React29.createElement(
|
|
13259
13594
|
"div",
|
|
13260
13595
|
{
|
|
13261
13596
|
style: {
|
|
@@ -13266,7 +13601,7 @@ function ServerScriptLogsSection({
|
|
|
13266
13601
|
gap: "4px"
|
|
13267
13602
|
}
|
|
13268
13603
|
},
|
|
13269
|
-
/* @__PURE__ */
|
|
13604
|
+
/* @__PURE__ */ React29.createElement("span", null, "No logs received")
|
|
13270
13605
|
))
|
|
13271
13606
|
);
|
|
13272
13607
|
}
|
|
@@ -13794,16 +14129,8 @@ function decodeAll(buffer) {
|
|
|
13794
14129
|
return { state, schema, assets, assetMap };
|
|
13795
14130
|
}
|
|
13796
14131
|
|
|
13797
|
-
// ../noya-multiplayer-react/src/inspector/StateInspectorTitleLabel.tsx
|
|
13798
|
-
import React28 from "react";
|
|
13799
|
-
function StateInspectorTitleLabel({
|
|
13800
|
-
children
|
|
13801
|
-
}) {
|
|
13802
|
-
return /* @__PURE__ */ React28.createElement("span", { style: { display: "flex", alignItems: "center", gap: "4px" } }, children);
|
|
13803
|
-
}
|
|
13804
|
-
|
|
13805
14132
|
// ../noya-multiplayer-react/src/inspector/StateInspectorToggleButton.tsx
|
|
13806
|
-
import
|
|
14133
|
+
import React30 from "react";
|
|
13807
14134
|
function StateInspectorToggleButton({
|
|
13808
14135
|
showInspector,
|
|
13809
14136
|
setShowInspector,
|
|
@@ -13811,7 +14138,7 @@ function StateInspectorToggleButton({
|
|
|
13811
14138
|
anchor
|
|
13812
14139
|
}) {
|
|
13813
14140
|
const isRightAnchor = anchor === "right";
|
|
13814
|
-
const rightIcon = /* @__PURE__ */
|
|
14141
|
+
const rightIcon = /* @__PURE__ */ React30.createElement(
|
|
13815
14142
|
"svg",
|
|
13816
14143
|
{
|
|
13817
14144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13821,7 +14148,7 @@ function StateInspectorToggleButton({
|
|
|
13821
14148
|
stroke: "currentColor",
|
|
13822
14149
|
className: "size-6"
|
|
13823
14150
|
},
|
|
13824
|
-
/* @__PURE__ */
|
|
14151
|
+
/* @__PURE__ */ React30.createElement(
|
|
13825
14152
|
"path",
|
|
13826
14153
|
{
|
|
13827
14154
|
strokeLinecap: "round",
|
|
@@ -13830,7 +14157,7 @@ function StateInspectorToggleButton({
|
|
|
13830
14157
|
}
|
|
13831
14158
|
)
|
|
13832
14159
|
);
|
|
13833
|
-
const leftIcon = /* @__PURE__ */
|
|
14160
|
+
const leftIcon = /* @__PURE__ */ React30.createElement(
|
|
13834
14161
|
"svg",
|
|
13835
14162
|
{
|
|
13836
14163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13840,7 +14167,7 @@ function StateInspectorToggleButton({
|
|
|
13840
14167
|
stroke: "currentColor",
|
|
13841
14168
|
className: "size-6"
|
|
13842
14169
|
},
|
|
13843
|
-
/* @__PURE__ */
|
|
14170
|
+
/* @__PURE__ */ React30.createElement(
|
|
13844
14171
|
"path",
|
|
13845
14172
|
{
|
|
13846
14173
|
strokeLinecap: "round",
|
|
@@ -13849,7 +14176,7 @@ function StateInspectorToggleButton({
|
|
|
13849
14176
|
}
|
|
13850
14177
|
)
|
|
13851
14178
|
);
|
|
13852
|
-
return /* @__PURE__ */
|
|
14179
|
+
return /* @__PURE__ */ React30.createElement(
|
|
13853
14180
|
"span",
|
|
13854
14181
|
{
|
|
13855
14182
|
role: "button",
|
|
@@ -13870,15 +14197,15 @@ function StateInspectorToggleButton({
|
|
|
13870
14197
|
setShowInspector(!showInspector);
|
|
13871
14198
|
}
|
|
13872
14199
|
},
|
|
13873
|
-
showInspector ? "Hide Inspector" : /* @__PURE__ */
|
|
14200
|
+
showInspector ? "Hide Inspector" : /* @__PURE__ */ React30.createElement("span", { style: { width: "12px", height: "12px" } }, isRightAnchor ? rightIcon : leftIcon)
|
|
13874
14201
|
);
|
|
13875
14202
|
}
|
|
13876
14203
|
|
|
13877
14204
|
// ../noya-multiplayer-react/src/inspector/useLocalStorageState.tsx
|
|
13878
|
-
import
|
|
14205
|
+
import React31 from "react";
|
|
13879
14206
|
var localStorage2 = typeof window !== "undefined" ? window.localStorage : null;
|
|
13880
14207
|
function useLocalStorageState(key, defaultValue) {
|
|
13881
|
-
const [state, setState] =
|
|
14208
|
+
const [state, setState] = React31.useState(() => {
|
|
13882
14209
|
const value = localStorage2?.getItem(key);
|
|
13883
14210
|
let result = defaultValue;
|
|
13884
14211
|
if (value) {
|
|
@@ -13898,11 +14225,11 @@ function useLocalStorageState(key, defaultValue) {
|
|
|
13898
14225
|
}
|
|
13899
14226
|
|
|
13900
14227
|
// ../noya-multiplayer-react/src/inspector/usePausedStream.ts
|
|
13901
|
-
import
|
|
14228
|
+
import React33 from "react";
|
|
13902
14229
|
function usePausedStream(items) {
|
|
13903
|
-
const [paused, setPaused] =
|
|
13904
|
-
const [visibleItems, setVisibleItems] =
|
|
13905
|
-
const togglePaused =
|
|
14230
|
+
const [paused, setPaused] = React33.useState(false);
|
|
14231
|
+
const [visibleItems, setVisibleItems] = React33.useState(items ?? []);
|
|
14232
|
+
const togglePaused = React33.useCallback(() => {
|
|
13906
14233
|
setPaused((value) => {
|
|
13907
14234
|
if (!value) {
|
|
13908
14235
|
setVisibleItems(items ?? []);
|
|
@@ -13910,7 +14237,7 @@ function usePausedStream(items) {
|
|
|
13910
14237
|
return !value;
|
|
13911
14238
|
});
|
|
13912
14239
|
}, [items]);
|
|
13913
|
-
|
|
14240
|
+
React33.useEffect(() => {
|
|
13914
14241
|
if (paused) return;
|
|
13915
14242
|
setVisibleItems(items ?? []);
|
|
13916
14243
|
}, [items, paused]);
|
|
@@ -13942,19 +14269,20 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
13942
14269
|
ioManager,
|
|
13943
14270
|
resourceManager,
|
|
13944
14271
|
activityEventsManager,
|
|
13945
|
-
logManager
|
|
14272
|
+
logManager,
|
|
14273
|
+
gitManager
|
|
13946
14274
|
} = noyaManager;
|
|
13947
|
-
const [didMount, setDidMount] =
|
|
14275
|
+
const [didMount, setDidMount] = React34.useState(false);
|
|
13948
14276
|
const tasks = useObservable2(taskManager.tasks$);
|
|
13949
14277
|
const inputs = useObservable2(ioManager.inputs$);
|
|
13950
14278
|
const outputTransforms = useObservable2(ioManager.outputTransforms$);
|
|
13951
14279
|
useLayoutEffect4(() => {
|
|
13952
14280
|
setDidMount(true);
|
|
13953
14281
|
}, []);
|
|
13954
|
-
const eventsContainerRef =
|
|
13955
|
-
const activityEventsContainerRef =
|
|
13956
|
-
const serverLogsContainerRef =
|
|
13957
|
-
const serverSimulationLogsContainerRef =
|
|
14282
|
+
const eventsContainerRef = React34.useRef(null);
|
|
14283
|
+
const activityEventsContainerRef = React34.useRef(null);
|
|
14284
|
+
const serverLogsContainerRef = React34.useRef(null);
|
|
14285
|
+
const serverSimulationLogsContainerRef = React34.useRef(null);
|
|
13958
14286
|
const [showInspector, setShowInspector] = useLocalStorageState(
|
|
13959
14287
|
"noya-multiplayer-react-show-inspector",
|
|
13960
14288
|
true
|
|
@@ -14019,6 +14347,10 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14019
14347
|
"noya-multiplayer-react-show-server-simulation-logs",
|
|
14020
14348
|
false
|
|
14021
14349
|
);
|
|
14350
|
+
const [showGit, setShowGit] = useLocalStorageState(
|
|
14351
|
+
"noya-multiplayer-react-show-git",
|
|
14352
|
+
false
|
|
14353
|
+
);
|
|
14022
14354
|
const [showSimulation, setShowSimulation] = useLocalStorageState(
|
|
14023
14355
|
"noya-multiplayer-react-show-simulation",
|
|
14024
14356
|
false
|
|
@@ -14029,7 +14361,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14029
14361
|
paused: connectionEventsPaused,
|
|
14030
14362
|
togglePaused: toggleConnectionEventsPaused
|
|
14031
14363
|
} = usePausedStream(connectionEvents);
|
|
14032
|
-
|
|
14364
|
+
useEffect14(() => {
|
|
14033
14365
|
if (eventsContainerRef.current) {
|
|
14034
14366
|
eventsContainerRef.current.scrollTop = eventsContainerRef.current.scrollHeight;
|
|
14035
14367
|
}
|
|
@@ -14048,13 +14380,13 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14048
14380
|
paused: serverSimulationLogsPaused,
|
|
14049
14381
|
togglePaused: toggleServerSimulationLogsPaused
|
|
14050
14382
|
} = usePausedStream(serverSimulationLogs);
|
|
14051
|
-
|
|
14383
|
+
useEffect14(() => {
|
|
14052
14384
|
if (!showServerLogs) return;
|
|
14053
14385
|
if (serverLogsContainerRef.current) {
|
|
14054
14386
|
serverLogsContainerRef.current.scrollTop = serverLogsContainerRef.current.scrollHeight;
|
|
14055
14387
|
}
|
|
14056
14388
|
}, [showServerLogs, visibleServerLogs]);
|
|
14057
|
-
|
|
14389
|
+
useEffect14(() => {
|
|
14058
14390
|
if (!showServerSimulationLogs) return;
|
|
14059
14391
|
if (serverSimulationLogsContainerRef.current) {
|
|
14060
14392
|
serverSimulationLogsContainerRef.current.scrollTop = serverSimulationLogsContainerRef.current.scrollHeight;
|
|
@@ -14118,7 +14450,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14118
14450
|
}, [noyaManager]);
|
|
14119
14451
|
if (!didMount) return null;
|
|
14120
14452
|
if (!showInspector) {
|
|
14121
|
-
return /* @__PURE__ */
|
|
14453
|
+
return /* @__PURE__ */ React34.createElement(
|
|
14122
14454
|
"div",
|
|
14123
14455
|
{
|
|
14124
14456
|
...props,
|
|
@@ -14130,7 +14462,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14130
14462
|
},
|
|
14131
14463
|
onClick: () => setShowInspector(true)
|
|
14132
14464
|
},
|
|
14133
|
-
/* @__PURE__ */
|
|
14465
|
+
/* @__PURE__ */ React34.createElement(
|
|
14134
14466
|
StateInspectorToggleButton,
|
|
14135
14467
|
{
|
|
14136
14468
|
showInspector,
|
|
@@ -14141,7 +14473,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14141
14473
|
)
|
|
14142
14474
|
);
|
|
14143
14475
|
}
|
|
14144
|
-
return /* @__PURE__ */
|
|
14476
|
+
return /* @__PURE__ */ React34.createElement(
|
|
14145
14477
|
"div",
|
|
14146
14478
|
{
|
|
14147
14479
|
...props,
|
|
@@ -14150,7 +14482,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14150
14482
|
...props.style
|
|
14151
14483
|
}
|
|
14152
14484
|
},
|
|
14153
|
-
/* @__PURE__ */
|
|
14485
|
+
/* @__PURE__ */ React34.createElement(
|
|
14154
14486
|
StateInspectorDisclosureSection,
|
|
14155
14487
|
{
|
|
14156
14488
|
isFirst: true,
|
|
@@ -14163,14 +14495,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14163
14495
|
maxHeight: "50%",
|
|
14164
14496
|
overflowY: "auto"
|
|
14165
14497
|
},
|
|
14166
|
-
right: /* @__PURE__ */
|
|
14498
|
+
right: /* @__PURE__ */ React34.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React34.createElement(
|
|
14167
14499
|
StateInspectorButton,
|
|
14168
14500
|
{
|
|
14169
14501
|
theme: theme3,
|
|
14170
14502
|
onClick: () => setShowUserDetails(!showUserDetails)
|
|
14171
14503
|
},
|
|
14172
14504
|
"Toggle details"
|
|
14173
|
-
), /* @__PURE__ */
|
|
14505
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14174
14506
|
StateInspectorToggleButton,
|
|
14175
14507
|
{
|
|
14176
14508
|
showInspector,
|
|
@@ -14180,8 +14512,8 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14180
14512
|
}
|
|
14181
14513
|
))
|
|
14182
14514
|
},
|
|
14183
|
-
/* @__PURE__ */
|
|
14184
|
-
return /* @__PURE__ */
|
|
14515
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, { style: { flex: "0 0 auto" } }, connectedUsers?.filter((user) => showUserDetails || !user.inactive).map((user, index, array) => {
|
|
14516
|
+
return /* @__PURE__ */ React34.createElement(
|
|
14185
14517
|
StateInspectorRow,
|
|
14186
14518
|
{
|
|
14187
14519
|
key: user.connectionId,
|
|
@@ -14192,7 +14524,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14192
14524
|
opacity: user.inactive ? 0.5 : 1
|
|
14193
14525
|
}
|
|
14194
14526
|
},
|
|
14195
|
-
user.image && /* @__PURE__ */
|
|
14527
|
+
user.image && /* @__PURE__ */ React34.createElement(
|
|
14196
14528
|
"img",
|
|
14197
14529
|
{
|
|
14198
14530
|
src: user.image,
|
|
@@ -14209,9 +14541,9 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14209
14541
|
}
|
|
14210
14542
|
}
|
|
14211
14543
|
),
|
|
14212
|
-
showUserDetails ? /* @__PURE__ */
|
|
14544
|
+
showUserDetails ? /* @__PURE__ */ React34.createElement(themedObjectInspector, { data: user, theme: theme3 }) : user.name
|
|
14213
14545
|
);
|
|
14214
|
-
}), !connectedUsers && /* @__PURE__ */
|
|
14546
|
+
}), !connectedUsers && /* @__PURE__ */ React34.createElement(
|
|
14215
14547
|
"div",
|
|
14216
14548
|
{
|
|
14217
14549
|
style: {
|
|
@@ -14222,13 +14554,13 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14222
14554
|
gap: "4px"
|
|
14223
14555
|
}
|
|
14224
14556
|
},
|
|
14225
|
-
/* @__PURE__ */
|
|
14557
|
+
/* @__PURE__ */ React34.createElement("span", null, "No connected users")
|
|
14226
14558
|
))
|
|
14227
14559
|
),
|
|
14228
|
-
/* @__PURE__ */
|
|
14560
|
+
/* @__PURE__ */ React34.createElement(
|
|
14229
14561
|
StateInspectorDisclosureSection,
|
|
14230
14562
|
{
|
|
14231
|
-
title: /* @__PURE__ */
|
|
14563
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Data", /* @__PURE__ */ React34.createElement(
|
|
14232
14564
|
ColoredDot,
|
|
14233
14565
|
{
|
|
14234
14566
|
type: multipeerStateInitialized ? "success" : "error"
|
|
@@ -14237,7 +14569,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14237
14569
|
colorScheme,
|
|
14238
14570
|
setOpen: setShowData,
|
|
14239
14571
|
open: showData,
|
|
14240
|
-
right: /* @__PURE__ */
|
|
14572
|
+
right: /* @__PURE__ */ React34.createElement(
|
|
14241
14573
|
"span",
|
|
14242
14574
|
{
|
|
14243
14575
|
style: {
|
|
@@ -14245,9 +14577,9 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14245
14577
|
gap: "12px"
|
|
14246
14578
|
}
|
|
14247
14579
|
},
|
|
14248
|
-
/* @__PURE__ */
|
|
14249
|
-
/* @__PURE__ */
|
|
14250
|
-
/* @__PURE__ */
|
|
14580
|
+
/* @__PURE__ */ React34.createElement(StateInspectorButton, { theme: theme3, onClick: handleImportAll }, "Import"),
|
|
14581
|
+
/* @__PURE__ */ React34.createElement(StateInspectorButton, { theme: theme3, onClick: handleExportAll }, "Export"),
|
|
14582
|
+
/* @__PURE__ */ React34.createElement(
|
|
14251
14583
|
StateInspectorButton,
|
|
14252
14584
|
{
|
|
14253
14585
|
theme: theme3,
|
|
@@ -14259,14 +14591,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14259
14591
|
)
|
|
14260
14592
|
)
|
|
14261
14593
|
},
|
|
14262
|
-
/* @__PURE__ */
|
|
14594
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, /* @__PURE__ */ React34.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14263
14595
|
themedObjectInspector,
|
|
14264
14596
|
{
|
|
14265
14597
|
name: multiplayerStateManager.schema ? "state" : void 0,
|
|
14266
14598
|
data: state,
|
|
14267
14599
|
theme: theme3
|
|
14268
14600
|
}
|
|
14269
|
-
)), multiplayerStateManager.schema && /* @__PURE__ */
|
|
14601
|
+
)), multiplayerStateManager.schema && /* @__PURE__ */ React34.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14270
14602
|
themedObjectInspector,
|
|
14271
14603
|
{
|
|
14272
14604
|
name: "schema",
|
|
@@ -14275,7 +14607,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14275
14607
|
}
|
|
14276
14608
|
)))
|
|
14277
14609
|
),
|
|
14278
|
-
/* @__PURE__ */
|
|
14610
|
+
/* @__PURE__ */ React34.createElement(
|
|
14279
14611
|
HistorySection,
|
|
14280
14612
|
{
|
|
14281
14613
|
showHistory,
|
|
@@ -14285,14 +14617,14 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14285
14617
|
multiplayerStateManager
|
|
14286
14618
|
}
|
|
14287
14619
|
),
|
|
14288
|
-
/* @__PURE__ */
|
|
14620
|
+
/* @__PURE__ */ React34.createElement(
|
|
14289
14621
|
StateInspectorDisclosureSection,
|
|
14290
14622
|
{
|
|
14291
14623
|
open: showAssets,
|
|
14292
14624
|
setOpen: setShowAssets,
|
|
14293
|
-
title: /* @__PURE__ */
|
|
14625
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Assets (", assets.length, ")", /* @__PURE__ */ React34.createElement(ColoredDot, { type: assetsInitialized ? "success" : "error" })),
|
|
14294
14626
|
colorScheme,
|
|
14295
|
-
right: /* @__PURE__ */
|
|
14627
|
+
right: /* @__PURE__ */ React34.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React34.createElement(
|
|
14296
14628
|
StateInspectorButton,
|
|
14297
14629
|
{
|
|
14298
14630
|
theme: theme3,
|
|
@@ -14307,7 +14639,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14307
14639
|
}
|
|
14308
14640
|
},
|
|
14309
14641
|
"Delete all"
|
|
14310
|
-
), /* @__PURE__ */
|
|
14642
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14311
14643
|
StateInspectorButton,
|
|
14312
14644
|
{
|
|
14313
14645
|
theme: theme3,
|
|
@@ -14320,54 +14652,69 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14320
14652
|
}
|
|
14321
14653
|
},
|
|
14322
14654
|
"Reload"
|
|
14323
|
-
), /* @__PURE__ */
|
|
14655
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14324
14656
|
StateInspectorButton,
|
|
14325
14657
|
{
|
|
14326
14658
|
theme: theme3,
|
|
14327
|
-
onClick: () => {
|
|
14328
|
-
const
|
|
14329
|
-
|
|
14330
|
-
input.onchange = () => {
|
|
14331
|
-
const file = input.files?.[0];
|
|
14332
|
-
if (file) {
|
|
14333
|
-
const reader = new FileReader();
|
|
14334
|
-
reader.onload = () => {
|
|
14335
|
-
const buffer = reader.result;
|
|
14336
|
-
assetManager.create(new Uint8Array(buffer));
|
|
14337
|
-
};
|
|
14338
|
-
reader.readAsArrayBuffer(file);
|
|
14339
|
-
}
|
|
14340
|
-
};
|
|
14341
|
-
input.click();
|
|
14659
|
+
onClick: async () => {
|
|
14660
|
+
const file = await uploadFile();
|
|
14661
|
+
assetManager.create(file);
|
|
14342
14662
|
}
|
|
14343
14663
|
},
|
|
14344
14664
|
"Upload"
|
|
14665
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14666
|
+
StateInspectorButton,
|
|
14667
|
+
{
|
|
14668
|
+
theme: theme3,
|
|
14669
|
+
onClick: async () => {
|
|
14670
|
+
const file = await uploadFile();
|
|
14671
|
+
assetManager.create({
|
|
14672
|
+
data: new Uint8Array(await file.arrayBuffer()),
|
|
14673
|
+
contentType: file.type,
|
|
14674
|
+
mode: "mutable"
|
|
14675
|
+
});
|
|
14676
|
+
}
|
|
14677
|
+
},
|
|
14678
|
+
"Upload Mutable"
|
|
14345
14679
|
))
|
|
14346
14680
|
},
|
|
14347
|
-
/* @__PURE__ */
|
|
14681
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, assets.map((asset) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key: asset.id, colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14348
14682
|
themedObjectInspector,
|
|
14349
14683
|
{
|
|
14350
14684
|
name: asset.id,
|
|
14351
14685
|
data: truncateAsset(asset),
|
|
14352
14686
|
theme: theme3
|
|
14353
14687
|
}
|
|
14354
|
-
), /* @__PURE__ */
|
|
14688
|
+
), /* @__PURE__ */ React34.createElement("div", { style: { display: "flex", gap: "4px" } }, asset.mode === "mutable" && /* @__PURE__ */ React34.createElement(
|
|
14689
|
+
StateInspectorButton,
|
|
14690
|
+
{
|
|
14691
|
+
theme: theme3,
|
|
14692
|
+
onClick: async () => {
|
|
14693
|
+
const file = await uploadFile();
|
|
14694
|
+
assetManager.update(asset.id, {
|
|
14695
|
+
data: new Uint8Array(await file.arrayBuffer()),
|
|
14696
|
+
contentType: file.type
|
|
14697
|
+
});
|
|
14698
|
+
}
|
|
14699
|
+
},
|
|
14700
|
+
"Replace"
|
|
14701
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14355
14702
|
StateInspectorButton,
|
|
14356
14703
|
{
|
|
14357
14704
|
theme: theme3,
|
|
14358
14705
|
onClick: () => assetManager.delete(asset.id)
|
|
14359
14706
|
},
|
|
14360
14707
|
"Delete"
|
|
14361
|
-
))))
|
|
14708
|
+
)))))
|
|
14362
14709
|
),
|
|
14363
|
-
advanced && /* @__PURE__ */
|
|
14710
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14364
14711
|
StateInspectorDisclosureSection,
|
|
14365
14712
|
{
|
|
14366
|
-
title: /* @__PURE__ */
|
|
14713
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Resources (", resources.length, ")", /* @__PURE__ */ React34.createElement(ColoredDot, { type: resourcesInitialized ? "success" : "error" })),
|
|
14367
14714
|
colorScheme,
|
|
14368
14715
|
open: showResources,
|
|
14369
14716
|
setOpen: setShowResources,
|
|
14370
|
-
right: /* @__PURE__ */
|
|
14717
|
+
right: /* @__PURE__ */ React34.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React34.createElement(
|
|
14371
14718
|
StateInspectorButton,
|
|
14372
14719
|
{
|
|
14373
14720
|
theme: theme3,
|
|
@@ -14382,7 +14729,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14382
14729
|
}
|
|
14383
14730
|
},
|
|
14384
14731
|
"Delete all"
|
|
14385
|
-
), /* @__PURE__ */
|
|
14732
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14386
14733
|
StateInspectorButton,
|
|
14387
14734
|
{
|
|
14388
14735
|
theme: theme3,
|
|
@@ -14395,7 +14742,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14395
14742
|
}
|
|
14396
14743
|
},
|
|
14397
14744
|
"Create Directory"
|
|
14398
|
-
), /* @__PURE__ */
|
|
14745
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14399
14746
|
StateInspectorButton,
|
|
14400
14747
|
{
|
|
14401
14748
|
theme: theme3,
|
|
@@ -14415,21 +14762,21 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14415
14762
|
"Create Asset"
|
|
14416
14763
|
))
|
|
14417
14764
|
},
|
|
14418
|
-
/* @__PURE__ */
|
|
14765
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, resources?.map((resource) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key: resource.id, colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14419
14766
|
themedObjectInspector,
|
|
14420
14767
|
{
|
|
14421
14768
|
name: resource.path,
|
|
14422
14769
|
data: resource,
|
|
14423
14770
|
theme: theme3
|
|
14424
14771
|
}
|
|
14425
|
-
), /* @__PURE__ */
|
|
14772
|
+
), /* @__PURE__ */ React34.createElement("div", { style: { display: "flex", gap: "4px" } }, /* @__PURE__ */ React34.createElement(
|
|
14426
14773
|
StateInspectorButton,
|
|
14427
14774
|
{
|
|
14428
14775
|
theme: theme3,
|
|
14429
14776
|
onClick: () => resourceManager.deleteResource({ id: resource.id })
|
|
14430
14777
|
},
|
|
14431
14778
|
"Delete"
|
|
14432
|
-
), /* @__PURE__ */
|
|
14779
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14433
14780
|
StateInspectorButton,
|
|
14434
14781
|
{
|
|
14435
14782
|
theme: theme3,
|
|
@@ -14442,14 +14789,23 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14442
14789
|
"Rename"
|
|
14443
14790
|
)))))
|
|
14444
14791
|
),
|
|
14445
|
-
advanced && /* @__PURE__ */
|
|
14792
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14446
14793
|
StateInspectorDisclosureSection,
|
|
14447
14794
|
{
|
|
14448
|
-
title: /* @__PURE__ */
|
|
14795
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Secrets (", secrets.length, ")", /* @__PURE__ */ React34.createElement(ColoredDot, { type: secretsInitialized ? "success" : "error" })),
|
|
14449
14796
|
colorScheme,
|
|
14450
14797
|
open: showSecrets,
|
|
14451
14798
|
setOpen: setShowSecrets,
|
|
14452
|
-
right: /* @__PURE__ */
|
|
14799
|
+
right: /* @__PURE__ */ React34.createElement("span", { style: { display: "flex", gap: "10px" } }, /* @__PURE__ */ React34.createElement(
|
|
14800
|
+
StateInspectorButton,
|
|
14801
|
+
{
|
|
14802
|
+
theme: theme3,
|
|
14803
|
+
onClick: () => {
|
|
14804
|
+
void secretManager.fetchSecrets();
|
|
14805
|
+
}
|
|
14806
|
+
},
|
|
14807
|
+
"Refresh"
|
|
14808
|
+
), /* @__PURE__ */ React34.createElement(
|
|
14453
14809
|
StateInspectorButton,
|
|
14454
14810
|
{
|
|
14455
14811
|
theme: theme3,
|
|
@@ -14462,9 +14818,9 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14462
14818
|
}
|
|
14463
14819
|
},
|
|
14464
14820
|
"Create"
|
|
14465
|
-
)
|
|
14821
|
+
))
|
|
14466
14822
|
},
|
|
14467
|
-
/* @__PURE__ */
|
|
14823
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, secrets.map((secret) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key: secret.id, colorScheme }, /* @__PURE__ */ React34.createElement(themedObjectInspector, { data: secret, theme: theme3 }), /* @__PURE__ */ React34.createElement(
|
|
14468
14824
|
StateInspectorButton,
|
|
14469
14825
|
{
|
|
14470
14826
|
theme: theme3,
|
|
@@ -14473,15 +14829,24 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14473
14829
|
"Delete"
|
|
14474
14830
|
))))
|
|
14475
14831
|
),
|
|
14476
|
-
advanced && /* @__PURE__ */
|
|
14832
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14833
|
+
GitSection,
|
|
14834
|
+
{
|
|
14835
|
+
showGit,
|
|
14836
|
+
setShowGit,
|
|
14837
|
+
colorScheme,
|
|
14838
|
+
gitManager
|
|
14839
|
+
}
|
|
14840
|
+
),
|
|
14841
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14477
14842
|
StateInspectorDisclosureSection,
|
|
14478
14843
|
{
|
|
14479
14844
|
open: showInputs,
|
|
14480
14845
|
setOpen: setShowInputs,
|
|
14481
|
-
title: /* @__PURE__ */
|
|
14846
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Inputs (", inputs.length, ")", /* @__PURE__ */ React34.createElement(ColoredDot, { type: inputsInitialized ? "success" : "error" })),
|
|
14482
14847
|
colorScheme
|
|
14483
14848
|
},
|
|
14484
|
-
/* @__PURE__ */
|
|
14849
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, inputs?.map((input) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key: input.id, colorScheme }, /* @__PURE__ */ React34.createElement(themedObjectInspector, { data: input, theme: theme3 }))), !inputs?.length && /* @__PURE__ */ React34.createElement(
|
|
14485
14850
|
"div",
|
|
14486
14851
|
{
|
|
14487
14852
|
style: {
|
|
@@ -14492,15 +14857,15 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14492
14857
|
gap: "4px"
|
|
14493
14858
|
}
|
|
14494
14859
|
},
|
|
14495
|
-
/* @__PURE__ */
|
|
14860
|
+
/* @__PURE__ */ React34.createElement("span", null, "No inputs")
|
|
14496
14861
|
))
|
|
14497
14862
|
),
|
|
14498
|
-
advanced && /* @__PURE__ */
|
|
14863
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14499
14864
|
StateInspectorDisclosureSection,
|
|
14500
14865
|
{
|
|
14501
14866
|
open: showOutputTransforms,
|
|
14502
14867
|
setOpen: setShowOutputTransforms,
|
|
14503
|
-
title: /* @__PURE__ */
|
|
14868
|
+
title: /* @__PURE__ */ React34.createElement(StateInspectorTitleLabel, null, "Output Transforms (", outputTransforms.length, ")", /* @__PURE__ */ React34.createElement(
|
|
14504
14869
|
ColoredDot,
|
|
14505
14870
|
{
|
|
14506
14871
|
type: outputTransformsInitialized ? "success" : "error"
|
|
@@ -14508,7 +14873,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14508
14873
|
)),
|
|
14509
14874
|
colorScheme
|
|
14510
14875
|
},
|
|
14511
|
-
/* @__PURE__ */
|
|
14876
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, outputTransforms?.map((transform) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key: transform.id, colorScheme }, /* @__PURE__ */ React34.createElement(themedObjectInspector, { data: transform, theme: theme3 }))), !outputTransforms?.length && /* @__PURE__ */ React34.createElement(
|
|
14512
14877
|
"div",
|
|
14513
14878
|
{
|
|
14514
14879
|
style: {
|
|
@@ -14519,10 +14884,10 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14519
14884
|
gap: "4px"
|
|
14520
14885
|
}
|
|
14521
14886
|
},
|
|
14522
|
-
/* @__PURE__ */
|
|
14887
|
+
/* @__PURE__ */ React34.createElement("span", null, "No output transforms")
|
|
14523
14888
|
))
|
|
14524
14889
|
),
|
|
14525
|
-
advanced && /* @__PURE__ */
|
|
14890
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14526
14891
|
StateInspectorDisclosureSection,
|
|
14527
14892
|
{
|
|
14528
14893
|
title: "Tasks",
|
|
@@ -14530,7 +14895,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14530
14895
|
open: showTasks,
|
|
14531
14896
|
setOpen: setShowTasks
|
|
14532
14897
|
},
|
|
14533
|
-
/* @__PURE__ */
|
|
14898
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, tasks?.map((task) => /* @__PURE__ */ React34.createElement(
|
|
14534
14899
|
StateInspectorRow,
|
|
14535
14900
|
{
|
|
14536
14901
|
key: task.id,
|
|
@@ -14539,7 +14904,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14539
14904
|
backgroundColor: task.status === "done" ? "rgba(0,255,0,0.2)" : task.status === "error" ? "rgba(255,0,0,0.2)" : void 0
|
|
14540
14905
|
}
|
|
14541
14906
|
},
|
|
14542
|
-
/* @__PURE__ */
|
|
14907
|
+
/* @__PURE__ */ React34.createElement(
|
|
14543
14908
|
themedObjectInspector,
|
|
14544
14909
|
{
|
|
14545
14910
|
name: task.name,
|
|
@@ -14549,7 +14914,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14549
14914
|
)
|
|
14550
14915
|
)))
|
|
14551
14916
|
),
|
|
14552
|
-
/* @__PURE__ */
|
|
14917
|
+
/* @__PURE__ */ React34.createElement(
|
|
14553
14918
|
StateInspectorDisclosureSection,
|
|
14554
14919
|
{
|
|
14555
14920
|
open: showShared,
|
|
@@ -14557,7 +14922,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14557
14922
|
title: "Shared Connection Data",
|
|
14558
14923
|
colorScheme
|
|
14559
14924
|
},
|
|
14560
|
-
/* @__PURE__ */
|
|
14925
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, Object.entries(shared).map(([key, value]) => /* @__PURE__ */ React34.createElement(StateInspectorRow, { key, colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14561
14926
|
themedObjectInspector,
|
|
14562
14927
|
{
|
|
14563
14928
|
name: key,
|
|
@@ -14567,7 +14932,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14567
14932
|
}
|
|
14568
14933
|
))))
|
|
14569
14934
|
),
|
|
14570
|
-
/* @__PURE__ */
|
|
14935
|
+
/* @__PURE__ */ React34.createElement(
|
|
14571
14936
|
ServerScriptLogsSection,
|
|
14572
14937
|
{
|
|
14573
14938
|
colorScheme,
|
|
@@ -14579,7 +14944,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14579
14944
|
containerRef: serverLogsContainerRef
|
|
14580
14945
|
}
|
|
14581
14946
|
),
|
|
14582
|
-
showSimulationLogsSection && /* @__PURE__ */
|
|
14947
|
+
showSimulationLogsSection && /* @__PURE__ */ React34.createElement(
|
|
14583
14948
|
ServerScriptLogsSection,
|
|
14584
14949
|
{
|
|
14585
14950
|
title: "Server Script Simulation Logs",
|
|
@@ -14592,7 +14957,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14592
14957
|
containerRef: serverSimulationLogsContainerRef
|
|
14593
14958
|
}
|
|
14594
14959
|
),
|
|
14595
|
-
/* @__PURE__ */
|
|
14960
|
+
/* @__PURE__ */ React34.createElement(
|
|
14596
14961
|
StateInspectorDisclosureSection,
|
|
14597
14962
|
{
|
|
14598
14963
|
open: showSimulation,
|
|
@@ -14600,7 +14965,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14600
14965
|
title: "Server Simulation",
|
|
14601
14966
|
colorScheme
|
|
14602
14967
|
},
|
|
14603
|
-
/* @__PURE__ */
|
|
14968
|
+
/* @__PURE__ */ React34.createElement(StateInspectorDisclosureRowInner, null, /* @__PURE__ */ React34.createElement(StateInspectorRow, { colorScheme }, /* @__PURE__ */ React34.createElement(
|
|
14604
14969
|
themedObjectInspector,
|
|
14605
14970
|
{
|
|
14606
14971
|
name: "status",
|
|
@@ -14616,7 +14981,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14616
14981
|
}
|
|
14617
14982
|
)))
|
|
14618
14983
|
),
|
|
14619
|
-
advanced && /* @__PURE__ */
|
|
14984
|
+
advanced && /* @__PURE__ */ React34.createElement(
|
|
14620
14985
|
ActivityEventsSection,
|
|
14621
14986
|
{
|
|
14622
14987
|
colorScheme,
|
|
@@ -14626,7 +14991,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14626
14991
|
activityEventsManager
|
|
14627
14992
|
}
|
|
14628
14993
|
),
|
|
14629
|
-
/* @__PURE__ */
|
|
14994
|
+
/* @__PURE__ */ React34.createElement(
|
|
14630
14995
|
EventsSection,
|
|
14631
14996
|
{
|
|
14632
14997
|
connectionEvents: visibleConnectionEvents,
|
|
@@ -14640,7 +15005,7 @@ var StateInspector = memoGeneric(function StateInspector2({
|
|
|
14640
15005
|
)
|
|
14641
15006
|
);
|
|
14642
15007
|
});
|
|
14643
|
-
var truncateAsset =
|
|
15008
|
+
var truncateAsset = memoize((asset) => {
|
|
14644
15009
|
if (asset.url.startsWith("data:") || asset.url.startsWith("blob:")) {
|
|
14645
15010
|
return { ...asset, url: ellipsis(asset.url, 40) };
|
|
14646
15011
|
}
|
|
@@ -14657,15 +15022,15 @@ function useManagedHistory(stateManager) {
|
|
|
14657
15022
|
}
|
|
14658
15023
|
|
|
14659
15024
|
// ../noya-multiplayer-react/src/singleton.tsx
|
|
14660
|
-
import
|
|
15025
|
+
import React36 from "react";
|
|
14661
15026
|
|
|
14662
15027
|
// ../noya-multiplayer-react/src/NoyaStateContext.tsx
|
|
14663
15028
|
var AnyNoyaStateContext = createContext3(void 0);
|
|
14664
15029
|
var emptyArray = [];
|
|
14665
15030
|
function useActivityEventsForManager(streamFilter, activityEventsManager) {
|
|
14666
|
-
const [streamId, setStreamId] =
|
|
15031
|
+
const [streamId, setStreamId] = useState18(void 0);
|
|
14667
15032
|
const stableStreamFilter = useJsonMemo(streamFilter);
|
|
14668
|
-
|
|
15033
|
+
useEffect17(() => {
|
|
14669
15034
|
if (!stableStreamFilter) return;
|
|
14670
15035
|
const streamId2 = activityEventsManager.subscribe(stableStreamFilter);
|
|
14671
15036
|
setStreamId(streamId2);
|
|
@@ -14679,8 +15044,8 @@ function useActivityEventsForManager(streamFilter, activityEventsManager) {
|
|
|
14679
15044
|
}
|
|
14680
15045
|
|
|
14681
15046
|
// ../noya-multiplayer-react/src/components/UserPointersOverlay.tsx
|
|
14682
|
-
import { Observable as
|
|
14683
|
-
import
|
|
15047
|
+
import { Observable as Observable24 } from "@noya-app/observable";
|
|
15048
|
+
import React38, { useEffect as useEffect19, useMemo as useMemo12, useState as useState19 } from "react";
|
|
14684
15049
|
function shouldShow(hideAfter, updatedAt) {
|
|
14685
15050
|
return !!updatedAt && Date.now() - updatedAt < hideAfter;
|
|
14686
15051
|
}
|
|
@@ -14693,15 +15058,15 @@ var UserPointerInternal = memoGeneric(function UserPointerInternal2({
|
|
|
14693
15058
|
const observable = useMemo12(() => {
|
|
14694
15059
|
const metadata$ = sharedConnectionDataManager.metadata$.observePath([user.connectionId]).throttle(50);
|
|
14695
15060
|
const data$ = sharedConnectionDataManager.data$.observePath([user.connectionId]).throttle(50);
|
|
14696
|
-
return
|
|
15061
|
+
return Observable24.combine([metadata$, data$], ([metadata2, data2]) => {
|
|
14697
15062
|
return { metadata: metadata2, data: data2 };
|
|
14698
15063
|
});
|
|
14699
15064
|
}, [sharedConnectionDataManager, user.connectionId]);
|
|
14700
15065
|
const { metadata, data } = useObservable2(observable);
|
|
14701
|
-
const [, setForceUpdate] =
|
|
15066
|
+
const [, setForceUpdate] = useState19(0);
|
|
14702
15067
|
const updatedAt = metadata?.updatedAt ?? 0;
|
|
14703
15068
|
const show = shouldShow(hideAfter, updatedAt);
|
|
14704
|
-
|
|
15069
|
+
useEffect19(() => {
|
|
14705
15070
|
if (!show) return;
|
|
14706
15071
|
const timeoutId = setTimeout(() => {
|
|
14707
15072
|
setForceUpdate((prev) => prev + 1);
|
|
@@ -14725,9 +15090,9 @@ var UserPointersOverlay = memoGeneric(function UserPointers({
|
|
|
14725
15090
|
sharedConnectionDataManager.currentConnectionId$
|
|
14726
15091
|
);
|
|
14727
15092
|
const connectedUsers = useObservable2(userManager.connectedUsers$);
|
|
14728
|
-
return /* @__PURE__ */
|
|
15093
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, connectedUsers.map((user) => {
|
|
14729
15094
|
if (user.connectionId === currentConnectionId) return null;
|
|
14730
|
-
return /* @__PURE__ */
|
|
15095
|
+
return /* @__PURE__ */ React38.createElement(
|
|
14731
15096
|
UserPointerInternal,
|
|
14732
15097
|
{
|
|
14733
15098
|
key: user.connectionId,
|
|
@@ -14743,7 +15108,7 @@ var UserPointersOverlay = memoGeneric(function UserPointers({
|
|
|
14743
15108
|
import {
|
|
14744
15109
|
RefetchableObservable
|
|
14745
15110
|
} from "@noya-app/observable-store";
|
|
14746
|
-
import { useCallback as useCallback15, useEffect as
|
|
15111
|
+
import { useCallback as useCallback15, useEffect as useEffect20, useMemo as useMemo13 } from "react";
|
|
14747
15112
|
function useTable(table, {
|
|
14748
15113
|
where,
|
|
14749
15114
|
select
|
|
@@ -14787,7 +15152,7 @@ function useTable(table, {
|
|
|
14787
15152
|
}
|
|
14788
15153
|
);
|
|
14789
15154
|
}, [stableSelect, stableWhere, table, options.policy, options.debug]);
|
|
14790
|
-
|
|
15155
|
+
useEffect20(() => {
|
|
14791
15156
|
observable.start?.();
|
|
14792
15157
|
}, [observable]);
|
|
14793
15158
|
const { status, data } = useObservable2(observable);
|
|
@@ -14886,11 +15251,6 @@ export {
|
|
|
14886
15251
|
useActivityEventsList,
|
|
14887
15252
|
useFileList,
|
|
14888
15253
|
useFileListItem,
|
|
14889
|
-
useGeneratedComponentDescription,
|
|
14890
|
-
useGeneratedComponentDescriptions,
|
|
14891
|
-
useGeneratedComponentNames,
|
|
14892
|
-
useGeneratedPageComponentNames,
|
|
14893
|
-
useGeneratedPageNames,
|
|
14894
15254
|
useIsBeta,
|
|
14895
15255
|
useMetadata,
|
|
14896
15256
|
useNetworkRequests,
|
|
@@ -14922,8 +15282,6 @@ export {
|
|
|
14922
15282
|
useOptionalNoyaTags,
|
|
14923
15283
|
useOptionalNoyaTools,
|
|
14924
15284
|
useOptionalNoyaUserData,
|
|
14925
|
-
useRandomIcons,
|
|
14926
|
-
useRandomImages,
|
|
14927
15285
|
useResourcesList,
|
|
14928
15286
|
useTable,
|
|
14929
15287
|
useUser
|