jazz-tools 0.18.11 → 0.18.12

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.18.11 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.18.12 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"}
@@ -107,93 +107,93 @@
107
107
  ESM Build start
108
108
  CLI Cleaning output folder
109
109
  ESM Build start
110
- ESM dist/tiptap/index.js 564.00 B
111
- ESM dist/tiptap/index.js.map 1.21 KB
112
- ESM ⚡️ Build success in 11ms
113
- ESM dist/react/ssr.js 688.00 B
114
- ESM dist/react/ssr.js.map 1.12 KB
115
- ESM ⚡️ Build success in 14ms
116
110
  ESM dist/worker/index.js 3.19 KB
117
111
  ESM dist/worker/index.js.map 6.17 KB
118
- ESM ⚡️ Build success in 14ms
112
+ ESM ⚡️ Build success in 21ms
113
+ ESM dist/react/ssr.js 688.00 B
114
+ ESM dist/react/ssr.js.map 1.12 KB
115
+ ESM ⚡️ Build success in 27ms
116
+ ESM dist/tiptap/index.js 564.00 B
117
+ ESM dist/tiptap/index.js.map 1.21 KB
118
+ ESM ⚡️ Build success in 23ms
119
119
  ESM dist/better-auth/auth/client.js 4.44 KB
120
120
  ESM dist/better-auth/auth/server.js 8.36 KB
121
121
  ESM dist/better-auth/auth/react.js 799.00 B
122
122
  ESM dist/better-auth/auth/client.js.map 8.24 KB
123
123
  ESM dist/better-auth/auth/server.js.map 15.29 KB
124
124
  ESM dist/better-auth/auth/react.js.map 2.04 KB
125
- ESM ⚡️ Build success in 18ms
125
+ ESM ⚡️ Build success in 25ms
126
126
  ESM dist/media/index.js 236.00 B
127
127
  ESM dist/media/index.browser.js 2.79 KB
128
128
  ESM dist/media/index.native.js 2.90 KB
129
- ESM dist/media/index.server.js 2.95 KB
130
129
  ESM dist/media/chunk-W3S526L3.js 6.47 KB
130
+ ESM dist/media/index.server.js 2.95 KB
131
131
  ESM dist/media/index.js.map 71.00 B
132
132
  ESM dist/media/index.browser.js.map 6.15 KB
133
133
  ESM dist/media/index.native.js.map 6.09 KB
134
- ESM dist/media/index.server.js.map 6.37 KB
135
134
  ESM dist/media/chunk-W3S526L3.js.map 16.57 KB
136
- ESM ⚡️ Build success in 25ms
135
+ ESM dist/media/index.server.js.map 6.37 KB
136
+ ESM ⚡️ Build success in 33ms
137
+ ESM dist/browser/index.js 13.64 KB
138
+ ESM dist/browser/index.js.map 29.14 KB
139
+ ESM ⚡️ Build success in 43ms
137
140
  ESM dist/expo/index.js 4.68 KB
138
141
  ESM dist/expo/testing.js 112.00 B
139
142
  ESM dist/expo/crypto.js 153.00 B
140
143
  ESM dist/expo/index.js.map 10.23 KB
141
144
  ESM dist/expo/testing.js.map 168.00 B
142
145
  ESM dist/expo/crypto.js.map 189.00 B
143
- ESM ⚡️ Build success in 24ms
144
- ESM dist/browser/index.js 13.64 KB
145
- ESM dist/browser/index.js.map 29.14 KB
146
- ESM ⚡️ Build success in 34ms
146
+ ESM ⚡️ Build success in 44ms
147
147
  ESM dist/react-native/index.js 2.53 KB
148
148
  ESM dist/react-native/testing.js 120.00 B
149
149
  ESM dist/react-native/crypto.js 161.00 B
150
150
  ESM dist/react-native/index.js.map 5.68 KB
151
151
  ESM dist/react-native/testing.js.map 176.00 B
152
152
  ESM dist/react-native/crypto.js.map 197.00 B
153
- ESM ⚡️ Build success in 29ms
154
- ESM dist/react-native-core/index.js 18.00 KB
153
+ ESM ⚡️ Build success in 42ms
154
+ ESM dist/react-native-core/index.js 18.03 KB
155
155
  ESM dist/react-native-core/testing.js 119.00 B
156
156
  ESM dist/react-native-core/crypto.js 2.10 KB
157
- ESM dist/react-native-core/index.js.map 36.73 KB
157
+ ESM dist/react-native-core/index.js.map 36.85 KB
158
158
  ESM dist/react-native-core/testing.js.map 175.00 B
159
159
  ESM dist/react-native-core/crypto.js.map 4.25 KB
160
- ESM ⚡️ Build success in 38ms
161
- ESM dist/react/testing.js 122.00 B
162
- ESM dist/react/index.js 24.76 KB
163
- ESM dist/react/testing.js.map 165.00 B
164
- ESM dist/react/index.js.map 53.56 KB
165
- ESM ⚡️ Build success in 41ms
160
+ ESM ⚡️ Build success in 46ms
166
161
  ESM dist/prosemirror/index.js 77.63 KB
167
162
  ESM dist/prosemirror/index.js.map 306.98 KB
168
- ESM ⚡️ Build success in 43ms
163
+ ESM ⚡️ Build success in 50ms
164
+ ESM dist/react/index.js 24.76 KB
165
+ ESM dist/react/testing.js 122.00 B
166
+ ESM dist/react/index.js.map 53.56 KB
167
+ ESM dist/react/testing.js.map 165.00 B
168
+ ESM ⚡️ Build success in 50ms
169
169
  ESM dist/inspector/index.js 69.71 KB
170
170
  ESM dist/inspector/index.js.map 121.38 KB
171
- ESM ⚡️ Build success in 54ms
171
+ ESM ⚡️ Build success in 72ms
172
172
  ESM dist/testing.js 7.17 KB
173
+ ESM dist/chunk-PRSMJMJR.js 169.84 KB
173
174
  ESM dist/index.js 26.13 KB
174
- ESM dist/chunk-RQHJFPIB.js 169.74 KB
175
175
  ESM dist/testing.js.map 14.10 KB
176
+ ESM dist/chunk-PRSMJMJR.js.map 402.81 KB
176
177
  ESM dist/index.js.map 52.92 KB
177
- ESM dist/chunk-RQHJFPIB.js.map 402.59 KB
178
- ESM ⚡️ Build success in 78ms
178
+ ESM ⚡️ Build success in 96ms
179
+ ESM dist/react-core/index.js 146.29 KB
179
180
  ESM dist/react-core/testing.js 1.17 KB
180
181
  ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
181
- ESM dist/react-core/index.js 146.19 KB
182
+ ESM dist/react-core/index.js.map 404.67 KB
182
183
  ESM dist/react-core/testing.js.map 1.82 KB
183
184
  ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
184
- ESM dist/react-core/index.js.map 404.45 KB
185
- ESM ⚡️ Build success in 77ms
185
+ ESM ⚡️ Build success in 91ms
186
186
  ESM dist/inspector/register-custom-element.js 218.00 B
187
187
  ESM dist/inspector/register-custom-element.js.map 314.00 B
188
188
  ESM dist/inspector/custom-element-G6SPZEBR.js 1.54 MB
189
189
  ESM dist/inspector/custom-element-G6SPZEBR.js.map 2.36 MB
190
- ESM ⚡️ Build success in 109ms
190
+ ESM ⚡️ Build success in 135ms
191
191
 
192
- > jazz-tools@0.18.11 types /home/runner/_work/jazz/jazz/packages/jazz-tools
192
+ > jazz-tools@0.18.12 types /home/runner/_work/jazz/jazz/packages/jazz-tools
193
193
  > tsc --outDir dist
194
194
 
195
195
 
196
- > jazz-tools@0.18.11 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
196
+ > jazz-tools@0.18.12 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
197
197
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
198
198
 
199
199
  src/svelte -> dist/svelte
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.18.12
4
+
5
+ ### Patch Changes
6
+
7
+ - c16ce4b: Fix addMember with account owners, by detecting the accounts from their raw value
8
+ - 0b1b050: Export ReactNativeContextManager from react-native-core
9
+ - cojson@0.18.12
10
+ - cojson-storage-indexeddb@0.18.12
11
+ - cojson-transport-ws@0.18.12
12
+
3
13
  ## 0.18.11
4
14
 
5
15
  ### Patch Changes
@@ -2486,6 +2486,9 @@ function isControlledAccount(account) {
2486
2486
  RegisteredSchemas["Account"] = Account;
2487
2487
 
2488
2488
  // src/tools/coValues/group.ts
2489
+ import {
2490
+ RawAccount as RawAccount2
2491
+ } from "cojson";
2489
2492
  var _Group = class _Group extends CoValueBase {
2490
2493
  /** @deprecated Don't use constructor directly, use .create */
2491
2494
  constructor(options) {
@@ -2522,7 +2525,7 @@ var _Group = class _Group extends CoValueBase {
2522
2525
  return this.$jazz.raw.myRole();
2523
2526
  }
2524
2527
  addMember(member, role) {
2525
- if (member !== "everyone" && member[TypeSym] === "Group") {
2528
+ if (isGroupValue(member)) {
2526
2529
  if (role === "writeOnly")
2527
2530
  throw new Error("Cannot add group as member with write-only role");
2528
2531
  this.$jazz.raw.extend(member.$jazz.raw, role);
@@ -2534,7 +2537,7 @@ var _Group = class _Group extends CoValueBase {
2534
2537
  }
2535
2538
  }
2536
2539
  removeMember(member) {
2537
- if (member !== "everyone" && member[TypeSym] === "Group") {
2540
+ if (isGroupValue(member)) {
2538
2541
  this.$jazz.raw.revokeExtend(member.$jazz.raw);
2539
2542
  } else {
2540
2543
  return this.$jazz.raw.removeMember(
@@ -2693,6 +2696,9 @@ function getCoValueOwner(coValue) {
2693
2696
  }
2694
2697
  return group;
2695
2698
  }
2699
+ function isGroupValue(value) {
2700
+ return value !== "everyone" && !(value.$jazz.raw instanceof RawAccount2);
2701
+ }
2696
2702
 
2697
2703
  // src/tools/coValues/profile.ts
2698
2704
  var Profile = class extends CoMap {
@@ -2721,7 +2727,7 @@ var Profile = class extends CoMap {
2721
2727
 
2722
2728
  // src/tools/coValues/inbox.ts
2723
2729
  import {
2724
- RawAccount as RawAccount2
2730
+ RawAccount as RawAccount3
2725
2731
  } from "cojson";
2726
2732
 
2727
2733
  // src/tools/lib/id.ts
@@ -2765,7 +2771,7 @@ var IncrementalFeed = class {
2765
2771
  };
2766
2772
  async function createInboxMessage(payload, inboxOwner) {
2767
2773
  const group = payload.$jazz.raw.group;
2768
- if (group instanceof RawAccount2) {
2774
+ if (group instanceof RawAccount3) {
2769
2775
  throw new Error("Inbox messages should be owned by a group");
2770
2776
  }
2771
2777
  group.addMember(inboxOwner, "writer");
@@ -3677,7 +3683,7 @@ var JazzError = class _JazzError {
3677
3683
  };
3678
3684
 
3679
3685
  // src/tools/subscribe/utils.ts
3680
- import { RawAccount as RawAccount3 } from "cojson";
3686
+ import { RawAccount as RawAccount4 } from "cojson";
3681
3687
 
3682
3688
  // src/tools/lib/cache.ts
3683
3689
  var weakMap = /* @__PURE__ */ new WeakMap();
@@ -3698,7 +3704,7 @@ function myRoleForRawValue(raw) {
3698
3704
  const rawOwner = raw.group;
3699
3705
  const owner = coValuesCache.get(
3700
3706
  rawOwner,
3701
- () => rawOwner instanceof RawAccount3 ? RegisteredSchemas["Account"].fromRaw(rawOwner) : RegisteredSchemas["Group"].fromRaw(rawOwner)
3707
+ () => rawOwner instanceof RawAccount4 ? RegisteredSchemas["Account"].fromRaw(rawOwner) : RegisteredSchemas["Group"].fromRaw(rawOwner)
3702
3708
  );
3703
3709
  return accountOrGroupToGroup(owner).myRole();
3704
3710
  }
@@ -5942,4 +5948,4 @@ export {
5942
5948
  JazzContextManager
5943
5949
  };
5944
5950
  /* istanbul ignore file -- @preserve */
5945
- //# sourceMappingURL=chunk-RQHJFPIB.js.map
5951
+ //# sourceMappingURL=chunk-PRSMJMJR.js.map