jazz-tools 0.17.13 → 0.17.15

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.17.13 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.17.15 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"}
@@ -100,15 +100,15 @@
100
100
  ESM Build start
101
101
  CLI Cleaning output folder
102
102
  ESM Build start
103
- ESM dist/tiptap/index.js 564.00 B
104
- ESM dist/tiptap/index.js.map 1.21 KB
105
- ESM ⚡️ Build success in 22ms
106
103
  ESM dist/react/ssr.js 688.00 B
107
104
  ESM dist/react/ssr.js.map 1.12 KB
108
- ESM ⚡️ Build success in 26ms
105
+ ESM ⚡️ Build success in 16ms
109
106
  ESM dist/worker/index.js 2.31 KB
110
107
  ESM dist/worker/index.js.map 4.77 KB
111
- ESM ⚡️ Build success in 23ms
108
+ ESM ⚡️ Build success in 15ms
109
+ ESM dist/tiptap/index.js 564.00 B
110
+ ESM dist/tiptap/index.js.map 1.21 KB
111
+ ESM ⚡️ Build success in 17ms
112
112
  ESM dist/media/index.js 236.00 B
113
113
  ESM dist/media/index.browser.js 3.21 KB
114
114
  ESM dist/media/index.native.js 3.53 KB
@@ -117,67 +117,67 @@
117
117
  ESM dist/media/index.browser.js.map 6.02 KB
118
118
  ESM dist/media/index.native.js.map 6.52 KB
119
119
  ESM dist/media/chunk-E5J3WLQW.js.map 15.95 KB
120
- ESM ⚡️ Build success in 30ms
120
+ ESM ⚡️ Build success in 24ms
121
121
  ESM dist/react-native/index.js 2.53 KB
122
- ESM dist/react-native/testing.js 120.00 B
123
122
  ESM dist/react-native/crypto.js 161.00 B
123
+ ESM dist/react-native/testing.js 120.00 B
124
124
  ESM dist/react-native/index.js.map 5.68 KB
125
- ESM dist/react-native/testing.js.map 176.00 B
126
125
  ESM dist/react-native/crypto.js.map 197.00 B
127
- ESM ⚡️ Build success in 30ms
126
+ ESM dist/react-native/testing.js.map 176.00 B
127
+ ESM ⚡️ Build success in 22ms
128
128
  ESM dist/react-core/index.js 8.41 KB
129
129
  ESM dist/react-core/testing.js 1.17 KB
130
130
  ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
131
131
  ESM dist/react-core/index.js.map 20.68 KB
132
132
  ESM dist/react-core/testing.js.map 1.82 KB
133
133
  ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
134
- ESM ⚡️ Build success in 33ms
134
+ ESM ⚡️ Build success in 23ms
135
+ ESM dist/browser/index.js 13.43 KB
136
+ ESM dist/browser/index.js.map 28.65 KB
137
+ ESM ⚡️ Build success in 27ms
135
138
  ESM dist/expo/index.js 4.68 KB
136
139
  ESM dist/expo/testing.js 112.00 B
137
140
  ESM dist/expo/crypto.js 153.00 B
138
141
  ESM dist/expo/index.js.map 10.23 KB
139
142
  ESM dist/expo/testing.js.map 168.00 B
140
143
  ESM dist/expo/crypto.js.map 189.00 B
141
- ESM ⚡️ Build success in 37ms
142
- ESM dist/browser/index.js 13.43 KB
143
- ESM dist/browser/index.js.map 28.65 KB
144
- ESM ⚡️ Build success in 39ms
145
- ESM dist/react/index.js 24.62 KB
144
+ ESM ⚡️ Build success in 27ms
146
145
  ESM dist/react/testing.js 122.00 B
146
+ ESM dist/react/index.js 24.62 KB
147
147
  ESM dist/react/testing.js.map 165.00 B
148
148
  ESM dist/react/index.js.map 52.88 KB
149
- ESM ⚡️ Build success in 39ms
149
+ ESM ⚡️ Build success in 32ms
150
150
  ESM dist/react-native-core/index.js 17.90 KB
151
151
  ESM dist/react-native-core/testing.js 119.00 B
152
152
  ESM dist/react-native-core/crypto.js 2.10 KB
153
- ESM dist/react-native-core/testing.js.map 175.00 B
154
153
  ESM dist/react-native-core/index.js.map 36.65 KB
154
+ ESM dist/react-native-core/testing.js.map 175.00 B
155
155
  ESM dist/react-native-core/crypto.js.map 4.25 KB
156
- ESM ⚡️ Build success in 43ms
156
+ ESM ⚡️ Build success in 35ms
157
157
  ESM dist/prosemirror/index.js 77.61 KB
158
158
  ESM dist/prosemirror/index.js.map 306.96 KB
159
- ESM ⚡️ Build success in 49ms
159
+ ESM ⚡️ Build success in 43ms
160
160
  ESM dist/inspector/index.js 61.52 KB
161
161
  ESM dist/inspector/index.js.map 109.97 KB
162
- ESM ⚡️ Build success in 66ms
163
- ESM dist/testing.js 7.10 KB
162
+ ESM ⚡️ Build success in 56ms
164
163
  ESM dist/index.js 26.03 KB
165
- ESM dist/chunk-SFP5PBPX.js 154.10 KB
166
- ESM dist/testing.js.map 14.00 KB
164
+ ESM dist/testing.js 7.10 KB
165
+ ESM dist/chunk-LZOF6WP5.js 154.80 KB
167
166
  ESM dist/index.js.map 52.73 KB
168
- ESM dist/chunk-SFP5PBPX.js.map 369.13 KB
169
- ESM ⚡️ Build success in 86ms
167
+ ESM dist/testing.js.map 14.00 KB
168
+ ESM dist/chunk-LZOF6WP5.js.map 370.75 KB
169
+ ESM ⚡️ Build success in 74ms
170
170
  ESM dist/inspector/register-custom-element.js 218.00 B
171
171
  ESM dist/inspector/register-custom-element.js.map 314.00 B
172
172
  ESM dist/inspector/custom-element-ZSNTCECD.js 1.53 MB
173
173
  ESM dist/inspector/custom-element-ZSNTCECD.js.map 2.35 MB
174
- ESM ⚡️ Build success in 121ms
174
+ ESM ⚡️ Build success in 111ms
175
175
 
176
- > jazz-tools@0.17.13 types /home/runner/_work/jazz/jazz/packages/jazz-tools
176
+ > jazz-tools@0.17.15 types /home/runner/_work/jazz/jazz/packages/jazz-tools
177
177
  > tsc --outDir dist
178
178
 
179
179
 
180
- > jazz-tools@0.17.13 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
180
+ > jazz-tools@0.17.15 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
181
181
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
182
182
 
183
183
  src/svelte -> dist/svelte
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.17.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [c9871ad]
8
+ - cojson@0.17.15
9
+ - cojson-storage-indexeddb@0.17.15
10
+ - cojson-transport-ws@0.17.15
11
+
12
+ ## 0.17.14
13
+
14
+ ### Patch Changes
15
+
16
+ - cc2f774: Detect incompatible Zod schemas when creating `co.map`s and `co.profile`s
17
+ - Updated dependencies [1094b7c]
18
+ - Updated dependencies [6378ad5]
19
+ - cojson@0.17.14
20
+ - cojson-storage-indexeddb@0.17.14
21
+ - cojson-transport-ws@0.17.14
22
+
3
23
  ## 0.17.13
4
24
 
5
25
  ### Patch Changes
@@ -4014,12 +4014,27 @@ var RichTextSchema = class {
4014
4014
  };
4015
4015
 
4016
4016
  // src/tools/implementation/zodSchema/zodCo.ts
4017
- var coMapDefiner = (shape) => {
4017
+ var isZodV4Schema = (schema) => {
4018
+ return typeof schema === "object" && schema !== null && "_zod" in schema;
4019
+ };
4020
+ var isValidShape = (shape) => {
4021
+ return Object.values(removeGetters(shape)).every(
4022
+ (schema) => isZodV4Schema(schema) || isAnyCoValueSchema2(schema) || isCoValueClass(schema)
4023
+ );
4024
+ };
4025
+ var validateCoMapShape = (shape) => {
4018
4026
  if (isAnyCoValueSchema2(shape)) {
4019
4027
  throw new Error(
4020
4028
  "co.map() expects an object as its argument, not a CoValue schema"
4021
4029
  );
4030
+ } else if (!isValidShape(shape)) {
4031
+ throw new Error(
4032
+ "co.map() supports only Zod v4 schemas and CoValue schemas"
4033
+ );
4022
4034
  }
4035
+ };
4036
+ var coMapDefiner = (shape) => {
4037
+ validateCoMapShape(shape);
4023
4038
  const coreSchema = createCoreCoMapSchema(shape);
4024
4039
  return hydrateCoreCoValueSchema(coreSchema);
4025
4040
  };
@@ -4041,12 +4056,19 @@ var coListDefiner = (element) => {
4041
4056
  const coreSchema = createCoreCoListSchema(element);
4042
4057
  return hydrateCoreCoValueSchema(coreSchema);
4043
4058
  };
4044
- var coProfileDefiner = (shape = {}) => {
4059
+ var validateProfileShape = (shape) => {
4045
4060
  if (isAnyCoValueSchema2(shape)) {
4046
4061
  throw new Error(
4047
4062
  "co.profile() expects an object as its argument, not a CoValue schema"
4048
4063
  );
4064
+ } else if (!isValidShape(shape)) {
4065
+ throw new Error(
4066
+ "co.profile() supports only Zod v4 schemas and CoValue schemas"
4067
+ );
4049
4068
  }
4069
+ };
4070
+ var coProfileDefiner = (shape = {}) => {
4071
+ validateProfileShape(shape);
4050
4072
  const ehnancedShape = Object.assign(shape, {
4051
4073
  name: z.string(),
4052
4074
  inbox: z.optional(z.string()),
@@ -5390,4 +5412,4 @@ export {
5390
5412
  JazzContextManager
5391
5413
  };
5392
5414
  /* istanbul ignore file -- @preserve */
5393
- //# sourceMappingURL=chunk-SFP5PBPX.js.map
5415
+ //# sourceMappingURL=chunk-LZOF6WP5.js.map