@noya-app/noya-multiplayer-react 0.1.87 → 0.1.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +17 -0
- package/dist/index.bundle.js +29 -25
- package/dist/index.d.mts +124 -4
- package/dist/index.d.ts +124 -4
- package/dist/index.js +73 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/useResourceUrl.ts +4 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _noya_app_state_manager from '@noya-app/state-manager';
|
|
2
|
-
import { AIToolDefinition, UserManager, SharedConnectionDataManager, NoyaManager, StateManagerOptions, StateManager, NoyaManagerOptions, SyncAdapter, TSchema, AccessType, PolicyAuthContext, LocalStorageSyncOptions, Static, ExtractRequestBody, PublishCallback, ResourceManager, TranscriptionManager, AssetTranscriptionResult, StreamFilter, ActivityEventsManager, MultiplayerPatchMetadata, SafeEval, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
2
|
+
import { AIToolDefinition, UserManager, SharedConnectionDataManager, NoyaManager, StateManagerOptions, StateManager, NoyaManagerOptions, SyncAdapter, TSchema, AccessType, PolicyAuthContext, LocalStorageSyncOptions, Static, ExtractRequestBody, PublishCallback, ResourceManager, TranscriptionManager, AssetTranscriptionResult, StreamFilter, ActivityEventsManager, MultiplayerPatchMetadata, SafeEval, CreateParams, MultiplayerStateManager, ResourceUrlOptions, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
3
3
|
export * from '@noya-app/state-manager';
|
|
4
4
|
import React, { SetStateAction, ComponentProps, Dispatch } from 'react';
|
|
5
5
|
import { Asset, ResourceCreate, CreateResourceParametersWithoutAccessibleByFileId, ModifiedResource, Resource, MediaItem, ResourceMap, ResourceCreateMap, OutputTransform, Input } from '@noya-app/noya-schemas';
|
|
@@ -342,9 +342,69 @@ declare function useInputs(): ({
|
|
|
342
342
|
} | {
|
|
343
343
|
type: "null";
|
|
344
344
|
_kind: "Null";
|
|
345
|
-
} | any | any
|
|
345
|
+
} | any | any | {
|
|
346
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
347
|
+
_kind: "Literal";
|
|
348
|
+
const: string | number | boolean | null;
|
|
349
|
+
} | {
|
|
350
|
+
default?: any;
|
|
351
|
+
discriminator?: string | undefined;
|
|
352
|
+
_kind: "Union";
|
|
353
|
+
anyOf: ({
|
|
354
|
+
default?: string | undefined;
|
|
355
|
+
type: "string";
|
|
356
|
+
_kind: "String";
|
|
357
|
+
} | {
|
|
358
|
+
default?: number | undefined;
|
|
359
|
+
minimum?: number | undefined;
|
|
360
|
+
maximum?: number | undefined;
|
|
361
|
+
type: "number";
|
|
362
|
+
_kind: "Number";
|
|
363
|
+
} | {
|
|
364
|
+
default?: boolean | undefined;
|
|
365
|
+
type: "boolean";
|
|
366
|
+
_kind: "Boolean";
|
|
367
|
+
} | {
|
|
368
|
+
type: "null";
|
|
369
|
+
_kind: "Null";
|
|
370
|
+
} | any | any | {
|
|
371
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
372
|
+
_kind: "Literal";
|
|
373
|
+
const: string | number | boolean | null;
|
|
374
|
+
} | any)[];
|
|
375
|
+
};
|
|
346
376
|
};
|
|
347
377
|
_kind: "Object";
|
|
378
|
+
} | {
|
|
379
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
380
|
+
_kind: "Literal";
|
|
381
|
+
const: string | number | boolean | null;
|
|
382
|
+
} | {
|
|
383
|
+
default?: any;
|
|
384
|
+
discriminator?: string | undefined;
|
|
385
|
+
_kind: "Union";
|
|
386
|
+
anyOf: ({
|
|
387
|
+
default?: string | undefined;
|
|
388
|
+
type: "string";
|
|
389
|
+
_kind: "String";
|
|
390
|
+
} | {
|
|
391
|
+
default?: number | undefined;
|
|
392
|
+
minimum?: number | undefined;
|
|
393
|
+
maximum?: number | undefined;
|
|
394
|
+
type: "number";
|
|
395
|
+
_kind: "Number";
|
|
396
|
+
} | {
|
|
397
|
+
default?: boolean | undefined;
|
|
398
|
+
type: "boolean";
|
|
399
|
+
_kind: "Boolean";
|
|
400
|
+
} | {
|
|
401
|
+
type: "null";
|
|
402
|
+
_kind: "Null";
|
|
403
|
+
} | any | any | {
|
|
404
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
405
|
+
_kind: "Literal";
|
|
406
|
+
const: string | number | boolean | null;
|
|
407
|
+
} | any)[];
|
|
348
408
|
};
|
|
349
409
|
} | {
|
|
350
410
|
required?: string[] | undefined;
|
|
@@ -367,9 +427,69 @@ declare function useInputs(): ({
|
|
|
367
427
|
} | {
|
|
368
428
|
type: "null";
|
|
369
429
|
_kind: "Null";
|
|
370
|
-
} | any | any
|
|
430
|
+
} | any | any | {
|
|
431
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
432
|
+
_kind: "Literal";
|
|
433
|
+
const: string | number | boolean | null;
|
|
434
|
+
} | {
|
|
435
|
+
default?: any;
|
|
436
|
+
discriminator?: string | undefined;
|
|
437
|
+
_kind: "Union";
|
|
438
|
+
anyOf: ({
|
|
439
|
+
default?: string | undefined;
|
|
440
|
+
type: "string";
|
|
441
|
+
_kind: "String";
|
|
442
|
+
} | {
|
|
443
|
+
default?: number | undefined;
|
|
444
|
+
minimum?: number | undefined;
|
|
445
|
+
maximum?: number | undefined;
|
|
446
|
+
type: "number";
|
|
447
|
+
_kind: "Number";
|
|
448
|
+
} | {
|
|
449
|
+
default?: boolean | undefined;
|
|
450
|
+
type: "boolean";
|
|
451
|
+
_kind: "Boolean";
|
|
452
|
+
} | {
|
|
453
|
+
type: "null";
|
|
454
|
+
_kind: "Null";
|
|
455
|
+
} | any | any | {
|
|
456
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
457
|
+
_kind: "Literal";
|
|
458
|
+
const: string | number | boolean | null;
|
|
459
|
+
} | any)[];
|
|
460
|
+
};
|
|
371
461
|
};
|
|
372
462
|
_kind: "Object";
|
|
463
|
+
} | {
|
|
464
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
465
|
+
_kind: "Literal";
|
|
466
|
+
const: string | number | boolean | null;
|
|
467
|
+
} | {
|
|
468
|
+
default?: any;
|
|
469
|
+
discriminator?: string | undefined;
|
|
470
|
+
_kind: "Union";
|
|
471
|
+
anyOf: ({
|
|
472
|
+
default?: string | undefined;
|
|
473
|
+
type: "string";
|
|
474
|
+
_kind: "String";
|
|
475
|
+
} | {
|
|
476
|
+
default?: number | undefined;
|
|
477
|
+
minimum?: number | undefined;
|
|
478
|
+
maximum?: number | undefined;
|
|
479
|
+
type: "number";
|
|
480
|
+
_kind: "Number";
|
|
481
|
+
} | {
|
|
482
|
+
default?: boolean | undefined;
|
|
483
|
+
type: "boolean";
|
|
484
|
+
_kind: "Boolean";
|
|
485
|
+
} | {
|
|
486
|
+
type: "null";
|
|
487
|
+
_kind: "Null";
|
|
488
|
+
} | any | any | {
|
|
489
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
490
|
+
_kind: "Literal";
|
|
491
|
+
const: string | number | boolean | null;
|
|
492
|
+
} | any)[];
|
|
373
493
|
} | null;
|
|
374
494
|
kind: "data";
|
|
375
495
|
required: boolean;
|
|
@@ -515,7 +635,7 @@ declare function useObservable<T>(observable: Observable<T> | undefined): T | un
|
|
|
515
635
|
declare function useObservable<T, A>(observable: Observable<T> | undefined, selector: (value: T) => A, options?: Pick<ObservableOptions, "isEqual">): A | undefined;
|
|
516
636
|
declare function useObservable<T, P extends PathKey[] | string>(observable: Observable<T> | undefined, path: P): GetAtPath<T, P> | undefined;
|
|
517
637
|
|
|
518
|
-
declare function useResourceUrl(idOrStableId: string | undefined): string | undefined;
|
|
638
|
+
declare function useResourceUrl(idOrStableId: string | undefined, options?: ResourceUrlOptions): string | undefined;
|
|
519
639
|
|
|
520
640
|
type ConnectionEvent<State> = {
|
|
521
641
|
type: "stateChange";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _noya_app_state_manager from '@noya-app/state-manager';
|
|
2
|
-
import { AIToolDefinition, UserManager, SharedConnectionDataManager, NoyaManager, StateManagerOptions, StateManager, NoyaManagerOptions, SyncAdapter, TSchema, AccessType, PolicyAuthContext, LocalStorageSyncOptions, Static, ExtractRequestBody, PublishCallback, ResourceManager, TranscriptionManager, AssetTranscriptionResult, StreamFilter, ActivityEventsManager, MultiplayerPatchMetadata, SafeEval, CreateParams, MultiplayerStateManager, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
2
|
+
import { AIToolDefinition, UserManager, SharedConnectionDataManager, NoyaManager, StateManagerOptions, StateManager, NoyaManagerOptions, SyncAdapter, TSchema, AccessType, PolicyAuthContext, LocalStorageSyncOptions, Static, ExtractRequestBody, PublishCallback, ResourceManager, TranscriptionManager, AssetTranscriptionResult, StreamFilter, ActivityEventsManager, MultiplayerPatchMetadata, SafeEval, CreateParams, MultiplayerStateManager, ResourceUrlOptions, ReconnectingWebSocketState, ClientToServerMessage, ServerToClientMessage, MultiplayerStateManagerError } from '@noya-app/state-manager';
|
|
3
3
|
export * from '@noya-app/state-manager';
|
|
4
4
|
import React, { SetStateAction, ComponentProps, Dispatch } from 'react';
|
|
5
5
|
import { Asset, ResourceCreate, CreateResourceParametersWithoutAccessibleByFileId, ModifiedResource, Resource, MediaItem, ResourceMap, ResourceCreateMap, OutputTransform, Input } from '@noya-app/noya-schemas';
|
|
@@ -342,9 +342,69 @@ declare function useInputs(): ({
|
|
|
342
342
|
} | {
|
|
343
343
|
type: "null";
|
|
344
344
|
_kind: "Null";
|
|
345
|
-
} | any | any
|
|
345
|
+
} | any | any | {
|
|
346
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
347
|
+
_kind: "Literal";
|
|
348
|
+
const: string | number | boolean | null;
|
|
349
|
+
} | {
|
|
350
|
+
default?: any;
|
|
351
|
+
discriminator?: string | undefined;
|
|
352
|
+
_kind: "Union";
|
|
353
|
+
anyOf: ({
|
|
354
|
+
default?: string | undefined;
|
|
355
|
+
type: "string";
|
|
356
|
+
_kind: "String";
|
|
357
|
+
} | {
|
|
358
|
+
default?: number | undefined;
|
|
359
|
+
minimum?: number | undefined;
|
|
360
|
+
maximum?: number | undefined;
|
|
361
|
+
type: "number";
|
|
362
|
+
_kind: "Number";
|
|
363
|
+
} | {
|
|
364
|
+
default?: boolean | undefined;
|
|
365
|
+
type: "boolean";
|
|
366
|
+
_kind: "Boolean";
|
|
367
|
+
} | {
|
|
368
|
+
type: "null";
|
|
369
|
+
_kind: "Null";
|
|
370
|
+
} | any | any | {
|
|
371
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
372
|
+
_kind: "Literal";
|
|
373
|
+
const: string | number | boolean | null;
|
|
374
|
+
} | any)[];
|
|
375
|
+
};
|
|
346
376
|
};
|
|
347
377
|
_kind: "Object";
|
|
378
|
+
} | {
|
|
379
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
380
|
+
_kind: "Literal";
|
|
381
|
+
const: string | number | boolean | null;
|
|
382
|
+
} | {
|
|
383
|
+
default?: any;
|
|
384
|
+
discriminator?: string | undefined;
|
|
385
|
+
_kind: "Union";
|
|
386
|
+
anyOf: ({
|
|
387
|
+
default?: string | undefined;
|
|
388
|
+
type: "string";
|
|
389
|
+
_kind: "String";
|
|
390
|
+
} | {
|
|
391
|
+
default?: number | undefined;
|
|
392
|
+
minimum?: number | undefined;
|
|
393
|
+
maximum?: number | undefined;
|
|
394
|
+
type: "number";
|
|
395
|
+
_kind: "Number";
|
|
396
|
+
} | {
|
|
397
|
+
default?: boolean | undefined;
|
|
398
|
+
type: "boolean";
|
|
399
|
+
_kind: "Boolean";
|
|
400
|
+
} | {
|
|
401
|
+
type: "null";
|
|
402
|
+
_kind: "Null";
|
|
403
|
+
} | any | any | {
|
|
404
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
405
|
+
_kind: "Literal";
|
|
406
|
+
const: string | number | boolean | null;
|
|
407
|
+
} | any)[];
|
|
348
408
|
};
|
|
349
409
|
} | {
|
|
350
410
|
required?: string[] | undefined;
|
|
@@ -367,9 +427,69 @@ declare function useInputs(): ({
|
|
|
367
427
|
} | {
|
|
368
428
|
type: "null";
|
|
369
429
|
_kind: "Null";
|
|
370
|
-
} | any | any
|
|
430
|
+
} | any | any | {
|
|
431
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
432
|
+
_kind: "Literal";
|
|
433
|
+
const: string | number | boolean | null;
|
|
434
|
+
} | {
|
|
435
|
+
default?: any;
|
|
436
|
+
discriminator?: string | undefined;
|
|
437
|
+
_kind: "Union";
|
|
438
|
+
anyOf: ({
|
|
439
|
+
default?: string | undefined;
|
|
440
|
+
type: "string";
|
|
441
|
+
_kind: "String";
|
|
442
|
+
} | {
|
|
443
|
+
default?: number | undefined;
|
|
444
|
+
minimum?: number | undefined;
|
|
445
|
+
maximum?: number | undefined;
|
|
446
|
+
type: "number";
|
|
447
|
+
_kind: "Number";
|
|
448
|
+
} | {
|
|
449
|
+
default?: boolean | undefined;
|
|
450
|
+
type: "boolean";
|
|
451
|
+
_kind: "Boolean";
|
|
452
|
+
} | {
|
|
453
|
+
type: "null";
|
|
454
|
+
_kind: "Null";
|
|
455
|
+
} | any | any | {
|
|
456
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
457
|
+
_kind: "Literal";
|
|
458
|
+
const: string | number | boolean | null;
|
|
459
|
+
} | any)[];
|
|
460
|
+
};
|
|
371
461
|
};
|
|
372
462
|
_kind: "Object";
|
|
463
|
+
} | {
|
|
464
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
465
|
+
_kind: "Literal";
|
|
466
|
+
const: string | number | boolean | null;
|
|
467
|
+
} | {
|
|
468
|
+
default?: any;
|
|
469
|
+
discriminator?: string | undefined;
|
|
470
|
+
_kind: "Union";
|
|
471
|
+
anyOf: ({
|
|
472
|
+
default?: string | undefined;
|
|
473
|
+
type: "string";
|
|
474
|
+
_kind: "String";
|
|
475
|
+
} | {
|
|
476
|
+
default?: number | undefined;
|
|
477
|
+
minimum?: number | undefined;
|
|
478
|
+
maximum?: number | undefined;
|
|
479
|
+
type: "number";
|
|
480
|
+
_kind: "Number";
|
|
481
|
+
} | {
|
|
482
|
+
default?: boolean | undefined;
|
|
483
|
+
type: "boolean";
|
|
484
|
+
_kind: "Boolean";
|
|
485
|
+
} | {
|
|
486
|
+
type: "null";
|
|
487
|
+
_kind: "Null";
|
|
488
|
+
} | any | any | {
|
|
489
|
+
type?: "string" | "number" | "boolean" | "null" | undefined;
|
|
490
|
+
_kind: "Literal";
|
|
491
|
+
const: string | number | boolean | null;
|
|
492
|
+
} | any)[];
|
|
373
493
|
} | null;
|
|
374
494
|
kind: "data";
|
|
375
495
|
required: boolean;
|
|
@@ -515,7 +635,7 @@ declare function useObservable<T>(observable: Observable<T> | undefined): T | un
|
|
|
515
635
|
declare function useObservable<T, A>(observable: Observable<T> | undefined, selector: (value: T) => A, options?: Pick<ObservableOptions, "isEqual">): A | undefined;
|
|
516
636
|
declare function useObservable<T, P extends PathKey[] | string>(observable: Observable<T> | undefined, path: P): GetAtPath<T, P> | undefined;
|
|
517
637
|
|
|
518
|
-
declare function useResourceUrl(idOrStableId: string | undefined): string | undefined;
|
|
638
|
+
declare function useResourceUrl(idOrStableId: string | undefined, options?: ResourceUrlOptions): string | undefined;
|
|
519
639
|
|
|
520
640
|
type ConnectionEvent<State> = {
|
|
521
641
|
type: "stateChange";
|
package/dist/index.js
CHANGED
|
@@ -4179,49 +4179,67 @@ var gistSchema = Type.Object({
|
|
|
4179
4179
|
|
|
4180
4180
|
// ../noya-schemas/src/jsonSchema.ts
|
|
4181
4181
|
var jsonSchema = Type.Recursive(
|
|
4182
|
-
(This) => Type.Union(
|
|
4183
|
-
|
|
4184
|
-
Type.
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
Type.
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
Type.
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
Type.
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
Type.
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
Type.
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4182
|
+
(This) => Type.Union([
|
|
4183
|
+
Type.Object({
|
|
4184
|
+
type: Type.Literal("string"),
|
|
4185
|
+
default: Type.Optional(Type.String()),
|
|
4186
|
+
_kind: Type.Literal("String")
|
|
4187
|
+
}),
|
|
4188
|
+
Type.Object({
|
|
4189
|
+
type: Type.Literal("number"),
|
|
4190
|
+
default: Type.Optional(Type.Number()),
|
|
4191
|
+
minimum: Type.Optional(Type.Number()),
|
|
4192
|
+
maximum: Type.Optional(Type.Number()),
|
|
4193
|
+
_kind: Type.Literal("Number")
|
|
4194
|
+
}),
|
|
4195
|
+
Type.Object({
|
|
4196
|
+
type: Type.Literal("boolean"),
|
|
4197
|
+
default: Type.Optional(Type.Boolean()),
|
|
4198
|
+
_kind: Type.Literal("Boolean")
|
|
4199
|
+
}),
|
|
4200
|
+
Type.Object({
|
|
4201
|
+
type: Type.Literal("null"),
|
|
4202
|
+
_kind: Type.Literal("Null")
|
|
4203
|
+
}),
|
|
4204
|
+
Type.Object({
|
|
4205
|
+
type: Type.Literal("array"),
|
|
4206
|
+
items: This,
|
|
4207
|
+
// default: Type.Optional(Type.Array(Type.Any())),
|
|
4208
|
+
// minItems: Type.Optional(Type.Number()),
|
|
4209
|
+
// maxItems: Type.Optional(Type.Number()),
|
|
4210
|
+
_kind: Type.Literal("Array")
|
|
4211
|
+
}),
|
|
4212
|
+
Type.Object({
|
|
4213
|
+
type: Type.Literal("object"),
|
|
4214
|
+
properties: Type.Record(Type.String(), This),
|
|
4215
|
+
required: Type.Optional(Type.Array(Type.String())),
|
|
4216
|
+
// default: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
4217
|
+
_kind: Type.Literal("Object")
|
|
4218
|
+
}),
|
|
4219
|
+
Type.Object({
|
|
4220
|
+
const: Type.Union([
|
|
4221
|
+
Type.String(),
|
|
4222
|
+
Type.Number(),
|
|
4223
|
+
Type.Boolean(),
|
|
4224
|
+
Type.Null()
|
|
4225
|
+
]),
|
|
4226
|
+
type: Type.Optional(
|
|
4227
|
+
Type.Union([
|
|
4228
|
+
Type.Literal("string"),
|
|
4229
|
+
Type.Literal("number"),
|
|
4230
|
+
Type.Literal("boolean"),
|
|
4231
|
+
Type.Literal("null")
|
|
4232
|
+
])
|
|
4233
|
+
),
|
|
4234
|
+
_kind: Type.Literal("Literal")
|
|
4235
|
+
}),
|
|
4236
|
+
Type.Object({
|
|
4237
|
+
anyOf: Type.Array(This, { minItems: 1 }),
|
|
4238
|
+
discriminator: Type.Optional(Type.String()),
|
|
4239
|
+
default: Type.Optional(Type.Any()),
|
|
4240
|
+
_kind: Type.Literal("Union")
|
|
4241
|
+
})
|
|
4242
|
+
]),
|
|
4225
4243
|
{
|
|
4226
4244
|
$id: "jsonSchema"
|
|
4227
4245
|
}
|
|
@@ -4491,6 +4509,13 @@ function findAllDefs(schema) {
|
|
|
4491
4509
|
}
|
|
4492
4510
|
|
|
4493
4511
|
// ../noya-schemas/src/resourceSchema.ts
|
|
4512
|
+
var targetFileSchema = Type.Object({
|
|
4513
|
+
id: Type.String(),
|
|
4514
|
+
toolId: Type.String(),
|
|
4515
|
+
tool: Type.Object({
|
|
4516
|
+
theme: Type.Optional(Type.Any())
|
|
4517
|
+
})
|
|
4518
|
+
});
|
|
4494
4519
|
var baseSchemaProperties = {
|
|
4495
4520
|
id: Type.String(),
|
|
4496
4521
|
stableId: Type.String(),
|
|
@@ -4506,7 +4531,9 @@ var baseSchemaProperties = {
|
|
|
4506
4531
|
})
|
|
4507
4532
|
),
|
|
4508
4533
|
accessibleByFileVersionId: Nullable(Type.String()),
|
|
4509
|
-
|
|
4534
|
+
file: Type.Optional(Nullable(targetFileSchema)),
|
|
4535
|
+
url: Type.Optional(Type.String()),
|
|
4536
|
+
transformUrl: Type.Optional(Type.String())
|
|
4510
4537
|
};
|
|
4511
4538
|
var uploadableAssetSchema = Type.Object({
|
|
4512
4539
|
content: Type.String(),
|
|
@@ -8558,14 +8585,14 @@ var UserPointersOverlay = (0, import_react_utils4.memoGeneric)(function UserPoin
|
|
|
8558
8585
|
|
|
8559
8586
|
// src/useResourceUrl.ts
|
|
8560
8587
|
var import_state_manager6 = require("@noya-app/state-manager");
|
|
8561
|
-
function useResourceUrl(idOrStableId) {
|
|
8588
|
+
function useResourceUrl(idOrStableId, options) {
|
|
8562
8589
|
const { noyaManager } = useAnyNoyaStateContext();
|
|
8563
8590
|
const resources = useObservable(
|
|
8564
8591
|
noyaManager.resourceManager.optimisticResources$
|
|
8565
8592
|
);
|
|
8566
8593
|
const assets = useObservable(noyaManager.assetManager.assets$);
|
|
8567
8594
|
if (!idOrStableId) return void 0;
|
|
8568
|
-
return (0, import_state_manager6.getResourceUrl)(idOrStableId, resources, assets);
|
|
8595
|
+
return (0, import_state_manager6.getResourceUrl)(idOrStableId, resources, assets, options);
|
|
8569
8596
|
}
|
|
8570
8597
|
|
|
8571
8598
|
// src/WebSocketConnection.ts
|