@dxos/echo 0.8.4-main.1da679c → 0.8.4-main.1f223c7

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.
@@ -39,7 +39,6 @@ import { SpaceId, ObjectId } from "@dxos/keys";
39
39
  // src/Obj.ts
40
40
  var Obj_exports = {};
41
41
  __export(Obj_exports, {
42
- Any: () => Any,
43
42
  Meta: () => Meta,
44
43
  VersionTypeId: () => VersionTypeId2,
45
44
  clone: () => clone,
@@ -48,14 +47,14 @@ __export(Obj_exports, {
48
47
  deleteKeys: () => deleteKeys,
49
48
  encodeVersion: () => encodeVersion,
50
49
  fromJSON: () => fromJSON,
51
- getDXN: () => getDXN2,
50
+ getDXN: () => getDXN,
52
51
  getKeys: () => getKeys,
53
52
  getLabel: () => getLabel2,
54
- getMeta: () => getMeta3,
53
+ getMeta: () => getMeta2,
55
54
  getSchema: () => getSchema2,
56
55
  getSnapshot: () => getSnapshot2,
57
56
  getTypeDXN: () => getTypeDXN,
58
- getTypename: () => getTypename2,
57
+ getTypename: () => getTypename,
59
58
  instanceOf: () => instanceOf,
60
59
  isDeleted: () => isDeleted2,
61
60
  isObject: () => isObject,
@@ -68,111 +67,38 @@ __export(Obj_exports, {
68
67
  });
69
68
  import { Schema } from "effect";
70
69
  import { dual } from "effect/Function";
71
- import * as EchoSchema2 from "@dxos/echo-schema";
72
- import { assertArgument, invariant as invariant2 } from "@dxos/invariant";
70
+ import * as EchoSchema from "@dxos/echo-schema";
71
+ import { assertArgument, invariant } from "@dxos/invariant";
73
72
  import * as LiveObject from "@dxos/live-object";
74
73
  import { live } from "@dxos/live-object";
75
74
  import { assumeType, deepMapValues } from "@dxos/util";
76
-
77
- // src/Type.ts
78
- var Type_exports = {};
79
- __export(Type_exports, {
80
- DXN: () => DXN,
81
- Expando: () => Expando2,
82
- Format: () => Format,
83
- JsonSchema: () => JsonSchemaType,
84
- Kind: () => Kind,
85
- KindId: () => KindId,
86
- Obj: () => Obj,
87
- ObjectId: () => ObjectId2,
88
- Ref: () => Ref2,
89
- Relation: () => Relation,
90
- SpaceId: () => SpaceId2,
91
- getDXN: () => getDXN,
92
- getMeta: () => getMeta,
93
- getTypename: () => getTypename,
94
- getVersion: () => getVersion,
95
- isMutable: () => isMutable2,
96
- toEffectSchema: () => toEffectSchema,
97
- toJsonSchema: () => toJsonSchema
98
- });
99
- import * as EchoSchema from "@dxos/echo-schema";
100
- import { invariant } from "@dxos/invariant";
101
- import { SpaceId as SpaceId2, ObjectId as ObjectId2, DXN } from "@dxos/keys";
102
- import { Format, JsonSchemaType, toEffectSchema, toJsonSchema } from "@dxos/echo-schema";
103
- var __dxlog_file = "/__w/dxos/dxos/packages/core/echo/echo/src/Type.ts";
104
- var KindId = EchoSchema.EntityKindId;
105
- var Kind = EchoSchema.EntityKind;
106
- var Obj = EchoSchema.EchoObject;
107
- var Expando2 = EchoSchema.Expando;
108
- var Relation = EchoSchema.EchoRelation;
109
- var Ref2 = EchoSchema.Ref;
110
- var getDXN = (schema) => {
111
- return EchoSchema.getSchemaDXN(schema);
112
- };
113
- var getTypename = (schema) => {
114
- const typename = EchoSchema.getSchemaTypename(schema);
115
- invariant(typeof typename === "string" && !typename.startsWith("dxn:"), "Invalid typename", {
116
- F: __dxlog_file,
117
- L: 212,
118
- S: void 0,
119
- A: [
120
- "typeof typename === 'string' && !typename.startsWith('dxn:')",
121
- "'Invalid typename'"
122
- ]
123
- });
124
- return typename;
125
- };
126
- var getVersion = (schema) => {
127
- const version2 = EchoSchema.getSchemaVersion(schema);
128
- invariant(typeof version2 === "string" && version2.match(/^\d+\.\d+\.\d+$/), "Invalid version", {
129
- F: __dxlog_file,
130
- L: 222,
131
- S: void 0,
132
- A: [
133
- "typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/)",
134
- "'Invalid version'"
135
- ]
136
- });
137
- return version2;
138
- };
139
- var isMutable2 = EchoSchema.isMutable;
140
- var getMeta = (schema) => {
141
- return EchoSchema.getTypeAnnotation(schema);
142
- };
143
-
144
- // src/Obj.ts
145
- var __dxlog_file2 = "/__w/dxos/dxos/packages/core/echo/echo/src/Obj.ts";
146
- var Any = Schema.Struct({}).pipe(Obj({
147
- typename: "dxos.org/types/Any",
148
- version: "0.1.0"
149
- }));
150
- var Meta = EchoSchema2.MetaId;
75
+ var __dxlog_file = "/__w/dxos/dxos/packages/core/echo/echo/src/Obj.ts";
76
+ var Meta = EchoSchema.MetaId;
151
77
  var make = (schema, props, meta) => {
152
- assertArgument(EchoSchema2.getTypeAnnotation(schema)?.kind === EchoSchema2.EntityKind.Object, "schema", "Expected an object schema");
153
- if (props[EchoSchema2.MetaId] != null) {
154
- meta = props[EchoSchema2.MetaId];
155
- delete props[EchoSchema2.MetaId];
78
+ assertArgument(EchoSchema.getTypeAnnotation(schema)?.kind === EchoSchema.EntityKind.Object, "schema", "Expected an object schema");
79
+ if (props[EchoSchema.MetaId] != null) {
80
+ meta = props[EchoSchema.MetaId];
81
+ delete props[EchoSchema.MetaId];
156
82
  }
157
83
  return live(schema, props, meta);
158
84
  };
159
85
  var isObject = (obj) => {
160
86
  assumeType(obj);
161
- return typeof obj === "object" && obj !== null && obj[EchoSchema2.EntityKindId] === EchoSchema2.EntityKind.Object;
87
+ return typeof obj === "object" && obj !== null && obj[EchoSchema.EntityKindId] === EchoSchema.EntityKind.Object;
162
88
  };
163
89
  var instanceOf = (...args) => {
164
90
  if (args.length === 1) {
165
- return (obj) => EchoSchema2.isInstanceOf(args[0], obj);
91
+ return (obj) => EchoSchema.isInstanceOf(args[0], obj);
166
92
  }
167
- return EchoSchema2.isInstanceOf(args[0], args[1]);
93
+ return EchoSchema.isInstanceOf(args[0], args[1]);
168
94
  };
169
- var getSchema2 = EchoSchema2.getSchema;
170
- var getDXN2 = (obj) => {
95
+ var getSchema2 = EchoSchema.getSchema;
96
+ var getDXN = (obj) => {
171
97
  assertArgument(!Schema.isSchema(obj), "obj", "Object should not be a schema.");
172
- const dxn = EchoSchema2.getObjectDXN(obj);
173
- invariant2(dxn != null, "Invalid object.", {
174
- F: __dxlog_file2,
175
- L: 120,
98
+ const dxn = EchoSchema.getObjectDXN(obj);
99
+ invariant(dxn != null, "Invalid object.", {
100
+ F: __dxlog_file,
101
+ L: 113,
176
102
  S: void 0,
177
103
  A: [
178
104
  "dxn != null",
@@ -181,19 +107,19 @@ var getDXN2 = (obj) => {
181
107
  });
182
108
  return dxn;
183
109
  };
184
- var getTypeDXN = EchoSchema2.getType;
185
- var getTypename2 = (obj) => {
110
+ var getTypeDXN = EchoSchema.getType;
111
+ var getTypename = (obj) => {
186
112
  const schema = getSchema2(obj);
187
113
  if (schema == null) {
188
- return EchoSchema2.getType(obj)?.asTypeDXN()?.type;
114
+ return EchoSchema.getType(obj)?.asTypeDXN()?.type;
189
115
  }
190
- return EchoSchema2.getSchemaTypename(schema);
116
+ return EchoSchema.getSchemaTypename(schema);
191
117
  };
192
- var getMeta3 = (obj) => {
193
- const meta = EchoSchema2.getMeta(obj);
194
- invariant2(meta != null, "Invalid object.", {
195
- F: __dxlog_file2,
196
- L: 148,
118
+ var getMeta2 = (obj) => {
119
+ const meta = EchoSchema.getMeta(obj);
120
+ invariant(meta != null, "Invalid object.", {
121
+ F: __dxlog_file,
122
+ L: 141,
197
123
  S: void 0,
198
124
  A: [
199
125
  "meta != null",
@@ -203,10 +129,10 @@ var getMeta3 = (obj) => {
203
129
  return meta;
204
130
  };
205
131
  var getKeys = dual(2, (obj, source) => {
206
- const meta = EchoSchema2.getMeta(obj);
207
- invariant2(meta != null, "Invalid object.", {
208
- F: __dxlog_file2,
209
- L: 160,
132
+ const meta = EchoSchema.getMeta(obj);
133
+ invariant(meta != null, "Invalid object.", {
134
+ F: __dxlog_file,
135
+ L: 153,
210
136
  S: void 0,
211
137
  A: [
212
138
  "meta != null",
@@ -216,7 +142,7 @@ var getKeys = dual(2, (obj, source) => {
216
142
  return meta.keys.filter((key) => key.source === source);
217
143
  });
218
144
  var deleteKeys = (obj, source) => {
219
- const meta = EchoSchema2.getMeta(obj);
145
+ const meta = EchoSchema.getMeta(obj);
220
146
  for (let i = 0; i < meta.keys.length; i++) {
221
147
  if (meta.keys[i].source === source) {
222
148
  meta.keys.splice(i, 1);
@@ -225,10 +151,10 @@ var deleteKeys = (obj, source) => {
225
151
  }
226
152
  };
227
153
  var isDeleted2 = (obj) => {
228
- const deleted = EchoSchema2.isDeleted(obj);
229
- invariant2(typeof deleted === "boolean", "Invalid object.", {
230
- F: __dxlog_file2,
231
- L: 182,
154
+ const deleted = EchoSchema.isDeleted(obj);
155
+ invariant(typeof deleted === "boolean", "Invalid object.", {
156
+ F: __dxlog_file,
157
+ L: 175,
232
158
  S: void 0,
233
159
  A: [
234
160
  "typeof deleted === 'boolean'",
@@ -240,24 +166,24 @@ var isDeleted2 = (obj) => {
240
166
  var getLabel2 = (obj) => {
241
167
  const schema = getSchema2(obj);
242
168
  if (schema != null) {
243
- return EchoSchema2.getLabel(schema, obj);
169
+ return EchoSchema.getLabel(schema, obj);
244
170
  }
245
171
  };
246
172
  var setLabel2 = (obj, label) => {
247
173
  const schema = getSchema2(obj);
248
174
  if (schema != null) {
249
- EchoSchema2.setLabel(schema, obj, label);
175
+ EchoSchema.setLabel(schema, obj, label);
250
176
  }
251
177
  };
252
- var toJSON = (obj) => EchoSchema2.objectToJSON(obj);
253
- var fromJSON = EchoSchema2.objectFromJSON;
178
+ var toJSON = (obj) => EchoSchema.objectToJSON(obj);
179
+ var fromJSON = EchoSchema.objectFromJSON;
254
180
  var getSnapshot2 = LiveObject.getSnapshot;
255
181
  var clone = (obj, opts) => {
256
182
  const { id, ...data } = obj;
257
183
  const schema = getSchema2(obj);
258
- invariant2(schema != null, "Object should have a schema", {
259
- F: __dxlog_file2,
260
- L: 247,
184
+ invariant(schema != null, "Object should have a schema", {
185
+ F: __dxlog_file,
186
+ L: 240,
261
187
  S: void 0,
262
188
  A: [
263
189
  "schema != null",
@@ -265,7 +191,7 @@ var clone = (obj, opts) => {
265
191
  ]
266
192
  });
267
193
  const props = deepMapValues(data, (value, recurse) => {
268
- if (EchoSchema2.Ref.isRef(value)) {
194
+ if (EchoSchema.Ref.isRef(value)) {
269
195
  return value;
270
196
  }
271
197
  return recurse(value);
@@ -273,16 +199,16 @@ var clone = (obj, opts) => {
273
199
  if (opts?.retainId) {
274
200
  props.id = id;
275
201
  }
276
- const meta = getMeta3(obj);
277
- props[EchoSchema2.MetaId] = deepMapValues(meta, (value, recurse) => {
278
- if (EchoSchema2.Ref.isRef(value)) {
202
+ const meta = getMeta2(obj);
203
+ props[EchoSchema.MetaId] = deepMapValues(meta, (value, recurse) => {
204
+ if (EchoSchema.Ref.isRef(value)) {
279
205
  return value;
280
206
  }
281
207
  return recurse(value);
282
208
  });
283
209
  return make(schema, props);
284
210
  };
285
- var VersionTypeId2 = EchoSchema2.VersionTypeId;
211
+ var VersionTypeId2 = EchoSchema.VersionTypeId;
286
212
  var unversioned = {
287
213
  [VersionTypeId2]: {},
288
214
  versioned: false
@@ -291,7 +217,7 @@ var isVersion = (obj) => {
291
217
  return obj != null && typeof obj === "object" && VersionTypeId2 in obj;
292
218
  };
293
219
  var version = (obj) => {
294
- const version2 = obj[EchoSchema2.ObjectVersionId];
220
+ const version2 = obj[EchoSchema.ObjectVersionId];
295
221
  if (version2 === void 0) {
296
222
  return unversioned;
297
223
  }
@@ -332,16 +258,15 @@ __export(Ref_exports, {
332
258
  isRef: () => isRef,
333
259
  make: () => make2
334
260
  });
335
- import * as EchoSchema3 from "@dxos/echo-schema";
336
- var Array2 = EchoSchema3.RefArray;
337
- var isRef = EchoSchema3.Ref.isRef;
338
- var make2 = EchoSchema3.Ref.make;
339
- var fromDXN = EchoSchema3.Ref.fromDXN;
261
+ import * as EchoSchema2 from "@dxos/echo-schema";
262
+ var Array2 = EchoSchema2.RefArray;
263
+ var isRef = EchoSchema2.Ref.isRef;
264
+ var make2 = EchoSchema2.Ref.make;
265
+ var fromDXN = EchoSchema2.Ref.fromDXN;
340
266
 
341
267
  // src/Relation.ts
342
268
  var Relation_exports = {};
343
269
  __export(Relation_exports, {
344
- Any: () => Any2,
345
270
  Source: () => Source,
346
271
  Target: () => Target,
347
272
  getSource: () => getSource,
@@ -351,51 +276,44 @@ __export(Relation_exports, {
351
276
  isRelation: () => isRelation,
352
277
  make: () => make3
353
278
  });
354
- import { Schema as Schema2 } from "effect";
355
279
  import { raise } from "@dxos/debug";
356
- import * as EchoSchema4 from "@dxos/echo-schema";
357
- import { assertArgument as assertArgument2, invariant as invariant3 } from "@dxos/invariant";
358
- import { DXN as DXN2 } from "@dxos/keys";
280
+ import * as EchoSchema3 from "@dxos/echo-schema";
281
+ import { assertArgument as assertArgument2, invariant as invariant2 } from "@dxos/invariant";
282
+ import { DXN } from "@dxos/keys";
359
283
  import { live as live2 } from "@dxos/live-object";
360
284
  import { assumeType as assumeType2 } from "@dxos/util";
361
- var __dxlog_file3 = "/__w/dxos/dxos/packages/core/echo/echo/src/Relation.ts";
362
- var Any2 = Schema2.Struct({}).pipe(Relation({
363
- typename: "dxos.org/types/Any",
364
- version: "0.1.0",
365
- source: Any,
366
- target: Any
367
- }));
368
- var Source = EchoSchema4.RelationSourceId;
369
- var Target = EchoSchema4.RelationTargetId;
285
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/core/echo/echo/src/Relation.ts";
286
+ var Source = EchoSchema3.RelationSourceId;
287
+ var Target = EchoSchema3.RelationTargetId;
370
288
  var make3 = (schema, props, meta) => {
371
- assertArgument2(EchoSchema4.getTypeAnnotation(schema)?.kind === EchoSchema4.EntityKind.Relation, "schema", "Expected a relation schema");
372
- if (props[EchoSchema4.MetaId] != null) {
373
- meta = props[EchoSchema4.MetaId];
374
- delete props[EchoSchema4.MetaId];
375
- }
376
- const sourceDXN = EchoSchema4.getObjectDXN(props[Source]) ?? raise(new Error("Unresolved relation source"));
377
- const targetDXN = EchoSchema4.getObjectDXN(props[Target]) ?? raise(new Error("Unresolved relation target"));
378
- props[EchoSchema4.RelationSourceDXNId] = sourceDXN;
379
- props[EchoSchema4.RelationTargetDXNId] = targetDXN;
289
+ assertArgument2(EchoSchema3.getTypeAnnotation(schema)?.kind === EchoSchema3.EntityKind.Relation, "schema", "Expected a relation schema");
290
+ if (props[EchoSchema3.MetaId] != null) {
291
+ meta = props[EchoSchema3.MetaId];
292
+ delete props[EchoSchema3.MetaId];
293
+ }
294
+ const sourceDXN = EchoSchema3.getObjectDXN(props[Source]) ?? raise(new Error("Unresolved relation source"));
295
+ const targetDXN = EchoSchema3.getObjectDXN(props[Target]) ?? raise(new Error("Unresolved relation target"));
296
+ props[EchoSchema3.RelationSourceDXNId] = sourceDXN;
297
+ props[EchoSchema3.RelationTargetDXNId] = targetDXN;
380
298
  return live2(schema, props, meta);
381
299
  };
382
300
  var isRelation = (value) => {
383
301
  if (typeof value !== "object" || value === null) {
384
302
  return false;
385
303
  }
386
- if (EchoSchema4.ATTR_RELATION_SOURCE in value || EchoSchema4.ATTR_RELATION_TARGET in value) {
304
+ if (EchoSchema3.ATTR_RELATION_SOURCE in value || EchoSchema3.ATTR_RELATION_TARGET in value) {
387
305
  return true;
388
306
  }
389
- const kind = value[EchoSchema4.EntityKindId];
390
- return kind === EchoSchema4.EntityKind.Relation;
307
+ const kind = value[EchoSchema3.EntityKindId];
308
+ return kind === EchoSchema3.EntityKind.Relation;
391
309
  };
392
310
  var getSourceDXN = (value) => {
393
311
  assertArgument2(isRelation(value), "Expected a relation");
394
312
  assumeType2(value);
395
- const dxn = value[EchoSchema4.RelationSourceDXNId];
396
- invariant3(dxn instanceof DXN2, void 0, {
397
- F: __dxlog_file3,
398
- L: 109,
313
+ const dxn = value[EchoSchema3.RelationSourceDXNId];
314
+ invariant2(dxn instanceof DXN, void 0, {
315
+ F: __dxlog_file2,
316
+ L: 100,
399
317
  S: void 0,
400
318
  A: [
401
319
  "dxn instanceof DXN",
@@ -407,10 +325,10 @@ var getSourceDXN = (value) => {
407
325
  var getTargetDXN = (value) => {
408
326
  assertArgument2(isRelation(value), "Expected a relation");
409
327
  assumeType2(value);
410
- const dxn = value[EchoSchema4.RelationTargetDXNId];
411
- invariant3(dxn instanceof DXN2, void 0, {
412
- F: __dxlog_file3,
413
- L: 121,
328
+ const dxn = value[EchoSchema3.RelationTargetDXNId];
329
+ invariant2(dxn instanceof DXN, void 0, {
330
+ F: __dxlog_file2,
331
+ L: 112,
414
332
  S: void 0,
415
333
  A: [
416
334
  "dxn instanceof DXN",
@@ -422,10 +340,10 @@ var getTargetDXN = (value) => {
422
340
  var getSource = (relation) => {
423
341
  assertArgument2(isRelation(relation), "Expected a relation");
424
342
  assumeType2(relation);
425
- const obj = relation[EchoSchema4.RelationSourceId];
426
- invariant3(obj !== void 0, `Invalid source: ${relation.id}`, {
427
- F: __dxlog_file3,
428
- L: 133,
343
+ const obj = relation[EchoSchema3.RelationSourceId];
344
+ invariant2(obj !== void 0, `Invalid source: ${relation.id}`, {
345
+ F: __dxlog_file2,
346
+ L: 124,
429
347
  S: void 0,
430
348
  A: [
431
349
  "obj !== undefined",
@@ -437,10 +355,10 @@ var getSource = (relation) => {
437
355
  var getTarget = (relation) => {
438
356
  assertArgument2(isRelation(relation), "Expected a relation");
439
357
  assumeType2(relation);
440
- const obj = relation[EchoSchema4.RelationTargetId];
441
- invariant3(obj !== void 0, `Invalid target: ${relation.id}`, {
442
- F: __dxlog_file3,
443
- L: 145,
358
+ const obj = relation[EchoSchema3.RelationTargetId];
359
+ invariant2(obj !== void 0, `Invalid target: ${relation.id}`, {
360
+ F: __dxlog_file2,
361
+ L: 136,
444
362
  S: void 0,
445
363
  A: [
446
364
  "obj !== undefined",
@@ -450,11 +368,78 @@ var getTarget = (relation) => {
450
368
  return obj;
451
369
  };
452
370
 
371
+ // src/Type.ts
372
+ var Type_exports = {};
373
+ __export(Type_exports, {
374
+ DXN: () => DXN2,
375
+ Expando: () => Expando2,
376
+ Format: () => Format,
377
+ JsonSchema: () => JsonSchemaType,
378
+ Kind: () => Kind,
379
+ KindId: () => KindId,
380
+ Obj: () => Obj,
381
+ ObjectId: () => ObjectId2,
382
+ Ref: () => Ref4,
383
+ Relation: () => Relation,
384
+ SpaceId: () => SpaceId2,
385
+ getDXN: () => getDXN2,
386
+ getMeta: () => getMeta3,
387
+ getTypename: () => getTypename2,
388
+ getVersion: () => getVersion,
389
+ isMutable: () => isMutable2,
390
+ toEffectSchema: () => toEffectSchema,
391
+ toJsonSchema: () => toJsonSchema
392
+ });
393
+ import * as EchoSchema4 from "@dxos/echo-schema";
394
+ import { invariant as invariant3 } from "@dxos/invariant";
395
+ import { SpaceId as SpaceId2, ObjectId as ObjectId2, DXN as DXN2 } from "@dxos/keys";
396
+ import { Format, JsonSchemaType, toEffectSchema, toJsonSchema } from "@dxos/echo-schema";
397
+ var __dxlog_file3 = "/__w/dxos/dxos/packages/core/echo/echo/src/Type.ts";
398
+ var KindId = EchoSchema4.EntityKindId;
399
+ var Kind = EchoSchema4.EntityKind;
400
+ var Obj = EchoSchema4.EchoObject;
401
+ var Expando2 = EchoSchema4.Expando;
402
+ var Relation = EchoSchema4.EchoRelation;
403
+ var Ref4 = EchoSchema4.Ref;
404
+ var getDXN2 = (schema) => {
405
+ return EchoSchema4.getSchemaDXN(schema);
406
+ };
407
+ var getTypename2 = (schema) => {
408
+ const typename = EchoSchema4.getSchemaTypename(schema);
409
+ invariant3(typeof typename === "string" && !typename.startsWith("dxn:"), "Invalid typename", {
410
+ F: __dxlog_file3,
411
+ L: 212,
412
+ S: void 0,
413
+ A: [
414
+ "typeof typename === 'string' && !typename.startsWith('dxn:')",
415
+ "'Invalid typename'"
416
+ ]
417
+ });
418
+ return typename;
419
+ };
420
+ var getVersion = (schema) => {
421
+ const version2 = EchoSchema4.getSchemaVersion(schema);
422
+ invariant3(typeof version2 === "string" && version2.match(/^\d+\.\d+\.\d+$/), "Invalid version", {
423
+ F: __dxlog_file3,
424
+ L: 222,
425
+ S: void 0,
426
+ A: [
427
+ "typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/)",
428
+ "'Invalid version'"
429
+ ]
430
+ });
431
+ return version2;
432
+ };
433
+ var isMutable2 = EchoSchema4.isMutable;
434
+ var getMeta3 = (schema) => {
435
+ return EchoSchema4.getTypeAnnotation(schema);
436
+ };
437
+
453
438
  // src/index.ts
454
439
  import { DXN as DXN4 } from "@dxos/keys";
455
440
 
456
441
  // src/query/dsl.ts
457
- import { Match, Schema as Schema3 } from "effect";
442
+ import { Match, Schema as Schema2 } from "effect";
458
443
  import { raise as raise2 } from "@dxos/debug";
459
444
  import { getTypeReference } from "@dxos/echo-schema";
460
445
  import { assertArgument as assertArgument3 } from "@dxos/invariant";
@@ -681,7 +666,7 @@ var propsFilterToAst = (predicates) => {
681
666
  idFilter = typeof predicates.id === "string" ? [
682
667
  predicates.id
683
668
  ] : predicates.id;
684
- Schema3.Array(ObjectId3).pipe(Schema3.validateSync)(idFilter);
669
+ Schema2.Array(ObjectId3).pipe(Schema2.validateSync)(idFilter);
685
670
  }
686
671
  return {
687
672
  id: idFilter,
@@ -841,14 +826,14 @@ export {
841
826
  SchemaNotFoundError,
842
827
  ObjectNotFoundError,
843
828
  Key_exports,
844
- Type_exports,
845
829
  Obj_exports,
846
830
  Ref_exports,
847
831
  Relation_exports,
832
+ Type_exports,
848
833
  Filter,
849
834
  Query,
850
835
  Order,
851
836
  DXN4 as DXN,
852
837
  QueryAST
853
838
  };
854
- //# sourceMappingURL=chunk-WG555MU5.mjs.map
839
+ //# sourceMappingURL=chunk-EIXXFUN5.mjs.map