jazz-tools 0.8.23 → 0.8.27

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.8.27
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [75fdff4]
8
+ - cojson@0.8.27
9
+
3
10
  ## 0.8.23
4
11
 
5
12
  ### Patch Changes
@@ -6,6 +6,7 @@ import { CoValueBase, } from "../internal.js";
6
6
  * Declare your union types by extending `SchemaUnion.Of(...)` and passing a discriminator function
7
7
  * that determines which concrete type to use based on the raw data.
8
8
  *
9
+ * @example
9
10
  * ```ts
10
11
  * import { SchemaUnion, CoMap } from "jazz-tools";
11
12
  *
@@ -37,8 +38,9 @@ import { CoValueBase, } from "../internal.js";
37
38
  * When loading a SchemaUnion, the correct subclass will be instantiated based on the discriminator.
38
39
  * You can narrow the returned instance to a subclass by using `instanceof` like so:
39
40
  *
41
+ * @example
40
42
  * ```ts
41
- * const widget = await WidgetUnion.load(id, me, {});
43
+ * const widget = await loadCoValue(WidgetUnion, id, me, {});
42
44
  * if (widget instanceof ButtonWidget) {
43
45
  * console.log(widget.label);
44
46
  * } else if (widget instanceof SliderWidget) {
@@ -1 +1 @@
1
- {"version":3,"file":"schemaUnion.js","sourceRoot":"","sources":["../../../src/coValues/schemaUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GAGZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,OAAgB,WAAY,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,CACP,aAAsE;QAEtE,OAAO,MAAM,gBAAiB,SAAQ,WAAW;YAC/C,MAAM,CAAU,OAAO,CAErB,GAAc;gBAEd,MAAM,aAAa,GAAG,aAAa,CACjC,GAAgB,CACiC,CAAC;gBACpD,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpC,CAAC;SACiD,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,aAAa;IACb,MAAM,CAAC,OAAO,CAA2C,GAAc;QACrE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF"}
1
+ {"version":3,"file":"schemaUnion.js","sourceRoot":"","sources":["../../../src/coValues/schemaUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GAGZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,OAAgB,WAAY,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,CACP,aAAsE;QAEtE,OAAO,MAAM,gBAAiB,SAAQ,WAAW;YAC/C,MAAM,CAAU,OAAO,CAErB,GAAc;gBAEd,MAAM,aAAa,GAAG,aAAa,CACjC,GAAgB,CACiC,CAAC;gBACpD,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpC,CAAC;SACiD,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,aAAa;IACb,MAAM,CAAC,OAAO,CAA2C,GAAc;QACrE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -6,6 +6,7 @@ import { CoValueBase, } from "../internal.js";
6
6
  * Declare your union types by extending `SchemaUnion.Of(...)` and passing a discriminator function
7
7
  * that determines which concrete type to use based on the raw data.
8
8
  *
9
+ * @example
9
10
  * ```ts
10
11
  * import { SchemaUnion, CoMap } from "jazz-tools";
11
12
  *
@@ -37,8 +38,9 @@ import { CoValueBase, } from "../internal.js";
37
38
  * When loading a SchemaUnion, the correct subclass will be instantiated based on the discriminator.
38
39
  * You can narrow the returned instance to a subclass by using `instanceof` like so:
39
40
  *
41
+ * @example
40
42
  * ```ts
41
- * const widget = await WidgetUnion.load(id, me, {});
43
+ * const widget = await loadCoValue(WidgetUnion, id, me, {});
42
44
  * if (widget instanceof ButtonWidget) {
43
45
  * console.log(widget.label);
44
46
  * } else if (widget instanceof SliderWidget) {
@@ -1 +1 @@
1
- {"version":3,"file":"schemaUnion.js","sourceRoot":"","sources":["../../../src/coValues/schemaUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GAGZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,OAAgB,WAAY,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,CACP,aAAsE;QAEtE,OAAO,MAAM,gBAAiB,SAAQ,WAAW;YAC/C,MAAM,CAAU,OAAO,CAErB,GAAc;gBAEd,MAAM,aAAa,GAAG,aAAa,CACjC,GAAgB,CACiC,CAAC;gBACpD,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpC,CAAC;SACiD,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,aAAa;IACb,MAAM,CAAC,OAAO,CAA2C,GAAc;QACrE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF"}
1
+ {"version":3,"file":"schemaUnion.js","sourceRoot":"","sources":["../../../src/coValues/schemaUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GAGZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,OAAgB,WAAY,SAAQ,WAAW;IACnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,EAAE,CACP,aAAsE;QAEtE,OAAO,MAAM,gBAAiB,SAAQ,WAAW;YAC/C,MAAM,CAAU,OAAO,CAErB,GAAc;gBAEd,MAAM,aAAa,GAAG,aAAa,CACjC,GAAgB,CACiC,CAAC;gBACpD,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACpC,CAAC;SACiD,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,aAAa;IACb,MAAM,CAAC,OAAO,CAA2C,GAAc;QACrE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF"}
package/package.json CHANGED
@@ -19,10 +19,10 @@
19
19
  },
20
20
  "type": "module",
21
21
  "license": "MIT",
22
- "version": "0.8.23",
22
+ "version": "0.8.27",
23
23
  "dependencies": {
24
24
  "fast-check": "^3.17.2",
25
- "cojson": "0.8.23"
25
+ "cojson": "0.8.27"
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.3.3",
@@ -12,6 +12,7 @@ import {
12
12
  * Declare your union types by extending `SchemaUnion.Of(...)` and passing a discriminator function
13
13
  * that determines which concrete type to use based on the raw data.
14
14
  *
15
+ * @example
15
16
  * ```ts
16
17
  * import { SchemaUnion, CoMap } from "jazz-tools";
17
18
  *
@@ -43,8 +44,9 @@ import {
43
44
  * When loading a SchemaUnion, the correct subclass will be instantiated based on the discriminator.
44
45
  * You can narrow the returned instance to a subclass by using `instanceof` like so:
45
46
  *
47
+ * @example
46
48
  * ```ts
47
- * const widget = await WidgetUnion.load(id, me, {});
49
+ * const widget = await loadCoValue(WidgetUnion, id, me, {});
48
50
  * if (widget instanceof ButtonWidget) {
49
51
  * console.log(widget.label);
50
52
  * } else if (widget instanceof SliderWidget) {