@dxos/echo 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850

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.
Files changed (44) hide show
  1. package/README.md +116 -0
  2. package/dist/lib/browser/index.mjs +224 -65
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/node/index.cjs +223 -60
  6. package/dist/lib/node/index.cjs.map +4 -4
  7. package/dist/lib/node/meta.json +1 -1
  8. package/dist/lib/node-esm/index.mjs +224 -65
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/types/src/Obj.d.ts +39 -0
  12. package/dist/types/src/Obj.d.ts.map +1 -0
  13. package/dist/types/src/Ref.d.ts +11 -0
  14. package/dist/types/src/Ref.d.ts.map +1 -0
  15. package/dist/types/src/Relation.d.ts +19 -0
  16. package/dist/types/src/Relation.d.ts.map +1 -0
  17. package/dist/types/src/Type.d.ts +87 -0
  18. package/dist/types/src/Type.d.ts.map +1 -0
  19. package/dist/types/src/index.d.ts +6 -3
  20. package/dist/types/src/index.d.ts.map +1 -1
  21. package/dist/types/src/{type → test}/api.test.d.ts.map +1 -1
  22. package/package.json +13 -14
  23. package/src/Obj.ts +86 -0
  24. package/src/Ref.ts +21 -0
  25. package/src/Relation.ts +45 -0
  26. package/src/Type.ts +127 -0
  27. package/src/index.ts +6 -3
  28. package/src/{type → test}/api.test.ts +14 -14
  29. package/dist/types/src/type/Obj.d.ts +0 -12
  30. package/dist/types/src/type/Obj.d.ts.map +0 -1
  31. package/dist/types/src/type/Ref.d.ts +0 -3
  32. package/dist/types/src/type/Ref.d.ts.map +0 -1
  33. package/dist/types/src/type/Relation.d.ts +0 -16
  34. package/dist/types/src/type/Relation.d.ts.map +0 -1
  35. package/dist/types/src/type/Type.d.ts +0 -77
  36. package/dist/types/src/type/Type.d.ts.map +0 -1
  37. package/dist/types/src/type/index.d.ts +0 -5
  38. package/dist/types/src/type/index.d.ts.map +0 -1
  39. package/src/type/Obj.ts +0 -18
  40. package/src/type/Ref.ts +0 -7
  41. package/src/type/Relation.ts +0 -17
  42. package/src/type/Type.ts +0 -134
  43. package/src/type/index.ts +0 -8
  44. /package/dist/types/src/{type → test}/api.test.d.ts +0 -0
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,102 +17,263 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var node_exports = {};
20
30
  __export(node_exports, {
21
- DXN: () => import_keys.DXN,
22
- Format: () => import_echo_schema.Format,
23
- FormatEnum: () => import_echo_schema.FormatEnum,
31
+ Filter: () => import_echo_schema3.Filter,
24
32
  Obj: () => Obj_exports,
33
+ Query: () => import_echo_schema3.Query,
25
34
  Ref: () => Ref_exports,
26
35
  Relation: () => Relation_exports,
27
36
  Type: () => Type_exports
28
37
  });
29
38
  module.exports = __toCommonJS(node_exports);
39
+ var EchoSchema = __toESM(require("@dxos/echo-schema"));
40
+ var import_invariant = require("@dxos/invariant");
30
41
  var import_echo_schema = require("@dxos/echo-schema");
31
42
  var import_keys = require("@dxos/keys");
32
43
  var import_echo_schema2 = require("@dxos/echo-schema");
33
- var import_live_object = require("@dxos/live-object");
44
+ var import_effect = require("effect");
45
+ var EchoSchema2 = __toESM(require("@dxos/echo-schema"));
46
+ var import_invariant2 = require("@dxos/invariant");
47
+ var LiveObject = __toESM(require("@dxos/live-object"));
48
+ var EchoSchema3 = __toESM(require("@dxos/echo-schema"));
49
+ var import_invariant3 = require("@dxos/invariant");
50
+ var LiveObject2 = __toESM(require("@dxos/live-object"));
51
+ var EchoSchema4 = __toESM(require("@dxos/echo-schema"));
34
52
  var import_echo_schema3 = require("@dxos/echo-schema");
35
- var import_echo_schema4 = require("@dxos/echo-schema");
36
- var import_echo_schema5 = require("@dxos/echo-schema");
37
- var import_invariant = require("@dxos/invariant");
38
- var import_keys2 = require("@dxos/keys");
39
- var import_live_object2 = require("@dxos/live-object");
40
53
  var __defProp2 = Object.defineProperty;
41
54
  var __export2 = (target, all) => {
42
55
  for (var name in all)
43
56
  __defProp2(target, name, { get: all[name], enumerable: true });
44
57
  };
45
- var Obj_exports = {};
46
- __export2(Obj_exports, {
47
- create: () => create,
48
- getSchema: () => getSchema
49
- });
50
- var create = import_live_object.live;
51
- var getSchema = import_echo_schema2.getSchema;
52
- var Ref_exports = {};
53
- __export2(Ref_exports, {
54
- make: () => make
55
- });
56
- var make = import_echo_schema3.Ref.make;
57
- var Relation_exports = {};
58
- __export2(Relation_exports, {
59
- def: () => def
60
- });
61
- var def = import_echo_schema4.EchoRelation;
62
58
  var Type_exports = {};
63
59
  __export2(Type_exports, {
64
- Expando: () => Expando,
65
- Kind: () => Kind,
66
- ObjectId: () => ObjectId,
67
- Ref: () => Ref,
68
- SpaceId: () => SpaceId,
69
- create: () => create2,
70
- def: () => def2,
60
+ DXN: () => import_keys.DXN,
61
+ Expando: () => import_echo_schema2.Expando,
62
+ Format: () => import_echo_schema2.Format,
63
+ JsonSchema: () => import_echo_schema2.JsonSchemaType,
64
+ Kind: () => import_echo_schema.EntityKind,
65
+ Obj: () => Obj,
66
+ ObjectId: () => import_keys.ObjectId,
67
+ Ref: () => Ref2,
68
+ Relation: () => Relation,
69
+ SpaceId: () => import_keys.SpaceId,
71
70
  getDXN: () => getDXN,
72
71
  getMeta: () => getMeta,
73
- getSchema: () => getSchema2,
74
72
  getTypename: () => getTypename,
75
73
  getVersion: () => getVersion,
76
- instanceOf: () => instanceOf,
77
- isMutable: () => isMutable,
78
- toJsonSchema: () => toJsonSchema
74
+ isMutable: () => isMutable2,
75
+ toJsonSchema: () => import_echo_schema2.toJsonSchema
79
76
  });
80
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/type/Type.ts";
81
- var SpaceId = import_keys2.SpaceId;
82
- var ObjectId = import_echo_schema5.ObjectId;
83
- var Ref = (self) => (0, import_echo_schema5.Ref)(self);
84
- var Kind = import_echo_schema5.EntityKind;
85
- var Expando = import_echo_schema5.Expando;
86
- var def2 = (meta) => (0, import_echo_schema5.EchoObject)(meta);
87
- var create2 = import_live_object2.live;
88
- var getSchema2 = import_echo_schema5.getSchema;
89
- var instanceOf = import_echo_schema5.isInstanceOf;
90
- var getDXN = import_echo_schema5.getSchemaDXN;
91
- var getMeta = import_echo_schema5.getTypeAnnotation;
77
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Type.ts";
78
+ var Obj = EchoSchema.EchoObject;
79
+ var Relation = EchoSchema.EchoRelation;
80
+ var Ref2 = EchoSchema.Ref;
81
+ var getDXN = (schema) => {
82
+ return EchoSchema.getSchemaDXN(schema);
83
+ };
92
84
  var getTypename = (schema) => {
93
- const typename = (0, import_echo_schema5.getSchemaTypename)(schema);
94
- (0, import_invariant.invariant)(typename, "Invalid object", {
85
+ const typename = EchoSchema.getSchemaTypename(schema);
86
+ (0, import_invariant.invariant)(typeof typename === "string" && !typename.startsWith("dxn:"), "Invalid typename", {
95
87
  F: __dxlog_file,
96
- L: 129,
88
+ L: 84,
97
89
  S: void 0,
98
90
  A: [
99
- "typename",
100
- "'Invalid object'"
91
+ "typeof typename === 'string' && !typename.startsWith('dxn:')",
92
+ "'Invalid typename'"
101
93
  ]
102
94
  });
103
95
  return typename;
104
96
  };
105
- var getVersion = import_echo_schema5.getSchemaVersion;
106
- var isMutable = import_echo_schema5.isMutable;
107
- var toJsonSchema = import_echo_schema5.toJsonSchema;
97
+ var getVersion = (schema) => {
98
+ const version = EchoSchema.getSchemaVersion(schema);
99
+ (0, import_invariant.invariant)(typeof version === "string" && version.match(/^\d+\.\d+\.\d+$/), "Invalid version", {
100
+ F: __dxlog_file,
101
+ L: 94,
102
+ S: void 0,
103
+ A: [
104
+ "typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/)",
105
+ "'Invalid version'"
106
+ ]
107
+ });
108
+ return version;
109
+ };
110
+ var getMeta = (schema) => {
111
+ return EchoSchema.getTypeAnnotation(schema);
112
+ };
113
+ var isMutable2 = (schema) => {
114
+ return EchoSchema.isMutable(schema);
115
+ };
116
+ var Obj_exports = {};
117
+ __export2(Obj_exports, {
118
+ getDXN: () => getDXN3,
119
+ getMeta: () => getMeta3,
120
+ getSchema: () => getSchema2,
121
+ getSchemaDXN: () => getSchemaDXN2,
122
+ getTypename: () => getTypename3,
123
+ instanceOf: () => instanceOf,
124
+ isDeleted: () => isDeleted2,
125
+ isObject: () => isObject,
126
+ make: () => make
127
+ });
128
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Obj.ts";
129
+ var make = LiveObject.live;
130
+ var isObject = (obj) => {
131
+ return LiveObject.isLiveObject(obj);
132
+ };
133
+ var instanceOf = (...args) => {
134
+ if (args.length === 1) {
135
+ return (obj) => EchoSchema2.isInstanceOf(args[0], obj);
136
+ }
137
+ return EchoSchema2.isInstanceOf(args[0], args[1]);
138
+ };
139
+ var getSchema2 = EchoSchema2.getSchema;
140
+ var getDXN3 = (obj) => {
141
+ (0, import_invariant2.assertArgument)(!import_effect.Schema.isSchema(obj), "Object should not be a schema.");
142
+ const dxn = EchoSchema2.getDXN(obj);
143
+ (0, import_invariant2.invariant)(dxn != null, "Invalid object.", {
144
+ F: __dxlog_file2,
145
+ L: 48,
146
+ S: void 0,
147
+ A: [
148
+ "dxn != null",
149
+ "'Invalid object.'"
150
+ ]
151
+ });
152
+ return dxn;
153
+ };
154
+ var getSchemaDXN2 = (obj) => {
155
+ const type = EchoSchema2.getType(obj);
156
+ (0, import_invariant2.invariant)(type != null, "Invalid object.", {
157
+ F: __dxlog_file2,
158
+ L: 58,
159
+ S: void 0,
160
+ A: [
161
+ "type != null",
162
+ "'Invalid object.'"
163
+ ]
164
+ });
165
+ return type;
166
+ };
167
+ var getTypename3 = (obj) => {
168
+ const schema = getSchema2(obj);
169
+ if (schema == null) {
170
+ return getSchemaDXN2(obj)?.asTypeDXN()?.type;
171
+ }
172
+ return EchoSchema2.getTypename(schema);
173
+ };
174
+ var getMeta3 = (obj) => {
175
+ const meta = EchoSchema2.getMeta(obj);
176
+ (0, import_invariant2.invariant)(meta != null, "Invalid object.", {
177
+ F: __dxlog_file2,
178
+ L: 78,
179
+ S: void 0,
180
+ A: [
181
+ "meta != null",
182
+ "'Invalid object.'"
183
+ ]
184
+ });
185
+ return meta;
186
+ };
187
+ var isDeleted2 = (obj) => {
188
+ const deleted = EchoSchema2.isDeleted(obj);
189
+ (0, import_invariant2.invariant)(typeof deleted === "boolean", "Invalid object.", {
190
+ F: __dxlog_file2,
191
+ L: 84,
192
+ S: void 0,
193
+ A: [
194
+ "typeof deleted === 'boolean'",
195
+ "'Invalid object.'"
196
+ ]
197
+ });
198
+ return deleted;
199
+ };
200
+ var Relation_exports = {};
201
+ __export2(Relation_exports, {
202
+ getSource: () => getSource,
203
+ getTarget: () => getTarget,
204
+ isRelation: () => isRelation,
205
+ make: () => make2
206
+ });
207
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Relation.ts";
208
+ var make2 = LiveObject2.live;
209
+ var isRelation = (value) => {
210
+ if (typeof value !== "object" || value === null) {
211
+ return false;
212
+ }
213
+ if (EchoSchema3.ATTR_RELATION_SOURCE in value || EchoSchema3.ATTR_RELATION_TARGET in value) {
214
+ return true;
215
+ }
216
+ const kind = value[EchoSchema3.EntityKindPropertyId];
217
+ return kind === EchoSchema3.EntityKind.Relation;
218
+ };
219
+ var getSource = (relation) => {
220
+ (0, import_invariant3.invariant)(isRelation(relation), void 0, {
221
+ F: __dxlog_file3,
222
+ L: 30,
223
+ S: void 0,
224
+ A: [
225
+ "isRelation(relation)",
226
+ ""
227
+ ]
228
+ });
229
+ const obj = relation[EchoSchema3.RelationSourceId];
230
+ (0, import_invariant3.invariant)(obj !== void 0, `Invalid source: ${relation.id}`, {
231
+ F: __dxlog_file3,
232
+ L: 32,
233
+ S: void 0,
234
+ A: [
235
+ "obj !== undefined",
236
+ "`Invalid source: ${relation.id}`"
237
+ ]
238
+ });
239
+ return obj;
240
+ };
241
+ var getTarget = (relation) => {
242
+ (0, import_invariant3.invariant)(isRelation(relation), void 0, {
243
+ F: __dxlog_file3,
244
+ L: 41,
245
+ S: void 0,
246
+ A: [
247
+ "isRelation(relation)",
248
+ ""
249
+ ]
250
+ });
251
+ const obj = relation[EchoSchema3.RelationTargetId];
252
+ (0, import_invariant3.invariant)(obj !== void 0, `Invalid target: ${relation.id}`, {
253
+ F: __dxlog_file3,
254
+ L: 43,
255
+ S: void 0,
256
+ A: [
257
+ "obj !== undefined",
258
+ "`Invalid target: ${relation.id}`"
259
+ ]
260
+ });
261
+ return obj;
262
+ };
263
+ var Ref_exports = {};
264
+ __export2(Ref_exports, {
265
+ fromDXN: () => fromDXN,
266
+ isRef: () => isRef,
267
+ make: () => make3
268
+ });
269
+ var make3 = EchoSchema4.Ref.make;
270
+ var isRef = EchoSchema4.Ref.isRef;
271
+ var fromDXN = EchoSchema4.Ref.fromDXN;
108
272
  // Annotate the CommonJS export names for ESM import in node:
109
273
  0 && (module.exports = {
110
- DXN,
111
- Format,
112
- FormatEnum,
274
+ Filter,
113
275
  Obj,
276
+ Query,
114
277
  Ref,
115
278
  Relation,
116
279
  Type
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/type/Obj.ts", "../../../src/type/Ref.ts", "../../../src/type/Relation.ts", "../../../src/type/Type.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nexport { Format, FormatEnum } from '@dxos/echo-schema';\nexport { DXN } from '@dxos/keys';\n\nexport * from './type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AnyLiveObject as AnyLiveObject$ } from '@dxos/echo-db';\nimport { type BaseEchoObject, type BaseObject, getSchema as getSchema$ } from '@dxos/echo-schema';\nimport { live as live$ } from '@dxos/live-object';\n\n// TODO(burdon): Remove from Type?\n\nexport declare namespace Obj {\n export type Any = BaseEchoObject;\n export type Live<T extends BaseObject> = AnyLiveObject$<T>;\n}\n\nexport const create = live$;\n\nexport const getSchema = getSchema$;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Ref as Ref$ } from '@dxos/echo-schema';\n\nexport const make = Ref$.make;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { EchoRelation, type RelationSourceTargetRefs } from '@dxos/echo-schema';\n\nexport const def = EchoRelation;\n\n/**\n * Get relation target type.\n */\nexport type Target<A> = A extends RelationSourceTargetRefs<infer T, infer _S> ? T : never;\n\n/**\n * Get relation source type.\n */\nexport type Source<A> = A extends RelationSourceTargetRefs<infer _T, infer S> ? S : never;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport { type AnyLiveObject as AnyLiveObject$ } from '@dxos/echo-db';\nimport {\n type BaseEchoObject,\n type BaseObject,\n type BaseSchema,\n type EchoSchema,\n EchoObject,\n EntityKind,\n Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n ObjectId as ObjectId$,\n Ref as Ref$,\n type StoredSchema,\n type TypeMeta,\n getTypeAnnotation,\n getSchema as getSchema$,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n isMutable as isMutable$,\n toJsonSchema as toJsonSchema$,\n} from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceId as SpaceId$ } from '@dxos/keys';\nimport { live as live$ } from '@dxos/live-object';\n\n/**\n * Type System API.\n *\n * @category api namespace\n * @since 0.9.0\n */\n\n//\n// Keys\n//\n\nexport const SpaceId = SpaceId$;\nexport type SpaceId = SpaceId$;\n\nexport const ObjectId = ObjectId$;\nexport type ObjectId = ObjectId$;\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Person = Schema.Struct({\n * name: Schema.String,\n * organization: Type.Ref(Organization),\n * }).pipe(Type.def({\n * typename: 'example.com/type/Person',\n * version: '0.1.0',\n * }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n\n//\n// Objects\n//\n\nexport const Kind = EntityKind;\nexport type AnyObject = BaseEchoObject;\nexport type AnyLiveObject<T extends BaseObject> = AnyLiveObject$<T>;\n\n//\n// Schema\n//\n\nexport type JsonSchema = JsonSchemaType;\n\n/**\n * A schema that can be extended with arbitrary properties.\n */\nexport const Expando = Expando$;\nexport type Expando = Expando$;\n\n// TODO(burdon): Review/remove.\nexport type Abstract<T = any> = BaseSchema<T>;\nexport type ImmutableType<T> = ImmutableSchema<T>;\nexport type MutableType<T> = EchoSchema<T>;\nexport type StoredType = StoredSchema;\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Organization = Schema.Struct({\n * name: Schema.String,\n * }).pipe(Type.def({\n * typename: 'example.com/type/Organization',\n * version: '0.1.0',\n * }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n//\n// Object utils\n//\n\nexport const create = live$;\n\nexport const getSchema = getSchema$;\nexport const instanceOf = isInstanceOf;\n\n//\n// Type utils\n//\n\n// TODO(burdon): Reconcile getDXN and getTypename.\nexport const getDXN = getSchemaDXN;\nexport const getMeta = getTypeAnnotation;\nexport const getTypename = (schema: Schema.Schema.AnyNoContext): string => {\n const typename = getSchemaTypename(schema);\n invariant(typename, 'Invalid object');\n return typename;\n};\nexport const getVersion = getSchemaVersion;\nexport const isMutable = isMutable$;\nexport const toJsonSchema = toJsonSchema$;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAmC;AACnC,kBAAoB;ACApB,IAAAA,sBAA8E;AAC9E,yBAA8B;ACF9B,IAAAA,sBAA4B;ACA5B,IAAAA,sBAA4D;ACG5D,IAAAA,sBAsBO;AACP,uBAA0B;AAC1B,IAAAC,eAAoC;AACpC,IAAAC,sBAA8B;;;;;;AHhC9B,IAAA,cAAA,CAAA;;;;;AAeO,IAAMC,SAASC,mBAAAA;AAEf,IAAMC,YAAYC,oBAAAA;ACjBzB,IAAA,cAAA,CAAA;;;;AAMO,IAAMC,OAAOC,oBAAAA,IAAKD;ACNzB,IAAA,mBAAA,CAAA;;;;AAMO,IAAME,MAAMC;ACNnB,IAAA,eAAA,CAAA;;;;;;;gBAAAP;EAAA,KAAA,MAAAM;EAAA,QAAA,MAAA;;mBAAAJ;EAAA,aAAA,MAAA;;;;;;;AA6CO,IAAMM,UAAUC,aAAAA;AAGhB,IAAMC,WAAWC,oBAAAA;AAkBjB,IAAMC,MAAM,CAAuCC,aAAYR,oBAAAA,KAA4BQ,IAAAA;AAM3F,IAAMC,OAAOC;AAab,IAAMC,UAAUC,oBAAAA;AAuBhB,IAAMX,OAAM,CAACY,aAAmBC,gCAAWD,IAAAA;AAM3C,IAAMlB,UAASC,oBAAAA;AAEf,IAAMC,aAAYC,oBAAAA;AAClB,IAAMiB,aAAaC;AAOnB,IAAMC,SAASC;AACf,IAAMC,UAAUC;AAChB,IAAMC,cAAc,CAACC,WAAAA;AAC1B,QAAMC,eAAWC,uCAAkBF,MAAAA;AACnCG,kCAAUF,UAAU,kBAAA;;;;;;;;;AACpB,SAAOA;AACT;AACO,IAAMG,aAAaC;AACnB,IAAMC,YAAYC,oBAAAA;AAClB,IAAMC,eAAeC,oBAAAA;",
6
- "names": ["import_echo_schema", "import_keys", "import_live_object", "create", "live$", "getSchema", "getSchema$", "make", "Ref$", "def", "EchoRelation", "SpaceId", "SpaceId$", "ObjectId", "ObjectId$", "Ref", "self", "Kind", "EntityKind", "Expando", "Expando$", "meta", "EchoObject", "instanceOf", "isInstanceOf", "getDXN", "getSchemaDXN", "getMeta", "getTypeAnnotation", "getTypename", "schema", "typename", "getSchemaTypename", "invariant", "getVersion", "getSchemaVersion", "isMutable", "isMutable$", "toJsonSchema", "toJsonSchema$"]
3
+ "sources": ["../../../src/Type.ts", "../../../src/Obj.ts", "../../../src/Relation.ts", "../../../src/Ref.ts", "../../../src/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport type { EncodedReference } from '@dxos/echo-protocol';\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport type * as Keys from '@dxos/keys';\n\n/**\n * ECHO schema.\n */\nexport type Schema = EchoSchema.EchoSchema;\n\n/**\n * EchoObject schema.\n */\nexport const Obj = EchoSchema.EchoObject;\n\n/**\n * EchoRelation schema.\n */\nexport const Relation = EchoSchema.EchoRelation;\n\n/**\n * Ref schema.\n */\nexport const Ref: <S extends Obj.Any>(schema: S) => EchoSchema.Ref$<Schema.Schema.Type<S>> = EchoSchema.Ref;\n\nexport namespace Obj {\n /**\n * Type that represents an arbitrary schema type of an object.\n * NOTE: This is not an instance type.\n */\n // TODO(dmaretskyi): If schema was covariant, we could specify props in here, like `id: ObjectId`.\n export type Any = Schema.Schema.AnyNoContext;\n}\n\nexport namespace Relation {\n /**\n * Type that represents an arbitrary schema type of a relation.\n * NOTE: This is not an instance type.\n */\n // TODO(dmaretskyi): If schema was covariant, we could specify props in here, like `id: ObjectId`.\n export type Any = Schema.Schema.AnyNoContext;\n\n /**\n * Get relation target type.\n */\n export type Target<A> = A extends EchoSchema.RelationSourceTargetRefs<infer T, infer _S> ? T : never;\n\n /**\n * Get relation source type.\n */\n export type Source<A> = A extends EchoSchema.RelationSourceTargetRefs<infer _T, infer S> ? S : never;\n}\n\nexport namespace Ref {\n /**\n * Type that represents an arbitrary schema type of a reference.\n * NOTE: This is not an instance type.\n */\n export type Any = Schema.Schema<EchoSchema.Ref<any>, EncodedReference>;\n}\n\n/**\n * Gets the full DXN of the schema.\n * Will include the version if it's a `type` DXN.\n * @example \"dxn:example.com/type/Person:0.1.0\"\n * @example \"dxn:echo:SSSSSSSSSS:XXXXXXXXXXXXX\"\n */\nexport const getDXN = (schema: Obj.Any | Relation.Any): Keys.DXN | undefined => {\n return EchoSchema.getSchemaDXN(schema);\n};\n\n/**\n * @param schema - Schema to get the typename from.\n * @returns The typename of the schema. Example: `example.com/type/Person`.\n */\nexport const getTypename = (schema: Obj.Any | Relation.Any): string => {\n const typename = EchoSchema.getSchemaTypename(schema);\n invariant(typeof typename === 'string' && !typename.startsWith('dxn:'), 'Invalid typename');\n return typename;\n};\n\n/**\n * Gets the version of the schema.\n * @example 0.1.0\n */\nexport const getVersion = (schema: Obj.Any | Relation.Any): string => {\n const version = EchoSchema.getSchemaVersion(schema);\n invariant(typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/), 'Invalid version');\n return version;\n};\n\n/**\n * ECHO type metadata.\n */\nexport type Meta = EchoSchema.TypeAnnotation;\n\n/**\n * Gets the meta data of the schema.\n */\nexport const getMeta = (schema: Obj.Any | Relation.Any): Meta | undefined => {\n return EchoSchema.getTypeAnnotation(schema);\n};\n\nexport { EntityKind as Kind } from '@dxos/echo-schema';\n\n/**\n * @returns True if the schema is mutable.\n */\nexport const isMutable = (schema: Obj.Any | Relation.Any): boolean => {\n return EchoSchema.isMutable(schema);\n};\n\nexport { SpaceId, ObjectId, DXN } from '@dxos/keys';\n\nexport {\n //\n Expando,\n JsonSchemaType as JsonSchema,\n toJsonSchema,\n Format,\n} from '@dxos/echo-schema';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { assertArgument, invariant } from '@dxos/invariant';\nimport type { DXN } from '@dxos/keys';\nimport * as LiveObject from '@dxos/live-object';\n\nimport type * as Type from './Type';\n\nexport type Any = EchoSchema.AnyEchoObject;\n\nexport const make = LiveObject.live;\n\n// TODO(dmaretskyi): Currently broken\nexport const isObject = (obj: unknown): obj is Any => {\n return LiveObject.isLiveObject(obj);\n};\n\n/**\n * Check that object or relation is an instance of a schema.\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John' });\n * const isPerson = Obj.instanceOf(Person);\n * isPerson(person); // true\n * ```\n */\nexport const instanceOf: {\n <S extends Type.Relation.Any | Type.Obj.Any>(schema: S): (value: unknown) => value is S;\n <S extends Type.Relation.Any | Type.Obj.Any>(schema: S, value: unknown): value is S;\n} = ((...args: any[]) => {\n if (args.length === 1) {\n return (obj: unknown) => EchoSchema.isInstanceOf(args[0], obj);\n }\n\n return EchoSchema.isInstanceOf(args[0], args[1]);\n}) as any;\n\nexport const getSchema = EchoSchema.getSchema;\n\nexport const getDXN = (obj: Any): DXN => {\n assertArgument(!Schema.isSchema(obj), 'Object should not be a schema.');\n const dxn = EchoSchema.getDXN(obj);\n invariant(dxn != null, 'Invalid object.');\n return dxn;\n};\n\n/**\n * @returns The DXN of the object's type.\n * @example dxn:example.com/type/Contact:1.0.0\n */\nexport const getSchemaDXN = (obj: Any): DXN => {\n const type = EchoSchema.getType(obj);\n invariant(type != null, 'Invalid object.');\n return type;\n};\n\n/**\n * @returns The typename of the object's type.\n * @example `example.com/type/Contact`\n */\nexport const getTypename = (obj: Any): string | undefined => {\n const schema = getSchema(obj);\n if (schema == null) {\n // Try to extract typename from DXN.\n return getSchemaDXN(obj)?.asTypeDXN()?.type;\n }\n\n return EchoSchema.getTypename(schema);\n};\n\nexport const getMeta = (obj: Any): EchoSchema.ObjectMeta => {\n const meta = EchoSchema.getMeta(obj);\n invariant(meta != null, 'Invalid object.');\n return meta;\n};\n\nexport const isDeleted = (obj: Any): boolean => {\n const deleted = EchoSchema.isDeleted(obj);\n invariant(typeof deleted === 'boolean', 'Invalid object.');\n return deleted;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport * as LiveObject from '@dxos/live-object';\n\nexport type Any = EchoSchema.AnyEchoObject & EchoSchema.RelationSourceTargetRefs;\n\nexport const make = LiveObject.live;\n\nexport const isRelation = (value: unknown): value is Any => {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n if (EchoSchema.ATTR_RELATION_SOURCE in value || EchoSchema.ATTR_RELATION_TARGET in value) {\n return true;\n }\n\n const kind = (value as any)[EchoSchema.EntityKindPropertyId];\n return kind === EchoSchema.EntityKind.Relation;\n};\n\n/**\n * @returns Relation source.\n * @throws If the object is not a relation.\n */\nexport const getSource = <T extends Any>(relation: T): EchoSchema.RelationSource<T> => {\n invariant(isRelation(relation));\n const obj = relation[EchoSchema.RelationSourceId];\n invariant(obj !== undefined, `Invalid source: ${relation.id}`);\n return obj;\n};\n\n/**\n * @returns Relation target.\n * @throws If the object is not a relation.\n */\nexport const getTarget = <T extends Any>(relation: T): EchoSchema.RelationTarget<T> => {\n invariant(isRelation(relation));\n const obj = relation[EchoSchema.RelationTargetId];\n invariant(obj !== undefined, `Invalid target: ${relation.id}`);\n return obj;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as EchoSchema from '@dxos/echo-schema';\n\nimport type * as Obj from './Obj';\n\nexport type Any = EchoSchema.Ref<Obj.Any>;\n\nexport const make = EchoSchema.Ref.make;\n\nexport const isRef: (value: unknown) => value is Any = EchoSchema.Ref.isRef;\n\n// TODO(dmaretskyi): Consider just allowing `make` to accept DXN.\nexport const fromDXN = EchoSchema.Ref.fromDXN;\n\n/**\n * Extract reference target.\n */\nexport type Target<R extends Any> = R extends EchoSchema.Ref<infer T> ? T : never;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport * as Type from './Type';\nexport * as Obj from './Obj';\nexport * as Relation from './Relation';\nexport * as Ref from './Ref';\n\nexport { type Live } from '@dxos/live-object';\nexport { Filter, Query } from '@dxos/echo-schema';\n"],
5
+ "mappings": "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",
6
+ "names": ["import_echo_schema", "import_invariant", "Ref", "isMutable", "Obj", "EchoObject", "Relation", "EchoRelation", "getDXN", "schema", "getSchemaDXN", "getTypename", "typename", "getSchemaTypename", "invariant", "startsWith", "getVersion", "version", "getSchemaVersion", "match", "getMeta", "getTypeAnnotation", "getSchema", "isDeleted", "make", "live", "isObject", "obj", "isLiveObject", "instanceOf", "args", "length", "isInstanceOf", "assertArgument", "Schema", "isSchema", "dxn", "type", "getType", "asTypeDXN", "meta", "deleted", "isRelation", "value", "ATTR_RELATION_SOURCE", "ATTR_RELATION_TARGET", "kind", "EntityKindPropertyId", "EntityKind", "getSource", "relation", "RelationSourceId", "undefined", "id", "getTarget", "RelationTargetId", "isRef", "fromDXN"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/core/echo/echo/src/type/Obj.ts":{"bytes":1448,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/type/Ref.ts":{"bytes":726,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/type/Relation.ts":{"bytes":1122,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/type/Type.ts":{"bytes":8579,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/type/index.ts":{"bytes":940,"imports":[{"path":"packages/core/echo/echo/src/type/Obj.ts","kind":"import-statement","original":"./Obj"},{"path":"packages/core/echo/echo/src/type/Ref.ts","kind":"import-statement","original":"./Ref"},{"path":"packages/core/echo/echo/src/type/Relation.ts","kind":"import-statement","original":"./Relation"},{"path":"packages/core/echo/echo/src/type/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"},"packages/core/echo/echo/src/index.ts":{"bytes":829,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/type/index.ts","kind":"import-statement","original":"./type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6064},"packages/core/echo/echo/dist/lib/node/index.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["DXN","Format","FormatEnum","Obj","Ref","Relation","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":90},"packages/core/echo/echo/src/type/Obj.ts":{"bytesInOutput":263},"packages/core/echo/echo/src/type/index.ts":{"bytesInOutput":0},"packages/core/echo/echo/src/type/Ref.ts":{"bytesInOutput":140},"packages/core/echo/echo/src/type/Relation.ts":{"bytesInOutput":151},"packages/core/echo/echo/src/type/Type.ts":{"bytesInOutput":1643}},"bytes":2854}}}
1
+ {"inputs":{"packages/core/echo/echo/src/Type.ts":{"bytes":8839,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Obj.ts":{"bytes":8124,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Relation.ts":{"bytes":5369,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Ref.ts":{"bytes":1595,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/index.ts":{"bytes":1162,"imports":[{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"},{"path":"packages/core/echo/echo/src/Obj.ts","kind":"import-statement","original":"./Obj"},{"path":"packages/core/echo/echo/src/Relation.ts","kind":"import-statement","original":"./Relation"},{"path":"packages/core/echo/echo/src/Ref.ts","kind":"import-statement","original":"./Ref"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12153},"packages/core/echo/echo/dist/lib/node/index.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["Filter","Obj","Query","Ref","Relation","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":1927},"packages/core/echo/echo/src/index.ts":{"bytesInOutput":51},"packages/core/echo/echo/src/Obj.ts":{"bytesInOutput":2226},"packages/core/echo/echo/src/Relation.ts":{"bytesInOutput":1700},"packages/core/echo/echo/src/Ref.ts":{"bytesInOutput":276}},"bytes":6715}}}