jazz-tools 0.14.7 → 0.14.8

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 (68) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-RTUIFVYF.js → chunk-PA6UHG6Q.js} +5 -5
  4. package/dist/{chunk-RTUIFVYF.js.map → chunk-PA6UHG6Q.js.map} +1 -1
  5. package/dist/coValues/extensions/imageDef.d.ts +1 -1
  6. package/dist/coValues/extensions/imageDef.d.ts.map +1 -1
  7. package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts +1 -1
  8. package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts.map +1 -1
  9. package/dist/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.d.ts +1 -1
  10. package/dist/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.d.ts.map +1 -1
  11. package/dist/implementation/zodSchema/schemaTypes/AccountSchema.d.ts +1 -1
  12. package/dist/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +1 -1
  13. package/dist/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts +1 -1
  14. package/dist/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts.map +1 -1
  15. package/dist/implementation/zodSchema/schemaTypes/CoListSchema.d.ts +1 -1
  16. package/dist/implementation/zodSchema/schemaTypes/CoListSchema.d.ts.map +1 -1
  17. package/dist/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +1 -1
  18. package/dist/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
  19. package/dist/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts +1 -1
  20. package/dist/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts.map +1 -1
  21. package/dist/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts +1 -1
  22. package/dist/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts.map +1 -1
  23. package/dist/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts +1 -1
  24. package/dist/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts.map +1 -1
  25. package/dist/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts +1 -1
  26. package/dist/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts.map +1 -1
  27. package/dist/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts +1 -1
  28. package/dist/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts.map +1 -1
  29. package/dist/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts +1 -1
  30. package/dist/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts.map +1 -1
  31. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts +1 -1
  32. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +1 -1
  33. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts +1 -1
  34. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +1 -1
  35. package/dist/implementation/zodSchema/unionUtils.d.ts +1 -1
  36. package/dist/implementation/zodSchema/unionUtils.d.ts.map +1 -1
  37. package/dist/implementation/zodSchema/zodCo.d.ts +1 -1
  38. package/dist/implementation/zodSchema/zodCo.d.ts.map +1 -1
  39. package/dist/implementation/zodSchema/zodReExport.d.ts +1 -1
  40. package/dist/implementation/zodSchema/zodReExport.d.ts.map +1 -1
  41. package/dist/implementation/zodSchema/zodSchema.d.ts +1 -1
  42. package/dist/implementation/zodSchema/zodSchema.d.ts.map +1 -1
  43. package/dist/index.js +2 -2
  44. package/dist/index.js.map +1 -1
  45. package/dist/testing.js +1 -1
  46. package/package.json +2 -2
  47. package/src/coValues/extensions/imageDef.ts +1 -1
  48. package/src/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.ts +5 -1
  49. package/src/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.ts +1 -1
  50. package/src/implementation/zodSchema/schemaTypes/AccountSchema.ts +1 -1
  51. package/src/implementation/zodSchema/schemaTypes/CoFeedSchema.ts +1 -1
  52. package/src/implementation/zodSchema/schemaTypes/CoListSchema.ts +1 -1
  53. package/src/implementation/zodSchema/schemaTypes/CoMapSchema.ts +1 -1
  54. package/src/implementation/zodSchema/schemaTypes/CoRecordSchema.ts +1 -1
  55. package/src/implementation/zodSchema/schemaTypes/FileStreamSchema.ts +1 -1
  56. package/src/implementation/zodSchema/schemaTypes/PlainTextSchema.ts +1 -1
  57. package/src/implementation/zodSchema/schemaTypes/RichTextSchema.ts +1 -1
  58. package/src/implementation/zodSchema/typeConverters/InstanceOfSchema.ts +1 -1
  59. package/src/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.ts +1 -1
  60. package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.ts +1 -1
  61. package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.ts +1 -1
  62. package/src/implementation/zodSchema/unionUtils.ts +1 -1
  63. package/src/implementation/zodSchema/zodCo.ts +1 -1
  64. package/src/implementation/zodSchema/zodReExport.ts +1 -1
  65. package/src/implementation/zodSchema/zodSchema.ts +1 -3
  66. package/src/tests/coMap.test-d.ts +1 -1
  67. package/src/tests/coMap.test.ts +1 -1
  68. package/src/tests/schemaUnion.test.ts +5 -2
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import {
3
3
  Account,
4
4
  CoFeed,
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import {
3
3
  Account,
4
4
  CoList,
@@ -1,5 +1,5 @@
1
1
  import { CoValueUniqueness } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  CoMap,
@@ -1,5 +1,5 @@
1
1
  import { CoValueUniqueness } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  CoMap,
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import {
3
3
  Account,
4
4
  AnonymousJazzAgent,
@@ -1,5 +1,5 @@
1
1
  import { RawCoPlainText } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import { Account, CoPlainText, Group } from "../../../internal.js";
4
4
  import { AnonymousJazzAgent } from "../../anonymousJazzAgent.js";
5
5
 
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import { Account, CoRichText, Group } from "../../../internal.js";
3
3
  import { AnonymousJazzAgent } from "../../anonymousJazzAgent.js";
4
4
 
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import {
3
3
  Account,
4
4
  CoFeed,
@@ -1,4 +1,4 @@
1
- import z from "zod/v4";
1
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
2
2
  import {
3
3
  Account,
4
4
  AnyCoFeedSchema,
@@ -1,5 +1,5 @@
1
1
  import { JsonValue } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  CoFeed,
@@ -1,5 +1,5 @@
1
1
  import { JsonValue } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  CoFeed,
@@ -1,5 +1,5 @@
1
1
  import { RawAccount, RawCoList, RawCoMap } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import { zodSchemaToCoSchema } from "./runtimeConverters/zodSchemaToCoSchema.js";
4
4
 
5
5
  export function schemaUnionDiscriminatorFor(
@@ -1,5 +1,5 @@
1
1
  import { CoValueUniqueness } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  AccountCreationProps,
@@ -34,4 +34,4 @@ export {
34
34
  int,
35
35
  optional,
36
36
  type ZodOptional,
37
- } from "zod/v4";
37
+ } from "jazz-tools-zod-v4-rn-patch/v4";
@@ -1,5 +1,5 @@
1
1
  import { LocalNode, RawAccount } from "cojson";
2
- import z from "zod/v4";
2
+ import z from "jazz-tools-zod-v4-rn-patch/v4";
3
3
  import {
4
4
  Account,
5
5
  AccountClass,
@@ -21,8 +21,6 @@ import { PlainTextSchema } from "./schemaTypes/PlainTextSchema.js";
21
21
  import { RichTextSchema } from "./schemaTypes/RichTextSchema.js";
22
22
  import { InstanceOfSchema } from "./typeConverters/InstanceOfSchema.js";
23
23
  import { InstanceOfSchemaCoValuesNullable } from "./typeConverters/InstanceOfSchemaCoValuesNullable.js";
24
- import { InstanceOrPrimitiveOfSchema } from "./typeConverters/InstanceOrPrimitiveOfSchema.js";
25
- import { InstanceOrPrimitiveOfSchemaCoValuesNullable } from "./typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.js";
26
24
 
27
25
  // defining an extra type for this, otherwise BaseSchema & {...} often
28
26
  // gets expanded into a n inferred type that's too long for typescript to print
@@ -280,7 +280,7 @@ describe("CoMap", async () => {
280
280
 
281
281
  const MapWithEnumOfMaps = co.map({
282
282
  name: z.string(),
283
- child: z.discriminatedUnion([ChildA, ChildB]),
283
+ child: z.discriminatedUnion("type", [ChildA, ChildB]),
284
284
  });
285
285
 
286
286
  const mapWithEnum = MapWithEnumOfMaps.create({
@@ -416,7 +416,7 @@ describe("CoMap", async () => {
416
416
 
417
417
  const MapWithEnumOfMaps = co.map({
418
418
  name: z.string(),
419
- child: z.discriminatedUnion([ChildA, ChildB]),
419
+ child: z.discriminatedUnion("type", [ChildA, ChildB]),
420
420
  });
421
421
 
422
422
  const mapWithEnum = MapWithEnumOfMaps.create({
@@ -24,7 +24,10 @@ const BlueButtonWidget = co.map({
24
24
  blueness: z.number(),
25
25
  });
26
26
 
27
- const ButtonWidget = z.discriminatedUnion([RedButtonWidget, BlueButtonWidget]);
27
+ const ButtonWidget = z.discriminatedUnion("type", [
28
+ RedButtonWidget,
29
+ BlueButtonWidget,
30
+ ]);
28
31
 
29
32
  const SliderWidget = co.map({
30
33
  type: z.literal("slider"),
@@ -37,7 +40,7 @@ const CheckboxWidget = co.map({
37
40
  checked: z.boolean(),
38
41
  });
39
42
 
40
- const WidgetUnion = z.discriminatedUnion([
43
+ const WidgetUnion = z.discriminatedUnion("type", [
41
44
  ButtonWidget,
42
45
  SliderWidget,
43
46
  CheckboxWidget,