jazz-tools 0.16.2 → 0.16.3

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.
Files changed (73) hide show
  1. package/.turbo/turbo-build.log +33 -33
  2. package/CHANGELOG.md +11 -0
  3. package/dist/{chunk-CL3ROOZM.js → chunk-RAMDW4VL.js} +83 -29
  4. package/dist/chunk-RAMDW4VL.js.map +1 -0
  5. package/dist/index.js +1 -1
  6. package/dist/react-core/hooks.d.ts +150 -2
  7. package/dist/react-core/hooks.d.ts.map +1 -1
  8. package/dist/react-core/index.js.map +1 -1
  9. package/dist/testing.js +1 -1
  10. package/dist/tools/coValues/coFeed.d.ts.map +1 -1
  11. package/dist/tools/coValues/coList.d.ts.map +1 -1
  12. package/dist/tools/coValues/coMap.d.ts.map +1 -1
  13. package/dist/tools/coValues/schemaUnion.d.ts +7 -2
  14. package/dist/tools/coValues/schemaUnion.d.ts.map +1 -1
  15. package/dist/tools/exports.d.ts +1 -1
  16. package/dist/tools/exports.d.ts.map +1 -1
  17. package/dist/tools/implementation/schema.d.ts +12 -2
  18. package/dist/tools/implementation/schema.d.ts.map +1 -1
  19. package/dist/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts +2 -4
  20. package/dist/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts.map +1 -1
  21. package/dist/tools/implementation/zodSchema/schemaTypes/CoListSchema.d.ts +2 -4
  22. package/dist/tools/implementation/zodSchema/schemaTypes/CoListSchema.d.ts.map +1 -1
  23. package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +3 -6
  24. package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
  25. package/dist/tools/implementation/zodSchema/typeConverters/CoFieldInit.d.ts +20 -6
  26. package/dist/tools/implementation/zodSchema/typeConverters/CoFieldInit.d.ts.map +1 -1
  27. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts +4 -4
  28. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts.map +1 -1
  29. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts +3 -3
  30. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts.map +1 -1
  31. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts +3 -25
  32. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +1 -1
  33. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts +3 -25
  34. package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +1 -1
  35. package/dist/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.d.ts +24 -0
  36. package/dist/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.d.ts.map +1 -0
  37. package/dist/tools/implementation/zodSchema/unionUtils.d.ts +2 -3
  38. package/dist/tools/implementation/zodSchema/unionUtils.d.ts.map +1 -1
  39. package/dist/tools/implementation/zodSchema/zodSchema.d.ts +3 -4
  40. package/dist/tools/implementation/zodSchema/zodSchema.d.ts.map +1 -1
  41. package/dist/tools/internal.d.ts +1 -0
  42. package/dist/tools/internal.d.ts.map +1 -1
  43. package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
  44. package/package.json +4 -4
  45. package/src/react-core/hooks.ts +143 -0
  46. package/src/tools/coValues/coFeed.ts +12 -4
  47. package/src/tools/coValues/coList.ts +41 -19
  48. package/src/tools/coValues/coMap.ts +12 -2
  49. package/src/tools/coValues/inbox.ts +1 -1
  50. package/src/tools/coValues/schemaUnion.ts +28 -3
  51. package/src/tools/exports.ts +0 -1
  52. package/src/tools/implementation/schema.ts +28 -2
  53. package/src/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.ts +2 -7
  54. package/src/tools/implementation/zodSchema/schemaTypes/CoListSchema.ts +2 -7
  55. package/src/tools/implementation/zodSchema/schemaTypes/CoMapSchema.ts +2 -10
  56. package/src/tools/implementation/zodSchema/typeConverters/CoFieldInit.ts +74 -9
  57. package/src/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.ts +9 -4
  58. package/src/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.ts +3 -3
  59. package/src/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.ts +3 -114
  60. package/src/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.ts +5 -129
  61. package/src/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.ts +79 -0
  62. package/src/tools/implementation/zodSchema/unionUtils.ts +6 -9
  63. package/src/tools/implementation/zodSchema/zodSchema.ts +3 -13
  64. package/src/tools/internal.ts +1 -0
  65. package/src/tools/subscribe/SubscriptionScope.ts +4 -2
  66. package/src/tools/subscribe/utils.ts +2 -2
  67. package/src/tools/tests/coFeed.test.ts +40 -0
  68. package/src/tools/tests/coList.test.ts +42 -0
  69. package/src/tools/tests/coMap.test-d.ts +41 -1
  70. package/src/tools/tests/coMap.test.ts +82 -5
  71. package/src/tools/tests/groupsAndAccounts.test.ts +54 -0
  72. package/src/tools/tests/zod.test.ts +16 -0
  73. package/dist/chunk-CL3ROOZM.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.16.2 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.16.3 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types && pnpm build:svelte
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -107,45 +107,50 @@
107
107
  ESM Build start
108
108
  CLI Cleaning output folder
109
109
  ESM Build start
110
- ESM dist/react/ssr.js 688.00 B
111
- ESM dist/react/ssr.js.map 1.12 KB
110
+ ESM dist/worker/index.js 2.31 KB
111
+ ESM dist/worker/index.js.map 4.77 KB
112
112
  ESM ⚡️ Build success in 16ms
113
113
  ESM dist/tiptap/index.js 564.00 B
114
114
  ESM dist/tiptap/index.js.map 1.21 KB
115
- ESM ⚡️ Build success in 14ms
115
+ ESM ⚡️ Build success in 17ms
116
+ ESM dist/react/ssr.js 688.00 B
117
+ ESM dist/react/ssr.js.map 1.12 KB
118
+ ESM ⚡️ Build success in 19ms
116
119
  ESM dist/browser-media-images/index.js 2.55 KB
117
120
  ESM dist/browser-media-images/index.js.map 5.46 KB
118
- ESM ⚡️ Build success in 19ms
119
- ESM dist/worker/index.js 2.31 KB
120
- ESM dist/worker/index.js.map 4.77 KB
121
- ESM ⚡️ Build success in 20ms
121
+ ESM ⚡️ Build success in 21ms
122
+ ESM dist/react-native-media-images/index.js 6.19 KB
123
+ ESM dist/react-native-media-images/index.js.map 10.96 KB
124
+ ESM ⚡️ Build success in 18ms
122
125
  ESM dist/react-core/index.js 8.42 KB
123
126
  ESM dist/react-core/testing.js 1.17 KB
124
127
  ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
125
- ESM dist/react-core/index.js.map 16.44 KB
126
- ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
128
+ ESM dist/react-core/index.js.map 20.69 KB
127
129
  ESM dist/react-core/testing.js.map 1.82 KB
128
- ESM ⚡️ Build success in 23ms
129
- ESM dist/react-native-media-images/index.js 6.19 KB
130
- ESM dist/react-native-media-images/index.js.map 10.96 KB
131
- ESM ⚡️ Build success in 21ms
130
+ ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
131
+ ESM ⚡️ Build success in 25ms
132
+ ESM dist/browser/index.js 13.43 KB
133
+ ESM dist/browser/index.js.map 28.65 KB
134
+ ESM ⚡️ Build success in 38ms
132
135
  ESM dist/react-native/index.js 2.53 KB
133
136
  ESM dist/react-native/testing.js 120.00 B
134
137
  ESM dist/react-native/crypto.js 117.00 B
135
138
  ESM dist/react-native/index.js.map 5.68 KB
136
139
  ESM dist/react-native/testing.js.map 176.00 B
137
140
  ESM dist/react-native/crypto.js.map 174.00 B
138
- ESM ⚡️ Build success in 26ms
139
- ESM dist/browser/index.js 13.43 KB
140
- ESM dist/browser/index.js.map 28.65 KB
141
- ESM ⚡️ Build success in 32ms
141
+ ESM ⚡️ Build success in 35ms
142
+ ESM dist/react/testing.js 122.00 B
143
+ ESM dist/react/index.js 20.70 KB
144
+ ESM dist/react/testing.js.map 165.00 B
145
+ ESM dist/react/index.js.map 34.14 KB
146
+ ESM ⚡️ Build success in 36ms
142
147
  ESM dist/expo/index.js 4.65 KB
143
148
  ESM dist/expo/testing.js 112.00 B
144
149
  ESM dist/expo/crypto.js 109.00 B
145
150
  ESM dist/expo/index.js.map 10.17 KB
146
- ESM dist/expo/testing.js.map 168.00 B
147
151
  ESM dist/expo/crypto.js.map 166.00 B
148
- ESM ⚡️ Build success in 32ms
152
+ ESM dist/expo/testing.js.map 168.00 B
153
+ ESM ⚡️ Build success in 39ms
149
154
  ESM dist/react-native-core/index.js 16.95 KB
150
155
  ESM dist/react-native-core/testing.js 119.00 B
151
156
  ESM dist/react-native-core/crypto.js 2.10 KB
@@ -153,35 +158,30 @@
153
158
  ESM dist/react-native-core/testing.js.map 175.00 B
154
159
  ESM dist/react-native-core/crypto.js.map 4.25 KB
155
160
  ESM ⚡️ Build success in 37ms
156
- ESM dist/react/index.js 20.70 KB
157
- ESM dist/react/testing.js 122.00 B
158
- ESM dist/react/index.js.map 34.14 KB
159
- ESM dist/react/testing.js.map 165.00 B
160
- ESM ⚡️ Build success in 43ms
161
161
  ESM dist/prosemirror/index.js 76.90 KB
162
162
  ESM dist/prosemirror/index.js.map 305.53 KB
163
- ESM ⚡️ Build success in 45ms
163
+ ESM ⚡️ Build success in 51ms
164
164
  ESM dist/inspector/index.js 60.37 KB
165
165
  ESM dist/inspector/index.js.map 107.85 KB
166
- ESM ⚡️ Build success in 70ms
166
+ ESM ⚡️ Build success in 57ms
167
167
  ESM dist/testing.js 6.76 KB
168
168
  ESM dist/index.js 26.00 KB
169
- ESM dist/chunk-CL3ROOZM.js 148.99 KB
169
+ ESM dist/chunk-RAMDW4VL.js 150.32 KB
170
170
  ESM dist/testing.js.map 13.06 KB
171
171
  ESM dist/index.js.map 52.65 KB
172
- ESM dist/chunk-CL3ROOZM.js.map 356.97 KB
173
- ESM ⚡️ Build success in 77ms
172
+ ESM dist/chunk-RAMDW4VL.js.map 359.88 KB
173
+ ESM ⚡️ Build success in 76ms
174
174
  ESM dist/inspector/register-custom-element.js 218.00 B
175
175
  ESM dist/inspector/register-custom-element.js.map 314.00 B
176
176
  ESM dist/inspector/custom-element-TUXKXSZU.js 1.53 MB
177
177
  ESM dist/inspector/custom-element-TUXKXSZU.js.map 2.35 MB
178
- ESM ⚡️ Build success in 115ms
178
+ ESM ⚡️ Build success in 116ms
179
179
 
180
- > jazz-tools@0.16.2 types /home/runner/_work/jazz/jazz/packages/jazz-tools
180
+ > jazz-tools@0.16.3 types /home/runner/_work/jazz/jazz/packages/jazz-tools
181
181
  > tsc --outDir dist
182
182
 
183
183
 
184
- > jazz-tools@0.16.2 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
184
+ > jazz-tools@0.16.3 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
185
185
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
186
186
 
187
187
  src/svelte -> dist/svelte
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.16.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 43d3511: Streamlined CoValue creation:
8
+ - CoValues can be created with plain JSON objects. Nested CoValues will be automatically created when necessary.
9
+ - Optional fields can be ommited (i.e. it's no longer necessary to provide an explicit `undefined` value).
10
+ - cojson@0.16.3
11
+ - cojson-storage-indexeddb@0.16.3
12
+ - cojson-transport-ws@0.16.3
13
+
3
14
  ## 0.16.2
4
15
 
5
16
  ### Patch Changes
@@ -406,8 +406,17 @@ var _CoMap = class _CoMap extends CoValueBase {
406
406
  if (descriptor === "json") {
407
407
  rawInit[key] = initValue;
408
408
  } else if (isRefEncoded(descriptor)) {
409
- if (initValue) {
410
- rawInit[key] = initValue.id;
409
+ if (initValue != null) {
410
+ let refId = initValue.id;
411
+ if (!refId) {
412
+ const coValue = instantiateRefEncodedWithInit(
413
+ descriptor,
414
+ initValue,
415
+ owner
416
+ );
417
+ refId = coValue.id;
418
+ }
419
+ rawInit[key] = refId;
411
420
  }
412
421
  } else if ("encoded" in descriptor) {
413
422
  rawInit[key] = descriptor.encoded.encode(
@@ -846,7 +855,7 @@ var _CoList = class _CoList extends Array {
846
855
  const { owner } = parseCoValueCreateOptions(options);
847
856
  const instance = new this({ init: items, owner });
848
857
  const raw = owner._raw.createList(
849
- toRawItems(items, instance._schema[ItemsSym])
858
+ toRawItems(items, instance._schema[ItemsSym], owner)
850
859
  );
851
860
  Object.defineProperties(instance, {
852
861
  id: {
@@ -859,14 +868,18 @@ var _CoList = class _CoList extends Array {
859
868
  }
860
869
  push(...items) {
861
870
  this._raw.appendItems(
862
- toRawItems(items, this._schema[ItemsSym]),
871
+ toRawItems(items, this._schema[ItemsSym], this._owner),
863
872
  void 0,
864
873
  "private"
865
874
  );
866
875
  return this._raw.entries().length;
867
876
  }
868
877
  unshift(...items) {
869
- for (const item of toRawItems(items, this._schema[ItemsSym])) {
878
+ for (const item of toRawItems(
879
+ items,
880
+ this._schema[ItemsSym],
881
+ this._owner
882
+ )) {
870
883
  this._raw.prepend(item);
871
884
  }
872
885
  return this._raw.entries().length;
@@ -893,7 +906,11 @@ var _CoList = class _CoList extends Array {
893
906
  for (let idxToDelete = start + deleteCount - 1; idxToDelete >= start; idxToDelete--) {
894
907
  this._raw.delete(idxToDelete);
895
908
  }
896
- const rawItems = toRawItems(items, this._schema[ItemsSym]);
909
+ const rawItems = toRawItems(
910
+ items,
911
+ this._schema[ItemsSym],
912
+ this._owner
913
+ );
897
914
  if (rawItems.length === 0) {
898
915
  return deleted;
899
916
  }
@@ -1026,13 +1043,29 @@ var _CoList = class _CoList extends Array {
1026
1043
  };
1027
1044
  _CoList.prototype._type = "CoList";
1028
1045
  var CoList = _CoList;
1029
- function toRawItems(items, itemDescriptor) {
1030
- const rawItems = itemDescriptor === "json" ? items : "encoded" in itemDescriptor ? items?.map((e) => itemDescriptor.encoded.encode(e)) : isRefEncoded(itemDescriptor) ? items?.map((v) => {
1031
- if (!v) return null;
1032
- return v.id;
1033
- }) : (() => {
1046
+ function toRawItems(items, itemDescriptor, owner) {
1047
+ let rawItems = [];
1048
+ if (itemDescriptor === "json") {
1049
+ rawItems = items;
1050
+ } else if ("encoded" in itemDescriptor) {
1051
+ rawItems = items?.map((e) => itemDescriptor.encoded.encode(e));
1052
+ } else if (isRefEncoded(itemDescriptor)) {
1053
+ rawItems = items?.map((value) => {
1054
+ if (value == null) return null;
1055
+ let refId = value.id;
1056
+ if (!refId) {
1057
+ const coValue = instantiateRefEncodedWithInit(
1058
+ itemDescriptor,
1059
+ value,
1060
+ owner
1061
+ );
1062
+ refId = coValue.id;
1063
+ }
1064
+ return refId;
1065
+ });
1066
+ } else {
1034
1067
  throw new Error("Invalid element descriptor");
1035
- })();
1068
+ }
1036
1069
  return rawItems;
1037
1070
  }
1038
1071
  var CoListProxyHandler = {
@@ -1265,7 +1298,16 @@ var _CoFeed = class _CoFeed extends CoValueBase {
1265
1298
  } else if ("encoded" in itemDescriptor) {
1266
1299
  this._raw.push(itemDescriptor.encoded.encode(item));
1267
1300
  } else if (isRefEncoded(itemDescriptor)) {
1268
- this._raw.push(item.id);
1301
+ let refId = item.id;
1302
+ if (!refId) {
1303
+ const coValue = instantiateRefEncodedWithInit(
1304
+ itemDescriptor,
1305
+ item,
1306
+ this._owner
1307
+ );
1308
+ refId = coValue.id;
1309
+ }
1310
+ this._raw.push(refId);
1269
1311
  }
1270
1312
  }
1271
1313
  /**
@@ -2696,6 +2738,10 @@ var SchemaUnion = class _SchemaUnion extends CoValueBase {
2696
2738
  **/
2697
2739
  static Of(discriminator) {
2698
2740
  return class SchemaUnionClass extends _SchemaUnion {
2741
+ static create(init, owner) {
2742
+ const ResolvedClass = discriminator(new Map(Object.entries(init)));
2743
+ return ResolvedClass.create(init, owner);
2744
+ }
2699
2745
  static fromRaw(raw) {
2700
2746
  const ResolvedClass = discriminator(
2701
2747
  raw
@@ -2704,13 +2750,15 @@ var SchemaUnion = class _SchemaUnion extends CoValueBase {
2704
2750
  }
2705
2751
  };
2706
2752
  }
2753
+ static create(init, owner) {
2754
+ throw new Error("Not implemented");
2755
+ }
2707
2756
  /**
2708
2757
  * Create an instance from raw data. This is called internally and should not be used directly.
2709
2758
  * Use {@link SchemaUnion.Of} to create a union type instead.
2710
2759
  *
2711
2760
  * @internal
2712
2761
  */
2713
- // @ts-ignore
2714
2762
  static fromRaw(raw) {
2715
2763
  throw new Error("Not implemented");
2716
2764
  }
@@ -2940,11 +2988,21 @@ function ref(arg, options) {
2940
2988
  function isRefEncoded(schema) {
2941
2989
  return typeof schema === "object" && "ref" in schema && "optional" in schema && typeof schema.ref === "function";
2942
2990
  }
2943
- function instantiateRefEncoded(schema, raw) {
2991
+ function instantiateRefEncodedFromRaw(schema, raw) {
2944
2992
  return isCoValueClass(schema.ref) ? schema.ref.fromRaw(raw) : schema.ref(
2945
2993
  raw
2946
2994
  ).fromRaw(raw);
2947
2995
  }
2996
+ function instantiateRefEncodedWithInit(schema, init, parentOwner) {
2997
+ if (!isCoValueClass(schema.ref)) {
2998
+ throw Error(
2999
+ `Cannot automatically create CoValue from value: ${JSON.stringify(init)}. Use the CoValue schema's create() method instead.`
3000
+ );
3001
+ }
3002
+ const owner = Group.create();
3003
+ owner.addMember(parentOwner.castAs(Group));
3004
+ return schema.ref.create(init, owner);
3005
+ }
2948
3006
 
2949
3007
  // src/tools/lib/migration.ts
2950
3008
  function applyCoValueMigrations(instance) {
@@ -3063,7 +3121,7 @@ function getOwnerFromRawValue(raw) {
3063
3121
  );
3064
3122
  }
3065
3123
  function createCoValue(ref2, raw, subscriptionScope) {
3066
- const freshValueInstance = instantiateRefEncoded(ref2, raw);
3124
+ const freshValueInstance = instantiateRefEncodedFromRaw(ref2, raw);
3067
3125
  Object.defineProperty(freshValueInstance, "_subscriptionScope", {
3068
3126
  value: subscriptionScope,
3069
3127
  writable: false,
@@ -3138,7 +3196,9 @@ var SubscriptionScope = class _SubscriptionScope {
3138
3196
  return;
3139
3197
  }
3140
3198
  this.migrating = true;
3141
- applyCoValueMigrations(instantiateRefEncoded(this.schema, value));
3199
+ applyCoValueMigrations(
3200
+ instantiateRefEncodedFromRaw(this.schema, value)
3201
+ );
3142
3202
  this.migrated = true;
3143
3203
  this.handleUpdate(lastUpdate);
3144
3204
  return;
@@ -4182,7 +4242,6 @@ function enrichAccountSchema(schema, coValueClass) {
4182
4242
  }
4183
4243
 
4184
4244
  // src/tools/implementation/zodSchema/unionUtils.ts
4185
- import { RawCoList } from "cojson";
4186
4245
  function schemaUnionDiscriminatorFor(schema) {
4187
4246
  if (isUnionOfCoMapsDeeply(schema)) {
4188
4247
  const definition = schema.getDefinition();
@@ -4216,17 +4275,12 @@ function schemaUnionDiscriminatorFor(schema) {
4216
4275
  );
4217
4276
  }
4218
4277
  }
4219
- const determineSchema = (_raw) => {
4220
- if (_raw instanceof RawCoList) {
4221
- throw new Error(
4222
- "co.discriminatedUnion() of collaborative types is not supported for CoLists"
4223
- );
4224
- }
4278
+ const determineSchema = (discriminable) => {
4225
4279
  for (const option of availableOptions) {
4226
4280
  let match = true;
4227
4281
  for (const key of Object.keys(discriminatorMap)) {
4228
4282
  const discriminatorDef = option.getDefinition().shape[key];
4229
- const discriminatorValue = _raw.get(key);
4283
+ const discriminatorValue = discriminable.get(key);
4230
4284
  if (discriminatorValue && typeof discriminatorValue === "object") {
4231
4285
  throw new Error("Discriminator must be a primitive value");
4232
4286
  }
@@ -5075,9 +5129,9 @@ function isAccountInstance(instance) {
5075
5129
  return "_type" in instance && instance._type === "Account";
5076
5130
  }
5077
5131
  function parseCoValueCreateOptions(options) {
5078
- const Group9 = RegisteredSchemas["Group"];
5132
+ const Group10 = RegisteredSchemas["Group"];
5079
5133
  if (!options) {
5080
- return { owner: Group9.create(), uniqueness: void 0 };
5134
+ return { owner: Group10.create(), uniqueness: void 0 };
5081
5135
  }
5082
5136
  if ("_type" in options) {
5083
5137
  if (options._type === "Account" || options._type === "Group") {
@@ -5086,7 +5140,7 @@ function parseCoValueCreateOptions(options) {
5086
5140
  }
5087
5141
  const uniqueness = options.unique ? { uniqueness: options.unique } : void 0;
5088
5142
  return {
5089
- owner: options.owner ?? Group9.create(),
5143
+ owner: options.owner ?? Group10.create(),
5090
5144
  uniqueness
5091
5145
  };
5092
5146
  }
@@ -5211,4 +5265,4 @@ export {
5211
5265
  JazzContextManager
5212
5266
  };
5213
5267
  /* istanbul ignore file -- @preserve */
5214
- //# sourceMappingURL=chunk-CL3ROOZM.js.map
5268
+ //# sourceMappingURL=chunk-RAMDW4VL.js.map