jazz-tools 0.17.7 → 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.
- package/.turbo/turbo-build.log +38 -38
- package/CHANGELOG.md +11 -0
- package/dist/{chunk-SJHXI5AB.js → chunk-L3GGWY3X.js} +13 -3
- package/dist/chunk-L3GGWY3X.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/prosemirror/index.js +36 -12
- package/dist/prosemirror/index.js.map +1 -1
- package/dist/prosemirror/lib/sync.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/exports.d.ts +1 -1
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/runtimeConverters/coValueSchemaTransformation.d.ts +1 -1
- package/dist/tools/implementation/zodSchema/runtimeConverters/coValueSchemaTransformation.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/prosemirror/lib/sync.ts +46 -16
- package/src/prosemirror/tests/plugin.test.ts +87 -31
- package/src/tools/exports.ts +1 -0
- package/src/tools/implementation/zodSchema/runtimeConverters/coValueSchemaTransformation.ts +7 -2
- package/src/tools/implementation/zodSchema/zodCo.ts +11 -0
- package/src/tools/implementation/zodSchema/zodReExport.ts +7 -2
- package/src/tools/tests/account.test.ts +6 -0
- package/src/tools/tests/coMap.test.ts +6 -0
- package/dist/chunk-SJHXI5AB.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.17.
|
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
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -100,15 +100,22 @@
|
|
100
100
|
[34mESM[39m Build start
|
101
101
|
[34mCLI[39m Cleaning output folder
|
102
102
|
[34mESM[39m Build start
|
103
|
-
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
104
|
-
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
105
|
-
[32mESM[39m ⚡️ Build success in 16ms
|
106
|
-
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
107
|
-
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
108
|
-
[32mESM[39m ⚡️ Build success in 15ms
|
109
103
|
[32mESM[39m [1mdist/worker/index.js [22m[32m2.31 KB[39m
|
110
104
|
[32mESM[39m [1mdist/worker/index.js.map [22m[32m4.77 KB[39m
|
111
|
-
[32mESM[39m ⚡️ Build success in
|
105
|
+
[32mESM[39m ⚡️ Build success in 19ms
|
106
|
+
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
107
|
+
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
108
|
+
[32mESM[39m ⚡️ Build success in 19ms
|
109
|
+
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
110
|
+
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
111
|
+
[32mESM[39m ⚡️ Build success in 21ms
|
112
|
+
[32mESM[39m [1mdist/react-core/index.js [22m[32m8.41 KB[39m
|
113
|
+
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.17 KB[39m
|
114
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
115
|
+
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m20.68 KB[39m
|
116
|
+
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.82 KB[39m
|
117
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
118
|
+
[32mESM[39m ⚡️ Build success in 21ms
|
112
119
|
[32mESM[39m [1mdist/media/index.js [22m[32m236.00 B[39m
|
113
120
|
[32mESM[39m [1mdist/media/index.browser.js [22m[32m3.21 KB[39m
|
114
121
|
[32mESM[39m [1mdist/media/index.native.js [22m[32m3.53 KB[39m
|
@@ -117,67 +124,60 @@
|
|
117
124
|
[32mESM[39m [1mdist/media/index.browser.js.map [22m[32m6.02 KB[39m
|
118
125
|
[32mESM[39m [1mdist/media/index.native.js.map [22m[32m6.52 KB[39m
|
119
126
|
[32mESM[39m [1mdist/media/chunk-E5J3WLQW.js.map [22m[32m15.95 KB[39m
|
120
|
-
[32mESM[39m ⚡️ Build success in
|
121
|
-
[32mESM[39m [1mdist/
|
122
|
-
[32mESM[39m [1mdist/
|
123
|
-
[32mESM[39m [1mdist/
|
124
|
-
[32mESM[39m [1mdist/
|
125
|
-
[32mESM[39m [1mdist/
|
126
|
-
[32mESM[39m [1mdist/
|
127
|
-
[32mESM[39m ⚡️ Build success in
|
127
|
+
[32mESM[39m ⚡️ Build success in 28ms
|
128
|
+
[32mESM[39m [1mdist/expo/index.js [22m[32m4.65 KB[39m
|
129
|
+
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
130
|
+
[32mESM[39m [1mdist/expo/crypto.js [22m[32m153.00 B[39m
|
131
|
+
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.17 KB[39m
|
132
|
+
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
133
|
+
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m189.00 B[39m
|
134
|
+
[32mESM[39m ⚡️ Build success in 28ms
|
128
135
|
[32mESM[39m [1mdist/react-native/index.js [22m[32m2.53 KB[39m
|
129
136
|
[32mESM[39m [1mdist/react-native/testing.js [22m[32m120.00 B[39m
|
130
137
|
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m161.00 B[39m
|
131
138
|
[32mESM[39m [1mdist/react-native/index.js.map [22m[32m5.68 KB[39m
|
132
139
|
[32mESM[39m [1mdist/react-native/testing.js.map [22m[32m176.00 B[39m
|
133
140
|
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m197.00 B[39m
|
134
|
-
[32mESM[39m ⚡️ Build success in
|
141
|
+
[32mESM[39m ⚡️ Build success in 26ms
|
135
142
|
[32mESM[39m [1mdist/browser/index.js [22m[32m13.43 KB[39m
|
136
143
|
[32mESM[39m [1mdist/browser/index.js.map [22m[32m28.65 KB[39m
|
137
|
-
[32mESM[39m ⚡️ Build success in
|
138
|
-
[32mESM[39m [1mdist/expo/index.js [22m[32m4.65 KB[39m
|
139
|
-
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
140
|
-
[32mESM[39m [1mdist/expo/crypto.js [22m[32m153.00 B[39m
|
141
|
-
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.17 KB[39m
|
142
|
-
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
143
|
-
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m189.00 B[39m
|
144
|
-
[32mESM[39m ⚡️ Build success in 36ms
|
144
|
+
[32mESM[39m ⚡️ Build success in 44ms
|
145
145
|
[32mESM[39m [1mdist/react/index.js [22m[32m24.55 KB[39m
|
146
146
|
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
147
147
|
[32mESM[39m [1mdist/react/index.js.map [22m[32m52.68 KB[39m
|
148
148
|
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
149
|
-
[32mESM[39m ⚡️ Build success in
|
149
|
+
[32mESM[39m ⚡️ Build success in 41ms
|
150
150
|
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m17.90 KB[39m
|
151
151
|
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
152
152
|
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.10 KB[39m
|
153
153
|
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m36.65 KB[39m
|
154
154
|
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
155
155
|
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m4.25 KB[39m
|
156
|
-
[32mESM[39m ⚡️ Build success in
|
157
|
-
[32mESM[39m [1mdist/prosemirror/index.js [22m[
|
158
|
-
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[
|
159
|
-
[32mESM[39m ⚡️ Build success in
|
156
|
+
[32mESM[39m ⚡️ Build success in 40ms
|
157
|
+
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m77.61 KB[39m
|
158
|
+
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m306.96 KB[39m
|
159
|
+
[32mESM[39m ⚡️ Build success in 43ms
|
160
160
|
[32mESM[39m [1mdist/inspector/index.js [22m[32m60.40 KB[39m
|
161
161
|
[32mESM[39m [1mdist/inspector/index.js.map [22m[32m107.91 KB[39m
|
162
|
-
[32mESM[39m ⚡️ Build success in
|
163
|
-
[32mESM[39m [1mdist/index.js [22m[32m25.96 KB[39m
|
162
|
+
[32mESM[39m ⚡️ Build success in 56ms
|
164
163
|
[32mESM[39m [1mdist/testing.js [22m[32m6.97 KB[39m
|
165
|
-
[32mESM[39m [1mdist/
|
166
|
-
[32mESM[39m [1mdist/
|
164
|
+
[32mESM[39m [1mdist/index.js [22m[32m25.96 KB[39m
|
165
|
+
[32mESM[39m [1mdist/chunk-L3GGWY3X.js [22m[32m154.00 KB[39m
|
167
166
|
[32mESM[39m [1mdist/testing.js.map [22m[32m13.65 KB[39m
|
168
|
-
[32mESM[39m [1mdist/
|
167
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m52.62 KB[39m
|
168
|
+
[32mESM[39m [1mdist/chunk-L3GGWY3X.js.map [22m[32m368.95 KB[39m
|
169
169
|
[32mESM[39m ⚡️ Build success in 75ms
|
170
170
|
[32mESM[39m [1mdist/inspector/register-custom-element.js [22m[32m218.00 B[39m
|
171
171
|
[32mESM[39m [1mdist/inspector/register-custom-element.js.map [22m[32m314.00 B[39m
|
172
172
|
[32mESM[39m [1mdist/inspector/custom-element-I7L56H6B.js [22m[32m1.53 MB[39m
|
173
173
|
[32mESM[39m [1mdist/inspector/custom-element-I7L56H6B.js.map [22m[32m2.35 MB[39m
|
174
|
-
[32mESM[39m ⚡️ Build success in
|
174
|
+
[32mESM[39m ⚡️ Build success in 113ms
|
175
175
|
|
176
|
-
> jazz-tools@0.17.
|
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.
|
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,16 @@
|
|
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
|
+
|
3
14
|
## 0.17.7
|
4
15
|
|
5
16
|
### 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-
|
5385
|
+
//# sourceMappingURL=chunk-L3GGWY3X.js.map
|