jazz-tools 0.16.3 → 0.16.4
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 +34 -34
- package/CHANGELOG.md +11 -0
- package/dist/{chunk-RAMDW4VL.js → chunk-74LZG2M3.js} +30 -8
- package/dist/chunk-74LZG2M3.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/coValues/interfaces.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +20 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/zodSchema.d.ts +1 -1
- package/dist/tools/implementation/zodSchema/zodSchema.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/tools/coValues/interfaces.ts +2 -3
- package/src/tools/implementation/zodSchema/schemaTypes/CoMapSchema.ts +59 -2
- package/src/tools/implementation/zodSchema/zodSchema.ts +1 -1
- package/src/tools/tests/coMap.test-d.ts +143 -0
- package/src/tools/tests/coMap.test.ts +100 -53
- package/src/tools/tests/load.test.ts +19 -0
- package/dist/chunk-RAMDW4VL.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.16.
|
2
|
+
> jazz-tools@0.16.4 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"}
|
@@ -107,81 +107,81 @@
|
|
107
107
|
[34mESM[39m Build start
|
108
108
|
[34mCLI[39m Cleaning output folder
|
109
109
|
[34mESM[39m Build start
|
110
|
+
[32mESM[39m [1mdist/browser-media-images/index.js [22m[32m2.55 KB[39m
|
111
|
+
[32mESM[39m [1mdist/browser-media-images/index.js.map [22m[32m5.46 KB[39m
|
112
|
+
[32mESM[39m ⚡️ Build success in 25ms
|
113
|
+
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
114
|
+
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
115
|
+
[32mESM[39m ⚡️ Build success in 27ms
|
110
116
|
[32mESM[39m [1mdist/worker/index.js [22m[32m2.31 KB[39m
|
111
117
|
[32mESM[39m [1mdist/worker/index.js.map [22m[32m4.77 KB[39m
|
112
|
-
[32mESM[39m ⚡️ Build success in
|
118
|
+
[32mESM[39m ⚡️ Build success in 25ms
|
113
119
|
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
114
120
|
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
115
|
-
[32mESM[39m ⚡️ Build success in
|
116
|
-
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
117
|
-
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
118
|
-
[32mESM[39m ⚡️ Build success in 19ms
|
119
|
-
[32mESM[39m [1mdist/browser-media-images/index.js [22m[32m2.55 KB[39m
|
120
|
-
[32mESM[39m [1mdist/browser-media-images/index.js.map [22m[32m5.46 KB[39m
|
121
|
-
[32mESM[39m ⚡️ Build success in 21ms
|
121
|
+
[32mESM[39m ⚡️ Build success in 26ms
|
122
122
|
[32mESM[39m [1mdist/react-native-media-images/index.js [22m[32m6.19 KB[39m
|
123
123
|
[32mESM[39m [1mdist/react-native-media-images/index.js.map [22m[32m10.96 KB[39m
|
124
|
-
[32mESM[39m ⚡️ Build success in
|
124
|
+
[32mESM[39m ⚡️ Build success in 30ms
|
125
125
|
[32mESM[39m [1mdist/react-core/index.js [22m[32m8.42 KB[39m
|
126
126
|
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.17 KB[39m
|
127
127
|
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
128
128
|
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m20.69 KB[39m
|
129
129
|
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.82 KB[39m
|
130
130
|
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
131
|
-
[32mESM[39m ⚡️ Build success in
|
132
|
-
[32mESM[39m [1mdist/
|
133
|
-
[32mESM[39m [1mdist/
|
134
|
-
[32mESM[39m
|
131
|
+
[32mESM[39m ⚡️ Build success in 32ms
|
132
|
+
[32mESM[39m [1mdist/expo/index.js [22m[32m4.65 KB[39m
|
133
|
+
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
134
|
+
[32mESM[39m [1mdist/expo/crypto.js [22m[32m109.00 B[39m
|
135
|
+
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.17 KB[39m
|
136
|
+
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
137
|
+
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m166.00 B[39m
|
138
|
+
[32mESM[39m ⚡️ Build success in 37ms
|
135
139
|
[32mESM[39m [1mdist/react-native/index.js [22m[32m2.53 KB[39m
|
136
140
|
[32mESM[39m [1mdist/react-native/testing.js [22m[32m120.00 B[39m
|
137
141
|
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m117.00 B[39m
|
138
142
|
[32mESM[39m [1mdist/react-native/index.js.map [22m[32m5.68 KB[39m
|
139
143
|
[32mESM[39m [1mdist/react-native/testing.js.map [22m[32m176.00 B[39m
|
140
144
|
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m174.00 B[39m
|
141
|
-
[32mESM[39m ⚡️ Build success in
|
142
|
-
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
145
|
+
[32mESM[39m ⚡️ Build success in 41ms
|
143
146
|
[32mESM[39m [1mdist/react/index.js [22m[32m20.70 KB[39m
|
144
|
-
[32mESM[39m [1mdist/react/testing.js
|
147
|
+
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
145
148
|
[32mESM[39m [1mdist/react/index.js.map [22m[32m34.14 KB[39m
|
146
|
-
[32mESM[39m
|
147
|
-
[32mESM[39m
|
148
|
-
[32mESM[39m [1mdist/
|
149
|
-
[32mESM[39m [1mdist/
|
150
|
-
[32mESM[39m
|
151
|
-
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m166.00 B[39m
|
152
|
-
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
153
|
-
[32mESM[39m ⚡️ Build success in 39ms
|
149
|
+
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
150
|
+
[32mESM[39m ⚡️ Build success in 43ms
|
151
|
+
[32mESM[39m [1mdist/browser/index.js [22m[32m13.43 KB[39m
|
152
|
+
[32mESM[39m [1mdist/browser/index.js.map [22m[32m28.65 KB[39m
|
153
|
+
[32mESM[39m ⚡️ Build success in 49ms
|
154
154
|
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m16.95 KB[39m
|
155
155
|
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
156
156
|
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.10 KB[39m
|
157
157
|
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m33.57 KB[39m
|
158
158
|
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
159
159
|
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m4.25 KB[39m
|
160
|
-
[32mESM[39m ⚡️ Build success in
|
160
|
+
[32mESM[39m ⚡️ Build success in 54ms
|
161
161
|
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m76.90 KB[39m
|
162
162
|
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m305.53 KB[39m
|
163
|
-
[32mESM[39m ⚡️ Build success in
|
163
|
+
[32mESM[39m ⚡️ Build success in 61ms
|
164
164
|
[32mESM[39m [1mdist/inspector/index.js [22m[32m60.37 KB[39m
|
165
165
|
[32mESM[39m [1mdist/inspector/index.js.map [22m[32m107.85 KB[39m
|
166
|
-
[32mESM[39m ⚡️ Build success in
|
166
|
+
[32mESM[39m ⚡️ Build success in 73ms
|
167
167
|
[32mESM[39m [1mdist/testing.js [22m[32m6.76 KB[39m
|
168
168
|
[32mESM[39m [1mdist/index.js [22m[32m26.00 KB[39m
|
169
|
-
[32mESM[39m [1mdist/chunk-
|
169
|
+
[32mESM[39m [1mdist/chunk-74LZG2M3.js [22m[32m151.07 KB[39m
|
170
170
|
[32mESM[39m [1mdist/testing.js.map [22m[32m13.06 KB[39m
|
171
171
|
[32mESM[39m [1mdist/index.js.map [22m[32m52.65 KB[39m
|
172
|
-
[32mESM[39m [1mdist/chunk-
|
173
|
-
[32mESM[39m ⚡️ Build success in
|
172
|
+
[32mESM[39m [1mdist/chunk-74LZG2M3.js.map [22m[32m362.38 KB[39m
|
173
|
+
[32mESM[39m ⚡️ Build success in 91ms
|
174
174
|
[32mESM[39m [1mdist/inspector/register-custom-element.js [22m[32m218.00 B[39m
|
175
175
|
[32mESM[39m [1mdist/inspector/register-custom-element.js.map [22m[32m314.00 B[39m
|
176
176
|
[32mESM[39m [1mdist/inspector/custom-element-TUXKXSZU.js [22m[32m1.53 MB[39m
|
177
177
|
[32mESM[39m [1mdist/inspector/custom-element-TUXKXSZU.js.map [22m[32m2.35 MB[39m
|
178
|
-
[32mESM[39m ⚡️ Build success in
|
178
|
+
[32mESM[39m ⚡️ Build success in 135ms
|
179
179
|
|
180
|
-
> jazz-tools@0.16.
|
180
|
+
> jazz-tools@0.16.4 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
181
181
|
> tsc --outDir dist
|
182
182
|
|
183
183
|
|
184
|
-
> jazz-tools@0.16.
|
184
|
+
> jazz-tools@0.16.4 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
|
185
185
|
> rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
|
186
186
|
|
187
187
|
src/svelte -> dist/svelte
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.16.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 16764f6: Added `pick()` and `partial()` methods to CoMapSchema
|
8
|
+
- Updated dependencies [f9d538f]
|
9
|
+
- Updated dependencies [802b5a3]
|
10
|
+
- cojson@0.16.4
|
11
|
+
- cojson-storage-indexeddb@0.16.4
|
12
|
+
- cojson-transport-ws@0.16.4
|
13
|
+
|
3
14
|
## 0.16.3
|
4
15
|
|
5
16
|
### Patch Changes
|
@@ -118,11 +118,6 @@ function isAnyCoValueSchema(schema) {
|
|
118
118
|
return "collaborative" in schema && schema.collaborative === true;
|
119
119
|
}
|
120
120
|
|
121
|
-
// src/tools/coValues/interfaces.ts
|
122
|
-
import {
|
123
|
-
emptyKnownState
|
124
|
-
} from "cojson";
|
125
|
-
|
126
121
|
// src/tools/coValues/CoValueBase.ts
|
127
122
|
import { ControlledAccount, RawAccount } from "cojson";
|
128
123
|
var CoValueBase = class {
|
@@ -4063,6 +4058,33 @@ function enrichCoMapSchema(schema, coValueClass) {
|
|
4063
4058
|
},
|
4064
4059
|
optional: () => {
|
4065
4060
|
return coOptionalDefiner(coValueSchema);
|
4061
|
+
},
|
4062
|
+
pick: (keys) => {
|
4063
|
+
const keysSet = new Set(Object.keys(keys));
|
4064
|
+
const pickedShape = {};
|
4065
|
+
for (const [key, value] of Object.entries(coValueSchema.shape)) {
|
4066
|
+
if (keysSet.has(key)) {
|
4067
|
+
pickedShape[key] = value;
|
4068
|
+
}
|
4069
|
+
}
|
4070
|
+
return coMapDefiner(pickedShape);
|
4071
|
+
},
|
4072
|
+
partial: () => {
|
4073
|
+
const partialShape = {};
|
4074
|
+
for (const [key, value] of Object.entries(coValueSchema.shape)) {
|
4075
|
+
if (isAnyCoValueSchema2(value)) {
|
4076
|
+
partialShape[key] = coOptionalDefiner(value);
|
4077
|
+
} else {
|
4078
|
+
partialShape[key] = z.optional(coValueSchema.shape[key]);
|
4079
|
+
}
|
4080
|
+
}
|
4081
|
+
const partialCoMapSchema = coMapDefiner(partialShape);
|
4082
|
+
if (coValueSchema.catchAll) {
|
4083
|
+
return partialCoMapSchema.catchall(
|
4084
|
+
coValueSchema.catchAll
|
4085
|
+
);
|
4086
|
+
}
|
4087
|
+
return partialCoMapSchema;
|
4066
4088
|
}
|
4067
4089
|
});
|
4068
4090
|
return coValueSchema;
|
@@ -5211,8 +5233,8 @@ function loadContentPiecesFromCoValue(core2, valuesExported, contentPieces) {
|
|
5211
5233
|
loadContentPiecesFromCoValue(depCoValue, valuesExported, contentPieces);
|
5212
5234
|
}
|
5213
5235
|
}
|
5214
|
-
const pieces = core2.verified.newContentSince(
|
5215
|
-
for (const piece of pieces
|
5236
|
+
const pieces = core2.verified.newContentSince(void 0) ?? [];
|
5237
|
+
for (const piece of pieces) {
|
5216
5238
|
contentPieces.push(piece);
|
5217
5239
|
}
|
5218
5240
|
}
|
@@ -5265,4 +5287,4 @@ export {
|
|
5265
5287
|
JazzContextManager
|
5266
5288
|
};
|
5267
5289
|
/* istanbul ignore file -- @preserve */
|
5268
|
-
//# sourceMappingURL=chunk-
|
5290
|
+
//# sourceMappingURL=chunk-74LZG2M3.js.map
|