jazz-tools 0.17.6 → 0.17.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.17.6 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.17.8 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,36 +100,22 @@
100
100
  ESM Build start
101
101
  CLI Cleaning output folder
102
102
  ESM Build start
103
- ESM dist/react/ssr.js 688.00 B
104
- ESM dist/react/ssr.js.map 1.12 KB
105
- ESM ⚡️ Build success in 17ms
106
- ESM dist/tiptap/index.js 564.00 B
107
- ESM dist/tiptap/index.js.map 1.21 KB
108
- ESM ⚡️ Build success in 15ms
109
103
  ESM dist/worker/index.js 2.31 KB
110
104
  ESM dist/worker/index.js.map 4.77 KB
111
- ESM ⚡️ Build success in 16ms
105
+ ESM ⚡️ Build success in 19ms
106
+ ESM dist/tiptap/index.js 564.00 B
107
+ ESM dist/tiptap/index.js.map 1.21 KB
108
+ ESM ⚡️ Build success in 19ms
109
+ ESM dist/react/ssr.js 688.00 B
110
+ ESM dist/react/ssr.js.map 1.12 KB
111
+ ESM ⚡️ Build success in 21ms
112
112
  ESM dist/react-core/index.js 8.41 KB
113
113
  ESM dist/react-core/testing.js 1.17 KB
114
114
  ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
115
- ESM dist/react-core/testing.js.map 1.82 KB
116
115
  ESM dist/react-core/index.js.map 20.68 KB
116
+ ESM dist/react-core/testing.js.map 1.82 KB
117
117
  ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
118
- ESM ⚡️ Build success in 18ms
119
- ESM dist/react-native/index.js 2.53 KB
120
- ESM dist/react-native/testing.js 120.00 B
121
- ESM dist/react-native/crypto.js 161.00 B
122
- ESM dist/react-native/index.js.map 5.68 KB
123
- ESM dist/react-native/testing.js.map 176.00 B
124
- ESM dist/react-native/crypto.js.map 197.00 B
125
- ESM ⚡️ Build success in 20ms
126
- ESM dist/expo/index.js 4.65 KB
127
- ESM dist/expo/crypto.js 153.00 B
128
- ESM dist/expo/testing.js 112.00 B
129
- ESM dist/expo/index.js.map 10.17 KB
130
- ESM dist/expo/crypto.js.map 189.00 B
131
- ESM dist/expo/testing.js.map 168.00 B
132
- ESM ⚡️ Build success in 25ms
118
+ ESM ⚡️ Build success in 21ms
133
119
  ESM dist/media/index.js 236.00 B
134
120
  ESM dist/media/index.browser.js 3.21 KB
135
121
  ESM dist/media/index.native.js 3.53 KB
@@ -138,46 +124,60 @@
138
124
  ESM dist/media/index.browser.js.map 6.02 KB
139
125
  ESM dist/media/index.native.js.map 6.52 KB
140
126
  ESM dist/media/chunk-E5J3WLQW.js.map 15.95 KB
141
- ESM ⚡️ Build success in 32ms
127
+ ESM ⚡️ Build success in 28ms
128
+ ESM dist/expo/index.js 4.65 KB
129
+ ESM dist/expo/testing.js 112.00 B
130
+ ESM dist/expo/crypto.js 153.00 B
131
+ ESM dist/expo/index.js.map 10.17 KB
132
+ ESM dist/expo/testing.js.map 168.00 B
133
+ ESM dist/expo/crypto.js.map 189.00 B
134
+ ESM ⚡️ Build success in 28ms
135
+ ESM dist/react-native/index.js 2.53 KB
136
+ ESM dist/react-native/testing.js 120.00 B
137
+ ESM dist/react-native/crypto.js 161.00 B
138
+ ESM dist/react-native/index.js.map 5.68 KB
139
+ ESM dist/react-native/testing.js.map 176.00 B
140
+ ESM dist/react-native/crypto.js.map 197.00 B
141
+ ESM ⚡️ Build success in 26ms
142
142
  ESM dist/browser/index.js 13.43 KB
143
143
  ESM dist/browser/index.js.map 28.65 KB
144
- ESM ⚡️ Build success in 34ms
144
+ ESM ⚡️ Build success in 44ms
145
+ ESM dist/react/index.js 24.55 KB
146
+ ESM dist/react/testing.js 122.00 B
147
+ ESM dist/react/index.js.map 52.68 KB
148
+ ESM dist/react/testing.js.map 165.00 B
149
+ ESM ⚡️ Build success in 41ms
145
150
  ESM dist/react-native-core/index.js 17.90 KB
146
151
  ESM dist/react-native-core/testing.js 119.00 B
147
152
  ESM dist/react-native-core/crypto.js 2.10 KB
148
153
  ESM dist/react-native-core/index.js.map 36.65 KB
149
154
  ESM dist/react-native-core/testing.js.map 175.00 B
150
155
  ESM dist/react-native-core/crypto.js.map 4.25 KB
151
- ESM ⚡️ Build success in 49ms
152
- ESM dist/react/index.js 24.55 KB
153
- ESM dist/react/testing.js 122.00 B
154
- ESM dist/react/testing.js.map 165.00 B
155
- ESM dist/react/index.js.map 52.68 KB
156
- ESM ⚡️ Build success in 53ms
157
- ESM dist/prosemirror/index.js 76.90 KB
158
- ESM dist/prosemirror/index.js.map 305.53 KB
159
- ESM ⚡️ Build success in 54ms
156
+ ESM ⚡️ Build success in 40ms
157
+ ESM dist/prosemirror/index.js 77.61 KB
158
+ ESM dist/prosemirror/index.js.map 306.96 KB
159
+ ESM ⚡️ Build success in 43ms
160
160
  ESM dist/inspector/index.js 60.40 KB
161
161
  ESM dist/inspector/index.js.map 107.91 KB
162
- ESM ⚡️ Build success in 65ms
162
+ ESM ⚡️ Build success in 56ms
163
163
  ESM dist/testing.js 6.97 KB
164
164
  ESM dist/index.js 25.96 KB
165
- ESM dist/chunk-SJHXI5AB.js 153.63 KB
165
+ ESM dist/chunk-L3GGWY3X.js 154.00 KB
166
166
  ESM dist/testing.js.map 13.65 KB
167
167
  ESM dist/index.js.map 52.62 KB
168
- ESM dist/chunk-SJHXI5AB.js.map 368.28 KB
169
- ESM ⚡️ Build success in 84ms
168
+ ESM dist/chunk-L3GGWY3X.js.map 368.95 KB
169
+ ESM ⚡️ Build success in 75ms
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-I7L56H6B.js 1.53 MB
173
173
  ESM dist/inspector/custom-element-I7L56H6B.js.map 2.35 MB
174
- ESM ⚡️ Build success in 119ms
174
+ ESM ⚡️ Build success in 113ms
175
175
 
176
- > jazz-tools@0.17.6 types /home/runner/_work/jazz/jazz/packages/jazz-tools
176
+ > jazz-tools@0.17.8 types /home/runner/_work/jazz/jazz/packages/jazz-tools
177
177
  > tsc --outDir dist
178
178
 
179
179
 
180
- > jazz-tools@0.17.6 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
180
+ > jazz-tools@0.17.8 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,24 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.17.8
4
+
5
+ ### Patch Changes
6
+
7
+ - ac3e694: Fixed an issue where CoValue schemas could be incorrectly passed to `co.map` and `co.profile` schema definers.
8
+ - 6dbb053: Prosemirror: fix RangeError triggered when creating invalid HTML
9
+ - 1a182f0: Add missing BaseProfileShape export
10
+ - cojson@0.17.8
11
+ - cojson-storage-indexeddb@0.17.8
12
+ - cojson-transport-ws@0.17.8
13
+
14
+ ## 0.17.7
15
+
16
+ ### Patch Changes
17
+
18
+ - cojson@0.17.7
19
+ - cojson-storage-indexeddb@0.17.7
20
+ - cojson-transport-ws@0.17.7
21
+
3
22
  ## 0.17.6
4
23
 
5
24
  ### Patch Changes
@@ -115,7 +115,7 @@ function containsCoValueSchema(shape) {
115
115
  return Object.values(removeGetters(shape ?? {})).some(isAnyCoValueSchema);
116
116
  }
117
117
  function isAnyCoValueSchema(schema) {
118
- return "collaborative" in schema && schema.collaborative === true;
118
+ return typeof schema === "object" && schema !== null && "collaborative" in schema && schema.collaborative === true;
119
119
  }
120
120
 
121
121
  // src/tools/coValues/CoValueBase.ts
@@ -4007,6 +4007,11 @@ var RichTextSchema = class {
4007
4007
 
4008
4008
  // src/tools/implementation/zodSchema/zodCo.ts
4009
4009
  var coMapDefiner = (shape) => {
4010
+ if (isAnyCoValueSchema2(shape)) {
4011
+ throw new Error(
4012
+ "co.map() expects an object as its argument, not a CoValue schema"
4013
+ );
4014
+ }
4010
4015
  const coreSchema = createCoreCoMapSchema(shape);
4011
4016
  return hydrateCoreCoValueSchema(coreSchema);
4012
4017
  };
@@ -4029,6 +4034,11 @@ var coListDefiner = (element) => {
4029
4034
  return hydrateCoreCoValueSchema(coreSchema);
4030
4035
  };
4031
4036
  var coProfileDefiner = (shape = {}) => {
4037
+ if (isAnyCoValueSchema2(shape)) {
4038
+ throw new Error(
4039
+ "co.profile() expects an object as its argument, not a CoValue schema"
4040
+ );
4041
+ }
4032
4042
  const ehnancedShape = Object.assign(shape, {
4033
4043
  name: z.string(),
4034
4044
  inbox: z.optional(z.string()),
@@ -4557,7 +4567,7 @@ function schemaFieldToCoFieldDef(schema) {
4557
4567
 
4558
4568
  // src/tools/implementation/zodSchema/runtimeConverters/coValueSchemaTransformation.ts
4559
4569
  function isAnyCoValueSchema2(schema) {
4560
- return "collaborative" in schema && schema.collaborative === true;
4570
+ return typeof schema === "object" && schema !== null && "collaborative" in schema && schema.collaborative === true;
4561
4571
  }
4562
4572
  function isCoValueSchema(schema) {
4563
4573
  return isAnyCoValueSchema2(schema) && "getCoValueClass" in schema;
@@ -5372,4 +5382,4 @@ export {
5372
5382
  JazzContextManager
5373
5383
  };
5374
5384
  /* istanbul ignore file -- @preserve */
5375
- //# sourceMappingURL=chunk-SJHXI5AB.js.map
5385
+ //# sourceMappingURL=chunk-L3GGWY3X.js.map