@dxos/echo 0.8.1 → 0.8.2-main.12df754

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.
@@ -34,7 +34,7 @@ __export(Type_exports, {
34
34
  ref: () => ref
35
35
  });
36
36
  import { EchoObject, EntityKind, ObjectId, Ref as Ref$, getTypeAnnotation, getSchema, getSchemaDXN, getSchemaTypename, getSchemaVersion, isInstanceOf } from "@dxos/echo-schema";
37
- import { create as create$, makeRef } from "@dxos/live-object";
37
+ import { live as create$, makeRef } from "@dxos/live-object";
38
38
  var ref = makeRef;
39
39
  var create = create$;
40
40
  var def = (meta) => EchoObject(meta);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/Database.ts", "../../../src/Queue.ts", "../../../src/Space.ts", "../../../src/Type.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { create as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,WAAW;;;ACJpB;;;ACAA;;;ACAA;;;ACAA;;;;;;;;;;;;;;;AAMA,SAOEC,YACAC,YACAC,UACAC,OAAOC,MACPC,mBACAC,WACAC,cACAC,mBACAC,kBACAC,oBACK;AACP,SAASC,UAAUC,SAASC,eAAe;AA2CpC,IAAMC,MAAMC;AACZ,IAAMC,SAASC;AAgBf,IAAMC,MAAM,CAACC,SAAmBC,WAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,SAAYC,KAA4BD,IAAAA;",
6
- "names": ["DXN", "EchoObject", "EntityKind", "ObjectId", "Ref", "Ref$", "getTypeAnnotation", "getSchema", "getSchemaDXN", "getSchemaTypename", "getSchemaVersion", "isInstanceOf", "create", "create$", "makeRef", "ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { live as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,WAAW;;;ACJpB;;;ACAA;;;ACAA;;;ACAA;;;;;;;;;;;;;;;AAMA,SAOEC,YACAC,YACAC,UACAC,OAAOC,MACPC,mBACAC,WACAC,cACAC,mBACAC,kBACAC,oBACK;AACP,SAASC,QAAQC,SAASC,eAAe;AA2ClC,IAAMC,MAAMC;AACZ,IAAMC,SAASC;AAgBf,IAAMC,MAAM,CAACC,SAAmBC,WAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,SAAYC,KAA4BD,IAAAA;",
6
+ "names": ["DXN", "EchoObject", "EntityKind", "ObjectId", "Ref", "Ref$", "getTypeAnnotation", "getSchema", "getSchemaDXN", "getSchemaTypename", "getSchemaVersion", "isInstanceOf", "live", "create$", "makeRef", "ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6001,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4021},"packages/core/echo/echo/dist/lib/browser/index.mjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":744}},"bytes":1421}}}
1
+ {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6003,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4017},"packages/core/echo/echo/dist/lib/browser/index.mjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":742}},"bytes":1419}}}
@@ -52,7 +52,7 @@ __export2(Type_exports, {
52
52
  ref: () => ref
53
53
  });
54
54
  var ref = import_live_object.makeRef;
55
- var create = import_live_object.create;
55
+ var create = import_live_object.live;
56
56
  var def = (meta) => (0, import_echo_schema.EchoObject)(meta);
57
57
  var Ref = (self) => (0, import_echo_schema.Ref)(self);
58
58
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/Database.ts", "../../../src/Queue.ts", "../../../src/Space.ts", "../../../src/Type.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { create as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,kBAAoB;AIEpB,yBAiBO;AACP,yBAA2C;;;;;;AHxB3C,IAAA,mBAAA,CAAA;ACAA,IAAA,gBAAA,CAAA;ACAA,IAAA,gBAAA,CAAA;ACAA,IAAA,eAAA,CAAA;;;;;;;;;;;;;;;AAmEO,IAAMA,MAAMC;AACZ,IAAMC,SAASC,mBAAAA;AAgBf,IAAMC,MAAM,CAACC,aAAmBC,+BAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,aAAYC,mBAAAA,KAA4BD,IAAAA;",
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { live as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,kBAAoB;AIEpB,yBAiBO;AACP,yBAAyC;;;;;;AHxBzC,IAAA,mBAAA,CAAA;ACAA,IAAA,gBAAA,CAAA;ACAA,IAAA,gBAAA,CAAA;ACAA,IAAA,eAAA,CAAA;;;;;;;;;;;;;;;AAmEO,IAAMA,MAAMC;AACZ,IAAMC,SAASC,mBAAAA;AAgBf,IAAMC,MAAM,CAACC,aAAmBC,+BAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,aAAYC,mBAAAA,KAA4BD,IAAAA;",
6
6
  "names": ["ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6001,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4020},"packages/core/echo/echo/dist/lib/node/index.cjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":744}},"bytes":1388}}}
1
+ {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6003,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4016},"packages/core/echo/echo/dist/lib/node/index.cjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":742}},"bytes":1386}}}
@@ -34,7 +34,7 @@ __export(Type_exports, {
34
34
  ref: () => ref
35
35
  });
36
36
  import { EchoObject, EntityKind, ObjectId, Ref as Ref$, getTypeAnnotation, getSchema, getSchemaDXN, getSchemaTypename, getSchemaVersion, isInstanceOf } from "@dxos/echo-schema";
37
- import { create as create$, makeRef } from "@dxos/live-object";
37
+ import { live as create$, makeRef } from "@dxos/live-object";
38
38
  var ref = makeRef;
39
39
  var create = create$;
40
40
  var def = (meta) => EchoObject(meta);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/Database.ts", "../../../src/Queue.ts", "../../../src/Space.ts", "../../../src/Type.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { create as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,WAAW;;;ACJpB;;;ACAA;;;ACAA;;;ACAA;;;;;;;;;;;;;;;AAMA,SAOEC,YACAC,YACAC,UACAC,OAAOC,MACPC,mBACAC,WACAC,cACAC,mBACAC,kBACAC,oBACK;AACP,SAASC,UAAUC,SAASC,eAAe;AA2CpC,IAAMC,MAAMC;AACZ,IAAMC,SAASC;AAgBf,IAAMC,MAAM,CAACC,SAAmBC,WAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,SAAYC,KAA4BD,IAAAA;",
6
- "names": ["DXN", "EchoObject", "EntityKind", "ObjectId", "Ref", "Ref$", "getTypeAnnotation", "getSchema", "getSchemaDXN", "getSchemaTypename", "getSchemaVersion", "isInstanceOf", "create", "create$", "makeRef", "ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { live as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,WAAW;;;ACJpB;;;ACAA;;;ACAA;;;ACAA;;;;;;;;;;;;;;;AAMA,SAOEC,YACAC,YACAC,UACAC,OAAOC,MACPC,mBACAC,WACAC,cACAC,mBACAC,kBACAC,oBACK;AACP,SAASC,QAAQC,SAASC,eAAe;AA2ClC,IAAMC,MAAMC;AACZ,IAAMC,SAASC;AAgBf,IAAMC,MAAM,CAACC,SAAmBC,WAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,SAAYC,KAA4BD,IAAAA;",
6
+ "names": ["DXN", "EchoObject", "EntityKind", "ObjectId", "Ref", "Ref$", "getTypeAnnotation", "getSchema", "getSchemaDXN", "getSchemaTypename", "getSchemaVersion", "isInstanceOf", "live", "create$", "makeRef", "ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6001,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4021},"packages/core/echo/echo/dist/lib/node-esm/index.mjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":744}},"bytes":1480}}}
1
+ {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6003,"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/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4017},"packages/core/echo/echo/dist/lib/node-esm/index.mjs":{"imports":[{"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}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":742}},"bytes":1478}}}
@@ -19,8 +19,8 @@ export declare namespace Type {
19
19
  }
20
20
  export declare const ref: <T extends import("@dxos/echo-schema").BaseObject>(obj: T) => Ref$<T>;
21
21
  export declare const create: {
22
- <T extends import("@dxos/echo-schema").BaseObject>(obj: T): import("@dxos/live-object").ReactiveObject<T>;
23
- <T extends import("@dxos/echo-schema").BaseObject>(schema: Schema.Schema<T, any, never>, obj: NoInfer<import("@dxos/echo-schema").ExcludeId<T>>, meta?: import("@dxos/echo-schema").ObjectMeta): import("@dxos/live-object").ReactiveObject<T>;
22
+ <T extends import("@dxos/echo-schema").BaseObject>(obj: T): import("@dxos/live-object").Live<T>;
23
+ <T extends import("@dxos/echo-schema").BaseObject>(schema: Schema.Schema<T, any, never>, obj: NoInfer<import("@dxos/echo-schema").ExcludeId<T>>, meta?: import("@dxos/echo-schema").ObjectMeta): import("@dxos/live-object").Live<T>;
24
24
  };
25
25
  /**
26
26
  * Defines an ECHO type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/echo",
3
- "version": "0.8.1",
3
+ "version": "0.8.2-main.12df754",
4
4
  "description": "ECHO API",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -23,18 +23,18 @@
23
23
  "dependencies": {
24
24
  "@preact/signals-core": "^1.6.0",
25
25
  "effect": "3.13.3",
26
- "@dxos/debug": "0.8.1",
27
- "@dxos/echo-db": "0.8.1",
28
- "@dxos/echo-protocol": "0.8.1",
29
- "@dxos/effect": "0.8.1",
30
- "@dxos/echo-signals": "0.8.1",
31
- "@dxos/echo-schema": "0.8.1",
32
- "@dxos/invariant": "0.8.1",
33
- "@dxos/keys": "0.8.1",
34
- "@dxos/live-object": "0.8.1",
35
- "@dxos/node-std": "0.8.1",
36
- "@dxos/log": "0.8.1",
37
- "@dxos/util": "0.8.1"
26
+ "@dxos/debug": "0.8.2-main.12df754",
27
+ "@dxos/echo-protocol": "0.8.2-main.12df754",
28
+ "@dxos/echo-db": "0.8.2-main.12df754",
29
+ "@dxos/echo-signals": "0.8.2-main.12df754",
30
+ "@dxos/effect": "0.8.2-main.12df754",
31
+ "@dxos/invariant": "0.8.2-main.12df754",
32
+ "@dxos/keys": "0.8.2-main.12df754",
33
+ "@dxos/live-object": "0.8.2-main.12df754",
34
+ "@dxos/echo-schema": "0.8.2-main.12df754",
35
+ "@dxos/log": "0.8.2-main.12df754",
36
+ "@dxos/node-std": "0.8.2-main.12df754",
37
+ "@dxos/util": "0.8.2-main.12df754"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
package/src/Type.ts CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  getSchemaVersion,
23
23
  isInstanceOf,
24
24
  } from '@dxos/echo-schema';
25
- import { create as create$, makeRef } from '@dxos/live-object';
25
+ import { live as create$, makeRef } from '@dxos/live-object';
26
26
 
27
27
  // NOTES:
28
28
  // - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.
package/src/api.test.ts CHANGED
@@ -40,7 +40,7 @@ namespace Testing {
40
40
 
41
41
  export const Message = S.Struct({
42
42
  // TODO(burdon): Support S.Date; Custom Timestamp (with defaults).
43
- // TODO(burdon): Support defaults (update create and createStatic).
43
+ // TODO(burdon): Support defaults (update create and create).
44
44
  timestamp: S.String.pipe(
45
45
  S.propertySignature,
46
46
  S.withConstructorDefault(() => new Date().toISOString()),