@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/dist/index.mjs CHANGED
@@ -4100,49 +4100,67 @@ var gistSchema = Type.Object({
4100
4100
 
4101
4101
  // ../noya-schemas/src/jsonSchema.ts
4102
4102
  var jsonSchema = Type.Recursive(
4103
- (This) => Type.Union(
4104
- [
4105
- Type.Object({
4106
- type: Type.Literal("string"),
4107
- default: Type.Optional(Type.String()),
4108
- _kind: Type.Literal("String")
4109
- }),
4110
- Type.Object({
4111
- type: Type.Literal("number"),
4112
- default: Type.Optional(Type.Number()),
4113
- minimum: Type.Optional(Type.Number()),
4114
- maximum: Type.Optional(Type.Number()),
4115
- _kind: Type.Literal("Number")
4116
- }),
4117
- Type.Object({
4118
- type: Type.Literal("boolean"),
4119
- default: Type.Optional(Type.Boolean()),
4120
- _kind: Type.Literal("Boolean")
4121
- }),
4122
- Type.Object({
4123
- type: Type.Literal("null"),
4124
- _kind: Type.Literal("Null")
4125
- }),
4126
- Type.Object({
4127
- type: Type.Literal("array"),
4128
- items: This,
4129
- // default: Type.Optional(Type.Array(Type.Any())),
4130
- // minItems: Type.Optional(Type.Number()),
4131
- // maxItems: Type.Optional(Type.Number()),
4132
- _kind: Type.Literal("Array")
4133
- }),
4134
- Type.Object({
4135
- type: Type.Literal("object"),
4136
- properties: Type.Record(Type.String(), This),
4137
- required: Type.Optional(Type.Array(Type.String())),
4138
- // default: Type.Optional(Type.Record(Type.String(), Type.Any())),
4139
- _kind: Type.Literal("Object")
4140
- })
4141
- ],
4142
- {
4143
- discriminator: "type"
4144
- }
4145
- ),
4103
+ (This) => Type.Union([
4104
+ Type.Object({
4105
+ type: Type.Literal("string"),
4106
+ default: Type.Optional(Type.String()),
4107
+ _kind: Type.Literal("String")
4108
+ }),
4109
+ Type.Object({
4110
+ type: Type.Literal("number"),
4111
+ default: Type.Optional(Type.Number()),
4112
+ minimum: Type.Optional(Type.Number()),
4113
+ maximum: Type.Optional(Type.Number()),
4114
+ _kind: Type.Literal("Number")
4115
+ }),
4116
+ Type.Object({
4117
+ type: Type.Literal("boolean"),
4118
+ default: Type.Optional(Type.Boolean()),
4119
+ _kind: Type.Literal("Boolean")
4120
+ }),
4121
+ Type.Object({
4122
+ type: Type.Literal("null"),
4123
+ _kind: Type.Literal("Null")
4124
+ }),
4125
+ Type.Object({
4126
+ type: Type.Literal("array"),
4127
+ items: This,
4128
+ // default: Type.Optional(Type.Array(Type.Any())),
4129
+ // minItems: Type.Optional(Type.Number()),
4130
+ // maxItems: Type.Optional(Type.Number()),
4131
+ _kind: Type.Literal("Array")
4132
+ }),
4133
+ Type.Object({
4134
+ type: Type.Literal("object"),
4135
+ properties: Type.Record(Type.String(), This),
4136
+ required: Type.Optional(Type.Array(Type.String())),
4137
+ // default: Type.Optional(Type.Record(Type.String(), Type.Any())),
4138
+ _kind: Type.Literal("Object")
4139
+ }),
4140
+ Type.Object({
4141
+ const: Type.Union([
4142
+ Type.String(),
4143
+ Type.Number(),
4144
+ Type.Boolean(),
4145
+ Type.Null()
4146
+ ]),
4147
+ type: Type.Optional(
4148
+ Type.Union([
4149
+ Type.Literal("string"),
4150
+ Type.Literal("number"),
4151
+ Type.Literal("boolean"),
4152
+ Type.Literal("null")
4153
+ ])
4154
+ ),
4155
+ _kind: Type.Literal("Literal")
4156
+ }),
4157
+ Type.Object({
4158
+ anyOf: Type.Array(This, { minItems: 1 }),
4159
+ discriminator: Type.Optional(Type.String()),
4160
+ default: Type.Optional(Type.Any()),
4161
+ _kind: Type.Literal("Union")
4162
+ })
4163
+ ]),
4146
4164
  {
4147
4165
  $id: "jsonSchema"
4148
4166
  }
@@ -4412,6 +4430,13 @@ function findAllDefs(schema) {
4412
4430
  }
4413
4431
 
4414
4432
  // ../noya-schemas/src/resourceSchema.ts
4433
+ var targetFileSchema = Type.Object({
4434
+ id: Type.String(),
4435
+ toolId: Type.String(),
4436
+ tool: Type.Object({
4437
+ theme: Type.Optional(Type.Any())
4438
+ })
4439
+ });
4415
4440
  var baseSchemaProperties = {
4416
4441
  id: Type.String(),
4417
4442
  stableId: Type.String(),
@@ -4427,7 +4452,9 @@ var baseSchemaProperties = {
4427
4452
  })
4428
4453
  ),
4429
4454
  accessibleByFileVersionId: Nullable(Type.String()),
4430
- url: Type.Optional(Type.String())
4455
+ file: Type.Optional(Nullable(targetFileSchema)),
4456
+ url: Type.Optional(Type.String()),
4457
+ transformUrl: Type.Optional(Type.String())
4431
4458
  };
4432
4459
  var uploadableAssetSchema = Type.Object({
4433
4460
  content: Type.String(),
@@ -8522,14 +8549,14 @@ var UserPointersOverlay = memoGeneric2(function UserPointers({
8522
8549
 
8523
8550
  // src/useResourceUrl.ts
8524
8551
  import { getResourceUrl } from "@noya-app/state-manager";
8525
- function useResourceUrl(idOrStableId) {
8552
+ function useResourceUrl(idOrStableId, options) {
8526
8553
  const { noyaManager } = useAnyNoyaStateContext();
8527
8554
  const resources = useObservable(
8528
8555
  noyaManager.resourceManager.optimisticResources$
8529
8556
  );
8530
8557
  const assets = useObservable(noyaManager.assetManager.assets$);
8531
8558
  if (!idOrStableId) return void 0;
8532
- return getResourceUrl(idOrStableId, resources, assets);
8559
+ return getResourceUrl(idOrStableId, resources, assets, options);
8533
8560
  }
8534
8561
 
8535
8562
  // src/WebSocketConnection.ts