@dxos/echo-protocol 0.6.13-main.548ca8d → 0.6.13-main.ed424a1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/automerge.d.ts +4 -0
- package/dist/types/src/automerge.d.ts.map +1 -0
- package/dist/types/src/document-structure.d.ts +2 -1
- package/dist/types/src/document-structure.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/automerge.ts +10 -0
- package/src/document-structure.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":2608,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytes":3580,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-protocol/src/reference.ts":{"bytes":11612,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytes":1591,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytes":1719,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/collection-sync.ts":{"bytes":550,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/index.ts":{"bytes":1017,"imports":[{"path":"packages/core/echo/echo-protocol/src/document-structure.ts","kind":"import-statement","original":"./document-structure"},{"path":"packages/core/echo/echo-protocol/src/reference.ts","kind":"import-statement","original":"./reference"},{"path":"packages/core/echo/echo-protocol/src/space-doc-version.ts","kind":"import-statement","original":"./space-doc-version"},{"path":"packages/core/echo/echo-protocol/src/legacy.ts","kind":"import-statement","original":"./legacy"},{"path":"packages/core/echo/echo-protocol/src/collection-sync.ts","kind":"import-statement","original":"./collection-sync"},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"}},"outputs":{"packages/core/echo/echo-protocol/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8975},"packages/core/echo/echo-protocol/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["LEGACY_REFERENCE_TYPE_TAG","LEGACY_TYPE_PROPERTIES","REFERENCE_TYPE_TAG","Reference","SpaceDocVersion","convertLegacyReference","createIdFromSpaceKey","decodeReference","encodeReference","isEncodedReference","isLegacyReference"],"entryPoint":"packages/core/echo/echo-protocol/src/index.ts","inputs":{"packages/core/echo/echo-protocol/src/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-protocol/src/reference.ts":{"bytesInOutput":2495},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytesInOutput":604},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytesInOutput":179},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytesInOutput":257}},"bytes":4094}}}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":2608,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytes":3580,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-protocol/src/reference.ts":{"bytes":11612,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytes":1591,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytes":1719,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/collection-sync.ts":{"bytes":550,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/index.ts":{"bytes":1017,"imports":[{"path":"packages/core/echo/echo-protocol/src/document-structure.ts","kind":"import-statement","original":"./document-structure"},{"path":"packages/core/echo/echo-protocol/src/reference.ts","kind":"import-statement","original":"./reference"},{"path":"packages/core/echo/echo-protocol/src/space-doc-version.ts","kind":"import-statement","original":"./space-doc-version"},{"path":"packages/core/echo/echo-protocol/src/legacy.ts","kind":"import-statement","original":"./legacy"},{"path":"packages/core/echo/echo-protocol/src/collection-sync.ts","kind":"import-statement","original":"./collection-sync"},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"}},"outputs":{"packages/core/echo/echo-protocol/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8975},"packages/core/echo/echo-protocol/dist/lib/node/index.cjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["LEGACY_REFERENCE_TYPE_TAG","LEGACY_TYPE_PROPERTIES","REFERENCE_TYPE_TAG","Reference","SpaceDocVersion","convertLegacyReference","createIdFromSpaceKey","decodeReference","encodeReference","isEncodedReference","isLegacyReference"],"entryPoint":"packages/core/echo/echo-protocol/src/index.ts","inputs":{"packages/core/echo/echo-protocol/src/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-protocol/src/reference.ts":{"bytesInOutput":2495},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytesInOutput":604},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytesInOutput":179},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytesInOutput":257}},"bytes":4094}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/core/echo/echo-protocol/src/document-structure.ts":{"bytes":2608,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytes":3580,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-protocol/src/reference.ts":{"bytes":11612,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytes":1591,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytes":1719,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/collection-sync.ts":{"bytes":550,"imports":[],"format":"esm"},"packages/core/echo/echo-protocol/src/index.ts":{"bytes":1017,"imports":[{"path":"packages/core/echo/echo-protocol/src/document-structure.ts","kind":"import-statement","original":"./document-structure"},{"path":"packages/core/echo/echo-protocol/src/reference.ts","kind":"import-statement","original":"./reference"},{"path":"packages/core/echo/echo-protocol/src/space-doc-version.ts","kind":"import-statement","original":"./space-doc-version"},{"path":"packages/core/echo/echo-protocol/src/legacy.ts","kind":"import-statement","original":"./legacy"},{"path":"packages/core/echo/echo-protocol/src/collection-sync.ts","kind":"import-statement","original":"./collection-sync"},{"path":"packages/core/echo/echo-protocol/src/space-id.ts","kind":"import-statement","original":"./space-id"}],"format":"esm"}},"outputs":{"packages/core/echo/echo-protocol/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8977},"packages/core/echo/echo-protocol/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["LEGACY_REFERENCE_TYPE_TAG","LEGACY_TYPE_PROPERTIES","REFERENCE_TYPE_TAG","Reference","SpaceDocVersion","convertLegacyReference","createIdFromSpaceKey","decodeReference","encodeReference","isEncodedReference","isLegacyReference"],"entryPoint":"packages/core/echo/echo-protocol/src/index.ts","inputs":{"packages/core/echo/echo-protocol/src/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-protocol/src/reference.ts":{"bytesInOutput":2495},"packages/core/echo/echo-protocol/src/space-id.ts":{"bytesInOutput":604},"packages/core/echo/echo-protocol/src/space-doc-version.ts":{"bytesInOutput":179},"packages/core/echo/echo-protocol/src/legacy.ts":{"bytesInOutput":257}},"bytes":4187}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../src/automerge.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,SAAS;IACxB,QAAQ,IAAI,MAAM,CAAC;CACpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RawString } from './automerge';
|
|
1
2
|
import { type EncodedReference } from './reference';
|
|
2
3
|
import type { SpaceDocVersion } from './space-doc-version';
|
|
3
4
|
export type SpaceState = {
|
|
@@ -18,7 +19,7 @@ export interface SpaceDoc {
|
|
|
18
19
|
* Object id points to an automerge doc url where the object is embedded.
|
|
19
20
|
*/
|
|
20
21
|
links?: {
|
|
21
|
-
[echoId: string]: string;
|
|
22
|
+
[echoId: string]: string | RawString;
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-structure.d.ts","sourceRoot":"","sources":["../../../src/document-structure.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG;IAEvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAGF,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B,MAAM,CAAC,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,CAAC;KAC/B,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"document-structure.d.ts","sourceRoot":"","sources":["../../../src/document-structure.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG;IAEvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAGF,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B,MAAM,CAAC,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,CAAC;KAC/B,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;KACtC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/echo-protocol",
|
|
3
|
-
"version": "0.6.13-main.
|
|
3
|
+
"version": "0.6.13-main.ed424a1",
|
|
4
4
|
"description": "Core ECHO APIs.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"src"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dxos/crypto": "0.6.13-main.
|
|
30
|
-
"@dxos/keys": "0.6.13-main.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
29
|
+
"@dxos/crypto": "0.6.13-main.ed424a1",
|
|
30
|
+
"@dxos/keys": "0.6.13-main.ed424a1",
|
|
31
|
+
"@dxos/protocols": "0.6.13-main.ed424a1",
|
|
32
|
+
"@dxos/util": "0.6.13-main.ed424a1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
package/src/automerge.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Copied here to not depend on the automerge package.
|
|
6
|
+
// Raw strings don't support CRDT merging but are more efficient to load and store.
|
|
7
|
+
// We need to call .toString() to get the actual string value.
|
|
8
|
+
export interface RawString {
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import type { RawString } from './automerge';
|
|
5
6
|
import { type EncodedReference } from './reference';
|
|
6
7
|
import type { SpaceDocVersion } from './space-doc-version';
|
|
7
8
|
|
|
@@ -27,7 +28,7 @@ export interface SpaceDoc {
|
|
|
27
28
|
* Object id points to an automerge doc url where the object is embedded.
|
|
28
29
|
*/
|
|
29
30
|
links?: {
|
|
30
|
-
[echoId: string]: string;
|
|
31
|
+
[echoId: string]: string | RawString;
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
|